@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
@@ -1,679 +0,0 @@
1
- import { shallowRef as ne, ref as W, watch as ae, nextTick as se, onUnmounted as le, openBlock as f, createElementBlock as y, createStaticVNode as de, defineComponent as E, inject as ce, computed as Z, onMounted as ue, createBlock as C, withCtx as pe, unref as j, Fragment as ee, renderList as te, normalizeStyle as me, normalizeClass as re, createElementVNode as k, createCommentVNode as M, resolveDynamicComponent as ve, mergeProps as fe, toDisplayString as F, renderSlot as A, createVNode as he, withDirectives as ge } from "vue";
2
- import { q as ye, r as _e, s as be, l as ke } from "./VcScheduler.vue_vue_type_style_index_0_lang-BSvjI-39.js";
3
- import { G as we } from "./vendor-gridstack-Beau2jQ7.js";
4
- import { M as $e, _ as xe } from "./VcAiAgentPanel.vue_vue_type_style_index_0_lang-DrGobYkj.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 R = "vc-dashboard-layout";
85
- function V(t, r) {
86
- const a = r ?? t.position;
87
- return {
88
- id: t.id,
89
- x: a?.x ?? 0,
90
- y: a?.y ?? 0,
91
- w: t.size.width,
92
- h: t.size.height,
93
- minW: 2,
94
- minH: 2
95
- };
96
- }
97
- function Y(t) {
98
- return {
99
- id: t.id ?? "",
100
- position: {
101
- x: t.x ?? 0,
102
- y: t.y ?? 0
103
- },
104
- size: {
105
- width: t.w ?? 1,
106
- height: t.h ?? 1
107
- }
108
- };
109
- }
110
- function Se(t) {
111
- const r = /* @__PURE__ */ new Map();
112
- for (const a of t)
113
- a.id && r.set(a.id, {
114
- x: a.x ?? 0,
115
- y: a.y ?? 0
116
- });
117
- return r;
118
- }
119
- function J() {
120
- try {
121
- const t = localStorage.getItem(R);
122
- if (!t) return null;
123
- const r = JSON.parse(t);
124
- if (Array.isArray(r))
125
- return Se(r);
126
- if (typeof r == "object" && r !== null) {
127
- const a = /* @__PURE__ */ new Map();
128
- for (const [c, u] of Object.entries(r))
129
- u && typeof u.x == "number" && typeof u.y == "number" && a.set(c, { x: u.x, y: u.y });
130
- return a;
131
- }
132
- return null;
133
- } catch (t) {
134
- return console.warn("[GridstackAdapter] Failed to load layout from storage:", t), null;
135
- }
136
- }
137
- function ie(t, r) {
138
- try {
139
- const a = t.map((c) => {
140
- const u = r.get(c.id);
141
- return {
142
- id: c.id,
143
- x: u?.x ?? c.position?.x ?? 0,
144
- y: u?.y ?? c.position?.y ?? 0,
145
- w: c.size.width,
146
- h: c.size.height
147
- };
148
- });
149
- localStorage.setItem(R, JSON.stringify(a));
150
- } catch (a) {
151
- console.warn("[GridstackAdapter] Failed to save layout to storage:", a);
152
- }
153
- }
154
- function ze() {
155
- try {
156
- localStorage.removeItem(R);
157
- } catch (t) {
158
- console.warn("[GridstackAdapter] Failed to clear layout storage:", t);
159
- }
160
- }
161
- function Le(t, r = 12) {
162
- const a = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Map(), u = (o, h, v, $) => {
163
- for (let w = h; w < h + $; w++) {
164
- const L = c.get(w) || [];
165
- for (let x = o; x < o + v; x++)
166
- if (L.includes(x)) return !1;
167
- }
168
- return !0;
169
- }, S = (o, h, v, $) => {
170
- for (let w = h; w < h + $; w++) {
171
- const L = c.get(w) || [];
172
- for (let x = o; x < o + v; x++)
173
- L.push(x);
174
- c.set(w, L);
175
- }
176
- }, s = (o, h) => {
177
- let v = 0;
178
- for (; ; ) {
179
- for (let $ = 0; $ <= r - o; $++)
180
- if (u($, v, o, h))
181
- return { x: $, y: v };
182
- if (v++, v > 100) break;
183
- }
184
- return { x: 0, y: v };
185
- };
186
- for (const o of t) {
187
- const h = s(o.size.width, o.size.height);
188
- a.set(o.id, h), S(h.x, h.y, o.size.width, o.size.height);
189
- }
190
- return a;
191
- }
192
- function Q(t, r) {
193
- if (r && r.size > 0) {
194
- const c = /* @__PURE__ */ new Map();
195
- for (const u of t) {
196
- const S = r.get(u.id), s = u.position, o = S ?? s ?? { x: 0, y: 0 };
197
- c.set(u.id, o);
198
- }
199
- return c;
200
- }
201
- if (t.every((c) => c.position !== void 0)) {
202
- const c = /* @__PURE__ */ new Map();
203
- for (const u of t)
204
- c.set(u.id, u.position);
205
- return c;
206
- }
207
- return Le(t);
208
- }
209
- const We = {
210
- column: 12,
211
- cellHeight: 80,
212
- margin: "10px",
213
- float: !1,
214
- animate: !0,
215
- // Disable responsive column changes - always use 12 columns
216
- columnOpts: {
217
- breakpoints: [{ w: 0, c: 12 }]
218
- // Always 12 columns regardless of width
219
- },
220
- draggable: {
221
- handle: ".grid-stack-item-content"
222
- },
223
- resizable: {
224
- handles: "se"
225
- // Only bottom-right corner
226
- }
227
- };
228
- function De(t, r = {}) {
229
- const { gridOptions: a = {}, resizable: c = !1, autoSave: u = !0, onLayoutChange: S } = r, s = ne(null), o = W(/* @__PURE__ */ new Map()), h = W(!1), v = W(!1), $ = {
230
- ...We,
231
- ...a,
232
- disableResize: !c
233
- }, w = (i) => {
234
- if (s.value) {
235
- console.warn("[useGridstack] Grid already initialized");
236
- return;
237
- }
238
- const l = J();
239
- o.value = Q(t.value, l), s.value = we.init($, i), s.value.on("change", L), s.value.on("added", x), s.value.on("removed", H);
240
- const p = t.value.map((_) => {
241
- const g = o.value.get(_.id);
242
- return V(_, g);
243
- });
244
- s.value.load(p), h.value = !0;
245
- }, L = (i, l) => {
246
- if (!v.value) {
247
- for (const p of l) {
248
- const { id: _, position: g } = Y(p);
249
- _ && o.value.set(_, g);
250
- }
251
- o.value = new Map(o.value), S?.(o.value), u && z();
252
- }
253
- }, x = (i, l) => {
254
- for (const p of l) {
255
- const { id: _, position: g } = Y(p);
256
- _ && !o.value.has(_) && o.value.set(_, g);
257
- }
258
- o.value = new Map(o.value);
259
- }, H = (i, l) => {
260
- for (const p of l)
261
- p.id && o.value.delete(p.id);
262
- o.value = new Map(o.value);
263
- }, I = () => {
264
- s.value && (s.value.off("change"), s.value.off("added"), s.value.off("removed"), s.value.destroy(!1), s.value = null, h.value = !1);
265
- }, O = (i) => {
266
- if (!s.value) return;
267
- const l = o.value.get(i.id) ?? i.position, p = V(i, l), _ = document.querySelector(`[gs-id="${i.id}"]`);
268
- _ && s.value.makeWidget(_, p);
269
- }, T = (i) => {
270
- if (!s.value) return;
271
- const l = document.querySelector(`[gs-id="${i}"]`);
272
- l && s.value.removeWidget(l, !1), o.value.delete(i);
273
- }, K = (i, l) => {
274
- if (!s.value) return;
275
- const p = document.querySelector(`[gs-id="${i}"]`);
276
- p && (v.value = !0, s.value.update(p, { x: l.x, y: l.y }), o.value.set(i, l), o.value = new Map(o.value), v.value = !1);
277
- }, U = (i, l) => {
278
- if (!s.value) return;
279
- const p = document.querySelector(`[gs-id="${i}"]`);
280
- p && (v.value = !0, s.value.update(p, { w: l.width, h: l.height }), v.value = !1);
281
- }, z = () => {
282
- ie(t.value, o.value);
283
- }, G = () => {
284
- const i = J();
285
- i && (o.value = Q(t.value, i), D());
286
- }, B = () => {
287
- o.value = /* @__PURE__ */ new Map();
288
- for (const i of t.value)
289
- i.position && o.value.set(i.id, { ...i.position });
290
- D(), z();
291
- }, D = () => {
292
- if (s.value) {
293
- v.value = !0, s.value.batchUpdate();
294
- for (const i of t.value) {
295
- const l = o.value.get(i.id);
296
- if (l) {
297
- const p = document.querySelector(`[gs-id="${i.id}"]`);
298
- p && s.value.update(p, {
299
- x: l.x,
300
- y: l.y
301
- });
302
- }
303
- }
304
- s.value.batchUpdate(!1), v.value = !1;
305
- }
306
- }, q = (i) => {
307
- if (!s.value) {
308
- i();
309
- return;
310
- }
311
- v.value = !0, s.value.batchUpdate(), i(), s.value.batchUpdate(!1), v.value = !1;
312
- };
313
- return ae(
314
- t,
315
- async (i, l) => {
316
- if (!s.value || !h.value) return;
317
- await se();
318
- const p = i.filter((g) => !l?.some((N) => N.id === g.id)), _ = l?.filter((g) => !i.some((N) => N.id === g.id)).map((g) => g.id) ?? [];
319
- for (const g of _)
320
- T(g);
321
- for (const g of p)
322
- O(g);
323
- },
324
- { deep: !1 }
325
- ), le(() => {
326
- I();
327
- }), {
328
- grid: s,
329
- layout: o,
330
- isInitialized: h,
331
- initGrid: w,
332
- destroyGrid: I,
333
- addWidget: O,
334
- removeWidget: T,
335
- updateWidgetPosition: K,
336
- updateWidgetSize: U,
337
- saveLayout: z,
338
- loadLayout: G,
339
- resetToDefaults: B,
340
- batchUpdate: q
341
- };
342
- }
343
- const Ae = {}, Ge = {
344
- class: "dashboard-widget-skeleton",
345
- "aria-hidden": "true"
346
- };
347
- function Pe(t, r) {
348
- return f(), y("div", Ge, [...r[0] || (r[0] = [
349
- de('<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)
350
- ])]);
351
- }
352
- const Me = /* @__PURE__ */ ye(Ae, [["render", Pe]]), Ee = ["aria-label"], Ie = ["aria-label"], Oe = ["gs-id", "gs-x", "gs-y", "gs-w", "gs-h", "aria-label", "onKeydown"], Te = { class: "grid-stack-item-content" }, Be = {
353
- key: 0,
354
- class: "vc-gridstack-dashboard__drag-handle",
355
- "aria-hidden": "true"
356
- }, Ne = {
357
- class: "vc-gridstack-dashboard__live-region",
358
- role: "status",
359
- "aria-live": "polite",
360
- "aria-atomic": "true"
361
- }, oe = 2, Re = /* @__PURE__ */ E({
362
- __name: "GridstackDashboard",
363
- props: {
364
- showDragHandles: { type: Boolean, default: !1 },
365
- resizable: { type: Boolean, default: !1 },
366
- ariaLabel: { default: "Dashboard widgets. Drag a widget, or focus one and press Enter to rearrange with the arrow keys." }
367
- },
368
- setup(t, { expose: r }) {
369
- const a = [
370
- { x: 0, y: 0, w: 6, h: 6 },
371
- { x: 6, y: 0, w: 6, h: 6 },
372
- { x: 0, y: 6, w: 6, h: 6 },
373
- { x: 6, y: 6, w: 6, h: 6 }
374
- ];
375
- function c() {
376
- if (typeof window > "u") return null;
377
- try {
378
- const e = window.localStorage.getItem(R);
379
- if (!e) return null;
380
- const m = JSON.parse(e);
381
- if (!Array.isArray(m)) return null;
382
- const n = m.filter(
383
- (d) => !!d && typeof d == "object" && typeof d.w == "number" && typeof d.h == "number" && typeof d.x == "number" && typeof d.y == "number"
384
- ).map((d) => ({ x: d.x, y: d.y, w: d.w, h: d.h }));
385
- return n.length > 0 ? n : null;
386
- } catch {
387
- return null;
388
- }
389
- }
390
- const u = t, S = W(null), s = W(""), o = ce($e, W(!0)), h = Z(() => o.value ? [] : c() ?? a), v = (e) => ({
391
- gridColumn: `${e.x + 1} / span ${e.w}`,
392
- gridRow: `${e.y + 1} / span ${e.h}`
393
- }), $ = _e(), w = Z(() => $.getWidgets()), { layout: L, isInitialized: x, initGrid: H, saveLayout: I, resetToDefaults: O, updateWidgetPosition: T, updateWidgetSize: K } = De(w, {
394
- resizable: u.resizable,
395
- autoSave: !0,
396
- gridOptions: {
397
- draggable: {
398
- handle: u.showDragHandles ? ".vc-gridstack-dashboard__drag-handle" : ".grid-stack-item-content"
399
- }
400
- },
401
- onLayoutChange: (e) => {
402
- for (const [m, n] of e)
403
- $.updateWidgetPosition(m, n);
404
- P("Widget positions updated");
405
- }
406
- }), U = (e) => L.value.get(e), z = W(null), G = W(null), B = (e) => L.value.get(e.id) ?? e.position ?? { x: 0, y: 0 }, D = (e) => e.name || e.id, q = (e) => {
407
- z.value = e.id, G.value = { ...B(e) }, P(
408
- `${D(e)} picked up. Use arrow keys to move, Shift and arrow keys to resize, Enter to drop, Escape to cancel.`
409
- );
410
- }, i = (e) => {
411
- z.value = null, G.value = null, I();
412
- const { x: m, y: n } = B(e);
413
- P(`${D(e)} dropped at column ${m + 1}, row ${n + 1}.`);
414
- }, l = (e) => {
415
- G.value && T(e.id, G.value), z.value = null, G.value = null, P(`Move cancelled. ${D(e)} returned to its original position.`);
416
- }, p = (e, m, n) => {
417
- const d = B(e), b = { x: d.x + m, y: d.y + n };
418
- b.x < 0 || b.y < 0 || (T(e.id, b), P(`${D(e)} moved to column ${b.x + 1}, row ${b.y + 1}.`));
419
- }, _ = (e, m, n) => {
420
- const d = Math.max(oe, e.size.width + m), b = Math.max(oe, e.size.height + n);
421
- d === e.size.width && b === e.size.height || (K(e.id, { width: d, height: b }), P(`${D(e)} resized to ${d} by ${b} cells.`));
422
- }, g = (e, m) => {
423
- const n = z.value === m.id;
424
- if (e.key === "Enter" || e.key === " ") {
425
- e.preventDefault(), n ? i(m) : q(m);
426
- return;
427
- }
428
- if (e.key === "Escape" && n) {
429
- e.preventDefault(), l(m);
430
- return;
431
- }
432
- const d = e.key === "ArrowLeft" ? -1 : e.key === "ArrowRight" ? 1 : 0, b = e.key === "ArrowUp" ? -1 : e.key === "ArrowDown" ? 1 : 0;
433
- d === 0 && b === 0 || !n || (e.preventDefault(), e.shiftKey ? u.resizable && _(m, d, b) : p(m, d, b));
434
- }, N = (e, m) => {
435
- const n = e.name || e.id, d = z.value === e.id ? "Picked up. Arrow keys move, Enter drops, Escape cancels." : "Press Enter to pick up and rearrange with the arrow keys.";
436
- return `${n}, widget ${m + 1} of ${w.value.length}. ${d}`;
437
- }, P = (e) => {
438
- s.value = e, setTimeout(() => {
439
- s.value = "";
440
- }, 1e3);
441
- }, X = async () => {
442
- await se(), S.value && !x.value && H(S.value);
443
- };
444
- return ue(X), ae(o, (e) => {
445
- e && X();
446
- }), r({
447
- rearrangeWidgets: () => {
448
- O();
449
- },
450
- recalculateLayout: () => {
451
- },
452
- saveLayout: I,
453
- useBuiltInPositions: () => (O(), !0)
454
- }), (e, m) => (f(), C(be, {
455
- "no-padding": "",
456
- class: "vc-gridstack-dashboard"
457
- }, {
458
- default: pe(() => [
459
- j(o) ? (f(), y("div", {
460
- key: 1,
461
- ref_key: "gridRef",
462
- ref: S,
463
- class: "grid-stack vc-gridstack-dashboard__grid",
464
- role: "list",
465
- "aria-label": t.ariaLabel
466
- }, [
467
- (f(!0), y(ee, null, te(w.value, (n, d) => (f(), y("div", {
468
- key: n.id,
469
- class: re(["grid-stack-item", { "vc-gridstack-dashboard__item--grabbed": z.value === n.id }]),
470
- "gs-id": n.id,
471
- "gs-x": U(n.id)?.x ?? n.position?.x ?? 0,
472
- "gs-y": U(n.id)?.y ?? n.position?.y ?? 0,
473
- "gs-w": n.size.width,
474
- "gs-h": n.size.height,
475
- "gs-min-w": 2,
476
- "gs-min-h": 2,
477
- role: "listitem",
478
- tabindex: "0",
479
- "aria-label": N(n, d),
480
- onKeydown: (b) => g(b, n)
481
- }, [
482
- k("div", Te, [
483
- t.showDragHandles ? (f(), y("div", Be, [...m[0] || (m[0] = [
484
- k("svg", {
485
- width: "16",
486
- height: "16",
487
- viewBox: "0 0 16 16",
488
- fill: "currentColor"
489
- }, [
490
- k("circle", {
491
- cx: "5",
492
- cy: "3",
493
- r: "1.5"
494
- }),
495
- k("circle", {
496
- cx: "11",
497
- cy: "3",
498
- r: "1.5"
499
- }),
500
- k("circle", {
501
- cx: "5",
502
- cy: "8",
503
- r: "1.5"
504
- }),
505
- k("circle", {
506
- cx: "11",
507
- cy: "8",
508
- r: "1.5"
509
- }),
510
- k("circle", {
511
- cx: "5",
512
- cy: "13",
513
- r: "1.5"
514
- }),
515
- k("circle", {
516
- cx: "11",
517
- cy: "13",
518
- r: "1.5"
519
- })
520
- ], -1)
521
- ])])) : M("", !0),
522
- (f(), C(ve(n.component), fe({ ref_for: !0 }, n.props || {}, { class: "vc-gridstack-dashboard__widget-content" }), null, 16))
523
- ])
524
- ], 42, Oe))), 128))
525
- ], 8, Ie)) : (f(), y("div", {
526
- key: 0,
527
- class: "vc-gridstack-dashboard__skeleton-grid",
528
- role: "status",
529
- "aria-busy": "true",
530
- "aria-label": t.ariaLabel
531
- }, [
532
- (f(!0), y(ee, null, te(h.value, (n, d) => (f(), C(Me, {
533
- key: `skeleton-${d}`,
534
- class: "vc-gridstack-dashboard__skeleton-item",
535
- style: me(v(n))
536
- }, null, 8, ["style"]))), 128))
537
- ], 8, Ee)),
538
- k("div", Ne, F(s.value), 1)
539
- ]),
540
- _: 1
541
- }));
542
- }
543
- }), Eo = /* @__PURE__ */ E({
544
- __name: "DraggableDashboard",
545
- props: {
546
- showDragHandles: { type: Boolean, default: !1 },
547
- resizable: { type: Boolean, default: !1 },
548
- ariaLabel: { default: "Dashboard widgets. Drag widgets to rearrange." }
549
- },
550
- setup(t, { expose: r }) {
551
- const a = W(null);
552
- return r({
553
- rearrangeWidgets: () => {
554
- a.value?.rearrangeWidgets?.();
555
- },
556
- recalculateLayout: () => {
557
- a.value?.recalculateLayout?.();
558
- },
559
- saveLayout: () => {
560
- a.value?.saveLayout?.();
561
- },
562
- useBuiltInPositions: () => a.value?.useBuiltInPositions?.() ?? !1
563
- }), (o, h) => (f(), C(Re, {
564
- ref_key: "dashboardRef",
565
- ref: a,
566
- "show-drag-handles": t.showDragHandles,
567
- resizable: t.resizable,
568
- "aria-label": t.ariaLabel
569
- }, null, 8, ["show-drag-handles", "resizable", "aria-label"]));
570
- }
571
- }), Io = V, Oo = Y, To = J, Bo = ie, No = Q, Ro = ze, Uo = R, Ue = { class: "dashboard-widget-card" }, Ce = { class: "dashboard-widget-card__header" }, Fe = { class: "dashboard-widget-card__header-content" }, He = {
572
- key: 0,
573
- class: "dashboard-widget-card__icon-wrapper"
574
- }, Ke = { class: "dashboard-widget-card__title" }, qe = {
575
- key: 0,
576
- class: "dashboard-widget-card__actions"
577
- }, je = {
578
- key: 0,
579
- class: "dashboard-widget-card__stats"
580
- }, Ve = { class: "dashboard-widget-card__body" }, Ye = {
581
- key: 1,
582
- class: "dashboard-widget-card__footer"
583
- }, Co = /* @__PURE__ */ E({
584
- __name: "dashboard-widget-card",
585
- props: {
586
- header: {},
587
- icon: {},
588
- loading: { type: Boolean }
589
- },
590
- setup(t) {
591
- const r = t;
592
- return (a, c) => (f(), y("div", Ue, [
593
- k("div", Ce, [
594
- A(a.$slots, "header", {}, () => [
595
- k("div", Fe, [
596
- t.icon ? (f(), y("div", He, [
597
- he(j(xe), {
598
- class: "dashboard-widget-card__icon",
599
- icon: t.icon,
600
- size: "l"
601
- }, null, 8, ["icon"])
602
- ])) : M("", !0),
603
- k("div", Ke, F(r.header), 1)
604
- ])
605
- ]),
606
- a.$slots.actions ? (f(), y("div", qe, [
607
- A(a.$slots, "actions")
608
- ])) : M("", !0)
609
- ]),
610
- a.$slots.stats ? (f(), y("div", je, [
611
- A(a.$slots, "stats")
612
- ])) : M("", !0),
613
- ge((f(), y("div", Ve, [
614
- A(a.$slots, "content")
615
- ])), [
616
- [j(ke), t.loading]
617
- ]),
618
- a.$slots.footer ? (f(), y("div", Ye, [
619
- A(a.$slots, "footer")
620
- ])) : M("", !0)
621
- ]));
622
- }
623
- }), Je = { class: "dashboard-stat-item" }, Qe = { class: "dashboard-stat-item__label" }, Fo = /* @__PURE__ */ E({
624
- __name: "dashboard-stat-item",
625
- props: {
626
- value: {},
627
- label: {},
628
- variant: {}
629
- },
630
- setup(t) {
631
- return (r, a) => (f(), y("div", Je, [
632
- k("div", {
633
- class: re(["dashboard-stat-item__value", t.variant ? `dashboard-stat-item__value--${t.variant}` : ""])
634
- }, F(t.value), 3),
635
- k("div", Qe, F(t.label), 1)
636
- ]));
637
- }
638
- }), Xe = { class: "tw-divide-y tw-divide-[var(--neutrals-200)]" }, Ho = /* @__PURE__ */ E({
639
- __name: "dashboard-feed-list",
640
- setup(t) {
641
- return (r, a) => (f(), y("div", Xe, [
642
- A(r.$slots, "default")
643
- ]));
644
- }
645
- }), Ze = { class: "tw-flex tw-items-center tw-gap-2.5 tw-min-w-0" }, et = {
646
- key: 0,
647
- class: "tw-flex tw-items-center tw-gap-3 tw-flex-shrink-0 tw-ml-3"
648
- }, Ko = /* @__PURE__ */ E({
649
- __name: "dashboard-feed-row",
650
- emits: ["click"],
651
- setup(t) {
652
- return (r, a) => (f(), y("div", {
653
- class: "dashboard-feed-row",
654
- onClick: a[0] || (a[0] = (c) => r.$emit("click"))
655
- }, [
656
- k("div", Ze, [
657
- A(r.$slots, "default")
658
- ]),
659
- r.$slots.trailing ? (f(), y("div", et, [
660
- A(r.$slots, "trailing")
661
- ])) : M("", !0)
662
- ]));
663
- }
664
- });
665
- export {
666
- Uo as L,
667
- Ho as _,
668
- Ko as a,
669
- Fo as b,
670
- Co as c,
671
- Eo as d,
672
- Ro as e,
673
- Oo as f,
674
- To as l,
675
- No as m,
676
- Bo as s,
677
- Io as t,
678
- De as u
679
- };