bfg-common 1.0.98 → 1.0.99

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 (68) hide show
  1. package/components/atoms/alert/Notification.vue +167 -167
  2. package/components/atoms/autocomplete/Autocomplete.vue +236 -236
  3. package/components/atoms/datepicker/Datepicker.vue +612 -612
  4. package/components/atoms/list/SelectList.vue +62 -62
  5. package/components/atoms/nav/NavBar.vue +116 -116
  6. package/components/atoms/nav/VerticalNavBar.vue +89 -89
  7. package/components/atoms/notificationBar/NotificationBar.vue +174 -174
  8. package/components/atoms/perPage/PerPage.vue +52 -52
  9. package/components/atoms/popup/SimplePopup.vue +90 -90
  10. package/components/atoms/step/VerticalStep.vue +104 -104
  11. package/components/atoms/switch/Switch.vue +107 -107
  12. package/components/atoms/table/dataGrid/DataGridColumnSwitch.vue +204 -204
  13. package/components/atoms/table/dataGrid/DataGridPage.vue +189 -189
  14. package/components/atoms/tabs/Tabs.vue +189 -189
  15. package/components/atoms/tooltip/Signpost.vue +224 -224
  16. package/components/common/adapterManager/AddAdapterWarningModal.vue +82 -82
  17. package/components/common/adapterManager/NoActiveAdaptersModal.vue +62 -62
  18. package/components/common/adapterManager/NoConnectedActiveAdaptersModal.vue +62 -62
  19. package/components/common/browse/Browse.vue +182 -182
  20. package/components/common/browse/blocks/Title.vue +66 -66
  21. package/components/common/diagramMain/adapter/AdapterItem.vue +227 -227
  22. package/components/common/diagramMain/adapter/AdapterItems.vue +57 -57
  23. package/components/common/diagramMain/modals/editSettings/tabs/port/IpvFourSettings.vue +339 -339
  24. package/components/common/diagramMain/modals/editSettings/tabs/port/PortProperties.vue +202 -202
  25. package/components/common/diagramMain/modals/remove/RemoveModal.vue +226 -226
  26. package/components/common/diagramMain/network/Contents.vue +238 -238
  27. package/components/common/feedback/Buttons.vue +232 -232
  28. package/components/common/feedback/Message.vue +468 -468
  29. package/components/common/feedback/VisitPortal.vue +54 -54
  30. package/components/common/help/navbar/left/Left.vue +139 -139
  31. package/components/common/help/navbar/left/utils/constructAccordion.ts +27 -27
  32. package/components/common/mainNavigationPanel/MainNavigationPanel.vue +359 -359
  33. package/components/common/modals/Rename.vue +165 -165
  34. package/components/common/perPage/PerPage.vue +51 -51
  35. package/components/common/recursionTree/RecursionTree.vue +201 -201
  36. package/components/common/wizards/datastore/add/nfs/configuration/Configuration.vue +373 -373
  37. package/components/common/wizards/datastore/add/nfs/configuration/serversList/ServersList.vue +123 -123
  38. package/components/common/wizards/datastore/add/nfs/kerberosAuthentication/KerberosAuthentication.vue +54 -54
  39. package/components/common/wizards/datastore/add/sharedStorm/deviceSelection/hostTable/HostTable.vue +131 -131
  40. package/components/common/wizards/datastore/add/sharedStorm/partitionConfiguration/PartitionConfiguration.vue +230 -230
  41. package/components/content/Hint.vue +24 -0
  42. package/models/store/storage/interfaces.ts +32 -32
  43. package/modules/fixContentBuild/index.ts +84 -65
  44. package/modules/fixContentBuild/utils/methods.ts +36 -9
  45. package/package.json +1 -1
  46. package/public/spice-console/application/codec.js +257 -257
  47. package/public/spice-console/lib/rasterEngine.js +907 -907
  48. package/public/spice-console/network/spicechannel.js +369 -369
  49. package/public/spice-console-minify/lib/decoder/dixie.min.js +4 -4
  50. package/public/spice-console-minify/lib/jgestures.min.js +24 -24
  51. package/public/spice-console-minify/lib/jquery-2.0.3.min.js +24 -24
  52. package/public/spice-console-minify/lib/jquery-mousewheel.min.js +11 -11
  53. package/public/spice-console-minify/lib/jquery-visibility.min.js +1 -1
  54. package/public/spice-console-minify/lib/lodash.4.0.0.min.js +5 -5
  55. package/utils/contentBuild.ts +34 -34
  56. package/components/common/home/Card.vue +0 -63
  57. package/components/common/home/ResourceBlock.vue +0 -117
  58. package/components/common/home/StatusContent.vue +0 -47
  59. package/components/common/home/alertsTable/AlertsTable.vue +0 -105
  60. package/components/common/home/alertsTable/config/config.ts +0 -61
  61. package/components/common/home/alertsTable/models/enums.ts +0 -11
  62. package/components/common/home/alertsTable/models/interfaces.ts +0 -19
  63. package/components/common/home/alertsTable/models/types.ts +0 -17
  64. package/components/common/home/config/configResourceMeterBlock.ts +0 -25
  65. package/components/common/home/models/interfaces.ts +0 -59
  66. package/components/common/home/models/types.ts +0 -18
  67. package/components/common/home/servicesTable/ServicesTable.vue +0 -79
  68. package/components/common/home/servicesTable/config/config.ts +0 -62
