bfg-common 1.2.200 → 1.2.202
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/assets/localization/local_be.json +1 -3
- package/assets/localization/local_en.json +1 -3
- package/assets/localization/local_hy.json +1 -3
- package/assets/localization/local_kk.json +1 -3
- package/assets/localization/local_ru.json +1 -3
- package/assets/localization/local_zh.json +1 -3
- package/assets/scss/common/icons/icons-2.scss +222 -222
- package/components/atoms/switch/Switch.vue +107 -107
- package/components/atoms/wizard/Wizard.vue +443 -442
- package/components/atoms/wizard/utils/utils.ts +486 -538
- package/components/common/BadBrowser.vue +114 -114
- package/components/common/adapterManager/AddAdapterWarningModal.vue +82 -82
- package/components/common/adapterManager/NoActiveAdaptersModal.vue +62 -62
- package/components/common/adapterManager/NoConnectedActiveAdaptersModal.vue +62 -62
- package/components/common/browse/blocks/Title.vue +66 -66
- package/components/common/diagramMain/modals/editSettings/tabs/port/PortProperties.vue +202 -202
- package/components/common/diagramMain/modals/remove/RemoveModal.vue +226 -226
- package/components/common/feedback/Feedback.vue +261 -261
- package/components/common/feedback/VisitPortal.vue +53 -53
- package/components/common/help/navbar/left/utils/constructAccordion.ts +27 -27
- package/components/common/recursionTree/RecursionTree.vue +201 -201
- package/components/common/vm/actions/add/Add.vue +569 -687
- package/components/common/vm/actions/add/utils.ts +238 -118
- package/components/common/vm/actions/addOld/Add.vue +690 -0
- package/components/common/vm/actions/addOld/FolderTreeView.vue +83 -0
- package/components/common/vm/actions/addOld/utils.ts +118 -0
- package/components/common/vm/actions/clone/Clone.vue +545 -545
- package/components/common/vm/actions/clone/select/options/Options.vue +65 -65
- package/components/common/vm/actions/clone/utils.ts +43 -43
- package/components/common/vm/actions/common/customizeHardware/CustomizeHardware.vue +8 -6
- package/components/common/vm/actions/common/customizeHardware/CustomizeHardwareOld.vue +267 -0
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/CoresPerSocket.vue +109 -109
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/limit/Limit.vue +234 -234
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/limit/config/options.ts +28 -28
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/memory/Memory.vue +316 -316
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/memory/config/memoryOptions.ts +35 -35
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/reservation/Reservation.vue +235 -235
- package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/order/Order.vue +197 -197
- package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/CopyPaste.vue +51 -51
- package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/RemoteConsoleOptions.vue +253 -253
- package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/keymap/Keymap.vue +55 -55
- package/components/common/vm/actions/common/select/name/Name.vue +10 -5
- package/components/common/vm/actions/common/select/name/NameOld.vue +215 -0
- package/components/common/vm/actions/common/select/storage/Storage.vue +6 -4
- package/components/common/vm/actions/common/select/storage/StorageOld.vue +194 -0
- package/components/common/vm/actions/common/select/storage/config/config.ts +154 -154
- package/components/common/vm/utils/powerActions.ts +55 -55
- package/components/common/wizards/datastore/add/nfs/kerberosAuthentication/KerberosAuthentication.vue +54 -54
- package/components/layout/theHeader/utils/localization.ts +32 -32
- package/composables/useLocal.ts +38 -38
- package/minify.js +146 -146
- package/models/interfaces.ts +49 -49
- package/models/store/interfaces.ts +37 -37
- package/models/store/storage/interfaces.ts +32 -32
- package/models/store/types.ts +43 -43
- package/modules/fixContentBuild/utils/methods.ts +114 -114
- package/package.json +1 -1
- package/public/spice-console/application/codec.js +257 -257
- package/public/spice-console/lib/rasterEngine.js +907 -907
- package/public/spice-console/network/spicechannel.js +369 -369
- package/utils/contentBuild.ts +34 -34
- package/utils/sendTask.ts +77 -77
|
@@ -1,442 +1,443 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div v-if="props.show" class="modal clr-wizard wizard-xl">
|
|
3
|
-
<div class="modal-dialog modal-xl relative">
|
|
4
|
-
<div class="modal-content-wrapper">
|
|
5
|
-
<nav class="modal-nav clr-wizard-stepnav-wrapper">
|
|
6
|
-
<h1 class="clr-wizard-title">
|
|
7
|
-
{{ props.title }}
|
|
8
|
-
</h1>
|
|
9
|
-
<atoms-wizard-step
|
|
10
|
-
:test-id="props.testId"
|
|
11
|
-
:steps="steps"
|
|
12
|
-
:was-completed="props.wasCompleted"
|
|
13
|
-
@change="onSelectStep"
|
|
14
|
-
/>
|
|
15
|
-
</nav>
|
|
16
|
-
<div class="modal-content">
|
|
17
|
-
<div class="modal-header--accessible">
|
|
18
|
-
<slot name="contentHeading">
|
|
19
|
-
<div class="modal-title-wrapper">
|
|
20
|
-
<h2 class="modal-title">
|
|
21
|
-
<span class="modal-title-text">
|
|
22
|
-
{{ selectedStep.title }}
|
|
23
|
-
</span>
|
|
24
|
-
</h2>
|
|
25
|
-
</div>
|
|
26
|
-
</slot>
|
|
27
|
-
<button
|
|
28
|
-
:id="`${props.testId}-close-icon`"
|
|
29
|
-
class="close"
|
|
30
|
-
@click="onHide"
|
|
31
|
-
>
|
|
32
|
-
<atoms-the-icon class="close-icon" name="close" />
|
|
33
|
-
</button>
|
|
34
|
-
</div>
|
|
35
|
-
<div class="modal-body" style="padding: 16px 15px 10px 10px">
|
|
36
|
-
<div v-if="selectedStep.subTitle" class="content-heading">
|
|
37
|
-
<div>
|
|
38
|
-
<h2>{{ selectedStep.subTitle }}</h2>
|
|
39
|
-
</div>
|
|
40
|
-
</div>
|
|
41
|
-
<slot name="modalBody" :selected-step="selectedStep" />
|
|
42
|
-
</div>
|
|
43
|
-
<div class="modal-footer">
|
|
44
|
-
<slot name="
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
:
|
|
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
|
-
import type {
|
|
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
|
-
(event: '
|
|
130
|
-
(event: '
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
)
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
status === UI_E_WIZARD_STATUS.
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
steps.value
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
(indexInactive
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
const
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
st.status !== UI_E_WIZARD_STATUS.
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
const
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
(indexInactive
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
(
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
(
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
-webkit-animation-
|
|
333
|
-
animation-
|
|
334
|
-
animation-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
height:
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
}
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
font-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
}
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
}
|
|
442
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<div v-if="props.show" class="modal clr-wizard wizard-xl">
|
|
3
|
+
<div class="modal-dialog modal-xl relative">
|
|
4
|
+
<div class="modal-content-wrapper">
|
|
5
|
+
<nav class="modal-nav clr-wizard-stepnav-wrapper">
|
|
6
|
+
<h1 class="clr-wizard-title">
|
|
7
|
+
{{ props.title }}
|
|
8
|
+
</h1>
|
|
9
|
+
<atoms-wizard-step
|
|
10
|
+
:test-id="props.testId"
|
|
11
|
+
:steps="steps"
|
|
12
|
+
:was-completed="props.wasCompleted"
|
|
13
|
+
@change="onSelectStep"
|
|
14
|
+
/>
|
|
15
|
+
</nav>
|
|
16
|
+
<div class="modal-content">
|
|
17
|
+
<div class="modal-header--accessible">
|
|
18
|
+
<slot name="contentHeading">
|
|
19
|
+
<div class="modal-title-wrapper">
|
|
20
|
+
<h2 class="modal-title">
|
|
21
|
+
<span class="modal-title-text">
|
|
22
|
+
{{ selectedStep.title }}
|
|
23
|
+
</span>
|
|
24
|
+
</h2>
|
|
25
|
+
</div>
|
|
26
|
+
</slot>
|
|
27
|
+
<button
|
|
28
|
+
:id="`${props.testId}-close-icon`"
|
|
29
|
+
class="close"
|
|
30
|
+
@click="onHide"
|
|
31
|
+
>
|
|
32
|
+
<atoms-the-icon class="close-icon" name="close" />
|
|
33
|
+
</button>
|
|
34
|
+
</div>
|
|
35
|
+
<div class="modal-body" style="padding: 16px 15px 10px 10px">
|
|
36
|
+
<div v-if="selectedStep.subTitle" class="content-heading">
|
|
37
|
+
<div>
|
|
38
|
+
<h2>{{ selectedStep.subTitle }}</h2>
|
|
39
|
+
</div>
|
|
40
|
+
</div>
|
|
41
|
+
<slot name="modalBody" :selected-step="selectedStep" />
|
|
42
|
+
</div>
|
|
43
|
+
<div class="modal-footer">
|
|
44
|
+
<slot name="modalFooterContent"></slot>
|
|
45
|
+
<slot name="modalFooter">
|
|
46
|
+
<button
|
|
47
|
+
:id="`${props.testId}-cancel-button`"
|
|
48
|
+
class="btn btn-link"
|
|
49
|
+
@click="onHide"
|
|
50
|
+
>
|
|
51
|
+
{{ props.localization.cancel }}
|
|
52
|
+
</button>
|
|
53
|
+
<button
|
|
54
|
+
v-if="!isFirstStep"
|
|
55
|
+
:id="`${props.testId}-back-button`"
|
|
56
|
+
class="btn btn-outline"
|
|
57
|
+
@click="onPreviousStep"
|
|
58
|
+
>
|
|
59
|
+
{{ props.localization.back }}
|
|
60
|
+
</button>
|
|
61
|
+
<button
|
|
62
|
+
v-if="isLastStep"
|
|
63
|
+
:id="`${props.testId}-finish-button`"
|
|
64
|
+
class="btn btn-success"
|
|
65
|
+
@click="emits('submit')"
|
|
66
|
+
>
|
|
67
|
+
{{ props.localization.finish }}
|
|
68
|
+
</button>
|
|
69
|
+
<button
|
|
70
|
+
v-else
|
|
71
|
+
:id="`${props.testId}-next-button`"
|
|
72
|
+
:disabled="props.isDisabledFinish"
|
|
73
|
+
class="btn btn-primary"
|
|
74
|
+
@click="onNextStep"
|
|
75
|
+
>
|
|
76
|
+
{{ props.localization.next }}
|
|
77
|
+
</button>
|
|
78
|
+
</slot>
|
|
79
|
+
</div>
|
|
80
|
+
</div>
|
|
81
|
+
</div>
|
|
82
|
+
|
|
83
|
+
<div v-show="props.isLoading" class="loader">
|
|
84
|
+
<i class="fa clr-tree-node-caret-icon spinner" />
|
|
85
|
+
<div v-if="props.loaderMessages.length" class="text">
|
|
86
|
+
<p v-for="message in props.loaderMessages" :key="message">
|
|
87
|
+
{{ message }}
|
|
88
|
+
</p>
|
|
89
|
+
</div>
|
|
90
|
+
</div>
|
|
91
|
+
</div>
|
|
92
|
+
<div class="modal-backdrop" />
|
|
93
|
+
</div>
|
|
94
|
+
</template>
|
|
95
|
+
|
|
96
|
+
<script setup lang="ts">
|
|
97
|
+
import type { UI_I_Localization } from '~/models/interfaces'
|
|
98
|
+
import type {
|
|
99
|
+
UI_I_WizardStep,
|
|
100
|
+
UI_I_WizardStepNavigation,
|
|
101
|
+
} from '~/components/atoms/wizard/models/interfaces'
|
|
102
|
+
import { UI_E_WIZARD_STATUS } from '~/components/atoms/wizard/models/enums'
|
|
103
|
+
|
|
104
|
+
const props = withDefaults(
|
|
105
|
+
defineProps<{
|
|
106
|
+
title: string
|
|
107
|
+
show: boolean
|
|
108
|
+
steps: UI_I_WizardStep[]
|
|
109
|
+
selectedScheme: number[]
|
|
110
|
+
isLoading?: boolean
|
|
111
|
+
loaderMessages?: string[]
|
|
112
|
+
isDisabledNext?: boolean
|
|
113
|
+
isDisabledFinish?: boolean
|
|
114
|
+
localization?: UI_I_Localization
|
|
115
|
+
testId?: string
|
|
116
|
+
wasCompleted: boolean
|
|
117
|
+
}>(),
|
|
118
|
+
{
|
|
119
|
+
isLoading: false,
|
|
120
|
+
loaderMessages: () => [],
|
|
121
|
+
isDisabledNext: false,
|
|
122
|
+
isDisabledFinish: false,
|
|
123
|
+
localization: () => ({}),
|
|
124
|
+
testId: '',
|
|
125
|
+
}
|
|
126
|
+
)
|
|
127
|
+
|
|
128
|
+
const emits = defineEmits<{
|
|
129
|
+
(event: 'submit'): void
|
|
130
|
+
(event: 'hide'): void
|
|
131
|
+
(event: 'change-steps', value: UI_I_WizardStep[]): void
|
|
132
|
+
}>()
|
|
133
|
+
|
|
134
|
+
const steps = ref<UI_I_WizardStep[]>(
|
|
135
|
+
useDeepCopy(
|
|
136
|
+
props.steps.filter((step: UI_I_WizardStep) =>
|
|
137
|
+
props.selectedScheme.includes(step.id)
|
|
138
|
+
)
|
|
139
|
+
)
|
|
140
|
+
)
|
|
141
|
+
|
|
142
|
+
const onHide = (): void => {
|
|
143
|
+
emits('hide')
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
const isSelected = (status: UI_E_WIZARD_STATUS): boolean =>
|
|
147
|
+
status === UI_E_WIZARD_STATUS.SELECTED ||
|
|
148
|
+
status === UI_E_WIZARD_STATUS.INVALID_SELECTED
|
|
149
|
+
|
|
150
|
+
const isLastStep = computed<boolean>(() => {
|
|
151
|
+
const lastStepStatus = steps.value[steps.value.length - 1].status
|
|
152
|
+
return isSelected(lastStepStatus)
|
|
153
|
+
})
|
|
154
|
+
|
|
155
|
+
const isFirstStep = computed<boolean>(() => {
|
|
156
|
+
const firstStepStatus = steps.value[0].status
|
|
157
|
+
return isSelected(firstStepStatus)
|
|
158
|
+
})
|
|
159
|
+
|
|
160
|
+
const selectedStep = computed<UI_I_WizardStep>(
|
|
161
|
+
() =>
|
|
162
|
+
steps.value.find((step: UI_I_WizardStep) => isSelected(step.status)) ||
|
|
163
|
+
steps.value[0]
|
|
164
|
+
)
|
|
165
|
+
|
|
166
|
+
const onSelectStep = (step: UI_I_WizardStepNavigation): void => {
|
|
167
|
+
const index = steps.value.findIndex(
|
|
168
|
+
(st: UI_I_WizardStep) => st.id === step.id
|
|
169
|
+
)
|
|
170
|
+
const indexInactive = steps.value.findIndex(
|
|
171
|
+
(st: UI_I_WizardStep) => st.status === UI_E_WIZARD_STATUS.INACTIVE
|
|
172
|
+
)
|
|
173
|
+
|
|
174
|
+
const newSteps = steps.value.map((st: UI_I_WizardStep, i: number) => {
|
|
175
|
+
if (!st.isValid && index === i)
|
|
176
|
+
return { ...st, status: UI_E_WIZARD_STATUS.INVALID_SELECTED }
|
|
177
|
+
|
|
178
|
+
if (index === i) return { ...st, status: UI_E_WIZARD_STATUS.SELECTED }
|
|
179
|
+
|
|
180
|
+
if (!st.isValid && index !== i)
|
|
181
|
+
return { ...st, status: UI_E_WIZARD_STATUS.INVALID }
|
|
182
|
+
|
|
183
|
+
// If current step is before first inactive, and it is not to be selected or hasn't inactive index, and it is last step, but it is not to be selected, set it as active
|
|
184
|
+
if (
|
|
185
|
+
(indexInactive - 1 === i && index !== indexInactive - 1) ||
|
|
186
|
+
(indexInactive < 0 && steps.value.length - 1 === i && index !== i)
|
|
187
|
+
)
|
|
188
|
+
return { ...st, status: UI_E_WIZARD_STATUS.ACTIVE }
|
|
189
|
+
|
|
190
|
+
if (index !== i && st.status !== UI_E_WIZARD_STATUS.INACTIVE)
|
|
191
|
+
return { ...st, status: UI_E_WIZARD_STATUS.COMPLETED }
|
|
192
|
+
|
|
193
|
+
return st
|
|
194
|
+
})
|
|
195
|
+
|
|
196
|
+
emits('change-steps', newSteps)
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
const onNextStep = (): void => {
|
|
200
|
+
const currentStepIndex: number = steps.value.findIndex(
|
|
201
|
+
(st: UI_I_WizardStep) => isSelected(st.status)
|
|
202
|
+
)
|
|
203
|
+
const stepIndex: number = currentStepIndex + 1
|
|
204
|
+
const step: UI_I_WizardStep = steps.value[stepIndex]
|
|
205
|
+
|
|
206
|
+
if (!step) return
|
|
207
|
+
|
|
208
|
+
const index = steps.value.findIndex(
|
|
209
|
+
(st: UI_I_WizardStep) => st.id === step.id
|
|
210
|
+
)
|
|
211
|
+
|
|
212
|
+
const newSteps = steps.value.map((st: UI_I_WizardStep, i: number) => {
|
|
213
|
+
if (!st.isValid && index === i)
|
|
214
|
+
return { ...st, status: UI_E_WIZARD_STATUS.INVALID_SELECTED }
|
|
215
|
+
|
|
216
|
+
if (!st.isValid && index !== i)
|
|
217
|
+
return { ...st, status: UI_E_WIZARD_STATUS.INVALID }
|
|
218
|
+
|
|
219
|
+
const indexInactive = steps.value.findIndex(
|
|
220
|
+
(st: UI_I_WizardStep) => st.status === UI_E_WIZARD_STATUS.INACTIVE
|
|
221
|
+
)
|
|
222
|
+
|
|
223
|
+
// If current step is not equal selected step, and it is not inactive or active, set it as completed
|
|
224
|
+
if (
|
|
225
|
+
index !== i &&
|
|
226
|
+
st.status !== UI_E_WIZARD_STATUS.INACTIVE &&
|
|
227
|
+
st.status !== UI_E_WIZARD_STATUS.ACTIVE
|
|
228
|
+
)
|
|
229
|
+
return { ...st, status: UI_E_WIZARD_STATUS.COMPLETED }
|
|
230
|
+
|
|
231
|
+
if (index === i) {
|
|
232
|
+
return { ...st, status: UI_E_WIZARD_STATUS.SELECTED }
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
if (stepIndex !== indexInactive && indexInactive - 1 === i)
|
|
236
|
+
return { ...st, status: UI_E_WIZARD_STATUS.ACTIVE }
|
|
237
|
+
|
|
238
|
+
return st
|
|
239
|
+
})
|
|
240
|
+
|
|
241
|
+
emits('change-steps', newSteps)
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
const onPreviousStep = (): void => {
|
|
245
|
+
const currentStepIndex: number = steps.value.findIndex(
|
|
246
|
+
(st: UI_I_WizardStep) => isSelected(st.status)
|
|
247
|
+
)
|
|
248
|
+
const stepIndex: number = currentStepIndex - 1
|
|
249
|
+
const step: UI_I_WizardStep = steps.value[stepIndex]
|
|
250
|
+
|
|
251
|
+
const indexInactive = steps.value.findIndex(
|
|
252
|
+
(st: UI_I_WizardStep) => st.status === UI_E_WIZARD_STATUS.INACTIVE
|
|
253
|
+
)
|
|
254
|
+
|
|
255
|
+
if (!step) return
|
|
256
|
+
const index = steps.value.findIndex(
|
|
257
|
+
(st: UI_I_WizardStep) => st.title === step.title
|
|
258
|
+
)
|
|
259
|
+
|
|
260
|
+
const newSteps = steps.value.map((st: UI_I_WizardStep, i: number) => {
|
|
261
|
+
if (!st.isValid && index === i)
|
|
262
|
+
return { ...st, status: UI_E_WIZARD_STATUS.INVALID_SELECTED }
|
|
263
|
+
|
|
264
|
+
if (index === i) return { ...st, status: UI_E_WIZARD_STATUS.SELECTED }
|
|
265
|
+
|
|
266
|
+
if (!st.isValid && index !== i)
|
|
267
|
+
return { ...st, status: UI_E_WIZARD_STATUS.INVALID }
|
|
268
|
+
|
|
269
|
+
// If current step is before first inactive, and it is not to be selected or hasn't inactive index, and it is last step
|
|
270
|
+
if (
|
|
271
|
+
(indexInactive - 1 === i && index !== indexInactive - 1) ||
|
|
272
|
+
(indexInactive < 0 && steps.value.length - 1 === i)
|
|
273
|
+
)
|
|
274
|
+
return { ...st, status: UI_E_WIZARD_STATUS.ACTIVE }
|
|
275
|
+
|
|
276
|
+
if (index !== i && st.status !== UI_E_WIZARD_STATUS.INACTIVE)
|
|
277
|
+
return { ...st, status: UI_E_WIZARD_STATUS.COMPLETED }
|
|
278
|
+
|
|
279
|
+
return st
|
|
280
|
+
})
|
|
281
|
+
|
|
282
|
+
emits('change-steps', newSteps)
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
watch(
|
|
286
|
+
() => props.selectedScheme,
|
|
287
|
+
(newValue: number[]) => {
|
|
288
|
+
steps.value = props.steps.filter((step: UI_I_WizardStep) =>
|
|
289
|
+
newValue.includes(step.id)
|
|
290
|
+
)
|
|
291
|
+
},
|
|
292
|
+
{ deep: true, immediate: true }
|
|
293
|
+
)
|
|
294
|
+
watch(
|
|
295
|
+
() => props.steps,
|
|
296
|
+
(newValue: UI_I_WizardStep[]) => {
|
|
297
|
+
steps.value = newValue.filter((step: UI_I_WizardStep) =>
|
|
298
|
+
props.selectedScheme.includes(step.id)
|
|
299
|
+
)
|
|
300
|
+
},
|
|
301
|
+
{ deep: true, immediate: true }
|
|
302
|
+
)
|
|
303
|
+
</script>
|
|
304
|
+
|
|
305
|
+
<style scoped lang="scss">
|
|
306
|
+
.modal {
|
|
307
|
+
position: fixed;
|
|
308
|
+
top: 0;
|
|
309
|
+
bottom: 0;
|
|
310
|
+
right: 0;
|
|
311
|
+
left: 0;
|
|
312
|
+
z-index: 1050;
|
|
313
|
+
display: flex;
|
|
314
|
+
flex-direction: column;
|
|
315
|
+
justify-content: center;
|
|
316
|
+
align-items: center;
|
|
317
|
+
padding: 48px;
|
|
318
|
+
overflow-y: auto;
|
|
319
|
+
|
|
320
|
+
.modal-nav {
|
|
321
|
+
background-color: var(--block-view-bg-color4);
|
|
322
|
+
.clr-wizard-title {
|
|
323
|
+
color: var(--main-color-mode);
|
|
324
|
+
font-size: 22px;
|
|
325
|
+
padding: 24px 12px 24px 24px;
|
|
326
|
+
//line-height: 1.2rem;
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
.modal-content-wrapper {
|
|
331
|
+
position: relative;
|
|
332
|
+
-webkit-animation-name: animateTop;
|
|
333
|
+
-webkit-animation-duration: 0.4s;
|
|
334
|
+
animation-name: animateTop;
|
|
335
|
+
animation-duration: 0.4s;
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
.modal-content {
|
|
339
|
+
background-color: var(--modal-bg-color);
|
|
340
|
+
|
|
341
|
+
.modal-header--accessible {
|
|
342
|
+
display: flex;
|
|
343
|
+
justify-content: space-between;
|
|
344
|
+
align-items: flex-start;
|
|
345
|
+
width: 100%;
|
|
346
|
+
padding: 24px 19px 6px 24px;
|
|
347
|
+
|
|
348
|
+
.modal-title-text {
|
|
349
|
+
color: var(--main-color-mode);
|
|
350
|
+
font-size: 22px;
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
.close-icon {
|
|
354
|
+
fill: var(--close-icon);
|
|
355
|
+
width: 24px;
|
|
356
|
+
height: 24px;
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
.modal-body {
|
|
361
|
+
padding: 0 3px;
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
.modal-footer {
|
|
365
|
+
display: flex;
|
|
366
|
+
justify-content: flex-end;
|
|
367
|
+
padding: 24px;
|
|
368
|
+
flex: unset;
|
|
369
|
+
min-height: 0;
|
|
370
|
+
height: auto;
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
.loader {
|
|
375
|
+
position: absolute;
|
|
376
|
+
z-index: 1000;
|
|
377
|
+
left: 0;
|
|
378
|
+
right: 0;
|
|
379
|
+
bottom: 0;
|
|
380
|
+
top: 0;
|
|
381
|
+
display: flex;
|
|
382
|
+
align-items: center;
|
|
383
|
+
justify-content: center;
|
|
384
|
+
background-color: rgba(0, 0, 0, 0.3);
|
|
385
|
+
|
|
386
|
+
.spinner {
|
|
387
|
+
left: unset;
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
.text {
|
|
391
|
+
position: absolute;
|
|
392
|
+
top: calc(40% + 75px);
|
|
393
|
+
text-align: center;
|
|
394
|
+
background-color: rgba(0, 0, 0, 0.3);
|
|
395
|
+
padding: 5px 10px;
|
|
396
|
+
border-radius: 3px;
|
|
397
|
+
|
|
398
|
+
p {
|
|
399
|
+
color: white;
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
.modal-backdrop {
|
|
405
|
+
opacity: 1;
|
|
406
|
+
background-color: rgba(0, 0, 0, 0.6);
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
h1,
|
|
410
|
+
h2 {
|
|
411
|
+
// просмотреть если нигде не ломается переместит глобально
|
|
412
|
+
line-height: inherit;
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
.content-heading {
|
|
416
|
+
display: flex;
|
|
417
|
+
justify-content: space-between;
|
|
418
|
+
align-items: flex-start;
|
|
419
|
+
border-bottom: 1px solid #a6a6a6;
|
|
420
|
+
|
|
421
|
+
& > div h2 {
|
|
422
|
+
font-weight: 400;
|
|
423
|
+
font-size: 13px;
|
|
424
|
+
line-height: inherit;
|
|
425
|
+
color: var(--add-vm-context-sub-title);
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
:root.dark-theme {
|
|
430
|
+
.loader .text {
|
|
431
|
+
position: absolute;
|
|
432
|
+
top: calc(40% + 75px);
|
|
433
|
+
text-align: center;
|
|
434
|
+
background-color: rgba(250, 250, 250, 0.5);
|
|
435
|
+
padding: 5px 10px;
|
|
436
|
+
border-radius: 5px;
|
|
437
|
+
|
|
438
|
+
p {
|
|
439
|
+
color: black;
|
|
440
|
+
}
|
|
441
|
+
}
|
|
442
|
+
}
|
|
443
|
+
</style>
|