@ui5/webcomponents-base 2.1.1 → 2.2.0-rc.1

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.
Files changed (117) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/cypress/specs/Accessor.cy.ts +83 -0
  3. package/cypress/specs/Boot.cy.ts +23 -0
  4. package/cypress/specs/ConfigurationChange.cy.ts +41 -0
  5. package/cypress/specs/ConfigurationScript.cy.ts +116 -0
  6. package/cypress/specs/ConfigurationURL.cy.ts +182 -0
  7. package/cypress/specs/CustomMount.cy.ts +34 -0
  8. package/cypress/specs/CustomTheme.cy.ts +36 -0
  9. package/cypress/specs/EventProvider.cy.ts +59 -0
  10. package/cypress/specs/SystemDOMElements.cy.ts +8 -0
  11. package/cypress/specs/Theming.cy.ts +74 -0
  12. package/cypress/specs/UI5ElementInvalidation.cy.ts +207 -0
  13. package/cypress/specs/UI5ElementLifecycle.cy.ts +82 -0
  14. package/cypress/specs/UI5ElementListenForChildPropChanges.cy.ts +62 -0
  15. package/cypress/specs/UI5ElementMetadataExt.cy.ts +42 -0
  16. package/cypress/specs/UI5ElementPropertyValidation.cy.ts +17 -0
  17. package/cypress/specs/UI5ElementPropsAndAttrs.cy.ts +113 -0
  18. package/cypress/specs/UI5ElementShadowDOM.cy.ts +30 -0
  19. package/cypress/specs/UI5ElementSlots.cy.ts +116 -0
  20. package/cypress/specs/WithComplexTemplate.cy.ts +32 -0
  21. package/cypress/tsconfig.json +20 -0
  22. package/cypress.config.js +3 -0
  23. package/dist/.tsbuildinfobuild +1 -0
  24. package/dist/InitialConfiguration.d.ts +7 -1
  25. package/dist/InitialConfiguration.js +20 -3
  26. package/dist/InitialConfiguration.js.map +1 -1
  27. package/dist/Location.d.ts +11 -0
  28. package/dist/Location.js +49 -0
  29. package/dist/Location.js.map +1 -0
  30. package/dist/Runtimes.js +11 -0
  31. package/dist/Runtimes.js.map +1 -1
  32. package/dist/UI5Element.js +19 -11
  33. package/dist/UI5Element.js.map +1 -1
  34. package/dist/config/AnimationMode.js +4 -0
  35. package/dist/config/AnimationMode.js.map +1 -1
  36. package/dist/config/CalendarType.js +5 -0
  37. package/dist/config/CalendarType.js.map +1 -1
  38. package/dist/config/ConfigurationReset.d.ts +4 -0
  39. package/dist/config/ConfigurationReset.js +11 -0
  40. package/dist/config/ConfigurationReset.js.map +1 -0
  41. package/dist/config/Fonts.js +4 -0
  42. package/dist/config/Fonts.js.map +1 -1
  43. package/dist/config/FormatSettings.js +4 -0
  44. package/dist/config/FormatSettings.js.map +1 -1
  45. package/dist/config/Language.js +6 -1
  46. package/dist/config/Language.js.map +1 -1
  47. package/dist/config/NoConflict.js +4 -0
  48. package/dist/config/NoConflict.js.map +1 -1
  49. package/dist/config/Theme.js +4 -0
  50. package/dist/config/Theme.js.map +1 -1
  51. package/dist/config/ThemeRoot.js +4 -0
  52. package/dist/config/ThemeRoot.js.map +1 -1
  53. package/dist/config/Timezone.js +4 -0
  54. package/dist/config/Timezone.js.map +1 -1
  55. package/dist/config/Tooltips.d.ts +19 -0
  56. package/dist/config/Tooltips.js +29 -0
  57. package/dist/config/Tooltips.js.map +1 -0
  58. package/dist/custom-elements-internal.json +48 -0
  59. package/dist/custom-elements.json +48 -0
  60. package/dist/decorators/query.d.ts +25 -0
  61. package/dist/decorators/query.js +32 -0
  62. package/dist/decorators/query.js.map +1 -0
  63. package/dist/decorators/queryAll.d.ts +27 -0
  64. package/dist/decorators/queryAll.js +34 -0
  65. package/dist/decorators/queryAll.js.map +1 -0
  66. package/dist/generated/VersionInfo.js +5 -5
  67. package/dist/generated/VersionInfo.js.map +1 -1
  68. package/dist/prod/InitialConfiguration.js +1 -1
  69. package/dist/prod/InitialConfiguration.js.map +3 -3
  70. package/dist/prod/Location.js +2 -0
  71. package/dist/prod/Location.js.map +7 -0
  72. package/dist/prod/Runtimes.js +1 -1
  73. package/dist/prod/Runtimes.js.map +3 -3
  74. package/dist/prod/UI5Element.js +1 -1
  75. package/dist/prod/UI5Element.js.map +2 -2
  76. package/dist/prod/config/AnimationMode.js +1 -1
  77. package/dist/prod/config/AnimationMode.js.map +3 -3
  78. package/dist/prod/config/CalendarType.js +1 -1
  79. package/dist/prod/config/CalendarType.js.map +3 -3
  80. package/dist/prod/config/ConfigurationReset.js +2 -0
  81. package/dist/prod/config/ConfigurationReset.js.map +7 -0
  82. package/dist/prod/config/Fonts.js +1 -1
  83. package/dist/prod/config/Fonts.js.map +3 -3
  84. package/dist/prod/config/FormatSettings.js +1 -1
  85. package/dist/prod/config/FormatSettings.js.map +3 -3
  86. package/dist/prod/config/Language.js +1 -1
  87. package/dist/prod/config/Language.js.map +3 -3
  88. package/dist/prod/config/NoConflict.js +1 -1
  89. package/dist/prod/config/NoConflict.js.map +3 -3
  90. package/dist/prod/config/Theme.js +1 -1
  91. package/dist/prod/config/Theme.js.map +3 -3
  92. package/dist/prod/config/ThemeRoot.js +1 -1
  93. package/dist/prod/config/ThemeRoot.js.map +3 -3
  94. package/dist/prod/config/Timezone.js +1 -1
  95. package/dist/prod/config/Timezone.js.map +3 -3
  96. package/dist/prod/config/Tooltips.js +2 -0
  97. package/dist/prod/config/Tooltips.js.map +7 -0
  98. package/dist/prod/decorators/query.js +2 -0
  99. package/dist/prod/decorators/query.js.map +7 -0
  100. package/dist/prod/decorators/queryAll.js +2 -0
  101. package/dist/prod/decorators/queryAll.js.map +7 -0
  102. package/dist/prod/generated/VersionInfo.js +1 -1
  103. package/dist/prod/generated/VersionInfo.js.map +2 -2
  104. package/dist/prod/validateThemeRoot.js +1 -1
  105. package/dist/prod/validateThemeRoot.js.map +3 -3
  106. package/dist/validateThemeRoot.js +3 -2
  107. package/dist/validateThemeRoot.js.map +1 -1
  108. package/package-scripts.cjs +5 -3
  109. package/package.json +4 -3
  110. package/tsconfig.json +19 -19
  111. package/config/wdio.conf.cjs +0 -392
  112. package/dist/.tsbuildinfo +0 -1
  113. package/dist/generated/templates/elements/WithComplexTemplateTemplate.lit.d.ts +0 -4
  114. package/dist/generated/templates/elements/WithComplexTemplateTemplate.lit.js +0 -9
  115. package/dist/generated/templates/elements/WithComplexTemplateTemplate.lit.js.map +0 -1
  116. package/dist/prod/generated/templates/elements/WithComplexTemplateTemplate.lit.js +0 -2
  117. package/dist/prod/generated/templates/elements/WithComplexTemplateTemplate.lit.js.map +0 -7
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/config/NoConflict.ts"],
4
- "sourcesContent": ["import { getNoConflict as getConfiguredNoConflict } from \"../InitialConfiguration.js\";\n\n// Fire these events even with noConflict: true\nconst excludeList = [\n\t\"value-changed\",\n\t\"click\",\n];\n\ntype NoConflictData = boolean | { events: Array<string>};\n\nlet noConflict: NoConflictData;\n\nconst shouldFireOriginalEvent = (eventName: string) => {\n\treturn excludeList.includes(eventName);\n};\n\nconst shouldNotFireOriginalEvent = (eventName: string) => {\n\tconst nc = getNoConflict();\n\t// return !(nc.events && nc.events.includes && nc.events.includes(eventName));\n\treturn !(typeof nc !== \"boolean\" && nc.events && nc.events.includes && nc.events.includes(eventName));\n};\n\n/**\n * Returns if the \"noConflict\" configuration is set.\n * @public\n * @returns { NoConflictData }\n */\nconst getNoConflict = (): NoConflictData => {\n\tif (noConflict === undefined) {\n\t\tnoConflict = getConfiguredNoConflict();\n\t}\n\n\treturn noConflict;\n};\n\n/**\n * Sets the \"noConflict\" mode.\n * - When \"false\" (default value), all custom events are fired with and without the \"ui5-\" prefix.\n * - When \"true\", all custom events are fired with the \"ui5-\" prefix only.\n * - When an object is supplied, just the specified events will be fired with the \"ui5-\" prefix.\n * @public\n * @param { NoConflictData } noConflictData\n */\nconst setNoConflict = (noConflictData: NoConflictData) => {\n\tnoConflict = noConflictData;\n};\n\nconst skipOriginalEvent = (eventName: string) => {\n\tconst nc = getNoConflict();\n\n\t// Always fire these events\n\tif (shouldFireOriginalEvent(eventName)) {\n\t\treturn false;\n\t}\n\n\t// Read from the configuration\n\tif (nc === true) {\n\t\treturn true;\n\t}\n\n\treturn !shouldNotFireOriginalEvent(eventName);\n};\n\nexport {\n\tgetNoConflict,\n\tsetNoConflict,\n\tskipOriginalEvent,\n};\n"],
5
- "mappings": "aAAA,OAAS,iBAAiBA,MAA+B,6BAGzD,MAAMC,EAAc,CACnB,gBACA,OACD,EAIA,IAAIC,EAEJ,MAAMC,EAA2BC,GACzBH,EAAY,SAASG,CAAS,EAGhCC,EAA8BD,GAAsB,CACzD,MAAME,EAAKC,EAAc,EAEzB,MAAO,EAAE,OAAOD,GAAO,WAAaA,EAAG,QAAUA,EAAG,OAAO,UAAYA,EAAG,OAAO,SAASF,CAAS,EACpG,EAOMG,EAAgB,KACjBL,IAAe,SAClBA,EAAaF,EAAwB,GAG/BE,GAWFM,EAAiBC,GAAmC,CACzDP,EAAaO,CACd,EAEMC,EAAqBN,GAAsB,CAChD,MAAME,EAAKC,EAAc,EAGzB,OAAIJ,EAAwBC,CAAS,EAC7B,GAIJE,IAAO,GACH,GAGD,CAACD,EAA2BD,CAAS,CAC7C,EAEA,OACCG,KAAA,cACAC,KAAA,cACAE,KAAA",
6
- "names": ["getConfiguredNoConflict", "excludeList", "noConflict", "shouldFireOriginalEvent", "eventName", "shouldNotFireOriginalEvent", "nc", "getNoConflict", "setNoConflict", "noConflictData", "skipOriginalEvent"]
4
+ "sourcesContent": ["import { getNoConflict as getConfiguredNoConflict } from \"../InitialConfiguration.js\";\nimport { attachConfigurationReset } from \"./ConfigurationReset.js\";\n\n// Fire these events even with noConflict: true\nconst excludeList = [\n\t\"value-changed\",\n\t\"click\",\n];\n\ntype NoConflictData = boolean | { events: Array<string>};\n\nlet noConflict: NoConflictData | undefined;\n\nattachConfigurationReset(() => {\n\tnoConflict = undefined;\n});\n\nconst shouldFireOriginalEvent = (eventName: string) => {\n\treturn excludeList.includes(eventName);\n};\n\nconst shouldNotFireOriginalEvent = (eventName: string) => {\n\tconst nc = getNoConflict();\n\t// return !(nc.events && nc.events.includes && nc.events.includes(eventName));\n\treturn !(typeof nc !== \"boolean\" && nc.events && nc.events.includes && nc.events.includes(eventName));\n};\n\n/**\n * Returns if the \"noConflict\" configuration is set.\n * @public\n * @returns { NoConflictData }\n */\nconst getNoConflict = (): NoConflictData => {\n\tif (noConflict === undefined) {\n\t\tnoConflict = getConfiguredNoConflict();\n\t}\n\n\treturn noConflict;\n};\n\n/**\n * Sets the \"noConflict\" mode.\n * - When \"false\" (default value), all custom events are fired with and without the \"ui5-\" prefix.\n * - When \"true\", all custom events are fired with the \"ui5-\" prefix only.\n * - When an object is supplied, just the specified events will be fired with the \"ui5-\" prefix.\n * @public\n * @param { NoConflictData } noConflictData\n */\nconst setNoConflict = (noConflictData: NoConflictData) => {\n\tnoConflict = noConflictData;\n};\n\nconst skipOriginalEvent = (eventName: string) => {\n\tconst nc = getNoConflict();\n\n\t// Always fire these events\n\tif (shouldFireOriginalEvent(eventName)) {\n\t\treturn false;\n\t}\n\n\t// Read from the configuration\n\tif (nc === true) {\n\t\treturn true;\n\t}\n\n\treturn !shouldNotFireOriginalEvent(eventName);\n};\n\nexport {\n\tgetNoConflict,\n\tsetNoConflict,\n\tskipOriginalEvent,\n};\n"],
5
+ "mappings": "aAAA,OAAS,iBAAiBA,MAA+B,6BACzD,OAAS,4BAAAC,MAAgC,0BAGzC,MAAMC,EAAc,CACnB,gBACA,OACD,EAIA,IAAIC,EAEJF,EAAyB,IAAM,CAC9BE,EAAa,MACd,CAAC,EAED,MAAMC,EAA2BC,GACzBH,EAAY,SAASG,CAAS,EAGhCC,EAA8BD,GAAsB,CACzD,MAAME,EAAKC,EAAc,EAEzB,MAAO,EAAE,OAAOD,GAAO,WAAaA,EAAG,QAAUA,EAAG,OAAO,UAAYA,EAAG,OAAO,SAASF,CAAS,EACpG,EAOMG,EAAgB,KACjBL,IAAe,SAClBA,EAAaH,EAAwB,GAG/BG,GAWFM,EAAiBC,GAAmC,CACzDP,EAAaO,CACd,EAEMC,EAAqBN,GAAsB,CAChD,MAAME,EAAKC,EAAc,EAGzB,OAAIJ,EAAwBC,CAAS,EAC7B,GAIJE,IAAO,GACH,GAGD,CAACD,EAA2BD,CAAS,CAC7C,EAEA,OACCG,KAAA,cACAC,KAAA,cACAE,KAAA",
6
+ "names": ["getConfiguredNoConflict", "attachConfigurationReset", "excludeList", "noConflict", "shouldFireOriginalEvent", "eventName", "shouldNotFireOriginalEvent", "nc", "getNoConflict", "setNoConflict", "noConflictData", "skipOriginalEvent"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";import{getTheme as s}from"../InitialConfiguration.js";import{reRenderAllUI5Elements as o}from"../Render.js";import m from"../theming/applyTheme.js";import a from"../theming/getThemeDesignerTheme.js";import{DEFAULT_THEME as T,SUPPORTED_THEMES as h}from"../generated/AssetParameters.js";import{boot as c,isBooted as g}from"../Boot.js";let t;const r=()=>(t===void 0&&(t=s()),t),u=async e=>{t!==e&&(t=e,g()&&(await m(t),await o({themeAware:!0})))},f=()=>T,p=e=>{const n=r();return n===e||n===`${e}_exp`},i=()=>{const e=r();return y(e)?!e.startsWith("sap_horizon"):!a()?.baseThemeName?.startsWith("sap_horizon")},l=async()=>(await c(),i()),y=e=>h.includes(e);export{r as getTheme,u as setTheme,p as isTheme,i as isLegacyThemeFamily,l as isLegacyThemeFamilyAsync,f as getDefaultTheme};
1
+ "use strict";import{getTheme as o}from"../InitialConfiguration.js";import{reRenderAllUI5Elements as s}from"../Render.js";import m from"../theming/applyTheme.js";import a from"../theming/getThemeDesignerTheme.js";import{DEFAULT_THEME as h,SUPPORTED_THEMES as T}from"../generated/AssetParameters.js";import{boot as c,isBooted as u}from"../Boot.js";import{attachConfigurationReset as f}from"./ConfigurationReset.js";let t;f(()=>{t=void 0});const r=()=>(t===void 0&&(t=o()),t),g=async e=>{t!==e&&(t=e,u()&&(await m(t),await s({themeAware:!0})))},p=()=>h,d=e=>{const n=r();return n===e||n===`${e}_exp`},i=()=>{const e=r();return y(e)?!e.startsWith("sap_horizon"):!a()?.baseThemeName?.startsWith("sap_horizon")},l=async()=>(await c(),i()),y=e=>T.includes(e);export{r as getTheme,g as setTheme,d as isTheme,i as isLegacyThemeFamily,l as isLegacyThemeFamilyAsync,p as getDefaultTheme};
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\";\n\nlet curTheme: string;\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 = 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\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\tconst currentTheme = getTheme();\n\treturn currentTheme === theme || currentTheme === `${theme}_exp`;\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\nexport {\n\tgetTheme,\n\tsetTheme,\n\tisTheme,\n\tisLegacyThemeFamily,\n\tisLegacyThemeFamilyAsync,\n\tgetDefaultTheme,\n};\n"],
5
- "mappings": "aAAA,OAAS,YAAYA,MAA0B,6BAC/C,OAAS,0BAAAC,MAA8B,eACvC,OAAOC,MAAgB,2BACvB,OAAOC,MAA2B,sCAClC,OAAS,iBAAAC,EAAe,oBAAAC,MAAwB,kCAChD,OAAS,QAAAC,EAAM,YAAAC,MAAgB,aAE/B,IAAIC,EAOJ,MAAMC,EAAW,KACZD,IAAa,SAChBA,EAAWR,EAAmB,GAGxBQ,GASFE,EAAW,MAAOC,GAAiC,CACpDH,IAAaG,IAIjBH,EAAWG,EAEPJ,EAAS,IAEZ,MAAML,EAAWM,CAAQ,EACzB,MAAMP,EAAuB,CAAE,WAAY,EAAK,CAAC,GAEnD,EAUMW,EAAkB,IAChBR,EASFS,EAAWF,GAAkB,CAClC,MAAMG,EAAeL,EAAS,EAC9B,OAAOK,IAAiBH,GAASG,IAAiB,GAAGH,CAAK,MAC3D,EASMI,EAAsB,IAAM,CACjC,MAAMD,EAAeL,EAAS,EAE9B,OAAKO,EAAaF,CAAY,EAIvB,CAACA,EAAa,WAAW,aAAa,EAHrC,CAACX,EAAsB,GAAG,eAAe,WAAW,aAAa,CAI1E,EAEMc,EAA2B,UAChC,MAAMX,EAAK,EACJS,EAAoB,GAGtBC,EAAgBL,GAAkBN,EAAiB,SAASM,CAAK,EAEvE,OACCF,KAAA,SACAC,KAAA,SACAG,KAAA,QACAE,KAAA,oBACAE,KAAA,yBACAL,KAAA",
6
- "names": ["getConfiguredTheme", "reRenderAllUI5Elements", "applyTheme", "getThemeDesignerTheme", "DEFAULT_THEME", "SUPPORTED_THEMES", "boot", "isBooted", "curTheme", "getTheme", "setTheme", "theme", "getDefaultTheme", "isTheme", "currentTheme", "isLegacyThemeFamily", "isKnownTheme", "isLegacyThemeFamilyAsync"]
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\";\n\nlet curTheme: string | undefined;\n\nattachConfigurationReset(() => {\n\tcurTheme = undefined;\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 = 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\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\tconst currentTheme = getTheme();\n\treturn currentTheme === theme || currentTheme === `${theme}_exp`;\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\nexport {\n\tgetTheme,\n\tsetTheme,\n\tisTheme,\n\tisLegacyThemeFamily,\n\tisLegacyThemeFamilyAsync,\n\tgetDefaultTheme,\n};\n"],
5
+ "mappings": "aAAA,OAAS,YAAYA,MAA0B,6BAC/C,OAAS,0BAAAC,MAA8B,eACvC,OAAOC,MAAgB,2BACvB,OAAOC,MAA2B,sCAClC,OAAS,iBAAAC,EAAe,oBAAAC,MAAwB,kCAChD,OAAS,QAAAC,EAAM,YAAAC,MAAgB,aAC/B,OAAS,4BAAAC,MAAgC,0BAEzC,IAAIC,EAEJD,EAAyB,IAAM,CAC9BC,EAAW,MACZ,CAAC,EAOD,MAAMC,EAAW,KACZD,IAAa,SAChBA,EAAWT,EAAmB,GAGxBS,GASFE,EAAW,MAAOC,GAAiC,CACpDH,IAAaG,IAIjBH,EAAWG,EAEPL,EAAS,IAEZ,MAAML,EAAWO,CAAQ,EACzB,MAAMR,EAAuB,CAAE,WAAY,EAAK,CAAC,GAEnD,EAUMY,EAAkB,IAChBT,EASFU,EAAWF,GAAkB,CAClC,MAAMG,EAAeL,EAAS,EAC9B,OAAOK,IAAiBH,GAASG,IAAiB,GAAGH,CAAK,MAC3D,EASMI,EAAsB,IAAM,CACjC,MAAMD,EAAeL,EAAS,EAE9B,OAAKO,EAAaF,CAAY,EAIvB,CAACA,EAAa,WAAW,aAAa,EAHrC,CAACZ,EAAsB,GAAG,eAAe,WAAW,aAAa,CAI1E,EAEMe,EAA2B,UAChC,MAAMZ,EAAK,EACJU,EAAoB,GAGtBC,EAAgBL,GAAkBP,EAAiB,SAASO,CAAK,EAEvE,OACCF,KAAA,SACAC,KAAA,SACAG,KAAA,QACAE,KAAA,oBACAE,KAAA,yBACAL,KAAA",
6
+ "names": ["getConfiguredTheme", "reRenderAllUI5Elements", "applyTheme", "getThemeDesignerTheme", "DEFAULT_THEME", "SUPPORTED_THEMES", "boot", "isBooted", "attachConfigurationReset", "curTheme", "getTheme", "setTheme", "theme", "getDefaultTheme", "isTheme", "currentTheme", "isLegacyThemeFamily", "isKnownTheme", "isLegacyThemeFamilyAsync"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";import r from"../util/createLinkInHead.js";import s from"../validateThemeRoot.js";import{getThemeRoot as m}from"../InitialConfiguration.js";import{getTheme as a}from"./Theme.js";let t;const n=()=>(t===void 0&&(t=m()),t),d=e=>{if(t!==e){if(t=e,!s(e)){console.warn(`The ${e} is not valid. Check the allowed origins as suggested in the "setThemeRoot" description.`);return}return i(a())}},c=e=>`${n()}Base/baseLib/${e}/css_variables.css`,i=async e=>{const o=document.querySelector(`[sap-ui-webcomponents-theme="${e}"]`);o&&document.head.removeChild(o),await r(c(e),{"sap-ui-webcomponents-theme":e})};export{n as getThemeRoot,d as setThemeRoot,i as attachCustomThemeStylesToHead};
1
+ "use strict";import r from"../util/createLinkInHead.js";import s from"../validateThemeRoot.js";import{getThemeRoot as a}from"../InitialConfiguration.js";import{getTheme as m}from"./Theme.js";import{attachConfigurationReset as d}from"./ConfigurationReset.js";let t;d(()=>{t=void 0});const n=()=>(t===void 0&&(t=a()),t),c=e=>{if(t!==e){if(t=e,!s(e)){console.warn(`The ${e} is not valid. Check the allowed origins as suggested in the "setThemeRoot" description.`);return}return i(m())}},u=e=>`${n()}Base/baseLib/${e}/css_variables.css`,i=async e=>{const o=document.querySelector(`[sap-ui-webcomponents-theme="${e}"]`);o&&document.head.removeChild(o),await r(u(e),{"sap-ui-webcomponents-theme":e})};export{n as getThemeRoot,c as setThemeRoot,i as attachCustomThemeStylesToHead};
2
2
  //# sourceMappingURL=ThemeRoot.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/config/ThemeRoot.ts"],
4
- "sourcesContent": ["import createLinkInHead from \"../util/createLinkInHead.js\";\nimport validateThemeRoot from \"../validateThemeRoot.js\";\nimport { getThemeRoot as getConfiguredThemeRoot } from \"../InitialConfiguration.js\";\nimport { getTheme } from \"./Theme.js\";\n\nlet currThemeRoot: string | undefined;\n\n/**\n * Returns the current theme root.\n *\n * @public\n * @since 1.14.0\n * @returns { string } the current theme root\n */\nconst getThemeRoot = (): string | undefined => {\n\tif (currThemeRoot === undefined) {\n\t\tcurrThemeRoot = getConfiguredThemeRoot();\n\t}\n\n\treturn currThemeRoot;\n};\n\n/**\n * Sets theme root for the current theme.\n * When set, the framework will validate the theme root and fetch the theme styles (CSS variables) from this location.\n *\n * **Note:** The feature is specific to custom themes, created with the `UI Theme Designer`.\n * The provided theme root is used only as a base to construct the actual location of the theme styles: `{themeRoot}/.../css_variables.css`.\n *\n * **Note:** Certain security restrictions will apply before fetching the theme assets.\n * Absolute URLs to a different origin than the current page will result in using the current page as an origin.\n * To allow specific origins, use &lt;meta name=\"sap-allowedThemeOrigins\" content=\"https://my-example-host.com/\"&gt; tag inside the &lt;head&gt; of the page.\n *\n * @public\n * @since 1.14.0\n * @param { string } themeRoot the new theme root\n * @returns { Promise<void> }\n */\nconst setThemeRoot = (themeRoot: string): Promise<void> | undefined => {\n\tif (currThemeRoot === themeRoot) {\n\t\treturn;\n\t}\n\n\tcurrThemeRoot = themeRoot;\n\n\tif (!validateThemeRoot(themeRoot)) {\n\t\tconsole.warn(`The ${themeRoot} is not valid. Check the allowed origins as suggested in the \"setThemeRoot\" description.`); // eslint-disable-line\n\t\treturn;\n\t}\n\n\treturn attachCustomThemeStylesToHead(getTheme());\n};\n\nconst formatThemeLink = (theme: string) => {\n\treturn `${getThemeRoot()!}Base/baseLib/${theme}/css_variables.css`; // theme root is always set at this point.\n};\n\nconst attachCustomThemeStylesToHead = async (theme: string): Promise<void> => {\n\tconst link = document.querySelector(`[sap-ui-webcomponents-theme=\"${theme}\"]`);\n\n\tif (link) {\n\t\tdocument.head.removeChild(link);\n\t}\n\n\tawait createLinkInHead(formatThemeLink(theme), { \"sap-ui-webcomponents-theme\": theme });\n};\n\nexport {\n\tgetThemeRoot,\n\tsetThemeRoot,\n\tattachCustomThemeStylesToHead,\n};\n"],
5
- "mappings": "aAAA,OAAOA,MAAsB,8BAC7B,OAAOC,MAAuB,0BAC9B,OAAS,gBAAgBC,MAA8B,6BACvD,OAAS,YAAAC,MAAgB,aAEzB,IAAIC,EASJ,MAAMC,EAAe,KAChBD,IAAkB,SACrBA,EAAgBF,EAAuB,GAGjCE,GAmBFE,EAAgBC,GAAiD,CACtE,GAAIH,IAAkBG,EAMtB,IAFAH,EAAgBG,EAEZ,CAACN,EAAkBM,CAAS,EAAG,CAClC,QAAQ,KAAK,OAAOA,CAAS,0FAA0F,EACvH,MACD,CAEA,OAAOC,EAA8BL,EAAS,CAAC,EAChD,EAEMM,EAAmBC,GACjB,GAAGL,EAAa,CAAE,gBAAgBK,CAAK,qBAGzCF,EAAgC,MAAOE,GAAiC,CAC7E,MAAMC,EAAO,SAAS,cAAc,gCAAgCD,CAAK,IAAI,EAEzEC,GACH,SAAS,KAAK,YAAYA,CAAI,EAG/B,MAAMX,EAAiBS,EAAgBC,CAAK,EAAG,CAAE,6BAA8BA,CAAM,CAAC,CACvF,EAEA,OACCL,KAAA,aACAC,KAAA,aACAE,KAAA",
6
- "names": ["createLinkInHead", "validateThemeRoot", "getConfiguredThemeRoot", "getTheme", "currThemeRoot", "getThemeRoot", "setThemeRoot", "themeRoot", "attachCustomThemeStylesToHead", "formatThemeLink", "theme", "link"]
4
+ "sourcesContent": ["import createLinkInHead from \"../util/createLinkInHead.js\";\nimport validateThemeRoot from \"../validateThemeRoot.js\";\nimport { getThemeRoot as getConfiguredThemeRoot } from \"../InitialConfiguration.js\";\nimport { getTheme } from \"./Theme.js\";\nimport { attachConfigurationReset } from \"./ConfigurationReset.js\";\n\nlet currThemeRoot: string | undefined;\n\nattachConfigurationReset(() => {\n\tcurrThemeRoot = undefined;\n});\n\n/**\n * Returns the current theme root.\n *\n * @public\n * @since 1.14.0\n * @returns { string } the current theme root\n */\nconst getThemeRoot = (): string | undefined => {\n\tif (currThemeRoot === undefined) {\n\t\tcurrThemeRoot = getConfiguredThemeRoot();\n\t}\n\n\treturn currThemeRoot;\n};\n\n/**\n * Sets theme root for the current theme.\n * When set, the framework will validate the theme root and fetch the theme styles (CSS variables) from this location.\n *\n * **Note:** The feature is specific to custom themes, created with the `UI Theme Designer`.\n * The provided theme root is used only as a base to construct the actual location of the theme styles: `{themeRoot}/.../css_variables.css`.\n *\n * **Note:** Certain security restrictions will apply before fetching the theme assets.\n * Absolute URLs to a different origin than the current page will result in using the current page as an origin.\n * To allow specific origins, use &lt;meta name=\"sap-allowedThemeOrigins\" content=\"https://my-example-host.com/\"&gt; tag inside the &lt;head&gt; of the page.\n *\n * @public\n * @since 1.14.0\n * @param { string } themeRoot the new theme root\n * @returns { Promise<void> }\n */\nconst setThemeRoot = (themeRoot: string): Promise<void> | undefined => {\n\tif (currThemeRoot === themeRoot) {\n\t\treturn;\n\t}\n\n\tcurrThemeRoot = themeRoot;\n\n\tif (!validateThemeRoot(themeRoot)) {\n\t\tconsole.warn(`The ${themeRoot} is not valid. Check the allowed origins as suggested in the \"setThemeRoot\" description.`); // eslint-disable-line\n\t\treturn;\n\t}\n\n\treturn attachCustomThemeStylesToHead(getTheme());\n};\n\nconst formatThemeLink = (theme: string) => {\n\treturn `${getThemeRoot()!}Base/baseLib/${theme}/css_variables.css`; // theme root is always set at this point.\n};\n\nconst attachCustomThemeStylesToHead = async (theme: string): Promise<void> => {\n\tconst link = document.querySelector(`[sap-ui-webcomponents-theme=\"${theme}\"]`);\n\n\tif (link) {\n\t\tdocument.head.removeChild(link);\n\t}\n\n\tawait createLinkInHead(formatThemeLink(theme), { \"sap-ui-webcomponents-theme\": theme });\n};\n\nexport {\n\tgetThemeRoot,\n\tsetThemeRoot,\n\tattachCustomThemeStylesToHead,\n};\n"],
5
+ "mappings": "aAAA,OAAOA,MAAsB,8BAC7B,OAAOC,MAAuB,0BAC9B,OAAS,gBAAgBC,MAA8B,6BACvD,OAAS,YAAAC,MAAgB,aACzB,OAAS,4BAAAC,MAAgC,0BAEzC,IAAIC,EAEJD,EAAyB,IAAM,CAC9BC,EAAgB,MACjB,CAAC,EASD,MAAMC,EAAe,KAChBD,IAAkB,SACrBA,EAAgBH,EAAuB,GAGjCG,GAmBFE,EAAgBC,GAAiD,CACtE,GAAIH,IAAkBG,EAMtB,IAFAH,EAAgBG,EAEZ,CAACP,EAAkBO,CAAS,EAAG,CAClC,QAAQ,KAAK,OAAOA,CAAS,0FAA0F,EACvH,MACD,CAEA,OAAOC,EAA8BN,EAAS,CAAC,EAChD,EAEMO,EAAmBC,GACjB,GAAGL,EAAa,CAAE,gBAAgBK,CAAK,qBAGzCF,EAAgC,MAAOE,GAAiC,CAC7E,MAAMC,EAAO,SAAS,cAAc,gCAAgCD,CAAK,IAAI,EAEzEC,GACH,SAAS,KAAK,YAAYA,CAAI,EAG/B,MAAMZ,EAAiBU,EAAgBC,CAAK,EAAG,CAAE,6BAA8BA,CAAM,CAAC,CACvF,EAEA,OACCL,KAAA,aACAC,KAAA,aACAE,KAAA",
6
+ "names": ["createLinkInHead", "validateThemeRoot", "getConfiguredThemeRoot", "getTheme", "attachConfigurationReset", "currThemeRoot", "getThemeRoot", "setThemeRoot", "themeRoot", "attachCustomThemeStylesToHead", "formatThemeLink", "theme", "link"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";import{getTimezone as i}from"../InitialConfiguration.js";let e;const r=()=>(e===void 0&&(e=i()),e),t=n=>{e!==n&&(e=n)};export{r as getTimezone,t as setTimezone};
1
+ "use strict";import{getTimezone as i}from"../InitialConfiguration.js";import{attachConfigurationReset as t}from"./ConfigurationReset.js";let e;t(()=>{e=void 0});const r=()=>(e===void 0&&(e=i()),e),o=n=>{e!==n&&(e=n)};export{r as getTimezone,o as setTimezone};
2
2
  //# sourceMappingURL=Timezone.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/config/Timezone.ts"],
4
- "sourcesContent": ["import { getTimezone as getConfiguredTimezone } from \"../InitialConfiguration.js\";\n\nlet currTimezone: string | undefined;\n\n/**\n * Returns the configured IANA timezone ID.\n *\n * @private\n * @returns {string}\n */\nconst getTimezone = (): string | undefined => {\n\tif (currTimezone === undefined) {\n\t\tcurrTimezone = getConfiguredTimezone();\n\t}\n\treturn currTimezone;\n};\n\n/**\n * Sets the IANA timezone ID.\n * **For example:** \"America/New_York\", \"Europe/London\", \"Australia/Sydney\", \"Asia/Bishkek\", etc.\n *>\n * @param {string} timezone\n * @private\n * @returns { Promise<void> }\n */\nconst setTimezone = (timezone: string) => {\n\tif (currTimezone === timezone) {\n\t\treturn;\n\t}\n\n\tcurrTimezone = timezone;\n};\n\nexport {\n\tgetTimezone,\n\tsetTimezone,\n};\n"],
5
- "mappings": "aAAA,OAAS,eAAeA,MAA6B,6BAErD,IAAIC,EAQJ,MAAMC,EAAc,KACfD,IAAiB,SACpBA,EAAeD,EAAsB,GAE/BC,GAWFE,EAAeC,GAAqB,CACrCH,IAAiBG,IAIrBH,EAAeG,EAChB,EAEA,OACCF,KAAA,YACAC,KAAA",
6
- "names": ["getConfiguredTimezone", "currTimezone", "getTimezone", "setTimezone", "timezone"]
4
+ "sourcesContent": ["import { getTimezone as getConfiguredTimezone } from \"../InitialConfiguration.js\";\nimport { attachConfigurationReset } from \"./ConfigurationReset.js\";\n\nlet currTimezone: string | undefined;\n\nattachConfigurationReset(() => {\n\tcurrTimezone = undefined;\n});\n\n/**\n * Returns the configured IANA timezone ID.\n *\n * @private\n * @returns {string}\n */\nconst getTimezone = (): string | undefined => {\n\tif (currTimezone === undefined) {\n\t\tcurrTimezone = getConfiguredTimezone();\n\t}\n\treturn currTimezone;\n};\n\n/**\n * Sets the IANA timezone ID.\n * **For example:** \"America/New_York\", \"Europe/London\", \"Australia/Sydney\", \"Asia/Bishkek\", etc.\n *>\n * @param {string} timezone\n * @private\n * @returns { Promise<void> }\n */\nconst setTimezone = (timezone: string) => {\n\tif (currTimezone === timezone) {\n\t\treturn;\n\t}\n\n\tcurrTimezone = timezone;\n};\n\nexport {\n\tgetTimezone,\n\tsetTimezone,\n};\n"],
5
+ "mappings": "aAAA,OAAS,eAAeA,MAA6B,6BACrD,OAAS,4BAAAC,MAAgC,0BAEzC,IAAIC,EAEJD,EAAyB,IAAM,CAC9BC,EAAe,MAChB,CAAC,EAQD,MAAMC,EAAc,KACfD,IAAiB,SACpBA,EAAeF,EAAsB,GAE/BE,GAWFE,EAAeC,GAAqB,CACrCH,IAAiBG,IAIrBH,EAAeG,EAChB,EAEA,OACCF,KAAA,YACAC,KAAA",
6
+ "names": ["getConfiguredTimezone", "attachConfigurationReset", "currTimezone", "getTimezone", "setTimezone", "timezone"]
7
7
  }
@@ -0,0 +1,2 @@
1
+ "use strict";import{getEnableDefaultTooltips as t}from"../InitialConfiguration.js";let e;const l=()=>(e===void 0&&(e=t()),e),a=o=>{e=o};export{l as getEnableDefaultTooltips,a as setEnableDefaultTooltips};
2
+ //# sourceMappingURL=Tooltips.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/config/Tooltips.ts"],
4
+ "sourcesContent": ["import { getEnableDefaultTooltips as getConfiguredEnableDefaultTooltips } from \"../InitialConfiguration.js\";\n\nlet _enableDefaultTooltips: boolean;\n\n/**\n * Returns if the \"enableDefaultTooltips\" configuration is set.\n * @public\n * @since 2.1.0\n * @returns { boolean }\n */\nconst getEnableDefaultTooltips = (): boolean => {\n\tif (_enableDefaultTooltips === undefined) {\n\t\t_enableDefaultTooltips = getConfiguredEnableDefaultTooltips();\n\t}\n\n\treturn _enableDefaultTooltips;\n};\n\n/**\n * Defines the \"enableDefaultTooltips\" setting.\n *\n * - When set to \"true\" (default), the components will display default tooltips.\n * - When set to \"false\", the components will NOT display default tooltips.\n *\n * @public\n * @since 2.1.0\n * @param { boolean } enableDefaultTooltips\n */\nconst setEnableDefaultTooltips = (enableDefaultTooltips: boolean) => {\n\t_enableDefaultTooltips = enableDefaultTooltips;\n};\n\nexport {\n\tgetEnableDefaultTooltips,\n\tsetEnableDefaultTooltips,\n};\n"],
5
+ "mappings": "aAAA,OAAS,4BAA4BA,MAA0C,6BAE/E,IAAIC,EAQJ,MAAMC,EAA2B,KAC5BD,IAA2B,SAC9BA,EAAyBD,EAAmC,GAGtDC,GAaFE,EAA4BC,GAAmC,CACpEH,EAAyBG,CAC1B,EAEA,OACCF,KAAA,yBACAC,KAAA",
6
+ "names": ["getConfiguredEnableDefaultTooltips", "_enableDefaultTooltips", "getEnableDefaultTooltips", "setEnableDefaultTooltips", "enableDefaultTooltips"]
7
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";const o=e=>(t,r)=>{Object.defineProperty(t,r,{get(){return this.shadowRoot?.querySelector(e)}})};export default o;
2
+ //# sourceMappingURL=query.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/decorators/query.ts"],
4
+ "sourcesContent": ["import type UI5Element from \"../UI5Element\";\n\ntype QueryDecorator = (target: UI5Element, propertyKey: string | symbol) => void;\n\n/**\n * A decorator that converts a class member into a getter that\n * executes a querySelector on the element's shadow DOM.\n *\n * @param { string } selector DOM String containing selector to match\n * @returns { QueryDecorator }\n *\n * ```ts\n * class MyComponnet extends UI5Element {\n * @query('.myComponentRoot')\n * root?: HTMLElement;\n *\n * render() {\n * return html`\n * <div class=\".root\">\n * \t\t </div>\n * `;\n * }\n * }\n * ```\n */\nconst query = (selector: string): QueryDecorator => {\n\treturn (target: any, propertyKey: string | symbol) => {\n\t\tObject.defineProperty(target, propertyKey, {\n\t\t\tget(this: UI5Element) {\n\t\t\t\treturn this.shadowRoot?.querySelector(selector) as HTMLElement;\n\t\t\t},\n\t\t});\n\t};\n};\n\nexport default query;\n"],
5
+ "mappings": "aAyBA,MAAMA,EAASC,GACP,CAACC,EAAaC,IAAiC,CACrD,OAAO,eAAeD,EAAQC,EAAa,CAC1C,KAAsB,CACrB,OAAO,KAAK,YAAY,cAAcF,CAAQ,CAC/C,CACD,CAAC,CACF,EAGD,eAAeD",
6
+ "names": ["query", "selector", "target", "propertyKey"]
7
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";const o=e=>(t,r)=>{Object.defineProperty(t,r,{get(){return this.shadowRoot?.querySelectorAll(e)}})};export default o;
2
+ //# sourceMappingURL=queryAll.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/decorators/queryAll.ts"],
4
+ "sourcesContent": ["import type UI5Element from \"../UI5Element\";\n\ntype QueryDecorator = (target: UI5Element, propertyKey: string | symbol) => void;\n\n/**\n * A decorator that converts a class member into a getter that\n * executes a querySelectorAll on the element's shadow DOM.\n *\n * @param { string } selector DOM String containing selector to match\n * @returns { QueryDecorator }\n *\n * ```ts\n * class MyComponnet extends UI5Element {\n * @queryAll('.item')\n * itemsDOM?: HTMLElement;\n *\n * render() {\n * return html`\n * \t\t <div>\n * \t<li class=\".item\"></li>\n * \t<li class=\".item\"></li>\n * \t\t </div>\n * `;\n * }\n * }\n * ```\n */\nconst queryAll = (selector: string): QueryDecorator => {\n\treturn (target: any, propertyKey: string | symbol) => {\n\t\tObject.defineProperty(target, propertyKey, {\n\t\t\tget(this: UI5Element) {\n\t\t\t\treturn this.shadowRoot?.querySelectorAll(selector);\n\t\t\t},\n\t\t});\n\t};\n};\n\nexport default queryAll;\n"],
5
+ "mappings": "aA2BA,MAAMA,EAAYC,GACV,CAACC,EAAaC,IAAiC,CACrD,OAAO,eAAeD,EAAQC,EAAa,CAC1C,KAAsB,CACrB,OAAO,KAAK,YAAY,iBAAiBF,CAAQ,CAClD,CACD,CAAC,CACF,EAGD,eAAeD",
6
+ "names": ["queryAll", "selector", "target", "propertyKey"]
7
+ }
@@ -1,2 +1,2 @@
1
- "use strict";const e={version:"2.1.1",major:2,minor:1,patch:1,suffix:"",isNext:!1,buildTime:1722611401};export default e;
1
+ "use strict";const e={version:"2.2.0-rc.1",major:2,minor:2,patch:0,suffix:"-rc.1",isNext:!1,buildTime:1723709287};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.1.1\",\n\tmajor: 2,\n\tminor: 1,\n\tpatch: 1,\n\tsuffix: \"\",\n\tisNext: false,\n\tbuildTime: 1722611401,\n};\nexport default VersionInfo;"],
5
- "mappings": "aAAA,MAAMA,EAAc,CACnB,QAAS,QACT,MAAO,EACP,MAAO,EACP,MAAO,EACP,OAAQ,GACR,OAAQ,GACR,UAAW,UACZ,EACA,eAAeA",
4
+ "sourcesContent": ["const VersionInfo = {\n\tversion: \"2.2.0-rc.1\",\n\tmajor: 2,\n\tminor: 2,\n\tpatch: 0,\n\tsuffix: \"-rc.1\",\n\tisNext: false,\n\tbuildTime: 1723709287,\n};\nexport default VersionInfo;"],
5
+ "mappings": "aAAA,MAAMA,EAAc,CACnB,QAAS,aACT,MAAO,EACP,MAAO,EACP,MAAO,EACP,OAAQ,QACR,OAAQ,GACR,UAAW,UACZ,EACA,eAAeA",
6
6
  "names": ["VersionInfo"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";const i=e=>{const t=document.querySelector(`META[name="${e}"]`);return t&&t.getAttribute("content")},o=e=>{const t=i("sap-allowedThemeOrigins");return t&&t.split(",").some(n=>n==="*"||e===n.trim())},s=(e,t)=>{const n=new URL(e).pathname;return new URL(n,t).toString()},a=e=>{let t;try{if(e.startsWith(".")||e.startsWith("/"))t=new URL(e,window.location.href).toString();else{const n=new URL(e),r=n.origin;r&&o(r)?t=n.toString():t=s(n.toString(),window.location.href)}return t.endsWith("/")||(t=`${t}/`),`${t}UI5/`}catch{}};export default a;
1
+ "use strict";import{getLocationHref as i}from"./Location.js";const o=e=>{const t=document.querySelector(`META[name="${e}"]`);return t&&t.getAttribute("content")},s=e=>{const t=o("sap-allowedThemeOrigins");return t&&t.split(",").some(n=>n==="*"||e===n.trim())},a=(e,t)=>{const n=new URL(e).pathname;return new URL(n,t).toString()},g=e=>{let t;try{if(e.startsWith(".")||e.startsWith("/"))t=new URL(e,i()).toString();else{const n=new URL(e),r=n.origin;r&&s(r)?t=n.toString():t=a(n.toString(),i())}return t.endsWith("/")||(t=`${t}/`),`${t}UI5/`}catch{}};export default g;
2
2
  //# sourceMappingURL=validateThemeRoot.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/validateThemeRoot.ts"],
4
- "sourcesContent": ["const getMetaTagValue = (metaTagName: string) => {\n\tconst metaTag = document.querySelector(`META[name=\"${metaTagName}\"]`),\n\t\tmetaTagContent = metaTag && metaTag.getAttribute(\"content\");\n\n\treturn metaTagContent;\n};\n\nconst validateThemeOrigin = (origin: string) => {\n\tconst allowedOrigins = getMetaTagValue(\"sap-allowedThemeOrigins\");\n\n\treturn allowedOrigins && allowedOrigins.split(\",\").some(allowedOrigin => {\n\t\treturn allowedOrigin === \"*\" || origin === allowedOrigin.trim();\n\t});\n};\n\nconst buildCorrectUrl = (oldUrl: string, newOrigin: string) => {\n\tconst oldUrlPath = new URL(oldUrl).pathname;\n\n\treturn new URL(oldUrlPath, newOrigin).toString();\n};\n\nconst validateThemeRoot = (themeRoot: string) => {\n\tlet resultUrl;\n\n\ttry {\n\t\tif (themeRoot.startsWith(\".\") || themeRoot.startsWith(\"/\")) {\n\t\t\t// Handle relative url\n\t\t\t// new URL(\"/newExmPath\", \"http://example.com/exmPath\") => http://example.com/newExmPath\n\t\t\t// new URL(\"./newExmPath\", \"http://example.com/exmPath\") => http://example.com/exmPath/newExmPath\n\t\t\t// new URL(\"../newExmPath\", \"http://example.com/exmPath\") => http://example.com/newExmPath\n\t\t\tresultUrl = new URL(themeRoot, window.location.href).toString();\n\t\t} else {\n\t\t\tconst themeRootURL = new URL(themeRoot);\n\t\t\tconst origin = themeRootURL.origin;\n\n\t\t\tif (origin && validateThemeOrigin(origin)) {\n\t\t\t\t// If origin is allowed, use it\n\t\t\t\tresultUrl = themeRootURL.toString();\n\t\t\t} else {\n\t\t\t\t// If origin is not allow and the URL is not relative, we have to replace the origin\n\t\t\t\t// with current location\n\t\t\t\tresultUrl = buildCorrectUrl(themeRootURL.toString(), window.location.href);\n\t\t\t}\n\t\t}\n\n\t\tif (!resultUrl.endsWith(\"/\")) {\n\t\t\tresultUrl = `${resultUrl}/`;\n\t\t}\n\n\t\treturn `${resultUrl}UI5/`;\n\t} catch (e) {\n\t\t// Catch if URL is not correct\n\t}\n};\n\nexport default validateThemeRoot;\n"],
5
- "mappings": "aAAA,MAAMA,EAAmBC,GAAwB,CAChD,MAAMC,EAAU,SAAS,cAAc,cAAcD,CAAW,IAAI,EAGpE,OAFkBC,GAAWA,EAAQ,aAAa,SAAS,CAG5D,EAEMC,EAAuBC,GAAmB,CAC/C,MAAMC,EAAiBL,EAAgB,yBAAyB,EAEhE,OAAOK,GAAkBA,EAAe,MAAM,GAAG,EAAE,KAAKC,GAChDA,IAAkB,KAAOF,IAAWE,EAAc,KAAK,CAC9D,CACF,EAEMC,EAAkB,CAACC,EAAgBC,IAAsB,CAC9D,MAAMC,EAAa,IAAI,IAAIF,CAAM,EAAE,SAEnC,OAAO,IAAI,IAAIE,EAAYD,CAAS,EAAE,SAAS,CAChD,EAEME,EAAqBC,GAAsB,CAChD,IAAIC,EAEJ,GAAI,CACH,GAAID,EAAU,WAAW,GAAG,GAAKA,EAAU,WAAW,GAAG,EAKxDC,EAAY,IAAI,IAAID,EAAW,OAAO,SAAS,IAAI,EAAE,SAAS,MACxD,CACN,MAAME,EAAe,IAAI,IAAIF,CAAS,EAChCR,EAASU,EAAa,OAExBV,GAAUD,EAAoBC,CAAM,EAEvCS,EAAYC,EAAa,SAAS,EAIlCD,EAAYN,EAAgBO,EAAa,SAAS,EAAG,OAAO,SAAS,IAAI,CAE3E,CAEA,OAAKD,EAAU,SAAS,GAAG,IAC1BA,EAAY,GAAGA,CAAS,KAGlB,GAAGA,CAAS,MACpB,MAAY,CAEZ,CACD,EAEA,eAAeF",
6
- "names": ["getMetaTagValue", "metaTagName", "metaTag", "validateThemeOrigin", "origin", "allowedOrigins", "allowedOrigin", "buildCorrectUrl", "oldUrl", "newOrigin", "oldUrlPath", "validateThemeRoot", "themeRoot", "resultUrl", "themeRootURL"]
4
+ "sourcesContent": ["import { getLocationHref } from \"./Location.js\";\n\nconst getMetaTagValue = (metaTagName: string) => {\n\tconst metaTag = document.querySelector(`META[name=\"${metaTagName}\"]`),\n\t\tmetaTagContent = metaTag && metaTag.getAttribute(\"content\");\n\n\treturn metaTagContent;\n};\n\nconst validateThemeOrigin = (origin: string) => {\n\tconst allowedOrigins = getMetaTagValue(\"sap-allowedThemeOrigins\");\n\n\treturn allowedOrigins && allowedOrigins.split(\",\").some(allowedOrigin => {\n\t\treturn allowedOrigin === \"*\" || origin === allowedOrigin.trim();\n\t});\n};\n\nconst buildCorrectUrl = (oldUrl: string, newOrigin: string) => {\n\tconst oldUrlPath = new URL(oldUrl).pathname;\n\n\treturn new URL(oldUrlPath, newOrigin).toString();\n};\n\nconst validateThemeRoot = (themeRoot: string) => {\n\tlet resultUrl;\n\n\ttry {\n\t\tif (themeRoot.startsWith(\".\") || themeRoot.startsWith(\"/\")) {\n\t\t\t// Handle relative url\n\t\t\t// new URL(\"/newExmPath\", \"http://example.com/exmPath\") => http://example.com/newExmPath\n\t\t\t// new URL(\"./newExmPath\", \"http://example.com/exmPath\") => http://example.com/exmPath/newExmPath\n\t\t\t// new URL(\"../newExmPath\", \"http://example.com/exmPath\") => http://example.com/newExmPath\n\t\t\tresultUrl = new URL(themeRoot, getLocationHref()).toString();\n\t\t} else {\n\t\t\tconst themeRootURL = new URL(themeRoot);\n\t\t\tconst origin = themeRootURL.origin;\n\n\t\t\tif (origin && validateThemeOrigin(origin)) {\n\t\t\t\t// If origin is allowed, use it\n\t\t\t\tresultUrl = themeRootURL.toString();\n\t\t\t} else {\n\t\t\t\t// If origin is not allow and the URL is not relative, we have to replace the origin\n\t\t\t\t// with current location\n\t\t\t\tresultUrl = buildCorrectUrl(themeRootURL.toString(), getLocationHref());\n\t\t\t}\n\t\t}\n\n\t\tif (!resultUrl.endsWith(\"/\")) {\n\t\t\tresultUrl = `${resultUrl}/`;\n\t\t}\n\n\t\treturn `${resultUrl}UI5/`;\n\t} catch (e) {\n\t\t// Catch if URL is not correct\n\t}\n};\n\nexport default validateThemeRoot;\n"],
5
+ "mappings": "aAAA,OAAS,mBAAAA,MAAuB,gBAEhC,MAAMC,EAAmBC,GAAwB,CAChD,MAAMC,EAAU,SAAS,cAAc,cAAcD,CAAW,IAAI,EAGpE,OAFkBC,GAAWA,EAAQ,aAAa,SAAS,CAG5D,EAEMC,EAAuBC,GAAmB,CAC/C,MAAMC,EAAiBL,EAAgB,yBAAyB,EAEhE,OAAOK,GAAkBA,EAAe,MAAM,GAAG,EAAE,KAAKC,GAChDA,IAAkB,KAAOF,IAAWE,EAAc,KAAK,CAC9D,CACF,EAEMC,EAAkB,CAACC,EAAgBC,IAAsB,CAC9D,MAAMC,EAAa,IAAI,IAAIF,CAAM,EAAE,SAEnC,OAAO,IAAI,IAAIE,EAAYD,CAAS,EAAE,SAAS,CAChD,EAEME,EAAqBC,GAAsB,CAChD,IAAIC,EAEJ,GAAI,CACH,GAAID,EAAU,WAAW,GAAG,GAAKA,EAAU,WAAW,GAAG,EAKxDC,EAAY,IAAI,IAAID,EAAWb,EAAgB,CAAC,EAAE,SAAS,MACrD,CACN,MAAMe,EAAe,IAAI,IAAIF,CAAS,EAChCR,EAASU,EAAa,OAExBV,GAAUD,EAAoBC,CAAM,EAEvCS,EAAYC,EAAa,SAAS,EAIlCD,EAAYN,EAAgBO,EAAa,SAAS,EAAGf,EAAgB,CAAC,CAExE,CAEA,OAAKc,EAAU,SAAS,GAAG,IAC1BA,EAAY,GAAGA,CAAS,KAGlB,GAAGA,CAAS,MACpB,MAAY,CAEZ,CACD,EAEA,eAAeF",
6
+ "names": ["getLocationHref", "getMetaTagValue", "metaTagName", "metaTag", "validateThemeOrigin", "origin", "allowedOrigins", "allowedOrigin", "buildCorrectUrl", "oldUrl", "newOrigin", "oldUrlPath", "validateThemeRoot", "themeRoot", "resultUrl", "themeRootURL"]
7
7
  }
