From 8a4805309a1329e3ecd7679b9cd4c8f32f1cedd0 Mon Sep 17 00:00:00 2001 From: Shane Melton Date: Wed, 19 Oct 2022 16:24:39 -0700 Subject: [PATCH] Fix MultiSelect component styles and CSP error (#3841) * Update Web styles and CSP to support MultiSelect component - Include the MultiSelect module in the CL barrel file of exports - Import the MultiSelect scss into the Web styles.scss - Add the necessary sha256 hash to webpack CSP policy to support ngSelect inline styles * Undo removal of 127.0.0.1 from webpack CSP (cherry picked from commit 3ed1221f7f150928612f3fab01a2ae63a39f781a) --- apps/web/src/scss/styles.scss | 1 + apps/web/webpack.config.js | 1 + libs/components/src/index.ts | 1 + libs/components/src/multi-select/index.ts | 1 + 4 files changed, 4 insertions(+) create mode 100644 libs/components/src/multi-select/index.ts diff --git a/apps/web/src/scss/styles.scss b/apps/web/src/scss/styles.scss index dc1c740b4b29..ab99056dae32 100644 --- a/apps/web/src/scss/styles.scss +++ b/apps/web/src/scss/styles.scss @@ -2,6 +2,7 @@ @import "./variables"; @import "../../../../libs/angular/src/scss/bwicons/styles/style.scss"; @import "../../../../libs/angular/src/scss/icons.scss"; +@import "../../../../libs/components/src/multi-select/scss/bw.theme"; @import "@angular/cdk/overlay-prebuilt.css"; //@import "~bootstrap/scss/bootstrap"; diff --git a/apps/web/webpack.config.js b/apps/web/webpack.config.js index 0382f4287096..6bc5aeb913d3 100644 --- a/apps/web/webpack.config.js +++ b/apps/web/webpack.config.js @@ -234,6 +234,7 @@ const devServer = 'sha256-47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=' 'sha256-JVRXyYPueLWdwGwY9m/7u4QlZ1xeQdqUj2t8OVIzZE4=' 'sha256-or0p3LaHetJ4FRq+flVORVFFNsOjQGWrDvX8Jf7ACWg=' + 'sha256-Oca9ZYU1dwNscIhdNV7tFBsr4oqagBhZx9/p4w8GOcg=' ;img-src 'self' data: diff --git a/libs/components/src/index.ts b/libs/components/src/index.ts index bfc2ef495daa..d4d86879441f 100644 --- a/libs/components/src/index.ts +++ b/libs/components/src/index.ts @@ -8,6 +8,7 @@ export * from "./form-field"; export * from "./icon"; export * from "./icon-button"; export * from "./menu"; +export * from "./multi-select"; export * from "./dialog"; export * from "./link"; export * from "./tabs"; diff --git a/libs/components/src/multi-select/index.ts b/libs/components/src/multi-select/index.ts new file mode 100644 index 000000000000..b2dfe6b01b38 --- /dev/null +++ b/libs/components/src/multi-select/index.ts @@ -0,0 +1 @@ +export * from "./multi-select.module";