bfg-common 1.5.714 → 1.5.716

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 (98) hide show
  1. package/CODE_STYLE.md +109 -109
  2. package/assets/img/icons/icons-sprite-dark-3.svg +227 -227
  3. package/assets/img/icons/icons-sprite-dark-5.svg +488 -488
  4. package/assets/img/icons/icons-sprite-light-3.svg +227 -227
  5. package/assets/img/icons/icons-sprite-light-5.svg +488 -488
  6. package/components/atoms/TheIcon3.vue +50 -50
  7. package/components/atoms/collapse/CollapseNav.vue +170 -170
  8. package/components/atoms/perPage/PerPage.vue +58 -58
  9. package/components/atoms/table/dataGrid/DataGrid.vue +1718 -1718
  10. package/components/atoms/table/dataGrid/DataGridPagination.vue +97 -97
  11. package/components/atoms/table/dataGrid/lib/config/settingsTable.ts +94 -94
  12. package/components/atoms/table/dataGrid/lib/utils/export.ts +16 -16
  13. package/components/common/backup/storage/actions/add/lib/utils.ts +51 -51
  14. package/components/common/browse/blocks/contents/filesNew/Skeleton.vue +18 -18
  15. package/components/common/diagramMain/modals/lib/config/vCenterModal.ts +48 -48
  16. package/components/common/diagramMain/port/Port.vue +580 -580
  17. package/components/common/layout/theHeader/TheHeaderNew.vue +315 -315
  18. package/components/common/layout/theHeader/TheHeaderOld.vue +262 -262
  19. package/components/common/layout/theHeader/helpMenu/About.vue +79 -79
  20. package/components/common/layout/theHeader/helpMenu/aboutOld/AboutOld.vue +79 -79
  21. package/components/common/layout/theHeader/userMenu/modals/preferences/PreferencesOld.vue +144 -144
  22. package/components/common/layout/theHeader/userMenu/modals/preferences/lib/models/types.ts +7 -7
  23. package/components/common/pages/backups/DetailView.vue +52 -52
  24. package/components/common/pages/backups/lib/models/interfaces.ts +36 -36
  25. package/components/common/pages/backups/modals/Modals.vue +243 -243
  26. package/components/common/pages/backups/modals/createBackup/configuration/backupWindow/BackupWindow.vue +29 -29
  27. package/components/common/pages/backups/modals/createBackup/configuration/maxBandwidth/MaxBandwidth.vue +69 -69
  28. package/components/common/pages/backups/modals/createBackup/configuration/strategy/Strategy.vue +38 -38
  29. package/components/common/pages/backups/modals/createBackup/lib/config/readyToCompleteOptions.ts +69 -69
  30. package/components/common/pages/backups/modals/createBackup/lib/models/interfaces.ts +8 -8
  31. package/components/common/pages/backups/modals/lib/config/restore.ts +115 -115
  32. package/components/common/pages/backups/modals/lib/models/interfaces.ts +186 -186
  33. package/components/common/pages/backups/modals/restore/name/lib/models/interfaces.ts +6 -6
  34. package/components/common/pages/home/lib/models/interfaces.ts +48 -48
  35. package/components/common/pages/home/widgets/hosts/Hosts.vue +27 -27
  36. package/components/common/pages/home/widgets/hosts/lib/config/items.ts +23 -23
  37. package/components/common/pages/home/widgets/vms/VmsOld.vue +35 -35
  38. package/components/common/pages/home/widgets/vms/lib/config/items.ts +19 -19
  39. package/components/common/pages/scheduledTasks/lib/utils/utils.ts +84 -84
  40. package/components/common/pages/tasks/Tasks.vue +125 -122
  41. package/components/common/pages/tasks/table/Table.vue +373 -370
  42. package/components/common/pages/tasks/table/lib/config/config.ts +279 -279
  43. package/components/common/pages/tasks/table/lib/models/interfaces.ts +6 -0
  44. package/components/common/readyToComplete/ReadyToComplete.vue +17 -17
  45. package/components/common/select/radio/RadioGroup.vue +137 -137
  46. package/components/common/spiceConsole/Drawer.vue +420 -420
  47. package/components/common/spiceConsole/SpiceConsole.vue +184 -184
  48. package/components/common/spiceConsole/lib/models/interfaces.ts +5 -5
  49. package/components/common/tools/Actions.vue +207 -207
  50. package/components/common/treeView/TreeView.vue +52 -52
  51. package/components/common/vm/actions/clone/lib/config/steps.ts +295 -295
  52. package/components/common/vm/actions/clone/new/New.vue +438 -438
  53. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/shares/lib/config/options.ts +28 -28
  54. package/components/common/vm/actions/common/customizeHardware/virtualHardware/memory/Memory.vue +283 -283
  55. package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/order/Order.vue +156 -156
  56. package/components/common/vm/actions/common/select/compatibility/Old.vue +107 -107
  57. package/components/common/vm/actions/common/select/createType/lib/models/interfaces.ts +5 -5
  58. package/components/common/vm/actions/common/select/options/New.vue +264 -264
  59. package/components/common/vm/actions/common/select/options/Options.vue +58 -58
  60. package/components/common/vm/actions/common/select/storage/Old.vue +125 -125
  61. package/components/common/vm/actions/common/select/storage/new/New.vue +311 -311
  62. package/components/common/vm/actions/common/select/storage/new/lib/models/interfaces.ts +5 -5
  63. package/components/common/vm/actions/common/select/storage/new/lib/utils/utils.ts +21 -21
  64. package/components/common/vm/actions/common/select/template/old/Old.vue +50 -50
  65. package/components/common/vm/actions/editSettings/new/Skeleton.vue +88 -88
  66. package/components/common/wizards/common/compatibility/Compatibility.vue +35 -35
  67. package/components/common/wizards/common/steps/computeResource/New.vue +93 -93
  68. package/components/common/wizards/common/steps/name/Name.vue +178 -178
  69. package/components/common/wizards/common/steps/name/New.vue +221 -221
  70. package/components/common/wizards/common/steps/name/Old.vue +121 -121
  71. package/components/common/wizards/common/steps/name/lib/models/interfaces.ts +4 -4
  72. package/components/common/wizards/common/steps/name/location/New.vue +40 -40
  73. package/components/common/wizards/datastore/add/Add.vue +228 -228
  74. package/components/common/wizards/datastore/add/lib/utils.ts +85 -85
  75. package/components/common/wizards/datastore/add/steps/typeMode/lib/config/typeOptions.ts +43 -43
  76. package/composables/useAppVersion.ts +21 -21
  77. package/composables/useLocal.ts +6 -6
  78. package/composables/useLocalCommon.ts +39 -39
  79. package/package.json +1 -1
  80. package/plugins/console.ts +21 -21
  81. package/plugins/mouse.ts +21 -21
  82. package/plugins/panelStates.ts +70 -70
  83. package/plugins/text.ts +59 -59
  84. package/public/spice-console/application/clientgui.js +854 -854
  85. package/public/spice-console/application/packetfactory.js +211 -211
  86. package/public/spice-console/application/virtualmouse.js +147 -147
  87. package/public/spice-console/lib/images/bitmap.js +203 -203
  88. package/public/spice-console/network/spicechannel.js +440 -440
  89. package/public/spice-console/process/cursorprocess.js +128 -128
  90. package/public/spice-console/process/inputprocess.js +227 -227
  91. package/public/spice-console/process/mainprocess.js +212 -212
  92. package/public/spice-console/run.js +210 -210
  93. package/store/main/mutations.ts +7 -7
  94. package/store/main/state.ts +7 -7
  95. package/store/tasks/actions.ts +1 -1
  96. package/store/tasks/mappers/recentTasks.ts +123 -123
  97. package/store/tasks/mappers/tasks.ts +8 -1
  98. package/store/tasks/mutations.ts +82 -82
