@ui5/webcomponents-base 1.11.0-rc.2 → 1.11.0-rc.4
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 +23 -0
- package/bundle.esm.js +3 -1
- package/dist/UI5Element.d.ts +17 -7
- package/dist/UI5Element.js.map +1 -1
- package/dist/asset-registries/Illustrations.d.ts +1 -1
- package/dist/asset-registries/Themes.d.ts +1 -0
- package/dist/assets/bundle.esm.a2e827bf.js +60 -0
- package/dist/assets/test/pages/{i18n.html.cd6e3cfc.js → i18n.html.de9935e9.js} +1 -1
- package/dist/assets/test/pages/{i18n_texts.html.7beb72ee.js → i18n_texts.html.b70b7c6f.js} +1 -1
- package/dist/config/FormatSettings.d.ts +5 -1
- package/dist/config/FormatSettings.js +5 -1
- package/dist/config/FormatSettings.js.map +1 -1
- package/dist/config/Icons.d.ts +3 -2
- package/dist/config/Icons.js +9 -3
- package/dist/config/Icons.js.map +1 -1
- package/dist/decorators/customElement.d.ts +17 -2
- package/dist/decorators/customElement.js +17 -2
- package/dist/decorators/customElement.js.map +1 -1
- package/dist/features/LegacyDateFormats.d.ts +18 -0
- package/dist/features/LegacyDateFormats.js +20 -0
- package/dist/features/LegacyDateFormats.js.map +1 -0
- package/dist/features/OpenUI5Support.d.ts +2 -0
- package/dist/features/OpenUI5Support.js +1 -0
- package/dist/features/OpenUI5Support.js.map +1 -1
- package/dist/generated/VersionInfo.js +3 -3
- package/dist/renderer/LitRenderer.d.ts +3 -3
- package/dist/renderer/LitRenderer.js.map +1 -1
- package/dist/test/pages/AllTestElements.html +1 -1
- package/dist/test/pages/Configuration.html +1 -1
- package/dist/test/pages/ConfigurationScript.html +19 -2
- package/dist/test/pages/WithComplexTemplate.html +1 -1
- package/dist/test/pages/i18n.html +2 -2
- package/dist/test/pages/i18n_texts.html +2 -2
- package/dist/theming/getStylesString.d.ts +1 -1
- package/dist/updateShadowRoot.js +4 -0
- package/dist/updateShadowRoot.js.map +1 -1
- package/dist/util/getClassCopy.d.ts +7 -8
- package/package.json +3 -3
- package/src/UI5Element.ts +25 -6
- package/src/asset-registries/Illustrations.ts +1 -1
- package/src/asset-registries/Themes.ts +5 -0
- package/src/config/FormatSettings.ts +16 -2
- package/src/config/Icons.ts +12 -5
- package/src/decorators/customElement.ts +42 -2
- package/src/features/LegacyDateFormats.ts +40 -0
- package/src/features/OpenUI5Support.ts +5 -0
- package/src/renderer/LitRenderer.ts +2 -2
- package/src/theming/getEffectiveLinksHrefs.ts +1 -1
- package/src/theming/getStylesString.ts +1 -1
- package/src/updateShadowRoot.ts +5 -0
- package/dist/assets/bundle.esm.2d0cb31f.js +0 -56
|
@@ -1,15 +1,30 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Returns a custom element class decorator.
|
|
3
3
|
*
|
|
4
|
-
* @param { string }
|
|
4
|
+
* @param { string | object } tagNameOrComponentSettings
|
|
5
5
|
* @returns { ClassDecorator }
|
|
6
6
|
*/
|
|
7
|
-
const customElement = (
|
|
7
|
+
const customElement = (tagNameOrComponentSettings) => {
|
|
8
8
|
return (target) => {
|
|
9
9
|
if (!Object.prototype.hasOwnProperty.call(target, "decoratorMetadata")) {
|
|
10
10
|
target.decoratorMetadata = {};
|
|
11
11
|
}
|
|
12
|
+
if (typeof tagNameOrComponentSettings === "string") {
|
|
13
|
+
target.decoratorMetadata.tag = tagNameOrComponentSettings;
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
const { tag, languageAware = false, themeAware = false, fastNavigation = false, } = tagNameOrComponentSettings;
|
|
12
17
|
target.decoratorMetadata.tag = tag;
|
|
18
|
+
target.decoratorMetadata.languageAware = languageAware;
|
|
19
|
+
target.decoratorMetadata.themeAware = themeAware;
|
|
20
|
+
target.decoratorMetadata.fastNavigation = fastNavigation;
|
|
21
|
+
["render", "renderer", "template", "staticAreaTemplate", "styles", "staticAreaStyles", "dependencies"].forEach((customElementEntity) => {
|
|
22
|
+
const _customElementEntity = customElementEntity === "render" ? "renderer" : customElementEntity;
|
|
23
|
+
const customElementEntityValue = tagNameOrComponentSettings[_customElementEntity];
|
|
24
|
+
customElementEntityValue && Object.defineProperty(target, customElementEntity, {
|
|
25
|
+
get: () => customElementEntityValue,
|
|
26
|
+
});
|
|
27
|
+
});
|
|
13
28
|
};
|
|
14
29
|
};
|
|
15
30
|
export default customElement;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"customElement.js","sourceRoot":"","sources":["../../src/decorators/customElement.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"customElement.js","sourceRoot":"","sources":["../../src/decorators/customElement.ts"],"names":[],"mappings":"AAKA;;;;;GAKG;AACH,MAAM,aAAa,GAAG,CAAC,0BAWtB,EAAkB,EAAE;IACpB,OAAO,CAAC,MAAW,EAAE,EAAE;QACtB,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,EAAE,mBAAmB,CAAC,EAAE;YACvE,MAAM,CAAC,iBAAiB,GAAG,EAAE,CAAC;SAC9B;QAED,IAAI,OAAO,0BAA0B,KAAK,QAAQ,EAAE;YACnD,MAAM,CAAC,iBAAiB,CAAC,GAAG,GAAG,0BAA0B,CAAC;YAC1D,OAAO;SACP;QAED,MAAM,EACL,GAAG,EACH,aAAa,GAAG,KAAK,EACrB,UAAU,GAAG,KAAK,EAClB,cAAc,GAAG,KAAK,GACrB,GAAG,0BAA0B,CAAC;QAEhC,MAAM,CAAC,iBAAiB,CAAC,GAAG,GAAG,GAAG,CAAC;QACnC,MAAM,CAAC,iBAAiB,CAAC,aAAa,GAAG,aAAa,CAAC;QACvD,MAAM,CAAC,iBAAiB,CAAC,UAAU,GAAG,UAAU,CAAC;QACjD,MAAM,CAAC,iBAAiB,CAAC,cAAc,GAAG,cAAc,CAAC;QAEzD,CAAC,QAAQ,EAAE,UAAU,EAAE,UAAU,EAAE,oBAAoB,EAAE,QAAQ,EAAE,kBAAkB,EAAE,cAAc,CAAC,CAAC,OAAO,CAAC,CAAC,mBAA2B,EAAE,EAAE;YAC9I,MAAM,oBAAoB,GAAG,mBAAmB,KAAK,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,mBAAmB,CAAC;YACjG,MAAM,wBAAwB,GAAG,0BAA0B,CAAC,oBAAwC,CAAC,CAAC;YAEtG,wBAAwB,IAAI,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,mBAAmB,EAAE;gBAC9E,GAAG,EAAE,GAAG,EAAE,CAAC,wBAAwB;aACnC,CAAC,CAAC;QACJ,CAAC,CAAC,CAAC;IACJ,CAAC,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { FormatSettings } from "../config/FormatSettings.js";
|
|
2
|
+
type IslamicToGregorianMapping = {
|
|
3
|
+
dateFormat: string;
|
|
4
|
+
islamicMonthStart: string;
|
|
5
|
+
gregDate: string;
|
|
6
|
+
};
|
|
7
|
+
type LegacyDateCalendarCustomizing = Array<IslamicToGregorianMapping>;
|
|
8
|
+
declare class LegacyDateFormats {
|
|
9
|
+
/**
|
|
10
|
+
* Returns the currently set customizing data for Islamic calendar support
|
|
11
|
+
*
|
|
12
|
+
* @return {object[]} Returns an array that contains the customizing data.
|
|
13
|
+
* @public
|
|
14
|
+
*/
|
|
15
|
+
static getLegacyDateCalendarCustomizing(this: void): LegacyDateCalendarCustomizing;
|
|
16
|
+
}
|
|
17
|
+
export default LegacyDateFormats;
|
|
18
|
+
export type { FormatSettings, LegacyDateCalendarCustomizing, };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { getFormatSettings } from "../InitialConfiguration.js";
|
|
2
|
+
import { registerFeature } from "../FeaturesRegistry.js";
|
|
3
|
+
let formatSettings;
|
|
4
|
+
class LegacyDateFormats {
|
|
5
|
+
/**
|
|
6
|
+
* Returns the currently set customizing data for Islamic calendar support
|
|
7
|
+
*
|
|
8
|
+
* @return {object[]} Returns an array that contains the customizing data.
|
|
9
|
+
* @public
|
|
10
|
+
*/
|
|
11
|
+
static getLegacyDateCalendarCustomizing() {
|
|
12
|
+
if (formatSettings === undefined) {
|
|
13
|
+
formatSettings = getFormatSettings();
|
|
14
|
+
}
|
|
15
|
+
return formatSettings.legacyDateCalendarCustomizing || [];
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
registerFeature("LegacyDateFormats", LegacyDateFormats);
|
|
19
|
+
export default LegacyDateFormats;
|
|
20
|
+
//# sourceMappingURL=LegacyDateFormats.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LegacyDateFormats.js","sourceRoot":"","sources":["../../src/features/LegacyDateFormats.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAE/D,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAazD,IAAI,cAA8B,CAAC;AAEnC,MAAM,iBAAiB;IACtB;;;;;OAKG;IACH,MAAM,CAAC,gCAAgC;QACtC,IAAI,cAAc,KAAK,SAAS,EAAE;YACjC,cAAc,GAAG,iBAAiB,EAAE,CAAC;SACrC;QAED,OAAO,cAAc,CAAC,6BAA6B,IAAI,EAAE,CAAC;IAC3D,CAAC;CACD;AAED,eAAe,CAAC,mBAAmB,EAAE,iBAAiB,CAAC,CAAC;AAExD,eAAe,iBAAiB,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { CLDRData } from "../asset-registries/LocaleData.js";
|
|
2
|
+
import type { LegacyDateCalendarCustomizing } from "../features/LegacyDateFormats.js";
|
|
2
3
|
declare class OpenUI5Support {
|
|
3
4
|
static isLoaded(): boolean;
|
|
4
5
|
static init(): Promise<void>;
|
|
@@ -11,6 +12,7 @@ declare class OpenUI5Support {
|
|
|
11
12
|
calendarType: string;
|
|
12
13
|
formatSettings: {
|
|
13
14
|
firstDayOfWeek: any;
|
|
15
|
+
legacyDateCalendarCustomizing: LegacyDateCalendarCustomizing;
|
|
14
16
|
};
|
|
15
17
|
} | undefined;
|
|
16
18
|
static getLocaleDataObject(): CLDRData | undefined;
|
|
@@ -38,6 +38,7 @@ class OpenUI5Support {
|
|
|
38
38
|
calendarType: config.getCalendarType(),
|
|
39
39
|
formatSettings: {
|
|
40
40
|
firstDayOfWeek: LocaleData ? LocaleData.getInstance(config.getLocale()).getFirstDayOfWeek() : undefined,
|
|
41
|
+
legacyDateCalendarCustomizing: config.getFormatSettings().getLegacyDateCalendarCustomizing(),
|
|
41
42
|
},
|
|
42
43
|
};
|
|
43
44
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OpenUI5Support.js","sourceRoot":"","sources":["../../src/features/OpenUI5Support.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"OpenUI5Support.js","sourceRoot":"","sources":["../../src/features/OpenUI5Support.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAqCzD,MAAM,OAAO,GAAG,GAAG,EAAE;IACpB,OAAO,MAAM,CAAC,GAAG,EAAE,EAAE,EAAE,OAAO,EAAE,EAAiB,CAAC;AACnD,CAAC,CAAC;AAEF,MAAM,cAAc;IACnB,MAAM,CAAC,QAAQ;QACd,OAAO,CAAC,CAAC,OAAO,EAAE,CAAC;IACpB,CAAC;IAED,MAAM,CAAC,IAAI;QACV,MAAM,IAAI,GAAG,OAAO,EAAE,CAAC;QACvB,IAAI,CAAC,IAAI,EAAE;YACV,OAAO,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Aa;QACnB,MAAM,IAAI,GAAG,OAAO,EAAE,CAAC;QACvB,IAAI,CAAC,IAAI,EAAE;YACV,OAAO;SACP;QAED,MAAM,KAAK,GAAG,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,OAAO,CAAC,mBAAmB,CAAiB,CAAC;QACzE,OAAO,KAAK,CAAC,aAAa,EAAE,CAAC;IAC9B,CAAC;IAED,MAAM,CAAC,gBAAgB;QACtB,MAAM,IAAI,GAAG,OAAO,EAAE,CAAC;QACvB,IAAI,CAAC,IAAI,EAAE;YACV,OAAO;SACP;QAED,MAAM,KAAK,GAAG,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,OAAO,CAAC,mBAAmB,CAAiB,CAAC;QACzE,KAAK,CAAC,gBAAgB,CAAC,gBAAgB,EAAE,CAAC,CAAC;IAC5C,CAAC;CACD;AAED,eAAe,CAAC,gBAAgB,EAAE,cAAc,CAAC,CAAC;AAElD,eAAe,cAAc,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { TemplateResult
|
|
2
|
-
import {
|
|
1
|
+
import { TemplateResult } from "lit-html";
|
|
2
|
+
import type { Renderer } from "../UI5Element.js";
|
|
3
3
|
declare const effectiveHtml: (strings: TemplateStringsArray, ...values: Array<unknown>) => TemplateResult<1 | 2>;
|
|
4
4
|
declare const effectiveSvg: (strings: TemplateStringsArray, ...values: Array<unknown>) => TemplateResult<1 | 2>;
|
|
5
|
-
declare const litRender:
|
|
5
|
+
declare const litRender: Renderer;
|
|
6
6
|
declare const scopeTag: (tag: string, tags: Array<string>, suffix: string) => object | undefined;
|
|
7
7
|
export { effectiveHtml as html, effectiveSvg as svg, };
|
|
8
8
|
export { scopeTag };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LitRenderer.js","sourceRoot":"","sources":["../../src/renderer/LitRenderer.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,MAAM,EACN,IAAI,EACJ,GAAG,
|
|
1
|
+
{"version":3,"file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Week": 0,
|
|
16
|
+
"legacyDateCalendarCustomizing": [
|
|
17
|
+
{
|
|
18
|
+
"dateFormat": "A",
|
|
19
|
+
"islamicMonthStart": "14351201",
|
|
20
|
+
"gregDate": "20140925"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"dateFormat": "A",
|
|
24
|
+
"islamicMonthStart": "14360101",
|
|
25
|
+
"gregDate": "20141024"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"dateFormat": "A",
|
|
29
|
+
"islamicMonthStart": "14360201",
|
|
30
|
+
"gregDate": "20141123"
|
|
31
|
+
}
|
|
32
|
+
]
|
|
16
33
|
},
|
|
17
34
|
"theme": "sap_belize_hcb",
|
|
18
35
|
"noConflict": {
|
|
@@ -23,7 +40,7 @@
|
|
|
23
40
|
|
|
24
41
|
|
|
25
42
|
|
|
26
|
-
<script type="module" crossorigin src="/assets/bundle.esm.
|
|
43
|
+
<script type="module" crossorigin src="/assets/bundle.esm.a2e827bf.js"></script>
|
|
27
44
|
</head>
|
|
28
45
|
|
|
29
46
|
<body>
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
<script type="module" crossorigin src="/assets/test/pages/i18n.html.
|
|
11
|
-
<link rel="modulepreload" href="/assets/bundle.esm.
|
|
10
|
+
<script type="module" crossorigin src="/assets/test/pages/i18n.html.de9935e9.js"></script>
|
|
11
|
+
<link rel="modulepreload" crossorigin href="/assets/bundle.esm.a2e827bf.js">
|
|
12
12
|
</head>
|
|
13
13
|
|
|
14
14
|
<body>
|
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
<script type="module" crossorigin src="/assets/test/pages/i18n_texts.html.
|
|
12
|
-
<link rel="modulepreload" href="/assets/bundle.esm.
|
|
11
|
+
<script type="module" crossorigin src="/assets/test/pages/i18n_texts.html.b70b7c6f.js"></script>
|
|
12
|
+
<link rel="modulepreload" crossorigin href="/assets/bundle.esm.a2e827bf.js">
|
|
13
13
|
</head>
|
|
14
14
|
|
|
15
15
|
<body>
|
package/dist/updateShadowRoot.js
CHANGED
|
@@ -28,6 +28,10 @@ const updateShadowRoot = (element, forStaticArea = false) => {
|
|
|
28
28
|
else { // FF, Safari
|
|
29
29
|
styleStrOrHrefsArr = getEffectiveStyle(ctor, forStaticArea);
|
|
30
30
|
}
|
|
31
|
+
if (ctor.renderer) {
|
|
32
|
+
ctor.renderer(renderResult, shadowRoot, styleStrOrHrefsArr, forStaticArea, { host: element });
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
31
35
|
ctor.render(renderResult, shadowRoot, styleStrOrHrefsArr, forStaticArea, { host: element });
|
|
32
36
|
};
|
|
33
37
|
export default updateShadowRoot;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"updateShadowRoot.js","sourceRoot":"","sources":["../src/updateShadowRoot.ts"],"names":[],"mappings":"AAAA,OAAO,eAAe,MAAM,+BAA+B,CAAC;AAC5D,OAAO,qBAAqB,MAAM,oCAAoC,CAAC;AACvE,OAAO,iBAAiB,MAAM,gCAAgC,CAAC;AAC/D,OAAO,sBAAsB,MAAM,qCAAqC,CAAC;AACzE,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAG1C;;;;GAIG;AACH,MAAM,gBAAgB,GAAG,CAAC,OAAmB,EAAE,aAAa,GAAG,KAAK,EAAE,EAAE;IACvE,IAAI,kBAAkB,CAAC;IACvB,MAAM,IAAI,GAAG,OAAO,CAAC,WAAgC,CAAC;IACtD,MAAM,YAAY,GAAG,aAAa,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,UAAU,CAAC;IACvE,MAAM,QAAQ,GAAG,IAAI,CAAC,YAAY,CAAC,CAAC;IACpC,MAAM,UAAU,GAAG,aAAa,CAAC,CAAC,CAAC,OAAO,CAAC,cAAe,CAAC,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC;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AU,CAAC;IACvE,MAAM,QAAQ,GAAG,IAAI,CAAC,YAAY,CAAC,CAAC;IACpC,MAAM,UAAU,GAAG,aAAa,CAAC,CAAC,CAAC,OAAO,CAAC,cAAe,CAAC,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC;IAC3F,MAAM,YAAY,GAAG,eAAe,CAAC,QAAS,EAAE,OAAO,CAAC,CAAC,CAAC,kDAAkD;IAE5G,IAAI,CAAC,UAAU,EAAE;QAChB,OAAO,CAAC,IAAI,CAAC,mCAAmC,CAAC,CAAC,CAAC,sBAAsB;QACzE,OAAO;KACP;IAED,IAAI,cAAc,EAAE,EAAE;QACrB,kBAAkB,GAAG,sBAAsB,CAAC,IAAI,EAAE,aAAa,CAAC,CAAC;KACjE;SAAM,IAAI,QAAQ,CAAC,kBAAkB,EAAE,EAAE,SAAS;QAClD,UAAU,CAAC,kBAAkB,GAAG,qBAAqB,CAAC,IAAI,EAAE,aAAa,CAAC,CAAC;KAC3E;SAAM,EAAE,aAAa;QACrB,kBAAkB,GAAG,iBAAiB,CAAC,IAAI,EAAE,aAAa,CAAC,CAAC;KAC5D;IAED,IAAI,IAAI,CAAC,QAAQ,EAAE;QAClB,IAAI,CAAC,QAAQ,CAAC,YAAY,EAAE,UAAU,EAAE,kBAAkB,EAAE,aAAa,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC;QAC9F,OAAO;KACP;IAED,IAAI,CAAC,MAAM,CAAC,YAAY,EAAE,UAAU,EAAE,kBAAkB,EAAE,aAAa,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC;AAC7F,CAAC,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -63,7 +63,7 @@ declare const getClassCopy: (klass: typeof UI5Element, constructorCallback: () =
|
|
|
63
63
|
focus(focusOptions?: FocusOptions | undefined): Promise<void>;
|
|
64
64
|
fireEvent<T>(name: string, data?: T | undefined, cancelable?: boolean, bubbles?: boolean): boolean;
|
|
65
65
|
_fireEvent<T_1>(name: string, data?: T_1 | undefined, cancelable?: boolean, bubbles?: boolean): boolean;
|
|
66
|
-
getSlottedNodes(slotName: string):
|
|
66
|
+
getSlottedNodes<T_2 = Node>(slotName: string): T_2[];
|
|
67
67
|
readonly effectiveDir: string | undefined;
|
|
68
68
|
readonly isUI5Element: boolean;
|
|
69
69
|
readonly classes: import("../types.js").ClassMap;
|
|
@@ -174,21 +174,21 @@ declare const getClassCopy: (klass: typeof UI5Element, constructorCallback: () =
|
|
|
174
174
|
readonly parentNode: ParentNode | null;
|
|
175
175
|
readonly previousSibling: ChildNode | null;
|
|
176
176
|
textContent: string | null;
|
|
177
|
-
appendChild<
|
|
177
|
+
appendChild<T_3 extends Node>(node: T_3): T_3;
|
|
178
178
|
cloneNode(deep?: boolean | undefined): Node;
|
|
179
179
|
compareDocumentPosition(other: Node): number;
|
|
180
180
|
contains(other: Node | null): boolean;
|
|
181
181
|
getRootNode(options?: GetRootNodeOptions | undefined): Node;
|
|
182
182
|
hasChildNodes(): boolean;
|
|
183
|
-
insertBefore<
|
|
183
|
+
insertBefore<T_4 extends Node>(node: T_4, child: Node | null): T_4;
|
|
184
184
|
isDefaultNamespace(namespace: string | null): boolean;
|
|
185
185
|
isEqualNode(otherNode: Node | null): boolean;
|
|
186
186
|
isSameNode(otherNode: Node | null): boolean;
|
|
187
187
|
lookupNamespaceURI(prefix: string | null): string | null;
|
|
188
188
|
lookupPrefix(namespace: string | null): string | null;
|
|
189
189
|
normalize(): void;
|
|
190
|
-
removeChild<
|
|
191
|
-
replaceChild<
|
|
190
|
+
removeChild<T_5 extends Node>(child: T_5): T_5;
|
|
191
|
+
replaceChild<T_6 extends Node>(node: Node, child: T_6): T_6;
|
|
192
192
|
readonly ATTRIBUTE_NODE: number;
|
|
193
193
|
readonly CDATA_SECTION_NODE: number;
|
|
194
194
|
readonly COMMENT_NODE: number;
|
|
@@ -379,9 +379,8 @@ declare const getClassCopy: (klass: typeof UI5Element, constructorCallback: () =
|
|
|
379
379
|
template?: import("../renderer/executeTemplate.js").TemplateFunction | undefined;
|
|
380
380
|
staticAreaTemplate?: import("../renderer/executeTemplate.js").TemplateFunction | undefined;
|
|
381
381
|
_metadata: import("../UI5ElementMetadata.js").default;
|
|
382
|
-
render: (
|
|
383
|
-
|
|
384
|
-
}) => void;
|
|
382
|
+
render: import("../UI5Element.js").Renderer;
|
|
383
|
+
renderer?: import("../UI5Element.js").Renderer | undefined;
|
|
385
384
|
readonly observedAttributes: string[];
|
|
386
385
|
_needsShadowDOM(): boolean;
|
|
387
386
|
_needsStaticArea(): boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ui5/webcomponents-base",
|
|
3
|
-
"version": "1.11.0-rc.
|
|
3
|
+
"version": "1.11.0-rc.4",
|
|
4
4
|
"description": "UI5 Web Components: webcomponents.base",
|
|
5
5
|
"author": "SAP SE (https://www.sap.com)",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@buxlabs/amd-to-es6": "0.16.1",
|
|
38
38
|
"@openui5/sap.ui.core": "1.109.0",
|
|
39
|
-
"@ui5/webcomponents-tools": "1.11.0-rc.
|
|
39
|
+
"@ui5/webcomponents-tools": "1.11.0-rc.4",
|
|
40
40
|
"chromedriver": "109.0.0",
|
|
41
41
|
"clean-css": "^5.2.2",
|
|
42
42
|
"copy-and-watch": "^0.1.5",
|
|
@@ -46,5 +46,5 @@
|
|
|
46
46
|
"replace-in-file": "^6.3.5",
|
|
47
47
|
"resolve": "^1.20.0"
|
|
48
48
|
},
|
|
49
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "d50e50a31eeb4183f84f1eafd9aae1d0d1d1549f"
|
|
50
50
|
}
|
package/src/UI5Element.ts
CHANGED
|
@@ -23,14 +23,24 @@ import { getSlotName, getSlottedNodesList } from "./util/SlotsHelper.js";
|
|
|
23
23
|
import arraysAreEqual from "./util/arraysAreEqual.js";
|
|
24
24
|
import { markAsRtlAware } from "./locale/RTLAwareRegistry.js";
|
|
25
25
|
import preloadLinks from "./theming/preloadLinks.js";
|
|
26
|
-
import { TemplateFunction, TemplateFunctionResult } from "./renderer/executeTemplate.js";
|
|
27
|
-
import { PromiseResolve, ComponentStylesData, ClassMap } from "./types.js";
|
|
26
|
+
import type { TemplateFunction, TemplateFunctionResult } from "./renderer/executeTemplate.js";
|
|
27
|
+
import type { PromiseResolve, ComponentStylesData, ClassMap } from "./types.js";
|
|
28
28
|
|
|
29
29
|
let autoId = 0;
|
|
30
30
|
|
|
31
31
|
const elementTimeouts = new Map<string, Promise<void>>();
|
|
32
32
|
const uniqueDependenciesCache = new Map<typeof UI5Element, Array<typeof UI5Element>>();
|
|
33
33
|
|
|
34
|
+
type Renderer = (templateResult: TemplateFunctionResult, container: HTMLElement | DocumentFragment, styleStrOrHrefsArr: string | Array<string> | undefined, forStaticArea: boolean, options: RendererOptions) => void;
|
|
35
|
+
|
|
36
|
+
type RendererOptions = {
|
|
37
|
+
/**
|
|
38
|
+
* An object to use as the `this` value for event listeners. It's often
|
|
39
|
+
* useful to set this to the host component rendering a template.
|
|
40
|
+
*/
|
|
41
|
+
host?: object,
|
|
42
|
+
}
|
|
43
|
+
|
|
34
44
|
type ChangeInfo = {
|
|
35
45
|
type: "property" | "slot",
|
|
36
46
|
name: string,
|
|
@@ -99,7 +109,12 @@ abstract class UI5Element extends HTMLElement {
|
|
|
99
109
|
static template?: TemplateFunction;
|
|
100
110
|
static staticAreaTemplate?: TemplateFunction;
|
|
101
111
|
static _metadata: UI5ElementMetadata;
|
|
102
|
-
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* @deprecated
|
|
115
|
+
*/
|
|
116
|
+
static render: Renderer;
|
|
117
|
+
static renderer?: Renderer;
|
|
103
118
|
|
|
104
119
|
constructor() {
|
|
105
120
|
super();
|
|
@@ -831,8 +846,8 @@ abstract class UI5Element extends HTMLElement {
|
|
|
831
846
|
* Useful when there are transitive slots in nested component scenarios and you don't want to get a list of the slots, but rather of their content.
|
|
832
847
|
* @public
|
|
833
848
|
*/
|
|
834
|
-
getSlottedNodes(slotName: string) {
|
|
835
|
-
return getSlottedNodesList((this as unknown as Record<string, Array<SlotValue>>)[slotName])
|
|
849
|
+
getSlottedNodes<T = Node>(slotName: string) {
|
|
850
|
+
return getSlottedNodesList((this as unknown as Record<string, Array<SlotValue>>)[slotName]) as Array<T>;
|
|
836
851
|
}
|
|
837
852
|
|
|
838
853
|
/**
|
|
@@ -1153,4 +1168,8 @@ const instanceOfUI5Element = (object: any): object is UI5Element => {
|
|
|
1153
1168
|
|
|
1154
1169
|
export default UI5Element;
|
|
1155
1170
|
export { instanceOfUI5Element };
|
|
1156
|
-
export type {
|
|
1171
|
+
export type {
|
|
1172
|
+
ChangeInfo,
|
|
1173
|
+
Renderer,
|
|
1174
|
+
RendererOptions,
|
|
1175
|
+
};
|
|
@@ -1,6 +1,12 @@
|
|
|
1
|
+
import LegacyDateFormats from "../features/LegacyDateFormats.js";
|
|
2
|
+
import type { LegacyDateCalendarCustomizing } from "../features/LegacyDateFormats.js";
|
|
1
3
|
import { getFormatSettings } from "../InitialConfiguration.js";
|
|
4
|
+
import { getFeature } from "../FeaturesRegistry.js";
|
|
2
5
|
|
|
3
|
-
type FormatSettings = {
|
|
6
|
+
type FormatSettings = {
|
|
7
|
+
firstDayOfWeek?: number,
|
|
8
|
+
legacyDateCalendarCustomizing?: LegacyDateCalendarCustomizing,
|
|
9
|
+
};
|
|
4
10
|
|
|
5
11
|
let formatSettings: FormatSettings;
|
|
6
12
|
|
|
@@ -17,5 +23,13 @@ const getFirstDayOfWeek = (): number | undefined => {
|
|
|
17
23
|
return formatSettings.firstDayOfWeek;
|
|
18
24
|
};
|
|
19
25
|
|
|
20
|
-
|
|
26
|
+
const legacyDateFormats = getFeature<typeof LegacyDateFormats>("LegacyDateFormats");
|
|
27
|
+
|
|
28
|
+
const getLegacyDateCalendarCustomizing = legacyDateFormats ? LegacyDateFormats.getLegacyDateCalendarCustomizing : () => { return []; };
|
|
29
|
+
|
|
30
|
+
export {
|
|
31
|
+
getFirstDayOfWeek,
|
|
32
|
+
getLegacyDateCalendarCustomizing,
|
|
33
|
+
};
|
|
34
|
+
|
|
21
35
|
export type { FormatSettings };
|
package/src/config/Icons.ts
CHANGED
|
@@ -3,8 +3,8 @@ import { getIconCollectionByAlias } from "../assets-meta/IconCollectionsAlias.js
|
|
|
3
3
|
|
|
4
4
|
const IconCollectionConfiguration = new Map<string, string>();
|
|
5
5
|
|
|
6
|
-
// All supported icon collections +
|
|
7
|
-
type IconCollection = "SAP-icons" | "SAP-icons-v4" | "SAP-icons-v5" | "horizon" | "tnt" | "tnt-v2" | "tnt-v3" | "business-suite" | string;
|
|
6
|
+
// All supported icon collections + unknown custom ones
|
|
7
|
+
type IconCollection = "SAP-icons" | "SAP-icons-v4" | "SAP-icons-v5" | "horizon" | "tnt" | "tnt-v2" | "tnt-v3" | "business-suite" | "business-suite-v1" | "business-suite-v2" | string;
|
|
8
8
|
|
|
9
9
|
// All registered icon collections - all icon collections resolves to these options at the end
|
|
10
10
|
enum RegisteredIconCollection {
|
|
@@ -12,7 +12,8 @@ enum RegisteredIconCollection {
|
|
|
12
12
|
SAPIconsV5 = "SAP-icons-v5",
|
|
13
13
|
SAPIconsTNTV2 = "tnt-v2",
|
|
14
14
|
SAPIconsTNTV3 = "tnt-v3",
|
|
15
|
-
|
|
15
|
+
SAPBSIconsV1 = "business-suite-v1",
|
|
16
|
+
SAPBSIconsV2 = "business-suite-v2",
|
|
16
17
|
}
|
|
17
18
|
|
|
18
19
|
/**
|
|
@@ -87,9 +88,11 @@ const getEffectiveIconCollection = (collectionName?: IconCollection): IconCollec
|
|
|
87
88
|
* - "tnt" (and its alias "SAP-icons-TNT") resolves to "tnt-v2" in "Quartz", "Belize", and resolves to "tnt-v3" in "Horizon"
|
|
88
89
|
* - "tnt-v2" forces "TNT icons v2" in any theme and resolves to itself "tnt-v2"
|
|
89
90
|
* - "tnt-v3" forces "TNT icons v3" in any theme and resolves to itself "tnt-v3"
|
|
90
|
-
* - "business-suite" (and its alias "BusinessSuiteInAppSymbols")
|
|
91
|
+
* - "business-suite" (and its alias "BusinessSuiteInAppSymbols") resolves to "business-suite-v1" in "Quartz", "Belize", and resolves to "business-suite-v2" in "Horizon"
|
|
92
|
+
* - "business-suite-v1" forces "Business Suite icons v1" in any theme and resolves to itself "business-suite-v1"
|
|
93
|
+
* - "business-suite-v2" forces "Business Suite icons v2" in any theme and resolves to itself "business-suite-v2"
|
|
91
94
|
*
|
|
92
|
-
* <b>Note:</b> "SAP-icons-v4", "SAP-icons-v5", "tnt-v2", "tnt-v3" and "business-suite" are just returned
|
|
95
|
+
* <b>Note:</b> "SAP-icons-v4", "SAP-icons-v5", "tnt-v2", "tnt-v3", "business-suite-v1" and "business-suite-v2" are just returned
|
|
93
96
|
* @param { IconCollection } collectionName
|
|
94
97
|
* @returns { RegisteredIconCollection } the registered collection name
|
|
95
98
|
*/
|
|
@@ -104,6 +107,10 @@ const getIconCollectionByTheme = (collectionName?: IconCollection): RegisteredIc
|
|
|
104
107
|
return horizonThemeFamily ? RegisteredIconCollection.SAPIconsTNTV3 : RegisteredIconCollection.SAPIconsTNTV2;
|
|
105
108
|
}
|
|
106
109
|
|
|
110
|
+
if (collectionName === "business-suite") {
|
|
111
|
+
return horizonThemeFamily ? RegisteredIconCollection.SAPBSIconsV2 : RegisteredIconCollection.SAPBSIconsV1;
|
|
112
|
+
}
|
|
113
|
+
|
|
107
114
|
return collectionName as RegisteredIconCollection;
|
|
108
115
|
};
|
|
109
116
|
|
|
@@ -1,16 +1,56 @@
|
|
|
1
|
+
import type UI5Element from "../UI5Element.js";
|
|
2
|
+
import type { Renderer } from "../UI5Element.js";
|
|
3
|
+
import type { TemplateFunction as Template } from "../renderer/executeTemplate.js";
|
|
4
|
+
import type { ComponentStylesData as Styles } from "../types.js";
|
|
5
|
+
|
|
1
6
|
/**
|
|
2
7
|
* Returns a custom element class decorator.
|
|
3
8
|
*
|
|
4
|
-
* @param { string }
|
|
9
|
+
* @param { string | object } tagNameOrComponentSettings
|
|
5
10
|
* @returns { ClassDecorator }
|
|
6
11
|
*/
|
|
7
|
-
const customElement = (
|
|
12
|
+
const customElement = (tagNameOrComponentSettings: string | {
|
|
13
|
+
tag?: string,
|
|
14
|
+
renderer?: Renderer,
|
|
15
|
+
styles?: Styles,
|
|
16
|
+
template?: Template,
|
|
17
|
+
dependencies?: Array<typeof UI5Element>,
|
|
18
|
+
staticAreaStyles?: Styles,
|
|
19
|
+
staticAreaTemplate?: Template,
|
|
20
|
+
languageAware?: boolean,
|
|
21
|
+
themeAware?: boolean,
|
|
22
|
+
fastNavigation?: boolean,
|
|
23
|
+
}): ClassDecorator => {
|
|
8
24
|
return (target: any) => {
|
|
9
25
|
if (!Object.prototype.hasOwnProperty.call(target, "decoratorMetadata")) {
|
|
10
26
|
target.decoratorMetadata = {};
|
|
11
27
|
}
|
|
12
28
|
|
|
29
|
+
if (typeof tagNameOrComponentSettings === "string") {
|
|
30
|
+
target.decoratorMetadata.tag = tagNameOrComponentSettings;
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
const {
|
|
35
|
+
tag,
|
|
36
|
+
languageAware = false,
|
|
37
|
+
themeAware = false,
|
|
38
|
+
fastNavigation = false,
|
|
39
|
+
} = tagNameOrComponentSettings;
|
|
40
|
+
|
|
13
41
|
target.decoratorMetadata.tag = tag;
|
|
42
|
+
target.decoratorMetadata.languageAware = languageAware;
|
|
43
|
+
target.decoratorMetadata.themeAware = themeAware;
|
|
44
|
+
target.decoratorMetadata.fastNavigation = fastNavigation;
|
|
45
|
+
|
|
46
|
+
["render", "renderer", "template", "staticAreaTemplate", "styles", "staticAreaStyles", "dependencies"].forEach((customElementEntity: string) => {
|
|
47
|
+
const _customElementEntity = customElementEntity === "render" ? "renderer" : customElementEntity;
|
|
48
|
+
const customElementEntityValue = tagNameOrComponentSettings[_customElementEntity as keyof typeof tag];
|
|
49
|
+
|
|
50
|
+
customElementEntityValue && Object.defineProperty(target, customElementEntity, {
|
|
51
|
+
get: () => customElementEntityValue,
|
|
52
|
+
});
|
|
53
|
+
});
|
|
14
54
|
};
|
|
15
55
|
};
|
|
16
56
|
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { getFormatSettings } from "../InitialConfiguration.js";
|
|
2
|
+
import type { FormatSettings } from "../config/FormatSettings.js";
|
|
3
|
+
import { registerFeature } from "../FeaturesRegistry.js";
|
|
4
|
+
|
|
5
|
+
// Allows specifying the customizing data for Islamic calendar support
|
|
6
|
+
// dateFormat - The date format
|
|
7
|
+
// islamicMonthStart - The Islamic date in string format // 14360101
|
|
8
|
+
// gregDate - Corresponding Gregorian date to the Islamic one in string format // 20141024
|
|
9
|
+
type IslamicToGregorianMapping = {
|
|
10
|
+
dateFormat: string,
|
|
11
|
+
islamicMonthStart: string,
|
|
12
|
+
gregDate: string,
|
|
13
|
+
};
|
|
14
|
+
type LegacyDateCalendarCustomizing = Array<IslamicToGregorianMapping>;
|
|
15
|
+
|
|
16
|
+
let formatSettings: FormatSettings;
|
|
17
|
+
|
|
18
|
+
class LegacyDateFormats {
|
|
19
|
+
/**
|
|
20
|
+
* Returns the currently set customizing data for Islamic calendar support
|
|
21
|
+
*
|
|
22
|
+
* @return {object[]} Returns an array that contains the customizing data.
|
|
23
|
+
* @public
|
|
24
|
+
*/
|
|
25
|
+
static getLegacyDateCalendarCustomizing(this: void): LegacyDateCalendarCustomizing {
|
|
26
|
+
if (formatSettings === undefined) {
|
|
27
|
+
formatSettings = getFormatSettings();
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
return formatSettings.legacyDateCalendarCustomizing || [];
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
registerFeature("LegacyDateFormats", LegacyDateFormats);
|
|
35
|
+
|
|
36
|
+
export default LegacyDateFormats;
|
|
37
|
+
export type {
|
|
38
|
+
FormatSettings,
|
|
39
|
+
LegacyDateCalendarCustomizing,
|
|
40
|
+
};
|
|
@@ -2,6 +2,7 @@ import { registerFeature } from "../FeaturesRegistry.js";
|
|
|
2
2
|
import { setTheme } from "../config/Theme.js";
|
|
3
3
|
import { getCurrentZIndex } from "../util/PopupUtils.js";
|
|
4
4
|
import { CLDRData } from "../asset-registries/LocaleData.js";
|
|
5
|
+
import type { LegacyDateCalendarCustomizing } from "../features/LegacyDateFormats.js";
|
|
5
6
|
|
|
6
7
|
type OpenUI5Popup = {
|
|
7
8
|
setInitialZIndex: (zIndex: number) => void,
|
|
@@ -22,6 +23,9 @@ type OpenUI5CoreConfiguration = {
|
|
|
22
23
|
getRTL: () => string,
|
|
23
24
|
getCalendarType: () => string,
|
|
24
25
|
getLocale: () => string,
|
|
26
|
+
getFormatSettings: () => {
|
|
27
|
+
getLegacyDateCalendarCustomizing: () => LegacyDateCalendarCustomizing;
|
|
28
|
+
}
|
|
25
29
|
};
|
|
26
30
|
|
|
27
31
|
type LocaleData = {
|
|
@@ -76,6 +80,7 @@ class OpenUI5Support {
|
|
|
76
80
|
calendarType: config.getCalendarType(),
|
|
77
81
|
formatSettings: {
|
|
78
82
|
firstDayOfWeek: LocaleData ? LocaleData.getInstance(config.getLocale()).getFirstDayOfWeek() : undefined,
|
|
83
|
+
legacyDateCalendarCustomizing: config.getFormatSettings().getLegacyDateCalendarCustomizing(),
|
|
79
84
|
},
|
|
80
85
|
};
|
|
81
86
|
}
|