@vc-shell/framework 1.1.60 → 1.1.62
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/CHANGELOG.md +13 -0
- package/core/services/menu-service.ts +9 -20
- package/core/types/index.ts +1 -1
- package/dist/core/services/menu-service.d.ts.map +1 -1
- package/dist/core/types/index.d.ts +1 -1
- package/dist/core/types/index.d.ts.map +1 -1
- package/dist/framework.js +4246 -4251
- package/dist/index.css +1 -1
- package/dist/injection-keys.d.ts +1 -0
- package/dist/injection-keys.d.ts.map +1 -1
- package/dist/shared/components/theme-selector/theme-selector.vue.d.ts.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/ui/components/organisms/vc-app/_internal/vc-app-bar/_internal/AppBarContent.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-app/_internal/vc-app-bar/_internal/AppBarHeader.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-app/vc-app.vue.d.ts.map +1 -1
- package/package.json +4 -4
- package/shared/components/theme-selector/theme-selector.vue +5 -10
- package/ui/components/organisms/vc-app/_internal/vc-app-bar/_internal/AppBarContent.vue +13 -3
- package/ui/components/organisms/vc-app/_internal/vc-app-bar/_internal/AppBarHeader.vue +13 -2
- package/ui/components/organisms/vc-app/_internal/vc-app-menu/_internal/vc-app-menu-item/_internal/vc-app-menu-link.vue +4 -4
- package/ui/components/organisms/vc-app/vc-app.vue +2 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppBarContent.vue.d.ts","sourceRoot":"","sources":["../../../../../../../../ui/components/organisms/vc-app/_internal/vc-app-bar/_internal/AppBarContent.vue"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"AppBarContent.vue.d.ts","sourceRoot":"","sources":["../../../../../../../../ui/components/organisms/vc-app/_internal/vc-app-bar/_internal/AppBarContent.vue"],"names":[],"mappings":"AAAA,OA4DO,EAAE,QAAQ,EAAU,MAAM,KAAK,CAAC;AAGvC,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;CAC7B,CAAC;AAqCF,QAAA,IAAI,OAAO,IAAU,EAAE,OAAO,IAAW,CAAE;AAC3C,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,GAC5C;IAAE,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AAoBvD,QAAA,MAAM,eAAe,kSAMnB,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAQ1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
package/dist/ui/components/organisms/vc-app/_internal/vc-app-bar/_internal/AppBarHeader.vue.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppBarHeader.vue.d.ts","sourceRoot":"","sources":["../../../../../../../../ui/components/organisms/vc-app/_internal/vc-app-bar/_internal/AppBarHeader.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AppBarHeader.vue.d.ts","sourceRoot":"","sources":["../../../../../../../../ui/components/organisms/vc-app/_internal/vc-app-bar/_internal/AppBarHeader.vue"],"names":[],"mappings":"AA4LA,OAAO,EAA8B,QAAQ,EAAe,MAAM,KAAK,CAAC;AAKxE,KAAK,WAAW,GAAG;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;CAC7B,CAAC;AAwJF,QAAA,IAAI,OAAO,IAAW,CAAE;AACxB,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AA2B/C,QAAA,MAAM,eAAe;;;;;;kFAOnB,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAQ1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vc-app.vue.d.ts","sourceRoot":"","sources":["../../../../../ui/components/organisms/vc-app/vc-app.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"vc-app.vue.d.ts","sourceRoot":"","sources":["../../../../../ui/components/organisms/vc-app/vc-app.vue"],"names":[],"mappings":"AA0UA,MAAM,WAAW,KAAK;IACpB,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAWD,KAAK,WAAW,GAAG;IACjB,cAAc,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,GAAG,CAAC;CACrC,CAAC;AA6UF,QAAA,MAAM,eAAe;mCAvVe,IAAI;;uCAAJ,IAAI;kFA8VtC,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAQ1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vc-shell/framework",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.62",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/framework.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -85,9 +85,9 @@
|
|
|
85
85
|
"@fullhuman/postcss-purgecss": "^7.0.2",
|
|
86
86
|
"@laynezh/vite-plugin-lib-assets": "v1.1.0",
|
|
87
87
|
"@types/dompurify": "^3.0.5",
|
|
88
|
-
"@vc-shell/api-client-generator": "^1.1.
|
|
89
|
-
"@vc-shell/config-generator": "^1.1.
|
|
90
|
-
"@vc-shell/ts-config": "^1.1.
|
|
88
|
+
"@vc-shell/api-client-generator": "^1.1.62",
|
|
89
|
+
"@vc-shell/config-generator": "^1.1.62",
|
|
90
|
+
"@vc-shell/ts-config": "^1.1.62",
|
|
91
91
|
"@vitejs/plugin-vue": "^5.2.3",
|
|
92
92
|
"@vue/test-utils": "^2.4.5",
|
|
93
93
|
"cypress-signalr-mock": "^1.5.0",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
<script lang="ts" setup>
|
|
37
37
|
import { GenericDropdown } from "../generic-dropdown";
|
|
38
38
|
import { useTheme } from "../../../core/composables/useTheme";
|
|
39
|
-
import { ref
|
|
39
|
+
import { ref } from "vue";
|
|
40
40
|
import { notification } from "..";
|
|
41
41
|
import { SettingsMenuItem } from "../settings-menu-item";
|
|
42
42
|
import { VcIcon } from "../../../ui/components";
|
|
@@ -47,16 +47,11 @@ const opened = ref(false);
|
|
|
47
47
|
const handleThemeSelect = (theme: { key: string; name: string }) => {
|
|
48
48
|
setTheme(theme.key);
|
|
49
49
|
opened.value = false;
|
|
50
|
-
};
|
|
51
50
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
notification(newLocalizedName);
|
|
57
|
-
}
|
|
58
|
-
},
|
|
59
|
-
);
|
|
51
|
+
if (currentLocalizedName.value) {
|
|
52
|
+
notification(currentLocalizedName.value);
|
|
53
|
+
}
|
|
54
|
+
};
|
|
60
55
|
</script>
|
|
61
56
|
|
|
62
57
|
<style lang="scss">
|
|
@@ -1,23 +1,29 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div
|
|
3
3
|
class="app-bar-content"
|
|
4
|
-
:class="{ 'app-bar-content--collapsed': !expanded }"
|
|
4
|
+
:class="{ 'app-bar-content--collapsed': !expanded, 'app-bar-content--embedded': isEmbedded }"
|
|
5
5
|
>
|
|
6
6
|
<div class="app-bar-content__main">
|
|
7
7
|
<slot name="navmenu" />
|
|
8
8
|
</div>
|
|
9
|
-
<div
|
|
9
|
+
<div
|
|
10
|
+
v-if="!isEmbedded"
|
|
11
|
+
class="app-bar-content__footer"
|
|
12
|
+
>
|
|
10
13
|
<slot name="user-dropdown" />
|
|
11
14
|
</div>
|
|
12
15
|
</div>
|
|
13
16
|
</template>
|
|
14
17
|
|
|
15
18
|
<script lang="ts" setup>
|
|
16
|
-
import { MaybeRef } from "vue";
|
|
19
|
+
import { MaybeRef, inject } from "vue";
|
|
20
|
+
import { EMBEDDED_MODE } from "../../../../../../../injection-keys";
|
|
17
21
|
|
|
18
22
|
defineProps<{
|
|
19
23
|
expanded: MaybeRef<boolean>;
|
|
20
24
|
}>();
|
|
25
|
+
|
|
26
|
+
const isEmbedded = inject(EMBEDDED_MODE);
|
|
21
27
|
</script>
|
|
22
28
|
|
|
23
29
|
<style lang="scss">
|
|
@@ -29,6 +35,10 @@ defineProps<{
|
|
|
29
35
|
height: calc(100% - var(--app-bar-height));
|
|
30
36
|
}
|
|
31
37
|
|
|
38
|
+
&--embedded {
|
|
39
|
+
height: 100%;
|
|
40
|
+
}
|
|
41
|
+
|
|
32
42
|
&__main {
|
|
33
43
|
@apply tw-flex-grow tw-overflow-auto;
|
|
34
44
|
padding: var(--app-bar-padding);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div
|
|
3
|
-
v-if="
|
|
3
|
+
v-if="showAppBar"
|
|
4
4
|
class="app-bar-header"
|
|
5
5
|
:class="{
|
|
6
6
|
'app-bar-header--collapsed': !expanded && !$isMobile.value,
|
|
@@ -68,9 +68,10 @@
|
|
|
68
68
|
<script lang="ts" setup>
|
|
69
69
|
import { VcIcon } from "../../../../../";
|
|
70
70
|
import { MenuBurgerIcon } from "../../../../../atoms/vc-icon/icons";
|
|
71
|
-
import { computed, ref, watchEffect, MaybeRef } from "vue";
|
|
71
|
+
import { computed, ref, watchEffect, MaybeRef, inject, Ref } from "vue";
|
|
72
72
|
import { useNotifications } from "../../../../../../../core/composables";
|
|
73
73
|
import { useBladeNavigation } from "./../../../../../../../shared";
|
|
74
|
+
import { EMBEDDED_MODE } from "../../../../../../../injection-keys";
|
|
74
75
|
|
|
75
76
|
defineProps<{
|
|
76
77
|
logo?: string;
|
|
@@ -87,6 +88,16 @@ const { blades, currentBladeNavigationData } = useBladeNavigation();
|
|
|
87
88
|
|
|
88
89
|
const viewTitle = ref("");
|
|
89
90
|
const currentBladeId = ref(0);
|
|
91
|
+
const isEmbedded = inject(EMBEDDED_MODE);
|
|
92
|
+
const isMobile = inject("isMobile") as Ref<boolean>;
|
|
93
|
+
const isDesktop = inject("isDesktop") as Ref<boolean>;
|
|
94
|
+
|
|
95
|
+
const showAppBar = computed(() => {
|
|
96
|
+
if (isEmbedded) {
|
|
97
|
+
return false;
|
|
98
|
+
}
|
|
99
|
+
return (isMobile.value && blades.value.length <= 1) || isDesktop.value;
|
|
100
|
+
});
|
|
90
101
|
|
|
91
102
|
watchEffect(
|
|
92
103
|
() => {
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
<template
|
|
8
8
|
v-if="!expand"
|
|
9
9
|
#tooltip
|
|
10
|
-
>{{ title }}</template
|
|
10
|
+
>{{ $t(title ?? "") }}</template
|
|
11
11
|
>
|
|
12
12
|
<div
|
|
13
13
|
class="vc-app-menu-link__item"
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
class="vc-app-menu-link__title"
|
|
44
44
|
>
|
|
45
45
|
<div class="vc-app-menu-link__title-truncate">
|
|
46
|
-
{{ title }}
|
|
46
|
+
{{ $t(title ?? "") }}
|
|
47
47
|
</div>
|
|
48
48
|
<div
|
|
49
49
|
v-if="(!!children?.length && expand) || false"
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
<template
|
|
77
77
|
v-if="!expand"
|
|
78
78
|
#tooltip
|
|
79
|
-
>{{ nested.title }}</template
|
|
79
|
+
>{{ $t(nested.title) }}</template
|
|
80
80
|
>
|
|
81
81
|
<router-link
|
|
82
82
|
v-if="$hasAccess(nested.permissions!) && nested.url"
|
|
@@ -126,7 +126,7 @@
|
|
|
126
126
|
'vc-app-menu-link__child-item-title--no-icon': !nested.icon,
|
|
127
127
|
}"
|
|
128
128
|
>
|
|
129
|
-
{{ nested.title }}
|
|
129
|
+
{{ $t(nested.title) }}
|
|
130
130
|
</p>
|
|
131
131
|
</Transition>
|
|
132
132
|
</div>
|
|
@@ -93,7 +93,7 @@ import { LogoutButton } from "../../../../shared/components/logout-button";
|
|
|
93
93
|
import { useI18n } from "vue-i18n";
|
|
94
94
|
import { provideGlobalSearch } from "../../../../core/composables/useGlobalSearch";
|
|
95
95
|
import { provideDashboardService } from "../../../../core/composables/useDashboard";
|
|
96
|
-
import { DynamicModulesKey } from "../../../../injection-keys";
|
|
96
|
+
import { DynamicModulesKey, EMBEDDED_MODE } from "../../../../injection-keys";
|
|
97
97
|
import { provideMenuService } from "../../../../core/composables/useMenuService";
|
|
98
98
|
import { provideAppBarMobileButtonsService } from "../../../../core/composables/useAppBarMobileButtons";
|
|
99
99
|
import { useUserManagement } from "../../../../core/composables/useUserManagement";
|
|
@@ -247,6 +247,7 @@ provide(DynamicModulesKey, dynamicModules);
|
|
|
247
247
|
provideDashboardService();
|
|
248
248
|
provideMenuService();
|
|
249
249
|
provideGlobalSearch();
|
|
250
|
+
provide(EMBEDDED_MODE, route.query.EmbeddedMode === "true");
|
|
250
251
|
|
|
251
252
|
onUnmounted(() => {
|
|
252
253
|
isAppReady.value = false;
|