@vc-shell/framework 2.4.0 → 2.5.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.
Files changed (115) hide show
  1. package/dist/ai-agent/index.js +3 -3
  2. package/dist/chunks/{VcAiAgentPanel.vue_vue_type_script_setup_true_lang-Cm_izaFs.js → VcAiAgentPanel.vue_vue_type_script_setup_true_lang-9mBLzIi1.js} +490 -468
  3. package/dist/chunks/VcAiAgentPanel.vue_vue_type_script_setup_true_lang-9mBLzIi1.js.map +1 -0
  4. package/dist/chunks/{VcAiAgentPanel.vue_vue_type_style_index_0_lang-DrGobYkj.js → VcAiAgentPanel.vue_vue_type_style_index_0_lang-CZdY18Hq.js} +74 -68
  5. package/dist/chunks/{VcAiAgentPanel.vue_vue_type_style_index_0_lang-DrGobYkj.js.map → VcAiAgentPanel.vue_vue_type_style_index_0_lang-CZdY18Hq.js.map} +1 -1
  6. package/dist/chunks/{VcScheduler.vue_vue_type_script_setup_true_lang-B-xA79lJ.js → VcScheduler.vue_vue_type_script_setup_true_lang-BmlVL_rn.js} +6388 -6183
  7. package/dist/chunks/VcScheduler.vue_vue_type_script_setup_true_lang-BmlVL_rn.js.map +1 -0
  8. package/dist/chunks/{VcScheduler.vue_vue_type_style_index_0_lang-BSvjI-39.js → VcScheduler.vue_vue_type_style_index_0_lang-BTg4PjTB.js} +533 -521
  9. package/dist/chunks/VcScheduler.vue_vue_type_style_index_0_lang-BTg4PjTB.js.map +1 -0
  10. package/dist/chunks/dashboard-feed-row.vue_vue_type_script_setup_true_lang-BCsJG_hk.js +724 -0
  11. package/dist/chunks/dashboard-feed-row.vue_vue_type_script_setup_true_lang-BCsJG_hk.js.map +1 -0
  12. package/dist/chunks/{index-C-SEYj46.js → index-B7RhGTNx.js} +2 -2
  13. package/dist/chunks/{index-C-SEYj46.js.map → index-B7RhGTNx.js.map} +1 -1
  14. package/dist/core/blade-navigation/utils/bladeRouterGuard.d.ts +1 -2
  15. package/dist/core/blade-navigation/utils/bladeRouterGuard.d.ts.map +1 -1
  16. package/dist/core/composables/index.d.ts +1 -0
  17. package/dist/core/composables/index.d.ts.map +1 -1
  18. package/dist/core/composables/useLatestRequest/index.d.ts +43 -0
  19. package/dist/core/composables/useLatestRequest/index.d.ts.map +1 -0
  20. package/dist/core/composables/usePopup/index.d.ts +12 -3
  21. package/dist/core/composables/usePopup/index.d.ts.map +1 -1
  22. package/dist/core/composables/usePopup/keys.d.ts +3 -1
  23. package/dist/core/composables/usePopup/keys.d.ts.map +1 -1
  24. package/dist/core/composables/usePopup/types.d.ts +32 -1
  25. package/dist/core/composables/usePopup/types.d.ts.map +1 -1
  26. package/dist/core/interceptors/index.d.ts.map +1 -1
  27. package/dist/core/plugins/ai-agent/components/VcAiAgentPanel.vue.d.ts +4 -1
  28. package/dist/core/plugins/ai-agent/components/VcAiAgentPanel.vue.d.ts.map +1 -1
  29. package/dist/core/plugins/ai-agent/services/ai-agent-service.d.ts.map +1 -1
  30. package/dist/core/plugins/ai-agent/services/message-transport.d.ts +2 -0
  31. package/dist/core/plugins/ai-agent/services/message-transport.d.ts.map +1 -1
  32. package/dist/core/plugins/ai-agent/types.d.ts +1 -1
  33. package/dist/core/plugins/ai-agent/types.d.ts.map +1 -1
  34. package/dist/core/utilities/error.d.ts.map +1 -1
  35. package/dist/core/utilities/focus.d.ts +25 -0
  36. package/dist/core/utilities/focus.d.ts.map +1 -0
  37. package/dist/core/utilities/index.d.ts +1 -0
  38. package/dist/core/utilities/index.d.ts.map +1 -1
  39. package/dist/core/utilities/sessionExpiration.d.ts +14 -0
  40. package/dist/core/utilities/sessionExpiration.d.ts.map +1 -1
  41. package/dist/dashboard/index.js +1 -1
  42. package/dist/framework.js +1300 -1262
  43. package/dist/framework.js.map +1 -1
  44. package/dist/index.css +1 -1
  45. package/dist/index.d.ts.map +1 -1
  46. package/dist/injection-keys.d.ts +1 -2
  47. package/dist/injection-keys.d.ts.map +1 -1
  48. package/dist/locales/de.js +3 -0
  49. package/dist/locales/en.js +3 -0
  50. package/dist/locales/en.json +3 -0
  51. package/dist/locales/types.d.ts +3 -0
  52. package/dist/shell/_internal/blade-navigation/components/vc-blade-navigation/focus-target.d.ts +20 -0
  53. package/dist/shell/_internal/blade-navigation/components/vc-blade-navigation/focus-target.d.ts.map +1 -0
  54. package/dist/shell/_internal/blade-navigation/components/vc-blade-navigation/vc-blade-navigation-new.vue.d.ts.map +1 -1
  55. package/dist/shell/_internal/blade-navigation/components/vc-blade-slot/vc-blade-slot.vue.d.ts +5 -0
  56. package/dist/shell/_internal/blade-navigation/components/vc-blade-slot/vc-blade-slot.vue.d.ts.map +1 -1
  57. package/dist/shell/_internal/popup/components/vc-popup-container/PopupInstanceProvider.vue.d.ts +30 -0
  58. package/dist/shell/_internal/popup/components/vc-popup-container/PopupInstanceProvider.vue.d.ts.map +1 -0
  59. package/dist/shell/_internal/popup/components/vc-popup-container/vc-popup-container.vue.d.ts.map +1 -1
  60. package/dist/shell/auth/ChangePasswordPage/components/change-password/ChangePassword.vue.d.ts.map +1 -1
  61. package/dist/shell/auth/InvitePage/components/invite/Invite.vue.d.ts.map +1 -1
  62. package/dist/shell/auth/ResetPasswordPage/components/reset-password/ResetPassword.vue.d.ts.map +1 -1
  63. package/dist/shell/components/change-password/change-password.vue.d.ts.map +1 -1
  64. package/dist/shell/dashboard/draggable-dashboard/GridstackDashboard.vue.d.ts.map +1 -1
  65. package/dist/shell/dashboard/draggable-dashboard/composables/useGridstack.d.ts +5 -8
  66. package/dist/shell/dashboard/draggable-dashboard/composables/useGridstack.d.ts.map +1 -1
  67. package/dist/shell/dashboard/draggable-dashboard/composables/useGridstackAdapter.d.ts +6 -6
  68. package/dist/shell/dashboard/draggable-dashboard/composables/useGridstackAdapter.d.ts.map +1 -1
  69. package/dist/shell/dashboard/draggable-dashboard/types.d.ts +11 -0
  70. package/dist/shell/dashboard/draggable-dashboard/types.d.ts.map +1 -1
  71. package/dist/tsconfig.tsbuildinfo +1 -1
  72. package/dist/ui/components/molecules/vc-color-input/vc-color-input.vue.d.ts +2 -2
  73. package/dist/ui/components/molecules/vc-date-picker/vc-date-picker.vue.d.ts +2 -2
  74. package/dist/ui/components/molecules/vc-input/vc-input.vue.d.ts +2 -2
  75. package/dist/ui/components/molecules/vc-multivalue/_internal/MultivalueTrigger.vue.d.ts +2 -2
  76. package/dist/ui/components/molecules/vc-popover/vc-popover.vue.d.ts +4 -0
  77. package/dist/ui/components/molecules/vc-popover/vc-popover.vue.d.ts.map +1 -1
  78. package/dist/ui/components/molecules/vc-select/_internal/SelectTrigger.vue.d.ts +2 -2
  79. package/dist/ui/components/organisms/vc-app/_internal/app-bar/components/MenuSidebar.vue.d.ts +1 -0
  80. package/dist/ui/components/organisms/vc-app/_internal/app-bar/components/MenuSidebar.vue.d.ts.map +1 -1
  81. package/dist/ui/components/organisms/vc-app/_internal/layouts/DesktopLayout.vue.d.ts +8 -0
  82. package/dist/ui/components/organisms/vc-app/_internal/layouts/DesktopLayout.vue.d.ts.map +1 -1
  83. package/dist/ui/components/organisms/vc-app/_internal/layouts/MobileLayout.vue.d.ts +5 -0
  84. package/dist/ui/components/organisms/vc-app/_internal/layouts/MobileLayout.vue.d.ts.map +1 -1
  85. package/dist/ui/components/organisms/vc-app/_internal/sidebar/SidebarHeader.vue.d.ts.map +1 -1
  86. package/dist/ui/components/organisms/vc-app/vc-app.vue.d.ts.map +1 -1
  87. package/dist/ui/components/organisms/vc-blade/_internal/BladeHeader.vue.d.ts.map +1 -1
  88. package/dist/ui/components/organisms/vc-blade/useBladeSkeleton.d.ts +16 -0
  89. package/dist/ui/components/organisms/vc-blade/useBladeSkeleton.d.ts.map +1 -0
  90. package/dist/ui/components/organisms/vc-blade/vc-blade.vue.d.ts.map +1 -1
  91. package/dist/ui/components/organisms/vc-data-table/VcDataTable.vue.d.ts +1 -2
  92. package/dist/ui/components/organisms/vc-data-table/VcDataTable.vue.d.ts.map +1 -1
  93. package/dist/ui/components/organisms/vc-data-table/components/GlobalFiltersPanel.vue.d.ts.map +1 -1
  94. package/dist/ui/components/organisms/vc-data-table/components/TableSearchHeader.vue.d.ts.map +1 -1
  95. package/dist/ui/components/organisms/vc-data-table/components/mobile/PullToRefresh.vue.d.ts.map +1 -1
  96. package/dist/ui/components/organisms/vc-popup/vc-popup.vue.d.ts.map +1 -1
  97. package/dist/ui/components/organisms/vc-scheduler/VcScheduler.vue.d.ts.map +1 -1
  98. package/dist/ui/components/organisms/vc-scheduler/_internal/SchedulerToolbar.vue.d.ts.map +1 -1
  99. package/dist/ui/components/organisms/vc-scheduler/_internal/month/MonthEventBar.vue.d.ts.map +1 -1
  100. package/dist/ui/components/organisms/vc-scheduler/_internal/month/MonthMorePopover.vue.d.ts.map +1 -1
  101. package/dist/ui/components/organisms/vc-scheduler/_internal/month/MonthWeekRow.vue.d.ts.map +1 -1
  102. package/dist/ui/components/organisms/vc-scheduler/_internal/views/SchedulerTimelineView.vue.d.ts.map +1 -1
  103. package/dist/ui/components/organisms/vc-scheduler/composables/useTimelineTimeGrid.d.ts +2 -0
  104. package/dist/ui/components/organisms/vc-scheduler/composables/useTimelineTimeGrid.d.ts.map +1 -1
  105. package/dist/ui/components/organisms/vc-sidebar/vc-sidebar.vue.d.ts +1 -0
  106. package/dist/ui/components/organisms/vc-sidebar/vc-sidebar.vue.d.ts.map +1 -1
  107. package/dist/ui/composables/useDataTablePagination.d.ts +22 -1
  108. package/dist/ui/composables/useDataTablePagination.d.ts.map +1 -1
  109. package/dist/ui/index.js +3 -3
  110. package/package.json +4 -4
  111. package/dist/chunks/VcAiAgentPanel.vue_vue_type_script_setup_true_lang-Cm_izaFs.js.map +0 -1
  112. package/dist/chunks/VcScheduler.vue_vue_type_script_setup_true_lang-B-xA79lJ.js.map +0 -1
  113. package/dist/chunks/VcScheduler.vue_vue_type_style_index_0_lang-BSvjI-39.js.map +0 -1
  114. package/dist/chunks/dashboard-feed-row.vue_vue_type_script_setup_true_lang-BXDneKBz.js +0 -679
  115. package/dist/chunks/dashboard-feed-row.vue_vue_type_script_setup_true_lang-BXDneKBz.js.map +0 -1
