bfg-common 1.2.96 → 1.2.97

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.
@@ -269,6 +269,28 @@
269
269
  </g>
270
270
  </svg>
271
271
  </template>
272
+ <template v-else-if="props.name === 'adapter-item-icon-dark'">
273
+ <svg
274
+ xmlns="http://www.w3.org/2000/svg"
275
+ version="1.1"
276
+ x="136.7"
277
+ y="121"
278
+ viewBox="-1 -1 18 18"
279
+ xml:space="preserve"
280
+ width="18"
281
+ height="18"
282
+ >
283
+ <g transform="translate(54 236)">
284
+ <g>
285
+ <path fill="#6d7884" d="M-45.5-221.5v-2h-8v-9h15v11z" />
286
+ <path
287
+ fill="#e9ecef"
288
+ d="M-39-232v10h-6v-2h-8v-8h14zm1-1h-16v10h8v2h8v-12z"
289
+ />
290
+ </g>
291
+ </g>
292
+ </svg>
293
+ </template>
272
294
  <template v-else-if="props.name === 'vsphere-icon-device'">
273
295
  <svg
274
296
  xmlns="http://www.w3.org/2000/svg"
@@ -25,6 +25,7 @@
25
25
  :selected-adapter="props.selectedAdapter"
26
26
  :selected-network="props.selectedNetwork"
27
27
  :is-visible-line="hasActiveAdapter"
28
+ :is-dark-mode="props.isDarkMode"
28
29
  @toggle-adapters="onToggleAdapters"
29
30
  @select-adapter="onSelectAdapter"
30
31
  @show-modal="onShowModal"
@@ -85,13 +86,18 @@ const props = defineProps<{
85
86
  selectedAdapter: UI_I_SelectedAdapter
86
87
  selectedNetwork: string
87
88
  selectedSwitchLineY: UI_I_SwitchLine
89
+ isDarkMode: boolean
88
90
  }>()
89
91
 
