diff --git a/packages/devextreme-themebuilder/package.json b/packages/devextreme-themebuilder/package.json index e7ef81759207..5eb78f0547fa 100644 --- a/packages/devextreme-themebuilder/package.json +++ b/packages/devextreme-themebuilder/package.json @@ -21,7 +21,7 @@ "pack": "cd dist && pnpm pack" }, "peerDependencies": { - "bootstrap": "npm:bootstrap@^5.3.0" + "bootstrap": "npm:bootstrap@^5.3.3" }, "dependencies": { "autoprefixer": "^10.4.7", diff --git a/packages/devextreme-themebuilder/src/modules/bootstrap-extractor.ts b/packages/devextreme-themebuilder/src/modules/bootstrap-extractor.ts index f32023835f82..3e305fbc9340 100644 --- a/packages/devextreme-themebuilder/src/modules/bootstrap-extractor.ts +++ b/packages/devextreme-themebuilder/src/modules/bootstrap-extractor.ts @@ -87,7 +87,7 @@ export default class BootstrapExtractor { } const result = `${functions} -${variables.replace('@import "variables-dark";', '')} +${this.getVariables(variables)} ${variablesDark} ${this.input} ${this.getSetterServiceCode('!default')} @@ -104,6 +104,10 @@ ${this.getCollectorServiceCode()}`; ); } + getVariables(variables: string): string { + return variables.replace(/^@import "variables-dark";.*$/gm, ''); + } + getFilePath(fileName: string): string { return require.resolve(`bootstrap/scss/${fileName}`); } diff --git a/packages/devextreme-themebuilder/tests/modules/bootstrap-extractor.test.ts b/packages/devextreme-themebuilder/tests/modules/bootstrap-extractor.test.ts index 62a4a465a2a4..4bf8804d8a2c 100644 --- a/packages/devextreme-themebuilder/tests/modules/bootstrap-extractor.test.ts +++ b/packages/devextreme-themebuilder/tests/modules/bootstrap-extractor.test.ts @@ -50,7 +50,7 @@ describe('BootstrapExtractor', () => { expect(await extractor.sassProcessor()) .toBe(`${functions.toString()} -${variables.toString()} +${extractor.getVariables(variables.toString())} ${variablesDark.toString()} ${testSassString} ${setterServiceCode} diff --git a/packages/devextreme/package.json b/packages/devextreme/package.json index 35107e1be9b0..5a0c0b72716d 100644 --- a/packages/devextreme/package.json +++ b/packages/devextreme/package.json @@ -65,7 +65,6 @@ "axe-core": "4.10.0", "babel-plugin-add-module-exports": "1.0.4", "babel-plugin-inferno": "6.7.1", - "bootstrap": "5.3.2", "cldr-core": "41.0.0", "cldr-numbers-full": "41.0.0", "cldrjs": "0.5.5", diff --git a/packages/devextreme/testing/tests/Bootstrap Integration/widget_bundled.tests.js b/packages/devextreme/testing/tests/Bootstrap Integration/widget_bundled.tests.js index 5618fa01a965..559c99e400a3 100644 --- a/packages/devextreme/testing/tests/Bootstrap Integration/widget_bundled.tests.js +++ b/packages/devextreme/testing/tests/Bootstrap Integration/widget_bundled.tests.js @@ -17,7 +17,7 @@ QUnit.testStart(function() { executeAsyncMock.setup(); -const BOOTSTRAP_CSS_URL = window.ROOT_URL + 'packages/devextreme/node_modules/bootstrap/dist/css/bootstrap.css'; +const BOOTSTRAP_CSS_URL = window.ROOT_URL + 'packages/devextreme-themebuilder/node_modules/bootstrap/dist/css/bootstrap.css'; const applyBootstrap = (function() { let styles = null; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 0f075f0f0bdb..feeadadd4af1 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -890,9 +890,6 @@ importers: babel-plugin-inferno: specifier: 6.7.1 version: 6.7.1(@babel/core@7.23.9) - bootstrap: - specifier: 5.3.2 - version: 5.3.2(@popperjs/core@2.11.8) cldr-core: specifier: 41.0.0 version: 41.0.0 @@ -1508,8 +1505,8 @@ importers: specifier: ^10.4.7 version: 10.4.17(postcss@8.4.38) bootstrap: - specifier: npm:bootstrap@^5.3.0 - version: 5.3.2(@popperjs/core@2.11.8) + specifier: npm:bootstrap@^5.3.3 + version: 5.3.3(@popperjs/core@2.11.8) clean-css: specifier: ^5.3.0 version: 5.3.3 @@ -6714,8 +6711,8 @@ packages: boolbase@1.0.0: resolution: {integrity: sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==} - bootstrap@5.3.2: - resolution: {integrity: sha512-D32nmNWiQHo94BKHLmOrdjlL05q1c8oxbtBphQFb9Z5to6eGRDCm0QgeaZ4zFBHzfg2++rqa2JkqCcxDy0sH0g==} + bootstrap@5.3.3: + resolution: {integrity: sha512-8HLCdWgyoMguSO9o+aH+iuZ+aht+mzW0u3HIMzVu7Srrpv7EBBxTnrFlSCskwdY1+EOFQSm7uMJhNQHkdPcmjg==} peerDependencies: '@popperjs/core': ^2.11.8 @@ -24516,7 +24513,7 @@ snapshots: boolbase@1.0.0: {} - bootstrap@5.3.2(@popperjs/core@2.11.8): + bootstrap@5.3.3(@popperjs/core@2.11.8): dependencies: '@popperjs/core': 2.11.8 @@ -29749,7 +29746,7 @@ snapshots: jest-environment-jsdom: 26.6.2 jest-environment-node: 26.6.2 jest-get-type: 26.3.0 - jest-jasmine2: 26.6.3(ts-node@10.9.2(@swc/core@1.4.17)(@types/node@20.12.8)(typescript@5.4.5)) + jest-jasmine2: 26.6.3(ts-node@10.9.2(@swc/core@1.4.17(@swc/helpers@0.5.11))(@types/node@20.12.8)(typescript@5.4.5)) jest-regex-util: 26.0.0 jest-resolve: 26.6.2 jest-util: 26.6.2 @@ -30047,7 +30044,7 @@ snapshots: optionalDependencies: fsevents: 2.3.3 - jest-jasmine2@26.6.3(ts-node@10.9.2(@swc/core@1.4.17)(@types/node@20.12.8)(typescript@5.4.5)): + jest-jasmine2@26.6.3(ts-node@10.9.2(@swc/core@1.4.17(@swc/helpers@0.5.11))(@types/node@20.12.8)(typescript@5.4.5)): dependencies: '@babel/traverse': 7.24.5 '@jest/environment': 26.6.2 diff --git a/tools/scripts/build-all.ts b/tools/scripts/build-all.ts index 83f4e9eef197..2a1f7770beed 100644 --- a/tools/scripts/build-all.ts +++ b/tools/scripts/build-all.ts @@ -72,7 +72,7 @@ sh.pushd(path.join(ROOT_DIR, 'packages/devextreme/artifacts')); sh.popd(); // TODO: maybe we should add bootstrap to vendors -const BOOTSTRAP_DIR = path.join(ROOT_DIR, 'packages', 'devextreme', 'node_modules', 'bootstrap', 'dist'); +const BOOTSTRAP_DIR = path.join(ROOT_DIR, 'packages', 'devextreme-themebuilder', 'node_modules', 'bootstrap', 'dist'); sh.cp([path.join(BOOTSTRAP_DIR, 'js', 'bootstrap.js'), path.join(BOOTSTRAP_DIR, 'js', 'bootstrap.min.js')], JS_ARTIFACTS); sh.cp([path.join(BOOTSTRAP_DIR, 'css', 'bootstrap.css'), path.join(BOOTSTRAP_DIR, 'css', 'bootstrap.min.css')], CSS_ARTIFACTS);