Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@ui5/webcomponents-base

Package Overview
Dependencies
Maintainers
5
Versions
493
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ui5/webcomponents-base - npm Package Compare versions

Comparing version 2.3.0-rc.1 to 2.3.0-rc.2

dist/prod/util/SelectionAssistant.js

2

dist/Boot.js

@@ -56,3 +56,3 @@ import whenDOMReady from "./util/whenDOMReady.js";

booted = true;
await eventProvider.fireEventAsync("boot");
eventProvider.fireEvent("boot");
};

@@ -59,0 +59,0 @@ bootPromise = new Promise(bootExecutor);

const VersionInfo = {
version: "2.3.0-rc.1",
version: "2.3.0-rc.2",
major: 2,
minor: 3,
patch: 0,
suffix: "-rc.1",
suffix: "-rc.2",
isNext: false,
buildTime: 1726128478,
buildTime: 1726733301,
};
export default VersionInfo;
//# sourceMappingURL=VersionInfo.js.map

@@ -1,2 +0,2 @@

"use strict";import d from"./util/whenDOMReady.js";import c from"./EventProvider.js";import u from"./FontFace.js";import v from"./SystemCSSVars.js";import{getTheme as i}from"./config/Theme.js";import a from"./theming/applyTheme.js";import{registerCurrentRuntime as y}from"./Runtimes.js";import{getFeature as p}from"./FeaturesRegistry.js";import{attachThemeRegistered as g}from"./theming/ThemeRegistered.js";let o=!1,r;const m=new c,h=()=>o,P=e=>{if(!o){m.attachEvent("boot",e);return}e()},l=async()=>{if(r!==void 0)return r;const e=async n=>{if(y(),typeof document>"u"){n();return}g(S);const t=p("OpenUI5Support"),f=t?t.isOpenUI5Detected():!1,s=p("F6Navigation");t&&await t.init(),s&&!f&&s.init(),await d(),await a(i()),t&&t.attachListeners(),u(),v(),n(),o=!0,await m.fireEventAsync("boot")};return r=new Promise(e),r},S=e=>{o&&e===i()&&a(i())};export{l as boot,P as attachBoot,h as isBooted};
"use strict";import d from"./util/whenDOMReady.js";import u from"./EventProvider.js";import v from"./FontFace.js";import c from"./SystemCSSVars.js";import{getTheme as i}from"./config/Theme.js";import p from"./theming/applyTheme.js";import{registerCurrentRuntime as y}from"./Runtimes.js";import{getFeature as a}from"./FeaturesRegistry.js";import{attachThemeRegistered as g}from"./theming/ThemeRegistered.js";let o=!1,r;const m=new u,h=()=>o,P=e=>{if(!o){m.attachEvent("boot",e);return}e()},l=async()=>{if(r!==void 0)return r;const e=async n=>{if(y(),typeof document>"u"){n();return}g(S);const t=a("OpenUI5Support"),f=t?t.isOpenUI5Detected():!1,s=a("F6Navigation");t&&await t.init(),s&&!f&&s.init(),await d(),await p(i()),t&&t.attachListeners(),v(),c(),n(),o=!0,m.fireEvent("boot")};return r=new Promise(e),r},S=e=>{o&&e===i()&&p(i())};export{l as boot,P as attachBoot,h as isBooted};
//# sourceMappingURL=Boot.js.map

@@ -1,2 +0,2 @@

"use strict";const e={version:"2.3.0-rc.1",major:2,minor:3,patch:0,suffix:"-rc.1",isNext:!1,buildTime:1726128478};export default e;
"use strict";const e={version:"2.3.0-rc.2",major:2,minor:3,patch:0,suffix:"-rc.2",isNext:!1,buildTime:1726733301};export default e;
//# sourceMappingURL=VersionInfo.js.map

@@ -1,2 +0,2 @@

