bfg-common 1.3.391 → 1.3.392

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 (89) hide show
  1. package/assets/img/icons/icons-sprite-dark-1.svg +1 -360
  2. package/assets/img/icons/icons-sprite-dark-2.svg +1 -296
  3. package/assets/img/icons/icons-sprite-dark-3.svg +1 -221
  4. package/assets/img/icons/icons-sprite-dark-4.svg +1 -247
  5. package/assets/img/icons/icons-sprite-light-1.svg +1 -360
  6. package/assets/img/icons/icons-sprite-light-2.svg +1 -296
  7. package/assets/img/icons/icons-sprite-light-3.svg +1 -221
  8. package/assets/img/icons/icons-sprite-light-4.svg +1 -247
  9. package/assets/localization/local_be.json +5 -1
  10. package/assets/localization/local_en.json +5 -1
  11. package/assets/localization/local_hy.json +5 -1
  12. package/assets/localization/local_kk.json +5 -1
  13. package/assets/localization/local_ru.json +5 -1
  14. package/assets/localization/local_zh.json +5 -1
  15. package/assets/scss/common/icons/icons.scss +0 -1
  16. package/components/atoms/loader/Loader.vue +30 -30
  17. package/components/atoms/loader/PreLoader.vue +38 -38
  18. package/components/atoms/switch/Switch.vue +111 -111
  19. package/components/atoms/table/compact/Compact.vue +526 -526
  20. package/components/common/adapterManager/ui/table/Header.vue +93 -93
  21. package/components/common/adapterManager/ui/table/Table.vue +162 -162
  22. package/components/common/context/Context.vue +99 -99
  23. package/components/common/lib/config/states.ts +126 -126
  24. package/components/common/pages/hardwareHealth/tableView/TableView.vue +1 -42
  25. package/components/common/pages/hardwareHealth/tableView/lib/config/alertWarningTable.ts +8 -15
  26. package/components/common/pages/hardwareHealth/tableView/lib/config/sensorTable.ts +1 -1
  27. package/components/common/resource/progressBlock/ProgressBlock.vue +142 -142
  28. package/components/common/split/horizontal/Horizontal.vue +49 -307
  29. package/components/common/split/horizontal/HorizontalOld.vue +307 -0
  30. package/components/common/vm/actions/add/Add.vue +602 -602
  31. package/components/common/vm/actions/clone/Clone.vue +518 -518
  32. package/components/common/vm/actions/common/customizeHardware/CustomizeHardware.vue +273 -273
  33. package/components/common/vm/actions/common/customizeHardware/virtualHardware/VirtualHardware.vue +697 -697
  34. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cdDvdDrive/CdDvdDrive.vue +256 -256
  35. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/NewHardDisk.vue +458 -458
  36. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newNetwork/NewNetwork.vue +304 -304
  37. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/NewPciDevice.vue +167 -167
  38. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newUsbController/NewUsbController.vue +82 -82
  39. package/components/common/vm/actions/common/customizeHardware/virtualHardware/other/Other.vue +32 -32
  40. package/components/common/vm/actions/common/customizeHardware/virtualHardware/videoCard/VideoCard.vue +182 -182
  41. package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/BootOptions.vue +114 -114
  42. package/components/common/vm/actions/common/customizeHardware/vmoptions/generalOptions/GeneralOptions.vue +188 -188
  43. package/components/common/vm/actions/common/customizeHardware/vmoptions/tools/Tools.vue +72 -72
  44. package/components/common/vm/actions/common/select/computeResource/ComputeResource.vue +164 -164
  45. package/components/common/vm/actions/common/select/name/Name.vue +235 -235
  46. package/components/common/vm/actions/common/select/storage/Storage.vue +198 -198
  47. package/components/common/vm/actions/editSettings/EditSettings.vue +316 -316
  48. package/components/common/weekSelect/lib/config/options.ts +10 -10
  49. package/components/common/wizards/datastore/add/Add.vue +436 -436
  50. package/components/common/wizards/datastore/add/lib/config/stepItems.ts +191 -191
  51. package/components/common/wizards/datastore/add/lib/models/interfaces.ts +38 -38
  52. package/components/common/wizards/datastore/add/lib/utils.ts +70 -70
  53. package/components/common/wizards/datastore/add/local/createName/CreateName.vue +160 -160
  54. package/components/common/wizards/datastore/add/nfs/Nfs.vue +112 -112
  55. package/components/common/wizards/datastore/add/nfs/accessibility/Accessibility.vue +104 -104
  56. package/components/common/wizards/datastore/add/nfs/accessibility/tablesView/lib/config/compatibleTable.ts +62 -62
  57. package/components/common/wizards/datastore/add/nfs/accessibility/tablesView/lib/config/hostsTableItems.ts +53 -53
  58. package/components/common/wizards/datastore/add/readyComplete/ReadyComplete.vue +86 -86
  59. package/components/common/wizards/datastore/add/readyComplete/lib/config/propertiesDetails.ts +184 -184
  60. package/components/common/wizards/datastore/add/sharedStorm/deviceSelection/DeviceSelection.vue +459 -459
  61. package/components/common/wizards/datastore/add/types/Types.vue +80 -80
  62. package/components/common/wizards/datastore/add/types/lib/config/typeOptions.ts +49 -49
  63. package/composables/useAppVersion.ts +21 -21
  64. package/composables/useEnvLanguage.ts +20 -20
  65. package/lib/utils/sendTask.ts +72 -72
  66. package/minify.js +146 -146
  67. package/package.json +1 -1
  68. package/plugins/spice-console/spice.console.ts +147 -147
  69. package/public/spice-console/application/codec.js +263 -263
  70. package/public/spice-console/lib/rasterEngine.js +907 -907
  71. package/public/spice-console/network/spicechannel.js +375 -375
  72. package/store/main/lib/interfaces.ts +9 -9
  73. package/store/tasks/actions.ts +133 -133
  74. package/store/tasks/getters.ts +25 -25
  75. package/store/tasks/lib/models/interfaces.ts +18 -18
  76. package/store/tasks/mutations.ts +58 -58
  77. package/store/tasks/state.ts +16 -16
  78. package/assets/img/icons/icons-sprite-dark-1-old.svg +0 -1
  79. package/assets/img/icons/icons-sprite-dark-2-old.svg +0 -1
  80. package/assets/img/icons/icons-sprite-dark-3-old.svg +0 -1
  81. package/assets/img/icons/icons-sprite-dark-4-old.svg +0 -1
  82. package/assets/img/icons/icons-sprite-dark-7.svg +0 -8
  83. package/assets/img/icons/icons-sprite-light-1-old.svg +0 -1
  84. package/assets/img/icons/icons-sprite-light-2-old.svg +0 -1
  85. package/assets/img/icons/icons-sprite-light-3-old.svg +0 -1
  86. package/assets/img/icons/icons-sprite-light-4-old.svg +0 -1
  87. package/assets/img/icons/icons-sprite-light-7.svg +0 -8
  88. package/assets/scss/common/icons/icons-7.scss +0 -29
  89. package/components/common/pages/hardwareHealth/tableView/modal/sensorWarning.vue +0 -63
