bfg-common 1.0.41 → 1.0.42

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.
@@ -110,17 +110,12 @@ const hideMenu = (force?: boolean): void => {
110
110
  const windowClick = () => {
111
111
  hideMenu()
112
112
  }
113
- const windowResize = () => {
114
- hideMenu(true)
115
- }
116
113
  onMounted(() => {
117
114
  collapsedBtnId.value = `collapsed-btn${useUniqueId()}`
118
115
  window.addEventListener('mousedown', windowClick)
119
- window.addEventListener('resize', windowResize)
120
116
  })
121
117
  onUnmounted(() => {
122
118
  window.removeEventListener('mousedown', windowClick)
123
- window.removeEventListener('resize', windowResize)
124
119
  })
125
120
  </script>
126
121
 
@@ -1,160 +1,163 @@
1
- <template>
2
- <template v-if="!props.inPortlet">
3
- <div class="diagram-header">
4
- <div class="diagram-header-left">
5
- <atoms-the-icon
6
- name="angle"
7
- :class="[
8
- 'diagram-header__arrow-icon',
9
- {
10
- open: props.isShowDiagram,
11
- },
12
- ]"
13
- @click="onToggleDiagram"
14
- />
15
- <a>
16
- <span>
17
- {{ localization.standardSwitch }}:
18
- {{ props.diagramName }}
19
- </span>
20
- </a>
21
- </div>
22
- <div v-if="props.isShowDiagram" class="diagram-header__btn-container">
23
- <span class="vertical-separator"></span>
24
- <button
25
- id="add-networking-button"
26
- type="button"
27
- @click="onShowModal('add-networking')"
28
- >
29
- {{ localization.addNetworking }}
30
- </button>
31
- <button
32
- id="switch-edit-button"
33
- type="button"
34
- @click="onShowModal('switch-edit')"
35
- >
36
- {{ localization.edit }}
37
- </button>
38
- <button
39
- id="switch-manage-physical-adapters-button"
40
- type="button"
41
- @click="onShowModal('switch-manage-physical-adapters')"
42
- >
43
- {{ localization.managePhysicalAdapters }}
44
- </button>
45
- <div style="position: relative; transform: translate(62px, -11px)">
46
- <atoms-collapse-nav
47
- popup-class="diagram-main-actions__popup"
48
- :close-after-click="true"
49
- :items="switchMainNavigation"
50
- @change="onShowModal"
51
- />
52
- </div>
53
- </div>
54
- </div>
55
- <hr class="horizontal-separator" />
56
- </template>
57
- </template>
58
-
59
- <script setup lang="ts">
60
- import { UI_I_Localization } from '~/models/interfaces'
61
- import { switchMainNavigationFunc } from '~/components/common/diagramMain/modals/config'
62
-
63
- const props = defineProps<{
64
- inPortlet: boolean
65
- isShowDiagram: boolean
66
- diagramName: string
67
- }>()
68
-
69
- const emits = defineEmits<{
70
- (event: 'toggle-diagram'): void
71
- (event: 'show-modal', modalName: string): void
72
- }>()
73
-
74
- const localization = computed<UI_I_Localization>(() => useLocal())
75
-
76
- const switchMainNavigation = switchMainNavigationFunc(localization.value)
77
-
78
- const onToggleDiagram = () => emits('toggle-diagram')
79
-
80
- const onShowModal = (modalName: string) => emits('show-modal', modalName)
81
- </script>
82
-
83
- <style scoped lang="scss">
84
- .diagram-header {
85
- display: flex;
86
- padding-left: 8px;
87
- a {
88
- color: #0072a3;
89
- cursor: pointer;
90
- font-weight: 700;
91
- user-select: none;
92
- line-height: 20px;
93
- span {
94
- font-weight: 700;
95
- }
96
- }
97
-
98
- &-left {
99
- display: flex;
100
- flex-wrap: nowrap;
101
- }
102
-
103
- &__arrow-icon {
104
- width: 16px;
105
- height: 16px;
106
- margin-right: 4px;
107
- transform: rotate(90deg);
108
- align-self: center;
109
- fill: var(--triger-icon-color);
110
- cursor: pointer;
111
- &.open {
112
- transform: rotate(180deg);
113
- }
114
- }
115
-
116
- &__btn-container {
117
- display: flex;
118
-
119
- button {
120
- font-size: 11px;
121
- height: 24px;
122
- border: none;
123
- background: none;
124
- margin-right: 0;
125
- cursor: pointer;
126
- display: inline-block;
127
- white-space: nowrap;
128
- text-align: center;
129
- text-transform: uppercase;
130
- color: #0072a3;
131
- line-height: 20px;
132
- max-height: 16.8px;
133
- padding: 0 14px;
134
- font-weight: 500;
135
- letter-spacing: 1px;
136
-
137
- &:hover {
138
- color: #004d8a;
139
- }
140
- }
141
- }
142
- }
143
-
144
- .horizontal-separator {
145
- margin: 5px 10px 10px;
146
- border-left: 0;
147
- border-right: 0;
148
- border-color: #ddd;
149
- box-sizing: content-box;
150
- height: 0;
151
- overflow: visible;
152
- border-top: 0px solid #eee;
153
- }
154
-
155
- .vertical-separator {
156
- border: 1px solid #ddd;
157
- border-left: none;
158
- margin: 0 3px 0 14px;
159
- }
160
- </style>
1
+ <template>
2
+ <template v-if="!props.inPortlet">
3
+ <div class="diagram-header">
4
+ <div class="diagram-header-left">
5
+ <atoms-the-icon
6
+ name="angle"
7
+ :class="[
8
+ 'diagram-header__arrow-icon',
9
+ {
10
+ open: props.isShowDiagram,
11
+ },
12
+ ]"
13
+ @click="onToggleDiagram"
14
+ />
15
+ <a>
16
+ <span>
17
+ {{ localization.standardSwitch }}:
18
+ {{ props.diagramName }}
19
+ </span>
20
+ </a>
21
+ </div>
22
+ <div v-if="props.isShowDiagram" class="diagram-header__btn-container">
23
+ <span class="vertical-separator"></span>
24
+ <button
25
+ id="add-networking-button"
26
+ type="button"
27
+ @click="onShowModal('add-networking')"
28
+ >
29
+ {{ localization.addNetworking }}
30
+ </button>
31
+ <button
32
+ id="switch-edit-button"
33
+ type="button"
34
+ @click="onShowModal('switch-edit')"
35
+ >
36
+ {{ localization.edit }}
37
+ </button>
38
+ <button
39
+ id="switch-manage-physical-adapters-button"
40
+ type="button"
41
+ @click="onShowModal('switch-manage-physical-adapters')"
42
+ >
43
+ {{ localization.managePhysicalAdapters }}
44
+ </button>
45
+ <div style="position: relative; transform: translate(62px, -11px)">
46
+ <atoms-collapse-nav
47
+ popup-class="diagram-main-actions__popup"
48
+ :close-after-click="true"
49
+ :items="switchMainNavigation"
50
+ @change="onShowModal"
51
+ />
52
+ </div>
53
+ </div>
54
+ </div>
55
+ <hr class="horizontal-separator" />
56
+ </template>
57
+ </template>
58
+
59
+ <script setup lang="ts">
60
+ import { UI_I_Localization } from '~/models/interfaces'
61
+ import { UI_I_NavigationItem } from '~/components/common/diagramMain/models/interfaces'
62
+ import { switchMainNavigationFunc } from '~/components/common/diagramMain/modals/config'
63
+
64
+ const props = defineProps<{
65
+ inPortlet: boolean
66
+ isShowDiagram: boolean
67
+ diagramName: string
68
+ }>()
69
+
70
+ const emits = defineEmits<{
71
+ (event: 'toggle-diagram'): void
72
+ (event: 'show-modal', modalName: string): void
73
+ }>()
74
+
75
+ const localization = computed<UI_I_Localization>(() => useLocal())
76
+
77
+ const switchMainNavigation = computed<UI_I_NavigationItem[]>(() =>
78
+ switchMainNavigationFunc(localization.value)
79
+ )
80
+
81
+ const onToggleDiagram = () => emits('toggle-diagram')
82
+
83
+ const onShowModal = (modalName: string) => emits('show-modal', modalName)
84
+ </script>
85
+
86
+ <style scoped lang="scss">
87
+ .diagram-header {
88
+ display: flex;
89
+ padding-left: 8px;
90
+ a {
91
+ color: #0072a3;
92
+ cursor: pointer;
93
+ font-weight: 700;
94
+ user-select: none;
95
+ line-height: 20px;
96
+ span {
97
+ font-weight: 700;
98
+ }
99
+ }
100
+
101
+ &-left {
102
+ display: flex;
103
+ flex-wrap: nowrap;
104
+ }
105
+
106
+ &__arrow-icon {
107
+ width: 16px;
108
+ height: 16px;
109
+ margin-right: 4px;
110
+ transform: rotate(90deg);
111
+ align-self: center;
112
+ fill: var(--triger-icon-color);
113
+ cursor: pointer;
114
+ &.open {
115
+ transform: rotate(180deg);
116
+ }
117
+ }
118
+
119
+ &__btn-container {
120
+ display: flex;
121
+
122
+ button {
123
+ font-size: 11px;
124
+ height: 24px;
125
+ border: none;
126
+ background: none;
127
+ margin-right: 0;
128
+ cursor: pointer;
129
+ display: inline-block;
130
+ white-space: nowrap;
131
+ text-align: center;
132
+ text-transform: uppercase;
133
+ color: #0072a3;
134
+ line-height: 20px;
135
+ max-height: 16.8px;
136
+ padding: 0 14px;
137
+ font-weight: 500;
138
+ letter-spacing: 1px;
139
+
140
+ &:hover {
141
+ color: #004d8a;
142
+ }
143
+ }
144
+ }
145
+ }
146
+
147
+ .horizontal-separator {
148
+ margin: 5px 10px 10px;
149
+ border-left: 0;
150
+ border-right: 0;
151
+ border-color: #ddd;
152
+ box-sizing: content-box;
153
+ height: 0;
154
+ overflow: visible;
155
+ border-top: 0px solid #eee;
156
+ }
157
+
158
+ .vertical-separator {
159
+ border: 1px solid #ddd;
160
+ border-left: none;
161
+ margin: 0 3px 0 14px;
162
+ }
163
+ </style>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bfg-common",
3
3
  "private": false,
4
- "version": "1.0.41",
4
+ "version": "1.0.42",
5
5
  "scripts": {
6
6
  "build": "nuxt build",
7
7
  "dev": "nuxt dev --port=3002",