"use strict";import"@ui5/webcomponents-base/dist/ssr-dom.js";import U from"./thirdparty/merge.js";import{boot as T}from"./Boot.js";import L from"./UI5ElementMetadata.js";import S from"./EventProvider.js";import F from"./updateShadowRoot.js";import{shouldIgnoreCustomElement as N}from"./IgnoreCustomElements.js";import{renderDeferred as V,renderImmediately as k,cancelRender as j}from"./Render.js";import{registerTag as $,isTagRegistered as x,recordTagRegistrationFailure as z}from"./CustomElementsRegistry.js";import{observeDOMNode as H,unobserveDOMNode as q}from"./DOMObserver.js";import{skipOriginalEvent as W}from"./config/NoConflict.js";import K from"./locale/getEffectiveDir.js";import{kebabToCamelCase as g,camelToKebabCase as B,kebabToPascalCase as G}from"./util/StringHelper.js";import w from"./util/isValidPropertyName.js";import{getSlotName as J,getSlottedNodesList as b}from"./util/SlotsHelper.js";import Q from"./util/arraysAreEqual.js";import{markAsRtlAware as X}from"./locale/RTLAwareRegistry.js";import Y from"./renderer/executeTemplate.js";import{updateFormValue as Z,setFormValue as R}from"./features/InputElementsFormSupport.js";import{getComponentFeature as tt,subscribeForFeatureLoad as et}from"./FeaturesRegistry.js";let nt=0;const P=new Map,M=new Map,D={fromAttribute(d,u){return u===Boolean?d!==null:u===Number?d===null?void 0:parseFloat(d):d},toAttribute(d,u){return u===Boolean?d?"":null:u===Object||u===Array||d==null?null:String(d)}};function y(d){this._suppressInvalidation||(this.onInvalidation(d),this._changedState.push(d),V(this),this._invalidationEventProvider.fireEvent("invalidate",{...d,target:this}))}function st(d,u){do{const t=Object.getOwnPropertyDescriptor(d,u);if(t)return t;d=Object.getPrototypeOf(d)}while(d&&d!==HTMLElement.prototype)}class I extends HTMLElement{constructor(){super();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 S,this._componentStateFinalizedEventProvider=new S;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.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_${++nt}`),this.__id}render(){const t=this.constructor.template;return Y(t,this)}async connectedCallback(){const t=this.constructor;this.setAttribute(t.getMetadata().getPureTag(),""),t.getMetadata().supportsF6FastNavigation()&&this.setAttribute("data-sap-ui-fastnavgroup","true");const e=t.getMetadata().slotsAreManaged();this._inDOM=!0,e&&(this._startObservingDOMChildren(),await this._processChildren()),this._inDOM&&(k(this),this._domRefReadyPromise._deferredResolve(),this._fullyConnected=!0,this.onEnterDOM())}disconnectedCallback(){const e=this.constructor.getMetadata().slotsAreManaged();this._inDOM=!1,e&&this._stopObservingDOMChildren(),this._fullyConnected&&(this.onExitDOM(),this._fullyConnected=!1),this._domRefReadyPromise._deferredResolve(),j(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};H(this,this._processChildren.bind(this),o)}_stopObservingDOMChildren(){q(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[r,f]of Object.entries(e)){const c=f.propertyName||r;a.set(c,r),o.set(c,[...this._state[c]]),this._clearSlot(r,f)}const l=new Map,i=new Map,h=n.map(async(r,f)=>{const c=J(r),m=e[c];if(m===void 0){if(c!=="default"){const p=Object.keys(e).join(", ");console.warn(`Unknown slotName: ${c}, ignoring`,r,`Valid values are: ${p}`)}return}if(m.individualSlots){const p=(l.get(c)||0)+1;l.set(c,p),r._individualSlot=`${c}-${p}`}if(r instanceof HTMLElement){const p=r.localName;if(p.includes("-")&&!N(p)){if(!customElements.get(p)){const A=customElements.whenDefined(p);let E=P.get(p);E||(E=new Promise(O=>setTimeout(O,1e3)),P.set(p,E)),await Promise.race([A,E])}customElements.upgrade(r)}}if(r=t.getMetadata().constructor.validateSlotValue(r,m),v(r)&&m.invalidateOnChildChange){const p=this._getChildChangeListener(c);r.attachInvalidate.call(r,p)}r instanceof HTMLSlotElement&&this._attachSlotChange(r,c,!!m.invalidateOnChildChange);const C=m.propertyName||c;i.has(C)?i.get(C).push({child:r,idx:f}):i.set(C,[{child:r,idx:f}])});await Promise.all(h),i.forEach((r,f)=>{this._state[f]=r.sort((c,m)=>c.idx-m.idx).map(c=>c.child),this._state[g(f)]=this._state[f]});let _=!1;for(const[r,f]of Object.entries(e)){const c=f.propertyName||r;Q(o.get(c),this._state[c])||(y.call(this,{type:"slot",name:a.get(c),reason:"children"}),_=!0,t.getMetadata().isFormAssociated()&&R(this))}_||y.call(this,{type:"slot",name:"default",reason:"textcontent"})}_clearSlot(t,e){const s=e.propertyName||t;this._state[s].forEach(o=>{if(v(o)){const a=this._getChildChangeListener(t);o.detachInvalidate.call(o,a)}o instanceof HTMLSlotElement&&this._detachSlotChange(o,t)}),this._state[s]=[],this._state[g(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)&&y.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-/,""),l=g(a);if(o.hasOwnProperty(l)){const i=o[l];n=(i.converter??D).fromAttribute(s,i.type),this[l]=n}}formAssociatedCallback(){this.constructor.getMetadata().isFormAssociated()&&Z(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],a=B(t),i=(o.converter||D).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(v(i)){const h=this._getChildChangeListener(e);i.detachInvalidate.call(i,h)}});const l=b([t]);this._slotsAssignedNodes.set(t,l),l.forEach(i=>{if(v(i)){const h=this._getChildChangeListener(e);i.attachInvalidate.call(i,h)}})}})}_detachSlotChange(t,e){t.removeEventListener("slotchange",this._getSlotChangeListener(e))}_onSlotChange(t){y.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()&&F(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?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=G(t);return a!==t?o&&this._fireEvent(a,e,s,n):o}_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(W(t))return a;const l=new CustomEvent(t,{detail:e,composed:!1,bubbles:n,cancelable:s});return this.dispatchEvent(l)&&a}getSlottedNodes(t){return b(this[t])}attachComponentStateFinalized(t){this._componentStateFinalizedEventProvider.attachEvent("componentStateFinalized",t)}detachComponentStateFinalized(t){this._componentStateFinalizedEventProvider.detachEvent("componentStateFinalized",t)}get effectiveDir(){return X(this.constructor),K(this)}get isUI5Element(){return!0}get classes(){return{}}get accessibilityInfo(){return{}}static get observedAttributes(){return this.getMetadata().getAttributesList()}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=st(t,n);let l;a?.set&&(l=a.set);let i;a?.get&&(i=a.get),Object.defineProperty(t,n,{get(){return i?i.call(this):this._state[n]},set(h){const _=this.constructor,r=i?i.call(this):this._state[n];r!==h&&(l?l.call(this,h):this._state[n]=h,y.call(this,{type:"property",name:n,newValue:h,oldValue:r}),this._rendered&&this._updateAttribute(n,h),_.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 l=a.propertyName||o,i={get(){return this._state[l]!==void 0?this._state[l]:[]},set(){throw new Error("Cannot set slot content directly, use the DOM APIs (appendChild, removeChild, etc...)")}};Object.defineProperty(t,l,i),l!==g(l)&&Object.defineProperty(t,g(l),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 whenDependenciesDefined(){return Promise.all(this.getUniqueDependencies().map(t=>t.define()))}static async onDefine(){return Promise.resolve()}static async define(){await T(),await Promise.all([this.whenDependenciesDefined(),this.onDefine()]);const t=this.getMetadata().getTag();this.getMetadata().getFeatures().forEach(o=>{tt(o)&&this.cacheUniqueDependencies(),et(o,this,this.cacheUniqueDependencies.bind(this))});const s=x(t),n=customElements.get(t);return n&&!s?z(t):n||(this._generateAccessors(),$(t),customElements.define(t,this)),this}static getMetadata(){if(this.hasOwnProperty("_metadata"))return this._metadata;const t=[this.metadata];let e=this;for(;e!==I;)e=Object.getPrototypeOf(e),t.unshift(e.metadata);const s=U({},...t);return this._metadata=new L(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 v=d=>"isUI5Element"in d;export default I;export{v as instanceOfUI5Element};
"use strict";import"@ui5/webcomponents-base/dist/ssr-dom.js";import U from"./thirdparty/merge.js";import{boot as T}from"./Boot.js";import L from"./UI5ElementMetadata.js";import S from"./EventProvider.js";import F from"./updateShadowRoot.js";import{shouldIgnoreCustomElement as N}from"./IgnoreCustomElements.js";import{renderDeferred as V,renderImmediately as k,cancelRender as j}from"./Render.js";import{registerTag as $,isTagRegistered as x,recordTagRegistrationFailure as z}from"./CustomElementsRegistry.js";import{observeDOMNode as H,unobserveDOMNode as W}from"./DOMObserver.js";import{skipOriginalEvent as q}from"./config/NoConflict.js";import K from"./locale/getEffectiveDir.js";import{kebabToCamelCase as g,camelToKebabCase as B,kebabToPascalCase as G}from"./util/StringHelper.js";import w from"./util/isValidPropertyName.js";import{getSlotName as J,getSlottedNodesList as b}from"./util/SlotsHelper.js";import Q from"./util/arraysAreEqual.js";import{markAsRtlAware as X}from"./locale/RTLAwareRegistry.js";import Y from"./renderer/executeTemplate.js";import{updateFormValue as Z,setFormValue as P}from"./features/InputElementsFormSupport.js";import{getComponentFeature as tt,subscribeForFeatureLoad as et}from"./FeaturesRegistry.js";let nt=0;const R=new Map,M=new Map,D={fromAttribute(d,u){return u===Boolean?d!==null:u===Number?d===null?void 0:parseFloat(d):d},toAttribute(d,u){return u===Boolean?d?"":null:u===Object||u===Array||d==null?null:String(d)}};function y(d){this._suppressInvalidation||(this.onInvalidation(d),this._changedState.push(d),V(this),this._invalidationEventProvider.fireEvent("invalidate",{...d,target:this}))}function st(d,u){do{const t=Object.getOwnPropertyDescriptor(d,u);if(t)return t;d=Object.getPrototypeOf(d)}while(d&&d!==HTMLElement.prototype)}class I extends HTMLElement{constructor(){super();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 S,this._componentStateFinalizedEventProvider=new S;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.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_${++nt}`),this.__id}render(){const t=this.constructor.template;return Y(t,this)}async connectedCallback(){const t=this.constructor;this.setAttribute(t.getMetadata().getPureTag(),""),t.getMetadata().supportsF6FastNavigation()&&this.setAttribute("data-sap-ui-fastnavgroup","true");const e=t.getMetadata().slotsAreManaged();this._inDOM=!0,e&&(this._startObservingDOMChildren(),await this._processChildren()),this._inDOM&&(t.asyncFinished||await t.definePromise,k(this),this._domRefReadyPromise._deferredResolve(),this._fullyConnected=!0,this.onEnterDOM())}disconnectedCallback(){const e=this.constructor.getMetadata().slotsAreManaged();this._inDOM=!1,e&&this._stopObservingDOMChildren(),this._fullyConnected&&(this.onExitDOM(),this._fullyConnected=!1),this._domRefReadyPromise._deferredResolve(),j(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};H(this,this._processChildren.bind(this),o)}_stopObservingDOMChildren(){W(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[r,f]of Object.entries(e)){const c=f.propertyName||r;a.set(c,r),o.set(c,[...this._state[c]]),this._clearSlot(r,f)}const l=new Map,i=new Map,h=n.map(async(r,f)=>{const c=J(r),m=e[c];if(m===void 0){if(c!=="default"){const p=Object.keys(e).join(", ");console.warn(`Unknown slotName: ${c}, ignoring`,r,`Valid values are: ${p}`)}return}if(m.individualSlots){const p=(l.get(c)||0)+1;l.set(c,p),r._individualSlot=`${c}-${p}`}if(r instanceof HTMLElement){const p=r.localName;if(p.includes("-")&&!N(p)){if(!customElements.get(p)){const A=customElements.whenDefined(p);let E=R.get(p);E||(E=new Promise(O=>setTimeout(O,1e3)),R.set(p,E)),await Promise.race([A,E])}customElements.upgrade(r)}}if(r=t.getMetadata().constructor.validateSlotValue(r,m),v(r)&&m.invalidateOnChildChange){const p=this._getChildChangeListener(c);r.attachInvalidate.call(r,p)}r instanceof HTMLSlotElement&&this._attachSlotChange(r,c,!!m.invalidateOnChildChange);const C=m.propertyName||c;i.has(C)?i.get(C).push({child:r,idx:f}):i.set(C,[{child:r,idx:f}])});await Promise.all(h),i.forEach((r,f)=>{this._state[f]=r.sort((c,m)=>c.idx-m.idx).map(c=>c.child),this._state[g(f)]=this._state[f]});let _=!1;for(const[r,f]of Object.entries(e)){const c=f.propertyName||r;Q(o.get(c),this._state[c])||(y.call(this,{type:"slot",name:a.get(c),reason:"children"}),_=!0,t.getMetadata().isFormAssociated()&&P(this))}_||y.call(this,{type:"slot",name:"default",reason:"textcontent"})}_clearSlot(t,e){const s=e.propertyName||t;this._state[s].forEach(o=>{if(v(o)){const a=this._getChildChangeListener(t);o.detachInvalidate.call(o,a)}o instanceof HTMLSlotElement&&this._detachSlotChange(o,t)}),this._state[s]=[],this._state[g(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)&&y.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-/,""),l=g(a);if(o.hasOwnProperty(l)){const i=o[l];n=(i.converter??D).fromAttribute(s,i.type),this[l]=n}}formAssociatedCallback(){this.constructor.getMetadata().isFormAssociated()&&Z(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],a=B(t),i=(o.converter||D).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(v(i)){const h=this._getChildChangeListener(e);i.detachInvalidate.call(i,h)}});const l=b([t]);this._slotsAssignedNodes.set(t,l),l.forEach(i=>{if(v(i)){const h=this._getChildChangeListener(e);i.attachInvalidate.call(i,h)}})}})}_detachSlotChange(t,e){t.removeEventListener("slotchange",this._getSlotChangeListener(e))}_onSlotChange(t){y.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()&&F(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?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=G(t);return a!==t?o&&this._fireEvent(a,e,s,n):o}_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 l=new CustomEvent(t,{detail:e,composed:!1,bubbles:n,cancelable:s});return this.dispatchEvent(l)&&a}getSlottedNodes(t){return b(this[t])}attachComponentStateFinalized(t){this._componentStateFinalizedEventProvider.attachEvent("componentStateFinalized",t)}detachComponentStateFinalized(t){this._componentStateFinalizedEventProvider.detachEvent("componentStateFinalized",t)}get effectiveDir(){return X(this.constructor),K(this)}get isUI5Element(){return!0}get classes(){return{}}get accessibilityInfo(){return{}}static get observedAttributes(){return this.getMetadata().getAttributesList()}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=st(t,n);let l;a?.set&&(l=a.set);let i;a?.get&&(i=a.get),Object.defineProperty(t,n,{get(){return i?i.call(this):this._state[n]},set(h){const _=this.constructor,r=i?i.call(this):this._state[n];r!==h&&(l?l.call(this,h):this._state[n]=h,y.call(this,{type:"property",name:n,newValue:h,oldValue:r}),this._rendered&&this._updateAttribute(n,h),_.getMetadata().isFormAssociated()&&P(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 l=a.propertyName||o,i={get(){return this._state[l]!==void 0?this._state[l]:[]},set(){throw new Error("Cannot set slot content directly, use the DOM APIs (appendChild, removeChild, etc...)")}};Object.defineProperty(t,l,i),l!==g(l)&&Object.defineProperty(t,g(l),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 async define(){this.definePromise=Promise.all([T(),this.onDefine()]);const t=this.getMetadata().getTag();this.getMetadata().getFeatures().forEach(o=>{tt(o)&&this.cacheUniqueDependencies(),et(o,this,this.cacheUniqueDependencies.bind(this))});const s=x(t),n=customElements.get(t);return n&&!s?z(t):n||(this._generateAccessors(),$(t),customElements.define(t,this)),await this.definePromise,this.asyncFinished=!0,this}static getMetadata(){if(this.hasOwnProperty("_metadata"))return this._metadata;const t=[this.metadata];let e=this;for(;e!==I;)e=Object.getPrototypeOf(e),t.unshift(e.metadata);const s=U({},...t);return this._metadata=new L(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 v=d=>"isUI5Element"in d;export default I;export{v as instanceOfUI5Element};
//# sourceMappingURL=UI5Element.js.map

@@ -348,6 +348,2 @@ import "@ui5/webcomponents-base/dist/ssr-dom.js";

/**
* Returns a promise that resolves whenever all dependencies for this UI5 Web Component have resolved
*/
static whenDependenciesDefined(): Promise<Array<typeof UI5Element>>;
/**
* Hook that will be called upon custom element definition

@@ -358,2 +354,4 @@ *

static onDefine(): Promise<void>;
static asyncFinished: boolean;
static definePromise: Promise<[void, void]> | undefined;
/**

@@ -381,2 +379,2 @@ * Registers a UI5 Web Component in the browser window object

export { instanceOfUI5Element, };
export type { ChangeInfo, Renderer, RendererOptions, };
export type { ChangeInfo, InvalidationInfo, Renderer, RendererOptions, };

@@ -205,2 +205,5 @@ // eslint-disable-next-line import/no-extraneous-dependencies

}
if (!ctor.asyncFinished) {
await ctor.definePromise;
}
renderImmediately(this);

@@ -981,8 +984,2 @@ this._domRefReadyPromise._deferredResolve();

/**
* Returns a promise that resolves whenever all dependencies for this UI5 Web Component have resolved
*/
static whenDependenciesDefined() {
return Promise.all(this.getUniqueDependencies().map(dep => dep.define()));
}
/**
* Hook that will be called upon custom element definition

@@ -1000,5 +997,4 @@ *

static async define() {
await boot();
await Promise.all([
this.whenDependenciesDefined(),
this.definePromise = Promise.all([
boot(),
this.onDefine(),

@@ -1024,2 +1020,4 @@ ]);

}
await this.definePromise;
this.asyncFinished = true;
return this;

@@ -1026,0 +1024,0 @@ }

@@ -7,11 +7,7 @@ import type UI5Element from "../UI5Element.js";

_changedState: import("../UI5Element.js").ChangeInfo[];
_invalidationEventProvider: import("../EventProvider.js").default<import("../UI5Element.js").ChangeInfo & {
target: UI5Element;
}, void>;
_invalidationEventProvider: import("../EventProvider.js").default<import("../UI5Element.js").InvalidationInfo, void>;
_componentStateFinalizedEventProvider: import("../EventProvider.js").default<void, void>;
_inDOM: boolean;
_fullyConnected: boolean;
_childChangeListeners: Map<string, (param: import("../UI5Element.js").ChangeInfo & {
target: UI5Element;
}) => void>;
_childChangeListeners: Map<string, (param: import("../UI5Element.js").InvalidationInfo) => void>;
_slotsAssignedNodes: WeakMap<HTMLSlotElement, Node[]>;

@@ -43,8 +39,4 @@ _slotChangeListeners: Map<string, (this: HTMLSlotElement, ev: Event) => void>;

_clearSlot(slotName: string, slotData: import("../UI5ElementMetadata.js").Slot): void;
attachInvalidate(callback: (param: import("../UI5Element.js").ChangeInfo & {
target: UI5Element;
}) => void): void;
detachInvalidate(callback: (param: import("../UI5Element.js").ChangeInfo & {
target: UI5Element;
}) => void): void;
attachInvalidate(callback: (param: import("../UI5Element.js").InvalidationInfo) => void): void;
detachInvalidate(callback: (param: import("../UI5Element.js").InvalidationInfo) => void): void;
_onChildChange(slotName: string, childChangeInfo: import("../UI5Element.js").ChangeInfo): void;

@@ -54,5 +46,3 @@ attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;

_updateAttribute(name: string, newValue: import("../UI5ElementMetadata.js").PropertyValue): void;
_getChildChangeListener(slotName: string): (param: import("../UI5Element.js").ChangeInfo & {
target: UI5Element;
}) => void;
_getChildChangeListener(slotName: string): (param: import("../UI5Element.js").InvalidationInfo) => void;
_getSlotChangeListener(slotName: string): (this: HTMLSlotElement, ev: Event) => void;

@@ -423,4 +413,5 @@ _attachSlotChange(slot: HTMLSlotElement, slotName: string, invalidateOnChildChange: boolean): void;

getUniqueDependencies(this: typeof UI5Element): (typeof UI5Element)[];
whenDependenciesDefined(): Promise<(typeof UI5Element)[]>;
onDefine(): Promise<void>;
asyncFinished: boolean;
definePromise: Promise<[void, void]> | undefined;
define(): Promise<typeof UI5Element>;

@@ -427,0 +418,0 @@ getMetadata(): import("../UI5ElementMetadata.js").default;

{
"name": "@ui5/webcomponents-base",
"version": "2.3.0-rc.1",
"version": "2.3.0-rc.2",
"description": "UI5 Web Components: webcomponents.base",

@@ -55,3 +55,3 @@ "author": "SAP SE (https://www.sap.com)",

"@openui5/sap.ui.core": "1.120.17",
"@ui5/webcomponents-tools": "2.3.0-rc.1",
"@ui5/webcomponents-tools": "2.3.0-rc.2",
"chromedriver": "^127.0.3",

@@ -67,3 +67,3 @@ "clean-css": "^5.2.2",

},
"gitHead": "90bac41605bb8923c5e2546645d900b1f333b669"
"gitHead": "0b5a320e502e0b83a5e7dc45898e1115dce13b81"
}

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc