bfg-common 1.5.746 → 1.5.748

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 (116) 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/assets/localization/local_be.json +16 -10
  7. package/assets/localization/local_en.json +16 -10
  8. package/assets/localization/local_hy.json +16 -10
  9. package/assets/localization/local_kk.json +16 -10
  10. package/assets/localization/local_ru.json +16 -10
  11. package/assets/localization/local_zh.json +16 -10
  12. package/components/atoms/TheIcon3.vue +50 -50
  13. package/components/atoms/collapse/CollapseNav.vue +170 -170
  14. package/components/atoms/nav/NavBar.vue +1 -0
  15. package/components/atoms/perPage/PerPage.vue +58 -58
  16. package/components/atoms/table/dataGrid/DataGridPagination.vue +97 -97
  17. package/components/atoms/table/dataGrid/lib/config/settingsTable.ts +94 -94
  18. package/components/atoms/table/dataGrid/lib/utils/export.ts +16 -16
  19. package/components/common/backup/storage/actions/add/lib/utils.ts +51 -51
  20. package/components/common/browse/blocks/contents/filesNew/Skeleton.vue +18 -18
  21. package/components/common/browse/blocks/lib/models/types.ts +1 -1
  22. package/components/common/browse/lib/models/interfaces.ts +5 -5
  23. package/components/common/diagramMain/network/Contents.vue +497 -497
  24. package/components/common/graph/graphNew/EmptyBlock.vue +2 -1
  25. package/components/common/layout/console/Console.vue +70 -70
  26. package/components/common/layout/theHeader/feedback/new/email/Email.vue +2 -2
  27. package/components/common/layout/theHeader/userMenu/modals/changePassword/lib/utils.ts +2 -2
  28. package/components/common/layout/theHeader/userMenu/modals/preferences/lib/models/types.ts +7 -7
  29. package/components/common/monitor/overview/OverviewNew.vue +1 -1
  30. package/components/common/pages/backups/DetailView.vue +52 -52
  31. package/components/common/pages/backups/lib/models/interfaces.ts +36 -36
  32. package/components/common/pages/backups/modals/Modals.vue +243 -243
  33. package/components/common/pages/backups/modals/createBackup/configuration/maxBandwidth/lib/config/options.ts +6 -6
  34. package/components/common/pages/backups/modals/createBackup/lib/config/readyToCompleteOptions.ts +69 -69
  35. package/components/common/pages/backups/modals/lib/config/restore.ts +116 -116
  36. package/components/common/pages/backups/modals/lib/models/interfaces.ts +187 -187
  37. package/components/common/pages/backups/modals/restore/Restore.vue +302 -302
  38. package/components/common/pages/backups/modals/restore/disks/Disks.vue +50 -50
  39. package/components/common/pages/backups/modals/restore/lib/config/readyToCompleteOptions.ts +94 -94
  40. package/components/common/pages/backups/modals/restore/lib/config/steps.ts +130 -130
  41. package/components/common/pages/backups/modals/restore/name/lib/models/interfaces.ts +6 -6
  42. package/components/common/pages/backups/modals/restore/types/New.vue +95 -95
  43. package/components/common/pages/backups/modals/restore/types/Old.vue +62 -62
  44. package/components/common/pages/backups/modals/restore/types/Types.vue +31 -31
  45. package/components/common/pages/home/lib/models/interfaces.ts +48 -48
  46. package/components/common/pages/home/widgets/hosts/Hosts.vue +27 -27
  47. package/components/common/pages/home/widgets/hosts/lib/config/items.ts +23 -23
  48. package/components/common/pages/home/widgets/vms/VmsOld.vue +35 -35
  49. package/components/common/pages/home/widgets/vms/lib/config/items.ts +19 -19
  50. package/components/common/pages/scheduledTasks/lib/utils/utils.ts +84 -84
  51. package/components/common/pages/tasks/Tasks.vue +125 -125
  52. package/components/common/pages/tasks/table/Table.vue +373 -373
  53. package/components/common/pages/tasks/table/lib/config/config.ts +279 -279
  54. package/components/common/pages/tasks/table/lib/models/interfaces.ts +9 -9
  55. package/components/common/readyToComplete/ReadyToComplete.vue +17 -17
  56. package/components/common/select/radio/RadioGroup.vue +137 -137
  57. package/components/common/spiceConsole/Drawer.vue +420 -420
  58. package/components/common/spiceConsole/SpiceConsole.vue +184 -184
  59. package/components/common/spiceConsole/lib/models/interfaces.ts +5 -5
  60. package/components/common/tools/Actions.vue +207 -207
  61. package/components/common/treeView/TreeView.vue +52 -52
  62. package/components/common/vm/actions/clone/lib/config/steps.ts +295 -295
  63. package/components/common/vm/actions/clone/new/New.vue +438 -438
  64. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/shares/lib/config/options.ts +28 -28
  65. package/components/common/vm/actions/common/customizeHardware/virtualHardware/memory/Memory.vue +283 -283
  66. package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/order/Order.vue +156 -156
  67. package/components/common/vm/actions/common/select/compatibility/Old.vue +107 -107
  68. package/components/common/vm/actions/common/select/createType/lib/models/interfaces.ts +5 -5
  69. package/components/common/vm/actions/common/select/options/New.vue +264 -264
  70. package/components/common/vm/actions/common/select/options/Options.vue +58 -58
  71. package/components/common/vm/actions/common/select/storage/Old.vue +125 -125
  72. package/components/common/vm/actions/common/select/storage/new/New.vue +311 -311
  73. package/components/common/vm/actions/common/select/storage/new/lib/models/interfaces.ts +5 -5
  74. package/components/common/vm/actions/common/select/storage/new/lib/utils/utils.ts +21 -21
  75. package/components/common/vm/actions/common/select/template/old/Old.vue +50 -50
  76. package/components/common/vm/actions/editSettings/new/Skeleton.vue +88 -88
  77. package/components/common/vm/snapshots/modals/confirm/New.vue +9 -8
  78. package/components/common/vm/snapshots/modals/takeOrEdit/new/New.vue +1 -1
  79. package/components/common/wizards/common/compatibility/Compatibility.vue +35 -35
  80. package/components/common/wizards/common/steps/computeResource/New.vue +93 -93
  81. package/components/common/wizards/common/steps/name/Name.vue +178 -178
  82. package/components/common/wizards/common/steps/name/New.vue +221 -221
  83. package/components/common/wizards/common/steps/name/Old.vue +121 -121
  84. package/components/common/wizards/common/steps/name/lib/models/interfaces.ts +4 -4
  85. package/components/common/wizards/common/steps/name/location/New.vue +40 -40
  86. package/components/common/wizards/datastore/add/Add.vue +227 -227
  87. package/components/common/wizards/datastore/add/lib/utils.ts +85 -85
  88. package/components/common/wizards/datastore/add/steps/typeMode/lib/config/typeOptions.ts +43 -43
  89. package/components/common/wizards/network/add/Add.vue +870 -870
  90. package/components/common/wizards/vm/migrate/steps/selectStorage/configure/disk/table/old/lib/config/diskTable.ts +11 -1
  91. package/composables/useAppVersion.ts +21 -21
  92. package/composables/useBrowse.ts +24 -24
  93. package/composables/useLocal.ts +6 -6
  94. package/composables/useLocalCommon.ts +39 -39
  95. package/lib/config/regExp.ts +1 -1
  96. package/lib/models/types.ts +59 -59
  97. package/package.json +1 -1
  98. package/plugins/console.ts +21 -21
  99. package/plugins/mouse.ts +21 -21
  100. package/plugins/panelStates.ts +70 -70
  101. package/plugins/text.ts +59 -59
  102. package/plugins/time.ts +58 -58
  103. package/plugins/validation.ts +6 -6
  104. package/public/spice-console/application/clientgui.js +854 -854
  105. package/public/spice-console/application/packetfactory.js +211 -211
  106. package/public/spice-console/application/virtualmouse.js +147 -147
  107. package/public/spice-console/lib/images/bitmap.js +203 -203
  108. package/public/spice-console/network/spicechannel.js +440 -440
  109. package/public/spice-console/process/cursorprocess.js +128 -128
  110. package/public/spice-console/process/inputprocess.js +227 -227
  111. package/public/spice-console/process/mainprocess.js +212 -212
  112. package/public/spice-console/run.js +210 -210
  113. package/store/main/mutations.ts +7 -7
  114. package/store/main/state.ts +7 -7
  115. package/store/tasks/mappers/recentTasks.ts +123 -123
  116. package/store/tasks/mutations.ts +82 -82
