@ui5/webcomponents-base 2.27.0-rc.1 → 2.27.0-rc.2

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.
@@ -1,7 +1,6 @@
1
1
  import { getTheme as getConfiguredTheme } from "../InitialConfiguration.js";
2
2
  import { reRenderAllUI5Elements } from "../Render.js";
3
3
  import applyTheme from "../theming/applyTheme.js";
4
- import getThemeDesignerTheme from "../theming/getThemeDesignerTheme.js";
5
4
  import { DEFAULT_THEME, SUPPORTED_THEMES } from "../generated/AssetParameters.js";
6
5
  import { boot, isBooted } from "../Boot.js";
7
6
  import { attachConfigurationReset } from "./ConfigurationReset.js";
@@ -76,7 +75,7 @@ const isTheme = (theme) => {
76
75
  const isLegacyThemeFamily = () => {
77
76
  const currentTheme = getTheme();
78
77
  if (!isKnownTheme(currentTheme)) {
79
- return !getThemeDesignerTheme()?.baseThemeName?.startsWith("sap_horizon");
78
+ return !getBaseTheme()?.startsWith("sap_horizon");
80
79
  }
81
80
  return !currentTheme.startsWith("sap_horizon");
82
81
  };
@@ -1 +1 @@
1
- {"version":3,"file":"Theme.js","sourceRoot":"","sources":["../../src/config/Theme.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,IAAI,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAC5E,OAAO,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AACtD,OAAO,UAAU,MAAM,0BAA0B,CAAC;AAClD,OAAO,qBAAqB,MAAM,qCAAqC,CAAC;AACxE,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAClF,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AACnE,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAE9F,IAAI,QAA4B,C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E,KAAK,KAAK,CAAC;AAC7B,CAAC,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,mBAAmB,GAAG,GAAG,EAAE;IAChC,MAAM,YAAY,GAAG,QAAQ,EAAE,CAAC;IAEhC,IAAI,CAAC,YAAY,CAAC,YAAY,CAAC,EAAE,CAAC;QACjC,OAAO,CAAC,qBAAqB,EAAE,EAAE,aAAa,EAAE,UAAU,CAAC,aAAa,CAAC,CAAC;IAC3E,CAAC;IAED,OAAO,CAAC,YAAY,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;AAChD,CAAC,CAAC;AAEF,MAAM,wBAAwB,GAAG,KAAK,IAAI,EAAE;IAC3C,MAAM,IAAI,EAAE,CAAC;IACb,OAAO,mBAAmB,EAAE,CAAC;AAC9B,CAAC,CAAC;AAEF,MAAM,YAAY,GAAG,CAAC,KAAa,EAAE,EAAE,CAAC,gBAAgB,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AAEzE;;;;GAIG;AACH,MAAM,YAAY,GAAG,GAAuB,EAAE;IAC7C,OAAO,YAAY,CAAC;AACrB,CAAC,CAAC;AAEF;;;;GAIG;AACH,MAAM,YAAY,GAAG,CAAC,KAAyB,EAAQ,EAAE;IACxD,YAAY,GAAG,KAAK,CAAC;AACtB,CAAC,CAAC;AAEF,OAAO,EACN,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,mBAAmB,EACnB,wBAAwB,EACxB,eAAe,EACf,YAAY,EACZ,YAAY,GACZ,CAAC","sourcesContent":["import { getTheme as getConfiguredTheme } from \"../InitialConfiguration.js\";\nimport { reRenderAllUI5Elements } from \"../Render.js\";\nimport applyTheme from \"../theming/applyTheme.js\";\nimport getThemeDesignerTheme from \"../theming/getThemeDesignerTheme.js\";\nimport { DEFAULT_THEME, SUPPORTED_THEMES } from \"../generated/AssetParameters.js\";\nimport { boot, isBooted } from \"../Boot.js\";\nimport { attachConfigurationReset } from \"./ConfigurationReset.js\";\nimport { fireConfigChange, attachConfigChange, getSharedValue } from \"./ConfigurationSync.js\";\n\nlet curTheme: string | undefined;\nlet curBaseTheme: string | undefined;\n\nattachConfigurationReset(() => {\n\tcurTheme = undefined;\n});\n\nattachConfigChange(\"theme\", (theme: string) => {\n\tcurTheme = theme;\n\tif (isBooted()) {\n\t\tapplyTheme(curTheme).then(() => reRenderAllUI5Elements({ themeAware: true }));\n\t}\n});\n\n/**\n * Returns the current theme.\n * @public\n * @returns {string} the current theme name\n */\nconst getTheme = (): string => {\n\tif (curTheme === undefined) {\n\t\tcurTheme = getSharedValue<string>(\"theme\") ?? getConfiguredTheme();\n\t}\n\n\treturn curTheme;\n};\n\n/**\n * Applies a new theme after fetching its assets from the network.\n * @public\n * @param {string} theme the name of the new theme\n * @returns {Promise<void>} a promise that is resolved when the new theme assets have been fetched and applied to the DOM\n */\nconst setTheme = async (theme: string): Promise<void> => {\n\tif (curTheme === theme) {\n\t\treturn;\n\t}\n\n\tcurTheme = theme;\n\n\tfireConfigChange(\"theme\", theme);\n\n\tif (isBooted()) {\n\t\t// Update CSS Custom Properties\n\t\tawait applyTheme(curTheme);\n\t\tawait reRenderAllUI5Elements({ themeAware: true });\n\t}\n};\n\n/**\n * Returns the default theme.\n *\n * Note: Default theme might be different than the configurated one.\n *\n * @public\n * @returns {string}\n */\nconst getDefaultTheme = (): string => {\n\treturn DEFAULT_THEME;\n};\n\n/**\n * Returns if the given theme name is the one currently applied.\n * @private\n * @param {string} theme\n * @returns {boolean}\n */\nconst isTheme = (theme: string) => {\n\treturn getTheme() === theme;\n};\n\n/**\n * Returns if the currently set theme is part of legacy theme families (\"sap_fiori_3\").\n * **Note**: in addition, the method checks the base theme of a custom theme, built via the ThemeDesigner.\n *\n * @private\n * @returns { boolean }\n */\nconst isLegacyThemeFamily = () => {\n\tconst currentTheme = getTheme();\n\n\tif (!isKnownTheme(currentTheme)) {\n\t\treturn !getThemeDesignerTheme()?.baseThemeName?.startsWith(\"sap_horizon\");\n\t}\n\n\treturn !currentTheme.startsWith(\"sap_horizon\");\n};\n\nconst isLegacyThemeFamilyAsync = async () => {\n\tawait boot();\n\treturn isLegacyThemeFamily();\n};\n\nconst isKnownTheme = (theme: string) => SUPPORTED_THEMES.includes(theme);\n\n/**\n * Returns the base theme of external theme.\n * @private\n * @returns {string | undefined} the base theme name\n */\nconst getBaseTheme = (): string | undefined => {\n\treturn curBaseTheme;\n};\n\n/**\n * Sets the base theme of the current external theme.\n * @param { string | undefined } theme the name of the new base theme\n * @private\n */\nconst setBaseTheme = (theme: string | undefined): void => {\n\tcurBaseTheme = theme;\n};\n\nexport {\n\tgetTheme,\n\tsetTheme,\n\tisTheme,\n\tisLegacyThemeFamily,\n\tisLegacyThemeFamilyAsync,\n\tgetDefaultTheme,\n\tgetBaseTheme,\n\tsetBaseTheme,\n};\n"]}
1
+ {"version":3,"file":"Theme.js","sourceRoot":"","sources":["../../src/config/Theme.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,IAAI,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAC5E,OAAO,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AACtD,OAAO,UAAU,MAAM,0BAA0B,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAClF,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AACnE,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAE9F,IAAI,QAA4B,CAAC;AACjC,IAAI,YAAgC,CAAC;AAErC,wBAAwB,CAAC,GAAG,EAAE;IAC7B,QAAQ,GAAG,SAAS,CAAC;AACtB,CAAC,CAAC,CAAC;AAEH,kBAAkB,CAAC,OAAO,EAAE,CAAC,KAAa,EAAE,EAAE;IAC7C,QAAQ,GAAG,KAAK,CAAC;IACjB,IAAI,QAAQ,EAAE,EA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CAAC,aAAa,CAAC,CAAC;IACnD,CAAC;IAED,OAAO,CAAC,YAAY,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;AAChD,CAAC,CAAC;AAEF,MAAM,wBAAwB,GAAG,KAAK,IAAI,EAAE;IAC3C,MAAM,IAAI,EAAE,CAAC;IACb,OAAO,mBAAmB,EAAE,CAAC;AAC9B,CAAC,CAAC;AAEF,MAAM,YAAY,GAAG,CAAC,KAAa,EAAE,EAAE,CAAC,gBAAgB,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AAEzE;;;;GAIG;AACH,MAAM,YAAY,GAAG,GAAuB,EAAE;IAC7C,OAAO,YAAY,CAAC;AACrB,CAAC,CAAC;AAEF;;;;GAIG;AACH,MAAM,YAAY,GAAG,CAAC,KAAyB,EAAQ,EAAE;IACxD,YAAY,GAAG,KAAK,CAAC;AACtB,CAAC,CAAC;AAEF,OAAO,EACN,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,mBAAmB,EACnB,wBAAwB,EACxB,eAAe,EACf,YAAY,EACZ,YAAY,GACZ,CAAC","sourcesContent":["import { getTheme as getConfiguredTheme } from \"../InitialConfiguration.js\";\nimport { reRenderAllUI5Elements } from \"../Render.js\";\nimport applyTheme from \"../theming/applyTheme.js\";\nimport { DEFAULT_THEME, SUPPORTED_THEMES } from \"../generated/AssetParameters.js\";\nimport { boot, isBooted } from \"../Boot.js\";\nimport { attachConfigurationReset } from \"./ConfigurationReset.js\";\nimport { fireConfigChange, attachConfigChange, getSharedValue } from \"./ConfigurationSync.js\";\n\nlet curTheme: string | undefined;\nlet curBaseTheme: string | undefined;\n\nattachConfigurationReset(() => {\n\tcurTheme = undefined;\n});\n\nattachConfigChange(\"theme\", (theme: string) => {\n\tcurTheme = theme;\n\tif (isBooted()) {\n\t\tapplyTheme(curTheme).then(() => reRenderAllUI5Elements({ themeAware: true }));\n\t}\n});\n\n/**\n * Returns the current theme.\n * @public\n * @returns {string} the current theme name\n */\nconst getTheme = (): string => {\n\tif (curTheme === undefined) {\n\t\tcurTheme = getSharedValue<string>(\"theme\") ?? getConfiguredTheme();\n\t}\n\n\treturn curTheme;\n};\n\n/**\n * Applies a new theme after fetching its assets from the network.\n * @public\n * @param {string} theme the name of the new theme\n * @returns {Promise<void>} a promise that is resolved when the new theme assets have been fetched and applied to the DOM\n */\nconst setTheme = async (theme: string): Promise<void> => {\n\tif (curTheme === theme) {\n\t\treturn;\n\t}\n\n\tcurTheme = theme;\n\n\tfireConfigChange(\"theme\", theme);\n\n\tif (isBooted()) {\n\t\t// Update CSS Custom Properties\n\t\tawait applyTheme(curTheme);\n\t\tawait reRenderAllUI5Elements({ themeAware: true });\n\t}\n};\n\n/**\n * Returns the default theme.\n *\n * Note: Default theme might be different than the configurated one.\n *\n * @public\n * @returns {string}\n */\nconst getDefaultTheme = (): string => {\n\treturn DEFAULT_THEME;\n};\n\n/**\n * Returns if the given theme name is the one currently applied.\n * @private\n * @param {string} theme\n * @returns {boolean}\n */\nconst isTheme = (theme: string) => {\n\treturn getTheme() === theme;\n};\n\n/**\n * Returns if the currently set theme is part of legacy theme families (\"sap_fiori_3\").\n * **Note**: in addition, the method checks the base theme of a custom theme, built via the ThemeDesigner.\n *\n * @private\n * @returns { boolean }\n */\nconst isLegacyThemeFamily = () => {\n\tconst currentTheme = getTheme();\n\n\tif (!isKnownTheme(currentTheme)) {\n\t\treturn !getBaseTheme()?.startsWith(\"sap_horizon\");\n\t}\n\n\treturn !currentTheme.startsWith(\"sap_horizon\");\n};\n\nconst isLegacyThemeFamilyAsync = async () => {\n\tawait boot();\n\treturn isLegacyThemeFamily();\n};\n\nconst isKnownTheme = (theme: string) => SUPPORTED_THEMES.includes(theme);\n\n/**\n * Returns the base theme of external theme.\n * @private\n * @returns {string | undefined} the base theme name\n */\nconst getBaseTheme = (): string | undefined => {\n\treturn curBaseTheme;\n};\n\n/**\n * Sets the base theme of the current external theme.\n * @param { string | undefined } theme the name of the new base theme\n * @private\n */\nconst setBaseTheme = (theme: string | undefined): void => {\n\tcurBaseTheme = theme;\n};\n\nexport {\n\tgetTheme,\n\tsetTheme,\n\tisTheme,\n\tisLegacyThemeFamily,\n\tisLegacyThemeFamilyAsync,\n\tgetDefaultTheme,\n\tgetBaseTheme,\n\tsetBaseTheme,\n};\n"]}
@@ -1,11 +1,11 @@
1
1
  const VersionInfo = {
2
- version: "2.27.0-rc.1",
2
+ version: "2.27.0-rc.2",
3
3
  major: 2,
4
4
  minor: 27,
5
5
  patch: 0,
6
- suffix: "-rc.1",
6
+ suffix: "-rc.2",
7
7
  isNext: false,
8
- buildTime: 1788441047,
8
+ buildTime: 1789632712,
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.27.0-rc.1\",\n\tmajor: 2,\n\tminor: 27,\n\tpatch: 0,\n\tsuffix: \"-rc.1\",\n\tisNext: false,\n\tbuildTime: 1788441047,\n};\nexport default VersionInfo;"]}
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.27.0-rc.2\",\n\tmajor: 2,\n\tminor: 27,\n\tpatch: 0,\n\tsuffix: \"-rc.2\",\n\tisNext: false,\n\tbuildTime: 1789632712,\n};\nexport default VersionInfo;"]}
@@ -1,2 +1,2 @@
1
- "use strict";import{getTheme as a}from"../InitialConfiguration.js";import{reRenderAllUI5Elements as n}from"../Render.js";import i from"../theming/applyTheme.js";import h from"../theming/getThemeDesignerTheme.js";import{DEFAULT_THEME as g,SUPPORTED_THEMES as f}from"../generated/AssetParameters.js";import{boot as u,isBooted as s}from"../Boot.js";import{attachConfigurationReset as T}from"./ConfigurationReset.js";import{fireConfigChange as c,attachConfigChange as d,getSharedValue as p}from"./ConfigurationSync.js";let t,o;T(()=>{t=void 0}),d("theme",e=>{t=e,s()&&i(t).then(()=>n({themeAware:!0}))});const r=()=>(t===void 0&&(t=p("theme")??a()),t),l=async e=>{t!==e&&(t=e,c("theme",e),s()&&(await i(t),await n({themeAware:!0})))},y=()=>g,E=e=>r()===e,m=()=>{const e=r();return C(e)?!e.startsWith("sap_horizon"):!h()?.baseThemeName?.startsWith("sap_horizon")},w=async()=>(await u(),m()),C=e=>f.includes(e),A=()=>o,B=e=>{o=e};export{r as getTheme,l as setTheme,E as isTheme,m as isLegacyThemeFamily,w as isLegacyThemeFamilyAsync,y as getDefaultTheme,A as getBaseTheme,B as setBaseTheme};
1
+ "use strict";import{getTheme as h}from"../InitialConfiguration.js";import{reRenderAllUI5Elements as n}from"../Render.js";import i from"../theming/applyTheme.js";import{DEFAULT_THEME as g,SUPPORTED_THEMES as f}from"../generated/AssetParameters.js";import{boot as u,isBooted as s}from"../Boot.js";import{attachConfigurationReset as c}from"./ConfigurationReset.js";import{fireConfigChange as d,attachConfigChange as T,getSharedValue as p}from"./ConfigurationSync.js";let t,o;c(()=>{t=void 0}),T("theme",e=>{t=e,s()&&i(t).then(()=>n({themeAware:!0}))});const r=()=>(t===void 0&&(t=p("theme")??h()),t),l=async e=>{t!==e&&(t=e,d("theme",e),s()&&(await i(t),await n({themeAware:!0})))},y=()=>g,E=e=>r()===e,m=()=>{const e=r();return C(e)?!e.startsWith("sap_horizon"):!a()?.startsWith("sap_horizon")},w=async()=>(await u(),m()),C=e=>f.includes(e),a=()=>o,A=e=>{o=e};export{r as getTheme,l as setTheme,E as isTheme,m as isLegacyThemeFamily,w as isLegacyThemeFamilyAsync,y as getDefaultTheme,a as getBaseTheme,A as setBaseTheme};
2
2
  //# sourceMappingURL=Theme.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/config/Theme.ts"],
