@genesislcap/design-system-configurator 14.497.0 → 14.499.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.
@@ -258,7 +258,7 @@
258
258
  background: var(--neutral-fill-hover);
259
259
  color: var(--neutral-foreground-rest);
260
260
  }
261
- `;var H=i(77679);let P=!1;try{"undefined"!=typeof GENX_ENABLE_AI&&(P="true"===GENX_ENABLE_AI)}catch(nd){}const z=()=>P||(0,H.m)("ai");var U=i(40729);const B=l.html`
261
+ `;var H=i(77679);let P=!1;try{"undefined"!=typeof GENX_ENABLE_AI&&(P="true"===GENX_ENABLE_AI)}catch(nd){}const z=()=>P||(0,H.m4)("ai");var U=i(40729);const B=l.html`
262
262
  ${e=>{return t=T(e),l.html`
263
263
  ${(0,l.when)(()=>z(),l.html`
264
264
  <div class="ai-criteria-search">
@@ -3077,7 +3077,7 @@
3077
3077
  @click=${e=>e.selectCheckboxAll()}
3078
3078
  ?disabled="${(e,t)=>e.isAllOptionsDisabled}"
3079
3079
  >
3080
- Select All ${e=>e.name}
3080
+ ${e=>e.areAllOptionsSelected?"Deselect All":"Select All"} ${e=>e.name}
3081
3081
  </${e}-button>
3082
3082
  `)}
3083
3083
  <ol
@@ -3134,7 +3134,7 @@
3134
3134
  ${()=>t.getItemLabel(e)}
3135
3135
  </span>
3136
3136
  `}
3137
- `}toggle(){this.open||this.setDropdownPosition(),this.open=!this.open}optionsChanged(){this.allSelected&&!this.initialisedOptions&&(this.selectedOptions=this.options.map(e=>this.optionValueGetter(e))),this.filteredAvailableOptions=[...this.options]}selectedOptionsChanged(){this.$fastController.isConnected&&(this.initialisedOptions=!0)}setDropdownPosition(){let e=this.position;if(this.autoPosition){const t=this.getBoundingClientRect(),i=window.innerHeight,o=t.top,n=i-t.bottom;e=n<rl&&o>n?zt.ABOVE:zt.BELOW}this.multiselectDropdown.classList.toggle("position-above",e===zt.ABOVE),this.multiselectDropdown.classList.toggle("position-below",e===zt.BELOW)}optionValueGetter(e){return"string"==typeof e?e:e.value}optionLabelGetter(e){return"string"==typeof e?e:e.label}getItemLabel(e){let t;return e?(t="string"==typeof e?e:this.optionLabelGetter(e)||this.optionValueGetter(e)||"",this.valueFormatter?this.valueFormatter(t):t):""}isOptionDisabled(e){return e&&"string"!=typeof e&&e.disabled||!1}get getDisplayValue(){let e="";switch(this.selectedOptions.length){case 0:e=this.getPlaceholder;break;case 1:{const t=this.options.find(e=>this.optionValueGetter(e)===this.selectedOptions[0]);e=this.getItemLabel(t);break}case this.options.length:e=`All ${this.name}`.trim();break;default:e=`${this.selectedOptions.length} Selected`}return e}get getPlaceholder(){return`Search ${this.name}`.trim().concat("...")}get isAllOptionsDisabled(){return this.options.length===this.options.filter(this.isOptionDisabled).length}get showCreatable(){return this.creatable&&this.filterSearchValue.length>0&&0===this.findExactMatchOptions().length}isOptionSelected(e){const t=this.optionValueGetter(e);return this.selectedOptions.some(i=>{if("object"==typeof e&&"object"==typeof e.value)try{return JSON.stringify(i)===JSON.stringify(t)}catch(e){return i===t}return i===t})}selectCheckboxOne(e){const t=this.optionValueGetter(e),i=this.selectedOptions.includes(t);this.selectedOptions=i?this.selectedOptions.filter(e=>e!==t):[...this.selectedOptions,t],this.$emit("selectionChange",this.selectedOptions)}checkboxKeyDown(e,t){return" "===t.key&&(t.preventDefault(),this.selectCheckboxOne(e)),!0}getEnabledOptionsCount(){return this.options.length-this.options.filter(this.isOptionDisabled).length}selectCheckboxAll(){const e=this.selectedOptions.length===this.getEnabledOptionsCount();this.selectedOptions=e?[]:this.options.filter(e=>!this.isOptionDisabled(e)).map(e=>this.optionValueGetter(e)),this.onAllSelectedCallback&&this.onAllSelectedCallback(!e),this.$emit("selectionChange",this.selectedOptions)}inputHandler(){this.open||(this.open=!0),this.async?(this.loading=!0,this.filteredAvailableOptions=[],this.debouncedInputHandler()):this.setFilter()}findExactMatchOptions(){const e=this.filterSearchValue.toLowerCase();return this.filteredAvailableOptions.filter(t=>{var i,o;const n="string"==typeof t?t:null!==(i=this.optionLabelGetter(t))&&void 0!==i?i:this.optionValueGetter(t);return(null!==(o=null==n?void 0:n.toLowerCase())&&void 0!==o?o:"")===e})}setFilter(){const e=this.filterSearchValue.toLowerCase();this.filteredAvailableOptions=this.options.filter(t=>{if(!e)return!0;if("string"==typeof t)return t.toLowerCase().includes(e);const i=t.label.toLowerCase(),o="object"==typeof t.value?(n=t.value,Object.values(n).some(t=>t.toLowerCase().includes(e))):String(t.value).toLowerCase().includes(e);var n;return i.includes(e)||o})}addOption(){this.options=[{value:this.filterSearchValue,label:this.filterSearchValue},...this.options],this.setFilter(),this.selectedOptions=[...this.selectedOptions,this.filterSearchValue]}asyncSetFilter(){this.slottedDatasource.length>0?vi(this.slottedDatasource[0],this.filterSearchValue):(this.loading=!1,ot.warn("Multiselect-datasource is not connected. Please add a datasource to use this functionality."))}changeHandler(e){e.preventDefault(),e.stopImmediatePropagation()}handleClickOutside(e){E(e,this)&&(this.open=!1)}keydownHandler(e){const t=e.key;if(e.ctrlKey||e.shiftKey)return!0;switch(t){case"Escape":if(this.open){this.open=!1;break}break;case"ArrowUp":case"ArrowDown":if(!this.open){this.open=!0;break}break;default:return!0}}clear(e={}){const{clearSelectedValues:t=!0,clearFilterText:i=!0}=e;t&&(this.selectedOptions=[],this.$emit("selectionChange",this.selectedOptions)),i&&(this.filterSearchValue="",this.setFilter(),this.filterSearchInput&&(this.filterSearchInput.value="")),this.$emit("clear",{clearSelectedValues:t,clearFilterText:i})}}(0,C.Cg)([l.attr],ml.prototype,"name",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"auto-position"})],ml.prototype,"autoPosition",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],ml.prototype,"all",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],ml.prototype,"allSelected",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],ml.prototype,"search",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],ml.prototype,"disabled",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],ml.prototype,"creatable",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],ml.prototype,"async",void 0),(0,C.Cg)([l.attr],ml.prototype,"debounce",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],ml.prototype,"resizable",void 0),(0,C.Cg)([l.attr],ml.prototype,"tabindex",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"filter-by-contains"})],ml.prototype,"filterByContains",void 0),(0,C.Cg)([l.observable],ml.prototype,"defaultSlottedNodes",void 0),(0,C.Cg)([l.observable],ml.prototype,"slottedDatasource",void 0),(0,C.Cg)([l.observable],ml.prototype,"valueFormatter",void 0),(0,C.Cg)([l.observable],ml.prototype,"loading",void 0),(0,C.Cg)([l.observable],ml.prototype,"filterSearchValue",void 0),(0,C.Cg)([l.observable],ml.prototype,"open",void 0),(0,C.Cg)([l.observable],ml.prototype,"options",void 0),(0,C.Cg)([l.observable],ml.prototype,"selectedOptions",void 0),(0,C.Cg)([l.observable],ml.prototype,"filteredAvailableOptions",void 0),(0,C.Cg)([l.observable],ml.prototype,"scrollContainer",void 0),(0,C.Cg)([l.attr],ml.prototype,"position",void 0),(0,C.Cg)([l.observable],ml.prototype,"onAllSelectedCallback",void 0),(0,C.Cg)([l.observable],ml.prototype,"itemRenderer",void 0),(0,C.Cg)([l.volatile],ml.prototype,"getDisplayValue",null),(0,C.Cg)([l.volatile],ml.prototype,"getPlaceholder",null),(0,C.Cg)([l.volatile],ml.prototype,"isAllOptionsDisabled",null),(0,C.Cg)([l.volatile],ml.prototype,"showCreatable",null),(0,C.Cg)([l.observable],ml.prototype,"optionsHeaderSlottedNodes",void 0);const gl=ml.compose(Object.assign({baseName:"multiselect",template:ul,styles:ll,shadowOptions:hl},pl)),vl={k:1e3,m:1e6,b:1e9},fl=/^(.*?)([kmb])$/i;class bl{constructor(e){const t=new Intl.NumberFormat(e).formatToParts(12345.6),i=[...new Intl.NumberFormat(e,{useGrouping:!1}).format(9876543210)].reverse(),o=new Map(i.map((e,t)=>[e,t]));this._group=new RegExp(`[${t.find(e=>"group"===e.type).value}]`,"g"),this._decimal=new RegExp(`[${t.find(e=>"decimal"===e.type).value}]`),this._separator=new RegExp(`[$${t.find(e=>"decimal"===e.type).value}](?:0*$|[^0]0+$)`),this._numeral=new RegExp(`[${i.join("")}]`,"g"),this._index=e=>o.get(e)}parse(e){const t=e.trim().match(fl),i=t?vl[t[2].toLowerCase()]:1;return(e=(t?t[1]:e).trim().replace(this._group,"").replace(this._decimal,".").replace(this._numeral,this._index))?+e*i:NaN}hasSeparator(e){return this._separator.test(e)}}function yl(e){class t extends e{constructor(){super(...arguments),this.hideAffixFromScreenReader=!1}get controlAriaDescribedby(){var e;const t=null===(e=this.ariaDescribedby)||void 0===e?void 0:e.trim(),i=[];if(t&&i.push(...t.split(/\s+/).filter(Boolean)),!this.hideAffixFromScreenReader){const e=this.id||"control";this.prefix&&i.push(`${e}-prefix`),this.suffix&&i.push(`${e}-suffix`)}const o=new Set,n=[];for(const e of i)o.has(e)||(o.add(e),n.push(e));return n.join(" ")||void 0}}return(0,C.Cg)([l.attr],t.prototype,"prefix",void 0),(0,C.Cg)([l.attr],t.prototype,"suffix",void 0),(0,C.Cg)([(0,l.attr)({attribute:"hide-affix-from-screen-reader",mode:"boolean"})],t.prototype,"hideAffixFromScreenReader",void 0),t}const wl=l.css`
3137
+ `}toggle(){this.open||this.setDropdownPosition(),this.open=!this.open}optionsChanged(){this.allSelected&&!this.initialisedOptions&&(this.selectedOptions=this.options.map(e=>this.optionValueGetter(e))),this.filteredAvailableOptions=[...this.options]}selectedOptionsChanged(){this.$fastController.isConnected&&(this.initialisedOptions=!0)}setDropdownPosition(){let e=this.position;if(this.autoPosition){const t=this.getBoundingClientRect(),i=window.innerHeight,o=t.top,n=i-t.bottom;e=n<rl&&o>n?zt.ABOVE:zt.BELOW}this.multiselectDropdown.classList.toggle("position-above",e===zt.ABOVE),this.multiselectDropdown.classList.toggle("position-below",e===zt.BELOW)}optionValueGetter(e){return"string"==typeof e?e:e.value}optionLabelGetter(e){return"string"==typeof e?e:e.label}getItemLabel(e){let t;return e?(t="string"==typeof e?e:this.optionLabelGetter(e)||this.optionValueGetter(e)||"",this.valueFormatter?this.valueFormatter(t):t):""}isOptionDisabled(e){return e&&"string"!=typeof e&&e.disabled||!1}get getDisplayValue(){let e="";switch(this.selectedOptions.length){case 0:e=this.getPlaceholder;break;case 1:{const t=this.options.find(e=>this.optionValueGetter(e)===this.selectedOptions[0]);e=this.getItemLabel(t);break}case this.options.length:e=`All ${this.name}`.trim();break;default:e=`${this.selectedOptions.length} Selected`}return e}get getPlaceholder(){return`Search ${this.name}`.trim().concat("...")}get isAllOptionsDisabled(){return this.options.length===this.options.filter(this.isOptionDisabled).length}get areAllOptionsSelected(){const e=this.getEnabledOptionsCount();return e>0&&this.selectedOptions.length===e}get showCreatable(){return this.creatable&&this.filterSearchValue.length>0&&0===this.findExactMatchOptions().length}isOptionSelected(e){const t=this.optionValueGetter(e);return this.selectedOptions.some(i=>{if("object"==typeof e&&"object"==typeof e.value)try{return JSON.stringify(i)===JSON.stringify(t)}catch(e){return i===t}return i===t})}selectCheckboxOne(e){const t=this.optionValueGetter(e),i=this.selectedOptions.includes(t);this.selectedOptions=i?this.selectedOptions.filter(e=>e!==t):[...this.selectedOptions,t],this.$emit("selectionChange",this.selectedOptions)}checkboxKeyDown(e,t){return" "===t.key&&(t.preventDefault(),this.selectCheckboxOne(e)),!0}getEnabledOptionsCount(){return this.options.length-this.options.filter(this.isOptionDisabled).length}selectCheckboxAll(){const e=this.selectedOptions.length===this.getEnabledOptionsCount();this.selectedOptions=e?[]:this.options.filter(e=>!this.isOptionDisabled(e)).map(e=>this.optionValueGetter(e)),this.onAllSelectedCallback&&this.onAllSelectedCallback(!e),this.$emit("selectionChange",this.selectedOptions)}inputHandler(){this.open||(this.open=!0),this.async?(this.loading=!0,this.filteredAvailableOptions=[],this.debouncedInputHandler()):this.setFilter()}findExactMatchOptions(){const e=this.filterSearchValue.toLowerCase();return this.filteredAvailableOptions.filter(t=>{var i,o;const n="string"==typeof t?t:null!==(i=this.optionLabelGetter(t))&&void 0!==i?i:this.optionValueGetter(t);return(null!==(o=null==n?void 0:n.toLowerCase())&&void 0!==o?o:"")===e})}setFilter(){const e=this.filterSearchValue.toLowerCase();this.filteredAvailableOptions=this.options.filter(t=>{if(!e)return!0;if("string"==typeof t)return t.toLowerCase().includes(e);const i=t.label.toLowerCase(),o="object"==typeof t.value?(n=t.value,Object.values(n).some(t=>t.toLowerCase().includes(e))):String(t.value).toLowerCase().includes(e);var n;return i.includes(e)||o})}addOption(){this.options=[{value:this.filterSearchValue,label:this.filterSearchValue},...this.options],this.setFilter(),this.selectedOptions=[...this.selectedOptions,this.filterSearchValue]}asyncSetFilter(){this.slottedDatasource.length>0?vi(this.slottedDatasource[0],this.filterSearchValue):(this.loading=!1,ot.warn("Multiselect-datasource is not connected. Please add a datasource to use this functionality."))}changeHandler(e){e.preventDefault(),e.stopImmediatePropagation()}handleClickOutside(e){E(e,this)&&(this.open=!1)}keydownHandler(e){const t=e.key;if(e.ctrlKey||e.shiftKey)return!0;switch(t){case"Escape":if(this.open){this.open=!1;break}break;case"ArrowUp":case"ArrowDown":if(!this.open){this.open=!0;break}break;default:return!0}}clear(e={}){const{clearSelectedValues:t=!0,clearFilterText:i=!0}=e;t&&(this.selectedOptions=[],this.$emit("selectionChange",this.selectedOptions)),i&&(this.filterSearchValue="",this.setFilter(),this.filterSearchInput&&(this.filterSearchInput.value="")),this.$emit("clear",{clearSelectedValues:t,clearFilterText:i})}}(0,C.Cg)([l.attr],ml.prototype,"name",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"auto-position"})],ml.prototype,"autoPosition",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],ml.prototype,"all",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],ml.prototype,"allSelected",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],ml.prototype,"search",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],ml.prototype,"disabled",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],ml.prototype,"creatable",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],ml.prototype,"async",void 0),(0,C.Cg)([l.attr],ml.prototype,"debounce",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],ml.prototype,"resizable",void 0),(0,C.Cg)([l.attr],ml.prototype,"tabindex",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"filter-by-contains"})],ml.prototype,"filterByContains",void 0),(0,C.Cg)([l.observable],ml.prototype,"defaultSlottedNodes",void 0),(0,C.Cg)([l.observable],ml.prototype,"slottedDatasource",void 0),(0,C.Cg)([l.observable],ml.prototype,"valueFormatter",void 0),(0,C.Cg)([l.observable],ml.prototype,"loading",void 0),(0,C.Cg)([l.observable],ml.prototype,"filterSearchValue",void 0),(0,C.Cg)([l.observable],ml.prototype,"open",void 0),(0,C.Cg)([l.observable],ml.prototype,"options",void 0),(0,C.Cg)([l.observable],ml.prototype,"selectedOptions",void 0),(0,C.Cg)([l.observable],ml.prototype,"filteredAvailableOptions",void 0),(0,C.Cg)([l.observable],ml.prototype,"scrollContainer",void 0),(0,C.Cg)([l.attr],ml.prototype,"position",void 0),(0,C.Cg)([l.observable],ml.prototype,"onAllSelectedCallback",void 0),(0,C.Cg)([l.observable],ml.prototype,"itemRenderer",void 0),(0,C.Cg)([l.volatile],ml.prototype,"getDisplayValue",null),(0,C.Cg)([l.volatile],ml.prototype,"getPlaceholder",null),(0,C.Cg)([l.volatile],ml.prototype,"isAllOptionsDisabled",null),(0,C.Cg)([l.volatile],ml.prototype,"areAllOptionsSelected",null),(0,C.Cg)([l.volatile],ml.prototype,"showCreatable",null),(0,C.Cg)([l.observable],ml.prototype,"optionsHeaderSlottedNodes",void 0);const gl=ml.compose(Object.assign({baseName:"multiselect",template:ul,styles:ll,shadowOptions:hl},pl)),vl={k:1e3,m:1e6,b:1e9},fl=/^(.*?)([kmb])$/i;class bl{constructor(e){const t=new Intl.NumberFormat(e).formatToParts(12345.6),i=[...new Intl.NumberFormat(e,{useGrouping:!1}).format(9876543210)].reverse(),o=new Map(i.map((e,t)=>[e,t]));this._group=new RegExp(`[${t.find(e=>"group"===e.type).value}]`,"g"),this._decimal=new RegExp(`[${t.find(e=>"decimal"===e.type).value}]`),this._separator=new RegExp(`[$${t.find(e=>"decimal"===e.type).value}](?:0*$|[^0]0+$)`),this._numeral=new RegExp(`[${i.join("")}]`,"g"),this._index=e=>o.get(e)}parse(e){const t=e.trim().match(fl),i=t?vl[t[2].toLowerCase()]:1;return(e=(t?t[1]:e).trim().replace(this._group,"").replace(this._decimal,".").replace(this._numeral,this._index))?+e*i:NaN}hasSeparator(e){return this._separator.test(e)}}function yl(e){class t extends e{constructor(){super(...arguments),this.hideAffixFromScreenReader=!1}get controlAriaDescribedby(){var e;const t=null===(e=this.ariaDescribedby)||void 0===e?void 0:e.trim(),i=[];if(t&&i.push(...t.split(/\s+/).filter(Boolean)),!this.hideAffixFromScreenReader){const e=this.id||"control";this.prefix&&i.push(`${e}-prefix`),this.suffix&&i.push(`${e}-suffix`)}const o=new Set,n=[];for(const e of i)o.has(e)||(o.add(e),n.push(e));return n.join(" ")||void 0}}return(0,C.Cg)([l.attr],t.prototype,"prefix",void 0),(0,C.Cg)([l.attr],t.prototype,"suffix",void 0),(0,C.Cg)([(0,l.attr)({attribute:"hide-affix-from-screen-reader",mode:"boolean"})],t.prototype,"hideAffixFromScreenReader",void 0),t}const wl=l.css`
3138
3138
  .label-hidden {
3139
3139
  margin: 0;
3140
3140
  }
@@ -6420,4 +6420,4 @@ class="margin"
6420
6420
  height: 70px;
6421
6421
  }
