@genesislcap/design-system-configurator 14.209.1 → 14.209.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.
@@ -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(31222);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(97127);const ae=(0,ie.createLogger)("foundation-ui"),ne=r.css`
176
176
  @keyframes delete-animate {
177
177
  from {
178
178
  height: 100px;
@@ -510,13 +510,13 @@
510
510
  `,Tt=(e,t)=>r.html`
511
511
  <template
512
512
  aria-disabled="${e=>e.ariaDisabled}"
513
- autocomplete="${e=>e.autocomplete}"
514
513
  class="${e=>e.open?"open":""} ${e=>e.disabled?"disabled":""} ${e=>e.position}"
515
514
  ?open="${e=>e.open}"
516
- tabindex="${e=>e.disabled?null:"0"}"
517
515
  @click="${(e,t)=>e.clickHandler(t.event)}"
516
+ @focusin="${(e,t)=>e.focusinHandler(t.event)}"
518
517
  @focusout="${(e,t)=>e.focusoutHandler(t.event)}"
519
518
  @keydown="${(e,t)=>e.keydownHandler(t.event)}"
519
+ role="combobox"
520
520
  >
521
521
  <div class="control" part="control">
522
522
  ${(0,n.startSlotTemplate)(e,t)}
@@ -524,14 +524,15 @@
524
524
  <input
525
525
  aria-activedescendant="${e=>e.open?e.ariaActiveDescendant:null}"
526
526
  aria-autocomplete="${e=>e.ariaAutoComplete}"
527
- aria-controls="${e=>e.ariaControls}"
527
+ aria-controls="${e=>e.listboxId}"
528
528
  aria-disabled="${e=>e.ariaDisabled}"
529
529
  aria-expanded="${e=>e.ariaExpanded}"
530
530
  aria-haspopup="listbox"
531
+ autocomplete="${e=>e.autocomplete}"
532
+ tabindex="${e=>e.disabled?null:"0"}"
531
533
  class="selected-value"
532
534
  part="selected-value"
533
535
  placeholder="${e=>e.placeholder}"
534
- role="combobox"
535
536
  type="text"
536
537
  ?disabled="${e=>e.disabled}"
537
538
  :value="${e=>e.value}"
@@ -560,7 +561,7 @@
560
561
  ></slot>
561
562
  </div>
562
563
  </template>
563
- `;var Lt,Et;class At extends s.Combobox{constructor(){super(...arguments),Lt.set(this,void 0),Et.set(this,!1),this.async=!1,this.debounce=500,this.caseSensitive=!1,this.ignoreInputClick=!1}debounceChanged(e,t){this.debouncedInputHandler=nt()(this.asyncSetFilter,t)}get value(){return r.Observable.track(this,"value"),this._ourValue}set value(e){var t,o,i;const a=`${this._ourValue}`;if(this.$fastController.isConnected&&this.options){const a=this.caseSensitive?t=>t.text===e:t=>t.text.toLowerCase()===e.toLowerCase(),n=this.options?this.options.findIndex(a):-1,s=null===(t=this.options[this.selectedIndex])||void 0===t?void 0:t.text,r=null===(o=this.options[n])||void 0===o?void 0:o.text;this.selectedIndex=s!==r?n:this.selectedIndex,e=(null===(i=this.firstSelectedOption)||void 0===i?void 0:i.text)||e}a!==e&&(this._ourValue=e,super.valueChanged(a,e),r.Observable.notify(this,"value"))}slottedOptionsChanged(e,t){const o=!!this.async;super.slottedOptionsChanged(e,t),this.updateValue(o)}filterOptions(){this.autocomplete&&this.autocomplete!==n.ComboboxAutocomplete.none||(this.filter="");const e=this.filter,[t,o]=this.caseSensitive?[e,e=>e.text.startsWith(t)]:[e.toLowerCase(),e=>e.text.toLowerCase().startsWith(t)];this.filteredOptions=this._options.filter(o),this.isAutocompleteList&&(this.filteredOptions.length||t||(this.filteredOptions=this._options),this._options.forEach((e=>e.hidden=!this.filteredOptions.includes(e))))}clickHandler(e){if(!this.disabled)if(C(e,this))this.open=!1;else{if(k(e,this.indicator))return this.open=!this.open,void(this.open&&this.control.focus());if(!this.ignoreInputClick||!k(e,this.control))return super.clickHandler(e)}}keydownHandler(e){const t=e.key;if(e.ctrlKey||e.shiftKey)return!0;switch(t){case"Enter":if((0,x.__classPrivateFieldSet)(this,Et,this.open,"f"),!this.open)return!0;break;case"Escape":if(this.control.value!==this.currentValue)return this.filter="",this.filterOptions(),this.control.value=this.currentValue,this.selectItemByValue(this.currentValue),void(this.open=!1);if(!this.open)return!0}const o=super.keydownHandler(e);return"Enter"!==t?o:void 0}keyupHandler(e){const t=e.key;if(e.ctrlKey||e.shiftKey)return!0;switch(t){case"Enter":return!(0,x.__classPrivateFieldGet)(this,Et,"f");case"ArrowLeft":case"ArrowRight":case"Home":case"End":return;case"Backspace":case"Delete":const t=super.keyupHandler(e);return this.selectItemByValue(this.control.value),t}return super.keyupHandler(e)}get indicator(){return(0,x.__classPrivateFieldGet)(this,Lt,"f")||(0,x.__classPrivateFieldSet)(this,Lt,this.shadowRoot.querySelector('[part="indicator"]'),"f"),(0,x.__classPrivateFieldGet)(this,Lt,"f")}selectItemByValue(e){var t,o,i;this.selectedIndex=null!==(o=null===(t=this.options)||void 0===t?void 0:t.findIndex((t=>t.text===e)))&&void 0!==o?o:-1,null===(i=this.options)||void 0===i||i.forEach(((e,t)=>e.selected=t===this.selectedIndex))}inputHandler(e){this.async?this.debouncedInputHandler():super.inputHandler(e)}asyncSetFilter(){const e=this.slottedDatasource.assignedNodes().filter((e=>e instanceof Ot));if(e.length>0){const t=e[0].datasource.resourceType;t===it.v.DATASERVER&&kt(e[0],this.control.value),t===it.v.REQUEST_SERVER&&Ft(e[0],this.control.value)}else ae.warn("Options-datasource is not connected. Please add a datasource to use this functionality.")}resetCombobox(){this.selectedOptions=[],this.selectedIndex=-1,this.value="",this.control.value="",this.filter="",this.filterOptions()}}Lt=new WeakMap,Et=new WeakMap,(0,x.__decorate)([r.observable],At.prototype,"slottedDatasource",void 0),(0,x.__decorate)([(0,r.attr)({mode:"boolean"})],At.prototype,"async",void 0),(0,x.__decorate)([r.attr],At.prototype,"debounce",void 0),(0,x.__decorate)([(0,r.attr)({mode:"boolean",attribute:"case-sensitive"})],At.prototype,"caseSensitive",void 0),(0,x.__decorate)([(0,r.attr)({mode:"boolean",attribute:"ignore-input-click"})],At.prototype,"ignoreInputClick",void 0);const Nt={delegatesFocus:!0,mode:"open"},Rt={indicator:'\n <svg\n class="combo-box-indicator"\n part="combo-box-indicator"\n viewBox="0 0 12 7"\n xmlns="http://www.w3.org/2000/svg"\n >\n <path\n d="M11.85.65c.2.2.2.5 0 .7L6.4 6.84a.55.55 0 01-.78 0L.14 1.35a.5.5 0 11.71-.7L6 5.8 11.15.65c.2-.2.5-.2.7 0z"\n />\n </svg>\n '},It=At.compose(Object.assign({baseName:"combobox",template:Tt,styles:Dt,shadowOptions:Nt},Rt));var Mt=o(98316);const Ht=(e,t)=>r.css`
564
+ `;var Lt,Et;class At extends s.Combobox{constructor(){super(...arguments),Lt.set(this,void 0),Et.set(this,!1),this.async=!1,this.debounce=500,this.caseSensitive=!1,this.ignoreInputClick=!1}debounceChanged(e,t){this.debouncedInputHandler=nt()(this.asyncSetFilter,t)}get value(){return r.Observable.track(this,"value"),this._ourValue}set value(e){var t,o,i;const a=`${this._ourValue}`;if(this.$fastController.isConnected&&this.options){const a=this.caseSensitive?t=>t.text===e:t=>t.text.toLowerCase()===e.toLowerCase(),n=this.options?this.options.findIndex(a):-1,s=null===(t=this.options[this.selectedIndex])||void 0===t?void 0:t.text,r=null===(o=this.options[n])||void 0===o?void 0:o.text;this.selectedIndex=r&&r!==s?n:this.selectedIndex,e=(null===(i=this.firstSelectedOption)||void 0===i?void 0:i.text)||e}a!==e&&(this._ourValue=e,super.valueChanged(a,e),r.Observable.notify(this,"value"))}slottedOptionsChanged(e,t){const o=!!this.async;super.slottedOptionsChanged(e,t),this.updateValue(o)}filterOptions(){this.autocomplete&&this.autocomplete!==n.ComboboxAutocomplete.none||(this.filter="");const e=this.filter,[t,o]=this.caseSensitive?[e,e=>e.text.startsWith(t)]:[e.toLowerCase(),e=>e.text.toLowerCase().startsWith(t)];this.filteredOptions=this._options.filter(o),this.isAutocompleteList&&(this.filteredOptions.length||t||(this.filteredOptions=this._options),this._options.forEach((e=>e.hidden=!this.filteredOptions.includes(e))))}clickHandler(e){if(!this.disabled)if(C(e,this))this.open=!1;else{if(k(e,this.indicator))return this.open=!this.open,void(this.open&&this.control.focus());if(!this.ignoreInputClick||!k(e,this.control))return super.clickHandler(e)}}keydownHandler(e){const t=e.key;if(e.ctrlKey||e.shiftKey)return!0;switch(t){case"Enter":if((0,x.__classPrivateFieldSet)(this,Et,this.open,"f"),!this.open)return this.open=!0,!0;break;case"ArrowDown":case"ArrowUp":if(!this.open)return this.open=!0,!0;break;case"Escape":if(this.control.value!==this.currentValue)return this.filter="",this.filterOptions(),this.control.value=this.currentValue,this.selectItemByValue(this.currentValue),void(this.open=!1);if(!this.open)return!0}const o=super.keydownHandler(e);return"Enter"!==t?o:void 0}keyupHandler(e){const t=e.key;if(e.ctrlKey||e.shiftKey)return!0;switch(t){case"Enter":return!(0,x.__classPrivateFieldGet)(this,Et,"f");case"ArrowDown":case"ArrowUp":if(this.open&&this.selectedOptions&&1===this.selectedOptions.length){const e=this.selectedOptions[0];return void(this.currentValue=null==e?void 0:e.value)}break;case"Home":case"End":return;case"Backspace":case"Delete":const t=super.keyupHandler(e);return this.selectItemByValue(this.control.value),t}return super.keyupHandler(e)}get indicator(){return(0,x.__classPrivateFieldGet)(this,Lt,"f")||(0,x.__classPrivateFieldSet)(this,Lt,this.shadowRoot.querySelector('[part="indicator"]'),"f"),(0,x.__classPrivateFieldGet)(this,Lt,"f")}selectItemByValue(e){var t,o,i;this.selectedIndex=null!==(o=null===(t=this.options)||void 0===t?void 0:t.findIndex((t=>t.text===e)))&&void 0!==o?o:-1,null===(i=this.options)||void 0===i||i.forEach(((e,t)=>e.selected=t===this.selectedIndex))}inputHandler(e){this.async?this.debouncedInputHandler():super.inputHandler(e)}asyncSetFilter(){const e=this.slottedDatasource.assignedNodes().filter((e=>e instanceof Ot));if(e.length>0){const t=e[0].datasource.resourceType;t===it.v.DATASERVER&&kt(e[0],this.control.value),t===it.v.REQUEST_SERVER&&Ft(e[0],this.control.value)}else ae.warn("Options-datasource is not connected. Please add a datasource to use this functionality.")}resetCombobox(){this.selectedOptions=[],this.selectedIndex=-1,this.value="",this.control.value="",this.filter="",this.filterOptions()}}Lt=new WeakMap,Et=new WeakMap,(0,x.__decorate)([r.observable],At.prototype,"slottedDatasource",void 0),(0,x.__decorate)([(0,r.attr)({mode:"boolean"})],At.prototype,"async",void 0),(0,x.__decorate)([r.attr],At.prototype,"debounce",void 0),(0,x.__decorate)([(0,r.attr)({mode:"boolean",attribute:"case-sensitive"})],At.prototype,"caseSensitive",void 0),(0,x.__decorate)([(0,r.attr)({mode:"boolean",attribute:"ignore-input-click"})],At.prototype,"ignoreInputClick",void 0);const Nt={delegatesFocus:!0,mode:"open"},Rt={indicator:'\n <svg\n class="combo-box-indicator"\n part="combo-box-indicator"\n viewBox="0 0 12 7"\n xmlns="http://www.w3.org/2000/svg"\n >\n <path\n d="M11.85.65c.2.2.2.5 0 .7L6.4 6.84a.55.55 0 01-.78 0L.14 1.35a.5.5 0 11.71-.7L6 5.8 11.15.65c.2-.2.5-.2.7 0z"\n />\n </svg>\n '},It=At.compose(Object.assign({baseName:"combobox",template:Tt,styles:Dt,shadowOptions:Nt},Rt));var Mt=o(98316);const Ht=(e,t)=>r.css`
564
565
  :host {
565
566
  --light-size: 12px;
566
567
  --height: calc(var(--design-unit) * 2px + var(--light-size));
@@ -3028,6 +3029,12 @@
3028
3029
  </template>
3029
3030
  `;class Al extends s.Radio{}const Nl=void 0,Rl={},Il=Al.compose(Object.assign({baseName:"segmented-item",template:El,styles:Ll,shadowOptions:Nl},Rl)),Ml=(e,t)=>r.css`
3030
3031
  ${(0,s.selectStyles)(e,t)}
3032
+
3033
+ :host(:not([size]):not([multiple]):not([open]):focus-visible), :host([multiple]:focus-visible), :host([size]:focus-visible),
3034
+ .control:focus-visible {
3035
+ box-shadow: none;
3036
+ outline: none;
3037
+ }
3031
3038
  `,Hl=(e,t)=>(0,n.selectTemplate)(e,t);class Pl extends s.Select{}const Bl=void 0,zl={indicator:'\n <svg\n class="select-indicator"\n part="select-indicator"\n viewBox="0 0 12 7"\n xmlns="http://www.w3.org/2000/svg"\n >\n <path\n d="M11.85.65c.2.2.2.5 0 .7L6.4 6.84a.55.55 0 01-.78 0L.14 1.35a.5.5 0 11.71-.7L6 5.8 11.15.65c.2-.2.5-.2.7 0z"\n />\n </svg>\n '},jl=Pl.compose(Object.assign({baseName:"select",template:Hl,styles:Ml,shadowOptions:Bl},zl)),Vl=(e,t)=>r.css`
3032
3039
  ${(0,s.skeletonStyles)(e,t)}
3033
3040
  `,Gl=(e,t)=>(0,n.skeletonTemplate)(e,t);class Ul extends s.Skeleton{}const Yl=void 0,Wl={},ql=Ul.compose(Object.assign({baseName:"skeleton",template:Gl,styles:Vl,shadowOptions:Yl},Wl)),Kl=(e,t)=>r.css`
@@ -3778,9 +3785,9 @@
3778
3785
  </div>
3779
3786
  `,nu=r.html`
3780
3787
  ${e=>au(F(e))}
3781
- `,su=void 0,ru={};class lu extends s.TextField{constructor(){super(...arguments),this.value=""}saveUrl(e){this.value=e.startsWith("http")?e:"https://"+e,this.focused=!1}focus(){this.focused=!0}}(0,x.__decorate)([r.observable],lu.prototype,"value",void 0),(0,x.__decorate)([r.observable],lu.prototype,"focused",void 0);const du=lu.compose(Object.assign({baseName:"url-input",template:nu,styles:iu,shadowOptions:su},ru)),cu={foundationAccordion:p,foundationAccordionItem:y,foundationActionsMenu:L,foundationAnchor:M,foundationAnchoredRegion:V,foundationAvatar:X,foundationBadge:oe,foundationBanner:ce,foundationBreadcrumbItem:$e,foundationBreadcrumb:ge,foundationButton:Oe,foundationCalendar:Ne,foundationCard:Be,foundationCategorizedMultiselect:Xe,foundationCheckbox:ot,foundationCombobox:It,foundationConnectionIndicator:zt,foundationDataGrid:Wt,foundationDataGridCell:Qt,foundationDataGridRow:io,foundationDatePicker:Co,foundationDesignSystemProvider:pi,foundationDialog:$i,foundationDisclosure:Oi,foundationDivider:Ni,foundationDropdownMenu:zi,foundationErrorBoundary:sa,foundationErrorBanner:Yi,foundationErrorDialog:ha,foundationFileUpload:Ma,foundationFilter:qa,foundationFilterBar:an,foundationFlexLayout:hn,foundationFlipper:bn,foundationFlyout:Fn,foundationGridLayout:Rn,foundationGridLayoutItem:Bn,foundationHorizontalScroll:Yn,foundationIcon:ss,foundationListbox:hs,foundationListboxOption:bs,foundationMenu:Cs,foundationMenuItem:Ts,foundationModal:Is,foundationMultiselect:Us,foundationNumberField:Qs,foundationProgress:kr,foundationPopper:zr,foundationProgressRing:Wr,foundationRadio:Jr,foundationRadioGroup:nl,foundationSearchBar:bl,foundationSearchBarCombobox:Cl,foundationSegmentedControl:Tl,foundationSegmentedItem:Il,foundationSelect:jl,foundationSkeleton:ql,foundationSlider:od,foundationSliderLabel:ld,foundationSnackbar:bd,foundationStepper:Dd,foundationStepperTab:Md,foundationStepperTabPanel:jd,foundationStackingIcons:$d,foundationSwitch:qd,foundationSystemHealthOverlay:Rr,foundationTab:ec,foundationTabPanel:sc,foundationTabs:hc,foundationTextArea:bc,foundationTextField:Fc,foundationToast:Ec,foundationToolbar:Hc,foundationTooltip:Gc,foundationTreeItem:Xc,foundationTreeView:ou,foundationUrlInput:du,register(e,...t){if(e)for(const o in this)"register"!==o&&this[o]().register(e,...t)}};class uu extends r.CSSDirective{constructor(e){super(),this.tokenMap=e}createTokenPartial(e,t){return r.cssPartial`${e}: ${t}`}createTokensCSS(){const e=[];for(const[t,o]of Object.entries(this.tokenMap))e.push(this.createTokenPartial(t,o).createCSS());return e}createCSS(){return this.createTokensCSS().join(";")}}let hu=class extends mt{constructor(){super(...arguments),this.isSnapshot=!0}connectedCallback(){const e=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});return(0,x.__awaiter)(this,void 0,void 0,(function*(){e.connectedCallback.call(this),this.dataGrid=this.parentElement,this.dataGrid&&this.resourceName&&this.connect.isConnected&&this.fetchGenesisData()}))}getColumnDefs(e){return null==e?void 0:e.flatMap((e=>this.fields&&!this.fields.includes(e.name)?[]:{columnDataKey:e.name}))}clearData(){ae.debug("clearData - Method not implemented.")}syncComponentData(e){const t=null!=e?e:Array.from(this.rowsSyncedWithStream.values()),o=this.getColumnDefs(this.datasource.fieldMetadata);this.dataGrid.columnDefinitions=o,this.dataGrid.rowsData=t}handleStreamInserts(e){ae.debug("handleStreamInserts - Method not implemented.")}handleStreamDeletes(e){ae.debug("handleStreamDeletes - Method not implemented.")}handleStreamUpdates(e){ae.debug("handleStreamUpdates - Method not implemented.")}};hu=(0,x.__decorate)([(0,r.customElement)({name:"data-grid-datasource"})],hu);const pu=r.html`
3788
+ `,su=void 0,ru={};class lu extends s.TextField{constructor(){super(...arguments),this.value=""}saveUrl(e){this.value=e.startsWith("http")?e:"https://"+e,this.focused=!1}focus(){this.focused=!0}}(0,x.__decorate)([r.observable],lu.prototype,"value",void 0),(0,x.__decorate)([r.observable],lu.prototype,"focused",void 0);const du=lu.compose(Object.assign({baseName:"url-input",template:nu,styles:iu,shadowOptions:su},ru)),cu={foundationAccordion:p,foundationAccordionItem:y,foundationActionsMenu:L,foundationAnchor:M,foundationAnchoredRegion:V,foundationAvatar:X,foundationBadge:oe,foundationBanner:ce,foundationBreadcrumb:ge,foundationBreadcrumbItem:$e,foundationButton:Oe,foundationCalendar:Ne,foundationCard:Be,foundationCategorizedMultiselect:Xe,foundationCheckbox:ot,foundationCombobox:It,foundationConnectionIndicator:zt,foundationDataGrid:Wt,foundationDataGridCell:Qt,foundationDataGridRow:io,foundationDatePicker:Co,foundationDesignSystemProvider:pi,foundationDialog:$i,foundationDisclosure:Oi,foundationDivider:Ni,foundationDropdownMenu:zi,foundationErrorBanner:Yi,foundationErrorBoundary:sa,foundationErrorDialog:ha,foundationFileUpload:Ma,foundationFilter:qa,foundationFilterBar:an,foundationFlexLayout:hn,foundationFlipper:bn,foundationFlyout:Fn,foundationGridLayout:Rn,foundationGridLayoutItem:Bn,foundationHorizontalScroll:Yn,foundationIcon:ss,foundationListbox:hs,foundationListboxOption:bs,foundationMenu:Cs,foundationMenuItem:Ts,foundationModal:Is,foundationMultiselect:Us,foundationNumberField:Qs,foundationPopper:zr,foundationProgress:kr,foundationProgressRing:Wr,foundationRadio:Jr,foundationRadioGroup:nl,foundationSearchBar:bl,foundationSearchBarCombobox:Cl,foundationSegmentedControl:Tl,foundationSegmentedItem:Il,foundationSelect:jl,foundationSkeleton:ql,foundationSlider:od,foundationSliderLabel:ld,foundationSnackbar:bd,foundationStackingIcons:$d,foundationStepper:Dd,foundationStepperTab:Md,foundationStepperTabPanel:jd,foundationSwitch:qd,foundationSystemHealthOverlay:Rr,foundationTab:ec,foundationTabPanel:sc,foundationTabs:hc,foundationTextArea:bc,foundationTextField:Fc,foundationToast:Ec,foundationToolbar:Hc,foundationTooltip:Gc,foundationTreeItem:Xc,foundationTreeView:ou,foundationUrlInput:du,register(e,...t){if(e)for(const o in this)"register"!==o&&this[o]().register(e,...t)}};class uu extends r.CSSDirective{constructor(e){super(),this.tokenMap=e}createTokenPartial(e,t){return r.cssPartial`${e}: ${t}`}createTokensCSS(){const e=[];for(const[t,o]of Object.entries(this.tokenMap))e.push(this.createTokenPartial(t,o).createCSS());return e}createCSS(){return this.createTokensCSS().join(";")}}let hu=class extends mt{constructor(){super(...arguments),this.isSnapshot=!0}connectedCallback(){const e=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});return(0,x.__awaiter)(this,void 0,void 0,(function*(){e.connectedCallback.call(this),this.dataGrid=this.parentElement,this.dataGrid&&this.resourceName&&this.connect.isConnected&&this.fetchGenesisData()}))}getColumnDefs(e){return null==e?void 0:e.flatMap((e=>this.fields&&!this.fields.includes(e.name)?[]:{columnDataKey:e.name}))}clearData(){ae.debug("clearData - Method not implemented.")}syncComponentData(e){const t=null!=e?e:Array.from(this.rowsSyncedWithStream.values()),o=this.getColumnDefs(this.datasource.fieldMetadata);this.dataGrid.columnDefinitions=o,this.dataGrid.rowsData=t}handleStreamInserts(e){ae.debug("handleStreamInserts - Method not implemented.")}handleStreamDeletes(e){ae.debug("handleStreamDeletes - Method not implemented.")}handleStreamUpdates(e){ae.debug("handleStreamUpdates - Method not implemented.")}};hu=(0,x.__decorate)([(0,r.customElement)({name:"data-grid-datasource"})],hu);const pu=r.html`
3782
3789
  <template ${(0,r.ref)("notificationListener")}>
3783
3790
  <slot></slot>
3784
3791
  </template>
3785
3792
  `;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.b8cf22c0f54085c0a31ee182a65e77f6.js.map
3793
+ //# sourceMappingURL=531.adbe70152623fd8ddae32741ce67f7ec.js.map