@ui5/webcomponents-base 1.13.0-rc.3 → 1.13.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.
Files changed (35) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/dist/InitialConfiguration.js.map +1 -1
  3. package/dist/UI5Element.d.ts +2 -0
  4. package/dist/UI5Element.js +11 -2
  5. package/dist/UI5Element.js.map +1 -1
  6. package/dist/asset-registries/LocaleData.js.map +1 -1
  7. package/dist/assets/{Boot.05e92e0f.js → Boot.d185ba4a.js} +1 -1
  8. package/dist/assets/bundle.esm.30024c9b.js +50 -0
  9. package/dist/assets/test/pages/{Boot.html.2b08a2af.js → Boot.html.827eeec6.js} +1 -1
  10. package/dist/assets/test/pages/{i18n.html.19a91def.js → i18n.html.a4b91269.js} +1 -1
  11. package/dist/assets/test/pages/{i18n_texts.html.e39dce74.js → i18n_texts.html.0618181d.js} +1 -1
  12. package/dist/generated/VersionInfo.js +3 -3
  13. package/dist/generated/templates/elements/WithComplexTemplateTemplate.lit.d.ts +4 -0
  14. package/dist/generated/templates/elements/WithComplexTemplateTemplate.lit.js +8 -10
  15. package/dist/generated/templates/elements/WithComplexTemplateTemplate.lit.js.map +1 -0
  16. package/dist/locale/RTLAwareRegistry.d.ts +1 -1
  17. package/dist/locale/RTLAwareRegistry.js.map +1 -1
  18. package/dist/renderer/executeTemplate.js +1 -1
  19. package/dist/renderer/executeTemplate.js.map +1 -1
  20. package/dist/test/pages/AllTestElements.html +2 -2
  21. package/dist/test/pages/Boot.html +2 -2
  22. package/dist/test/pages/Configuration.html +2 -2
  23. package/dist/test/pages/ConfigurationScript.html +2 -2
  24. package/dist/test/pages/WithComplexTemplate.html +2 -2
  25. package/dist/test/pages/i18n.html +3 -3
  26. package/dist/test/pages/i18n_texts.html +3 -3
  27. package/dist/types.d.ts +1 -1
  28. package/dist/types.js.map +1 -1
  29. package/dist/updateShadowRoot.js +7 -4
  30. package/dist/updateShadowRoot.js.map +1 -1
  31. package/dist/util/getClassCopy.d.ts +2 -0
  32. package/package-scripts.cjs +1 -1
  33. package/package.json +3 -3
  34. package/tsconfig.json +2 -1
  35. package/dist/assets/bundle.esm.5f473016.js +0 -50
