@ui5/webcomponents-base 2.22.0-rc.4 → 2.22.0-rc.6
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 +27 -0
- package/dist/.tsbuildinfobuild +1 -1
- package/dist/InitialConfiguration.d.ts +2 -1
- package/dist/InitialConfiguration.js +9 -2
- package/dist/InitialConfiguration.js.map +1 -1
- package/dist/Runtimes.d.ts +5 -1
- package/dist/Runtimes.js +24 -24
- package/dist/Runtimes.js.map +1 -1
- package/dist/config/UrlParams.d.ts +20 -0
- package/dist/config/UrlParams.js +30 -0
- package/dist/config/UrlParams.js.map +1 -0
- package/dist/custom-elements-internal.json +123 -117
- package/dist/custom-elements.json +123 -117
- package/dist/features/OpenUI5Support.d.ts +1 -1
- package/dist/features/OpenUI5Support.js +11 -8
- package/dist/features/OpenUI5Support.js.map +1 -1
- package/dist/features/patchPopup.js +33 -4
- package/dist/features/patchPopup.js.map +1 -1
- package/dist/generated/VersionInfo.js +3 -3
- package/dist/generated/VersionInfo.js.map +1 -1
- package/dist/generated/assets/i18n/messagebundle_ar.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_bg.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_ca.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_cnr.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_cs.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_cy.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_da.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_de.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_el.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_en_GB.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_es.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_es_MX.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_et.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_fi.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_fr.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_fr_CA.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_hi.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_hr.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_hu.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_id.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_it.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_iw.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_ja.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_kk.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_ko.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_lt.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_lv.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_mk.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_ms.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_nl.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_no.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_pl.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_pt.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_pt_PT.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_ro.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_ru.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_sh.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_sk.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_sl.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_sr.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_sv.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_th.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_tr.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_uk.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_vi.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_zh_CN.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_zh_TW.json +1 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/prod/InitialConfiguration.js +1 -1
- package/dist/prod/InitialConfiguration.js.map +3 -3
- package/dist/prod/Runtimes.js +1 -1
- package/dist/prod/Runtimes.js.map +3 -3
- package/dist/prod/config/UrlParams.js +2 -0
- package/dist/prod/config/UrlParams.js.map +7 -0
- package/dist/prod/features/OpenUI5Support.js +1 -1
- package/dist/prod/features/OpenUI5Support.js.map +3 -3
- package/dist/prod/features/patchPopup.js +1 -1
- package/dist/prod/features/patchPopup.js.map +3 -3
- package/dist/prod/generated/VersionInfo.js +1 -1
- package/dist/prod/generated/VersionInfo.js.map +1 -1
- package/dist/prod/generated/assets/i18n/messagebundle_ar.json +1 -0
- package/dist/prod/generated/assets/i18n/messagebundle_bg.json +1 -0
- package/dist/prod/generated/assets/i18n/messagebundle_ca.json +1 -0
- package/dist/prod/generated/assets/i18n/messagebundle_cnr.json +1 -0
- package/dist/prod/generated/assets/i18n/messagebundle_cs.json +1 -0
- package/dist/prod/generated/assets/i18n/messagebundle_cy.json +1 -0
- package/dist/prod/generated/assets/i18n/messagebundle_da.json +1 -0
- package/dist/prod/generated/assets/i18n/messagebundle_de.json +1 -0
- package/dist/prod/generated/assets/i18n/messagebundle_el.json +1 -0
- package/dist/prod/generated/assets/i18n/messagebundle_en_GB.json +1 -0
- package/dist/prod/generated/assets/i18n/messagebundle_es.json +1 -0
- package/dist/prod/generated/assets/i18n/messagebundle_es_MX.json +1 -0
- package/dist/prod/generated/assets/i18n/messagebundle_et.json +1 -0
- package/dist/prod/generated/assets/i18n/messagebundle_fi.json +1 -0
- package/dist/prod/generated/assets/i18n/messagebundle_fr.json +1 -0
- package/dist/prod/generated/assets/i18n/messagebundle_fr_CA.json +1 -0
- package/dist/prod/generated/assets/i18n/messagebundle_hi.json +1 -0
- package/dist/prod/generated/assets/i18n/messagebundle_hr.json +1 -0
- package/dist/prod/generated/assets/i18n/messagebundle_hu.json +1 -0
- package/dist/prod/generated/assets/i18n/messagebundle_id.json +1 -0
- package/dist/prod/generated/assets/i18n/messagebundle_it.json +1 -0
- package/dist/prod/generated/assets/i18n/messagebundle_iw.json +1 -0
- package/dist/prod/generated/assets/i18n/messagebundle_ja.json +1 -0
- package/dist/prod/generated/assets/i18n/messagebundle_kk.json +1 -0
- package/dist/prod/generated/assets/i18n/messagebundle_ko.json +1 -0
- package/dist/prod/generated/assets/i18n/messagebundle_lt.json +1 -0
- package/dist/prod/generated/assets/i18n/messagebundle_lv.json +1 -0
- package/dist/prod/generated/assets/i18n/messagebundle_mk.json +1 -0
- package/dist/prod/generated/assets/i18n/messagebundle_ms.json +1 -0
- package/dist/prod/generated/assets/i18n/messagebundle_nl.json +1 -0
- package/dist/prod/generated/assets/i18n/messagebundle_no.json +1 -0
- package/dist/prod/generated/assets/i18n/messagebundle_pl.json +1 -0
- package/dist/prod/generated/assets/i18n/messagebundle_pt.json +1 -0
- package/dist/prod/generated/assets/i18n/messagebundle_pt_PT.json +1 -0
- package/dist/prod/generated/assets/i18n/messagebundle_ro.json +1 -0
- package/dist/prod/generated/assets/i18n/messagebundle_ru.json +1 -0
- package/dist/prod/generated/assets/i18n/messagebundle_sh.json +1 -0
- package/dist/prod/generated/assets/i18n/messagebundle_sk.json +1 -0
- package/dist/prod/generated/assets/i18n/messagebundle_sl.json +1 -0
- package/dist/prod/generated/assets/i18n/messagebundle_sr.json +1 -0
- package/dist/prod/generated/assets/i18n/messagebundle_sv.json +1 -0
- package/dist/prod/generated/assets/i18n/messagebundle_th.json +1 -0
- package/dist/prod/generated/assets/i18n/messagebundle_tr.json +1 -0
- package/dist/prod/generated/assets/i18n/messagebundle_uk.json +1 -0
- package/dist/prod/generated/assets/i18n/messagebundle_vi.json +1 -0
- package/dist/prod/generated/assets/i18n/messagebundle_zh_CN.json +1 -0
- package/dist/prod/generated/assets/i18n/messagebundle_zh_TW.json +1 -0
- package/dist/prod/index.js +1 -1
- package/dist/prod/index.js.map +3 -3
- package/package.json +3 -3
- package/src/i18n/messagebundle_ar.properties +2 -0
- package/src/i18n/messagebundle_bg.properties +2 -0
- package/src/i18n/messagebundle_ca.properties +2 -0
- package/src/i18n/messagebundle_cnr.properties +2 -0
- package/src/i18n/messagebundle_cs.properties +2 -0
- package/src/i18n/messagebundle_cy.properties +2 -0
- package/src/i18n/messagebundle_da.properties +2 -0
- package/src/i18n/messagebundle_de.properties +2 -0
- package/src/i18n/messagebundle_el.properties +2 -0
- package/src/i18n/messagebundle_en_GB.properties +2 -0
- package/src/i18n/messagebundle_es.properties +2 -0
- package/src/i18n/messagebundle_es_MX.properties +2 -0
- package/src/i18n/messagebundle_et.properties +2 -0
- package/src/i18n/messagebundle_fi.properties +2 -0
- package/src/i18n/messagebundle_fr.properties +2 -0
- package/src/i18n/messagebundle_fr_CA.properties +2 -0
- package/src/i18n/messagebundle_hi.properties +2 -0
- package/src/i18n/messagebundle_hr.properties +2 -0
- package/src/i18n/messagebundle_hu.properties +2 -0
- package/src/i18n/messagebundle_id.properties +2 -0
- package/src/i18n/messagebundle_it.properties +2 -0
- package/src/i18n/messagebundle_iw.properties +2 -0
- package/src/i18n/messagebundle_ja.properties +2 -0
- package/src/i18n/messagebundle_kk.properties +2 -0
- package/src/i18n/messagebundle_ko.properties +2 -0
- package/src/i18n/messagebundle_lt.properties +2 -0
- package/src/i18n/messagebundle_lv.properties +2 -0
- package/src/i18n/messagebundle_mk.properties +2 -0
- package/src/i18n/messagebundle_ms.properties +2 -0
- package/src/i18n/messagebundle_nl.properties +2 -0
- package/src/i18n/messagebundle_no.properties +2 -0
- package/src/i18n/messagebundle_pl.properties +2 -0
- package/src/i18n/messagebundle_pt.properties +2 -0
- package/src/i18n/messagebundle_pt_PT.properties +2 -0
- package/src/i18n/messagebundle_ro.properties +2 -0
- package/src/i18n/messagebundle_ru.properties +2 -0
- package/src/i18n/messagebundle_sh.properties +2 -0
- package/src/i18n/messagebundle_sk.properties +2 -0
- package/src/i18n/messagebundle_sl.properties +2 -0
- package/src/i18n/messagebundle_sr.properties +2 -0
- package/src/i18n/messagebundle_sv.properties +2 -0
- package/src/i18n/messagebundle_th.properties +2 -0
- package/src/i18n/messagebundle_tr.properties +2 -0
- package/src/i18n/messagebundle_uk.properties +2 -0
- package/src/i18n/messagebundle_vi.properties +2 -0
- package/src/i18n/messagebundle_zh_CN.properties +2 -0
- package/src/i18n/messagebundle_zh_TW.properties +2 -0
|
@@ -14,6 +14,7 @@ declare const getFetchDefaultLanguage: () => boolean;
|
|
|
14
14
|
declare const getNoConflict: () => boolean;
|
|
15
15
|
declare const getDefaultFontLoading: () => boolean;
|
|
16
16
|
declare const getEnableDefaultTooltips: () => boolean;
|
|
17
|
+
declare const getIgnoreUrlParams: () => boolean;
|
|
17
18
|
/**
|
|
18
19
|
* Get the configured calendar type
|
|
19
20
|
* @returns { String } the name of the configured calendar type
|
|
@@ -31,4 +32,4 @@ declare const getFormatSettings: () => FormatSettings;
|
|
|
31
32
|
* @private
|
|
32
33
|
*/
|
|
33
34
|
declare const resetConfiguration: (testEnv?: boolean) => void;
|
|
34
|
-
export { getAnimationMode, getTheme, getThemeRoot, getLanguage, getFetchDefaultLanguage, getNoConflict, getCalendarType, getSecondaryCalendarType, getTimezone, getFormatSettings, getDefaultFontLoading, resetConfiguration, getEnableDefaultTooltips, };
|
|
35
|
+
export { getAnimationMode, getTheme, getThemeRoot, getLanguage, getFetchDefaultLanguage, getNoConflict, getCalendarType, getSecondaryCalendarType, getTimezone, getFormatSettings, getDefaultFontLoading, resetConfiguration, getEnableDefaultTooltips, getIgnoreUrlParams, };
|
|
@@ -19,6 +19,7 @@ let initialConfig = {
|
|
|
19
19
|
fetchDefaultLanguage: false,
|
|
20
20
|
defaultFontLoading: true,
|
|
21
21
|
enableDefaultTooltips: true,
|
|
22
|
+
ignoreUrlParams: false,
|
|
22
23
|
};
|
|
23
24
|
/* General settings */
|
|
24
25
|
const getAnimationMode = () => {
|
|
@@ -58,6 +59,10 @@ const getEnableDefaultTooltips = () => {
|
|
|
58
59
|
initConfiguration();
|
|
59
60
|
return initialConfig.enableDefaultTooltips;
|
|
60
61
|
};
|
|
62
|
+
const getIgnoreUrlParams = () => {
|
|
63
|
+
initConfiguration();
|
|
64
|
+
return initialConfig.ignoreUrlParams;
|
|
65
|
+
};
|
|
61
66
|
/**
|
|
62
67
|
* Get the configured calendar type
|
|
63
68
|
* @returns { String } the name of the configured calendar type
|
|
@@ -170,9 +175,11 @@ const resetConfiguration = (testEnv) => {
|
|
|
170
175
|
// 1. Lowest priority - configuration script
|
|
171
176
|
parseConfigurationScript();
|
|
172
177
|
// 2. URL parameters overwrite configuration script parameters
|
|
173
|
-
|
|
178
|
+
if (!initialConfig.ignoreUrlParams) {
|
|
179
|
+
parseURLParameters();
|
|
180
|
+
}
|
|
174
181
|
// 3. If OpenUI5 is detected, it has the highest priority
|
|
175
182
|
applyOpenUI5Configuration();
|
|
176
183
|
};
|
|
177
|
-
export { getAnimationMode, getTheme, getThemeRoot, getLanguage, getFetchDefaultLanguage, getNoConflict, getCalendarType, getSecondaryCalendarType, getTimezone, getFormatSettings, getDefaultFontLoading, resetConfiguration, getEnableDefaultTooltips, };
|
|
184
|
+
export { getAnimationMode, getTheme, getThemeRoot, getLanguage, getFetchDefaultLanguage, getNoConflict, getCalendarType, getSecondaryCalendarType, getTimezone, getFormatSettings, getDefaultFontLoading, resetConfiguration, getEnableDefaultTooltips, getIgnoreUrlParams, };
|
|
178
185
|
//# sourceMappingURL=InitialConfiguration.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InitialConfiguration.js","sourceRoot":"","sources":["../src/InitialConfiguration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,uBAAuB,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAG/D,OAAO,aAAa,MAAM,0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ACR,CAAC;IAED,MAAM,aAAa,GAAG,cAAc,CAAC,8BAA8B,EAAE,CAAC;IACtE,aAAa,GAAG,KAAK,CAAC,aAAa,EAAE,aAAa,CAAC,CAAC;AACrD,CAAC,CAAC;AAEF,MAAM,iBAAiB,GAAG,GAAG,EAAE;IAC9B,IAAI,OAAO,QAAQ,KAAK,WAAW,IAAI,WAAW,EAAE,CAAC;QACpD,OAAO;IACR,CAAC;IAED,kBAAkB,EAAE,CAAC;IAErB,WAAW,GAAG,IAAI,CAAC;AACpB,CAAC,CAAC;AAEF;;;GAGG;AACH,MAAM,kBAAkB,GAAG,CAAC,OAAiB,EAAE,EAAE;IAChD,IAAI,OAAO,EAAE,CAAC;QACb,oBAAoB,EAAE,CAAC;IACxB,CAAC;IACD,4CAA4C;IAC5C,wBAAwB,EAAE,CAAC;IAE3B,8DAA8D;IAC9D,kBAAkB,EAAE,CAAC;IAErB,yDAAyD;IACzD,yBAAyB,EAAE,CAAC;AAC7B,CAAC,CAAC;AAEF,OAAO,EACN,gBAAgB,EAChB,QAAQ,EACR,YAAY,EACZ,WAAW,EACX,uBAAuB,EACvB,aAAa,EACb,eAAe,EACf,wBAAwB,EACxB,WAAW,EACX,iBAAiB,EACjB,qBAAqB,EACrB,kBAAkB,EAClB,wBAAwB,GACxB,CAAC","sourcesContent":["import merge from \"./thirdparty/merge.js\";\nimport { getFeature } from \"./FeaturesRegistry.js\";\nimport { DEFAULT_THEME } from \"./generated/AssetParameters.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 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"]}
|
|
1
|
+
{"version":3,"file":"InitialConfiguration.js","sourceRoot":"","sources":["../src/InitialConfiguration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,uBAAuB,CAAC;AAC1C,OAAO,EAAE,UAAU,EAA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AK,CAAC,GAAG,KAAK,CAAC;IAC9B,CAAC;AACF,CAAC,CAAC;AAEF,MAAM,yBAAyB,GAAG,GAAG,EAAE;IACtC,MAAM,cAAc,GAAG,UAAU,CAAwB,gBAAgB,CAAC,CAAC;IAC3E,IAAI,CAAC,cAAc,IAAI,CAAC,cAAc,CAAC,iBAAiB,EAAE,EAAE,CAAC;QAC5D,OAAO;IACR,CAAC;IAED,MAAM,aAAa,GAAG,cAAc,CAAC,8BAA8B,EAAE,CAAC;IACtE,aAAa,GAAG,KAAK,CAAC,aAAa,EAAE,aAAa,CAAC,CAAC;AACrD,CAAC,CAAC;AAEF,MAAM,iBAAiB,GAAG,GAAG,EAAE;IAC9B,IAAI,OAAO,QAAQ,KAAK,WAAW,IAAI,WAAW,EAAE,CAAC;QACpD,OAAO;IACR,CAAC;IAED,kBAAkB,EAAE,CAAC;IAErB,WAAW,GAAG,IAAI,CAAC;AACpB,CAAC,CAAC;AAEF;;;GAGG;AACH,MAAM,kBAAkB,GAAG,CAAC,OAAiB,EAAE,EAAE;IAChD,IAAI,OAAO,EAAE,CAAC;QACb,oBAAoB,EAAE,CAAC;IACxB,CAAC;IACD,4CAA4C;IAC5C,wBAAwB,EAAE,CAAC;IAE3B,8DAA8D;IAC9D,IAAI,CAAC,aAAa,CAAC,eAAe,EAAE,CAAC;QACpC,kBAAkB,EAAE,CAAC;IACtB,CAAC;IAED,yDAAyD;IACzD,yBAAyB,EAAE,CAAC;AAC7B,CAAC,CAAC;AAEF,OAAO,EACN,gBAAgB,EAChB,QAAQ,EACR,YAAY,EACZ,WAAW,EACX,uBAAuB,EACvB,aAAa,EACb,eAAe,EACf,wBAAwB,EACxB,WAAW,EACX,iBAAiB,EACjB,qBAAqB,EACrB,kBAAkB,EAClB,wBAAwB,EACxB,kBAAkB,GAClB,CAAC","sourcesContent":["import merge from \"./thirdparty/merge.js\";\nimport { getFeature } from \"./FeaturesRegistry.js\";\nimport { DEFAULT_THEME } from \"./generated/AssetParameters.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\tignoreUrlParams: 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\tignoreUrlParams: false,\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\nconst getIgnoreUrlParams = () => {\n\tinitConfiguration();\n\treturn initialConfig.ignoreUrlParams;\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 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\tif (!initialConfig.ignoreUrlParams) {\n\t\tparseURLParameters();\n\t}\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\tgetIgnoreUrlParams,\n};\n"]}
|
package/dist/Runtimes.d.ts
CHANGED
|
@@ -12,6 +12,10 @@ declare const registerCurrentRuntime: () => void;
|
|
|
12
12
|
* @returns {*}
|
|
13
13
|
*/
|
|
14
14
|
declare const getCurrentRuntimeIndex: () => number;
|
|
15
|
+
/**
|
|
16
|
+
* Compares two VersionInfo objects and returns 1 if the first is bigger, -1 if the second is bigger, and 0 if equal.
|
|
17
|
+
*/
|
|
18
|
+
declare const compareVersions: (v1: VersionInfo, v2: VersionInfo) => number;
|
|
15
19
|
/**
|
|
16
20
|
* 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
|
|
17
21
|
* @param index1 The index of the first runtime to compare
|
|
@@ -25,4 +29,4 @@ declare const compareRuntimes: (index1: number, index2: number) => number;
|
|
|
25
29
|
*/
|
|
26
30
|
declare const setRuntimeAlias: (alias: string) => void;
|
|
27
31
|
declare const getAllRuntimes: () => RuntimeData[];
|
|
28
|
-
export { getCurrentRuntimeIndex, registerCurrentRuntime, compareRuntimes, setRuntimeAlias, getAllRuntimes, };
|
|
32
|
+
export { getCurrentRuntimeIndex, registerCurrentRuntime, compareRuntimes, compareVersions, setRuntimeAlias, getAllRuntimes, };
|
package/dist/Runtimes.js
CHANGED
|
@@ -42,6 +42,28 @@ const registerCurrentRuntime = () => {
|
|
|
42
42
|
const getCurrentRuntimeIndex = () => {
|
|
43
43
|
return currentRuntimeIndex;
|
|
44
44
|
};
|
|
45
|
+
/**
|
|
46
|
+
* Compares two VersionInfo objects and returns 1 if the first is bigger, -1 if the second is bigger, and 0 if equal.
|
|
47
|
+
*/
|
|
48
|
+
const compareVersions = (v1, v2) => {
|
|
49
|
+
if (v1.isNext || v2.isNext) {
|
|
50
|
+
return v1.buildTime - v2.buildTime;
|
|
51
|
+
}
|
|
52
|
+
const majorDiff = v1.major - v2.major;
|
|
53
|
+
if (majorDiff) {
|
|
54
|
+
return majorDiff;
|
|
55
|
+
}
|
|
56
|
+
const minorDiff = v1.minor - v2.minor;
|
|
57
|
+
if (minorDiff) {
|
|
58
|
+
return minorDiff;
|
|
59
|
+
}
|
|
60
|
+
const patchDiff = v1.patch - v2.patch;
|
|
61
|
+
if (patchDiff) {
|
|
62
|
+
return patchDiff;
|
|
63
|
+
}
|
|
64
|
+
const collator = new Intl.Collator(undefined, { numeric: true, sensitivity: "base" });
|
|
65
|
+
return collator.compare(v1.suffix, v2.suffix);
|
|
66
|
+
};
|
|
45
67
|
/**
|
|
46
68
|
* 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
|
|
47
69
|
* @param index1 The index of the first runtime to compare
|
|
@@ -58,29 +80,7 @@ const compareRuntimes = (index1, index2) => {
|
|
|
58
80
|
if (!runtime1 || !runtime2) {
|
|
59
81
|
throw new Error("Invalid runtime index supplied");
|
|
60
82
|
}
|
|
61
|
-
|
|
62
|
-
if (runtime1.isNext || runtime2.isNext) {
|
|
63
|
-
return runtime1.buildTime - runtime2.buildTime;
|
|
64
|
-
}
|
|
65
|
-
// If major versions differ, bigger one wins
|
|
66
|
-
const majorDiff = runtime1.major - runtime2.major;
|
|
67
|
-
if (majorDiff) {
|
|
68
|
-
return majorDiff;
|
|
69
|
-
}
|
|
70
|
-
// If minor versions differ, bigger one wins
|
|
71
|
-
const minorDiff = runtime1.minor - runtime2.minor;
|
|
72
|
-
if (minorDiff) {
|
|
73
|
-
return minorDiff;
|
|
74
|
-
}
|
|
75
|
-
// If patch versions differ, bigger one wins
|
|
76
|
-
const patchDiff = runtime1.patch - runtime2.patch;
|
|
77
|
-
if (patchDiff) {
|
|
78
|
-
return patchDiff;
|
|
79
|
-
}
|
|
80
|
-
// Bigger suffix wins, f.e. rc10 > rc9
|
|
81
|
-
// Important: suffix is alphanumeric, must use natural compare
|
|
82
|
-
const collator = new Intl.Collator(undefined, { numeric: true, sensitivity: "base" });
|
|
83
|
-
const result = collator.compare(runtime1.suffix, runtime2.suffix);
|
|
83
|
+
const result = compareVersions(runtime1, runtime2);
|
|
84
84
|
compareCache.set(cacheIndex, result);
|
|
85
85
|
return result;
|
|
86
86
|
};
|
|
@@ -94,5 +94,5 @@ const setRuntimeAlias = (alias) => {
|
|
|
94
94
|
const getAllRuntimes = () => {
|
|
95
95
|
return Runtimes;
|
|
96
96
|
};
|
|
97
|
-
export { getCurrentRuntimeIndex, registerCurrentRuntime, compareRuntimes, setRuntimeAlias, getAllRuntimes, };
|
|
97
|
+
export { getCurrentRuntimeIndex, registerCurrentRuntime, compareRuntimes, compareVersions, setRuntimeAlias, getAllRuntimes, };
|
|
98
98
|
//# sourceMappingURL=Runtimes.js.map
|
package/dist/Runtimes.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Runtimes.js","sourceRoot":"","sources":["../src/Runtimes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAAE,6BAA6B,EAAE,8BAA8B,EAAE,MAAM,+BAA+B,CAAC;AAC9G,OAAO,WAAW,MAAM,4BAA4B,CAAC;AACrD,OAAO,iBAAiB,MAAM,wBAAwB,CAAC;AAQvD,IAAI,mBAA2B,CAAC;AAChC,IAAI,mBAAmB,GAAG,EAAE,CAAC;AAE7B,MAAM,YAAY,GAAG,IAAI,GAAG,EAAkB,CAAC;AAE/C;;;;GAIG;AACH,MAAM,QAAQ,GAAG,iBAAiB,CAAqB,UAAU,EAAE,EAAE,CAAC,CAA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AAc,GAAG,GAAG,EAAE;IAC3B,OAAO,QAAQ,CAAC;AACjB,CAAC,CAAC;AAEF,OAAO,EACN,sBAAsB,EACtB,sBAAsB,EACtB,eAAe,EACf,eAAe,EACf,eAAe,EACf,cAAc,GACd,CAAC","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\timportMetaUrl: 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\timportMetaUrl: import.meta.url,\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 VersionInfo objects and returns 1 if the first is bigger, -1 if the second is bigger, and 0 if equal.\n */\nconst compareVersions = (v1: VersionInfo, v2: VersionInfo): number => {\n\tif (v1.isNext || v2.isNext) {\n\t\treturn v1.buildTime - v2.buildTime;\n\t}\n\n\tconst majorDiff = v1.major - v2.major;\n\tif (majorDiff) {\n\t\treturn majorDiff;\n\t}\n\n\tconst minorDiff = v1.minor - v2.minor;\n\tif (minorDiff) {\n\t\treturn minorDiff;\n\t}\n\n\tconst patchDiff = v1.patch - v2.patch;\n\tif (patchDiff) {\n\t\treturn patchDiff;\n\t}\n\n\tconst collator = new Intl.Collator(undefined, { numeric: true, sensitivity: \"base\" });\n\treturn collator.compare(v1.suffix, v2.suffix);\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\tconst result = compareVersions(runtime1, runtime2);\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\tcompareVersions,\n\tsetRuntimeAlias,\n\tgetAllRuntimes,\n};\n"]}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns if the "ignoreUrlParams" configuration is set.
|
|
3
|
+
* @public
|
|
4
|
+
* @since 2.23.0
|
|
5
|
+
* @returns { boolean }
|
|
6
|
+
*/
|
|
7
|
+
declare const getIgnoreUrlParams: () => boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Defines the "ignoreUrlParams" setting.
|
|
10
|
+
*
|
|
11
|
+
* - When set to "true", the framework will not process URL parameters
|
|
12
|
+
* (e.g. sap-ui-theme, sap-ui-language) during initialization.
|
|
13
|
+
* - When set to "false" (default), URL parameters are processed normally.
|
|
14
|
+
*
|
|
15
|
+
* @public
|
|
16
|
+
* @since 2.23.0
|
|
17
|
+
* @param { boolean } ignoreUrlParams
|
|
18
|
+
*/
|
|
19
|
+
declare const setIgnoreUrlParams: (ignoreUrlParams: boolean) => void;
|
|
20
|
+
export { getIgnoreUrlParams, setIgnoreUrlParams, };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { getIgnoreUrlParams as getConfiguredIgnoreUrlParams } from "../InitialConfiguration.js";
|
|
2
|
+
let _ignoreUrlParams;
|
|
3
|
+
/**
|
|
4
|
+
* Returns if the "ignoreUrlParams" configuration is set.
|
|
5
|
+
* @public
|
|
6
|
+
* @since 2.23.0
|
|
7
|
+
* @returns { boolean }
|
|
8
|
+
*/
|
|
9
|
+
const getIgnoreUrlParams = () => {
|
|
10
|
+
if (_ignoreUrlParams === undefined) {
|
|
11
|
+
_ignoreUrlParams = getConfiguredIgnoreUrlParams();
|
|
12
|
+
}
|
|
13
|
+
return _ignoreUrlParams;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Defines the "ignoreUrlParams" setting.
|
|
17
|
+
*
|
|
18
|
+
* - When set to "true", the framework will not process URL parameters
|
|
19
|
+
* (e.g. sap-ui-theme, sap-ui-language) during initialization.
|
|
20
|
+
* - When set to "false" (default), URL parameters are processed normally.
|
|
21
|
+
*
|
|
22
|
+
* @public
|
|
23
|
+
* @since 2.23.0
|
|
24
|
+
* @param { boolean } ignoreUrlParams
|
|
25
|
+
*/
|
|
26
|
+
const setIgnoreUrlParams = (ignoreUrlParams) => {
|
|
27
|
+
_ignoreUrlParams = ignoreUrlParams;
|
|
28
|
+
};
|
|
29
|
+
export { getIgnoreUrlParams, setIgnoreUrlParams, };
|
|
30
|
+
//# sourceMappingURL=UrlParams.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UrlParams.js","sourceRoot":"","sources":["../../src/config/UrlParams.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,IAAI,4BAA4B,EAAE,MAAM,4BAA4B,CAAC;AAEhG,IAAI,gBAAyB,CAAC;AAE9B;;;;;GAKG;AACH,MAAM,kBAAkB,GAAG,GAAY,EAAE;IACxC,IAAI,gBAAgB,KAAK,SAAS,EAAE,CAAC;QACpC,gBAAgB,GAAG,4BAA4B,EAAE,CAAC;IACnD,CAAC;IAED,OAAO,gBAAgB,CAAC;AACzB,CAAC,CAAC;AAEF;;;;;;;;;;GAUG;AACH,MAAM,kBAAkB,GAAG,CAAC,eAAwB,EAAE,EAAE;IACvD,gBAAgB,GAAG,eAAe,CAAC;AACpC,CAAC,CAAC;AAEF,OAAO,EACN,kBAAkB,EAClB,kBAAkB,GAClB,CAAC","sourcesContent":["import { getIgnoreUrlParams as getConfiguredIgnoreUrlParams } from \"../InitialConfiguration.js\";\n\nlet _ignoreUrlParams: boolean;\n\n/**\n * Returns if the \"ignoreUrlParams\" configuration is set.\n * @public\n * @since 2.23.0\n * @returns { boolean }\n */\nconst getIgnoreUrlParams = (): boolean => {\n\tif (_ignoreUrlParams === undefined) {\n\t\t_ignoreUrlParams = getConfiguredIgnoreUrlParams();\n\t}\n\n\treturn _ignoreUrlParams;\n};\n\n/**\n * Defines the \"ignoreUrlParams\" setting.\n *\n * - When set to \"true\", the framework will not process URL parameters\n * (e.g. sap-ui-theme, sap-ui-language) during initialization.\n * - When set to \"false\" (default), URL parameters are processed normally.\n *\n * @public\n * @since 2.23.0\n * @param { boolean } ignoreUrlParams\n */\nconst setIgnoreUrlParams = (ignoreUrlParams: boolean) => {\n\t_ignoreUrlParams = ignoreUrlParams;\n};\n\nexport {\n\tgetIgnoreUrlParams,\n\tsetIgnoreUrlParams,\n};\n"]}
|
|
@@ -1202,6 +1202,12 @@
|
|
|
1202
1202
|
"declarations": [],
|
|
1203
1203
|
"exports": []
|
|
1204
1204
|
},
|
|
1205
|
+
{
|
|
1206
|
+
"kind": "javascript-module",
|
|
1207
|
+
"path": "dist/config/UrlParams.js",
|
|
1208
|
+
"declarations": [],
|
|
1209
|
+
"exports": []
|
|
1210
|
+
},
|
|
1205
1211
|
{
|
|
1206
1212
|
"kind": "javascript-module",
|
|
1207
1213
|
"path": "dist/converters/DOMReference.js",
|
|
@@ -1367,123 +1373,6 @@
|
|
|
1367
1373
|
}
|
|
1368
1374
|
]
|
|
1369
1375
|
},
|
|
1370
|
-
{
|
|
1371
|
-
"kind": "javascript-module",
|
|
1372
|
-
"path": "dist/features/F6Navigation.js",
|
|
1373
|
-
"declarations": [],
|
|
1374
|
-
"exports": [
|
|
1375
|
-
{
|
|
1376
|
-
"kind": "js",
|
|
1377
|
-
"name": "default",
|
|
1378
|
-
"declaration": {
|
|
1379
|
-
"name": "F6Navigation",
|
|
1380
|
-
"module": "dist/features/F6Navigation.js"
|
|
1381
|
-
}
|
|
1382
|
-
}
|
|
1383
|
-
]
|
|
1384
|
-
},
|
|
1385
|
-
{
|
|
1386
|
-
"kind": "javascript-module",
|
|
1387
|
-
"path": "dist/features/InputElementsFormSupport.js",
|
|
1388
|
-
"declarations": [],
|
|
1389
|
-
"exports": []
|
|
1390
|
-
},
|
|
1391
|
-
{
|
|
1392
|
-
"kind": "javascript-module",
|
|
1393
|
-
"path": "dist/features/LegacyDateFormats.js",
|
|
1394
|
-
"declarations": [],
|
|
1395
|
-
"exports": [
|
|
1396
|
-
{
|
|
1397
|
-
"kind": "js",
|
|
1398
|
-
"name": "default",
|
|
1399
|
-
"declaration": {
|
|
1400
|
-
"name": "LegacyDateFormats",
|
|
1401
|
-
"module": "dist/features/LegacyDateFormats.js"
|
|
1402
|
-
}
|
|
1403
|
-
}
|
|
1404
|
-
]
|
|
1405
|
-
},
|
|
1406
|
-
{
|
|
1407
|
-
"kind": "javascript-module",
|
|
1408
|
-
"path": "dist/features/OpenUI5Element.js",
|
|
1409
|
-
"declarations": [],
|
|
1410
|
-
"exports": [
|
|
1411
|
-
{
|
|
1412
|
-
"kind": "js",
|
|
1413
|
-
"name": "default",
|
|
1414
|
-
"declaration": {
|
|
1415
|
-
"name": "OpenUI5Element",
|
|
1416
|
-
"module": "dist/features/OpenUI5Element.js"
|
|
1417
|
-
}
|
|
1418
|
-
}
|
|
1419
|
-
]
|
|
1420
|
-
},
|
|
1421
|
-
{
|
|
1422
|
-
"kind": "javascript-module",
|
|
1423
|
-
"path": "dist/features/OpenUI5Enablement.js",
|
|
1424
|
-
"declarations": [],
|
|
1425
|
-
"exports": [
|
|
1426
|
-
{
|
|
1427
|
-
"kind": "js",
|
|
1428
|
-
"name": "default",
|
|
1429
|
-
"declaration": {
|
|
1430
|
-
"name": "OpenUI5Enablement",
|
|
1431
|
-
"module": "dist/features/OpenUI5Enablement.js"
|
|
1432
|
-
}
|
|
1433
|
-
}
|
|
1434
|
-
]
|
|
1435
|
-
},
|
|
1436
|
-
{
|
|
1437
|
-
"kind": "javascript-module",
|
|
1438
|
-
"path": "dist/features/OpenUI5Support.js",
|
|
1439
|
-
"declarations": [],
|
|
1440
|
-
"exports": [
|
|
1441
|
-
{
|
|
1442
|
-
"kind": "js",
|
|
1443
|
-
"name": "default",
|
|
1444
|
-
"declaration": {
|
|
1445
|
-
"name": "OpenUI5Support",
|
|
1446
|
-
"module": "dist/features/OpenUI5Support.js"
|
|
1447
|
-
}
|
|
1448
|
-
}
|
|
1449
|
-
]
|
|
1450
|
-
},
|
|
1451
|
-
{
|
|
1452
|
-
"kind": "javascript-module",
|
|
1453
|
-
"path": "dist/features/insertOpenUI5PopupStyles.js",
|
|
1454
|
-
"declarations": [],
|
|
1455
|
-
"exports": [
|
|
1456
|
-
{
|
|
1457
|
-
"kind": "js",
|
|
1458
|
-
"name": "default",
|
|
1459
|
-
"declaration": {
|
|
1460
|
-
"name": "insertOpenUI5PopupStyles",
|
|
1461
|
-
"module": "dist/features/insertOpenUI5PopupStyles.js"
|
|
1462
|
-
}
|
|
1463
|
-
}
|
|
1464
|
-
]
|
|
1465
|
-
},
|
|
1466
|
-
{
|
|
1467
|
-
"kind": "javascript-module",
|
|
1468
|
-
"path": "dist/features/patchPatcher.js",
|
|
1469
|
-
"declarations": [],
|
|
1470
|
-
"exports": [
|
|
1471
|
-
{
|
|
1472
|
-
"kind": "js",
|
|
1473
|
-
"name": "default",
|
|
1474
|
-
"declaration": {
|
|
1475
|
-
"name": "patchPatcher",
|
|
1476
|
-
"module": "dist/features/patchPatcher.js"
|
|
1477
|
-
}
|
|
1478
|
-
}
|
|
1479
|
-
]
|
|
1480
|
-
},
|
|
1481
|
-
{
|
|
1482
|
-
"kind": "javascript-module",
|
|
1483
|
-
"path": "dist/features/patchPopup.js",
|
|
1484
|
-
"declarations": [],
|
|
1485
|
-
"exports": []
|
|
1486
|
-
},
|
|
1487
1376
|
{
|
|
1488
1377
|
"kind": "javascript-module",
|
|
1489
1378
|
"path": "dist/delegate/ItemNavigation.js",
|
|
@@ -1667,6 +1556,123 @@
|
|
|
1667
1556
|
}
|
|
1668
1557
|
]
|
|
1669
1558
|
},
|
|
1559
|
+
{
|
|
1560
|
+
"kind": "javascript-module",
|
|
1561
|
+
"path": "dist/features/F6Navigation.js",
|
|
1562
|
+
"declarations": [],
|
|
1563
|
+
"exports": [
|
|
1564
|
+
{
|
|
1565
|
+
"kind": "js",
|
|
1566
|
+
"name": "default",
|
|
1567
|
+
"declaration": {
|
|
1568
|
+
"name": "F6Navigation",
|
|
1569
|
+
"module": "dist/features/F6Navigation.js"
|
|
1570
|
+
}
|
|
1571
|
+
}
|
|
1572
|
+
]
|
|
1573
|
+
},
|
|
1574
|
+
{
|
|
1575
|
+
"kind": "javascript-module",
|
|
1576
|
+
"path": "dist/features/InputElementsFormSupport.js",
|
|
1577
|
+
"declarations": [],
|
|
1578
|
+
"exports": []
|
|
1579
|
+
},
|
|
1580
|
+
{
|
|
1581
|
+
"kind": "javascript-module",
|
|
1582
|
+
"path": "dist/features/LegacyDateFormats.js",
|
|
1583
|
+
"declarations": [],
|
|
1584
|
+
"exports": [
|
|
1585
|
+
{
|
|
1586
|
+
"kind": "js",
|
|
1587
|
+
"name": "default",
|
|
1588
|
+
"declaration": {
|
|
1589
|
+
"name": "LegacyDateFormats",
|
|
1590
|
+
"module": "dist/features/LegacyDateFormats.js"
|
|
1591
|
+
}
|
|
1592
|
+
}
|
|
1593
|
+
]
|
|
1594
|
+
},
|
|
1595
|
+
{
|
|
1596
|
+
"kind": "javascript-module",
|
|
1597
|
+
"path": "dist/features/OpenUI5Element.js",
|
|
1598
|
+
"declarations": [],
|
|
1599
|
+
"exports": [
|
|
1600
|
+
{
|
|
1601
|
+
"kind": "js",
|
|
1602
|
+
"name": "default",
|
|
1603
|
+
"declaration": {
|
|
1604
|
+
"name": "OpenUI5Element",
|
|
1605
|
+
"module": "dist/features/OpenUI5Element.js"
|
|
1606
|
+
}
|
|
1607
|
+
}
|
|
1608
|
+
]
|
|
1609
|
+
},
|
|
1610
|
+
{
|
|
1611
|
+
"kind": "javascript-module",
|
|
1612
|
+
"path": "dist/features/OpenUI5Enablement.js",
|
|
1613
|
+
"declarations": [],
|
|
1614
|
+
"exports": [
|
|
1615
|
+
{
|
|
1616
|
+
"kind": "js",
|
|
1617
|
+
"name": "default",
|
|
1618
|
+
"declaration": {
|
|
1619
|
+
"name": "OpenUI5Enablement",
|
|
1620
|
+
"module": "dist/features/OpenUI5Enablement.js"
|
|
1621
|
+
}
|
|
1622
|
+
}
|
|
1623
|
+
]
|
|
1624
|
+
},
|
|
1625
|
+
{
|
|
1626
|
+
"kind": "javascript-module",
|
|
1627
|
+
"path": "dist/features/OpenUI5Support.js",
|
|
1628
|
+
"declarations": [],
|
|
1629
|
+
"exports": [
|
|
1630
|
+
{
|
|
1631
|
+
"kind": "js",
|
|
1632
|
+
"name": "default",
|
|
1633
|
+
"declaration": {
|
|
1634
|
+
"name": "OpenUI5Support",
|
|
1635
|
+
"module": "dist/features/OpenUI5Support.js"
|
|
1636
|
+
}
|
|
1637
|
+
}
|
|
1638
|
+
]
|
|
1639
|
+
},
|
|
1640
|
+
{
|
|
1641
|
+
"kind": "javascript-module",
|
|
1642
|
+
"path": "dist/features/insertOpenUI5PopupStyles.js",
|
|
1643
|
+
"declarations": [],
|
|
1644
|
+
"exports": [
|
|
1645
|
+
{
|
|
1646
|
+
"kind": "js",
|
|
1647
|
+
"name": "default",
|
|
1648
|
+
"declaration": {
|
|
1649
|
+
"name": "insertOpenUI5PopupStyles",
|
|
1650
|
+
"module": "dist/features/insertOpenUI5PopupStyles.js"
|
|
1651
|
+
}
|
|
1652
|
+
}
|
|
1653
|
+
]
|
|
1654
|
+
},
|
|
1655
|
+
{
|
|
1656
|
+
"kind": "javascript-module",
|
|
1657
|
+
"path": "dist/features/patchPatcher.js",
|
|
1658
|
+
"declarations": [],
|
|
1659
|
+
"exports": [
|
|
1660
|
+
{
|
|
1661
|
+
"kind": "js",
|
|
1662
|
+
"name": "default",
|
|
1663
|
+
"declaration": {
|
|
1664
|
+
"name": "patchPatcher",
|
|
1665
|
+
"module": "dist/features/patchPatcher.js"
|
|
1666
|
+
}
|
|
1667
|
+
}
|
|
1668
|
+
]
|
|
1669
|
+
},
|
|
1670
|
+
{
|
|
1671
|
+
"kind": "javascript-module",
|
|
1672
|
+
"path": "dist/features/patchPopup.js",
|
|
1673
|
+
"declarations": [],
|
|
1674
|
+
"exports": []
|
|
1675
|
+
},
|
|
1670
1676
|
{
|
|
1671
1677
|
"kind": "javascript-module",
|
|
1672
1678
|
"path": "dist/locale/Locale.js",
|