4
- "sourcesContent": ["import { getTheme as getConfiguredTheme } from \"../InitialConfiguration.js\";\nimport { reRenderAllUI5Elements } from \"../Render.js\";\nimport applyTheme from \"../theming/applyTheme.js\";\nimport getThemeDesignerTheme from \"../theming/getThemeDesignerTheme.js\";\nimport { DEFAULT_THEME, SUPPORTED_THEMES } from \"../generated/AssetParameters.js\";\nimport { boot, isBooted } from \"../Boot.js\";\nimport { attachConfigurationReset } from \"./ConfigurationReset.js\";\nimport { fireConfigChange, attachConfigChange, getSharedValue } from \"./ConfigurationSync.js\";\n\nlet curTheme: string | undefined;\nlet curBaseTheme: string | undefined;\n\nattachConfigurationReset(() => {\n\tcurTheme = undefined;\n});\n\nattachConfigChange(\"theme\", (theme: string) => {\n\tcurTheme = theme;\n\tif (isBooted()) {\n\t\tapplyTheme(curTheme).then(() => reRenderAllUI5Elements({ themeAware: true }));\n\t}\n});\n\n/**\n * Returns the current theme.\n * @public\n * @returns {string} the current theme name\n */\nconst getTheme = (): string => {\n\tif (curTheme === undefined) {\n\t\tcurTheme = getSharedValue<string>(\"theme\") ?? getConfiguredTheme();\n\t}\n\n\treturn curTheme;\n};\n\n/**\n * Applies a new theme after fetching its assets from the network.\n * @public\n * @param {string} theme the name of the new theme\n * @returns {Promise<void>} a promise that is resolved when the new theme assets have been fetched and applied to the DOM\n */\nconst setTheme = async (theme: string): Promise<void> => {\n\tif (curTheme === theme) {\n\t\treturn;\n\t}\n\n\tcurTheme = theme;\n\n\tfireConfigChange(\"theme\", theme);\n\n\tif (isBooted()) {\n\t\t// Update CSS Custom Properties\n\t\tawait applyTheme(curTheme);\n\t\tawait reRenderAllUI5Elements({ themeAware: true });\n\t}\n};\n\n/**\n * Returns the default theme.\n *\n * Note: Default theme might be different than the configurated one.\n *\n * @public\n * @returns {string}\n */\nconst getDefaultTheme = (): string => {\n\treturn DEFAULT_THEME;\n};\n\n/**\n * Returns if the given theme name is the one currently applied.\n * @private\n * @param {string} theme\n * @returns {boolean}\n */\nconst isTheme = (theme: string) => {\n\treturn getTheme() === theme;\n};\n\n/**\n * Returns if the currently set theme is part of legacy theme families (\"sap_fiori_3\").\n * **Note**: in addition, the method checks the base theme of a custom theme, built via the ThemeDesigner.\n *\n * @private\n * @returns { boolean }\n */\nconst isLegacyThemeFamily = () => {\n\tconst currentTheme = getTheme();\n\n\tif (!isKnownTheme(currentTheme)) {\n\t\treturn !getThemeDesignerTheme()?.baseThemeName?.startsWith(\"sap_horizon\");\n\t}\n\n\treturn !currentTheme.startsWith(\"sap_horizon\");\n};\n\nconst isLegacyThemeFamilyAsync = async () => {\n\tawait boot();\n\treturn isLegacyThemeFamily();\n};\n\nconst isKnownTheme = (theme: string) => SUPPORTED_THEMES.includes(theme);\n\n/**\n * Returns the base theme of external theme.\n * @private\n * @returns {string | undefined} the base theme name\n */\nconst getBaseTheme = (): string | undefined => {\n\treturn curBaseTheme;\n};\n\n/**\n * Sets the base theme of the current external theme.\n * @param { string | undefined } theme the name of the new base theme\n * @private\n */\nconst setBaseTheme = (theme: string | undefined): void => {\n\tcurBaseTheme = theme;\n};\n\nexport {\n\tgetTheme,\n\tsetTheme,\n\tisTheme,\n\tisLegacyThemeFamily,\n\tisLegacyThemeFamilyAsync,\n\tgetDefaultTheme,\n\tgetBaseTheme,\n\tsetBaseTheme,\n};\n"],
5
- "mappings": "aAAA,OAAS,YAAYA,MAA0B,6BAC/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applyTheme", "getThemeDesignerTheme", "DEFAULT_THEME", "SUPPORTED_THEMES", "boot", "isBooted", "attachConfigurationReset", "fireConfigChange", "attachConfigChange", "getSharedValue", "curTheme", "curBaseTheme", "theme", "getTheme", "setTheme", "getDefaultTheme", "isTheme", "isLegacyThemeFamily", "currentTheme", "isKnownTheme", "isLegacyThemeFamilyAsync", "getBaseTheme", "setBaseTheme"]
4
+ "sourcesContent": ["import { getTheme as getConfiguredTheme } from \"../InitialConfiguration.js\";\nimport { reRenderAllUI5Elements } from \"../Render.js\";\nimport applyTheme from \"../theming/applyTheme.js\";\nimport { DEFAULT_THEME, SUPPORTED_THEMES } from \"../generated/AssetParameters.js\";\nimport { boot, isBooted } from \"../Boot.js\";\nimport { attachConfigurationReset } from \"./ConfigurationReset.js\";\nimport { fireConfigChange, attachConfigChange, getSharedValue } from \"./ConfigurationSync.js\";\n\nlet curTheme: string | undefined;\nlet curBaseTheme: string | undefined;\n\nattachConfigurationReset(() => {\n\tcurTheme = undefined;\n});\n\nattachConfigChange(\"theme\", (theme: string) => {\n\tcurTheme = theme;\n\tif (isBooted()) {\n\t\tapplyTheme(curTheme).then(() => reRenderAllUI5Elements({ themeAware: true }));\n\t}\n});\n\n/**\n * Returns the current theme.\n * @public\n * @returns {string} the current theme name\n */\nconst getTheme = (): string => {\n\tif (curTheme === undefined) {\n\t\tcurTheme = getSharedValue<string>(\"theme\") ?? getConfiguredTheme();\n\t}\n\n\treturn curTheme;\n};\n\n/**\n * Applies a new theme after fetching its assets from the network.\n * @public\n * @param {string} theme the name of the new theme\n * @returns {Promise<void>} a promise that is resolved when the new theme assets have been fetched and applied to the DOM\n */\nconst setTheme = async (theme: string): Promise<void> => {\n\tif (curTheme === theme) {\n\t\treturn;\n\t}\n\n\tcurTheme = theme;\n\n\tfireConfigChange(\"theme\", theme);\n\n\tif (isBooted()) {\n\t\t// Update CSS Custom Properties\n\t\tawait applyTheme(curTheme);\n\t\tawait reRenderAllUI5Elements({ themeAware: true });\n\t}\n};\n\n/**\n * Returns the default theme.\n *\n * Note: Default theme might be different than the configurated one.\n *\n * @public\n * @returns {string}\n */\nconst getDefaultTheme = (): string => {\n\treturn DEFAULT_THEME;\n};\n\n/**\n * Returns if the given theme name is the one currently applied.\n * @private\n * @param {string} theme\n * @returns {boolean}\n */\nconst isTheme = (theme: string) => {\n\treturn getTheme() === theme;\n};\n\n/**\n * Returns if the currently set theme is part of legacy theme families (\"sap_fiori_3\").\n * **Note**: in addition, the method checks the base theme of a custom theme, built via the ThemeDesigner.\n *\n * @private\n * @returns { boolean }\n */\nconst isLegacyThemeFamily = () => {\n\tconst currentTheme = getTheme();\n\n\tif (!isKnownTheme(currentTheme)) {\n\t\treturn !getBaseTheme()?.startsWith(\"sap_horizon\");\n\t}\n\n\treturn !currentTheme.startsWith(\"sap_horizon\");\n};\n\nconst isLegacyThemeFamilyAsync = async () => {\n\tawait boot();\n\treturn isLegacyThemeFamily();\n};\n\nconst isKnownTheme = (theme: string) => SUPPORTED_THEMES.includes(theme);\n\n/**\n * Returns the base theme of external theme.\n * @private\n * @returns {string | undefined} the base theme name\n */\nconst getBaseTheme = (): string | undefined => {\n\treturn curBaseTheme;\n};\n\n/**\n * Sets the base theme of the current external theme.\n * @param { string | undefined } theme the name of the new base theme\n * @private\n */\nconst setBaseTheme = (theme: string | undefined): void => {\n\tcurBaseTheme = theme;\n};\n\nexport {\n\tgetTheme,\n\tsetTheme,\n\tisTheme,\n\tisLegacyThemeFamily,\n\tisLegacyThemeFamilyAsync,\n\tgetDefaultTheme,\n\tgetBaseTheme,\n\tsetBaseTheme,\n};\n"],
5
+ "mappings": "aAAA,OAAS,YAAYA,MAA0B,6BAC/C,OAAS,0BAAAC,MAA8B,eACvC,OAAOC,MAAgB,2BACvB,OAAS,iBAAAC,EAAe,oBAAAC,MAAwB,kCAChD,OAAS,QAAAC,EAAM,YAAAC,MAAgB,aAC/B,OAAS,4BAAAC,MAAgC,0BACzC,OAAS,oBAAAC,EAAkB,sBAAAC,EAAoB,kBAAAC,MAAsB,yBAErE,IAAIC,EACAC,EAEJL,EAAyB,IAAM,CAC9BI,EAAW,MACZ,CAAC,EAEDF,EAAmB,QAAUI,GAAkB,CAC9CF,EAAWE,EACPP,EAAS,GACZJ,EAAWS,CAAQ,EAAE,KAAK,IAAMV,EAAuB,CAAE,WAAY,EAAK,CAAC,CAAC,CAE9E,CAAC,EAOD,MAAMa,EAAW,KACZH,IAAa,SAChBA,EAAWD,EAAuB,OAAO,GAAKV,EAAmB,GAG3DW,GASFI,EAAW,MAAOF,GAAiC,CACpDF,IAAaE,IAIjBF,EAAWE,EAEXL,EAAiB,QAASK,CAAK,EAE3BP,EAAS,IAEZ,MAAMJ,EAAWS,CAAQ,EACzB,MAAMV,EAAuB,CAAE,WAAY,EAAK,CAAC,GAEnD,EAUMe,EAAkB,IAChBb,EASFc,EAAWJ,GACTC,EAAS,IAAMD,EAUjBK,EAAsB,IAAM,CACjC,MAAMC,EAAeL,EAAS,EAE9B,OAAKM,EAAaD,CAAY,EAIvB,CAACA,EAAa,WAAW,aAAa,EAHrC,CAACE,EAAa,GAAG,WAAW,aAAa,CAIlD,EAEMC,EAA2B,UAChC,MAAMjB,EAAK,EACJa,EAAoB,GAGtBE,EAAgBP,GAAkBT,EAAiB,SAASS,CAAK,EAOjEQ,EAAe,IACbT,EAQFW,EAAgBV,GAAoC,CACzDD,EAAeC,CAChB,EAEA,OACCC,KAAA,SACAC,KAAA,SACAE,KAAA,QACAC,KAAA,oBACAI,KAAA,yBACAN,KAAA,gBACAK,KAAA,aACAE,KAAA",
6
+ "names": ["getConfiguredTheme", "reRenderAllUI5Elements", "applyTheme", "DEFAULT_THEME", "SUPPORTED_THEMES", "boot", "isBooted", "attachConfigurationReset", "fireConfigChange", "attachConfigChange", "getSharedValue", "curTheme", "curBaseTheme", "theme", "getTheme", "setTheme", "getDefaultTheme", "isTheme", "isLegacyThemeFamily", "currentTheme", "isKnownTheme", "getBaseTheme", "isLegacyThemeFamilyAsync", "setBaseTheme"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";const e={version:"2.27.0-rc.1",major:2,minor:27,patch:0,suffix:"-rc.1",isNext:!1,buildTime:1788441047};export default e;
1
+ "use strict";const e={version:"2.27.0-rc.2",major:2,minor:27,patch:0,suffix:"-rc.2",isNext:!1,buildTime:1789632712};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.27.0-rc.1\",\n\tmajor: 2,\n\tminor: 27,\n\tpatch: 0,\n\tsuffix: \"-rc.1\",\n\tisNext: false,\n\tbuildTime: 1788441047,\n};\nexport default VersionInfo;"],
4
+ "sourcesContent": ["const VersionInfo = {\n\tversion: \"2.27.0-rc.2\",\n\tmajor: 2,\n\tminor: 27,\n\tpatch: 0,\n\tsuffix: \"-rc.2\",\n\tisNext: false,\n\tbuildTime: 1789632712,\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
  }
