@ui5/webcomponents-base 1.16.0-rc.1 → 1.16.0-rc.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +20 -0
- package/dist/assets/{Boot.a056aec2.js → Boot.5a9b49d7.js} +1 -1
- package/dist/assets/{bundle.esm.f204b5af.js → bundle.esm.e0ff2f8c.js} +11 -11
- package/dist/assets/test/pages/{Boot.html.214276fb.js → Boot.html.297ac63f.js} +1 -1
- package/dist/assets/test/pages/{i18n.html.0e755516.js → i18n.html.da527088.js} +1 -1
- package/dist/assets/test/pages/{i18n_texts.html.9e5c1502.js → i18n_texts.html.c8ead431.js} +1 -1
- package/dist/delegate/ItemNavigation.js +1 -1
- package/dist/delegate/ItemNavigation.js.map +1 -1
- package/dist/generated/VersionInfo.js +3 -3
- package/dist/i18nBundle.d.ts +1 -1
- package/dist/i18nBundle.js.map +1 -1
- package/dist/sap/ui/thirdparty/caja-html-sanitizer.js +111 -96
- package/dist/test/pages/AllTestElements.html +2 -2
- package/dist/test/pages/Boot.html +2 -2
- package/dist/test/pages/Configuration.html +2 -2
- package/dist/test/pages/ConfigurationScript.html +2 -2
- package/dist/test/pages/WithComplexTemplate.html +2 -2
- package/dist/test/pages/i18n.html +3 -3
- package/dist/test/pages/i18n_texts.html +3 -3
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,26 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [1.16.0-rc.3](https://github.com/SAP/ui5-webcomponents/compare/v1.16.0-rc.2...v1.16.0-rc.3) (2023-07-27)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @ui5/webcomponents-base
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# [1.16.0-rc.2](https://github.com/SAP/ui5-webcomponents/compare/v1.16.0-rc.1...v1.16.0-rc.2) (2023-07-20)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Bug Fixes
|
|
18
|
+
|
|
19
|
+
* **framework:** fix I18Bundle#getText params TypeScript types ([#7310](https://github.com/SAP/ui5-webcomponents/issues/7310)) ([2f88dc8](https://github.com/SAP/ui5-webcomponents/commit/2f88dc814dd393748a7482c7f6566d244368c970)), closes [#7300](https://github.com/SAP/ui5-webcomponents/issues/7300)
|
|
20
|
+
* **ui5:** change "focus-visible" pseudo selector to "focus" ([#7338](https://github.com/SAP/ui5-webcomponents/issues/7338)) ([37505c3](https://github.com/SAP/ui5-webcomponents/commit/37505c3f4e5dfe1c23fba7b5ee675312752f7ef5))
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
6
26
|
# [1.16.0-rc.1](https://github.com/SAP/ui5-webcomponents/compare/v1.16.0-rc.0...v1.16.0-rc.1) (2023-07-13)
|
|
7
27
|
|
|
8
28
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))s(o);new MutationObserver(o=>{for(const r of o)if(r.type==="childList")for(const a of r.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&s(a)}).observe(document,{childList:!0,subtree:!0});function n(o){const r={};return o.integrity&&(r.integrity=o.integrity),o.referrerpolicy&&(r.referrerPolicy=o.referrerpolicy),o.crossorigin==="use-credentials"?r.credentials="include":o.crossorigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function s(o){if(o.ep)return;o.ep=!0;const r=n(o);fetch(o.href,r)}})();const C={themes:{default:"sap_fiori_3",all:["sap_fiori_3","sap_fiori_3_dark","sap_belize","sap_belize_hcb","sap_belize_hcw","sap_fiori_3_hcb","sap_fiori_3_hcw","sap_horizon","sap_horizon_dark","sap_horizon_hcb","sap_horizon_hcw","sap_horizon_exp"]},languages:{default:"en",all:["ar","bg","ca","cs","cy","da","de","el","en","en_GB","en_US_sappsd","en_US_saprigi","en_US_saptrc","es","es_MX","et","fi","fr","fr_CA","hi","hr","hu","in","it","iw","ja","kk","ko","lt","lv","ms","nl","no","pl","pt_PT","pt","ro","ru","sh","sk","sl","sv","th","tr","uk","vi","zh_CN","zh_TW"]},locales:{default:"en",all:["ar","ar_EG","ar_SA","bg","ca","cs","da","de","de_AT","de_CH","el","el_CY","en","en_AU","en_GB","en_HK","en_IE","en_IN","en_NZ","en_PG","en_SG","en_ZA","es","es_AR","es_BO","es_CL","es_CO","es_MX","es_PE","es_UY","es_VE","et","fa","fi","fr","fr_BE","fr_CA","fr_CH","fr_LU","he","hi","hr","hu","id","it","it_CH","ja","kk","ko","lt","lv","ms","nb","nl","nl_BE","pl","pt","pt_PT","ro","ru","ru_UA","sk","sl","sr","sr_Latn","sv","th","tr","uk","vi","zh_CN","zh_HK","zh_SG","zh_TW"]}},M=C.themes.default,ct=C.themes.all,V=C.languages.default,l=C.locales.default,fe=C.locales.all,ut=()=>{const e=navigator.languages,t=()=>navigator.language;return e&&e[0]||t()||V};var Ie={},Oe=Ie.hasOwnProperty,lt=Ie.toString,Ue=Oe.toString,ft=Ue.call(Object),de=function(e){var t,n;return!e||lt.call(e)!=="[object Object]"?!1:(t=Object.getPrototypeOf(e),t?(n=Oe.call(t,"constructor")&&t.constructor,typeof n=="function"&&Ue.call(n)===ft):!0)},dt=Object.create(null),De=function(e,t,n,s){var o,r,a,i,g,m,d=arguments[2]||{},N=3,at=arguments.length,le=arguments[0]||!1,it=arguments[1]?void 0:dt;for(typeof d!="object"&&typeof d!="function"&&(d={});N<at;N++)if((g=arguments[N])!=null)for(i in g)o=d[i],a=g[i],!(i==="__proto__"||d===a)&&(le&&a&&(de(a)||(r=Array.isArray(a)))?(r?(r=!1,m=o&&Array.isArray(o)?o:[]):m=o&&de(o)?o:{},d[i]=De(le,arguments[1],m,a)):a!==it&&(d[i]=a));return d};const Me=function(e,t){return De(!0,!1,...arguments)},ke=new Map,ht=(e,t)=>{ke.set(e,t)},_=e=>ke.get(e),pt=e=>{const t=document.querySelector(`META[name="${e}"]`);return t&&t.getAttribute("content")},gt=e=>{const t=pt("sap-allowedThemeOrigins");return t&&t.split(",").some(n=>n==="*"||e===n.trim())},mt=(e,t)=>{const n=new URL(e).pathname;return new URL(n,t).toString()},ze=e=>{let t;try{if(e.startsWith(".")||e.startsWith("/"))t=new URL(e,window.location.href).toString();else{const n=new URL(e),s=n.origin;s&>(s)?t=n.toString():t=mt(n.toString(),window.location.href)}return t.endsWith("/")||(t=`${t}/`),`${t}UI5/`}catch{}};var ee;(function(e){e.Full="full",e.Basic="basic",e.Minimal="minimal",e.None="none"})(ee||(ee={}));const wt=ee;let he=!1,u={animationMode:wt.Full,theme:M,themeRoot:void 0,rtl:void 0,language:void 0,timezone:void 0,calendarType:void 0,noConflict:!1,formatSettings:{},fetchDefaultLanguage:!1};const Jn=()=>(f(),u.animationMode),yt=()=>(f(),u.theme),St=()=>(f(),u.themeRoot),Xn=()=>(f(),u.rtl),_t=()=>(f(),u.language),Tt=()=>(f(),u.fetchDefaultLanguage),Yn=()=>(f(),u.noConflict),Qn=()=>(f(),u.calendarType),es=()=>(f(),u.formatSettings),k=new Map;k.set("true",!0);k.set("false",!1);const bt=()=>{const e=document.querySelector("[data-ui5-config]")||document.querySelector("[data-id='sap-ui-config']");let t;if(e){try{t=JSON.parse(e.innerHTML)}catch{console.warn("Incorrect data-sap-ui-config format. Please use JSON")}t&&(u=Me(u,t))}},Lt=()=>{const e=new URLSearchParams(window.location.search);e.forEach((t,n)=>{const s=n.split("sap-").length;s===0||s===n.split("sap-ui-").length||pe(n,t,"sap")}),e.forEach((t,n)=>{!n.startsWith("sap-ui")||pe(n,t,"sap-ui")})},At=e=>{const t=e.split("@")[1];return ze(t)},vt=(e,t)=>e==="theme"&&t.includes("@")?t.split("@")[0]:t,pe=(e,t,n)=>{const s=t.toLowerCase(),o=e.split(`${n}-`)[1];k.has(t)&&(t=k.get(s)),o==="theme"?(u.theme=vt(o,t),t&&t.includes("@")&&(u.themeRoot=At(t))):u[o]=t},Ct=()=>{const e=_("OpenUI5Support");if(!e||!e.isOpenUI5Detected())return;const t=e.getConfigurationSettingsObject();u=Me(u,t)},f=()=>{typeof document>"u"||he||(bt(),Lt(),Ct(),he=!0)};class E{constructor(){this._eventRegistry=new Map}attachEvent(t,n){const s=this._eventRegistry,o=s.get(t);if(!Array.isArray(o)){s.set(t,[n]);return}o.includes(n)||o.push(n)}detachEvent(t,n){const s=this._eventRegistry,o=s.get(t);if(!o)return;const r=o.indexOf(n);r!==-1&&o.splice(r,1),o.length===0&&s.delete(t)}fireEvent(t,n){const o=this._eventRegistry.get(t);return o?o.map(r=>r.call(this,n)):[]}fireEventAsync(t,n){return Promise.all(this.fireEvent(t,n))}isHandlerAttached(t,n){const o=this._eventRegistry.get(t);return o?o.includes(n):!1}hasListeners(t){return!!this._eventRegistry.get(t)}}const xe=new E,Be="languageChange",Fe=e=>{xe.attachEvent(Be,e)},Et=e=>xe.fireEventAsync(Be,e),ge=10;class Pt{constructor(){this.list=[],this.lookup=new Set}add(t){this.lookup.has(t)||(this.list.push(t),this.lookup.add(t))}remove(t){!this.lookup.has(t)||(this.list=this.list.filter(n=>n!==t),this.lookup.delete(t))}shift(){const t=this.list.shift();if(t)return this.lookup.delete(t),t}isEmpty(){return this.list.length===0}isAdded(t){return this.lookup.has(t)}process(t){let n;const s=new Map;for(n=this.shift();n;){const o=s.get(n)||0;if(o>ge)throw new Error(`Web component processed too many times this task, max allowed is: ${ge}`);t(n),s.set(n,o+1),n=this.shift()}}}const $t=(e,t=document.body,n)=>{let s=document.querySelector(e);return s||(s=n?n():document.createElement(e),t.insertBefore(s,t.firstChild))},Rt=()=>{const e=document.createElement("meta");return e.setAttribute("name","ui5-shared-resources"),e.setAttribute("content",""),e},It=()=>typeof document>"u"?null:$t('meta[name="ui5-shared-resources"]',document.head,Rt),P=(e,t)=>{const n=e.split(".");let s=It();if(!s)return t;for(let o=0;o<n.length;o++){const r=n[o],a=o===n.length-1;Object.prototype.hasOwnProperty.call(s,r)||(s[r]=a?t:{}),s=s[r]}return s},Ot={version:"1.16.0-rc.
|
|
1
|
+
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))s(o);new MutationObserver(o=>{for(const r of o)if(r.type==="childList")for(const a of r.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&s(a)}).observe(document,{childList:!0,subtree:!0});function n(o){const r={};return o.integrity&&(r.integrity=o.integrity),o.referrerpolicy&&(r.referrerPolicy=o.referrerpolicy),o.crossorigin==="use-credentials"?r.credentials="include":o.crossorigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function s(o){if(o.ep)return;o.ep=!0;const r=n(o);fetch(o.href,r)}})();const C={themes:{default:"sap_fiori_3",all:["sap_fiori_3","sap_fiori_3_dark","sap_belize","sap_belize_hcb","sap_belize_hcw","sap_fiori_3_hcb","sap_fiori_3_hcw","sap_horizon","sap_horizon_dark","sap_horizon_hcb","sap_horizon_hcw","sap_horizon_exp"]},languages:{default:"en",all:["ar","bg","ca","cs","cy","da","de","el","en","en_GB","en_US_sappsd","en_US_saprigi","en_US_saptrc","es","es_MX","et","fi","fr","fr_CA","hi","hr","hu","in","it","iw","ja","kk","ko","lt","lv","ms","nl","no","pl","pt_PT","pt","ro","ru","sh","sk","sl","sv","th","tr","uk","vi","zh_CN","zh_TW"]},locales:{default:"en",all:["ar","ar_EG","ar_SA","bg","ca","cs","da","de","de_AT","de_CH","el","el_CY","en","en_AU","en_GB","en_HK","en_IE","en_IN","en_NZ","en_PG","en_SG","en_ZA","es","es_AR","es_BO","es_CL","es_CO","es_MX","es_PE","es_UY","es_VE","et","fa","fi","fr","fr_BE","fr_CA","fr_CH","fr_LU","he","hi","hr","hu","id","it","it_CH","ja","kk","ko","lt","lv","ms","nb","nl","nl_BE","pl","pt","pt_PT","ro","ru","ru_UA","sk","sl","sr","sr_Latn","sv","th","tr","uk","vi","zh_CN","zh_HK","zh_SG","zh_TW"]}},M=C.themes.default,ct=C.themes.all,V=C.languages.default,l=C.locales.default,fe=C.locales.all,ut=()=>{const e=navigator.languages,t=()=>navigator.language;return e&&e[0]||t()||V};var Ie={},Oe=Ie.hasOwnProperty,lt=Ie.toString,Ue=Oe.toString,ft=Ue.call(Object),de=function(e){var t,n;return!e||lt.call(e)!=="[object Object]"?!1:(t=Object.getPrototypeOf(e),t?(n=Oe.call(t,"constructor")&&t.constructor,typeof n=="function"&&Ue.call(n)===ft):!0)},dt=Object.create(null),De=function(e,t,n,s){var o,r,a,i,g,m,d=arguments[2]||{},N=3,at=arguments.length,le=arguments[0]||!1,it=arguments[1]?void 0:dt;for(typeof d!="object"&&typeof d!="function"&&(d={});N<at;N++)if((g=arguments[N])!=null)for(i in g)o=d[i],a=g[i],!(i==="__proto__"||d===a)&&(le&&a&&(de(a)||(r=Array.isArray(a)))?(r?(r=!1,m=o&&Array.isArray(o)?o:[]):m=o&&de(o)?o:{},d[i]=De(le,arguments[1],m,a)):a!==it&&(d[i]=a));return d};const Me=function(e,t){return De(!0,!1,...arguments)},ke=new Map,ht=(e,t)=>{ke.set(e,t)},_=e=>ke.get(e),pt=e=>{const t=document.querySelector(`META[name="${e}"]`);return t&&t.getAttribute("content")},gt=e=>{const t=pt("sap-allowedThemeOrigins");return t&&t.split(",").some(n=>n==="*"||e===n.trim())},mt=(e,t)=>{const n=new URL(e).pathname;return new URL(n,t).toString()},ze=e=>{let t;try{if(e.startsWith(".")||e.startsWith("/"))t=new URL(e,window.location.href).toString();else{const n=new URL(e),s=n.origin;s&>(s)?t=n.toString():t=mt(n.toString(),window.location.href)}return t.endsWith("/")||(t=`${t}/`),`${t}UI5/`}catch{}};var ee;(function(e){e.Full="full",e.Basic="basic",e.Minimal="minimal",e.None="none"})(ee||(ee={}));const wt=ee;let he=!1,u={animationMode:wt.Full,theme:M,themeRoot:void 0,rtl:void 0,language:void 0,timezone:void 0,calendarType:void 0,noConflict:!1,formatSettings:{},fetchDefaultLanguage:!1};const Jn=()=>(f(),u.animationMode),yt=()=>(f(),u.theme),St=()=>(f(),u.themeRoot),Xn=()=>(f(),u.rtl),_t=()=>(f(),u.language),Tt=()=>(f(),u.fetchDefaultLanguage),Yn=()=>(f(),u.noConflict),Qn=()=>(f(),u.calendarType),es=()=>(f(),u.formatSettings),k=new Map;k.set("true",!0);k.set("false",!1);const bt=()=>{const e=document.querySelector("[data-ui5-config]")||document.querySelector("[data-id='sap-ui-config']");let t;if(e){try{t=JSON.parse(e.innerHTML)}catch{console.warn("Incorrect data-sap-ui-config format. Please use JSON")}t&&(u=Me(u,t))}},Lt=()=>{const e=new URLSearchParams(window.location.search);e.forEach((t,n)=>{const s=n.split("sap-").length;s===0||s===n.split("sap-ui-").length||pe(n,t,"sap")}),e.forEach((t,n)=>{!n.startsWith("sap-ui")||pe(n,t,"sap-ui")})},At=e=>{const t=e.split("@")[1];return ze(t)},vt=(e,t)=>e==="theme"&&t.includes("@")?t.split("@")[0]:t,pe=(e,t,n)=>{const s=t.toLowerCase(),o=e.split(`${n}-`)[1];k.has(t)&&(t=k.get(s)),o==="theme"?(u.theme=vt(o,t),t&&t.includes("@")&&(u.themeRoot=At(t))):u[o]=t},Ct=()=>{const e=_("OpenUI5Support");if(!e||!e.isOpenUI5Detected())return;const t=e.getConfigurationSettingsObject();u=Me(u,t)},f=()=>{typeof document>"u"||he||(bt(),Lt(),Ct(),he=!0)};class E{constructor(){this._eventRegistry=new Map}attachEvent(t,n){const s=this._eventRegistry,o=s.get(t);if(!Array.isArray(o)){s.set(t,[n]);return}o.includes(n)||o.push(n)}detachEvent(t,n){const s=this._eventRegistry,o=s.get(t);if(!o)return;const r=o.indexOf(n);r!==-1&&o.splice(r,1),o.length===0&&s.delete(t)}fireEvent(t,n){const o=this._eventRegistry.get(t);return o?o.map(r=>r.call(this,n)):[]}fireEventAsync(t,n){return Promise.all(this.fireEvent(t,n))}isHandlerAttached(t,n){const o=this._eventRegistry.get(t);return o?o.includes(n):!1}hasListeners(t){return!!this._eventRegistry.get(t)}}const xe=new E,Be="languageChange",Fe=e=>{xe.attachEvent(Be,e)},Et=e=>xe.fireEventAsync(Be,e),ge=10;class Pt{constructor(){this.list=[],this.lookup=new Set}add(t){this.lookup.has(t)||(this.list.push(t),this.lookup.add(t))}remove(t){!this.lookup.has(t)||(this.list=this.list.filter(n=>n!==t),this.lookup.delete(t))}shift(){const t=this.list.shift();if(t)return this.lookup.delete(t),t}isEmpty(){return this.list.length===0}isAdded(t){return this.lookup.has(t)}process(t){let n;const s=new Map;for(n=this.shift();n;){const o=s.get(n)||0;if(o>ge)throw new Error(`Web component processed too many times this task, max allowed is: ${ge}`);t(n),s.set(n,o+1),n=this.shift()}}}const $t=(e,t=document.body,n)=>{let s=document.querySelector(e);return s||(s=n?n():document.createElement(e),t.insertBefore(s,t.firstChild))},Rt=()=>{const e=document.createElement("meta");return e.setAttribute("name","ui5-shared-resources"),e.setAttribute("content",""),e},It=()=>typeof document>"u"?null:$t('meta[name="ui5-shared-resources"]',document.head,Rt),P=(e,t)=>{const n=e.split(".");let s=It();if(!s)return t;for(let o=0;o<n.length;o++){const r=n[o],a=o===n.length-1;Object.prototype.hasOwnProperty.call(s,r)||(s[r]=a?t:{}),s=s[r]}return s},Ot={version:"1.16.0-rc.3",major:1,minor:16,patch:0,suffix:"-rc.3",isNext:!1,buildTime:1690445606};let U,Ut="";const W=new Map,A=P("Runtimes",[]),Dt=()=>{if(U===void 0){U=A.length;const e=Ot;A.push({...e,alias:Ut,description:`Runtime ${U} - ver ${e.version}`})}},$=()=>U,Mt=(e,t)=>{const n=`${e},${t}`;if(W.has(n))return W.get(n);const s=A[e],o=A[t];if(!s||!o)throw new Error("Invalid runtime index supplied");if(s.isNext||o.isNext)return s.buildTime-o.buildTime;const r=s.major-o.major;if(r)return r;const a=s.minor-o.minor;if(a)return a;const i=s.patch-o.patch;if(i)return i;const m=new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"}).compare(s.suffix,o.suffix);return W.set(n,m),m},kt=()=>A,Ve=P("Tags",new Map),oe=new Set;let p=new Map,H;const je=-1,ts=e=>{oe.add(e),Ve.set(e,$())},ns=e=>oe.has(e),zt=()=>[...oe.values()],ss=e=>{let t=Ve.get(e);t===void 0&&(t=je),p.has(t)||p.set(t,new Set),p.get(t).add(e),H||(H=setTimeout(()=>{xt(),p=new Map,H=void 0},1e3))},xt=()=>{const e=kt(),t=$(),n=e[t];let s="Multiple UI5 Web Components instances detected.";e.length>1&&(s=`${s}
|
|
2
2
|
Loading order (versions before 1.1.0 not listed): ${e.map(o=>`
|
|
3
3
|
${o.description}`).join("")}`),[...p.keys()].forEach(o=>{let r,a;o===je?(r=1,a={description:"Older unknown runtime"}):(r=Mt(t,o),a=e[o]);let i;r>0?i="an older":r<0?i="a newer":i="the same",s=`${s}
|
|
4
4
|
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import{f as ue,g as he,r as Ht,a as kt,E as K,b as J,c as pe,d as Bt,e as fe,h as ft,i as Vt,j as ge,k as me,l as _e,m as ye,n as ve,o as Ae,p as $e,q as we,s as Se,t as be,u as Ce,v as w,w as Ee,x as Me,y as Te,z as Ft,A as xe,B as De,C as Ie,D as Pe,F as Le,_ as Ne,G as Re}from"./Boot.a056aec2.js";const Oe=/('')|'([^']+(?:''[^']*)*)(?:'|$)|\{([0-9]+(?:\s*,[^{}]*)?)\}|[{}]/g,He=(s,t)=>(t=t||[],s.replace(Oe,(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}`)})),Y=new Map;class ke{constructor(t){this.packageName=t}getText(t,...e){if(typeof t=="string"&&(t={key:t,defaultText:t}),!t||!t.key)return"";const n=he(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 He(i,e)}}const Be=s=>{if(Y.has(s))return Y.get(s);const t=new ke(s);return Y.set(s,t),t},Ve=async s=>(await ue(s),Be(s)),Q=new Map,tt=new Map,yt=s=>{if(!Q.has(s)){const t=Fe(s.split("-"));Q.set(s,t)}return Q.get(s)},Ut=s=>{if(!tt.has(s)){const t=s.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();tt.set(s,t)}return tt.get(s)},Fe=s=>s.map((t,e)=>e===0?t.toLowerCase():t.charAt(0).toUpperCase()+t.slice(1).toLowerCase()).join(""),Ue=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"},jt=s=>s instanceof HTMLSlotElement?s.assignedNodes({flatten:!0}).filter(t=>t instanceof HTMLElement):[s],je=s=>s.reduce((t,e)=>t.concat(jt(e)),[]);let We,vt={include:[/^ui5-/],exclude:[]};const et=new Map,Wt=()=>We,dt=s=>{if(!et.has(s)){const t=vt.include.some(e=>s.match(e))&&!vt.exclude.some(e=>s.match(e));et.set(s,t)}return et.get(s)},zt=s=>{if(dt(s))return Wt()};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=>At(i,e)):At(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=zt(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(Ut)}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 At=(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&&jt(s).forEach(e=>{if(!(e instanceof t.type))throw new Error(`The element is not of type ${t.type.toString()}`)}),s);class qe extends HTMLElement{}customElements.get("ui5-static-area")||customElements.define("ui5-static-area",qe);const Ze=()=>kt("CustomStyle.eventProvider",new K),Ke="CustomCSSChange",gt=s=>{Ze().attachEvent(Ke,s)},Je=()=>kt("CustomStyle.customCSSFor",{});gt(s=>{Ht({tag:s})});const Xe=s=>{const t=Je();return t[s]?t[s].join(""):""},Ye=10,st=s=>Array.isArray(s)?s.filter(t=>!!t).flat(Ye).map(t=>typeof t=="string"?t:t.content).join(" "):typeof s=="string"?s:s.content,W=new Map;gt(s=>{W.delete(`${s}_normal`)});const Gt=(s,t=!1)=>{const e=s.getMetadata().getTag(),n=`${e}_${t?"static":"normal"}`,i=J("OpenUI5Enablement");if(!W.has(n)){let r,o="";if(i&&(o=st(i.getBusyIndicatorStyles())),t)r=st(s.staticAreaStyles);else{const c=Xe(e)||"";r=`${st(s.styles)} ${c}`}r=`${r} ${o}`,W.set(n,r)}return W.get(n)},z=new Map;gt(s=>{z.delete(`${s}_normal`)});const Qe=(s,t=!1)=>{const n=`${s.getMetadata().getTag()}_${t?"static":"normal"}`;if(!z.has(n)){const i=Gt(s,t),r=new CSSStyleSheet;r.replaceSync(i),z.set(n,[r])}return z.get(n)},ut=(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=Qe(n,t):e=Gt(n,t),n.renderer){n.renderer(r,i,e,t,{host:s});return}n.render(r,i,e,t,{host:s})},ts="--_ui5_content_density",es=s=>getComputedStyle(s).getPropertyValue(ts),ss=s=>{const t=/\$([-a-z0-9A-Z._]+)(?::([^$]*))?\$/.exec(s);return t&&t[2]?t[2].split(/,/):null},ns={iw:"he",ji:"yi",in:"id",sh:"sr"},is=ss("$cldr-rtl-locales:ar,fa,he$")||[],rs=s=>(s=s&&ns[s]||s,is.indexOf(s)>=0),qt=()=>{if(typeof document>"u")return!1;const s=pe();return s!==void 0?!!s:rs(Bt()||fe())},os="--_ui5_dir",Zt=s=>{const t=window.document,e=["ltr","rtl"],n=getComputedStyle(s).getPropertyValue(os);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:qt()?"rtl":void 0},j="ui5-static-area-item",as="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.updateAdditionalProperties(),ut(this.ownerElement,!0))}updateAdditionalProperties(){this._updateAdditionalAttrs(),this._updateContentDensity(),this._updateDirection()}_updateContentDensity(){es(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=Zt(this.ownerElement);t?this.setAttribute("dir",t):this.removeAttribute("dir")}}_updateAdditionalAttrs(){this.setAttribute(`_ui5rt${ft()}`,""),this.setAttribute("_ui5host",""),this.setAttribute(j,""),this.setAttribute(as,"")}async getDomRef(){return this.updateAdditionalProperties(),this._rendered||(this._rendered=!0,ut(this.ownerElement,!0)),await Vt(),this.shadowRoot}static getTag(){const t=zt(j);return t?`${j}-${t}`:j}static createInstance(){return customElements.get(R.getTag())||customElements.define(R.getTag(),R),document.createElement(this.getTag())}}const ls=[],cs=s=>ls.some(t=>s.startsWith(t)),ht=new WeakMap,ds=(s,t,e)=>{const n=new MutationObserver(t);ht.set(s,n),n.observe(s,e)},us=s=>{const t=ht.get(s);t&&(t.disconnect(),ht.delete(s))},hs=["value-changed","click"];let G;const ps=s=>hs.includes(s),fs=s=>{const t=mt();return!(typeof t!="boolean"&&t.events&&t.events.includes&&t.events.includes(s))},mt=()=>(G===void 0&&(G=ge()),G),gs=s=>{G=s},ms=s=>{const t=mt();return ps(s)?!1:t===!0?!0:!fs(s)},_s=["disabled","title","hidden","role","draggable"],$t=s=>_s.includes(s)||s.startsWith("aria")?!0:![HTMLElement,Element,Node].some(e=>e.prototype.hasOwnProperty(s)),wt=(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},St=(s,t)=>{const e=ys(t),n=Wt();return s.call(t,t,e,n)},ys=s=>{const t=s.constructor,e=t.getMetadata().getPureTag(),n=t.getUniqueDependencies().map(i=>i.getMetadata().getPureTag()).filter(dt);return dt(e)&&n.push(e),n};let vs=0;const bt=new Map,nt=new Map;function I(s){this._suppressInvalidation||(this.onInvalidation(s),this._changedState.push(s),Ce(this),this._eventProvider.fireEvent("invalidate",{...s,target:this}))}class $ 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 K;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 St(t,this)}renderStatic(){const t=this.constructor.staticAreaTemplate;return St(t,this)}async connectedCallback(){const t=this.constructor;this.setAttribute(`_ui5rt${ft()}`,""),this.setAttribute("_ui5host",""),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&&(me(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=Ue(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("-")&&!cs(g)){if(!window.customElements.get(g)){const ce=window.customElements.whenDefined(g);let U=bt.get(g);U||(U=new Promise(de=>setTimeout(de,1e3)),bt.set(g,U)),await Promise.race([ce,U])}window.customElements.upgrade(d)}}if(d=t.getMetadata().constructor.validateSlotValue(d,f),Ct(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;wt(r.get(h),this._state[h])||(I.call(this,{type:"slot",name:o.get(h),reason:"children"}),p=!0)}p||I.call(this,{type:"slot",name:"default",reason:"textcontent"})}_clearSlot(t,e){const n=e.propertyName||t;this._state[n].forEach(r=>{if(Ct(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)||I.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=yt(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=Ut(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){I.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()&&ut(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=yt(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 je(this[t])}get effectiveDir(){return ye(this.constructor),Zt(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||ve("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($t(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=!wt(u,o):c=u!==o,c&&(this._state[i]=o,I.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)){$t(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(!nt.has(this)){const t=this.dependencies.filter((e,n,i)=>i.indexOf(e)===n);nt.set(this,t)}return nt.get(this)||[]}static whenDependenciesDefined(){return Promise.all(this.getUniqueDependencies().map(t=>t.define()))}static async onDefine(){return Promise.resolve()}static async define(){await Ae(),await Promise.all([this.whenDependenciesDefined(),this.onDefine()]);const t=this.getMetadata().getTag(),e=$e(t),n=customElements.get(t);return n&&!e?we(t):n||(this._generateAccessors(),Se(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!==$;)e=Object.getPrototypeOf(e),t.unshift(e.metadata);const n=be({},...t);return this._metadata=new ze(n),this._metadata}}$.metadata={};const Ct=s=>"isUI5Element"in s;/**
|
|
1
|
+
import{f as he,g as pe,r as Ht,a as kt,E as K,b as J,c as fe,d as Bt,e as ge,h as ft,i as Vt,j as me,k as _e,l as ye,m as ve,n as Ae,o as $e,p as we,q as Se,s as be,t as Ce,u as Ee,v as w,w as Me,x as Te,y as xe,z as Ft,A as De,B as Ie,C as Pe,D as Le,F as Ne,_ as Re,G as Oe}from"./Boot.5a9b49d7.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 l=typeof r=="string"?parseInt(r):r;return String(t[l])}throw new Error(`[i18n]: pattern syntax error at pos ${o}`)})),Y=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=pe(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(Y.has(s))return Y.get(s);const t=new Be(s);return Y.set(s,t),t},Fe=async s=>(await he(s),Ve(s)),Q=new Map,tt=new Map,yt=s=>{if(!Q.has(s)){const t=Ue(s.split("-"));Q.set(s,t)}return Q.get(s)},Ut=s=>{if(!tt.has(s)){const t=s.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();tt.set(s,t)}return tt.get(s)},Ue=s=>s.map((t,e)=>e===0?t.toLowerCase():t.charAt(0).toUpperCase()+t.slice(1).toLowerCase()).join(""),je=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"},jt=s=>s instanceof HTMLSlotElement?s.assignedNodes({flatten:!0}).filter(t=>t instanceof HTMLElement):[s],We=s=>s.reduce((t,e)=>t.concat(jt(e)),[]);let ze,vt={include:[/^ui5-/],exclude:[]};const et=new Map,Wt=()=>ze,dt=s=>{if(!et.has(s)){const t=vt.include.some(e=>s.match(e))&&!vt.exclude.some(e=>s.match(e));et.set(s,t)}return et.get(s)},zt=s=>{if(dt(s))return Wt()};class Ge{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 l=o.propertyName||r;t[l]=[]}}return this._initialState=t,t}static validatePropertyValue(t,e){return e.multiple&&t?t.map(i=>At(i,e)):At(t,e)}static validateSlotValue(t,e){return qe(t,e)}getPureTag(){return this.metadata.tag||""}getTag(){const t=this.metadata.tag;if(!t)return"";const e=zt(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(Ut)}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 At=(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},qe=(s,t)=>(s&&jt(s).forEach(e=>{if(!(e instanceof t.type))throw new Error(`The element is not of type ${t.type.toString()}`)}),s);class Ze extends HTMLElement{}customElements.get("ui5-static-area")||customElements.define("ui5-static-area",Ze);const Ke=()=>kt("CustomStyle.eventProvider",new K),Je="CustomCSSChange",gt=s=>{Ke().attachEvent(Je,s)},Xe=()=>kt("CustomStyle.customCSSFor",{});gt(s=>{Ht({tag:s})});const Ye=s=>{const t=Xe();return t[s]?t[s].join(""):""},Qe=10,st=s=>Array.isArray(s)?s.filter(t=>!!t).flat(Qe).map(t=>typeof t=="string"?t:t.content).join(" "):typeof s=="string"?s:s.content,W=new Map;gt(s=>{W.delete(`${s}_normal`)});const Gt=(s,t=!1)=>{const e=s.getMetadata().getTag(),n=`${e}_${t?"static":"normal"}`,i=J("OpenUI5Enablement");if(!W.has(n)){let r,o="";if(i&&(o=st(i.getBusyIndicatorStyles())),t)r=st(s.staticAreaStyles);else{const l=Ye(e)||"";r=`${st(s.styles)} ${l}`}r=`${r} ${o}`,W.set(n,r)}return W.get(n)},z=new Map;gt(s=>{z.delete(`${s}_normal`)});const ts=(s,t=!1)=>{const n=`${s.getMetadata().getTag()}_${t?"static":"normal"}`;if(!z.has(n)){const i=Gt(s,t),r=new CSSStyleSheet;r.replaceSync(i),z.set(n,[r])}return z.get(n)},ut=(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=ts(n,t):e=Gt(n,t),n.renderer){n.renderer(r,i,e,t,{host:s});return}n.render(r,i,e,t,{host:s})},es="--_ui5_content_density",ss=s=>getComputedStyle(s).getPropertyValue(es),ns=s=>{const t=/\$([-a-z0-9A-Z._]+)(?::([^$]*))?\$/.exec(s);return t&&t[2]?t[2].split(/,/):null},is={iw:"he",ji:"yi",in:"id",sh:"sr"},rs=ns("$cldr-rtl-locales:ar,fa,he$")||[],os=s=>(s=s&&is[s]||s,rs.indexOf(s)>=0),qt=()=>{if(typeof document>"u")return!1;const s=fe();return s!==void 0?!!s:os(Bt()||ge())},as="--_ui5_dir",Zt=s=>{const t=window.document,e=["ltr","rtl"],n=getComputedStyle(s).getPropertyValue(as);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:qt()?"rtl":void 0},j="ui5-static-area-item",ls="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.updateAdditionalProperties(),ut(this.ownerElement,!0))}updateAdditionalProperties(){this._updateAdditionalAttrs(),this._updateContentDensity(),this._updateDirection()}_updateContentDensity(){ss(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=Zt(this.ownerElement);t?this.setAttribute("dir",t):this.removeAttribute("dir")}}_updateAdditionalAttrs(){this.setAttribute(`_ui5rt${ft()}`,""),this.setAttribute("_ui5host",""),this.setAttribute(j,""),this.setAttribute(ls,"")}async getDomRef(){return this.updateAdditionalProperties(),this._rendered||(this._rendered=!0,ut(this.ownerElement,!0)),await Vt(),this.shadowRoot}static getTag(){const t=zt(j);return t?`${j}-${t}`:j}static createInstance(){return customElements.get(R.getTag())||customElements.define(R.getTag(),R),document.createElement(this.getTag())}}const cs=[],ds=s=>cs.some(t=>s.startsWith(t)),ht=new WeakMap,us=(s,t,e)=>{const n=new MutationObserver(t);ht.set(s,n),n.observe(s,e)},hs=s=>{const t=ht.get(s);t&&(t.disconnect(),ht.delete(s))},ps=["value-changed","click"];let G;const fs=s=>ps.includes(s),gs=s=>{const t=mt();return!(typeof t!="boolean"&&t.events&&t.events.includes&&t.events.includes(s))},mt=()=>(G===void 0&&(G=me()),G),ms=s=>{G=s},_s=s=>{const t=mt();return fs(s)?!1:t===!0?!0:!gs(s)},ys=["disabled","title","hidden","role","draggable"],$t=s=>ys.includes(s)||s.startsWith("aria")?!0:![HTMLElement,Element,Node].some(e=>e.prototype.hasOwnProperty(s)),wt=(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},St=(s,t)=>{const e=vs(t),n=Wt();return s.call(t,t,e,n)},vs=s=>{const t=s.constructor,e=t.getMetadata().getPureTag(),n=t.getUniqueDependencies().map(i=>i.getMetadata().getPureTag()).filter(dt);return dt(e)&&n.push(e),n};let As=0;const bt=new Map,nt=new Map;function I(s){this._suppressInvalidation||(this.onInvalidation(s),this._changedState.push(s),Ee(this),this._eventProvider.fireEvent("invalidate",{...s,target:this}))}class $ 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 K;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_${++As}`),this.__id}render(){const t=this.constructor.template;return St(t,this)}renderStatic(){const t=this.constructor.staticAreaTemplate;return St(t,this)}async connectedCallback(){const t=this.constructor;this.setAttribute(`_ui5rt${ft()}`,""),this.setAttribute("_ui5host",""),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&&(_e(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),ye(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};us(this,this._processChildren.bind(this),i)}_stopObservingDOMChildren(){hs(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 l=new Map,a=new Map,c=i.map(async(d,u)=>{const h=je(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=(l.get(h)||0)+1;l.set(h,g),d._individualSlot=`${h}-${g}`}if(d instanceof HTMLElement){const g=d.localName;if(g.includes("-")&&!ds(g)){if(!window.customElements.get(g)){const de=window.customElements.whenDefined(g);let U=bt.get(g);U||(U=new Promise(ue=>setTimeout(ue,1e3)),bt.set(g,U)),await Promise.race([de,U])}window.customElements.upgrade(d)}}if(d=t.getMetadata().constructor.validateSlotValue(d,f),Ct(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(c),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;wt(r.get(h),this._state[h])||(I.call(this,{type:"slot",name:o.get(h),reason:"children"}),p=!0)}p||I.call(this,{type:"slot",name:"default",reason:"textcontent"})}_clearSlot(t,e){const n=e.propertyName||t;this._state[n].forEach(r=>{if(Ct(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)||I.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-/,""),l=yt(o);if(r.hasOwnProperty(l)){const a=r[l],c=a.type;let p=a.validator;c&&c.isDataTypeClass&&(p=c),p?i=p.attributeToProperty(n):c===Boolean?i=n!==null:i=n,this[l]=i}}_updateAttribute(t,e){const n=this.constructor;if(!n.getMetadata().hasAttribute(t))return;const r=n.getMetadata().getProperties()[t],o=r.type;let l=r.validator;const a=Ut(t),c=this.getAttribute(a);if(o&&o.isDataTypeClass&&(l=o),l){const p=l.propertyToAttribute(e);p===null?(this._doNotSyncAttributes.add(a),this.removeAttribute(a),this._doNotSyncAttributes.delete(a)):this.setAttribute(a,p)}else o===Boolean?e===!0&&c===null?this.setAttribute(a,""):e===!1&&c!==null&&this.removeAttribute(a):typeof e!="object"&&c!==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){I.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()&&ut(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=yt(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(_s(t))return o;const l=new CustomEvent(t,{detail:e,composed:!1,bubbles:i,cancelable:n});return this.dispatchEvent(l)&&o}getSlottedNodes(t){return We(this[t])}get effectiveDir(){return ve(this.constructor),Zt(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||Ae("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($t(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 l;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?l=!d.valuesAreEqual(u,o):Array.isArray(u)&&Array.isArray(o)&&r.multiple&&r.compareValues?l=!wt(u,o):l=u!==o,l&&(this._state[i]=o,I.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)){$t(r)||console.warn(`"${r}" is not a valid property name. Use a name that does not collide with DOM APIs`);const l=o.propertyName||r;Object.defineProperty(t,l,{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...)")}})}}}static get styles(){return""}static get staticAreaStyles(){return""}static get dependencies(){return[]}static getUniqueDependencies(){if(!nt.has(this)){const t=this.dependencies.filter((e,n,i)=>i.indexOf(e)===n);nt.set(this,t)}return nt.get(this)||[]}static whenDependenciesDefined(){return Promise.all(this.getUniqueDependencies().map(t=>t.define()))}static async onDefine(){return Promise.resolve()}static async define(){await $e(),await Promise.all([this.whenDependenciesDefined(),this.onDefine()]);const t=this.getMetadata().getTag(),e=we(t),n=customElements.get(t);return n&&!e?Se(t):n||(this._generateAccessors(),be(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!==$;)e=Object.getPrototypeOf(e),t.unshift(e.metadata);const n=Ce({},...t);return this._metadata=new Ge(n),this._metadata}}$.metadata={};const Ct=s=>"isUI5Element"in s;/**
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright 2017 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
-
*/var it;const q=window,
|
|
5
|
+
*/var it;const q=window,x=q.trustedTypes,Et=x?x.createPolicy("lit-html",{createHTML:s=>s}):void 0,Z="$lit$",A=`lit$${(Math.random()+"").slice(9)}$`,_t="?"+A,$s=`<${_t}>`,E=document,O=()=>E.createComment(""),H=s=>s===null||typeof s!="object"&&typeof s!="function",Kt=Array.isArray,Jt=s=>Kt(s)||typeof(s==null?void 0:s[Symbol.iterator])=="function",rt=`[
|
|
6
6
|
\f\r]`,P=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Mt=/-->/g,Tt=/>/g,S=RegExp(`>|${rt}(?:([^\\s"'>=/]+)(${rt}*=${rt}*(?:[^
|
|
7
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),xt=/'/g,Dt=/"/g,Xt=/^(?:script|style|textarea|title)$/i
|
|
7
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),xt=/'/g,Dt=/"/g,Xt=/^(?:script|style|textarea|title)$/i,ws=s=>(t,...e)=>({_$litType$:s,strings:t,values:e}),Ss=ws(1),M=Symbol.for("lit-noChange"),_=Symbol.for("lit-nothing"),It=new WeakMap,C=E.createTreeWalker(E,129,null,!1);function Yt(s,t){if(!Array.isArray(s)||!s.hasOwnProperty("raw"))throw Error("invalid template strings array");return Et!==void 0?Et.createHTML(t):t}const Qt=(s,t)=>{const e=s.length-1,n=[];let i,r=t===2?"<svg>":"",o=P;for(let l=0;l<e;l++){const a=s[l];let c,p,d=-1,u=0;for(;u<a.length&&(o.lastIndex=u,p=o.exec(a),p!==null);)u=o.lastIndex,o===P?p[1]==="!--"?o=Mt:p[1]!==void 0?o=Tt:p[2]!==void 0?(Xt.test(p[2])&&(i=RegExp("</"+p[2],"g")),o=S):p[3]!==void 0&&(o=S):o===S?p[0]===">"?(o=i!=null?i:P,d=-1):p[1]===void 0?d=-2:(d=o.lastIndex-p[2].length,c=p[1],o=p[3]===void 0?S:p[3]==='"'?Dt:xt):o===Dt||o===xt?o=S:o===Mt||o===Tt?o=P:(o=S,i=void 0);const h=o===S&&s[l+1].startsWith("/>")?" ":"";r+=o===P?a+$s:d>=0?(n.push(c),a.slice(0,d)+Z+a.slice(d)+A+h):a+A+(d===-2?(n.push(void 0),l):h)}return[Yt(s,r+(s[e]||"<?>")+(t===2?"</svg>":"")),n]};class k{constructor({strings:t,_$litType$:e},n){let i;this.parts=[];let r=0,o=0;const l=t.length-1,a=this.parts,[c,p]=Qt(t,e);if(this.el=k.createElement(c,n),C.currentNode=this.el.content,e===2){const d=this.el.content,u=d.firstChild;u.remove(),d.append(...u.childNodes)}for(;(i=C.nextNode())!==null&&a.length<l;){if(i.nodeType===1){if(i.hasAttributes()){const d=[];for(const u of i.getAttributeNames())if(u.endsWith(Z)||u.startsWith(A)){const h=p[o++];if(d.push(u),h!==void 0){const f=i.getAttribute(h.toLowerCase()+Z).split(A),m=/([.?@])?(.*)/.exec(h);a.push({type:1,index:r,name:m[2],strings:f,ctor:m[1]==="."?ee:m[1]==="?"?se:m[1]==="@"?ne:B})}else a.push({type:6,index:r})}for(const u of d)i.removeAttribute(u)}if(Xt.test(i.tagName)){const d=i.textContent.split(A),u=d.length-1;if(u>0){i.textContent=x?x.emptyScript:"";for(let h=0;h<u;h++)i.append(d[h],O()),C.nextNode(),a.push({type:2,index:++r});i.append(d[u],O())}}}else if(i.nodeType===8)if(i.data===_t)a.push({type:2,index:r});else{let d=-1;for(;(d=i.data.indexOf(A,d+1))!==-1;)a.push({type:7,index:r}),d+=A.length-1}r++}}static createElement(t,e){const n=E.createElement("template");return n.innerHTML=t,n}}function T(s,t,e=s,n){var i,r,o,l;if(t===M)return t;let a=n!==void 0?(i=e._$Co)===null||i===void 0?void 0:i[n]:e._$Cl;const c=H(t)?void 0:t._$litDirective$;return(a==null?void 0:a.constructor)!==c&&((r=a==null?void 0:a._$AO)===null||r===void 0||r.call(a,!1),c===void 0?a=void 0:(a=new c(s),a._$AT(s,e,n)),n!==void 0?((o=(l=e)._$Co)!==null&&o!==void 0?o:l._$Co=[])[n]=a:e._$Cl=a),a!==void 0&&(t=T(s,a._$AS(s,t.values),a,n)),t}class te{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:E).importNode(n,!0);C.currentNode=r;let o=C.nextNode(),l=0,a=0,c=i[0];for(;c!==void 0;){if(l===c.index){let p;c.type===2?p=new D(o,o.nextSibling,this,t):c.type===1?p=new c.ctor(o,c.name,c.strings,this,t):c.type===6&&(p=new ie(o,this,t)),this._$AV.push(p),c=i[++a]}l!==(c==null?void 0:c.index)&&(o=C.nextNode(),l++)}return C.currentNode=E,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 D{constructor(t,e,n,i){var r;this.type=2,this._$AH=_,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=T(this,t,e),H(t)?t===_||t==null||t===""?(this._$AH!==_&&this._$AR(),this._$AH=_):t!==this._$AH&&t!==M&&this._(t):t._$litType$!==void 0?this.g(t):t.nodeType!==void 0?this.$(t):Jt(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!==_&&H(this._$AH)?this._$AA.nextSibling.data=t:this.$(E.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=k.createElement(Yt(i.h,i.h[0]),this.options)),i);if(((e=this._$AH)===null||e===void 0?void 0:e._$AD)===r)this._$AH.v(n);else{const o=new te(r,this),l=o.u(this.options);o.v(n),this.$(l),this._$AH=o}}_$AC(t){let e=It.get(t.strings);return e===void 0&&It.set(t.strings,e=new k(t)),e}T(t){Kt(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 D(this.k(O()),this.k(O()),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 B{constructor(t,e,n,i,r){this.type=1,this._$AH=_,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=_}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=T(this,t,e,0),o=!H(t)||t!==this._$AH&&t!==M,o&&(this._$AH=t);else{const l=t;let a,c;for(t=r[0],a=0;a<r.length-1;a++)c=T(this,l[n+a],e,a),c===M&&(c=this._$AH[a]),o||(o=!H(c)||c!==this._$AH[a]),c===_?t=_:t!==_&&(t+=(c!=null?c:"")+r[a+1]),this._$AH[a]=c}o&&!i&&this.j(t)}j(t){t===_?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t!=null?t:"")}}class ee extends B{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===_?void 0:t}}const bs=x?x.emptyScript:"";class se extends B{constructor(){super(...arguments),this.type=4}j(t){t&&t!==_?this.element.setAttribute(this.name,bs):this.element.removeAttribute(this.name)}}class ne extends B{constructor(t,e,n,i,r){super(t,e,n,i,r),this.type=5}_$AI(t,e=this){var n;if((t=(n=T(this,t,e,0))!==null&&n!==void 0?n:_)===M)return;const i=this._$AH,r=t===_&&i!==_||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,o=t!==_&&(i===_||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 ie{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){T(this,t)}}const Cs={O:Z,P:A,A:_t,C:1,M:Qt,L:te,D:Jt,R:T,I:D,V:B,H:se,N:ne,U:ee,F:ie},Pt=q.litHtmlPolyfillSupport;Pt==null||Pt(k,D),((it=q.litHtmlVersions)!==null&&it!==void 0?it:q.litHtmlVersions=[]).push("2.7.5");const Es=(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 l=(i=e==null?void 0:e.renderBefore)!==null&&i!==void 0?i:null;r._$litPart$=o=new D(t.insertBefore(O(),l),l,void 0,e!=null?e:{})}return o._$AI(s),o};/**
|
|
8
8
|
* @license
|
|
9
9
|
* Copyright 2017 Google LLC
|
|
10
10
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
11
|
-
*/const
|
|
11
|
+
*/const re={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},Ms=s=>(...t)=>({_$litDirective$:s,values:t});class oe{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
12
|
* @license
|
|
13
13
|
* Copyright 2020 Google LLC
|
|
14
14
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
15
|
-
*/const{I:
|
|
15
|
+
*/const{I:Ts}=Cs,Lt=()=>document.createComment(""),L=(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(Lt(),r),l=i.insertBefore(Lt(),r);e=new Ts(o,l,s,s.options)}else{const o=e._$AB.nextSibling,l=e._$AM,a=l!==s;if(a){let c;(n=e._$AQ)===null||n===void 0||n.call(e,s),e._$AM=s,e._$AP!==void 0&&(c=s._$AU)!==l._$AU&&e._$AP(c)}if(o!==r||a){let c=e._$AA;for(;c!==o;){const p=c.nextSibling;i.insertBefore(c,r),c=p}}}return e},b=(s,t,e=s)=>(s._$AI(t,e),s),xs={},Ds=(s,t=xs)=>s._$AH=t,Is=s=>s._$AH,ot=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
16
|
* @license
|
|
17
17
|
* Copyright 2017 Google LLC
|
|
18
18
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
19
|
-
*/const Nt=(s,t,e)=>{const n=new Map;for(let i=t;i<=e;i++)n.set(s[i],i);return n},
|
|
19
|
+
*/const Nt=(s,t,e)=>{const n=new Map;for(let i=t;i<=e;i++)n.set(s[i],i);return n},ae=Ms(class extends oe{constructor(s){if(super(s),s.type!==re.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 l of s)i[o]=n?n(l,o):o,r[o]=e(l,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=Is(s),{values:o,keys:l}=this.dt(t,e,n);if(!Array.isArray(r))return this.ht=l,o;const a=(i=this.ht)!==null&&i!==void 0?i:this.ht=[],c=[];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]===l[f])c[f]=b(r[u],o[f]),u++,f++;else if(a[h]===l[m])c[m]=b(r[h],o[m]),h--,m--;else if(a[u]===l[m])c[m]=b(r[u],o[m]),L(s,c[m+1],r[u]),u++,m--;else if(a[h]===l[f])c[f]=b(r[h],o[f]),L(s,r[u],r[h]),h--,f++;else if(p===void 0&&(p=Nt(l,f,m),d=Nt(a,u,h)),p.has(a[u]))if(p.has(a[h])){const g=d.get(l[f]),F=g!==void 0?r[g]:null;if(F===null){const X=L(s,r[u]);b(X,o[f]),c[f]=X}else c[f]=b(F,o[f]),L(s,r[u],F),r[g]=null;f++}else ot(r[h]),h--;else ot(r[u]),u++;for(;f<=m;){const g=L(s,c[m+1]);b(g,o[f]),c[f++]=g}for(;u<=h;){const g=r[u++];g!==null&&ot(g)}return this.ht=l,Ds(s,c),M}});/**
|
|
20
20
|
* @license
|
|
21
21
|
* Copyright 2018 Google LLC
|
|
22
22
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -24,7 +24,7 @@ import{f as ue,g as he,r as Ht,a as kt,E as K,b as J,c as pe,d as Bt,e as fe,h a
|
|
|
24
24
|
* @license
|
|
25
25
|
* Copyright 2017 Google LLC
|
|
26
26
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
27
|
-
*/class Rt extends
|
|
27
|
+
*/class Rt extends oe{constructor(t){if(super(t),this.et=_,t.type!==re.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===_||t==null)return this.ft=void 0,this.et=t;if(t===M)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:[]}}}Rt.directiveName="unsafeHTML",Rt.resultType=1;const y=(s,...t)=>{const e=J("LitStatic");return(e?e.html:Ss)(s,...t)},V=(s,t,e,n,i)=>{const r=J("OpenUI5Enablement");r&&!n&&(s=r.wrapTemplateResultInBusyMarkup(y,i.host,s)),typeof e=="string"?s=y`<style>${e}</style>${s}`:Array.isArray(e)&&e.length&&(s=y`${e.map(o=>y`<link type="text/css" rel="stylesheet" href="${o}">`)}${s}`),Es(s,t,i)},Ps={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 le extends ${static get metadata(){return Ps}static get render(){return V}static get template(){return t=>y`<div><p>
|
|
28
28
|
<slot></slot>
|
|
29
29
|
<slot name="other"></slot>
|
|
30
30
|
<slot name="individual-1"></slot>
|
|
@@ -33,9 +33,9 @@ import{f as ue,g as he,r as Ht,a as kt,E as K,b as J,c as pe,d as Bt,e as fe,h a
|
|
|
33
33
|
display: inline-block;
|
|
34
34
|
border: 1px solid black;
|
|
35
35
|
color: var(--var1);
|
|
36
|
-
}`}onBeforeRendering(){}onAfterRendering(){}onEnterDOM(){}onExitDOM(){}}
|
|
36
|
+
}`}onBeforeRendering(){}onAfterRendering(){}onEnterDOM(){}onExitDOM(){}}le.define();const Ls={tag:"ui5-test-no-shadow"};class Ns extends ${static get metadata(){return Ls}}Ns.define();const Rs={tag:"ui5-test-parent",managedSlots:!0,slots:{default:{type:Node,invalidateOnChildChange:{properties:["prop1"]}},items:{type:HTMLElement,invalidateOnChildChange:{properties:!0}}}};class Os extends ${static get metadata(){return Rs}static get render(){return V}static get template(){return t=>y`<div>
|
|
37
37
|
<slot></slot>
|
|
38
|
-
</div>`}}
|
|
38
|
+
</div>`}}Os.define();const Hs={tag:"ui5-test-child",properties:{prop1:{type:String},prop2:{type:String},prop3:{type:String}}};class ks extends ${static get metadata(){return Hs}static get render(){return V}static get template(){return t=>y`<div></div>`}}ks.define();const Bs={tag:"ui5-with-static-area",properties:{staticContent:{type:Boolean}},slots:{}};class Vs extends ${static get metadata(){return Bs}static get render(){return V}static get template(){return t=>y`
|
|
39
39
|
<div dir=${t.effectiveDir}>
|
|
40
40
|
WithStaticArea works!
|
|
41
41
|
</div>`}static get staticAreaTemplate(){return t=>y`
|
|
@@ -46,5 +46,5 @@ import{f as ue,g as he,r as Ht,a as kt,E as K,b as J,c as pe,d as Bt,e as fe,h a
|
|
|
46
46
|
display: inline-block;
|
|
47
47
|
border: 1px solid black;
|
|
48
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(){}}
|
|
50
|
-
`,"\\r":"\r","\\t":" "},
|
|
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(){}}Vs.define();function Fs(s,t,e){return y`<div>Root text: ${v(this.text)}${ae(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 y`<h3>Item-${i}</h3>${n.text?js.call(this,s,t,e,n,i):void 0}<ul>${ae(n.words,(r,o)=>r._id||o,(r,o)=>Ws.call(this,s,t,e,r,o))}</ul>${n.text?zs.call(this,s,t,e,n,i):void 0}`}function js(s,t,e,n,i){return y`<div class="before-each-content--start--${i}">Root text: ${v(this.text)}, Item text: ${v(n.text)}</div>`}function Ws(s,t,e,n,i){return y`<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 y`<div class="after-each-content--end--${i}">Root text: ${v(this.text)}, Item text: ${v(n.text)}</div>`}class Gs extends ${static get metadata(){return{tag:"ui5-test-complex-template"}}static get render(){return V}static get template(){return Fs}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"}]}]}}Gs.define();const qs={tag:"ui5-test-generic-ext",properties:{extProp:{type:String},strProp:{defaultValue:"Ext"}},slots:{extSlot:{type:HTMLElement}}};class Zs extends le{static get metadata(){return qs}}Zs.define();const Ks={content:":root{ --var1: red; }",packageName:"",fileName:""},Js={content:":root{ --var1: green; }",packageName:"",fileName:""},Xs={content:":root{ --var1: blue; }",packageName:"",fileName:""},Ys={content:":root{ --var1: orange; }",packageName:"",fileName:""},Qs={content:":root{ --var1: orange; }",packageName:"",fileName:""},tn={content:":root{ --var1: yellow; }",packageName:"",fileName:""},en={content:":root{ --var1: yellow; }",packageName:"",fileName:""};w("@ui5/webcomponents-base-test","sap_fiori_3",()=>Ks);w("@ui5/webcomponents-base-test","sap_fiori_3_dark",()=>Js);w("@ui5/webcomponents-base-test","sap_belize",()=>Xs);w("@ui5/webcomponents-base-test","sap_belize_hcb",()=>Ys);w("@ui5/webcomponents-base-test","sap_belize_hcw",()=>Qs);w("@ui5/webcomponents-base-test","sap_fiori_3_hcb",()=>tn);w("@ui5/webcomponents-base-test","sap_fiori_3_hcw",()=>en);const sn=typeof window.chrome=="object"||typeof window.v8=="object"?(s,t)=>(t>2&&40*t>s.length,s):s=>s,nn=/(?:\r\n|\r|\n|^)[ \t\f]*/,rn=/(\\u[0-9a-fA-F]{0,4})|(\\.)|(\\$)|([ \t\f]*[ \t\f:=][ \t\f]*)/g,on=/(\\u[0-9a-fA-F]{0,4})|(\\.)|(\\$)/g,an={"\\f":"\f","\\n":`
|
|
50
|
+
`,"\\r":"\r","\\t":" "},ln=s=>{const t={},e=s.split(nn);let n,i,r,o,l,a,c,p;const d=u=>{o?(o=`${o}${u}`,p++):(o=u,p=0)};for(l=0;l<e.length;l++)if(n=e[l],!(n===""||n.charAt(0)==="#"||n.charAt(0)==="!")){for(i=rn,c=0,i.lastIndex=c,r=null,o="",a=i.exec(n);a!==null;){if(c<a.index&&d(n.slice(c,a.index)),c=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(an[a[2]]||a[2].slice(1)):a[3]?(n=e[++l],c=0,i.lastIndex=c):a[4]&&(r=o,o="",i=on,i.lastIndex=c);a=i.exec(n)}c<n.length&&d(n.slice(c)),r==null&&(r=o,o=""),t[r]=sn(o,o?p:0)}return t};let at;const cn=()=>(at===void 0&&(at=Me()),at);var pt;(function(s){s.Gregorian="Gregorian",s.Islamic="Islamic",s.Japanese="Japanese",s.Buddhist="Buddhist",s.Persian="Persian"})(pt||(pt={}));const Ot=pt;let N;const dn=()=>(N===void 0&&(N=Te()),N&&N in Ot?N:Ot.Gregorian);let lt;class ce{static getLegacyDateCalendarCustomizing(){return lt===void 0&&(lt=Ft()),lt.legacyDateCalendarCustomizing||[]}}xe("LegacyDateFormats",ce);let ct;const un=()=>(ct===void 0&&(ct=Ft()),ct.firstDayOfWeek),hn=J("LegacyDateFormats"),pn=hn?ce.getLegacyDateCalendarCustomizing:()=>[],fn=new K,gn="directionChange",mn=()=>fn.fireEvent(gn,void 0),_n=async()=>{const s=mn();await Promise.all(s),await Ht({rtlAware:!0})};window.registerThemePropertiesLoader=w;window["sap-ui-webcomponents-bundle"]={configuration:{getAnimationMode:cn,getLanguage:Bt,setLanguage:De,getTheme:Ie,getThemeRoot:Pe,setThemeRoot:Le,setTheme:Ne,getNoConflict:mt,setNoConflict:ms,getCalendarType:dn,getRTL:qt,getFirstDayOfWeek:un,getLegacyDateCalendarCustomizing:pn},getCurrentRuntimeIndex:ft,getIconNames:Re,parseProperties:ln,registerI18nLoader:Oe,getI18nBundle:Fe,renderFinished:Vt,applyDirection:_n,EventProvider:K};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{H as o,o as e,v as t}from"../../Boot.
|
|
1
|
+
import{H as o,o as e,v as t}from"../../Boot.5a9b49d7.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.
|
|
1
|
+
import"../../Boot.5a9b49d7.js";import"../../bundle.esm.e0ff2f8c.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.
|
|
1
|
+
import"../../Boot.5a9b49d7.js";import"../../bundle.esm.e0ff2f8c.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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ItemNavigation.js","sourceRoot":"","sources":["../../src/delegate/ItemNavigation.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,MAAM,EACN,IAAI,EACJ,MAAM,EACN,OAAO,EACP,MAAM,EACN,KAAK,EACL,UAAU,EACV,QAAQ,GACR,MAAM,YAAY,CAAC;AACpB,OAAO,gBAAgB,MAAM,6BAA6B,CAAC;AAE3D,OAAO,cAAc,MAAM,4BAA4B,CAAC;AACxD,OAAO,sBAAsB,MAAM,oCAAoC,CAAC;AAGxE,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAiBxD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,MAAM,cAAc;IAiBnB;;;;;;;;;;;;;OAaG;IACH,YAAY,gBAA4B,EAAE,OAA8B;QACvE,IAAI,CAAC,gBAAgB,CAAC,YAAY,EAAE;YACnC,MAAM,IAAI,KAAK,CAAC,uDAAuD,CAAC,CAAC;SACzE;QAED,IAAI,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;QACzC,IAAI,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,SAAS,EAAE,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;QAC9E,IAAI,CAAC,gBAAgB,CAAC,0BAA0B,GAAG,GAAG,EAAE;YACvD,IAAI,CAAC,KAAK,EAAE,CAAC;QACd,CAAC,CAAC;QAEF,IAAI,OAAO,OAAO,CAAC,gBAAgB,KAAK,UAAU,EAAE;YACnD,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;SAChD;QAED,IAAI,CAAC,SAAS,GAAG,OAAO,CAAC,gBAAgB,CAAC;QAC1C,IAAI,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AAC;SAC5E;IACF,CAAC;CACD;AAED,eAAe,cAAc,CAAC","sourcesContent":["import {\n\tisDown,\n\tisUp,\n\tisLeft,\n\tisRight,\n\tisHome,\n\tisEnd,\n\tisPageDown,\n\tisPageUp,\n} from \"../Keys.js\";\nimport getActiveElement from \"../util/getActiveElement.js\";\n\nimport NavigationMode from \"../types/NavigationMode.js\";\nimport ItemNavigationBehavior from \"../types/ItemNavigationBehavior.js\";\n\nimport type UI5Element from \"../UI5Element.js\";\nimport { instanceOfUI5Element } from \"../UI5Element.js\";\n\ninterface ITabbable {\n\tid: string,\n\t_tabIndex: string,\n}\n\ntype ItemNavigationOptions = {\n\tcurrentIndex?: number,\n\tnavigationMode?: NavigationMode,\n\trowSize?: number\n\tskipItemsSize?: number,\n\tbehavior?: ItemNavigationBehavior,\n\tgetItemsCallback: () => Array<ITabbable>,\n\taffectedPropertiesNames?: Array<string>,\n};\n\n/**\n * The ItemNavigation class manages the calculations to determine the correct \"tabindex\" for a group of related items inside a root component.\n * Important: ItemNavigation only does the calculations and does not change \"tabindex\" directly, this is a responsibility of the developer.\n *\n * The keys that trigger ItemNavigation are:\n * - Up/down\n * - Left/right\n * - Home/End\n *\n * Usage:\n * 1) Use the \"getItemsCallback\" constructor property to pass a callback to ItemNavigation, which, whenever called, will return the list of items to navigate among.\n *\n * Each item passed to ItemNavigation via \"getItemsCallback\" must be:\n * - A) either a UI5Element with a \"_tabIndex\" property\n * - B) or an Object with \"id\" and \"_tabIndex\" properties which represents a part of the root component's shadow DOM.\n * The \"id\" must be a valid ID within the shadow root of the component ItemNavigation operates on.\n * This object must not be a DOM object because, as said, ItemNavigation will not set \"tabindex\" on it. It must be a representation of a DOM object only\n * and the developer has the responsibility to update the \"tabindex\" in the component's DOM.\n * - C) a combination of the above\n *\n * Whenever the user navigates with the keyboard, ItemNavigation will modify the \"_tabIndex\" properties of the items.\n * It is the items' responsibilities to re-render themselves and apply the correct value of \"tabindex\" (i.e. to map the \"_tabIndex\" ItemNavigation set to them to the \"tabindex\" property).\n * If the items of the ItemNavigation are UI5Elements themselves, this can happen naturally since they will be invalidated by their \"_tabIndex\" property.\n * If the items are Objects with \"id\" and \"_tabIndex\" however, it is the developer's responsibility to apply these and the easiest way is to have the root component invalidated by ItemNavigation.\n * To do so, set the \"affectedPropertiesNames\" constructor property to point to one or more of the root component's properties that need refreshing when \"_tabIndex\" is changed deeply.\n *\n * 2) Call the \"setCurrentItem\" method of ItemNavigation whenever you want to change the current item.\n * This is most commonly required if the user for example clicks on an item and thus selects it directly.\n * Pass as the only argument to \"setCurrentItem\" the item that becomes current (must be one of the items, returned by \"getItemsCallback\").\n *\n * @class\n * @public\n */\nclass ItemNavigation {\n\trootWebComponent: UI5Element;\n\n\t_getItems: () => Array<ITabbable>;\n\n\t_currentIndex: number;\n\n\t_rowSize: number;\n\n\t_behavior: ItemNavigationBehavior;\n\n\t_navigationMode: NavigationMode;\n\n\t_affectedPropertiesNames: Array<string>;\n\n\t_skipItemsSize: number | null;\n\n\t/**\n\t *\n\t * @param rootWebComponent the component to operate on (component that slots or contains within its shadow root the items the user navigates among)\n\t * @param {ItemNavigationOptions} options Object with configuration options:\n\t * - currentIndex: the index of the item that will be initially selected (from which navigation will begin)\n\t * - navigationMode (Auto|Horizontal|Vertical): whether the items are displayed horizontally (Horizontal), vertically (Vertical) or as a matrix (Auto) meaning the user can navigate in both directions (up/down and left/right)\n\t * - rowSize: tells how many items per row there are when the items are not rendered as a flat list but rather as a matrix. Relevant for navigationMode=Auto\n\t * \t- skipItemsSize: tells how many items upon PAGE_UP and PAGE_DOWN should be skipped to applying the focus on the next item\n\t * - behavior (Static|Cycling): tells what to do when trying to navigate beyond the first and last items\n\t * Static means that nothing happens if the user tries to navigate beyond the first/last item.\n\t * Cycling means that when the user navigates beyond the last item they go to the first and vice versa.\n\t * - getItemsCallback: function that, when called, returns an array with all items the user can navigate among\n\t * - affectedPropertiesNames: a list of metadata properties on the root component which, upon user navigation, will be reassigned by address thus causing the root component to invalidate\n\t */\n\tconstructor(rootWebComponent: UI5Element, options: ItemNavigationOptions) {\n\t\tif (!rootWebComponent.isUI5Element) {\n\t\t\tthrow new Error(\"The root web component must be a UI5 Element instance\");\n\t\t}\n\n\t\tthis.rootWebComponent = rootWebComponent;\n\t\tthis.rootWebComponent.addEventListener(\"keydown\", this._onkeydown.bind(this));\n\t\tthis.rootWebComponent._onComponentStateFinalized = () => {\n\t\t\tthis._init();\n\t\t};\n\n\t\tif (typeof options.getItemsCallback !== \"function\") {\n\t\t\tthrow new Error(\"getItemsCallback is required\");\n\t\t}\n\n\t\tthis._getItems = options.getItemsCallback;\n\t\tthis._currentIndex = options.currentIndex || 0;\n\t\tthis._rowSize = options.rowSize || 1;\n\t\tthis._behavior = options.behavior || ItemNavigationBehavior.Static;\n\t\tthis._navigationMode = options.navigationMode || NavigationMode.Auto;\n\t\tthis._affectedPropertiesNames = options.affectedPropertiesNames || [];\n\t\tthis._skipItemsSize = options.skipItemsSize || null;\n\t}\n\n\t/**\n\t * Call this method to set a new \"current\" (selected) item in the item navigation\n\t * Note: the item passed to this function must be one of the items, returned by the getItemsCallback function\n\t *\n\t * @public\n\t * @param current the new selected item\n\t */\n\tsetCurrentItem(current: ITabbable) {\n\t\tconst currentItemIndex = this._getItems().indexOf(current);\n\n\t\tif (currentItemIndex === -1) {\n\t\t\tconsole.warn(`The provided item is not managed by ItemNavigation`, current); // eslint-disable-line\n\t\t\treturn;\n\t\t}\n\n\t\tthis._currentIndex = currentItemIndex;\n\t\tthis._applyTabIndex();\n\t}\n\n\t/**\n\t * Call this method to dynamically change the row size\n\t *\n\t * @public\n\t * @param newRowSize\n\t */\n\tsetRowSize(newRowSize: number) {\n\t\tthis._rowSize = newRowSize;\n\t}\n\n\t_init() {\n\t\tthis._getItems().forEach((item, idx) => {\n\t\t\titem._tabIndex = (idx === this._currentIndex) ? \"0\" : \"-1\";\n\t\t});\n\t}\n\n\t_onkeydown(event: KeyboardEvent) {\n\t\tif (!this._canNavigate()) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst horizontalNavigationOn = this._navigationMode === NavigationMode.Horizontal || this._navigationMode === NavigationMode.Auto;\n\t\tconst verticalNavigationOn = this._navigationMode === NavigationMode.Vertical || this._navigationMode === NavigationMode.Auto;\n\t\tconst isRTL = this.rootWebComponent.effectiveDir === \"rtl\";\n\n\t\tif (isRTL && isLeft(event) && horizontalNavigationOn) {\n\t\t\tthis._handleRight();\n\t\t} else if (isRTL && isRight(event) && horizontalNavigationOn) {\n\t\t\tthis._handleLeft();\n\t\t} else if (isLeft(event) && horizontalNavigationOn) {\n\t\t\tthis._handleLeft();\n\t\t} else if (isRight(event) && horizontalNavigationOn) {\n\t\t\tthis._handleRight();\n\t\t} else if (isUp(event) && verticalNavigationOn) {\n\t\t\tthis._handleUp();\n\t\t} else if (isDown(event) && verticalNavigationOn) {\n\t\t\tthis._handleDown();\n\t\t} else if (isHome(event)) {\n\t\t\tthis._handleHome();\n\t\t} else if (isEnd(event)) {\n\t\t\tthis._handleEnd();\n\t\t} else if (isPageUp(event)) {\n\t\t\tthis._handlePageUp();\n\t\t} else if (isPageDown(event)) {\n\t\t\tthis._handlePageDown();\n\t\t} else {\n\t\t\treturn; // if none of the supported keys is pressed, we don't want to prevent the event or update the item navigation\n\t\t}\n\n\t\tevent.preventDefault();\n\t\tthis._applyTabIndex();\n\t\tthis._focusCurrentItem();\n\t}\n\n\t_handleUp() {\n\t\tconst itemsLength = this._getItems().length;\n\t\tif (this._currentIndex - this._rowSize >= 0) { // no border reached, just decrease the index by a row\n\t\t\tthis._currentIndex -= this._rowSize;\n\t\t\treturn;\n\t\t}\n\n\t\tif (this._behavior === ItemNavigationBehavior.Cyclic) { // if cyclic, go to the **last** item in the **previous** column\n\t\t\tconst firstItemInThisColumnIndex = this._currentIndex % this._rowSize;\n\t\t\tconst firstItemInPreviousColumnIndex = firstItemInThisColumnIndex === 0 ? this._rowSize - 1 : firstItemInThisColumnIndex - 1; // find the first item in the previous column (if the current column is the first column -> move to the last column)\n\t\t\tconst rows = Math.ceil(itemsLength / this._rowSize); // how many rows there are (even if incomplete, f.e. for 14 items and _rowSize=4 -> 4 rows total, although only 2 items on the last row)\n\t\t\tlet lastItemInPreviousColumnIndex = firstItemInPreviousColumnIndex + (rows - 1) * this._rowSize; // multiply rows by columns, and add the column's first item's index\n\t\t\tif (lastItemInPreviousColumnIndex > itemsLength - 1) { // for incomplete rows, use the previous row's last item, as for them the last item is missing\n\t\t\t\tlastItemInPreviousColumnIndex -= this._rowSize;\n\t\t\t}\n\t\t\tthis._currentIndex = lastItemInPreviousColumnIndex;\n\t\t} else { // not cyclic, so just go to the first item\n\t\t\tthis._currentIndex = 0;\n\t\t}\n\t}\n\n\t_handleDown() {\n\t\tconst itemsLength = this._getItems().length;\n\t\tif (this._currentIndex + this._rowSize < itemsLength) { // no border reached, just increase the index by a row\n\t\t\tthis._currentIndex += this._rowSize;\n\t\t\treturn;\n\t\t}\n\n\t\tif (this._behavior === ItemNavigationBehavior.Cyclic) { // if cyclic, go to the **first** item in the **next** column\n\t\t\tconst firstItemInThisColumnIndex = this._currentIndex % this._rowSize; // find the first item in the current column first\n\t\t\tconst firstItemInNextColumnIndex = (firstItemInThisColumnIndex + 1) % this._rowSize; // to get the first item in the next column, just increase the index by 1. The modulo by rows is for the case when we are at the last column\n\t\t\tthis._currentIndex = firstItemInNextColumnIndex;\n\t\t} else { // not cyclic, so just go to the last item\n\t\t\tthis._currentIndex = itemsLength - 1;\n\t\t}\n\t}\n\n\t_handleLeft() {\n\t\tconst itemsLength = this._getItems().length;\n\t\tif (this._currentIndex > 0) {\n\t\t\tthis._currentIndex -= 1;\n\t\t\treturn;\n\t\t}\n\n\t\tif (this._behavior === ItemNavigationBehavior.Cyclic) { // go to the first item in the next column\n\t\t\tthis._currentIndex = itemsLength - 1;\n\t\t}\n\t}\n\n\t_handleRight() {\n\t\tconst itemsLength = this._getItems().length;\n\t\tif (this._currentIndex < itemsLength - 1) {\n\t\t\tthis._currentIndex += 1;\n\t\t\treturn;\n\t\t}\n\n\t\tif (this._behavior === ItemNavigationBehavior.Cyclic) { // go to the first item in the next column\n\t\t\tthis._currentIndex = 0;\n\t\t}\n\t}\n\n\t_handleHome() {\n\t\tconst homeEndRange = this._rowSize > 1 ? this._rowSize : this._getItems().length;\n\t\tthis._currentIndex -= this._currentIndex % homeEndRange;\n\t}\n\n\t_handleEnd() {\n\t\tconst homeEndRange = this._rowSize > 1 ? this._rowSize : this._getItems().length;\n\t\tthis._currentIndex += (homeEndRange - 1 - this._currentIndex % homeEndRange); // eslint-disable-line\n\t}\n\n\t_handlePageUp() {\n\t\tif (this._rowSize > 1) {\n\t\t\t// eslint-disable-next-line\n\t\t\t// TODO: handle page up on matrix (grid) layout - ColorPalette, ProductSwitch.\n\t\t\treturn;\n\t\t}\n\t\tthis._handlePageUpFlat();\n\t}\n\n\t_handlePageDown() {\n\t\tif (this._rowSize > 1) {\n\t\t\t// eslint-disable-next-line\n\t\t\t// TODO: handle page up on matrix (grid) layout - ColorPalette, ProductSwitch.\n\t\t\treturn;\n\t\t}\n\t\tthis._handlePageDownFlat();\n\t}\n\n\t/**\n\t * Handles PAGE_UP in a flat list-like structure, both vertically and horizontally.\n\t */\n\t_handlePageUpFlat() {\n\t\tif (this._skipItemsSize === null) {\n\t\t\t// Move the focus to the very top (as Home).\n\t\t\tthis._currentIndex -= this._currentIndex;\n\t\t\treturn;\n\t\t}\n\n\t\tif (this._currentIndex + 1 > this._skipItemsSize) {\n\t\t\t// When there are more than \"skipItemsSize\" number of items to the top,\n\t\t\t// move the focus up/left with the predefined number.\n\t\t\tthis._currentIndex -= this._skipItemsSize;\n\t\t} else {\n\t\t\t// Otherwise, move the focus to the very top (as Home).\n\t\t\tthis._currentIndex -= this._currentIndex;\n\t\t}\n\t}\n\n\t/**\n\t * Handles PAGE_DOWN in a flat list-like structure, both vertically and horizontally.\n\t */\n\t_handlePageDownFlat() {\n\t\tif (this._skipItemsSize === null) {\n\t\t\t// Move the focus to the very bottom (as End).\n\t\t\tthis._currentIndex = this._getItems().length - 1;\n\t\t\treturn;\n\t\t}\n\n\t\tconst currentToEndRange = this._getItems().length - this._currentIndex - 1;\n\n\t\tif (currentToEndRange > this._skipItemsSize) {\n\t\t\t// When there are more than \"skipItemsSize\" number of items until the bottom,\n\t\t\t// move the focus down/right with the predefined number.\n\t\t\tthis._currentIndex += this._skipItemsSize;\n\t\t} else {\n\t\t\t// Otherwise, move the focus to the very bottom (as End).\n\t\t\tthis._currentIndex = this._getItems().length - 1;\n\t\t}\n\t}\n\n\t_applyTabIndex() {\n\t\tconst items = this._getItems();\n\t\tfor (let i = 0; i < items.length; i++) {\n\t\t\titems[i]._tabIndex = i === this._currentIndex ? \"0\" : \"-1\";\n\t\t}\n\n\t\tthis._affectedPropertiesNames.forEach(propName => {\n\t\t\tconst prop = (this.rootWebComponent as Record<string, any>)[propName];\n\t\t\t(this.rootWebComponent as Record<string, any>)[propName] = Array.isArray(prop) ? [...prop] : { ...prop };\n\t\t});\n\t}\n\n\t_focusCurrentItem() {\n\t\tconst currentItem = this._getCurrentItem();\n\t\tif (currentItem) {\n\t\t\tcurrentItem.focus({ focusVisible: true } as FocusOptions);\n\t\t}\n\t}\n\n\t_canNavigate() {\n\t\tconst currentItem = this._getCurrentItem();\n\t\tconst activeElement = getActiveElement();\n\n\t\treturn currentItem && currentItem === activeElement;\n\t}\n\n\t_getCurrentItem() {\n\t\tconst items = this._getItems();\n\n\t\tif (!items.length) {\n\t\t\treturn;\n\t\t}\n\n\t\t// normalize the index\n\t\twhile (this._currentIndex >= items.length) {\n\t\t\tthis._currentIndex -= this._rowSize;\n\t\t}\n\n\t\tif (this._currentIndex < 0) {\n\t\t\tthis._currentIndex = 0;\n\t\t}\n\n\t\tconst currentItem = items[this._currentIndex];\n\n\t\tif (!currentItem) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (instanceOfUI5Element(currentItem)) {\n\t\t\treturn currentItem.getFocusDomRef();\n\t\t}\n\n\t\tconst currentItemDOMRef = this.rootWebComponent.getDomRef();\n\t\tif (!currentItemDOMRef) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (currentItem.id) {\n\t\t\treturn currentItemDOMRef.querySelector(`#${currentItem.id}`) as HTMLElement;\n\t\t}\n\t}\n}\n\nexport default ItemNavigation;\n\nexport {\n\tITabbable,\n};\n"]}
|
|
1
|
+
{"version":3,"file":"ItemNavigation.js","sourceRoot":"","sources":["../../src/delegate/ItemNavigation.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,MAAM,EACN,IAAI,EACJ,MAAM,EACN,OAAO,EACP,MAAM,EACN,KAAK,EACL,UAAU,EACV,QAAQ,GACR,MAAM,YAAY,CAAC;AACpB,OAAO,gBAAgB,MAAM,6BAA6B,CAAC;AAE3D,OAAO,cAAc,MAAM,4BAA4B,CAAC;AACxD,OAAO,sBAAsB,MAAM,oCAAoC,CAAC;AAGxE,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAiBxD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,MAAM,cAAc;IAiBnB;;;;;;;;;;;;;OAaG;IACH,YAAY,gBAA4B,EAAE,OAA8B;QACvE,IAAI,CAAC,gBAAgB,CAAC,YAAY,EAAE;YACnC,MAAM,IAAI,KAAK,CAAC,uDAAuD,CAAC,CAAC;SACzE;QAED,IAAI,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;QACzC,IAAI,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,SAAS,EAAE,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;QAC9E,IAAI,CAAC,gBAAgB,CAAC,0BAA0B,GAAG,GAAG,EAAE;YACvD,IAAI,CAAC,KAAK,EAAE,CAAC;QACd,CAAC,CAAC;QAEF,IAAI,OAAO,OAAO,CAAC,gBAAgB,KAAK,UAAU,EAAE;YACnD,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;SAChD;QAED,I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AC,EAAE,EAAE,CAAgB,CAAC;SAC5E;IACF,CAAC;CACD;AAED,eAAe,cAAc,CAAC","sourcesContent":["import {\n\tisDown,\n\tisUp,\n\tisLeft,\n\tisRight,\n\tisHome,\n\tisEnd,\n\tisPageDown,\n\tisPageUp,\n} from \"../Keys.js\";\nimport getActiveElement from \"../util/getActiveElement.js\";\n\nimport NavigationMode from \"../types/NavigationMode.js\";\nimport ItemNavigationBehavior from \"../types/ItemNavigationBehavior.js\";\n\nimport type UI5Element from \"../UI5Element.js\";\nimport { instanceOfUI5Element } from \"../UI5Element.js\";\n\ninterface ITabbable {\n\tid: string,\n\t_tabIndex: string,\n}\n\ntype ItemNavigationOptions = {\n\tcurrentIndex?: number,\n\tnavigationMode?: NavigationMode,\n\trowSize?: number\n\tskipItemsSize?: number,\n\tbehavior?: ItemNavigationBehavior,\n\tgetItemsCallback: () => Array<ITabbable>,\n\taffectedPropertiesNames?: Array<string>,\n};\n\n/**\n * The ItemNavigation class manages the calculations to determine the correct \"tabindex\" for a group of related items inside a root component.\n * Important: ItemNavigation only does the calculations and does not change \"tabindex\" directly, this is a responsibility of the developer.\n *\n * The keys that trigger ItemNavigation are:\n * - Up/down\n * - Left/right\n * - Home/End\n *\n * Usage:\n * 1) Use the \"getItemsCallback\" constructor property to pass a callback to ItemNavigation, which, whenever called, will return the list of items to navigate among.\n *\n * Each item passed to ItemNavigation via \"getItemsCallback\" must be:\n * - A) either a UI5Element with a \"_tabIndex\" property\n * - B) or an Object with \"id\" and \"_tabIndex\" properties which represents a part of the root component's shadow DOM.\n * The \"id\" must be a valid ID within the shadow root of the component ItemNavigation operates on.\n * This object must not be a DOM object because, as said, ItemNavigation will not set \"tabindex\" on it. It must be a representation of a DOM object only\n * and the developer has the responsibility to update the \"tabindex\" in the component's DOM.\n * - C) a combination of the above\n *\n * Whenever the user navigates with the keyboard, ItemNavigation will modify the \"_tabIndex\" properties of the items.\n * It is the items' responsibilities to re-render themselves and apply the correct value of \"tabindex\" (i.e. to map the \"_tabIndex\" ItemNavigation set to them to the \"tabindex\" property).\n * If the items of the ItemNavigation are UI5Elements themselves, this can happen naturally since they will be invalidated by their \"_tabIndex\" property.\n * If the items are Objects with \"id\" and \"_tabIndex\" however, it is the developer's responsibility to apply these and the easiest way is to have the root component invalidated by ItemNavigation.\n * To do so, set the \"affectedPropertiesNames\" constructor property to point to one or more of the root component's properties that need refreshing when \"_tabIndex\" is changed deeply.\n *\n * 2) Call the \"setCurrentItem\" method of ItemNavigation whenever you want to change the current item.\n * This is most commonly required if the user for example clicks on an item and thus selects it directly.\n * Pass as the only argument to \"setCurrentItem\" the item that becomes current (must be one of the items, returned by \"getItemsCallback\").\n *\n * @class\n * @public\n */\nclass ItemNavigation {\n\trootWebComponent: UI5Element;\n\n\t_getItems: () => Array<ITabbable>;\n\n\t_currentIndex: number;\n\n\t_rowSize: number;\n\n\t_behavior: ItemNavigationBehavior;\n\n\t_navigationMode: NavigationMode;\n\n\t_affectedPropertiesNames: Array<string>;\n\n\t_skipItemsSize: number | null;\n\n\t/**\n\t *\n\t * @param rootWebComponent the component to operate on (component that slots or contains within its shadow root the items the user navigates among)\n\t * @param {ItemNavigationOptions} options Object with configuration options:\n\t * - currentIndex: the index of the item that will be initially selected (from which navigation will begin)\n\t * - navigationMode (Auto|Horizontal|Vertical): whether the items are displayed horizontally (Horizontal), vertically (Vertical) or as a matrix (Auto) meaning the user can navigate in both directions (up/down and left/right)\n\t * - rowSize: tells how many items per row there are when the items are not rendered as a flat list but rather as a matrix. Relevant for navigationMode=Auto\n\t * \t- skipItemsSize: tells how many items upon PAGE_UP and PAGE_DOWN should be skipped to applying the focus on the next item\n\t * - behavior (Static|Cycling): tells what to do when trying to navigate beyond the first and last items\n\t * Static means that nothing happens if the user tries to navigate beyond the first/last item.\n\t * Cycling means that when the user navigates beyond the last item they go to the first and vice versa.\n\t * - getItemsCallback: function that, when called, returns an array with all items the user can navigate among\n\t * - affectedPropertiesNames: a list of metadata properties on the root component which, upon user navigation, will be reassigned by address thus causing the root component to invalidate\n\t */\n\tconstructor(rootWebComponent: UI5Element, options: ItemNavigationOptions) {\n\t\tif (!rootWebComponent.isUI5Element) {\n\t\t\tthrow new Error(\"The root web component must be a UI5 Element instance\");\n\t\t}\n\n\t\tthis.rootWebComponent = rootWebComponent;\n\t\tthis.rootWebComponent.addEventListener(\"keydown\", this._onkeydown.bind(this));\n\t\tthis.rootWebComponent._onComponentStateFinalized = () => {\n\t\t\tthis._init();\n\t\t};\n\n\t\tif (typeof options.getItemsCallback !== \"function\") {\n\t\t\tthrow new Error(\"getItemsCallback is required\");\n\t\t}\n\n\t\tthis._getItems = options.getItemsCallback;\n\t\tthis._currentIndex = options.currentIndex || 0;\n\t\tthis._rowSize = options.rowSize || 1;\n\t\tthis._behavior = options.behavior || ItemNavigationBehavior.Static;\n\t\tthis._navigationMode = options.navigationMode || NavigationMode.Auto;\n\t\tthis._affectedPropertiesNames = options.affectedPropertiesNames || [];\n\t\tthis._skipItemsSize = options.skipItemsSize || null;\n\t}\n\n\t/**\n\t * Call this method to set a new \"current\" (selected) item in the item navigation\n\t * Note: the item passed to this function must be one of the items, returned by the getItemsCallback function\n\t *\n\t * @public\n\t * @param current the new selected item\n\t */\n\tsetCurrentItem(current: ITabbable) {\n\t\tconst currentItemIndex = this._getItems().indexOf(current);\n\n\t\tif (currentItemIndex === -1) {\n\t\t\tconsole.warn(`The provided item is not managed by ItemNavigation`, current); // eslint-disable-line\n\t\t\treturn;\n\t\t}\n\n\t\tthis._currentIndex = currentItemIndex;\n\t\tthis._applyTabIndex();\n\t}\n\n\t/**\n\t * Call this method to dynamically change the row size\n\t *\n\t * @public\n\t * @param newRowSize\n\t */\n\tsetRowSize(newRowSize: number) {\n\t\tthis._rowSize = newRowSize;\n\t}\n\n\t_init() {\n\t\tthis._getItems().forEach((item, idx) => {\n\t\t\titem._tabIndex = (idx === this._currentIndex) ? \"0\" : \"-1\";\n\t\t});\n\t}\n\n\t_onkeydown(event: KeyboardEvent) {\n\t\tif (!this._canNavigate()) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst horizontalNavigationOn = this._navigationMode === NavigationMode.Horizontal || this._navigationMode === NavigationMode.Auto;\n\t\tconst verticalNavigationOn = this._navigationMode === NavigationMode.Vertical || this._navigationMode === NavigationMode.Auto;\n\t\tconst isRTL = this.rootWebComponent.effectiveDir === \"rtl\";\n\n\t\tif (isRTL && isLeft(event) && horizontalNavigationOn) {\n\t\t\tthis._handleRight();\n\t\t} else if (isRTL && isRight(event) && horizontalNavigationOn) {\n\t\t\tthis._handleLeft();\n\t\t} else if (isLeft(event) && horizontalNavigationOn) {\n\t\t\tthis._handleLeft();\n\t\t} else if (isRight(event) && horizontalNavigationOn) {\n\t\t\tthis._handleRight();\n\t\t} else if (isUp(event) && verticalNavigationOn) {\n\t\t\tthis._handleUp();\n\t\t} else if (isDown(event) && verticalNavigationOn) {\n\t\t\tthis._handleDown();\n\t\t} else if (isHome(event)) {\n\t\t\tthis._handleHome();\n\t\t} else if (isEnd(event)) {\n\t\t\tthis._handleEnd();\n\t\t} else if (isPageUp(event)) {\n\t\t\tthis._handlePageUp();\n\t\t} else if (isPageDown(event)) {\n\t\t\tthis._handlePageDown();\n\t\t} else {\n\t\t\treturn; // if none of the supported keys is pressed, we don't want to prevent the event or update the item navigation\n\t\t}\n\n\t\tevent.preventDefault();\n\t\tthis._applyTabIndex();\n\t\tthis._focusCurrentItem();\n\t}\n\n\t_handleUp() {\n\t\tconst itemsLength = this._getItems().length;\n\t\tif (this._currentIndex - this._rowSize >= 0) { // no border reached, just decrease the index by a row\n\t\t\tthis._currentIndex -= this._rowSize;\n\t\t\treturn;\n\t\t}\n\n\t\tif (this._behavior === ItemNavigationBehavior.Cyclic) { // if cyclic, go to the **last** item in the **previous** column\n\t\t\tconst firstItemInThisColumnIndex = this._currentIndex % this._rowSize;\n\t\t\tconst firstItemInPreviousColumnIndex = firstItemInThisColumnIndex === 0 ? this._rowSize - 1 : firstItemInThisColumnIndex - 1; // find the first item in the previous column (if the current column is the first column -> move to the last column)\n\t\t\tconst rows = Math.ceil(itemsLength / this._rowSize); // how many rows there are (even if incomplete, f.e. for 14 items and _rowSize=4 -> 4 rows total, although only 2 items on the last row)\n\t\t\tlet lastItemInPreviousColumnIndex = firstItemInPreviousColumnIndex + (rows - 1) * this._rowSize; // multiply rows by columns, and add the column's first item's index\n\t\t\tif (lastItemInPreviousColumnIndex > itemsLength - 1) { // for incomplete rows, use the previous row's last item, as for them the last item is missing\n\t\t\t\tlastItemInPreviousColumnIndex -= this._rowSize;\n\t\t\t}\n\t\t\tthis._currentIndex = lastItemInPreviousColumnIndex;\n\t\t} else { // not cyclic, so just go to the first item\n\t\t\tthis._currentIndex = 0;\n\t\t}\n\t}\n\n\t_handleDown() {\n\t\tconst itemsLength = this._getItems().length;\n\t\tif (this._currentIndex + this._rowSize < itemsLength) { // no border reached, just increase the index by a row\n\t\t\tthis._currentIndex += this._rowSize;\n\t\t\treturn;\n\t\t}\n\n\t\tif (this._behavior === ItemNavigationBehavior.Cyclic) { // if cyclic, go to the **first** item in the **next** column\n\t\t\tconst firstItemInThisColumnIndex = this._currentIndex % this._rowSize; // find the first item in the current column first\n\t\t\tconst firstItemInNextColumnIndex = (firstItemInThisColumnIndex + 1) % this._rowSize; // to get the first item in the next column, just increase the index by 1. The modulo by rows is for the case when we are at the last column\n\t\t\tthis._currentIndex = firstItemInNextColumnIndex;\n\t\t} else { // not cyclic, so just go to the last item\n\t\t\tthis._currentIndex = itemsLength - 1;\n\t\t}\n\t}\n\n\t_handleLeft() {\n\t\tconst itemsLength = this._getItems().length;\n\t\tif (this._currentIndex > 0) {\n\t\t\tthis._currentIndex -= 1;\n\t\t\treturn;\n\t\t}\n\n\t\tif (this._behavior === ItemNavigationBehavior.Cyclic) { // go to the first item in the next column\n\t\t\tthis._currentIndex = itemsLength - 1;\n\t\t}\n\t}\n\n\t_handleRight() {\n\t\tconst itemsLength = this._getItems().length;\n\t\tif (this._currentIndex < itemsLength - 1) {\n\t\t\tthis._currentIndex += 1;\n\t\t\treturn;\n\t\t}\n\n\t\tif (this._behavior === ItemNavigationBehavior.Cyclic) { // go to the first item in the next column\n\t\t\tthis._currentIndex = 0;\n\t\t}\n\t}\n\n\t_handleHome() {\n\t\tconst homeEndRange = this._rowSize > 1 ? this._rowSize : this._getItems().length;\n\t\tthis._currentIndex -= this._currentIndex % homeEndRange;\n\t}\n\n\t_handleEnd() {\n\t\tconst homeEndRange = this._rowSize > 1 ? this._rowSize : this._getItems().length;\n\t\tthis._currentIndex += (homeEndRange - 1 - this._currentIndex % homeEndRange); // eslint-disable-line\n\t}\n\n\t_handlePageUp() {\n\t\tif (this._rowSize > 1) {\n\t\t\t// eslint-disable-next-line\n\t\t\t// TODO: handle page up on matrix (grid) layout - ColorPalette, ProductSwitch.\n\t\t\treturn;\n\t\t}\n\t\tthis._handlePageUpFlat();\n\t}\n\n\t_handlePageDown() {\n\t\tif (this._rowSize > 1) {\n\t\t\t// eslint-disable-next-line\n\t\t\t// TODO: handle page up on matrix (grid) layout - ColorPalette, ProductSwitch.\n\t\t\treturn;\n\t\t}\n\t\tthis._handlePageDownFlat();\n\t}\n\n\t/**\n\t * Handles PAGE_UP in a flat list-like structure, both vertically and horizontally.\n\t */\n\t_handlePageUpFlat() {\n\t\tif (this._skipItemsSize === null) {\n\t\t\t// Move the focus to the very top (as Home).\n\t\t\tthis._currentIndex -= this._currentIndex;\n\t\t\treturn;\n\t\t}\n\n\t\tif (this._currentIndex + 1 > this._skipItemsSize) {\n\t\t\t// When there are more than \"skipItemsSize\" number of items to the top,\n\t\t\t// move the focus up/left with the predefined number.\n\t\t\tthis._currentIndex -= this._skipItemsSize;\n\t\t} else {\n\t\t\t// Otherwise, move the focus to the very top (as Home).\n\t\t\tthis._currentIndex -= this._currentIndex;\n\t\t}\n\t}\n\n\t/**\n\t * Handles PAGE_DOWN in a flat list-like structure, both vertically and horizontally.\n\t */\n\t_handlePageDownFlat() {\n\t\tif (this._skipItemsSize === null) {\n\t\t\t// Move the focus to the very bottom (as End).\n\t\t\tthis._currentIndex = this._getItems().length - 1;\n\t\t\treturn;\n\t\t}\n\n\t\tconst currentToEndRange = this._getItems().length - this._currentIndex - 1;\n\n\t\tif (currentToEndRange > this._skipItemsSize) {\n\t\t\t// When there are more than \"skipItemsSize\" number of items until the bottom,\n\t\t\t// move the focus down/right with the predefined number.\n\t\t\tthis._currentIndex += this._skipItemsSize;\n\t\t} else {\n\t\t\t// Otherwise, move the focus to the very bottom (as End).\n\t\t\tthis._currentIndex = this._getItems().length - 1;\n\t\t}\n\t}\n\n\t_applyTabIndex() {\n\t\tconst items = this._getItems();\n\t\tfor (let i = 0; i < items.length; i++) {\n\t\t\titems[i]._tabIndex = i === this._currentIndex ? \"0\" : \"-1\";\n\t\t}\n\n\t\tthis._affectedPropertiesNames.forEach(propName => {\n\t\t\tconst prop = (this.rootWebComponent as Record<string, any>)[propName];\n\t\t\t(this.rootWebComponent as Record<string, any>)[propName] = Array.isArray(prop) ? [...prop] : { ...prop };\n\t\t});\n\t}\n\n\t_focusCurrentItem() {\n\t\tconst currentItem = this._getCurrentItem();\n\t\tif (currentItem) {\n\t\t\tcurrentItem.focus();\n\t\t}\n\t}\n\n\t_canNavigate() {\n\t\tconst currentItem = this._getCurrentItem();\n\t\tconst activeElement = getActiveElement();\n\n\t\treturn currentItem && currentItem === activeElement;\n\t}\n\n\t_getCurrentItem() {\n\t\tconst items = this._getItems();\n\n\t\tif (!items.length) {\n\t\t\treturn;\n\t\t}\n\n\t\t// normalize the index\n\t\twhile (this._currentIndex >= items.length) {\n\t\t\tthis._currentIndex -= this._rowSize;\n\t\t}\n\n\t\tif (this._currentIndex < 0) {\n\t\t\tthis._currentIndex = 0;\n\t\t}\n\n\t\tconst currentItem = items[this._currentIndex];\n\n\t\tif (!currentItem) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (instanceOfUI5Element(currentItem)) {\n\t\t\treturn currentItem.getFocusDomRef();\n\t\t}\n\n\t\tconst currentItemDOMRef = this.rootWebComponent.getDomRef();\n\t\tif (!currentItemDOMRef) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (currentItem.id) {\n\t\t\treturn currentItemDOMRef.querySelector(`#${currentItem.id}`) as HTMLElement;\n\t\t}\n\t}\n}\n\nexport default ItemNavigation;\n\nexport {\n\tITabbable,\n};\n"]}
|
package/dist/i18nBundle.d.ts
CHANGED
|
@@ -19,7 +19,7 @@ declare class I18nBundle {
|
|
|
19
19
|
* @param params Values for the placeholders
|
|
20
20
|
* @returns {string}
|
|
21
21
|
*/
|
|
22
|
-
getText(textObj: I18nText, ...params: Array<number | string>): string;
|
|
22
|
+
getText(textObj: I18nText | string, ...params: Array<number | string>): string;
|
|
23
23
|
}
|
|
24
24
|
/**
|
|
25
25
|
* Fetches and returns the I18nBundle instance for the given package.
|
package/dist/i18nBundle.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"i18nBundle.js","sourceRoot":"","sources":["../src/i18nBundle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AACpG,OAAO,aAAa,MAAM,yBAAyB,CAAC;AAEpD,MAAM,mBAAmB,GAAG,IAAI,GAAG,EAAsB,CAAC;AAE1D,IAAI,mBAAqC,CAAC;AAS1C;;;GAGG;AACH,MAAM,UAAU;IAGf,YAAY,WAAmB;QAC9B,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;IAChC,CAAC;IAED;;;;;;;OAOG;IACH,OAAO,CAAC,
|
|
1
|
+
{"version":3,"file":"i18nBundle.js","sourceRoot":"","sources":["../src/i18nBundle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AACpG,OAAO,aAAa,MAAM,yBAAyB,CAAC;AAEpD,MAAM,mBAAmB,GAAG,IAAI,GAAG,EAAsB,CAAC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CAAC;IACjD,OAAO,UAAU,CAAC;AACnB,CAAC,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,aAAa,GAAG,KAAK,EAAE,WAAmB,EAAuB,EAAE;IACxE,IAAI,mBAAmB,EAAE;QACxB,OAAO,mBAAmB,CAAC,WAAW,CAAC,CAAC;KACxC;IAED,MAAM,eAAe,CAAC,WAAW,CAAC,CAAC;IACnC,OAAO,iBAAiB,CAAC,WAAW,CAAC,CAAC;AACvC,CAAC,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,8BAA8B,GAAG,CAAC,SAA2B,EAAE,EAAE;IACtE,mBAAmB,GAAG,SAAS,CAAC;AACjC,CAAC,CAAC;AAEF,eAAe,UAAU,CAAC;AAE1B,OAAO,EACN,kBAAkB,EAClB,aAAa,EACb,8BAA8B,GAC9B,CAAC","sourcesContent":["import { registerI18nLoader, fetchI18nBundle, getI18nBundleData } from \"./asset-registries/i18n.js\";\nimport formatMessage from \"./util/formatMessage.js\";\n\nconst I18nBundleInstances = new Map<string, I18nBundle>();\n\nlet customGetI18nBundle: I18nBundleGetter;\n\ntype I18nText = {\n\tkey: string,\n\tdefaultText: string,\n};\n\ntype I18nBundleGetter = (packageName: string) => Promise<I18nBundle>;\n\n/**\n * @class\n * @public\n */\nclass I18nBundle {\n\tpackageName: string;\n\n\tconstructor(packageName: string) {\n\t\tthis.packageName = packageName;\n\t}\n\n\t/**\n\t * Returns a text in the currently loaded language\n\t *\n\t * @public\n\t * @param {Object|String} textObj key/defaultText pair or just the key\n\t * @param params Values for the placeholders\n\t * @returns {string}\n\t */\n\tgetText(textObj: I18nText | string, ...params: Array<number | string>): string {\n\t\tif (typeof textObj === \"string\") {\n\t\t\ttextObj = { key: textObj, defaultText: textObj };\n\t\t}\n\n\t\tif (!textObj || !textObj.key) {\n\t\t\treturn \"\";\n\t\t}\n\n\t\tconst bundle = getI18nBundleData(this.packageName);\n\t\tif (bundle && !bundle[textObj.key]) {\n\t\t\t// eslint-disable-next-line no-console\n\t\t\tconsole.warn(`Key ${textObj.key} not found in the i18n bundle, the default text will be used`);\n\t\t}\n\t\tconst messageText = bundle && bundle[textObj.key] ? bundle[textObj.key] : (textObj.defaultText || textObj.key);\n\n\t\treturn formatMessage(messageText, params);\n\t}\n}\n\n/**\n * Returns the I18nBundle instance for the given package synchronously.\n *\n * @public\n * @param packageName\n * @returns { I18nBundle }\n */\nconst getI18nBundleSync = (packageName: string): I18nBundle => {\n\tif (I18nBundleInstances.has(packageName)) {\n\t\treturn I18nBundleInstances.get(packageName)!;\n\t}\n\n\tconst i18nBundle = new I18nBundle(packageName);\n\tI18nBundleInstances.set(packageName, i18nBundle);\n\treturn i18nBundle;\n};\n\n/**\n * Fetches and returns the I18nBundle instance for the given package.\n *\n * @public\n * @param packageName\n * @returns { Promise<I18nBundle> }\n */\nconst getI18nBundle = async (packageName: string): Promise<I18nBundle> => {\n\tif (customGetI18nBundle) {\n\t\treturn customGetI18nBundle(packageName);\n\t}\n\n\tawait fetchI18nBundle(packageName);\n\treturn getI18nBundleSync(packageName);\n};\n\n/**\n * Allows developers to provide a custom getI18nBundle implementation\n * If this function is called, the custom implementation will be used for all components and will completely\n * replace the default implementation.\n *\n * @public\n * @param customGet the function to use instead of the standard getI18nBundle implementation\n */\nconst registerCustomI18nBundleGetter = (customGet: I18nBundleGetter) => {\n\tcustomGetI18nBundle = customGet;\n};\n\nexport default I18nBundle;\n\nexport {\n\tregisterI18nLoader,\n\tgetI18nBundle,\n\tregisterCustomI18nBundleGetter,\n};\n\nexport type {\n\tI18nText,\n};\n"]}
|
|
@@ -489,7 +489,10 @@ var cssSchema = (function () {
|
|
|
489
489
|
},
|
|
490
490
|
'font-weight': {
|
|
491
491
|
'cssPropBits': 0,
|
|
492
|
-
'cssLitGroup': [ L[ 4 ], L[ 47 ], L[ 55 ] ]
|
|
492
|
+
'cssLitGroup': [ L[ 4 ], L[ 47 ], L[ 55 ] ],
|
|
493
|
+
// ##### BEGIN: MODIFIED BY SAP
|
|
494
|
+
'cssLitNumeric': true
|
|
495
|
+
// ##### END: MODIFIED BY SAP
|
|
493
496
|
},
|
|
494
497
|
'height': {
|
|
495
498
|
'cssPropBits': 37,
|
|
@@ -1217,101 +1220,113 @@ var sanitizeCssProperty = (function () {
|
|
|
1217
1220
|
token = (
|
|
1218
1221
|
// Strip out spaces. Normally cssparser.js dumps these, but we
|
|
1219
1222
|
// strip them out in case the content doesn't come via cssparser.js.
|
|
1220
|
-
(cc === ' '.charCodeAt(0))
|
|
1221
|
-
|
|
1222
|
-
(
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1223
|
+
(cc === ' '.charCodeAt(0))
|
|
1224
|
+
? ''
|
|
1225
|
+
: (cc === '"'.charCodeAt(0))
|
|
1226
|
+
? ( // Quoted string.
|
|
1227
|
+
(qstringBits === CSS_PROP_BIT_QSTRING_URL && opt_naiveUriRewriter)
|
|
1228
|
+
// Sanitize and convert to url("...") syntax.
|
|
1229
|
+
// Treat url content as case-sensitive.
|
|
1230
|
+
? (normalizeUrl(
|
|
1231
|
+
safeUri(
|
|
1232
|
+
decodeCss(tokens[i].substring(1, token.length - 1)),
|
|
1233
|
+
property,
|
|
1234
|
+
opt_naiveUriRewriter
|
|
1235
|
+
)
|
|
1236
|
+
))
|
|
1237
|
+
// Drop if plain text content strings not allowed.
|
|
1238
|
+
: (qstringBits === CSS_PROP_BIT_QSTRING_CONTENT) ? token : '')
|
|
1239
|
+
// Preserve hash color literals if allowed.
|
|
1240
|
+
: (cc === '#'.charCodeAt(0) && /^#(?:[0-9a-f]{3}){1,2}$/.test(token))
|
|
1241
|
+
? (propBits & CSS_PROP_BIT_HASH_VALUE ? token : '')
|
|
1242
|
+
// ##### BEGIN: MODIFIED BY SAP
|
|
1243
|
+
// : ('0'.charCodeAt(0) <= cc && cc <= '9'.charCodeAt(0))
|
|
1244
|
+
: ('0'.charCodeAt(0) <= cc && cc <= '9'.charCodeAt(0) && !propertySchema.cssLitNumeric)
|
|
1245
|
+
// ##### END: MODIFIED BY SAP
|
|
1246
|
+
// A number starting with a digit.
|
|
1247
|
+
? ((propBits & CSS_PROP_BIT_QUANTITY)
|
|
1248
|
+
? ((propBits & CSS_PROP_BIT_Z_INDEX)
|
|
1249
|
+
? (token.match(/^\d{1,7}$/) ? token : '')
|
|
1250
|
+
: token)
|
|
1251
|
+
: '')
|
|
1252
|
+
// Normalize quantities so they don't start with a '.' or '+' sign and
|
|
1253
|
+
// make sure they all have an integer component so can't be confused
|
|
1254
|
+
// with a dotted identifier.
|
|
1255
|
+
// This can't be done in the lexer since ".4" is a valid rule part.
|
|
1256
|
+
: (cc1 = token.charCodeAt(1),
|
|
1257
|
+
cc2 = token.charCodeAt(2),
|
|
1258
|
+
isnum1 = '0'.charCodeAt(0) <= cc1 && cc1 <= '9'.charCodeAt(0),
|
|
1259
|
+
isnum2 = '0'.charCodeAt(0) <= cc2 && cc2 <= '9'.charCodeAt(0),
|
|
1260
|
+
// +.5 -> 0.5 if allowed.
|
|
1261
|
+
(cc === '+'.charCodeAt(0)
|
|
1262
|
+
&& (isnum1 || (cc1 === '.'.charCodeAt(0) && isnum2))))
|
|
1263
|
+
? ((propBits & CSS_PROP_BIT_QUANTITY)
|
|
1264
|
+
? ((propBits & CSS_PROP_BIT_Z_INDEX)
|
|
1265
|
+
? (token.match(/^\+\d{1,7}$/) ? token : '')
|
|
1266
|
+
: ((isnum1 ? '' : '0') + token.substring(1)))
|
|
1267
|
+
: '')
|
|
1268
|
+
// -.5 -> -0.5 if allowed otherwise -> 0 if quantities allowed.
|
|
1269
|
+
: (cc === '-'.charCodeAt(0)
|
|
1270
|
+
&& (isnum1 || (cc1 === '.'.charCodeAt(0) && isnum2)))
|
|
1271
|
+
? ((propBits & CSS_PROP_BIT_NEGATIVE_QUANTITY)
|
|
1272
|
+
? ((propBits & CSS_PROP_BIT_Z_INDEX)
|
|
1273
|
+
? (token.match(/^\-\d{1,7}$/) ? token : '')
|
|
1274
|
+
: ((isnum1 ? '-' : '-0') + token.substring(1)))
|
|
1275
|
+
: ((propBits & CSS_PROP_BIT_QUANTITY) ? '0' : ''))
|
|
1276
|
+
// .5 -> 0.5 if allowed.
|
|
1277
|
+
: (cc === '.'.charCodeAt(0) && isnum1)
|
|
1278
|
+
? ((propBits & CSS_PROP_BIT_QUANTITY) ? '0' + token : '')
|
|
1279
|
+
// Handle url("...") by rewriting the body.
|
|
1280
|
+
: ('url(' === token.substring(0, 4))
|
|
1281
|
+
? ((opt_naiveUriRewriter && (qstringBits & CSS_PROP_BIT_QSTRING_URL))
|
|
1282
|
+
? normalizeUrl(
|
|
1283
|
+
safeUri(
|
|
1284
|
+
tokens[i].substring(5, token.length - 2),
|
|
1285
|
+
property,
|
|
1286
|
+
opt_naiveUriRewriter
|
|
1287
|
+
)
|
|
1288
|
+
)
|
|
1289
|
+
: '')
|
|
1290
|
+
// Handle func(...) and literal tokens
|
|
1291
|
+
// such as keywords and punctuation.
|
|
1292
|
+
: (
|
|
1293
|
+
// Step 1. Combine func(...) into something that can be compared
|
|
1294
|
+
// against propertySchema.cssExtra.
|
|
1295
|
+
(token.charAt(token.length-1) === '(')
|
|
1296
|
+
&& (end = normalizeFunctionCall(tokens, i),
|
|
1297
|
+
// When tokens is
|
|
1298
|
+
// ['x', ' ', 'rgb(', '255', ',', '0', ',', '0', ')', ' ', 'y']
|
|
1299
|
+
// and i is the index of 'rgb(' and end is the index of ')'
|
|
1300
|
+
// splices tokens to where i now is the index of the whole call:
|
|
1301
|
+
// ['x', ' ', 'rgb( 255 , 0 , 0 )', ' ', 'y']
|
|
1302
|
+
tokens.splice(i, end - i,
|
|
1303
|
+
token = tokens.slice(i, end).join(' '))),
|
|
1304
|
+
litGroup = propertySchema.cssLitGroup,
|
|
1305
|
+
litMap = (
|
|
1306
|
+
litGroup
|
|
1307
|
+
? (propertySchema.cssLitMap
|
|
1308
|
+
// Lazily compute the union from litGroup.
|
|
1309
|
+
|| (propertySchema.cssLitMap = unionArrays(litGroup)))
|
|
1310
|
+
: ALLOWED_LITERAL), // A convenient empty object.
|
|
1311
|
+
(litMap[token] === ALLOWED_LITERAL
|
|
1312
|
+
|| propertySchema.cssExtra && propertySchema.cssExtra.test(token)))
|
|
1313
|
+
// Token is in the literal map or matches extra.
|
|
1314
|
+
? token
|
|
1315
|
+
: (/^\w+$/.test(token)
|
|
1316
|
+
&& (qstringBits === CSS_PROP_BIT_QSTRING_CONTENT))
|
|
1317
|
+
// Quote unrecognized keywords so font names like
|
|
1318
|
+
// Arial Bold
|
|
1319
|
+
// ->
|
|
1320
|
+
// "Arial Bold"
|
|
1321
|
+
? (lastQuoted+1 === k
|
|
1322
|
+
// If the last token was also a keyword that was quoted, then
|
|
1323
|
+
// combine this token into that.
|
|
1324
|
+
? (tokens[lastQuoted] = tokens[lastQuoted]
|
|
1325
|
+
.substring(0, tokens[lastQuoted].length-1) + ' ' + token + '"',
|
|
1326
|
+
token = '')
|
|
1327
|
+
: (lastQuoted = k, '"' + token + '"'))
|
|
1328
|
+
// Disallowed.
|
|
1329
|
+
: '');
|
|
1315
1330
|
if (token) {
|
|
1316
1331
|
tokens[k++] = token;
|
|
1317
1332
|
}
|
|
@@ -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.
|
|
10
|
-
<script type="module" crossorigin src="/assets/bundle.esm.
|
|
9
|
+
<script type="module" crossorigin src="/assets/Boot.5a9b49d7.js"></script>
|
|
10
|
+
<script type="module" crossorigin src="/assets/bundle.esm.e0ff2f8c.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.
|
|
10
|
-
<link rel="modulepreload" crossorigin href="/assets/Boot.
|
|
9
|
+
<script type="module" crossorigin src="/assets/test/pages/Boot.html.297ac63f.js"></script>
|
|
10
|
+
<link rel="modulepreload" crossorigin href="/assets/Boot.5a9b49d7.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.
|
|
12
|
-
<script type="module" crossorigin src="/assets/bundle.esm.
|
|
11
|
+
<script type="module" crossorigin src="/assets/Boot.5a9b49d7.js"></script>
|
|
12
|
+
<script type="module" crossorigin src="/assets/bundle.esm.e0ff2f8c.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.
|
|
44
|
-
<script type="module" crossorigin src="/assets/bundle.esm.
|
|
43
|
+
<script type="module" crossorigin src="/assets/Boot.5a9b49d7.js"></script>
|
|
44
|
+
<script type="module" crossorigin src="/assets/bundle.esm.e0ff2f8c.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.
|
|
8
|
-
<script type="module" crossorigin src="/assets/bundle.esm.
|
|
7
|
+
<script type="module" crossorigin src="/assets/Boot.5a9b49d7.js"></script>
|
|
8
|
+
<script type="module" crossorigin src="/assets/bundle.esm.e0ff2f8c.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.
|
|
11
|
-
<link rel="modulepreload" crossorigin href="/assets/Boot.
|
|
12
|
-
<link rel="modulepreload" crossorigin href="/assets/bundle.esm.
|
|
10
|
+
<script type="module" crossorigin src="/assets/test/pages/i18n.html.da527088.js"></script>
|
|
11
|
+
<link rel="modulepreload" crossorigin href="/assets/Boot.5a9b49d7.js">
|
|
12
|
+
<link rel="modulepreload" crossorigin href="/assets/bundle.esm.e0ff2f8c.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.
|
|
12
|
-
<link rel="modulepreload" crossorigin href="/assets/Boot.
|
|
13
|
-
<link rel="modulepreload" crossorigin href="/assets/bundle.esm.
|
|
11
|
+
<script type="module" crossorigin src="/assets/test/pages/i18n_texts.html.c8ead431.js"></script>
|
|
12
|
+
<link rel="modulepreload" crossorigin href="/assets/Boot.5a9b49d7.js">
|
|
13
|
+
<link rel="modulepreload" crossorigin href="/assets/bundle.esm.e0ff2f8c.js">
|
|
14
14
|
</head>
|
|
15
15
|
|
|
16
16
|
<body>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ui5/webcomponents-base",
|
|
3
|
-
"version": "1.16.0-rc.
|
|
3
|
+
"version": "1.16.0-rc.3",
|
|
4
4
|
"description": "UI5 Web Components: webcomponents.base",
|
|
5
5
|
"author": "SAP SE (https://www.sap.com)",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -36,9 +36,9 @@
|
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@buxlabs/amd-to-es6": "0.16.1",
|
|
39
|
-
"@openui5/sap.ui.core": "1.
|
|
40
|
-
"@ui5/webcomponents-tools": "1.16.0-rc.
|
|
41
|
-
"chromedriver": "
|
|
39
|
+
"@openui5/sap.ui.core": "1.116.0",
|
|
40
|
+
"@ui5/webcomponents-tools": "1.16.0-rc.3",
|
|
41
|
+
"chromedriver": "115.0.0",
|
|
42
42
|
"clean-css": "^5.2.2",
|
|
43
43
|
"copy-and-watch": "^0.1.5",
|
|
44
44
|
"cross-env": "^7.0.3",
|
|
@@ -47,5 +47,5 @@
|
|
|
47
47
|
"replace-in-file": "^6.3.5",
|
|
48
48
|
"resolve": "^1.20.0"
|
|
49
49
|
},
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "614510b066a0d3403ceb72f2613d114d43df2a8f"
|
|
51
51
|
}
|