@telia-ace/widget-runtime-flamingo 1.0.45 → 1.0.47

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.
@@ -167,7 +167,7 @@ ${o.map(a=>`${a.name||"<no name>"} (${a.id})
167
167
  align-items: center;
168
168
  fill: var(--trigger-text-color, #fff);
169
169
  }
170
- `];ct([G({attribute:!1})],H.prototype,"symbol",2);ct([G({attribute:!1})],H.prototype,"container",2);ct([O()],H.prototype,"active",2);ct([O()],H.prototype,"loaded",2);ct([O()],H.prototype,"icon",2);var V=(n=>(n.Inline="inline",n.Link="link",n.Badge="badge",n.Unsupported="unsupported",n))(V||{});const Mn=(n,t)=>n&&t?"both":n?"widgetDOM":t?"triggerDOM":"none",is=n=>n?typeof n=="boolean"&&n?"link":typeof n=="object"&&!Array.isArray(n)?"badge":"unsupported":"inline",In=async(n,t,e,s,i,r=!1)=>{var l,d;const o=Mn(e,s),a=is(i),h={widgetDOMElement:e?e.cloneNode(!0):void 0,triggerDOMElement:s?s.cloneNode(!0):void 0},c={triggerType:a,cachedOriginals:h,widgetDOMElement:document.createElement("div")};switch(o){case"both":{c.widgetDOMElement=e||document.createElement("div"),a!=="inline"&&(c.triggerDOMElement=s);break}case"widgetDOM":{if(c.widgetDOMElement=e||document.createElement("div"),a!=="inline"){const u=document.body.appendChild(document.createElement("a"));a==="link"&&(u.innerText=t),c.triggerDOMElement=u}break}case"triggerDOM":{const u=document.createElement("div");c.widgetDOMElement=u,a==="inline"?(u.id=(s==null?void 0:s.id)||"",r?(u.style.display="none",(l=s==null?void 0:s.parentNode)==null||l.appendChild(u),c.callback=()=>{var p;(p=s==null?void 0:s.parentNode)==null||p.replaceChild(u,s),u.style.display=(s==null?void 0:s.style.display)||"block"}):(d=s==null?void 0:s.parentNode)==null||d.replaceChild(u,s),c.cachedOriginals.widgetDOMElement=s,c.cachedOriginals.triggerDOMElement=void 0):(c.widgetDOMElement=document.body.appendChild(u),c.triggerDOMElement=s);break}case"none":{const u=document.body.appendChild(document.createElement("div"));if(c.widgetDOMElement=u,a!=="inline"){customElements.get("ace-widget-trigger")||customElements.define("ace-widget-trigger",H);const p=document.createElement("ace-widget-trigger");p.symbol=i.symbol,p.container=n,document.body.appendChild(p),console.log("Created trigger"),c.triggerDOMElement=p}break}}return c},Rn="modals";class Tn{constructor(t,e){this.options=e,this.unsubscribe=[],this.container=t.createChild(this),this.container.register("widgetDOMElement",this.options.widgetDOMElement),this.container.register("triggerDOMElement",this.options.triggerDOMElement);const s=this.container.get("$widget");this.options.widgetDOMElement.classList.add("ace-widget"),this.options.widgetDOMElement.classList.add(`ace-widget_${s.name}`);const i=t.get("widgetDOMElements")||[];t.register("widgetDOMElements",[...i,this.options.widgetDOMElement])}render(){const{widgetDOMElement:t,triggerDOMElement:e}=this.options,s=this.container.get("$widget");return t.getAttribute("data-rendered")==="true"?Promise.resolve():(e&&this.options.triggerType===V.Badge&&pn(e),Promise.resolve().then(()=>require("./render-9a5af472.js")).then(i=>i.default(this.container,t)).then(()=>{if(t.setAttribute("data-rendered","true"),e&&this.options.triggerType===V.Badge){const r=this.options.triggerOptions.openTooltip;Ke(e,r)}Ss(this.container,t);const i=this.container.get("$environment").widgets.all();S(this.container,Rn,m.Session).then(r=>{r&&r.forEach(o=>{i.find(a=>a.name===o.name&&a.state==="activated")&&s.events.dispatch("widget:modal-opened",o)})})}))}renderBadge(t){const{triggerDOMElement:e}=this.options;if(!e)return;e.getAttribute("role")||e.setAttribute("role","button");const{name:s}=this.container.get("$widget"),{label:i,symbol:r,ariaLabel:o,closedTooltip:a,openTooltip:h}=t,c={closedTooltip:a,openTooltip:h};this.options.triggerOptions=c;const l=dn(e,{label:i,symbol:r,ariaLabel:o,widgetName:s,tooltip:a});this.unsubscribe.push(l)}async dispose(){var s,i,r,o;const{triggerDOMElement:t,widgetDOMElement:e}=this.options;this.options.cachedOriginals.widgetDOMElement&&e&&((s=e.parentNode)==null||s.replaceChild(this.options.cachedOriginals.widgetDOMElement,e)),this.options.cachedOriginals.triggerDOMElement&&t&&((i=t.parentNode)==null||i.replaceChild(this.options.cachedOriginals.triggerDOMElement,t)),this.unsubscribe.forEach(a=>{a()}),(r=e.parentNode)==null||r.removeChild(e),(o=t==null?void 0:t.parentNode)==null||o.removeChild(t)}}const ut="changesets",jn=n=>{const t={tags:n.tags};return n.context&&typeof n.context!="function"&&(t.context=n.context),n.properties&&typeof n.properties!="function"&&(t.properties=n.properties),n.layout&&typeof n.layout!="function"&&(t.layout=n.layout),t};class le{constructor(t,e){this.container=t,this.storageWriter=e}static create(t){return k(t,ut,g.Necessary,{medium:m.Local}).then(e=>new le(t,e))}write(t,e,s,i){return A(this)(()=>S(this.container,ut,m.Local).then((r={})=>{const{keys:o=[],items:a={}}=r,h=o.indexOf(t);return h>-1&&o.splice(h,1),o.push(t),a[t]={options:i,attributes:jn(s),rules:e.rules},this.storageWriter({keys:o,items:a})}))}remove(t){return A(this)(()=>S(this.container,ut,m.Local).then((e={})=>{const{keys:s=[],items:i={}}=e,r=s.indexOf(t);if(r>-1)return s.splice(r,1),delete i[t],this.storageWriter(e)}))}load(t){return A(this)(()=>S(this.container,ut,m.Local).then((e={})=>{const{keys:s=[],items:i={}}=e;s.forEach(r=>{const o=i[r];if(o){const{rules:a,attributes:h,options:c}=o;t.write({attributes:h,options:c,target:new Y(t,a)})}})}))}}const Vn=n=>{const{container:t}=n;return le.create(t).then(e=>{const s=t.get("$settings"),i={localStorage:e},r=new Z(n,i),o=Be(r,s);return n.events.subscribe("widget:state-change",(a,h)=>{h.state===je.Deactivating&&o()}),r})},Un=n=>Promise.resolve().then(()=>hn).then(({StorageProvider:t})=>new t),Hn=n=>Promise.resolve().then(()=>se).then(({ActionResolver:t})=>new t(n)),zn=n=>Promise.resolve().then(()=>se).then(({ComponentResolver:t})=>new t(n)),Bn=n=>Promise.resolve().then(()=>se).then(()=>Vn(n.get("$widget"))),Ft="$settings",Kt="open",Me="activeStickyWidget";class Wn extends Es{constructor(t){super(t),this.outlets=new Map,this.activated=void 0,this.subs=[],this.handleBootstrapping=e=>{const s={triggerDOMElement:e.sourceDOMElement,withRenderState:"storage"};this.container.get("settings").then(i=>{const{activate:r}=i;(typeof r>"u"||r===null||r===!0)&&(this.activated=(this.activated||this.widget.activate()).then(()=>this.attach(s)))})},this.container.registerAsync("storage",()=>Un(this.container)),this.container.registerFactory("settings",()=>S(this.container,Ft,m.Local).then((e={})=>({...this.container.get("$settings"),...e}))),bs(this,"load",this.handleBootstrapping),this.container.registerAsync("componentResolver",()=>zn(this.container)),this.container.registerAsync("actionResolver",()=>Hn(this.container)),this.container.register("matchMedia",window.matchMedia),this.container.registerAsync("components",()=>Bn(this.container))}initialize(){const t=this.container.getManyAsync("actionResolver","components"),e=this.container.get("csp");return e&&(window.webprovisionsEnvironmentVariables||(window.webprovisionsEnvironmentVariables={}),window.webprovisionsEnvironmentVariables.cspNonce=e.nonce),Promise.all([t,this.container.get("settings")]).then(([{actionResolver:s,components:i},r])=>(s.subscribe(this.widget.name,(h,c,l)=>this.onAction(c,l)),(h=>{i.nodes.query({type:"view"}).forEach(c=>{i.setSwitch(c,h)})})("index"),this.events.subscribe("widget:data-loaded",(h,{element:c})=>{this.widget.container.get("seoConfiguration")&&this.events.dispatch("widget:preloaded-replaced",{element:c})}),Promise.resolve()))}attach(t={}){return this.container.get("settings").then(async({trigger:e})=>{var u,p;const{widgetDOMElement:s,key:i=ot(),triggerDOMElement:r,withRenderState:o}=t,h=is(e)===V.Inline&&((r==null?void 0:r.childElementCount)||0)>0,c=await In(this.container,this.widget.name,s,r,e,h);this.outlets.size<1&&!o&&this.setRenderState("unset");const l=()=>{const v=()=>y.querySelectorAll("[data-loading=true]").length===0,[y]=this.widget.container.get("widgetDOMElements"),C=(Nt,_)=>{v()&&(c.callback&&c.callback(),_.disconnect())},ht={attributes:!0,subtree:!0,childList:!0};v()&&c.callback&&c.callback(),new MutationObserver(C).observe(y,ht)};h&&this.widget.container.getAsync("dataClient").then(({events:v})=>{v.subscribe("data-client:fetched",(y,C)=>{C.unresolvedQueries===0&&l()})});const d=this.getOrCreateViewOutlet(i,c);if(this.outlets.set(i,d),this.widget.events.dispatch("widget:attached",{},{bubbles:!0}),c.triggerType===V.Badge&&e&&((u=c.triggerDOMElement)==null||u.setAttribute("aria-expanded","false"),d==null||d.renderBadge(e)),c.triggerType!==V.Inline&&((p=c.triggerDOMElement)==null||p.addEventListener("click",v=>{v.preventDefault(),this.container.get("settings").then(({trigger:y})=>{d.render().then(()=>this.renderState()).then(C=>y&&y.action&&y.action==="hide"?C===$.open?this.hide():this.open():C===$.open?this.close():this.open())})})),this.outlets.size>1)return this.renderState().then(v=>{this.triggerStateIfApplicable(v)});if(o)return o==="storage"?this.renderState().then(v=>{if(c.triggerType===V.Inline){this.triggerStateIfApplicable("open");return}this.triggerStateIfApplicable(v)}):this.triggerStateIfApplicable(o)})}detach(t){if(t){if(this.outlets.has(t)){const e=this.outlets.get(t);e==null||e.dispose(),this.outlets.delete(t);return}process.env.NODE_ENV!=="production"&&console.warn(`detach(): Could not find View Outlet with key ${t}`);return}this.outlets.forEach(e=>{e.dispose()}),this.outlets.clear()}triggerStateIfApplicable(t){switch(t){case"closed":this.close();break;case"open":this.open();break;case"hidden":this.hide();break;default:return}}getOrCreateViewOutlet(t,e){return this.outlets.has(t)?this.outlets.get(t):new Tn(this.container,e)}render(t={}){if(process.env.NODE_ENV!=="production"&&console.warn("widget.render() is deprecated. Use widget.attach() instead."),t.open){const e={...t,withRenderState:"open"};return this.attach(e)}return this.attach(t)}activate(t){t!=null&&t.override&&this.setSettings(()=>t.override),t!=null&&t.apiNotificationPriorityBy&&this.container.register("apiNotificationPriorityBy",t.apiNotificationPriorityBy)}setSettings(t){return Promise.all([this.container.get("settings"),k(this.container,Ft,g.Necessary,{medium:m.Local})]).then(([e,s])=>Promise.resolve(t(e)).then(i=>s(i).then(()=>{const r={...e,...i};return this.widget.events.dispatch("widget:settings-updated",r),r})))}clearSettings(){return k(this.container,Ft,g.Necessary,{medium:m.Local}).then(t=>t()).then(()=>this.container.get("settings")).then(t=>{this.widget.events.dispatch("widget:settings-updated",t)})}action({action:t,value:e}){return this.container.getAsync("actionResolver").then(s=>{s.action(this.widget.name,t,e)})}renderState(){return(()=>S(this.container,Kt,m.Session).then((e=$.closed)=>e))()}hide(){return this.outlets.size<1?(process.env.NODE_ENV!=="production"&&console.warn("hide(): No-op as no view outlets are registered. Invoke the attach() command first."),Promise.resolve()):(this.outlets.forEach(t=>t.render()),this.action({action:"hide"}).then(()=>{this.setTriggerState(!1)}))}open(){return this.outlets.size<1?(process.env.NODE_ENV!=="production"&&console.warn("open(): No-op as no view outlets are registered. Invoke the attach() command first."),Promise.resolve()):(this.outlets.forEach(t=>t.render()),this.action({action:"open"}).then(()=>(this.widget.events.dispatch("tracking:widget-rendered",{}),this.onOpen())))}close(){return this.outlets.size<1?(process.env.NODE_ENV!=="production"&&console.warn("close(): No-op as no view outlets are registered. Invoke the attach() command first."),Promise.resolve()):this.action({action:"close"}).then(()=>this.onClose())}show(){return process.env.NODE_ENV!=="production"&&console.warn("show(): Command is deprecated and will be removed in the future. Use open() instead."),this.open()}onAction(t,e){switch(t){case"close":case"open":case"hide":const s=t==="open"?$.open:t==="close"?$.closed:$.hidden;return this.setRenderState(s).then(()=>{this.setTriggerState(s===$.open),s!==$.hidden?s===$.open?this.onOpen():this.onClose():this.outlets.forEach(i=>{var r;return(r=i.options.triggerDOMElement)==null?void 0:r.setAttribute("aria-expanded","false")})})}}setRenderState(t){const{invoke:e,events:s}=this.container.get("$widget");return Promise.all([k(this.container,Kt,g.Necessary,{medium:m.Session}),k(this.container,Kt,g.Necessary,{medium:m.Local,duration:{minutes:5}}),e("renderState")]).then(([i,r,o])=>{t==="unset"||!t?(r(),i()):i(t),s.dispatch("widget:render-state-changed",{previous:o,next:t})})}onOpen(){return this.outlets.forEach(t=>{var e;return(e=t.options.triggerDOMElement)==null?void 0:e.setAttribute("aria-expanded","true")}),Promise.resolve()}onClose(){const t=this.container.getManyAsync("components");return(()=>this.container.get("settings").then(s=>{const{activate:i}=this.container.get("$settings");return s.activate!==i?this.setSettings(()=>Promise.resolve({activate:i})):Promise.resolve()}))().then(()=>t).then(({components:s})=>{this.outlets.forEach(i=>{var r;return(r=i.options.triggerDOMElement)==null?void 0:r.setAttribute("aria-expanded","false")})})}setTriggerState(t){this.outlets.forEach(e=>{const{options:{triggerDOMElement:s,triggerOptions:i}}=e,{openTooltip:r,closedTooltip:o}=i||{};s&&(t?Ke(s,r):un(s,o))})}deactivate(){this.subs.forEach(e=>e());const t=[];return this.outlets.forEach(e=>t.push(e.dispose())),S(this.container,Me,m.Local).then(e=>e===this.widget.name?k(this.container,Me,g.Necessary,{medium:m.Local,scope:Q.Implementation}).then(s=>s()).then(()=>Promise.all(t)):Promise.all(t))}}/**
170
+ `];ct([G({attribute:!1})],H.prototype,"symbol",2);ct([G({attribute:!1})],H.prototype,"container",2);ct([O()],H.prototype,"active",2);ct([O()],H.prototype,"loaded",2);ct([O()],H.prototype,"icon",2);var V=(n=>(n.Inline="inline",n.Link="link",n.Badge="badge",n.Unsupported="unsupported",n))(V||{});const Mn=(n,t)=>n&&t?"both":n?"widgetDOM":t?"triggerDOM":"none",is=n=>n?typeof n=="boolean"&&n?"link":typeof n=="object"&&!Array.isArray(n)?"badge":"unsupported":"inline",In=async(n,t,e,s,i,r=!1)=>{var l,d;const o=Mn(e,s),a=is(i),h={widgetDOMElement:e?e.cloneNode(!0):void 0,triggerDOMElement:s?s.cloneNode(!0):void 0},c={triggerType:a,cachedOriginals:h,widgetDOMElement:document.createElement("div")};switch(o){case"both":{c.widgetDOMElement=e||document.createElement("div"),a!=="inline"&&(c.triggerDOMElement=s);break}case"widgetDOM":{if(c.widgetDOMElement=e||document.createElement("div"),a!=="inline"){const u=document.body.appendChild(document.createElement("a"));a==="link"&&(u.innerText=t),c.triggerDOMElement=u}break}case"triggerDOM":{const u=document.createElement("div");c.widgetDOMElement=u,a==="inline"?(u.id=(s==null?void 0:s.id)||"",r?(u.style.display="none",(l=s==null?void 0:s.parentNode)==null||l.appendChild(u),c.callback=()=>{var p;(p=s==null?void 0:s.parentNode)==null||p.replaceChild(u,s),u.style.display=(s==null?void 0:s.style.display)||"block"}):(d=s==null?void 0:s.parentNode)==null||d.replaceChild(u,s),c.cachedOriginals.widgetDOMElement=s,c.cachedOriginals.triggerDOMElement=void 0):(c.widgetDOMElement=document.body.appendChild(u),c.triggerDOMElement=s);break}case"none":{const u=document.body.appendChild(document.createElement("div"));if(c.widgetDOMElement=u,a!=="inline"){customElements.get("ace-widget-trigger")||customElements.define("ace-widget-trigger",H);const p=document.createElement("ace-widget-trigger");p.symbol=i.symbol,p.container=n,document.body.appendChild(p),console.log("Created trigger"),c.triggerDOMElement=p}break}}return c},Rn="modals";class Tn{constructor(t,e){this.options=e,this.unsubscribe=[],this.container=t.createChild(this),this.container.register("widgetDOMElement",this.options.widgetDOMElement),this.container.register("triggerDOMElement",this.options.triggerDOMElement);const s=this.container.get("$widget");this.options.widgetDOMElement.classList.add("ace-widget"),this.options.widgetDOMElement.classList.add(`ace-widget_${s.name}`);const i=t.get("widgetDOMElements")||[];t.register("widgetDOMElements",[...i,this.options.widgetDOMElement])}render(){const{widgetDOMElement:t,triggerDOMElement:e}=this.options,s=this.container.get("$widget");return t.getAttribute("data-rendered")==="true"?Promise.resolve():(e&&this.options.triggerType===V.Badge&&pn(e),Promise.resolve().then(()=>require("./render-5beab301.js")).then(i=>i.default(this.container,t)).then(()=>{if(t.setAttribute("data-rendered","true"),e&&this.options.triggerType===V.Badge){const r=this.options.triggerOptions.openTooltip;Ke(e,r)}Ss(this.container,t);const i=this.container.get("$environment").widgets.all();S(this.container,Rn,m.Session).then(r=>{r&&r.forEach(o=>{i.find(a=>a.name===o.name&&a.state==="activated")&&s.events.dispatch("widget:modal-opened",o)})})}))}renderBadge(t){const{triggerDOMElement:e}=this.options;if(!e)return;e.getAttribute("role")||e.setAttribute("role","button");const{name:s}=this.container.get("$widget"),{label:i,symbol:r,ariaLabel:o,closedTooltip:a,openTooltip:h}=t,c={closedTooltip:a,openTooltip:h};this.options.triggerOptions=c;const l=dn(e,{label:i,symbol:r,ariaLabel:o,widgetName:s,tooltip:a});this.unsubscribe.push(l)}async dispose(){var s,i,r,o;const{triggerDOMElement:t,widgetDOMElement:e}=this.options;this.options.cachedOriginals.widgetDOMElement&&e&&((s=e.parentNode)==null||s.replaceChild(this.options.cachedOriginals.widgetDOMElement,e)),this.options.cachedOriginals.triggerDOMElement&&t&&((i=t.parentNode)==null||i.replaceChild(this.options.cachedOriginals.triggerDOMElement,t)),this.unsubscribe.forEach(a=>{a()}),(r=e.parentNode)==null||r.removeChild(e),(o=t==null?void 0:t.parentNode)==null||o.removeChild(t)}}const ut="changesets",jn=n=>{const t={tags:n.tags};return n.context&&typeof n.context!="function"&&(t.context=n.context),n.properties&&typeof n.properties!="function"&&(t.properties=n.properties),n.layout&&typeof n.layout!="function"&&(t.layout=n.layout),t};class le{constructor(t,e){this.container=t,this.storageWriter=e}static create(t){return k(t,ut,g.Necessary,{medium:m.Local}).then(e=>new le(t,e))}write(t,e,s,i){return A(this)(()=>S(this.container,ut,m.Local).then((r={})=>{const{keys:o=[],items:a={}}=r,h=o.indexOf(t);return h>-1&&o.splice(h,1),o.push(t),a[t]={options:i,attributes:jn(s),rules:e.rules},this.storageWriter({keys:o,items:a})}))}remove(t){return A(this)(()=>S(this.container,ut,m.Local).then((e={})=>{const{keys:s=[],items:i={}}=e,r=s.indexOf(t);if(r>-1)return s.splice(r,1),delete i[t],this.storageWriter(e)}))}load(t){return A(this)(()=>S(this.container,ut,m.Local).then((e={})=>{const{keys:s=[],items:i={}}=e;s.forEach(r=>{const o=i[r];if(o){const{rules:a,attributes:h,options:c}=o;t.write({attributes:h,options:c,target:new Y(t,a)})}})}))}}const Vn=n=>{const{container:t}=n;return le.create(t).then(e=>{const s=t.get("$settings"),i={localStorage:e},r=new Z(n,i),o=Be(r,s);return n.events.subscribe("widget:state-change",(a,h)=>{h.state===je.Deactivating&&o()}),r})},Un=n=>Promise.resolve().then(()=>hn).then(({StorageProvider:t})=>new t),Hn=n=>Promise.resolve().then(()=>se).then(({ActionResolver:t})=>new t(n)),zn=n=>Promise.resolve().then(()=>se).then(({ComponentResolver:t})=>new t(n)),Bn=n=>Promise.resolve().then(()=>se).then(()=>Vn(n.get("$widget"))),Ft="$settings",Kt="open",Me="activeStickyWidget";class Wn extends Es{constructor(t){super(t),this.outlets=new Map,this.activated=void 0,this.subs=[],this.handleBootstrapping=e=>{const s={triggerDOMElement:e.sourceDOMElement,withRenderState:"storage"};this.container.get("settings").then(i=>{const{activate:r}=i;(typeof r>"u"||r===null||r===!0)&&(this.activated=(this.activated||this.widget.activate()).then(()=>this.attach(s)))})},this.container.registerAsync("storage",()=>Un(this.container)),this.container.registerFactory("settings",()=>S(this.container,Ft,m.Local).then((e={})=>({...this.container.get("$settings"),...e}))),bs(this,"load",this.handleBootstrapping),this.container.registerAsync("componentResolver",()=>zn(this.container)),this.container.registerAsync("actionResolver",()=>Hn(this.container)),this.container.register("matchMedia",window.matchMedia),this.container.registerAsync("components",()=>Bn(this.container))}initialize(){const t=this.container.getManyAsync("actionResolver","components"),e=this.container.get("csp");return e&&(window.webprovisionsEnvironmentVariables||(window.webprovisionsEnvironmentVariables={}),window.webprovisionsEnvironmentVariables.cspNonce=e.nonce),Promise.all([t,this.container.get("settings")]).then(([{actionResolver:s,components:i},r])=>(s.subscribe(this.widget.name,(h,c,l)=>this.onAction(c,l)),(h=>{i.nodes.query({type:"view"}).forEach(c=>{i.setSwitch(c,h)})})("index"),this.events.subscribe("widget:data-loaded",(h,{element:c})=>{this.widget.container.get("seoConfiguration")&&this.events.dispatch("widget:preloaded-replaced",{element:c})}),Promise.resolve()))}attach(t={}){return this.container.get("settings").then(async({trigger:e})=>{var u,p;const{widgetDOMElement:s,key:i=ot(),triggerDOMElement:r,withRenderState:o}=t,h=is(e)===V.Inline&&((r==null?void 0:r.childElementCount)||0)>0,c=await In(this.container,this.widget.name,s,r,e,h);this.outlets.size<1&&!o&&this.setRenderState("unset");const l=()=>{const v=()=>y.querySelectorAll("[data-loading=true]").length===0,[y]=this.widget.container.get("widgetDOMElements"),C=(Nt,_)=>{v()&&(c.callback&&c.callback(),_.disconnect())},ht={attributes:!0,subtree:!0,childList:!0};v()&&c.callback&&c.callback(),new MutationObserver(C).observe(y,ht)};h&&this.widget.container.getAsync("dataClient").then(({events:v})=>{v.subscribe("data-client:fetched",(y,C)=>{C.unresolvedQueries===0&&l()})});const d=this.getOrCreateViewOutlet(i,c);if(this.outlets.set(i,d),this.widget.events.dispatch("widget:attached",{},{bubbles:!0}),c.triggerType===V.Badge&&e&&((u=c.triggerDOMElement)==null||u.setAttribute("aria-expanded","false"),d==null||d.renderBadge(e)),c.triggerType!==V.Inline&&((p=c.triggerDOMElement)==null||p.addEventListener("click",v=>{v.preventDefault(),this.container.get("settings").then(({trigger:y})=>{d.render().then(()=>this.renderState()).then(C=>y&&y.action&&y.action==="hide"?C===$.open?this.hide():this.open():C===$.open?this.close():this.open())})})),this.outlets.size>1)return this.renderState().then(v=>{this.triggerStateIfApplicable(v)});if(o)return o==="storage"?this.renderState().then(v=>{if(c.triggerType===V.Inline){this.triggerStateIfApplicable("open");return}this.triggerStateIfApplicable(v)}):this.triggerStateIfApplicable(o)})}detach(t){if(t){if(this.outlets.has(t)){const e=this.outlets.get(t);e==null||e.dispose(),this.outlets.delete(t);return}process.env.NODE_ENV!=="production"&&console.warn(`detach(): Could not find View Outlet with key ${t}`);return}this.outlets.forEach(e=>{e.dispose()}),this.outlets.clear()}triggerStateIfApplicable(t){switch(t){case"closed":this.close();break;case"open":this.open();break;case"hidden":this.hide();break;default:return}}getOrCreateViewOutlet(t,e){return this.outlets.has(t)?this.outlets.get(t):new Tn(this.container,e)}render(t={}){if(process.env.NODE_ENV!=="production"&&console.warn("widget.render() is deprecated. Use widget.attach() instead."),t.open){const e={...t,withRenderState:"open"};return this.attach(e)}return this.attach(t)}activate(t){t!=null&&t.override&&this.setSettings(()=>t.override),t!=null&&t.apiNotificationPriorityBy&&this.container.register("apiNotificationPriorityBy",t.apiNotificationPriorityBy)}setSettings(t){return Promise.all([this.container.get("settings"),k(this.container,Ft,g.Necessary,{medium:m.Local})]).then(([e,s])=>Promise.resolve(t(e)).then(i=>s(i).then(()=>{const r={...e,...i};return this.widget.events.dispatch("widget:settings-updated",r),r})))}clearSettings(){return k(this.container,Ft,g.Necessary,{medium:m.Local}).then(t=>t()).then(()=>this.container.get("settings")).then(t=>{this.widget.events.dispatch("widget:settings-updated",t)})}action({action:t,value:e}){return this.container.getAsync("actionResolver").then(s=>{s.action(this.widget.name,t,e)})}renderState(){return(()=>S(this.container,Kt,m.Session).then((e=$.closed)=>e))()}hide(){return this.outlets.size<1?(process.env.NODE_ENV!=="production"&&console.warn("hide(): No-op as no view outlets are registered. Invoke the attach() command first."),Promise.resolve()):(this.outlets.forEach(t=>t.render()),this.action({action:"hide"}).then(()=>{this.setTriggerState(!1)}))}open(){return this.outlets.size<1?(process.env.NODE_ENV!=="production"&&console.warn("open(): No-op as no view outlets are registered. Invoke the attach() command first."),Promise.resolve()):(this.outlets.forEach(t=>t.render()),this.action({action:"open"}).then(()=>(this.widget.events.dispatch("tracking:widget-rendered",{}),this.onOpen())))}close(){return this.outlets.size<1?(process.env.NODE_ENV!=="production"&&console.warn("close(): No-op as no view outlets are registered. Invoke the attach() command first."),Promise.resolve()):this.action({action:"close"}).then(()=>this.onClose())}show(){return process.env.NODE_ENV!=="production"&&console.warn("show(): Command is deprecated and will be removed in the future. Use open() instead."),this.open()}onAction(t,e){switch(t){case"close":case"open":case"hide":const s=t==="open"?$.open:t==="close"?$.closed:$.hidden;return this.setRenderState(s).then(()=>{this.setTriggerState(s===$.open),s!==$.hidden?s===$.open?this.onOpen():this.onClose():this.outlets.forEach(i=>{var r;return(r=i.options.triggerDOMElement)==null?void 0:r.setAttribute("aria-expanded","false")})})}}setRenderState(t){const{invoke:e,events:s}=this.container.get("$widget");return Promise.all([k(this.container,Kt,g.Necessary,{medium:m.Session}),k(this.container,Kt,g.Necessary,{medium:m.Local,duration:{minutes:5}}),e("renderState")]).then(([i,r,o])=>{t==="unset"||!t?(r(),i()):i(t),s.dispatch("widget:render-state-changed",{previous:o,next:t})})}onOpen(){return this.outlets.forEach(t=>{var e;return(e=t.options.triggerDOMElement)==null?void 0:e.setAttribute("aria-expanded","true")}),Promise.resolve()}onClose(){const t=this.container.getManyAsync("components");return(()=>this.container.get("settings").then(s=>{const{activate:i}=this.container.get("$settings");return s.activate!==i?this.setSettings(()=>Promise.resolve({activate:i})):Promise.resolve()}))().then(()=>t).then(({components:s})=>{this.outlets.forEach(i=>{var r;return(r=i.options.triggerDOMElement)==null?void 0:r.setAttribute("aria-expanded","false")})})}setTriggerState(t){this.outlets.forEach(e=>{const{options:{triggerDOMElement:s,triggerOptions:i}}=e,{openTooltip:r,closedTooltip:o}=i||{};s&&(t?Ke(s,r):un(s,o))})}deactivate(){this.subs.forEach(e=>e());const t=[];return this.outlets.forEach(e=>t.push(e.dispose())),S(this.container,Me,m.Local).then(e=>e===this.widget.name?k(this.container,Me,g.Necessary,{medium:m.Local,scope:Q.Implementation}).then(s=>s()).then(()=>Promise.all(t)):Promise.all(t))}}/**
171
171
  * @license
172
172
  * Copyright 2021 Google LLC
173
173
  * SPDX-License-Identifier: BSD-3-Clause
@@ -191,7 +191,7 @@ ${o.map(a=>`${a.name||"<no name>"} (${a.id})
191
191
  * @license
192
192
  * Copyright 2022 Google LLC
193
193
  * SPDX-License-Identifier: BSD-3-Clause
194
- */function Kn({context:n,subscribe:t}){return kn({finisher:(e,s)=>{e.addInitializer(i=>{new qn(i,{context:n,callback:r=>{i[s]=r},subscribe:t})})}})}const os="children",as="descriptor",cs="container",hs="context",ls="layout",ds="properties";class us{constructor(t){(this.host=t).addController(this)}hostConnected(){}hostDisconnected(){}setDescriptor(t){this._descriptor=t}setContainer(t){this._container=t}async dispatch(t,e){if(!this._container||!this._descriptor)return;const s=await Z.getInstance(this._container),i=new Y(s).withId(this._descriptor.id);await s.actions(i,this._descriptor.type||ot()).dispatch(t,e)}}const Gn=async(n,t)=>{const e=n.properties().provider;let s={},i="";Array.isArray(e)?(i=e[0],s=e[1]):i=e||"";const r=await t.getAsync(i);if(!r)throw new Error("No provider defined in ListComponent");return r.applyComponentNodeSettings(n.node.id,s),{provider:r,settings:s}},Yn=async(n,t)=>{const{provider:e,settings:s={}}=await Gn(n,t);return{addResource:(i,r)=>e.addResource(i,r),getData:(i,r)=>e.getData(i,r,s)}};class ps{constructor(t){this.container=t,this.resources=new Map,this.nodeConfiguration=new Map}async getData(t,e,s){const i=this.resources.get(t);if(!i)throw new Error(`Unable to get EntityProvider for "${t}"`);return await i.query(e,s)}addResource(t,e){this.resources.set(t,e)}applyComponentNodeSettings(t,e){this.nodeConfiguration.set(t,e)}}const Ie=n=>({title:n.Title,id:n.Id.toString()});class Zn extends ps{constructor(t){super(t),this.addResource("item",{query:async(e,s)=>{const i=e.itemId,r="78aacc09-ae6f-5485-5ca3-9dacebb95825",o=t.get("$widget").name,a=s.projection||"",c=await(await fetch(`${a}/guides/${i}?client=${r}&funnel=${o}&site=%2F%2Fdemo.humany.cc%2Fadmin%2Finterfaces&phrase=&connectionId=&p.LastGuideId=2857`)).json();return c?Ie(c):null}}),this.addResource("items",{query:async(e,s)=>{const i="",r=t.get("$widget").name,o=s.projection||"",d=await(await fetch(`${o}/guides?client=${i}&funnel=${r}&site=&phrase=&skip=0&take=10&sorting.type=popularity&sorting.direction=descending`)).json();return{items:(d.Matches||[]).map(u=>Ie(u)),totalItems:(d==null?void 0:d.TotalMatches)||0}}})}}const Qn=async n=>{n.registerAsync("guideProvider",()=>new Zn(n))},Xn=(n,t,e,s,i)=>n.getAsync("componentResolver").then(r=>(r.registerComponent(t,e),We(n,t,s||(()=>{}),t,i))),ti=n=>{const t={};return Object.keys(n).forEach(e=>{e.indexOf("css-")>-1&&(t[e]=n[e])}),t},gs=(n,t)=>{const e=ti(t);Object.entries(e).forEach(([s,i])=>{n.style.setProperty(s.replace("css-",""),i)})};var ei=Object.defineProperty,si=Object.getOwnPropertyDescriptor,I=(n,t,e,s)=>{for(var i=s>1?void 0:s?si(t,e):t,r=n.length-1,o;r>=0;r--)(o=n[r])&&(i=(s?o(t,e,i):o(i))||i);return s&&i&&ei(t,e,i),i};const ni=n=>{class t extends n{constructor(){super(...arguments),this.entry="",this._descriptorProvider=new W(this,as,void 0),this._childrenProvider=new W(this,os,[]),this._propertiesProvider=new W(this,ds,{}),this._contextProvider=new W(this,hs,{}),this._layoutProvider=new W(this,ls,{}),this.actions=new us(this),this.context={},this.layout={},this.properties={}}connectedCallback(){super.connectedCallback(),this.container&&(this.actions.setContainer(this.container),Z.getInstance(this.container).then(async s=>{var r;const i=s.nodes.get(this.entry);if(i){this._propertyChangeListener=s.events.subscribe("components:properties-changed",(l,d)=>{i.id===d.node.id&&this._setProperties(d.node.attributes.properties)}),this._contextChangeListener=s.events.subscribe("components:context-changed",(l,d)=>{i.id===d.node.id&&this._setContext(d.node.attributes.context)}),this._layoutChangeListener=s.events.subscribe("components:layout-changed",(l,d)=>{i.id===d.node.id&&this._setLayout(d.node.attributes.layout)});const o="default";this._unmountNode=i.mount(this.container),this._setDescriptor(Yt(i,o)),this._setProperties(i.attributes.properties),this._setContext(i.attributes.context),this._setLayout(this.layout);const a=i.getChildren(o).map(l=>Yt(l));this._childrenProvider.setValue(a);const c=(await this.container.getAsync("componentResolver")).getComponent(((r=this.descriptor)==null?void 0:r.type)||"");c.then&&c.then(l=>{this.component=l.default})}}))}disconnectedCallback(){super.disconnectedCallback(),this._propertyChangeListener&&this._propertyChangeListener(),this._contextChangeListener&&this._contextChangeListener(),this._layoutChangeListener&&this._layoutChangeListener(),this._unmountNode&&this._unmountNode()}updated(){this.container&&this.actions.setContainer(this.container),he(this.context,this.renderRoot.host),this.renderRoot.host.style.setProperty("--width",this.layout.size==="full"?"var(--columns, 1)":`min(${this.layout.size||"var(--columns)"}, var(--columns))`),gs(this.renderRoot.host,this.properties)}_setProperties(s){this._propertiesProvider.setValue(s),this.properties=s}_setContext(s){this._contextProvider.setValue(s),this.context=s}_setLayout(s){this._layoutProvider.setValue(s),this.layout=s}_setDescriptor(s){this.descriptor=s,this._descriptorProvider.setValue(s),this.actions.setDescriptor(s)}}return t.styles=[n.styles??[],ce`
194
+ */function Kn({context:n,subscribe:t}){return kn({finisher:(e,s)=>{e.addInitializer(i=>{new qn(i,{context:n,callback:r=>{i[s]=r},subscribe:t})})}})}const os="children",as="descriptor",cs="container",hs="context",ls="layout",ds="properties";class us{constructor(t){(this.host=t).addController(this)}hostConnected(){}hostDisconnected(){}setDescriptor(t){this._descriptor=t}setContainer(t){this._container=t}async dispatch(t,e){if(!this._container||!this._descriptor)return;const s=await Z.getInstance(this._container),i=new Y(s).withId(this._descriptor.id);await s.actions(i,this._descriptor.type||ot()).dispatch(t,e)}}const Gn=async(n,t)=>{const e=n.properties().provider;let s={},i="";Array.isArray(e)?(i=e[0],s=e[1]):i=e||"";const r=await t.getAsync(i);if(!r)throw new Error("No provider defined in ListComponent");return r.applyComponentNodeSettings(n.node.id,s),{provider:r,settings:s}},Yn=async(n,t)=>{const{provider:e,settings:s={}}=await Gn(n,t);return{addResource:(i,r)=>e.addResource(i,r),getData:(i,r)=>e.getData(i,r,s)}};class ps{constructor(t){this.container=t,this.resources=new Map,this.nodeConfiguration=new Map}async getData(t,e,s){const i=this.resources.get(t);if(!i)throw new Error(`Unable to get EntityProvider for "${t}"`);return await i.query(e,s)}addResource(t,e){this.resources.set(t,e)}applyComponentNodeSettings(t,e){this.nodeConfiguration.set(t,e)}}const Ie=n=>({title:n.Title,id:n.Id.toString()});class Zn extends ps{constructor(t){super(t),this.addResource("item",{query:async(e,s)=>{const i=e.itemId,r="78aacc09-ae6f-5485-5ca3-9dacebb95825",o=t.get("$widget").name,a=s.projection||"",c=await(await fetch(`${a}/guides/${i}?client=${r}&funnel=${o}&site=%2F%2Fdemo.humany.cc%2Fadmin%2Finterfaces&phrase=&connectionId=&p.LastGuideId=2857`)).json();return c?Ie(c):null}}),this.addResource("items",{query:async(e,s)=>{const i="",r=t.get("$widget").name,o=s.projection||"",d=await(await fetch(`${o}/guides?client=${i}&funnel=${r}&site=&phrase=&skip=0&take=10&sorting.type=popularity&sorting.direction=descending`)).json();return{items:(d.Matches||[]).map(u=>Ie(u)),totalItems:(d==null?void 0:d.TotalMatches)||0}}})}}const Qn=async n=>{n.registerAsync("guideProvider",()=>new Zn(n))},Xn=(n,t,e,s,i)=>n.getAsync("componentResolver").then(r=>(r.registerComponent(t,e),We(n,t,s||(()=>{}),t,i))),ti=n=>{const t={};return Object.keys(n).forEach(e=>{e.indexOf("css-")>-1&&(t[e]=n[e])}),t},gs=(n,t)=>{const e=ti(t);Object.entries(e).forEach(([s,i])=>{n.style.setProperty(s.replace("css-",""),i)})};var ei=Object.defineProperty,si=Object.getOwnPropertyDescriptor,I=(n,t,e,s)=>{for(var i=s>1?void 0:s?si(t,e):t,r=n.length-1,o;r>=0;r--)(o=n[r])&&(i=(s?o(t,e,i):o(i))||i);return s&&i&&ei(t,e,i),i};const ni=n=>{class t extends n{constructor(){super(...arguments),this.entry="",this._descriptorProvider=new W(this,as,void 0),this._childrenProvider=new W(this,os,[]),this._propertiesProvider=new W(this,ds,{}),this._contextProvider=new W(this,hs,{}),this._layoutProvider=new W(this,ls,{}),this.actions=new us(this),this.context={},this.layout={},this.properties={}}connectedCallback(){super.connectedCallback(),this.container&&(this.actions.setContainer(this.container),Z.getInstance(this.container).then(async s=>{var r,o;const i=s.nodes.get(this.entry);if(i){this._propertyChangeListener=s.events.subscribe("components:properties-changed",(d,u)=>{i.id===u.node.id&&this._setProperties(u.node.attributes.properties)}),this._contextChangeListener=s.events.subscribe("components:context-changed",(d,u)=>{i.id===u.node.id&&this._setContext(u.node.attributes.context)}),this._layoutChangeListener=s.events.subscribe("components:layout-changed",(d,u)=>{i.id===u.node.id&&this._setLayout(u.node.attributes.layout)});const a="default";this._unmountNode=i.mount(this.container),this._setDescriptor(Yt(i,a)),this._setProperties(i.attributes.properties),this._setContext(i.attributes.context),this._setLayout(this.layout);const h=i.getChildren(a).map(d=>Yt(d));this._childrenProvider.setValue(h);const c=await this.container.getAsync("componentResolver");if(((r=this.descriptor)==null?void 0:r.type)==="area")return;const l=c.getComponent(((o=this.descriptor)==null?void 0:o.type)||"");l.then&&l.then(d=>{this.component=d.default})}}))}disconnectedCallback(){super.disconnectedCallback(),this._propertyChangeListener&&this._propertyChangeListener(),this._contextChangeListener&&this._contextChangeListener(),this._layoutChangeListener&&this._layoutChangeListener(),this._unmountNode&&this._unmountNode()}updated(){this.container&&this.actions.setContainer(this.container),he(this.context,this.renderRoot.host),this.renderRoot.host.style.setProperty("--width",this.layout.size==="full"?"var(--columns, 1)":`min(${this.layout.size||"var(--columns)"}, var(--columns))`),gs(this.renderRoot.host,this.properties)}_setProperties(s){this._propertiesProvider.setValue(s),this.properties=s}_setContext(s){this._contextProvider.setValue(s),this.context=s}_setLayout(s){this._layoutProvider.setValue(s),this.layout=s}_setDescriptor(s){this.descriptor=s,this._descriptorProvider.setValue(s),this.actions.setDescriptor(s)}}return t.styles=[n.styles??[],ce`
195
195
  :host {
196
196
  font-family: var(--font-family);
197
197
  grid-column: span var(--width);
@@ -2586,7 +2586,7 @@ class Sn {
2586
2586
  */
2587
2587
  render() {
2588
2588
  const { widgetDOMElement: t, triggerDOMElement: e } = this.options, s = this.container.get("$widget");
2589
- return t.getAttribute("data-rendered") === "true" ? Promise.resolve() : (e && this.options.triggerType === j.Badge && tn(e), import("./render-97531710.mjs").then((i) => i.default(this.container, t)).then(() => {
2589
+ return t.getAttribute("data-rendered") === "true" ? Promise.resolve() : (e && this.options.triggerType === j.Badge && tn(e), import("./render-307eb8fa.mjs").then((i) => i.default(this.container, t)).then(() => {
2590
2590
  if (t.setAttribute("data-rendered", "true"), e && this.options.triggerType === j.Badge) {
2591
2591
  const r = this.options.triggerOptions.openTooltip;
2592
2592
  Je(e, r);
@@ -3285,34 +3285,37 @@ const yi = (n) => {
3285
3285
  connectedCallback() {
3286
3286
  super.connectedCallback(), this.container && (this.actions.setContainer(this.container), rt.getInstance(this.container).then(
3287
3287
  async (s) => {
3288
- var r;
3288
+ var r, o;
3289
3289
  const i = s.nodes.get(this.entry);
3290
3290
  if (i) {
3291
3291
  this._propertyChangeListener = s.events.subscribe(
3292
3292
  "components:properties-changed",
3293
- (l, d) => {
3294
- i.id === d.node.id && this._setProperties(d.node.attributes.properties);
3293
+ (d, u) => {
3294
+ i.id === u.node.id && this._setProperties(u.node.attributes.properties);
3295
3295
  }
3296
3296
  ), this._contextChangeListener = s.events.subscribe(
3297
3297
  "components:context-changed",
3298
- (l, d) => {
3299
- i.id === d.node.id && this._setContext(d.node.attributes.context);
3298
+ (d, u) => {
3299
+ i.id === u.node.id && this._setContext(u.node.attributes.context);
3300
3300
  }
3301
3301
  ), this._layoutChangeListener = s.events.subscribe(
3302
3302
  "components:layout-changed",
3303
- (l, d) => {
3304
- i.id === d.node.id && this._setLayout(d.node.attributes.layout);
3303
+ (d, u) => {
3304
+ i.id === u.node.id && this._setLayout(u.node.attributes.layout);
3305
3305
  }
3306
3306
  );
3307
- const o = "default";
3308
- this._unmountNode = i.mount(this.container), this._setDescriptor(Yt(i, o)), this._setProperties(i.attributes.properties), this._setContext(i.attributes.context), this._setLayout(this.layout);
3309
- const a = i.getChildren(o).map((l) => Yt(l));
3310
- this._childrenProvider.setValue(a);
3311
- const c = (await this.container.getAsync("componentResolver")).getComponent(
3312
- ((r = this.descriptor) == null ? void 0 : r.type) || ""
3307
+ const a = "default";
3308
+ this._unmountNode = i.mount(this.container), this._setDescriptor(Yt(i, a)), this._setProperties(i.attributes.properties), this._setContext(i.attributes.context), this._setLayout(this.layout);
3309
+ const h = i.getChildren(a).map((d) => Yt(d));
3310
+ this._childrenProvider.setValue(h);
3311
+ const c = await this.container.getAsync("componentResolver");
3312
+ if (((r = this.descriptor) == null ? void 0 : r.type) === "area")
3313
+ return;
3314
+ const l = c.getComponent(
3315
+ ((o = this.descriptor) == null ? void 0 : o.type) || ""
3313
3316
  );
3314
- c.then && c.then((l) => {
3315
- this.component = l.default;
3317
+ l.then && l.then((d) => {
3318
+ this.component = d.default;
3316
3319
  });
3317
3320
  }
3318
3321
  }
package/index.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index-5315aa1b.js");exports.ActionsController=t.ActionsController;exports.DataProvider=t.DataProvider;exports.GridWidget=t.Widget;exports.GuideProviderPlugin=t.GuideProviderPlugin;exports.Widget=t.Widget;exports.WidgetComponent=t.WidgetComponent;exports.childrenContext=t.childrenContext;exports.containerContext=t.containerContext;exports.contextCtx=t.contextCtx;exports.createDataProvider=t.createDataProvider;exports.createWebComponent=t.createLitComponent;exports.descriptorContext=t.descriptorContext;exports.layoutCtx=t.layoutCtx;exports.propertiesCtx=t.propertiesCtx;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index-38ca4109.js");exports.ActionsController=t.ActionsController;exports.DataProvider=t.DataProvider;exports.GridWidget=t.Widget;exports.GuideProviderPlugin=t.GuideProviderPlugin;exports.Widget=t.Widget;exports.WidgetComponent=t.WidgetComponent;exports.childrenContext=t.childrenContext;exports.containerContext=t.containerContext;exports.contextCtx=t.contextCtx;exports.createDataProvider=t.createDataProvider;exports.createWebComponent=t.createLitComponent;exports.descriptorContext=t.descriptorContext;exports.layoutCtx=t.layoutCtx;exports.propertiesCtx=t.propertiesCtx;
package/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { r as a, D as o, h as r, G as s, h as i, W as n, j as d, c as C, l as c, u as x, v as l, k as p, o as W, q as g } from "./index-2bcfc969.mjs";
1
+ import { r as a, D as o, h as r, G as s, h as i, W as n, j as d, c as C, l as c, u as x, v as l, k as p, o as W, q as g } from "./index-ba9118b4.mjs";
2
2
  export {
3
3
  a as ActionsController,
4
4
  o as DataProvider,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@telia-ace/widget-runtime-flamingo",
3
- "version": "1.0.45",
3
+ "version": "1.0.47",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org"
6
6
  },
@@ -1,4 +1,4 @@
1
- import { i as L, t as D, e as A, A as y, s as P, a as Y, c as M, p as T, m as f, x as v, b as R, n as j, d as u, T as w, W as z, f as E, g as N } from "./index-2bcfc969.mjs";
1
+ import { i as L, t as D, e as A, A as y, s as P, a as Y, c as M, p as T, m as f, x as v, b as R, n as j, d as u, T as w, W as z, f as E, g as N } from "./index-ba9118b4.mjs";
2
2
  /**
3
3
  * @license
4
4
  * Copyright 2017 Google LLC
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index-5315aa1b.js");/**
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index-38ca4109.js");/**
2
2
  * @license
3
3
  * Copyright 2017 Google LLC
4
4
  * SPDX-License-Identifier: BSD-3-Clause
package/widget.d.ts CHANGED
@@ -33,7 +33,7 @@ export default class Widget extends WidgetType {
33
33
  private triggerStateIfApplicable;
34
34
  private getOrCreateViewOutlet;
35
35
  render(renderData?: RenderData): any;
36
- activate(data?: any): void;
36
+ activate(data?: Record<string, any>): void;
37
37
  setSettings(fn: (settings: WidgetSettings) => Promise<Partial<WidgetSettings>>): Promise<WidgetSettings>;
38
38
  clearSettings(): Promise<void>;
39
39
  action({ action, value }: {