@@ -1,221 +1,221 @@
1
- <template>
2
- <div :class="['select-name', { 'pb-6': props.hasLocation }]">
3
- <client-only>
4
- <Teleport to="#name-alert-wrapper">
5
- <ui-alert
6
- v-show="props.errors.length"
7
- :messages="props.errors"
8
- status="alert-danger"
9
- test-id="name-alert"
10
- class="errors-alert"
11
- size="md"
12
- @hide="emits('remove-validation-errors')"
13
- />
14
- </Teleport>
15
- </client-only>
16
-
17
- <div class="name-field">
18
- <div class="flex-1 flex-align-center">
19
- <label :for="`${props.testIds.name}-name`" class="name-label">{{
20
- localization.common.name
21
- }}</label>
22
-
23
- <common-tooltip-help
24
- :title="localization.vmWizard.vmNameRules"
25
- :help-text="localization.common.nameValidationDescription"
26
- :test-id="props.testIds.helpIcon"
27
- help-id="name-icon"
28
- dropdown-left
29
- dropdown-width="320px"
30
- />
31
- </div>
32
-
33
- <div class="flex-2">
34
- <ui-input
35
- v-model="name"
36
- :placeholder="`${localization.common.name} (${localization.common.optional})`"
37
- type="text"
38
- maxlength="54"
39
- :test-id="props.testIds.name"
40
- />
41
- </div>
42
- </div>
43
-
44
- <template v-if="props.hasLocation">
45
- <div class="location">
46
- <span class="location-label">{{ localization.common.location }}</span>
47
-
48
- <div v-if="location" class="selected-location">
49
- <span :class="['node-icon', location.iconClassName]" />
50
- <span :class="['text', isShowAlert && 'error']">
51
- {{ location.name }}
52
- </span>
53
- </div>
54
- <ui-skeleton-item v-else width="160px" height="20px" />
55
- </div>
56
- <div class="tree-view-wrap">
57
- <common-wizards-common-steps-name-location
58
- v-model:location="location"
59
- :nodes="props.locationNodes"
60
- />
61
- </div>
62
- </template>
63
- </div>
64
- </template>
65
-
66
- <script setup lang="ts">
67
- import type { UI_I_Localization } from '~/lib/models/interfaces'
68
- import type { UI_I_TreeNode } from '~/components/common/recursionTree/lib/models/interfaces'
69
- import type { UI_I_NameTestIds } from '~/components/common/wizards/common/steps/name/lib/models/interfaces'
70
-
71
- const name = defineModel<string>('name', { required: true })
72
- const location = defineModel<UI_I_TreeNode | null>('location') // для сферы
73
-
74
- const props = defineProps<{
75
- hasLocation: boolean
76
- errors: string[]
77
- locationNodes: UI_I_TreeNode[]
78
- testIds: UI_I_NameTestIds
79
- }>()
80
- const emits = defineEmits<{
81
- (event: 'remove-validation-errors'): void
82
- }>()
83
-
84
- const localization = computed<UI_I_Localization>(() => useLocal())
85
-
86
- const isShowAlert = computed<boolean>(() =>
87
- props.errors.includes(
88
- localization.value.common.enterValidLocationVirtualMachine
89
- )
90
- )
91
- </script>
92
-
93
- <style>
94
- :root {
95
- --select-name-text-color: #4d5d69;
96
- --select-name-help-icon-hover-color: #4d5d69;
97
- --select-name-help-icon-active-color: #008fd6;
98
- --select-name-help-hide-icon-color: #213444;
99
- --select-name-border-color: #e9ebeda3;
100
- --select-name-location-node-color: #182531;
101
- --select-name-location-bg-color: #ffffff;
102
- }
103
- :root.dark-theme {
104
- --select-name-text-color: #e9eaec;
105
- --select-name-help-icon-hover-color: #e9eaec;
106
- --select-name-help-icon-active-color: #2ba2de;
107
- --select-name-help-hide-icon-color: #e9eaec;
108
- --select-name-border-color: #e9ebed1f;
109
- --select-name-location-node-color: #e9eaec;
110
- --select-name-location-bg-color: #1b2a371f;
111
- }
112
- </style>
113
- <style scoped lang="scss">
114
- .select-name {
115
- //height: 100%;
116
- min-height: 100%;
117
- height: max-content;
118
- display: flex;
119
- flex-direction: column;
120
- padding-top: 16px;
121
-
122
- .name-field {
123
- display: flex;
124
- align-items: center;
125
- column-gap: 16px;
126
-
127
- .name-label {
128
- font-size: 13px;
129
- color: var(--select-name-text-color);
130
- margin-right: 8px;
131
- overflow: hidden;
132
- text-overflow: ellipsis;
133
- white-space: nowrap;
134
- //max-width: 204px;
135
- max-width: 215px;
136
- }
137
- #virtual-machine-name-icon {
138
- color: #9da6ad; // equal in dark and white modes
139
- cursor: pointer;
140
-
141
- &:hover {
142
- color: var(--select-name-help-icon-hover-color);
143
- }
144
- &.active {
145
- color: var(--select-name-help-icon-active-color);
146
- }
147
- }
148
- }
149
-
150
- .location {
151
- display: grid;
152
- grid-template-columns: 1fr 2fr;
153
- margin-top: 16px;
154
- padding: 16px 0 8px;
155
- border-top: 1px solid var(--select-name-border-color);
156
- column-gap: 16px;
157
- height: 61px;
158
- align-items: center;
159
-
160
- .location-label {
161
- font-size: 13px;
162
- color: var(--select-name-text-color);
163
- overflow: hidden;
164
- text-overflow: ellipsis;
165
- white-space: nowrap;
166
- //max-width: 204px;
167
- }
168
-
169
- .selected-location {
170
- display: flex;
171
- align-items: center;
172
- gap: 8px;
173
-
174
- .node-icon {
175
- width: 20px;
176
- height: 20px;
177
- }
178
- .text {
179
- font-size: 13px;
180
- color: var(--select-name-location-node-color);
181
-
182
- &.error {
183
- color: #ea3223; // equal in dark and white modes
184
- }
185
- }
186
- }
187
- }
188
- .tree-view-wrap {
189
- flex: 1;
190
- border-radius: 8px;
191
- border: 1px solid var(--select-name-border-color);
192
- padding: 8px;
193
- background-color: var(--select-name-location-bg-color);
194
- max-height: 240px;
195
- overflow: auto;
196
-
197
- :deep(.skeleton-tree) {
198
- padding: 4px 8px;
199
-
200
- .skeleton-tree-row:last-child {
201
- display: none;
202
- }
203
- }
204
- :deep(.tree-content) {
205
- padding: 0 !important;
206
-
207
- .node-wrapper {
208
- border-radius: 4px;
209
-
210
- .node-name {
211
- font-size: 12px;
212
- margin-left: 8px;
213
- overflow: hidden;
214
- text-overflow: ellipsis;
215
- white-space: nowrap;
216
- }
217
- }
218
- }
219
- }
220
- }
221
- </style>
1
+ <template>
2
+ <div :class="['select-name', { 'pb-6': props.hasLocation }]">
3
+ <client-only>
4
+ <Teleport to="#name-alert-wrapper">
5
+ <ui-alert
6
+ v-show="props.errors.length"
7
+ :messages="props.errors"
8
+ status="alert-danger"
9
+ test-id="name-alert"
10
+ class="errors-alert"
11
+ size="md"
12
+ @hide="emits('remove-validation-errors')"
13
+ />
14
+ </Teleport>
15
+ </client-only>
16
+
17
+ <div class="name-field">
18
+ <div class="flex-1 flex-align-center">
19
+ <label :for="`${props.testIds.name}-name`" class="name-label">{{
20
+ localization.common.name
21
+ }}</label>
22
+
23
+ <common-tooltip-help
24
+ :title="localization.vmWizard.vmNameRules"
25
+ :help-text="localization.common.nameValidationDescription"
26
+ :test-id="props.testIds.helpIcon"
27
+ help-id="name-icon"
28
+ dropdown-left
29
+ dropdown-width="320px"
30
+ />
31
+ </div>
32
+
33
+ <div class="flex-2">
34
+ <ui-input
35
+ v-model="name"
36
+ :placeholder="`${localization.common.name} (${localization.common.optional})`"
37
+ type="text"
38
+ maxlength="54"
39
+ :test-id="props.testIds.name"
40
+ />
41
+ </div>
42
+ </div>
43
+
44
+ <template v-if="props.hasLocation">
45
+ <div class="location">
46
+ <span class="location-label">{{ localization.common.location }}</span>
47
+
48
+ <div v-if="location" class="selected-location">
49
+ <span :class="['node-icon', location.iconClassName]" />
50
+ <span :class="['text', isShowAlert && 'error']">
51
+ {{ location.name }}
52
+ </span>
53
+ </div>
54
+ <ui-skeleton-item v-else width="160px" height="20px" />
55
+ </div>
56
+ <div class="tree-view-wrap">
57
+ <common-wizards-common-steps-name-location
58
+ v-model:location="location"
59
+ :nodes="props.locationNodes"
60
+ />
61
+ </div>
62
+ </template>
63
+ </div>
64
+ </template>
65
+
66
+ <script setup lang="ts">
67
+ import type { UI_I_Localization } from '~/lib/models/interfaces'
68
+ import type { UI_I_TreeNode } from '~/components/common/recursionTree/lib/models/interfaces'
69
+ import type { UI_I_NameTestIds } from '~/components/common/wizards/common/steps/name/lib/models/interfaces'
70
+
71
+ const name = defineModel<string>('name', { required: true })
72
+ const location = defineModel<UI_I_TreeNode | null>('location') // для сферы
73
+
74
+ const props = defineProps<{
75
+ hasLocation: boolean
76
+ errors: string[]
77
+ locationNodes: UI_I_TreeNode[]
78
+ testIds: UI_I_NameTestIds
79
+ }>()
80
+ const emits = defineEmits<{
81
+ (event: 'remove-validation-errors'): void
82
+ }>()
83
+
84
+ const localization = computed<UI_I_Localization>(() => useLocal())
85
+
86
+ const isShowAlert = computed<boolean>(() =>
87
+ props.errors.includes(
88
+ localization.value.common.enterValidLocationVirtualMachine
89
+ )
90
+ )
91
+ </script>
92
+
93
+ <style>
94
+ :root {
95
+ --select-name-text-color: #4d5d69;
96
+ --select-name-help-icon-hover-color: #4d5d69;
97
+ --select-name-help-icon-active-color: #008fd6;
98
+ --select-name-help-hide-icon-color: #213444;
99
+ --select-name-border-color: #e9ebeda3;
100
+ --select-name-location-node-color: #182531;
101
+ --select-name-location-bg-color: #ffffff;
102
+ }
103
+ :root.dark-theme {
104
+ --select-name-text-color: #e9eaec;
105
+ --select-name-help-icon-hover-color: #e9eaec;
106
+ --select-name-help-icon-active-color: #2ba2de;
107
+ --select-name-help-hide-icon-color: #e9eaec;
108
+ --select-name-border-color: #e9ebed1f;
109
+ --select-name-location-node-color: #e9eaec;
110
+ --select-name-location-bg-color: #1b2a371f;
111
+ }
112
+ </style>
113
+ <style scoped lang="scss">
114
+ .select-name {
115
+ //height: 100%;
116
+ min-height: 100%;
117
+ height: max-content;
118
+ display: flex;
119
+ flex-direction: column;
120
+ padding-top: 16px;
121
+
122
+ .name-field {
123
+ display: flex;
124
+ align-items: center;
125
+ column-gap: 16px;
126
+
127
+ .name-label {
128
+ font-size: 13px;
129
+ color: var(--select-name-text-color);
130
+ margin-right: 8px;
131
+ overflow: hidden;
132
+ text-overflow: ellipsis;
133
+ white-space: nowrap;
134
+ //max-width: 204px;
135
+ max-width: 215px;
136
+ }
137
+ #virtual-machine-name-icon {
138
+ color: #9da6ad; // equal in dark and white modes
139
+ cursor: pointer;
140
+
141
+ &:hover {
142
+ color: var(--select-name-help-icon-hover-color);
143
+ }
144
+ &.active {
145
+ color: var(--select-name-help-icon-active-color);
146
+ }
147
+ }
148
+ }
149
+
150
+ .location {
151
+ display: grid;
152
+ grid-template-columns: 1fr 2fr;
153
+ margin-top: 16px;
154
+ padding: 16px 0 8px;
155
+ border-top: 1px solid var(--select-name-border-color);
156
+ column-gap: 16px;
157
+ height: 61px;
158
+ align-items: center;
159
+
160
+ .location-label {
161
+ font-size: 13px;
162
+ color: var(--select-name-text-color);
163
+ overflow: hidden;
164
+ text-overflow: ellipsis;
165
+ white-space: nowrap;
166
+ //max-width: 204px;
167
+ }
168
+
169
+ .selected-location {
170
+ display: flex;
171
+ align-items: center;
172
+ gap: 8px;
173
+
174
+ .node-icon {
175
+ width: 20px;
176
+ height: 20px;
177
+ }
178
+ .text {
179
+ font-size: 13px;
180
+ color: var(--select-name-location-node-color);
181
+
182
+ &.error {
183
+ color: #ea3223; // equal in dark and white modes
184
+ }
185
+ }
186
+ }
187
+ }
188
+ .tree-view-wrap {
189
+ flex: 1;
190
+ border-radius: 8px;
191
+ border: 1px solid var(--select-name-border-color);
192
+ padding: 8px;
193
+ background-color: var(--select-name-location-bg-color);
194
+ max-height: 240px;
195
+ overflow: auto;
196
+
197
+ :deep(.skeleton-tree) {
198
+ padding: 4px 8px;
199
+
200
+ .skeleton-tree-row:last-child {
201
+ display: none;
202
+ }
203
+ }
204
+ :deep(.tree-content) {
205
+ padding: 0 !important;
206
+
207
+ .node-wrapper {
208
+ border-radius: 4px;
209
+
210
+ .node-name {
211
+ font-size: 12px;
212
+ margin-left: 8px;
213
+ overflow: hidden;
214
+ text-overflow: ellipsis;
215
+ white-space: nowrap;
216
+ }
217
+ }
218
+ }
219
+ }
220
+ }
221
+ </style>
@@ -1,121 +1,121 @@
1
- <template>
2
- <div class="select-name">
3
- <atoms-alert
4
- v-show="props.errors.length"
5
- :items="props.errors"
6
- status="alert-danger"
7
- test-id="name-alert"
8
- @remove="emits('remove-validation-errors')"
9
- />
10
-
11
- <form @submit.prevent>
12
- <label for="name-input">{{ localization.common.name }}:</label>
13
- <input
14
- id="name-input"
15
- v-model.trim="name"
16
- :data-id="props.testIds.name"
17
- type="text"
18
- maxlength="54"
19
- />
20
- <div id="name-help-icon" class="content-signpost relative">
21
- <atoms-the-icon
22
- :data-id="props.testIds.helpIcon"
23
- class="icon-show-help"
24
- fill="#0072a3"
25
- width="24px"
26
- height="24px"
27
- name="info-circle"
28
- @click="isShowHelp = !isShowHelp"
29
- />
30
- <atoms-tooltip-signpost
31
- v-if="isShowHelp"
32
- test-id="help-signpost"
33
- elem-id="name-help-icon"
34
- @hide="isShowHelp = false"
35
- >
36
- <p>
37
- {{ localization.common.nameValidationDescription }}
38
- </p>
39
- </atoms-tooltip-signpost>
40
- </div>
41
- </form>
42
-
43
- <template v-if="props.hasLocation">
44
- <p class="mt-1">
45
- {{ props.locationDescription }}
46
- </p>
47
- <div class="tree-view-wrap">
48
- <common-wizards-common-steps-name-location
49
- v-model:location="location"
50
- :nodes="props.locationNodes"
51
- />
52
- </div>
53
- </template>
54
- </div>
55
- </template>
56
-
57
- <script setup lang="ts">
58
- import type { UI_I_Localization } from '~/lib/models/interfaces'
59
- import type { UI_I_TreeNode } from '~/components/common/recursionTree/lib/models/interfaces'
60
- import type { UI_I_NameTestIds } from '~/components/common/wizards/common/steps/name/lib/models/interfaces'
61
-
62
- const name = defineModel<string>('name', { required: true })
63
- const location = defineModel<UI_I_TreeNode | null>('location')
64
-
65
- const props = defineProps<{
66
- hasLocation: boolean
67
- errors: string[]
68
- locationNodes: UI_I_TreeNode[]
69
- locationDescription: string
70
- testIds: UI_I_NameTestIds
71
- }>()
72
- const emits = defineEmits<{
73
- (event: 'remove-validation-errors'): void
74
- }>()
75
-
76
- const localization = computed<UI_I_Localization>(() => useLocal())
77
-
78
- const isShowHelp = ref<boolean>(false)
79
- </script>
80
-
81
- <style scoped lang="scss">
82
- .select-name {
83
- form {
84
- display: flex;
85
- align-items: center;
86
- padding-top: 20px;
87
-
88
- label {
89
- width: 216px;
90
- }
91
- input {
92
- width: 345px;
93
- }
94
- }
95
-
96
- .tree-view-wrap {
97
- position: relative;
98
- border: 1px solid #000;
99
- padding: 5px;
100
- max-height: 300px;
101
- min-height: 200px;
102
- overflow: auto;
103
- margin-bottom: 10px;
104
- }
105
- }
106
- .content-signpost {
107
- user-select: none;
108
-
109
- .icon-show-help {
110
- cursor: pointer;
111
- }
112
-
113
- .help-title {
114
- font-size: 22px;
115
- margin-bottom: 24px;
116
- }
117
- .signpost {
118
- max-width: 360px;
119
- }
120
- }
121
- </style>
1
+ <template>
2
+ <div class="select-name">
3
+ <atoms-alert
4
+ v-show="props.errors.length"
5
+ :items="props.errors"
6
+ status="alert-danger"
7
+ test-id="name-alert"
8
+ @remove="emits('remove-validation-errors')"
9
+ />
10
+
11
+ <form @submit.prevent>
12
+ <label for="name-input">{{ localization.common.name }}:</label>
13
+ <input
14
+ id="name-input"
15
+ v-model.trim="name"
16
+ :data-id="props.testIds.name"
17
+ type="text"
18
+ maxlength="54"
19
+ />
20
+ <div id="name-help-icon" class="content-signpost relative">
21
+ <atoms-the-icon
22
+ :data-id="props.testIds.helpIcon"
23
+ class="icon-show-help"
24
+ fill="#0072a3"
25
+ width="24px"
26
+ height="24px"
27
+ name="info-circle"
28
+ @click="isShowHelp = !isShowHelp"
29
+ />
30
+ <atoms-tooltip-signpost
31
+ v-if="isShowHelp"
32
+ test-id="help-signpost"
33
+ elem-id="name-help-icon"
34
+ @hide="isShowHelp = false"
35
+ >
36
+ <p>
37
+ {{ localization.common.nameValidationDescription }}
38
+ </p>
39
+ </atoms-tooltip-signpost>
40
+ </div>
41
+ </form>
42
+
43
+ <template v-if="props.hasLocation">
44
+ <p class="mt-1">
45
+ {{ props.locationDescription }}
46
+ </p>
47
+ <div class="tree-view-wrap">
48
+ <common-wizards-common-steps-name-location
49
+ v-model:location="location"
50
+ :nodes="props.locationNodes"
51
+ />
52
+ </div>
53
+ </template>
54
+ </div>
55
+ </template>
56
+
57
+ <script setup lang="ts">
58
+ import type { UI_I_Localization } from '~/lib/models/interfaces'
59
+ import type { UI_I_TreeNode } from '~/components/common/recursionTree/lib/models/interfaces'
60
+ import type { UI_I_NameTestIds } from '~/components/common/wizards/common/steps/name/lib/models/interfaces'
61
+
62
+ const name = defineModel<string>('name', { required: true })
63
+ const location = defineModel<UI_I_TreeNode | null>('location')
64
+
65
+ const props = defineProps<{
66
+ hasLocation: boolean
67
+ errors: string[]
68
+ locationNodes: UI_I_TreeNode[]
69
+ locationDescription: string
70
+ testIds: UI_I_NameTestIds
71
+ }>()
72
+ const emits = defineEmits<{
73
+ (event: 'remove-validation-errors'): void
74
+ }>()
75
+
76
+ const localization = computed<UI_I_Localization>(() => useLocal())
77
+
78
+ const isShowHelp = ref<boolean>(false)
79
+ </script>
80
+
81
+ <style scoped lang="scss">
82
+ .select-name {
83
+ form {
84
+ display: flex;
85
+ align-items: center;
86
+ padding-top: 20px;
87
+
88
+ label {
89
+ width: 216px;
90
+ }
91
+ input {
92
+ width: 345px;
93
+ }
94
+ }
95
+
96
+ .tree-view-wrap {
97
+ position: relative;
98
+ border: 1px solid #000;
99
+ padding: 5px;
100
+ max-height: 300px;
101
+ min-height: 200px;
102
+ overflow: auto;
103
+ margin-bottom: 10px;
104
+ }
105
+ }
106
+ .content-signpost {
107
+ user-select: none;
108
+
109
+ .icon-show-help {
110
+ cursor: pointer;
111
+ }
112
+
113
+ .help-title {
114
+ font-size: 22px;
115
+ margin-bottom: 24px;
116
+ }
117
+ .signpost {
118
+ max-width: 360px;
119
+ }
120
+ }
121
+ </style>