@@ -1,65 +1,84 @@
1
- import { defineNuxtModule } from '@nuxt/kit'
2
- const fs = require('fs')
3
- const path = require('path')
4
- import {
5
- replaceFileContent,
6
- removeNonImageFiles,
7
- removeImagesFromContent,
8
- updateImagesPath,
9
- } from './utils/methods'
10
-
11
- export default defineNuxtModule({
12
- meta: {
13
- name: 'fix-content-build',
14
- configKey: 'fixContentBuild',
15
- },
16
- setup() {
17
- if (
18
- process.env.NODE_ENV === 'development' ||
19
- process.env.npm_command !== 'exec'
20
- )
21
- return
22
-
23
- // Правим путь к файлу
24
- const filePath = path.join(
25
- __dirname.replace('/bfg-common/modules/fixContentBuild', ''),
26
- '@nuxt',
27
- 'content',
28
- 'dist',
29
- 'runtime',
30
- 'legacy',
31
- 'composables',
32
- 'query.mjs'
33
- )
34
- const searchString = '/query/${hash(params)}'
35
- const replacementString = 'cache'
36
- replaceFileContent(filePath, searchString, replacementString)
37
- // End block
38
-
39
- // Переносим весь контент и удаляем все файлы кроме картинок
40
- const contentPath = path.join(
41
- __dirname.replace('/node_modules/bfg-common/modules/fixContentBuild', ''),
42
- 'content',
43
- 'help'
44
- )
45
- if (!fs.existsSync(contentPath)) return
46
-
47
- const publicPath = path.join(
48
- __dirname.replace('/node_modules/bfg-common/modules/fixContentBuild', ''),
49
- 'public',
50
- 'help',
51
- 'images'
52
- )
53
- fs.cp(contentPath, publicPath, { recursive: true }, () => {
54
- // Удаляем все файлы кроме картинок
55
- removeNonImageFiles(publicPath)
56
-
57
- // Удаляем картинки из папки content
58
- removeImagesFromContent(contentPath)
59
- })
60
- // End block
61
-
62
- // Правим путь к картинкам
63
- updateImagesPath(contentPath)
64
- },
65
- })
1
+ import { defineNuxtModule } from '@nuxt/kit'
2
+ const fs = require('fs')
3
+ const path = require('path')
4
+ import {
5
+ replaceFileContent,
6
+ removeNonImageFiles,
7
+ removeImagesFromContent,
8
+ updateImagesPath,
9
+ updateCustomComponents,
10
+ } from './utils/methods'
11
+
12
+ const npmDev = (): void => {
13
+ const contentPath = path.join(
14
+ __dirname.replace('/node_modules/bfg-common/modules/fixContentBuild', ''),
15
+ 'content',
16
+ 'help'
17
+ )
18
+ // Заменяем кастомные тэги
19
+ updateCustomComponents(contentPath)
20
+ }
21
+
22
+ const npmGenerate = (): void => {
23
+ // Правим путь к файлу
24
+ const filePath = path.join(
25
+ __dirname.replace('/bfg-common/modules/fixContentBuild', ''),
26
+ '@nuxt',
27
+ 'content',
28
+ 'dist',
29
+ 'runtime',
30
+ 'legacy',
31
+ 'composables',
32
+ 'query.mjs'
33
+ )
34
+ const searchString = '/query/${hash(params)}'
35
+ const replacementString = 'cache'
36
+ replaceFileContent(filePath, searchString, replacementString)
37
+ // End block
38
+
39
+ // Переносим весь контент и удаляем все файлы кроме картинок
40
+ const contentPath = path.join(
41
+ __dirname.replace('/node_modules/bfg-common/modules/fixContentBuild', ''),
42
+ 'content',
43
+ 'help'
44
+ )
45
+ if (!fs.existsSync(contentPath)) return
46
+
47
+ const publicPath = path.join(
48
+ __dirname.replace('/node_modules/bfg-common/modules/fixContentBuild', ''),
49
+ 'public',
50
+ 'help',
51
+ 'images'
52
+ )
53
+ fs.cp(contentPath, publicPath, { recursive: true }, () => {
54
+ // Удаляем все файлы кроме картинок
55
+ removeNonImageFiles(publicPath)
56
+
57
+ // Удаляем картинки из папки content
58
+ removeImagesFromContent(contentPath)
59
+ })
60
+ // End block
61
+
62
+ // Правим путь к картинкам
63
+ updateImagesPath(contentPath)
64
+
65
+ // Заменяем кастомные тэги
66
+ updateCustomComponents(contentPath)
67
+ }
68
+
69
+ export default defineNuxtModule({
70
+ meta: {
71
+ name: 'fix-content-build',
72
+ configKey: 'fixContentBuild',
73
+ },
74
+ setup() {
75
+ switch (process.env.npm_command) {
76
+ case 'run-script':
77
+ npmDev()
78
+ break
79
+ case 'exec':
80
+ npmGenerate()
81
+ break
82
+ }
83
+ },
84
+ })
@@ -1,5 +1,5 @@
1
- import path from 'path';
2
- import fs from 'fs';
1
+ import path from 'path'
2
+ import fs from 'fs'
3
3
 
