bfg-common 1.0.50 → 1.0.52

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 (56) 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/modal/bySteps/BySteps.vue +234 -234
  6. package/components/atoms/nav/NavBar.vue +116 -116
  7. package/components/atoms/nav/VerticalNavBar.vue +89 -89
  8. package/components/atoms/notificationBar/NotificationBar.vue +174 -174
  9. package/components/atoms/perPage/PerPage.vue +52 -52
  10. package/components/atoms/popup/SimplePopup.vue +90 -90
  11. package/components/atoms/step/VerticalStep.vue +104 -104
  12. package/components/atoms/switch/Switch.vue +107 -107
  13. package/components/atoms/table/dataGrid/DataGridColumnSwitch.vue +204 -204
  14. package/components/atoms/table/dataGrid/DataGridPage.vue +189 -189
  15. package/components/atoms/table/dataGrid/DataGridPagination.vue +83 -83
  16. package/components/atoms/tabs/Tabs.vue +189 -189
  17. package/components/atoms/tooltip/Signpost.vue +224 -224
  18. package/components/common/accordion/Accordion.vue +13 -3
  19. package/components/common/accordion/Recursion.vue +23 -16
  20. package/components/common/accordion/models/interfaces.ts +1 -0
  21. package/components/common/accordion/utils/accordion.ts +31 -0
  22. package/components/common/adapterManager/AddAdapterWarningModal.vue +82 -82
  23. package/components/common/adapterManager/NoActiveAdaptersModal.vue +62 -62
  24. package/components/common/adapterManager/NoConnectedActiveAdaptersModal.vue +62 -62
  25. package/components/common/browse/Browse.vue +182 -182
  26. package/components/common/browse/blocks/Title.vue +66 -66
  27. package/components/common/diagramMain/adapter/AdapterItem.vue +227 -227
  28. package/components/common/diagramMain/adapter/AdapterItems.vue +57 -57
  29. package/components/common/diagramMain/modals/editSettings/tabs/port/IpvFourSettings.vue +339 -339
  30. package/components/common/diagramMain/modals/editSettings/tabs/port/PortProperties.vue +202 -202
  31. package/components/common/diagramMain/modals/remove/RemoveModal.vue +226 -226
  32. package/components/common/diagramMain/modals/viewSettings/Info.vue +94 -94
  33. package/components/common/diagramMain/network/Contents.vue +238 -238
  34. package/components/common/feedback/Buttons.vue +232 -232
  35. package/components/common/feedback/Message.vue +468 -468
  36. package/components/common/feedback/VisitPortal.vue +54 -54
  37. package/components/common/mainNavigationPanel/MainNavigationPanel.vue +359 -359
  38. package/components/common/modals/Rename.vue +165 -165
  39. package/components/common/perPage/PerPage.vue +51 -51
  40. package/components/common/recursionTree/RecursionTree.vue +201 -201
  41. package/components/common/wizards/datastore/add/nfs/configuration/Configuration.vue +373 -373
  42. package/components/common/wizards/datastore/add/nfs/configuration/serversList/ServersList.vue +123 -123
  43. package/components/common/wizards/datastore/add/nfs/kerberosAuthentication/KerberosAuthentication.vue +54 -54
  44. package/components/common/wizards/datastore/add/sharedStorm/deviceSelection/hostTable/HostTable.vue +131 -131
  45. package/components/common/wizards/datastore/add/sharedStorm/partitionConfiguration/PartitionConfiguration.vue +230 -230
  46. package/models/store/storage/interfaces.ts +32 -32
  47. package/package.json +1 -1
  48. package/public/spice-console/application/codec.js +257 -257
  49. package/public/spice-console/lib/rasterEngine.js +907 -907
  50. package/public/spice-console/network/spicechannel.js +369 -369
  51. package/public/spice-console-minify/lib/decoder/dixie.min.js +4 -4
  52. package/public/spice-console-minify/lib/jgestures.min.js +24 -24
  53. package/public/spice-console-minify/lib/jquery-2.0.3.min.js +24 -24
  54. package/public/spice-console-minify/lib/jquery-mousewheel.min.js +11 -11
  55. package/public/spice-console-minify/lib/jquery-visibility.min.js +1 -1
  56. package/public/spice-console-minify/lib/lodash.4.0.0.min.js +5 -5