@@ -0,0 +1,724 @@
1
+ import { shallowRef as he, ref as D, watch as le, nextTick as de, onUnmounted as pe, openBlock as v, createElementBlock as _, createStaticVNode as me, defineComponent as R, inject as fe, computed as se, onMounted as ve, createBlock as Y, withCtx as ge, unref as Z, Fragment as re, renderList as ie, normalizeStyle as ye, normalizeClass as ce, createElementVNode as w, createCommentVNode as B, resolveDynamicComponent as _e, mergeProps as be, toDisplayString as J, renderSlot as O, createVNode as we, withDirectives as ke } from "vue";
2
+ import { q as $e, r as xe, s as Se, l as Le } from "./VcScheduler.vue_vue_type_style_index_0_lang-BTg4PjTB.js";
3
+ import { G as We } from "./vendor-gridstack-Beau2jQ7.js";
4
+ import { M as ze, _ as De } from "./VcAiAgentPanel.vue_vue_type_style_index_0_lang-CZdY18Hq.js";
5
+ import "vee-validate";
6
+ import "./vendor-tiptap-starter-kit-ny-AoaO_.js";
7
+ import "./vendor-tiptap-extension-underline-Bo1pXXDN.js";
8
+ import "./vendor-tiptap-extension-table-QVjcLO_H.js";
9
+ import "./vendor-tiptap-extension-link-CETrc0Mo.js";
10
+ import "./vendor-tiptap-extension-image-BpqLcXdw.js";
11
+ import "./vendor-tiptap-extensions-D7eaegpB.js";
12
+ import "./vendor-tiptap-extension-text-style-Bc6nvmn0.js";
13
+ import "./vendor-js-beautify-D-6mWVv0.js";
14
+ import "./vendor-dompurify-DpIUMBYC.js";
15
+ import "./vendor-vuepic-vue-datepicker-D0bvbIbh.js";
16
+ import "./vendor-swiper-BgqGfw3Y.js";
17
+ import "vue-router";
18
+ import "../assets/d5f9664ebbfb104b.svg";
19
+ import "../assets/4e43c74354534fb3.svg";
20
+ import "../assets/e98196a9f8dcb2f0.svg";
21
+ import "../assets/74ed5f8a78e71106.svg";
22
+ import "../assets/1ea01de36eb5491b.svg";
23
+ import "../assets/d5a5b8630120073d.svg";
24
+ import "../assets/6798e4dd4add9b48.svg";
25
+ import "../assets/2d4e6190eec72737.svg";
26
+ import "../assets/9392bf1d591e1abb.svg";
27
+ import "../assets/204eaf512fde2023.svg";
28
+ import "../assets/0ba156439a339f2a.svg";
29
+ import "../assets/2857c513073467da.svg";
30
+ import "../assets/b645a4a2181b9dc1.svg";
31
+ import "../assets/b94421fadd23b0f2.svg";
32
+ import "../assets/6a3e73faf406cf33.svg";
33
+ import "../assets/e38acaa1757232e0.svg";
34
+ import "../assets/ca791c5ca5848a03.svg";
35
+ import "../assets/10768e2cc79fc60b.svg";
36
+ import "../assets/67230f05dc94a265.svg";
37
+ import "../assets/4d7a77b0e5373992.svg";
38
+ import "../assets/f7fc8bf46089d8b2.svg";
39
+ import "../assets/92508f8707159b51.svg";
40
+ import "../assets/b6499ddce0a4ef7d.svg";
41
+ import "../assets/fed13b0d59903483.svg";
42
+ import "../assets/34ff7dd0c2285956.svg";
43
+ import "../assets/bb28fb0f27f1c11b.svg";
44
+ import "../assets/21220a9d10e6c558.svg";
45
+ import "../assets/b372390551ca2fa1.svg";
46
+ import "../assets/262f46a0b6d94bb6.svg";
47
+ import "../assets/042c75b764bc78a7.svg";
48
+ import "../assets/b1a596e31ad1185a.svg";
49
+ import "../assets/15e91cdd649cde9a.svg";
50
+ import "../assets/e72bb11356af94c7.svg";
51
+ import "../assets/4fe75f5117100705.svg";
52
+ import "../assets/dd05d43ff0df2fc7.svg";
53
+ import "../assets/b325adcae33bbe7a.svg";
54
+ import "../assets/f09d89268e4c0317.svg";
55
+ import "../assets/9cb83236f6bb7ab1.svg";
56
+ import "../assets/d084bda16abe8a56.svg";
57
+ import "../assets/7eda727273fd98d3.svg";
58
+ import "../assets/572bb1bb4156a9c1.svg";
59
+ import "../assets/41275bcb979cb650.svg";
60
+ import "../assets/1de63eb118636cce.svg";
61
+ import "../assets/e5adb5ae3a3698f6.svg";
62
+ import "../assets/b5bb1e8fc975decd.svg";
63
+ import "../assets/157b8721e0600ea8.svg";
64
+ import "../assets/a18404194e3f9047.svg";
65
+ import "../assets/a2017fe7f0a26510.svg";
66
+ import "../assets/0f590f8a94577092.svg";
67
+ import "../assets/259e6ad461a52ad7.svg";
68
+ import "../assets/7d55399c2a7bc985.svg";
69
+ import "../assets/910b0d99b9e26568.svg";
70
+ import "../assets/e4a8550f1c7ffe36.svg";
71
+ import "../assets/2088983edf42e153.svg";
72
+ import "../assets/225da11d23968333.svg";
73
+ import "../assets/d32b129cae2fffd6.svg";
74
+ import "../assets/abf88f301a0730f4.svg";
75
+ import "../assets/0fc5820f8be53a1b.svg";
76
+ import "../assets/d3f792f54ae4c307.svg";
77
+ import "../assets/208f810a9321a327.svg";
78
+ import "../assets/72de3a63bc0b70dd.svg";
79
+ import "./vendor-iso-639-1-BEjYyfKo.js";
80
+ import "./vendor-cypress-signalr-mock-itnm2wpA.js";
81
+ import "./ExtensionPoint.vue_vue_type_style_index_0_lang-B1R06zHa.js";
82
+ import "./vendor-truncate-html-ChA1T5zy.js";
83
+ import "./vendor-sortablejs-Bsvu-FKn.js";
84
+ const j = "vc-dashboard-layout";
85
+ function ee(t, s) {
86
+ const a = s ?? t.position;
87
+ return {
88
+ id: t.id,
89
+ x: a?.x ?? 0,
90
+ y: a?.y ?? 0,
91
+ // A placement size wins over the declared one, so a saved or live resize is
92
+ // restored instead of snapping back to the widget's default.
93
+ w: s?.width ?? t.size.width,
94
+ h: s?.height ?? t.size.height,
95
+ minW: 2,
96
+ minH: 2
97
+ };
98
+ }
99
+ function te(t) {
100
+ return {
101
+ id: t.id ?? "",
102
+ position: {
103
+ x: t.x ?? 0,
104
+ y: t.y ?? 0
105
+ },
106
+ size: {
107
+ width: t.w ?? 1,
108
+ height: t.h ?? 1
109
+ }
110
+ };
111
+ }
112
+ function Ae(t) {
113
+ const s = /* @__PURE__ */ new Map();
114
+ for (const a of t)
115
+ a.id && s.set(a.id, {
116
+ x: a.x ?? 0,
117
+ y: a.y ?? 0,
118
+ // Size is carried through as well; dropping it here is what used to make
119
+ // every resize — mouse or keyboard — invisible to state and to storage.
120
+ ...typeof a.w == "number" ? { width: a.w } : {},
121
+ ...typeof a.h == "number" ? { height: a.h } : {}
122
+ });
123
+ return s;
124
+ }
125
+ function oe() {
126
+ try {
127
+ const t = localStorage.getItem(j);
128
+ if (!t) return null;
129
+ const s = JSON.parse(t);
130
+ if (Array.isArray(s))
131
+ return Ae(s);
132
+ if (typeof s == "object" && s !== null) {
133
+ const a = /* @__PURE__ */ new Map();
134
+ for (const [h, p] of Object.entries(s))
135
+ p && typeof p.x == "number" && typeof p.y == "number" && a.set(h, { x: p.x, y: p.y });
136
+ return a;
137
+ }
138
+ return null;
139
+ } catch (t) {
140
+ return console.warn("[GridstackAdapter] Failed to load layout from storage:", t), null;
141
+ }
142
+ }
143
+ function ue(t, s) {
144
+ try {
145
+ const a = t.map((h) => {
146
+ const p = s.get(h.id);
147
+ return {
148
+ id: h.id,
149
+ x: p?.x ?? h.position?.x ?? 0,
150
+ y: p?.y ?? h.position?.y ?? 0,
151
+ // Prefer the live size. Reading `widget.size` unconditionally is what used
152
+ // to discard every resize on reload, since that prop is never written back.
153
+ w: p?.width ?? h.size.width,
154
+ h: p?.height ?? h.size.height
155
+ };
156
+ });
157
+ localStorage.setItem(j, JSON.stringify(a));
158
+ } catch (a) {
159
+ console.warn("[GridstackAdapter] Failed to save layout to storage:", a);
160
+ }
161
+ }
162
+ function Ge() {
163
+ try {
164
+ localStorage.removeItem(j);
165
+ } catch (t) {
166
+ console.warn("[GridstackAdapter] Failed to clear layout storage:", t);
167
+ }
168
+ }
169
+ function Pe(t, s = 12) {
170
+ const a = /* @__PURE__ */ new Map(), h = /* @__PURE__ */ new Map(), p = (o, y, f, k) => {
171
+ for (let b = y; b < y + k; b++) {
172
+ const z = h.get(b) || [];
173
+ for (let S = o; S < o + f; S++)
174
+ if (z.includes(S)) return !1;
175
+ }
176
+ return !0;
177
+ }, W = (o, y, f, k) => {
178
+ for (let b = y; b < y + k; b++) {
179
+ const z = h.get(b) || [];
180
+ for (let S = o; S < o + f; S++)
181
+ z.push(S);
182
+ h.set(b, z);
183
+ }
184
+ }, i = (o, y) => {
185
+ let f = 0;
186
+ for (; ; ) {
187
+ for (let k = 0; k <= s - o; k++)
188
+ if (p(k, f, o, y))
189
+ return { x: k, y: f };
190
+ if (f++, f > 100) break;
191
+ }
192
+ return { x: 0, y: f };
193
+ };
194
+ for (const o of t) {
195
+ const y = i(o.size.width, o.size.height);
196
+ a.set(o.id, y), W(y.x, y.y, o.size.width, o.size.height);
197
+ }
198
+ return a;
199
+ }
200
+ function ae(t, s) {
201
+ if (s && s.size > 0) {
202
+ const h = /* @__PURE__ */ new Map();
203
+ for (const p of t) {
204
+ const W = s.get(p.id), i = p.position, o = W ?? i ?? { x: 0, y: 0 };
205
+ h.set(p.id, o);
206
+ }
207
+ return h;
208
+ }
209
+ if (t.every((h) => h.position !== void 0)) {
210
+ const h = /* @__PURE__ */ new Map();
211
+ for (const p of t)
212
+ h.set(p.id, p.position);
213
+ return h;
214
+ }
215
+ return Pe(t);
216
+ }
217
+ const Me = {
218
+ column: 12,
219
+ cellHeight: 80,
220
+ margin: "10px",
221
+ float: !1,
222
+ animate: !0,
223
+ // Disable responsive column changes - always use 12 columns
224
+ columnOpts: {
225
+ breakpoints: [{ w: 0, c: 12 }]
226
+ // Always 12 columns regardless of width
227
+ },
228
+ draggable: {
229
+ handle: ".grid-stack-item-content"
230
+ },
231
+ resizable: {
232
+ handles: "se"
233
+ // Only bottom-right corner
234
+ }
235
+ };
236
+ function Oe(t, s = {}) {
237
+ const { gridOptions: a = {}, resizable: h = !1, autoSave: p = !0, onLayoutChange: W } = s, i = he(null), o = D(/* @__PURE__ */ new Map()), y = D(!1), f = D(!1), k = {
238
+ ...Me,
239
+ ...a,
240
+ disableResize: !h
241
+ }, b = (r) => {
242
+ if (i.value) {
243
+ console.warn("[useGridstack] Grid already initialized");
244
+ return;
245
+ }
246
+ const l = oe();
247
+ o.value = ae(t.value, l), i.value = We.init(k, r), i.value.on("change", z), i.value.on("added", S), i.value.on("removed", Q);
248
+ const c = t.value.map((g) => {
249
+ const m = o.value.get(g.id);
250
+ return ee(g, m);
251
+ });
252
+ i.value.load(c), y.value = !0;
253
+ }, z = (r, l) => {
254
+ if (!f.value) {
255
+ for (const c of l) {
256
+ const { id: g, position: m } = te(c);
257
+ if (g) {
258
+ const $ = o.value.get(g), N = typeof c.w == "number" ? c.w : $?.width, L = typeof c.h == "number" ? c.h : $?.height;
259
+ o.value.set(g, {
260
+ ...m,
261
+ ...typeof N == "number" ? { width: N } : {},
262
+ ...typeof L == "number" ? { height: L } : {}
263
+ });
264
+ }
265
+ }
266
+ o.value = new Map(o.value), W?.(o.value), p && P();
267
+ }
268
+ }, S = (r, l) => {
269
+ for (const c of l) {
270
+ const { id: g, position: m } = te(c);
271
+ g && !o.value.has(g) && o.value.set(g, m);
272
+ }
273
+ o.value = new Map(o.value);
274
+ }, Q = (r, l) => {
275
+ for (const c of l)
276
+ c.id && o.value.delete(c.id);
277
+ o.value = new Map(o.value);
278
+ }, U = () => {
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
+ }, F = (r) => {
281
+ if (!i.value) return;
282
+ const l = o.value.get(r.id) ?? r.position, c = ee(r, l), g = document.querySelector(`[gs-id="${r.id}"]`);
283
+ g && i.value.makeWidget(g, c);
284
+ }, C = (r) => {
285
+ if (!i.value) return;
286
+ const l = document.querySelector(`[gs-id="${r}"]`);
287
+ l && i.value.removeWidget(l, !1), o.value.delete(r);
288
+ }, H = (r, l, c, g) => {
289
+ const m = l.gridstackNode, $ = o.value.get(r), N = m?.x ?? c?.x ?? $?.x ?? 0, L = m?.y ?? c?.y ?? $?.y ?? 0, K = m?.w ?? g?.width ?? $?.width, X = m?.h ?? g?.height ?? $?.height;
290
+ o.value.set(r, {
291
+ x: N,
292
+ y: L,
293
+ ...typeof K == "number" ? { width: K } : {},
294
+ ...typeof X == "number" ? { height: X } : {}
295
+ }), o.value = new Map(o.value);
296
+ }, q = (r, l) => {
297
+ if (!i.value) return;
298
+ const c = document.querySelector(`[gs-id="${r}"]`);
299
+ c && (f.value = !0, i.value.update(c, { x: l.x, y: l.y }), H(r, c, l), f.value = !1);
300
+ }, A = (r, l) => {
301
+ if (!i.value) return;
302
+ const c = document.querySelector(`[gs-id="${r}"]`);
303
+ c && (f.value = !0, i.value.update(c, { w: l.width, h: l.height }), H(r, c, void 0, l), f.value = !1);
304
+ }, P = () => {
305
+ ue(t.value, o.value);
306
+ }, T = () => {
307
+ const r = oe();
308
+ r && (o.value = ae(t.value, r), G());
309
+ }, I = () => {
310
+ o.value = /* @__PURE__ */ new Map();
311
+ for (const r of t.value)
312
+ r.position && o.value.set(r.id, { ...r.position });
313
+ G(), P();
314
+ }, G = () => {
315
+ if (i.value) {
316
+ f.value = !0, i.value.batchUpdate();
317
+ for (const r of t.value) {
318
+ const l = o.value.get(r.id);
319
+ if (l) {
320
+ const c = document.querySelector(`[gs-id="${r.id}"]`);
321
+ c && i.value.update(c, {
322
+ x: l.x,
323
+ y: l.y,
324
+ // Restores a persisted size; omitted when unknown so Gridstack keeps
325
+ // whatever the element already declares.
326
+ ...typeof l.width == "number" ? { w: l.width } : {},
327
+ ...typeof l.height == "number" ? { h: l.height } : {}
328
+ });
329
+ }
330
+ }
331
+ i.value.batchUpdate(!1), f.value = !1;
332
+ }
333
+ }, E = (r) => {
334
+ if (!i.value) {
335
+ r();
336
+ return;
337
+ }
338
+ f.value = !0, i.value.batchUpdate(), r(), i.value.batchUpdate(!1), f.value = !1;
339
+ };
340
+ return le(
341
+ t,
342
+ async (r, l) => {
343
+ if (!i.value || !y.value) return;
344
+ await de();
345
+ const c = r.filter((m) => !l?.some(($) => $.id === m.id)), g = l?.filter((m) => !r.some(($) => $.id === m.id)).map((m) => m.id) ?? [];
346
+ for (const m of g)
347
+ C(m);
348
+ for (const m of c)
349
+ F(m);
350
+ },
351
+ { deep: !1 }
352
+ ), pe(() => {
353
+ U();
354
+ }), {
355
+ grid: i,
356
+ layout: o,
357
+ isInitialized: y,
358
+ initGrid: b,
359
+ destroyGrid: U,
360
+ addWidget: F,
361
+ removeWidget: C,
362
+ updateWidgetPosition: q,
363
+ updateWidgetSize: A,
364
+ saveLayout: P,
365
+ loadLayout: T,
366
+ resetToDefaults: I,
367
+ batchUpdate: E
368
+ };
369
+ }
370
+ const Ee = {}, Te = {
371
+ class: "dashboard-widget-skeleton",
372
+ "aria-hidden": "true"
373
+ };
374
+ function Ie(t, s) {
375
+ return v(), _("div", Te, [...s[0] || (s[0] = [
376
+ me('<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
+ ])]);
378
+ }
379
+ const Ne = /* @__PURE__ */ $e(Ee, [["render", Ie]]), Be = ["aria-label"], Re = ["aria-label"], Ue = ["gs-id", "gs-x", "gs-y", "gs-w", "gs-h", "aria-label", "onKeydown"], Fe = { class: "grid-stack-item-content" }, Ce = {
380
+ key: 0,
381
+ class: "vc-gridstack-dashboard__drag-handle",
382
+ "aria-hidden": "true"
383
+ }, He = {
384
+ class: "vc-gridstack-dashboard__live-region",
385
+ role: "status",
386
+ "aria-live": "polite",
387
+ "aria-atomic": "true"
388
+ }, ne = 2, Ke = /* @__PURE__ */ R({
389
+ __name: "GridstackDashboard",
390
+ props: {
391
+ showDragHandles: { type: Boolean, default: !1 },
392
+ resizable: { type: Boolean, default: !1 },
393
+ ariaLabel: { default: "Dashboard widgets. Drag a widget, or focus one and press Enter to rearrange with the arrow keys." }
394
+ },
395
+ setup(t, { expose: s }) {
396
+ const a = [
397
+ { x: 0, y: 0, w: 6, h: 6 },
398
+ { x: 6, y: 0, w: 6, h: 6 },
399
+ { x: 0, y: 6, w: 6, h: 6 },
400
+ { x: 6, y: 6, w: 6, h: 6 }
401
+ ];
402
+ function h() {
403
+ if (typeof window > "u") return null;
404
+ try {
405
+ const e = window.localStorage.getItem(j);
406
+ if (!e) return null;
407
+ const u = JSON.parse(e);
408
+ if (!Array.isArray(u)) return null;
409
+ const n = u.filter(
410
+ (d) => !!d && typeof d == "object" && typeof d.w == "number" && typeof d.h == "number" && typeof d.x == "number" && typeof d.y == "number"
411
+ ).map((d) => ({ x: d.x, y: d.y, w: d.w, h: d.h }));
412
+ return n.length > 0 ? n : null;
413
+ } catch {
414
+ return null;
415
+ }
416
+ }
417
+ const p = t, W = D(null), i = D(""), o = fe(ze, D(!0)), y = se(() => o.value ? [] : h() ?? a), f = (e) => ({
418
+ gridColumn: `${e.x + 1} / span ${e.w}`,
419
+ gridRow: `${e.y + 1} / span ${e.h}`
420
+ }), k = xe(), b = se(() => k.getWidgets()), { layout: z, isInitialized: S, initGrid: Q, saveLayout: U, resetToDefaults: F, updateWidgetPosition: C, updateWidgetSize: H } = Oe(b, {
421
+ resizable: p.resizable,
422
+ autoSave: !0,
423
+ gridOptions: {
424
+ draggable: {
425
+ handle: p.showDragHandles ? ".vc-gridstack-dashboard__drag-handle" : ".grid-stack-item-content"
426
+ }
427
+ },
428
+ onLayoutChange: (e) => {
429
+ for (const [u, n] of e)
430
+ k.updateWidgetPosition(u, n);
431
+ L("Widget positions updated");
432
+ }
433
+ }), q = (e) => z.value.get(e), A = D(null), P = D(null), T = D(null), I = (e) => z.value.get(e.id) ?? e.position ?? { x: 0, y: 0 }, G = (e) => {
434
+ const u = z.value.get(e.id);
435
+ return {
436
+ width: u?.width ?? e.size.width,
437
+ height: u?.height ?? e.size.height
438
+ };
439
+ }, E = (e) => e.name || e.id, r = (e) => {
440
+ A.value = e.id, P.value = { ...I(e) }, T.value = { ...G(e) }, L(
441
+ `${E(e)} picked up. Use arrow keys to move, Shift and arrow keys to resize, Enter to drop, Escape to cancel.`
442
+ );
443
+ }, l = (e) => {
444
+ A.value = null, P.value = null, T.value = null, U();
445
+ const { x: u, y: n } = I(e);
446
+ L(`${E(e)} dropped at column ${u + 1}, row ${n + 1}.`);
447
+ }, c = (e) => {
448
+ const u = P.value, n = T.value, d = G(e);
449
+ n && (n.width !== d.width || n.height !== d.height) && H(e.id, n), u && C(e.id, u), A.value = null, P.value = null, T.value = null, L(`Move cancelled. ${E(e)} returned to its original position and size.`);
450
+ }, g = (e, u, n) => {
451
+ const d = I(e), x = { x: d.x + u, y: d.y + n };
452
+ if (x.x < 0 || x.y < 0) return;
453
+ C(e.id, x);
454
+ const M = I(e);
455
+ L(`${E(e)} moved to column ${M.x + 1}, row ${M.y + 1}.`);
456
+ }, m = (e, u, n) => {
457
+ const d = G(e), x = u ? Math.max(ne, d.width + u) : d.width, M = n ? Math.max(ne, d.height + n) : d.height;
458
+ if (x === d.width && M === d.height) return;
459
+ H(e.id, { width: x, height: M });
460
+ const V = G(e);
461
+ L(`${E(e)} resized to ${V.width} by ${V.height} cells.`);
462
+ }, $ = (e, u) => {
463
+ if (e.target !== e.currentTarget) return;
464
+ const n = A.value === u.id;
465
+ if (e.key === "Enter" || e.key === " ") {
466
+ if (e.preventDefault(), n) l(u);
467
+ else {
468
+ const M = b.value.find((V) => V.id === A.value);
469
+ M && c(M), r(u);
470
+ }
471
+ return;
472
+ }
473
+ if (e.key === "Escape" && n) {
474
+ e.preventDefault(), c(u);
475
+ return;
476
+ }
477
+ const d = e.key === "ArrowLeft" ? -1 : e.key === "ArrowRight" ? 1 : 0, x = e.key === "ArrowUp" ? -1 : e.key === "ArrowDown" ? 1 : 0;
478
+ d === 0 && x === 0 || !n || (e.preventDefault(), e.shiftKey ? p.resizable && m(u, d, x) : g(u, d, x));
479
+ }, N = (e, u) => {
480
+ const n = e.name || e.id, d = A.value === e.id ? "Picked up. Arrow keys move, Enter drops, Escape cancels." : "Press Enter to pick up and rearrange with the arrow keys.";
481
+ return `${n}, widget ${u + 1} of ${b.value.length}. ${d}`;
482
+ }, L = (e) => {
483
+ i.value = e, setTimeout(() => {
484
+ i.value = "";
485
+ }, 1e3);
486
+ }, K = async () => {
487
+ await de(), W.value && !S.value && Q(W.value);
488
+ };
489
+ return ve(K), le(o, (e) => {
490
+ e && K();
491
+ }), s({
492
+ rearrangeWidgets: () => {
493
+ F();
494
+ },
495
+ recalculateLayout: () => {
496
+ },
497
+ saveLayout: U,
498
+ useBuiltInPositions: () => (F(), !0)
499
+ }), (e, u) => (v(), Y(Se, {
500
+ "no-padding": "",
501
+ class: "vc-gridstack-dashboard"
502
+ }, {
503
+ default: ge(() => [
504
+ Z(o) ? (v(), _("div", {
505
+ key: 1,
506
+ ref_key: "gridRef",
507
+ ref: W,
508
+ class: "grid-stack vc-gridstack-dashboard__grid",
509
+ role: "list",
510
+ "aria-label": t.ariaLabel
511
+ }, [
512
+ (v(!0), _(re, null, ie(b.value, (n, d) => (v(), _("div", {
513
+ key: n.id,
514
+ class: ce(["grid-stack-item", { "vc-gridstack-dashboard__item--grabbed": A.value === n.id }]),
515
+ "gs-id": n.id,
516
+ "gs-x": q(n.id)?.x ?? n.position?.x ?? 0,
517
+ "gs-y": q(n.id)?.y ?? n.position?.y ?? 0,
518
+ "gs-w": G(n).width,
519
+ "gs-h": G(n).height,
520
+ "gs-min-w": 2,
521
+ "gs-min-h": 2,
522
+ role: "listitem",
523
+ tabindex: "0",
524
+ "aria-label": N(n, d),
525
+ onKeydown: (x) => $(x, n)
526
+ }, [
527
+ w("div", Fe, [
528
+ t.showDragHandles ? (v(), _("div", Ce, [...u[0] || (u[0] = [
529
+ w("svg", {
530
+ width: "16",
531
+ height: "16",
532
+ viewBox: "0 0 16 16",
533
+ fill: "currentColor"
534
+ }, [
535
+ w("circle", {
536
+ cx: "5",
537
+ cy: "3",
538
+ r: "1.5"
539
+ }),
540
+ w("circle", {
541
+ cx: "11",
542
+ cy: "3",
543
+ r: "1.5"
544
+ }),
545
+ w("circle", {
546
+ cx: "5",
547
+ cy: "8",
548
+ r: "1.5"
549
+ }),
550
+ w("circle", {
551
+ cx: "11",
552
+ cy: "8",
553
+ r: "1.5"
554
+ }),
555
+ w("circle", {
556
+ cx: "5",
557
+ cy: "13",
558
+ r: "1.5"
559
+ }),
560
+ w("circle", {
561
+ cx: "11",
562
+ cy: "13",
563
+ r: "1.5"
564
+ })
565
+ ], -1)
566
+ ])])) : B("", !0),
567
+ (v(), Y(_e(n.component), be({ ref_for: !0 }, n.props || {}, { class: "vc-gridstack-dashboard__widget-content" }), null, 16))
568
+ ])
569
+ ], 42, Ue))), 128))
570
+ ], 8, Re)) : (v(), _("div", {
571
+ key: 0,
572
+ class: "vc-gridstack-dashboard__skeleton-grid",
573
+ role: "status",
574
+ "aria-busy": "true",
575
+ "aria-label": t.ariaLabel
576
+ }, [
577
+ (v(!0), _(re, null, ie(y.value, (n, d) => (v(), Y(Ne, {
578
+ key: `skeleton-${d}`,
579
+ class: "vc-gridstack-dashboard__skeleton-item",
580
+ style: ye(f(n))
581
+ }, null, 8, ["style"]))), 128))
582
+ ], 8, Be)),
583
+ w("div", He, J(i.value), 1)
584
+ ]),
585
+ _: 1
586
+ }));
587
+ }
588
+ }), No = /* @__PURE__ */ R({
589
+ __name: "DraggableDashboard",
590
+ props: {
591
+ showDragHandles: { type: Boolean, default: !1 },
592
+ resizable: { type: Boolean, default: !1 },
593
+ ariaLabel: { default: "Dashboard widgets. Drag widgets to rearrange." }
594
+ },
595
+ setup(t, { expose: s }) {
596
+ const a = D(null);
597
+ return s({
598
+ rearrangeWidgets: () => {
599
+ a.value?.rearrangeWidgets?.();
600
+ },
601
+ recalculateLayout: () => {
602
+ a.value?.recalculateLayout?.();
603
+ },
604
+ saveLayout: () => {
605
+ a.value?.saveLayout?.();
606
+ },
607
+ useBuiltInPositions: () => a.value?.useBuiltInPositions?.() ?? !1
608
+ }), (o, y) => (v(), Y(Ke, {
609
+ ref_key: "dashboardRef",
610
+ ref: a,
611
+ "show-drag-handles": t.showDragHandles,
612
+ resizable: t.resizable,
613
+ "aria-label": t.ariaLabel
614
+ }, null, 8, ["show-drag-handles", "resizable", "aria-label"]));
615
+ }
616
+ }), Bo = ee, Ro = te, Uo = oe, Fo = ue, Co = ae, Ho = Ge, Ko = j, je = { class: "dashboard-widget-card" }, qe = { class: "dashboard-widget-card__header" }, Ve = { class: "dashboard-widget-card__header-content" }, Ye = {
617
+ key: 0,
618
+ class: "dashboard-widget-card__icon-wrapper"
619
+ }, Je = { class: "dashboard-widget-card__title" }, Qe = {
620
+ key: 0,
621
+ class: "dashboard-widget-card__actions"
622
+ }, Xe = {
623
+ key: 0,
624
+ class: "dashboard-widget-card__stats"
625
+ }, Ze = { class: "dashboard-widget-card__body" }, et = {
626
+ key: 1,
627
+ class: "dashboard-widget-card__footer"
628
+ }, jo = /* @__PURE__ */ R({
629
+ __name: "dashboard-widget-card",
630
+ props: {
631
+ header: {},
632
+ icon: {},
633
+ loading: { type: Boolean }
634
+ },
635
+ setup(t) {
636
+ const s = t;
637
+ return (a, h) => (v(), _("div", je, [
638
+ w("div", qe, [
639
+ O(a.$slots, "header", {}, () => [
640
+ w("div", Ve, [
641
+ t.icon ? (v(), _("div", Ye, [
642
+ we(Z(De), {
643
+ class: "dashboard-widget-card__icon",
644
+ icon: t.icon,
645
+ size: "l"
646
+ }, null, 8, ["icon"])
647
+ ])) : B("", !0),
648
+ w("div", Je, J(s.header), 1)
649
+ ])
650
+ ]),
651
+ a.$slots.actions ? (v(), _("div", Qe, [
652
+ O(a.$slots, "actions")
653
+ ])) : B("", !0)
654
+ ]),
655
+ a.$slots.stats ? (v(), _("div", Xe, [
656
+ O(a.$slots, "stats")
657
+ ])) : B("", !0),
658
+ ke((v(), _("div", Ze, [
659
+ O(a.$slots, "content")
660
+ ])), [
661
+ [Z(Le), t.loading]
662
+ ]),
663
+ a.$slots.footer ? (v(), _("div", et, [
664
+ O(a.$slots, "footer")
665
+ ])) : B("", !0)
666
+ ]));
667
+ }
668
+ }), tt = { class: "dashboard-stat-item" }, ot = { class: "dashboard-stat-item__label" }, qo = /* @__PURE__ */ R({
669
+ __name: "dashboard-stat-item",
670
+ props: {
671
+ value: {},
672
+ label: {},
673
+ variant: {}
674
+ },
675
+ setup(t) {
676
+ return (s, a) => (v(), _("div", tt, [
677
+ w("div", {
678
+ class: ce(["dashboard-stat-item__value", t.variant ? `dashboard-stat-item__value--${t.variant}` : ""])
679
+ }, J(t.value), 3),
680
+ w("div", ot, J(t.label), 1)
681
+ ]));
682
+ }
683
+ }), at = { class: "tw-divide-y tw-divide-[var(--neutrals-200)]" }, Vo = /* @__PURE__ */ R({
684
+ __name: "dashboard-feed-list",
685
+ setup(t) {
686
+ return (s, a) => (v(), _("div", at, [
687
+ O(s.$slots, "default")
688
+ ]));
689
+ }
690
+ }), st = { class: "tw-flex tw-items-center tw-gap-2.5 tw-min-w-0" }, rt = {
691
+ key: 0,
692
+ class: "tw-flex tw-items-center tw-gap-3 tw-flex-shrink-0 tw-ml-3"
693
+ }, Yo = /* @__PURE__ */ R({
694
+ __name: "dashboard-feed-row",
695
+ emits: ["click"],
696
+ setup(t) {
697
+ return (s, a) => (v(), _("div", {
698
+ class: "dashboard-feed-row",
699
+ onClick: a[0] || (a[0] = (h) => s.$emit("click"))
700
+ }, [
701
+ w("div", st, [
702
+ O(s.$slots, "default")
703
+ ]),
704
+ s.$slots.trailing ? (v(), _("div", rt, [
705
+ O(s.$slots, "trailing")
706
+ ])) : B("", !0)
707
+ ]));
708
+ }
709
+ });
710
+ export {
711
+ Ko as L,
712
+ Vo as _,
713
+ Yo as a,
714
+ qo as b,
715
+ jo as c,
716
+ No as d,
717
+ Ho as e,
718
+ Ro as f,
719
+ Uo as l,
720
+ Co as m,
721
+ Fo as s,
722
+ Bo as t,
723
+ Oe as u
724
+ };