bfg-common 1.2.203 → 1.2.205
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 +4 -1
- package/assets/localization/local_en.json +4 -1
- package/assets/localization/local_hy.json +4 -1
- package/assets/localization/local_kk.json +4 -1
- package/assets/localization/local_ru.json +4 -1
- package/assets/localization/local_zh.json +4 -1
- package/components/atoms/wizard/Wizard.vue +443 -443
- package/components/atoms/wizard/utils/utils.ts +52 -0
- package/components/common/vm/actions/add/Add.vue +569 -569
- package/components/common/vm/actions/add/utils.ts +238 -238
- package/components/common/vm/actions/addOld/Add.vue +690 -690
- package/components/common/vm/actions/common/select/name/NameOld.vue +215 -215
- package/components/common/vm/actions/common/select/storage/StorageOld.vue +194 -194
- package/package.json +1 -1
|
@@ -483,4 +483,56 @@ export default class Wizard {
|
|
|
483
483
|
getStepIdByFieldName(fieldName: string): number {
|
|
484
484
|
return this.steps.find((step) => step.fields[fieldName])?.id || -1
|
|
485
485
|
}
|
|
486
|
+
|
|
487
|
+
setDynamicValidationField(fieldName: string | string[]): void {
|
|
488
|
+
const fields: {
|
|
489
|
+
[key: string]: UI_I_ErrorFields
|
|
490
|
+
} = this.steps[this.selectedStepId].fields
|
|
491
|
+
|
|
492
|
+
if (typeof fieldName === 'string') {
|
|
493
|
+
fields[fieldName] = {
|
|
494
|
+
alert: '',
|
|
495
|
+
field: '',
|
|
496
|
+
}
|
|
497
|
+
} else {
|
|
498
|
+
fieldName.forEach((name: string) => {
|
|
499
|
+
fields[name] = {
|
|
500
|
+
alert: '',
|
|
501
|
+
field: '',
|
|
502
|
+
}
|
|
503
|
+
})
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
this.steps = this.steps.map((step: UI_I_WizardStep) =>
|
|
507
|
+
step.id === this.selectedStepId
|
|
508
|
+
? {
|
|
509
|
+
...step,
|
|
510
|
+
fields,
|
|
511
|
+
}
|
|
512
|
+
: step
|
|
513
|
+
)
|
|
514
|
+
}
|
|
515
|
+
|
|
516
|
+
removeDynamicValidationField(fieldName: string | string[]): void {
|
|
517
|
+
const newFields: {
|
|
518
|
+
[key: string]: UI_I_ErrorFields
|
|
519
|
+
} = this.steps[this.selectedStepId].fields
|
|
520
|
+
|
|
521
|
+
if (typeof fieldName === 'string') {
|
|
522
|
+
delete newFields[fieldName]
|
|
523
|
+
} else {
|
|
524
|
+
fieldName.forEach((name: string) => {
|
|
525
|
+
delete newFields[name]
|
|
526
|
+
})
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
this.steps = this.steps.map((step: UI_I_WizardStep) =>
|
|
530
|
+
step.id === this.selectedStepId
|
|
531
|
+
? {
|
|
532
|
+
...step,
|
|
533
|
+
fields: newFields,
|
|
534
|
+
}
|
|
535
|
+
: step
|
|
536
|
+
)
|
|
537
|
+
}
|
|
486
538
|
}
|