@vc-shell/framework 1.1.68 → 1.1.70
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/app-bar-mobile-buttons-service.ts +6 -2
- package/dist/core/services/app-bar-mobile-buttons-service.d.ts.map +1 -1
- package/dist/framework.js +6236 -6189
- package/dist/index.css +1 -1
- package/dist/shared/components/app-switcher/components/vc-app-switcher/vc-app-switcher.vue.d.ts.map +1 -1
- package/dist/shared/components/generic-dropdown/generic-dropdown.vue.d.ts.map +1 -1
- package/dist/shared/components/notification-dropdown/notification-dropdown.vue.d.ts.map +1 -1
- package/dist/shared/components/sidebar/sidebar.vue.d.ts.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/ui/components/atoms/vc-tooltip/vc-tooltip.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-input/vc-input.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-multivalue/vc-multivalue.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-select/vc-select.vue.d.ts.map +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/_internal/vc-app-bar/_internal/AppBarOverlay.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-app/_internal/vc-app-bar/_internal/AppBarSlots.vue.d.ts +3 -0
- package/dist/ui/components/organisms/vc-app/_internal/vc-app-bar/_internal/AppBarSlots.vue.d.ts.map +1 -0
- package/dist/ui/components/organisms/vc-app/_internal/vc-app-bar/_internal/MenuSidebar.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-app/_internal/vc-app-bar/vc-app-bar.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-app/composables/useAppSlots.d.ts +28 -0
- package/dist/ui/components/organisms/vc-app/composables/useAppSlots.d.ts.map +1 -0
- package/dist/ui/components/organisms/vc-app/vc-app.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-blade/_internal/vc-blade-header/vc-blade-header.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-table/_internal/vc-table-desktop-view/_internal/vc-table-row/vc-table-row.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-table/composables/useTableColumnResize.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-table/composables/useTableState.d.ts.map +1 -1
- package/dist/{vendor-date-fns-CdFbeoHV.js → vendor-date-fns-sZ1zMzTH.js} +1109 -1090
- package/dist/{vendor-floating-ui-core-DpX2jufl.js → vendor-floating-ui-core-3dy7r5mx.js} +1 -1
- package/dist/{vendor-floating-ui-dom-C4AKN5Mo.js → vendor-floating-ui-dom-DCjH_QK4.js} +6 -6
- package/dist/{vendor-floating-ui-utils-CRaCuFxS.js → vendor-floating-ui-utils-D2sT7feD.js} +15 -15
- package/dist/{vendor-floating-ui-vue-OwtolkBv.js → vendor-floating-ui-vue-BUBCqiRN.js} +12 -12
- package/dist/vendor-vuepic-vue-datepicker-Chx5s5I-.js +5116 -0
- package/package.json +5 -5
- package/shared/components/app-switcher/components/vc-app-switcher/vc-app-switcher.vue +3 -1
- package/shared/components/generic-dropdown/generic-dropdown.vue +15 -10
- package/shared/components/notification-dropdown/notification-dropdown.vue +1 -0
- package/shared/components/sidebar/sidebar.vue +1 -1
- package/ui/components/atoms/vc-tooltip/vc-tooltip.vue +1 -1
- package/ui/components/molecules/vc-input/vc-input.vue +8 -0
- package/ui/components/molecules/vc-multivalue/vc-multivalue.vue +1 -1
- package/ui/components/molecules/vc-select/vc-select.vue +1 -1
- package/ui/components/organisms/vc-app/_internal/vc-app-bar/_internal/AppBarContent.vue +5 -5
- package/ui/components/organisms/vc-app/_internal/vc-app-bar/_internal/AppBarHeader.vue +5 -8
- package/ui/components/organisms/vc-app/_internal/vc-app-bar/_internal/AppBarOverlay.vue +1 -1
- package/ui/components/organisms/vc-app/_internal/vc-app-bar/_internal/AppBarSlots.vue +118 -0
- package/ui/components/organisms/vc-app/_internal/vc-app-bar/_internal/MenuSidebar.vue +12 -8
- package/ui/components/organisms/vc-app/_internal/vc-app-bar/vc-app-bar.vue +3 -74
- package/ui/components/organisms/vc-app/composables/useAppSlots.ts +75 -0
- package/ui/components/organisms/vc-app/vc-app.vue +30 -42
- package/ui/components/organisms/vc-blade/_internal/vc-blade-header/vc-blade-header.vue +1 -1
- package/ui/components/organisms/vc-table/_internal/vc-table-desktop-view/_internal/vc-table-row/vc-table-row.vue +5 -1
- package/ui/components/organisms/vc-table/composables/useTableColumnResize.ts +0 -1
- package/ui/components/organisms/vc-table/composables/useTableState.ts +17 -16
- package/dist/vendor-vuepic-vue-datepicker-DkHsqyoL.js +0 -4997
|
@@ -22,38 +22,7 @@
|
|
|
22
22
|
:disable-menu="disableMenu"
|
|
23
23
|
@backlink:click="closeBlade(blades.length - 1)"
|
|
24
24
|
@logo:click="openRoot"
|
|
25
|
-
|
|
26
|
-
<template
|
|
27
|
-
v-if="!disableAppSwitcher"
|
|
28
|
-
#app-switcher
|
|
29
|
-
>
|
|
30
|
-
<slot name="app-switcher">
|
|
31
|
-
<VcAppSwitcher
|
|
32
|
-
:apps-list="appsList"
|
|
33
|
-
@on-click="switchApp($event)"
|
|
34
|
-
/>
|
|
35
|
-
</slot>
|
|
36
|
-
</template>
|
|
37
|
-
|
|
38
|
-
<template #navmenu>
|
|
39
|
-
<VcAppMenu
|
|
40
|
-
v-if="!disableMenu"
|
|
41
|
-
ref="menu"
|
|
42
|
-
class="vc-app__app-menu"
|
|
43
|
-
:version="version"
|
|
44
|
-
@item:click="onMenuItemClick"
|
|
45
|
-
>
|
|
46
|
-
</VcAppMenu>
|
|
47
|
-
</template>
|
|
48
|
-
|
|
49
|
-
<template #user-dropdown>
|
|
50
|
-
<UserDropdownButton
|
|
51
|
-
:avatar-url="avatar"
|
|
52
|
-
:name="name"
|
|
53
|
-
:role="role"
|
|
54
|
-
/>
|
|
55
|
-
</template>
|
|
56
|
-
</VcAppBar>
|
|
25
|
+
/>
|
|
57
26
|
|
|
58
27
|
<!-- Blade navigation -->
|
|
59
28
|
<div
|
|
@@ -70,12 +39,11 @@
|
|
|
70
39
|
</template>
|
|
71
40
|
<!-- eslint-disable @typescript-eslint/no-explicit-any -->
|
|
72
41
|
<script lang="ts" setup>
|
|
73
|
-
import { inject, provide, watch, ref, onUnmounted, computed } from "vue";
|
|
42
|
+
import { inject, provide, watch, ref, onUnmounted, computed, useSlots } from "vue";
|
|
74
43
|
import VcAppBar from "./_internal/vc-app-bar/vc-app-bar.vue";
|
|
75
|
-
import
|
|
44
|
+
import { provideAppSlots } from "./composables/useAppSlots";
|
|
76
45
|
import {
|
|
77
46
|
VcPopupContainer,
|
|
78
|
-
UserDropdownButton,
|
|
79
47
|
useBladeNavigation,
|
|
80
48
|
NotificationDropdown,
|
|
81
49
|
BladeRoutesRecord,
|
|
@@ -90,7 +58,6 @@ import { LanguageSelector } from "../../../../shared/components/language-selecto
|
|
|
90
58
|
import { ThemeSelector } from "../../../../shared/components/theme-selector";
|
|
91
59
|
import { ChangePasswordButton } from "../../../../shared/components/change-password-button";
|
|
92
60
|
import { LogoutButton } from "../../../../shared/components/logout-button";
|
|
93
|
-
import { useI18n } from "vue-i18n";
|
|
94
61
|
import { provideGlobalSearch } from "../../../../core/composables/useGlobalSearch";
|
|
95
62
|
import { provideDashboardService } from "../../../../core/composables/useDashboard";
|
|
96
63
|
import { DynamicModulesKey, EMBEDDED_MODE } from "../../../../injection-keys";
|
|
@@ -110,7 +77,7 @@ export interface Props {
|
|
|
110
77
|
role?: string;
|
|
111
78
|
}
|
|
112
79
|
|
|
113
|
-
|
|
80
|
+
defineEmits<{
|
|
114
81
|
(e: "logo-click", goToRoot: () => void): void;
|
|
115
82
|
}>();
|
|
116
83
|
|
|
@@ -123,6 +90,7 @@ defineSlots<{
|
|
|
123
90
|
}>();
|
|
124
91
|
|
|
125
92
|
const props = defineProps<Props>();
|
|
93
|
+
const slots = useSlots();
|
|
126
94
|
|
|
127
95
|
console.debug("vc-app: Init vc-app");
|
|
128
96
|
|
|
@@ -131,13 +99,16 @@ const dynamicModules = inject(DynamicModulesKey, undefined);
|
|
|
131
99
|
|
|
132
100
|
const isAppReady = ref(props.isReady);
|
|
133
101
|
|
|
102
|
+
const route = useRoute();
|
|
134
103
|
const router = useRouter();
|
|
135
104
|
|
|
105
|
+
const isEmbedded = route.query.EmbeddedMode === "true";
|
|
106
|
+
|
|
136
107
|
const { openBlade, closeBlade, resolveBladeByName, blades, goToRoot } = useBladeNavigation();
|
|
137
108
|
const { appsList, switchApp, getApps } = useAppSwitcher();
|
|
138
109
|
|
|
139
|
-
const { loadFromHistory, notifications
|
|
140
|
-
|
|
110
|
+
const { loadFromHistory, notifications } = useNotifications();
|
|
111
|
+
|
|
141
112
|
const { isAuthenticated } = useUserManagement();
|
|
142
113
|
|
|
143
114
|
const routes = router.getRoutes();
|
|
@@ -149,8 +120,6 @@ const hasUnreadNotifications = computed(() => {
|
|
|
149
120
|
return notifications.value.some((item) => item.isNew);
|
|
150
121
|
});
|
|
151
122
|
|
|
152
|
-
const { t } = useI18n({ useScope: "global" });
|
|
153
|
-
|
|
154
123
|
const { register: registerMobileButton } = provideAppBarMobileButtonsService();
|
|
155
124
|
|
|
156
125
|
registerMenuItem({
|
|
@@ -190,6 +159,7 @@ registerMobileButton({
|
|
|
190
159
|
component: NotificationDropdown,
|
|
191
160
|
icon: "lucide-bell",
|
|
192
161
|
order: 10,
|
|
162
|
+
isVisible: !isEmbedded,
|
|
193
163
|
});
|
|
194
164
|
|
|
195
165
|
const onMenuItemClick = function (item: MenuItem) {
|
|
@@ -247,7 +217,25 @@ provide(DynamicModulesKey, dynamicModules);
|
|
|
247
217
|
provideDashboardService();
|
|
248
218
|
provideMenuService();
|
|
249
219
|
provideGlobalSearch();
|
|
250
|
-
provide(EMBEDDED_MODE,
|
|
220
|
+
provide(EMBEDDED_MODE, isEmbedded);
|
|
221
|
+
// Provide slots to child components with all necessary props and handlers
|
|
222
|
+
provideAppSlots(
|
|
223
|
+
slots,
|
|
224
|
+
{
|
|
225
|
+
disableMenu: props.disableMenu,
|
|
226
|
+
disableAppSwitcher: props.disableAppSwitcher,
|
|
227
|
+
version: props.version,
|
|
228
|
+
avatar: props.avatar,
|
|
229
|
+
name: props.name,
|
|
230
|
+
role: props.role,
|
|
231
|
+
appsList: appsList,
|
|
232
|
+
isEmbedded,
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
onMenuItemClick,
|
|
236
|
+
switchApp,
|
|
237
|
+
},
|
|
238
|
+
);
|
|
251
239
|
|
|
252
240
|
onUnmounted(() => {
|
|
253
241
|
isAppReady.value = false;
|
|
@@ -43,7 +43,11 @@
|
|
|
43
43
|
:key="`${(item && typeof item === 'object' && 'id' in item && item.id) || index}_${cell.id}`"
|
|
44
44
|
class="vc-table-row__cell"
|
|
45
45
|
:class="[cell.class, { 'vc-table-row__cell--fixed-width': !!cell.width }]"
|
|
46
|
-
:style="
|
|
46
|
+
:style="
|
|
47
|
+
cell.width
|
|
48
|
+
? { maxWidth: cell.width, width: cell.width, flex: '0 1 auto', minWidth: '60px' }
|
|
49
|
+
: { flex: '1 1 0', minWidth: '60px' }
|
|
50
|
+
"
|
|
47
51
|
>
|
|
48
52
|
<div class="vc-table-row__cell-content">
|
|
49
53
|
<slot
|
|
@@ -48,7 +48,6 @@ export function useTableColumnResize(
|
|
|
48
48
|
document.body.style.overflow = "hidden";
|
|
49
49
|
document.body.style.userSelect = "none";
|
|
50
50
|
|
|
51
|
-
|
|
52
51
|
// If resizing any column and there are flexible columns, fix all column widths
|
|
53
52
|
if (headerRef.value) {
|
|
54
53
|
const hasFlexibleColumns = internalColumns.value.some((col) => col.visible !== false && !col.width);
|
|
@@ -55,11 +55,11 @@ export function useTableState(options: UseTableStateOptions) {
|
|
|
55
55
|
function mergeColumns(storedCol: TableColPartial, predefinedCol: TableColPartial | undefined) {
|
|
56
56
|
if (predefinedCol) {
|
|
57
57
|
if (predefinedCol.predefined && !storedCol.predefined) {
|
|
58
|
-
return {
|
|
59
|
-
...predefinedCol,
|
|
58
|
+
return {
|
|
59
|
+
...predefinedCol,
|
|
60
60
|
predefined: true,
|
|
61
61
|
width: storedCol.width || predefinedCol.width,
|
|
62
|
-
visible: storedCol.visible !== undefined ? storedCol.visible : predefinedCol.visible
|
|
62
|
+
visible: storedCol.visible !== undefined ? storedCol.visible : predefinedCol.visible,
|
|
63
63
|
};
|
|
64
64
|
} else {
|
|
65
65
|
return {
|
|
@@ -161,37 +161,38 @@ export function useTableState(options: UseTableStateOptions) {
|
|
|
161
161
|
title: item.title || originalColumn?.title || "",
|
|
162
162
|
width: item.width || originalColumn?.width,
|
|
163
163
|
};
|
|
164
|
-
|
|
164
|
+
|
|
165
165
|
// Don't set any width for new columns - they'll take available space
|
|
166
166
|
// The flexbox will handle the distribution
|
|
167
167
|
if (!newCol.width) {
|
|
168
168
|
// Keep it undefined to use flexbox
|
|
169
169
|
newCol.width = undefined;
|
|
170
170
|
}
|
|
171
|
-
|
|
171
|
+
|
|
172
172
|
internalColumns.value.push(newCol);
|
|
173
|
-
|
|
173
|
+
|
|
174
174
|
// When adding a new column, check if we need to adjust widths to prevent overflow
|
|
175
|
-
const visibleColumns = internalColumns.value.filter(col => col.visible !== false);
|
|
176
|
-
const hasFixedWidths = visibleColumns.some(col => col.width);
|
|
177
|
-
|
|
175
|
+
const visibleColumns = internalColumns.value.filter((col) => col.visible !== false);
|
|
176
|
+
const hasFixedWidths = visibleColumns.some((col) => col.width);
|
|
177
|
+
|
|
178
178
|
if (hasFixedWidths) {
|
|
179
179
|
// Calculate total fixed width
|
|
180
180
|
let totalFixedWidth = 0;
|
|
181
|
-
visibleColumns.forEach(col => {
|
|
182
|
-
if (col.width && typeof col.width ===
|
|
181
|
+
visibleColumns.forEach((col) => {
|
|
182
|
+
if (col.width && typeof col.width === "string") {
|
|
183
183
|
const width = parseInt(col.width);
|
|
184
184
|
if (!isNaN(width)) {
|
|
185
185
|
totalFixedWidth += width;
|
|
186
186
|
}
|
|
187
187
|
}
|
|
188
188
|
});
|
|
189
|
-
|
|
189
|
+
|
|
190
190
|
// If total fixed width is too large, remove fixed widths to allow flex distribution
|
|
191
|
-
if (totalFixedWidth > 800) {
|
|
192
|
-
|
|
191
|
+
if (totalFixedWidth > 800) {
|
|
192
|
+
// Assuming a reasonable container width
|
|
193
|
+
internalColumns.value = internalColumns.value.map((col) => ({
|
|
193
194
|
...col,
|
|
194
|
-
width: undefined // Let flexbox handle it
|
|
195
|
+
width: undefined, // Let flexbox handle it
|
|
195
196
|
}));
|
|
196
197
|
}
|
|
197
198
|
}
|
|
@@ -205,7 +206,7 @@ export function useTableState(options: UseTableStateOptions) {
|
|
|
205
206
|
title: item.title || originalColumn?.title || x.title || "",
|
|
206
207
|
width: item.width || originalColumn?.width || x.width,
|
|
207
208
|
};
|
|
208
|
-
|
|
209
|
+
|
|
209
210
|
return updatedCol;
|
|
210
211
|
}
|
|
211
212
|
return x;
|