@ui5/webcomponents-base 2.15.0-rc.2 → 2.15.0-rc.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/dist/.tsbuildinfobuild +1 -1
- package/dist/generated/VersionInfo.js +3 -3
- package/dist/generated/VersionInfo.js.map +1 -1
- package/dist/prod/generated/VersionInfo.js +1 -1
- package/dist/prod/generated/VersionInfo.js.map +1 -1
- package/dist/prod/theming/applyTheme.js +1 -1
- package/dist/prod/theming/applyTheme.js.map +2 -2
- package/dist/theming/applyTheme.d.ts +2 -0
- package/dist/theming/applyTheme.js +5 -1
- package/dist/theming/applyTheme.js.map +1 -1
- package/package-scripts.cjs +30 -21
- package/package.json +6 -11
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
const VersionInfo = {
|
|
2
|
-
version: "2.15.0-rc.
|
|
2
|
+
version: "2.15.0-rc.3",
|
|
3
3
|
major: 2,
|
|
4
4
|
minor: 15,
|
|
5
5
|
patch: 0,
|
|
6
|
-
suffix: "-rc.
|
|
6
|
+
suffix: "-rc.3",
|
|
7
7
|
isNext: false,
|
|
8
|
-
buildTime:
|
|
8
|
+
buildTime: 1759392542,
|
|
9
9
|
};
|
|
10
10
|
export default VersionInfo;
|
|
11
11
|
//# sourceMappingURL=VersionInfo.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VersionInfo.js","sourceRoot":"","sources":["../../src/generated/VersionInfo.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,GAAG;IACnB,OAAO,EAAE,aAAa;IACtB,KAAK,EAAE,CAAC;IACR,KAAK,EAAE,EAAE;IACT,KAAK,EAAE,CAAC;IACR,MAAM,EAAE,OAAO;IACf,MAAM,EAAE,KAAK;IACb,SAAS,EAAE,UAAU;CACrB,CAAC;AACF,eAAe,WAAW,CAAC","sourcesContent":["const VersionInfo = {\n\tversion: \"2.15.0-rc.
|
|
1
|
+
{"version":3,"file":"VersionInfo.js","sourceRoot":"","sources":["../../src/generated/VersionInfo.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,GAAG;IACnB,OAAO,EAAE,aAAa;IACtB,KAAK,EAAE,CAAC;IACR,KAAK,EAAE,EAAE;IACT,KAAK,EAAE,CAAC;IACR,MAAM,EAAE,OAAO;IACf,MAAM,EAAE,KAAK;IACb,SAAS,EAAE,UAAU;CACrB,CAAC;AACF,eAAe,WAAW,CAAC","sourcesContent":["const VersionInfo = {\n\tversion: \"2.15.0-rc.3\",\n\tmajor: 2,\n\tminor: 15,\n\tpatch: 0,\n\tsuffix: \"-rc.3\",\n\tisNext: false,\n\tbuildTime: 1759392542,\n};\nexport default VersionInfo;"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const e={version:"2.15.0-rc.
|
|
1
|
+
"use strict";const e={version:"2.15.0-rc.3",major:2,minor:15,patch:0,suffix:"-rc.3",isNext:!1,buildTime:1759392542};export default e;
|
|
2
2
|
//# sourceMappingURL=VersionInfo.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/generated/VersionInfo.ts"],
|
|
4
|
-
"sourcesContent": ["const VersionInfo = {\n\tversion: \"2.15.0-rc.
|
|
4
|
+
"sourcesContent": ["const VersionInfo = {\n\tversion: \"2.15.0-rc.3\",\n\tmajor: 2,\n\tminor: 15,\n\tpatch: 0,\n\tsuffix: \"-rc.3\",\n\tisNext: false,\n\tbuildTime: 1759392542,\n};\nexport default VersionInfo;"],
|
|
5
5
|
"mappings": "aAAA,MAAMA,EAAc,CACnB,QAAS,cACT,MAAO,EACP,MAAO,GACP,MAAO,EACP,OAAQ,QACR,OAAQ,GACR,UAAW,UACZ,EACA,eAAeA",
|
|
6
6
|
"names": ["VersionInfo"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";import{getThemeProperties as n,getRegisteredPackages as m,isThemeRegistered as
|
|
1
|
+
"use strict";import{getThemeProperties as n,getRegisteredPackages as m,isThemeRegistered as g}from"../asset-registries/Themes.js";import{removeStyle as d,createOrUpdateStyle as p}from"../ManagedStyles.js";import c from"./getThemeDesignerTheme.js";import{fireThemeLoaded as f}from"./ThemeLoaded.js";import{getFeature as u}from"../FeaturesRegistry.js";import{attachCustomThemeStylesToHead as T,getThemeRoot as h}from"../config/ThemeRoot.js";import{DEFAULT_THEME as l}from"../generated/AssetParameters.js";import{getCurrentRuntimeIndex as y}from"../Runtimes.js";export let _lib="ui5",_package="webcomponents-theming";const s="@"+_lib+"/"+_package,S=()=>m().has(s),P=async e=>{if(!S())return;const t=await n(s,e);t&&p(t,"data-ui5-theme-properties",s,e)},E=()=>{d("data-ui5-theme-properties",s)},U=async(e,t)=>{const o=[...m()].map(async a=>{if(a===s)return;const i=await n(a,e,t);i&&p(i,`data-ui5-component-properties-${y()}`,a)});return Promise.all(o)},k=async e=>{const t=c();if(t)return t;const r=u("OpenUI5Support");if(r&&r.isOpenUI5Detected()){if(r.cssVariablesLoaded())return{themeName:r.getConfigurationSettingsObject()?.theme,baseThemeName:""}}else if(h())return await T(e),c()},w=async e=>{const t=await k(e);!t||e!==t.themeName?await P(e):E();const r=g(e)?e:t&&t.baseThemeName;await U(r||l,t&&t.themeName===e?e:void 0),f(e)};export default w;
|
|
2
2
|
//# sourceMappingURL=applyTheme.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/theming/applyTheme.ts"],
|
|
4
|
-
"sourcesContent": ["import { getThemeProperties, getRegisteredPackages, isThemeRegistered } from \"../asset-registries/Themes.js\";\nimport { removeStyle, createOrUpdateStyle } from \"../ManagedStyles.js\";\nimport getThemeDesignerTheme from \"./getThemeDesignerTheme.js\";\nimport { fireThemeLoaded } from \"./ThemeLoaded.js\";\nimport { getFeature } from \"../FeaturesRegistry.js\";\nimport { attachCustomThemeStylesToHead, getThemeRoot } from \"../config/ThemeRoot.js\";\nimport type OpenUI5Support from \"../features/OpenUI5Support.js\";\nimport { DEFAULT_THEME } from \"../generated/AssetParameters.js\";\nimport { getCurrentRuntimeIndex } from \"../Runtimes.js\";\n\n// eslint-disable-next-line\
|
|
5
|
-
"mappings": "aAAA,OAAS,sBAAAA,EAAoB,yBAAAC,EAAuB,qBAAAC,MAAyB,gCAC7E,OAAS,eAAAC,EAAa,uBAAAC,MAA2B,sBACjD,OAAOC,MAA2B,6BAClC,OAAS,mBAAAC,MAAuB,mBAChC,OAAS,cAAAC,MAAkB,yBAC3B,OAAS,iCAAAC,EAA+B,gBAAAC,MAAoB,yBAE5D,OAAS,iBAAAC,MAAqB,kCAC9B,OAAS,0BAAAC,MAA8B,
|
|
4
|
+
"sourcesContent": ["import { getThemeProperties, getRegisteredPackages, isThemeRegistered } from \"../asset-registries/Themes.js\";\nimport { removeStyle, createOrUpdateStyle } from \"../ManagedStyles.js\";\nimport getThemeDesignerTheme from \"./getThemeDesignerTheme.js\";\nimport { fireThemeLoaded } from \"./ThemeLoaded.js\";\nimport { getFeature } from \"../FeaturesRegistry.js\";\nimport { attachCustomThemeStylesToHead, getThemeRoot } from \"../config/ThemeRoot.js\";\nimport type OpenUI5Support from \"../features/OpenUI5Support.js\";\nimport { DEFAULT_THEME } from \"../generated/AssetParameters.js\";\nimport { getCurrentRuntimeIndex } from \"../Runtimes.js\";\n\n// eslint-disable-next-line\nexport let _lib = \"ui5\";\n// eslint-disable-next-line\nexport let _package = \"webcomponents-theming\";\n// eslint-disable-next-line\nconst BASE_THEME_PACKAGE = \"@\" + _lib + \"/\" + _package;\n\nconst isThemeBaseRegistered = () => {\n\tconst registeredPackages = getRegisteredPackages();\n\treturn registeredPackages.has(BASE_THEME_PACKAGE);\n};\n\nconst loadThemeBase = async (theme: string) => {\n\tif (!isThemeBaseRegistered()) {\n\t\treturn;\n\t}\n\n\tconst cssData = await getThemeProperties(BASE_THEME_PACKAGE, theme);\n\tif (cssData) {\n\t\tcreateOrUpdateStyle(cssData, \"data-ui5-theme-properties\", BASE_THEME_PACKAGE, theme);\n\t}\n};\n\nconst deleteThemeBase = () => {\n\tremoveStyle(\"data-ui5-theme-properties\", BASE_THEME_PACKAGE);\n};\n\nconst loadComponentPackages = async (theme: string, externalThemeName?: string) => {\n\tconst registeredPackages = getRegisteredPackages();\n\n\tconst packagesStylesPromises = [...registeredPackages].map(async packageName => {\n\t\tif (packageName === BASE_THEME_PACKAGE) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst cssData = await getThemeProperties(packageName, theme, externalThemeName);\n\t\tif (cssData) {\n\t\t\tcreateOrUpdateStyle(cssData, `data-ui5-component-properties-${getCurrentRuntimeIndex()}`, packageName);\n\t\t}\n\t});\n\n\treturn Promise.all(packagesStylesPromises);\n};\n\nconst detectExternalTheme = async (theme: string) => {\n\t// If theme designer theme is detected, use this\n\tconst extTheme = getThemeDesignerTheme();\n\tif (extTheme) {\n\t\treturn extTheme;\n\t}\n\n\t// If OpenUI5Support is enabled, try to find out if it loaded variables\n\tconst openUI5Support = getFeature<typeof OpenUI5Support>(\"OpenUI5Support\");\n\tif (openUI5Support && openUI5Support.isOpenUI5Detected()) {\n\t\tconst varsLoaded = openUI5Support.cssVariablesLoaded();\n\t\tif (varsLoaded) {\n\t\t\treturn {\n\t\t\t\tthemeName: openUI5Support.getConfigurationSettingsObject()?.theme, // just themeName\n\t\t\t\tbaseThemeName: \"\", // baseThemeName is only relevant for custom themes\n\t\t\t};\n\t\t}\n\t} else if (getThemeRoot()) {\n\t\tawait attachCustomThemeStylesToHead(theme);\n\n\t\treturn getThemeDesignerTheme();\n\t}\n};\n\nconst applyTheme = async (theme: string) => {\n\tconst extTheme = await detectExternalTheme(theme);\n\n\t// Only load theme_base properties if there is no externally loaded theme, or there is, but it is not being loaded\n\tif (!extTheme || theme !== extTheme.themeName) {\n\t\tawait loadThemeBase(theme);\n\t} else {\n\t\tdeleteThemeBase();\n\t}\n\n\t// Always load component packages properties. For non-registered themes, try with the base theme, if any\n\tconst packagesTheme = isThemeRegistered(theme) ? theme : extTheme && extTheme.baseThemeName;\n\tawait loadComponentPackages(packagesTheme || DEFAULT_THEME, extTheme && extTheme.themeName === theme ? theme : undefined);\n\n\tfireThemeLoaded(theme);\n};\n\nexport default applyTheme;\n"],
|
|
5
|
+
"mappings": "aAAA,OAAS,sBAAAA,EAAoB,yBAAAC,EAAuB,qBAAAC,MAAyB,gCAC7E,OAAS,eAAAC,EAAa,uBAAAC,MAA2B,sBACjD,OAAOC,MAA2B,6BAClC,OAAS,mBAAAC,MAAuB,mBAChC,OAAS,cAAAC,MAAkB,yBAC3B,OAAS,iCAAAC,EAA+B,gBAAAC,MAAoB,yBAE5D,OAAS,iBAAAC,MAAqB,kCAC9B,OAAS,0BAAAC,MAA8B,iBAGhC,WAAI,KAAO,MAEP,SAAW,wBAEtB,MAAMC,EAAqB,IAAM,KAAO,IAAM,SAExCC,EAAwB,IACFZ,EAAsB,EACvB,IAAIW,CAAkB,EAG3CE,EAAgB,MAAOC,GAAkB,CAC9C,GAAI,CAACF,EAAsB,EAC1B,OAGD,MAAMG,EAAU,MAAMhB,EAAmBY,EAAoBG,CAAK,EAC9DC,GACHZ,EAAoBY,EAAS,4BAA6BJ,EAAoBG,CAAK,CAErF,EAEME,EAAkB,IAAM,CAC7Bd,EAAY,4BAA6BS,CAAkB,CAC5D,EAEMM,EAAwB,MAAOH,EAAeI,IAA+B,CAGlF,MAAMC,EAAyB,CAAC,GAFLnB,EAAsB,CAEI,EAAE,IAAI,MAAMoB,GAAe,CAC/E,GAAIA,IAAgBT,EACnB,OAGD,MAAMI,EAAU,MAAMhB,EAAmBqB,EAAaN,EAAOI,CAAiB,EAC1EH,GACHZ,EAAoBY,EAAS,iCAAiCL,EAAuB,CAAC,GAAIU,CAAW,CAEvG,CAAC,EAED,OAAO,QAAQ,IAAID,CAAsB,CAC1C,EAEME,EAAsB,MAAOP,GAAkB,CAEpD,MAAMQ,EAAWlB,EAAsB,EACvC,GAAIkB,EACH,OAAOA,EAIR,MAAMC,EAAiBjB,EAAkC,gBAAgB,EACzE,GAAIiB,GAAkBA,EAAe,kBAAkB,GAEtD,GADmBA,EAAe,mBAAmB,EAEpD,MAAO,CACN,UAAWA,EAAe,+BAA+B,GAAG,MAC5D,cAAe,EAChB,UAESf,EAAa,EACvB,aAAMD,EAA8BO,CAAK,EAElCV,EAAsB,CAE/B,EAEMoB,EAAa,MAAOV,GAAkB,CAC3C,MAAMQ,EAAW,MAAMD,EAAoBP,CAAK,EAG5C,CAACQ,GAAYR,IAAUQ,EAAS,UACnC,MAAMT,EAAcC,CAAK,EAEzBE,EAAgB,EAIjB,MAAMS,EAAgBxB,EAAkBa,CAAK,EAAIA,EAAQQ,GAAYA,EAAS,cAC9E,MAAML,EAAsBQ,GAAiBhB,EAAea,GAAYA,EAAS,YAAcR,EAAQA,EAAQ,MAAS,EAExHT,EAAgBS,CAAK,CACtB,EAEA,eAAeU",
|
|
6
6
|
"names": ["getThemeProperties", "getRegisteredPackages", "isThemeRegistered", "removeStyle", "createOrUpdateStyle", "getThemeDesignerTheme", "fireThemeLoaded", "getFeature", "attachCustomThemeStylesToHead", "getThemeRoot", "DEFAULT_THEME", "getCurrentRuntimeIndex", "BASE_THEME_PACKAGE", "isThemeBaseRegistered", "loadThemeBase", "theme", "cssData", "deleteThemeBase", "loadComponentPackages", "externalThemeName", "packagesStylesPromises", "packageName", "detectExternalTheme", "extTheme", "openUI5Support", "applyTheme", "packagesTheme"]
|
|
7
7
|
}
|
|
@@ -7,7 +7,11 @@ import { attachCustomThemeStylesToHead, getThemeRoot } from "../config/ThemeRoot
|
|
|
7
7
|
import { DEFAULT_THEME } from "../generated/AssetParameters.js";
|
|
8
8
|
import { getCurrentRuntimeIndex } from "../Runtimes.js";
|
|
9
9
|
// eslint-disable-next-line
|
|
10
|
-
|
|
10
|
+
export let _lib = "ui5";
|
|
11
|
+
// eslint-disable-next-line
|
|
12
|
+
export let _package = "webcomponents-theming";
|
|
13
|
+
// eslint-disable-next-line
|
|
14
|
+
const BASE_THEME_PACKAGE = "@" + _lib + "/" + _package;
|
|
11
15
|
const isThemeBaseRegistered = () => {
|
|
12
16
|
const registeredPackages = getRegisteredPackages();
|
|
13
17
|
return registeredPackages.has(BASE_THEME_PACKAGE);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"applyTheme.js","sourceRoot":"","sources":["../../src/theming/applyTheme.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAC7G,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AACvE,OAAO,qBAAqB,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,6BAA6B,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAErF,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAChE,OAAO,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AAExD,2BAA2B;AAC3B,MAAM,kBAAkB,GAAG,GAAG,GAAG,
|
|
1
|
+
{"version":3,"file":"applyTheme.js","sourceRoot":"","sources":["../../src/theming/applyTheme.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAC7G,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AACvE,OAAO,qBAAqB,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,6BAA6B,EAAE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CAAC,SAAS,EAAE,CAAC;QAC/C,MAAM,aAAa,CAAC,KAAK,CAAC,CAAC;IAC5B,CAAC;SAAM,CAAC;QACP,eAAe,EAAE,CAAC;IACnB,CAAC;IAED,wGAAwG;IACxG,MAAM,aAAa,GAAG,iBAAiB,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,QAAQ,IAAI,QAAQ,CAAC,aAAa,CAAC;IAC5F,MAAM,qBAAqB,CAAC,aAAa,IAAI,aAAa,EAAE,QAAQ,IAAI,QAAQ,CAAC,SAAS,KAAK,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;IAE1H,eAAe,CAAC,KAAK,CAAC,CAAC;AACxB,CAAC,CAAC;AAEF,eAAe,UAAU,CAAC","sourcesContent":["import { getThemeProperties, getRegisteredPackages, isThemeRegistered } from \"../asset-registries/Themes.js\";\nimport { removeStyle, createOrUpdateStyle } from \"../ManagedStyles.js\";\nimport getThemeDesignerTheme from \"./getThemeDesignerTheme.js\";\nimport { fireThemeLoaded } from \"./ThemeLoaded.js\";\nimport { getFeature } from \"../FeaturesRegistry.js\";\nimport { attachCustomThemeStylesToHead, getThemeRoot } from \"../config/ThemeRoot.js\";\nimport type OpenUI5Support from \"../features/OpenUI5Support.js\";\nimport { DEFAULT_THEME } from \"../generated/AssetParameters.js\";\nimport { getCurrentRuntimeIndex } from \"../Runtimes.js\";\n\n// eslint-disable-next-line\nexport let _lib = \"ui5\";\n// eslint-disable-next-line\nexport let _package = \"webcomponents-theming\";\n// eslint-disable-next-line\nconst BASE_THEME_PACKAGE = \"@\" + _lib + \"/\" + _package;\n\nconst isThemeBaseRegistered = () => {\n\tconst registeredPackages = getRegisteredPackages();\n\treturn registeredPackages.has(BASE_THEME_PACKAGE);\n};\n\nconst loadThemeBase = async (theme: string) => {\n\tif (!isThemeBaseRegistered()) {\n\t\treturn;\n\t}\n\n\tconst cssData = await getThemeProperties(BASE_THEME_PACKAGE, theme);\n\tif (cssData) {\n\t\tcreateOrUpdateStyle(cssData, \"data-ui5-theme-properties\", BASE_THEME_PACKAGE, theme);\n\t}\n};\n\nconst deleteThemeBase = () => {\n\tremoveStyle(\"data-ui5-theme-properties\", BASE_THEME_PACKAGE);\n};\n\nconst loadComponentPackages = async (theme: string, externalThemeName?: string) => {\n\tconst registeredPackages = getRegisteredPackages();\n\n\tconst packagesStylesPromises = [...registeredPackages].map(async packageName => {\n\t\tif (packageName === BASE_THEME_PACKAGE) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst cssData = await getThemeProperties(packageName, theme, externalThemeName);\n\t\tif (cssData) {\n\t\t\tcreateOrUpdateStyle(cssData, `data-ui5-component-properties-${getCurrentRuntimeIndex()}`, packageName);\n\t\t}\n\t});\n\n\treturn Promise.all(packagesStylesPromises);\n};\n\nconst detectExternalTheme = async (theme: string) => {\n\t// If theme designer theme is detected, use this\n\tconst extTheme = getThemeDesignerTheme();\n\tif (extTheme) {\n\t\treturn extTheme;\n\t}\n\n\t// If OpenUI5Support is enabled, try to find out if it loaded variables\n\tconst openUI5Support = getFeature<typeof OpenUI5Support>(\"OpenUI5Support\");\n\tif (openUI5Support && openUI5Support.isOpenUI5Detected()) {\n\t\tconst varsLoaded = openUI5Support.cssVariablesLoaded();\n\t\tif (varsLoaded) {\n\t\t\treturn {\n\t\t\t\tthemeName: openUI5Support.getConfigurationSettingsObject()?.theme, // just themeName\n\t\t\t\tbaseThemeName: \"\", // baseThemeName is only relevant for custom themes\n\t\t\t};\n\t\t}\n\t} else if (getThemeRoot()) {\n\t\tawait attachCustomThemeStylesToHead(theme);\n\n\t\treturn getThemeDesignerTheme();\n\t}\n};\n\nconst applyTheme = async (theme: string) => {\n\tconst extTheme = await detectExternalTheme(theme);\n\n\t// Only load theme_base properties if there is no externally loaded theme, or there is, but it is not being loaded\n\tif (!extTheme || theme !== extTheme.themeName) {\n\t\tawait loadThemeBase(theme);\n\t} else {\n\t\tdeleteThemeBase();\n\t}\n\n\t// Always load component packages properties. For non-registered themes, try with the base theme, if any\n\tconst packagesTheme = isThemeRegistered(theme) ? theme : extTheme && extTheme.baseThemeName;\n\tawait loadComponentPackages(packagesTheme || DEFAULT_THEME, extTheme && extTheme.themeName === theme ? theme : undefined);\n\n\tfireThemeLoaded(theme);\n};\n\nexport default applyTheme;\n"]}
|
package/package-scripts.cjs
CHANGED
|
@@ -15,23 +15,27 @@ const viteConfig = `-c "${require.resolve("@ui5/webcomponents-tools/components-p
|
|
|
15
15
|
|
|
16
16
|
const scripts = {
|
|
17
17
|
__ui5envs: {
|
|
18
|
-
UI5_TS: true,
|
|
18
|
+
UI5_TS: "true",
|
|
19
19
|
UI5_BASE: true,
|
|
20
20
|
UI5_CEM_MODE: "dev",
|
|
21
21
|
},
|
|
22
|
-
clean:
|
|
22
|
+
clean: {
|
|
23
|
+
default: "ui5nps clean.generated clean.dist",
|
|
24
|
+
"generated": `ui5nps-script "${LIB}/rimraf/rimraf.js src/generated`,
|
|
25
|
+
"dist": `ui5nps-script "${LIB}/rimraf/rimraf.js dist`,
|
|
26
|
+
},
|
|
23
27
|
lint: `eslint .`,
|
|
24
28
|
generate: "ui5nps clean build.i18n integrate copy generateAssetParameters generateVersionInfo generateStyles generateFontFace build.jsonImports",
|
|
25
29
|
prepare: "ui5nps clean build.i18n integrate copy generateAssetParameters generateVersionInfo generateStyles generateFontFace typescript integrate.no-remaining-require build.jsonImports",
|
|
26
30
|
typescript: "tsc -b",
|
|
27
31
|
integrate: {
|
|
28
32
|
default: "ui5nps integrate.copy-used-modules integrate.amd-to-es6 integrate.third-party",
|
|
29
|
-
"copy-used-modules": `
|
|
30
|
-
"amd-to-es6": `
|
|
31
|
-
"no-remaining-require": `
|
|
33
|
+
"copy-used-modules": `ui5nps-script "${copyUsedModules}" ./used-modules.txt dist/`,
|
|
34
|
+
"amd-to-es6": `ui5nps-script "${amdToES6}" dist/`,
|
|
35
|
+
"no-remaining-require": `ui5nps-script "${noRequire}" dist/`,
|
|
32
36
|
"third-party": {
|
|
33
37
|
default: "ui5nps integrate.third-party.copy integrate.third-party.fix",
|
|
34
|
-
copy: "copy-and-watch ../../node_modules/@openui5/sap.ui.core/src/sap/ui/thirdparty/caja-html-sanitizer.js dist/sap/ui/thirdparty
|
|
38
|
+
copy: `ui5nps-script "${LIB}copy-and-watch/index.js" ../../node_modules/@openui5/sap.ui.core/src/sap/ui/thirdparty/caja-html-sanitizer.js dist/sap/ui/thirdparty/`,
|
|
35
39
|
fix: "replace-in-file 240 xA0 dist/sap/ui/thirdparty/caja-html-sanitizer.js"
|
|
36
40
|
},
|
|
37
41
|
},
|
|
@@ -40,39 +44,44 @@ const scripts = {
|
|
|
40
44
|
bundle: `vite build ${viteConfig}`,
|
|
41
45
|
i18n: {
|
|
42
46
|
default: "ui5nps build.i18n.defaultsjs build.i18n.json",
|
|
43
|
-
defaultsjs: `
|
|
44
|
-
json: `
|
|
47
|
+
defaultsjs: `ui5nps-script "${LIB}/i18n/defaults.js" src/i18n src/generated/i18n`,
|
|
48
|
+
json: `ui5nps-script "${LIB}/i18n/toJSON.js" src/i18n dist/generated/assets/i18n`,
|
|
45
49
|
},
|
|
46
50
|
jsonImports: {
|
|
47
51
|
default: "ui5nps build.jsonImports.i18n",
|
|
48
|
-
i18n: `
|
|
52
|
+
i18n: `ui5nps-script "${LIB}/generate-json-imports/i18n.js" dist/generated/assets/i18n src/generated/json-imports`,
|
|
49
53
|
},
|
|
50
54
|
},
|
|
51
55
|
copy: {
|
|
52
56
|
default: "ui5nps copy.src",
|
|
53
|
-
src: `copy-and-watch "src/**/*.{js,css,d.ts}" dist/`,
|
|
54
|
-
srcWithWatch: `copy-and-watch "src/**/*.{js,css,d.ts}" dist/ --watch --skip-initial-copy`,
|
|
57
|
+
src: `ui5nps-script "${LIB}copy-and-watch/index.js" "src/**/*.{js,css,d.ts}" dist/`,
|
|
58
|
+
srcWithWatch: `ui5nps-script "${LIB}copy-and-watch/index.js" "src/**/*.{js,css,d.ts}" dist/ --watch --skip-initial-copy`,
|
|
55
59
|
},
|
|
56
|
-
generateAssetParameters: `
|
|
57
|
-
generateVersionInfo: `
|
|
58
|
-
generateStyles: `
|
|
59
|
-
generateFontFace: `
|
|
60
|
+
generateAssetParameters: `ui5nps-script "${assetParametersScript}"`,
|
|
61
|
+
generateVersionInfo: `ui5nps-script "${versionScript}"`,
|
|
62
|
+
generateStyles: `ui5nps-script "${stylesScript}"`,
|
|
63
|
+
generateFontFace: `ui5nps-script "${fontFaceScript}"`,
|
|
60
64
|
generateTestTemplates: `node "${LIB}/hbs2ui5/index.js" -d test/test-elements -o test/test-elements/generated/templates`,
|
|
61
65
|
generateProd: {
|
|
62
66
|
"default": "ui5nps generateProd.remove-dev-mode generateProd.copy-prod",
|
|
63
|
-
"remove-dev-mode": `
|
|
64
|
-
"copy-prod":
|
|
65
|
-
|
|
67
|
+
"remove-dev-mode": `ui5nps-script "${LIB}/remove-dev-mode/remove-dev-mode.mjs"`,
|
|
68
|
+
"copy-prod": {
|
|
69
|
+
default: "ui5nps-p generateProd.copy-prod.ui5 generateProd.copy-prod.preact generateProd.copy-prod.assets",
|
|
70
|
+
"ui5": `ui5nps-script "${LIB}copy-and-watch/index.js" "dist/sap/**/*" dist/prod/sap/`,
|
|
71
|
+
"preact": `ui5nps-script "${LIB}copy-and-watch/index.js" "dist/thirdparty/preact/**/*.js" dist/prod/thirdparty/preact/`,
|
|
72
|
+
"assets": `ui5nps-script "${LIB}copy-and-watch/index.js" "dist/generated/assets/**/*.json" dist/prod/generated/assets/`,
|
|
73
|
+
}
|
|
74
|
+
},
|
|
66
75
|
generateAPI: {
|
|
67
76
|
default: "ui5nps generateAPI.generateCEM generateAPI.validateCEM",
|
|
68
|
-
generateCEM: `cem analyze --config "${LIB}
|
|
69
|
-
validateCEM: `
|
|
77
|
+
generateCEM: `ui5nps-script "${LIB}/cem/cem.js" analyze --config "${LIB}cem/custom-elements-manifest.config.mjs"`,
|
|
78
|
+
validateCEM: `ui5nps-script "${LIB}/cem/validate.js"`,
|
|
70
79
|
},
|
|
71
80
|
watch: {
|
|
72
81
|
default: 'ui5nps-p watch.src watch.styles', // concurently
|
|
73
82
|
withBundle: 'ui5nps-p watch.src watch.bundle watch.styles', // concurently
|
|
74
83
|
src: 'ui5nps copy.srcWithWatch',
|
|
75
|
-
bundle: `
|
|
84
|
+
bundle: `ui5nps-script ${LIB}/dev-server/dev-server.mjs ${viteConfig}`,
|
|
76
85
|
styles: 'chokidar "src/css/*.css" -c "ui5nps generateStyles"'
|
|
77
86
|
},
|
|
78
87
|
test: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ui5/webcomponents-base",
|
|
3
|
-
"version": "2.15.0-rc.
|
|
3
|
+
"version": "2.15.0-rc.3",
|
|
4
4
|
"description": "UI5 Web Components: webcomponents.base",
|
|
5
5
|
"author": "SAP SE (https://www.sap.com)",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -61,27 +61,22 @@
|
|
|
61
61
|
"lit-html": "^2.0.1"
|
|
62
62
|
},
|
|
63
63
|
"devDependencies": {
|
|
64
|
-
"@custom-elements-manifest/analyzer": "
|
|
64
|
+
"@custom-elements-manifest/analyzer": "patch:@custom-elements-manifest/analyzer@npm%3A0.10.6#~/.yarn/patches/@custom-elements-manifest-analyzer-npm-0.10.6-9b5ff0c50b.patch",
|
|
65
65
|
"@openui5/sap.ui.core": "1.120.17",
|
|
66
66
|
"@sap-theming/theming-base-content": "11.29.3",
|
|
67
|
-
"@ui5/cypress-internal": "0.
|
|
68
|
-
"@ui5/webcomponents-tools": "2.15.0-rc.
|
|
67
|
+
"@ui5/cypress-internal": "0.1.0",
|
|
68
|
+
"@ui5/webcomponents-tools": "2.15.0-rc.3",
|
|
69
69
|
"clean-css": "^5.2.2",
|
|
70
|
-
"
|
|
71
|
-
"copy-and-watch": "^0.1.5",
|
|
72
|
-
"cross-env": "^7.0.3",
|
|
73
|
-
"cypress": "^13.0.0",
|
|
70
|
+
"cypress": "^15.3.0",
|
|
74
71
|
"eslint": "^7.22.0",
|
|
75
72
|
"mkdirp": "^1.0.4",
|
|
76
73
|
"mocha": "^11.7.2",
|
|
77
|
-
"nps": "^5.10.0",
|
|
78
74
|
"replace-in-file": "^6.3.5",
|
|
79
75
|
"resolve": "^1.20.0",
|
|
80
|
-
"rimraf": "^6.0.1",
|
|
81
76
|
"touch": "^3.1.0",
|
|
82
77
|
"typescript": "^5.6.2",
|
|
83
78
|
"vite": "5.4.8"
|
|
84
79
|
},
|
|
85
80
|
"customElements": "dist/custom-elements.json",
|
|
86
|
-
"gitHead": "
|
|
81
|
+
"gitHead": "be8dc39a71bc2df6b14528e50a243ce48c9015c5"
|
|
87
82
|
}
|