@ui5/webcomponents-base 2.24.0 → 2.25.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 +11 -0
- package/dist/.tsbuildinfobuild +1 -1
- package/dist/UI5Element.js +12 -5
- package/dist/UI5Element.js.map +1 -1
- package/dist/config/Language.d.ts +1 -1
- package/dist/config/Language.js +20 -20
- package/dist/config/Language.js.map +1 -1
- package/dist/custom-elements-internal.json +75 -75
- package/dist/custom-elements.json +75 -75
- package/dist/generated/VersionInfo.js +4 -4
- package/dist/generated/VersionInfo.js.map +1 -1
- package/dist/prod/UI5Element.js +1 -1
- package/dist/prod/UI5Element.js.map +3 -3
- package/dist/prod/config/Language.js +1 -1
- package/dist/prod/config/Language.js.map +3 -3
- package/dist/prod/generated/VersionInfo.js +1 -1
- package/dist/prod/generated/VersionInfo.js.map +2 -2
- package/package.json +3 -3
|
@@ -1019,81 +1019,6 @@
|
|
|
1019
1019
|
}
|
|
1020
1020
|
]
|
|
1021
1021
|
},
|
|
1022
|
-
{
|
|
1023
|
-
"kind": "javascript-module",
|
|
1024
|
-
"path": "dist/animations/AnimationQueue.js",
|
|
1025
|
-
"declarations": [],
|
|
1026
|
-
"exports": [
|
|
1027
|
-
{
|
|
1028
|
-
"kind": "js",
|
|
1029
|
-
"name": "default",
|
|
1030
|
-
"declaration": {
|
|
1031
|
-
"name": "AnimationQueue",
|
|
1032
|
-
"module": "dist/animations/AnimationQueue.js"
|
|
1033
|
-
}
|
|
1034
|
-
}
|
|
1035
|
-
]
|
|
1036
|
-
},
|
|
1037
|
-
{
|
|
1038
|
-
"kind": "javascript-module",
|
|
1039
|
-
"path": "dist/animations/animate.js",
|
|
1040
|
-
"declarations": [],
|
|
1041
|
-
"exports": [
|
|
1042
|
-
{
|
|
1043
|
-
"kind": "js",
|
|
1044
|
-
"name": "default",
|
|
1045
|
-
"declaration": {
|
|
1046
|
-
"name": "animate",
|
|
1047
|
-
"module": "dist/animations/animate.js"
|
|
1048
|
-
}
|
|
1049
|
-
}
|
|
1050
|
-
]
|
|
1051
|
-
},
|
|
1052
|
-
{
|
|
1053
|
-
"kind": "javascript-module",
|
|
1054
|
-
"path": "dist/animations/scroll.js",
|
|
1055
|
-
"declarations": [],
|
|
1056
|
-
"exports": [
|
|
1057
|
-
{
|
|
1058
|
-
"kind": "js",
|
|
1059
|
-
"name": "default",
|
|
1060
|
-
"declaration": {
|
|
1061
|
-
"name": "scroll",
|
|
1062
|
-
"module": "dist/animations/scroll.js"
|
|
1063
|
-
}
|
|
1064
|
-
}
|
|
1065
|
-
]
|
|
1066
|
-
},
|
|
1067
|
-
{
|
|
1068
|
-
"kind": "javascript-module",
|
|
1069
|
-
"path": "dist/animations/slideDown.js",
|
|
1070
|
-
"declarations": [],
|
|
1071
|
-
"exports": [
|
|
1072
|
-
{
|
|
1073
|
-
"kind": "js",
|
|
1074
|
-
"name": "default",
|
|
1075
|
-
"declaration": {
|
|
1076
|
-
"name": "slideDown",
|
|
1077
|
-
"module": "dist/animations/slideDown.js"
|
|
1078
|
-
}
|
|
1079
|
-
}
|
|
1080
|
-
]
|
|
1081
|
-
},
|
|
1082
|
-
{
|
|
1083
|
-
"kind": "javascript-module",
|
|
1084
|
-
"path": "dist/animations/slideUp.js",
|
|
1085
|
-
"declarations": [],
|
|
1086
|
-
"exports": [
|
|
1087
|
-
{
|
|
1088
|
-
"kind": "js",
|
|
1089
|
-
"name": "default",
|
|
1090
|
-
"declaration": {
|
|
1091
|
-
"name": "slideUp",
|
|
1092
|
-
"module": "dist/animations/slideUp.js"
|
|
1093
|
-
}
|
|
1094
|
-
}
|
|
1095
|
-
]
|
|
1096
|
-
},
|
|
1097
1022
|
{
|
|
1098
1023
|
"kind": "javascript-module",
|
|
1099
1024
|
"path": "dist/asset-registries/Icons.js",
|
|
@@ -1208,6 +1133,81 @@
|
|
|
1208
1133
|
"declarations": [],
|
|
1209
1134
|
"exports": []
|
|
1210
1135
|
},
|
|
1136
|
+
{
|
|
1137
|
+
"kind": "javascript-module",
|
|
1138
|
+
"path": "dist/animations/AnimationQueue.js",
|
|
1139
|
+
"declarations": [],
|
|
1140
|
+
"exports": [
|
|
1141
|
+
{
|
|
1142
|
+
"kind": "js",
|
|
1143
|
+
"name": "default",
|
|
1144
|
+
"declaration": {
|
|
1145
|
+
"name": "AnimationQueue",
|
|
1146
|
+
"module": "dist/animations/AnimationQueue.js"
|
|
1147
|
+
}
|
|
1148
|
+
}
|
|
1149
|
+
]
|
|
1150
|
+
},
|
|
1151
|
+
{
|
|
1152
|
+
"kind": "javascript-module",
|
|
1153
|
+
"path": "dist/animations/animate.js",
|
|
1154
|
+
"declarations": [],
|
|
1155
|
+
"exports": [
|
|
1156
|
+
{
|
|
1157
|
+
"kind": "js",
|
|
1158
|
+
"name": "default",
|
|
1159
|
+
"declaration": {
|
|
1160
|
+
"name": "animate",
|
|
1161
|
+
"module": "dist/animations/animate.js"
|
|
1162
|
+
}
|
|
1163
|
+
}
|
|
1164
|
+
]
|
|
1165
|
+
},
|
|
1166
|
+
{
|
|
1167
|
+
"kind": "javascript-module",
|
|
1168
|
+
"path": "dist/animations/scroll.js",
|
|
1169
|
+
"declarations": [],
|
|
1170
|
+
"exports": [
|
|
1171
|
+
{
|
|
1172
|
+
"kind": "js",
|
|
1173
|
+
"name": "default",
|
|
1174
|
+
"declaration": {
|
|
1175
|
+
"name": "scroll",
|
|
1176
|
+
"module": "dist/animations/scroll.js"
|
|
1177
|
+
}
|
|
1178
|
+
}
|
|
1179
|
+
]
|
|
1180
|
+
},
|
|
1181
|
+
{
|
|
1182
|
+
"kind": "javascript-module",
|
|
1183
|
+
"path": "dist/animations/slideDown.js",
|
|
1184
|
+
"declarations": [],
|
|
1185
|
+
"exports": [
|
|
1186
|
+
{
|
|
1187
|
+
"kind": "js",
|
|
1188
|
+
"name": "default",
|
|
1189
|
+
"declaration": {
|
|
1190
|
+
"name": "slideDown",
|
|
1191
|
+
"module": "dist/animations/slideDown.js"
|
|
1192
|
+
}
|
|
1193
|
+
}
|
|
1194
|
+
]
|
|
1195
|
+
},
|
|
1196
|
+
{
|
|
1197
|
+
"kind": "javascript-module",
|
|
1198
|
+
"path": "dist/animations/slideUp.js",
|
|
1199
|
+
"declarations": [],
|
|
1200
|
+
"exports": [
|
|
1201
|
+
{
|
|
1202
|
+
"kind": "js",
|
|
1203
|
+
"name": "default",
|
|
1204
|
+
"declaration": {
|
|
1205
|
+
"name": "slideUp",
|
|
1206
|
+
"module": "dist/animations/slideUp.js"
|
|
1207
|
+
}
|
|
1208
|
+
}
|
|
1209
|
+
]
|
|
1210
|
+
},
|
|
1211
1211
|
{
|
|
1212
1212
|
"kind": "javascript-module",
|
|
1213
1213
|
"path": "dist/converters/DOMReference.js",
|
|
@@ -1001,81 +1001,6 @@
|
|
|
1001
1001
|
}
|
|
1002
1002
|
]
|
|
1003
1003
|
},
|
|
1004
|
-
{
|
|
1005
|
-
"kind": "javascript-module",
|
|
1006
|
-
"path": "dist/animations/AnimationQueue.js",
|
|
1007
|
-
"declarations": [],
|
|
1008
|
-
"exports": [
|
|
1009
|
-
{
|
|
1010
|
-
"kind": "js",
|
|
1011
|
-
"name": "default",
|
|
1012
|
-
"declaration": {
|
|
1013
|
-
"name": "AnimationQueue",
|
|
1014
|
-
"module": "dist/animations/AnimationQueue.js"
|
|
1015
|
-
}
|
|
1016
|
-
}
|
|
1017
|
-
]
|
|
1018
|
-
},
|
|
1019
|
-
{
|
|
1020
|
-
"kind": "javascript-module",
|
|
1021
|
-
"path": "dist/animations/animate.js",
|
|
1022
|
-
"declarations": [],
|
|
1023
|
-
"exports": [
|
|
1024
|
-
{
|
|
1025
|
-
"kind": "js",
|
|
1026
|
-
"name": "default",
|
|
1027
|
-
"declaration": {
|
|
1028
|
-
"name": "animate",
|
|
1029
|
-
"module": "dist/animations/animate.js"
|
|
1030
|
-
}
|
|
1031
|
-
}
|
|
1032
|
-
]
|
|
1033
|
-
},
|
|
1034
|
-
{
|
|
1035
|
-
"kind": "javascript-module",
|
|
1036
|
-
"path": "dist/animations/scroll.js",
|
|
1037
|
-
"declarations": [],
|
|
1038
|
-
"exports": [
|
|
1039
|
-
{
|
|
1040
|
-
"kind": "js",
|
|
1041
|
-
"name": "default",
|
|
1042
|
-
"declaration": {
|
|
1043
|
-
"name": "scroll",
|
|
1044
|
-
"module": "dist/animations/scroll.js"
|
|
1045
|
-
}
|
|
1046
|
-
}
|
|
1047
|
-
]
|
|
1048
|
-
},
|
|
1049
|
-
{
|
|
1050
|
-
"kind": "javascript-module",
|
|
1051
|
-
"path": "dist/animations/slideDown.js",
|
|
1052
|
-
"declarations": [],
|
|
1053
|
-
"exports": [
|
|
1054
|
-
{
|
|
1055
|
-
"kind": "js",
|
|
1056
|
-
"name": "default",
|
|
1057
|
-
"declaration": {
|
|
1058
|
-
"name": "slideDown",
|
|
1059
|
-
"module": "dist/animations/slideDown.js"
|
|
1060
|
-
}
|
|
1061
|
-
}
|
|
1062
|
-
]
|
|
1063
|
-
},
|
|
1064
|
-
{
|
|
1065
|
-
"kind": "javascript-module",
|
|
1066
|
-
"path": "dist/animations/slideUp.js",
|
|
1067
|
-
"declarations": [],
|
|
1068
|
-
"exports": [
|
|
1069
|
-
{
|
|
1070
|
-
"kind": "js",
|
|
1071
|
-
"name": "default",
|
|
1072
|
-
"declaration": {
|
|
1073
|
-
"name": "slideUp",
|
|
1074
|
-
"module": "dist/animations/slideUp.js"
|
|
1075
|
-
}
|
|
1076
|
-
}
|
|
1077
|
-
]
|
|
1078
|
-
},
|
|
1079
1004
|
{
|
|
1080
1005
|
"kind": "javascript-module",
|
|
1081
1006
|
"path": "dist/asset-registries/Icons.js",
|
|
@@ -1190,6 +1115,81 @@
|
|
|
1190
1115
|
"declarations": [],
|
|
1191
1116
|
"exports": []
|
|
1192
1117
|
},
|
|
1118
|
+
{
|
|
1119
|
+
"kind": "javascript-module",
|
|
1120
|
+
"path": "dist/animations/AnimationQueue.js",
|
|
1121
|
+
"declarations": [],
|
|
1122
|
+
"exports": [
|
|
1123
|
+
{
|
|
1124
|
+
"kind": "js",
|
|
1125
|
+
"name": "default",
|
|
1126
|
+
"declaration": {
|
|
1127
|
+
"name": "AnimationQueue",
|
|
1128
|
+
"module": "dist/animations/AnimationQueue.js"
|
|
1129
|
+
}
|
|
1130
|
+
}
|
|
1131
|
+
]
|
|
1132
|
+
},
|
|
1133
|
+
{
|
|
1134
|
+
"kind": "javascript-module",
|
|
1135
|
+
"path": "dist/animations/animate.js",
|
|
1136
|
+
"declarations": [],
|
|
1137
|
+
"exports": [
|
|
1138
|
+
{
|
|
1139
|
+
"kind": "js",
|
|
1140
|
+
"name": "default",
|
|
1141
|
+
"declaration": {
|
|
1142
|
+
"name": "animate",
|
|
1143
|
+
"module": "dist/animations/animate.js"
|
|
1144
|
+
}
|
|
1145
|
+
}
|
|
1146
|
+
]
|
|
1147
|
+
},
|
|
1148
|
+
{
|
|
1149
|
+
"kind": "javascript-module",
|
|
1150
|
+
"path": "dist/animations/scroll.js",
|
|
1151
|
+
"declarations": [],
|
|
1152
|
+
"exports": [
|
|
1153
|
+
{
|
|
1154
|
+
"kind": "js",
|
|
1155
|
+
"name": "default",
|
|
1156
|
+
"declaration": {
|
|
1157
|
+
"name": "scroll",
|
|
1158
|
+
"module": "dist/animations/scroll.js"
|
|
1159
|
+
}
|
|
1160
|
+
}
|
|
1161
|
+
]
|
|
1162
|
+
},
|
|
1163
|
+
{
|
|
1164
|
+
"kind": "javascript-module",
|
|
1165
|
+
"path": "dist/animations/slideDown.js",
|
|
1166
|
+
"declarations": [],
|
|
1167
|
+
"exports": [
|
|
1168
|
+
{
|
|
1169
|
+
"kind": "js",
|
|
1170
|
+
"name": "default",
|
|
1171
|
+
"declaration": {
|
|
1172
|
+
"name": "slideDown",
|
|
1173
|
+
"module": "dist/animations/slideDown.js"
|
|
1174
|
+
}
|
|
1175
|
+
}
|
|
1176
|
+
]
|
|
1177
|
+
},
|
|
1178
|
+
{
|
|
1179
|
+
"kind": "javascript-module",
|
|
1180
|
+
"path": "dist/animations/slideUp.js",
|
|
1181
|
+
"declarations": [],
|
|
1182
|
+
"exports": [
|
|
1183
|
+
{
|
|
1184
|
+
"kind": "js",
|
|
1185
|
+
"name": "default",
|
|
1186
|
+
"declaration": {
|
|
1187
|
+
"name": "slideUp",
|
|
1188
|
+
"module": "dist/animations/slideUp.js"
|
|
1189
|
+
}
|
|
1190
|
+
}
|
|
1191
|
+
]
|
|
1192
|
+
},
|
|
1193
1193
|
{
|
|
1194
1194
|
"kind": "javascript-module",
|
|
1195
1195
|
"path": "dist/converters/DOMReference.js",
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
const VersionInfo = {
|
|
2
|
-
version: "2.
|
|
2
|
+
version: "2.25.0-rc.0",
|
|
3
3
|
major: 2,
|
|
4
|
-
minor:
|
|
4
|
+
minor: 25,
|
|
5
5
|
patch: 0,
|
|
6
|
-
suffix: "",
|
|
6
|
+
suffix: "-rc.0",
|
|
7
7
|
isNext: false,
|
|
8
|
-
buildTime:
|
|
8
|
+
buildTime: 1783937950,
|
|
9
9
|
};
|
|
10
10
|
export default VersionInfo;
|
|
11
11
|
//# sourceMappingURL=VersionInfo.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VersionInfo.js","sourceRoot":"","sources":["../../src/generated/VersionInfo.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,GAAG;IACnB,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"VersionInfo.js","sourceRoot":"","sources":["../../src/generated/VersionInfo.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,GAAG;IACnB,OAAO,EAAE,aAAa;IACtB,KAAK,EAAE,CAAC;IACR,KAAK,EAAE,EAAE;IACT,KAAK,EAAE,CAAC;IACR,MAAM,EAAE,OAAO;IACf,MAAM,EAAE,KAAK;IACb,SAAS,EAAE,UAAU;CACrB,CAAC;AACF,eAAe,WAAW,CAAC","sourcesContent":["const VersionInfo = {\n\tversion: \"2.25.0-rc.0\",\n\tmajor: 2,\n\tminor: 25,\n\tpatch: 0,\n\tsuffix: \"-rc.0\",\n\tisNext: false,\n\tbuildTime: 1783937950,\n};\nexport default VersionInfo;"]}
|
package/dist/prod/UI5Element.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";import"@ui5/webcomponents-base/dist/ssr-dom.js";import N from"./thirdparty/merge.js";import{boot as x}from"./Boot.js";import V from"./UI5ElementMetadata.js";import b from"./EventProvider.js";import j from"./updateShadowRoot.js";import{shouldIgnoreCustomElement as H}from"./IgnoreCustomElements.js";import{renderDeferred as $,renderImmediately as z,cancelRender as B,unregisterElement as q,registerElement as K}from"./Render.js";import{registerTag as W,isTagRegistered as X,recordTagRegistrationFailure as J}from"./CustomElementsRegistry.js";import{observeDOMNode as Y,unobserveDOMNode as G}from"./DOMObserver.js";import{skipOriginalEvent as Q}from"./config/NoConflict.js";import Z from"./locale/getEffectiveDir.js";import{kebabToCamelCase as m,camelToKebabCase as tt,kebabToPascalCase as P}from"./util/StringHelper.js";import w from"./util/isValidPropertyName.js";import{getSlotName as T,getSlottedNodesList as D}from"./util/SlotsHelper.js";import et from"./util/arraysAreEqual.js";import{markAsRtlAware as nt}from"./locale/RTLAwareRegistry.js";import st from"./renderer/executeTemplate.js";import{shouldScopeCustomElement as A}from"./CustomElementsScopeUtils.js";import{updateFormValue as ot,setFormValue as R}from"./features/InputElementsFormSupport.js";import{getI18nBundle as at}from"./i18nBundle.js";import{fetchCldr as it}from"./asset-registries/LocaleData.js";import C from"./locale/getLocale.js";import{getLanguageChangePending as O}from"./config/Language.js";import rt from"./util/createInstanceChecker.js";let lt=0;const L=new Map,M=new Map,U={fromAttribute(c,f){if(f===Boolean)return c!==null;if(f===Number)return c===null?void 0:parseFloat(c);if(f===Object||f===Array)try{return JSON.parse(c)}catch{return c}return c},toAttribute(c,f){return f===Boolean?c?"":null:f===Object||f===Array||c==null?null:String(c)}};function g(c){this._suppressInvalidation||this.constructor.getMetadata().isLanguageAware()&&O()||(this.onInvalidation(c),this._changedState.push(c),$(this),this._invalidationEventProvider.fireEvent("invalidate",{...c,target:this}))}function dt(c,f){do{const t=Object.getOwnPropertyDescriptor(c,f);if(t)return t;c=Object.getPrototypeOf(c)}while(c&&c!==HTMLElement.prototype)}class S extends HTMLElement{constructor(){super();this.__shouldHydrate=!1;this._rendered=!1;const t=this.constructor;this._changedState=[],this._suppressInvalidation=!0,this._inDOM=!1,this._fullyConnected=!1,this._childChangeListeners=new Map,this._slotChangeListeners=new Map,this._invalidationEventProvider=new b,this._componentStateFinalizedEventProvider=new b;let e;this._domRefReadyPromise=new Promise(n=>{e=n}),this._domRefReadyPromise._deferredResolve=e,this._doNotSyncAttributes=new Set,this._slotsAssignedNodes=new WeakMap,this._state={...t.getMetadata().getInitialState()},this.initializedProperties=new Map,this.constructor.getMetadata().getPropertiesList().forEach(n=>{if(this.hasOwnProperty(n)){const o=this[n];this.initializedProperties.set(n,o)}}),this._internals=this.attachInternals(),this._initShadowRoot()}_initShadowRoot(){const t=this.constructor;if(t._needsShadowDOM()){const e={mode:"open"};this.shadowRoot?this.__shouldHydrate=!0:this.attachShadow({...e,...t.getMetadata().getShadowRootOptions()}),t.getMetadata().slotsAreManaged()&&this.shadowRoot.addEventListener("slotchange",this._onShadowRootSlotChange.bind(this))}}_onShadowRootSlotChange(t){t.target?.getRootNode()===this.shadowRoot&&this._processChildren()}get _id(){return this.__id||(this.__id=`ui5wc_${++lt}`),this.__id}render(){const t=this.constructor.template;return st(t,this)}async connectedCallback(){const t=this.constructor;K(this),this.setAttribute(t.getMetadata().getPureTag(),""),t.getMetadata().supportsF6FastNavigation()&&!this.hasAttribute("data-sap-ui-fastnavgroup")&&this.setAttribute("data-sap-ui-fastnavgroup","true");const e=t.getMetadata().slotsAreManaged();this._inDOM=!0,e&&(this._startObservingDOMChildren(),await this._processChildren()),t.asyncFinished||await t._definePromise,!(t.getMetadata().isLanguageAware()&&O())&&this._inDOM&&(z(this),this._domRefReadyPromise._deferredResolve(),this._fullyConnected=!0,this.onEnterDOM(),this.hasAttribute("autofocus")&&requestAnimationFrame(()=>{this.focus()}))}get definePromise(){const t=this.constructor;return!t.asyncFinished&&t._definePromise?t._definePromise:Promise.resolve()}disconnectedCallback(){const e=this.constructor.getMetadata().slotsAreManaged();this._inDOM=!1,e&&this._stopObservingDOMChildren(),this._fullyConnected&&(this.onExitDOM(),this._fullyConnected=!1),this._domRefReadyPromise._deferredResolve(),B(this),q(this)}onBeforeRendering(){}onAfterRendering(){}onEnterDOM(){}onExitDOM(){}_startObservingDOMChildren(){const e=this.constructor.getMetadata();if(!e.hasSlots())return;const n=e.canSlotText(),o={childList:!0,subtree:n,characterData:n};Y(this,this._processChildren.bind(this),o)}_stopObservingDOMChildren(){G(this)}async _processChildren(){this.constructor.getMetadata().hasSlots()&&await this._updateSlots()}async _updateSlots(){const t=this.constructor,e=t.getMetadata().getSlots(),s=t.getMetadata().canSlotText(),n=Array.from(s?this.childNodes:this.children),o=new Map,i=new Map;for(const[l,h]of Object.entries(e)){const d=h.propertyName||l;i.set(d,l),o.set(d,[...this._state[d]]),this._clearSlot(l,h)}const r=new Map,a=new Map;n.forEach((l,h)=>{const d=T(l),p=e[d];if(p===void 0){if(d!=="default"){const I=Object.keys(e).join(", ");console.warn(`Unknown slotName: ${d}, ignoring`,l,`Valid values are: ${I}`)}return}const _=p.propertyName||d;a.has(_)?a.get(_).push({child:l,idx:h}):a.set(_,[{child:l,idx:h}])}),a.forEach((l,h)=>{this._state[h]=l.sort((d,p)=>d.idx-p.idx).map(d=>d.child),this._state[m(h)]=this._state[h]});const u=n.map(async l=>{const h=T(l),d=e[h];if(d!==void 0){if(d.individualSlots){const p=(r.get(h)||0)+1;r.set(h,p),l._individualSlot=`${h}-${p}`}if(l instanceof HTMLElement){const p=l.localName;if(p.includes("-")&&!H(p)){if(!customElements.get(p)){const k=customElements.whenDefined(p);let E=L.get(p);E||(E=new Promise(F=>setTimeout(F,1e3)),L.set(p,E)),await Promise.race([k,E])}customElements.upgrade(l)}}if(l=t.getMetadata().constructor.validateSlotValue(l,d),y(l)&&d.invalidateOnChildChange){const p=this._getChildChangeListener(h);l.attachInvalidate.call(l,p)}l instanceof HTMLSlotElement&&this._attachSlotChange(l,h,!!d.invalidateOnChildChange)}});await Promise.all(u);let v=!1;for(const[l,h]of Object.entries(e)){const d=h.propertyName||l;et(o.get(d),this._state[d])||(g.call(this,{type:"slot",name:i.get(d),reason:"children"}),v=!0,t.getMetadata().isFormAssociated()&&R(this))}v||g.call(this,{type:"slot",name:"default",reason:"textcontent"})}_clearSlot(t,e){const s=e.propertyName||t;this._state[s].forEach(o=>{if(y(o)){const i=this._getChildChangeListener(t);o.detachInvalidate.call(o,i)}o instanceof HTMLSlotElement&&this._detachSlotChange(o,t)}),this._state[s]=[],this._state[m(s)]=this._state[s]}attachInvalidate(t){this._invalidationEventProvider.attachEvent("invalidate",t)}detachInvalidate(t){this._invalidationEventProvider.detachEvent("invalidate",t)}_onChildChange(t,e){this.constructor.getMetadata().shouldInvalidateOnChildChange(t,e.type,e.name)&&g.call(this,{type:"slot",name:t,reason:"childchange",child:e.target})}attributeChangedCallback(t,e,s){let n;if(this._doNotSyncAttributes.has(t))return;const o=this.constructor.getMetadata().getProperties(),i=t.replace(/^ui5-/,""),r=m(i);if(o.hasOwnProperty(r)){const a=o[r];n=(a.converter??U).fromAttribute(s,a.type),this[r]=n}}formAssociatedCallback(){this.constructor.getMetadata().isFormAssociated()&&ot(this)}static get formAssociated(){return this.getMetadata().isFormAssociated()}_updateAttribute(t,e){const s=this.constructor;if(!s.getMetadata().hasAttribute(t))return;const o=s.getMetadata().getProperties()[t];if(o.type===Object||o.type===Array)return;const i=tt(t),a=(o.converter||U).toAttribute(e,o.type);this._doNotSyncAttributes.add(i),a==null?this.removeAttribute(i):this.setAttribute(i,a),this._doNotSyncAttributes.delete(i)}_getChildChangeListener(t){return this._childChangeListeners.has(t)||this._childChangeListeners.set(t,this._onChildChange.bind(this,t)),this._childChangeListeners.get(t)}_getSlotChangeListener(t){return this._slotChangeListeners.has(t)||this._slotChangeListeners.set(t,this._onSlotChange.bind(this,t)),this._slotChangeListeners.get(t)}_attachSlotChange(t,e,s){const n=this._getSlotChangeListener(e);t.addEventListener("slotchange",o=>{if(n.call(t,o),s){const i=this._slotsAssignedNodes.get(t);i&&i.forEach(a=>{if(y(a)){const u=this._getChildChangeListener(e);a.detachInvalidate.call(a,u)}});const r=D([t]);this._slotsAssignedNodes.set(t,r),r.forEach(a=>{if(y(a)){const u=this._getChildChangeListener(e);a.attachInvalidate.call(a,u)}})}})}_detachSlotChange(t,e){t.removeEventListener("slotchange",this._getSlotChangeListener(e))}_onSlotChange(t){g.call(this,{type:"slot",name:t,reason:"slotchange"})}onInvalidation(t){}updateAttributes(){const e=this.constructor.getMetadata().getProperties();for(const[s,n]of Object.entries(e))this._updateAttribute(s,this[s])}_render(){const t=this.constructor,e=t.getMetadata().hasIndividualSlots();this.initializedProperties.size>0&&(Array.from(this.initializedProperties.entries()).forEach(([s,n])=>{delete this[s],this[s]=n}),this.initializedProperties.clear()),this._suppressInvalidation=!0;try{this.onBeforeRendering(),this._rendered||this.updateAttributes(),this._componentStateFinalizedEventProvider.fireEvent("componentStateFinalized")}finally{this._suppressInvalidation=!1}this._changedState=[],t._needsShadowDOM()&&j(this),this._rendered=!0,e&&this._assignIndividualSlotsToChildren(),this.onAfterRendering()}_assignIndividualSlotsToChildren(){Array.from(this.children).forEach(e=>{e._individualSlot&&e.setAttribute("slot",e._individualSlot)})}_waitForDomRef(){return this._domRefReadyPromise}getDomRef(){if(typeof this._getRealDomRef=="function")return this._getRealDomRef();if(!(!this.shadowRoot||this.shadowRoot.children.length===0))return this.shadowRoot.children[0]}getFocusDomRef(){const t=this.getDomRef();if(t)return t.querySelector("[data-sap-focus-ref]")||t}async getFocusDomRefAsync(){return await this._waitForDomRef(),this.getFocusDomRef()}async focus(t){await this._waitForDomRef();const e=this.getFocusDomRef();e===this||!this.isConnected?HTMLElement.prototype.focus.call(this,t):e&&typeof e.focus=="function"&&e.focus(t)}fireEvent(t,e,s=!1,n=!0){const o=this._fireEvent(t,e,s,n),i=P(t);return i!==t?o&&this._fireEvent(i,e,s,n):o}fireDecoratorEvent(t,e){const s=this.getEventData(t),n=s?s.cancelable:!1,o=s?s.bubbles:!1,i=this._fireEvent(t,e,n,o),r=P(t);return r!==t?i&&this._fireEvent(r,e,n,o):i}_fireEvent(t,e,s=!1,n=!0){const o=new CustomEvent(`ui5-${t}`,{detail:e,composed:!1,bubbles:n,cancelable:s}),i=this.dispatchEvent(o);if(Q(t))return i;const r=new CustomEvent(t,{detail:e,composed:!1,bubbles:n,cancelable:s});return this.dispatchEvent(r)&&i}getEventData(t){return this.constructor.getMetadata().getEvents()[t]}getSlottedNodes(t){return D(this[t])}attachComponentStateFinalized(t){this._componentStateFinalizedEventProvider.attachEvent("componentStateFinalized",t)}detachComponentStateFinalized(t){this._componentStateFinalizedEventProvider.detachEvent("componentStateFinalized",t)}get effectiveDir(){return nt(this.constructor),Z(this)}get isUI5Element(){return!0}get isUI5AbstractElement(){return!this.constructor._needsShadowDOM()}get classes(){return{}}get accessibilityInfo(){}static get observedAttributes(){return this.getMetadata().getAttributesList()}static get tagsToScope(){const t=this.getMetadata().getPureTag(),e=this.getUniqueDependencies().map(s=>s.getMetadata().getPureTag()).filter(A);return A(t)&&e.push(t),e}static _needsShadowDOM(){return!!this.template||Object.prototype.hasOwnProperty.call(this.prototype,"render")}static _generateAccessors(){const t=this.prototype,e=this.getMetadata().slotsAreManaged(),s=this.getMetadata().getProperties();for(const[n,o]of Object.entries(s)){w(n)||console.warn(`"${n}" is not a valid property name. Use a name that does not collide with DOM APIs`);const i=dt(t,n);let r;i?.set&&(r=i.set);let a;i?.get&&(a=i.get),Object.defineProperty(t,n,{get(){return a?a.call(this):this._state[n]},set(u){const v=this.constructor,l=a?a.call(this):this._state[n];if(l!==u){if(r?r.call(this,u):this._state[n]=u,g.call(this,{type:"property",name:n,newValue:u,oldValue:l}),this._rendered){const d=a?a.call(this):this._state[n];this._updateAttribute(n,d)}v.getMetadata().isFormAssociated()&&R(this)}}})}if(e){const n=this.getMetadata().getSlots();for(const[o,i]of Object.entries(n)){w(o)||console.warn(`"${o}" is not a valid property name. Use a name that does not collide with DOM APIs`);const r=i.propertyName||o,a={get(){return this._state[r]!==void 0?this._state[r]:[]},set(){throw new Error("Cannot set slot content directly, use the DOM APIs (appendChild, removeChild, etc...)")}};Object.defineProperty(t,r,a),r!==m(r)&&Object.defineProperty(t,m(r),a)}}}static{this.metadata={}}static{this.styles=""}static get dependencies(){return[]}static cacheUniqueDependencies(){const t=this.dependencies.filter((e,s,n)=>n.indexOf(e)===s);M.set(this,t)}static getUniqueDependencies(){return M.has(this)||this.cacheUniqueDependencies(),M.get(this)||[]}static async onDefine(){return Promise.resolve()}static fetchI18nBundles(){return Promise.all(Object.entries(this.getMetadata().getI18n()).map(t=>{const{bundleName:e}=t[1];return at(e)}))}static fetchCLDR(){return this.getMetadata().needsCLDR()?it(C().getLanguage(),C().getRegion(),C().getScript()):Promise.resolve()}static{this.i18nBundleStorage={}}static get i18nBundles(){return this.i18nBundleStorage}static define(){const t=async()=>{await x();const o=await Promise.all([this.fetchI18nBundles(),this.fetchCLDR(),this.onDefine()]),[i]=o;Object.entries(this.getMetadata().getI18n()).forEach((r,a)=>{const u=r[1].bundleName;this.i18nBundleStorage[u]=i[a]}),this.asyncFinished=!0};this._definePromise=t();const e=this.getMetadata().getTag(),s=X(e),n=customElements.get(e);return n&&!s?J(e):n||(this._generateAccessors(),W(e),customElements.define(e,this)),this}static getMetadata(){if(this.hasOwnProperty("_metadata"))return this._metadata;const t=[this.metadata];let e=this;for(;e!==S;)e=Object.getPrototypeOf(e),t.unshift(e.metadata);const s=N({},...t);return this._metadata=new V(s),this._metadata}get validity(){return this._internals.validity}get validationMessage(){return this._internals.validationMessage}checkValidity(){return this._internals.checkValidity()}reportValidity(){return this._internals.reportValidity()}}const y=rt("isUI5Element");export default S;export{y as instanceOfUI5Element};
|
|
1
|
+
"use strict";import"@ui5/webcomponents-base/dist/ssr-dom.js";import N from"./thirdparty/merge.js";import{boot as x}from"./Boot.js";import V from"./UI5ElementMetadata.js";import b from"./EventProvider.js";import j from"./updateShadowRoot.js";import{shouldIgnoreCustomElement as H}from"./IgnoreCustomElements.js";import{renderDeferred as $,renderImmediately as z,cancelRender as B,unregisterElement as q,registerElement as K}from"./Render.js";import{registerTag as W,isTagRegistered as X,recordTagRegistrationFailure as J}from"./CustomElementsRegistry.js";import{observeDOMNode as Y,unobserveDOMNode as G}from"./DOMObserver.js";import{skipOriginalEvent as Q}from"./config/NoConflict.js";import Z from"./locale/getEffectiveDir.js";import{kebabToCamelCase as m,camelToKebabCase as tt,kebabToPascalCase as P}from"./util/StringHelper.js";import w from"./util/isValidPropertyName.js";import{getSlotName as T,getSlottedNodesList as D}from"./util/SlotsHelper.js";import et from"./util/arraysAreEqual.js";import{markAsRtlAware as nt}from"./locale/RTLAwareRegistry.js";import st from"./renderer/executeTemplate.js";import{shouldScopeCustomElement as A}from"./CustomElementsScopeUtils.js";import{updateFormValue as ot,setFormValue as R}from"./features/InputElementsFormSupport.js";import{getI18nBundle as at}from"./i18nBundle.js";import{fetchCldr as it}from"./asset-registries/LocaleData.js";import C from"./locale/getLocale.js";import{getLanguageChangePending as O}from"./config/Language.js";import rt from"./util/createInstanceChecker.js";let lt=0;const L=new Map,M=new Map,U={fromAttribute(c,f){if(f===Boolean)return c!==null;if(f===Number)return c===null?void 0:parseFloat(c);if(f===Object||f===Array)try{return JSON.parse(c)}catch{return c}return c},toAttribute(c,f){return f===Boolean?c?"":null:f===Object||f===Array||c==null?null:String(c)}};function g(c){this._suppressInvalidation||this.constructor.getMetadata().isLanguageAware()&&O()||(this.onInvalidation(c),this._changedState.push(c),$(this),this._invalidationEventProvider.fireEvent("invalidate",{...c,target:this}))}function dt(c,f){do{const t=Object.getOwnPropertyDescriptor(c,f);if(t)return t;c=Object.getPrototypeOf(c)}while(c&&c!==HTMLElement.prototype)}class S extends HTMLElement{constructor(){super();this.__shouldHydrate=!1;this._rendered=!1;const t=this.constructor;this._changedState=[],this._suppressInvalidation=!0,this._inDOM=!1,this._fullyConnected=!1,this._childChangeListeners=new Map,this._slotChangeListeners=new Map,this._invalidationEventProvider=new b,this._componentStateFinalizedEventProvider=new b;let e;this._domRefReadyPromise=new Promise(n=>{e=n}),this._domRefReadyPromise._deferredResolve=e,this._doNotSyncAttributes=new Set,this._slotsAssignedNodes=new WeakMap,this._state={...t.getMetadata().getInitialState()},this.initializedProperties=new Map,this.constructor.getMetadata().getPropertiesList().forEach(n=>{if(this.hasOwnProperty(n)){const o=this[n];this.initializedProperties.set(n,o)}}),this._internals=this.attachInternals(),this._initShadowRoot()}_initShadowRoot(){const t=this.constructor;if(t._needsShadowDOM()){const e={mode:"open"};this.shadowRoot?this.__shouldHydrate=!0:this.attachShadow({...e,...t.getMetadata().getShadowRootOptions()}),t.getMetadata().slotsAreManaged()&&this.shadowRoot.addEventListener("slotchange",this._onShadowRootSlotChange.bind(this))}}_onShadowRootSlotChange(t){t.target?.getRootNode()===this.shadowRoot&&this._processChildren()}get _id(){return this.__id||(this.__id=`ui5wc_${++lt}`),this.__id}render(){const t=this.constructor.template;return st(t,this)}async connectedCallback(){const t=this.constructor;K(this),this.setAttribute(t.getMetadata().getPureTag(),""),t.getMetadata().supportsF6FastNavigation()&&!this.hasAttribute("data-sap-ui-fastnavgroup")&&this.setAttribute("data-sap-ui-fastnavgroup","true");const e=t.getMetadata().slotsAreManaged();this._inDOM=!0,e&&(this._startObservingDOMChildren(),await this._processChildren()),t.asyncFinished||await t._definePromise;const s=O();t.getMetadata().isLanguageAware()&&s&&await s,this._inDOM&&(this._rendered||z(this),this._domRefReadyPromise._deferredResolve(),this._fullyConnected=!0,this.onEnterDOM(),this.hasAttribute("autofocus")&&requestAnimationFrame(()=>{this.focus()}))}get definePromise(){const t=this.constructor;return!t.asyncFinished&&t._definePromise?t._definePromise:Promise.resolve()}disconnectedCallback(){const e=this.constructor.getMetadata().slotsAreManaged();this._inDOM=!1,e&&this._stopObservingDOMChildren(),this._fullyConnected&&(this.onExitDOM(),this._fullyConnected=!1),this._domRefReadyPromise._deferredResolve(),B(this),q(this)}onBeforeRendering(){}onAfterRendering(){}onEnterDOM(){}onExitDOM(){}_startObservingDOMChildren(){const e=this.constructor.getMetadata();if(!e.hasSlots())return;const n=e.canSlotText(),o={childList:!0,subtree:n,characterData:n};Y(this,this._processChildren.bind(this),o)}_stopObservingDOMChildren(){G(this)}async _processChildren(){this.constructor.getMetadata().hasSlots()&&await this._updateSlots()}async _updateSlots(){const t=this.constructor,e=t.getMetadata().getSlots(),s=t.getMetadata().canSlotText(),n=Array.from(s?this.childNodes:this.children),o=new Map,a=new Map;for(const[l,h]of Object.entries(e)){const d=h.propertyName||l;a.set(d,l),o.set(d,[...this._state[d]]),this._clearSlot(l,h)}const r=new Map,i=new Map;n.forEach((l,h)=>{const d=T(l),p=e[d];if(p===void 0){if(d!=="default"){const I=Object.keys(e).join(", ");console.warn(`Unknown slotName: ${d}, ignoring`,l,`Valid values are: ${I}`)}return}const _=p.propertyName||d;i.has(_)?i.get(_).push({child:l,idx:h}):i.set(_,[{child:l,idx:h}])}),i.forEach((l,h)=>{this._state[h]=l.sort((d,p)=>d.idx-p.idx).map(d=>d.child),this._state[m(h)]=this._state[h]});const u=n.map(async l=>{const h=T(l),d=e[h];if(d!==void 0){if(d.individualSlots){const p=(r.get(h)||0)+1;r.set(h,p),l._individualSlot=`${h}-${p}`}if(l instanceof HTMLElement){const p=l.localName;if(p.includes("-")&&!H(p)){if(!customElements.get(p)){const k=customElements.whenDefined(p);let E=L.get(p);E||(E=new Promise(F=>setTimeout(F,1e3)),L.set(p,E)),await Promise.race([k,E])}customElements.upgrade(l)}}if(l=t.getMetadata().constructor.validateSlotValue(l,d),y(l)&&d.invalidateOnChildChange){const p=this._getChildChangeListener(h);l.attachInvalidate.call(l,p)}l instanceof HTMLSlotElement&&this._attachSlotChange(l,h,!!d.invalidateOnChildChange)}});await Promise.all(u);let v=!1;for(const[l,h]of Object.entries(e)){const d=h.propertyName||l;et(o.get(d),this._state[d])||(g.call(this,{type:"slot",name:a.get(d),reason:"children"}),v=!0,t.getMetadata().isFormAssociated()&&R(this))}v||g.call(this,{type:"slot",name:"default",reason:"textcontent"})}_clearSlot(t,e){const s=e.propertyName||t;this._state[s].forEach(o=>{if(y(o)){const a=this._getChildChangeListener(t);o.detachInvalidate.call(o,a)}o instanceof HTMLSlotElement&&this._detachSlotChange(o,t)}),this._state[s]=[],this._state[m(s)]=this._state[s]}attachInvalidate(t){this._invalidationEventProvider.attachEvent("invalidate",t)}detachInvalidate(t){this._invalidationEventProvider.detachEvent("invalidate",t)}_onChildChange(t,e){this.constructor.getMetadata().shouldInvalidateOnChildChange(t,e.type,e.name)&&g.call(this,{type:"slot",name:t,reason:"childchange",child:e.target})}attributeChangedCallback(t,e,s){let n;if(this._doNotSyncAttributes.has(t))return;const o=this.constructor.getMetadata().getProperties(),a=t.replace(/^ui5-/,""),r=m(a);if(o.hasOwnProperty(r)){const i=o[r];n=(i.converter??U).fromAttribute(s,i.type),this[r]=n}}formAssociatedCallback(){this.constructor.getMetadata().isFormAssociated()&&ot(this)}static get formAssociated(){return this.getMetadata().isFormAssociated()}_updateAttribute(t,e){const s=this.constructor;if(!s.getMetadata().hasAttribute(t))return;const o=s.getMetadata().getProperties()[t];if(o.type===Object||o.type===Array)return;const a=tt(t),i=(o.converter||U).toAttribute(e,o.type);this._doNotSyncAttributes.add(a),i==null?this.removeAttribute(a):this.setAttribute(a,i),this._doNotSyncAttributes.delete(a)}_getChildChangeListener(t){return this._childChangeListeners.has(t)||this._childChangeListeners.set(t,this._onChildChange.bind(this,t)),this._childChangeListeners.get(t)}_getSlotChangeListener(t){return this._slotChangeListeners.has(t)||this._slotChangeListeners.set(t,this._onSlotChange.bind(this,t)),this._slotChangeListeners.get(t)}_attachSlotChange(t,e,s){const n=this._getSlotChangeListener(e);t.addEventListener("slotchange",o=>{if(n.call(t,o),s){const a=this._slotsAssignedNodes.get(t);a&&a.forEach(i=>{if(y(i)){const u=this._getChildChangeListener(e);i.detachInvalidate.call(i,u)}});const r=D([t]);this._slotsAssignedNodes.set(t,r),r.forEach(i=>{if(y(i)){const u=this._getChildChangeListener(e);i.attachInvalidate.call(i,u)}})}})}_detachSlotChange(t,e){t.removeEventListener("slotchange",this._getSlotChangeListener(e))}_onSlotChange(t){g.call(this,{type:"slot",name:t,reason:"slotchange"})}onInvalidation(t){}updateAttributes(){const e=this.constructor.getMetadata().getProperties();for(const[s,n]of Object.entries(e))this._updateAttribute(s,this[s])}_render(){const t=this.constructor,e=t.getMetadata().hasIndividualSlots();this.initializedProperties.size>0&&(Array.from(this.initializedProperties.entries()).forEach(([s,n])=>{delete this[s],this[s]=n}),this.initializedProperties.clear()),this._suppressInvalidation=!0;try{this.onBeforeRendering(),this._rendered||this.updateAttributes(),this._componentStateFinalizedEventProvider.fireEvent("componentStateFinalized")}finally{this._suppressInvalidation=!1}this._changedState=[],t._needsShadowDOM()&&j(this),this._rendered=!0,e&&this._assignIndividualSlotsToChildren(),this.onAfterRendering()}_assignIndividualSlotsToChildren(){Array.from(this.children).forEach(e=>{e._individualSlot&&e.setAttribute("slot",e._individualSlot)})}_waitForDomRef(){return this._domRefReadyPromise}getDomRef(){if(typeof this._getRealDomRef=="function")return this._getRealDomRef();if(!(!this.shadowRoot||this.shadowRoot.children.length===0))return this.shadowRoot.children[0]}getFocusDomRef(){const t=this.getDomRef();if(t)return t.querySelector("[data-sap-focus-ref]")||t}async getFocusDomRefAsync(){return await this._waitForDomRef(),this.getFocusDomRef()}async focus(t){await this._waitForDomRef();const e=this.getFocusDomRef();e===this||!this.isConnected?HTMLElement.prototype.focus.call(this,t):e&&typeof e.focus=="function"&&e.focus(t)}fireEvent(t,e,s=!1,n=!0){const o=this._fireEvent(t,e,s,n),a=P(t);return a!==t?o&&this._fireEvent(a,e,s,n):o}fireDecoratorEvent(t,e){const s=this.getEventData(t),n=s?s.cancelable:!1,o=s?s.bubbles:!1,a=this._fireEvent(t,e,n,o),r=P(t);return r!==t?a&&this._fireEvent(r,e,n,o):a}_fireEvent(t,e,s=!1,n=!0){const o=new CustomEvent(`ui5-${t}`,{detail:e,composed:!1,bubbles:n,cancelable:s}),a=this.dispatchEvent(o);if(Q(t))return a;const r=new CustomEvent(t,{detail:e,composed:!1,bubbles:n,cancelable:s});return this.dispatchEvent(r)&&a}getEventData(t){return this.constructor.getMetadata().getEvents()[t]}getSlottedNodes(t){return D(this[t])}attachComponentStateFinalized(t){this._componentStateFinalizedEventProvider.attachEvent("componentStateFinalized",t)}detachComponentStateFinalized(t){this._componentStateFinalizedEventProvider.detachEvent("componentStateFinalized",t)}get effectiveDir(){return nt(this.constructor),Z(this)}get isUI5Element(){return!0}get isUI5AbstractElement(){return!this.constructor._needsShadowDOM()}get classes(){return{}}get accessibilityInfo(){}static get observedAttributes(){return this.getMetadata().getAttributesList()}static get tagsToScope(){const t=this.getMetadata().getPureTag(),e=this.getUniqueDependencies().map(s=>s.getMetadata().getPureTag()).filter(A);return A(t)&&e.push(t),e}static _needsShadowDOM(){return!!this.template||Object.prototype.hasOwnProperty.call(this.prototype,"render")}static _generateAccessors(){const t=this.prototype,e=this.getMetadata().slotsAreManaged(),s=this.getMetadata().getProperties();for(const[n,o]of Object.entries(s)){w(n)||console.warn(`"${n}" is not a valid property name. Use a name that does not collide with DOM APIs`);const a=dt(t,n);let r;a?.set&&(r=a.set);let i;a?.get&&(i=a.get),Object.defineProperty(t,n,{get(){return i?i.call(this):this._state[n]},set(u){const v=this.constructor,l=i?i.call(this):this._state[n];if(l!==u){if(r?r.call(this,u):this._state[n]=u,g.call(this,{type:"property",name:n,newValue:u,oldValue:l}),this._rendered){const d=i?i.call(this):this._state[n];this._updateAttribute(n,d)}v.getMetadata().isFormAssociated()&&R(this)}}})}if(e){const n=this.getMetadata().getSlots();for(const[o,a]of Object.entries(n)){w(o)||console.warn(`"${o}" is not a valid property name. Use a name that does not collide with DOM APIs`);const r=a.propertyName||o,i={get(){return this._state[r]!==void 0?this._state[r]:[]},set(){throw new Error("Cannot set slot content directly, use the DOM APIs (appendChild, removeChild, etc...)")}};Object.defineProperty(t,r,i),r!==m(r)&&Object.defineProperty(t,m(r),i)}}}static{this.metadata={}}static{this.styles=""}static get dependencies(){return[]}static cacheUniqueDependencies(){const t=this.dependencies.filter((e,s,n)=>n.indexOf(e)===s);M.set(this,t)}static getUniqueDependencies(){return M.has(this)||this.cacheUniqueDependencies(),M.get(this)||[]}static async onDefine(){return Promise.resolve()}static fetchI18nBundles(){return Promise.all(Object.entries(this.getMetadata().getI18n()).map(t=>{const{bundleName:e}=t[1];return at(e)}))}static fetchCLDR(){return this.getMetadata().needsCLDR()?it(C().getLanguage(),C().getRegion(),C().getScript()):Promise.resolve()}static{this.i18nBundleStorage={}}static get i18nBundles(){return this.i18nBundleStorage}static define(){const t=async()=>{await x();const o=await Promise.all([this.fetchI18nBundles(),this.fetchCLDR(),this.onDefine()]),[a]=o;Object.entries(this.getMetadata().getI18n()).forEach((r,i)=>{const u=r[1].bundleName;this.i18nBundleStorage[u]=a[i]}),this.asyncFinished=!0};this._definePromise=t();const e=this.getMetadata().getTag(),s=X(e),n=customElements.get(e);return n&&!s?J(e):n||(this._generateAccessors(),W(e),customElements.define(e,this)),this}static getMetadata(){if(this.hasOwnProperty("_metadata"))return this._metadata;const t=[this.metadata];let e=this;for(;e!==S;)e=Object.getPrototypeOf(e),t.unshift(e.metadata);const s=N({},...t);return this._metadata=new V(s),this._metadata}get validity(){return this._internals.validity}get validationMessage(){return this._internals.validationMessage}checkValidity(){return this._internals.checkValidity()}reportValidity(){return this._internals.reportValidity()}}const y=rt("isUI5Element");export default S;export{y as instanceOfUI5Element};
|
|
2
2
|
//# sourceMappingURL=UI5Element.js.map
|