@apptegy/nuxt-navigation 0.1.1 → 0.1.3
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/dist/module.json +1 -1
- package/dist/runtime/components/Nav/Header.vue +5 -2
- package/dist/runtime/components/Nav/HelpArticles.vue +1 -1
- package/dist/runtime/components/Nav/ImpersonateInfoPanel.vue +0 -2
- package/dist/runtime/components/Nav/OrgSelect.vue +15 -7
- package/dist/runtime/components/Nav/Sidebar.vue +4 -5
- package/dist/runtime/composables/accessibleActions.d.ts +2 -2
- package/package.json +4 -2
package/dist/module.json
CHANGED
|
@@ -104,8 +104,11 @@ function handleSelectedClick(index: number) {
|
|
|
104
104
|
}
|
|
105
105
|
|
|
106
106
|
function handleKeydownAction(userSettingsOptions: any[], idx: number, $event: { key: string | boolean; }, optionRef: { focus: () => void; }[], dropdownTriggerRef: { focus: () => void; }) {
|
|
107
|
-
|
|
108
|
-
|
|
107
|
+
if ($event.key === 'Enter' || $event.key === ' ') {
|
|
108
|
+
emit('select-setting', idx);
|
|
109
|
+
} else {
|
|
110
|
+
handleKeydown(userSettingsOptions, idx, $event, optionRef, dropdownTriggerRef);
|
|
111
|
+
}
|
|
109
112
|
}
|
|
110
113
|
|
|
111
114
|
function toggleSidebar() {
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
<img v-if="isDropdown" src="../../assets/img/help-toggle.svg" alt="" class="help-center-btn-icon" />
|
|
24
24
|
<img v-else src="../../assets/img/help.svg" alt="" class="help-center-btn-icon" />
|
|
25
25
|
<span v-if="navbarExpanded">
|
|
26
|
-
{{ isDropdown ? $t('
|
|
26
|
+
{{ isDropdown ? $t('navigation.helpCenter') : $t('navigation.helpArticles') }}
|
|
27
27
|
</span>
|
|
28
28
|
<img
|
|
29
29
|
v-if="isDropdown && navbarExpanded && !hasArticles"
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
/>
|
|
26
26
|
<span v-if="selectedOrg.intranet" class="intranet selected">
|
|
27
27
|
<a-icon icon="16:lock-locked" ></a-icon>
|
|
28
|
-
{{ $t('
|
|
28
|
+
{{ $t('navigation.intranet') }}
|
|
29
29
|
</span>
|
|
30
30
|
<!-- <Icon
|
|
31
31
|
style="margin-bottom: 2px"
|
|
@@ -52,10 +52,10 @@
|
|
|
52
52
|
<div class="selected-space">
|
|
53
53
|
<!-- <Icon v-if="option === selectedOrg" name-or-path="success" size="tiny" /> -->
|
|
54
54
|
</div>
|
|
55
|
-
<span :class="{ pinned: option.pinned, 'item-flex': true }">{{ option
|
|
55
|
+
<span :class="{ pinned: option.pinned, 'item-flex': true }">{{ optionLabel(option) }}
|
|
56
56
|
<span v-if="option.intranet" class="intranet selected">
|
|
57
57
|
<a-icon icon="16:lock-locked"></a-icon>
|
|
58
|
-
{{ $t('
|
|
58
|
+
{{ $t('navigation.intranet') }}
|
|
59
59
|
</span>
|
|
60
60
|
</span>
|
|
61
61
|
</div>
|
|
@@ -80,7 +80,6 @@ const {
|
|
|
80
80
|
keydownActionsOnTrigger,
|
|
81
81
|
handleKeydown,
|
|
82
82
|
handleDropdownSearch,
|
|
83
|
-
// focusDropdownItem,
|
|
84
83
|
} = useDropdown();
|
|
85
84
|
|
|
86
85
|
interface IOrgSelectProps {
|
|
@@ -88,11 +87,16 @@ interface IOrgSelectProps {
|
|
|
88
87
|
selectedOrg: {};
|
|
89
88
|
};
|
|
90
89
|
|
|
90
|
+
const props = withDefaults(defineProps<IOrgSelectProps>(), {
|
|
91
|
+
selectedOrg: {
|
|
92
|
+
name: '',
|
|
93
|
+
intranet: false
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
|
|
91
97
|
const dropdownTriggerRef = ref();
|
|
92
98
|
const optionRef = ref();
|
|
93
99
|
|
|
94
|
-
const props = defineProps<IOrgSelectProps>();
|
|
95
|
-
|
|
96
100
|
const sortedOrgs = computed(() => {
|
|
97
101
|
return [...props.orgs].sort((a, b) => {
|
|
98
102
|
if (a.pinned && !b.pinned) {
|
|
@@ -105,9 +109,13 @@ const sortedOrgs = computed(() => {
|
|
|
105
109
|
});
|
|
106
110
|
});
|
|
107
111
|
const orgDropdownLabel = computed(() => {
|
|
108
|
-
return
|
|
112
|
+
return $t('navigation.orgDropdown') || 'Select Organization'
|
|
109
113
|
})
|
|
110
114
|
|
|
115
|
+
function optionLabel(option) {
|
|
116
|
+
return option?.name || option.label
|
|
117
|
+
}
|
|
118
|
+
|
|
111
119
|
function handleSelectedClick(index: number) {
|
|
112
120
|
emit('selected', index);
|
|
113
121
|
closeDropdown();
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
aria-label="Main"
|
|
6
6
|
:class="{ expanded }"
|
|
7
7
|
>
|
|
8
|
-
|
|
8
|
+
<a
|
|
9
9
|
ref="skip-to-content"
|
|
10
10
|
href="#main-content-section"
|
|
11
11
|
class="skip-to-content"
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
</div>
|
|
37
37
|
<div class="navbar--footer">
|
|
38
38
|
<NavImpersonateInfoPanel
|
|
39
|
-
v-if="
|
|
39
|
+
v-if="impersonatedUser.show"
|
|
40
40
|
:impersonated-user="impersonatedUser"
|
|
41
41
|
:navbar-expanded="expanded"
|
|
42
42
|
/>
|
|
@@ -94,6 +94,7 @@ withDefaults(defineProps<ISidebarProps>(), {
|
|
|
94
94
|
currentApplication: 'media',
|
|
95
95
|
homepageUrl: '/',
|
|
96
96
|
showHelpArticles: true,
|
|
97
|
+
expanded: true,
|
|
97
98
|
helpArticleOptions: () => [],
|
|
98
99
|
impersonatedUser: {
|
|
99
100
|
show: false,
|
|
@@ -111,9 +112,6 @@ withDefaults(defineProps<ISidebarProps>(), {
|
|
|
111
112
|
</script>
|
|
112
113
|
|
|
113
114
|
<style scoped>
|
|
114
|
-
/* * {
|
|
115
|
-
outline: 2px solid red;
|
|
116
|
-
} */
|
|
117
115
|
.navbar {
|
|
118
116
|
grid-area: navsidebar;
|
|
119
117
|
display: grid;
|
|
@@ -140,6 +138,7 @@ withDefaults(defineProps<ISidebarProps>(), {
|
|
|
140
138
|
.navbar--logo {
|
|
141
139
|
padding: 16px;
|
|
142
140
|
background-color: var(--dscl-nav-background-color, var(--purple-70));
|
|
141
|
+
overflow: hidden;
|
|
143
142
|
}
|
|
144
143
|
.navbar--content {
|
|
145
144
|
display: flex;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@apptegy/nuxt-navigation",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -29,6 +29,7 @@
|
|
|
29
29
|
"@nuxt/kit": "^3.12.3"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
+
"@iconify/vue": "^4.1.2",
|
|
32
33
|
"@nuxt/devtools": "^1.3.9",
|
|
33
34
|
"@nuxt/eslint-config": "^0.3.13",
|
|
34
35
|
"@apptegy/icons": "2.10.0",
|
|
@@ -36,9 +37,10 @@
|
|
|
36
37
|
"@nuxt/schema": "^3.12.3",
|
|
37
38
|
"@nuxt/test-utils": "^3.13.1",
|
|
38
39
|
"@types/node": "^20.14.10",
|
|
40
|
+
"@vueuse/components": "10.11.0",
|
|
39
41
|
"changelogen": "^0.5.5",
|
|
40
42
|
"eslint": "^9.7.0",
|
|
41
|
-
"lodash": "^4.17.
|
|
43
|
+
"lodash": "^4.17.21",
|
|
42
44
|
"nuxt": "^3.12.3",
|
|
43
45
|
"sass": "^1.77.8",
|
|
44
46
|
"typescript": "^5.5.3",
|