bfg-common 1.0.97 → 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 (71) 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/{content → help}/navbar/left/Left.vue +139 -139
  31. package/components/common/{content → help}/navbar/left/utils/constructAccordion.ts +27 -27
  32. package/components/common/{content → help}/navbar/right/Right.vue +1 -1
  33. package/components/common/mainNavigationPanel/MainNavigationPanel.vue +359 -359
  34. package/components/common/modals/Rename.vue +165 -165
  35. package/components/common/perPage/PerPage.vue +51 -51
  36. package/components/common/recursionTree/RecursionTree.vue +201 -201
  37. package/components/common/wizards/datastore/add/nfs/configuration/Configuration.vue +373 -373
  38. package/components/common/wizards/datastore/add/nfs/configuration/serversList/ServersList.vue +123 -123
  39. package/components/common/wizards/datastore/add/nfs/kerberosAuthentication/KerberosAuthentication.vue +54 -54
  40. package/components/common/wizards/datastore/add/sharedStorm/deviceSelection/hostTable/HostTable.vue +131 -131
  41. package/components/common/wizards/datastore/add/sharedStorm/partitionConfiguration/PartitionConfiguration.vue +230 -230
  42. package/components/content/Hint.vue +24 -0
  43. package/models/store/storage/interfaces.ts +32 -32
  44. package/modules/fixContentBuild/index.ts +84 -117
  45. package/modules/fixContentBuild/utils/methods.ts +36 -9
  46. package/package.json +1 -1
  47. package/public/spice-console/application/codec.js +257 -257
  48. package/public/spice-console/lib/rasterEngine.js +907 -907
  49. package/public/spice-console/network/spicechannel.js +369 -369
  50. package/public/spice-console-minify/lib/decoder/dixie.min.js +4 -4
  51. package/public/spice-console-minify/lib/jgestures.min.js +24 -24
  52. package/public/spice-console-minify/lib/jquery-2.0.3.min.js +24 -24
  53. package/public/spice-console-minify/lib/jquery-mousewheel.min.js +11 -11
  54. package/public/spice-console-minify/lib/jquery-visibility.min.js +1 -1
  55. package/public/spice-console-minify/lib/lodash.4.0.0.min.js +5 -5
  56. package/utils/contentBuild.ts +34 -0
  57. package/components/common/home/Card.vue +0 -63
  58. package/components/common/home/ResourceBlock.vue +0 -117
  59. package/components/common/home/StatusContent.vue +0 -47
  60. package/components/common/home/alertsTable/AlertsTable.vue +0 -105
  61. package/components/common/home/alertsTable/config/config.ts +0 -61
  62. package/components/common/home/alertsTable/models/enums.ts +0 -11
  63. package/components/common/home/alertsTable/models/interfaces.ts +0 -19
  64. package/components/common/home/alertsTable/models/types.ts +0 -17
  65. package/components/common/home/config/configResourceMeterBlock.ts +0 -25
  66. package/components/common/home/models/interfaces.ts +0 -59
  67. package/components/common/home/models/types.ts +0 -18
  68. package/components/common/home/servicesTable/ServicesTable.vue +0 -79
  69. package/components/common/home/servicesTable/config/config.ts +0 -62
  70. /package/components/common/{content → help}/navbar/left/models/interfaces.ts +0 -0
  71. /package/components/common/{content → help}/navbar/right/models/interfaces.ts +0 -0
@@ -1,117 +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('/modules/fixContentBuild', ''),
26
- // 'node_modules',
27
- // '@nuxt',
28
- // 'content',
29
- // 'dist',
30
- // 'runtime',
31
- // 'legacy',
32
- // 'composables',
33
- // 'query.mjs'
34
- // )
35
- // const searchString = '/query/${hash(params)}'
36
- // const replacementString = 'cache'
37
- // replaceFileContent(filePath, searchString, replacementString)
38
- // // End block
39
- //
40
- // // Переносим весь контент и удаляем все файлы кроме картинок
41
- // const contentPath = path.join(
42
- // __dirname.replace('/modules/fixContentBuild', ''),
43
- // 'content',
44
- // 'help'
45
- // )
46
- // if (!fs.existsSync(contentPath)) return;
47
- //
48
- // const publicPath = path.join(
49
- // __dirname.replace('/modules/fixContentBuild', ''),
50
- // 'public',
51
- // 'help',
52
- // 'images'
53
- // )
54
- // fs.cp(contentPath, publicPath, { recursive: true }, () => {
55
- // // Удаляем все файлы кроме картинок
56
- // removeNonImageFiles(publicPath)
57
- //
58
- // // Удаляем картинки из папки content
59
- // removeImagesFromContent(contentPath)
60
- // })
61
- // // End block
62
- //
63
- // // Правим путь к картинкам
64
- // updateImagesPath(contentPath)
65
- // }
66
- // })
67
- // @ts-ignore
68
- export default defineNuxtModule(() => {
69
- if (
70
- process.env.NODE_ENV === 'development' ||
71
- process.env.npm_command !== 'exec'
72
- )
73
- return
74
-
75
- // Правим путь к файлу
76
- const filePath = path.join(
77
- __dirname.replace('/modules/fixContentBuild', ''),
78
- 'node_modules',
79
- '@nuxt',
80
- 'content',
81
- 'dist',
82
- 'runtime',
83
- 'legacy',
84
- 'composables',
85
- 'query.mjs'
86
- )
87
- const searchString = '/query/${hash(params)}'
88
- const replacementString = 'cache'
89
- replaceFileContent(filePath, searchString, replacementString)
90
- // End block
91
-
92
- // Переносим весь контент и удаляем все файлы кроме картинок
93
- const contentPath = path.join(
94
- __dirname.replace('/modules/fixContentBuild', ''),
95
- 'content',
96
- 'help'
97
- )
98
- if (!fs.existsSync(contentPath)) return;
99
-
100
- const publicPath = path.join(
101
- __dirname.replace('/modules/fixContentBuild', ''),
102
- 'public',
103
- 'help',
104
- 'images'
105
- )
106
- fs.cp(contentPath, publicPath, { recursive: true }, () => {
107
- // Удаляем все файлы кроме картинок
108
- removeNonImageFiles(publicPath)
109
-
110
- // Удаляем картинки из папки content
111
- removeImagesFromContent(contentPath)
112
- })
113
- // End block
114
-
115
- // Правим путь к картинкам
116
- updateImagesPath(contentPath)
117
- })
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.97",
4
+ "version": "1.0.99",
5
5
  "scripts": {
6
6
  "build": "nuxt build",
7
7
  "dev": "nuxt dev --port=3002",