bfg-common 1.5.186 → 1.5.188

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 (31) hide show
  1. package/assets/localization/local_be.json +1 -0
  2. package/assets/localization/local_en.json +1 -0
  3. package/assets/localization/local_hy.json +1 -0
  4. package/assets/localization/local_kk.json +1 -0
  5. package/assets/localization/local_ru.json +2 -1
  6. package/assets/localization/local_zh.json +1 -0
  7. package/assets/scss/clarity/local_ar.json +1 -0
  8. package/components/common/split/horizontal/HorizontalNew.vue +376 -379
  9. package/components/common/vm/actions/common/customizeHardware/CustomizeHardwareNew.vue +109 -73
  10. package/components/common/vm/actions/common/customizeHardware/virtualHardware/bus/BusNew.vue +19 -10
  11. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cdDvdDrive/CdDvdDriveNew.vue +1 -0
  12. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cdDvdDrive/media/MediaNew.vue +22 -14
  13. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/hotPlug/HotPlugNew.vue +1 -0
  14. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/model/ModelNew.vue +16 -6
  15. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/tooltip/TooltipNew.vue +30 -13
  16. package/components/common/vm/actions/common/customizeHardware/virtualHardware/memory/hotPlug/HotPlugNew.vue +1 -0
  17. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/NewHardDiskNew.vue +41 -8
  18. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/file/FileNew.vue +1 -1
  19. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newNetwork/macAddress/MacAddressNew.vue +0 -4
  20. package/components/common/vm/actions/common/customizeHardware/virtualHardware/other/inputDevices/InputDevicesNew.vue +21 -14
  21. package/components/common/vm/actions/common/customizeHardware/virtualHardware/reservation/ReservationNew.vue +1 -0
  22. package/components/common/vm/actions/common/customizeHardware/virtualHardware/videoCard/totalVideoMemory/TotalVideoMemoryNew.vue +0 -4
  23. package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/menu/MenuNew.vue +1 -0
  24. package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/order/OrderNew.vue +1 -0
  25. package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/copyPaste/CopyPasteNew.vue +1 -0
  26. package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/fileTransfer/FileTransferNew.vue +1 -0
  27. package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/folderSharing/FolderSharingNew.vue +1 -0
  28. package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/password/PasswordNew.vue +1 -0
  29. package/components/common/vm/actions/common/customizeHardware/vmoptions/tools/ToolsNew.vue +1 -0
  30. package/lib/utils/utils.ts +48 -31
  31. package/package.json +2 -2
@@ -1,16 +1,16 @@
1
1
  <template>
2
- <ui-stack-block :has-children="false">
3
- <template #stackBlockKey>
4
- {{ localization.common.inputDevices }}
5
- </template>
6
- <template #stackBlockContent>
7
- <div class="input-devices-content">
8
- <p>{{ localization.common.keyboard }}</p>
9
- <p class="dot-divider"></p>
10
- <p>{{ localization.common.pointingDevice }}</p>
11
- </div>
12
- </template>
13
- </ui-stack-block>
2
+ <ui-stack-block :has-children="false">
3
+ <template #stackBlockKey>
4
+ {{ localization.common.inputDevices }}
5
+ </template>
6
+ <template #stackBlockContent>
7
+ <div class="input-devices-content">
8
+ <p>{{ localization.common.keyboard }}</p>
9
+ <p class="dot-divider"></p>
10
+ <p>{{ localization.common.pointingDevice }}</p>
11
+ </div>
12
+ </template>
13
+ </ui-stack-block>
14
14
  </template>
15
15
 
16
16
  <script setup lang="ts">
@@ -19,15 +19,22 @@ import type { UI_I_Localization } from '~/lib/models/interfaces'
19
19
  const localization = computed<UI_I_Localization>(() => useLocal())
20
20
  </script>
21
21
 
22
+ <style>
23
+ :root {
24
+ --input-devices-content-color: #182531;
25
+ --input-devices-dot-color: #d3d6da;
26
+ }
27
+ </style>
22
28
  <style scoped lang="scss">
23
29
  .input-devices-content {
24
30
  display: flex;
25
31
  align-items: center;
26
32
  gap: 8px;
33
+ color: var(--input-devices-content-color);
27
34
 
28
35
  .dot-divider::before {
29
- content: "";
30
- color: var(--modal-subtitle-dot);
36
+ content: '';
37
+ color: var(--input-devices-dot-color);
31
38
  }
32
39
  }
33
40
  </style>
@@ -37,6 +37,7 @@
37
37
  :test-id="`reserve-guest-memory-checkbox-${props.componentType}`"
38
38
  :label-text="localization.common.reserveGuestMemory"
39
39
  disabled
40
+ size="md"
40
41
  />
41
42
  </div>
42
43
  </template>
@@ -47,8 +47,4 @@ const localization = computed<UI_I_Localization>(() => useLocal())
47
47
  .unit-text {
48
48
  margin-left: 10px;
49
49
  }
50
-
51
- :deep(.ui-main.ui-main-sm .ui-main-input) {
52
- height: 26px;
53
- }
54
50
  </style>
@@ -9,6 +9,7 @@
9
9
  v-model="bootMenu"
10
10
  :label-text="localization.common.enable"
11
11
  test-id="boot-menu-checkbox"
12
+ size="md"
12
13
  />
13
14
  </template>
