@genesislcap/design-system-configurator 14.172.3 → 14.173.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (22) hide show
  1. package/dist/{132.132.4823717bb0d680f8c3e1.js → 132.132.a7004ed7ba78e7a333b7.js} +18 -15
  2. package/dist/132.5cf7f9f6d8c76bb5015d88355d6ce2c6.js.map +1 -0
  3. package/dist/{279.279.8d01299db743ccfd8e9d.js → 279.279.14ec371b7f9f63d8c020.js} +2 -2
  4. package/dist/{279.61388040d5212cf9d2f9ec0b74af86b1.js.map → 279.2af3625f836b0e20a72534f8e88efc2d.js.map} +1 -1
  5. package/dist/{531.531.e3daba3c6f3a374692ff.js → 531.531.4acd35734d54eaf632f0.js} +5 -3
  6. package/dist/531.e6d91ce7bdc2b6479fedb9ac685ea0c2.js.map +1 -0
  7. package/dist/{548.548.76f5f98fb140b36c5264.js → 548.548.f5d6bc83d66d9ba70ad6.js} +1 -1
  8. package/dist/653.653.cee3294756e02f955599.js +2 -0
  9. package/dist/{653.cd79d6d50e9f0dfe8ed96f08357afbae.js.map → 653.b7fb12ced239fe3cc8ecd85061c5d6b1.js.map} +1 -1
  10. package/dist/{842.842.2b8b2fb2d67225c1e4a3.js → 842.842.825079f3d600d0ef3f96.js} +1 -1
  11. package/dist/designSystemConfigurator.9280db0a83028b925a3c2ba5ae51c93b.js.map +1 -0
  12. package/dist/index.html +1 -1
  13. package/dist/main.106cd2bbd7fe3d9c5553f5723506adbf.js.map +1 -0
  14. package/dist/main.95a8167200b610b876eb.js +2 -0
  15. package/dist/remoteEntry.js +2 -2
  16. package/package.json +12 -12
  17. package/dist/132.5a0e426a58277fbfd921abbe4b6cdcca.js.map +0 -1
  18. package/dist/531.8ac8553d29c90734268ff95945814785.js.map +0 -1
  19. package/dist/653.653.0147f544d9b0595e02fb.js +0 -2
  20. package/dist/designSystemConfigurator.1513c72665c9623c200ab2398b95edf8.js.map +0 -1
  21. package/dist/main.86c4f98fcfe91a975a5cc77ab287ec59.js.map +0 -1
  22. package/dist/main.b11023a093b633b88f40.js +0 -2