@@ -0,0 +1,2 @@
1
+ "use strict";export default oURLListValidator;
2
+ //# sourceMappingURL=URLListValidator.d.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../src/sap/base/security/URLListValidator.d.ts"],
4
+ "sourcesContent": ["declare const oURLListValidator: any;\nexport default oURLListValidator;\n"],
5
+ "mappings": "aACA,eAAe",
6
+ "names": []
7
+ }
@@ -0,0 +1,2 @@
1
+ declare const oURLListValidator: any;
2
+ export default oURLListValidator;
@@ -0,0 +1,2 @@
1
+ "use strict";export default fnSanitizeHTML;
2
+ //# sourceMappingURL=sanitizeHTML.d.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../src/sap/base/security/sanitizeHTML.d.ts"],
4
+ "sourcesContent": ["declare const fnSanitizeHTML: any;\nexport default fnSanitizeHTML;\n"],
5
+ "mappings": "aACA,eAAe",
6
+ "names": []
7
+ }
@@ -0,0 +1,2 @@
1
+ declare const fnSanitizeHTML: any;
2
+ export default fnSanitizeHTML;
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/util/HTMLSanitizer.ts"],
4
- "sourcesContent": ["/** @ts-expect-error */\nimport sanitizeHTML from \"../sap/base/security/sanitizeHTML.js\";\n/** @ts-expect-error */\nimport URLListValidator from \"../sap/base/security/URLListValidator.js\";\n\nexport {\n\tURLListValidator,\n\tsanitizeHTML,\n};\n"],
5
- "mappings": "aACA,OAAOA,MAAkB,uCAEzB,OAAOC,MAAsB,2CAE7B,OACCA,KAAA,iBACAD,KAAA",
4
+ "sourcesContent": ["import sanitizeHTML from \"../sap/base/security/sanitizeHTML.js\";\nimport URLListValidator from \"../sap/base/security/URLListValidator.js\";\n\nexport {\n\tURLListValidator,\n\tsanitizeHTML,\n};\n"],
5
+ "mappings": "aAAA,OAAOA,MAAkB,uCACzB,OAAOC,MAAsB,2CAE7B,OACCA,KAAA,iBACAD,KAAA",
6
6
  "names": ["sanitizeHTML", "URLListValidator"]
