@object-ui/plugin-view 3.1.1 → 3.1.2
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 +11 -0
- package/dist/index.js +236 -235
- package/dist/index.umd.cjs +3 -3
- package/package.json +7 -7
- package/src/ObjectView.tsx +2 -1
- package/src/__tests__/ObjectView.test.tsx +40 -0
- package/src/__tests__/registration.test.tsx +0 -32
package/dist/index.js
CHANGED
|
@@ -64,14 +64,14 @@ function Ei() {
|
|
|
64
64
|
case C:
|
|
65
65
|
return (h._context.displayName || "Context") + ".Consumer";
|
|
66
66
|
case F:
|
|
67
|
-
var
|
|
68
|
-
return h = h.displayName, h || (h =
|
|
67
|
+
var d = h.render;
|
|
68
|
+
return h = h.displayName, h || (h = d.displayName || d.name || "", h = h !== "" ? "ForwardRef(" + h + ")" : "ForwardRef"), h;
|
|
69
69
|
case R:
|
|
70
|
-
return
|
|
70
|
+
return d = h.displayName || null, d !== null ? d : e(h.type) || "Memo";
|
|
71
71
|
case I:
|
|
72
|
-
|
|
72
|
+
d = h._payload, h = h._init;
|
|
73
73
|
try {
|
|
74
|
-
return e(h(
|
|
74
|
+
return e(h(d));
|
|
75
75
|
} catch {
|
|
76
76
|
}
|
|
77
77
|
}
|
|
@@ -83,15 +83,15 @@ function Ei() {
|
|
|
83
83
|
function n(h) {
|
|
84
84
|
try {
|
|
85
85
|
t(h);
|
|
86
|
-
var
|
|
86
|
+
var d = !1;
|
|
87
87
|
} catch {
|
|
88
|
-
|
|
88
|
+
d = !0;
|
|
89
89
|
}
|
|
90
|
-
if (
|
|
91
|
-
|
|
92
|
-
var O =
|
|
90
|
+
if (d) {
|
|
91
|
+
d = console;
|
|
92
|
+
var O = d.error, T = typeof Symbol == "function" && Symbol.toStringTag && h[Symbol.toStringTag] || h.constructor.name || "Object";
|
|
93
93
|
return O.call(
|
|
94
|
-
|
|
94
|
+
d,
|
|
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);
|
|
@@ -102,8 +102,8 @@ 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 d = e(h);
|
|
106
|
+
return d ? "<" + d + ">" : "<...>";
|
|
107
107
|
} catch {
|
|
108
108
|
return "<...>";
|
|
109
109
|
}
|
|
@@ -117,16 +117,16 @@ function Ei() {
|
|
|
117
117
|
}
|
|
118
118
|
function l(h) {
|
|
119
119
|
if (ie.call(h, "key")) {
|
|
120
|
-
var
|
|
121
|
-
if (
|
|
120
|
+
var d = Object.getOwnPropertyDescriptor(h, "key").get;
|
|
121
|
+
if (d && d.isReactWarning) return !1;
|
|
122
122
|
}
|
|
123
123
|
return h.key !== void 0;
|
|
124
124
|
}
|
|
125
|
-
function a(h,
|
|
125
|
+
function a(h, d) {
|
|
126
126
|
function O() {
|
|
127
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
|
+
d
|
|
130
130
|
));
|
|
131
131
|
}
|
|
132
132
|
O.isReactWarning = !0, Object.defineProperty(h, "key", {
|
|
@@ -134,23 +134,23 @@ function Ei() {
|
|
|
134
134
|
configurable: !0
|
|
135
135
|
});
|
|
136
136
|
}
|
|
137
|
-
function
|
|
137
|
+
function u() {
|
|
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,
|
|
143
|
+
function p(h, d, O, T, ce, Y) {
|
|
144
144
|
var H = O.ref;
|
|
145
145
|
return h = {
|
|
146
146
|
$$typeof: S,
|
|
147
147
|
type: h,
|
|
148
|
-
key:
|
|
148
|
+
key: d,
|
|
149
149
|
props: O,
|
|
150
150
|
_owner: T
|
|
151
151
|
}, (H !== void 0 ? H : null) !== null ? Object.defineProperty(h, "ref", {
|
|
152
152
|
enumerable: !1,
|
|
153
|
-
get:
|
|
153
|
+
get: u
|
|
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,
|
|
@@ -173,8 +173,8 @@ function Ei() {
|
|
|
173
173
|
value: Y
|
|
174
174
|
}), Object.freeze && (Object.freeze(h.props), Object.freeze(h)), h;
|
|
175
175
|
}
|
|
176
|
-
function v(h,
|
|
177
|
-
var H =
|
|
176
|
+
function v(h, d, O, T, ce, Y) {
|
|
177
|
+
var H = d.children;
|
|
178
178
|
if (H !== void 0)
|
|
179
179
|
if (T)
|
|
180
180
|
if (Z(H)) {
|
|
@@ -186,9 +186,9 @@ function Ei() {
|
|
|
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
188
|
else c(H);
|
|
189
|
-
if (ie.call(
|
|
189
|
+
if (ie.call(d, "key")) {
|
|
190
190
|
H = e(h);
|
|
191
|
-
var de = Object.keys(
|
|
191
|
+
var de = Object.keys(d).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(
|
|
@@ -204,11 +204,11 @@ React keys must be passed directly to JSX without using spread:
|
|
|
204
204
|
H
|
|
205
205
|
), Ne[H + T] = !0);
|
|
206
206
|
}
|
|
207
|
-
if (H = null, O !== void 0 && (n(O), H = "" + O), l(
|
|
207
|
+
if (H = null, O !== void 0 && (n(O), H = "" + O), l(d) && (n(d.key), H = "" + d.key), "key" in d) {
|
|
208
208
|
O = {};
|
|
209
|
-
for (var ue in
|
|
210
|
-
ue !== "key" && (O[ue] =
|
|
211
|
-
} else O =
|
|
209
|
+
for (var ue in d)
|
|
210
|
+
ue !== "key" && (O[ue] = d[ue]);
|
|
211
|
+
} else O = d;
|
|
212
212
|
return H && a(
|
|
213
213
|
O,
|
|
214
214
|
typeof h == "function" ? h.displayName || h.name || "Unknown" : h
|
|
@@ -239,21 +239,21 @@ React keys must be passed directly to JSX without using spread:
|
|
|
239
239
|
b,
|
|
240
240
|
s
|
|
241
241
|
)(), G = pe(r(s)), Ne = {};
|
|
242
|
-
ft.Fragment = j, ft.jsx = function(h,
|
|
242
|
+
ft.Fragment = j, ft.jsx = function(h, d, O) {
|
|
243
243
|
var T = 1e4 > B.recentlyCreatedOwnerStacks++;
|
|
244
244
|
return v(
|
|
245
245
|
h,
|
|
246
|
-
|
|
246
|
+
d,
|
|
247
247
|
O,
|
|
248
248
|
!1,
|
|
249
249
|
T ? Error("react-stack-top-frame") : $,
|
|
250
250
|
T ? pe(r(h)) : G
|
|
251
251
|
);
|
|
252
|
-
}, ft.jsxs = function(h,
|
|
252
|
+
}, ft.jsxs = function(h, d, O) {
|
|
253
253
|
var T = 1e4 > B.recentlyCreatedOwnerStacks++;
|
|
254
254
|
return v(
|
|
255
255
|
h,
|
|
256
|
-
|
|
256
|
+
d,
|
|
257
257
|
O,
|
|
258
258
|
!0,
|
|
259
259
|
T ? Error("react-stack-top-frame") : $,
|
|
@@ -291,7 +291,7 @@ const Vn = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, Mn = Ti, e
|
|
|
291
291
|
}), a = n && Object.entries(n).reduce((p, v) => {
|
|
292
292
|
let [c, w] = v;
|
|
293
293
|
return w === void 0 || (p[c] = w), p;
|
|
294
|
-
}, {}),
|
|
294
|
+
}, {}), u = t == null || (r = t.compoundVariants) === null || r === void 0 ? void 0 : r.reduce((p, v) => {
|
|
295
295
|
let { class: c, className: w, ...b } = v;
|
|
296
296
|
return Object.entries(b).every((S) => {
|
|
297
297
|
let [f, j] = S;
|
|
@@ -308,7 +308,7 @@ const Vn = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, Mn = Ti, e
|
|
|
308
308
|
w
|
|
309
309
|
] : p;
|
|
310
310
|
}, []);
|
|
311
|
-
return Mn(e, l,
|
|
311
|
+
return Mn(e, l, u, n?.class, n?.className);
|
|
312
312
|
}, Fi = {
|
|
313
313
|
list: "List",
|
|
314
314
|
detail: "Detail",
|
|
@@ -411,7 +411,7 @@ const Ln = {
|
|
|
411
411
|
createViewLabel: s = "Create view",
|
|
412
412
|
...l
|
|
413
413
|
}) => {
|
|
414
|
-
const a = Q.useMemo(() => e.storageKey ? e.storageKey : `view-switcher${e.id ? `-${e.id}` : ""}`, [e.id, e.storageKey]), [
|
|
414
|
+
const a = Q.useMemo(() => e.storageKey ? e.storageKey : `view-switcher${e.id ? `-${e.id}` : ""}`, [e.id, e.storageKey]), [u, p] = Q.useState(() => _i(e));
|
|
415
415
|
Q.useEffect(() => {
|
|
416
416
|
if (e.activeView) {
|
|
417
417
|
p(e.activeView);
|
|
@@ -427,12 +427,12 @@ const Ln = {
|
|
|
427
427
|
} catch {
|
|
428
428
|
}
|
|
429
429
|
}, [e.activeView, e.persistPreference, e.views, a]), Q.useEffect(() => {
|
|
430
|
-
if (!(!e.persistPreference || !
|
|
430
|
+
if (!(!e.persistPreference || !u || e.activeView))
|
|
431
431
|
try {
|
|
432
|
-
localStorage.setItem(a,
|
|
432
|
+
localStorage.setItem(a, u);
|
|
433
433
|
} catch {
|
|
434
434
|
}
|
|
435
|
-
}, [
|
|
435
|
+
}, [u, e.activeView, e.persistPreference, a]);
|
|
436
436
|
const v = Q.useCallback((x) => {
|
|
437
437
|
n?.(x), e.onViewChange && typeof window < "u" && window.dispatchEvent(
|
|
438
438
|
new CustomEvent(e.onViewChange, {
|
|
@@ -441,7 +441,7 @@ const Ln = {
|
|
|
441
441
|
);
|
|
442
442
|
}, [n, e.onViewChange]), c = Q.useCallback((x) => {
|
|
443
443
|
p(x), v(x);
|
|
444
|
-
}, [v]), w =
|
|
444
|
+
}, [v]), w = u || 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
445
|
const I = x.icon && pr(x.icon) || Ln[x.type];
|
|
446
446
|
return /* @__PURE__ */ i.jsx(
|
|
447
447
|
Ce,
|
|
@@ -534,12 +534,12 @@ const zi = ({
|
|
|
534
534
|
onViewChange: s,
|
|
535
535
|
onRowClick: l,
|
|
536
536
|
onEdit: a,
|
|
537
|
-
renderListView:
|
|
537
|
+
renderListView: u,
|
|
538
538
|
toolbarAddon: p,
|
|
539
539
|
onCreateView: v,
|
|
540
540
|
onViewAction: c
|
|
541
541
|
}) => {
|
|
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,
|
|
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, d = G?.find((y) => y.id === h) || G?.[0], O = V(() => $?.type ? $.type : d?.type ? d.type : e.defaultViewType || "grid", [$, d, e.defaultViewType]), T = e.navigation;
|
|
543
543
|
W(() => {
|
|
544
544
|
let y = !0;
|
|
545
545
|
const D = async () => {
|
|
@@ -556,13 +556,13 @@ const zi = ({
|
|
|
556
556
|
}, [e.objectName, t]), W(() => {
|
|
557
557
|
let y = !0;
|
|
558
558
|
return (async () => {
|
|
559
|
-
if (!(O === "grid" && !
|
|
559
|
+
if (!(O === "grid" && !u) && !(!t || !e.objectName)) {
|
|
560
560
|
I(!0);
|
|
561
561
|
try {
|
|
562
|
-
const E = $?.filter ||
|
|
562
|
+
const E = $?.filter || d?.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
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 ||
|
|
565
|
+
const ye = B.length > 0 ? B.map((P) => ({ field: P.field, order: P.direction })) : $?.sort || d?.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
567
|
$orderby: ye,
|
|
568
568
|
$top: 100,
|
|
@@ -579,7 +579,7 @@ const zi = ({
|
|
|
579
579
|
})(), () => {
|
|
580
580
|
y = !1;
|
|
581
581
|
};
|
|
582
|
-
}, [e.objectName, t, O, M, B, A, $,
|
|
582
|
+
}, [e.objectName, t, O, M, B, A, $, d, u, w]);
|
|
583
583
|
const ce = e.layout || "drawer", Y = e.operations || e.table?.operations || {
|
|
584
584
|
create: !0,
|
|
585
585
|
read: !0,
|
|
@@ -612,7 +612,7 @@ const zi = ({
|
|
|
612
612
|
if (T.mode === "none" || T.preventNavigation)
|
|
613
613
|
return;
|
|
614
614
|
if (T.mode === "new_window" || T.openNewTab) {
|
|
615
|
-
const D = y._id || y.id, E = `/${e.objectName}/${D}`;
|
|
615
|
+
const D = y._id || y.id, E = `/${e.objectName}/${encodeURIComponent(String(D))}`;
|
|
616
616
|
window.open(E, "_blank");
|
|
617
617
|
return;
|
|
618
618
|
}
|
|
@@ -653,8 +653,8 @@ const zi = ({
|
|
|
653
653
|
position: "top",
|
|
654
654
|
persistPreference: !0,
|
|
655
655
|
storageKey: `view-pref-${e.objectName}`,
|
|
656
|
-
defaultView:
|
|
657
|
-
activeView:
|
|
656
|
+
defaultView: d?.type || "grid",
|
|
657
|
+
activeView: d?.type || "grid",
|
|
658
658
|
views: G.map((y) => {
|
|
659
659
|
const D = {
|
|
660
660
|
kanban: "kanban",
|
|
@@ -675,7 +675,7 @@ const zi = ({
|
|
|
675
675
|
}),
|
|
676
676
|
allowCreateView: e.allowCreateView,
|
|
677
677
|
viewActions: e.viewActions
|
|
678
|
-
}, [Ne, G,
|
|
678
|
+
}, [Ne, G, d, e.objectName, e.allowCreateView, e.viewActions]), be = L((y) => {
|
|
679
679
|
if (!G) return;
|
|
680
680
|
const D = G.find((E) => E.type === y);
|
|
681
681
|
D && s && s(D.id);
|
|
@@ -723,15 +723,15 @@ const zi = ({
|
|
|
723
723
|
const _e = L((y) => {
|
|
724
724
|
const D = {
|
|
725
725
|
objectName: e.objectName,
|
|
726
|
-
fields: $?.columns ||
|
|
726
|
+
fields: $?.columns || d?.columns || e.table?.fields,
|
|
727
727
|
className: "h-full w-full",
|
|
728
|
-
showSearch:
|
|
729
|
-
showSort:
|
|
730
|
-
showFilters:
|
|
731
|
-
striped:
|
|
732
|
-
bordered:
|
|
733
|
-
color:
|
|
734
|
-
}, E = $?.options ||
|
|
728
|
+
showSearch: d?.showSearch ?? e.showSearch ?? !1,
|
|
729
|
+
showSort: d?.showSort ?? e.showSort ?? !1,
|
|
730
|
+
showFilters: d?.showFilters ?? e.showFilters ?? !1,
|
|
731
|
+
striped: d?.striped ?? !1,
|
|
732
|
+
bordered: d?.bordered ?? !1,
|
|
733
|
+
color: d?.color
|
|
734
|
+
}, E = $?.options || d || {};
|
|
735
735
|
if (process.env.NODE_ENV === "development") {
|
|
736
736
|
const we = [
|
|
737
737
|
"startDateField",
|
|
@@ -809,26 +809,26 @@ const zi = ({
|
|
|
809
809
|
default:
|
|
810
810
|
return null;
|
|
811
811
|
}
|
|
812
|
-
}, [e.objectName, e.table?.fields, $,
|
|
812
|
+
}, [e.objectName, e.table?.fields, $, d]), Re = V(() => ({
|
|
813
813
|
type: "object-grid",
|
|
814
814
|
objectName: e.objectName,
|
|
815
815
|
title: e.table?.title,
|
|
816
816
|
description: e.table?.description,
|
|
817
|
-
fields: $?.columns ||
|
|
818
|
-
columns: $?.columns ||
|
|
817
|
+
fields: $?.columns || d?.columns || e.table?.fields,
|
|
818
|
+
columns: $?.columns || d?.columns || e.table?.columns,
|
|
819
819
|
operations: {
|
|
820
820
|
...Y,
|
|
821
821
|
create: !1
|
|
822
822
|
// Create is handled by the view's create button
|
|
823
823
|
},
|
|
824
|
-
defaultFilters: $?.filter ||
|
|
825
|
-
defaultSort: $?.sort ||
|
|
824
|
+
defaultFilters: $?.filter || d?.filter || e.table?.defaultFilters,
|
|
825
|
+
defaultSort: $?.sort || d?.sort || e.table?.defaultSort,
|
|
826
826
|
pageSize: e.table?.pageSize,
|
|
827
827
|
selectable: e.table?.selectable,
|
|
828
|
-
striped:
|
|
829
|
-
bordered:
|
|
828
|
+
striped: d?.striped ?? e.table?.striped,
|
|
829
|
+
bordered: d?.bordered ?? e.table?.bordered,
|
|
830
830
|
className: e.table?.className
|
|
831
|
-
}), [e, Y, $,
|
|
831
|
+
}), [e, Y, $, d]), se = () => {
|
|
832
832
|
const y = m ? m._id || m.id : void 0;
|
|
833
833
|
return {
|
|
834
834
|
type: "object-form",
|
|
@@ -883,64 +883,65 @@ const zi = ({
|
|
|
883
883
|
/* @__PURE__ */ i.jsx(Gt, { schema: se(), dataSource: t })
|
|
884
884
|
] }) }), Yt = V(() => Object.keys(M).some(
|
|
885
885
|
(D) => M[D] !== void 0 && M[D] !== "" && M[D] !== null
|
|
886
|
-
) ? Object.entries(M).filter(([, D]) => D !== void 0 && D !== "" && D !== null).map(([D, E]) => ({ field: D, operator: "equals", value: E })) : $?.filter ||
|
|
887
|
-
const y = `${e.objectName}-${he ||
|
|
888
|
-
if (
|
|
889
|
-
return
|
|
886
|
+
) ? Object.entries(M).filter(([, D]) => D !== void 0 && D !== "" && D !== null).map(([D, E]) => ({ field: D, operator: "equals", value: E })) : $?.filter || d?.filter || e.table?.defaultFilters, [M, $, d, e.table?.defaultFilters]), $e = V(() => B.length > 0 ? B : $?.sort || d?.sort || e.table?.defaultSort, [B, $, d, e.table?.defaultSort]), Ie = () => {
|
|
887
|
+
const y = `${e.objectName}-${he || d?.id || "default"}-${O}-${A}`;
|
|
888
|
+
if (u)
|
|
889
|
+
return u({
|
|
890
890
|
schema: {
|
|
891
891
|
type: "list-view",
|
|
892
892
|
objectName: e.objectName,
|
|
893
893
|
viewType: O,
|
|
894
|
-
fields: $?.columns ||
|
|
894
|
+
fields: $?.columns || d?.columns || e.table?.fields,
|
|
895
895
|
filters: Yt,
|
|
896
896
|
sort: $e,
|
|
897
897
|
// Propagate appearance/view-config properties for live preview
|
|
898
|
-
rowHeight:
|
|
899
|
-
densityMode:
|
|
900
|
-
groupBy:
|
|
901
|
-
options: $?.options ||
|
|
898
|
+
rowHeight: d?.rowHeight,
|
|
899
|
+
densityMode: d?.densityMode,
|
|
900
|
+
groupBy: d?.groupBy,
|
|
901
|
+
options: $?.options || d,
|
|
902
902
|
// Propagate toolbar toggle flags
|
|
903
|
-
showSearch:
|
|
904
|
-
showFilters:
|
|
905
|
-
showSort:
|
|
906
|
-
showHideFields:
|
|
907
|
-
showGroup:
|
|
908
|
-
showColor:
|
|
909
|
-
showDensity:
|
|
910
|
-
allowExport:
|
|
903
|
+
showSearch: d?.showSearch ?? e.showSearch,
|
|
904
|
+
showFilters: d?.showFilters ?? e.showFilters,
|
|
905
|
+
showSort: d?.showSort ?? e.showSort,
|
|
906
|
+
showHideFields: d?.showHideFields ?? e.showHideFields,
|
|
907
|
+
showGroup: d?.showGroup ?? e.showGroup,
|
|
908
|
+
showColor: d?.showColor ?? e.showColor,
|
|
909
|
+
showDensity: d?.showDensity ?? e.showDensity,
|
|
910
|
+
allowExport: d?.allowExport ?? e.allowExport,
|
|
911
911
|
// Propagate display properties
|
|
912
|
-
striped:
|
|
913
|
-
bordered:
|
|
914
|
-
color:
|
|
912
|
+
striped: d?.striped ?? e.striped,
|
|
913
|
+
bordered: d?.bordered ?? e.bordered,
|
|
914
|
+
color: d?.color ?? e.color,
|
|
915
915
|
// Propagate view-config properties (Bug 4 / items 14-22)
|
|
916
|
-
inlineEdit:
|
|
917
|
-
wrapHeaders:
|
|
918
|
-
clickIntoRecordDetails:
|
|
919
|
-
addRecordViaForm:
|
|
920
|
-
addDeleteRecordsInline:
|
|
921
|
-
collapseAllByDefault:
|
|
922
|
-
fieldTextColor:
|
|
923
|
-
prefixField:
|
|
924
|
-
showDescription:
|
|
916
|
+
inlineEdit: d?.inlineEdit ?? e.inlineEdit,
|
|
917
|
+
wrapHeaders: d?.wrapHeaders ?? e.wrapHeaders,
|
|
918
|
+
clickIntoRecordDetails: d?.clickIntoRecordDetails ?? e.clickIntoRecordDetails,
|
|
919
|
+
addRecordViaForm: d?.addRecordViaForm ?? e.addRecordViaForm,
|
|
920
|
+
addDeleteRecordsInline: d?.addDeleteRecordsInline ?? e.addDeleteRecordsInline,
|
|
921
|
+
collapseAllByDefault: d?.collapseAllByDefault ?? e.collapseAllByDefault,
|
|
922
|
+
fieldTextColor: d?.fieldTextColor ?? e.fieldTextColor,
|
|
923
|
+
prefixField: d?.prefixField ?? e.prefixField,
|
|
924
|
+
showDescription: d?.showDescription ?? e.showDescription,
|
|
925
925
|
// Propagate new spec properties (P0/P1/P2)
|
|
926
|
-
navigation:
|
|
927
|
-
selection:
|
|
928
|
-
pagination:
|
|
929
|
-
searchableFields:
|
|
930
|
-
filterableFields:
|
|
931
|
-
resizable:
|
|
932
|
-
hiddenFields:
|
|
933
|
-
rowActions:
|
|
934
|
-
bulkActions:
|
|
935
|
-
sharing:
|
|
936
|
-
addRecord:
|
|
937
|
-
conditionalFormatting:
|
|
938
|
-
quickFilters:
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
926
|
+
navigation: d?.navigation ?? e.navigation,
|
|
927
|
+
selection: d?.selection ?? e.selection,
|
|
928
|
+
pagination: d?.pagination ?? e.pagination,
|
|
929
|
+
searchableFields: d?.searchableFields ?? e.searchableFields,
|
|
930
|
+
filterableFields: d?.filterableFields ?? e.filterableFields,
|
|
931
|
+
resizable: d?.resizable ?? e.resizable,
|
|
932
|
+
hiddenFields: d?.hiddenFields ?? e.hiddenFields,
|
|
933
|
+
rowActions: d?.rowActions ?? e.rowActions,
|
|
934
|
+
bulkActions: d?.bulkActions ?? e.bulkActions,
|
|
935
|
+
sharing: d?.sharing ?? e.sharing,
|
|
936
|
+
addRecord: d?.addRecord ?? e.addRecord,
|
|
937
|
+
conditionalFormatting: d?.conditionalFormatting ?? e.conditionalFormatting,
|
|
938
|
+
quickFilters: d?.quickFilters ?? e.quickFilters,
|
|
939
|
+
userFilters: d?.userFilters ?? e.userFilters,
|
|
940
|
+
showRecordCount: d?.showRecordCount ?? e.showRecordCount,
|
|
941
|
+
allowPrinting: d?.allowPrinting ?? e.allowPrinting,
|
|
942
|
+
virtualScroll: d?.virtualScroll ?? e.virtualScroll,
|
|
943
|
+
emptyState: d?.emptyState ?? e.emptyState,
|
|
944
|
+
aria: d?.aria ?? e.aria,
|
|
944
945
|
tabs: e.tabs
|
|
945
946
|
},
|
|
946
947
|
dataSource: t,
|
|
@@ -1086,7 +1087,7 @@ const zi = ({
|
|
|
1086
1087
|
detail: { values: f }
|
|
1087
1088
|
})
|
|
1088
1089
|
);
|
|
1089
|
-
}, [n, e.onChange]),
|
|
1090
|
+
}, [n, e.onChange]), u = Q.useCallback((f, j) => {
|
|
1090
1091
|
const N = { ...r, [f]: j };
|
|
1091
1092
|
o(N), e.showApply || a(N);
|
|
1092
1093
|
}, [a, e.showApply, r]), p = Q.useCallback(() => {
|
|
@@ -1110,7 +1111,7 @@ const zi = ({
|
|
|
1110
1111
|
placeholder: N,
|
|
1111
1112
|
onChange: (m) => {
|
|
1112
1113
|
const C = m.target.value, A = C === "" ? "" : Number(C);
|
|
1113
|
-
|
|
1114
|
+
u(f.field, A);
|
|
1114
1115
|
}
|
|
1115
1116
|
}
|
|
1116
1117
|
);
|
|
@@ -1121,7 +1122,7 @@ const zi = ({
|
|
|
1121
1122
|
value: r[f.field] !== void 0 ? String(r[f.field]) : "",
|
|
1122
1123
|
onValueChange: (m) => {
|
|
1123
1124
|
const C = f.options?.find((A) => String(A.value) === m);
|
|
1124
|
-
|
|
1125
|
+
u(f.field, C ? C.value : m);
|
|
1125
1126
|
},
|
|
1126
1127
|
children: [
|
|
1127
1128
|
/* @__PURE__ */ i.jsx(It, { children: /* @__PURE__ */ i.jsx(kt, { placeholder: N }) }),
|
|
@@ -1147,7 +1148,7 @@ const zi = ({
|
|
|
1147
1148
|
checked: F,
|
|
1148
1149
|
onCheckedChange: (k) => {
|
|
1149
1150
|
const x = k ? [...C, A.value] : C.filter((R) => String(R) !== String(A.value));
|
|
1150
|
-
|
|
1151
|
+
u(f.field, x);
|
|
1151
1152
|
}
|
|
1152
1153
|
}
|
|
1153
1154
|
),
|
|
@@ -1164,7 +1165,7 @@ const zi = ({
|
|
|
1164
1165
|
{
|
|
1165
1166
|
type: "date",
|
|
1166
1167
|
value: r[f.field] ?? "",
|
|
1167
|
-
onChange: (m) =>
|
|
1168
|
+
onChange: (m) => u(f.field, m.target.value)
|
|
1168
1169
|
}
|
|
1169
1170
|
);
|
|
1170
1171
|
case "date-range": {
|
|
@@ -1176,7 +1177,7 @@ const zi = ({
|
|
|
1176
1177
|
type: "date",
|
|
1177
1178
|
value: m.start ?? "",
|
|
1178
1179
|
onChange: (C) => {
|
|
1179
|
-
|
|
1180
|
+
u(f.field, { ...m, start: C.target.value });
|
|
1180
1181
|
}
|
|
1181
1182
|
}
|
|
1182
1183
|
),
|
|
@@ -1186,7 +1187,7 @@ const zi = ({
|
|
|
1186
1187
|
type: "date",
|
|
1187
1188
|
value: m.end ?? "",
|
|
1188
1189
|
onChange: (C) => {
|
|
1189
|
-
|
|
1190
|
+
u(f.field, { ...m, end: C.target.value });
|
|
1190
1191
|
}
|
|
1191
1192
|
}
|
|
1192
1193
|
)
|
|
@@ -1198,7 +1199,7 @@ const zi = ({
|
|
|
1198
1199
|
Sn,
|
|
1199
1200
|
{
|
|
1200
1201
|
checked: !!r[f.field],
|
|
1201
|
-
onCheckedChange: (m) =>
|
|
1202
|
+
onCheckedChange: (m) => u(f.field, !!m)
|
|
1202
1203
|
}
|
|
1203
1204
|
),
|
|
1204
1205
|
/* @__PURE__ */ i.jsx("span", { className: "text-sm text-muted-foreground", children: "Enabled" })
|
|
@@ -1209,7 +1210,7 @@ const zi = ({
|
|
|
1209
1210
|
{
|
|
1210
1211
|
value: r[f.field] ?? "",
|
|
1211
1212
|
placeholder: N,
|
|
1212
|
-
onChange: (m) =>
|
|
1213
|
+
onChange: (m) => u(f.field, m.target.value)
|
|
1213
1214
|
}
|
|
1214
1215
|
);
|
|
1215
1216
|
}
|
|
@@ -1287,7 +1288,7 @@ const zi = ({
|
|
|
1287
1288
|
detail: { sort: c }
|
|
1288
1289
|
})
|
|
1289
1290
|
);
|
|
1290
|
-
}, [n, e.onChange]),
|
|
1291
|
+
}, [n, e.onChange]), u = Q.useCallback((c) => {
|
|
1291
1292
|
const w = r.find((f) => f.field === c), b = !!e.multiple;
|
|
1292
1293
|
if (!w) {
|
|
1293
1294
|
const f = b ? [...r, { field: c, direction: "asc" }] : [{ field: c, direction: "asc" }];
|
|
@@ -1313,7 +1314,7 @@ const zi = ({
|
|
|
1313
1314
|
type: "button",
|
|
1314
1315
|
variant: w ? "secondary" : "outline",
|
|
1315
1316
|
size: "sm",
|
|
1316
|
-
onClick: () =>
|
|
1317
|
+
onClick: () => u(c.field),
|
|
1317
1318
|
className: "gap-2",
|
|
1318
1319
|
children: [
|
|
1319
1320
|
/* @__PURE__ */ i.jsx("span", { children: c.label || c.field }),
|
|
@@ -1390,18 +1391,18 @@ const qi = ({
|
|
|
1390
1391
|
onShare: r,
|
|
1391
1392
|
className: o
|
|
1392
1393
|
}) => {
|
|
1393
|
-
const [s, l] = Q.useState(null), [a,
|
|
1394
|
+
const [s, l] = Q.useState(null), [a, u] = 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
1395
|
const m = Hi(), C = Xi(f, e, t, m);
|
|
1395
|
-
l(C),
|
|
1396
|
+
l(C), u(!1);
|
|
1396
1397
|
const A = b ? new Date(Date.now() + parseInt(b, 10) * 864e5).toISOString() : void 0;
|
|
1397
1398
|
r?.(C, { password: c || void 0, expiresAt: A });
|
|
1398
1399
|
}, [f, e, t, r, c, b]), N = Q.useCallback(async () => {
|
|
1399
1400
|
if (s)
|
|
1400
1401
|
try {
|
|
1401
|
-
await navigator.clipboard.writeText(s),
|
|
1402
|
+
await navigator.clipboard.writeText(s), u(!0), setTimeout(() => u(!1), 2e3);
|
|
1402
1403
|
} catch {
|
|
1403
1404
|
const m = document.createElement("textarea");
|
|
1404
|
-
m.value = s, document.body.appendChild(m), m.select(), document.execCommand("copy"), document.body.removeChild(m),
|
|
1405
|
+
m.value = s, document.body.appendChild(m), m.select(), document.execCommand("copy"), document.body.removeChild(m), u(!0), setTimeout(() => u(!1), 2e3);
|
|
1405
1406
|
}
|
|
1406
1407
|
}, [s]);
|
|
1407
1408
|
return /* @__PURE__ */ i.jsxs(ar, { open: p, onOpenChange: v, children: [
|
|
@@ -1605,9 +1606,9 @@ function vr(e) {
|
|
|
1605
1606
|
r[o - 1] = arguments[o];
|
|
1606
1607
|
return r.reduce((s, l) => {
|
|
1607
1608
|
const a = Object.entries(l);
|
|
1608
|
-
for (const [
|
|
1609
|
-
const v = s[
|
|
1610
|
-
v != null && (s[
|
|
1609
|
+
for (const [u, p] of a) {
|
|
1610
|
+
const v = s[u];
|
|
1611
|
+
v != null && (s[u] = v + e * p);
|
|
1611
1612
|
}
|
|
1612
1613
|
return s;
|
|
1613
1614
|
}, {
|
|
@@ -1821,7 +1822,7 @@ function co(e) {
|
|
|
1821
1822
|
const {
|
|
1822
1823
|
announce: s,
|
|
1823
1824
|
announcement: l
|
|
1824
|
-
} = io(), a = Ct("DndLiveRegion"), [
|
|
1825
|
+
} = io(), a = Ct("DndLiveRegion"), [u, p] = ee(!1);
|
|
1825
1826
|
if (W(() => {
|
|
1826
1827
|
p(!0);
|
|
1827
1828
|
}, []), oo(V(() => ({
|
|
@@ -1873,7 +1874,7 @@ function co(e) {
|
|
|
1873
1874
|
over: b
|
|
1874
1875
|
}));
|
|
1875
1876
|
}
|
|
1876
|
-
}), [s, t])), !
|
|
1877
|
+
}), [s, t])), !u)
|
|
1877
1878
|
return null;
|
|
1878
1879
|
const v = ve.createElement(ve.Fragment, null, ve.createElement(no, {
|
|
1879
1880
|
id: r,
|
|
@@ -1962,9 +1963,9 @@ const vo = (e) => {
|
|
|
1962
1963
|
for (const l of r) {
|
|
1963
1964
|
const {
|
|
1964
1965
|
id: a
|
|
1965
|
-
} = l,
|
|
1966
|
-
if (
|
|
1967
|
-
const p = fo(Bn(
|
|
1966
|
+
} = l, u = n.get(a);
|
|
1967
|
+
if (u) {
|
|
1968
|
+
const p = fo(Bn(u), o);
|
|
1968
1969
|
s.push({
|
|
1969
1970
|
id: a,
|
|
1970
1971
|
data: {
|
|
@@ -1979,7 +1980,7 @@ const vo = (e) => {
|
|
|
1979
1980
|
function bo(e, t) {
|
|
1980
1981
|
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;
|
|
1981
1982
|
if (r < o && n < s) {
|
|
1982
|
-
const
|
|
1983
|
+
const u = t.width * t.height, p = e.width * e.height, v = l * a, c = v / (u + p - v);
|
|
1983
1984
|
return Number(c.toFixed(4));
|
|
1984
1985
|
}
|
|
1985
1986
|
return 0;
|
|
@@ -1996,12 +1997,12 @@ const mo = (e) => {
|
|
|
1996
1997
|
id: l
|
|
1997
1998
|
} = s, a = n.get(l);
|
|
1998
1999
|
if (a) {
|
|
1999
|
-
const
|
|
2000
|
-
|
|
2000
|
+
const u = bo(a, t);
|
|
2001
|
+
u > 0 && o.push({
|
|
2001
2002
|
id: l,
|
|
2002
2003
|
data: {
|
|
2003
2004
|
droppableContainer: s,
|
|
2004
|
-
value:
|
|
2005
|
+
value: u
|
|
2005
2006
|
}
|
|
2006
2007
|
});
|
|
2007
2008
|
}
|
|
@@ -2066,14 +2067,14 @@ function Co(e, t, n) {
|
|
|
2066
2067
|
scaleY: s,
|
|
2067
2068
|
x: l,
|
|
2068
2069
|
y: a
|
|
2069
|
-
} = r,
|
|
2070
|
+
} = r, u = 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;
|
|
2070
2071
|
return {
|
|
2071
2072
|
width: v,
|
|
2072
2073
|
height: c,
|
|
2073
2074
|
top: p,
|
|
2074
|
-
right:
|
|
2075
|
+
right: u + v,
|
|
2075
2076
|
bottom: p + c,
|
|
2076
|
-
left:
|
|
2077
|
+
left: u
|
|
2077
2078
|
};
|
|
2078
2079
|
}
|
|
2079
2080
|
const So = {
|
|
@@ -2095,7 +2096,7 @@ function rt(e, t) {
|
|
|
2095
2096
|
width: s,
|
|
2096
2097
|
height: l,
|
|
2097
2098
|
bottom: a,
|
|
2098
|
-
right:
|
|
2099
|
+
right: u
|
|
2099
2100
|
} = n;
|
|
2100
2101
|
return {
|
|
2101
2102
|
top: r,
|
|
@@ -2103,7 +2104,7 @@ function rt(e, t) {
|
|
|
2103
2104
|
width: s,
|
|
2104
2105
|
height: l,
|
|
2105
2106
|
bottom: a,
|
|
2106
|
-
right:
|
|
2107
|
+
right: u
|
|
2107
2108
|
};
|
|
2108
2109
|
}
|
|
2109
2110
|
function Un(e) {
|
|
@@ -2205,7 +2206,7 @@ function Ao(e, t, n, r, o) {
|
|
|
2205
2206
|
top: s,
|
|
2206
2207
|
left: l,
|
|
2207
2208
|
right: a,
|
|
2208
|
-
bottom:
|
|
2209
|
+
bottom: u
|
|
2209
2210
|
} = n;
|
|
2210
2211
|
r === void 0 && (r = 10), o === void 0 && (o = Eo);
|
|
2211
2212
|
const {
|
|
@@ -2223,7 +2224,7 @@ function Ao(e, t, n, r, o) {
|
|
|
2223
2224
|
height: t.height * o.y,
|
|
2224
2225
|
width: t.width * o.x
|
|
2225
2226
|
};
|
|
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 &&
|
|
2227
|
+
return !p && s <= t.top + f.height ? (b.y = ge.Backward, S.y = r * Math.abs((t.top + f.height - s) / f.height)) : !v && u >= t.bottom - f.height && (b.y = ge.Forward, S.y = r * Math.abs((t.bottom - f.height - u) / 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
2228
|
direction: b,
|
|
2228
2229
|
speed: S
|
|
2229
2230
|
};
|
|
@@ -2290,11 +2291,11 @@ class mn {
|
|
|
2290
2291
|
...t
|
|
2291
2292
|
}, this.width = t.width, this.height = t.height;
|
|
2292
2293
|
for (const [s, l, a] of ko)
|
|
2293
|
-
for (const
|
|
2294
|
-
Object.defineProperty(this,
|
|
2294
|
+
for (const u of l)
|
|
2295
|
+
Object.defineProperty(this, u, {
|
|
2295
2296
|
get: () => {
|
|
2296
2297
|
const p = a(r), v = o[s] - p;
|
|
2297
|
-
return this.rect[
|
|
2298
|
+
return this.rect[u] + v;
|
|
2298
2299
|
},
|
|
2299
2300
|
enumerable: !0
|
|
2300
2301
|
});
|
|
@@ -2403,13 +2404,13 @@ class xn {
|
|
|
2403
2404
|
coordinateGetter: l = Po,
|
|
2404
2405
|
scrollBehavior: a = "smooth"
|
|
2405
2406
|
} = o, {
|
|
2406
|
-
code:
|
|
2407
|
+
code: u
|
|
2407
2408
|
} = t;
|
|
2408
|
-
if (s.end.includes(
|
|
2409
|
+
if (s.end.includes(u)) {
|
|
2409
2410
|
this.handleEnd(t);
|
|
2410
2411
|
return;
|
|
2411
2412
|
}
|
|
2412
|
-
if (s.cancel.includes(
|
|
2413
|
+
if (s.cancel.includes(u)) {
|
|
2413
2414
|
this.handleCancel(t);
|
|
2414
2415
|
return;
|
|
2415
2416
|
}
|
|
@@ -2602,7 +2603,7 @@ class wn {
|
|
|
2602
2603
|
} = s;
|
|
2603
2604
|
if (!o)
|
|
2604
2605
|
return;
|
|
2605
|
-
const
|
|
2606
|
+
const u = (n = an(t)) != null ? n : Oe, p = Lt(o, u);
|
|
2606
2607
|
if (!r && a) {
|
|
2607
2608
|
if (Wn(a)) {
|
|
2608
2609
|
if (a.tolerance != null && tn(p, a.tolerance))
|
|
@@ -2615,7 +2616,7 @@ class wn {
|
|
|
2615
2616
|
this.handlePending(a, p);
|
|
2616
2617
|
return;
|
|
2617
2618
|
}
|
|
2618
|
-
t.cancelable && t.preventDefault(), l(
|
|
2619
|
+
t.cancelable && t.preventDefault(), l(u);
|
|
2619
2620
|
}
|
|
2620
2621
|
handleEnd() {
|
|
2621
2622
|
const {
|
|
@@ -2760,7 +2761,7 @@ function Bo(e) {
|
|
|
2760
2761
|
enabled: s,
|
|
2761
2762
|
interval: l = 5,
|
|
2762
2763
|
order: a = $t.TreeOrder,
|
|
2763
|
-
pointerCoordinates:
|
|
2764
|
+
pointerCoordinates: u,
|
|
2764
2765
|
scrollableAncestors: p,
|
|
2765
2766
|
scrollableAncestorRects: v,
|
|
2766
2767
|
delta: c,
|
|
@@ -2778,16 +2779,16 @@ function Bo(e) {
|
|
|
2778
2779
|
}), m = V(() => {
|
|
2779
2780
|
switch (n) {
|
|
2780
2781
|
case gt.Pointer:
|
|
2781
|
-
return
|
|
2782
|
-
top:
|
|
2783
|
-
bottom:
|
|
2784
|
-
left:
|
|
2785
|
-
right:
|
|
2782
|
+
return u ? {
|
|
2783
|
+
top: u.y,
|
|
2784
|
+
bottom: u.y,
|
|
2785
|
+
left: u.x,
|
|
2786
|
+
right: u.x
|
|
2786
2787
|
} : null;
|
|
2787
2788
|
case gt.DraggableRect:
|
|
2788
2789
|
return o;
|
|
2789
2790
|
}
|
|
2790
|
-
}, [n, o,
|
|
2791
|
+
}, [n, o, u]), C = q(null), A = L(() => {
|
|
2791
2792
|
const k = C.current;
|
|
2792
2793
|
if (!k)
|
|
2793
2794
|
return;
|
|
@@ -2916,7 +2917,7 @@ function Ho(e, t) {
|
|
|
2916
2917
|
} = t;
|
|
2917
2918
|
const [s, l] = ee(null), {
|
|
2918
2919
|
frequency: a,
|
|
2919
|
-
measure:
|
|
2920
|
+
measure: u,
|
|
2920
2921
|
strategy: p
|
|
2921
2922
|
} = o, v = q(e), c = j(), w = bt(c), b = L(function(N) {
|
|
2922
2923
|
N === void 0 && (N = []), !w.current && l((m) => m === null ? N : m.concat(N.filter((C) => !m.includes(C))));
|
|
@@ -2932,13 +2933,13 @@ function Ho(e, t) {
|
|
|
2932
2933
|
m.set(C.id, C.rect.current);
|
|
2933
2934
|
continue;
|
|
2934
2935
|
}
|
|
2935
|
-
const A = C.node.current, F = A ? new mn(
|
|
2936
|
+
const A = C.node.current, F = A ? new mn(u(A), A) : null;
|
|
2936
2937
|
C.rect.current = F, F && m.set(C.id, F);
|
|
2937
2938
|
}
|
|
2938
2939
|
return m;
|
|
2939
2940
|
}
|
|
2940
2941
|
return N;
|
|
2941
|
-
}, [e, s, n, c,
|
|
2942
|
+
}, [e, s, n, c, u]);
|
|
2942
2943
|
return W(() => {
|
|
2943
2944
|
v.current = e;
|
|
2944
2945
|
}, [e]), W(
|
|
@@ -3024,21 +3025,21 @@ function Xn(e, t, n) {
|
|
|
3024
3025
|
t === void 0 && (t = Ko);
|
|
3025
3026
|
const [r, o] = ee(null);
|
|
3026
3027
|
function s() {
|
|
3027
|
-
o((
|
|
3028
|
+
o((u) => {
|
|
3028
3029
|
if (!e)
|
|
3029
3030
|
return null;
|
|
3030
3031
|
if (e.isConnected === !1) {
|
|
3031
3032
|
var p;
|
|
3032
|
-
return (p =
|
|
3033
|
+
return (p = u ?? n) != null ? p : null;
|
|
3033
3034
|
}
|
|
3034
3035
|
const v = t(e);
|
|
3035
|
-
return JSON.stringify(
|
|
3036
|
+
return JSON.stringify(u) === JSON.stringify(v) ? u : v;
|
|
3036
3037
|
});
|
|
3037
3038
|
}
|
|
3038
3039
|
const l = qo({
|
|
3039
|
-
callback(
|
|
3040
|
+
callback(u) {
|
|
3040
3041
|
if (e)
|
|
3041
|
-
for (const p of
|
|
3042
|
+
for (const p of u) {
|
|
3042
3043
|
const {
|
|
3043
3044
|
type: v,
|
|
3044
3045
|
target: c
|
|
@@ -3079,20 +3080,20 @@ function Zo(e) {
|
|
|
3079
3080
|
const s = r.current;
|
|
3080
3081
|
if (e !== s) {
|
|
3081
3082
|
l(s);
|
|
3082
|
-
const a = e.map((
|
|
3083
|
-
const p = en(
|
|
3083
|
+
const a = e.map((u) => {
|
|
3084
|
+
const p = en(u);
|
|
3084
3085
|
return p ? (p.addEventListener("scroll", o, {
|
|
3085
3086
|
passive: !0
|
|
3086
3087
|
}), [p, ln(p)]) : null;
|
|
3087
|
-
}).filter((
|
|
3088
|
+
}).filter((u) => u != null);
|
|
3088
3089
|
n(a.length ? new Map(a) : null), r.current = e;
|
|
3089
3090
|
}
|
|
3090
3091
|
return () => {
|
|
3091
3092
|
l(e), l(s);
|
|
3092
3093
|
};
|
|
3093
3094
|
function l(a) {
|
|
3094
|
-
a.forEach((
|
|
3095
|
-
const p = en(
|
|
3095
|
+
a.forEach((u) => {
|
|
3096
|
+
const p = en(u);
|
|
3096
3097
|
p?.removeEventListener("scroll", o);
|
|
3097
3098
|
});
|
|
3098
3099
|
}
|
|
@@ -3157,13 +3158,13 @@ function ns(e, t) {
|
|
|
3157
3158
|
t === void 0 && (t = rt);
|
|
3158
3159
|
const [n] = e, r = Rr(n ? Se(n) : null), [o, s] = ee(Jn);
|
|
3159
3160
|
function l() {
|
|
3160
|
-
s(() => e.length ? e.map((
|
|
3161
|
+
s(() => e.length ? e.map((u) => jr(u) ? r : new mn(t(u), u)) : Jn);
|
|
3161
3162
|
}
|
|
3162
3163
|
const a = Bt({
|
|
3163
3164
|
callback: l
|
|
3164
3165
|
});
|
|
3165
3166
|
return Me(() => {
|
|
3166
|
-
a?.disconnect(), l(), e.forEach((
|
|
3167
|
+
a?.disconnect(), l(), e.forEach((u) => a?.observe(u));
|
|
3167
3168
|
}, [e]), o;
|
|
3168
3169
|
}
|
|
3169
3170
|
function rs(e) {
|
|
@@ -3198,12 +3199,12 @@ function is(e) {
|
|
|
3198
3199
|
}), l = L((p) => {
|
|
3199
3200
|
const v = rs(p);
|
|
3200
3201
|
s?.disconnect(), v && s?.observe(v), r(v ? t(v) : null);
|
|
3201
|
-
}, [t, s]), [a,
|
|
3202
|
+
}, [t, s]), [a, u] = Pt(l);
|
|
3202
3203
|
return V(() => ({
|
|
3203
3204
|
nodeRef: a,
|
|
3204
3205
|
rect: n,
|
|
3205
|
-
setRef:
|
|
3206
|
-
}), [n, a,
|
|
3206
|
+
setRef: u
|
|
3207
|
+
}), [n, a, u]);
|
|
3207
3208
|
}
|
|
3208
3209
|
const os = [{
|
|
3209
3210
|
sensor: yn,
|
|
@@ -3413,13 +3414,13 @@ function us(e) {
|
|
|
3413
3414
|
if (!a)
|
|
3414
3415
|
return;
|
|
3415
3416
|
const {
|
|
3416
|
-
activatorNode:
|
|
3417
|
+
activatorNode: u,
|
|
3417
3418
|
node: p
|
|
3418
3419
|
} = a;
|
|
3419
|
-
if (!
|
|
3420
|
+
if (!u.current && !p.current)
|
|
3420
3421
|
return;
|
|
3421
3422
|
requestAnimationFrame(() => {
|
|
3422
|
-
for (const v of [
|
|
3423
|
+
for (const v of [u.current, p.current]) {
|
|
3423
3424
|
if (!v)
|
|
3424
3425
|
continue;
|
|
3425
3426
|
const c = eo(v);
|
|
@@ -3510,7 +3511,7 @@ const gs = /* @__PURE__ */ Pr(function(t) {
|
|
|
3510
3511
|
let {
|
|
3511
3512
|
id: l,
|
|
3512
3513
|
accessibility: a,
|
|
3513
|
-
autoScroll:
|
|
3514
|
+
autoScroll: u = !0,
|
|
3514
3515
|
children: p,
|
|
3515
3516
|
sensors: v = os,
|
|
3516
3517
|
collisionDetection: c = mo,
|
|
@@ -3538,22 +3539,22 @@ const gs = /* @__PURE__ */ Pr(function(t) {
|
|
|
3538
3539
|
data: (J = _?.data) != null ? J : ss,
|
|
3539
3540
|
rect: B
|
|
3540
3541
|
} : null;
|
|
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]),
|
|
3542
|
+
}, [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]), d = ps(w), {
|
|
3542
3543
|
droppableRects: O,
|
|
3543
3544
|
measureDroppableContainers: T,
|
|
3544
3545
|
measuringScheduled: ce
|
|
3545
3546
|
} = Ho(h, {
|
|
3546
3547
|
dragging: k,
|
|
3547
3548
|
dependencies: [I.x, I.y],
|
|
3548
|
-
config:
|
|
3549
|
-
}), Y = Wo(R, x), H = V(() => ne ? an(ne) : null, [ne]), de = me(), ue = Xo(Y,
|
|
3549
|
+
config: d.droppable
|
|
3550
|
+
}), Y = Wo(R, x), H = V(() => ne ? an(ne) : null, [ne]), de = me(), ue = Xo(Y, d.draggable.measure);
|
|
3550
3551
|
hs({
|
|
3551
3552
|
activeNode: x != null ? R.get(x) : null,
|
|
3552
3553
|
config: de.layoutShiftCompensation,
|
|
3553
3554
|
initialRect: ue,
|
|
3554
|
-
measure:
|
|
3555
|
+
measure: d.draggable.measure
|
|
3555
3556
|
});
|
|
3556
|
-
const g = Xn(Y,
|
|
3557
|
+
const g = Xn(Y, d.draggable.measure, ue), te = Xn(Y ? Y.parentElement : null), K = q({
|
|
3557
3558
|
activatorEvent: null,
|
|
3558
3559
|
active: null,
|
|
3559
3560
|
activeNode: Y,
|
|
@@ -3568,7 +3569,7 @@ const gs = /* @__PURE__ */ Pr(function(t) {
|
|
|
3568
3569
|
scrollableAncestors: [],
|
|
3569
3570
|
scrollAdjustedTranslate: null
|
|
3570
3571
|
}), oe = M.getNodeFor((n = K.current.over) == null ? void 0 : n.id), U = is({
|
|
3571
|
-
measure:
|
|
3572
|
+
measure: d.dragOverlay.measure
|
|
3572
3573
|
}), 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, {
|
|
3573
3574
|
transform: {
|
|
3574
3575
|
x: I.x - He.x,
|
|
@@ -3845,10 +3846,10 @@ const gs = /* @__PURE__ */ Pr(function(t) {
|
|
|
3845
3846
|
measureDroppableContainers: T,
|
|
3846
3847
|
scrollableAncestors: Re,
|
|
3847
3848
|
scrollableAncestorRects: se,
|
|
3848
|
-
measuringConfiguration:
|
|
3849
|
+
measuringConfiguration: d,
|
|
3849
3850
|
measuringScheduled: ce,
|
|
3850
3851
|
windowRect: _e
|
|
3851
|
-
}), [ie, Y, g, ne, Xe, te, U, R, M, O, Ee, T, Re, se,
|
|
3852
|
+
}), [ie, Y, g, ne, Xe, te, U, R, M, O, Ee, T, Re, se, d, ce, _e]), le = V(() => ({
|
|
3852
3853
|
activatorEvent: ne,
|
|
3853
3854
|
activators: ae,
|
|
3854
3855
|
active: ie,
|
|
@@ -3876,9 +3877,9 @@ const gs = /* @__PURE__ */ Pr(function(t) {
|
|
|
3876
3877
|
hiddenTextDescribedById: Ne
|
|
3877
3878
|
}));
|
|
3878
3879
|
function me() {
|
|
3879
|
-
const J = pe?.autoScrollEnabled === !1, P = typeof
|
|
3880
|
-
return typeof
|
|
3881
|
-
...
|
|
3880
|
+
const J = pe?.autoScrollEnabled === !1, P = typeof u == "object" ? u.enabled === !1 : u === !1, je = k && !J && !P;
|
|
3881
|
+
return typeof u == "object" ? {
|
|
3882
|
+
...u,
|
|
3882
3883
|
enabled: je
|
|
3883
3884
|
} : {
|
|
3884
3885
|
enabled: je
|
|
@@ -3895,7 +3896,7 @@ function ms(e) {
|
|
|
3895
3896
|
const s = Ct(bs), {
|
|
3896
3897
|
activators: l,
|
|
3897
3898
|
activatorEvent: a,
|
|
3898
|
-
active:
|
|
3899
|
+
active: u,
|
|
3899
3900
|
activeNodeRect: p,
|
|
3900
3901
|
ariaDescribedById: v,
|
|
3901
3902
|
draggableNodes: c,
|
|
@@ -3904,7 +3905,7 @@ function ms(e) {
|
|
|
3904
3905
|
role: b = Qn,
|
|
3905
3906
|
roleDescription: S = "draggable",
|
|
3906
3907
|
tabIndex: f = 0
|
|
3907
|
-
} = o ?? {}, j =
|
|
3908
|
+
} = o ?? {}, j = u?.id === t, N = Ge(j ? Ar : vs), [m, C] = Pt(), [A, F] = Pt(), k = ts(l, t), x = bt(n);
|
|
3908
3909
|
Me(
|
|
3909
3910
|
() => (c.set(t, {
|
|
3910
3911
|
id: t,
|
|
@@ -3928,7 +3929,7 @@ function ms(e) {
|
|
|
3928
3929
|
"aria-describedby": v.draggable
|
|
3929
3930
|
}), [r, b, f, j, S, v.draggable]);
|
|
3930
3931
|
return {
|
|
3931
|
-
active:
|
|
3932
|
+
active: u,
|
|
3932
3933
|
activatorEvent: a,
|
|
3933
3934
|
activeNodeRect: p,
|
|
3934
3935
|
attributes: R,
|
|
@@ -3957,7 +3958,7 @@ function js(e) {
|
|
|
3957
3958
|
const s = Ct(ws), {
|
|
3958
3959
|
active: l,
|
|
3959
3960
|
dispatch: a,
|
|
3960
|
-
over:
|
|
3961
|
+
over: u,
|
|
3961
3962
|
measureDroppableContainers: p
|
|
3962
3963
|
} = Ge(Ut), v = q({
|
|
3963
3964
|
disabled: n
|
|
@@ -4016,9 +4017,9 @@ function js(e) {
|
|
|
4016
4017
|
}, [r, s, n, a]), {
|
|
4017
4018
|
active: l,
|
|
4018
4019
|
rect: w,
|
|
4019
|
-
isOver:
|
|
4020
|
+
isOver: u?.id === r,
|
|
4020
4021
|
node: F,
|
|
4021
|
-
over:
|
|
4022
|
+
over: u,
|
|
4022
4023
|
setNodeRef: k
|
|
4023
4024
|
};
|
|
4024
4025
|
}
|
|
@@ -4066,7 +4067,7 @@ const Et = {
|
|
|
4066
4067
|
const a = (t = n[o]) != null ? t : r;
|
|
4067
4068
|
if (!a)
|
|
4068
4069
|
return null;
|
|
4069
|
-
const
|
|
4070
|
+
const u = Rs(n, l, o);
|
|
4070
4071
|
if (l === o) {
|
|
4071
4072
|
const p = n[s];
|
|
4072
4073
|
return p ? {
|
|
@@ -4076,11 +4077,11 @@ const Et = {
|
|
|
4076
4077
|
} : null;
|
|
4077
4078
|
}
|
|
4078
4079
|
return l > o && l <= s ? {
|
|
4079
|
-
x: -a.width -
|
|
4080
|
+
x: -a.width - u,
|
|
4080
4081
|
y: 0,
|
|
4081
4082
|
...Et
|
|
4082
4083
|
} : l < o && l >= s ? {
|
|
4083
|
-
x: a.width +
|
|
4084
|
+
x: a.width + u,
|
|
4084
4085
|
y: 0,
|
|
4085
4086
|
...Et
|
|
4086
4087
|
} : {
|
|
@@ -4132,7 +4133,7 @@ function Es(e) {
|
|
|
4132
4133
|
const {
|
|
4133
4134
|
active: l,
|
|
4134
4135
|
dragOverlay: a,
|
|
4135
|
-
droppableRects:
|
|
4136
|
+
droppableRects: u,
|
|
4136
4137
|
over: p,
|
|
4137
4138
|
measureDroppableContainers: v
|
|
4138
4139
|
} = 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);
|
|
@@ -4150,11 +4151,11 @@ function Es(e) {
|
|
|
4150
4151
|
items: b,
|
|
4151
4152
|
overIndex: j,
|
|
4152
4153
|
useDragOverlay: w,
|
|
4153
|
-
sortedRects: Cs(b,
|
|
4154
|
+
sortedRects: Cs(b, u),
|
|
4154
4155
|
strategy: o
|
|
4155
4156
|
}),
|
|
4156
4157
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
4157
|
-
[f, c, A.draggable, A.droppable, C, b, j,
|
|
4158
|
+
[f, c, A.draggable, A.droppable, C, b, j, u, w, o]
|
|
4158
4159
|
);
|
|
4159
4160
|
return ve.createElement(Or.Provider, {
|
|
4160
4161
|
value: F
|
|
@@ -4177,10 +4178,10 @@ const As = (e) => {
|
|
|
4177
4178
|
items: s,
|
|
4178
4179
|
newIndex: l,
|
|
4179
4180
|
previousItems: a,
|
|
4180
|
-
previousContainerId:
|
|
4181
|
+
previousContainerId: u,
|
|
4181
4182
|
transition: p
|
|
4182
4183
|
} = e;
|
|
4183
|
-
return !p || !r || a !== s && o === l ? !1 : n ? !0 : l !== o && t ===
|
|
4184
|
+
return !p || !r || a !== s && o === l ? !1 : n ? !0 : l !== o && t === u;
|
|
4184
4185
|
}, Fs = {
|
|
4185
4186
|
duration: 200,
|
|
4186
4187
|
easing: "ease"
|
|
@@ -4201,15 +4202,15 @@ function ks(e) {
|
|
|
4201
4202
|
const [s, l] = ee(null), a = q(n);
|
|
4202
4203
|
return Me(() => {
|
|
4203
4204
|
if (!t && n !== a.current && r.current) {
|
|
4204
|
-
const
|
|
4205
|
-
if (
|
|
4205
|
+
const u = o.current;
|
|
4206
|
+
if (u) {
|
|
4206
4207
|
const p = rt(r.current, {
|
|
4207
4208
|
ignoreTransform: !0
|
|
4208
4209
|
}), v = {
|
|
4209
|
-
x:
|
|
4210
|
-
y:
|
|
4211
|
-
scaleX:
|
|
4212
|
-
scaleY:
|
|
4210
|
+
x: u.left - p.left,
|
|
4211
|
+
y: u.top - p.top,
|
|
4212
|
+
scaleX: u.width / p.width,
|
|
4213
|
+
scaleY: u.height / p.height
|
|
4213
4214
|
};
|
|
4214
4215
|
(v.x || v.y) && l(v);
|
|
4215
4216
|
}
|
|
@@ -4228,7 +4229,7 @@ function Vs(e) {
|
|
|
4228
4229
|
getNewIndex: s = As,
|
|
4229
4230
|
id: l,
|
|
4230
4231
|
strategy: a,
|
|
4231
|
-
resizeObserverConfig:
|
|
4232
|
+
resizeObserverConfig: u,
|
|
4232
4233
|
transition: p = Fs
|
|
4233
4234
|
} = e;
|
|
4234
4235
|
const {
|
|
@@ -4259,7 +4260,7 @@ function Vs(e) {
|
|
|
4259
4260
|
disabled: C.droppable,
|
|
4260
4261
|
resizeObserverConfig: {
|
|
4261
4262
|
updateMeasurementsFor: k,
|
|
4262
|
-
...
|
|
4263
|
+
...u
|
|
4263
4264
|
}
|
|
4264
4265
|
}), {
|
|
4265
4266
|
active: _,
|
|
@@ -4280,7 +4281,7 @@ function Vs(e) {
|
|
|
4280
4281
|
...n
|
|
4281
4282
|
},
|
|
4282
4283
|
disabled: C.draggable
|
|
4283
|
-
}), h = Ki(M, pe),
|
|
4284
|
+
}), h = Ki(M, pe), d = !!_, O = d && !S && Rt(w) && Rt(j), T = !N && ne, ce = T && O ? Ne : null, H = O ? ce ?? (a ?? m)({
|
|
4284
4285
|
rects: f,
|
|
4285
4286
|
activeNodeRect: ie,
|
|
4286
4287
|
activeIndex: w,
|
|
@@ -4300,7 +4301,7 @@ function Vs(e) {
|
|
|
4300
4301
|
active: _,
|
|
4301
4302
|
containerId: c,
|
|
4302
4303
|
isDragging: ne,
|
|
4303
|
-
isSorting:
|
|
4304
|
+
isSorting: d,
|
|
4304
4305
|
id: l,
|
|
4305
4306
|
index: A,
|
|
4306
4307
|
items: v,
|
|
@@ -4316,8 +4317,8 @@ function Vs(e) {
|
|
|
4316
4317
|
rect: x
|
|
4317
4318
|
});
|
|
4318
4319
|
return W(() => {
|
|
4319
|
-
|
|
4320
|
-
}, [
|
|
4320
|
+
d && g.current.newIndex !== de && (g.current.newIndex = de), c !== g.current.containerId && (g.current.containerId = c), v !== g.current.items && (g.current.items = v);
|
|
4321
|
+
}, [d, de, c, v]), W(() => {
|
|
4321
4322
|
if (ue === g.current.activeId)
|
|
4322
4323
|
return;
|
|
4323
4324
|
if (ue != null && g.current.activeId == null) {
|
|
@@ -4338,7 +4339,7 @@ function Vs(e) {
|
|
|
4338
4339
|
newIndex: de,
|
|
4339
4340
|
items: v,
|
|
4340
4341
|
isOver: I,
|
|
4341
|
-
isSorting:
|
|
4342
|
+
isSorting: d,
|
|
4342
4343
|
isDragging: ne,
|
|
4343
4344
|
listeners: he,
|
|
4344
4345
|
node: R,
|
|
@@ -4358,7 +4359,7 @@ function Vs(e) {
|
|
|
4358
4359
|
te && g.current.newIndex === A
|
|
4359
4360
|
)
|
|
4360
4361
|
return Os;
|
|
4361
|
-
if (!(T && !vn(B) || !p) && (
|
|
4362
|
+
if (!(T && !vn(B) || !p) && (d || K))
|
|
4362
4363
|
return mt.Transition.toString({
|
|
4363
4364
|
...p,
|
|
4364
4365
|
property: Ir
|
|
@@ -4384,14 +4385,14 @@ const At = { private: 0, team: 1, organization: 2, public: 3 }, Ps = 5, Ls = ({
|
|
|
4384
4385
|
setNodeRef: s,
|
|
4385
4386
|
transform: l,
|
|
4386
4387
|
transition: a,
|
|
4387
|
-
isDragging:
|
|
4388
|
+
isDragging: u
|
|
4388
4389
|
} = Vs({ id: e, disabled: t }), p = {
|
|
4389
4390
|
transform: mt.Transform.toString(l),
|
|
4390
4391
|
transition: a,
|
|
4391
|
-
zIndex:
|
|
4392
|
-
opacity:
|
|
4392
|
+
zIndex: u ? 10 : void 0,
|
|
4393
|
+
opacity: u ? 0.5 : void 0
|
|
4393
4394
|
};
|
|
4394
|
-
return /* @__PURE__ */ i.jsx(i.Fragment, { children: n({ setNodeRef: s, style: p, listeners: o, attributes: r, isDragging:
|
|
4395
|
+
return /* @__PURE__ */ i.jsx(i.Fragment, { children: n({ setNodeRef: s, style: p, listeners: o, attributes: r, isDragging: u }) });
|
|
4395
4396
|
}, qs = ({
|
|
4396
4397
|
views: e,
|
|
4397
4398
|
activeViewId: t,
|
|
@@ -4401,7 +4402,7 @@ const At = { private: 0, team: 1, organization: 2, public: 3 }, Ps = 5, Ls = ({
|
|
|
4401
4402
|
onAddView: s,
|
|
4402
4403
|
onRenameView: l,
|
|
4403
4404
|
onDuplicateView: a,
|
|
4404
|
-
onDeleteView:
|
|
4405
|
+
onDeleteView: u,
|
|
4405
4406
|
onSetDefaultView: p,
|
|
4406
4407
|
onShareView: v,
|
|
4407
4408
|
onSaveAsView: c,
|
|
@@ -4449,7 +4450,7 @@ const At = { private: 0, team: 1, organization: 2, public: 3 }, Ps = 5, Ls = ({
|
|
|
4449
4450
|
}
|
|
4450
4451
|
return 0;
|
|
4451
4452
|
}), g;
|
|
4452
|
-
}, [e, _, B]),
|
|
4453
|
+
}, [e, _, B]), d = h.slice(0, R), O = h.slice(R), T = uo(
|
|
4453
4454
|
zn(yn, { activationConstraint: { distance: Ps } }),
|
|
4454
4455
|
zn(xn)
|
|
4455
4456
|
), ce = L((g) => {
|
|
@@ -4461,9 +4462,9 @@ const At = { private: 0, team: 1, organization: 2, public: 3 }, Ps = 5, Ls = ({
|
|
|
4461
4462
|
b(De.map((be) => be.id));
|
|
4462
4463
|
}, [h, b]), Y = xi, H = L((g) => {
|
|
4463
4464
|
if (!B || g === 0) return !1;
|
|
4464
|
-
const te =
|
|
4465
|
+
const te = d[g - 1], K = d[g], oe = (U) => U.visibility === "private";
|
|
4465
4466
|
return oe(te) && !oe(K);
|
|
4466
|
-
}, [B,
|
|
4467
|
+
}, [B, d]), de = (g, te) => {
|
|
4467
4468
|
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(
|
|
4468
4469
|
"button",
|
|
4469
4470
|
{
|
|
@@ -4619,13 +4620,13 @@ const At = { private: 0, team: 1, organization: 2, public: 3 }, Ps = 5, Ls = ({
|
|
|
4619
4620
|
}) })
|
|
4620
4621
|
] })
|
|
4621
4622
|
] }),
|
|
4622
|
-
|
|
4623
|
+
u && /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
|
|
4623
4624
|
/* @__PURE__ */ i.jsx(En, {}),
|
|
4624
4625
|
/* @__PURE__ */ i.jsxs(
|
|
4625
4626
|
qe,
|
|
4626
4627
|
{
|
|
4627
4628
|
"data-testid": `context-menu-delete-${g.id}`,
|
|
4628
|
-
onClick: () =>
|
|
4629
|
+
onClick: () => u(g.id),
|
|
4629
4630
|
className: "text-destructive focus:text-destructive",
|
|
4630
4631
|
children: [
|
|
4631
4632
|
/* @__PURE__ */ i.jsx(dr, { className: "h-4 w-4 mr-2" }),
|
|
@@ -4643,14 +4644,14 @@ const At = { private: 0, team: 1, organization: 2, public: 3 }, Ps = 5, Ls = ({
|
|
|
4643
4644
|
be && /* @__PURE__ */ i.jsx("div", { "data-testid": "view-tab-visibility-separator", className: "w-px h-5 bg-border mx-1 self-center shrink-0" }),
|
|
4644
4645
|
Re(_e())
|
|
4645
4646
|
] }, g.id);
|
|
4646
|
-
}, ue = /* @__PURE__ */ i.jsx(i.Fragment, { children:
|
|
4647
|
+
}, ue = /* @__PURE__ */ i.jsx(i.Fragment, { children: d.map((g, te) => de(g, te)) });
|
|
4647
4648
|
return /* @__PURE__ */ i.jsx(Xr, { children: /* @__PURE__ */ i.jsxs(
|
|
4648
4649
|
"div",
|
|
4649
4650
|
{
|
|
4650
4651
|
"data-testid": "view-tab-bar",
|
|
4651
4652
|
className: re("flex items-center gap-0.5 -mb-px", C),
|
|
4652
4653
|
children: [
|
|
4653
|
-
x && b ? /* @__PURE__ */ i.jsx(gs, { sensors: T, collisionDetection: vo, onDragEnd: ce, children: /* @__PURE__ */ i.jsx(Es, { items:
|
|
4654
|
+
x && b ? /* @__PURE__ */ i.jsx(gs, { sensors: T, collisionDetection: vo, onDragEnd: ce, children: /* @__PURE__ */ i.jsx(Es, { items: d.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
4655
|
O.length > 0 && /* @__PURE__ */ i.jsxs(qr, { children: [
|
|
4655
4656
|
/* @__PURE__ */ i.jsx(Kr, { asChild: !0, children: /* @__PURE__ */ i.jsxs(
|
|
4656
4657
|
"button",
|