@vc-shell/framework 2.5.0 → 2.6.0-rc.0
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/ai-agent/index.js +3 -3
- package/dist/chunks/ExtensionPoint.vue_vue_type_style_index_0_lang-B1R06zHa.js.map +1 -1
- package/dist/chunks/VcAiAgentPanel.vue_vue_type_script_setup_true_lang-y-eKcMMU.js +1372 -0
- package/dist/chunks/VcAiAgentPanel.vue_vue_type_script_setup_true_lang-y-eKcMMU.js.map +1 -0
- package/dist/chunks/{VcAiAgentPanel.vue_vue_type_style_index_0_lang-CZdY18Hq.js → VcAiAgentPanel.vue_vue_type_style_index_0_lang-JB7OKRk6.js} +76 -70
- package/dist/chunks/{VcAiAgentPanel.vue_vue_type_style_index_0_lang-CZdY18Hq.js.map → VcAiAgentPanel.vue_vue_type_style_index_0_lang-JB7OKRk6.js.map} +1 -1
- package/dist/chunks/VcScheduler.vue_vue_type_script_setup_true_lang-dbUBuyX1.js +20634 -0
- package/dist/chunks/VcScheduler.vue_vue_type_script_setup_true_lang-dbUBuyX1.js.map +1 -0
- package/dist/chunks/VcScheduler.vue_vue_type_style_index_0_lang-BFmpC0MN.js +4836 -0
- package/dist/chunks/VcScheduler.vue_vue_type_style_index_0_lang-BFmpC0MN.js.map +1 -0
- package/dist/chunks/{dashboard-feed-row.vue_vue_type_script_setup_true_lang-BCsJG_hk.js → dashboard-feed-row.vue_vue_type_script_setup_true_lang-f8MTDeS0.js} +271 -258
- package/dist/chunks/dashboard-feed-row.vue_vue_type_script_setup_true_lang-f8MTDeS0.js.map +1 -0
- package/dist/chunks/index-BuTo_Lx8.js.map +1 -1
- package/dist/chunks/{index-B7RhGTNx.js → index-DLsURdJp.js} +2 -2
- package/dist/chunks/index-DLsURdJp.js.map +1 -0
- package/dist/chunks/{vendor-vueuse-components-CoR2FSn3.js → vendor-vueuse-components-B3XvEasa.js} +1 -1
- package/dist/chunks/{vendor-vueuse-components-CoR2FSn3.js.map → vendor-vueuse-components-B3XvEasa.js.map} +1 -1
- package/dist/chunks/{vendor-vueuse-core-BFa9je5E.js → vendor-vueuse-core-_wFDcFkI.js} +1 -1
- package/dist/chunks/{vendor-vueuse-core-BFa9je5E.js.map → vendor-vueuse-core-_wFDcFkI.js.map} +1 -1
- package/dist/chunks/{vendor-vueuse-shared-kZH3-Km1.js → vendor-vueuse-shared-CiuC98Kk.js} +28 -44
- package/dist/chunks/{vendor-vueuse-shared-kZH3-Km1.js.map → vendor-vueuse-shared-CiuC98Kk.js.map} +1 -1
- package/dist/core/blade-navigation/types/index.d.ts +24 -0
- package/dist/core/blade-navigation/types/index.d.ts.map +1 -1
- package/dist/core/blade-navigation/utils/navigateToMainRoute.d.ts +12 -2
- package/dist/core/blade-navigation/utils/navigateToMainRoute.d.ts.map +1 -1
- package/dist/core/blade-navigation/utils/restoreFromUrl.d.ts.map +1 -1
- package/dist/core/blade-navigation/utils/urlSync.d.ts +28 -2
- package/dist/core/blade-navigation/utils/urlSync.d.ts.map +1 -1
- package/dist/core/composables/index.d.ts +0 -1
- package/dist/core/composables/index.d.ts.map +1 -1
- package/dist/core/composables/useAssets/index.d.ts.map +1 -1
- package/dist/core/composables/useAssetsManager/index.d.ts.map +1 -1
- package/dist/core/composables/useAssetsManager/uploadAssets.d.ts +37 -0
- package/dist/core/composables/useAssetsManager/uploadAssets.d.ts.map +1 -0
- package/dist/core/composables/useBlade/index.d.ts.map +1 -1
- package/dist/core/composables/useBladeNavigationAdapter/index.d.ts.map +1 -1
- package/dist/core/composables/useDynamicProperties/resolveControlKind.d.ts +23 -0
- package/dist/core/composables/useDynamicProperties/resolveControlKind.d.ts.map +1 -0
- package/dist/core/composables/useLatestRequest/index.d.ts +25 -8
- package/dist/core/composables/useLatestRequest/index.d.ts.map +1 -1
- package/dist/core/composables/useModificationTracker/index.d.ts +11 -0
- package/dist/core/composables/useModificationTracker/index.d.ts.map +1 -1
- package/dist/core/composables/usePopup/index.d.ts.map +1 -1
- package/dist/core/composables/useSidebarState/_internal.d.ts +37 -0
- package/dist/core/composables/useSidebarState/_internal.d.ts.map +1 -0
- package/dist/core/composables/useSidebarState/index.d.ts +4 -27
- package/dist/core/composables/useSidebarState/index.d.ts.map +1 -1
- package/dist/core/composables/useToolbar/index.d.ts +8 -0
- package/dist/core/composables/useToolbar/index.d.ts.map +1 -1
- package/dist/core/interceptors/index.d.ts.map +1 -1
- package/dist/core/plugins/signalR/index.d.ts.map +1 -1
- package/dist/core/services/index.d.ts +0 -1
- package/dist/core/services/index.d.ts.map +1 -1
- package/dist/core/utilities/focus.d.ts +14 -0
- package/dist/core/utilities/focus.d.ts.map +1 -1
- package/dist/dashboard/index.js +1 -1
- package/dist/framework.js +1732 -1715
- package/dist/framework.js.map +1 -1
- package/dist/index.css +1 -1
- package/dist/injection-keys.d.ts.map +1 -1
- package/dist/locales/de.js +7 -1
- package/dist/locales/en.js +7 -1
- package/dist/locales/en.json +7 -1
- package/dist/locales/types.d.ts +6 -0
- package/dist/shell/_internal/blade-navigation/components/vc-blade-navigation/vc-blade-navigation-new.vue.d.ts.map +1 -1
- package/dist/shell/_internal/blade-navigation/components/vc-blade-slot/vc-blade-slot.vue.d.ts +1 -0
- package/dist/shell/_internal/blade-navigation/components/vc-blade-slot/vc-blade-slot.vue.d.ts.map +1 -1
- package/dist/shell/_internal/blade-navigation/plugin-v2.d.ts.map +1 -1
- package/dist/shell/dashboard/draggable-dashboard/DraggableDashboard.vue.d.ts +5 -2
- package/dist/shell/dashboard/draggable-dashboard/DraggableDashboard.vue.d.ts.map +1 -1
- package/dist/shell/dashboard/draggable-dashboard/GridstackDashboard.vue.d.ts.map +1 -1
- package/dist/shell/dashboard/draggable-dashboard/composables/useGridstack.d.ts +2 -0
- package/dist/shell/dashboard/draggable-dashboard/composables/useGridstack.d.ts.map +1 -1
- package/dist/test-helpers.d.ts.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/ui/components/atoms/vc-button/vc-button.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-editor/vc-editor.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-popover/vc-popover.vue.d.ts +10 -0
- package/dist/ui/components/molecules/vc-popover/vc-popover.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-app/_internal/app-bar/components/AppHubPopover.vue.d.ts +2 -0
- package/dist/ui/components/organisms/vc-app/_internal/app-bar/components/AppHubPopover.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-app/_internal/layouts/DesktopLayout.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-auth-layout/vc-auth-layout.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-blade/_internal/BladeHeader.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-blade/vc-blade.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-data-table/VcDataTable.vue.d.ts +3 -3
- package/dist/ui/components/organisms/vc-data-table/VcDataTable.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-data-table/components/VcColumn.vue.d.ts +5 -4
- package/dist/ui/components/organisms/vc-data-table/components/VcColumn.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-data-table/components/cells/DynamicCellRenderer.vue.d.ts +30 -6
- package/dist/ui/components/organisms/vc-data-table/components/cells/DynamicCellRenderer.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-data-table/composables/builtinCells.d.ts +12 -0
- package/dist/ui/components/organisms/vc-data-table/composables/builtinCells.d.ts.map +1 -0
- package/dist/ui/components/organisms/vc-data-table/composables/useCellRegistry.d.ts +10 -4
- package/dist/ui/components/organisms/vc-data-table/composables/useCellRegistry.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-data-table/composables/useDataTableOrchestrator.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-data-table/index.d.ts +2 -0
- package/dist/ui/components/organisms/vc-data-table/index.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-data-table/keys.d.ts +0 -10
- package/dist/ui/components/organisms/vc-data-table/keys.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-data-table/types.d.ts +7 -2
- package/dist/ui/components/organisms/vc-data-table/types.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-dynamic-property/vc-dynamic-property.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-scheduler/VcScheduler.vue.d.ts +1 -1
- package/dist/ui/components/organisms/vc-scheduler/VcScheduler.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-scheduler/_internal/editor/SchedulerEventEditor.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-scheduler/_internal/month/MonthEventPopover.vue.d.ts +2 -2
- package/dist/ui/components/organisms/vc-scheduler/_internal/month/MonthEventPopover.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-scheduler/_internal/month/MonthMorePopover.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-scheduler/_internal/quick-create/QuickCreatePopover.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-scheduler/composables/useAnchoredPanelFocus.d.ts +20 -0
- package/dist/ui/components/organisms/vc-scheduler/composables/useAnchoredPanelFocus.d.ts.map +1 -0
- package/dist/ui/index.js +153 -150
- package/package.json +4 -4
- package/dist/chunks/VcAiAgentPanel.vue_vue_type_script_setup_true_lang-9mBLzIi1.js +0 -1402
- package/dist/chunks/VcAiAgentPanel.vue_vue_type_script_setup_true_lang-9mBLzIi1.js.map +0 -1
- package/dist/chunks/VcScheduler.vue_vue_type_script_setup_true_lang-BmlVL_rn.js +0 -21212
- package/dist/chunks/VcScheduler.vue_vue_type_script_setup_true_lang-BmlVL_rn.js.map +0 -1
- package/dist/chunks/VcScheduler.vue_vue_type_style_index_0_lang-BTg4PjTB.js +0 -4125
- package/dist/chunks/VcScheduler.vue_vue_type_style_index_0_lang-BTg4PjTB.js.map +0 -1
- package/dist/chunks/dashboard-feed-row.vue_vue_type_script_setup_true_lang-BCsJG_hk.js.map +0 -1
- package/dist/chunks/index-B7RhGTNx.js.map +0 -1
- package/dist/core/composables/useMenuExpanded/index.d.ts +0 -9
- package/dist/core/composables/useMenuExpanded/index.d.ts.map +0 -1
- package/dist/core/services/global-search-service/index.d.ts +0 -10
- package/dist/core/services/global-search-service/index.d.ts.map +0 -1
- package/dist/ui/components/organisms/vc-blade/useBladeSkeleton.d.ts +0 -16
- package/dist/ui/components/organisms/vc-blade/useBladeSkeleton.d.ts.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { shallowRef as
|
|
2
|
-
import {
|
|
3
|
-
import { G as
|
|
4
|
-
import { M as
|
|
1
|
+
import { shallowRef as pe, ref as M, watch as de, nextTick as ce, onUnmounted as me, openBlock as v, createElementBlock as _, createStaticVNode as fe, defineComponent as B, inject as ve, computed as re, onMounted as ge, createBlock as V, withCtx as ye, unref as ee, Fragment as ie, renderList as ne, normalizeStyle as _e, normalizeClass as ue, createElementVNode as w, createCommentVNode as N, resolveDynamicComponent as be, mergeProps as we, toDisplayString as Y, renderSlot as P, createVNode as ke, withDirectives as $e } from "vue";
|
|
2
|
+
import { K as xe, L as Le, M as Se, A as We } from "./VcScheduler.vue_vue_type_style_index_0_lang-BFmpC0MN.js";
|
|
3
|
+
import { G as ze } from "./vendor-gridstack-Beau2jQ7.js";
|
|
4
|
+
import { M as De, _ as Ae } from "./VcAiAgentPanel.vue_vue_type_style_index_0_lang-JB7OKRk6.js";
|
|
5
5
|
import "vee-validate";
|
|
6
6
|
import "./vendor-tiptap-starter-kit-ny-AoaO_.js";
|
|
7
7
|
import "./vendor-tiptap-extension-underline-Bo1pXXDN.js";
|
|
@@ -81,22 +81,22 @@ import "./vendor-cypress-signalr-mock-itnm2wpA.js";
|
|
|
81
81
|
import "./ExtensionPoint.vue_vue_type_style_index_0_lang-B1R06zHa.js";
|
|
82
82
|
import "./vendor-truncate-html-ChA1T5zy.js";
|
|
83
83
|
import "./vendor-sortablejs-Bsvu-FKn.js";
|
|
84
|
-
const
|
|
85
|
-
function
|
|
86
|
-
const a =
|
|
84
|
+
const F = "vc-dashboard-layout";
|
|
85
|
+
function te(t, r) {
|
|
86
|
+
const a = r ?? t.position;
|
|
87
87
|
return {
|
|
88
88
|
id: t.id,
|
|
89
89
|
x: a?.x ?? 0,
|
|
90
90
|
y: a?.y ?? 0,
|
|
91
91
|
// A placement size wins over the declared one, so a saved or live resize is
|
|
92
92
|
// restored instead of snapping back to the widget's default.
|
|
93
|
-
w:
|
|
94
|
-
h:
|
|
93
|
+
w: r?.width ?? t.size.width,
|
|
94
|
+
h: r?.height ?? t.size.height,
|
|
95
95
|
minW: 2,
|
|
96
96
|
minH: 2
|
|
97
97
|
};
|
|
98
98
|
}
|
|
99
|
-
function
|
|
99
|
+
function oe(t) {
|
|
100
100
|
return {
|
|
101
101
|
id: t.id ?? "",
|
|
102
102
|
position: {
|
|
@@ -109,10 +109,10 @@ function te(t) {
|
|
|
109
109
|
}
|
|
110
110
|
};
|
|
111
111
|
}
|
|
112
|
-
function
|
|
113
|
-
const
|
|
112
|
+
function Me(t) {
|
|
113
|
+
const r = /* @__PURE__ */ new Map();
|
|
114
114
|
for (const a of t)
|
|
115
|
-
a.id &&
|
|
115
|
+
a.id && r.set(a.id, {
|
|
116
116
|
x: a.x ?? 0,
|
|
117
117
|
y: a.y ?? 0,
|
|
118
118
|
// Size is carried through as well; dropping it here is what used to make
|
|
@@ -120,18 +120,18 @@ function Ae(t) {
|
|
|
120
120
|
...typeof a.w == "number" ? { width: a.w } : {},
|
|
121
121
|
...typeof a.h == "number" ? { height: a.h } : {}
|
|
122
122
|
});
|
|
123
|
-
return
|
|
123
|
+
return r;
|
|
124
124
|
}
|
|
125
|
-
function
|
|
125
|
+
function ae() {
|
|
126
126
|
try {
|
|
127
|
-
const t = localStorage.getItem(
|
|
127
|
+
const t = localStorage.getItem(F);
|
|
128
128
|
if (!t) return null;
|
|
129
|
-
const
|
|
130
|
-
if (Array.isArray(
|
|
131
|
-
return
|
|
132
|
-
if (typeof
|
|
129
|
+
const r = JSON.parse(t);
|
|
130
|
+
if (Array.isArray(r))
|
|
131
|
+
return Me(r);
|
|
132
|
+
if (typeof r == "object" && r !== null) {
|
|
133
133
|
const a = /* @__PURE__ */ new Map();
|
|
134
|
-
for (const [h, p] of Object.entries(
|
|
134
|
+
for (const [h, p] of Object.entries(r))
|
|
135
135
|
p && typeof p.x == "number" && typeof p.y == "number" && a.set(h, { x: p.x, y: p.y });
|
|
136
136
|
return a;
|
|
137
137
|
}
|
|
@@ -140,10 +140,10 @@ function oe() {
|
|
|
140
140
|
return console.warn("[GridstackAdapter] Failed to load layout from storage:", t), null;
|
|
141
141
|
}
|
|
142
142
|
}
|
|
143
|
-
function
|
|
143
|
+
function he(t, r) {
|
|
144
144
|
try {
|
|
145
145
|
const a = t.map((h) => {
|
|
146
|
-
const p =
|
|
146
|
+
const p = r.get(h.id);
|
|
147
147
|
return {
|
|
148
148
|
id: h.id,
|
|
149
149
|
x: p?.x ?? h.position?.x ?? 0,
|
|
@@ -154,37 +154,37 @@ function ue(t, s) {
|
|
|
154
154
|
h: p?.height ?? h.size.height
|
|
155
155
|
};
|
|
156
156
|
});
|
|
157
|
-
localStorage.setItem(
|
|
157
|
+
localStorage.setItem(F, JSON.stringify(a));
|
|
158
158
|
} catch (a) {
|
|
159
159
|
console.warn("[GridstackAdapter] Failed to save layout to storage:", a);
|
|
160
160
|
}
|
|
161
161
|
}
|
|
162
162
|
function Ge() {
|
|
163
163
|
try {
|
|
164
|
-
localStorage.removeItem(
|
|
164
|
+
localStorage.removeItem(F);
|
|
165
165
|
} catch (t) {
|
|
166
166
|
console.warn("[GridstackAdapter] Failed to clear layout storage:", t);
|
|
167
167
|
}
|
|
168
168
|
}
|
|
169
|
-
function Pe(t,
|
|
169
|
+
function Pe(t, r = 12) {
|
|
170
170
|
const a = /* @__PURE__ */ new Map(), h = /* @__PURE__ */ new Map(), p = (o, y, f, k) => {
|
|
171
171
|
for (let b = y; b < y + k; b++) {
|
|
172
|
-
const
|
|
173
|
-
for (let
|
|
174
|
-
if (
|
|
172
|
+
const D = h.get(b) || [];
|
|
173
|
+
for (let L = o; L < o + f; L++)
|
|
174
|
+
if (D.includes(L)) return !1;
|
|
175
175
|
}
|
|
176
176
|
return !0;
|
|
177
|
-
},
|
|
177
|
+
}, z = (o, y, f, k) => {
|
|
178
178
|
for (let b = y; b < y + k; b++) {
|
|
179
|
-
const
|
|
180
|
-
for (let
|
|
181
|
-
|
|
182
|
-
h.set(b,
|
|
179
|
+
const D = h.get(b) || [];
|
|
180
|
+
for (let L = o; L < o + f; L++)
|
|
181
|
+
D.push(L);
|
|
182
|
+
h.set(b, D);
|
|
183
183
|
}
|
|
184
184
|
}, i = (o, y) => {
|
|
185
185
|
let f = 0;
|
|
186
186
|
for (; ; ) {
|
|
187
|
-
for (let k = 0; k <=
|
|
187
|
+
for (let k = 0; k <= r - o; k++)
|
|
188
188
|
if (p(k, f, o, y))
|
|
189
189
|
return { x: k, y: f };
|
|
190
190
|
if (f++, f > 100) break;
|
|
@@ -193,15 +193,15 @@ function Pe(t, s = 12) {
|
|
|
193
193
|
};
|
|
194
194
|
for (const o of t) {
|
|
195
195
|
const y = i(o.size.width, o.size.height);
|
|
196
|
-
a.set(o.id, y),
|
|
196
|
+
a.set(o.id, y), z(y.x, y.y, o.size.width, o.size.height);
|
|
197
197
|
}
|
|
198
198
|
return a;
|
|
199
199
|
}
|
|
200
|
-
function
|
|
201
|
-
if (
|
|
200
|
+
function se(t, r) {
|
|
201
|
+
if (r && r.size > 0) {
|
|
202
202
|
const h = /* @__PURE__ */ new Map();
|
|
203
203
|
for (const p of t) {
|
|
204
|
-
const
|
|
204
|
+
const z = r.get(p.id), i = p.position, o = z ?? i ?? { x: 0, y: 0 };
|
|
205
205
|
h.set(p.id, o);
|
|
206
206
|
}
|
|
207
207
|
return h;
|
|
@@ -214,7 +214,7 @@ function ae(t, s) {
|
|
|
214
214
|
}
|
|
215
215
|
return Pe(t);
|
|
216
216
|
}
|
|
217
|
-
const
|
|
217
|
+
const Ee = {
|
|
218
218
|
column: 12,
|
|
219
219
|
cellHeight: 80,
|
|
220
220
|
margin: "10px",
|
|
@@ -233,166 +233,169 @@ const Me = {
|
|
|
233
233
|
// Only bottom-right corner
|
|
234
234
|
}
|
|
235
235
|
};
|
|
236
|
-
function
|
|
237
|
-
const { gridOptions: a = {}, resizable: h = !1, autoSave: p = !0, onLayoutChange:
|
|
238
|
-
...
|
|
236
|
+
function Te(t, r = {}) {
|
|
237
|
+
const { gridOptions: a = {}, resizable: h = !1, autoSave: p = !0, onLayoutChange: z } = r, i = pe(null), o = M(/* @__PURE__ */ new Map()), y = M(!1), f = M(!1), k = {
|
|
238
|
+
...Ee,
|
|
239
239
|
...a,
|
|
240
240
|
disableResize: !h
|
|
241
|
-
}, b = (
|
|
241
|
+
}, b = (s) => {
|
|
242
242
|
if (i.value) {
|
|
243
243
|
console.warn("[useGridstack] Grid already initialized");
|
|
244
244
|
return;
|
|
245
245
|
}
|
|
246
|
-
const
|
|
247
|
-
o.value =
|
|
248
|
-
const
|
|
246
|
+
const n = ae();
|
|
247
|
+
o.value = se(t.value, n), i.value = ze.init(k, s), i.value.on("change", D), i.value.on("added", L), i.value.on("removed", q);
|
|
248
|
+
const l = t.value.map((g) => {
|
|
249
249
|
const m = o.value.get(g.id);
|
|
250
|
-
return
|
|
250
|
+
return te(g, m);
|
|
251
251
|
});
|
|
252
|
-
i.value.load(
|
|
253
|
-
},
|
|
252
|
+
i.value.load(l), y.value = !0;
|
|
253
|
+
}, D = (s, n) => {
|
|
254
254
|
if (!f.value) {
|
|
255
|
-
for (const
|
|
256
|
-
const { id: g, position: m } =
|
|
255
|
+
for (const l of n) {
|
|
256
|
+
const { id: g, position: m } = oe(l);
|
|
257
257
|
if (g) {
|
|
258
|
-
const $ = o.value.get(g),
|
|
258
|
+
const $ = o.value.get(g), W = typeof l.w == "number" ? l.w : $?.width, O = typeof l.h == "number" ? l.h : $?.height;
|
|
259
259
|
o.value.set(g, {
|
|
260
260
|
...m,
|
|
261
|
-
...typeof
|
|
262
|
-
...typeof
|
|
261
|
+
...typeof W == "number" ? { width: W } : {},
|
|
262
|
+
...typeof O == "number" ? { height: O } : {}
|
|
263
263
|
});
|
|
264
264
|
}
|
|
265
265
|
}
|
|
266
|
-
o.value = new Map(o.value),
|
|
266
|
+
o.value = new Map(o.value), z?.(o.value), p && S();
|
|
267
267
|
}
|
|
268
|
-
},
|
|
269
|
-
for (const
|
|
270
|
-
const { id: g, position: m } =
|
|
268
|
+
}, L = (s, n) => {
|
|
269
|
+
for (const l of n) {
|
|
270
|
+
const { id: g, position: m } = oe(l);
|
|
271
271
|
g && !o.value.has(g) && o.value.set(g, m);
|
|
272
272
|
}
|
|
273
273
|
o.value = new Map(o.value);
|
|
274
|
-
},
|
|
275
|
-
for (const
|
|
276
|
-
|
|
274
|
+
}, q = (s, n) => {
|
|
275
|
+
for (const l of n)
|
|
276
|
+
l.id && o.value.delete(l.id);
|
|
277
277
|
o.value = new Map(o.value);
|
|
278
|
-
},
|
|
278
|
+
}, R = () => {
|
|
279
279
|
i.value && (i.value.off("change"), i.value.off("added"), i.value.off("removed"), i.value.destroy(!1), i.value = null, y.value = !1);
|
|
280
|
-
},
|
|
280
|
+
}, U = (s) => {
|
|
281
281
|
if (!i.value) return;
|
|
282
|
-
const
|
|
283
|
-
g && i.value.makeWidget(g,
|
|
284
|
-
}, C = (
|
|
282
|
+
const n = o.value.get(s.id) ?? s.position, l = te(s, n), g = document.querySelector(`[gs-id="${s.id}"]`);
|
|
283
|
+
g && i.value.makeWidget(g, l);
|
|
284
|
+
}, C = (s) => {
|
|
285
285
|
if (!i.value) return;
|
|
286
|
-
const
|
|
287
|
-
|
|
288
|
-
}, H = (
|
|
289
|
-
const m =
|
|
290
|
-
o.value.set(
|
|
291
|
-
x:
|
|
292
|
-
y:
|
|
293
|
-
...typeof
|
|
294
|
-
...typeof
|
|
286
|
+
const n = document.querySelector(`[gs-id="${s}"]`);
|
|
287
|
+
n && i.value.removeWidget(n, !1), o.value.delete(s);
|
|
288
|
+
}, H = (s, n, l, g) => {
|
|
289
|
+
const m = n.gridstackNode, $ = o.value.get(s), W = m?.x ?? l?.x ?? $?.x ?? 0, O = m?.y ?? l?.y ?? $?.y ?? 0, X = m?.w ?? g?.width ?? $?.width, Z = m?.h ?? g?.height ?? $?.height;
|
|
290
|
+
o.value.set(s, {
|
|
291
|
+
x: W,
|
|
292
|
+
y: O,
|
|
293
|
+
...typeof X == "number" ? { width: X } : {},
|
|
294
|
+
...typeof Z == "number" ? { height: Z } : {}
|
|
295
295
|
}), o.value = new Map(o.value);
|
|
296
|
-
},
|
|
296
|
+
}, J = (s, n) => {
|
|
297
297
|
if (!i.value) return;
|
|
298
|
-
const
|
|
299
|
-
|
|
300
|
-
},
|
|
298
|
+
const l = document.querySelector(`[gs-id="${s}"]`);
|
|
299
|
+
l && (f.value = !0, i.value.update(l, { x: n.x, y: n.y }), H(s, l, n), f.value = !1);
|
|
300
|
+
}, K = (s, n) => {
|
|
301
301
|
if (!i.value) return;
|
|
302
|
-
const
|
|
303
|
-
|
|
304
|
-
},
|
|
305
|
-
|
|
306
|
-
},
|
|
307
|
-
const
|
|
308
|
-
|
|
302
|
+
const l = document.querySelector(`[gs-id="${s}"]`);
|
|
303
|
+
l && (f.value = !0, i.value.update(l, { w: n.width, h: n.height }), H(s, l, void 0, n), f.value = !1);
|
|
304
|
+
}, S = () => {
|
|
305
|
+
he(t.value, o.value);
|
|
306
|
+
}, E = () => {
|
|
307
|
+
const s = ae();
|
|
308
|
+
s && (o.value = se(t.value, s), A());
|
|
309
309
|
}, I = () => {
|
|
310
310
|
o.value = /* @__PURE__ */ new Map();
|
|
311
|
-
for (const
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
},
|
|
311
|
+
for (const s of t.value)
|
|
312
|
+
s.position && o.value.set(s.id, { ...s.position });
|
|
313
|
+
A(), S();
|
|
314
|
+
}, A = () => {
|
|
315
315
|
if (i.value) {
|
|
316
316
|
f.value = !0, i.value.batchUpdate();
|
|
317
|
-
for (const
|
|
318
|
-
const
|
|
319
|
-
if (
|
|
320
|
-
const
|
|
321
|
-
|
|
322
|
-
x:
|
|
323
|
-
y:
|
|
317
|
+
for (const s of t.value) {
|
|
318
|
+
const n = o.value.get(s.id);
|
|
319
|
+
if (n) {
|
|
320
|
+
const l = document.querySelector(`[gs-id="${s.id}"]`);
|
|
321
|
+
l && i.value.update(l, {
|
|
322
|
+
x: n.x,
|
|
323
|
+
y: n.y,
|
|
324
324
|
// Restores a persisted size; omitted when unknown so Gridstack keeps
|
|
325
325
|
// whatever the element already declares.
|
|
326
|
-
...typeof
|
|
327
|
-
...typeof
|
|
326
|
+
...typeof n.width == "number" ? { w: n.width } : {},
|
|
327
|
+
...typeof n.height == "number" ? { h: n.height } : {}
|
|
328
328
|
});
|
|
329
329
|
}
|
|
330
330
|
}
|
|
331
331
|
i.value.batchUpdate(!1), f.value = !1;
|
|
332
332
|
}
|
|
333
|
-
},
|
|
333
|
+
}, T = (s) => {
|
|
334
|
+
o.value = new Map([...s].map(([n, l]) => [n, { ...l }])), A();
|
|
335
|
+
}, Q = (s) => {
|
|
334
336
|
if (!i.value) {
|
|
335
|
-
|
|
337
|
+
s();
|
|
336
338
|
return;
|
|
337
339
|
}
|
|
338
|
-
f.value = !0, i.value.batchUpdate(),
|
|
340
|
+
f.value = !0, i.value.batchUpdate(), s(), i.value.batchUpdate(!1), f.value = !1;
|
|
339
341
|
};
|
|
340
|
-
return
|
|
342
|
+
return de(
|
|
341
343
|
t,
|
|
342
|
-
async (
|
|
344
|
+
async (s, n) => {
|
|
343
345
|
if (!i.value || !y.value) return;
|
|
344
|
-
await
|
|
345
|
-
const
|
|
346
|
+
await ce();
|
|
347
|
+
const l = s.filter((m) => !n?.some(($) => $.id === m.id)), g = n?.filter((m) => !s.some(($) => $.id === m.id)).map((m) => m.id) ?? [];
|
|
346
348
|
for (const m of g)
|
|
347
349
|
C(m);
|
|
348
|
-
for (const m of
|
|
349
|
-
|
|
350
|
+
for (const m of l)
|
|
351
|
+
U(m);
|
|
350
352
|
},
|
|
351
353
|
{ deep: !1 }
|
|
352
|
-
),
|
|
353
|
-
|
|
354
|
+
), me(() => {
|
|
355
|
+
R();
|
|
354
356
|
}), {
|
|
355
357
|
grid: i,
|
|
356
358
|
layout: o,
|
|
357
359
|
isInitialized: y,
|
|
358
360
|
initGrid: b,
|
|
359
|
-
destroyGrid:
|
|
360
|
-
addWidget:
|
|
361
|
+
destroyGrid: R,
|
|
362
|
+
addWidget: U,
|
|
361
363
|
removeWidget: C,
|
|
362
|
-
updateWidgetPosition:
|
|
363
|
-
updateWidgetSize:
|
|
364
|
-
saveLayout:
|
|
365
|
-
loadLayout:
|
|
364
|
+
updateWidgetPosition: J,
|
|
365
|
+
updateWidgetSize: K,
|
|
366
|
+
saveLayout: S,
|
|
367
|
+
loadLayout: E,
|
|
366
368
|
resetToDefaults: I,
|
|
367
|
-
|
|
369
|
+
restoreLayout: T,
|
|
370
|
+
batchUpdate: Q
|
|
368
371
|
};
|
|
369
372
|
}
|
|
370
|
-
const
|
|
373
|
+
const Oe = {}, Ie = {
|
|
371
374
|
class: "dashboard-widget-skeleton",
|
|
372
375
|
"aria-hidden": "true"
|
|
373
376
|
};
|
|
374
|
-
function
|
|
375
|
-
return v(), _("div",
|
|
376
|
-
|
|
377
|
+
function Ne(t, r) {
|
|
378
|
+
return v(), _("div", Ie, [...r[0] || (r[0] = [
|
|
379
|
+
fe('<div class="dashboard-widget-skeleton__header"><div class="dashboard-widget-skeleton__icon"></div><div class="dashboard-widget-skeleton__title"></div></div><div class="dashboard-widget-skeleton__stats"><div class="dashboard-widget-skeleton__stat"></div><div class="dashboard-widget-skeleton__stat"></div><div class="dashboard-widget-skeleton__stat"></div></div><div class="dashboard-widget-skeleton__body"><div class="dashboard-widget-skeleton__line dashboard-widget-skeleton__line--w80"></div><div class="dashboard-widget-skeleton__line dashboard-widget-skeleton__line--w60"></div><div class="dashboard-widget-skeleton__line dashboard-widget-skeleton__line--w90"></div><div class="dashboard-widget-skeleton__line dashboard-widget-skeleton__line--w70"></div></div>', 3)
|
|
377
380
|
])]);
|
|
378
381
|
}
|
|
379
|
-
const
|
|
382
|
+
const Be = /* @__PURE__ */ xe(Oe, [["render", Ne]]), Re = ["aria-label"], Ue = ["aria-label"], Fe = ["gs-id", "gs-x", "gs-y", "gs-w", "gs-h", "aria-label", "onKeydown"], Ce = { class: "grid-stack-item-content" }, He = {
|
|
380
383
|
key: 0,
|
|
381
384
|
class: "vc-gridstack-dashboard__drag-handle",
|
|
382
385
|
"aria-hidden": "true"
|
|
383
|
-
},
|
|
386
|
+
}, Ke = {
|
|
384
387
|
class: "vc-gridstack-dashboard__live-region",
|
|
385
388
|
role: "status",
|
|
386
389
|
"aria-live": "polite",
|
|
387
390
|
"aria-atomic": "true"
|
|
388
|
-
},
|
|
391
|
+
}, le = 2, je = /* @__PURE__ */ B({
|
|
389
392
|
__name: "GridstackDashboard",
|
|
390
393
|
props: {
|
|
391
394
|
showDragHandles: { type: Boolean, default: !1 },
|
|
392
395
|
resizable: { type: Boolean, default: !1 },
|
|
393
396
|
ariaLabel: { default: "Dashboard widgets. Drag a widget, or focus one and press Enter to rearrange with the arrow keys." }
|
|
394
397
|
},
|
|
395
|
-
setup(t, { expose:
|
|
398
|
+
setup(t, { expose: r }) {
|
|
396
399
|
const a = [
|
|
397
400
|
{ x: 0, y: 0, w: 6, h: 6 },
|
|
398
401
|
{ x: 6, y: 0, w: 6, h: 6 },
|
|
@@ -402,22 +405,31 @@ const Ne = /* @__PURE__ */ $e(Ee, [["render", Ie]]), Be = ["aria-label"], Re = [
|
|
|
402
405
|
function h() {
|
|
403
406
|
if (typeof window > "u") return null;
|
|
404
407
|
try {
|
|
405
|
-
const e = window.localStorage.getItem(
|
|
408
|
+
const e = window.localStorage.getItem(F);
|
|
406
409
|
if (!e) return null;
|
|
407
410
|
const u = JSON.parse(e);
|
|
408
411
|
if (!Array.isArray(u)) return null;
|
|
409
|
-
const
|
|
410
|
-
(
|
|
411
|
-
).map((
|
|
412
|
-
return
|
|
412
|
+
const d = u.filter(
|
|
413
|
+
(c) => !!c && typeof c == "object" && typeof c.w == "number" && typeof c.h == "number" && typeof c.x == "number" && typeof c.y == "number"
|
|
414
|
+
).map((c) => ({ x: c.x, y: c.y, w: c.w, h: c.h }));
|
|
415
|
+
return d.length > 0 ? d : null;
|
|
413
416
|
} catch {
|
|
414
417
|
return null;
|
|
415
418
|
}
|
|
416
419
|
}
|
|
417
|
-
const p = t,
|
|
420
|
+
const p = t, z = M(null), i = M(""), o = ve(De, M(!0)), y = re(() => o.value ? [] : h() ?? a), f = (e) => ({
|
|
418
421
|
gridColumn: `${e.x + 1} / span ${e.w}`,
|
|
419
422
|
gridRow: `${e.y + 1} / span ${e.h}`
|
|
420
|
-
}), k =
|
|
423
|
+
}), k = Le(), b = re(() => k.getWidgets()), {
|
|
424
|
+
layout: D,
|
|
425
|
+
isInitialized: L,
|
|
426
|
+
initGrid: q,
|
|
427
|
+
saveLayout: R,
|
|
428
|
+
resetToDefaults: U,
|
|
429
|
+
restoreLayout: C,
|
|
430
|
+
updateWidgetPosition: H,
|
|
431
|
+
updateWidgetSize: J
|
|
432
|
+
} = Te(b, {
|
|
421
433
|
resizable: p.resizable,
|
|
422
434
|
autoSave: !0,
|
|
423
435
|
gridOptions: {
|
|
@@ -426,106 +438,107 @@ const Ne = /* @__PURE__ */ $e(Ee, [["render", Ie]]), Be = ["aria-label"], Re = [
|
|
|
426
438
|
}
|
|
427
439
|
},
|
|
428
440
|
onLayoutChange: (e) => {
|
|
429
|
-
for (const [u,
|
|
430
|
-
k.updateWidgetPosition(u,
|
|
431
|
-
|
|
441
|
+
for (const [u, d] of e)
|
|
442
|
+
k.updateWidgetPosition(u, d);
|
|
443
|
+
W("Widget positions updated");
|
|
432
444
|
}
|
|
433
|
-
}),
|
|
434
|
-
const u =
|
|
445
|
+
}), K = (e) => D.value.get(e), S = M(null), E = M(null), I = (e) => D.value.get(e.id) ?? e.position ?? { x: 0, y: 0 }, A = (e) => {
|
|
446
|
+
const u = D.value.get(e.id);
|
|
435
447
|
return {
|
|
436
448
|
width: u?.width ?? e.size.width,
|
|
437
449
|
height: u?.height ?? e.size.height
|
|
438
450
|
};
|
|
439
|
-
},
|
|
440
|
-
|
|
441
|
-
|
|
451
|
+
}, T = (e) => e.name || e.id, Q = (e) => {
|
|
452
|
+
S.value = e.id, E.value = new Map(
|
|
453
|
+
b.value.map((u) => [u.id, { ...I(u), ...A(u) }])
|
|
454
|
+
), W(
|
|
455
|
+
`${T(e)} picked up. Use arrow keys to move, Shift and arrow keys to resize, Enter to drop, Escape to cancel.`
|
|
442
456
|
);
|
|
443
|
-
},
|
|
444
|
-
|
|
445
|
-
const { x: u, y:
|
|
446
|
-
|
|
447
|
-
},
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
const d = I(e), x = { x: d.x + u, y: d.y + n };
|
|
457
|
+
}, s = (e) => {
|
|
458
|
+
S.value = null, E.value = null, R();
|
|
459
|
+
const { x: u, y: d } = I(e);
|
|
460
|
+
W(`${T(e)} dropped at column ${u + 1}, row ${d + 1}.`);
|
|
461
|
+
}, n = (e) => {
|
|
462
|
+
E.value && C(E.value), S.value = null, E.value = null, W(`Move cancelled. ${T(e)} returned to its original position and size.`);
|
|
463
|
+
}, l = (e, u, d) => {
|
|
464
|
+
const c = I(e), x = { x: c.x + u, y: c.y + d };
|
|
452
465
|
if (x.x < 0 || x.y < 0) return;
|
|
453
|
-
|
|
454
|
-
const
|
|
455
|
-
|
|
456
|
-
},
|
|
457
|
-
const
|
|
458
|
-
if (x ===
|
|
459
|
-
|
|
460
|
-
const
|
|
461
|
-
|
|
462
|
-
},
|
|
466
|
+
H(e.id, x);
|
|
467
|
+
const G = I(e);
|
|
468
|
+
W(`${T(e)} moved to column ${G.x + 1}, row ${G.y + 1}.`);
|
|
469
|
+
}, g = (e, u, d) => {
|
|
470
|
+
const c = A(e), x = u ? Math.max(le, c.width + u) : c.width, G = d ? Math.max(le, c.height + d) : c.height;
|
|
471
|
+
if (x === c.width && G === c.height) return;
|
|
472
|
+
J(e.id, { width: x, height: G });
|
|
473
|
+
const j = A(e);
|
|
474
|
+
W(`${T(e)} resized to ${j.width} by ${j.height} cells.`);
|
|
475
|
+
}, m = (e, u) => {
|
|
463
476
|
if (e.target !== e.currentTarget) return;
|
|
464
|
-
const
|
|
477
|
+
const d = S.value === u.id;
|
|
465
478
|
if (e.key === "Enter" || e.key === " ") {
|
|
466
|
-
if (e.preventDefault(),
|
|
479
|
+
if (e.preventDefault(), d) s(u);
|
|
467
480
|
else {
|
|
468
|
-
const
|
|
469
|
-
|
|
481
|
+
const G = b.value.find((j) => j.id === S.value);
|
|
482
|
+
G && n(G), Q(u);
|
|
470
483
|
}
|
|
471
484
|
return;
|
|
472
485
|
}
|
|
473
|
-
if (e.key === "Escape" &&
|
|
474
|
-
e.preventDefault(),
|
|
486
|
+
if (e.key === "Escape" && d) {
|
|
487
|
+
e.preventDefault(), n(u);
|
|
475
488
|
return;
|
|
476
489
|
}
|
|
477
|
-
const
|
|
478
|
-
|
|
479
|
-
},
|
|
480
|
-
const
|
|
481
|
-
return `${
|
|
482
|
-
},
|
|
490
|
+
const c = e.key === "ArrowLeft" ? -1 : e.key === "ArrowRight" ? 1 : 0, x = e.key === "ArrowUp" ? -1 : e.key === "ArrowDown" ? 1 : 0;
|
|
491
|
+
c === 0 && x === 0 || !d || (e.preventDefault(), e.shiftKey ? p.resizable && g(u, c, x) : l(u, c, x));
|
|
492
|
+
}, $ = (e, u) => {
|
|
493
|
+
const d = e.name || e.id, c = S.value === e.id ? "Picked up. Arrow keys move, Enter drops, Escape cancels." : "Press Enter to pick up and rearrange with the arrow keys.";
|
|
494
|
+
return `${d}, widget ${u + 1} of ${b.value.length}. ${c}`;
|
|
495
|
+
}, W = (e) => {
|
|
483
496
|
i.value = e, setTimeout(() => {
|
|
484
497
|
i.value = "";
|
|
485
498
|
}, 1e3);
|
|
486
|
-
},
|
|
487
|
-
await
|
|
499
|
+
}, O = async () => {
|
|
500
|
+
await ce(), z.value && !L.value && q(z.value);
|
|
488
501
|
};
|
|
489
|
-
return
|
|
490
|
-
e &&
|
|
491
|
-
}),
|
|
502
|
+
return ge(O), de(o, (e) => {
|
|
503
|
+
e && O();
|
|
504
|
+
}), r({
|
|
492
505
|
rearrangeWidgets: () => {
|
|
493
|
-
|
|
506
|
+
U();
|
|
494
507
|
},
|
|
495
508
|
recalculateLayout: () => {
|
|
496
509
|
},
|
|
497
|
-
saveLayout:
|
|
498
|
-
useBuiltInPositions: () => (
|
|
499
|
-
}), (e, u) => (v(),
|
|
510
|
+
saveLayout: R,
|
|
511
|
+
useBuiltInPositions: () => (U(), !0)
|
|
512
|
+
}), (e, u) => (v(), V(Se, {
|
|
500
513
|
"no-padding": "",
|
|
501
514
|
class: "vc-gridstack-dashboard"
|
|
502
515
|
}, {
|
|
503
|
-
default:
|
|
504
|
-
|
|
516
|
+
default: ye(() => [
|
|
517
|
+
ee(o) ? (v(), _("div", {
|
|
505
518
|
key: 1,
|
|
506
519
|
ref_key: "gridRef",
|
|
507
|
-
ref:
|
|
520
|
+
ref: z,
|
|
508
521
|
class: "grid-stack vc-gridstack-dashboard__grid",
|
|
509
522
|
role: "list",
|
|
510
523
|
"aria-label": t.ariaLabel
|
|
511
524
|
}, [
|
|
512
|
-
(v(!0), _(
|
|
513
|
-
key:
|
|
514
|
-
class:
|
|
515
|
-
"gs-id":
|
|
516
|
-
"gs-x":
|
|
517
|
-
"gs-y":
|
|
518
|
-
"gs-w":
|
|
519
|
-
"gs-h":
|
|
525
|
+
(v(!0), _(ie, null, ne(b.value, (d, c) => (v(), _("div", {
|
|
526
|
+
key: d.id,
|
|
527
|
+
class: ue(["grid-stack-item", { "vc-gridstack-dashboard__item--grabbed": S.value === d.id }]),
|
|
528
|
+
"gs-id": d.id,
|
|
529
|
+
"gs-x": K(d.id)?.x ?? d.position?.x ?? 0,
|
|
530
|
+
"gs-y": K(d.id)?.y ?? d.position?.y ?? 0,
|
|
531
|
+
"gs-w": A(d).width,
|
|
532
|
+
"gs-h": A(d).height,
|
|
520
533
|
"gs-min-w": 2,
|
|
521
534
|
"gs-min-h": 2,
|
|
522
535
|
role: "listitem",
|
|
523
536
|
tabindex: "0",
|
|
524
|
-
"aria-label":
|
|
525
|
-
onKeydown: (x) =>
|
|
537
|
+
"aria-label": $(d, c),
|
|
538
|
+
onKeydown: (x) => m(x, d)
|
|
526
539
|
}, [
|
|
527
|
-
w("div",
|
|
528
|
-
t.showDragHandles ? (v(), _("div",
|
|
540
|
+
w("div", Ce, [
|
|
541
|
+
t.showDragHandles ? (v(), _("div", He, [...u[0] || (u[0] = [
|
|
529
542
|
w("svg", {
|
|
530
543
|
width: "16",
|
|
531
544
|
height: "16",
|
|
@@ -563,38 +576,38 @@ const Ne = /* @__PURE__ */ $e(Ee, [["render", Ie]]), Be = ["aria-label"], Re = [
|
|
|
563
576
|
r: "1.5"
|
|
564
577
|
})
|
|
565
578
|
], -1)
|
|
566
|
-
])])) :
|
|
567
|
-
(v(),
|
|
579
|
+
])])) : N("", !0),
|
|
580
|
+
(v(), V(be(d.component), we({ ref_for: !0 }, d.props || {}, { class: "vc-gridstack-dashboard__widget-content" }), null, 16))
|
|
568
581
|
])
|
|
569
|
-
], 42,
|
|
570
|
-
], 8,
|
|
582
|
+
], 42, Fe))), 128))
|
|
583
|
+
], 8, Ue)) : (v(), _("div", {
|
|
571
584
|
key: 0,
|
|
572
585
|
class: "vc-gridstack-dashboard__skeleton-grid",
|
|
573
586
|
role: "status",
|
|
574
587
|
"aria-busy": "true",
|
|
575
588
|
"aria-label": t.ariaLabel
|
|
576
589
|
}, [
|
|
577
|
-
(v(!0), _(
|
|
578
|
-
key: `skeleton-${
|
|
590
|
+
(v(!0), _(ie, null, ne(y.value, (d, c) => (v(), V(Be, {
|
|
591
|
+
key: `skeleton-${c}`,
|
|
579
592
|
class: "vc-gridstack-dashboard__skeleton-item",
|
|
580
|
-
style:
|
|
593
|
+
style: _e(f(d))
|
|
581
594
|
}, null, 8, ["style"]))), 128))
|
|
582
|
-
], 8,
|
|
583
|
-
w("div",
|
|
595
|
+
], 8, Re)),
|
|
596
|
+
w("div", Ke, Y(i.value), 1)
|
|
584
597
|
]),
|
|
585
598
|
_: 1
|
|
586
599
|
}));
|
|
587
600
|
}
|
|
588
|
-
}), No = /* @__PURE__ */
|
|
601
|
+
}), No = /* @__PURE__ */ B({
|
|
589
602
|
__name: "DraggableDashboard",
|
|
590
603
|
props: {
|
|
591
604
|
showDragHandles: { type: Boolean, default: !1 },
|
|
592
605
|
resizable: { type: Boolean, default: !1 },
|
|
593
|
-
ariaLabel: {
|
|
606
|
+
ariaLabel: {}
|
|
594
607
|
},
|
|
595
|
-
setup(t, { expose:
|
|
596
|
-
const a =
|
|
597
|
-
return
|
|
608
|
+
setup(t, { expose: r }) {
|
|
609
|
+
const a = M(null);
|
|
610
|
+
return r({
|
|
598
611
|
rearrangeWidgets: () => {
|
|
599
612
|
a.value?.rearrangeWidgets?.();
|
|
600
613
|
},
|
|
@@ -605,7 +618,7 @@ const Ne = /* @__PURE__ */ $e(Ee, [["render", Ie]]), Be = ["aria-label"], Re = [
|
|
|
605
618
|
a.value?.saveLayout?.();
|
|
606
619
|
},
|
|
607
620
|
useBuiltInPositions: () => a.value?.useBuiltInPositions?.() ?? !1
|
|
608
|
-
}), (o, y) => (v(),
|
|
621
|
+
}), (o, y) => (v(), V(je, {
|
|
609
622
|
ref_key: "dashboardRef",
|
|
610
623
|
ref: a,
|
|
611
624
|
"show-drag-handles": t.showDragHandles,
|
|
@@ -613,19 +626,19 @@ const Ne = /* @__PURE__ */ $e(Ee, [["render", Ie]]), Be = ["aria-label"], Re = [
|
|
|
613
626
|
"aria-label": t.ariaLabel
|
|
614
627
|
}, null, 8, ["show-drag-handles", "resizable", "aria-label"]));
|
|
615
628
|
}
|
|
616
|
-
}), Bo =
|
|
629
|
+
}), Bo = te, Ro = oe, Uo = ae, Fo = he, Co = se, Ho = Ge, Ko = F, Ve = { class: "dashboard-widget-card" }, Ye = { class: "dashboard-widget-card__header" }, qe = { class: "dashboard-widget-card__header-content" }, Je = {
|
|
617
630
|
key: 0,
|
|
618
631
|
class: "dashboard-widget-card__icon-wrapper"
|
|
619
|
-
},
|
|
632
|
+
}, Qe = { class: "dashboard-widget-card__title" }, Xe = {
|
|
620
633
|
key: 0,
|
|
621
634
|
class: "dashboard-widget-card__actions"
|
|
622
|
-
},
|
|
635
|
+
}, Ze = {
|
|
623
636
|
key: 0,
|
|
624
637
|
class: "dashboard-widget-card__stats"
|
|
625
|
-
},
|
|
638
|
+
}, et = { class: "dashboard-widget-card__body" }, tt = {
|
|
626
639
|
key: 1,
|
|
627
640
|
class: "dashboard-widget-card__footer"
|
|
628
|
-
}, jo = /* @__PURE__ */
|
|
641
|
+
}, jo = /* @__PURE__ */ B({
|
|
629
642
|
__name: "dashboard-widget-card",
|
|
630
643
|
props: {
|
|
631
644
|
header: {},
|
|
@@ -633,39 +646,39 @@ const Ne = /* @__PURE__ */ $e(Ee, [["render", Ie]]), Be = ["aria-label"], Re = [
|
|
|
633
646
|
loading: { type: Boolean }
|
|
634
647
|
},
|
|
635
648
|
setup(t) {
|
|
636
|
-
const
|
|
637
|
-
return (a, h) => (v(), _("div",
|
|
638
|
-
w("div",
|
|
639
|
-
|
|
640
|
-
w("div",
|
|
641
|
-
t.icon ? (v(), _("div",
|
|
642
|
-
|
|
649
|
+
const r = t;
|
|
650
|
+
return (a, h) => (v(), _("div", Ve, [
|
|
651
|
+
w("div", Ye, [
|
|
652
|
+
P(a.$slots, "header", {}, () => [
|
|
653
|
+
w("div", qe, [
|
|
654
|
+
t.icon ? (v(), _("div", Je, [
|
|
655
|
+
ke(ee(Ae), {
|
|
643
656
|
class: "dashboard-widget-card__icon",
|
|
644
657
|
icon: t.icon,
|
|
645
658
|
size: "l"
|
|
646
659
|
}, null, 8, ["icon"])
|
|
647
|
-
])) :
|
|
648
|
-
w("div",
|
|
660
|
+
])) : N("", !0),
|
|
661
|
+
w("div", Qe, Y(r.header), 1)
|
|
649
662
|
])
|
|
650
663
|
]),
|
|
651
|
-
a.$slots.actions ? (v(), _("div",
|
|
652
|
-
|
|
653
|
-
])) :
|
|
664
|
+
a.$slots.actions ? (v(), _("div", Xe, [
|
|
665
|
+
P(a.$slots, "actions")
|
|
666
|
+
])) : N("", !0)
|
|
654
667
|
]),
|
|
655
|
-
a.$slots.stats ? (v(), _("div",
|
|
656
|
-
|
|
657
|
-
])) :
|
|
658
|
-
|
|
659
|
-
|
|
668
|
+
a.$slots.stats ? (v(), _("div", Ze, [
|
|
669
|
+
P(a.$slots, "stats")
|
|
670
|
+
])) : N("", !0),
|
|
671
|
+
$e((v(), _("div", et, [
|
|
672
|
+
P(a.$slots, "content")
|
|
660
673
|
])), [
|
|
661
|
-
[
|
|
674
|
+
[ee(We), t.loading]
|
|
662
675
|
]),
|
|
663
|
-
a.$slots.footer ? (v(), _("div",
|
|
664
|
-
|
|
665
|
-
])) :
|
|
676
|
+
a.$slots.footer ? (v(), _("div", tt, [
|
|
677
|
+
P(a.$slots, "footer")
|
|
678
|
+
])) : N("", !0)
|
|
666
679
|
]));
|
|
667
680
|
}
|
|
668
|
-
}),
|
|
681
|
+
}), ot = { class: "dashboard-stat-item" }, at = { class: "dashboard-stat-item__label" }, Vo = /* @__PURE__ */ B({
|
|
669
682
|
__name: "dashboard-stat-item",
|
|
670
683
|
props: {
|
|
671
684
|
value: {},
|
|
@@ -673,45 +686,45 @@ const Ne = /* @__PURE__ */ $e(Ee, [["render", Ie]]), Be = ["aria-label"], Re = [
|
|
|
673
686
|
variant: {}
|
|
674
687
|
},
|
|
675
688
|
setup(t) {
|
|
676
|
-
return (
|
|
689
|
+
return (r, a) => (v(), _("div", ot, [
|
|
677
690
|
w("div", {
|
|
678
|
-
class:
|
|
679
|
-
},
|
|
680
|
-
w("div",
|
|
691
|
+
class: ue(["dashboard-stat-item__value", t.variant ? `dashboard-stat-item__value--${t.variant}` : ""])
|
|
692
|
+
}, Y(t.value), 3),
|
|
693
|
+
w("div", at, Y(t.label), 1)
|
|
681
694
|
]));
|
|
682
695
|
}
|
|
683
|
-
}),
|
|
696
|
+
}), st = { class: "tw-divide-y tw-divide-[var(--neutrals-200)]" }, Yo = /* @__PURE__ */ B({
|
|
684
697
|
__name: "dashboard-feed-list",
|
|
685
698
|
setup(t) {
|
|
686
|
-
return (
|
|
687
|
-
|
|
699
|
+
return (r, a) => (v(), _("div", st, [
|
|
700
|
+
P(r.$slots, "default")
|
|
688
701
|
]));
|
|
689
702
|
}
|
|
690
|
-
}),
|
|
703
|
+
}), rt = { class: "tw-flex tw-items-center tw-gap-2.5 tw-min-w-0" }, it = {
|
|
691
704
|
key: 0,
|
|
692
705
|
class: "tw-flex tw-items-center tw-gap-3 tw-flex-shrink-0 tw-ml-3"
|
|
693
|
-
},
|
|
706
|
+
}, qo = /* @__PURE__ */ B({
|
|
694
707
|
__name: "dashboard-feed-row",
|
|
695
708
|
emits: ["click"],
|
|
696
709
|
setup(t) {
|
|
697
|
-
return (
|
|
710
|
+
return (r, a) => (v(), _("div", {
|
|
698
711
|
class: "dashboard-feed-row",
|
|
699
|
-
onClick: a[0] || (a[0] = (h) =>
|
|
712
|
+
onClick: a[0] || (a[0] = (h) => r.$emit("click"))
|
|
700
713
|
}, [
|
|
701
|
-
w("div",
|
|
702
|
-
|
|
714
|
+
w("div", rt, [
|
|
715
|
+
P(r.$slots, "default")
|
|
703
716
|
]),
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
])) :
|
|
717
|
+
r.$slots.trailing ? (v(), _("div", it, [
|
|
718
|
+
P(r.$slots, "trailing")
|
|
719
|
+
])) : N("", !0)
|
|
707
720
|
]));
|
|
708
721
|
}
|
|
709
722
|
});
|
|
710
723
|
export {
|
|
711
724
|
Ko as L,
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
725
|
+
Yo as _,
|
|
726
|
+
qo as a,
|
|
727
|
+
Vo as b,
|
|
715
728
|
jo as c,
|
|
716
729
|
No as d,
|
|
717
730
|
Ho as e,
|
|
@@ -720,5 +733,5 @@ export {
|
|
|
720
733
|
Co as m,
|
|
721
734
|
Fo as s,
|
|
722
735
|
Bo as t,
|
|
723
|
-
|
|
736
|
+
Te as u
|
|
724
737
|
};
|