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

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 +18 -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 +10 -0
  28. package/dist/Location.js +43 -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 +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;AAE5C,IAAI,QAAgB,CAAC;AAErB;;;;GAIG;AACH,MAAM,QAAQ,GAAG,GAAW,EAAE;IAC7B,IAAI,QAAQ,KAAK,SAAS,EAAE;QAC3B,QAAQ,GAAG,kBAAkB,EAAE,CAAC;KAChC;IAED,OAAO,QAAQ,CAAC;AACjB,CAAC,CAAC;AAEF;;;;;GAKG;AACH,MAAM,QAAQ,GAAG,KAAK,EAAE,KAAa,EAAiB,EAAE;IACvD,IAAI,QAAQ,KAAK,KAAK,EAAE;QACvB,OAAO;KACP;IAED,QAAQ,GAAG,KAAK,CAAC;IAEjB,IAAI,QAAQ,EAAE,EAAE;QACf,+BAA+B;QAC/B,MAAM,UAAU,CAAC,QAAQ,CAAC,CAAC;QAC3B,MAAM,sBAAsB,CAAC,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC,CAAC;KACnD;AACF,CAAC,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,eAAe,GAAG,GAAW,EAAE;IACpC,OAAO,aAAa,CAAC;AACtB,CAAC,CAAC;AAEF;;;;;GAKG;AACH,MAAM,OAAO,GAAG,CAAC,KAAa,EAAE,EAAE;IACjC,MAAM,YAAY,GAAG,QAAQ,EAAE,CAAC;IAChC,OAAO,YAAY,KAAK,KAAK,IAAI,YAAY,KAAK,GAAG,KAAK,MAAM,CAAC;AAClE,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;QAChC,OAAO,CAAC,qBAAqB,EAAE,EAAE,aAAa,EAAE,UAAU,CAAC,aAAa,CAAC,CAAC;KAC1E;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,OAAO,EACN,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,mBAAmB,EACnB,wBAAwB,EACxB,eAAe,GACf,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\";\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"]}
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;AAEnE,IAAI,QAA4B,CAAC;AAEjC,wBAAwB,CAAC,GAAG,EAAE;IAC7B,QAAQ,GAAG,SAAS,CAAC;AACtB,CAAC,CAAC,CAAC;AAEH;;;;GAIG;AACH,MAAM,QAAQ,GAAG,GAAW,EAAE;IAC7B,IAAI,QAAQ,KAAK,SAAS,EAAE;QAC3B,QAAQ,GAAG,kBAAkB,EAAE,CAAC;KAChC;IAED,OAAO,QAAQ,CAAC;AACjB,CAAC,CAAC;AAEF;;;;;GAKG;AACH,MAAM,QAAQ,GAAG,KAAK,EAAE,KAAa,EAAiB,EAAE;IACvD,IAAI,QAAQ,KAAK,KAAK,EAAE;QACvB,OAAO;KACP;IAED,QAAQ,GAAG,KAAK,CAAC;IAEjB,IAAI,QAAQ,EAAE,EAAE;QACf,+BAA+B;QAC/B,MAAM,UAAU,CAAC,QAAQ,CAAC,CAAC;QAC3B,MAAM,sBAAsB,CAAC,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC,CAAC;KACnD;AACF,CAAC,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,eAAe,GAAG,GAAW,EAAE;IACpC,OAAO,aAAa,CAAC;AACtB,CAAC,CAAC;AAEF;;;;;GAKG;AACH,MAAM,OAAO,GAAG,CAAC,KAAa,EAAE,EAAE;IACjC,MAAM,YAAY,GAAG,QAAQ,EAAE,CAAC;IAChC,OAAO,YAAY,KAAK,KAAK,IAAI,YAAY,KAAK,GAAG,KAAK,MAAM,CAAC;AAClE,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;QAChC,OAAO,CAAC,qBAAqB,EAAE,EAAE,aAAa,EAAE,UAAU,CAAC,aAAa,CAAC,CAAC;KAC1E;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,OAAO,EACN,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,mBAAmB,EACnB,wBAAwB,EACxB,eAAe,GACf,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\";\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"]}
@@ -2,7 +2,11 @@ import createLinkInHead from "../util/createLinkInHead.js";
2
2
  import validateThemeRoot from "../validateThemeRoot.js";
3
3
  import { getThemeRoot as getConfiguredThemeRoot } from "../InitialConfiguration.js";
4
4
  import { getTheme } from "./Theme.js";
5
+ import { attachConfigurationReset } from "./ConfigurationReset.js";
5
6
  let currThemeRoot;
