bfg-common 1.4.101 → 1.4.103

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 (44) hide show
  1. package/assets/img/icons/icons-sprite-dark-2.svg +343 -308
  2. package/assets/img/icons/icons-sprite-dark-5.svg +491 -83
  3. package/assets/img/icons/icons-sprite-dark-6.svg +3 -1
  4. package/assets/img/icons/icons-sprite-light-2.svg +343 -308
  5. package/assets/img/icons/icons-sprite-light-5.svg +491 -83
  6. package/assets/img/icons/icons-sprite-light-6.svg +3 -1
  7. package/assets/localization/local_be.json +2584 -2584
  8. package/assets/localization/local_en.json +2588 -2588
  9. package/assets/localization/local_hy.json +2588 -2588
  10. package/assets/localization/local_zh.json +2586 -2586
  11. package/assets/scss/common/icons/icons-2.scss +18 -0
  12. package/assets/scss/common/icons/icons-5.scss +367 -11
  13. package/assets/scss/common/icons/icons-6.scss +4 -4
  14. package/assets/scss/common/icons/icons.scss +0 -4
  15. package/components/atoms/modal/bySteps/BySteps.vue +253 -253
  16. package/components/atoms/stack/StackBlock.vue +184 -184
  17. package/components/common/browse/blocks/Title.vue +91 -91
  18. package/components/common/browse/blocks/info/Date.vue +21 -21
  19. package/components/common/context/recursion/Recursion.vue +86 -86
  20. package/components/common/context/recursion/RecursionNew.vue +198 -198
  21. package/components/common/context/recursion/RecursionOld.vue +212 -212
  22. package/components/common/layout/theHeader/userMenu/userMenuNew/UserMenuNew.vue +156 -156
  23. package/components/common/split/horizontal/HorizontalNew.vue +321 -321
  24. package/components/common/vm/actions/add/Add.vue +609 -609
  25. package/components/common/vm/actions/clone/Clone.vue +522 -522
  26. package/components/common/vm/actions/common/customizeHardware/virtualHardware/bus/lib/config/options.ts +20 -20
  27. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/Cpu.vue +403 -403
  28. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/Hv.vue +99 -99
  29. package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/streamingMode/StreamingMode.vue +85 -85
  30. package/components/common/vm/actions/editSettings/EditSettings.vue +327 -327
  31. package/composables/productNameLocal.ts +30 -30
  32. package/package.json +1 -1
  33. package/plugins/recursion.ts +311 -311
  34. package/public/spice-console/lib/images/bitmap.js +203 -203
  35. package/store/tasks/mappers/recentTasks.ts +45 -45
  36. package/assets/img/icons/icons-sprite-dark-7.svg +0 -8
  37. package/assets/img/icons/icons-sprite-dark-8.svg +0 -190
  38. package/assets/img/icons/icons-sprite-dark-9.svg +0 -71
  39. package/assets/img/icons/icons-sprite-light-7.svg +0 -8
  40. package/assets/img/icons/icons-sprite-light-8.svg +0 -190
  41. package/assets/img/icons/icons-sprite-light-9.svg +0 -71
  42. package/assets/scss/common/icons/icons-7.scss +0 -29
  43. package/assets/scss/common/icons/icons-8.scss +0 -191
  44. package/assets/scss/common/icons/icons-9.scss +0 -95
