@genesislcap/design-system-configurator 14.83.7 → 14.84.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{361.361.090afc486be11edd1546.js → 361.361.90b1b5e56cc0594387f5.js} +1 -1
- package/dist/{371.371.ec15e7c5056e0caea26d.js → 371.371.29fae1c31e6896ef0472.js} +2 -2
- package/dist/371.bd3cfdcebe664d944cf25a05f56adc68.js.map +1 -0
- package/dist/{688.688.a37cbcc8c4e01bb84c70.js → 688.688.885b7f46da7ed82f7a16.js} +2 -2
- package/dist/{688.cd3cd649fbb2b22ee982d264ddc54f25.js.map → 688.6fe7e22c078658ea8cd077f055ea719b.js.map} +1 -1
- package/dist/{701.701.e44dcc3fd5435b3b15bb.js → 701.701.43553f54b506cad5c3c2.js} +2 -2
- package/dist/701.e0db248147d0b597fd33a96101b6bf9b.js.map +1 -0
- package/dist/721.4c461fb5ff67f6a56b42f10379a7e595.js.map +1 -0
- package/dist/{932.932.4d2a5bd718bcb85ccd24.js → 721.721.239fb0990ecb96c38fb2.js} +72 -72
- package/dist/{755.755.84d82d894856699ad409.js → 755.755.8c48dd857aa12c146654.js} +1 -1
- package/dist/{designSystemConfigurator.ef1b442659b7cf12622819155377cec4.js.map → designSystemConfigurator.f8e0a901e0e482cf2d2fd5b40e362ba6.js.map} +1 -1
- package/dist/index.html +1 -1
- package/dist/{main.570f717552e2db6c05ba38897620f38d.js.map → main.0296f15ae2ac14c1b762994f8a12e5c9.js.map} +1 -1
- package/dist/{main.4975596bdc0d728061e9.js → main.3ae8f835c67ae0d2d9be.js} +2 -2
- package/dist/remoteEntry.js +2 -2
- package/package.json +7 -7
- package/dist/371.5912c00b4158b210fe5421e9652086ed.js.map +0 -1
- package/dist/701.44f4dd60472394255490cad59ea1b990.js.map +0 -1
- package/dist/932.944e3ac581e5a617aae5e9627037cebe.js.map +0 -1
|
@@ -705,7 +705,7 @@
|
|
|
705
705
|
</div>
|
|
706
706
|
`,Qo=l.html`
|
|
707
707
|
${e=>Zo(Tt(e))}
|
|
708
|
-
`;class Jo 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){kt(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],Jo.prototype,"items",void 0),(0,w.__decorate)([(0,l.attr)({attribute:"auto-close",mode:"boolean"})],Jo.prototype,"autoClose",void 0),(0,w.__decorate)([(0,l.attr)({attribute:"disable-button",mode:"boolean"})],Jo.prototype,"disabled",void 0),(0,w.__decorate)([l.observable],Jo.prototype,"classNames",void 0),(0,w.__decorate)([l.attr],Jo.prototype,"name",void 0),(0,w.__decorate)([(0,l.attr)({attribute:"open",mode:"boolean"})],Jo.prototype,"open",void 0),(0,w.__decorate)([l.attr],Jo.prototype,"buttonAppearance",void 0);const ei=Jo.compose({baseName:"dropdown-menu",styles:Xo,template:Qo});var ti=o(
|
|
708
|
+
`;class Jo 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){kt(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],Jo.prototype,"items",void 0),(0,w.__decorate)([(0,l.attr)({attribute:"auto-close",mode:"boolean"})],Jo.prototype,"autoClose",void 0),(0,w.__decorate)([(0,l.attr)({attribute:"disable-button",mode:"boolean"})],Jo.prototype,"disabled",void 0),(0,w.__decorate)([l.observable],Jo.prototype,"classNames",void 0),(0,w.__decorate)([l.attr],Jo.prototype,"name",void 0),(0,w.__decorate)([(0,l.attr)({attribute:"open",mode:"boolean"})],Jo.prototype,"open",void 0),(0,w.__decorate)([l.attr],Jo.prototype,"buttonAppearance",void 0);const ei=Jo.compose({baseName:"dropdown-menu",styles:Xo,template:Qo});var ti=o(6832);const oi=(0,ti.createLogger)("foundation-ui"),ii=l.html`
|
|
709
709
|
<foundation-banner ${(0,l.ref)("banner")}>
|
|
710
710
|
<div slot="content">
|
|
711
711
|
<div>${e=>{var t;return(null===(t=e.error)||void 0===t?void 0:t.errorDetails)||"Place holder for error message"}}</div>
|
|
@@ -2314,4 +2314,4 @@
|
|
|
2314
2314
|
<slot></slot>
|
|
2315
2315
|
</template>
|
|
2316
2316
|
`;var md;!function(e){e.NOTIFICATION_EVENT="notification-event"}(md||(md={}));const vd=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"}`},gd=(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},fd=()=>{const e=document.createElement("div");return e.setAttribute("id","banner-anchor"),e.style.position="relative",document.body.insertBefore(e,document.body.firstChild),e},bd=(0,ti.createLogger)("foundation-notifications"),yd={alert:e=>{alert(vd(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=gd("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 D=document.createElement("div");let C;D.setAttribute("slot","date"),D.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)&&(C=document.createElement("div"),C.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),C.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(D),C&&F.appendChild(C),x.appendChild(F)},dialog:(e,t)=>{const o=t.split("-")[0],i=document.createElement(`${o}-notification-dialog`);gd("dialog-container",t).appendChild(i),i.notification=e,i.show()},snackbar:(e,t)=>{const o=t.split("-")[0],i=document.createElement(`${o}-snackbar`);gd("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 fd()})(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}},wd=(e,t,o)=>{var i,a;bd.log({message:vd(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)||ti.LogLevel.Debug)});Object.keys((null==e?void 0:e.config)||{}).forEach((i=>{yd[i]&&yd[i](e,t,o)}))};class xd{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 ti.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 Fd{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 Sd={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(md.NOTIFICATION_EVENT,(e=>{e.stopImmediatePropagation(),wd(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,dd.$)(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})))),wd((new xd).withTitle(o).withBody(i).withCreatedAt(n).withToast((new Fd).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)([ri.Yh],$d.prototype,"datasource",void 0);const Dd=$d.compose({baseName:"notification-listener",template:hd,shadowOptions:Sd});var Cd;let Od=Cd=class extends ud{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||oi.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 Cd||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){oi.debug("handleStreamInserts - Method not implemented.")}handleStreamDeletes(e){oi.debug("handleStreamDeletes - Method not implemented.")}handleStreamUpdates(e){oi.debug("handleStreamUpdates - Method not implemented.")}};(0,w.__decorate)([(0,l.attr)({attribute:"label-field"})],Od.prototype,"labelField",void 0),(0,w.__decorate)([(0,l.attr)({attribute:"value-field"})],Od.prototype,"valueField",void 0),(0,w.__decorate)([l.observable],Od.prototype,"labelFormatter",void 0),Od=Cd=(0,w.__decorate)([(0,l.customElement)({name:"options-datasource"})],Od);let _d=class extends ud{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||oi.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){oi.debug("handleStreamInserts - Method not implemented.")}handleStreamDeletes(e){oi.debug("handleStreamDeletes - Method not implemented.")}handleStreamUpdates(e){oi.debug("handleStreamUpdates - Method not implemented.")}};(0,w.__decorate)([(0,l.attr)({attribute:"value-field"})],_d.prototype,"valueField",void 0),(0,w.__decorate)([(0,l.attr)({attribute:"label-field"})],_d.prototype,"labelField",void 0),_d=(0,w.__decorate)([(0,l.customElement)({name:"multiselect-datasource"})],_d);const kd=(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 Td(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 Ld=o(1279);let Ad=class extends(Ld.F0.from(l.FASTElement)){connectedCallback(){super.connectedCallback(),l.DOM.queueUpdate((()=>(0,w.__awaiter)(this,void 0,void 0,(function*(){this.$router.config=this.config}))))}};Ad=(0,w.__decorate)([(0,l.customElement)({name:"foundation-router"})],Ad);const Rd=()=>ad().register(od)}}]);
|
|
2317
|
-
//# sourceMappingURL=701.
|
|
2317
|
+
//# sourceMappingURL=701.e0db248147d0b597fd33a96101b6bf9b.js.map
|