@paperless/core 1.38.6 → 1.38.7

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/hydrate/index.js CHANGED
@@ -21385,15 +21385,13 @@ class Stepper {
21385
21385
  }
21386
21386
  // private _steps: Array<HTMLPStepperItemElement>;
21387
21387
  componentDidLoad() {
21388
- setTimeout(() => {
21389
- this._generateSteps(true);
21390
- this._loaded = true;
21391
- }, 500);
21388
+ this._loaded = true;
21389
+ this._generateSteps(true);
21392
21390
  }
21393
21391
  render() {
21394
21392
  return (hAsync(Host, { class: "p-stepper" }, hAsync("slot", { onSlotchange: () => this._generateSteps() })));
21395
21393
  }
21396
- _generateSteps(firstLoad = false) {
21394
+ async _generateSteps(firstLoad = false) {
21397
21395
  if (!firstLoad && (!this._el || this._rendering || !this._loaded)) {
21398
21396
  return;
21399
21397
  }
@@ -21412,9 +21410,13 @@ class Stepper {
21412
21410
  }
21413
21411
  }
21414
21412
  for (let i = 0; i < (items === null || items === void 0 ? void 0 : items.length); i++) {
21413
+ let directionChanged = false;
21415
21414
  const item = items.item(i);
21416
21415
  item.active = i === activeStep;
21417
21416
  item.finished = i < activeStep;
21417
+ if (item.direction !== this.direction) {
21418
+ directionChanged = true;
21419
+ }
21418
21420
  item.direction = this.direction;
21419
21421
  item.align =
21420
21422
  i === 0 ? 'start' : i === (items === null || items === void 0 ? void 0 : items.length) - 1 ? 'end' : 'center';
@@ -21423,6 +21425,11 @@ class Stepper {
21423
21425
  const nextItem = item.nextElementSibling;
21424
21426
  if (nextItem &&
21425
21427
  nextItem.tagName.toLowerCase() === 'p-stepper-item') {
21428
+ // super hacky, but we want to wait for the css of the `item.direction` change to be applied before querying for the item.clientHeight
21429
+ // otherwise we always get the initial "16"
21430
+ if (directionChanged) {
21431
+ await new Promise((resolve) => setTimeout(resolve, 10));
21432
+ }
21426
21433
  const heightDiff = (item.clientHeight > 16
21427
21434
  ? item.clientHeight - 16
21428
21435
  : item.clientHeight) / 2;
@@ -21435,6 +21442,11 @@ class Stepper {
21435
21442
  stepperLine.style.minHeight = `calc(1rem + ${(heightDiff * 2) / 16}rem)`;
21436
21443
  }
21437
21444
  this._el.insertBefore(stepperLine, nextItem);
21445
+ const previous = stepperLine.previousElementSibling;
21446
+ if (previous &&
21447
+ previous.tagName.toLowerCase() === 'p-stepper-line') {
21448
+ previous.remove();
21449
+ }
21438
21450
  continue;
21439
21451
  }
21440
21452
  }
@@ -21446,16 +21458,10 @@ class Stepper {
21446
21458
  }
21447
21459
  }
21448
21460
  }
21449
- const lines = this._el.querySelectorAll('p-stepper-line');
21461
+ const lines = this._el.querySelectorAll('p-stepper-line + p-stepper-line, p-stepper-line:not(:has(+ p-stepper-item))');
21450
21462
  for (let j = lines.length - 1; j >= 0; j--) {
21451
21463
  const line = lines.item(j);
21452
- const next = line === null || line === void 0 ? void 0 : line.nextElementSibling;
21453
- if (next && next.tagName.toLowerCase() === 'p-stepper-line') {
21454
- next.remove();
21455
- }
21456
- if (!next) {
21457
- line.remove();
21458
- }
21464
+ line.remove();
21459
21465
  }
21460
21466
  setTimeout(() => (this._rendering = false), 100);
21461
21467
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paperless/core",
3
- "version": "1.38.6",
3
+ "version": "1.38.7",
4
4
  "description": "Stencil Component Starter",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.js",
@@ -1,2 +0,0 @@
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
@@ -1 +0,0 @@
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,GAA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AK7C,MAAMoB,EAAQxC,KAAKY,IAAIG,iBAAiB,kBACxC,IAAK,IAAI0B,EAAID,EAAMvB,OAAS,EAAGwB,GAAK,EAAGA,IAAK,CAC3C,MAAMC,EAAOF,EAAMtB,KAAKuB,GACxB,MAAME,EAAOD,IAAI,MAAJA,SAAI,SAAJA,EAAMjB,mBACnB,GAAIkB,GAAQA,EAAKjB,QAAQC,gBAAkB,iBAAkB,CAC5DgB,EAAKC,Q,CAGN,IAAKD,EAAM,CACVD,EAAKE,Q,EAIPxC,YAAW,IAAOJ,KAAKC,WAAa,OAAQ,I"}
@@ -1,2 +0,0 @@
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
@@ -1 +0,0 @@
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')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