@paperless/core 1.38.4 → 1.38.6

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.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,25 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [1.38.6](https://github.com/ionic-team/stencil-component-starter/compare/v1.38.5...v1.38.6) (2024-07-16)
7
+
8
+ **Note:** Version bump only for package @paperless/core
9
+
10
+
11
+
12
+
13
+
14
+ ## [1.38.5](https://github.com/ionic-team/stencil-component-starter/compare/v1.38.4...v1.38.5) (2024-07-15)
15
+
16
+
17
+ ### Bug Fixes
18
+
19
+ * **molecules/stepper:** Force a rerender ([4e7b88e](https://github.com/ionic-team/stencil-component-starter/commit/4e7b88ed58463ff2c4f1e505bfabcd87331252a4))
20
+
21
+
22
+
23
+
24
+
6
25
  ## [1.38.4](https://github.com/ionic-team/stencil-component-starter/compare/v1.38.3...v1.38.4) (2024-07-15)
7
26
 
8
27
 
@@ -0,0 +1,2 @@
1
+ import{r as t,h as e,H as i,g as s}from"./p-e4d5e7a7.js";const o=".flex{display:flex!important}.h-auto{height:auto!important}.w-full{width:100%!important}.flex-col{flex-direction:column!important}.flex-wrap{flex-wrap:wrap!important}*{box-sizing:border-box}:host{display:flex}:host([direction=horizontal]){align-items:flex-end;height:auto}:host([direction=vertical]){align-items:flex-start;flex-direction:column;flex-wrap:wrap;min-height:100%;width:100%}:host([direction=vertical][content-position=start]){align-items:flex-end}.static{position:static!important}";const n=class{constructor(e){t(this,e);this._rendering=false;this._loaded=false;this.activeStep=1;this.direction="horizontal";this.contentPosition="end"}componentDidLoad(){setTimeout((()=>{this._generateSteps(true);this._loaded=true}),500)}render(){return e(i,{class:"p-stepper"},e("slot",{onSlotchange:()=>this._generateSteps()}))}_generateSteps(t=false){if(!t&&(!this._el||this._rendering||!this._loaded)){return}this._rendering=true;let e=this.activeStep-1||0;const i=this._el.querySelectorAll("p-stepper-item");if(!this.activeStep||e<0){for(let t=0;t<(i===null||i===void 0?void 0:i.length);t++){const s=i.item(t);if(s.active){e=t}if(e<0&&s.finished){e=t+1}}}for(let t=0;t<(i===null||i===void 0?void 0:i.length);t++){const s=i.item(t);s.active=t===e;s.finished=t<e;s.direction=this.direction;s.align=t===0?"start":t===(i===null||i===void 0?void 0:i.length)-1?"end":"center";s.contentPosition=this.contentPosition;if(t<i.length-1){const i=s.nextElementSibling;if(i&&i.tagName.toLowerCase()==="p-stepper-item"){const o=(s.clientHeight>16?s.clientHeight-16:s.clientHeight)/2;const n=document.createElement("p-stepper-line");n.direction=this.direction;n.active=t<=e;if(o>0&&this.direction==="vertical"){n.style.marginTop=`-${o/16}rem`;n.style.marginBottom=`-${o/16}rem`;n.style.minHeight=`calc(1rem + ${o*2/16}rem)`}this._el.insertBefore(n,i);continue}}if(t>0){const t=s.previousElementSibling;if(t.tagName.toLowerCase()==="p-stepper-line"){t.direction=this.direction;t.active=s.active||s.finished}}}const s=this._el.querySelectorAll("p-stepper-line");for(let t=s.length-1;t>=0;t--){const e=s.item(t);const i=e===null||e===void 0?void 0:e.nextElementSibling;if(i&&i.tagName.toLowerCase()==="p-stepper-line"){i.remove()}if(!i){e.remove()}}setTimeout((()=>this._rendering=false),100)}get _el(){return s(this)}static get watchers(){return{activeStep:["_generateSteps"]}}};n.style=o;export{n as p_stepper};
2
+ //# sourceMappingURL=p-e74e8edd.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["stepperComponentCss","Stepper","this","_rendering","_loaded","componentDidLoad","setTimeout","_generateSteps","render","h","Host","class","onSlotchange","firstLoad","_el","activeStep","items","querySelectorAll","i","length","item","active","finished","direction","align","contentPosition","nextItem","nextElementSibling","tagName","toLowerCase","heightDiff","clientHeight","stepperLine","document","createElement","style","marginTop","marginBottom","minHeight","insertBefore","previousItem","previousElementSibling","lines","j","line","next","remove"],"sources":["src/components/molecules/stepper/stepper.component.scss?tag=p-stepper&encapsulation=shadow","src/components/molecules/stepper/stepper.component.tsx"],"sourcesContent":[":host {\n\t@apply flex;\n}\n\n:host([direction='horizontal']) {\n\t@apply h-auto items-end;\n}\n\n:host([direction='vertical']) {\n\t@apply flex-col flex-wrap items-start;\n\t@apply w-full min-h-full;\n}\n\n:host([direction='vertical'][content-position='start']) {\n\t@apply items-end;\n}\n","import { Component, Element, h, Host, Prop, Watch } from '@stencil/core';\n\n@Component({\n\ttag: 'p-stepper',\n\tstyleUrl: 'stepper.component.scss',\n\tshadow: true,\n})\nexport class Stepper {\n\t/**\n\t * The currently active step\n\t */\n\t@Prop() activeStep: number = 1;\n\n\t/**\n\t * The direction of the stepper\n\t */\n\t@Prop({ reflect: true }) direction: 'horizontal' | 'vertical' =\n\t\t'horizontal';\n\n\t/**\n\t * The position of the content in case of vertical direction\n\t */\n\t@Prop({ reflect: true }) contentPosition: 'start' | 'end' = 'end';\n\n\t/**\n\t * The host element\n\t */\n\t@Element() private _el: HTMLElement;\n\n\tprivate _rendering = false;\n\tprivate _loaded = false;\n\n\t// private _steps: Array<HTMLPStepperItemElement>;\n\n\tcomponentDidLoad() {\n\t\tsetTimeout(() => {\n\t\t\tthis._generateSteps(true);\n\t\t\tthis._loaded = true;\n\t\t}, 500);\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class=\"p-stepper\">\n\t\t\t\t<slot onSlotchange={() => this._generateSteps()} />\n\t\t\t</Host>\n\t\t);\n\t}\n\n\t@Watch('activeStep')\n\tprivate _generateSteps(firstLoad = false) {\n\t\tif (!firstLoad && (!this._el || this._rendering || !this._loaded)) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._rendering = true;\n\n\t\tlet activeStep = this.activeStep - 1 || 0;\n\t\tconst items = this._el.querySelectorAll('p-stepper-item');\n\n\t\tif (!this.activeStep || activeStep < 0) {\n\t\t\tfor (let i = 0; i < items?.length; i++) {\n\t\t\t\tconst item = items.item(i) as any;\n\n\t\t\t\tif (item.active) {\n\t\t\t\t\tactiveStep = i;\n\t\t\t\t}\n\n\t\t\t\tif (activeStep < 0 && item.finished) {\n\t\t\t\t\tactiveStep = i + 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor (let i = 0; i < items?.length; i++) {\n\t\t\tconst item = items.item(i) as any;\n\n\t\t\titem.active = i === activeStep;\n\t\t\titem.finished = i < activeStep;\n\t\t\titem.direction = this.direction;\n\t\t\titem.align =\n\t\t\t\ti === 0 ? 'start' : i === items?.length - 1 ? 'end' : 'center';\n\t\t\titem.contentPosition = this.contentPosition;\n\n\t\t\tif (i < items.length - 1) {\n\t\t\t\tconst nextItem = item.nextElementSibling;\n\t\t\t\tif (\n\t\t\t\t\tnextItem &&\n\t\t\t\t\tnextItem.tagName.toLowerCase() === 'p-stepper-item'\n\t\t\t\t) {\n\t\t\t\t\tconst heightDiff =\n\t\t\t\t\t\t(item.clientHeight > 16\n\t\t\t\t\t\t\t? item.clientHeight - 16\n\t\t\t\t\t\t\t: item.clientHeight) / 2;\n\n\t\t\t\t\tconst stepperLine =\n\t\t\t\t\t\tdocument.createElement('p-stepper-line');\n\n\t\t\t\t\tstepperLine.direction = this.direction;\n\t\t\t\t\tstepperLine.active = i <= activeStep;\n\n\t\t\t\t\tif (heightDiff > 0 && this.direction === 'vertical') {\n\t\t\t\t\t\tstepperLine.style.marginTop = `-${heightDiff / 16}rem`;\n\t\t\t\t\t\tstepperLine.style.marginBottom = `-${\n\t\t\t\t\t\t\theightDiff / 16\n\t\t\t\t\t\t}rem`;\n\t\t\t\t\t\tstepperLine.style.minHeight = `calc(1rem + ${\n\t\t\t\t\t\t\t(heightDiff * 2) / 16\n\t\t\t\t\t\t}rem)`;\n\t\t\t\t\t}\n\n\t\t\t\t\tthis._el.insertBefore(stepperLine, nextItem);\n\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (i > 0) {\n\t\t\t\tconst previousItem = item.previousElementSibling;\n\t\t\t\tif (previousItem.tagName.toLowerCase() === 'p-stepper-line') {\n\t\t\t\t\tpreviousItem.direction = this.direction;\n\t\t\t\t\tpreviousItem.active = item.active || item.finished;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tconst lines = this._el.querySelectorAll('p-stepper-line');\n\t\tfor (let j = lines.length - 1; j >= 0; j--) {\n\t\t\tconst line = lines.item(j);\n\t\t\tconst next = line?.nextElementSibling;\n\t\t\tif (next && next.tagName.toLowerCase() === 'p-stepper-line') {\n\t\t\t\tnext.remove();\n\t\t\t}\n\n\t\t\tif (!next) {\n\t\t\t\tline.remove();\n\t\t\t}\n\t\t}\n\n\t\tsetTimeout(() => (this._rendering = false), 100);\n\t}\n}\n"],"mappings":"yDAAA,MAAMA,EAAsB,if,MCOfC,EAAO,M,yBAsBXC,KAAAC,WAAa,MACbD,KAAAE,QAAU,M,gBAnBW,E,eAM5B,a,qBAK2D,K,CAY5D,gBAAAC,GACCC,YAAW,KACVJ,KAAKK,eAAe,MACpBL,KAAKE,QAAU,IAAI,GACjB,I,CAGJ,MAAAI,GACC,OACCC,EAACC,EAAI,CAACC,MAAM,aACXF,EAAA,QAAMG,aAAc,IAAMV,KAAKK,mB,CAM1B,cAAAA,CAAeM,EAAY,OAClC,IAAKA,KAAeX,KAAKY,KAAOZ,KAAKC,aAAeD,KAAKE,SAAU,CAClE,M,CAGDF,KAAKC,WAAa,KAElB,IAAIY,EAAab,KAAKa,WAAa,GAAK,EACxC,MAAMC,EAAQd,KAAKY,IAAIG,iBAAiB,kBAExC,IAAKf,KAAKa,YAAcA,EAAa,EAAG,CACvC,IAAK,IAAIG,EAAI,EAAGA,GAAIF,IAAK,MAALA,SAAK,SAALA,EAAOG,QAAQD,IAAK,CACvC,MAAME,EAAOJ,EAAMI,KAAKF,GAExB,GAAIE,EAAKC,OAAQ,CAChBN,EAAaG,C,CAGd,GAAIH,EAAa,GAAKK,EAAKE,SAAU,CACpCP,EAAaG,EAAI,C,GAKpB,IAAK,IAAIA,E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nB,GAAIkB,GAAQA,EAAKjB,QAAQC,gBAAkB,iBAAkB,CAC5DgB,EAAKC,Q,CAGN,IAAKD,EAAM,CACVD,EAAKE,Q,EAIPxC,YAAW,IAAOJ,KAAKC,WAAa,OAAQ,I"}
@@ -1,2 +1,2 @@
1
- import{p as e,b as a}from"./p-e4d5e7a7.js";export{s as setNonce}from"./p-e4d5e7a7.js";const t=()=>{const a=import.meta.url;const t={};if(a!==""){t.resourcesUrl=new URL(".",a).href}return e(t)};t().then((e=>a(JSON.parse('[["p-e4110d85",[[4,"p-button",{"variant":[1],"underline":[4],"href":[1],"target":[1],"size":[1],"type":[1],"loading":[4],"chevron":[8],"chevronPosition":[1,"chevron-position"],"disabled":[4],"icon":[1],"iconOnly":[4,"icon-only"],"iconPosition":[1,"icon-position"],"iconFlip":[1,"icon-flip"],"iconRotate":[2,"icon-rotate"],"inheritText":[4,"inherit-text"]},[[2,"click","handleClick"]]],[1,"p-loader",{"show":[4],"variant":[1],"color":[1],"modalTitle":[1,"modal-title"],"modalDescription":[1,"modal-description"]}],[0,"p-icon",{"variant":[1],"size":[1],"rotate":[2],"flip":[1]}]]],["p-a9ebacc8",[[4,"p-table",{"items":[1],"loading":[4],"headerLoading":[4,"header-loading"],"footerLoading":[4,"footer-loading"],"amountOfLoadingRows":[2,"amount-of-loading-rows"],"enableRowSelection":[4,"enable-row-selection"],"rowSelectionLimit":[2,"row-selection-limit"],"enableRowClick":[4,"enable-row-click"],"selectedRows":[16],"enableFloatingMenu":[4,"enable-floating-menu"],"floatingMenuAmountSelectedTemplate":[16],"selectionKey":[1,"selection-key"],"canSelectKey":[1,"can-select-key"],"enableHeader":[4,"enable-header"],"quickFilters":[16],"activeQuickFilterIdentifier":[1,"active-quick-filter-identifier"],"enableSearch":[4,"enable-search"],"query":[1025],"enableFilter":[4,"enable-filter"],"selectedFiltersAmount":[2,"selected-filters-amount"],"filterButtonTemplate":[16],"enableAction":[4,"enable-action"],"actionButtonLoading":[4,"action-button-loading"],"actionButtonEnabled":[4,"action-button-enabled"],"actionButtonIcon":[1,"action-button-icon"],"actionButtonText":[1,"action-button-text"],"actionButtonTemplate":[16],"enableFooter":[4,"enable-footer"],"enablePageSize":[4,"enable-page-size"],"enablePagination":[4,"enable-pagination"],"enableExport":[4,"enable-export"],"page":[1538],"total":[2],"pageSize":[2,"page-size"],"pageSizeOptions":[16],"hideOnSinglePage":[4,"hide-on-single-page"],"emptyStateHeader":[16],"emptyStateContent":[16],"emptyStateAction":[16],"enableEmptyStateAction":[4,"enable-empty-state-action"],"emptyStateFilteredHeader":[16],"emptyStateFilteredContent":[16],"shadow":[4],"_locales":[32],"_columns":[32],"_items":[32]},[[16,"localeChanged","_setLocales"],[16,"tableDefinitionChanged","onTableDefinitionUpdated"],[4,"keydown","keyDown"],[4,"keyup","keyUp"],[4,"visibilitychange","visibilityChange"]],{"items":["_parseItems"]}]]],["p-22a84714",[[0,"p-select",{"items":[1],"multi":[516],"icon":[1],"query":[1],"placeholder":[1],"autocompletePlaceholder":[1,"autocomplete-placeholder"],"value":[8],"displayKey":[1,"display-key"],"dropdownDisplayKey":[1,"dropdown-display-key"],"selectionDisplayKey":[1,"selection-display-key"],"valueKey":[1,"value-key"],"avatarKey":[1,"avatar-key"],"avatarLettersKey":[1,"avatar-letters-key"],"identifierKey":[1,"identifier-key"],"queryKey":[1,"query-key"],"autoSelectFirst":[4,"auto-select-first"],"showChevron":[4,"show-chevron"],"maxDisplayedItems":[2,"max-displayed-items"],"enableAutocomplete":[4,"enable-autocomplete"],"asyncFilter":[4,"async-filter"],"loading":[4],"enableSelectAll":[4,"enable-select-all"],"selectAllText":[1,"select-all-text"],"selectAllIcon":[1,"select-all-icon"],"size":[1],"prefix":[1],"label":[1],"helper":[1],"required":[516],"error":[513],"disabled":[516],"showAddItem":[4,"show-add-item"],"addItemText":[1,"add-item-text"],"emptyStateText":[1,"empty-state-text"],"_showDropdown":[32],"_selectedItem":[32],"_allSelected":[32],"_amountHidden":[32]},[[6,"click","documentClickHandler"]],{"value":["_valueChange"],"items":["itemChanges"],"_showDropdown":["_showDropdownChanges"],"multi":["multiChanges"]}]]],["p-3969a78e",[[1,"p-modal",{"size":[1],"variant":[1],"header":[1],"show":[4],"applyBlur":[4,"apply-blur"],"showClose":[4,"show-close"],"showMobileFooter":[4,"show-mobile-footer"],"backdropClickClose":[4,"backdrop-click-close"],"scrollLock":[4,"scroll-lock"],"padding":[4],"_closing":[32]},[[8,"closeModal","handleCloseModal"]]]]],["p-c9b840a7",[[0,"p-datepicker",{"placeholder":[1],"value":[1],"preselectToday":[4,"preselect-today"],"disabledDates":[1,"disabled-dates"],"minDate":[1,"min-date"],"maxDate":[1,"max-date"],"disableWeekends":[4,"disable-weekends"],"mode":[1],"format":[1],"size":[1],"prefix":[1],"label":[1],"helper":[1],"required":[516],"error":[513],"disabled":[516],"_showDropdown":[32],"_value":[32],"_minDate":[32],"_maxDate":[32],"_disabledDates":[32]},[[6,"click","documentClickHandler"]],{"value":["parseValue"],"minDate":["parseMinDate"],"maxDate":["parseMaxDate"],"disabledDates":["parseDisabledDates"]}]]],["p-60400a89",[[1,"p-drawer",{"header":[1],"show":[4],"applyBlur":[4,"apply-blur"],"showClose":[4,"show-close"],"backdropClickClose":[4,"backdrop-click-close"],"canClose":[4,"can-close"],"scrollLock":[4,"scroll-lock"],"_closing":[32]},[[8,"closeDrawer","handleCloseDrawer"],[8,"forceCloseDrawer","handleForceCloseDrawer"]]]]],["p-699e0b35",[[1,"p-attachment",{"mode":[1],"loading":[4],"error":[1],"downloading":[4]}]]],["p-179efb16",[[1,"p-navbar",{"closeText":[1,"close-text"],"menuText":[1,"menu-text"],"_showMenu":[32]},[[8,"closeNavbar","handleCloseNavbar"],[8,"openNavbar","handleOpenNavbar"]]]]],["p-2d3ff364",[[1,"p-profile",{"variant":[1],"size":[513],"_dropdownOpen":[32]}]]],["p-4c30c74b",[[1,"p-toast",{"variant":[1],"header":[1],"content":[1],"enableAction":[4,"enable-action"],"actionIcon":[1,"action-icon"],"actionIconFlip":[1,"action-icon-flip"],"actionIconRotate":[2,"action-icon-rotate"]}]]],["p-a2b552f9",[[1,"p-divider",{"variant":[513]}]]],["p-d0796984",[[1,"p-accordion",{"header":[1],"open":[4],"closeable":[4],"openable":[4]}]]],["p-fffaacc2",[[1,"p-navigation-item",{"active":[4],"icon":[1],"counter":[8],"href":[1],"target":[1]}]]],["p-f9e9370b",[[4,"p-card-header",{"header":[1],"arrow":[4]}]]],["p-cb2674b5",[[1,"p-content-slider",{"hideMobileIndicator":[4,"hide-mobile-indicator"],"disableDrag":[4,"disable-drag"],"disableAutoCenter":[4,"disable-auto-center"],"disableIndicatorClick":[4,"disable-indicator-click"],"_visibleIndex":[32],"_outerHeight":[32],"_totalWidth":[32],"_dragging":[32]},[[9,"mouseup","mouseUpHandler"],[9,"touchend","mouseUpHandler"],[9,"resize","resizeHandler"]]]]],["p-7bf042c9",[[1,"p-cropper",{"variant":[513],"value":[8],"returnType":[1,"return-type"],"_loaded":[32],"_currentScale":[32]},[[9,"resize","onResize"]]]]],["p-97bcf0b5",[[1,"p-info-panel",{"variant":[1],"header":[1],"content":[1],"closeable":[4]}]]],["p-cf7bd354",[[4,"p-status",{"variant":[1],"icon":[1],"iconFlip":[1,"icon-flip"],"iconRotate":[2,"icon-rotate"]}]]],["p-d8641c29",[[1,"p-stepper-line",{"active":[516],"direction":[513]}]]],["p-c9295061",[[1,"p-stepper",{"activeStep":[2,"active-step"],"direction":[513],"contentPosition":[513,"content-position"]},null,{"activeStep":["_generateSteps"]}]]],["p-eebab75d",[[1,"p-stepper-item",{"align":[513],"direction":[513],"contentPosition":[513,"content-position"],"finished":[516],"active":[516]}]]],["p-ec29eed0",[[1,"p-tab-group"]]],["p-af6b813e",[[4,"p-avatar-group",{"extra":[2]}]]],["p-8426ca20",[[4,"p-card-body",{"inheritText":[516,"inherit-text"]}]]],["p-f0f1a46b",[[1,"p-card-container",{"hoverable":[516],"shadow":[516]}]]],["p-bbe63029",[[1,"p-layout",{"variant":[1]}]]],["p-7793ba3a",[[1,"p-tab-item",{"active":[4]}]]],["p-4dc5647e",[[0,"p-table-column",{"path":[1537],"type":[1537],"name":[1537],"useSlot":[1540,"use-slot"],"hasCheckbox":[1540,"has-checkbox"],"align":[1537],"isLast":[1540,"is-last"],"sizes":[1032]}]]],["p-606ad811",[[1,"p-toast-container",{"placement":[1]}]]],["p-dace47c5",[[1,"p-calendar",{"variant":[1],"value":[1],"preselectToday":[4,"preselect-today"],"disabledDates":[1,"disabled-dates"],"minDate":[1,"min-date"],"maxDate":[1,"max-date"],"disableWeekends":[4,"disable-weekends"],"mode":[1],"_view":[32],"_viewDate":[32],"_value":[32],"_minDate":[32],"_maxDate":[32],"_disabledDates":[32]},null,{"value":["_parseValue"],"minDate":["_parseMinDate"],"maxDate":["_parseMaxDate"],"disabledDates":["_parseDisabledDates"]}]]],["p-0cbff44f",[[0,"p-avatar",{"variant":[513],"size":[513],"defaultImage":[1,"default-image"],"src":[1],"letters":[1],"_src":[32],"_failed":[32]},null,{"src":["onSrchChange"]}]]],["p-2becd73c",[[1,"p-counter",{"variant":[1],"size":[1]}]]],["p-ec15ee73",[[1,"p-slider-indicator",{"active":[4]}]]],["p-4e9e4ce2",[[1,"p-drawer-header",{"showClose":[4,"show-close"]}],[1,"p-drawer-body",{"variant":[1]}],[4,"p-drawer-container",{"closing":[4]}]]],["p-b848c222",[[1,"p-backdrop",{"variant":[1],"applyBlur":[4,"apply-blur"],"closing":[4],"scrollLock":[4,"scroll-lock"]},[[2,"click","handleClick"]]]]],["p-bf1ffb6a",[[1,"p-modal-header",{"showClose":[4,"show-close"]}],[1,"p-modal-footer"],[1,"p-modal-body",{"variant":[1],"rounded":[4],"padding":[4]}],[4,"p-modal-container",{"size":[1],"closing":[4]}]]],["p-2cd5062f",[[1,"p-label",{"variant":[513],"behavior":[513],"iconPosition":[1,"icon-position"],"icon":[513],"iconFlip":[1,"icon-flip"],"iconRotate":[2,"icon-rotate"],"size":[513],"keepMobileContent":[516,"keep-mobile-content"]}],[1,"p-segment-item",{"active":[4],"iconOnly":[4,"icon-only"],"size":[513],"icon":[1],"iconFlip":[1,"icon-flip"],"iconRotate":[2,"icon-rotate"]}],[4,"p-segment-container"]]],["p-8873dc41",[[4,"p-dropdown-menu-container",{"maxWidth":[4,"max-width"],"fullWidth":[4,"full-width"],"scrollable":[8]}]]],["p-d9267cc3",[[1,"p-dropdown-menu-item",{"active":[4],"variant":[1],"enableHover":[4,"enable-hover"],"icon":[1]}],[1,"p-dropdown",{"placement":[513],"strategy":[1],"show":[4],"calculateWidth":[4,"calculate-width"],"applyMaxWidth":[4,"apply-max-width"],"applyFullWidth":[4,"apply-full-width"],"scrollable":[8],"insideClick":[4,"inside-click"],"disableTriggerClick":[4,"disable-trigger-click"],"applyChevron":[4,"apply-chevron"],"chevronPosition":[1,"chevron-position"],"chevronDirection":[1,"chevron-direction"]},[[6,"click","documentClickHandler"]],{"show":["onShowChange"]}]]],["p-35c563a7",[[1,"p-page-size-select",{"size":[1538],"sizeOptions":[16],"chevronPosition":[1,"chevron-position"],"buttonSize":[1,"button-size"],"buttonTemplate":[16],"itemTemplate":[16],"hidden":[4],"_locales":[32]},[[16,"localeChanged","_setLocales"]]],[0,"p-pagination",{"page":[1538],"pageSize":[2,"page-size"],"hideOnSinglePage":[4,"hide-on-single-page"],"total":[2]},null,{"page":["pageChangeHandler"],"pageSize":["pageChangeHandler"],"total":["pageChangeHandler"]}],[1,"p-pagination-item",{"active":[4]}]]],["p-1ddbc9f2",[[1,"p-tooltip",{"variant":[1],"content":[8],"placement":[1],"strategy":[1],"enableUserInput":[4,"enable-user-input"],"show":[4],"canManuallyClose":[4,"can-manually-close"]},[[2,"click","clickHandler"],[6,"click","documentClickHandler"],[1,"mouseenter","mouseEnterHandler"],[0,"focus","mouseEnterHandler"],[1,"mouseleave","mouseLeaveHandler"],[0,"blur","mouseLeaveHandler"]],{"show":["onShowChange"]}]]],["p-13e80641",[[1,"p-input-group",{"size":[1],"prefix":[1],"suffix":[1],"icon":[1],"iconFlip":[1,"icon-flip"],"iconRotate":[2,"icon-rotate"],"iconPosition":[1,"icon-position"],"label":[1],"helper":[1],"required":[516],"error":[513],"disabled":[516],"focused":[516],"forceShowTooltip":[516,"force-show-tooltip"],"focusMethod":[1,"focus-method"],"errorVariant":[1,"error-variant"],"_forceShowTooltip":[32]},[[0,"focusin","handleFocusIn"],[0,"focusout","handleFocusOut"]]],[1,"p-helper",{"placement":[1]}],[1,"p-input-error",{"error":[1],"forceShowTooltip":[4,"force-show-tooltip"],"_showTooltip":[32]}]]],["p-1079ffc6",[[1,"p-table-header",{"quickFilters":[16],"activeQuickFilterIdentifier":[1,"active-quick-filter-identifier"],"loading":[4],"enableSearch":[4,"enable-search"],"itemsSelectedAmount":[2,"items-selected-amount"],"query":[1025],"enableFilter":[4,"enable-filter"],"selectedFiltersAmount":[2,"selected-filters-amount"],"filterButtonTemplate":[16],"enableAction":[4,"enable-action"],"actionLoading":[4,"action-loading"],"actionIcon":[1,"action-icon"],"actionText":[1,"action-text"],"canUseAction":[1028,"can-use-action"],"actionButtonTemplate":[16],"_locales":[32]},[[16,"localeChanged","_setLocales"]]],[1,"p-table-footer",{"enablePageSize":[4,"enable-page-size"],"enablePagination":[4,"enable-pagination"],"enableExport":[4,"enable-export"],"loading":[4],"page":[1538],"total":[2],"pageSize":[2,"page-size"],"pageSizeOptions":[16],"hideOnSinglePage":[4,"hide-on-single-page"],"_locales":[32]},[[16,"localeChanged","_setLocales"]]],[4,"p-table-cell",{"variant":[1],"index":[2],"rowIndex":[2,"row-index"],"definition":[16],"item":[8],"value":[8],"checkbox":[8],"template":[16]}],[1,"p-table-row",{"variant":[1],"enableHover":[4,"enable-hover"]}],[1,"p-floating-menu-container",{"usedInTable":[4,"used-in-table"]}],[1,"p-floating-menu-item",{"hover":[516]}],[0,"p-illustration",{"variant":[1]}],[1,"p-table-container",{"shadow":[4]}]]]]'),e)));
1
+ import{p as e,b as a}from"./p-e4d5e7a7.js";export{s as setNonce}from"./p-e4d5e7a7.js";const t=()=>{const a=import.meta.url;const t={};if(a!==""){t.resourcesUrl=new URL(".",a).href}return e(t)};t().then((e=>a(JSON.parse('[["p-e4110d85",[[4,"p-button",{"variant":[1],"underline":[4],"href":[1],"target":[1],"size":[1],"type":[1],"loading":[4],"chevron":[8],"chevronPosition":[1,"chevron-position"],"disabled":[4],"icon":[1],"iconOnly":[4,"icon-only"],"iconPosition":[1,"icon-position"],"iconFlip":[1,"icon-flip"],"iconRotate":[2,"icon-rotate"],"inheritText":[4,"inherit-text"]},[[2,"click","handleClick"]]],[1,"p-loader",{"show":[4],"variant":[1],"color":[1],"modalTitle":[1,"modal-title"],"modalDescription":[1,"modal-description"]}],[0,"p-icon",{"variant":[1],"size":[1],"rotate":[2],"flip":[1]}]]],["p-a9ebacc8",[[4,"p-table",{"items":[1],"loading":[4],"headerLoading":[4,"header-loading"],"footerLoading":[4,"footer-loading"],"amountOfLoadingRows":[2,"amount-of-loading-rows"],"enableRowSelection":[4,"enable-row-selection"],"rowSelectionLimit":[2,"row-selection-limit"],"enableRowClick":[4,"enable-row-click"],"selectedRows":[16],"enableFloatingMenu":[4,"enable-floating-menu"],"floatingMenuAmountSelectedTemplate":[16],"selectionKey":[1,"selection-key"],"canSelectKey":[1,"can-select-key"],"enableHeader":[4,"enable-header"],"quickFilters":[16],"activeQuickFilterIdentifier":[1,"active-quick-filter-identifier"],"enableSearch":[4,"enable-search"],"query":[1025],"enableFilter":[4,"enable-filter"],"selectedFiltersAmount":[2,"selected-filters-amount"],"filterButtonTemplate":[16],"enableAction":[4,"enable-action"],"actionButtonLoading":[4,"action-button-loading"],"actionButtonEnabled":[4,"action-button-enabled"],"actionButtonIcon":[1,"action-button-icon"],"actionButtonText":[1,"action-button-text"],"actionButtonTemplate":[16],"enableFooter":[4,"enable-footer"],"enablePageSize":[4,"enable-page-size"],"enablePagination":[4,"enable-pagination"],"enableExport":[4,"enable-export"],"page":[1538],"total":[2],"pageSize":[2,"page-size"],"pageSizeOptions":[16],"hideOnSinglePage":[4,"hide-on-single-page"],"emptyStateHeader":[16],"emptyStateContent":[16],"emptyStateAction":[16],"enableEmptyStateAction":[4,"enable-empty-state-action"],"emptyStateFilteredHeader":[16],"emptyStateFilteredContent":[16],"shadow":[4],"_locales":[32],"_columns":[32],"_items":[32]},[[16,"localeChanged","_setLocales"],[16,"tableDefinitionChanged","onTableDefinitionUpdated"],[4,"keydown","keyDown"],[4,"keyup","keyUp"],[4,"visibilitychange","visibilityChange"]],{"items":["_parseItems"]}]]],["p-22a84714",[[0,"p-select",{"items":[1],"multi":[516],"icon":[1],"query":[1],"placeholder":[1],"autocompletePlaceholder":[1,"autocomplete-placeholder"],"value":[8],"displayKey":[1,"display-key"],"dropdownDisplayKey":[1,"dropdown-display-key"],"selectionDisplayKey":[1,"selection-display-key"],"valueKey":[1,"value-key"],"avatarKey":[1,"avatar-key"],"avatarLettersKey":[1,"avatar-letters-key"],"identifierKey":[1,"identifier-key"],"queryKey":[1,"query-key"],"autoSelectFirst":[4,"auto-select-first"],"showChevron":[4,"show-chevron"],"maxDisplayedItems":[2,"max-displayed-items"],"enableAutocomplete":[4,"enable-autocomplete"],"asyncFilter":[4,"async-filter"],"loading":[4],"enableSelectAll":[4,"enable-select-all"],"selectAllText":[1,"select-all-text"],"selectAllIcon":[1,"select-all-icon"],"size":[1],"prefix":[1],"label":[1],"helper":[1],"required":[516],"error":[513],"disabled":[516],"showAddItem":[4,"show-add-item"],"addItemText":[1,"add-item-text"],"emptyStateText":[1,"empty-state-text"],"_showDropdown":[32],"_selectedItem":[32],"_allSelected":[32],"_amountHidden":[32]},[[6,"click","documentClickHandler"]],{"value":["_valueChange"],"items":["itemChanges"],"_showDropdown":["_showDropdownChanges"],"multi":["multiChanges"]}]]],["p-3969a78e",[[1,"p-modal",{"size":[1],"variant":[1],"header":[1],"show":[4],"applyBlur":[4,"apply-blur"],"showClose":[4,"show-close"],"showMobileFooter":[4,"show-mobile-footer"],"backdropClickClose":[4,"backdrop-click-close"],"scrollLock":[4,"scroll-lock"],"padding":[4],"_closing":[32]},[[8,"closeModal","handleCloseModal"]]]]],["p-c9b840a7",[[0,"p-datepicker",{"placeholder":[1],"value":[1],"preselectToday":[4,"preselect-today"],"disabledDates":[1,"disabled-dates"],"minDate":[1,"min-date"],"maxDate":[1,"max-date"],"disableWeekends":[4,"disable-weekends"],"mode":[1],"format":[1],"size":[1],"prefix":[1],"label":[1],"helper":[1],"required":[516],"error":[513],"disabled":[516],"_showDropdown":[32],"_value":[32],"_minDate":[32],"_maxDate":[32],"_disabledDates":[32]},[[6,"click","documentClickHandler"]],{"value":["parseValue"],"minDate":["parseMinDate"],"maxDate":["parseMaxDate"],"disabledDates":["parseDisabledDates"]}]]],["p-60400a89",[[1,"p-drawer",{"header":[1],"show":[4],"applyBlur":[4,"apply-blur"],"showClose":[4,"show-close"],"backdropClickClose":[4,"backdrop-click-close"],"canClose":[4,"can-close"],"scrollLock":[4,"scroll-lock"],"_closing":[32]},[[8,"closeDrawer","handleCloseDrawer"],[8,"forceCloseDrawer","handleForceCloseDrawer"]]]]],["p-699e0b35",[[1,"p-attachment",{"mode":[1],"loading":[4],"error":[1],"downloading":[4]}]]],["p-179efb16",[[1,"p-navbar",{"closeText":[1,"close-text"],"menuText":[1,"menu-text"],"_showMenu":[32]},[[8,"closeNavbar","handleCloseNavbar"],[8,"openNavbar","handleOpenNavbar"]]]]],["p-2d3ff364",[[1,"p-profile",{"variant":[1],"size":[513],"_dropdownOpen":[32]}]]],["p-4c30c74b",[[1,"p-toast",{"variant":[1],"header":[1],"content":[1],"enableAction":[4,"enable-action"],"actionIcon":[1,"action-icon"],"actionIconFlip":[1,"action-icon-flip"],"actionIconRotate":[2,"action-icon-rotate"]}]]],["p-a2b552f9",[[1,"p-divider",{"variant":[513]}]]],["p-d0796984",[[1,"p-accordion",{"header":[1],"open":[4],"closeable":[4],"openable":[4]}]]],["p-fffaacc2",[[1,"p-navigation-item",{"active":[4],"icon":[1],"counter":[8],"href":[1],"target":[1]}]]],["p-f9e9370b",[[4,"p-card-header",{"header":[1],"arrow":[4]}]]],["p-cb2674b5",[[1,"p-content-slider",{"hideMobileIndicator":[4,"hide-mobile-indicator"],"disableDrag":[4,"disable-drag"],"disableAutoCenter":[4,"disable-auto-center"],"disableIndicatorClick":[4,"disable-indicator-click"],"_visibleIndex":[32],"_outerHeight":[32],"_totalWidth":[32],"_dragging":[32]},[[9,"mouseup","mouseUpHandler"],[9,"touchend","mouseUpHandler"],[9,"resize","resizeHandler"]]]]],["p-7bf042c9",[[1,"p-cropper",{"variant":[513],"value":[8],"returnType":[1,"return-type"],"_loaded":[32],"_currentScale":[32]},[[9,"resize","onResize"]]]]],["p-97bcf0b5",[[1,"p-info-panel",{"variant":[1],"header":[1],"content":[1],"closeable":[4]}]]],["p-cf7bd354",[[4,"p-status",{"variant":[1],"icon":[1],"iconFlip":[1,"icon-flip"],"iconRotate":[2,"icon-rotate"]}]]],["p-d8641c29",[[1,"p-stepper-line",{"active":[516],"direction":[513]}]]],["p-e74e8edd",[[1,"p-stepper",{"activeStep":[2,"active-step"],"direction":[513],"contentPosition":[513,"content-position"]},null,{"activeStep":["_generateSteps"]}]]],["p-eebab75d",[[1,"p-stepper-item",{"align":[513],"direction":[513],"contentPosition":[513,"content-position"],"finished":[516],"active":[516]}]]],["p-ec29eed0",[[1,"p-tab-group"]]],["p-af6b813e",[[4,"p-avatar-group",{"extra":[2]}]]],["p-8426ca20",[[4,"p-card-body",{"inheritText":[516,"inherit-text"]}]]],["p-f0f1a46b",[[1,"p-card-container",{"hoverable":[516],"shadow":[516]}]]],["p-bbe63029",[[1,"p-layout",{"variant":[1]}]]],["p-7793ba3a",[[1,"p-tab-item",{"active":[4]}]]],["p-4dc5647e",[[0,"p-table-column",{"path":[1537],"type":[1537],"name":[1537],"useSlot":[1540,"use-slot"],"hasCheckbox":[1540,"has-checkbox"],"align":[1537],"isLast":[1540,"is-last"],"sizes":[1032]}]]],["p-606ad811",[[1,"p-toast-container",{"placement":[1]}]]],["p-dace47c5",[[1,"p-calendar",{"variant":[1],"value":[1],"preselectToday":[4,"preselect-today"],"disabledDates":[1,"disabled-dates"],"minDate":[1,"min-date"],"maxDate":[1,"max-date"],"disableWeekends":[4,"disable-weekends"],"mode":[1],"_view":[32],"_viewDate":[32],"_value":[32],"_minDate":[32],"_maxDate":[32],"_disabledDates":[32]},null,{"value":["_parseValue"],"minDate":["_parseMinDate"],"maxDate":["_parseMaxDate"],"disabledDates":["_parseDisabledDates"]}]]],["p-0cbff44f",[[0,"p-avatar",{"variant":[513],"size":[513],"defaultImage":[1,"default-image"],"src":[1],"letters":[1],"_src":[32],"_failed":[32]},null,{"src":["onSrchChange"]}]]],["p-2becd73c",[[1,"p-counter",{"variant":[1],"size":[1]}]]],["p-ec15ee73",[[1,"p-slider-indicator",{"active":[4]}]]],["p-4e9e4ce2",[[1,"p-drawer-header",{"showClose":[4,"show-close"]}],[1,"p-drawer-body",{"variant":[1]}],[4,"p-drawer-container",{"closing":[4]}]]],["p-b848c222",[[1,"p-backdrop",{"variant":[1],"applyBlur":[4,"apply-blur"],"closing":[4],"scrollLock":[4,"scroll-lock"]},[[2,"click","handleClick"]]]]],["p-bf1ffb6a",[[1,"p-modal-header",{"showClose":[4,"show-close"]}],[1,"p-modal-footer"],[1,"p-modal-body",{"variant":[1],"rounded":[4],"padding":[4]}],[4,"p-modal-container",{"size":[1],"closing":[4]}]]],["p-2cd5062f",[[1,"p-label",{"variant":[513],"behavior":[513],"iconPosition":[1,"icon-position"],"icon":[513],"iconFlip":[1,"icon-flip"],"iconRotate":[2,"icon-rotate"],"size":[513],"keepMobileContent":[516,"keep-mobile-content"]}],[1,"p-segment-item",{"active":[4],"iconOnly":[4,"icon-only"],"size":[513],"icon":[1],"iconFlip":[1,"icon-flip"],"iconRotate":[2,"icon-rotate"]}],[4,"p-segment-container"]]],["p-8873dc41",[[4,"p-dropdown-menu-container",{"maxWidth":[4,"max-width"],"fullWidth":[4,"full-width"],"scrollable":[8]}]]],["p-d9267cc3",[[1,"p-dropdown-menu-item",{"active":[4],"variant":[1],"enableHover":[4,"enable-hover"],"icon":[1]}],[1,"p-dropdown",{"placement":[513],"strategy":[1],"show":[4],"calculateWidth":[4,"calculate-width"],"applyMaxWidth":[4,"apply-max-width"],"applyFullWidth":[4,"apply-full-width"],"scrollable":[8],"insideClick":[4,"inside-click"],"disableTriggerClick":[4,"disable-trigger-click"],"applyChevron":[4,"apply-chevron"],"chevronPosition":[1,"chevron-position"],"chevronDirection":[1,"chevron-direction"]},[[6,"click","documentClickHandler"]],{"show":["onShowChange"]}]]],["p-35c563a7",[[1,"p-page-size-select",{"size":[1538],"sizeOptions":[16],"chevronPosition":[1,"chevron-position"],"buttonSize":[1,"button-size"],"buttonTemplate":[16],"itemTemplate":[16],"hidden":[4],"_locales":[32]},[[16,"localeChanged","_setLocales"]]],[0,"p-pagination",{"page":[1538],"pageSize":[2,"page-size"],"hideOnSinglePage":[4,"hide-on-single-page"],"total":[2]},null,{"page":["pageChangeHandler"],"pageSize":["pageChangeHandler"],"total":["pageChangeHandler"]}],[1,"p-pagination-item",{"active":[4]}]]],["p-1ddbc9f2",[[1,"p-tooltip",{"variant":[1],"content":[8],"placement":[1],"strategy":[1],"enableUserInput":[4,"enable-user-input"],"show":[4],"canManuallyClose":[4,"can-manually-close"]},[[2,"click","clickHandler"],[6,"click","documentClickHandler"],[1,"mouseenter","mouseEnterHandler"],[0,"focus","mouseEnterHandler"],[1,"mouseleave","mouseLeaveHandler"],[0,"blur","mouseLeaveHandler"]],{"show":["onShowChange"]}]]],["p-13e80641",[[1,"p-input-group",{"size":[1],"prefix":[1],"suffix":[1],"icon":[1],"iconFlip":[1,"icon-flip"],"iconRotate":[2,"icon-rotate"],"iconPosition":[1,"icon-position"],"label":[1],"helper":[1],"required":[516],"error":[513],"disabled":[516],"focused":[516],"forceShowTooltip":[516,"force-show-tooltip"],"focusMethod":[1,"focus-method"],"errorVariant":[1,"error-variant"],"_forceShowTooltip":[32]},[[0,"focusin","handleFocusIn"],[0,"focusout","handleFocusOut"]]],[1,"p-helper",{"placement":[1]}],[1,"p-input-error",{"error":[1],"forceShowTooltip":[4,"force-show-tooltip"],"_showTooltip":[32]}]]],["p-1079ffc6",[[1,"p-table-header",{"quickFilters":[16],"activeQuickFilterIdentifier":[1,"active-quick-filter-identifier"],"loading":[4],"enableSearch":[4,"enable-search"],"itemsSelectedAmount":[2,"items-selected-amount"],"query":[1025],"enableFilter":[4,"enable-filter"],"selectedFiltersAmount":[2,"selected-filters-amount"],"filterButtonTemplate":[16],"enableAction":[4,"enable-action"],"actionLoading":[4,"action-loading"],"actionIcon":[1,"action-icon"],"actionText":[1,"action-text"],"canUseAction":[1028,"can-use-action"],"actionButtonTemplate":[16],"_locales":[32]},[[16,"localeChanged","_setLocales"]]],[1,"p-table-footer",{"enablePageSize":[4,"enable-page-size"],"enablePagination":[4,"enable-pagination"],"enableExport":[4,"enable-export"],"loading":[4],"page":[1538],"total":[2],"pageSize":[2,"page-size"],"pageSizeOptions":[16],"hideOnSinglePage":[4,"hide-on-single-page"],"_locales":[32]},[[16,"localeChanged","_setLocales"]]],[4,"p-table-cell",{"variant":[1],"index":[2],"rowIndex":[2,"row-index"],"definition":[16],"item":[8],"value":[8],"checkbox":[8],"template":[16]}],[1,"p-table-row",{"variant":[1],"enableHover":[4,"enable-hover"]}],[1,"p-floating-menu-container",{"usedInTable":[4,"used-in-table"]}],[1,"p-floating-menu-item",{"hover":[516]}],[0,"p-illustration",{"variant":[1]}],[1,"p-table-container",{"shadow":[4]}]]]]'),e)));
2
2
  //# sourceMappingURL=paperless.esm.js.map
@@ -9,18 +9,27 @@ const stepperComponentCss = ".flex{display:flex!important}.h-auto{height:auto!im
9
9
  const Stepper = class {
10
10
  constructor(hostRef) {
11
11
  index.registerInstance(this, hostRef);
12
+ this._rendering = false;
13
+ this._loaded = false;
12
14
  this.activeStep = 1;
13
15
  this.direction = 'horizontal';
14
16
  this.contentPosition = 'end';
15
17
  }
16
18
  // private _steps: Array<HTMLPStepperItemElement>;
17
- componentDidRender() {
18
- this._generateSteps();
19
+ componentDidLoad() {
20
+ setTimeout(() => {
21
+ this._generateSteps(true);
22
+ this._loaded = true;
23
+ }, 500);
19
24
  }
20
25
  render() {
21
- return (index.h(index.Host, { class: "p-stepper" }, index.h("slot", null)));
26
+ return (index.h(index.Host, { class: "p-stepper" }, index.h("slot", { onSlotchange: () => this._generateSteps() })));
22
27
  }
23
- _generateSteps() {
28
+ _generateSteps(firstLoad = false) {
29
+ if (!firstLoad && (!this._el || this._rendering || !this._loaded)) {
30
+ return;
31
+ }
32
+ this._rendering = true;
24
33
  let activeStep = this.activeStep - 1 || 0;
25
34
  const items = this._el.querySelectorAll('p-stepper-item');
26
35
  if (!this.activeStep || activeStep < 0) {
@@ -46,7 +55,9 @@ const Stepper = class {
46
55
  const nextItem = item.nextElementSibling;
47
56
  if (nextItem &&
48
57
  nextItem.tagName.toLowerCase() === 'p-stepper-item') {
49
- const heightDiff = (item.clientHeight - 16) / 2;
58
+ const heightDiff = (item.clientHeight > 16
59
+ ? item.clientHeight - 16
60
+ : item.clientHeight) / 2;
50
61
  const stepperLine = document.createElement('p-stepper-line');
51
62
  stepperLine.direction = this.direction;
52
63
  stepperLine.active = i <= activeStep;
@@ -67,15 +78,18 @@ const Stepper = class {
67
78
  }
68
79
  }
69
80
  }
70
- // remove duplicate lines
71
81
  const lines = this._el.querySelectorAll('p-stepper-line');
72
82
  for (let j = lines.length - 1; j >= 0; j--) {
73
83
  const line = lines.item(j);
74
- const previousItem = line.previousElementSibling;
75
- if (previousItem.tagName.toLowerCase() === 'p-stepper-line') {
84
+ const next = line === null || line === void 0 ? void 0 : line.nextElementSibling;
85
+ if (next && next.tagName.toLowerCase() === 'p-stepper-line') {
86
+ next.remove();
87
+ }
88
+ if (!next) {
76
89
  line.remove();
77
90
  }
78
91
  }
92
+ setTimeout(() => (this._rendering = false), 100);
79
93
  }
80
94
  get _el() { return index.getEl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AC,sBAAsB,CAAC;QACjD,IAAI,YAAY,CAAC,OAAO,CAAC,WAAW,EAAE,KAAK,gBAAgB,EAAE;UAC5D,YAAY,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC;UACxC,YAAY,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,QAAQ,CAAC;SACnD;OACD;KACD;;IAGD,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,CAAC;IAC1D,KAAK,IAAI,CAAC,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,EAAE;MAC3C,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;MAC3B,MAAM,YAAY,GAAG,IAAI,CAAC,sBAAsB,CAAC;MACjD,IAAI,YAAY,CAAC,OAAO,CAAC,WAAW,EAAE,KAAK,gBAAgB,EAAE;QAC5D,IAAI,CAAC,MAAM,EAAE,CAAC;OACd;KACD;GACD;;;;;;;;;;","names":["h","Host"],"sources":["src/components/molecules/stepper/stepper.component.scss?tag=p-stepper&encapsulation=shadow","src/components/molecules/stepper/stepper.component.tsx"],"sourcesContent":[":host {\n\t@apply flex;\n}\n\n:host([direction='horizontal']) {\n\t@apply h-auto items-end;\n}\n\n:host([direction='vertical']) {\n\t@apply flex-col flex-wrap items-start;\n\t@apply w-full min-h-full;\n}\n\n:host([direction='vertical'][content-position='start']) {\n\t@apply items-end;\n}\n","import { Component, Element, h, Host, Prop, Watch } from '@stencil/core';\n\n@Component({\n\ttag: 'p-stepper',\n\tstyleUrl: 'stepper.component.scss',\n\tshadow: true,\n})\nexport class Stepper {\n\t/**\n\t * The currently active step\n\t */\n\t@Prop() activeStep: number = 1;\n\n\t/**\n\t * The direction of the stepper\n\t */\n\t@Prop({ reflect: true }) direction: 'horizontal' | 'vertical' =\n\t\t'horizontal';\n\n\t/**\n\t * The position of the content in case of vertical direction\n\t */\n\t@Prop({ reflect: true }) contentPosition: 'start' | 'end' = 'end';\n\n\t/**\n\t * The host element\n\t */\n\t@Element() private _el: HTMLElement;\n\n\t// private _steps: Array<HTMLPStepperItemElement>;\n\n\tcomponentDidRender() {\n\t\tthis._generateSteps();\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class=\"p-stepper\">\n\t\t\t\t<slot />\n\t\t\t</Host>\n\t\t);\n\t}\n\n\t@Watch('activeStep')\n\tprivate _generateSteps() {\n\t\tlet activeStep = this.activeStep - 1 || 0;\n\t\tconst items = this._el.querySelectorAll('p-stepper-item');\n\n\t\tif (!this.activeStep || activeStep < 0) {\n\t\t\tfor (let i = 0; i < items?.length; i++) {\n\t\t\t\tconst item = items.item(i) as any;\n\n\t\t\t\tif (item.active) {\n\t\t\t\t\tactiveStep = i;\n\t\t\t\t}\n\n\t\t\t\tif (activeStep < 0 && item.finished) {\n\t\t\t\t\tactiveStep = i + 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor (let i = 0; i < items?.length; i++) {\n\t\t\tconst item = items.item(i) as any;\n\n\t\t\titem.active = i === activeStep;\n\t\t\titem.finished = i < activeStep;\n\t\t\titem.direction = this.direction;\n\t\t\titem.align =\n\t\t\t\ti === 0 ? 'start' : i === items?.length - 1 ? 'end' : 'center';\n\t\t\titem.contentPosition = this.contentPosition;\n\n\t\t\tif (i < items.length - 1) {\n\t\t\t\tconst nextItem = item.nextElementSibling;\n\t\t\t\tif (\n\t\t\t\t\tnextItem &&\n\t\t\t\t\tnextItem.tagName.toLowerCase() === 'p-stepper-item'\n\t\t\t\t) {\n\t\t\t\t\tconst heightDiff = (item.clientHeight - 16) / 2;\n\n\t\t\t\t\tconst stepperLine =\n\t\t\t\t\t\tdocument.createElement('p-stepper-line');\n\n\t\t\t\t\tstepperLine.direction = this.direction;\n\t\t\t\t\tstepperLine.active = i <= activeStep;\n\n\t\t\t\t\tif (heightDiff > 0 && this.direction === 'vertical') {\n\t\t\t\t\t\tstepperLine.style.marginTop = `-${heightDiff / 16}rem`;\n\t\t\t\t\t\tstepperLine.style.marginBottom = `-${\n\t\t\t\t\t\t\theightDiff / 16\n\t\t\t\t\t\t}rem`;\n\t\t\t\t\t\tstepperLine.style.minHeight = `calc(1rem + ${\n\t\t\t\t\t\t\t(heightDiff * 2) / 16\n\t\t\t\t\t\t}rem)`;\n\t\t\t\t\t}\n\n\t\t\t\t\tthis._el.insertBefore(stepperLine, nextItem);\n\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (i > 0) {\n\t\t\t\tconst previousItem = item.previousElementSibling;\n\t\t\t\tif (previousItem.tagName.toLowerCase() === 'p-stepper-line') {\n\t\t\t\t\tpreviousItem.direction = this.direction;\n\t\t\t\t\tpreviousItem.active = item.active || item.finished;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// remove duplicate lines\n\t\tconst lines = this._el.querySelectorAll('p-stepper-line');\n\t\tfor (let j = lines.length - 1; j >= 0; j--) {\n\t\t\tconst line = lines.item(j);\n\t\t\tconst previousItem = line.previousElementSibling;\n\t\t\tif (previousItem.tagName.toLowerCase() === 'p-stepper-line') {\n\t\t\t\tline.remove();\n\t\t\t}\n\t\t}\n\t}\n}\n"],"version":3}
1
+ {"file":"p-stepper.entry.cjs.js","mappings":";;;;;;AAAA,MAAM,mBAAmB,GAAG,gfAAgf;;MCO/f,OAAO;;;IAsBX,eAAU,GAAG,KAAK,CAAC;IACnB,YAAO,GAAG,KAAK,CAAC;sBAnBK,CAAC;qBAM7B,YAAY;2BAK+C,KAAK;;;EAYjE,gBAAgB;IACf,UAAU,CAAC;MACV,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;MAC1B,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;KACpB,EAAE,GAAG,CAAC,CAAC;GACR;EAED,MAAM;IACL,QACCA,QAACC,UAAI,IAAC,KAAK,EAAC,WAAW,IACt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AY,GAAG,IAAI,CAAC,sBAAsB,CAAC;QACjD,IAAI,YAAY,CAAC,OAAO,CAAC,WAAW,EAAE,KAAK,gBAAgB,EAAE;UAC5D,YAAY,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC;UACxC,YAAY,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,QAAQ,CAAC;SACnD;OACD;KACD;IAED,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,CAAC;IAC1D,KAAK,IAAI,CAAC,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,EAAE;MAC3C,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;MAC3B,MAAM,IAAI,GAAG,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,kBAAkB,CAAC;MACtC,IAAI,IAAI,IAAI,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE,KAAK,gBAAgB,EAAE;QAC5D,IAAI,CAAC,MAAM,EAAE,CAAC;OACd;MAED,IAAI,CAAC,IAAI,EAAE;QACV,IAAI,CAAC,MAAM,EAAE,CAAC;OACd;KACD;IAED,UAAU,CAAC,OAAO,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC,EAAE,GAAG,CAAC,CAAC;GACjD;;;;;;;;;;","names":["h","Host"],"sources":["src/components/molecules/stepper/stepper.component.scss?tag=p-stepper&encapsulation=shadow","src/components/molecules/stepper/stepper.component.tsx"],"sourcesContent":[":host {\n\t@apply flex;\n}\n\n:host([direction='horizontal']) {\n\t@apply h-auto items-end;\n}\n\n:host([direction='vertical']) {\n\t@apply flex-col flex-wrap items-start;\n\t@apply w-full min-h-full;\n}\n\n:host([direction='vertical'][content-position='start']) {\n\t@apply items-end;\n}\n","import { Component, Element, h, Host, Prop, Watch } from '@stencil/core';\n\n@Component({\n\ttag: 'p-stepper',\n\tstyleUrl: 'stepper.component.scss',\n\tshadow: true,\n})\nexport class Stepper {\n\t/**\n\t * The currently active step\n\t */\n\t@Prop() activeStep: number = 1;\n\n\t/**\n\t * The direction of the stepper\n\t */\n\t@Prop({ reflect: true }) direction: 'horizontal' | 'vertical' =\n\t\t'horizontal';\n\n\t/**\n\t * The position of the content in case of vertical direction\n\t */\n\t@Prop({ reflect: true }) contentPosition: 'start' | 'end' = 'end';\n\n\t/**\n\t * The host element\n\t */\n\t@Element() private _el: HTMLElement;\n\n\tprivate _rendering = false;\n\tprivate _loaded = false;\n\n\t// private _steps: Array<HTMLPStepperItemElement>;\n\n\tcomponentDidLoad() {\n\t\tsetTimeout(() => {\n\t\t\tthis._generateSteps(true);\n\t\t\tthis._loaded = true;\n\t\t}, 500);\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class=\"p-stepper\">\n\t\t\t\t<slot onSlotchange={() => this._generateSteps()} />\n\t\t\t</Host>\n\t\t);\n\t}\n\n\t@Watch('activeStep')\n\tprivate _generateSteps(firstLoad = false) {\n\t\tif (!firstLoad && (!this._el || this._rendering || !this._loaded)) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._rendering = true;\n\n\t\tlet activeStep = this.activeStep - 1 || 0;\n\t\tconst items = this._el.querySelectorAll('p-stepper-item');\n\n\t\tif (!this.activeStep || activeStep < 0) {\n\t\t\tfor (let i = 0; i < items?.length; i++) {\n\t\t\t\tconst item = items.item(i) as any;\n\n\t\t\t\tif (item.active) {\n\t\t\t\t\tactiveStep = i;\n\t\t\t\t}\n\n\t\t\t\tif (activeStep < 0 && item.finished) {\n\t\t\t\t\tactiveStep = i + 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor (let i = 0; i < items?.length; i++) {\n\t\t\tconst item = items.item(i) as any;\n\n\t\t\titem.active = i === activeStep;\n\t\t\titem.finished = i < activeStep;\n\t\t\titem.direction = this.direction;\n\t\t\titem.align =\n\t\t\t\ti === 0 ? 'start' : i === items?.length - 1 ? 'end' : 'center';\n\t\t\titem.contentPosition = this.contentPosition;\n\n\t\t\tif (i < items.length - 1) {\n\t\t\t\tconst nextItem = item.nextElementSibling;\n\t\t\t\tif (\n\t\t\t\t\tnextItem &&\n\t\t\t\t\tnextItem.tagName.toLowerCase() === 'p-stepper-item'\n\t\t\t\t) {\n\t\t\t\t\tconst heightDiff =\n\t\t\t\t\t\t(item.clientHeight > 16\n\t\t\t\t\t\t\t? item.clientHeight - 16\n\t\t\t\t\t\t\t: item.clientHeight) / 2;\n\n\t\t\t\t\tconst stepperLine =\n\t\t\t\t\t\tdocument.createElement('p-stepper-line');\n\n\t\t\t\t\tstepperLine.direction = this.direction;\n\t\t\t\t\tstepperLine.active = i <= activeStep;\n\n\t\t\t\t\tif (heightDiff > 0 && this.direction === 'vertical') {\n\t\t\t\t\t\tstepperLine.style.marginTop = `-${heightDiff / 16}rem`;\n\t\t\t\t\t\tstepperLine.style.marginBottom = `-${\n\t\t\t\t\t\t\theightDiff / 16\n\t\t\t\t\t\t}rem`;\n\t\t\t\t\t\tstepperLine.style.minHeight = `calc(1rem + ${\n\t\t\t\t\t\t\t(heightDiff * 2) / 16\n\t\t\t\t\t\t}rem)`;\n\t\t\t\t\t}\n\n\t\t\t\t\tthis._el.insertBefore(stepperLine, nextItem);\n\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (i > 0) {\n\t\t\t\tconst previousItem = item.previousElementSibling;\n\t\t\t\tif (previousItem.tagName.toLowerCase() === 'p-stepper-line') {\n\t\t\t\t\tpreviousItem.direction = this.direction;\n\t\t\t\t\tpreviousItem.active = item.active || item.finished;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tconst lines = this._el.querySelectorAll('p-stepper-line');\n\t\tfor (let j = lines.length - 1; j >= 0; j--) {\n\t\t\tconst line = lines.item(j);\n\t\t\tconst next = line?.nextElementSibling;\n\t\t\tif (next && next.tagName.toLowerCase() === 'p-stepper-line') {\n\t\t\t\tnext.remove();\n\t\t\t}\n\n\t\t\tif (!next) {\n\t\t\t\tline.remove();\n\t\t\t}\n\t\t}\n\n\t\tsetTimeout(() => (this._rendering = false), 100);\n\t}\n}\n"],"version":3}
@@ -1,18 +1,27 @@
1
1
  import { h, Host } from "@stencil/core";
2
2
  export class Stepper {
3
3
  constructor() {
4
+ this._rendering = false;
5
+ this._loaded = false;
4
6
  this.activeStep = 1;
5
7
  this.direction = 'horizontal';
6
8
  this.contentPosition = 'end';
7
9
  }
8
10
  // private _steps: Array<HTMLPStepperItemElement>;
9
- componentDidRender() {
10
- this._generateSteps();
11
+ componentDidLoad() {
12
+ setTimeout(() => {
13
+ this._generateSteps(true);
14
+ this._loaded = true;
15
+ }, 500);
11
16
  }
12
17
  render() {
13
- return (h(Host, { class: "p-stepper" }, h("slot", null)));
18
+ return (h(Host, { class: "p-stepper" }, h("slot", { onSlotchange: () => this._generateSteps() })));
14
19
  }
15
- _generateSteps() {
20
+ _generateSteps(firstLoad = false) {
21
+ if (!firstLoad && (!this._el || this._rendering || !this._loaded)) {
22
+ return;
23
+ }
24
+ this._rendering = true;
16
25
  let activeStep = this.activeStep - 1 || 0;
17
26
  const items = this._el.querySelectorAll('p-stepper-item');
18
27
  if (!this.activeStep || activeStep < 0) {
@@ -38,7 +47,9 @@ export class Stepper {
38
47
  const nextItem = item.nextElementSibling;
39
48
  if (nextItem &&
40
49
  nextItem.tagName.toLowerCase() === 'p-stepper-item') {
41
- const heightDiff = (item.clientHeight - 16) / 2;
50
+ const heightDiff = (item.clientHeight > 16
51
+ ? item.clientHeight - 16
52
+ : item.clientHeight) / 2;
42
53
  const stepperLine = document.createElement('p-stepper-line');
43
54
  stepperLine.direction = this.direction;
44
55
  stepperLine.active = i <= activeStep;
@@ -59,15 +70,18 @@ export class Stepper {
59
70
  }
60
71
  }
61
72
  }
62
- // remove duplicate lines
63
73
  const lines = this._el.querySelectorAll('p-stepper-line');
64
74
  for (let j = lines.length - 1; j >= 0; j--) {
65
75
  const line = lines.item(j);
66
- const previousItem = line.previousElementSibling;
67
- if (previousItem.tagName.toLowerCase() === 'p-stepper-line') {
76
+ const next = line === null || line === void 0 ? void 0 : line.nextElementSibling;
77
+ if (next && next.tagName.toLowerCase() === 'p-stepper-line') {
78
+ next.remove();
79
+ }
80
+ if (!next) {
68
81
  line.remove();
69
82
  }
70
83
  }
84
+ setTimeout(() => (this._rendering = false), 100);
71
85
  }
72
86
  static get is() { return "p-stepper"; }
73
87
  static get encapsulation() { return "shadow"; }
@@ -1 +1 @@
1
- {"version":3,"file":"stepper.component.js","sourceRoot":"","sources":["../../../../src/components/molecules/stepper/stepper.component.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAOzE,MAAM,OAAO,OAAO;;sBAIU,CAAC;qBAM7B,YAAY;2BAK+C,KAAK;;EAOjE,kDAAkD;EAElD,kBAAkB;IACjB,IAAI,CAAC,cAAc,EAAE,CAAC;EACvB,CAAC;EAED,MAAM;IACL,OAAO,CACN,EAAC,IAAI,IAAC,KAAK,EAAC,WAAW;MACtB,eAAQ,CACF,CACP,CAAC;EACH,CAAC;EAGO,cAAc;IACrB,IAAI,UAAU,GAAG,IAAI,CAAC,UAAU,GAAG,CAAC,IAAI,CAAC,CAAC;IAC1C,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,CAAC;IAE1D,IAAI,CAAC,IAAI,CAAC,UAAU,IAAI,UAAU,GAAG,CAAC,EAAE;MACvC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,IAAG,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,MAAM,CAAA,EAAE,CAAC,EAAE,EAAE;QACvC,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC,CAAQ,CAAC;QAElC,IAAI,IAA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACD","sourcesContent":["import { Component, Element, h, Host, Prop, Watch } from '@stencil/core';\n\n@Component({\n\ttag: 'p-stepper',\n\tstyleUrl: 'stepper.component.scss',\n\tshadow: true,\n})\nexport class Stepper {\n\t/**\n\t * The currently active step\n\t */\n\t@Prop() activeStep: number = 1;\n\n\t/**\n\t * The direction of the stepper\n\t */\n\t@Prop({ reflect: true }) direction: 'horizontal' | 'vertical' =\n\t\t'horizontal';\n\n\t/**\n\t * The position of the content in case of vertical direction\n\t */\n\t@Prop({ reflect: true }) contentPosition: 'start' | 'end' = 'end';\n\n\t/**\n\t * The host element\n\t */\n\t@Element() private _el: HTMLElement;\n\n\t// private _steps: Array<HTMLPStepperItemElement>;\n\n\tcomponentDidRender() {\n\t\tthis._generateSteps();\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class=\"p-stepper\">\n\t\t\t\t<slot />\n\t\t\t</Host>\n\t\t);\n\t}\n\n\t@Watch('activeStep')\n\tprivate _generateSteps() {\n\t\tlet activeStep = this.activeStep - 1 || 0;\n\t\tconst items = this._el.querySelectorAll('p-stepper-item');\n\n\t\tif (!this.activeStep || activeStep < 0) {\n\t\t\tfor (let i = 0; i < items?.length; i++) {\n\t\t\t\tconst item = items.item(i) as any;\n\n\t\t\t\tif (item.active) {\n\t\t\t\t\tactiveStep = i;\n\t\t\t\t}\n\n\t\t\t\tif (activeStep < 0 && item.finished) {\n\t\t\t\t\tactiveStep = i + 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor (let i = 0; i < items?.length; i++) {\n\t\t\tconst item = items.item(i) as any;\n\n\t\t\titem.active = i === activeStep;\n\t\t\titem.finished = i < activeStep;\n\t\t\titem.direction = this.direction;\n\t\t\titem.align =\n\t\t\t\ti === 0 ? 'start' : i === items?.length - 1 ? 'end' : 'center';\n\t\t\titem.contentPosition = this.contentPosition;\n\n\t\t\tif (i < items.length - 1) {\n\t\t\t\tconst nextItem = item.nextElementSibling;\n\t\t\t\tif (\n\t\t\t\t\tnextItem &&\n\t\t\t\t\tnextItem.tagName.toLowerCase() === 'p-stepper-item'\n\t\t\t\t) {\n\t\t\t\t\tconst heightDiff = (item.clientHeight - 16) / 2;\n\n\t\t\t\t\tconst stepperLine =\n\t\t\t\t\t\tdocument.createElement('p-stepper-line');\n\n\t\t\t\t\tstepperLine.direction = this.direction;\n\t\t\t\t\tstepperLine.active = i <= activeStep;\n\n\t\t\t\t\tif (heightDiff > 0 && this.direction === 'vertical') {\n\t\t\t\t\t\tstepperLine.style.marginTop = `-${heightDiff / 16}rem`;\n\t\t\t\t\t\tstepperLine.style.marginBottom = `-${\n\t\t\t\t\t\t\theightDiff / 16\n\t\t\t\t\t\t}rem`;\n\t\t\t\t\t\tstepperLine.style.minHeight = `calc(1rem + ${\n\t\t\t\t\t\t\t(heightDiff * 2) / 16\n\t\t\t\t\t\t}rem)`;\n\t\t\t\t\t}\n\n\t\t\t\t\tthis._el.insertBefore(stepperLine, nextItem);\n\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (i > 0) {\n\t\t\t\tconst previousItem = item.previousElementSibling;\n\t\t\t\tif (previousItem.tagName.toLowerCase() === 'p-stepper-line') {\n\t\t\t\t\tpreviousItem.direction = this.direction;\n\t\t\t\t\tpreviousItem.active = item.active || item.finished;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// remove duplicate lines\n\t\tconst lines = this._el.querySelectorAll('p-stepper-line');\n\t\tfor (let j = lines.length - 1; j >= 0; j--) {\n\t\t\tconst line = lines.item(j);\n\t\t\tconst previousItem = line.previousElementSibling;\n\t\t\tif (previousItem.tagName.toLowerCase() === 'p-stepper-line') {\n\t\t\t\tline.remove();\n\t\t\t}\n\t\t}\n\t}\n}\n"]}
1
+ {"version":3,"file":"stepper.component.js","sourceRoot":"","sources":["../../../../src/components/molecules/stepper/stepper.component.tsx"],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,IAAI,IAAI,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE,KAAK,gBAAgB,EAAE;QAC5D,IAAI,CAAC,MAAM,EAAE,CAAC;OACd;MAED,IAAI,CAAC,IAAI,EAAE;QACV,IAAI,CAAC,MAAM,EAAE,CAAC;OACd;KACD;IAED,UAAU,CAAC,GAAG,EAAE,CAAC,CAAC,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC,EAAE,GAAG,CAAC,CAAC;EAClD,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACD","sourcesContent":["import { Component, Element, h, Host, Prop, Watch } from '@stencil/core';\n\n@Component({\n\ttag: 'p-stepper',\n\tstyleUrl: 'stepper.component.scss',\n\tshadow: true,\n})\nexport class Stepper {\n\t/**\n\t * The currently active step\n\t */\n\t@Prop() activeStep: number = 1;\n\n\t/**\n\t * The direction of the stepper\n\t */\n\t@Prop({ reflect: true }) direction: 'horizontal' | 'vertical' =\n\t\t'horizontal';\n\n\t/**\n\t * The position of the content in case of vertical direction\n\t */\n\t@Prop({ reflect: true }) contentPosition: 'start' | 'end' = 'end';\n\n\t/**\n\t * The host element\n\t */\n\t@Element() private _el: HTMLElement;\n\n\tprivate _rendering = false;\n\tprivate _loaded = false;\n\n\t// private _steps: Array<HTMLPStepperItemElement>;\n\n\tcomponentDidLoad() {\n\t\tsetTimeout(() => {\n\t\t\tthis._generateSteps(true);\n\t\t\tthis._loaded = true;\n\t\t}, 500);\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class=\"p-stepper\">\n\t\t\t\t<slot onSlotchange={() => this._generateSteps()} />\n\t\t\t</Host>\n\t\t);\n\t}\n\n\t@Watch('activeStep')\n\tprivate _generateSteps(firstLoad = false) {\n\t\tif (!firstLoad && (!this._el || this._rendering || !this._loaded)) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._rendering = true;\n\n\t\tlet activeStep = this.activeStep - 1 || 0;\n\t\tconst items = this._el.querySelectorAll('p-stepper-item');\n\n\t\tif (!this.activeStep || activeStep < 0) {\n\t\t\tfor (let i = 0; i < items?.length; i++) {\n\t\t\t\tconst item = items.item(i) as any;\n\n\t\t\t\tif (item.active) {\n\t\t\t\t\tactiveStep = i;\n\t\t\t\t}\n\n\t\t\t\tif (activeStep < 0 && item.finished) {\n\t\t\t\t\tactiveStep = i + 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor (let i = 0; i < items?.length; i++) {\n\t\t\tconst item = items.item(i) as any;\n\n\t\t\titem.active = i === activeStep;\n\t\t\titem.finished = i < activeStep;\n\t\t\titem.direction = this.direction;\n\t\t\titem.align =\n\t\t\t\ti === 0 ? 'start' : i === items?.length - 1 ? 'end' : 'center';\n\t\t\titem.contentPosition = this.contentPosition;\n\n\t\t\tif (i < items.length - 1) {\n\t\t\t\tconst nextItem = item.nextElementSibling;\n\t\t\t\tif (\n\t\t\t\t\tnextItem &&\n\t\t\t\t\tnextItem.tagName.toLowerCase() === 'p-stepper-item'\n\t\t\t\t) {\n\t\t\t\t\tconst heightDiff =\n\t\t\t\t\t\t(item.clientHeight > 16\n\t\t\t\t\t\t\t? item.clientHeight - 16\n\t\t\t\t\t\t\t: item.clientHeight) / 2;\n\n\t\t\t\t\tconst stepperLine =\n\t\t\t\t\t\tdocument.createElement('p-stepper-line');\n\n\t\t\t\t\tstepperLine.direction = this.direction;\n\t\t\t\t\tstepperLine.active = i <= activeStep;\n\n\t\t\t\t\tif (heightDiff > 0 && this.direction === 'vertical') {\n\t\t\t\t\t\tstepperLine.style.marginTop = `-${heightDiff / 16}rem`;\n\t\t\t\t\t\tstepperLine.style.marginBottom = `-${\n\t\t\t\t\t\t\theightDiff / 16\n\t\t\t\t\t\t}rem`;\n\t\t\t\t\t\tstepperLine.style.minHeight = `calc(1rem + ${\n\t\t\t\t\t\t\t(heightDiff * 2) / 16\n\t\t\t\t\t\t}rem)`;\n\t\t\t\t\t}\n\n\t\t\t\t\tthis._el.insertBefore(stepperLine, nextItem);\n\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (i > 0) {\n\t\t\t\tconst previousItem = item.previousElementSibling;\n\t\t\t\tif (previousItem.tagName.toLowerCase() === 'p-stepper-line') {\n\t\t\t\t\tpreviousItem.direction = this.direction;\n\t\t\t\t\tpreviousItem.active = item.active || item.finished;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tconst lines = this._el.querySelectorAll('p-stepper-line');\n\t\tfor (let j = lines.length - 1; j >= 0; j--) {\n\t\t\tconst line = lines.item(j);\n\t\t\tconst next = line?.nextElementSibling;\n\t\t\tif (next && next.tagName.toLowerCase() === 'p-stepper-line') {\n\t\t\t\tnext.remove();\n\t\t\t}\n\n\t\t\tif (!next) {\n\t\t\t\tline.remove();\n\t\t\t}\n\t\t}\n\n\t\tsetTimeout(() => (this._rendering = false), 100);\n\t}\n}\n"]}
@@ -8,18 +8,27 @@ const Stepper = /*@__PURE__*/ proxyCustomElement(class Stepper extends HTMLEleme
8
8
  super();
9
9
  this.__registerHost();
10
10
  this.__attachShadow();
11
+ this._rendering = false;
12
+ this._loaded = false;
11
13
  this.activeStep = 1;
12
14
  this.direction = 'horizontal';
13
15
  this.contentPosition = 'end';
14
16
  }
15
17
  // private _steps: Array<HTMLPStepperItemElement>;
16
- componentDidRender() {
17
- this._generateSteps();
18
+ componentDidLoad() {
19
+ setTimeout(() => {
20
+ this._generateSteps(true);
21
+ this._loaded = true;
22
+ }, 500);
18
23
  }
19
24
  render() {
20
- return (h(Host, { class: "p-stepper" }, h("slot", null)));
25
+ return (h(Host, { class: "p-stepper" }, h("slot", { onSlotchange: () => this._generateSteps() })));
21
26
  }
22
- _generateSteps() {
27
+ _generateSteps(firstLoad = false) {
28
+ if (!firstLoad && (!this._el || this._rendering || !this._loaded)) {
29
+ return;
30
+ }
31
+ this._rendering = true;
23
32
  let activeStep = this.activeStep - 1 || 0;
24
33
  const items = this._el.querySelectorAll('p-stepper-item');
25
34
  if (!this.activeStep || activeStep < 0) {
@@ -45,7 +54,9 @@ const Stepper = /*@__PURE__*/ proxyCustomElement(class Stepper extends HTMLEleme
45
54
  const nextItem = item.nextElementSibling;
46
55
  if (nextItem &&
47
56
  nextItem.tagName.toLowerCase() === 'p-stepper-item') {
48
- const heightDiff = (item.clientHeight - 16) / 2;
57
+ const heightDiff = (item.clientHeight > 16
58
+ ? item.clientHeight - 16
59
+ : item.clientHeight) / 2;
49
60
  const stepperLine = document.createElement('p-stepper-line');
50
61
  stepperLine.direction = this.direction;
51
62
  stepperLine.active = i <= activeStep;
@@ -66,15 +77,18 @@ const Stepper = /*@__PURE__*/ proxyCustomElement(class Stepper extends HTMLEleme
66
77
  }
67
78
  }
68
79
  }
69
- // remove duplicate lines
70
80
  const lines = this._el.querySelectorAll('p-stepper-line');
71
81
  for (let j = lines.length - 1; j >= 0; j--) {
72
82
  const line = lines.item(j);
73
- const previousItem = line.previousElementSibling;
74
- if (previousItem.tagName.toLowerCase() === 'p-stepper-line') {
83
+ const next = line === null || line === void 0 ? void 0 : line.nextElementSibling;
84
+ if (next && next.tagName.toLowerCase() === 'p-stepper-line') {
85
+ next.remove();
86
+ }
87
+ if (!next) {
75
88
  line.remove();
76
89
  }
77
90
  }
91
+ setTimeout(() => (this._rendering = false), 100);
78
92
  }
79
93
  get _el() { return this; }
80
94
  static get watchers() { return {
@@ -1 +1 @@
1
- {"file":"p-stepper.js","mappings":";;;AAAA,MAAM,mBAAmB,GAAG,gfAAgf;;MCO/f,OAAO;;;;;sBAIU,CAAC;qBAM7B,YAAY;2BAK+C,KAAK;;;EASjE,kBAAkB;IACjB,IAAI,CAAC,cAAc,EAAE,CAAC;GACtB;EAED,MAAM;IACL,QACC,EAAC,IAAI,IAAC,KAAK,EAAC,WAAW,IACtB,eAAQ,CACF,EACN;GACF;EAGO,cAAc;IACrB,IAAI,UAAU,GAAG,IAAI,CAAC,UAAU,GAAG,CAAC,IAAI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AC,IAAI,CAAC,EAAE,CAAC,EAAE,EAAE;MAC3C,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;MAC3B,MAAM,YAAY,GAAG,IAAI,CAAC,sBAAsB,CAAC;MACjD,IAAI,YAAY,CAAC,OAAO,CAAC,WAAW,EAAE,KAAK,gBAAgB,EAAE;QAC5D,IAAI,CAAC,MAAM,EAAE,CAAC;OACd;KACD;GACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/molecules/stepper/stepper.component.scss?tag=p-stepper&encapsulation=shadow","src/components/molecules/stepper/stepper.component.tsx"],"sourcesContent":[":host {\n\t@apply flex;\n}\n\n:host([direction='horizontal']) {\n\t@apply h-auto items-end;\n}\n\n:host([direction='vertical']) {\n\t@apply flex-col flex-wrap items-start;\n\t@apply w-full min-h-full;\n}\n\n:host([direction='vertical'][content-position='start']) {\n\t@apply items-end;\n}\n","import { Component, Element, h, Host, Prop, Watch } from '@stencil/core';\n\n@Component({\n\ttag: 'p-stepper',\n\tstyleUrl: 'stepper.component.scss',\n\tshadow: true,\n})\nexport class Stepper {\n\t/**\n\t * The currently active step\n\t */\n\t@Prop() activeStep: number = 1;\n\n\t/**\n\t * The direction of the stepper\n\t */\n\t@Prop({ reflect: true }) direction: 'horizontal' | 'vertical' =\n\t\t'horizontal';\n\n\t/**\n\t * The position of the content in case of vertical direction\n\t */\n\t@Prop({ reflect: true }) contentPosition: 'start' | 'end' = 'end';\n\n\t/**\n\t * The host element\n\t */\n\t@Element() private _el: HTMLElement;\n\n\t// private _steps: Array<HTMLPStepperItemElement>;\n\n\tcomponentDidRender() {\n\t\tthis._generateSteps();\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class=\"p-stepper\">\n\t\t\t\t<slot />\n\t\t\t</Host>\n\t\t);\n\t}\n\n\t@Watch('activeStep')\n\tprivate _generateSteps() {\n\t\tlet activeStep = this.activeStep - 1 || 0;\n\t\tconst items = this._el.querySelectorAll('p-stepper-item');\n\n\t\tif (!this.activeStep || activeStep < 0) {\n\t\t\tfor (let i = 0; i < items?.length; i++) {\n\t\t\t\tconst item = items.item(i) as any;\n\n\t\t\t\tif (item.active) {\n\t\t\t\t\tactiveStep = i;\n\t\t\t\t}\n\n\t\t\t\tif (activeStep < 0 && item.finished) {\n\t\t\t\t\tactiveStep = i + 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor (let i = 0; i < items?.length; i++) {\n\t\t\tconst item = items.item(i) as any;\n\n\t\t\titem.active = i === activeStep;\n\t\t\titem.finished = i < activeStep;\n\t\t\titem.direction = this.direction;\n\t\t\titem.align =\n\t\t\t\ti === 0 ? 'start' : i === items?.length - 1 ? 'end' : 'center';\n\t\t\titem.contentPosition = this.contentPosition;\n\n\t\t\tif (i < items.length - 1) {\n\t\t\t\tconst nextItem = item.nextElementSibling;\n\t\t\t\tif (\n\t\t\t\t\tnextItem &&\n\t\t\t\t\tnextItem.tagName.toLowerCase() === 'p-stepper-item'\n\t\t\t\t) {\n\t\t\t\t\tconst heightDiff = (item.clientHeight - 16) / 2;\n\n\t\t\t\t\tconst stepperLine =\n\t\t\t\t\t\tdocument.createElement('p-stepper-line');\n\n\t\t\t\t\tstepperLine.direction = this.direction;\n\t\t\t\t\tstepperLine.active = i <= activeStep;\n\n\t\t\t\t\tif (heightDiff > 0 && this.direction === 'vertical') {\n\t\t\t\t\t\tstepperLine.style.marginTop = `-${heightDiff / 16}rem`;\n\t\t\t\t\t\tstepperLine.style.marginBottom = `-${\n\t\t\t\t\t\t\theightDiff / 16\n\t\t\t\t\t\t}rem`;\n\t\t\t\t\t\tstepperLine.style.minHeight = `calc(1rem + ${\n\t\t\t\t\t\t\t(heightDiff * 2) / 16\n\t\t\t\t\t\t}rem)`;\n\t\t\t\t\t}\n\n\t\t\t\t\tthis._el.insertBefore(stepperLine, nextItem);\n\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (i > 0) {\n\t\t\t\tconst previousItem = item.previousElementSibling;\n\t\t\t\tif (previousItem.tagName.toLowerCase() === 'p-stepper-line') {\n\t\t\t\t\tpreviousItem.direction = this.direction;\n\t\t\t\t\tpreviousItem.active = item.active || item.finished;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// remove duplicate lines\n\t\tconst lines = this._el.querySelectorAll('p-stepper-line');\n\t\tfor (let j = lines.length - 1; j >= 0; j--) {\n\t\t\tconst line = lines.item(j);\n\t\t\tconst previousItem = line.previousElementSibling;\n\t\t\tif (previousItem.tagName.toLowerCase() === 'p-stepper-line') {\n\t\t\t\tline.remove();\n\t\t\t}\n\t\t}\n\t}\n}\n"],"version":3}
1
+ {"file":"p-stepper.js","mappings":";;;AAAA,MAAM,mBAAmB,GAAG,gfAAgf;;MCO/f,OAAO;;;;;IAsBX,eAAU,GAAG,KAAK,CAAC;IACnB,YAAO,GAAG,KAAK,CAAC;sBAnBK,CAAC;qBAM7B,YAAY;2BAK+C,KAAK;;;EAYjE,gBAAgB;IACf,UAAU,CAAC;MACV,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;MAC1B,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;KACpB,EAAE,GAAG,CAAC,CAAC;GACR;EAED,MAAM;IACL,QACC,EAAC,IAAI,IAAC,KAAK,EAAC,WAAW,IACtB,YAAM,YAAY,EAAE,MAAM,IAAI,CAAC,cAAc,EAAE,GAAI,CAC7C,EACN;GACF;EAGO,cAAc,CAAC,SAAS,GAAG,KAAK;IACvC,IAAI,CAAC,SAAS,KAAK,CAAC,IAAI,CAAC,GAAG,IAAI,IAAI,CAAC,UAAU,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE;MAClE,OAAO;KACP;IAED,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC;IAEvB,IAAI,UAAU,GAAG,IAAI,CAAC,UAAU,GAAG,CAAC,IAAI,CAAC,CAAC;IAC1C,MAAM,K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C,MAAM,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,EAAE;MAC3C,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;MAC3B,MAAM,IAAI,GAAG,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,kBAAkB,CAAC;MACtC,IAAI,IAAI,IAAI,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE,KAAK,gBAAgB,EAAE;QAC5D,IAAI,CAAC,MAAM,EAAE,CAAC;OACd;MAED,IAAI,CAAC,IAAI,EAAE;QACV,IAAI,CAAC,MAAM,EAAE,CAAC;OACd;KACD;IAED,UAAU,CAAC,OAAO,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC,EAAE,GAAG,CAAC,CAAC;GACjD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/molecules/stepper/stepper.component.scss?tag=p-stepper&encapsulation=shadow","src/components/molecules/stepper/stepper.component.tsx"],"sourcesContent":[":host {\n\t@apply flex;\n}\n\n:host([direction='horizontal']) {\n\t@apply h-auto items-end;\n}\n\n:host([direction='vertical']) {\n\t@apply flex-col flex-wrap items-start;\n\t@apply w-full min-h-full;\n}\n\n:host([direction='vertical'][content-position='start']) {\n\t@apply items-end;\n}\n","import { Component, Element, h, Host, Prop, Watch } from '@stencil/core';\n\n@Component({\n\ttag: 'p-stepper',\n\tstyleUrl: 'stepper.component.scss',\n\tshadow: true,\n})\nexport class Stepper {\n\t/**\n\t * The currently active step\n\t */\n\t@Prop() activeStep: number = 1;\n\n\t/**\n\t * The direction of the stepper\n\t */\n\t@Prop({ reflect: true }) direction: 'horizontal' | 'vertical' =\n\t\t'horizontal';\n\n\t/**\n\t * The position of the content in case of vertical direction\n\t */\n\t@Prop({ reflect: true }) contentPosition: 'start' | 'end' = 'end';\n\n\t/**\n\t * The host element\n\t */\n\t@Element() private _el: HTMLElement;\n\n\tprivate _rendering = false;\n\tprivate _loaded = false;\n\n\t// private _steps: Array<HTMLPStepperItemElement>;\n\n\tcomponentDidLoad() {\n\t\tsetTimeout(() => {\n\t\t\tthis._generateSteps(true);\n\t\t\tthis._loaded = true;\n\t\t}, 500);\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class=\"p-stepper\">\n\t\t\t\t<slot onSlotchange={() => this._generateSteps()} />\n\t\t\t</Host>\n\t\t);\n\t}\n\n\t@Watch('activeStep')\n\tprivate _generateSteps(firstLoad = false) {\n\t\tif (!firstLoad && (!this._el || this._rendering || !this._loaded)) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._rendering = true;\n\n\t\tlet activeStep = this.activeStep - 1 || 0;\n\t\tconst items = this._el.querySelectorAll('p-stepper-item');\n\n\t\tif (!this.activeStep || activeStep < 0) {\n\t\t\tfor (let i = 0; i < items?.length; i++) {\n\t\t\t\tconst item = items.item(i) as any;\n\n\t\t\t\tif (item.active) {\n\t\t\t\t\tactiveStep = i;\n\t\t\t\t}\n\n\t\t\t\tif (activeStep < 0 && item.finished) {\n\t\t\t\t\tactiveStep = i + 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor (let i = 0; i < items?.length; i++) {\n\t\t\tconst item = items.item(i) as any;\n\n\t\t\titem.active = i === activeStep;\n\t\t\titem.finished = i < activeStep;\n\t\t\titem.direction = this.direction;\n\t\t\titem.align =\n\t\t\t\ti === 0 ? 'start' : i === items?.length - 1 ? 'end' : 'center';\n\t\t\titem.contentPosition = this.contentPosition;\n\n\t\t\tif (i < items.length - 1) {\n\t\t\t\tconst nextItem = item.nextElementSibling;\n\t\t\t\tif (\n\t\t\t\t\tnextItem &&\n\t\t\t\t\tnextItem.tagName.toLowerCase() === 'p-stepper-item'\n\t\t\t\t) {\n\t\t\t\t\tconst heightDiff =\n\t\t\t\t\t\t(item.clientHeight > 16\n\t\t\t\t\t\t\t? item.clientHeight - 16\n\t\t\t\t\t\t\t: item.clientHeight) / 2;\n\n\t\t\t\t\tconst stepperLine =\n\t\t\t\t\t\tdocument.createElement('p-stepper-line');\n\n\t\t\t\t\tstepperLine.direction = this.direction;\n\t\t\t\t\tstepperLine.active = i <= activeStep;\n\n\t\t\t\t\tif (heightDiff > 0 && this.direction === 'vertical') {\n\t\t\t\t\t\tstepperLine.style.marginTop = `-${heightDiff / 16}rem`;\n\t\t\t\t\t\tstepperLine.style.marginBottom = `-${\n\t\t\t\t\t\t\theightDiff / 16\n\t\t\t\t\t\t}rem`;\n\t\t\t\t\t\tstepperLine.style.minHeight = `calc(1rem + ${\n\t\t\t\t\t\t\t(heightDiff * 2) / 16\n\t\t\t\t\t\t}rem)`;\n\t\t\t\t\t}\n\n\t\t\t\t\tthis._el.insertBefore(stepperLine, nextItem);\n\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (i > 0) {\n\t\t\t\tconst previousItem = item.previousElementSibling;\n\t\t\t\tif (previousItem.tagName.toLowerCase() === 'p-stepper-line') {\n\t\t\t\t\tpreviousItem.direction = this.direction;\n\t\t\t\t\tpreviousItem.active = item.active || item.finished;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tconst lines = this._el.querySelectorAll('p-stepper-line');\n\t\tfor (let j = lines.length - 1; j >= 0; j--) {\n\t\t\tconst line = lines.item(j);\n\t\t\tconst next = line?.nextElementSibling;\n\t\t\tif (next && next.tagName.toLowerCase() === 'p-stepper-line') {\n\t\t\t\tnext.remove();\n\t\t\t}\n\n\t\t\tif (!next) {\n\t\t\t\tline.remove();\n\t\t\t}\n\t\t}\n\n\t\tsetTimeout(() => (this._rendering = false), 100);\n\t}\n}\n"],"version":3}
@@ -5,18 +5,27 @@ const stepperComponentCss = ".flex{display:flex!important}.h-auto{height:auto!im
5
5
  const Stepper = class {
6
6
  constructor(hostRef) {
7
7
  registerInstance(this, hostRef);
8
+ this._rendering = false;
9
+ this._loaded = false;
8
10
  this.activeStep = 1;
9
11
  this.direction = 'horizontal';
10
12
  this.contentPosition = 'end';
11
13
  }
12
14
  // private _steps: Array<HTMLPStepperItemElement>;
13
- componentDidRender() {
14
- this._generateSteps();
15
+ componentDidLoad() {
16
+ setTimeout(() => {
17
+ this._generateSteps(true);
18
+ this._loaded = true;
19
+ }, 500);
15
20
  }
16
21
  render() {
17
- return (h(Host, { class: "p-stepper" }, h("slot", null)));
22
+ return (h(Host, { class: "p-stepper" }, h("slot", { onSlotchange: () => this._generateSteps() })));
18
23
  }
19
- _generateSteps() {
24
+ _generateSteps(firstLoad = false) {
25
+ if (!firstLoad && (!this._el || this._rendering || !this._loaded)) {
26
+ return;
27
+ }
28
+ this._rendering = true;
20
29
  let activeStep = this.activeStep - 1 || 0;
21
30
  const items = this._el.querySelectorAll('p-stepper-item');
22
31
  if (!this.activeStep || activeStep < 0) {
@@ -42,7 +51,9 @@ const Stepper = class {
42
51
  const nextItem = item.nextElementSibling;
43
52
  if (nextItem &&
44
53
  nextItem.tagName.toLowerCase() === 'p-stepper-item') {
45
- const heightDiff = (item.clientHeight - 16) / 2;
54
+ const heightDiff = (item.clientHeight > 16
55
+ ? item.clientHeight - 16
56
+ : item.clientHeight) / 2;
46
57
  const stepperLine = document.createElement('p-stepper-line');
47
58
  stepperLine.direction = this.direction;
48
59
  stepperLine.active = i <= activeStep;
@@ -63,15 +74,18 @@ const Stepper = class {
63
74
  }
64
75
  }
65
76
  }
66
- // remove duplicate lines
67
77
  const lines = this._el.querySelectorAll('p-stepper-line');
68
78
  for (let j = lines.length - 1; j >= 0; j--) {
69
79
  const line = lines.item(j);
70
- const previousItem = line.previousElementSibling;
71
- if (previousItem.tagName.toLowerCase() === 'p-stepper-line') {
80
+ const next = line === null || line === void 0 ? void 0 : line.nextElementSibling;
81
+ if (next && next.tagName.toLowerCase() === 'p-stepper-line') {
82
+ next.remove();
83
+ }
84
+ if (!next) {
72
85
  line.remove();
73
86
  }
74
87
  }
88
+ setTimeout(() => (this._rendering = false), 100);
75
89
  }
76
90
  get _el() { return getElement(this); }
77
91
  static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I,YAAY,CAAC,OAAO,CAAC,WAAW,EAAE,KAAK,gBAAgB,EAAE;UAC5D,YAAY,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC;UACxC,YAAY,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,QAAQ,CAAC;SACnD;OACD;KACD;;IAGD,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,CAAC;IAC1D,KAAK,IAAI,CAAC,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,EAAE;MAC3C,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;MAC3B,MAAM,YAAY,GAAG,IAAI,CAAC,sBAAsB,CAAC;MACjD,IAAI,YAAY,CAAC,OAAO,CAAC,WAAW,EAAE,KAAK,gBAAgB,EAAE;QAC5D,IAAI,CAAC,MAAM,EAAE,CAAC;OACd;KACD;GACD;;;;;;;;;;","names":[],"sources":["src/components/molecules/stepper/stepper.component.scss?tag=p-stepper&encapsulation=shadow","src/components/molecules/stepper/stepper.component.tsx"],"sourcesContent":[":host {\n\t@apply flex;\n}\n\n:host([direction='horizontal']) {\n\t@apply h-auto items-end;\n}\n\n:host([direction='vertical']) {\n\t@apply flex-col flex-wrap items-start;\n\t@apply w-full min-h-full;\n}\n\n:host([direction='vertical'][content-position='start']) {\n\t@apply items-end;\n}\n","import { Component, Element, h, Host, Prop, Watch } from '@stencil/core';\n\n@Component({\n\ttag: 'p-stepper',\n\tstyleUrl: 'stepper.component.scss',\n\tshadow: true,\n})\nexport class Stepper {\n\t/**\n\t * The currently active step\n\t */\n\t@Prop() activeStep: number = 1;\n\n\t/**\n\t * The direction of the stepper\n\t */\n\t@Prop({ reflect: true }) direction: 'horizontal' | 'vertical' =\n\t\t'horizontal';\n\n\t/**\n\t * The position of the content in case of vertical direction\n\t */\n\t@Prop({ reflect: true }) contentPosition: 'start' | 'end' = 'end';\n\n\t/**\n\t * The host element\n\t */\n\t@Element() private _el: HTMLElement;\n\n\t// private _steps: Array<HTMLPStepperItemElement>;\n\n\tcomponentDidRender() {\n\t\tthis._generateSteps();\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class=\"p-stepper\">\n\t\t\t\t<slot />\n\t\t\t</Host>\n\t\t);\n\t}\n\n\t@Watch('activeStep')\n\tprivate _generateSteps() {\n\t\tlet activeStep = this.activeStep - 1 || 0;\n\t\tconst items = this._el.querySelectorAll('p-stepper-item');\n\n\t\tif (!this.activeStep || activeStep < 0) {\n\t\t\tfor (let i = 0; i < items?.length; i++) {\n\t\t\t\tconst item = items.item(i) as any;\n\n\t\t\t\tif (item.active) {\n\t\t\t\t\tactiveStep = i;\n\t\t\t\t}\n\n\t\t\t\tif (activeStep < 0 && item.finished) {\n\t\t\t\t\tactiveStep = i + 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor (let i = 0; i < items?.length; i++) {\n\t\t\tconst item = items.item(i) as any;\n\n\t\t\titem.active = i === activeStep;\n\t\t\titem.finished = i < activeStep;\n\t\t\titem.direction = this.direction;\n\t\t\titem.align =\n\t\t\t\ti === 0 ? 'start' : i === items?.length - 1 ? 'end' : 'center';\n\t\t\titem.contentPosition = this.contentPosition;\n\n\t\t\tif (i < items.length - 1) {\n\t\t\t\tconst nextItem = item.nextElementSibling;\n\t\t\t\tif (\n\t\t\t\t\tnextItem &&\n\t\t\t\t\tnextItem.tagName.toLowerCase() === 'p-stepper-item'\n\t\t\t\t) {\n\t\t\t\t\tconst heightDiff = (item.clientHeight - 16) / 2;\n\n\t\t\t\t\tconst stepperLine =\n\t\t\t\t\t\tdocument.createElement('p-stepper-line');\n\n\t\t\t\t\tstepperLine.direction = this.direction;\n\t\t\t\t\tstepperLine.active = i <= activeStep;\n\n\t\t\t\t\tif (heightDiff > 0 && this.direction === 'vertical') {\n\t\t\t\t\t\tstepperLine.style.marginTop = `-${heightDiff / 16}rem`;\n\t\t\t\t\t\tstepperLine.style.marginBottom = `-${\n\t\t\t\t\t\t\theightDiff / 16\n\t\t\t\t\t\t}rem`;\n\t\t\t\t\t\tstepperLine.style.minHeight = `calc(1rem + ${\n\t\t\t\t\t\t\t(heightDiff * 2) / 16\n\t\t\t\t\t\t}rem)`;\n\t\t\t\t\t}\n\n\t\t\t\t\tthis._el.insertBefore(stepperLine, nextItem);\n\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (i > 0) {\n\t\t\t\tconst previousItem = item.previousElementSibling;\n\t\t\t\tif (previousItem.tagName.toLowerCase() === 'p-stepper-line') {\n\t\t\t\t\tpreviousItem.direction = this.direction;\n\t\t\t\t\tpreviousItem.active = item.active || item.finished;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// remove duplicate lines\n\t\tconst lines = this._el.querySelectorAll('p-stepper-line');\n\t\tfor (let j = lines.length - 1; j >= 0; j--) {\n\t\t\tconst line = lines.item(j);\n\t\t\tconst previousItem = line.previousElementSibling;\n\t\t\tif (previousItem.tagName.toLowerCase() === 'p-stepper-line') {\n\t\t\t\tline.remove();\n\t\t\t}\n\t\t}\n\t}\n}\n"],"version":3}
1
+ {"file":"p-stepper.entry.js","mappings":";;AAAA,MAAM,mBAAmB,GAAG,gfAAgf;;MCO/f,OAAO;;;IAsBX,eAAU,GAAG,KAAK,CAAC;IACnB,YAAO,GAAG,KAAK,CAAC;sBAnBK,CAAC;qBAM7B,YAAY;2BAK+C,KAAK;;;EAYjE,gBAAgB;IACf,UAAU,CAAC;MACV,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;MAC1B,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;KACpB,EAAE,GAAG,CAAC,CAAC;GACR;EAED,MAAM;IACL,QACC,EAAC,IAAI,IAAC,KAAK,EAAC,WAAW,IACtB,YAAM,YAAY,EAAE,MAAM,IAAI,CAAC,cAAc,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,YAAY,CAAC,OAAO,CAAC,WAAW,EAAE,KAAK,gBAAgB,EAAE;UAC5D,YAAY,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC;UACxC,YAAY,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,QAAQ,CAAC;SACnD;OACD;KACD;IAED,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,CAAC;IAC1D,KAAK,IAAI,CAAC,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,EAAE;MAC3C,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;MAC3B,MAAM,IAAI,GAAG,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,kBAAkB,CAAC;MACtC,IAAI,IAAI,IAAI,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE,KAAK,gBAAgB,EAAE;QAC5D,IAAI,CAAC,MAAM,EAAE,CAAC;OACd;MAED,IAAI,CAAC,IAAI,EAAE;QACV,IAAI,CAAC,MAAM,EAAE,CAAC;OACd;KACD;IAED,UAAU,CAAC,OAAO,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC,EAAE,GAAG,CAAC,CAAC;GACjD;;;;;;;;;;","names":[],"sources":["src/components/molecules/stepper/stepper.component.scss?tag=p-stepper&encapsulation=shadow","src/components/molecules/stepper/stepper.component.tsx"],"sourcesContent":[":host {\n\t@apply flex;\n}\n\n:host([direction='horizontal']) {\n\t@apply h-auto items-end;\n}\n\n:host([direction='vertical']) {\n\t@apply flex-col flex-wrap items-start;\n\t@apply w-full min-h-full;\n}\n\n:host([direction='vertical'][content-position='start']) {\n\t@apply items-end;\n}\n","import { Component, Element, h, Host, Prop, Watch } from '@stencil/core';\n\n@Component({\n\ttag: 'p-stepper',\n\tstyleUrl: 'stepper.component.scss',\n\tshadow: true,\n})\nexport class Stepper {\n\t/**\n\t * The currently active step\n\t */\n\t@Prop() activeStep: number = 1;\n\n\t/**\n\t * The direction of the stepper\n\t */\n\t@Prop({ reflect: true }) direction: 'horizontal' | 'vertical' =\n\t\t'horizontal';\n\n\t/**\n\t * The position of the content in case of vertical direction\n\t */\n\t@Prop({ reflect: true }) contentPosition: 'start' | 'end' = 'end';\n\n\t/**\n\t * The host element\n\t */\n\t@Element() private _el: HTMLElement;\n\n\tprivate _rendering = false;\n\tprivate _loaded = false;\n\n\t// private _steps: Array<HTMLPStepperItemElement>;\n\n\tcomponentDidLoad() {\n\t\tsetTimeout(() => {\n\t\t\tthis._generateSteps(true);\n\t\t\tthis._loaded = true;\n\t\t}, 500);\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class=\"p-stepper\">\n\t\t\t\t<slot onSlotchange={() => this._generateSteps()} />\n\t\t\t</Host>\n\t\t);\n\t}\n\n\t@Watch('activeStep')\n\tprivate _generateSteps(firstLoad = false) {\n\t\tif (!firstLoad && (!this._el || this._rendering || !this._loaded)) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._rendering = true;\n\n\t\tlet activeStep = this.activeStep - 1 || 0;\n\t\tconst items = this._el.querySelectorAll('p-stepper-item');\n\n\t\tif (!this.activeStep || activeStep < 0) {\n\t\t\tfor (let i = 0; i < items?.length; i++) {\n\t\t\t\tconst item = items.item(i) as any;\n\n\t\t\t\tif (item.active) {\n\t\t\t\t\tactiveStep = i;\n\t\t\t\t}\n\n\t\t\t\tif (activeStep < 0 && item.finished) {\n\t\t\t\t\tactiveStep = i + 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor (let i = 0; i < items?.length; i++) {\n\t\t\tconst item = items.item(i) as any;\n\n\t\t\titem.active = i === activeStep;\n\t\t\titem.finished = i < activeStep;\n\t\t\titem.direction = this.direction;\n\t\t\titem.align =\n\t\t\t\ti === 0 ? 'start' : i === items?.length - 1 ? 'end' : 'center';\n\t\t\titem.contentPosition = this.contentPosition;\n\n\t\t\tif (i < items.length - 1) {\n\t\t\t\tconst nextItem = item.nextElementSibling;\n\t\t\t\tif (\n\t\t\t\t\tnextItem &&\n\t\t\t\t\tnextItem.tagName.toLowerCase() === 'p-stepper-item'\n\t\t\t\t) {\n\t\t\t\t\tconst heightDiff =\n\t\t\t\t\t\t(item.clientHeight > 16\n\t\t\t\t\t\t\t? item.clientHeight - 16\n\t\t\t\t\t\t\t: item.clientHeight) / 2;\n\n\t\t\t\t\tconst stepperLine =\n\t\t\t\t\t\tdocument.createElement('p-stepper-line');\n\n\t\t\t\t\tstepperLine.direction = this.direction;\n\t\t\t\t\tstepperLine.active = i <= activeStep;\n\n\t\t\t\t\tif (heightDiff > 0 && this.direction === 'vertical') {\n\t\t\t\t\t\tstepperLine.style.marginTop = `-${heightDiff / 16}rem`;\n\t\t\t\t\t\tstepperLine.style.marginBottom = `-${\n\t\t\t\t\t\t\theightDiff / 16\n\t\t\t\t\t\t}rem`;\n\t\t\t\t\t\tstepperLine.style.minHeight = `calc(1rem + ${\n\t\t\t\t\t\t\t(heightDiff * 2) / 16\n\t\t\t\t\t\t}rem)`;\n\t\t\t\t\t}\n\n\t\t\t\t\tthis._el.insertBefore(stepperLine, nextItem);\n\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (i > 0) {\n\t\t\t\tconst previousItem = item.previousElementSibling;\n\t\t\t\tif (previousItem.tagName.toLowerCase() === 'p-stepper-line') {\n\t\t\t\t\tpreviousItem.direction = this.direction;\n\t\t\t\t\tpreviousItem.active = item.active || item.finished;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tconst lines = this._el.querySelectorAll('p-stepper-line');\n\t\tfor (let j = lines.length - 1; j >= 0; j--) {\n\t\t\tconst line = lines.item(j);\n\t\t\tconst next = line?.nextElementSibling;\n\t\t\tif (next && next.tagName.toLowerCase() === 'p-stepper-line') {\n\t\t\t\tnext.remove();\n\t\t\t}\n\n\t\t\tif (!next) {\n\t\t\t\tline.remove();\n\t\t\t}\n\t\t}\n\n\t\tsetTimeout(() => (this._rendering = false), 100);\n\t}\n}\n"],"version":3}
package/dist/index.html CHANGED
@@ -1,4 +1,4 @@
1
- <!doctype html><html dir="ltr" lang="en"><head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=5.0"> <title>Stencil Component Starter</title> <script type="module" src="/build/paperless.esm.js" data-stencil data-resources-url="/build/" data-stencil-namespace="paperless"></script> <script nomodule="" src="/build/paperless.js" data-stencil></script> </head> <body> <p-button>Buttono</p-button> <script data-build="2024-07-15T14:56:30">
1
+ <!doctype html><html dir="ltr" lang="en"><head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=5.0"> <title>Stencil Component Starter</title> <script type="module" src="/build/paperless.esm.js" data-stencil data-resources-url="/build/" data-stencil-namespace="paperless"></script> <script nomodule="" src="/build/paperless.js" data-stencil></script> </head> <body> <p-button>Buttono</p-button> <script data-build="2024-07-16T11:49:08">
2
2
  if ('serviceWorker' in navigator && location.protocol !== 'file:') {
3
3
  window.addEventListener('load', function() {
4
4
  navigator.serviceWorker.register('/sw.js')
@@ -0,0 +1,2 @@
1
+ import{r as t,h as e,H as i,g as s}from"./p-e4d5e7a7.js";const o=".flex{display:flex!important}.h-auto{height:auto!important}.w-full{width:100%!important}.flex-col{flex-direction:column!important}.flex-wrap{flex-wrap:wrap!important}*{box-sizing:border-box}:host{display:flex}:host([direction=horizontal]){align-items:flex-end;height:auto}:host([direction=vertical]){align-items:flex-start;flex-direction:column;flex-wrap:wrap;min-height:100%;width:100%}:host([direction=vertical][content-position=start]){align-items:flex-end}.static{position:static!important}";const n=class{constructor(e){t(this,e);this._rendering=false;this._loaded=false;this.activeStep=1;this.direction="horizontal";this.contentPosition="end"}componentDidLoad(){setTimeout((()=>{this._generateSteps(true);this._loaded=true}),500)}render(){return e(i,{class:"p-stepper"},e("slot",{onSlotchange:()=>this._generateSteps()}))}_generateSteps(t=false){if(!t&&(!this._el||this._rendering||!this._loaded)){return}this._rendering=true;let e=this.activeStep-1||0;const i=this._el.querySelectorAll("p-stepper-item");if(!this.activeStep||e<0){for(let t=0;t<(i===null||i===void 0?void 0:i.length);t++){const s=i.item(t);if(s.active){e=t}if(e<0&&s.finished){e=t+1}}}for(let t=0;t<(i===null||i===void 0?void 0:i.length);t++){const s=i.item(t);s.active=t===e;s.finished=t<e;s.direction=this.direction;s.align=t===0?"start":t===(i===null||i===void 0?void 0:i.length)-1?"end":"center";s.contentPosition=this.contentPosition;if(t<i.length-1){const i=s.nextElementSibling;if(i&&i.tagName.toLowerCase()==="p-stepper-item"){const o=(s.clientHeight>16?s.clientHeight-16:s.clientHeight)/2;const n=document.createElement("p-stepper-line");n.direction=this.direction;n.active=t<=e;if(o>0&&this.direction==="vertical"){n.style.marginTop=`-${o/16}rem`;n.style.marginBottom=`-${o/16}rem`;n.style.minHeight=`calc(1rem + ${o*2/16}rem)`}this._el.insertBefore(n,i);continue}}if(t>0){const t=s.previousElementSibling;if(t.tagName.toLowerCase()==="p-stepper-line"){t.direction=this.direction;t.active=s.active||s.finished}}}const s=this._el.querySelectorAll("p-stepper-line");for(let t=s.length-1;t>=0;t--){const e=s.item(t);const i=e===null||e===void 0?void 0:e.nextElementSibling;if(i&&i.tagName.toLowerCase()==="p-stepper-line"){i.remove()}if(!i){e.remove()}}setTimeout((()=>this._rendering=false),100)}get _el(){return s(this)}static get watchers(){return{activeStep:["_generateSteps"]}}};n.style=o;export{n as p_stepper};
2
+ //# sourceMappingURL=p-e74e8edd.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["stepperComponentCss","Stepper","this","_rendering","_loaded","componentDidLoad","setTimeout","_generateSteps","render","h","Host","class","onSlotchange","firstLoad","_el","activeStep","items","querySelectorAll","i","length","item","active","finished","direction","align","contentPosition","nextItem","nextElementSibling","tagName","toLowerCase","heightDiff","clientHeight","stepperLine","document","createElement","style","marginTop","marginBottom","minHeight","insertBefore","previousItem","previousElementSibling","lines","j","line","next","remove"],"sources":["src/components/molecules/stepper/stepper.component.scss?tag=p-stepper&encapsulation=shadow","src/components/molecules/stepper/stepper.component.tsx"],"sourcesContent":[":host {\n\t@apply flex;\n}\n\n:host([direction='horizontal']) {\n\t@apply h-auto items-end;\n}\n\n:host([direction='vertical']) {\n\t@apply flex-col flex-wrap items-start;\n\t@apply w-full min-h-full;\n}\n\n:host([direction='vertical'][content-position='start']) {\n\t@apply items-end;\n}\n","import { Component, Element, h, Host, Prop, Watch } from '@stencil/core';\n\n@Component({\n\ttag: 'p-stepper',\n\tstyleUrl: 'stepper.component.scss',\n\tshadow: true,\n})\nexport class Stepper {\n\t/**\n\t * The currently active step\n\t */\n\t@Prop() activeStep: number = 1;\n\n\t/**\n\t * The direction of the stepper\n\t */\n\t@Prop({ reflect: true }) direction: 'horizontal' | 'vertical' =\n\t\t'horizontal';\n\n\t/**\n\t * The position of the content in case of vertical direction\n\t */\n\t@Prop({ reflect: true }) contentPosition: 'start' | 'end' = 'end';\n\n\t/**\n\t * The host element\n\t */\n\t@Element() private _el: HTMLElement;\n\n\tprivate _rendering = false;\n\tprivate _loaded = false;\n\n\t// private _steps: Array<HTMLPStepperItemElement>;\n\n\tcomponentDidLoad() {\n\t\tsetTimeout(() => {\n\t\t\tthis._generateSteps(true);\n\t\t\tthis._loaded = true;\n\t\t}, 500);\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class=\"p-stepper\">\n\t\t\t\t<slot onSlotchange={() => this._generateSteps()} />\n\t\t\t</Host>\n\t\t);\n\t}\n\n\t@Watch('activeStep')\n\tprivate _generateSteps(firstLoad = false) {\n\t\tif (!firstLoad && (!this._el || this._rendering || !this._loaded)) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._rendering = true;\n\n\t\tlet activeStep = this.activeStep - 1 || 0;\n\t\tconst items = this._el.querySelectorAll('p-stepper-item');\n\n\t\tif (!this.activeStep || activeStep < 0) {\n\t\t\tfor (let i = 0; i < items?.length; i++) {\n\t\t\t\tconst item = items.item(i) as any;\n\n\t\t\t\tif (item.active) {\n\t\t\t\t\tactiveStep = i;\n\t\t\t\t}\n\n\t\t\t\tif (activeStep < 0 && item.finished) {\n\t\t\t\t\tactiveStep = i + 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor (let i = 0; i < items?.length; i++) {\n\t\t\tconst item = items.item(i) as any;\n\n\t\t\titem.active = i === activeStep;\n\t\t\titem.finished = i < activeStep;\n\t\t\titem.direction = this.direction;\n\t\t\titem.align =\n\t\t\t\ti === 0 ? 'start' : i === items?.length - 1 ? 'end' : 'center';\n\t\t\titem.contentPosition = this.contentPosition;\n\n\t\t\tif (i < items.length - 1) {\n\t\t\t\tconst nextItem = item.nextElementSibling;\n\t\t\t\tif (\n\t\t\t\t\tnextItem &&\n\t\t\t\t\tnextItem.tagName.toLowerCase() === 'p-stepper-item'\n\t\t\t\t) {\n\t\t\t\t\tconst heightDiff =\n\t\t\t\t\t\t(item.clientHeight > 16\n\t\t\t\t\t\t\t? item.clientHeight - 16\n\t\t\t\t\t\t\t: item.clientHeight) / 2;\n\n\t\t\t\t\tconst stepperLine =\n\t\t\t\t\t\tdocument.createElement('p-stepper-line');\n\n\t\t\t\t\tstepperLine.direction = this.direction;\n\t\t\t\t\tstepperLine.active = i <= activeStep;\n\n\t\t\t\t\tif (heightDiff > 0 && this.direction === 'vertical') {\n\t\t\t\t\t\tstepperLine.style.marginTop = `-${heightDiff / 16}rem`;\n\t\t\t\t\t\tstepperLine.style.marginBottom = `-${\n\t\t\t\t\t\t\theightDiff / 16\n\t\t\t\t\t\t}rem`;\n\t\t\t\t\t\tstepperLine.style.minHeight = `calc(1rem + ${\n\t\t\t\t\t\t\t(heightDiff * 2) / 16\n\t\t\t\t\t\t}rem)`;\n\t\t\t\t\t}\n\n\t\t\t\t\tthis._el.insertBefore(stepperLine, nextItem);\n\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (i > 0) {\n\t\t\t\tconst previousItem = item.previousElementSibling;\n\t\t\t\tif (previousItem.tagName.toLowerCase() === 'p-stepper-line') {\n\t\t\t\t\tpreviousItem.direction = this.direction;\n\t\t\t\t\tpreviousItem.active = item.active || item.finished;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tconst lines = this._el.querySelectorAll('p-stepper-line');\n\t\tfor (let j = lines.length - 1; j >= 0; j--) {\n\t\t\tconst line = lines.item(j);\n\t\t\tconst next = line?.nextElementSibling;\n\t\t\tif (next && next.tagName.toLowerCase() === 'p-stepper-line') {\n\t\t\t\tnext.remove();\n\t\t\t}\n\n\t\t\tif (!next) {\n\t\t\t\tline.remove();\n\t\t\t}\n\t\t}\n\n\t\tsetTimeout(() => (this._rendering = false), 100);\n\t}\n}\n"],"mappings":"yDAAA,MAAMA,EAAsB,if,MCOfC,EAAO,M,yBAsBXC,KAAAC,WAAa,MACbD,KAAAE,QAAU,M,gBAnBW,E,eAM5B,a,qBAK2D,K,CAY5D,gBAAAC,GACCC,YAAW,KACVJ,KAAKK,eAAe,MACpBL,KAAKE,QAAU,IAAI,GACjB,I,CAGJ,MAAAI,GACC,OACCC,EAACC,EAAI,CAACC,MAAM,aACXF,EAAA,QAAMG,aAAc,IAAMV,KAAKK,mB,CAM1B,cAAAA,CAAeM,EAAY,OAClC,IAAKA,KAAeX,KAAKY,KAAOZ,KAAKC,aAAeD,KAAKE,SAAU,CAClE,M,CAGDF,KAAKC,WAAa,KAElB,IAAIY,EAAab,KAAKa,WAAa,GAAK,EACxC,MAAMC,EAAQd,KAAKY,IAAIG,iBAAiB,kBAExC,IAAKf,KAAKa,YAAcA,EAAa,EAAG,CACvC,IAAK,IAAIG,EAAI,EAAGA,GAAIF,IAAK,MAALA,SAAK,SAALA,EAAOG,QAAQD,IAAK,CACvC,MAAME,EAAOJ,EAAMI,KAAKF,GAExB,GAAIE,EAAKC,OAAQ,CAChBN,EAAa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