@ui5/webcomponents-base 0.0.0-7b7921cd9 → 0.0.0-7c7170d4a
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 +1055 -0
- package/README.md +2 -9
- package/config/wdio.conf.cjs +0 -8
- package/dist/.tsbuildinfo +1 -0
- package/dist/AssetRegistry.d.ts +2 -2
- package/dist/AssetRegistry.js +2 -2
- package/dist/AssetRegistry.js.map +1 -1
- package/dist/Boot.d.ts +3 -2
- package/dist/Boot.js +8 -6
- package/dist/Boot.js.map +1 -1
- package/dist/CustomElementsScope.d.ts +4 -4
- package/dist/CustomElementsScope.js +2 -2
- package/dist/CustomElementsScope.js.map +1 -1
- package/dist/CustomElementsScopeUtils.d.ts +8 -1
- package/dist/CustomElementsScopeUtils.js +13 -1
- package/dist/CustomElementsScopeUtils.js.map +1 -1
- package/dist/Device.d.ts +2 -2
- package/dist/Device.js +14 -12
- package/dist/Device.js.map +1 -1
- package/dist/FontFace.js +1 -1
- package/dist/FontFace.js.map +1 -1
- package/dist/IgnoreCustomElements.d.ts +3 -5
- package/dist/IgnoreCustomElements.js +3 -5
- package/dist/IgnoreCustomElements.js.map +1 -1
- package/dist/InitialConfiguration.d.ts +2 -2
- package/dist/InitialConfiguration.js +7 -6
- package/dist/InitialConfiguration.js.map +1 -1
- package/dist/Keys.d.ts +7 -1
- package/dist/Keys.js +113 -106
- package/dist/Keys.js.map +1 -1
- package/dist/ManagedStyles.d.ts +5 -4
- package/dist/ManagedStyles.js +55 -60
- package/dist/ManagedStyles.js.map +1 -1
- package/dist/MediaRange.d.ts +6 -12
- package/dist/MediaRange.js +21 -31
- package/dist/MediaRange.js.map +1 -1
- package/dist/UI5Element.d.ts +48 -53
- package/dist/UI5Element.js +150 -101
- package/dist/UI5Element.js.map +1 -1
- package/dist/UI5ElementMetadata.d.ts +13 -13
- package/dist/UI5ElementMetadata.js +26 -15
- package/dist/UI5ElementMetadata.js.map +1 -1
- package/dist/asset-registries/Icons.d.ts +4 -3
- package/dist/asset-registries/Icons.js +28 -17
- package/dist/asset-registries/Icons.js.map +1 -1
- package/dist/asset-registries/Illustrations.d.ts +2 -0
- package/dist/asset-registries/Illustrations.js +51 -20
- package/dist/asset-registries/Illustrations.js.map +1 -1
- package/dist/asset-registries/LocaleData.js +1 -1
- package/dist/asset-registries/LocaleData.js.map +1 -1
- package/dist/asset-registries/Themes.d.ts +4 -3
- package/dist/asset-registries/Themes.js +26 -10
- package/dist/asset-registries/Themes.js.map +1 -1
- package/dist/asset-registries/i18n.d.ts +2 -2
- package/dist/asset-registries/i18n.js +4 -3
- package/dist/asset-registries/i18n.js.map +1 -1
- package/dist/{assets-meta → asset-registries/util}/IconCollectionsAlias.d.ts +1 -2
- package/dist/{assets-meta → asset-registries/util}/IconCollectionsAlias.js +1 -2
- package/dist/asset-registries/util/IconCollectionsAlias.js.map +1 -0
- package/dist/asset-registries/util/IconCollectionsByTheme.d.ts +20 -0
- package/dist/asset-registries/util/IconCollectionsByTheme.js +42 -0
- package/dist/asset-registries/util/IconCollectionsByTheme.js.map +1 -0
- package/dist/asset-registries/util/getIconCollectionByTheme.d.ts +13 -0
- package/dist/asset-registries/util/getIconCollectionByTheme.js +29 -0
- package/dist/asset-registries/util/getIconCollectionByTheme.js.map +1 -0
- package/dist/config/AnimationMode.js +2 -1
- package/dist/config/AnimationMode.js.map +1 -1
- package/dist/config/CalendarType.d.ts +8 -1
- package/dist/config/CalendarType.js +18 -2
- package/dist/config/CalendarType.js.map +1 -1
- package/dist/config/Icons.d.ts +9 -24
- package/dist/config/Icons.js +8 -67
- package/dist/config/Icons.js.map +1 -1
- package/dist/config/Language.d.ts +1 -1
- package/dist/config/Language.js +6 -3
- package/dist/config/Language.js.map +1 -1
- package/dist/config/Theme.d.ts +4 -3
- package/dist/config/Theme.js +13 -6
- package/dist/config/Theme.js.map +1 -1
- package/dist/config/ThemeRoot.d.ts +2 -4
- package/dist/config/ThemeRoot.js +2 -4
- package/dist/config/ThemeRoot.js.map +1 -1
- package/dist/config/Timezone.d.ts +1 -1
- package/dist/config/Timezone.js +1 -1
- package/dist/config/Timezone.js.map +1 -1
- package/dist/connectToComponent.d.ts +9 -0
- package/dist/connectToComponent.js +59 -0
- package/dist/connectToComponent.js.map +1 -0
- package/dist/css/FontFace.css +47 -17
- package/dist/css/SystemCSSVars.css +0 -8
- package/dist/decorators/customElement.d.ts +3 -3
- package/dist/decorators/customElement.js +11 -6
- package/dist/decorators/customElement.js.map +1 -1
- package/dist/decorators/event.d.ts +5 -2
- package/dist/decorators/event.js.map +1 -1
- package/dist/decorators.d.ts +5 -0
- package/dist/decorators.js +6 -0
- package/dist/decorators.js.map +1 -0
- package/dist/delegate/ItemNavigation.d.ts +9 -8
- package/dist/delegate/ItemNavigation.js +13 -14
- 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/delegate/ScrollEnablement.js +2 -2
- package/dist/delegate/ScrollEnablement.js.map +1 -1
- package/dist/features/InputElementsFormSupport.d.ts +18 -0
- package/dist/features/InputElementsFormSupport.js +40 -0
- package/dist/features/InputElementsFormSupport.js.map +1 -0
- package/dist/features/OpenUI5Enablement.d.ts +1 -1
- package/dist/features/OpenUI5Support.d.ts +13 -5
- package/dist/features/OpenUI5Support.js +87 -46
- package/dist/features/OpenUI5Support.js.map +1 -1
- package/dist/features/patchPatcher.d.ts +11 -0
- package/dist/features/patchPatcher.js +11 -0
- package/dist/features/patchPatcher.js.map +1 -0
- package/dist/features/patchPopup.d.ts +14 -0
- package/dist/features/patchPopup.js +50 -0
- package/dist/features/patchPopup.js.map +1 -0
- package/dist/generated/AssetParameters.d.ts +6 -0
- package/dist/generated/AssetParameters.js +3 -10
- package/dist/generated/AssetParameters.js.map +1 -0
- package/dist/generated/VersionInfo.d.ts +10 -0
- package/dist/generated/VersionInfo.js +9 -8
- package/dist/generated/VersionInfo.js.map +1 -0
- package/dist/generated/css/FontFace.css.js +1 -1
- package/dist/generated/css/FontFace.css.js.map +1 -1
- package/dist/generated/css/SystemCSSVars.css.js +1 -1
- package/dist/generated/css/SystemCSSVars.css.js.map +1 -1
- package/dist/generated/templates/elements/WithComplexTemplateTemplate.lit.d.ts +1 -1
- package/dist/i18nBundle.d.ts +2 -4
- package/dist/i18nBundle.js +1 -4
- package/dist/i18nBundle.js.map +1 -1
- package/dist/locale/applyDirection.d.ts +3 -2
- package/dist/locale/applyDirection.js +3 -2
- package/dist/locale/applyDirection.js.map +1 -1
- package/dist/locale/getEffectiveDir.d.ts +1 -1
- package/dist/locale/getEffectiveDir.js +3 -19
- package/dist/locale/getEffectiveDir.js.map +1 -1
- package/dist/locale/timezoneChange.d.ts +5 -0
- package/dist/renderer/LitRenderer.d.ts +2 -2
- package/dist/renderer/LitRenderer.js +2 -8
- package/dist/renderer/LitRenderer.js.map +1 -1
- package/dist/renderer/directives/style-map.d.ts +13 -0
- package/dist/renderer/directives/style-map.js +59 -59
- package/dist/renderer/directives/style-map.js.map +1 -0
- package/dist/renderer/executeTemplate.d.ts +8 -0
- package/dist/renderer/executeTemplate.js +1 -0
- package/dist/renderer/executeTemplate.js.map +1 -1
- package/dist/sap/base/Log.js +698 -188
- package/dist/sap/base/assert.js +28 -1
- package/dist/sap/base/config/MemoryConfigurationProvider.js +20 -0
- package/dist/sap/base/security/URLListValidator.js +253 -6
- package/dist/sap/base/security/encodeCSS.js +34 -8
- package/dist/sap/base/security/encodeXML.js +47 -17
- package/dist/sap/base/security/sanitizeHTML.js +35 -13
- package/dist/sap/base/strings/toHex.js +27 -2
- package/dist/sap/base/util/now.js +24 -3
- package/dist/sap/base/util/uid.js +27 -0
- package/dist/sap/ui/thirdparty/caja-html-sanitizer.js +112 -97
- package/dist/ssr-dom-shim.d.ts +1 -0
- package/dist/ssr-dom-shim.js +12 -0
- package/dist/ssr-dom-shim.js.map +1 -0
- package/dist/ssr-dom.d.ts +0 -0
- package/dist/ssr-dom.js +0 -0
- package/dist/theming/applyTheme.js +5 -5
- package/dist/theming/applyTheme.js.map +1 -1
- package/dist/theming/getConstructableStyle.d.ts +1 -1
- package/dist/theming/getConstructableStyle.js +3 -3
- package/dist/theming/getConstructableStyle.js.map +1 -1
- package/dist/theming/getEffectiveStyle.d.ts +1 -1
- package/dist/theming/getEffectiveStyle.js +5 -12
- package/dist/theming/getEffectiveStyle.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/AriaHasPopup.d.ts +32 -0
- package/dist/types/AriaHasPopup.js +34 -0
- package/dist/types/AriaHasPopup.js.map +1 -0
- package/dist/types/AriaLandmarkRole.d.ts +79 -0
- package/dist/types/AriaLandmarkRole.js +81 -0
- package/dist/types/AriaLandmarkRole.js.map +1 -0
- package/dist/types/AriaRole.d.ts +27 -0
- package/dist/types/AriaRole.js +29 -0
- package/dist/types/AriaRole.js.map +1 -0
- 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 +11 -0
- package/dist/types/CSSSize.js +14 -0
- package/dist/types/CSSSize.js.map +1 -0
- 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 +1 -5
- package/dist/types/DOMReference.js +1 -5
- 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 +5 -10
- package/dist/types/InvisibleMessageMode.js +4 -11
- 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/MovePlacement.d.ts +20 -0
- package/dist/types/MovePlacement.js +22 -0
- package/dist/types/MovePlacement.js.map +1 -0
- 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/Orientation.d.ts +16 -0
- package/dist/types/Orientation.js +18 -0
- package/dist/types/Orientation.js.map +1 -0
- package/dist/types/ValueState.d.ts +3 -17
- package/dist/types/ValueState.js +3 -17
- package/dist/types/ValueState.js.map +1 -1
- package/dist/types.d.ts +24 -1
- package/dist/types.js.map +1 -1
- package/dist/updateShadowRoot.d.ts +1 -2
- package/dist/updateShadowRoot.js +5 -28
- package/dist/updateShadowRoot.js.map +1 -1
- package/dist/util/ColorConversion.js +200 -195
- package/dist/util/ColorConversion.js.map +1 -1
- package/dist/util/InvisibleMessage.d.ts +1 -1
- package/dist/util/InvisibleMessage.js.map +1 -1
- package/dist/util/PopupUtils.d.ts +1 -3
- package/dist/util/PopupUtils.js +1 -15
- package/dist/util/PopupUtils.js.map +1 -1
- package/dist/util/clamp.js +2 -1
- package/dist/util/clamp.js.map +1 -1
- package/dist/util/createLinkInHead.d.ts +1 -1
- package/dist/util/createLinkInHead.js +1 -1
- package/dist/util/createLinkInHead.js.map +1 -1
- package/dist/util/detectNavigatorLanguage.d.ts +2 -2
- package/dist/util/detectNavigatorLanguage.js +6 -1
- package/dist/util/detectNavigatorLanguage.js.map +1 -1
- package/dist/util/dragAndDrop/DragRegistry.d.ts +12 -0
- package/dist/util/dragAndDrop/DragRegistry.js +68 -0
- package/dist/util/dragAndDrop/DragRegistry.js.map +1 -0
- package/dist/util/dragAndDrop/findClosestPosition.d.ts +7 -0
- package/dist/util/dragAndDrop/findClosestPosition.js +59 -0
- package/dist/util/dragAndDrop/findClosestPosition.js.map +1 -0
- package/dist/util/dragAndDrop/longDragOverHandler.d.ts +2 -0
- package/dist/util/dragAndDrop/longDragOverHandler.js +25 -0
- package/dist/util/dragAndDrop/longDragOverHandler.js.map +1 -0
- package/dist/util/getClassCopy.d.ts +62 -42
- package/dist/util/getDesigntimePropertyAsArray.d.ts +2 -2
- package/dist/util/getDesigntimePropertyAsArray.js +2 -1
- package/dist/util/getDesigntimePropertyAsArray.js.map +1 -1
- package/dist/util/getParentElement.d.ts +2 -0
- package/dist/util/getParentElement.js +5 -0
- package/dist/util/getParentElement.js.map +1 -0
- package/dist/util/isElementContainingBlock.d.ts +2 -0
- package/dist/util/isElementContainingBlock.js +11 -0
- package/dist/util/isElementContainingBlock.js.map +1 -0
- package/index.js +3 -19
- package/package-scripts.cjs +22 -19
- package/package.json +23 -8
- package/src/css/FontFace.css +47 -17
- package/src/css/SystemCSSVars.css +0 -8
- package/tsconfig.json +6 -0
- package/.eslintignore +0 -16
- package/.eslintrc.cjs +0 -3
- package/bundle.esm.js +0 -67
- package/dist/CSP.d.ts +0 -30
- package/dist/CSP.js +0 -51
- package/dist/CSP.js.map +0 -1
- package/dist/StaticAreaItem.d.ts +0 -36
- package/dist/StaticAreaItem.js +0 -102
- package/dist/StaticAreaItem.js.map +0 -1
- package/dist/api.json +0 -1
- package/dist/assets/Boot.34b7cea0.css +0 -1
- package/dist/assets/Boot.ef9171c9.js +0 -9
- package/dist/assets/bundle.esm.183f95f0.js +0 -50
- package/dist/assets-meta/IconCollectionsAlias.js.map +0 -1
- package/dist/config/RTL.d.ts +0 -7
- package/dist/config/RTL.js +0 -37
- package/dist/config/RTL.js.map +0 -1
- package/dist/theming/getEffectiveLinksHrefs.d.ts +0 -3
- package/dist/theming/getEffectiveLinksHrefs.js +0 -17
- package/dist/theming/getEffectiveLinksHrefs.js.map +0 -1
- package/dist/theming/preloadLinks.d.ts +0 -3
- package/dist/theming/preloadLinks.js +0 -19
- package/dist/theming/preloadLinks.js.map +0 -1
- package/dist/util/createStyleInHead.d.ts +0 -8
- package/dist/util/createStyleInHead.js +0 -18
- package/dist/util/createStyleInHead.js.map +0 -1
- package/lib/generate-asset-parameters/index.js +0 -27
- package/lib/generate-styles/index.js +0 -31
- package/lib/generate-version-info/index.js +0 -32
- package/src/renderer/directives/style-map.js +0 -72
- package/used-modules.txt +0 -10
package/dist/UI5Element.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
+
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
2
|
+
import "@ui5/webcomponents-base/dist/ssr-dom.js";
|
|
1
3
|
import merge from "./thirdparty/merge.js";
|
|
2
4
|
import { boot } from "./Boot.js";
|
|
3
5
|
import UI5ElementMetadata from "./UI5ElementMetadata.js";
|
|
4
6
|
import EventProvider from "./EventProvider.js";
|
|
5
|
-
import getSingletonElementInstance from "./util/getSingletonElementInstance.js";
|
|
6
|
-
import StaticAreaItem from "./StaticAreaItem.js";
|
|
7
7
|
import updateShadowRoot from "./updateShadowRoot.js";
|
|
8
8
|
import { shouldIgnoreCustomElement } from "./IgnoreCustomElements.js";
|
|
9
|
-
import { renderDeferred, renderImmediately, cancelRender } from "./Render.js";
|
|
9
|
+
import { renderDeferred, renderImmediately, cancelRender, } from "./Render.js";
|
|
10
10
|
import { registerTag, isTagRegistered, recordTagRegistrationFailure } from "./CustomElementsRegistry.js";
|
|
11
11
|
import { observeDOMNode, unobserveDOMNode } from "./DOMObserver.js";
|
|
12
12
|
import { skipOriginalEvent } from "./config/NoConflict.js";
|
|
@@ -16,9 +16,9 @@ import isValidPropertyName from "./util/isValidPropertyName.js";
|
|
|
16
16
|
import { getSlotName, getSlottedNodesList } from "./util/SlotsHelper.js";
|
|
17
17
|
import arraysAreEqual from "./util/arraysAreEqual.js";
|
|
18
18
|
import { markAsRtlAware } from "./locale/RTLAwareRegistry.js";
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
|
|
19
|
+
import executeTemplate, { getTagsToScope } from "./renderer/executeTemplate.js";
|
|
20
|
+
import { attachFormElementInternals, setFormValue } from "./features/InputElementsFormSupport.js";
|
|
21
|
+
const DEV_MODE = true;
|
|
22
22
|
let autoId = 0;
|
|
23
23
|
const elementTimeouts = new Map();
|
|
24
24
|
const uniqueDependenciesCache = new Map();
|
|
@@ -37,15 +37,28 @@ function _invalidate(changeInfo) {
|
|
|
37
37
|
this.onInvalidation(changeInfo);
|
|
38
38
|
this._changedState.push(changeInfo);
|
|
39
39
|
renderDeferred(this);
|
|
40
|
-
this.
|
|
40
|
+
this._invalidationEventProvider.fireEvent("invalidate", { ...changeInfo, target: this });
|
|
41
41
|
}
|
|
42
42
|
/**
|
|
43
|
+
* looks up a property descsriptor including in the prototype chain
|
|
44
|
+
* @param proto the starting prototype
|
|
45
|
+
* @param name the property to look for
|
|
46
|
+
* @returns the property descriptor if found directly or in the prototype chaing, undefined if not found
|
|
47
|
+
*/
|
|
48
|
+
function getPropertyDescriptor(proto, name) {
|
|
49
|
+
do {
|
|
50
|
+
const descriptor = Object.getOwnPropertyDescriptor(proto, name);
|
|
51
|
+
if (descriptor) {
|
|
52
|
+
return descriptor;
|
|
53
|
+
}
|
|
54
|
+
// go up the prototype chain
|
|
55
|
+
proto = Object.getPrototypeOf(proto);
|
|
56
|
+
} while (proto && proto !== HTMLElement.prototype);
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* @class
|
|
43
60
|
* Base class for all UI5 Web Components
|
|
44
61
|
*
|
|
45
|
-
* @class
|
|
46
|
-
* @constructor
|
|
47
|
-
* @author SAP SE
|
|
48
|
-
* @alias sap.ui.webc.base.UI5Element
|
|
49
62
|
* @extends HTMLElement
|
|
50
63
|
* @public
|
|
51
64
|
*/
|
|
@@ -59,7 +72,8 @@ class UI5Element extends HTMLElement {
|
|
|
59
72
|
this._fullyConnected = false; // A flag telling whether the UI5Element's onEnterDOM hook was called (since it's possible to have the element removed from DOM before that)
|
|
60
73
|
this._childChangeListeners = new Map(); // used to store lazy listeners per slot for the child change event of every child inside that slot
|
|
61
74
|
this._slotChangeListeners = new Map(); // used to store lazy listeners per slot for the slotchange event of all slot children inside that slot
|
|
62
|
-
this.
|
|
75
|
+
this._invalidationEventProvider = new EventProvider(); // used by parent components for listening to changes to child components
|
|
76
|
+
this._componentStateFinalizedEventProvider = new EventProvider(); // used by friend classes for synchronization
|
|
63
77
|
let deferredResolve;
|
|
64
78
|
this._domRefReadyPromise = new Promise(resolve => {
|
|
65
79
|
deferredResolve = resolve;
|
|
@@ -69,7 +83,8 @@ class UI5Element extends HTMLElement {
|
|
|
69
83
|
this._state = { ...ctor.getMetadata().getInitialState() };
|
|
70
84
|
this._upgradeAllProperties();
|
|
71
85
|
if (ctor._needsShadowDOM()) {
|
|
72
|
-
|
|
86
|
+
const defaultOptions = { mode: "open" };
|
|
87
|
+
this.attachShadow({ ...defaultOptions, ...ctor.getMetadata().getShadowRootOptions() });
|
|
73
88
|
}
|
|
74
89
|
}
|
|
75
90
|
/**
|
|
@@ -88,18 +103,33 @@ class UI5Element extends HTMLElement {
|
|
|
88
103
|
const template = this.constructor.template;
|
|
89
104
|
return executeTemplate(template, this);
|
|
90
105
|
}
|
|
91
|
-
renderStatic() {
|
|
92
|
-
const template = this.constructor.staticAreaTemplate;
|
|
93
|
-
return executeTemplate(template, this);
|
|
94
|
-
}
|
|
95
106
|
/**
|
|
96
107
|
* Do not call this method from derivatives of UI5Element, use "onEnterDOM" only
|
|
97
108
|
* @private
|
|
98
109
|
*/
|
|
99
110
|
async connectedCallback() {
|
|
111
|
+
if (DEV_MODE) {
|
|
112
|
+
const rootNode = this.getRootNode();
|
|
113
|
+
// when an element is connected, check if it exists in the `dependencies` of the parent
|
|
114
|
+
if (rootNode instanceof ShadowRoot && instanceOfUI5Element(rootNode.host)) {
|
|
115
|
+
const klass = rootNode.host.constructor;
|
|
116
|
+
const hasDependency = getTagsToScope(rootNode.host).includes(this.constructor.getMetadata().getPureTag());
|
|
117
|
+
if (!hasDependency) {
|
|
118
|
+
// eslint-disable-next-line no-console
|
|
119
|
+
console.error(`[UI5-FWK] ${this.constructor.getMetadata().getTag()} not found in dependencies of ${klass.getMetadata().getTag()}`);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
if (DEV_MODE) {
|
|
124
|
+
const props = this.constructor.getMetadata().getProperties();
|
|
125
|
+
for (const [prop, propData] of Object.entries(props)) { // eslint-disable-line
|
|
126
|
+
if (Object.hasOwn(this, prop)) {
|
|
127
|
+
// eslint-disable-next-line no-console
|
|
128
|
+
console.error(`[UI5-FWK] ${this.constructor.getMetadata().getTag()} has a property [${prop}] that is shadowed by the instance. Updates to this property will not invalidate the component. Possible reason is TS target ES2022 or TS useDefineForClassFields`);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
100
132
|
const ctor = this.constructor;
|
|
101
|
-
this.setAttribute(`_ui5rt${getCurrentRuntimeIndex()}`, "");
|
|
102
|
-
this.setAttribute("_ui5host", "");
|
|
103
133
|
this.setAttribute(ctor.getMetadata().getPureTag(), "");
|
|
104
134
|
if (ctor.getMetadata().supportsF6FastNavigation()) {
|
|
105
135
|
this.setAttribute("data-sap-ui-fastnavgroup", "true");
|
|
@@ -134,9 +164,7 @@ class UI5Element extends HTMLElement {
|
|
|
134
164
|
this.onExitDOM();
|
|
135
165
|
this._fullyConnected = false;
|
|
136
166
|
}
|
|
137
|
-
|
|
138
|
-
this.staticAreaItem.parentElement.removeChild(this.staticAreaItem);
|
|
139
|
-
}
|
|
167
|
+
this._domRefReadyPromise._deferredResolve();
|
|
140
168
|
cancelRender(this);
|
|
141
169
|
}
|
|
142
170
|
/**
|
|
@@ -164,14 +192,16 @@ class UI5Element extends HTMLElement {
|
|
|
164
192
|
*/
|
|
165
193
|
_startObservingDOMChildren() {
|
|
166
194
|
const ctor = this.constructor;
|
|
167
|
-
const
|
|
195
|
+
const metadata = ctor.getMetadata();
|
|
196
|
+
const shouldObserveChildren = metadata.hasSlots();
|
|
168
197
|
if (!shouldObserveChildren) {
|
|
169
198
|
return;
|
|
170
199
|
}
|
|
171
|
-
const canSlotText =
|
|
200
|
+
const canSlotText = metadata.canSlotText();
|
|
201
|
+
const hasClonedSlot = Object.keys(metadata.getSlots()).some(slotName => metadata.getSlots()[slotName].cloned);
|
|
172
202
|
const mutationObserverOptions = {
|
|
173
203
|
childList: true,
|
|
174
|
-
subtree: canSlotText,
|
|
204
|
+
subtree: canSlotText || hasClonedSlot,
|
|
175
205
|
characterData: canSlotText,
|
|
176
206
|
};
|
|
177
207
|
observeDOMNode(this, this._processChildren.bind(this), mutationObserverOptions);
|
|
@@ -234,9 +264,9 @@ class UI5Element extends HTMLElement {
|
|
|
234
264
|
const localName = child.localName;
|
|
235
265
|
const shouldWaitForCustomElement = localName.includes("-") && !shouldIgnoreCustomElement(localName);
|
|
236
266
|
if (shouldWaitForCustomElement) {
|
|
237
|
-
const isDefined =
|
|
267
|
+
const isDefined = customElements.get(localName);
|
|
238
268
|
if (!isDefined) {
|
|
239
|
-
const whenDefinedPromise =
|
|
269
|
+
const whenDefinedPromise = customElements.whenDefined(localName); // Class registered, but instances not upgraded yet
|
|
240
270
|
let timeoutPromise = elementTimeouts.get(localName);
|
|
241
271
|
if (!timeoutPromise) {
|
|
242
272
|
timeoutPromise = new Promise(resolve => setTimeout(resolve, 1000));
|
|
@@ -244,7 +274,7 @@ class UI5Element extends HTMLElement {
|
|
|
244
274
|
}
|
|
245
275
|
await Promise.race([whenDefinedPromise, timeoutPromise]);
|
|
246
276
|
}
|
|
247
|
-
|
|
277
|
+
customElements.upgrade(child);
|
|
248
278
|
}
|
|
249
279
|
}
|
|
250
280
|
child = ctor.getMetadata().constructor.validateSlotValue(child, slotData);
|
|
@@ -284,6 +314,9 @@ class UI5Element extends HTMLElement {
|
|
|
284
314
|
reason: "children",
|
|
285
315
|
});
|
|
286
316
|
invalidated = true;
|
|
317
|
+
if (ctor.getMetadata().isFormAssociated()) {
|
|
318
|
+
setFormValue(this);
|
|
319
|
+
}
|
|
287
320
|
}
|
|
288
321
|
}
|
|
289
322
|
// If none of the slots had an invalidation due to changes to immediate children,
|
|
@@ -319,26 +352,26 @@ class UI5Element extends HTMLElement {
|
|
|
319
352
|
/**
|
|
320
353
|
* Attach a callback that will be executed whenever the component is invalidated
|
|
321
354
|
*
|
|
322
|
-
* @param
|
|
355
|
+
* @param callback
|
|
323
356
|
* @public
|
|
324
357
|
*/
|
|
325
358
|
attachInvalidate(callback) {
|
|
326
|
-
this.
|
|
359
|
+
this._invalidationEventProvider.attachEvent("invalidate", callback);
|
|
327
360
|
}
|
|
328
361
|
/**
|
|
329
362
|
* Detach the callback that is executed whenever the component is invalidated
|
|
330
363
|
*
|
|
331
|
-
* @param
|
|
364
|
+
* @param callback
|
|
332
365
|
* @public
|
|
333
366
|
*/
|
|
334
367
|
detachInvalidate(callback) {
|
|
335
|
-
this.
|
|
368
|
+
this._invalidationEventProvider.detachEvent("invalidate", callback);
|
|
336
369
|
}
|
|
337
370
|
/**
|
|
338
371
|
* Callback that is executed whenever a monitored child changes its state
|
|
339
372
|
*
|
|
340
|
-
* @param
|
|
341
|
-
* @param
|
|
373
|
+
* @param slotName the slot in which a child was invalidated
|
|
374
|
+
* @param childChangeInfo the changeInfo object for the child in the given slot
|
|
342
375
|
* @private
|
|
343
376
|
*/
|
|
344
377
|
_onChildChange(slotName, childChangeInfo) {
|
|
@@ -385,6 +418,16 @@ class UI5Element extends HTMLElement {
|
|
|
385
418
|
this[nameInCamelCase] = newPropertyValue;
|
|
386
419
|
}
|
|
387
420
|
}
|
|
421
|
+
formAssociatedCallback() {
|
|
422
|
+
const ctor = this.constructor;
|
|
423
|
+
if (!ctor.getMetadata().isFormAssociated()) {
|
|
424
|
+
return;
|
|
425
|
+
}
|
|
426
|
+
attachFormElementInternals(this);
|
|
427
|
+
}
|
|
428
|
+
static get formAssociated() {
|
|
429
|
+
return this.getMetadata().isFormAssociated();
|
|
430
|
+
}
|
|
388
431
|
/**
|
|
389
432
|
* @private
|
|
390
433
|
*/
|
|
@@ -448,7 +491,6 @@ class UI5Element extends HTMLElement {
|
|
|
448
491
|
* Returns a singleton event listener for the "change" event of a child in a given slot
|
|
449
492
|
*
|
|
450
493
|
* @param slotName the name of the slot, where the child is
|
|
451
|
-
* @returns {ChildChangeListener}
|
|
452
494
|
* @private
|
|
453
495
|
*/
|
|
454
496
|
_getChildChangeListener(slotName) {
|
|
@@ -461,7 +503,6 @@ class UI5Element extends HTMLElement {
|
|
|
461
503
|
* Returns a singleton slotchange event listener that invalidates the component due to changes in the given slot
|
|
462
504
|
*
|
|
463
505
|
* @param slotName the name of the slot, where the slot element (whose slotchange event we're listening to) is
|
|
464
|
-
* @returns {SlotChangeListener}
|
|
465
506
|
* @private
|
|
466
507
|
*/
|
|
467
508
|
_getSlotChangeListener(slotName) {
|
|
@@ -513,9 +554,9 @@ class UI5Element extends HTMLElement {
|
|
|
513
554
|
* 1) children: immediate children (HTML elements or text nodes) were added, removed or reordered in the slot
|
|
514
555
|
* 2) textcontent: text nodes in the slot changed value (or nested text nodes were added or changed value). Can only trigger for slots of "type: Node"
|
|
515
556
|
* 3) slotchange: a slot element, slotted inside that slot had its "slotchange" event listener called. This practically means that transitively slotted children changed.
|
|
516
|
-
*
|
|
557
|
+
* Can only trigger if the child of a slot is a slot element itself.
|
|
517
558
|
* 4) childchange: indicates that a UI5Element child in that slot was invalidated and in turn invalidated the component.
|
|
518
|
-
*
|
|
559
|
+
* Can only trigger for slots with "invalidateOnChildChange" metadata descriptor
|
|
519
560
|
*
|
|
520
561
|
* - newValue: the new value of the property (for type="property" only)
|
|
521
562
|
*
|
|
@@ -537,9 +578,7 @@ class UI5Element extends HTMLElement {
|
|
|
537
578
|
this._suppressInvalidation = true;
|
|
538
579
|
this.onBeforeRendering();
|
|
539
580
|
// Intended for framework usage only. Currently ItemNavigation updates tab indexes after the component has updated its state but before the template is rendered
|
|
540
|
-
|
|
541
|
-
this._onComponentStateFinalized();
|
|
542
|
-
}
|
|
581
|
+
this._componentStateFinalizedEventProvider.fireEvent("componentStateFinalized");
|
|
543
582
|
// resume normal invalidation handling
|
|
544
583
|
this._suppressInvalidation = false;
|
|
545
584
|
// Update the shadow root with the render result
|
|
@@ -568,9 +607,6 @@ class UI5Element extends HTMLElement {
|
|
|
568
607
|
if (ctor._needsShadowDOM()) {
|
|
569
608
|
updateShadowRoot(this);
|
|
570
609
|
}
|
|
571
|
-
if (this.staticAreaItem) {
|
|
572
|
-
this.staticAreaItem.update();
|
|
573
|
-
}
|
|
574
610
|
// Safari requires that children get the slot attribute only after the slot tags have been rendered in the shadow DOM
|
|
575
611
|
if (hasIndividualSlots) {
|
|
576
612
|
this._assignIndividualSlotsToChildren();
|
|
@@ -610,11 +646,7 @@ class UI5Element extends HTMLElement {
|
|
|
610
646
|
if (!this.shadowRoot || this.shadowRoot.children.length === 0) {
|
|
611
647
|
return;
|
|
612
648
|
}
|
|
613
|
-
|
|
614
|
-
if (children.length !== 1) {
|
|
615
|
-
console.warn(`The shadow DOM for ${this.constructor.getMetadata().getTag()} does not have a top level element, the getDomRef() method might not work as expected`); // eslint-disable-line
|
|
616
|
-
}
|
|
617
|
-
return children[0];
|
|
649
|
+
return this.shadowRoot.children[0];
|
|
618
650
|
}
|
|
619
651
|
/**
|
|
620
652
|
* Returns the DOM Element marked with "data-sap-focus-ref" inside the template.
|
|
@@ -639,7 +671,7 @@ class UI5Element extends HTMLElement {
|
|
|
639
671
|
}
|
|
640
672
|
/**
|
|
641
673
|
* Set the focus to the element, returned by "getFocusDomRef()" (marked by "data-sap-focus-ref")
|
|
642
|
-
* @param
|
|
674
|
+
* @param focusOptions additional options for the focus
|
|
643
675
|
* @public
|
|
644
676
|
*/
|
|
645
677
|
async focus(focusOptions) {
|
|
@@ -656,13 +688,13 @@ class UI5Element extends HTMLElement {
|
|
|
656
688
|
* @param data - additional data for the event
|
|
657
689
|
* @param cancelable - true, if the user can call preventDefault on the event object
|
|
658
690
|
* @param bubbles - true, if the event bubbles
|
|
659
|
-
* @returns
|
|
691
|
+
* @returns false, if the event was cancelled (preventDefault called), true otherwise
|
|
660
692
|
*/
|
|
661
693
|
fireEvent(name, data, cancelable = false, bubbles = true) {
|
|
662
694
|
const eventResult = this._fireEvent(name, data, cancelable, bubbles);
|
|
663
695
|
const camelCaseEventName = kebabToCamelCase(name);
|
|
664
696
|
if (camelCaseEventName !== name) {
|
|
665
|
-
return eventResult && this._fireEvent(camelCaseEventName, data, cancelable);
|
|
697
|
+
return eventResult && this._fireEvent(camelCaseEventName, data, cancelable, bubbles);
|
|
666
698
|
}
|
|
667
699
|
return eventResult;
|
|
668
700
|
}
|
|
@@ -697,12 +729,30 @@ class UI5Element extends HTMLElement {
|
|
|
697
729
|
getSlottedNodes(slotName) {
|
|
698
730
|
return getSlottedNodesList(this[slotName]);
|
|
699
731
|
}
|
|
732
|
+
/**
|
|
733
|
+
* Attach a callback that will be executed whenever the component's state is finalized
|
|
734
|
+
*
|
|
735
|
+
* @param callback
|
|
736
|
+
* @public
|
|
737
|
+
*/
|
|
738
|
+
attachComponentStateFinalized(callback) {
|
|
739
|
+
this._componentStateFinalizedEventProvider.attachEvent("componentStateFinalized", callback);
|
|
740
|
+
}
|
|
741
|
+
/**
|
|
742
|
+
* Detach the callback that is executed whenever the component's state is finalized
|
|
743
|
+
*
|
|
744
|
+
* @param callback
|
|
745
|
+
* @public
|
|
746
|
+
*/
|
|
747
|
+
detachComponentStateFinalized(callback) {
|
|
748
|
+
this._componentStateFinalizedEventProvider.detachEvent("componentStateFinalized", callback);
|
|
749
|
+
}
|
|
700
750
|
/**
|
|
701
751
|
* Determines whether the component should be rendered in RTL mode or not.
|
|
702
752
|
* Returns: "rtl", "ltr" or undefined
|
|
703
753
|
*
|
|
704
754
|
* @public
|
|
705
|
-
* @
|
|
755
|
+
* @default undefined
|
|
706
756
|
*/
|
|
707
757
|
get effectiveDir() {
|
|
708
758
|
markAsRtlAware(this.constructor); // if a UI5 Element calls this method, it's considered to be rtl-aware
|
|
@@ -710,8 +760,8 @@ class UI5Element extends HTMLElement {
|
|
|
710
760
|
}
|
|
711
761
|
/**
|
|
712
762
|
* Used to duck-type UI5 elements without using instanceof
|
|
713
|
-
* @returns {boolean}
|
|
714
763
|
* @public
|
|
764
|
+
* @default true
|
|
715
765
|
*/
|
|
716
766
|
get isUI5Element() {
|
|
717
767
|
return true;
|
|
@@ -719,6 +769,13 @@ class UI5Element extends HTMLElement {
|
|
|
719
769
|
get classes() {
|
|
720
770
|
return {};
|
|
721
771
|
}
|
|
772
|
+
/**
|
|
773
|
+
* Returns the component accessibility info.
|
|
774
|
+
* @private
|
|
775
|
+
*/
|
|
776
|
+
get accessibilityInfo() {
|
|
777
|
+
return {};
|
|
778
|
+
}
|
|
722
779
|
/**
|
|
723
780
|
* Do not override this method in derivatives of UI5Element, use metadata properties instead
|
|
724
781
|
* @private
|
|
@@ -732,28 +789,6 @@ class UI5Element extends HTMLElement {
|
|
|
732
789
|
static _needsShadowDOM() {
|
|
733
790
|
return !!this.template || Object.prototype.hasOwnProperty.call(this.prototype, "render");
|
|
734
791
|
}
|
|
735
|
-
/**
|
|
736
|
-
* @private
|
|
737
|
-
*/
|
|
738
|
-
static _needsStaticArea() {
|
|
739
|
-
return !!this.staticAreaTemplate || Object.prototype.hasOwnProperty.call(this.prototype, "renderStatic");
|
|
740
|
-
}
|
|
741
|
-
/**
|
|
742
|
-
* @public
|
|
743
|
-
*/
|
|
744
|
-
getStaticAreaItemDomRef() {
|
|
745
|
-
if (!this.constructor._needsStaticArea()) {
|
|
746
|
-
throw new Error("This component does not use the static area");
|
|
747
|
-
}
|
|
748
|
-
if (!this.staticAreaItem) {
|
|
749
|
-
this.staticAreaItem = StaticAreaItem.createInstance();
|
|
750
|
-
this.staticAreaItem.setOwnerElement(this);
|
|
751
|
-
}
|
|
752
|
-
if (!this.staticAreaItem.parentElement) {
|
|
753
|
-
getSingletonElementInstance("ui5-static-area").appendChild(this.staticAreaItem);
|
|
754
|
-
}
|
|
755
|
-
return this.staticAreaItem.getDomRef();
|
|
756
|
-
}
|
|
757
792
|
/**
|
|
758
793
|
* @private
|
|
759
794
|
*/
|
|
@@ -778,8 +813,25 @@ class UI5Element extends HTMLElement {
|
|
|
778
813
|
if (propData.multiple && propData.defaultValue) {
|
|
779
814
|
throw new Error(`Cannot set a default value for property "${prop}". All multiple properties are empty arrays by default.`);
|
|
780
815
|
}
|
|
816
|
+
const descriptor = getPropertyDescriptor(proto, prop);
|
|
817
|
+
// if the decorator is on a setter, proxy the new setter to it
|
|
818
|
+
let origSet;
|
|
819
|
+
if (descriptor?.set) {
|
|
820
|
+
// eslint-disable-next-line @typescript-eslint/unbound-method
|
|
821
|
+
origSet = descriptor.set;
|
|
822
|
+
}
|
|
823
|
+
// if the decorator is on a setter, there will be a corresponding getter - proxy the new getter to it
|
|
824
|
+
let origGet;
|
|
825
|
+
if (descriptor?.get) {
|
|
826
|
+
// eslint-disable-next-line @typescript-eslint/unbound-method
|
|
827
|
+
origGet = descriptor.get;
|
|
828
|
+
}
|
|
781
829
|
Object.defineProperty(proto, prop, {
|
|
782
830
|
get() {
|
|
831
|
+
// proxy the getter to the original accessor if there was one
|
|
832
|
+
if (origGet) {
|
|
833
|
+
return origGet.call(this);
|
|
834
|
+
}
|
|
783
835
|
if (this._state[prop] !== undefined) {
|
|
784
836
|
return this._state[prop];
|
|
785
837
|
}
|
|
@@ -804,7 +856,7 @@ class UI5Element extends HTMLElement {
|
|
|
804
856
|
value = metadataCtor.validatePropertyValue(value, propData);
|
|
805
857
|
const propertyType = propData.type;
|
|
806
858
|
let propertyValidator = propData.validator;
|
|
807
|
-
const oldState = this._state[prop];
|
|
859
|
+
const oldState = origGet ? origGet.call(this) : this._state[prop];
|
|
808
860
|
if (propertyType && propertyType.isDataTypeClass) {
|
|
809
861
|
propertyValidator = propertyType;
|
|
810
862
|
}
|
|
@@ -818,13 +870,22 @@ class UI5Element extends HTMLElement {
|
|
|
818
870
|
isDifferent = oldState !== value;
|
|
819
871
|
}
|
|
820
872
|
if (isDifferent) {
|
|
821
|
-
|
|
873
|
+
// if the decorator is on a setter, use it for storage
|
|
874
|
+
if (origSet) {
|
|
875
|
+
origSet.call(this, value);
|
|
876
|
+
}
|
|
877
|
+
else {
|
|
878
|
+
this._state[prop] = value;
|
|
879
|
+
}
|
|
822
880
|
_invalidate.call(this, {
|
|
823
881
|
type: "property",
|
|
824
882
|
name: prop,
|
|
825
883
|
newValue: value,
|
|
826
884
|
oldValue: oldState,
|
|
827
885
|
});
|
|
886
|
+
if (ctor.getMetadata().isFormAssociated()) {
|
|
887
|
+
setFormValue(this);
|
|
888
|
+
}
|
|
828
889
|
this._updateAttribute(prop, value);
|
|
829
890
|
}
|
|
830
891
|
},
|
|
@@ -852,20 +913,6 @@ class UI5Element extends HTMLElement {
|
|
|
852
913
|
}
|
|
853
914
|
}
|
|
854
915
|
}
|
|
855
|
-
/**
|
|
856
|
-
* Returns the CSS for this UI5 Web Component Class
|
|
857
|
-
* @protected
|
|
858
|
-
*/
|
|
859
|
-
static get styles() {
|
|
860
|
-
return "";
|
|
861
|
-
}
|
|
862
|
-
/**
|
|
863
|
-
* Returns the Static Area CSS for this UI5 Web Component Class
|
|
864
|
-
* @protected
|
|
865
|
-
*/
|
|
866
|
-
static get staticAreaStyles() {
|
|
867
|
-
return "";
|
|
868
|
-
}
|
|
869
916
|
/**
|
|
870
917
|
* Returns an array with the dependencies for this UI5 Web Component, which could be:
|
|
871
918
|
* - composed components (used in its shadow root or static area item)
|
|
@@ -890,8 +937,6 @@ class UI5Element extends HTMLElement {
|
|
|
890
937
|
}
|
|
891
938
|
/**
|
|
892
939
|
* Returns a promise that resolves whenever all dependencies for this UI5 Web Component have resolved
|
|
893
|
-
*
|
|
894
|
-
* @returns {Promise}
|
|
895
940
|
*/
|
|
896
941
|
static whenDependenciesDefined() {
|
|
897
942
|
return Promise.all(this.getUniqueDependencies().map(dep => dep.define()));
|
|
@@ -900,7 +945,6 @@ class UI5Element extends HTMLElement {
|
|
|
900
945
|
* Hook that will be called upon custom element definition
|
|
901
946
|
*
|
|
902
947
|
* @protected
|
|
903
|
-
* @returns {Promise<void>}
|
|
904
948
|
*/
|
|
905
949
|
static async onDefine() {
|
|
906
950
|
return Promise.resolve();
|
|
@@ -908,7 +952,6 @@ class UI5Element extends HTMLElement {
|
|
|
908
952
|
/**
|
|
909
953
|
* Registers a UI5 Web Component in the browser window object
|
|
910
954
|
* @public
|
|
911
|
-
* @returns {Promise<UI5Element>}
|
|
912
955
|
*/
|
|
913
956
|
static async define() {
|
|
914
957
|
await boot();
|
|
@@ -925,8 +968,7 @@ class UI5Element extends HTMLElement {
|
|
|
925
968
|
else if (!definedGlobally) {
|
|
926
969
|
this._generateAccessors();
|
|
927
970
|
registerTag(tag);
|
|
928
|
-
|
|
929
|
-
preloadLinks(this);
|
|
971
|
+
customElements.define(tag, this);
|
|
930
972
|
}
|
|
931
973
|
return this;
|
|
932
974
|
}
|
|
@@ -934,7 +976,6 @@ class UI5Element extends HTMLElement {
|
|
|
934
976
|
* Returns an instance of UI5ElementMetadata.js representing this UI5 Web Component's full metadata (its and its parents')
|
|
935
977
|
* Note: not to be confused with the "get metadata()" method, which returns an object for this class's metadata only
|
|
936
978
|
* @public
|
|
937
|
-
* @returns {UI5ElementMetadata}
|
|
938
979
|
*/
|
|
939
980
|
static getMetadata() {
|
|
940
981
|
if (this.hasOwnProperty("_metadata")) { // eslint-disable-line
|
|
@@ -950,19 +991,27 @@ class UI5Element extends HTMLElement {
|
|
|
950
991
|
this._metadata = new UI5ElementMetadata(mergedMetadata);
|
|
951
992
|
return this._metadata;
|
|
952
993
|
}
|
|
994
|
+
get validity() { return this._internals?.validity; }
|
|
995
|
+
get validationMessage() { return this._internals?.validationMessage; }
|
|
996
|
+
checkValidity() { return this._internals?.checkValidity(); }
|
|
997
|
+
reportValidity() { return this._internals?.reportValidity(); }
|
|
953
998
|
}
|
|
954
999
|
/**
|
|
955
1000
|
* Returns the metadata object for this UI5 Web Component Class
|
|
956
1001
|
* @protected
|
|
957
1002
|
*/
|
|
958
1003
|
UI5Element.metadata = {};
|
|
1004
|
+
/**
|
|
1005
|
+
* Returns the CSS for this UI5 Web Component Class
|
|
1006
|
+
* @protected
|
|
1007
|
+
*/
|
|
1008
|
+
UI5Element.styles = "";
|
|
959
1009
|
/**
|
|
960
1010
|
* Always use duck-typing to cover all runtimes on the page.
|
|
961
|
-
* @returns {boolean}
|
|
962
1011
|
*/
|
|
963
1012
|
const instanceOfUI5Element = (object) => {
|
|
964
1013
|
return "isUI5Element" in object;
|
|
965
1014
|
};
|
|
966
1015
|
export default UI5Element;
|
|
967
|
-
export { instanceOfUI5Element };
|
|
1016
|
+
export { instanceOfUI5Element, };
|
|
968
1017
|
//# sourceMappingURL=UI5Element.js.map
|