bfg-common 1.2.39 → 1.2.41
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.
- package/components/atoms/alert/Notification.vue +167 -167
- package/components/atoms/autocomplete/Autocomplete.vue +236 -236
- package/components/atoms/datepicker/Datepicker.vue +612 -612
- package/components/atoms/list/SelectList.vue +62 -62
- package/components/atoms/nav/NavBar.vue +116 -116
- package/components/atoms/nav/VerticalNavBar.vue +89 -89
- package/components/atoms/notificationBar/NotificationBar.vue +175 -175
- package/components/atoms/perPage/PerPage.vue +52 -52
- package/components/atoms/popup/SimplePopup.vue +90 -90
- package/components/atoms/step/VerticalStep.vue +104 -104
- package/components/atoms/switch/Switch.vue +107 -107
- package/components/atoms/table/dataGrid/DataGridColumnSwitch.vue +206 -206
- package/components/atoms/table/dataGrid/DataGridPage.vue +189 -189
- package/components/atoms/tabs/Tabs.vue +189 -189
- package/components/atoms/tooltip/Signpost.vue +224 -224
- package/components/common/BadBrowser.vue +114 -114
- package/components/common/adapterManager/AddAdapterWarningModal.vue +82 -82
- package/components/common/adapterManager/NoActiveAdaptersModal.vue +62 -62
- package/components/common/adapterManager/NoConnectedActiveAdaptersModal.vue +62 -62
- package/components/common/browse/Browse.vue +182 -182
- package/components/common/browse/blocks/Title.vue +66 -66
- package/components/common/diagramMain/Diagram.vue +186 -186
- package/components/common/diagramMain/DiagramMain.vue +986 -986
- package/components/common/diagramMain/adapter/AdapterItem.vue +227 -227
- package/components/common/diagramMain/adapter/AdapterItems.vue +57 -57
- package/components/common/diagramMain/modals/editSettings/tabs/port/IpvFourSettings.vue +339 -339
- package/components/common/diagramMain/modals/editSettings/tabs/port/PortProperties.vue +202 -202
- package/components/common/diagramMain/modals/remove/RemoveModal.vue +226 -226
- package/components/common/diagramMain/network/Contents.vue +238 -238
- package/components/common/feedback/Buttons.vue +232 -232
- package/components/common/feedback/Message.vue +468 -468
- package/components/common/feedback/VisitPortal.vue +54 -54
- package/components/common/help/navbar/left/Left.vue +159 -159
- package/components/common/help/navbar/left/utils/constructAccordion.ts +27 -27
- package/components/common/mainNavigationPanel/MainNavigationPanel.vue +359 -359
- package/components/common/modals/Rename.vue +165 -165
- package/components/common/monitor/advanced/Advanced.vue +235 -235
- package/components/common/monitor/advanced/tools/chartOptionsModal/models/interfaces.ts +19 -19
- package/components/common/perPage/PerPage.vue +51 -51
- package/components/common/recursionTree/RecursionTree.vue +201 -201
- package/components/common/vm/actions/add/config/capabilities.ts +338 -338
- package/components/common/vm/actions/add/customizeHardware/virtualHardware/VirtualHardware.vue +657 -657
- package/components/common/vm/actions/add/customizeHardware/virtualHardware/cpu/CoresPerSocket.vue +109 -109
- package/components/common/vm/actions/add/customizeHardware/virtualHardware/cpu/Cpu.vue +383 -383
- package/components/common/vm/actions/add/customizeHardware/virtualHardware/limit/Limit.vue +234 -234
- package/components/common/vm/actions/add/customizeHardware/virtualHardware/limit/config/options.ts +28 -28
- package/components/common/vm/actions/add/customizeHardware/virtualHardware/memory/Memory.vue +316 -316
- package/components/common/vm/actions/add/customizeHardware/virtualHardware/memory/config/memoryOptions.ts +35 -35
- package/components/common/vm/actions/add/customizeHardware/virtualHardware/newHardDisk/NewHardDisk.vue +445 -445
- package/components/common/vm/actions/add/customizeHardware/virtualHardware/newNetwork/NewNetwork.vue +288 -288
- package/components/common/vm/actions/add/customizeHardware/virtualHardware/reservation/Reservation.vue +235 -235
- package/components/common/vm/actions/add/customizeHardware/virtualHardware/videoCard/VideoCard.vue +177 -177
- package/components/common/vm/actions/add/customizeHardware/vmoptions/bootOptions/order/Order.vue +197 -197
- package/components/common/vm/actions/add/customizeHardware/vmoptions/generalOptions/GeneralOptions.vue +181 -181
- package/components/common/vm/actions/add/customizeHardware/vmoptions/remoteConsoleOptions/CopyPaste.vue +51 -51
- package/components/common/vm/actions/add/customizeHardware/vmoptions/remoteConsoleOptions/RemoteConsoleOptions.vue +253 -253
- package/components/common/vm/actions/add/customizeHardware/vmoptions/remoteConsoleOptions/keymap/Keymap.vue +55 -55
- package/components/common/vm/actions/add/select/storage/config/config.ts +154 -154
- package/components/common/vm/actions/clone/Clone.vue +544 -544
- package/components/common/vm/actions/clone/select/options/Options.vue +65 -65
- package/components/common/vm/actions/clone/utils.ts +43 -43
- package/components/common/wizards/datastore/add/nfs/Nfs.vue +94 -94
- package/components/common/wizards/datastore/add/nfs/configuration/Configuration.vue +377 -377
- package/components/common/wizards/datastore/add/nfs/configuration/serversList/ServersList.vue +123 -123
- package/components/common/wizards/datastore/add/nfs/kerberosAuthentication/KerberosAuthentication.vue +54 -54
- package/components/common/wizards/datastore/add/sharedStorm/deviceSelection/hostTable/HostTable.vue +131 -131
- package/components/common/wizards/datastore/add/sharedStorm/partitionConfiguration/PartitionConfiguration.vue +230 -230
- package/composables/useLocal.ts +38 -38
- package/minify.js +146 -146
- package/models/store/interfaces.ts +37 -37
- package/models/store/storage/interfaces.ts +32 -32
- package/models/store/types.ts +32 -32
- package/modules/fixContentBuild/utils/methods.ts +114 -114
- package/package.json +1 -1
- package/public/spice-console/application/codec.js +257 -257
- package/public/spice-console/lib/rasterEngine.js +907 -907
- package/public/spice-console/network/spicechannel.js +369 -369
- package/utils/contentBuild.ts +34 -34
|
@@ -1,62 +1,62 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<select
|
|
3
|
-
:id="`${props.testId}-select`"
|
|
4
|
-
v-model="selectedItem"
|
|
5
|
-
size="15"
|
|
6
|
-
class="list"
|
|
7
|
-
>
|
|
8
|
-
<option
|
|
9
|
-
v-for="(item, key) in props.items"
|
|
10
|
-
:key="key"
|
|
11
|
-
:disabled="item.disabled"
|
|
12
|
-
class="item"
|
|
13
|
-
:value="item.value"
|
|
14
|
-
>
|
|
15
|
-
<slot :name="`item${key}`">
|
|
16
|
-
{{ item.text }}
|
|
17
|
-
</slot>
|
|
18
|
-
</option>
|
|
19
|
-
</select>
|
|
20
|
-
</template>
|
|
21
|
-
|
|
22
|
-
<script setup lang="ts">
|
|
23
|
-
import { UI_I_OptionItem } from '~/components/atoms/models/interfaces'
|
|
24
|
-
|
|
25
|
-
const props = withDefaults(
|
|
26
|
-
defineProps<{
|
|
27
|
-
testId?: string
|
|
28
|
-
items: UI_I_OptionItem[]
|
|
29
|
-
modelValue: string
|
|
30
|
-
}>(),
|
|
31
|
-
{ testId: 'ui-select-list' }
|
|
32
|
-
)
|
|
33
|
-
const emits = defineEmits<{
|
|
34
|
-
(event: 'update:model-value', value: string): void
|
|
35
|
-
}>()
|
|
36
|
-
|
|
37
|
-
const selectedItem = computed<string>({
|
|
38
|
-
get() {
|
|
39
|
-
return props.modelValue
|
|
40
|
-
},
|
|
41
|
-
set(newValue) {
|
|
42
|
-
emits('update:model-value', newValue)
|
|
43
|
-
},
|
|
44
|
-
})
|
|
45
|
-
</script>
|
|
46
|
-
|
|
47
|
-
<style scoped lang="scss">
|
|
48
|
-
.list {
|
|
49
|
-
outline: none;
|
|
50
|
-
|
|
51
|
-
.item {
|
|
52
|
-
padding: 3px 6px;
|
|
53
|
-
color: #000;
|
|
54
|
-
|
|
55
|
-
&:disabled {
|
|
56
|
-
color: #565656;
|
|
57
|
-
cursor: not-allowed;
|
|
58
|
-
opacity: 0.4;
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<select
|
|
3
|
+
:id="`${props.testId}-select`"
|
|
4
|
+
v-model="selectedItem"
|
|
5
|
+
size="15"
|
|
6
|
+
class="list"
|
|
7
|
+
>
|
|
8
|
+
<option
|
|
9
|
+
v-for="(item, key) in props.items"
|
|
10
|
+
:key="key"
|
|
11
|
+
:disabled="item.disabled"
|
|
12
|
+
class="item"
|
|
13
|
+
:value="item.value"
|
|
14
|
+
>
|
|
15
|
+
<slot :name="`item${key}`">
|
|
16
|
+
{{ item.text }}
|
|
17
|
+
</slot>
|
|
18
|
+
</option>
|
|
19
|
+
</select>
|
|
20
|
+
</template>
|
|
21
|
+
|
|
22
|
+
<script setup lang="ts">
|
|
23
|
+
import { UI_I_OptionItem } from '~/components/atoms/models/interfaces'
|
|
24
|
+
|
|
25
|
+
const props = withDefaults(
|
|
26
|
+
defineProps<{
|
|
27
|
+
testId?: string
|
|
28
|
+
items: UI_I_OptionItem[]
|
|
29
|
+
modelValue: string
|
|
30
|
+
}>(),
|
|
31
|
+
{ testId: 'ui-select-list' }
|
|
32
|
+
)
|
|
33
|
+
const emits = defineEmits<{
|
|
34
|
+
(event: 'update:model-value', value: string): void
|
|
35
|
+
}>()
|
|
36
|
+
|
|
37
|
+
const selectedItem = computed<string>({
|
|
38
|
+
get() {
|
|
39
|
+
return props.modelValue
|
|
40
|
+
},
|
|
41
|
+
set(newValue) {
|
|
42
|
+
emits('update:model-value', newValue)
|
|
43
|
+
},
|
|
44
|
+
})
|
|
45
|
+
</script>
|
|
46
|
+
|
|
47
|
+
<style scoped lang="scss">
|
|
48
|
+
.list {
|
|
49
|
+
outline: none;
|
|
50
|
+
|
|
51
|
+
.item {
|
|
52
|
+
padding: 3px 6px;
|
|
53
|
+
color: #000;
|
|
54
|
+
|
|
55
|
+
&:disabled {
|
|
56
|
+
color: #565656;
|
|
57
|
+
cursor: not-allowed;
|
|
58
|
+
opacity: 0.4;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
</style>
|
|
@@ -1,116 +1,116 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<nav :id="id" :class="['nav', { 'not-collapse': notCollapse }]">
|
|
3
|
-
<ul>
|
|
4
|
-
<li v-for="(item, key) in props.items" :key="key" class="nav-item">
|
|
5
|
-
<atoms-collapse-nav-item
|
|
6
|
-
:test-id="`${props.testId}-item-${key}`"
|
|
7
|
-
:is-link="props.isLink"
|
|
8
|
-
:item="item"
|
|
9
|
-
:value="props.modelValue"
|
|
10
|
-
btn-class="btn btn-link nav-link"
|
|
11
|
-
@change="change"
|
|
12
|
-
/>
|
|
13
|
-
</li>
|
|
14
|
-
<atoms-collapse-nav
|
|
15
|
-
v-show="collapsedItems.length && !notCollapse"
|
|
16
|
-
:test-id="`${props.testId}-container`"
|
|
17
|
-
:items="collapsedItems"
|
|
18
|
-
:is-link="props.isLink"
|
|
19
|
-
:value="props.modelValue"
|
|
20
|
-
@change="change"
|
|
21
|
-
/>
|
|
22
|
-
</ul>
|
|
23
|
-
</nav>
|
|
24
|
-
</template>
|
|
25
|
-
|
|
26
|
-
<script setup lang="ts">
|
|
27
|
-
import { UI_I_CollapseNavItem } from '~/components/atoms/collapse/models/interfaces'
|
|
28
|
-
|
|
29
|
-
const props = withDefaults(
|
|
30
|
-
defineProps<{
|
|
31
|
-
testId?: string
|
|
32
|
-
items: UI_I_CollapseNavItem[]
|
|
33
|
-
modelValue?: number | string
|
|
34
|
-
isLink?: boolean
|
|
35
|
-
notCollapse?: boolean
|
|
36
|
-
}>(),
|
|
37
|
-
{ testId: 'ui-nav-bar' }
|
|
38
|
-
)
|
|
39
|
-
const emits = defineEmits<{
|
|
40
|
-
(event: 'update:model-value', num: number): void
|
|
41
|
-
(event: 'change', num: number): void
|
|
42
|
-
}>()
|
|
43
|
-
|
|
44
|
-
const change = (value: number): void => {
|
|
45
|
-
emits('update:model-value', value)
|
|
46
|
-
emits('change', value)
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
const visibleCount = ref(props.items.length)
|
|
50
|
-
const collapsedItems = computed<UI_I_CollapseNavItem[]>(() => {
|
|
51
|
-
return props.items.filter((_, index) => {
|
|
52
|
-
return index >= visibleCount.value
|
|
53
|
-
})
|
|
54
|
-
})
|
|
55
|
-
|
|
56
|
-
let outputSize = (): void => {
|
|
57
|
-
const el = document.getElementById(id.value)
|
|
58
|
-
if (!el) return
|
|
59
|
-
|
|
60
|
-
const elWidth = el.clientWidth
|
|
61
|
-
const elItems = el.children[0].children
|
|
62
|
-
const elItemsMarginLeft = parseInt(getComputedStyle(elItems[0]).marginLeft)
|
|
63
|
-
const elItemsMarginRight = parseInt(getComputedStyle(elItems[0]).marginRight)
|
|
64
|
-
const childrenMarginY = elItemsMarginLeft + elItemsMarginRight
|
|
65
|
-
|
|
66
|
-
let childrenWidth = 0
|
|
67
|
-
let count = 0
|
|
68
|
-
for (let i = 0; i < elItems.length; i++) {
|
|
69
|
-
childrenWidth += elItems[i].clientWidth + childrenMarginY
|
|
70
|
-
const isWrap = elWidth < childrenWidth
|
|
71
|
-
|
|
72
|
-
if (isWrap) break
|
|
73
|
-
count++
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
visibleCount.value = count
|
|
77
|
-
}
|
|
78
|
-
outputSize = useThrottle(outputSize)
|
|
79
|
-
|
|
80
|
-
const id = ref<string>('')
|
|
81
|
-
const setResizeObserve = (): void => {
|
|
82
|
-
const el = document.getElementById(id.value)
|
|
83
|
-
|
|
84
|
-
if (!el) {
|
|
85
|
-
setTimeout(setResizeObserve, 0)
|
|
86
|
-
return
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
new ResizeObserver(outputSize).observe(el)
|
|
90
|
-
}
|
|
91
|
-
onMounted(() => {
|
|
92
|
-
setResizeObserve()
|
|
93
|
-
id.value = `nav-bar${useUniqueId()}`
|
|
94
|
-
})
|
|
95
|
-
</script>
|
|
96
|
-
|
|
97
|
-
<style scoped lang="scss">
|
|
98
|
-
.nav {
|
|
99
|
-
box-shadow: inset 0 -0.05rem 0 var(--nav-panel-border-color);
|
|
100
|
-
align-items: flex-start;
|
|
101
|
-
|
|
102
|
-
&.not-collapse {
|
|
103
|
-
ul {
|
|
104
|
-
flex-wrap: nowrap;
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
ul {
|
|
109
|
-
position: relative;
|
|
110
|
-
height: 36px;
|
|
111
|
-
overflow: hidden;
|
|
112
|
-
display: flex;
|
|
113
|
-
flex-wrap: wrap;
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<nav :id="id" :class="['nav', { 'not-collapse': notCollapse }]">
|
|
3
|
+
<ul>
|
|
4
|
+
<li v-for="(item, key) in props.items" :key="key" class="nav-item">
|
|
5
|
+
<atoms-collapse-nav-item
|
|
6
|
+
:test-id="`${props.testId}-item-${key}`"
|
|
7
|
+
:is-link="props.isLink"
|
|
8
|
+
:item="item"
|
|
9
|
+
:value="props.modelValue"
|
|
10
|
+
btn-class="btn btn-link nav-link"
|
|
11
|
+
@change="change"
|
|
12
|
+
/>
|
|
13
|
+
</li>
|
|
14
|
+
<atoms-collapse-nav
|
|
15
|
+
v-show="collapsedItems.length && !notCollapse"
|
|
16
|
+
:test-id="`${props.testId}-container`"
|
|
17
|
+
:items="collapsedItems"
|
|
18
|
+
:is-link="props.isLink"
|
|
19
|
+
:value="props.modelValue"
|
|
20
|
+
@change="change"
|
|
21
|
+
/>
|
|
22
|
+
</ul>
|
|
23
|
+
</nav>
|
|
24
|
+
</template>
|
|
25
|
+
|
|
26
|
+
<script setup lang="ts">
|
|
27
|
+
import { UI_I_CollapseNavItem } from '~/components/atoms/collapse/models/interfaces'
|
|
28
|
+
|
|
29
|
+
const props = withDefaults(
|
|
30
|
+
defineProps<{
|
|
31
|
+
testId?: string
|
|
32
|
+
items: UI_I_CollapseNavItem[]
|
|
33
|
+
modelValue?: number | string
|
|
34
|
+
isLink?: boolean
|
|
35
|
+
notCollapse?: boolean
|
|
36
|
+
}>(),
|
|
37
|
+
{ testId: 'ui-nav-bar' }
|
|
38
|
+
)
|
|
39
|
+
const emits = defineEmits<{
|
|
40
|
+
(event: 'update:model-value', num: number): void
|
|
41
|
+
(event: 'change', num: number): void
|
|
42
|
+
}>()
|
|
43
|
+
|
|
44
|
+
const change = (value: number): void => {
|
|
45
|
+
emits('update:model-value', value)
|
|
46
|
+
emits('change', value)
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
const visibleCount = ref(props.items.length)
|
|
50
|
+
const collapsedItems = computed<UI_I_CollapseNavItem[]>(() => {
|
|
51
|
+
return props.items.filter((_, index) => {
|
|
52
|
+
return index >= visibleCount.value
|
|
53
|
+
})
|
|
54
|
+
})
|
|
55
|
+
|
|
56
|
+
let outputSize = (): void => {
|
|
57
|
+
const el = document.getElementById(id.value)
|
|
58
|
+
if (!el) return
|
|
59
|
+
|
|
60
|
+
const elWidth = el.clientWidth
|
|
61
|
+
const elItems = el.children[0].children
|
|
62
|
+
const elItemsMarginLeft = parseInt(getComputedStyle(elItems[0]).marginLeft)
|
|
63
|
+
const elItemsMarginRight = parseInt(getComputedStyle(elItems[0]).marginRight)
|
|
64
|
+
const childrenMarginY = elItemsMarginLeft + elItemsMarginRight
|
|
65
|
+
|
|
66
|
+
let childrenWidth = 0
|
|
67
|
+
let count = 0
|
|
68
|
+
for (let i = 0; i < elItems.length; i++) {
|
|
69
|
+
childrenWidth += elItems[i].clientWidth + childrenMarginY
|
|
70
|
+
const isWrap = elWidth < childrenWidth
|
|
71
|
+
|
|
72
|
+
if (isWrap) break
|
|
73
|
+
count++
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
visibleCount.value = count
|
|
77
|
+
}
|
|
78
|
+
outputSize = useThrottle(outputSize)
|
|
79
|
+
|
|
80
|
+
const id = ref<string>('')
|
|
81
|
+
const setResizeObserve = (): void => {
|
|
82
|
+
const el = document.getElementById(id.value)
|
|
83
|
+
|
|
84
|
+
if (!el) {
|
|
85
|
+
setTimeout(setResizeObserve, 0)
|
|
86
|
+
return
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
new ResizeObserver(outputSize).observe(el)
|
|
90
|
+
}
|
|
91
|
+
onMounted(() => {
|
|
92
|
+
setResizeObserve()
|
|
93
|
+
id.value = `nav-bar${useUniqueId()}`
|
|
94
|
+
})
|
|
95
|
+
</script>
|
|
96
|
+
|
|
97
|
+
<style scoped lang="scss">
|
|
98
|
+
.nav {
|
|
99
|
+
box-shadow: inset 0 -0.05rem 0 var(--nav-panel-border-color);
|
|
100
|
+
align-items: flex-start;
|
|
101
|
+
|
|
102
|
+
&.not-collapse {
|
|
103
|
+
ul {
|
|
104
|
+
flex-wrap: nowrap;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
ul {
|
|
109
|
+
position: relative;
|
|
110
|
+
height: 36px;
|
|
111
|
+
overflow: hidden;
|
|
112
|
+
display: flex;
|
|
113
|
+
flex-wrap: wrap;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
</style>
|
|
@@ -1,89 +1,89 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<nav class="clr-vertical-nav">
|
|
3
|
-
<NuxtLink
|
|
4
|
-
v-for="(item, key) in props.items"
|
|
5
|
-
:id="`${props.testId}-link-${key}`"
|
|
6
|
-
:key="key"
|
|
7
|
-
class="clr-treenode-link"
|
|
8
|
-
:to="item.path"
|
|
9
|
-
active-class="active"
|
|
10
|
-
@contextmenu="showContextMenu($event, item)"
|
|
11
|
-
>
|
|
12
|
-
<span
|
|
13
|
-
v-if="item.iconClassName"
|
|
14
|
-
:class="['icon', item.iconClassName]"
|
|
15
|
-
></span>
|
|
16
|
-
<span class="clr-treenode-item text-ellipsis">{{ item.text }}</span>
|
|
17
|
-
</NuxtLink>
|
|
18
|
-
</nav>
|
|
19
|
-
</template>
|
|
20
|
-
|
|
21
|
-
<script setup lang="ts">
|
|
22
|
-
import { UI_I_NavItem } from '~/components/atoms/nav/models/interfaces'
|
|
23
|
-
|
|
24
|
-
const props = withDefaults(
|
|
25
|
-
defineProps<{
|
|
26
|
-
testId?: string
|
|
27
|
-
items: UI_I_NavItem[]
|
|
28
|
-
}>(),
|
|
29
|
-
{ testId: 'ui-vertical-nav-bar' }
|
|
30
|
-
)
|
|
31
|
-
const emits = defineEmits<{
|
|
32
|
-
(event: 'contextmenu', value: [Event, UI_I_NavItem]): void
|
|
33
|
-
}>()
|
|
34
|
-
|
|
35
|
-
const showContextMenu = (event: Event, item: UI_I_NavItem): void => {
|
|
36
|
-
// navigateTo(item.path)
|
|
37
|
-
emits('contextmenu', [event, item])
|
|
38
|
-
}
|
|
39
|
-
</script>
|
|
40
|
-
|
|
41
|
-
<style scoped lang="scss">
|
|
42
|
-
.clr-vertical-nav {
|
|
43
|
-
padding-top: 0;
|
|
44
|
-
width: 100%;
|
|
45
|
-
background-color: transparent;
|
|
46
|
-
|
|
47
|
-
.clr-treenode-link {
|
|
48
|
-
display: flex;
|
|
49
|
-
align-items: center;
|
|
50
|
-
text-overflow: ellipsis;
|
|
51
|
-
overflow: hidden;
|
|
52
|
-
white-space: nowrap;
|
|
53
|
-
padding: 2px 12px;
|
|
54
|
-
border-radius: 0;
|
|
55
|
-
|
|
56
|
-
&.active {
|
|
57
|
-
background: var(--vertical-nav-active-bg-color);
|
|
58
|
-
color: var(--vertical-nav-active-item-color);
|
|
59
|
-
.clr-treenode-item {
|
|
60
|
-
color: var(--vertical-nav-active-item-color);
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
&:hover:not(.active) {
|
|
64
|
-
background: var(--vertical-nav-hover-bg-color);
|
|
65
|
-
color: var(--vertical-nav-hover-item-color);
|
|
66
|
-
margin-bottom: -1px;
|
|
67
|
-
border-bottom: 1px solid var(--row-hover-border-color);
|
|
68
|
-
|
|
69
|
-
.clr-treenode-item {
|
|
70
|
-
color: var(--vertical-nav-hover-item-color);
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
.icon {
|
|
74
|
-
margin: 1px 4px 0;
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
</style>
|
|
79
|
-
|
|
80
|
-
<style>
|
|
81
|
-
/* :root {
|
|
82
|
-
--vertical-nav-active-item-color: #fff;
|
|
83
|
-
--vertical-nav-active-bg-color: #29414e;
|
|
84
|
-
}
|
|
85
|
-
:root.dark-theme {
|
|
86
|
-
--vertical-nav-active-item-color: #000;
|
|
87
|
-
--vertical-nav-active-bg-color: #d8e3e9;
|
|
88
|
-
} */
|
|
89
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<nav class="clr-vertical-nav">
|
|
3
|
+
<NuxtLink
|
|
4
|
+
v-for="(item, key) in props.items"
|
|
5
|
+
:id="`${props.testId}-link-${key}`"
|
|
6
|
+
:key="key"
|
|
7
|
+
class="clr-treenode-link"
|
|
8
|
+
:to="item.path"
|
|
9
|
+
active-class="active"
|
|
10
|
+
@contextmenu="showContextMenu($event, item)"
|
|
11
|
+
>
|
|
12
|
+
<span
|
|
13
|
+
v-if="item.iconClassName"
|
|
14
|
+
:class="['icon', item.iconClassName]"
|
|
15
|
+
></span>
|
|
16
|
+
<span class="clr-treenode-item text-ellipsis">{{ item.text }}</span>
|
|
17
|
+
</NuxtLink>
|
|
18
|
+
</nav>
|
|
19
|
+
</template>
|
|
20
|
+
|
|
21
|
+
<script setup lang="ts">
|
|
22
|
+
import { UI_I_NavItem } from '~/components/atoms/nav/models/interfaces'
|
|
23
|
+
|
|
24
|
+
const props = withDefaults(
|
|
25
|
+
defineProps<{
|
|
26
|
+
testId?: string
|
|
27
|
+
items: UI_I_NavItem[]
|
|
28
|
+
}>(),
|
|
29
|
+
{ testId: 'ui-vertical-nav-bar' }
|
|
30
|
+
)
|
|
31
|
+
const emits = defineEmits<{
|
|
32
|
+
(event: 'contextmenu', value: [Event, UI_I_NavItem]): void
|
|
33
|
+
}>()
|
|
34
|
+
|
|
35
|
+
const showContextMenu = (event: Event, item: UI_I_NavItem): void => {
|
|
36
|
+
// navigateTo(item.path)
|
|
37
|
+
emits('contextmenu', [event, item])
|
|
38
|
+
}
|
|
39
|
+
</script>
|
|
40
|
+
|
|
41
|
+
<style scoped lang="scss">
|
|
42
|
+
.clr-vertical-nav {
|
|
43
|
+
padding-top: 0;
|
|
44
|
+
width: 100%;
|
|
45
|
+
background-color: transparent;
|
|
46
|
+
|
|
47
|
+
.clr-treenode-link {
|
|
48
|
+
display: flex;
|
|
49
|
+
align-items: center;
|
|
50
|
+
text-overflow: ellipsis;
|
|
51
|
+
overflow: hidden;
|
|
52
|
+
white-space: nowrap;
|
|
53
|
+
padding: 2px 12px;
|
|
54
|
+
border-radius: 0;
|
|
55
|
+
|
|
56
|
+
&.active {
|
|
57
|
+
background: var(--vertical-nav-active-bg-color);
|
|
58
|
+
color: var(--vertical-nav-active-item-color);
|
|
59
|
+
.clr-treenode-item {
|
|
60
|
+
color: var(--vertical-nav-active-item-color);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
&:hover:not(.active) {
|
|
64
|
+
background: var(--vertical-nav-hover-bg-color);
|
|
65
|
+
color: var(--vertical-nav-hover-item-color);
|
|
66
|
+
margin-bottom: -1px;
|
|
67
|
+
border-bottom: 1px solid var(--row-hover-border-color);
|
|
68
|
+
|
|
69
|
+
.clr-treenode-item {
|
|
70
|
+
color: var(--vertical-nav-hover-item-color);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
.icon {
|
|
74
|
+
margin: 1px 4px 0;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
</style>
|
|
79
|
+
|
|
80
|
+
<style>
|
|
81
|
+
/* :root {
|
|
82
|
+
--vertical-nav-active-item-color: #fff;
|
|
83
|
+
--vertical-nav-active-bg-color: #29414e;
|
|
84
|
+
}
|
|
85
|
+
:root.dark-theme {
|
|
86
|
+
--vertical-nav-active-item-color: #000;
|
|
87
|
+
--vertical-nav-active-bg-color: #d8e3e9;
|
|
88
|
+
} */
|
|
89
|
+
</style>
|