@ui5/webcomponents-theme-base
Advanced tools
Comparing version 0.29.4 to 0.31.0
@@ -6,3 +6,3 @@ # Change Log | ||
## [0.29.2](https://github.com/SAP/ui5-webcomponents/compare/v0.29.1...v0.29.2) (2021-02-09) | ||
# [1.0.0-rc.12](https://github.com/SAP/ui5-webcomponents/compare/v1.0.0-rc.11...v1.0.0-rc.12) (2021-02-18) | ||
@@ -15,10 +15,2 @@ **Note:** Version bump only for package @ui5/webcomponents-theme-base | ||
## [0.29.1](https://github.com/SAP/ui5-webcomponents/compare/v0.29.0...v0.29.1) (2021-01-21) | ||
**Note:** Version bump only for package @ui5/webcomponents-theme-base | ||
# [1.0.0-rc.11](https://github.com/SAP/ui5-webcomponents/compare/v1.0.0-rc.10...v1.0.0-rc.11) (2020-12-21) | ||
@@ -25,0 +17,0 @@ |
@@ -1,23 +0,24 @@ | ||
import { registerThemeProperties } from "@ui5/webcomponents-base/dist/asset-registries/Themes.js"; | ||
import { registerThemePropertiesLoader } from "@ui5/webcomponents-base/dist/asset-registries/Themes.js"; | ||
import sap_belize from "../assets/themes/sap_belize/parameters-bundle.css.json"; | ||
import sap_belize_hcb from "../assets/themes/sap_belize_hcb/parameters-bundle.css.json"; | ||
import sap_belize_hcw from "../assets/themes/sap_belize_hcw/parameters-bundle.css.json"; | ||
import sap_fiori_3_dark from "../assets/themes/sap_fiori_3_dark/parameters-bundle.css.json"; | ||
import sap_fiori_3_hcb from "../assets/themes/sap_fiori_3_hcb/parameters-bundle.css.json"; | ||
import sap_fiori_3_hcw from "../assets/themes/sap_fiori_3_hcw/parameters-bundle.css.json"; | ||
const loadThemeProperties = async (themeName) => { | ||
switch (themeName) { | ||
case "sap_belize": return (await import("../assets/themes/sap_belize/parameters-bundle.css.json")).default; | ||
case "sap_belize_hcb": return (await import("../assets/themes/sap_belize_hcb/parameters-bundle.css.json")).default; | ||
case "sap_belize_hcw": return (await import("../assets/themes/sap_belize_hcw/parameters-bundle.css.json")).default; | ||
case "sap_fiori_3_dark": return (await import("../assets/themes/sap_fiori_3_dark/parameters-bundle.css.json")).default; | ||
case "sap_fiori_3_hcb": return (await import("../assets/themes/sap_fiori_3_hcb/parameters-bundle.css.json")).default; | ||
case "sap_fiori_3_hcw": return (await import("../assets/themes/sap_fiori_3_hcw/parameters-bundle.css.json")).default; | ||
default: throw "unknown theme" | ||
} | ||
} | ||
const isInlined = obj => typeof (obj) === "object"; | ||
if (isInlined(sap_belize) || isInlined(sap_belize_hcb) || isInlined(sap_belize_hcw) || isInlined(sap_fiori_3_dark) || isInlined(sap_fiori_3_hcb) || isInlined(sap_fiori_3_hcw)) { | ||
console.warn(`Inefficient bundling detected: consider bundling theme properties imports as URLs instead of inlining them. | ||
See rollup-plugin-url or webpack file-loader for more information. | ||
Suggested pattern: "assets\\\/.*\\\.json"`); | ||
const loadAndCheck = async (themeName) => { | ||
const data = await loadThemeProperties(themeName); | ||
if (typeof data === "string" && data.endsWith(".json")) { | ||
throw new Error(`[themes] Invalid bundling detected - dynamic JSON imports bundled as URLs. Switch to inlining JSON files from the build or use 'import ".../Assets-static.js"'. Check the "Assets" documentation for more information.`); | ||
} | ||
return data; | ||
} | ||
registerThemeProperties("@ui5/webcomponents-theme-base", "sap_belize", sap_belize); | ||
registerThemeProperties("@ui5/webcomponents-theme-base", "sap_belize_hcb", sap_belize_hcb); | ||
registerThemeProperties("@ui5/webcomponents-theme-base", "sap_belize_hcw", sap_belize_hcw); | ||
registerThemeProperties("@ui5/webcomponents-theme-base", "sap_fiori_3_dark", sap_fiori_3_dark); | ||
registerThemeProperties("@ui5/webcomponents-theme-base", "sap_fiori_3_hcb", sap_fiori_3_hcb); | ||
registerThemeProperties("@ui5/webcomponents-theme-base", "sap_fiori_3_hcw", sap_fiori_3_hcw); | ||
["sap_belize", "sap_belize_hcb", "sap_belize_hcw", "sap_fiori_3_dark", "sap_fiori_3_hcb", "sap_fiori_3_hcw"] | ||
.forEach(themeName => registerThemePropertiesLoader("@ui5/webcomponents-theme-base", themeName, loadAndCheck)); |
{ | ||
"name": "@ui5/webcomponents-theme-base", | ||
"version": "0.29.4", | ||
"version": "0.31.0", | ||
"description": "UI5 Web Components: webcomponents.theme-base", | ||
@@ -27,8 +27,8 @@ "author": "SAP SE (https://www.sap.com)", | ||
"@sap-theming/theming-base-content": "11.1.19", | ||
"@ui5/webcomponents-base": "0.29.4" | ||
"@ui5/webcomponents-base": "0.31.0" | ||
}, | ||
"devDependencies": { | ||
"@ui5/webcomponents-tools": "0.29.4", | ||
"@ui5/webcomponents-tools": "0.31.0", | ||
"chokidar-cli": "^2.0.0", | ||
"chromedriver": "latest", | ||
"chromedriver": "88.0.0", | ||
"copy-and-watch": "^0.1.4", | ||
@@ -35,0 +35,0 @@ "cssnano": "^4.1.10", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
256249
25
335
1
+ Added@ui5/webcomponents-base@0.31.0(transitive)
- Removed@ui5/webcomponents-base@0.29.4(transitive)
- Removedbalanced-match@1.0.2(transitive)
- Removedcss-vars-ponyfill@2.4.9(transitive)
- Removedget-css-data@2.1.1(transitive)
- Removedregenerator-runtime@0.12.1(transitive)
- Removedurl-search-params-polyfill@5.1.0(transitive)