@ui5/webcomponents-base 0.0.0-cad512aa3 → 0.0.0-cb061e041
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/.eslintignore +4 -4
- package/.npsrc.json +3 -0
- package/CHANGELOG.md +105 -0
- package/bundle.esm.js +2 -0
- package/config/wdio.conf.cjs +400 -0
- package/dist/InitialConfiguration.d.ts +6 -1
- package/dist/InitialConfiguration.js +10 -1
- package/dist/InitialConfiguration.js.map +1 -1
- package/dist/StaticArea.d.ts +3 -0
- package/dist/StaticArea.js +4 -3
- package/dist/StaticArea.js.map +1 -1
- package/dist/UI5Element.d.ts +2 -0
- package/dist/UI5Element.js +11 -2
- package/dist/UI5Element.js.map +1 -1
- package/dist/asset-registries/Icons.d.ts +11 -3
- package/dist/asset-registries/Icons.js +22 -1
- package/dist/asset-registries/Icons.js.map +1 -1
- package/dist/asset-registries/LocaleData.js.map +1 -1
- package/dist/assets/Boot.cd4c1287.js +9 -0
- package/dist/assets/bundle.esm.50629814.js +50 -0
- package/dist/config/Icons.js +5 -5
- package/dist/config/Icons.js.map +1 -1
- package/dist/config/NoConflict.js +1 -0
- package/dist/config/NoConflict.js.map +1 -1
- package/dist/config/Theme.d.ts +6 -5
- package/dist/config/Theme.js +14 -7
- package/dist/config/Theme.js.map +1 -1
- package/dist/config/Timezone.d.ts +17 -0
- package/dist/config/Timezone.js +30 -0
- package/dist/config/Timezone.js.map +1 -0
- package/dist/decorators/customElement.js +10 -4
- package/dist/decorators/customElement.js.map +1 -1
- package/dist/decorators/slot.js +2 -2
- package/dist/decorators/slot.js.map +1 -1
- package/dist/delegate/ResizeHandler.js +7 -5
- package/dist/delegate/ResizeHandler.js.map +1 -1
- package/dist/features/OpenUI5Support.d.ts +1 -0
- package/dist/features/OpenUI5Support.js +1 -0
- package/dist/features/OpenUI5Support.js.map +1 -1
- package/dist/generated/AssetParameters.js +2 -0
- package/dist/generated/VersionInfo.js +3 -3
- package/dist/generated/templates/elements/WithComplexTemplateTemplate.lit.d.ts +4 -0
- package/dist/generated/templates/elements/WithComplexTemplateTemplate.lit.js +8 -10
- package/dist/generated/templates/elements/WithComplexTemplateTemplate.lit.js.map +1 -0
- package/dist/getSharedResource.d.ts +1 -1
- package/dist/getSharedResource.js +2 -2
- package/dist/getSharedResource.js.map +1 -1
- package/dist/global.d.ts +2 -0
- package/dist/locale/RTLAwareRegistry.d.ts +1 -1
- package/dist/locale/RTLAwareRegistry.js.map +1 -1
- package/dist/renderer/executeTemplate.js +1 -1
- package/dist/renderer/executeTemplate.js.map +1 -1
- package/dist/sap/ui/thirdparty/caja-html-sanitizer.js +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/types.js.map +1 -1
- package/dist/updateShadowRoot.js +7 -4
- package/dist/updateShadowRoot.js.map +1 -1
- package/dist/util/FocusableElements.js +4 -3
- package/dist/util/FocusableElements.js.map +1 -1
- package/dist/util/getClassCopy.d.ts +2 -0
- package/dist/validateThemeRoot.js +14 -13
- package/dist/validateThemeRoot.js.map +1 -1
- package/index.js +227 -1
- package/lib/generate-asset-parameters/index.js +4 -2
- package/lib/generate-styles/index.js +3 -3
- package/lib/generate-version-info/index.js +1 -1
- package/{package-scripts.js → package-scripts.cjs} +3 -2
- package/package.json +5 -4
- package/tsconfig.json +2 -1
- package/config/wdio.conf.js +0 -1
- package/dist/assets/Boot.318259fc.js +0 -9
- package/dist/assets/bundle.esm.a4578c3b.js +0 -52
- /package/{.eslintrc.js → .eslintrc.cjs} +0 -0
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
/* eslint no-unused-vars: 0 */
|
|
2
|
-
import { html,
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
export default block0;
|
|
2
|
+
import { html, repeat, ifDefined } from "../../../renderer/LitRenderer.js";
|
|
3
|
+
function block0(context, tags, suffix) { return html `<div>Root text: ${ifDefined(this.text)}${repeat(this.items, (item, index) => item._id || index, (item, index) => block1.call(this, context, tags, suffix, item, index))} Root text: ${ifDefined(this.text)}</div>`; }
|
|
4
|
+
function block1(context, tags, suffix, item, index) { return html `<h3>Item-${index}</h3>${item.text ? block2.call(this, context, tags, suffix, item, index) : undefined}<ul>${repeat(item.words, (item, index) => item._id || index, (item, index) => block3.call(this, context, tags, suffix, item, index))}</ul>${item.text ? block4.call(this, context, tags, suffix, item, index) : undefined}`; }
|
|
5
|
+
function block2(context, tags, suffix, item, index) { return html `<div class="before-each-content--start--${index}">Root text: ${ifDefined(this.text)}, Item text: ${ifDefined(item.text)}</div>`; }
|
|
6
|
+
function block3(context, tags, suffix, item, index) { return html `<li><h3>Word-${index}</h3><div class="nested-each-content--${index}--0">Root Text: ${ifDefined(this.text)}, Word text: ${ifDefined(item.text)}</div><div class="nested-each-content--${index}--1">Root Text: ${ifDefined(this.text)}, Word text: ${ifDefined(item.text)}</div></li>`; }
|
|
7
|
+
function block4(context, tags, suffix, item, index) { return html `<div class="after-each-content--end--${index}">Root text: ${ifDefined(this.text)}, Item text: ${ifDefined(item.text)}</div>`; }
|
|
8
|
+
export default block0;
|
|
9
|
+
//# sourceMappingURL=WithComplexTemplateTemplate.lit.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WithComplexTemplateTemplate.lit.js","sourceRoot":"","sources":["../../../../src/generated/templates/elements/WithComplexTemplateTemplate.lit.ts"],"names":[],"mappings":"AAAA,8BAA8B;AAC9B,OAAO,EAAE,IAAI,EAAO,MAAM,EAAsB,SAAS,EAAwB,MAAM,kCAAkC,CAAC;AAK1H,SAAS,MAAM,CAA6B,OAAmB,EAAE,IAAc,EAAE,MAA0B,IAAI,OAAO,IAAI,CAAA,mBAAmB,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,GAAI,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAE,IAAkC,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A6B,OAAmB,EAAE,IAAc,EAAE,MAA0B,EAAE,IAAS,EAAE,KAAa,IAAI,OAAO,IAAI,CAAA,gBAAgB,KAAK,yCAAyC,KAAK,mBAAmB,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,gBAAgB,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,0CAA0C,KAAK,mBAAmB,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,gBAAgB,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,CAAA,CAAC;AAC3a,SAAS,MAAM,CAA6B,OAAmB,EAAE,IAAc,EAAE,MAA0B,EAAE,IAAS,EAAE,KAAa,IAAI,OAAO,IAAI,CAAA,wCAAwC,KAAK,gBAAgB,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,gBAAgB,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA,CAAC;AAGnR,eAAe,MAAM,CAAC","sourcesContent":["/* eslint no-unused-vars: 0 */\nimport { html, svg, repeat, classMap, styleMap, ifDefined, unsafeHTML, scopeTag } from \"../../../renderer/LitRenderer.js\";\nimport type UI5Element from \"../../../UI5Element.js\";\n\timport type WithComplexTemplate from \"../../../../test/elements/WithComplexTemplate.js\";\n\timport type { ClassMapValue } from \"../../../types.js\";\n\t\nfunction block0 (this: WithComplexTemplate, context: UI5Element, tags: string[], suffix: string | undefined) { return html`<div>Root text: ${ifDefined(this.text)}${ repeat(this.items, (item, index) => (item as typeof item & {_id?: any})._id || index, (item, index: number) => block1.call(this, context, tags, suffix, item, index)) } Root text: ${ifDefined(this.text)}</div>`;}\nfunction block1 (this: WithComplexTemplate, context: UI5Element, tags: string[], suffix: string | undefined, item: any, index: number) { return html`<h3>Item-${index}</h3>${ item.text ? block2.call(this, context, tags, suffix, item, index) : undefined }<ul>${ repeat(item.words, (item, index) => (item as typeof item & {_id?: any})._id || index, (item, index: number) => block3.call(this, context, tags, suffix, item, index)) }</ul>${ item.text ? block4.call(this, context, tags, suffix, item, index) : undefined }`;}\nfunction block2 (this: WithComplexTemplate, context: UI5Element, tags: string[], suffix: string | undefined, item: any, index: number) { return html`<div class=\"before-each-content--start--${index}\">Root text: ${ifDefined(this.text)}, Item text: ${ifDefined(item.text)}</div>`;}\nfunction block3 (this: WithComplexTemplate, context: UI5Element, tags: string[], suffix: string | undefined, item: any, index: number) { return html`<li><h3>Word-${index}</h3><div class=\"nested-each-content--${index}--0\">Root Text: ${ifDefined(this.text)}, Word text: ${ifDefined(item.text)}</div><div class=\"nested-each-content--${index}--1\">Root Text: ${ifDefined(this.text)}, Word text: ${ifDefined(item.text)}</div></li>`;}\nfunction block4 (this: WithComplexTemplate, context: UI5Element, tags: string[], suffix: string | undefined, item: any, index: number) { return html`<div class=\"after-each-content--end--${index}\">Root text: ${ifDefined(this.text)}, Item text: ${ifDefined(item.text)}</div>`;}\n\n\nexport default block0;"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Use this method to initialize/get resources that you would like to be shared among UI5 Web Components runtime instances.
|
|
3
|
-
* The data will be accessed via a singleton "ui5-shared-resources" HTML element in the "
|
|
3
|
+
* The data will be accessed via a singleton "ui5-shared-resources" HTML element in the "body" element of the page.
|
|
4
4
|
*
|
|
5
5
|
* @public
|
|
6
6
|
* @param namespace Unique ID of the resource, may contain "." to denote hierarchy
|
|
@@ -3,11 +3,11 @@ const getSharedResourcesInstance = () => {
|
|
|
3
3
|
if (typeof document === "undefined") {
|
|
4
4
|
return null;
|
|
5
5
|
}
|
|
6
|
-
return getSingletonElementInstance("ui5-shared-resources"
|
|
6
|
+
return getSingletonElementInstance("ui5-shared-resources");
|
|
7
7
|
};
|
|
8
8
|
/**
|
|
9
9
|
* Use this method to initialize/get resources that you would like to be shared among UI5 Web Components runtime instances.
|
|
10
|
-
* The data will be accessed via a singleton "ui5-shared-resources" HTML element in the "
|
|
10
|
+
* The data will be accessed via a singleton "ui5-shared-resources" HTML element in the "body" element of the page.
|
|
11
11
|
*
|
|
12
12
|
* @public
|
|
13
13
|
* @param namespace Unique ID of the resource, may contain "." to denote hierarchy
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getSharedResource.js","sourceRoot":"","sources":["../src/getSharedResource.ts"],"names":[],"mappings":"AAAA,OAAO,2BAA2B,MAAM,uCAAuC,CAAC;AAEhF,MAAM,0BAA0B,GAAG,GAAmC,EAAE;IACvE,IAAI,OAAO,QAAQ,KAAK,WAAW,EAAE;QACpC,OAAO,IAAI,CAAC;KACZ;IACD,OAAO,2BAA2B,CAAC,sBAAsB,
|
|
1
|
+
{"version":3,"file":"getSharedResource.js","sourceRoot":"","sources":["../src/getSharedResource.ts"],"names":[],"mappings":"AAAA,OAAO,2BAA2B,MAAM,uCAAuC,CAAC;AAEhF,MAAM,0BAA0B,GAAG,GAAmC,EAAE;IACvE,IAAI,OAAO,QAAQ,KAAK,WAAW,EAAE;QACpC,OAAO,IAAI,CAAC;KACZ;IACD,OAAO,2BAA2B,CAAC,sBAAsB,CAAuC,CAAC;AAClG,CAAC,CAAC;AAEF;;;;;;;;GAQG;AACH,MAAM,iBAAiB,GAAG,CAAI,SAAiB,EAAE,YAAe,EAAK,EAAE;IACtE,MAAM,KAAK,GAAG,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACnC,IAAI,OAAO,GAAG,0BAA0B,EAAyB,CAAC;IAElE,IAAI,CAAC,OAAO,EAAE;QACb,OAAO,YAAY,CAAC;KACpB;IAED,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QACtC,MAAM,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;QACtB,MAAM,QAAQ,GAAG,CAAC,KAAK,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC;QACxC,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,EAAE;YACzD,OAAO,CAAC,IAAI,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,CAAC;SAC7C;QACD,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;KACxB;IAED,OAAO,OAAY,CAAC;AACrB,CAAC,CAAC;AAEF,eAAe,iBAAiB,CAAC","sourcesContent":["import getSingletonElementInstance from \"./util/getSingletonElementInstance.js\";\n\nconst getSharedResourcesInstance = (): Record<string, unknown> | null => {\n\tif (typeof document === \"undefined\") {\n\t\treturn null;\n\t}\n\treturn getSingletonElementInstance(\"ui5-shared-resources\") as unknown as Record<string, unknown>;\n};\n\n/**\n * Use this method to initialize/get resources that you would like to be shared among UI5 Web Components runtime instances.\n * The data will be accessed via a singleton \"ui5-shared-resources\" HTML element in the \"body\" element of the page.\n *\n * @public\n * @param namespace Unique ID of the resource, may contain \".\" to denote hierarchy\n * @param initialValue Object or primitive that will be used as an initial value if the resource does not exist\n * @returns {*}\n */\nconst getSharedResource = <T>(namespace: string, initialValue: T): T => {\n\tconst parts = namespace.split(\".\");\n\tlet current = getSharedResourcesInstance() as Record<string, any>;\n\n\tif (!current) {\n\t\treturn initialValue;\n\t}\n\n\tfor (let i = 0; i < parts.length; i++) {\n\t\tconst part = parts[i];\n\t\tconst lastPart = i === parts.length - 1;\n\t\tif (!Object.prototype.hasOwnProperty.call(current, part)) {\n\t\t\tcurrent[part] = lastPart ? initialValue : {};\n\t\t}\n\t\tcurrent = current[part];\n\t}\n\n\treturn current as T;\n};\n\nexport default getSharedResource;\n"]}
|
package/dist/global.d.ts
CHANGED
|
@@ -20,11 +20,13 @@ declare global {
|
|
|
20
20
|
|
|
21
21
|
module "*generated/AssetParameters.js" {
|
|
22
22
|
const DEFAULT_THEME: string;
|
|
23
|
+
const SUPPORTED_THEMES: Array<string>;
|
|
23
24
|
const DEFAULT_LANGUAGE: string;
|
|
24
25
|
const DEFAULT_LOCALE: string;
|
|
25
26
|
const SUPPORTED_LOCALES: Array<string>;
|
|
26
27
|
export {
|
|
27
28
|
DEFAULT_THEME,
|
|
29
|
+
SUPPORTED_THEMES,
|
|
28
30
|
DEFAULT_LANGUAGE,
|
|
29
31
|
DEFAULT_LOCALE,
|
|
30
32
|
SUPPORTED_LOCALES,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RTLAwareRegistry.js","sourceRoot":"","sources":["../../src/locale/RTLAwareRegistry.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,GAAG,IAAI,GAAG,EAAqB,CAAC;AAEjD,MAAM,cAAc,GAAG,CAAC,KAAwB,EAAE,EAAE;IACnD,WAAW,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AACxB,CAAC,CAAC;AAEF,MAAM,UAAU,GAAG,CAAC,KAAwB,EAAE,EAAE;IAC/C,OAAO,WAAW,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AAC/B,CAAC,CAAC;AAEF,OAAO,EACN,cAAc,EACd,UAAU,GACV,CAAC","sourcesContent":["import type UI5Element from \"../UI5Element\";\n\nconst rtlAwareSet = new Set<typeof UI5Element>();\n\nconst markAsRtlAware = (klass: typeof UI5Element) => {\n\trtlAwareSet.add(klass);\n};\n\nconst isRtlAware = (klass: typeof UI5Element) => {\n\treturn rtlAwareSet.has(klass);\n};\n\nexport {\n\tmarkAsRtlAware,\n\tisRtlAware,\n};\n"]}
|
|
1
|
+
{"version":3,"file":"RTLAwareRegistry.js","sourceRoot":"","sources":["../../src/locale/RTLAwareRegistry.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,GAAG,IAAI,GAAG,EAAqB,CAAC;AAEjD,MAAM,cAAc,GAAG,CAAC,KAAwB,EAAE,EAAE;IACnD,WAAW,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AACxB,CAAC,CAAC;AAEF,MAAM,UAAU,GAAG,CAAC,KAAwB,EAAE,EAAE;IAC/C,OAAO,WAAW,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AAC/B,CAAC,CAAC;AAEF,OAAO,EACN,cAAc,EACd,UAAU,GACV,CAAC","sourcesContent":["import type UI5Element from \"../UI5Element.js\";\n\nconst rtlAwareSet = new Set<typeof UI5Element>();\n\nconst markAsRtlAware = (klass: typeof UI5Element) => {\n\trtlAwareSet.add(klass);\n};\n\nconst isRtlAware = (klass: typeof UI5Element) => {\n\treturn rtlAwareSet.has(klass);\n};\n\nexport {\n\tmarkAsRtlAware,\n\tisRtlAware,\n};\n"]}
|
|
@@ -9,7 +9,7 @@ import { getCustomElementsScopingSuffix, shouldScopeCustomElement } from "../Cus
|
|
|
9
9
|
const executeTemplate = (template, component) => {
|
|
10
10
|
const tagsToScope = getTagsToScope(component);
|
|
11
11
|
const scope = getCustomElementsScopingSuffix();
|
|
12
|
-
return template(component, tagsToScope, scope);
|
|
12
|
+
return template.call(component, component, tagsToScope, scope);
|
|
13
13
|
};
|
|
14
14
|
/**
|
|
15
15
|
* Returns all tags, used inside component's template subject to scoping.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"executeTemplate.js","sourceRoot":"","sources":["../../src/renderer/executeTemplate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,8BAA8B,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AAM1G;;;;;;GAMG;AACH,MAAM,eAAe,GAAG,CAAC,QAA0B,EAAE,SAAqB,EAA0B,EAAE;IACrG,MAAM,WAAW,GAAG,cAAc,CAAC,SAAS,CAAC,CAAC;IAC9C,MAAM,KAAK,GAAG,8BAA8B,EAAE,CAAC;IAC/C,OAAO,QAAQ,CAAC,SAAS,EAAE,WAAW,EAAE,KAAK,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"executeTemplate.js","sourceRoot":"","sources":["../../src/renderer/executeTemplate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,8BAA8B,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AAM1G;;;;;;GAMG;AACH,MAAM,eAAe,GAAG,CAAC,QAA0B,EAAE,SAAqB,EAA0B,EAAE;IACrG,MAAM,WAAW,GAAG,cAAc,CAAC,SAAS,CAAC,CAAC;IAC9C,MAAM,KAAK,GAAG,8BAA8B,EAAE,CAAC;IAC/C,OAAO,QAAQ,CAAC,IAAI,CAAC,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,KAAK,CAAC,CAAC;AAChE,CAAC,CAAC;AAEF;;;;;GAKG;AACH,MAAM,cAAc,GAAG,CAAC,SAAqB,EAAE,EAAE;IAChD,MAAM,IAAI,GAAG,SAAS,CAAC,WAAgC,CAAC;IAExD,MAAM,YAAY,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC,UAAU,EAAE,CAAC;IACrD,MAAM,WAAW,GAAG,IAAI,CAAC,qBAAqB,EAAE,CAAC,GAAG,CAAC,CAAC,GAAsB,EAAE,EAAE,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC,UAAU,EAAE,CAAC,CAAC,MAAM,CAAC,wBAAwB,CAAC,CAAC;IAElJ,IAAI,wBAAwB,CAAC,YAAY,CAAC,EAAE;QAC3C,WAAW,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;KAC/B;IAED,OAAO,WAAW,CAAC;AACpB,CAAC,CAAC;AAEF,eAAe,eAAe,CAAC","sourcesContent":["import { getCustomElementsScopingSuffix, shouldScopeCustomElement } from \"../CustomElementsScopeUtils.js\";\nimport type UI5Element from \"../UI5Element.js\";\n\ntype TemplateFunctionResult = object;\ntype TemplateFunction = (component: UI5Element, tagsToScope: Array<string>, scope: string | undefined) => TemplateFunctionResult;\n\n/**\n * Runs a component's template with the component's current state, while also scoping HTML\n *\n * @param template - the template to execute\n * @param component - the component\n * @public\n */\nconst executeTemplate = (template: TemplateFunction, component: UI5Element): TemplateFunctionResult => {\n\tconst tagsToScope = getTagsToScope(component);\n\tconst scope = getCustomElementsScopingSuffix();\n\treturn template.call(component, component, tagsToScope, scope);\n};\n\n/**\n * Returns all tags, used inside component's template subject to scoping.\n * @param component - the component\n * @returns {Array[]}\n * @private\n */\nconst getTagsToScope = (component: UI5Element) => {\n\tconst ctor = component.constructor as typeof UI5Element;\n\n\tconst componentTag = ctor.getMetadata().getPureTag();\n\tconst tagsToScope = ctor.getUniqueDependencies().map((dep: typeof UI5Element) => dep.getMetadata().getPureTag()).filter(shouldScopeCustomElement);\n\n\tif (shouldScopeCustomElement(componentTag)) {\n\t\ttagsToScope.push(componentTag);\n\t}\n\n\treturn tagsToScope;\n};\n\nexport default executeTemplate;\nexport type { TemplateFunction, TemplateFunctionResult };\n"]}
|
|
@@ -1989,7 +1989,7 @@ if (typeof window !== 'undefined') {
|
|
|
1989
1989
|
}
|
|
1990
1990
|
/*!
|
|
1991
1991
|
* OpenUI5
|
|
1992
|
-
* (c) Copyright 2009-
|
|
1992
|
+
* (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
|
|
1993
1993
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
1994
1994
|
*/
|
|
1995
1995
|
// Based on coding from the HTML4 Sanitizer by Google Inc.
|
package/dist/types.d.ts
CHANGED
|
@@ -15,4 +15,4 @@ type ClassMap = {
|
|
|
15
15
|
type PassiveEventListenerObject = EventListenerObject & {
|
|
16
16
|
passive: boolean;
|
|
17
17
|
};
|
|
18
|
-
export type { PromiseResolve, Timeout, Interval, StyleData, StyleDataCSP, ComponentStylesData, ClassMap, PassiveEventListenerObject, };
|
|
18
|
+
export type { PromiseResolve, Timeout, Interval, StyleData, StyleDataCSP, ComponentStylesData, ClassMap, ClassMapValue, PassiveEventListenerObject, };
|
package/dist/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"","sourcesContent":["type PromiseResolve = (value: void | PromiseLike<void>) => void;\ntype Timeout = ReturnType<typeof setTimeout>;\ntype Interval = ReturnType<typeof setInterval>;\n\ntype StyleDataCSP = {\n\tcontent: string,\n\tpackageName: string,\n\tfileName: string,\n};\n\ntype StyleData = StyleDataCSP | string;\n\ntype ComponentStylesData = Array<ComponentStylesData> | Array<StyleData> | StyleData;\n\ntype ClassMapValue = Record<string, boolean>\n\ntype ClassMap = { [x: string] : ClassMapValue | ClassMap };\n\ntype PassiveEventListenerObject = EventListenerObject & { passive: boolean };\n\nexport type {\n\tPromiseResolve,\n\tTimeout,\n\tInterval,\n\tStyleData,\n\tStyleDataCSP,\n\tComponentStylesData,\n\tClassMap,\n\tPassiveEventListenerObject,\n};\n"]}
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"","sourcesContent":["type PromiseResolve = (value: void | PromiseLike<void>) => void;\ntype Timeout = ReturnType<typeof setTimeout>;\ntype Interval = ReturnType<typeof setInterval>;\n\ntype StyleDataCSP = {\n\tcontent: string,\n\tpackageName: string,\n\tfileName: string,\n};\n\ntype StyleData = StyleDataCSP | string;\n\ntype ComponentStylesData = Array<ComponentStylesData> | Array<StyleData> | StyleData;\n\ntype ClassMapValue = Record<string, boolean>\n\ntype ClassMap = { [x: string] : ClassMapValue | ClassMap };\n\ntype PassiveEventListenerObject = EventListenerObject & { passive: boolean };\n\nexport type {\n\tPromiseResolve,\n\tTimeout,\n\tInterval,\n\tStyleData,\n\tStyleDataCSP,\n\tComponentStylesData,\n\tClassMap,\n\tClassMapValue,\n\tPassiveEventListenerObject,\n};\n"]}
|
package/dist/updateShadowRoot.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import executeTemplate from "./renderer/executeTemplate.js";
|
|
2
1
|
import getConstructableStyle from "./theming/getConstructableStyle.js";
|
|
3
2
|
import getEffectiveStyle from "./theming/getEffectiveStyle.js";
|
|
4
3
|
import getEffectiveLinksHrefs from "./theming/getEffectiveLinksHrefs.js";
|
|
@@ -11,10 +10,14 @@ import { shouldUseLinks } from "./CSP.js";
|
|
|
11
10
|
const updateShadowRoot = (element, forStaticArea = false) => {
|
|
12
11
|
let styleStrOrHrefsArr;
|
|
13
12
|
const ctor = element.constructor;
|
|
14
|
-
const propertyName = forStaticArea ? "staticAreaTemplate" : "template";
|
|
15
|
-
const template = ctor[propertyName];
|
|
16
13
|
const shadowRoot = forStaticArea ? element.staticAreaItem.shadowRoot : element.shadowRoot;
|
|
17
|
-
|
|
14
|
+
let renderResult;
|
|
15
|
+
if (forStaticArea) {
|
|
16
|
+
renderResult = element.renderStatic(); // this is checked before calling updateShadowRoot
|
|
17
|
+
}
|
|
18
|
+
else {
|
|
19
|
+
renderResult = element.render(); // this is checked before calling updateShadowRoot
|
|
20
|
+
}
|
|
18
21
|
if (!shadowRoot) {
|
|
19
22
|
console.warn(`There is no shadow root to update`); // eslint-disable-line
|
|
20
23
|
return;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"updateShadowRoot.js","sourceRoot":"","sources":["../src/updateShadowRoot.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"updateShadowRoot.js","sourceRoot":"","sources":["../src/updateShadowRoot.ts"],"names":[],"mappings":"AAAA,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,UAAU,GAAG,aAAa,CAAC,CAAC,CAAC,OAAO,CAAC,cAAe,CAAC,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC;IAC3F,IAAI,YAAY,CAAC;IACjB,IAAI,aAAa,EAAE;QAClB,YAAY,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC,CAAC,kDAAkD;KACzF;SAAM;QACN,YAAY,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC,kDAAkD;KACnF;IAED,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","sourcesContent":["import getConstructableStyle from \"./theming/getConstructableStyle.js\";\nimport getEffectiveStyle from \"./theming/getEffectiveStyle.js\";\nimport getEffectiveLinksHrefs from \"./theming/getEffectiveLinksHrefs.js\";\nimport { shouldUseLinks } from \"./CSP.js\";\nimport type UI5Element from \"./UI5Element.js\";\n\n/**\n * Updates the shadow root of a UI5Element or its static area item\n * @param element\n * @param forStaticArea\n */\nconst updateShadowRoot = (element: UI5Element, forStaticArea = false) => {\n\tlet styleStrOrHrefsArr;\n\tconst ctor = element.constructor as typeof UI5Element;\n\tconst shadowRoot = forStaticArea ? element.staticAreaItem!.shadowRoot : element.shadowRoot;\n\tlet renderResult;\n\tif (forStaticArea) {\n\t\trenderResult = element.renderStatic(); // this is checked before calling updateShadowRoot\n\t} else {\n\t\trenderResult = element.render(); // this is checked before calling updateShadowRoot\n\t}\n\n\tif (!shadowRoot) {\n\t\tconsole.warn(`There is no shadow root to update`); // eslint-disable-line\n\t\treturn;\n\t}\n\n\tif (shouldUseLinks()) {\n\t\tstyleStrOrHrefsArr = getEffectiveLinksHrefs(ctor, forStaticArea);\n\t} else if (document.adoptedStyleSheets) { // Chrome\n\t\tshadowRoot.adoptedStyleSheets = getConstructableStyle(ctor, forStaticArea);\n\t} else { // FF, Safari\n\t\tstyleStrOrHrefsArr = getEffectiveStyle(ctor, forStaticArea);\n\t}\n\n\tif (ctor.renderer) {\n\t\tctor.renderer(renderResult, shadowRoot, styleStrOrHrefsArr, forStaticArea, { host: element });\n\t\treturn;\n\t}\n\n\tctor.render(renderResult, shadowRoot, styleStrOrHrefsArr, forStaticArea, { host: element });\n};\n\nexport default updateShadowRoot;\n"]}
|
|
@@ -58,10 +58,11 @@ const findFocusableElement = async (container, forward, startFromContainer) => {
|
|
|
58
58
|
}
|
|
59
59
|
child = forward ? originalChild.nextSibling : originalChild.previousSibling;
|
|
60
60
|
// If the child element is not part of the currently assigned element,
|
|
61
|
-
// we have to check the next element assigned to the slot or continue with the next sibling of the slot,
|
|
62
|
-
// otherwise, the nextSibling is the next element inside the light DOM
|
|
61
|
+
// we have to check the next/previous element assigned to the slot or continue with the next/previous sibling of the slot,
|
|
62
|
+
// otherwise, the nextSibling/previousSibling is the next element inside the light DOM
|
|
63
63
|
if (assignedElements && !assignedElements[currentIndex].contains(child)) {
|
|
64
|
-
|
|
64
|
+
currentIndex = forward ? currentIndex + 1 : currentIndex - 1;
|
|
65
|
+
child = assignedElements[currentIndex];
|
|
65
66
|
}
|
|
66
67
|
}
|
|
67
68
|
/* eslint-enable no-await-in-loop */
|
|
@@ -1 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AI,CAAC,WAAW,CAAC,KAAK,CAAC,EAAE;YAC1E,IAAI,kBAAkB,CAAC,KAAK,CAAC,EAAE;gBAC9B,OAAO,CAAC,KAAK,IAAI,OAAO,KAAK,CAAC,KAAK,KAAK,UAAU,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC;aACnE;YAED,mBAAmB,GAAG,MAAM,oBAAoB,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;YACjE,IAAI,mBAAmB,EAAE;gBACxB,OAAO,CAAC,mBAAmB,IAAI,OAAO,mBAAmB,CAAC,KAAK,KAAK,UAAU,CAAC,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,IAAI,CAAC;aAC7G;SACD;QAED,KAAK,GAAG,OAAO,CAAC,CAAC,CAAC,aAAa,CAAC,WAA0B,CAAC,CAAC,CAAC,aAAa,CAAC,eAA8B,CAAC;QAE1G,sEAAsE;QACtE,0HAA0H;QAC1H,sFAAsF;QACtF,IAAI,gBAAgB,IAAI,CAAC,gBAAgB,CAAC,YAAY,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE;YACxE,YAAY,GAAG,OAAO,CAAC,CAAC,CAAC,YAAY,GAAG,CAAC,CAAC,CAAC,CAAC,YAAY,GAAG,CAAC,CAAC;YAE7D,KAAK,GAAG,gBAAgB,CAAC,YAAY,CAAgB,CAAC;SACtD;KACD;IAED,oCAAoC;IAEpC,OAAO,IAAI,CAAC;AACb,CAAC,CAAC;AAEF,OAAO,EACN,wBAAwB,EACxB,uBAAuB,GACvB,CAAC","sourcesContent":["import isElementHidden from \"./isElementHidden.js\";\nimport isElementClickable from \"./isElementClickable.js\";\nimport { instanceOfUI5Element } from \"../UI5Element.js\";\n\ntype FocusableElementPromise = Promise<HTMLElement | null>;\n\nconst isFocusTrap = (el: HTMLElement) => {\n\treturn el.hasAttribute(\"data-ui5-focus-trap\");\n};\n\nconst getFirstFocusableElement = async (container: HTMLElement, startFromContainer?: boolean): FocusableElementPromise => {\n\tif (!container || isElementHidden(container)) {\n\t\treturn null;\n\t}\n\n\treturn findFocusableElement(container, true, startFromContainer);\n};\n\nconst getLastFocusableElement = async (container: HTMLElement, startFromContainer?: boolean): FocusableElementPromise => {\n\tif (!container || isElementHidden(container)) {\n\t\treturn null;\n\t}\n\n\treturn findFocusableElement(container, false, startFromContainer);\n};\n\nconst isElemFocusable = (el: HTMLElement) => {\n\treturn el.hasAttribute(\"data-ui5-focus-redirect\") || !isElementHidden(el);\n};\n\nconst findFocusableElement = async (container: HTMLElement, forward: boolean, startFromContainer?: boolean): FocusableElementPromise => {\n\tlet child: HTMLElement | undefined;\n\tlet assignedElements;\n\tlet currentIndex = -1;\n\n\tif (container.shadowRoot) {\n\t\tchild = forward ? container.shadowRoot.firstChild as HTMLElement : container.shadowRoot.lastChild as HTMLElement;\n\t} else if (container instanceof HTMLSlotElement && container.assignedNodes()) {\n\t\tassignedElements = container.assignedNodes();\n\t\tcurrentIndex = forward ? 0 : assignedElements.length - 1;\n\t\tchild = assignedElements[currentIndex] as HTMLElement;\n\t} else if (startFromContainer) {\n\t\tchild = container;\n\t} else {\n\t\tchild = forward ? container.firstElementChild as HTMLElement : container.lastElementChild as HTMLElement;\n\t}\n\n\tlet focusableDescendant;\n\n\t/* eslint-disable no-await-in-loop */\n\n\twhile (child) {\n\t\tconst originalChild: HTMLElement | undefined = child;\n\n\t\tif (instanceOfUI5Element(child)) {\n\t\t\tchild = await child.getFocusDomRefAsync();\n\t\t}\n\n\t\tif (!child) {\n\t\t\treturn null;\n\t\t}\n\n\t\tif (child.nodeType === 1 && isElemFocusable(child) && !isFocusTrap(child)) {\n\t\t\tif (isElementClickable(child)) {\n\t\t\t\treturn (child && typeof child.focus === \"function\") ? child : null;\n\t\t\t}\n\n\t\t\tfocusableDescendant = await findFocusableElement(child, forward);\n\t\t\tif (focusableDescendant) {\n\t\t\t\treturn (focusableDescendant && typeof focusableDescendant.focus === \"function\") ? focusableDescendant : null;\n\t\t\t}\n\t\t}\n\n\t\tchild = forward ? originalChild.nextSibling as HTMLElement : originalChild.previousSibling as HTMLElement;\n\n\t\t// If the child element is not part of the currently assigned element,\n\t\t// we have to check the next/previous element assigned to the slot or continue with the next/previous sibling of the slot,\n\t\t// otherwise, the nextSibling/previousSibling is the next element inside the light DOM\n\t\tif (assignedElements && !assignedElements[currentIndex].contains(child)) {\n\t\t\tcurrentIndex = forward ? currentIndex + 1 : currentIndex - 1;\n\n\t\t\tchild = assignedElements[currentIndex] as HTMLElement;\n\t\t}\n\t}\n\n\t/* eslint-enable no-await-in-loop */\n\n\treturn null;\n};\n\nexport {\n\tgetFirstFocusableElement,\n\tgetLastFocusableElement,\n};\n"]}
|
|
@@ -22,6 +22,8 @@ declare const getClassCopy: (klass: typeof UI5Element, constructorCallback: () =
|
|
|
22
22
|
_getRealDomRef?: (() => HTMLElement) | undefined;
|
|
23
23
|
staticAreaItem?: import("../StaticAreaItem.js").default | undefined;
|
|
24
24
|
readonly _id: string;
|
|
25
|
+
render(): object;
|
|
26
|
+
renderStatic(): object;
|
|
25
27
|
connectedCallback(): Promise<void>;
|
|
26
28
|
disconnectedCallback(): void;
|
|
27
29
|
onBeforeRendering(): void;
|
|
@@ -13,26 +13,27 @@ const buildCorrectUrl = (oldUrl, newOrigin) => {
|
|
|
13
13
|
return new URL(oldUrlPath, newOrigin).toString();
|
|
14
14
|
};
|
|
15
15
|
const validateThemeRoot = (themeRoot) => {
|
|
16
|
-
let
|
|
16
|
+
let resultUrl;
|
|
17
17
|
try {
|
|
18
|
-
|
|
19
|
-
const origin = themeRootURL.origin;
|
|
20
|
-
themeRootURL = themeRootURL.toString();
|
|
21
|
-
if (themeRootURL.startsWith(".") || themeRootURL.startsWith("/")) {
|
|
18
|
+
if (themeRoot.startsWith(".") || themeRoot.startsWith("/")) {
|
|
22
19
|
// Handle relative url
|
|
23
20
|
// new URL("/newExmPath", "http://example.com/exmPath") => http://example.com/newExmPath
|
|
24
21
|
// new URL("./newExmPath", "http://example.com/exmPath") => http://example.com/exmPath/newExmPath
|
|
25
22
|
// new URL("../newExmPath", "http://example.com/exmPath") => http://example.com/newExmPath
|
|
26
|
-
resultUrl = new URL(
|
|
27
|
-
}
|
|
28
|
-
else if (origin && validateThemeOrigin(origin)) {
|
|
29
|
-
// If origin is allowed, use it
|
|
30
|
-
resultUrl = themeRootURL.toString();
|
|
23
|
+
resultUrl = new URL(themeRoot, window.location.href).toString();
|
|
31
24
|
}
|
|
32
25
|
else {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
26
|
+
const themeRootURL = new URL(themeRoot);
|
|
27
|
+
const origin = themeRootURL.origin;
|
|
28
|
+
if (origin && validateThemeOrigin(origin)) {
|
|
29
|
+
// If origin is allowed, use it
|
|
30
|
+
resultUrl = themeRootURL.toString();
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
// If origin is not allow and the URL is not relative, we have to replace the origin
|
|
34
|
+
// with current location
|
|
35
|
+
resultUrl = buildCorrectUrl(themeRootURL.toString(), window.location.href);
|
|
36
|
+
}
|
|
36
37
|
}
|
|
37
38
|
if (!resultUrl.endsWith("/")) {
|
|
38
39
|
resultUrl = `${resultUrl}/`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validateThemeRoot.js","sourceRoot":"","sources":["../src/validateThemeRoot.ts"],"names":[],"mappings":"AAAA,MAAM,eAAe,GAAG,CAAC,WAAmB,EAAE,EAAE;IAC/C,MAAM,OAAO,GAAG,QAAQ,CAAC,aAAa,CAAC,cAAc,WAAW,IAAI,CAAC,EACpE,cAAc,GAAG,OAAO,IAAI,OAAO,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC;IAE7D,OAAO,cAAc,CAAC;AACvB,CAAC,CAAC;AAEF,MAAM,mBAAmB,GAAG,CAAC,MAAc,EAAE,EAAE;IAC9C,MAAM,cAAc,GAAG,eAAe,CAAC,yBAAyB,CAAC,CAAC;IAElE,OAAO,cAAc,IAAI,cAAc,C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agContent = metaTag && metaTag.getAttribute(\"content\");\n\n\treturn metaTagContent;\n};\n\nconst validateThemeOrigin = (origin: string) => {\n\tconst allowedOrigins = getMetaTagValue(\"sap-allowedThemeOrigins\");\n\n\treturn allowedOrigins && allowedOrigins.split(\",\").some(allowedOrigin => {\n\t\treturn allowedOrigin === \"*\" || origin === allowedOrigin.trim();\n\t});\n};\n\nconst buildCorrectUrl = (oldUrl: string, newOrigin: string) => {\n\tconst oldUrlPath = new URL(oldUrl).pathname;\n\n\treturn new URL(oldUrlPath, newOrigin).toString();\n};\n\nconst validateThemeRoot = (themeRoot: string) => {\n\tlet resultUrl;\n\n\ttry {\n\t\tif (themeRoot.startsWith(\".\") || themeRoot.startsWith(\"/\")) {\n\t\t\t// Handle relative url\n\t\t\t// new URL(\"/newExmPath\", \"http://example.com/exmPath\") => http://example.com/newExmPath\n\t\t\t// new URL(\"./newExmPath\", \"http://example.com/exmPath\") => http://example.com/exmPath/newExmPath\n\t\t\t// new URL(\"../newExmPath\", \"http://example.com/exmPath\") => http://example.com/newExmPath\n\t\t\tresultUrl = new URL(themeRoot, window.location.href).toString();\n\t\t} else {\n\t\t\tconst themeRootURL = new URL(themeRoot);\n\t\t\tconst origin = themeRootURL.origin;\n\n\t\t\tif (origin && validateThemeOrigin(origin)) {\n\t\t\t\t// If origin is allowed, use it\n\t\t\t\tresultUrl = themeRootURL.toString();\n\t\t\t} else {\n\t\t\t\t// If origin is not allow and the URL is not relative, we have to replace the origin\n\t\t\t\t// with current location\n\t\t\t\tresultUrl = buildCorrectUrl(themeRootURL.toString(), window.location.href);\n\t\t\t}\n\t\t}\n\n\t\tif (!resultUrl.endsWith(\"/\")) {\n\t\t\tresultUrl = `${resultUrl}/`;\n\t\t}\n\n\t\treturn `${resultUrl}UI5/`;\n\t} catch (e) {\n\t\t// Catch if URL is not correct\n\t}\n};\n\nexport default validateThemeRoot;\n"]}
|
package/index.js
CHANGED
|
@@ -1,4 +1,230 @@
|
|
|
1
|
+
// animations/
|
|
2
|
+
import scroll from "./dist/animations/scroll.js";
|
|
3
|
+
import slideDown from "./dist/animations/slideDown.js";
|
|
4
|
+
import slideUp from "./dist/animations/slideup.js";
|
|
5
|
+
|
|
6
|
+
// config/
|
|
7
|
+
import { getAnimationMode, setAnimationMode } from "./dist/config/AnimationMode.js";
|
|
8
|
+
import { getCalendarType } from "./dist/config/CalendarType.js";
|
|
9
|
+
import { getFirstDayOfWeek, getLegacyDateCalendarCustomizing } from "./dist/config/FormatSettings.js";
|
|
10
|
+
import {
|
|
11
|
+
setDefaultIconCollection,
|
|
12
|
+
getDefaultIconCollection,
|
|
13
|
+
getEffectiveIconCollection,
|
|
14
|
+
RegisteredIconCollection,
|
|
15
|
+
} from "./dist/config/Icons.js";
|
|
16
|
+
import {
|
|
17
|
+
getLanguage,
|
|
18
|
+
setLanguage,
|
|
19
|
+
getDefaultLanguage,
|
|
20
|
+
setFetchDefaultLanguage,
|
|
21
|
+
getFetchDefaultLanguage,
|
|
22
|
+
} from "./dist/config/Language.js";
|
|
23
|
+
import { getNoConflict, setNoConflict } from "./dist/config/NoConflict.js";
|
|
24
|
+
import { getRTL } from "./dist/config/RTL.js";
|
|
25
|
+
import {
|
|
26
|
+
getTheme,
|
|
27
|
+
setTheme,
|
|
28
|
+
getDefaultTheme,
|
|
29
|
+
} from "./dist/config/Theme.js";
|
|
30
|
+
|
|
31
|
+
// decorators/
|
|
32
|
+
import customElement from "./dist/decorators/customElement.js";
|
|
33
|
+
import event from "./dist/decorators/event.js";
|
|
34
|
+
import property from "./dist/decorators/property.js";
|
|
35
|
+
import slot from "./dist/decorators/slot.js";
|
|
36
|
+
|
|
37
|
+
// delegate/
|
|
38
|
+
import ItemNavigation from "./dist/delegate/ItemNavigation.js";
|
|
39
|
+
import ResizeHandler from "./dist/delegate/ResizeHandler.js";
|
|
40
|
+
import ScrollEnablement from "./dist/delegate/ScrollEnablement.js";
|
|
41
|
+
|
|
42
|
+
// locale/
|
|
43
|
+
import applyDirection from "./dist/locale/applyDirection.js";
|
|
44
|
+
import { attachDirectionChange, detachDirectionChange } from "./dist/locale/directionChange.js";
|
|
45
|
+
import getEffectiveDir from "./dist/locale/getEffectiveDir.js";
|
|
46
|
+
import { attachLanguageChange, detachLanguageChange } from "./dist/locale/languageChange.js";
|
|
47
|
+
|
|
48
|
+
// util/
|
|
49
|
+
import { URLListValidator, sanitizeHTML } from "./dist/util/HTMLSanitizer.js";
|
|
50
|
+
|
|
51
|
+
// Assets.ts
|
|
52
|
+
import { registerI18nLoader } from "./dist/asset-registries/i18n.js";
|
|
53
|
+
import { registerLocaleDataLoader } from "./dist/asset-registries/LocaleData.js";
|
|
54
|
+
import { registerThemePropertiesLoader } from "./dist/asset-registries/Themes.js";
|
|
55
|
+
import { registerIconLoader } from "./dist/asset-registries/Icons.js";
|
|
56
|
+
|
|
57
|
+
// Boot.ts
|
|
58
|
+
import { attachBoot } from "./dist/Boot.js";
|
|
59
|
+
|
|
60
|
+
// CSP.ts
|
|
61
|
+
import {
|
|
62
|
+
setPackageCSSRoot,
|
|
63
|
+
setUseLinks,
|
|
64
|
+
setPreloadLinks,
|
|
65
|
+
} from "./dist/CSP.js";
|
|
66
|
+
|
|
67
|
+
// CustomElementsScope.ts
|
|
68
|
+
import {
|
|
69
|
+
setCustomElementsScopingSuffix,
|
|
70
|
+
getCustomElementsScopingSuffix,
|
|
71
|
+
setCustomElementsScopingRules,
|
|
72
|
+
getCustomElementsScopingRules,
|
|
73
|
+
getEffectiveScopingSuffixForTag,
|
|
74
|
+
} from "./dist/CustomElementsScope.js";
|
|
75
|
+
|
|
76
|
+
// Device.ts
|
|
77
|
+
import {
|
|
78
|
+
supportsTouch,
|
|
79
|
+
isIE,
|
|
80
|
+
isSafari,
|
|
81
|
+
isChrome,
|
|
82
|
+
isFirefox,
|
|
83
|
+
isPhone,
|
|
84
|
+
isTablet,
|
|
85
|
+
isDesktop,
|
|
86
|
+
isCombi,
|
|
87
|
+
isIOS,
|
|
88
|
+
isAndroid,
|
|
89
|
+
} from "./dist/Device.js";
|
|
90
|
+
|
|
91
|
+
// EventProvider.ts
|
|
92
|
+
import EventProvider from "./dist/EventProvider.js";
|
|
93
|
+
|
|
94
|
+
// i18nBundle.ts
|
|
95
|
+
import I18nBundle, { getI18nBundle, registerCustomI18nBundleGetter } from "./dist/i18nBundle.js";
|
|
96
|
+
|
|
97
|
+
// MediaRange.ts
|
|
98
|
+
import MediaRange from "./dist/MediaRange.js";
|
|
99
|
+
|
|
100
|
+
// PropertiesFileFormat.ts
|
|
101
|
+
import parseProperties from "./dist/PropertiesFileFormat.js";
|
|
102
|
+
|
|
103
|
+
// Render.ts
|
|
104
|
+
import {
|
|
105
|
+
renderDeferred,
|
|
106
|
+
renderImmediately,
|
|
107
|
+
cancelRender,
|
|
108
|
+
renderFinished,
|
|
109
|
+
} from "./dist/Render.js";
|
|
110
|
+
|
|
111
|
+
// Theming.ts
|
|
112
|
+
import { addCustomCSS, attachThemeLoaded, detachThemeLoaded } from "./dist/Theming.js";
|
|
113
|
+
|
|
114
|
+
// UI5Element.ts
|
|
1
115
|
import UI5Element from "./dist/UI5Element.js";
|
|
2
116
|
|
|
3
117
|
export default UI5Element;
|
|
4
|
-
export {
|
|
118
|
+
export {
|
|
119
|
+
// animations/
|
|
120
|
+
scroll,
|
|
121
|
+
slideDown,
|
|
122
|
+
slideUp,
|
|
123
|
+
|
|
124
|
+
// config/
|
|
125
|
+
getAnimationMode,
|
|
126
|
+
setAnimationMode,
|
|
127
|
+
getCalendarType,
|
|
128
|
+
getFirstDayOfWeek,
|
|
129
|
+
getLegacyDateCalendarCustomizing,
|
|
130
|
+
setDefaultIconCollection,
|
|
131
|
+
getDefaultIconCollection,
|
|
132
|
+
getEffectiveIconCollection,
|
|
133
|
+
RegisteredIconCollection,
|
|
134
|
+
getLanguage,
|
|
135
|
+
setLanguage,
|
|
136
|
+
getDefaultLanguage,
|
|
137
|
+
setFetchDefaultLanguage,
|
|
138
|
+
getFetchDefaultLanguage,
|
|
139
|
+
getNoConflict,
|
|
140
|
+
setNoConflict,
|
|
141
|
+
getRTL,
|
|
142
|
+
getTheme,
|
|
143
|
+
setTheme,
|
|
144
|
+
getDefaultTheme,
|
|
145
|
+
|
|
146
|
+
// decorators/
|
|
147
|
+
customElement,
|
|
148
|
+
event,
|
|
149
|
+
property,
|
|
150
|
+
slot,
|
|
151
|
+
|
|
152
|
+
// delegate/
|
|
153
|
+
ItemNavigation,
|
|
154
|
+
ResizeHandler,
|
|
155
|
+
ScrollEnablement,
|
|
156
|
+
|
|
157
|
+
// locale/
|
|
158
|
+
applyDirection,
|
|
159
|
+
attachDirectionChange,
|
|
160
|
+
detachDirectionChange,
|
|
161
|
+
getEffectiveDir,
|
|
162
|
+
attachLanguageChange,
|
|
163
|
+
detachLanguageChange,
|
|
164
|
+
|
|
165
|
+
// util/
|
|
166
|
+
URLListValidator,
|
|
167
|
+
sanitizeHTML,
|
|
168
|
+
|
|
169
|
+
// Assets.ts
|
|
170
|
+
registerI18nLoader,
|
|
171
|
+
registerLocaleDataLoader,
|
|
172
|
+
registerThemePropertiesLoader,
|
|
173
|
+
registerIconLoader,
|
|
174
|
+
|
|
175
|
+
// Boot.ts
|
|
176
|
+
attachBoot,
|
|
177
|
+
|
|
178
|
+
// CSP.ts
|
|
179
|
+
setPackageCSSRoot,
|
|
180
|
+
setUseLinks,
|
|
181
|
+
setPreloadLinks,
|
|
182
|
+
|
|
183
|
+
// CustomElementsScope.ts
|
|
184
|
+
setCustomElementsScopingSuffix,
|
|
185
|
+
getCustomElementsScopingSuffix,
|
|
186
|
+
setCustomElementsScopingRules,
|
|
187
|
+
getCustomElementsScopingRules,
|
|
188
|
+
getEffectiveScopingSuffixForTag,
|
|
189
|
+
|
|
190
|
+
// Device.ts
|
|
191
|
+
supportsTouch,
|
|
192
|
+
isIE,
|
|
193
|
+
isSafari,
|
|
194
|
+
isChrome,
|
|
195
|
+
isFirefox,
|
|
196
|
+
isPhone,
|
|
197
|
+
isTablet,
|
|
198
|
+
isDesktop,
|
|
199
|
+
isCombi,
|
|
200
|
+
isIOS,
|
|
201
|
+
isAndroid,
|
|
202
|
+
|
|
203
|
+
// EventProvider.ts
|
|
204
|
+
EventProvider,
|
|
205
|
+
|
|
206
|
+
// i18nBundle.ts
|
|
207
|
+
I18nBundle,
|
|
208
|
+
getI18nBundle,
|
|
209
|
+
registerCustomI18nBundleGetter,
|
|
210
|
+
|
|
211
|
+
// MediaRange.ts
|
|
212
|
+
MediaRange,
|
|
213
|
+
|
|
214
|
+
// PropertiesFileFormat.ts
|
|
215
|
+
parseProperties,
|
|
216
|
+
|
|
217
|
+
// Render.ts
|
|
218
|
+
renderDeferred,
|
|
219
|
+
renderImmediately,
|
|
220
|
+
cancelRender,
|
|
221
|
+
renderFinished,
|
|
222
|
+
|
|
223
|
+
// Theming.ts
|
|
224
|
+
addCustomCSS,
|
|
225
|
+
attachThemeLoaded,
|
|
226
|
+
detachThemeLoaded,
|
|
227
|
+
|
|
228
|
+
// UI5Element.ts
|
|
229
|
+
UI5Element,
|
|
230
|
+
};
|
|
@@ -1,15 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import fs from "fs/promises";
|
|
2
|
+
import assets from "@ui5/webcomponents-tools/assets-meta.js";
|
|
3
3
|
|
|
4
4
|
const fileContent = `const assetParameters = ${JSON.stringify(assets)};
|
|
5
5
|
|
|
6
6
|
const DEFAULT_THEME = assetParameters.themes.default;
|
|
7
|
+
const SUPPORTED_THEMES = assetParameters.themes.all;
|
|
7
8
|
const DEFAULT_LANGUAGE = assetParameters.languages.default;
|
|
8
9
|
const DEFAULT_LOCALE = assetParameters.locales.default;
|
|
9
10
|
const SUPPORTED_LOCALES = assetParameters.locales.all;
|
|
10
11
|
|
|
11
12
|
export {
|
|
12
13
|
DEFAULT_THEME,
|
|
14
|
+
SUPPORTED_THEMES,
|
|
13
15
|
DEFAULT_LANGUAGE,
|
|
14
16
|
DEFAULT_LOCALE,
|
|
15
17
|
SUPPORTED_LOCALES,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import fs from 'fs/promises';
|
|
2
|
+
import path from "path";
|
|
3
|
+
import CleanCSS from "clean-css";
|
|
4
4
|
|
|
5
5
|
const generate = async () => {
|
|
6
6
|
await fs.mkdir("src/generated/css/", {recursive: true});
|
|
@@ -40,7 +40,7 @@ const scripts = {
|
|
|
40
40
|
generateAssetParameters: `node "${assetParametersScript}"`,
|
|
41
41
|
generateVersionInfo: `node "${versionScript}"`,
|
|
42
42
|
generateStyles: `node "${stylesScript}"`,
|
|
43
|
-
generateTemplates: `mkdirp
|
|
43
|
+
generateTemplates: `mkdirp src/generated/templates && cross-env UI5_BASE=true UI5_TS=true node "${LIB}/hbs2ui5/index.js" -d test/elements -o src/generated/templates`,
|
|
44
44
|
generateAPI: {
|
|
45
45
|
default: "nps generateAPI.prepare generateAPI.preprocess generateAPI.jsdoc generateAPI.cleanup",
|
|
46
46
|
prepare: `copy-and-watch "dist/**/*.js" jsdoc-dist/`,
|
|
@@ -58,8 +58,9 @@ const scripts = {
|
|
|
58
58
|
},
|
|
59
59
|
start: "nps prepare watch.withBundle",
|
|
60
60
|
test: {
|
|
61
|
-
default: 'concurrently "nps test.wdio"',
|
|
61
|
+
default: 'concurrently "nps test.wdio" "nps test.ssr" "nps test.ssr2"',
|
|
62
62
|
ssr: `mocha test/ssr`,
|
|
63
|
+
ssr2: "node -e \"import('./dist/Device.js')\"",
|
|
63
64
|
wdio: `node "${LIB}/test-runner/test-runner.js"`
|
|
64
65
|
},
|
|
65
66
|
};
|