@object-ui/plugin-view 3.1.0 → 3.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +5 -5
- package/CHANGELOG.md +12 -0
- package/dist/index.js +1249 -1218
- package/dist/index.umd.cjs +3 -3
- package/package.json +7 -7
- package/src/FilterUI.tsx +33 -0
- package/src/ObjectView.tsx +9 -2
- package/src/__tests__/FilterUI.test.tsx +97 -0
package/dist/index.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import
|
|
3
|
-
import { buildExpandFields as
|
|
4
|
-
import { ObjectGrid as
|
|
1
|
+
import * as Q from "react";
|
|
2
|
+
import ve, { useState as ee, useMemo as V, useEffect as W, useCallback as L, useRef as q, useLayoutEffect as Mr, createContext as wt, memo as Pr, useReducer as Lr, useContext as Ge } from "react";
|
|
3
|
+
import { buildExpandFields as _r, ComponentRegistry as Ke } from "@object-ui/core";
|
|
4
|
+
import { ObjectGrid as $r } from "@object-ui/plugin-grid";
|
|
5
5
|
import { ObjectForm as Gt } from "@object-ui/plugin-form";
|
|
6
|
-
import { Button as
|
|
7
|
-
import { Trash2 as
|
|
8
|
-
import { SchemaRenderer as
|
|
6
|
+
import { Button as Ce, Select as Ot, SelectTrigger as It, SelectValue as kt, cn as re, SelectContent as Vt, SelectItem as pt, Tabs as Zn, TabsList as er, TabsTrigger as tr, NavigationOverlay as Cn, Drawer as nr, DrawerContent as rr, DrawerHeader as ir, DrawerTitle as or, DrawerDescription as sr, Dialog as zr, DialogContent as Br, DialogHeader as Ur, DialogTitle as Yr, DialogDescription as Wr, Label as Gr, Popover as ar, PopoverTrigger as lr, PopoverContent as cr, Input as We, Checkbox as Sn, SortBuilder as Hr, Badge as Ht, TooltipProvider as Xr, DropdownMenu as qr, DropdownMenuTrigger as Kr, DropdownMenuContent as Jr, DropdownMenuItem as Qr, Tooltip as Nn, TooltipTrigger as Dn, TooltipContent as Rn, ContextMenu as Zr, ContextMenuTrigger as ei, ContextMenuContent as ti, ContextMenuItem as qe, ContextMenuSeparator as En, ContextMenuSub as ni, ContextMenuSubTrigger as ri, ContextMenuSubContent as ii } from "@object-ui/components";
|
|
7
|
+
import { Trash2 as dr, Copy as un, Settings as oi, Share2 as Mt, Plus as fn, icons as si, GanttChartSquare as ai, Images as li, Map as ci, Activity as di, Calendar as rn, LayoutGrid as ur, Grid as ui, FileText as fi, List as pi, SlidersHorizontal as An, X as hi, ArrowUp as gi, ArrowDown as vi, Lock as on, Check as bi, MoreHorizontal as mi, Pin as Xt, Table as xi, Save as wi, Globe as yi, Pencil as ji, Star as Tn, PinOff as Ci, GripVertical as Si, Settings2 as Ni } from "lucide-react";
|
|
8
|
+
import { SchemaRenderer as Fn } from "@object-ui/react";
|
|
9
9
|
import { unstable_batchedUpdates as Nt, createPortal as Di } from "react-dom";
|
|
10
10
|
var Dt = { exports: {} }, ut = {};
|
|
11
|
-
var
|
|
11
|
+
var On;
|
|
12
12
|
function Ri() {
|
|
13
|
-
if (
|
|
14
|
-
|
|
13
|
+
if (On) return ut;
|
|
14
|
+
On = 1;
|
|
15
15
|
var e = /* @__PURE__ */ Symbol.for("react.transitional.element"), t = /* @__PURE__ */ Symbol.for("react.fragment");
|
|
16
16
|
function n(r, o, s) {
|
|
17
17
|
var l = null;
|
|
@@ -31,22 +31,22 @@ function Ri() {
|
|
|
31
31
|
return ut.Fragment = t, ut.jsx = n, ut.jsxs = n, ut;
|
|
32
32
|
}
|
|
33
33
|
var ft = {};
|
|
34
|
-
var
|
|
34
|
+
var In;
|
|
35
35
|
function Ei() {
|
|
36
|
-
return
|
|
36
|
+
return In || (In = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
37
37
|
function e(h) {
|
|
38
38
|
if (h == null) return null;
|
|
39
39
|
if (typeof h == "function")
|
|
40
|
-
return h.$$typeof ===
|
|
40
|
+
return h.$$typeof === _ ? null : h.displayName || h.name || null;
|
|
41
41
|
if (typeof h == "string") return h;
|
|
42
42
|
switch (h) {
|
|
43
43
|
case j:
|
|
44
44
|
return "Fragment";
|
|
45
|
-
case
|
|
45
|
+
case m:
|
|
46
46
|
return "Profiler";
|
|
47
47
|
case N:
|
|
48
48
|
return "StrictMode";
|
|
49
|
-
case
|
|
49
|
+
case k:
|
|
50
50
|
return "Suspense";
|
|
51
51
|
case x:
|
|
52
52
|
return "SuspenseList";
|
|
@@ -59,19 +59,19 @@ function Ei() {
|
|
|
59
59
|
), h.$$typeof) {
|
|
60
60
|
case f:
|
|
61
61
|
return "Portal";
|
|
62
|
-
case
|
|
62
|
+
case A:
|
|
63
63
|
return h.displayName || "Context";
|
|
64
64
|
case C:
|
|
65
65
|
return (h._context.displayName || "Context") + ".Consumer";
|
|
66
|
-
case
|
|
67
|
-
var
|
|
68
|
-
return h = h.displayName, h || (h =
|
|
69
|
-
case
|
|
70
|
-
return
|
|
66
|
+
case F:
|
|
67
|
+
var u = h.render;
|
|
68
|
+
return h = h.displayName, h || (h = u.displayName || u.name || "", h = h !== "" ? "ForwardRef(" + h + ")" : "ForwardRef"), h;
|
|
69
|
+
case R:
|
|
70
|
+
return u = h.displayName || null, u !== null ? u : e(h.type) || "Memo";
|
|
71
71
|
case I:
|
|
72
|
-
|
|
72
|
+
u = h._payload, h = h._init;
|
|
73
73
|
try {
|
|
74
|
-
return e(h(
|
|
74
|
+
return e(h(u));
|
|
75
75
|
} catch {
|
|
76
76
|
}
|
|
77
77
|
}
|
|
@@ -83,17 +83,17 @@ function Ei() {
|
|
|
83
83
|
function n(h) {
|
|
84
84
|
try {
|
|
85
85
|
t(h);
|
|
86
|
-
var
|
|
86
|
+
var u = !1;
|
|
87
87
|
} catch {
|
|
88
|
-
|
|
88
|
+
u = !0;
|
|
89
89
|
}
|
|
90
|
-
if (
|
|
91
|
-
|
|
92
|
-
var
|
|
93
|
-
return
|
|
94
|
-
|
|
90
|
+
if (u) {
|
|
91
|
+
u = console;
|
|
92
|
+
var O = u.error, T = typeof Symbol == "function" && Symbol.toStringTag && h[Symbol.toStringTag] || h.constructor.name || "Object";
|
|
93
|
+
return O.call(
|
|
94
|
+
u,
|
|
95
95
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
96
|
-
|
|
96
|
+
T
|
|
97
97
|
), t(h);
|
|
98
98
|
}
|
|
99
99
|
}
|
|
@@ -102,55 +102,55 @@ function Ei() {
|
|
|
102
102
|
if (typeof h == "object" && h !== null && h.$$typeof === I)
|
|
103
103
|
return "<...>";
|
|
104
104
|
try {
|
|
105
|
-
var
|
|
106
|
-
return
|
|
105
|
+
var u = e(h);
|
|
106
|
+
return u ? "<" + u + ">" : "<...>";
|
|
107
107
|
} catch {
|
|
108
108
|
return "<...>";
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
111
|
function o() {
|
|
112
|
-
var h =
|
|
112
|
+
var h = B.A;
|
|
113
113
|
return h === null ? null : h.getOwner();
|
|
114
114
|
}
|
|
115
115
|
function s() {
|
|
116
116
|
return Error("react-stack-top-frame");
|
|
117
117
|
}
|
|
118
118
|
function l(h) {
|
|
119
|
-
if (
|
|
120
|
-
var
|
|
121
|
-
if (
|
|
119
|
+
if (ie.call(h, "key")) {
|
|
120
|
+
var u = Object.getOwnPropertyDescriptor(h, "key").get;
|
|
121
|
+
if (u && u.isReactWarning) return !1;
|
|
122
122
|
}
|
|
123
123
|
return h.key !== void 0;
|
|
124
124
|
}
|
|
125
|
-
function a(h,
|
|
126
|
-
function
|
|
127
|
-
|
|
125
|
+
function a(h, u) {
|
|
126
|
+
function O() {
|
|
127
|
+
he || (he = !0, console.error(
|
|
128
128
|
"%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)",
|
|
129
|
-
|
|
129
|
+
u
|
|
130
130
|
));
|
|
131
131
|
}
|
|
132
|
-
|
|
133
|
-
get:
|
|
132
|
+
O.isReactWarning = !0, Object.defineProperty(h, "key", {
|
|
133
|
+
get: O,
|
|
134
134
|
configurable: !0
|
|
135
135
|
});
|
|
136
136
|
}
|
|
137
|
-
function
|
|
137
|
+
function d() {
|
|
138
138
|
var h = e(this.type);
|
|
139
139
|
return ne[h] || (ne[h] = !0, console.error(
|
|
140
140
|
"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."
|
|
141
141
|
)), h = this.props.ref, h !== void 0 ? h : null;
|
|
142
142
|
}
|
|
143
|
-
function p(h,
|
|
144
|
-
var
|
|
143
|
+
function p(h, u, O, T, ce, Y) {
|
|
144
|
+
var H = O.ref;
|
|
145
145
|
return h = {
|
|
146
146
|
$$typeof: S,
|
|
147
147
|
type: h,
|
|
148
|
-
key:
|
|
149
|
-
props:
|
|
150
|
-
_owner:
|
|
151
|
-
}, (
|
|
148
|
+
key: u,
|
|
149
|
+
props: O,
|
|
150
|
+
_owner: T
|
|
151
|
+
}, (H !== void 0 ? H : null) !== null ? Object.defineProperty(h, "ref", {
|
|
152
152
|
enumerable: !1,
|
|
153
|
-
get:
|
|
153
|
+
get: d
|
|
154
154
|
}) : Object.defineProperty(h, "ref", { enumerable: !1, value: null }), h._store = {}, Object.defineProperty(h._store, "validated", {
|
|
155
155
|
configurable: !1,
|
|
156
156
|
enumerable: !1,
|
|
@@ -165,135 +165,135 @@ function Ei() {
|
|
|
165
165
|
configurable: !1,
|
|
166
166
|
enumerable: !1,
|
|
167
167
|
writable: !0,
|
|
168
|
-
value:
|
|
168
|
+
value: ce
|
|
169
169
|
}), Object.defineProperty(h, "_debugTask", {
|
|
170
170
|
configurable: !1,
|
|
171
171
|
enumerable: !1,
|
|
172
172
|
writable: !0,
|
|
173
|
-
value:
|
|
173
|
+
value: Y
|
|
174
174
|
}), Object.freeze && (Object.freeze(h.props), Object.freeze(h)), h;
|
|
175
175
|
}
|
|
176
|
-
function
|
|
177
|
-
var
|
|
178
|
-
if (
|
|
179
|
-
if (
|
|
180
|
-
if (
|
|
181
|
-
for (
|
|
182
|
-
c(
|
|
183
|
-
Object.freeze && Object.freeze(
|
|
176
|
+
function v(h, u, O, T, ce, Y) {
|
|
177
|
+
var H = u.children;
|
|
178
|
+
if (H !== void 0)
|
|
179
|
+
if (T)
|
|
180
|
+
if (Z(H)) {
|
|
181
|
+
for (T = 0; T < H.length; T++)
|
|
182
|
+
c(H[T]);
|
|
183
|
+
Object.freeze && Object.freeze(H);
|
|
184
184
|
} else
|
|
185
185
|
console.error(
|
|
186
186
|
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
187
187
|
);
|
|
188
|
-
else c(
|
|
189
|
-
if (
|
|
190
|
-
|
|
191
|
-
var
|
|
188
|
+
else c(H);
|
|
189
|
+
if (ie.call(u, "key")) {
|
|
190
|
+
H = e(h);
|
|
191
|
+
var de = Object.keys(u).filter(function(g) {
|
|
192
192
|
return g !== "key";
|
|
193
193
|
});
|
|
194
|
-
|
|
194
|
+
T = 0 < de.length ? "{key: someKey, " + de.join(": ..., ") + ": ...}" : "{key: someKey}", Ne[H + T] || (de = 0 < de.length ? "{" + de.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
195
195
|
`A props object containing a "key" prop is being spread into JSX:
|
|
196
196
|
let props = %s;
|
|
197
197
|
<%s {...props} />
|
|
198
198
|
React keys must be passed directly to JSX without using spread:
|
|
199
199
|
let props = %s;
|
|
200
200
|
<%s key={someKey} {...props} />`,
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
),
|
|
201
|
+
T,
|
|
202
|
+
H,
|
|
203
|
+
de,
|
|
204
|
+
H
|
|
205
|
+
), Ne[H + T] = !0);
|
|
206
206
|
}
|
|
207
|
-
if (
|
|
208
|
-
|
|
209
|
-
for (var
|
|
210
|
-
|
|
211
|
-
} else
|
|
212
|
-
return
|
|
213
|
-
|
|
207
|
+
if (H = null, O !== void 0 && (n(O), H = "" + O), l(u) && (n(u.key), H = "" + u.key), "key" in u) {
|
|
208
|
+
O = {};
|
|
209
|
+
for (var ue in u)
|
|
210
|
+
ue !== "key" && (O[ue] = u[ue]);
|
|
211
|
+
} else O = u;
|
|
212
|
+
return H && a(
|
|
213
|
+
O,
|
|
214
214
|
typeof h == "function" ? h.displayName || h.name || "Unknown" : h
|
|
215
215
|
), p(
|
|
216
216
|
h,
|
|
217
|
-
|
|
218
|
-
|
|
217
|
+
H,
|
|
218
|
+
O,
|
|
219
219
|
o(),
|
|
220
|
-
|
|
221
|
-
|
|
220
|
+
ce,
|
|
221
|
+
Y
|
|
222
222
|
);
|
|
223
223
|
}
|
|
224
224
|
function c(h) {
|
|
225
|
-
|
|
225
|
+
w(h) ? h._store && (h._store.validated = 1) : typeof h == "object" && h !== null && h.$$typeof === I && (h._payload.status === "fulfilled" ? w(h._payload.value) && h._payload.value._store && (h._payload.value._store.validated = 1) : h._store && (h._store.validated = 1));
|
|
226
226
|
}
|
|
227
|
-
function
|
|
227
|
+
function w(h) {
|
|
228
228
|
return typeof h == "object" && h !== null && h.$$typeof === S;
|
|
229
229
|
}
|
|
230
|
-
var
|
|
230
|
+
var b = ve, S = /* @__PURE__ */ Symbol.for("react.transitional.element"), f = /* @__PURE__ */ Symbol.for("react.portal"), j = /* @__PURE__ */ Symbol.for("react.fragment"), N = /* @__PURE__ */ Symbol.for("react.strict_mode"), m = /* @__PURE__ */ Symbol.for("react.profiler"), C = /* @__PURE__ */ Symbol.for("react.consumer"), A = /* @__PURE__ */ Symbol.for("react.context"), F = /* @__PURE__ */ Symbol.for("react.forward_ref"), k = /* @__PURE__ */ Symbol.for("react.suspense"), x = /* @__PURE__ */ Symbol.for("react.suspense_list"), R = /* @__PURE__ */ Symbol.for("react.memo"), I = /* @__PURE__ */ Symbol.for("react.lazy"), M = /* @__PURE__ */ Symbol.for("react.activity"), _ = /* @__PURE__ */ Symbol.for("react.client.reference"), B = b.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, ie = Object.prototype.hasOwnProperty, Z = Array.isArray, pe = console.createTask ? console.createTask : function() {
|
|
231
231
|
return null;
|
|
232
232
|
};
|
|
233
|
-
|
|
233
|
+
b = {
|
|
234
234
|
react_stack_bottom_frame: function(h) {
|
|
235
235
|
return h();
|
|
236
236
|
}
|
|
237
237
|
};
|
|
238
|
-
var
|
|
239
|
-
|
|
238
|
+
var he, ne = {}, $ = b.react_stack_bottom_frame.bind(
|
|
239
|
+
b,
|
|
240
240
|
s
|
|
241
|
-
)(),
|
|
242
|
-
ft.Fragment = j, ft.jsx = function(h,
|
|
243
|
-
var
|
|
244
|
-
return
|
|
241
|
+
)(), G = pe(r(s)), Ne = {};
|
|
242
|
+
ft.Fragment = j, ft.jsx = function(h, u, O) {
|
|
243
|
+
var T = 1e4 > B.recentlyCreatedOwnerStacks++;
|
|
244
|
+
return v(
|
|
245
245
|
h,
|
|
246
|
-
|
|
247
|
-
|
|
246
|
+
u,
|
|
247
|
+
O,
|
|
248
248
|
!1,
|
|
249
|
-
|
|
250
|
-
|
|
249
|
+
T ? Error("react-stack-top-frame") : $,
|
|
250
|
+
T ? pe(r(h)) : G
|
|
251
251
|
);
|
|
252
|
-
}, ft.jsxs = function(h,
|
|
253
|
-
var
|
|
254
|
-
return
|
|
252
|
+
}, ft.jsxs = function(h, u, O) {
|
|
253
|
+
var T = 1e4 > B.recentlyCreatedOwnerStacks++;
|
|
254
|
+
return v(
|
|
255
255
|
h,
|
|
256
|
-
|
|
257
|
-
|
|
256
|
+
u,
|
|
257
|
+
O,
|
|
258
258
|
!0,
|
|
259
|
-
|
|
260
|
-
|
|
259
|
+
T ? Error("react-stack-top-frame") : $,
|
|
260
|
+
T ? pe(r(h)) : G
|
|
261
261
|
);
|
|
262
262
|
};
|
|
263
263
|
})()), ft;
|
|
264
264
|
}
|
|
265
|
-
var
|
|
265
|
+
var kn;
|
|
266
266
|
function Ai() {
|
|
267
|
-
return
|
|
267
|
+
return kn || (kn = 1, process.env.NODE_ENV === "production" ? Dt.exports = Ri() : Dt.exports = Ei()), Dt.exports;
|
|
268
268
|
}
|
|
269
269
|
var i = Ai();
|
|
270
|
-
function
|
|
270
|
+
function fr(e) {
|
|
271
271
|
var t, n, r = "";
|
|
272
272
|
if (typeof e == "string" || typeof e == "number") r += e;
|
|
273
273
|
else if (typeof e == "object") if (Array.isArray(e)) {
|
|
274
274
|
var o = e.length;
|
|
275
|
-
for (t = 0; t < o; t++) e[t] && (n =
|
|
275
|
+
for (t = 0; t < o; t++) e[t] && (n = fr(e[t])) && (r && (r += " "), r += n);
|
|
276
276
|
} else for (n in e) e[n] && (r && (r += " "), r += n);
|
|
277
277
|
return r;
|
|
278
278
|
}
|
|
279
279
|
function Ti() {
|
|
280
|
-
for (var e, t, n = 0, r = "", o = arguments.length; n < o; n++) (e = arguments[n]) && (t =
|
|
280
|
+
for (var e, t, n = 0, r = "", o = arguments.length; n < o; n++) (e = arguments[n]) && (t = fr(e)) && (r && (r += " "), r += t);
|
|
281
281
|
return r;
|
|
282
282
|
}
|
|
283
|
-
const
|
|
283
|
+
const Vn = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, Mn = Ti, et = (e, t) => (n) => {
|
|
284
284
|
var r;
|
|
285
|
-
if (t?.variants == null) return
|
|
285
|
+
if (t?.variants == null) return Mn(e, n?.class, n?.className);
|
|
286
286
|
const { variants: o, defaultVariants: s } = t, l = Object.keys(o).map((p) => {
|
|
287
|
-
const
|
|
288
|
-
if (
|
|
289
|
-
const
|
|
290
|
-
return o[p][
|
|
291
|
-
}), a = n && Object.entries(n).reduce((p,
|
|
292
|
-
let [c,
|
|
293
|
-
return
|
|
294
|
-
}, {}),
|
|
295
|
-
let { class: c, className:
|
|
296
|
-
return Object.entries(
|
|
287
|
+
const v = n?.[p], c = s?.[p];
|
|
288
|
+
if (v === null) return null;
|
|
289
|
+
const w = Vn(v) || Vn(c);
|
|
290
|
+
return o[p][w];
|
|
291
|
+
}), a = n && Object.entries(n).reduce((p, v) => {
|
|
292
|
+
let [c, w] = v;
|
|
293
|
+
return w === void 0 || (p[c] = w), p;
|
|
294
|
+
}, {}), d = t == null || (r = t.compoundVariants) === null || r === void 0 ? void 0 : r.reduce((p, v) => {
|
|
295
|
+
let { class: c, className: w, ...b } = v;
|
|
296
|
+
return Object.entries(b).every((S) => {
|
|
297
297
|
let [f, j] = S;
|
|
298
298
|
return Array.isArray(j) ? j.includes({
|
|
299
299
|
...s,
|
|
@@ -305,10 +305,10 @@ const kn = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, Vn = Ti, e
|
|
|
305
305
|
}) ? [
|
|
306
306
|
...p,
|
|
307
307
|
c,
|
|
308
|
-
|
|
308
|
+
w
|
|
309
309
|
] : p;
|
|
310
310
|
}, []);
|
|
311
|
-
return
|
|
311
|
+
return Mn(e, l, d, n?.class, n?.className);
|
|
312
312
|
}, Fi = {
|
|
313
313
|
list: "List",
|
|
314
314
|
detail: "Detail",
|
|
@@ -323,7 +323,7 @@ const kn = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, Vn = Ti, e
|
|
|
323
323
|
list: pi,
|
|
324
324
|
detail: fi,
|
|
325
325
|
grid: ui,
|
|
326
|
-
kanban:
|
|
326
|
+
kanban: ur,
|
|
327
327
|
calendar: rn,
|
|
328
328
|
timeline: di,
|
|
329
329
|
map: ci,
|
|
@@ -378,7 +378,7 @@ function Pi(e) {
|
|
|
378
378
|
const Li = {
|
|
379
379
|
Home: "House"
|
|
380
380
|
};
|
|
381
|
-
function
|
|
381
|
+
function pr(e) {
|
|
382
382
|
if (!e) return null;
|
|
383
383
|
const t = Pi(e), n = Li[t] || t;
|
|
384
384
|
return si[n] || null;
|
|
@@ -386,23 +386,23 @@ function fr(e) {
|
|
|
386
386
|
function qt(e) {
|
|
387
387
|
return e.label ? e.label : Fi[e.type] || e.type;
|
|
388
388
|
}
|
|
389
|
-
function
|
|
390
|
-
return e.icon ?
|
|
389
|
+
function Pn(e) {
|
|
390
|
+
return e.icon ? pr(e.icon) : Oi[e.type] || null;
|
|
391
391
|
}
|
|
392
392
|
function _i(e) {
|
|
393
393
|
return e.activeView ? e.activeView : e.defaultView ? e.defaultView : e.views?.[0]?.type;
|
|
394
394
|
}
|
|
395
|
-
const
|
|
395
|
+
const Ln = {
|
|
396
396
|
share: Mt,
|
|
397
397
|
settings: oi,
|
|
398
398
|
duplicate: un,
|
|
399
|
-
delete:
|
|
399
|
+
delete: dr
|
|
400
400
|
}, $i = {
|
|
401
401
|
share: "Share",
|
|
402
402
|
settings: "Settings",
|
|
403
403
|
duplicate: "Duplicate",
|
|
404
404
|
delete: "Delete"
|
|
405
|
-
},
|
|
405
|
+
}, hr = ({
|
|
406
406
|
schema: e,
|
|
407
407
|
className: t,
|
|
408
408
|
onViewChange: n,
|
|
@@ -411,8 +411,8 @@ const Pn = {
|
|
|
411
411
|
createViewLabel: s = "Create view",
|
|
412
412
|
...l
|
|
413
413
|
}) => {
|
|
414
|
-
const a =
|
|
415
|
-
|
|
414
|
+
const a = Q.useMemo(() => e.storageKey ? e.storageKey : `view-switcher${e.id ? `-${e.id}` : ""}`, [e.id, e.storageKey]), [d, p] = Q.useState(() => _i(e));
|
|
415
|
+
Q.useEffect(() => {
|
|
416
416
|
if (e.activeView) {
|
|
417
417
|
p(e.activeView);
|
|
418
418
|
return;
|
|
@@ -421,42 +421,42 @@ const Pn = {
|
|
|
421
421
|
try {
|
|
422
422
|
const x = localStorage.getItem(a);
|
|
423
423
|
if (x) {
|
|
424
|
-
const
|
|
425
|
-
|
|
424
|
+
const R = e.views.find((I) => I.type === x)?.type;
|
|
425
|
+
R && p(R);
|
|
426
426
|
}
|
|
427
427
|
} catch {
|
|
428
428
|
}
|
|
429
|
-
}, [e.activeView, e.persistPreference, e.views, a]),
|
|
430
|
-
if (!(!e.persistPreference || !
|
|
429
|
+
}, [e.activeView, e.persistPreference, e.views, a]), Q.useEffect(() => {
|
|
430
|
+
if (!(!e.persistPreference || !d || e.activeView))
|
|
431
431
|
try {
|
|
432
|
-
localStorage.setItem(a,
|
|
432
|
+
localStorage.setItem(a, d);
|
|
433
433
|
} catch {
|
|
434
434
|
}
|
|
435
|
-
}, [
|
|
436
|
-
const
|
|
435
|
+
}, [d, e.activeView, e.persistPreference, a]);
|
|
436
|
+
const v = Q.useCallback((x) => {
|
|
437
437
|
n?.(x), e.onViewChange && typeof window < "u" && window.dispatchEvent(
|
|
438
438
|
new CustomEvent(e.onViewChange, {
|
|
439
439
|
detail: { view: x }
|
|
440
440
|
})
|
|
441
441
|
);
|
|
442
|
-
}, [n, e.onViewChange]), c =
|
|
443
|
-
p(x),
|
|
444
|
-
}, [
|
|
445
|
-
const I = x.icon &&
|
|
442
|
+
}, [n, e.onViewChange]), c = Q.useCallback((x) => {
|
|
443
|
+
p(x), v(x);
|
|
444
|
+
}, [v]), w = d || e.views?.[0]?.type, b = w || "", S = e.views.find((x) => x.type === w) || e.views?.[0], f = e.variant || "tabs", j = e.position || "top", N = j === "left" || j === "right", m = N ? "vertical" : "horizontal", C = e.viewActions && e.viewActions.length > 0 ? /* @__PURE__ */ i.jsx("div", { className: "flex items-center gap-1", children: e.viewActions.map((x, R) => {
|
|
445
|
+
const I = x.icon && pr(x.icon) || Ln[x.type];
|
|
446
446
|
return /* @__PURE__ */ i.jsx(
|
|
447
|
-
|
|
447
|
+
Ce,
|
|
448
448
|
{
|
|
449
449
|
type: "button",
|
|
450
450
|
variant: "ghost",
|
|
451
451
|
size: "icon-sm",
|
|
452
|
-
onClick: () => o?.(x.type,
|
|
452
|
+
onClick: () => o?.(x.type, w),
|
|
453
453
|
title: $i[x.type] || x.type,
|
|
454
454
|
children: I ? /* @__PURE__ */ i.jsx(I, { className: "h-3.5 w-3.5" }) : null
|
|
455
455
|
},
|
|
456
|
-
`action-${x.type}-${
|
|
456
|
+
`action-${x.type}-${R}`
|
|
457
457
|
);
|
|
458
|
-
}) }) : null,
|
|
459
|
-
|
|
458
|
+
}) }) : null, A = e.allowCreateView ? /* @__PURE__ */ i.jsx(
|
|
459
|
+
Ce,
|
|
460
460
|
{
|
|
461
461
|
type: "button",
|
|
462
462
|
variant: "ghost",
|
|
@@ -465,57 +465,57 @@ const Pn = {
|
|
|
465
465
|
title: s,
|
|
466
466
|
children: /* @__PURE__ */ i.jsx(fn, { className: "h-3.5 w-3.5" })
|
|
467
467
|
}
|
|
468
|
-
) : null,
|
|
469
|
-
f === "dropdown" && /* @__PURE__ */ i.jsxs(Ot, { value:
|
|
470
|
-
/* @__PURE__ */ i.jsx(It, { className:
|
|
471
|
-
/* @__PURE__ */ i.jsx(Vt, { children: e.views.map((x,
|
|
468
|
+
) : null, F = /* @__PURE__ */ i.jsxs("div", { className: re(ki({ orientation: m }), "flex items-center gap-1"), children: [
|
|
469
|
+
f === "dropdown" && /* @__PURE__ */ i.jsxs(Ot, { value: b, onValueChange: (x) => c(x), children: [
|
|
470
|
+
/* @__PURE__ */ i.jsx(It, { className: re("w-full", N ? "h-10" : "h-9"), children: /* @__PURE__ */ i.jsx(kt, { placeholder: "Select view" }) }),
|
|
471
|
+
/* @__PURE__ */ i.jsx(Vt, { children: e.views.map((x, R) => /* @__PURE__ */ i.jsx(pt, { value: x.type, children: qt(x) }, `${x.type}-${R}`)) })
|
|
472
472
|
] }),
|
|
473
|
-
f === "buttons" && /* @__PURE__ */ i.jsx("div", { className:
|
|
474
|
-
const I = x.type ===
|
|
473
|
+
f === "buttons" && /* @__PURE__ */ i.jsx("div", { className: re(Vi({ orientation: m })), children: e.views.map((x, R) => {
|
|
474
|
+
const I = x.type === w, M = Pn(x);
|
|
475
475
|
return /* @__PURE__ */ i.jsxs(
|
|
476
|
-
|
|
476
|
+
Ce,
|
|
477
477
|
{
|
|
478
478
|
type: "button",
|
|
479
479
|
size: "sm",
|
|
480
480
|
variant: I ? "secondary" : "ghost",
|
|
481
|
-
className:
|
|
481
|
+
className: re("justify-start gap-2", N ? "w-full" : ""),
|
|
482
482
|
onClick: () => c(x.type),
|
|
483
483
|
children: [
|
|
484
484
|
M ? /* @__PURE__ */ i.jsx(M, { className: "h-4 w-4" }) : null,
|
|
485
485
|
/* @__PURE__ */ i.jsx("span", { children: qt(x) })
|
|
486
486
|
]
|
|
487
487
|
},
|
|
488
|
-
`${x.type}-${
|
|
488
|
+
`${x.type}-${R}`
|
|
489
489
|
);
|
|
490
490
|
}) }),
|
|
491
|
-
f === "tabs" && /* @__PURE__ */ i.jsx(
|
|
492
|
-
const I =
|
|
491
|
+
f === "tabs" && /* @__PURE__ */ i.jsx(Zn, { value: b, onValueChange: (x) => c(x), children: /* @__PURE__ */ i.jsx(er, { className: re(Mi({ orientation: m })), children: e.views.map((x, R) => {
|
|
492
|
+
const I = Pn(x);
|
|
493
493
|
return /* @__PURE__ */ i.jsxs(
|
|
494
|
-
|
|
494
|
+
tr,
|
|
495
495
|
{
|
|
496
496
|
value: x.type,
|
|
497
|
-
className:
|
|
497
|
+
className: re("gap-2", N ? "justify-start" : ""),
|
|
498
498
|
children: [
|
|
499
499
|
I ? /* @__PURE__ */ i.jsx(I, { className: "h-4 w-4" }) : null,
|
|
500
500
|
/* @__PURE__ */ i.jsx("span", { children: qt(x) })
|
|
501
501
|
]
|
|
502
502
|
},
|
|
503
|
-
`${x.type}-${
|
|
503
|
+
`${x.type}-${R}`
|
|
504
504
|
);
|
|
505
505
|
}) }) }),
|
|
506
506
|
C,
|
|
507
|
-
|
|
508
|
-
] }),
|
|
507
|
+
A
|
|
508
|
+
] }), k = S?.schema ? Array.isArray(S.schema) ? /* @__PURE__ */ i.jsx("div", { className: "space-y-4", children: S.schema.map((x, R) => /* @__PURE__ */ i.jsx(Fn, { schema: x, ...l }, `${S.type}-${R}`)) }) : /* @__PURE__ */ i.jsx(Fn, { schema: S.schema, ...l }) : null;
|
|
509
509
|
return /* @__PURE__ */ i.jsxs(
|
|
510
510
|
"div",
|
|
511
511
|
{
|
|
512
|
-
className:
|
|
512
|
+
className: re(
|
|
513
513
|
Ii({ position: j }),
|
|
514
514
|
t
|
|
515
515
|
),
|
|
516
516
|
children: [
|
|
517
|
-
/* @__PURE__ */ i.jsx("div", { className:
|
|
518
|
-
/* @__PURE__ */ i.jsx("div", { className: "flex-1 min-w-0", children:
|
|
517
|
+
/* @__PURE__ */ i.jsx("div", { className: re("shrink-0", N ? "flex flex-col" : "flex"), children: F }),
|
|
518
|
+
/* @__PURE__ */ i.jsx("div", { className: "flex-1 min-w-0", children: k })
|
|
519
519
|
]
|
|
520
520
|
}
|
|
521
521
|
);
|
|
@@ -534,44 +534,44 @@ const zi = ({
|
|
|
534
534
|
onViewChange: s,
|
|
535
535
|
onRowClick: l,
|
|
536
536
|
onEdit: a,
|
|
537
|
-
renderListView:
|
|
537
|
+
renderListView: d,
|
|
538
538
|
toolbarAddon: p,
|
|
539
|
-
onCreateView:
|
|
539
|
+
onCreateView: v,
|
|
540
540
|
onViewAction: c
|
|
541
541
|
}) => {
|
|
542
|
-
const [
|
|
543
|
-
|
|
542
|
+
const [w, b] = ee(null), [S, f] = ee(!1), [j, N] = ee("create"), [m, C] = ee(null), [A, F] = ee(0), [k, x] = ee([]), [R, I] = ee(!1), [M, _] = ee({}), [B, ie] = ee([]), Z = e.listViews, pe = Z != null && Object.keys(Z).length > 0, [he, ne] = ee(() => e.defaultListView && Z?.[e.defaultListView] ? e.defaultListView : Z && Object.keys(Z)[0] || ""), $ = V(() => !pe || !he ? null : Z[he] || null, [pe, he, Z]), G = V(() => r && r.length > 0 ? r : null, [r]), Ne = G != null && G.length > 0, h = o || G?.[0]?.id, u = G?.find((y) => y.id === h) || G?.[0], O = V(() => $?.type ? $.type : u?.type ? u.type : e.defaultViewType || "grid", [$, u, e.defaultViewType]), T = e.navigation;
|
|
543
|
+
W(() => {
|
|
544
544
|
let y = !0;
|
|
545
545
|
const D = async () => {
|
|
546
546
|
try {
|
|
547
|
-
const
|
|
548
|
-
y &&
|
|
549
|
-
} catch (
|
|
550
|
-
console.error("Failed to fetch object schema:",
|
|
547
|
+
const E = await t.getObjectSchema(e.objectName);
|
|
548
|
+
y && b(E);
|
|
549
|
+
} catch (E) {
|
|
550
|
+
console.error("Failed to fetch object schema:", E);
|
|
551
551
|
}
|
|
552
552
|
};
|
|
553
553
|
return e.objectName && t && D(), () => {
|
|
554
554
|
y = !1;
|
|
555
555
|
};
|
|
556
|
-
}, [e.objectName, t]),
|
|
556
|
+
}, [e.objectName, t]), W(() => {
|
|
557
557
|
let y = !0;
|
|
558
558
|
return (async () => {
|
|
559
|
-
if (!(
|
|
559
|
+
if (!(O === "grid" && !d) && !(!t || !e.objectName)) {
|
|
560
560
|
I(!0);
|
|
561
561
|
try {
|
|
562
|
-
const
|
|
562
|
+
const E = $?.filter || u?.filter || e.table?.defaultFilters || [], we = Object.entries(M).filter(([, P]) => P !== void 0 && P !== "" && P !== null).map(([P, je]) => [P, "=", je]);
|
|
563
563
|
let ae = [];
|
|
564
|
-
|
|
565
|
-
const
|
|
564
|
+
E.length > 0 && we.length > 0 ? ae = ["and", ...E, ...we] : we.length === 1 ? ae = we[0] : we.length > 1 ? ae = ["and", ...we] : ae = E;
|
|
565
|
+
const ye = B.length > 0 ? B.map((P) => ({ field: P.field, order: P.direction })) : $?.sort || u?.sort || e.table?.defaultSort || void 0, le = _r(w?.fields), me = await t.find(e.objectName, {
|
|
566
566
|
$filter: ae.length > 0 ? ae : void 0,
|
|
567
|
-
$orderby:
|
|
567
|
+
$orderby: ye,
|
|
568
568
|
$top: 100,
|
|
569
|
-
...
|
|
569
|
+
...le.length > 0 ? { $expand: le } : {}
|
|
570
570
|
});
|
|
571
|
-
let
|
|
572
|
-
Array.isArray(
|
|
573
|
-
} catch (
|
|
574
|
-
console.error("ObjectView data fetch error:",
|
|
571
|
+
let J = [];
|
|
572
|
+
Array.isArray(me) ? J = me : me && typeof me == "object" && (Array.isArray(me.data) ? J = me.data : Array.isArray(me.records) && (J = me.records)), y && x(J);
|
|
573
|
+
} catch (E) {
|
|
574
|
+
console.error("ObjectView data fetch error:", E);
|
|
575
575
|
} finally {
|
|
576
576
|
y && I(!1);
|
|
577
577
|
}
|
|
@@ -579,83 +579,83 @@ const zi = ({
|
|
|
579
579
|
})(), () => {
|
|
580
580
|
y = !1;
|
|
581
581
|
};
|
|
582
|
-
}, [e.objectName, t,
|
|
583
|
-
const
|
|
582
|
+
}, [e.objectName, t, O, M, B, A, $, u, d, w]);
|
|
583
|
+
const ce = e.layout || "drawer", Y = e.operations || e.table?.operations || {
|
|
584
584
|
create: !0,
|
|
585
585
|
read: !0,
|
|
586
586
|
update: !0,
|
|
587
587
|
delete: !0
|
|
588
|
-
},
|
|
589
|
-
|
|
590
|
-
}, [
|
|
588
|
+
}, H = L(() => {
|
|
589
|
+
ce === "page" && e.onNavigate ? e.onNavigate("new", "edit") : (N("create"), C(null), f(!0));
|
|
590
|
+
}, [ce, e]), de = L((y) => {
|
|
591
591
|
if (a) {
|
|
592
592
|
a(y);
|
|
593
593
|
return;
|
|
594
594
|
}
|
|
595
|
-
if (
|
|
595
|
+
if (ce === "page" && e.onNavigate) {
|
|
596
596
|
const D = y._id || y.id;
|
|
597
597
|
e.onNavigate(D, "edit");
|
|
598
598
|
} else
|
|
599
599
|
N("edit"), C(y), f(!0);
|
|
600
|
-
}, [
|
|
601
|
-
if (
|
|
600
|
+
}, [ce, e, a]), ue = L((y) => {
|
|
601
|
+
if (ce === "page" && e.onNavigate) {
|
|
602
602
|
const D = y._id || y.id;
|
|
603
603
|
e.onNavigate(D, "view");
|
|
604
604
|
} else
|
|
605
605
|
N("view"), C(y), f(!0);
|
|
606
|
-
}, [
|
|
606
|
+
}, [ce, e]), g = L((y) => {
|
|
607
607
|
if (l) {
|
|
608
608
|
l(y);
|
|
609
609
|
return;
|
|
610
610
|
}
|
|
611
|
-
if (
|
|
612
|
-
if (
|
|
611
|
+
if (T) {
|
|
612
|
+
if (T.mode === "none" || T.preventNavigation)
|
|
613
613
|
return;
|
|
614
|
-
if (
|
|
615
|
-
const D = y._id || y.id,
|
|
616
|
-
window.open(
|
|
614
|
+
if (T.mode === "new_window" || T.openNewTab) {
|
|
615
|
+
const D = y._id || y.id, E = `/${e.objectName}/${D}`;
|
|
616
|
+
window.open(E, "_blank");
|
|
617
617
|
return;
|
|
618
618
|
}
|
|
619
|
-
if (
|
|
619
|
+
if (T.mode === "drawer") {
|
|
620
620
|
N("view"), C(y), f(!0);
|
|
621
621
|
return;
|
|
622
622
|
}
|
|
623
|
-
if (
|
|
623
|
+
if (T.mode === "modal") {
|
|
624
624
|
N("view"), C(y), f(!0);
|
|
625
625
|
return;
|
|
626
626
|
}
|
|
627
|
-
if (
|
|
627
|
+
if (T.mode === "page") {
|
|
628
628
|
const D = y._id || y.id;
|
|
629
629
|
e.onNavigate && e.onNavigate(D, "view");
|
|
630
630
|
return;
|
|
631
631
|
}
|
|
632
|
-
if (
|
|
632
|
+
if (T.mode === "split" || T.mode === "popover") {
|
|
633
633
|
N("view"), C(y), f(!0);
|
|
634
634
|
return;
|
|
635
635
|
}
|
|
636
636
|
}
|
|
637
|
-
|
|
638
|
-
}, [l,
|
|
639
|
-
|
|
640
|
-
}, []), K =
|
|
641
|
-
|
|
642
|
-
}, []),
|
|
643
|
-
f(!1), C(null),
|
|
644
|
-
}, []),
|
|
637
|
+
Y.read !== !1 && ue(y);
|
|
638
|
+
}, [l, T, Y.read, ue, e]), te = L((y) => {
|
|
639
|
+
F((D) => D + 1);
|
|
640
|
+
}, []), K = L((y) => {
|
|
641
|
+
F((D) => D + 1);
|
|
642
|
+
}, []), oe = L(() => {
|
|
643
|
+
f(!1), C(null), F((y) => y + 1);
|
|
644
|
+
}, []), U = L(() => {
|
|
645
645
|
f(!1), C(null);
|
|
646
646
|
}, []);
|
|
647
|
-
|
|
648
|
-
|
|
647
|
+
L(() => {
|
|
648
|
+
F((y) => y + 1);
|
|
649
649
|
}, []);
|
|
650
|
-
const
|
|
650
|
+
const De = V(() => !Ne || !G || G.length <= 1 ? null : {
|
|
651
651
|
type: "view-switcher",
|
|
652
652
|
variant: "tabs",
|
|
653
653
|
position: "top",
|
|
654
654
|
persistPreference: !0,
|
|
655
655
|
storageKey: `view-pref-${e.objectName}`,
|
|
656
|
-
defaultView:
|
|
657
|
-
activeView:
|
|
658
|
-
views:
|
|
656
|
+
defaultView: u?.type || "grid",
|
|
657
|
+
activeView: u?.type || "grid",
|
|
658
|
+
views: G.map((y) => {
|
|
659
659
|
const D = {
|
|
660
660
|
kanban: "kanban",
|
|
661
661
|
calendar: "calendar",
|
|
@@ -675,26 +675,28 @@ const zi = ({
|
|
|
675
675
|
}),
|
|
676
676
|
allowCreateView: e.allowCreateView,
|
|
677
677
|
viewActions: e.viewActions
|
|
678
|
-
}, [
|
|
679
|
-
if (!
|
|
680
|
-
const D =
|
|
678
|
+
}, [Ne, G, u, e.objectName, e.allowCreateView, e.viewActions]), be = L((y) => {
|
|
679
|
+
if (!G) return;
|
|
680
|
+
const D = G.find((E) => E.type === y);
|
|
681
681
|
D && s && s(D.id);
|
|
682
|
-
}, [
|
|
682
|
+
}, [G, s]), it = L((y) => {
|
|
683
683
|
ne(y);
|
|
684
684
|
}, []);
|
|
685
|
-
|
|
685
|
+
V(() => {
|
|
686
686
|
if (e.showFilters === !1) return null;
|
|
687
|
-
const y = e.filterableFields, D =
|
|
688
|
-
const
|
|
689
|
-
let
|
|
690
|
-
return
|
|
691
|
-
(
|
|
687
|
+
const y = e.filterableFields, D = w?.fields || {}, we = (y ? y.map((ae) => [ae, D[ae] || { label: ae }]) : Object.entries(D).filter(([, ae]) => !ae.hidden).slice(0, 8)).map(([ae, ye]) => {
|
|
688
|
+
const le = ye.type || "text";
|
|
689
|
+
let me = "text", J;
|
|
690
|
+
return le === "number" || le === "currency" || le === "percent" ? me = "number" : le === "boolean" || le === "toggle" ? me = "boolean" : le === "date" || le === "datetime" ? me = "date" : le === "select" || le === "status" || ye.options ? (me = "select", J = (ye.options || []).map(
|
|
691
|
+
(P) => typeof P == "string" ? { label: P, value: P } : { label: P.label, value: P.value }
|
|
692
|
+
)) : (le === "lookup" || le === "master_detail" || le === "user" || le === "owner") && ye.options && ye.options.length > 0 && (me = "multi-select", J = (ye.options || []).map(
|
|
693
|
+
(P) => typeof P == "string" ? { label: P, value: P } : { label: P.label, value: P.value }
|
|
692
694
|
)), {
|
|
693
695
|
field: ae,
|
|
694
|
-
label:
|
|
695
|
-
type:
|
|
696
|
-
placeholder: `Filter ${
|
|
697
|
-
...
|
|
696
|
+
label: ye.label || ae,
|
|
697
|
+
type: me,
|
|
698
|
+
placeholder: `Filter ${ye.label || ae}...`,
|
|
699
|
+
...J ? { options: J } : {}
|
|
698
700
|
};
|
|
699
701
|
});
|
|
700
702
|
return we.length === 0 ? null : {
|
|
@@ -705,31 +707,31 @@ const zi = ({
|
|
|
705
707
|
filters: we,
|
|
706
708
|
values: M
|
|
707
709
|
};
|
|
708
|
-
}, [e.showFilters, e.filterableFields,
|
|
710
|
+
}, [e.showFilters, e.filterableFields, w, M]);
|
|
709
711
|
const He = e.showSort;
|
|
710
|
-
|
|
712
|
+
V(() => {
|
|
711
713
|
if (He === !1) return null;
|
|
712
|
-
const y =
|
|
714
|
+
const y = w?.fields || {}, D = Object.entries(y).filter(([, E]) => !E.hidden).slice(0, 10).map(([E, we]) => ({ field: E, label: we.label || E }));
|
|
713
715
|
return D.length === 0 ? null : {
|
|
714
716
|
type: "sort-ui",
|
|
715
717
|
variant: "dropdown",
|
|
716
718
|
multiple: !1,
|
|
717
719
|
fields: D,
|
|
718
|
-
sort:
|
|
720
|
+
sort: B
|
|
719
721
|
};
|
|
720
|
-
}, [
|
|
721
|
-
const _e =
|
|
722
|
+
}, [w, B, He]);
|
|
723
|
+
const _e = L((y) => {
|
|
722
724
|
const D = {
|
|
723
725
|
objectName: e.objectName,
|
|
724
|
-
fields:
|
|
726
|
+
fields: $?.columns || u?.columns || e.table?.fields,
|
|
725
727
|
className: "h-full w-full",
|
|
726
|
-
showSearch:
|
|
727
|
-
showSort:
|
|
728
|
-
showFilters:
|
|
729
|
-
striped:
|
|
730
|
-
bordered:
|
|
731
|
-
color:
|
|
732
|
-
},
|
|
728
|
+
showSearch: u?.showSearch ?? e.showSearch ?? !1,
|
|
729
|
+
showSort: u?.showSort ?? e.showSort ?? !1,
|
|
730
|
+
showFilters: u?.showFilters ?? e.showFilters ?? !1,
|
|
731
|
+
striped: u?.striped ?? !1,
|
|
732
|
+
bordered: u?.bordered ?? !1,
|
|
733
|
+
color: u?.color
|
|
734
|
+
}, E = $?.options || u || {};
|
|
733
735
|
if (process.env.NODE_ENV === "development") {
|
|
734
736
|
const we = [
|
|
735
737
|
"startDateField",
|
|
@@ -745,9 +747,9 @@ const zi = ({
|
|
|
745
747
|
"subtitleField",
|
|
746
748
|
"latitudeField",
|
|
747
749
|
"longitudeField"
|
|
748
|
-
], ae =
|
|
749
|
-
|
|
750
|
-
`[Spec Compliance] View options use flat properties ${JSON.stringify(
|
|
750
|
+
], ae = E[y] || {}, ye = we.filter((le) => le in E && !(le in ae));
|
|
751
|
+
ye.length > 0 && console.warn(
|
|
752
|
+
`[Spec Compliance] View options use flat properties ${JSON.stringify(ye)}. Move them under options.${y} per @objectstack/spec protocol.`
|
|
751
753
|
);
|
|
752
754
|
}
|
|
753
755
|
switch (y) {
|
|
@@ -755,79 +757,79 @@ const zi = ({
|
|
|
755
757
|
return {
|
|
756
758
|
type: "object-kanban",
|
|
757
759
|
...D,
|
|
758
|
-
groupBy:
|
|
759
|
-
groupField:
|
|
760
|
-
titleField:
|
|
760
|
+
groupBy: E.kanban?.groupField || "status",
|
|
761
|
+
groupField: E.kanban?.groupField || "status",
|
|
762
|
+
titleField: E.kanban?.titleField || "name",
|
|
761
763
|
cardFields: D.fields || [],
|
|
762
|
-
...
|
|
764
|
+
...E.kanban || {}
|
|
763
765
|
};
|
|
764
766
|
case "calendar":
|
|
765
767
|
return {
|
|
766
768
|
type: "object-calendar",
|
|
767
769
|
...D,
|
|
768
|
-
startDateField:
|
|
769
|
-
endDateField:
|
|
770
|
-
titleField:
|
|
771
|
-
...
|
|
770
|
+
startDateField: E.calendar?.startDateField || "start_date",
|
|
771
|
+
endDateField: E.calendar?.endDateField || "end_date",
|
|
772
|
+
titleField: E.calendar?.titleField || "name",
|
|
773
|
+
...E.calendar || {}
|
|
772
774
|
};
|
|
773
775
|
case "gallery":
|
|
774
776
|
return {
|
|
775
777
|
type: "object-gallery",
|
|
776
778
|
...D,
|
|
777
|
-
imageField:
|
|
778
|
-
titleField:
|
|
779
|
-
subtitleField:
|
|
780
|
-
...
|
|
779
|
+
imageField: E.gallery?.imageField,
|
|
780
|
+
titleField: E.gallery?.titleField || "name",
|
|
781
|
+
subtitleField: E.gallery?.subtitleField,
|
|
782
|
+
...E.gallery || {}
|
|
781
783
|
};
|
|
782
784
|
case "timeline":
|
|
783
785
|
return {
|
|
784
786
|
type: "object-timeline",
|
|
785
787
|
...D,
|
|
786
|
-
dateField:
|
|
787
|
-
titleField:
|
|
788
|
-
...
|
|
788
|
+
dateField: E.timeline?.dateField || "created_at",
|
|
789
|
+
titleField: E.timeline?.titleField || "name",
|
|
790
|
+
...E.timeline || {}
|
|
789
791
|
};
|
|
790
792
|
case "gantt":
|
|
791
793
|
return {
|
|
792
794
|
type: "object-gantt",
|
|
793
795
|
...D,
|
|
794
|
-
startDateField:
|
|
795
|
-
endDateField:
|
|
796
|
-
progressField:
|
|
797
|
-
dependenciesField:
|
|
798
|
-
...
|
|
796
|
+
startDateField: E.gantt?.startDateField || "start_date",
|
|
797
|
+
endDateField: E.gantt?.endDateField || "end_date",
|
|
798
|
+
progressField: E.gantt?.progressField || "progress",
|
|
799
|
+
dependenciesField: E.gantt?.dependenciesField || "dependencies",
|
|
800
|
+
...E.gantt || {}
|
|
799
801
|
};
|
|
800
802
|
case "map":
|
|
801
803
|
return {
|
|
802
804
|
type: "object-map",
|
|
803
805
|
...D,
|
|
804
|
-
locationField:
|
|
805
|
-
...
|
|
806
|
+
locationField: E.map?.locationField || "location",
|
|
807
|
+
...E.map || {}
|
|
806
808
|
};
|
|
807
809
|
default:
|
|
808
810
|
return null;
|
|
809
811
|
}
|
|
810
|
-
}, [e.objectName, e.table?.fields,
|
|
812
|
+
}, [e.objectName, e.table?.fields, $, u]), Re = V(() => ({
|
|
811
813
|
type: "object-grid",
|
|
812
814
|
objectName: e.objectName,
|
|
813
815
|
title: e.table?.title,
|
|
814
816
|
description: e.table?.description,
|
|
815
|
-
fields:
|
|
816
|
-
columns:
|
|
817
|
+
fields: $?.columns || u?.columns || e.table?.fields,
|
|
818
|
+
columns: $?.columns || u?.columns || e.table?.columns,
|
|
817
819
|
operations: {
|
|
818
|
-
...
|
|
820
|
+
...Y,
|
|
819
821
|
create: !1
|
|
820
822
|
// Create is handled by the view's create button
|
|
821
823
|
},
|
|
822
|
-
defaultFilters:
|
|
823
|
-
defaultSort:
|
|
824
|
+
defaultFilters: $?.filter || u?.filter || e.table?.defaultFilters,
|
|
825
|
+
defaultSort: $?.sort || u?.sort || e.table?.defaultSort,
|
|
824
826
|
pageSize: e.table?.pageSize,
|
|
825
827
|
selectable: e.table?.selectable,
|
|
826
|
-
striped:
|
|
827
|
-
bordered:
|
|
828
|
+
striped: u?.striped ?? e.table?.striped,
|
|
829
|
+
bordered: u?.bordered ?? e.table?.bordered,
|
|
828
830
|
className: e.table?.className
|
|
829
|
-
}), [e,
|
|
830
|
-
const y =
|
|
831
|
+
}), [e, Y, $, u]), se = () => {
|
|
832
|
+
const y = m ? m._id || m.id : void 0;
|
|
831
833
|
return {
|
|
832
834
|
type: "object-form",
|
|
833
835
|
objectName: e.objectName,
|
|
@@ -848,12 +850,12 @@ const zi = ({
|
|
|
848
850
|
initialValues: e.form?.initialValues,
|
|
849
851
|
readOnly: e.form?.readOnly || j === "view",
|
|
850
852
|
className: e.form?.className,
|
|
851
|
-
onSuccess:
|
|
852
|
-
onCancel:
|
|
853
|
+
onSuccess: oe,
|
|
854
|
+
onCancel: U
|
|
853
855
|
};
|
|
854
|
-
},
|
|
856
|
+
}, X = () => {
|
|
855
857
|
if (e.form?.title) return e.form.title;
|
|
856
|
-
const y =
|
|
858
|
+
const y = w?.label || e.objectName;
|
|
857
859
|
switch (j) {
|
|
858
860
|
case "create":
|
|
859
861
|
return `Create ${y}`;
|
|
@@ -864,168 +866,168 @@ const zi = ({
|
|
|
864
866
|
default:
|
|
865
867
|
return y;
|
|
866
868
|
}
|
|
867
|
-
}, Pe =
|
|
868
|
-
const y =
|
|
869
|
+
}, Pe = V(() => {
|
|
870
|
+
const y = T?.width;
|
|
869
871
|
return y ? typeof y == "number" ? `max-w-[${y}px]` : `max-w-[${y}]` : "";
|
|
870
|
-
}, [
|
|
871
|
-
/* @__PURE__ */ i.jsxs(
|
|
872
|
-
/* @__PURE__ */ i.jsx(
|
|
873
|
-
e.form?.description && /* @__PURE__ */ i.jsx(
|
|
872
|
+
}, [T]), Je = () => /* @__PURE__ */ i.jsx(nr, { open: S, onOpenChange: f, direction: "right", children: /* @__PURE__ */ i.jsxs(rr, { className: re("w-full sm:max-w-2xl", Pe), children: [
|
|
873
|
+
/* @__PURE__ */ i.jsxs(ir, { children: [
|
|
874
|
+
/* @__PURE__ */ i.jsx(or, { children: X() }),
|
|
875
|
+
e.form?.description && /* @__PURE__ */ i.jsx(sr, { children: e.form.description })
|
|
874
876
|
] }),
|
|
875
877
|
/* @__PURE__ */ i.jsx("div", { className: "flex-1 overflow-y-auto px-4 pb-4", children: /* @__PURE__ */ i.jsx(Gt, { schema: se(), dataSource: t }) })
|
|
876
|
-
] }) }), ot = () => /* @__PURE__ */ i.jsx(
|
|
877
|
-
/* @__PURE__ */ i.jsxs(
|
|
878
|
-
/* @__PURE__ */ i.jsx(
|
|
879
|
-
e.form?.description && /* @__PURE__ */ i.jsx(
|
|
878
|
+
] }) }), ot = () => /* @__PURE__ */ i.jsx(zr, { open: S, onOpenChange: f, children: /* @__PURE__ */ i.jsxs(Br, { className: re("max-w-2xl max-h-[90vh] overflow-y-auto", Pe), children: [
|
|
879
|
+
/* @__PURE__ */ i.jsxs(Ur, { children: [
|
|
880
|
+
/* @__PURE__ */ i.jsx(Yr, { children: X() }),
|
|
881
|
+
e.form?.description && /* @__PURE__ */ i.jsx(Wr, { children: e.form.description })
|
|
880
882
|
] }),
|
|
881
883
|
/* @__PURE__ */ i.jsx(Gt, { schema: se(), dataSource: t })
|
|
882
|
-
] }) }), Yt =
|
|
884
|
+
] }) }), Yt = V(() => Object.keys(M).some(
|
|
883
885
|
(D) => M[D] !== void 0 && M[D] !== "" && M[D] !== null
|
|
884
|
-
) ? Object.entries(M).filter(([, D]) => D !== void 0 && D !== "" && D !== null).map(([D,
|
|
885
|
-
const y = `${e.objectName}-${
|
|
886
|
-
if (
|
|
887
|
-
return
|
|
886
|
+
) ? Object.entries(M).filter(([, D]) => D !== void 0 && D !== "" && D !== null).map(([D, E]) => ({ field: D, operator: "equals", value: E })) : $?.filter || u?.filter || e.table?.defaultFilters, [M, $, u, e.table?.defaultFilters]), $e = V(() => B.length > 0 ? B : $?.sort || u?.sort || e.table?.defaultSort, [B, $, u, e.table?.defaultSort]), Ie = () => {
|
|
887
|
+
const y = `${e.objectName}-${he || u?.id || "default"}-${O}-${A}`;
|
|
888
|
+
if (d)
|
|
889
|
+
return d({
|
|
888
890
|
schema: {
|
|
889
891
|
type: "list-view",
|
|
890
892
|
objectName: e.objectName,
|
|
891
|
-
viewType:
|
|
892
|
-
fields:
|
|
893
|
+
viewType: O,
|
|
894
|
+
fields: $?.columns || u?.columns || e.table?.fields,
|
|
893
895
|
filters: Yt,
|
|
894
896
|
sort: $e,
|
|
895
897
|
// Propagate appearance/view-config properties for live preview
|
|
896
|
-
rowHeight:
|
|
897
|
-
densityMode:
|
|
898
|
-
groupBy:
|
|
899
|
-
options:
|
|
898
|
+
rowHeight: u?.rowHeight,
|
|
899
|
+
densityMode: u?.densityMode,
|
|
900
|
+
groupBy: u?.groupBy,
|
|
901
|
+
options: $?.options || u,
|
|
900
902
|
// Propagate toolbar toggle flags
|
|
901
|
-
showSearch:
|
|
902
|
-
showFilters:
|
|
903
|
-
showSort:
|
|
904
|
-
showHideFields:
|
|
905
|
-
showGroup:
|
|
906
|
-
showColor:
|
|
907
|
-
showDensity:
|
|
908
|
-
allowExport:
|
|
903
|
+
showSearch: u?.showSearch ?? e.showSearch,
|
|
904
|
+
showFilters: u?.showFilters ?? e.showFilters,
|
|
905
|
+
showSort: u?.showSort ?? e.showSort,
|
|
906
|
+
showHideFields: u?.showHideFields ?? e.showHideFields,
|
|
907
|
+
showGroup: u?.showGroup ?? e.showGroup,
|
|
908
|
+
showColor: u?.showColor ?? e.showColor,
|
|
909
|
+
showDensity: u?.showDensity ?? e.showDensity,
|
|
910
|
+
allowExport: u?.allowExport ?? e.allowExport,
|
|
909
911
|
// Propagate display properties
|
|
910
|
-
striped:
|
|
911
|
-
bordered:
|
|
912
|
-
color:
|
|
912
|
+
striped: u?.striped ?? e.striped,
|
|
913
|
+
bordered: u?.bordered ?? e.bordered,
|
|
914
|
+
color: u?.color ?? e.color,
|
|
913
915
|
// Propagate view-config properties (Bug 4 / items 14-22)
|
|
914
|
-
inlineEdit:
|
|
915
|
-
wrapHeaders:
|
|
916
|
-
clickIntoRecordDetails:
|
|
917
|
-
addRecordViaForm:
|
|
918
|
-
addDeleteRecordsInline:
|
|
919
|
-
collapseAllByDefault:
|
|
920
|
-
fieldTextColor:
|
|
921
|
-
prefixField:
|
|
922
|
-
showDescription:
|
|
916
|
+
inlineEdit: u?.inlineEdit ?? e.inlineEdit,
|
|
917
|
+
wrapHeaders: u?.wrapHeaders ?? e.wrapHeaders,
|
|
918
|
+
clickIntoRecordDetails: u?.clickIntoRecordDetails ?? e.clickIntoRecordDetails,
|
|
919
|
+
addRecordViaForm: u?.addRecordViaForm ?? e.addRecordViaForm,
|
|
920
|
+
addDeleteRecordsInline: u?.addDeleteRecordsInline ?? e.addDeleteRecordsInline,
|
|
921
|
+
collapseAllByDefault: u?.collapseAllByDefault ?? e.collapseAllByDefault,
|
|
922
|
+
fieldTextColor: u?.fieldTextColor ?? e.fieldTextColor,
|
|
923
|
+
prefixField: u?.prefixField ?? e.prefixField,
|
|
924
|
+
showDescription: u?.showDescription ?? e.showDescription,
|
|
923
925
|
// Propagate new spec properties (P0/P1/P2)
|
|
924
|
-
navigation:
|
|
925
|
-
selection:
|
|
926
|
-
pagination:
|
|
927
|
-
searchableFields:
|
|
928
|
-
filterableFields:
|
|
929
|
-
resizable:
|
|
930
|
-
hiddenFields:
|
|
931
|
-
rowActions:
|
|
932
|
-
bulkActions:
|
|
933
|
-
sharing:
|
|
934
|
-
addRecord:
|
|
935
|
-
conditionalFormatting:
|
|
936
|
-
quickFilters:
|
|
937
|
-
showRecordCount:
|
|
938
|
-
allowPrinting:
|
|
939
|
-
virtualScroll:
|
|
940
|
-
emptyState:
|
|
941
|
-
aria:
|
|
926
|
+
navigation: u?.navigation ?? e.navigation,
|
|
927
|
+
selection: u?.selection ?? e.selection,
|
|
928
|
+
pagination: u?.pagination ?? e.pagination,
|
|
929
|
+
searchableFields: u?.searchableFields ?? e.searchableFields,
|
|
930
|
+
filterableFields: u?.filterableFields ?? e.filterableFields,
|
|
931
|
+
resizable: u?.resizable ?? e.resizable,
|
|
932
|
+
hiddenFields: u?.hiddenFields ?? e.hiddenFields,
|
|
933
|
+
rowActions: u?.rowActions ?? e.rowActions,
|
|
934
|
+
bulkActions: u?.bulkActions ?? e.bulkActions,
|
|
935
|
+
sharing: u?.sharing ?? e.sharing,
|
|
936
|
+
addRecord: u?.addRecord ?? e.addRecord,
|
|
937
|
+
conditionalFormatting: u?.conditionalFormatting ?? e.conditionalFormatting,
|
|
938
|
+
quickFilters: u?.quickFilters ?? e.quickFilters,
|
|
939
|
+
showRecordCount: u?.showRecordCount ?? e.showRecordCount,
|
|
940
|
+
allowPrinting: u?.allowPrinting ?? e.allowPrinting,
|
|
941
|
+
virtualScroll: u?.virtualScroll ?? e.virtualScroll,
|
|
942
|
+
emptyState: u?.emptyState ?? e.emptyState,
|
|
943
|
+
aria: u?.aria ?? e.aria,
|
|
942
944
|
tabs: e.tabs
|
|
943
945
|
},
|
|
944
946
|
dataSource: t,
|
|
945
|
-
onEdit:
|
|
947
|
+
onEdit: de,
|
|
946
948
|
onRowClick: g,
|
|
947
949
|
className: "h-full"
|
|
948
950
|
});
|
|
949
|
-
if (
|
|
950
|
-
const D = _e(
|
|
951
|
+
if (O !== "grid") {
|
|
952
|
+
const D = _e(O);
|
|
951
953
|
if (D && Tt)
|
|
952
954
|
return /* @__PURE__ */ i.jsx(
|
|
953
955
|
Tt,
|
|
954
956
|
{
|
|
955
957
|
schema: D,
|
|
956
958
|
dataSource: t,
|
|
957
|
-
data:
|
|
958
|
-
loading:
|
|
959
|
+
data: k,
|
|
960
|
+
loading: R
|
|
959
961
|
},
|
|
960
962
|
y
|
|
961
963
|
);
|
|
962
964
|
if (!Tt)
|
|
963
965
|
return /* @__PURE__ */ i.jsx("div", { className: "flex items-center justify-center h-40 text-muted-foreground", children: /* @__PURE__ */ i.jsxs("p", { children: [
|
|
964
966
|
"SchemaRenderer not available. Install @object-ui/react to render ",
|
|
965
|
-
|
|
967
|
+
O,
|
|
966
968
|
" views."
|
|
967
969
|
] }) });
|
|
968
970
|
}
|
|
969
971
|
return /* @__PURE__ */ i.jsx(
|
|
970
|
-
|
|
972
|
+
$r,
|
|
971
973
|
{
|
|
972
|
-
schema:
|
|
974
|
+
schema: Re,
|
|
973
975
|
dataSource: t,
|
|
974
976
|
onRowClick: g,
|
|
975
|
-
onEdit:
|
|
976
|
-
onDelete:
|
|
977
|
-
onBulkDelete:
|
|
977
|
+
onEdit: Y.update !== !1 ? de : void 0,
|
|
978
|
+
onDelete: Y.delete !== !1 ? te : void 0,
|
|
979
|
+
onBulkDelete: Y.delete !== !1 ? K : void 0
|
|
978
980
|
},
|
|
979
981
|
y
|
|
980
982
|
);
|
|
981
983
|
}, Xe = () => {
|
|
982
|
-
if (!
|
|
983
|
-
const y = Object.entries(
|
|
984
|
-
return y.length <= 1 ? null : /* @__PURE__ */ i.jsx(
|
|
984
|
+
if (!pe) return null;
|
|
985
|
+
const y = Object.entries(Z);
|
|
986
|
+
return y.length <= 1 ? null : /* @__PURE__ */ i.jsx(Zn, { value: he, onValueChange: it, className: "w-full", children: /* @__PURE__ */ i.jsx(er, { className: "w-auto", children: y.map(([D, E]) => /* @__PURE__ */ i.jsx(tr, { value: D, className: "text-sm", children: E.label || D }, D)) }) });
|
|
985
987
|
}, st = () => {
|
|
986
|
-
const y = e.showCreate !== !1 &&
|
|
987
|
-
return !
|
|
988
|
-
|
|
988
|
+
const y = e.showCreate !== !1 && Y.create !== !1, D = e.showViewSwitcher === !0, E = Xe();
|
|
989
|
+
return !E && !D && !y && !p ? null : /* @__PURE__ */ i.jsxs("div", { className: "flex flex-col gap-3", children: [
|
|
990
|
+
E,
|
|
989
991
|
(D || y || p) && /* @__PURE__ */ i.jsxs("div", { className: "flex items-center justify-between gap-4", children: [
|
|
990
|
-
/* @__PURE__ */ i.jsx("div", { className: "flex items-center gap-2", children: D &&
|
|
991
|
-
|
|
992
|
+
/* @__PURE__ */ i.jsx("div", { className: "flex items-center gap-2", children: D && De && /* @__PURE__ */ i.jsx(
|
|
993
|
+
hr,
|
|
992
994
|
{
|
|
993
|
-
schema:
|
|
995
|
+
schema: De,
|
|
994
996
|
onViewChange: be,
|
|
995
|
-
onCreateView:
|
|
997
|
+
onCreateView: v,
|
|
996
998
|
onViewAction: c,
|
|
997
999
|
className: "overflow-x-auto"
|
|
998
1000
|
}
|
|
999
1001
|
) }),
|
|
1000
1002
|
/* @__PURE__ */ i.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
1001
1003
|
p,
|
|
1002
|
-
y && /* @__PURE__ */ i.jsxs(
|
|
1004
|
+
y && /* @__PURE__ */ i.jsxs(Ce, { size: "sm", onClick: H, children: [
|
|
1003
1005
|
/* @__PURE__ */ i.jsx(fn, { className: "h-4 w-4" }),
|
|
1004
1006
|
"Create"
|
|
1005
1007
|
] })
|
|
1006
1008
|
] })
|
|
1007
1009
|
] })
|
|
1008
1010
|
] });
|
|
1009
|
-
},
|
|
1010
|
-
y ||
|
|
1011
|
-
}, [
|
|
1012
|
-
if (
|
|
1013
|
-
const y =
|
|
1014
|
-
return /* @__PURE__ */ i.jsxs("div", { className:
|
|
1011
|
+
}, Ee = T?.mode === "modal" ? "modal" : T?.mode === "drawer" ? "drawer" : T?.mode === "split" ? "split" : T?.mode === "popover" ? "popover" : ce, at = (y) => /* @__PURE__ */ i.jsx("div", { className: "space-y-3", children: /* @__PURE__ */ i.jsx(Gt, { schema: se(), dataSource: t }) }), St = L((y) => {
|
|
1012
|
+
y || U();
|
|
1013
|
+
}, [U]);
|
|
1014
|
+
if (Ee === "split") {
|
|
1015
|
+
const y = w?.label || e.objectName;
|
|
1016
|
+
return /* @__PURE__ */ i.jsxs("div", { className: re("flex flex-col h-full min-w-0 overflow-hidden", n), children: [
|
|
1015
1017
|
(e.title || e.description) && /* @__PURE__ */ i.jsxs("div", { className: "mb-4 shrink-0", children: [
|
|
1016
1018
|
e.title && /* @__PURE__ */ i.jsx("h2", { className: "text-2xl font-bold tracking-tight", children: e.title }),
|
|
1017
1019
|
e.description && /* @__PURE__ */ i.jsx("p", { className: "text-muted-foreground mt-1", children: e.description })
|
|
1018
1020
|
] }),
|
|
1019
1021
|
/* @__PURE__ */ i.jsx("div", { className: "mb-4 shrink-0", children: st() }),
|
|
1020
|
-
/* @__PURE__ */ i.jsx("div", { className: "flex-1 min-h-0 min-w-0 overflow-hidden", children: S &&
|
|
1022
|
+
/* @__PURE__ */ i.jsx("div", { className: "flex-1 min-h-0 min-w-0 overflow-hidden", children: S && m ? /* @__PURE__ */ i.jsx(
|
|
1021
1023
|
Cn,
|
|
1022
1024
|
{
|
|
1023
1025
|
isOpen: S,
|
|
1024
|
-
selectedRecord:
|
|
1026
|
+
selectedRecord: m,
|
|
1025
1027
|
mode: "split",
|
|
1026
|
-
close:
|
|
1028
|
+
close: U,
|
|
1027
1029
|
setIsOpen: St,
|
|
1028
|
-
width:
|
|
1030
|
+
width: T?.width,
|
|
1029
1031
|
isOverlay: !0,
|
|
1030
1032
|
title: `${y} Detail`,
|
|
1031
1033
|
mainContent: /* @__PURE__ */ i.jsx("div", { className: "h-full overflow-auto", children: Ie() }),
|
|
@@ -1034,26 +1036,26 @@ const zi = ({
|
|
|
1034
1036
|
) : Ie() })
|
|
1035
1037
|
] });
|
|
1036
1038
|
}
|
|
1037
|
-
return /* @__PURE__ */ i.jsxs("div", { className:
|
|
1039
|
+
return /* @__PURE__ */ i.jsxs("div", { className: re("flex flex-col h-full min-w-0 overflow-hidden", n), children: [
|
|
1038
1040
|
(e.title || e.description) && /* @__PURE__ */ i.jsxs("div", { className: "mb-4 shrink-0", children: [
|
|
1039
1041
|
e.title && /* @__PURE__ */ i.jsx("h2", { className: "text-2xl font-bold tracking-tight", children: e.title }),
|
|
1040
1042
|
e.description && /* @__PURE__ */ i.jsx("p", { className: "text-muted-foreground mt-1", children: e.description })
|
|
1041
1043
|
] }),
|
|
1042
1044
|
/* @__PURE__ */ i.jsx("div", { className: "mb-4 shrink-0", children: st() }),
|
|
1043
1045
|
/* @__PURE__ */ i.jsx("div", { className: "flex-1 min-h-0 min-w-0 overflow-hidden", children: Ie() }),
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1046
|
+
Ee === "drawer" && Je(),
|
|
1047
|
+
Ee === "modal" && ot(),
|
|
1048
|
+
Ee === "popover" && S && m && /* @__PURE__ */ i.jsx(
|
|
1047
1049
|
Cn,
|
|
1048
1050
|
{
|
|
1049
1051
|
isOpen: S,
|
|
1050
|
-
selectedRecord:
|
|
1052
|
+
selectedRecord: m,
|
|
1051
1053
|
mode: "popover",
|
|
1052
|
-
close:
|
|
1054
|
+
close: U,
|
|
1053
1055
|
setIsOpen: St,
|
|
1054
|
-
width:
|
|
1056
|
+
width: T?.width,
|
|
1055
1057
|
isOverlay: !0,
|
|
1056
|
-
title:
|
|
1058
|
+
title: X(),
|
|
1057
1059
|
children: at
|
|
1058
1060
|
}
|
|
1059
1061
|
)
|
|
@@ -1074,29 +1076,29 @@ const zi = ({
|
|
|
1074
1076
|
className: t,
|
|
1075
1077
|
onChange: n
|
|
1076
1078
|
}) => {
|
|
1077
|
-
const [r, o] =
|
|
1078
|
-
|
|
1079
|
+
const [r, o] = Q.useState(e.values || {}), [s, l] = Q.useState(!1);
|
|
1080
|
+
Q.useEffect(() => {
|
|
1079
1081
|
e.values && o(e.values);
|
|
1080
1082
|
}, [e.values]);
|
|
1081
|
-
const a =
|
|
1083
|
+
const a = Q.useCallback((f) => {
|
|
1082
1084
|
n?.(f), e.onChange && typeof window < "u" && window.dispatchEvent(
|
|
1083
1085
|
new CustomEvent(e.onChange, {
|
|
1084
1086
|
detail: { values: f }
|
|
1085
1087
|
})
|
|
1086
1088
|
);
|
|
1087
|
-
}, [n, e.onChange]),
|
|
1089
|
+
}, [n, e.onChange]), d = Q.useCallback((f, j) => {
|
|
1088
1090
|
const N = { ...r, [f]: j };
|
|
1089
1091
|
o(N), e.showApply || a(N);
|
|
1090
|
-
}, [a, e.showApply, r]), p =
|
|
1092
|
+
}, [a, e.showApply, r]), p = Q.useCallback(() => {
|
|
1091
1093
|
const f = {};
|
|
1092
1094
|
if (o(f), e.showApply) {
|
|
1093
1095
|
a(f);
|
|
1094
1096
|
return;
|
|
1095
1097
|
}
|
|
1096
1098
|
a(f);
|
|
1097
|
-
}, [a, e.showApply]),
|
|
1099
|
+
}, [a, e.showApply]), v = Q.useCallback(() => {
|
|
1098
1100
|
a(r), l(!1);
|
|
1099
|
-
}, [a, r]), c =
|
|
1101
|
+
}, [a, r]), c = Q.useMemo(() => Object.values(r).filter((f) => !Bi(f)).length, [r]), w = (f) => {
|
|
1100
1102
|
const j = f.label || f.field, N = f.placeholder || `Filter by ${j}`;
|
|
1101
1103
|
switch (f.type) {
|
|
1102
1104
|
case "number":
|
|
@@ -1106,9 +1108,9 @@ const zi = ({
|
|
|
1106
1108
|
type: "number",
|
|
1107
1109
|
value: r[f.field] ?? "",
|
|
1108
1110
|
placeholder: N,
|
|
1109
|
-
onChange: (
|
|
1110
|
-
const C =
|
|
1111
|
-
|
|
1111
|
+
onChange: (m) => {
|
|
1112
|
+
const C = m.target.value, A = C === "" ? "" : Number(C);
|
|
1113
|
+
d(f.field, A);
|
|
1112
1114
|
}
|
|
1113
1115
|
}
|
|
1114
1116
|
);
|
|
@@ -1117,35 +1119,64 @@ const zi = ({
|
|
|
1117
1119
|
Ot,
|
|
1118
1120
|
{
|
|
1119
1121
|
value: r[f.field] !== void 0 ? String(r[f.field]) : "",
|
|
1120
|
-
onValueChange: (
|
|
1121
|
-
const C = f.options?.find((
|
|
1122
|
-
|
|
1122
|
+
onValueChange: (m) => {
|
|
1123
|
+
const C = f.options?.find((A) => String(A.value) === m);
|
|
1124
|
+
d(f.field, C ? C.value : m);
|
|
1123
1125
|
},
|
|
1124
1126
|
children: [
|
|
1125
1127
|
/* @__PURE__ */ i.jsx(It, { children: /* @__PURE__ */ i.jsx(kt, { placeholder: N }) }),
|
|
1126
|
-
/* @__PURE__ */ i.jsx(Vt, { children: f.options?.map((
|
|
1128
|
+
/* @__PURE__ */ i.jsx(Vt, { children: f.options?.map((m) => /* @__PURE__ */ i.jsx(pt, { value: String(m.value), children: m.label }, String(m.value))) })
|
|
1127
1129
|
]
|
|
1128
1130
|
}
|
|
1129
1131
|
);
|
|
1132
|
+
case "multi-select": {
|
|
1133
|
+
const m = r[f.field], C = Array.isArray(m) ? m : m ? [m] : [];
|
|
1134
|
+
return /* @__PURE__ */ i.jsx("div", { className: "max-h-40 overflow-y-auto space-y-0.5 border rounded-md p-2", children: f.options?.map((A) => {
|
|
1135
|
+
const F = C.map(String).includes(String(A.value));
|
|
1136
|
+
return /* @__PURE__ */ i.jsxs(
|
|
1137
|
+
"label",
|
|
1138
|
+
{
|
|
1139
|
+
className: re(
|
|
1140
|
+
"flex items-center gap-2 text-sm py-1 px-1.5 rounded cursor-pointer",
|
|
1141
|
+
F ? "bg-primary/5 text-primary" : "hover:bg-muted"
|
|
1142
|
+
),
|
|
1143
|
+
children: [
|
|
1144
|
+
/* @__PURE__ */ i.jsx(
|
|
1145
|
+
Sn,
|
|
1146
|
+
{
|
|
1147
|
+
checked: F,
|
|
1148
|
+
onCheckedChange: (k) => {
|
|
1149
|
+
const x = k ? [...C, A.value] : C.filter((R) => String(R) !== String(A.value));
|
|
1150
|
+
d(f.field, x);
|
|
1151
|
+
}
|
|
1152
|
+
}
|
|
1153
|
+
),
|
|
1154
|
+
/* @__PURE__ */ i.jsx("span", { className: "truncate", children: A.label })
|
|
1155
|
+
]
|
|
1156
|
+
},
|
|
1157
|
+
String(A.value)
|
|
1158
|
+
);
|
|
1159
|
+
}) });
|
|
1160
|
+
}
|
|
1130
1161
|
case "date":
|
|
1131
1162
|
return /* @__PURE__ */ i.jsx(
|
|
1132
1163
|
We,
|
|
1133
1164
|
{
|
|
1134
1165
|
type: "date",
|
|
1135
1166
|
value: r[f.field] ?? "",
|
|
1136
|
-
onChange: (
|
|
1167
|
+
onChange: (m) => d(f.field, m.target.value)
|
|
1137
1168
|
}
|
|
1138
1169
|
);
|
|
1139
1170
|
case "date-range": {
|
|
1140
|
-
const
|
|
1171
|
+
const m = Ui(r[f.field]);
|
|
1141
1172
|
return /* @__PURE__ */ i.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
1142
1173
|
/* @__PURE__ */ i.jsx(
|
|
1143
1174
|
We,
|
|
1144
1175
|
{
|
|
1145
1176
|
type: "date",
|
|
1146
|
-
value:
|
|
1177
|
+
value: m.start ?? "",
|
|
1147
1178
|
onChange: (C) => {
|
|
1148
|
-
|
|
1179
|
+
d(f.field, { ...m, start: C.target.value });
|
|
1149
1180
|
}
|
|
1150
1181
|
}
|
|
1151
1182
|
),
|
|
@@ -1153,9 +1184,9 @@ const zi = ({
|
|
|
1153
1184
|
We,
|
|
1154
1185
|
{
|
|
1155
1186
|
type: "date",
|
|
1156
|
-
value:
|
|
1187
|
+
value: m.end ?? "",
|
|
1157
1188
|
onChange: (C) => {
|
|
1158
|
-
|
|
1189
|
+
d(f.field, { ...m, end: C.target.value });
|
|
1159
1190
|
}
|
|
1160
1191
|
}
|
|
1161
1192
|
)
|
|
@@ -1164,10 +1195,10 @@ const zi = ({
|
|
|
1164
1195
|
case "boolean":
|
|
1165
1196
|
return /* @__PURE__ */ i.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
1166
1197
|
/* @__PURE__ */ i.jsx(
|
|
1167
|
-
|
|
1198
|
+
Sn,
|
|
1168
1199
|
{
|
|
1169
1200
|
checked: !!r[f.field],
|
|
1170
|
-
onCheckedChange: (
|
|
1201
|
+
onCheckedChange: (m) => d(f.field, !!m)
|
|
1171
1202
|
}
|
|
1172
1203
|
),
|
|
1173
1204
|
/* @__PURE__ */ i.jsx("span", { className: "text-sm text-muted-foreground", children: "Enabled" })
|
|
@@ -1178,43 +1209,43 @@ const zi = ({
|
|
|
1178
1209
|
{
|
|
1179
1210
|
value: r[f.field] ?? "",
|
|
1180
1211
|
placeholder: N,
|
|
1181
|
-
onChange: (
|
|
1212
|
+
onChange: (m) => d(f.field, m.target.value)
|
|
1182
1213
|
}
|
|
1183
1214
|
);
|
|
1184
1215
|
}
|
|
1185
|
-
},
|
|
1216
|
+
}, b = /* @__PURE__ */ i.jsxs("div", { className: "space-y-4", children: [
|
|
1186
1217
|
/* @__PURE__ */ i.jsx("div", { className: "grid gap-4 sm:grid-cols-2", children: e.filters.map((f) => /* @__PURE__ */ i.jsxs("div", { className: "space-y-2", children: [
|
|
1187
|
-
/* @__PURE__ */ i.jsx(
|
|
1188
|
-
|
|
1218
|
+
/* @__PURE__ */ i.jsx(Gr, { className: "text-xs text-muted-foreground", children: f.label || f.field }),
|
|
1219
|
+
w(f)
|
|
1189
1220
|
] }, f.field)) }),
|
|
1190
1221
|
(e.showApply || e.showClear) && /* @__PURE__ */ i.jsxs("div", { className: "flex items-center justify-end gap-2 border-t pt-3", children: [
|
|
1191
|
-
e.showClear && /* @__PURE__ */ i.jsx(
|
|
1192
|
-
e.showApply && /* @__PURE__ */ i.jsx(
|
|
1222
|
+
e.showClear && /* @__PURE__ */ i.jsx(Ce, { type: "button", variant: "ghost", size: "sm", onClick: p, children: "Clear" }),
|
|
1223
|
+
e.showApply && /* @__PURE__ */ i.jsx(Ce, { type: "button", size: "sm", onClick: v, children: "Apply" })
|
|
1193
1224
|
] })
|
|
1194
1225
|
] }), S = e.layout || "inline";
|
|
1195
|
-
return S === "popover" ? /* @__PURE__ */ i.jsx("div", { className:
|
|
1196
|
-
/* @__PURE__ */ i.jsx(
|
|
1197
|
-
/* @__PURE__ */ i.jsx(
|
|
1226
|
+
return S === "popover" ? /* @__PURE__ */ i.jsx("div", { className: re(Kt({ layout: S }), t), children: /* @__PURE__ */ i.jsxs(ar, { open: s, onOpenChange: l, children: [
|
|
1227
|
+
/* @__PURE__ */ i.jsx(lr, { asChild: !0, children: /* @__PURE__ */ i.jsxs(Ce, { type: "button", variant: c > 0 ? "secondary" : "outline", size: "sm", className: "gap-2", children: [
|
|
1228
|
+
/* @__PURE__ */ i.jsx(An, { className: "h-4 w-4" }),
|
|
1198
1229
|
"Filters",
|
|
1199
1230
|
c > 0 && /* @__PURE__ */ i.jsx("span", { className: "inline-flex h-5 min-w-[20px] items-center justify-center rounded-full bg-primary/10 px-1 text-xs font-medium text-primary", children: c })
|
|
1200
1231
|
] }) }),
|
|
1201
|
-
/* @__PURE__ */ i.jsx(
|
|
1202
|
-
] }) }) : S === "drawer" ? /* @__PURE__ */ i.jsxs("div", { className:
|
|
1203
|
-
/* @__PURE__ */ i.jsxs(
|
|
1204
|
-
/* @__PURE__ */ i.jsx(
|
|
1232
|
+
/* @__PURE__ */ i.jsx(cr, { align: "start", className: "w-[520px] p-4", children: b })
|
|
1233
|
+
] }) }) : S === "drawer" ? /* @__PURE__ */ i.jsxs("div", { className: re(Kt({ layout: S }), t), children: [
|
|
1234
|
+
/* @__PURE__ */ i.jsxs(Ce, { type: "button", variant: c > 0 ? "secondary" : "outline", size: "sm", className: "gap-2", onClick: () => l(!0), children: [
|
|
1235
|
+
/* @__PURE__ */ i.jsx(An, { className: "h-4 w-4" }),
|
|
1205
1236
|
"Filters",
|
|
1206
1237
|
c > 0 && /* @__PURE__ */ i.jsx("span", { className: "inline-flex h-5 min-w-[20px] items-center justify-center rounded-full bg-primary/10 px-1 text-xs font-medium text-primary", children: c })
|
|
1207
1238
|
] }),
|
|
1208
|
-
/* @__PURE__ */ i.jsx(
|
|
1209
|
-
/* @__PURE__ */ i.jsxs(
|
|
1210
|
-
/* @__PURE__ */ i.jsx(
|
|
1211
|
-
/* @__PURE__ */ i.jsx(
|
|
1239
|
+
/* @__PURE__ */ i.jsx(nr, { open: s, onOpenChange: l, children: /* @__PURE__ */ i.jsxs(rr, { children: [
|
|
1240
|
+
/* @__PURE__ */ i.jsxs(ir, { children: [
|
|
1241
|
+
/* @__PURE__ */ i.jsx(or, { children: "Filters" }),
|
|
1242
|
+
/* @__PURE__ */ i.jsx(sr, { children: "Refine the data with advanced filters." })
|
|
1212
1243
|
] }),
|
|
1213
|
-
/* @__PURE__ */ i.jsx("div", { className: "px-4 pb-6", children:
|
|
1244
|
+
/* @__PURE__ */ i.jsx("div", { className: "px-4 pb-6", children: b })
|
|
1214
1245
|
] }) })
|
|
1215
|
-
] }) : /* @__PURE__ */ i.jsxs("div", { className:
|
|
1216
|
-
|
|
1217
|
-
!e.showApply && e.showClear && /* @__PURE__ */ i.jsxs(
|
|
1246
|
+
] }) : /* @__PURE__ */ i.jsxs("div", { className: re(Kt({ layout: S }), t), children: [
|
|
1247
|
+
b,
|
|
1248
|
+
!e.showApply && e.showClear && /* @__PURE__ */ i.jsxs(Ce, { type: "button", variant: "ghost", size: "sm", className: "gap-2", onClick: p, children: [
|
|
1218
1249
|
/* @__PURE__ */ i.jsx(hi, { className: "h-3.5 w-3.5" }),
|
|
1219
1250
|
"Clear filters"
|
|
1220
1251
|
] })
|
|
@@ -1233,7 +1264,7 @@ const zi = ({
|
|
|
1233
1264
|
}), Qt = (e) => e ? e.map((t) => ({
|
|
1234
1265
|
field: t.field,
|
|
1235
1266
|
direction: t.direction
|
|
1236
|
-
})) : [],
|
|
1267
|
+
})) : [], _n = (e) => e.map((t) => ({
|
|
1237
1268
|
id: `${t.field}-${t.direction}`,
|
|
1238
1269
|
field: t.field,
|
|
1239
1270
|
order: t.direction
|
|
@@ -1245,25 +1276,25 @@ const zi = ({
|
|
|
1245
1276
|
className: t,
|
|
1246
1277
|
onChange: n
|
|
1247
1278
|
}) => {
|
|
1248
|
-
const [r, o] =
|
|
1249
|
-
|
|
1279
|
+
const [r, o] = Q.useState(() => Qt(e.sort)), [s, l] = Q.useState(() => _n(Qt(e.sort)));
|
|
1280
|
+
Q.useEffect(() => {
|
|
1250
1281
|
const c = Qt(e.sort);
|
|
1251
|
-
o(c), l(
|
|
1282
|
+
o(c), l(_n(c));
|
|
1252
1283
|
}, [e.sort]);
|
|
1253
|
-
const a =
|
|
1284
|
+
const a = Q.useCallback((c) => {
|
|
1254
1285
|
o(c), n?.(c), e.onChange && typeof window < "u" && window.dispatchEvent(
|
|
1255
1286
|
new CustomEvent(e.onChange, {
|
|
1256
1287
|
detail: { sort: c }
|
|
1257
1288
|
})
|
|
1258
1289
|
);
|
|
1259
|
-
}, [n, e.onChange]),
|
|
1260
|
-
const
|
|
1261
|
-
if (!
|
|
1262
|
-
const f =
|
|
1290
|
+
}, [n, e.onChange]), d = Q.useCallback((c) => {
|
|
1291
|
+
const w = r.find((f) => f.field === c), b = !!e.multiple;
|
|
1292
|
+
if (!w) {
|
|
1293
|
+
const f = b ? [...r, { field: c, direction: "asc" }] : [{ field: c, direction: "asc" }];
|
|
1263
1294
|
a(f);
|
|
1264
1295
|
return;
|
|
1265
1296
|
}
|
|
1266
|
-
if (
|
|
1297
|
+
if (w.direction === "asc") {
|
|
1267
1298
|
const f = r.map(
|
|
1268
1299
|
(j) => j.field === c ? { ...j, direction: "desc" } : j
|
|
1269
1300
|
);
|
|
@@ -1274,26 +1305,26 @@ const zi = ({
|
|
|
1274
1305
|
a(S);
|
|
1275
1306
|
}, [a, e.multiple, r]);
|
|
1276
1307
|
if ((e.variant || "dropdown") === "buttons")
|
|
1277
|
-
return /* @__PURE__ */ i.jsx("div", { className:
|
|
1278
|
-
const
|
|
1308
|
+
return /* @__PURE__ */ i.jsx("div", { className: re(Jt({ variant: "buttons" }), t), children: e.fields.map((c) => {
|
|
1309
|
+
const w = r.find((S) => S.field === c.field), b = w?.direction === "asc" ? gi : vi;
|
|
1279
1310
|
return /* @__PURE__ */ i.jsxs(
|
|
1280
|
-
|
|
1311
|
+
Ce,
|
|
1281
1312
|
{
|
|
1282
1313
|
type: "button",
|
|
1283
|
-
variant:
|
|
1314
|
+
variant: w ? "secondary" : "outline",
|
|
1284
1315
|
size: "sm",
|
|
1285
|
-
onClick: () =>
|
|
1316
|
+
onClick: () => d(c.field),
|
|
1286
1317
|
className: "gap-2",
|
|
1287
1318
|
children: [
|
|
1288
1319
|
/* @__PURE__ */ i.jsx("span", { children: c.label || c.field }),
|
|
1289
|
-
|
|
1320
|
+
w && /* @__PURE__ */ i.jsx(b, { className: "h-3.5 w-3.5" })
|
|
1290
1321
|
]
|
|
1291
1322
|
},
|
|
1292
1323
|
c.field
|
|
1293
1324
|
);
|
|
1294
1325
|
}) });
|
|
1295
1326
|
if (e.multiple)
|
|
1296
|
-
return /* @__PURE__ */ i.jsx("div", { className:
|
|
1327
|
+
return /* @__PURE__ */ i.jsx("div", { className: re(Jt({ variant: "builder" }), t), children: /* @__PURE__ */ i.jsx(
|
|
1297
1328
|
Hr,
|
|
1298
1329
|
{
|
|
1299
1330
|
fields: e.fields.map((c) => ({ value: c.field, label: c.label || c.field })),
|
|
@@ -1303,18 +1334,18 @@ const zi = ({
|
|
|
1303
1334
|
}
|
|
1304
1335
|
}
|
|
1305
1336
|
) });
|
|
1306
|
-
const
|
|
1307
|
-
return /* @__PURE__ */ i.jsxs("div", { className:
|
|
1337
|
+
const v = r[0];
|
|
1338
|
+
return /* @__PURE__ */ i.jsxs("div", { className: re(Jt({ variant: "dropdown" }), t), children: [
|
|
1308
1339
|
/* @__PURE__ */ i.jsxs(
|
|
1309
1340
|
Ot,
|
|
1310
1341
|
{
|
|
1311
|
-
value:
|
|
1342
|
+
value: v?.field || "",
|
|
1312
1343
|
onValueChange: (c) => {
|
|
1313
1344
|
if (!c) {
|
|
1314
1345
|
a([]);
|
|
1315
1346
|
return;
|
|
1316
1347
|
}
|
|
1317
|
-
a([{ field: c, direction:
|
|
1348
|
+
a([{ field: c, direction: v?.direction || "asc" }]);
|
|
1318
1349
|
},
|
|
1319
1350
|
children: [
|
|
1320
1351
|
/* @__PURE__ */ i.jsx(It, { className: "w-56", children: /* @__PURE__ */ i.jsx(kt, { placeholder: "Select field" }) }),
|
|
@@ -1325,9 +1356,9 @@ const zi = ({
|
|
|
1325
1356
|
/* @__PURE__ */ i.jsxs(
|
|
1326
1357
|
Ot,
|
|
1327
1358
|
{
|
|
1328
|
-
value:
|
|
1359
|
+
value: v?.direction || "asc",
|
|
1329
1360
|
onValueChange: (c) => {
|
|
1330
|
-
|
|
1361
|
+
v?.field && a([{ field: v.field, direction: c }]);
|
|
1331
1362
|
},
|
|
1332
1363
|
children: [
|
|
1333
1364
|
/* @__PURE__ */ i.jsx(It, { className: "w-36", children: /* @__PURE__ */ i.jsx(kt, {}) }),
|
|
@@ -1359,26 +1390,26 @@ const qi = ({
|
|
|
1359
1390
|
onShare: r,
|
|
1360
1391
|
className: o
|
|
1361
1392
|
}) => {
|
|
1362
|
-
const [s, l] =
|
|
1363
|
-
const
|
|
1364
|
-
l(C),
|
|
1365
|
-
const
|
|
1366
|
-
r?.(C, { password: c || void 0, expiresAt:
|
|
1367
|
-
}, [f, e, t, r, c,
|
|
1393
|
+
const [s, l] = Q.useState(null), [a, d] = Q.useState(!1), [p, v] = Q.useState(!1), [c, w] = Q.useState(""), [b, S] = Q.useState(""), f = n ?? (typeof window < "u" ? window.location.origin : ""), j = Q.useCallback(() => {
|
|
1394
|
+
const m = Hi(), C = Xi(f, e, t, m);
|
|
1395
|
+
l(C), d(!1);
|
|
1396
|
+
const A = b ? new Date(Date.now() + parseInt(b, 10) * 864e5).toISOString() : void 0;
|
|
1397
|
+
r?.(C, { password: c || void 0, expiresAt: A });
|
|
1398
|
+
}, [f, e, t, r, c, b]), N = Q.useCallback(async () => {
|
|
1368
1399
|
if (s)
|
|
1369
1400
|
try {
|
|
1370
|
-
await navigator.clipboard.writeText(s),
|
|
1401
|
+
await navigator.clipboard.writeText(s), d(!0), setTimeout(() => d(!1), 2e3);
|
|
1371
1402
|
} catch {
|
|
1372
|
-
const
|
|
1373
|
-
|
|
1403
|
+
const m = document.createElement("textarea");
|
|
1404
|
+
m.value = s, document.body.appendChild(m), m.select(), document.execCommand("copy"), document.body.removeChild(m), d(!0), setTimeout(() => d(!1), 2e3);
|
|
1374
1405
|
}
|
|
1375
1406
|
}, [s]);
|
|
1376
|
-
return /* @__PURE__ */ i.jsxs(
|
|
1377
|
-
/* @__PURE__ */ i.jsx(
|
|
1407
|
+
return /* @__PURE__ */ i.jsxs(ar, { open: p, onOpenChange: v, children: [
|
|
1408
|
+
/* @__PURE__ */ i.jsx(lr, { asChild: !0, children: /* @__PURE__ */ i.jsxs(Ce, { variant: "outline", size: "sm", className: re("gap-2", o), children: [
|
|
1378
1409
|
/* @__PURE__ */ i.jsx(Mt, { className: "h-4 w-4" }),
|
|
1379
1410
|
"Share"
|
|
1380
1411
|
] }) }),
|
|
1381
|
-
/* @__PURE__ */ i.jsxs(
|
|
1412
|
+
/* @__PURE__ */ i.jsxs(cr, { className: "w-96 space-y-4", align: "end", children: [
|
|
1382
1413
|
/* @__PURE__ */ i.jsxs("div", { className: "space-y-2", children: [
|
|
1383
1414
|
/* @__PURE__ */ i.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
1384
1415
|
/* @__PURE__ */ i.jsx("h4", { className: "text-sm font-medium", children: "Share View" }),
|
|
@@ -1394,31 +1425,31 @@ const qi = ({
|
|
|
1394
1425
|
value: s,
|
|
1395
1426
|
readOnly: !0,
|
|
1396
1427
|
className: "h-8 text-xs",
|
|
1397
|
-
onClick: (
|
|
1428
|
+
onClick: (m) => m.target.select()
|
|
1398
1429
|
}
|
|
1399
1430
|
),
|
|
1400
1431
|
/* @__PURE__ */ i.jsx(
|
|
1401
|
-
|
|
1432
|
+
Ce,
|
|
1402
1433
|
{
|
|
1403
1434
|
variant: "outline",
|
|
1404
1435
|
size: "sm",
|
|
1405
1436
|
onClick: N,
|
|
1406
1437
|
className: "shrink-0 gap-1",
|
|
1407
|
-
children: a ? /* @__PURE__ */ i.jsx(
|
|
1438
|
+
children: a ? /* @__PURE__ */ i.jsx(bi, { className: "h-4 w-4 text-green-500" }) : /* @__PURE__ */ i.jsx(un, { className: "h-4 w-4" })
|
|
1408
1439
|
}
|
|
1409
1440
|
)
|
|
1410
1441
|
] }),
|
|
1411
|
-
(c ||
|
|
1442
|
+
(c || b) && /* @__PURE__ */ i.jsxs("div", { className: "flex items-center gap-2 flex-wrap", children: [
|
|
1412
1443
|
c && /* @__PURE__ */ i.jsxs(Ht, { variant: "outline", className: "text-xs gap-1", children: [
|
|
1413
1444
|
/* @__PURE__ */ i.jsx(on, { className: "h-3 w-3" }),
|
|
1414
1445
|
"Password protected"
|
|
1415
1446
|
] }),
|
|
1416
|
-
|
|
1447
|
+
b && /* @__PURE__ */ i.jsxs(Ht, { variant: "outline", className: "text-xs gap-1", children: [
|
|
1417
1448
|
/* @__PURE__ */ i.jsx(rn, { className: "h-3 w-3" }),
|
|
1418
1449
|
"Expires in ",
|
|
1419
|
-
|
|
1450
|
+
b,
|
|
1420
1451
|
" day",
|
|
1421
|
-
|
|
1452
|
+
b !== "1" ? "s" : ""
|
|
1422
1453
|
] })
|
|
1423
1454
|
] })
|
|
1424
1455
|
] }) : /* @__PURE__ */ i.jsxs("div", { className: "space-y-3", children: [
|
|
@@ -1432,7 +1463,7 @@ const qi = ({
|
|
|
1432
1463
|
{
|
|
1433
1464
|
type: "password",
|
|
1434
1465
|
value: c,
|
|
1435
|
-
onChange: (
|
|
1466
|
+
onChange: (m) => w(m.target.value),
|
|
1436
1467
|
placeholder: "Enter password...",
|
|
1437
1468
|
className: "h-8 text-xs"
|
|
1438
1469
|
}
|
|
@@ -1446,8 +1477,8 @@ const qi = ({
|
|
|
1446
1477
|
/* @__PURE__ */ i.jsxs(
|
|
1447
1478
|
"select",
|
|
1448
1479
|
{
|
|
1449
|
-
value:
|
|
1450
|
-
onChange: (
|
|
1480
|
+
value: b,
|
|
1481
|
+
onChange: (m) => S(m.target.value),
|
|
1451
1482
|
className: "w-full h-8 text-xs rounded-md border border-input bg-background px-3",
|
|
1452
1483
|
children: [
|
|
1453
1484
|
/* @__PURE__ */ i.jsx("option", { value: "", children: "Never" }),
|
|
@@ -1459,7 +1490,7 @@ const qi = ({
|
|
|
1459
1490
|
}
|
|
1460
1491
|
)
|
|
1461
1492
|
] }),
|
|
1462
|
-
/* @__PURE__ */ i.jsxs(
|
|
1493
|
+
/* @__PURE__ */ i.jsxs(Ce, { onClick: j, className: "w-full gap-2", size: "sm", children: [
|
|
1463
1494
|
/* @__PURE__ */ i.jsx(Mt, { className: "h-4 w-4" }),
|
|
1464
1495
|
"Generate Link"
|
|
1465
1496
|
] })
|
|
@@ -1470,7 +1501,7 @@ const qi = ({
|
|
|
1470
1501
|
function Ki() {
|
|
1471
1502
|
for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++)
|
|
1472
1503
|
t[n] = arguments[n];
|
|
1473
|
-
return
|
|
1504
|
+
return V(
|
|
1474
1505
|
() => (r) => {
|
|
1475
1506
|
t.forEach((o) => o(r));
|
|
1476
1507
|
},
|
|
@@ -1487,45 +1518,45 @@ function tt(e) {
|
|
|
1487
1518
|
function pn(e) {
|
|
1488
1519
|
return "nodeType" in e;
|
|
1489
1520
|
}
|
|
1490
|
-
function
|
|
1521
|
+
function Se(e) {
|
|
1491
1522
|
var t, n;
|
|
1492
1523
|
return e ? tt(e) ? e : pn(e) && (t = (n = e.ownerDocument) == null ? void 0 : n.defaultView) != null ? t : window : window;
|
|
1493
1524
|
}
|
|
1494
1525
|
function hn(e) {
|
|
1495
1526
|
const {
|
|
1496
1527
|
Document: t
|
|
1497
|
-
} =
|
|
1528
|
+
} = Se(e);
|
|
1498
1529
|
return e instanceof t;
|
|
1499
1530
|
}
|
|
1500
1531
|
function yt(e) {
|
|
1501
|
-
return tt(e) ? !1 : e instanceof
|
|
1532
|
+
return tt(e) ? !1 : e instanceof Se(e).HTMLElement;
|
|
1502
1533
|
}
|
|
1503
|
-
function
|
|
1504
|
-
return e instanceof
|
|
1534
|
+
function gr(e) {
|
|
1535
|
+
return e instanceof Se(e).SVGElement;
|
|
1505
1536
|
}
|
|
1506
1537
|
function nt(e) {
|
|
1507
|
-
return e ? tt(e) ? e.document : pn(e) ? hn(e) ? e : yt(e) ||
|
|
1538
|
+
return e ? tt(e) ? e.document : pn(e) ? hn(e) ? e : yt(e) || gr(e) ? e.ownerDocument : document : document : document;
|
|
1508
1539
|
}
|
|
1509
|
-
const Me = zt ?
|
|
1540
|
+
const Me = zt ? Mr : W;
|
|
1510
1541
|
function gn(e) {
|
|
1511
1542
|
const t = q(e);
|
|
1512
1543
|
return Me(() => {
|
|
1513
1544
|
t.current = e;
|
|
1514
|
-
}),
|
|
1545
|
+
}), L(function() {
|
|
1515
1546
|
for (var n = arguments.length, r = new Array(n), o = 0; o < n; o++)
|
|
1516
1547
|
r[o] = arguments[o];
|
|
1517
1548
|
return t.current == null ? void 0 : t.current(...r);
|
|
1518
1549
|
}, []);
|
|
1519
1550
|
}
|
|
1520
1551
|
function Ji() {
|
|
1521
|
-
const e = q(null), t =
|
|
1552
|
+
const e = q(null), t = L((r, o) => {
|
|
1522
1553
|
e.current = setInterval(r, o);
|
|
1523
|
-
}, []), n =
|
|
1554
|
+
}, []), n = L(() => {
|
|
1524
1555
|
e.current !== null && (clearInterval(e.current), e.current = null);
|
|
1525
1556
|
}, []);
|
|
1526
1557
|
return [t, n];
|
|
1527
1558
|
}
|
|
1528
|
-
function
|
|
1559
|
+
function bt(e, t) {
|
|
1529
1560
|
t === void 0 && (t = [e]);
|
|
1530
1561
|
const n = q(e);
|
|
1531
1562
|
return Me(() => {
|
|
@@ -1534,7 +1565,7 @@ function vt(e, t) {
|
|
|
1534
1565
|
}
|
|
1535
1566
|
function jt(e, t) {
|
|
1536
1567
|
const n = q();
|
|
1537
|
-
return
|
|
1568
|
+
return V(
|
|
1538
1569
|
() => {
|
|
1539
1570
|
const r = e(n.current);
|
|
1540
1571
|
return n.current = r, r;
|
|
@@ -1544,7 +1575,7 @@ function jt(e, t) {
|
|
|
1544
1575
|
);
|
|
1545
1576
|
}
|
|
1546
1577
|
function Pt(e) {
|
|
1547
|
-
const t = gn(e), n = q(null), r =
|
|
1578
|
+
const t = gn(e), n = q(null), r = L(
|
|
1548
1579
|
(o) => {
|
|
1549
1580
|
o !== n.current && t?.(o, n.current), n.current = o;
|
|
1550
1581
|
},
|
|
@@ -1555,28 +1586,28 @@ function Pt(e) {
|
|
|
1555
1586
|
}
|
|
1556
1587
|
function sn(e) {
|
|
1557
1588
|
const t = q();
|
|
1558
|
-
return
|
|
1589
|
+
return W(() => {
|
|
1559
1590
|
t.current = e;
|
|
1560
1591
|
}, [e]), t.current;
|
|
1561
1592
|
}
|
|
1562
1593
|
let Zt = {};
|
|
1563
1594
|
function Ct(e, t) {
|
|
1564
|
-
return
|
|
1595
|
+
return V(() => {
|
|
1565
1596
|
if (t)
|
|
1566
1597
|
return t;
|
|
1567
1598
|
const n = Zt[e] == null ? 0 : Zt[e] + 1;
|
|
1568
1599
|
return Zt[e] = n, e + "-" + n;
|
|
1569
1600
|
}, [e, t]);
|
|
1570
1601
|
}
|
|
1571
|
-
function
|
|
1602
|
+
function vr(e) {
|
|
1572
1603
|
return function(t) {
|
|
1573
1604
|
for (var n = arguments.length, r = new Array(n > 1 ? n - 1 : 0), o = 1; o < n; o++)
|
|
1574
1605
|
r[o - 1] = arguments[o];
|
|
1575
1606
|
return r.reduce((s, l) => {
|
|
1576
1607
|
const a = Object.entries(l);
|
|
1577
|
-
for (const [
|
|
1578
|
-
const
|
|
1579
|
-
|
|
1608
|
+
for (const [d, p] of a) {
|
|
1609
|
+
const v = s[d];
|
|
1610
|
+
v != null && (s[d] = v + e * p);
|
|
1580
1611
|
}
|
|
1581
1612
|
return s;
|
|
1582
1613
|
}, {
|
|
@@ -1584,16 +1615,16 @@ function gr(e) {
|
|
|
1584
1615
|
});
|
|
1585
1616
|
};
|
|
1586
1617
|
}
|
|
1587
|
-
const Ze = /* @__PURE__ */
|
|
1618
|
+
const Ze = /* @__PURE__ */ vr(1), Lt = /* @__PURE__ */ vr(-1);
|
|
1588
1619
|
function Qi(e) {
|
|
1589
1620
|
return "clientX" in e && "clientY" in e;
|
|
1590
1621
|
}
|
|
1591
|
-
function
|
|
1622
|
+
function vn(e) {
|
|
1592
1623
|
if (!e)
|
|
1593
1624
|
return !1;
|
|
1594
1625
|
const {
|
|
1595
1626
|
KeyboardEvent: t
|
|
1596
|
-
} =
|
|
1627
|
+
} = Se(e.target);
|
|
1597
1628
|
return t && e instanceof t;
|
|
1598
1629
|
}
|
|
1599
1630
|
function Zi(e) {
|
|
@@ -1601,7 +1632,7 @@ function Zi(e) {
|
|
|
1601
1632
|
return !1;
|
|
1602
1633
|
const {
|
|
1603
1634
|
TouchEvent: t
|
|
1604
|
-
} =
|
|
1635
|
+
} = Se(e.target);
|
|
1605
1636
|
return t && e instanceof t;
|
|
1606
1637
|
}
|
|
1607
1638
|
function an(e) {
|
|
@@ -1670,9 +1701,9 @@ const mt = /* @__PURE__ */ Object.freeze({
|
|
|
1670
1701
|
return t + " " + n + "ms " + r;
|
|
1671
1702
|
}
|
|
1672
1703
|
}
|
|
1673
|
-
}),
|
|
1704
|
+
}), $n = "a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";
|
|
1674
1705
|
function eo(e) {
|
|
1675
|
-
return e.matches(
|
|
1706
|
+
return e.matches($n) ? e : e.querySelector($n);
|
|
1676
1707
|
}
|
|
1677
1708
|
const to = {
|
|
1678
1709
|
display: "none"
|
|
@@ -1682,7 +1713,7 @@ function no(e) {
|
|
|
1682
1713
|
id: t,
|
|
1683
1714
|
value: n
|
|
1684
1715
|
} = e;
|
|
1685
|
-
return
|
|
1716
|
+
return ve.createElement("div", {
|
|
1686
1717
|
id: t,
|
|
1687
1718
|
style: to
|
|
1688
1719
|
}, n);
|
|
@@ -1707,7 +1738,7 @@ function ro(e) {
|
|
|
1707
1738
|
clipPath: "inset(100%)",
|
|
1708
1739
|
whiteSpace: "nowrap"
|
|
1709
1740
|
};
|
|
1710
|
-
return
|
|
1741
|
+
return ve.createElement("div", {
|
|
1711
1742
|
id: t,
|
|
1712
1743
|
style: o,
|
|
1713
1744
|
role: "status",
|
|
@@ -1718,7 +1749,7 @@ function ro(e) {
|
|
|
1718
1749
|
function io() {
|
|
1719
1750
|
const [e, t] = ee("");
|
|
1720
1751
|
return {
|
|
1721
|
-
announce:
|
|
1752
|
+
announce: L((r) => {
|
|
1722
1753
|
r != null && t(r);
|
|
1723
1754
|
}, []),
|
|
1724
1755
|
announcement: e
|
|
@@ -1727,15 +1758,15 @@ function io() {
|
|
|
1727
1758
|
const br = /* @__PURE__ */ wt(null);
|
|
1728
1759
|
function oo(e) {
|
|
1729
1760
|
const t = Ge(br);
|
|
1730
|
-
|
|
1761
|
+
W(() => {
|
|
1731
1762
|
if (!t)
|
|
1732
1763
|
throw new Error("useDndMonitor must be used within a children of <DndContext>");
|
|
1733
1764
|
return t(e);
|
|
1734
1765
|
}, [e, t]);
|
|
1735
1766
|
}
|
|
1736
1767
|
function so() {
|
|
1737
|
-
const [e] = ee(() => /* @__PURE__ */ new Set()), t =
|
|
1738
|
-
return [
|
|
1768
|
+
const [e] = ee(() => /* @__PURE__ */ new Set()), t = L((r) => (e.add(r), () => e.delete(r)), [e]);
|
|
1769
|
+
return [L((r) => {
|
|
1739
1770
|
let {
|
|
1740
1771
|
type: o,
|
|
1741
1772
|
event: s
|
|
@@ -1790,77 +1821,77 @@ function co(e) {
|
|
|
1790
1821
|
const {
|
|
1791
1822
|
announce: s,
|
|
1792
1823
|
announcement: l
|
|
1793
|
-
} = io(), a = Ct("DndLiveRegion"), [
|
|
1794
|
-
if (
|
|
1824
|
+
} = io(), a = Ct("DndLiveRegion"), [d, p] = ee(!1);
|
|
1825
|
+
if (W(() => {
|
|
1795
1826
|
p(!0);
|
|
1796
|
-
}, []), oo(
|
|
1827
|
+
}, []), oo(V(() => ({
|
|
1797
1828
|
onDragStart(c) {
|
|
1798
1829
|
let {
|
|
1799
|
-
active:
|
|
1830
|
+
active: w
|
|
1800
1831
|
} = c;
|
|
1801
1832
|
s(t.onDragStart({
|
|
1802
|
-
active:
|
|
1833
|
+
active: w
|
|
1803
1834
|
}));
|
|
1804
1835
|
},
|
|
1805
1836
|
onDragMove(c) {
|
|
1806
1837
|
let {
|
|
1807
|
-
active:
|
|
1808
|
-
over:
|
|
1838
|
+
active: w,
|
|
1839
|
+
over: b
|
|
1809
1840
|
} = c;
|
|
1810
1841
|
t.onDragMove && s(t.onDragMove({
|
|
1811
|
-
active:
|
|
1812
|
-
over:
|
|
1842
|
+
active: w,
|
|
1843
|
+
over: b
|
|
1813
1844
|
}));
|
|
1814
1845
|
},
|
|
1815
1846
|
onDragOver(c) {
|
|
1816
1847
|
let {
|
|
1817
|
-
active:
|
|
1818
|
-
over:
|
|
1848
|
+
active: w,
|
|
1849
|
+
over: b
|
|
1819
1850
|
} = c;
|
|
1820
1851
|
s(t.onDragOver({
|
|
1821
|
-
active:
|
|
1822
|
-
over:
|
|
1852
|
+
active: w,
|
|
1853
|
+
over: b
|
|
1823
1854
|
}));
|
|
1824
1855
|
},
|
|
1825
1856
|
onDragEnd(c) {
|
|
1826
1857
|
let {
|
|
1827
|
-
active:
|
|
1828
|
-
over:
|
|
1858
|
+
active: w,
|
|
1859
|
+
over: b
|
|
1829
1860
|
} = c;
|
|
1830
1861
|
s(t.onDragEnd({
|
|
1831
|
-
active:
|
|
1832
|
-
over:
|
|
1862
|
+
active: w,
|
|
1863
|
+
over: b
|
|
1833
1864
|
}));
|
|
1834
1865
|
},
|
|
1835
1866
|
onDragCancel(c) {
|
|
1836
1867
|
let {
|
|
1837
|
-
active:
|
|
1838
|
-
over:
|
|
1868
|
+
active: w,
|
|
1869
|
+
over: b
|
|
1839
1870
|
} = c;
|
|
1840
1871
|
s(t.onDragCancel({
|
|
1841
|
-
active:
|
|
1842
|
-
over:
|
|
1872
|
+
active: w,
|
|
1873
|
+
over: b
|
|
1843
1874
|
}));
|
|
1844
1875
|
}
|
|
1845
|
-
}), [s, t])), !
|
|
1876
|
+
}), [s, t])), !d)
|
|
1846
1877
|
return null;
|
|
1847
|
-
const
|
|
1878
|
+
const v = ve.createElement(ve.Fragment, null, ve.createElement(no, {
|
|
1848
1879
|
id: r,
|
|
1849
1880
|
value: o.draggable
|
|
1850
|
-
}),
|
|
1881
|
+
}), ve.createElement(ro, {
|
|
1851
1882
|
id: a,
|
|
1852
1883
|
announcement: l
|
|
1853
1884
|
}));
|
|
1854
|
-
return n ? Di(
|
|
1885
|
+
return n ? Di(v, n) : v;
|
|
1855
1886
|
}
|
|
1856
|
-
var
|
|
1887
|
+
var fe;
|
|
1857
1888
|
(function(e) {
|
|
1858
1889
|
e.DragStart = "dragStart", e.DragMove = "dragMove", e.DragEnd = "dragEnd", e.DragCancel = "dragCancel", e.DragOver = "dragOver", e.RegisterDroppable = "registerDroppable", e.SetDroppableDisabled = "setDroppableDisabled", e.UnregisterDroppable = "unregisterDroppable";
|
|
1859
|
-
})(
|
|
1890
|
+
})(fe || (fe = {}));
|
|
1860
1891
|
function _t() {
|
|
1861
1892
|
}
|
|
1862
|
-
function
|
|
1863
|
-
return
|
|
1893
|
+
function zn(e, t) {
|
|
1894
|
+
return V(
|
|
1864
1895
|
() => ({
|
|
1865
1896
|
sensor: e,
|
|
1866
1897
|
options: t ?? {}
|
|
@@ -1872,7 +1903,7 @@ function $n(e, t) {
|
|
|
1872
1903
|
function uo() {
|
|
1873
1904
|
for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++)
|
|
1874
1905
|
t[n] = arguments[n];
|
|
1875
|
-
return
|
|
1906
|
+
return V(
|
|
1876
1907
|
() => [...t].filter((r) => r != null),
|
|
1877
1908
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1878
1909
|
[...t]
|
|
@@ -1915,25 +1946,25 @@ function go(e, t) {
|
|
|
1915
1946
|
const [n] = e;
|
|
1916
1947
|
return n[t];
|
|
1917
1948
|
}
|
|
1918
|
-
function
|
|
1949
|
+
function Bn(e, t, n) {
|
|
1919
1950
|
return t === void 0 && (t = e.left), n === void 0 && (n = e.top), {
|
|
1920
1951
|
x: t + e.width * 0.5,
|
|
1921
1952
|
y: n + e.height * 0.5
|
|
1922
1953
|
};
|
|
1923
1954
|
}
|
|
1924
|
-
const
|
|
1955
|
+
const vo = (e) => {
|
|
1925
1956
|
let {
|
|
1926
1957
|
collisionRect: t,
|
|
1927
1958
|
droppableRects: n,
|
|
1928
1959
|
droppableContainers: r
|
|
1929
1960
|
} = e;
|
|
1930
|
-
const o =
|
|
1961
|
+
const o = Bn(t, t.left, t.top), s = [];
|
|
1931
1962
|
for (const l of r) {
|
|
1932
1963
|
const {
|
|
1933
1964
|
id: a
|
|
1934
|
-
} = l,
|
|
1935
|
-
if (
|
|
1936
|
-
const p = fo(
|
|
1965
|
+
} = l, d = n.get(a);
|
|
1966
|
+
if (d) {
|
|
1967
|
+
const p = fo(Bn(d), o);
|
|
1937
1968
|
s.push({
|
|
1938
1969
|
id: a,
|
|
1939
1970
|
data: {
|
|
@@ -1945,10 +1976,10 @@ const bo = (e) => {
|
|
|
1945
1976
|
}
|
|
1946
1977
|
return s.sort(po);
|
|
1947
1978
|
};
|
|
1948
|
-
function
|
|
1979
|
+
function bo(e, t) {
|
|
1949
1980
|
const n = Math.max(t.top, e.top), r = Math.max(t.left, e.left), o = Math.min(t.left + t.width, e.left + e.width), s = Math.min(t.top + t.height, e.top + e.height), l = o - r, a = s - n;
|
|
1950
1981
|
if (r < o && n < s) {
|
|
1951
|
-
const
|
|
1982
|
+
const d = t.width * t.height, p = e.width * e.height, v = l * a, c = v / (d + p - v);
|
|
1952
1983
|
return Number(c.toFixed(4));
|
|
1953
1984
|
}
|
|
1954
1985
|
return 0;
|
|
@@ -1965,12 +1996,12 @@ const mo = (e) => {
|
|
|
1965
1996
|
id: l
|
|
1966
1997
|
} = s, a = n.get(l);
|
|
1967
1998
|
if (a) {
|
|
1968
|
-
const
|
|
1969
|
-
|
|
1999
|
+
const d = bo(a, t);
|
|
2000
|
+
d > 0 && o.push({
|
|
1970
2001
|
id: l,
|
|
1971
2002
|
data: {
|
|
1972
2003
|
droppableContainer: s,
|
|
1973
|
-
value:
|
|
2004
|
+
value: d
|
|
1974
2005
|
}
|
|
1975
2006
|
});
|
|
1976
2007
|
}
|
|
@@ -1984,7 +2015,7 @@ function xo(e, t, n) {
|
|
|
1984
2015
|
scaleY: t && n ? t.height / n.height : 1
|
|
1985
2016
|
};
|
|
1986
2017
|
}
|
|
1987
|
-
function
|
|
2018
|
+
function mr(e, t) {
|
|
1988
2019
|
return e && t ? {
|
|
1989
2020
|
x: e.left - t.left,
|
|
1990
2021
|
y: e.top - t.top
|
|
@@ -2035,14 +2066,14 @@ function Co(e, t, n) {
|
|
|
2035
2066
|
scaleY: s,
|
|
2036
2067
|
x: l,
|
|
2037
2068
|
y: a
|
|
2038
|
-
} = r,
|
|
2069
|
+
} = r, d = e.left - l - (1 - o) * parseFloat(n), p = e.top - a - (1 - s) * parseFloat(n.slice(n.indexOf(" ") + 1)), v = o ? e.width / o : e.width, c = s ? e.height / s : e.height;
|
|
2039
2070
|
return {
|
|
2040
|
-
width:
|
|
2071
|
+
width: v,
|
|
2041
2072
|
height: c,
|
|
2042
2073
|
top: p,
|
|
2043
|
-
right:
|
|
2074
|
+
right: d + v,
|
|
2044
2075
|
bottom: p + c,
|
|
2045
|
-
left:
|
|
2076
|
+
left: d
|
|
2046
2077
|
};
|
|
2047
2078
|
}
|
|
2048
2079
|
const So = {
|
|
@@ -2054,9 +2085,9 @@ function rt(e, t) {
|
|
|
2054
2085
|
if (t.ignoreTransform) {
|
|
2055
2086
|
const {
|
|
2056
2087
|
transform: p,
|
|
2057
|
-
transformOrigin:
|
|
2058
|
-
} =
|
|
2059
|
-
p && (n = Co(n, p,
|
|
2088
|
+
transformOrigin: v
|
|
2089
|
+
} = Se(e).getComputedStyle(e);
|
|
2090
|
+
p && (n = Co(n, p, v));
|
|
2060
2091
|
}
|
|
2061
2092
|
const {
|
|
2062
2093
|
top: r,
|
|
@@ -2064,7 +2095,7 @@ function rt(e, t) {
|
|
|
2064
2095
|
width: s,
|
|
2065
2096
|
height: l,
|
|
2066
2097
|
bottom: a,
|
|
2067
|
-
right:
|
|
2098
|
+
right: d
|
|
2068
2099
|
} = n;
|
|
2069
2100
|
return {
|
|
2070
2101
|
top: r,
|
|
@@ -2072,10 +2103,10 @@ function rt(e, t) {
|
|
|
2072
2103
|
width: s,
|
|
2073
2104
|
height: l,
|
|
2074
2105
|
bottom: a,
|
|
2075
|
-
right:
|
|
2106
|
+
right: d
|
|
2076
2107
|
};
|
|
2077
2108
|
}
|
|
2078
|
-
function
|
|
2109
|
+
function Un(e) {
|
|
2079
2110
|
return rt(e, {
|
|
2080
2111
|
ignoreTransform: !0
|
|
2081
2112
|
});
|
|
@@ -2092,61 +2123,61 @@ function No(e) {
|
|
|
2092
2123
|
};
|
|
2093
2124
|
}
|
|
2094
2125
|
function Do(e, t) {
|
|
2095
|
-
return t === void 0 && (t =
|
|
2126
|
+
return t === void 0 && (t = Se(e).getComputedStyle(e)), t.position === "fixed";
|
|
2096
2127
|
}
|
|
2097
2128
|
function Ro(e, t) {
|
|
2098
|
-
t === void 0 && (t =
|
|
2129
|
+
t === void 0 && (t = Se(e).getComputedStyle(e));
|
|
2099
2130
|
const n = /(auto|scroll|overlay)/;
|
|
2100
2131
|
return ["overflow", "overflowX", "overflowY"].some((o) => {
|
|
2101
2132
|
const s = t[o];
|
|
2102
2133
|
return typeof s == "string" ? n.test(s) : !1;
|
|
2103
2134
|
});
|
|
2104
2135
|
}
|
|
2105
|
-
function
|
|
2136
|
+
function bn(e, t) {
|
|
2106
2137
|
const n = [];
|
|
2107
2138
|
function r(o) {
|
|
2108
2139
|
if (t != null && n.length >= t || !o)
|
|
2109
2140
|
return n;
|
|
2110
2141
|
if (hn(o) && o.scrollingElement != null && !n.includes(o.scrollingElement))
|
|
2111
2142
|
return n.push(o.scrollingElement), n;
|
|
2112
|
-
if (!yt(o) ||
|
|
2143
|
+
if (!yt(o) || gr(o) || n.includes(o))
|
|
2113
2144
|
return n;
|
|
2114
|
-
const s =
|
|
2145
|
+
const s = Se(e).getComputedStyle(o);
|
|
2115
2146
|
return o !== e && Ro(o, s) && n.push(o), Do(o, s) ? n : r(o.parentNode);
|
|
2116
2147
|
}
|
|
2117
2148
|
return e ? r(e) : n;
|
|
2118
2149
|
}
|
|
2119
|
-
function
|
|
2120
|
-
const [t] =
|
|
2150
|
+
function xr(e) {
|
|
2151
|
+
const [t] = bn(e, 1);
|
|
2121
2152
|
return t ?? null;
|
|
2122
2153
|
}
|
|
2123
2154
|
function en(e) {
|
|
2124
2155
|
return !zt || !e ? null : tt(e) ? e : pn(e) ? hn(e) || e === nt(e).scrollingElement ? window : yt(e) ? e : null : null;
|
|
2125
2156
|
}
|
|
2126
|
-
function
|
|
2157
|
+
function wr(e) {
|
|
2127
2158
|
return tt(e) ? e.scrollX : e.scrollLeft;
|
|
2128
2159
|
}
|
|
2129
|
-
function
|
|
2160
|
+
function yr(e) {
|
|
2130
2161
|
return tt(e) ? e.scrollY : e.scrollTop;
|
|
2131
2162
|
}
|
|
2132
2163
|
function ln(e) {
|
|
2133
2164
|
return {
|
|
2134
|
-
x:
|
|
2135
|
-
y:
|
|
2165
|
+
x: wr(e),
|
|
2166
|
+
y: yr(e)
|
|
2136
2167
|
};
|
|
2137
2168
|
}
|
|
2138
|
-
var
|
|
2169
|
+
var ge;
|
|
2139
2170
|
(function(e) {
|
|
2140
2171
|
e[e.Forward = 1] = "Forward", e[e.Backward = -1] = "Backward";
|
|
2141
|
-
})(
|
|
2142
|
-
function
|
|
2172
|
+
})(ge || (ge = {}));
|
|
2173
|
+
function jr(e) {
|
|
2143
2174
|
return !zt || !e ? !1 : e === document.scrollingElement;
|
|
2144
2175
|
}
|
|
2145
|
-
function
|
|
2176
|
+
function Cr(e) {
|
|
2146
2177
|
const t = {
|
|
2147
2178
|
x: 0,
|
|
2148
2179
|
y: 0
|
|
2149
|
-
}, n =
|
|
2180
|
+
}, n = jr(e) ? {
|
|
2150
2181
|
height: window.innerHeight,
|
|
2151
2182
|
width: window.innerWidth
|
|
2152
2183
|
} : {
|
|
@@ -2174,15 +2205,15 @@ function Ao(e, t, n, r, o) {
|
|
|
2174
2205
|
top: s,
|
|
2175
2206
|
left: l,
|
|
2176
2207
|
right: a,
|
|
2177
|
-
bottom:
|
|
2208
|
+
bottom: d
|
|
2178
2209
|
} = n;
|
|
2179
2210
|
r === void 0 && (r = 10), o === void 0 && (o = Eo);
|
|
2180
2211
|
const {
|
|
2181
2212
|
isTop: p,
|
|
2182
|
-
isBottom:
|
|
2213
|
+
isBottom: v,
|
|
2183
2214
|
isLeft: c,
|
|
2184
|
-
isRight:
|
|
2185
|
-
} =
|
|
2215
|
+
isRight: w
|
|
2216
|
+
} = Cr(e), b = {
|
|
2186
2217
|
x: 0,
|
|
2187
2218
|
y: 0
|
|
2188
2219
|
}, S = {
|
|
@@ -2192,8 +2223,8 @@ function Ao(e, t, n, r, o) {
|
|
|
2192
2223
|
height: t.height * o.y,
|
|
2193
2224
|
width: t.width * o.x
|
|
2194
2225
|
};
|
|
2195
|
-
return !p && s <= t.top + f.height ? (
|
|
2196
|
-
direction:
|
|
2226
|
+
return !p && s <= t.top + f.height ? (b.y = ge.Backward, S.y = r * Math.abs((t.top + f.height - s) / f.height)) : !v && d >= t.bottom - f.height && (b.y = ge.Forward, S.y = r * Math.abs((t.bottom - f.height - d) / f.height)), !w && a >= t.right - f.width ? (b.x = ge.Forward, S.x = r * Math.abs((t.right - f.width - a) / f.width)) : !c && l <= t.left + f.width && (b.x = ge.Backward, S.x = r * Math.abs((t.left + f.width - l) / f.width)), {
|
|
2227
|
+
direction: b,
|
|
2197
2228
|
speed: S
|
|
2198
2229
|
};
|
|
2199
2230
|
}
|
|
@@ -2227,14 +2258,14 @@ function To(e) {
|
|
|
2227
2258
|
height: e.clientHeight
|
|
2228
2259
|
};
|
|
2229
2260
|
}
|
|
2230
|
-
function
|
|
2261
|
+
function Sr(e) {
|
|
2231
2262
|
return e.reduce((t, n) => Ze(t, ln(n)), Oe);
|
|
2232
2263
|
}
|
|
2233
2264
|
function Fo(e) {
|
|
2234
|
-
return e.reduce((t, n) => t +
|
|
2265
|
+
return e.reduce((t, n) => t + wr(n), 0);
|
|
2235
2266
|
}
|
|
2236
2267
|
function Oo(e) {
|
|
2237
|
-
return e.reduce((t, n) => t +
|
|
2268
|
+
return e.reduce((t, n) => t + yr(n), 0);
|
|
2238
2269
|
}
|
|
2239
2270
|
function Io(e, t) {
|
|
2240
2271
|
if (t === void 0 && (t = rt), !e)
|
|
@@ -2245,7 +2276,7 @@ function Io(e, t) {
|
|
|
2245
2276
|
bottom: o,
|
|
2246
2277
|
right: s
|
|
2247
2278
|
} = t(e);
|
|
2248
|
-
|
|
2279
|
+
xr(e) && (o <= 0 || s <= 0 || n >= window.innerHeight || r >= window.innerWidth) && e.scrollIntoView({
|
|
2249
2280
|
block: "center",
|
|
2250
2281
|
inline: "center"
|
|
2251
2282
|
});
|
|
@@ -2254,16 +2285,16 @@ const ko = [["x", ["left", "right"], Fo], ["y", ["top", "bottom"], Oo]];
|
|
|
2254
2285
|
class mn {
|
|
2255
2286
|
constructor(t, n) {
|
|
2256
2287
|
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;
|
|
2257
|
-
const r =
|
|
2288
|
+
const r = bn(n), o = Sr(r);
|
|
2258
2289
|
this.rect = {
|
|
2259
2290
|
...t
|
|
2260
2291
|
}, this.width = t.width, this.height = t.height;
|
|
2261
2292
|
for (const [s, l, a] of ko)
|
|
2262
|
-
for (const
|
|
2263
|
-
Object.defineProperty(this,
|
|
2293
|
+
for (const d of l)
|
|
2294
|
+
Object.defineProperty(this, d, {
|
|
2264
2295
|
get: () => {
|
|
2265
|
-
const p = a(r),
|
|
2266
|
-
return this.rect[
|
|
2296
|
+
const p = a(r), v = o[s] - p;
|
|
2297
|
+
return this.rect[d] + v;
|
|
2267
2298
|
},
|
|
2268
2299
|
enumerable: !0
|
|
2269
2300
|
});
|
|
@@ -2289,7 +2320,7 @@ class ht {
|
|
|
2289
2320
|
function Vo(e) {
|
|
2290
2321
|
const {
|
|
2291
2322
|
EventTarget: t
|
|
2292
|
-
} =
|
|
2323
|
+
} = Se(e);
|
|
2293
2324
|
return e instanceof t ? e : nt(e);
|
|
2294
2325
|
}
|
|
2295
2326
|
function tn(e, t) {
|
|
@@ -2300,41 +2331,41 @@ var Fe;
|
|
|
2300
2331
|
(function(e) {
|
|
2301
2332
|
e.Click = "click", e.DragStart = "dragstart", e.Keydown = "keydown", e.ContextMenu = "contextmenu", e.Resize = "resize", e.SelectionChange = "selectionchange", e.VisibilityChange = "visibilitychange";
|
|
2302
2333
|
})(Fe || (Fe = {}));
|
|
2303
|
-
function
|
|
2334
|
+
function Yn(e) {
|
|
2304
2335
|
e.preventDefault();
|
|
2305
2336
|
}
|
|
2306
2337
|
function Mo(e) {
|
|
2307
2338
|
e.stopPropagation();
|
|
2308
2339
|
}
|
|
2309
|
-
var
|
|
2340
|
+
var z;
|
|
2310
2341
|
(function(e) {
|
|
2311
2342
|
e.Space = "Space", e.Down = "ArrowDown", e.Right = "ArrowRight", e.Left = "ArrowLeft", e.Up = "ArrowUp", e.Esc = "Escape", e.Enter = "Enter", e.Tab = "Tab";
|
|
2312
|
-
})(
|
|
2313
|
-
const
|
|
2314
|
-
start: [
|
|
2315
|
-
cancel: [
|
|
2316
|
-
end: [
|
|
2343
|
+
})(z || (z = {}));
|
|
2344
|
+
const Nr = {
|
|
2345
|
+
start: [z.Space, z.Enter],
|
|
2346
|
+
cancel: [z.Esc],
|
|
2347
|
+
end: [z.Space, z.Enter, z.Tab]
|
|
2317
2348
|
}, Po = (e, t) => {
|
|
2318
2349
|
let {
|
|
2319
2350
|
currentCoordinates: n
|
|
2320
2351
|
} = t;
|
|
2321
2352
|
switch (e.code) {
|
|
2322
|
-
case
|
|
2353
|
+
case z.Right:
|
|
2323
2354
|
return {
|
|
2324
2355
|
...n,
|
|
2325
2356
|
x: n.x + 25
|
|
2326
2357
|
};
|
|
2327
|
-
case
|
|
2358
|
+
case z.Left:
|
|
2328
2359
|
return {
|
|
2329
2360
|
...n,
|
|
2330
2361
|
x: n.x - 25
|
|
2331
2362
|
};
|
|
2332
|
-
case
|
|
2363
|
+
case z.Down:
|
|
2333
2364
|
return {
|
|
2334
2365
|
...n,
|
|
2335
2366
|
y: n.y + 25
|
|
2336
2367
|
};
|
|
2337
|
-
case
|
|
2368
|
+
case z.Up:
|
|
2338
2369
|
return {
|
|
2339
2370
|
...n,
|
|
2340
2371
|
y: n.y - 25
|
|
@@ -2349,7 +2380,7 @@ class xn {
|
|
|
2349
2380
|
target: n
|
|
2350
2381
|
}
|
|
2351
2382
|
} = t;
|
|
2352
|
-
this.props = t, this.listeners = new ht(nt(n)), this.windowListeners = new ht(
|
|
2383
|
+
this.props = t, this.listeners = new ht(nt(n)), this.windowListeners = new ht(Se(n)), this.handleKeyDown = this.handleKeyDown.bind(this), this.handleCancel = this.handleCancel.bind(this), this.attach();
|
|
2353
2384
|
}
|
|
2354
2385
|
attach() {
|
|
2355
2386
|
this.handleStart(), this.windowListeners.add(Fe.Resize, this.handleCancel), this.windowListeners.add(Fe.VisibilityChange, this.handleCancel), setTimeout(() => this.listeners.add(Fe.Keydown, this.handleKeyDown));
|
|
@@ -2362,40 +2393,40 @@ class xn {
|
|
|
2362
2393
|
r && Io(r), n(Oe);
|
|
2363
2394
|
}
|
|
2364
2395
|
handleKeyDown(t) {
|
|
2365
|
-
if (
|
|
2396
|
+
if (vn(t)) {
|
|
2366
2397
|
const {
|
|
2367
2398
|
active: n,
|
|
2368
2399
|
context: r,
|
|
2369
2400
|
options: o
|
|
2370
2401
|
} = this.props, {
|
|
2371
|
-
keyboardCodes: s =
|
|
2402
|
+
keyboardCodes: s = Nr,
|
|
2372
2403
|
coordinateGetter: l = Po,
|
|
2373
2404
|
scrollBehavior: a = "smooth"
|
|
2374
2405
|
} = o, {
|
|
2375
|
-
code:
|
|
2406
|
+
code: d
|
|
2376
2407
|
} = t;
|
|
2377
|
-
if (s.end.includes(
|
|
2408
|
+
if (s.end.includes(d)) {
|
|
2378
2409
|
this.handleEnd(t);
|
|
2379
2410
|
return;
|
|
2380
2411
|
}
|
|
2381
|
-
if (s.cancel.includes(
|
|
2412
|
+
if (s.cancel.includes(d)) {
|
|
2382
2413
|
this.handleCancel(t);
|
|
2383
2414
|
return;
|
|
2384
2415
|
}
|
|
2385
2416
|
const {
|
|
2386
2417
|
collisionRect: p
|
|
2387
|
-
} = r.current,
|
|
2418
|
+
} = r.current, v = p ? {
|
|
2388
2419
|
x: p.left,
|
|
2389
2420
|
y: p.top
|
|
2390
2421
|
} : Oe;
|
|
2391
|
-
this.referenceCoordinates || (this.referenceCoordinates =
|
|
2422
|
+
this.referenceCoordinates || (this.referenceCoordinates = v);
|
|
2392
2423
|
const c = l(t, {
|
|
2393
2424
|
active: n,
|
|
2394
2425
|
context: r.current,
|
|
2395
|
-
currentCoordinates:
|
|
2426
|
+
currentCoordinates: v
|
|
2396
2427
|
});
|
|
2397
2428
|
if (c) {
|
|
2398
|
-
const
|
|
2429
|
+
const w = Lt(c, v), b = {
|
|
2399
2430
|
x: 0,
|
|
2400
2431
|
y: 0
|
|
2401
2432
|
}, {
|
|
@@ -2404,46 +2435,46 @@ class xn {
|
|
|
2404
2435
|
for (const f of S) {
|
|
2405
2436
|
const j = t.code, {
|
|
2406
2437
|
isTop: N,
|
|
2407
|
-
isRight:
|
|
2438
|
+
isRight: m,
|
|
2408
2439
|
isLeft: C,
|
|
2409
|
-
isBottom:
|
|
2410
|
-
maxScroll:
|
|
2411
|
-
minScroll:
|
|
2412
|
-
} =
|
|
2413
|
-
x: Math.min(j ===
|
|
2414
|
-
y: Math.min(j ===
|
|
2415
|
-
}, I = j ===
|
|
2416
|
-
if (I &&
|
|
2417
|
-
const
|
|
2418
|
-
if (
|
|
2440
|
+
isBottom: A,
|
|
2441
|
+
maxScroll: F,
|
|
2442
|
+
minScroll: k
|
|
2443
|
+
} = Cr(f), x = To(f), R = {
|
|
2444
|
+
x: Math.min(j === z.Right ? x.right - x.width / 2 : x.right, Math.max(j === z.Right ? x.left : x.left + x.width / 2, c.x)),
|
|
2445
|
+
y: Math.min(j === z.Down ? x.bottom - x.height / 2 : x.bottom, Math.max(j === z.Down ? x.top : x.top + x.height / 2, c.y))
|
|
2446
|
+
}, I = j === z.Right && !m || j === z.Left && !C, M = j === z.Down && !A || j === z.Up && !N;
|
|
2447
|
+
if (I && R.x !== c.x) {
|
|
2448
|
+
const _ = f.scrollLeft + w.x, B = j === z.Right && _ <= F.x || j === z.Left && _ >= k.x;
|
|
2449
|
+
if (B && !w.y) {
|
|
2419
2450
|
f.scrollTo({
|
|
2420
|
-
left:
|
|
2451
|
+
left: _,
|
|
2421
2452
|
behavior: a
|
|
2422
2453
|
});
|
|
2423
2454
|
return;
|
|
2424
2455
|
}
|
|
2425
|
-
|
|
2426
|
-
left: -
|
|
2456
|
+
B ? b.x = f.scrollLeft - _ : b.x = j === z.Right ? f.scrollLeft - F.x : f.scrollLeft - k.x, b.x && f.scrollBy({
|
|
2457
|
+
left: -b.x,
|
|
2427
2458
|
behavior: a
|
|
2428
2459
|
});
|
|
2429
2460
|
break;
|
|
2430
|
-
} else if (M &&
|
|
2431
|
-
const
|
|
2432
|
-
if (
|
|
2461
|
+
} else if (M && R.y !== c.y) {
|
|
2462
|
+
const _ = f.scrollTop + w.y, B = j === z.Down && _ <= F.y || j === z.Up && _ >= k.y;
|
|
2463
|
+
if (B && !w.x) {
|
|
2433
2464
|
f.scrollTo({
|
|
2434
|
-
top:
|
|
2465
|
+
top: _,
|
|
2435
2466
|
behavior: a
|
|
2436
2467
|
});
|
|
2437
2468
|
return;
|
|
2438
2469
|
}
|
|
2439
|
-
|
|
2440
|
-
top: -
|
|
2470
|
+
B ? b.y = f.scrollTop - _ : b.y = j === z.Down ? f.scrollTop - F.y : f.scrollTop - k.y, b.y && f.scrollBy({
|
|
2471
|
+
top: -b.y,
|
|
2441
2472
|
behavior: a
|
|
2442
2473
|
});
|
|
2443
2474
|
break;
|
|
2444
2475
|
}
|
|
2445
2476
|
}
|
|
2446
|
-
this.handleMove(t, Ze(Lt(c, this.referenceCoordinates),
|
|
2477
|
+
this.handleMove(t, Ze(Lt(c, this.referenceCoordinates), b));
|
|
2447
2478
|
}
|
|
2448
2479
|
}
|
|
2449
2480
|
}
|
|
@@ -2473,7 +2504,7 @@ xn.activators = [{
|
|
|
2473
2504
|
eventName: "onKeyDown",
|
|
2474
2505
|
handler: (e, t, n) => {
|
|
2475
2506
|
let {
|
|
2476
|
-
keyboardCodes: r =
|
|
2507
|
+
keyboardCodes: r = Nr,
|
|
2477
2508
|
onActivation: o
|
|
2478
2509
|
} = t, {
|
|
2479
2510
|
active: s
|
|
@@ -2490,10 +2521,10 @@ xn.activators = [{
|
|
|
2490
2521
|
return !1;
|
|
2491
2522
|
}
|
|
2492
2523
|
}];
|
|
2493
|
-
function
|
|
2524
|
+
function Wn(e) {
|
|
2494
2525
|
return !!(e && "distance" in e);
|
|
2495
2526
|
}
|
|
2496
|
-
function
|
|
2527
|
+
function Gn(e) {
|
|
2497
2528
|
return !!(e && "delay" in e);
|
|
2498
2529
|
}
|
|
2499
2530
|
class wn {
|
|
@@ -2505,7 +2536,7 @@ class wn {
|
|
|
2505
2536
|
} = t, {
|
|
2506
2537
|
target: l
|
|
2507
2538
|
} = s;
|
|
2508
|
-
this.props = t, this.events = n, this.document = nt(l), this.documentListeners = new ht(this.document), this.listeners = new ht(r), this.windowListeners = new ht(
|
|
2539
|
+
this.props = t, this.events = n, this.document = nt(l), this.documentListeners = new ht(this.document), this.listeners = new ht(r), this.windowListeners = new ht(Se(l)), this.initialCoordinates = (o = an(s)) != null ? o : Oe, 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();
|
|
2509
2540
|
}
|
|
2510
2541
|
attach() {
|
|
2511
2542
|
const {
|
|
@@ -2519,18 +2550,18 @@ class wn {
|
|
|
2519
2550
|
} = this;
|
|
2520
2551
|
if (this.listeners.add(t.move.name, this.handleMove, {
|
|
2521
2552
|
passive: !1
|
|
2522
|
-
}), this.listeners.add(t.end.name, this.handleEnd), t.cancel && this.listeners.add(t.cancel.name, this.handleCancel), this.windowListeners.add(Fe.Resize, this.handleCancel), this.windowListeners.add(Fe.DragStart,
|
|
2553
|
+
}), this.listeners.add(t.end.name, this.handleEnd), t.cancel && this.listeners.add(t.cancel.name, this.handleCancel), this.windowListeners.add(Fe.Resize, this.handleCancel), this.windowListeners.add(Fe.DragStart, Yn), this.windowListeners.add(Fe.VisibilityChange, this.handleCancel), this.windowListeners.add(Fe.ContextMenu, Yn), this.documentListeners.add(Fe.Keydown, this.handleKeydown), n) {
|
|
2523
2554
|
if (r != null && r({
|
|
2524
2555
|
event: this.props.event,
|
|
2525
2556
|
activeNode: this.props.activeNode,
|
|
2526
2557
|
options: this.props.options
|
|
2527
2558
|
}))
|
|
2528
2559
|
return this.handleStart();
|
|
2529
|
-
if (
|
|
2560
|
+
if (Gn(n)) {
|
|
2530
2561
|
this.timeoutId = setTimeout(this.handleStart, n.delay), this.handlePending(n);
|
|
2531
2562
|
return;
|
|
2532
2563
|
}
|
|
2533
|
-
if (
|
|
2564
|
+
if (Wn(n)) {
|
|
2534
2565
|
this.handlePending(n);
|
|
2535
2566
|
return;
|
|
2536
2567
|
}
|
|
@@ -2571,20 +2602,20 @@ class wn {
|
|
|
2571
2602
|
} = s;
|
|
2572
2603
|
if (!o)
|
|
2573
2604
|
return;
|
|
2574
|
-
const
|
|
2605
|
+
const d = (n = an(t)) != null ? n : Oe, p = Lt(o, d);
|
|
2575
2606
|
if (!r && a) {
|
|
2576
|
-
if (
|
|
2607
|
+
if (Wn(a)) {
|
|
2577
2608
|
if (a.tolerance != null && tn(p, a.tolerance))
|
|
2578
2609
|
return this.handleCancel();
|
|
2579
2610
|
if (tn(p, a.distance))
|
|
2580
2611
|
return this.handleStart();
|
|
2581
2612
|
}
|
|
2582
|
-
if (
|
|
2613
|
+
if (Gn(a) && tn(p, a.tolerance))
|
|
2583
2614
|
return this.handleCancel();
|
|
2584
2615
|
this.handlePending(a, p);
|
|
2585
2616
|
return;
|
|
2586
2617
|
}
|
|
2587
|
-
t.cancelable && t.preventDefault(), l(
|
|
2618
|
+
t.cancelable && t.preventDefault(), l(d);
|
|
2588
2619
|
}
|
|
2589
2620
|
handleEnd() {
|
|
2590
2621
|
const {
|
|
@@ -2601,7 +2632,7 @@ class wn {
|
|
|
2601
2632
|
this.detach(), this.activated || t(this.props.active), n();
|
|
2602
2633
|
}
|
|
2603
2634
|
handleKeydown(t) {
|
|
2604
|
-
t.code ===
|
|
2635
|
+
t.code === z.Esc && this.handleCancel();
|
|
2605
2636
|
}
|
|
2606
2637
|
removeTextSelection() {
|
|
2607
2638
|
var t;
|
|
@@ -2729,13 +2760,13 @@ function Bo(e) {
|
|
|
2729
2760
|
enabled: s,
|
|
2730
2761
|
interval: l = 5,
|
|
2731
2762
|
order: a = $t.TreeOrder,
|
|
2732
|
-
pointerCoordinates:
|
|
2763
|
+
pointerCoordinates: d,
|
|
2733
2764
|
scrollableAncestors: p,
|
|
2734
|
-
scrollableAncestorRects:
|
|
2765
|
+
scrollableAncestorRects: v,
|
|
2735
2766
|
delta: c,
|
|
2736
|
-
threshold:
|
|
2767
|
+
threshold: w
|
|
2737
2768
|
} = e;
|
|
2738
|
-
const
|
|
2769
|
+
const b = Yo({
|
|
2739
2770
|
delta: c,
|
|
2740
2771
|
disabled: !s
|
|
2741
2772
|
}), [S, f] = Ji(), j = q({
|
|
@@ -2744,45 +2775,45 @@ function Bo(e) {
|
|
|
2744
2775
|
}), N = q({
|
|
2745
2776
|
x: 0,
|
|
2746
2777
|
y: 0
|
|
2747
|
-
}),
|
|
2778
|
+
}), m = V(() => {
|
|
2748
2779
|
switch (n) {
|
|
2749
2780
|
case gt.Pointer:
|
|
2750
|
-
return
|
|
2751
|
-
top:
|
|
2752
|
-
bottom:
|
|
2753
|
-
left:
|
|
2754
|
-
right:
|
|
2781
|
+
return d ? {
|
|
2782
|
+
top: d.y,
|
|
2783
|
+
bottom: d.y,
|
|
2784
|
+
left: d.x,
|
|
2785
|
+
right: d.x
|
|
2755
2786
|
} : null;
|
|
2756
2787
|
case gt.DraggableRect:
|
|
2757
2788
|
return o;
|
|
2758
2789
|
}
|
|
2759
|
-
}, [n, o,
|
|
2760
|
-
const
|
|
2761
|
-
if (!
|
|
2790
|
+
}, [n, o, d]), C = q(null), A = L(() => {
|
|
2791
|
+
const k = C.current;
|
|
2792
|
+
if (!k)
|
|
2762
2793
|
return;
|
|
2763
|
-
const x = j.current.x * N.current.x,
|
|
2764
|
-
|
|
2765
|
-
}, []),
|
|
2766
|
-
|
|
2794
|
+
const x = j.current.x * N.current.x, R = j.current.y * N.current.y;
|
|
2795
|
+
k.scrollBy(x, R);
|
|
2796
|
+
}, []), F = V(() => a === $t.TreeOrder ? [...p].reverse() : p, [a, p]);
|
|
2797
|
+
W(
|
|
2767
2798
|
() => {
|
|
2768
|
-
if (!s || !p.length || !
|
|
2799
|
+
if (!s || !p.length || !m) {
|
|
2769
2800
|
f();
|
|
2770
2801
|
return;
|
|
2771
2802
|
}
|
|
2772
|
-
for (const
|
|
2773
|
-
if (r?.(
|
|
2803
|
+
for (const k of F) {
|
|
2804
|
+
if (r?.(k) === !1)
|
|
2774
2805
|
continue;
|
|
2775
|
-
const x = p.indexOf(
|
|
2776
|
-
if (!
|
|
2806
|
+
const x = p.indexOf(k), R = v[x];
|
|
2807
|
+
if (!R)
|
|
2777
2808
|
continue;
|
|
2778
2809
|
const {
|
|
2779
2810
|
direction: I,
|
|
2780
2811
|
speed: M
|
|
2781
|
-
} = Ao(
|
|
2782
|
-
for (const
|
|
2783
|
-
|
|
2812
|
+
} = Ao(k, R, m, t, w);
|
|
2813
|
+
for (const _ of ["x", "y"])
|
|
2814
|
+
b[_][I[_]] || (M[_] = 0, I[_] = 0);
|
|
2784
2815
|
if (M.x > 0 || M.y > 0) {
|
|
2785
|
-
f(), C.current =
|
|
2816
|
+
f(), C.current = k, S(A, l), j.current = M, N.current = I;
|
|
2786
2817
|
return;
|
|
2787
2818
|
}
|
|
2788
2819
|
}
|
|
@@ -2797,32 +2828,32 @@ function Bo(e) {
|
|
|
2797
2828
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2798
2829
|
[
|
|
2799
2830
|
t,
|
|
2800
|
-
|
|
2831
|
+
A,
|
|
2801
2832
|
r,
|
|
2802
2833
|
f,
|
|
2803
2834
|
s,
|
|
2804
2835
|
l,
|
|
2805
2836
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2806
|
-
JSON.stringify(
|
|
2837
|
+
JSON.stringify(m),
|
|
2807
2838
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2808
|
-
JSON.stringify(
|
|
2839
|
+
JSON.stringify(b),
|
|
2809
2840
|
S,
|
|
2810
2841
|
p,
|
|
2811
|
-
|
|
2812
|
-
|
|
2842
|
+
F,
|
|
2843
|
+
v,
|
|
2813
2844
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2814
|
-
JSON.stringify(
|
|
2845
|
+
JSON.stringify(w)
|
|
2815
2846
|
]
|
|
2816
2847
|
);
|
|
2817
2848
|
}
|
|
2818
2849
|
const Uo = {
|
|
2819
2850
|
x: {
|
|
2820
|
-
[
|
|
2821
|
-
[
|
|
2851
|
+
[ge.Backward]: !1,
|
|
2852
|
+
[ge.Forward]: !1
|
|
2822
2853
|
},
|
|
2823
2854
|
y: {
|
|
2824
|
-
[
|
|
2825
|
-
[
|
|
2855
|
+
[ge.Backward]: !1,
|
|
2856
|
+
[ge.Forward]: !1
|
|
2826
2857
|
}
|
|
2827
2858
|
};
|
|
2828
2859
|
function Yo(e) {
|
|
@@ -2840,12 +2871,12 @@ function Yo(e) {
|
|
|
2840
2871
|
};
|
|
2841
2872
|
return {
|
|
2842
2873
|
x: {
|
|
2843
|
-
[
|
|
2844
|
-
[
|
|
2874
|
+
[ge.Backward]: o.x[ge.Backward] || s.x === -1,
|
|
2875
|
+
[ge.Forward]: o.x[ge.Forward] || s.x === 1
|
|
2845
2876
|
},
|
|
2846
2877
|
y: {
|
|
2847
|
-
[
|
|
2848
|
-
[
|
|
2878
|
+
[ge.Backward]: o.y[ge.Backward] || s.y === -1,
|
|
2879
|
+
[ge.Forward]: o.y[ge.Forward] || s.y === 1
|
|
2849
2880
|
}
|
|
2850
2881
|
};
|
|
2851
2882
|
}, [n, t, r]);
|
|
@@ -2858,7 +2889,7 @@ function Wo(e, t) {
|
|
|
2858
2889
|
}, [r, t]);
|
|
2859
2890
|
}
|
|
2860
2891
|
function Go(e, t) {
|
|
2861
|
-
return
|
|
2892
|
+
return V(() => e.reduce((n, r) => {
|
|
2862
2893
|
const {
|
|
2863
2894
|
sensor: o
|
|
2864
2895
|
} = r, s = o.activators.map((l) => ({
|
|
@@ -2876,7 +2907,7 @@ var dn;
|
|
|
2876
2907
|
(function(e) {
|
|
2877
2908
|
e.Optimized = "optimized";
|
|
2878
2909
|
})(dn || (dn = {}));
|
|
2879
|
-
const
|
|
2910
|
+
const Hn = /* @__PURE__ */ new Map();
|
|
2880
2911
|
function Ho(e, t) {
|
|
2881
2912
|
let {
|
|
2882
2913
|
dragging: n,
|
|
@@ -2885,54 +2916,54 @@ function Ho(e, t) {
|
|
|
2885
2916
|
} = t;
|
|
2886
2917
|
const [s, l] = ee(null), {
|
|
2887
2918
|
frequency: a,
|
|
2888
|
-
measure:
|
|
2919
|
+
measure: d,
|
|
2889
2920
|
strategy: p
|
|
2890
|
-
} = o,
|
|
2891
|
-
N === void 0 && (N = []), !
|
|
2892
|
-
}, [
|
|
2921
|
+
} = o, v = q(e), c = j(), w = bt(c), b = L(function(N) {
|
|
2922
|
+
N === void 0 && (N = []), !w.current && l((m) => m === null ? N : m.concat(N.filter((C) => !m.includes(C))));
|
|
2923
|
+
}, [w]), S = q(null), f = jt((N) => {
|
|
2893
2924
|
if (c && !n)
|
|
2894
|
-
return
|
|
2895
|
-
if (!N || N ===
|
|
2896
|
-
const
|
|
2925
|
+
return Hn;
|
|
2926
|
+
if (!N || N === Hn || v.current !== e || s != null) {
|
|
2927
|
+
const m = /* @__PURE__ */ new Map();
|
|
2897
2928
|
for (let C of e) {
|
|
2898
2929
|
if (!C)
|
|
2899
2930
|
continue;
|
|
2900
2931
|
if (s && s.length > 0 && !s.includes(C.id) && C.rect.current) {
|
|
2901
|
-
|
|
2932
|
+
m.set(C.id, C.rect.current);
|
|
2902
2933
|
continue;
|
|
2903
2934
|
}
|
|
2904
|
-
const
|
|
2905
|
-
C.rect.current =
|
|
2935
|
+
const A = C.node.current, F = A ? new mn(d(A), A) : null;
|
|
2936
|
+
C.rect.current = F, F && m.set(C.id, F);
|
|
2906
2937
|
}
|
|
2907
|
-
return
|
|
2938
|
+
return m;
|
|
2908
2939
|
}
|
|
2909
2940
|
return N;
|
|
2910
|
-
}, [e, s, n, c,
|
|
2911
|
-
return
|
|
2912
|
-
|
|
2913
|
-
}, [e]),
|
|
2941
|
+
}, [e, s, n, c, d]);
|
|
2942
|
+
return W(() => {
|
|
2943
|
+
v.current = e;
|
|
2944
|
+
}, [e]), W(
|
|
2914
2945
|
() => {
|
|
2915
|
-
c ||
|
|
2946
|
+
c || b();
|
|
2916
2947
|
},
|
|
2917
2948
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2918
2949
|
[n, c]
|
|
2919
|
-
),
|
|
2950
|
+
), W(
|
|
2920
2951
|
() => {
|
|
2921
2952
|
s && s.length > 0 && l(null);
|
|
2922
2953
|
},
|
|
2923
2954
|
//eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2924
2955
|
[JSON.stringify(s)]
|
|
2925
|
-
),
|
|
2956
|
+
), W(
|
|
2926
2957
|
() => {
|
|
2927
2958
|
c || typeof a != "number" || S.current !== null || (S.current = setTimeout(() => {
|
|
2928
|
-
|
|
2959
|
+
b(), S.current = null;
|
|
2929
2960
|
}, a));
|
|
2930
2961
|
},
|
|
2931
2962
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2932
|
-
[a, c,
|
|
2963
|
+
[a, c, b, ...r]
|
|
2933
2964
|
), {
|
|
2934
2965
|
droppableRects: f,
|
|
2935
|
-
measureDroppableContainers:
|
|
2966
|
+
measureDroppableContainers: b,
|
|
2936
2967
|
measuringScheduled: s != null
|
|
2937
2968
|
};
|
|
2938
2969
|
function j() {
|
|
@@ -2946,18 +2977,18 @@ function Ho(e, t) {
|
|
|
2946
2977
|
}
|
|
2947
2978
|
}
|
|
2948
2979
|
}
|
|
2949
|
-
function
|
|
2980
|
+
function Dr(e, t) {
|
|
2950
2981
|
return jt((n) => e ? n || (typeof t == "function" ? t(e) : e) : null, [t, e]);
|
|
2951
2982
|
}
|
|
2952
2983
|
function Xo(e, t) {
|
|
2953
|
-
return
|
|
2984
|
+
return Dr(e, t);
|
|
2954
2985
|
}
|
|
2955
2986
|
function qo(e) {
|
|
2956
2987
|
let {
|
|
2957
2988
|
callback: t,
|
|
2958
2989
|
disabled: n
|
|
2959
2990
|
} = e;
|
|
2960
|
-
const r = gn(t), o =
|
|
2991
|
+
const r = gn(t), o = V(() => {
|
|
2961
2992
|
if (n || typeof window > "u" || typeof window.MutationObserver > "u")
|
|
2962
2993
|
return;
|
|
2963
2994
|
const {
|
|
@@ -2965,14 +2996,14 @@ function qo(e) {
|
|
|
2965
2996
|
} = window;
|
|
2966
2997
|
return new s(r);
|
|
2967
2998
|
}, [r, n]);
|
|
2968
|
-
return
|
|
2999
|
+
return W(() => () => o?.disconnect(), [o]), o;
|
|
2969
3000
|
}
|
|
2970
3001
|
function Bt(e) {
|
|
2971
3002
|
let {
|
|
2972
3003
|
callback: t,
|
|
2973
3004
|
disabled: n
|
|
2974
3005
|
} = e;
|
|
2975
|
-
const r = gn(t), o =
|
|
3006
|
+
const r = gn(t), o = V(
|
|
2976
3007
|
() => {
|
|
2977
3008
|
if (n || typeof window > "u" || typeof window.ResizeObserver > "u")
|
|
2978
3009
|
return;
|
|
@@ -2984,35 +3015,35 @@ function Bt(e) {
|
|
|
2984
3015
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2985
3016
|
[n]
|
|
2986
3017
|
);
|
|
2987
|
-
return
|
|
3018
|
+
return W(() => () => o?.disconnect(), [o]), o;
|
|
2988
3019
|
}
|
|
2989
3020
|
function Ko(e) {
|
|
2990
3021
|
return new mn(rt(e), e);
|
|
2991
3022
|
}
|
|
2992
|
-
function
|
|
3023
|
+
function Xn(e, t, n) {
|
|
2993
3024
|
t === void 0 && (t = Ko);
|
|
2994
3025
|
const [r, o] = ee(null);
|
|
2995
3026
|
function s() {
|
|
2996
|
-
o((
|
|
3027
|
+
o((d) => {
|
|
2997
3028
|
if (!e)
|
|
2998
3029
|
return null;
|
|
2999
3030
|
if (e.isConnected === !1) {
|
|
3000
3031
|
var p;
|
|
3001
|
-
return (p =
|
|
3032
|
+
return (p = d ?? n) != null ? p : null;
|
|
3002
3033
|
}
|
|
3003
|
-
const
|
|
3004
|
-
return JSON.stringify(
|
|
3034
|
+
const v = t(e);
|
|
3035
|
+
return JSON.stringify(d) === JSON.stringify(v) ? d : v;
|
|
3005
3036
|
});
|
|
3006
3037
|
}
|
|
3007
3038
|
const l = qo({
|
|
3008
|
-
callback(
|
|
3039
|
+
callback(d) {
|
|
3009
3040
|
if (e)
|
|
3010
|
-
for (const p of
|
|
3041
|
+
for (const p of d) {
|
|
3011
3042
|
const {
|
|
3012
|
-
type:
|
|
3043
|
+
type: v,
|
|
3013
3044
|
target: c
|
|
3014
3045
|
} = p;
|
|
3015
|
-
if (
|
|
3046
|
+
if (v === "childList" && c instanceof HTMLElement && c.contains(e)) {
|
|
3016
3047
|
s();
|
|
3017
3048
|
break;
|
|
3018
3049
|
}
|
|
@@ -3029,60 +3060,60 @@ function Hn(e, t, n) {
|
|
|
3029
3060
|
}, [e]), r;
|
|
3030
3061
|
}
|
|
3031
3062
|
function Jo(e) {
|
|
3032
|
-
const t =
|
|
3033
|
-
return
|
|
3063
|
+
const t = Dr(e);
|
|
3064
|
+
return mr(e, t);
|
|
3034
3065
|
}
|
|
3035
|
-
const
|
|
3066
|
+
const qn = [];
|
|
3036
3067
|
function Qo(e) {
|
|
3037
|
-
const t = q(e), n = jt((r) => e ? r && r !==
|
|
3038
|
-
return
|
|
3068
|
+
const t = q(e), n = jt((r) => e ? r && r !== qn && e && t.current && e.parentNode === t.current.parentNode ? r : bn(e) : qn, [e]);
|
|
3069
|
+
return W(() => {
|
|
3039
3070
|
t.current = e;
|
|
3040
3071
|
}, [e]), n;
|
|
3041
3072
|
}
|
|
3042
3073
|
function Zo(e) {
|
|
3043
|
-
const [t, n] = ee(null), r = q(e), o =
|
|
3074
|
+
const [t, n] = ee(null), r = q(e), o = L((s) => {
|
|
3044
3075
|
const l = en(s.target);
|
|
3045
3076
|
l && n((a) => a ? (a.set(l, ln(l)), new Map(a)) : null);
|
|
3046
3077
|
}, []);
|
|
3047
|
-
return
|
|
3078
|
+
return W(() => {
|
|
3048
3079
|
const s = r.current;
|
|
3049
3080
|
if (e !== s) {
|
|
3050
3081
|
l(s);
|
|
3051
|
-
const a = e.map((
|
|
3052
|
-
const p = en(
|
|
3082
|
+
const a = e.map((d) => {
|
|
3083
|
+
const p = en(d);
|
|
3053
3084
|
return p ? (p.addEventListener("scroll", o, {
|
|
3054
3085
|
passive: !0
|
|
3055
3086
|
}), [p, ln(p)]) : null;
|
|
3056
|
-
}).filter((
|
|
3087
|
+
}).filter((d) => d != null);
|
|
3057
3088
|
n(a.length ? new Map(a) : null), r.current = e;
|
|
3058
3089
|
}
|
|
3059
3090
|
return () => {
|
|
3060
3091
|
l(e), l(s);
|
|
3061
3092
|
};
|
|
3062
3093
|
function l(a) {
|
|
3063
|
-
a.forEach((
|
|
3064
|
-
const p = en(
|
|
3094
|
+
a.forEach((d) => {
|
|
3095
|
+
const p = en(d);
|
|
3065
3096
|
p?.removeEventListener("scroll", o);
|
|
3066
3097
|
});
|
|
3067
3098
|
}
|
|
3068
|
-
}, [o, e]),
|
|
3099
|
+
}, [o, e]), V(() => e.length ? t ? Array.from(t.values()).reduce((s, l) => Ze(s, l), Oe) : Sr(e) : Oe, [e, t]);
|
|
3069
3100
|
}
|
|
3070
|
-
function
|
|
3101
|
+
function Kn(e, t) {
|
|
3071
3102
|
t === void 0 && (t = []);
|
|
3072
3103
|
const n = q(null);
|
|
3073
|
-
return
|
|
3104
|
+
return W(
|
|
3074
3105
|
() => {
|
|
3075
3106
|
n.current = null;
|
|
3076
3107
|
},
|
|
3077
3108
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
3078
3109
|
t
|
|
3079
|
-
),
|
|
3110
|
+
), W(() => {
|
|
3080
3111
|
const r = e !== Oe;
|
|
3081
3112
|
r && !n.current && (n.current = e), !r && n.current && (n.current = null);
|
|
3082
3113
|
}, [e]), n.current ? Lt(e, n.current) : Oe;
|
|
3083
3114
|
}
|
|
3084
3115
|
function es(e) {
|
|
3085
|
-
|
|
3116
|
+
W(
|
|
3086
3117
|
() => {
|
|
3087
3118
|
if (!zt)
|
|
3088
3119
|
return;
|
|
@@ -3108,7 +3139,7 @@ function es(e) {
|
|
|
3108
3139
|
);
|
|
3109
3140
|
}
|
|
3110
3141
|
function ts(e, t) {
|
|
3111
|
-
return
|
|
3142
|
+
return V(() => e.reduce((n, r) => {
|
|
3112
3143
|
let {
|
|
3113
3144
|
eventName: o,
|
|
3114
3145
|
handler: s
|
|
@@ -3118,21 +3149,21 @@ function ts(e, t) {
|
|
|
3118
3149
|
}, n;
|
|
3119
3150
|
}, {}), [e, t]);
|
|
3120
3151
|
}
|
|
3121
|
-
function
|
|
3122
|
-
return
|
|
3152
|
+
function Rr(e) {
|
|
3153
|
+
return V(() => e ? No(e) : null, [e]);
|
|
3123
3154
|
}
|
|
3124
|
-
const
|
|
3155
|
+
const Jn = [];
|
|
3125
3156
|
function ns(e, t) {
|
|
3126
3157
|
t === void 0 && (t = rt);
|
|
3127
|
-
const [n] = e, r =
|
|
3158
|
+
const [n] = e, r = Rr(n ? Se(n) : null), [o, s] = ee(Jn);
|
|
3128
3159
|
function l() {
|
|
3129
|
-
s(() => e.length ? e.map((
|
|
3160
|
+
s(() => e.length ? e.map((d) => jr(d) ? r : new mn(t(d), d)) : Jn);
|
|
3130
3161
|
}
|
|
3131
3162
|
const a = Bt({
|
|
3132
3163
|
callback: l
|
|
3133
3164
|
});
|
|
3134
3165
|
return Me(() => {
|
|
3135
|
-
a?.disconnect(), l(), e.forEach((
|
|
3166
|
+
a?.disconnect(), l(), e.forEach((d) => a?.observe(d));
|
|
3136
3167
|
}, [e]), o;
|
|
3137
3168
|
}
|
|
3138
3169
|
function rs(e) {
|
|
@@ -3147,32 +3178,32 @@ function is(e) {
|
|
|
3147
3178
|
let {
|
|
3148
3179
|
measure: t
|
|
3149
3180
|
} = e;
|
|
3150
|
-
const [n, r] = ee(null), o =
|
|
3181
|
+
const [n, r] = ee(null), o = L((p) => {
|
|
3151
3182
|
for (const {
|
|
3152
|
-
target:
|
|
3183
|
+
target: v
|
|
3153
3184
|
} of p)
|
|
3154
|
-
if (yt(
|
|
3185
|
+
if (yt(v)) {
|
|
3155
3186
|
r((c) => {
|
|
3156
|
-
const
|
|
3187
|
+
const w = t(v);
|
|
3157
3188
|
return c ? {
|
|
3158
3189
|
...c,
|
|
3159
|
-
width:
|
|
3160
|
-
height:
|
|
3161
|
-
} :
|
|
3190
|
+
width: w.width,
|
|
3191
|
+
height: w.height
|
|
3192
|
+
} : w;
|
|
3162
3193
|
});
|
|
3163
3194
|
break;
|
|
3164
3195
|
}
|
|
3165
3196
|
}, [t]), s = Bt({
|
|
3166
3197
|
callback: o
|
|
3167
|
-
}), l =
|
|
3168
|
-
const
|
|
3169
|
-
s?.disconnect(),
|
|
3170
|
-
}, [t, s]), [a,
|
|
3171
|
-
return
|
|
3198
|
+
}), l = L((p) => {
|
|
3199
|
+
const v = rs(p);
|
|
3200
|
+
s?.disconnect(), v && s?.observe(v), r(v ? t(v) : null);
|
|
3201
|
+
}, [t, s]), [a, d] = Pt(l);
|
|
3202
|
+
return V(() => ({
|
|
3172
3203
|
nodeRef: a,
|
|
3173
3204
|
rect: n,
|
|
3174
|
-
setRef:
|
|
3175
|
-
}), [n, a,
|
|
3205
|
+
setRef: d
|
|
3206
|
+
}), [n, a, d]);
|
|
3176
3207
|
}
|
|
3177
3208
|
const os = [{
|
|
3178
3209
|
sensor: yn,
|
|
@@ -3184,10 +3215,10 @@ const os = [{
|
|
|
3184
3215
|
current: {}
|
|
3185
3216
|
}, Ft = {
|
|
3186
3217
|
draggable: {
|
|
3187
|
-
measure:
|
|
3218
|
+
measure: Un
|
|
3188
3219
|
},
|
|
3189
3220
|
droppable: {
|
|
3190
|
-
measure:
|
|
3221
|
+
measure: Un,
|
|
3191
3222
|
strategy: xt.WhileDragging,
|
|
3192
3223
|
frequency: dn.Optimized
|
|
3193
3224
|
},
|
|
@@ -3195,7 +3226,7 @@ const os = [{
|
|
|
3195
3226
|
measure: rt
|
|
3196
3227
|
}
|
|
3197
3228
|
};
|
|
3198
|
-
class
|
|
3229
|
+
class vt extends Map {
|
|
3199
3230
|
get(t) {
|
|
3200
3231
|
var n;
|
|
3201
3232
|
return t != null && (n = super.get(t)) != null ? n : void 0;
|
|
@@ -3225,7 +3256,7 @@ const as = {
|
|
|
3225
3256
|
containerNodeRect: null,
|
|
3226
3257
|
draggableNodes: /* @__PURE__ */ new Map(),
|
|
3227
3258
|
droppableRects: /* @__PURE__ */ new Map(),
|
|
3228
|
-
droppableContainers: /* @__PURE__ */ new
|
|
3259
|
+
droppableContainers: /* @__PURE__ */ new vt(),
|
|
3229
3260
|
over: null,
|
|
3230
3261
|
dragOverlay: {
|
|
3231
3262
|
nodeRef: {
|
|
@@ -3252,7 +3283,7 @@ const as = {
|
|
|
3252
3283
|
draggableNodes: /* @__PURE__ */ new Map(),
|
|
3253
3284
|
over: null,
|
|
3254
3285
|
measureDroppableContainers: _t
|
|
3255
|
-
}, Ut = /* @__PURE__ */ wt(ls),
|
|
3286
|
+
}, Ut = /* @__PURE__ */ wt(ls), Er = /* @__PURE__ */ wt(as);
|
|
3256
3287
|
function cs() {
|
|
3257
3288
|
return {
|
|
3258
3289
|
draggable: {
|
|
@@ -3268,13 +3299,13 @@ function cs() {
|
|
|
3268
3299
|
}
|
|
3269
3300
|
},
|
|
3270
3301
|
droppable: {
|
|
3271
|
-
containers: new
|
|
3302
|
+
containers: new vt()
|
|
3272
3303
|
}
|
|
3273
3304
|
};
|
|
3274
3305
|
}
|
|
3275
3306
|
function ds(e, t) {
|
|
3276
3307
|
switch (t.type) {
|
|
3277
|
-
case
|
|
3308
|
+
case fe.DragStart:
|
|
3278
3309
|
return {
|
|
3279
3310
|
...e,
|
|
3280
3311
|
draggable: {
|
|
@@ -3283,7 +3314,7 @@ function ds(e, t) {
|
|
|
3283
3314
|
active: t.active
|
|
3284
3315
|
}
|
|
3285
3316
|
};
|
|
3286
|
-
case
|
|
3317
|
+
case fe.DragMove:
|
|
3287
3318
|
return e.draggable.active == null ? e : {
|
|
3288
3319
|
...e,
|
|
3289
3320
|
draggable: {
|
|
@@ -3294,8 +3325,8 @@ function ds(e, t) {
|
|
|
3294
3325
|
}
|
|
3295
3326
|
}
|
|
3296
3327
|
};
|
|
3297
|
-
case
|
|
3298
|
-
case
|
|
3328
|
+
case fe.DragEnd:
|
|
3329
|
+
case fe.DragCancel:
|
|
3299
3330
|
return {
|
|
3300
3331
|
...e,
|
|
3301
3332
|
draggable: {
|
|
@@ -3311,12 +3342,12 @@ function ds(e, t) {
|
|
|
3311
3342
|
}
|
|
3312
3343
|
}
|
|
3313
3344
|
};
|
|
3314
|
-
case
|
|
3345
|
+
case fe.RegisterDroppable: {
|
|
3315
3346
|
const {
|
|
3316
3347
|
element: n
|
|
3317
3348
|
} = t, {
|
|
3318
3349
|
id: r
|
|
3319
|
-
} = n, o = new
|
|
3350
|
+
} = n, o = new vt(e.droppable.containers);
|
|
3320
3351
|
return o.set(r, n), {
|
|
3321
3352
|
...e,
|
|
3322
3353
|
droppable: {
|
|
@@ -3325,7 +3356,7 @@ function ds(e, t) {
|
|
|
3325
3356
|
}
|
|
3326
3357
|
};
|
|
3327
3358
|
}
|
|
3328
|
-
case
|
|
3359
|
+
case fe.SetDroppableDisabled: {
|
|
3329
3360
|
const {
|
|
3330
3361
|
id: n,
|
|
3331
3362
|
key: r,
|
|
@@ -3333,7 +3364,7 @@ function ds(e, t) {
|
|
|
3333
3364
|
} = t, s = e.droppable.containers.get(n);
|
|
3334
3365
|
if (!s || r !== s.key)
|
|
3335
3366
|
return e;
|
|
3336
|
-
const l = new
|
|
3367
|
+
const l = new vt(e.droppable.containers);
|
|
3337
3368
|
return l.set(n, {
|
|
3338
3369
|
...s,
|
|
3339
3370
|
disabled: o
|
|
@@ -3345,14 +3376,14 @@ function ds(e, t) {
|
|
|
3345
3376
|
}
|
|
3346
3377
|
};
|
|
3347
3378
|
}
|
|
3348
|
-
case
|
|
3379
|
+
case fe.UnregisterDroppable: {
|
|
3349
3380
|
const {
|
|
3350
3381
|
id: n,
|
|
3351
3382
|
key: r
|
|
3352
3383
|
} = t, o = e.droppable.containers.get(n);
|
|
3353
3384
|
if (!o || r !== o.key)
|
|
3354
3385
|
return e;
|
|
3355
|
-
const s = new
|
|
3386
|
+
const s = new vt(e.droppable.containers);
|
|
3356
3387
|
return s.delete(n), {
|
|
3357
3388
|
...e,
|
|
3358
3389
|
droppable: {
|
|
@@ -3374,24 +3405,24 @@ function us(e) {
|
|
|
3374
3405
|
activatorEvent: r,
|
|
3375
3406
|
draggableNodes: o
|
|
3376
3407
|
} = Ge(Ut), s = sn(r), l = sn(n?.id);
|
|
3377
|
-
return
|
|
3408
|
+
return W(() => {
|
|
3378
3409
|
if (!t && !r && s && l != null) {
|
|
3379
|
-
if (!
|
|
3410
|
+
if (!vn(s) || document.activeElement === s.target)
|
|
3380
3411
|
return;
|
|
3381
3412
|
const a = o.get(l);
|
|
3382
3413
|
if (!a)
|
|
3383
3414
|
return;
|
|
3384
3415
|
const {
|
|
3385
|
-
activatorNode:
|
|
3416
|
+
activatorNode: d,
|
|
3386
3417
|
node: p
|
|
3387
3418
|
} = a;
|
|
3388
|
-
if (!
|
|
3419
|
+
if (!d.current && !p.current)
|
|
3389
3420
|
return;
|
|
3390
3421
|
requestAnimationFrame(() => {
|
|
3391
|
-
for (const
|
|
3392
|
-
if (!
|
|
3422
|
+
for (const v of [d.current, p.current]) {
|
|
3423
|
+
if (!v)
|
|
3393
3424
|
continue;
|
|
3394
|
-
const c = eo(
|
|
3425
|
+
const c = eo(v);
|
|
3395
3426
|
if (c) {
|
|
3396
3427
|
c.focus();
|
|
3397
3428
|
break;
|
|
@@ -3412,7 +3443,7 @@ function fs(e, t) {
|
|
|
3412
3443
|
}), n) : n;
|
|
3413
3444
|
}
|
|
3414
3445
|
function ps(e) {
|
|
3415
|
-
return
|
|
3446
|
+
return V(
|
|
3416
3447
|
() => ({
|
|
3417
3448
|
draggable: {
|
|
3418
3449
|
...Ft.draggable,
|
|
@@ -3455,17 +3486,17 @@ function hs(e) {
|
|
|
3455
3486
|
const p = t?.node.current;
|
|
3456
3487
|
if (!p || p.isConnected === !1)
|
|
3457
3488
|
return;
|
|
3458
|
-
const
|
|
3489
|
+
const v = n(p), c = mr(v, r);
|
|
3459
3490
|
if (l || (c.x = 0), a || (c.y = 0), s.current = !0, Math.abs(c.x) > 0 || Math.abs(c.y) > 0) {
|
|
3460
|
-
const
|
|
3461
|
-
|
|
3491
|
+
const w = xr(p);
|
|
3492
|
+
w && w.scrollBy({
|
|
3462
3493
|
top: c.y,
|
|
3463
3494
|
left: c.x
|
|
3464
3495
|
});
|
|
3465
3496
|
}
|
|
3466
3497
|
}, [t, l, a, r, n]);
|
|
3467
3498
|
}
|
|
3468
|
-
const
|
|
3499
|
+
const Ar = /* @__PURE__ */ wt({
|
|
3469
3500
|
...Oe,
|
|
3470
3501
|
scaleX: 1,
|
|
3471
3502
|
scaleY: 1
|
|
@@ -3474,71 +3505,71 @@ var Ye;
|
|
|
3474
3505
|
(function(e) {
|
|
3475
3506
|
e[e.Uninitialized = 0] = "Uninitialized", e[e.Initializing = 1] = "Initializing", e[e.Initialized = 2] = "Initialized";
|
|
3476
3507
|
})(Ye || (Ye = {}));
|
|
3477
|
-
const gs = /* @__PURE__ */
|
|
3508
|
+
const gs = /* @__PURE__ */ Pr(function(t) {
|
|
3478
3509
|
var n, r, o, s;
|
|
3479
3510
|
let {
|
|
3480
3511
|
id: l,
|
|
3481
3512
|
accessibility: a,
|
|
3482
|
-
autoScroll:
|
|
3513
|
+
autoScroll: d = !0,
|
|
3483
3514
|
children: p,
|
|
3484
|
-
sensors:
|
|
3515
|
+
sensors: v = os,
|
|
3485
3516
|
collisionDetection: c = mo,
|
|
3486
|
-
measuring:
|
|
3487
|
-
modifiers:
|
|
3517
|
+
measuring: w,
|
|
3518
|
+
modifiers: b,
|
|
3488
3519
|
...S
|
|
3489
3520
|
} = t;
|
|
3490
|
-
const f =
|
|
3521
|
+
const f = Lr(ds, void 0, cs), [j, N] = f, [m, C] = so(), [A, F] = ee(Ye.Uninitialized), k = A === Ye.Initialized, {
|
|
3491
3522
|
draggable: {
|
|
3492
3523
|
active: x,
|
|
3493
|
-
nodes:
|
|
3524
|
+
nodes: R,
|
|
3494
3525
|
translate: I
|
|
3495
3526
|
},
|
|
3496
3527
|
droppable: {
|
|
3497
3528
|
containers: M
|
|
3498
3529
|
}
|
|
3499
|
-
} = j,
|
|
3530
|
+
} = j, _ = x != null ? R.get(x) : null, B = q({
|
|
3500
3531
|
initial: null,
|
|
3501
3532
|
translated: null
|
|
3502
|
-
}),
|
|
3503
|
-
var
|
|
3533
|
+
}), ie = V(() => {
|
|
3534
|
+
var J;
|
|
3504
3535
|
return x != null ? {
|
|
3505
3536
|
id: x,
|
|
3506
3537
|
// It's possible for the active node to unmount while dragging
|
|
3507
|
-
data: (
|
|
3508
|
-
rect:
|
|
3538
|
+
data: (J = _?.data) != null ? J : ss,
|
|
3539
|
+
rect: B
|
|
3509
3540
|
} : null;
|
|
3510
|
-
}, [x,
|
|
3511
|
-
droppableRects:
|
|
3512
|
-
measureDroppableContainers:
|
|
3513
|
-
measuringScheduled:
|
|
3541
|
+
}, [x, _]), Z = q(null), [pe, he] = ee(null), [ne, $] = ee(null), G = bt(S, Object.values(S)), Ne = Ct("DndDescribedBy", l), h = V(() => M.getEnabled(), [M]), u = ps(w), {
|
|
3542
|
+
droppableRects: O,
|
|
3543
|
+
measureDroppableContainers: T,
|
|
3544
|
+
measuringScheduled: ce
|
|
3514
3545
|
} = Ho(h, {
|
|
3515
|
-
dragging:
|
|
3546
|
+
dragging: k,
|
|
3516
3547
|
dependencies: [I.x, I.y],
|
|
3517
|
-
config:
|
|
3518
|
-
}),
|
|
3548
|
+
config: u.droppable
|
|
3549
|
+
}), Y = Wo(R, x), H = V(() => ne ? an(ne) : null, [ne]), de = me(), ue = Xo(Y, u.draggable.measure);
|
|
3519
3550
|
hs({
|
|
3520
|
-
activeNode: x != null ?
|
|
3521
|
-
config:
|
|
3522
|
-
initialRect:
|
|
3523
|
-
measure:
|
|
3551
|
+
activeNode: x != null ? R.get(x) : null,
|
|
3552
|
+
config: de.layoutShiftCompensation,
|
|
3553
|
+
initialRect: ue,
|
|
3554
|
+
measure: u.draggable.measure
|
|
3524
3555
|
});
|
|
3525
|
-
const g =
|
|
3556
|
+
const g = Xn(Y, u.draggable.measure, ue), te = Xn(Y ? Y.parentElement : null), K = q({
|
|
3526
3557
|
activatorEvent: null,
|
|
3527
3558
|
active: null,
|
|
3528
|
-
activeNode:
|
|
3559
|
+
activeNode: Y,
|
|
3529
3560
|
collisionRect: null,
|
|
3530
3561
|
collisions: null,
|
|
3531
|
-
droppableRects:
|
|
3532
|
-
draggableNodes:
|
|
3562
|
+
droppableRects: O,
|
|
3563
|
+
draggableNodes: R,
|
|
3533
3564
|
draggingNode: null,
|
|
3534
3565
|
draggingNodeRect: null,
|
|
3535
3566
|
droppableContainers: M,
|
|
3536
3567
|
over: null,
|
|
3537
3568
|
scrollableAncestors: [],
|
|
3538
3569
|
scrollAdjustedTranslate: null
|
|
3539
|
-
}),
|
|
3540
|
-
measure:
|
|
3541
|
-
}),
|
|
3570
|
+
}), oe = M.getNodeFor((n = K.current.over) == null ? void 0 : n.id), U = is({
|
|
3571
|
+
measure: u.dragOverlay.measure
|
|
3572
|
+
}), De = (r = U.nodeRef.current) != null ? r : Y, be = k ? (o = U.rect) != null ? o : g : null, it = !!(U.nodeRef.current && U.rect), He = Jo(it ? null : g), _e = Rr(De ? Se(De) : null), Re = Qo(k ? oe ?? Y : null), se = ns(Re), X = fs(b, {
|
|
3542
3573
|
transform: {
|
|
3543
3574
|
x: I.x - He.x,
|
|
3544
3575
|
y: I.y - He.y,
|
|
@@ -3546,108 +3577,108 @@ const gs = /* @__PURE__ */ Mr(function(t) {
|
|
|
3546
3577
|
scaleY: 1
|
|
3547
3578
|
},
|
|
3548
3579
|
activatorEvent: ne,
|
|
3549
|
-
active:
|
|
3580
|
+
active: ie,
|
|
3550
3581
|
activeNodeRect: g,
|
|
3551
3582
|
containerNodeRect: te,
|
|
3552
3583
|
draggingNodeRect: be,
|
|
3553
3584
|
over: K.current.over,
|
|
3554
|
-
overlayNodeRect:
|
|
3555
|
-
scrollableAncestors:
|
|
3585
|
+
overlayNodeRect: U.rect,
|
|
3586
|
+
scrollableAncestors: Re,
|
|
3556
3587
|
scrollableAncestorRects: se,
|
|
3557
3588
|
windowRect: _e
|
|
3558
|
-
}), Pe =
|
|
3559
|
-
active:
|
|
3589
|
+
}), Pe = H ? Ze(H, I) : null, Je = Zo(Re), ot = Kn(Je), Yt = Kn(Je, [g]), $e = Ze(X, ot), Ie = be ? yo(be, X) : null, Xe = ie && Ie ? c({
|
|
3590
|
+
active: ie,
|
|
3560
3591
|
collisionRect: Ie,
|
|
3561
|
-
droppableRects:
|
|
3592
|
+
droppableRects: O,
|
|
3562
3593
|
droppableContainers: h,
|
|
3563
3594
|
pointerCoordinates: Pe
|
|
3564
|
-
}) : null, st = go(Xe, "id"), [
|
|
3565
|
-
(
|
|
3595
|
+
}) : null, st = go(Xe, "id"), [Ee, at] = ee(null), St = it ? X : Ze(X, Yt), y = xo(St, (s = Ee?.rect) != null ? s : null, g), D = q(null), E = L(
|
|
3596
|
+
(J, P) => {
|
|
3566
3597
|
let {
|
|
3567
|
-
sensor:
|
|
3598
|
+
sensor: je,
|
|
3568
3599
|
options: ze
|
|
3569
|
-
} =
|
|
3570
|
-
if (
|
|
3600
|
+
} = P;
|
|
3601
|
+
if (Z.current == null)
|
|
3571
3602
|
return;
|
|
3572
|
-
const Te =
|
|
3603
|
+
const Te = R.get(Z.current);
|
|
3573
3604
|
if (!Te)
|
|
3574
3605
|
return;
|
|
3575
|
-
const
|
|
3576
|
-
active:
|
|
3606
|
+
const Ae = J.nativeEvent, ke = new je({
|
|
3607
|
+
active: Z.current,
|
|
3577
3608
|
activeNode: Te,
|
|
3578
|
-
event:
|
|
3609
|
+
event: Ae,
|
|
3579
3610
|
options: ze,
|
|
3580
3611
|
// Sensors need to be instantiated with refs for arguments that change over time
|
|
3581
3612
|
// otherwise they are frozen in time with the stale arguments
|
|
3582
3613
|
context: K,
|
|
3583
|
-
onAbort(
|
|
3584
|
-
if (!
|
|
3614
|
+
onAbort(xe) {
|
|
3615
|
+
if (!R.get(xe))
|
|
3585
3616
|
return;
|
|
3586
3617
|
const {
|
|
3587
3618
|
onDragAbort: Ve
|
|
3588
|
-
} =
|
|
3589
|
-
id:
|
|
3619
|
+
} = G.current, Le = {
|
|
3620
|
+
id: xe
|
|
3590
3621
|
};
|
|
3591
|
-
Ve?.(Le),
|
|
3622
|
+
Ve?.(Le), m({
|
|
3592
3623
|
type: "onDragAbort",
|
|
3593
3624
|
event: Le
|
|
3594
3625
|
});
|
|
3595
3626
|
},
|
|
3596
|
-
onPending(
|
|
3597
|
-
if (!
|
|
3627
|
+
onPending(xe, Be, Ve, Le) {
|
|
3628
|
+
if (!R.get(xe))
|
|
3598
3629
|
return;
|
|
3599
3630
|
const {
|
|
3600
3631
|
onDragPending: ct
|
|
3601
|
-
} =
|
|
3602
|
-
id:
|
|
3632
|
+
} = G.current, Ue = {
|
|
3633
|
+
id: xe,
|
|
3603
3634
|
constraint: Be,
|
|
3604
3635
|
initialCoordinates: Ve,
|
|
3605
3636
|
offset: Le
|
|
3606
3637
|
};
|
|
3607
|
-
ct?.(Ue),
|
|
3638
|
+
ct?.(Ue), m({
|
|
3608
3639
|
type: "onDragPending",
|
|
3609
3640
|
event: Ue
|
|
3610
3641
|
});
|
|
3611
3642
|
},
|
|
3612
|
-
onStart(
|
|
3613
|
-
const Be =
|
|
3643
|
+
onStart(xe) {
|
|
3644
|
+
const Be = Z.current;
|
|
3614
3645
|
if (Be == null)
|
|
3615
3646
|
return;
|
|
3616
|
-
const Ve =
|
|
3647
|
+
const Ve = R.get(Be);
|
|
3617
3648
|
if (!Ve)
|
|
3618
3649
|
return;
|
|
3619
3650
|
const {
|
|
3620
3651
|
onDragStart: Le
|
|
3621
|
-
} =
|
|
3622
|
-
activatorEvent:
|
|
3652
|
+
} = G.current, lt = {
|
|
3653
|
+
activatorEvent: Ae,
|
|
3623
3654
|
active: {
|
|
3624
3655
|
id: Be,
|
|
3625
3656
|
data: Ve.data,
|
|
3626
|
-
rect:
|
|
3657
|
+
rect: B
|
|
3627
3658
|
}
|
|
3628
3659
|
};
|
|
3629
3660
|
Nt(() => {
|
|
3630
|
-
Le?.(lt),
|
|
3631
|
-
type:
|
|
3632
|
-
initialCoordinates:
|
|
3661
|
+
Le?.(lt), F(Ye.Initializing), N({
|
|
3662
|
+
type: fe.DragStart,
|
|
3663
|
+
initialCoordinates: xe,
|
|
3633
3664
|
active: Be
|
|
3634
|
-
}),
|
|
3665
|
+
}), m({
|
|
3635
3666
|
type: "onDragStart",
|
|
3636
3667
|
event: lt
|
|
3637
|
-
}),
|
|
3668
|
+
}), he(D.current), $(Ae);
|
|
3638
3669
|
});
|
|
3639
3670
|
},
|
|
3640
|
-
onMove(
|
|
3671
|
+
onMove(xe) {
|
|
3641
3672
|
N({
|
|
3642
|
-
type:
|
|
3643
|
-
coordinates:
|
|
3673
|
+
type: fe.DragMove,
|
|
3674
|
+
coordinates: xe
|
|
3644
3675
|
});
|
|
3645
3676
|
},
|
|
3646
|
-
onEnd: Qe(
|
|
3647
|
-
onCancel: Qe(
|
|
3677
|
+
onEnd: Qe(fe.DragEnd),
|
|
3678
|
+
onCancel: Qe(fe.DragCancel)
|
|
3648
3679
|
});
|
|
3649
3680
|
D.current = ke;
|
|
3650
|
-
function Qe(
|
|
3681
|
+
function Qe(xe) {
|
|
3651
3682
|
return async function() {
|
|
3652
3683
|
const {
|
|
3653
3684
|
active: Ve,
|
|
@@ -3659,23 +3690,23 @@ const gs = /* @__PURE__ */ Mr(function(t) {
|
|
|
3659
3690
|
if (Ve && ct) {
|
|
3660
3691
|
const {
|
|
3661
3692
|
cancelDrop: dt
|
|
3662
|
-
} =
|
|
3693
|
+
} = G.current;
|
|
3663
3694
|
Ue = {
|
|
3664
|
-
activatorEvent:
|
|
3695
|
+
activatorEvent: Ae,
|
|
3665
3696
|
active: Ve,
|
|
3666
3697
|
collisions: Le,
|
|
3667
3698
|
delta: ct,
|
|
3668
3699
|
over: lt
|
|
3669
|
-
},
|
|
3700
|
+
}, xe === fe.DragEnd && typeof dt == "function" && await Promise.resolve(dt(Ue)) && (xe = fe.DragCancel);
|
|
3670
3701
|
}
|
|
3671
|
-
|
|
3702
|
+
Z.current = null, Nt(() => {
|
|
3672
3703
|
N({
|
|
3673
|
-
type:
|
|
3674
|
-
}),
|
|
3675
|
-
const dt =
|
|
3704
|
+
type: xe
|
|
3705
|
+
}), F(Ye.Uninitialized), at(null), he(null), $(null), D.current = null;
|
|
3706
|
+
const dt = xe === fe.DragEnd ? "onDragEnd" : "onDragCancel";
|
|
3676
3707
|
if (Ue) {
|
|
3677
|
-
const Wt =
|
|
3678
|
-
Wt?.(Ue),
|
|
3708
|
+
const Wt = G.current[dt];
|
|
3709
|
+
Wt?.(Ue), m({
|
|
3679
3710
|
type: dt,
|
|
3680
3711
|
event: Ue
|
|
3681
3712
|
});
|
|
@@ -3685,40 +3716,40 @@ const gs = /* @__PURE__ */ Mr(function(t) {
|
|
|
3685
3716
|
}
|
|
3686
3717
|
},
|
|
3687
3718
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
3688
|
-
[
|
|
3689
|
-
), we =
|
|
3690
|
-
const Te =
|
|
3719
|
+
[R]
|
|
3720
|
+
), we = L((J, P) => (je, ze) => {
|
|
3721
|
+
const Te = je.nativeEvent, Ae = R.get(ze);
|
|
3691
3722
|
if (
|
|
3692
3723
|
// Another sensor is already instantiating
|
|
3693
|
-
|
|
3694
|
-
!
|
|
3724
|
+
Z.current !== null || // No active draggable
|
|
3725
|
+
!Ae || // Event has already been captured
|
|
3695
3726
|
Te.dndKit || Te.defaultPrevented
|
|
3696
3727
|
)
|
|
3697
3728
|
return;
|
|
3698
3729
|
const ke = {
|
|
3699
|
-
active:
|
|
3730
|
+
active: Ae
|
|
3700
3731
|
};
|
|
3701
|
-
|
|
3702
|
-
capturedBy:
|
|
3703
|
-
},
|
|
3704
|
-
}, [
|
|
3705
|
-
es(
|
|
3706
|
-
g &&
|
|
3707
|
-
}, [g,
|
|
3732
|
+
J(je, P.options, ke) === !0 && (Te.dndKit = {
|
|
3733
|
+
capturedBy: P.sensor
|
|
3734
|
+
}, Z.current = ze, E(je, P));
|
|
3735
|
+
}, [R, E]), ae = Go(v, we);
|
|
3736
|
+
es(v), Me(() => {
|
|
3737
|
+
g && A === Ye.Initializing && F(Ye.Initialized);
|
|
3738
|
+
}, [g, A]), W(
|
|
3708
3739
|
() => {
|
|
3709
3740
|
const {
|
|
3710
|
-
onDragMove:
|
|
3711
|
-
} =
|
|
3712
|
-
active:
|
|
3713
|
-
activatorEvent:
|
|
3741
|
+
onDragMove: J
|
|
3742
|
+
} = G.current, {
|
|
3743
|
+
active: P,
|
|
3744
|
+
activatorEvent: je,
|
|
3714
3745
|
collisions: ze,
|
|
3715
3746
|
over: Te
|
|
3716
3747
|
} = K.current;
|
|
3717
|
-
if (!
|
|
3748
|
+
if (!P || !je)
|
|
3718
3749
|
return;
|
|
3719
|
-
const
|
|
3720
|
-
active:
|
|
3721
|
-
activatorEvent:
|
|
3750
|
+
const Ae = {
|
|
3751
|
+
active: P,
|
|
3752
|
+
activatorEvent: je,
|
|
3722
3753
|
collisions: ze,
|
|
3723
3754
|
delta: {
|
|
3724
3755
|
x: $e.x,
|
|
@@ -3727,36 +3758,36 @@ const gs = /* @__PURE__ */ Mr(function(t) {
|
|
|
3727
3758
|
over: Te
|
|
3728
3759
|
};
|
|
3729
3760
|
Nt(() => {
|
|
3730
|
-
|
|
3761
|
+
J?.(Ae), m({
|
|
3731
3762
|
type: "onDragMove",
|
|
3732
|
-
event:
|
|
3763
|
+
event: Ae
|
|
3733
3764
|
});
|
|
3734
3765
|
});
|
|
3735
3766
|
},
|
|
3736
3767
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
3737
3768
|
[$e.x, $e.y]
|
|
3738
|
-
),
|
|
3769
|
+
), W(
|
|
3739
3770
|
() => {
|
|
3740
3771
|
const {
|
|
3741
|
-
active:
|
|
3742
|
-
activatorEvent:
|
|
3743
|
-
collisions:
|
|
3772
|
+
active: J,
|
|
3773
|
+
activatorEvent: P,
|
|
3774
|
+
collisions: je,
|
|
3744
3775
|
droppableContainers: ze,
|
|
3745
3776
|
scrollAdjustedTranslate: Te
|
|
3746
3777
|
} = K.current;
|
|
3747
|
-
if (!
|
|
3778
|
+
if (!J || Z.current == null || !P || !Te)
|
|
3748
3779
|
return;
|
|
3749
3780
|
const {
|
|
3750
|
-
onDragOver:
|
|
3751
|
-
} =
|
|
3781
|
+
onDragOver: Ae
|
|
3782
|
+
} = G.current, ke = ze.get(st), Qe = ke && ke.rect.current ? {
|
|
3752
3783
|
id: ke.id,
|
|
3753
3784
|
rect: ke.rect.current,
|
|
3754
3785
|
data: ke.data,
|
|
3755
3786
|
disabled: ke.disabled
|
|
3756
|
-
} : null,
|
|
3757
|
-
active:
|
|
3758
|
-
activatorEvent:
|
|
3759
|
-
collisions:
|
|
3787
|
+
} : null, xe = {
|
|
3788
|
+
active: J,
|
|
3789
|
+
activatorEvent: P,
|
|
3790
|
+
collisions: je,
|
|
3760
3791
|
delta: {
|
|
3761
3792
|
x: Te.x,
|
|
3762
3793
|
y: Te.y
|
|
@@ -3764,9 +3795,9 @@ const gs = /* @__PURE__ */ Mr(function(t) {
|
|
|
3764
3795
|
over: Qe
|
|
3765
3796
|
};
|
|
3766
3797
|
Nt(() => {
|
|
3767
|
-
at(Qe),
|
|
3798
|
+
at(Qe), Ae?.(xe), m({
|
|
3768
3799
|
type: "onDragOver",
|
|
3769
|
-
event:
|
|
3800
|
+
event: xe
|
|
3770
3801
|
});
|
|
3771
3802
|
});
|
|
3772
3803
|
},
|
|
@@ -3775,85 +3806,85 @@ const gs = /* @__PURE__ */ Mr(function(t) {
|
|
|
3775
3806
|
), Me(() => {
|
|
3776
3807
|
K.current = {
|
|
3777
3808
|
activatorEvent: ne,
|
|
3778
|
-
active:
|
|
3779
|
-
activeNode:
|
|
3809
|
+
active: ie,
|
|
3810
|
+
activeNode: Y,
|
|
3780
3811
|
collisionRect: Ie,
|
|
3781
3812
|
collisions: Xe,
|
|
3782
|
-
droppableRects:
|
|
3783
|
-
draggableNodes:
|
|
3784
|
-
draggingNode:
|
|
3813
|
+
droppableRects: O,
|
|
3814
|
+
draggableNodes: R,
|
|
3815
|
+
draggingNode: De,
|
|
3785
3816
|
draggingNodeRect: be,
|
|
3786
3817
|
droppableContainers: M,
|
|
3787
|
-
over:
|
|
3788
|
-
scrollableAncestors:
|
|
3818
|
+
over: Ee,
|
|
3819
|
+
scrollableAncestors: Re,
|
|
3789
3820
|
scrollAdjustedTranslate: $e
|
|
3790
|
-
},
|
|
3821
|
+
}, B.current = {
|
|
3791
3822
|
initial: be,
|
|
3792
3823
|
translated: Ie
|
|
3793
3824
|
};
|
|
3794
|
-
}, [
|
|
3795
|
-
...
|
|
3825
|
+
}, [ie, Y, Xe, Ie, R, De, be, O, M, Ee, Re, $e]), Bo({
|
|
3826
|
+
...de,
|
|
3796
3827
|
delta: I,
|
|
3797
3828
|
draggingRect: Ie,
|
|
3798
3829
|
pointerCoordinates: Pe,
|
|
3799
|
-
scrollableAncestors:
|
|
3830
|
+
scrollableAncestors: Re,
|
|
3800
3831
|
scrollableAncestorRects: se
|
|
3801
3832
|
});
|
|
3802
|
-
const
|
|
3803
|
-
active:
|
|
3804
|
-
activeNode:
|
|
3833
|
+
const ye = V(() => ({
|
|
3834
|
+
active: ie,
|
|
3835
|
+
activeNode: Y,
|
|
3805
3836
|
activeNodeRect: g,
|
|
3806
3837
|
activatorEvent: ne,
|
|
3807
3838
|
collisions: Xe,
|
|
3808
3839
|
containerNodeRect: te,
|
|
3809
|
-
dragOverlay:
|
|
3810
|
-
draggableNodes:
|
|
3840
|
+
dragOverlay: U,
|
|
3841
|
+
draggableNodes: R,
|
|
3811
3842
|
droppableContainers: M,
|
|
3812
|
-
droppableRects:
|
|
3813
|
-
over:
|
|
3814
|
-
measureDroppableContainers:
|
|
3815
|
-
scrollableAncestors:
|
|
3843
|
+
droppableRects: O,
|
|
3844
|
+
over: Ee,
|
|
3845
|
+
measureDroppableContainers: T,
|
|
3846
|
+
scrollableAncestors: Re,
|
|
3816
3847
|
scrollableAncestorRects: se,
|
|
3817
|
-
measuringConfiguration:
|
|
3818
|
-
measuringScheduled:
|
|
3848
|
+
measuringConfiguration: u,
|
|
3849
|
+
measuringScheduled: ce,
|
|
3819
3850
|
windowRect: _e
|
|
3820
|
-
}), [
|
|
3851
|
+
}), [ie, Y, g, ne, Xe, te, U, R, M, O, Ee, T, Re, se, u, ce, _e]), le = V(() => ({
|
|
3821
3852
|
activatorEvent: ne,
|
|
3822
3853
|
activators: ae,
|
|
3823
|
-
active:
|
|
3854
|
+
active: ie,
|
|
3824
3855
|
activeNodeRect: g,
|
|
3825
3856
|
ariaDescribedById: {
|
|
3826
|
-
draggable:
|
|
3857
|
+
draggable: Ne
|
|
3827
3858
|
},
|
|
3828
3859
|
dispatch: N,
|
|
3829
|
-
draggableNodes:
|
|
3830
|
-
over:
|
|
3831
|
-
measureDroppableContainers:
|
|
3832
|
-
}), [ne, ae,
|
|
3833
|
-
return
|
|
3860
|
+
draggableNodes: R,
|
|
3861
|
+
over: Ee,
|
|
3862
|
+
measureDroppableContainers: T
|
|
3863
|
+
}), [ne, ae, ie, g, N, Ne, R, Ee, T]);
|
|
3864
|
+
return ve.createElement(br.Provider, {
|
|
3834
3865
|
value: C
|
|
3835
|
-
},
|
|
3836
|
-
value:
|
|
3837
|
-
},
|
|
3838
|
-
value:
|
|
3839
|
-
},
|
|
3866
|
+
}, ve.createElement(Ut.Provider, {
|
|
3867
|
+
value: le
|
|
3868
|
+
}, ve.createElement(Er.Provider, {
|
|
3869
|
+
value: ye
|
|
3870
|
+
}, ve.createElement(Ar.Provider, {
|
|
3840
3871
|
value: y
|
|
3841
|
-
}, p)),
|
|
3872
|
+
}, p)), ve.createElement(us, {
|
|
3842
3873
|
disabled: a?.restoreFocus === !1
|
|
3843
|
-
})),
|
|
3874
|
+
})), ve.createElement(co, {
|
|
3844
3875
|
...a,
|
|
3845
|
-
hiddenTextDescribedById:
|
|
3876
|
+
hiddenTextDescribedById: Ne
|
|
3846
3877
|
}));
|
|
3847
|
-
function
|
|
3848
|
-
const
|
|
3849
|
-
return typeof
|
|
3850
|
-
...
|
|
3851
|
-
enabled:
|
|
3878
|
+
function me() {
|
|
3879
|
+
const J = pe?.autoScrollEnabled === !1, P = typeof d == "object" ? d.enabled === !1 : d === !1, je = k && !J && !P;
|
|
3880
|
+
return typeof d == "object" ? {
|
|
3881
|
+
...d,
|
|
3882
|
+
enabled: je
|
|
3852
3883
|
} : {
|
|
3853
|
-
enabled:
|
|
3884
|
+
enabled: je
|
|
3854
3885
|
};
|
|
3855
3886
|
}
|
|
3856
|
-
}),
|
|
3887
|
+
}), vs = /* @__PURE__ */ wt(null), Qn = "button", bs = "Draggable";
|
|
3857
3888
|
function ms(e) {
|
|
3858
3889
|
let {
|
|
3859
3890
|
id: t,
|
|
@@ -3861,25 +3892,25 @@ function ms(e) {
|
|
|
3861
3892
|
disabled: r = !1,
|
|
3862
3893
|
attributes: o
|
|
3863
3894
|
} = e;
|
|
3864
|
-
const s = Ct(
|
|
3895
|
+
const s = Ct(bs), {
|
|
3865
3896
|
activators: l,
|
|
3866
3897
|
activatorEvent: a,
|
|
3867
|
-
active:
|
|
3898
|
+
active: d,
|
|
3868
3899
|
activeNodeRect: p,
|
|
3869
|
-
ariaDescribedById:
|
|
3900
|
+
ariaDescribedById: v,
|
|
3870
3901
|
draggableNodes: c,
|
|
3871
|
-
over:
|
|
3902
|
+
over: w
|
|
3872
3903
|
} = Ge(Ut), {
|
|
3873
|
-
role:
|
|
3904
|
+
role: b = Qn,
|
|
3874
3905
|
roleDescription: S = "draggable",
|
|
3875
3906
|
tabIndex: f = 0
|
|
3876
|
-
} = o ?? {}, j =
|
|
3907
|
+
} = o ?? {}, j = d?.id === t, N = Ge(j ? Ar : vs), [m, C] = Pt(), [A, F] = Pt(), k = ts(l, t), x = bt(n);
|
|
3877
3908
|
Me(
|
|
3878
3909
|
() => (c.set(t, {
|
|
3879
3910
|
id: t,
|
|
3880
3911
|
key: s,
|
|
3881
|
-
node:
|
|
3882
|
-
activatorNode:
|
|
3912
|
+
node: m,
|
|
3913
|
+
activatorNode: A,
|
|
3883
3914
|
data: x
|
|
3884
3915
|
}), () => {
|
|
3885
3916
|
const I = c.get(t);
|
|
@@ -3888,30 +3919,30 @@ function ms(e) {
|
|
|
3888
3919
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
3889
3920
|
[c, t]
|
|
3890
3921
|
);
|
|
3891
|
-
const
|
|
3892
|
-
role:
|
|
3922
|
+
const R = V(() => ({
|
|
3923
|
+
role: b,
|
|
3893
3924
|
tabIndex: f,
|
|
3894
3925
|
"aria-disabled": r,
|
|
3895
|
-
"aria-pressed": j &&
|
|
3926
|
+
"aria-pressed": j && b === Qn ? !0 : void 0,
|
|
3896
3927
|
"aria-roledescription": S,
|
|
3897
|
-
"aria-describedby":
|
|
3898
|
-
}), [r,
|
|
3928
|
+
"aria-describedby": v.draggable
|
|
3929
|
+
}), [r, b, f, j, S, v.draggable]);
|
|
3899
3930
|
return {
|
|
3900
|
-
active:
|
|
3931
|
+
active: d,
|
|
3901
3932
|
activatorEvent: a,
|
|
3902
3933
|
activeNodeRect: p,
|
|
3903
|
-
attributes:
|
|
3934
|
+
attributes: R,
|
|
3904
3935
|
isDragging: j,
|
|
3905
|
-
listeners: r ? void 0 :
|
|
3906
|
-
node:
|
|
3907
|
-
over:
|
|
3936
|
+
listeners: r ? void 0 : k,
|
|
3937
|
+
node: m,
|
|
3938
|
+
over: w,
|
|
3908
3939
|
setNodeRef: C,
|
|
3909
|
-
setActivatorNodeRef:
|
|
3940
|
+
setActivatorNodeRef: F,
|
|
3910
3941
|
transform: N
|
|
3911
3942
|
};
|
|
3912
3943
|
}
|
|
3913
3944
|
function xs() {
|
|
3914
|
-
return Ge(
|
|
3945
|
+
return Ge(Er);
|
|
3915
3946
|
}
|
|
3916
3947
|
const ws = "Droppable", ys = {
|
|
3917
3948
|
timeout: 25
|
|
@@ -3926,69 +3957,69 @@ function js(e) {
|
|
|
3926
3957
|
const s = Ct(ws), {
|
|
3927
3958
|
active: l,
|
|
3928
3959
|
dispatch: a,
|
|
3929
|
-
over:
|
|
3960
|
+
over: d,
|
|
3930
3961
|
measureDroppableContainers: p
|
|
3931
|
-
} = Ge(Ut),
|
|
3962
|
+
} = Ge(Ut), v = q({
|
|
3932
3963
|
disabled: n
|
|
3933
|
-
}), c = q(!1),
|
|
3964
|
+
}), c = q(!1), w = q(null), b = q(null), {
|
|
3934
3965
|
disabled: S,
|
|
3935
3966
|
updateMeasurementsFor: f,
|
|
3936
3967
|
timeout: j
|
|
3937
3968
|
} = {
|
|
3938
3969
|
...ys,
|
|
3939
3970
|
...o
|
|
3940
|
-
}, N =
|
|
3971
|
+
}, N = bt(f ?? r), m = L(
|
|
3941
3972
|
() => {
|
|
3942
3973
|
if (!c.current) {
|
|
3943
3974
|
c.current = !0;
|
|
3944
3975
|
return;
|
|
3945
3976
|
}
|
|
3946
|
-
|
|
3947
|
-
p(Array.isArray(N.current) ? N.current : [N.current]),
|
|
3977
|
+
b.current != null && clearTimeout(b.current), b.current = setTimeout(() => {
|
|
3978
|
+
p(Array.isArray(N.current) ? N.current : [N.current]), b.current = null;
|
|
3948
3979
|
}, j);
|
|
3949
3980
|
},
|
|
3950
3981
|
//eslint-disable-next-line react-hooks/exhaustive-deps
|
|
3951
3982
|
[j]
|
|
3952
3983
|
), C = Bt({
|
|
3953
|
-
callback:
|
|
3984
|
+
callback: m,
|
|
3954
3985
|
disabled: S || !l
|
|
3955
|
-
}),
|
|
3956
|
-
C && (I && (C.unobserve(I), c.current = !1),
|
|
3957
|
-
}, [C]), [
|
|
3958
|
-
return
|
|
3959
|
-
!C || !
|
|
3960
|
-
}, [
|
|
3986
|
+
}), A = L((R, I) => {
|
|
3987
|
+
C && (I && (C.unobserve(I), c.current = !1), R && C.observe(R));
|
|
3988
|
+
}, [C]), [F, k] = Pt(A), x = bt(t);
|
|
3989
|
+
return W(() => {
|
|
3990
|
+
!C || !F.current || (C.disconnect(), c.current = !1, C.observe(F.current));
|
|
3991
|
+
}, [F, C]), W(
|
|
3961
3992
|
() => (a({
|
|
3962
|
-
type:
|
|
3993
|
+
type: fe.RegisterDroppable,
|
|
3963
3994
|
element: {
|
|
3964
3995
|
id: r,
|
|
3965
3996
|
key: s,
|
|
3966
3997
|
disabled: n,
|
|
3967
|
-
node:
|
|
3968
|
-
rect:
|
|
3998
|
+
node: F,
|
|
3999
|
+
rect: w,
|
|
3969
4000
|
data: x
|
|
3970
4001
|
}
|
|
3971
4002
|
}), () => a({
|
|
3972
|
-
type:
|
|
4003
|
+
type: fe.UnregisterDroppable,
|
|
3973
4004
|
key: s,
|
|
3974
4005
|
id: r
|
|
3975
4006
|
})),
|
|
3976
4007
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
3977
4008
|
[r]
|
|
3978
|
-
),
|
|
3979
|
-
n !==
|
|
3980
|
-
type:
|
|
4009
|
+
), W(() => {
|
|
4010
|
+
n !== v.current.disabled && (a({
|
|
4011
|
+
type: fe.SetDroppableDisabled,
|
|
3981
4012
|
id: r,
|
|
3982
4013
|
key: s,
|
|
3983
4014
|
disabled: n
|
|
3984
|
-
}),
|
|
4015
|
+
}), v.current.disabled = n);
|
|
3985
4016
|
}, [r, s, n, a]), {
|
|
3986
4017
|
active: l,
|
|
3987
|
-
rect:
|
|
3988
|
-
isOver:
|
|
3989
|
-
node:
|
|
3990
|
-
over:
|
|
3991
|
-
setNodeRef:
|
|
4018
|
+
rect: w,
|
|
4019
|
+
isOver: d?.id === r,
|
|
4020
|
+
node: F,
|
|
4021
|
+
over: d,
|
|
4022
|
+
setNodeRef: k
|
|
3992
4023
|
};
|
|
3993
4024
|
}
|
|
3994
4025
|
function jn(e, t, n) {
|
|
@@ -4035,7 +4066,7 @@ const Et = {
|
|
|
4035
4066
|
const a = (t = n[o]) != null ? t : r;
|
|
4036
4067
|
if (!a)
|
|
4037
4068
|
return null;
|
|
4038
|
-
const
|
|
4069
|
+
const d = Rs(n, l, o);
|
|
4039
4070
|
if (l === o) {
|
|
4040
4071
|
const p = n[s];
|
|
4041
4072
|
return p ? {
|
|
@@ -4045,11 +4076,11 @@ const Et = {
|
|
|
4045
4076
|
} : null;
|
|
4046
4077
|
}
|
|
4047
4078
|
return l > o && l <= s ? {
|
|
4048
|
-
x: -a.width -
|
|
4079
|
+
x: -a.width - d,
|
|
4049
4080
|
y: 0,
|
|
4050
4081
|
...Et
|
|
4051
4082
|
} : l < o && l >= s ? {
|
|
4052
|
-
x: a.width +
|
|
4083
|
+
x: a.width + d,
|
|
4053
4084
|
y: 0,
|
|
4054
4085
|
...Et
|
|
4055
4086
|
} : {
|
|
@@ -4062,7 +4093,7 @@ function Rs(e, t, n) {
|
|
|
4062
4093
|
const r = e[t], o = e[t - 1], s = e[t + 1];
|
|
4063
4094
|
return !r || !o && !s ? 0 : n < t ? o ? r.left - (o.left + o.width) : s.left - (r.left + r.width) : s ? s.left - (r.left + r.width) : r.left - (o.left + o.width);
|
|
4064
4095
|
}
|
|
4065
|
-
const
|
|
4096
|
+
const Tr = (e) => {
|
|
4066
4097
|
let {
|
|
4067
4098
|
rects: t,
|
|
4068
4099
|
activeIndex: n,
|
|
@@ -4076,15 +4107,15 @@ const Ar = (e) => {
|
|
|
4076
4107
|
scaleX: a.width / l.width,
|
|
4077
4108
|
scaleY: a.height / l.height
|
|
4078
4109
|
};
|
|
4079
|
-
},
|
|
4110
|
+
}, Fr = "Sortable", Or = /* @__PURE__ */ ve.createContext({
|
|
4080
4111
|
activeIndex: -1,
|
|
4081
|
-
containerId:
|
|
4112
|
+
containerId: Fr,
|
|
4082
4113
|
disableTransforms: !1,
|
|
4083
4114
|
items: [],
|
|
4084
4115
|
overIndex: -1,
|
|
4085
4116
|
useDragOverlay: !1,
|
|
4086
4117
|
sortedRects: [],
|
|
4087
|
-
strategy:
|
|
4118
|
+
strategy: Tr,
|
|
4088
4119
|
disabled: {
|
|
4089
4120
|
draggable: !1,
|
|
4090
4121
|
droppable: !1
|
|
@@ -4095,38 +4126,38 @@ function Es(e) {
|
|
|
4095
4126
|
children: t,
|
|
4096
4127
|
id: n,
|
|
4097
4128
|
items: r,
|
|
4098
|
-
strategy: o =
|
|
4129
|
+
strategy: o = Tr,
|
|
4099
4130
|
disabled: s = !1
|
|
4100
4131
|
} = e;
|
|
4101
4132
|
const {
|
|
4102
4133
|
active: l,
|
|
4103
4134
|
dragOverlay: a,
|
|
4104
|
-
droppableRects:
|
|
4135
|
+
droppableRects: d,
|
|
4105
4136
|
over: p,
|
|
4106
|
-
measureDroppableContainers:
|
|
4107
|
-
} = xs(), c = Ct(
|
|
4137
|
+
measureDroppableContainers: v
|
|
4138
|
+
} = xs(), c = Ct(Fr, n), w = a.rect !== null, b = V(() => r.map((k) => typeof k == "object" && "id" in k ? k.id : k), [r]), S = l != null, f = l ? b.indexOf(l.id) : -1, j = p ? b.indexOf(p.id) : -1, N = q(b), m = !Ss(b, N.current), C = j !== -1 && f === -1 || m, A = Ns(s);
|
|
4108
4139
|
Me(() => {
|
|
4109
|
-
|
|
4110
|
-
}, [
|
|
4111
|
-
N.current =
|
|
4112
|
-
}, [
|
|
4113
|
-
const
|
|
4140
|
+
m && S && v(b);
|
|
4141
|
+
}, [m, b, S, v]), W(() => {
|
|
4142
|
+
N.current = b;
|
|
4143
|
+
}, [b]);
|
|
4144
|
+
const F = V(
|
|
4114
4145
|
() => ({
|
|
4115
4146
|
activeIndex: f,
|
|
4116
4147
|
containerId: c,
|
|
4117
|
-
disabled:
|
|
4148
|
+
disabled: A,
|
|
4118
4149
|
disableTransforms: C,
|
|
4119
|
-
items:
|
|
4150
|
+
items: b,
|
|
4120
4151
|
overIndex: j,
|
|
4121
|
-
useDragOverlay:
|
|
4122
|
-
sortedRects: Cs(
|
|
4152
|
+
useDragOverlay: w,
|
|
4153
|
+
sortedRects: Cs(b, d),
|
|
4123
4154
|
strategy: o
|
|
4124
4155
|
}),
|
|
4125
4156
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
4126
|
-
[f, c,
|
|
4157
|
+
[f, c, A.draggable, A.droppable, C, b, j, d, w, o]
|
|
4127
4158
|
);
|
|
4128
|
-
return
|
|
4129
|
-
value:
|
|
4159
|
+
return ve.createElement(Or.Provider, {
|
|
4160
|
+
value: F
|
|
4130
4161
|
}, t);
|
|
4131
4162
|
}
|
|
4132
4163
|
const As = (e) => {
|
|
@@ -4146,15 +4177,15 @@ const As = (e) => {
|
|
|
4146
4177
|
items: s,
|
|
4147
4178
|
newIndex: l,
|
|
4148
4179
|
previousItems: a,
|
|
4149
|
-
previousContainerId:
|
|
4180
|
+
previousContainerId: d,
|
|
4150
4181
|
transition: p
|
|
4151
4182
|
} = e;
|
|
4152
|
-
return !p || !r || a !== s && o === l ? !1 : n ? !0 : l !== o && t ===
|
|
4183
|
+
return !p || !r || a !== s && o === l ? !1 : n ? !0 : l !== o && t === d;
|
|
4153
4184
|
}, Fs = {
|
|
4154
4185
|
duration: 200,
|
|
4155
4186
|
easing: "ease"
|
|
4156
|
-
},
|
|
4157
|
-
property:
|
|
4187
|
+
}, Ir = "transform", Os = /* @__PURE__ */ mt.Transition.toString({
|
|
4188
|
+
property: Ir,
|
|
4158
4189
|
duration: 0,
|
|
4159
4190
|
easing: "linear"
|
|
4160
4191
|
}), Is = {
|
|
@@ -4170,21 +4201,21 @@ function ks(e) {
|
|
|
4170
4201
|
const [s, l] = ee(null), a = q(n);
|
|
4171
4202
|
return Me(() => {
|
|
4172
4203
|
if (!t && n !== a.current && r.current) {
|
|
4173
|
-
const
|
|
4174
|
-
if (
|
|
4204
|
+
const d = o.current;
|
|
4205
|
+
if (d) {
|
|
4175
4206
|
const p = rt(r.current, {
|
|
4176
4207
|
ignoreTransform: !0
|
|
4177
|
-
}),
|
|
4178
|
-
x:
|
|
4179
|
-
y:
|
|
4180
|
-
scaleX:
|
|
4181
|
-
scaleY:
|
|
4208
|
+
}), v = {
|
|
4209
|
+
x: d.left - p.left,
|
|
4210
|
+
y: d.top - p.top,
|
|
4211
|
+
scaleX: d.width / p.width,
|
|
4212
|
+
scaleY: d.height / p.height
|
|
4182
4213
|
};
|
|
4183
|
-
(
|
|
4214
|
+
(v.x || v.y) && l(v);
|
|
4184
4215
|
}
|
|
4185
4216
|
}
|
|
4186
4217
|
n !== a.current && (a.current = n);
|
|
4187
|
-
}, [t, n, r, o]),
|
|
4218
|
+
}, [t, n, r, o]), W(() => {
|
|
4188
4219
|
s && l(null);
|
|
4189
4220
|
}, [s]), s;
|
|
4190
4221
|
}
|
|
@@ -4197,140 +4228,140 @@ function Vs(e) {
|
|
|
4197
4228
|
getNewIndex: s = As,
|
|
4198
4229
|
id: l,
|
|
4199
4230
|
strategy: a,
|
|
4200
|
-
resizeObserverConfig:
|
|
4231
|
+
resizeObserverConfig: d,
|
|
4201
4232
|
transition: p = Fs
|
|
4202
4233
|
} = e;
|
|
4203
4234
|
const {
|
|
4204
|
-
items:
|
|
4235
|
+
items: v,
|
|
4205
4236
|
containerId: c,
|
|
4206
|
-
activeIndex:
|
|
4207
|
-
disabled:
|
|
4237
|
+
activeIndex: w,
|
|
4238
|
+
disabled: b,
|
|
4208
4239
|
disableTransforms: S,
|
|
4209
4240
|
sortedRects: f,
|
|
4210
4241
|
overIndex: j,
|
|
4211
4242
|
useDragOverlay: N,
|
|
4212
|
-
strategy:
|
|
4213
|
-
} = Ge(
|
|
4243
|
+
strategy: m
|
|
4244
|
+
} = Ge(Or), C = Ms(r, b), A = v.indexOf(l), F = V(() => ({
|
|
4214
4245
|
sortable: {
|
|
4215
4246
|
containerId: c,
|
|
4216
|
-
index:
|
|
4217
|
-
items:
|
|
4247
|
+
index: A,
|
|
4248
|
+
items: v
|
|
4218
4249
|
},
|
|
4219
4250
|
...o
|
|
4220
|
-
}), [c, o,
|
|
4251
|
+
}), [c, o, A, v]), k = V(() => v.slice(v.indexOf(l)), [v, l]), {
|
|
4221
4252
|
rect: x,
|
|
4222
|
-
node:
|
|
4253
|
+
node: R,
|
|
4223
4254
|
isOver: I,
|
|
4224
4255
|
setNodeRef: M
|
|
4225
4256
|
} = js({
|
|
4226
4257
|
id: l,
|
|
4227
|
-
data:
|
|
4258
|
+
data: F,
|
|
4228
4259
|
disabled: C.droppable,
|
|
4229
4260
|
resizeObserverConfig: {
|
|
4230
|
-
updateMeasurementsFor:
|
|
4231
|
-
...
|
|
4261
|
+
updateMeasurementsFor: k,
|
|
4262
|
+
...d
|
|
4232
4263
|
}
|
|
4233
4264
|
}), {
|
|
4234
|
-
active:
|
|
4235
|
-
activatorEvent:
|
|
4236
|
-
activeNodeRect:
|
|
4237
|
-
attributes:
|
|
4238
|
-
setNodeRef:
|
|
4239
|
-
listeners:
|
|
4265
|
+
active: _,
|
|
4266
|
+
activatorEvent: B,
|
|
4267
|
+
activeNodeRect: ie,
|
|
4268
|
+
attributes: Z,
|
|
4269
|
+
setNodeRef: pe,
|
|
4270
|
+
listeners: he,
|
|
4240
4271
|
isDragging: ne,
|
|
4241
|
-
over:
|
|
4242
|
-
setActivatorNodeRef:
|
|
4243
|
-
transform:
|
|
4272
|
+
over: $,
|
|
4273
|
+
setActivatorNodeRef: G,
|
|
4274
|
+
transform: Ne
|
|
4244
4275
|
} = ms({
|
|
4245
4276
|
id: l,
|
|
4246
|
-
data:
|
|
4277
|
+
data: F,
|
|
4247
4278
|
attributes: {
|
|
4248
4279
|
...Is,
|
|
4249
4280
|
...n
|
|
4250
4281
|
},
|
|
4251
4282
|
disabled: C.draggable
|
|
4252
|
-
}), h = Ki(M,
|
|
4283
|
+
}), h = Ki(M, pe), u = !!_, O = u && !S && Rt(w) && Rt(j), T = !N && ne, ce = T && O ? Ne : null, H = O ? ce ?? (a ?? m)({
|
|
4253
4284
|
rects: f,
|
|
4254
|
-
activeNodeRect:
|
|
4255
|
-
activeIndex:
|
|
4285
|
+
activeNodeRect: ie,
|
|
4286
|
+
activeIndex: w,
|
|
4256
4287
|
overIndex: j,
|
|
4257
|
-
index:
|
|
4258
|
-
}) : null,
|
|
4288
|
+
index: A
|
|
4289
|
+
}) : null, de = Rt(w) && Rt(j) ? s({
|
|
4259
4290
|
id: l,
|
|
4260
|
-
items:
|
|
4261
|
-
activeIndex:
|
|
4291
|
+
items: v,
|
|
4292
|
+
activeIndex: w,
|
|
4262
4293
|
overIndex: j
|
|
4263
|
-
}) :
|
|
4264
|
-
activeId:
|
|
4265
|
-
items:
|
|
4266
|
-
newIndex:
|
|
4294
|
+
}) : A, ue = _?.id, g = q({
|
|
4295
|
+
activeId: ue,
|
|
4296
|
+
items: v,
|
|
4297
|
+
newIndex: de,
|
|
4267
4298
|
containerId: c
|
|
4268
|
-
}), te =
|
|
4269
|
-
active:
|
|
4299
|
+
}), te = v !== g.current.items, K = t({
|
|
4300
|
+
active: _,
|
|
4270
4301
|
containerId: c,
|
|
4271
4302
|
isDragging: ne,
|
|
4272
|
-
isSorting:
|
|
4303
|
+
isSorting: u,
|
|
4273
4304
|
id: l,
|
|
4274
|
-
index:
|
|
4275
|
-
items:
|
|
4305
|
+
index: A,
|
|
4306
|
+
items: v,
|
|
4276
4307
|
newIndex: g.current.newIndex,
|
|
4277
4308
|
previousItems: g.current.items,
|
|
4278
4309
|
previousContainerId: g.current.containerId,
|
|
4279
4310
|
transition: p,
|
|
4280
4311
|
wasDragging: g.current.activeId != null
|
|
4281
|
-
}),
|
|
4312
|
+
}), oe = ks({
|
|
4282
4313
|
disabled: !K,
|
|
4283
|
-
index:
|
|
4284
|
-
node:
|
|
4314
|
+
index: A,
|
|
4315
|
+
node: R,
|
|
4285
4316
|
rect: x
|
|
4286
4317
|
});
|
|
4287
|
-
return
|
|
4288
|
-
|
|
4289
|
-
}, [
|
|
4290
|
-
if (
|
|
4318
|
+
return W(() => {
|
|
4319
|
+
u && g.current.newIndex !== de && (g.current.newIndex = de), c !== g.current.containerId && (g.current.containerId = c), v !== g.current.items && (g.current.items = v);
|
|
4320
|
+
}, [u, de, c, v]), W(() => {
|
|
4321
|
+
if (ue === g.current.activeId)
|
|
4291
4322
|
return;
|
|
4292
|
-
if (
|
|
4293
|
-
g.current.activeId =
|
|
4323
|
+
if (ue != null && g.current.activeId == null) {
|
|
4324
|
+
g.current.activeId = ue;
|
|
4294
4325
|
return;
|
|
4295
4326
|
}
|
|
4296
|
-
const
|
|
4297
|
-
g.current.activeId =
|
|
4327
|
+
const De = setTimeout(() => {
|
|
4328
|
+
g.current.activeId = ue;
|
|
4298
4329
|
}, 50);
|
|
4299
|
-
return () => clearTimeout(
|
|
4300
|
-
}, [
|
|
4301
|
-
active:
|
|
4302
|
-
activeIndex:
|
|
4303
|
-
attributes:
|
|
4304
|
-
data:
|
|
4330
|
+
return () => clearTimeout(De);
|
|
4331
|
+
}, [ue]), {
|
|
4332
|
+
active: _,
|
|
4333
|
+
activeIndex: w,
|
|
4334
|
+
attributes: Z,
|
|
4335
|
+
data: F,
|
|
4305
4336
|
rect: x,
|
|
4306
|
-
index:
|
|
4307
|
-
newIndex:
|
|
4308
|
-
items:
|
|
4337
|
+
index: A,
|
|
4338
|
+
newIndex: de,
|
|
4339
|
+
items: v,
|
|
4309
4340
|
isOver: I,
|
|
4310
|
-
isSorting:
|
|
4341
|
+
isSorting: u,
|
|
4311
4342
|
isDragging: ne,
|
|
4312
|
-
listeners:
|
|
4313
|
-
node:
|
|
4343
|
+
listeners: he,
|
|
4344
|
+
node: R,
|
|
4314
4345
|
overIndex: j,
|
|
4315
|
-
over:
|
|
4346
|
+
over: $,
|
|
4316
4347
|
setNodeRef: h,
|
|
4317
|
-
setActivatorNodeRef:
|
|
4348
|
+
setActivatorNodeRef: G,
|
|
4318
4349
|
setDroppableNodeRef: M,
|
|
4319
|
-
setDraggableNodeRef:
|
|
4320
|
-
transform:
|
|
4321
|
-
transition:
|
|
4350
|
+
setDraggableNodeRef: pe,
|
|
4351
|
+
transform: oe ?? H,
|
|
4352
|
+
transition: U()
|
|
4322
4353
|
};
|
|
4323
|
-
function
|
|
4354
|
+
function U() {
|
|
4324
4355
|
if (
|
|
4325
4356
|
// Temporarily disable transitions for a single frame to set up derived transforms
|
|
4326
|
-
|
|
4327
|
-
te && g.current.newIndex ===
|
|
4357
|
+
oe || // Or to prevent items jumping to back to their "new" position when items change
|
|
4358
|
+
te && g.current.newIndex === A
|
|
4328
4359
|
)
|
|
4329
4360
|
return Os;
|
|
4330
|
-
if (!(
|
|
4361
|
+
if (!(T && !vn(B) || !p) && (u || K))
|
|
4331
4362
|
return mt.Transition.toString({
|
|
4332
4363
|
...p,
|
|
4333
|
-
property:
|
|
4364
|
+
property: Ir
|
|
4334
4365
|
});
|
|
4335
4366
|
}
|
|
4336
4367
|
}
|
|
@@ -4345,7 +4376,7 @@ function Ms(e, t) {
|
|
|
4345
4376
|
droppable: (r = e?.droppable) != null ? r : t.droppable
|
|
4346
4377
|
};
|
|
4347
4378
|
}
|
|
4348
|
-
|
|
4379
|
+
z.Down, z.Right, z.Up, z.Left;
|
|
4349
4380
|
const At = { private: 0, team: 1, organization: 2, public: 3 }, Ps = 5, Ls = ({ id: e, disabled: t, children: n }) => {
|
|
4350
4381
|
const {
|
|
4351
4382
|
attributes: r,
|
|
@@ -4353,14 +4384,14 @@ const At = { private: 0, team: 1, organization: 2, public: 3 }, Ps = 5, Ls = ({
|
|
|
4353
4384
|
setNodeRef: s,
|
|
4354
4385
|
transform: l,
|
|
4355
4386
|
transition: a,
|
|
4356
|
-
isDragging:
|
|
4387
|
+
isDragging: d
|
|
4357
4388
|
} = Vs({ id: e, disabled: t }), p = {
|
|
4358
4389
|
transform: mt.Transform.toString(l),
|
|
4359
4390
|
transition: a,
|
|
4360
|
-
zIndex:
|
|
4361
|
-
opacity:
|
|
4391
|
+
zIndex: d ? 10 : void 0,
|
|
4392
|
+
opacity: d ? 0.5 : void 0
|
|
4362
4393
|
};
|
|
4363
|
-
return /* @__PURE__ */ i.jsx(i.Fragment, { children: n({ setNodeRef: s, style: p, listeners: o, attributes: r, isDragging:
|
|
4394
|
+
return /* @__PURE__ */ i.jsx(i.Fragment, { children: n({ setNodeRef: s, style: p, listeners: o, attributes: r, isDragging: d }) });
|
|
4364
4395
|
}, qs = ({
|
|
4365
4396
|
views: e,
|
|
4366
4397
|
activeViewId: t,
|
|
@@ -4370,81 +4401,81 @@ const At = { private: 0, team: 1, organization: 2, public: 3 }, Ps = 5, Ls = ({
|
|
|
4370
4401
|
onAddView: s,
|
|
4371
4402
|
onRenameView: l,
|
|
4372
4403
|
onDuplicateView: a,
|
|
4373
|
-
onDeleteView:
|
|
4404
|
+
onDeleteView: d,
|
|
4374
4405
|
onSetDefaultView: p,
|
|
4375
|
-
onShareView:
|
|
4406
|
+
onShareView: v,
|
|
4376
4407
|
onSaveAsView: c,
|
|
4377
|
-
onPinView:
|
|
4378
|
-
onReorderViews:
|
|
4408
|
+
onPinView: w,
|
|
4409
|
+
onReorderViews: b,
|
|
4379
4410
|
onChangeViewType: S,
|
|
4380
4411
|
onConfigView: f,
|
|
4381
4412
|
availableViewTypes: j,
|
|
4382
4413
|
hasUnsavedChanges: N = !1,
|
|
4383
|
-
onResetChanges:
|
|
4414
|
+
onResetChanges: m,
|
|
4384
4415
|
className: C
|
|
4385
4416
|
}) => {
|
|
4386
4417
|
const {
|
|
4387
|
-
showAddButton:
|
|
4388
|
-
inlineRename:
|
|
4389
|
-
contextMenu:
|
|
4418
|
+
showAddButton: A = !0,
|
|
4419
|
+
inlineRename: F = !0,
|
|
4420
|
+
contextMenu: k = !0,
|
|
4390
4421
|
reorderable: x = !1,
|
|
4391
|
-
maxVisibleTabs:
|
|
4422
|
+
maxVisibleTabs: R = 6,
|
|
4392
4423
|
showIndicators: I = !0,
|
|
4393
4424
|
showSaveAsView: M = !0,
|
|
4394
|
-
showPinnedSection:
|
|
4395
|
-
showVisibilityGroups:
|
|
4396
|
-
} = o, [
|
|
4397
|
-
|
|
4398
|
-
|
|
4399
|
-
}, [
|
|
4400
|
-
const
|
|
4401
|
-
if (!
|
|
4425
|
+
showPinnedSection: _ = !0,
|
|
4426
|
+
showVisibilityGroups: B = !1
|
|
4427
|
+
} = o, [ie, Z] = ee(null), [pe, he] = ee(""), ne = q(null);
|
|
4428
|
+
W(() => {
|
|
4429
|
+
ie && ne.current && (ne.current.focus(), ne.current.select());
|
|
4430
|
+
}, [ie]);
|
|
4431
|
+
const $ = L((g) => {
|
|
4432
|
+
if (!F || !l) return;
|
|
4402
4433
|
const te = e.find((K) => K.id === g);
|
|
4403
|
-
te && (
|
|
4404
|
-
}, [
|
|
4405
|
-
|
|
4406
|
-
}, [
|
|
4407
|
-
|
|
4408
|
-
}, []), h =
|
|
4434
|
+
te && (Z(g), he(te.label));
|
|
4435
|
+
}, [F, l, e]), G = L(() => {
|
|
4436
|
+
ie && pe.trim() && l && l(ie, pe.trim()), Z(null), he("");
|
|
4437
|
+
}, [ie, pe, l]), Ne = L(() => {
|
|
4438
|
+
Z(null), he("");
|
|
4439
|
+
}, []), h = V(() => {
|
|
4409
4440
|
const g = [...e];
|
|
4410
4441
|
return g.sort((te, K) => {
|
|
4411
|
-
if (
|
|
4412
|
-
const
|
|
4413
|
-
if (
|
|
4442
|
+
if (_) {
|
|
4443
|
+
const oe = te.isPinned ? 1 : 0, U = K.isPinned ? 1 : 0;
|
|
4444
|
+
if (oe !== U) return U - oe;
|
|
4414
4445
|
}
|
|
4415
|
-
if (
|
|
4416
|
-
const
|
|
4417
|
-
if (
|
|
4446
|
+
if (B) {
|
|
4447
|
+
const oe = At[te.visibility || "public"] ?? At.public, U = At[K.visibility || "public"] ?? At.public;
|
|
4448
|
+
if (oe !== U) return oe - U;
|
|
4418
4449
|
}
|
|
4419
4450
|
return 0;
|
|
4420
4451
|
}), g;
|
|
4421
|
-
}, [e,
|
|
4422
|
-
|
|
4423
|
-
|
|
4424
|
-
),
|
|
4452
|
+
}, [e, _, B]), u = h.slice(0, R), O = h.slice(R), T = uo(
|
|
4453
|
+
zn(yn, { activationConstraint: { distance: Ps } }),
|
|
4454
|
+
zn(xn)
|
|
4455
|
+
), ce = L((g) => {
|
|
4425
4456
|
const { active: te, over: K } = g;
|
|
4426
|
-
if (!K || te.id === K.id || !
|
|
4427
|
-
const
|
|
4428
|
-
if (
|
|
4429
|
-
const
|
|
4430
|
-
|
|
4431
|
-
}, [h,
|
|
4432
|
-
if (!
|
|
4433
|
-
const te =
|
|
4434
|
-
return
|
|
4435
|
-
}, [
|
|
4436
|
-
const K = g.id === t,
|
|
4457
|
+
if (!K || te.id === K.id || !b) return;
|
|
4458
|
+
const oe = h.findIndex((be) => be.id === te.id), U = h.findIndex((be) => be.id === K.id);
|
|
4459
|
+
if (oe === -1 || U === -1) return;
|
|
4460
|
+
const De = jn(h, oe, U);
|
|
4461
|
+
b(De.map((be) => be.id));
|
|
4462
|
+
}, [h, b]), Y = xi, H = L((g) => {
|
|
4463
|
+
if (!B || g === 0) return !1;
|
|
4464
|
+
const te = u[g - 1], K = u[g], oe = (U) => U.visibility === "private";
|
|
4465
|
+
return oe(te) && !oe(K);
|
|
4466
|
+
}, [B, u]), de = (g, te) => {
|
|
4467
|
+
const K = g.id === t, oe = r[g.type] || Y, U = ie === g.id, De = I && (g.hasActiveFilters || g.hasActiveSort), be = H(te), He = ((se) => B ? se.visibility === "private" ? /* @__PURE__ */ i.jsx(on, { "data-testid": `view-tab-visibility-${se.id}`, className: "h-3 w-3 text-muted-foreground shrink-0" }) : se.visibility ? /* @__PURE__ */ i.jsx(yi, { "data-testid": `view-tab-visibility-${se.id}`, className: "h-3 w-3 text-muted-foreground shrink-0" }) : null : null)(g), _e = (se) => /* @__PURE__ */ i.jsxs(
|
|
4437
4468
|
"button",
|
|
4438
4469
|
{
|
|
4439
4470
|
"data-testid": `view-tab-${g.id}`,
|
|
4440
|
-
onClick: () => !
|
|
4441
|
-
onDoubleClick: () =>
|
|
4442
|
-
className:
|
|
4471
|
+
onClick: () => !U && n(g.id),
|
|
4472
|
+
onDoubleClick: () => $(g.id),
|
|
4473
|
+
className: re(
|
|
4443
4474
|
"inline-flex items-center gap-1.5 px-3 py-2 text-sm font-medium border-b-2 transition-colors whitespace-nowrap relative",
|
|
4444
4475
|
K ? "border-primary text-primary" : "border-transparent text-muted-foreground hover:text-foreground hover:border-border"
|
|
4445
4476
|
),
|
|
4446
4477
|
children: [
|
|
4447
|
-
x &&
|
|
4478
|
+
x && b && /* @__PURE__ */ i.jsx(
|
|
4448
4479
|
"span",
|
|
4449
4480
|
{
|
|
4450
4481
|
"data-testid": `view-tab-drag-handle-${g.id}`,
|
|
@@ -4454,26 +4485,26 @@ const At = { private: 0, team: 1, organization: 2, public: 3 }, Ps = 5, Ls = ({
|
|
|
4454
4485
|
children: /* @__PURE__ */ i.jsx(Si, { className: "h-3 w-3" })
|
|
4455
4486
|
}
|
|
4456
4487
|
),
|
|
4457
|
-
|
|
4488
|
+
_ && g.isPinned && /* @__PURE__ */ i.jsx(Xt, { "data-testid": `view-tab-pin-indicator-${g.id}`, className: "h-3 w-3 text-primary shrink-0" }),
|
|
4458
4489
|
He,
|
|
4459
|
-
/* @__PURE__ */ i.jsx(
|
|
4460
|
-
|
|
4490
|
+
/* @__PURE__ */ i.jsx(oe, { className: "h-3.5 w-3.5" }),
|
|
4491
|
+
U ? /* @__PURE__ */ i.jsx(
|
|
4461
4492
|
We,
|
|
4462
4493
|
{
|
|
4463
4494
|
ref: ne,
|
|
4464
4495
|
"data-testid": `view-tab-rename-input-${g.id}`,
|
|
4465
|
-
value:
|
|
4466
|
-
onChange: (
|
|
4467
|
-
onBlur:
|
|
4468
|
-
onKeyDown: (
|
|
4469
|
-
|
|
4496
|
+
value: pe,
|
|
4497
|
+
onChange: (X) => he(X.target.value),
|
|
4498
|
+
onBlur: G,
|
|
4499
|
+
onKeyDown: (X) => {
|
|
4500
|
+
X.key === "Enter" && G(), X.key === "Escape" && Ne();
|
|
4470
4501
|
},
|
|
4471
4502
|
className: "h-5 w-24 px-1 py-0 text-sm border-none focus-visible:ring-1",
|
|
4472
|
-
onClick: (
|
|
4503
|
+
onClick: (X) => X.stopPropagation()
|
|
4473
4504
|
}
|
|
4474
4505
|
) : /* @__PURE__ */ i.jsx("span", { children: g.label }),
|
|
4475
|
-
|
|
4476
|
-
/* @__PURE__ */ i.jsx(
|
|
4506
|
+
De && /* @__PURE__ */ i.jsxs(Nn, { children: [
|
|
4507
|
+
/* @__PURE__ */ i.jsx(Dn, { asChild: !0, children: /* @__PURE__ */ i.jsx(
|
|
4477
4508
|
"span",
|
|
4478
4509
|
{
|
|
4479
4510
|
"data-testid": `view-tab-indicator-${g.id}`,
|
|
@@ -4481,17 +4512,17 @@ const At = { private: 0, team: 1, organization: 2, public: 3 }, Ps = 5, Ls = ({
|
|
|
4481
4512
|
children: [g.hasActiveFilters && "F", g.hasActiveSort && "S"].filter(Boolean).join("")
|
|
4482
4513
|
}
|
|
4483
4514
|
) }),
|
|
4484
|
-
/* @__PURE__ */ i.jsx(
|
|
4515
|
+
/* @__PURE__ */ i.jsx(Rn, { side: "bottom", className: "text-xs", children: [g.hasActiveFilters && "Active filters", g.hasActiveSort && "Active sort"].filter(Boolean).join(", ") })
|
|
4485
4516
|
] }),
|
|
4486
|
-
g.isDefault && /* @__PURE__ */ i.jsx(
|
|
4517
|
+
g.isDefault && /* @__PURE__ */ i.jsx(Tn, { className: "h-3 w-3 text-amber-500 fill-amber-500 shrink-0" }),
|
|
4487
4518
|
K && f && /* @__PURE__ */ i.jsx(
|
|
4488
4519
|
"button",
|
|
4489
4520
|
{
|
|
4490
4521
|
type: "button",
|
|
4491
4522
|
"data-testid": `view-tab-config-${g.id}`,
|
|
4492
4523
|
className: "ml-0.5 h-4 w-4 flex items-center justify-center rounded hover:bg-accent shrink-0 opacity-60 hover:opacity-100 transition-opacity",
|
|
4493
|
-
onClick: (
|
|
4494
|
-
|
|
4524
|
+
onClick: (X) => {
|
|
4525
|
+
X.stopPropagation(), f(g.id);
|
|
4495
4526
|
},
|
|
4496
4527
|
"aria-label": `Configure ${g.label}`,
|
|
4497
4528
|
children: /* @__PURE__ */ i.jsx(Ni, { className: "h-3 w-3" })
|
|
@@ -4499,14 +4530,14 @@ const At = { private: 0, team: 1, organization: 2, public: 3 }, Ps = 5, Ls = ({
|
|
|
4499
4530
|
)
|
|
4500
4531
|
]
|
|
4501
4532
|
}
|
|
4502
|
-
),
|
|
4533
|
+
), Re = (se) => !k || U ? se : /* @__PURE__ */ i.jsxs(Zr, { children: [
|
|
4503
4534
|
/* @__PURE__ */ i.jsx(ei, { asChild: !0, children: se }),
|
|
4504
4535
|
/* @__PURE__ */ i.jsxs(ti, { children: [
|
|
4505
4536
|
l && /* @__PURE__ */ i.jsxs(
|
|
4506
4537
|
qe,
|
|
4507
4538
|
{
|
|
4508
4539
|
"data-testid": `context-menu-rename-${g.id}`,
|
|
4509
|
-
onClick: () =>
|
|
4540
|
+
onClick: () => $(g.id),
|
|
4510
4541
|
children: [
|
|
4511
4542
|
/* @__PURE__ */ i.jsx(ji, { className: "h-4 w-4 mr-2" }),
|
|
4512
4543
|
" Rename"
|
|
@@ -4524,11 +4555,11 @@ const At = { private: 0, team: 1, organization: 2, public: 3 }, Ps = 5, Ls = ({
|
|
|
4524
4555
|
]
|
|
4525
4556
|
}
|
|
4526
4557
|
),
|
|
4527
|
-
|
|
4558
|
+
v && /* @__PURE__ */ i.jsxs(
|
|
4528
4559
|
qe,
|
|
4529
4560
|
{
|
|
4530
4561
|
"data-testid": `context-menu-share-${g.id}`,
|
|
4531
|
-
onClick: () =>
|
|
4562
|
+
onClick: () => v(g.id),
|
|
4532
4563
|
children: [
|
|
4533
4564
|
/* @__PURE__ */ i.jsx(Mt, { className: "h-4 w-4 mr-2" }),
|
|
4534
4565
|
" Share View"
|
|
@@ -4541,16 +4572,16 @@ const At = { private: 0, team: 1, organization: 2, public: 3 }, Ps = 5, Ls = ({
|
|
|
4541
4572
|
"data-testid": `context-menu-default-${g.id}`,
|
|
4542
4573
|
onClick: () => p(g.id),
|
|
4543
4574
|
children: [
|
|
4544
|
-
/* @__PURE__ */ i.jsx(
|
|
4575
|
+
/* @__PURE__ */ i.jsx(Tn, { className: "h-4 w-4 mr-2" }),
|
|
4545
4576
|
" Set as Default"
|
|
4546
4577
|
]
|
|
4547
4578
|
}
|
|
4548
4579
|
),
|
|
4549
|
-
|
|
4580
|
+
w && /* @__PURE__ */ i.jsx(
|
|
4550
4581
|
qe,
|
|
4551
4582
|
{
|
|
4552
4583
|
"data-testid": `context-menu-pin-${g.id}`,
|
|
4553
|
-
onClick: () =>
|
|
4584
|
+
onClick: () => w(g.id, !g.isPinned),
|
|
4554
4585
|
children: g.isPinned ? /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
|
|
4555
4586
|
/* @__PURE__ */ i.jsx(Ci, { className: "h-4 w-4 mr-2" }),
|
|
4556
4587
|
" Unpin View"
|
|
@@ -4561,43 +4592,43 @@ const At = { private: 0, team: 1, organization: 2, public: 3 }, Ps = 5, Ls = ({
|
|
|
4561
4592
|
}
|
|
4562
4593
|
),
|
|
4563
4594
|
S && j && j.length > 0 && /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
|
|
4564
|
-
/* @__PURE__ */ i.jsx(
|
|
4595
|
+
/* @__PURE__ */ i.jsx(En, {}),
|
|
4565
4596
|
/* @__PURE__ */ i.jsxs(ni, { children: [
|
|
4566
4597
|
/* @__PURE__ */ i.jsxs(ri, { "data-testid": `context-menu-change-type-${g.id}`, children: [
|
|
4567
|
-
/* @__PURE__ */ i.jsx(
|
|
4598
|
+
/* @__PURE__ */ i.jsx(ur, { className: "h-4 w-4 mr-2" }),
|
|
4568
4599
|
" Change View Type"
|
|
4569
4600
|
] }),
|
|
4570
|
-
/* @__PURE__ */ i.jsx(ii, { "data-testid": `context-menu-type-submenu-${g.id}`, children: j.map((
|
|
4571
|
-
const Pe = r[
|
|
4601
|
+
/* @__PURE__ */ i.jsx(ii, { "data-testid": `context-menu-type-submenu-${g.id}`, children: j.map((X) => {
|
|
4602
|
+
const Pe = r[X.type] || Y;
|
|
4572
4603
|
return /* @__PURE__ */ i.jsxs(
|
|
4573
4604
|
qe,
|
|
4574
4605
|
{
|
|
4575
|
-
"data-testid": `context-menu-type-${g.id}-${
|
|
4576
|
-
disabled:
|
|
4577
|
-
onClick: () => S(g.id,
|
|
4606
|
+
"data-testid": `context-menu-type-${g.id}-${X.type}`,
|
|
4607
|
+
disabled: X.type === g.type,
|
|
4608
|
+
onClick: () => S(g.id, X.type),
|
|
4578
4609
|
children: [
|
|
4579
4610
|
/* @__PURE__ */ i.jsx(Pe, { className: "h-4 w-4 mr-2" }),
|
|
4580
4611
|
/* @__PURE__ */ i.jsxs("div", { className: "flex flex-col", children: [
|
|
4581
|
-
/* @__PURE__ */ i.jsx("span", { children:
|
|
4582
|
-
|
|
4612
|
+
/* @__PURE__ */ i.jsx("span", { children: X.label }),
|
|
4613
|
+
X.description && /* @__PURE__ */ i.jsx("span", { className: "text-xs text-muted-foreground", children: X.description })
|
|
4583
4614
|
] })
|
|
4584
4615
|
]
|
|
4585
4616
|
},
|
|
4586
|
-
|
|
4617
|
+
X.type
|
|
4587
4618
|
);
|
|
4588
4619
|
}) })
|
|
4589
4620
|
] })
|
|
4590
4621
|
] }),
|
|
4591
|
-
|
|
4592
|
-
/* @__PURE__ */ i.jsx(
|
|
4622
|
+
d && /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
|
|
4623
|
+
/* @__PURE__ */ i.jsx(En, {}),
|
|
4593
4624
|
/* @__PURE__ */ i.jsxs(
|
|
4594
4625
|
qe,
|
|
4595
4626
|
{
|
|
4596
4627
|
"data-testid": `context-menu-delete-${g.id}`,
|
|
4597
|
-
onClick: () =>
|
|
4628
|
+
onClick: () => d(g.id),
|
|
4598
4629
|
className: "text-destructive focus:text-destructive",
|
|
4599
4630
|
children: [
|
|
4600
|
-
/* @__PURE__ */ i.jsx(
|
|
4631
|
+
/* @__PURE__ */ i.jsx(dr, { className: "h-4 w-4 mr-2" }),
|
|
4601
4632
|
" Delete View"
|
|
4602
4633
|
]
|
|
4603
4634
|
}
|
|
@@ -4605,22 +4636,22 @@ const At = { private: 0, team: 1, organization: 2, public: 3 }, Ps = 5, Ls = ({
|
|
|
4605
4636
|
] })
|
|
4606
4637
|
] })
|
|
4607
4638
|
] });
|
|
4608
|
-
return x &&
|
|
4639
|
+
return x && b ? /* @__PURE__ */ i.jsxs(ve.Fragment, { children: [
|
|
4609
4640
|
be && /* @__PURE__ */ i.jsx("div", { "data-testid": "view-tab-visibility-separator", className: "w-px h-5 bg-border mx-1 self-center shrink-0" }),
|
|
4610
|
-
/* @__PURE__ */ i.jsx(Ls, { id: g.id, children: ({ setNodeRef: se, style:
|
|
4611
|
-
] }, g.id) : /* @__PURE__ */ i.jsxs(
|
|
4641
|
+
/* @__PURE__ */ i.jsx(Ls, { id: g.id, children: ({ setNodeRef: se, style: X, listeners: Pe, attributes: Je, isDragging: ot }) => /* @__PURE__ */ i.jsx("div", { ref: se, style: X, className: re("flex", ot && "z-10"), children: Re(_e({ listeners: Pe, attributes: Je })) }) })
|
|
4642
|
+
] }, g.id) : /* @__PURE__ */ i.jsxs(ve.Fragment, { children: [
|
|
4612
4643
|
be && /* @__PURE__ */ i.jsx("div", { "data-testid": "view-tab-visibility-separator", className: "w-px h-5 bg-border mx-1 self-center shrink-0" }),
|
|
4613
|
-
|
|
4644
|
+
Re(_e())
|
|
4614
4645
|
] }, g.id);
|
|
4615
|
-
},
|
|
4646
|
+
}, ue = /* @__PURE__ */ i.jsx(i.Fragment, { children: u.map((g, te) => de(g, te)) });
|
|
4616
4647
|
return /* @__PURE__ */ i.jsx(Xr, { children: /* @__PURE__ */ i.jsxs(
|
|
4617
4648
|
"div",
|
|
4618
4649
|
{
|
|
4619
4650
|
"data-testid": "view-tab-bar",
|
|
4620
|
-
className:
|
|
4651
|
+
className: re("flex items-center gap-0.5 -mb-px", C),
|
|
4621
4652
|
children: [
|
|
4622
|
-
x &&
|
|
4623
|
-
|
|
4653
|
+
x && b ? /* @__PURE__ */ i.jsx(gs, { sensors: T, collisionDetection: vo, onDragEnd: ce, children: /* @__PURE__ */ i.jsx(Es, { items: u.map((g) => g.id), strategy: Ds, children: /* @__PURE__ */ i.jsx("div", { "data-testid": "view-tab-sortable-container", className: "flex items-center gap-0.5", children: ue }) }) }) : ue,
|
|
4654
|
+
O.length > 0 && /* @__PURE__ */ i.jsxs(qr, { children: [
|
|
4624
4655
|
/* @__PURE__ */ i.jsx(Kr, { asChild: !0, children: /* @__PURE__ */ i.jsxs(
|
|
4625
4656
|
"button",
|
|
4626
4657
|
{
|
|
@@ -4629,14 +4660,14 @@ const At = { private: 0, team: 1, organization: 2, public: 3 }, Ps = 5, Ls = ({
|
|
|
4629
4660
|
children: [
|
|
4630
4661
|
/* @__PURE__ */ i.jsx(mi, { className: "h-4 w-4" }),
|
|
4631
4662
|
/* @__PURE__ */ i.jsxs("span", { className: "text-xs", children: [
|
|
4632
|
-
|
|
4663
|
+
O.length,
|
|
4633
4664
|
" more"
|
|
4634
4665
|
] })
|
|
4635
4666
|
]
|
|
4636
4667
|
}
|
|
4637
4668
|
) }),
|
|
4638
|
-
/* @__PURE__ */ i.jsx(Jr, { align: "end", children:
|
|
4639
|
-
const te = r[g.type] ||
|
|
4669
|
+
/* @__PURE__ */ i.jsx(Jr, { align: "end", children: O.map((g) => {
|
|
4670
|
+
const te = r[g.type] || Y;
|
|
4640
4671
|
return /* @__PURE__ */ i.jsxs(
|
|
4641
4672
|
Qr,
|
|
4642
4673
|
{
|
|
@@ -4653,8 +4684,8 @@ const At = { private: 0, team: 1, organization: 2, public: 3 }, Ps = 5, Ls = ({
|
|
|
4653
4684
|
);
|
|
4654
4685
|
}) })
|
|
4655
4686
|
] }),
|
|
4656
|
-
|
|
4657
|
-
/* @__PURE__ */ i.jsx(
|
|
4687
|
+
A && s && /* @__PURE__ */ i.jsxs(Nn, { children: [
|
|
4688
|
+
/* @__PURE__ */ i.jsx(Dn, { asChild: !0, children: /* @__PURE__ */ i.jsx(
|
|
4658
4689
|
"button",
|
|
4659
4690
|
{
|
|
4660
4691
|
"data-testid": "view-tab-add",
|
|
@@ -4663,7 +4694,7 @@ const At = { private: 0, team: 1, organization: 2, public: 3 }, Ps = 5, Ls = ({
|
|
|
4663
4694
|
children: /* @__PURE__ */ i.jsx(fn, { className: "h-4 w-4" })
|
|
4664
4695
|
}
|
|
4665
4696
|
) }),
|
|
4666
|
-
/* @__PURE__ */ i.jsx(
|
|
4697
|
+
/* @__PURE__ */ i.jsx(Rn, { children: "Add View" })
|
|
4667
4698
|
] }),
|
|
4668
4699
|
M && N && /* @__PURE__ */ i.jsxs(
|
|
4669
4700
|
"div",
|
|
@@ -4674,7 +4705,7 @@ const At = { private: 0, team: 1, organization: 2, public: 3 }, Ps = 5, Ls = ({
|
|
|
4674
4705
|
/* @__PURE__ */ i.jsx(wi, { className: "h-3.5 w-3.5" }),
|
|
4675
4706
|
/* @__PURE__ */ i.jsx("span", { className: "hidden sm:inline", children: "Unsaved changes" }),
|
|
4676
4707
|
c && /* @__PURE__ */ i.jsx(
|
|
4677
|
-
|
|
4708
|
+
Ce,
|
|
4678
4709
|
{
|
|
4679
4710
|
variant: "ghost",
|
|
4680
4711
|
size: "sm",
|
|
@@ -4684,14 +4715,14 @@ const At = { private: 0, team: 1, organization: 2, public: 3 }, Ps = 5, Ls = ({
|
|
|
4684
4715
|
children: "Save as View"
|
|
4685
4716
|
}
|
|
4686
4717
|
),
|
|
4687
|
-
|
|
4688
|
-
|
|
4718
|
+
m && /* @__PURE__ */ i.jsx(
|
|
4719
|
+
Ce,
|
|
4689
4720
|
{
|
|
4690
4721
|
variant: "ghost",
|
|
4691
4722
|
size: "sm",
|
|
4692
4723
|
"data-testid": "view-tab-reset-btn",
|
|
4693
4724
|
className: "h-6 px-2 text-xs",
|
|
4694
|
-
onClick:
|
|
4725
|
+
onClick: m,
|
|
4695
4726
|
children: "Reset"
|
|
4696
4727
|
}
|
|
4697
4728
|
)
|
|
@@ -4701,18 +4732,18 @@ const At = { private: 0, team: 1, organization: 2, public: 3 }, Ps = 5, Ls = ({
|
|
|
4701
4732
|
]
|
|
4702
4733
|
}
|
|
4703
4734
|
) });
|
|
4704
|
-
}, _s =
|
|
4705
|
-
let
|
|
4735
|
+
}, _s = ve.createContext(null);
|
|
4736
|
+
let kr = _s;
|
|
4706
4737
|
try {
|
|
4707
4738
|
const e = require("@object-ui/react");
|
|
4708
|
-
e.SchemaRendererContext && (
|
|
4739
|
+
e.SchemaRendererContext && (kr = e.SchemaRendererContext);
|
|
4709
4740
|
} catch {
|
|
4710
4741
|
}
|
|
4711
|
-
const
|
|
4712
|
-
const n = Ge(
|
|
4742
|
+
const Vr = ({ schema: e }) => {
|
|
4743
|
+
const n = Ge(kr)?.dataSource ?? null;
|
|
4713
4744
|
return /* @__PURE__ */ i.jsx(zi, { schema: e, dataSource: n });
|
|
4714
4745
|
};
|
|
4715
|
-
Ke.register("object-view",
|
|
4746
|
+
Ke.register("object-view", Vr, {
|
|
4716
4747
|
namespace: "plugin-view",
|
|
4717
4748
|
label: "Object View",
|
|
4718
4749
|
category: "view",
|
|
@@ -4744,12 +4775,12 @@ Ke.register("object-view", kr, {
|
|
|
4744
4775
|
showViewSwitcher: !0
|
|
4745
4776
|
}
|
|
4746
4777
|
});
|
|
4747
|
-
Ke.register("view",
|
|
4778
|
+
Ke.register("view", Vr, {
|
|
4748
4779
|
namespace: "plugin-view",
|
|
4749
4780
|
label: "View",
|
|
4750
4781
|
category: "view"
|
|
4751
4782
|
});
|
|
4752
|
-
Ke.register("view-switcher",
|
|
4783
|
+
Ke.register("view-switcher", hr, {
|
|
4753
4784
|
namespace: "view",
|
|
4754
4785
|
label: "View Switcher",
|
|
4755
4786
|
category: "view",
|
|
@@ -4860,6 +4891,6 @@ export {
|
|
|
4860
4891
|
zi as ObjectView,
|
|
4861
4892
|
qi as SharedViewLink,
|
|
4862
4893
|
Gi as SortUI,
|
|
4863
|
-
|
|
4894
|
+
hr as ViewSwitcher,
|
|
4864
4895
|
qs as ViewTabBar
|
|
4865
4896
|
};
|