@@ -0,0 +1,50 @@
1
+ import{f as ge,g as me,a as gt,r as Vt,s as Ut,b as Ft,E as J,c as X,d as ye,e as jt,h as _e,i as zt,j as ve,k as Ae,l as $e,m as we,n as Ce,o as Se,p as be,q as Ee,t as Me,u as Te,v as xe,w as C,x as De,y as Ie,z as Wt,A as Le,B as Pe,C as Ne,_ as Oe,D as Re}from"./Boot.d185ba4a.js";const He=/('')|'([^']+(?:''[^']*)*)(?:'|$)|\{([0-9]+(?:\s*,[^{}]*)?)\}|[{}]/g,ke=(s,t)=>(t=t||[],s.replace(He,(e,n,i,r,o)=>{if(n)return"'";if(i)return i.replace(/''/g,"'");if(r){const c=typeof r=="string"?parseInt(r):r;return String(t[c])}throw new Error(`[i18n]: pattern syntax error at pos ${o}`)})),Q=new Map;class Be{constructor(t){this.packageName=t}getText(t,...e){if(typeof t=="string"&&(t={key:t,defaultText:t}),!t||!t.key)return"";const n=me(this.packageName);n&&!n[t.key]&&console.warn(`Key ${t.key} not found in the i18n bundle, the default text will be used`);const i=n&&n[t.key]?n[t.key]:t.defaultText||t.key;return ke(i,e)}}const Ve=s=>{if(Q.has(s))return Q.get(s);const t=new Be(s);return Q.set(s,t),t},Ue=async s=>(await ge(s),Ve(s)),Fe=gt("PopupUtilsData",{currentZIndex:100}),At=()=>Fe.currentZIndex,A=()=>{var s,t,e;return(e=(t=(s=window.sap)==null?void 0:s.ui)==null?void 0:t.getCore)==null?void 0:e.call(t)};class mt{static isLoaded(){return!!A()}static init(){const t=A();return t?new Promise(e=>{t.attachInit(()=>{window.sap.ui.require(["sap/ui/core/LocaleData","sap/ui/core/Popup"],(n,i)=>{i.setInitialZIndex(At()),e()})})}):Promise.resolve()}static getConfigurationSettingsObject(){const t=A();if(!t)return;const e=t.getConfiguration(),n=window.sap.ui.require("sap/ui/core/LocaleData");return{animationMode:e.getAnimationMode(),language:e.getLanguage(),theme:e.getTheme(),themeRoot:e.getThemeRoot(),rtl:e.getRTL(),timezone:e.getTimezone(),calendarType:e.getCalendarType(),formatSettings:{firstDayOfWeek:n?n.getInstance(e.getLocale()).getFirstDayOfWeek():void 0,legacyDateCalendarCustomizing:e.getFormatSettings().getLegacyDateCalendarCustomizing()}}}static getLocaleDataObject(){const t=A();if(!t)return;const e=t.getConfiguration();return window.sap.ui.require("sap/ui/core/LocaleData").getInstance(e.getLocale())._get()}static _listenForThemeChange(){const t=A(),e=t.getConfiguration();t.attachThemeChanged(async()=>{await Ut(e.getTheme())})}static attachListeners(){!A()||mt._listenForThemeChange()}static cssVariablesLoaded(){if(!A())return;const e=[...document.head.children].find(n=>n.id==="sap-ui-theme-sap.ui.core");if(!!e)return!!e.href.match(/\/css(-|_)variables\.css/)}static getNextZIndex(){return A()?window.sap.ui.require("sap/ui/core/Popup").getNextZIndex():void 0}static setInitialZIndex(){if(!A())return;window.sap.ui.require("sap/ui/core/Popup").setInitialZIndex(At())}}Vt("OpenUI5Support",mt);const tt=new Map,et=new Map,$t=s=>{if(!tt.has(s)){const t=je(s.split("-"));tt.set(s,t)}return tt.get(s)},qt=s=>{if(!et.has(s)){const t=s.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();et.set(s,t)}return et.get(s)},je=s=>s.map((t,e)=>e===0?t.toLowerCase():t.charAt(0).toUpperCase()+t.slice(1).toLowerCase()).join(""),ze=s=>{if(!(s instanceof HTMLElement))return"default";const t=s.getAttribute("slot");if(t){const e=t.match(/^(.+?)-\d+$/);return e?e[1]:t}return"default"},Zt=s=>s instanceof HTMLSlotElement?s.assignedNodes({flatten:!0}).filter(t=>t instanceof HTMLElement):[s],We=s=>s.reduce((t,e)=>t.concat(Zt(e)),[]);let qe,wt={include:[/^ui5-/],exclude:[]};const st=new Map,Gt=()=>qe,ut=s=>{if(!st.has(s)){const t=wt.include.some(e=>s.match(e))&&!wt.exclude.some(e=>s.match(e));st.set(s,t)}return st.get(s)},Kt=s=>{if(ut(s))return Gt()};class Ze{constructor(t){this.metadata=t}getInitialState(){if(Object.prototype.hasOwnProperty.call(this,"_initialState"))return this._initialState;const t={},e=this.slotsAreManaged(),n=this.getProperties();for(const i in n){const r=n[i].type,o=n[i].defaultValue;r===Boolean?(t[i]=!1,o!==void 0&&console.warn("The 'defaultValue' metadata key is ignored for all booleans properties, they would be initialized with 'false' by default")):n[i].multiple?t[i]=[]:r===Object?t[i]="defaultValue"in n[i]?n[i].defaultValue:{}:r===String?t[i]="defaultValue"in n[i]?n[i].defaultValue:"":t[i]=o}if(e){const i=this.getSlots();for(const[r,o]of Object.entries(i)){const c=o.propertyName||r;t[c]=[]}}return this._initialState=t,t}static validatePropertyValue(t,e){return e.multiple&&t?t.map(i=>Ct(i,e)):Ct(t,e)}static validateSlotValue(t,e){return Ge(t,e)}getPureTag(){return this.metadata.tag||""}getTag(){const t=this.metadata.tag;if(!t)return"";const e=Kt(t);return e?`${t}-${e}`:t}hasAttribute(t){const e=this.getProperties()[t];return e.type!==Object&&!e.noAttribute&&!e.multiple}getPropertiesList(){return Object.keys(this.getProperties())}getAttributesList(){return this.getPropertiesList().filter(this.hasAttribute.bind(this)).map(qt)}canSlotText(){const t=this.getSlots().default;return t&&t.type===Node}hasSlots(){return!!Object.entries(this.getSlots()).length}hasIndividualSlots(){return this.slotsAreManaged()&&Object.values(this.getSlots()).some(t=>t.individualSlots)}slotsAreManaged(){return!!this.metadata.managedSlots}supportsF6FastNavigation(){return!!this.metadata.fastNavigation}getProperties(){return this.metadata.properties||(this.metadata.properties={}),this.metadata.properties}getEvents(){return this.metadata.events||(this.metadata.events={}),this.metadata.events}getSlots(){return this.metadata.slots||(this.metadata.slots={}),this.metadata.slots}isLanguageAware(){return!!this.metadata.languageAware}isThemeAware(){return!!this.metadata.themeAware}shouldInvalidateOnChildChange(t,e,n){const i=this.getSlots()[t].invalidateOnChildChange;if(i===void 0)return!1;if(typeof i=="boolean")return i;if(typeof i=="object"){if(e==="property"){if(i.properties===void 0)return!1;if(typeof i.properties=="boolean")return i.properties;if(Array.isArray(i.properties))return i.properties.includes(n);throw new Error("Wrong format for invalidateOnChildChange.properties: boolean or array is expected")}if(e==="slot"){if(i.slots===void 0)return!1;if(typeof i.slots=="boolean")return i.slots;if(Array.isArray(i.slots))return i.slots.includes(n);throw new Error("Wrong format for invalidateOnChildChange.slots: boolean or array is expected")}}throw new Error("Wrong format for invalidateOnChildChange: boolean or object is expected")}}const Ct=(s,t)=>{const e=t.type;let n=t.validator;return e&&e.isDataTypeClass&&(n=e),n?n.isValid(s)?s:t.defaultValue:!e||e===String?typeof s=="string"||typeof s>"u"||s===null?s:s.toString():e===Boolean?typeof s=="boolean"?s:!1:e===Object?typeof s=="object"?s:t.defaultValue:s in e?s:t.defaultValue},Ge=(s,t)=>(s&&Zt(s).forEach(e=>{if(!(e instanceof t.type))throw new Error(`The element is not of type ${t.type.toString()}`)}),s);class Ke extends HTMLElement{}customElements.get("ui5-static-area")||customElements.define("ui5-static-area",Ke);const Je=()=>gt("CustomStyle.eventProvider",new J),Xe="CustomCSSChange",yt=s=>{Je().attachEvent(Xe,s)},Ye=()=>gt("CustomStyle.customCSSFor",{});yt(s=>{Ft({tag:s})});const Qe=s=>{const t=Ye();return t[s]?t[s].join(""):""},ts=10,nt=s=>Array.isArray(s)?s.filter(t=>!!t).flat(ts).map(t=>typeof t=="string"?t:t.content).join(" "):typeof s=="string"?s:s.content,W=new Map;yt(s=>{W.delete(`${s}_normal`)});const Jt=(s,t=!1)=>{const e=s.getMetadata().getTag(),n=`${e}_${t?"static":"normal"}`,i=X("OpenUI5Enablement");if(!W.has(n)){let r,o="";if(i&&(o=nt(i.getBusyIndicatorStyles())),t)r=nt(s.staticAreaStyles);else{const c=Qe(e)||"";r=`${nt(s.styles)} ${c}`}r=`${r} ${o}`,W.set(n,r)}return W.get(n)},q=new Map;yt(s=>{q.delete(`${s}_normal`)});const es=(s,t=!1)=>{const n=`${s.getMetadata().getTag()}_${t?"static":"normal"}`;if(!q.has(n)){const i=Jt(s,t),r=new CSSStyleSheet;r.replaceSync(i),q.set(n,[r])}return q.get(n)},ht=(s,t=!1)=>{let e;const n=s.constructor,i=t?s.staticAreaItem.shadowRoot:s.shadowRoot;let r;if(t?r=s.renderStatic():r=s.render(),!i){console.warn("There is no shadow root to update");return}if(document.adoptedStyleSheets?i.adoptedStyleSheets=es(n,t):e=Jt(n,t),n.renderer){n.renderer(r,i,e,t,{host:s});return}n.render(r,i,e,t,{host:s})},ss="--_ui5_content_density",ns=s=>getComputedStyle(s).getPropertyValue(ss),is=s=>{const t=/\$([-a-z0-9A-Z._]+)(?::([^$]*))?\$/.exec(s);return t&&t[2]?t[2].split(/,/):null},rs={iw:"he",ji:"yi",in:"id",sh:"sr"},os=is("$cldr-rtl-locales:ar,fa,he$")||[],as=s=>(s=s&&rs[s]||s,os.indexOf(s)>=0),Xt=()=>{if(typeof document>"u")return!1;const s=ye();return s!==void 0?!!s:as(jt()||_e())},ls="--_ui5_dir",Yt=s=>{const t=window.document,e=["ltr","rtl"],n=getComputedStyle(s).getPropertyValue(ls);return e.includes(n)?n:e.includes(s.dir)?s.dir:e.includes(t.documentElement.dir)?t.documentElement.dir:e.includes(t.body.dir)?t.body.dir:Xt()?"rtl":void 0},z="ui5-static-area-item",cs="data-sap-ui-integration-popup-content";class R extends HTMLElement{constructor(){super(),this._rendered=!1,this.attachShadow({mode:"open"})}setOwnerElement(t){this.ownerElement=t,this.classList.add(this.ownerElement._id),this.ownerElement.hasAttribute("data-ui5-static-stable")&&this.setAttribute("data-ui5-stable",this.ownerElement.getAttribute("data-ui5-static-stable"))}update(){this._rendered&&(this._updateAdditionalAttrs(),this._updateContentDensity(),this._updateDirection(),ht(this.ownerElement,!0))}_updateContentDensity(){ns(this.ownerElement)==="compact"?(this.classList.add("sapUiSizeCompact"),this.classList.add("ui5-content-density-compact")):(this.classList.remove("sapUiSizeCompact"),this.classList.remove("ui5-content-density-compact"))}_updateDirection(){if(this.ownerElement){const t=Yt(this.ownerElement);t?this.setAttribute("dir",t):this.removeAttribute("dir")}}_updateAdditionalAttrs(){this.setAttribute(z,""),this.setAttribute(cs,"")}async getDomRef(){return this._updateContentDensity(),this._rendered||(this._rendered=!0,ht(this.ownerElement,!0)),await zt(),this.shadowRoot}static getTag(){const t=Kt(z);return t?`${z}-${t}`:z}static createInstance(){return customElements.get(R.getTag())||customElements.define(R.getTag(),R),document.createElement(this.getTag())}}const pt=new WeakMap,ds=(s,t,e)=>{const n=new MutationObserver(t);pt.set(s,n),n.observe(s,e)},us=s=>{const t=pt.get(s);t&&(t.disconnect(),pt.delete(s))},hs=["value-changed","click"];let Z;const ps=s=>hs.includes(s),fs=s=>{const t=_t();return!(typeof t!="boolean"&&t.events&&t.events.includes&&t.events.includes(s))},_t=()=>(Z===void 0&&(Z=ve()),Z),gs=s=>{Z=s},ms=s=>{const t=_t();return ps(s)?!1:t===!0?!0:!fs(s)},ys=["disabled","title","hidden","role","draggable"],St=s=>ys.includes(s)||s.startsWith("aria")?!0:![HTMLElement,Element,Node].some(e=>e.prototype.hasOwnProperty(s)),bt=(s,t)=>{if(s.length!==t.length)return!1;for(let e=0;e<s.length;e++)if(s[e]!==t[e])return!1;return!0},Et=(s,t)=>{const e=_s(t),n=Gt();return s.call(t,t,e,n)},_s=s=>{const t=s.constructor,e=t.getMetadata().getPureTag(),n=t.getUniqueDependencies().map(i=>i.getMetadata().getPureTag()).filter(ut);return ut(e)&&n.push(e),n};let vs=0;const Mt=new Map,it=new Map;function L(s){this._suppressInvalidation||(this.onInvalidation(s),this._changedState.push(s),xe(this),this._eventProvider.fireEvent("invalidate",{...s,target:this}))}class w extends HTMLElement{constructor(){super();const t=this.constructor;this._changedState=[],this._suppressInvalidation=!0,this._inDOM=!1,this._fullyConnected=!1,this._childChangeListeners=new Map,this._slotChangeListeners=new Map,this._eventProvider=new J;let e;this._domRefReadyPromise=new Promise(n=>{e=n}),this._domRefReadyPromise._deferredResolve=e,this._doNotSyncAttributes=new Set,this._state={...t.getMetadata().getInitialState()},this._upgradeAllProperties(),t._needsShadowDOM()&&this.attachShadow({mode:"open"})}get _id(){return this.__id||(this.__id=`ui5wc_${++vs}`),this.__id}render(){const t=this.constructor.template;return Et(t,this)}renderStatic(){const t=this.constructor.staticAreaTemplate;return Et(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&&(Ae(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.staticAreaItem&&this.staticAreaItem.parentElement&&this.staticAreaItem.parentElement.removeChild(this.staticAreaItem),$e(this)}onBeforeRendering(){}onAfterRendering(){}onEnterDOM(){}onExitDOM(){}_startObservingDOMChildren(){const t=this.constructor;if(!t.getMetadata().hasSlots())return;const n=t.getMetadata().canSlotText(),i={childList:!0,subtree:n,characterData:n};ds(this,this._processChildren.bind(this),i)}_stopObservingDOMChildren(){us(this)}async _processChildren(){this.constructor.getMetadata().hasSlots()&&await this._updateSlots()}async _updateSlots(){const t=this.constructor,e=t.getMetadata().getSlots(),n=t.getMetadata().canSlotText(),i=Array.from(n?this.childNodes:this.children),r=new Map,o=new Map;for(const[d,u]of Object.entries(e)){const h=u.propertyName||d;o.set(h,d),r.set(h,[...this._state[h]]),this._clearSlot(d,u)}const c=new Map,a=new Map,l=i.map(async(d,u)=>{const h=ze(d),f=e[h];if(f===void 0){if(h!=="default"){const g=Object.keys(e).join(", ");console.warn(`Unknown slotName: ${h}, ignoring`,d,`Valid values are: ${g}`)}return}if(f.individualSlots){const g=(c.get(h)||0)+1;c.set(h,g),d._individualSlot=`${h}-${g}`}if(d instanceof HTMLElement){const g=d.localName;if(g.includes("-")){if(!window.customElements.get(g)){const pe=window.customElements.whenDefined(g);let j=Mt.get(g);j||(j=new Promise(fe=>setTimeout(fe,1e3)),Mt.set(g,j)),await Promise.race([pe,j])}window.customElements.upgrade(d)}}if(d=t.getMetadata().constructor.validateSlotValue(d,f),Tt(d)&&f.invalidateOnChildChange){const g=this._getChildChangeListener(h);g&&d.attachInvalidate.call(d,g)}d instanceof HTMLSlotElement&&this._attachSlotChange(d,h);const m=f.propertyName||h;a.has(m)?a.get(m).push({child:d,idx:u}):a.set(m,[{child:d,idx:u}])});await Promise.all(l),a.forEach((d,u)=>{this._state[u]=d.sort((h,f)=>h.idx-f.idx).map(h=>h.child)});let p=!1;for(const[d,u]of Object.entries(e)){const h=u.propertyName||d;bt(r.get(h),this._state[h])||(L.call(this,{type:"slot",name:o.get(h),reason:"children"}),p=!0)}p||L.call(this,{type:"slot",name:"default",reason:"textcontent"})}_clearSlot(t,e){const n=e.propertyName||t;this._state[n].forEach(r=>{if(Tt(r)){const o=this._getChildChangeListener(t);o&&r.detachInvalidate.call(r,o)}r instanceof HTMLSlotElement&&this._detachSlotChange(r,t)}),this._state[n]=[]}attachInvalidate(t){this._eventProvider.attachEvent("invalidate",t)}detachInvalidate(t){this._eventProvider.detachEvent("invalidate",t)}_onChildChange(t,e){!this.constructor.getMetadata().shouldInvalidateOnChildChange(t,e.type,e.name)||L.call(this,{type:"slot",name:t,reason:"childchange",child:e.target})}attributeChangedCallback(t,e,n){let i;if(this._doNotSyncAttributes.has(t))return;const r=this.constructor.getMetadata().getProperties(),o=t.replace(/^ui5-/,""),c=$t(o);if(r.hasOwnProperty(c)){const a=r[c],l=a.type;let p=a.validator;l&&l.isDataTypeClass&&(p=l),p?i=p.attributeToProperty(n):l===Boolean?i=n!==null:i=n,this[c]=i}}_updateAttribute(t,e){const n=this.constructor;if(!n.getMetadata().hasAttribute(t))return;const r=n.getMetadata().getProperties()[t],o=r.type;let c=r.validator;const a=qt(t),l=this.getAttribute(a);if(o&&o.isDataTypeClass&&(c=o),c){const p=c.propertyToAttribute(e);p===null?(this._doNotSyncAttributes.add(a),this.removeAttribute(a),this._doNotSyncAttributes.delete(a)):this.setAttribute(a,p)}else o===Boolean?e===!0&&l===null?this.setAttribute(a,""):e===!1&&l!==null&&this.removeAttribute(a):typeof e!="object"&&l!==e&&this.setAttribute(a,e)}_upgradeProperty(t){if(this.hasOwnProperty(t)){const e=this[t];delete this[t],this[t]=e}}_upgradeAllProperties(){this.constructor.getMetadata().getPropertiesList().forEach(this._upgradeProperty.bind(this))}_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){const n=this._getSlotChangeListener(e);n&&t.addEventListener("slotchange",n)}_detachSlotChange(t,e){t.removeEventListener("slotchange",this._getSlotChangeListener(e))}_onSlotChange(t){L.call(this,{type:"slot",name:t,reason:"slotchange"})}onInvalidation(t){}_render(){const t=this.constructor,e=t.getMetadata().hasIndividualSlots();this._suppressInvalidation=!0,this.onBeforeRendering(),this._onComponentStateFinalized&&this._onComponentStateFinalized(),this._suppressInvalidation=!1,this._changedState=[],t._needsShadowDOM()&&ht(this),this.staticAreaItem&&this.staticAreaItem.update(),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;const t=[...this.shadowRoot.children].filter(e=>!["link","style"].includes(e.localName));return t.length!==1&&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`),t[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&&typeof e.focus=="function"&&e.focus(t)}fireEvent(t,e,n=!1,i=!0){const r=this._fireEvent(t,e,n,i),o=$t(t);return o!==t?r&&this._fireEvent(o,e,n):r}_fireEvent(t,e,n=!1,i=!0){const r=new CustomEvent(`ui5-${t}`,{detail:e,composed:!1,bubbles:i,cancelable:n}),o=this.dispatchEvent(r);if(ms(t))return o;const c=new CustomEvent(t,{detail:e,composed:!1,bubbles:i,cancelable:n});return this.dispatchEvent(c)&&o}getSlottedNodes(t){return We(this[t])}get effectiveDir(){return we(this.constructor),Yt(this)}get isUI5Element(){return!0}get classes(){return{}}static get observedAttributes(){return this.getMetadata().getAttributesList()}static _needsShadowDOM(){return!!this.template||Object.prototype.hasOwnProperty.call(this.prototype,"render")}static _needsStaticArea(){return!!this.staticAreaTemplate||Object.prototype.hasOwnProperty.call(this.prototype,"renderStatic")}getStaticAreaItemDomRef(){if(!this.constructor._needsStaticArea())throw new Error("This component does not use the static area");return this.staticAreaItem||(this.staticAreaItem=R.createInstance(),this.staticAreaItem.setOwnerElement(this)),this.staticAreaItem.parentElement||Ce("ui5-static-area").appendChild(this.staticAreaItem),this.staticAreaItem.getDomRef()}static _generateAccessors(){const t=this.prototype,e=this.getMetadata().slotsAreManaged(),n=this.getMetadata().getProperties();for(const[i,r]of Object.entries(n)){if(St(i)||console.warn(`"${i}" is not a valid property name. Use a name that does not collide with DOM APIs`),r.type===Boolean&&r.defaultValue)throw new Error(`Cannot set a default value for property "${i}". All booleans are false by default.`);if(r.type===Array)throw new Error(`Wrong type for property "${i}". Properties cannot be of type Array - use "multiple: true" and set "type" to the single value type, such as "String", "Object", etc...`);if(r.type===Object&&r.defaultValue)throw new Error(`Cannot set a default value for property "${i}". All properties of type "Object" are empty objects by default.`);if(r.multiple&&r.defaultValue)throw new Error(`Cannot set a default value for property "${i}". All multiple properties are empty arrays by default.`);Object.defineProperty(t,i,{get(){if(this._state[i]!==void 0)return this._state[i];const o=r.defaultValue;return r.type===Boolean?!1:r.type===String?o:r.multiple?[]:o},set(o){let c;o=this.constructor.getMetadata().constructor.validatePropertyValue(o,r);const p=r.type;let d=r.validator;const u=this._state[i];p&&p.isDataTypeClass&&(d=p),d?c=!d.valuesAreEqual(u,o):Array.isArray(u)&&Array.isArray(o)&&r.multiple&&r.compareValues?c=!bt(u,o):c=u!==o,c&&(this._state[i]=o,L.call(this,{type:"property",name:i,newValue:o,oldValue:u}),this._updateAttribute(i,o))}})}if(e){const i=this.getMetadata().getSlots();for(const[r,o]of Object.entries(i)){St(r)||console.warn(`"${r}" is not a valid property name. Use a name that does not collide with DOM APIs`);const c=o.propertyName||r;Object.defineProperty(t,c,{get(){return this._state[c]!==void 0?this._state[c]:[]},set(){throw new Error("Cannot set slot content directly, use the DOM APIs (appendChild, removeChild, etc...)")}})}}}static get styles(){return""}static get staticAreaStyles(){return""}static get dependencies(){return[]}static getUniqueDependencies(){if(!it.has(this)){const t=this.dependencies.filter((e,n,i)=>i.indexOf(e)===n);it.set(this,t)}return it.get(this)||[]}static whenDependenciesDefined(){return Promise.all(this.getUniqueDependencies().map(t=>t.define()))}static async onDefine(){return Promise.resolve()}static async define(){await Se(),await Promise.all([this.whenDependenciesDefined(),this.onDefine()]);const t=this.getMetadata().getTag(),e=be(t),n=customElements.get(t);return n&&!e?Ee(t):n||(this._generateAccessors(),Me(t),window.customElements.define(t,this)),this}static getMetadata(){if(this.hasOwnProperty("_metadata"))return this._metadata;const t=[this.metadata];let e=this;for(;e!==w;)e=Object.getPrototypeOf(e),t.unshift(e.metadata);const n=Te({},...t);return this._metadata=new Ze(n),this._metadata}}w.metadata={};const Tt=s=>"isUI5Element"in s;/**
2
+ * @license
3
+ * Copyright 2017 Google LLC
4
+ * SPDX-License-Identifier: BSD-3-Clause
5
+ */var rt;const G=window,x=G.trustedTypes,xt=x?x.createPolicy("lit-html",{createHTML:s=>s}):void 0,K="$lit$",$=`lit$${(Math.random()+"").slice(9)}$`,vt="?"+$,As=`<${vt}>`,D=document,H=()=>D.createComment(""),k=s=>s===null||typeof s!="object"&&typeof s!="function",Qt=Array.isArray,te=s=>Qt(s)||typeof(s==null?void 0:s[Symbol.iterator])=="function",ot=`[
6
+ \f\r]`,P=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Dt=/-->/g,It=/>/g,S=RegExp(`>|${ot}(?:([^\\s"'>=/]+)(${ot}*=${ot}*(?:[^
7
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),Lt=/'/g,Pt=/"/g,ee=/^(?:script|style|textarea|title)$/i,$s=s=>(t,...e)=>({_$litType$:s,strings:t,values:e}),ws=$s(1),E=Symbol.for("lit-noChange"),y=Symbol.for("lit-nothing"),Nt=new WeakMap,T=D.createTreeWalker(D,129,null,!1),se=(s,t)=>{const e=s.length-1,n=[];let i,r=t===2?"<svg>":"",o=P;for(let a=0;a<e;a++){const l=s[a];let p,d,u=-1,h=0;for(;h<l.length&&(o.lastIndex=h,d=o.exec(l),d!==null);)h=o.lastIndex,o===P?d[1]==="!--"?o=Dt:d[1]!==void 0?o=It:d[2]!==void 0?(ee.test(d[2])&&(i=RegExp("</"+d[2],"g")),o=S):d[3]!==void 0&&(o=S):o===S?d[0]===">"?(o=i!=null?i:P,u=-1):d[1]===void 0?u=-2:(u=o.lastIndex-d[2].length,p=d[1],o=d[3]===void 0?S:d[3]==='"'?Pt:Lt):o===Pt||o===Lt?o=S:o===Dt||o===It?o=P:(o=S,i=void 0);const f=o===S&&s[a+1].startsWith("/>")?" ":"";r+=o===P?l+As:u>=0?(n.push(p),l.slice(0,u)+K+l.slice(u)+$+f):l+$+(u===-2?(n.push(void 0),a):f)}const c=r+(s[e]||"<?>")+(t===2?"</svg>":"");if(!Array.isArray(s)||!s.hasOwnProperty("raw"))throw Error("invalid template strings array");return[xt!==void 0?xt.createHTML(c):c,n]};class B{constructor({strings:t,_$litType$:e},n){let i;this.parts=[];let r=0,o=0;const c=t.length-1,a=this.parts,[l,p]=se(t,e);if(this.el=B.createElement(l,n),T.currentNode=this.el.content,e===2){const d=this.el.content,u=d.firstChild;u.remove(),d.append(...u.childNodes)}for(;(i=T.nextNode())!==null&&a.length<c;){if(i.nodeType===1){if(i.hasAttributes()){const d=[];for(const u of i.getAttributeNames())if(u.endsWith(K)||u.startsWith($)){const h=p[o++];if(d.push(u),h!==void 0){const f=i.getAttribute(h.toLowerCase()+K).split($),m=/([.?@])?(.*)/.exec(h);a.push({type:1,index:r,name:m[2],strings:f,ctor:m[1]==="."?ie:m[1]==="?"?re:m[1]==="@"?oe:V})}else a.push({type:6,index:r})}for(const u of d)i.removeAttribute(u)}if(ee.test(i.tagName)){const d=i.textContent.split($),u=d.length-1;if(u>0){i.textContent=x?x.emptyScript:"";for(let h=0;h<u;h++)i.append(d[h],H()),T.nextNode(),a.push({type:2,index:++r});i.append(d[u],H())}}}else if(i.nodeType===8)if(i.data===vt)a.push({type:2,index:r});else{let d=-1;for(;(d=i.data.indexOf($,d+1))!==-1;)a.push({type:7,index:r}),d+=$.length-1}r++}}static createElement(t,e){const n=D.createElement("template");return n.innerHTML=t,n}}function M(s,t,e=s,n){var i,r,o,c;if(t===E)return t;let a=n!==void 0?(i=e._$Co)===null||i===void 0?void 0:i[n]:e._$Cl;const l=k(t)?void 0:t._$litDirective$;return(a==null?void 0:a.constructor)!==l&&((r=a==null?void 0:a._$AO)===null||r===void 0||r.call(a,!1),l===void 0?a=void 0:(a=new l(s),a._$AT(s,e,n)),n!==void 0?((o=(c=e)._$Co)!==null&&o!==void 0?o:c._$Co=[])[n]=a:e._$Cl=a),a!==void 0&&(t=M(s,a._$AS(s,t.values),a,n)),t}class ne{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){var e;const{el:{content:n},parts:i}=this._$AD,r=((e=t==null?void 0:t.creationScope)!==null&&e!==void 0?e:D).importNode(n,!0);T.currentNode=r;let o=T.nextNode(),c=0,a=0,l=i[0];for(;l!==void 0;){if(c===l.index){let p;l.type===2?p=new I(o,o.nextSibling,this,t):l.type===1?p=new l.ctor(o,l.name,l.strings,this,t):l.type===6&&(p=new ae(o,this,t)),this._$AV.push(p),l=i[++a]}c!==(l==null?void 0:l.index)&&(o=T.nextNode(),c++)}return r}v(t){let e=0;for(const n of this._$AV)n!==void 0&&(n.strings!==void 0?(n._$AI(t,n,e),e+=n.strings.length-2):n._$AI(t[e])),e++}}class I{constructor(t,e,n,i){var r;this.type=2,this._$AH=y,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=n,this.options=i,this._$Cp=(r=i==null?void 0:i.isConnected)===null||r===void 0||r}get _$AU(){var t,e;return(e=(t=this._$AM)===null||t===void 0?void 0:t._$AU)!==null&&e!==void 0?e:this._$Cp}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return e!==void 0&&(t==null?void 0:t.nodeType)===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=M(this,t,e),k(t)?t===y||t==null||t===""?(this._$AH!==y&&this._$AR(),this._$AH=y):t!==this._$AH&&t!==E&&this._(t):t._$litType$!==void 0?this.g(t):t.nodeType!==void 0?this.$(t):te(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==y&&k(this._$AH)?this._$AA.nextSibling.data=t:this.$(D.createTextNode(t)),this._$AH=t}g(t){var e;const{values:n,_$litType$:i}=t,r=typeof i=="number"?this._$AC(t):(i.el===void 0&&(i.el=B.createElement(i.h,this.options)),i);if(((e=this._$AH)===null||e===void 0?void 0:e._$AD)===r)this._$AH.v(n);else{const o=new ne(r,this),c=o.u(this.options);o.v(n),this.$(c),this._$AH=o}}_$AC(t){let e=Nt.get(t.strings);return e===void 0&&Nt.set(t.strings,e=new B(t)),e}T(t){Qt(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let n,i=0;for(const r of t)i===e.length?e.push(n=new I(this.k(H()),this.k(H()),this,this.options)):n=e[i],n._$AI(r),i++;i<e.length&&(this._$AR(n&&n._$AB.nextSibling,i),e.length=i)}_$AR(t=this._$AA.nextSibling,e){var n;for((n=this._$AP)===null||n===void 0||n.call(this,!1,!0,e);t&&t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i}}setConnected(t){var e;this._$AM===void 0&&(this._$Cp=t,(e=this._$AP)===null||e===void 0||e.call(this,t))}}class V{constructor(t,e,n,i,r){this.type=1,this._$AH=y,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=r,n.length>2||n[0]!==""||n[1]!==""?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=y}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,n,i){const r=this.strings;let o=!1;if(r===void 0)t=M(this,t,e,0),o=!k(t)||t!==this._$AH&&t!==E,o&&(this._$AH=t);else{const c=t;let a,l;for(t=r[0],a=0;a<r.length-1;a++)l=M(this,c[n+a],e,a),l===E&&(l=this._$AH[a]),o||(o=!k(l)||l!==this._$AH[a]),l===y?t=y:t!==y&&(t+=(l!=null?l:"")+r[a+1]),this._$AH[a]=l}o&&!i&&this.j(t)}j(t){t===y?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t!=null?t:"")}}class ie extends V{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===y?void 0:t}}const Cs=x?x.emptyScript:"";class re extends V{constructor(){super(...arguments),this.type=4}j(t){t&&t!==y?this.element.setAttribute(this.name,Cs):this.element.removeAttribute(this.name)}}class oe extends V{constructor(t,e,n,i,r){super(t,e,n,i,r),this.type=5}_$AI(t,e=this){var n;if((t=(n=M(this,t,e,0))!==null&&n!==void 0?n:y)===E)return;const i=this._$AH,r=t===y&&i!==y||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,o=t!==y&&(i===y||r);r&&this.element.removeEventListener(this.name,this,i),o&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,n;typeof this._$AH=="function"?this._$AH.call((n=(e=this.options)===null||e===void 0?void 0:e.host)!==null&&n!==void 0?n:this.element,t):this._$AH.handleEvent(t)}}class ae{constructor(t,e,n){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(t){M(this,t)}}const Ss={O:K,P:$,A:vt,C:1,M:se,L:ne,D:te,R:M,I,V,H:re,N:oe,U:ie,F:ae},Ot=G.litHtmlPolyfillSupport;Ot==null||Ot(B,I),((rt=G.litHtmlVersions)!==null&&rt!==void 0?rt:G.litHtmlVersions=[]).push("2.7.2");const bs=(s,t,e)=>{var n,i;const r=(n=e==null?void 0:e.renderBefore)!==null&&n!==void 0?n:t;let o=r._$litPart$;if(o===void 0){const c=(i=e==null?void 0:e.renderBefore)!==null&&i!==void 0?i:null;r._$litPart$=o=new I(t.insertBefore(H(),c),c,void 0,e!=null?e:{})}return o._$AI(s),o};/**
8
+ * @license
9
+ * Copyright 2017 Google LLC
10
+ * SPDX-License-Identifier: BSD-3-Clause
11
+ */const le={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},Es=s=>(...t)=>({_$litDirective$:s,values:t});class ce{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,n){this._$Ct=t,this._$AM=e,this._$Ci=n}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}/**
12
+ * @license
13
+ * Copyright 2020 Google LLC
14
+ * SPDX-License-Identifier: BSD-3-Clause
15
+ */const{I:Ms}=Ss,Rt=()=>document.createComment(""),N=(s,t,e)=>{var n;const i=s._$AA.parentNode,r=t===void 0?s._$AB:t._$AA;if(e===void 0){const o=i.insertBefore(Rt(),r),c=i.insertBefore(Rt(),r);e=new Ms(o,c,s,s.options)}else{const o=e._$AB.nextSibling,c=e._$AM,a=c!==s;if(a){let l;(n=e._$AQ)===null||n===void 0||n.call(e,s),e._$AM=s,e._$AP!==void 0&&(l=s._$AU)!==c._$AU&&e._$AP(l)}if(o!==r||a){let l=e._$AA;for(;l!==o;){const p=l.nextSibling;i.insertBefore(l,r),l=p}}}return e},b=(s,t,e=s)=>(s._$AI(t,e),s),Ts={},xs=(s,t=Ts)=>s._$AH=t,Ds=s=>s._$AH,at=s=>{var t;(t=s._$AP)===null||t===void 0||t.call(s,!1,!0);let e=s._$AA;const n=s._$AB.nextSibling;for(;e!==n;){const i=e.nextSibling;e.remove(),e=i}};/**
16
+ * @license
17
+ * Copyright 2017 Google LLC
18
+ * SPDX-License-Identifier: BSD-3-Clause
19
+ */const Ht=(s,t,e)=>{const n=new Map;for(let i=t;i<=e;i++)n.set(s[i],i);return n},de=Es(class extends ce{constructor(s){if(super(s),s.type!==le.CHILD)throw Error("repeat() can only be used in text expressions")}dt(s,t,e){let n;e===void 0?e=t:t!==void 0&&(n=t);const i=[],r=[];let o=0;for(const c of s)i[o]=n?n(c,o):o,r[o]=e(c,o),o++;return{values:r,keys:i}}render(s,t,e){return this.dt(s,t,e).values}update(s,[t,e,n]){var i;const r=Ds(s),{values:o,keys:c}=this.dt(t,e,n);if(!Array.isArray(r))return this.ht=c,o;const a=(i=this.ht)!==null&&i!==void 0?i:this.ht=[],l=[];let p,d,u=0,h=r.length-1,f=0,m=o.length-1;for(;u<=h&&f<=m;)if(r[u]===null)u++;else if(r[h]===null)h--;else if(a[u]===c[f])l[f]=b(r[u],o[f]),u++,f++;else if(a[h]===c[m])l[m]=b(r[h],o[m]),h--,m--;else if(a[u]===c[m])l[m]=b(r[u],o[m]),N(s,l[m+1],r[u]),u++,m--;else if(a[h]===c[f])l[f]=b(r[h],o[f]),N(s,r[u],r[h]),h--,f++;else if(p===void 0&&(p=Ht(c,f,m),d=Ht(a,u,h)),p.has(a[u]))if(p.has(a[h])){const g=d.get(c[f]),F=g!==void 0?r[g]:null;if(F===null){const Y=N(s,r[u]);b(Y,o[f]),l[f]=Y}else l[f]=b(F,o[f]),N(s,r[u],F),r[g]=null;f++}else at(r[h]),h--;else at(r[u]),u++;for(;f<=m;){const g=N(s,l[m+1]);b(g,o[f]),l[f++]=g}for(;u<=h;){const g=r[u++];g!==null&&at(g)}return this.ht=c,xs(s,l),E}});/**
20
+ * @license
21
+ * Copyright 2018 Google LLC
22
+ * SPDX-License-Identifier: BSD-3-Clause
23
+ */const v=s=>s!=null?s:y;/**
24
+ * @license
25
+ * Copyright 2017 Google LLC
26
+ * SPDX-License-Identifier: BSD-3-Clause
27
+ */class kt extends ce{constructor(t){if(super(t),this.et=y,t.type!==le.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===y||t==null)return this.ft=void 0,this.et=t;if(t===E)return t;if(typeof t!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.et)return this.ft;this.et=t;const e=[t];return e.raw=e,this.ft={_$litType$:this.constructor.resultType,strings:e,values:[]}}}kt.directiveName="unsafeHTML",kt.resultType=1;const _=(s,...t)=>{const e=X("LitStatic");return(e?e.html:ws)(s,...t)},U=(s,t,e,n,i)=>{const r=X("OpenUI5Enablement");r&&!n&&(s=r.wrapTemplateResultInBusyMarkup(_,i.host,s)),typeof e=="string"?s=_`<style>${e}</style>${s}`:Array.isArray(e)&&e.length&&(s=_`${e.map(o=>_`<link type="text/css" rel="stylesheet" href="${o}">`)}${s}`),bs(s,t,i)},Is={tag:"ui5-test-generic",properties:{strProp:{type:String},boolProp:{type:Boolean},objectProp:{type:Object},noAttributeProp:{type:String,noAttribute:!0},multiProp:{type:String,multiple:!0},defaultValueProp:{type:String,defaultValue:"Hello"}},managedSlots:!0,slots:{default:{type:Node},other:{type:HTMLElement},individual:{type:HTMLElement,individualSlots:!0},named:{type:HTMLElement,propertyName:"items"}}};class ue extends w{static get metadata(){return Is}static get render(){return U}static get template(){return t=>_`<div><p>
28
+ <slot></slot>
29
+ <slot name="other"></slot>
30
+ <slot name="individual-1"></slot>
31
+ <slot name="individual-2"></slot>
32
+ </p></div>`}static get styles(){return`:host {
33
+ display: inline-block;
34
+ border: 1px solid black;
35
+ color: var(--var1);
36
+ }`}onBeforeRendering(){}onAfterRendering(){}onEnterDOM(){}onExitDOM(){}}ue.define();const Ls={tag:"ui5-test-no-shadow"};class Ps extends w{static get metadata(){return Ls}}Ps.define();const Ns={tag:"ui5-test-parent",managedSlots:!0,slots:{default:{type:Node,invalidateOnChildChange:{properties:["prop1"]}},items:{type:HTMLElement,invalidateOnChildChange:{properties:!0}}}};class Os extends w{static get metadata(){return Ns}static get render(){return U}static get template(){return t=>_`<div>
37
+ <slot></slot>
38
+ </div>`}}Os.define();const Rs={tag:"ui5-test-child",properties:{prop1:{type:String},prop2:{type:String},prop3:{type:String}}};class Hs extends w{static get metadata(){return Rs}static get render(){return U}static get template(){return t=>_`<div></div>`}}Hs.define();const ks={tag:"ui5-with-static-area",properties:{staticContent:{type:Boolean}},slots:{}};class Bs extends w{static get metadata(){return ks}static get render(){return U}static get template(){return t=>_`
39
+ <div dir=${t.effectiveDir}>
40
+ WithStaticArea works!
41
+ </div>`}static get staticAreaTemplate(){return t=>_`
42
+ <div class="ui5-with-static-area-content">
43
+ Static area content.
44
+ </div>`}static get styles(){return`
45
+ :host {
46
+ display: inline-block;
47
+ border: 1px solid black;
48
+ color: red;
49
+ }`}async addStaticArea(){if(!this.staticContent)return;const t=await this.getStaticAreaItemDomRef();return this.responsivePopover=t.querySelector(".ui5-with-static-area-content"),this.responsivePopover}onBeforeRendering(){this.addStaticArea()}onAfterRendering(){}onEnterDOM(){}onExitDOM(){}}Bs.define();function Vs(s,t,e){return _`<div>Root text: ${v(this.text)}${de(this.items,(n,i)=>n._id||i,(n,i)=>Us.call(this,s,t,e,n,i))} Root text: ${v(this.text)}</div>`}function Us(s,t,e,n,i){return _`<h3>Item-${i}</h3>${n.text?Fs.call(this,s,t,e,n,i):void 0}<ul>${de(n.words,(r,o)=>r._id||o,(r,o)=>js.call(this,s,t,e,r,o))}</ul>${n.text?zs.call(this,s,t,e,n,i):void 0}`}function Fs(s,t,e,n,i){return _`<div class="before-each-content--start--${i}">Root text: ${v(this.text)}, Item text: ${v(n.text)}</div>`}function js(s,t,e,n,i){return _`<li><h3>Word-${i}</h3><div class="nested-each-content--${i}--0">Root Text: ${v(this.text)}, Word text: ${v(n.text)}</div><div class="nested-each-content--${i}--1">Root Text: ${v(this.text)}, Word text: ${v(n.text)}</div></li>`}function zs(s,t,e,n,i){return _`<div class="after-each-content--end--${i}">Root text: ${v(this.text)}, Item text: ${v(n.text)}</div>`}class Ws extends w{static get metadata(){return{tag:"ui5-test-complex-template"}}static get render(){return U}static get template(){return Vs}get text(){return"root"}get items(){return[{text:"positives",words:[{text:"word1_good"},{text:"word2_nice"},{text:"word3_kind"}]},{text:"negatives",words:[{text:"word4_bad"},{text:"word5_rude"},{text:"word6_unpolite"}]}]}}Ws.define();const qs={tag:"ui5-test-generic-ext",properties:{extProp:{type:String},strProp:{defaultValue:"Ext"}},slots:{extSlot:{type:HTMLElement}}};class Zs extends ue{static get metadata(){return qs}}Zs.define();const Gs={content:":root{ --var1: red; }",packageName:"",fileName:""},Ks={content:":root{ --var1: green; }",packageName:"",fileName:""},Js={content:":root{ --var1: blue; }",packageName:"",fileName:""},Xs={content:":root{ --var1: orange; }",packageName:"",fileName:""},Ys={content:":root{ --var1: orange; }",packageName:"",fileName:""},Qs={content:":root{ --var1: yellow; }",packageName:"",fileName:""},tn={content:":root{ --var1: yellow; }",packageName:"",fileName:""};C("@ui5/webcomponents-base-test","sap_fiori_3",()=>Gs);C("@ui5/webcomponents-base-test","sap_fiori_3_dark",()=>Ks);C("@ui5/webcomponents-base-test","sap_belize",()=>Js);C("@ui5/webcomponents-base-test","sap_belize_hcb",()=>Xs);C("@ui5/webcomponents-base-test","sap_belize_hcw",()=>Ys);C("@ui5/webcomponents-base-test","sap_fiori_3_hcb",()=>Qs);C("@ui5/webcomponents-base-test","sap_fiori_3_hcw",()=>tn);const en=typeof window.chrome=="object"||typeof window.v8=="object"?(s,t)=>(t>2&&40*t>s.length,s):s=>s,sn=/(?:\r\n|\r|\n|^)[ \t\f]*/,nn=/(\\u[0-9a-fA-F]{0,4})|(\\.)|(\\$)|([ \t\f]*[ \t\f:=][ \t\f]*)/g,rn=/(\\u[0-9a-fA-F]{0,4})|(\\.)|(\\$)/g,on={"\\f":"\f","\\n":`
50
+ `,"\\r":"\r","\\t":" "},an=s=>{const t={},e=s.split(sn);let n,i,r,o,c,a,l,p;const d=u=>{o?(o=`${o}${u}`,p++):(o=u,p=0)};for(c=0;c<e.length;c++)if(n=e[c],!(n===""||n.charAt(0)==="#"||n.charAt(0)==="!")){for(i=nn,l=0,i.lastIndex=l,r=null,o="",a=i.exec(n);a!==null;){if(l<a.index&&d(n.slice(l,a.index)),l=i.lastIndex,a[1]){if(a[1].length!==6)throw new Error(`Incomplete Unicode Escape '${a[1]}'`);d(String.fromCharCode(parseInt(a[1].slice(2),16)))}else a[2]?d(on[a[2]]||a[2].slice(1)):a[3]?(n=e[++c],l=0,i.lastIndex=l):a[4]&&(r=o,o="",i=rn,i.lastIndex=l);a=i.exec(n)}l<n.length&&d(n.slice(l)),r==null&&(r=o,o=""),t[r]=en(o,o?p:0)}return t};let lt;const ln=()=>(lt===void 0&&(lt=De()),lt);var ft;(function(s){s.Gregorian="Gregorian",s.Islamic="Islamic",s.Japanese="Japanese",s.Buddhist="Buddhist",s.Persian="Persian"})(ft||(ft={}));const Bt=ft;let O;const cn=()=>(O===void 0&&(O=Ie()),O&&O in Bt?O:Bt.Gregorian);let ct;class he{static getLegacyDateCalendarCustomizing(){return ct===void 0&&(ct=Wt()),ct.legacyDateCalendarCustomizing||[]}}Vt("LegacyDateFormats",he);let dt;const dn=()=>(dt===void 0&&(dt=Wt()),dt.firstDayOfWeek),un=X("LegacyDateFormats"),hn=un?he.getLegacyDateCalendarCustomizing:()=>[],pn=new J,fn="directionChange",gn=()=>pn.fireEvent(fn,void 0),mn=async()=>{const s=gn();await Promise.all(s),await Ft({rtlAware:!0})};window.registerThemePropertiesLoader=C;window["sap-ui-webcomponents-bundle"]={configuration:{getAnimationMode:ln,getLanguage:jt,setLanguage:Le,getTheme:Pe,getThemeRoot:Ne,setTheme:Ut,getNoConflict:_t,setNoConflict:gs,getCalendarType:cn,getRTL:Xt,getFirstDayOfWeek:dn,getLegacyDateCalendarCustomizing:hn},getIconNames:Oe,parseProperties:an,registerI18nLoader:Re,getI18nBundle:Ue,renderFinished:zt,applyDirection:mn,EventProvider:J};
@@ -1 +1 @@
1
- import{F as o,o as e,w as t}from"../../Boot.05e92e0f.js";o(()=>{console.log("Listener1: after framework booted!")});e();const s={registerThemeProps:async()=>{t("@ui5/webcomponents-theming","sap_fiori_3",()=>({content:":root{ --customCol: #fff; --customBg: #000; }",packageName:"",fileName:""}))}};window["sap-ui-webcomponents-bundle"]=s;
1
+ import{F as o,o as e,w as t}from"../../Boot.d185ba4a.js";o(()=>{console.log("Listener1: after framework booted!")});e();const s={registerThemeProps:async()=>{t("@ui5/webcomponents-theming","sap_fiori_3",()=>({content:":root{ --customCol: #fff; --customBg: #000; }",packageName:"",fileName:""}))}};window["sap-ui-webcomponents-bundle"]=s;
@@ -1 +1 @@
1
- import"../../Boot.05e92e0f.js";import"../../bundle.esm.5f473016.js";const s=async()=>{["de","es","fr","en"].forEach(e=>window["sap-ui-webcomponents-bundle"].registerI18nLoader("myApp",e,()=>`./assets/messagebundle_${e}.properties`));const n=(await window["sap-ui-webcomponents-bundle"].getI18nBundle("myApp")).getText("PLEASE_WAIT");console.log("Please wait in the current language is: ",n)};s();
1
+ import"../../Boot.d185ba4a.js";import"../../bundle.esm.30024c9b.js";const s=async()=>{["de","es","fr","en"].forEach(e=>window["sap-ui-webcomponents-bundle"].registerI18nLoader("myApp",e,()=>`./assets/messagebundle_${e}.properties`));const n=(await window["sap-ui-webcomponents-bundle"].getI18nBundle("myApp")).getText("PLEASE_WAIT");console.log("Please wait in the current language is: ",n)};s();
@@ -1 +1 @@
1
- import"../../Boot.05e92e0f.js";import"../../bundle.esm.5f473016.js";const a=async()=>{window["sap-ui-webcomponents-bundle"].configuration.setLanguage("fr");const s=["test_1","test_2","test_3","test_4","test_5","test_6","test_7","test_8","test_9"];window["sap-ui-webcomponents-bundle"].registerI18nLoader("myApp","fr",async e=>{const t=await(await fetch(`./assets/messagebundle_${e}.properties`)).text();return window["sap-ui-webcomponents-bundle"].parseProperties(t)});const r=await window["sap-ui-webcomponents-bundle"].getI18nBundle("myApp");s.forEach(e=>{const t=r.getText(e.toUpperCase(),"test"),n=document.getElementById(`${e}_text`);n.innerText=t}),s.forEach(e=>{const t=document.getElementById(`${e}_text`),n=document.getElementById(`${e}_result`);if(t.innerText!==n.innerText){const o=n.parentElement;o.style.textDecoration="underline",o.style.color="red"}})};a();
1
+ import"../../Boot.d185ba4a.js";import"../../bundle.esm.30024c9b.js";const a=async()=>{window["sap-ui-webcomponents-bundle"].configuration.setLanguage("fr");const s=["test_1","test_2","test_3","test_4","test_5","test_6","test_7","test_8","test_9"];window["sap-ui-webcomponents-bundle"].registerI18nLoader("myApp","fr",async e=>{const t=await(await fetch(`./assets/messagebundle_${e}.properties`)).text();return window["sap-ui-webcomponents-bundle"].parseProperties(t)});const r=await window["sap-ui-webcomponents-bundle"].getI18nBundle("myApp");s.forEach(e=>{const t=r.getText(e.toUpperCase(),"test"),n=document.getElementById(`${e}_text`);n.innerText=t}),s.forEach(e=>{const t=document.getElementById(`${e}_text`),n=document.getElementById(`${e}_result`);if(t.innerText!==n.innerText){const o=n.parentElement;o.style.textDecoration="underline",o.style.color="red"}})};a();
@@ -1,10 +1,10 @@
1
1
  const VersionInfo = {
2
- version: "1.13.0-rc.3",
2
+ version: "1.13.0",
3
3
  major: 1,
4
4
  minor: 13,
5
5
  patch: 0,
6
- suffix: "-rc.3",
6
+ suffix: "",
7
7
  isNext: false,
8
- buildTime: 1682583064,
8
+ buildTime: 1683274238,
9
9
  };
10
10
  export default VersionInfo;
@@ -0,0 +1,4 @@
1
+ import type UI5Element from "../../../UI5Element.js";
2
+ import type WithComplexTemplate from "../../../../test/elements/WithComplexTemplate.js";
3
+ declare function block0(this: WithComplexTemplate, context: UI5Element, tags: string[], suffix: string | undefined): import("lit-html").TemplateResult<1 | 2>;
4
+ export default block0;
@@ -1,11 +1,9 @@
1
1
  /* eslint no-unused-vars: 0 */
2
- import { html, svg, repeat, classMap, styleMap, ifDefined, unsafeHTML, scopeTag } from "@ui5/webcomponents-base/dist/renderer/LitRenderer.js";
3
-
4
- const block0 = (context, tags, suffix) => html`<div>Root text: ${ifDefined(context.text)}${ repeat(context.items, (item, index) => item._id || index, (item, index) => block1(item, index, context, tags, suffix)) } Root text: ${ifDefined(context.text)}</div>`;
5
- const block1 = (item, index, context, tags, suffix) => html`<h3>Item-${index}</h3>${ item.text ? block2(item, index, context, tags, suffix) : undefined }<ul>${ repeat(item.words, (item, index) => item._id || index, (item, index) => block3(item, index, context, tags, suffix)) }</ul>${ item.text ? block4(item, index, context, tags, suffix) : undefined }`;
6
- const block2 = (item, index, context, tags, suffix) => html`<div class="before-each-content--start--${index}">Root text: ${ifDefined(context.text)}, Item text: ${ifDefined(item.text)}</div>`;
7
- const block3 = (item, index, context, tags, suffix) => html`<li><h3>Word-${index}</h3><div class="nested-each-content--${index}--0">Root Text: ${ifDefined(context.text)}, Word text: ${ifDefined(item.text)}</div><div class="nested-each-content--${index}--1">Root Text: ${ifDefined(context.text)}, Word text: ${ifDefined(item.text)}</div></li>`;
8
- const block4 = (item, index, context, tags, suffix) => html`<div class="after-each-content--end--${index}">Root text: ${ifDefined(context.text)}, Item text: ${ifDefined(item.text)}</div>`;
9
-
10
-
11
- export default block0;
2
+ import { html, repeat, ifDefined } from "../../../renderer/LitRenderer.js";
3
+ function block0(context, tags, suffix) { return html `<div>Root text: ${ifDefined(this.text)}${repeat(this.items, (item, index) => item._id || index, (item, index) => block1.call(this, context, tags, suffix, item, index))} Root text: ${ifDefined(this.text)}</div>`; }
4
+ function block1(context, tags, suffix, item, index) { return html `<h3>Item-${index}</h3>${item.text ? block2.call(this, context, tags, suffix, item, index) : undefined}<ul>${repeat(item.words, (item, index) => item._id || index, (item, index) => block3.call(this, context, tags, suffix, item, index))}</ul>${item.text ? block4.call(this, context, tags, suffix, item, index) : undefined}`; }
5
+ function block2(context, tags, suffix, item, index) { return html `<div class="before-each-content--start--${index}">Root text: ${ifDefined(this.text)}, Item text: ${ifDefined(item.text)}</div>`; }
6
+ function block3(context, tags, suffix, item, index) { return html `<li><h3>Word-${index}</h3><div class="nested-each-content--${index}--0">Root Text: ${ifDefined(this.text)}, Word text: ${ifDefined(item.text)}</div><div class="nested-each-content--${index}--1">Root Text: ${ifDefined(this.text)}, Word text: ${ifDefined(item.text)}</div></li>`; }
7
+ function block4(context, tags, suffix, item, index) { return html `<div class="after-each-content--end--${index}">Root text: ${ifDefined(this.text)}, Item text: ${ifDefined(item.text)}</div>`; }
8
+ export default block0;
9
+ //# sourceMappingURL=WithComplexTemplateTemplate.lit.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WithComplexTemplateTemplate.lit.js","sourceRoot":"","sources":["../../../../src/generated/templates/elements/WithComplexTemplateTemplate.lit.ts"],"names":[],"mappings":"AAAA,8BAA8B;AAC9B,OAAO,EAAE,IAAI,EAAO,MAAM,EAAsB,SAAS,EAAwB,MAAM,kCAAkC,CAAC;AAK1H,SAAS,MAAM,CAA6B,OAAmB,EAAE,IAAc,EAAE,MAA0B,IAAI,OAAO,IAAI,CAAA,mBAAmB,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,GAAI,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAE,IAAkC,CAAC,GAAG,IAAI,KAAK,EAAE,CAAC,IAAI,EAAE,KAAa,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,CAAE,eAAe,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA,CAAC;AACxX,SAAS,MAAM,CAA6B,OAAmB,EAAE,IAAc,EAAE,MAA0B,EAAE,IAAS,EAAE,KAAa,IAAI,OAAO,IAAI,CAAA,YAAY,KAAK,QAAS,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,SAAU,OAAQ,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAE,IAAkC,CAAC,GAAG,IAAI,KAAK,EAAE,CAAC,IAAI,EAAE,KAAa,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,CAAE,QAAS,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,SAAU,EAAE,CAAC,CAAA,CAAC;AACrgB,SAAS,MAAM,CAA6B,OAAmB,EAAE,IAAc,EAAE,MAA0B,EAAE,IAAS,EAAE,KAAa,IAAI,OAAO,IAAI,CAAA,2CAA2C,KAAK,gBAAgB,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,gBAAgB,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA,CAAC;AACtR,SAAS,MAAM,CAA6B,OAAmB,EAAE,IAAc,EAAE,MAA0B,EAAE,IAAS,EAAE,KAAa,IAAI,OAAO,IAAI,CAAA,gBAAgB,KAAK,yCAAyC,KAAK,mBAAmB,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,gBAAgB,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,0CAA0C,KAAK,mBAAmB,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,gBAAgB,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,CAAA,CAAC;AAC3a,SAAS,MAAM,CAA6B,OAAmB,EAAE,IAAc,EAAE,MAA0B,EAAE,IAAS,EAAE,KAAa,IAAI,OAAO,IAAI,CAAA,wCAAwC,KAAK,gBAAgB,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,gBAAgB,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA,CAAC;AAGnR,eAAe,MAAM,CAAC","sourcesContent":["/* eslint no-unused-vars: 0 */\nimport { html, svg, repeat, classMap, styleMap, ifDefined, unsafeHTML, scopeTag } from \"../../../renderer/LitRenderer.js\";\nimport type UI5Element from \"../../../UI5Element.js\";\n\timport type WithComplexTemplate from \"../../../../test/elements/WithComplexTemplate.js\";\n\timport type { ClassMapValue } from \"../../../types.js\";\n\t\nfunction block0 (this: WithComplexTemplate, context: UI5Element, tags: string[], suffix: string | undefined) { return html`<div>Root text: ${ifDefined(this.text)}${ repeat(this.items, (item, index) => (item as typeof item & {_id?: any})._id || index, (item, index: number) => block1.call(this, context, tags, suffix, item, index)) } Root text: ${ifDefined(this.text)}</div>`;}\nfunction block1 (this: WithComplexTemplate, context: UI5Element, tags: string[], suffix: string | undefined, item: any, index: number) { return html`<h3>Item-${index}</h3>${ item.text ? block2.call(this, context, tags, suffix, item, index) : undefined }<ul>${ repeat(item.words, (item, index) => (item as typeof item & {_id?: any})._id || index, (item, index: number) => block3.call(this, context, tags, suffix, item, index)) }</ul>${ item.text ? block4.call(this, context, tags, suffix, item, index) : undefined }`;}\nfunction block2 (this: WithComplexTemplate, context: UI5Element, tags: string[], suffix: string | undefined, item: any, index: number) { return html`<div class=\"before-each-content--start--${index}\">Root text: ${ifDefined(this.text)}, Item text: ${ifDefined(item.text)}</div>`;}\nfunction block3 (this: WithComplexTemplate, context: UI5Element, tags: string[], suffix: string | undefined, item: any, index: number) { return html`<li><h3>Word-${index}</h3><div class=\"nested-each-content--${index}--0\">Root Text: ${ifDefined(this.text)}, Word text: ${ifDefined(item.text)}</div><div class=\"nested-each-content--${index}--1\">Root Text: ${ifDefined(this.text)}, Word text: ${ifDefined(item.text)}</div></li>`;}\nfunction block4 (this: WithComplexTemplate, context: UI5Element, tags: string[], suffix: string | undefined, item: any, index: number) { return html`<div class=\"after-each-content--end--${index}\">Root text: ${ifDefined(this.text)}, Item text: ${ifDefined(item.text)}</div>`;}\n\n\nexport default block0;"]}
@@ -1,4 +1,4 @@
1
- import type UI5Element from "../UI5Element";
1
+ import type UI5Element from "../UI5Element.js";
2
2
  declare const markAsRtlAware: (klass: typeof UI5Element) => void;
3
3
  declare const isRtlAware: (klass: typeof UI5Element) => boolean;
4
4
  export { markAsRtlAware, isRtlAware, };
@@ -1 +1 @@
1
- {"version":3,"file":"RTLAwareRegistry.js","sourceRoot":"","sources":["../../src/locale/RTLAwareRegistry.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,GAAG,IAAI,GAAG,EAAqB,CAAC;AAEjD,MAAM,cAAc,GAAG,CAAC,KAAwB,EAAE,EAAE;IACnD,WAAW,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AACxB,CAAC,CAAC;AAEF,MAAM,UAAU,GAAG,CAAC,KAAwB,EAAE,EAAE;IAC/C,OAAO,WAAW,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AAC/B,CAAC,CAAC;AAEF,OAAO,EACN,cAAc,EACd,UAAU,GACV,CAAC","sourcesContent":["import type UI5Element from \"../UI5Element\";\n\nconst rtlAwareSet = new Set<typeof UI5Element>();\n\nconst markAsRtlAware = (klass: typeof UI5Element) => {\n\trtlAwareSet.add(klass);\n};\n\nconst isRtlAware = (klass: typeof UI5Element) => {\n\treturn rtlAwareSet.has(klass);\n};\n\nexport {\n\tmarkAsRtlAware,\n\tisRtlAware,\n};\n"]}
1
+ {"version":3,"file":"RTLAwareRegistry.js","sourceRoot":"","sources":["../../src/locale/RTLAwareRegistry.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,GAAG,IAAI,GAAG,EAAqB,CAAC;AAEjD,MAAM,cAAc,GAAG,CAAC,KAAwB,EAAE,EAAE;IACnD,WAAW,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AACxB,CAAC,CAAC;AAEF,MAAM,UAAU,GAAG,CAAC,KAAwB,EAAE,EAAE;IAC/C,OAAO,WAAW,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AAC/B,CAAC,CAAC;AAEF,OAAO,EACN,cAAc,EACd,UAAU,GACV,CAAC","sourcesContent":["import type UI5Element from \"../UI5Element.js\";\n\nconst rtlAwareSet = new Set<typeof UI5Element>();\n\nconst markAsRtlAware = (klass: typeof UI5Element) => {\n\trtlAwareSet.add(klass);\n};\n\nconst isRtlAware = (klass: typeof UI5Element) => {\n\treturn rtlAwareSet.has(klass);\n};\n\nexport {\n\tmarkAsRtlAware,\n\tisRtlAware,\n};\n"]}
@@ -9,7 +9,7 @@ import { getCustomElementsScopingSuffix, shouldScopeCustomElement } from "../Cus
9
9
  const executeTemplate = (template, component) => {
10
10
  const tagsToScope = getTagsToScope(component);
11
11
  const scope = getCustomElementsScopingSuffix();
12
- return template(component, tagsToScope, scope);
12
+ return template.call(component, component, tagsToScope, scope);
13
13
  };
14
14
  /**
15
15
  * Returns all tags, used inside component's template subject to scoping.
@@ -1 +1 @@
1
- {"version":3,"file":"executeTemplate.js","sourceRoot":"","sources":["../../src/renderer/executeTemplate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,8BAA8B,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AAM1G;;;;;;GAMG;AACH,MAAM,eAAe,GAAG,CAAC,QAA0B,EAAE,SAAqB,EAA0B,EAAE;IACrG,MAAM,WAAW,GAAG,cAAc,CAAC,SAAS,CAAC,CAAC;IAC9C,MAAM,KAAK,GAAG,8BAA8B,EAAE,CAAC;IAC/C,OAAO,QAAQ,CAAC,SAAS,EAAE,WAAW,EAAE,KAAK,CAAC,CAAC;AAChD,CAAC,CAAC;AAEF;;;;;GAKG;AACH,MAAM,cAAc,GAAG,CAAC,SAAqB,EAAE,EAAE;IAChD,MAAM,IAAI,GAAG,SAAS,CAAC,WAAgC,CAAC;IAExD,MAAM,YAAY,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC,UAAU,EAAE,CAAC;IACrD,MAAM,WAAW,GAAG,IAAI,CAAC,qBAAqB,EAAE,CAAC,GAAG,CAAC,CAAC,GAAsB,EAAE,EAAE,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC,UAAU,EAAE,CAAC,CAAC,MAAM,CAAC,wBAAwB,CAAC,CAAC;IAElJ,IAAI,wBAAwB,CAAC,YAAY,CAAC,EAAE;QAC3C,WAAW,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;KAC/B;IAED,OAAO,WAAW,CAAC;AACpB,CAAC,CAAC;AAEF,eAAe,eAAe,CAAC","sourcesContent":["import { getCustomElementsScopingSuffix, shouldScopeCustomElement } from \"../CustomElementsScopeUtils.js\";\nimport type UI5Element from \"../UI5Element.js\";\n\ntype TemplateFunctionResult = object;\ntype TemplateFunction = (component: UI5Element, tagsToScope: Array<string>, scope: string | undefined) => TemplateFunctionResult;\n\n/**\n * Runs a component's template with the component's current state, while also scoping HTML\n *\n * @param template - the template to execute\n * @param component - the component\n * @public\n */\nconst executeTemplate = (template: TemplateFunction, component: UI5Element): TemplateFunctionResult => {\n\tconst tagsToScope = getTagsToScope(component);\n\tconst scope = getCustomElementsScopingSuffix();\n\treturn template(component, tagsToScope, scope);\n};\n\n/**\n * Returns all tags, used inside component's template subject to scoping.\n * @param component - the component\n * @returns {Array[]}\n * @private\n */\nconst getTagsToScope = (component: UI5Element) => {\n\tconst ctor = component.constructor as typeof UI5Element;\n\n\tconst componentTag = ctor.getMetadata().getPureTag();\n\tconst tagsToScope = ctor.getUniqueDependencies().map((dep: typeof UI5Element) => dep.getMetadata().getPureTag()).filter(shouldScopeCustomElement);\n\n\tif (shouldScopeCustomElement(componentTag)) {\n\t\ttagsToScope.push(componentTag);\n\t}\n\n\treturn tagsToScope;\n};\n\nexport default executeTemplate;\nexport type { TemplateFunction, TemplateFunctionResult };\n"]}
1
+ {"version":3,"file":"executeTemplate.js","sourceRoot":"","sources":["../../src/renderer/executeTemplate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,8BAA8B,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AAM1G;;;;;;GAMG;AACH,MAAM,eAAe,GAAG,CAAC,QAA0B,EAAE,SAAqB,EAA0B,EAAE;IACrG,MAAM,WAAW,GAAG,cAAc,CAAC,SAAS,CAAC,CAAC;IAC9C,MAAM,KAAK,GAAG,8BAA8B,EAAE,CAAC;IAC/C,OAAO,QAAQ,CAAC,IAAI,CAAC,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,KAAK,CAAC,CAAC;AAChE,CAAC,CAAC;AAEF;;;;;GAKG;AACH,MAAM,cAAc,GAAG,CAAC,SAAqB,EAAE,EAAE;IAChD,MAAM,IAAI,GAAG,SAAS,CAAC,WAAgC,CAAC;IAExD,MAAM,YAAY,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC,UAAU,EAAE,CAAC;IACrD,MAAM,WAAW,GAAG,IAAI,CAAC,qBAAqB,EAAE,CAAC,GAAG,CAAC,CAAC,GAAsB,EAAE,EAAE,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC,UAAU,EAAE,CAAC,CAAC,MAAM,CAAC,wBAAwB,CAAC,CAAC;IAElJ,IAAI,wBAAwB,CAAC,YAAY,CAAC,EAAE;QAC3C,WAAW,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;KAC/B;IAED,OAAO,WAAW,CAAC;AACpB,CAAC,CAAC;AAEF,eAAe,eAAe,CAAC","sourcesContent":["import { getCustomElementsScopingSuffix, shouldScopeCustomElement } from \"../CustomElementsScopeUtils.js\";\nimport type UI5Element from \"../UI5Element.js\";\n\ntype TemplateFunctionResult = object;\ntype TemplateFunction = (component: UI5Element, tagsToScope: Array<string>, scope: string | undefined) => TemplateFunctionResult;\n\n/**\n * Runs a component's template with the component's current state, while also scoping HTML\n *\n * @param template - the template to execute\n * @param component - the component\n * @public\n */\nconst executeTemplate = (template: TemplateFunction, component: UI5Element): TemplateFunctionResult => {\n\tconst tagsToScope = getTagsToScope(component);\n\tconst scope = getCustomElementsScopingSuffix();\n\treturn template.call(component, component, tagsToScope, scope);\n};\n\n/**\n * Returns all tags, used inside component's template subject to scoping.\n * @param component - the component\n * @returns {Array[]}\n * @private\n */\nconst getTagsToScope = (component: UI5Element) => {\n\tconst ctor = component.constructor as typeof UI5Element;\n\n\tconst componentTag = ctor.getMetadata().getPureTag();\n\tconst tagsToScope = ctor.getUniqueDependencies().map((dep: typeof UI5Element) => dep.getMetadata().getPureTag()).filter(shouldScopeCustomElement);\n\n\tif (shouldScopeCustomElement(componentTag)) {\n\t\ttagsToScope.push(componentTag);\n\t}\n\n\treturn tagsToScope;\n};\n\nexport default executeTemplate;\nexport type { TemplateFunction, TemplateFunctionResult };\n"]}
@@ -6,8 +6,8 @@
6
6
  <title>Base package default test page</title>
7
7
 
8
8
 
9
- <script type="module" crossorigin src="/assets/Boot.05e92e0f.js"></script>
10
- <script type="module" crossorigin src="/assets/bundle.esm.5f473016.js"></script>
9
+ <script type="module" crossorigin src="/assets/Boot.d185ba4a.js"></script>
10
+ <script type="module" crossorigin src="/assets/bundle.esm.30024c9b.js"></script>
11
11
  </head>
12
12
 
13
13
  <body>
@@ -6,8 +6,8 @@
6
6
  <script>delete Document.prototype.adoptedStyleSheets</script>
7
7
 
8
8
 
9
- <script type="module" crossorigin src="/assets/test/pages/Boot.html.2b08a2af.js"></script>
10
- <link rel="modulepreload" crossorigin href="/assets/Boot.05e92e0f.js">
9
+ <script type="module" crossorigin src="/assets/test/pages/Boot.html.827eeec6.js"></script>
10
+ <link rel="modulepreload" crossorigin href="/assets/Boot.d185ba4a.js">
11
11
  <link rel="stylesheet" href="/assets/Boot.34b7cea0.css">
12
12
  </head>
13
13
  <body>
@@ -8,8 +8,8 @@
8
8
 
9
9
 
10
10
 
11
- <script type="module" crossorigin src="/assets/Boot.05e92e0f.js"></script>
12
- <script type="module" crossorigin src="/assets/bundle.esm.5f473016.js"></script>
11
+ <script type="module" crossorigin src="/assets/Boot.d185ba4a.js"></script>
12
+ <script type="module" crossorigin src="/assets/bundle.esm.30024c9b.js"></script>
13
13
  </head>
14
14
 
15
15
  <body>
@@ -40,8 +40,8 @@
40
40
 
41
41
 
42
42
 
43
- <script type="module" crossorigin src="/assets/Boot.05e92e0f.js"></script>
44
- <script type="module" crossorigin src="/assets/bundle.esm.5f473016.js"></script>
43
+ <script type="module" crossorigin src="/assets/Boot.d185ba4a.js"></script>
44
+ <script type="module" crossorigin src="/assets/bundle.esm.30024c9b.js"></script>
45
45
  </head>
46
46
 
47
47
  <body>
@@ -4,8 +4,8 @@
4
4
  <meta charset="utf-8">
5
5
  <title>Compex Template Test Page</title>
6
6
 
7
- <script type="module" crossorigin src="/assets/Boot.05e92e0f.js"></script>
8
- <script type="module" crossorigin src="/assets/bundle.esm.5f473016.js"></script>
7
+ <script type="module" crossorigin src="/assets/Boot.d185ba4a.js"></script>
8
+ <script type="module" crossorigin src="/assets/bundle.esm.30024c9b.js"></script>
9
9
  </head>
10
10
 
11
11
  <body>
@@ -7,9 +7,9 @@
7
7
 
8
8
 
9
9
 
10
- <script type="module" crossorigin src="/assets/test/pages/i18n.html.19a91def.js"></script>
11
- <link rel="modulepreload" crossorigin href="/assets/Boot.05e92e0f.js">
12
- <link rel="modulepreload" crossorigin href="/assets/bundle.esm.5f473016.js">
10
+ <script type="module" crossorigin src="/assets/test/pages/i18n.html.a4b91269.js"></script>
11
+ <link rel="modulepreload" crossorigin href="/assets/Boot.d185ba4a.js">
12
+ <link rel="modulepreload" crossorigin href="/assets/bundle.esm.30024c9b.js">
13
13
  </head>
14
14
 
15
15
  <body>
@@ -8,9 +8,9 @@
8
8
 
9
9
 
10
10
 
11
- <script type="module" crossorigin src="/assets/test/pages/i18n_texts.html.e39dce74.js"></script>
12
- <link rel="modulepreload" crossorigin href="/assets/Boot.05e92e0f.js">
13
- <link rel="modulepreload" crossorigin href="/assets/bundle.esm.5f473016.js">
11
+ <script type="module" crossorigin src="/assets/test/pages/i18n_texts.html.0618181d.js"></script>
12
+ <link rel="modulepreload" crossorigin href="/assets/Boot.d185ba4a.js">
13
+ <link rel="modulepreload" crossorigin href="/assets/bundle.esm.30024c9b.js">
14
14
  </head>
15
15
 
16
16
  <body>
package/dist/types.d.ts CHANGED
@@ -15,4 +15,4 @@ type ClassMap = {
15
15
  type PassiveEventListenerObject = EventListenerObject & {
16
16
  passive: boolean;
17
17
  };
18
- export type { PromiseResolve, Timeout, Interval, StyleData, StyleDataCSP, ComponentStylesData, ClassMap, PassiveEventListenerObject, };
18
+ export type { PromiseResolve, Timeout, Interval, StyleData, StyleDataCSP, ComponentStylesData, ClassMap, ClassMapValue, PassiveEventListenerObject, };
package/dist/types.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"","sourcesContent":["type PromiseResolve = (value: void | PromiseLike<void>) => void;\ntype Timeout = ReturnType<typeof setTimeout>;\ntype Interval = ReturnType<typeof setInterval>;\n\ntype StyleDataCSP = {\n\tcontent: string,\n\tpackageName: string,\n\tfileName: string,\n};\n\ntype StyleData = StyleDataCSP | string;\n\ntype ComponentStylesData = Array<ComponentStylesData> | Array<StyleData> | StyleData;\n\ntype ClassMapValue = Record<string, boolean>\n\ntype ClassMap = { [x: string] : ClassMapValue | ClassMap };\n\ntype PassiveEventListenerObject = EventListenerObject & { passive: boolean };\n\nexport type {\n\tPromiseResolve,\n\tTimeout,\n\tInterval,\n\tStyleData,\n\tStyleDataCSP,\n\tComponentStylesData,\n\tClassMap,\n\tPassiveEventListenerObject,\n};\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"","sourcesContent":["type PromiseResolve = (value: void | PromiseLike<void>) => void;\ntype Timeout = ReturnType<typeof setTimeout>;\ntype Interval = ReturnType<typeof setInterval>;\n\ntype StyleDataCSP = {\n\tcontent: string,\n\tpackageName: string,\n\tfileName: string,\n};\n\ntype StyleData = StyleDataCSP | string;\n\ntype ComponentStylesData = Array<ComponentStylesData> | Array<StyleData> | StyleData;\n\ntype ClassMapValue = Record<string, boolean>\n\ntype ClassMap = { [x: string] : ClassMapValue | ClassMap };\n\ntype PassiveEventListenerObject = EventListenerObject & { passive: boolean };\n\nexport type {\n\tPromiseResolve,\n\tTimeout,\n\tInterval,\n\tStyleData,\n\tStyleDataCSP,\n\tComponentStylesData,\n\tClassMap,\n\tClassMapValue,\n\tPassiveEventListenerObject,\n};\n"]}
@@ -1,4 +1,3 @@
1
- import executeTemplate from "./renderer/executeTemplate.js";
2
1
  import getConstructableStyle from "./theming/getConstructableStyle.js";
3
2
  import getEffectiveStyle from "./theming/getEffectiveStyle.js";
4
3
  import getEffectiveLinksHrefs from "./theming/getEffectiveLinksHrefs.js";
@@ -11,10 +10,14 @@ import { shouldUseLinks } from "./CSP.js";
11
10
  const updateShadowRoot = (element, forStaticArea = false) => {
12
11
  let styleStrOrHrefsArr;
13
12
  const ctor = element.constructor;
14
- const propertyName = forStaticArea ? "staticAreaTemplate" : "template";
15
- const template = ctor[propertyName];
16
13
  const shadowRoot = forStaticArea ? element.staticAreaItem.shadowRoot : element.shadowRoot;
17
- const renderResult = executeTemplate(template, element); // this is checked before calling updateShadowRoot
14
+ let renderResult;
15
+ if (forStaticArea) {
16
+ renderResult = element.renderStatic(); // this is checked before calling updateShadowRoot
17
+ }
18
+ else {
19
+ renderResult = element.render(); // this is checked before calling updateShadowRoot
20
+ }
18
21
  if (!shadowRoot) {
19
22
  console.warn(`There is no shadow root to update`); // eslint-disable-line
20
23
  return;
@@ -1 +1 @@
1
- {"version":3,"file":"updateShadowRoot.js","sourceRoot":"","sources":["../src/updateShadowRoot.ts"],"names":[],"mappings":"AAAA,OAAO,eAAe,MAAM,+BAA+B,CAAC;AAC5D,OAAO,qBAAqB,MAAM,oCAAoC,CAAC;AACvE,OAAO,iBAAiB,MAAM,gCAAgC,CAAC;AAC/D,OAAO,sBAAsB,MAAM,qCAAqC,CAAC;AACzE,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAG1C;;;;GAIG;AACH,MAAM,gBAAgB,GAAG,CAAC,OAAmB,EAAE,aAAa,GAAG,KAAK,EAAE,EAAE;IACvE,IAAI,kBAAkB,CAAC;IACvB,MAAM,IAAI,GAAG,OAAO,CAAC,WAAgC,CAAC;IACtD,MAAM,YAAY,GAAG,aAAa,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,UAAU,CAAC;IACvE,MAAM,QAAQ,GAAG,IAAI,CAAC,YAAY,CAAC,CAAC;IACpC,MAAM,UAAU,GAAG,aAAa,CAAC,CAAC,CAAC,OAAO,CAAC,cAAe,CAAC,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC;IAC3F,MAAM,YAAY,GAAG,eAAe,CAAC,QAAS,EAAE,OAAO,CAAC,CAAC,CAAC,kDAAkD;IAE5G,IAAI,CAAC,UAAU,EAAE;QAChB,OAAO,CAAC,IAAI,CAAC,mCAAmC,CAAC,CAAC,CAAC,sBAAsB;QACzE,OAAO;KACP;IAED,IAAI,cAAc,EAAE,EAAE;QACrB,kBAAkB,GAAG,sBAAsB,CAAC,IAAI,EAAE,aAAa,CAAC,CAAC;KACjE;SAAM,IAAI,QAAQ,CAAC,kBAAkB,EAAE,EAAE,SAAS;QAClD,UAAU,CAAC,kBAAkB,GAAG,qBAAqB,CAAC,IAAI,EAAE,aAAa,CAAC,CAAC;KAC3E;SAAM,EAAE,aAAa;QACrB,kBAAkB,GAAG,iBAAiB,CAAC,IAAI,EAAE,aAAa,CAAC,CAAC;KAC5D;IAED,IAAI,IAAI,CAAC,QAAQ,EAAE;QAClB,IAAI,CAAC,QAAQ,CAAC,YAAY,EAAE,UAAU,EAAE,kBAAkB,EAAE,aAAa,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC;QAC9F,OAAO;KACP;IAED,IAAI,CAAC,MAAM,CAAC,YAAY,EAAE,UAAU,EAAE,kBAAkB,EAAE,aAAa,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC;AAC7F,CAAC,CAAC;AAEF,eAAe,gBAAgB,CAAC","sourcesContent":["import executeTemplate from \"./renderer/executeTemplate.js\";\nimport getConstructableStyle from \"./theming/getConstructableStyle.js\";\nimport getEffectiveStyle from \"./theming/getEffectiveStyle.js\";\nimport getEffectiveLinksHrefs from \"./theming/getEffectiveLinksHrefs.js\";\nimport { shouldUseLinks } from \"./CSP.js\";\nimport type UI5Element from \"./UI5Element.js\";\n\n/**\n * Updates the shadow root of a UI5Element or its static area item\n * @param element\n * @param forStaticArea\n */\nconst updateShadowRoot = (element: UI5Element, forStaticArea = false) => {\n\tlet styleStrOrHrefsArr;\n\tconst ctor = element.constructor as typeof UI5Element;\n\tconst propertyName = forStaticArea ? \"staticAreaTemplate\" : \"template\";\n\tconst template = ctor[propertyName];\n\tconst shadowRoot = forStaticArea ? element.staticAreaItem!.shadowRoot : element.shadowRoot;\n\tconst renderResult = executeTemplate(template!, element); // this is checked before calling updateShadowRoot\n\n\tif (!shadowRoot) {\n\t\tconsole.warn(`There is no shadow root to update`); // eslint-disable-line\n\t\treturn;\n\t}\n\n\tif (shouldUseLinks()) {\n\t\tstyleStrOrHrefsArr = getEffectiveLinksHrefs(ctor, forStaticArea);\n\t} else if (document.adoptedStyleSheets) { // Chrome\n\t\tshadowRoot.adoptedStyleSheets = getConstructableStyle(ctor, forStaticArea);\n\t} else { // FF, Safari\n\t\tstyleStrOrHrefsArr = getEffectiveStyle(ctor, forStaticArea);\n\t}\n\n\tif (ctor.renderer) {\n\t\tctor.renderer(renderResult, shadowRoot, styleStrOrHrefsArr, forStaticArea, { host: element });\n\t\treturn;\n\t}\n\n\tctor.render(renderResult, shadowRoot, styleStrOrHrefsArr, forStaticArea, { host: element });\n};\n\nexport default updateShadowRoot;\n"]}
1
+ {"version":3,"file":"updateShadowRoot.js","sourceRoot":"","sources":["../src/updateShadowRoot.ts"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,MAAM,oCAAoC,CAAC;AACvE,OAAO,iBAAiB,MAAM,gCAAgC,CAAC;AAC/D,OAAO,sBAAsB,MAAM,qCAAqC,CAAC;AACzE,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAG1C;;;;GAIG;AACH,MAAM,gBAAgB,GAAG,CAAC,OAAmB,EAAE,aAAa,GAAG,KAAK,EAAE,EAAE;IACvE,IAAI,kBAAkB,CAAC;IACvB,MAAM,IAAI,GAAG,OAAO,CAAC,WAAgC,CAAC;IACtD,MAAM,UAAU,GAAG,aAAa,CAAC,CAAC,CAAC,OAAO,CAAC,cAAe,CAAC,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC;IAC3F,IAAI,YAAY,CAAC;IACjB,IAAI,aAAa,EAAE;QAClB,YAAY,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC,CAAC,kDAAkD;KACzF;SAAM;QACN,YAAY,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC,kDAAkD;KACnF;IAED,IAAI,CAAC,UAAU,EAAE;QAChB,OAAO,CAAC,IAAI,CAAC,mCAAmC,CAAC,CAAC,CAAC,sBAAsB;QACzE,OAAO;KACP;IAED,IAAI,cAAc,EAAE,EAAE;QACrB,kBAAkB,GAAG,sBAAsB,CAAC,IAAI,EAAE,aAAa,CAAC,CAAC;KACjE;SAAM,IAAI,QAAQ,CAAC,kBAAkB,EAAE,EAAE,SAAS;QAClD,UAAU,CAAC,kBAAkB,GAAG,qBAAqB,CAAC,IAAI,EAAE,aAAa,CAAC,CAAC;KAC3E;SAAM,EAAE,aAAa;QACrB,kBAAkB,GAAG,iBAAiB,CAAC,IAAI,EAAE,aAAa,CAAC,CAAC;KAC5D;IAED,IAAI,IAAI,CAAC,QAAQ,EAAE;QAClB,IAAI,CAAC,QAAQ,CAAC,YAAY,EAAE,UAAU,EAAE,kBAAkB,EAAE,aAAa,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC;QAC9F,OAAO;KACP;IAED,IAAI,CAAC,MAAM,CAAC,YAAY,EAAE,UAAU,EAAE,kBAAkB,EAAE,aAAa,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC;AAC7F,CAAC,CAAC;AAEF,eAAe,gBAAgB,CAAC","sourcesContent":["import getConstructableStyle from \"./theming/getConstructableStyle.js\";\nimport getEffectiveStyle from \"./theming/getEffectiveStyle.js\";\nimport getEffectiveLinksHrefs from \"./theming/getEffectiveLinksHrefs.js\";\nimport { shouldUseLinks } from \"./CSP.js\";\nimport type UI5Element from \"./UI5Element.js\";\n\n/**\n * Updates the shadow root of a UI5Element or its static area item\n * @param element\n * @param forStaticArea\n */\nconst updateShadowRoot = (element: UI5Element, forStaticArea = false) => {\n\tlet styleStrOrHrefsArr;\n\tconst ctor = element.constructor as typeof UI5Element;\n\tconst shadowRoot = forStaticArea ? element.staticAreaItem!.shadowRoot : element.shadowRoot;\n\tlet renderResult;\n\tif (forStaticArea) {\n\t\trenderResult = element.renderStatic(); // this is checked before calling updateShadowRoot\n\t} else {\n\t\trenderResult = element.render(); // this is checked before calling updateShadowRoot\n\t}\n\n\tif (!shadowRoot) {\n\t\tconsole.warn(`There is no shadow root to update`); // eslint-disable-line\n\t\treturn;\n\t}\n\n\tif (shouldUseLinks()) {\n\t\tstyleStrOrHrefsArr = getEffectiveLinksHrefs(ctor, forStaticArea);\n\t} else if (document.adoptedStyleSheets) { // Chrome\n\t\tshadowRoot.adoptedStyleSheets = getConstructableStyle(ctor, forStaticArea);\n\t} else { // FF, Safari\n\t\tstyleStrOrHrefsArr = getEffectiveStyle(ctor, forStaticArea);\n\t}\n\n\tif (ctor.renderer) {\n\t\tctor.renderer(renderResult, shadowRoot, styleStrOrHrefsArr, forStaticArea, { host: element });\n\t\treturn;\n\t}\n\n\tctor.render(renderResult, shadowRoot, styleStrOrHrefsArr, forStaticArea, { host: element });\n};\n\nexport default updateShadowRoot;\n"]}
@@ -22,6 +22,8 @@ declare const getClassCopy: (klass: typeof UI5Element, constructorCallback: () =
22
22
  _getRealDomRef?: (() => HTMLElement) | undefined;
23
23
  staticAreaItem?: import("../StaticAreaItem.js").default | undefined;
24
24
  readonly _id: string;
25
+ render(): object;
26
+ renderStatic(): object;
25
27
  connectedCallback(): Promise<void>;
26
28
  disconnectedCallback(): void;
27
29
  onBeforeRendering(): void;
@@ -40,7 +40,7 @@ const scripts = {
40
40
  generateAssetParameters: `node "${assetParametersScript}"`,
41
41
  generateVersionInfo: `node "${versionScript}"`,
42
42
  generateStyles: `node "${stylesScript}"`,
43
- generateTemplates: `mkdirp dist/generated/templates && node "${LIB}/hbs2ui5/index.js" -d test/elements -o dist/generated/templates`,
43
+ generateTemplates: `mkdirp src/generated/templates && cross-env UI5_BASE=true UI5_TS=true node "${LIB}/hbs2ui5/index.js" -d test/elements -o src/generated/templates`,
44
44
  generateAPI: {
45
45
  default: "nps generateAPI.prepare generateAPI.preprocess generateAPI.jsdoc generateAPI.cleanup",
46
46
  prepare: `copy-and-watch "dist/**/*.js" jsdoc-dist/`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ui5/webcomponents-base",
3
- "version": "1.13.0-rc.3",
3
+ "version": "1.13.0",
4
4
  "description": "UI5 Web Components: webcomponents.base",
5
5
  "author": "SAP SE (https://www.sap.com)",
6
6
  "license": "Apache-2.0",
@@ -37,7 +37,7 @@
37
37
  "devDependencies": {
38
38
  "@buxlabs/amd-to-es6": "0.16.1",
39
39
  "@openui5/sap.ui.core": "1.112.0",
40
- "@ui5/webcomponents-tools": "1.13.0-rc.3",
40
+ "@ui5/webcomponents-tools": "1.13.0",
41
41
  "chromedriver": "112.0.0",
42
42
  "clean-css": "^5.2.2",
43
43
  "copy-and-watch": "^0.1.5",
@@ -47,5 +47,5 @@
47
47
  "replace-in-file": "^6.3.5",
48
48
  "resolve": "^1.20.0"
49
49
  },
50
- "gitHead": "61c17ec60eb103e9b98d0acee1256be98430fbaf"
50
+ "gitHead": "c85ff70d47ba8f5e8c906066f2f4d36d432d2f6a"
51
51
  }
package/tsconfig.json CHANGED
@@ -9,6 +9,7 @@
9
9
  "sourceMap": true,
10
10
  "inlineSources": true,
11
11
  "strict": true,
12
- "moduleResolution": "node",
12
+ "module": "node16",
13
+ "moduleResolution": "node16",
13
14
  },
14
15
  }