@@ -0,0 +1,307 @@
1
+ <template>
2
+ <div
3
+ :id="elementId"
4
+ :class="['fill-parent horizontal', { dragging: isDrag }]"
5
+ >
6
+ <div class="firstPanel" :style="leftPanelStyle">
7
+ <div class="left-panel">
8
+ <div
9
+ v-if="showToggleButton"
10
+ :class="['panel-toggle', { collapsed: leftPanelCollapsed }]"
11
+ >
12
+ <button
13
+ id="collapse-left-panel-button"
14
+ data-id="collapse-left-panel-button"
15
+ class="btn-trigger"
16
+ @click="collapseLeftPanel"
17
+ >
18
+ <atoms-the-icon class="trigger-icon" name="angle" />
19
+ </button>
20
+ </div>
21
+
22
+ <div v-show="!leftPanelCollapsed" class="navigator">
23
+ <slot name="firstPanel" />
24
+ </div>
25
+ </div>
26
+ </div>
27
+ <div
28
+ v-show="!leftPanelCollapsed"
29
+ :id="`gutter-${elementId}`"
30
+ class="gutter gutter-horizontal"
31
+ tabindex="0"
32
+ @mousedown="isGrab = true"
33
+ @focus="isFocus = true"
34
+ @blur="isFocus = false"
35
+ >
36
+ <div class="gutter-horizontal-handler"></div>
37
+ </div>
38
+
39
+ <div class="secondPanel right" :style="rightPanelStyle">
40
+ <slot name="secondPanel" />
41
+ </div>
42
+ </div>
43
+ </template>
44
+
45
+ <script setup lang="ts">
46
+ const props = withDefaults(
47
+ defineProps<{
48
+ parentElementSelector: string
49
+ leftPanelW?: number
50
+ leftPanelMinWidth?: number
51
+ rightPanelMinWidth?: number
52
+ showToggleButton?: boolean
53
+ hideLeftPanel?: boolean
54
+ }>(),
55
+ {
56
+ leftPanelMinWidth: 200, // 200px
57
+ rightPanelMinWidth: 200, // 200px
58
+ leftPanelW: undefined,
59
+ showToggleButton: true,
60
+ hideLeftPanel: false,
61
+ }
62
+ )
63
+ const emits = defineEmits<{
64
+ (event: 'dragend', value: number): void
65
+ }>()
66
+
67
+ const leftPanelStyle = computed(() => {
68
+ let width = `calc(${leftPanelW.value}% - 1.5px)`
69
+ if (props.showToggleButton && leftPanelCollapsed.value) {
70
+ width = '20px'
71
+ }
72
+ if (props.hideLeftPanel && leftPanelCollapsed.value) width = '0px'
73
+
74
+ return { width }
75
+ })
76
+ const rightPanelStyle = computed(() => {
77
+ let width = `calc(${100 - leftPanelW.value}% - 1.5px)`
78
+ if (props.showToggleButton && leftPanelCollapsed.value) {
79
+ width = 'calc(100% - 20px)'
80
+ }
81
+
82
+ if (props.hideLeftPanel && leftPanelCollapsed.value)
83
+ width = 'calc(100% - 0px)'
84
+
85
+ return { width }
86
+ })
87
+ const leftPanelCollapsed = ref<boolean>(false)
88
+ const collapseLeftPanel = (): void => {
89
+ leftPanelCollapsed.value = !leftPanelCollapsed.value
90
+ }
91
+
92
+ const isGrab = ref<boolean>(false)
93
+ const isFocus = ref<boolean>(false)
94
+ const isDrag = ref<boolean>(false)
95
+ const leftPanelW = ref<number>(20) // 0%
96
+ watch(
97
+ () => props.leftPanelW,
98
+ (newValue) => {
99
+ if (newValue === undefined) return
100
+ leftPanelW.value = newValue
101
+ },
102
+ { immediate: true }
103
+ )
104
+
105
+ watch(
106
+ () => props.hideLeftPanel,
107
+ () => {
108
+ collapseLeftPanel()
109
+ }
110
+ )
111
+
112
+ let parentElem: HTMLElement | null
113
+ const mouseup = (): void => {
114
+ if (!isGrab.value) {
115
+ return
116
+ }
117
+
118
+ isGrab.value = false
119
+ isDrag.value = false
120
+
121
+ emits('dragend', leftPanelW.value)
122
+ }
123
+
124
+ let mousemove = (e: MouseEvent): void => {
125
+ if (!isGrab.value) return
126
+
127
+ e.preventDefault()
128
+ isDrag.value = true
129
+ doDrag(e.clientX)
130
+ }
131
+ mousemove = useThrottle(mousemove)
132
+
133
+ const doDrag = (clientX: number): void => {
134
+ const parentElemRect = parentElem?.getBoundingClientRect()
135
+ const parentElemWidth = parentElemRect?.width || 0
136
+ const parentElemLeft = parentElemRect?.left || 0
137
+ const onePercent = parentElemWidth / 100
138
+ const layerX = clientX - parentElemLeft
139
+
140
+ const leftLimit = layerX <= props.leftPanelMinWidth
141
+ const rightLimit = parentElemWidth - layerX <= props.rightPanelMinWidth
142
+ if (leftLimit || rightLimit) return
143
+
144
+ leftPanelW.value = layerX / onePercent
145
+ }
146
+
147
+ const elementId = `horizontal${useUniqueId()}`
148
+
149
+ const keydown = (e: KeyboardEvent): void => {
150
+ if (!isFocus.value) return
151
+
152
+ const gutter = document.getElementById(`gutter-${elementId}`)
153
+
154
+ if (!gutter) return
155
+
156
+ const gutterLeft = ~~(gutter.getBoundingClientRect().left + 1.5)
157
+
158
+ if (e.keyCode === 39) {
159
+ doDrag(gutterLeft + 10)
160
+ }
161
+ if (e.keyCode === 37) {
162
+ doDrag(gutterLeft - 10)
163
+ }
164
+ }
165
+ onMounted(() => {
166
+ parentElem = document.querySelector(props.parentElementSelector)
167
+
168
+ window.addEventListener('mousemove', mousemove)
169
+ window.addEventListener('mouseup', mouseup)
170
+ window.addEventListener('keydown', keydown)
171
+ })
172
+ onUnmounted(() => {
173
+ window.removeEventListener('mouseup', mouseup)
174
+ window.removeEventListener('mousemove', mousemove)
175
+ window.removeEventListener('keydown', keydown)
176
+ })
177
+ </script>
178
+
179
+ <style scoped lang="scss">
180
+ @import '@/assets/scss/common/mixins';
181
+ .horizontal {
182
+ &.dragging {
183
+ .gutter-horizontal.gutter {
184
+ background-color: var(--gutter-active-bg-color);
185
+ }
186
+ }
187
+ .firstPanel {
188
+ width: calc(50% - 1.5px);
189
+
190
+ .left-panel {
191
+ @include flex($dir: column);
192
+ width: 100%;
193
+ height: 100%;
194
+
195
+ .panel-toggle {
196
+ border-bottom: 1px solid var(--global-border-color);
197
+
198
+ &.collapsed {
199
+ border-right: 1px solid var(--global-border-color);
200
+
201
+ .btn-trigger {
202
+ .trigger-icon {
203
+ transform: rotate(90deg);
204
+ }
205
+ }
206
+ }
207
+
208
+ .btn-trigger {
209
+ @include flex($align: center);
210
+ width: 100%;
211
+ height: 36px;
212
+ flex: 0 0 36px;
213
+ border: 0;
214
+ padding: 0;
215
+ background-color: transparent;
216
+ outline: none;
217
+ cursor: pointer;
218
+
219
+ .trigger-icon {
220
+ width: 16px;
221
+ height: 16px;
222
+ transform: rotate(-90deg);
223
+ margin-left: auto;
224
+ fill: var(--triger-icon-color);
225
+ }
226
+ }
227
+ }
228
+ .navigator {
229
+ overflow: hidden;
230
+ height: 100%;
231
+
232
+ .panel-inner {
233
+ position: relative;
234
+ height: 100%;
235
+ background: var(--horizontal-panel-bg-color);
236
+ border-radius: 0;
237
+ border: 0;
238
+
239
+ &.inventory-tree {
240
+ padding-left: 4px;
241
+ padding-top: 6px;
242
+ }
243
+ }
244
+ }
245
+ }
246
+ }
247
+ .gutter-horizontal {
248
+ position: relative;
249
+ width: 3px;
250
+ background-color: var(--gutter-bg-color);
251
+ transition-delay: 0.25s;
252
+ transition-duration: 0.25s;
253
+
254
+ &-handler {
255
+ position: absolute;
256
+ height: 100%;
257
+ width: 10px;
258
+ background: transparent;
259
+ top: 0;
260
+ left: -3.5px;
261
+ z-index: 2;
262
+ }
263
+
264
+ &:focus {
265
+ background-color: var(--gutter-active-bg-color);
266
+ outline: none;
267
+ }
268
+
269
+ &:hover {
270
+ background-color: var(--gutter-hover-bg-color);
271
+ cursor: col-resize;
272
+ &:before {
273
+ background-color: hsla(0, 0%, 100%, 0.5);
274
+ box-shadow: inset 0 0 0 1px rgb(0 0 0 / 10%);
275
+ }
276
+ }
277
+
278
+ &:before {
279
+ content: '';
280
+ position: relative;
281
+ display: block;
282
+ background: rgba(0, 0, 0, 0.1);
283
+ transition-delay: 0.25s;
284
+ transition-duration: 0.25s;
285
+ width: 100%;
286
+ height: 25px;
287
+ top: calc(50% - 12.5px);
288
+ }
289
+ }
290
+ .secondPanel {
291
+ width: calc(50% - 1.5px);
292
+ &.right {
293
+ overflow: hidden;
294
+ height: 100%;
295
+ }
296
+ }
297
+ }
298
+ </style>
299
+
300
+ <style>
301
+ :root {
302
+ --horizontal-panel-bg-color: #fff;
303
+ }
304
+ :root.dark-theme {
305
+ --horizontal-panel-bg-color: #1b2a32;
306
+ }
307
+ </style>