@object-ui/plugin-view 3.1.4 → 3.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +13 -8
- package/CHANGELOG.md +33 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +611 -778
- package/dist/index.umd.cjs +2 -7
- package/dist/{plugin-view → packages/plugin-view}/src/ObjectView.d.ts +2 -0
- package/package.json +10 -10
- package/src/ObjectView.tsx +24 -0
- package/src/ViewSwitcher.tsx +2 -2
- package/vite.config.ts +4 -0
- /package/dist/{plugin-view → packages/plugin-view}/src/FilterUI.d.ts +0 -0
- /package/dist/{plugin-view → packages/plugin-view}/src/SharedViewLink.d.ts +0 -0
- /package/dist/{plugin-view → packages/plugin-view}/src/SortUI.d.ts +0 -0
- /package/dist/{plugin-view → packages/plugin-view}/src/ViewSwitcher.d.ts +0 -0
- /package/dist/{plugin-view → packages/plugin-view}/src/ViewTabBar.d.ts +0 -0
- /package/dist/{plugin-view → packages/plugin-view}/src/index.d.ts +0 -0
package/dist/index.js
CHANGED
|
@@ -4,43 +4,40 @@ import { ComponentRegistry as f, buildExpandFields as p } from "@object-ui/core"
|
|
|
4
4
|
import { SchemaRenderer as m, SchemaRendererContext as h } from "@object-ui/react";
|
|
5
5
|
import { ObjectGrid as g } from "@object-ui/plugin-grid";
|
|
6
6
|
import { ObjectForm as _ } from "@object-ui/plugin-form";
|
|
7
|
-
import { Badge as v, Button as y, Checkbox as b, ContextMenu as x, ContextMenuContent as S, ContextMenuItem as C, ContextMenuSeparator as w, ContextMenuSub as T, ContextMenuSubContent as
|
|
7
|
+
import { Badge as v, Button as y, Checkbox as b, ContextMenu as x, ContextMenuContent as S, ContextMenuItem as C, ContextMenuSeparator as w, ContextMenuSub as T, ContextMenuSubContent as ee, ContextMenuSubTrigger as E, ContextMenuTrigger as D, Dialog as te, DialogContent as O, DialogDescription as k, DialogHeader as ne, DialogTitle as re, Drawer as A, DrawerContent as ie, DrawerDescription as ae, DrawerHeader as oe, DrawerTitle as se, DropdownMenu as j, DropdownMenuContent as ce, DropdownMenuItem as le, DropdownMenuTrigger as ue, Input as M, Label as de, NavigationOverlay as fe, Popover as N, PopoverContent as P, PopoverTrigger as F, Select as I, SelectContent as pe, SelectItem as L, SelectTrigger as R, SelectValue as z, SortBuilder as me, Tabs as he, TabsList as ge, TabsTrigger as B, Tooltip as V, TooltipContent as H, TooltipProvider as _e, TooltipTrigger as ve, cn as U } from "@object-ui/components";
|
|
8
8
|
import { Activity as W, ArrowDown as G, ArrowUp as K, Calendar as q, Check as J, Copy as ye, FileText as be, GanttChartSquare as xe, Globe as Se, Grid as Ce, GripVertical as we, Images as Te, LayoutGrid as Ee, List as De, Lock as Oe, Map as ke, MoreHorizontal as Ae, Pencil as je, Pin as Me, PinOff as Ne, Plus as Pe, Save as Fe, Settings as Ie, Settings2 as Le, Share2 as Re, SlidersHorizontal as ze, Star as Be, Table as Ve, Trash2 as He, X as Ue, icons as We } from "lucide-react";
|
|
9
9
|
import { createPortal as Ge, unstable_batchedUpdates as Ke } from "react-dom";
|
|
10
10
|
//#region \0rolldown/runtime.js
|
|
11
|
-
var qe = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports)
|
|
12
|
-
if (typeof require < "u") return require.apply(this, arguments);
|
|
13
|
-
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.");
|
|
14
|
-
});
|
|
11
|
+
var qe = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports);
|
|
15
12
|
//#endregion
|
|
16
13
|
//#region ../../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs
|
|
17
|
-
function
|
|
14
|
+
function Je(e) {
|
|
18
15
|
var t, n, r = "";
|
|
19
16
|
if (typeof e == "string" || typeof e == "number") r += e;
|
|
20
17
|
else if (typeof e == "object") if (Array.isArray(e)) {
|
|
21
18
|
var i = e.length;
|
|
22
|
-
for (t = 0; t < i; t++) e[t] && (n =
|
|
19
|
+
for (t = 0; t < i; t++) e[t] && (n = Je(e[t])) && (r && (r += " "), r += n);
|
|
23
20
|
} else for (n in e) e[n] && (r && (r += " "), r += n);
|
|
24
21
|
return r;
|
|
25
22
|
}
|
|
26
|
-
function
|
|
27
|
-
for (var e, t, n = 0, r = "", i = arguments.length; n < i; n++) (e = arguments[n]) && (t =
|
|
23
|
+
function Ye() {
|
|
24
|
+
for (var e, t, n = 0, r = "", i = arguments.length; n < i; n++) (e = arguments[n]) && (t = Je(e)) && (r && (r += " "), r += t);
|
|
28
25
|
return r;
|
|
29
26
|
}
|
|
30
27
|
//#endregion
|
|
31
28
|
//#region ../../node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.mjs
|
|
32
|
-
var
|
|
33
|
-
if (t?.variants == null) return
|
|
29
|
+
var Xe = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, Ze = Ye, Qe = (e, t) => (n) => {
|
|
30
|
+
if (t?.variants == null) return Ze(e, n?.class, n?.className);
|
|
34
31
|
let { variants: r, defaultVariants: i } = t, a = Object.keys(r).map((e) => {
|
|
35
32
|
let t = n?.[e], a = i?.[e];
|
|
36
33
|
if (t === null) return null;
|
|
37
|
-
let o =
|
|
34
|
+
let o = Xe(t) || Xe(a);
|
|
38
35
|
return r[e][o];
|
|
39
36
|
}), o = n && Object.entries(n).reduce((e, t) => {
|
|
40
37
|
let [n, r] = t;
|
|
41
38
|
return r === void 0 || (e[n] = r), e;
|
|
42
39
|
}, {});
|
|
43
|
-
return
|
|
40
|
+
return Ze(e, a, t?.compoundVariants?.reduce((e, t) => {
|
|
44
41
|
let { class: n, className: r, ...a } = t;
|
|
45
42
|
return Object.entries(a).every((e) => {
|
|
46
43
|
let [t, n] = e;
|
|
@@ -57,7 +54,7 @@ var Ze = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, Qe = Xe, $e
|
|
|
57
54
|
r
|
|
58
55
|
] : e;
|
|
59
56
|
}, []), n?.class, n?.className);
|
|
60
|
-
},
|
|
57
|
+
}, $e = /* @__PURE__ */ qe(((e) => {
|
|
61
58
|
var t = Symbol.for("react.transitional.element"), n = Symbol.for("react.fragment");
|
|
62
59
|
function r(e, n, r) {
|
|
63
60
|
var i = null;
|
|
@@ -72,167 +69,9 @@ var Ze = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, Qe = Xe, $e
|
|
|
72
69
|
};
|
|
73
70
|
}
|
|
74
71
|
e.Fragment = n, e.jsx = r, e.jsxs = r;
|
|
75
|
-
})), tt = /* @__PURE__ */ qe(((e) => {
|
|
76
|
-
process.env.NODE_ENV !== "production" && (function() {
|
|
77
|
-
function t(e) {
|
|
78
|
-
if (e == null) return null;
|
|
79
|
-
if (typeof e == "function") return e.$$typeof === ee ? null : e.displayName || e.name || null;
|
|
80
|
-
if (typeof e == "string") return e;
|
|
81
|
-
switch (e) {
|
|
82
|
-
case _: return "Fragment";
|
|
83
|
-
case y: return "Profiler";
|
|
84
|
-
case v: return "StrictMode";
|
|
85
|
-
case C: return "Suspense";
|
|
86
|
-
case w: return "SuspenseList";
|
|
87
|
-
case D: return "Activity";
|
|
88
|
-
}
|
|
89
|
-
if (typeof e == "object") switch (typeof e.tag == "number" && console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), e.$$typeof) {
|
|
90
|
-
case g: return "Portal";
|
|
91
|
-
case x: return e.displayName || "Context";
|
|
92
|
-
case b: return (e._context.displayName || "Context") + ".Consumer";
|
|
93
|
-
case S:
|
|
94
|
-
var n = e.render;
|
|
95
|
-
return e = e.displayName, e ||= (e = n.displayName || n.name || "", e === "" ? "ForwardRef" : "ForwardRef(" + e + ")"), e;
|
|
96
|
-
case T: return n = e.displayName || null, n === null ? t(e.type) || "Memo" : n;
|
|
97
|
-
case E:
|
|
98
|
-
n = e._payload, e = e._init;
|
|
99
|
-
try {
|
|
100
|
-
return t(e(n));
|
|
101
|
-
} catch {}
|
|
102
|
-
}
|
|
103
|
-
return null;
|
|
104
|
-
}
|
|
105
|
-
function n(e) {
|
|
106
|
-
return "" + e;
|
|
107
|
-
}
|
|
108
|
-
function r(e) {
|
|
109
|
-
try {
|
|
110
|
-
n(e);
|
|
111
|
-
var t = !1;
|
|
112
|
-
} catch {
|
|
113
|
-
t = !0;
|
|
114
|
-
}
|
|
115
|
-
if (t) {
|
|
116
|
-
t = console;
|
|
117
|
-
var r = t.error, i = typeof Symbol == "function" && Symbol.toStringTag && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
118
|
-
return r.call(t, "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.", i), n(e);
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
function i(e) {
|
|
122
|
-
if (e === _) return "<>";
|
|
123
|
-
if (typeof e == "object" && e && e.$$typeof === E) return "<...>";
|
|
124
|
-
try {
|
|
125
|
-
var n = t(e);
|
|
126
|
-
return n ? "<" + n + ">" : "<...>";
|
|
127
|
-
} catch {
|
|
128
|
-
return "<...>";
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
function a() {
|
|
132
|
-
var e = te.A;
|
|
133
|
-
return e === null ? null : e.getOwner();
|
|
134
|
-
}
|
|
135
|
-
function o() {
|
|
136
|
-
return Error("react-stack-top-frame");
|
|
137
|
-
}
|
|
138
|
-
function s(e) {
|
|
139
|
-
if (O.call(e, "key")) {
|
|
140
|
-
var t = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
141
|
-
if (t && t.isReactWarning) return !1;
|
|
142
|
-
}
|
|
143
|
-
return e.key !== void 0;
|
|
144
|
-
}
|
|
145
|
-
function c(e, t) {
|
|
146
|
-
function n() {
|
|
147
|
-
re || (re = !0, console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)", t));
|
|
148
|
-
}
|
|
149
|
-
n.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
150
|
-
get: n,
|
|
151
|
-
configurable: !0
|
|
152
|
-
});
|
|
153
|
-
}
|
|
154
|
-
function l() {
|
|
155
|
-
var e = t(this.type);
|
|
156
|
-
return A[e] || (A[e] = !0, console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")), e = this.props.ref, e === void 0 ? null : e;
|
|
157
|
-
}
|
|
158
|
-
function u(e, t, n, r, i, a) {
|
|
159
|
-
var o = n.ref;
|
|
160
|
-
return e = {
|
|
161
|
-
$$typeof: h,
|
|
162
|
-
type: e,
|
|
163
|
-
key: t,
|
|
164
|
-
props: n,
|
|
165
|
-
_owner: r
|
|
166
|
-
}, (o === void 0 ? null : o) === null ? Object.defineProperty(e, "ref", {
|
|
167
|
-
enumerable: !1,
|
|
168
|
-
value: null
|
|
169
|
-
}) : Object.defineProperty(e, "ref", {
|
|
170
|
-
enumerable: !1,
|
|
171
|
-
get: l
|
|
172
|
-
}), e._store = {}, Object.defineProperty(e._store, "validated", {
|
|
173
|
-
configurable: !1,
|
|
174
|
-
enumerable: !1,
|
|
175
|
-
writable: !0,
|
|
176
|
-
value: 0
|
|
177
|
-
}), Object.defineProperty(e, "_debugInfo", {
|
|
178
|
-
configurable: !1,
|
|
179
|
-
enumerable: !1,
|
|
180
|
-
writable: !0,
|
|
181
|
-
value: null
|
|
182
|
-
}), Object.defineProperty(e, "_debugStack", {
|
|
183
|
-
configurable: !1,
|
|
184
|
-
enumerable: !1,
|
|
185
|
-
writable: !0,
|
|
186
|
-
value: i
|
|
187
|
-
}), Object.defineProperty(e, "_debugTask", {
|
|
188
|
-
configurable: !1,
|
|
189
|
-
enumerable: !1,
|
|
190
|
-
writable: !0,
|
|
191
|
-
value: a
|
|
192
|
-
}), Object.freeze && (Object.freeze(e.props), Object.freeze(e)), e;
|
|
193
|
-
}
|
|
194
|
-
function d(e, n, i, o, l, d) {
|
|
195
|
-
var p = n.children;
|
|
196
|
-
if (p !== void 0) if (o) if (k(p)) {
|
|
197
|
-
for (o = 0; o < p.length; o++) f(p[o]);
|
|
198
|
-
Object.freeze && Object.freeze(p);
|
|
199
|
-
} else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
200
|
-
else f(p);
|
|
201
|
-
if (O.call(n, "key")) {
|
|
202
|
-
p = t(e);
|
|
203
|
-
var m = Object.keys(n).filter(function(e) {
|
|
204
|
-
return e !== "key";
|
|
205
|
-
});
|
|
206
|
-
o = 0 < m.length ? "{key: someKey, " + m.join(": ..., ") + ": ...}" : "{key: someKey}", ae[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), ae[p + o] = !0);
|
|
207
|
-
}
|
|
208
|
-
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]);
|
|
209
|
-
else i = n;
|
|
210
|
-
return p && c(i, typeof e == "function" ? e.displayName || e.name || "Unknown" : e), u(e, p, i, a(), l, d);
|
|
211
|
-
}
|
|
212
|
-
function f(e) {
|
|
213
|
-
p(e) ? e._store && (e._store.validated = 1) : typeof e == "object" && e && e.$$typeof === E && (e._payload.status === "fulfilled" ? p(e._payload.value) && e._payload.value._store && (e._payload.value._store.validated = 1) : e._store && (e._store.validated = 1));
|
|
214
|
-
}
|
|
215
|
-
function p(e) {
|
|
216
|
-
return typeof e == "object" && !!e && e.$$typeof === h;
|
|
217
|
-
}
|
|
218
|
-
var m = Je("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"), ee = Symbol.for("react.client.reference"), te = m.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, O = Object.prototype.hasOwnProperty, k = Array.isArray, ne = console.createTask ? console.createTask : function() {
|
|
219
|
-
return null;
|
|
220
|
-
};
|
|
221
|
-
m = { react_stack_bottom_frame: function(e) {
|
|
222
|
-
return e();
|
|
223
|
-
} };
|
|
224
|
-
var re, A = {}, ie = m.react_stack_bottom_frame.bind(m, o)(), j = ne(i(o)), ae = {};
|
|
225
|
-
e.Fragment = _, e.jsx = function(e, t, n) {
|
|
226
|
-
var r = 1e4 > te.recentlyCreatedOwnerStacks++;
|
|
227
|
-
return d(e, t, n, !1, r ? Error("react-stack-top-frame") : ie, r ? ne(i(e)) : j);
|
|
228
|
-
}, e.jsxs = function(e, t, n) {
|
|
229
|
-
var r = 1e4 > te.recentlyCreatedOwnerStacks++;
|
|
230
|
-
return d(e, t, n, !0, r ? Error("react-stack-top-frame") : ie, r ? ne(i(e)) : j);
|
|
231
|
-
};
|
|
232
|
-
})();
|
|
233
72
|
})), Y = (/* @__PURE__ */ qe(((e, t) => {
|
|
234
|
-
|
|
235
|
-
})))(),
|
|
73
|
+
t.exports = $e();
|
|
74
|
+
})))(), et = {
|
|
236
75
|
list: "List",
|
|
237
76
|
detail: "Detail",
|
|
238
77
|
grid: "Grid",
|
|
@@ -242,7 +81,7 @@ var Ze = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, Qe = Xe, $e
|
|
|
242
81
|
map: "Map",
|
|
243
82
|
gallery: "Gallery",
|
|
244
83
|
gantt: "Gantt"
|
|
245
|
-
},
|
|
84
|
+
}, tt = {
|
|
246
85
|
list: De,
|
|
247
86
|
detail: be,
|
|
248
87
|
grid: Ce,
|
|
@@ -252,7 +91,7 @@ var Ze = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, Qe = Xe, $e
|
|
|
252
91
|
map: ke,
|
|
253
92
|
gallery: Te,
|
|
254
93
|
gantt: xe
|
|
255
|
-
},
|
|
94
|
+
}, nt = Qe("flex gap-4", {
|
|
256
95
|
variants: { position: {
|
|
257
96
|
top: "flex-col",
|
|
258
97
|
bottom: "flex-col-reverse",
|
|
@@ -260,55 +99,55 @@ var Ze = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, Qe = Xe, $e
|
|
|
260
99
|
right: "flex-row-reverse"
|
|
261
100
|
} },
|
|
262
101
|
defaultVariants: { position: "top" }
|
|
263
|
-
}),
|
|
102
|
+
}), rt = Qe("w-full", {
|
|
264
103
|
variants: { orientation: {
|
|
265
104
|
horizontal: "w-full",
|
|
266
105
|
vertical: "w-48"
|
|
267
106
|
} },
|
|
268
107
|
defaultVariants: { orientation: "horizontal" }
|
|
269
|
-
}),
|
|
108
|
+
}), it = Qe("flex gap-2", {
|
|
270
109
|
variants: { orientation: {
|
|
271
110
|
horizontal: "flex-row flex-wrap",
|
|
272
111
|
vertical: "flex-col"
|
|
273
112
|
} },
|
|
274
113
|
defaultVariants: { orientation: "horizontal" }
|
|
275
|
-
}),
|
|
114
|
+
}), at = Qe("", {
|
|
276
115
|
variants: { orientation: {
|
|
277
116
|
horizontal: "",
|
|
278
117
|
vertical: "flex h-auto flex-col items-stretch"
|
|
279
118
|
} },
|
|
280
119
|
defaultVariants: { orientation: "horizontal" }
|
|
281
120
|
});
|
|
282
|
-
function
|
|
121
|
+
function ot(e) {
|
|
283
122
|
return e.split("-").map((e) => e.charAt(0).toUpperCase() + e.slice(1)).join("");
|
|
284
123
|
}
|
|
285
|
-
var
|
|
286
|
-
function
|
|
124
|
+
var st = { Home: "House" };
|
|
125
|
+
function ct(e) {
|
|
287
126
|
if (!e) return null;
|
|
288
|
-
let t =
|
|
289
|
-
return We[
|
|
127
|
+
let t = ot(e);
|
|
128
|
+
return We[st[t] || t] || null;
|
|
290
129
|
}
|
|
291
|
-
function
|
|
292
|
-
return e.label ? e.label :
|
|
130
|
+
function lt(e) {
|
|
131
|
+
return e.label ? e.label : et[e.type] || e.type;
|
|
293
132
|
}
|
|
294
|
-
function
|
|
295
|
-
return e.icon ?
|
|
133
|
+
function ut(e) {
|
|
134
|
+
return e.icon ? ct(e.icon) : tt[e.type] || null;
|
|
296
135
|
}
|
|
297
|
-
function
|
|
136
|
+
function dt(e) {
|
|
298
137
|
return e.activeView ? e.activeView : e.defaultView ? e.defaultView : e.views?.[0]?.type;
|
|
299
138
|
}
|
|
300
|
-
var
|
|
139
|
+
var ft = {
|
|
301
140
|
share: Re,
|
|
302
141
|
settings: Ie,
|
|
303
142
|
duplicate: ye,
|
|
304
143
|
delete: He
|
|
305
|
-
},
|
|
144
|
+
}, pt = {
|
|
306
145
|
share: "Share",
|
|
307
146
|
settings: "Settings",
|
|
308
147
|
duplicate: "Duplicate",
|
|
309
148
|
delete: "Delete"
|
|
310
|
-
},
|
|
311
|
-
let c = e.useMemo(() => t.storageKey ? t.storageKey : `view-switcher${t.id ? `-${t.id}` : ""}`, [t.id, t.storageKey]), [l, u] = e.useState(() =>
|
|
149
|
+
}, mt = ({ schema: t, className: n, onViewChange: r, onCreateView: i, onViewAction: a, createViewLabel: o = "Create view", ...s }) => {
|
|
150
|
+
let c = e.useMemo(() => t.storageKey ? t.storageKey : `view-switcher${t.id ? `-${t.id}` : ""}`, [t.id, t.storageKey]), [l, u] = e.useState(() => dt(t));
|
|
312
151
|
e.useEffect(() => {
|
|
313
152
|
if (t.activeView) {
|
|
314
153
|
u(t.activeView);
|
|
@@ -343,25 +182,25 @@ var mt = {
|
|
|
343
182
|
}, [d]), p = l || t.views?.[0]?.type, h = p || "", g = t.views.find((e) => e.type === p) || t.views?.[0], _ = t.variant || "tabs", v = t.position || "top", b = v === "left" || v === "right", x = b ? "vertical" : "horizontal", S = t.viewActions && t.viewActions.length > 0 ? /* @__PURE__ */ (0, Y.jsx)("div", {
|
|
344
183
|
className: "flex items-center gap-1",
|
|
345
184
|
children: t.viewActions.map((e, t) => {
|
|
346
|
-
let n = e.icon &&
|
|
185
|
+
let n = e.icon && ct(e.icon) || ft[e.type];
|
|
347
186
|
return /* @__PURE__ */ (0, Y.jsx)(y, {
|
|
348
187
|
type: "button",
|
|
349
188
|
variant: "ghost",
|
|
350
|
-
size: "icon
|
|
189
|
+
size: "icon",
|
|
351
190
|
onClick: () => a?.(e.type, p),
|
|
352
|
-
title:
|
|
191
|
+
title: pt[e.type] || e.type,
|
|
353
192
|
children: n ? /* @__PURE__ */ (0, Y.jsx)(n, { className: "h-3.5 w-3.5" }) : null
|
|
354
193
|
}, `action-${e.type}-${t}`);
|
|
355
194
|
})
|
|
356
195
|
}) : null, C = t.allowCreateView ? /* @__PURE__ */ (0, Y.jsx)(y, {
|
|
357
196
|
type: "button",
|
|
358
197
|
variant: "ghost",
|
|
359
|
-
size: "icon
|
|
198
|
+
size: "icon",
|
|
360
199
|
onClick: () => i?.(),
|
|
361
200
|
title: o,
|
|
362
201
|
children: /* @__PURE__ */ (0, Y.jsx)(Pe, { className: "h-3.5 w-3.5" })
|
|
363
202
|
}) : null, w = /* @__PURE__ */ (0, Y.jsxs)("div", {
|
|
364
|
-
className: U(
|
|
203
|
+
className: U(rt({ orientation: x }), "flex items-center gap-1"),
|
|
365
204
|
children: [
|
|
366
205
|
_ === "dropdown" && /* @__PURE__ */ (0, Y.jsxs)(I, {
|
|
367
206
|
value: h,
|
|
@@ -371,20 +210,20 @@ var mt = {
|
|
|
371
210
|
children: /* @__PURE__ */ (0, Y.jsx)(z, { placeholder: "Select view" })
|
|
372
211
|
}), /* @__PURE__ */ (0, Y.jsx)(pe, { children: t.views.map((e, t) => /* @__PURE__ */ (0, Y.jsx)(L, {
|
|
373
212
|
value: e.type,
|
|
374
|
-
children:
|
|
213
|
+
children: lt(e)
|
|
375
214
|
}, `${e.type}-${t}`)) })]
|
|
376
215
|
}),
|
|
377
216
|
_ === "buttons" && /* @__PURE__ */ (0, Y.jsx)("div", {
|
|
378
|
-
className: U(
|
|
217
|
+
className: U(it({ orientation: x })),
|
|
379
218
|
children: t.views.map((e, t) => {
|
|
380
|
-
let n = e.type === p, r =
|
|
219
|
+
let n = e.type === p, r = ut(e);
|
|
381
220
|
return /* @__PURE__ */ (0, Y.jsxs)(y, {
|
|
382
221
|
type: "button",
|
|
383
222
|
size: "sm",
|
|
384
223
|
variant: n ? "secondary" : "ghost",
|
|
385
224
|
className: U("justify-start gap-2", b ? "w-full" : ""),
|
|
386
225
|
onClick: () => f(e.type),
|
|
387
|
-
children: [r ? /* @__PURE__ */ (0, Y.jsx)(r, { className: "h-4 w-4" }) : null, /* @__PURE__ */ (0, Y.jsx)("span", { children:
|
|
226
|
+
children: [r ? /* @__PURE__ */ (0, Y.jsx)(r, { className: "h-4 w-4" }) : null, /* @__PURE__ */ (0, Y.jsx)("span", { children: lt(e) })]
|
|
388
227
|
}, `${e.type}-${t}`);
|
|
389
228
|
})
|
|
390
229
|
}),
|
|
@@ -392,13 +231,13 @@ var mt = {
|
|
|
392
231
|
value: h,
|
|
393
232
|
onValueChange: (e) => f(e),
|
|
394
233
|
children: /* @__PURE__ */ (0, Y.jsx)(ge, {
|
|
395
|
-
className: U(
|
|
234
|
+
className: U(at({ orientation: x })),
|
|
396
235
|
children: t.views.map((e, t) => {
|
|
397
|
-
let n =
|
|
236
|
+
let n = ut(e);
|
|
398
237
|
return /* @__PURE__ */ (0, Y.jsxs)(B, {
|
|
399
238
|
value: e.type,
|
|
400
239
|
className: U("gap-2", b ? "justify-start" : ""),
|
|
401
|
-
children: [n ? /* @__PURE__ */ (0, Y.jsx)(n, { className: "h-4 w-4" }) : null, /* @__PURE__ */ (0, Y.jsx)("span", { children:
|
|
240
|
+
children: [n ? /* @__PURE__ */ (0, Y.jsx)(n, { className: "h-4 w-4" }) : null, /* @__PURE__ */ (0, Y.jsx)("span", { children: lt(e) })]
|
|
402
241
|
}, `${e.type}-${t}`);
|
|
403
242
|
})
|
|
404
243
|
})
|
|
@@ -417,7 +256,7 @@ var mt = {
|
|
|
417
256
|
...s
|
|
418
257
|
}) : null;
|
|
419
258
|
return /* @__PURE__ */ (0, Y.jsxs)("div", {
|
|
420
|
-
className: U(
|
|
259
|
+
className: U(nt({ position: v }), n),
|
|
421
260
|
children: [/* @__PURE__ */ (0, Y.jsx)("div", {
|
|
422
261
|
className: U("shrink-0", b ? "flex flex-col" : "flex"),
|
|
423
262
|
children: w
|
|
@@ -426,10 +265,20 @@ var mt = {
|
|
|
426
265
|
children: T
|
|
427
266
|
})]
|
|
428
267
|
});
|
|
429
|
-
},
|
|
268
|
+
}, ht = m, gt = ({ schema: e, dataSource: t, className: n, views: r, activeViewId: a, onViewChange: s, onRowClick: l, onEdit: f, renderListView: m, toolbarAddon: h, onCreateView: v, onViewAction: b }) => {
|
|
430
269
|
let [x, S] = d(null), C = u(null);
|
|
431
270
|
C.current = x;
|
|
432
|
-
let [w, T] = d(!1), [
|
|
271
|
+
let [w, T] = d(!1), [ee, E] = d("create"), [D, j] = d(null), [ce, le] = d(0);
|
|
272
|
+
o(() => {
|
|
273
|
+
if (!(!t?.onMutation || !e.objectName) && !m) return t.onMutation((t) => {
|
|
274
|
+
t.resource === e.objectName && le((e) => e + 1);
|
|
275
|
+
});
|
|
276
|
+
}, [
|
|
277
|
+
t,
|
|
278
|
+
e.objectName,
|
|
279
|
+
m
|
|
280
|
+
]);
|
|
281
|
+
let [ue, M] = d([]), [de, N] = d(!1), [P, F] = d({}), [I, pe] = d([]), L = e.listViews, R = L != null && Object.keys(L).length > 0, [z, me] = d(() => e.defaultListView && L?.[e.defaultListView] ? e.defaultListView : L && Object.keys(L)[0] || ""), V = c(() => !R || !z ? null : L[z] || null, [
|
|
433
282
|
R,
|
|
434
283
|
z,
|
|
435
284
|
L
|
|
@@ -454,7 +303,7 @@ var mt = {
|
|
|
454
303
|
let n = !0;
|
|
455
304
|
return (async () => {
|
|
456
305
|
if (!m && G !== "grid" && !(!t || !e.objectName)) {
|
|
457
|
-
|
|
306
|
+
N(!0);
|
|
458
307
|
try {
|
|
459
308
|
let r = V?.filter || W?.filter || e.table?.defaultFilters || [], i = Object.entries(P).filter(([, e]) => e !== void 0 && e !== "" && e !== null).map(([e, t]) => [
|
|
460
309
|
e,
|
|
@@ -475,11 +324,11 @@ var mt = {
|
|
|
475
324
|
$top: 100,
|
|
476
325
|
...s.length > 0 ? { $expand: s } : {}
|
|
477
326
|
}), l = [];
|
|
478
|
-
Array.isArray(c) ? l = c : c && typeof c == "object" && (Array.isArray(c.data) ? l = c.data : Array.isArray(c.records) ? l = c.records : Array.isArray(c.value) && (l = c.value)), n &&
|
|
327
|
+
Array.isArray(c) ? l = c : c && typeof c == "object" && (Array.isArray(c.data) ? l = c.data : Array.isArray(c.records) ? l = c.records : Array.isArray(c.value) && (l = c.value)), n && M(l);
|
|
479
328
|
} catch (e) {
|
|
480
329
|
console.error("ObjectView data fetch error:", e);
|
|
481
330
|
} finally {
|
|
482
|
-
n &&
|
|
331
|
+
n && N(!1);
|
|
483
332
|
}
|
|
484
333
|
}
|
|
485
334
|
})(), () => {
|
|
@@ -491,7 +340,7 @@ var mt = {
|
|
|
491
340
|
G,
|
|
492
341
|
P,
|
|
493
342
|
I,
|
|
494
|
-
|
|
343
|
+
ce,
|
|
495
344
|
V,
|
|
496
345
|
W,
|
|
497
346
|
m
|
|
@@ -502,7 +351,7 @@ var mt = {
|
|
|
502
351
|
update: !0,
|
|
503
352
|
delete: !0
|
|
504
353
|
}, ye = i(() => {
|
|
505
|
-
q === "page" && e.onNavigate ? e.onNavigate("new", "edit") : (
|
|
354
|
+
q === "page" && e.onNavigate ? e.onNavigate("new", "edit") : (E("create"), j(null), T(!0));
|
|
506
355
|
}, [q, e]), be = i((t) => {
|
|
507
356
|
if (f) {
|
|
508
357
|
f(t);
|
|
@@ -511,7 +360,7 @@ var mt = {
|
|
|
511
360
|
if (q === "page" && e.onNavigate) {
|
|
512
361
|
let n = t.id || t._id;
|
|
513
362
|
e.onNavigate(n, "edit");
|
|
514
|
-
} else
|
|
363
|
+
} else E("edit"), j(t), T(!0);
|
|
515
364
|
}, [
|
|
516
365
|
q,
|
|
517
366
|
e,
|
|
@@ -520,7 +369,7 @@ var mt = {
|
|
|
520
369
|
if (q === "page" && e.onNavigate) {
|
|
521
370
|
let n = t.id || t._id;
|
|
522
371
|
e.onNavigate(n, "view");
|
|
523
|
-
} else
|
|
372
|
+
} else E("view"), j(t), T(!0);
|
|
524
373
|
}, [q, e]), Se = i((t) => {
|
|
525
374
|
if (l) {
|
|
526
375
|
l(t);
|
|
@@ -534,11 +383,11 @@ var mt = {
|
|
|
534
383
|
return;
|
|
535
384
|
}
|
|
536
385
|
if (K.mode === "drawer") {
|
|
537
|
-
|
|
386
|
+
E("view"), j(t), T(!0);
|
|
538
387
|
return;
|
|
539
388
|
}
|
|
540
389
|
if (K.mode === "modal") {
|
|
541
|
-
|
|
390
|
+
E("view"), j(t), T(!0);
|
|
542
391
|
return;
|
|
543
392
|
}
|
|
544
393
|
if (K.mode === "page") {
|
|
@@ -547,7 +396,7 @@ var mt = {
|
|
|
547
396
|
return;
|
|
548
397
|
}
|
|
549
398
|
if (K.mode === "split" || K.mode === "popover") {
|
|
550
|
-
|
|
399
|
+
E("view"), j(t), T(!0);
|
|
551
400
|
return;
|
|
552
401
|
}
|
|
553
402
|
}
|
|
@@ -559,16 +408,16 @@ var mt = {
|
|
|
559
408
|
xe,
|
|
560
409
|
e
|
|
561
410
|
]), Ce = i((e) => {
|
|
562
|
-
|
|
411
|
+
le((e) => e + 1);
|
|
563
412
|
}, []), we = i((e) => {
|
|
564
|
-
|
|
413
|
+
le((e) => e + 1);
|
|
565
414
|
}, []), Te = i(() => {
|
|
566
|
-
T(!1),
|
|
415
|
+
T(!1), j(null), le((e) => e + 1);
|
|
567
416
|
}, []), Ee = i(() => {
|
|
568
|
-
T(!1),
|
|
417
|
+
T(!1), j(null);
|
|
569
418
|
}, []);
|
|
570
419
|
i(() => {
|
|
571
|
-
|
|
420
|
+
le((e) => e + 1);
|
|
572
421
|
}, []);
|
|
573
422
|
let De = c(() => !_e || !H || H.length <= 1 ? null : {
|
|
574
423
|
type: "view-switcher",
|
|
@@ -678,24 +527,6 @@ var mt = {
|
|
|
678
527
|
bordered: W?.bordered ?? !1,
|
|
679
528
|
color: W?.color
|
|
680
529
|
}, r = V?.options || W || {};
|
|
681
|
-
if (process.env.NODE_ENV === "development") {
|
|
682
|
-
let e = [
|
|
683
|
-
"startDateField",
|
|
684
|
-
"endDateField",
|
|
685
|
-
"dateField",
|
|
686
|
-
"groupBy",
|
|
687
|
-
"groupField",
|
|
688
|
-
"locationField",
|
|
689
|
-
"imageField",
|
|
690
|
-
"dependenciesField",
|
|
691
|
-
"progressField",
|
|
692
|
-
"titleField",
|
|
693
|
-
"subtitleField",
|
|
694
|
-
"latitudeField",
|
|
695
|
-
"longitudeField"
|
|
696
|
-
], n = r[t] || {}, i = e.filter((e) => e in r && !(e in n));
|
|
697
|
-
i.length > 0 && console.warn(`[Spec Compliance] View options use flat properties ${JSON.stringify(i)}. Move them under options.${t} per @objectstack/spec protocol.`);
|
|
698
|
-
}
|
|
699
530
|
switch (t) {
|
|
700
531
|
case "kanban": return {
|
|
701
532
|
type: "object-kanban",
|
|
@@ -775,11 +606,11 @@ var mt = {
|
|
|
775
606
|
V,
|
|
776
607
|
W
|
|
777
608
|
]), Ne = () => {
|
|
778
|
-
let t =
|
|
609
|
+
let t = D ? D.id || D._id : void 0;
|
|
779
610
|
return {
|
|
780
611
|
type: "object-form",
|
|
781
612
|
objectName: e.objectName,
|
|
782
|
-
mode:
|
|
613
|
+
mode: ee,
|
|
783
614
|
recordId: t,
|
|
784
615
|
title: e.form?.title,
|
|
785
616
|
description: e.form?.description,
|
|
@@ -794,7 +625,7 @@ var mt = {
|
|
|
794
625
|
cancelText: e.form?.cancelText,
|
|
795
626
|
showReset: e.form?.showReset,
|
|
796
627
|
initialValues: e.form?.initialValues,
|
|
797
|
-
readOnly: e.form?.readOnly ||
|
|
628
|
+
readOnly: e.form?.readOnly || ee === "view",
|
|
798
629
|
className: e.form?.className,
|
|
799
630
|
onSuccess: Te,
|
|
800
631
|
onCancel: Ee
|
|
@@ -802,7 +633,7 @@ var mt = {
|
|
|
802
633
|
}, Fe = () => {
|
|
803
634
|
if (e.form?.title) return e.form.title;
|
|
804
635
|
let t = x?.label || e.objectName;
|
|
805
|
-
switch (
|
|
636
|
+
switch (ee) {
|
|
806
637
|
case "create": return `Create ${t}`;
|
|
807
638
|
case "edit": return `Edit ${t}`;
|
|
808
639
|
case "view": return `View ${t}`;
|
|
@@ -817,7 +648,7 @@ var mt = {
|
|
|
817
648
|
direction: "right",
|
|
818
649
|
children: /* @__PURE__ */ (0, Y.jsxs)(ie, {
|
|
819
650
|
className: U("w-full sm:max-w-2xl", Ie),
|
|
820
|
-
children: [/* @__PURE__ */ (0, Y.jsxs)(
|
|
651
|
+
children: [/* @__PURE__ */ (0, Y.jsxs)(oe, { children: [/* @__PURE__ */ (0, Y.jsx)(se, { children: Fe() }), e.form?.description && /* @__PURE__ */ (0, Y.jsx)(ae, { children: e.form.description })] }), /* @__PURE__ */ (0, Y.jsx)("div", {
|
|
821
652
|
className: "flex-1 overflow-y-auto px-4 pb-4",
|
|
822
653
|
children: /* @__PURE__ */ (0, Y.jsx)(_, {
|
|
823
654
|
schema: Ne(),
|
|
@@ -850,7 +681,7 @@ var mt = {
|
|
|
850
681
|
W,
|
|
851
682
|
e.table?.defaultSort
|
|
852
683
|
]), Ve = () => {
|
|
853
|
-
let n = `${e.objectName}-${z || W?.id || "default"}-${G}-${
|
|
684
|
+
let n = `${e.objectName}-${z || W?.id || "default"}-${G}-${ce}`;
|
|
854
685
|
if (m) return m({
|
|
855
686
|
schema: {
|
|
856
687
|
type: "list-view",
|
|
@@ -902,22 +733,24 @@ var mt = {
|
|
|
902
733
|
virtualScroll: W?.virtualScroll ?? e.virtualScroll,
|
|
903
734
|
emptyState: W?.emptyState ?? e.emptyState,
|
|
904
735
|
aria: W?.aria ?? e.aria,
|
|
905
|
-
tabs: e.tabs
|
|
736
|
+
tabs: e.tabs,
|
|
737
|
+
refreshTrigger: ce
|
|
906
738
|
},
|
|
907
739
|
dataSource: t,
|
|
908
740
|
onEdit: be,
|
|
909
741
|
onRowClick: Se,
|
|
910
|
-
className: "h-full"
|
|
742
|
+
className: "h-full",
|
|
743
|
+
refreshKey: ce
|
|
911
744
|
});
|
|
912
745
|
if (G !== "grid") {
|
|
913
746
|
let e = je(G);
|
|
914
|
-
if (e &&
|
|
747
|
+
if (e && ht) return /* @__PURE__ */ (0, Y.jsx)(ht, {
|
|
915
748
|
schema: e,
|
|
916
749
|
dataSource: t,
|
|
917
|
-
data:
|
|
918
|
-
loading:
|
|
750
|
+
data: ue,
|
|
751
|
+
loading: de
|
|
919
752
|
}, n);
|
|
920
|
-
if (!
|
|
753
|
+
if (!ht) return /* @__PURE__ */ (0, Y.jsx)("div", {
|
|
921
754
|
className: "flex items-center justify-center h-40 text-muted-foreground",
|
|
922
755
|
children: /* @__PURE__ */ (0, Y.jsxs)("p", { children: [
|
|
923
756
|
"SchemaRenderer not available. Install @object-ui/react to render ",
|
|
@@ -958,7 +791,7 @@ var mt = {
|
|
|
958
791
|
className: "flex items-center justify-between gap-4",
|
|
959
792
|
children: [/* @__PURE__ */ (0, Y.jsx)("div", {
|
|
960
793
|
className: "flex items-center gap-2",
|
|
961
|
-
children: n && De && /* @__PURE__ */ (0, Y.jsx)(
|
|
794
|
+
children: n && De && /* @__PURE__ */ (0, Y.jsx)(mt, {
|
|
962
795
|
schema: De,
|
|
963
796
|
onViewChange: Oe,
|
|
964
797
|
onCreateView: v,
|
|
@@ -1005,9 +838,9 @@ var mt = {
|
|
|
1005
838
|
}),
|
|
1006
839
|
/* @__PURE__ */ (0, Y.jsx)("div", {
|
|
1007
840
|
className: "flex-1 min-h-0 min-w-0 overflow-hidden",
|
|
1008
|
-
children: w &&
|
|
841
|
+
children: w && D ? /* @__PURE__ */ (0, Y.jsx)(fe, {
|
|
1009
842
|
isOpen: w,
|
|
1010
|
-
selectedRecord:
|
|
843
|
+
selectedRecord: D,
|
|
1011
844
|
mode: "split",
|
|
1012
845
|
close: Ee,
|
|
1013
846
|
setIsOpen: Ke,
|
|
@@ -1047,9 +880,9 @@ var mt = {
|
|
|
1047
880
|
}),
|
|
1048
881
|
We === "drawer" && Le(),
|
|
1049
882
|
We === "modal" && Re(),
|
|
1050
|
-
We === "popover" && w &&
|
|
883
|
+
We === "popover" && w && D && /* @__PURE__ */ (0, Y.jsx)(fe, {
|
|
1051
884
|
isOpen: w,
|
|
1052
|
-
selectedRecord:
|
|
885
|
+
selectedRecord: D,
|
|
1053
886
|
mode: "popover",
|
|
1054
887
|
close: Ee,
|
|
1055
888
|
setIsOpen: Ke,
|
|
@@ -1060,14 +893,14 @@ var mt = {
|
|
|
1060
893
|
})
|
|
1061
894
|
]
|
|
1062
895
|
});
|
|
1063
|
-
},
|
|
896
|
+
}, _t = Qe("flex", {
|
|
1064
897
|
variants: { layout: {
|
|
1065
898
|
inline: "flex-col space-y-4",
|
|
1066
899
|
popover: "items-center",
|
|
1067
900
|
drawer: "items-center"
|
|
1068
901
|
} },
|
|
1069
902
|
defaultVariants: { layout: "inline" }
|
|
1070
|
-
}),
|
|
903
|
+
}), vt = (e) => e == null || e === "" ? !0 : Array.isArray(e) ? e.length === 0 : typeof e == "object" ? Object.values(e).every((e) => e == null || e === "") : !1, yt = (e) => Array.isArray(e) ? {
|
|
1071
904
|
start: e[0] || "",
|
|
1072
905
|
end: e[1] || ""
|
|
1073
906
|
} : e && typeof e == "object" ? {
|
|
@@ -1076,7 +909,7 @@ var mt = {
|
|
|
1076
909
|
} : {
|
|
1077
910
|
start: "",
|
|
1078
911
|
end: ""
|
|
1079
|
-
},
|
|
912
|
+
}, bt = ({ schema: t, className: n, onChange: r }) => {
|
|
1080
913
|
let [i, a] = e.useState(t.values || {}), [o, s] = e.useState(!1);
|
|
1081
914
|
e.useEffect(() => {
|
|
1082
915
|
t.values && a(t.values);
|
|
@@ -1102,10 +935,10 @@ var mt = {
|
|
|
1102
935
|
c(e);
|
|
1103
936
|
}, [c, t.showApply]), d = e.useCallback(() => {
|
|
1104
937
|
c(i), s(!1);
|
|
1105
|
-
}, [c, i]), f = e.useMemo(() => Object.values(i).filter((e) => !
|
|
938
|
+
}, [c, i]), f = e.useMemo(() => Object.values(i).filter((e) => !vt(e)).length, [i]), p = (e) => {
|
|
1106
939
|
let t = e.label || e.field, n = e.placeholder || `Filter by ${t}`;
|
|
1107
940
|
switch (e.type) {
|
|
1108
|
-
case "number": return /* @__PURE__ */ (0, Y.jsx)(
|
|
941
|
+
case "number": return /* @__PURE__ */ (0, Y.jsx)(M, {
|
|
1109
942
|
type: "number",
|
|
1110
943
|
value: i[e.field] ?? "",
|
|
1111
944
|
placeholder: n,
|
|
@@ -1147,16 +980,16 @@ var mt = {
|
|
|
1147
980
|
})
|
|
1148
981
|
});
|
|
1149
982
|
}
|
|
1150
|
-
case "date": return /* @__PURE__ */ (0, Y.jsx)(
|
|
983
|
+
case "date": return /* @__PURE__ */ (0, Y.jsx)(M, {
|
|
1151
984
|
type: "date",
|
|
1152
985
|
value: i[e.field] ?? "",
|
|
1153
986
|
onChange: (t) => l(e.field, t.target.value)
|
|
1154
987
|
});
|
|
1155
988
|
case "date-range": {
|
|
1156
|
-
let t =
|
|
989
|
+
let t = yt(i[e.field]);
|
|
1157
990
|
return /* @__PURE__ */ (0, Y.jsxs)("div", {
|
|
1158
991
|
className: "flex items-center gap-2",
|
|
1159
|
-
children: [/* @__PURE__ */ (0, Y.jsx)(
|
|
992
|
+
children: [/* @__PURE__ */ (0, Y.jsx)(M, {
|
|
1160
993
|
type: "date",
|
|
1161
994
|
value: t.start ?? "",
|
|
1162
995
|
onChange: (n) => {
|
|
@@ -1165,7 +998,7 @@ var mt = {
|
|
|
1165
998
|
start: n.target.value
|
|
1166
999
|
});
|
|
1167
1000
|
}
|
|
1168
|
-
}), /* @__PURE__ */ (0, Y.jsx)(
|
|
1001
|
+
}), /* @__PURE__ */ (0, Y.jsx)(M, {
|
|
1169
1002
|
type: "date",
|
|
1170
1003
|
value: t.end ?? "",
|
|
1171
1004
|
onChange: (n) => {
|
|
@@ -1187,7 +1020,7 @@ var mt = {
|
|
|
1187
1020
|
children: "Enabled"
|
|
1188
1021
|
})]
|
|
1189
1022
|
});
|
|
1190
|
-
default: return /* @__PURE__ */ (0, Y.jsx)(
|
|
1023
|
+
default: return /* @__PURE__ */ (0, Y.jsx)(M, {
|
|
1191
1024
|
value: i[e.field] ?? "",
|
|
1192
1025
|
placeholder: n,
|
|
1193
1026
|
onChange: (t) => l(e.field, t.target.value)
|
|
@@ -1199,7 +1032,7 @@ var mt = {
|
|
|
1199
1032
|
className: "grid gap-4 sm:grid-cols-2",
|
|
1200
1033
|
children: t.filters.map((e) => /* @__PURE__ */ (0, Y.jsxs)("div", {
|
|
1201
1034
|
className: "space-y-2",
|
|
1202
|
-
children: [/* @__PURE__ */ (0, Y.jsx)(
|
|
1035
|
+
children: [/* @__PURE__ */ (0, Y.jsx)(de, {
|
|
1203
1036
|
className: "text-xs text-muted-foreground",
|
|
1204
1037
|
children: e.label || e.field
|
|
1205
1038
|
}), p(e)]
|
|
@@ -1221,8 +1054,8 @@ var mt = {
|
|
|
1221
1054
|
})]
|
|
1222
1055
|
}), h = t.layout || "inline";
|
|
1223
1056
|
return h === "popover" ? /* @__PURE__ */ (0, Y.jsx)("div", {
|
|
1224
|
-
className: U(
|
|
1225
|
-
children: /* @__PURE__ */ (0, Y.jsxs)(
|
|
1057
|
+
className: U(_t({ layout: h }), n),
|
|
1058
|
+
children: /* @__PURE__ */ (0, Y.jsxs)(N, {
|
|
1226
1059
|
open: o,
|
|
1227
1060
|
onOpenChange: s,
|
|
1228
1061
|
children: [/* @__PURE__ */ (0, Y.jsx)(F, {
|
|
@@ -1248,7 +1081,7 @@ var mt = {
|
|
|
1248
1081
|
})]
|
|
1249
1082
|
})
|
|
1250
1083
|
}) : h === "drawer" ? /* @__PURE__ */ (0, Y.jsxs)("div", {
|
|
1251
|
-
className: U(
|
|
1084
|
+
className: U(_t({ layout: h }), n),
|
|
1252
1085
|
children: [/* @__PURE__ */ (0, Y.jsxs)(y, {
|
|
1253
1086
|
type: "button",
|
|
1254
1087
|
variant: f > 0 ? "secondary" : "outline",
|
|
@@ -1266,13 +1099,13 @@ var mt = {
|
|
|
1266
1099
|
}), /* @__PURE__ */ (0, Y.jsx)(A, {
|
|
1267
1100
|
open: o,
|
|
1268
1101
|
onOpenChange: s,
|
|
1269
|
-
children: /* @__PURE__ */ (0, Y.jsxs)(ie, { children: [/* @__PURE__ */ (0, Y.jsxs)(
|
|
1102
|
+
children: /* @__PURE__ */ (0, Y.jsxs)(ie, { children: [/* @__PURE__ */ (0, Y.jsxs)(oe, { children: [/* @__PURE__ */ (0, Y.jsx)(se, { children: "Filters" }), /* @__PURE__ */ (0, Y.jsx)(ae, { children: "Refine the data with advanced filters." })] }), /* @__PURE__ */ (0, Y.jsx)("div", {
|
|
1270
1103
|
className: "px-4 pb-6",
|
|
1271
1104
|
children: m
|
|
1272
1105
|
})] })
|
|
1273
1106
|
})]
|
|
1274
1107
|
}) : /* @__PURE__ */ (0, Y.jsxs)("div", {
|
|
1275
|
-
className: U(
|
|
1108
|
+
className: U(_t({ layout: h }), n),
|
|
1276
1109
|
children: [m, !t.showApply && t.showClear && /* @__PURE__ */ (0, Y.jsxs)(y, {
|
|
1277
1110
|
type: "button",
|
|
1278
1111
|
variant: "ghost",
|
|
@@ -1282,28 +1115,28 @@ var mt = {
|
|
|
1282
1115
|
children: [/* @__PURE__ */ (0, Y.jsx)(Ue, { className: "h-3.5 w-3.5" }), "Clear filters"]
|
|
1283
1116
|
})]
|
|
1284
1117
|
});
|
|
1285
|
-
},
|
|
1118
|
+
}, xt = Qe("", {
|
|
1286
1119
|
variants: { variant: {
|
|
1287
1120
|
buttons: "flex flex-wrap gap-2",
|
|
1288
1121
|
dropdown: "flex flex-wrap items-center gap-3",
|
|
1289
1122
|
builder: "space-y-3"
|
|
1290
1123
|
} },
|
|
1291
1124
|
defaultVariants: { variant: "dropdown" }
|
|
1292
|
-
}),
|
|
1125
|
+
}), St = (e) => e ? e.map((e) => ({
|
|
1293
1126
|
field: e.field,
|
|
1294
1127
|
direction: e.direction
|
|
1295
|
-
})) : [],
|
|
1128
|
+
})) : [], Ct = (e) => e.map((e) => ({
|
|
1296
1129
|
id: `${e.field}-${e.direction}`,
|
|
1297
1130
|
field: e.field,
|
|
1298
1131
|
order: e.direction
|
|
1299
|
-
})),
|
|
1132
|
+
})), wt = (e) => e.filter((e) => e.field).map((e) => ({
|
|
1300
1133
|
field: e.field,
|
|
1301
1134
|
direction: e.order
|
|
1302
|
-
})),
|
|
1303
|
-
let [i, a] = e.useState(() =>
|
|
1135
|
+
})), Tt = ({ schema: t, className: n, onChange: r }) => {
|
|
1136
|
+
let [i, a] = e.useState(() => St(t.sort)), [o, s] = e.useState(() => Ct(St(t.sort)));
|
|
1304
1137
|
e.useEffect(() => {
|
|
1305
|
-
let e =
|
|
1306
|
-
a(e), s(
|
|
1138
|
+
let e = St(t.sort);
|
|
1139
|
+
a(e), s(Ct(e));
|
|
1307
1140
|
}, [t.sort]);
|
|
1308
1141
|
let c = e.useCallback((e) => {
|
|
1309
1142
|
a(e), r?.(e), t.onChange && typeof window < "u" && window.dispatchEvent(new CustomEvent(t.onChange, { detail: { sort: e } }));
|
|
@@ -1333,7 +1166,7 @@ var mt = {
|
|
|
1333
1166
|
i
|
|
1334
1167
|
]);
|
|
1335
1168
|
if ((t.variant || "dropdown") === "buttons") return /* @__PURE__ */ (0, Y.jsx)("div", {
|
|
1336
|
-
className: U(
|
|
1169
|
+
className: U(xt({ variant: "buttons" }), n),
|
|
1337
1170
|
children: t.fields.map((e) => {
|
|
1338
1171
|
let t = i.find((t) => t.field === e.field), n = t?.direction === "asc" ? K : G;
|
|
1339
1172
|
return /* @__PURE__ */ (0, Y.jsxs)(y, {
|
|
@@ -1347,7 +1180,7 @@ var mt = {
|
|
|
1347
1180
|
})
|
|
1348
1181
|
});
|
|
1349
1182
|
if (t.multiple) return /* @__PURE__ */ (0, Y.jsx)("div", {
|
|
1350
|
-
className: U(
|
|
1183
|
+
className: U(xt({ variant: "builder" }), n),
|
|
1351
1184
|
children: /* @__PURE__ */ (0, Y.jsx)(me, {
|
|
1352
1185
|
fields: t.fields.map((e) => ({
|
|
1353
1186
|
value: e.field,
|
|
@@ -1355,13 +1188,13 @@ var mt = {
|
|
|
1355
1188
|
})),
|
|
1356
1189
|
value: o,
|
|
1357
1190
|
onChange: (e) => {
|
|
1358
|
-
s(e), c(
|
|
1191
|
+
s(e), c(wt(e));
|
|
1359
1192
|
}
|
|
1360
1193
|
})
|
|
1361
1194
|
});
|
|
1362
1195
|
let u = i[0];
|
|
1363
1196
|
return /* @__PURE__ */ (0, Y.jsxs)("div", {
|
|
1364
|
-
className: U(
|
|
1197
|
+
className: U(xt({ variant: "dropdown" }), n),
|
|
1365
1198
|
children: [/* @__PURE__ */ (0, Y.jsxs)(I, {
|
|
1366
1199
|
value: u?.field || "",
|
|
1367
1200
|
onValueChange: (e) => {
|
|
@@ -1404,7 +1237,7 @@ var mt = {
|
|
|
1404
1237
|
};
|
|
1405
1238
|
//#endregion
|
|
1406
1239
|
//#region src/SharedViewLink.tsx
|
|
1407
|
-
function
|
|
1240
|
+
function Et() {
|
|
1408
1241
|
if (typeof crypto < "u" && typeof crypto.randomUUID == "function") return crypto.randomUUID();
|
|
1409
1242
|
if (typeof crypto < "u" && typeof crypto.getRandomValues == "function") {
|
|
1410
1243
|
let e = new Uint8Array(16);
|
|
@@ -1412,12 +1245,12 @@ function Ot() {
|
|
|
1412
1245
|
}
|
|
1413
1246
|
return Math.random().toString(36).slice(2) + Math.random().toString(36).slice(2);
|
|
1414
1247
|
}
|
|
1415
|
-
function
|
|
1248
|
+
function Dt(e, t, n, r) {
|
|
1416
1249
|
return `${e}/share/${t}/${n}?mode=readonly&token=${r}`;
|
|
1417
1250
|
}
|
|
1418
|
-
var
|
|
1251
|
+
var Ot = ({ objectName: t, viewId: n = "default", baseUrl: r, onShare: i, className: a }) => {
|
|
1419
1252
|
let [o, s] = e.useState(null), [c, l] = e.useState(!1), [u, d] = e.useState(!1), [f, p] = e.useState(""), [m, h] = e.useState(""), g = r ?? (typeof window < "u" ? window.location.origin : ""), _ = e.useCallback(() => {
|
|
1420
|
-
let e =
|
|
1253
|
+
let e = Dt(g, t, n, Et());
|
|
1421
1254
|
s(e), l(!1);
|
|
1422
1255
|
let r = m ? new Date(Date.now() + parseInt(m, 10) * 864e5).toISOString() : void 0;
|
|
1423
1256
|
i?.(e, {
|
|
@@ -1439,7 +1272,7 @@ var At = ({ objectName: t, viewId: n = "default", baseUrl: r, onShare: i, classN
|
|
|
1439
1272
|
e.value = o, document.body.appendChild(e), e.select(), document.execCommand("copy"), document.body.removeChild(e), l(!0), setTimeout(() => l(!1), 2e3);
|
|
1440
1273
|
}
|
|
1441
1274
|
}, [o]);
|
|
1442
|
-
return /* @__PURE__ */ (0, Y.jsxs)(
|
|
1275
|
+
return /* @__PURE__ */ (0, Y.jsxs)(N, {
|
|
1443
1276
|
open: u,
|
|
1444
1277
|
onOpenChange: d,
|
|
1445
1278
|
children: [/* @__PURE__ */ (0, Y.jsx)(F, {
|
|
@@ -1471,7 +1304,7 @@ var At = ({ objectName: t, viewId: n = "default", baseUrl: r, onShare: i, classN
|
|
|
1471
1304
|
})]
|
|
1472
1305
|
}), o ? /* @__PURE__ */ (0, Y.jsxs)(Y.Fragment, { children: [/* @__PURE__ */ (0, Y.jsxs)("div", {
|
|
1473
1306
|
className: "flex items-center gap-2",
|
|
1474
|
-
children: [/* @__PURE__ */ (0, Y.jsx)(
|
|
1307
|
+
children: [/* @__PURE__ */ (0, Y.jsx)(M, {
|
|
1475
1308
|
value: o,
|
|
1476
1309
|
readOnly: !0,
|
|
1477
1310
|
className: "h-8 text-xs",
|
|
@@ -1508,7 +1341,7 @@ var At = ({ objectName: t, viewId: n = "default", baseUrl: r, onShare: i, classN
|
|
|
1508
1341
|
children: [/* @__PURE__ */ (0, Y.jsxs)("label", {
|
|
1509
1342
|
className: "flex items-center gap-1.5 text-xs font-medium text-foreground",
|
|
1510
1343
|
children: [/* @__PURE__ */ (0, Y.jsx)(Oe, { className: "h-3.5 w-3.5" }), "Password protection (optional)"]
|
|
1511
|
-
}), /* @__PURE__ */ (0, Y.jsx)(
|
|
1344
|
+
}), /* @__PURE__ */ (0, Y.jsx)(M, {
|
|
1512
1345
|
type: "password",
|
|
1513
1346
|
value: f,
|
|
1514
1347
|
onChange: (e) => p(e.target.value),
|
|
@@ -1561,48 +1394,48 @@ var At = ({ objectName: t, viewId: n = "default", baseUrl: r, onShare: i, classN
|
|
|
1561
1394
|
});
|
|
1562
1395
|
};
|
|
1563
1396
|
//#endregion
|
|
1564
|
-
//#region ../../node_modules/.pnpm/@dnd-kit+utilities@3.2.2_react@19.2.
|
|
1565
|
-
function
|
|
1397
|
+
//#region ../../node_modules/.pnpm/@dnd-kit+utilities@3.2.2_react@19.2.5/node_modules/@dnd-kit/utilities/dist/utilities.esm.js
|
|
1398
|
+
function kt() {
|
|
1566
1399
|
var e = [...arguments];
|
|
1567
1400
|
return c(() => (t) => {
|
|
1568
1401
|
e.forEach((e) => e(t));
|
|
1569
1402
|
}, e);
|
|
1570
1403
|
}
|
|
1571
|
-
var
|
|
1572
|
-
function
|
|
1404
|
+
var At = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0;
|
|
1405
|
+
function jt(e) {
|
|
1573
1406
|
let t = Object.prototype.toString.call(e);
|
|
1574
1407
|
return t === "[object Window]" || t === "[object global]";
|
|
1575
1408
|
}
|
|
1576
|
-
function
|
|
1409
|
+
function Mt(e) {
|
|
1577
1410
|
return "nodeType" in e;
|
|
1578
1411
|
}
|
|
1579
1412
|
function X(e) {
|
|
1580
|
-
return e ?
|
|
1413
|
+
return e ? jt(e) ? e : Mt(e) ? e.ownerDocument?.defaultView ?? window : window : window;
|
|
1581
1414
|
}
|
|
1582
|
-
function
|
|
1415
|
+
function Nt(e) {
|
|
1583
1416
|
let { Document: t } = X(e);
|
|
1584
1417
|
return e instanceof t;
|
|
1585
1418
|
}
|
|
1586
|
-
function
|
|
1587
|
-
return
|
|
1419
|
+
function Pt(e) {
|
|
1420
|
+
return jt(e) ? !1 : e instanceof X(e).HTMLElement;
|
|
1588
1421
|
}
|
|
1589
|
-
function
|
|
1422
|
+
function Ft(e) {
|
|
1590
1423
|
return e instanceof X(e).SVGElement;
|
|
1591
1424
|
}
|
|
1592
|
-
function
|
|
1593
|
-
return e ?
|
|
1425
|
+
function It(e) {
|
|
1426
|
+
return e ? jt(e) ? e.document : Mt(e) ? Nt(e) ? e : Pt(e) || Ft(e) ? e.ownerDocument : document : document : document;
|
|
1594
1427
|
}
|
|
1595
|
-
var
|
|
1596
|
-
function
|
|
1428
|
+
var Lt = At ? s : o;
|
|
1429
|
+
function Rt(e) {
|
|
1597
1430
|
let t = u(e);
|
|
1598
|
-
return
|
|
1431
|
+
return Lt(() => {
|
|
1599
1432
|
t.current = e;
|
|
1600
1433
|
}), i(function() {
|
|
1601
1434
|
var e = [...arguments];
|
|
1602
1435
|
return t.current == null ? void 0 : t.current(...e);
|
|
1603
1436
|
}, []);
|
|
1604
1437
|
}
|
|
1605
|
-
function
|
|
1438
|
+
function zt() {
|
|
1606
1439
|
let e = u(null);
|
|
1607
1440
|
return [i((t, n) => {
|
|
1608
1441
|
e.current = setInterval(t, n);
|
|
@@ -1610,41 +1443,41 @@ function Vt() {
|
|
|
1610
1443
|
e.current !== null && (clearInterval(e.current), e.current = null);
|
|
1611
1444
|
}, [])];
|
|
1612
1445
|
}
|
|
1613
|
-
function
|
|
1446
|
+
function Bt(e, t) {
|
|
1614
1447
|
t === void 0 && (t = [e]);
|
|
1615
1448
|
let n = u(e);
|
|
1616
|
-
return
|
|
1449
|
+
return Lt(() => {
|
|
1617
1450
|
n.current !== e && (n.current = e);
|
|
1618
1451
|
}, t), n;
|
|
1619
1452
|
}
|
|
1620
|
-
function
|
|
1453
|
+
function Vt(e, t) {
|
|
1621
1454
|
let n = u();
|
|
1622
1455
|
return c(() => {
|
|
1623
1456
|
let t = e(n.current);
|
|
1624
1457
|
return n.current = t, t;
|
|
1625
1458
|
}, [...t]);
|
|
1626
1459
|
}
|
|
1627
|
-
function
|
|
1628
|
-
let t =
|
|
1460
|
+
function Ht(e) {
|
|
1461
|
+
let t = Rt(e), n = u(null);
|
|
1629
1462
|
return [n, i((e) => {
|
|
1630
1463
|
e !== n.current && t?.(e, n.current), n.current = e;
|
|
1631
1464
|
}, [])];
|
|
1632
1465
|
}
|
|
1633
|
-
function
|
|
1466
|
+
function Ut(e) {
|
|
1634
1467
|
let t = u();
|
|
1635
1468
|
return o(() => {
|
|
1636
1469
|
t.current = e;
|
|
1637
1470
|
}, [e]), t.current;
|
|
1638
1471
|
}
|
|
1639
|
-
var
|
|
1640
|
-
function
|
|
1472
|
+
var Wt = {};
|
|
1473
|
+
function Gt(e, t) {
|
|
1641
1474
|
return c(() => {
|
|
1642
1475
|
if (t) return t;
|
|
1643
|
-
let n =
|
|
1644
|
-
return
|
|
1476
|
+
let n = Wt[e] == null ? 0 : Wt[e] + 1;
|
|
1477
|
+
return Wt[e] = n, e + "-" + n;
|
|
1645
1478
|
}, [e, t]);
|
|
1646
1479
|
}
|
|
1647
|
-
function
|
|
1480
|
+
function Kt(e) {
|
|
1648
1481
|
return function(t) {
|
|
1649
1482
|
return [...arguments].slice(1).reduce((t, n) => {
|
|
1650
1483
|
let r = Object.entries(n);
|
|
@@ -1656,22 +1489,22 @@ function Jt(e) {
|
|
|
1656
1489
|
}, { ...t });
|
|
1657
1490
|
};
|
|
1658
1491
|
}
|
|
1659
|
-
var
|
|
1660
|
-
function
|
|
1492
|
+
var qt = /* @__PURE__ */ Kt(1), Jt = /* @__PURE__ */ Kt(-1);
|
|
1493
|
+
function Yt(e) {
|
|
1661
1494
|
return "clientX" in e && "clientY" in e;
|
|
1662
1495
|
}
|
|
1663
|
-
function
|
|
1496
|
+
function Xt(e) {
|
|
1664
1497
|
if (!e) return !1;
|
|
1665
1498
|
let { KeyboardEvent: t } = X(e.target);
|
|
1666
1499
|
return t && e instanceof t;
|
|
1667
1500
|
}
|
|
1668
|
-
function
|
|
1501
|
+
function Zt(e) {
|
|
1669
1502
|
if (!e) return !1;
|
|
1670
1503
|
let { TouchEvent: t } = X(e.target);
|
|
1671
1504
|
return t && e instanceof t;
|
|
1672
1505
|
}
|
|
1673
|
-
function
|
|
1674
|
-
if (
|
|
1506
|
+
function Qt(e) {
|
|
1507
|
+
if (Zt(e)) {
|
|
1675
1508
|
if (e.touches && e.touches.length) {
|
|
1676
1509
|
let { clientX: t, clientY: n } = e.touches[0];
|
|
1677
1510
|
return {
|
|
@@ -1686,12 +1519,12 @@ function en(e) {
|
|
|
1686
1519
|
};
|
|
1687
1520
|
}
|
|
1688
1521
|
}
|
|
1689
|
-
return
|
|
1522
|
+
return Yt(e) ? {
|
|
1690
1523
|
x: e.clientX,
|
|
1691
1524
|
y: e.clientY
|
|
1692
1525
|
} : null;
|
|
1693
1526
|
}
|
|
1694
|
-
var
|
|
1527
|
+
var $t = /* @__PURE__ */ Object.freeze({
|
|
1695
1528
|
Translate: { toString(e) {
|
|
1696
1529
|
if (!e) return;
|
|
1697
1530
|
let { x: t, y: n } = e;
|
|
@@ -1703,27 +1536,27 @@ var tn = /* @__PURE__ */ Object.freeze({
|
|
|
1703
1536
|
return "scaleX(" + t + ") scaleY(" + n + ")";
|
|
1704
1537
|
} },
|
|
1705
1538
|
Transform: { toString(e) {
|
|
1706
|
-
if (e) return [
|
|
1539
|
+
if (e) return [$t.Translate.toString(e), $t.Scale.toString(e)].join(" ");
|
|
1707
1540
|
} },
|
|
1708
1541
|
Transition: { toString(e) {
|
|
1709
1542
|
let { property: t, duration: n, easing: r } = e;
|
|
1710
1543
|
return t + " " + n + "ms " + r;
|
|
1711
1544
|
} }
|
|
1712
|
-
}),
|
|
1713
|
-
function
|
|
1714
|
-
return e.matches(
|
|
1545
|
+
}), en = "a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";
|
|
1546
|
+
function tn(e) {
|
|
1547
|
+
return e.matches(en) ? e : e.querySelector(en);
|
|
1715
1548
|
}
|
|
1716
1549
|
//#endregion
|
|
1717
|
-
//#region ../../node_modules/.pnpm/@dnd-kit+accessibility@3.1.1_react@19.2.
|
|
1718
|
-
var
|
|
1719
|
-
function
|
|
1550
|
+
//#region ../../node_modules/.pnpm/@dnd-kit+accessibility@3.1.1_react@19.2.5/node_modules/@dnd-kit/accessibility/dist/accessibility.esm.js
|
|
1551
|
+
var nn = { display: "none" };
|
|
1552
|
+
function rn(e) {
|
|
1720
1553
|
let { id: n, value: r } = e;
|
|
1721
1554
|
return t.createElement("div", {
|
|
1722
1555
|
id: n,
|
|
1723
|
-
style:
|
|
1556
|
+
style: nn
|
|
1724
1557
|
}, r);
|
|
1725
1558
|
}
|
|
1726
|
-
function
|
|
1559
|
+
function an(e) {
|
|
1727
1560
|
let { id: n, announcement: r, ariaLiveType: i = "assertive" } = e;
|
|
1728
1561
|
return t.createElement("div", {
|
|
1729
1562
|
id: n,
|
|
@@ -1746,7 +1579,7 @@ function sn(e) {
|
|
|
1746
1579
|
"aria-atomic": !0
|
|
1747
1580
|
}, r);
|
|
1748
1581
|
}
|
|
1749
|
-
function
|
|
1582
|
+
function on() {
|
|
1750
1583
|
let [e, t] = d("");
|
|
1751
1584
|
return {
|
|
1752
1585
|
announce: i((e) => {
|
|
@@ -1756,23 +1589,23 @@ function cn() {
|
|
|
1756
1589
|
};
|
|
1757
1590
|
}
|
|
1758
1591
|
//#endregion
|
|
1759
|
-
//#region ../../node_modules/.pnpm/@dnd-kit+core@6.3.1_react-dom@19.2.
|
|
1760
|
-
var
|
|
1761
|
-
function
|
|
1762
|
-
let t = a(
|
|
1592
|
+
//#region ../../node_modules/.pnpm/@dnd-kit+core@6.3.1_react-dom@19.2.5_react@19.2.5__react@19.2.5/node_modules/@dnd-kit/core/dist/core.esm.js
|
|
1593
|
+
var sn = /* @__PURE__ */ n(null);
|
|
1594
|
+
function cn(e) {
|
|
1595
|
+
let t = a(sn);
|
|
1763
1596
|
o(() => {
|
|
1764
1597
|
if (!t) throw Error("useDndMonitor must be used within a children of <DndContext>");
|
|
1765
1598
|
return t(e);
|
|
1766
1599
|
}, [e, t]);
|
|
1767
1600
|
}
|
|
1768
|
-
function
|
|
1601
|
+
function ln() {
|
|
1769
1602
|
let [e] = d(() => /* @__PURE__ */ new Set()), t = i((t) => (e.add(t), () => e.delete(t)), [e]);
|
|
1770
1603
|
return [i((t) => {
|
|
1771
1604
|
let { type: n, event: r } = t;
|
|
1772
1605
|
e.forEach((e) => e[n]?.call(e, r));
|
|
1773
1606
|
}, [e]), t];
|
|
1774
1607
|
}
|
|
1775
|
-
var
|
|
1608
|
+
var un = { draggable: "\n To pick up a draggable item, press the space bar.\n While dragging, use the arrow keys to move the item.\n Press space again to drop the item in its new position, or press escape to cancel.\n " }, dn = {
|
|
1776
1609
|
onDragStart(e) {
|
|
1777
1610
|
let { active: t } = e;
|
|
1778
1611
|
return "Picked up draggable item " + t.id + ".";
|
|
@@ -1790,11 +1623,11 @@ var fn = { draggable: "\n To pick up a draggable item, press the space bar.\n
|
|
|
1790
1623
|
return "Dragging was cancelled. Draggable item " + t.id + " was dropped.";
|
|
1791
1624
|
}
|
|
1792
1625
|
};
|
|
1793
|
-
function
|
|
1794
|
-
let { announcements: n =
|
|
1626
|
+
function fn(e) {
|
|
1627
|
+
let { announcements: n = dn, container: r, hiddenTextDescribedById: i, screenReaderInstructions: a = un } = e, { announce: s, announcement: l } = on(), u = Gt("DndLiveRegion"), [f, p] = d(!1);
|
|
1795
1628
|
if (o(() => {
|
|
1796
1629
|
p(!0);
|
|
1797
|
-
}, []),
|
|
1630
|
+
}, []), cn(c(() => ({
|
|
1798
1631
|
onDragStart(e) {
|
|
1799
1632
|
let { active: t } = e;
|
|
1800
1633
|
s(n.onDragStart({ active: t }));
|
|
@@ -1828,10 +1661,10 @@ function mn(e) {
|
|
|
1828
1661
|
}));
|
|
1829
1662
|
}
|
|
1830
1663
|
}), [s, n])), !f) return null;
|
|
1831
|
-
let m = t.createElement(t.Fragment, null, t.createElement(
|
|
1664
|
+
let m = t.createElement(t.Fragment, null, t.createElement(rn, {
|
|
1832
1665
|
id: i,
|
|
1833
1666
|
value: a.draggable
|
|
1834
|
-
}), t.createElement(
|
|
1667
|
+
}), t.createElement(an, {
|
|
1835
1668
|
id: u,
|
|
1836
1669
|
announcement: l
|
|
1837
1670
|
}));
|
|
@@ -1841,49 +1674,49 @@ var Z;
|
|
|
1841
1674
|
(function(e) {
|
|
1842
1675
|
e.DragStart = "dragStart", e.DragMove = "dragMove", e.DragEnd = "dragEnd", e.DragCancel = "dragCancel", e.DragOver = "dragOver", e.RegisterDroppable = "registerDroppable", e.SetDroppableDisabled = "setDroppableDisabled", e.UnregisterDroppable = "unregisterDroppable";
|
|
1843
1676
|
})(Z ||= {});
|
|
1844
|
-
function
|
|
1845
|
-
function
|
|
1677
|
+
function pn() {}
|
|
1678
|
+
function mn(e, t) {
|
|
1846
1679
|
return c(() => ({
|
|
1847
1680
|
sensor: e,
|
|
1848
1681
|
options: t ?? {}
|
|
1849
1682
|
}), [e, t]);
|
|
1850
1683
|
}
|
|
1851
|
-
function
|
|
1684
|
+
function hn() {
|
|
1852
1685
|
var e = [...arguments];
|
|
1853
1686
|
return c(() => [...e].filter((e) => e != null), [...e]);
|
|
1854
1687
|
}
|
|
1855
|
-
var
|
|
1688
|
+
var gn = /* @__PURE__ */ Object.freeze({
|
|
1856
1689
|
x: 0,
|
|
1857
1690
|
y: 0
|
|
1858
1691
|
});
|
|
1859
|
-
function
|
|
1692
|
+
function _n(e, t) {
|
|
1860
1693
|
return Math.sqrt((e.x - t.x) ** 2 + (e.y - t.y) ** 2);
|
|
1861
1694
|
}
|
|
1862
|
-
function
|
|
1695
|
+
function vn(e, t) {
|
|
1863
1696
|
let { data: { value: n } } = e, { data: { value: r } } = t;
|
|
1864
1697
|
return n - r;
|
|
1865
1698
|
}
|
|
1866
|
-
function
|
|
1699
|
+
function yn(e, t) {
|
|
1867
1700
|
let { data: { value: n } } = e, { data: { value: r } } = t;
|
|
1868
1701
|
return r - n;
|
|
1869
1702
|
}
|
|
1870
|
-
function
|
|
1703
|
+
function bn(e, t) {
|
|
1871
1704
|
if (!e || e.length === 0) return null;
|
|
1872
1705
|
let [n] = e;
|
|
1873
1706
|
return t ? n[t] : n;
|
|
1874
1707
|
}
|
|
1875
|
-
function
|
|
1708
|
+
function xn(e, t, n) {
|
|
1876
1709
|
return t === void 0 && (t = e.left), n === void 0 && (n = e.top), {
|
|
1877
1710
|
x: t + e.width * .5,
|
|
1878
1711
|
y: n + e.height * .5
|
|
1879
1712
|
};
|
|
1880
1713
|
}
|
|
1881
|
-
var
|
|
1882
|
-
let { collisionRect: t, droppableRects: n, droppableContainers: r } = e, i =
|
|
1714
|
+
var Sn = (e) => {
|
|
1715
|
+
let { collisionRect: t, droppableRects: n, droppableContainers: r } = e, i = xn(t, t.left, t.top), a = [];
|
|
1883
1716
|
for (let e of r) {
|
|
1884
1717
|
let { id: t } = e, r = n.get(t);
|
|
1885
1718
|
if (r) {
|
|
1886
|
-
let n =
|
|
1719
|
+
let n = _n(xn(r), i);
|
|
1887
1720
|
a.push({
|
|
1888
1721
|
id: t,
|
|
1889
1722
|
data: {
|
|
@@ -1893,9 +1726,9 @@ var wn = (e) => {
|
|
|
1893
1726
|
});
|
|
1894
1727
|
}
|
|
1895
1728
|
}
|
|
1896
|
-
return a.sort(
|
|
1729
|
+
return a.sort(vn);
|
|
1897
1730
|
};
|
|
1898
|
-
function
|
|
1731
|
+
function Cn(e, t) {
|
|
1899
1732
|
let n = Math.max(t.top, e.top), r = Math.max(t.left, e.left), i = Math.min(t.left + t.width, e.left + e.width), a = Math.min(t.top + t.height, e.top + e.height), o = i - r, s = a - n;
|
|
1900
1733
|
if (r < i && n < a) {
|
|
1901
1734
|
let n = t.width * t.height, r = e.width * e.height, i = o * s, a = i / (n + r - i);
|
|
@@ -1903,12 +1736,12 @@ function Tn(e, t) {
|
|
|
1903
1736
|
}
|
|
1904
1737
|
return 0;
|
|
1905
1738
|
}
|
|
1906
|
-
var
|
|
1739
|
+
var wn = (e) => {
|
|
1907
1740
|
let { collisionRect: t, droppableRects: n, droppableContainers: r } = e, i = [];
|
|
1908
1741
|
for (let e of r) {
|
|
1909
1742
|
let { id: r } = e, a = n.get(r);
|
|
1910
1743
|
if (a) {
|
|
1911
|
-
let n =
|
|
1744
|
+
let n = Cn(a, t);
|
|
1912
1745
|
n > 0 && i.push({
|
|
1913
1746
|
id: r,
|
|
1914
1747
|
data: {
|
|
@@ -1918,22 +1751,22 @@ var En = (e) => {
|
|
|
1918
1751
|
});
|
|
1919
1752
|
}
|
|
1920
1753
|
}
|
|
1921
|
-
return i.sort(
|
|
1754
|
+
return i.sort(yn);
|
|
1922
1755
|
};
|
|
1923
|
-
function
|
|
1756
|
+
function Tn(e, t, n) {
|
|
1924
1757
|
return {
|
|
1925
1758
|
...e,
|
|
1926
1759
|
scaleX: t && n ? t.width / n.width : 1,
|
|
1927
1760
|
scaleY: t && n ? t.height / n.height : 1
|
|
1928
1761
|
};
|
|
1929
1762
|
}
|
|
1930
|
-
function
|
|
1763
|
+
function En(e, t) {
|
|
1931
1764
|
return e && t ? {
|
|
1932
1765
|
x: e.left - t.left,
|
|
1933
1766
|
y: e.top - t.top
|
|
1934
|
-
} :
|
|
1767
|
+
} : gn;
|
|
1935
1768
|
}
|
|
1936
|
-
function
|
|
1769
|
+
function Dn(e) {
|
|
1937
1770
|
return function(t) {
|
|
1938
1771
|
return [...arguments].slice(1).reduce((t, n) => ({
|
|
1939
1772
|
...t,
|
|
@@ -1944,8 +1777,8 @@ function kn(e) {
|
|
|
1944
1777
|
}), { ...t });
|
|
1945
1778
|
};
|
|
1946
1779
|
}
|
|
1947
|
-
var
|
|
1948
|
-
function
|
|
1780
|
+
var On = /* @__PURE__ */ Dn(1);
|
|
1781
|
+
function kn(e) {
|
|
1949
1782
|
if (e.startsWith("matrix3d(")) {
|
|
1950
1783
|
let t = e.slice(9, -1).split(/, /);
|
|
1951
1784
|
return {
|
|
@@ -1965,8 +1798,8 @@ function jn(e) {
|
|
|
1965
1798
|
}
|
|
1966
1799
|
return null;
|
|
1967
1800
|
}
|
|
1968
|
-
function
|
|
1969
|
-
let r =
|
|
1801
|
+
function An(e, t, n) {
|
|
1802
|
+
let r = kn(t);
|
|
1970
1803
|
if (!r) return e;
|
|
1971
1804
|
let { scaleX: i, scaleY: a, x: o, y: s } = r, c = e.left - o - (1 - i) * parseFloat(n), l = e.top - s - (1 - a) * parseFloat(n.slice(n.indexOf(" ") + 1)), u = i ? e.width / i : e.width, d = a ? e.height / a : e.height;
|
|
1972
1805
|
return {
|
|
@@ -1978,13 +1811,13 @@ function Mn(e, t, n) {
|
|
|
1978
1811
|
left: c
|
|
1979
1812
|
};
|
|
1980
1813
|
}
|
|
1981
|
-
var
|
|
1982
|
-
function
|
|
1983
|
-
t === void 0 && (t =
|
|
1814
|
+
var jn = { ignoreTransform: !1 };
|
|
1815
|
+
function Mn(e, t) {
|
|
1816
|
+
t === void 0 && (t = jn);
|
|
1984
1817
|
let n = e.getBoundingClientRect();
|
|
1985
1818
|
if (t.ignoreTransform) {
|
|
1986
1819
|
let { transform: t, transformOrigin: r } = X(e).getComputedStyle(e);
|
|
1987
|
-
t && (n =
|
|
1820
|
+
t && (n = An(n, t, r));
|
|
1988
1821
|
}
|
|
1989
1822
|
let { top: r, left: i, width: a, height: o, bottom: s, right: c } = n;
|
|
1990
1823
|
return {
|
|
@@ -1996,10 +1829,10 @@ function Pn(e, t) {
|
|
|
1996
1829
|
right: c
|
|
1997
1830
|
};
|
|
1998
1831
|
}
|
|
1999
|
-
function
|
|
2000
|
-
return
|
|
1832
|
+
function Nn(e) {
|
|
1833
|
+
return Mn(e, { ignoreTransform: !0 });
|
|
2001
1834
|
}
|
|
2002
|
-
function
|
|
1835
|
+
function Pn(e) {
|
|
2003
1836
|
let t = e.innerWidth, n = e.innerHeight;
|
|
2004
1837
|
return {
|
|
2005
1838
|
top: 0,
|
|
@@ -2010,10 +1843,10 @@ function In(e) {
|
|
|
2010
1843
|
height: n
|
|
2011
1844
|
};
|
|
2012
1845
|
}
|
|
2013
|
-
function
|
|
1846
|
+
function Fn(e, t) {
|
|
2014
1847
|
return t === void 0 && (t = X(e).getComputedStyle(e)), t.position === "fixed";
|
|
2015
1848
|
}
|
|
2016
|
-
function
|
|
1849
|
+
function In(e, t) {
|
|
2017
1850
|
t === void 0 && (t = X(e).getComputedStyle(e));
|
|
2018
1851
|
let n = /(auto|scroll|overlay)/;
|
|
2019
1852
|
return [
|
|
@@ -2025,48 +1858,48 @@ function Rn(e, t) {
|
|
|
2025
1858
|
return typeof r == "string" ? n.test(r) : !1;
|
|
2026
1859
|
});
|
|
2027
1860
|
}
|
|
2028
|
-
function
|
|
1861
|
+
function Ln(e, t) {
|
|
2029
1862
|
let n = [];
|
|
2030
1863
|
function r(i) {
|
|
2031
1864
|
if (t != null && n.length >= t || !i) return n;
|
|
2032
|
-
if (
|
|
2033
|
-
if (!
|
|
1865
|
+
if (Nt(i) && i.scrollingElement != null && !n.includes(i.scrollingElement)) return n.push(i.scrollingElement), n;
|
|
1866
|
+
if (!Pt(i) || Ft(i) || n.includes(i)) return n;
|
|
2034
1867
|
let a = X(e).getComputedStyle(i);
|
|
2035
|
-
return i !== e &&
|
|
1868
|
+
return i !== e && In(i, a) && n.push(i), Fn(i, a) ? n : r(i.parentNode);
|
|
2036
1869
|
}
|
|
2037
1870
|
return e ? r(e) : n;
|
|
2038
1871
|
}
|
|
2039
|
-
function
|
|
2040
|
-
let [t] =
|
|
1872
|
+
function Rn(e) {
|
|
1873
|
+
let [t] = Ln(e, 1);
|
|
2041
1874
|
return t ?? null;
|
|
2042
1875
|
}
|
|
2043
|
-
function
|
|
2044
|
-
return !
|
|
1876
|
+
function zn(e) {
|
|
1877
|
+
return !At || !e ? null : jt(e) ? e : Mt(e) ? Nt(e) || e === It(e).scrollingElement ? window : Pt(e) ? e : null : null;
|
|
2045
1878
|
}
|
|
2046
|
-
function
|
|
2047
|
-
return
|
|
1879
|
+
function Bn(e) {
|
|
1880
|
+
return jt(e) ? e.scrollX : e.scrollLeft;
|
|
2048
1881
|
}
|
|
2049
|
-
function
|
|
2050
|
-
return
|
|
1882
|
+
function Vn(e) {
|
|
1883
|
+
return jt(e) ? e.scrollY : e.scrollTop;
|
|
2051
1884
|
}
|
|
2052
|
-
function
|
|
1885
|
+
function Hn(e) {
|
|
2053
1886
|
return {
|
|
2054
|
-
x:
|
|
2055
|
-
y:
|
|
1887
|
+
x: Bn(e),
|
|
1888
|
+
y: Vn(e)
|
|
2056
1889
|
};
|
|
2057
1890
|
}
|
|
2058
1891
|
var Q;
|
|
2059
1892
|
(function(e) {
|
|
2060
1893
|
e[e.Forward = 1] = "Forward", e[e.Backward = -1] = "Backward";
|
|
2061
1894
|
})(Q ||= {});
|
|
2062
|
-
function
|
|
2063
|
-
return !
|
|
1895
|
+
function Un(e) {
|
|
1896
|
+
return !At || !e ? !1 : e === document.scrollingElement;
|
|
2064
1897
|
}
|
|
2065
|
-
function
|
|
1898
|
+
function Wn(e) {
|
|
2066
1899
|
let t = {
|
|
2067
1900
|
x: 0,
|
|
2068
1901
|
y: 0
|
|
2069
|
-
}, n =
|
|
1902
|
+
}, n = Un(e) ? {
|
|
2070
1903
|
height: window.innerHeight,
|
|
2071
1904
|
width: window.innerWidth
|
|
2072
1905
|
} : {
|
|
@@ -2085,14 +1918,14 @@ function Kn(e) {
|
|
|
2085
1918
|
minScroll: t
|
|
2086
1919
|
};
|
|
2087
1920
|
}
|
|
2088
|
-
var
|
|
1921
|
+
var Gn = {
|
|
2089
1922
|
x: .2,
|
|
2090
1923
|
y: .2
|
|
2091
1924
|
};
|
|
2092
|
-
function
|
|
1925
|
+
function Kn(e, t, n, r, i) {
|
|
2093
1926
|
let { top: a, left: o, right: s, bottom: c } = n;
|
|
2094
|
-
r === void 0 && (r = 10), i === void 0 && (i =
|
|
2095
|
-
let { isTop: l, isBottom: u, isLeft: d, isRight: f } =
|
|
1927
|
+
r === void 0 && (r = 10), i === void 0 && (i = Gn);
|
|
1928
|
+
let { isTop: l, isBottom: u, isLeft: d, isRight: f } = Wn(e), p = {
|
|
2096
1929
|
x: 0,
|
|
2097
1930
|
y: 0
|
|
2098
1931
|
}, m = {
|
|
@@ -2107,7 +1940,7 @@ function Jn(e, t, n, r, i) {
|
|
|
2107
1940
|
speed: m
|
|
2108
1941
|
};
|
|
2109
1942
|
}
|
|
2110
|
-
function
|
|
1943
|
+
function qn(e) {
|
|
2111
1944
|
if (e === document.scrollingElement) {
|
|
2112
1945
|
let { innerWidth: e, innerHeight: t } = window;
|
|
2113
1946
|
return {
|
|
@@ -2129,37 +1962,37 @@ function Yn(e) {
|
|
|
2129
1962
|
height: e.clientHeight
|
|
2130
1963
|
};
|
|
2131
1964
|
}
|
|
2132
|
-
function
|
|
2133
|
-
return e.reduce((e, t) =>
|
|
1965
|
+
function Jn(e) {
|
|
1966
|
+
return e.reduce((e, t) => qt(e, Hn(t)), gn);
|
|
2134
1967
|
}
|
|
2135
|
-
function
|
|
2136
|
-
return e.reduce((e, t) => e +
|
|
1968
|
+
function Yn(e) {
|
|
1969
|
+
return e.reduce((e, t) => e + Bn(t), 0);
|
|
2137
1970
|
}
|
|
2138
|
-
function
|
|
2139
|
-
return e.reduce((e, t) => e +
|
|
1971
|
+
function Xn(e) {
|
|
1972
|
+
return e.reduce((e, t) => e + Vn(t), 0);
|
|
2140
1973
|
}
|
|
2141
|
-
function
|
|
2142
|
-
if (t === void 0 && (t =
|
|
1974
|
+
function Zn(e, t) {
|
|
1975
|
+
if (t === void 0 && (t = Mn), !e) return;
|
|
2143
1976
|
let { top: n, left: r, bottom: i, right: a } = t(e);
|
|
2144
|
-
|
|
1977
|
+
Rn(e) && (i <= 0 || a <= 0 || n >= window.innerHeight || r >= window.innerWidth) && e.scrollIntoView({
|
|
2145
1978
|
block: "center",
|
|
2146
1979
|
inline: "center"
|
|
2147
1980
|
});
|
|
2148
1981
|
}
|
|
2149
|
-
var
|
|
1982
|
+
var Qn = [[
|
|
2150
1983
|
"x",
|
|
2151
1984
|
["left", "right"],
|
|
2152
|
-
|
|
1985
|
+
Yn
|
|
2153
1986
|
], [
|
|
2154
1987
|
"y",
|
|
2155
1988
|
["top", "bottom"],
|
|
2156
|
-
|
|
2157
|
-
]],
|
|
1989
|
+
Xn
|
|
1990
|
+
]], $n = class {
|
|
2158
1991
|
constructor(e, t) {
|
|
2159
1992
|
this.rect = void 0, this.width = void 0, this.height = void 0, this.top = void 0, this.bottom = void 0, this.right = void 0, this.left = void 0;
|
|
2160
|
-
let n =
|
|
1993
|
+
let n = Ln(t), r = Jn(n);
|
|
2161
1994
|
this.rect = { ...e }, this.width = e.width, this.height = e.height;
|
|
2162
|
-
for (let [e, t, i] of
|
|
1995
|
+
for (let [e, t, i] of Qn) for (let a of t) Object.defineProperty(this, a, {
|
|
2163
1996
|
get: () => {
|
|
2164
1997
|
let t = i(n), o = r[e] - t;
|
|
2165
1998
|
return this.rect[a] + o;
|
|
@@ -2168,7 +2001,7 @@ var er = [[
|
|
|
2168
2001
|
});
|
|
2169
2002
|
Object.defineProperty(this, "rect", { enumerable: !1 });
|
|
2170
2003
|
}
|
|
2171
|
-
},
|
|
2004
|
+
}, er = class {
|
|
2172
2005
|
constructor(e) {
|
|
2173
2006
|
this.target = void 0, this.listeners = [], this.removeAll = () => {
|
|
2174
2007
|
this.listeners.forEach((e) => this.target?.removeEventListener(...e));
|
|
@@ -2183,29 +2016,29 @@ var er = [[
|
|
|
2183
2016
|
]);
|
|
2184
2017
|
}
|
|
2185
2018
|
};
|
|
2186
|
-
function
|
|
2019
|
+
function tr(e) {
|
|
2187
2020
|
let { EventTarget: t } = X(e);
|
|
2188
|
-
return e instanceof t ? e :
|
|
2021
|
+
return e instanceof t ? e : It(e);
|
|
2189
2022
|
}
|
|
2190
|
-
function
|
|
2023
|
+
function nr(e, t) {
|
|
2191
2024
|
let n = Math.abs(e.x), r = Math.abs(e.y);
|
|
2192
2025
|
return typeof t == "number" ? Math.sqrt(n ** 2 + r ** 2) > t : "x" in t && "y" in t ? n > t.x && r > t.y : "x" in t ? n > t.x : "y" in t ? r > t.y : !1;
|
|
2193
2026
|
}
|
|
2194
|
-
var
|
|
2027
|
+
var rr;
|
|
2195
2028
|
(function(e) {
|
|
2196
2029
|
e.Click = "click", e.DragStart = "dragstart", e.Keydown = "keydown", e.ContextMenu = "contextmenu", e.Resize = "resize", e.SelectionChange = "selectionchange", e.VisibilityChange = "visibilitychange";
|
|
2197
|
-
})(
|
|
2198
|
-
function
|
|
2030
|
+
})(rr ||= {});
|
|
2031
|
+
function ir(e) {
|
|
2199
2032
|
e.preventDefault();
|
|
2200
2033
|
}
|
|
2201
|
-
function
|
|
2034
|
+
function ar(e) {
|
|
2202
2035
|
e.stopPropagation();
|
|
2203
2036
|
}
|
|
2204
2037
|
var $;
|
|
2205
2038
|
(function(e) {
|
|
2206
2039
|
e.Space = "Space", e.Down = "ArrowDown", e.Right = "ArrowRight", e.Left = "ArrowLeft", e.Up = "ArrowUp", e.Esc = "Escape", e.Enter = "Enter", e.Tab = "Tab";
|
|
2207
2040
|
})($ ||= {});
|
|
2208
|
-
var
|
|
2041
|
+
var or = {
|
|
2209
2042
|
start: [$.Space, $.Enter],
|
|
2210
2043
|
cancel: [$.Esc],
|
|
2211
2044
|
end: [
|
|
@@ -2213,7 +2046,7 @@ var cr = {
|
|
|
2213
2046
|
$.Enter,
|
|
2214
2047
|
$.Tab
|
|
2215
2048
|
]
|
|
2216
|
-
},
|
|
2049
|
+
}, sr = (e, t) => {
|
|
2217
2050
|
let { currentCoordinates: n } = t;
|
|
2218
2051
|
switch (e.code) {
|
|
2219
2052
|
case $.Right: return {
|
|
@@ -2233,22 +2066,22 @@ var cr = {
|
|
|
2233
2066
|
y: n.y - 25
|
|
2234
2067
|
};
|
|
2235
2068
|
}
|
|
2236
|
-
},
|
|
2069
|
+
}, cr = class {
|
|
2237
2070
|
constructor(e) {
|
|
2238
2071
|
this.props = void 0, this.autoScrollEnabled = !1, this.referenceCoordinates = void 0, this.listeners = void 0, this.windowListeners = void 0, this.props = e;
|
|
2239
2072
|
let { event: { target: t } } = e;
|
|
2240
|
-
this.props = e, this.listeners = new
|
|
2073
|
+
this.props = e, this.listeners = new er(It(t)), this.windowListeners = new er(X(t)), this.handleKeyDown = this.handleKeyDown.bind(this), this.handleCancel = this.handleCancel.bind(this), this.attach();
|
|
2241
2074
|
}
|
|
2242
2075
|
attach() {
|
|
2243
|
-
this.handleStart(), this.windowListeners.add(
|
|
2076
|
+
this.handleStart(), this.windowListeners.add(rr.Resize, this.handleCancel), this.windowListeners.add(rr.VisibilityChange, this.handleCancel), setTimeout(() => this.listeners.add(rr.Keydown, this.handleKeyDown));
|
|
2244
2077
|
}
|
|
2245
2078
|
handleStart() {
|
|
2246
2079
|
let { activeNode: e, onStart: t } = this.props, n = e.node.current;
|
|
2247
|
-
n &&
|
|
2080
|
+
n && Zn(n), t(gn);
|
|
2248
2081
|
}
|
|
2249
2082
|
handleKeyDown(e) {
|
|
2250
|
-
if (
|
|
2251
|
-
let { active: t, context: n, options: r } = this.props, { keyboardCodes: i =
|
|
2083
|
+
if (Xt(e)) {
|
|
2084
|
+
let { active: t, context: n, options: r } = this.props, { keyboardCodes: i = or, coordinateGetter: a = sr, scrollBehavior: o = "smooth" } = r, { code: s } = e;
|
|
2252
2085
|
if (i.end.includes(s)) {
|
|
2253
2086
|
this.handleEnd(e);
|
|
2254
2087
|
return;
|
|
@@ -2260,7 +2093,7 @@ var cr = {
|
|
|
2260
2093
|
let { collisionRect: c } = n.current, l = c ? {
|
|
2261
2094
|
x: c.left,
|
|
2262
2095
|
y: c.top
|
|
2263
|
-
} :
|
|
2096
|
+
} : gn;
|
|
2264
2097
|
this.referenceCoordinates ||= l;
|
|
2265
2098
|
let u = a(e, {
|
|
2266
2099
|
active: t,
|
|
@@ -2268,12 +2101,12 @@ var cr = {
|
|
|
2268
2101
|
currentCoordinates: l
|
|
2269
2102
|
});
|
|
2270
2103
|
if (u) {
|
|
2271
|
-
let t =
|
|
2104
|
+
let t = Jt(u, l), r = {
|
|
2272
2105
|
x: 0,
|
|
2273
2106
|
y: 0
|
|
2274
2107
|
}, { scrollableAncestors: i } = n.current;
|
|
2275
2108
|
for (let n of i) {
|
|
2276
|
-
let i = e.code, { isTop: a, isRight: s, isLeft: c, isBottom: l, maxScroll: d, minScroll: f } =
|
|
2109
|
+
let i = e.code, { isTop: a, isRight: s, isLeft: c, isBottom: l, maxScroll: d, minScroll: f } = Wn(n), p = qn(n), m = {
|
|
2277
2110
|
x: Math.min(i === $.Right ? p.right - p.width / 2 : p.right, Math.max(i === $.Right ? p.left : p.left + p.width / 2, u.x)),
|
|
2278
2111
|
y: Math.min(i === $.Down ? p.bottom - p.height / 2 : p.bottom, Math.max(i === $.Down ? p.top : p.top + p.height / 2, u.y))
|
|
2279
2112
|
}, h = i === $.Right && !s || i === $.Left && !c, g = i === $.Down && !l || i === $.Up && !a;
|
|
@@ -2307,7 +2140,7 @@ var cr = {
|
|
|
2307
2140
|
break;
|
|
2308
2141
|
}
|
|
2309
2142
|
}
|
|
2310
|
-
this.handleMove(e,
|
|
2143
|
+
this.handleMove(e, qt(Jt(u, this.referenceCoordinates), r));
|
|
2311
2144
|
}
|
|
2312
2145
|
}
|
|
2313
2146
|
}
|
|
@@ -2327,10 +2160,10 @@ var cr = {
|
|
|
2327
2160
|
this.listeners.removeAll(), this.windowListeners.removeAll();
|
|
2328
2161
|
}
|
|
2329
2162
|
};
|
|
2330
|
-
|
|
2163
|
+
cr.activators = [{
|
|
2331
2164
|
eventName: "onKeyDown",
|
|
2332
2165
|
handler: (e, t, n) => {
|
|
2333
|
-
let { keyboardCodes: r =
|
|
2166
|
+
let { keyboardCodes: r = or, onActivation: i } = t, { active: a } = n, { code: o } = e.nativeEvent;
|
|
2334
2167
|
if (r.start.includes(o)) {
|
|
2335
2168
|
let t = a.activatorNode.current;
|
|
2336
2169
|
return t && e.target !== t ? !1 : (e.preventDefault(), i?.({ event: e.nativeEvent }), !0);
|
|
@@ -2338,31 +2171,31 @@ ur.activators = [{
|
|
|
2338
2171
|
return !1;
|
|
2339
2172
|
}
|
|
2340
2173
|
}];
|
|
2341
|
-
function
|
|
2174
|
+
function lr(e) {
|
|
2342
2175
|
return !!(e && "distance" in e);
|
|
2343
2176
|
}
|
|
2344
|
-
function
|
|
2177
|
+
function ur(e) {
|
|
2345
2178
|
return !!(e && "delay" in e);
|
|
2346
2179
|
}
|
|
2347
|
-
var
|
|
2180
|
+
var dr = class {
|
|
2348
2181
|
constructor(e, t, n) {
|
|
2349
|
-
n === void 0 && (n =
|
|
2182
|
+
n === void 0 && (n = tr(e.event.target)), this.props = void 0, this.events = void 0, this.autoScrollEnabled = !0, this.document = void 0, this.activated = !1, this.initialCoordinates = void 0, this.timeoutId = null, this.listeners = void 0, this.documentListeners = void 0, this.windowListeners = void 0, this.props = e, this.events = t;
|
|
2350
2183
|
let { event: r } = e, { target: i } = r;
|
|
2351
|
-
this.props = e, this.events = t, this.document =
|
|
2184
|
+
this.props = e, this.events = t, this.document = It(i), this.documentListeners = new er(this.document), this.listeners = new er(n), this.windowListeners = new er(X(i)), this.initialCoordinates = Qt(r) ?? gn, this.handleStart = this.handleStart.bind(this), this.handleMove = this.handleMove.bind(this), this.handleEnd = this.handleEnd.bind(this), this.handleCancel = this.handleCancel.bind(this), this.handleKeydown = this.handleKeydown.bind(this), this.removeTextSelection = this.removeTextSelection.bind(this), this.attach();
|
|
2352
2185
|
}
|
|
2353
2186
|
attach() {
|
|
2354
2187
|
let { events: e, props: { options: { activationConstraint: t, bypassActivationConstraint: n } } } = this;
|
|
2355
|
-
if (this.listeners.add(e.move.name, this.handleMove, { passive: !1 }), this.listeners.add(e.end.name, this.handleEnd), e.cancel && this.listeners.add(e.cancel.name, this.handleCancel), this.windowListeners.add(
|
|
2188
|
+
if (this.listeners.add(e.move.name, this.handleMove, { passive: !1 }), this.listeners.add(e.end.name, this.handleEnd), e.cancel && this.listeners.add(e.cancel.name, this.handleCancel), this.windowListeners.add(rr.Resize, this.handleCancel), this.windowListeners.add(rr.DragStart, ir), this.windowListeners.add(rr.VisibilityChange, this.handleCancel), this.windowListeners.add(rr.ContextMenu, ir), this.documentListeners.add(rr.Keydown, this.handleKeydown), t) {
|
|
2356
2189
|
if (n != null && n({
|
|
2357
2190
|
event: this.props.event,
|
|
2358
2191
|
activeNode: this.props.activeNode,
|
|
2359
2192
|
options: this.props.options
|
|
2360
2193
|
})) return this.handleStart();
|
|
2361
|
-
if (
|
|
2194
|
+
if (ur(t)) {
|
|
2362
2195
|
this.timeoutId = setTimeout(this.handleStart, t.delay), this.handlePending(t);
|
|
2363
2196
|
return;
|
|
2364
2197
|
}
|
|
2365
|
-
if (
|
|
2198
|
+
if (lr(t)) {
|
|
2366
2199
|
this.handlePending(t);
|
|
2367
2200
|
return;
|
|
2368
2201
|
}
|
|
@@ -2378,18 +2211,18 @@ var pr = class {
|
|
|
2378
2211
|
}
|
|
2379
2212
|
handleStart() {
|
|
2380
2213
|
let { initialCoordinates: e } = this, { onStart: t } = this.props;
|
|
2381
|
-
e && (this.activated = !0, this.documentListeners.add(
|
|
2214
|
+
e && (this.activated = !0, this.documentListeners.add(rr.Click, ar, { capture: !0 }), this.removeTextSelection(), this.documentListeners.add(rr.SelectionChange, this.removeTextSelection), t(e));
|
|
2382
2215
|
}
|
|
2383
2216
|
handleMove(e) {
|
|
2384
2217
|
let { activated: t, initialCoordinates: n, props: r } = this, { onMove: i, options: { activationConstraint: a } } = r;
|
|
2385
2218
|
if (!n) return;
|
|
2386
|
-
let o =
|
|
2219
|
+
let o = Qt(e) ?? gn, s = Jt(n, o);
|
|
2387
2220
|
if (!t && a) {
|
|
2388
|
-
if (
|
|
2389
|
-
if (a.tolerance != null &&
|
|
2390
|
-
if (
|
|
2221
|
+
if (lr(a)) {
|
|
2222
|
+
if (a.tolerance != null && nr(s, a.tolerance)) return this.handleCancel();
|
|
2223
|
+
if (nr(s, a.distance)) return this.handleStart();
|
|
2391
2224
|
}
|
|
2392
|
-
if (
|
|
2225
|
+
if (ur(a) && nr(s, a.tolerance)) return this.handleCancel();
|
|
2393
2226
|
this.handlePending(a, s);
|
|
2394
2227
|
return;
|
|
2395
2228
|
}
|
|
@@ -2410,80 +2243,80 @@ var pr = class {
|
|
|
2410
2243
|
var e;
|
|
2411
2244
|
(e = this.document.getSelection()) == null || e.removeAllRanges();
|
|
2412
2245
|
}
|
|
2413
|
-
},
|
|
2246
|
+
}, fr = {
|
|
2414
2247
|
cancel: { name: "pointercancel" },
|
|
2415
2248
|
move: { name: "pointermove" },
|
|
2416
2249
|
end: { name: "pointerup" }
|
|
2417
|
-
},
|
|
2250
|
+
}, pr = class extends dr {
|
|
2418
2251
|
constructor(e) {
|
|
2419
|
-
let { event: t } = e, n =
|
|
2420
|
-
super(e,
|
|
2252
|
+
let { event: t } = e, n = It(t.target);
|
|
2253
|
+
super(e, fr, n);
|
|
2421
2254
|
}
|
|
2422
2255
|
};
|
|
2423
|
-
|
|
2256
|
+
pr.activators = [{
|
|
2424
2257
|
eventName: "onPointerDown",
|
|
2425
2258
|
handler: (e, t) => {
|
|
2426
2259
|
let { nativeEvent: n } = e, { onActivation: r } = t;
|
|
2427
2260
|
return !n.isPrimary || n.button !== 0 ? !1 : (r?.({ event: n }), !0);
|
|
2428
2261
|
}
|
|
2429
2262
|
}];
|
|
2430
|
-
var
|
|
2263
|
+
var mr = {
|
|
2431
2264
|
move: { name: "mousemove" },
|
|
2432
2265
|
end: { name: "mouseup" }
|
|
2433
|
-
},
|
|
2266
|
+
}, hr;
|
|
2434
2267
|
(function(e) {
|
|
2435
2268
|
e[e.RightClick = 2] = "RightClick";
|
|
2436
|
-
})(
|
|
2437
|
-
var
|
|
2269
|
+
})(hr ||= {});
|
|
2270
|
+
var gr = class extends dr {
|
|
2438
2271
|
constructor(e) {
|
|
2439
|
-
super(e,
|
|
2272
|
+
super(e, mr, It(e.event.target));
|
|
2440
2273
|
}
|
|
2441
2274
|
};
|
|
2442
|
-
|
|
2275
|
+
gr.activators = [{
|
|
2443
2276
|
eventName: "onMouseDown",
|
|
2444
2277
|
handler: (e, t) => {
|
|
2445
2278
|
let { nativeEvent: n } = e, { onActivation: r } = t;
|
|
2446
|
-
return n.button ===
|
|
2279
|
+
return n.button === hr.RightClick ? !1 : (r?.({ event: n }), !0);
|
|
2447
2280
|
}
|
|
2448
2281
|
}];
|
|
2449
|
-
var
|
|
2282
|
+
var _r = {
|
|
2450
2283
|
cancel: { name: "touchcancel" },
|
|
2451
2284
|
move: { name: "touchmove" },
|
|
2452
2285
|
end: { name: "touchend" }
|
|
2453
|
-
},
|
|
2286
|
+
}, vr = class extends dr {
|
|
2454
2287
|
constructor(e) {
|
|
2455
|
-
super(e,
|
|
2288
|
+
super(e, _r);
|
|
2456
2289
|
}
|
|
2457
2290
|
static setup() {
|
|
2458
|
-
return window.addEventListener(
|
|
2291
|
+
return window.addEventListener(_r.move.name, e, {
|
|
2459
2292
|
capture: !1,
|
|
2460
2293
|
passive: !1
|
|
2461
2294
|
}), function() {
|
|
2462
|
-
window.removeEventListener(
|
|
2295
|
+
window.removeEventListener(_r.move.name, e);
|
|
2463
2296
|
};
|
|
2464
2297
|
function e() {}
|
|
2465
2298
|
}
|
|
2466
2299
|
};
|
|
2467
|
-
|
|
2300
|
+
vr.activators = [{
|
|
2468
2301
|
eventName: "onTouchStart",
|
|
2469
2302
|
handler: (e, t) => {
|
|
2470
2303
|
let { nativeEvent: n } = e, { onActivation: r } = t, { touches: i } = n;
|
|
2471
2304
|
return i.length > 1 ? !1 : (r?.({ event: n }), !0);
|
|
2472
2305
|
}
|
|
2473
2306
|
}];
|
|
2474
|
-
var
|
|
2307
|
+
var yr;
|
|
2475
2308
|
(function(e) {
|
|
2476
2309
|
e[e.Pointer = 0] = "Pointer", e[e.DraggableRect = 1] = "DraggableRect";
|
|
2477
|
-
})(
|
|
2478
|
-
var
|
|
2310
|
+
})(yr ||= {});
|
|
2311
|
+
var br;
|
|
2479
2312
|
(function(e) {
|
|
2480
2313
|
e[e.TreeOrder = 0] = "TreeOrder", e[e.ReversedTreeOrder = 1] = "ReversedTreeOrder";
|
|
2481
|
-
})(
|
|
2482
|
-
function
|
|
2483
|
-
let { acceleration: t, activator: n =
|
|
2314
|
+
})(br ||= {});
|
|
2315
|
+
function xr(e) {
|
|
2316
|
+
let { acceleration: t, activator: n = yr.Pointer, canScroll: r, draggingRect: a, enabled: s, interval: l = 5, order: d = br.TreeOrder, pointerCoordinates: f, scrollableAncestors: p, scrollableAncestorRects: m, delta: h, threshold: g } = e, _ = Cr({
|
|
2484
2317
|
delta: h,
|
|
2485
2318
|
disabled: !s
|
|
2486
|
-
}), [v, y] =
|
|
2319
|
+
}), [v, y] = zt(), b = u({
|
|
2487
2320
|
x: 0,
|
|
2488
2321
|
y: 0
|
|
2489
2322
|
}), x = u({
|
|
@@ -2491,13 +2324,13 @@ function Cr(e) {
|
|
|
2491
2324
|
y: 0
|
|
2492
2325
|
}), S = c(() => {
|
|
2493
2326
|
switch (n) {
|
|
2494
|
-
case
|
|
2327
|
+
case yr.Pointer: return f ? {
|
|
2495
2328
|
top: f.y,
|
|
2496
2329
|
bottom: f.y,
|
|
2497
2330
|
left: f.x,
|
|
2498
2331
|
right: f.x
|
|
2499
2332
|
} : null;
|
|
2500
|
-
case
|
|
2333
|
+
case yr.DraggableRect: return a;
|
|
2501
2334
|
}
|
|
2502
2335
|
}, [
|
|
2503
2336
|
n,
|
|
@@ -2508,7 +2341,7 @@ function Cr(e) {
|
|
|
2508
2341
|
if (!e) return;
|
|
2509
2342
|
let t = b.current.x * x.current.x, n = b.current.y * x.current.y;
|
|
2510
2343
|
e.scrollBy(t, n);
|
|
2511
|
-
}, []), T = c(() => d ===
|
|
2344
|
+
}, []), T = c(() => d === br.TreeOrder ? [...p].reverse() : p, [d, p]);
|
|
2512
2345
|
o(() => {
|
|
2513
2346
|
if (!s || !p.length || !S) {
|
|
2514
2347
|
y();
|
|
@@ -2518,7 +2351,7 @@ function Cr(e) {
|
|
|
2518
2351
|
if (r?.(e) === !1) continue;
|
|
2519
2352
|
let n = m[p.indexOf(e)];
|
|
2520
2353
|
if (!n) continue;
|
|
2521
|
-
let { direction: i, speed: a } =
|
|
2354
|
+
let { direction: i, speed: a } = Kn(e, n, S, t, g);
|
|
2522
2355
|
for (let e of ["x", "y"]) _[e][i[e]] || (a[e] = 0, i[e] = 0);
|
|
2523
2356
|
if (a.x > 0 || a.y > 0) {
|
|
2524
2357
|
y(), C.current = e, v(w, l), b.current = a, x.current = i;
|
|
@@ -2548,7 +2381,7 @@ function Cr(e) {
|
|
|
2548
2381
|
JSON.stringify(g)
|
|
2549
2382
|
]);
|
|
2550
2383
|
}
|
|
2551
|
-
var
|
|
2384
|
+
var Sr = {
|
|
2552
2385
|
x: {
|
|
2553
2386
|
[Q.Backward]: !1,
|
|
2554
2387
|
[Q.Forward]: !1
|
|
@@ -2558,10 +2391,10 @@ var wr = {
|
|
|
2558
2391
|
[Q.Forward]: !1
|
|
2559
2392
|
}
|
|
2560
2393
|
};
|
|
2561
|
-
function
|
|
2562
|
-
let { delta: t, disabled: n } = e, r =
|
|
2563
|
-
return
|
|
2564
|
-
if (n || !r || !e) return
|
|
2394
|
+
function Cr(e) {
|
|
2395
|
+
let { delta: t, disabled: n } = e, r = Ut(t);
|
|
2396
|
+
return Vt((e) => {
|
|
2397
|
+
if (n || !r || !e) return Sr;
|
|
2565
2398
|
let i = {
|
|
2566
2399
|
x: Math.sign(t.x - r.x),
|
|
2567
2400
|
y: Math.sign(t.y - r.y)
|
|
@@ -2582,11 +2415,11 @@ function Tr(e) {
|
|
|
2582
2415
|
r
|
|
2583
2416
|
]);
|
|
2584
2417
|
}
|
|
2585
|
-
function
|
|
2418
|
+
function wr(e, t) {
|
|
2586
2419
|
let n = t == null ? void 0 : e.get(t), r = n ? n.node.current : null;
|
|
2587
|
-
return
|
|
2420
|
+
return Vt((e) => t == null ? null : r ?? e ?? null, [r, t]);
|
|
2588
2421
|
}
|
|
2589
|
-
function
|
|
2422
|
+
function Tr(e, t) {
|
|
2590
2423
|
return c(() => e.reduce((e, n) => {
|
|
2591
2424
|
let { sensor: r } = n, i = r.activators.map((e) => ({
|
|
2592
2425
|
eventName: e.eventName,
|
|
@@ -2595,21 +2428,21 @@ function Dr(e, t) {
|
|
|
2595
2428
|
return [...e, ...i];
|
|
2596
2429
|
}, []), [e, t]);
|
|
2597
2430
|
}
|
|
2598
|
-
var
|
|
2431
|
+
var Er;
|
|
2599
2432
|
(function(e) {
|
|
2600
2433
|
e[e.Always = 0] = "Always", e[e.BeforeDragging = 1] = "BeforeDragging", e[e.WhileDragging = 2] = "WhileDragging";
|
|
2601
|
-
})(
|
|
2602
|
-
var
|
|
2434
|
+
})(Er ||= {});
|
|
2435
|
+
var Dr;
|
|
2603
2436
|
(function(e) {
|
|
2604
2437
|
e.Optimized = "optimized";
|
|
2605
|
-
})(
|
|
2606
|
-
var
|
|
2607
|
-
function
|
|
2608
|
-
let { dragging: n, dependencies: r, config: a } = t, [s, c] = d(null), { frequency: l, measure: f, strategy: p } = a, m = u(e), h = b(), g =
|
|
2438
|
+
})(Dr ||= {});
|
|
2439
|
+
var Or = /* @__PURE__ */ new Map();
|
|
2440
|
+
function kr(e, t) {
|
|
2441
|
+
let { dragging: n, dependencies: r, config: a } = t, [s, c] = d(null), { frequency: l, measure: f, strategy: p } = a, m = u(e), h = b(), g = Bt(h), _ = i(function(e) {
|
|
2609
2442
|
e === void 0 && (e = []), !g.current && c((t) => t === null ? e : t.concat(e.filter((e) => !t.includes(e))));
|
|
2610
|
-
}, [g]), v = u(null), y =
|
|
2611
|
-
if (h && !n) return
|
|
2612
|
-
if (!t || t ===
|
|
2443
|
+
}, [g]), v = u(null), y = Vt((t) => {
|
|
2444
|
+
if (h && !n) return Or;
|
|
2445
|
+
if (!t || t === Or || m.current !== e || s != null) {
|
|
2613
2446
|
let t = /* @__PURE__ */ new Map();
|
|
2614
2447
|
for (let n of e) {
|
|
2615
2448
|
if (!n) continue;
|
|
@@ -2617,7 +2450,7 @@ function jr(e, t) {
|
|
|
2617
2450
|
t.set(n.id, n.rect.current);
|
|
2618
2451
|
continue;
|
|
2619
2452
|
}
|
|
2620
|
-
let e = n.node.current, r = e ? new
|
|
2453
|
+
let e = n.node.current, r = e ? new $n(f(e), e) : null;
|
|
2621
2454
|
n.rect.current = r, r && t.set(n.id, r);
|
|
2622
2455
|
}
|
|
2623
2456
|
return t;
|
|
@@ -2652,39 +2485,39 @@ function jr(e, t) {
|
|
|
2652
2485
|
};
|
|
2653
2486
|
function b() {
|
|
2654
2487
|
switch (p) {
|
|
2655
|
-
case
|
|
2656
|
-
case
|
|
2488
|
+
case Er.Always: return !1;
|
|
2489
|
+
case Er.BeforeDragging: return n;
|
|
2657
2490
|
default: return !n;
|
|
2658
2491
|
}
|
|
2659
2492
|
}
|
|
2660
2493
|
}
|
|
2661
|
-
function
|
|
2662
|
-
return
|
|
2494
|
+
function Ar(e, t) {
|
|
2495
|
+
return Vt((n) => e ? n || (typeof t == "function" ? t(e) : e) : null, [t, e]);
|
|
2663
2496
|
}
|
|
2664
|
-
function
|
|
2665
|
-
return
|
|
2497
|
+
function jr(e, t) {
|
|
2498
|
+
return Ar(e, t);
|
|
2666
2499
|
}
|
|
2667
|
-
function
|
|
2668
|
-
let { callback: t, disabled: n } = e, r =
|
|
2500
|
+
function Mr(e) {
|
|
2501
|
+
let { callback: t, disabled: n } = e, r = Rt(t), i = c(() => {
|
|
2669
2502
|
if (n || typeof window > "u" || window.MutationObserver === void 0) return;
|
|
2670
2503
|
let { MutationObserver: e } = window;
|
|
2671
2504
|
return new e(r);
|
|
2672
2505
|
}, [r, n]);
|
|
2673
2506
|
return o(() => () => i?.disconnect(), [i]), i;
|
|
2674
2507
|
}
|
|
2675
|
-
function
|
|
2676
|
-
let { callback: t, disabled: n } = e, r =
|
|
2508
|
+
function Nr(e) {
|
|
2509
|
+
let { callback: t, disabled: n } = e, r = Rt(t), i = c(() => {
|
|
2677
2510
|
if (n || typeof window > "u" || window.ResizeObserver === void 0) return;
|
|
2678
2511
|
let { ResizeObserver: e } = window;
|
|
2679
2512
|
return new e(r);
|
|
2680
2513
|
}, [n]);
|
|
2681
2514
|
return o(() => () => i?.disconnect(), [i]), i;
|
|
2682
2515
|
}
|
|
2683
|
-
function
|
|
2684
|
-
return new
|
|
2516
|
+
function Pr(e) {
|
|
2517
|
+
return new $n(Mn(e), e);
|
|
2685
2518
|
}
|
|
2686
|
-
function
|
|
2687
|
-
t === void 0 && (t =
|
|
2519
|
+
function Fr(e, t, n) {
|
|
2520
|
+
t === void 0 && (t = Pr);
|
|
2688
2521
|
let [r, i] = d(null);
|
|
2689
2522
|
function a() {
|
|
2690
2523
|
i((r) => {
|
|
@@ -2694,7 +2527,7 @@ function Lr(e, t, n) {
|
|
|
2694
2527
|
return JSON.stringify(r) === JSON.stringify(i) ? r : i;
|
|
2695
2528
|
});
|
|
2696
2529
|
}
|
|
2697
|
-
let o =
|
|
2530
|
+
let o = Mr({ callback(t) {
|
|
2698
2531
|
if (e) for (let n of t) {
|
|
2699
2532
|
let { type: t, target: r } = n;
|
|
2700
2533
|
if (t === "childList" && r instanceof HTMLElement && r.contains(e)) {
|
|
@@ -2702,36 +2535,36 @@ function Lr(e, t, n) {
|
|
|
2702
2535
|
break;
|
|
2703
2536
|
}
|
|
2704
2537
|
}
|
|
2705
|
-
} }), s =
|
|
2706
|
-
return
|
|
2538
|
+
} }), s = Nr({ callback: a });
|
|
2539
|
+
return Lt(() => {
|
|
2707
2540
|
a(), e ? (s?.observe(e), o?.observe(document.body, {
|
|
2708
2541
|
childList: !0,
|
|
2709
2542
|
subtree: !0
|
|
2710
2543
|
})) : (s?.disconnect(), o?.disconnect());
|
|
2711
2544
|
}, [e]), r;
|
|
2712
2545
|
}
|
|
2713
|
-
function
|
|
2714
|
-
return
|
|
2546
|
+
function Ir(e) {
|
|
2547
|
+
return En(e, Ar(e));
|
|
2715
2548
|
}
|
|
2716
|
-
var
|
|
2717
|
-
function
|
|
2718
|
-
let t = u(e), n =
|
|
2549
|
+
var Lr = [];
|
|
2550
|
+
function Rr(e) {
|
|
2551
|
+
let t = u(e), n = Vt((n) => e ? n && n !== Lr && e && t.current && e.parentNode === t.current.parentNode ? n : Ln(e) : Lr, [e]);
|
|
2719
2552
|
return o(() => {
|
|
2720
2553
|
t.current = e;
|
|
2721
2554
|
}, [e]), n;
|
|
2722
2555
|
}
|
|
2723
|
-
function
|
|
2556
|
+
function zr(e) {
|
|
2724
2557
|
let [t, n] = d(null), r = u(e), a = i((e) => {
|
|
2725
|
-
let t =
|
|
2726
|
-
t && n((e) => e ? (e.set(t,
|
|
2558
|
+
let t = zn(e.target);
|
|
2559
|
+
t && n((e) => e ? (e.set(t, Hn(t)), new Map(e)) : null);
|
|
2727
2560
|
}, []);
|
|
2728
2561
|
return o(() => {
|
|
2729
2562
|
let t = r.current;
|
|
2730
2563
|
if (e !== t) {
|
|
2731
2564
|
i(t);
|
|
2732
2565
|
let o = e.map((e) => {
|
|
2733
|
-
let t =
|
|
2734
|
-
return t ? (t.addEventListener("scroll", a, { passive: !0 }), [t,
|
|
2566
|
+
let t = zn(e);
|
|
2567
|
+
return t ? (t.addEventListener("scroll", a, { passive: !0 }), [t, Hn(t)]) : null;
|
|
2735
2568
|
}).filter((e) => e != null);
|
|
2736
2569
|
n(o.length ? new Map(o) : null), r.current = e;
|
|
2737
2570
|
}
|
|
@@ -2740,24 +2573,24 @@ function Vr(e) {
|
|
|
2740
2573
|
};
|
|
2741
2574
|
function i(e) {
|
|
2742
2575
|
e.forEach((e) => {
|
|
2743
|
-
|
|
2576
|
+
zn(e)?.removeEventListener("scroll", a);
|
|
2744
2577
|
});
|
|
2745
2578
|
}
|
|
2746
|
-
}, [a, e]), c(() => e.length ? t ? Array.from(t.values()).reduce((e, t) =>
|
|
2579
|
+
}, [a, e]), c(() => e.length ? t ? Array.from(t.values()).reduce((e, t) => qt(e, t), gn) : Jn(e) : gn, [e, t]);
|
|
2747
2580
|
}
|
|
2748
|
-
function
|
|
2581
|
+
function Br(e, t) {
|
|
2749
2582
|
t === void 0 && (t = []);
|
|
2750
2583
|
let n = u(null);
|
|
2751
2584
|
return o(() => {
|
|
2752
2585
|
n.current = null;
|
|
2753
2586
|
}, t), o(() => {
|
|
2754
|
-
let t = e !==
|
|
2587
|
+
let t = e !== gn;
|
|
2755
2588
|
t && !n.current && (n.current = e), !t && n.current && (n.current = null);
|
|
2756
|
-
}, [e]), n.current ?
|
|
2589
|
+
}, [e]), n.current ? Jt(e, n.current) : gn;
|
|
2757
2590
|
}
|
|
2758
|
-
function
|
|
2591
|
+
function Vr(e) {
|
|
2759
2592
|
o(() => {
|
|
2760
|
-
if (!
|
|
2593
|
+
if (!At) return;
|
|
2761
2594
|
let t = e.map((e) => {
|
|
2762
2595
|
let { sensor: t } = e;
|
|
2763
2596
|
return t.setup == null ? void 0 : t.setup();
|
|
@@ -2770,7 +2603,7 @@ function Ur(e) {
|
|
|
2770
2603
|
return t;
|
|
2771
2604
|
}));
|
|
2772
2605
|
}
|
|
2773
|
-
function
|
|
2606
|
+
function Hr(e, t) {
|
|
2774
2607
|
return c(() => e.reduce((e, n) => {
|
|
2775
2608
|
let { eventName: r, handler: i } = n;
|
|
2776
2609
|
return e[r] = (e) => {
|
|
@@ -2778,30 +2611,30 @@ function Wr(e, t) {
|
|
|
2778
2611
|
}, e;
|
|
2779
2612
|
}, {}), [e, t]);
|
|
2780
2613
|
}
|
|
2781
|
-
function
|
|
2782
|
-
return c(() => e ?
|
|
2614
|
+
function Ur(e) {
|
|
2615
|
+
return c(() => e ? Pn(e) : null, [e]);
|
|
2783
2616
|
}
|
|
2784
|
-
var
|
|
2785
|
-
function
|
|
2786
|
-
t === void 0 && (t =
|
|
2787
|
-
let [n] = e, r =
|
|
2617
|
+
var Wr = [];
|
|
2618
|
+
function Gr(e, t) {
|
|
2619
|
+
t === void 0 && (t = Mn);
|
|
2620
|
+
let [n] = e, r = Ur(n ? X(n) : null), [i, a] = d(Wr);
|
|
2788
2621
|
function o() {
|
|
2789
|
-
a(() => e.length ? e.map((e) =>
|
|
2622
|
+
a(() => e.length ? e.map((e) => Un(e) ? r : new $n(t(e), e)) : Wr);
|
|
2790
2623
|
}
|
|
2791
|
-
let s =
|
|
2792
|
-
return
|
|
2624
|
+
let s = Nr({ callback: o });
|
|
2625
|
+
return Lt(() => {
|
|
2793
2626
|
s?.disconnect(), o(), e.forEach((e) => s?.observe(e));
|
|
2794
2627
|
}, [e]), i;
|
|
2795
2628
|
}
|
|
2796
|
-
function
|
|
2629
|
+
function Kr(e) {
|
|
2797
2630
|
if (!e) return null;
|
|
2798
2631
|
if (e.children.length > 1) return e;
|
|
2799
2632
|
let t = e.children[0];
|
|
2800
|
-
return
|
|
2633
|
+
return Pt(t) ? t : e;
|
|
2801
2634
|
}
|
|
2802
|
-
function
|
|
2803
|
-
let { measure: t } = e, [n, r] = d(null), a =
|
|
2804
|
-
for (let { target: n } of e) if (
|
|
2635
|
+
function qr(e) {
|
|
2636
|
+
let { measure: t } = e, [n, r] = d(null), a = Nr({ callback: i((e) => {
|
|
2637
|
+
for (let { target: n } of e) if (Pt(n)) {
|
|
2805
2638
|
r((e) => {
|
|
2806
2639
|
let r = t(n);
|
|
2807
2640
|
return e ? {
|
|
@@ -2812,8 +2645,8 @@ function Yr(e) {
|
|
|
2812
2645
|
});
|
|
2813
2646
|
break;
|
|
2814
2647
|
}
|
|
2815
|
-
}, [t]) }), [o, s] =
|
|
2816
|
-
let n =
|
|
2648
|
+
}, [t]) }), [o, s] = Ht(i((e) => {
|
|
2649
|
+
let n = Kr(e);
|
|
2817
2650
|
a?.disconnect(), n && a?.observe(n), r(n ? t(n) : null);
|
|
2818
2651
|
}, [t, a]));
|
|
2819
2652
|
return c(() => ({
|
|
@@ -2826,21 +2659,21 @@ function Yr(e) {
|
|
|
2826
2659
|
s
|
|
2827
2660
|
]);
|
|
2828
2661
|
}
|
|
2829
|
-
var
|
|
2830
|
-
sensor:
|
|
2662
|
+
var Jr = [{
|
|
2663
|
+
sensor: pr,
|
|
2831
2664
|
options: {}
|
|
2832
2665
|
}, {
|
|
2833
|
-
sensor:
|
|
2666
|
+
sensor: cr,
|
|
2834
2667
|
options: {}
|
|
2835
|
-
}],
|
|
2836
|
-
draggable: { measure:
|
|
2668
|
+
}], Yr = { current: {} }, Xr = {
|
|
2669
|
+
draggable: { measure: Nn },
|
|
2837
2670
|
droppable: {
|
|
2838
|
-
measure:
|
|
2839
|
-
strategy:
|
|
2840
|
-
frequency:
|
|
2671
|
+
measure: Nn,
|
|
2672
|
+
strategy: Er.WhileDragging,
|
|
2673
|
+
frequency: Dr.Optimized
|
|
2841
2674
|
},
|
|
2842
|
-
dragOverlay: { measure:
|
|
2843
|
-
},
|
|
2675
|
+
dragOverlay: { measure: Mn }
|
|
2676
|
+
}, Zr = class extends Map {
|
|
2844
2677
|
get(e) {
|
|
2845
2678
|
return e == null ? void 0 : super.get(e) ?? void 0;
|
|
2846
2679
|
}
|
|
@@ -2856,7 +2689,7 @@ var Xr = [{
|
|
|
2856
2689
|
getNodeFor(e) {
|
|
2857
2690
|
return this.get(e)?.node.current ?? void 0;
|
|
2858
2691
|
}
|
|
2859
|
-
},
|
|
2692
|
+
}, Qr = {
|
|
2860
2693
|
activatorEvent: null,
|
|
2861
2694
|
active: null,
|
|
2862
2695
|
activeNode: null,
|
|
@@ -2865,31 +2698,31 @@ var Xr = [{
|
|
|
2865
2698
|
containerNodeRect: null,
|
|
2866
2699
|
draggableNodes: /* @__PURE__ */ new Map(),
|
|
2867
2700
|
droppableRects: /* @__PURE__ */ new Map(),
|
|
2868
|
-
droppableContainers: /* @__PURE__ */ new
|
|
2701
|
+
droppableContainers: /* @__PURE__ */ new Zr(),
|
|
2869
2702
|
over: null,
|
|
2870
2703
|
dragOverlay: {
|
|
2871
2704
|
nodeRef: { current: null },
|
|
2872
2705
|
rect: null,
|
|
2873
|
-
setRef:
|
|
2706
|
+
setRef: pn
|
|
2874
2707
|
},
|
|
2875
2708
|
scrollableAncestors: [],
|
|
2876
2709
|
scrollableAncestorRects: [],
|
|
2877
|
-
measuringConfiguration:
|
|
2878
|
-
measureDroppableContainers:
|
|
2710
|
+
measuringConfiguration: Xr,
|
|
2711
|
+
measureDroppableContainers: pn,
|
|
2879
2712
|
windowRect: null,
|
|
2880
2713
|
measuringScheduled: !1
|
|
2881
|
-
},
|
|
2714
|
+
}, $r = /* @__PURE__ */ n({
|
|
2882
2715
|
activatorEvent: null,
|
|
2883
2716
|
activators: [],
|
|
2884
2717
|
active: null,
|
|
2885
2718
|
activeNodeRect: null,
|
|
2886
2719
|
ariaDescribedById: { draggable: "" },
|
|
2887
|
-
dispatch:
|
|
2720
|
+
dispatch: pn,
|
|
2888
2721
|
draggableNodes: /* @__PURE__ */ new Map(),
|
|
2889
2722
|
over: null,
|
|
2890
|
-
measureDroppableContainers:
|
|
2891
|
-
}),
|
|
2892
|
-
function
|
|
2723
|
+
measureDroppableContainers: pn
|
|
2724
|
+
}), ei = /* @__PURE__ */ n(Qr);
|
|
2725
|
+
function ti() {
|
|
2893
2726
|
return {
|
|
2894
2727
|
draggable: {
|
|
2895
2728
|
active: null,
|
|
@@ -2903,10 +2736,10 @@ function ri() {
|
|
|
2903
2736
|
y: 0
|
|
2904
2737
|
}
|
|
2905
2738
|
},
|
|
2906
|
-
droppable: { containers: new
|
|
2739
|
+
droppable: { containers: new Zr() }
|
|
2907
2740
|
};
|
|
2908
2741
|
}
|
|
2909
|
-
function
|
|
2742
|
+
function ni(e, t) {
|
|
2910
2743
|
switch (t.type) {
|
|
2911
2744
|
case Z.DragStart: return {
|
|
2912
2745
|
...e,
|
|
@@ -2943,7 +2776,7 @@ function ii(e, t) {
|
|
|
2943
2776
|
}
|
|
2944
2777
|
};
|
|
2945
2778
|
case Z.RegisterDroppable: {
|
|
2946
|
-
let { element: n } = t, { id: r } = n, i = new
|
|
2779
|
+
let { element: n } = t, { id: r } = n, i = new Zr(e.droppable.containers);
|
|
2947
2780
|
return i.set(r, n), {
|
|
2948
2781
|
...e,
|
|
2949
2782
|
droppable: {
|
|
@@ -2955,7 +2788,7 @@ function ii(e, t) {
|
|
|
2955
2788
|
case Z.SetDroppableDisabled: {
|
|
2956
2789
|
let { id: n, key: r, disabled: i } = t, a = e.droppable.containers.get(n);
|
|
2957
2790
|
if (!a || r !== a.key) return e;
|
|
2958
|
-
let o = new
|
|
2791
|
+
let o = new Zr(e.droppable.containers);
|
|
2959
2792
|
return o.set(n, {
|
|
2960
2793
|
...a,
|
|
2961
2794
|
disabled: i
|
|
@@ -2970,7 +2803,7 @@ function ii(e, t) {
|
|
|
2970
2803
|
case Z.UnregisterDroppable: {
|
|
2971
2804
|
let { id: n, key: r } = t, i = e.droppable.containers.get(n);
|
|
2972
2805
|
if (!i || r !== i.key) return e;
|
|
2973
|
-
let a = new
|
|
2806
|
+
let a = new Zr(e.droppable.containers);
|
|
2974
2807
|
return a.delete(n), {
|
|
2975
2808
|
...e,
|
|
2976
2809
|
droppable: {
|
|
@@ -2982,11 +2815,11 @@ function ii(e, t) {
|
|
|
2982
2815
|
default: return e;
|
|
2983
2816
|
}
|
|
2984
2817
|
}
|
|
2985
|
-
function
|
|
2986
|
-
let { disabled: t } = e, { active: n, activatorEvent: r, draggableNodes: i } = a(
|
|
2818
|
+
function ri(e) {
|
|
2819
|
+
let { disabled: t } = e, { active: n, activatorEvent: r, draggableNodes: i } = a($r), s = Ut(r), c = Ut(n?.id);
|
|
2987
2820
|
return o(() => {
|
|
2988
2821
|
if (!t && !r && s && c != null) {
|
|
2989
|
-
if (!
|
|
2822
|
+
if (!Xt(s) || document.activeElement === s.target) return;
|
|
2990
2823
|
let e = i.get(c);
|
|
2991
2824
|
if (!e) return;
|
|
2992
2825
|
let { activatorNode: t, node: n } = e;
|
|
@@ -2994,7 +2827,7 @@ function ai(e) {
|
|
|
2994
2827
|
requestAnimationFrame(() => {
|
|
2995
2828
|
for (let e of [t.current, n.current]) {
|
|
2996
2829
|
if (!e) continue;
|
|
2997
|
-
let t =
|
|
2830
|
+
let t = tn(e);
|
|
2998
2831
|
if (t) {
|
|
2999
2832
|
t.focus();
|
|
3000
2833
|
break;
|
|
@@ -3010,25 +2843,25 @@ function ai(e) {
|
|
|
3010
2843
|
s
|
|
3011
2844
|
]), null;
|
|
3012
2845
|
}
|
|
3013
|
-
function
|
|
2846
|
+
function ii(e, t) {
|
|
3014
2847
|
let { transform: n, ...r } = t;
|
|
3015
2848
|
return e != null && e.length ? e.reduce((e, t) => t({
|
|
3016
2849
|
transform: e,
|
|
3017
2850
|
...r
|
|
3018
2851
|
}), n) : n;
|
|
3019
2852
|
}
|
|
3020
|
-
function
|
|
2853
|
+
function ai(e) {
|
|
3021
2854
|
return c(() => ({
|
|
3022
2855
|
draggable: {
|
|
3023
|
-
...
|
|
2856
|
+
...Xr.draggable,
|
|
3024
2857
|
...e?.draggable
|
|
3025
2858
|
},
|
|
3026
2859
|
droppable: {
|
|
3027
|
-
...
|
|
2860
|
+
...Xr.droppable,
|
|
3028
2861
|
...e?.droppable
|
|
3029
2862
|
},
|
|
3030
2863
|
dragOverlay: {
|
|
3031
|
-
...
|
|
2864
|
+
...Xr.dragOverlay,
|
|
3032
2865
|
...e?.dragOverlay
|
|
3033
2866
|
}
|
|
3034
2867
|
}), [
|
|
@@ -3037,12 +2870,12 @@ function si(e) {
|
|
|
3037
2870
|
e?.dragOverlay
|
|
3038
2871
|
]);
|
|
3039
2872
|
}
|
|
3040
|
-
function
|
|
2873
|
+
function oi(e) {
|
|
3041
2874
|
let { activeNode: t, measure: n, initialRect: r, config: i = !0 } = e, a = u(!1), { x: o, y: s } = typeof i == "boolean" ? {
|
|
3042
2875
|
x: i,
|
|
3043
2876
|
y: i
|
|
3044
2877
|
} : i;
|
|
3045
|
-
|
|
2878
|
+
Lt(() => {
|
|
3046
2879
|
if (!o && !s || !t) {
|
|
3047
2880
|
a.current = !1;
|
|
3048
2881
|
return;
|
|
@@ -3050,9 +2883,9 @@ function ci(e) {
|
|
|
3050
2883
|
if (a.current || !r) return;
|
|
3051
2884
|
let e = t?.node.current;
|
|
3052
2885
|
if (!e || e.isConnected === !1) return;
|
|
3053
|
-
let i =
|
|
2886
|
+
let i = En(n(e), r);
|
|
3054
2887
|
if (o || (i.x = 0), s || (i.y = 0), a.current = !0, Math.abs(i.x) > 0 || Math.abs(i.y) > 0) {
|
|
3055
|
-
let t =
|
|
2888
|
+
let t = Rn(e);
|
|
3056
2889
|
t && t.scrollBy({
|
|
3057
2890
|
top: i.y,
|
|
3058
2891
|
left: i.x
|
|
@@ -3066,51 +2899,51 @@ function ci(e) {
|
|
|
3066
2899
|
n
|
|
3067
2900
|
]);
|
|
3068
2901
|
}
|
|
3069
|
-
var
|
|
3070
|
-
...
|
|
2902
|
+
var si = /* @__PURE__ */ n({
|
|
2903
|
+
...gn,
|
|
3071
2904
|
scaleX: 1,
|
|
3072
2905
|
scaleY: 1
|
|
3073
|
-
}),
|
|
2906
|
+
}), ci;
|
|
3074
2907
|
(function(e) {
|
|
3075
2908
|
e[e.Uninitialized = 0] = "Uninitialized", e[e.Initializing = 1] = "Initializing", e[e.Initialized = 2] = "Initialized";
|
|
3076
|
-
})(
|
|
3077
|
-
var
|
|
3078
|
-
let { id: n, accessibility: r, autoScroll: a = !0, children: s, sensors: f =
|
|
2909
|
+
})(ci ||= {});
|
|
2910
|
+
var li = /* @__PURE__ */ r(function(e) {
|
|
2911
|
+
let { id: n, accessibility: r, autoScroll: a = !0, children: s, sensors: f = Jr, collisionDetection: p = wn, measuring: m, modifiers: h, ...g } = e, [_, v] = l(ni, void 0, ti), [y, b] = ln(), [x, S] = d(ci.Uninitialized), C = x === ci.Initialized, { draggable: { active: w, nodes: T, translate: ee }, droppable: { containers: E } } = _, D = w == null ? null : T.get(w), te = u({
|
|
3079
2912
|
initial: null,
|
|
3080
2913
|
translated: null
|
|
3081
2914
|
}), O = c(() => w == null ? null : {
|
|
3082
2915
|
id: w,
|
|
3083
|
-
data:
|
|
2916
|
+
data: D?.data ?? Yr,
|
|
3084
2917
|
rect: te
|
|
3085
|
-
}, [w,
|
|
2918
|
+
}, [w, D]), k = u(null), [ne, re] = d(null), [A, ie] = d(null), ae = Bt(g, Object.values(g)), oe = Gt("DndDescribedBy", n), se = c(() => E.getEnabled(), [E]), j = ai(m), { droppableRects: ce, measureDroppableContainers: le, measuringScheduled: ue } = kr(se, {
|
|
3086
2919
|
dragging: C,
|
|
3087
|
-
dependencies: [
|
|
3088
|
-
config:
|
|
3089
|
-
}),
|
|
3090
|
-
|
|
2920
|
+
dependencies: [ee.x, ee.y],
|
|
2921
|
+
config: j.droppable
|
|
2922
|
+
}), M = wr(T, w), de = c(() => A ? Qt(A) : null, [A]), fe = De(), N = jr(M, j.draggable.measure);
|
|
2923
|
+
oi({
|
|
3091
2924
|
activeNode: w == null ? null : T.get(w),
|
|
3092
|
-
config:
|
|
3093
|
-
initialRect:
|
|
3094
|
-
measure:
|
|
2925
|
+
config: fe.layoutShiftCompensation,
|
|
2926
|
+
initialRect: N,
|
|
2927
|
+
measure: j.draggable.measure
|
|
3095
2928
|
});
|
|
3096
|
-
let P =
|
|
2929
|
+
let P = Fr(M, j.draggable.measure, N), F = Fr(M ? M.parentElement : null), I = u({
|
|
3097
2930
|
activatorEvent: null,
|
|
3098
2931
|
active: null,
|
|
3099
|
-
activeNode:
|
|
2932
|
+
activeNode: M,
|
|
3100
2933
|
collisionRect: null,
|
|
3101
2934
|
collisions: null,
|
|
3102
|
-
droppableRects:
|
|
2935
|
+
droppableRects: ce,
|
|
3103
2936
|
draggableNodes: T,
|
|
3104
2937
|
draggingNode: null,
|
|
3105
2938
|
draggingNodeRect: null,
|
|
3106
|
-
droppableContainers:
|
|
2939
|
+
droppableContainers: E,
|
|
3107
2940
|
over: null,
|
|
3108
2941
|
scrollableAncestors: [],
|
|
3109
2942
|
scrollAdjustedTranslate: null
|
|
3110
|
-
}), pe =
|
|
2943
|
+
}), pe = E.getNodeFor(I.current.over?.id), L = qr({ measure: j.dragOverlay.measure }), R = L.nodeRef.current ?? M, z = C ? L.rect ?? P : null, me = !!(L.nodeRef.current && L.rect), he = Ir(me ? null : P), ge = Ur(R ? X(R) : null), B = Rr(C ? pe ?? M : null), V = Gr(B), H = ii(h, {
|
|
3111
2944
|
transform: {
|
|
3112
|
-
x:
|
|
3113
|
-
y:
|
|
2945
|
+
x: ee.x - he.x,
|
|
2946
|
+
y: ee.y - he.y,
|
|
3114
2947
|
scaleX: 1,
|
|
3115
2948
|
scaleY: 1
|
|
3116
2949
|
},
|
|
@@ -3124,13 +2957,13 @@ var di = /* @__PURE__ */ r(function(e) {
|
|
|
3124
2957
|
scrollableAncestors: B,
|
|
3125
2958
|
scrollableAncestorRects: V,
|
|
3126
2959
|
windowRect: ge
|
|
3127
|
-
}), _e =
|
|
2960
|
+
}), _e = de ? qt(de, ee) : null, ve = zr(B), U = Br(ve), W = Br(ve, [P]), G = qt(H, U), K = z ? On(z, H) : null, q = O && K ? p({
|
|
3128
2961
|
active: O,
|
|
3129
2962
|
collisionRect: K,
|
|
3130
|
-
droppableRects:
|
|
3131
|
-
droppableContainers:
|
|
2963
|
+
droppableRects: ce,
|
|
2964
|
+
droppableContainers: se,
|
|
3132
2965
|
pointerCoordinates: _e
|
|
3133
|
-
}) : null, J =
|
|
2966
|
+
}) : null, J = bn(q, "id"), [ye, be] = d(null), xe = Tn(me ? H : qt(H, W), ye?.rect ?? null, P), Se = u(null), Ce = i((e, t) => {
|
|
3134
2967
|
let { sensor: n, options: r } = t;
|
|
3135
2968
|
if (k.current == null) return;
|
|
3136
2969
|
let i = T.get(k.current);
|
|
@@ -3144,7 +2977,7 @@ var di = /* @__PURE__ */ r(function(e) {
|
|
|
3144
2977
|
context: I,
|
|
3145
2978
|
onAbort(e) {
|
|
3146
2979
|
if (!T.get(e)) return;
|
|
3147
|
-
let { onDragAbort: t } =
|
|
2980
|
+
let { onDragAbort: t } = ae.current, n = { id: e };
|
|
3148
2981
|
t?.(n), y({
|
|
3149
2982
|
type: "onDragAbort",
|
|
3150
2983
|
event: n
|
|
@@ -3152,7 +2985,7 @@ var di = /* @__PURE__ */ r(function(e) {
|
|
|
3152
2985
|
},
|
|
3153
2986
|
onPending(e, t, n, r) {
|
|
3154
2987
|
if (!T.get(e)) return;
|
|
3155
|
-
let { onDragPending: i } =
|
|
2988
|
+
let { onDragPending: i } = ae.current, a = {
|
|
3156
2989
|
id: e,
|
|
3157
2990
|
constraint: t,
|
|
3158
2991
|
initialCoordinates: n,
|
|
@@ -3168,7 +3001,7 @@ var di = /* @__PURE__ */ r(function(e) {
|
|
|
3168
3001
|
if (t == null) return;
|
|
3169
3002
|
let n = T.get(t);
|
|
3170
3003
|
if (!n) return;
|
|
3171
|
-
let { onDragStart: r } =
|
|
3004
|
+
let { onDragStart: r } = ae.current, i = {
|
|
3172
3005
|
activatorEvent: a,
|
|
3173
3006
|
active: {
|
|
3174
3007
|
id: t,
|
|
@@ -3177,7 +3010,7 @@ var di = /* @__PURE__ */ r(function(e) {
|
|
|
3177
3010
|
}
|
|
3178
3011
|
};
|
|
3179
3012
|
Ke(() => {
|
|
3180
|
-
r?.(i), S(
|
|
3013
|
+
r?.(i), S(ci.Initializing), v({
|
|
3181
3014
|
type: Z.DragStart,
|
|
3182
3015
|
initialCoordinates: e,
|
|
3183
3016
|
active: t
|
|
@@ -3200,7 +3033,7 @@ var di = /* @__PURE__ */ r(function(e) {
|
|
|
3200
3033
|
return async function() {
|
|
3201
3034
|
let { active: t, collisions: n, over: r, scrollAdjustedTranslate: i } = I.current, o = null;
|
|
3202
3035
|
if (t && i) {
|
|
3203
|
-
let { cancelDrop: s } =
|
|
3036
|
+
let { cancelDrop: s } = ae.current;
|
|
3204
3037
|
o = {
|
|
3205
3038
|
activatorEvent: a,
|
|
3206
3039
|
active: t,
|
|
@@ -3210,10 +3043,10 @@ var di = /* @__PURE__ */ r(function(e) {
|
|
|
3210
3043
|
}, e === Z.DragEnd && typeof s == "function" && await Promise.resolve(s(o)) && (e = Z.DragCancel);
|
|
3211
3044
|
}
|
|
3212
3045
|
k.current = null, Ke(() => {
|
|
3213
|
-
v({ type: e }), S(
|
|
3046
|
+
v({ type: e }), S(ci.Uninitialized), be(null), re(null), ie(null), Se.current = null;
|
|
3214
3047
|
let t = e === Z.DragEnd ? "onDragEnd" : "onDragCancel";
|
|
3215
3048
|
if (o) {
|
|
3216
|
-
let e =
|
|
3049
|
+
let e = ae.current[t];
|
|
3217
3050
|
e?.(o), y({
|
|
3218
3051
|
type: t,
|
|
3219
3052
|
event: o
|
|
@@ -3222,16 +3055,16 @@ var di = /* @__PURE__ */ r(function(e) {
|
|
|
3222
3055
|
});
|
|
3223
3056
|
};
|
|
3224
3057
|
}
|
|
3225
|
-
}, [T]), we =
|
|
3058
|
+
}, [T]), we = Tr(f, i((e, t) => (n, r) => {
|
|
3226
3059
|
let i = n.nativeEvent, a = T.get(r);
|
|
3227
3060
|
if (k.current !== null || !a || i.dndKit || i.defaultPrevented) return;
|
|
3228
3061
|
let o = { active: a };
|
|
3229
3062
|
e(n, t.options, o) === !0 && (i.dndKit = { capturedBy: t.sensor }, k.current = r, Ce(n, t));
|
|
3230
3063
|
}, [T, Ce]));
|
|
3231
|
-
|
|
3232
|
-
P && x ===
|
|
3064
|
+
Vr(f), Lt(() => {
|
|
3065
|
+
P && x === ci.Initializing && S(ci.Initialized);
|
|
3233
3066
|
}, [P, x]), o(() => {
|
|
3234
|
-
let { onDragMove: e } =
|
|
3067
|
+
let { onDragMove: e } = ae.current, { active: t, activatorEvent: n, collisions: r, over: i } = I.current;
|
|
3235
3068
|
if (!t || !n) return;
|
|
3236
3069
|
let a = {
|
|
3237
3070
|
active: t,
|
|
@@ -3252,7 +3085,7 @@ var di = /* @__PURE__ */ r(function(e) {
|
|
|
3252
3085
|
}, [G.x, G.y]), o(() => {
|
|
3253
3086
|
let { active: e, activatorEvent: t, collisions: n, droppableContainers: r, scrollAdjustedTranslate: i } = I.current;
|
|
3254
3087
|
if (!e || k.current == null || !t || !i) return;
|
|
3255
|
-
let { onDragOver: a } =
|
|
3088
|
+
let { onDragOver: a } = ae.current, o = r.get(J), s = o && o.rect.current ? {
|
|
3256
3089
|
id: o.id,
|
|
3257
3090
|
rect: o.rect.current,
|
|
3258
3091
|
data: o.data,
|
|
@@ -3273,18 +3106,18 @@ var di = /* @__PURE__ */ r(function(e) {
|
|
|
3273
3106
|
event: c
|
|
3274
3107
|
});
|
|
3275
3108
|
});
|
|
3276
|
-
}, [J]),
|
|
3109
|
+
}, [J]), Lt(() => {
|
|
3277
3110
|
I.current = {
|
|
3278
3111
|
activatorEvent: A,
|
|
3279
3112
|
active: O,
|
|
3280
|
-
activeNode:
|
|
3113
|
+
activeNode: M,
|
|
3281
3114
|
collisionRect: K,
|
|
3282
3115
|
collisions: q,
|
|
3283
|
-
droppableRects:
|
|
3116
|
+
droppableRects: ce,
|
|
3284
3117
|
draggableNodes: T,
|
|
3285
3118
|
draggingNode: R,
|
|
3286
3119
|
draggingNodeRect: z,
|
|
3287
|
-
droppableContainers:
|
|
3120
|
+
droppableContainers: E,
|
|
3288
3121
|
over: ye,
|
|
3289
3122
|
scrollableAncestors: B,
|
|
3290
3123
|
scrollAdjustedTranslate: G
|
|
@@ -3294,20 +3127,20 @@ var di = /* @__PURE__ */ r(function(e) {
|
|
|
3294
3127
|
};
|
|
3295
3128
|
}, [
|
|
3296
3129
|
O,
|
|
3297
|
-
|
|
3130
|
+
M,
|
|
3298
3131
|
q,
|
|
3299
3132
|
K,
|
|
3300
3133
|
T,
|
|
3301
3134
|
R,
|
|
3302
3135
|
z,
|
|
3303
|
-
|
|
3304
|
-
|
|
3136
|
+
ce,
|
|
3137
|
+
E,
|
|
3305
3138
|
ye,
|
|
3306
3139
|
B,
|
|
3307
3140
|
G
|
|
3308
|
-
]),
|
|
3309
|
-
...
|
|
3310
|
-
delta:
|
|
3141
|
+
]), xr({
|
|
3142
|
+
...fe,
|
|
3143
|
+
delta: ee,
|
|
3311
3144
|
draggingRect: K,
|
|
3312
3145
|
pointerCoordinates: _e,
|
|
3313
3146
|
scrollableAncestors: B,
|
|
@@ -3315,64 +3148,64 @@ var di = /* @__PURE__ */ r(function(e) {
|
|
|
3315
3148
|
});
|
|
3316
3149
|
let Te = c(() => ({
|
|
3317
3150
|
active: O,
|
|
3318
|
-
activeNode:
|
|
3151
|
+
activeNode: M,
|
|
3319
3152
|
activeNodeRect: P,
|
|
3320
3153
|
activatorEvent: A,
|
|
3321
3154
|
collisions: q,
|
|
3322
3155
|
containerNodeRect: F,
|
|
3323
3156
|
dragOverlay: L,
|
|
3324
3157
|
draggableNodes: T,
|
|
3325
|
-
droppableContainers:
|
|
3326
|
-
droppableRects:
|
|
3158
|
+
droppableContainers: E,
|
|
3159
|
+
droppableRects: ce,
|
|
3327
3160
|
over: ye,
|
|
3328
|
-
measureDroppableContainers:
|
|
3161
|
+
measureDroppableContainers: le,
|
|
3329
3162
|
scrollableAncestors: B,
|
|
3330
3163
|
scrollableAncestorRects: V,
|
|
3331
|
-
measuringConfiguration:
|
|
3332
|
-
measuringScheduled:
|
|
3164
|
+
measuringConfiguration: j,
|
|
3165
|
+
measuringScheduled: ue,
|
|
3333
3166
|
windowRect: ge
|
|
3334
3167
|
}), [
|
|
3335
3168
|
O,
|
|
3336
|
-
|
|
3169
|
+
M,
|
|
3337
3170
|
P,
|
|
3338
3171
|
A,
|
|
3339
3172
|
q,
|
|
3340
3173
|
F,
|
|
3341
3174
|
L,
|
|
3342
3175
|
T,
|
|
3343
|
-
|
|
3344
|
-
se,
|
|
3345
|
-
ye,
|
|
3176
|
+
E,
|
|
3346
3177
|
ce,
|
|
3178
|
+
ye,
|
|
3179
|
+
le,
|
|
3347
3180
|
B,
|
|
3348
3181
|
V,
|
|
3349
|
-
|
|
3350
|
-
|
|
3182
|
+
j,
|
|
3183
|
+
ue,
|
|
3351
3184
|
ge
|
|
3352
3185
|
]), Ee = c(() => ({
|
|
3353
3186
|
activatorEvent: A,
|
|
3354
3187
|
activators: we,
|
|
3355
3188
|
active: O,
|
|
3356
3189
|
activeNodeRect: P,
|
|
3357
|
-
ariaDescribedById: { draggable:
|
|
3190
|
+
ariaDescribedById: { draggable: oe },
|
|
3358
3191
|
dispatch: v,
|
|
3359
3192
|
draggableNodes: T,
|
|
3360
3193
|
over: ye,
|
|
3361
|
-
measureDroppableContainers:
|
|
3194
|
+
measureDroppableContainers: le
|
|
3362
3195
|
}), [
|
|
3363
3196
|
A,
|
|
3364
3197
|
we,
|
|
3365
3198
|
O,
|
|
3366
3199
|
P,
|
|
3367
3200
|
v,
|
|
3368
|
-
|
|
3201
|
+
oe,
|
|
3369
3202
|
T,
|
|
3370
3203
|
ye,
|
|
3371
|
-
|
|
3204
|
+
le
|
|
3372
3205
|
]);
|
|
3373
|
-
return t.createElement(
|
|
3206
|
+
return t.createElement(sn.Provider, { value: b }, t.createElement($r.Provider, { value: Ee }, t.createElement(ei.Provider, { value: Te }, t.createElement(si.Provider, { value: xe }, s)), t.createElement(ri, { disabled: r?.restoreFocus === !1 })), t.createElement(fn, {
|
|
3374
3207
|
...r,
|
|
3375
|
-
hiddenTextDescribedById:
|
|
3208
|
+
hiddenTextDescribedById: oe
|
|
3376
3209
|
}));
|
|
3377
3210
|
function De() {
|
|
3378
3211
|
let e = ne?.autoScrollEnabled === !1, t = typeof a == "object" ? a.enabled === !1 : a === !1, n = C && !e && !t;
|
|
@@ -3381,10 +3214,10 @@ var di = /* @__PURE__ */ r(function(e) {
|
|
|
3381
3214
|
enabled: n
|
|
3382
3215
|
} : { enabled: n };
|
|
3383
3216
|
}
|
|
3384
|
-
}),
|
|
3385
|
-
function
|
|
3386
|
-
let { id: t, data: n, disabled: r = !1, attributes: i } = e, o =
|
|
3387
|
-
return
|
|
3217
|
+
}), ui = /* @__PURE__ */ n(null), di = "button", fi = "Draggable";
|
|
3218
|
+
function pi(e) {
|
|
3219
|
+
let { id: t, data: n, disabled: r = !1, attributes: i } = e, o = Gt(fi), { activators: s, activatorEvent: l, active: u, activeNodeRect: d, ariaDescribedById: f, draggableNodes: p, over: m } = a($r), { role: h = di, roleDescription: g = "draggable", tabIndex: _ = 0 } = i ?? {}, v = u?.id === t, y = a(v ? si : ui), [b, x] = Ht(), [S, C] = Ht(), w = Hr(s, t), T = Bt(n);
|
|
3220
|
+
return Lt(() => (p.set(t, {
|
|
3388
3221
|
id: t,
|
|
3389
3222
|
key: o,
|
|
3390
3223
|
node: b,
|
|
@@ -3401,7 +3234,7 @@ function hi(e) {
|
|
|
3401
3234
|
role: h,
|
|
3402
3235
|
tabIndex: _,
|
|
3403
3236
|
"aria-disabled": r,
|
|
3404
|
-
"aria-pressed": v && h ===
|
|
3237
|
+
"aria-pressed": v && h === di ? !0 : void 0,
|
|
3405
3238
|
"aria-roledescription": g,
|
|
3406
3239
|
"aria-describedby": f.draggable
|
|
3407
3240
|
}), [
|
|
@@ -3421,15 +3254,15 @@ function hi(e) {
|
|
|
3421
3254
|
transform: y
|
|
3422
3255
|
};
|
|
3423
3256
|
}
|
|
3424
|
-
function
|
|
3425
|
-
return a(
|
|
3257
|
+
function mi() {
|
|
3258
|
+
return a(ei);
|
|
3426
3259
|
}
|
|
3427
|
-
var
|
|
3428
|
-
function
|
|
3429
|
-
let { data: t, disabled: n = !1, id: r, resizeObserverConfig: s } = e, c =
|
|
3430
|
-
...
|
|
3260
|
+
var hi = "Droppable", gi = { timeout: 25 };
|
|
3261
|
+
function _i(e) {
|
|
3262
|
+
let { data: t, disabled: n = !1, id: r, resizeObserverConfig: s } = e, c = Gt(hi), { active: l, dispatch: d, over: f, measureDroppableContainers: p } = a($r), m = u({ disabled: n }), h = u(!1), g = u(null), _ = u(null), { disabled: v, updateMeasurementsFor: y, timeout: b } = {
|
|
3263
|
+
...gi,
|
|
3431
3264
|
...s
|
|
3432
|
-
}, x =
|
|
3265
|
+
}, x = Bt(y ?? r), S = Nr({
|
|
3433
3266
|
callback: i(() => {
|
|
3434
3267
|
if (!h.current) {
|
|
3435
3268
|
h.current = !0;
|
|
@@ -3440,9 +3273,9 @@ function yi(e) {
|
|
|
3440
3273
|
}, b);
|
|
3441
3274
|
}, [b]),
|
|
3442
3275
|
disabled: v || !l
|
|
3443
|
-
}), [C, w] =
|
|
3276
|
+
}), [C, w] = Ht(i((e, t) => {
|
|
3444
3277
|
S && (t && (S.unobserve(t), h.current = !1), e && S.observe(e));
|
|
3445
|
-
}, [S])), T =
|
|
3278
|
+
}, [S])), T = Bt(t);
|
|
3446
3279
|
return o(() => {
|
|
3447
3280
|
!S || !C.current || (S.disconnect(), h.current = !1, S.observe(C.current));
|
|
3448
3281
|
}, [C, S]), o(() => (d({
|
|
@@ -3481,90 +3314,90 @@ function yi(e) {
|
|
|
3481
3314
|
};
|
|
3482
3315
|
}
|
|
3483
3316
|
//#endregion
|
|
3484
|
-
//#region ../../node_modules/.pnpm/@dnd-kit+sortable@10.0.0_@dnd-kit+core@6.3.1_react-dom@19.2.
|
|
3485
|
-
function
|
|
3317
|
+
//#region ../../node_modules/.pnpm/@dnd-kit+sortable@10.0.0_@dnd-kit+core@6.3.1_react-dom@19.2.5_react@19.2.5__react@19.2.5__react@19.2.5/node_modules/@dnd-kit/sortable/dist/sortable.esm.js
|
|
3318
|
+
function vi(e, t, n) {
|
|
3486
3319
|
let r = e.slice();
|
|
3487
3320
|
return r.splice(n < 0 ? r.length + n : n, 0, r.splice(t, 1)[0]), r;
|
|
3488
3321
|
}
|
|
3489
|
-
function
|
|
3322
|
+
function yi(e, t) {
|
|
3490
3323
|
return e.reduce((e, n, r) => {
|
|
3491
3324
|
let i = t.get(n);
|
|
3492
3325
|
return i && (e[r] = i), e;
|
|
3493
3326
|
}, Array(e.length));
|
|
3494
3327
|
}
|
|
3495
|
-
function
|
|
3328
|
+
function bi(e) {
|
|
3496
3329
|
return e !== null && e >= 0;
|
|
3497
3330
|
}
|
|
3498
|
-
function
|
|
3331
|
+
function xi(e, t) {
|
|
3499
3332
|
if (e === t) return !0;
|
|
3500
3333
|
if (e.length !== t.length) return !1;
|
|
3501
3334
|
for (let n = 0; n < e.length; n++) if (e[n] !== t[n]) return !1;
|
|
3502
3335
|
return !0;
|
|
3503
3336
|
}
|
|
3504
|
-
function
|
|
3337
|
+
function Si(e) {
|
|
3505
3338
|
return typeof e == "boolean" ? {
|
|
3506
3339
|
draggable: e,
|
|
3507
3340
|
droppable: e
|
|
3508
3341
|
} : e;
|
|
3509
3342
|
}
|
|
3510
|
-
var
|
|
3343
|
+
var Ci = {
|
|
3511
3344
|
scaleX: 1,
|
|
3512
3345
|
scaleY: 1
|
|
3513
|
-
},
|
|
3346
|
+
}, wi = (e) => {
|
|
3514
3347
|
let { rects: t, activeNodeRect: n, activeIndex: r, overIndex: i, index: a } = e, o = t[r] ?? n;
|
|
3515
3348
|
if (!o) return null;
|
|
3516
|
-
let s =
|
|
3349
|
+
let s = Ti(t, a, r);
|
|
3517
3350
|
if (a === r) {
|
|
3518
3351
|
let e = t[i];
|
|
3519
3352
|
return e ? {
|
|
3520
3353
|
x: r < i ? e.left + e.width - (o.left + o.width) : e.left - o.left,
|
|
3521
3354
|
y: 0,
|
|
3522
|
-
...
|
|
3355
|
+
...Ci
|
|
3523
3356
|
} : null;
|
|
3524
3357
|
}
|
|
3525
3358
|
return a > r && a <= i ? {
|
|
3526
3359
|
x: -o.width - s,
|
|
3527
3360
|
y: 0,
|
|
3528
|
-
...
|
|
3361
|
+
...Ci
|
|
3529
3362
|
} : a < r && a >= i ? {
|
|
3530
3363
|
x: o.width + s,
|
|
3531
3364
|
y: 0,
|
|
3532
|
-
...
|
|
3365
|
+
...Ci
|
|
3533
3366
|
} : {
|
|
3534
3367
|
x: 0,
|
|
3535
3368
|
y: 0,
|
|
3536
|
-
...
|
|
3369
|
+
...Ci
|
|
3537
3370
|
};
|
|
3538
3371
|
};
|
|
3539
|
-
function
|
|
3372
|
+
function Ti(e, t, n) {
|
|
3540
3373
|
let r = e[t], i = e[t - 1], a = e[t + 1];
|
|
3541
3374
|
return !r || !i && !a ? 0 : n < t ? i ? r.left - (i.left + i.width) : a.left - (r.left + r.width) : a ? a.left - (r.left + r.width) : r.left - (i.left + i.width);
|
|
3542
3375
|
}
|
|
3543
|
-
var
|
|
3544
|
-
let { rects: t, activeIndex: n, overIndex: r, index: i } = e, a =
|
|
3376
|
+
var Ei = (e) => {
|
|
3377
|
+
let { rects: t, activeIndex: n, overIndex: r, index: i } = e, a = vi(t, r, n), o = t[i], s = a[i];
|
|
3545
3378
|
return !s || !o ? null : {
|
|
3546
3379
|
x: s.left - o.left,
|
|
3547
3380
|
y: s.top - o.top,
|
|
3548
3381
|
scaleX: s.width / o.width,
|
|
3549
3382
|
scaleY: s.height / o.height
|
|
3550
3383
|
};
|
|
3551
|
-
},
|
|
3384
|
+
}, Di = "Sortable", Oi = /* @__PURE__ */ t.createContext({
|
|
3552
3385
|
activeIndex: -1,
|
|
3553
|
-
containerId:
|
|
3386
|
+
containerId: Di,
|
|
3554
3387
|
disableTransforms: !1,
|
|
3555
3388
|
items: [],
|
|
3556
3389
|
overIndex: -1,
|
|
3557
3390
|
useDragOverlay: !1,
|
|
3558
3391
|
sortedRects: [],
|
|
3559
|
-
strategy:
|
|
3392
|
+
strategy: Ei,
|
|
3560
3393
|
disabled: {
|
|
3561
3394
|
draggable: !1,
|
|
3562
3395
|
droppable: !1
|
|
3563
3396
|
}
|
|
3564
3397
|
});
|
|
3565
|
-
function
|
|
3566
|
-
let { children: n, id: r, items: i, strategy: a =
|
|
3567
|
-
|
|
3398
|
+
function ki(e) {
|
|
3399
|
+
let { children: n, id: r, items: i, strategy: a = Ei, disabled: s = !1 } = e, { active: l, dragOverlay: d, droppableRects: f, over: p, measureDroppableContainers: m } = mi(), h = Gt(Di, r), g = d.rect !== null, _ = c(() => i.map((e) => typeof e == "object" && "id" in e ? e.id : e), [i]), v = l != null, y = l ? _.indexOf(l.id) : -1, b = p ? _.indexOf(p.id) : -1, x = u(_), S = !xi(_, x.current), C = b !== -1 && y === -1 || S, w = Si(s);
|
|
3400
|
+
Lt(() => {
|
|
3568
3401
|
S && v && m(_);
|
|
3569
3402
|
}, [
|
|
3570
3403
|
S,
|
|
@@ -3582,7 +3415,7 @@ function ji(e) {
|
|
|
3582
3415
|
items: _,
|
|
3583
3416
|
overIndex: b,
|
|
3584
3417
|
useDragOverlay: g,
|
|
3585
|
-
sortedRects:
|
|
3418
|
+
sortedRects: yi(_, f),
|
|
3586
3419
|
strategy: a
|
|
3587
3420
|
}), [
|
|
3588
3421
|
y,
|
|
@@ -3596,29 +3429,29 @@ function ji(e) {
|
|
|
3596
3429
|
g,
|
|
3597
3430
|
a
|
|
3598
3431
|
]);
|
|
3599
|
-
return t.createElement(
|
|
3432
|
+
return t.createElement(Oi.Provider, { value: T }, n);
|
|
3600
3433
|
}
|
|
3601
|
-
var
|
|
3434
|
+
var Ai = (e) => {
|
|
3602
3435
|
let { id: t, items: n, activeIndex: r, overIndex: i } = e;
|
|
3603
|
-
return
|
|
3604
|
-
},
|
|
3436
|
+
return vi(n, r, i).indexOf(t);
|
|
3437
|
+
}, ji = (e) => {
|
|
3605
3438
|
let { containerId: t, isSorting: n, wasDragging: r, index: i, items: a, newIndex: o, previousItems: s, previousContainerId: c, transition: l } = e;
|
|
3606
3439
|
return !l || !r || s !== a && i === o ? !1 : n ? !0 : o !== i && t === c;
|
|
3607
|
-
},
|
|
3440
|
+
}, Mi = {
|
|
3608
3441
|
duration: 200,
|
|
3609
3442
|
easing: "ease"
|
|
3610
|
-
},
|
|
3611
|
-
property:
|
|
3443
|
+
}, Ni = "transform", Pi = /* @__PURE__ */ $t.Transition.toString({
|
|
3444
|
+
property: Ni,
|
|
3612
3445
|
duration: 0,
|
|
3613
3446
|
easing: "linear"
|
|
3614
|
-
}),
|
|
3615
|
-
function
|
|
3447
|
+
}), Fi = { roleDescription: "sortable" };
|
|
3448
|
+
function Ii(e) {
|
|
3616
3449
|
let { disabled: t, index: n, node: r, rect: i } = e, [a, s] = d(null), c = u(n);
|
|
3617
|
-
return
|
|
3450
|
+
return Lt(() => {
|
|
3618
3451
|
if (!t && n !== c.current && r.current) {
|
|
3619
3452
|
let e = i.current;
|
|
3620
3453
|
if (e) {
|
|
3621
|
-
let t =
|
|
3454
|
+
let t = Mn(r.current, { ignoreTransform: !0 }), n = {
|
|
3622
3455
|
x: e.left - t.left,
|
|
3623
3456
|
y: e.top - t.top,
|
|
3624
3457
|
scaleX: e.width / t.width,
|
|
@@ -3637,8 +3470,8 @@ function Ri(e) {
|
|
|
3637
3470
|
a && s(null);
|
|
3638
3471
|
}, [a]), a;
|
|
3639
3472
|
}
|
|
3640
|
-
function
|
|
3641
|
-
let { animateLayoutChanges: t =
|
|
3473
|
+
function Li(e) {
|
|
3474
|
+
let { animateLayoutChanges: t = ji, attributes: n, disabled: r, data: i, getNewIndex: s = Ai, id: l, strategy: d, resizeObserverConfig: f, transition: p = Mi } = e, { items: m, containerId: h, activeIndex: g, disabled: _, disableTransforms: v, sortedRects: y, overIndex: b, useDragOverlay: x, strategy: S } = a(Oi), C = Ri(r, _), w = m.indexOf(l), T = c(() => ({
|
|
3642
3475
|
sortable: {
|
|
3643
3476
|
containerId: h,
|
|
3644
3477
|
index: w,
|
|
@@ -3650,29 +3483,29 @@ function zi(e) {
|
|
|
3650
3483
|
i,
|
|
3651
3484
|
w,
|
|
3652
3485
|
m
|
|
3653
|
-
]),
|
|
3486
|
+
]), ee = c(() => m.slice(m.indexOf(l)), [m, l]), { rect: E, node: D, isOver: te, setNodeRef: O } = _i({
|
|
3654
3487
|
id: l,
|
|
3655
3488
|
data: T,
|
|
3656
3489
|
disabled: C.droppable,
|
|
3657
3490
|
resizeObserverConfig: {
|
|
3658
|
-
updateMeasurementsFor:
|
|
3491
|
+
updateMeasurementsFor: ee,
|
|
3659
3492
|
...f
|
|
3660
3493
|
}
|
|
3661
|
-
}), { active: k, activatorEvent: ne, activeNodeRect: re, attributes: A, setNodeRef: ie, listeners:
|
|
3494
|
+
}), { active: k, activatorEvent: ne, activeNodeRect: re, attributes: A, setNodeRef: ie, listeners: ae, isDragging: oe, over: se, setActivatorNodeRef: j, transform: ce } = pi({
|
|
3662
3495
|
id: l,
|
|
3663
3496
|
data: T,
|
|
3664
3497
|
attributes: {
|
|
3665
|
-
...
|
|
3498
|
+
...Fi,
|
|
3666
3499
|
...n
|
|
3667
3500
|
},
|
|
3668
3501
|
disabled: C.draggable
|
|
3669
|
-
}),
|
|
3502
|
+
}), le = kt(O, ie), ue = !!k, M = ue && !v && bi(g) && bi(b), de = !x && oe, fe = M ? (de && M ? ce : null) ?? (d ?? S)({
|
|
3670
3503
|
rects: y,
|
|
3671
3504
|
activeNodeRect: re,
|
|
3672
3505
|
activeIndex: g,
|
|
3673
3506
|
overIndex: b,
|
|
3674
3507
|
index: w
|
|
3675
|
-
}) : null,
|
|
3508
|
+
}) : null, N = bi(g) && bi(b) ? s({
|
|
3676
3509
|
id: l,
|
|
3677
3510
|
items: m,
|
|
3678
3511
|
activeIndex: g,
|
|
@@ -3680,13 +3513,13 @@ function zi(e) {
|
|
|
3680
3513
|
}) : w, P = k?.id, F = u({
|
|
3681
3514
|
activeId: P,
|
|
3682
3515
|
items: m,
|
|
3683
|
-
newIndex:
|
|
3516
|
+
newIndex: N,
|
|
3684
3517
|
containerId: h
|
|
3685
3518
|
}), I = m !== F.current.items, pe = t({
|
|
3686
3519
|
active: k,
|
|
3687
3520
|
containerId: h,
|
|
3688
|
-
isDragging:
|
|
3689
|
-
isSorting:
|
|
3521
|
+
isDragging: oe,
|
|
3522
|
+
isSorting: ue,
|
|
3690
3523
|
id: l,
|
|
3691
3524
|
index: w,
|
|
3692
3525
|
items: m,
|
|
@@ -3695,17 +3528,17 @@ function zi(e) {
|
|
|
3695
3528
|
previousContainerId: F.current.containerId,
|
|
3696
3529
|
transition: p,
|
|
3697
3530
|
wasDragging: F.current.activeId != null
|
|
3698
|
-
}), L =
|
|
3531
|
+
}), L = Ii({
|
|
3699
3532
|
disabled: !pe,
|
|
3700
3533
|
index: w,
|
|
3701
|
-
node:
|
|
3702
|
-
rect:
|
|
3534
|
+
node: D,
|
|
3535
|
+
rect: E
|
|
3703
3536
|
});
|
|
3704
3537
|
return o(() => {
|
|
3705
|
-
|
|
3538
|
+
ue && F.current.newIndex !== N && (F.current.newIndex = N), h !== F.current.containerId && (F.current.containerId = h), m !== F.current.items && (F.current.items = m);
|
|
3706
3539
|
}, [
|
|
3707
|
-
|
|
3708
|
-
|
|
3540
|
+
ue,
|
|
3541
|
+
N,
|
|
3709
3542
|
h,
|
|
3710
3543
|
m
|
|
3711
3544
|
]), o(() => {
|
|
@@ -3723,33 +3556,33 @@ function zi(e) {
|
|
|
3723
3556
|
activeIndex: g,
|
|
3724
3557
|
attributes: A,
|
|
3725
3558
|
data: T,
|
|
3726
|
-
rect:
|
|
3559
|
+
rect: E,
|
|
3727
3560
|
index: w,
|
|
3728
|
-
newIndex:
|
|
3561
|
+
newIndex: N,
|
|
3729
3562
|
items: m,
|
|
3730
3563
|
isOver: te,
|
|
3731
|
-
isSorting:
|
|
3732
|
-
isDragging:
|
|
3733
|
-
listeners:
|
|
3734
|
-
node:
|
|
3564
|
+
isSorting: ue,
|
|
3565
|
+
isDragging: oe,
|
|
3566
|
+
listeners: ae,
|
|
3567
|
+
node: D,
|
|
3735
3568
|
overIndex: b,
|
|
3736
|
-
over:
|
|
3737
|
-
setNodeRef:
|
|
3738
|
-
setActivatorNodeRef:
|
|
3569
|
+
over: se,
|
|
3570
|
+
setNodeRef: le,
|
|
3571
|
+
setActivatorNodeRef: j,
|
|
3739
3572
|
setDroppableNodeRef: O,
|
|
3740
3573
|
setDraggableNodeRef: ie,
|
|
3741
|
-
transform: L ??
|
|
3574
|
+
transform: L ?? fe,
|
|
3742
3575
|
transition: R()
|
|
3743
3576
|
};
|
|
3744
3577
|
function R() {
|
|
3745
|
-
if (L || I && F.current.newIndex === w) return
|
|
3746
|
-
if (!(
|
|
3578
|
+
if (L || I && F.current.newIndex === w) return Pi;
|
|
3579
|
+
if (!(de && !Xt(ne) || !p) && (ue || pe)) return $t.Transition.toString({
|
|
3747
3580
|
...p,
|
|
3748
|
-
property:
|
|
3581
|
+
property: Ni
|
|
3749
3582
|
});
|
|
3750
3583
|
}
|
|
3751
3584
|
}
|
|
3752
|
-
function
|
|
3585
|
+
function Ri(e, t) {
|
|
3753
3586
|
return typeof e == "boolean" ? {
|
|
3754
3587
|
draggable: e,
|
|
3755
3588
|
droppable: !1
|
|
@@ -3761,20 +3594,20 @@ function Bi(e, t) {
|
|
|
3761
3594
|
$.Down, $.Right, $.Up, $.Left;
|
|
3762
3595
|
//#endregion
|
|
3763
3596
|
//#region src/ViewTabBar.tsx
|
|
3764
|
-
var
|
|
3597
|
+
var zi = {
|
|
3765
3598
|
private: 0,
|
|
3766
3599
|
team: 1,
|
|
3767
3600
|
organization: 2,
|
|
3768
3601
|
public: 3
|
|
3769
|
-
},
|
|
3770
|
-
let { attributes: r, listeners: i, setNodeRef: a, transform: o, transition: s, isDragging: c } =
|
|
3602
|
+
}, Bi = 5, Vi = ({ id: e, disabled: t, children: n }) => {
|
|
3603
|
+
let { attributes: r, listeners: i, setNodeRef: a, transform: o, transition: s, isDragging: c } = Li({
|
|
3771
3604
|
id: e,
|
|
3772
3605
|
disabled: t
|
|
3773
3606
|
});
|
|
3774
3607
|
return /* @__PURE__ */ (0, Y.jsx)(Y.Fragment, { children: n({
|
|
3775
3608
|
setNodeRef: a,
|
|
3776
3609
|
style: {
|
|
3777
|
-
transform:
|
|
3610
|
+
transform: $t.Transform.toString(o),
|
|
3778
3611
|
transition: s,
|
|
3779
3612
|
zIndex: c ? 10 : void 0,
|
|
3780
3613
|
opacity: c ? .5 : void 0
|
|
@@ -3783,17 +3616,17 @@ var Vi = {
|
|
|
3783
3616
|
attributes: r,
|
|
3784
3617
|
isDragging: c
|
|
3785
3618
|
}) });
|
|
3786
|
-
},
|
|
3787
|
-
let { showAddButton: ie = !0, inlineRename:
|
|
3619
|
+
}, Hi = ({ views: e, activeViewId: n, onViewChange: r, viewTypeIcons: a = {}, config: s = {}, onAddView: l, onRenameView: f, onDuplicateView: p, onDeleteView: m, onSetDefaultView: h, onShareView: g, onSaveAsView: _, onPinView: v, onReorderViews: b, onChangeViewType: te, onConfigView: O, availableViewTypes: k, hasUnsavedChanges: ne = !1, onResetChanges: re, className: A }) => {
|
|
3620
|
+
let { showAddButton: ie = !0, inlineRename: ae = !0, contextMenu: oe = !0, reorderable: se = !1, maxVisibleTabs: de = 6, showIndicators: fe = !0, showSaveAsView: N = !0, showPinnedSection: P = !0, showVisibilityGroups: F = !1 } = s, [I, pe] = d(null), [L, R] = d(""), z = u(null);
|
|
3788
3621
|
o(() => {
|
|
3789
3622
|
I && z.current && (z.current.focus(), z.current.select());
|
|
3790
3623
|
}, [I]);
|
|
3791
3624
|
let me = i((t) => {
|
|
3792
|
-
if (!
|
|
3625
|
+
if (!ae || !f) return;
|
|
3793
3626
|
let n = e.find((e) => e.id === t);
|
|
3794
3627
|
n && (pe(t), R(n.label));
|
|
3795
3628
|
}, [
|
|
3796
|
-
|
|
3629
|
+
ae,
|
|
3797
3630
|
f,
|
|
3798
3631
|
e
|
|
3799
3632
|
]), he = i(() => {
|
|
@@ -3808,11 +3641,11 @@ var Vi = {
|
|
|
3808
3641
|
let t = [...e];
|
|
3809
3642
|
return t.sort((e, t) => {
|
|
3810
3643
|
if (P) {
|
|
3811
|
-
let n = e.isPinned
|
|
3644
|
+
let n = +!!e.isPinned, r = +!!t.isPinned;
|
|
3812
3645
|
if (n !== r) return r - n;
|
|
3813
3646
|
}
|
|
3814
3647
|
if (F) {
|
|
3815
|
-
let n =
|
|
3648
|
+
let n = zi[e.visibility || "public"] ?? zi.public, r = zi[t.visibility || "public"] ?? zi.public;
|
|
3816
3649
|
if (n !== r) return n - r;
|
|
3817
3650
|
}
|
|
3818
3651
|
return 0;
|
|
@@ -3821,17 +3654,17 @@ var Vi = {
|
|
|
3821
3654
|
e,
|
|
3822
3655
|
P,
|
|
3823
3656
|
F
|
|
3824
|
-
]), W = B.slice(0,
|
|
3657
|
+
]), W = B.slice(0, de), G = B.slice(de), K = hn(mn(pr, { activationConstraint: { distance: Bi } }), mn(cr)), q = i((e) => {
|
|
3825
3658
|
let { active: t, over: n } = e;
|
|
3826
3659
|
if (!n || t.id === n.id || !b) return;
|
|
3827
3660
|
let r = B.findIndex((e) => e.id === t.id), i = B.findIndex((e) => e.id === n.id);
|
|
3828
|
-
r === -1 || i === -1 || b(
|
|
3661
|
+
r === -1 || i === -1 || b(vi(B, r, i).map((e) => e.id));
|
|
3829
3662
|
}, [B, b]), J = Ve, be = i((e) => {
|
|
3830
3663
|
if (!F || e === 0) return !1;
|
|
3831
3664
|
let t = W[e - 1], n = W[e], r = (e) => e.visibility === "private";
|
|
3832
3665
|
return r(t) && !r(n);
|
|
3833
3666
|
}, [F, W]), xe = (e, i) => {
|
|
3834
|
-
let o = e.id === n, s = a[e.type] || J, c = I === e.id, l =
|
|
3667
|
+
let o = e.id === n, s = a[e.type] || J, c = I === e.id, l = fe && (e.hasActiveFilters || e.hasActiveSort), u = be(i), d = ((e) => F ? e.visibility === "private" ? /* @__PURE__ */ (0, Y.jsx)(Oe, {
|
|
3835
3668
|
"data-testid": `view-tab-visibility-${e.id}`,
|
|
3836
3669
|
className: "h-3 w-3 text-muted-foreground shrink-0"
|
|
3837
3670
|
}) : e.visibility ? /* @__PURE__ */ (0, Y.jsx)(Se, {
|
|
@@ -3843,7 +3676,7 @@ var Vi = {
|
|
|
3843
3676
|
onDoubleClick: () => me(e.id),
|
|
3844
3677
|
className: U("inline-flex items-center gap-1.5 px-3 py-2 text-sm font-medium border-b-2 transition-colors whitespace-nowrap relative", o ? "border-primary text-primary" : "border-transparent text-muted-foreground hover:text-foreground hover:border-border"),
|
|
3845
3678
|
children: [
|
|
3846
|
-
|
|
3679
|
+
se && b && /* @__PURE__ */ (0, Y.jsx)("span", {
|
|
3847
3680
|
"data-testid": `view-tab-drag-handle-${e.id}`,
|
|
3848
3681
|
className: "cursor-grab active:cursor-grabbing text-muted-foreground hover:text-foreground",
|
|
3849
3682
|
...t?.listeners ?? {},
|
|
@@ -3856,7 +3689,7 @@ var Vi = {
|
|
|
3856
3689
|
}),
|
|
3857
3690
|
d,
|
|
3858
3691
|
/* @__PURE__ */ (0, Y.jsx)(s, { className: "h-3.5 w-3.5" }),
|
|
3859
|
-
c ? /* @__PURE__ */ (0, Y.jsx)(
|
|
3692
|
+
c ? /* @__PURE__ */ (0, Y.jsx)(M, {
|
|
3860
3693
|
ref: z,
|
|
3861
3694
|
"data-testid": `view-tab-rename-input-${e.id}`,
|
|
3862
3695
|
value: L,
|
|
@@ -3892,7 +3725,7 @@ var Vi = {
|
|
|
3892
3725
|
children: /* @__PURE__ */ (0, Y.jsx)(Le, { className: "h-3 w-3" })
|
|
3893
3726
|
})
|
|
3894
3727
|
]
|
|
3895
|
-
}), y = (t) => !
|
|
3728
|
+
}), y = (t) => !oe || c ? t : /* @__PURE__ */ (0, Y.jsxs)(x, { children: [/* @__PURE__ */ (0, Y.jsx)(D, {
|
|
3896
3729
|
asChild: !0,
|
|
3897
3730
|
children: t
|
|
3898
3731
|
}), /* @__PURE__ */ (0, Y.jsxs)(S, { children: [
|
|
@@ -3921,10 +3754,10 @@ var Vi = {
|
|
|
3921
3754
|
onClick: () => v(e.id, !e.isPinned),
|
|
3922
3755
|
children: e.isPinned ? /* @__PURE__ */ (0, Y.jsxs)(Y.Fragment, { children: [/* @__PURE__ */ (0, Y.jsx)(Ne, { className: "h-4 w-4 mr-2" }), " Unpin View"] }) : /* @__PURE__ */ (0, Y.jsxs)(Y.Fragment, { children: [/* @__PURE__ */ (0, Y.jsx)(Me, { className: "h-4 w-4 mr-2" }), " Pin View"] })
|
|
3923
3756
|
}),
|
|
3924
|
-
te && k && k.length > 0 && /* @__PURE__ */ (0, Y.jsxs)(Y.Fragment, { children: [/* @__PURE__ */ (0, Y.jsx)(w, {}), /* @__PURE__ */ (0, Y.jsxs)(T, { children: [/* @__PURE__ */ (0, Y.jsxs)(
|
|
3757
|
+
te && k && k.length > 0 && /* @__PURE__ */ (0, Y.jsxs)(Y.Fragment, { children: [/* @__PURE__ */ (0, Y.jsx)(w, {}), /* @__PURE__ */ (0, Y.jsxs)(T, { children: [/* @__PURE__ */ (0, Y.jsxs)(E, {
|
|
3925
3758
|
"data-testid": `context-menu-change-type-${e.id}`,
|
|
3926
3759
|
children: [/* @__PURE__ */ (0, Y.jsx)(Ee, { className: "h-4 w-4 mr-2" }), " Change View Type"]
|
|
3927
|
-
}), /* @__PURE__ */ (0, Y.jsx)(
|
|
3760
|
+
}), /* @__PURE__ */ (0, Y.jsx)(ee, {
|
|
3928
3761
|
"data-testid": `context-menu-type-submenu-${e.id}`,
|
|
3929
3762
|
children: k.map((t) => {
|
|
3930
3763
|
let n = a[t.type] || J;
|
|
@@ -3949,10 +3782,10 @@ var Vi = {
|
|
|
3949
3782
|
children: [/* @__PURE__ */ (0, Y.jsx)(He, { className: "h-4 w-4 mr-2" }), " Delete View"]
|
|
3950
3783
|
})] })
|
|
3951
3784
|
] })] });
|
|
3952
|
-
return
|
|
3785
|
+
return se && b ? /* @__PURE__ */ (0, Y.jsxs)(t.Fragment, { children: [u && /* @__PURE__ */ (0, Y.jsx)("div", {
|
|
3953
3786
|
"data-testid": "view-tab-visibility-separator",
|
|
3954
3787
|
className: "w-px h-5 bg-border mx-1 self-center shrink-0"
|
|
3955
|
-
}), /* @__PURE__ */ (0, Y.jsx)(
|
|
3788
|
+
}), /* @__PURE__ */ (0, Y.jsx)(Vi, {
|
|
3956
3789
|
id: e.id,
|
|
3957
3790
|
children: ({ setNodeRef: e, style: t, listeners: n, attributes: r, isDragging: i }) => /* @__PURE__ */ (0, Y.jsx)("div", {
|
|
3958
3791
|
ref: e,
|
|
@@ -3972,13 +3805,13 @@ var Vi = {
|
|
|
3972
3805
|
"data-testid": "view-tab-bar",
|
|
3973
3806
|
className: U("flex items-center gap-0.5 -mb-px", A),
|
|
3974
3807
|
children: [
|
|
3975
|
-
|
|
3808
|
+
se && b ? /* @__PURE__ */ (0, Y.jsx)(li, {
|
|
3976
3809
|
sensors: K,
|
|
3977
|
-
collisionDetection:
|
|
3810
|
+
collisionDetection: Sn,
|
|
3978
3811
|
onDragEnd: q,
|
|
3979
|
-
children: /* @__PURE__ */ (0, Y.jsx)(
|
|
3812
|
+
children: /* @__PURE__ */ (0, Y.jsx)(ki, {
|
|
3980
3813
|
items: W.map((e) => e.id),
|
|
3981
|
-
strategy:
|
|
3814
|
+
strategy: wi,
|
|
3982
3815
|
children: /* @__PURE__ */ (0, Y.jsx)("div", {
|
|
3983
3816
|
"data-testid": "view-tab-sortable-container",
|
|
3984
3817
|
className: "flex items-center gap-0.5",
|
|
@@ -3986,7 +3819,7 @@ var Vi = {
|
|
|
3986
3819
|
})
|
|
3987
3820
|
})
|
|
3988
3821
|
}) : Ce,
|
|
3989
|
-
G.length > 0 && /* @__PURE__ */ (0, Y.jsxs)(
|
|
3822
|
+
G.length > 0 && /* @__PURE__ */ (0, Y.jsxs)(j, { children: [/* @__PURE__ */ (0, Y.jsx)(ue, {
|
|
3990
3823
|
asChild: !0,
|
|
3991
3824
|
children: /* @__PURE__ */ (0, Y.jsxs)("button", {
|
|
3992
3825
|
"data-testid": "view-tab-overflow",
|
|
@@ -3996,18 +3829,18 @@ var Vi = {
|
|
|
3996
3829
|
children: [G.length, " more"]
|
|
3997
3830
|
})]
|
|
3998
3831
|
})
|
|
3999
|
-
}), /* @__PURE__ */ (0, Y.jsx)(
|
|
3832
|
+
}), /* @__PURE__ */ (0, Y.jsx)(ce, {
|
|
4000
3833
|
align: "end",
|
|
4001
3834
|
children: G.map((e) => {
|
|
4002
3835
|
let t = a[e.type] || J;
|
|
4003
|
-
return /* @__PURE__ */ (0, Y.jsxs)(
|
|
3836
|
+
return /* @__PURE__ */ (0, Y.jsxs)(le, {
|
|
4004
3837
|
"data-testid": `view-tab-overflow-${e.id}`,
|
|
4005
3838
|
onClick: () => r(e.id),
|
|
4006
3839
|
children: [
|
|
4007
3840
|
e.isPinned && /* @__PURE__ */ (0, Y.jsx)(Me, { className: "h-3 w-3 mr-1 text-primary shrink-0" }),
|
|
4008
3841
|
/* @__PURE__ */ (0, Y.jsx)(t, { className: "h-4 w-4 mr-2" }),
|
|
4009
3842
|
e.label,
|
|
4010
|
-
|
|
3843
|
+
fe && (e.hasActiveFilters || e.hasActiveSort) && /* @__PURE__ */ (0, Y.jsx)("span", {
|
|
4011
3844
|
className: "ml-auto inline-flex items-center justify-center h-4 min-w-[16px] rounded-full bg-primary/15 text-[10px] font-medium text-primary px-1",
|
|
4012
3845
|
children: [e.hasActiveFilters && "F", e.hasActiveSort && "S"].filter(Boolean).join("")
|
|
4013
3846
|
})
|
|
@@ -4024,7 +3857,7 @@ var Vi = {
|
|
|
4024
3857
|
children: /* @__PURE__ */ (0, Y.jsx)(Pe, { className: "h-4 w-4" })
|
|
4025
3858
|
})
|
|
4026
3859
|
}), /* @__PURE__ */ (0, Y.jsx)(H, { children: "Add View" })] }),
|
|
4027
|
-
|
|
3860
|
+
N && ne && /* @__PURE__ */ (0, Y.jsxs)("div", {
|
|
4028
3861
|
"data-testid": "view-tab-save-as",
|
|
4029
3862
|
className: "flex items-center gap-1 ml-2 text-xs text-amber-600 dark:text-amber-400",
|
|
4030
3863
|
children: [
|
|
@@ -4053,11 +3886,11 @@ var Vi = {
|
|
|
4053
3886
|
})
|
|
4054
3887
|
]
|
|
4055
3888
|
}) });
|
|
4056
|
-
},
|
|
3889
|
+
}, Ui = h, Wi = ({ schema: e }) => /* @__PURE__ */ (0, Y.jsx)(gt, {
|
|
4057
3890
|
schema: e,
|
|
4058
|
-
dataSource: a(
|
|
3891
|
+
dataSource: a(Ui)?.dataSource ?? null
|
|
4059
3892
|
});
|
|
4060
|
-
f.register("object-view",
|
|
3893
|
+
f.register("object-view", Wi, {
|
|
4061
3894
|
namespace: "plugin-view",
|
|
4062
3895
|
label: "Object View",
|
|
4063
3896
|
category: "view",
|
|
@@ -4163,11 +3996,11 @@ f.register("object-view", Ki, {
|
|
|
4163
3996
|
showRefresh: !0,
|
|
4164
3997
|
showViewSwitcher: !0
|
|
4165
3998
|
}
|
|
4166
|
-
}), f.register("view",
|
|
3999
|
+
}), f.register("view", Wi, {
|
|
4167
4000
|
namespace: "plugin-view",
|
|
4168
4001
|
label: "View",
|
|
4169
4002
|
category: "view"
|
|
4170
|
-
}), f.register("view-switcher",
|
|
4003
|
+
}), f.register("view-switcher", mt, {
|
|
4171
4004
|
namespace: "view",
|
|
4172
4005
|
label: "View Switcher",
|
|
4173
4006
|
category: "view",
|
|
@@ -4246,7 +4079,7 @@ f.register("object-view", Ki, {
|
|
|
4246
4079
|
}
|
|
4247
4080
|
}]
|
|
4248
4081
|
}
|
|
4249
|
-
}), f.register("filter-ui",
|
|
4082
|
+
}), f.register("filter-ui", bt, {
|
|
4250
4083
|
namespace: "view",
|
|
4251
4084
|
label: "Filter UI",
|
|
4252
4085
|
category: "view",
|
|
@@ -4319,7 +4152,7 @@ f.register("object-view", Ki, {
|
|
|
4319
4152
|
}
|
|
4320
4153
|
]
|
|
4321
4154
|
}
|
|
4322
|
-
}), f.register("sort-ui",
|
|
4155
|
+
}), f.register("sort-ui", Tt, {
|
|
4323
4156
|
namespace: "view",
|
|
4324
4157
|
label: "Sort UI",
|
|
4325
4158
|
category: "view",
|
|
@@ -4368,7 +4201,7 @@ f.register("object-view", Ki, {
|
|
|
4368
4201
|
direction: "asc"
|
|
4369
4202
|
}]
|
|
4370
4203
|
}
|
|
4371
|
-
}), f.register("shared-view-link",
|
|
4204
|
+
}), f.register("shared-view-link", Ot, {
|
|
4372
4205
|
namespace: "view",
|
|
4373
4206
|
label: "Shared View Link",
|
|
4374
4207
|
category: "view",
|
|
@@ -4410,4 +4243,4 @@ f.register("object-view", Ki, {
|
|
|
4410
4243
|
category: "view"
|
|
4411
4244
|
});
|
|
4412
4245
|
//#endregion
|
|
4413
|
-
export {
|
|
4246
|
+
export { bt as FilterUI, gt as ObjectView, Ot as SharedViewLink, Tt as SortUI, mt as ViewSwitcher, Hi as ViewTabBar };
|