Skip to content

Demos: DataGrid/TreeList aicolumn - handle inline module#33639

Open
flagmanAndrew wants to merge 3 commits into
DevExpress:26_1from
flagmanAndrew:26_1_csp-aicolumn
Open

Demos: DataGrid/TreeList aicolumn - handle inline module#33639
flagmanAndrew wants to merge 3 commits into
DevExpress:26_1from
flagmanAndrew:26_1_csp-aicolumn

Conversation

@flagmanAndrew
Copy link
Copy Markdown
Contributor

move inline js to a separate file in demos: DataGrid - AI Column, TreeList - AI Column

@flagmanAndrew flagmanAndrew self-assigned this May 19, 2026
@flagmanAndrew flagmanAndrew requested a review from a team as a code owner May 19, 2026 16:56
Copilot AI review requested due to automatic review settings May 19, 2026 16:56
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors the jQuery DataGrid/AIColumns and TreeList/AIColumns demos to move the inline type="module" OpenAI SDK import into standalone openai-init.js files, and updates the CSP demo allowlist accordingly (removing the now-unneeded unsafe-inline exception).

Changes:

  • Removed script-src: 'unsafe-inline' overrides for DataGrid/AIColumns and TreeList/AIColumns in the CSP server allowlist.
  • Added openai-init.js module files that import AzureOpenAI from esm.sh and expose it on window.
  • Updated the two demo index.html files to load the new module file instead of using an inline module script.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
apps/demos/utils/server/csp-server.js Removes AIColumns-specific CSP unsafe-inline allowances now that the OpenAI import is no longer inline.
apps/demos/Demos/TreeList/AIColumns/jQuery/openai-init.js New external ESM initializer that imports AzureOpenAI and assigns it to window.
apps/demos/Demos/TreeList/AIColumns/jQuery/index.html Switches from inline module import to loading openai-init.js as a module script.
apps/demos/Demos/DataGrid/AIColumns/jQuery/openai-init.js New external ESM initializer that imports AzureOpenAI and assigns it to window.
apps/demos/Demos/DataGrid/AIColumns/jQuery/index.html Switches from inline module import to loading openai-init.js as a module script.

Comment thread apps/demos/Demos/DataGrid/AIColumns/jQuery/index.html Outdated
Comment thread apps/demos/Demos/TreeList/AIColumns/jQuery/index.html Outdated
Comment thread apps/demos/Demos/DataGrid/AIColumns/jQuery/openai-init.js Outdated
Comment thread apps/demos/Demos/TreeList/AIColumns/jQuery/openai-init.js Outdated
Copilot AI review requested due to automatic review settings May 20, 2026 11:14
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants