From b1a08b4fa566ef4c5cf853d01fbb4bae7b984174 Mon Sep 17 00:00:00 2001 From: kpawelczak <42094017+kpawelczak@users.noreply.github.com> Date: Thu, 16 Jan 2025 16:47:14 +0100 Subject: [PATCH] Remove bootstrap imports from feature libs (#19853) --- feature-libs/cart/_index.scss | 4 -- .../add-cart/__snapshots__/index_spec.ts.snap | 15 ++++++++ feature-libs/checkout/_index.scss | 4 -- .../__snapshots__/index_spec.ts.snap | 9 +++++ feature-libs/organization/_index.scss | 5 --- .../__snapshots__/index_spec.ts.snap | 15 ++++++++ feature-libs/pickup-in-store/_index.scss | 4 -- .../__snapshots__/index_spec.ts.snap | 3 ++ .../product-multi-dimensional/_index.scss | 4 -- .../__snapshots__/index_spec.ts.snap | 3 ++ feature-libs/product/_index.scss | 4 -- .../__snapshots__/index_spec.ts.snap | 12 ++++++ feature-libs/qualtrics/_index.scss | 4 -- .../__snapshots__/index_spec.ts.snap | 3 ++ feature-libs/quote/_index.scss | 4 -- .../__snapshots__/index_spec.ts.snap | 3 ++ .../__snapshots__/index_spec.ts.snap | 3 ++ feature-libs/storefinder/styles/_index.scss | 4 -- .../epd-visualization/_index.scss | 4 -- .../__snapshots__/index_spec.ts.snap | 3 ++ integration-libs/opf/_index.scss | 4 +- .../add-opf/__snapshots__/index_spec.ts.snap | 3 ++ .../lib-configs/cart-schematics-config.ts | 28 ++++++++++++++ .../lib-configs/checkout-schematics-config.ts | 18 +++++++++ .../integration-libs/epd-schematics-config.ts | 8 ++++ .../integration-libs/opf-schematics-config.ts | 37 ++++++++++++++++++- .../organization-schematics-config.ts | 28 ++++++++++++++ .../pickup-in-store-schematics-config.ts | 8 ++++ ...uct-multi-dimensional-schematics-config.ts | 8 ++++ .../lib-configs/product-schematics-config.ts | 23 ++++++++++++ .../qualtrics-schematics-config.ts | 8 ++++ .../lib-configs/quote-schematics-config.ts | 8 ++++ .../storefinder-schematics-config.ts | 8 ++++ .../schematics/src/shared/libs-constants.ts | 7 ++++ .../schematics/src/shared/utils/lib-utils.ts | 27 +++++++++++--- .../storefrontapp/src/styles/lib-cart.scss | 3 ++ .../src/styles/lib-checkout.scss | 4 ++ .../src/styles/lib-epd-visualization.scss | 4 ++ .../storefrontapp/src/styles/lib-opf.scss | 4 ++ .../src/styles/lib-organization.scss | 4 ++ .../src/styles/lib-pickup-in-store.scss | 4 ++ .../styles/lib-product-multi-dimensional.scss | 4 ++ .../storefrontapp/src/styles/lib-product.scss | 4 ++ .../src/styles/lib-qualtrics.scss | 4 ++ .../storefrontapp/src/styles/lib-quote.scss | 4 ++ .../src/styles/lib-storefinder.scss | 4 ++ 46 files changed, 325 insertions(+), 51 deletions(-) diff --git a/feature-libs/cart/_index.scss b/feature-libs/cart/_index.scss index f8f6762cb7d..69cb5c669ba 100644 --- a/feature-libs/cart/_index.scss +++ b/feature-libs/cart/_index.scss @@ -2,10 +2,6 @@ @import '@spartacus/styles/scss/cxbase/blocks/modal'; @import '@spartacus/styles/scss/misc/table'; -@import '@spartacus/styles/vendor/bootstrap/scss/functions'; -@import '@spartacus/styles/vendor/bootstrap/scss/variables'; -@import '@spartacus/styles/vendor/bootstrap/scss/_mixins'; - @mixin visible-focus { outline-style: solid; outline-color: var(--cx-color-visual-focus); diff --git a/feature-libs/cart/schematics/add-cart/__snapshots__/index_spec.ts.snap b/feature-libs/cart/schematics/add-cart/__snapshots__/index_spec.ts.snap index c53eedef64e..63444466b90 100644 --- a/feature-libs/cart/schematics/add-cart/__snapshots__/index_spec.ts.snap +++ b/feature-libs/cart/schematics/add-cart/__snapshots__/index_spec.ts.snap @@ -78,6 +78,9 @@ export class CartBaseFeatureModule { } exports[`Spartacus Cart schematics: ng-add Cart Base feature general setup styling should create a proper scss file 1`] = ` "@import "../../styles-config"; @import "@spartacus/cart"; +@import "@spartacus/styles/vendor/bootstrap/scss/functions"; +@import "@spartacus/styles/vendor/bootstrap/scss/variables"; +@import "@spartacus/styles/vendor/bootstrap/scss/_mixins"; " `; @@ -263,6 +266,9 @@ export class CartImportExportFeatureModule { } exports[`Spartacus Cart schematics: ng-add Cart Import Export feature general setup styling should create a proper scss file 1`] = ` "@import "../../styles-config"; @import "@spartacus/cart"; +@import "@spartacus/styles/vendor/bootstrap/scss/functions"; +@import "@spartacus/styles/vendor/bootstrap/scss/variables"; +@import "@spartacus/styles/vendor/bootstrap/scss/_mixins"; " `; @@ -448,6 +454,9 @@ export class CartQuickOrderFeatureModule { } exports[`Spartacus Cart schematics: ng-add Quick Order feature general setup styling should create a proper scss file 1`] = ` "@import "../../styles-config"; @import "@spartacus/cart"; +@import "@spartacus/styles/vendor/bootstrap/scss/functions"; +@import "@spartacus/styles/vendor/bootstrap/scss/variables"; +@import "@spartacus/styles/vendor/bootstrap/scss/_mixins"; " `; @@ -633,6 +642,9 @@ export class CartSavedCartFeatureModule { } exports[`Spartacus Cart schematics: ng-add Saved Cart feature general setup styling should create a proper scss file 1`] = ` "@import "../../styles-config"; @import "@spartacus/cart"; +@import "@spartacus/styles/vendor/bootstrap/scss/functions"; +@import "@spartacus/styles/vendor/bootstrap/scss/variables"; +@import "@spartacus/styles/vendor/bootstrap/scss/_mixins"; " `; @@ -828,6 +840,9 @@ export class WishListFeatureModule { } exports[`Spartacus Cart schematics: ng-add Wish List feature general setup styling should create a proper scss file 1`] = ` "@import "../../styles-config"; @import "@spartacus/cart"; +@import "@spartacus/styles/vendor/bootstrap/scss/functions"; +@import "@spartacus/styles/vendor/bootstrap/scss/variables"; +@import "@spartacus/styles/vendor/bootstrap/scss/_mixins"; " `; diff --git a/feature-libs/checkout/_index.scss b/feature-libs/checkout/_index.scss index 3c08646dd84..9af01316a67 100644 --- a/feature-libs/checkout/_index.scss +++ b/feature-libs/checkout/_index.scss @@ -1,9 +1,5 @@ @import '@spartacus/styles/scss/core'; -@import '@spartacus/styles/vendor/bootstrap/scss/functions'; -@import '@spartacus/styles/vendor/bootstrap/scss/variables'; -@import '@spartacus/styles/vendor/bootstrap/scss/mixins'; - @import './base/index'; @import './b2b/index'; @import './scheduled-replenishment/index'; diff --git a/feature-libs/checkout/schematics/add-checkout/__snapshots__/index_spec.ts.snap b/feature-libs/checkout/schematics/add-checkout/__snapshots__/index_spec.ts.snap index a40b5560557..9cfc788e298 100644 --- a/feature-libs/checkout/schematics/add-checkout/__snapshots__/index_spec.ts.snap +++ b/feature-libs/checkout/schematics/add-checkout/__snapshots__/index_spec.ts.snap @@ -130,6 +130,9 @@ export class CheckoutWrapperModule { } exports[`Spartacus Checkout schematics: ng-add Checkout feature b2b general setup styling should create a proper scss file 1`] = ` "@import "../../styles-config"; @import "@spartacus/checkout"; +@import "@spartacus/styles/vendor/bootstrap/scss/functions"; +@import "@spartacus/styles/vendor/bootstrap/scss/variables"; +@import "@spartacus/styles/vendor/bootstrap/scss/_mixins"; " `; @@ -315,6 +318,9 @@ export class CheckoutFeatureModule { } exports[`Spartacus Checkout schematics: ng-add Checkout feature base general setup styling should create a proper scss file 1`] = ` "@import "../../styles-config"; @import "@spartacus/checkout"; +@import "@spartacus/styles/vendor/bootstrap/scss/functions"; +@import "@spartacus/styles/vendor/bootstrap/scss/variables"; +@import "@spartacus/styles/vendor/bootstrap/scss/_mixins"; " `; @@ -594,6 +600,9 @@ export class CheckoutWrapperModule { } exports[`Spartacus Checkout schematics: ng-add Checkout feature scheduled replenishment general setup styling should create a proper scss file 1`] = ` "@import "../../styles-config"; @import "@spartacus/checkout"; +@import "@spartacus/styles/vendor/bootstrap/scss/functions"; +@import "@spartacus/styles/vendor/bootstrap/scss/variables"; +@import "@spartacus/styles/vendor/bootstrap/scss/_mixins"; " `; diff --git a/feature-libs/organization/_index.scss b/feature-libs/organization/_index.scss index 26135d79a78..6b2812e89c7 100644 --- a/feature-libs/organization/_index.scss +++ b/feature-libs/organization/_index.scss @@ -1,10 +1,5 @@ @import '@spartacus/styles/scss/core'; -// we require a few bootstrap files for the CSS in this code -@import '@spartacus/styles/vendor/bootstrap/scss/functions'; -@import '@spartacus/styles/vendor/bootstrap/scss/variables'; -@import '@spartacus/styles/vendor/bootstrap/scss/_mixins'; - @mixin visible-focus { outline-style: solid; outline-color: var(--cx-color-visual-focus); diff --git a/feature-libs/organization/schematics/add-organization/__snapshots__/index_spec.ts.snap b/feature-libs/organization/schematics/add-organization/__snapshots__/index_spec.ts.snap index 6cdaf2a2d88..21ce987cf55 100644 --- a/feature-libs/organization/schematics/add-organization/__snapshots__/index_spec.ts.snap +++ b/feature-libs/organization/schematics/add-organization/__snapshots__/index_spec.ts.snap @@ -93,6 +93,9 @@ export class OrganizationAccountSummaryFeatureModule { } exports[`Spartacus Organization schematics: ng-add Account summary feature general setup styling should create a proper scss file 1`] = ` "@import "../../styles-config"; @import "@spartacus/organization"; +@import "@spartacus/styles/vendor/bootstrap/scss/functions"; +@import "@spartacus/styles/vendor/bootstrap/scss/variables"; +@import "@spartacus/styles/vendor/bootstrap/scss/_mixins"; " `; @@ -313,6 +316,9 @@ export class OrganizationAdministrationFeatureModule { } exports[`Spartacus Organization schematics: ng-add Administration feature general setup styling should create a proper scss file 1`] = ` "@import "../../styles-config"; @import "@spartacus/organization"; +@import "@spartacus/styles/vendor/bootstrap/scss/functions"; +@import "@spartacus/styles/vendor/bootstrap/scss/variables"; +@import "@spartacus/styles/vendor/bootstrap/scss/_mixins"; " `; @@ -533,6 +539,9 @@ export class OrganizationOrderApprovalFeatureModule { } exports[`Spartacus Organization schematics: ng-add Order approval feature general setup styling should create a proper scss file 1`] = ` "@import "../../styles-config"; @import "@spartacus/organization"; +@import "@spartacus/styles/vendor/bootstrap/scss/functions"; +@import "@spartacus/styles/vendor/bootstrap/scss/variables"; +@import "@spartacus/styles/vendor/bootstrap/scss/_mixins"; " `; @@ -753,6 +762,9 @@ export class OrganizationUnitOrderFeatureModule { } exports[`Spartacus Organization schematics: ng-add Unit order feature general setup styling should create a proper scss file 1`] = ` "@import "../../styles-config"; @import "@spartacus/organization"; +@import "@spartacus/styles/vendor/bootstrap/scss/functions"; +@import "@spartacus/styles/vendor/bootstrap/scss/variables"; +@import "@spartacus/styles/vendor/bootstrap/scss/_mixins"; " `; @@ -973,6 +985,9 @@ export class OrganizationUserRegistrationFeatureModule { } exports[`Spartacus Organization schematics: ng-add User registration feature general setup styling should create a proper scss file 1`] = ` "@import "../../styles-config"; @import "@spartacus/organization"; +@import "@spartacus/styles/vendor/bootstrap/scss/functions"; +@import "@spartacus/styles/vendor/bootstrap/scss/variables"; +@import "@spartacus/styles/vendor/bootstrap/scss/_mixins"; " `; diff --git a/feature-libs/pickup-in-store/_index.scss b/feature-libs/pickup-in-store/_index.scss index 35d81670c0e..c2bcd466a34 100644 --- a/feature-libs/pickup-in-store/_index.scss +++ b/feature-libs/pickup-in-store/_index.scss @@ -4,8 +4,4 @@ $cx-color-link-primary: #1672b7; @import '@spartacus/styles/scss/cxbase/blocks/modal'; @import '@spartacus/styles/scss/misc/table'; -@import '@spartacus/styles/vendor/bootstrap/scss/functions'; -@import '@spartacus/styles/vendor/bootstrap/scss/variables'; -@import '@spartacus/styles/vendor/bootstrap/scss/_mixins'; - @import './styles/index'; diff --git a/feature-libs/pickup-in-store/schematics/add-pickup-in-store/__snapshots__/index_spec.ts.snap b/feature-libs/pickup-in-store/schematics/add-pickup-in-store/__snapshots__/index_spec.ts.snap index a39a2e39007..cfc003a040d 100644 --- a/feature-libs/pickup-in-store/schematics/add-pickup-in-store/__snapshots__/index_spec.ts.snap +++ b/feature-libs/pickup-in-store/schematics/add-pickup-in-store/__snapshots__/index_spec.ts.snap @@ -58,6 +58,9 @@ export class PickupInStoreFeatureModule { } exports[`Spartacus Pickup in Store schematics: ng-add Pick Up In Store feature general setup styling should create a proper scss file 1`] = ` "@import "../../styles-config"; @import "@spartacus/pickup-in-store"; +@import "@spartacus/styles/vendor/bootstrap/scss/functions"; +@import "@spartacus/styles/vendor/bootstrap/scss/variables"; +@import "@spartacus/styles/vendor/bootstrap/scss/_mixins"; " `; diff --git a/feature-libs/product-multi-dimensional/_index.scss b/feature-libs/product-multi-dimensional/_index.scss index f1d41316390..3c97327c933 100644 --- a/feature-libs/product-multi-dimensional/_index.scss +++ b/feature-libs/product-multi-dimensional/_index.scss @@ -1,7 +1,3 @@ @import '@spartacus/styles/scss/core'; -// we require a few bootstrap files for the CSS in this code -@import '@spartacus/styles/vendor/bootstrap/scss/functions'; -@import '@spartacus/styles/vendor/bootstrap/scss/variables'; -@import '@spartacus/styles/vendor/bootstrap/scss/_mixins'; @import './selector/index'; diff --git a/feature-libs/product-multi-dimensional/schematics/add-product-multi-dimensional/__snapshots__/index_spec.ts.snap b/feature-libs/product-multi-dimensional/schematics/add-product-multi-dimensional/__snapshots__/index_spec.ts.snap index 5d844d71d45..d7158f71fff 100644 --- a/feature-libs/product-multi-dimensional/schematics/add-product-multi-dimensional/__snapshots__/index_spec.ts.snap +++ b/feature-libs/product-multi-dimensional/schematics/add-product-multi-dimensional/__snapshots__/index_spec.ts.snap @@ -194,6 +194,9 @@ export class ProductMultiDimensionalSelectorFeatureModule { } exports[`Spartacus Product Multi-Dimensional schematics: ng-add selector feature general setup styling should create a proper scss file 1`] = ` "@import "../../styles-config"; @import "@spartacus/product-multi-dimensional"; +@import "@spartacus/styles/vendor/bootstrap/scss/functions"; +@import "@spartacus/styles/vendor/bootstrap/scss/variables"; +@import "@spartacus/styles/vendor/bootstrap/scss/_mixins"; " `; diff --git a/feature-libs/product/_index.scss b/feature-libs/product/_index.scss index e888378601c..07dcfcf1ed9 100644 --- a/feature-libs/product/_index.scss +++ b/feature-libs/product/_index.scss @@ -1,8 +1,4 @@ @import '@spartacus/styles/scss/core'; -// we require a few bootstrap files for the CSS in this code -@import '@spartacus/styles/vendor/bootstrap/scss/functions'; -@import '@spartacus/styles/vendor/bootstrap/scss/variables'; -@import '@spartacus/styles/vendor/bootstrap/scss/_mixins'; @mixin visible-focus { outline-style: solid; diff --git a/feature-libs/product/schematics/add-product/__snapshots__/index_spec.ts.snap b/feature-libs/product/schematics/add-product/__snapshots__/index_spec.ts.snap index 223da6bc64f..d8ab71f0138 100644 --- a/feature-libs/product/schematics/add-product/__snapshots__/index_spec.ts.snap +++ b/feature-libs/product/schematics/add-product/__snapshots__/index_spec.ts.snap @@ -93,6 +93,9 @@ export class ProductBulkPricingFeatureModule { } exports[`Spartacus Product schematics: ng-add BulkPricing feature general setup styling should create a proper scss file 1`] = ` "@import "../../styles-config"; @import "@spartacus/product"; +@import "@spartacus/styles/vendor/bootstrap/scss/functions"; +@import "@spartacus/styles/vendor/bootstrap/scss/variables"; +@import "@spartacus/styles/vendor/bootstrap/scss/_mixins"; " `; @@ -313,6 +316,9 @@ export class ProductFutureStockFeatureModule { } exports[`Spartacus Product schematics: ng-add FutureStock feature general setup styling should create a proper scss file 1`] = ` "@import "../../styles-config"; @import "@spartacus/product"; +@import "@spartacus/styles/vendor/bootstrap/scss/functions"; +@import "@spartacus/styles/vendor/bootstrap/scss/variables"; +@import "@spartacus/styles/vendor/bootstrap/scss/_mixins"; " `; @@ -498,6 +504,9 @@ export class ProductImageZoomFeatureModule { } exports[`Spartacus Product schematics: ng-add ImageZoom feature general setup styling should create a proper scss file 1`] = ` "@import "../../styles-config"; @import "@spartacus/product"; +@import "@spartacus/styles/vendor/bootstrap/scss/functions"; +@import "@spartacus/styles/vendor/bootstrap/scss/variables"; +@import "@spartacus/styles/vendor/bootstrap/scss/_mixins"; " `; @@ -683,6 +692,9 @@ export class ProductVariantsFeatureModule { } exports[`Spartacus Product schematics: ng-add Variants feature general setup styling should create a proper scss file 1`] = ` "@import "../../styles-config"; @import "@spartacus/product"; +@import "@spartacus/styles/vendor/bootstrap/scss/functions"; +@import "@spartacus/styles/vendor/bootstrap/scss/variables"; +@import "@spartacus/styles/vendor/bootstrap/scss/_mixins"; " `; diff --git a/feature-libs/qualtrics/_index.scss b/feature-libs/qualtrics/_index.scss index 40133e09beb..569b2a49df2 100644 --- a/feature-libs/qualtrics/_index.scss +++ b/feature-libs/qualtrics/_index.scss @@ -1,7 +1,3 @@ @import '@spartacus/styles/scss/core'; -// we require a few bootstrap files for the CSS in this code -@import '@spartacus/styles/vendor/bootstrap/scss/functions'; -@import '@spartacus/styles/vendor/bootstrap/scss/variables'; -@import '@spartacus/styles/vendor/bootstrap/scss/_mixins'; @import './styles/index'; diff --git a/feature-libs/qualtrics/schematics/add-qualtrics/__snapshots__/index_spec.ts.snap b/feature-libs/qualtrics/schematics/add-qualtrics/__snapshots__/index_spec.ts.snap index 0dea4266359..7236efa46c9 100644 --- a/feature-libs/qualtrics/schematics/add-qualtrics/__snapshots__/index_spec.ts.snap +++ b/feature-libs/qualtrics/schematics/add-qualtrics/__snapshots__/index_spec.ts.snap @@ -42,6 +42,9 @@ export class QualtricsFeatureModule { } exports[`Spartacus Qualtrics schematics: ng-add Qualtrics feature general setup styling should create a proper scss file 1`] = ` "@import "../../styles-config"; @import "@spartacus/qualtrics"; +@import "@spartacus/styles/vendor/bootstrap/scss/functions"; +@import "@spartacus/styles/vendor/bootstrap/scss/variables"; +@import "@spartacus/styles/vendor/bootstrap/scss/_mixins"; " `; diff --git a/feature-libs/quote/_index.scss b/feature-libs/quote/_index.scss index 906297ef83c..7cbb049a12d 100644 --- a/feature-libs/quote/_index.scss +++ b/feature-libs/quote/_index.scss @@ -1,10 +1,6 @@ @import '@spartacus/styles/scss/core'; @import '@spartacus/styles/scss/app'; -@import '@spartacus/styles/vendor/bootstrap/scss/functions'; -@import '@spartacus/styles/vendor/bootstrap/scss/variables'; -@import '@spartacus/styles/vendor/bootstrap/scss/_mixins'; - @mixin visible-focus { outline-style: solid; outline-color: var(--cx-color-visual-focus); diff --git a/feature-libs/quote/schematics/add-quote/__snapshots__/index_spec.ts.snap b/feature-libs/quote/schematics/add-quote/__snapshots__/index_spec.ts.snap index 87aff6bfd93..04fac84dca1 100644 --- a/feature-libs/quote/schematics/add-quote/__snapshots__/index_spec.ts.snap +++ b/feature-libs/quote/schematics/add-quote/__snapshots__/index_spec.ts.snap @@ -113,6 +113,9 @@ export class QuoteFeatureModule { } exports[`Spartacus Quote schematics: ng-add Quote feature general setup styling should create a proper scss file 1`] = ` "@import "../../styles-config"; @import "@spartacus/quote"; +@import "@spartacus/styles/vendor/bootstrap/scss/functions"; +@import "@spartacus/styles/vendor/bootstrap/scss/variables"; +@import "@spartacus/styles/vendor/bootstrap/scss/_mixins"; " `; diff --git a/feature-libs/storefinder/schematics/add-storefinder/__snapshots__/index_spec.ts.snap b/feature-libs/storefinder/schematics/add-storefinder/__snapshots__/index_spec.ts.snap index 89cc4ea8e65..4f8d85652d4 100644 --- a/feature-libs/storefinder/schematics/add-storefinder/__snapshots__/index_spec.ts.snap +++ b/feature-libs/storefinder/schematics/add-storefinder/__snapshots__/index_spec.ts.snap @@ -58,6 +58,9 @@ export class StoreFinderFeatureModule { } exports[`Spartacus Storefinder schematics: ng-add Storefinder feature general setup styling should create a proper scss file 1`] = ` "@import "../../styles-config"; @import "@spartacus/storefinder"; +@import "@spartacus/styles/vendor/bootstrap/scss/functions"; +@import "@spartacus/styles/vendor/bootstrap/scss/variables"; +@import "@spartacus/styles/vendor/bootstrap/scss/_mixins"; " `; diff --git a/feature-libs/storefinder/styles/_index.scss b/feature-libs/storefinder/styles/_index.scss index 2b7fbba1fac..0001930cc53 100644 --- a/feature-libs/storefinder/styles/_index.scss +++ b/feature-libs/storefinder/styles/_index.scss @@ -1,6 +1,2 @@ -@import '@spartacus/styles/vendor/bootstrap/scss/functions'; -@import '@spartacus/styles/vendor/bootstrap/scss/variables'; -@import '@spartacus/styles/vendor/bootstrap/scss/mixins'; - @import './components/index'; @import './layout/index'; diff --git a/integration-libs/epd-visualization/_index.scss b/integration-libs/epd-visualization/_index.scss index b766aaf0b6f..647be1748b6 100644 --- a/integration-libs/epd-visualization/_index.scss +++ b/integration-libs/epd-visualization/_index.scss @@ -1,9 +1,5 @@ @import '@spartacus/styles/scss/core'; -@import '@spartacus/styles/vendor/bootstrap/scss/functions'; -@import '@spartacus/styles/vendor/bootstrap/scss/variables'; -@import '@spartacus/styles/vendor/bootstrap/scss/_mixins'; - @import './styles/index'; $epd-visualization-components-allowlist: cx-epd-visualization-viewer, diff --git a/integration-libs/epd-visualization/schematics/add-epd-visualization/__snapshots__/index_spec.ts.snap b/integration-libs/epd-visualization/schematics/add-epd-visualization/__snapshots__/index_spec.ts.snap index 33c5e9481d2..2e4049627e0 100644 --- a/integration-libs/epd-visualization/schematics/add-epd-visualization/__snapshots__/index_spec.ts.snap +++ b/integration-libs/epd-visualization/schematics/add-epd-visualization/__snapshots__/index_spec.ts.snap @@ -117,6 +117,9 @@ export class EpdVisualizationFeatureModule { } exports[`Spartacus SAP EPD Visualization integration schematics: ng-add SAP EPD Visualization feature general setup styling should create a proper scss file 1`] = ` "@import "../../styles-config"; @import "@spartacus/epd-visualization"; +@import "@spartacus/styles/vendor/bootstrap/scss/functions"; +@import "@spartacus/styles/vendor/bootstrap/scss/variables"; +@import "@spartacus/styles/vendor/bootstrap/scss/_mixins"; " `; diff --git a/integration-libs/opf/_index.scss b/integration-libs/opf/_index.scss index 2ae3667606a..da76b14ce09 100644 --- a/integration-libs/opf/_index.scss +++ b/integration-libs/opf/_index.scss @@ -1,8 +1,6 @@ @import '@spartacus/styles/scss/core'; @import '@spartacus/checkout'; -@import '@spartacus/styles/vendor/bootstrap/scss/functions'; -@import '@spartacus/styles/vendor/bootstrap/scss/variables'; -@import '@spartacus/styles/vendor/bootstrap/scss/_mixins'; + @import './base/styles/index'; @import './checkout/styles/index'; @import './cta/styles/index'; diff --git a/integration-libs/opf/schematics/add-opf/__snapshots__/index_spec.ts.snap b/integration-libs/opf/schematics/add-opf/__snapshots__/index_spec.ts.snap index 9db839d7cad..77515c8d5b3 100644 --- a/integration-libs/opf/schematics/add-opf/__snapshots__/index_spec.ts.snap +++ b/integration-libs/opf/schematics/add-opf/__snapshots__/index_spec.ts.snap @@ -69,6 +69,9 @@ exports[`Spartacus SAP OPF integration schematics: ng-add SAP OPF feature genera exports[`Spartacus SAP OPF integration schematics: ng-add SAP OPF feature general setup styling should create a proper scss file 1`] = ` "@import "../../styles-config"; @import "@spartacus/opf"; +@import "@spartacus/styles/vendor/bootstrap/scss/functions"; +@import "@spartacus/styles/vendor/bootstrap/scss/variables"; +@import "@spartacus/styles/vendor/bootstrap/scss/_mixins"; " `; diff --git a/projects/schematics/src/shared/lib-configs/cart-schematics-config.ts b/projects/schematics/src/shared/lib-configs/cart-schematics-config.ts index 4e4e04111e1..c20739ee9aa 100644 --- a/projects/schematics/src/shared/lib-configs/cart-schematics-config.ts +++ b/projects/schematics/src/shared/lib-configs/cart-schematics-config.ts @@ -13,6 +13,9 @@ import { CART_SAVED_CART_FEATURE_NAME, CART_WISHLIST_FEATURE_NAME, MINI_CART_ENTRY_POINT, + SPARTACUS_BOOTSTRAP_FUNCTIONS, + SPARTACUS_BOOTSTRAP_MIXINS, + SPARTACUS_BOOTSTRAP_VARIABLES, SPARTACUS_CART, SPARTACUS_CART_BASE, SPARTACUS_CART_BASE_ASSETS, @@ -90,6 +93,11 @@ export const CART_BASE_SCHEMATICS_CONFIG: SchematicConfig = { styles: { scssFileName: CART_SCSS_FILE_NAME, importStyle: SPARTACUS_CART, + importStyles: [ + SPARTACUS_BOOTSTRAP_FUNCTIONS, + SPARTACUS_BOOTSTRAP_VARIABLES, + SPARTACUS_BOOTSTRAP_MIXINS, + ], }, dependencyFeatures: [USER_PROFILE_FEATURE_NAME], }; @@ -131,6 +139,11 @@ export const CART_IMPORT_EXPORT_SCHEMATICS_CONFIG: SchematicConfig = { styles: { scssFileName: CART_SCSS_FILE_NAME, importStyle: SPARTACUS_CART, + importStyles: [ + SPARTACUS_BOOTSTRAP_FUNCTIONS, + SPARTACUS_BOOTSTRAP_VARIABLES, + SPARTACUS_BOOTSTRAP_MIXINS, + ], }, }; @@ -171,6 +184,11 @@ export const CART_QUICK_ORDER_SCHEMATICS_CONFIG: SchematicConfig = { styles: { scssFileName: CART_SCSS_FILE_NAME, importStyle: SPARTACUS_CART, + importStyles: [ + SPARTACUS_BOOTSTRAP_FUNCTIONS, + SPARTACUS_BOOTSTRAP_VARIABLES, + SPARTACUS_BOOTSTRAP_MIXINS, + ], }, dependencyFeatures: [CART_BASE_FEATURE_NAME], }; @@ -211,6 +229,11 @@ export const CART_SAVED_CART_SCHEMATICS_CONFIG: SchematicConfig = { styles: { scssFileName: CART_SCSS_FILE_NAME, importStyle: SPARTACUS_CART, + importStyles: [ + SPARTACUS_BOOTSTRAP_FUNCTIONS, + SPARTACUS_BOOTSTRAP_VARIABLES, + SPARTACUS_BOOTSTRAP_MIXINS, + ], }, dependencyFeatures: [CART_BASE_FEATURE_NAME], }; @@ -262,6 +285,11 @@ export const CART_WISHLIST_SCHEMATICS_CONFIG: SchematicConfig = { styles: { scssFileName: CART_SCSS_FILE_NAME, importStyle: SPARTACUS_CART, + importStyles: [ + SPARTACUS_BOOTSTRAP_FUNCTIONS, + SPARTACUS_BOOTSTRAP_VARIABLES, + SPARTACUS_BOOTSTRAP_MIXINS, + ], }, dependencyFeatures: [CART_BASE_FEATURE_NAME], }; diff --git a/projects/schematics/src/shared/lib-configs/checkout-schematics-config.ts b/projects/schematics/src/shared/lib-configs/checkout-schematics-config.ts index 03e6b13285b..21a1ab0c9e0 100644 --- a/projects/schematics/src/shared/lib-configs/checkout-schematics-config.ts +++ b/projects/schematics/src/shared/lib-configs/checkout-schematics-config.ts @@ -9,6 +9,9 @@ import { CHECKOUT_BASE_FEATURE_NAME, CHECKOUT_SCHEDULED_REPLENISHMENT_FEATURE_NAME, ORDER_FEATURE_NAME, + SPARTACUS_BOOTSTRAP_FUNCTIONS, + SPARTACUS_BOOTSTRAP_MIXINS, + SPARTACUS_BOOTSTRAP_VARIABLES, SPARTACUS_CHECKOUT, SPARTACUS_CHECKOUT_B2B, SPARTACUS_CHECKOUT_B2B_ASSETS, @@ -62,6 +65,11 @@ export const CHECKOUT_BASE_SCHEMATICS_CONFIG: SchematicConfig = { styles: { scssFileName: CHECKOUT_SCSS_FILE_NAME, importStyle: SPARTACUS_CHECKOUT, + importStyles: [ + SPARTACUS_BOOTSTRAP_FUNCTIONS, + SPARTACUS_BOOTSTRAP_VARIABLES, + SPARTACUS_BOOTSTRAP_MIXINS, + ], }, dependencyFeatures: [ORDER_FEATURE_NAME], }; @@ -97,6 +105,11 @@ export const CHECKOUT_B2B_SCHEMATICS_CONFIG: SchematicConfig = { styles: { scssFileName: CHECKOUT_SCSS_FILE_NAME, importStyle: SPARTACUS_CHECKOUT, + importStyles: [ + SPARTACUS_BOOTSTRAP_FUNCTIONS, + SPARTACUS_BOOTSTRAP_VARIABLES, + SPARTACUS_BOOTSTRAP_MIXINS, + ], }, dependencyFeatures: [ ORDER_FEATURE_NAME, @@ -146,6 +159,11 @@ export const CHECKOUT_SCHEDULED_REPLENISHMENT_SCHEMATICS_CONFIG: SchematicConfig styles: { scssFileName: CHECKOUT_SCSS_FILE_NAME, importStyle: SPARTACUS_CHECKOUT, + importStyles: [ + SPARTACUS_BOOTSTRAP_FUNCTIONS, + SPARTACUS_BOOTSTRAP_VARIABLES, + SPARTACUS_BOOTSTRAP_MIXINS, + ], }, dependencyFeatures: [ORDER_FEATURE_NAME, CHECKOUT_B2B_FEATURE_NAME], importAfter: [ diff --git a/projects/schematics/src/shared/lib-configs/integration-libs/epd-schematics-config.ts b/projects/schematics/src/shared/lib-configs/integration-libs/epd-schematics-config.ts index c4079432f52..eea4dc8697b 100644 --- a/projects/schematics/src/shared/lib-configs/integration-libs/epd-schematics-config.ts +++ b/projects/schematics/src/shared/lib-configs/integration-libs/epd-schematics-config.ts @@ -7,6 +7,9 @@ import { EPD_VISUALIZATION_CONFIG } from '../../constants'; import { EPD_VISUALIZATION_FEATURE_NAME, + SPARTACUS_BOOTSTRAP_FUNCTIONS, + SPARTACUS_BOOTSTRAP_MIXINS, + SPARTACUS_BOOTSTRAP_VARIABLES, SPARTACUS_EPD_VISUALIZATION, SPARTACUS_EPD_VISUALIZATION_ASSETS, SPARTACUS_EPD_VISUALIZATION_ROOT, @@ -58,6 +61,11 @@ export const EPD_SCHEMATICS_CONFIG: SchematicConfig = { styles: { scssFileName: EPD_SCSS_FILE_NAME, importStyle: SPARTACUS_EPD_VISUALIZATION, + importStyles: [ + SPARTACUS_BOOTSTRAP_FUNCTIONS, + SPARTACUS_BOOTSTRAP_VARIABLES, + SPARTACUS_BOOTSTRAP_MIXINS, + ], }, }; diff --git a/projects/schematics/src/shared/lib-configs/integration-libs/opf-schematics-config.ts b/projects/schematics/src/shared/lib-configs/integration-libs/opf-schematics-config.ts index 6fb58b550f5..42c8d03f7b7 100644 --- a/projects/schematics/src/shared/lib-configs/integration-libs/opf-schematics-config.ts +++ b/projects/schematics/src/shared/lib-configs/integration-libs/opf-schematics-config.ts @@ -12,6 +12,9 @@ import { OPF_PAYMENT_FEATURE_NAME, OPF_QUICK_BUY_FEATURE_NAME, ORDER_FEATURE_NAME, + SPARTACUS_BOOTSTRAP_FUNCTIONS, + SPARTACUS_BOOTSTRAP_MIXINS, + SPARTACUS_BOOTSTRAP_VARIABLES, SPARTACUS_OPF, SPARTACUS_OPF_BASE, SPARTACUS_OPF_BASE_ROOT, @@ -100,6 +103,11 @@ export const OPF_BASE_SCHEMATICS_CONFIG: SchematicConfig = { styles: { scssFileName: OPF_SCSS_FILE_NAME, importStyle: SPARTACUS_OPF, + importStyles: [ + SPARTACUS_BOOTSTRAP_FUNCTIONS, + SPARTACUS_BOOTSTRAP_VARIABLES, + SPARTACUS_BOOTSTRAP_MIXINS, + ], }, customConfig: buildOpfConfig, }; @@ -132,6 +140,11 @@ export const OPF_PAYMENT_SCHEMATICS_CONFIG: SchematicConfig = { styles: { scssFileName: OPF_SCSS_FILE_NAME, importStyle: SPARTACUS_OPF, + importStyles: [ + SPARTACUS_BOOTSTRAP_FUNCTIONS, + SPARTACUS_BOOTSTRAP_VARIABLES, + SPARTACUS_BOOTSTRAP_MIXINS, + ], }, customConfig: buildOpfConfig, }; @@ -170,6 +183,11 @@ export const OPF_CHECKOUT_SCHEMATICS_CONFIG: SchematicConfig = { styles: { scssFileName: OPF_SCSS_FILE_NAME, importStyle: SPARTACUS_OPF, + importStyles: [ + SPARTACUS_BOOTSTRAP_FUNCTIONS, + SPARTACUS_BOOTSTRAP_VARIABLES, + SPARTACUS_BOOTSTRAP_MIXINS, + ], }, customConfig: buildOpfConfig, dependencyFeatures: [ @@ -211,6 +229,11 @@ export const OPF_CTA_SCHEMATICS_CONFIG: SchematicConfig = { styles: { scssFileName: OPF_SCSS_FILE_NAME, importStyle: SPARTACUS_OPF, + importStyles: [ + SPARTACUS_BOOTSTRAP_FUNCTIONS, + SPARTACUS_BOOTSTRAP_VARIABLES, + SPARTACUS_BOOTSTRAP_MIXINS, + ], }, }; @@ -237,6 +260,11 @@ export const OPF_GLOBAL_FUNCTIONS_SCHEMATICS_CONFIG: SchematicConfig = { styles: { scssFileName: OPF_SCSS_FILE_NAME, importStyle: SPARTACUS_OPF, + importStyles: [ + SPARTACUS_BOOTSTRAP_FUNCTIONS, + SPARTACUS_BOOTSTRAP_VARIABLES, + SPARTACUS_BOOTSTRAP_MIXINS, + ], }, }; @@ -263,6 +291,11 @@ export const OPF_QUICK_BUY_SCHEMATICS_CONFIG: SchematicConfig = { styles: { scssFileName: OPF_SCSS_FILE_NAME, importStyle: SPARTACUS_OPF, + importStyles: [ + SPARTACUS_BOOTSTRAP_FUNCTIONS, + SPARTACUS_BOOTSTRAP_VARIABLES, + SPARTACUS_BOOTSTRAP_MIXINS, + ], }, customConfig: buildOpfQuickBuyConfig, }; @@ -303,12 +336,12 @@ function buildOpfQuickBuyConfig( }, ], content: `<${OPF_QUICKBUY_CONFIG}>{ - providers: + providers: { googlePay: { resourceUrl: "${options.opfGooglePayApiUrl || 'PLACEHOLDER_GOOGLE_PAY_API_URL'}" } - } + } }`, }, }; diff --git a/projects/schematics/src/shared/lib-configs/organization-schematics-config.ts b/projects/schematics/src/shared/lib-configs/organization-schematics-config.ts index 1ba9354e2e1..9d3b606c555 100644 --- a/projects/schematics/src/shared/lib-configs/organization-schematics-config.ts +++ b/projects/schematics/src/shared/lib-configs/organization-schematics-config.ts @@ -28,6 +28,9 @@ import { SPARTACUS_ORGANIZATION_USER_REGISTRATION_ASSETS, SPARTACUS_ORGANIZATION_USER_REGISTRATION_ROOT, USER_PROFILE_FEATURE_NAME, + SPARTACUS_BOOTSTRAP_FUNCTIONS, + SPARTACUS_BOOTSTRAP_VARIABLES, + SPARTACUS_BOOTSTRAP_MIXINS, } from '../libs-constants'; import { SchematicConfig } from '../utils/lib-utils'; @@ -73,6 +76,11 @@ export const ORGANIZATION_ADMINISTRATION_SCHEMATICS_CONFIG: SchematicConfig = { styles: { scssFileName: ORGANIZATION_SCSS_FILE_NAME, importStyle: SPARTACUS_ORGANIZATION, + importStyles: [ + SPARTACUS_BOOTSTRAP_FUNCTIONS, + SPARTACUS_BOOTSTRAP_VARIABLES, + SPARTACUS_BOOTSTRAP_MIXINS, + ], }, dependencyFeatures: [USER_PROFILE_FEATURE_NAME], }; @@ -116,6 +124,11 @@ export const ORGANIZATION_ORDER_APPROVAL_SCHEMATICS_CONFIG: SchematicConfig = { styles: { scssFileName: ORGANIZATION_SCSS_FILE_NAME, importStyle: SPARTACUS_ORGANIZATION, + importStyles: [ + SPARTACUS_BOOTSTRAP_FUNCTIONS, + SPARTACUS_BOOTSTRAP_VARIABLES, + SPARTACUS_BOOTSTRAP_MIXINS, + ], }, dependencyFeatures: [USER_PROFILE_FEATURE_NAME, ORDER_FEATURE_NAME], }; @@ -163,6 +176,11 @@ export const ORGANIZATION_USER_REGISTRATION_SCHEMATICS_CONFIG: SchematicConfig = styles: { scssFileName: ORGANIZATION_SCSS_FILE_NAME, importStyle: SPARTACUS_ORGANIZATION, + importStyles: [ + SPARTACUS_BOOTSTRAP_FUNCTIONS, + SPARTACUS_BOOTSTRAP_VARIABLES, + SPARTACUS_BOOTSTRAP_MIXINS, + ], }, dependencyFeatures: [USER_PROFILE_FEATURE_NAME], }; @@ -205,6 +223,11 @@ export const ORGANIZATION_UNIT_ORDER_SCHEMATICS_CONFIG: SchematicConfig = { styles: { scssFileName: ORGANIZATION_SCSS_FILE_NAME, importStyle: SPARTACUS_ORGANIZATION, + importStyles: [ + SPARTACUS_BOOTSTRAP_FUNCTIONS, + SPARTACUS_BOOTSTRAP_VARIABLES, + SPARTACUS_BOOTSTRAP_MIXINS, + ], }, dependencyFeatures: [USER_PROFILE_FEATURE_NAME, ORDER_FEATURE_NAME], }; @@ -248,6 +271,11 @@ export const ORGANIZATION_ACCOUNT_SUMMARY_SCHEMATICS_CONFIG: SchematicConfig = { styles: { scssFileName: ORGANIZATION_SCSS_FILE_NAME, importStyle: SPARTACUS_ORGANIZATION, + importStyles: [ + SPARTACUS_BOOTSTRAP_FUNCTIONS, + SPARTACUS_BOOTSTRAP_VARIABLES, + SPARTACUS_BOOTSTRAP_MIXINS, + ], }, dependencyFeatures: [ORGANIZATION_ADMINISTRATION_FEATURE_NAME], }; diff --git a/projects/schematics/src/shared/lib-configs/pickup-in-store-schematics-config.ts b/projects/schematics/src/shared/lib-configs/pickup-in-store-schematics-config.ts index 7077110f7d1..f996811c712 100644 --- a/projects/schematics/src/shared/lib-configs/pickup-in-store-schematics-config.ts +++ b/projects/schematics/src/shared/lib-configs/pickup-in-store-schematics-config.ts @@ -8,6 +8,9 @@ import { CART_BASE_FEATURE_NAME, ORDER_FEATURE_NAME, PICKUP_IN_STORE_FEATURE_NAME, + SPARTACUS_BOOTSTRAP_FUNCTIONS, + SPARTACUS_BOOTSTRAP_MIXINS, + SPARTACUS_BOOTSTRAP_VARIABLES, SPARTACUS_PICKUP_IN_STORE, SPARTACUS_PICKUP_IN_STORE_ASSETS, SPARTACUS_PICKUP_IN_STORE_ROOT, @@ -49,6 +52,11 @@ export const PICKUP_IN_STORE_SCHEMATICS_CONFIG: SchematicConfig = { styles: { scssFileName: PICKUP_IN_STORE_SCSS_FILE_NAME, importStyle: SPARTACUS_PICKUP_IN_STORE, + importStyles: [ + SPARTACUS_BOOTSTRAP_FUNCTIONS, + SPARTACUS_BOOTSTRAP_VARIABLES, + SPARTACUS_BOOTSTRAP_MIXINS, + ], }, i18n: { resources: PICKUP_IN_STORE_TRANSLATIONS, diff --git a/projects/schematics/src/shared/lib-configs/product-multi-dimensional-schematics-config.ts b/projects/schematics/src/shared/lib-configs/product-multi-dimensional-schematics-config.ts index 2d10a7514c9..fbdef77fbdd 100644 --- a/projects/schematics/src/shared/lib-configs/product-multi-dimensional-schematics-config.ts +++ b/projects/schematics/src/shared/lib-configs/product-multi-dimensional-schematics-config.ts @@ -7,6 +7,9 @@ import { PRODUCT_MULTI_DIMENSIONAL_LIST_FEATURE_NAME, PRODUCT_MULTI_DIMENSIONAL_SELECTOR_FEATURE_NAME, + SPARTACUS_BOOTSTRAP_FUNCTIONS, + SPARTACUS_BOOTSTRAP_MIXINS, + SPARTACUS_BOOTSTRAP_VARIABLES, SPARTACUS_PRODUCT_MULTI_DIMENSIONAL, SPARTACUS_PRODUCT_MULTI_DIMENSIONAL_LIST, SPARTACUS_PRODUCT_MULTI_DIMENSIONAL_LIST_ROOT, @@ -85,6 +88,11 @@ export const PRODUCT_MULTI_DIMENSIONAL_SELECTOR_SCHEMATICS_CONFIG: SchematicConf styles: { scssFileName: PRODUCT_MULTI_DIMENSIONAL_SCSS_FILE_NAME, importStyle: SPARTACUS_PRODUCT_MULTI_DIMENSIONAL, + importStyles: [ + SPARTACUS_BOOTSTRAP_FUNCTIONS, + SPARTACUS_BOOTSTRAP_VARIABLES, + SPARTACUS_BOOTSTRAP_MIXINS, + ], }, i18n: { resources: PRODUCT_MULTI_DIMENSIONAL_SELECTOR_TRANSLATIONS, diff --git a/projects/schematics/src/shared/lib-configs/product-schematics-config.ts b/projects/schematics/src/shared/lib-configs/product-schematics-config.ts index ea2cd9cceca..0fcf3b08f3d 100644 --- a/projects/schematics/src/shared/lib-configs/product-schematics-config.ts +++ b/projects/schematics/src/shared/lib-configs/product-schematics-config.ts @@ -9,6 +9,9 @@ import { PRODUCT_FUTURE_STOCK_FEATURE_NAME, PRODUCT_IMAGE_ZOOM_FEATURE_NAME, PRODUCT_VARIANTS_FEATURE_NAME, + SPARTACUS_BOOTSTRAP_FUNCTIONS, + SPARTACUS_BOOTSTRAP_MIXINS, + SPARTACUS_BOOTSTRAP_VARIABLES, SPARTACUS_BULK_PRICING, SPARTACUS_BULK_PRICING_ASSETS, SPARTACUS_BULK_PRICING_ROOT, @@ -66,6 +69,11 @@ export const PRODUCT_BULK_PRICING_SCHEMATICS_CONFIG: SchematicConfig = { styles: { scssFileName: PRODUCT_SCSS_FILE_NAME, importStyle: SPARTACUS_PRODUCT, + importStyles: [ + SPARTACUS_BOOTSTRAP_FUNCTIONS, + SPARTACUS_BOOTSTRAP_VARIABLES, + SPARTACUS_BOOTSTRAP_MIXINS, + ], }, }; @@ -105,6 +113,11 @@ export const PRODUCT_IMAGE_ZOOM_SCHEMATICS_CONFIG: SchematicConfig = { styles: { scssFileName: PRODUCT_SCSS_FILE_NAME, importStyle: SPARTACUS_PRODUCT, + importStyles: [ + SPARTACUS_BOOTSTRAP_FUNCTIONS, + SPARTACUS_BOOTSTRAP_VARIABLES, + SPARTACUS_BOOTSTRAP_MIXINS, + ], }, }; @@ -144,6 +157,11 @@ export const PRODUCT_VARIANTS_SCHEMATICS_CONFIG: SchematicConfig = { styles: { scssFileName: PRODUCT_SCSS_FILE_NAME, importStyle: SPARTACUS_PRODUCT, + importStyles: [ + SPARTACUS_BOOTSTRAP_FUNCTIONS, + SPARTACUS_BOOTSTRAP_VARIABLES, + SPARTACUS_BOOTSTRAP_MIXINS, + ], }, }; @@ -185,5 +203,10 @@ export const PRODUCT_FUTURE_STOCK_SCHEMATICS_CONFIG: SchematicConfig = { styles: { scssFileName: PRODUCT_SCSS_FILE_NAME, importStyle: SPARTACUS_PRODUCT, + importStyles: [ + SPARTACUS_BOOTSTRAP_FUNCTIONS, + SPARTACUS_BOOTSTRAP_VARIABLES, + SPARTACUS_BOOTSTRAP_MIXINS, + ], }, }; diff --git a/projects/schematics/src/shared/lib-configs/qualtrics-schematics-config.ts b/projects/schematics/src/shared/lib-configs/qualtrics-schematics-config.ts index d1a1d110708..590da7d3462 100644 --- a/projects/schematics/src/shared/lib-configs/qualtrics-schematics-config.ts +++ b/projects/schematics/src/shared/lib-configs/qualtrics-schematics-config.ts @@ -6,6 +6,9 @@ import { QUALTRICS_FEATURE_NAME, + SPARTACUS_BOOTSTRAP_FUNCTIONS, + SPARTACUS_BOOTSTRAP_MIXINS, + SPARTACUS_BOOTSTRAP_VARIABLES, SPARTACUS_QUALTRICS, SPARTACUS_QUALTRICS_ROOT, } from '../libs-constants'; @@ -42,5 +45,10 @@ export const QUALTRICS_SCHEMATICS_CONFIG: SchematicConfig = { styles: { scssFileName: QUALTRICS_EMBEDDED_FEEDBACK_SCSS_FILE_NAME, importStyle: SPARTACUS_QUALTRICS, + importStyles: [ + SPARTACUS_BOOTSTRAP_FUNCTIONS, + SPARTACUS_BOOTSTRAP_VARIABLES, + SPARTACUS_BOOTSTRAP_MIXINS, + ], }, }; diff --git a/projects/schematics/src/shared/lib-configs/quote-schematics-config.ts b/projects/schematics/src/shared/lib-configs/quote-schematics-config.ts index 9e27abe6b59..cb02ecab11b 100644 --- a/projects/schematics/src/shared/lib-configs/quote-schematics-config.ts +++ b/projects/schematics/src/shared/lib-configs/quote-schematics-config.ts @@ -7,6 +7,9 @@ import { CART_BASE_FEATURE_NAME, QUOTE_FEATURE_NAME, + SPARTACUS_BOOTSTRAP_FUNCTIONS, + SPARTACUS_BOOTSTRAP_MIXINS, + SPARTACUS_BOOTSTRAP_VARIABLES, SPARTACUS_QUOTE, SPARTACUS_QUOTE_ASSETS, SPARTACUS_QUOTE_CART_GUARD, @@ -67,6 +70,11 @@ export const QUOTE_SCHEMATICS_CONFIG: SchematicConfig = { styles: { scssFileName: QUOTE_SCSS_FILE_NAME, importStyle: SPARTACUS_QUOTE, + importStyles: [ + SPARTACUS_BOOTSTRAP_FUNCTIONS, + SPARTACUS_BOOTSTRAP_VARIABLES, + SPARTACUS_BOOTSTRAP_MIXINS, + ], }, i18n: { resources: QUOTE_TRANSLATIONS, diff --git a/projects/schematics/src/shared/lib-configs/storefinder-schematics-config.ts b/projects/schematics/src/shared/lib-configs/storefinder-schematics-config.ts index 9088f6e872c..7eced965eaa 100644 --- a/projects/schematics/src/shared/lib-configs/storefinder-schematics-config.ts +++ b/projects/schematics/src/shared/lib-configs/storefinder-schematics-config.ts @@ -5,6 +5,9 @@ */ import { + SPARTACUS_BOOTSTRAP_FUNCTIONS, + SPARTACUS_BOOTSTRAP_MIXINS, + SPARTACUS_BOOTSTRAP_VARIABLES, SPARTACUS_STOREFINDER, SPARTACUS_STOREFINDER_ASSETS, SPARTACUS_STOREFINDER_ROOT, @@ -50,5 +53,10 @@ export const STOREFINDER_SCHEMATICS_CONFIG: SchematicConfig = { styles: { scssFileName: STOREFINDER_SCSS_FILE_NAME, importStyle: SPARTACUS_STOREFINDER, + importStyles: [ + SPARTACUS_BOOTSTRAP_FUNCTIONS, + SPARTACUS_BOOTSTRAP_VARIABLES, + SPARTACUS_BOOTSTRAP_MIXINS, + ], }, }; diff --git a/projects/schematics/src/shared/libs-constants.ts b/projects/schematics/src/shared/libs-constants.ts index 4d21bba49fb..7e72c4a9969 100644 --- a/projects/schematics/src/shared/libs-constants.ts +++ b/projects/schematics/src/shared/libs-constants.ts @@ -387,3 +387,10 @@ export const CPQ_QUOTE_FEATURE_NAME = 'cpq-quote'; export const SPARTACUS_CPQ_QUOTE = `@spartacus/cpq-quote`; export const SPARTACUS_CPQ_QUOTE_ROOT = `@spartacus/cpq-quote/root`; export const SPARTACUS_CPQ_QUOTE_ASSETS = `@spartacus/cpq-quote/assets`; + +export const SPARTACUS_BOOTSTRAP_FUNCTIONS = + '@spartacus/styles/vendor/bootstrap/scss/functions'; +export const SPARTACUS_BOOTSTRAP_VARIABLES = + '@spartacus/styles/vendor/bootstrap/scss/variables'; +export const SPARTACUS_BOOTSTRAP_MIXINS = + '@spartacus/styles/vendor/bootstrap/scss/_mixins'; diff --git a/projects/schematics/src/shared/utils/lib-utils.ts b/projects/schematics/src/shared/utils/lib-utils.ts index 1907ba54064..3a6269c0818 100644 --- a/projects/schematics/src/shared/utils/lib-utils.ts +++ b/projects/schematics/src/shared/utils/lib-utils.ts @@ -216,6 +216,7 @@ export interface I18NConfig { export interface StylingConfig { scssFileName: string; importStyle: string; + importStyles?: string[]; } export interface AssetsConfig { @@ -633,20 +634,33 @@ export function addLibraryStyles( const libraryScssPath = `${getSourceRoot(tree, { project: project, })}/styles/spartacus/${stylingConfig.scssFileName}`; - const libraryStylesImport = `@import "${stylingConfig.importStyle}";`; + + const featureLibStyleImport = `@import "${stylingConfig.importStyle}";`; + const additionalImports = stylingConfig.importStyles + ? stylingConfig.importStyles.map((style) => `@import "${style}";`) + : []; + if (tree.exists(libraryScssPath)) { const initialContent = tree.read(libraryScssPath)?.toString(UTF_8) ?? ''; let content = initialContent; - if (!content.includes(libraryStylesImport)) { - content += `\n${libraryStylesImport}`; + if (!content.includes(featureLibStyleImport)) { + content += `\n${featureLibStyleImport}`; } - // prevent the unnecessary Angular logs about the files being updated + + additionalImports.forEach((importStatement) => { + if (!content.includes(importStatement)) { + content += `\n${importStatement}`; + } + }); + + // Prevent unnecessary Angular logs about files being updated if (initialContent !== content) { tree.overwrite(libraryScssPath, content); } return tree; } + const styleConfigFilePath = getStylesConfigFilePath( getSourceRoot(tree, { project: project, @@ -663,7 +677,10 @@ export function addLibraryStyles( libraryScssFileContent += `${stylesConfigImport}\n`; } - libraryScssFileContent += `${libraryStylesImport}\n`; + libraryScssFileContent += `${featureLibStyleImport}\n`; + if (additionalImports.length > 0) { + libraryScssFileContent += `${additionalImports.join('\n')}\n`; + } tree.create(libraryScssPath, libraryScssFileContent); diff --git a/projects/storefrontapp/src/styles/lib-cart.scss b/projects/storefrontapp/src/styles/lib-cart.scss index da1149b5c6d..28e1f666809 100644 --- a/projects/storefrontapp/src/styles/lib-cart.scss +++ b/projects/storefrontapp/src/styles/lib-cart.scss @@ -1,2 +1,5 @@ @import '../styles-config'; @import '@spartacus/cart'; +@import '@spartacus/styles/vendor/bootstrap/scss/functions'; +@import '@spartacus/styles/vendor/bootstrap/scss/variables'; +@import '@spartacus/styles/vendor/bootstrap/scss/_mixins'; diff --git a/projects/storefrontapp/src/styles/lib-checkout.scss b/projects/storefrontapp/src/styles/lib-checkout.scss index 95169c59da3..3f8151174a7 100644 --- a/projects/storefrontapp/src/styles/lib-checkout.scss +++ b/projects/storefrontapp/src/styles/lib-checkout.scss @@ -1,2 +1,6 @@ @import '../styles-config'; @import '@spartacus/checkout'; + +@import '@spartacus/styles/vendor/bootstrap/scss/functions'; +@import '@spartacus/styles/vendor/bootstrap/scss/variables'; +@import '@spartacus/styles/vendor/bootstrap/scss/_mixins'; diff --git a/projects/storefrontapp/src/styles/lib-epd-visualization.scss b/projects/storefrontapp/src/styles/lib-epd-visualization.scss index bccf99a5a56..f703af04140 100644 --- a/projects/storefrontapp/src/styles/lib-epd-visualization.scss +++ b/projects/storefrontapp/src/styles/lib-epd-visualization.scss @@ -1,2 +1,6 @@ @import '../styles-config'; @import '@spartacus/epd-visualization'; + +@import '@spartacus/styles/vendor/bootstrap/scss/functions'; +@import '@spartacus/styles/vendor/bootstrap/scss/variables'; +@import '@spartacus/styles/vendor/bootstrap/scss/_mixins'; diff --git a/projects/storefrontapp/src/styles/lib-opf.scss b/projects/storefrontapp/src/styles/lib-opf.scss index 56bcef77964..39e1f28489f 100644 --- a/projects/storefrontapp/src/styles/lib-opf.scss +++ b/projects/storefrontapp/src/styles/lib-opf.scss @@ -1,2 +1,6 @@ @import '../styles-config'; @import '@spartacus/opf'; + +@import '@spartacus/styles/vendor/bootstrap/scss/functions'; +@import '@spartacus/styles/vendor/bootstrap/scss/variables'; +@import '@spartacus/styles/vendor/bootstrap/scss/_mixins'; diff --git a/projects/storefrontapp/src/styles/lib-organization.scss b/projects/storefrontapp/src/styles/lib-organization.scss index 2eb4d858ddc..0c921deb635 100644 --- a/projects/storefrontapp/src/styles/lib-organization.scss +++ b/projects/storefrontapp/src/styles/lib-organization.scss @@ -1,2 +1,6 @@ @import '../styles-config'; @import '@spartacus/organization'; + +@import '@spartacus/styles/vendor/bootstrap/scss/functions'; +@import '@spartacus/styles/vendor/bootstrap/scss/variables'; +@import '@spartacus/styles/vendor/bootstrap/scss/_mixins'; diff --git a/projects/storefrontapp/src/styles/lib-pickup-in-store.scss b/projects/storefrontapp/src/styles/lib-pickup-in-store.scss index 7c4a0ee6a4c..b4d3026299a 100644 --- a/projects/storefrontapp/src/styles/lib-pickup-in-store.scss +++ b/projects/storefrontapp/src/styles/lib-pickup-in-store.scss @@ -1,2 +1,6 @@ @import '../styles-config'; @import '@spartacus/pickup-in-store'; + +@import '@spartacus/styles/vendor/bootstrap/scss/functions'; +@import '@spartacus/styles/vendor/bootstrap/scss/variables'; +@import '@spartacus/styles/vendor/bootstrap/scss/_mixins'; diff --git a/projects/storefrontapp/src/styles/lib-product-multi-dimensional.scss b/projects/storefrontapp/src/styles/lib-product-multi-dimensional.scss index c41aa469a36..0c2de4cc50c 100644 --- a/projects/storefrontapp/src/styles/lib-product-multi-dimensional.scss +++ b/projects/storefrontapp/src/styles/lib-product-multi-dimensional.scss @@ -1,2 +1,6 @@ @import '../styles-config'; @import '@spartacus/product-multi-dimensional'; + +@import '@spartacus/styles/vendor/bootstrap/scss/functions'; +@import '@spartacus/styles/vendor/bootstrap/scss/variables'; +@import '@spartacus/styles/vendor/bootstrap/scss/_mixins'; diff --git a/projects/storefrontapp/src/styles/lib-product.scss b/projects/storefrontapp/src/styles/lib-product.scss index 0b1043b88ff..a92a990b36f 100644 --- a/projects/storefrontapp/src/styles/lib-product.scss +++ b/projects/storefrontapp/src/styles/lib-product.scss @@ -1,2 +1,6 @@ @import '../styles-config'; @import '@spartacus/product'; + +@import '@spartacus/styles/vendor/bootstrap/scss/functions'; +@import '@spartacus/styles/vendor/bootstrap/scss/variables'; +@import '@spartacus/styles/vendor/bootstrap/scss/_mixins'; diff --git a/projects/storefrontapp/src/styles/lib-qualtrics.scss b/projects/storefrontapp/src/styles/lib-qualtrics.scss index a8b4eb5c495..0ddf4f12415 100644 --- a/projects/storefrontapp/src/styles/lib-qualtrics.scss +++ b/projects/storefrontapp/src/styles/lib-qualtrics.scss @@ -1,2 +1,6 @@ @import '../styles-config'; @import '@spartacus/qualtrics'; + +@import '@spartacus/styles/vendor/bootstrap/scss/functions'; +@import '@spartacus/styles/vendor/bootstrap/scss/variables'; +@import '@spartacus/styles/vendor/bootstrap/scss/_mixins'; diff --git a/projects/storefrontapp/src/styles/lib-quote.scss b/projects/storefrontapp/src/styles/lib-quote.scss index c801bc4d277..9035d94d57f 100644 --- a/projects/storefrontapp/src/styles/lib-quote.scss +++ b/projects/storefrontapp/src/styles/lib-quote.scss @@ -1,2 +1,6 @@ @import '../styles-config'; @import '@spartacus/quote'; + +@import '@spartacus/styles/vendor/bootstrap/scss/functions'; +@import '@spartacus/styles/vendor/bootstrap/scss/variables'; +@import '@spartacus/styles/vendor/bootstrap/scss/_mixins'; diff --git a/projects/storefrontapp/src/styles/lib-storefinder.scss b/projects/storefrontapp/src/styles/lib-storefinder.scss index 9a12d2c859d..0931dc5872d 100644 --- a/projects/storefrontapp/src/styles/lib-storefinder.scss +++ b/projects/storefrontapp/src/styles/lib-storefinder.scss @@ -1,2 +1,6 @@ @import '../styles-config'; @import '@spartacus/storefinder'; + +@import '@spartacus/styles/vendor/bootstrap/scss/functions'; +@import '@spartacus/styles/vendor/bootstrap/scss/variables'; +@import '@spartacus/styles/vendor/bootstrap/scss/_mixins';