bfg-common 1.5.75 → 1.5.77

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.
Files changed (37) hide show
  1. package/components/common/wizards/datastore/add/Add.vue +1 -1
  2. package/components/common/wizards/datastore/add/New.vue +20 -40
  3. package/components/common/wizards/datastore/add/Old.vue +29 -29
  4. package/components/common/wizards/datastore/add/lib/config/steps.ts +23 -19
  5. package/components/common/wizards/datastore/add/lib/models/types.ts +2 -2
  6. package/components/common/wizards/datastore/add/nfs/Nfs.vue +0 -5
  7. package/components/common/wizards/datastore/add/sharedStorm/SharedStorm.vue +0 -14
  8. package/components/common/wizards/datastore/add/steps/_kerberosAuthentication/KerberosAuthentication.vue +1 -0
  9. package/components/common/wizards/datastore/add/steps/_local/Local.vue +2 -1
  10. package/components/common/wizards/datastore/add/{nfs/version/Version.vue → steps/_nfsVersion/NfsVersion.vue} +1 -0
  11. package/components/common/wizards/datastore/add/steps/_partitionConfiguration/PartitionConfiguration.vue +245 -0
  12. package/components/common/wizards/datastore/add/steps/_partitionConfiguration/graphicTooltip/graphicTooltip.vue +64 -0
  13. package/components/common/wizards/datastore/add/steps/_partitionConfiguration/lib/config/selectOptions.ts +46 -0
  14. package/components/common/wizards/datastore/add/steps/_partitionConfiguration/sizeGraphic/sizeGraphic.vue +225 -0
  15. package/components/common/wizards/datastore/add/steps/hostAccessibility/HostAccessibility.vue +60 -0
  16. package/components/common/wizards/datastore/add/steps/hostAccessibility/HostAccessibilityNew.vue +27 -0
  17. package/components/common/wizards/datastore/add/steps/hostAccessibility/HostAccessibilityOld.vue +60 -0
  18. package/components/common/wizards/datastore/add/steps/hostAccessibility/lib/config/tabsPannel.ts +31 -0
  19. package/components/common/wizards/datastore/add/steps/hostAccessibility/lib/models/interfaces.ts +9 -0
  20. package/components/common/wizards/datastore/add/steps/hostAccessibility/lib/models/types.ts +5 -0
  21. package/components/common/wizards/datastore/add/steps/hostAccessibility/tablesView/TablesView.vue +85 -0
  22. package/components/common/wizards/datastore/add/steps/hostAccessibility/tablesView/lib/config/compatibleTable.ts +62 -0
  23. package/components/common/wizards/datastore/add/steps/hostAccessibility/tablesView/lib/config/incompatibleTable.ts +68 -0
  24. package/components/common/wizards/datastore/add/steps/hostAccessibility/tablesView/lib/config/tableKeys.ts +15 -0
  25. package/components/common/wizards/datastore/add/steps/hostAccessibility/tablesView/lib/models/interfaces.ts +11 -0
  26. package/components/common/wizards/datastore/add/steps/nameAndConfigure/NameAndConfigure.vue +237 -0
  27. package/components/common/wizards/datastore/add/steps/nameAndConfigure/NameAndConfigureNew.vue +30 -0
  28. package/components/common/wizards/datastore/add/steps/nameAndConfigure/NameAndConfigureOld.vue +237 -0
  29. package/components/common/wizards/datastore/add/steps/nameAndConfigure/_serversList/DeletePopover.vue +100 -0
  30. package/components/common/wizards/datastore/add/steps/nameAndConfigure/_serversList/ServersList.vue +123 -0
  31. package/components/common/wizards/datastore/add/steps/nameAndConfigure/_serversList/lib/config/serversListConfig.ts +40 -0
  32. package/components/common/wizards/datastore/add/steps/nameAndConfigure/_serversList/lib/config/tableKeys.ts +3 -0
  33. package/components/common/wizards/datastore/add/steps/nameAndConfigure/_serversList/lib/models/interfaces.ts +3 -0
  34. package/components/common/wizards/datastore/add/steps/nameAndConfigure/_serversList/lib/models/types.ts +1 -0
  35. package/components/common/wizards/datastore/add/steps/nameAndConfigure/lib/models/interfaces.ts +5 -0
  36. package/package.json +1 -1
  37. /package/components/common/wizards/datastore/add/{nfs/version → steps/_nfsVersion}/lib/config/versionOptions.ts +0 -0
