From 1ede20b06a9d6c6bac822c42237733a91c34a734 Mon Sep 17 00:00:00 2001 From: Aliullov Vlad <91639107+GoodDayForSurf@users.noreply.github.com> Date: Fri, 13 Dec 2024 14:12:24 +0400 Subject: [PATCH] Set unified and openai deps only for demos that use them. In package.json for Codesandbox export (#28531) --- apps/demos/configs/Angular/config.js | 8 ++++++-- apps/demos/configs/React/config.js | 8 ++++++-- apps/demos/configs/ReactJs/config.js | 11 +++++++++-- apps/demos/configs/Vue/config.js | 8 ++++++-- apps/demos/menuMeta.json | 4 ++-- 5 files changed, 29 insertions(+), 10 deletions(-) diff --git a/apps/demos/configs/Angular/config.js b/apps/demos/configs/Angular/config.js index faa13254fd4..87b81aacbde 100644 --- a/apps/demos/configs/Angular/config.js +++ b/apps/demos/configs/Angular/config.js @@ -156,6 +156,7 @@ window.config = { map: { 'ts': 'npm:plugin-typescript/lib/plugin.js', 'typescript': 'npm:typescript/lib/typescript.js', + 'jszip': 'npm:jszip/dist/jszip.min.js', /* @angular */ '@angular/compiler': 'bundles:@angular/compiler.umd.js', @@ -186,7 +187,7 @@ window.config = { return acc; }, {}), - /* Bundles for Unified */ + /** unified */ 'unified': 'externals:unified/unified.bundle.js', 'remark-parse': 'externals:unified/remark-parse.bundle.js', 'remark-rehype': 'externals:unified/remark-rehype.bundle.js', @@ -194,9 +195,12 @@ window.config = { 'rehype-parse': 'externals:unified/rehype-parse.bundle.js', 'rehype-remark': 'externals:unified/rehype-remark.bundle.js', 'rehype-stringify': 'externals:unified/rehype-stringify.bundle.js', + /**/ + /** openai */ 'openai': 'externals:openai.bundle.js', - 'jszip': 'npm:jszip/dist/jszip.min.js', + /**/ + 'tslib': 'npm:tslib/tslib.js', 'rxjs': 'npm:rxjs/dist/bundles/rxjs.umd.js', 'rxjs/operators': 'npm:rxjs/dist/cjs/operators/index.js', diff --git a/apps/demos/configs/React/config.js b/apps/demos/configs/React/config.js index a18588a395d..aa52243fd6f 100644 --- a/apps/demos/configs/React/config.js +++ b/apps/demos/configs/React/config.js @@ -51,6 +51,7 @@ window.config = { map: { 'ts': 'npm:plugin-typescript/lib/plugin.js', 'typescript': 'npm:typescript/lib/typescript.js', + 'jszip': 'npm:jszip/dist/jszip.min.js', 'react': 'npm:react/umd/react.development.js', 'react-dom': 'npm:react-dom/umd/react-dom.development.js', 'prop-types': 'npm:prop-types/prop-types.js', @@ -121,7 +122,7 @@ window.config = { 'devextreme': 'npm:devextreme/cjs', 'devextreme-react': 'npm:devextreme-react/cjs', - /* Bundles for Unified */ + /** unified */ 'unified': 'externals:unified/unified.bundle.js', 'remark-parse': 'externals:unified/remark-parse.bundle.js', 'remark-rehype': 'externals:unified/remark-rehype.bundle.js', @@ -129,9 +130,12 @@ window.config = { 'rehype-parse': 'externals:unified/rehype-parse.bundle.js', 'rehype-remark': 'externals:unified/rehype-remark.bundle.js', 'rehype-stringify': 'externals:unified/rehype-stringify.bundle.js', + /**/ + /** openai */ 'openai': 'externals:openai.bundle.js', - 'jszip': 'npm:jszip/dist/jszip.min.js', + /**/ + 'devextreme-quill': 'npm:devextreme-quill/dist/dx-quill.min.js', 'devexpress-diagram': 'npm:devexpress-diagram/dist/dx-diagram.js', 'devexpress-gantt': 'npm:devexpress-gantt/dist/dx-gantt.js', diff --git a/apps/demos/configs/ReactJs/config.js b/apps/demos/configs/ReactJs/config.js index cb88f581226..4d7c4a5229e 100644 --- a/apps/demos/configs/ReactJs/config.js +++ b/apps/demos/configs/ReactJs/config.js @@ -122,7 +122,11 @@ window.config = { 'devextreme': 'npm:devextreme/cjs', 'devextreme-react': 'npm:devextreme-react/cjs', - /* Unified bundles */ + /** jszip */ + 'jszip': 'npm:jszip/dist/jszip.min.js', + /**/ + + /** unified */ 'unified': 'externals:unified/unified.bundle.js', 'remark-parse': 'externals:unified/remark-parse.bundle.js', 'remark-rehype': 'externals:unified/remark-rehype.bundle.js', @@ -130,9 +134,12 @@ window.config = { 'rehype-parse': 'externals:unified/rehype-parse.bundle.js', 'rehype-remark': 'externals:unified/rehype-remark.bundle.js', 'rehype-stringify': 'externals:unified/rehype-stringify.bundle.js', + /**/ + /** openai */ 'openai': 'externals:openai.bundle.js', - 'jszip': 'npm:jszip/dist/jszip.min.js', + /**/ + 'devextreme-quill': 'npm:devextreme-quill/dist/dx-quill.min.js', 'devexpress-diagram': 'npm:devexpress-diagram/dist/dx-diagram.js', 'devexpress-gantt': 'npm:devexpress-gantt/dist/dx-gantt.js', diff --git a/apps/demos/configs/Vue/config.js b/apps/demos/configs/Vue/config.js index 54f23506cdd..30791560383 100644 --- a/apps/demos/configs/Vue/config.js +++ b/apps/demos/configs/Vue/config.js @@ -50,6 +50,7 @@ window.config = { '@vue/shared': 'npm:@vue/shared/dist/shared.cjs.prod.js', 'vue-loader': 'npm:dx-systemjs-vue-browser/index.js', 'demo-ts-loader': 'project:utils/demo-ts-loader.js', + 'jszip': 'npm:jszip/dist/jszip.min.js', 'svg-loader': 'project:utils/svg-loader.js', /** signalr */ @@ -120,7 +121,7 @@ window.config = { 'devextreme': 'npm:devextreme/cjs', 'devextreme-vue': 'npm:devextreme-vue/cjs', - /* Bundles for Unified */ + /** unified */ 'unified': 'externals:unified/unified.bundle.js', 'remark-parse': 'externals:unified/remark-parse.bundle.js', 'remark-rehype': 'externals:unified/remark-rehype.bundle.js', @@ -128,9 +129,12 @@ window.config = { 'rehype-parse': 'externals:unified/rehype-parse.bundle.js', 'rehype-remark': 'externals:unified/rehype-remark.bundle.js', 'rehype-stringify': 'externals:unified/rehype-stringify.bundle.js', + /**/ + /** openai */ 'openai': 'externals:openai.bundle.js', - 'jszip': 'npm:jszip/dist/jszip.min.js', + /**/ + 'devextreme-quill': 'npm:devextreme-quill/dist/dx-quill.min.js', 'devexpress-diagram': 'npm:devexpress-diagram/dist/dx-diagram.js', 'devexpress-gantt': 'npm:devexpress-gantt/dist/dx-gantt.js', diff --git a/apps/demos/menuMeta.json b/apps/demos/menuMeta.json index 2893f7cf8b5..1e595e1e81d 100644 --- a/apps/demos/menuMeta.json +++ b/apps/demos/menuMeta.json @@ -2104,7 +2104,7 @@ "Title": "AI and Chatbot Integration", "Name": "AIAndChatbotIntegration", "Widget": "Chat", - "Modules": "html-react-parser", + "Modules": "html-react-parser,openai,unified", "DemoType": "Web" } ] @@ -5851,4 +5851,4 @@ } ] } -] \ No newline at end of file +]