@@ -1,224 +1,224 @@
1
- <template>
2
- <div
3
- id="signpost"
4
- :class="['signpost', signpostClass]"
5
- :style="signpostStyles"
6
- @click.stop
7
- @mouseenter="hovered = true"
8
- @mouseleave="hovered = false"
9
- >
10
- <div class="signpost-wrap">
11
- <div class="popover-pointer" />
12
- <div class="signpost-content-header">
13
- <button
14
- :id="`${props.testId}-close-icon`"
15
- class="signpost-action close"
16
- @click="hide"
17
- >
18
- <atoms-the-icon class="close-icon" name="close" />
19
- </button>
20
- </div>
21
- <div class="signpost-content-body">
22
- <slot />
23
- </div>
24
- </div>
25
- </div>
26
- </template>
27
-
28
- <script setup lang="ts">
29
- import { UI_I_ElPosition } from '~/components/atoms/tooltip/Models/interfaces'
30
- const props = withDefaults(
31
- defineProps<{
32
- elemId: string
33
- testId?: string
34
- }>(),
35
- { testId: 'ui-signpost' }
36
- )
37
- const emits = defineEmits<{
38
- (event: 'hide'): void
39
- }>()
40
- const hide = (): void => {
41
- emits('hide')
42
- }
43
-
44
- const signpostStyles = ref<UI_I_ElPosition | null>(null)
45
- watch(
46
- () => props.elemId,
47
- (id: string) => {
48
- const elem = (document.getElementById(id) as HTMLDivElement) || null
49
- const { width, x, y } = elem.getBoundingClientRect()
50
-
51
- signpostStyles.value = {
52
- top: `${y}px`,
53
- left: `${x + width / 2}px`,
54
- }
55
- setTimeout(() => {
56
- setSignpostPosition()
57
- }, 0)
58
- },
59
- { immediate: true }
60
- )
61
- const signpostClass = ref<string[]>([])
62
- const setSignpostPosition = (): void => {
63
- const signpost =
64
- (document.getElementById('signpost') as HTMLDivElement) || null
65
- const signpostRect = (signpost?.getBoundingClientRect() as DOMRect) || null
66
-
67
- type PositionX = 'right' | 'left'
68
- let positionX: PositionX = 'right'
69
-
70
- type PositionY = 'top' | 'middle'
71
- let positionY: PositionY = 'middle'
72
-
73
- const isOutRight = signpostRect.left + signpostRect.width > window.innerWidth
74
- const isOutTop = signpostRect.top < 0
75
-
76
- if (isOutTop) {
77
- positionY = 'top'
78
- }
79
- if (isOutRight) {
80
- positionX = 'left'
81
- }
82
-
83
- signpostClass.value.push(positionY)
84
- signpostClass.value.push(positionX)
85
- signpostClass.value.push('show')
86
- }
87
-
88
- const hovered = ref(false)
89
- const windowClick = (): void => {
90
- hide()
91
- }
92
- const windowScroll = (): void => {
93
- if (hovered.value) {
94
- return
95
- }
96
- hide()
97
- }
98
- onMounted(() => {
99
- setTimeout(() => {
100
- window.addEventListener('click', windowClick)
101
- window.addEventListener('scroll', windowScroll, true)
102
- })
103
- })
104
- onUnmounted(() => {
105
- window.removeEventListener('click', windowClick)
106
- window.removeEventListener('scroll', windowScroll, true)
107
- })
108
- </script>
109
-
110
- <style scoped lang="scss">
111
- .signpost {
112
- opacity: 0;
113
- position: fixed;
114
- cursor: default;
115
- transform: translateY(calc(-50% + 14px)) translateX(20px);
116
- z-index: 1000000000;
117
-
118
- &.show {
119
- opacity: 1;
120
- }
121
- &.left {
122
- transform: translateY(calc(-50% + 14px)) translateX(calc(-100% - 20px));
123
-
124
- .signpost-wrap {
125
- .popover-pointer {
126
- left: 100%;
127
- border-right: unset;
128
- border-left: 12px solid var(--signpost-border-color);
129
-
130
- &::before {
131
- border-right: unset;
132
- border-left: 12px solid var(--signpost-bgcolor);
133
- left: unset;
134
- right: 2px;
135
- }
136
- }
137
- }
138
- }
139
- &.top {
140
- transform: translateY(calc(0% + 10px)) translateX(20px);
141
-
142
- &.left {
143
- transform: translateY(calc(0% + 10px)) translateX(calc(-100% - 20px));
144
-
145
- .popover-pointer {
146
- top: 5px;
147
- }
148
- }
149
-
150
- .signpost-wrap {
151
- .popover-pointer {
152
- top: 5px;
153
- }
154
- }
155
- }
156
-
157
- .signpost-wrap {
158
- border-radius: 3px;
159
- border: 1px solid var(--signpost-border-color);
160
- background-color: var(--signpost-bgcolor);
161
- position: relative;
162
-
163
- .popover-pointer {
164
- border-bottom: 12px solid transparent;
165
- top: 50%;
166
- transform: translateY(-50%);
167
- border-right: 12px solid var(--signpost-border-color);
168
- left: -12px;
169
- height: 0;
170
- width: 0;
171
- position: absolute;
172
-
173
- &::before {
174
- border-bottom: 12px solid transparent;
175
- top: 1px;
176
- border-right: 12px solid var(--signpost-bgcolor);
177
- left: 2px;
178
- content: '';
179
- height: 0;
180
- width: 0;
181
- position: absolute;
182
- }
183
- }
184
-
185
- .signpost-content-header {
186
- display: flex;
187
- justify-content: flex-end;
188
- position: absolute;
189
- width: 100%;
190
- background-color: inherit;
191
- top: 0;
192
-
193
- button {
194
- line-height: 24px;
195
-
196
- .close-icon {
197
- width: 16px;
198
- height: 16px;
199
- }
200
- }
201
- }
202
-
203
- .signpost-content-body {
204
- padding: 24px;
205
- max-height: 480px;
206
- overflow-y: auto;
207
- text-transform: none;
208
- }
209
- }
210
- }
211
- </style>
212
-
213
- <style>
214
- :root {
215
- --signpost-bgcolor: #fff;
216
- --signpost-border-color: #b3b3b3;
217
- --signpost-color: #acbac3;
218
- }
219
- :root.dark-theme {
220
- --signpost-bgcolor: #21333b;
221
- --signpost-border-color: #000;
222
- --signpost-color: #acbac3;
223
- }
224
- </style>
1
+ <template>
2
+ <div
3
+ id="signpost"
4
+ :class="['signpost', signpostClass]"
5
+ :style="signpostStyles"
6
+ @click.stop
7
+ @mouseenter="hovered = true"
8
+ @mouseleave="hovered = false"
9
+ >
10
+ <div class="signpost-wrap">
11
+ <div class="popover-pointer" />
12
+ <div class="signpost-content-header">
13
+ <button
14
+ :id="`${props.testId}-close-icon`"
15
+ class="signpost-action close"
16
+ @click="hide"
17
+ >
18
+ <atoms-the-icon class="close-icon" name="close" />
19
+ </button>
20
+ </div>
21
+ <div class="signpost-content-body">
22
+ <slot />
23
+ </div>
24
+ </div>
25
+ </div>
26
+ </template>
27
+
28
+ <script setup lang="ts">
29
+ import { UI_I_ElPosition } from '~/components/atoms/tooltip/Models/interfaces'
30
+ const props = withDefaults(
31
+ defineProps<{
32
+ elemId: string
33
+ testId?: string
34
+ }>(),
35
+ { testId: 'ui-signpost' }
36
+ )
37
+ const emits = defineEmits<{
38
+ (event: 'hide'): void
39
+ }>()
40
+ const hide = (): void => {
41
+ emits('hide')
42
+ }
43
+
44
+ const signpostStyles = ref<UI_I_ElPosition | null>(null)
45
+ watch(
46
+ () => props.elemId,
47
+ (id: string) => {
48
+ const elem = (document.getElementById(id) as HTMLDivElement) || null
49
+ const { width, x, y } = elem.getBoundingClientRect()
50
+
51
+ signpostStyles.value = {
52
+ top: `${y}px`,
53
+ left: `${x + width / 2}px`,
54
+ }
55
+ setTimeout(() => {
56
+ setSignpostPosition()
57
+ }, 0)
58
+ },
59
+ { immediate: true }
60
+ )
61
+ const signpostClass = ref<string[]>([])
62
+ const setSignpostPosition = (): void => {
63
+ const signpost =
64
+ (document.getElementById('signpost') as HTMLDivElement) || null
65
+ const signpostRect = (signpost?.getBoundingClientRect() as DOMRect) || null
66
+
67
+ type PositionX = 'right' | 'left'
68
+ let positionX: PositionX = 'right'
69
+
70
+ type PositionY = 'top' | 'middle'
71
+ let positionY: PositionY = 'middle'
72
+
73
+ const isOutRight = signpostRect.left + signpostRect.width > window.innerWidth
74
+ const isOutTop = signpostRect.top < 0
75
+
76
+ if (isOutTop) {
77
+ positionY = 'top'
78
+ }
79
+ if (isOutRight) {
80
+ positionX = 'left'
81
+ }
82
+
83
+ signpostClass.value.push(positionY)
84
+ signpostClass.value.push(positionX)
85
+ signpostClass.value.push('show')
86
+ }
87
+
88
+ const hovered = ref(false)
89
+ const windowClick = (): void => {
90
+ hide()
91
+ }
92
+ const windowScroll = (): void => {
93
+ if (hovered.value) {
94
+ return
95
+ }
96
+ hide()
97
+ }
98
+ onMounted(() => {
99
+ setTimeout(() => {
100
+ window.addEventListener('click', windowClick)
101
+ window.addEventListener('scroll', windowScroll, true)
102
+ })
103
+ })
104
+ onUnmounted(() => {
105
+ window.removeEventListener('click', windowClick)
106
+ window.removeEventListener('scroll', windowScroll, true)
107
+ })
108
+ </script>
109
+
110
+ <style scoped lang="scss">
111
+ .signpost {
112
+ opacity: 0;
113
+ position: fixed;
114
+ cursor: default;
115
+ transform: translateY(calc(-50% + 14px)) translateX(20px);
116
+ z-index: 1000000000;
117
+
118
+ &.show {
119
+ opacity: 1;
120
+ }
121
+ &.left {
122
+ transform: translateY(calc(-50% + 14px)) translateX(calc(-100% - 20px));
123
+
124
+ .signpost-wrap {
125
+ .popover-pointer {
126
+ left: 100%;
127
+ border-right: unset;
128
+ border-left: 12px solid var(--signpost-border-color);
129
+
130
+ &::before {
131
+ border-right: unset;
132
+ border-left: 12px solid var(--signpost-bgcolor);
133
+ left: unset;
134
+ right: 2px;
135
+ }
136
+ }
137
+ }
138
+ }
139
+ &.top {
140
+ transform: translateY(calc(0% + 10px)) translateX(20px);
141
+
142
+ &.left {
143
+ transform: translateY(calc(0% + 10px)) translateX(calc(-100% - 20px));
144
+
145
+ .popover-pointer {
146
+ top: 5px;
147
+ }
148
+ }
149
+
150
+ .signpost-wrap {
151
+ .popover-pointer {
152
+ top: 5px;
153
+ }
154
+ }
155
+ }
156
+
157
+ .signpost-wrap {
158
+ border-radius: 3px;
159
+ border: 1px solid var(--signpost-border-color);
160
+ background-color: var(--signpost-bgcolor);
161
+ position: relative;
162
+
163
+ .popover-pointer {
164
+ border-bottom: 12px solid transparent;
165
+ top: 50%;
166
+ transform: translateY(-50%);
167
+ border-right: 12px solid var(--signpost-border-color);
168
+ left: -12px;
169
+ height: 0;
170
+ width: 0;
171
+ position: absolute;
172
+
173
+ &::before {
174
+ border-bottom: 12px solid transparent;
175
+ top: 1px;
176
+ border-right: 12px solid var(--signpost-bgcolor);
177
+ left: 2px;
178
+ content: '';
179
+ height: 0;
180
+ width: 0;
181
+ position: absolute;
182
+ }
183
+ }
184
+
185
+ .signpost-content-header {
186
+ display: flex;
187
+ justify-content: flex-end;
188
+ position: absolute;
189
+ width: 100%;
190
+ background-color: inherit;
191
+ top: 0;
192
+
193
+ button {
194
+ line-height: 24px;
195
+
196
+ .close-icon {
197
+ width: 16px;
198
+ height: 16px;
199
+ }
200
+ }
201
+ }
202
+
203
+ .signpost-content-body {
204
+ padding: 24px;
205
+ max-height: 480px;
206
+ overflow-y: auto;
207
+ text-transform: none;
208
+ }
209
+ }
210
+ }
211
+ </style>
212
+
213
+ <style>
214
+ :root {
215
+ --signpost-bgcolor: #fff;
216
+ --signpost-border-color: #b3b3b3;
217
+ --signpost-color: #acbac3;
218
+ }
219
+ :root.dark-theme {
220
+ --signpost-bgcolor: #21333b;
221
+ --signpost-border-color: #000;
222
+ --signpost-color: #acbac3;
223
+ }
224
+ </style>
@@ -19,8 +19,8 @@
19
19
  <common-accordion-recursion