@@ -84,57 +84,67 @@ export const bodyItems = (
84
84
  key: 'col0',
85
85
  text: disk[vmMigrateDiskTableItemKeys[0]],
86
86
  id: key,
87
+ testId: `disk-table-${key}`,
87
88
  },
88
89
  {
89
90
  key: 'col1',
90
91
  text: disk[vmMigrateDiskTableItemKeys[1]],
91
92
  id: key,
93
+ testId: `disk-table-${key}`,
92
94
  },
93
95
  {
94
96
  key: 'col2',
95
97
  text: file,
96
98
  id: key,
99
+ testId: `disk-table-${key}`,
97
100
  },
98
101
  {
99
102
  key: 'col3',
100
103
  text: disk[vmMigrateDiskTableItemKeys[3]],
101
104
  id: key,
105
+ testId: `disk-table-${key}`,
102
106
  },
103
107
  {
104
108
  key: 'col4',
105
109
  text: diskFormat,
106
110
  id: key,
111
+ testId: `disk-table-${key}`,
107
112
  },
108
113
  {
109
114
  key: 'col5',
110
115
  text: disk.extra[vmMigrateDiskTableItemKeys[5]],
111
116
  id: key,
117
+ testId: `disk-table-${key}`,
112
118
  },
113
-
114
119
  {
115
120
  key: 'col6',
116
121
  text: disk.extra[vmMigrateDiskTableItemKeys[6]],
117
122
  id: key,
123
+ testId: `disk-table-${key}`,
118
124
  },
