@genesislcap/design-system-configurator 14.91.1 → 14.91.2
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/dist/{361.361.4e9771042126415e07de.js → 361.361.7c4b2248b855ae776194.js} +1 -1
- package/dist/{371.371.2068921518f9bf952478.js → 371.371.1150e2714e6435104148.js} +1 -1
- package/dist/{688.688.41facdf3eadfadaff4bc.js → 688.688.4ff7e10dacceb9fefb32.js} +1 -1
- package/dist/{701.701.cb21814fa3617d74d904.js → 701.701.9dbcfd1a6093741cb743.js} +17 -13
- package/dist/701.9441216759582277e759ec38c7309f8c.js.map +1 -0
- package/dist/{721.721.db9b5d669ca3d8c237bc.js → 721.721.275ba7fe10b9f31eba02.js} +12 -8
- package/dist/721.be673afde63f2affba52eea17391baa5.js.map +1 -0
- package/dist/{755.3286f535f2f194a1cf0e810fede2ea5a.js.map → 755.0d64f062b3b634cd118d384847e796ca.js.map} +1 -1
- package/dist/755.755.9ac7e27bcde90cf64c6e.js +2 -0
- package/dist/designSystemConfigurator.6a5e592e13d1610fa1caae26f34e1b71.js.map +1 -0
- package/dist/index.html +1 -1
- package/dist/main.4976af57e790c9ddb91709bce912566c.js.map +1 -0
- package/dist/main.ed9710b8be851e473935.js +2 -0
- package/dist/remoteEntry.js +2 -2
- package/package.json +7 -7
- package/dist/701.5c3a1f0a2c61109fd5118b6651c68349.js.map +0 -1
- package/dist/721.00f1b60beffdbd967c24a9b88301d5ce.js.map +0 -1
- package/dist/755.755.fa468392fc193ad22da9.js +0 -2
- package/dist/designSystemConfigurator.7cf27d1f335fb2779599f83670903357.js.map +0 -1
- package/dist/main.780723c7148e2ec2be776465420f069f.js.map +0 -1
- package/dist/main.d1f894f7c657845fdd98.js +0 -2
|
@@ -715,16 +715,18 @@
|
|
|
715
715
|
</div>
|
|
716
716
|
`,ti=l.html`
|
|
717
717
|
${e=>ei(ze(e))}
|
|
718
|
-
`;class oi extends n.FoundationElement{constructor(){super(...arguments),this.autoClose=!0,this.disabled=!1,this.name="Dropdown Menu",this.open=!1,this.clickOutside=e=>this.handleClickOutside(e)}connectedCallback(){super.connectedCallback(),this.addEventListener("onMenuClick",this.onDropdownMenuItemClick)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("mousedown",this.clickOutside)}handleClickOutside(e){Be(e,this)&&(this.open=!1)}openChanged(){this.classNames=(0,x.A)(["hidden",!this.open]),this.open?document.addEventListener("mousedown",this.clickOutside):document.removeEventListener("mousedown",this.clickOutside)}toggleDropdownMenuVisibility(){this.open=!this.open}onDropdownMenuItemClick(){this.autoClose&&(this.open=!1)}get allItems(){return this.items}}(0,w.__decorate)([l.observable],oi.prototype,"items",void 0),(0,w.__decorate)([(0,l.attr)({attribute:"auto-close",mode:"boolean"})],oi.prototype,"autoClose",void 0),(0,w.__decorate)([(0,l.attr)({attribute:"disable-button",mode:"boolean"})],oi.prototype,"disabled",void 0),(0,w.__decorate)([l.observable],oi.prototype,"classNames",void 0),(0,w.__decorate)([l.attr],oi.prototype,"name",void 0),(0,w.__decorate)([(0,l.attr)({attribute:"open",mode:"boolean"})],oi.prototype,"open",void 0),(0,w.__decorate)([l.attr],oi.prototype,"buttonAppearance",void 0);const ii=oi.compose({baseName:"dropdown-menu",styles:Qo,template:ti});var ai=o(
|
|
718
|
+
`;class oi extends n.FoundationElement{constructor(){super(...arguments),this.autoClose=!0,this.disabled=!1,this.name="Dropdown Menu",this.open=!1,this.clickOutside=e=>this.handleClickOutside(e)}connectedCallback(){super.connectedCallback(),this.addEventListener("onMenuClick",this.onDropdownMenuItemClick)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("mousedown",this.clickOutside)}handleClickOutside(e){Be(e,this)&&(this.open=!1)}openChanged(){this.classNames=(0,x.A)(["hidden",!this.open]),this.open?document.addEventListener("mousedown",this.clickOutside):document.removeEventListener("mousedown",this.clickOutside)}toggleDropdownMenuVisibility(){this.open=!this.open}onDropdownMenuItemClick(){this.autoClose&&(this.open=!1)}get allItems(){return this.items}}(0,w.__decorate)([l.observable],oi.prototype,"items",void 0),(0,w.__decorate)([(0,l.attr)({attribute:"auto-close",mode:"boolean"})],oi.prototype,"autoClose",void 0),(0,w.__decorate)([(0,l.attr)({attribute:"disable-button",mode:"boolean"})],oi.prototype,"disabled",void 0),(0,w.__decorate)([l.observable],oi.prototype,"classNames",void 0),(0,w.__decorate)([l.attr],oi.prototype,"name",void 0),(0,w.__decorate)([(0,l.attr)({attribute:"open",mode:"boolean"})],oi.prototype,"open",void 0),(0,w.__decorate)([l.attr],oi.prototype,"buttonAppearance",void 0);const ii=oi.compose({baseName:"dropdown-menu",styles:Qo,template:ti});var ai=o(99046);const ni=(0,ai.createLogger)("foundation-ui"),si=l.html`
|
|
719
719
|
<foundation-banner ${(0,l.ref)("banner")}>
|
|
720
720
|
<div slot="content">
|
|
721
|
-
<div
|
|
721
|
+
<div>
|
|
722
|
+
${e=>{var t,o;return(null===(t=e.error)||void 0===t?void 0:t.errorDetails)||(null===(o=e.notification)||void 0===o?void 0:o.body)||"Place holder for error message"}}
|
|
723
|
+
</div>
|
|
722
724
|
</div>
|
|
723
725
|
|
|
724
726
|
<foundation-button slot="action" appearance="lightweight" @click=${e=>{var t;return null===(t=e.banner)||void 0===t?void 0:t.dismiss()}}>
|
|
725
|
-
${e=>{var t,o,i,a;return(null===(a=null===(i=null===(o=null===(t=e.error)||void 0===t?void 0:t.config)||void 0===o?void 0:o.banner)||void 0===i?void 0:i.dismissingAction)||void 0===a?void 0:a.label)||"Ignore"}}
|
|
727
|
+
${e=>{var t,o,i,a,n,s,l,r;return(null===(a=null===(i=null===(o=null===(t=e.error)||void 0===t?void 0:t.config)||void 0===o?void 0:o.banner)||void 0===i?void 0:i.dismissingAction)||void 0===a?void 0:a.label)||(null===(r=null===(l=null===(s=null===(n=e.notification)||void 0===n?void 0:n.config)||void 0===s?void 0:s.banner)||void 0===l?void 0:l.dismissingAction)||void 0===r?void 0:r.label)||"Ignore"}}
|
|
726
728
|
</foundation-button>
|
|
727
|
-
${(0,l.repeat)((e=>{var t,o;return
|
|
729
|
+
${(0,l.repeat)((e=>{var t,o,i,a;return(null===(o=null===(t=e.error)||void 0===t?void 0:t.config)||void 0===o?void 0:o.banner.confirmingActions)||(null===(a=null===(i=e.notification)||void 0===i?void 0:i.config)||void 0===a?void 0:a.banner.confirmingActions)}),l.html`
|
|
728
730
|
<foundation-button
|
|
729
731
|
slot="action"
|
|
730
732
|
appearance="lightweight"
|
|
@@ -734,7 +736,7 @@
|
|
|
734
736
|
</foundation-button>
|
|
735
737
|
`)}
|
|
736
738
|
</foundation-banner>
|
|
737
|
-
`,li={mode:"open",delegatesFocus:!0};class ri extends n.FoundationElement{connectedCallback(){super.connectedCallback()}dismiss(){return(0,w.__awaiter)(this,void 0,void 0,(function*(){try{yield this.banner.dismiss(),this.remove()}catch(e){ni.error(e)}}))}}(0,w.__decorate)([l.observable],ri.prototype,"error",void 0);const di=ri.compose({baseName:"error-banner",template:si,shadowOptions:li});var ci,ui=o(6852);!function(e){e.ERROR_BOUNDARY_EVENT="error-boundary-event"}(ci||(ci={}));const pi=e=>{var t,o;return`${null!==(t=null==e?void 0:e.title)&&void 0!==t?t:"Error"}: ${null!==(o=null==e?void 0:e.errorDetails)&&void 0!==o?o:"Something went wrong"}`},hi=(e,t)=>{const o=t.split("-")[0];let i=document.querySelector(`#${e}`);if(!i){i=document.createElement("div"),i.setAttribute("id",e);const t=document.createElement(`${o}-design-system-provider`);t.appendChild(i),document.body.appendChild(t)}return i},mi=()=>{const e=document.createElement("div");return e.setAttribute("id","error-banner-anchor"),e.style.position="relative",document.body.insertBefore(e,document.body.firstChild),e},vi=(e,t)=>{var o,i,a,n,s,l,r,d,c,u,p,h,m;const v=t.split("-")[0],g=hi("notify-container",t);if(g)switch(g.style.position="fixed",null===(i=null===(o=null==e?void 0:e.config)||void 0===o?void 0:o.notification)||void 0===i?void 0:i.position){case"top-left":g.style.top="0",g.style.left="0";break;case"bottom-left":g.style.bottom="0",g.style.left="0";break;case"bottom-right":g.style.bottom="0",g.style.right="0";break;default:g.style.top="0",g.style.right="0"}const f=document.createElement(`${v}-toast`),b=document.createElement("div");b.setAttribute("slot","top"),b.textContent=null!==(a=e.title)&&void 0!==a?a:"Error";const y=document.createElement("div");y.setAttribute("slot","content"),y.textContent=(null==e?void 0:e.errorDetails)||"";const w=document.createElement("div");w.setAttribute("slot","date"),w.textContent=(new Date).toLocaleTimeString(),f.setAttribute("notify",(null===(s=null===(n=null==e?void 0:e.config)||void 0===n?void 0:n.notification)||void 0===s?void 0:s.type)||""),(null===(r=null===(l=null==e?void 0:e.config)||void 0===l?void 0:l.notification)||void 0===r?void 0:r.autoClose)&&f.setAttribute("auto-close",`${null===(c=null===(d=null==e?void 0:e.config)||void 0===d?void 0:d.notification)||void 0===c?void 0:c.autoClose}`),(null===(p=null===(u=null==e?void 0:e.config)||void 0===u?void 0:u.notification)||void 0===p?void 0:p.closeTimeout)&&f.setAttribute("close-timeout",`${null===(m=null===(h=null==e?void 0:e.config)||void 0===h?void 0:h.notification)||void 0===m?void 0:m.closeTimeout}`),f.appendChild(b),f.appendChild(y),f.appendChild(w),g.appendChild(f)},gi=(0,ai.createLogger)("foundation-error"),fi={alert:e=>{alert(pi(e))},notification:vi,dialog:(e,t)=>{const o=t.split("-")[0],i=document.createElement(`${o}-error-dialog`);hi("dialog-container",t).appendChild(i),i.error=e,i.show()},snackbar:(e,t)=>{const o=t.split("-")[0],i=document.createElement(`${o}-snackbar`);hi("snack-container",t).appendChild(i),i.error=e},banner:(e,t,o)=>{var i;const a=t.split("-")[0],n=document.createElement(`${a}-error-banner`),s=(e=>{for(var t,o;e&&!(e instanceof ShadowRoot);){const i=null===(t=null==e?void 0:e.getRootNode())||void 0===t?void 0:t.getElementById("error-banner-anchor");if(i)return i.style.position="relative",i;e=null===(o=null==e?void 0:e.getRootNode())||void 0===o?void 0:o.host}return mi()})(o);(null===(i=null==s?void 0:s.children)||void 0===i?void 0:i.length)>0&&(n.style.position="absolute",n.style.top="0",n.style.left="0",n.style.width="100%"),s.appendChild(n),n.error=e}},bi=(e,t,o)=>{var i,a;gi.log({message:pi(e),level:(i=e,(null==i?void 0:i.logLevel)||(null===(a=null==i?void 0:i.config)||void 0===a?void 0:a.logLevel)||ai.LogLevel.Error)});Object.keys((null==e?void 0:e.config)||{}).forEach((i=>{fi[i]&&fi[i](e,t,o)}))};class yi{withTitle(e){return this.title=e,this}withErrorDetails(e){return this.errorDetails=e,this}withLogLevel(e){return this.logLevel=e,this}withAlert(e){return this.alert=e,this}withNotification(e){return this.notification=e,this}withBanner(e){return this.banner=e,this}withSnackbar(e){return this.snackbar=e,this}withDialog(e){return this.dialog=e,this}build(){if(!this.title)throw new Error("Title is required");if(!this.errorDetails)throw new Error("Missing required param 'errorDetails'");let e={title:this.title,errorDetails:this.errorDetails},t={};return this.logLevel in ai.LogLevel&&(e=Object.assign({logLevel:this.logLevel},e)),this.alert&&(t=Object.assign({alert:this.alert},t),e=Object.assign({config:t},e)),this.notification&&(t=Object.assign({notification:this.notification},t),e=Object.assign({config:t},e)),this.banner&&(t=Object.assign({banner:this.banner},t),e=Object.assign({config:t},e)),this.snackbar&&(t=Object.assign({snackbar:this.snackbar},t),e=Object.assign({config:t},e)),this.dialog&&(t=Object.assign({dialog:this.dialog},t),e=Object.assign({config:t},e)),e}}const wi=()=>new yi;class xi{withPosition(e){return this.position=e,this}withAutoClose(e){return this.autoClose=e,this}withCloseTimeout(e){return this.closeTimeout=e,this}withType(e){return this.type=e,this}build(){let e={};return this.position&&(e=Object.assign({position:this.position},e)),this.autoClose&&(e=Object.assign({autoClose:this.autoClose},e)),this.closeTimeout&&(e=Object.assign({closeTimeout:this.closeTimeout},e)),this.type&&(e=Object.assign({type:this.type},e)),e}}const Fi=l.html`
|
|
739
|
+
`,li={mode:"open",delegatesFocus:!0};class ri extends n.FoundationElement{connectedCallback(){super.connectedCallback()}dismiss(){return(0,w.__awaiter)(this,void 0,void 0,(function*(){try{yield this.banner.dismiss(),this.remove()}catch(e){ni.error(e)}}))}}(0,w.__decorate)([l.observable],ri.prototype,"error",void 0),(0,w.__decorate)([l.observable],ri.prototype,"notification",void 0);const di=ri.compose({baseName:"error-banner",template:si,shadowOptions:li});var ci,ui=o(6852);!function(e){e.ERROR_BOUNDARY_EVENT="error-boundary-event"}(ci||(ci={}));const pi=e=>{var t,o;return`${null!==(t=null==e?void 0:e.title)&&void 0!==t?t:"Error"}: ${null!==(o=null==e?void 0:e.errorDetails)&&void 0!==o?o:"Something went wrong"}`},hi=(e,t)=>{const o=t.split("-")[0];let i=document.querySelector(`#${e}`);if(!i){i=document.createElement("div"),i.setAttribute("id",e);const t=document.createElement(`${o}-design-system-provider`);t.appendChild(i),document.body.appendChild(t)}return i},mi=()=>{const e=document.createElement("div");return e.setAttribute("id","error-banner-anchor"),e.style.position="relative",document.body.insertBefore(e,document.body.firstChild),e},vi=(e,t)=>{var o,i,a,n,s,l,r,d,c,u,p,h,m;const v=t.split("-")[0],g=hi("notify-container",t);if(g)switch(g.style.position="fixed",null===(i=null===(o=null==e?void 0:e.config)||void 0===o?void 0:o.notification)||void 0===i?void 0:i.position){case"top-left":g.style.top="0",g.style.left="0";break;case"bottom-left":g.style.bottom="0",g.style.left="0";break;case"bottom-right":g.style.bottom="0",g.style.right="0";break;default:g.style.top="0",g.style.right="0"}const f=document.createElement(`${v}-toast`),b=document.createElement("div");b.setAttribute("slot","top"),b.textContent=null!==(a=e.title)&&void 0!==a?a:"Error";const y=document.createElement("div");y.setAttribute("slot","content"),y.textContent=(null==e?void 0:e.errorDetails)||"";const w=document.createElement("div");w.setAttribute("slot","date"),w.textContent=(new Date).toLocaleTimeString(),f.setAttribute("notify",(null===(s=null===(n=null==e?void 0:e.config)||void 0===n?void 0:n.notification)||void 0===s?void 0:s.type)||""),(null===(r=null===(l=null==e?void 0:e.config)||void 0===l?void 0:l.notification)||void 0===r?void 0:r.autoClose)&&f.setAttribute("auto-close",`${null===(c=null===(d=null==e?void 0:e.config)||void 0===d?void 0:d.notification)||void 0===c?void 0:c.autoClose}`),(null===(p=null===(u=null==e?void 0:e.config)||void 0===u?void 0:u.notification)||void 0===p?void 0:p.closeTimeout)&&f.setAttribute("close-timeout",`${null===(m=null===(h=null==e?void 0:e.config)||void 0===h?void 0:h.notification)||void 0===m?void 0:m.closeTimeout}`),f.appendChild(b),f.appendChild(y),f.appendChild(w),g.appendChild(f)},gi=(0,ai.createLogger)("foundation-error"),fi={alert:e=>{alert(pi(e))},notification:vi,dialog:(e,t)=>{const o=t.split("-")[0],i=document.createElement(`${o}-error-dialog`);hi("dialog-container",t).appendChild(i),i.error=e,i.show()},snackbar:(e,t)=>{const o=t.split("-")[0],i=document.createElement(`${o}-snackbar`);hi("snack-container",t).appendChild(i),i.error=e},banner:(e,t,o)=>{var i;const a=t.split("-")[0],n=document.createElement(`${a}-error-banner`),s=(e=>{for(var t,o;e&&!(e instanceof ShadowRoot);){const i=null===(t=null==e?void 0:e.getRootNode())||void 0===t?void 0:t.getElementById("error-banner-anchor");if(i)return i.style.position="relative",i;e=null===(o=null==e?void 0:e.getRootNode())||void 0===o?void 0:o.host}return mi()})(o);(null===(i=null==s?void 0:s.children)||void 0===i?void 0:i.length)>0&&(n.style.position="absolute",n.style.top="0",n.style.left="0",n.style.width="100%"),s.appendChild(n),n.error=e}},bi=(e,t,o)=>{var i,a;gi.log({message:pi(e),level:(i=e,(null==i?void 0:i.logLevel)||(null===(a=null==i?void 0:i.config)||void 0===a?void 0:a.logLevel)||ai.LogLevel.Error)});Object.keys((null==e?void 0:e.config)||{}).forEach((i=>{fi[i]&&fi[i](e,t,o)}))};class yi{withTitle(e){return this.title=e,this}withErrorDetails(e){return this.errorDetails=e,this}withLogLevel(e){return this.logLevel=e,this}withAlert(e){return this.alert=e,this}withNotification(e){return this.notification=e,this}withBanner(e){return this.banner=e,this}withSnackbar(e){return this.snackbar=e,this}withDialog(e){return this.dialog=e,this}build(){if(!this.title)throw new Error("Title is required");if(!this.errorDetails)throw new Error("Missing required param 'errorDetails'");let e={title:this.title,errorDetails:this.errorDetails},t={};return this.logLevel in ai.LogLevel&&(e=Object.assign({logLevel:this.logLevel},e)),this.alert&&(t=Object.assign({alert:this.alert},t),e=Object.assign({config:t},e)),this.notification&&(t=Object.assign({notification:this.notification},t),e=Object.assign({config:t},e)),this.banner&&(t=Object.assign({banner:this.banner},t),e=Object.assign({config:t},e)),this.snackbar&&(t=Object.assign({snackbar:this.snackbar},t),e=Object.assign({config:t},e)),this.dialog&&(t=Object.assign({dialog:this.dialog},t),e=Object.assign({config:t},e)),e}}const wi=()=>new yi;class xi{withPosition(e){return this.position=e,this}withAutoClose(e){return this.autoClose=e,this}withCloseTimeout(e){return this.closeTimeout=e,this}withType(e){return this.type=e,this}build(){let e={};return this.position&&(e=Object.assign({position:this.position},e)),this.autoClose&&(e=Object.assign({autoClose:this.autoClose},e)),this.closeTimeout&&(e=Object.assign({closeTimeout:this.closeTimeout},e)),this.type&&(e=Object.assign({type:this.type},e)),e}}const Fi=l.html`
|
|
738
740
|
<template ${(0,l.ref)("errorBoundary")}>
|
|
739
741
|
<slot></slot>
|
|
740
742
|
</template>
|
|
@@ -760,11 +762,11 @@
|
|
|
760
762
|
`,_i=e=>l.html`
|
|
761
763
|
<${e}-dialog show-close-icon="false" ${(0,l.ref)("dialog")}>
|
|
762
764
|
<h2 slot="top" class="title">${e=>{var t;return null===(t=e.error)||void 0===t?void 0:t.title}}</h2>
|
|
763
|
-
<div class="details">${e=>{var t;return(null===(t=e.error)||void 0===t?void 0:t.errorDetails)||"Place holder for error message"}}</div>
|
|
765
|
+
<div class="details">${e=>{var t,o;return(null===(t=e.error)||void 0===t?void 0:t.errorDetails)||(null===(o=e.notification)||void 0===o?void 0:o.body)||"Place holder for error message"}}</div>
|
|
764
766
|
<${e}-button slot="bottom" appearance="lightweight" @click=${e=>{e.dismiss()}}>
|
|
765
|
-
${e=>{var t,o,i,a;return(null===(a=null===(i=null===(o=null===(t=e.error)||void 0===t?void 0:t.config)||void 0===o?void 0:o.dialog)||void 0===i?void 0:i.dismissingAction)||void 0===a?void 0:a.label)||"Ignore"}}
|
|
767
|
+
${e=>{var t,o,i,a,n,s,l,r;return(null===(a=null===(i=null===(o=null===(t=e.error)||void 0===t?void 0:t.config)||void 0===o?void 0:o.dialog)||void 0===i?void 0:i.dismissingAction)||void 0===a?void 0:a.label)||(null===(r=null===(l=null===(s=null===(n=e.notification)||void 0===n?void 0:n.config)||void 0===s?void 0:s.dialog)||void 0===l?void 0:l.dismissingAction)||void 0===r?void 0:r.label)||"Ignore"}}
|
|
766
768
|
</${e}-button>
|
|
767
|
-
${(0,l.repeat)((e=>{var t,o;return
|
|
769
|
+
${(0,l.repeat)((e=>{var t,o,i,a;return(null===(o=null===(t=e.error)||void 0===t?void 0:t.config)||void 0===o?void 0:o.dialog.confirmingActions)||(null===(a=null===(i=e.notification)||void 0===i?void 0:i.config)||void 0===a?void 0:a.dialog.confirmingActions)}),l.html`
|
|
768
770
|
<${e}-button
|
|
769
771
|
slot="bottom"
|
|
770
772
|
appearance="lightweight"
|
|
@@ -776,7 +778,7 @@
|
|
|
776
778
|
</${e}-dialog>
|
|
777
779
|
`,Oi=l.html`
|
|
778
780
|
${e=>_i(ze(e))}
|
|
779
|
-
`,ki={mode:"open",delegatesFocus:!0};class Ti extends n.FoundationElement{connectedCallback(){super.connectedCallback()}show(){this.dialog.show()}dismiss(){var e,t,o,i;(null===(i=null===(o=null===(t=null===(e=this.error)||void 0===e?void 0:e.config)||void 0===t?void 0:t.dialog)||void 0===o?void 0:o.dismissingAction)||void 0===i?void 0:i.action)&&this.error.config.dialog.dismissingAction.action(),this.closeDialog()}closeDialog(){try{this.dialog.close(),this.remove()}catch(e){ni.error(e)}}}(0,w.__decorate)([l.observable],Ti.prototype,"error",void 0);const Li=Ti.compose({baseName:"error-dialog",template:Oi,styles:Di,shadowOptions:ki});var Ai=o(22296);const Ri=(0,ai.createLogger)("foundation-criteria");var Ei;!function(e){e.AND="&&",e.OR="||",e.NOT="!",e.GT=">",e.GE=">=",e.LT="<",e.LE="<=",e.NE="!=",e.EQ="=="}(Ei||(Ei={}));class Ni{constructor(e){this.$$operator=e}static And(){return new Ni(Ei.AND)}static Or(){return new Ni(Ei.OR)}static Not(){return new Ni(Ei.NOT)}static GreaterThan(){return new Ni(Ei.GT)}static GreaterThanOrEqual(){return new Ni(Ei.GE)}static LessThan(){return new Ni(Ei.LT)}static LessThanOrEqual(){return new Ni(Ei.LE)}static NotEqual(){return new Ni(Ei.NE)}static Equal(){return new Ni(Ei.EQ)}get operator(){return this.$$operator}}const Mi="default";class Ii{constructor(){this.expressions={},this.And=(e,t={})=>this.withExpression(e,t,Ni.And()),this.Or=(e,t={})=>this.withExpression(e,t,Ni.Or()),this.Not=(e,t={})=>this.withExpression(e,t,Ni.Not())}withExpression(e,t={},o=Ni.And()){const{condition:i,join:a,groupName:n}=t,s=(e,t=Mi)=>{var n;const s=null!==(n=this.expressions[t])&&void 0!==n?n:[];this.expressions[t]=[...s,{join:o||a,condition:i,expression:e}]};if(Array.isArray(e))if(a){const t=e.filter((e=>{const t=e instanceof Ni;return t&&Ri.warn("Inline joins will be discarded when join is defined in ExpressionOptions"),!t}));if(n)t.forEach((e=>{s(e,n)}));else{const e=(l=a,t.flat().flatMap(((e,t,o)=>o.length-1!==t?[e,l]:e)));s(e,Mi)}}else s(e,Mi);else s(e,"string"==typeof e?Mi:e.group);var l;return this}build(e){const t=Object.entries(this.expressions).reduce(((e,[t,o])=>Object.assign(Object.assign({},e),{[t]:`(${o.filter((({condition:e})=>!e||e())).map((({expression:e,join:t},o,i)=>this.parseExpression(e,i[o-1],t))).join("")})`})),{});return e?e(t):`(${Object.values(t).join(" && ")})`}reset(){this.expressions={}}parseExpression(e,t,o){const i=[];return o&&t&&i.push(` ${o.operator} `),"string"==typeof e?i.push(e):Array.isArray(e)?(e.forEach(((e,t,o)=>{if(e instanceof Ni){if(o[t-1]instanceof Ni)throw new Error("Adjacent Join operations detected")}})),i.push(`(${e.map((e=>this.parseExpression(e,void 0))).join("")})`)):e instanceof Ni?i.push(` ${e.operator} `):e&&i.push(e.serialiser(e)),i.join("")}}const Pi=e=>{const{value:t}=e;return e.valueGetter?e.valueGetter(t):"function"==typeof t?t(e):Array.isArray(t)?t.join(","):"string"==typeof t?`"${t}"`:t},Hi=e=>t=>`${t.field} ${e} ${Pi(t)}`,ji=e=>Hi(Ei.EQ)(e);class Bi{constructor(e){this.serialiser=ji,this.build=()=>{if(!this.field)throw new Error("Missing required param 'field'");if(void 0===this.value)throw new Error("Missing required param 'value'");if(!this.serialiser)throw new Error("Missing required param 'serialise'");return{field:this.field,value:this.value,serialiser:this.serialiser,params:this.params,valueGetter:this.valueGetter,group:this.group}},e&&(this.field=e.field,this.value=e.value,this.serialiser=e.serialiser,this.params=e.params,this.valueGetter=e.valueGetter,this.group=e.group)}withField(e){return this.field=e,this}withValue(e){return this.value=e,this}withSerialiser(e){return this.serialiser=e,this}withParams(e){return this.params=e,this}withValueGetter(e){return this.valueGetter=e,this}withGroup(e){return this.group=e,this}}var Gi=o(21607);const zi=l.css`
|
|
781
|
+
`,ki={mode:"open",delegatesFocus:!0};class Ti extends n.FoundationElement{connectedCallback(){super.connectedCallback()}show(){this.dialog.show()}dismiss(){var e,t,o,i,a,n,s,l;(null===(i=null===(o=null===(t=null===(e=this.error)||void 0===e?void 0:e.config)||void 0===t?void 0:t.dialog)||void 0===o?void 0:o.dismissingAction)||void 0===i?void 0:i.action)&&this.error.config.dialog.dismissingAction.action(),(null===(l=null===(s=null===(n=null===(a=this.notification)||void 0===a?void 0:a.config)||void 0===n?void 0:n.dialog)||void 0===s?void 0:s.dismissingAction)||void 0===l?void 0:l.action)&&this.notification.config.dialog.dismissingAction.action(),this.closeDialog()}closeDialog(){try{this.dialog.close(),this.remove()}catch(e){ni.error(e)}}}(0,w.__decorate)([l.observable],Ti.prototype,"error",void 0),(0,w.__decorate)([l.observable],Ti.prototype,"notification",void 0);const Li=Ti.compose({baseName:"error-dialog",template:Oi,styles:Di,shadowOptions:ki});var Ai=o(22296);const Ri=(0,ai.createLogger)("foundation-criteria");var Ei;!function(e){e.AND="&&",e.OR="||",e.NOT="!",e.GT=">",e.GE=">=",e.LT="<",e.LE="<=",e.NE="!=",e.EQ="=="}(Ei||(Ei={}));class Ni{constructor(e){this.$$operator=e}static And(){return new Ni(Ei.AND)}static Or(){return new Ni(Ei.OR)}static Not(){return new Ni(Ei.NOT)}static GreaterThan(){return new Ni(Ei.GT)}static GreaterThanOrEqual(){return new Ni(Ei.GE)}static LessThan(){return new Ni(Ei.LT)}static LessThanOrEqual(){return new Ni(Ei.LE)}static NotEqual(){return new Ni(Ei.NE)}static Equal(){return new Ni(Ei.EQ)}get operator(){return this.$$operator}}const Mi="default";class Ii{constructor(){this.expressions={},this.And=(e,t={})=>this.withExpression(e,t,Ni.And()),this.Or=(e,t={})=>this.withExpression(e,t,Ni.Or()),this.Not=(e,t={})=>this.withExpression(e,t,Ni.Not())}withExpression(e,t={},o=Ni.And()){const{condition:i,join:a,groupName:n}=t,s=(e,t=Mi)=>{var n;const s=null!==(n=this.expressions[t])&&void 0!==n?n:[];this.expressions[t]=[...s,{join:o||a,condition:i,expression:e}]};if(Array.isArray(e))if(a){const t=e.filter((e=>{const t=e instanceof Ni;return t&&Ri.warn("Inline joins will be discarded when join is defined in ExpressionOptions"),!t}));if(n)t.forEach((e=>{s(e,n)}));else{const e=(l=a,t.flat().flatMap(((e,t,o)=>o.length-1!==t?[e,l]:e)));s(e,Mi)}}else s(e,Mi);else s(e,"string"==typeof e?Mi:e.group);var l;return this}build(e){const t=Object.entries(this.expressions).reduce(((e,[t,o])=>Object.assign(Object.assign({},e),{[t]:`(${o.filter((({condition:e})=>!e||e())).map((({expression:e,join:t},o,i)=>this.parseExpression(e,i[o-1],t))).join("")})`})),{});return e?e(t):`(${Object.values(t).join(" && ")})`}reset(){this.expressions={}}parseExpression(e,t,o){const i=[];return o&&t&&i.push(` ${o.operator} `),"string"==typeof e?i.push(e):Array.isArray(e)?(e.forEach(((e,t,o)=>{if(e instanceof Ni){if(o[t-1]instanceof Ni)throw new Error("Adjacent Join operations detected")}})),i.push(`(${e.map((e=>this.parseExpression(e,void 0))).join("")})`)):e instanceof Ni?i.push(` ${e.operator} `):e&&i.push(e.serialiser(e)),i.join("")}}const Pi=e=>{const{value:t}=e;return e.valueGetter?e.valueGetter(t):"function"==typeof t?t(e):Array.isArray(t)?t.join(","):"string"==typeof t?`"${t}"`:t},Hi=e=>t=>`${t.field} ${e} ${Pi(t)}`,ji=e=>Hi(Ei.EQ)(e);class Bi{constructor(e){this.serialiser=ji,this.build=()=>{if(!this.field)throw new Error("Missing required param 'field'");if(void 0===this.value)throw new Error("Missing required param 'value'");if(!this.serialiser)throw new Error("Missing required param 'serialise'");return{field:this.field,value:this.value,serialiser:this.serialiser,params:this.params,valueGetter:this.valueGetter,group:this.group}},e&&(this.field=e.field,this.value=e.value,this.serialiser=e.serialiser,this.params=e.params,this.valueGetter=e.valueGetter,this.group=e.group)}withField(e){return this.field=e,this}withValue(e){return this.value=e,this}withSerialiser(e){return this.serialiser=e,this}withParams(e){return this.params=e,this}withValueGetter(e){return this.valueGetter=e,this}withGroup(e){return this.group=e,this}}var Gi=o(21607);const zi=l.css`
|
|
780
782
|
/* Host */
|
|
781
783
|
:host {
|
|
782
784
|
display: flex;
|
|
@@ -2035,10 +2037,12 @@
|
|
|
2035
2037
|
`,Nl=l.html`
|
|
2036
2038
|
<div class="snackbar ${e=>e.deleteAnimation}" ${(0,l.ref)("snackbar")}>
|
|
2037
2039
|
<div part="content" class="content">
|
|
2038
|
-
<div
|
|
2040
|
+
<div>
|
|
2041
|
+
${e=>{var t,o;return(null===(t=e.error)||void 0===t?void 0:t.errorDetails)||(null===(o=e.notification)||void 0===o?void 0:o.body)||"Place holder for error message"}}
|
|
2042
|
+
</div>
|
|
2039
2043
|
</div>
|
|
2040
2044
|
<div part="action" class="action">
|
|
2041
|
-
${(0,l.repeat)((e=>{var t,o,i;return
|
|
2045
|
+
${(0,l.repeat)((e=>{var t,o,i,a,n,s;return(null===(i=null===(o=null===(t=e.error)||void 0===t?void 0:t.config)||void 0===o?void 0:o.snackbar)||void 0===i?void 0:i.confirmingActions)||(null===(s=null===(n=null===(a=e.notification)||void 0===a?void 0:a.config)||void 0===n?void 0:n.snackbar)||void 0===s?void 0:s.confirmingActions)}),l.html`
|
|
2042
2046
|
<foundation-button
|
|
2043
2047
|
slot="action"
|
|
2044
2048
|
appearance="lightweight"
|
|
@@ -2049,7 +2053,7 @@
|
|
|
2049
2053
|
`)}
|
|
2050
2054
|
</div>
|
|
2051
2055
|
</div>
|
|
2052
|
-
`,Ml={mode:"open",delegatesFocus:!0};class Il extends n.FoundationElement{constructor(){super(...arguments),this.deleteAnimation="",this.closeTimeout=1e4,this.autoClose=!0,this.type=""}connectedCallback(){super.connectedCallback(),this.autoClose&&setTimeout((()=>{this.deleteAnimation="snackbar-delete",this.snackbar.onanimationend=()=>{this.dismiss()}}),this.closeTimeout)}errorChanged(e,t){var o,i,a;this.type=null!==(a=null===(i=null===(o=null==t?void 0:t.config)||void 0===o?void 0:o.snackbar)||void 0===i?void 0:i.type)&&void 0!==a?a:""}dismiss(){this.remove()}}(0,w.__decorate)([l.observable],Il.prototype,"error",void 0),(0,w.__decorate)([l.observable],Il.prototype,"deleteAnimation",void 0),(0,w.__decorate)([(0,l.attr)({attribute:"close-timeout"})],Il.prototype,"closeTimeout",void 0),(0,w.__decorate)([(0,l.attr)({attribute:"auto-close"})],Il.prototype,"autoClose",void 0),(0,w.__decorate)([(0,l.attr)({attribute:"type"})],Il.prototype,"type",void 0);const Pl=Il.compose({baseName:"snackbar",styles:El,template:Nl,shadowOptions:Ml}),Hl=(e,t)=>l.css`
|
|
2056
|
+
`,Ml={mode:"open",delegatesFocus:!0};class Il extends n.FoundationElement{constructor(){super(...arguments),this.deleteAnimation="",this.closeTimeout=1e4,this.autoClose=!0,this.type=""}connectedCallback(){super.connectedCallback(),this.autoClose&&setTimeout((()=>{this.deleteAnimation="snackbar-delete",this.snackbar.onanimationend=()=>{this.dismiss()}}),this.closeTimeout)}errorChanged(e,t){var o,i,a;this.type=null!==(a=null===(i=null===(o=null==t?void 0:t.config)||void 0===o?void 0:o.snackbar)||void 0===i?void 0:i.type)&&void 0!==a?a:""}notificationChanged(e,t){var o,i,a;this.type=null!==(a=null===(i=null===(o=null==t?void 0:t.config)||void 0===o?void 0:o.snackbar)||void 0===i?void 0:i.type)&&void 0!==a?a:""}dismiss(){this.remove()}}(0,w.__decorate)([l.observable],Il.prototype,"error",void 0),(0,w.__decorate)([l.observable],Il.prototype,"notification",void 0),(0,w.__decorate)([l.observable],Il.prototype,"deleteAnimation",void 0),(0,w.__decorate)([(0,l.attr)({attribute:"close-timeout"})],Il.prototype,"closeTimeout",void 0),(0,w.__decorate)([(0,l.attr)({attribute:"auto-close"})],Il.prototype,"autoClose",void 0),(0,w.__decorate)([(0,l.attr)({attribute:"type"})],Il.prototype,"type",void 0);const Pl=Il.compose({baseName:"snackbar",styles:El,template:Nl,shadowOptions:Ml}),Hl=(e,t)=>l.css`
|
|
2053
2057
|
${(0,s.switchStyles)(e,t)}
|
|
2054
2058
|
.checked-indicator {
|
|
2055
2059
|
transform: scale(1.3);
|
|
@@ -2324,4 +2328,4 @@
|
|
|
2324
2328
|
<slot></slot>
|
|
2325
2329
|
</template>
|
|
2326
2330
|
`;var fd;!function(e){e.NOTIFICATION_EVENT="notification-event"}(fd||(fd={}));const bd=e=>{var t,o;return`${null!==(t=null==e?void 0:e.title)&&void 0!==t?t:"Error"}: ${null!==(o=null==e?void 0:e.body)&&void 0!==o?o:"Something went wrong"}`},yd=(e,t)=>{const o=t.split("-")[0];let i=document.querySelector(`#${e}`);if(!i){i=document.createElement("div"),i.setAttribute("id",e);const t=document.createElement(`${o}-design-system-provider`);t.appendChild(i),document.body.appendChild(t)}return i},wd=()=>{const e=document.createElement("div");return e.setAttribute("id","banner-anchor"),e.style.position="relative",document.body.insertBefore(e,document.body.firstChild),e},xd=(0,ai.createLogger)("foundation-notifications"),Fd={alert:e=>{alert(bd(e))},toast:(e,t)=>{var o,i,a,n,s,l,r,d,c,u,p,h,m,v,g,f,b,y;const w=t.split("-")[0],x=yd("notify-container",t);if(x)switch(x.style.position="fixed",null===(i=null===(o=null==e?void 0:e.config)||void 0===o?void 0:o.toast)||void 0===i?void 0:i.position){case"top-left":x.style.top="0",x.style.left="0";break;case"bottom-left":x.style.bottom="0",x.style.left="0";break;case"bottom-right":x.style.bottom="0",x.style.right="0";break;default:x.style.top="0",x.style.right="0"}const F=document.createElement(`${w}-toast`),S=document.createElement("div");S.setAttribute("slot","top"),S.textContent=e.title;const $=document.createElement("div");$.setAttribute("slot","content"),$.textContent=(null==e?void 0:e.body)||"";const C=document.createElement("div");let D;C.setAttribute("slot","date"),C.textContent=(null===(a=null==e?void 0:e.createdAt)||void 0===a?void 0:a.toLocaleTimeString())||"",(null===(s=null===(n=null==e?void 0:e.config)||void 0===n?void 0:n.toast)||void 0===s?void 0:s.buttons)&&(null===(d=null===(r=null===(l=null==e?void 0:e.config)||void 0===l?void 0:l.toast)||void 0===r?void 0:r.buttons)||void 0===d?void 0:d.length)&&(D=document.createElement("div"),D.setAttribute("slot","bottom"),e.config.toast.buttons.forEach((t=>{const o=document.createElement(`${w}-button`);o.textContent=t.placeholder||"example placeholder",o.addEventListener("click",(()=>{const{details:i}=e.config.toast;if(t.action)return t.action({details:i,buttonElement:o,toastElement:F})})),t.appearance&&o.setAttribute("appearance",t.appearance),D.appendChild(o)}))),F.setAttribute("notify",(null===(u=null===(c=null==e?void 0:e.config)||void 0===c?void 0:c.toast)||void 0===u?void 0:u.type)||""),(null===(h=null===(p=null==e?void 0:e.config)||void 0===p?void 0:p.toast)||void 0===h?void 0:h.autoClose)&&F.setAttribute("auto-close",`${null===(v=null===(m=null==e?void 0:e.config)||void 0===m?void 0:m.toast)||void 0===v?void 0:v.autoClose}`),(null===(f=null===(g=null==e?void 0:e.config)||void 0===g?void 0:g.toast)||void 0===f?void 0:f.closeTimeout)&&F.setAttribute("close-timeout",`${null===(y=null===(b=null==e?void 0:e.config)||void 0===b?void 0:b.toast)||void 0===y?void 0:y.closeTimeout}`),F.appendChild(S),F.appendChild($),F.appendChild(C),D&&F.appendChild(D),x.appendChild(F)},dialog:(e,t)=>{const o=t.split("-")[0],i=document.createElement(`${o}-notification-dialog`);yd("dialog-container",t).appendChild(i),i.notification=e,i.show()},snackbar:(e,t)=>{const o=t.split("-")[0],i=document.createElement(`${o}-snackbar`);yd("snack-container",t).appendChild(i),i.notification=e},banner:(e,t,o)=>{var i;const a=t.split("-")[0],n=document.createElement(`${a}-banner`),s=(e=>{for(var t,o;e&&!(e instanceof ShadowRoot);){const i=null===(t=null==e?void 0:e.getRootNode())||void 0===t?void 0:t.getElementById("banner-anchor");if(i)return i.style.position="relative",i;e=null===(o=null==e?void 0:e.getRootNode())||void 0===o?void 0:o.host}return wd()})(o);(null===(i=null==s?void 0:s.children)||void 0===i?void 0:i.length)>0&&(n.style.position="absolute",n.style.top="0",n.style.left="0",n.style.width="100%"),s.appendChild(n),n.notification=e}},Sd=(e,t,o)=>{var i,a;xd.log({message:bd(e),level:(i=e,(null==i?void 0:i.logLevel)||(null===(a=null==i?void 0:i.config)||void 0===a?void 0:a.logLevel)||ai.LogLevel.Debug)});Object.keys((null==e?void 0:e.config)||{}).forEach((i=>{Fd[i]&&Fd[i](e,t,o)}))};class $d{withTitle(e){return this.title=e,this}withBody(e){return this.body=e,this}withCreatedAt(e){return this.createdAt=e,this}withLogLevel(e){return this.logLevel=e,this}withAlert(e){return this.alert=e,this}withToast(e){return this.toast=e,this}withBanner(e){return this.banner=e,this}withSnackbar(e){return this.snackbar=e,this}withDialog(e){return this.dialog=e,this}build(){if(!this.title)throw new Error("Title is required");if(!this.body)throw new Error("Missing required param 'body'");let e={title:this.title,body:this.body},t={};return this.createdAt&&(e=Object.assign({createdAt:this.createdAt},e)),this.logLevel in ai.LogLevel&&(e=Object.assign({logLevel:this.logLevel},e)),this.alert&&(t=Object.assign({alert:this.alert},t),e=Object.assign({config:t},e)),this.toast&&(t=Object.assign({toast:this.toast},t),e=Object.assign({config:t},e)),this.banner&&(t=Object.assign({banner:this.banner},t),e=Object.assign({config:t},e)),this.snackbar&&(t=Object.assign({snackbar:this.snackbar},t),e=Object.assign({config:t},e)),this.dialog&&(t=Object.assign({dialog:this.dialog},t),e=Object.assign({config:t},e)),e}}class Cd{withPosition(e){return this.position=e,this}withAutoClose(e){return this.autoClose=e,this}withCloseTimeout(e){return this.closeTimeout=e,this}withType(e){return this.type=e,this}withDetails(e){return this.details=e,this}withButtons(e){return this.buttons=e,this}build(){let e={};return this.position&&(e=Object.assign({position:this.position},e)),this.autoClose&&(e=Object.assign({autoClose:this.autoClose},e)),this.closeTimeout&&(e=Object.assign({closeTimeout:this.closeTimeout},e)),this.type&&(e=Object.assign({type:this.type},e)),this.details&&(e=Object.assign({details:this.details},e)),this.buttons&&(e=Object.assign({buttons:this.buttons},e)),e}}const Dd={mode:"open",delegatesFocus:!0};class _d extends n.FoundationElement{constructor(){super(...arguments),this.closeTimeout=0,this.toastButtons=[]}connectedCallback(){const e=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});var t;return(0,w.__awaiter)(this,void 0,void 0,(function*(){e.connectedCallback.call(this),this.addEventListener(fd.NOTIFICATION_EVENT,(e=>{e.stopImmediatePropagation(),Sd(e.detail,this.tagName,this.notificationListener)})),this.resourceName&&(yield this.datasource.init({resourceName:this.resourceName},!0),null===(t=this.datasource.stream)||void 0===t||t.subscribe((e=>{e.ROW&&e.SEQUENCE_ID>1&&this.handleStreamUpdate((0,pd.$)(e))})))}))}handleStreamUpdate(e){const t=e.inserts;t.length>0&&t.forEach((e=>{var t;const{HEADER:o,MESSAGE:i,NOTIFY_SEVERITY:a}=e,n=e.CREATED_AT?new Date(e.CREATED_AT):void 0,s=e.EXPIRY?e.EXPIRY-e.CREATED_AT:0;let l=[];this.toastButtons&&this.toastButtons.length>0&&(l=this.toastButtons.filter((({condition:t})=>!t||t({details:e})))),Sd((new $d).withTitle(o).withBody(i).withCreatedAt(n).withToast((new Cd).withDetails(e).withType(null==a?void 0:a.toLowerCase()).withButtons(l).withAutoClose(null!==(t=!!s)&&void 0!==t?t:!!this.closeTimeout).withCloseTimeout(null!=s?s:this.closeTimeout).build()).build(),this.tagName,this.notificationListener)}))}}(0,w.__decorate)([l.observable],_d.prototype,"notificationListener",void 0),(0,w.__decorate)([(0,l.attr)({attribute:"resource-name"})],_d.prototype,"resourceName",void 0),(0,w.__decorate)([(0,l.attr)({attribute:"close-timeout",converter:l.nullableNumberConverter})],_d.prototype,"closeTimeout",void 0),(0,w.__decorate)([l.observable],_d.prototype,"toastButtons",void 0),(0,w.__decorate)([ui.Yh],_d.prototype,"datasource",void 0);const Od=_d.compose({baseName:"notification-listener",template:gd,shadowOptions:Dd});var kd;let Td=kd=class extends md{constructor(){super(...arguments),this.optionElement="fast-option",this.isSnapshot=!0}connectedCallback(){const e=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});var t;return(0,w.__awaiter)(this,void 0,void 0,(function*(){e.connectedCallback.call(this),this.fields=this.labelField?null===(t=this.valueField)||void 0===t?void 0:t.concat(" ",this.labelField):this.valueField,this.select=this.parentElement,this.select.addEventListener("change",(e=>{const t=this.options.find((t=>t.label===e.target.value));this.select.$emit("value-change",t)})),this.select&&this.valueField&&(this.resourceName&&this.connect.isConnected||this.data)&&this.fetchGenesisData(),this.valueField||ni.warn('Specify field for values in options (e.g value-field="VALUE") and optionally field for label (e.g label-field="NAME")')}))}clearData(){Array.from(this.select.children).forEach((e=>{e instanceof kd||this.select.removeChild(e)})),this.select.value="",this.select.initialValue=""}syncComponentData(e){var t;const o=null!=e?e:Array.from(this.rowsSyncedWithStream.values());this.options=o.map((e=>({value:e[this.valueField],label:this.labelFormatter?this.labelFormatter(e[this.labelField]):e[this.labelField]})));this.options.map((({value:e,label:t})=>{const o=document.createElement(this.optionElement);return o.textContent=t||e,o.value=e,o})).forEach((e=>{this.select.appendChild(e)}));const i=this.initialSelectedValue||0===this.initialSelectedValue?null===(t=this.options.find((e=>e.value===this.initialSelectedValue)))||void 0===t?void 0:t.label:"";l.DOM.queueUpdate((()=>{this.select.value=i}))}handleStreamInserts(e){ni.debug("handleStreamInserts - Method not implemented.")}handleStreamDeletes(e){ni.debug("handleStreamDeletes - Method not implemented.")}handleStreamUpdates(e){ni.debug("handleStreamUpdates - Method not implemented.")}};(0,w.__decorate)([(0,l.attr)({attribute:"label-field"})],Td.prototype,"labelField",void 0),(0,w.__decorate)([(0,l.attr)({attribute:"value-field"})],Td.prototype,"valueField",void 0),(0,w.__decorate)([l.observable],Td.prototype,"labelFormatter",void 0),Td=kd=(0,w.__decorate)([(0,l.customElement)({name:"options-datasource"})],Td);let Ld=class extends md{constructor(){super(...arguments),this.isSnapshot=!0}connectedCallback(){const e=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});var t;return(0,w.__awaiter)(this,void 0,void 0,(function*(){e.connectedCallback.call(this),this.fields=this.labelField?null===(t=this.valueField)||void 0===t?void 0:t.concat(" ",this.labelField):this.valueField,this.select=this.parentElement,this.select&&this.valueField&&(this.resourceName&&this.connect.isConnected||this.data)&&this.fetchGenesisData(),this.valueField||ni.warn('Specify field for values in options (e.g value-field="VALUE") and optionally field for label which is supported only in select and combobox (e.g label-field="NAME")')}))}clearData(){this.select.options=[]}syncComponentData(e){const t=(null!=e?e:Array.from(this.rowsSyncedWithStream.values())).map((e=>({value:e[this.valueField],label:e[this.labelField]})));this.select.options=t}handleStreamInserts(e){ni.debug("handleStreamInserts - Method not implemented.")}handleStreamDeletes(e){ni.debug("handleStreamDeletes - Method not implemented.")}handleStreamUpdates(e){ni.debug("handleStreamUpdates - Method not implemented.")}};(0,w.__decorate)([(0,l.attr)({attribute:"value-field"})],Ld.prototype,"valueField",void 0),(0,w.__decorate)([(0,l.attr)({attribute:"label-field"})],Ld.prototype,"labelField",void 0),Ld=(0,w.__decorate)([(0,l.customElement)({name:"multiselect-datasource"})],Ld);const Ad=(e,t)=>o=>{const i="function"==typeof t?t:(a=t,e=>Object.assign(Object.assign({},a),e));var a;return l.FASTElement.define(class extends e{},i(o))};function Rd(e){if("string"==typeof e)return e;if("function"==typeof e&&!(e=l.FASTElementDefinition.forType(e)))throw new Error("Missing FASTElement definition.");return e.name}var Ed=o(1279);let Nd=class extends(Ed.F0.from(l.FASTElement)){connectedCallback(){super.connectedCallback(),l.DOM.queueUpdate((()=>(0,w.__awaiter)(this,void 0,void 0,(function*(){this.$router.config=this.config}))))}};Nd=(0,w.__decorate)([(0,l.customElement)({name:"foundation-router"})],Nd);const Md=()=>ld().register(nd)}}]);
|
|
2327
|
-
//# sourceMappingURL=701.
|
|
2331
|
+
//# sourceMappingURL=701.9441216759582277e759ec38c7309f8c.js.map
|