20
20
  v-for="(item, key) in accordionLocal"
21
21
  :id="`${props.testId}-${key}`"
22
- :test-id="`${props.testId}-${key}`"
23
22
  :key="item.id"
23
+ :test-id="`${props.testId}-${key}`"
24
24
  :accordion="item"
25
25
  @change="onSelect"
26
26
  />
@@ -30,10 +30,12 @@
30
30
  <script setup lang="ts">
31
31
  import { vOnClickOutside } from '@vueuse/components'
32
32
  import { UI_I_AccordionRecursion } from '~/components/common/accordion/models/interfaces'
33
+ import { constructItems } from '~/components/common/accordion/utils/accordion'
33
34
 
34
35
  const props = defineProps<{
35
36
  testId: string
36
37
  accordion: UI_I_AccordionRecursion[]
38
+ isAllCollapsed?: boolean
37
39
  }>()
38
40
 
39
41
  const emits = defineEmits<{
@@ -42,8 +44,9 @@ const emits = defineEmits<{
42
44
 
43
45
  const parentName = ref<string>('')
44
46
  const childName = ref<string>('')
45
- const accordionLocal = computed<UI_I_AccordionRecursion[]>(
46
- () => props.accordion
47
+ const isAllCollapsedLocal = ref<boolean | null>(null)
48
+ const accordionLocal = computed<UI_I_AccordionRecursion[]>(() =>
49
+ constructItems(props.accordion, isAllCollapsedLocal.value)
47
50
  )
48
51
 
49
52
  const closeDropMenuMobile = (): void => {
@@ -91,6 +94,13 @@ const onSelect = (item: UI_I_AccordionRecursion): void => {
91
94
  }
92
95
  })
93
96
  }
97
+
98
+ watch(
99
+ () => props.isAllCollapsed,
100
+ (newValue) => {
101
+ isAllCollapsedLocal.value = newValue
102
+ }
103
+ )
94
104
  </script>
95
105
 
96
106
  <style lang="scss">
@@ -1,13 +1,10 @@
1
1
  <template>
2
- <div
3
- class="accordion"
4
- :class="{ isOpen, disabled: props.accordion.disabled }"
5
- >
6
- <NuxtLink
2
+ <div class="accordion" :class="{ disabled: props.accordion.disabled }">
3
+ <nuxt-link
7
4
  class="accordion-item"
8
- :to="accordion.path"
5
+ :to="accordionLocal.path"
9
6
  active-class="active"
10
- @click.prevent="onSelect(accordion)"
7
+ @click.prevent="onSelect(accordionLocal)"
11
8
  >
12
9
  <div
13
10
  :class="['heading-wrap', { group: props.accordion.hasChild }]"
@@ -28,10 +25,18 @@
28
25
  :id="`${props.testId}-trigger-button`"
29
26
  class="btn-trigger"
30
27
  >
31
- <atoms-the-icon class="trigger-icon" name="angle" />
28
+ <atoms-the-icon
29
+ :class="[
30
+ 'trigger-icon',
31
+ {
32
+ isOpen: accordionLocal.isOpen,
33
+ },
34
+ ]"
35
+ name="angle"
36
+ />
32
37
  </button>