@@ -1,321 +1,321 @@
1
- <template>
2
- <!-- TODO нужно объеденить с компонентой Horizontal.vue-->
3
- <div
4
- :id="elementId"
5
- :class="['fill-parent horizontal', { dragging: isDrag }]"
6
- >
7
- <div class="firstPanel" :style="leftPanelStyle">
8
- <div class="left-panel">
9
- <div
10
- v-if="props.showToggleButton"
11
- :class="['panel-toggle', { collapsed: leftPanelCollapsed }]"
12
- >
13
- <div v-show="!leftPanelCollapsed">
14
- <slot name="toggleContent" />
15
- </div>
16
- <button
17
- id="collapse-left-panel-button"
18
- data-id="collapse-left-panel-button"
19
- class="btn-trigger"
20
- @click="collapseLeftPanel"
21
- >
22
- <ui-icon-icon2 name="tree-arrow" />
23
- </button>
24
- </div>
25
-
26
- <div v-show="!leftPanelCollapsed" class="navigator">
27
- <slot name="firstPanel" />
28
- </div>
29
- </div>
30
- </div>
31
- <div
32
- v-show="!leftPanelCollapsed"
33
- :id="`gutter-${elementId}`"
34
- class="gutter gutter-horizontal"
35
- tabindex="0"
36
- @mousedown="isGrab = true"
37
- @focus="isFocus = true"
38
- @blur="isFocus = false"
39
- >
40
- <div class="gutter-horizontal-handler"></div>
41
- </div>
42
-
43
- <div class="secondPanel right" :style="rightPanelStyle">
44
- <slot name="secondPanel" />
45
- </div>
46
- </div>
47
- </template>
48
-
49
- <script setup lang="ts">
50
- const props = withDefaults(
51
- defineProps<{
52
- parentElementSelector: string
53
- leftPanelW?: number
54
- leftPanelMinWidth?: number
55
- rightPanelMinWidth?: number
56
- showToggleButton?: boolean
57
- hideLeftPanel?: boolean
58
- }>(),
59
- {
60
- leftPanelMinWidth: 200, // 200px
61
- rightPanelMinWidth: 200, // 200px
62
- leftPanelW: undefined,
63
- showToggleButton: true,
64
- hideLeftPanel: false,
65
- }
66
- )
67
- const emits = defineEmits<{
68
- (event: 'dragend', value: number): void
69
- }>()
70
-
71
- const leftPanelStyle = computed(() => {
72
- let width = `calc(${leftPanelWLocal.value}% - 1.5px)`
73
- if (props.showToggleButton && leftPanelCollapsed.value) {
74
- width = '20px'
75
- }
76
- if (props.hideLeftPanel && leftPanelCollapsed.value) width = '0px'
77
-
78
- return { width }
79
- })
80
- const rightPanelStyle = computed(() => {
81
- let width = `calc(${100 - leftPanelWLocal.value}% - 1.5px)`
82
- if (props.showToggleButton && leftPanelCollapsed.value) {
83
- width = 'calc(100% - 20px)'
84
- }
85
-
86
- if (props.hideLeftPanel && leftPanelCollapsed.value)
87
- width = 'calc(100% - 0px)'
88
-
89
- return { width }
90
- })
91
- const leftPanelCollapsed = ref<boolean>(false)
92
- const collapseLeftPanel = (): void => {
93
- leftPanelCollapsed.value = !leftPanelCollapsed.value
94
- }
95
-
96
- const isGrab = ref<boolean>(false)
97
- const isFocus = ref<boolean>(false)
98
- const isDrag = ref<boolean>(false)
99
- const leftPanelWLocal = ref<number>(20) // 0%
100
- watch(
101
- () => props.leftPanelW,
102
- (newValue) => {
103
- if (newValue === undefined) return
104
- leftPanelWLocal.value = newValue
105
- },
106
- { immediate: true }
107
- )
108
-
109
- watch(
110
- () => props.hideLeftPanel,
111
- () => {
112
- collapseLeftPanel()
113
- }
114
- )
115
-
116
- let parentElem: HTMLElement | null
117
- const mouseup = (): void => {
118
- if (!isGrab.value) {
119
- return
120
- }
121
-
122
- isGrab.value = false
123
- isDrag.value = false
124
-
125
- emits('dragend', leftPanelWLocal.value)
126
- }
127
-
128
- let mousemove = (e: MouseEvent): void => {
129
- if (!isGrab.value) return
130
-
131
- e.preventDefault()
132
- isDrag.value = true
133
- doDrag(e.clientX)
134
- }
135
- mousemove = useThrottle(mousemove)
136
-
137
- const doDrag = (clientX: number): void => {
138
- const parentElemRect = parentElem?.getBoundingClientRect()
139
- const parentElemWidth = parentElemRect?.width || 0
140
- const parentElemLeft = parentElemRect?.left || 0
141
- const onePercent = parentElemWidth / 100
142
- const layerX = clientX - parentElemLeft
143
-
144
- const leftLimit = layerX <= props.leftPanelMinWidth
145
- const rightLimit = parentElemWidth - layerX <= props.rightPanelMinWidth
146
- if (leftLimit || rightLimit) return
147
-
148
- leftPanelWLocal.value = layerX / onePercent
149
- }
150
-
151
- const elementId = `horizontal${useUniqueId()}`
152
-
153
- const keydown = (e: KeyboardEvent): void => {
154
- if (!isFocus.value) return
155
-
156
- const gutter = document.getElementById(`gutter-${elementId}`)
157
-
158
- if (!gutter) return
159
-
160
- const gutterLeft = ~~(gutter.getBoundingClientRect().left + 1.5)
161
-
162
- if (e.keyCode === 39) {
163
- doDrag(gutterLeft + 10)
164
- }
165
- if (e.keyCode === 37) {
166
- doDrag(gutterLeft - 10)
167
- }
168
- }
169
- onMounted(() => {
170
- parentElem = document.querySelector(props.parentElementSelector)
171
-
172
- window.addEventListener('mousemove', mousemove)
173
- window.addEventListener('mouseup', mouseup)
174
- window.addEventListener('keydown', keydown)
175
- })
176
- onUnmounted(() => {
177
- window.removeEventListener('mouseup', mouseup)
178
- window.removeEventListener('mousemove', mousemove)
179
- window.removeEventListener('keydown', keydown)
180
- })
181
- </script>
182
-
183
- <style scoped lang="scss">
184
- @import '@/assets/scss/common/mixins';
185
- .horizontal {
186
- &.dragging {
187
- .gutter-horizontal.gutter {
188
- background-color: var(--gutter-active-bg-color);
189
- }
190
- }
191
- .firstPanel {
192
- width: calc(50% - 1.5px);
193
-
194
- .left-panel {
195
- @include flex($dir: column);
196
- width: 100%;
197
- height: 100%;
198
-
199
- .panel-toggle {
200
- display: flex;
201
- align-items: center;
202
- justify-content: space-between;
203
- min-height: 48px;
204
- border-bottom: 1px solid var(--global-border-color);
205
- background-color: var(--horizontal-panel-bg-color);
206
-
207
- &.collapsed {
208
- border: none;
209
-
210
- .btn-trigger {
211
- border-radius: 0 4px 4px 0;
212
-
213
- :deep(svg) {
214
- transform: rotate(-90deg);
215
- }
216
- }
217
- }
218
-
219
- .btn-trigger {
220
- @include flex($align: center, $just: center);
221
- width: 16px;
222
- height: 32px;
223
- flex: 0 0 16px;
224
- border: 0;
225
- padding: 0;
226
- margin: 0;
227
- background-color: var(--trigger-bg-color);
228
- color: var(--trigger-color);
229
- outline: none;
230
- cursor: pointer;
231
- border-radius: 4px 0 0 4px;
232
-
233
- :deep(svg) {
234
- transform: rotate(90deg);
235
- }
236
- }
237
- }
238
- .navigator {
239
- overflow: hidden;
240
- height: 100%;
241
-
242
- .panel-inner {
243
- position: relative;
244
- height: 100%;
245
- background: var(--horizontal-panel-bg-color);
246
- border-radius: 0;
247
- border: 0;
248
-
249
- &.inventory-tree {
250
- padding-left: 4px;
251
- padding-top: 6px;
252
- }
253
- }
254
- }
255
- }
256
- }
257
- .gutter-horizontal {
258
- position: relative;
259
- width: 3px;
260
- background-color: var(--gutter-bg-color);
261
- transition-delay: 0.25s;
262
- transition-duration: 0.25s;
263
-
264
- &-handler {
265
- position: absolute;
266
- height: 100%;
267
- width: 10px;
268
- background: transparent;
269
- top: 0;
270
- left: -3.5px;
271
- z-index: 2;
272
- }
273
-
274
- &:focus {
275
- background-color: var(--gutter-active-bg-color);
276
- outline: none;
277
- }
278
-
279
- &:hover {
280
- background-color: var(--gutter-hover-bg-color);
281
- cursor: col-resize;
282
- &:before {
283
- background-color: hsla(0, 0%, 100%, 0.5);
284
- box-shadow: inset 0 0 0 1px rgb(0 0 0 / 10%);
285
- }
286
- }
287
-
288
- &:before {
289
- content: '';
290
- position: relative;
291
- display: block;
292
- background: rgba(0, 0, 0, 0.1);
293
- transition-delay: 0.25s;
294
- transition-duration: 0.25s;
295
- width: 100%;
296
- height: 25px;
297
- top: calc(50% - 12.5px);
298
- }
299
- }
300
- .secondPanel {
301
- width: calc(50% - 1.5px);
302
- &.right {
303
- overflow: hidden;
304
- height: 100%;
305
- }
306
- }
307
- }
308
- </style>
309
-
310
- <style>
311
- :root.is-new-view {
312
- --horizontal-panel-bg-color: #fff;
313
- --trigger-bg-color: #e9ebed;
314
- --trigger-color: #213444;
315
- }
316
- :root.is-new-view.dark-theme {
317
- --horizontal-panel-bg-color: #213444;
318
- --trigger-bg-color: #314352;
319
- --trigger-color: #e9ebed;
320
- }
321
- </style>
1
+ <template>
2
+ <!-- TODO нужно объеденить с компонентой Horizontal.vue-->
3
+ <div
4
+ :id="elementId"
5
+ :class="['fill-parent horizontal', { dragging: isDrag }]"
6
+ >
7
+ <div class="firstPanel" :style="leftPanelStyle">
8
+ <div class="left-panel">
9
+ <div
10
+ v-if="props.showToggleButton"
11
+ :class="['panel-toggle', { collapsed: leftPanelCollapsed }]"
12
+ >
13
+ <div v-show="!leftPanelCollapsed">
14
+ <slot name="toggleContent" />
15
+ </div>
16
+ <button
17
+ id="collapse-left-panel-button"
18
+ data-id="collapse-left-panel-button"
19
+ class="btn-trigger"
20
+ @click="collapseLeftPanel"
21
+ >
22
+ <ui-icon-icon2 name="tree-arrow" />
23
+ </button>
24
+ </div>
25
+
26
+ <div v-show="!leftPanelCollapsed" class="navigator">
27
+ <slot name="firstPanel" />
28
+ </div>
29
+ </div>
30
+ </div>
31
+ <div
32
+ v-show="!leftPanelCollapsed"
33
+ :id="`gutter-${elementId}`"
34
+ class="gutter gutter-horizontal"
35
+ tabindex="0"
36
+ @mousedown="isGrab = true"
37
+ @focus="isFocus = true"
38
+ @blur="isFocus = false"
39
+ >
40
+ <div class="gutter-horizontal-handler"></div>
41
+ </div>
42
+
43
+ <div class="secondPanel right" :style="rightPanelStyle">
44
+ <slot name="secondPanel" />
45
+ </div>
46
+ </div>
47
+ </template>
48
+
49
+ <script setup lang="ts">
50
+ const props = withDefaults(
51
+ defineProps<{
52
+ parentElementSelector: string
53
+ leftPanelW?: number
54
+ leftPanelMinWidth?: number
55
+ rightPanelMinWidth?: number
56
+ showToggleButton?: boolean
57
+ hideLeftPanel?: boolean
58
+ }>(),
59
+ {
60
+ leftPanelMinWidth: 200, // 200px
61
+ rightPanelMinWidth: 200, // 200px
62
+ leftPanelW: undefined,
63
+ showToggleButton: true,
64
+ hideLeftPanel: false,
65
+ }
66
+ )
67
+ const emits = defineEmits<{
68
+ (event: 'dragend', value: number): void
69
+ }>()
70
+
71
+ const leftPanelStyle = computed(() => {
72
+ let width = `calc(${leftPanelWLocal.value}% - 1.5px)`
73
+ if (props.showToggleButton && leftPanelCollapsed.value) {
74
+ width = '20px'
75
+ }
76
+ if (props.hideLeftPanel && leftPanelCollapsed.value) width = '0px'
77
+
78
+ return { width }
79
+ })
80
+ const rightPanelStyle = computed(() => {
81
+ let width = `calc(${100 - leftPanelWLocal.value}% - 1.5px)`
82
+ if (props.showToggleButton && leftPanelCollapsed.value) {
83
+ width = 'calc(100% - 20px)'
84
+ }
85
+
86
+ if (props.hideLeftPanel && leftPanelCollapsed.value)
87
+ width = 'calc(100% - 0px)'
88
+
89
+ return { width }
90
+ })
91
+ const leftPanelCollapsed = ref<boolean>(false)
92
+ const collapseLeftPanel = (): void => {
93
+ leftPanelCollapsed.value = !leftPanelCollapsed.value
94
+ }
95
+
96
+ const isGrab = ref<boolean>(false)
97
+ const isFocus = ref<boolean>(false)
98
+ const isDrag = ref<boolean>(false)
99
+ const leftPanelWLocal = ref<number>(20) // 0%
100
+ watch(
101
+ () => props.leftPanelW,
102
+ (newValue) => {
103
+ if (newValue === undefined) return
104
+ leftPanelWLocal.value = newValue
105
+ },
106
+ { immediate: true }
107
+ )
108
+
109
+ watch(
110
+ () => props.hideLeftPanel,
111
+ () => {
112
+ collapseLeftPanel()
113
+ }
114
+ )
115
+
116
+ let parentElem: HTMLElement | null
117
+ const mouseup = (): void => {
118
+ if (!isGrab.value) {
119
+ return
120
+ }
121
+
122
+ isGrab.value = false
123
+ isDrag.value = false
124
+
125
+ emits('dragend', leftPanelWLocal.value)
126
+ }
127
+
128
+ let mousemove = (e: MouseEvent): void => {
129
+ if (!isGrab.value) return
130
+
131
+ e.preventDefault()
132
+ isDrag.value = true
133
+ doDrag(e.clientX)
134
+ }
135
+ mousemove = useThrottle(mousemove)
136
+
137
+ const doDrag = (clientX: number): void => {
138
+ const parentElemRect = parentElem?.getBoundingClientRect()
139
+ const parentElemWidth = parentElemRect?.width || 0
140
+ const parentElemLeft = parentElemRect?.left || 0
141
+ const onePercent = parentElemWidth / 100
142
+ const layerX = clientX - parentElemLeft
143
+
144
+ const leftLimit = layerX <= props.leftPanelMinWidth
145
+ const rightLimit = parentElemWidth - layerX <= props.rightPanelMinWidth
146
+ if (leftLimit || rightLimit) return
147
+
148
+ leftPanelWLocal.value = layerX / onePercent
149
+ }
150
+
151
+ const elementId = `horizontal${useUniqueId()}`
152
+
153
+ const keydown = (e: KeyboardEvent): void => {
154
+ if (!isFocus.value) return
155
+
156
+ const gutter = document.getElementById(`gutter-${elementId}`)
157
+
158
+ if (!gutter) return
159
+
160
+ const gutterLeft = ~~(gutter.getBoundingClientRect().left + 1.5)
161
+
162
+ if (e.keyCode === 39) {
163
+ doDrag(gutterLeft + 10)
164
+ }
165
+ if (e.keyCode === 37) {
166
+ doDrag(gutterLeft - 10)
167
+ }
168
+ }
169
+ onMounted(() => {
170
+ parentElem = document.querySelector(props.parentElementSelector)
171
+
172
+ window.addEventListener('mousemove', mousemove)
173
+ window.addEventListener('mouseup', mouseup)
174
+ window.addEventListener('keydown', keydown)
175
+ })
176
+ onUnmounted(() => {
177
+ window.removeEventListener('mouseup', mouseup)
178
+ window.removeEventListener('mousemove', mousemove)
179
+ window.removeEventListener('keydown', keydown)
180
+ })
181
+ </script>
182
+
183
+ <style scoped lang="scss">
184
+ @import '@/assets/scss/common/mixins';
185
+ .horizontal {
186
+ &.dragging {
187
+ .gutter-horizontal.gutter {
188
+ background-color: var(--gutter-active-bg-color);
189
+ }
190
+ }
191
+ .firstPanel {
192
+ width: calc(50% - 1.5px);
193
+
194
+ .left-panel {
195
+ @include flex($dir: column);
196
+ width: 100%;
197
+ height: 100%;
198
+
199
+ .panel-toggle {
200
+ display: flex;
201
+ align-items: center;
202
+ justify-content: space-between;
203
+ min-height: 48px;
204
+ border-bottom: 1px solid var(--global-border-color);
205
+ background-color: var(--horizontal-panel-bg-color);
206
+
207
+ &.collapsed {
208
+ border: none;
209
+
210
+ .btn-trigger {
211
+ border-radius: 0 4px 4px 0;
212
+
213
+ :deep(svg) {
214
+ transform: rotate(-90deg);
215
+ }
216
+ }
217
+ }
218
+
219
+ .btn-trigger {
220
+ @include flex($align: center, $just: center);
221
+ width: 16px;
222
+ height: 32px;
223
+ flex: 0 0 16px;
224
+ border: 0;
225
+ padding: 0;
226
+ margin: 0;
227
+ background-color: var(--trigger-bg-color);
228
+ color: var(--trigger-color);
229
+ outline: none;
230
+ cursor: pointer;
231
+ border-radius: 4px 0 0 4px;
232
+
233
+ :deep(svg) {
234
+ transform: rotate(90deg);
235
+ }
236
+ }
237
+ }
238
+ .navigator {
239
+ overflow: hidden;
240
+ height: 100%;
241
+
242
+ .panel-inner {
243
+ position: relative;
244
+ height: 100%;
245
+ background: var(--horizontal-panel-bg-color);
246
+ border-radius: 0;
247
+ border: 0;
248
+
249
+ &.inventory-tree {
250
+ padding-left: 4px;
251
+ padding-top: 6px;
252
+ }
253
+ }
254
+ }
255
+ }
256
+ }
257
+ .gutter-horizontal {
258
+ position: relative;
259
+ width: 3px;
260
+ background-color: var(--gutter-bg-color);
261
+ transition-delay: 0.25s;
262
+ transition-duration: 0.25s;
263
+
264
+ &-handler {
265
+ position: absolute;
266
+ height: 100%;
267
+ width: 10px;
268
+ background: transparent;
269
+ top: 0;
270
+ left: -3.5px;
271
+ z-index: 2;
272
+ }
273
+
274
+ &:focus {
275
+ background-color: var(--gutter-active-bg-color);
276
+ outline: none;
277
+ }
278
+
279
+ &:hover {
280
+ background-color: var(--gutter-hover-bg-color);
281
+ cursor: col-resize;
282
+ &:before {
283
+ background-color: hsla(0, 0%, 100%, 0.5);
284
+ box-shadow: inset 0 0 0 1px rgb(0 0 0 / 10%);
285
+ }
286
+ }
287
+
288
+ &:before {
289
+ content: '';
290
+ position: relative;
291
+ display: block;
292
+ background: rgba(0, 0, 0, 0.1);
293
+ transition-delay: 0.25s;
294
+ transition-duration: 0.25s;
295
+ width: 100%;
296
+ height: 25px;
297
+ top: calc(50% - 12.5px);
298
+ }
299
+ }
300
+ .secondPanel {
301
+ width: calc(50% - 1.5px);
302
+ &.right {
303
+ overflow: hidden;
304
+ height: 100%;
305
+ }
306
+ }
307
+ }
308
+ </style>
309
+
310
+ <style>
311
+ :root.is-new-view {
312
+ --horizontal-panel-bg-color: #fff;
313
+ --trigger-bg-color: #e9ebed;
314
+ --trigger-color: #213444;
315
+ }
316
+ :root.is-new-view.dark-theme {
317
+ --horizontal-panel-bg-color: #213444;
318
+ --trigger-bg-color: #314352;
319
+ --trigger-color: #e9ebed;
320
+ }
321
+ </style>