@genesislcap/design-system-configurator 14.206.0 → 14.206.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.
Files changed (22) hide show
  1. package/dist/{279.279.597e7e36aac29e547eb1.js → 279.279.59a0bb60d2a19b25f952.js} +1 -1
  2. package/dist/{427.427.6265b8c07578f9308a5f.js → 427.427.0258a853df774de02ef1.js} +6 -6
  3. package/dist/427.9e86595228018350b8e52b12adddd9b6.js.map +1 -0
  4. package/dist/{531.531.9c331649a8b461866000.js → 531.531.8dd1a3f8dcfee20008a4.js} +3 -3
  5. package/dist/531.e1b8daa0b72c12ae460f12276e6c57a1.js.map +1 -0
  6. package/dist/{548.548.7bf0b0107c440fd274e6.js → 548.548.28aa63fe3c690ad56815.js} +2 -2
  7. package/dist/{548.1302eba0ac52ed9874e55977e489e1e8.js.map → 548.f67e6a5522e2599ebf40ecbcc26dbe94.js.map} +1 -1
  8. package/dist/653.653.41663088aed23c6d00bf.js +2 -0
  9. package/dist/{653.cda2755851515fbf4ce54a3f75f7351b.js.map → 653.cd79d6d50e9f0dfe8ed96f08357afbae.js.map} +1 -1
  10. package/dist/{698.698.cbdaf986834df3cce530.js → 698.698.99b30e1492df1c38e5bc.js} +1 -1
  11. package/dist/designSystemConfigurator.785196a4d4ce8dfc9ff4a8ea54caa20a.js.map +1 -0
  12. package/dist/index.html +1 -1
  13. package/dist/main.49348b84da5048ad55da29093820c3c1.js.map +1 -0
  14. package/dist/main.d1b247679fa695ed1e8c.js +2 -0
  15. package/dist/remoteEntry.js +2 -2
  16. package/package.json +12 -12
  17. package/dist/427.c37e61f3dc3539bda8c47bedb4342994.js.map +0 -1
  18. package/dist/531.a8c05b40605719dd15ac2d9b6cfa4bda.js.map +0 -1
  19. package/dist/653.653.0734576ecb9fe3e009f7.js +0 -2
  20. package/dist/designSystemConfigurator.cdb9c719ef9a93be8df40911e717f352.js.map +0 -1
  21. package/dist/main.77b905dedb0d112cd5d232fa34d1b13f.js.map +0 -1
  22. package/dist/main.c66826b03283530ccad1.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(14371);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(26512);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(40370),rt=o(6884),lt=o(96730),dt=o(21281),ct=o(34193),ut=o(43543),ht=o(9033),pt=o(97156);class mt extends((0,st.C)(n.FoundationElement)){constructor(){super(...arguments),this.withGridInit=!0,this.isSnapshot=!1,this.maxRows=rt.OD.MAX_ROWS_250,this.maxView=rt.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 pt.t(new Map)}criteriaChanged(e,t){const o=e!==(0,lt.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===dt.Go.LOGOFF_ACK)this.dataSubWasLoggedOff=!0;else if(this.dataSubWasLoggedOff=!1,e.ROW){const t=(0,ct.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,lt.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)([ut.dm],mt.prototype,"connect",void 0),(0,x.__decorate)([ht.yW],mt.prototype,"datasource",void 0),(0,x.__decorate)([(0,r.attr)({mode:"boolean"})],mt.prototype,"withGridInit",void 0),(0,x.__decorate)([r.attr],mt.prototype,"criteria",void 0),(0,x.__decorate)([r.observable],mt.prototype,"data",void 0),(0,x.__decorate)([r.attr],mt.prototype,"fields",void 0),(0,x.__decorate)([(0,r.attr)({mode:"boolean"})],mt.prototype,"isSnapshot",void 0),(0,x.__decorate)([r.attr],mt.prototype,"maxRows",void 0),(0,x.__decorate)([r.attr],mt.prototype,"maxView",void 0),(0,x.__decorate)([r.attr],mt.prototype,"orderBy",void 0),(0,x.__decorate)([r.attr],mt.prototype,"resourceName",void 0),(0,x.__decorate)([(0,r.attr)({mode:"boolean"})],mt.prototype,"reverse",void 0),(0,x.__decorate)([r.attr],mt.prototype,"rowId",void 0),(0,x.__decorate)([(0,r.attr)({mode:"boolean",attribute:"with-timestamp-formatting"})],mt.prototype,"withTimestampFormatting",void 0);const vt=(0,ie.createLogger)("foundation-criteria");var gt;!function(e){e.AND="&&",e.OR="||",e.NOT="!",e.GT=">",e.GE=">=",e.LT="<",e.LE="<=",e.NE="!=",e.EQ="=="}(gt||(gt={}));class ft{constructor(e){this.$$operator=e}static And(){return new ft(gt.AND)}static Or(){return new ft(gt.OR)}static Not(){return new ft(gt.NOT)}static GreaterThan(){return new ft(gt.GT)}static GreaterThanOrEqual(){return new ft(gt.GE)}static LessThan(){return new ft(gt.LT)}static LessThanOrEqual(){return new ft(gt.LE)}static NotEqual(){return new ft(gt.NE)}static Equal(){return new ft(gt.EQ)}get operator(){return this.$$operator}}const bt="default";class yt{constructor(){this.expressions={},this.And=(e,t={})=>this.withExpression(e,t,ft.And()),this.Or=(e,t={})=>this.withExpression(e,t,ft.Or()),this.Not=(e,t={})=>this.withExpression(e,t,ft.Not())}withExpression(e,t={},o=ft.And()){const{condition:i,join:a,groupName:n}=t,s=(e,t=bt)=>{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 ft;return t&&vt.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,bt)}}else s(e,bt);else s(e,"string"==typeof e?bt: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 ft){if(o[t-1]instanceof ft)throw new Error("Adjacent Join operations detected")}})),i.push(`(${e.map((e=>this.parseExpression(e,void 0))).join("")})`)):e instanceof ft?i.push(` ${e.operator} `):e&&i.push(e.serialiser(e)),i.join("")}}const xt=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},wt=e=>t=>`${t.field} ${e} ${xt(t)}`,$t=e=>wt(gt.EQ)(e),St=e=>`Expr.containsIgnoreCase(${e.field}, ${xt(e)})`;class Ct{constructor(e){this.serialiser=$t,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 kt(e,t){var o;const i=new yt;i.withExpression((new Ct).withField(null!==(o=e.labelField)&&void 0!==o?o:e.valueField).withValue(t).withSerialiser(St).build()),e.criteria=i.build()}function Ft(e,t){var o;const i=null!==(o=e.labelField)&&void 0!==o?o:e.valueField;e.request={[i]:`${t}*`},e.fetchGenesisData(!1)}var _t;let Ot=_t=class extends mt{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:`${F(this.select)}-option`,this.select.addEventListener("change",(e=>{var t;const o=null===(t=this.options)||void 0===t?void 0:t.find((t=>String(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.v.DATASERVER&&kt(this,this.initialSelectedValue),e===it.v.REQUEST_SERVER&&Ft(this,this.initialSelectedValue)}))}clearData(){Array.from(this.select.children).forEach((e=>{e instanceof _t||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"})],Ot.prototype,"labelField",void 0),(0,x.__decorate)([(0,r.attr)({attribute:"option-element"})],Ot.prototype,"optionElement",void 0),(0,x.__decorate)([(0,r.attr)({attribute:"value-field"})],Ot.prototype,"valueField",void 0),(0,x.__decorate)([(0,r.attr)({attribute:"empty-data-label"})],Ot.prototype,"emptyDataLabel",void 0),(0,x.__decorate)([r.observable],Ot.prototype,"labelFormatter",void 0),(0,x.__decorate)([r.observable],Ot.prototype,"initialSelectedValue",void 0),Ot=_t=(0,x.__decorate)([(0,r.customElement)({name:"options-datasource"})],Ot);const Dt=(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(40370),rt=o(6884),lt=o(96730),dt=o(21281),ct=o(34193),ut=o(43543),ht=o(9033),pt=o(97156);class mt extends((0,st.C)(n.FoundationElement)){constructor(){super(...arguments),this.withGridInit=!0,this.isSnapshot=!1,this.maxRows=rt.OD.MAX_ROWS_250,this.maxView=rt.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 pt.t(new Map)}criteriaChanged(e,t){const o=e!==(0,lt.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===dt.Go.LOGOFF_ACK)this.dataSubWasLoggedOff=!0;else if(this.dataSubWasLoggedOff=!1,e.ROW){const t=(0,ct.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,lt.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)([ut.dm],mt.prototype,"connect",void 0),(0,x.__decorate)([ht.yW],mt.prototype,"datasource",void 0),(0,x.__decorate)([(0,r.attr)({mode:"boolean"})],mt.prototype,"withGridInit",void 0),(0,x.__decorate)([r.attr],mt.prototype,"criteria",void 0),(0,x.__decorate)([r.observable],mt.prototype,"data",void 0),(0,x.__decorate)([r.attr],mt.prototype,"fields",void 0),(0,x.__decorate)([(0,r.attr)({mode:"boolean"})],mt.prototype,"isSnapshot",void 0),(0,x.__decorate)([r.attr],mt.prototype,"maxRows",void 0),(0,x.__decorate)([r.attr],mt.prototype,"maxView",void 0),(0,x.__decorate)([r.attr],mt.prototype,"orderBy",void 0),(0,x.__decorate)([r.attr],mt.prototype,"resourceName",void 0),(0,x.__decorate)([(0,r.attr)({mode:"boolean"})],mt.prototype,"reverse",void 0),(0,x.__decorate)([r.attr],mt.prototype,"rowId",void 0),(0,x.__decorate)([(0,r.attr)({mode:"boolean",attribute:"with-timestamp-formatting"})],mt.prototype,"withTimestampFormatting",void 0);const vt=(0,ie.createLogger)("foundation-criteria");var gt;!function(e){e.AND="&&",e.OR="||",e.NOT="!",e.GT=">",e.GE=">=",e.LT="<",e.LE="<=",e.NE="!=",e.EQ="=="}(gt||(gt={}));class ft{constructor(e){this.$$operator=e}static And(){return new ft(gt.AND)}static Or(){return new ft(gt.OR)}static Not(){return new ft(gt.NOT)}static GreaterThan(){return new ft(gt.GT)}static GreaterThanOrEqual(){return new ft(gt.GE)}static LessThan(){return new ft(gt.LT)}static LessThanOrEqual(){return new ft(gt.LE)}static NotEqual(){return new ft(gt.NE)}static Equal(){return new ft(gt.EQ)}get operator(){return this.$$operator}}const bt="default";class yt{constructor(){this.expressions={},this.And=(e,t={})=>this.withExpression(e,t,ft.And()),this.Or=(e,t={})=>this.withExpression(e,t,ft.Or()),this.Not=(e,t={})=>this.withExpression(e,t,ft.Not())}withExpression(e,t={},o=ft.And()){const{condition:i,join:a,groupName:n}=t,s=(e,t=bt)=>{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 ft;return t&&vt.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,bt)}}else s(e,bt);else s(e,"string"==typeof e?bt: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 ft){if(o[t-1]instanceof ft)throw new Error("Adjacent Join operations detected")}})),i.push(`(${e.map((e=>this.parseExpression(e,void 0))).join("")})`)):e instanceof ft?i.push(` ${e.operator} `):e&&i.push(e.serialiser(e)),i.join("")}}const xt=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},wt=e=>t=>`${t.field} ${e} ${xt(t)}`,$t=e=>wt(gt.EQ)(e),St=e=>`Expr.containsIgnoreCase(${e.field}, ${xt(e)})`;class Ct{constructor(e){this.serialiser=$t,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 kt(e,t){var o;const i=new yt;i.withExpression((new Ct).withField(null!==(o=e.labelField)&&void 0!==o?o:e.valueField).withValue(t).withSerialiser(St).build()),e.criteria=i.build()}function Ft(e,t){var o;const i=null!==(o=e.labelField)&&void 0!==o?o:e.valueField;e.request={[i]:`${t}*`},e.fetchGenesisData(!1)}var _t;let Ot=_t=class extends mt{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:`${F(this.select)}-option`,this.select.addEventListener("change",(e=>{var t;const o=null===(t=this.options)||void 0===t?void 0:t.find((t=>String(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.v.DATASERVER&&kt(this,this.initialSelectedValue),e===it.v.REQUEST_SERVER&&Ft(this,this.initialSelectedValue)}))}clearData(){Array.from(this.select.children).forEach((e=>{e instanceof _t||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=String(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"})],Ot.prototype,"labelField",void 0),(0,x.__decorate)([(0,r.attr)({attribute:"option-element"})],Ot.prototype,"optionElement",void 0),(0,x.__decorate)([(0,r.attr)({attribute:"value-field"})],Ot.prototype,"valueField",void 0),(0,x.__decorate)([(0,r.attr)({attribute:"empty-data-label"})],Ot.prototype,"emptyDataLabel",void 0),(0,x.__decorate)([r.observable],Ot.prototype,"labelFormatter",void 0),(0,x.__decorate)([r.observable],Ot.prototype,"initialSelectedValue",void 0),Ot=_t=(0,x.__decorate)([(0,r.customElement)({name:"options-datasource"})],Ot);const Dt=(e,t)=>r.css`
499
499
  .combo-box-indicator {
500
500
  transition-property: transform;
501
501
  transition-duration: 0.2s;
@@ -3783,4 +3783,4 @@
3783
3783
  <slot></slot>
3784
3784
  </template>
3785
3785
  `;var mu;!function(e){e.NOTIFICATION_EVENT="notification-event"}(mu||(mu={}));const vu={mode:"open",delegatesFocus:!0};class gu 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(mu.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,ct.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=>{this.showNotificationToast(e)}))}showNotificationToast(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)),Ca(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],gu.prototype,"notificationListener",void 0),(0,x.__decorate)([(0,r.attr)({attribute:"resource-name"})],gu.prototype,"resourceName",void 0),(0,x.__decorate)([(0,r.attr)({attribute:"close-timeout",converter:r.nullableNumberConverter})],gu.prototype,"closeTimeout",void 0),(0,x.__decorate)([r.observable],gu.prototype,"toastButtons",void 0),(0,x.__decorate)([ht.yW],gu.prototype,"datasource",void 0);const fu=gu.compose({baseName:"notification-listener",template:pu,shadowOptions:vu}),bu=(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 yu(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 xu=e=>!e.navId||"header"===e.navId||"side-nav"===e.navId,wu=10;function $u(e,t=xu,o=wu){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 Su,Cu=o(63734);!function(e){e.controlClicked="controlClicked",e.routeChanged="routeChanged"}(Su||(Su={}));class ku{constructor(e){this.analytics=(0,Cu.Ay)(e)}trackEvent(e,t){pa.v.debug(`FoundationAnalytics.trackEvent ${e} : ${JSON.stringify(t)}`),this.analytics.track(e,t)}}const Fu=n.DI.createInterface((e=>e.singleton(ku)));var _u=o(3479),Ou=o(80751),Du=o(98647);let Tu=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}))))}};Tu=(0,x.__decorate)([(0,r.customElement)({name:"foundation-router"})],Tu);class Lu extends Ou.s{constructor(){super(...arguments),this.definitions=[]}map(...e){this.definitions=[...e,...this.definitions],super.map(...e)}}(0,x.__decorate)([r.observable],Lu.prototype,"definitions",void 0);class Eu extends Du.Y{constructor(){super(...arguments),this.routes=new Lu(this)}getNavItems(e=xu){return $u(this.routes.definitions,e)}configureAnalytics(){this.contributors.push({navigate:e=>(0,x.__awaiter)(this,void 0,void 0,(function*(){this.analytics.trackEvent(Su.routeChanged,{path:e.route.endpoint.path})}))})}construct(e){return this.container.get(e)}}(0,x.__decorate)([n.Container],Eu.prototype,"container",void 0),(0,x.__decorate)([Fu],Eu.prototype,"analytics",void 0),(0,x.__decorate)([er.KJ],Eu.prototype,"user",void 0);const Au=()=>_r().register(cu)}}]);
3786
- //# sourceMappingURL=531.a8c05b40605719dd15ac2d9b6cfa4bda.js.map
3786
+ //# sourceMappingURL=531.e1b8daa0b72c12ae460f12276e6c57a1.js.map