@ui5/webcomponents-base 1.21.1 → 1.22.0-rc.0
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 +8 -0
- package/LICENSE.txt +201 -0
- package/dist/.tsbuildinfo +1 -1
- package/dist/MediaRange.d.ts +0 -6
- package/dist/MediaRange.js +5 -15
- package/dist/MediaRange.js.map +1 -1
- package/dist/StaticAreaItem.d.ts +2 -4
- package/dist/StaticAreaItem.js +2 -4
- package/dist/StaticAreaItem.js.map +1 -1
- package/dist/UI5Element.d.ts +14 -25
- package/dist/UI5Element.js +11 -22
- package/dist/UI5Element.js.map +1 -1
- package/dist/UI5ElementMetadata.d.ts +3 -11
- package/dist/UI5ElementMetadata.js +1 -9
- package/dist/UI5ElementMetadata.js.map +1 -1
- package/dist/custom-elements.json +5152 -0
- package/dist/decorators/customElement.d.ts +1 -1
- package/dist/decorators/customElement.js +1 -1
- package/dist/decorators/customElement.js.map +1 -1
- package/dist/delegate/ItemNavigation.js.map +1 -1
- package/dist/delegate/ResizeHandler.d.ts +4 -6
- package/dist/delegate/ResizeHandler.js +4 -6
- package/dist/delegate/ResizeHandler.js.map +1 -1
- package/dist/generated/VersionInfo.js +1 -1
- package/dist/generated/VersionInfo.js.map +1 -1
- package/dist/i18nBundle.d.ts +1 -3
- package/dist/i18nBundle.js +1 -4
- package/dist/i18nBundle.js.map +1 -1
- package/dist/types/AnimationMode.d.ts +0 -8
- package/dist/types/AnimationMode.js +0 -8
- package/dist/types/AnimationMode.js.map +1 -1
- package/dist/types/CSSColor.d.ts +0 -4
- package/dist/types/CSSColor.js +0 -4
- package/dist/types/CSSColor.js.map +1 -1
- package/dist/types/CSSSize.d.ts +0 -4
- package/dist/types/CSSSize.js +0 -4
- package/dist/types/CSSSize.js.map +1 -1
- package/dist/types/CalendarType.d.ts +0 -9
- package/dist/types/CalendarType.js +0 -9
- package/dist/types/CalendarType.js.map +1 -1
- package/dist/types/DOMReference.d.ts +0 -4
- package/dist/types/DOMReference.js +0 -4
- package/dist/types/DOMReference.js.map +1 -1
- package/dist/types/DataType.d.ts +1 -6
- package/dist/types/DataType.js +1 -6
- package/dist/types/DataType.js.map +1 -1
- package/dist/types/Float.d.ts +0 -3
- package/dist/types/Float.js +0 -3
- package/dist/types/Float.js.map +1 -1
- package/dist/types/Integer.d.ts +0 -3
- package/dist/types/Integer.js +0 -3
- package/dist/types/Integer.js.map +1 -1
- package/dist/types/InvisibleMessageMode.d.ts +0 -6
- package/dist/types/InvisibleMessageMode.js +0 -6
- package/dist/types/InvisibleMessageMode.js.map +1 -1
- package/dist/types/ItemNavigationBehavior.d.ts +0 -6
- package/dist/types/ItemNavigationBehavior.js +0 -6
- package/dist/types/ItemNavigationBehavior.js.map +1 -1
- package/dist/types/NavigationMode.d.ts +0 -8
- package/dist/types/NavigationMode.js +0 -8
- package/dist/types/NavigationMode.js.map +1 -1
- package/dist/types/ValueState.d.ts +0 -14
- package/dist/types/ValueState.js +0 -14
- package/dist/types/ValueState.js.map +1 -1
- package/dist/util/getClassCopy.d.ts +2 -2
- package/package-scripts.cjs +3 -6
- package/package.json +4 -3
- package/dist/api.json +0 -1
package/dist/MediaRange.d.ts
CHANGED
|
@@ -2,8 +2,6 @@ type Range = Map<string, Array<number>>;
|
|
|
2
2
|
/**
|
|
3
3
|
* Enumeration containing the names and settings of predefined screen width media query range sets.
|
|
4
4
|
*
|
|
5
|
-
* @namespace
|
|
6
|
-
* @name MediaRange.RANGESETS
|
|
7
5
|
* @public
|
|
8
6
|
*/
|
|
9
7
|
declare enum RANGESETS {
|
|
@@ -18,16 +16,12 @@ declare enum RANGESETS {
|
|
|
18
16
|
* <li><code>"XL"</code>: For screens greater than or equal to 1440 pixels.</li>
|
|
19
17
|
* </ul>
|
|
20
18
|
*
|
|
21
|
-
* @name MediaRange.RANGESETS.RANGE_4STEPS
|
|
22
19
|
* @public
|
|
23
20
|
*/
|
|
24
21
|
RANGE_4STEPS = "4Step"
|
|
25
22
|
}
|
|
26
23
|
/**
|
|
27
24
|
* API for screen width changes.
|
|
28
|
-
*
|
|
29
|
-
* @namespace
|
|
30
|
-
* @name MediaRange
|
|
31
25
|
*/
|
|
32
26
|
declare const MediaRange: {
|
|
33
27
|
RANGESETS: typeof RANGESETS;
|
package/dist/MediaRange.js
CHANGED
|
@@ -7,8 +7,6 @@ DEAFULT_RANGE_SET.set("XL", [1440, Infinity]);
|
|
|
7
7
|
/**
|
|
8
8
|
* Enumeration containing the names and settings of predefined screen width media query range sets.
|
|
9
9
|
*
|
|
10
|
-
* @namespace
|
|
11
|
-
* @name MediaRange.RANGESETS
|
|
12
10
|
* @public
|
|
13
11
|
*/
|
|
14
12
|
var RANGESETS;
|
|
@@ -24,7 +22,6 @@ var RANGESETS;
|
|
|
24
22
|
* <li><code>"XL"</code>: For screens greater than or equal to 1440 pixels.</li>
|
|
25
23
|
* </ul>
|
|
26
24
|
*
|
|
27
|
-
* @name MediaRange.RANGESETS.RANGE_4STEPS
|
|
28
25
|
* @public
|
|
29
26
|
*/
|
|
30
27
|
RANGESETS["RANGE_4STEPS"] = "4Step";
|
|
@@ -45,10 +42,9 @@ var RANGESETS;
|
|
|
45
42
|
* <li><code>"Large"</code>: For screens greater than or equal to 400 pixels.</li>
|
|
46
43
|
* </ul>
|
|
47
44
|
*
|
|
48
|
-
* @param
|
|
45
|
+
* @param name The name of the range set to be initialized.
|
|
49
46
|
* The name must be a valid id and consist only of letters and numeric digits.
|
|
50
|
-
* @param
|
|
51
|
-
* @name MediaRange.initRangeSet
|
|
47
|
+
* @param range The given range set.
|
|
52
48
|
*/
|
|
53
49
|
const initRangeSet = (name, range) => {
|
|
54
50
|
mediaRanges.set(name, range);
|
|
@@ -59,13 +55,10 @@ const initRangeSet = (name, range) => {
|
|
|
59
55
|
* If the optional parameter <code>width</code> is given, the active range will be determined for that width,
|
|
60
56
|
* otherwise it is determined for the current window size.
|
|
61
57
|
*
|
|
62
|
-
* @param
|
|
63
|
-
* @param
|
|
58
|
+
* @param name The name of the range set. The range set must be initialized beforehand ({@link MediaRange.initRangeSet})
|
|
59
|
+
* @param [width] An optional width, based on which the range should be determined;
|
|
64
60
|
* If <code>width</code> is not provided, the window size will be used.
|
|
65
|
-
* @returns
|
|
66
|
-
*
|
|
67
|
-
* @name MediaRange.getCurrentRange
|
|
68
|
-
* @function
|
|
61
|
+
* @returns The name of the current active interval of the range set.
|
|
69
62
|
* @public
|
|
70
63
|
*/
|
|
71
64
|
const getCurrentRange = (name, width = window.innerWidth) => {
|
|
@@ -84,9 +77,6 @@ const getCurrentRange = (name, width = window.innerWidth) => {
|
|
|
84
77
|
};
|
|
85
78
|
/**
|
|
86
79
|
* API for screen width changes.
|
|
87
|
-
*
|
|
88
|
-
* @namespace
|
|
89
|
-
* @name MediaRange
|
|
90
80
|
*/
|
|
91
81
|
const MediaRange = {
|
|
92
82
|
RANGESETS,
|
package/dist/MediaRange.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MediaRange.js","sourceRoot":"","sources":["../src/MediaRange.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,GAAG,IAAI,GAAG,EAAiB,CAAC;AAE7C,MAAM,iBAAiB,GAAU,IAAI,GAAG,EAAyB,CAAC;AAClE,iBAAiB,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC;AACrC,iBAAiB,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC,CAAC;AACxC,iBAAiB,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC;AACzC,iBAAiB,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC;AAE9C
|
|
1
|
+
{"version":3,"file":"MediaRange.js","sourceRoot":"","sources":["../src/MediaRange.ts"],"names":[],"mappings":"AAEA,MAAM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AC,CAAC,IAAI,cAAc,IAAI,KAAK,CAAC,CAAC,CAAC,EAAE;YAC7D,gBAAgB,GAAG,GAAG,CAAC;SACvB;IACF,CAAC,CAAC,CAAC;IAEH,OAAO,gBAAgB,IAAI,CAAC,GAAG,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;AACpD,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,UAAU,GAAG;IAClB,SAAS;IACT,YAAY;IACZ,eAAe;CACf,CAAC;AAEF,UAAU,CAAC,YAAY,CAAC,UAAU,CAAC,SAAS,CAAC,YAAY,EAAE,iBAAiB,CAAC,CAAC;AAE9E,eAAe,UAAU,CAAC","sourcesContent":["type Range = Map<string, Array<number>>;\n\nconst mediaRanges = new Map<string, Range>();\n\nconst DEAFULT_RANGE_SET: Range = new Map<string, Array<number>>();\nDEAFULT_RANGE_SET.set(\"S\", [0, 599]);\nDEAFULT_RANGE_SET.set(\"M\", [600, 1023]);\nDEAFULT_RANGE_SET.set(\"L\", [1024, 1439]);\nDEAFULT_RANGE_SET.set(\"XL\", [1440, Infinity]);\n\n/**\n * Enumeration containing the names and settings of predefined screen width media query range sets.\n *\n * @public\n */\n enum RANGESETS {\n\t/**\n\t * A 4-step range set (S-M-L-XL).\n\t *\n\t * The ranges of this set are:\n\t * <ul>\n\t * <li><code>\"S\"</code>: For screens smaller than 600 pixels.</li>\n\t * <li><code>\"M\"</code>: For screens greater than or equal to 600 pixels and smaller than 1024 pixels.</li>\n\t * <li><code>\"L\"</code>: For screens greater than or equal to 1024 pixels and smaller than 1440 pixels.</li>\n\t * <li><code>\"XL\"</code>: For screens greater than or equal to 1440 pixels.</li>\n\t * </ul>\n\t *\n\t * @public\n\t */\n\tRANGE_4STEPS = \"4Step\",\n}\n\n/**\n * Initializes a screen width media query range set.\n *\n * This initialization step makes the range set ready to be used for one of the other functions in namespace <code>MediaRange</code>.\n *\n * A range set can be defined as shown in the following example:\n * <pre>\n * MediaRange.initRangeSet(\"MyRangeSet\", [200, 400], [\"Small\", \"Medium\", \"Large\"]);\n * </pre>\n * This example defines the following named ranges:\n * <ul>\n * <li><code>\"Small\"</code>: For screens smaller than 200 pixels.</li>\n * <li><code>\"Medium\"</code>: For screens greater than or equal to 200 pixels and smaller than 400 pixels.</li>\n * <li><code>\"Large\"</code>: For screens greater than or equal to 400 pixels.</li>\n * </ul>\n *\n * @param name The name of the range set to be initialized.\n * The name must be a valid id and consist only of letters and numeric digits.\n * @param range The given range set.\n */\nconst initRangeSet = (name: string, range: Range) => {\n\tmediaRanges.set(name, range);\n};\n\n/**\n * Returns information about the current active range of the range set with the given name.\n *\n * If the optional parameter <code>width</code> is given, the active range will be determined for that width,\n * otherwise it is determined for the current window size.\n *\n * @param name The name of the range set. The range set must be initialized beforehand ({@link MediaRange.initRangeSet})\n * @param [width] An optional width, based on which the range should be determined;\n * If <code>width</code> is not provided, the window size will be used.\n * @returns The name of the current active interval of the range set.\n * @public\n */\nconst getCurrentRange = (name: string, width = window.innerWidth): string => {\n\tlet rangeSet = mediaRanges.get(name);\n\n\tif (!rangeSet) {\n\t\trangeSet = mediaRanges.get(RANGESETS.RANGE_4STEPS)!;\n\t}\n\n\tlet currentRangeName;\n\tconst effectiveWidth = Math.floor(width);\n\n\trangeSet.forEach((value, key) => {\n\t\tif (effectiveWidth >= value[0] && effectiveWidth <= value[1]) {\n\t\t\tcurrentRangeName = key;\n\t\t}\n\t});\n\n\treturn currentRangeName || [...rangeSet.keys()][0];\n};\n\n/**\n * API for screen width changes.\n */\nconst MediaRange = {\n\tRANGESETS,\n\tinitRangeSet,\n\tgetCurrentRange,\n};\n\nMediaRange.initRangeSet(MediaRange.RANGESETS.RANGE_4STEPS, DEAFULT_RANGE_SET);\n\nexport default MediaRange;\n"]}
|
package/dist/StaticAreaItem.d.ts
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import "./StaticArea.js";
|
|
2
2
|
import type UI5Element from "./UI5Element.js";
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
5
4
|
* @class
|
|
6
|
-
* @author SAP SE
|
|
7
5
|
* @private
|
|
8
6
|
*/
|
|
9
7
|
declare class StaticAreaItem extends HTMLElement {
|
|
@@ -11,7 +9,7 @@ declare class StaticAreaItem extends HTMLElement {
|
|
|
11
9
|
ownerElement?: UI5Element;
|
|
12
10
|
constructor();
|
|
13
11
|
/**
|
|
14
|
-
* @param
|
|
12
|
+
* @param ownerElement the UI5Element instance that owns this static area item
|
|
15
13
|
*/
|
|
16
14
|
setOwnerElement(ownerElement: UI5Element): void;
|
|
17
15
|
/**
|
|
@@ -27,8 +25,8 @@ declare class StaticAreaItem extends HTMLElement {
|
|
|
27
25
|
_updateDirection(): void;
|
|
28
26
|
_updateAdditionalAttrs(): void;
|
|
29
27
|
/**
|
|
30
|
-
* @protected
|
|
31
28
|
* Returns reference to the DOM element where the current fragment is added.
|
|
29
|
+
* @protected
|
|
32
30
|
*/
|
|
33
31
|
getDomRef(): Promise<ShadowRoot | null>;
|
|
34
32
|
static getTag(): string;
|
package/dist/StaticAreaItem.js
CHANGED
|
@@ -7,9 +7,7 @@ import getEffectiveDir from "./locale/getEffectiveDir.js";
|
|
|
7
7
|
const pureTagName = "ui5-static-area-item";
|
|
8
8
|
const popupIntegrationAttr = "data-sap-ui-integration-popup-content";
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
11
10
|
* @class
|
|
12
|
-
* @author SAP SE
|
|
13
11
|
* @private
|
|
14
12
|
*/
|
|
15
13
|
class StaticAreaItem extends HTMLElement {
|
|
@@ -19,7 +17,7 @@ class StaticAreaItem extends HTMLElement {
|
|
|
19
17
|
this.attachShadow({ mode: "open" });
|
|
20
18
|
}
|
|
21
19
|
/**
|
|
22
|
-
* @param
|
|
20
|
+
* @param ownerElement the UI5Element instance that owns this static area item
|
|
23
21
|
*/
|
|
24
22
|
setOwnerElement(ownerElement) {
|
|
25
23
|
this.ownerElement = ownerElement;
|
|
@@ -72,8 +70,8 @@ class StaticAreaItem extends HTMLElement {
|
|
|
72
70
|
this.setAttribute(popupIntegrationAttr, "");
|
|
73
71
|
}
|
|
74
72
|
/**
|
|
75
|
-
* @protected
|
|
76
73
|
* Returns reference to the DOM element where the current fragment is added.
|
|
74
|
+
* @protected
|
|
77
75
|
*/
|
|
78
76
|
async getDomRef() {
|
|
79
77
|
this.updateAdditionalProperties();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StaticAreaItem.js","sourceRoot":"","sources":["../src/StaticAreaItem.ts"],"names":[],"mappings":"AAAA,OAAO,iBAAiB,CAAC;AACzB,OAAO,gBAAgB,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,0BAA0B,MAAM,sCAAsC,CAAC;AAC9E,OAAO,EAAE,+BAA+B,EAAE,MAAM,+BAA+B,CAAC;AAChF,OAAO,eAAe,MAAM,6BAA6B,CAAC;AAG1D,MAAM,WAAW,GAAG,sBAAsB,CAAC;AAC3C,MAAM,oBAAoB,GAAG,uCAAuC,CAAC;AAErE
|
|
1
|
+
{"version":3,"file":"StaticAreaItem.js","sourceRoot":"","sources":["../src/StaticAreaItem.ts"],"names":[],"mappings":"AAAA,OAAO,iBAAiB,CAAC;AACzB,OAAO,gBAAgB,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,0BAA0B,MAAM,sCAAsC,CAAC;AAC9E,OAAO,EAAE,+BAA+B,EAAE,MAAM,+BAA+B,CAAC;AAChF,OAAO,eAAe,MAAM,6BAA6B,CAAC;AAG1D,MAAM,WAAW,GAAG,sBAAsB,CAAC;AAC3C,MAAM,oBAAoB,GAAG,uCAAuC,CAAC;AAErE;;;GAGG;AACH,MAAM,cAAe,SAAQ,WAAW;IAIvC;QACC,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;QACvB,IAAI,CAAC,YAAY,CAAC,E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render.js\";\nimport getEffectiveContentDensity from \"./util/getEffectiveContentDensity.js\";\nimport { getEffectiveScopingSuffixForTag } from \"./CustomElementsScopeUtils.js\";\nimport getEffectiveDir from \"./locale/getEffectiveDir.js\";\nimport type UI5Element from \"./UI5Element.js\";\n\nconst pureTagName = \"ui5-static-area-item\";\nconst popupIntegrationAttr = \"data-sap-ui-integration-popup-content\";\n\n/**\n * @class\n * @private\n */\nclass StaticAreaItem extends HTMLElement {\n\t_rendered: boolean;\n\townerElement?: UI5Element;\n\n\tconstructor() {\n\t\tsuper();\n\t\tthis._rendered = false;\n\t\tthis.attachShadow({ mode: \"open\" });\n\t}\n\n\t/**\n\t * @param ownerElement the UI5Element instance that owns this static area item\n\t */\n\tsetOwnerElement(ownerElement: UI5Element) {\n\t\tthis.ownerElement = ownerElement;\n\t\tthis.classList.add(this.ownerElement._id); // used for getting the popover in the tests\n\t\tif (this.ownerElement.hasAttribute(\"data-ui5-static-stable\")) {\n\t\t\tthis.setAttribute(\"data-ui5-stable\", this.ownerElement.getAttribute(\"data-ui5-static-stable\")!); // stable selector\n\t\t}\n\t}\n\n\t/**\n\t * Updates the shadow root of the static area item with the latest state, if rendered\n\t */\n\tupdate() {\n\t\tif (this._rendered) {\n\t\t\tthis.updateAdditionalProperties();\n\t\t\tupdateShadowRoot(this.ownerElement!, true);\n\t\t}\n\t}\n\n\tupdateAdditionalProperties() {\n\t\tthis._updateAdditionalAttrs();\n\t\tthis._updateContentDensity();\n\t\tthis._updateDirection();\n\t}\n\n\t/**\n\t * Sets the correct content density based on the owner element's state\n\t * @private\n\t */\n\t_updateContentDensity() {\n\t\tif (getEffectiveContentDensity(this.ownerElement!) === \"compact\") {\n\t\t\tthis.classList.add(\"sapUiSizeCompact\");\n\t\t\tthis.classList.add(\"ui5-content-density-compact\");\n\t\t} else {\n\t\t\tthis.classList.remove(\"sapUiSizeCompact\");\n\t\t\tthis.classList.remove(\"ui5-content-density-compact\");\n\t\t}\n\t}\n\n\t_updateDirection() {\n\t\tif (this.ownerElement) {\n\t\t\tconst dir = getEffectiveDir(this.ownerElement);\n\t\t\tif (dir) {\n\t\t\t\tthis.setAttribute(\"dir\", dir);\n\t\t\t} else {\n\t\t\t\tthis.removeAttribute(\"dir\");\n\t\t\t}\n\t\t}\n\t}\n\n\t_updateAdditionalAttrs() {\n\t\tthis.setAttribute(pureTagName, \"\");\n\t\tthis.setAttribute(popupIntegrationAttr, \"\");\n\t}\n\n\t/**\n\t * Returns reference to the DOM element where the current fragment is added.\n\t * @protected\n\t */\n\tasync getDomRef() {\n\t\tthis.updateAdditionalProperties();\n\t\tif (!this._rendered) {\n\t\t\tthis._rendered = true;\n\t\t\tupdateShadowRoot(this.ownerElement!, true);\n\t\t}\n\t\tawait renderFinished(); // Wait for the content of the ui5-static-area-item to be rendered\n\t\treturn this.shadowRoot;\n\t}\n\n\tstatic getTag() {\n\t\tconst suffix = getEffectiveScopingSuffixForTag(pureTagName);\n\t\tif (!suffix) {\n\t\t\treturn pureTagName;\n\t\t}\n\n\t\treturn `${pureTagName}-${suffix}`;\n\t}\n\n\tstatic createInstance() {\n\t\tif (!customElements.get(StaticAreaItem.getTag())) {\n\t\t\tcustomElements.define(StaticAreaItem.getTag(), StaticAreaItem);\n\t\t}\n\n\t\treturn document.createElement(this.getTag()) as StaticAreaItem;\n\t}\n}\n\nexport default StaticAreaItem;\n"]}
|
package/dist/UI5Element.d.ts
CHANGED
|
@@ -26,12 +26,9 @@ type InvalidationInfo = ChangeInfo & {
|
|
|
26
26
|
type ChildChangeListener = (param: InvalidationInfo) => void;
|
|
27
27
|
type SlotChangeListener = (this: HTMLSlotElement, ev: Event) => void;
|
|
28
28
|
/**
|
|
29
|
+
* @class
|
|
29
30
|
* Base class for all UI5 Web Components
|
|
30
31
|
*
|
|
31
|
-
* @class
|
|
32
|
-
* @constructor
|
|
33
|
-
* @author SAP SE
|
|
34
|
-
* @alias sap.ui.webc.base.UI5Element
|
|
35
32
|
* @extends HTMLElement
|
|
36
33
|
* @public
|
|
37
34
|
*/
|
|
@@ -125,22 +122,22 @@ declare abstract class UI5Element extends HTMLElement {
|
|
|
125
122
|
/**
|
|
126
123
|
* Attach a callback that will be executed whenever the component is invalidated
|
|
127
124
|
*
|
|
128
|
-
* @param
|
|
125
|
+
* @param callback
|
|
129
126
|
* @public
|
|
130
127
|
*/
|
|
131
128
|
attachInvalidate(callback: (param: InvalidationInfo) => void): void;
|
|
132
129
|
/**
|
|
133
130
|
* Detach the callback that is executed whenever the component is invalidated
|
|
134
131
|
*
|
|
135
|
-
* @param
|
|
132
|
+
* @param callback
|
|
136
133
|
* @public
|
|
137
134
|
*/
|
|
138
135
|
detachInvalidate(callback: (param: InvalidationInfo) => void): void;
|
|
139
136
|
/**
|
|
140
137
|
* Callback that is executed whenever a monitored child changes its state
|
|
141
138
|
*
|
|
142
|
-
* @param
|
|
143
|
-
* @param
|
|
139
|
+
* @param slotName the slot in which a child was invalidated
|
|
140
|
+
* @param childChangeInfo the changeInfo object for the child in the given slot
|
|
144
141
|
* @private
|
|
145
142
|
*/
|
|
146
143
|
_onChildChange(slotName: string, childChangeInfo: ChangeInfo): void;
|
|
@@ -165,15 +162,13 @@ declare abstract class UI5Element extends HTMLElement {
|
|
|
165
162
|
* Returns a singleton event listener for the "change" event of a child in a given slot
|
|
166
163
|
*
|
|
167
164
|
* @param slotName the name of the slot, where the child is
|
|
168
|
-
* @returns {ChildChangeListener}
|
|
169
165
|
* @private
|
|
170
166
|
*/
|
|
171
|
-
_getChildChangeListener(slotName: string): ChildChangeListener
|
|
167
|
+
_getChildChangeListener(slotName: string): ChildChangeListener;
|
|
172
168
|
/**
|
|
173
169
|
* Returns a singleton slotchange event listener that invalidates the component due to changes in the given slot
|
|
174
170
|
*
|
|
175
171
|
* @param slotName the name of the slot, where the slot element (whose slotchange event we're listening to) is
|
|
176
|
-
* @returns {SlotChangeListener}
|
|
177
172
|
* @private
|
|
178
173
|
*/
|
|
179
174
|
_getSlotChangeListener(slotName: string): SlotChangeListener;
|
|
@@ -257,7 +252,7 @@ declare abstract class UI5Element extends HTMLElement {
|
|
|
257
252
|
getFocusDomRefAsync(): Promise<HTMLElement | undefined>;
|
|
258
253
|
/**
|
|
259
254
|
* Set the focus to the element, returned by "getFocusDomRef()" (marked by "data-sap-focus-ref")
|
|
260
|
-
* @param
|
|
255
|
+
* @param focusOptions additional options for the focus
|
|
261
256
|
* @public
|
|
262
257
|
*/
|
|
263
258
|
focus(focusOptions?: FocusOptions): Promise<void>;
|
|
@@ -268,7 +263,7 @@ declare abstract class UI5Element extends HTMLElement {
|
|
|
268
263
|
* @param data - additional data for the event
|
|
269
264
|
* @param cancelable - true, if the user can call preventDefault on the event object
|
|
270
265
|
* @param bubbles - true, if the event bubbles
|
|
271
|
-
* @returns
|
|
266
|
+
* @returns false, if the event was cancelled (preventDefault called), true otherwise
|
|
272
267
|
*/
|
|
273
268
|
fireEvent<T>(name: string, data?: T, cancelable?: boolean, bubbles?: boolean): boolean;
|
|
274
269
|
_fireEvent<T>(name: string, data?: T, cancelable?: boolean, bubbles?: boolean): boolean;
|
|
@@ -277,18 +272,18 @@ declare abstract class UI5Element extends HTMLElement {
|
|
|
277
272
|
* 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.
|
|
278
273
|
* @public
|
|
279
274
|
*/
|
|
280
|
-
getSlottedNodes<T = Node>(slotName: string): T
|
|
275
|
+
getSlottedNodes<T = Node>(slotName: string): Array<T>;
|
|
281
276
|
/**
|
|
282
277
|
* Attach a callback that will be executed whenever the component's state is finalized
|
|
283
278
|
*
|
|
284
|
-
* @param
|
|
279
|
+
* @param callback
|
|
285
280
|
* @public
|
|
286
281
|
*/
|
|
287
282
|
attachComponentStateFinalized(callback: () => void): void;
|
|
288
283
|
/**
|
|
289
284
|
* Detach the callback that is executed whenever the component's state is finalized
|
|
290
285
|
*
|
|
291
|
-
* @param
|
|
286
|
+
* @param callback
|
|
292
287
|
* @public
|
|
293
288
|
*/
|
|
294
289
|
detachComponentStateFinalized(callback: () => void): void;
|
|
@@ -297,13 +292,13 @@ declare abstract class UI5Element extends HTMLElement {
|
|
|
297
292
|
* Returns: "rtl", "ltr" or undefined
|
|
298
293
|
*
|
|
299
294
|
* @public
|
|
300
|
-
* @
|
|
295
|
+
* @default undefined
|
|
301
296
|
*/
|
|
302
297
|
get effectiveDir(): string | undefined;
|
|
303
298
|
/**
|
|
304
299
|
* Used to duck-type UI5 elements without using instanceof
|
|
305
|
-
* @returns {boolean}
|
|
306
300
|
* @public
|
|
301
|
+
* @default true
|
|
307
302
|
*/
|
|
308
303
|
get isUI5Element(): boolean;
|
|
309
304
|
get classes(): ClassMap;
|
|
@@ -356,37 +351,31 @@ declare abstract class UI5Element extends HTMLElement {
|
|
|
356
351
|
*
|
|
357
352
|
* @public
|
|
358
353
|
*/
|
|
359
|
-
static getUniqueDependencies(this: typeof UI5Element):
|
|
354
|
+
static getUniqueDependencies(this: typeof UI5Element): Array<typeof UI5Element>;
|
|
360
355
|
/**
|
|
361
356
|
* Returns a promise that resolves whenever all dependencies for this UI5 Web Component have resolved
|
|
362
|
-
*
|
|
363
|
-
* @returns {Promise}
|
|
364
357
|
*/
|
|
365
358
|
static whenDependenciesDefined(): Promise<Array<typeof UI5Element>>;
|
|
366
359
|
/**
|
|
367
360
|
* Hook that will be called upon custom element definition
|
|
368
361
|
*
|
|
369
362
|
* @protected
|
|
370
|
-
* @returns {Promise<void>}
|
|
371
363
|
*/
|
|
372
364
|
static onDefine(): Promise<void>;
|
|
373
365
|
/**
|
|
374
366
|
* Registers a UI5 Web Component in the browser window object
|
|
375
367
|
* @public
|
|
376
|
-
* @returns {Promise<UI5Element>}
|
|
377
368
|
*/
|
|
378
369
|
static define(): Promise<typeof UI5Element>;
|
|
379
370
|
/**
|
|
380
371
|
* Returns an instance of UI5ElementMetadata.js representing this UI5 Web Component's full metadata (its and its parents')
|
|
381
372
|
* Note: not to be confused with the "get metadata()" method, which returns an object for this class's metadata only
|
|
382
373
|
* @public
|
|
383
|
-
* @returns {UI5ElementMetadata}
|
|
384
374
|
*/
|
|
385
375
|
static getMetadata(): UI5ElementMetadata;
|
|
386
376
|
}
|
|
387
377
|
/**
|
|
388
378
|
* Always use duck-typing to cover all runtimes on the page.
|
|
389
|
-
* @returns {boolean}
|
|
390
379
|
*/
|
|
391
380
|
declare const instanceOfUI5Element: (object: any) => object is UI5Element;
|
|
392
381
|
export default UI5Element;
|
package/dist/UI5Element.js
CHANGED
|
@@ -39,12 +39,9 @@ function _invalidate(changeInfo) {
|
|
|
39
39
|
this._invalidationEventProvider.fireEvent("invalidate", { ...changeInfo, target: this });
|
|
40
40
|
}
|
|
41
41
|
/**
|
|
42
|
+
* @class
|
|
42
43
|
* Base class for all UI5 Web Components
|
|
43
44
|
*
|
|
44
|
-
* @class
|
|
45
|
-
* @constructor
|
|
46
|
-
* @author SAP SE
|
|
47
|
-
* @alias sap.ui.webc.base.UI5Element
|
|
48
45
|
* @extends HTMLElement
|
|
49
46
|
* @public
|
|
50
47
|
*/
|
|
@@ -319,7 +316,7 @@ class UI5Element extends HTMLElement {
|
|
|
319
316
|
/**
|
|
320
317
|
* Attach a callback that will be executed whenever the component is invalidated
|
|
321
318
|
*
|
|
322
|
-
* @param
|
|
319
|
+
* @param callback
|
|
323
320
|
* @public
|
|
324
321
|
*/
|
|
325
322
|
attachInvalidate(callback) {
|
|
@@ -328,7 +325,7 @@ class UI5Element extends HTMLElement {
|
|
|
328
325
|
/**
|
|
329
326
|
* Detach the callback that is executed whenever the component is invalidated
|
|
330
327
|
*
|
|
331
|
-
* @param
|
|
328
|
+
* @param callback
|
|
332
329
|
* @public
|
|
333
330
|
*/
|
|
334
331
|
detachInvalidate(callback) {
|
|
@@ -337,8 +334,8 @@ class UI5Element extends HTMLElement {
|
|
|
337
334
|
/**
|
|
338
335
|
* Callback that is executed whenever a monitored child changes its state
|
|
339
336
|
*
|
|
340
|
-
* @param
|
|
341
|
-
* @param
|
|
337
|
+
* @param slotName the slot in which a child was invalidated
|
|
338
|
+
* @param childChangeInfo the changeInfo object for the child in the given slot
|
|
342
339
|
* @private
|
|
343
340
|
*/
|
|
344
341
|
_onChildChange(slotName, childChangeInfo) {
|
|
@@ -448,7 +445,6 @@ class UI5Element extends HTMLElement {
|
|
|
448
445
|
* Returns a singleton event listener for the "change" event of a child in a given slot
|
|
449
446
|
*
|
|
450
447
|
* @param slotName the name of the slot, where the child is
|
|
451
|
-
* @returns {ChildChangeListener}
|
|
452
448
|
* @private
|
|
453
449
|
*/
|
|
454
450
|
_getChildChangeListener(slotName) {
|
|
@@ -461,7 +457,6 @@ class UI5Element extends HTMLElement {
|
|
|
461
457
|
* Returns a singleton slotchange event listener that invalidates the component due to changes in the given slot
|
|
462
458
|
*
|
|
463
459
|
* @param slotName the name of the slot, where the slot element (whose slotchange event we're listening to) is
|
|
464
|
-
* @returns {SlotChangeListener}
|
|
465
460
|
* @private
|
|
466
461
|
*/
|
|
467
462
|
_getSlotChangeListener(slotName) {
|
|
@@ -637,7 +632,7 @@ class UI5Element extends HTMLElement {
|
|
|
637
632
|
}
|
|
638
633
|
/**
|
|
639
634
|
* Set the focus to the element, returned by "getFocusDomRef()" (marked by "data-sap-focus-ref")
|
|
640
|
-
* @param
|
|
635
|
+
* @param focusOptions additional options for the focus
|
|
641
636
|
* @public
|
|
642
637
|
*/
|
|
643
638
|
async focus(focusOptions) {
|
|
@@ -654,7 +649,7 @@ class UI5Element extends HTMLElement {
|
|
|
654
649
|
* @param data - additional data for the event
|
|
655
650
|
* @param cancelable - true, if the user can call preventDefault on the event object
|
|
656
651
|
* @param bubbles - true, if the event bubbles
|
|
657
|
-
* @returns
|
|
652
|
+
* @returns false, if the event was cancelled (preventDefault called), true otherwise
|
|
658
653
|
*/
|
|
659
654
|
fireEvent(name, data, cancelable = false, bubbles = true) {
|
|
660
655
|
const eventResult = this._fireEvent(name, data, cancelable, bubbles);
|
|
@@ -698,7 +693,7 @@ class UI5Element extends HTMLElement {
|
|
|
698
693
|
/**
|
|
699
694
|
* Attach a callback that will be executed whenever the component's state is finalized
|
|
700
695
|
*
|
|
701
|
-
* @param
|
|
696
|
+
* @param callback
|
|
702
697
|
* @public
|
|
703
698
|
*/
|
|
704
699
|
attachComponentStateFinalized(callback) {
|
|
@@ -707,7 +702,7 @@ class UI5Element extends HTMLElement {
|
|
|
707
702
|
/**
|
|
708
703
|
* Detach the callback that is executed whenever the component's state is finalized
|
|
709
704
|
*
|
|
710
|
-
* @param
|
|
705
|
+
* @param callback
|
|
711
706
|
* @public
|
|
712
707
|
*/
|
|
713
708
|
detachComponentStateFinalized(callback) {
|
|
@@ -718,7 +713,7 @@ class UI5Element extends HTMLElement {
|
|
|
718
713
|
* Returns: "rtl", "ltr" or undefined
|
|
719
714
|
*
|
|
720
715
|
* @public
|
|
721
|
-
* @
|
|
716
|
+
* @default undefined
|
|
722
717
|
*/
|
|
723
718
|
get effectiveDir() {
|
|
724
719
|
markAsRtlAware(this.constructor); // if a UI5 Element calls this method, it's considered to be rtl-aware
|
|
@@ -726,8 +721,8 @@ class UI5Element extends HTMLElement {
|
|
|
726
721
|
}
|
|
727
722
|
/**
|
|
728
723
|
* Used to duck-type UI5 elements without using instanceof
|
|
729
|
-
* @returns {boolean}
|
|
730
724
|
* @public
|
|
725
|
+
* @default true
|
|
731
726
|
*/
|
|
732
727
|
get isUI5Element() {
|
|
733
728
|
return true;
|
|
@@ -906,8 +901,6 @@ class UI5Element extends HTMLElement {
|
|
|
906
901
|
}
|
|
907
902
|
/**
|
|
908
903
|
* Returns a promise that resolves whenever all dependencies for this UI5 Web Component have resolved
|
|
909
|
-
*
|
|
910
|
-
* @returns {Promise}
|
|
911
904
|
*/
|
|
912
905
|
static whenDependenciesDefined() {
|
|
913
906
|
return Promise.all(this.getUniqueDependencies().map(dep => dep.define()));
|
|
@@ -916,7 +909,6 @@ class UI5Element extends HTMLElement {
|
|
|
916
909
|
* Hook that will be called upon custom element definition
|
|
917
910
|
*
|
|
918
911
|
* @protected
|
|
919
|
-
* @returns {Promise<void>}
|
|
920
912
|
*/
|
|
921
913
|
static async onDefine() {
|
|
922
914
|
return Promise.resolve();
|
|
@@ -924,7 +916,6 @@ class UI5Element extends HTMLElement {
|
|
|
924
916
|
/**
|
|
925
917
|
* Registers a UI5 Web Component in the browser window object
|
|
926
918
|
* @public
|
|
927
|
-
* @returns {Promise<UI5Element>}
|
|
928
919
|
*/
|
|
929
920
|
static async define() {
|
|
930
921
|
await boot();
|
|
@@ -950,7 +941,6 @@ class UI5Element extends HTMLElement {
|
|
|
950
941
|
* Returns an instance of UI5ElementMetadata.js representing this UI5 Web Component's full metadata (its and its parents')
|
|
951
942
|
* Note: not to be confused with the "get metadata()" method, which returns an object for this class's metadata only
|
|
952
943
|
* @public
|
|
953
|
-
* @returns {UI5ElementMetadata}
|
|
954
944
|
*/
|
|
955
945
|
static getMetadata() {
|
|
956
946
|
if (this.hasOwnProperty("_metadata")) { // eslint-disable-line
|
|
@@ -974,7 +964,6 @@ class UI5Element extends HTMLElement {
|
|
|
974
964
|
UI5Element.metadata = {};
|
|
975
965
|
/**
|
|
976
966
|
* Always use duck-typing to cover all runtimes on the page.
|
|
977
|
-
* @returns {boolean}
|
|
978
967
|
*/
|
|
979
968
|
const instanceOfUI5Element = (object) => {
|
|
980
969
|
return "isUI5Element" in object;
|