7
+ attachConfigurationReset(() => {
8
+ currThemeRoot = undefined;
9
+ });
6
10
  /**
7
11
  * Returns the current theme root.
8
12
  *
@@ -1 +1 @@
1
- {"version":3,"file":"ThemeRoot.js","sourceRoot":"","sources":["../../src/config/ThemeRoot.ts"],"names":[],"mappings":"AAAA,OAAO,gBAAgB,MAAM,6BAA6B,CAAC;AAC3D,OAAO,iBAAiB,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,YAAY,IAAI,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AACpF,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,IAAI,aAAiC,CAAC;AAEtC;;;;;;GAMG;AACH,MAAM,YAAY,GAAG,GAAuB,EAAE;IAC7C,IAAI,aAAa,KAAK,SAAS,EAAE;QAChC,aAAa,GAAG,sBAAsB,EAAE,CAAC;KACzC;IAED,OAAO,aAAa,CAAC;AACtB,CAAC,CAAC;AAEF;;;;;;;;;;;;;;;GAeG;AACH,MAAM,YAAY,GAAG,CAAC,SAAiB,EAA6B,EAAE;IACrE,IAAI,aAAa,KAAK,SAAS,EAAE;QAChC,OAAO;KACP;IAED,aAAa,GAAG,SAAS,CAAC;IAE1B,IAAI,CAAC,iBAAiB,CAAC,SAAS,CAAC,EAAE;QAClC,OAAO,CAAC,IAAI,CAAC,OAAO,SAAS,0FAA0F,CAAC,CAAC,CAAC,sBAAsB;QAChJ,OAAO;KACP;IAED,OAAO,6BAA6B,CAAC,QAAQ,EAAE,CAAC,CAAC;AAClD,CAAC,CAAC;AAEF,MAAM,eAAe,GAAG,CAAC,KAAa,EAAE,EAAE;IACzC,OAAO,GAAG,YAAY,EAAG,gBAAgB,KAAK,oBAAoB,CAAC,CAAC,0CAA0C;AAC/G,CAAC,CAAC;AAEF,MAAM,6BAA6B,GAAG,KAAK,EAAE,KAAa,EAAiB,EAAE;IAC5E,MAAM,IAAI,GAAG,QAAQ,CAAC,aAAa,CAAC,gCAAgC,KAAK,IAAI,CAAC,CAAC;IAE/E,IAAI,IAAI,EAAE;QACT,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;KAChC;IAED,MAAM,gBAAgB,CAAC,eAAe,CAAC,KAAK,CAAC,EAAE,EAAE,4BAA4B,EAAE,KAAK,EAAE,CAAC,CAAC;AACzF,CAAC,CAAC;AAEF,OAAO,EACN,YAAY,EACZ,YAAY,EACZ,6BAA6B,GAC7B,CAAC","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"]}
1
+ {"version":3,"file":"ThemeRoot.js","sourceRoot":"","sources":["../../src/config/ThemeRoot.ts"],"names":[],"mappings":"AAAA,OAAO,gBAAgB,MAAM,6BAA6B,CAAC;AAC3D,OAAO,iBAAiB,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,YAAY,IAAI,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AACpF,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AAEnE,IAAI,aAAiC,CAAC;AAEtC,wBAAwB,CAAC,GAAG,EAAE;IAC7B,aAAa,GAAG,SAAS,CAAC;AAC3B,CAAC,CAAC,CAAC;AAEH;;;;;;GAMG;AACH,MAAM,YAAY,GAAG,GAAuB,EAAE;IAC7C,IAAI,aAAa,KAAK,SAAS,EAAE;QAChC,aAAa,GAAG,sBAAsB,EAAE,CAAC;KACzC;IAED,OAAO,aAAa,CAAC;AACtB,CAAC,CAAC;AAEF;;;;;;;;;;;;;;;GAeG;AACH,MAAM,YAAY,GAAG,CAAC,SAAiB,EAA6B,EAAE;IACrE,IAAI,aAAa,KAAK,SAAS,EAAE;QAChC,OAAO;KACP;IAED,aAAa,GAAG,SAAS,CAAC;IAE1B,IAAI,CAAC,iBAAiB,CAAC,SAAS,CAAC,EAAE;QAClC,OAAO,CAAC,IAAI,CAAC,OAAO,SAAS,0FAA0F,CAAC,CAAC,CAAC,sBAAsB;QAChJ,OAAO;KACP;IAED,OAAO,6BAA6B,CAAC,QAAQ,EAAE,CAAC,CAAC;AAClD,CAAC,CAAC;AAEF,MAAM,eAAe,GAAG,CAAC,KAAa,EAAE,EAAE;IACzC,OAAO,GAAG,YAAY,EAAG,gBAAgB,KAAK,oBAAoB,CAAC,CAAC,0CAA0C;AAC/G,CAAC,CAAC;AAEF,MAAM,6BAA6B,GAAG,KAAK,EAAE,KAAa,EAAiB,EAAE;IAC5E,MAAM,IAAI,GAAG,QAAQ,CAAC,aAAa,CAAC,gCAAgC,KAAK,IAAI,CAAC,CAAC;IAE/E,IAAI,IAAI,EAAE;QACT,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;KAChC;IAED,MAAM,gBAAgB,CAAC,eAAe,CAAC,KAAK,CAAC,EAAE,EAAE,4BAA4B,EAAE,KAAK,EAAE,CAAC,CAAC;AACzF,CAAC,CAAC;AAEF,OAAO,EACN,YAAY,EACZ,YAAY,EACZ,6BAA6B,GAC7B,CAAC","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"]}
@@ -1,5 +1,9 @@
1
1
  import { getTimezone as getConfiguredTimezone } from "../InitialConfiguration.js";
2
+ import { attachConfigurationReset } from "./ConfigurationReset.js";
2
3
  let currTimezone;
4
+ attachConfigurationReset(() => {
5
+ currTimezone = undefined;
6
+ });
3
7
  /**
4
8
  * Returns the configured IANA timezone ID.
5
9
  *
@@ -1 +1 @@
1
- {"version":3,"file":"Timezone.js","sourceRoot":"","sources":["../../src/config/Timezone.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,IAAI,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAElF,IAAI,YAAgC,CAAC;AAErC;;;;;GAKG;AACH,MAAM,WAAW,GAAG,GAAuB,EAAE;IAC5C,IAAI,YAAY,KAAK,SAAS,EAAE;QAC/B,YAAY,GAAG,qBAAqB,EAAE,CAAC;KACvC;IACD,OAAO,YAAY,CAAC;AACrB,CAAC,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,WAAW,GAAG,CAAC,QAAgB,EAAE,EAAE;IACxC,IAAI,YAAY,KAAK,QAAQ,EAAE;QAC9B,OAAO;KACP;IAED,YAAY,GAAG,QAAQ,CAAC;AACzB,CAAC,CAAC;AAEF,OAAO,EACN,WAAW,EACX,WAAW,GACX,CAAC","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"]}
1
+ {"version":3,"file":"Timezone.js","sourceRoot":"","sources":["../../src/config/Timezone.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,IAAI,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAClF,OAAO,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AAEnE,IAAI,YAAgC,CAAC;AAErC,wBAAwB,CAAC,GAAG,EAAE;IAC7B,YAAY,GAAG,SAAS,CAAC;AAC1B,CAAC,CAAC,CAAC;AAEH;;;;;GAKG;AACH,MAAM,WAAW,GAAG,GAAuB,EAAE;IAC5C,IAAI,YAAY,KAAK,SAAS,EAAE;QAC/B,YAAY,GAAG,qBAAqB,EAAE,CAAC;KACvC;IACD,OAAO,YAAY,CAAC;AACrB,CAAC,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,WAAW,GAAG,CAAC,QAAgB,EAAE,EAAE;IACxC,IAAI,YAAY,KAAK,QAAQ,EAAE;QAC9B,OAAO;KACP;IAED,YAAY,GAAG,QAAQ,CAAC;AACzB,CAAC,CAAC;AAEF,OAAO,EACN,WAAW,EACX,WAAW,GACX,CAAC","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"]}
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Returns if the "enableDefaultTooltips" configuration is set.
3
+ * @public
4
+ * @since 2.1.0
5
+ * @returns { boolean }
6
+ */
7
+ declare const getEnableDefaultTooltips: () => boolean;
8
+ /**
9
+ * Defines the "enableDefaultTooltips" setting.
10
+ *
11
+ * - When set to "true" (default), the components will display default tooltips.
12
+ * - When set to "false", the components will NOT display default tooltips.
13
+ *
14
+ * @public
15
+ * @since 2.1.0
16
+ * @param { boolean } enableDefaultTooltips
17
+ */
18
+ declare const setEnableDefaultTooltips: (enableDefaultTooltips: boolean) => void;
19
+ export { getEnableDefaultTooltips, setEnableDefaultTooltips, };
@@ -0,0 +1,29 @@
1
+ import { getEnableDefaultTooltips as getConfiguredEnableDefaultTooltips } from "../InitialConfiguration.js";
2
+ let _enableDefaultTooltips;
3
+ /**
4
+ * Returns if the "enableDefaultTooltips" configuration is set.
5
+ * @public
6
+ * @since 2.1.0
7
+ * @returns { boolean }
8
+ */
9
+ const getEnableDefaultTooltips = () => {
10
+ if (_enableDefaultTooltips === undefined) {
11
+ _enableDefaultTooltips = getConfiguredEnableDefaultTooltips();
12
+ }
13
+ return _enableDefaultTooltips;
14
+ };
15
+ /**
16
+ * Defines the "enableDefaultTooltips" setting.
17
+ *
18
+ * - When set to "true" (default), the components will display default tooltips.
19
+ * - When set to "false", the components will NOT display default tooltips.
20
+ *
21
+ * @public
22
+ * @since 2.1.0
23
+ * @param { boolean } enableDefaultTooltips
24
+ */
25
+ const setEnableDefaultTooltips = (enableDefaultTooltips) => {
26
+ _enableDefaultTooltips = enableDefaultTooltips;
27
+ };
28
+ export { getEnableDefaultTooltips, setEnableDefaultTooltips, };
29
+ //# sourceMappingURL=Tooltips.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Tooltips.js","sourceRoot":"","sources":["../../src/config/Tooltips.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,IAAI,kCAAkC,EAAE,MAAM,4BAA4B,CAAC;AAE5G,IAAI,sBAA+B,CAAC;AAEpC;;;;;GAKG;AACH,MAAM,wBAAwB,GAAG,GAAY,EAAE;IAC9C,IAAI,sBAAsB,KAAK,SAAS,EAAE;QACzC,sBAAsB,GAAG,kCAAkC,EAAE,CAAC;KAC9D;IAED,OAAO,sBAAsB,CAAC;AAC/B,CAAC,CAAC;AAEF;;;;;;;;;GASG;AACH,MAAM,wBAAwB,GAAG,CAAC,qBAA8B,EAAE,EAAE;IACnE,sBAAsB,GAAG,qBAAqB,CAAC;AAChD,CAAC,CAAC;AAEF,OAAO,EACN,wBAAwB,EACxB,wBAAwB,GACxB,CAAC","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"]}
@@ -119,6 +119,12 @@
119
119
  "declarations": [],
120
120
  "exports": []
121
121
  },
122
+ {
123
+ "kind": "javascript-module",
124
+ "path": "dist/config/ConfigurationReset.js",
125
+ "declarations": [],
126
+ "exports": []
127
+ },
122
128
  {
123
129
  "kind": "javascript-module",
124
130
  "path": "dist/config/Fonts.js",
@@ -167,6 +173,12 @@
167
173
  "declarations": [],
168
174
  "exports": []
169
175
  },
176
+ {
177
+ "kind": "javascript-module",
178
+ "path": "dist/config/Tooltips.js",
179
+ "declarations": [],
180
+ "exports": []
181
+ },
170
182
  {
171
183
  "kind": "javascript-module",
172
184
  "path": "dist/converters/DOMReference.js",
@@ -227,6 +239,36 @@
227
239
  }
228
240
  ]
229
241
  },
242
+ {
243
+ "kind": "javascript-module",
244
+ "path": "dist/decorators/query.js",
245
+ "declarations": [],
246
+ "exports": [
247
+ {
248
+ "kind": "js",
249
+ "name": "default",
250
+ "declaration": {
251
+ "name": "query",
252
+ "module": "dist/decorators/query.js"
253
+ }
254
+ }
255
+ ]
256
+ },
257
+ {
258
+ "kind": "javascript-module",
259
+ "path": "dist/decorators/queryAll.js",
260
+ "declarations": [],
261
+ "exports": [
262
+ {
263
+ "kind": "js",
264
+ "name": "default",
265
+ "declaration": {
266
+ "name": "queryAll",
267
+ "module": "dist/decorators/queryAll.js"
268
+ }
269
+ }
270
+ ]
271
+ },
230
272
  {
231
273
  "kind": "javascript-module",
232
274
  "path": "dist/decorators/slot.js",
@@ -1877,6 +1919,12 @@
1877
1919
  "declarations": [],
1878
1920
  "exports": []
1879
1921
  },
1922
+ {
1923
+ "kind": "javascript-module",
1924
+ "path": "dist/Location.js",
1925
+ "declarations": [],
1926
+ "exports": []
1927
+ },
1880
1928
  {
1881
1929
  "kind": "javascript-module",
1882
1930
  "path": "dist/ManagedStyles.js",
@@ -119,6 +119,12 @@
119
119
  "declarations": [],
120
120
  "exports": []
121
121
  },
122
+ {
123
+ "kind": "javascript-module",
124
+ "path": "dist/config/ConfigurationReset.js",
125
+ "declarations": [],
126
+ "exports": []
127
+ },
122
128
  {
123
129
  "kind": "javascript-module",
124
130
  "path": "dist/config/Fonts.js",
@@ -167,6 +173,12 @@
167
173
  "declarations": [],
168
174
  "exports": []
169
175
  },
176
+ {
177
+ "kind": "javascript-module",
178
+ "path": "dist/config/Tooltips.js",
179
+ "declarations": [],
180
+ "exports": []
181
+ },
170
182
  {
171
183
  "kind": "javascript-module",
172
184
  "path": "dist/converters/DOMReference.js",
@@ -227,6 +239,36 @@
227
239
  }
228
240
  ]
229
241
  },