@@ -0,0 +1,68 @@
1
+ import type {
2
+ UI_I_HeadItem,
3
+ UI_I_BodyItem,
4
+ } from '~/components/atoms/table/dataGrid/lib/models/interfaces'
5
+ import type { UI_I_Localization } from '~/lib/models/interfaces'
6
+ import type { I_IncompatibleHostsTable } from '~/components/common/wizards/datastore/add/nfs/accessibility/lib/models/interfaces'
7
+ import { E_NodeIconsByState } from '~/lib/models/enums'
8
+ import { incompatibleHostsTableKeys } from '~/components/common/wizards/datastore/add/nfs/accessibility/tablesView/lib/config/tableKeys'
9
+ import { constructHeadItem } from '~/components/atoms/table/dataGrid/lib/utils/constructDataTable'
10
+
11
+ const getItems = (
12
+ localization: UI_I_Localization
13
+ ): [string, boolean, string, string][] => {
14
+ return [
15
+ [localization.common.host, true, 'auto', incompatibleHostsTableKeys[0]],
16
+ [
17
+ localization.common.hostIncompatibilityReason,
18
+ true,
19
+ 'auto',
20
+ incompatibleHostsTableKeys[1],
21
+ ],
22
+ [localization.common.cluster, true, 'auto', incompatibleHostsTableKeys[2]],
23
+ ]
24
+ }
25
+
26
+ export const headItems = (localization: UI_I_Localization): UI_I_HeadItem[] => {
27
+ const result: UI_I_HeadItem[] = []
28
+ getItems(localization).forEach((item, i) => {
29
+ const col = i === 0 || i === 2 ? 'icon' : `col${i}`
30
+ result.push(constructHeadItem(col, item[0], item[3], false, item[2]))
31
+ })
32
+ return result
33
+ }
34
+
35
+ export const bodyItems = (
36
+ data: I_IncompatibleHostsTable[]
37
+ ): UI_I_BodyItem[][] => {
38
+ const bodyItems: UI_I_BodyItem[][] = []
39
+ data.forEach((item: I_IncompatibleHostsTable, key) => {
40
+ const hostData = {
41
+ iconClassName: E_NodeIconsByState.host_Normal,
42
+ }
43
+ const clusterData = {
44
+ iconClassName: E_NodeIconsByState.host_Normal,
45
+ }
46
+
47
+ bodyItems.push([
48
+ {
49
+ key: 'icon',
50
+ text: item[incompatibleHostsTableKeys[0]],
51
+ data: hostData,
52
+ id: key,
53
+ },
54
+ {
55
+ key: 'col1',
56
+ text: item[incompatibleHostsTableKeys[1]],
57
+ id: key,
58
+ },
59
+ {
60
+ key: 'icon',
61
+ text: item[incompatibleHostsTableKeys[2]],
62
+ data: clusterData,
63
+ id: key,
64
+ },
65
+ ])
66
+ })
67
+ return bodyItems
68
+ }
@@ -0,0 +1,15 @@
1
+ import type {
2
+ T_CompatibleHostsTableKeys,
3
+ T_IncompatibleHostsTableKeys,
4
+ } from '~/components/common/wizards/datastore/add/nfs/accessibility/lib/models/types'
5
+
6
+ export const compatibleHostsTableKeys: T_CompatibleHostsTableKeys[] = [
7
+ 'host',
8
+ 'cluster',
9
+ ]
10
+
11
+ export const incompatibleHostsTableKeys: T_IncompatibleHostsTableKeys[] = [
12
+ 'host',
13
+ 'cluster',
14
+ 'host_incompatibility_reason',
15
+ ]
@@ -0,0 +1,11 @@
1
+ import type { API_UI_I_DataTable } from '~/lib/models/table/interfaces'
2
+
3
+ export interface UI_I_CompatibleHostsTableItem {
4
+ id: string
5
+ host: string
6
+ cluster: string
7
+ state: 0 | 1 | 2 | 3
8
+ }
9
+
10
+ export interface UI_I_CreateDatastoreHosts
11
+ extends API_UI_I_DataTable<UI_I_CompatibleHostsTableItem[]> {}
@@ -0,0 +1,237 @@
1
+ <template>
2
+ <div class="configuration">
3
+ <div>
4
+ <atoms-alert
5
+ v-show="props.alertMessages?.length"
6
+ test-id="configure-error-alert"
7
+ status="alert-danger"
8
+ :items="props.alertMessages"
9
+ @remove="onHideAlert"
10
+ />
11
+
12
+ <atoms-alert
13
+ v-show="alertInfo"
14
+ test-id="configure-information-alert"
15
+ status="alert-info"
16
+ :items="[localization.common.nameAndConfigurationAlertInfo]"
17
+ @remove="alertInfo = false"
18
+ />
19
+ <h6 class="nd-mt-0">{{ localization.common.nfsShareDetails }}</h6>
20
+
21
+ <div class="clr-form-control clr-row">
22
+ <label for="" class="clr-control-label clr-col-md-2">
23
+ {{ localization.common.name }}
24
+ </label>
25
+
26
+ <div
27
+ class="clr-control-container"
28
+ :class="nameErrorText && 'clr-error'"
29
+ >
30
+ <div class="flex-align-center">
31
+ <input
32
+ id="configuration-name-input"
33
+ v-model="model.name"
34
+ data-id="configuration-name-input"
35
+ type="text"
36
+ class="clr-input"
37
+ @blur="initValidation(true, ['name'])"
38
+ @input="initValidation(false, ['name'])"
39
+ />
40
+ <atoms-the-icon class="error-icon" name="info-circle" />
41
+ </div>
42
+
43
+ <div class="clr-subtext" data-id="nfs-datastore-name-field-require">
44
+ {{ nameErrorText }}
45
+ </div>
46
+ </div>
47
+ </div>
48
+
49
+ <div class="clr-form-control clr-row">
50
+ <label class="clr-control-label clr-col-md-2">
51
+ {{ localization.common.folder }}
52
+ </label>
53
+
54
+ <div
55
+ class="clr-control-container"
56
+ :class="folderErrorText && 'clr-error'"
57
+ >
58
+ <div class="flex-align-center">
59
+ <input
60
+ id="configuration-folder-input"
61
+ v-model="model.folder"
62
+ data-id="configuration-folder-input"
63
+ type="text"
64
+ class="clr-input"
65
+ @blur="initValidation(true, ['folder'])"
66
+ @input="initValidation(false, ['folder'])"
67
+ />
68
+ <atoms-the-icon class="error-icon" name="info-circle" />
69
+ </div>
70
+
71
+ <div
72
+ v-if="folderErrorText"
73
+ class="clr-subtext"
74
+ data-id="folder-name-field-require"
75
+ >
76
+ {{ folderErrorText }}
77
+ </div>
78
+ <div v-else class="clr-subtext">E.g: /vols/vol0/datastore-001</div>
79
+ </div>
80
+ </div>
81
+
82
+ <div class="nd-mt-0 clr-form-control clr-row">
83
+ <label class="clr-control-label clr-col-md-2">
84
+ {{ localization.common.server }}
85
+ </label>
86
+
87
+ <div
88
+ class="clr-control-container"
89
+ :class="serverErrorText && 'clr-error'"
90
+ >
91
+ <div class="flex-align-center input-action-wrapper">
92
+ <input
93
+ id="configuration-server-input"
94
+ v-model="model.server"
95
+ data-id="configuration-server-input"
96
+ type="text"
97
+ class="clr-input"
98
+ @blur="initValidation(true, ['server'])"
99
+ @input="initValidation(false, ['server'])"
100
+ />
101
+ <atoms-the-icon class="error-icon" name="info-circle" />
102
+ </div>
103
+ <div
104
+ v-if="serverErrorText"
105
+ class="clr-subtext"
106
+ data-id="server-name-field-require"
107
+ >
108
+ {{ serverErrorText }}
109
+ </div>
110
+ <div v-else class="clr-subtext">
111
+ E.g: nas, nas.it.com or 192.168.0.1
112
+ </div>
113
+ </div>
114
+ </div>
115
+ </div>
116
+ </div>
117
+ </template>
118
+
119
+ <script lang="ts" setup>
120
+ import type { UI_T_Project } from '~/lib/models/types'
121
+ import type {
122
+ UI_I_Localization,
123
+ UI_I_ArbitraryObject,
124
+ } from '~/lib/models/interfaces'
125
+ import type { UI_I_ErrorFields } from '~/components/atoms/wizard/lib/models/interfaces'
126
+ import type { UI_I_InitialValidationFields } from '~/components/common/wizards/datastore/add/nfs/configuration/lib/models/interfaces'
127
+ import type { UI_I_CreateDatastoreForm } from '~/components/common/wizards/datastore/add/lib/models/interfaces'
128
+
129
+ const props = defineProps<{
130
+ project: UI_T_Project
131
+ alertMessages: string[]
132
+ messagesFields: UI_I_ArbitraryObject<UI_I_ErrorFields>
133
+ }>()
134
+ const model = defineModel<UI_I_CreateDatastoreForm>({ required: true })
135
+ const emits = defineEmits<{
136
+ (event: 'hide-alert', value: number): void
137
+ }>()
138
+
139
+ const localization = computed<UI_I_Localization>(() => useLocal())
140
+
141
+ const initValidationFields = ref<UI_I_InitialValidationFields>({
142
+ name: false,
143
+ folder: false,
144
+ server: false,
145
+ })
146
+ const initValidation = (onlyBlur = false, types: string[]): void => {
147
+ onlyBlur && types.forEach((type) => (initValidationFields.value[type] = true))
148
+ }
149
+
150
+ /* Validation error text for Name input field */
151
+ const nameErrorText = computed<string>(() => {
152
+ if (props.messagesFields?.name?.field && !model.value.name) {
153
+ return props.messagesFields.name.field
154
+ }
155
+
156
+ if (!initValidationFields.value.name) return ''
157
+ return !model.value.name ? localization.value.common.specifyDatastoreName : ''
158
+ })
159
+
160
+ /* Validation error text for Folder input field */
161
+ const folderErrorText = computed<string>(() => {
162
+ if (props.messagesFields.folder?.field && !model.value.folder) {
163
+ return props.messagesFields.folder.field
164
+ }
165
+
166
+ if (!initValidationFields.value.folder) return ''
167
+ return !model.value.folder ? localization.value.common.specifyFolderName : ''
168
+ })
169
+
170
+ /* Validation error text for Server input field */
171
+ const serverErrorText = computed<string>(() => {
172
+ if (props.messagesFields.server?.field && !model.value.server) {
173
+ return props.messagesFields.server.field
174
+ }
175
+
176
+ if (!initValidationFields.value.server) return ''
177
+ return !model.value.server ? localization.value.common.specifyServerName : ''
178
+ })
179
+ const onHideAlert = (): void => {
180
+ emits('hide-alert', 5)
181
+ }
182
+ const alertInfo = ref<boolean>(props.project === 'procurator')
183
+ </script>
184
+
185
+ <style lang="scss" scoped>
186
+ @import '~/assets/scss/common/mixins.scss';
187
+ .configuration {
188
+ @include flex($dir: column, $just: space-between);
189
+ height: 100%;
190
+ & > h6 {
191
+ font-weight: 500;
192
+ font-size: 14px;
193
+ padding-top: 6px;
194
+ }
195
+
196
+ &__alert-info {
197
+ :deep(.alert-text) {
198
+ font-size: 11px;
199
+ letter-spacing: normal;
200
+ }
201
+ }
202
+ .clr-form-control {
203
+ margin-top: 0;
204
+ display: flex;
205
+ flex-direction: row;
206
+
207
+ .clr-control-container {
208
+ min-height: 48px;
209
+ &.clr-error {
210
+ .clr-subtext,
211
+ .error-icon {
212
+ display: block;
213
+ }
214
+ }
215
+ .error-icon {
216
+ display: none;
217
+ }
218
+ .error-icon {
219
+ fill: #db2100;
220
+ width: 24px;
221
+ height: 24px;
222
+ }
223
+ }
224
+ }
225
+ &__servers-list {
226
+ height: 170px;
227
+ }
228
+ }
229
+ .flex-align-center {
230
+ &.input-action-wrapper {
231
+ width: 260px;
232
+ }
233
+ input {
234
+ width: 210px;
235
+ }
236
+ }
237
+ </style>
@@ -0,0 +1,30 @@
1
+ <template>
2
+ <div class="name-and-configure">
3
+ {{ props }}
4
+ {{ model }}
5
+ </div>
6
+ </template>
7
+
8
+ <script lang="ts" setup>
9
+ import type { UI_T_Project } from '~/lib/models/types'
10
+ import type {
11
+ // UI_I_Localization,
12
+ UI_I_ArbitraryObject,
13
+ } from '~/lib/models/interfaces'
14
+ import type { UI_I_ErrorFields } from '~/components/atoms/wizard/lib/models/interfaces'
15
+ import type { UI_I_CreateDatastoreForm } from '~/components/common/wizards/datastore/add/lib/models/interfaces'
16
+
17
+ const props = defineProps<{
18
+ project: UI_T_Project
19
+ alertMessages: string[]
20
+ messagesFields: UI_I_ArbitraryObject<UI_I_ErrorFields>
21
+ }>()
22
+ const model = defineModel<UI_I_CreateDatastoreForm>({ required: true })
23
+ // const emits = defineEmits<{
24
+ // (event: 'hide-alert', value: number): void
25
+ // }>()
26
+
27
+ // const localization = computed<UI_I_Localization>(() => useLocal())
28
+ </script>
29
+
30
+ <style lang="scss" scoped></style>
@@ -0,0 +1,237 @@
1
+ <template>
2
+ <div class="configuration">
3
+ <div>
4
+ <atoms-alert
5
+ v-show="props.alertMessages?.length"
6
+ test-id="configure-error-alert"
7
+ status="alert-danger"
8
+ :items="props.alertMessages"
9
+ @remove="onHideAlert"
10
+ />
11
+
12
+ <atoms-alert
13
+ v-show="alertInfo"
14
+ test-id="configure-information-alert"
15
+ status="alert-info"
16
+ :items="[localization.common.nameAndConfigurationAlertInfo]"
17
+ @remove="alertInfo = false"
18
+ />
19
+ <h6 class="nd-mt-0">{{ localization.common.nfsShareDetails }}</h6>
20
+
21
+ <div class="clr-form-control clr-row">
22
+ <label for="" class="clr-control-label clr-col-md-2">
23
+ {{ localization.common.name }}
24
+ </label>
25
+
26
+ <div
27
+ class="clr-control-container"
28
+ :class="nameErrorText && 'clr-error'"
29
+ >
30
+ <div class="flex-align-center">
31
+ <input
32
+ id="configuration-name-input"
33
+ v-model="model.name"
34
+ data-id="configuration-name-input"
35
+ type="text"
36
+ class="clr-input"
37
+ @blur="initValidation(true, ['name'])"
38
+ @input="initValidation(false, ['name'])"
39
+ />
40
+ <atoms-the-icon class="error-icon" name="info-circle" />
41
+ </div>
42
+
43
+ <div class="clr-subtext" data-id="nfs-datastore-name-field-require">
44
+ {{ nameErrorText }}
45
+ </div>
46
+ </div>
47
+ </div>
48
+
49
+ <div class="clr-form-control clr-row">
50
+ <label class="clr-control-label clr-col-md-2">
51
+ {{ localization.common.folder }}
52
+ </label>
53
+
54
+ <div
55
+ class="clr-control-container"
56
+ :class="folderErrorText && 'clr-error'"
57
+ >
58
+ <div class="flex-align-center">
59
+ <input
60
+ id="configuration-folder-input"
61
+ v-model="model.folder"
62
+ data-id="configuration-folder-input"
63
+ type="text"
64
+ class="clr-input"
65
+ @blur="initValidation(true, ['folder'])"
66
+ @input="initValidation(false, ['folder'])"
67
+ />
68
+ <atoms-the-icon class="error-icon" name="info-circle" />
69
+ </div>
70
+
71
+ <div
72
+ v-if="folderErrorText"
73
+ class="clr-subtext"
74
+ data-id="folder-name-field-require"
75
+ >
76
+ {{ folderErrorText }}
77
+ </div>
78
+ <div v-else class="clr-subtext">E.g: /vols/vol0/datastore-001</div>
79
+ </div>
80
+ </div>
81
+
82
+ <div class="nd-mt-0 clr-form-control clr-row">
83
+ <label class="clr-control-label clr-col-md-2">
84
+ {{ localization.common.server }}
85
+ </label>
86
+
87
+ <div
88
+ class="clr-control-container"
89
+ :class="serverErrorText && 'clr-error'"
90
+ >
91
+ <div class="flex-align-center input-action-wrapper">
92
+ <input
93
+ id="configuration-server-input"
94
+ v-model="model.server"
95
+ data-id="configuration-server-input"
96
+ type="text"
97
+ class="clr-input"
98
+ @blur="initValidation(true, ['server'])"
99
+ @input="initValidation(false, ['server'])"
100
+ />
101
+ <atoms-the-icon class="error-icon" name="info-circle" />
102
+ </div>
103
+ <div
104
+ v-if="serverErrorText"
105
+ class="clr-subtext"
106
+ data-id="server-name-field-require"
107
+ >
108
+ {{ serverErrorText }}
109
+ </div>
110
+ <div v-else class="clr-subtext">
111
+ E.g: nas, nas.it.com or 192.168.0.1
112
+ </div>
113
+ </div>
114
+ </div>
115
+ </div>
116
+ </div>
117
+ </template>
118
+
119
+ <script lang="ts" setup>
120
+ import type { UI_T_Project } from '~/lib/models/types'
121
+ import type {
122
+ UI_I_Localization,
123
+ UI_I_ArbitraryObject,
124
+ } from '~/lib/models/interfaces'
125
+ import type { UI_I_ErrorFields } from '~/components/atoms/wizard/lib/models/interfaces'
126
+ import type { UI_I_InitialValidationFields } from '~/components/common/wizards/datastore/add/nfs/configuration/lib/models/interfaces'
127
+ import type { UI_I_CreateDatastoreForm } from '~/components/common/wizards/datastore/add/lib/models/interfaces'
128
+
129
+ const props = defineProps<{
130
+ project: UI_T_Project
131
+ alertMessages: string[]
132
+ messagesFields: UI_I_ArbitraryObject<UI_I_ErrorFields>
133
+ }>()
134
+ const model = defineModel<UI_I_CreateDatastoreForm>({ required: true })
135
+ const emits = defineEmits<{
136
+ (event: 'hide-alert', value: number): void
137
+ }>()
138
+
139
+ const localization = computed<UI_I_Localization>(() => useLocal())
140
+
141
+ const initValidationFields = ref<UI_I_InitialValidationFields>({
142
+ name: false,
143
+ folder: false,
144
+ server: false,
145
+ })
146
+ const initValidation = (onlyBlur = false, types: string[]): void => {
147
+ onlyBlur && types.forEach((type) => (initValidationFields.value[type] = true))
148
+ }
149
+
150
+ /* Validation error text for Name input field */
151
+ const nameErrorText = computed<string>(() => {
152
+ if (props.messagesFields?.name?.field && !model.value.name) {
153
+ return props.messagesFields.name.field
154
+ }
155
+
156
+ if (!initValidationFields.value.name) return ''
157
+ return !model.value.name ? localization.value.common.specifyDatastoreName : ''
158
+ })
159
+
160
+ /* Validation error text for Folder input field */
161
+ const folderErrorText = computed<string>(() => {
162
+ if (props.messagesFields.folder?.field && !model.value.folder) {
163
+ return props.messagesFields.folder.field
164
+ }
165
+
166
+ if (!initValidationFields.value.folder) return ''
167
+ return !model.value.folder ? localization.value.common.specifyFolderName : ''
168
+ })
169
+
170
+ /* Validation error text for Server input field */
171
+ const serverErrorText = computed<string>(() => {
172
+ if (props.messagesFields.server?.field && !model.value.server) {
173
+ return props.messagesFields.server.field
174
+ }
175
+
176
+ if (!initValidationFields.value.server) return ''
177
+ return !model.value.server ? localization.value.common.specifyServerName : ''
178
+ })
179
+ const onHideAlert = (): void => {
180
+ emits('hide-alert', 5)
181
+ }
182
+ const alertInfo = ref<boolean>(props.project === 'procurator')
183
+ </script>
184
+
185
+ <style lang="scss" scoped>
186
+ @import '~/assets/scss/common/mixins.scss';
187
+ .configuration {
188
+ @include flex($dir: column, $just: space-between);
189
+ height: 100%;
190
+ & > h6 {
191
+ font-weight: 500;
192
+ font-size: 14px;
193
+ padding-top: 6px;
194
+ }
195
+
196
+ &__alert-info {
197
+ :deep(.alert-text) {
198
+ font-size: 11px;
199
+ letter-spacing: normal;
200
+ }
201
+ }
202
+ .clr-form-control {
203
+ margin-top: 0;
204
+ display: flex;
205
+ flex-direction: row;
206
+
207
+ .clr-control-container {
208
+ min-height: 48px;
209
+ &.clr-error {
210
+ .clr-subtext,
211
+ .error-icon {
212
+ display: block;
213
+ }
214
+ }
215
+ .error-icon {
216
+ display: none;
217
+ }
218
+ .error-icon {
219
+ fill: #db2100;
220
+ width: 24px;
221
+ height: 24px;
222
+ }
223
+ }
224
+ }
225
+ &__servers-list {
226
+ height: 170px;
227
+ }
228
+ }
229
+ .flex-align-center {
230
+ &.input-action-wrapper {
231
+ width: 260px;
232
+ }
233
+ input {
234
+ width: 210px;
235
+ }
236
+ }
237
+ </style>
@@ -0,0 +1,100 @@
1
+ <template>
2
+ <div class="popover">
3
+ <slot>
4
+ <span
5
+ class="popover__item"
6
+ data-id="delete-popover-text"
7
+ @click="onClickItem"
8
+ >{{ localization.common.removeMember }}</span
9
+ >
10
+ </slot>
11
+ </div>
12
+ </template>
13
+
14
+ <script lang="ts" setup>
15
+ import { UI_I_Localization } from '~/lib/models/interfaces'
16
+
17
+ const emits = defineEmits<{
18
+ (event: 'hide'): void
19
+ (event: 'click-item'): void
20
+ }>()
21
+
22
+ const localization = computed<UI_I_Localization>(() => useLocal())
23
+ const onClickItem = (): void => {
24
+ emits('click-item')
25
+ }
26
+ const hide = (): void => {
27
+ emits('hide')
28
+ }
29
+ const windowClick = (): void => {
30
+ hide()
31
+ }
32
+
33
+ onMounted(() => {
34
+ setTimeout(() => {
35
+ window.addEventListener('click', windowClick)
36
+ })
37
+ })
38
+ onUnmounted(() => {
39
+ window.removeEventListener('click', windowClick)
40
+ })
41
+ </script>
42
+
43
+ <style lang="scss" scoped>
44
+ @import '~/assets/scss/common/mixins.scss';
45
+
46
+ .popover {
47
+ @include flex($align: center, $just: space-between);
48
+ height: 38px;
49
+ background: var(--block-view-bg-color2);
50
+ padding: 0.3rem;
51
+ margin-left: 0.3rem;
52
+ border: 0.05rem solid var(--block-border-color);
53
+ box-shadow: 0 0.05rem 0.15rem hsl(0deg 0% 55% / 25%);
54
+ transform: translateY(-50%);
55
+ border-radius: 0.15rem;
56
+ font-weight: 400;
57
+ white-space: nowrap;
58
+ z-index: var(--z-popover);
59
+ &:before,
60
+ &:after {
61
+ content: '';
62
+ position: absolute;
63
+ top: 50%;
64
+ right: 100%;
65
+ width: 0;
66
+ height: 0;
67
+ }
68
+ &:before {
69
+ margin-top: -0.3rem;
70
+ border-bottom: 0.3rem solid transparent;
71
+ border-top: 0.3rem solid transparent;
72
+ border-left: 0;
73
+ border-right: 0.3rem solid var(--block-border-color);
74
+ }
75
+ &:after {
76
+ margin-top: -0.25rem;
77
+ border-right: 0.25rem solid var(--block-view-bg-color2);
78
+ border-top: 0.25rem solid transparent;
79
+ border-bottom: 0.25rem solid transparent;
80
+ }
81
+ &__item {
82
+ @include text($fs: 14px, $c: var(--global-font-color3));
83
+ line-height: 1.15rem;
84
+ padding: 0.05rem 1.2rem 0;
85
+ &:hover {
86
+ background-color: var(--popover-hover-bg-color);
87
+ cursor: pointer;
88
+ }
89
+ }
90
+ }
91
+ </style>
92
+
93
+ <style>
94
+ :root {
95
+ --popover-hover-bg-color: #e8e8e8;
96
+ }
97
+ :root.dark-theme {
98
+ --popover-hover-bg-color: #28404d;
99
+ }
100
+ </style>