@@ -172,7 +172,7 @@
172
172
  `)}
173
173
  `;class W extends s.Avatar{}const q={delegatesFocus:!0,mode:"open"},K={media:Y},X=W.compose(Object.assign({baseName:"avatar",template:U,styles:G,shadowOptions:q},K)),Z=(e,t)=>r.css`
174
174
  ${(0,s.badgeStyles)(e,t)}
175
- `,Q=(e,t)=>(0,n.badgeTemplate)(e,t);class J extends s.Badge{}const ee=void 0,te={},oe=J.compose(Object.assign({baseName:"badge",template:Q,styles:Z,shadowOptions:ee},te));var ie=o(65293);const ae=(0,ie.createLogger)("foundation-ui"),ne=r.css`
175
+ `,Q=(e,t)=>(0,n.badgeTemplate)(e,t);class J extends s.Badge{}const ee=void 0,te={},oe=J.compose(Object.assign({baseName:"badge",template:Q,styles:Z,shadowOptions:ee},te));var ie=o(89876);const ae=(0,ie.createLogger)("foundation-ui"),ne=r.css`
176
176
  @keyframes delete-animate {
177
177
  from {
178
178
  height: 100px;
@@ -495,7 +495,7 @@
495
495
  ${Ue()}
496
496
  `,We=void 0,qe={};class Ke extends n.FoundationElement{constructor(){super(...arguments),this.name="",this.autoPosition=!0,this.search=!0,this.disabled=!1,this.clickOutside=e=>this.handleClickOutside(e),this.open=!1,this.options=[],this.selectedOptions=[],this.position=ze.BELOW}openChanged(e,t){var o,i;t?(document.addEventListener("mousedown",this.clickOutside),null===(o=this.optionsElement)||void 0===o||o.classList.add("visible")):(document.removeEventListener("mousedown",this.clickOutside),null===(i=this.optionsElement)||void 0===i||i.classList.remove("visible"))}connectedCallback(){var e;super.connectedCallback(),this.position===ze.ABOVE&&(null===(e=this.optionsElement)||void 0===e||e.classList.add("position-above"))}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("mousedown",this.clickOutside)}toggle(){this.open||this.setDropdownPosition(),this.open=!this.open}sortFilteredOptions(e){const t=(null!=e?e:this.options).reduce(((e,t)=>{const o=t.type||"Other";return e[o]?e[o].options.push(t):e[o]={type:o,options:[t]},e}),{});return Object.values(t)}optionsChanged(){this.filteredAvailableOptions=this.sortFilteredOptions()}setDropdownPosition(){let e=this.position;if(this.autoPosition){let t=this.assignedSlot?this.assignedSlot.parentElement:this.parentElement;for(;t&&!t.classList.contains("content-wrapper");)t=t.parentElement;if(t){const o=t.getBoundingClientRect(),i=this.getBoundingClientRect(),a=o.top+o.height/2;e=i.top<a?ze.BELOW:ze.ABOVE}else{const t=this.getBoundingClientRect(),o=window.innerHeight,i=t.top,a=o-t.bottom;e=a<t.height&&i>a?ze.ABOVE:ze.BELOW}}e===ze.ABOVE?(this.optionsElement.classList.add("position-above"),this.optionsElement.classList.remove("position-below")):e===ze.BELOW&&(this.optionsElement.classList.add("position-below"),this.optionsElement.classList.remove("position-above"))}optionGetter(e){return e.value}getItemLabel(e){let t;return e?(t=e.label||e.value||"",this.valueFormatter?this.valueFormatter(t):t):""}isOptionDisabled(e){return e&&"string"!=typeof e&&e.disabled||!1}get getPlaceholder(){return`Search ${this.name}`.trim().concat("...")}isOptionSelected(e){return this.selectedOptions.includes(this.optionGetter(e))}selectCheckboxOne(e){const t=this.optionGetter(e);this.selectedOptions.includes(t)?(this.selectedOptions=[...this.selectedOptions],this.selectedOptions.splice(this.selectedOptions.indexOf(t),1)):this.selectedOptions=[...this.selectedOptions,t],this.$emit("selectionChange",this.selectedOptions)}setFilter(){const e=this.options.filter((e=>{var t;const o=e.description,i=null!==(t=e.label)&&void 0!==t?t:e.value;return(null==o?void 0:o.toLowerCase().includes(this.filterSearchValue.toLowerCase()))||i.toLowerCase().includes(this.filterSearchValue.toLowerCase())?e:void 0}));this.filteredAvailableOptions=this.sortFilteredOptions(e)}changeHandler(e){e.preventDefault(),e.stopImmediatePropagation()}handleClickOutside(e){C(e,this)&&(this.open=!1)}}(0,x.__decorate)([r.attr],Ke.prototype,"name",void 0),(0,x.__decorate)([(0,r.attr)({mode:"boolean",attribute:"auto-position"})],Ke.prototype,"autoPosition",void 0),(0,x.__decorate)([(0,r.attr)({mode:"boolean"})],Ke.prototype,"search",void 0),(0,x.__decorate)([(0,r.attr)({mode:"boolean"})],Ke.prototype,"disabled",void 0),(0,x.__decorate)([r.observable],Ke.prototype,"defaultSlottedNodes",void 0),(0,x.__decorate)([r.observable],Ke.prototype,"valueFormatter",void 0),(0,x.__decorate)([r.observable],Ke.prototype,"filterSearchValue",void 0),(0,x.__decorate)([r.observable],Ke.prototype,"open",void 0),(0,x.__decorate)([r.observable],Ke.prototype,"options",void 0),(0,x.__decorate)([r.observable],Ke.prototype,"selectedOptions",void 0),(0,x.__decorate)([r.observable],Ke.prototype,"filteredAvailableOptions",void 0),(0,x.__decorate)([r.observable],Ke.prototype,"position",void 0),(0,x.__decorate)([r.volatile],Ke.prototype,"getPlaceholder",null);const Xe=Ke.compose(Object.assign({baseName:"categorized-multiselect",template:Ye,styles:Ve,shadowOptions:We},qe)),Ze=(e,t)=>r.css`
497
497
  ${(0,s.checkboxStyles)(e,t)}
498
- `,Qe=(e,t)=>(0,n.checkboxTemplate)(e,t);class Je extends s.Checkbox{}const et=void 0,tt={checkedIndicator:'\n <svg\n aria-hidden="true"\n part="checked-indicator"\n class="checked-indicator"\n viewBox="0 0 20 20"\n xmlns="http://www.w3.org/2000/svg"\n >\n <path\n fill-rule="evenodd"\n clip-rule="evenodd"\n d="M8.143 12.6697L15.235 4.5L16.8 5.90363L8.23812 15.7667L3.80005 11.2556L5.27591 9.7555L8.143 12.6697Z"\n />\n </svg>\n ',indeterminateIndicator:'\n <div part="indeterminate-indicator" class="indeterminate-indicator"></div>\n '},ot=Je.compose(Object.assign({baseName:"checkbox",template:Qe,styles:Ze,shadowOptions:et},tt));var it=o(39087),at=o(62051),nt=o.n(at),st=o(96730),rt=o(21281),lt=o(34193),dt=o(61503),ct=o(60949),ut=o(97156);class pt extends n.FoundationElement{constructor(){super(...arguments),this.withGridInit=!0,this.isSnapshot=!1,this.maxRows=it.OD.MAX_ROWS_250,this.maxView=it.OD.MAX_VIEW_1000,this.reverse=!1,this.rowId="ROW_REF",this.withTimestampFormatting=!0,this.requiresFullDataRefresh=!0,this.rowsSyncedWithStream=new Map,this.dataSubWasLoggedOff=!1,this.criteriaFromFilters=new Map,this.update=new ut.t(new Map)}criteriaChanged(e,t){const o=e!==(0,st.Q)(t,";");this.datasource.initialized&&o&&(this.dataSub&&(this.dataSub.unsubscribe(),this.dataSub=void 0),this.fetchGenesisData(null))}dataChanged(e){e&&(this.clearData(),this.reset())}set datasourceConfig(e){e&&Object.keys(e).forEach((t=>{void 0!==e[t]&&(this[t]=e[t])}))}disconnectedCallback(){var e,t;super.disconnectedCallback(),this.clearData(),null===(e=this.dataSub)||void 0===e||e.unsubscribe(),null===(t=this.update)||void 0===t||t.unsubscribe(),delete this.dataSub,delete this.update,this.datasource.destroy(),delete this.datasource}reset(){this.requiresFullDataRefresh=!0,this.fetchGenesisData()}fetchGenesisData(e=!0){return(0,x.__awaiter)(this,void 0,void 0,(function*(){if(this.data)return void this.syncComponentData(this.data);const t=e||!this.datasource.initialized;t||(this.connect.dataLogoff(this.sourceRef),this.clearData());if(yield this.datasource.init(this.datasourceOptions(),t))if(this.isSnapshot){const e=yield this.datasource.snapshotFiltered();this.syncComponentData(e)}else ae.debug(`requesting stream for ${this.resourceName}`),this.dataSub=this.datasource.stream.subscribe((e=>{this.sourceRef=e.SOURCE_REF;const t=e.MESSAGE_TYPE;if(t&&t===rt.Go.LOGOFF_ACK)this.dataSubWasLoggedOff=!0;else if(this.dataSubWasLoggedOff=!1,e.ROW){const t=(0,lt.d)(e);this.handleStreamUpdate(t)}else this.handleStreamUpdate(e)}));else ae.debug(`Genesis Datasource init failed for ${this.resourceName}`)}))}initDatasource(){return(0,x.__awaiter)(this,void 0,void 0,(function*(){yield this.datasource.init(this.datasourceOptions(),!0)}))}datasourceOptions(){return{criteria:this.buildCriteria(),fields:this.fields,isSnapshot:this.isSnapshot,orderBy:this.orderBy,resourceName:this.resourceName,request:this.request,reverse:this.reverse,maxRows:this.maxRows,maxView:this.maxView}}handleStreamUpdate(e){if(!e)return;e.hasOwnProperty("REPLY")?this.applyRequestServerData(e):this.applyDataserverData(e)}applyRequestServerData(e){var t,o;if(!Array.isArray(e.REPLY)||!(null===(t=e.MESSAGE_TYPE)||void 0===t?void 0:t.startsWith("REP_")))return void ae.error("received invalid RequestServerResult",e);if(this.requiresFullDataRefresh){"ROW_REF"!==this.rowId&&(null===(o=e.REPLY)||void 0===o||o.forEach((e=>{this.rowsSyncedWithStream.set(e[this.rowId],e)})));const t=this.rowsSyncedWithStream.size>0?Array.from(this.rowsSyncedWithStream.values()):e.REPLY;return void this.syncComponentData(t)}this.handleStreamInserts(e.REPLY);const i=Array.from(this.rowsSyncedWithStream.values()).filter((t=>!e.REPLY.includes(t)));this.handleStreamDeletes(i)}applyDataserverData(e){var t,o,i,a;if(this.requiresFullDataRefresh){null===(t=e.inserts)||void 0===t||t.forEach((e=>{this.rowsSyncedWithStream.set(e[this.rowId],e)}));const o=Array.from(this.rowsSyncedWithStream.values());this.syncComponentData(o)}else(null===(o=e.inserts)||void 0===o?void 0:o.length)>0&&this.handleStreamInserts(e.inserts),(null===(i=e.deletes)||void 0===i?void 0:i.length)>0&&this.handleStreamDeletes(e.deletes),(null===(a=e.updates)||void 0===a?void 0:a.length)>0&&this.handleStreamUpdates(e.updates)}buildCriteria(){var e;const t=(null===(e=this.criteria)||void 0===e?void 0:e.split(";"))||[];return(0,st.Q)(t.join(" && "),";")}setFilter(e,t){this.criteriaFromFilters.set(e,t),this.update.next(this.criteriaFromFilters)}removeFilter(e){this.criteriaFromFilters.delete(e),this.update.next(this.criteriaFromFilters)}}(0,x.__decorate)([dt.dm],pt.prototype,"connect",void 0),(0,x.__decorate)([ct.yW],pt.prototype,"datasource",void 0),(0,x.__decorate)([(0,r.attr)({mode:"boolean"})],pt.prototype,"withGridInit",void 0),(0,x.__decorate)([r.attr],pt.prototype,"criteria",void 0),(0,x.__decorate)([r.observable],pt.prototype,"data",void 0),(0,x.__decorate)([r.attr],pt.prototype,"fields",void 0),(0,x.__decorate)([(0,r.attr)({mode:"boolean"})],pt.prototype,"isSnapshot",void 0),(0,x.__decorate)([r.attr],pt.prototype,"maxRows",void 0),(0,x.__decorate)([r.attr],pt.prototype,"maxView",void 0),(0,x.__decorate)([r.attr],pt.prototype,"orderBy",void 0),(0,x.__decorate)([r.attr],pt.prototype,"resourceName",void 0),(0,x.__decorate)([(0,r.attr)({mode:"boolean"})],pt.prototype,"reverse",void 0),(0,x.__decorate)([r.attr],pt.prototype,"rowId",void 0),(0,x.__decorate)([(0,r.attr)({mode:"boolean",attribute:"with-timestamp-formatting"})],pt.prototype,"withTimestampFormatting",void 0);const ht=(0,ie.createLogger)("foundation-criteria");var mt;!function(e){e.AND="&&",e.OR="||",e.NOT="!",e.GT=">",e.GE=">=",e.LT="<",e.LE="<=",e.NE="!=",e.EQ="=="}(mt||(mt={}));class vt{constructor(e){this.$$operator=e}static And(){return new vt(mt.AND)}static Or(){return new vt(mt.OR)}static Not(){return new vt(mt.NOT)}static GreaterThan(){return new vt(mt.GT)}static GreaterThanOrEqual(){return new vt(mt.GE)}static LessThan(){return new vt(mt.LT)}static LessThanOrEqual(){return new vt(mt.LE)}static NotEqual(){return new vt(mt.NE)}static Equal(){return new vt(mt.EQ)}get operator(){return this.$$operator}}const gt="default";class ft{constructor(){this.expressions={},this.And=(e,t={})=>this.withExpression(e,t,vt.And()),this.Or=(e,t={})=>this.withExpression(e,t,vt.Or()),this.Not=(e,t={})=>this.withExpression(e,t,vt.Not())}withExpression(e,t={},o=vt.And()){const{condition:i,join:a,groupName:n}=t,s=(e,t=gt)=>{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 vt;return t&&ht.warn("Inline joins will be discarded when join is defined in ExpressionOptions"),!t}));if(n)t.forEach((e=>{s(e,n)}));else{const e=(r=a,t.flat().flatMap(((e,t,o)=>o.length-1!==t?[e,r]:e)));s(e,gt)}}else s(e,gt);else s(e,"string"==typeof e?gt:e.group);var r;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 vt){if(o[t-1]instanceof vt)throw new Error("Adjacent Join operations detected")}})),i.push(`(${e.map((e=>this.parseExpression(e,void 0))).join("")})`)):e instanceof vt?i.push(` ${e.operator} `):e&&i.push(e.serialiser(e)),i.join("")}}const bt=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},yt=e=>t=>`${t.field} ${e} ${bt(t)}`,xt=e=>yt(mt.EQ)(e),wt=e=>`Expr.containsIgnoreCase(${e.field}, ${bt(e)})`;class $t{constructor(e){this.serialiser=xt,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}}function St(e,t){var o;const i=new ft;i.withExpression((new $t).withField(null!==(o=e.labelField)&&void 0!==o?o:e.valueField).withValue(t).withSerialiser(wt).build()),e.criteria=i.build()}function Ct(e,t){var o;const i=null!==(o=e.labelField)&&void 0!==o?o:e.valueField;e.request={[i]:`${t}*`},e.fetchGenesisData(!1)}var Ft;let kt=Ft=class extends pt{constructor(){super(...arguments),this.emptyDataLabel="No matching records",this.initalSelectedValueInitialized=!1,this.isSnapshot=!0}initialSelectedValueChanged(e,t){t&&(this.initalSelectedValueInitialized=!1)}connectedCallback(){const e=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});var t,o;return(0,x.__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.optionElement=null!==(o=this.optionElement)&&void 0!==o?o:`${k(this.select)}-option`,this.select.addEventListener("change",(e=>{var t;const o=null===(t=this.options)||void 0===t?void 0:t.find((t=>t.label===e.target.value));this.select.$emit("value-change",o)})),this.select&&this.valueField&&(this.resourceName&&this.connect.isConnected||this.data)&&(this.select instanceof s.Combobox&&this.select.async&&this.initialSelectedValue?this.asyncModeIntialization():this.fetchGenesisData()),this.valueField||ae.warn('Specify field for values in options (e.g value-field="VALUE") and optionally field for label (e.g label-field="NAME")')}))}asyncModeIntialization(){return(0,x.__awaiter)(this,void 0,void 0,(function*(){yield this.datasource.init(this.datasourceOptions(),!0);const e=this.datasource.resourceType;e===it.vt.DATASERVER&&St(this,this.initialSelectedValue),e===it.vt.REQUEST_SERVER&&Ct(this,this.initialSelectedValue)}))}clearData(){Array.from(this.select.children).forEach((e=>{e instanceof Ft||this.select.removeChild(e)})),this.select.value="",this.select.initialValue=""}syncComponentData(e){var t;const o=null!=e?e:Array.from(this.rowsSyncedWithStream.values());if(o.length>0){this.options=o.map((e=>({value:e[this.valueField],label:this.labelFormatter?this.labelFormatter(e[this.labelField]):e[this.labelField]})));if(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)})),!this.initalSelectedValueInitialized){const e=this.initialSelectedValue||0===this.initialSelectedValue?null===(t=this.options.find((e=>e.value===this.initialSelectedValue)))||void 0===t?void 0:t.label:"";r.DOM.queueUpdate((()=>{this.select.value=e})),this.initalSelectedValueInitialized=!0}}else{const e=document.createElement(this.optionElement);e.textContent=this.emptyDataLabel,e.value="",e.disabled=!0,this.select.appendChild(e)}}handleStreamInserts(e){ae.debug("handleStreamInserts - Method not implemented.")}handleStreamDeletes(e){ae.debug("handleStreamDeletes - Method not implemented.")}handleStreamUpdates(e){ae.debug("handleStreamUpdates - Method not implemented.")}};(0,x.__decorate)([(0,r.attr)({attribute:"label-field"})],kt.prototype,"labelField",void 0),(0,x.__decorate)([(0,r.attr)({attribute:"option-element"})],kt.prototype,"optionElement",void 0),(0,x.__decorate)([(0,r.attr)({attribute:"value-field"})],kt.prototype,"valueField",void 0),(0,x.__decorate)([(0,r.attr)({attribute:"empty-data-label"})],kt.prototype,"emptyDataLabel",void 0),(0,x.__decorate)([r.observable],kt.prototype,"labelFormatter",void 0),(0,x.__decorate)([r.observable],kt.prototype,"initialSelectedValue",void 0),kt=Ft=(0,x.__decorate)([(0,r.customElement)({name:"options-datasource"})],kt);const _t=(e,t)=>r.css`
498
+ `,Qe=(e,t)=>(0,n.checkboxTemplate)(e,t);class Je extends s.Checkbox{}const et=void 0,tt={checkedIndicator:'\n <svg\n aria-hidden="true"\n part="checked-indicator"\n class="checked-indicator"\n viewBox="0 0 20 20"\n xmlns="http://www.w3.org/2000/svg"\n >\n <path\n fill-rule="evenodd"\n clip-rule="evenodd"\n d="M8.143 12.6697L15.235 4.5L16.8 5.90363L8.23812 15.7667L3.80005 11.2556L5.27591 9.7555L8.143 12.6697Z"\n />\n </svg>\n ',indeterminateIndicator:'\n <div part="indeterminate-indicator" class="indeterminate-indicator"></div>\n '},ot=Je.compose(Object.assign({baseName:"checkbox",template:Qe,styles:Ze,shadowOptions:et},tt));var it=o(39087),at=o(62051),nt=o.n(at),st=o(96730),rt=o(21281),lt=o(34193),dt=o(61503),ct=o(60949),ut=o(97156);class pt extends n.FoundationElement{constructor(){super(...arguments),this.withGridInit=!0,this.isSnapshot=!1,this.maxRows=it.OD.MAX_ROWS_250,this.maxView=it.OD.MAX_VIEW_1000,this.reverse=!1,this.rowId="ROW_REF",this.withTimestampFormatting=!0,this.requiresFullDataRefresh=!0,this.rowsSyncedWithStream=new Map,this.dataSubWasLoggedOff=!1,this.criteriaFromFilters=new Map,this.update=new ut.t(new Map)}criteriaChanged(e,t){const o=e!==(0,st.Q)(t,";");this.datasource.initialized&&o&&(this.dataSub&&(this.dataSub.unsubscribe(),this.dataSub=void 0),this.fetchGenesisData(null))}dataChanged(e){e&&(this.clearData(),this.reset())}set datasourceConfig(e){e&&Object.keys(e).forEach((t=>{void 0!==e[t]&&(this[t]=e[t])}))}disconnectedCallback(){var e,t;super.disconnectedCallback(),this.clearData(),null===(e=this.dataSub)||void 0===e||e.unsubscribe(),null===(t=this.update)||void 0===t||t.unsubscribe(),delete this.dataSub,delete this.update,this.datasource.destroy(),delete this.datasource}reset(){this.requiresFullDataRefresh=!0,this.fetchGenesisData()}fetchGenesisData(e=!0){return(0,x.__awaiter)(this,void 0,void 0,(function*(){if(this.data)return void this.syncComponentData(this.data);const t=e||!this.datasource.initialized;t||(this.connect.dataLogoff(this.sourceRef),this.clearData());if(yield this.datasource.init(this.datasourceOptions(),t))if(this.isSnapshot){const e=yield this.datasource.snapshotFiltered();this.syncComponentData(e)}else ae.debug(`requesting stream for ${this.resourceName}`),this.dataSub=this.datasource.stream.subscribe((e=>{e.DISCONNECTED&&this.handleError({message:`Genesis Datasource disconnected for ${this.resourceName}`,loggerType:"error"}),this.sourceRef=e.SOURCE_REF;const t=e.MESSAGE_TYPE;if(t&&t===rt.Go.LOGOFF_ACK)this.dataSubWasLoggedOff=!0;else if(this.dataSubWasLoggedOff=!1,e.ROW){const t=(0,lt.d)(e);this.handleStreamUpdate(t)}else this.handleStreamUpdate(e)}));else this.handleError({message:`Genesis Datasource init failed for ${this.resourceName}`,loggerType:"error"})}))}initDatasource(){return(0,x.__awaiter)(this,void 0,void 0,(function*(){yield this.datasource.init(this.datasourceOptions(),!0)}))}datasourceOptions(){return{criteria:this.buildCriteria(),fields:this.fields,isSnapshot:this.isSnapshot,orderBy:this.orderBy,resourceName:this.resourceName,request:this.request,reverse:this.reverse,maxRows:this.maxRows,maxView:this.maxView}}handleStreamUpdate(e){if(!e)return;e.hasOwnProperty("REPLY")?this.applyRequestServerData(e):this.applyDataserverData(e)}applyRequestServerData(e){var t,o;if(!Array.isArray(e.REPLY)||!(null===(t=e.MESSAGE_TYPE)||void 0===t?void 0:t.startsWith("REP_")))return void this.handleError({message:"received invalid RequestServerResult",loggerType:"error",loggerArgs:[e]});if(this.requiresFullDataRefresh){"ROW_REF"!==this.rowId&&(null===(o=e.REPLY)||void 0===o||o.forEach((e=>{this.rowsSyncedWithStream.set(e[this.rowId],e)})));const t=this.rowsSyncedWithStream.size>0?Array.from(this.rowsSyncedWithStream.values()):e.REPLY;return void this.syncComponentData(t)}this.handleStreamInserts(e.REPLY);const i=Array.from(this.rowsSyncedWithStream.values()).filter((t=>!e.REPLY.includes(t)));this.handleStreamDeletes(i)}applyDataserverData(e){var t,o,i,a;if(this.requiresFullDataRefresh){null===(t=e.inserts)||void 0===t||t.forEach((e=>{this.rowsSyncedWithStream.set(e[this.rowId],e)}));const o=Array.from(this.rowsSyncedWithStream.values());this.syncComponentData(o)}else(null===(o=e.inserts)||void 0===o?void 0:o.length)>0&&this.handleStreamInserts(e.inserts),(null===(i=e.deletes)||void 0===i?void 0:i.length)>0&&this.handleStreamDeletes(e.deletes),(null===(a=e.updates)||void 0===a?void 0:a.length)>0&&this.handleStreamUpdates(e.updates)}buildCriteria(){var e;const t=(null===(e=this.criteria)||void 0===e?void 0:e.split(";"))||[];return(0,st.Q)(t.join(" && "),";")}setFilter(e,t){this.criteriaFromFilters.set(e,t),this.update.next(this.criteriaFromFilters)}removeFilter(e){this.criteriaFromFilters.delete(e),this.update.next(this.criteriaFromFilters)}handleError(e={}){const{message:t,loggerType:o,loggerArgs:i=[]}=e;t&&ae[o](t,...i)}}(0,x.__decorate)([dt.dm],pt.prototype,"connect",void 0),(0,x.__decorate)([ct.yW],pt.prototype,"datasource",void 0),(0,x.__decorate)([(0,r.attr)({mode:"boolean"})],pt.prototype,"withGridInit",void 0),(0,x.__decorate)([r.attr],pt.prototype,"criteria",void 0),(0,x.__decorate)([r.observable],pt.prototype,"data",void 0),(0,x.__decorate)([r.attr],pt.prototype,"fields",void 0),(0,x.__decorate)([(0,r.attr)({mode:"boolean"})],pt.prototype,"isSnapshot",void 0),(0,x.__decorate)([r.attr],pt.prototype,"maxRows",void 0),(0,x.__decorate)([r.attr],pt.prototype,"maxView",void 0),(0,x.__decorate)([r.attr],pt.prototype,"orderBy",void 0),(0,x.__decorate)([r.attr],pt.prototype,"resourceName",void 0),(0,x.__decorate)([(0,r.attr)({mode:"boolean"})],pt.prototype,"reverse",void 0),(0,x.__decorate)([r.attr],pt.prototype,"rowId",void 0),(0,x.__decorate)([(0,r.attr)({mode:"boolean",attribute:"with-timestamp-formatting"})],pt.prototype,"withTimestampFormatting",void 0);const ht=(0,ie.createLogger)("foundation-criteria");var mt;!function(e){e.AND="&&",e.OR="||",e.NOT="!",e.GT=">",e.GE=">=",e.LT="<",e.LE="<=",e.NE="!=",e.EQ="=="}(mt||(mt={}));class vt{constructor(e){this.$$operator=e}static And(){return new vt(mt.AND)}static Or(){return new vt(mt.OR)}static Not(){return new vt(mt.NOT)}static GreaterThan(){return new vt(mt.GT)}static GreaterThanOrEqual(){return new vt(mt.GE)}static LessThan(){return new vt(mt.LT)}static LessThanOrEqual(){return new vt(mt.LE)}static NotEqual(){return new vt(mt.NE)}static Equal(){return new vt(mt.EQ)}get operator(){return this.$$operator}}const gt="default";class ft{constructor(){this.expressions={},this.And=(e,t={})=>this.withExpression(e,t,vt.And()),this.Or=(e,t={})=>this.withExpression(e,t,vt.Or()),this.Not=(e,t={})=>this.withExpression(e,t,vt.Not())}withExpression(e,t={},o=vt.And()){const{condition:i,join:a,groupName:n}=t,s=(e,t=gt)=>{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 vt;return t&&ht.warn("Inline joins will be discarded when join is defined in ExpressionOptions"),!t}));if(n)t.forEach((e=>{s(e,n)}));else{const e=(r=a,t.flat().flatMap(((e,t,o)=>o.length-1!==t?[e,r]:e)));s(e,gt)}}else s(e,gt);else s(e,"string"==typeof e?gt:e.group);var r;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 vt){if(o[t-1]instanceof vt)throw new Error("Adjacent Join operations detected")}})),i.push(`(${e.map((e=>this.parseExpression(e,void 0))).join("")})`)):e instanceof vt?i.push(` ${e.operator} `):e&&i.push(e.serialiser(e)),i.join("")}}const bt=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},yt=e=>t=>`${t.field} ${e} ${bt(t)}`,xt=e=>yt(mt.EQ)(e),wt=e=>`Expr.containsIgnoreCase(${e.field}, ${bt(e)})`;class $t{constructor(e){this.serialiser=xt,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}}function St(e,t){var o;const i=new ft;i.withExpression((new $t).withField(null!==(o=e.labelField)&&void 0!==o?o:e.valueField).withValue(t).withSerialiser(wt).build()),e.criteria=i.build()}function Ct(e,t){var o;const i=null!==(o=e.labelField)&&void 0!==o?o:e.valueField;e.request={[i]:`${t}*`},e.fetchGenesisData(!1)}var Ft;let kt=Ft=class extends pt{constructor(){super(...arguments),this.emptyDataLabel="No matching records",this.initalSelectedValueInitialized=!1,this.isSnapshot=!0}initialSelectedValueChanged(e,t){t&&(this.initalSelectedValueInitialized=!1)}connectedCallback(){const e=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});var t,o;return(0,x.__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.optionElement=null!==(o=this.optionElement)&&void 0!==o?o:`${k(this.select)}-option`,this.select.addEventListener("change",(e=>{var t;const o=null===(t=this.options)||void 0===t?void 0:t.find((t=>t.label===e.target.value));this.select.$emit("value-change",o)})),this.select&&this.valueField&&(this.resourceName&&this.connect.isConnected||this.data)&&(this.select instanceof s.Combobox&&this.select.async&&this.initialSelectedValue?this.asyncModeIntialization():this.fetchGenesisData()),this.valueField||ae.warn('Specify field for values in options (e.g value-field="VALUE") and optionally field for label (e.g label-field="NAME")')}))}asyncModeIntialization(){return(0,x.__awaiter)(this,void 0,void 0,(function*(){yield this.datasource.init(this.datasourceOptions(),!0);const e=this.datasource.resourceType;e===it.vt.DATASERVER&&St(this,this.initialSelectedValue),e===it.vt.REQUEST_SERVER&&Ct(this,this.initialSelectedValue)}))}clearData(){Array.from(this.select.children).forEach((e=>{e instanceof Ft||this.select.removeChild(e)})),this.select.value="",this.select.initialValue=""}syncComponentData(e){var t;const o=null!=e?e:Array.from(this.rowsSyncedWithStream.values());if(o.length>0){this.options=o.map((e=>({value:e[this.valueField],label:this.labelFormatter?this.labelFormatter(e[this.labelField]):e[this.labelField]})));if(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)})),!this.initalSelectedValueInitialized){const e=this.initialSelectedValue||0===this.initialSelectedValue?null===(t=this.options.find((e=>e.value===this.initialSelectedValue)))||void 0===t?void 0:t.label:"";r.DOM.queueUpdate((()=>{this.select.value=e})),this.initalSelectedValueInitialized=!0}}else{const e=document.createElement(this.optionElement);e.textContent=this.emptyDataLabel,e.value="",e.disabled=!0,this.select.appendChild(e)}}handleStreamInserts(e){ae.debug("handleStreamInserts - Method not implemented.")}handleStreamDeletes(e){ae.debug("handleStreamDeletes - Method not implemented.")}handleStreamUpdates(e){ae.debug("handleStreamUpdates - Method not implemented.")}};(0,x.__decorate)([(0,r.attr)({attribute:"label-field"})],kt.prototype,"labelField",void 0),(0,x.__decorate)([(0,r.attr)({attribute:"option-element"})],kt.prototype,"optionElement",void 0),(0,x.__decorate)([(0,r.attr)({attribute:"value-field"})],kt.prototype,"valueField",void 0),(0,x.__decorate)([(0,r.attr)({attribute:"empty-data-label"})],kt.prototype,"emptyDataLabel",void 0),(0,x.__decorate)([r.observable],kt.prototype,"labelFormatter",void 0),(0,x.__decorate)([r.observable],kt.prototype,"initialSelectedValue",void 0),kt=Ft=(0,x.__decorate)([(0,r.customElement)({name:"options-datasource"})],kt);const _t=(e,t)=>r.css`
499
499
  .combo-box-indicator {
500
500
  transition-property: transform;
501
501
  transition-duration: 0.2s;
@@ -865,11 +865,13 @@
865
865
  }
866
866
 
867
867
  :host {
868
+ --dialog-close-icon-display: block;
868
869
  --dialog-min-width: 358px;
869
870
  --notification-details-min-height: 40px;
870
871
  }
871
872
 
872
873
  .close-icon {
874
+ display: var(--dialog-close-icon-display);
873
875
  position: absolute;
874
876
  right: calc(var(--design-unit) * 2px);
875
877
  top: calc(var(--design-unit) * 2px);
@@ -3744,4 +3746,4 @@
3744
3746
  <slot></slot>
3745
3747
  </template>
3746
3748
  `;var du;!function(e){e.NOTIFICATION_EVENT="notification-event"}(du||(du={}));const cu={mode:"open",delegatesFocus:!0};class uu 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,x.__awaiter)(this,void 0,void 0,(function*(){if(e.connectedCallback.call(this),this.addEventListener(du.NOTIFICATION_EVENT,(e=>{e.stopImmediatePropagation(),Fa(e.detail,this.tagName,this.notificationListener)})),this.resourceName){if(!(yield this.datasource.init({resourceName:this.resourceName},!0)))return void ae.debug(`Genesis Datasource init failed for ${this.resourceName}`);this.dataSub=null===(t=this.datasource.stream)||void 0===t?void 0:t.subscribe((e=>{e.ROW&&e.SEQUENCE_ID>1&&this.handleStreamUpdate((0,lt.d)(e))}))}}))}disconnectedCallback(){var e,t;super.disconnectedCallback(),null===(e=this.dataSub)||void 0===e||e.unsubscribe(),delete this.dataSub,null===(t=this.datasource)||void 0===t||t.destroy(),delete this.datasource}handleStreamUpdate(e){const t=e.inserts;t.length>0&&t.forEach((e=>{const{HEADER:t,MESSAGE:o,NOTIFY_SEVERITY:i}=e,a=e.CREATED_AT?new Date(e.CREATED_AT):void 0,n=e.EXPIRY?e.EXPIRY-e.CREATED_AT:void 0;let s=[];this.toastButtons&&this.toastButtons.length>0&&(s=this.toastButtons.filter((({condition:t})=>!t||t({details:e}))));((e,t,o)=>{if(!e.title)throw new Error("Title is required");if(!e.body)throw new Error("Missing required param 'body'");let i={title:e.title,body:e.body},a={};e.createdAt&&(i=Object.assign({createdAt:e.createdAt},i)),e.logLevel in ie.LogLevel&&(i=Object.assign({logLevel:e.logLevel},i)),e.toast&&(a=Object.assign({toast:e.toast},a),i=Object.assign({config:a},i)),Sa(i,t,o)})({title:t,body:o,createdAt:a,toast:{details:e,type:null==i?void 0:i.toLowerCase(),buttons:s,autoClose:void 0!==n?!!n:!!this.closeTimeout,closeTimeout:null!=n?n:this.closeTimeout}},this.tagName)}))}}(0,x.__decorate)([r.observable],uu.prototype,"notificationListener",void 0),(0,x.__decorate)([(0,r.attr)({attribute:"resource-name"})],uu.prototype,"resourceName",void 0),(0,x.__decorate)([(0,r.attr)({attribute:"close-timeout",converter:r.nullableNumberConverter})],uu.prototype,"closeTimeout",void 0),(0,x.__decorate)([r.observable],uu.prototype,"toastButtons",void 0),(0,x.__decorate)([ct.yW],uu.prototype,"datasource",void 0);const pu=uu.compose({baseName:"notification-listener",template:lu,shadowOptions:cu}),hu=(e,t)=>o=>{const i="function"==typeof t?t:(a=t,e=>Object.assign(Object.assign({},a),e));var a;return r.FASTElement.define(class extends e{},i(o))};function mu(e){if("string"==typeof e)return e;if("function"==typeof e&&!(e=r.FASTElementDefinition.forType(e)))throw new Error("Missing FASTElement definition.");return e.name}const vu=e=>!e.navId||"header"===e.navId,gu=10;function fu(e,t=vu,o=gu){const i=[];return e.filter((e=>e.navItems&&e.navItems.some(t))).forEach(((e,a)=>{e.navItems.filter(t).map(((t,i)=>{var n,s,r,l;const d=null!==(n=t.placementIndex)&&void 0!==n?n:a*o+i;return Object.assign(Object.assign({},t),{navId:null!==(s=t.navId)&&void 0!==s?s:"header",placementIndex:d,routePath:null!==(r=t.routePath)&&void 0!==r?r:e.path,routeName:null!==(l=t.routeName)&&void 0!==l?l:e.name})})).forEach((e=>i.push(e)))})),i.sort(((e,t)=>e.placementIndex-t.placementIndex))}var bu,yu=o(63734);!function(e){e.controlClicked="controlClicked",e.routeChanged="routeChanged"}(bu||(bu={}));class xu{constructor(e){this.analytics=(0,yu.Ay)(e)}trackEvent(e,t){pa.v.debug(`FoundationAnalytics.trackEvent ${e} : ${JSON.stringify(t)}`),this.analytics.track(e,t)}}const wu=n.DI.createInterface((e=>e.singleton(xu)));var $u=o(3479),Su=o(80751),Cu=o(98647);let Fu=class extends($u.Ix.from(r.FASTElement)){connectedCallback(){super.connectedCallback(),r.DOM.queueUpdate((()=>(0,x.__awaiter)(this,void 0,void 0,(function*(){this.$router.config=this.config}))))}};Fu=(0,x.__decorate)([(0,r.customElement)({name:"foundation-router"})],Fu);class ku extends Su.s{constructor(){super(...arguments),this.definitions=[]}map(...e){this.definitions=[...this.definitions,...e],super.map(...e)}}(0,x.__decorate)([r.observable],ku.prototype,"definitions",void 0);class _u extends Cu.Y{constructor(){super(...arguments),this.routes=new ku(this)}getNavItems(e=vu){return fu(this.routes.definitions,e)}configureAnalytics(){this.contributors.push({navigate:e=>(0,x.__awaiter)(this,void 0,void 0,(function*(){this.analytics.trackEvent(bu.routeChanged,{path:e.route.endpoint.path})}))})}construct(e){return this.container.get(e)}}(0,x.__decorate)([n.Container],_u.prototype,"container",void 0),(0,x.__decorate)([wu],_u.prototype,"analytics",void 0);const Ou=()=>$r().register(nu)}}]);
3747
- //# sourceMappingURL=531.8ac8553d29c90734268ff95945814785.js.map
3749
+ //# sourceMappingURL=531.e6d91ce7bdc2b6479fedb9ac685ea0c2.js.map