33
38
  </div>
34
- </NuxtLink>
39
+ </nuxt-link>
35
40
 
36
41
  <transition
37
42
  v-if="props.accordion.hasChild"
@@ -41,11 +46,11 @@
41
46
  @before-leave="start"
42
47
  @leave="end"
43
48
  >
44
- <div v-show="isOpen" class="accordion__content">
49
+ <div v-show="accordionLocal.isOpen" class="accordion__content">
45
50
  <common-accordion-recursion
46
51
  v-for="(item, key) in props.accordion.children"
47
- :test-id="`${props.testId}-${key}`"
48
52
  :key="item.id"
53
+ :test-id="`${props.testId}-${key}`"
49
54
  :accordion="item"
50
55
  :level="props.level + 1"
51
56
  @change="onSelect"
@@ -73,14 +78,16 @@ const emits = defineEmits<{
73
78
  (event: 'change', value: UI_I_AccordionRecursion): void
74
79
  }>()
75
80
 
76
- const isOpen = ref<boolean>(true)
81
+ const accordionLocal = ref<UI_I_AccordionRecursion>(props.accordion)
82
+
77
83
  const toggle = (): void => {
78
84
  if (!props.accordion.hasChild) return
79
- isOpen.value = !isOpen.value
85
+
86
+ accordionLocal.value.isOpen = !accordionLocal.value.isOpen
80
87
  }
