@paperless/core 2.0.1-beta.27 → 2.0.1-beta.29
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 +174 -0
- package/dist/build/{p-3e3983ec.js → p-66e5fc31.js} +1 -1
- package/dist/build/p-84863ba0.entry.js +2 -0
- package/dist/build/p-84863ba0.entry.js.map +1 -0
- package/dist/build/p-98e3f82a.entry.js +2 -0
- package/dist/build/p-98e3f82a.entry.js.map +1 -0
- package/dist/build/p-b51dcf11.js +2 -0
- package/dist/build/p-b51dcf11.js.map +1 -0
- package/dist/build/p-ed06230b.entry.js +2 -0
- package/dist/build/p-ed06230b.entry.js.map +1 -0
- package/dist/build/paperless.esm.js +1 -1
- package/dist/build/paperless.esm.js.map +1 -1
- package/dist/cjs/{index-08db8a87.js → index-64168fc4.js} +28 -1
- package/dist/cjs/index-64168fc4.js.map +1 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/p-calendar.cjs.entry.js +6 -36
- package/dist/cjs/p-calendar.cjs.entry.js.map +1 -1
- package/dist/cjs/p-datepicker.cjs.entry.js +38 -10
- package/dist/cjs/p-datepicker.cjs.entry.js.map +1 -1
- package/dist/cjs/p-stepper.cjs.entry.js +66 -41
- package/dist/cjs/p-stepper.cjs.entry.js.map +1 -1
- package/dist/cjs/paperless.cjs.js +1 -1
- package/dist/collection/components/molecules/calendar/calendar.component.js +3 -7
- package/dist/collection/components/molecules/calendar/calendar.component.js.map +1 -1
- package/dist/collection/components/molecules/datepicker/datepicker.component.js +11 -10
- package/dist/collection/components/molecules/datepicker/datepicker.component.js.map +1 -1
- package/dist/collection/components/molecules/stepper/stepper.component.js +86 -46
- package/dist/collection/components/molecules/stepper/stepper.component.js.map +1 -1
- package/dist/components/calendar.component.js +4 -8
- package/dist/components/calendar.component.js.map +1 -1
- package/dist/components/p-datepicker.js +38 -10
- package/dist/components/p-datepicker.js.map +1 -1
- package/dist/components/p-stepper.js +68 -43
- package/dist/components/p-stepper.js.map +1 -1
- package/dist/esm/{index-64e10183.js → index-27408d5b.js} +28 -2
- package/dist/esm/index-27408d5b.js.map +1 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/p-calendar.entry.js +4 -34
- package/dist/esm/p-calendar.entry.js.map +1 -1
- package/dist/esm/p-datepicker.entry.js +38 -10
- package/dist/esm/p-datepicker.entry.js.map +1 -1
- package/dist/esm/p-stepper.entry.js +66 -41
- package/dist/esm/p-stepper.entry.js.map +1 -1
- package/dist/esm/paperless.js +1 -1
- package/dist/index.html +1 -1
- package/dist/paperless/p-84863ba0.entry.js +2 -0
- package/dist/paperless/p-84863ba0.entry.js.map +1 -0
- package/dist/paperless/p-98e3f82a.entry.js +2 -0
- package/dist/paperless/p-98e3f82a.entry.js.map +1 -0
- package/dist/paperless/p-b51dcf11.js +2 -0
- package/dist/paperless/p-b51dcf11.js.map +1 -0
- package/dist/paperless/p-ed06230b.entry.js +2 -0
- package/dist/paperless/p-ed06230b.entry.js.map +1 -0
- package/dist/paperless/paperless.esm.js +1 -1
- package/dist/paperless/paperless.esm.js.map +1 -1
- package/dist/sw.js +1 -1
- package/dist/sw.js.map +1 -1
- package/dist/types/components/molecules/stepper/stepper.component.d.ts +9 -4
- package/dist/types/components.d.ts +8 -0
- package/hydrate/index.js +108 -59
- package/hydrate/index.mjs +108 -59
- package/package.json +1 -1
- package/dist/build/p-28601ee5.entry.js +0 -2
- package/dist/build/p-28601ee5.entry.js.map +0 -1
- package/dist/build/p-38edcb47.entry.js +0 -2
- package/dist/build/p-38edcb47.entry.js.map +0 -1
- package/dist/build/p-3fec2247.entry.js +0 -2
- package/dist/build/p-3fec2247.entry.js.map +0 -1
- package/dist/build/p-6bcfa4d5.js +0 -2
- package/dist/build/p-6bcfa4d5.js.map +0 -1
- package/dist/cjs/index-08db8a87.js.map +0 -1
- package/dist/esm/index-64e10183.js.map +0 -1
- package/dist/paperless/p-28601ee5.entry.js +0 -2
- package/dist/paperless/p-28601ee5.entry.js.map +0 -1
- package/dist/paperless/p-38edcb47.entry.js +0 -2
- package/dist/paperless/p-38edcb47.entry.js.map +0 -1
- package/dist/paperless/p-3fec2247.entry.js +0 -2
- package/dist/paperless/p-3fec2247.entry.js.map +0 -1
- package/dist/paperless/p-6bcfa4d5.js +0 -2
- package/dist/paperless/p-6bcfa4d5.js.map +0 -1
|
@@ -10,25 +10,34 @@ const Stepper = /*@__PURE__*/ proxyCustomElement(class Stepper extends HTMLEleme
|
|
|
10
10
|
this.__registerHost();
|
|
11
11
|
this.__attachShadow();
|
|
12
12
|
this.activeStep = 1;
|
|
13
|
+
this.enableAutoStatus = true;
|
|
13
14
|
this.direction = 'horizontal';
|
|
14
15
|
this.contentPosition = 'end';
|
|
15
|
-
this._rendering = false;
|
|
16
16
|
}
|
|
17
17
|
get _el() { return this; }
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
18
|
+
_generateTimeout;
|
|
19
|
+
_resizeObserver;
|
|
20
|
+
_generateStepsOnce = () => {
|
|
21
|
+
if (this._generateTimeout) {
|
|
22
|
+
clearTimeout(this._generateTimeout);
|
|
23
|
+
this._generateTimeout = null;
|
|
24
|
+
}
|
|
25
|
+
this._generateTimeout = setTimeout(() => this._generateSteps(), 50);
|
|
26
|
+
};
|
|
27
|
+
_generateSteps = async () => {
|
|
28
|
+
if (!this._el) {
|
|
24
29
|
return;
|
|
25
30
|
}
|
|
26
|
-
this._rendering = true;
|
|
27
31
|
let activeStep = this.activeStep - 1 || 0;
|
|
28
32
|
const items = this._el.querySelectorAll('p-stepper-item');
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
33
|
+
let directionChanged = false;
|
|
34
|
+
for (let i = 0; i < items?.length; i++) {
|
|
35
|
+
const item = items.item(i);
|
|
36
|
+
if (this.enableAutoStatus) {
|
|
37
|
+
item.active = i === activeStep;
|
|
38
|
+
item.finished = i < activeStep;
|
|
39
|
+
}
|
|
40
|
+
if (!this.activeStep || activeStep < 0) {
|
|
32
41
|
if (item.active) {
|
|
33
42
|
activeStep = i;
|
|
34
43
|
}
|
|
@@ -36,49 +45,50 @@ const Stepper = /*@__PURE__*/ proxyCustomElement(class Stepper extends HTMLEleme
|
|
|
36
45
|
activeStep = i + 1;
|
|
37
46
|
}
|
|
38
47
|
}
|
|
39
|
-
|
|
40
|
-
for (let i = 0; i < items?.length; i++) {
|
|
41
|
-
let directionChanged = false;
|
|
42
|
-
const item = items.item(i);
|
|
43
|
-
item.active = i === activeStep;
|
|
44
|
-
item.finished = i < activeStep;
|
|
45
|
-
if (item.direction !== this.direction) {
|
|
48
|
+
if (item.direction !== this.direction && !directionChanged) {
|
|
46
49
|
directionChanged = true;
|
|
47
50
|
}
|
|
48
51
|
item.direction = this.direction;
|
|
49
52
|
item.align =
|
|
50
|
-
|
|
53
|
+
this.direction === 'vertical'
|
|
54
|
+
? 'start'
|
|
55
|
+
: i === 0
|
|
56
|
+
? 'start'
|
|
57
|
+
: i === items?.length - 1
|
|
58
|
+
? 'end'
|
|
59
|
+
: 'center';
|
|
51
60
|
item.contentPosition = this.contentPosition;
|
|
61
|
+
}
|
|
62
|
+
if (directionChanged) {
|
|
63
|
+
// super hacky way to ensure all elements that have a direction changed are re-rendered
|
|
64
|
+
await new Promise(resolve => setTimeout(resolve, 200));
|
|
65
|
+
}
|
|
66
|
+
for (let i = 0; i < items?.length; i++) {
|
|
67
|
+
const item = items.item(i);
|
|
52
68
|
if (i < items.length - 1) {
|
|
53
|
-
|
|
69
|
+
let nextItem = item.nextElementSibling;
|
|
54
70
|
if (nextItem && nextItem.tagName.toLowerCase() === 'p-stepper-item') {
|
|
55
|
-
// super hacky, but we want to wait for the css of the `item.direction` change to be applied before querying for the item.clientHeight
|
|
56
|
-
// otherwise we always get the initial "16"
|
|
57
|
-
if (directionChanged) {
|
|
58
|
-
await this._delay(10);
|
|
59
|
-
}
|
|
60
|
-
const heightDiff = (item.clientHeight > 16
|
|
61
|
-
? item.clientHeight - 16
|
|
62
|
-
: item.clientHeight) / 2;
|
|
63
71
|
const stepperLine = document.createElement('p-stepper-line');
|
|
64
|
-
stepperLine.direction = this.direction;
|
|
65
|
-
stepperLine.active = i < activeStep;
|
|
66
|
-
if (heightDiff > 0 && this.direction === 'vertical') {
|
|
67
|
-
stepperLine.style.marginTop = `-${heightDiff / 16}rem`;
|
|
68
|
-
stepperLine.style.marginBottom = `-${heightDiff / 16}rem`;
|
|
69
|
-
stepperLine.style.minHeight = `calc(1rem + ${(heightDiff * 2) / 16}rem)`;
|
|
70
|
-
}
|
|
71
72
|
this._el.insertBefore(stepperLine, nextItem);
|
|
73
|
+
this._setStepperLineData(stepperLine, item, nextItem, i, activeStep);
|
|
72
74
|
const previous = stepperLine.previousElementSibling;
|
|
73
75
|
if (previous && previous.tagName.toLowerCase() === 'p-stepper-line') {
|
|
74
76
|
previous.remove();
|
|
75
77
|
}
|
|
76
78
|
continue;
|
|
77
79
|
}
|
|
80
|
+
if (nextItem && nextItem.tagName.toLowerCase() === 'p-stepper-line') {
|
|
81
|
+
const stepperLine = nextItem;
|
|
82
|
+
nextItem = nextItem.nextElementSibling;
|
|
83
|
+
if (nextItem && nextItem.tagName.toLowerCase() === 'p-stepper-item') {
|
|
84
|
+
this._setStepperLineData(stepperLine, item, nextItem, i, activeStep);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
78
87
|
}
|
|
79
88
|
if (i > 0) {
|
|
80
89
|
const previousItem = item.previousElementSibling;
|
|
81
|
-
if (previousItem
|
|
90
|
+
if (previousItem &&
|
|
91
|
+
previousItem.tagName.toLowerCase() === 'p-stepper-line') {
|
|
82
92
|
previousItem.direction = this.direction;
|
|
83
93
|
previousItem.active = item.active || item.finished;
|
|
84
94
|
}
|
|
@@ -89,17 +99,32 @@ const Stepper = /*@__PURE__*/ proxyCustomElement(class Stepper extends HTMLEleme
|
|
|
89
99
|
const line = lines.item(j);
|
|
90
100
|
line.remove();
|
|
91
101
|
}
|
|
92
|
-
|
|
102
|
+
};
|
|
103
|
+
_setStepperLineData = (stepperLine, item, nextItem, i, activeStep) => {
|
|
104
|
+
const heightDiff = item.clientHeight / 2;
|
|
105
|
+
const heightDiffNext = nextItem.clientHeight / 2;
|
|
106
|
+
stepperLine.direction = this.direction;
|
|
107
|
+
stepperLine.active = i < activeStep;
|
|
108
|
+
if (heightDiff > 0 && this.direction === 'vertical') {
|
|
109
|
+
stepperLine.style.marginTop = `-${heightDiff / 16}rem`;
|
|
110
|
+
stepperLine.style.marginBottom = `-${heightDiffNext / 16}rem`;
|
|
111
|
+
stepperLine.style.minHeight = `calc(1rem + ${(heightDiff + heightDiffNext) / 16}rem)`;
|
|
112
|
+
}
|
|
93
113
|
};
|
|
94
114
|
componentDidLoad() {
|
|
95
|
-
this.
|
|
96
|
-
this.
|
|
115
|
+
this._resizeObserver = new ResizeObserver(() => this._generateStepsOnce());
|
|
116
|
+
this._resizeObserver.observe(this._el);
|
|
117
|
+
}
|
|
118
|
+
disconnectCallback() {
|
|
119
|
+
if (this._resizeObserver) {
|
|
120
|
+
this._resizeObserver.disconnect();
|
|
121
|
+
}
|
|
97
122
|
}
|
|
98
123
|
render() {
|
|
99
|
-
return (h(Host, { key: '
|
|
124
|
+
return (h(Host, { key: '562a3a8c9d341492a63a60028d25dc4dfb184493', class: 'p-stepper' }, h("slot", { key: '573cee9039397f0ff989f37815c96a0dc57ade87', onSlotchange: () => this._generateStepsOnce() })));
|
|
100
125
|
}
|
|
101
126
|
_onActiveStepChange() {
|
|
102
|
-
this.
|
|
127
|
+
this._generateStepsOnce();
|
|
103
128
|
}
|
|
104
129
|
static get watchers() { return {
|
|
105
130
|
"activeStep": ["_onActiveStepChange"]
|
|
@@ -107,9 +132,9 @@ const Stepper = /*@__PURE__*/ proxyCustomElement(class Stepper extends HTMLEleme
|
|
|
107
132
|
static get style() { return PStepperStyle0; }
|
|
108
133
|
}, [1, "p-stepper", {
|
|
109
134
|
"activeStep": [2, "active-step"],
|
|
135
|
+
"enableAutoStatus": [4, "enable-auto-status"],
|
|
110
136
|
"direction": [513],
|
|
111
|
-
"contentPosition": [513, "content-position"]
|
|
112
|
-
"_rendering": [32]
|
|
137
|
+
"contentPosition": [513, "content-position"]
|
|
113
138
|
}, undefined, {
|
|
114
139
|
"activeStep": ["_onActiveStepChange"]
|
|
115
140
|
}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"p-stepper.js","mappings":";;;AAAA,MAAM,mBAAmB,GAAG,gfAAgf,CAAC;AAC7gB,uBAAe,mBAAmB;;MCMrB,OAAO;;;;;0BAIU,CAAC;yBAKkC,YAAY;+BAKhB,KAAK;0BAOnC,KAAK;;;IAE3B,OAAO,GAAG,KAAK,CAAC;;IAIhB,MAAM,GAAG,CAAC,MAAc,KAC/B,IAAI,OAAO,CAAC,OAAO,IAAI,UAAU,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC;IAE7C,aAAa,GAAG,OAAO,EAAS,KAAK,IAAI,CAAC,cAAc,EAAE,CAAC;IAE3D,cAAc,GAAG,OAAO,SAAS,GAAG,KAAK;QAChD,IAAI,CAAC,SAAS,KAAK,CAAC,IAAI,CAAC,GAAG,IAAI,IAAI,CAAC,UAAU,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE;YAClE,OAAO;SACP;QAED,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC;QAEvB,IAAI,UAAU,GAAG,IAAI,CAAC,UAAU,GAAG,CAAC,IAAI,CAAC,CAAC;QAC1C,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,CAAC;QAE1D,IAAI,CAAC,IAAI,CAAC,UAAU,IAAI,UAAU,GAAG,CAAC,EAAE;YACvC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,EAAE,MAAM,EAAE,CAAC,EAAE,EAAE;gBACvC,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC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CAAC,gBAAgB,CACtC,wEAAwE,CACxE,CAAC;QACF,KAAK,IAAI,CAAC,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,EAAE;YAC3C,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YAC3B,IAAI,CAAC,MAAM,EAAE,CAAC;SACd;QAED,UAAU,CAAC,OAAO,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC,EAAE,GAAG,CAAC,CAAC;KACjD,CAAC;IAEF,gBAAgB;QACf,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;QACpB,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;KAC1B;IAED,MAAM;QACL,QACC,EAAC,IAAI,qDAAC,KAAK,EAAC,WAAW,IACtB,6DAAM,YAAY,EAAE,IAAI,CAAC,aAAa,GAAI,CACpC,EACN;KACF;IAGS,mBAAmB;QAC5B,IAAI,CAAC,cAAc,EAAE,CAAC;KACtB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","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, State, 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' = '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@State() private _rendering = false;\n\n\tprivate _loaded = false;\n\n\t// private _steps: Array<HTMLPStepperItemElement>;\n\n\tprivate _delay = (amount: number) =>\n\t\tnew Promise(resolve => setTimeout(resolve, amount));\n\n\tprivate _onSlotChange = async (_e: Event) => this._generateSteps();\n\n\tprivate _generateSteps = async (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\tlet directionChanged = false;\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\n\t\t\tif (item.direction !== this.direction) {\n\t\t\t\tdirectionChanged = true;\n\t\t\t}\n\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\n\t\t\t\tif (nextItem && nextItem.tagName.toLowerCase() === 'p-stepper-item') {\n\t\t\t\t\t// super hacky, but we want to wait for the css of the `item.direction` change to be applied before querying for the item.clientHeight\n\t\t\t\t\t// otherwise we always get the initial \"16\"\n\t\t\t\t\tif (directionChanged) {\n\t\t\t\t\t\tawait this._delay(10);\n\t\t\t\t\t}\n\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 = document.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 = `-${heightDiff / 16}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\tconst previous = stepperLine.previousElementSibling;\n\t\t\t\t\tif (previous && previous.tagName.toLowerCase() === 'p-stepper-line') {\n\t\t\t\t\t\tprevious.remove();\n\t\t\t\t\t}\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(\n\t\t\t'p-stepper-line:not(:has(+ p-stepper-item)), p-stepper-line:first-child'\n\t\t);\n\t\tfor (let j = lines.length - 1; j >= 0; j--) {\n\t\t\tconst line = lines.item(j);\n\t\t\tline.remove();\n\t\t}\n\n\t\tsetTimeout(() => (this._rendering = false), 100);\n\t};\n\n\tcomponentDidLoad() {\n\t\tthis._loaded = true;\n\t\tthis._generateSteps(true);\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class='p-stepper'>\n\t\t\t\t<slot onSlotchange={this._onSlotChange} />\n\t\t\t</Host>\n\t\t);\n\t}\n\n\t@Watch('activeStep')\n\tprotected _onActiveStepChange() {\n\t\tthis._generateSteps();\n\t}\n}\n"],"version":3}
|
|
1
|
+
{"file":"p-stepper.js","mappings":";;;AAAA,MAAM,mBAAmB,GAAG,gfAAgf,CAAC;AAC7gB,uBAAe,mBAAmB;;MCMrB,OAAO;;;;;0BAIU,CAAC;gCAKM,IAAI;yBAKwB,YAAY;+BAKhB,KAAK;;;IAOzD,gBAAgB,CAA6B;IAC7C,eAAe,CAAiB;IAEhC,kBAAkB,GAAG;QAC5B,IAAI,IAAI,CAAC,gBAAgB,EAAE;YAC1B,YAAY,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;YACpC,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC;SAC7B;QAED,IAAI,CAAC,gBAAgB,GAAG,UAAU,CAAC,MAAM,IAAI,CAAC,cAAc,EAAE,EAAE,EAAE,CAAC,CAAC;KACpE,CAAC;IAEM,cAAc,GAAG;QACxB,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE;YACd,OAAO;SACP;QAED,IAAI,UAAU,GAAG,IAAI,CAAC,UAAU,GAAG,CAAC,IAAI,CAAC,CAAC;QAC1C,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,CAAC;QAE1D,IAAI,gBAAgB,GAAG,KAAK,CAAC;QAC7B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,EAAE,MAAM,EAAE,CAAC,EAAE,EAAE;YACvC,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC,CAAQ,CAAC;YAElC,IAAI,IAAI,CAAC,gBAAgB,EAAE;gBAC1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L,QACC,EAAC,IAAI,qDAAC,KAAK,EAAC,WAAW,IACtB,6DAAM,YAAY,EAAE,MAAM,IAAI,CAAC,kBAAkB,EAAE,GAAI,CACjD,EACN;KACF;IAGS,mBAAmB;QAC5B,IAAI,CAAC,kBAAkB,EAAE,CAAC;KAC1B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","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 * Wether to automatically apply active & finished to items\n\t */\n\t@Prop() enableAutoStatus: boolean = true;\n\n\t/**\n\t * The direction of the stepper\n\t */\n\t@Prop({ reflect: true }) direction: 'horizontal' | 'vertical' = '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 _generateTimeout: NodeJS.Timeout | undefined;\n\tprivate _resizeObserver: ResizeObserver;\n\n\tprivate _generateStepsOnce = () => {\n\t\tif (this._generateTimeout) {\n\t\t\tclearTimeout(this._generateTimeout);\n\t\t\tthis._generateTimeout = null;\n\t\t}\n\n\t\tthis._generateTimeout = setTimeout(() => this._generateSteps(), 50);\n\t};\n\n\tprivate _generateSteps = async () => {\n\t\tif (!this._el) {\n\t\t\treturn;\n\t\t}\n\n\t\tlet activeStep = this.activeStep - 1 || 0;\n\t\tconst items = this._el.querySelectorAll('p-stepper-item');\n\n\t\tlet directionChanged = false;\n\t\tfor (let i = 0; i < items?.length; i++) {\n\t\t\tconst item = items.item(i) as any;\n\n\t\t\tif (this.enableAutoStatus) {\n\t\t\t\titem.active = i === activeStep;\n\t\t\t\titem.finished = i < activeStep;\n\t\t\t}\n\n\t\t\tif (!this.activeStep || activeStep < 0) {\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\n\t\t\tif (item.direction !== this.direction && !directionChanged) {\n\t\t\t\tdirectionChanged = true;\n\t\t\t}\n\n\t\t\titem.direction = this.direction;\n\t\t\titem.align =\n\t\t\t\tthis.direction === 'vertical'\n\t\t\t\t\t? 'start'\n\t\t\t\t\t: i === 0\n\t\t\t\t\t? 'start'\n\t\t\t\t\t: i === items?.length - 1\n\t\t\t\t\t? 'end'\n\t\t\t\t\t: 'center';\n\t\t\titem.contentPosition = this.contentPosition;\n\t\t}\n\n\t\tif (directionChanged) {\n\t\t\t// super hacky way to ensure all elements that have a direction changed are re-rendered\n\t\t\tawait new Promise(resolve => setTimeout(resolve, 200));\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\tif (i < items.length - 1) {\n\t\t\t\tlet nextItem = item.nextElementSibling;\n\n\t\t\t\tif (nextItem && nextItem.tagName.toLowerCase() === 'p-stepper-item') {\n\t\t\t\t\tconst stepperLine = document.createElement('p-stepper-line');\n\t\t\t\t\tthis._el.insertBefore(stepperLine, nextItem);\n\t\t\t\t\tthis._setStepperLineData(stepperLine, item, nextItem, i, activeStep);\n\n\t\t\t\t\tconst previous = stepperLine.previousElementSibling;\n\t\t\t\t\tif (previous && previous.tagName.toLowerCase() === 'p-stepper-line') {\n\t\t\t\t\t\tprevious.remove();\n\t\t\t\t\t}\n\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif (nextItem && nextItem.tagName.toLowerCase() === 'p-stepper-line') {\n\t\t\t\t\tconst stepperLine = nextItem;\n\t\t\t\t\tnextItem = nextItem.nextElementSibling;\n\n\t\t\t\t\tif (nextItem && nextItem.tagName.toLowerCase() === 'p-stepper-item') {\n\t\t\t\t\t\tthis._setStepperLineData(\n\t\t\t\t\t\t\tstepperLine,\n\t\t\t\t\t\t\titem,\n\t\t\t\t\t\t\tnextItem,\n\t\t\t\t\t\t\ti,\n\t\t\t\t\t\t\tactiveStep\n\t\t\t\t\t\t);\n\t\t\t\t\t}\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 (\n\t\t\t\t\tpreviousItem &&\n\t\t\t\t\tpreviousItem.tagName.toLowerCase() === 'p-stepper-line'\n\t\t\t\t) {\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(\n\t\t\t'p-stepper-line:not(:has(+ p-stepper-item)), p-stepper-line:first-child'\n\t\t);\n\t\tfor (let j = lines.length - 1; j >= 0; j--) {\n\t\t\tconst line = lines.item(j);\n\t\t\tline.remove();\n\t\t}\n\t};\n\n\tprivate _setStepperLineData = (\n\t\tstepperLine: HTMLPStepperLineElement,\n\t\titem: HTMLPStepperItemElement,\n\t\tnextItem: HTMLPStepperItemElement,\n\t\ti: number,\n\t\tactiveStep: number\n\t) => {\n\t\tconst heightDiff = item.clientHeight / 2;\n\t\tconst heightDiffNext = nextItem.clientHeight / 2;\n\n\t\tstepperLine.direction = this.direction;\n\t\tstepperLine.active = i < activeStep;\n\n\t\tif (heightDiff > 0 && this.direction === 'vertical') {\n\t\t\tstepperLine.style.marginTop = `-${heightDiff / 16}rem`;\n\t\t\tstepperLine.style.marginBottom = `-${heightDiffNext / 16}rem`;\n\t\t\tstepperLine.style.minHeight = `calc(1rem + ${\n\t\t\t\t(heightDiff + heightDiffNext) / 16\n\t\t\t}rem)`;\n\t\t}\n\t};\n\n\tcomponentDidLoad() {\n\t\tthis._resizeObserver = new ResizeObserver(() => this._generateStepsOnce());\n\t\tthis._resizeObserver.observe(this._el);\n\t}\n\n\tdisconnectCallback() {\n\t\tif (this._resizeObserver) {\n\t\t\tthis._resizeObserver.disconnect();\n\t\t}\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class='p-stepper'>\n\t\t\t\t<slot onSlotchange={() => this._generateStepsOnce()} />\n\t\t\t</Host>\n\t\t);\n\t}\n\n\t@Watch('activeStep')\n\tprotected _onActiveStepChange() {\n\t\tthis._generateStepsOnce();\n\t}\n}\n"],"version":3}
|
|
@@ -260,6 +260,32 @@ function isValid(dirtyDate) {
|
|
|
260
260
|
return !isNaN(Number(date));
|
|
261
261
|
}
|
|
262
262
|
|
|
263
|
+
/**
|
|
264
|
+
* @name startOfMonth
|
|
265
|
+
* @category Month Helpers
|
|
266
|
+
* @summary Return the start of a month for the given date.
|
|
267
|
+
*
|
|
268
|
+
* @description
|
|
269
|
+
* Return the start of a month for the given date.
|
|
270
|
+
* The result will be in the local timezone.
|
|
271
|
+
*
|
|
272
|
+
* @param {Date|Number} date - the original date
|
|
273
|
+
* @returns {Date} the start of a month
|
|
274
|
+
* @throws {TypeError} 1 argument required
|
|
275
|
+
*
|
|
276
|
+
* @example
|
|
277
|
+
* // The start of a month for 2 September 2014 11:55:00:
|
|
278
|
+
* const result = startOfMonth(new Date(2014, 8, 2, 11, 55, 0))
|
|
279
|
+
* //=> Mon Sep 01 2014 00:00:00
|
|
280
|
+
*/
|
|
281
|
+
function startOfMonth(dirtyDate) {
|
|
282
|
+
requiredArgs(1, arguments);
|
|
283
|
+
var date = toDate(dirtyDate);
|
|
284
|
+
date.setDate(1);
|
|
285
|
+
date.setHours(0, 0, 0, 0);
|
|
286
|
+
return date;
|
|
287
|
+
}
|
|
288
|
+
|
|
263
289
|
/**
|
|
264
290
|
* @name subMilliseconds
|
|
265
291
|
* @category Millisecond Helpers
|
|
@@ -2304,6 +2330,6 @@ function isBefore(dirtyDate, dirtyDateToCompare) {
|
|
|
2304
2330
|
return date.getTime() < dateToCompare.getTime();
|
|
2305
2331
|
}
|
|
2306
2332
|
|
|
2307
|
-
export { _typeof as _, startOfUTCISOWeek as a, getUTCWeek as b, toInteger as c, getUTCISOWeek as d, getDefaultOptions as e, subMilliseconds as f, getUTCWeekYear as g, getTimezoneOffsetInMilliseconds as h, defaultLocale as i, isProtectedWeekYearToken as j, throwProtectedError as k, longFormatters$1 as l, isProtectedDayOfYearToken as m, isValid as n, isBefore as o, isAfter as p, format as q, requiredArgs as r, startOfUTCWeek as s, toDate as t, startOfDay as u,
|
|
2333
|
+
export { _typeof as _, startOfUTCISOWeek as a, getUTCWeek as b, toInteger as c, getUTCISOWeek as d, getDefaultOptions as e, subMilliseconds as f, getUTCWeekYear as g, getTimezoneOffsetInMilliseconds as h, defaultLocale as i, isProtectedWeekYearToken as j, throwProtectedError as k, longFormatters$1 as l, isProtectedDayOfYearToken as m, isValid as n, isBefore as o, isAfter as p, format as q, requiredArgs as r, startOfUTCWeek as s, toDate as t, startOfDay as u, startOfMonth as v, isSameDay as w };
|
|
2308
2334
|
|
|
2309
|
-
//# sourceMappingURL=index-
|
|
2335
|
+
//# sourceMappingURL=index-27408d5b.js.map
|