@apptegy/nuxt-navigation 0.1.54 → 0.1.56
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
CHANGED
|
@@ -14,7 +14,11 @@
|
|
|
14
14
|
<button
|
|
15
15
|
v-if="showHelpArticles"
|
|
16
16
|
:id="!isDropdown && 'help-btn'"
|
|
17
|
-
:class="[
|
|
17
|
+
:class="[
|
|
18
|
+
'help-articles-btn',
|
|
19
|
+
!isDropdown && 'help-btn',
|
|
20
|
+
isRoomsUser && `help-btn-${userRoomsRole}`
|
|
21
|
+
]"
|
|
18
22
|
:aria-label="isDropdown ? $t('navigation.helpCenter') : $t('navigation.helpArticles')"
|
|
19
23
|
@click="expandDropdown"
|
|
20
24
|
>
|
|
@@ -23,6 +27,7 @@
|
|
|
23
27
|
</svg>
|
|
24
28
|
</button>
|
|
25
29
|
<button
|
|
30
|
+
v-if="settingsRoute"
|
|
26
31
|
:id="!isDropdown && 'help-btn'"
|
|
27
32
|
:class="['help-articles-btn', !isDropdown && 'help-btn']"
|
|
28
33
|
:aria-label="$t('navigation.accountSettings')"
|
|
@@ -37,7 +42,7 @@
|
|
|
37
42
|
</template>
|
|
38
43
|
|
|
39
44
|
<script setup lang="ts">
|
|
40
|
-
import { useSidebar, navigateTo } from "#imports";
|
|
45
|
+
import { useSidebar, navigateTo, useAuth } from "#imports";
|
|
41
46
|
import { ref, computed, onMounted } from 'vue'
|
|
42
47
|
|
|
43
48
|
interface IHelpArticlesProps {
|
|
@@ -47,6 +52,7 @@ interface IHelpArticlesProps {
|
|
|
47
52
|
showHelpArticles: boolean;
|
|
48
53
|
};
|
|
49
54
|
|
|
55
|
+
const { userProfile } = useAuth();
|
|
50
56
|
const props = withDefaults(defineProps<IHelpArticlesProps>(), {
|
|
51
57
|
helpArticleOptions: () => [],
|
|
52
58
|
settingsRoute: '',
|
|
@@ -61,6 +67,14 @@ const helpBtnActions = ref();
|
|
|
61
67
|
const dropdownScrollHeight = ref(0);
|
|
62
68
|
const isDropdown = ref(false);
|
|
63
69
|
|
|
70
|
+
const isRoomsUser = computed(() => {
|
|
71
|
+
return !!userProfile.value?.roles?.rooms
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
const userRoomsRole = computed(() => {
|
|
75
|
+
return userProfile.value?.roles?.rooms
|
|
76
|
+
});
|
|
77
|
+
|
|
64
78
|
const hasArticles = computed(() => !!props.helpArticleOptions?.values?.length)
|
|
65
79
|
|
|
66
80
|
onMounted(() => {
|
|
@@ -13,7 +13,7 @@ const component = computed(()=> props.as || resolveComponent("NuxtLink"));
|
|
|
13
13
|
<template>
|
|
14
14
|
<component :is="component" class="a-navbar-item" :class="{expanded, active}">
|
|
15
15
|
<slot name="icon">
|
|
16
|
-
<a-icon :icon="icon" font-size="24px"/>
|
|
16
|
+
<a-icon class="icon" :icon="icon" font-size="24px"/>
|
|
17
17
|
</slot>
|
|
18
18
|
<slot v-if="expanded" />
|
|
19
19
|
</component>
|
|
@@ -33,10 +33,6 @@ const component = computed(()=> props.as || resolveComponent("NuxtLink"));
|
|
|
33
33
|
border-radius: 8px;
|
|
34
34
|
user-select: none;
|
|
35
35
|
}
|
|
36
|
-
.a-navbar-item svg {
|
|
37
|
-
margin-right: 12px;
|
|
38
|
-
margin-left: 8px;
|
|
39
|
-
}
|
|
40
36
|
.a-navbar-item:focus-visible {
|
|
41
37
|
outline: var(--orange) auto 2px;
|
|
42
38
|
outline-offset: 0px;
|
|
@@ -47,10 +43,6 @@ const component = computed(()=> props.as || resolveComponent("NuxtLink"));
|
|
|
47
43
|
font-weight: 500;
|
|
48
44
|
color: #2D2D2D;
|
|
49
45
|
}
|
|
50
|
-
.a-navbar-item.active svg, .a-navbar-item.nuxt-link-exact-active svg, .a-navbar-item.router-link-exact-active svg {
|
|
51
|
-
margin-right: 12px;
|
|
52
|
-
margin-left: 8px;
|
|
53
|
-
}
|
|
54
46
|
.a-navbar-item.active svg path, .a-navbar-item.nuxt-link-exact-active svg path, .a-navbar-item.router-link-exact-active svg path {
|
|
55
47
|
stroke-width: 1.5px;
|
|
56
48
|
}
|
|
@@ -65,4 +57,9 @@ const component = computed(()=> props.as || resolveComponent("NuxtLink"));
|
|
|
65
57
|
.a-navbar-item:last-child {
|
|
66
58
|
margin-bottom: 8px;
|
|
67
59
|
}
|
|
60
|
+
|
|
61
|
+
.icon {
|
|
62
|
+
margin-right: 12px;
|
|
63
|
+
margin-left: 8px;
|
|
64
|
+
}
|
|
68
65
|
</style>
|
package/package.json
CHANGED
|
@@ -1,50 +1,49 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}
|
|
11
|
-
},
|
|
12
|
-
"main": "./dist/module.cjs",
|
|
13
|
-
"types": "./dist/types.d.ts",
|
|
14
|
-
"files": [
|
|
15
|
-
"dist"
|
|
16
|
-
],
|
|
17
|
-
"scripts": {
|
|
18
|
-
"prepack": "nuxt-module-build build",
|
|
19
|
-
"dev": "nuxi dev playground",
|
|
20
|
-
"dev:build": "nuxi build playground",
|
|
21
|
-
"dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxi prepare playground",
|
|
22
|
-
"release": "npm run lint && npm run test && npm run prepack && changelogen --release && npm publish && git push --follow-tags",
|
|
23
|
-
"lint": "eslint .",
|
|
24
|
-
"test": "vitest run",
|
|
25
|
-
"test:watch": "vitest watch",
|
|
26
|
-
"test:types": "vue-tsc --noEmit && cd playground && vue-tsc --noEmit"
|
|
27
|
-
},
|
|
28
|
-
"dependencies": {
|
|
29
|
-
"@apptegy/nuxt-intl": "2.1.2",
|
|
30
|
-
"@nuxt/kit": "^3.17.0",
|
|
31
|
-
"@vueuse/components": "12.8.2",
|
|
32
|
-
"@vueuse/core": "^12.8.2"
|
|
33
|
-
},
|
|
34
|
-
"devDependencies": {
|
|
35
|
-
"@nuxt/devtools": "^2.4.0",
|
|
36
|
-
"@nuxt/eslint-config": "^1.3.0",
|
|
37
|
-
"@nuxt/module-builder": "^0.8.4",
|
|
38
|
-
"@nuxt/schema": "^3.17.0",
|
|
39
|
-
"@nuxt/test-utils": "^3.17.2",
|
|
40
|
-
"@types/node": "^20.17.32",
|
|
41
|
-
"changelogen": "^0.5.7",
|
|
42
|
-
"eslint": "^9.25.1",
|
|
43
|
-
"nuxt": "^3.17.0",
|
|
44
|
-
"sass": "^1.87.0",
|
|
45
|
-
"typescript": "~5.6",
|
|
46
|
-
"vitest": "^3.1.2",
|
|
47
|
-
"vue": "^3.5.13",
|
|
48
|
-
"vue-tsc": "^2.2.10"
|
|
2
|
+
"name": "@apptegy/nuxt-navigation",
|
|
3
|
+
"version": "0.1.56",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"exports": {
|
|
6
|
+
".": {
|
|
7
|
+
"types": "./dist/types.d.ts",
|
|
8
|
+
"import": "./dist/module.mjs",
|
|
9
|
+
"require": "./dist/module.cjs"
|
|
49
10
|
}
|
|
50
|
-
}
|
|
11
|
+
},
|
|
12
|
+
"main": "./dist/module.cjs",
|
|
13
|
+
"types": "./dist/types.d.ts",
|
|
14
|
+
"files": [
|
|
15
|
+
"dist"
|
|
16
|
+
],
|
|
17
|
+
"dependencies": {
|
|
18
|
+
"@apptegy/nuxt-intl": "2.1.2",
|
|
19
|
+
"@nuxt/kit": "^3.17.0",
|
|
20
|
+
"@vueuse/components": "12.8.2",
|
|
21
|
+
"@vueuse/core": "^12.8.2"
|
|
22
|
+
},
|
|
23
|
+
"devDependencies": {
|
|
24
|
+
"@nuxt/devtools": "^2.4.0",
|
|
25
|
+
"@nuxt/eslint-config": "^1.3.0",
|
|
26
|
+
"@nuxt/module-builder": "^0.8.4",
|
|
27
|
+
"@nuxt/schema": "^3.17.0",
|
|
28
|
+
"@nuxt/test-utils": "^3.17.2",
|
|
29
|
+
"@types/node": "^20.17.32",
|
|
30
|
+
"changelogen": "^0.5.7",
|
|
31
|
+
"eslint": "^9.25.1",
|
|
32
|
+
"nuxt": "^3.17.0",
|
|
33
|
+
"sass": "^1.87.0",
|
|
34
|
+
"typescript": "~5.6",
|
|
35
|
+
"vitest": "^3.1.2",
|
|
36
|
+
"vue": "^3.5.13",
|
|
37
|
+
"vue-tsc": "^2.2.10"
|
|
38
|
+
},
|
|
39
|
+
"scripts": {
|
|
40
|
+
"dev": "nuxi dev playground",
|
|
41
|
+
"dev:build": "nuxi build playground",
|
|
42
|
+
"dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxi prepare playground",
|
|
43
|
+
"release": "npm run lint && npm run test && npm run prepack && changelogen --release && npm publish && git push --follow-tags",
|
|
44
|
+
"lint": "eslint .",
|
|
45
|
+
"test": "vitest run",
|
|
46
|
+
"test:watch": "vitest watch",
|
|
47
|
+
"test:types": "vue-tsc --noEmit && cd playground && vue-tsc --noEmit"
|
|
48
|
+
}
|
|
49
|
+
}
|