@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.
- package/CHANGELOG.md +26 -0
- package/cypress/specs/Accessor.cy.ts +83 -0
- package/cypress/specs/Boot.cy.ts +23 -0
- package/cypress/specs/ConfigurationChange.cy.ts +41 -0
- package/cypress/specs/ConfigurationScript.cy.ts +116 -0
- package/cypress/specs/ConfigurationURL.cy.ts +182 -0
- package/cypress/specs/CustomMount.cy.ts +34 -0
- package/cypress/specs/CustomTheme.cy.ts +36 -0
- package/cypress/specs/EventProvider.cy.ts +59 -0
- package/cypress/specs/SystemDOMElements.cy.ts +8 -0
- package/cypress/specs/Theming.cy.ts +74 -0
- package/cypress/specs/UI5ElementInvalidation.cy.ts +207 -0
- package/cypress/specs/UI5ElementLifecycle.cy.ts +82 -0
- package/cypress/specs/UI5ElementListenForChildPropChanges.cy.ts +62 -0
- package/cypress/specs/UI5ElementMetadataExt.cy.ts +42 -0
- package/cypress/specs/UI5ElementPropertyValidation.cy.ts +17 -0
- package/cypress/specs/UI5ElementPropsAndAttrs.cy.ts +113 -0
- package/cypress/specs/UI5ElementShadowDOM.cy.ts +30 -0
- package/cypress/specs/UI5ElementSlots.cy.ts +116 -0
- package/cypress/specs/WithComplexTemplate.cy.ts +32 -0
- package/cypress/tsconfig.json +20 -0
- package/cypress.config.js +3 -0
- package/dist/.tsbuildinfobuild +1 -0
- package/dist/InitialConfiguration.d.ts +7 -1
- package/dist/InitialConfiguration.js +20 -3
- package/dist/InitialConfiguration.js.map +1 -1
- package/dist/Location.d.ts +11 -0
- package/dist/Location.js +49 -0
- package/dist/Location.js.map +1 -0
- package/dist/Runtimes.js +11 -0
- package/dist/Runtimes.js.map +1 -1
- package/dist/UI5Element.js +19 -11
- package/dist/UI5Element.js.map +1 -1
- package/dist/config/AnimationMode.js +4 -0
- package/dist/config/AnimationMode.js.map +1 -1
- package/dist/config/CalendarType.js +5 -0
- package/dist/config/CalendarType.js.map +1 -1
- package/dist/config/ConfigurationReset.d.ts +4 -0
- package/dist/config/ConfigurationReset.js +11 -0
- package/dist/config/ConfigurationReset.js.map +1 -0
- package/dist/config/Fonts.js +4 -0
- package/dist/config/Fonts.js.map +1 -1
- package/dist/config/FormatSettings.js +4 -0
- package/dist/config/FormatSettings.js.map +1 -1
- package/dist/config/Language.js +6 -1
- package/dist/config/Language.js.map +1 -1
- package/dist/config/NoConflict.js +4 -0
- package/dist/config/NoConflict.js.map +1 -1
- package/dist/config/Theme.js +4 -0
- package/dist/config/Theme.js.map +1 -1
- package/dist/config/ThemeRoot.js +4 -0
- package/dist/config/ThemeRoot.js.map +1 -1
- package/dist/config/Timezone.js +4 -0
- package/dist/config/Timezone.js.map +1 -1
- package/dist/config/Tooltips.d.ts +19 -0
- package/dist/config/Tooltips.js +29 -0
- package/dist/config/Tooltips.js.map +1 -0
- package/dist/custom-elements-internal.json +48 -0
- package/dist/custom-elements.json +48 -0
- package/dist/decorators/query.d.ts +25 -0
- package/dist/decorators/query.js +32 -0
- package/dist/decorators/query.js.map +1 -0
- package/dist/decorators/queryAll.d.ts +27 -0
- package/dist/decorators/queryAll.js +34 -0
- package/dist/decorators/queryAll.js.map +1 -0
- package/dist/generated/VersionInfo.js +5 -5
- package/dist/generated/VersionInfo.js.map +1 -1
- package/dist/prod/InitialConfiguration.js +1 -1
- package/dist/prod/InitialConfiguration.js.map +3 -3
- package/dist/prod/Location.js +2 -0
- package/dist/prod/Location.js.map +7 -0
- package/dist/prod/Runtimes.js +1 -1
- package/dist/prod/Runtimes.js.map +3 -3
- package/dist/prod/UI5Element.js +1 -1
- package/dist/prod/UI5Element.js.map +2 -2
- package/dist/prod/config/AnimationMode.js +1 -1
- package/dist/prod/config/AnimationMode.js.map +3 -3
- package/dist/prod/config/CalendarType.js +1 -1
- package/dist/prod/config/CalendarType.js.map +3 -3
- package/dist/prod/config/ConfigurationReset.js +2 -0
- package/dist/prod/config/ConfigurationReset.js.map +7 -0
- package/dist/prod/config/Fonts.js +1 -1
- package/dist/prod/config/Fonts.js.map +3 -3
- package/dist/prod/config/FormatSettings.js +1 -1
- package/dist/prod/config/FormatSettings.js.map +3 -3
- package/dist/prod/config/Language.js +1 -1
- package/dist/prod/config/Language.js.map +3 -3
- package/dist/prod/config/NoConflict.js +1 -1
- package/dist/prod/config/NoConflict.js.map +3 -3
- package/dist/prod/config/Theme.js +1 -1
- package/dist/prod/config/Theme.js.map +3 -3
- package/dist/prod/config/ThemeRoot.js +1 -1
- package/dist/prod/config/ThemeRoot.js.map +3 -3
- package/dist/prod/config/Timezone.js +1 -1
- package/dist/prod/config/Timezone.js.map +3 -3
- package/dist/prod/config/Tooltips.js +2 -0
- package/dist/prod/config/Tooltips.js.map +7 -0
- package/dist/prod/decorators/query.js +2 -0
- package/dist/prod/decorators/query.js.map +7 -0
- package/dist/prod/decorators/queryAll.js +2 -0
- package/dist/prod/decorators/queryAll.js.map +7 -0
- package/dist/prod/generated/VersionInfo.js +1 -1
- package/dist/prod/generated/VersionInfo.js.map +2 -2
- package/dist/prod/validateThemeRoot.js +1 -1
- package/dist/prod/validateThemeRoot.js.map +3 -3
- package/dist/validateThemeRoot.js +3 -2
- package/dist/validateThemeRoot.js.map +1 -1
- package/package-scripts.cjs +5 -3
- package/package.json +4 -3
- package/tsconfig.json +19 -19
- package/config/wdio.conf.cjs +0 -392
- package/dist/.tsbuildinfo +0 -1
- package/dist/generated/templates/elements/WithComplexTemplateTemplate.lit.d.ts +0 -4
- package/dist/generated/templates/elements/WithComplexTemplateTemplate.lit.js +0 -9
- package/dist/generated/templates/elements/WithComplexTemplateTemplate.lit.js.map +0 -1
- package/dist/prod/generated/templates/elements/WithComplexTemplateTemplate.lit.js +0 -2
- package/dist/prod/generated/templates/elements/WithComplexTemplateTemplate.lit.js.map +0 -7
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import { getNoConflict as getConfiguredNoConflict } from "../InitialConfiguration.js";
|
|
2
|
+
import { attachConfigurationReset } from "./ConfigurationReset.js";
|
|
2
3
|
// Fire these events even with noConflict: true
|
|
3
4
|
const excludeList = [
|
|
4
5
|
"value-changed",
|
|
5
6
|
"click",
|
|
6
7
|
];
|
|
7
8
|
let noConflict;
|
|
9
|
+
attachConfigurationReset(() => {
|
|
10
|
+
noConflict = undefined;
|
|
11
|
+
});
|
|
8
12
|
const shouldFireOriginalEvent = (eventName) => {
|
|
9
13
|
return excludeList.includes(eventName);
|
|
10
14
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NoConflict.js","sourceRoot":"","sources":["../../src/config/NoConflict.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,IAAI,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"NoConflict.js","sourceRoot":"","sources":["../../src/config/NoConflict.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,IAAI,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AACtF,OAAO,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AAEnE,+CAA+C;AAC/C,MAAM,WAAW,GAAG;IACnB,eAAe;IACf,OAAO;CACP,CAAC;AAIF,IAAI,UAAsC,CAAC;AAE3C,wBAAwB,CAAC,GAAG,EAAE;IAC7B,UAAU,GAAG,SAAS,CAAC;AACxB,CAAC,CAAC,CAAC;AAEH,MAAM,uBAAuB,GAAG,CAAC,SAAiB,EAAE,EAAE;IACrD,OAAO,WAAW,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;AACxC,CAAC,CAAC;AAEF,MAAM,0BAA0B,GAAG,CAAC,SAAiB,EAAE,EAAE;IACxD,MAAM,EAAE,GAAG,aAAa,EAAE,CAAC;IAC3B,8EAA8E;IAC9E,OAAO,CAAC,CAAC,OAAO,EAAE,KAAK,SAAS,IAAI,EAAE,CAAC,MAAM,IAAI,EAAE,CAAC,MAAM,CAAC,QAAQ,IAAI,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC;AACvG,CAAC,CAAC;AAEF;;;;GAIG;AACH,MAAM,aAAa,GAAG,GAAmB,EAAE;IAC1C,IAAI,UAAU,KAAK,SAAS,EAAE;QAC7B,UAAU,GAAG,uBAAuB,EAAE,CAAC;KACvC;IAED,OAAO,UAAU,CAAC;AACnB,CAAC,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,aAAa,GAAG,CAAC,cAA8B,EAAE,EAAE;IACxD,UAAU,GAAG,cAAc,CAAC;AAC7B,CAAC,CAAC;AAEF,MAAM,iBAAiB,GAAG,CAAC,SAAiB,EAAE,EAAE;IAC/C,MAAM,EAAE,GAAG,aAAa,EAAE,CAAC;IAE3B,2BAA2B;IAC3B,IAAI,uBAAuB,CAAC,SAAS,CAAC,EAAE;QACvC,OAAO,KAAK,CAAC;KACb;IAED,8BAA8B;IAC9B,IAAI,EAAE,KAAK,IAAI,EAAE;QAChB,OAAO,IAAI,CAAC;KACZ;IAED,OAAO,CAAC,0BAA0B,CAAC,SAAS,CAAC,CAAC;AAC/C,CAAC,CAAC;AAEF,OAAO,EACN,aAAa,EACb,aAAa,EACb,iBAAiB,GACjB,CAAC","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"]}
|
package/dist/config/Theme.js
CHANGED
|
@@ -4,7 +4,11 @@ import applyTheme from "../theming/applyTheme.js";
|
|
|
4
4
|
import getThemeDesignerTheme from "../theming/getThemeDesignerTheme.js";
|
|
5
5
|
import { DEFAULT_THEME, SUPPORTED_THEMES } from "../generated/AssetParameters.js";
|
|
6
6
|
import { boot, isBooted } from "../Boot.js";
|
|
7
|
+
import { attachConfigurationReset } from "./ConfigurationReset.js";
|
|
7
8
|
let curTheme;
|
|
9
|
+
attachConfigurationReset(() => {
|
|
10
|
+
curTheme = undefined;
|
|
11
|
+
});
|
|
8
12
|
/**
|
|
9
13
|
* Returns the current theme.
|
|
10
14
|
* @public
|
package/dist/config/Theme.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Theme.js","sourceRoot":"","sources":["../../src/config/Theme.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,IAAI,kBAAk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+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"]}
|
package/dist/config/ThemeRoot.js
CHANGED
|
@@ -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;
|
|
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,CA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ent":["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 <meta name=\"sap-allowedThemeOrigins\" content=\"https://my-example-host.com/\"> tag inside the <head> 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"]}
|
package/dist/config/Timezone.js
CHANGED
|
@@ -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;
|
|
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.
|
|
2
|
+
version: "2.2.0-rc.1",
|
|
3
3
|
major: 2,
|
|
4
|
-
minor:
|
|
5
|
-
patch:
|
|
6
|
-
suffix: "",
|
|
4
|
+
minor: 2,
|
|
5
|
+
patch: 0,
|
|
6
|
+
suffix: "-rc.1",
|
|
7
7
|
isNext: false,
|
|
8
|
-
buildTime:
|
|
8
|
+
buildTime: 1723709287,
|
|
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,
|
|
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.1\",\n\tmajor: 2,\n\tminor: 2,\n\tpatch: 0,\n\tsuffix: \"-rc.1\",\n\tisNext: false,\n\tbuildTime: 1723709287,\n};\nexport default VersionInfo;"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";import f from"./thirdparty/merge.js";import{getFeature as
|
|
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(
|
|
5
|
-
"mappings": "aAAA,OAAOA,MAAW,wBAClB,OAAS,cAAAC,MAAkB,wBAC3B,OAAS,iBAAAC,MAAqB,iCAC9B,OAAOC,MAAuB,yBAG9B,OAAOC,MAAmB,
|
|
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": "aAAA,OAAOA,MAAW,wBAClB,OAAS,cAAAC,MAAkB,wBAC3B,OAAS,iBAAAC,MAAqB,iCAC9B,OAAOC,MAAuB,yBAG9B,OAAOC,MAAmB,2BAE1B,OAAS,sBAAsBC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AAmB,EAGnBY,EAA0B,CAC3B,EAEA,OACC7B,KAAA,iBACAE,KAAA,SACAC,KAAA,aACAC,KAAA,YACAC,KAAA,wBACAC,KAAA,cACAG,KAAA,gBACAC,KAAA,yBACAC,KAAA,YACAC,KAAA,kBACAL,KAAA,sBACAyB,KAAA,mBACAxB,KAAA",
|
|
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",n={search(){return o?"":window.location.search}},i=()=>o?"":window.location.hostname,c=()=>o?"":window.location.port,a=()=>o?"":window.location.protocol,s=()=>o?"":window.location.href,u=()=>n.search(),w=(t,r,e)=>{o||window.open(t,r,e)},l=()=>{o||window.location.reload()};export{n as internals,l as locationReload,s as getLocationHref,u as getLocationSearch,i as getLocationHostname,c as getLocationPort,a as getLocationProtocol,w as locationOpen};
|
|
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 locationOpen = (url?: string | URL, target?: string, features?: string) => {\n\tif (isSSR) {\n\t\treturn;\n\t}\n\n\twindow.open(url, target, features);\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\tlocationOpen,\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,EAAe,CAACC,EAAoBC,EAAiBC,IAAsB,CAC5EV,GAIJ,OAAO,KAAKQ,EAAKC,EAAQC,CAAQ,CAClC,EAEMC,EAAiB,IAAM,CACvBX,GACJ,OAAO,SAAS,OAAO,CAEzB,EAEA,OACCC,KAAA,UACAU,KAAA,eACAN,KAAA,gBACAC,KAAA,kBACAJ,KAAA,oBACAC,KAAA,gBACAC,KAAA,oBACAG,KAAA",
|
|
6
|
+
"names": ["isSSR", "internals", "getLocationHostname", "getLocationPort", "getLocationProtocol", "getLocationHref", "getLocationSearch", "locationOpen", "url", "target", "features", "locationReload"]
|
|
7
|
+
}
|
package/dist/prod/Runtimes.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";import p from"./generated/VersionInfo.js";import
|
|
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
|