@@ -1,3 +1,4 @@
1
+ import { getLocationHref } from "./Location.js";
1
2
  const getMetaTagValue = (metaTagName) => {
2
3
  const metaTag = document.querySelector(`META[name="${metaTagName}"]`), metaTagContent = metaTag && metaTag.getAttribute("content");
3
4
  return metaTagContent;
@@ -20,7 +21,7 @@ const validateThemeRoot = (themeRoot) => {
20
21
  // new URL("/newExmPath", "http://example.com/exmPath") => http://example.com/newExmPath
21
22
  // new URL("./newExmPath", "http://example.com/exmPath") => http://example.com/exmPath/newExmPath
22
23
  // new URL("../newExmPath", "http://example.com/exmPath") => http://example.com/newExmPath
23
- resultUrl = new URL(themeRoot, window.location.href).toString();
24
+ resultUrl = new URL(themeRoot, getLocationHref()).toString();
24
25
  }
25
26
  else {
26
27
  const themeRootURL = new URL(themeRoot);
@@ -32,7 +33,7 @@ const validateThemeRoot = (themeRoot) => {
32
33
  else {
33
34
  // If origin is not allow and the URL is not relative, we have to replace the origin
34
35
  // with current location
35
- resultUrl = buildCorrectUrl(themeRootURL.toString(), window.location.href);
36
+ resultUrl = buildCorrectUrl(themeRootURL.toString(), getLocationHref());
36
37
  }
37
38
  }
38
39
  if (!resultUrl.endsWith("/")) {
@@ -1 +1 @@
1
- {"version":3,"file":"validateThemeRoot.js","sourceRoot":"","sources":["../src/validateThemeRoot.ts"],"names":[],"mappings":"AAAA,MAAM,eAAe,GAAG,CAAC,WAAmB,EAAE,EAAE;IAC/C,MAAM,OAAO,GAAG,QAAQ,CAAC,aAAa,CAAC,cAAc,WAAW,IAAI,CAAC,EACpE,cAAc,GAAG,OAAO,IAAI,OAAO,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC;IAE7D,OAAO,cAAc,CAAC;AACvB,CAAC,CAAC;AAEF,MAAM,mBAAmB,GAAG,CAAC,MAAc,EAAE,EAAE;IAC9C,MAAM,cAAc,GAAG,eAAe,CAAC,yBAAyB,CAAC,CAAC;IAElE,OAAO,cAAc,IAAI,cAAc,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,EAAE;QACvE,OAAO,aAAa,KAAK,GAAG,IAAI,MAAM,KAAK,aAAa,CAAC,IAAI,EAAE,CAAC;IACjE,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,eAAe,GAAG,CAAC,MAAc,EAAE,SAAiB,EAAE,EAAE;IAC7D,MAAM,UAAU,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC;IAE5C,OAAO,IAAI,GAAG,CAAC,UAAU,EAAE,SAAS,CAAC,CAAC,QAAQ,EAAE,CAAC;AAClD,CAAC,CAAC;AAEF,MAAM,iBAAiB,GAAG,CAAC,SAAiB,EAAE,EAAE;IAC/C,IAAI,SAAS,CAAC;IAEd,IAAI;QACH,IAAI,SAAS,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,SAAS,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE;YAC3D,sBAAsB;YACtB,wFAAwF;YACxF,iGAAiG;YACjG,0FAA0F;YAC1F,SAAS,GAAG,IAAI,GAAG,CAAC,SAAS,EAAE,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,CAAC;SAChE;aAAM;YACN,MAAM,YAAY,GAAG,IAAI,GAAG,CAAC,SAAS,CAAC,CAAC;YACxC,MAAM,MAAM,GAAG,YAAY,CAAC,MAAM,CAAC;YAEnC,IAAI,MAAM,IAAI,mBAAmB,CAAC,MAAM,CAAC,EAAE;gBAC1C,+BAA+B;gBAC/B,SAAS,GAAG,YAAY,CAAC,QAAQ,EAAE,CAAC;aACpC;iBAAM;gBACN,oFAAoF;gBACpF,wBAAwB;gBACxB,SAAS,GAAG,eAAe,CAAC,YAAY,CAAC,QAAQ,EAAE,EAAE,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;aAC3E;SACD;QAED,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;YAC7B,SAAS,GAAG,GAAG,SAAS,GAAG,CAAC;SAC5B;QAED,OAAO,GAAG,SAAS,MAAM,CAAC;KAC1B;IAAC,OAAO,CAAC,EAAE;QACX,8BAA8B;KAC9B;AACF,CAAC,CAAC;AAEF,eAAe,iBAAiB,CAAC","sourcesContent":["const getMetaTagValue = (metaTagName: string) => {\n\tconst metaTag = document.querySelector(`META[name=\"${metaTagName}\"]`),\n\t\tmetaTagContent = metaTag && metaTag.getAttribute(\"content\");\n\n\treturn metaTagContent;\n};\n\nconst validateThemeOrigin = (origin: string) => {\n\tconst allowedOrigins = getMetaTagValue(\"sap-allowedThemeOrigins\");\n\n\treturn allowedOrigins && allowedOrigins.split(\",\").some(allowedOrigin => {\n\t\treturn allowedOrigin === \"*\" || origin === allowedOrigin.trim();\n\t});\n};\n\nconst buildCorrectUrl = (oldUrl: string, newOrigin: string) => {\n\tconst oldUrlPath = new URL(oldUrl).pathname;\n\n\treturn new URL(oldUrlPath, newOrigin).toString();\n};\n\nconst validateThemeRoot = (themeRoot: string) => {\n\tlet resultUrl;\n\n\ttry {\n\t\tif (themeRoot.startsWith(\".\") || themeRoot.startsWith(\"/\")) {\n\t\t\t// Handle relative url\n\t\t\t// new URL(\"/newExmPath\", \"http://example.com/exmPath\") => http://example.com/newExmPath\n\t\t\t// new URL(\"./newExmPath\", \"http://example.com/exmPath\") => http://example.com/exmPath/newExmPath\n\t\t\t// new URL(\"../newExmPath\", \"http://example.com/exmPath\") => http://example.com/newExmPath\n\t\t\tresultUrl = new URL(themeRoot, window.location.href).toString();\n\t\t} else {\n\t\t\tconst themeRootURL = new URL(themeRoot);\n\t\t\tconst origin = themeRootURL.origin;\n\n\t\t\tif (origin && validateThemeOrigin(origin)) {\n\t\t\t\t// If origin is allowed, use it\n\t\t\t\tresultUrl = themeRootURL.toString();\n\t\t\t} else {\n\t\t\t\t// If origin is not allow and the URL is not relative, we have to replace the origin\n\t\t\t\t// with current location\n\t\t\t\tresultUrl = buildCorrectUrl(themeRootURL.toString(), window.location.href);\n\t\t\t}\n\t\t}\n\n\t\tif (!resultUrl.endsWith(\"/\")) {\n\t\t\tresultUrl = `${resultUrl}/`;\n\t\t}\n\n\t\treturn `${resultUrl}UI5/`;\n\t} catch (e) {\n\t\t// Catch if URL is not correct\n\t}\n};\n\nexport default validateThemeRoot;\n"]}
1
+ {"version":3,"file":"validateThemeRoot.js","sourceRoot":"","sources":["../src/validateThemeRoot.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAEhD,MAAM,eAAe,GAAG,CAAC,WAAmB,EAAE,EAAE;IAC/C,MAAM,OAAO,GAAG,QAAQ,CAAC,aAAa,CAAC,cAAc,WAAW,IAAI,CAAC,EACpE,cAAc,GAAG,OAAO,IAAI,OAAO,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC;IAE7D,OAAO,cAAc,CAAC;AACvB,CAAC,CAAC;AAEF,MAAM,mBAAmB,GAAG,CAAC,MAAc,EAAE,EAAE;IAC9C,MAAM,cAAc,GAAG,eAAe,CAAC,yBAAyB,CAAC,CAAC;IAElE,OAAO,cAAc,IAAI,cAAc,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,EAAE;QACvE,OAAO,aAAa,KAAK,GAAG,IAAI,MAAM,KAAK,aAAa,CAAC,IAAI,EAAE,CAAC;IACjE,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,eAAe,GAAG,CAAC,MAAc,EAAE,SAAiB,EAAE,EAAE;IAC7D,MAAM,UAAU,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC;IAE5C,OAAO,IAAI,GAAG,CAAC,UAAU,EAAE,SAAS,CAAC,CAAC,QAAQ,EAAE,CAAC;AAClD,CAAC,CAAC;AAEF,MAAM,iBAAiB,GAAG,CAAC,SAAiB,EAAE,EAAE;IAC/C,IAAI,SAAS,CAAC;IAEd,IAAI;QACH,IAAI,SAAS,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,SAAS,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE;YAC3D,sBAAsB;YACtB,wFAAwF;YACxF,iGAAiG;YACjG,0FAA0F;YAC1F,SAAS,GAAG,IAAI,GAAG,CAAC,SAAS,EAAE,eAAe,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC;SAC7D;aAAM;YACN,MAAM,YAAY,GAAG,IAAI,GAAG,CAAC,SAAS,CAAC,CAAC;YACxC,MAAM,MAAM,GAAG,YAAY,CAAC,MAAM,CAAC;YAEnC,IAAI,MAAM,IAAI,mBAAmB,CAAC,MAAM,CAAC,EAAE;gBAC1C,+BAA+B;gBAC/B,SAAS,GAAG,YAAY,CAAC,QAAQ,EAAE,CAAC;aACpC;iBAAM;gBACN,oFAAoF;gBACpF,wBAAwB;gBACxB,SAAS,GAAG,eAAe,CAAC,YAAY,CAAC,QAAQ,EAAE,EAAE,eAAe,EAAE,CAAC,CAAC;aACxE;SACD;QAED,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;YAC7B,SAAS,GAAG,GAAG,SAAS,GAAG,CAAC;SAC5B;QAED,OAAO,GAAG,SAAS,MAAM,CAAC;KAC1B;IAAC,OAAO,CAAC,EAAE;QACX,8BAA8B;KAC9B;AACF,CAAC,CAAC;AAEF,eAAe,iBAAiB,CAAC","sourcesContent":["import { getLocationHref } from \"./Location.js\";\n\nconst getMetaTagValue = (metaTagName: string) => {\n\tconst metaTag = document.querySelector(`META[name=\"${metaTagName}\"]`),\n\t\tmetaTagContent = metaTag && metaTag.getAttribute(\"content\");\n\n\treturn metaTagContent;\n};\n\nconst validateThemeOrigin = (origin: string) => {\n\tconst allowedOrigins = getMetaTagValue(\"sap-allowedThemeOrigins\");\n\n\treturn allowedOrigins && allowedOrigins.split(\",\").some(allowedOrigin => {\n\t\treturn allowedOrigin === \"*\" || origin === allowedOrigin.trim();\n\t});\n};\n\nconst buildCorrectUrl = (oldUrl: string, newOrigin: string) => {\n\tconst oldUrlPath = new URL(oldUrl).pathname;\n\n\treturn new URL(oldUrlPath, newOrigin).toString();\n};\n\nconst validateThemeRoot = (themeRoot: string) => {\n\tlet resultUrl;\n\n\ttry {\n\t\tif (themeRoot.startsWith(\".\") || themeRoot.startsWith(\"/\")) {\n\t\t\t// Handle relative url\n\t\t\t// new URL(\"/newExmPath\", \"http://example.com/exmPath\") => http://example.com/newExmPath\n\t\t\t// new URL(\"./newExmPath\", \"http://example.com/exmPath\") => http://example.com/exmPath/newExmPath\n\t\t\t// new URL(\"../newExmPath\", \"http://example.com/exmPath\") => http://example.com/newExmPath\n\t\t\tresultUrl = new URL(themeRoot, getLocationHref()).toString();\n\t\t} else {\n\t\t\tconst themeRootURL = new URL(themeRoot);\n\t\t\tconst origin = themeRootURL.origin;\n\n\t\t\tif (origin && validateThemeOrigin(origin)) {\n\t\t\t\t// If origin is allowed, use it\n\t\t\t\tresultUrl = themeRootURL.toString();\n\t\t\t} else {\n\t\t\t\t// If origin is not allow and the URL is not relative, we have to replace the origin\n\t\t\t\t// with current location\n\t\t\t\tresultUrl = buildCorrectUrl(themeRootURL.toString(), getLocationHref());\n\t\t\t}\n\t\t}\n\n\t\tif (!resultUrl.endsWith(\"/\")) {\n\t\t\tresultUrl = `${resultUrl}/`;\n\t\t}\n\n\t\treturn `${resultUrl}UI5/`;\n\t} catch (e) {\n\t\t// Catch if URL is not correct\n\t}\n};\n\nexport default validateThemeRoot;\n"]}
@@ -42,7 +42,8 @@ const scripts = {
42
42
  generateStyles: `node "${stylesScript}"`,
43
43
  // these files are ignored in TS because the import in UI5Elments tries to load them from the dist and throws an error. create them empty here
44
44
  generateSsrDom: `yarn nodetouch dist/ssr-dom.js dist/ssr-dom.d.ts`,
45
- generateTemplates: `mkdirp src/generated/templates && cross-env UI5_BASE=true UI5_TS=true node "${LIB}/hbs2ui5/index.js" -d test/elements -o src/generated/templates`,
45
+ generateTemplates: ``,
46
+ generateTestTemplates: `mkdirp test/test-elements/generated/templates && cross-env UI5_BASE=true UI5_TS=true node "${LIB}/hbs2ui5/index.js" -d test/test-elements -o test/test-elements/generated/templates`,
46
47
  generateProd: {
47
48
  "default": "nps generateProd.remove-dev-mode generateProd.copy-prod",
48
49
  "remove-dev-mode": `node "${LIB}/remove-dev-mode/remove-dev-mode.mjs"`,
@@ -61,10 +62,11 @@ const scripts = {
61
62
  styles: 'chokidar "src/css/*.css" -c "nps generateStyles"'
62
63
  },
63
64
  test: {
64
- default: 'concurrently "nps test.wdio" "nps test.ssr" "nps test.ssr2"',
65
+ default: 'concurrently "nps test.ssr" "nps test.ssr2" "nps test.test-cy-ci"',
65
66
  ssr: `mocha test/ssr`,
66
67
  ssr2: "node -e \"import('./dist/Device.js')\"",
67
- wdio: `node "${LIB}/test-runner/test-runner.js"`
68
+ "test-cy-ci": `nps generate && nps generateTestTemplates && cross-env UI5_BASE=true yarn cypress run --component --browser chrome`,
69
+ "test-cy-open": `nps generate && nps generateTestTemplates && cross-env UI5_BASE=true yarn cypress open --component --browser chrome`,
68
70
  },
69
71
  };
70
72
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ui5/webcomponents-base",
3
- "version": "2.1.1",
3
+ "version": "2.2.0-rc.1",
4
4
  "description": "UI5 Web Components: webcomponents.base",
5
5
  "author": "SAP SE (https://www.sap.com)",
6
6
  "license": "Apache-2.0",
@@ -43,6 +43,7 @@
43
43
  "generateProd": "nps generateProd",
44
44
  "bundle": "nps build.bundle",
45
45
  "test": "nps test",
46
+ "test:cypress:open": "nps test.test-cy-open",
46
47
  "prepublishOnly": "tsc -b"
47
48
  },
48
49
  "dependencies": {
@@ -51,7 +52,7 @@
51
52
  },
52
53
  "devDependencies": {
53
54
  "@openui5/sap.ui.core": "1.120.17",
54
- "@ui5/webcomponents-tools": "2.1.1",
55
+ "@ui5/webcomponents-tools": "2.2.0-rc.1",
55
56
  "chromedriver": "^126.0.0",
56
57
  "clean-css": "^5.2.2",
57
58
  "copy-and-watch": "^0.1.5",
@@ -62,5 +63,5 @@
62
63
  "resolve": "^1.20.0",
63
64
  "touch": "^3.1.0"
64
65
  },
65
- "gitHead": "fc11d8831e60a1ae88e89affeeef2c9dd1937be0"
66
+ "gitHead": "a9c2d71dd33a061700108410c9e9ad4dcc1046a8"
66
67
  }
package/tsconfig.json CHANGED
@@ -1,20 +1,20 @@
1
1
  {
2
- "include": ["src/**/*", "src/global.d.ts"],
3
- // ssr-dom is imported with bare specifier so that conditional exports are used, but this treats it as input and output, so ignore it
4
- "exclude": ["src/ssr-dom.ts"],
5
- "compilerOptions": {
6
- "target": "ES2021",
7
- "lib": ["DOM", "DOM.Iterable", "ES2023"],
8
- // Generate d.ts files
9
- "declaration": true,
10
- "outDir": "dist",
11
- "skipLibCheck": true,
12
- "sourceMap": true,
13
- "inlineSources": true,
14
- "strict": true,
15
- "moduleResolution": "node",
16
- "composite": true,
17
- "rootDir": "src",
18
- "tsBuildInfoFile": "dist/.tsbuildinfo",
19
- },
20
- }
2
+ "extends": "@ui5/webcomponents-tools/tsconfig.json",
3
+ "include": [
4
+ "src/**/*",
5
+ "src/global.d.ts",
6
+ ],
7
+ // ssr-dom is imported with bare specifier so that conditional exports are used, but this treats it as input and output, so ignore it
8
+ "exclude": [
9
+ "src/ssr-dom.ts",
10
+ "src/generated/template/WithComplexTemplateTemplate.lit.ts"
11
+ ],
12
+ "compilerOptions": {
13
+ "types": ["@ui5/webcomponents-tools"],
14
+ "outDir": "dist",
15
+ "composite": true,
16
+ "rootDir": "src",
17
+ "experimentalDecorators": true,
18
+ "tsBuildInfoFile": "dist/.tsbuildinfobuild",
19
+ },
20
+ }