@object-ui/plugin-dashboard 3.1.5 → 3.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +28 -0
- package/README.md +21 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1162 -939
- package/dist/index.umd.cjs +4 -4
- package/dist/packages/plugin-dashboard/src/DashboardConfigPanel.d.ts.map +1 -0
- package/dist/packages/plugin-dashboard/src/DashboardConfigPanel.stories.d.ts.map +1 -0
- package/dist/packages/plugin-dashboard/src/DashboardGridLayout.d.ts.map +1 -0
- package/dist/{src → packages/plugin-dashboard/src}/DashboardRenderer.d.ts +5 -0
- package/dist/packages/plugin-dashboard/src/DashboardRenderer.d.ts.map +1 -0
- package/dist/packages/plugin-dashboard/src/DashboardRenderer.stories.d.ts.map +1 -0
- package/dist/packages/plugin-dashboard/src/DashboardWithConfig.d.ts.map +1 -0
- package/dist/{src → packages/plugin-dashboard/src}/MetricCard.d.ts +4 -0
- package/dist/packages/plugin-dashboard/src/MetricCard.d.ts.map +1 -0
- package/dist/packages/plugin-dashboard/src/MetricWidget.d.ts +31 -0
- package/dist/packages/plugin-dashboard/src/MetricWidget.d.ts.map +1 -0
- package/dist/packages/plugin-dashboard/src/ObjectDataTable.d.ts.map +1 -0
- package/dist/packages/plugin-dashboard/src/ObjectMetricWidget.d.ts +59 -0
- package/dist/packages/plugin-dashboard/src/ObjectMetricWidget.d.ts.map +1 -0
- package/dist/packages/plugin-dashboard/src/ObjectPivotTable.d.ts.map +1 -0
- package/dist/packages/plugin-dashboard/src/PivotTable.d.ts.map +1 -0
- package/dist/packages/plugin-dashboard/src/WidgetConfigPanel.d.ts.map +1 -0
- package/dist/{src → packages/plugin-dashboard/src}/index.d.ts +4 -2
- package/dist/packages/plugin-dashboard/src/index.d.ts.map +1 -0
- package/dist/packages/plugin-dashboard/src/utils.d.ts.map +1 -0
- package/package.json +44 -11
- package/.turbo/turbo-build.log +0 -34
- package/dist/src/DashboardConfigPanel.d.ts.map +0 -1
- package/dist/src/DashboardConfigPanel.stories.d.ts.map +0 -1
- package/dist/src/DashboardGridLayout.d.ts.map +0 -1
- package/dist/src/DashboardRenderer.d.ts.map +0 -1
- package/dist/src/DashboardRenderer.stories.d.ts.map +0 -1
- package/dist/src/DashboardWithConfig.d.ts.map +0 -1
- package/dist/src/MetricCard.d.ts.map +0 -1
- package/dist/src/MetricWidget.d.ts +0 -24
- package/dist/src/MetricWidget.d.ts.map +0 -1
- package/dist/src/ObjectDataTable.d.ts.map +0 -1
- package/dist/src/ObjectPivotTable.d.ts.map +0 -1
- package/dist/src/PivotTable.d.ts.map +0 -1
- package/dist/src/WidgetConfigPanel.d.ts.map +0 -1
- package/dist/src/index.d.ts.map +0 -1
- package/dist/src/utils.d.ts.map +0 -1
- package/src/DashboardConfigPanel.stories.tsx +0 -164
- package/src/DashboardConfigPanel.tsx +0 -158
- package/src/DashboardGridLayout.tsx +0 -367
- package/src/DashboardRenderer.stories.tsx +0 -173
- package/src/DashboardRenderer.tsx +0 -445
- package/src/DashboardWithConfig.tsx +0 -211
- package/src/MetricCard.tsx +0 -82
- package/src/MetricWidget.tsx +0 -76
- package/src/ObjectDataTable.tsx +0 -226
- package/src/ObjectPivotTable.tsx +0 -160
- package/src/PivotTable.tsx +0 -262
- package/src/WidgetConfigPanel.tsx +0 -540
- package/src/__tests__/DashboardConfigPanel.test.tsx +0 -206
- package/src/__tests__/DashboardGridLayout.test.tsx +0 -199
- package/src/__tests__/DashboardRenderer.autoRefresh.test.tsx +0 -124
- package/src/__tests__/DashboardRenderer.designMode.test.tsx +0 -386
- package/src/__tests__/DashboardRenderer.header.test.tsx +0 -114
- package/src/__tests__/DashboardRenderer.mobile.test.tsx +0 -214
- package/src/__tests__/DashboardRenderer.widgetData.test.tsx +0 -1283
- package/src/__tests__/DashboardWithConfig.test.tsx +0 -276
- package/src/__tests__/MetricCard.test.tsx +0 -82
- package/src/__tests__/ObjectDataTable.test.tsx +0 -211
- package/src/__tests__/ObjectPivotTable.test.tsx +0 -192
- package/src/__tests__/PivotTable.test.tsx +0 -162
- package/src/__tests__/WidgetConfigPanel.test.tsx +0 -492
- package/src/__tests__/ensureWidgetIds.test.tsx +0 -103
- package/src/index.tsx +0 -214
- package/src/utils.ts +0 -17
- package/tsconfig.json +0 -19
- package/vite.config.ts +0 -63
- package/vitest.config.ts +0 -9
- package/vitest.setup.tsx +0 -18
- /package/dist/{src → packages/plugin-dashboard/src}/DashboardConfigPanel.d.ts +0 -0
- /package/dist/{src → packages/plugin-dashboard/src}/DashboardConfigPanel.stories.d.ts +0 -0
- /package/dist/{src → packages/plugin-dashboard/src}/DashboardGridLayout.d.ts +0 -0
- /package/dist/{src → packages/plugin-dashboard/src}/DashboardRenderer.stories.d.ts +0 -0
- /package/dist/{src → packages/plugin-dashboard/src}/DashboardWithConfig.d.ts +0 -0
- /package/dist/{src → packages/plugin-dashboard/src}/ObjectDataTable.d.ts +0 -0
- /package/dist/{src → packages/plugin-dashboard/src}/ObjectPivotTable.d.ts +0 -0
- /package/dist/{src → packages/plugin-dashboard/src}/PivotTable.d.ts +0 -0
- /package/dist/{src → packages/plugin-dashboard/src}/WidgetConfigPanel.d.ts +0 -0
- /package/dist/{src → packages/plugin-dashboard/src}/utils.d.ts +0 -0
package/dist/index.js
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import { ComponentRegistry as e, extractRecords as t } from "@object-ui/core";
|
|
2
|
-
import { SchemaRenderer as n, SchemaRendererContext as r,
|
|
3
|
-
import { Button as
|
|
4
|
-
import * as
|
|
5
|
-
import
|
|
6
|
-
import * as
|
|
7
|
-
import { ArrowDownIcon as
|
|
2
|
+
import { SchemaRenderer as n, SchemaRendererContext as r, useActionEngine as i, useDataScope as a, useDnd as o, useHasDndProvider as s } from "@object-ui/react";
|
|
3
|
+
import { Button as c, Card as l, CardContent as u, CardHeader as d, CardTitle as f, Combobox as p, ConfigPanelRenderer as m, ConfigRow as h, Skeleton as g, cn as _, useConfigDraft as v } from "@object-ui/components";
|
|
4
|
+
import * as y from "react";
|
|
5
|
+
import b, { forwardRef as x, useCallback as S, useContext as C, useEffect as w, useMemo as T, useRef as E, useState as D } from "react";
|
|
6
|
+
import * as O from "lucide-react";
|
|
7
|
+
import { AlertCircle as k, ArrowDownIcon as A, ArrowUpIcon as j, Edit as M, GripVertical as N, Loader2 as P, MinusIcon as F, RefreshCw as I, Save as L, Settings as R, X as z } from "lucide-react";
|
|
8
8
|
import ee from "clsx";
|
|
9
9
|
//#region \0rolldown/runtime.js
|
|
10
|
-
var
|
|
10
|
+
var B = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), V = /* @__PURE__ */ ((e) => typeof require < "u" ? require : typeof Proxy < "u" ? new Proxy(e, { get: (e, t) => (typeof require < "u" ? require : e)[t] }) : e)(function(e) {
|
|
11
11
|
if (typeof require < "u") return require.apply(this, arguments);
|
|
12
12
|
throw Error("Calling `require` for \"" + e + "\" in an environment that doesn't expose the `require` function. See https://rolldown.rs/in-depth/bundling-cjs#require-external-modules for more details.");
|
|
13
13
|
});
|
|
14
14
|
//#endregion
|
|
15
15
|
//#region src/utils.ts
|
|
16
|
-
function
|
|
16
|
+
function H(e) {
|
|
17
17
|
return typeof e == "object" && !!e && !Array.isArray(e) && e.provider === "object";
|
|
18
18
|
}
|
|
19
19
|
//#endregion
|
|
20
|
-
//#region ../../node_modules/.pnpm/react@19.2.
|
|
21
|
-
var
|
|
20
|
+
//#region ../../node_modules/.pnpm/react@19.2.5/node_modules/react/cjs/react-jsx-runtime.production.js
|
|
21
|
+
var te = /* @__PURE__ */ B(((e) => {
|
|
22
22
|
var t = Symbol.for("react.transitional.element"), n = Symbol.for("react.fragment");
|
|
23
23
|
function r(e, n, r) {
|
|
24
24
|
var i = null;
|
|
@@ -33,7 +33,7 @@ var B = /* @__PURE__ */ L(((e) => {
|
|
|
33
33
|
};
|
|
34
34
|
}
|
|
35
35
|
e.Fragment = n, e.jsx = r, e.jsxs = r;
|
|
36
|
-
})),
|
|
36
|
+
})), ne = /* @__PURE__ */ B(((e) => {
|
|
37
37
|
process.env.NODE_ENV !== "production" && (function() {
|
|
38
38
|
function t(e) {
|
|
39
39
|
if (e == null) return null;
|
|
@@ -164,7 +164,7 @@ var B = /* @__PURE__ */ L(((e) => {
|
|
|
164
164
|
var m = Object.keys(n).filter(function(e) {
|
|
165
165
|
return e !== "key";
|
|
166
166
|
});
|
|
167
|
-
o = 0 < m.length ? "{key: someKey, " + m.join(": ..., ") + ": ...}" : "{key: someKey}",
|
|
167
|
+
o = 0 < m.length ? "{key: someKey, " + m.join(": ..., ") + ": ...}" : "{key: someKey}", L[p + o] || (m = 0 < m.length ? "{" + m.join(": ..., ") + ": ...}" : "{}", console.error("A props object containing a \"key\" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />", o, p, m, p), L[p + o] = !0);
|
|
168
168
|
}
|
|
169
169
|
if (p = null, i !== void 0 && (r(i), p = "" + i), s(n) && (r(n.key), p = "" + n.key), "key" in n) for (var h in i = {}, n) h !== "key" && (i[h] = n[h]);
|
|
170
170
|
else i = n;
|
|
@@ -176,13 +176,13 @@ var B = /* @__PURE__ */ L(((e) => {
|
|
|
176
176
|
function p(e) {
|
|
177
177
|
return typeof e == "object" && !!e && e.$$typeof === h;
|
|
178
178
|
}
|
|
179
|
-
var m =
|
|
179
|
+
var m = V("react"), h = Symbol.for("react.transitional.element"), g = Symbol.for("react.portal"), _ = Symbol.for("react.fragment"), v = Symbol.for("react.strict_mode"), y = Symbol.for("react.profiler"), b = Symbol.for("react.consumer"), x = Symbol.for("react.context"), S = Symbol.for("react.forward_ref"), C = Symbol.for("react.suspense"), w = Symbol.for("react.suspense_list"), T = Symbol.for("react.memo"), E = Symbol.for("react.lazy"), D = Symbol.for("react.activity"), O = Symbol.for("react.client.reference"), k = m.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, A = Object.prototype.hasOwnProperty, j = Array.isArray, M = console.createTask ? console.createTask : function() {
|
|
180
180
|
return null;
|
|
181
181
|
};
|
|
182
182
|
m = { react_stack_bottom_frame: function(e) {
|
|
183
183
|
return e();
|
|
184
184
|
} };
|
|
185
|
-
var N, P = {}, F = m.react_stack_bottom_frame.bind(m, o)(), I = M(i(o)),
|
|
185
|
+
var N, P = {}, F = m.react_stack_bottom_frame.bind(m, o)(), I = M(i(o)), L = {};
|
|
186
186
|
e.Fragment = _, e.jsx = function(e, t, n) {
|
|
187
187
|
var r = 1e4 > k.recentlyCreatedOwnerStacks++;
|
|
188
188
|
return d(e, t, n, !1, r ? Error("react-stack-top-frame") : F, r ? M(i(e)) : I);
|
|
@@ -191,113 +191,182 @@ var B = /* @__PURE__ */ L(((e) => {
|
|
|
191
191
|
return d(e, t, n, !0, r ? Error("react-stack-top-frame") : F, r ? M(i(e)) : I);
|
|
192
192
|
};
|
|
193
193
|
})();
|
|
194
|
-
})),
|
|
195
|
-
process.env.NODE_ENV === "production" ? t.exports =
|
|
194
|
+
})), U = (/* @__PURE__ */ B(((e, t) => {
|
|
195
|
+
process.env.NODE_ENV === "production" ? t.exports = te() : t.exports = ne();
|
|
196
196
|
})))();
|
|
197
|
-
function
|
|
197
|
+
function re(e) {
|
|
198
|
+
if (!e) return null;
|
|
199
|
+
let t = O;
|
|
200
|
+
return t[e] ? t[e] : t[e.split("-").map((e) => e.charAt(0).toUpperCase() + e.slice(1)).join("")] ?? null;
|
|
201
|
+
}
|
|
202
|
+
function ie(e) {
|
|
198
203
|
if (e != null) return typeof e == "string" ? e : e.defaultValue || e.key;
|
|
199
204
|
}
|
|
200
|
-
var
|
|
205
|
+
var ae = [
|
|
201
206
|
"hsl(var(--chart-1))",
|
|
202
207
|
"hsl(var(--chart-2))",
|
|
203
208
|
"hsl(var(--chart-3))",
|
|
204
209
|
"hsl(var(--chart-4))",
|
|
205
210
|
"hsl(var(--chart-5))"
|
|
206
|
-
],
|
|
207
|
-
let
|
|
208
|
-
|
|
209
|
-
let
|
|
211
|
+
], W = x(({ schema: e, className: t, dataSource: r, onRefresh: a, recordCount: o, userActions: s, designMode: p, selectedWidgetId: m, onWidgetClick: h, modalHandler: g, scriptHandlers: v, ...y }, b) => {
|
|
212
|
+
let x = (() => {
|
|
213
|
+
if (e.columns != null) return e.columns;
|
|
214
|
+
let t = e.widgets ?? [], n = 0;
|
|
215
|
+
for (let e of t) {
|
|
216
|
+
let t = (e.layout?.x ?? 0) + (e.layout?.w ?? 0);
|
|
217
|
+
t > n && (n = t), (e.layout?.w ?? 0) > n && (n = e.layout.w);
|
|
218
|
+
}
|
|
219
|
+
return n > 4 ? 12 : 4;
|
|
220
|
+
})(), C = x, O = e.gap || 4, [k, A] = D(!1), [j, M] = D(!1), N = E(null), { executeAction: P, engine: F } = i({ actions: T(() => (e.header?.actions ?? []).map((e) => ({
|
|
221
|
+
name: e.actionUrl || e.label,
|
|
222
|
+
type: e.actionType || "url",
|
|
223
|
+
target: e.actionUrl,
|
|
224
|
+
label: e.label
|
|
225
|
+
})), [e.header?.actions]) });
|
|
226
|
+
w(() => {
|
|
227
|
+
let e = F.getRunner();
|
|
228
|
+
if (g && e.setModalHandler(g), v) for (let [t, n] of Object.entries(v)) e.registerScript(t, n);
|
|
229
|
+
}, [
|
|
230
|
+
F,
|
|
231
|
+
g,
|
|
232
|
+
v
|
|
233
|
+
]), w(() => {
|
|
234
|
+
let e = () => M(window.innerWidth < 768);
|
|
210
235
|
return e(), window.addEventListener("resize", e), () => window.removeEventListener("resize", e);
|
|
211
236
|
}, []);
|
|
212
|
-
let
|
|
213
|
-
|
|
214
|
-
}, [
|
|
215
|
-
|
|
216
|
-
if (!(!e.refreshInterval || e.refreshInterval <= 0 || !
|
|
217
|
-
|
|
237
|
+
let L = S(() => {
|
|
238
|
+
a && (A(!0), a(), setTimeout(() => A(!1), 600));
|
|
239
|
+
}, [a]);
|
|
240
|
+
w(() => {
|
|
241
|
+
if (!(!e.refreshInterval || e.refreshInterval <= 0 || !a)) return N.current = setInterval(L, e.refreshInterval * 1e3), () => {
|
|
242
|
+
N.current && clearInterval(N.current);
|
|
218
243
|
};
|
|
219
244
|
}, [
|
|
220
245
|
e.refreshInterval,
|
|
221
|
-
|
|
222
|
-
|
|
246
|
+
a,
|
|
247
|
+
L
|
|
223
248
|
]);
|
|
224
|
-
let
|
|
225
|
-
!
|
|
226
|
-
}, [
|
|
227
|
-
if (!
|
|
249
|
+
let R = S((e, t) => {
|
|
250
|
+
!p || !h || !t || (e.stopPropagation(), h(t));
|
|
251
|
+
}, [p, h]), z = S((t, n, r) => {
|
|
252
|
+
if (!p || !h) return;
|
|
228
253
|
let i = e.widgets || [];
|
|
229
|
-
if (t.key === "Enter" || t.key === " ") t.preventDefault(),
|
|
254
|
+
if (t.key === "Enter" || t.key === " ") t.preventDefault(), h(n ?? null);
|
|
230
255
|
else if (t.key === "ArrowRight" || t.key === "ArrowDown") {
|
|
231
256
|
t.preventDefault();
|
|
232
257
|
let e = r + 1 < i.length ? i[r + 1] : null;
|
|
233
|
-
e?.id &&
|
|
258
|
+
e?.id && h(e.id);
|
|
234
259
|
} else if (t.key === "ArrowLeft" || t.key === "ArrowUp") {
|
|
235
260
|
t.preventDefault();
|
|
236
261
|
let e = r - 1 >= 0 ? i[r - 1] : null;
|
|
237
|
-
e?.id &&
|
|
238
|
-
} else t.key === "Escape" && (t.preventDefault(),
|
|
262
|
+
e?.id && h(e.id);
|
|
263
|
+
} else t.key === "Escape" && (t.preventDefault(), h(null));
|
|
239
264
|
}, [
|
|
240
|
-
|
|
241
|
-
|
|
265
|
+
p,
|
|
266
|
+
h,
|
|
242
267
|
e.widgets
|
|
243
|
-
]),
|
|
244
|
-
!
|
|
245
|
-
}, [
|
|
246
|
-
let
|
|
268
|
+
]), ee = S((e) => {
|
|
269
|
+
!p || !h || e.target === e.currentTarget && h(null);
|
|
270
|
+
}, [p, h]), B = (e, t, i) => {
|
|
271
|
+
let a = e.layout ? {
|
|
247
272
|
...e.layout,
|
|
248
|
-
w: Math.min(e.layout.w,
|
|
249
|
-
} : void 0,
|
|
273
|
+
w: Math.min(e.layout.w, C)
|
|
274
|
+
} : void 0, o = (() => {
|
|
250
275
|
if (e.component) return e.component;
|
|
251
276
|
let t = e.type, n = e.options || {};
|
|
252
|
-
if (t === "
|
|
253
|
-
let
|
|
254
|
-
|
|
255
|
-
|
|
277
|
+
if (t === "metric" && e.object) {
|
|
278
|
+
let t = n.data, r = H(t) && t.aggregate ? {
|
|
279
|
+
field: e.valueField || t.aggregate.field,
|
|
280
|
+
function: e.aggregate || t.aggregate.function,
|
|
281
|
+
groupBy: e.categoryField ?? t.aggregate.groupBy ?? "_all"
|
|
282
|
+
} : e.aggregate ? {
|
|
283
|
+
field: e.valueField || "value",
|
|
284
|
+
function: e.aggregate,
|
|
285
|
+
groupBy: e.categoryField || "_all"
|
|
286
|
+
} : void 0;
|
|
287
|
+
return {
|
|
288
|
+
type: "object-metric",
|
|
289
|
+
objectName: e.object || (H(t) ? t.object : void 0),
|
|
290
|
+
aggregate: r,
|
|
291
|
+
filter: (H(t) ? t.filter : void 0) || e.filter,
|
|
292
|
+
label: n.label || ie(e.title) || "",
|
|
293
|
+
fallbackValue: n.value,
|
|
294
|
+
trend: n.trend,
|
|
295
|
+
icon: n.icon,
|
|
296
|
+
description: n.description,
|
|
297
|
+
colorVariant: e.colorVariant
|
|
298
|
+
};
|
|
299
|
+
}
|
|
300
|
+
if ((t === "gauge" || t === "solid-gauge") && e.object) {
|
|
301
|
+
let t = e.aggregate ? {
|
|
302
|
+
field: e.valueField || "value",
|
|
303
|
+
function: e.aggregate,
|
|
304
|
+
groupBy: e.categoryField || "_all"
|
|
305
|
+
} : void 0;
|
|
306
|
+
return {
|
|
307
|
+
type: "object-metric",
|
|
308
|
+
objectName: e.object,
|
|
309
|
+
aggregate: t,
|
|
310
|
+
filter: e.filter,
|
|
311
|
+
label: n.label || ie(e.title) || "",
|
|
312
|
+
fallbackValue: n.fallbackValue ?? n.value,
|
|
313
|
+
icon: n.icon,
|
|
314
|
+
description: n.description
|
|
315
|
+
};
|
|
316
|
+
}
|
|
317
|
+
let r = {
|
|
318
|
+
funnel: "bar",
|
|
319
|
+
"horizontal-bar": "bar"
|
|
320
|
+
}[t] || t;
|
|
321
|
+
if (r === "bar" || r === "line" || r === "area" || r === "pie" || r === "donut" || r === "scatter") {
|
|
322
|
+
let t = e.data || n.data, i = e.categoryField || n.xField || "name", a = e.valueField || n.yField || "value";
|
|
323
|
+
if (H(t)) {
|
|
324
|
+
let n = t.aggregate, o = n ? {
|
|
256
325
|
field: e.valueField || n.field,
|
|
257
326
|
function: e.aggregate || n.function,
|
|
258
327
|
groupBy: e.categoryField || n.groupBy
|
|
259
328
|
} : void 0, s = o?.field || a;
|
|
260
329
|
return {
|
|
261
330
|
type: "object-chart",
|
|
262
|
-
chartType:
|
|
263
|
-
objectName: e.object ||
|
|
331
|
+
chartType: r,
|
|
332
|
+
objectName: e.object || t.object,
|
|
264
333
|
aggregate: o,
|
|
265
334
|
xAxisKey: i,
|
|
266
335
|
series: [{ dataKey: s }],
|
|
267
|
-
colors:
|
|
336
|
+
colors: ae,
|
|
268
337
|
className: "h-[200px] sm:h-[250px] md:h-[300px]"
|
|
269
338
|
};
|
|
270
339
|
}
|
|
271
|
-
if (!
|
|
272
|
-
let
|
|
340
|
+
if (!t && e.object) {
|
|
341
|
+
let t = e.aggregate ? {
|
|
273
342
|
field: e.valueField || "value",
|
|
274
343
|
function: e.aggregate,
|
|
275
344
|
groupBy: e.categoryField || "name"
|
|
276
345
|
} : void 0;
|
|
277
346
|
return {
|
|
278
347
|
type: "object-chart",
|
|
279
|
-
chartType:
|
|
348
|
+
chartType: r,
|
|
280
349
|
objectName: e.object,
|
|
281
|
-
aggregate:
|
|
350
|
+
aggregate: t,
|
|
282
351
|
xAxisKey: i,
|
|
283
352
|
series: [{ dataKey: e.valueField || "value" }],
|
|
284
|
-
colors:
|
|
353
|
+
colors: ae,
|
|
285
354
|
className: "h-[200px] sm:h-[250px] md:h-[300px]"
|
|
286
355
|
};
|
|
287
356
|
}
|
|
288
357
|
return {
|
|
289
358
|
type: "chart",
|
|
290
|
-
chartType:
|
|
291
|
-
data: Array.isArray(
|
|
359
|
+
chartType: r,
|
|
360
|
+
data: Array.isArray(t) ? t : t?.items || [],
|
|
292
361
|
xAxisKey: i,
|
|
293
362
|
series: [{ dataKey: a }],
|
|
294
|
-
colors:
|
|
363
|
+
colors: ae,
|
|
295
364
|
className: "h-[200px] sm:h-[250px] md:h-[300px]"
|
|
296
365
|
};
|
|
297
366
|
}
|
|
298
367
|
if (t === "table") {
|
|
299
368
|
let t = e.data || n.data;
|
|
300
|
-
if (
|
|
369
|
+
if (H(t)) {
|
|
301
370
|
let { data: r, ...i } = n;
|
|
302
371
|
return {
|
|
303
372
|
type: "object-data-table",
|
|
@@ -329,7 +398,7 @@ var ne = [
|
|
|
329
398
|
}
|
|
330
399
|
if (t === "pivot") {
|
|
331
400
|
let t = e.data || n.data;
|
|
332
|
-
if (
|
|
401
|
+
if (H(t)) {
|
|
333
402
|
let { data: r, ...i } = n;
|
|
334
403
|
return {
|
|
335
404
|
type: "object-pivot",
|
|
@@ -354,151 +423,176 @@ var ne = [
|
|
|
354
423
|
...e,
|
|
355
424
|
...n
|
|
356
425
|
};
|
|
357
|
-
})(),
|
|
426
|
+
})(), s = e.type === "metric", c = ie(e.title), h = ie(e.description), g = e.id || c || `widget-${t}`, v = p && m === e.id, y = p ? {
|
|
358
427
|
"data-testid": `dashboard-preview-widget-${e.id}`,
|
|
359
428
|
"data-widget-id": e.id,
|
|
360
429
|
role: "button",
|
|
361
430
|
tabIndex: 0,
|
|
362
|
-
"aria-selected":
|
|
363
|
-
"aria-label": `Widget: ${
|
|
364
|
-
onClick: (t) =>
|
|
365
|
-
onKeyDown: (n) =>
|
|
366
|
-
} : {}, b =
|
|
367
|
-
return
|
|
368
|
-
className:
|
|
369
|
-
style: !
|
|
370
|
-
gridColumn: `span ${
|
|
371
|
-
gridRow: `span ${
|
|
431
|
+
"aria-selected": v,
|
|
432
|
+
"aria-label": `Widget: ${c || `Widget ${t + 1}`}`,
|
|
433
|
+
onClick: (t) => R(t, e.id),
|
|
434
|
+
onKeyDown: (n) => z(n, e.id, t)
|
|
435
|
+
} : {}, b = p ? _("cursor-pointer rounded-lg transition-all outline-none", "focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2", v ? "ring-2 ring-primary shadow-md bg-primary/5 dark:bg-primary/10" : "hover:ring-2 hover:ring-primary/40 hover:shadow-sm") : void 0;
|
|
436
|
+
return s ? /* @__PURE__ */ (0, U.jsxs)("div", {
|
|
437
|
+
className: _("h-full w-full", p && "relative", b),
|
|
438
|
+
style: !j && a ? {
|
|
439
|
+
gridColumn: `span ${a.w}`,
|
|
440
|
+
gridRow: `span ${a.h}`
|
|
372
441
|
} : void 0,
|
|
373
442
|
...y,
|
|
374
|
-
children: [/* @__PURE__ */ (0,
|
|
375
|
-
schema:
|
|
376
|
-
className:
|
|
377
|
-
|
|
443
|
+
children: [/* @__PURE__ */ (0, U.jsx)(n, {
|
|
444
|
+
schema: o,
|
|
445
|
+
className: _("h-full w-full", p && "pointer-events-none"),
|
|
446
|
+
dataSource: r
|
|
447
|
+
}), p && /* @__PURE__ */ (0, U.jsx)("div", {
|
|
378
448
|
className: "absolute inset-0 z-10",
|
|
379
449
|
"aria-hidden": "true",
|
|
380
450
|
"data-testid": "widget-click-overlay"
|
|
381
451
|
})]
|
|
382
|
-
},
|
|
383
|
-
className:
|
|
384
|
-
style: !
|
|
385
|
-
gridColumn: `span ${
|
|
386
|
-
gridRow: `span ${
|
|
452
|
+
}, g) : /* @__PURE__ */ (0, U.jsxs)(l, {
|
|
453
|
+
className: _("overflow-hidden border-border/50 shadow-sm transition-all hover:shadow-md", "bg-card/50 backdrop-blur-sm", i && "w-full", p && "relative", b),
|
|
454
|
+
style: !j && a ? {
|
|
455
|
+
gridColumn: `span ${a.w}`,
|
|
456
|
+
gridRow: `span ${a.h}`
|
|
387
457
|
} : void 0,
|
|
388
458
|
...y,
|
|
389
459
|
children: [
|
|
390
|
-
|
|
460
|
+
c && /* @__PURE__ */ (0, U.jsxs)(d, {
|
|
391
461
|
className: "pb-2 border-b border-border/40 bg-muted/20 px-3 sm:px-6",
|
|
392
|
-
children: [/* @__PURE__ */ (0,
|
|
462
|
+
children: [/* @__PURE__ */ (0, U.jsx)(f, {
|
|
393
463
|
className: "text-sm sm:text-base font-medium tracking-tight truncate",
|
|
394
|
-
title:
|
|
395
|
-
children:
|
|
396
|
-
}),
|
|
464
|
+
title: c,
|
|
465
|
+
children: c
|
|
466
|
+
}), h && /* @__PURE__ */ (0, U.jsx)("p", {
|
|
397
467
|
className: "text-xs text-muted-foreground mt-0.5 line-clamp-2",
|
|
398
|
-
children:
|
|
468
|
+
children: h
|
|
399
469
|
})]
|
|
400
470
|
}),
|
|
401
|
-
/* @__PURE__ */ (0,
|
|
471
|
+
/* @__PURE__ */ (0, U.jsx)(u, {
|
|
402
472
|
className: "p-0",
|
|
403
|
-
children: /* @__PURE__ */ (0,
|
|
404
|
-
className:
|
|
405
|
-
children: /* @__PURE__ */ (0,
|
|
473
|
+
children: /* @__PURE__ */ (0, U.jsx)("div", {
|
|
474
|
+
className: _("h-full w-full", "p-3 sm:p-4 md:p-6", p && "pointer-events-none"),
|
|
475
|
+
children: /* @__PURE__ */ (0, U.jsx)(n, {
|
|
476
|
+
schema: o,
|
|
477
|
+
dataSource: r
|
|
478
|
+
})
|
|
406
479
|
})
|
|
407
480
|
}),
|
|
408
|
-
|
|
481
|
+
p && /* @__PURE__ */ (0, U.jsx)("div", {
|
|
409
482
|
className: "absolute inset-0 z-10",
|
|
410
483
|
"aria-hidden": "true",
|
|
411
484
|
"data-testid": "widget-click-overlay"
|
|
412
485
|
})
|
|
413
486
|
]
|
|
414
|
-
},
|
|
415
|
-
},
|
|
487
|
+
}, g);
|
|
488
|
+
}, V = e.header && /* @__PURE__ */ (0, U.jsxs)("div", {
|
|
416
489
|
className: "col-span-full mb-4",
|
|
417
490
|
children: [
|
|
418
|
-
e.header.showTitle !== !1 && e.title && /* @__PURE__ */ (0,
|
|
491
|
+
e.header.showTitle !== !1 && e.title && /* @__PURE__ */ (0, U.jsx)("h2", {
|
|
419
492
|
className: "text-lg font-semibold tracking-tight",
|
|
420
|
-
children:
|
|
493
|
+
children: ie(e.title)
|
|
421
494
|
}),
|
|
422
|
-
e.header.showDescription !== !1 && e.description && /* @__PURE__ */ (0,
|
|
495
|
+
e.header.showDescription !== !1 && e.description && /* @__PURE__ */ (0, U.jsx)("p", {
|
|
423
496
|
className: "text-sm text-muted-foreground mt-1",
|
|
424
|
-
children:
|
|
497
|
+
children: ie(e.description)
|
|
425
498
|
}),
|
|
426
|
-
e.header.actions && e.header.actions.length > 0 && /* @__PURE__ */ (0,
|
|
499
|
+
e.header.actions && e.header.actions.length > 0 && /* @__PURE__ */ (0, U.jsx)("div", {
|
|
427
500
|
className: "flex gap-2 mt-3",
|
|
428
|
-
children: e.header.actions.map((e, t) =>
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
501
|
+
children: e.header.actions.map((e, t) => {
|
|
502
|
+
let n = re(e.icon);
|
|
503
|
+
return /* @__PURE__ */ (0, U.jsxs)(c, {
|
|
504
|
+
variant: "outline",
|
|
505
|
+
size: "sm",
|
|
506
|
+
onClick: async () => {
|
|
507
|
+
let { actionType: t, actionUrl: n, label: r } = e;
|
|
508
|
+
if (!t || !n) {
|
|
509
|
+
console.warn("[DashboardRenderer] Header action missing actionType/actionUrl:", e);
|
|
510
|
+
return;
|
|
511
|
+
}
|
|
512
|
+
if (t === "url") {
|
|
513
|
+
/^https?:\/\//.test(n) || n.startsWith("//") ? window.location.assign(n) : (window.history.pushState({}, "", n), window.dispatchEvent(new PopStateEvent("popstate")));
|
|
514
|
+
return;
|
|
515
|
+
}
|
|
516
|
+
if (t === "modal" || t === "script") {
|
|
517
|
+
let e = await P(n || r);
|
|
518
|
+
e?.success || console.warn("[DashboardRenderer] action failed", e?.error);
|
|
519
|
+
return;
|
|
520
|
+
}
|
|
521
|
+
console.warn(`[DashboardRenderer] Unknown header actionType="${t}" for "${r}"`);
|
|
522
|
+
},
|
|
523
|
+
children: [n && /* @__PURE__ */ (0, U.jsx)(n, { className: "w-4 h-4 mr-1.5" }), e.label]
|
|
524
|
+
}, t);
|
|
525
|
+
})
|
|
433
526
|
})
|
|
434
527
|
]
|
|
435
|
-
}),
|
|
528
|
+
}), te = o !== void 0 && /* @__PURE__ */ (0, U.jsxs)("span", {
|
|
436
529
|
className: "text-xs text-muted-foreground",
|
|
437
|
-
children: [
|
|
438
|
-
}),
|
|
439
|
-
className:
|
|
440
|
-
children: [
|
|
530
|
+
children: [o.toLocaleString(), " records"]
|
|
531
|
+
}), ne = s ? JSON.stringify(s) : void 0, W = a && /* @__PURE__ */ (0, U.jsxs)("div", {
|
|
532
|
+
className: _("flex items-center justify-end gap-3 mb-2", !j && "col-span-full"),
|
|
533
|
+
children: [te, /* @__PURE__ */ (0, U.jsxs)(c, {
|
|
441
534
|
variant: "outline",
|
|
442
535
|
size: "sm",
|
|
443
|
-
onClick:
|
|
444
|
-
disabled:
|
|
536
|
+
onClick: L,
|
|
537
|
+
disabled: k,
|
|
445
538
|
"aria-label": "Refresh dashboard",
|
|
446
|
-
children: [/* @__PURE__ */ (0,
|
|
539
|
+
children: [/* @__PURE__ */ (0, U.jsx)(I, { className: _("h-4 w-4 mr-2", k && "animate-spin") }), k ? "Refreshing…" : "Refresh All"]
|
|
447
540
|
})]
|
|
448
541
|
});
|
|
449
|
-
if (
|
|
542
|
+
if (j) {
|
|
450
543
|
let n = e.widgets?.filter((e) => e.type === "metric") || [], r = e.widgets?.filter((e) => e.type !== "metric") || [];
|
|
451
|
-
return /* @__PURE__ */ (0,
|
|
452
|
-
ref:
|
|
453
|
-
className:
|
|
454
|
-
"data-user-actions":
|
|
455
|
-
onClick:
|
|
456
|
-
...
|
|
544
|
+
return /* @__PURE__ */ (0, U.jsxs)("div", {
|
|
545
|
+
ref: b,
|
|
546
|
+
className: _("flex flex-col gap-4 px-4", t),
|
|
547
|
+
"data-user-actions": ne,
|
|
548
|
+
onClick: ee,
|
|
549
|
+
...y,
|
|
457
550
|
children: [
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
n.length > 0 && /* @__PURE__ */ (0,
|
|
551
|
+
V,
|
|
552
|
+
W,
|
|
553
|
+
n.length > 0 && /* @__PURE__ */ (0, U.jsx)("div", {
|
|
461
554
|
className: "grid grid-cols-2 gap-3",
|
|
462
|
-
onClick:
|
|
463
|
-
children: n.map((e, t) =>
|
|
555
|
+
onClick: ee,
|
|
556
|
+
children: n.map((e, t) => B(e, t))
|
|
464
557
|
}),
|
|
465
|
-
r.length > 0 && /* @__PURE__ */ (0,
|
|
558
|
+
r.length > 0 && /* @__PURE__ */ (0, U.jsx)("div", {
|
|
466
559
|
className: "flex flex-col gap-4",
|
|
467
|
-
onClick:
|
|
468
|
-
children: r.map((e, t) =>
|
|
560
|
+
onClick: ee,
|
|
561
|
+
children: r.map((e, t) => B(e, t, !0))
|
|
469
562
|
})
|
|
470
563
|
]
|
|
471
564
|
});
|
|
472
565
|
}
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
566
|
+
let oe = e.columns != null || x !== 4;
|
|
567
|
+
return /* @__PURE__ */ (0, U.jsxs)("div", {
|
|
568
|
+
ref: b,
|
|
569
|
+
className: _("grid auto-rows-min", !oe && "grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4", t),
|
|
476
570
|
style: {
|
|
477
|
-
...
|
|
478
|
-
gap: `${
|
|
571
|
+
...oe && { gridTemplateColumns: `repeat(${C}, minmax(0, 1fr))` },
|
|
572
|
+
gap: `${O * .25}rem`
|
|
479
573
|
},
|
|
480
|
-
"data-user-actions":
|
|
481
|
-
onClick:
|
|
482
|
-
...
|
|
574
|
+
"data-user-actions": ne,
|
|
575
|
+
onClick: ee,
|
|
576
|
+
...y,
|
|
483
577
|
children: [
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
e.widgets?.map((e, t) =>
|
|
578
|
+
V,
|
|
579
|
+
W,
|
|
580
|
+
e.widgets?.map((e, t) => B(e, t))
|
|
487
581
|
]
|
|
488
582
|
});
|
|
489
583
|
});
|
|
490
584
|
//#endregion
|
|
491
|
-
//#region ../../node_modules/.pnpm/react-grid-layout@2.2.
|
|
492
|
-
function
|
|
585
|
+
//#region ../../node_modules/.pnpm/react-grid-layout@2.2.3_react-dom@19.2.5_react@19.2.5__react@19.2.5/node_modules/react-grid-layout/dist/chunk-76RTO6EO.mjs
|
|
586
|
+
function oe(e) {
|
|
493
587
|
let { margin: t, containerPadding: n, containerWidth: r, cols: i } = e;
|
|
494
588
|
return (r - t[0] * (i - 1) - n[0] * 2) / i;
|
|
495
589
|
}
|
|
496
|
-
function
|
|
590
|
+
function se(e, t, n) {
|
|
497
591
|
return Number.isFinite(e) ? Math.round(t * e + Math.max(0, e - 1) * n) : e;
|
|
498
592
|
}
|
|
499
|
-
function
|
|
500
|
-
let { margin: s, containerPadding: c, rowHeight: l } = e, u =
|
|
501
|
-
if (o ? (d = Math.round(o.width), f = Math.round(o.height)) : (d =
|
|
593
|
+
function ce(e, t, n, r, i, a, o) {
|
|
594
|
+
let { margin: s, containerPadding: c, rowHeight: l } = e, u = oe(e), d, f, p, m;
|
|
595
|
+
if (o ? (d = Math.round(o.width), f = Math.round(o.height)) : (d = se(r, u, s[0]), f = se(i, l, s[1])), a ? (p = Math.round(a.top), m = Math.round(a.left)) : o ? (p = Math.round(o.top), m = Math.round(o.left)) : (p = Math.round((l + s[1]) * n + c[1]), m = Math.round((u + s[0]) * t + c[0])), !a && !o) {
|
|
502
596
|
if (Number.isFinite(r)) {
|
|
503
597
|
let e = Math.round((u + s[0]) * (t + r) + c[0]) - m - d;
|
|
504
598
|
e !== s[0] && (d += e - s[0]);
|
|
@@ -515,52 +609,52 @@ function oe(e, t, n, r, i, a, o) {
|
|
|
515
609
|
height: f
|
|
516
610
|
};
|
|
517
611
|
}
|
|
518
|
-
function
|
|
519
|
-
let { margin: a, containerPadding: o, cols: s, rowHeight: c, maxRows: l } = e, u =
|
|
520
|
-
return d =
|
|
612
|
+
function le(e, t, n, r, i) {
|
|
613
|
+
let { margin: a, containerPadding: o, cols: s, rowHeight: c, maxRows: l } = e, u = oe(e), d = Math.round((n - o[0]) / (u + a[0])), f = Math.round((t - o[1]) / (c + a[1]));
|
|
614
|
+
return d = de(d, 0, s - r), f = de(f, 0, l - i), {
|
|
521
615
|
x: d,
|
|
522
616
|
y: f
|
|
523
617
|
};
|
|
524
618
|
}
|
|
525
|
-
function
|
|
526
|
-
let { margin: r, containerPadding: i, rowHeight: a } = e, o =
|
|
619
|
+
function ue(e, t, n) {
|
|
620
|
+
let { margin: r, containerPadding: i, rowHeight: a } = e, o = oe(e);
|
|
527
621
|
return {
|
|
528
622
|
x: Math.round((n - i[0]) / (o + r[0])),
|
|
529
623
|
y: Math.round((t - i[1]) / (a + r[1]))
|
|
530
624
|
};
|
|
531
625
|
}
|
|
532
|
-
function
|
|
533
|
-
let { margin: r, rowHeight: i } = e, a =
|
|
626
|
+
function G(e, t, n) {
|
|
627
|
+
let { margin: r, rowHeight: i } = e, a = oe(e);
|
|
534
628
|
return {
|
|
535
629
|
w: Math.max(1, Math.round((t + r[0]) / (a + r[0]))),
|
|
536
630
|
h: Math.max(1, Math.round((n + r[1]) / (i + r[1])))
|
|
537
631
|
};
|
|
538
632
|
}
|
|
539
|
-
function
|
|
633
|
+
function de(e, t, n) {
|
|
540
634
|
return Math.max(Math.min(e, n), t);
|
|
541
635
|
}
|
|
542
|
-
function
|
|
636
|
+
function fe(e, t) {
|
|
543
637
|
return !(e.i === t.i || e.x + e.w <= t.x || e.x >= t.x + t.w || e.y + e.h <= t.y || e.y >= t.y + t.h);
|
|
544
638
|
}
|
|
545
|
-
function
|
|
639
|
+
function K(e, t) {
|
|
546
640
|
for (let n = 0; n < e.length; n++) {
|
|
547
641
|
let r = e[n];
|
|
548
|
-
if (r !== void 0 &&
|
|
642
|
+
if (r !== void 0 && fe(r, t)) return r;
|
|
549
643
|
}
|
|
550
644
|
}
|
|
551
645
|
function pe(e, t) {
|
|
552
|
-
return e.filter((e) =>
|
|
646
|
+
return e.filter((e) => fe(e, t));
|
|
553
647
|
}
|
|
554
|
-
function
|
|
555
|
-
return t === "horizontal" ?
|
|
648
|
+
function q(e, t) {
|
|
649
|
+
return t === "horizontal" ? he(e) : t === "vertical" || t === "wrap" ? me(e) : [...e];
|
|
556
650
|
}
|
|
557
|
-
function
|
|
651
|
+
function me(e) {
|
|
558
652
|
return [...e].sort((e, t) => e.y === t.y ? e.x - t.x : e.y - t.y);
|
|
559
653
|
}
|
|
560
|
-
function
|
|
654
|
+
function he(e) {
|
|
561
655
|
return [...e].sort((e, t) => e.x === t.x ? e.y - t.y : e.x - t.x);
|
|
562
656
|
}
|
|
563
|
-
function
|
|
657
|
+
function ge(e) {
|
|
564
658
|
let t = 0;
|
|
565
659
|
for (let n = 0; n < e.length; n++) {
|
|
566
660
|
let r = e[n];
|
|
@@ -571,16 +665,16 @@ function he(e) {
|
|
|
571
665
|
}
|
|
572
666
|
return t;
|
|
573
667
|
}
|
|
574
|
-
function
|
|
668
|
+
function _e(e, t) {
|
|
575
669
|
for (let n = 0; n < e.length; n++) {
|
|
576
670
|
let r = e[n];
|
|
577
671
|
if (r !== void 0 && r.i === t) return r;
|
|
578
672
|
}
|
|
579
673
|
}
|
|
580
|
-
function
|
|
674
|
+
function ve(e) {
|
|
581
675
|
return e.filter((e) => e.static === !0);
|
|
582
676
|
}
|
|
583
|
-
function
|
|
677
|
+
function ye(e) {
|
|
584
678
|
return {
|
|
585
679
|
i: e.i,
|
|
586
680
|
x: e.x,
|
|
@@ -600,15 +694,15 @@ function ge(e) {
|
|
|
600
694
|
isBounded: e.isBounded
|
|
601
695
|
};
|
|
602
696
|
}
|
|
603
|
-
function
|
|
697
|
+
function J(e) {
|
|
604
698
|
let t = Array(e.length);
|
|
605
699
|
for (let n = 0; n < e.length; n++) {
|
|
606
700
|
let r = e[n];
|
|
607
|
-
r !== void 0 && (t[n] =
|
|
701
|
+
r !== void 0 && (t[n] = ye(r));
|
|
608
702
|
}
|
|
609
703
|
return t;
|
|
610
704
|
}
|
|
611
|
-
function
|
|
705
|
+
function be(e, t) {
|
|
612
706
|
let n = Array(e.length);
|
|
613
707
|
for (let r = 0; r < e.length; r++) {
|
|
614
708
|
let i = e[r];
|
|
@@ -616,36 +710,36 @@ function _e(e, t) {
|
|
|
616
710
|
}
|
|
617
711
|
return n;
|
|
618
712
|
}
|
|
619
|
-
function
|
|
620
|
-
let r =
|
|
621
|
-
return r ? (r = n(
|
|
713
|
+
function Y(e, t, n) {
|
|
714
|
+
let r = _e(e, t);
|
|
715
|
+
return r ? (r = n(ye(r)), [be(e, r), r]) : [[...e], null];
|
|
622
716
|
}
|
|
623
|
-
function
|
|
624
|
-
let n =
|
|
717
|
+
function X(e, t) {
|
|
718
|
+
let n = ve(e);
|
|
625
719
|
for (let r = 0; r < e.length; r++) {
|
|
626
720
|
let i = e[r];
|
|
627
721
|
if (i !== void 0) if (i.x + i.w > t.cols && (i.x = t.cols - i.w), i.x < 0 && (i.x = 0, i.w = t.cols), !i.static) n.push(i);
|
|
628
|
-
else for (;
|
|
722
|
+
else for (; K(n, i);) i.y++;
|
|
629
723
|
}
|
|
630
724
|
return e;
|
|
631
725
|
}
|
|
632
|
-
function
|
|
726
|
+
function Z(e, t, n, r, i, a, o, s, c) {
|
|
633
727
|
if (t.static && t.isDraggable !== !0 || t.y === r && t.x === n) return [...e];
|
|
634
728
|
let l = t.x, u = t.y;
|
|
635
729
|
typeof n == "number" && (t.x = n), typeof r == "number" && (t.y = r), t.moved = !0;
|
|
636
|
-
let d =
|
|
730
|
+
let d = q(e, o);
|
|
637
731
|
(o === "vertical" && typeof r == "number" ? u >= r : o === "horizontal" && typeof n == "number" && l >= n) && (d = d.reverse());
|
|
638
732
|
let f = pe(d, t), p = f.length > 0;
|
|
639
|
-
if (p && c) return
|
|
733
|
+
if (p && c) return J(e);
|
|
640
734
|
if (p && a) return t.x = l, t.y = u, t.moved = !1, e;
|
|
641
735
|
let m = [...e];
|
|
642
736
|
for (let e = 0; e < f.length; e++) {
|
|
643
737
|
let n = f[e];
|
|
644
|
-
n !== void 0 && (n.moved || (m = n.static ?
|
|
738
|
+
n !== void 0 && (n.moved || (m = n.static ? Q(m, n, t, i, o) : Q(m, t, n, i, o)));
|
|
645
739
|
}
|
|
646
740
|
return m;
|
|
647
741
|
}
|
|
648
|
-
function
|
|
742
|
+
function Q(e, t, n, r, i, a) {
|
|
649
743
|
let o = i === "horizontal", s = i === "vertical", c = t.static;
|
|
650
744
|
if (r) {
|
|
651
745
|
r = !1;
|
|
@@ -655,45 +749,45 @@ function Y(e, t, n, r, i, a) {
|
|
|
655
749
|
w: n.w,
|
|
656
750
|
h: n.h,
|
|
657
751
|
i: "-1"
|
|
658
|
-
}, l =
|
|
659
|
-
if (!l) return
|
|
660
|
-
if (u && s) return
|
|
752
|
+
}, l = K(e, a), u = l !== void 0 && l.y + l.h > t.y, d = l !== void 0 && t.x + t.w > l.x;
|
|
753
|
+
if (!l) return Z(e, n, o ? a.x : void 0, s ? a.y : void 0, r, c, i);
|
|
754
|
+
if (u && s) return Z(e, n, void 0, n.y + 1, r, c, i);
|
|
661
755
|
if (u && i === null) return t.y = n.y, n.y += n.h, [...e];
|
|
662
|
-
if (d && o) return
|
|
756
|
+
if (d && o) return Z(e, t, n.x, void 0, r, c, i);
|
|
663
757
|
}
|
|
664
758
|
let l = o ? n.x + 1 : void 0, u = s ? n.y + 1 : void 0;
|
|
665
|
-
return l === void 0 && u === void 0 ? [...e] :
|
|
759
|
+
return l === void 0 && u === void 0 ? [...e] : Z(e, n, l, u, r, c, i);
|
|
666
760
|
}
|
|
667
761
|
//#endregion
|
|
668
|
-
//#region ../../node_modules/.pnpm/react-grid-layout@2.2.
|
|
669
|
-
function
|
|
762
|
+
//#region ../../node_modules/.pnpm/react-grid-layout@2.2.3_react-dom@19.2.5_react@19.2.5__react@19.2.5/node_modules/react-grid-layout/dist/chunk-KDANGDDL.mjs
|
|
763
|
+
function $(e, t, n) {
|
|
670
764
|
return Math.max(t, Math.min(n, e));
|
|
671
765
|
}
|
|
672
|
-
var
|
|
766
|
+
var xe = [{
|
|
673
767
|
name: "gridBounds",
|
|
674
768
|
constrainPosition(e, t, n, { cols: r, maxRows: i }) {
|
|
675
769
|
return {
|
|
676
|
-
x:
|
|
677
|
-
y:
|
|
770
|
+
x: $(t, 0, Math.max(0, r - e.w)),
|
|
771
|
+
y: $(n, 0, Math.max(0, i - e.h))
|
|
678
772
|
};
|
|
679
773
|
},
|
|
680
774
|
constrainSize(e, t, n, r, { cols: i, maxRows: a }) {
|
|
681
775
|
let o = r === "w" || r === "nw" || r === "sw" ? e.x + e.w : i - e.x, s = r === "n" || r === "nw" || r === "ne" ? e.y + e.h : a - e.y;
|
|
682
776
|
return {
|
|
683
|
-
w:
|
|
684
|
-
h:
|
|
777
|
+
w: $(t, 1, Math.max(1, o)),
|
|
778
|
+
h: $(n, 1, Math.max(1, s))
|
|
685
779
|
};
|
|
686
780
|
}
|
|
687
781
|
}, {
|
|
688
782
|
name: "minMaxSize",
|
|
689
783
|
constrainSize(e, t, n) {
|
|
690
784
|
return {
|
|
691
|
-
w:
|
|
692
|
-
h:
|
|
785
|
+
w: $(t, e.minW ?? 1, e.maxW ?? Infinity),
|
|
786
|
+
h: $(n, e.minH ?? 1, e.maxH ?? Infinity)
|
|
693
787
|
};
|
|
694
788
|
}
|
|
695
789
|
}];
|
|
696
|
-
function
|
|
790
|
+
function Se(e, t, n, r, i) {
|
|
697
791
|
let a = {
|
|
698
792
|
x: n,
|
|
699
793
|
y: r
|
|
@@ -702,7 +796,7 @@ function xe(e, t, n, r, i) {
|
|
|
702
796
|
if (t.constraints) for (let e of t.constraints) e.constrainPosition && (a = e.constrainPosition(t, a.x, a.y, i));
|
|
703
797
|
return a;
|
|
704
798
|
}
|
|
705
|
-
function
|
|
799
|
+
function Ce(e, t, n, r, i, a) {
|
|
706
800
|
let o = {
|
|
707
801
|
w: n,
|
|
708
802
|
h: r
|
|
@@ -711,7 +805,7 @@ function Z(e, t, n, r, i, a) {
|
|
|
711
805
|
if (t.constraints) for (let e of t.constraints) e.constrainSize && (o = e.constrainSize(t, o.w, o.h, i, a));
|
|
712
806
|
return o;
|
|
713
807
|
}
|
|
714
|
-
function
|
|
808
|
+
function we({ top: e, left: t, width: n, height: r }) {
|
|
715
809
|
let i = `translate(${t}px,${e}px)`;
|
|
716
810
|
return {
|
|
717
811
|
transform: i,
|
|
@@ -724,7 +818,7 @@ function Se({ top: e, left: t, width: n, height: r }) {
|
|
|
724
818
|
position: "absolute"
|
|
725
819
|
};
|
|
726
820
|
}
|
|
727
|
-
function
|
|
821
|
+
function Te({ top: e, left: t, width: n, height: r }) {
|
|
728
822
|
return {
|
|
729
823
|
top: `${e}px`,
|
|
730
824
|
left: `${t}px`,
|
|
@@ -733,190 +827,190 @@ function Q({ top: e, left: t, width: n, height: r }) {
|
|
|
733
827
|
position: "absolute"
|
|
734
828
|
};
|
|
735
829
|
}
|
|
736
|
-
function
|
|
830
|
+
function Ee(e) {
|
|
737
831
|
return e * 100 + "%";
|
|
738
832
|
}
|
|
739
|
-
function
|
|
833
|
+
function De(e, t, n, r) {
|
|
740
834
|
return e + n > r ? t : n;
|
|
741
835
|
}
|
|
742
|
-
function
|
|
836
|
+
function Oe(e, t, n) {
|
|
743
837
|
return e < 0 ? t : n;
|
|
744
838
|
}
|
|
745
|
-
function
|
|
839
|
+
function ke(e) {
|
|
746
840
|
return Math.max(0, e);
|
|
747
841
|
}
|
|
748
|
-
function
|
|
842
|
+
function Ae(e) {
|
|
749
843
|
return Math.max(0, e);
|
|
750
844
|
}
|
|
751
|
-
var
|
|
845
|
+
var je = (e, t, n) => {
|
|
752
846
|
let { left: r, height: i, width: a } = t, o = e.top - (i - e.height);
|
|
753
847
|
return {
|
|
754
848
|
left: r,
|
|
755
849
|
width: a,
|
|
756
|
-
height:
|
|
757
|
-
top:
|
|
850
|
+
height: Oe(o, e.height, i),
|
|
851
|
+
top: Ae(o)
|
|
758
852
|
};
|
|
759
|
-
},
|
|
853
|
+
}, Me = (e, t, n) => {
|
|
760
854
|
let { top: r, left: i, height: a, width: o } = t;
|
|
761
855
|
return {
|
|
762
856
|
top: r,
|
|
763
857
|
height: a,
|
|
764
|
-
width:
|
|
765
|
-
left:
|
|
858
|
+
width: De(e.left, e.width, o, n),
|
|
859
|
+
left: ke(i)
|
|
766
860
|
};
|
|
767
|
-
},
|
|
861
|
+
}, Ne = (e, t, n) => {
|
|
768
862
|
let { top: r, height: i, width: a } = t, o = e.left + e.width - a;
|
|
769
863
|
return o < 0 ? {
|
|
770
864
|
height: i,
|
|
771
865
|
width: e.left + e.width,
|
|
772
|
-
top:
|
|
866
|
+
top: Ae(r),
|
|
773
867
|
left: 0
|
|
774
868
|
} : {
|
|
775
869
|
height: i,
|
|
776
870
|
width: a,
|
|
777
|
-
top:
|
|
871
|
+
top: Ae(r),
|
|
778
872
|
left: o
|
|
779
873
|
};
|
|
780
|
-
},
|
|
874
|
+
}, Pe = (e, t, n) => {
|
|
781
875
|
let { top: r, left: i, height: a, width: o } = t;
|
|
782
876
|
return {
|
|
783
877
|
width: o,
|
|
784
878
|
left: i,
|
|
785
|
-
height:
|
|
786
|
-
top:
|
|
879
|
+
height: Oe(r, e.height, a),
|
|
880
|
+
top: Ae(r)
|
|
787
881
|
};
|
|
788
|
-
},
|
|
789
|
-
n:
|
|
790
|
-
ne: (e, t, n) =>
|
|
791
|
-
e:
|
|
792
|
-
se: (e, t, n) =>
|
|
793
|
-
s:
|
|
794
|
-
sw: (e, t, n) =>
|
|
795
|
-
w:
|
|
796
|
-
nw: (e, t, n) =>
|
|
882
|
+
}, Fe = {
|
|
883
|
+
n: je,
|
|
884
|
+
ne: (e, t, n) => je(e, Me(e, t, n)),
|
|
885
|
+
e: Me,
|
|
886
|
+
se: (e, t, n) => Pe(e, Me(e, t, n)),
|
|
887
|
+
s: Pe,
|
|
888
|
+
sw: (e, t, n) => Pe(e, Ne(e, t)),
|
|
889
|
+
w: Ne,
|
|
890
|
+
nw: (e, t, n) => je(e, Ne(e, t))
|
|
797
891
|
};
|
|
798
|
-
function
|
|
799
|
-
let i =
|
|
892
|
+
function Ie(e, t, n, r) {
|
|
893
|
+
let i = Fe[e];
|
|
800
894
|
return i ? i(t, {
|
|
801
895
|
...t,
|
|
802
896
|
...n
|
|
803
897
|
}, r) : n;
|
|
804
898
|
}
|
|
805
|
-
var
|
|
899
|
+
var Le = {
|
|
806
900
|
type: "transform",
|
|
807
901
|
scale: 1,
|
|
808
902
|
calcStyle(e) {
|
|
809
|
-
return
|
|
903
|
+
return we(e);
|
|
810
904
|
}
|
|
811
|
-
},
|
|
905
|
+
}, Re = {
|
|
812
906
|
cols: 12,
|
|
813
907
|
rowHeight: 150,
|
|
814
908
|
margin: [10, 10],
|
|
815
909
|
containerPadding: null,
|
|
816
910
|
maxRows: Infinity
|
|
817
|
-
},
|
|
911
|
+
}, ze = {
|
|
818
912
|
enabled: !0,
|
|
819
913
|
bounded: !1,
|
|
820
914
|
threshold: 3
|
|
821
|
-
},
|
|
915
|
+
}, Be = {
|
|
822
916
|
enabled: !0,
|
|
823
917
|
handles: ["se"]
|
|
824
|
-
},
|
|
918
|
+
}, Ve = {
|
|
825
919
|
enabled: !1,
|
|
826
920
|
defaultItem: {
|
|
827
921
|
w: 1,
|
|
828
922
|
h: 1
|
|
829
923
|
}
|
|
830
924
|
};
|
|
831
|
-
function
|
|
925
|
+
function He(e, t, n, r, i) {
|
|
832
926
|
let a = r === "x" ? "w" : "h";
|
|
833
927
|
t[r] += 1;
|
|
834
|
-
let o = e.findIndex((e) => e.i === t.i), s = i ??
|
|
928
|
+
let o = e.findIndex((e) => e.i === t.i), s = i ?? ve(e).length > 0;
|
|
835
929
|
for (let i = o + 1; i < e.length; i++) {
|
|
836
930
|
let o = e[i];
|
|
837
931
|
if (o !== void 0 && !o.static) {
|
|
838
932
|
if (!s && o.y > t.y + t.h) break;
|
|
839
|
-
|
|
933
|
+
fe(t, o) && He(e, o, n + t[a], r, s);
|
|
840
934
|
}
|
|
841
935
|
}
|
|
842
936
|
t[r] = n;
|
|
843
937
|
}
|
|
844
|
-
function
|
|
845
|
-
for (t.x = Math.max(t.x, 0), t.y = Math.max(t.y, 0), t.y = Math.min(r, t.y); t.y > 0 && !
|
|
938
|
+
function Ue(e, t, n, r) {
|
|
939
|
+
for (t.x = Math.max(t.x, 0), t.y = Math.max(t.y, 0), t.y = Math.min(r, t.y); t.y > 0 && !K(e, t);) t.y--;
|
|
846
940
|
let i;
|
|
847
|
-
for (; (i =
|
|
941
|
+
for (; (i = K(e, t)) !== void 0;) He(n, t, i.y + i.h, "y");
|
|
848
942
|
return t.y = Math.max(t.y, 0), t;
|
|
849
943
|
}
|
|
850
|
-
function
|
|
851
|
-
for (t.x = Math.max(t.x, 0), t.y = Math.max(t.y, 0); t.x > 0 && !
|
|
944
|
+
function We(e, t, n, r) {
|
|
945
|
+
for (t.x = Math.max(t.x, 0), t.y = Math.max(t.y, 0); t.x > 0 && !K(e, t);) t.x--;
|
|
852
946
|
let i;
|
|
853
|
-
for (; (i =
|
|
947
|
+
for (; (i = K(e, t)) !== void 0;) if (He(r, t, i.x + i.w, "x"), t.x + t.w > n) for (t.x = n - t.w, t.y++; t.x > 0 && !K(e, t);) t.x--;
|
|
854
948
|
return t.x = Math.max(t.x, 0), t;
|
|
855
949
|
}
|
|
856
|
-
var
|
|
950
|
+
var Ge = {
|
|
857
951
|
type: "vertical",
|
|
858
952
|
allowOverlap: !1,
|
|
859
953
|
compact(e, t) {
|
|
860
|
-
let n =
|
|
954
|
+
let n = ve(e), r = ge(n), i = me(e), a = Array(e.length);
|
|
861
955
|
for (let t = 0; t < i.length; t++) {
|
|
862
956
|
let o = i[t];
|
|
863
957
|
if (o === void 0) continue;
|
|
864
|
-
let s =
|
|
865
|
-
s.static || (s =
|
|
958
|
+
let s = ye(o);
|
|
959
|
+
s.static || (s = Ue(n, s, i, r), r = Math.max(r, s.y + s.h), n.push(s));
|
|
866
960
|
let c = e.indexOf(o);
|
|
867
961
|
a[c] = s, s.moved = !1;
|
|
868
962
|
}
|
|
869
963
|
return a;
|
|
870
964
|
}
|
|
871
|
-
},
|
|
965
|
+
}, Ke = {
|
|
872
966
|
type: "horizontal",
|
|
873
967
|
allowOverlap: !1,
|
|
874
968
|
compact(e, t) {
|
|
875
|
-
let n =
|
|
969
|
+
let n = ve(e), r = he(e), i = Array(e.length);
|
|
876
970
|
for (let a = 0; a < r.length; a++) {
|
|
877
971
|
let o = r[a];
|
|
878
972
|
if (o === void 0) continue;
|
|
879
|
-
let s =
|
|
880
|
-
s.static || (s =
|
|
973
|
+
let s = ye(o);
|
|
974
|
+
s.static || (s = We(n, s, t, r), n.push(s));
|
|
881
975
|
let c = e.indexOf(o);
|
|
882
976
|
i[c] = s, s.moved = !1;
|
|
883
977
|
}
|
|
884
978
|
return i;
|
|
885
979
|
}
|
|
886
|
-
},
|
|
980
|
+
}, qe = {
|
|
887
981
|
type: null,
|
|
888
982
|
allowOverlap: !1,
|
|
889
983
|
compact(e, t) {
|
|
890
|
-
return
|
|
984
|
+
return J(e);
|
|
891
985
|
}
|
|
892
|
-
},
|
|
893
|
-
...
|
|
986
|
+
}, Je = {
|
|
987
|
+
...Ge,
|
|
894
988
|
allowOverlap: !0,
|
|
895
989
|
compact(e, t) {
|
|
896
|
-
return
|
|
990
|
+
return J(e);
|
|
897
991
|
}
|
|
898
|
-
},
|
|
899
|
-
...
|
|
992
|
+
}, Ye = {
|
|
993
|
+
...Ke,
|
|
900
994
|
allowOverlap: !0,
|
|
901
995
|
compact(e, t) {
|
|
902
|
-
return
|
|
996
|
+
return J(e);
|
|
903
997
|
}
|
|
904
|
-
},
|
|
905
|
-
...
|
|
998
|
+
}, Xe = {
|
|
999
|
+
...qe,
|
|
906
1000
|
allowOverlap: !0
|
|
907
1001
|
};
|
|
908
|
-
function
|
|
1002
|
+
function Ze(e, t = !1, n = !1) {
|
|
909
1003
|
let r;
|
|
910
|
-
return r = t ? e === "vertical" ?
|
|
1004
|
+
return r = t ? e === "vertical" ? Je : e === "horizontal" ? Ye : Xe : e === "vertical" ? Ge : e === "horizontal" ? Ke : qe, n ? {
|
|
911
1005
|
...r,
|
|
912
1006
|
preventCollision: n
|
|
913
1007
|
} : r;
|
|
914
1008
|
}
|
|
915
|
-
function
|
|
1009
|
+
function Qe(e) {
|
|
916
1010
|
return Object.keys(e).sort((t, n) => e[t] - e[n]);
|
|
917
1011
|
}
|
|
918
|
-
function
|
|
919
|
-
let n =
|
|
1012
|
+
function $e(e, t) {
|
|
1013
|
+
let n = Qe(e), r = n[0];
|
|
920
1014
|
if (r === void 0) throw Error("No breakpoints defined");
|
|
921
1015
|
for (let i = 1; i < n.length; i++) {
|
|
922
1016
|
let a = n[i];
|
|
@@ -924,15 +1018,15 @@ function Ye(e, t) {
|
|
|
924
1018
|
}
|
|
925
1019
|
return r;
|
|
926
1020
|
}
|
|
927
|
-
function
|
|
1021
|
+
function et(e, t) {
|
|
928
1022
|
let n = t[e];
|
|
929
1023
|
if (n === void 0) throw Error(`ResponsiveReactGridLayout: \`cols\` entry for breakpoint ${String(e)} is missing!`);
|
|
930
1024
|
return n;
|
|
931
1025
|
}
|
|
932
|
-
function
|
|
1026
|
+
function tt(e, t, n, r, i, a) {
|
|
933
1027
|
let o = e[n];
|
|
934
|
-
if (o) return
|
|
935
|
-
let s = e[r], c =
|
|
1028
|
+
if (o) return J(o);
|
|
1029
|
+
let s = e[r], c = Qe(t), l = c.slice(c.indexOf(n));
|
|
936
1030
|
for (let t = 0; t < l.length; t++) {
|
|
937
1031
|
let n = l[t];
|
|
938
1032
|
if (n === void 0) continue;
|
|
@@ -942,10 +1036,10 @@ function Ze(e, t, n, r, i, a) {
|
|
|
942
1036
|
break;
|
|
943
1037
|
}
|
|
944
1038
|
}
|
|
945
|
-
let u = J(
|
|
946
|
-
return (typeof a == "object" && a ? a :
|
|
1039
|
+
let u = X(J(s || []), { cols: i });
|
|
1040
|
+
return (typeof a == "object" && a ? a : Ze(a)).compact(u, i);
|
|
947
1041
|
}
|
|
948
|
-
function
|
|
1042
|
+
function nt(e, t) {
|
|
949
1043
|
if (Array.isArray(e)) return e;
|
|
950
1044
|
let n = e, r = n[t];
|
|
951
1045
|
if (r !== void 0) return r;
|
|
@@ -958,7 +1052,7 @@ function Qe(e, t) {
|
|
|
958
1052
|
}
|
|
959
1053
|
//#endregion
|
|
960
1054
|
//#region ../../node_modules/.pnpm/fast-equals@4.0.3/node_modules/fast-equals/dist/fast-equals.js
|
|
961
|
-
var
|
|
1055
|
+
var rt = /* @__PURE__ */ B(((e, t) => {
|
|
962
1056
|
(function(n, r) {
|
|
963
1057
|
typeof e == "object" && t !== void 0 ? r(e) : typeof define == "function" && define.amd ? define(["exports"], r) : (n = typeof globalThis < "u" ? globalThis : n || self, r(n["fast-equals"] = {}));
|
|
964
1058
|
})(e, (function(e) {
|
|
@@ -1088,16 +1182,16 @@ var $e = /* @__PURE__ */ L(((e, t) => {
|
|
|
1088
1182
|
return P(e, t, void 0);
|
|
1089
1183
|
}
|
|
1090
1184
|
var I = _(j);
|
|
1091
|
-
function
|
|
1185
|
+
function L(e, t) {
|
|
1092
1186
|
return I(e, t, /* @__PURE__ */ new WeakMap());
|
|
1093
1187
|
}
|
|
1094
|
-
var
|
|
1188
|
+
var R = _(r(j, { createIsNestedEqual: function() {
|
|
1095
1189
|
return o;
|
|
1096
1190
|
} }));
|
|
1097
|
-
function
|
|
1098
|
-
return
|
|
1191
|
+
function z(e, t) {
|
|
1192
|
+
return R(e, t, /* @__PURE__ */ new WeakMap());
|
|
1099
1193
|
}
|
|
1100
|
-
function
|
|
1194
|
+
function ee(e) {
|
|
1101
1195
|
return _(r(A, e(A)));
|
|
1102
1196
|
}
|
|
1103
1197
|
function B(e) {
|
|
@@ -1106,30 +1200,40 @@ var $e = /* @__PURE__ */ L(((e, t) => {
|
|
|
1106
1200
|
return r === void 0 && (r = /* @__PURE__ */ new WeakMap()), t(e, n, r);
|
|
1107
1201
|
});
|
|
1108
1202
|
}
|
|
1109
|
-
e.circularDeepEqual =
|
|
1203
|
+
e.circularDeepEqual = L, e.circularShallowEqual = z, e.createCustomCircularEqual = B, e.createCustomEqual = ee, e.deepEqual = N, e.sameValueZeroEqual = o, e.shallowEqual = F, Object.defineProperty(e, "__esModule", { value: !0 });
|
|
1110
1204
|
}));
|
|
1111
1205
|
}));
|
|
1112
1206
|
//#endregion
|
|
1113
|
-
//#region ../../node_modules/.pnpm/react-grid-layout@2.2.
|
|
1114
|
-
function
|
|
1115
|
-
let { measureBeforeMount: t = !1, initialWidth: n = 1280 } = e, [r, i] =
|
|
1207
|
+
//#region ../../node_modules/.pnpm/react-grid-layout@2.2.3_react-dom@19.2.5_react@19.2.5__react@19.2.5/node_modules/react-grid-layout/dist/chunk-PZLKKWSX.mjs
|
|
1208
|
+
function it(e = {}) {
|
|
1209
|
+
let { measureBeforeMount: t = !1, initialWidth: n = 1280 } = e, [r, i] = D(n), [a, o] = D(!t), s = E(null), c = E(null), l = S(() => {
|
|
1116
1210
|
let e = s.current;
|
|
1117
1211
|
if (e) {
|
|
1118
1212
|
let t = e.offsetWidth;
|
|
1119
1213
|
i(t), a || o(!0);
|
|
1120
1214
|
}
|
|
1121
1215
|
}, [a]);
|
|
1122
|
-
return
|
|
1216
|
+
return w(() => {
|
|
1123
1217
|
let e = s.current;
|
|
1124
|
-
if (e)
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1218
|
+
if (e) {
|
|
1219
|
+
if (l(), typeof ResizeObserver < "u") {
|
|
1220
|
+
let t = null;
|
|
1221
|
+
return c.current = new ResizeObserver((e) => {
|
|
1222
|
+
let n = e[0];
|
|
1223
|
+
if (n) {
|
|
1224
|
+
let e = n.contentRect.width;
|
|
1225
|
+
t !== null && cancelAnimationFrame(t), t = requestAnimationFrame(() => {
|
|
1226
|
+
i(e), t = null;
|
|
1227
|
+
});
|
|
1228
|
+
}
|
|
1229
|
+
}), c.current.observe(e), () => {
|
|
1230
|
+
t !== null && cancelAnimationFrame(t), c.current &&= (c.current.disconnect(), null);
|
|
1231
|
+
};
|
|
1129
1232
|
}
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1233
|
+
return () => {
|
|
1234
|
+
c.current &&= (c.current.disconnect(), null);
|
|
1235
|
+
};
|
|
1236
|
+
}
|
|
1133
1237
|
}, [l]), {
|
|
1134
1238
|
width: r,
|
|
1135
1239
|
mounted: a,
|
|
@@ -1139,7 +1243,7 @@ function et(e = {}) {
|
|
|
1139
1243
|
}
|
|
1140
1244
|
//#endregion
|
|
1141
1245
|
//#region ../../node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/cjs/react-is.production.min.js
|
|
1142
|
-
var
|
|
1246
|
+
var at = /* @__PURE__ */ B(((e) => {
|
|
1143
1247
|
var t = typeof Symbol == "function" && Symbol.for, n = t ? Symbol.for("react.element") : 60103, r = t ? Symbol.for("react.portal") : 60106, i = t ? Symbol.for("react.fragment") : 60107, a = t ? Symbol.for("react.strict_mode") : 60108, o = t ? Symbol.for("react.profiler") : 60114, s = t ? Symbol.for("react.provider") : 60109, c = t ? Symbol.for("react.context") : 60110, l = t ? Symbol.for("react.async_mode") : 60111, u = t ? Symbol.for("react.concurrent_mode") : 60111, d = t ? Symbol.for("react.forward_ref") : 60112, f = t ? Symbol.for("react.suspense") : 60113, p = t ? Symbol.for("react.suspense_list") : 60120, m = t ? Symbol.for("react.memo") : 60115, h = t ? Symbol.for("react.lazy") : 60116, g = t ? Symbol.for("react.block") : 60121, _ = t ? Symbol.for("react.fundamental") : 60117, v = t ? Symbol.for("react.responder") : 60118, y = t ? Symbol.for("react.scope") : 60119;
|
|
1144
1248
|
function b(e) {
|
|
1145
1249
|
if (typeof e == "object" && e) {
|
|
@@ -1195,7 +1299,7 @@ var tt = /* @__PURE__ */ L(((e) => {
|
|
|
1195
1299
|
}, e.isValidElementType = function(e) {
|
|
1196
1300
|
return typeof e == "string" || typeof e == "function" || e === i || e === u || e === o || e === a || e === f || e === p || typeof e == "object" && !!e && (e.$$typeof === h || e.$$typeof === m || e.$$typeof === s || e.$$typeof === c || e.$$typeof === d || e.$$typeof === _ || e.$$typeof === v || e.$$typeof === y || e.$$typeof === g);
|
|
1197
1301
|
}, e.typeOf = b;
|
|
1198
|
-
})),
|
|
1302
|
+
})), ot = /* @__PURE__ */ B(((e) => {
|
|
1199
1303
|
process.env.NODE_ENV !== "production" && (function() {
|
|
1200
1304
|
var t = typeof Symbol == "function" && Symbol.for, n = t ? Symbol.for("react.element") : 60103, r = t ? Symbol.for("react.portal") : 60106, i = t ? Symbol.for("react.fragment") : 60107, a = t ? Symbol.for("react.strict_mode") : 60108, o = t ? Symbol.for("react.profiler") : 60114, s = t ? Symbol.for("react.provider") : 60109, c = t ? Symbol.for("react.context") : 60110, l = t ? Symbol.for("react.async_mode") : 60111, u = t ? Symbol.for("react.concurrent_mode") : 60111, d = t ? Symbol.for("react.forward_ref") : 60112, f = t ? Symbol.for("react.suspense") : 60113, p = t ? Symbol.for("react.suspense_list") : 60120, m = t ? Symbol.for("react.memo") : 60115, h = t ? Symbol.for("react.lazy") : 60116, g = t ? Symbol.for("react.block") : 60121, _ = t ? Symbol.for("react.fundamental") : 60117, v = t ? Symbol.for("react.responder") : 60118, y = t ? Symbol.for("react.scope") : 60119;
|
|
1201
1305
|
function b(e) {
|
|
@@ -1231,49 +1335,49 @@ var tt = /* @__PURE__ */ L(((e) => {
|
|
|
1231
1335
|
}
|
|
1232
1336
|
var S = l, C = u, w = c, T = s, E = n, D = d, O = i, k = h, A = m, j = r, M = o, N = a, P = f, F = !1;
|
|
1233
1337
|
function I(e) {
|
|
1234
|
-
return F || (F = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),
|
|
1338
|
+
return F || (F = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), L(e) || x(e) === l;
|
|
1235
1339
|
}
|
|
1236
|
-
function
|
|
1340
|
+
function L(e) {
|
|
1237
1341
|
return x(e) === u;
|
|
1238
1342
|
}
|
|
1239
|
-
function
|
|
1343
|
+
function R(e) {
|
|
1240
1344
|
return x(e) === c;
|
|
1241
1345
|
}
|
|
1242
|
-
function
|
|
1346
|
+
function z(e) {
|
|
1243
1347
|
return x(e) === s;
|
|
1244
1348
|
}
|
|
1245
|
-
function
|
|
1349
|
+
function ee(e) {
|
|
1246
1350
|
return typeof e == "object" && !!e && e.$$typeof === n;
|
|
1247
1351
|
}
|
|
1248
1352
|
function B(e) {
|
|
1249
1353
|
return x(e) === d;
|
|
1250
1354
|
}
|
|
1251
|
-
function
|
|
1355
|
+
function V(e) {
|
|
1252
1356
|
return x(e) === i;
|
|
1253
1357
|
}
|
|
1254
|
-
function
|
|
1358
|
+
function H(e) {
|
|
1255
1359
|
return x(e) === h;
|
|
1256
1360
|
}
|
|
1257
|
-
function
|
|
1361
|
+
function te(e) {
|
|
1258
1362
|
return x(e) === m;
|
|
1259
1363
|
}
|
|
1260
1364
|
function ne(e) {
|
|
1261
1365
|
return x(e) === r;
|
|
1262
1366
|
}
|
|
1263
|
-
function
|
|
1367
|
+
function U(e) {
|
|
1264
1368
|
return x(e) === o;
|
|
1265
1369
|
}
|
|
1266
|
-
function
|
|
1370
|
+
function re(e) {
|
|
1267
1371
|
return x(e) === a;
|
|
1268
1372
|
}
|
|
1269
|
-
function
|
|
1373
|
+
function ie(e) {
|
|
1270
1374
|
return x(e) === f;
|
|
1271
1375
|
}
|
|
1272
|
-
e.AsyncMode = S, e.ConcurrentMode = C, e.ContextConsumer = w, e.ContextProvider = T, e.Element = E, e.ForwardRef = D, e.Fragment = O, e.Lazy = k, e.Memo = A, e.Portal = j, e.Profiler = M, e.StrictMode = N, e.Suspense = P, e.isAsyncMode = I, e.isConcurrentMode =
|
|
1376
|
+
e.AsyncMode = S, e.ConcurrentMode = C, e.ContextConsumer = w, e.ContextProvider = T, e.Element = E, e.ForwardRef = D, e.Fragment = O, e.Lazy = k, e.Memo = A, e.Portal = j, e.Profiler = M, e.StrictMode = N, e.Suspense = P, e.isAsyncMode = I, e.isConcurrentMode = L, e.isContextConsumer = R, e.isContextProvider = z, e.isElement = ee, e.isForwardRef = B, e.isFragment = V, e.isLazy = H, e.isMemo = te, e.isPortal = ne, e.isProfiler = U, e.isStrictMode = re, e.isSuspense = ie, e.isValidElementType = b, e.typeOf = x;
|
|
1273
1377
|
})();
|
|
1274
|
-
})),
|
|
1275
|
-
process.env.NODE_ENV === "production" ? t.exports =
|
|
1276
|
-
})),
|
|
1378
|
+
})), st = /* @__PURE__ */ B(((e, t) => {
|
|
1379
|
+
process.env.NODE_ENV === "production" ? t.exports = at() : t.exports = ot();
|
|
1380
|
+
})), ct = /* @__PURE__ */ B(((e, t) => {
|
|
1277
1381
|
var n = Object.getOwnPropertySymbols, r = Object.prototype.hasOwnProperty, i = Object.prototype.propertyIsEnumerable;
|
|
1278
1382
|
function a(e) {
|
|
1279
1383
|
if (e == null) throw TypeError("Object.assign cannot be called with null or undefined");
|
|
@@ -1306,14 +1410,14 @@ var tt = /* @__PURE__ */ L(((e) => {
|
|
|
1306
1410
|
}
|
|
1307
1411
|
return s;
|
|
1308
1412
|
};
|
|
1309
|
-
})),
|
|
1413
|
+
})), lt = /* @__PURE__ */ B(((e, t) => {
|
|
1310
1414
|
t.exports = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
|
|
1311
|
-
})),
|
|
1415
|
+
})), ut = /* @__PURE__ */ B(((e, t) => {
|
|
1312
1416
|
t.exports = Function.call.bind(Object.prototype.hasOwnProperty);
|
|
1313
|
-
})),
|
|
1417
|
+
})), dt = /* @__PURE__ */ B(((e, t) => {
|
|
1314
1418
|
var n = function() {};
|
|
1315
1419
|
if (process.env.NODE_ENV !== "production") {
|
|
1316
|
-
var r =
|
|
1420
|
+
var r = lt(), i = {}, a = ut();
|
|
1317
1421
|
n = function(e) {
|
|
1318
1422
|
var t = "Warning: " + e;
|
|
1319
1423
|
typeof console < "u" && console.error(t);
|
|
@@ -1346,8 +1450,8 @@ var tt = /* @__PURE__ */ L(((e) => {
|
|
|
1346
1450
|
o.resetWarningCache = function() {
|
|
1347
1451
|
process.env.NODE_ENV !== "production" && (i = {});
|
|
1348
1452
|
}, t.exports = o;
|
|
1349
|
-
})),
|
|
1350
|
-
var n =
|
|
1453
|
+
})), ft = /* @__PURE__ */ B(((e, t) => {
|
|
1454
|
+
var n = st(), r = ct(), i = lt(), a = ut(), o = dt(), s = function() {};
|
|
1351
1455
|
process.env.NODE_ENV !== "production" && (s = function(e) {
|
|
1352
1456
|
var t = "Warning: " + e;
|
|
1353
1457
|
typeof console < "u" && console.error(t);
|
|
@@ -1605,8 +1709,8 @@ var tt = /* @__PURE__ */ L(((e) => {
|
|
|
1605
1709
|
}
|
|
1606
1710
|
return p.checkPropTypes = o, p.resetWarningCache = o.resetWarningCache, p.PropTypes = p, p;
|
|
1607
1711
|
};
|
|
1608
|
-
})),
|
|
1609
|
-
var n =
|
|
1712
|
+
})), pt = /* @__PURE__ */ B(((e, t) => {
|
|
1713
|
+
var n = lt();
|
|
1610
1714
|
function r() {}
|
|
1611
1715
|
function i() {}
|
|
1612
1716
|
i.resetWarningCache = r, t.exports = function() {
|
|
@@ -1645,12 +1749,12 @@ var tt = /* @__PURE__ */ L(((e) => {
|
|
|
1645
1749
|
};
|
|
1646
1750
|
return a.PropTypes = a, a;
|
|
1647
1751
|
};
|
|
1648
|
-
})),
|
|
1752
|
+
})), mt = /* @__PURE__ */ B(((e, t) => {
|
|
1649
1753
|
if (process.env.NODE_ENV !== "production") {
|
|
1650
|
-
var n =
|
|
1651
|
-
t.exports =
|
|
1652
|
-
} else t.exports =
|
|
1653
|
-
})),
|
|
1754
|
+
var n = st();
|
|
1755
|
+
t.exports = ft()(n.isElement, !0);
|
|
1756
|
+
} else t.exports = pt()();
|
|
1757
|
+
})), ht = /* @__PURE__ */ B(((e) => {
|
|
1654
1758
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.dontSetMe = a, e.findInArray = t, e.int = i, e.isFunction = n, e.isNum = r;
|
|
1655
1759
|
function t(e, t) {
|
|
1656
1760
|
for (let n = 0, r = e.length; n < r; n++) if (t.apply(t, [
|
|
@@ -1671,7 +1775,7 @@ var tt = /* @__PURE__ */ L(((e) => {
|
|
|
1671
1775
|
function a(e, t, n) {
|
|
1672
1776
|
if (e[t]) return /* @__PURE__ */ Error(`Invalid prop ${t} passed to ${n} - do not set this, set it on the child.`);
|
|
1673
1777
|
}
|
|
1674
|
-
})),
|
|
1778
|
+
})), gt = /* @__PURE__ */ B(((e) => {
|
|
1675
1779
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.browserPrefixToKey = r, e.browserPrefixToStyle = i, e.default = void 0, e.getPrefix = n;
|
|
1676
1780
|
var t = [
|
|
1677
1781
|
"Moz",
|
|
@@ -1699,9 +1803,9 @@ var tt = /* @__PURE__ */ L(((e) => {
|
|
|
1699
1803
|
return t;
|
|
1700
1804
|
}
|
|
1701
1805
|
e.default = n();
|
|
1702
|
-
})),
|
|
1806
|
+
})), _t = /* @__PURE__ */ B(((e) => {
|
|
1703
1807
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.addClassName = S, e.addEvent = s, e.addUserSelectStyles = y, e.createCSSTransform = m, e.createSVGTransform = h, e.getTouch = _, e.getTouchIdentifier = v, e.getTranslation = g, e.innerHeight = d, e.innerWidth = f, e.matchesSelector = a, e.matchesSelectorAndParentsTo = o, e.offsetXYFromParent = p, e.outerHeight = l, e.outerWidth = u, e.removeClassName = C, e.removeEvent = c, e.scheduleRemoveUserSelectStyles = b;
|
|
1704
|
-
var t =
|
|
1808
|
+
var t = ht(), n = r(gt());
|
|
1705
1809
|
function r(e, t) {
|
|
1706
1810
|
if (typeof WeakMap == "function") var n = /* @__PURE__ */ new WeakMap(), i = /* @__PURE__ */ new WeakMap();
|
|
1707
1811
|
return (r = function(e, t) {
|
|
@@ -1825,9 +1929,9 @@ var tt = /* @__PURE__ */ L(((e) => {
|
|
|
1825
1929
|
function C(e, t) {
|
|
1826
1930
|
e.classList ? e.classList.remove(t) : e.className = e.className.replace(RegExp(`(?:^|\\s)${t}(?!\\S)`, "g"), "");
|
|
1827
1931
|
}
|
|
1828
|
-
})),
|
|
1932
|
+
})), vt = /* @__PURE__ */ B(((e) => {
|
|
1829
1933
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.canDragX = a, e.canDragY = o, e.createCoreData = c, e.createDraggableData = l, e.getBoundPosition = r, e.getControlPosition = s, e.snapToGrid = i;
|
|
1830
|
-
var t =
|
|
1934
|
+
var t = ht(), n = _t();
|
|
1831
1935
|
function r(e, r, i) {
|
|
1832
1936
|
if (!e.props.bounds) return [r, i];
|
|
1833
1937
|
let { bounds: a } = e.props;
|
|
@@ -1906,12 +2010,12 @@ var tt = /* @__PURE__ */ L(((e) => {
|
|
|
1906
2010
|
if (!t) throw Error("<DraggableCore>: Unmounted during event!");
|
|
1907
2011
|
return t;
|
|
1908
2012
|
}
|
|
1909
|
-
})),
|
|
2013
|
+
})), yt = /* @__PURE__ */ B(((e) => {
|
|
1910
2014
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = t;
|
|
1911
2015
|
function t() {}
|
|
1912
|
-
})),
|
|
2016
|
+
})), bt = /* @__PURE__ */ B(((e) => {
|
|
1913
2017
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = void 0;
|
|
1914
|
-
var t = l(
|
|
2018
|
+
var t = l(V("react")), n = c(mt()), r = c(V("react-dom")), i = _t(), a = vt(), o = ht(), s = c(yt());
|
|
1915
2019
|
function c(e) {
|
|
1916
2020
|
return e && e.__esModule ? e : { default: e };
|
|
1917
2021
|
}
|
|
@@ -2071,14 +2175,14 @@ var tt = /* @__PURE__ */ L(((e) => {
|
|
|
2071
2175
|
onMouseDown: function() {},
|
|
2072
2176
|
scale: 1
|
|
2073
2177
|
});
|
|
2074
|
-
})),
|
|
2178
|
+
})), xt = /* @__PURE__ */ B(((e) => {
|
|
2075
2179
|
Object.defineProperty(e, "__esModule", { value: !0 }), Object.defineProperty(e, "DraggableCore", {
|
|
2076
2180
|
enumerable: !0,
|
|
2077
2181
|
get: function() {
|
|
2078
2182
|
return c.default;
|
|
2079
2183
|
}
|
|
2080
2184
|
}), e.default = void 0;
|
|
2081
|
-
var t = d(
|
|
2185
|
+
var t = d(V("react")), n = u(mt()), r = u(V("react-dom")), i = V("clsx"), a = _t(), o = vt(), s = ht(), c = u(bt()), l = u(yt());
|
|
2082
2186
|
function u(e) {
|
|
2083
2187
|
return e && e.__esModule ? e : { default: e };
|
|
2084
2188
|
}
|
|
@@ -2272,12 +2376,12 @@ var tt = /* @__PURE__ */ L(((e) => {
|
|
|
2272
2376
|
},
|
|
2273
2377
|
scale: 1
|
|
2274
2378
|
});
|
|
2275
|
-
})),
|
|
2276
|
-
var { default: n, DraggableCore: r } =
|
|
2379
|
+
})), St = /* @__PURE__ */ B(((e, t) => {
|
|
2380
|
+
var { default: n, DraggableCore: r } = xt();
|
|
2277
2381
|
t.exports = n, t.exports.default = n, t.exports.DraggableCore = r;
|
|
2278
|
-
})),
|
|
2382
|
+
})), Ct = /* @__PURE__ */ B(((e) => {
|
|
2279
2383
|
e.__esModule = !0, e.cloneElement = c;
|
|
2280
|
-
var t = n(
|
|
2384
|
+
var t = n(V("react"));
|
|
2281
2385
|
function n(e) {
|
|
2282
2386
|
return e && e.__esModule ? e : { default: e };
|
|
2283
2387
|
}
|
|
@@ -2327,10 +2431,10 @@ var tt = /* @__PURE__ */ L(((e) => {
|
|
|
2327
2431
|
function c(e, n) {
|
|
2328
2432
|
return n.style && e.props.style && (n.style = i(i({}, e.props.style), n.style)), n.className && e.props.className && (n.className = `${e.props.className} ${n.className}`), /* @__PURE__ */ t.default.cloneElement(e, n);
|
|
2329
2433
|
}
|
|
2330
|
-
})),
|
|
2434
|
+
})), wt = /* @__PURE__ */ B(((e) => {
|
|
2331
2435
|
e.__esModule = !0, e.resizableProps = void 0;
|
|
2332
|
-
var t = n(
|
|
2333
|
-
|
|
2436
|
+
var t = n(mt());
|
|
2437
|
+
St();
|
|
2334
2438
|
function n(e) {
|
|
2335
2439
|
return e && e.__esModule ? e : { default: e };
|
|
2336
2440
|
}
|
|
@@ -2389,9 +2493,9 @@ var tt = /* @__PURE__ */ L(((e) => {
|
|
|
2389
2493
|
return n.axis === "both" || n.axis === "x" ? t.default.number.isRequired(...e) : t.default.number(...e);
|
|
2390
2494
|
}
|
|
2391
2495
|
};
|
|
2392
|
-
})),
|
|
2496
|
+
})), Tt = /* @__PURE__ */ B(((e) => {
|
|
2393
2497
|
e.__esModule = !0, e.default = void 0;
|
|
2394
|
-
var t = o(
|
|
2498
|
+
var t = o(V("react")), n = St(), r = Ct(), i = wt(), a = [
|
|
2395
2499
|
"children",
|
|
2396
2500
|
"className",
|
|
2397
2501
|
"draggableOpts",
|
|
@@ -2588,9 +2692,9 @@ var tt = /* @__PURE__ */ L(((e) => {
|
|
|
2588
2692
|
resizeHandles: ["se"],
|
|
2589
2693
|
transformScale: 1
|
|
2590
2694
|
};
|
|
2591
|
-
})),
|
|
2695
|
+
})), Et = /* @__PURE__ */ B(((e) => {
|
|
2592
2696
|
e.__esModule = !0, e.default = void 0;
|
|
2593
|
-
var t = s(
|
|
2697
|
+
var t = s(V("react")), n = o(mt()), r = o(Tt()), i = wt(), a = [
|
|
2594
2698
|
"handle",
|
|
2595
2699
|
"handleSize",
|
|
2596
2700
|
"onResize",
|
|
@@ -2741,26 +2845,26 @@ var tt = /* @__PURE__ */ L(((e) => {
|
|
|
2741
2845
|
}
|
|
2742
2846
|
};
|
|
2743
2847
|
e.default = g, g.propTypes = u(u({}, i.resizableProps), {}, { children: n.default.element });
|
|
2744
|
-
})),
|
|
2848
|
+
})), Dt = /* @__PURE__ */ B(((e, t) => {
|
|
2745
2849
|
t.exports = function() {
|
|
2746
2850
|
throw Error("Don't instantiate Resizable directly! Use require('react-resizable').Resizable");
|
|
2747
|
-
}, t.exports.Resizable =
|
|
2748
|
-
})),
|
|
2749
|
-
function
|
|
2750
|
-
let { children: t, cols: n, containerWidth: r, margin: i, containerPadding: a, rowHeight: o, maxRows: s, isDraggable: c, isResizable: l, isBounded: u, static: d, useCSSTransforms: f = !0, usePercentages: p = !1, transformScale: m = 1, positionStrategy: h, dragThreshold: g = 0, droppingPosition: _, className: v = "", style:
|
|
2851
|
+
}, t.exports.Resizable = Tt().default, t.exports.ResizableBox = Et().default;
|
|
2852
|
+
})), Ot = St(), kt = Dt(), At = rt();
|
|
2853
|
+
function jt(e) {
|
|
2854
|
+
let { children: t, cols: n, containerWidth: r, margin: i, containerPadding: a, rowHeight: o, maxRows: s, isDraggable: c, isResizable: l, isBounded: u, static: d, useCSSTransforms: f = !0, usePercentages: p = !1, transformScale: m = 1, positionStrategy: h, dragThreshold: g = 0, droppingPosition: _, className: v = "", style: y, handle: x = "", cancel: C = "", x: O, y: k, w: A, h: j, minW: M = 1, maxW: N = Infinity, minH: P = 1, maxH: F = Infinity, i: I, resizeHandles: L, resizeHandle: R, constraints: z = xe, layoutItem: B, layout: V = [], onDragStart: H, onDrag: te, onDragStop: ne, onResizeStart: re, onResize: ie, onResizeStop: ae } = e, [W, le] = D(!1), [fe, K] = D(!1), pe = E(null), q = E({
|
|
2751
2855
|
left: 0,
|
|
2752
2856
|
top: 0
|
|
2753
|
-
}),
|
|
2857
|
+
}), me = E({
|
|
2754
2858
|
top: 0,
|
|
2755
2859
|
left: 0,
|
|
2756
2860
|
width: 0,
|
|
2757
2861
|
height: 0
|
|
2758
|
-
}),
|
|
2759
|
-
|
|
2760
|
-
let _e =
|
|
2862
|
+
}), he = E(void 0), ge = E(V);
|
|
2863
|
+
ge.current = V;
|
|
2864
|
+
let _e = E(null), ve = E(null), ye = E(!1), J = E({
|
|
2761
2865
|
x: 0,
|
|
2762
2866
|
y: 0
|
|
2763
|
-
}),
|
|
2867
|
+
}), be = E(!1), Y = T(() => ({
|
|
2764
2868
|
cols: n,
|
|
2765
2869
|
containerPadding: a,
|
|
2766
2870
|
containerWidth: r,
|
|
@@ -2774,7 +2878,7 @@ function Dt(e) {
|
|
|
2774
2878
|
i,
|
|
2775
2879
|
s,
|
|
2776
2880
|
o
|
|
2777
|
-
]),
|
|
2881
|
+
]), X = T(() => ({
|
|
2778
2882
|
cols: n,
|
|
2779
2883
|
maxRows: s,
|
|
2780
2884
|
containerWidth: r,
|
|
@@ -2788,10 +2892,10 @@ function Dt(e) {
|
|
|
2788
2892
|
r,
|
|
2789
2893
|
o,
|
|
2790
2894
|
i
|
|
2791
|
-
]),
|
|
2792
|
-
...
|
|
2793
|
-
layout:
|
|
2794
|
-
}), [
|
|
2895
|
+
]), Z = S(() => ({
|
|
2896
|
+
...X,
|
|
2897
|
+
layout: ge.current
|
|
2898
|
+
}), [X]), Q = T(() => B ?? {
|
|
2795
2899
|
i: I,
|
|
2796
2900
|
x: O,
|
|
2797
2901
|
y: k,
|
|
@@ -2812,21 +2916,21 @@ function Dt(e) {
|
|
|
2812
2916
|
N,
|
|
2813
2917
|
P,
|
|
2814
2918
|
F
|
|
2815
|
-
]),
|
|
2919
|
+
]), $ = S((e) => {
|
|
2816
2920
|
if (h?.calcStyle) return h.calcStyle(e);
|
|
2817
|
-
if (f) return
|
|
2818
|
-
let t =
|
|
2921
|
+
if (f) return we(e);
|
|
2922
|
+
let t = Te(e);
|
|
2819
2923
|
return p ? {
|
|
2820
2924
|
...t,
|
|
2821
|
-
left:
|
|
2822
|
-
width:
|
|
2925
|
+
left: Ee(e.left / r),
|
|
2926
|
+
width: Ee(e.width / r)
|
|
2823
2927
|
} : t;
|
|
2824
2928
|
}, [
|
|
2825
2929
|
h,
|
|
2826
2930
|
f,
|
|
2827
2931
|
p,
|
|
2828
2932
|
r
|
|
2829
|
-
]), De =
|
|
2933
|
+
]), De = S((e, { node: t }) => {
|
|
2830
2934
|
if (!H) return;
|
|
2831
2935
|
let { offsetParent: n } = t;
|
|
2832
2936
|
if (!n) return;
|
|
@@ -2838,16 +2942,16 @@ function Dt(e) {
|
|
|
2838
2942
|
left: a - o + n.scrollLeft,
|
|
2839
2943
|
top: s - c + n.scrollTop
|
|
2840
2944
|
};
|
|
2841
|
-
if (
|
|
2945
|
+
if (q.current = l, g > 0) {
|
|
2842
2946
|
let t = e;
|
|
2843
|
-
|
|
2947
|
+
J.current = {
|
|
2844
2948
|
x: t.clientX,
|
|
2845
2949
|
y: t.clientY
|
|
2846
|
-
},
|
|
2950
|
+
}, ye.current = !0, be.current = !1, le(!0);
|
|
2847
2951
|
return;
|
|
2848
2952
|
}
|
|
2849
|
-
|
|
2850
|
-
let u =
|
|
2953
|
+
le(!0);
|
|
2954
|
+
let u = ue(Y, l.top, l.left), { x: d, y: f } = Se(z, Q, u.x, u.y, Z());
|
|
2851
2955
|
H(I, d, f, {
|
|
2852
2956
|
e,
|
|
2853
2957
|
node: t,
|
|
@@ -2856,112 +2960,112 @@ function Dt(e) {
|
|
|
2856
2960
|
}, [
|
|
2857
2961
|
H,
|
|
2858
2962
|
m,
|
|
2859
|
-
|
|
2963
|
+
Y,
|
|
2860
2964
|
h,
|
|
2861
2965
|
g,
|
|
2862
2966
|
z,
|
|
2863
|
-
|
|
2864
|
-
|
|
2967
|
+
Q,
|
|
2968
|
+
Z,
|
|
2865
2969
|
I
|
|
2866
|
-
]), Oe =
|
|
2867
|
-
if (!
|
|
2970
|
+
]), Oe = S((e, { node: t, deltaX: n, deltaY: a }) => {
|
|
2971
|
+
if (!te || !W) return;
|
|
2868
2972
|
let s = e;
|
|
2869
|
-
if (
|
|
2870
|
-
let n = s.clientX -
|
|
2973
|
+
if (ye.current && !be.current) {
|
|
2974
|
+
let n = s.clientX - J.current.x, r = s.clientY - J.current.y;
|
|
2871
2975
|
if (Math.hypot(n, r) < g) return;
|
|
2872
|
-
if (
|
|
2873
|
-
let n =
|
|
2976
|
+
if (be.current = !0, ye.current = !1, H) {
|
|
2977
|
+
let n = ue(Y, q.current.top, q.current.left), { x: r, y: i } = Se(z, Q, n.x, n.y, Z());
|
|
2874
2978
|
H(I, r, i, {
|
|
2875
2979
|
e,
|
|
2876
2980
|
node: t,
|
|
2877
|
-
newPosition:
|
|
2981
|
+
newPosition: q.current
|
|
2878
2982
|
});
|
|
2879
2983
|
}
|
|
2880
2984
|
}
|
|
2881
|
-
let c =
|
|
2985
|
+
let c = q.current.top + a, l = q.current.left + n;
|
|
2882
2986
|
if (u) {
|
|
2883
2987
|
let { offsetParent: e } = t;
|
|
2884
2988
|
if (e) {
|
|
2885
|
-
let t = e.clientHeight -
|
|
2886
|
-
c =
|
|
2887
|
-
let n = r -
|
|
2888
|
-
l =
|
|
2989
|
+
let t = e.clientHeight - se(j, o, i[1]);
|
|
2990
|
+
c = de(c, 0, t);
|
|
2991
|
+
let n = r - se(A, oe(Y), i[0]);
|
|
2992
|
+
l = de(l, 0, n);
|
|
2889
2993
|
}
|
|
2890
2994
|
}
|
|
2891
2995
|
let d = {
|
|
2892
2996
|
top: c,
|
|
2893
2997
|
left: l
|
|
2894
2998
|
};
|
|
2895
|
-
|
|
2896
|
-
let f =
|
|
2897
|
-
|
|
2999
|
+
q.current = d;
|
|
3000
|
+
let f = ue(Y, c, l), { x: p, y: m } = Se(z, Q, f.x, f.y, Z());
|
|
3001
|
+
te(I, p, m, {
|
|
2898
3002
|
e,
|
|
2899
3003
|
node: t,
|
|
2900
3004
|
newPosition: d
|
|
2901
3005
|
});
|
|
2902
3006
|
}, [
|
|
2903
|
-
|
|
3007
|
+
te,
|
|
2904
3008
|
H,
|
|
2905
|
-
|
|
3009
|
+
W,
|
|
2906
3010
|
g,
|
|
2907
3011
|
u,
|
|
2908
3012
|
j,
|
|
2909
3013
|
o,
|
|
2910
3014
|
i,
|
|
2911
|
-
|
|
3015
|
+
Y,
|
|
2912
3016
|
r,
|
|
2913
3017
|
A,
|
|
2914
3018
|
I,
|
|
2915
3019
|
z,
|
|
2916
|
-
|
|
2917
|
-
|
|
2918
|
-
]), ke =
|
|
2919
|
-
if (!
|
|
2920
|
-
let n =
|
|
2921
|
-
if (
|
|
3020
|
+
Q,
|
|
3021
|
+
Z
|
|
3022
|
+
]), ke = S((e, { node: t }) => {
|
|
3023
|
+
if (!ne || !W) return;
|
|
3024
|
+
let n = ye.current;
|
|
3025
|
+
if (ye.current = !1, be.current = !1, J.current = {
|
|
2922
3026
|
x: 0,
|
|
2923
3027
|
y: 0
|
|
2924
3028
|
}, n) {
|
|
2925
|
-
|
|
3029
|
+
le(!1), q.current = {
|
|
2926
3030
|
left: 0,
|
|
2927
3031
|
top: 0
|
|
2928
3032
|
};
|
|
2929
3033
|
return;
|
|
2930
3034
|
}
|
|
2931
|
-
let { left: r, top: i } =
|
|
3035
|
+
let { left: r, top: i } = q.current, a = {
|
|
2932
3036
|
top: i,
|
|
2933
3037
|
left: r
|
|
2934
3038
|
};
|
|
2935
|
-
|
|
3039
|
+
le(!1), q.current = {
|
|
2936
3040
|
left: 0,
|
|
2937
3041
|
top: 0
|
|
2938
3042
|
};
|
|
2939
|
-
let o =
|
|
2940
|
-
|
|
3043
|
+
let o = ue(Y, i, r), { x: s, y: c } = Se(z, Q, o.x, o.y, Z());
|
|
3044
|
+
ne(I, s, c, {
|
|
2941
3045
|
e,
|
|
2942
3046
|
node: t,
|
|
2943
3047
|
newPosition: a
|
|
2944
3048
|
});
|
|
2945
3049
|
}, [
|
|
2946
|
-
|
|
2947
|
-
|
|
2948
|
-
|
|
3050
|
+
ne,
|
|
3051
|
+
W,
|
|
3052
|
+
Y,
|
|
2949
3053
|
z,
|
|
2950
|
-
|
|
2951
|
-
|
|
3054
|
+
Q,
|
|
3055
|
+
Z,
|
|
2952
3056
|
I
|
|
2953
3057
|
]);
|
|
2954
3058
|
_e.current = De, ve.current = Oe;
|
|
2955
|
-
let Ae =
|
|
2956
|
-
let s = o === "onResizeStart" ?
|
|
3059
|
+
let Ae = S((e, { node: t, size: n, handle: i }, a, o) => {
|
|
3060
|
+
let s = o === "onResizeStart" ? re : o === "onResize" ? ie : ae;
|
|
2957
3061
|
if (!s) return;
|
|
2958
3062
|
let c;
|
|
2959
|
-
c = t ?
|
|
3063
|
+
c = t ? Ie(i, a, n, r) : {
|
|
2960
3064
|
...n,
|
|
2961
3065
|
top: a.top,
|
|
2962
3066
|
left: a.left
|
|
2963
|
-
},
|
|
2964
|
-
let l =
|
|
3067
|
+
}, me.current = c;
|
|
3068
|
+
let l = G(Y, c.width, c.height), { w: u, h: d } = Ce(z, Q, l.w, l.h, i, Z());
|
|
2965
3069
|
s(I, u, d, {
|
|
2966
3070
|
e: e.nativeEvent,
|
|
2967
3071
|
node: t,
|
|
@@ -2969,71 +3073,71 @@ function Dt(e) {
|
|
|
2969
3073
|
handle: i
|
|
2970
3074
|
});
|
|
2971
3075
|
}, [
|
|
2972
|
-
|
|
2973
|
-
|
|
2974
|
-
|
|
3076
|
+
re,
|
|
3077
|
+
ie,
|
|
3078
|
+
ae,
|
|
2975
3079
|
r,
|
|
2976
|
-
|
|
3080
|
+
Y,
|
|
2977
3081
|
I,
|
|
2978
3082
|
z,
|
|
2979
|
-
|
|
2980
|
-
|
|
2981
|
-
]), je =
|
|
2982
|
-
|
|
2983
|
-
let n =
|
|
3083
|
+
Q,
|
|
3084
|
+
Z
|
|
3085
|
+
]), je = S((e, t) => {
|
|
3086
|
+
K(!0);
|
|
3087
|
+
let n = ce(Y, O, k, A, j);
|
|
2984
3088
|
Ae(e, {
|
|
2985
3089
|
...t,
|
|
2986
3090
|
handle: t.handle
|
|
2987
3091
|
}, n, "onResizeStart");
|
|
2988
3092
|
}, [
|
|
2989
3093
|
Ae,
|
|
2990
|
-
|
|
3094
|
+
Y,
|
|
2991
3095
|
O,
|
|
2992
3096
|
k,
|
|
2993
3097
|
A,
|
|
2994
3098
|
j
|
|
2995
|
-
]),
|
|
2996
|
-
let n =
|
|
3099
|
+
]), Me = S((e, t) => {
|
|
3100
|
+
let n = ce(Y, O, k, A, j);
|
|
2997
3101
|
Ae(e, {
|
|
2998
3102
|
...t,
|
|
2999
3103
|
handle: t.handle
|
|
3000
3104
|
}, n, "onResize");
|
|
3001
3105
|
}, [
|
|
3002
3106
|
Ae,
|
|
3003
|
-
|
|
3107
|
+
Y,
|
|
3004
3108
|
O,
|
|
3005
3109
|
k,
|
|
3006
3110
|
A,
|
|
3007
3111
|
j
|
|
3008
|
-
]),
|
|
3009
|
-
|
|
3112
|
+
]), Ne = S((e, t) => {
|
|
3113
|
+
K(!1), me.current = {
|
|
3010
3114
|
top: 0,
|
|
3011
3115
|
left: 0,
|
|
3012
3116
|
width: 0,
|
|
3013
3117
|
height: 0
|
|
3014
3118
|
};
|
|
3015
|
-
let n =
|
|
3119
|
+
let n = ce(Y, O, k, A, j);
|
|
3016
3120
|
Ae(e, {
|
|
3017
3121
|
...t,
|
|
3018
3122
|
handle: t.handle
|
|
3019
3123
|
}, n, "onResizeStop");
|
|
3020
3124
|
}, [
|
|
3021
3125
|
Ae,
|
|
3022
|
-
|
|
3126
|
+
Y,
|
|
3023
3127
|
O,
|
|
3024
3128
|
k,
|
|
3025
3129
|
A,
|
|
3026
3130
|
j
|
|
3027
3131
|
]);
|
|
3028
|
-
|
|
3132
|
+
w(() => {
|
|
3029
3133
|
if (!_) return;
|
|
3030
|
-
let e =
|
|
3134
|
+
let e = pe.current;
|
|
3031
3135
|
if (!e) return;
|
|
3032
|
-
let t =
|
|
3136
|
+
let t = he.current || {
|
|
3033
3137
|
left: 0,
|
|
3034
3138
|
top: 0
|
|
3035
|
-
}, n =
|
|
3036
|
-
if (!
|
|
3139
|
+
}, n = W && (_.left !== t.left || _.top !== t.top);
|
|
3140
|
+
if (!W) {
|
|
3037
3141
|
let t = {
|
|
3038
3142
|
node: e,
|
|
3039
3143
|
deltaX: _.left,
|
|
@@ -3047,69 +3151,69 @@ function Dt(e) {
|
|
|
3047
3151
|
} else if (n) {
|
|
3048
3152
|
let t = {
|
|
3049
3153
|
node: e,
|
|
3050
|
-
deltaX: _.left -
|
|
3051
|
-
deltaY: _.top -
|
|
3052
|
-
lastX:
|
|
3053
|
-
lastY:
|
|
3154
|
+
deltaX: _.left - q.current.left,
|
|
3155
|
+
deltaY: _.top - q.current.top,
|
|
3156
|
+
lastX: q.current.left,
|
|
3157
|
+
lastY: q.current.top,
|
|
3054
3158
|
x: _.left,
|
|
3055
3159
|
y: _.top
|
|
3056
3160
|
};
|
|
3057
3161
|
ve.current?.(_.e, t);
|
|
3058
3162
|
}
|
|
3059
|
-
|
|
3163
|
+
he.current = _;
|
|
3060
3164
|
}, [
|
|
3061
3165
|
_,
|
|
3062
|
-
|
|
3166
|
+
W,
|
|
3063
3167
|
I
|
|
3064
3168
|
]);
|
|
3065
|
-
let
|
|
3066
|
-
ref:
|
|
3169
|
+
let Pe = ce(Y, O, k, A, j, W ? q.current : null, fe ? me.current : null), Fe = b.Children.only(t), Le = oe(Y), Re = [se(M, Le, i[0]), se(P, o, i[1])], ze = [se(N, Le, i[0]), se(F, o, i[1])], Be = Fe.props, Ve = Be.className, He = Be.style, Ue = b.cloneElement(Fe, {
|
|
3170
|
+
ref: pe,
|
|
3067
3171
|
className: ee("react-grid-item", Ve, v, {
|
|
3068
3172
|
static: d,
|
|
3069
|
-
resizing:
|
|
3173
|
+
resizing: fe,
|
|
3070
3174
|
"react-draggable": c,
|
|
3071
|
-
"react-draggable-dragging":
|
|
3175
|
+
"react-draggable-dragging": W,
|
|
3072
3176
|
dropping: !!_,
|
|
3073
3177
|
cssTransforms: f
|
|
3074
3178
|
}),
|
|
3075
3179
|
style: {
|
|
3076
|
-
...
|
|
3180
|
+
...y,
|
|
3077
3181
|
...He,
|
|
3078
|
-
|
|
3182
|
+
...$(Pe)
|
|
3079
3183
|
}
|
|
3080
3184
|
}), We = R;
|
|
3081
|
-
return Ue = /* @__PURE__ */ (0,
|
|
3185
|
+
return Ue = /* @__PURE__ */ (0, U.jsx)(kt.Resizable, {
|
|
3082
3186
|
draggableOpts: { disabled: !l },
|
|
3083
3187
|
className: l ? void 0 : "react-resizable-hide",
|
|
3084
|
-
width:
|
|
3085
|
-
height:
|
|
3188
|
+
width: Pe.width,
|
|
3189
|
+
height: Pe.height,
|
|
3086
3190
|
minConstraints: Re,
|
|
3087
3191
|
maxConstraints: ze,
|
|
3088
3192
|
onResizeStart: je,
|
|
3089
|
-
onResize:
|
|
3090
|
-
onResizeStop:
|
|
3193
|
+
onResize: Me,
|
|
3194
|
+
onResizeStop: Ne,
|
|
3091
3195
|
transformScale: m,
|
|
3092
3196
|
resizeHandles: L,
|
|
3093
3197
|
handle: We,
|
|
3094
3198
|
children: Ue
|
|
3095
|
-
}), Ue = /* @__PURE__ */ (0,
|
|
3199
|
+
}), Ue = /* @__PURE__ */ (0, U.jsx)(Ot.DraggableCore, {
|
|
3096
3200
|
disabled: !c,
|
|
3097
3201
|
onStart: De,
|
|
3098
3202
|
onDrag: Oe,
|
|
3099
3203
|
onStop: ke,
|
|
3100
|
-
handle:
|
|
3101
|
-
cancel: ".react-resizable-handle" + (
|
|
3204
|
+
handle: x,
|
|
3205
|
+
cancel: ".react-resizable-handle" + (C ? "," + C : ""),
|
|
3102
3206
|
scale: m,
|
|
3103
|
-
nodeRef:
|
|
3207
|
+
nodeRef: pe,
|
|
3104
3208
|
children: Ue
|
|
3105
3209
|
}), Ue;
|
|
3106
3210
|
}
|
|
3107
|
-
var
|
|
3211
|
+
var Mt = () => {}, Nt = "react-grid-layout", Pt = !1;
|
|
3108
3212
|
try {
|
|
3109
|
-
|
|
3213
|
+
Pt = /firefox/i.test(navigator.userAgent);
|
|
3110
3214
|
} catch {}
|
|
3111
|
-
function
|
|
3112
|
-
let n =
|
|
3215
|
+
function Ft(e, t) {
|
|
3216
|
+
let n = b.Children.toArray(e), r = b.Children.toArray(t);
|
|
3113
3217
|
if (n.length !== r.length) return !1;
|
|
3114
3218
|
for (let e = 0; e < n.length; e++) {
|
|
3115
3219
|
let t = n[e], i = r[e];
|
|
@@ -3117,14 +3221,14 @@ function jt(e, t) {
|
|
|
3117
3221
|
}
|
|
3118
3222
|
return !0;
|
|
3119
3223
|
}
|
|
3120
|
-
function
|
|
3224
|
+
function It(e, t, n, r) {
|
|
3121
3225
|
let i = [], a = /* @__PURE__ */ new Set();
|
|
3122
|
-
|
|
3123
|
-
if (!
|
|
3226
|
+
b.Children.forEach(t, (t) => {
|
|
3227
|
+
if (!b.isValidElement(t) || t.key === null) return;
|
|
3124
3228
|
let n = String(t.key);
|
|
3125
3229
|
a.add(n);
|
|
3126
3230
|
let r = e.find((e) => e.i === n);
|
|
3127
|
-
if (r) i.push(
|
|
3231
|
+
if (r) i.push(ye(r));
|
|
3128
3232
|
else {
|
|
3129
3233
|
let e = t.props["data-grid"];
|
|
3130
3234
|
e ? i.push({
|
|
@@ -3145,71 +3249,71 @@ function Mt(e, t, n, r) {
|
|
|
3145
3249
|
}) : i.push({
|
|
3146
3250
|
i: n,
|
|
3147
3251
|
x: 0,
|
|
3148
|
-
y:
|
|
3252
|
+
y: ge(i),
|
|
3149
3253
|
w: 1,
|
|
3150
3254
|
h: 1
|
|
3151
3255
|
});
|
|
3152
3256
|
}
|
|
3153
3257
|
});
|
|
3154
|
-
let o =
|
|
3258
|
+
let o = X(i, { cols: n });
|
|
3155
3259
|
return r.compact(o, n);
|
|
3156
3260
|
}
|
|
3157
|
-
function
|
|
3158
|
-
let { children: t, width: n, gridConfig: r, dragConfig: i, resizeConfig: a, dropConfig: o, positionStrategy: s =
|
|
3159
|
-
...
|
|
3261
|
+
function Lt(e) {
|
|
3262
|
+
let { children: t, width: n, gridConfig: r, dragConfig: i, resizeConfig: a, dropConfig: o, positionStrategy: s = Le, compactor: c, constraints: l = xe, layout: u = [], droppingItem: d, autoSize: f = !0, className: p = "", style: m = {}, innerRef: h, onLayoutChange: g = Mt, onDragStart: _ = Mt, onDrag: v = Mt, onDragStop: y = Mt, onResizeStart: x = Mt, onResize: C = Mt, onResizeStop: O = Mt, onDrop: k = Mt, onDropDragOver: A = Mt } = e, j = T(() => ({
|
|
3263
|
+
...Re,
|
|
3160
3264
|
...r
|
|
3161
|
-
}), [r]), M =
|
|
3162
|
-
...
|
|
3265
|
+
}), [r]), M = T(() => ({
|
|
3266
|
+
...ze,
|
|
3163
3267
|
...i
|
|
3164
|
-
}), [i]), N =
|
|
3165
|
-
...
|
|
3268
|
+
}), [i]), N = T(() => ({
|
|
3269
|
+
...Be,
|
|
3166
3270
|
...a
|
|
3167
|
-
}), [a]), P =
|
|
3168
|
-
...
|
|
3271
|
+
}), [a]), P = T(() => ({
|
|
3272
|
+
...Ve,
|
|
3169
3273
|
...o
|
|
3170
|
-
}), [o]), { cols: F, rowHeight: I, maxRows: L, margin: R, containerPadding: z } = j, { enabled: B, bounded:
|
|
3274
|
+
}), [o]), { cols: F, rowHeight: I, maxRows: L, margin: R, containerPadding: z } = j, { enabled: B, bounded: V, handle: H, cancel: te, threshold: ne } = M, { enabled: re, handles: ie, handleComponent: ae } = N, { enabled: W, defaultItem: ce, onDragOver: ue } = P, G = c ?? Ze("vertical"), de = G.type, fe = G.allowOverlap, K = G.preventCollision ?? !1, q = T(() => d ?? {
|
|
3171
3275
|
i: "__dropping-elem__",
|
|
3172
|
-
...
|
|
3173
|
-
}, [d,
|
|
3174
|
-
He.current =
|
|
3175
|
-
|
|
3176
|
-
}, []),
|
|
3177
|
-
if (
|
|
3178
|
-
let e = !(0,
|
|
3276
|
+
...ce
|
|
3277
|
+
}, [d, ce]), me = s.type === "transform", he = s.scale, ve = z ?? R, [J, be] = D(!1), [X, Q] = D(() => It(u, t, F, G)), [$, Se] = D(null), [Ce, we] = D(!1), [Te, Ee] = D(null), [De, Oe] = D(), ke = E(null), Ae = E(null), je = E(null), Me = E(0), Ne = E(X), Pe = E(u), Fe = E(t), Ie = E(de), He = E(X);
|
|
3278
|
+
He.current = X, w(() => {
|
|
3279
|
+
be(!0), (0, At.deepEqual)(X, u) || g(X);
|
|
3280
|
+
}, []), w(() => {
|
|
3281
|
+
if ($ || Te) return;
|
|
3282
|
+
let e = !(0, At.deepEqual)(u, Pe.current), n = !Ft(t, Fe.current), r = de !== Ie.current;
|
|
3179
3283
|
if (e || n || r) {
|
|
3180
|
-
let n =
|
|
3181
|
-
(0,
|
|
3284
|
+
let n = It(e ? u : X, t, F, G);
|
|
3285
|
+
(0, At.deepEqual)(n, X) || Q(n);
|
|
3182
3286
|
}
|
|
3183
|
-
|
|
3287
|
+
Pe.current = u, Fe.current = t, Ie.current = de;
|
|
3184
3288
|
}, [
|
|
3185
3289
|
u,
|
|
3186
3290
|
t,
|
|
3187
3291
|
F,
|
|
3188
|
-
|
|
3189
|
-
|
|
3190
|
-
Q,
|
|
3292
|
+
de,
|
|
3293
|
+
G,
|
|
3191
3294
|
$,
|
|
3192
|
-
|
|
3193
|
-
|
|
3194
|
-
|
|
3295
|
+
Te,
|
|
3296
|
+
X
|
|
3297
|
+
]), w(() => {
|
|
3298
|
+
!$ && !(0, At.deepEqual)(X, Ne.current) && (Ne.current = X, g(X.filter((e) => e.i !== q.i)));
|
|
3195
3299
|
}, [
|
|
3196
|
-
|
|
3197
|
-
|
|
3300
|
+
X,
|
|
3301
|
+
$,
|
|
3198
3302
|
g,
|
|
3199
3303
|
q.i
|
|
3200
3304
|
]);
|
|
3201
|
-
let Ue =
|
|
3305
|
+
let Ue = T(() => {
|
|
3202
3306
|
if (!f) return;
|
|
3203
|
-
let e =
|
|
3307
|
+
let e = ge(X), t = ve[1];
|
|
3204
3308
|
return e * I + (e - 1) * R[1] + t * 2 + "px";
|
|
3205
3309
|
}, [
|
|
3206
3310
|
f,
|
|
3207
|
-
|
|
3311
|
+
X,
|
|
3208
3312
|
I,
|
|
3209
3313
|
R,
|
|
3210
|
-
|
|
3211
|
-
]), We =
|
|
3212
|
-
let i = He.current, a =
|
|
3314
|
+
ve
|
|
3315
|
+
]), We = S((e, t, n, r) => {
|
|
3316
|
+
let i = He.current, a = _e(i, e);
|
|
3213
3317
|
if (!a) return;
|
|
3214
3318
|
let o = {
|
|
3215
3319
|
w: a.w,
|
|
@@ -3218,9 +3322,9 @@ function Nt(e) {
|
|
|
3218
3322
|
y: a.y,
|
|
3219
3323
|
i: e
|
|
3220
3324
|
};
|
|
3221
|
-
ke.current =
|
|
3222
|
-
}, [_]), Ge =
|
|
3223
|
-
let i = He.current, a = ke.current, o =
|
|
3325
|
+
ke.current = ye(a), je.current = i, Se(o), _(i, a, a, null, r.e, r.node);
|
|
3326
|
+
}, [_]), Ge = S((e, t, n, r) => {
|
|
3327
|
+
let i = He.current, a = ke.current, o = _e(i, e);
|
|
3224
3328
|
if (!o) return;
|
|
3225
3329
|
let s = {
|
|
3226
3330
|
w: o.w,
|
|
@@ -3228,37 +3332,37 @@ function Nt(e) {
|
|
|
3228
3332
|
x: o.x,
|
|
3229
3333
|
y: o.y,
|
|
3230
3334
|
i: e
|
|
3231
|
-
}, c =
|
|
3232
|
-
v(c, a, o, s, r.e, r.node),
|
|
3335
|
+
}, c = Z(i, o, t, n, !0, K, de, F, fe);
|
|
3336
|
+
v(c, a, o, s, r.e, r.node), Q(G.compact(c, F)), Se(s);
|
|
3233
3337
|
}, [
|
|
3234
3338
|
K,
|
|
3235
|
-
|
|
3339
|
+
de,
|
|
3236
3340
|
F,
|
|
3237
|
-
|
|
3238
|
-
|
|
3341
|
+
fe,
|
|
3342
|
+
G,
|
|
3239
3343
|
v
|
|
3240
|
-
]), Ke =
|
|
3241
|
-
if (
|
|
3242
|
-
let i = He.current, a = ke.current, o =
|
|
3344
|
+
]), Ke = S((e, t, n, r) => {
|
|
3345
|
+
if (!$) return;
|
|
3346
|
+
let i = He.current, a = ke.current, o = _e(i, e);
|
|
3243
3347
|
if (!o) return;
|
|
3244
|
-
let s =
|
|
3245
|
-
|
|
3348
|
+
let s = Z(i, o, t, n, !0, K, de, F, fe), c = G.compact(s, F);
|
|
3349
|
+
y(c, a, o, null, r.e, r.node);
|
|
3246
3350
|
let l = je.current;
|
|
3247
|
-
ke.current = null, je.current = null,
|
|
3351
|
+
ke.current = null, je.current = null, Se(null), Q(c), l && !(0, At.deepEqual)(l, c) && g(c);
|
|
3248
3352
|
}, [
|
|
3249
|
-
|
|
3353
|
+
$,
|
|
3250
3354
|
K,
|
|
3251
|
-
|
|
3355
|
+
de,
|
|
3252
3356
|
F,
|
|
3253
|
-
|
|
3254
|
-
|
|
3255
|
-
|
|
3357
|
+
fe,
|
|
3358
|
+
G,
|
|
3359
|
+
y,
|
|
3256
3360
|
g
|
|
3257
|
-
]),
|
|
3258
|
-
let i = He.current, a =
|
|
3259
|
-
a && (Ae.current =
|
|
3260
|
-
}, [
|
|
3261
|
-
let i = He.current, a = Ae.current, { handle: o } = r, s = !1, c, l, [u, d] =
|
|
3361
|
+
]), qe = S((e, t, n, r) => {
|
|
3362
|
+
let i = He.current, a = _e(i, e);
|
|
3363
|
+
a && (Ae.current = ye(a), je.current = i, we(!0), x(i, a, a, null, r.e, r.node));
|
|
3364
|
+
}, [x]), Je = S((e, t, n, r) => {
|
|
3365
|
+
let i = He.current, a = Ae.current, { handle: o } = r, s = !1, c, l, [u, d] = Y(i, e, (e) => (c = e.x, l = e.y, [
|
|
3262
3366
|
"sw",
|
|
3263
3367
|
"w",
|
|
3264
3368
|
"nw",
|
|
@@ -3272,7 +3376,7 @@ function Nt(e) {
|
|
|
3272
3376
|
"ne",
|
|
3273
3377
|
"n",
|
|
3274
3378
|
"nw"
|
|
3275
|
-
].includes(o) && (l = e.y + (e.h - n), n = e.y !== l && l < 0 ? e.h : n, l = l < 0 ? 0 : l), s = !0), K && !
|
|
3379
|
+
].includes(o) && (l = e.y + (e.h - n), n = e.y !== l && l < 0 ? e.h : n, l = l < 0 ? 0 : l), s = !0), K && !fe && pe(i, {
|
|
3276
3380
|
...e,
|
|
3277
3381
|
w: t,
|
|
3278
3382
|
h: n,
|
|
@@ -3281,7 +3385,7 @@ function Nt(e) {
|
|
|
3281
3385
|
}).filter((t) => t.i !== e.i).length > 0 && (l = e.y, n = e.h, c = e.x, t = e.w, s = !1), e.w = t, e.h = n, e));
|
|
3282
3386
|
if (!d) return;
|
|
3283
3387
|
let f = u;
|
|
3284
|
-
s && c !== void 0 && l !== void 0 && (f =
|
|
3388
|
+
s && c !== void 0 && l !== void 0 && (f = Z(u, d, c, l, !0, K, de, F, fe));
|
|
3285
3389
|
let p = {
|
|
3286
3390
|
w: d.w,
|
|
3287
3391
|
h: d.h,
|
|
@@ -3290,39 +3394,39 @@ function Nt(e) {
|
|
|
3290
3394
|
i: e,
|
|
3291
3395
|
static: !0
|
|
3292
3396
|
};
|
|
3293
|
-
|
|
3397
|
+
C(f, a, d, p, r.e, r.node), Q(G.compact(f, F)), Se(p);
|
|
3294
3398
|
}, [
|
|
3295
3399
|
K,
|
|
3296
|
-
|
|
3400
|
+
de,
|
|
3297
3401
|
F,
|
|
3298
|
-
|
|
3299
|
-
|
|
3300
|
-
|
|
3301
|
-
]),
|
|
3302
|
-
let i = He.current, a = Ae.current, o =
|
|
3402
|
+
fe,
|
|
3403
|
+
G,
|
|
3404
|
+
C
|
|
3405
|
+
]), Ye = S((e, t, n, r) => {
|
|
3406
|
+
let i = He.current, a = Ae.current, o = _e(i, e), s = G.compact(i, F);
|
|
3303
3407
|
O(s, a, o ?? null, null, r.e, r.node);
|
|
3304
3408
|
let c = je.current;
|
|
3305
|
-
Ae.current = null, je.current = null,
|
|
3409
|
+
Ae.current = null, je.current = null, Se(null), we(!1), Q(s), c && !(0, At.deepEqual)(c, s) && g(s);
|
|
3306
3410
|
}, [
|
|
3307
3411
|
F,
|
|
3308
|
-
|
|
3412
|
+
G,
|
|
3309
3413
|
O,
|
|
3310
3414
|
g
|
|
3311
|
-
]),
|
|
3415
|
+
]), Xe = S(() => {
|
|
3312
3416
|
let e = He.current;
|
|
3313
3417
|
if (!e.some((e) => e.i === q.i)) {
|
|
3314
|
-
Ee(null),
|
|
3418
|
+
Ee(null), Se(null), Oe(void 0);
|
|
3315
3419
|
return;
|
|
3316
3420
|
}
|
|
3317
|
-
|
|
3421
|
+
Q(G.compact(e.filter((e) => e.i !== q.i), F)), Ee(null), Se(null), Oe(void 0);
|
|
3318
3422
|
}, [
|
|
3319
3423
|
q.i,
|
|
3320
3424
|
F,
|
|
3321
|
-
|
|
3322
|
-
]), Qe =
|
|
3323
|
-
if (e.preventDefault(), e.stopPropagation(),
|
|
3324
|
-
let t =
|
|
3325
|
-
if (t === !1) return
|
|
3425
|
+
G
|
|
3426
|
+
]), Qe = S((e) => {
|
|
3427
|
+
if (e.preventDefault(), e.stopPropagation(), Pt && !e.nativeEvent.target?.classList.contains(Nt)) return !1;
|
|
3428
|
+
let t = ue ? ue(e.nativeEvent) : A(e);
|
|
3429
|
+
if (t === !1) return Te && Xe(), !1;
|
|
3326
3430
|
let { dragOffsetX: r = 0, dragOffsetY: i = 0, ...a } = t ?? {}, o = {
|
|
3327
3431
|
...q,
|
|
3328
3432
|
...a
|
|
@@ -3332,16 +3436,16 @@ function Nt(e) {
|
|
|
3332
3436
|
maxRows: L,
|
|
3333
3437
|
rowHeight: I,
|
|
3334
3438
|
containerWidth: n,
|
|
3335
|
-
containerPadding:
|
|
3336
|
-
}, l =
|
|
3337
|
-
left: g /
|
|
3338
|
-
top: _ /
|
|
3439
|
+
containerPadding: ve
|
|
3440
|
+
}, l = oe(c), u = se(o.w, l, R[0]), d = se(o.h, I, R[1]), f = u / 2, p = d / 2, m = e.clientX - s.left + r - f, h = e.clientY - s.top + i - p, g = Math.max(0, m), _ = Math.max(0, h), v = {
|
|
3441
|
+
left: g / he,
|
|
3442
|
+
top: _ / he,
|
|
3339
3443
|
e: e.nativeEvent
|
|
3340
3444
|
};
|
|
3341
|
-
if (
|
|
3445
|
+
if (Te) De && (De.left !== v.left || De.top !== v.top) && Oe(v);
|
|
3342
3446
|
else {
|
|
3343
|
-
let e =
|
|
3344
|
-
Ee(/* @__PURE__ */ (0,
|
|
3447
|
+
let e = le(c, _, g, o.w, o.h);
|
|
3448
|
+
Ee(/* @__PURE__ */ (0, U.jsx)("div", {}, o.i)), Oe(v), Q([...He.current.filter((e) => e.i !== o.i), {
|
|
3345
3449
|
...o,
|
|
3346
3450
|
x: e.x,
|
|
3347
3451
|
y: e.y,
|
|
@@ -3350,59 +3454,59 @@ function Nt(e) {
|
|
|
3350
3454
|
}]);
|
|
3351
3455
|
}
|
|
3352
3456
|
}, [
|
|
3353
|
-
|
|
3457
|
+
Te,
|
|
3354
3458
|
De,
|
|
3355
3459
|
q,
|
|
3356
|
-
|
|
3460
|
+
ue,
|
|
3357
3461
|
A,
|
|
3358
|
-
|
|
3359
|
-
|
|
3462
|
+
Xe,
|
|
3463
|
+
he,
|
|
3360
3464
|
F,
|
|
3361
3465
|
R,
|
|
3362
3466
|
L,
|
|
3363
3467
|
I,
|
|
3364
3468
|
n,
|
|
3365
|
-
|
|
3366
|
-
]), $e =
|
|
3367
|
-
e.preventDefault(), e.stopPropagation(), Me.current--, Me.current < 0 && (Me.current = 0), Me.current === 0 &&
|
|
3368
|
-
}, [
|
|
3469
|
+
ve
|
|
3470
|
+
]), $e = S((e) => {
|
|
3471
|
+
e.preventDefault(), e.stopPropagation(), Me.current--, Me.current < 0 && (Me.current = 0), Me.current === 0 && Xe();
|
|
3472
|
+
}, [Xe]), et = S((e) => {
|
|
3369
3473
|
e.preventDefault(), e.stopPropagation(), Me.current++;
|
|
3370
|
-
}, []), tt =
|
|
3474
|
+
}, []), tt = S((e) => {
|
|
3371
3475
|
e.preventDefault(), e.stopPropagation();
|
|
3372
3476
|
let t = He.current, n = t.find((e) => e.i === q.i);
|
|
3373
|
-
Me.current = 0,
|
|
3477
|
+
Me.current = 0, Xe(), k(t, n, e.nativeEvent);
|
|
3374
3478
|
}, [
|
|
3375
3479
|
q.i,
|
|
3376
|
-
|
|
3480
|
+
Xe,
|
|
3377
3481
|
k
|
|
3378
|
-
]), nt =
|
|
3482
|
+
]), nt = S((e, t) => {
|
|
3379
3483
|
if (!e || !e.key) return null;
|
|
3380
|
-
let r =
|
|
3484
|
+
let r = _e(X, String(e.key));
|
|
3381
3485
|
if (!r) return null;
|
|
3382
|
-
let i = typeof r.isDraggable == "boolean" ? r.isDraggable : !r.static && B, a = typeof r.isResizable == "boolean" ? r.isResizable : !r.static &&
|
|
3383
|
-
return /* @__PURE__ */ (0,
|
|
3486
|
+
let i = typeof r.isDraggable == "boolean" ? r.isDraggable : !r.static && B, a = typeof r.isResizable == "boolean" ? r.isResizable : !r.static && re, o = r.resizeHandles || [...ie], c = i && V && r.isBounded !== !1, u = ae;
|
|
3487
|
+
return /* @__PURE__ */ (0, U.jsx)(jt, {
|
|
3384
3488
|
containerWidth: n,
|
|
3385
3489
|
cols: F,
|
|
3386
3490
|
margin: R,
|
|
3387
|
-
containerPadding:
|
|
3491
|
+
containerPadding: ve,
|
|
3388
3492
|
maxRows: L,
|
|
3389
3493
|
rowHeight: I,
|
|
3390
|
-
cancel:
|
|
3494
|
+
cancel: te,
|
|
3391
3495
|
handle: H,
|
|
3392
3496
|
onDragStart: We,
|
|
3393
3497
|
onDrag: Ge,
|
|
3394
3498
|
onDragStop: Ke,
|
|
3395
|
-
onResizeStart:
|
|
3396
|
-
onResize:
|
|
3397
|
-
onResizeStop:
|
|
3499
|
+
onResizeStart: qe,
|
|
3500
|
+
onResize: Je,
|
|
3501
|
+
onResizeStop: Ye,
|
|
3398
3502
|
isDraggable: i,
|
|
3399
3503
|
isResizable: a,
|
|
3400
3504
|
isBounded: c,
|
|
3401
|
-
useCSSTransforms:
|
|
3402
|
-
usePercentages: !
|
|
3403
|
-
transformScale:
|
|
3505
|
+
useCSSTransforms: me && J,
|
|
3506
|
+
usePercentages: !J,
|
|
3507
|
+
transformScale: he,
|
|
3404
3508
|
positionStrategy: s,
|
|
3405
|
-
dragThreshold:
|
|
3509
|
+
dragThreshold: ne,
|
|
3406
3510
|
w: r.w,
|
|
3407
3511
|
h: r.h,
|
|
3408
3512
|
x: r.x,
|
|
@@ -3418,94 +3522,94 @@ function Nt(e) {
|
|
|
3418
3522
|
resizeHandle: u,
|
|
3419
3523
|
constraints: l,
|
|
3420
3524
|
layoutItem: r,
|
|
3421
|
-
layout:
|
|
3525
|
+
layout: X,
|
|
3422
3526
|
children: e
|
|
3423
3527
|
}, r.i);
|
|
3424
3528
|
}, [
|
|
3425
|
-
|
|
3529
|
+
X,
|
|
3426
3530
|
n,
|
|
3427
3531
|
F,
|
|
3428
3532
|
R,
|
|
3429
|
-
|
|
3533
|
+
ve,
|
|
3430
3534
|
L,
|
|
3431
3535
|
I,
|
|
3432
|
-
|
|
3536
|
+
te,
|
|
3433
3537
|
H,
|
|
3434
3538
|
We,
|
|
3435
3539
|
Ge,
|
|
3436
3540
|
Ke,
|
|
3541
|
+
qe,
|
|
3437
3542
|
Je,
|
|
3438
3543
|
Ye,
|
|
3439
|
-
Xe,
|
|
3440
3544
|
B,
|
|
3441
|
-
|
|
3442
|
-
|
|
3443
|
-
|
|
3444
|
-
X,
|
|
3545
|
+
re,
|
|
3546
|
+
V,
|
|
3547
|
+
me,
|
|
3445
3548
|
J,
|
|
3549
|
+
he,
|
|
3446
3550
|
s,
|
|
3447
|
-
|
|
3551
|
+
ne,
|
|
3448
3552
|
De,
|
|
3449
|
-
|
|
3450
|
-
|
|
3553
|
+
ie,
|
|
3554
|
+
ae,
|
|
3451
3555
|
l
|
|
3452
|
-
]), rt = () =>
|
|
3453
|
-
w:
|
|
3454
|
-
h:
|
|
3455
|
-
x:
|
|
3456
|
-
y:
|
|
3457
|
-
i:
|
|
3458
|
-
className: `react-grid-placeholder ${
|
|
3556
|
+
]), rt = () => $ ? /* @__PURE__ */ (0, U.jsx)(jt, {
|
|
3557
|
+
w: $.w,
|
|
3558
|
+
h: $.h,
|
|
3559
|
+
x: $.x,
|
|
3560
|
+
y: $.y,
|
|
3561
|
+
i: $.i,
|
|
3562
|
+
className: `react-grid-placeholder ${Ce ? "placeholder-resizing" : ""}`,
|
|
3459
3563
|
containerWidth: n,
|
|
3460
3564
|
cols: F,
|
|
3461
3565
|
margin: R,
|
|
3462
|
-
containerPadding:
|
|
3566
|
+
containerPadding: ve,
|
|
3463
3567
|
maxRows: L,
|
|
3464
3568
|
rowHeight: I,
|
|
3465
3569
|
isDraggable: !1,
|
|
3466
3570
|
isResizable: !1,
|
|
3467
3571
|
isBounded: !1,
|
|
3468
|
-
useCSSTransforms:
|
|
3469
|
-
transformScale:
|
|
3572
|
+
useCSSTransforms: me,
|
|
3573
|
+
transformScale: he,
|
|
3470
3574
|
constraints: l,
|
|
3471
|
-
layout:
|
|
3472
|
-
children: /* @__PURE__ */ (0,
|
|
3575
|
+
layout: X,
|
|
3576
|
+
children: /* @__PURE__ */ (0, U.jsx)("div", {})
|
|
3473
3577
|
}) : null;
|
|
3474
|
-
return /* @__PURE__ */ (0,
|
|
3578
|
+
return /* @__PURE__ */ (0, U.jsxs)("div", {
|
|
3475
3579
|
ref: h,
|
|
3476
|
-
className: ee(
|
|
3580
|
+
className: ee(Nt, p),
|
|
3477
3581
|
style: {
|
|
3478
3582
|
height: Ue,
|
|
3479
3583
|
...m
|
|
3480
3584
|
},
|
|
3481
|
-
onDrop:
|
|
3482
|
-
onDragLeave:
|
|
3483
|
-
onDragEnter:
|
|
3484
|
-
onDragOver:
|
|
3585
|
+
onDrop: W ? tt : void 0,
|
|
3586
|
+
onDragLeave: W ? $e : void 0,
|
|
3587
|
+
onDragEnter: W ? et : void 0,
|
|
3588
|
+
onDragOver: W ? Qe : void 0,
|
|
3485
3589
|
children: [
|
|
3486
|
-
|
|
3487
|
-
|
|
3590
|
+
b.Children.map(t, (e) => b.isValidElement(e) ? nt(e) : null),
|
|
3591
|
+
W && Te && nt(Te, !0),
|
|
3488
3592
|
rt()
|
|
3489
3593
|
]
|
|
3490
3594
|
});
|
|
3491
3595
|
}
|
|
3492
|
-
var
|
|
3596
|
+
var Rt = {
|
|
3493
3597
|
lg: 1200,
|
|
3494
3598
|
md: 996,
|
|
3495
3599
|
sm: 768,
|
|
3496
3600
|
xs: 480,
|
|
3497
3601
|
xxs: 0
|
|
3498
|
-
},
|
|
3602
|
+
}, zt = {
|
|
3499
3603
|
lg: 12,
|
|
3500
3604
|
md: 10,
|
|
3501
3605
|
sm: 6,
|
|
3502
3606
|
xs: 4,
|
|
3503
3607
|
xxs: 2
|
|
3504
|
-
},
|
|
3505
|
-
function
|
|
3608
|
+
}, Bt = () => {};
|
|
3609
|
+
function Vt(e, t, n, r) {
|
|
3506
3610
|
let i = [];
|
|
3507
|
-
|
|
3508
|
-
if (!
|
|
3611
|
+
b.Children.forEach(t, (t) => {
|
|
3612
|
+
if (!b.isValidElement(t) || t.key === null) return;
|
|
3509
3613
|
let n = String(t.key), r = e.find((e) => e.i === n);
|
|
3510
3614
|
if (r) i.push({
|
|
3511
3615
|
...r,
|
|
@@ -3531,36 +3635,36 @@ function Lt(e, t, n, r) {
|
|
|
3531
3635
|
}) : i.push({
|
|
3532
3636
|
i: n,
|
|
3533
3637
|
x: 0,
|
|
3534
|
-
y:
|
|
3638
|
+
y: ge(i),
|
|
3535
3639
|
w: 1,
|
|
3536
3640
|
h: 1
|
|
3537
3641
|
});
|
|
3538
3642
|
}
|
|
3539
3643
|
});
|
|
3540
|
-
let a =
|
|
3644
|
+
let a = X(i, { cols: n });
|
|
3541
3645
|
return r.compact(a, n);
|
|
3542
3646
|
}
|
|
3543
|
-
function
|
|
3544
|
-
let { children: t, width: n, breakpoint: r, breakpoints: i =
|
|
3545
|
-
|
|
3647
|
+
function Ht(e) {
|
|
3648
|
+
let { children: t, width: n, breakpoint: r, breakpoints: i = Rt, cols: a = zt, layouts: o = {}, rowHeight: s = 150, maxRows: c = Infinity, margin: l = [10, 10], containerPadding: u = null, compactor: d, onBreakpointChange: f = Bt, onLayoutChange: p = Bt, onWidthChange: m = Bt, ...h } = e, g = d ?? Ze("vertical"), _ = g.type, v = g.allowOverlap, y = T(() => r ?? $e(i, n), []), b = T(() => et(y, a), [y, a]), x = T(() => tt(o, i, y, y, b, _), []), [C, O] = D(y), [k, A] = D(b), [j, M] = D(x), [N, P] = D(o), F = E(n), I = E(r), L = E(i), R = E(a), z = E(o), ee = E(_), B = E(N);
|
|
3649
|
+
w(() => {
|
|
3546
3650
|
B.current = N;
|
|
3547
3651
|
}, [N]);
|
|
3548
|
-
let
|
|
3652
|
+
let V = T(() => (0, At.deepEqual)(o, z.current) ? null : tt(o, i, C, C, k, g), [
|
|
3549
3653
|
o,
|
|
3550
3654
|
i,
|
|
3551
|
-
|
|
3655
|
+
C,
|
|
3552
3656
|
k,
|
|
3553
3657
|
g
|
|
3554
|
-
]), H =
|
|
3555
|
-
|
|
3556
|
-
|
|
3557
|
-
}, [
|
|
3558
|
-
if (_ !==
|
|
3559
|
-
let e = g.compact(
|
|
3658
|
+
]), H = V ?? j;
|
|
3659
|
+
w(() => {
|
|
3660
|
+
V !== null && (M(V), P(o), B.current = o, z.current = o);
|
|
3661
|
+
}, [V, o]), w(() => {
|
|
3662
|
+
if (_ !== ee.current) {
|
|
3663
|
+
let e = g.compact(J(H), k), t = {
|
|
3560
3664
|
...B.current,
|
|
3561
|
-
[
|
|
3665
|
+
[C]: e
|
|
3562
3666
|
};
|
|
3563
|
-
M(e), P(t), B.current = t, p(e, t),
|
|
3667
|
+
M(e), P(t), B.current = t, p(e, t), ee.current = _;
|
|
3564
3668
|
}
|
|
3565
3669
|
}, [
|
|
3566
3670
|
_,
|
|
@@ -3568,26 +3672,26 @@ function Rt(e) {
|
|
|
3568
3672
|
H,
|
|
3569
3673
|
k,
|
|
3570
3674
|
v,
|
|
3571
|
-
|
|
3675
|
+
C,
|
|
3572
3676
|
p
|
|
3573
|
-
]),
|
|
3574
|
-
let e = n !== F.current, o = r !== I.current, s = !(0,
|
|
3677
|
+
]), w(() => {
|
|
3678
|
+
let e = n !== F.current, o = r !== I.current, s = !(0, At.deepEqual)(i, L.current), c = !(0, At.deepEqual)(a, R.current);
|
|
3575
3679
|
if (e || o || s || c) {
|
|
3576
|
-
let e = r ??
|
|
3680
|
+
let e = r ?? $e(i, n), o = et(e, a), d = C;
|
|
3577
3681
|
if (d !== e || s || c) {
|
|
3578
3682
|
let n = { ...B.current };
|
|
3579
|
-
n[d] || (n[d] =
|
|
3580
|
-
let r =
|
|
3581
|
-
r =
|
|
3683
|
+
n[d] || (n[d] = J(j));
|
|
3684
|
+
let r = tt(n, i, e, d, o, g);
|
|
3685
|
+
r = Vt(r, t, o, g), n[e] = r, O(e), A(o), M(r), P(n), B.current = n, f(e, o), p(r, n);
|
|
3582
3686
|
}
|
|
3583
|
-
m(n,
|
|
3687
|
+
m(n, nt(l, e), o, u ? nt(u, e) : null), F.current = n, I.current = r, L.current = i, R.current = a;
|
|
3584
3688
|
}
|
|
3585
3689
|
}, [
|
|
3586
3690
|
n,
|
|
3587
3691
|
r,
|
|
3588
3692
|
i,
|
|
3589
3693
|
a,
|
|
3590
|
-
|
|
3694
|
+
C,
|
|
3591
3695
|
k,
|
|
3592
3696
|
j,
|
|
3593
3697
|
t,
|
|
@@ -3600,40 +3704,40 @@ function Rt(e) {
|
|
|
3600
3704
|
p,
|
|
3601
3705
|
m
|
|
3602
3706
|
]);
|
|
3603
|
-
let
|
|
3707
|
+
let te = S((e) => {
|
|
3604
3708
|
let t = {
|
|
3605
3709
|
...B.current,
|
|
3606
|
-
[
|
|
3710
|
+
[C]: e
|
|
3607
3711
|
};
|
|
3608
3712
|
M(e), P(t), B.current = t, p(e, t);
|
|
3609
|
-
}, [
|
|
3713
|
+
}, [C, p]), ne = T(() => nt(l, C), [l, C]), re = T(() => u === null ? null : nt(u, C), [u, C]), ie = T(() => ({
|
|
3610
3714
|
cols: k,
|
|
3611
3715
|
rowHeight: s,
|
|
3612
3716
|
maxRows: c,
|
|
3613
|
-
margin:
|
|
3614
|
-
containerPadding:
|
|
3717
|
+
margin: ne,
|
|
3718
|
+
containerPadding: re
|
|
3615
3719
|
}), [
|
|
3616
3720
|
k,
|
|
3617
3721
|
s,
|
|
3618
3722
|
c,
|
|
3619
|
-
|
|
3620
|
-
|
|
3723
|
+
ne,
|
|
3724
|
+
re
|
|
3621
3725
|
]);
|
|
3622
|
-
return /* @__PURE__ */ (0,
|
|
3726
|
+
return /* @__PURE__ */ (0, U.jsx)(Lt, {
|
|
3623
3727
|
...h,
|
|
3624
3728
|
width: n,
|
|
3625
|
-
gridConfig:
|
|
3729
|
+
gridConfig: ie,
|
|
3626
3730
|
compactor: g,
|
|
3627
|
-
onLayoutChange:
|
|
3731
|
+
onLayoutChange: te,
|
|
3628
3732
|
layout: H,
|
|
3629
3733
|
children: t
|
|
3630
3734
|
});
|
|
3631
3735
|
}
|
|
3632
3736
|
//#endregion
|
|
3633
3737
|
//#region src/DashboardGridLayout.tsx
|
|
3634
|
-
function
|
|
3635
|
-
let t =
|
|
3636
|
-
return
|
|
3738
|
+
function Ut({ editMode: e }) {
|
|
3739
|
+
let t = o();
|
|
3740
|
+
return y.useEffect(() => {
|
|
3637
3741
|
if (e) return t.startDrag({
|
|
3638
3742
|
id: "dashboard-layout",
|
|
3639
3743
|
type: "dashboard-widget",
|
|
@@ -3644,17 +3748,17 @@ function zt({ editMode: e }) {
|
|
|
3644
3748
|
t.endDrag("dashboard");
|
|
3645
3749
|
}, [e, t]), null;
|
|
3646
3750
|
}
|
|
3647
|
-
var
|
|
3751
|
+
var Wt = [
|
|
3648
3752
|
"hsl(var(--chart-1))",
|
|
3649
3753
|
"hsl(var(--chart-2))",
|
|
3650
3754
|
"hsl(var(--chart-3))",
|
|
3651
3755
|
"hsl(var(--chart-4))",
|
|
3652
3756
|
"hsl(var(--chart-5))"
|
|
3653
|
-
],
|
|
3654
|
-
let { width:
|
|
3757
|
+
], Gt = ({ schema: e, className: t, onLayoutChange: r, persistLayoutKey: i = "dashboard-layout", onRefresh: a }) => {
|
|
3758
|
+
let { width: o, containerRef: p, mounted: m } = it(), [h, g] = y.useState(!1), [v, b] = y.useState(!1), x = s(), S = y.useRef(null), C = y.useCallback(() => {
|
|
3655
3759
|
a && (b(!0), a(), setTimeout(() => b(!1), 600));
|
|
3656
3760
|
}, [a]);
|
|
3657
|
-
|
|
3761
|
+
y.useEffect(() => {
|
|
3658
3762
|
if (!(!e.refreshInterval || e.refreshInterval <= 0 || !a)) return S.current = setInterval(C, e.refreshInterval * 1e3), () => {
|
|
3659
3763
|
S.current && clearInterval(S.current);
|
|
3660
3764
|
};
|
|
@@ -3663,7 +3767,7 @@ var Bt = [
|
|
|
3663
3767
|
a,
|
|
3664
3768
|
C
|
|
3665
3769
|
]);
|
|
3666
|
-
let [w, T] =
|
|
3770
|
+
let [w, T] = y.useState(() => {
|
|
3667
3771
|
if (typeof window < "u" && i) {
|
|
3668
3772
|
let e = localStorage.getItem(i);
|
|
3669
3773
|
if (e) try {
|
|
@@ -3679,11 +3783,11 @@ var Bt = [
|
|
|
3679
3783
|
w: e.layout?.w || 3,
|
|
3680
3784
|
h: e.layout?.h || 4
|
|
3681
3785
|
})) || [] };
|
|
3682
|
-
}), E =
|
|
3786
|
+
}), E = y.useCallback((e, t) => {
|
|
3683
3787
|
T(t), r?.(e);
|
|
3684
|
-
}, [r]), D =
|
|
3685
|
-
typeof window < "u" && i && localStorage.setItem(i, JSON.stringify(w)),
|
|
3686
|
-
}, [w, i]), O =
|
|
3788
|
+
}, [r]), D = y.useCallback(() => {
|
|
3789
|
+
typeof window < "u" && i && localStorage.setItem(i, JSON.stringify(w)), g(!1);
|
|
3790
|
+
}, [w, i]), O = y.useCallback(() => {
|
|
3687
3791
|
T({ lg: e.widgets?.map((e, t) => ({
|
|
3688
3792
|
i: e.id || `widget-${t}`,
|
|
3689
3793
|
x: e.layout?.x || t % 4 * 3,
|
|
@@ -3691,12 +3795,12 @@ var Bt = [
|
|
|
3691
3795
|
w: e.layout?.w || 3,
|
|
3692
3796
|
h: e.layout?.h || 4
|
|
3693
3797
|
})) || [] }), typeof window < "u" && i && localStorage.removeItem(i);
|
|
3694
|
-
}, [e.widgets, i]), k =
|
|
3798
|
+
}, [e.widgets, i]), k = y.useCallback((e) => {
|
|
3695
3799
|
if (e.component) return e.component;
|
|
3696
3800
|
let t = e.type, n = e.options || {};
|
|
3697
3801
|
if (t === "bar" || t === "line" || t === "area" || t === "pie" || t === "donut" || t === "scatter") {
|
|
3698
3802
|
let r = e.data || n.data, i = e.categoryField || n.xField || "name", a = e.valueField || n.yField || "value";
|
|
3699
|
-
if (
|
|
3803
|
+
if (H(r)) {
|
|
3700
3804
|
let n = r.aggregate, o = n ? {
|
|
3701
3805
|
field: e.valueField || n.field,
|
|
3702
3806
|
function: e.aggregate || n.function,
|
|
@@ -3709,7 +3813,7 @@ var Bt = [
|
|
|
3709
3813
|
aggregate: o,
|
|
3710
3814
|
xAxisKey: i,
|
|
3711
3815
|
series: [{ dataKey: s }],
|
|
3712
|
-
colors:
|
|
3816
|
+
colors: Wt,
|
|
3713
3817
|
className: "h-full"
|
|
3714
3818
|
};
|
|
3715
3819
|
}
|
|
@@ -3726,7 +3830,7 @@ var Bt = [
|
|
|
3726
3830
|
aggregate: n,
|
|
3727
3831
|
xAxisKey: i,
|
|
3728
3832
|
series: [{ dataKey: e.valueField || "value" }],
|
|
3729
|
-
colors:
|
|
3833
|
+
colors: Wt,
|
|
3730
3834
|
className: "h-full"
|
|
3731
3835
|
};
|
|
3732
3836
|
}
|
|
@@ -3736,13 +3840,13 @@ var Bt = [
|
|
|
3736
3840
|
data: Array.isArray(r) ? r : r?.items || [],
|
|
3737
3841
|
xAxisKey: i,
|
|
3738
3842
|
series: [{ dataKey: a }],
|
|
3739
|
-
colors:
|
|
3843
|
+
colors: Wt,
|
|
3740
3844
|
className: "h-full"
|
|
3741
3845
|
};
|
|
3742
3846
|
}
|
|
3743
3847
|
if (t === "table") {
|
|
3744
3848
|
let t = e.data || n.data;
|
|
3745
|
-
if (
|
|
3849
|
+
if (H(t)) {
|
|
3746
3850
|
let { data: r, ...i } = n;
|
|
3747
3851
|
return {
|
|
3748
3852
|
type: "data-table",
|
|
@@ -3774,7 +3878,7 @@ var Bt = [
|
|
|
3774
3878
|
}
|
|
3775
3879
|
if (t === "pivot") {
|
|
3776
3880
|
let t = e.data || n.data;
|
|
3777
|
-
if (
|
|
3881
|
+
if (H(t)) {
|
|
3778
3882
|
let { data: r, ...i } = n;
|
|
3779
3883
|
return {
|
|
3780
3884
|
type: "pivot",
|
|
@@ -3795,56 +3899,56 @@ var Bt = [
|
|
|
3795
3899
|
...n
|
|
3796
3900
|
};
|
|
3797
3901
|
}, []);
|
|
3798
|
-
return /* @__PURE__ */ (0,
|
|
3902
|
+
return /* @__PURE__ */ (0, U.jsxs)("div", {
|
|
3799
3903
|
ref: p,
|
|
3800
|
-
className:
|
|
3904
|
+
className: _("w-full", t),
|
|
3801
3905
|
"data-testid": "grid-layout",
|
|
3802
3906
|
children: [
|
|
3803
|
-
x && /* @__PURE__ */ (0,
|
|
3804
|
-
/* @__PURE__ */ (0,
|
|
3907
|
+
x && /* @__PURE__ */ (0, U.jsx)(Ut, { editMode: h }),
|
|
3908
|
+
/* @__PURE__ */ (0, U.jsxs)("div", {
|
|
3805
3909
|
className: "mb-4 flex items-center justify-between",
|
|
3806
|
-
children: [/* @__PURE__ */ (0,
|
|
3910
|
+
children: [/* @__PURE__ */ (0, U.jsx)("h2", {
|
|
3807
3911
|
className: "text-2xl font-bold",
|
|
3808
3912
|
children: e.title || "Dashboard"
|
|
3809
|
-
}), /* @__PURE__ */ (0,
|
|
3913
|
+
}), /* @__PURE__ */ (0, U.jsx)("div", {
|
|
3810
3914
|
className: "flex gap-2",
|
|
3811
|
-
children: h ? /* @__PURE__ */ (0,
|
|
3812
|
-
/* @__PURE__ */ (0,
|
|
3915
|
+
children: h ? /* @__PURE__ */ (0, U.jsxs)(U.Fragment, { children: [
|
|
3916
|
+
/* @__PURE__ */ (0, U.jsxs)(c, {
|
|
3813
3917
|
onClick: D,
|
|
3814
3918
|
size: "sm",
|
|
3815
3919
|
variant: "default",
|
|
3816
|
-
children: [/* @__PURE__ */ (0,
|
|
3920
|
+
children: [/* @__PURE__ */ (0, U.jsx)(L, { className: "h-4 w-4 mr-2" }), "Save Layout"]
|
|
3817
3921
|
}),
|
|
3818
|
-
/* @__PURE__ */ (0,
|
|
3922
|
+
/* @__PURE__ */ (0, U.jsxs)(c, {
|
|
3819
3923
|
onClick: O,
|
|
3820
3924
|
size: "sm",
|
|
3821
3925
|
variant: "outline",
|
|
3822
|
-
children: [/* @__PURE__ */ (0,
|
|
3926
|
+
children: [/* @__PURE__ */ (0, U.jsx)(z, { className: "h-4 w-4 mr-2" }), "Reset"]
|
|
3823
3927
|
}),
|
|
3824
|
-
/* @__PURE__ */ (0,
|
|
3825
|
-
onClick: () =>
|
|
3928
|
+
/* @__PURE__ */ (0, U.jsx)(c, {
|
|
3929
|
+
onClick: () => g(!1),
|
|
3826
3930
|
size: "sm",
|
|
3827
3931
|
variant: "ghost",
|
|
3828
3932
|
children: "Cancel"
|
|
3829
3933
|
})
|
|
3830
|
-
] }) : /* @__PURE__ */ (0,
|
|
3934
|
+
] }) : /* @__PURE__ */ (0, U.jsxs)(U.Fragment, { children: [a && /* @__PURE__ */ (0, U.jsxs)(c, {
|
|
3831
3935
|
onClick: C,
|
|
3832
3936
|
size: "sm",
|
|
3833
3937
|
variant: "outline",
|
|
3834
|
-
disabled:
|
|
3938
|
+
disabled: v,
|
|
3835
3939
|
"aria-label": "Refresh dashboard",
|
|
3836
|
-
children: [/* @__PURE__ */ (0,
|
|
3837
|
-
}), /* @__PURE__ */ (0,
|
|
3838
|
-
onClick: () =>
|
|
3940
|
+
children: [/* @__PURE__ */ (0, U.jsx)(I, { className: _("h-4 w-4 mr-2", v && "animate-spin") }), v ? "Refreshing…" : "Refresh All"]
|
|
3941
|
+
}), /* @__PURE__ */ (0, U.jsxs)(c, {
|
|
3942
|
+
onClick: () => g(!0),
|
|
3839
3943
|
size: "sm",
|
|
3840
3944
|
variant: "outline",
|
|
3841
|
-
children: [/* @__PURE__ */ (0,
|
|
3945
|
+
children: [/* @__PURE__ */ (0, U.jsx)(M, { className: "h-4 w-4 mr-2" }), "Edit Layout"]
|
|
3842
3946
|
})] })
|
|
3843
3947
|
})]
|
|
3844
3948
|
}),
|
|
3845
|
-
m && /* @__PURE__ */ (0,
|
|
3949
|
+
m && /* @__PURE__ */ (0, U.jsx)(Ht, {
|
|
3846
3950
|
className: "layout",
|
|
3847
|
-
width:
|
|
3951
|
+
width: o,
|
|
3848
3952
|
layouts: w,
|
|
3849
3953
|
breakpoints: {
|
|
3850
3954
|
lg: 1200,
|
|
@@ -3869,34 +3973,34 @@ var Bt = [
|
|
|
3869
3973
|
onLayoutChange: E,
|
|
3870
3974
|
children: e.widgets?.map((e, t) => {
|
|
3871
3975
|
let r = e.id || `widget-${t}`, i = k(e);
|
|
3872
|
-
return /* @__PURE__ */ (0,
|
|
3976
|
+
return /* @__PURE__ */ (0, U.jsx)("div", {
|
|
3873
3977
|
className: "h-full",
|
|
3874
|
-
children: e.type === "metric" ? /* @__PURE__ */ (0,
|
|
3978
|
+
children: e.type === "metric" ? /* @__PURE__ */ (0, U.jsxs)("div", {
|
|
3875
3979
|
className: "h-full w-full relative",
|
|
3876
|
-
children: [h && /* @__PURE__ */ (0,
|
|
3980
|
+
children: [h && /* @__PURE__ */ (0, U.jsx)("div", {
|
|
3877
3981
|
className: "drag-handle absolute top-2 right-2 z-10 cursor-move p-1 bg-background/80 rounded border border-border",
|
|
3878
|
-
children: /* @__PURE__ */ (0,
|
|
3879
|
-
}), /* @__PURE__ */ (0,
|
|
3982
|
+
children: /* @__PURE__ */ (0, U.jsx)(N, { className: "h-4 w-4" })
|
|
3983
|
+
}), /* @__PURE__ */ (0, U.jsx)(n, {
|
|
3880
3984
|
schema: i,
|
|
3881
3985
|
className: "h-full w-full"
|
|
3882
3986
|
})]
|
|
3883
|
-
}) : /* @__PURE__ */ (0,
|
|
3884
|
-
className:
|
|
3885
|
-
children: [e.title && /* @__PURE__ */ (0,
|
|
3987
|
+
}) : /* @__PURE__ */ (0, U.jsxs)(l, {
|
|
3988
|
+
className: _("h-full overflow-hidden border-border/50 shadow-sm transition-all", "bg-card/50 backdrop-blur-sm", h && "ring-2 ring-primary/20"),
|
|
3989
|
+
children: [e.title && /* @__PURE__ */ (0, U.jsxs)(d, {
|
|
3886
3990
|
className: "pb-2 border-b border-border/40 bg-muted/20 flex flex-row items-center justify-between",
|
|
3887
|
-
children: [/* @__PURE__ */ (0,
|
|
3991
|
+
children: [/* @__PURE__ */ (0, U.jsx)(f, {
|
|
3888
3992
|
className: "text-base font-medium tracking-tight truncate",
|
|
3889
3993
|
title: e.title,
|
|
3890
3994
|
children: e.title
|
|
3891
|
-
}), h && /* @__PURE__ */ (0,
|
|
3995
|
+
}), h && /* @__PURE__ */ (0, U.jsx)("div", {
|
|
3892
3996
|
className: "drag-handle cursor-move p-1 hover:bg-muted/40 rounded",
|
|
3893
|
-
children: /* @__PURE__ */ (0,
|
|
3997
|
+
children: /* @__PURE__ */ (0, U.jsx)(N, { className: "h-4 w-4" })
|
|
3894
3998
|
})]
|
|
3895
|
-
}), /* @__PURE__ */ (0,
|
|
3999
|
+
}), /* @__PURE__ */ (0, U.jsx)(u, {
|
|
3896
4000
|
className: "p-0 h-full",
|
|
3897
|
-
children: /* @__PURE__ */ (0,
|
|
3898
|
-
className:
|
|
3899
|
-
children: /* @__PURE__ */ (0,
|
|
4001
|
+
children: /* @__PURE__ */ (0, U.jsx)("div", {
|
|
4002
|
+
className: _("h-full w-full overflow-auto p-4"),
|
|
4003
|
+
children: /* @__PURE__ */ (0, U.jsx)(n, { schema: i })
|
|
3900
4004
|
})
|
|
3901
4005
|
})]
|
|
3902
4006
|
})
|
|
@@ -3908,86 +4012,175 @@ var Bt = [
|
|
|
3908
4012
|
};
|
|
3909
4013
|
//#endregion
|
|
3910
4014
|
//#region src/MetricWidget.tsx
|
|
3911
|
-
function
|
|
4015
|
+
function Kt(e) {
|
|
3912
4016
|
if (e != null) return typeof e == "string" ? e : e.defaultValue || e.key;
|
|
3913
4017
|
}
|
|
3914
|
-
var
|
|
3915
|
-
|
|
4018
|
+
var qt = {
|
|
4019
|
+
default: "bg-muted text-muted-foreground",
|
|
4020
|
+
blue: "bg-blue-500/10 text-blue-600 dark:text-blue-400",
|
|
4021
|
+
teal: "bg-teal-500/10 text-teal-600 dark:text-teal-400",
|
|
4022
|
+
orange: "bg-orange-500/10 text-orange-600 dark:text-orange-400",
|
|
4023
|
+
purple: "bg-purple-500/10 text-purple-600 dark:text-purple-400",
|
|
4024
|
+
success: "bg-emerald-500/10 text-emerald-600 dark:text-emerald-400",
|
|
4025
|
+
warning: "bg-amber-500/10 text-amber-600 dark:text-amber-400",
|
|
4026
|
+
danger: "bg-rose-500/10 text-rose-600 dark:text-rose-400"
|
|
4027
|
+
}, Jt = ({ label: e, value: t, trend: n, icon: r, className: i, description: a, loading: o, error: s, colorVariant: c = "default", ...p }) => {
|
|
4028
|
+
let m = qt[c] || qt.default, h = T(() => {
|
|
3916
4029
|
if (typeof r == "string") {
|
|
3917
|
-
let e =
|
|
3918
|
-
return e ? /* @__PURE__ */ (0,
|
|
4030
|
+
let e = O[r];
|
|
4031
|
+
return e ? /* @__PURE__ */ (0, U.jsx)(e, { className: "h-4 w-4" }) : null;
|
|
3919
4032
|
}
|
|
3920
4033
|
return r;
|
|
3921
4034
|
}, [r]);
|
|
3922
|
-
return /* @__PURE__ */ (0,
|
|
3923
|
-
className:
|
|
3924
|
-
...
|
|
3925
|
-
children: [/* @__PURE__ */ (0,
|
|
4035
|
+
return /* @__PURE__ */ (0, U.jsxs)(l, {
|
|
4036
|
+
className: _("h-full overflow-hidden", i),
|
|
4037
|
+
...p,
|
|
4038
|
+
children: [/* @__PURE__ */ (0, U.jsxs)(d, {
|
|
3926
4039
|
className: "flex flex-row items-center justify-between space-y-0 pb-2",
|
|
3927
|
-
children: [/* @__PURE__ */ (0,
|
|
4040
|
+
children: [/* @__PURE__ */ (0, U.jsx)(f, {
|
|
3928
4041
|
className: "text-sm font-medium truncate",
|
|
3929
|
-
children:
|
|
3930
|
-
}),
|
|
3931
|
-
className: "h-
|
|
4042
|
+
children: Kt(e)
|
|
4043
|
+
}), h && /* @__PURE__ */ (0, U.jsx)("div", {
|
|
4044
|
+
className: _("flex h-8 w-8 items-center justify-center rounded-md shrink-0", m),
|
|
4045
|
+
children: h
|
|
4046
|
+
})]
|
|
4047
|
+
}), /* @__PURE__ */ (0, U.jsx)(u, { children: o ? /* @__PURE__ */ (0, U.jsxs)("div", {
|
|
4048
|
+
className: "flex items-center gap-2 text-muted-foreground",
|
|
4049
|
+
"data-testid": "metric-loading",
|
|
4050
|
+
children: [/* @__PURE__ */ (0, U.jsx)(P, { className: "h-4 w-4 animate-spin" }), /* @__PURE__ */ (0, U.jsx)("span", {
|
|
4051
|
+
className: "text-sm",
|
|
4052
|
+
children: "Loading…"
|
|
4053
|
+
})]
|
|
4054
|
+
}) : s ? /* @__PURE__ */ (0, U.jsxs)("div", {
|
|
4055
|
+
className: "flex items-center gap-2",
|
|
4056
|
+
"data-testid": "metric-error",
|
|
4057
|
+
role: "alert",
|
|
4058
|
+
children: [/* @__PURE__ */ (0, U.jsx)(k, { className: "h-4 w-4 text-destructive shrink-0" }), /* @__PURE__ */ (0, U.jsx)("span", {
|
|
4059
|
+
className: "text-xs text-destructive truncate",
|
|
3932
4060
|
children: s
|
|
3933
4061
|
})]
|
|
3934
|
-
})
|
|
4062
|
+
}) : /* @__PURE__ */ (0, U.jsxs)(U.Fragment, { children: [/* @__PURE__ */ (0, U.jsx)("div", {
|
|
3935
4063
|
className: "text-2xl font-bold truncate",
|
|
3936
4064
|
children: t
|
|
3937
|
-
}), (n || a) && /* @__PURE__ */ (0,
|
|
4065
|
+
}), (n || a) && /* @__PURE__ */ (0, U.jsxs)("p", {
|
|
3938
4066
|
className: "text-xs text-muted-foreground flex items-center mt-1 truncate",
|
|
3939
|
-
children: [n && /* @__PURE__ */ (0,
|
|
3940
|
-
className:
|
|
4067
|
+
children: [n && /* @__PURE__ */ (0, U.jsxs)("span", {
|
|
4068
|
+
className: _("flex items-center mr-2 shrink-0 font-medium", n.direction === "up" && "text-emerald-600 dark:text-emerald-400", n.direction === "down" && "text-rose-600 dark:text-rose-400", n.direction === "neutral" && "text-muted-foreground"),
|
|
3941
4069
|
children: [
|
|
3942
|
-
n.direction === "up" && /* @__PURE__ */ (0,
|
|
3943
|
-
n.direction === "down" && /* @__PURE__ */ (0,
|
|
3944
|
-
n.direction === "neutral" && /* @__PURE__ */ (0,
|
|
4070
|
+
n.direction === "up" && /* @__PURE__ */ (0, U.jsx)(j, { className: "h-3 w-3 mr-1" }),
|
|
4071
|
+
n.direction === "down" && /* @__PURE__ */ (0, U.jsx)(A, { className: "h-3 w-3 mr-1" }),
|
|
4072
|
+
n.direction === "neutral" && /* @__PURE__ */ (0, U.jsx)(F, { className: "h-3 w-3 mr-1" }),
|
|
3945
4073
|
n.value,
|
|
3946
4074
|
"%"
|
|
3947
4075
|
]
|
|
3948
|
-
}), /* @__PURE__ */ (0,
|
|
4076
|
+
}), /* @__PURE__ */ (0, U.jsx)("span", {
|
|
3949
4077
|
className: "truncate",
|
|
3950
|
-
children:
|
|
4078
|
+
children: Kt(a) || Kt(n?.label)
|
|
3951
4079
|
})]
|
|
3952
|
-
})] })]
|
|
4080
|
+
})] }) })]
|
|
3953
4081
|
});
|
|
3954
4082
|
};
|
|
3955
4083
|
//#endregion
|
|
3956
4084
|
//#region src/MetricCard.tsx
|
|
3957
|
-
function
|
|
4085
|
+
function Yt(e) {
|
|
3958
4086
|
if (e != null) return typeof e == "string" ? e : e.defaultValue || e.key;
|
|
3959
4087
|
}
|
|
3960
|
-
var
|
|
3961
|
-
let
|
|
3962
|
-
return /* @__PURE__ */ (0,
|
|
3963
|
-
className:
|
|
3964
|
-
...
|
|
3965
|
-
children: [/* @__PURE__ */ (0,
|
|
4088
|
+
var Xt = ({ title: e, value: t, icon: n, trend: r, trendValue: i, description: a, className: o, loading: s, error: c, ...p }) => {
|
|
4089
|
+
let m = n && O[n];
|
|
4090
|
+
return /* @__PURE__ */ (0, U.jsxs)(l, {
|
|
4091
|
+
className: _("h-full", o),
|
|
4092
|
+
...p,
|
|
4093
|
+
children: [/* @__PURE__ */ (0, U.jsxs)(d, {
|
|
3966
4094
|
className: "flex flex-row items-center justify-between space-y-0 pb-2",
|
|
3967
|
-
children: [/* @__PURE__ */ (0,
|
|
4095
|
+
children: [/* @__PURE__ */ (0, U.jsx)(f, {
|
|
3968
4096
|
className: "text-sm font-medium",
|
|
3969
|
-
children:
|
|
3970
|
-
}),
|
|
3971
|
-
}), /* @__PURE__ */ (0,
|
|
4097
|
+
children: Yt(e)
|
|
4098
|
+
}), m && /* @__PURE__ */ (0, U.jsx)(m, { className: "h-4 w-4 text-muted-foreground" })]
|
|
4099
|
+
}), /* @__PURE__ */ (0, U.jsx)(u, { children: s ? /* @__PURE__ */ (0, U.jsxs)("div", {
|
|
4100
|
+
className: "flex items-center gap-2 text-muted-foreground",
|
|
4101
|
+
"data-testid": "metric-card-loading",
|
|
4102
|
+
children: [/* @__PURE__ */ (0, U.jsx)(P, { className: "h-4 w-4 animate-spin" }), /* @__PURE__ */ (0, U.jsx)("span", {
|
|
4103
|
+
className: "text-sm",
|
|
4104
|
+
children: "Loading…"
|
|
4105
|
+
})]
|
|
4106
|
+
}) : c ? /* @__PURE__ */ (0, U.jsxs)("div", {
|
|
4107
|
+
className: "flex items-center gap-2",
|
|
4108
|
+
"data-testid": "metric-card-error",
|
|
4109
|
+
role: "alert",
|
|
4110
|
+
children: [/* @__PURE__ */ (0, U.jsx)(k, { className: "h-4 w-4 text-destructive shrink-0" }), /* @__PURE__ */ (0, U.jsx)("span", {
|
|
4111
|
+
className: "text-xs text-destructive truncate",
|
|
4112
|
+
children: c
|
|
4113
|
+
})]
|
|
4114
|
+
}) : /* @__PURE__ */ (0, U.jsxs)(U.Fragment, { children: [/* @__PURE__ */ (0, U.jsx)("div", {
|
|
3972
4115
|
className: "text-2xl font-bold",
|
|
3973
4116
|
children: t
|
|
3974
|
-
}), (r || i || a) && /* @__PURE__ */ (0,
|
|
4117
|
+
}), (r || i || a) && /* @__PURE__ */ (0, U.jsxs)("p", {
|
|
3975
4118
|
className: "text-xs text-muted-foreground flex items-center mt-1",
|
|
3976
|
-
children: [r && i && /* @__PURE__ */ (0,
|
|
3977
|
-
className:
|
|
4119
|
+
children: [r && i && /* @__PURE__ */ (0, U.jsxs)("span", {
|
|
4120
|
+
className: _("flex items-center mr-2", r === "up" && "text-green-500", r === "down" && "text-red-500", r === "neutral" && "text-yellow-500"),
|
|
3978
4121
|
children: [
|
|
3979
|
-
r === "up" && /* @__PURE__ */ (0,
|
|
3980
|
-
r === "down" && /* @__PURE__ */ (0,
|
|
3981
|
-
r === "neutral" && /* @__PURE__ */ (0,
|
|
4122
|
+
r === "up" && /* @__PURE__ */ (0, U.jsx)(j, { className: "h-3 w-3 mr-1" }),
|
|
4123
|
+
r === "down" && /* @__PURE__ */ (0, U.jsx)(A, { className: "h-3 w-3 mr-1" }),
|
|
4124
|
+
r === "neutral" && /* @__PURE__ */ (0, U.jsx)(F, { className: "h-3 w-3 mr-1" }),
|
|
3982
4125
|
i
|
|
3983
4126
|
]
|
|
3984
|
-
}),
|
|
3985
|
-
})] })]
|
|
4127
|
+
}), Yt(a)]
|
|
4128
|
+
})] }) })]
|
|
4129
|
+
});
|
|
4130
|
+
}, Zt = ({ objectName: e, aggregate: t, filter: n, label: i, fallbackValue: a, trend: o, icon: s, className: c, description: l, dataSource: u, colorVariant: d }) => {
|
|
4131
|
+
let f = C(r), p = u || f?.dataSource, [m, h] = D(null), [g, _] = D(!1), [v, y] = D(null), b = S(async (r, i) => {
|
|
4132
|
+
if (!(!r || !e)) {
|
|
4133
|
+
i.current && (_(!0), y(null));
|
|
4134
|
+
try {
|
|
4135
|
+
let a;
|
|
4136
|
+
if (t && typeof r.aggregate == "function") {
|
|
4137
|
+
let i = await r.aggregate(e, {
|
|
4138
|
+
field: t.field,
|
|
4139
|
+
function: t.function,
|
|
4140
|
+
groupBy: t.groupBy || "_all",
|
|
4141
|
+
filter: n
|
|
4142
|
+
}), o = Array.isArray(i) ? i : [];
|
|
4143
|
+
a = o.length === 0 ? 0 : t.function === "count" ? o.reduce((e, n) => e + (Number(n[t.field]) || Number(n.count) || 0), 0) : o[0][t.field] ?? 0;
|
|
4144
|
+
} else if (typeof r.find == "function") {
|
|
4145
|
+
let t = await r.find(e, { $filter: n });
|
|
4146
|
+
a = (Array.isArray(t) ? t : t?.data || t?.records || []).length;
|
|
4147
|
+
} else return;
|
|
4148
|
+
i.current && h(a);
|
|
4149
|
+
} catch (e) {
|
|
4150
|
+
console.error("[ObjectMetricWidget] Fetch error:", e), i.current && y(e instanceof Error ? e.message : "Failed to load metric");
|
|
4151
|
+
} finally {
|
|
4152
|
+
i.current && _(!1);
|
|
4153
|
+
}
|
|
4154
|
+
}
|
|
4155
|
+
}, [
|
|
4156
|
+
e,
|
|
4157
|
+
t,
|
|
4158
|
+
n
|
|
4159
|
+
]);
|
|
4160
|
+
return w(() => {
|
|
4161
|
+
let t = { current: !0 };
|
|
4162
|
+
return p && e ? b(p, t) : (h(null), y(null)), () => {
|
|
4163
|
+
t.current = !1;
|
|
4164
|
+
};
|
|
4165
|
+
}, [
|
|
4166
|
+
p,
|
|
4167
|
+
e,
|
|
4168
|
+
b
|
|
4169
|
+
]), /* @__PURE__ */ (0, U.jsx)(Jt, {
|
|
4170
|
+
label: i,
|
|
4171
|
+
value: m === null ? p ? "—" : a ?? "—" : m,
|
|
4172
|
+
trend: o,
|
|
4173
|
+
icon: s,
|
|
4174
|
+
className: c,
|
|
4175
|
+
description: l,
|
|
4176
|
+
loading: g,
|
|
4177
|
+
error: v,
|
|
4178
|
+
colorVariant: d
|
|
3986
4179
|
});
|
|
3987
4180
|
};
|
|
3988
4181
|
//#endregion
|
|
3989
4182
|
//#region src/PivotTable.tsx
|
|
3990
|
-
function
|
|
4183
|
+
function Qt(e, t) {
|
|
3991
4184
|
if (!t) return String(e);
|
|
3992
4185
|
let n = "", r = "", i = !1, a, o = t, s = o.match(/^([^0-9.,#]*)/);
|
|
3993
4186
|
if (s && s[1]) {
|
|
@@ -4004,7 +4197,7 @@ function Kt(e, t) {
|
|
|
4004
4197
|
}
|
|
4005
4198
|
return n + l + r;
|
|
4006
4199
|
}
|
|
4007
|
-
function
|
|
4200
|
+
function $t(e, t) {
|
|
4008
4201
|
if (e.length === 0) return 0;
|
|
4009
4202
|
switch (t) {
|
|
4010
4203
|
case "sum": return e.reduce((e, t) => e + t, 0);
|
|
@@ -4015,8 +4208,8 @@ function qt(e, t) {
|
|
|
4015
4208
|
default: return e.reduce((e, t) => e + t, 0);
|
|
4016
4209
|
}
|
|
4017
4210
|
}
|
|
4018
|
-
var
|
|
4019
|
-
let { title: n, rowField: r, columnField: i, valueField: a, aggregation: o = "sum", data: s = [], showRowTotals: c = !1, showColumnTotals: l = !1, format: u, columnColors: d } = e, f = Array.isArray(s) ? s : [], { rowKeys: p, colKeys: m, matrix: h, rowTotals:
|
|
4211
|
+
var en = ({ schema: e, className: t }) => {
|
|
4212
|
+
let { title: n, rowField: r, columnField: i, valueField: a, aggregation: o = "sum", data: s = [], showRowTotals: c = !1, showColumnTotals: l = !1, format: u, columnColors: d } = e, f = Array.isArray(s) ? s : [], { rowKeys: p, colKeys: m, matrix: h, rowTotals: g, colTotals: v, grandTotal: y } = T(() => {
|
|
4020
4213
|
let e = /* @__PURE__ */ new Map(), t = /* @__PURE__ */ new Map(), n = {};
|
|
4021
4214
|
for (let o of f) {
|
|
4022
4215
|
let s = String(o[r] ?? ""), c = String(o[i] ?? ""), l = Number(o[a]) || 0;
|
|
@@ -4027,10 +4220,10 @@ var Jt = ({ schema: e, className: t }) => {
|
|
|
4027
4220
|
l[e] = {};
|
|
4028
4221
|
let t = [];
|
|
4029
4222
|
for (let r of c) {
|
|
4030
|
-
let i = n[e]?.[r] ?? [], a =
|
|
4223
|
+
let i = n[e]?.[r] ?? [], a = $t(i, o);
|
|
4031
4224
|
l[e][r] = a, t.push(...i), !d[r] && d[r];
|
|
4032
4225
|
}
|
|
4033
|
-
u[e] =
|
|
4226
|
+
u[e] = $t(t, o);
|
|
4034
4227
|
}
|
|
4035
4228
|
for (let e of c) {
|
|
4036
4229
|
let t = [];
|
|
@@ -4038,7 +4231,7 @@ var Jt = ({ schema: e, className: t }) => {
|
|
|
4038
4231
|
let i = n[r]?.[e] ?? [];
|
|
4039
4232
|
t.push(...i);
|
|
4040
4233
|
}
|
|
4041
|
-
d[e] =
|
|
4234
|
+
d[e] = $t(t, o);
|
|
4042
4235
|
}
|
|
4043
4236
|
let p = [];
|
|
4044
4237
|
for (let e of f) p.push(Number(e[a]) || 0);
|
|
@@ -4048,7 +4241,7 @@ var Jt = ({ schema: e, className: t }) => {
|
|
|
4048
4241
|
matrix: l,
|
|
4049
4242
|
rowTotals: u,
|
|
4050
4243
|
colTotals: d,
|
|
4051
|
-
grandTotal:
|
|
4244
|
+
grandTotal: $t(p, o)
|
|
4052
4245
|
};
|
|
4053
4246
|
}, [
|
|
4054
4247
|
f,
|
|
@@ -4056,16 +4249,16 @@ var Jt = ({ schema: e, className: t }) => {
|
|
|
4056
4249
|
i,
|
|
4057
4250
|
a,
|
|
4058
4251
|
o
|
|
4059
|
-
]), b = (e) =>
|
|
4060
|
-
return f.length === 0 ? /* @__PURE__ */ (0,
|
|
4061
|
-
className:
|
|
4062
|
-
children: [n && /* @__PURE__ */ (0,
|
|
4252
|
+
]), b = (e) => Qt(e, u);
|
|
4253
|
+
return f.length === 0 ? /* @__PURE__ */ (0, U.jsxs)("div", {
|
|
4254
|
+
className: _("overflow-auto", t),
|
|
4255
|
+
children: [n && /* @__PURE__ */ (0, U.jsx)("h3", {
|
|
4063
4256
|
className: "text-sm font-semibold mb-2",
|
|
4064
4257
|
children: n
|
|
4065
|
-
}), /* @__PURE__ */ (0,
|
|
4258
|
+
}), /* @__PURE__ */ (0, U.jsxs)("div", {
|
|
4066
4259
|
className: "flex flex-col items-center justify-center py-8 text-muted-foreground",
|
|
4067
4260
|
"data-testid": "pivot-empty-state",
|
|
4068
|
-
children: [/* @__PURE__ */ (0,
|
|
4261
|
+
children: [/* @__PURE__ */ (0, U.jsxs)("svg", {
|
|
4069
4262
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4070
4263
|
className: "h-8 w-8 mb-2 opacity-40",
|
|
4071
4264
|
viewBox: "0 0 24 24",
|
|
@@ -4075,91 +4268,91 @@ var Jt = ({ schema: e, className: t }) => {
|
|
|
4075
4268
|
strokeLinecap: "round",
|
|
4076
4269
|
strokeLinejoin: "round",
|
|
4077
4270
|
children: [
|
|
4078
|
-
/* @__PURE__ */ (0,
|
|
4271
|
+
/* @__PURE__ */ (0, U.jsx)("rect", {
|
|
4079
4272
|
x: "3",
|
|
4080
4273
|
y: "3",
|
|
4081
4274
|
width: "7",
|
|
4082
4275
|
height: "7"
|
|
4083
4276
|
}),
|
|
4084
|
-
/* @__PURE__ */ (0,
|
|
4277
|
+
/* @__PURE__ */ (0, U.jsx)("rect", {
|
|
4085
4278
|
x: "14",
|
|
4086
4279
|
y: "3",
|
|
4087
4280
|
width: "7",
|
|
4088
4281
|
height: "7"
|
|
4089
4282
|
}),
|
|
4090
|
-
/* @__PURE__ */ (0,
|
|
4283
|
+
/* @__PURE__ */ (0, U.jsx)("rect", {
|
|
4091
4284
|
x: "3",
|
|
4092
4285
|
y: "14",
|
|
4093
4286
|
width: "7",
|
|
4094
4287
|
height: "7"
|
|
4095
4288
|
}),
|
|
4096
|
-
/* @__PURE__ */ (0,
|
|
4289
|
+
/* @__PURE__ */ (0, U.jsx)("rect", {
|
|
4097
4290
|
x: "14",
|
|
4098
4291
|
y: "14",
|
|
4099
4292
|
width: "7",
|
|
4100
4293
|
height: "7"
|
|
4101
4294
|
})
|
|
4102
4295
|
]
|
|
4103
|
-
}), /* @__PURE__ */ (0,
|
|
4296
|
+
}), /* @__PURE__ */ (0, U.jsx)("p", {
|
|
4104
4297
|
className: "text-xs",
|
|
4105
4298
|
children: "No data available"
|
|
4106
4299
|
})]
|
|
4107
4300
|
})]
|
|
4108
|
-
}) : /* @__PURE__ */ (0,
|
|
4109
|
-
className:
|
|
4110
|
-
children: [n && /* @__PURE__ */ (0,
|
|
4301
|
+
}) : /* @__PURE__ */ (0, U.jsxs)("div", {
|
|
4302
|
+
className: _("overflow-auto", t),
|
|
4303
|
+
children: [n && /* @__PURE__ */ (0, U.jsx)("h3", {
|
|
4111
4304
|
className: "text-sm font-semibold mb-2",
|
|
4112
4305
|
children: n
|
|
4113
|
-
}), /* @__PURE__ */ (0,
|
|
4306
|
+
}), /* @__PURE__ */ (0, U.jsxs)("table", {
|
|
4114
4307
|
className: "w-full text-sm border-collapse",
|
|
4115
4308
|
role: "table",
|
|
4116
4309
|
children: [
|
|
4117
|
-
/* @__PURE__ */ (0,
|
|
4310
|
+
/* @__PURE__ */ (0, U.jsx)("thead", { children: /* @__PURE__ */ (0, U.jsxs)("tr", {
|
|
4118
4311
|
className: "border-b border-border",
|
|
4119
4312
|
children: [
|
|
4120
|
-
/* @__PURE__ */ (0,
|
|
4313
|
+
/* @__PURE__ */ (0, U.jsx)("th", {
|
|
4121
4314
|
className: "text-left p-2 font-medium text-muted-foreground",
|
|
4122
4315
|
children: r
|
|
4123
4316
|
}),
|
|
4124
|
-
m.map((e) => /* @__PURE__ */ (0,
|
|
4125
|
-
className:
|
|
4317
|
+
m.map((e) => /* @__PURE__ */ (0, U.jsx)("th", {
|
|
4318
|
+
className: _("text-right p-2 font-medium", d?.[e] ?? "text-muted-foreground"),
|
|
4126
4319
|
children: e
|
|
4127
4320
|
}, e)),
|
|
4128
|
-
c && /* @__PURE__ */ (0,
|
|
4321
|
+
c && /* @__PURE__ */ (0, U.jsx)("th", {
|
|
4129
4322
|
className: "text-right p-2 font-semibold text-muted-foreground bg-muted/20",
|
|
4130
4323
|
children: "Total"
|
|
4131
4324
|
})
|
|
4132
4325
|
]
|
|
4133
4326
|
}) }),
|
|
4134
|
-
/* @__PURE__ */ (0,
|
|
4327
|
+
/* @__PURE__ */ (0, U.jsx)("tbody", { children: p.map((e) => /* @__PURE__ */ (0, U.jsxs)("tr", {
|
|
4135
4328
|
className: "border-b border-border/50 hover:bg-muted/30",
|
|
4136
4329
|
children: [
|
|
4137
|
-
/* @__PURE__ */ (0,
|
|
4330
|
+
/* @__PURE__ */ (0, U.jsx)("td", {
|
|
4138
4331
|
className: "p-2 font-medium",
|
|
4139
4332
|
children: e
|
|
4140
4333
|
}),
|
|
4141
|
-
m.map((t) => /* @__PURE__ */ (0,
|
|
4142
|
-
className:
|
|
4334
|
+
m.map((t) => /* @__PURE__ */ (0, U.jsx)("td", {
|
|
4335
|
+
className: _("text-right p-2 tabular-nums", d?.[t]),
|
|
4143
4336
|
children: b(h[e]?.[t] ?? 0)
|
|
4144
4337
|
}, t)),
|
|
4145
|
-
c && /* @__PURE__ */ (0,
|
|
4338
|
+
c && /* @__PURE__ */ (0, U.jsx)("td", {
|
|
4146
4339
|
className: "text-right p-2 font-semibold tabular-nums bg-muted/20",
|
|
4147
|
-
children: b(
|
|
4340
|
+
children: b(g[e] ?? 0)
|
|
4148
4341
|
})
|
|
4149
4342
|
]
|
|
4150
4343
|
}, e)) }),
|
|
4151
|
-
l && /* @__PURE__ */ (0,
|
|
4344
|
+
l && /* @__PURE__ */ (0, U.jsx)("tfoot", { children: /* @__PURE__ */ (0, U.jsxs)("tr", {
|
|
4152
4345
|
className: "border-t-2 border-border font-semibold bg-muted/40",
|
|
4153
4346
|
children: [
|
|
4154
|
-
/* @__PURE__ */ (0,
|
|
4347
|
+
/* @__PURE__ */ (0, U.jsx)("td", {
|
|
4155
4348
|
className: "p-2",
|
|
4156
4349
|
children: "Total"
|
|
4157
4350
|
}),
|
|
4158
|
-
m.map((e) => /* @__PURE__ */ (0,
|
|
4351
|
+
m.map((e) => /* @__PURE__ */ (0, U.jsx)("td", {
|
|
4159
4352
|
className: "text-right p-2 tabular-nums",
|
|
4160
4353
|
children: b(v[e] ?? 0)
|
|
4161
4354
|
}, e)),
|
|
4162
|
-
c && /* @__PURE__ */ (0,
|
|
4355
|
+
c && /* @__PURE__ */ (0, U.jsx)("td", {
|
|
4163
4356
|
className: "text-right p-2 tabular-nums font-bold",
|
|
4164
4357
|
children: b(y)
|
|
4165
4358
|
})
|
|
@@ -4168,9 +4361,9 @@ var Jt = ({ schema: e, className: t }) => {
|
|
|
4168
4361
|
]
|
|
4169
4362
|
})]
|
|
4170
4363
|
});
|
|
4171
|
-
},
|
|
4172
|
-
let o =
|
|
4173
|
-
|
|
4364
|
+
}, tn = ({ schema: e, dataSource: n, className: i }) => {
|
|
4365
|
+
let o = C(r), s = n || o?.dataSource, c = a(e.bind), [l, u] = D([]), [d, f] = D(!1), [p, m] = D(null);
|
|
4366
|
+
w(() => {
|
|
4174
4367
|
let n = !0;
|
|
4175
4368
|
return e.objectName && !c && (!e.data || e.data.length === 0) && (async () => {
|
|
4176
4369
|
if (!(!s || !e.objectName)) {
|
|
@@ -4196,47 +4389,47 @@ var Jt = ({ schema: e, className: t }) => {
|
|
|
4196
4389
|
e.data,
|
|
4197
4390
|
e.filter
|
|
4198
4391
|
]);
|
|
4199
|
-
let
|
|
4200
|
-
return d && v.length === 0 ? /* @__PURE__ */ (0,
|
|
4201
|
-
className:
|
|
4392
|
+
let h = c || e.data || l, v = Array.isArray(h) ? h : [];
|
|
4393
|
+
return d && v.length === 0 ? /* @__PURE__ */ (0, U.jsxs)("div", {
|
|
4394
|
+
className: _("overflow-auto", i),
|
|
4202
4395
|
"data-testid": "pivot-loading",
|
|
4203
|
-
children: [e.title && /* @__PURE__ */ (0,
|
|
4396
|
+
children: [e.title && /* @__PURE__ */ (0, U.jsx)("h3", {
|
|
4204
4397
|
className: "text-sm font-semibold mb-2",
|
|
4205
4398
|
children: e.title
|
|
4206
|
-
}), /* @__PURE__ */ (0,
|
|
4399
|
+
}), /* @__PURE__ */ (0, U.jsxs)("div", {
|
|
4207
4400
|
className: "space-y-2 p-2",
|
|
4208
|
-
children: [/* @__PURE__ */ (0,
|
|
4401
|
+
children: [/* @__PURE__ */ (0, U.jsxs)("div", {
|
|
4209
4402
|
className: "flex gap-2",
|
|
4210
4403
|
children: [
|
|
4211
|
-
/* @__PURE__ */ (0,
|
|
4212
|
-
/* @__PURE__ */ (0,
|
|
4213
|
-
/* @__PURE__ */ (0,
|
|
4214
|
-
/* @__PURE__ */ (0,
|
|
4404
|
+
/* @__PURE__ */ (0, U.jsx)(g, { className: "h-6 w-24" }),
|
|
4405
|
+
/* @__PURE__ */ (0, U.jsx)(g, { className: "h-6 w-20" }),
|
|
4406
|
+
/* @__PURE__ */ (0, U.jsx)(g, { className: "h-6 w-20" }),
|
|
4407
|
+
/* @__PURE__ */ (0, U.jsx)(g, { className: "h-6 w-20" })
|
|
4215
4408
|
]
|
|
4216
4409
|
}), [
|
|
4217
4410
|
1,
|
|
4218
4411
|
2,
|
|
4219
4412
|
3
|
|
4220
|
-
].map((e) => /* @__PURE__ */ (0,
|
|
4413
|
+
].map((e) => /* @__PURE__ */ (0, U.jsxs)("div", {
|
|
4221
4414
|
className: "flex gap-2",
|
|
4222
4415
|
children: [
|
|
4223
|
-
/* @__PURE__ */ (0,
|
|
4224
|
-
/* @__PURE__ */ (0,
|
|
4225
|
-
/* @__PURE__ */ (0,
|
|
4226
|
-
/* @__PURE__ */ (0,
|
|
4416
|
+
/* @__PURE__ */ (0, U.jsx)(g, { className: "h-5 w-24" }),
|
|
4417
|
+
/* @__PURE__ */ (0, U.jsx)(g, { className: "h-5 w-20" }),
|
|
4418
|
+
/* @__PURE__ */ (0, U.jsx)(g, { className: "h-5 w-20" }),
|
|
4419
|
+
/* @__PURE__ */ (0, U.jsx)(g, { className: "h-5 w-20" })
|
|
4227
4420
|
]
|
|
4228
4421
|
}, e))]
|
|
4229
4422
|
})]
|
|
4230
|
-
}) : p ? /* @__PURE__ */ (0,
|
|
4231
|
-
className:
|
|
4423
|
+
}) : p ? /* @__PURE__ */ (0, U.jsxs)("div", {
|
|
4424
|
+
className: _("overflow-auto", i),
|
|
4232
4425
|
"data-testid": "pivot-error",
|
|
4233
|
-
children: [e.title && /* @__PURE__ */ (0,
|
|
4426
|
+
children: [e.title && /* @__PURE__ */ (0, U.jsx)("h3", {
|
|
4234
4427
|
className: "text-sm font-semibold mb-2",
|
|
4235
4428
|
children: e.title
|
|
4236
|
-
}), /* @__PURE__ */ (0,
|
|
4429
|
+
}), /* @__PURE__ */ (0, U.jsxs)("div", {
|
|
4237
4430
|
className: "flex flex-col items-center justify-center py-8 text-destructive",
|
|
4238
4431
|
"data-testid": "pivot-error-message",
|
|
4239
|
-
children: [/* @__PURE__ */ (0,
|
|
4432
|
+
children: [/* @__PURE__ */ (0, U.jsxs)("svg", {
|
|
4240
4433
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4241
4434
|
className: "h-8 w-8 mb-2 opacity-60",
|
|
4242
4435
|
viewBox: "0 0 24 24",
|
|
@@ -4246,37 +4439,37 @@ var Jt = ({ schema: e, className: t }) => {
|
|
|
4246
4439
|
strokeLinecap: "round",
|
|
4247
4440
|
strokeLinejoin: "round",
|
|
4248
4441
|
children: [
|
|
4249
|
-
/* @__PURE__ */ (0,
|
|
4442
|
+
/* @__PURE__ */ (0, U.jsx)("circle", {
|
|
4250
4443
|
cx: "12",
|
|
4251
4444
|
cy: "12",
|
|
4252
4445
|
r: "10"
|
|
4253
4446
|
}),
|
|
4254
|
-
/* @__PURE__ */ (0,
|
|
4447
|
+
/* @__PURE__ */ (0, U.jsx)("line", {
|
|
4255
4448
|
x1: "12",
|
|
4256
4449
|
y1: "8",
|
|
4257
4450
|
x2: "12",
|
|
4258
4451
|
y2: "12"
|
|
4259
4452
|
}),
|
|
4260
|
-
/* @__PURE__ */ (0,
|
|
4453
|
+
/* @__PURE__ */ (0, U.jsx)("line", {
|
|
4261
4454
|
x1: "12",
|
|
4262
4455
|
y1: "16",
|
|
4263
4456
|
x2: "12.01",
|
|
4264
4457
|
y2: "16"
|
|
4265
4458
|
})
|
|
4266
4459
|
]
|
|
4267
|
-
}), /* @__PURE__ */ (0,
|
|
4460
|
+
}), /* @__PURE__ */ (0, U.jsx)("p", {
|
|
4268
4461
|
className: "text-xs",
|
|
4269
4462
|
children: p
|
|
4270
4463
|
})]
|
|
4271
4464
|
})]
|
|
4272
|
-
}) : !s && e.objectName && v.length === 0 ? /* @__PURE__ */ (0,
|
|
4273
|
-
className:
|
|
4274
|
-
children: [e.title && /* @__PURE__ */ (0,
|
|
4465
|
+
}) : !s && e.objectName && v.length === 0 ? /* @__PURE__ */ (0, U.jsxs)("div", {
|
|
4466
|
+
className: _("overflow-auto", i),
|
|
4467
|
+
children: [e.title && /* @__PURE__ */ (0, U.jsx)("h3", {
|
|
4275
4468
|
className: "text-sm font-semibold mb-2",
|
|
4276
4469
|
children: e.title
|
|
4277
|
-
}), /* @__PURE__ */ (0,
|
|
4470
|
+
}), /* @__PURE__ */ (0, U.jsx)("div", {
|
|
4278
4471
|
className: "flex flex-col items-center justify-center py-8 text-muted-foreground",
|
|
4279
|
-
children: /* @__PURE__ */ (0,
|
|
4472
|
+
children: /* @__PURE__ */ (0, U.jsxs)("p", {
|
|
4280
4473
|
className: "text-xs",
|
|
4281
4474
|
children: [
|
|
4282
4475
|
"No data source available for “",
|
|
@@ -4285,36 +4478,36 @@ var Jt = ({ schema: e, className: t }) => {
|
|
|
4285
4478
|
]
|
|
4286
4479
|
})
|
|
4287
4480
|
})]
|
|
4288
|
-
}) : /* @__PURE__ */ (0,
|
|
4481
|
+
}) : /* @__PURE__ */ (0, U.jsx)(en, {
|
|
4289
4482
|
schema: {
|
|
4290
4483
|
...e,
|
|
4291
4484
|
data: v
|
|
4292
4485
|
},
|
|
4293
|
-
className:
|
|
4486
|
+
className: i
|
|
4294
4487
|
});
|
|
4295
4488
|
};
|
|
4296
4489
|
//#endregion
|
|
4297
4490
|
//#region src/ObjectDataTable.tsx
|
|
4298
|
-
function
|
|
4491
|
+
function nn(e) {
|
|
4299
4492
|
return e.map((e) => typeof e == "string" ? {
|
|
4300
4493
|
header: e.replace(/_/g, " ").replace(/([A-Z])/g, " $1").trim().replace(/\b\w/g, (e) => e.toUpperCase()),
|
|
4301
4494
|
accessorKey: e
|
|
4302
4495
|
} : e);
|
|
4303
4496
|
}
|
|
4304
|
-
var
|
|
4305
|
-
let s =
|
|
4306
|
-
|
|
4497
|
+
var rn = ({ schema: e, dataSource: i, className: o }) => {
|
|
4498
|
+
let s = C(r), c = i || s?.dataSource, l = a(e.bind), [u, d] = D([]), [f, p] = D(!1), [m, h] = D(null);
|
|
4499
|
+
w(() => {
|
|
4307
4500
|
let n = !0;
|
|
4308
4501
|
return e.objectName && !l && (!e.data || e.data.length === 0) && (async () => {
|
|
4309
4502
|
if (!(!c || !e.objectName)) {
|
|
4310
|
-
n && (p(!0),
|
|
4503
|
+
n && (p(!0), h(null));
|
|
4311
4504
|
try {
|
|
4312
4505
|
let r;
|
|
4313
4506
|
if (typeof c.find == "function") r = t(await c.find(e.objectName, { $filter: e.filter }));
|
|
4314
4507
|
else return;
|
|
4315
4508
|
n && d(r);
|
|
4316
4509
|
} catch (e) {
|
|
4317
|
-
console.error("[ObjectDataTable] Fetch error:", e), n &&
|
|
4510
|
+
console.error("[ObjectDataTable] Fetch error:", e), n && h(e instanceof Error ? e.message : "Failed to load data");
|
|
4318
4511
|
} finally {
|
|
4319
4512
|
n && p(!1);
|
|
4320
4513
|
}
|
|
@@ -4329,45 +4522,45 @@ var Zt = ({ schema: e, dataSource: a, className: o }) => {
|
|
|
4329
4522
|
e.data,
|
|
4330
4523
|
e.filter
|
|
4331
4524
|
]);
|
|
4332
|
-
let v = l || e.data || u, y = Array.isArray(v) ? v : [], b =
|
|
4525
|
+
let v = l || e.data || u, y = Array.isArray(v) ? v : [], b = T(() => e.columns && e.columns.length > 0 ? nn(e.columns) : y.length === 0 ? [] : Object.keys(y[0]).filter((e) => !e.startsWith("_")).map((e) => ({
|
|
4333
4526
|
header: e.charAt(0).toUpperCase() + e.slice(1).replace(/([A-Z])/g, " $1"),
|
|
4334
4527
|
accessorKey: e
|
|
4335
4528
|
})), [e.columns, y]);
|
|
4336
|
-
return f && y.length === 0 ? /* @__PURE__ */ (0,
|
|
4337
|
-
className:
|
|
4529
|
+
return f && y.length === 0 ? /* @__PURE__ */ (0, U.jsx)("div", {
|
|
4530
|
+
className: _("overflow-auto", o),
|
|
4338
4531
|
"data-testid": "table-loading",
|
|
4339
|
-
children: /* @__PURE__ */ (0,
|
|
4532
|
+
children: /* @__PURE__ */ (0, U.jsxs)("div", {
|
|
4340
4533
|
className: "space-y-2 p-2",
|
|
4341
|
-
children: [/* @__PURE__ */ (0,
|
|
4534
|
+
children: [/* @__PURE__ */ (0, U.jsxs)("div", {
|
|
4342
4535
|
className: "flex gap-2",
|
|
4343
4536
|
children: [
|
|
4344
|
-
/* @__PURE__ */ (0,
|
|
4345
|
-
/* @__PURE__ */ (0,
|
|
4346
|
-
/* @__PURE__ */ (0,
|
|
4347
|
-
/* @__PURE__ */ (0,
|
|
4537
|
+
/* @__PURE__ */ (0, U.jsx)(g, { className: "h-6 w-1/4" }),
|
|
4538
|
+
/* @__PURE__ */ (0, U.jsx)(g, { className: "h-6 w-1/4" }),
|
|
4539
|
+
/* @__PURE__ */ (0, U.jsx)(g, { className: "h-6 w-1/4" }),
|
|
4540
|
+
/* @__PURE__ */ (0, U.jsx)(g, { className: "h-6 w-1/4" })
|
|
4348
4541
|
]
|
|
4349
4542
|
}), [
|
|
4350
4543
|
1,
|
|
4351
4544
|
2,
|
|
4352
4545
|
3,
|
|
4353
4546
|
4
|
|
4354
|
-
].map((e) => /* @__PURE__ */ (0,
|
|
4547
|
+
].map((e) => /* @__PURE__ */ (0, U.jsxs)("div", {
|
|
4355
4548
|
className: "flex gap-2",
|
|
4356
4549
|
children: [
|
|
4357
|
-
/* @__PURE__ */ (0,
|
|
4358
|
-
/* @__PURE__ */ (0,
|
|
4359
|
-
/* @__PURE__ */ (0,
|
|
4360
|
-
/* @__PURE__ */ (0,
|
|
4550
|
+
/* @__PURE__ */ (0, U.jsx)(g, { className: "h-5 w-1/4" }),
|
|
4551
|
+
/* @__PURE__ */ (0, U.jsx)(g, { className: "h-5 w-1/4" }),
|
|
4552
|
+
/* @__PURE__ */ (0, U.jsx)(g, { className: "h-5 w-1/4" }),
|
|
4553
|
+
/* @__PURE__ */ (0, U.jsx)(g, { className: "h-5 w-1/4" })
|
|
4361
4554
|
]
|
|
4362
4555
|
}, e))]
|
|
4363
4556
|
})
|
|
4364
|
-
}) : m ? /* @__PURE__ */ (0,
|
|
4365
|
-
className:
|
|
4557
|
+
}) : m ? /* @__PURE__ */ (0, U.jsx)("div", {
|
|
4558
|
+
className: _("overflow-auto", o),
|
|
4366
4559
|
"data-testid": "table-error",
|
|
4367
|
-
children: /* @__PURE__ */ (0,
|
|
4560
|
+
children: /* @__PURE__ */ (0, U.jsxs)("div", {
|
|
4368
4561
|
className: "flex flex-col items-center justify-center py-8 text-destructive",
|
|
4369
4562
|
"data-testid": "table-error-message",
|
|
4370
|
-
children: [/* @__PURE__ */ (0,
|
|
4563
|
+
children: [/* @__PURE__ */ (0, U.jsxs)("svg", {
|
|
4371
4564
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4372
4565
|
className: "h-8 w-8 mb-2 opacity-60",
|
|
4373
4566
|
viewBox: "0 0 24 24",
|
|
@@ -4377,34 +4570,34 @@ var Zt = ({ schema: e, dataSource: a, className: o }) => {
|
|
|
4377
4570
|
strokeLinecap: "round",
|
|
4378
4571
|
strokeLinejoin: "round",
|
|
4379
4572
|
children: [
|
|
4380
|
-
/* @__PURE__ */ (0,
|
|
4573
|
+
/* @__PURE__ */ (0, U.jsx)("circle", {
|
|
4381
4574
|
cx: "12",
|
|
4382
4575
|
cy: "12",
|
|
4383
4576
|
r: "10"
|
|
4384
4577
|
}),
|
|
4385
|
-
/* @__PURE__ */ (0,
|
|
4578
|
+
/* @__PURE__ */ (0, U.jsx)("line", {
|
|
4386
4579
|
x1: "12",
|
|
4387
4580
|
y1: "8",
|
|
4388
4581
|
x2: "12",
|
|
4389
4582
|
y2: "12"
|
|
4390
4583
|
}),
|
|
4391
|
-
/* @__PURE__ */ (0,
|
|
4584
|
+
/* @__PURE__ */ (0, U.jsx)("line", {
|
|
4392
4585
|
x1: "12",
|
|
4393
4586
|
y1: "16",
|
|
4394
4587
|
x2: "12.01",
|
|
4395
4588
|
y2: "16"
|
|
4396
4589
|
})
|
|
4397
4590
|
]
|
|
4398
|
-
}), /* @__PURE__ */ (0,
|
|
4591
|
+
}), /* @__PURE__ */ (0, U.jsx)("p", {
|
|
4399
4592
|
className: "text-xs",
|
|
4400
4593
|
children: m
|
|
4401
4594
|
})]
|
|
4402
4595
|
})
|
|
4403
|
-
}) : !c && e.objectName && y.length === 0 ? /* @__PURE__ */ (0,
|
|
4404
|
-
className:
|
|
4405
|
-
children: /* @__PURE__ */ (0,
|
|
4596
|
+
}) : !c && e.objectName && y.length === 0 ? /* @__PURE__ */ (0, U.jsx)("div", {
|
|
4597
|
+
className: _("overflow-auto", o),
|
|
4598
|
+
children: /* @__PURE__ */ (0, U.jsx)("div", {
|
|
4406
4599
|
className: "flex flex-col items-center justify-center py-8 text-muted-foreground",
|
|
4407
|
-
children: /* @__PURE__ */ (0,
|
|
4600
|
+
children: /* @__PURE__ */ (0, U.jsxs)("p", {
|
|
4408
4601
|
className: "text-xs",
|
|
4409
4602
|
children: [
|
|
4410
4603
|
"No data source available for “",
|
|
@@ -4413,12 +4606,12 @@ var Zt = ({ schema: e, dataSource: a, className: o }) => {
|
|
|
4413
4606
|
]
|
|
4414
4607
|
})
|
|
4415
4608
|
})
|
|
4416
|
-
}) : y.length === 0 ? /* @__PURE__ */ (0,
|
|
4417
|
-
className:
|
|
4609
|
+
}) : y.length === 0 ? /* @__PURE__ */ (0, U.jsx)("div", {
|
|
4610
|
+
className: _("overflow-auto", o),
|
|
4418
4611
|
"data-testid": "table-empty-state",
|
|
4419
|
-
children: /* @__PURE__ */ (0,
|
|
4612
|
+
children: /* @__PURE__ */ (0, U.jsxs)("div", {
|
|
4420
4613
|
className: "flex flex-col items-center justify-center py-8 text-muted-foreground",
|
|
4421
|
-
children: [/* @__PURE__ */ (0,
|
|
4614
|
+
children: [/* @__PURE__ */ (0, U.jsxs)("svg", {
|
|
4422
4615
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4423
4616
|
className: "h-8 w-8 mb-2 opacity-40",
|
|
4424
4617
|
viewBox: "0 0 24 24",
|
|
@@ -4428,7 +4621,7 @@ var Zt = ({ schema: e, dataSource: a, className: o }) => {
|
|
|
4428
4621
|
strokeLinecap: "round",
|
|
4429
4622
|
strokeLinejoin: "round",
|
|
4430
4623
|
children: [
|
|
4431
|
-
/* @__PURE__ */ (0,
|
|
4624
|
+
/* @__PURE__ */ (0, U.jsx)("rect", {
|
|
4432
4625
|
x: "3",
|
|
4433
4626
|
y: "3",
|
|
4434
4627
|
width: "18",
|
|
@@ -4436,25 +4629,25 @@ var Zt = ({ schema: e, dataSource: a, className: o }) => {
|
|
|
4436
4629
|
rx: "2",
|
|
4437
4630
|
ry: "2"
|
|
4438
4631
|
}),
|
|
4439
|
-
/* @__PURE__ */ (0,
|
|
4632
|
+
/* @__PURE__ */ (0, U.jsx)("line", {
|
|
4440
4633
|
x1: "3",
|
|
4441
4634
|
y1: "9",
|
|
4442
4635
|
x2: "21",
|
|
4443
4636
|
y2: "9"
|
|
4444
4637
|
}),
|
|
4445
|
-
/* @__PURE__ */ (0,
|
|
4638
|
+
/* @__PURE__ */ (0, U.jsx)("line", {
|
|
4446
4639
|
x1: "9",
|
|
4447
4640
|
y1: "21",
|
|
4448
4641
|
x2: "9",
|
|
4449
4642
|
y2: "9"
|
|
4450
4643
|
})
|
|
4451
4644
|
]
|
|
4452
|
-
}), /* @__PURE__ */ (0,
|
|
4645
|
+
}), /* @__PURE__ */ (0, U.jsx)("p", {
|
|
4453
4646
|
className: "text-xs",
|
|
4454
4647
|
children: "No data available"
|
|
4455
4648
|
})]
|
|
4456
4649
|
})
|
|
4457
|
-
}) : /* @__PURE__ */ (0,
|
|
4650
|
+
}) : /* @__PURE__ */ (0, U.jsx)(n, {
|
|
4458
4651
|
schema: {
|
|
4459
4652
|
...e,
|
|
4460
4653
|
type: "data-table",
|
|
@@ -4463,7 +4656,7 @@ var Zt = ({ schema: e, dataSource: a, className: o }) => {
|
|
|
4463
4656
|
},
|
|
4464
4657
|
className: o
|
|
4465
4658
|
});
|
|
4466
|
-
},
|
|
4659
|
+
}, an = {
|
|
4467
4660
|
breadcrumb: ["Dashboard", "Configuration"],
|
|
4468
4661
|
sections: [
|
|
4469
4662
|
{
|
|
@@ -4568,12 +4761,12 @@ var Zt = ({ schema: e, dataSource: a, className: o }) => {
|
|
|
4568
4761
|
}
|
|
4569
4762
|
]
|
|
4570
4763
|
};
|
|
4571
|
-
function
|
|
4572
|
-
let { draft: a, isDirty: o, updateField: s, discard: c } =
|
|
4573
|
-
return /* @__PURE__ */ (0,
|
|
4764
|
+
function on({ open: e, onClose: t, config: n, onSave: r, onFieldChange: i }) {
|
|
4765
|
+
let { draft: a, isDirty: o, updateField: s, discard: c } = v(n, { onUpdate: i });
|
|
4766
|
+
return /* @__PURE__ */ (0, U.jsx)(m, {
|
|
4574
4767
|
open: e,
|
|
4575
4768
|
onClose: t,
|
|
4576
|
-
schema:
|
|
4769
|
+
schema: an,
|
|
4577
4770
|
draft: a,
|
|
4578
4771
|
isDirty: o,
|
|
4579
4772
|
onFieldChange: s,
|
|
@@ -4583,7 +4776,7 @@ function $t({ open: e, onClose: t, config: n, onSave: r, onFieldChange: i }) {
|
|
|
4583
4776
|
}
|
|
4584
4777
|
//#endregion
|
|
4585
4778
|
//#region src/WidgetConfigPanel.tsx
|
|
4586
|
-
var
|
|
4779
|
+
var sn = [
|
|
4587
4780
|
{
|
|
4588
4781
|
value: "metric",
|
|
4589
4782
|
label: "Metric"
|
|
@@ -4628,7 +4821,7 @@ var en = [
|
|
|
4628
4821
|
value: "custom",
|
|
4629
4822
|
label: "Custom"
|
|
4630
4823
|
}
|
|
4631
|
-
],
|
|
4824
|
+
], cn = [
|
|
4632
4825
|
{
|
|
4633
4826
|
value: "default",
|
|
4634
4827
|
label: "Default"
|
|
@@ -4661,7 +4854,7 @@ var en = [
|
|
|
4661
4854
|
value: "danger",
|
|
4662
4855
|
label: "Danger"
|
|
4663
4856
|
}
|
|
4664
|
-
],
|
|
4857
|
+
], ln = [
|
|
4665
4858
|
{
|
|
4666
4859
|
value: "count",
|
|
4667
4860
|
label: "Count"
|
|
@@ -4682,7 +4875,7 @@ var en = [
|
|
|
4682
4875
|
value: "max",
|
|
4683
4876
|
label: "Max"
|
|
4684
4877
|
}
|
|
4685
|
-
],
|
|
4878
|
+
], un = [
|
|
4686
4879
|
"bar",
|
|
4687
4880
|
"line",
|
|
4688
4881
|
"area",
|
|
@@ -4690,32 +4883,32 @@ var en = [
|
|
|
4690
4883
|
"donut",
|
|
4691
4884
|
"scatter"
|
|
4692
4885
|
];
|
|
4693
|
-
function
|
|
4694
|
-
return !!e &&
|
|
4886
|
+
function dn(e) {
|
|
4887
|
+
return !!e && un.includes(e);
|
|
4695
4888
|
}
|
|
4696
|
-
var
|
|
4889
|
+
var fn = [{
|
|
4697
4890
|
value: "group",
|
|
4698
4891
|
label: "Group"
|
|
4699
4892
|
}, {
|
|
4700
4893
|
value: "value",
|
|
4701
4894
|
label: "Value"
|
|
4702
|
-
}],
|
|
4895
|
+
}], pn = [{
|
|
4703
4896
|
value: "asc",
|
|
4704
4897
|
label: "↑"
|
|
4705
4898
|
}, {
|
|
4706
4899
|
value: "desc",
|
|
4707
4900
|
label: "↓"
|
|
4708
4901
|
}];
|
|
4709
|
-
function
|
|
4902
|
+
function mn(e, t, n, r) {
|
|
4710
4903
|
return {
|
|
4711
4904
|
key: e,
|
|
4712
4905
|
label: t,
|
|
4713
4906
|
type: "custom",
|
|
4714
|
-
render: (i, a, o) => /* @__PURE__ */ (0,
|
|
4907
|
+
render: (i, a, o) => /* @__PURE__ */ (0, U.jsx)(h, {
|
|
4715
4908
|
label: t,
|
|
4716
|
-
children: /* @__PURE__ */ (0,
|
|
4909
|
+
children: /* @__PURE__ */ (0, U.jsx)("div", {
|
|
4717
4910
|
"data-testid": `config-field-${e}`,
|
|
4718
|
-
children: /* @__PURE__ */ (0,
|
|
4911
|
+
children: /* @__PURE__ */ (0, U.jsx)(p, {
|
|
4719
4912
|
options: r ?? [],
|
|
4720
4913
|
value: i ?? "",
|
|
4721
4914
|
onValueChange: a,
|
|
@@ -4729,16 +4922,16 @@ function cn(e, t, n, r) {
|
|
|
4729
4922
|
})
|
|
4730
4923
|
};
|
|
4731
4924
|
}
|
|
4732
|
-
function
|
|
4925
|
+
function hn(e, t, n) {
|
|
4733
4926
|
let r = e && e.length > 0, i = r ? {
|
|
4734
4927
|
key: "object",
|
|
4735
4928
|
label: "Data source",
|
|
4736
4929
|
type: "custom",
|
|
4737
|
-
render: (t, n) => /* @__PURE__ */ (0,
|
|
4930
|
+
render: (t, n) => /* @__PURE__ */ (0, U.jsx)(h, {
|
|
4738
4931
|
label: "Data source",
|
|
4739
|
-
children: /* @__PURE__ */ (0,
|
|
4932
|
+
children: /* @__PURE__ */ (0, U.jsx)("div", {
|
|
4740
4933
|
"data-testid": "config-field-object",
|
|
4741
|
-
children: /* @__PURE__ */ (0,
|
|
4934
|
+
children: /* @__PURE__ */ (0, U.jsx)(p, {
|
|
4742
4935
|
options: e,
|
|
4743
4936
|
value: t ?? "",
|
|
4744
4937
|
onValueChange: n,
|
|
@@ -4754,27 +4947,27 @@ function ln(e, t, n) {
|
|
|
4754
4947
|
label: "Data source",
|
|
4755
4948
|
type: "input",
|
|
4756
4949
|
placeholder: "Object name"
|
|
4757
|
-
}, a = r ?
|
|
4950
|
+
}, a = r ? mn("categoryField", "Category field", "Select field…", t) : {
|
|
4758
4951
|
key: "categoryField",
|
|
4759
4952
|
label: "Category field",
|
|
4760
4953
|
type: "input",
|
|
4761
4954
|
placeholder: "e.g. status"
|
|
4762
|
-
}, o = r ?
|
|
4955
|
+
}, o = r ? mn("valueField", "Value field", "Select field…", t) : {
|
|
4763
4956
|
key: "valueField",
|
|
4764
4957
|
label: "Value field",
|
|
4765
4958
|
type: "input",
|
|
4766
4959
|
placeholder: "e.g. amount"
|
|
4767
|
-
}, s = r ?
|
|
4960
|
+
}, s = r ? mn("rowField", "Field", "Select row field…", t) : {
|
|
4768
4961
|
key: "rowField",
|
|
4769
4962
|
label: "Field",
|
|
4770
4963
|
type: "input",
|
|
4771
4964
|
placeholder: "e.g. owner"
|
|
4772
|
-
}, c = r ?
|
|
4965
|
+
}, c = r ? mn("columnField", "Field", "Select column field…", t) : {
|
|
4773
4966
|
key: "columnField",
|
|
4774
4967
|
label: "Field",
|
|
4775
4968
|
type: "input",
|
|
4776
4969
|
placeholder: "e.g. stage"
|
|
4777
|
-
}, l = r ?
|
|
4970
|
+
}, l = r ? mn("pivotValueField", "Field", "Select value field…", t) : {
|
|
4778
4971
|
key: "pivotValueField",
|
|
4779
4972
|
label: "Field",
|
|
4780
4973
|
type: "input",
|
|
@@ -4784,7 +4977,7 @@ function ln(e, t, n) {
|
|
|
4784
4977
|
breadcrumb: ["Dashboard", {
|
|
4785
4978
|
pivot: "Pivot table",
|
|
4786
4979
|
table: "Table"
|
|
4787
|
-
}[n ?? ""] ?? (
|
|
4980
|
+
}[n ?? ""] ?? (dn(n) ? "Chart" : "Widget")],
|
|
4788
4981
|
sections: [
|
|
4789
4982
|
{
|
|
4790
4983
|
key: "general",
|
|
@@ -4806,7 +4999,7 @@ function ln(e, t, n) {
|
|
|
4806
4999
|
key: "type",
|
|
4807
5000
|
label: "Widget type",
|
|
4808
5001
|
type: "select",
|
|
4809
|
-
options:
|
|
5002
|
+
options: sn,
|
|
4810
5003
|
defaultValue: "metric"
|
|
4811
5004
|
}
|
|
4812
5005
|
]
|
|
@@ -4824,7 +5017,7 @@ function ln(e, t, n) {
|
|
|
4824
5017
|
key: "aggregate",
|
|
4825
5018
|
label: "Aggregation",
|
|
4826
5019
|
type: "select",
|
|
4827
|
-
options:
|
|
5020
|
+
options: ln,
|
|
4828
5021
|
defaultValue: "count"
|
|
4829
5022
|
}
|
|
4830
5023
|
]
|
|
@@ -4847,14 +5040,14 @@ function ln(e, t, n) {
|
|
|
4847
5040
|
key: "rowSortBy",
|
|
4848
5041
|
label: "Sort by",
|
|
4849
5042
|
type: "icon-group",
|
|
4850
|
-
options:
|
|
5043
|
+
options: fn,
|
|
4851
5044
|
defaultValue: "group"
|
|
4852
5045
|
},
|
|
4853
5046
|
{
|
|
4854
5047
|
key: "rowSortOrder",
|
|
4855
5048
|
label: "Sort order",
|
|
4856
5049
|
type: "icon-group",
|
|
4857
|
-
options:
|
|
5050
|
+
options: pn,
|
|
4858
5051
|
defaultValue: "asc"
|
|
4859
5052
|
},
|
|
4860
5053
|
{
|
|
@@ -4882,14 +5075,14 @@ function ln(e, t, n) {
|
|
|
4882
5075
|
key: "columnSortBy",
|
|
4883
5076
|
label: "Sort by",
|
|
4884
5077
|
type: "icon-group",
|
|
4885
|
-
options:
|
|
5078
|
+
options: fn,
|
|
4886
5079
|
defaultValue: "group"
|
|
4887
5080
|
},
|
|
4888
5081
|
{
|
|
4889
5082
|
key: "columnSortOrder",
|
|
4890
5083
|
label: "Sort order",
|
|
4891
5084
|
type: "icon-group",
|
|
4892
|
-
options:
|
|
5085
|
+
options: pn,
|
|
4893
5086
|
defaultValue: "asc"
|
|
4894
5087
|
},
|
|
4895
5088
|
{
|
|
@@ -4917,7 +5110,7 @@ function ln(e, t, n) {
|
|
|
4917
5110
|
key: "aggregation",
|
|
4918
5111
|
label: "Aggregation",
|
|
4919
5112
|
type: "select",
|
|
4920
|
-
options:
|
|
5113
|
+
options: ln,
|
|
4921
5114
|
defaultValue: "sum"
|
|
4922
5115
|
},
|
|
4923
5116
|
{
|
|
@@ -4932,7 +5125,7 @@ function ln(e, t, n) {
|
|
|
4932
5125
|
key: "chart-axis",
|
|
4933
5126
|
title: "Axis & Series",
|
|
4934
5127
|
collapsible: !0,
|
|
4935
|
-
visibleWhen: (e) =>
|
|
5128
|
+
visibleWhen: (e) => dn(e.type),
|
|
4936
5129
|
fields: [
|
|
4937
5130
|
{
|
|
4938
5131
|
key: "xAxisLabel",
|
|
@@ -5002,7 +5195,7 @@ function ln(e, t, n) {
|
|
|
5002
5195
|
key: "colorVariant",
|
|
5003
5196
|
label: "Color variant",
|
|
5004
5197
|
type: "select",
|
|
5005
|
-
options:
|
|
5198
|
+
options: cn,
|
|
5006
5199
|
defaultValue: "default"
|
|
5007
5200
|
}, {
|
|
5008
5201
|
key: "actionUrl",
|
|
@@ -5014,7 +5207,7 @@ function ln(e, t, n) {
|
|
|
5014
5207
|
]
|
|
5015
5208
|
};
|
|
5016
5209
|
}
|
|
5017
|
-
function
|
|
5210
|
+
function gn(e) {
|
|
5018
5211
|
if (e == null) return "";
|
|
5019
5212
|
if (typeof e == "string") return e;
|
|
5020
5213
|
if (typeof e == "object") {
|
|
@@ -5023,16 +5216,16 @@ function un(e) {
|
|
|
5023
5216
|
}
|
|
5024
5217
|
return String(e);
|
|
5025
5218
|
}
|
|
5026
|
-
function
|
|
5027
|
-
let { draft: c, isDirty: l, updateField: u, discard: d } =
|
|
5219
|
+
function _n({ open: e, onClose: t, config: n, onSave: r, onFieldChange: i, headerExtra: a, availableObjects: o, availableFields: s }) {
|
|
5220
|
+
let { draft: c, isDirty: l, updateField: u, discard: d } = v(y.useMemo(() => ({
|
|
5028
5221
|
...n,
|
|
5029
|
-
title: typeof n.title == "object" ?
|
|
5030
|
-
description: typeof n.description == "object" ?
|
|
5222
|
+
title: typeof n.title == "object" ? gn(n.title) : n.title,
|
|
5223
|
+
description: typeof n.description == "object" ? gn(n.description) : n.description
|
|
5031
5224
|
}), [n]), { onUpdate: i });
|
|
5032
|
-
return /* @__PURE__ */ (0,
|
|
5225
|
+
return /* @__PURE__ */ (0, U.jsx)(m, {
|
|
5033
5226
|
open: e,
|
|
5034
5227
|
onClose: t,
|
|
5035
|
-
schema:
|
|
5228
|
+
schema: y.useMemo(() => hn(o, s, c.type), [
|
|
5036
5229
|
o,
|
|
5037
5230
|
s,
|
|
5038
5231
|
c.type
|
|
@@ -5047,12 +5240,12 @@ function dn({ open: e, onClose: t, config: n, onSave: r, onFieldChange: i, heade
|
|
|
5047
5240
|
}
|
|
5048
5241
|
//#endregion
|
|
5049
5242
|
//#region src/DashboardWithConfig.tsx
|
|
5050
|
-
function
|
|
5051
|
-
let [l, u] =
|
|
5052
|
-
|
|
5053
|
-
m(e),
|
|
5243
|
+
function vn({ schema: e, config: t, onConfigSave: n, onWidgetSave: r, onRefresh: i, recordCount: a, defaultConfigOpen: o = !1, className: s }) {
|
|
5244
|
+
let [l, u] = D(o), [d, f] = D(null), [p, m] = D(e), [h, g] = D(0);
|
|
5245
|
+
w(() => {
|
|
5246
|
+
m(e), g((e) => e + 1);
|
|
5054
5247
|
}, [e]);
|
|
5055
|
-
let
|
|
5248
|
+
let v = y.useMemo(() => {
|
|
5056
5249
|
if (!d || !p.widgets) return null;
|
|
5057
5250
|
let e = p.widgets.find((e) => (e.id || e.title) === d);
|
|
5058
5251
|
return e ? {
|
|
@@ -5069,11 +5262,11 @@ function fn({ schema: e, config: t, onConfigSave: n, onWidgetSave: r, onRefresh:
|
|
|
5069
5262
|
layoutW: e.layout?.w ?? 1,
|
|
5070
5263
|
layoutH: e.layout?.h ?? 1
|
|
5071
5264
|
} : null;
|
|
5072
|
-
}, [d, h]), b =
|
|
5265
|
+
}, [d, h]), b = S((e) => {
|
|
5073
5266
|
f(e), u(!0);
|
|
5074
|
-
}, []),
|
|
5267
|
+
}, []), x = S(() => {
|
|
5075
5268
|
f(null);
|
|
5076
|
-
}, []),
|
|
5269
|
+
}, []), C = S((e, t) => {
|
|
5077
5270
|
d && m((n) => n.widgets ? {
|
|
5078
5271
|
...n,
|
|
5079
5272
|
widgets: n.widgets.map((n) => (n.id || n.title) === d ? e === "layoutW" ? {
|
|
@@ -5093,26 +5286,26 @@ function fn({ schema: e, config: t, onConfigSave: n, onWidgetSave: r, onRefresh:
|
|
|
5093
5286
|
[e]: t
|
|
5094
5287
|
} : n)
|
|
5095
5288
|
} : n);
|
|
5096
|
-
}, [d]), T =
|
|
5097
|
-
d && r && r(d, e), f(null),
|
|
5098
|
-
}, [d, r]),
|
|
5289
|
+
}, [d]), T = S((e) => {
|
|
5290
|
+
d && r && r(d, e), f(null), g((e) => e + 1);
|
|
5291
|
+
}, [d, r]), E = S(() => {
|
|
5099
5292
|
u((e) => !e), f(null);
|
|
5100
5293
|
}, []);
|
|
5101
|
-
return /* @__PURE__ */ (0,
|
|
5102
|
-
className:
|
|
5294
|
+
return /* @__PURE__ */ (0, U.jsxs)("div", {
|
|
5295
|
+
className: _("flex h-full w-full", s),
|
|
5103
5296
|
"data-testid": "dashboard-with-config",
|
|
5104
|
-
children: [/* @__PURE__ */ (0,
|
|
5297
|
+
children: [/* @__PURE__ */ (0, U.jsxs)("div", {
|
|
5105
5298
|
className: "flex-1 min-w-0 overflow-auto relative",
|
|
5106
|
-
children: [/* @__PURE__ */ (0,
|
|
5299
|
+
children: [/* @__PURE__ */ (0, U.jsx)("div", {
|
|
5107
5300
|
className: "absolute top-2 right-2 z-10",
|
|
5108
|
-
children: /* @__PURE__ */ (0,
|
|
5301
|
+
children: /* @__PURE__ */ (0, U.jsxs)(c, {
|
|
5109
5302
|
size: "sm",
|
|
5110
5303
|
variant: l ? "default" : "outline",
|
|
5111
|
-
onClick:
|
|
5304
|
+
onClick: E,
|
|
5112
5305
|
"data-testid": "dashboard-config-toggle",
|
|
5113
|
-
children: [/* @__PURE__ */ (0,
|
|
5306
|
+
children: [/* @__PURE__ */ (0, U.jsx)(R, { className: "h-3.5 w-3.5 mr-1" }), "Settings"]
|
|
5114
5307
|
})
|
|
5115
|
-
}), /* @__PURE__ */ (0,
|
|
5308
|
+
}), /* @__PURE__ */ (0, U.jsx)(W, {
|
|
5116
5309
|
schema: p,
|
|
5117
5310
|
onRefresh: i,
|
|
5118
5311
|
recordCount: a,
|
|
@@ -5120,15 +5313,15 @@ function fn({ schema: e, config: t, onConfigSave: n, onWidgetSave: r, onRefresh:
|
|
|
5120
5313
|
selectedWidgetId: d,
|
|
5121
5314
|
onWidgetClick: b
|
|
5122
5315
|
})]
|
|
5123
|
-
}), l && /* @__PURE__ */ (0,
|
|
5316
|
+
}), l && /* @__PURE__ */ (0, U.jsx)("div", {
|
|
5124
5317
|
className: "relative shrink-0",
|
|
5125
|
-
children: d &&
|
|
5318
|
+
children: d && v ? /* @__PURE__ */ (0, U.jsx)(_n, {
|
|
5126
5319
|
open: !0,
|
|
5127
|
-
onClose:
|
|
5128
|
-
config:
|
|
5320
|
+
onClose: x,
|
|
5321
|
+
config: v,
|
|
5129
5322
|
onSave: T,
|
|
5130
|
-
onFieldChange:
|
|
5131
|
-
}) : /* @__PURE__ */ (0,
|
|
5323
|
+
onFieldChange: C
|
|
5324
|
+
}) : /* @__PURE__ */ (0, U.jsx)(on, {
|
|
5132
5325
|
open: !0,
|
|
5133
5326
|
onClose: () => u(!1),
|
|
5134
5327
|
config: t,
|
|
@@ -5137,7 +5330,7 @@ function fn({ schema: e, config: t, onConfigSave: n, onWidgetSave: r, onRefresh:
|
|
|
5137
5330
|
})]
|
|
5138
5331
|
});
|
|
5139
5332
|
}
|
|
5140
|
-
e.register("dashboard",
|
|
5333
|
+
e.register("dashboard", W, {
|
|
5141
5334
|
namespace: "view",
|
|
5142
5335
|
label: "Dashboard",
|
|
5143
5336
|
category: "Complex",
|
|
@@ -5165,7 +5358,7 @@ e.register("dashboard", re, {
|
|
|
5165
5358
|
columns: 3,
|
|
5166
5359
|
widgets: []
|
|
5167
5360
|
}
|
|
5168
|
-
}), e.register("metric",
|
|
5361
|
+
}), e.register("metric", Jt, {
|
|
5169
5362
|
namespace: "plugin-dashboard",
|
|
5170
5363
|
label: "Metric Widget",
|
|
5171
5364
|
category: "Dashboard",
|
|
@@ -5178,7 +5371,7 @@ e.register("dashboard", re, {
|
|
|
5178
5371
|
type: "string",
|
|
5179
5372
|
label: "Value"
|
|
5180
5373
|
}]
|
|
5181
|
-
}), e.register("metric-card",
|
|
5374
|
+
}), e.register("metric-card", Xt, {
|
|
5182
5375
|
namespace: "plugin-dashboard",
|
|
5183
5376
|
label: "Metric Card",
|
|
5184
5377
|
category: "Dashboard",
|
|
@@ -5233,7 +5426,36 @@ e.register("dashboard", re, {
|
|
|
5233
5426
|
title: "Metric",
|
|
5234
5427
|
value: "0"
|
|
5235
5428
|
}
|
|
5236
|
-
}), e.register("
|
|
5429
|
+
}), e.register("object-metric", Zt, {
|
|
5430
|
+
namespace: "plugin-dashboard",
|
|
5431
|
+
label: "Object Metric",
|
|
5432
|
+
category: "Dashboard",
|
|
5433
|
+
inputs: [
|
|
5434
|
+
{
|
|
5435
|
+
name: "objectName",
|
|
5436
|
+
type: "string",
|
|
5437
|
+
label: "Object Name",
|
|
5438
|
+
required: !0
|
|
5439
|
+
},
|
|
5440
|
+
{
|
|
5441
|
+
name: "label",
|
|
5442
|
+
type: "string",
|
|
5443
|
+
label: "Label"
|
|
5444
|
+
},
|
|
5445
|
+
{
|
|
5446
|
+
name: "aggregate",
|
|
5447
|
+
type: "object",
|
|
5448
|
+
label: "Aggregate",
|
|
5449
|
+
description: "Aggregation config: { field, function, groupBy }"
|
|
5450
|
+
},
|
|
5451
|
+
{
|
|
5452
|
+
name: "icon",
|
|
5453
|
+
type: "string",
|
|
5454
|
+
label: "Icon (Lucide name)"
|
|
5455
|
+
}
|
|
5456
|
+
],
|
|
5457
|
+
defaultProps: { label: "Metric" }
|
|
5458
|
+
}), e.register("pivot", en, {
|
|
5237
5459
|
namespace: "plugin-dashboard",
|
|
5238
5460
|
label: "Pivot Table",
|
|
5239
5461
|
category: "Dashboard",
|
|
@@ -5312,7 +5534,7 @@ e.register("dashboard", re, {
|
|
|
5312
5534
|
aggregation: "sum",
|
|
5313
5535
|
data: []
|
|
5314
5536
|
}
|
|
5315
|
-
}), e.register("object-pivot",
|
|
5537
|
+
}), e.register("object-pivot", tn, {
|
|
5316
5538
|
namespace: "plugin-dashboard",
|
|
5317
5539
|
label: "Object Pivot Table",
|
|
5318
5540
|
category: "Dashboard",
|
|
@@ -5401,7 +5623,7 @@ e.register("dashboard", re, {
|
|
|
5401
5623
|
valueField: "",
|
|
5402
5624
|
aggregation: "sum"
|
|
5403
5625
|
}
|
|
5404
|
-
}), e.register("dashboard-grid",
|
|
5626
|
+
}), e.register("dashboard-grid", Gt, {
|
|
5405
5627
|
namespace: "plugin-dashboard",
|
|
5406
5628
|
label: "Dashboard Grid (Editable)",
|
|
5407
5629
|
category: "Complex",
|
|
@@ -5429,7 +5651,7 @@ e.register("dashboard", re, {
|
|
|
5429
5651
|
widgets: [],
|
|
5430
5652
|
persistLayoutKey: "dashboard-layout"
|
|
5431
5653
|
}
|
|
5432
|
-
}), e.register("object-data-table",
|
|
5654
|
+
}), e.register("object-data-table", rn, {
|
|
5433
5655
|
namespace: "plugin-dashboard",
|
|
5434
5656
|
label: "Object Data Table",
|
|
5435
5657
|
category: "Dashboard",
|
|
@@ -5467,17 +5689,18 @@ e.register("dashboard", re, {
|
|
|
5467
5689
|
pagination: !1
|
|
5468
5690
|
}
|
|
5469
5691
|
});
|
|
5470
|
-
var
|
|
5471
|
-
DashboardRenderer:
|
|
5472
|
-
DashboardGridLayout:
|
|
5473
|
-
MetricWidget:
|
|
5474
|
-
MetricCard:
|
|
5475
|
-
|
|
5476
|
-
|
|
5477
|
-
|
|
5478
|
-
|
|
5479
|
-
|
|
5480
|
-
|
|
5692
|
+
var yn = {
|
|
5693
|
+
DashboardRenderer: W,
|
|
5694
|
+
DashboardGridLayout: Gt,
|
|
5695
|
+
MetricWidget: Jt,
|
|
5696
|
+
MetricCard: Xt,
|
|
5697
|
+
ObjectMetricWidget: Zt,
|
|
5698
|
+
PivotTable: en,
|
|
5699
|
+
ObjectPivotTable: tn,
|
|
5700
|
+
ObjectDataTable: rn,
|
|
5701
|
+
DashboardConfigPanel: on,
|
|
5702
|
+
WidgetConfigPanel: _n,
|
|
5703
|
+
DashboardWithConfig: vn
|
|
5481
5704
|
};
|
|
5482
5705
|
//#endregion
|
|
5483
|
-
export {
|
|
5706
|
+
export { on as DashboardConfigPanel, Gt as DashboardGridLayout, W as DashboardRenderer, vn as DashboardWithConfig, Xt as MetricCard, Jt as MetricWidget, rn as ObjectDataTable, Zt as ObjectMetricWidget, tn as ObjectPivotTable, en as PivotTable, _n as WidgetConfigPanel, yn as dashboardComponents };
|