7
7
  }
@@ -0,0 +1,2 @@
1
+ declare const oURLListValidator: any;
2
+ export default oURLListValidator;
@@ -0,0 +1,2 @@
1
+ declare const fnSanitizeHTML: any;
2
+ export default fnSanitizeHTML;
@@ -1,5 +1,3 @@
1
- /** @ts-expect-error */
2
1
  import sanitizeHTML from "../sap/base/security/sanitizeHTML.js";
3
- /** @ts-expect-error */
4
2
  import URLListValidator from "../sap/base/security/URLListValidator.js";
5
3
  export { URLListValidator, sanitizeHTML, };
@@ -1,6 +1,4 @@
1
- /** @ts-expect-error */
2
1
  import sanitizeHTML from "../sap/base/security/sanitizeHTML.js";
3
- /** @ts-expect-error */
4
2
  import URLListValidator from "../sap/base/security/URLListValidator.js";
5
3
  export { URLListValidator, sanitizeHTML, };
6
4
  //# sourceMappingURL=HTMLSanitizer.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"HTMLSanitizer.js","sourceRoot":"","sources":["../../src/util/HTMLSanitizer.ts"],"names":[],"mappings":"AAAA,uBAAuB;AACvB,OAAO,YAAY,MAAM,sCAAsC,CAAC;AAChE,uBAAuB;AACvB,OAAO,gBAAgB,MAAM,0CAA0C,CAAC;AAExE,OAAO,EACN,gBAAgB,EAChB,YAAY,GACZ,CAAC","sourcesContent":["/** @ts-expect-error */\nimport sanitizeHTML from \"../sap/base/security/sanitizeHTML.js\";\n/** @ts-expect-error */\nimport URLListValidator from \"../sap/base/security/URLListValidator.js\";\n\nexport {\n\tURLListValidator,\n\tsanitizeHTML,\n};\n"]}