90
92
  const emits = defineEmits<{
91
93
  (event: 'click-diagram', ev: MouseEvent): void
92
94
  (event: 'toggle-adapters'): void
93
95
  (event: 'select-adapter', adapterId: string): void
94
- (event: 'show-modal', value: string, properties?: UI_I_ModalsInitialData): void
96
+ (
97
+ event: 'show-modal',
98
+ value: string,
99
+ properties?: UI_I_ModalsInitialData
100
+ ): void
95
101
  (
96
102
  event: 'toggle-ports',
97
103
  id: string,
@@ -112,9 +118,9 @@ const preserveAspectRatio = computed<string | undefined>(() =>
112
118
 
113
119
  const svgHeight = computed<number>(
114
120
  () =>
115
- UI_E_PositionsY.DIAGRAM_TOP +
121
+ UI_E_PositionsY.DIAGRAM_TOP +
116
122
  props.mainRectHeight +
117
- UI_E_PositionsY.DIAGRAM_BOTTOM
123
+ UI_E_PositionsY.DIAGRAM_BOTTOM
118
124
  )
119
125
 
120
126
  const viewBox = computed<string>(() =>
@@ -24,6 +24,7 @@
24
24
  :selected-adapter="selectedAdapter"
25
25
  :selected-network="selectedNetwork"
26
26
  :selected-switch-line-y="selectedSwitchLineY"
27
+ :is-dark-mode="props.isDarkMode"
27
28
  @click-diagram="onClickDiagram"
28
29
  @toggle-adapters="onToggleAdapters"
29
30
  @select-adapter="onSelectAdapter"
@@ -296,6 +297,7 @@ const props = withDefaults(
296
297
  adapters?: UI_I_SwitchAdapters
297
298
  freeAdapters?: UI_I_Adapter[]
298
299
  networksList?: UI_I_NetworkFull[]
300
+ isDarkMode: boolean
299
301
  }>(),
300
302
  {
301
303
  diagramData: null,
@@ -561,8 +563,8 @@ const onShowModal = (
561
563
  }
562
564
  const onRemoveNetwork = (label: string) => {
563
565
  isShowRemoveModalLoader.value = true
564
- const id = props.networksList.find(network => network.title === label)!.id
565
- emits('remove-network', { id, hideModalCB: onHideNetworkRemoveModal })
566
+ const id = props.networksList.find((network) => network.title === label)!.id
567
+ emits('remove-network', { id, hideModalCB: onHideNetworkRemoveModal })
566
568
  }
567
569
  const onRemoveSwitch = (id: string) => {
568
570
  isShowRemoveModalLoader.value = true
@@ -71,7 +71,7 @@ const props = withDefaults(
71
71
  d: '',
72
72
  hide: true,
73
73
  strokeWidth: 2,
74
- dataTitle: ''
74
+ dataTitle: '',
75
75
  }
76
76
  )
77
77
 
@@ -81,6 +81,28 @@ const isLine = computed<boolean>(() => props.type.includes('line'))
81
81
  </script>
82
82
 
83
83
  <style scoped lang="scss">
84
+ :root.dark-theme {
85
+ .selection-stroke {
86
+ stroke: #0f6082;
87
+ fill: #0f6082;
88
+ }
89
+ .selection-line {
90
+ stroke: #fdd006;
91
+ }
92
+
93
+ .highlight {
94
+ fill: #7f6509;
95
+
96
+ &-stroke {
97
+ stroke: #7f6509;
98
+ }
99
+ &-hide {
100
+ stroke-opacity: 0;
101
+ fill: transparent;
102
+ }
103
+ }
104
+ }
105
+
84
106
  .selection-stroke {
85
107
  stroke: #0079b8;
86
108
  fill: #f3f6fa;
@@ -31,6 +31,7 @@
31
31
  :selected-port="props.selectedPort"
32
32
  :selected-adapter="props.selectedAdapter"
33
33
  :networks-count="props.networksCount"
34
+ :is-dark-mode="props.isDarkMode"
34
35
  @select-adapter="onSelectAdapter"
35
36
  @show-modal="onShowModal"
36
37
  />
@@ -53,6 +54,7 @@ const props = defineProps<{
53
54
  selectedNetwork: string
54
55
  isVisibleLine: boolean
55
56
  networksCount: number
57
+ isDarkMode: boolean
56
58
  }>()
57
59
 
58
60
  const isOpenedAdapterBlockAndNoSelectedNetwork = computed<boolean>(
@@ -90,7 +92,11 @@ const isHighlightedClosedAdapterBlock = computed<boolean>(
90
92
  const emits = defineEmits<{
91
93
  (event: 'toggle-adapters', networkId: string, portId: string): void
92
94
  (event: 'select-adapter', adapterId: string): void
93
- (event: 'show-modal', value: string, properties?: UI_I_ModalsInitialData): void
95
+ (
96
+ event: 'show-modal',
97
+ value: string,
98
+ properties?: UI_I_ModalsInitialData
99
+ ): void
94
100
  }>()
95
101
 
96
102
  const onToggleAdapters = (networkId: string, portId: string): void => {
@@ -99,7 +105,10 @@ const onToggleAdapters = (networkId: string, portId: string): void => {
99
105
  const onSelectAdapter = (adapterId: string): void => {
100
106
  emits('select-adapter', adapterId)
101
107
  }
102
- const onShowModal = (value: string, properties?: UI_I_ModalsInitialData): void => {
108
+ const onShowModal = (
109
+ value: string,
110
+ properties?: UI_I_ModalsInitialData
111
+ ): void => {
103
112
  emits('show-modal', value, properties)
104
113
  }
105
114
  </script>
@@ -24,6 +24,7 @@
24
24
  :id="`adapter-${props.adapter.id}`"
25
25
  data-title="adapter-name"
26
26
  cursor="pointer"
27
+ class="adapter-name"
27
28
  @click="onSelectAdapter(props.adapter.id)"
28
29
  >
29
30
  <text
@@ -58,7 +59,6 @@
58
59
  :y2="adapterLinePosition"
59
60
  :hide="!isVisibleAdapterLine"
60
61
  />
61
-
62
62
  <foreignObject
63
63
  data-title="adapter-item-icon"
64
64
  width="18"
@@ -67,7 +67,11 @@
67
67
  :y="adapterIconPosition"
68
68
  >
69
69
  <div>
70
- <atoms-diagram-icon name="adapter-item-icon" />
70
+ <atoms-diagram-icon
71
+ v-if="props.isDarkMode"
72
+ name="adapter-item-icon-dark"
73
+ />
74
+ <atoms-diagram-icon v-else name="adapter-item-icon" />
71
75
  </div>
72
76
  </foreignObject>
73
77
 
@@ -136,6 +140,7 @@ const props = defineProps<{
136
140
  selectedPort: UI_I_SelectedPort
137
141
  selectedAdapter: UI_I_SelectedAdapter
138
142
  networksCount: number
143
+ isDarkMode: boolean
139
144
  }>()
140
145
 
141
146
  const emits = defineEmits<{
@@ -208,6 +213,13 @@ const onShowModal = (
208
213
 
209
214
  <style scoped lang="scss">
210
215
  @import '~/assets/scss/common/mixins.scss';
216
+
217
+ :root.dark-theme {
218
+ .adapter-name {
219
+ fill: #c1cdd4;
220
+ }
221
+ }
222
+
211
223
  .diagram {
212
224
  &__values {
213
225
  @include text($fs: 12px, $fw: 400);
@@ -227,4 +239,8 @@ const onShowModal = (
227
239
  }
228
240
  }
229
241
  }
242
+
243
+ .adapter-name {
244
+ fill: #565656;
245
+ }
230
246
  </style>
@@ -11,6 +11,7 @@
11
11
  :selected-port="props.selectedPort"
12
12
  :selected-adapter="props.selectedAdapter"
13
13
  :networks-count="props.networksCount"
14
+ :is-dark-mode="props.isDarkMode"
14
15
  @select-adapter="onSelectAdapter"
15
16
  @show-modal="onShowModal"
16
17
  />
@@ -32,6 +33,7 @@ const props = defineProps<{
32
33
  selectedPort: UI_I_SelectedPort
33
34
  selectedAdapter: UI_I_SelectedAdapter
34
35
  networksCount: number
36
+ isDarkMode: boolean
35
37
  }>()
36
38
 
37
39
  const emits = defineEmits<{
@@ -42,6 +42,7 @@
42
42
  font-weight="400"
43
43
  x="462"
44
44
  y="53"
45
+ class="no-physical-adapters"
45
46
  >
46
47
  {{ localization.noPhysicalNetworkAdapters }}
47
48
  </text>
@@ -75,6 +76,16 @@ const onToggleAdapters = (networkId: string, portId: string): void => {
75
76
 
76
77
  <style scoped lang="scss">
77
78
  @import '~/assets/scss/common/mixins.scss';
79
+
80
+ :root.dark-theme {
81
+ .diagram__heading {
82
+ fill: #c1cdd4;
83
+ }
84
+ .no-physical-adapters {
85
+ fill: #c1cdd4;
86
+ }
87
+ }
88
+
78
89
  .virtual-switch__arrow-icon {
79
90
  width: 16px;
80
91
  height: 16px;
@@ -93,4 +104,7 @@ const onToggleAdapters = (networkId: string, portId: string): void => {
93
104
  letter-spacing: normal;
94
105
  line-height: 1.2rem;
95
106
  }
107
+ .no-physical-adapters {
108
+ fill: #565656;
109
+ }
96
110
  </style>
@@ -40,6 +40,12 @@ const props = defineProps<{
40
40
  </script>
41
41
 
42
42
  <style scoped lang="scss">
43
+ :root.dark-theme {
44
+ .connection-line {
45
+ stroke: #adbbc4;
46
+ }
47
+ }
48
+
43
49
  .connection-line {
44
50
  stroke: #888;
45
51
  }
@@ -30,6 +30,13 @@ const rectBottomPosition = computed<number>(
30
30
  </script>
31
31
 
32
32
  <style scoped lang="scss">
33
+ :root.dark-theme {
34
+ .panel {
35
+ fill: #1b2a32;
36
+ stroke: #adbbc4;
37
+ }
38
+ }
39
+
33
40
  .panel {
34
41
  fill: #fff;
35
42
  stroke: #888;
@@ -42,6 +42,13 @@ const props = defineProps<{
42
42
  </script>
43
43
 
44
44
  <style scoped lang="scss">
45
+ :root.dark-theme {
46
+ .panel {
47
+ fill: #1b2a32;
48
+ stroke: #adbbc4;
49
+ }
50
+ }
51
+
45
52
  .panel {
46
53
  fill: #fff;
47
54
  stroke: #888;
@@ -57,6 +57,7 @@
57
57
  font-weight="400"
58
58
  x="26"
59
59
  :y="props.network.vlanPosition"
60
+ class="vlan-id"
60
61
  >
61
62
  {{ localization.vlanId }}: {{ props.network.vlanId }}
62
63
  </text>
@@ -103,6 +104,7 @@
103
104
  font-weight="400"
104
105
  x="42"
105
106
  :y="props.network.portsPosition"
107
+ class="port-group-header"
106
108
  >
107
109
  {{ props.network.networkPortsName }} ({{ props.network.portsCount }})
108
110
  </text>
@@ -201,6 +203,15 @@ const onTogglePorts = (
201
203
 
202
204
  <style scoped lang="scss">
203
205
  @import '@/assets/scss/common/mixins.scss';
206
+
207
+ :root.dark-theme {
208
+ .diagram__heading,
209
+ .vlan-id,
210
+ .port-group-header {
211
+ fill: #c1cdd4;
212
+ }
213
+ }
214
+
204
215
  .diagram {
205
216
  &__heading {
206
217
  @include text($fs: 14px, $fw: 500);
@@ -53,6 +53,12 @@ const props = defineProps<{
53
53
  </script>
54
54
 
55
55
  <style scoped lang="scss">
56
+ :root.dark-theme {
57
+ .connection-line {
58
+ stroke: #adbbc4;
59
+ }
60
+ }
61
+
56
62
  .connection-line {
57
63
  stroke: #888;
58
64
  }
@@ -89,7 +89,11 @@ const networkRectBottomPosition = computed<number>(
89
89
  const emits = defineEmits<{
90
90
  (event: 'select-port', networkId: string, portId: string): void
91
91
  (event: 'select-network', networkId: string): void
92
- (event: 'show-modal', value: string, properties?: UI_I_ModalsInitialData): void
92
+ (
93
+ event: 'show-modal',
94
+ value: string,
95
+ properties?: UI_I_ModalsInitialData
96
+ ): void
93
97
  (
94
98
  event: 'toggle-ports',
95
99
  id: string,
@@ -98,7 +102,10 @@ const emits = defineEmits<{
98
102
  ): void
99
103
  }>()
100
104
 
101
- const onShowModal = (value: string, properties?: UI_I_ModalsInitialData): void => {
105
+ const onShowModal = (
106
+ value: string,
107
+ properties?: UI_I_ModalsInitialData
108
+ ): void => {
102
109
  emits('show-modal', value, properties)
103
110
  }
104
111
  const onSelectPort = (networkId: string, portId: string): void => {
@@ -36,6 +36,12 @@ const localization = computed<UI_I_Localization>(() => useLocal())
36
36
 
37
37
  <style scoped lang="scss">
38
38
  @import '~/assets/scss/common/mixins.scss';
39
+ :root.dark-theme {
40
+ .diagram__heading {
41
+ fill: #c1cdd4;
42
+ }
43
+ }
44
+
39
45
  .diagram {
40
46
  &__heading {
41
47
  @include text($fs: 14px, $fw: 500);
@@ -38,6 +38,13 @@ const props = defineProps<{
38
38
  </script>
39
39
 
40
40
  <style scoped lang="scss">
41
+ :root.dark-theme {
42
+ .panel {
43
+ fill: #1b2a32;
44
+ stroke: #adbbc4;
45
+ }
46
+ }
47
+
41
48
  .panel {
42
49
  fill: #fff;
43
50
  stroke: #888;
@@ -44,9 +44,8 @@
44
44
  font-size="1em"
45
45
  font-weight="400"
46
46
  x="42"
47
- class="small"
47
+ class="diagram__values small"
48
48
  :y="macAddressPosition"
49
- fill="#565656"
50
49
  >
51
50
  {{ localization.macAddress }}: 00:0c:29:a8:0f:74
52
51
  </text>
@@ -268,9 +267,20 @@ const onSelectPort = (networkId: string, portId: string): void => {
268
267
  <style scoped lang="scss">
269
268
  @import '../../../../assets/scss/common/mixins';
270
269
 
270
+ :root.dark-theme {
271
+ .selection-line {
272
+ stroke: #fdd006;
273
+ }
274
+ .diagram__values {
275
+ fill: #c1cdd4;
276
+ }
277
+ }
278
+
271
279
  .diagram {
272
280
  &__values {
273
281
  @include text($fs: 12px, $fw: 400);
282
+
283
+ fill: #565656;
274
284
  }
275
285
 
276
286
  &-actions {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bfg-common",
3
3
  "private": false,
4
- "version": "1.2.96",
4
+ "version": "1.2.97",
5
5
  "scripts": {
6
6
  "build": "nuxt build",
7
7
  "dev": "nuxt dev --port=3002",