@ui5/webcomponents-base 2.1.0-rc.1 → 2.1.0-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/dist/.tsbuildinfo +1 -1
- package/dist/FontFace.js +6 -1
- package/dist/FontFace.js.map +1 -1
- package/dist/InitialConfiguration.d.ts +2 -1
- package/dist/InitialConfiguration.js +6 -1
- package/dist/InitialConfiguration.js.map +1 -1
- package/dist/config/Fonts.d.ts +16 -0
- package/dist/config/Fonts.js +26 -0
- package/dist/config/Fonts.js.map +1 -0
- package/dist/custom-elements-internal.json +6 -0
- package/dist/custom-elements.json +6 -0
- package/dist/generated/VersionInfo.js +3 -3
- package/dist/generated/VersionInfo.js.map +1 -1
- package/dist/prod/FontFace.js +1 -1
- package/dist/prod/FontFace.js.map +3 -3
- package/dist/prod/InitialConfiguration.js +1 -1
- package/dist/prod/InitialConfiguration.js.map +3 -3
- package/dist/prod/config/Fonts.js +2 -0
- package/dist/prod/config/Fonts.js.map +7 -0
- package/dist/prod/generated/VersionInfo.js +1 -1
- package/dist/prod/generated/VersionInfo.js.map +1 -1
- package/package.json +3 -3
package/dist/FontFace.js
CHANGED
|
@@ -2,16 +2,21 @@ import { hasStyle, createStyle } from "./ManagedStyles.js";
|
|
|
2
2
|
import { getFeature } from "./FeaturesRegistry.js";
|
|
3
3
|
import fontFaceCSS from "./generated/css/FontFace.css.js";
|
|
4
4
|
import overrideFontFaceCSS from "./generated/css/OverrideFontFace.css.js";
|
|
5
|
+
import { getDefaultFontLoading } from "./config/Fonts.js";
|
|
5
6
|
const insertFontFace = () => {
|
|
6
7
|
const openUI5Support = getFeature("OpenUI5Support");
|
|
7
8
|
// Only set the main font if there is no OpenUI5 support, or there is, but OpenUI5 is not loaded
|
|
8
|
-
if (!openUI5Support || !openUI5Support.isOpenUI5Detected()) {
|
|
9
|
+
if ((!openUI5Support || !openUI5Support.isOpenUI5Detected())) {
|
|
9
10
|
insertMainFontFace();
|
|
10
11
|
}
|
|
11
12
|
// Always set the override font - OpenUI5 in CSS Vars mode does not set it, unlike the main font
|
|
12
13
|
insertOverrideFontFace();
|
|
13
14
|
};
|
|
14
15
|
const insertMainFontFace = () => {
|
|
16
|
+
const hasFontStyles = document.querySelector("head>style[data-ui5-font-face]");
|
|
17
|
+
if (!getDefaultFontLoading() || hasFontStyles) {
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
15
20
|
if (!hasStyle("data-ui5-font-face")) {
|
|
16
21
|
createStyle(fontFaceCSS, "data-ui5-font-face");
|
|
17
22
|
}
|
package/dist/FontFace.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FontFace.js","sourceRoot":"","sources":["../src/FontFace.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,WAAW,MAAM,iCAAiC,CAAC;AAC1D,OAAO,mBAAmB,MAAM,yCAAyC,CAAC;
|
|
1
|
+
{"version":3,"file":"FontFace.js","sourceRoot":"","sources":["../src/FontFace.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,WAAW,MAAM,iCAAiC,CAAC;AAC1D,OAAO,mBAAmB,MAAM,yCAAyC,CAAC;AAE1E,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAE1D,MAAM,cAAc,GAAG,GAAG,EAAE;IAC3B,MAAM,cAAc,GAAG,UAAU,CAAwB,gBAAgB,CAAC,CAAC;IAE3E,gGAAgG;IAChG,IAAI,CAAC,CAAC,cAAc,IAAI,CAAC,cAAc,CAAC,iBAAiB,EAAE,CAAC,EAAE;QAC7D,kBAAkB,EAAE,CAAC;KACrB;IAED,gGAAgG;IAChG,sBAAsB,EAAE,CAAC;AAC1B,CAAC,CAAC;AAEF,MAAM,kBAAkB,GAAG,GAAG,EAAE;IAC/B,MAAM,aAAa,GAAG,QAAQ,CAAC,aAAa,CAAC,gCAAgC,CAAC,CAAC;IAE/E,IAAI,CAAC,qBAAqB,EAAE,IAAI,aAAa,EAAE;QAC9C,OAAO;KACP;IAED,IAAI,CAAC,QAAQ,CAAC,oBAAoB,CAAC,EAAE;QACpC,WAAW,CAAC,WAAW,EAAE,oBAAoB,CAAC,CAAC;KAC/C;AACF,CAAC,CAAC;AAEF,MAAM,sBAAsB,GAAG,GAAG,EAAE;IACnC,IAAI,CAAC,QAAQ,CAAC,6BAA6B,CAAC,EAAE;QAC7C,WAAW,CAAC,mBAAmB,EAAE,6BAA6B,CAAC,CAAC;KAChE;AACF,CAAC,CAAC;AAEF,eAAe,cAAc,CAAC","sourcesContent":["import { hasStyle, createStyle } from \"./ManagedStyles.js\";\nimport { getFeature } from \"./FeaturesRegistry.js\";\nimport fontFaceCSS from \"./generated/css/FontFace.css.js\";\nimport overrideFontFaceCSS from \"./generated/css/OverrideFontFace.css.js\";\nimport type OpenUI5Support from \"./features/OpenUI5Support.js\";\nimport { getDefaultFontLoading } from \"./config/Fonts.js\";\n\nconst insertFontFace = () => {\n\tconst openUI5Support = getFeature<typeof OpenUI5Support>(\"OpenUI5Support\");\n\n\t// Only set the main font if there is no OpenUI5 support, or there is, but OpenUI5 is not loaded\n\tif ((!openUI5Support || !openUI5Support.isOpenUI5Detected())) {\n\t\tinsertMainFontFace();\n\t}\n\n\t// Always set the override font - OpenUI5 in CSS Vars mode does not set it, unlike the main font\n\tinsertOverrideFontFace();\n};\n\nconst insertMainFontFace = () => {\n\tconst hasFontStyles = document.querySelector(\"head>style[data-ui5-font-face]\");\n\n\tif (!getDefaultFontLoading() || hasFontStyles) {\n\t\treturn;\n\t}\n\n\tif (!hasStyle(\"data-ui5-font-face\")) {\n\t\tcreateStyle(fontFaceCSS, \"data-ui5-font-face\");\n\t}\n};\n\nconst insertOverrideFontFace = () => {\n\tif (!hasStyle(\"data-ui5-font-face-override\")) {\n\t\tcreateStyle(overrideFontFaceCSS, \"data-ui5-font-face-override\");\n\t}\n};\n\nexport default insertFontFace;\n"]}
|
|
@@ -12,6 +12,7 @@ declare const getLanguage: () => string | undefined;
|
|
|
12
12
|
*/
|
|
13
13
|
declare const getFetchDefaultLanguage: () => boolean;
|
|
14
14
|
declare const getNoConflict: () => boolean;
|
|
15
|
+
declare const getDefaultFontLoading: () => boolean;
|
|
15
16
|
/**
|
|
16
17
|
* Get the configured calendar type
|
|
17
18
|
* @returns { String } the name of the configured calendar type
|
|
@@ -24,4 +25,4 @@ declare const getSecondaryCalendarType: () => CalendarType | undefined;
|
|
|
24
25
|
*/
|
|
25
26
|
declare const getTimezone: () => string | undefined;
|
|
26
27
|
declare const getFormatSettings: () => FormatSettings;
|
|
27
|
-
export { getAnimationMode, getTheme, getThemeRoot, getLanguage, getFetchDefaultLanguage, getNoConflict, getCalendarType, getSecondaryCalendarType, getTimezone, getFormatSettings, };
|
|
28
|
+
export { getAnimationMode, getTheme, getThemeRoot, getLanguage, getFetchDefaultLanguage, getNoConflict, getCalendarType, getSecondaryCalendarType, getTimezone, getFormatSettings, getDefaultFontLoading, };
|
|
@@ -16,6 +16,7 @@ let initialConfig = {
|
|
|
16
16
|
noConflict: false,
|
|
17
17
|
formatSettings: {},
|
|
18
18
|
fetchDefaultLanguage: false,
|
|
19
|
+
defaultFontLoading: true,
|
|
19
20
|
};
|
|
20
21
|
/* General settings */
|
|
21
22
|
const getAnimationMode = () => {
|
|
@@ -47,6 +48,10 @@ const getNoConflict = () => {
|
|
|
47
48
|
initConfiguration();
|
|
48
49
|
return initialConfig.noConflict;
|
|
49
50
|
};
|
|
51
|
+
const getDefaultFontLoading = () => {
|
|
52
|
+
initConfiguration();
|
|
53
|
+
return initialConfig.defaultFontLoading;
|
|
54
|
+
};
|
|
50
55
|
/**
|
|
51
56
|
* Get the configured calendar type
|
|
52
57
|
* @returns { String } the name of the configured calendar type
|
|
@@ -153,5 +158,5 @@ const initConfiguration = () => {
|
|
|
153
158
|
applyOpenUI5Configuration();
|
|
154
159
|
initialized = true;
|
|
155
160
|
};
|
|
156
|
-
export { getAnimationMode, getTheme, getThemeRoot, getLanguage, getFetchDefaultLanguage, getNoConflict, getCalendarType, getSecondaryCalendarType, getTimezone, getFormatSettings, };
|
|
161
|
+
export { getAnimationMode, getTheme, getThemeRoot, getLanguage, getFetchDefaultLanguage, getNoConflict, getCalendarType, getSecondaryCalendarType, getTimezone, getFormatSettings, getDefaultFontLoading, };
|
|
157
162
|
//# 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;AAC/D,OAAO,iBAAiB,MAAM,wBAAwB,CAAC;AAGvD,OAAO,aAAa,MAAM,0BAA0B,CAAC;AAGrD,IAAI,WAAW,GAAG,KAAK,CAAC;AAgBxB,IAAI,aAAa,GAAkB;IAClC,aAAa,EAAE,aAAa,CAAC,IAAI;IACjC,KAAK,EAAE,aAAa;IACpB,SAAS,EAAE,SAAS;IACpB,GAAG,EAAE,SAAS;IACd,QAAQ,EAAE,SAAS;IACnB,QAAQ,EAAE,SAAS;IACnB,YAAY,EAAE,SAAS;IACvB,qBAAqB,EAAE,SAAS;IAChC,UAAU,EAAE,KAAK;IACjB,cAAc,EAAE,EAAE;IAClB,oBAAoB,EAAE,KAAK;CAC3B,CAAC;AAEF,sBAAsB;AACtB,MAAM,gBAAgB,GAAG,GAAG,EAAE;IAC7B,iBAAiB,EAAE,CAAC;IACpB,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AAC,KAAK,CAAC,GAAG,KAAK,CAAC;KAC7B;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;QAC3D,OAAO;KACP;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;QACnD,OAAO;KACP;IAED,4CAA4C;IAC5C,wBAAwB,EAAE,CAAC;IAE3B,8DAA8D;IAC9D,kBAAkB,EAAE,CAAC;IAErB,yDAAyD;IACzD,yBAAyB,EAAE,CAAC;IAE5B,WAAW,GAAG,IAAI,CAAC;AACpB,CAAC,CAAC;AAEF,OAAO,EACN,gBAAgB,EAChB,QAAQ,EACR,YAAY,EACZ,WAAW,EACX,uBAAuB,EACvB,aAAa,EACb,eAAe,EACf,wBAAwB,EACxB,WAAW,EACX,iBAAiB,GACjB,CAAC","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};\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};\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\n/**\n * Get the configured calendar type\n * @returns { String } the name of the configured calendar type\n */\nconst getCalendarType = () => {\n\tinitConfiguration();\n\treturn initialConfig.calendarType;\n};\n\nconst getSecondaryCalendarType = () => {\n\tinitConfiguration();\n\treturn initialConfig.secondaryCalendarType;\n};\n\n/**\n * Returns the configured IANA timezone ID.\n * @returns { String } the configured IANA timezone ID, e.g. \"America/New_York\"\n */\nconst getTimezone = () => {\n\tinitConfiguration();\n\treturn initialConfig.timezone;\n};\n\nconst getFormatSettings = () => {\n\tinitConfiguration();\n\treturn initialConfig.formatSettings;\n};\n\nconst booleanMapping = new Map();\nbooleanMapping.set(\"true\", true);\nbooleanMapping.set(\"false\", false);\n\nconst parseConfigurationScript = () => {\n\tconst configScript = document.querySelector(\"[data-ui5-config]\") || document.querySelector(\"[data-id='sap-ui-config']\"); // for backward compatibility\n\n\tlet configJSON;\n\n\tif (configScript) {\n\t\ttry {\n\t\t\tconfigJSON = JSON.parse(configScript.innerHTML);\n\t\t} catch (err) {\n\t\t\tconsole.warn(\"Incorrect data-sap-ui-config format. Please use JSON\"); /* eslint-disable-line */\n\t\t}\n\n\t\tif (configJSON) {\n\t\t\tinitialConfig = merge(initialConfig, configJSON);\n\t\t}\n\t}\n};\n\nconst parseURLParameters = () => {\n\tconst params = new URLSearchParams(window.location.search);\n\n\t// Process \"sap-*\" params first\n\tparams.forEach((value, key) => {\n\t\tconst parts = key.split(\"sap-\").length;\n\t\tif (parts === 0 || parts === key.split(\"sap-ui-\").length) {\n\t\t\treturn;\n\t\t}\n\n\t\tapplyURLParam(key, value, \"sap\");\n\t});\n\n\t// Process \"sap-ui-*\" params\n\tparams.forEach((value, key) => {\n\t\tif (!key.startsWith(\"sap-ui\")) {\n\t\t\treturn;\n\t\t}\n\n\t\tapplyURLParam(key, value, \"sap-ui\");\n\t});\n};\n\nconst normalizeThemeRootParamValue = (value: string) => {\n\tconst themeRoot = value.split(\"@\")[1];\n\n\treturn validateThemeRoot(themeRoot);\n};\n\nconst normalizeThemeParamValue = (param: string, value: string) => {\n\tif (param === \"theme\" && value.includes(\"@\")) { // the theme parameter might have @<URL-TO-THEME> in the value - strip this\n\t\treturn value.split(\"@\")[0];\n\t}\n\n\treturn value;\n};\n\nconst applyURLParam = (key: string, value: string, paramType: string) => {\n\tconst lowerCaseValue = value.toLowerCase();\n\tconst param = key.split(`${paramType}-`)[1];\n\n\tif (booleanMapping.has(value)) {\n\t\tvalue = booleanMapping.get(lowerCaseValue);\n\t}\n\n\tif (param === \"theme\") {\n\t\tinitialConfig.theme = normalizeThemeParamValue(param, value);\n\n\t\tif (value && value.includes(\"@\")) {\n\t\t\tinitialConfig.themeRoot = normalizeThemeRootParamValue(value);\n\t\t}\n\t} else {\n\t\tinitialConfig[param] = value;\n\t}\n};\n\nconst applyOpenUI5Configuration = () => {\n\tconst openUI5Support = getFeature<typeof OpenUI5Support>(\"OpenUI5Support\");\n\tif (!openUI5Support || !openUI5Support.isOpenUI5Detected()) {\n\t\treturn;\n\t}\n\n\tconst OpenUI5Config = openUI5Support.getConfigurationSettingsObject();\n\tinitialConfig = merge(initialConfig, OpenUI5Config);\n};\n\nconst initConfiguration = () => {\n\tif (typeof document === \"undefined\" || initialized) {\n\t\treturn;\n\t}\n\n\t// 1. Lowest priority - configuration script\n\tparseConfigurationScript();\n\n\t// 2. URL parameters overwrite configuration script parameters\n\tparseURLParameters();\n\n\t// 3. If OpenUI5 is detected, it has the highest priority\n\tapplyOpenUI5Configuration();\n\n\tinitialized = true;\n};\n\nexport {\n\tgetAnimationMode,\n\tgetTheme,\n\tgetThemeRoot,\n\tgetLanguage,\n\tgetFetchDefaultLanguage,\n\tgetNoConflict,\n\tgetCalendarType,\n\tgetSecondaryCalendarType,\n\tgetTimezone,\n\tgetFormatSettings,\n};\n"]}
|
|
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;AAC/D,OAAO,iBAAiB,MAAM,wBAAwB,CAAC;AAGvD,OAAO,aAAa,MAAM,0BAA0B,CAAC;AAGrD,IAAI,WAAW,GAAG,KAAK,CAAC;AAiBxB,IAAI,aAAa,GAAkB;IAClC,aAAa,EAAE,aAAa,CAAC,IAAI;IACjC,KAAK,EAAE,aAAa;IACpB,SAAS,EAAE,SAAS;IACpB,GAAG,EAAE,SAAS;IACd,QAAQ,EAAE,SAAS;IACnB,QAAQ,EAAE,SAAS;IACnB,YAAY,EAAE,SAAS;IACvB,qBAAqB,EAAE,SAAS;IAChC,UAAU,E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,GAAG,CAAC,cAAc,CAAC,CAAC;KAC3C;IAED,IAAI,KAAK,KAAK,OAAO,EAAE;QACtB,aAAa,CAAC,KAAK,GAAG,wBAAwB,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;QAE7D,IAAI,KAAK,IAAI,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;YACjC,aAAa,CAAC,SAAS,GAAG,4BAA4B,CAAC,KAAK,CAAC,CAAC;SAC9D;KACD;SAAM;QACN,aAAa,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC;KAC7B;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;QAC3D,OAAO;KACP;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;QACnD,OAAO;KACP;IAED,4CAA4C;IAC5C,wBAAwB,EAAE,CAAC;IAE3B,8DAA8D;IAC9D,kBAAkB,EAAE,CAAC;IAErB,yDAAyD;IACzD,yBAAyB,EAAE,CAAC;IAE5B,WAAW,GAAG,IAAI,CAAC;AACpB,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,GACrB,CAAC","sourcesContent":["import merge from \"./thirdparty/merge.js\";\nimport { getFeature } from \"./FeaturesRegistry.js\";\nimport { DEFAULT_THEME } from \"./generated/AssetParameters.js\";\nimport validateThemeRoot from \"./validateThemeRoot.js\";\nimport type OpenUI5Support from \"./features/OpenUI5Support.js\";\nimport type { FormatSettings } from \"./config/FormatSettings.js\";\nimport AnimationMode from \"./types/AnimationMode.js\";\nimport type CalendarType from \"./types/CalendarType.js\";\n\nlet initialized = false;\n\ntype InitialConfig = {\n\t[key: string]: any,\n\tanimationMode: AnimationMode,\n\ttheme: string,\n\tthemeRoot: string | undefined,\n\tlanguage: string | undefined,\n\tcalendarType: CalendarType | undefined,\n\tsecondaryCalendarType: CalendarType | undefined,\n\ttimezone: string | undefined,\n\tnoConflict: boolean,\n\tformatSettings: FormatSettings,\n\tfetchDefaultLanguage: boolean,\n\tdefaultFontLoading: boolean,\n};\n\nlet initialConfig: InitialConfig = {\n\tanimationMode: AnimationMode.Full,\n\ttheme: DEFAULT_THEME,\n\tthemeRoot: undefined,\n\trtl: undefined,\n\tlanguage: undefined,\n\ttimezone: undefined,\n\tcalendarType: undefined,\n\tsecondaryCalendarType: undefined,\n\tnoConflict: false, // no URL\n\tformatSettings: {},\n\tfetchDefaultLanguage: false,\n\tdefaultFontLoading: true,\n};\n\n/* General settings */\nconst getAnimationMode = () => {\n\tinitConfiguration();\n\treturn initialConfig.animationMode;\n};\n\nconst getTheme = () => {\n\tinitConfiguration();\n\treturn initialConfig.theme;\n};\n\nconst getThemeRoot = () => {\n\tinitConfiguration();\n\treturn initialConfig.themeRoot;\n};\n\nconst getLanguage = () => {\n\tinitConfiguration();\n\treturn initialConfig.language;\n};\n\n/**\n * Returns if the default language, that is inlined at build time,\n * should be fetched over the network instead.\n * @returns {Boolean}\n */\nconst getFetchDefaultLanguage = () => {\n\tinitConfiguration();\n\treturn initialConfig.fetchDefaultLanguage;\n};\n\nconst getNoConflict = () => {\n\tinitConfiguration();\n\treturn initialConfig.noConflict;\n};\n\nconst getDefaultFontLoading = () => {\n\tinitConfiguration();\n\treturn initialConfig.defaultFontLoading;\n};\n\n/**\n * Get the configured calendar type\n * @returns { String } the name of the configured calendar type\n */\nconst getCalendarType = () => {\n\tinitConfiguration();\n\treturn initialConfig.calendarType;\n};\n\nconst getSecondaryCalendarType = () => {\n\tinitConfiguration();\n\treturn initialConfig.secondaryCalendarType;\n};\n\n/**\n * Returns the configured IANA timezone ID.\n * @returns { String } the configured IANA timezone ID, e.g. \"America/New_York\"\n */\nconst getTimezone = () => {\n\tinitConfiguration();\n\treturn initialConfig.timezone;\n};\n\nconst getFormatSettings = () => {\n\tinitConfiguration();\n\treturn initialConfig.formatSettings;\n};\n\nconst booleanMapping = new Map();\nbooleanMapping.set(\"true\", true);\nbooleanMapping.set(\"false\", false);\n\nconst parseConfigurationScript = () => {\n\tconst configScript = document.querySelector(\"[data-ui5-config]\") || document.querySelector(\"[data-id='sap-ui-config']\"); // for backward compatibility\n\n\tlet configJSON;\n\n\tif (configScript) {\n\t\ttry {\n\t\t\tconfigJSON = JSON.parse(configScript.innerHTML);\n\t\t} catch (err) {\n\t\t\tconsole.warn(\"Incorrect data-sap-ui-config format. Please use JSON\"); /* eslint-disable-line */\n\t\t}\n\n\t\tif (configJSON) {\n\t\t\tinitialConfig = merge(initialConfig, configJSON);\n\t\t}\n\t}\n};\n\nconst parseURLParameters = () => {\n\tconst params = new URLSearchParams(window.location.search);\n\n\t// Process \"sap-*\" params first\n\tparams.forEach((value, key) => {\n\t\tconst parts = key.split(\"sap-\").length;\n\t\tif (parts === 0 || parts === key.split(\"sap-ui-\").length) {\n\t\t\treturn;\n\t\t}\n\n\t\tapplyURLParam(key, value, \"sap\");\n\t});\n\n\t// Process \"sap-ui-*\" params\n\tparams.forEach((value, key) => {\n\t\tif (!key.startsWith(\"sap-ui\")) {\n\t\t\treturn;\n\t\t}\n\n\t\tapplyURLParam(key, value, \"sap-ui\");\n\t});\n};\n\nconst normalizeThemeRootParamValue = (value: string) => {\n\tconst themeRoot = value.split(\"@\")[1];\n\n\treturn validateThemeRoot(themeRoot);\n};\n\nconst normalizeThemeParamValue = (param: string, value: string) => {\n\tif (param === \"theme\" && value.includes(\"@\")) { // the theme parameter might have @<URL-TO-THEME> in the value - strip this\n\t\treturn value.split(\"@\")[0];\n\t}\n\n\treturn value;\n};\n\nconst applyURLParam = (key: string, value: string, paramType: string) => {\n\tconst lowerCaseValue = value.toLowerCase();\n\tconst param = key.split(`${paramType}-`)[1];\n\n\tif (booleanMapping.has(value)) {\n\t\tvalue = booleanMapping.get(lowerCaseValue);\n\t}\n\n\tif (param === \"theme\") {\n\t\tinitialConfig.theme = normalizeThemeParamValue(param, value);\n\n\t\tif (value && value.includes(\"@\")) {\n\t\t\tinitialConfig.themeRoot = normalizeThemeRootParamValue(value);\n\t\t}\n\t} else {\n\t\tinitialConfig[param] = value;\n\t}\n};\n\nconst applyOpenUI5Configuration = () => {\n\tconst openUI5Support = getFeature<typeof OpenUI5Support>(\"OpenUI5Support\");\n\tif (!openUI5Support || !openUI5Support.isOpenUI5Detected()) {\n\t\treturn;\n\t}\n\n\tconst OpenUI5Config = openUI5Support.getConfigurationSettingsObject();\n\tinitialConfig = merge(initialConfig, OpenUI5Config);\n};\n\nconst initConfiguration = () => {\n\tif (typeof document === \"undefined\" || initialized) {\n\t\treturn;\n\t}\n\n\t// 1. Lowest priority - configuration script\n\tparseConfigurationScript();\n\n\t// 2. URL parameters overwrite configuration script parameters\n\tparseURLParameters();\n\n\t// 3. If OpenUI5 is detected, it has the highest priority\n\tapplyOpenUI5Configuration();\n\n\tinitialized = true;\n};\n\nexport {\n\tgetAnimationMode,\n\tgetTheme,\n\tgetThemeRoot,\n\tgetLanguage,\n\tgetFetchDefaultLanguage,\n\tgetNoConflict,\n\tgetCalendarType,\n\tgetSecondaryCalendarType,\n\tgetTimezone,\n\tgetFormatSettings,\n\tgetDefaultFontLoading,\n};\n"]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns if the "defaultFontLoading" configuration is set.
|
|
3
|
+
* @public
|
|
4
|
+
* @returns { boolean }
|
|
5
|
+
*/
|
|
6
|
+
declare const getDefaultFontLoading: () => boolean;
|
|
7
|
+
/**
|
|
8
|
+
* Defines the "defaultFontLoading" setting.
|
|
9
|
+
*
|
|
10
|
+
* - When set to "true" (default), all used font faces are fetched over the network.
|
|
11
|
+
* - When set to "false", default font faces are not fetched automatically and must be managed separately.
|
|
12
|
+
* @public
|
|
13
|
+
* @param { boolean } defaultFontLoadingData
|
|
14
|
+
*/
|
|
15
|
+
declare const setDefaultFontLoading: (defaultFontLoadingData: boolean) => void;
|
|
16
|
+
export { getDefaultFontLoading, setDefaultFontLoading, };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { getDefaultFontLoading as getConfiguredDefaultFontLoading } from "../InitialConfiguration.js";
|
|
2
|
+
let defaultFontLoading;
|
|
3
|
+
/**
|
|
4
|
+
* Returns if the "defaultFontLoading" configuration is set.
|
|
5
|
+
* @public
|
|
6
|
+
* @returns { boolean }
|
|
7
|
+
*/
|
|
8
|
+
const getDefaultFontLoading = () => {
|
|
9
|
+
if (defaultFontLoading === undefined) {
|
|
10
|
+
defaultFontLoading = getConfiguredDefaultFontLoading();
|
|
11
|
+
}
|
|
12
|
+
return defaultFontLoading;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Defines the "defaultFontLoading" setting.
|
|
16
|
+
*
|
|
17
|
+
* - When set to "true" (default), all used font faces are fetched over the network.
|
|
18
|
+
* - When set to "false", default font faces are not fetched automatically and must be managed separately.
|
|
19
|
+
* @public
|
|
20
|
+
* @param { boolean } defaultFontLoadingData
|
|
21
|
+
*/
|
|
22
|
+
const setDefaultFontLoading = (defaultFontLoadingData) => {
|
|
23
|
+
defaultFontLoading = defaultFontLoadingData;
|
|
24
|
+
};
|
|
25
|
+
export { getDefaultFontLoading, setDefaultFontLoading, };
|
|
26
|
+
//# sourceMappingURL=Fonts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Fonts.js","sourceRoot":"","sources":["../../src/config/Fonts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,IAAI,+BAA+B,EAAE,MAAM,4BAA4B,CAAC;AAEtG,IAAI,kBAA2B,CAAC;AAEhC;;;;GAIG;AACH,MAAM,qBAAqB,GAAG,GAAY,EAAE;IAC3C,IAAI,kBAAkB,KAAK,SAAS,EAAE;QACrC,kBAAkB,GAAG,+BAA+B,EAAE,CAAC;KACvD;IAED,OAAO,kBAAkB,CAAC;AAC3B,CAAC,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,qBAAqB,GAAG,CAAC,sBAA+B,EAAE,EAAE;IACjE,kBAAkB,GAAG,sBAAsB,CAAC;AAC7C,CAAC,CAAC;AAEF,OAAO,EACN,qBAAqB,EACrB,qBAAqB,GACrB,CAAC","sourcesContent":["import { getDefaultFontLoading as getConfiguredDefaultFontLoading } from \"../InitialConfiguration.js\";\n\nlet defaultFontLoading: boolean;\n\n/**\n * Returns if the \"defaultFontLoading\" configuration is set.\n * @public\n * @returns { boolean }\n */\nconst getDefaultFontLoading = (): boolean => {\n\tif (defaultFontLoading === undefined) {\n\t\tdefaultFontLoading = getConfiguredDefaultFontLoading();\n\t}\n\n\treturn defaultFontLoading;\n};\n\n/**\n * Defines the \"defaultFontLoading\" setting.\n *\n * - When set to \"true\" (default), all used font faces are fetched over the network.\n * - When set to \"false\", default font faces are not fetched automatically and must be managed separately.\n * @public\n * @param { boolean } defaultFontLoadingData\n */\nconst setDefaultFontLoading = (defaultFontLoadingData: boolean) => {\n\tdefaultFontLoading = defaultFontLoadingData;\n};\n\nexport {\n\tgetDefaultFontLoading,\n\tsetDefaultFontLoading,\n};\n"]}
|
|
@@ -119,6 +119,12 @@
|
|
|
119
119
|
"declarations": [],
|
|
120
120
|
"exports": []
|
|
121
121
|
},
|
|
122
|
+
{
|
|
123
|
+
"kind": "javascript-module",
|
|
124
|
+
"path": "dist/config/Fonts.js",
|
|
125
|
+
"declarations": [],
|
|
126
|
+
"exports": []
|
|
127
|
+
},
|
|
122
128
|
{
|
|
123
129
|
"kind": "javascript-module",
|
|
124
130
|
"path": "dist/config/FormatSettings.js",
|
|
@@ -119,6 +119,12 @@
|
|
|
119
119
|
"declarations": [],
|
|
120
120
|
"exports": []
|
|
121
121
|
},
|
|
122
|
+
{
|
|
123
|
+
"kind": "javascript-module",
|
|
124
|
+
"path": "dist/config/Fonts.js",
|
|
125
|
+
"declarations": [],
|
|
126
|
+
"exports": []
|
|
127
|
+
},
|
|
122
128
|
{
|
|
123
129
|
"kind": "javascript-module",
|
|
124
130
|
"path": "dist/config/FormatSettings.js",
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
const VersionInfo = {
|
|
2
|
-
version: "2.1.0-rc.
|
|
2
|
+
version: "2.1.0-rc.2",
|
|
3
3
|
major: 2,
|
|
4
4
|
minor: 1,
|
|
5
5
|
patch: 0,
|
|
6
|
-
suffix: "-rc.
|
|
6
|
+
suffix: "-rc.2",
|
|
7
7
|
isNext: false,
|
|
8
|
-
buildTime:
|
|
8
|
+
buildTime: 1721894897,
|
|
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,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.1.0-rc.
|
|
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.1.0-rc.2\",\n\tmajor: 2,\n\tminor: 1,\n\tpatch: 0,\n\tsuffix: \"-rc.2\",\n\tisNext: false,\n\tbuildTime: 1721894897,\n};\nexport default VersionInfo;"]}
|
package/dist/prod/FontFace.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";import{hasStyle as
|
|
1
|
+
"use strict";import{hasStyle as e,createStyle as o}from"./ManagedStyles.js";import{getFeature as r}from"./FeaturesRegistry.js";import a from"./generated/css/FontFace.css.js";import n from"./generated/css/OverrideFontFace.css.js";import{getDefaultFontLoading as f}from"./config/Fonts.js";const i=()=>{const t=r("OpenUI5Support");(!t||!t.isOpenUI5Detected())&&p(),c()},p=()=>{const t=document.querySelector("head>style[data-ui5-font-face]");!f()||t||e("data-ui5-font-face")||o(a,"data-ui5-font-face")},c=()=>{e("data-ui5-font-face-override")||o(n,"data-ui5-font-face-override")};export default i;
|
|
2
2
|
//# sourceMappingURL=FontFace.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/FontFace.ts"],
|
|
4
|
-
"sourcesContent": ["import { hasStyle, createStyle } from \"./ManagedStyles.js\";\nimport { getFeature } from \"./FeaturesRegistry.js\";\nimport fontFaceCSS from \"./generated/css/FontFace.css.js\";\nimport overrideFontFaceCSS from \"./generated/css/OverrideFontFace.css.js\";\nimport type OpenUI5Support from \"./features/OpenUI5Support.js\";\n\nconst insertFontFace = () => {\n\tconst openUI5Support = getFeature<typeof OpenUI5Support>(\"OpenUI5Support\");\n\n\t// Only set the main font if there is no OpenUI5 support, or there is, but OpenUI5 is not loaded\n\tif (!openUI5Support || !openUI5Support.isOpenUI5Detected()) {\n\t\tinsertMainFontFace();\n\t}\n\n\t// Always set the override font - OpenUI5 in CSS Vars mode does not set it, unlike the main font\n\tinsertOverrideFontFace();\n};\n\nconst insertMainFontFace = () => {\n\tif (!hasStyle(\"data-ui5-font-face\")) {\n\t\tcreateStyle(fontFaceCSS, \"data-ui5-font-face\");\n\t}\n};\n\nconst insertOverrideFontFace = () => {\n\tif (!hasStyle(\"data-ui5-font-face-override\")) {\n\t\tcreateStyle(overrideFontFaceCSS, \"data-ui5-font-face-override\");\n\t}\n};\n\nexport default insertFontFace;\n"],
|
|
5
|
-
"mappings": "aAAA,OAAS,YAAAA,EAAU,eAAAC,MAAmB,qBACtC,OAAS,cAAAC,MAAkB,wBAC3B,OAAOC,MAAiB,kCACxB,OAAOC,MAAyB,
|
|
6
|
-
"names": ["hasStyle", "createStyle", "getFeature", "fontFaceCSS", "overrideFontFaceCSS", "insertFontFace", "openUI5Support", "insertMainFontFace", "insertOverrideFontFace"]
|
|
4
|
+
"sourcesContent": ["import { hasStyle, createStyle } from \"./ManagedStyles.js\";\nimport { getFeature } from \"./FeaturesRegistry.js\";\nimport fontFaceCSS from \"./generated/css/FontFace.css.js\";\nimport overrideFontFaceCSS from \"./generated/css/OverrideFontFace.css.js\";\nimport type OpenUI5Support from \"./features/OpenUI5Support.js\";\nimport { getDefaultFontLoading } from \"./config/Fonts.js\";\n\nconst insertFontFace = () => {\n\tconst openUI5Support = getFeature<typeof OpenUI5Support>(\"OpenUI5Support\");\n\n\t// Only set the main font if there is no OpenUI5 support, or there is, but OpenUI5 is not loaded\n\tif ((!openUI5Support || !openUI5Support.isOpenUI5Detected())) {\n\t\tinsertMainFontFace();\n\t}\n\n\t// Always set the override font - OpenUI5 in CSS Vars mode does not set it, unlike the main font\n\tinsertOverrideFontFace();\n};\n\nconst insertMainFontFace = () => {\n\tconst hasFontStyles = document.querySelector(\"head>style[data-ui5-font-face]\");\n\n\tif (!getDefaultFontLoading() || hasFontStyles) {\n\t\treturn;\n\t}\n\n\tif (!hasStyle(\"data-ui5-font-face\")) {\n\t\tcreateStyle(fontFaceCSS, \"data-ui5-font-face\");\n\t}\n};\n\nconst insertOverrideFontFace = () => {\n\tif (!hasStyle(\"data-ui5-font-face-override\")) {\n\t\tcreateStyle(overrideFontFaceCSS, \"data-ui5-font-face-override\");\n\t}\n};\n\nexport default insertFontFace;\n"],
|
|
5
|
+
"mappings": "aAAA,OAAS,YAAAA,EAAU,eAAAC,MAAmB,qBACtC,OAAS,cAAAC,MAAkB,wBAC3B,OAAOC,MAAiB,kCACxB,OAAOC,MAAyB,0CAEhC,OAAS,yBAAAC,MAA6B,oBAEtC,MAAMC,EAAiB,IAAM,CAC5B,MAAMC,EAAiBL,EAAkC,gBAAgB,GAGpE,CAACK,GAAkB,CAACA,EAAe,kBAAkB,IACzDC,EAAmB,EAIpBC,EAAuB,CACxB,EAEMD,EAAqB,IAAM,CAChC,MAAME,EAAgB,SAAS,cAAc,gCAAgC,EAEzE,CAACL,EAAsB,GAAKK,GAI3BV,EAAS,oBAAoB,GACjCC,EAAYE,EAAa,oBAAoB,CAE/C,EAEMM,EAAyB,IAAM,CAC/BT,EAAS,6BAA6B,GAC1CC,EAAYG,EAAqB,6BAA6B,CAEhE,EAEA,eAAeE",
|
|
6
|
+
"names": ["hasStyle", "createStyle", "getFeature", "fontFaceCSS", "overrideFontFaceCSS", "getDefaultFontLoading", "insertFontFace", "openUI5Support", "insertMainFontFace", "insertOverrideFontFace", "hasFontStyles"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";import
|
|
1
|
+
"use strict";import f from"./thirdparty/merge.js";import{getFeature as u}from"./FeaturesRegistry.js";import{DEFAULT_THEME as c}from"./generated/AssetParameters.js";import d from"./validateThemeRoot.js";import m from"./types/AnimationMode.js";let p=!1,t={animationMode:m.Full,theme:c,themeRoot:void 0,rtl:void 0,language:void 0,timezone:void 0,calendarType:void 0,secondaryCalendarType:void 0,noConflict:!1,formatSettings:{},fetchDefaultLanguage:!1,defaultFontLoading:!0};const l=()=>(o(),t.animationMode),h=()=>(o(),t.theme),y=()=>(o(),t.themeRoot),C=()=>(o(),t.language),S=()=>(o(),t.fetchDefaultLanguage),T=()=>(o(),t.noConflict),L=()=>(o(),t.defaultFontLoading),F=()=>(o(),t.calendarType),U=()=>(o(),t.secondaryCalendarType),I=()=>(o(),t.timezone),O=()=>(o(),t.formatSettings),i=new Map;i.set("true",!0),i.set("false",!1);const R=()=>{const n=document.querySelector("[data-ui5-config]")||document.querySelector("[data-id='sap-ui-config']");let e;if(n){try{e=JSON.parse(n.innerHTML)}catch{console.warn("Incorrect data-sap-ui-config format. Please use JSON")}e&&(t=f(t,e))}},M=()=>{const n=new URLSearchParams(window.location.search);n.forEach((e,r)=>{const a=r.split("sap-").length;a===0||a===r.split("sap-ui-").length||g(r,e,"sap")}),n.forEach((e,r)=>{r.startsWith("sap-ui")&&g(r,e,"sap-ui")})},w=n=>{const e=n.split("@")[1];return d(e)},z=(n,e)=>n==="theme"&&e.includes("@")?e.split("@")[0]:e,g=(n,e,r)=>{const a=e.toLowerCase(),s=n.split(`${r}-`)[1];i.has(e)&&(e=i.get(a)),s==="theme"?(t.theme=z(s,e),e&&e.includes("@")&&(t.themeRoot=w(e))):t[s]=e},D=()=>{const n=u("OpenUI5Support");if(!n||!n.isOpenUI5Detected())return;const e=n.getConfigurationSettingsObject();t=f(t,e)},o=()=>{typeof document>"u"||p||(R(),M(),D(),p=!0)};export{l as getAnimationMode,h as getTheme,y as getThemeRoot,C as getLanguage,S as getFetchDefaultLanguage,T as getNoConflict,F as getCalendarType,U as getSecondaryCalendarType,I as getTimezone,O as getFormatSettings,L as getDefaultFontLoading};
|
|
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};\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};\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\n/**\n * Get the configured calendar type\n * @returns { String } the name of the configured calendar type\n */\nconst getCalendarType = () => {\n\tinitConfiguration();\n\treturn initialConfig.calendarType;\n};\n\nconst getSecondaryCalendarType = () => {\n\tinitConfiguration();\n\treturn initialConfig.secondaryCalendarType;\n};\n\n/**\n * Returns the configured IANA timezone ID.\n * @returns { String } the configured IANA timezone ID, e.g. \"America/New_York\"\n */\nconst getTimezone = () => {\n\tinitConfiguration();\n\treturn initialConfig.timezone;\n};\n\nconst getFormatSettings = () => {\n\tinitConfiguration();\n\treturn initialConfig.formatSettings;\n};\n\nconst booleanMapping = new Map();\nbooleanMapping.set(\"true\", true);\nbooleanMapping.set(\"false\", false);\n\nconst parseConfigurationScript = () => {\n\tconst configScript = document.querySelector(\"[data-ui5-config]\") || document.querySelector(\"[data-id='sap-ui-config']\"); // for backward compatibility\n\n\tlet configJSON;\n\n\tif (configScript) {\n\t\ttry {\n\t\t\tconfigJSON = JSON.parse(configScript.innerHTML);\n\t\t} catch (err) {\n\t\t\tconsole.warn(\"Incorrect data-sap-ui-config format. Please use JSON\"); /* eslint-disable-line */\n\t\t}\n\n\t\tif (configJSON) {\n\t\t\tinitialConfig = merge(initialConfig, configJSON);\n\t\t}\n\t}\n};\n\nconst parseURLParameters = () => {\n\tconst params = new URLSearchParams(window.location.search);\n\n\t// Process \"sap-*\" params first\n\tparams.forEach((value, key) => {\n\t\tconst parts = key.split(\"sap-\").length;\n\t\tif (parts === 0 || parts === key.split(\"sap-ui-\").length) {\n\t\t\treturn;\n\t\t}\n\n\t\tapplyURLParam(key, value, \"sap\");\n\t});\n\n\t// Process \"sap-ui-*\" params\n\tparams.forEach((value, key) => {\n\t\tif (!key.startsWith(\"sap-ui\")) {\n\t\t\treturn;\n\t\t}\n\n\t\tapplyURLParam(key, value, \"sap-ui\");\n\t});\n};\n\nconst normalizeThemeRootParamValue = (value: string) => {\n\tconst themeRoot = value.split(\"@\")[1];\n\n\treturn validateThemeRoot(themeRoot);\n};\n\nconst normalizeThemeParamValue = (param: string, value: string) => {\n\tif (param === \"theme\" && value.includes(\"@\")) { // the theme parameter might have @<URL-TO-THEME> in the value - strip this\n\t\treturn value.split(\"@\")[0];\n\t}\n\n\treturn value;\n};\n\nconst applyURLParam = (key: string, value: string, paramType: string) => {\n\tconst lowerCaseValue = value.toLowerCase();\n\tconst param = key.split(`${paramType}-`)[1];\n\n\tif (booleanMapping.has(value)) {\n\t\tvalue = booleanMapping.get(lowerCaseValue);\n\t}\n\n\tif (param === \"theme\") {\n\t\tinitialConfig.theme = normalizeThemeParamValue(param, value);\n\n\t\tif (value && value.includes(\"@\")) {\n\t\t\tinitialConfig.themeRoot = normalizeThemeRootParamValue(value);\n\t\t}\n\t} else {\n\t\tinitialConfig[param] = value;\n\t}\n};\n\nconst applyOpenUI5Configuration = () => {\n\tconst openUI5Support = getFeature<typeof OpenUI5Support>(\"OpenUI5Support\");\n\tif (!openUI5Support || !openUI5Support.isOpenUI5Detected()) {\n\t\treturn;\n\t}\n\n\tconst OpenUI5Config = openUI5Support.getConfigurationSettingsObject();\n\tinitialConfig = merge(initialConfig, OpenUI5Config);\n};\n\nconst initConfiguration = () => {\n\tif (typeof document === \"undefined\" || initialized) {\n\t\treturn;\n\t}\n\n\t// 1. Lowest priority - configuration script\n\tparseConfigurationScript();\n\n\t// 2. URL parameters overwrite configuration script parameters\n\tparseURLParameters();\n\n\t// 3. If OpenUI5 is detected, it has the highest priority\n\tapplyOpenUI5Configuration();\n\n\tinitialized = true;\n};\n\nexport {\n\tgetAnimationMode,\n\tgetTheme,\n\tgetThemeRoot,\n\tgetLanguage,\n\tgetFetchDefaultLanguage,\n\tgetNoConflict,\n\tgetCalendarType,\n\tgetSecondaryCalendarType,\n\tgetTimezone,\n\tgetFormatSettings,\n};\n"],
|
|
5
|
-
"mappings": "aAAA,OAAOA,MAAW,wBAClB,OAAS,cAAAC,MAAkB,wBAC3B,OAAS,iBAAAC,MAAqB,iCAC9B,OAAOC,MAAuB,yBAG9B,OAAOC,MAAmB,2BAG1B,IAAIC,EAAc,
|
|
6
|
-
"names": ["merge", "getFeature", "DEFAULT_THEME", "validateThemeRoot", "AnimationMode", "initialized", "initialConfig", "getAnimationMode", "initConfiguration", "getTheme", "getThemeRoot", "getLanguage", "getFetchDefaultLanguage", "getNoConflict", "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\";\n\nlet initialized = false;\n\ntype InitialConfig = {\n\t[key: string]: any,\n\tanimationMode: AnimationMode,\n\ttheme: string,\n\tthemeRoot: string | undefined,\n\tlanguage: string | undefined,\n\tcalendarType: CalendarType | undefined,\n\tsecondaryCalendarType: CalendarType | undefined,\n\ttimezone: string | undefined,\n\tnoConflict: boolean,\n\tformatSettings: FormatSettings,\n\tfetchDefaultLanguage: boolean,\n\tdefaultFontLoading: boolean,\n};\n\nlet initialConfig: InitialConfig = {\n\tanimationMode: AnimationMode.Full,\n\ttheme: DEFAULT_THEME,\n\tthemeRoot: undefined,\n\trtl: undefined,\n\tlanguage: undefined,\n\ttimezone: undefined,\n\tcalendarType: undefined,\n\tsecondaryCalendarType: undefined,\n\tnoConflict: false, // no URL\n\tformatSettings: {},\n\tfetchDefaultLanguage: false,\n\tdefaultFontLoading: true,\n};\n\n/* General settings */\nconst getAnimationMode = () => {\n\tinitConfiguration();\n\treturn initialConfig.animationMode;\n};\n\nconst getTheme = () => {\n\tinitConfiguration();\n\treturn initialConfig.theme;\n};\n\nconst getThemeRoot = () => {\n\tinitConfiguration();\n\treturn initialConfig.themeRoot;\n};\n\nconst getLanguage = () => {\n\tinitConfiguration();\n\treturn initialConfig.language;\n};\n\n/**\n * Returns if the default language, that is inlined at build time,\n * should be fetched over the network instead.\n * @returns {Boolean}\n */\nconst getFetchDefaultLanguage = () => {\n\tinitConfiguration();\n\treturn initialConfig.fetchDefaultLanguage;\n};\n\nconst getNoConflict = () => {\n\tinitConfiguration();\n\treturn initialConfig.noConflict;\n};\n\nconst getDefaultFontLoading = () => {\n\tinitConfiguration();\n\treturn initialConfig.defaultFontLoading;\n};\n\n/**\n * Get the configured calendar type\n * @returns { String } the name of the configured calendar type\n */\nconst getCalendarType = () => {\n\tinitConfiguration();\n\treturn initialConfig.calendarType;\n};\n\nconst getSecondaryCalendarType = () => {\n\tinitConfiguration();\n\treturn initialConfig.secondaryCalendarType;\n};\n\n/**\n * Returns the configured IANA timezone ID.\n * @returns { String } the configured IANA timezone ID, e.g. \"America/New_York\"\n */\nconst getTimezone = () => {\n\tinitConfiguration();\n\treturn initialConfig.timezone;\n};\n\nconst getFormatSettings = () => {\n\tinitConfiguration();\n\treturn initialConfig.formatSettings;\n};\n\nconst booleanMapping = new Map();\nbooleanMapping.set(\"true\", true);\nbooleanMapping.set(\"false\", false);\n\nconst parseConfigurationScript = () => {\n\tconst configScript = document.querySelector(\"[data-ui5-config]\") || document.querySelector(\"[data-id='sap-ui-config']\"); // for backward compatibility\n\n\tlet configJSON;\n\n\tif (configScript) {\n\t\ttry {\n\t\t\tconfigJSON = JSON.parse(configScript.innerHTML);\n\t\t} catch (err) {\n\t\t\tconsole.warn(\"Incorrect data-sap-ui-config format. Please use JSON\"); /* eslint-disable-line */\n\t\t}\n\n\t\tif (configJSON) {\n\t\t\tinitialConfig = merge(initialConfig, configJSON);\n\t\t}\n\t}\n};\n\nconst parseURLParameters = () => {\n\tconst params = new URLSearchParams(window.location.search);\n\n\t// Process \"sap-*\" params first\n\tparams.forEach((value, key) => {\n\t\tconst parts = key.split(\"sap-\").length;\n\t\tif (parts === 0 || parts === key.split(\"sap-ui-\").length) {\n\t\t\treturn;\n\t\t}\n\n\t\tapplyURLParam(key, value, \"sap\");\n\t});\n\n\t// Process \"sap-ui-*\" params\n\tparams.forEach((value, key) => {\n\t\tif (!key.startsWith(\"sap-ui\")) {\n\t\t\treturn;\n\t\t}\n\n\t\tapplyURLParam(key, value, \"sap-ui\");\n\t});\n};\n\nconst normalizeThemeRootParamValue = (value: string) => {\n\tconst themeRoot = value.split(\"@\")[1];\n\n\treturn validateThemeRoot(themeRoot);\n};\n\nconst normalizeThemeParamValue = (param: string, value: string) => {\n\tif (param === \"theme\" && value.includes(\"@\")) { // the theme parameter might have @<URL-TO-THEME> in the value - strip this\n\t\treturn value.split(\"@\")[0];\n\t}\n\n\treturn value;\n};\n\nconst applyURLParam = (key: string, value: string, paramType: string) => {\n\tconst lowerCaseValue = value.toLowerCase();\n\tconst param = key.split(`${paramType}-`)[1];\n\n\tif (booleanMapping.has(value)) {\n\t\tvalue = booleanMapping.get(lowerCaseValue);\n\t}\n\n\tif (param === \"theme\") {\n\t\tinitialConfig.theme = normalizeThemeParamValue(param, value);\n\n\t\tif (value && value.includes(\"@\")) {\n\t\t\tinitialConfig.themeRoot = normalizeThemeRootParamValue(value);\n\t\t}\n\t} else {\n\t\tinitialConfig[param] = value;\n\t}\n};\n\nconst applyOpenUI5Configuration = () => {\n\tconst openUI5Support = getFeature<typeof OpenUI5Support>(\"OpenUI5Support\");\n\tif (!openUI5Support || !openUI5Support.isOpenUI5Detected()) {\n\t\treturn;\n\t}\n\n\tconst OpenUI5Config = openUI5Support.getConfigurationSettingsObject();\n\tinitialConfig = merge(initialConfig, OpenUI5Config);\n};\n\nconst initConfiguration = () => {\n\tif (typeof document === \"undefined\" || initialized) {\n\t\treturn;\n\t}\n\n\t// 1. Lowest priority - configuration script\n\tparseConfigurationScript();\n\n\t// 2. URL parameters overwrite configuration script parameters\n\tparseURLParameters();\n\n\t// 3. If OpenUI5 is detected, it has the highest priority\n\tapplyOpenUI5Configuration();\n\n\tinitialized = true;\n};\n\nexport {\n\tgetAnimationMode,\n\tgetTheme,\n\tgetThemeRoot,\n\tgetLanguage,\n\tgetFetchDefaultLanguage,\n\tgetNoConflict,\n\tgetCalendarType,\n\tgetSecondaryCalendarType,\n\tgetTimezone,\n\tgetFormatSettings,\n\tgetDefaultFontLoading,\n};\n"],
|
|
5
|
+
"mappings": "aAAA,OAAOA,MAAW,wBAClB,OAAS,cAAAC,MAAkB,wBAC3B,OAAS,iBAAAC,MAAqB,iCAC9B,OAAOC,MAAuB,yBAG9B,OAAOC,MAAmB,2BAG1B,IAAIC,EAAc,GAiBdC,EAA+B,CAClC,cAAeF,EAAc,KAC7B,MAAOF,EACP,UAAW,OACX,IAAK,OACL,SAAU,OACV,SAAU,OACV,aAAc,OACd,sBAAuB,OACvB,WAAY,GACZ,eAAgB,CAAC,EACjB,qBAAsB,GACtB,mBAAoB,EACrB,EAGA,MAAMK,EAAmB,KACxBC,EAAkB,EACXF,EAAc,eAGhBG,EAAW,KAChBD,EAAkB,EACXF,EAAc,OAGhBI,EAAe,KACpBF,EAAkB,EACXF,EAAc,WAGhBK,EAAc,KACnBH,EAAkB,EACXF,EAAc,UAQhBM,EAA0B,KAC/BJ,EAAkB,EACXF,EAAc,sBAGhBO,EAAgB,KACrBL,EAAkB,EACXF,EAAc,YAGhBQ,EAAwB,KAC7BN,EAAkB,EACXF,EAAc,oBAOhBS,EAAkB,KACvBP,EAAkB,EACXF,EAAc,cAGhBU,EAA2B,KAChCR,EAAkB,EACXF,EAAc,uBAOhBW,EAAc,KACnBT,EAAkB,EACXF,EAAc,UAGhBY,EAAoB,KACzBV,EAAkB,EACXF,EAAc,gBAGhBa,EAAiB,IAAI,IAC3BA,EAAe,IAAI,OAAQ,EAAI,EAC/BA,EAAe,IAAI,QAA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c0B,CAAK,EAAIP,CAEzB,EAEMU,EAA4B,IAAM,CACvC,MAAMC,EAAiBnC,EAAkC,gBAAgB,EACzE,GAAI,CAACmC,GAAkB,CAACA,EAAe,kBAAkB,EACxD,OAGD,MAAMC,EAAgBD,EAAe,+BAA+B,EACpE9B,EAAgBN,EAAMM,EAAe+B,CAAa,CACnD,EAEM7B,EAAoB,IAAM,CAC3B,OAAO,SAAa,KAAeH,IAKvCe,EAAyB,EAGzBG,EAAmB,EAGnBY,EAA0B,EAE1B9B,EAAc,GACf,EAEA,OACCE,KAAA,iBACAE,KAAA,SACAC,KAAA,aACAC,KAAA,YACAC,KAAA,wBACAC,KAAA,cACAE,KAAA,gBACAC,KAAA,yBACAC,KAAA,YACAC,KAAA,kBACAJ,KAAA",
|
|
6
|
+
"names": ["merge", "getFeature", "DEFAULT_THEME", "validateThemeRoot", "AnimationMode", "initialized", "initialConfig", "getAnimationMode", "initConfiguration", "getTheme", "getThemeRoot", "getLanguage", "getFetchDefaultLanguage", "getNoConflict", "getDefaultFontLoading", "getCalendarType", "getSecondaryCalendarType", "getTimezone", "getFormatSettings", "booleanMapping", "parseConfigurationScript", "configScript", "configJSON", "parseURLParameters", "params", "value", "key", "parts", "applyURLParam", "normalizeThemeRootParamValue", "themeRoot", "normalizeThemeParamValue", "param", "paramType", "lowerCaseValue", "applyOpenUI5Configuration", "openUI5Support", "OpenUI5Config"]
|
|
7
7
|
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/config/Fonts.ts"],
|
|
4
|
+
"sourcesContent": ["import { getDefaultFontLoading as getConfiguredDefaultFontLoading } from \"../InitialConfiguration.js\";\n\nlet defaultFontLoading: boolean;\n\n/**\n * Returns if the \"defaultFontLoading\" configuration is set.\n * @public\n * @returns { boolean }\n */\nconst getDefaultFontLoading = (): boolean => {\n\tif (defaultFontLoading === undefined) {\n\t\tdefaultFontLoading = getConfiguredDefaultFontLoading();\n\t}\n\n\treturn defaultFontLoading;\n};\n\n/**\n * Defines the \"defaultFontLoading\" setting.\n *\n * - When set to \"true\" (default), all used font faces are fetched over the network.\n * - When set to \"false\", default font faces are not fetched automatically and must be managed separately.\n * @public\n * @param { boolean } defaultFontLoadingData\n */\nconst setDefaultFontLoading = (defaultFontLoadingData: boolean) => {\n\tdefaultFontLoading = defaultFontLoadingData;\n};\n\nexport {\n\tgetDefaultFontLoading,\n\tsetDefaultFontLoading,\n};\n"],
|
|
5
|
+
"mappings": "aAAA,OAAS,yBAAyBA,MAAuC,6BAEzE,IAAIC,EAOJ,MAAMC,EAAwB,KACzBD,IAAuB,SAC1BA,EAAqBD,EAAgC,GAG/CC,GAWFE,EAAyBC,GAAoC,CAClEH,EAAqBG,CACtB,EAEA,OACCF,KAAA,sBACAC,KAAA",
|
|
6
|
+
"names": ["getConfiguredDefaultFontLoading", "defaultFontLoading", "getDefaultFontLoading", "setDefaultFontLoading", "defaultFontLoadingData"]
|
|
7
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const e={version:"2.1.0-rc.
|
|
1
|
+
"use strict";const e={version:"2.1.0-rc.2",major:2,minor:1,patch:0,suffix:"-rc.2",isNext:!1,buildTime:1721894897};export default e;
|
|
2
2
|
//# sourceMappingURL=VersionInfo.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/generated/VersionInfo.ts"],
|
|
4
|
-
"sourcesContent": ["const VersionInfo = {\n\tversion: \"2.1.0-rc.
|
|
4
|
+
"sourcesContent": ["const VersionInfo = {\n\tversion: \"2.1.0-rc.2\",\n\tmajor: 2,\n\tminor: 1,\n\tpatch: 0,\n\tsuffix: \"-rc.2\",\n\tisNext: false,\n\tbuildTime: 1721894897,\n};\nexport default VersionInfo;"],
|
|
5
5
|
"mappings": "aAAA,MAAMA,EAAc,CACnB,QAAS,aACT,MAAO,EACP,MAAO,EACP,MAAO,EACP,OAAQ,QACR,OAAQ,GACR,UAAW,UACZ,EACA,eAAeA",
|
|
6
6
|
"names": ["VersionInfo"]
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ui5/webcomponents-base",
|
|
3
|
-
"version": "2.1.0-rc.
|
|
3
|
+
"version": "2.1.0-rc.2",
|
|
4
4
|
"description": "UI5 Web Components: webcomponents.base",
|
|
5
5
|
"author": "SAP SE (https://www.sap.com)",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@openui5/sap.ui.core": "1.120.17",
|
|
54
|
-
"@ui5/webcomponents-tools": "2.1.0-rc.
|
|
54
|
+
"@ui5/webcomponents-tools": "2.1.0-rc.2",
|
|
55
55
|
"chromedriver": "^125.0.0",
|
|
56
56
|
"clean-css": "^5.2.2",
|
|
57
57
|
"copy-and-watch": "^0.1.5",
|
|
@@ -62,5 +62,5 @@
|
|
|
62
62
|
"resolve": "^1.20.0",
|
|
63
63
|
"touch": "^3.1.0"
|
|
64
64
|
},
|
|
65
|
-
"gitHead": "
|
|
65
|
+
"gitHead": "fdefc6672a5a050030bdfff133222d714886272b"
|
|
66
66
|
}
|