6422
6422
  `;class Zv extends a.FoundationElement{constructor(){super(...arguments),this.allowBackwardJumps=!1,this.allowForwardJumps=!1,this.hideAllButtons=!1,this.hideTabs=!1,this.indicatorOnly=!1,this.orientation=a.TabsOrientation.vertical,this.tabs=[],this.tabpanels=[],this.progressValue=0,this.activeTabIndex=0,this.pendingNextStep=!1,this.slotsInitialized=!1,this.setTabs=()=>{this.activeTabIndex=this.getActiveIndex(),this.tabs.forEach((e,t)=>{if("tab"===e.slot){const i=this.activeTabIndex===t,o=t+1===this.tabIds.length,n=this.tabIds[t],s=this.tabpanelIds[t];e.setAttribute("id",n),e.setAttribute("aria-selected",i?"true":"false"),e.setAttribute("aria-disabled",i?"false":"true"),e.setAttribute("selected",i?"true":"false"),e.setAttribute("orientation",this.orientation),s&&e.setAttribute("aria-controls",s),e.setAttribute("tab-position",String(t+1)),e.setAttribute("isLast",String(o)),e.setAttribute("hideStepNumber",String(!0===this.hideStepNumber)),e.setAttribute("tabindex",i?"0":"-1"),e.setAttribute("showCursorPointer",String(t<=this.activeTabIndex&&this.allowBackwardJumps||t>this.activeTabIndex&&this.allowForwardJumps)),i&&(this.activetab=e,this.activeid=n)}}),0===this.activeTabIndex&&this.resetCompletedState()},this.getCompletedTabs=()=>{let e=0;this.tabs.forEach(t=>{t.isCompleted()&&(e+=1)});const t=this.indicatorOnly?this.tabs.length:this.tabpanels.length;this.progressValue=t?Math.round(e/t*100):0},this.setTabPanels=()=>{this.tabpanels.forEach((e,t)=>{const i=this.tabIds[t],o=this.tabpanelIds[t];e.setAttribute("id",o),e.setAttribute("aria-labelledby",i),this.activeTabIndex!==t?e.setAttribute("hidden",""):e.removeAttribute("hidden")})}}orientationChanged(){this.$fastController.isConnected&&(this.setTabs(),this.setTabPanels())}activeidChanged(e,t){this.$fastController.isConnected&&(this.indicatorOnly||this.tabs.length<=this.tabpanels.length)&&(this.setTabs(),this.setTabPanels(),this.getCompletedTabs())}tabsChanged(){this.$fastController.isConnected&&(this.indicatorOnly||this.tabs.length<=this.tabpanels.length)&&(this.setTabsAndTabPanels(),this.checkAndExecutePendingNextStep())}tabpanelsChanged(){this.$fastController.isConnected&&this.tabpanels.length<=this.tabs.length&&(this.setTabsAndTabPanels(),this.checkAndExecutePendingNextStep())}connectedCallback(){super.connectedCallback(),this.tabIds=this.getTabIds(),this.tabpanelIds=this.getTabPanelIds(),this.activeTabIndex=this.getActiveIndex()}setTabsAndTabPanels(){this.tabIds=this.getTabIds(),this.tabpanelIds=this.getTabPanelIds(),this.setTabs(),this.setTabPanels(),this.getCompletedTabs(),this.slotsInitialized=this.tabs.length>0&&(this.indicatorOnly||this.tabpanels.length>0)}checkAndExecutePendingNextStep(){this.pendingNextStep&&this.slotsInitialized&&(this.pendingNextStep=!1,this.nextStep())}getActiveIndex(){return void 0!==this.activeid?-1===this.tabIds.indexOf(this.activeid)?0:this.tabIds.indexOf(this.activeid):0}goToStep(e,t=!1){const i=e-1;if(e<1||e>this.tabs.length)return ot.warn(`[Stepper] Invalid step number: ${e}. Must be between 1 and ${this.tabs.length}`),!1;if(i===this.activeTabIndex)return!1;if(t){if(i<this.activeTabIndex)return this.handleBackwardJump(i);if(i>this.activeTabIndex)return this.handleForwardJump(i)}if(i<this.activeTabIndex&&this.allowBackwardJumps){return this.handleBackwardJump(i)}if(i>this.activeTabIndex&&this.allowForwardJumps){return this.handleForwardJump(i)}return i===this.activeTabIndex+1?(this.nextStep(),!0):(ot.warn(`[Stepper] Cannot jump to step ${e}. Jumps are not allowed or step is not adjacent.`),!1)}goToFirstStep(){return this.goToStep(1,!0)}goToLastStep(){return this.goToStep(this.tabs.length,!0)}handleStepClick(e){e<this.activeTabIndex&&this.allowBackwardJumps?this.handleBackwardJump(e):e>this.activeTabIndex&&this.allowForwardJumps&&this.handleForwardJump(e)}handleBackwardJump(e){for(let t=e+1;t<=this.activeTabIndex;t+=1)this.tabs[t].completed=!1;return this.activeTabIndex=e,this.activetab=this.tabs[e],this.activeid=this.tabIds[e],this.$emit("step-click",{activetab:this.activetab,activeid:this.activeid}),!0}handleForwardJump(e){for(let t=this.activeTabIndex;t<e;t+=1)if(this.validation&&this.validation[t]){if(!this.validation[t].isValid())return this.tabs[t].completed=!1,this.tabs[t].error=!0,this.getCompletedTabs(),this.$emit("validation-failure",{stepIndex:t,stepId:this.tabIds[t],message:`Validation failed for step ${t+1}`}),!1;this.tabs[t].error=!1}for(let t=this.activeTabIndex;t<e;t+=1)this.tabs[t].completed=!0,this.tabs[t].error=!1;return this.tabs[e].completed=!1,this.tabs[e].error=!1,this.activeTabIndex=e,this.activetab=this.tabs[e],this.activeid=this.tabIds[e],this.getCompletedTabs(),this.$emit("step-click",{activetab:this.activetab,activeid:this.activeid}),!0}get disabledPreviousStep(){return 0===this.activeTabIndex}get isLastStep(){return this.activeTabIndex+1===this.tabs.length}get islastStepValid(){var e;const t=this.tabs.length-1;return this.activeTabIndex===t&&(this.validation&&(null===(e=this.validation[t])||void 0===e?void 0:e.isValid())||!this.validation||!this.validation[t])?(this.tabs[t].completed=!0,this.getCompletedTabs(),!1):(this.tabs[t].completed=!1,this.getCompletedTabs(),!0)}_submit(){this.$emit("submit")}nextStep(){var e;if(!this.slotsInitialized)return void(this.pendingNextStep=!0);if(this.validation&&this.validation[this.activeTabIndex]){if(!this.validation[this.activeTabIndex].isValid())return this.tabs[this.activeTabIndex].completed=!1,this.tabs[this.activeTabIndex].error=!0,void this.getCompletedTabs();this.tabs[this.activeTabIndex].error=!1}this.activeTabIndex+2<=this.tabIds.length&&(this.tabs[this.activeTabIndex].completed=!0,this.activeTabIndex=this.activeTabIndex+1,this.activeid=this.tabIds[this.activeTabIndex],this.$emit("next-step"),this.$emit("validation-success"));const t=this.tabs.length-1,i=this.activeTabIndex===t;this.hideSubmitButton&&i&&(this.validation&&(null===(e=this.validation[t])||void 0===e?void 0:e.isValid())||!this.validation||!this.validation[t])?(this.tabs[t].completed=!0,this.getCompletedTabs()):(this.tabs[t].completed=!1,this.getCompletedTabs())}previousStep(){0!==this.activeTabIndex&&(this.tabs[this.activeTabIndex].completed=!1,this.activeTabIndex=this.activeTabIndex-1,this.activeid=this.tabIds[this.activeTabIndex])}getTabIds(){return this.tabs.map(e=>{var t;return null!==(t=e.getAttribute("id"))&&void 0!==t?t:`tab-${(0,ba.NF)()}`})}getTabPanelIds(){return this.tabpanels.map(e=>{var t;return null!==(t=e.getAttribute("id"))&&void 0!==t?t:`panel-${(0,ba.NF)()}`})}resetCompletedState(){this.tabs.forEach(e=>e.completed=!1)}}(0,C.Cg)([(0,l.attr)({attribute:"hide-submit-button",mode:"boolean"})],Zv.prototype,"hideSubmitButton",void 0),(0,C.Cg)([(0,l.attr)({attribute:"hide-step-number",mode:"boolean"})],Zv.prototype,"hideStepNumber",void 0),(0,C.Cg)([(0,l.attr)({attribute:"allow-backward-jumps",mode:"boolean"})],Zv.prototype,"allowBackwardJumps",void 0),(0,C.Cg)([(0,l.attr)({attribute:"allow-forward-jumps",mode:"boolean"})],Zv.prototype,"allowForwardJumps",void 0),(0,C.Cg)([(0,l.attr)({attribute:"hide-all-buttons",mode:"boolean"})],Zv.prototype,"hideAllButtons",void 0),(0,C.Cg)([(0,l.attr)({attribute:"hide-tabs",mode:"boolean"})],Zv.prototype,"hideTabs",void 0),(0,C.Cg)([(0,l.attr)({attribute:"indicator-only",mode:"boolean"})],Zv.prototype,"indicatorOnly",void 0),(0,C.Cg)([l.attr],Zv.prototype,"orientation",void 0),(0,C.Cg)([l.attr],Zv.prototype,"activeid",void 0),(0,C.Cg)([l.observable],Zv.prototype,"tabs",void 0),(0,C.Cg)([l.observable],Zv.prototype,"tabpanels",void 0),(0,C.Cg)([l.observable],Zv.prototype,"validation",void 0),(0,C.Cg)([l.observable],Zv.prototype,"progressValue",void 0),(0,C.Cg)([l.observable],Zv.prototype,"activeTabIndex",void 0),(0,C.Cg)([l.volatile],Zv.prototype,"disabledPreviousStep",null),(0,C.Cg)([l.volatile],Zv.prototype,"isLastStep",null),(0,C.Cg)([l.volatile],Zv.prototype,"islastStepValid",null);const ef=void 0,tf={},of=Zv.compose(Object.assign({baseName:"stepper",template:Jv,styles:Qv,shadowOptions:ef},tf)),nf=["text-field","text-area","combobox"],sf=["input","textarea","select",'[contenteditable="true"]','[contenteditable=""]','[role="textbox"]','[role="searchbox"]','[role="combobox"]'],af=e=>nf.map(t=>`${e}-${t}`),rf={rapid:af("rapid"),zero:af("zero")};function lf(e,t=[]){const i=e.flatMap(e=>{var t;return null!==(t=rf[e])&&void 0!==t?t:[]}),o=t.filter(Boolean);return Array.from(new Set([...sf,...i,...o])).join(",")}const df=()=>yd().register(Em)},70997(e,t,i){"use strict";function o(e,t,i){const o=e=>"function"==typeof e?e:()=>e,n=o(t),s=o(i);return(t,i)=>e(t,i)?n(t,i):s(t,i)}i.d(t,{q:()=>o})},80273(e,t,i){"use strict";i.d(t,{Du:()=>l,IT:()=>a,WP:()=>n,f4:()=>r,zz:()=>s});var o=i(52945);const n=(e,t)=>{(0,o.O5)(e,t)};var s,a;!function(e){e.Italic="italic",e.Normal="normal"}(s||(s={})),function(e){e[e.Thin=100]="Thin",e[e.Light=300]="Light",e[e.Regular=400]="Regular",e[e.Medium=500]="Medium",e[e.Bold=700]="Bold",e[e.Black=900]="Black"}(a||(a={}));const r=(e,t=s.Normal,i=a.Regular)=>`\n font-family: ${e};\n font-style: ${t};\n font-weight: ${i};\n`,l={minusOne:-1,minusTwo:-2,plusOne:1,plusTwo:2,plusThree:3,plusFour:4,plusFive:5,plusSix:6}}}]);
6423
- //# sourceMappingURL=197.6a54396a80953590f8f4c6140c80db6a.js.map
6423
+ //# sourceMappingURL=197.0aa14727f552a8736ef7939c8a93c164.js.map