@genesislcap/design-system-configurator 14.210.6-alpha-cb142e0.0 → 14.211.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.
@@ -561,7 +561,7 @@
561
561
  ></slot>
562
562
  </div>
563
563
  </template>
564
- `;var Lt,Et;class At extends s.Combobox{constructor(){super(...arguments),Lt.set(this,void 0),Et.set(this,!1),this.needManualChangeEventDispatch=!1,this.autocomplete=n.ComboboxAutocomplete.list,this.async=!1,this.debounce=500,this.caseSensitive=!1,this.ignoreInputClick=!1,this.resetCombobox=()=>{this.selectedOptions=[],this.selectedIndex=-1,this.value="",this.control.value="",this.filter="",this.filterOptions()}}debounceChanged(e,t){this.debouncedInputHandler=nt()(this.asyncSetFilter,t)}openChanged(){super.openChanged(),this.open||(this.manuallyDispatchChangeEvent(),this.filter="",this.filterOptions())}get value(){return r.Observable.track(this,"value"),this._ourValue}set value(e){var t,o,i;if(void 0===e)return;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;{const e=this.options[this.selectedIndex];null==e||e.scrollIntoView({block:"center",behavior:"auto"})}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){var t;const o=e.key;if(e.ctrlKey||e.shiftKey)return!0;switch(o){case"Enter":return!(0,x.__classPrivateFieldGet)(this,Et,"f");case"ArrowDown":case"ArrowUp":this.open&&this.firstSelectedOption&&this.autocomplete===n.ComboboxAutocomplete.both&&(this.needManualChangeEventDispatch=!0,this.currentValue=null===(t=this.firstSelectedOption)||void 0===t?void 0:t.value);break;case"Home":case"End":return;case"Backspace":case"Delete":const o=super.keyupHandler(e);return this.selectItemByValue(this.control.value),o}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.")}get activeDescendant(){var e,t;if(this.selectedOptions&&0!==this.selectedOptions.length)return this.ariaActiveDescendant=null===(e=this.selectedOptions[0])||void 0===e?void 0:e.id,null===(t=this.selectedOptions[0])||void 0===t?void 0:t.id}manuallyDispatchChangeEvent(){this.needManualChangeEventDispatch&&this.firstSelectedOption&&this.autocomplete===n.ComboboxAutocomplete.both&&(this.dispatchEvent(new Event("change",{bubbles:!0})),this.needManualChangeEventDispatch=!1)}}Lt=new WeakMap,Et=new WeakMap,(0,x.__decorate)([r.attr],At.prototype,"autocomplete",void 0),(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),(0,x.__decorate)([r.observable],At.prototype,"activeDescendant",null);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.needManualChangeEventDispatch=!1,this.autocomplete=n.ComboboxAutocomplete.list,this.async=!1,this.debounce=500,this.caseSensitive=!1,this.ignoreInputClick=!1,this.resetCombobox=()=>{this.selectedOptions=[],this.selectedIndex=-1,this.value="",this.control.value="",this.filter="",this.filterOptions()}}debounceChanged(e,t){this.debouncedInputHandler=nt()(this.asyncSetFilter,t)}openChanged(){if(super.openChanged(),!this.open){const e=this.options[this.selectedIndex];null==e||e.scrollIntoView({block:"center",behavior:"auto"}),this.manuallyDispatchChangeEvent(),this.filter="",this.filterOptions()}}get value(){return r.Observable.track(this,"value"),this._ourValue}set value(e){var t,o,i;if(void 0===e)return;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;{const e=this.options[this.selectedIndex];null==e||e.scrollIntoView({block:"center",behavior:"auto"})}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){var t;const o=e.key;if(e.ctrlKey||e.shiftKey)return!0;switch(o){case"Enter":return!(0,x.__classPrivateFieldGet)(this,Et,"f");case"ArrowDown":case"ArrowUp":this.open&&this.firstSelectedOption&&this.autocomplete===n.ComboboxAutocomplete.both&&(this.needManualChangeEventDispatch=!0,this.currentValue=null===(t=this.firstSelectedOption)||void 0===t?void 0:t.value);break;case"Home":case"End":return;case"Backspace":case"Delete":const o=super.keyupHandler(e);return this.selectItemByValue(this.control.value),o}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.")}get activeDescendant(){var e,t;if(this.selectedOptions&&0!==this.selectedOptions.length)return this.ariaActiveDescendant=null===(e=this.selectedOptions[0])||void 0===e?void 0:e.id,null===(t=this.selectedOptions[0])||void 0===t?void 0:t.id}manuallyDispatchChangeEvent(){this.needManualChangeEventDispatch&&this.firstSelectedOption&&this.autocomplete===n.ComboboxAutocomplete.both&&(this.dispatchEvent(new Event("change",{bubbles:!0})),this.needManualChangeEventDispatch=!1)}}Lt=new WeakMap,Et=new WeakMap,(0,x.__decorate)([r.attr],At.prototype,"autocomplete",void 0),(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),(0,x.__decorate)([r.observable],At.prototype,"activeDescendant",null);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`
565
565
  :host {
566
566
  --light-size: 12px;
567
567
  --height: calc(var(--design-unit) * 2px + var(--light-size));
@@ -3865,4 +3865,4 @@
3865
3865
  <slot></slot>
3866
3866
  </template>
3867
3867
  `;var gu;!function(e){e.NOTIFICATION_EVENT="notification-event"}(gu||(gu={}));const fu={mode:"open",delegatesFocus:!0};class bu 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(gu.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],bu.prototype,"notificationListener",void 0),(0,x.__decorate)([(0,r.attr)({attribute:"resource-name"})],bu.prototype,"resourceName",void 0),(0,x.__decorate)([(0,r.attr)({attribute:"close-timeout",converter:r.nullableNumberConverter})],bu.prototype,"closeTimeout",void 0),(0,x.__decorate)([r.observable],bu.prototype,"toastButtons",void 0),(0,x.__decorate)([pt.yW],bu.prototype,"datasource",void 0);const yu=bu.compose({baseName:"notification-listener",template:vu,shadowOptions:fu}),xu=(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 wu(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 $u=e=>!e.navId||"header"===e.navId||"side-nav"===e.navId,Su=10;function Cu(e,t=$u,o=Su){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 ku,Fu=o(63734);!function(e){e.controlClicked="controlClicked",e.routeChanged="routeChanged"}(ku||(ku={}));class _u{constructor(e){this.analytics=(0,Fu.Ay)(e)}trackEvent(e,t){ha.v.debug(`FoundationAnalytics.trackEvent ${e} : ${JSON.stringify(t)}`),this.analytics.track(e,t)}}const Ou=n.DI.createInterface((e=>e.singleton(_u)));var Du=o(3479),Tu=o(80751),Lu=o(98647);let Eu=class extends(Du.Ix.from(r.FASTElement)){connectedCallback(){super.connectedCallback(),r.DOM.queueUpdate((()=>(0,x.__awaiter)(this,void 0,void 0,(function*(){this.$router.config=this.config}))))}};Eu=(0,x.__decorate)([(0,r.customElement)({name:"foundation-router"})],Eu);class Au extends Tu.s{constructor(){super(...arguments),this.definitions=[]}map(...e){this.definitions=[...e,...this.definitions],super.map(...e)}}(0,x.__decorate)([r.observable],Au.prototype,"definitions",void 0);class Nu extends Lu.Y{constructor(){super(...arguments),this.routes=new Au(this)}getNavItems(e=$u){return Cu(this.routes.definitions,e)}configureAnalytics(){this.contributors.push({navigate:e=>(0,x.__awaiter)(this,void 0,void 0,(function*(){this.analytics.trackEvent(ku.routeChanged,{path:e.route.endpoint.path})}))})}construct(e){return this.container.get(e)}}(0,x.__decorate)([n.Container],Nu.prototype,"container",void 0),(0,x.__decorate)([Ou],Nu.prototype,"analytics",void 0),(0,x.__decorate)([or.KJ],Nu.prototype,"user",void 0);const Ru=()=>Dr().register(pu)}}]);
3868
- //# sourceMappingURL=531.fa30ded3a2f20d8d95e6ce9be9adc8c9.js.map
3868
+ //# sourceMappingURL=531.d153e1920783ef297ccb70c15ca1f683.js.map