@progressive-development/pd-wizard 0.0.7 → 0.0.8
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/LICENSE +2 -21
- package/package.json +2 -2
- package/src/PdSteps.js +297 -295
- package/src/PdWizard.js +340 -301
- package/test/pd-wizard.test.js +3 -1
package/LICENSE
CHANGED
|
@@ -1,21 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2021 pd-wizard
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
No License, all rights reserved
|
|
2
|
+
@2021 - PD Progressive Development UG
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progressive-development/pd-wizard",
|
|
3
3
|
"description": "Webcomponent pd-wizard following open-wc recommendations",
|
|
4
|
-
"license": "
|
|
4
|
+
"license": "SEE LICENSE IN LICENSE",
|
|
5
5
|
"author": "PD Progressive Development",
|
|
6
6
|
"directories": {
|
|
7
7
|
"test": "test"
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"order",
|
|
15
15
|
"steps"
|
|
16
16
|
],
|
|
17
|
-
"version": "0.0.
|
|
17
|
+
"version": "0.0.8",
|
|
18
18
|
"main": "index.js",
|
|
19
19
|
"module": "index.js",
|
|
20
20
|
"scripts": {
|
package/src/PdSteps.js
CHANGED
|
@@ -1,306 +1,308 @@
|
|
|
1
1
|
/* eslint-disable lit-a11y/click-events-have-key-events */
|
|
2
2
|
/**
|
|
3
3
|
* @license
|
|
4
|
-
* Copyright (c)
|
|
5
|
-
* This code may only be used under the BSD style license found at
|
|
6
|
-
* http://polymer.github.io/LICENSE.txt
|
|
7
|
-
* The complete set of authors may be found at
|
|
8
|
-
* http://polymer.github.io/AUTHORS.txt
|
|
9
|
-
* The complete set of contributors may be found at
|
|
10
|
-
* http://polymer.github.io/CONTRIBUTORS.txt
|
|
11
|
-
* Code distributed by Google as part of the polymer project is also
|
|
12
|
-
* subject to an additional IP rights grant found at
|
|
13
|
-
* http://polymer.github.io/PATENTS.txt
|
|
4
|
+
* Copyright (c) 2021 PD Progressive Development UG. All rights reserved.
|
|
14
5
|
*/
|
|
15
6
|
|
|
16
|
-
|
|
7
|
+
import { LitElement, html, css } from 'lit';
|
|
17
8
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
9
|
+
/**
|
|
10
|
+
* An example element.
|
|
11
|
+
*
|
|
12
|
+
* @slot - This element has a slot
|
|
13
|
+
* @csspart button - The button
|
|
14
|
+
*/
|
|
24
15
|
class PdSteps extends LitElement {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
.parent {
|
|
67
|
-
display: flex;
|
|
68
|
-
/*
|
|
16
|
+
/**
|
|
17
|
+
* Fired when `step` (when not current) clicked.
|
|
18
|
+
* @event step-clicked
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
static get styles() {
|
|
22
|
+
return css`
|
|
23
|
+
:host {
|
|
24
|
+
--my-font: var(--app-font, Oswald);
|
|
25
|
+
--my-step-text-color: var(--squi-test, #177e89);
|
|
26
|
+
--my-step-current-text-color: var(--squi-test, #fefefe);
|
|
27
|
+
|
|
28
|
+
--my-step-current-name-circle-color: var(--squi-test, #ffc857);
|
|
29
|
+
--my-step-passed-name-circle-color: var(--squi-test, #fefefe);
|
|
30
|
+
--my-step-name-circle-color: var(--squi-test, #fefefe);
|
|
31
|
+
|
|
32
|
+
--my-step-unfinished-border-color: var(--squi-test, #fefefe);
|
|
33
|
+
--my-step-passed-border-color: var(--squi-test, #fefefe);
|
|
34
|
+
--my-step-current-border-color: var(--squi-test, #fefefe);
|
|
35
|
+
|
|
36
|
+
--my-step-unfinished-color: var(--squi-test, #fefefe);
|
|
37
|
+
--my-step-passed-color: var(--squi-test, #fefefe);
|
|
38
|
+
--my-step-passed-gradient-color: var(--squi-test, #084c61);
|
|
39
|
+
--my-step-current-color: var(--squi-test, #177e89);
|
|
40
|
+
--my-step-current-gradient-color: var(--squi-test, #f3d7a0);
|
|
41
|
+
|
|
42
|
+
--my-step-hover-color: var(--squi-test, #3ab6db);
|
|
43
|
+
|
|
44
|
+
--my-bg-color: var(--squi-step-bg-color, #177e89);
|
|
45
|
+
--my-hr-bg-color: var(--squi-hr-bg-color, #fefefe);
|
|
46
|
+
|
|
47
|
+
display: block;
|
|
48
|
+
background-color: var(--my-bg-color);
|
|
49
|
+
|
|
50
|
+
/* Hack => Wegen HR Linie wird das elemt 10 nach oben geschoben, sonst immer Abstand <hr> block display etc. => wie zu lösen? */
|
|
51
|
+
margin-top: -10px;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.parent {
|
|
55
|
+
display: flex;
|
|
56
|
+
/*
|
|
69
57
|
flex-direction: row; /* default *
|
|
70
58
|
flex-wrap: nowrap; /* default *
|
|
71
59
|
*/
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
60
|
+
/* short hand for above lines => default, not needed */
|
|
61
|
+
flex-flow: row nowrap;
|
|
62
|
+
align-items: center;
|
|
63
|
+
/*height: 50px; /* Or whatever */
|
|
64
|
+
padding-bottom: 10px;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.parent.circle {
|
|
68
|
+
justify-content: space-around;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.parent.tab {
|
|
72
|
+
justify-content: start;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/* Eingeführt, um den Text unter dem Circle zentral darzustellen => !Funktioniert nur für circle im Augenblick*/
|
|
76
|
+
.step-container {
|
|
77
|
+
display: flex;
|
|
78
|
+
flex-direction: column;
|
|
79
|
+
align-items: center;
|
|
80
|
+
|
|
81
|
+
text-align: center;
|
|
82
|
+
z-index: 51;
|
|
83
|
+
width: 100%;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.step {
|
|
87
|
+
/*margin: auto; /* Magic!/*/
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.step.circle {
|
|
91
|
+
width: 40px; /* Or whatever */
|
|
92
|
+
height: 40px; /* Or whatever */
|
|
93
|
+
border-radius: 50%;
|
|
94
|
+
|
|
95
|
+
border: solid 1px var(--my-step-unfinished-border-color);
|
|
96
|
+
box-shadow: 1px 1px grey;
|
|
97
|
+
/*background-image: linear-gradient(to right, var(--my-step-unfinished-color), lightgrey);*/
|
|
98
|
+
background-color: var(--my-step-unfinished-color);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.step.tab {
|
|
102
|
+
width: 100%;
|
|
103
|
+
max-width: 250px;
|
|
104
|
+
height: 40px;
|
|
105
|
+
border: solid 1px var(--my-step-unfinished-border-color);
|
|
106
|
+
box-shadow: 1px 1px grey;
|
|
107
|
+
background-image: linear-gradient(
|
|
108
|
+
to right,
|
|
109
|
+
var(--my-step-unfinished-color),
|
|
110
|
+
grey
|
|
111
|
+
);
|
|
112
|
+
cursor: pointer;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.step.tab:hover:not(.current) {
|
|
116
|
+
border: solid 1px yellow;
|
|
117
|
+
background-image: linear-gradient(
|
|
118
|
+
to right,
|
|
119
|
+
var(--my-step-hover-color),
|
|
120
|
+
grey
|
|
121
|
+
);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.circle.passed {
|
|
125
|
+
/*background-image: linear-gradient(to right, var(--my-step-passed-color) , var(--my-step-passed-gradient-color)); */
|
|
126
|
+
background-color: var(--my-step-passed-color);
|
|
127
|
+
border: solid 2px var(--my-step-passed-border-color);
|
|
128
|
+
cursor: pointer;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.circle.passed:hover {
|
|
132
|
+
background-color: var(--my-step-current-name-circle-color);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.circle.current {
|
|
136
|
+
/*background-image: linear-gradient(to right, var(--my-step-current-color) , var(--my-step-current-gradient-color)); */
|
|
137
|
+
background-color: var(--my-step-current-color);
|
|
138
|
+
border: solid 2px var(--my-step-current-border-color);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.tab.current {
|
|
142
|
+
background-image: linear-gradient(
|
|
143
|
+
to right,
|
|
144
|
+
var(--my-step-current-color),
|
|
145
|
+
grey
|
|
146
|
+
);
|
|
147
|
+
box-shadow: 1px 1px grey;
|
|
148
|
+
border-color: var(--my-step-current-border-color);
|
|
149
|
+
cursor: auto;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.step-nr {
|
|
153
|
+
font-family: var(--my-font);
|
|
154
|
+
color: var(--my-step-text-color);
|
|
155
|
+
font-weight: bold;
|
|
156
|
+
font-size: 1.5em;
|
|
157
|
+
line-height: 37px;
|
|
158
|
+
pointer-events: none;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
/* Style Tab ohne Step Nr /*/
|
|
162
|
+
.tab .step-nr {
|
|
163
|
+
display: none;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.step-name {
|
|
167
|
+
color: var(--my-step-text-color);
|
|
168
|
+
font-family: var(--my-font);
|
|
169
|
+
font-size: 1em;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
/* Style Circle ohne Step Name => ToDo: Nur ab bestimmter Breite /*/
|
|
173
|
+
.circle .step-name {
|
|
174
|
+
white-space: nowrap;
|
|
175
|
+
color: var(--my-step-name-circle-color);
|
|
176
|
+
/* display: none; */
|
|
177
|
+
font-weight: bold;
|
|
178
|
+
padding-top: 8px;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
.circle .step-name.passed {
|
|
182
|
+
color: var(--my-step-passed-name-circle-color);
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.circle .step-name.current {
|
|
186
|
+
color: var(--my-step-current-name-circle-color);
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
.circle .step-nr.current {
|
|
190
|
+
color: var(--my-step-current-text-color);
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
/* used for circle style */
|
|
194
|
+
hr {
|
|
195
|
+
/*background: linear-gradient(to right, var(--my-step-passed-color) , var(--my-step-unfinished-color));*/
|
|
196
|
+
background-color: var(--my-hr-bg-color);
|
|
197
|
+
height: 3px;
|
|
198
|
+
position: relative;
|
|
199
|
+
top: 33px;
|
|
200
|
+
z-index: 50;
|
|
201
|
+
width: 100%;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
/* Size Elements for small width */
|
|
205
|
+
@media (max-width: 600px) {
|
|
206
|
+
.parent {
|
|
207
|
+
/*height: 30px; /* Or whatever */
|
|
208
|
+
}
|
|
209
|
+
.step.circle {
|
|
210
|
+
height: 30px; /* Or whatever */
|
|
211
|
+
width: 30px;
|
|
212
|
+
}
|
|
213
|
+
.step.tab {
|
|
214
|
+
height: 30px; /* Or whatever */
|
|
215
|
+
}
|
|
216
|
+
hr {
|
|
217
|
+
height: 2px;
|
|
218
|
+
top: 28px;
|
|
219
|
+
}
|
|
220
|
+
.step-nr {
|
|
221
|
+
font-size: 1.2em;
|
|
222
|
+
text-align: center;
|
|
223
|
+
line-height: 28px;
|
|
224
|
+
}
|
|
225
|
+
.step-name {
|
|
226
|
+
font-size: 0.9em;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
.circle .step-name {
|
|
230
|
+
padding-top: 3px;
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
`;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
static get properties() {
|
|
237
|
+
return {
|
|
238
|
+
/**
|
|
239
|
+
* The steps for this component
|
|
240
|
+
*/
|
|
241
|
+
steps: { type: Array },
|
|
242
|
+
currentStepNr: { type: Number },
|
|
243
|
+
styleTyp: { type: String },
|
|
244
|
+
};
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
constructor() {
|
|
248
|
+
super();
|
|
249
|
+
this.steps = [];
|
|
250
|
+
this.currentStepNr = -99;
|
|
251
|
+
this.styleTyp = 'circle';
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
render() {
|
|
255
|
+
switch (this.styleTyp) {
|
|
256
|
+
// TODO: Noch das gleiche, ggf. später gebraucht...
|
|
257
|
+
case 'circle':
|
|
258
|
+
return this._renderCircle();
|
|
259
|
+
case 'tab':
|
|
260
|
+
return this._renderCircle();
|
|
261
|
+
default:
|
|
262
|
+
return '';
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
_renderCircle() {
|
|
267
|
+
return html`
|
|
268
|
+
${this.styleTyp === 'circle' ? html`<hr />` : ''}
|
|
269
|
+
<div class="parent ${this.styleTyp}">
|
|
270
|
+
${this.steps.map((st, index) => {
|
|
271
|
+
let pClass = '';
|
|
272
|
+
if (this.currentStepNr > index) {
|
|
273
|
+
pClass = this.currentStepNr === index + 1 ? 'current' : 'passed';
|
|
274
|
+
}
|
|
275
|
+
return html`
|
|
276
|
+
<div class="step-container">
|
|
277
|
+
<div
|
|
278
|
+
class="step ${this.styleTyp} ${pClass}"
|
|
279
|
+
data-step="${index + 1}"
|
|
280
|
+
@click="${this._stepClicked}"
|
|
281
|
+
>
|
|
282
|
+
<span class="step-nr ${pClass}">${index + 1}</span>
|
|
283
|
+
</div>
|
|
284
|
+
<span class="step-name ${pClass}">${st.name}</span>
|
|
285
|
+
</div>
|
|
286
|
+
`;
|
|
287
|
+
})}
|
|
286
288
|
</div>
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
289
|
+
`;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
_stepClicked(e) {
|
|
293
|
+
const stepNr = e.target.dataset.step;
|
|
294
|
+
if (stepNr < this.currentStepNr) {
|
|
295
|
+
this.dispatchEvent(
|
|
296
|
+
new CustomEvent('go-to', {
|
|
297
|
+
detail: {
|
|
298
|
+
step: stepNr,
|
|
299
|
+
},
|
|
300
|
+
bubbles: true,
|
|
301
|
+
composed: true,
|
|
302
|
+
})
|
|
303
|
+
);
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
window.customElements.define('pd-steps', PdSteps);
|