119
125
  {
120
126
  key: 'col7',
121
127
  text: disk.extra[vmMigrateDiskTableItemKeys[7]],
122
128
  id: key,
129
+ testId: `disk-table-${key}`,
123
130
  },
124
131
  {
125
132
  key: 'col8',
126
133
  text: disk.extra[vmMigrateDiskTableItemKeys[8]],
127
134
  id: key,
135
+ testId: `disk-table-${key}`,
128
136
  },
129
137
  {
130
138
  key: 'col9',
131
139
  text: disk.extra[vmMigrateDiskTableItemKeys[9]],
132
140
  id: key,
141
+ testId: `disk-table-${key}`,
133
142
  },
134
143
  {
135
144
  key: 'col10',
136
145
  text: disk.extra[vmMigrateDiskTableItemKeys[10]],
137
146
  id: key,
147
+ testId: `disk-table-${key}`,
138
148
  },
139
149
  ])
140
150
  })
@@ -1,21 +1,21 @@
1
- import type { UI_I_UseAppVersionReturnType } from '~/lib/models/composables/useAppVersion/interfaces'
2
-
3
- export function useAppVersion(): UI_I_UseAppVersionReturnType {
4
- const config = useRuntimeConfig()
5
- const version = config.public.APP_VERSION as string
6
-
7
- // const regexHasDot = /\./
8
- // const regexHasDotAndB = /\.\d*b$/
9
- // const regexHasDotAndD = /\..*d/
10
-
11
- // const isBeta = regexHasDotAndB.test(version)
12
- // const isDev =
13
- // regexHasDotAndD.test(version) ||
14
- // (!regexHasDot.test(version) && version.length < 8)
15
-
16
- return {
17
- version,
18
- // isBeta,
19
- // isDev,
20
- }
21
- }
1
+ import type { UI_I_UseAppVersionReturnType } from '~/lib/models/composables/useAppVersion/interfaces'
2
+
3
+ export function useAppVersion(): UI_I_UseAppVersionReturnType {
4
+ const config = useRuntimeConfig()
5
+ const version = config.public.APP_VERSION as string
6
+
7
+ // const regexHasDot = /\./
8
+ // const regexHasDotAndB = /\.\d*b$/
9
+ // const regexHasDotAndD = /\..*d/
10
+
11
+ // const isBeta = regexHasDotAndB.test(version)
12
+ // const isDev =
13
+ // regexHasDotAndD.test(version) ||
14
+ // (!regexHasDot.test(version) && version.length < 8)
15
+
16
+ return {
17
+ version,
18
+ // isBeta,
19
+ // isDev,
20
+ }
21
+ }
@@ -1,24 +1,24 @@
1
- import type { UI_I_Browse } from '~/lib/models/composables/useBrowse/interfaces'
2
-
3
- export const useBrowse = (): UI_I_Browse => {
4
- const browseInfo: UI_I_Browse = {
5
- version: '',
6
- type: '',
7
- }
8
- const userAgent = navigator.userAgent
9
- if (userAgent.match(/edg/i)) {
10
- browseInfo.version = userAgent.match(/Edg\/(\d+)/)?.[1] || ''
11
- browseInfo.type = 'edg'
12
- } else if (userAgent.match(/firefox|fxios/i)) {
13
- browseInfo.version = userAgent.match(/Firefox\/(\d+)/)?.[1] || ''
14
- browseInfo.type = 'firefox'
15
- } else if (userAgent.match(/chrome|chromium|crios/i)) {
16
- browseInfo.version = userAgent.match(/Chrome\/(\d+)/)?.[1] || ''
17
- browseInfo.type = 'chrome'
18
- } else if (userAgent.match(/safari/i)) {
19
- browseInfo.version = userAgent.match(/Safari\/(\d+)/)?.[1] || ''
20
- browseInfo.type = 'safari'
21
- }
22
-
23
- return browseInfo
24
- }
1
+ import type { UI_I_Browse } from '~/lib/models/composables/useBrowse/interfaces'
2
+
3
+ export const useBrowse = (): UI_I_Browse => {
4
+ const browseInfo: UI_I_Browse = {
5
+ version: '',
6
+ type: '',
7
+ }
8
+ const userAgent = navigator.userAgent
9
+ if (userAgent.match(/edg/i)) {
10
+ browseInfo.version = userAgent.match(/Edg\/(\d+)/)?.[1] || ''
11
+ browseInfo.type = 'edg'
12
+ } else if (userAgent.match(/firefox|fxios/i)) {
13
+ browseInfo.version = userAgent.match(/Firefox\/(\d+)/)?.[1] || ''
14
+ browseInfo.type = 'firefox'
15
+ } else if (userAgent.match(/chrome|chromium|crios/i)) {
16
+ browseInfo.version = userAgent.match(/Chrome\/(\d+)/)?.[1] || ''
17
+ browseInfo.type = 'chrome'
18
+ } else if (userAgent.match(/safari/i)) {
19
+ browseInfo.version = userAgent.match(/Safari\/(\d+)/)?.[1] || ''
20
+ browseInfo.type = 'safari'
21
+ }
22
+
23
+ return browseInfo
24
+ }
@@ -1,6 +1,6 @@
1
- import type { UI_I_Localization } from '~/lib/models/interfaces'
2
- import { useLocalCommon } from '~/composables/useLocalCommon'
3
-
4
- export const useLocal = (): UI_I_Localization => {
5
- return useLocalCommon()
6
- }
1
+ import type { UI_I_Localization } from '~/lib/models/interfaces'
2
+ import { useLocalCommon } from '~/composables/useLocalCommon'
3
+
4
+ export const useLocal = (): UI_I_Localization => {
5
+ return useLocalCommon()
6
+ }
@@ -1,39 +1,39 @@
1
- import type { UI_I_Localization } from '~/lib/models/interfaces'
2
- import localAr from '~/assets/scss/clarity/local_ar.json'
3
- import localRu from '~/assets/localization/local_ru.json'
4
- import localEn from '~/assets/localization/local_en.json'
5
- import localHy from '~/assets/localization/local_hy.json'
6
- import localZh from '~/assets/localization/local_zh.json'
7
- import localKk from '~/assets/localization/local_kk.json'
8
- import localBe from '~/assets/localization/local_be.json'
9
- import { productNameLocal } from '~/lib/utils/localizationMapper'
10
-
11
- const rawLocals: Record<string, any> = {
12
- ar: localAr,
13
- ru: localRu,
14
- en: localEn,
15
- hy: localHy,
16
- zh: localZh,
17
- kk: localKk,
18
- be: localBe,
19
- }
20
-
21
- // Кешируем уже обработанные локали
22
- const processedCache: Record<string, UI_I_Localization | undefined> = {}
23
-
24
- export const useLocalCommon = (): UI_I_Localization => {
25
- const config = useRuntimeConfig()
26
- let code = String(config?.public?.LOCALIZATION_CODE || 'ru').toLowerCase()
27
-
28
- if (code === 'ar' && !useLocalStorage('rtl')) code = 'ru'
29
-
30
- if (typeof document !== 'undefined') document.documentElement.lang = code
31
-
32
- // если в кеше нет — создаём и сохраняем
33
- if (!processedCache[code]) {
34
- const raw = rawLocals[code] || rawLocals['ru']
35
- processedCache[code] = productNameLocal(raw)
36
- }
37
-
38
- return processedCache[code] as UI_I_Localization
39
- }
1
+ import type { UI_I_Localization } from '~/lib/models/interfaces'
2
+ import localAr from '~/assets/scss/clarity/local_ar.json'
3
+ import localRu from '~/assets/localization/local_ru.json'
4
+ import localEn from '~/assets/localization/local_en.json'
5
+ import localHy from '~/assets/localization/local_hy.json'
6
+ import localZh from '~/assets/localization/local_zh.json'
7
+ import localKk from '~/assets/localization/local_kk.json'
8
+ import localBe from '~/assets/localization/local_be.json'
9
+ import { productNameLocal } from '~/lib/utils/localizationMapper'
10
+
11
+ const rawLocals: Record<string, any> = {
12
+ ar: localAr,
13
+ ru: localRu,
14
+ en: localEn,
15
+ hy: localHy,
16
+ zh: localZh,
17
+ kk: localKk,
18
+ be: localBe,
19
+ }
20
+
21
+ // Кешируем уже обработанные локали
22
+ const processedCache: Record<string, UI_I_Localization | undefined> = {}
23
+
24
+ export const useLocalCommon = (): UI_I_Localization => {
25
+ const config = useRuntimeConfig()
26
+ let code = String(config?.public?.LOCALIZATION_CODE || 'ru').toLowerCase()
27
+
28
+ if (code === 'ar' && !useLocalStorage('rtl')) code = 'ru'
29
+
30
+ if (typeof document !== 'undefined') document.documentElement.lang = code
31
+
32
+ // если в кеше нет — создаём и сохраняем
33
+ if (!processedCache[code]) {
34
+ const raw = rawLocals[code] || rawLocals['ru']
35
+ processedCache[code] = productNameLocal(raw)
36
+ }
37
+
38
+ return processedCache[code] as UI_I_Localization
39
+ }
@@ -8,7 +8,7 @@ const url = /https?:\/\/([a-zA-Zа-яА-Я0-9.-]+\.[a-zA-Zа-яА-Я]{2,6})\b/
8
8
  const specialChar = /[!@#$%^&*(),.?":{}|<>]/
9
9
  const specialCharWidthSpace = /[!@#$%^&*(),?":{}|<>]|(\s)|\.$/
10
10
  const cron = /^(\*|([0-9]|1[0-9]|2[0-9]|3[0-9]|4[0-9]|5[0-9])|\*\/([0-9]|1[0-9]|2[0-9]|3[0-9]|4[0-9]|5[0-9])) (\*|([0-9]|1[0-9]|2[0-3])|\*\/([0-9]|1[0-9]|2[0-3])) (\*|([1-9]|1[0-9]|2[0-9]|3[0-1])|\*\/([1-9]|1[0-9]|2[0-9]|3[0-1])) (\*|([1-9]|1[0-2])|\*\/([1-9]|1[0-2])) (\*|([0-6])|\*\/([0-6]))$/
11
- export const RegExp = {
11
+ export const allRegExp = {
12
12
  ip,
13
13
  email,
14
14
  password,
@@ -1,59 +1,59 @@
1
- export type UI_T_Project = 'sphere' | 'procurator'
2
-
3
- export type UI_T_Lang = 'ru' | 'en' | 'be' | 'hy' | 'kk' | 'zh'
4
-
5
- export type UI_T_NavNodes =
6
- // для Сферы
7
- | 'h'
8
- // для Прокуратора и Сферы
9
- | 'v'
10
- | 's'
11
- | 'n'
12
- | 'b'
13
-
14
- export type UI_T_Binary = 'KB' | 'MB' | 'GB' | 'TB' | 'PB' | 'EB' | 'ZB' | 'YB'
15
- export type UI_T_BinaryLower =
16
- | 'kb'
17
- | 'mb'
18
- | 'gb'
19
- | 'tb'
20
- | 'pb'
21
- | 'eb'
22
- | 'zb'
23
- | 'yb'
24
-
25
- export type UI_T_LangValue =
26
- | 'en_US'
27
- | 'ru_RU'
28
- | 'hy_AM'
29
- | 'zh_CHS'
30
- | 'kk_KZ'
31
- | 'be_BY'
32
- | 'BROWSER'
33
-
34
- export type UI_T_ProcuratorTypeNodes =
35
- | 'host'
36
- | 'vm'
37
- | 'datastore'
38
- | 'network'
39
- | 'folder'
40
- | 'file'
41
-
42
- export type UI_T_SphereTypeNodes =
43
- | UI_T_ProcuratorTypeNodes
44
- | 'zone'
45
- | 'datacenter'
46
- | 'cluster'
47
- | 'zone_dir'
48
- | 'dc_hc_dir'
49
- | 'dc_net_dir'
50
- | 'dc_ds_dir'
51
- | 'dc_vmt_dir'
52
- | 'dc_backup_dir'
53
- | 'IdentityProviders'
54
- | 'networks' // может быть это не нужный тип так как есть 'network' в UI_T_ProcuratorTypeNodes
55
- | 'backup_storage'
56
- | 'bucket'
57
- | 'vmtemplate' // TODO думаю нужно добавить в UI_T_ProcuratorTypeNodes
58
-
59
- export type UI_T_AllTypeNodes = UI_T_SphereTypeNodes
1
+ export type UI_T_Project = 'sphere' | 'procurator'
2
+
3
+ export type UI_T_Lang = 'ru' | 'en' | 'be' | 'hy' | 'kk' | 'zh'
4
+
5
+ export type UI_T_NavNodes =
6
+ // для Сферы
7
+ | 'h'
8
+ // для Прокуратора и Сферы
9
+ | 'v'
10
+ | 's'
11
+ | 'n'
12
+ | 'b'
13
+
14
+ export type UI_T_Binary = 'KB' | 'MB' | 'GB' | 'TB' | 'PB' | 'EB' | 'ZB' | 'YB'
15
+ export type UI_T_BinaryLower =
16
+ | 'kb'
17
+ | 'mb'
18
+ | 'gb'
19
+ | 'tb'
20
+ | 'pb'
21
+ | 'eb'
22
+ | 'zb'
23
+ | 'yb'
24
+
25
+ export type UI_T_LangValue =
26
+ | 'en_US'
27
+ | 'ru_RU'
28
+ | 'hy_AM'
29
+ | 'zh_CHS'
30
+ | 'kk_KZ'
31
+ | 'be_BY'
32
+ | 'BROWSER'
33
+
34
+ export type UI_T_ProcuratorTypeNodes =
35
+ | 'host'
36
+ | 'vm'
37
+ | 'datastore'
38
+ | 'network'
39
+ | 'folder'
40
+ | 'file'
41
+
42
+ export type UI_T_SphereTypeNodes =
43
+ | UI_T_ProcuratorTypeNodes
44
+ | 'zone'
45
+ | 'datacenter'
46
+ | 'cluster'
47
+ | 'zone_dir'
48
+ | 'dc_hc_dir'
49
+ | 'dc_net_dir'
50
+ | 'dc_ds_dir'
51
+ | 'dc_vmt_dir'
52
+ | 'dc_backup_dir'
53
+ | 'IdentityProviders'
54
+ | 'networks' // может быть это не нужный тип так как есть 'network' в UI_T_ProcuratorTypeNodes
55
+ | 'backup_storage'
56
+ | 'bucket'
57
+ | 'vmtemplate' // TODO думаю нужно добавить в UI_T_ProcuratorTypeNodes
58
+
59
+ export type UI_T_AllTypeNodes = UI_T_SphereTypeNodes
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bfg-common",
3
3
  "private": false,
4
- "version": "1.5.746",
4
+ "version": "1.5.748",
5
5
  "scripts": {
6
6
  "build": "nuxt build",
7
7
  "dev": "nuxt dev --port=3002",
@@ -1,21 +1,21 @@
1
- import { defineNuxtPlugin } from '#app'
2
- import type { UI_T_CODEC } from '~/components/common/spiceConsole/lib/models/types'
3
-
4
- export default defineNuxtPlugin(() => {
5
- const console = function (): any {
6
- const self: any = {
7
- codec: ref<UI_T_CODEC>(1),
8
- }
9
-
10
- self.changeCodec = (codec: UI_T_CODEC): void => {
11
- self.codec.value = codec
12
- }
13
- return self
14
- }.call({})
15
-
16
- return {
17
- provide: {
18
- console,
19
- },
20
- }
21
- })
1
+ import { defineNuxtPlugin } from '#app'
2
+ import type { UI_T_CODEC } from '~/components/common/spiceConsole/lib/models/types'
3
+
4
+ export default defineNuxtPlugin(() => {
5
+ const console = function (): any {
6
+ const self: any = {
7
+ codec: ref<UI_T_CODEC>(1),
8
+ }
9
+
10
+ self.changeCodec = (codec: UI_T_CODEC): void => {
11
+ self.codec.value = codec
12
+ }
13
+ return self
14
+ }.call({})
15
+
16
+ return {
17
+ provide: {
18
+ console,
19
+ },
20
+ }
21
+ })
package/plugins/mouse.ts CHANGED
@@ -1,21 +1,21 @@
1
- import { defineNuxtPlugin } from '#app'
2
- import type { UI_T_MouseMode } from '~/components/common/spiceConsole/lib/models/types'
3
-
4
- export default defineNuxtPlugin(() => {
5
- const mouse = function (): any {
6
- const self: any = {
7
- mode: ref<UI_T_MouseMode>(1),
8
- }
9
-
10
- self.changeMode = (mode: UI_T_MouseMode): void => {
11
- self.mode.value = mode
12
- }
13
- return self
14
- }.call({})
15
-
16
- return {
17
- provide: {
18
- mouse,
19
- },
20
- }
21
- })
1
+ import { defineNuxtPlugin } from '#app'
2
+ import type { UI_T_MouseMode } from '~/components/common/spiceConsole/lib/models/types'
3
+
4
+ export default defineNuxtPlugin(() => {
5
+ const mouse = function (): any {
6
+ const self: any = {
7
+ mode: ref<UI_T_MouseMode>(1),
8
+ }
9
+
10
+ self.changeMode = (mode: UI_T_MouseMode): void => {
11
+ self.mode.value = mode
12
+ }
13
+ return self
14
+ }.call({})
15
+
16
+ return {
17
+ provide: {
18
+ mouse,
19
+ },
20
+ }
21
+ })
@@ -1,70 +1,70 @@
1
- import { defineNuxtPlugin } from '#app'
2
- import type { UI_I_PanelOptions } from '~/lib/models/plugins/panelStates/interfaces'
3
-
4
- export default defineNuxtPlugin(() => {
5
- const panelStates = function (): any {
6
- const self: any = {}
7
- let options: UI_I_PanelOptions = {
8
- leftPanelWidth: 20,
9
- topPanelHeight: 80,
10
- isBottomPanelCollapsed: false,
11
- }
12
-
13
- self.setLeftPanelWidth = function (width: number): void {
14
- options.leftPanelWidth = width
15
-
16
- self.setPanelStatesInStorage()
17
- }
18
- self.setTopPanelHeight = function (height: number): void {
19
- options.topPanelHeight = height
20
-
21
- self.setPanelStatesInStorage()
22
- }
23
- self.bottomPanelCollapse = function (collapse: boolean): void {
24
- options.isBottomPanelCollapsed = collapse
25
-
26
- self.setPanelStatesInStorage()
27
- }
28
-
29
- self.setPanelStatesInStorage = function (): void {
30
- useLocalStorage('panelStates', options)
31
- self.emitChanges()
32
- }
33
- self.getPanelStatesOfStorage = function (): UI_I_PanelOptions {
34
- let panelStates = useLocalStorage('panelStates')
35
-
36
- if (!panelStates) {
37
- // const parent = document.getElementById('default-layout-outer')
38
- const parent = document.body
39
- const parentHeight = parent?.clientHeight || 0
40
- const onePercent = parentHeight / 100
41
- const defaultRecentTasksHeight = 250
42
-
43
- options.topPanelHeight =
44
- (parentHeight - defaultRecentTasksHeight - 1.5) / onePercent
45
-
46
- panelStates = options
47
- }
48
-
49
- options = panelStates
50
-
51
- return panelStates
52
- }
53
-
54
- self.cb = (): void => {}
55
- self.on = function (cb: () => any | void): void {
56
- self.cb = cb
57
- }
58
- self.emitChanges = function (): void {
59
- self.cb(options)
60
- }
61
-
62
- return self
63
- }.call({})
64
-
65
- return {
66
- provide: {
67
- panelStates,
68
- },
69
- }
70
- })
1
+ import { defineNuxtPlugin } from '#app'
2
+ import type { UI_I_PanelOptions } from '~/lib/models/plugins/panelStates/interfaces'
3
+
4
+ export default defineNuxtPlugin(() => {
5
+ const panelStates = function (): any {
6
+ const self: any = {}
7
+ let options: UI_I_PanelOptions = {
8
+ leftPanelWidth: 20,
9
+ topPanelHeight: 80,
10
+ isBottomPanelCollapsed: false,
11
+ }
12
+
13
+ self.setLeftPanelWidth = function (width: number): void {
14
+ options.leftPanelWidth = width
15
+
16
+ self.setPanelStatesInStorage()
17
+ }
18
+ self.setTopPanelHeight = function (height: number): void {
19
+ options.topPanelHeight = height
20
+
21
+ self.setPanelStatesInStorage()
22
+ }
23
+ self.bottomPanelCollapse = function (collapse: boolean): void {
24
+ options.isBottomPanelCollapsed = collapse
25
+
26
+ self.setPanelStatesInStorage()
27
+ }
28
+
29
+ self.setPanelStatesInStorage = function (): void {
30
+ useLocalStorage('panelStates', options)
31
+ self.emitChanges()
32
+ }
33
+ self.getPanelStatesOfStorage = function (): UI_I_PanelOptions {
34
+ let panelStates = useLocalStorage('panelStates')
35
+
36
+ if (!panelStates) {
37
+ // const parent = document.getElementById('default-layout-outer')
38
+ const parent = document.body
39
+ const parentHeight = parent?.clientHeight || 0
40
+ const onePercent = parentHeight / 100
41
+ const defaultRecentTasksHeight = 250
42
+
43
+ options.topPanelHeight =
44
+ (parentHeight - defaultRecentTasksHeight - 1.5) / onePercent
45
+
46
+ panelStates = options
47
+ }
48
+
49
+ options = panelStates
50
+
51
+ return panelStates
52
+ }
53
+
54
+ self.cb = (): void => {}
55
+ self.on = function (cb: () => any | void): void {
56
+ self.cb = cb
57
+ }
58
+ self.emitChanges = function (): void {
59
+ self.cb(options)
60
+ }
61
+
62
+ return self
63
+ }.call({})
64
+
65
+ return {
66
+ provide: {
67
+ panelStates,
68
+ },
69
+ }
70
+ })