4
4
  const isImage = (fileName: string) => {
5
5
  const imageExtensions = ['.png', '.jpeg', '.jpg']
@@ -41,9 +41,9 @@ export const removeImagesFromContent = (dirPath: string) => {
41
41
  const filePathWidthOutPrefix = filePath.replace('_index.md', 'index.md')
42
42
  fs.rename(filePath, filePathWidthOutPrefix, (err: any) => {
43
43
  if (err) {
44
- console.error(`Error renaming file: ${err}`);
44
+ console.error(`Error renaming file: ${err}`)
45
45
  }
46
- });
46
+ })
47
47
  }
48
48
  }
49
49
  })
@@ -59,10 +59,36 @@ export const updateImagesPath = (dirPath: string) => {
59
59
  } else {
60
60
  if (isMdFile(file)) {
61
61
  // @ts-ignore
62
- const imagePath = filePath.replaceAll('\\', '/')
62
+ const imagePath = filePath
63
+ .replaceAll('\\', '/')
63
64
  .match(/\/content.+\//)[0]
64
- .replace('\/content\/help', '\/help\/images')
65
- replaceFileContent(filePath, /!\[(.*)\]\((.*?)\)/g, `![$1](${imagePath}$2)`)
65
+ .replace('/content/help', '/help/images')
66
+ replaceFileContent(
67
+ filePath,
68
+ /!\[(.*)\]\((.*?)\)/g,
69
+ `![$1](${imagePath}$2)`
70
+ )
71
+ }
72
+ }
73
+ })
74
+ }
75
+
76
+ export const updateCustomComponents = (dirPath: string) => {
77
+ fs.readdirSync(dirPath).forEach((file: string) => {
78
+ const filePath = path.join(dirPath, file)
79
+ const isDir = fs.lstatSync(filePath).isDirectory()
80
+
81
+ if (isDir) {
82
+ updateCustomComponents(filePath)
83
+ } else {
84
+ if (isMdFile(file)) {
85
+ replaceFileContent(
86
+ filePath,
87
+ /{{ *< *hint *(info) *> *}}|{{ *< *\/hint *> *}}/g,
88
+ (_match: any, hintInfo: string) => {
89
+ return hintInfo ? '::hint' : '::'
90
+ }
91
+ )
66
92
  }
67
93
  }
68
94
  })
@@ -71,14 +97,15 @@ export const updateImagesPath = (dirPath: string) => {
71
97
  export const replaceFileContent = (
72
98
  filePath: string,
73
99
  searchString: string | RegExp,
74
- replacementString: string
100
+ replacementString: any
75
101
  ) => {
76
102
  fs.readFile(filePath, 'utf8', (err: any, data: string) => {
77
103
  if (err) {
78
104
  return console.log(err)
79
105
  }
80
106
 
81
- if (data.match(replacementString)) return
107
+ if (typeof replacementString === 'string' && data.match(replacementString))
108
+ return
82
109
 
83
110
  const updatedContent = data.replace(searchString, replacementString)
84
111
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bfg-common",
3
3
  "private": false,
4
- "version": "1.0.98",
4
+ "version": "1.0.99",
5
5
  "scripts": {
6
6
  "build": "nuxt build",
7
7
  "dev": "nuxt dev --port=3002",