bfg-common 1.4.827 → 1.4.829
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 +3 -1
- package/assets/localization/local_en.json +3 -1
- package/assets/localization/local_hy.json +3 -1
- package/assets/localization/local_kk.json +3 -1
- package/assets/localization/local_ru.json +3 -1
- package/assets/localization/local_zh.json +3 -1
- package/components/atoms/dropdown/dropdown/Dropdown.vue +12 -0
- package/components/common/modals/confirmByInput/ConfirmByInput.vue +7 -0
- package/components/common/modals/confirmByInput/ConfirmByInputNew.vue +46 -4
- package/components/common/modals/confirmByInput/ConfirmByInputOld.vue +10 -7
- package/package.json +1 -1
|
@@ -2313,7 +2313,9 @@
|
|
|
2313
2313
|
"editPermission": "Дазвол на рэдагаванне",
|
|
2314
2314
|
"userGroupNameIsInvalid": "Няправільнае імя карыстальніка ці групы!",
|
|
2315
2315
|
"submit": "Падпарадкоўвацца",
|
|
2316
|
-
"up": "Наверсе"
|
|
2316
|
+
"up": "Наверсе",
|
|
2317
|
+
"speed": "Speed",
|
|
2318
|
+
"incorrectConfirmation": "Няправільнае пацверджанне. Калі ласка, увядзіце \" {0}\", каб працягнуць."
|
|
2317
2319
|
},
|
|
2318
2320
|
"auth": {
|
|
2319
2321
|
"welcomeTo": "Сардэчна запрашаем у",
|
|
@@ -2317,7 +2317,9 @@
|
|
|
2317
2317
|
"editPermission": "Edit Permission",
|
|
2318
2318
|
"userGroupNameIsInvalid": "User or group name is invalid!",
|
|
2319
2319
|
"submit": "Submit",
|
|
2320
|
-
"up": "Up"
|
|
2320
|
+
"up": "Up",
|
|
2321
|
+
"speed": "Speed",
|
|
2322
|
+
"incorrectConfirmation": "Incorrect confirmation. Please type “{0}” to proceed."
|
|
2321
2323
|
},
|
|
2322
2324
|
"auth": {
|
|
2323
2325
|
"welcomeTo": "Welcome to",
|
|
@@ -2317,7 +2317,9 @@
|
|
|
2317
2317
|
"editPermission": "Խմբագրել թույլտվությունը",
|
|
2318
2318
|
"userGroupNameIsInvalid": "Սխալ օգտվողի անուն կամ խումբ",
|
|
2319
2319
|
"submit": "Ներկայացնել",
|
|
2320
|
-
"up": "Վեր"
|
|
2320
|
+
"up": "Վեր",
|
|
2321
|
+
"speed": "Speed",
|
|
2322
|
+
"incorrectConfirmation": "Սխալ հաստատում: Շարունակելու համար խնդրում ենք մուտքագրել \" {0}\":"
|
|
2321
2323
|
},
|
|
2322
2324
|
"auth": {
|
|
2323
2325
|
"welcomeTo": "Բարի գալուստ",
|
|
@@ -2316,7 +2316,9 @@
|
|
|
2316
2316
|
"editPermission": "Рұқсатты Өңдеу",
|
|
2317
2317
|
"userGroupNameIsInvalid": "Пайдаланушы немесе топ атауы жарамсыз!",
|
|
2318
2318
|
"submit": "Бағыну",
|
|
2319
|
-
"up": "Бойымен"
|
|
2319
|
+
"up": "Бойымен",
|
|
2320
|
+
"speed": "Speed",
|
|
2321
|
+
"incorrectConfirmation": "Қате растау. Жалғастыру үшін \"{0}\" теріңіз."
|
|
2320
2322
|
},
|
|
2321
2323
|
"auth": {
|
|
2322
2324
|
"welcomeTo": "Қош келдіңіз",
|
|
@@ -2318,7 +2318,9 @@
|
|
|
2318
2318
|
"editPermission": "Редактирование разрешения",
|
|
2319
2319
|
"userGroupNameIsInvalid": "Неверное имя пользователя или группы!",
|
|
2320
2320
|
"submit": "Представлять на рассмотрение",
|
|
2321
|
-
"up": "Вверх"
|
|
2321
|
+
"up": "Вверх",
|
|
2322
|
+
"speed": "Speed",
|
|
2323
|
+
"incorrectConfirmation": "Неверное подтверждение. Пожалуйста, введите “{0}”, чтобы продолжить."
|
|
2322
2324
|
},
|
|
2323
2325
|
"auth": {
|
|
2324
2326
|
"welcomeTo": "Добро пожаловать в",
|
|
@@ -2315,7 +2315,9 @@
|
|
|
2315
2315
|
"editPermission": "编辑权限",
|
|
2316
2316
|
"userGroupNameIsInvalid": "用户或组名无效!",
|
|
2317
2317
|
"submit": "提交",
|
|
2318
|
-
"up": "向上"
|
|
2318
|
+
"up": "向上",
|
|
2319
|
+
"speed": "Speed",
|
|
2320
|
+
"incorrectConfirmation": "不正确的确认。 请输入\"{0}\"继续。"
|
|
2319
2321
|
},
|
|
2320
2322
|
"auth": {
|
|
2321
2323
|
"welcomeTo": "欢迎来到",
|
|
@@ -78,6 +78,16 @@ const ignoreElRef = ref<Event | null>(null)
|
|
|
78
78
|
const onClickOutsideHandler = [hide, { ignore: [ignoreElRef] }]
|
|
79
79
|
</script>
|
|
80
80
|
|
|
81
|
+
<style>
|
|
82
|
+
:root {
|
|
83
|
+
--dropdown-position-left: auto;
|
|
84
|
+
--dropdown-position-right: 0;
|
|
85
|
+
}
|
|
86
|
+
:root[dir='rtl'] {
|
|
87
|
+
--dropdown-position-left: 0;
|
|
88
|
+
--dropdown-position-right: auto;
|
|
89
|
+
}
|
|
90
|
+
</style>
|
|
81
91
|
<style scoped lang="scss">
|
|
82
92
|
.dropdown {
|
|
83
93
|
height: 100%;
|
|
@@ -127,6 +137,8 @@ const onClickOutsideHandler = [hide, { ignore: [ignoreElRef] }]
|
|
|
127
137
|
background-color: var(--dropdown-bg-color);
|
|
128
138
|
border-color: var(--block-border-color);
|
|
129
139
|
z-index: 10000;
|
|
140
|
+
left: var(--dropdown-position-left);
|
|
141
|
+
right: var(--dropdown-position-right);
|
|
130
142
|
|
|
131
143
|
.dropdown-item {
|
|
132
144
|
font-size: 0.7rem;
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<common-modals-confirm-by-input-new
|
|
3
3
|
v-if="isNewViewLocal"
|
|
4
|
+
v-model="confirmationForm"
|
|
5
|
+
:title="props.title"
|
|
6
|
+
:description="props.description"
|
|
7
|
+
:sub-title="props.subTitle"
|
|
4
8
|
:modal-texts="props.modalTexts"
|
|
5
9
|
:test-id="props.testId"
|
|
6
10
|
@hide="emits('hide')"
|
|
@@ -8,6 +12,7 @@
|
|
|
8
12
|
/>
|
|
9
13
|
<common-modals-confirm-by-input-old
|
|
10
14
|
v-else
|
|
15
|
+
v-model="confirmationForm"
|
|
11
16
|
:title="props.title"
|
|
12
17
|
:sub-title="props.subTitle"
|
|
13
18
|
:test-id="props.testId"
|
|
@@ -30,6 +35,7 @@ const props = withDefaults(
|
|
|
30
35
|
defineProps<{
|
|
31
36
|
isNewView?: boolean
|
|
32
37
|
title?: string
|
|
38
|
+
description?: string
|
|
33
39
|
subTitle?: string
|
|
34
40
|
testId?: string
|
|
35
41
|
loading?: boolean
|
|
@@ -39,6 +45,7 @@ const props = withDefaults(
|
|
|
39
45
|
{
|
|
40
46
|
isNewView: undefined,
|
|
41
47
|
title: '',
|
|
48
|
+
description: '',
|
|
42
49
|
subTitle: '',
|
|
43
50
|
testId: 'common-confirmation',
|
|
44
51
|
loading: false,
|
|
@@ -2,30 +2,52 @@
|
|
|
2
2
|
<ui-popup
|
|
3
3
|
:test-id="props.testId"
|
|
4
4
|
icon-name="info-status"
|
|
5
|
-
:title="props.headline"
|
|
6
5
|
:message="props.description"
|
|
7
6
|
:texts="modalTextsLocal"
|
|
8
7
|
@submit="onSubmit"
|
|
9
8
|
@hide="onHide"
|
|
10
|
-
|
|
9
|
+
>
|
|
10
|
+
<template #content>
|
|
11
|
+
<div class="ui-popup_body-content">
|
|
12
|
+
<span>{{ props.title }}</span>
|
|
13
|
+
<span>{{ props.description }}</span>
|
|
14
|
+
|
|
15
|
+
<ui-input
|
|
16
|
+
v-model="confirmationFormLocal"
|
|
17
|
+
:test-id="`${props.testId}-confirm-input`"
|
|
18
|
+
:placeholder="localization.vsphereNa.nodeIPAddress"
|
|
19
|
+
:error="confirmInputErrorText"
|
|
20
|
+
class="confirm-modal__input"
|
|
21
|
+
input-style="rounded"
|
|
22
|
+
size="md"
|
|
23
|
+
/>
|
|
24
|
+
</div>
|
|
25
|
+
</template>
|
|
26
|
+
</ui-popup>
|
|
11
27
|
</template>
|
|
12
28
|
|
|
13
29
|
<script setup lang="ts">
|
|
14
30
|
import type { UI_I_ModalTexts } from '~/node_modules/bfg-uikit/components/ui/modal/models/interfaces'
|
|
31
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
15
32
|
|
|
16
33
|
const props = defineProps<{
|
|
17
34
|
testId: string
|
|
18
|
-
|
|
35
|
+
title: string
|
|
19
36
|
description: string
|
|
37
|
+
subTitle: string
|
|
20
38
|
modalTexts: UI_I_ModalTexts
|
|
21
39
|
}>()
|
|
40
|
+
const confirmationFormLocal = defineModel<string>({ required: true })
|
|
22
41
|
const emits = defineEmits<{
|
|
23
42
|
(event: 'confirm'): void
|
|
24
43
|
(event: 'hide-modal'): void
|
|
25
44
|
}>()
|
|
26
45
|
|
|
46
|
+
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
47
|
+
|
|
27
48
|
const modalTextsLocal = computed<UI_I_ModalTexts>(() => props.modalTexts)
|
|
28
49
|
|
|
50
|
+
const confirmInputErrorText = computed(() => '')
|
|
29
51
|
const onHide = (): void => {
|
|
30
52
|
emits('hide-modal')
|
|
31
53
|
}
|
|
@@ -34,4 +56,24 @@ const onSubmit = (): void => {
|
|
|
34
56
|
}
|
|
35
57
|
</script>
|
|
36
58
|
|
|
37
|
-
<style scoped lang="scss"
|
|
59
|
+
<style scoped lang="scss">
|
|
60
|
+
.ui-popup_body-content {
|
|
61
|
+
padding: 16px 32px;
|
|
62
|
+
span {
|
|
63
|
+
display: block;
|
|
64
|
+
font-size: 14px;
|
|
65
|
+
font-weight: 400;
|
|
66
|
+
line-height: 16.94px;
|
|
67
|
+
text-align: center;
|
|
68
|
+
color: #9da6ad;
|
|
69
|
+
|
|
70
|
+
&:first-of-type {
|
|
71
|
+
font-size: 20px;
|
|
72
|
+
font-weight: 500;
|
|
73
|
+
line-height: 24.2px;
|
|
74
|
+
color: var(--modal-title);
|
|
75
|
+
margin-bottom: 8px;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
</style>
|
|
@@ -21,19 +21,22 @@
|
|
|
21
21
|
<slot name="content"></slot>
|
|
22
22
|
|
|
23
23
|
<div class="form-group">
|
|
24
|
-
<label class="no-selection" for="confirmation">
|
|
25
|
-
confirmationText
|
|
26
|
-
|
|
24
|
+
<label class="no-selection" for="confirmation">
|
|
25
|
+
{{ confirmationText }}
|
|
26
|
+
</label>
|
|
27
27
|
<div class="form-group__input">
|
|
28
28
|
<input
|
|
29
29
|
id="confirmation"
|
|
30
|
-
v-model="
|
|
30
|
+
v-model="confirmationFormLocal"
|
|
31
31
|
data-id="confirmation-input"
|
|
32
32
|
type="text"
|
|
33
33
|
autocomplete="off"
|
|
34
34
|
@keyup.enter="onConfirm"
|
|
35
35
|
/>
|
|
36
|
-
<div
|
|
36
|
+
<div
|
|
37
|
+
v-show="!isValid && confirmationFormLocal"
|
|
38
|
+
class="form-validate"
|
|
39
|
+
>
|
|
37
40
|
<atoms-tooltip :test-id="`${props.testId}-tooltip`">
|
|
38
41
|
<template #elem>
|
|
39
42
|
<atoms-the-icon
|
|
@@ -95,6 +98,7 @@ const props = defineProps<{
|
|
|
95
98
|
width: string
|
|
96
99
|
loading?: boolean
|
|
97
100
|
}>()
|
|
101
|
+
const confirmationFormLocal = defineModel<string>({ required: true })
|
|
98
102
|
const emits = defineEmits<{
|
|
99
103
|
(event: 'confirm'): void
|
|
100
104
|
(event: 'hide'): void
|
|
@@ -102,9 +106,8 @@ const emits = defineEmits<{
|
|
|
102
106
|
|
|
103
107
|
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
104
108
|
|
|
105
|
-
const confirmationForm = ref<string>('')
|
|
106
109
|
const isValid = computed<boolean>(() => {
|
|
107
|
-
return
|
|
110
|
+
return confirmationFormLocal.value === props.subTitle
|
|
108
111
|
})
|
|
109
112
|
|
|
110
113
|
const confirmationText = localization.value.common.confirmDeletionInput.replace(
|