81
88
 
82
89
  const start = (element: any): void => {
83
- element.style.height = element.scrollHeight + 'px'
90
+ element.style.height = 'auto'
84
91
  }
85
92
  const end = (el: any): void => {
86
93
  el.style.height = 0
@@ -93,7 +100,7 @@ const headingClass = computed<UI_I_HeadingClass>(() => {
93
100
  }
94
101
  })
95
102
 
96
- const onSelect = (item: UI_I_AccordionRecursion) => {
103
+ const onSelect = (item: UI_I_AccordionRecursion): void => {
97
104
  emits('change', item)
98
105
  }
99
106
  </script>
@@ -187,7 +194,7 @@ const onSelect = (item: UI_I_AccordionRecursion) => {
187
194
  transform: rotate(90deg);
188
195
  margin-left: auto;
189
196
  fill: var(--triger-icon-color);
190
- .isOpen & {
197
+ &.isOpen {
191
198
  transform: rotate(180deg);
192
199
  }
193
200
  }
@@ -6,6 +6,7 @@ export interface UI_I_AccordionRecursion {
6
6
  path?: string
7
7
  iconClassName?: string
8
8
  children?: UI_I_AccordionRecursion[]
9
+ isOpen?: boolean
9
10
  }
10
11
 
11
12
  export interface UI_I_HeadingClass {
@@ -0,0 +1,31 @@
1
+ import { UI_I_AccordionRecursion } from '~/components/common/accordion/models/interfaces'
2
+
3
+ const collapseRecursion = (
4
+ accordion: UI_I_AccordionRecursion[],
5
+ isOpen: boolean
6
+ ): UI_I_AccordionRecursion[] =>
7
+ accordion.map((item) => {
8
+ item.isOpen = isOpen
9
+ if (item.hasChild && item.children?.length) {
10
+ item.children = collapseRecursion(item.children, isOpen)
11
+ }
12
+
13
+ return item
14
+ })
15
+
16
+ const defaultShow = (
17
+ accordion: UI_I_AccordionRecursion[]
18
+ ): UI_I_AccordionRecursion[] =>
19
+ accordion.map((item) => {
20
+ if (item.isOpen !== false) item.isOpen = true
21
+
22
+ return item
23
+ })
24
+
25
+ export const constructItems = (
26
+ accordion: UI_I_AccordionRecursion[],
27
+ isOpen: boolean | null
28
+ ): UI_I_AccordionRecursion[] =>
29
+ isOpen === null
30
+ ? defaultShow(accordion)
31
+ : collapseRecursion(accordion, isOpen)