1
+ {"version":3,"file":"HTMLSanitizer.js","sourceRoot":"","sources":["../../src/util/HTMLSanitizer.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,sCAAsC,CAAC;AAChE,OAAO,gBAAgB,MAAM,0CAA0C,CAAC;AAExE,OAAO,EACN,gBAAgB,EAChB,YAAY,GACZ,CAAC","sourcesContent":["import sanitizeHTML from \"../sap/base/security/sanitizeHTML.js\";\nimport URLListValidator from \"../sap/base/security/URLListValidator.js\";\n\nexport {\n\tURLListValidator,\n\tsanitizeHTML,\n};\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ui5/webcomponents-base",
3
- "version": "2.27.0-rc.1",
3
+ "version": "2.27.0-rc.2",
4
4
  "description": "UI5 Web Components: webcomponents.base",
5
5
  "author": "SAP SE (https://www.sap.com)",
6
6
  "license": "Apache-2.0",
@@ -66,7 +66,7 @@
66
66
  "@openui5/sap.ui.core": "1.151.0",
67
67
  "@sap-theming/theming-base-content": "11.36.4",
68
68
  "@ui5/cypress-internal": "0.1.0",
69
- "@ui5/webcomponents-tools": "2.27.0-rc.1",
69
+ "@ui5/webcomponents-tools": "2.27.0-rc.2",
70
70
  "clean-css": "^5.2.2",
71
71
  "cypress": "15.18.1",
72
72
  "mocha": "^11.7.2",
@@ -85,5 +85,5 @@
85
85
  }
86
86
  },
87
87
  "customElements": "dist/custom-elements.json",
88
- "gitHead": "349a62be7949ed8f50de4d88352f2557f0a4d7c1"
88
+ "gitHead": "ed68024790c2ca5f3eddb25055e87883f5535515"
89
89
  }