242
+ {
243
+ "kind": "javascript-module",
244
+ "path": "dist/decorators/query.js",
245
+ "declarations": [],
246
+ "exports": [
247
+ {
248
+ "kind": "js",
249
+ "name": "default",
250
+ "declaration": {
251
+ "name": "query",
252
+ "module": "dist/decorators/query.js"
253
+ }
254
+ }
255
+ ]
256
+ },
257
+ {
258
+ "kind": "javascript-module",
259
+ "path": "dist/decorators/queryAll.js",
260
+ "declarations": [],
261
+ "exports": [
262
+ {
263
+ "kind": "js",
264
+ "name": "default",
265
+ "declaration": {
266
+ "name": "queryAll",
267
+ "module": "dist/decorators/queryAll.js"
268
+ }
269
+ }
270
+ ]
271
+ },
230
272
  {
231
273
  "kind": "javascript-module",
232
274
  "path": "dist/decorators/slot.js",
@@ -1530,6 +1572,12 @@
1530
1572
  "declarations": [],
1531
1573
  "exports": []
1532
1574
  },
1575
+ {
1576
+ "kind": "javascript-module",
1577
+ "path": "dist/Location.js",
1578
+ "declarations": [],
1579
+ "exports": []
1580
+ },
1533
1581
  {
1534
1582
  "kind": "javascript-module",
1535
1583
  "path": "dist/ManagedStyles.js",
@@ -0,0 +1,25 @@
1
+ import type UI5Element from "../UI5Element";
2
+ type QueryDecorator = (target: UI5Element, propertyKey: string | symbol) => void;
3
+ /**
4
+ * A decorator that converts a class member into a getter that
5
+ * executes a querySelector on the element's shadow DOM.
6
+ *
7
+ * @param { string } selector DOM String containing selector to match
8
+ * @returns { QueryDecorator }
9
+ *
10
+ * ```ts
11
+ * class MyComponnet extends UI5Element {
12
+ * @query('.myComponentRoot')
13
+ * root?: HTMLElement;
14
+ *
15
+ * render() {
16
+ * return html`
17
+ * <div class=".root">
18
+ * </div>
19
+ * `;
20
+ * }
21
+ * }
22
+ * ```
23
+ */
24
+ declare const query: (selector: string) => QueryDecorator;
25
+ export default query;
@@ -0,0 +1,32 @@
1
+ /**
2
+ * A decorator that converts a class member into a getter that
3
+ * executes a querySelector on the element's shadow DOM.
4
+ *
5
+ * @param { string } selector DOM String containing selector to match
6
+ * @returns { QueryDecorator }
7
+ *
8
+ * ```ts
9
+ * class MyComponnet extends UI5Element {
10
+ * @query('.myComponentRoot')
11
+ * root?: HTMLElement;
12
+ *
13
+ * render() {
14
+ * return html`
15
+ * <div class=".root">
16
+ * </div>
17
+ * `;
18
+ * }
19
+ * }
20
+ * ```
21
+ */
22
+ const query = (selector) => {
23
+ return (target, propertyKey) => {
24
+ Object.defineProperty(target, propertyKey, {
25
+ get() {
26
+ return this.shadowRoot?.querySelector(selector);
27
+ },
28
+ });
29
+ };
30
+ };
31
+ export default query;
32
+ //# sourceMappingURL=query.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"query.js","sourceRoot":"","sources":["../../src/decorators/query.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,KAAK,GAAG,CAAC,QAAgB,EAAkB,EAAE;IAClD,OAAO,CAAC,MAAW,EAAE,WAA4B,EAAE,EAAE;QACpD,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,WAAW,EAAE;YAC1C,GAAG;gBACF,OAAO,IAAI,CAAC,UAAU,EAAE,aAAa,CAAC,QAAQ,CAAgB,CAAC;YAChE,CAAC;SACD,CAAC,CAAC;IACJ,CAAC,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,KAAK,CAAC","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"]}
@@ -0,0 +1,27 @@
1
+ import type UI5Element from "../UI5Element";
2
+ type QueryDecorator = (target: UI5Element, propertyKey: string | symbol) => void;
3
+ /**
4
+ * A decorator that converts a class member into a getter that
5
+ * executes a querySelectorAll on the element's shadow DOM.
6
+ *
7
+ * @param { string } selector DOM String containing selector to match
8
+ * @returns { QueryDecorator }
9
+ *
10
+ * ```ts
11
+ * class MyComponnet extends UI5Element {
12
+ * @queryAll('.item')
13
+ * itemsDOM?: HTMLElement;
14
+ *
15
+ * render() {
16
+ * return html`
17
+ * <div>
18
+ * <li class=".item"></li>
19
+ * <li class=".item"></li>
20
+ * </div>
21
+ * `;
22
+ * }
23
+ * }
24
+ * ```
25
+ */
26
+ declare const queryAll: (selector: string) => QueryDecorator;
27
+ export default queryAll;
@@ -0,0 +1,34 @@
1
+ /**
2
+ * A decorator that converts a class member into a getter that
3
+ * executes a querySelectorAll on the element's shadow DOM.
4
+ *
5
+ * @param { string } selector DOM String containing selector to match
6
+ * @returns { QueryDecorator }
7
+ *
8
+ * ```ts
9
+ * class MyComponnet extends UI5Element {
10
+ * @queryAll('.item')
11
+ * itemsDOM?: HTMLElement;
12
+ *
13
+ * render() {
14
+ * return html`
15
+ * <div>
16
+ * <li class=".item"></li>
17
+ * <li class=".item"></li>
18
+ * </div>
19
+ * `;
20
+ * }
21
+ * }
22
+ * ```
23
+ */
24
+ const queryAll = (selector) => {
25
+ return (target, propertyKey) => {
26
+ Object.defineProperty(target, propertyKey, {
27
+ get() {
28
+ return this.shadowRoot?.querySelectorAll(selector);
29
+ },
30
+ });
31
+ };
32
+ };
33
+ export default queryAll;
34
+ //# sourceMappingURL=queryAll.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"queryAll.js","sourceRoot":"","sources":["../../src/decorators/queryAll.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,QAAQ,GAAG,CAAC,QAAgB,EAAkB,EAAE;IACrD,OAAO,CAAC,MAAW,EAAE,WAA4B,EAAE,EAAE;QACpD,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,WAAW,EAAE;YAC1C,GAAG;gBACF,OAAO,IAAI,CAAC,UAAU,EAAE,gBAAgB,CAAC,QAAQ,CAAC,CAAC;YACpD,CAAC;SACD,CAAC,CAAC;IACJ,CAAC,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,QAAQ,CAAC","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"]}
@@ -1,11 +1,11 @@
1
1
  const VersionInfo = {
2
- version: "2.1.1",
2
+ version: "2.2.0-rc.0",
3
3
  major: 2,
4
- minor: 1,
5
- patch: 1,
6
- suffix: "",
4
+ minor: 2,
5
+ patch: 0,
6
+ suffix: "-rc.0",
7
7
  isNext: false,
8
- buildTime: 1722611401,
8
+ buildTime: 1723104471,
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,OAAO;IAChB,KAAK,EAAE,CAAC;IACR,KAAK,EAAE,CAAC;IACR,KAAK,EAAE,CAAC;IACR,MAAM,EAAE,EAAE;IACV,MAAM,EAAE,KAAK;IACb,SAAS,EAAE,UAAU;CACrB,CAAC;AACF,eAAe,WAAW,CAAC","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;"]}
1
+ {"version":3,"file":"VersionInfo.js","sourceRoot":"","sources":["../../src/generated/VersionInfo.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,GAAG;IACnB,OAAO,EAAE,YAAY;IACrB,KAAK,EAAE,CAAC;IACR,KAAK,EAAE,CAAC;IACR,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.2.0-rc.0\",\n\tmajor: 2,\n\tminor: 2,\n\tpatch: 0,\n\tsuffix: \"-rc.0\",\n\tisNext: false,\n\tbuildTime: 1723104471,\n};\nexport default VersionInfo;"]}
@@ -1,2 +1,2 @@
1
- "use strict";import f from"./thirdparty/merge.js";import{getFeature as u}from"./FeaturesRegistry.js";import{DEFAULT_THEME as c}from"./generated/AssetParameters.js";import d from"./validateThemeRoot.js";import m from"./types/AnimationMode.js";let p=!1,t={animationMode:m.Full,theme:c,themeRoot:void 0,rtl:void 0,language:void 0,timezone:void 0,calendarType:void 0,secondaryCalendarType:void 0,noConflict:!1,formatSettings:{},fetchDefaultLanguage:!1,defaultFontLoading:!0};const l=()=>(o(),t.animationMode),h=()=>(o(),t.theme),y=()=>(o(),t.themeRoot),C=()=>(o(),t.language),S=()=>(o(),t.fetchDefaultLanguage),T=()=>(o(),t.noConflict),L=()=>(o(),t.defaultFontLoading),F=()=>(o(),t.calendarType),U=()=>(o(),t.secondaryCalendarType),I=()=>(o(),t.timezone),O=()=>(o(),t.formatSettings),i=new Map;i.set("true",!0),i.set("false",!1);const R=()=>{const n=document.querySelector("[data-ui5-config]")||document.querySelector("[data-id='sap-ui-config']");let e;if(n){try{e=JSON.parse(n.innerHTML)}catch{console.warn("Incorrect data-sap-ui-config format. Please use JSON")}e&&(t=f(t,e))}},M=()=>{const n=new URLSearchParams(window.location.search);n.forEach((e,r)=>{const a=r.split("sap-").length;a===0||a===r.split("sap-ui-").length||g(r,e,"sap")}),n.forEach((e,r)=>{r.startsWith("sap-ui")&&g(r,e,"sap-ui")})},w=n=>{const e=n.split("@")[1];return d(e)},z=(n,e)=>n==="theme"&&e.includes("@")?e.split("@")[0]:e,g=(n,e,r)=>{const a=e.toLowerCase(),s=n.split(`${r}-`)[1];i.has(e)&&(e=i.get(a)),s==="theme"?(t.theme=z(s,e),e&&e.includes("@")&&(t.themeRoot=w(e))):t[s]=e},D=()=>{const n=u("OpenUI5Support");if(!n||!n.isOpenUI5Detected())return;const e=n.getConfigurationSettingsObject();t=f(t,e)},o=()=>{typeof document>"u"||p||(R(),M(),D(),p=!0)};export{l as getAnimationMode,h as getTheme,y as getThemeRoot,C as getLanguage,S as getFetchDefaultLanguage,T as getNoConflict,F as getCalendarType,U as getSecondaryCalendarType,I as getTimezone,O as getFormatSettings,L as getDefaultFontLoading};
1
+ "use strict";import f from"./thirdparty/merge.js";import{getFeature as l}from"./FeaturesRegistry.js";import{DEFAULT_THEME as c}from"./generated/AssetParameters.js";import m from"./validateThemeRoot.js";import d from"./types/AnimationMode.js";import{resetConfiguration as h}from"./config/ConfigurationReset.js";import{getLocationSearch as y}from"./Location.js";let p=!1,t={animationMode:d.Full,theme:c,themeRoot:void 0,rtl:void 0,language:void 0,timezone:void 0,calendarType:void 0,secondaryCalendarType:void 0,noConflict:!1,formatSettings:{},fetchDefaultLanguage:!1,defaultFontLoading:!0,enableDefaultTooltips:!0};const C=()=>(o(),t.animationMode),T=()=>(o(),t.theme),S=()=>(o(),t.themeRoot),L=()=>(o(),t.language),F=()=>(o(),t.fetchDefaultLanguage),U=()=>(o(),t.noConflict),b=()=>(o(),t.defaultFontLoading),D=()=>(o(),t.enableDefaultTooltips),I=()=>(o(),t.calendarType),O=()=>(o(),t.secondaryCalendarType),R=()=>(o(),t.timezone),M=()=>(o(),t.formatSettings),i=new Map;i.set("true",!0),i.set("false",!1);const z=()=>{const n=document.querySelector("[data-ui5-config]")||document.querySelector("[data-id='sap-ui-config']");let e;if(n){try{e=JSON.parse(n.innerHTML)}catch{console.warn("Incorrect data-sap-ui-config format. Please use JSON")}e&&(t=f(t,e))}},E=()=>{const n=new URLSearchParams(y());n.forEach((e,a)=>{const r=a.split("sap-").length;r===0||r===a.split("sap-ui-").length||u(a,e,"sap")}),n.forEach((e,a)=>{a.startsWith("sap-ui")&&u(a,e,"sap-ui")})},P=n=>{const e=n.split("@")[1];return m(e)},w=(n,e)=>n==="theme"&&e.includes("@")?e.split("@")[0]:e,u=(n,e,a)=>{const r=e.toLowerCase(),s=n.split(`${a}-`)[1];i.has(e)&&(e=i.get(r)),s==="theme"?(t.theme=w(s,e),e&&e.includes("@")&&(t.themeRoot=P(e))):t[s]=e},j=()=>{const n=l("OpenUI5Support");if(!n||!n.isOpenUI5Detected())return;const e=n.getConfigurationSettingsObject();t=f(t,e)},o=()=>{typeof document>"u"||p||(g(),p=!0)},g=n=>{n&&h(),z(),E(),j()};export{C as getAnimationMode,T as getTheme,S as getThemeRoot,L as getLanguage,F as getFetchDefaultLanguage,U as getNoConflict,I as getCalendarType,O as getSecondaryCalendarType,R as getTimezone,M as getFormatSettings,b as getDefaultFontLoading,g as resetConfiguration,D as getEnableDefaultTooltips};
2
2
  //# sourceMappingURL=InitialConfiguration.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/InitialConfiguration.ts"],
4
- "sourcesContent": ["import merge from \"./thirdparty/merge.js\";\nimport { getFeature } from \"./FeaturesRegistry.js\";\nimport { DEFAULT_THEME } from \"./generated/AssetParameters.js\";\nimport validateThemeRoot from \"./validateThemeRoot.js\";\nimport type OpenUI5Support from \"./features/OpenUI5Support.js\";\nimport type { FormatSettings } from \"./config/FormatSettings.js\";\nimport AnimationMode from \"./types/AnimationMode.js\";\nimport type CalendarType from \"./types/CalendarType.js\";\n\nlet initialized = false;\n\ntype InitialConfig = {\n\t[key: string]: any,\n\tanimationMode: AnimationMode,\n\ttheme: string,\n\tthemeRoot: string | undefined,\n\tlanguage: string | undefined,\n\tcalendarType: CalendarType | undefined,\n\tsecondaryCalendarType: CalendarType | undefined,\n\ttimezone: string | undefined,\n\tnoConflict: boolean,\n\tformatSettings: FormatSettings,\n\tfetchDefaultLanguage: boolean,\n\tdefaultFontLoading: boolean,\n};\n\nlet initialConfig: InitialConfig = {\n\tanimationMode: AnimationMode.Full,\n\ttheme: DEFAULT_THEME,\n\tthemeRoot: undefined,\n\trtl: undefined,\n\tlanguage: undefined,\n\ttimezone: undefined,\n\tcalendarType: undefined,\n\tsecondaryCalendarType: undefined,\n\tnoConflict: false, // no URL\n\tformatSettings: {},\n\tfetchDefaultLanguage: false,\n\tdefaultFontLoading: true,\n};\n\n/* General settings */\nconst getAnimationMode = () => {\n\tinitConfiguration();\n\treturn initialConfig.animationMode;\n};\n\nconst getTheme = () => {\n\tinitConfiguration();\n\treturn initialConfig.theme;\n};\n\nconst getThemeRoot = () => {\n\tinitConfiguration();\n\treturn initialConfig.themeRoot;\n};\n\nconst getLanguage = () => {\n\tinitConfiguration();\n\treturn initialConfig.language;\n};\n\n/**\n * Returns if the default language, that is inlined at build time,\n * should be fetched over the network instead.\n * @returns {Boolean}\n */\nconst getFetchDefaultLanguage = () => {\n\tinitConfiguration();\n\treturn initialConfig.fetchDefaultLanguage;\n};\n\nconst getNoConflict = () => {\n\tinitConfiguration();\n\treturn initialConfig.noConflict;\n};\n\nconst getDefaultFontLoading = () => {\n\tinitConfiguration();\n\treturn initialConfig.defaultFontLoading;\n};\n\n/**\n * Get the configured calendar type\n * @returns { String } the name of the configured calendar type\n */\nconst getCalendarType = () => {\n\tinitConfiguration();\n\treturn initialConfig.calendarType;\n};\n\nconst getSecondaryCalendarType = () => {\n\tinitConfiguration();\n\treturn initialConfig.secondaryCalendarType;\n};\n\n/**\n * Returns the configured IANA timezone ID.\n * @returns { String } the configured IANA timezone ID, e.g. \"America/New_York\"\n */\nconst getTimezone = () => {\n\tinitConfiguration();\n\treturn initialConfig.timezone;\n};\n\nconst getFormatSettings = () => {\n\tinitConfiguration();\n\treturn initialConfig.formatSettings;\n};\n\nconst booleanMapping = new Map();\nbooleanMapping.set(\"true\", true);\nbooleanMapping.set(\"false\", false);\n\nconst parseConfigurationScript = () => {\n\tconst configScript = document.querySelector(\"[data-ui5-config]\") || document.querySelector(\"[data-id='sap-ui-config']\"); // for backward compatibility\n\n\tlet configJSON;\n\n\tif (configScript) {\n\t\ttry {\n\t\t\tconfigJSON = JSON.parse(configScript.innerHTML);\n\t\t} catch (err) {\n\t\t\tconsole.warn(\"Incorrect data-sap-ui-config format. Please use JSON\"); /* eslint-disable-line */\n\t\t}\n\n\t\tif (configJSON) {\n\t\t\tinitialConfig = merge(initialConfig, configJSON);\n\t\t}\n\t}\n};\n\nconst parseURLParameters = () => {\n\tconst params = new URLSearchParams(window.location.search);\n\n\t// Process \"sap-*\" params first\n\tparams.forEach((value, key) => {\n\t\tconst parts = key.split(\"sap-\").length;\n\t\tif (parts === 0 || parts === key.split(\"sap-ui-\").length) {\n\t\t\treturn;\n\t\t}\n\n\t\tapplyURLParam(key, value, \"sap\");\n\t});\n\n\t// Process \"sap-ui-*\" params\n\tparams.forEach((value, key) => {\n\t\tif (!key.startsWith(\"sap-ui\")) {\n\t\t\treturn;\n\t\t}\n\n\t\tapplyURLParam(key, value, \"sap-ui\");\n\t});\n};\n\nconst normalizeThemeRootParamValue = (value: string) => {\n\tconst themeRoot = value.split(\"@\")[1];\n\n\treturn validateThemeRoot(themeRoot);\n};\n\nconst normalizeThemeParamValue = (param: string, value: string) => {\n\tif (param === \"theme\" && value.includes(\"@\")) { // the theme parameter might have @<URL-TO-THEME> in the value - strip this\n\t\treturn value.split(\"@\")[0];\n\t}\n\n\treturn value;\n};\n\nconst applyURLParam = (key: string, value: string, paramType: string) => {\n\tconst lowerCaseValue = value.toLowerCase();\n\tconst param = key.split(`${paramType}-`)[1];\n\n\tif (booleanMapping.has(value)) {\n\t\tvalue = booleanMapping.get(lowerCaseValue);\n\t}\n\n\tif (param === \"theme\") {\n\t\tinitialConfig.theme = normalizeThemeParamValue(param, value);\n\n\t\tif (value && value.includes(\"@\")) {\n\t\t\tinitialConfig.themeRoot = normalizeThemeRootParamValue(value);\n\t\t}\n\t} else {\n\t\tinitialConfig[param] = value;\n\t}\n};\n\nconst applyOpenUI5Configuration = () => {\n\tconst openUI5Support = getFeature<typeof OpenUI5Support>(\"OpenUI5Support\");\n\tif (!openUI5Support || !openUI5Support.isOpenUI5Detected()) {\n\t\treturn;\n\t}\n\n\tconst OpenUI5Config = openUI5Support.getConfigurationSettingsObject();\n\tinitialConfig = merge(initialConfig, OpenUI5Config);\n};\n\nconst initConfiguration = () => {\n\tif (typeof document === \"undefined\" || initialized) {\n\t\treturn;\n\t}\n\n\t// 1. Lowest priority - configuration script\n\tparseConfigurationScript();\n\n\t// 2. URL parameters overwrite configuration script parameters\n\tparseURLParameters();\n\n\t// 3. If OpenUI5 is detected, it has the highest priority\n\tapplyOpenUI5Configuration();\n\n\tinitialized = true;\n};\n\nexport {\n\tgetAnimationMode,\n\tgetTheme,\n\tgetThemeRoot,\n\tgetLanguage,\n\tgetFetchDefaultLanguage,\n\tgetNoConflict,\n\tgetCalendarType,\n\tgetSecondaryCalendarType,\n\tgetTimezone,\n\tgetFormatSettings,\n\tgetDefaultFontLoading,\n};\n"],
5
- "mappings": "aAAA,OAAOA,MAAW,wBAClB,OAAS,cAAAC,MAAkB,wBAC3B,OAAS,iBAAAC,MAAqB,iCAC9B,OAAOC,MAAuB,yBAG9B,OAAOC,MAAmB,2BAG1B,IAAIC,EAAc,GAiBdC,EAA+B,CAClC,cAAeF,EAAc,KAC7B,MAAOF,EACP,UAAW,OACX,IAAK,OACL,SAAU,OACV,SAAU,OACV,aAAc,OACd,sBAAuB,OACvB,WAAY,GACZ,eAAgB,CAAC,EACjB,qBAAsB,GACtB,mBAAoB,EACrB,EAGA,MAAMK,EAAmB,KACxBC,EAAkB,EACXF,EAAc,eAGhBG,EAAW,KAChBD,EAAkB,EACXF,EAAc,OAGhBI,EAAe,KACpBF,EAAkB,EACXF,EAAc,WAGhBK,EAAc,KACnBH,EAAkB,EACXF,EAAc,UAQhBM,EAA0B,KAC/BJ,EAAkB,EACXF,EAAc,sBAGhBO,EAAgB,KACrBL,EAAkB,EACXF,EAAc,YAGhBQ,EAAwB,KAC7BN,EAAkB,EACXF,EAAc,oBAOhBS,EAAkB,KACvBP,EAAkB,EACXF,EAAc,cAGhBU,EAA2B,KAChCR,EAAkB,EACXF,EAAc,uBAOhBW,EAAc,KACnBT,EAAkB,EACXF,EAAc,UAGhBY,EAAoB,KACzBV,EAAkB,EACXF,EAAc,gBAGhBa,EAAiB,IAAI,IAC3BA,EAAe,IAAI,OAAQ,EAAI,EAC/BA,EAAe,IAAI,QAAS,EAAK,EAEjC,MAAMC,EAA2B,IAAM,CACtC,MAAMC,EAAe,SAAS,cAAc,mBAAmB,GAAK,SAAS,cAAc,2BAA2B,EAEtH,IAAIC,EAEJ,GAAID,EAAc,CACjB,GAAI,CACHC,EAAa,KAAK,MAAMD,EAAa,SAAS,CAC/C,MAAc,CACb,QAAQ,KAAK,sDAAsD,CACpE,CAEIC,IACHhB,EAAgBN,EAAMM,EAAegB,CAAU,EAEjD,CACD,EAEMC,EAAqB,IAAM,CAChC,MAAMC,EAAS,IAAI,gBAAgB,OAAO,SAAS,MAAM,EAGzDA,EAAO,QAAQ,CAACC,EAAOC,IAAQ,CAC9B,MAAMC,EAAQD,EAAI,MAAM,MAAM,EAAE,OAC5BC,IAAU,GAAKA,IAAUD,EAAI,MAAM,SAAS,EAAE,QAIlDE,EAAcF,EAAKD,EAAO,KAAK,CAChC,CAAC,EAGDD,EAAO,QAAQ,CAACC,EAAOC,IAAQ,CACzBA,EAAI,WAAW,QAAQ,GAI5BE,EAAcF,EAAKD,EAAO,QAAQ,CACnC,CAAC,CACF,EAEMI,EAAgCJ,GAAkB,CACvD,MAAMK,EAAYL,EAAM,MAAM,GAAG,EAAE,CAAC,EAEpC,OAAOtB,EAAkB2B,CAAS,CACnC,EAEMC,EAA2B,CAACC,EAAeP,IAC5CO,IAAU,SAAWP,EAAM,SAAS,GAAG,EACnCA,EAAM,MAAM,GAAG,EAAE,CAAC,EAGnBA,EAGFG,EAAgB,CAACF,EAAaD,EAAeQ,IAAsB,CACxE,MAAMC,EAAiBT,EAAM,YAAY,EACnCO,EAAQN,EAAI,MAAM,GAAGO,CAAS,GAAG,EAAE,CAAC,EAEtCd,EAAe,IAAIM,CAAK,IAC3BA,EAAQN,EAAe,IAAIe,CAAc,GAGtCF,IAAU,SACb1B,EAAc,MAAQyB,EAAyBC,EAAOP,CAAK,EAEvDA,GAASA,EAAM,SAAS,GAAG,IAC9BnB,EAAc,UAAYuB,EAA6BJ,CAAK,IAG7DnB,EAAc0B,CAAK,EAAIP,CAEzB,EAEMU,EAA4B,IAAM,CACvC,MAAMC,EAAiBnC,EAAkC,gBAAgB,EACzE,GAAI,CAACmC,GAAkB,CAACA,EAAe,kBAAkB,EACxD,OAGD,MAAMC,EAAgBD,EAAe,+BAA+B,EACpE9B,EAAgBN,EAAMM,EAAe+B,CAAa,CACnD,EAEM7B,EAAoB,IAAM,CAC3B,OAAO,SAAa,KAAeH,IAKvCe,EAAyB,EAGzBG,EAAmB,EAGnBY,EAA0B,EAE1B9B,EAAc,GACf,EAEA,OACCE,KAAA,iBACAE,KAAA,SACAC,KAAA,aACAC,KAAA,YACAC,KAAA,wBACAC,KAAA,cACAE,KAAA,gBACAC,KAAA,yBACAC,KAAA,YACAC,KAAA,kBACAJ,KAAA",
6
- "names": ["merge", "getFeature", "DEFAULT_THEME", "validateThemeRoot", "AnimationMode", "initialized", "initialConfig", "getAnimationMode", "initConfiguration", "getTheme", "getThemeRoot", "getLanguage", "getFetchDefaultLanguage", "getNoConflict", "getDefaultFontLoading", "getCalendarType", "getSecondaryCalendarType", "getTimezone", "getFormatSettings", "booleanMapping", "parseConfigurationScript", "configScript", "configJSON", "parseURLParameters", "params", "value", "key", "parts", "applyURLParam", "normalizeThemeRootParamValue", "themeRoot", "normalizeThemeParamValue", "param", "paramType", "lowerCaseValue", "applyOpenUI5Configuration", "openUI5Support", "OpenUI5Config"]
4
+ "sourcesContent": ["import merge from \"./thirdparty/merge.js\";\nimport { getFeature } from \"./FeaturesRegistry.js\";\nimport { DEFAULT_THEME } from \"./generated/AssetParameters.js\";\nimport validateThemeRoot from \"./validateThemeRoot.js\";\nimport type OpenUI5Support from \"./features/OpenUI5Support.js\";\nimport type { FormatSettings } from \"./config/FormatSettings.js\";\nimport AnimationMode from \"./types/AnimationMode.js\";\nimport type CalendarType from \"./types/CalendarType.js\";\nimport { resetConfiguration as resetConfigurationFn } from \"./config/ConfigurationReset.js\";\nimport { getLocationSearch } from \"./Location.js\";\n\nlet initialized = false;\n\ntype InitialConfig = {\n\t[key: string]: any,\n\tanimationMode: AnimationMode,\n\ttheme: string,\n\tthemeRoot: string | undefined,\n\tlanguage: string | undefined,\n\tcalendarType: CalendarType | undefined,\n\tsecondaryCalendarType: CalendarType | undefined,\n\ttimezone: string | undefined,\n\tnoConflict: boolean,\n\tformatSettings: FormatSettings,\n\tfetchDefaultLanguage: boolean,\n\tdefaultFontLoading: boolean,\n\tenableDefaultTooltips: boolean,\n};\n\nlet initialConfig: InitialConfig = {\n\tanimationMode: AnimationMode.Full,\n\ttheme: DEFAULT_THEME,\n\tthemeRoot: undefined,\n\trtl: undefined,\n\tlanguage: undefined,\n\ttimezone: undefined,\n\tcalendarType: undefined,\n\tsecondaryCalendarType: undefined,\n\tnoConflict: false, // no URL\n\tformatSettings: {},\n\tfetchDefaultLanguage: false,\n\tdefaultFontLoading: true,\n\tenableDefaultTooltips: true,\n};\n\n/* General settings */\nconst getAnimationMode = () => {\n\tinitConfiguration();\n\treturn initialConfig.animationMode;\n};\n\nconst getTheme = () => {\n\tinitConfiguration();\n\treturn initialConfig.theme;\n};\n\nconst getThemeRoot = () => {\n\tinitConfiguration();\n\treturn initialConfig.themeRoot;\n};\n\nconst getLanguage = () => {\n\tinitConfiguration();\n\treturn initialConfig.language;\n};\n\n/**\n * Returns if the default language, that is inlined at build time,\n * should be fetched over the network instead.\n * @returns {Boolean}\n */\nconst getFetchDefaultLanguage = () => {\n\tinitConfiguration();\n\treturn initialConfig.fetchDefaultLanguage;\n};\n\nconst getNoConflict = () => {\n\tinitConfiguration();\n\treturn initialConfig.noConflict;\n};\n\nconst getDefaultFontLoading = () => {\n\tinitConfiguration();\n\treturn initialConfig.defaultFontLoading;\n};\n\nconst getEnableDefaultTooltips = () => {\n\tinitConfiguration();\n\treturn initialConfig.enableDefaultTooltips;\n};\n\n/**\n * Get the configured calendar type\n * @returns { String } the name of the configured calendar type\n */\nconst getCalendarType = () => {\n\tinitConfiguration();\n\treturn initialConfig.calendarType;\n};\n\nconst getSecondaryCalendarType = () => {\n\tinitConfiguration();\n\treturn initialConfig.secondaryCalendarType;\n};\n\n/**\n * Returns the configured IANA timezone ID.\n * @returns { String } the configured IANA timezone ID, e.g. \"America/New_York\"\n */\nconst getTimezone = () => {\n\tinitConfiguration();\n\treturn initialConfig.timezone;\n};\n\nconst getFormatSettings = () => {\n\tinitConfiguration();\n\treturn initialConfig.formatSettings;\n};\n\nconst booleanMapping = new Map();\nbooleanMapping.set(\"true\", true);\nbooleanMapping.set(\"false\", false);\n\nconst parseConfigurationScript = () => {\n\tconst configScript = document.querySelector(\"[data-ui5-config]\") || document.querySelector(\"[data-id='sap-ui-config']\"); // for backward compatibility\n\n\tlet configJSON;\n\n\tif (configScript) {\n\t\ttry {\n\t\t\tconfigJSON = JSON.parse(configScript.innerHTML);\n\t\t} catch (err) {\n\t\t\tconsole.warn(\"Incorrect data-sap-ui-config format. Please use JSON\"); /* eslint-disable-line */\n\t\t}\n\n\t\tif (configJSON) {\n\t\t\tinitialConfig = merge(initialConfig, configJSON);\n\t\t}\n\t}\n};\n\nconst parseURLParameters = () => {\n\tconst params = new URLSearchParams(getLocationSearch());\n\n\t// Process \"sap-*\" params first\n\tparams.forEach((value, key) => {\n\t\tconst parts = key.split(\"sap-\").length;\n\t\tif (parts === 0 || parts === key.split(\"sap-ui-\").length) {\n\t\t\treturn;\n\t\t}\n\n\t\tapplyURLParam(key, value, \"sap\");\n\t});\n\n\t// Process \"sap-ui-*\" params\n\tparams.forEach((value, key) => {\n\t\tif (!key.startsWith(\"sap-ui\")) {\n\t\t\treturn;\n\t\t}\n\n\t\tapplyURLParam(key, value, \"sap-ui\");\n\t});\n};\n\nconst normalizeThemeRootParamValue = (value: string) => {\n\tconst themeRoot = value.split(\"@\")[1];\n\n\treturn validateThemeRoot(themeRoot);\n};\n\nconst normalizeThemeParamValue = (param: string, value: string) => {\n\tif (param === \"theme\" && value.includes(\"@\")) { // the theme parameter might have @<URL-TO-THEME> in the value - strip this\n\t\treturn value.split(\"@\")[0];\n\t}\n\n\treturn value;\n};\n\nconst applyURLParam = (key: string, value: string, paramType: string) => {\n\tconst lowerCaseValue = value.toLowerCase();\n\tconst param = key.split(`${paramType}-`)[1];\n\n\tif (booleanMapping.has(value)) {\n\t\tvalue = booleanMapping.get(lowerCaseValue);\n\t}\n\n\tif (param === \"theme\") {\n\t\tinitialConfig.theme = normalizeThemeParamValue(param, value);\n\n\t\tif (value && value.includes(\"@\")) {\n\t\t\tinitialConfig.themeRoot = normalizeThemeRootParamValue(value);\n\t\t}\n\t} else {\n\t\tinitialConfig[param] = value;\n\t}\n};\n\nconst applyOpenUI5Configuration = () => {\n\tconst openUI5Support = getFeature<typeof OpenUI5Support>(\"OpenUI5Support\");\n\tif (!openUI5Support || !openUI5Support.isOpenUI5Detected()) {\n\t\treturn;\n\t}\n\n\tconst OpenUI5Config = openUI5Support.getConfigurationSettingsObject();\n\tinitialConfig = merge(initialConfig, OpenUI5Config);\n};\n\nconst initConfiguration = () => {\n\tif (typeof document === \"undefined\" || initialized) {\n\t\treturn;\n\t}\n\n\tresetConfiguration();\n\n\tinitialized = true;\n};\n\n/**\n * Internaly exposed method to enable configurations in tests.\n * @private\n */\nconst resetConfiguration = (testEnv?: boolean) => {\n\tif (testEnv) {\n\t\tresetConfigurationFn();\n\t}\n\t// 1. Lowest priority - configuration script\n\tparseConfigurationScript();\n\n\t// 2. URL parameters overwrite configuration script parameters\n\tparseURLParameters();\n\n\t// 3. If OpenUI5 is detected, it has the highest priority\n\tapplyOpenUI5Configuration();\n};\n\nexport {\n\tgetAnimationMode,\n\tgetTheme,\n\tgetThemeRoot,\n\tgetLanguage,\n\tgetFetchDefaultLanguage,\n\tgetNoConflict,\n\tgetCalendarType,\n\tgetSecondaryCalendarType,\n\tgetTimezone,\n\tgetFormatSettings,\n\tgetDefaultFontLoading,\n\tresetConfiguration,\n\tgetEnableDefaultTooltips,\n};\n"],
5
+ "mappings": "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",
6
+ "names": ["merge", "getFeature", "DEFAULT_THEME", "validateThemeRoot", "AnimationMode", "resetConfigurationFn", "getLocationSearch", "initialized", "initialConfig", "getAnimationMode", "initConfiguration", "getTheme", "getThemeRoot", "getLanguage", "getFetchDefaultLanguage", "getNoConflict", "getDefaultFontLoading", "getEnableDefaultTooltips", "getCalendarType", "getSecondaryCalendarType", "getTimezone", "getFormatSettings", "booleanMapping", "parseConfigurationScript", "configScript", "configJSON", "parseURLParameters", "params", "value", "key", "parts", "applyURLParam", "normalizeThemeRootParamValue", "themeRoot", "normalizeThemeParamValue", "param", "paramType", "lowerCaseValue", "applyOpenUI5Configuration", "openUI5Support", "OpenUI5Config", "resetConfiguration", "testEnv"]
7
7
  }
@@ -0,0 +1,2 @@
1
+ "use strict";const o=typeof document>"u",t={search(){return o?"":window.location.search}},n=()=>o?"":window.location.hostname,r=()=>o?"":window.location.port,e=()=>o?"":window.location.protocol,c=()=>o?"":window.location.href,i=()=>t.search(),a=()=>{o||window.location.reload()};export{t as internals,a as locationReload,c as getLocationHref,i as getLocationSearch,n as getLocationHostname,r as getLocationPort,e as getLocationProtocol};
2
+ //# sourceMappingURL=Location.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/Location.ts"],
4
+ "sourcesContent": ["const isSSR = typeof document === \"undefined\";\n\nconst internals = {\n\tsearch() {\n\t\tif (isSSR) {\n\t\t\treturn \"\";\n\t\t}\n\t\treturn window.location.search;\n\t},\n};\n\nconst getLocationHostname = () => {\n\tif (isSSR) {\n\t\treturn \"\";\n\t}\n\n\treturn window.location.hostname;\n};\n\nconst getLocationPort = () => {\n\tif (isSSR) {\n\t\treturn \"\";\n\t}\n\n\treturn window.location.port;\n};\n\nconst getLocationProtocol = () => {\n\tif (isSSR) {\n\t\treturn \"\";\n\t}\n\n\treturn window.location.protocol;\n};\n\nconst getLocationHref = () => {\n\tif (isSSR) {\n\t\treturn \"\";\n\t}\n\n\treturn window.location.href;\n};\n\nconst getLocationSearch = () => {\n\treturn internals.search();\n};\n\nconst locationReload = () => {\n\tif (!isSSR) {\n\t\twindow.location.reload();\n\t}\n};\n\nexport {\n\tinternals,\n\tlocationReload,\n\tgetLocationHref,\n\tgetLocationSearch,\n\tgetLocationHostname,\n\tgetLocationPort,\n\tgetLocationProtocol,\n};\n"],
5
+ "mappings": "aAAA,MAAMA,EAAQ,OAAO,SAAa,IAE5BC,EAAY,CACjB,QAAS,CACR,OAAID,EACI,GAED,OAAO,SAAS,MACxB,CACD,EAEME,EAAsB,IACvBF,EACI,GAGD,OAAO,SAAS,SAGlBG,EAAkB,IACnBH,EACI,GAGD,OAAO,SAAS,KAGlBI,EAAsB,IACvBJ,EACI,GAGD,OAAO,SAAS,SAGlBK,EAAkB,IACnBL,EACI,GAGD,OAAO,SAAS,KAGlBM,EAAoB,IAClBL,EAAU,OAAO,EAGnBM,EAAiB,IAAM,CACvBP,GACJ,OAAO,SAAS,OAAO,CAEzB,EAEA,OACCC,KAAA,UACAM,KAAA,eACAF,KAAA,gBACAC,KAAA,kBACAJ,KAAA,oBACAC,KAAA,gBACAC,KAAA",
6
+ "names": ["isSSR", "internals", "getLocationHostname", "getLocationPort", "getLocationProtocol", "getLocationHref", "getLocationSearch", "locationReload"]
7
+ }
@@ -1,2 +1,2 @@
1
- "use strict";import p from"./generated/VersionInfo.js";import d from"./getSharedResource.js";let i,s="";const u=new Map,r=d("Runtimes",[]),R=()=>{if(i===void 0){i=r.length;const t=p;r.push({...t,alias:s,description:`Runtime ${i} - ver ${t.version}${s?` (${s})`:""}`})}},g=()=>i,h=(t,m)=>{const o=`${t},${m}`;if(u.has(o))return u.get(o);const e=r[t],n=r[m];if(!e||!n)throw new Error("Invalid runtime index supplied");if(e.isNext||n.isNext)return e.buildTime-n.buildTime;const c=e.major-n.major;if(c)return c;const a=e.minor-n.minor;if(a)return a;const f=e.patch-n.patch;if(f)return f;const l=new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"}).compare(e.suffix,n.suffix);return u.set(o,l),l},I=t=>{s=t},b=()=>r;export{g as getCurrentRuntimeIndex,R as registerCurrentRuntime,h as compareRuntimes,I as setRuntimeAlias,b as getAllRuntimes};
1
+ "use strict";import{getAllRegisteredTags as g}from"./CustomElementsRegistry.js";import{getCustomElementsScopingRules as p,getCustomElementsScopingSuffix as R}from"./CustomElementsScopeUtils.js";import d from"./generated/VersionInfo.js";import h from"./getSharedResource.js";let i,s="";const u=new Map,r=h("Runtimes",[]),x=()=>{if(i===void 0){i=r.length;const e=d;r.push({...e,get scopingSuffix(){return R()},get registeredTags(){return g()},get scopingRules(){return p()},alias:s,description:`Runtime ${i} - ver ${e.version}${s?` (${s})`:""}`})}},I=()=>i,b=(e,m)=>{const o=`${e},${m}`;if(u.has(o))return u.get(o);const t=r[e],n=r[m];if(!t||!n)throw new Error("Invalid runtime index supplied");if(t.isNext||n.isNext)return t.buildTime-n.buildTime;const c=t.major-n.major;if(c)return c;const a=t.minor-n.minor;if(a)return a;const f=t.patch-n.patch;if(f)return f;const l=new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"}).compare(t.suffix,n.suffix);return u.set(o,l),l},C=e=>{s=e},$=()=>r;export{I as getCurrentRuntimeIndex,x as registerCurrentRuntime,b as compareRuntimes,C as setRuntimeAlias,$ as getAllRuntimes};
2
2
  //# sourceMappingURL=Runtimes.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/Runtimes.ts"],
4
- "sourcesContent": ["import VersionInfo from \"./generated/VersionInfo.js\";\nimport getSharedResource from \"./getSharedResource.js\";\n\ntype RuntimeData = VersionInfo & {\n\talias: string,\n\tdescription: string,\n};\n\nlet currentRuntimeIndex: number;\nlet currentRuntimeAlias = \"\";\n\nconst compareCache = new Map<string, number>();\n\n/**\n * Central registry where all runtimes register themselves by pushing an object.\n * The index in the registry servers as an ID for the runtime.\n * @type {*}\n */\nconst Runtimes = getSharedResource<Array<RuntimeData>>(\"Runtimes\", []);\n\n/**\n * Registers the current runtime in the shared runtimes resource registry\n */\nconst registerCurrentRuntime = () => {\n\tif (currentRuntimeIndex === undefined) {\n\t\tcurrentRuntimeIndex = Runtimes.length;\n\t\tconst versionInfo = VersionInfo;\n\n\t\tRuntimes.push({\n\t\t\t...versionInfo,\n\t\t\talias: currentRuntimeAlias,\n\t\t\tdescription: `Runtime ${currentRuntimeIndex} - ver ${versionInfo.version}${currentRuntimeAlias ? ` (${currentRuntimeAlias})` : \"\"}`,\n\t\t});\n\t}\n};\n\n/**\n * Returns the index of the current runtime's object in the shared runtimes resource registry\n * @returns {*}\n */\nconst getCurrentRuntimeIndex = () => {\n\treturn currentRuntimeIndex;\n};\n\n/**\n * Compares two runtimes and returns 1 if the first is of a bigger version, -1 if the second is of a bigger version, and 0 if equal\n * @param index1 The index of the first runtime to compare\n * @param index2 The index of the second runtime to compare\n * @returns {number}\n */\nconst compareRuntimes = (index1: number, index2: number) => {\n\tconst cacheIndex = `${index1},${index2}`;\n\tif (compareCache.has(cacheIndex)) {\n\t\treturn compareCache.get(cacheIndex)!;\n\t}\n\n\tconst runtime1 = Runtimes[index1];\n\tconst runtime2 = Runtimes[index2];\n\n\tif (!runtime1 || !runtime2) {\n\t\tthrow new Error(\"Invalid runtime index supplied\");\n\t}\n\n\t// If any of the two is a next version, bigger buildTime wins\n\tif (runtime1.isNext || runtime2.isNext) {\n\t\treturn runtime1.buildTime - runtime2.buildTime;\n\t}\n\n\t// If major versions differ, bigger one wins\n\tconst majorDiff = runtime1.major - runtime2.major;\n\tif (majorDiff) {\n\t\treturn majorDiff;\n\t}\n\n\t// If minor versions differ, bigger one wins\n\tconst minorDiff = runtime1.minor - runtime2.minor;\n\tif (minorDiff) {\n\t\treturn minorDiff;\n\t}\n\n\t// If patch versions differ, bigger one wins\n\tconst patchDiff = runtime1.patch - runtime2.patch;\n\tif (patchDiff) {\n\t\treturn patchDiff;\n\t}\n\n\t// Bigger suffix wins, f.e. rc10 > rc9\n\t// Important: suffix is alphanumeric, must use natural compare\n\tconst collator = new Intl.Collator(undefined, { numeric: true, sensitivity: \"base\" });\n\tconst result = collator.compare(runtime1.suffix, runtime2.suffix);\n\n\tcompareCache.set(cacheIndex, result);\n\treturn result;\n};\n\n/**\n * Set an alias for the the current app/library/microfrontend which will appear in debug messages and console warnings\n * @param alias\n */\nconst setRuntimeAlias = (alias: string) => {\n\tcurrentRuntimeAlias = alias;\n};\n\nconst getAllRuntimes = () => {\n\treturn Runtimes;\n};\n\nexport {\n\tgetCurrentRuntimeIndex,\n\tregisterCurrentRuntime,\n\tcompareRuntimes,\n\tsetRuntimeAlias,\n\tgetAllRuntimes,\n};\n"],
5
- "mappings": "aAAA,OAAOA,MAAiB,6BACxB,OAAOC,MAAuB,yBAO9B,IAAIC,EACAC,EAAsB,GAE1B,MAAMC,EAAe,IAAI,IAOnBC,EAAWJ,EAAsC,WAAY,CAAC,CAAC,EAK/DK,EAAyB,IAAM,CACpC,GAAIJ,IAAwB,OAAW,CACtCA,EAAsBG,EAAS,OAC/B,MAAME,EAAcP,EAEpBK,EAAS,KAAK,CACb,GAAGE,EACH,MAAOJ,EACP,YAAa,WAAWD,CAAmB,UAAUK,EAAY,OAAO,GAAGJ,EAAsB,KAAKA,CAAmB,IAAM,EAAE,EAClI,CAAC,CACF,CACD,EAMMK,EAAyB,IACvBN,EASFO,EAAkB,CAACC,EAAgBC,IAAmB,CAC3D,MAAMC,EAAa,GAAGF,CAAM,IAAIC,CAAM,GACtC,GAAIP,EAAa,IAAIQ,CAAU,EAC9B,OAAOR,EAAa,IAAIQ,CAAU,EAGnC,MAAMC,EAAWR,EAASK,CAAM,EAC1BI,EAAWT,EAASM,CAAM,EAEhC,GAAI,CAACE,GAAY,CAACC,EACjB,MAAM,IAAI,MAAM,gCAAgC,EAIjD,GAAID,EAAS,QAAUC,EAAS,OAC/B,OAAOD,EAAS,UAAYC,EAAS,UAItC,MAAMC,EAAYF,EAAS,MAAQC,EAAS,MAC5C,GAAIC,EACH,OAAOA,EAIR,MAAMC,EAAYH,EAAS,MAAQC,EAAS,MAC5C,GAAIE,EACH,OAAOA,EAIR,MAAMC,EAAYJ,EAAS,MAAQC,EAAS,MAC5C,GAAIG,EACH,OAAOA,EAMR,MAAMC,EADW,IAAI,KAAK,SAAS,OAAW,CAAE,QAAS,GAAM,YAAa,MAAO,CAAC,EAC5D,QAAQL,EAAS,OAAQC,EAAS,MAAM,EAEhE,OAAAV,EAAa,IAAIQ,EAAYM,CAAM,EAC5BA,CACR,EAMMC,EAAmBC,GAAkB,CAC1CjB,EAAsBiB,CACvB,EAEMC,EAAiB,IACfhB,EAGR,OACCG,KAAA,uBACAF,KAAA,uBACAG,KAAA,gBACAU,KAAA,gBACAE,KAAA",
6
- "names": ["VersionInfo", "getSharedResource", "currentRuntimeIndex", "currentRuntimeAlias", "compareCache", "Runtimes", "registerCurrentRuntime", "versionInfo", "getCurrentRuntimeIndex", "compareRuntimes", "index1", "index2", "cacheIndex", "runtime1", "runtime2", "majorDiff", "minorDiff", "patchDiff", "result", "setRuntimeAlias", "alias", "getAllRuntimes"]
4
+ "sourcesContent": ["import { getAllRegisteredTags } from \"./CustomElementsRegistry.js\";\nimport { getCustomElementsScopingRules, getCustomElementsScopingSuffix } from \"./CustomElementsScopeUtils.js\";\nimport VersionInfo from \"./generated/VersionInfo.js\";\nimport getSharedResource from \"./getSharedResource.js\";\n\ntype RuntimeData = VersionInfo & {\n\talias: string,\n\tdescription: string,\n};\n\nlet currentRuntimeIndex: number;\nlet currentRuntimeAlias = \"\";\n\nconst compareCache = new Map<string, number>();\n\n/**\n * Central registry where all runtimes register themselves by pushing an object.\n * The index in the registry servers as an ID for the runtime.\n * @type {*}\n */\nconst Runtimes = getSharedResource<Array<RuntimeData>>(\"Runtimes\", []);\n\n/**\n * Registers the current runtime in the shared runtimes resource registry\n */\nconst registerCurrentRuntime = () => {\n\tif (currentRuntimeIndex === undefined) {\n\t\tcurrentRuntimeIndex = Runtimes.length;\n\t\tconst versionInfo = VersionInfo;\n\n\t\tRuntimes.push({\n\t\t\t...versionInfo,\n\t\t\tget scopingSuffix() {\n\t\t\t\treturn getCustomElementsScopingSuffix();\n\t\t\t},\n\t\t\tget registeredTags() {\n\t\t\t\treturn getAllRegisteredTags();\n\t\t\t},\n\t\t\tget scopingRules() {\n\t\t\t\treturn getCustomElementsScopingRules();\n\t\t\t},\n\t\t\talias: currentRuntimeAlias,\n\t\t\tdescription: `Runtime ${currentRuntimeIndex} - ver ${versionInfo.version}${currentRuntimeAlias ? ` (${currentRuntimeAlias})` : \"\"}`,\n\t\t});\n\t}\n};\n\n/**\n * Returns the index of the current runtime's object in the shared runtimes resource registry\n * @returns {*}\n */\nconst getCurrentRuntimeIndex = () => {\n\treturn currentRuntimeIndex;\n};\n\n/**\n * Compares two runtimes and returns 1 if the first is of a bigger version, -1 if the second is of a bigger version, and 0 if equal\n * @param index1 The index of the first runtime to compare\n * @param index2 The index of the second runtime to compare\n * @returns {number}\n */\nconst compareRuntimes = (index1: number, index2: number) => {\n\tconst cacheIndex = `${index1},${index2}`;\n\tif (compareCache.has(cacheIndex)) {\n\t\treturn compareCache.get(cacheIndex)!;\n\t}\n\n\tconst runtime1 = Runtimes[index1];\n\tconst runtime2 = Runtimes[index2];\n\n\tif (!runtime1 || !runtime2) {\n\t\tthrow new Error(\"Invalid runtime index supplied\");\n\t}\n\n\t// If any of the two is a next version, bigger buildTime wins\n\tif (runtime1.isNext || runtime2.isNext) {\n\t\treturn runtime1.buildTime - runtime2.buildTime;\n\t}\n\n\t// If major versions differ, bigger one wins\n\tconst majorDiff = runtime1.major - runtime2.major;\n\tif (majorDiff) {\n\t\treturn majorDiff;\n\t}\n\n\t// If minor versions differ, bigger one wins\n\tconst minorDiff = runtime1.minor - runtime2.minor;\n\tif (minorDiff) {\n\t\treturn minorDiff;\n\t}\n\n\t// If patch versions differ, bigger one wins\n\tconst patchDiff = runtime1.patch - runtime2.patch;\n\tif (patchDiff) {\n\t\treturn patchDiff;\n\t}\n\n\t// Bigger suffix wins, f.e. rc10 > rc9\n\t// Important: suffix is alphanumeric, must use natural compare\n\tconst collator = new Intl.Collator(undefined, { numeric: true, sensitivity: \"base\" });\n\tconst result = collator.compare(runtime1.suffix, runtime2.suffix);\n\n\tcompareCache.set(cacheIndex, result);\n\treturn result;\n};\n\n/**\n * Set an alias for the the current app/library/microfrontend which will appear in debug messages and console warnings\n * @param alias\n */\nconst setRuntimeAlias = (alias: string) => {\n\tcurrentRuntimeAlias = alias;\n};\n\nconst getAllRuntimes = () => {\n\treturn Runtimes;\n};\n\nexport {\n\tgetCurrentRuntimeIndex,\n\tregisterCurrentRuntime,\n\tcompareRuntimes,\n\tsetRuntimeAlias,\n\tgetAllRuntimes,\n};\n"],
5
+ "mappings": "aAAA,OAAS,wBAAAA,MAA4B,8BACrC,OAAS,iCAAAC,EAA+B,kCAAAC,MAAsC,gCAC9E,OAAOC,MAAiB,6BACxB,OAAOC,MAAuB,yBAO9B,IAAIC,EACAC,EAAsB,GAE1B,MAAMC,EAAe,IAAI,IAOnBC,EAAWJ,EAAsC,WAAY,CAAC,CAAC,EAK/DK,EAAyB,IAAM,CACpC,GAAIJ,IAAwB,OAAW,CACtCA,EAAsBG,EAAS,OAC/B,MAAME,EAAcP,EAEpBK,EAAS,KAAK,CACb,GAAGE,EACH,IAAI,eAAgB,CACnB,OAAOR,EAA+B,CACvC,EACA,IAAI,gBAAiB,CACpB,OAAOF,EAAqB,CAC7B,EACA,IAAI,cAAe,CAClB,OAAOC,EAA8B,CACtC,EACA,MAAOK,EACP,YAAa,WAAWD,CAAmB,UAAUK,EAAY,OAAO,GAAGJ,EAAsB,KAAKA,CAAmB,IAAM,EAAE,EAClI,CAAC,CACF,CACD,EAMMK,EAAyB,IACvBN,EASFO,EAAkB,CAACC,EAAgBC,IAAmB,CAC3D,MAAMC,EAAa,GAAGF,CAAM,IAAIC,CAAM,GACtC,GAAIP,EAAa,IAAIQ,CAAU,EAC9B,OAAOR,EAAa,IAAIQ,CAAU,EAGnC,MAAMC,EAAWR,EAASK,CAAM,EAC1BI,EAAWT,EAASM,CAAM,EAEhC,GAAI,CAACE,GAAY,CAACC,EACjB,MAAM,IAAI,MAAM,gCAAgC,EAIjD,GAAID,EAAS,QAAUC,EAAS,OAC/B,OAAOD,EAAS,UAAYC,EAAS,UAItC,MAAMC,EAAYF,EAAS,MAAQC,EAAS,MAC5C,GAAIC,EACH,OAAOA,EAIR,MAAMC,EAAYH,EAAS,MAAQC,EAAS,MAC5C,GAAIE,EACH,OAAOA,EAIR,MAAMC,EAAYJ,EAAS,MAAQC,EAAS,MAC5C,GAAIG,EACH,OAAOA,EAMR,MAAMC,EADW,IAAI,KAAK,SAAS,OAAW,CAAE,QAAS,GAAM,YAAa,MAAO,CAAC,EAC5D,QAAQL,EAAS,OAAQC,EAAS,MAAM,EAEhE,OAAAV,EAAa,IAAIQ,EAAYM,CAAM,EAC5BA,CACR,EAMMC,EAAmBC,GAAkB,CAC1CjB,EAAsBiB,CACvB,EAEMC,EAAiB,IACfhB,EAGR,OACCG,KAAA,uBACAF,KAAA,uBACAG,KAAA,gBACAU,KAAA,gBACAE,KAAA",
6
+ "names": ["getAllRegisteredTags", "getCustomElementsScopingRules", "getCustomElementsScopingSuffix", "VersionInfo", "getSharedResource", "currentRuntimeIndex", "currentRuntimeAlias", "compareCache", "Runtimes", "registerCurrentRuntime", "versionInfo", "getCurrentRuntimeIndex", "compareRuntimes", "index1", "index2", "cacheIndex", "runtime1", "runtime2", "majorDiff", "minorDiff", "patchDiff", "result", "setRuntimeAlias", "alias", "getAllRuntimes"]
7
7
  }