14
15
  </ui-stack-block>
@@ -17,6 +17,7 @@
17
17
  <ui-checkbox
18
18
  v-model="item.isChecked"
19
19
  :test-id="item.testId"
20
+ size="md"
20
21
  />
21
22
  </template>
22
23
  <template
@@ -10,6 +10,7 @@
10
10
  test-id="copy-paste-checkbox"
11
11
  :disabled="props.disabled"
12
12
  :label-text="localization.common.enable"
13
+ size="md"
13
14
  />
14
15
  </template>
15
16
  </ui-stack-block>
@@ -10,6 +10,7 @@
10
10
  test-id="file-transfer-checkbox"
11
11
  :disabled="props.disabled"
12
12
  :label-text="localization.common.enable"
13
+ size="md"
13
14
  />
14
15
  </template>
15
16
  </ui-stack-block>
@@ -10,6 +10,7 @@
10
10
  :label-text="localization.common.enable"
11
11
  test-id="folder-sharing-checkbox"
12
12
  disabled
13
+ size="md"
13
14
  />
14
15
  </template>
15
16
  </ui-stack-block>
@@ -11,6 +11,7 @@
11
11
  :disabled="props.disabled"
12
12
  :label-text="localization.common.enable"
13
13
  test-id="enable-password-input"
14
+ size="md"
14
15
  @change="emits('set-password-disable')"
15
16
  />
16
17
 
@@ -20,6 +20,7 @@
20
20
  v-model="tools"
21
21
  :label-text="localization.common.enable"
22
22
  test-id="tools-2-checkbox"
23
+ size="md"
23
24
  />
24
25
  </template>
25
26
  </ui-stack-block>
@@ -1,31 +1,48 @@
1
- import type { UI_I_ArbitraryObject } from '~/lib/models/interfaces'
2
- export const enumKeyFromValue = (
3
- enumObj: UI_I_ArbitraryObject<string | number>,
4
- value: string
5
- ): string | undefined => {
6
- // Преобразуем enum в массив пар [ключ, значение] и находим нужную пару
7
- const dataFromEnum = Object.entries(enumObj).find(([_, val]) => val === value)
8
-
9
- // Возвращаем ключ, если найдена пара, иначе undefined
10
- return dataFromEnum ? dataFromEnum[0] : undefined
11
- }
12
-
13
- export const extractContentLastSlash = (
14
- inputString: string,
15
- after = false
16
- ): string => {
17
- const regex = after ? /\/([^/]+)\/?$/ : /(.*)\//
18
-
19
- const match = inputString.match(regex)
20
-
21
- return match ? match[1] : ''
22
- }
23
-
24
- export const intToIp = (value: number): string => {
25
- return [
26
- (value >> 24) & 0xff,
27
- (value >> 16) & 0xff,
28
- (value >> 8) & 0xff,
29
- value & 0xff,
30
- ].join('.')
31
- }
1
+ import type { UI_I_ArbitraryObject } from '~/lib/models/interfaces'
2
+ export const enumKeyFromValue = (
3
+ enumObj: UI_I_ArbitraryObject<string | number>,
4
+ value: string
5
+ ): string | undefined => {
6
+ // Преобразуем enum в массив пар [ключ, значение] и находим нужную пару
7
+ const dataFromEnum = Object.entries(enumObj).find(([_, val]) => val === value)
8
+
9
+ // Возвращаем ключ, если найдена пара, иначе undefined
10
+ return dataFromEnum ? dataFromEnum[0] : undefined
11
+ }
12
+
13
+ export const extractContentLastSlash = (
14
+ inputString: string,
15
+ after = false
16
+ ): string => {
17
+ const regex = after ? /\/([^/]+)\/?$/ : /(.*)\//
18
+
19
+ const match = inputString.match(regex)
20
+
21
+ return match ? match[1] : ''
22
+ }
23
+
24
+ export const intToIp = (value: number): string => {
25
+ return [
26
+ (value >> 24) & 0xff,
27
+ (value >> 16) & 0xff,
28
+ (value >> 8) & 0xff,
29
+ value & 0xff,
30
+ ].join('.')
31
+ }
32
+
33
+ export const ipToUint32 = (ip: string): number => {
34
+ const octets = ip.split('.').map(Number)
35
+ if (
36
+ octets.length !== 4 ||
37
+ octets.some((octet) => isNaN(octet) || octet < 0 || octet > 255)
38
+ ) {
39
+ return 0
40
+ }
41
+ return (
42
+ (((octets[0] << 24) >>> 0) |
43
+ (octets[1] << 16) |
44
+ (octets[2] << 8) |
45
+ octets[3]) >>>
46
+ 0
47
+ )
48
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bfg-common",
3
3
  "private": false,
4
- "version": "1.5.186",
4
+ "version": "1.5.188",
5
5
  "scripts": {
6
6
  "build": "nuxt build",
7
7
  "dev": "nuxt dev --port=3002",
@@ -35,7 +35,7 @@
35
35
  "@vueuse/components": "^10.1.2",
36
36
  "date-fns": "^2.29.3",
37
37
  "bfg-nuxt-3-graph": "1.0.25",
38
- "bfg-uikit": "1.0.420",
38
+ "bfg-uikit": "1.0.417",
39
39
  "html2canvas": "^1.4.1",
40
40
  "prettier-eslint": "^15.0.1"
41
41
  }