bfg-common 1.3.427 → 1.3.428
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.
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
:alert-messages="props.alertMessages"
|
|
7
7
|
:messages-fields="props.messagesFields"
|
|
8
8
|
@hide-alert="(e) => emits('hide-alert', e)"
|
|
9
|
-
@loading="(e) => emits('loading', e)"
|
|
10
9
|
/>
|
|
11
10
|
</div>
|
|
12
11
|
</template>
|
|
@@ -26,9 +25,7 @@ const props = defineProps<{
|
|
|
26
25
|
}>()
|
|
27
26
|
const model = defineModel<any>()
|
|
28
27
|
const emits = defineEmits<{
|
|
29
|
-
(event: 'loading', value: boolean): void
|
|
30
28
|
(event: 'hide-alert', value: number): void
|
|
31
|
-
(event: 'main-filter', value: string): void
|
|
32
29
|
}>()
|
|
33
30
|
|
|
34
31
|
const isShowCreateLocalNameBlock = computed<boolean>(
|
|
@@ -9,9 +9,9 @@
|
|
|
9
9
|
/>
|
|
10
10
|
|
|
11
11
|
<div class="clr-form-control clr-row">
|
|
12
|
-
<label for="datastore-name" class="clr-control-label clr-col-md-2">
|
|
13
|
-
localization.datastoreName
|
|
14
|
-
|
|
12
|
+
<label for="datastore-name" class="clr-control-label clr-col-md-2">
|
|
13
|
+
{{ localization.datastoreName }}
|
|
14
|
+
</label>
|
|
15
15
|
|
|
16
16
|
<div class="clr-control-container" :class="nameErrorText && 'clr-error'">
|
|
17
17
|
<div class="flex-align-center">
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
data-id="datastore-name-input"
|
|
22
22
|
type="text"
|
|
23
23
|
class="clr-input"
|
|
24
|
-
@blur="
|
|
25
|
-
@input="
|
|
24
|
+
@blur="initValidation(true)"
|
|
25
|
+
@input="initValidation"
|
|
26
26
|
/>
|
|
27
27
|
<atoms-the-icon class="error-icon" name="info-circle" />
|
|
28
28
|
</div>
|
|
@@ -36,15 +36,14 @@
|
|
|
36
36
|
</template>
|
|
37
37
|
|
|
38
38
|
<script lang="ts" setup>
|
|
39
|
-
import type { UI_I_ValidationTouchResult } from '~/lib/models/plugins/validation/interfaces'
|
|
40
39
|
import type {
|
|
41
40
|
UI_I_Localization,
|
|
42
41
|
UI_I_ArbitraryObject,
|
|
43
42
|
} from '~/lib/models/interfaces'
|
|
44
|
-
import type {
|
|
43
|
+
import type { UI_I_ValidationTouchResult } from '~/lib/models/plugins/validation/interfaces'
|
|
45
44
|
import type { UI_I_ErrorFields } from '~/components/atoms/wizard/lib/models/interfaces'
|
|
46
|
-
import {
|
|
47
|
-
|
|
45
|
+
import type { UI_I_FormValidationDataStore } from '~/components/common/wizards/datastoreNew/add/sharedStorm/deviceSelection/lib/models/interfaces'
|
|
46
|
+
import { defaultFormFunc } from '~/components/common/wizards/datastoreNew/add/local/createName/lib/config/defaultForm'
|
|
48
47
|
|
|
49
48
|
const props = defineProps<{
|
|
50
49
|
alertMessages: string[]
|
|
@@ -53,8 +52,6 @@ const props = defineProps<{
|
|
|
53
52
|
const createDatastoreNameLocal = defineModel<string>()
|
|
54
53
|
const emits = defineEmits<{
|
|
55
54
|
(event: 'hide-alert', value: number): void
|
|
56
|
-
(event: 'loading', value: boolean): void
|
|
57
|
-
(event: 'submit', value: string): void
|
|
58
55
|
}>()
|
|
59
56
|
|
|
60
57
|
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
@@ -76,40 +73,18 @@ const validForm = ref<UI_I_ValidationTouchResult | null>(null)
|
|
|
76
73
|
|
|
77
74
|
/* Validation for Name input */
|
|
78
75
|
const isInitNameValidation = ref<boolean>(false)
|
|
79
|
-
const
|
|
80
|
-
validForm.value = validation.touch()
|
|
81
|
-
isInitNameValidation.value = true
|
|
82
|
-
}
|
|
83
|
-
const onInputName = () => {
|
|
76
|
+
const initValidation = (onlyBlur = false): void => {
|
|
84
77
|
validForm.value = validation.touch()
|
|
78
|
+
onlyBlur && (isInitNameValidation.value = true)
|
|
85
79
|
}
|
|
86
80
|
const nameErrorText = computed<string>(() => {
|
|
81
|
+
if (props.messagesFields.datastoreName.field) {
|
|
82
|
+
return props.messagesFields.datastoreName.field
|
|
83
|
+
}
|
|
84
|
+
|
|
87
85
|
if (!isInitNameValidation.value) return ''
|
|
88
86
|
return validForm.value?.errors?.name?.[0] || ''
|
|
89
87
|
})
|
|
90
|
-
/* Validation Name input end */
|
|
91
|
-
// const submit = async (): Promise<void> => {
|
|
92
|
-
// const name = form.value.name.value
|
|
93
|
-
//
|
|
94
|
-
// if (!name) {
|
|
95
|
-
// validForm.value = validation.touch()
|
|
96
|
-
// isInitNameValidation.value = true
|
|
97
|
-
// if (nameErrorText.value) return
|
|
98
|
-
// }
|
|
99
|
-
//
|
|
100
|
-
// if (name) {
|
|
101
|
-
// emits('loading', true)
|
|
102
|
-
//
|
|
103
|
-
// const { valid } = await checkValidityName(name)
|
|
104
|
-
//
|
|
105
|
-
// emits('loading', false)
|
|
106
|
-
//
|
|
107
|
-
// if (!valid) {
|
|
108
|
-
// return
|
|
109
|
-
// }
|
|
110
|
-
// }
|
|
111
|
-
// emits('submit', name)
|
|
112
|
-
// }
|
|
113
88
|
|
|
114
89
|
const onHideAlert = (): void => {
|
|
115
90
|
emits('hide-alert', 1)
|