@ck-ui/component-library 1.0.7 → 1.0.9
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/dist/{DropdownFooter-B1d0HFxd.js → DropdownFooter-BmXLYRcE.js} +4 -3
- package/dist/{OptionList-BM4AleXV.js → OptionList-DU0iA8Y4.js} +206 -198
- package/dist/assets/index-CRlPQn7l.css +1 -0
- package/dist/assets/index-xlbz19JS.css +1 -0
- package/dist/assets/{index-CtR-jzNi.css → index-zWDnehqu.css} +1 -1
- package/dist/assets/styles-0GdZsGyi.css +1 -0
- package/dist/assets/styles-C9rG0Alp.css +1 -0
- package/dist/assets/styles-CwZG1jzB.css +1 -0
- package/dist/assets/{styles-DAqMiQ0N.css → styles-D2n8YjU_.css} +1 -1
- package/dist/components/Breadcrumb/index.js +39 -39
- package/dist/components/FusionChart/_config/builders.d.ts.map +1 -1
- package/dist/components/FusionChart/_config/builders.js +147 -110
- package/dist/components/FusionChart/_config/events.d.ts.map +1 -1
- package/dist/components/FusionChart/_config/events.js +52 -37
- package/dist/components/FusionChart/_types/fusionChart.types.d.ts +3 -0
- package/dist/components/FusionChart/_types/fusionChart.types.d.ts.map +1 -1
- package/dist/components/FusionChart/index.d.ts.map +1 -1
- package/dist/components/FusionChart/index.js +524 -506
- package/dist/components/MultiSelect/SimpleMultiSelect.js +1 -1
- package/dist/components/MultiSelect/_helpers/DropdownFooter.js +1 -1
- package/dist/components/MultiSelect/_helpers/OptionRow.js +1 -1
- package/dist/components/MultiSelect/_helpers/OverflowMenu.js +1 -1
- package/dist/components/MultiSelect/_helpers/OverflowMenuItem.js +1 -1
- package/dist/components/MultiSelect/_helpers/SearchResult.js +1 -1
- package/dist/components/MultiSelect/_helpers/TagContent.js +1 -1
- package/dist/components/MultiSelect/_helpers/TriggerButton.js +1 -1
- package/dist/components/MultiSelect/index.js +1 -1
- package/dist/components/Search/index.js +60 -60
- package/dist/components/SingleSelectDropdown/_helpers/DropdownFooter.js +4 -3
- package/dist/components/SingleSelectDropdown/index.js +12 -11
- package/dist/components/Table/_helpers/ColumnManager/index.d.ts +1 -1
- package/dist/components/Table/_helpers/ColumnManager/index.d.ts.map +1 -1
- package/dist/components/Table/_helpers/ColumnManager/index.js +803 -696
- package/dist/components/Table/_helpers/GroupedHeader/index.d.ts +3 -2
- package/dist/components/Table/_helpers/GroupedHeader/index.d.ts.map +1 -1
- package/dist/components/Table/_helpers/GroupedHeader/index.js +148 -147
- package/dist/components/Table/_helpers/TableFilterModal/OptionList.d.ts.map +1 -1
- package/dist/components/Table/_helpers/TableFilterModal/OptionList.js +3 -3
- package/dist/components/Table/_helpers/TableFilterModal/index.d.ts.map +1 -1
- package/dist/components/Table/_helpers/TableFilterModal/index.js +52 -50
- package/dist/components/Table/_helpers/TableRows.d.ts +1 -1
- package/dist/components/Table/_helpers/TableRows.d.ts.map +1 -1
- package/dist/components/Table/_helpers/TableRows.js +242 -243
- package/dist/components/Table/_hooks/useOverlayScrollbar.d.ts.map +1 -1
- package/dist/components/Table/_hooks/useOverlayScrollbar.js +63 -58
- package/dist/components/Table/_types/table.types.d.ts +1 -1
- package/dist/components/Table/_types/table.types.d.ts.map +1 -1
- package/dist/components/Table/_utils/table.utils.d.ts +1 -1
- package/dist/components/Table/_utils/table.utils.d.ts.map +1 -1
- package/dist/components/Table/_utils/table.utils.js +84 -46
- package/dist/components/Table/index.d.ts.map +1 -1
- package/dist/components/Table/index.js +395 -324
- package/dist/components/TextField/index.js +165 -165
- package/dist/styles.module-DSbSTQeV.js +56 -0
- package/package.json +1 -1
- package/dist/assets/index-C8gvpfKZ.css +0 -1
- package/dist/assets/index-DewFIgpp.css +0 -1
- package/dist/assets/styles-BATmGmYA.css +0 -1
- package/dist/assets/styles-DLJzdWsF.css +0 -1
- package/dist/assets/styles-O-5pBCak.css +0 -1
- package/dist/search-B_cup-NN.js +0 -5
- package/dist/styles.module-BJEFZA32.js +0 -56
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import * as
|
|
3
|
-
import { createContext as
|
|
4
|
-
import { CKButton as
|
|
5
|
-
import { Typography as
|
|
6
|
-
import {
|
|
7
|
-
import { S as
|
|
8
|
-
import { ColumnConfig as
|
|
9
|
-
import { COLUMN_ITEM_TYPE as
|
|
10
|
-
import '../../../../assets/styles-
|
|
11
|
-
import { Toggle as
|
|
12
|
-
import { g as
|
|
13
|
-
const
|
|
1
|
+
import { jsx as y, jsxs as P } from "react/jsx-runtime";
|
|
2
|
+
import * as w from "react";
|
|
3
|
+
import { createContext as tt, memo as rt, useEffect as q, useLayoutEffect as nt, useState as Ne, useCallback as B, useMemo as C, isValidElement as it, cloneElement as fe, useContext as st, useRef as Pe } from "react";
|
|
4
|
+
import { CKButton as X } from "../../../CKButton/index.js";
|
|
5
|
+
import { Typography as A } from "../../../Typography/index.js";
|
|
6
|
+
import { Search as ot } from "../../../Search/index.js";
|
|
7
|
+
import { S as at } from "../../../../reset-icon-YxMt3Ozp.js";
|
|
8
|
+
import { ColumnConfig as ct } from "./ColumnConfig.js";
|
|
9
|
+
import { COLUMN_ITEM_TYPE as F } from "../../constants.js";
|
|
10
|
+
import '../../../../assets/styles-CwZG1jzB.css';/* empty css */
|
|
11
|
+
import { Toggle as xe } from "../../../Toggle/index.js";
|
|
12
|
+
import { g as ut } from "../../../../_commonjsHelpers-C6fGbg64.js";
|
|
13
|
+
const Re = tt({
|
|
14
14
|
dragDropManager: void 0
|
|
15
15
|
});
|
|
16
|
-
function
|
|
16
|
+
function E(t) {
|
|
17
17
|
return "Minified Redux error #" + t + "; visit https://redux.js.org/Errors?code=" + t + " for the full message or use the non-minified dev environment for full errors. ";
|
|
18
18
|
}
|
|
19
|
-
var
|
|
19
|
+
var he = function() {
|
|
20
20
|
return typeof Symbol == "function" && Symbol.observable || "@@observable";
|
|
21
|
-
}(),
|
|
21
|
+
}(), pe = function() {
|
|
22
22
|
return Math.random().toString(36).substring(7).split("").join(".");
|
|
23
|
-
},
|
|
24
|
-
INIT: "@@redux/INIT" +
|
|
25
|
-
REPLACE: "@@redux/REPLACE" +
|
|
23
|
+
}, me = {
|
|
24
|
+
INIT: "@@redux/INIT" + pe(),
|
|
25
|
+
REPLACE: "@@redux/REPLACE" + pe()
|
|
26
26
|
};
|
|
27
|
-
function
|
|
27
|
+
function lt(t) {
|
|
28
28
|
if (typeof t != "object" || t === null) return !1;
|
|
29
29
|
for (var e = t; Object.getPrototypeOf(e) !== null; )
|
|
30
30
|
e = Object.getPrototypeOf(e);
|
|
31
31
|
return Object.getPrototypeOf(t) === e;
|
|
32
32
|
}
|
|
33
|
-
function
|
|
33
|
+
function dt(t) {
|
|
34
34
|
if (t === void 0) return "undefined";
|
|
35
35
|
if (t === null) return "null";
|
|
36
36
|
var e = typeof t;
|
|
@@ -43,9 +43,9 @@ function rt(t) {
|
|
|
43
43
|
return e;
|
|
44
44
|
}
|
|
45
45
|
if (Array.isArray(t)) return "array";
|
|
46
|
-
if (
|
|
47
|
-
if (
|
|
48
|
-
var r =
|
|
46
|
+
if (ht(t)) return "date";
|
|
47
|
+
if (ft(t)) return "error";
|
|
48
|
+
var r = gt(t);
|
|
49
49
|
switch (r) {
|
|
50
50
|
case "Symbol":
|
|
51
51
|
case "Promise":
|
|
@@ -57,82 +57,82 @@ function rt(t) {
|
|
|
57
57
|
}
|
|
58
58
|
return e.slice(8, -1).toLowerCase().replace(/\s/g, "");
|
|
59
59
|
}
|
|
60
|
-
function
|
|
60
|
+
function gt(t) {
|
|
61
61
|
return typeof t.constructor == "function" ? t.constructor.name : null;
|
|
62
62
|
}
|
|
63
|
-
function
|
|
63
|
+
function ft(t) {
|
|
64
64
|
return t instanceof Error || typeof t.message == "string" && t.constructor && typeof t.constructor.stackTraceLimit == "number";
|
|
65
65
|
}
|
|
66
|
-
function
|
|
66
|
+
function ht(t) {
|
|
67
67
|
return t instanceof Date ? !0 : typeof t.toDateString == "function" && typeof t.getDate == "function" && typeof t.setDate == "function";
|
|
68
68
|
}
|
|
69
|
-
function
|
|
69
|
+
function M(t) {
|
|
70
70
|
var e = typeof t;
|
|
71
|
-
return process.env.NODE_ENV !== "production" && (e =
|
|
71
|
+
return process.env.NODE_ENV !== "production" && (e = dt(t)), e;
|
|
72
72
|
}
|
|
73
|
-
function
|
|
73
|
+
function Me(t, e, r) {
|
|
74
74
|
var n;
|
|
75
75
|
if (typeof e == "function" && typeof r == "function" || typeof r == "function" && typeof arguments[3] == "function")
|
|
76
|
-
throw new Error(process.env.NODE_ENV === "production" ?
|
|
76
|
+
throw new Error(process.env.NODE_ENV === "production" ? E(0) : "It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function. See https://redux.js.org/tutorials/fundamentals/part-4-store#creating-a-store-with-enhancers for an example.");
|
|
77
77
|
if (typeof e == "function" && typeof r > "u" && (r = e, e = void 0), typeof r < "u") {
|
|
78
78
|
if (typeof r != "function")
|
|
79
|
-
throw new Error(process.env.NODE_ENV === "production" ?
|
|
80
|
-
return r(
|
|
79
|
+
throw new Error(process.env.NODE_ENV === "production" ? E(1) : "Expected the enhancer to be a function. Instead, received: '" + M(r) + "'");
|
|
80
|
+
return r(Me)(t, e);
|
|
81
81
|
}
|
|
82
82
|
if (typeof t != "function")
|
|
83
|
-
throw new Error(process.env.NODE_ENV === "production" ?
|
|
84
|
-
var i = t, s = e,
|
|
85
|
-
function
|
|
86
|
-
|
|
83
|
+
throw new Error(process.env.NODE_ENV === "production" ? E(2) : "Expected the root reducer to be a function. Instead, received: '" + M(t) + "'");
|
|
84
|
+
var i = t, s = e, a = [], o = a, c = !1;
|
|
85
|
+
function l() {
|
|
86
|
+
o === a && (o = a.slice());
|
|
87
87
|
}
|
|
88
|
-
function
|
|
88
|
+
function p() {
|
|
89
89
|
if (c)
|
|
90
|
-
throw new Error(process.env.NODE_ENV === "production" ?
|
|
90
|
+
throw new Error(process.env.NODE_ENV === "production" ? E(3) : "You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");
|
|
91
91
|
return s;
|
|
92
92
|
}
|
|
93
|
-
function
|
|
93
|
+
function v(h) {
|
|
94
94
|
if (typeof h != "function")
|
|
95
|
-
throw new Error(process.env.NODE_ENV === "production" ?
|
|
95
|
+
throw new Error(process.env.NODE_ENV === "production" ? E(4) : "Expected the listener to be a function. Instead, received: '" + M(h) + "'");
|
|
96
96
|
if (c)
|
|
97
|
-
throw new Error(process.env.NODE_ENV === "production" ?
|
|
98
|
-
var
|
|
99
|
-
return
|
|
100
|
-
if (
|
|
97
|
+
throw new Error(process.env.NODE_ENV === "production" ? E(5) : "You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api/store#subscribelistener for more details.");
|
|
98
|
+
var S = !0;
|
|
99
|
+
return l(), o.push(h), function() {
|
|
100
|
+
if (S) {
|
|
101
101
|
if (c)
|
|
102
|
-
throw new Error(process.env.NODE_ENV === "production" ?
|
|
103
|
-
|
|
104
|
-
var
|
|
105
|
-
|
|
102
|
+
throw new Error(process.env.NODE_ENV === "production" ? E(6) : "You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api/store#subscribelistener for more details.");
|
|
103
|
+
S = !1, l();
|
|
104
|
+
var f = o.indexOf(h);
|
|
105
|
+
o.splice(f, 1), a = null;
|
|
106
106
|
}
|
|
107
107
|
};
|
|
108
108
|
}
|
|
109
|
-
function
|
|
110
|
-
if (!
|
|
111
|
-
throw new Error(process.env.NODE_ENV === "production" ?
|
|
109
|
+
function m(h) {
|
|
110
|
+
if (!lt(h))
|
|
111
|
+
throw new Error(process.env.NODE_ENV === "production" ? E(7) : "Actions must be plain objects. Instead, the actual type was: '" + M(h) + "'. You may need to add middleware to your store setup to handle dispatching other values, such as 'redux-thunk' to handle dispatching functions. See https://redux.js.org/tutorials/fundamentals/part-4-store#middleware and https://redux.js.org/tutorials/fundamentals/part-6-async-logic#using-the-redux-thunk-middleware for examples.");
|
|
112
112
|
if (typeof h.type > "u")
|
|
113
|
-
throw new Error(process.env.NODE_ENV === "production" ?
|
|
113
|
+
throw new Error(process.env.NODE_ENV === "production" ? E(8) : 'Actions may not have an undefined "type" property. You may have misspelled an action type string constant.');
|
|
114
114
|
if (c)
|
|
115
|
-
throw new Error(process.env.NODE_ENV === "production" ?
|
|
115
|
+
throw new Error(process.env.NODE_ENV === "production" ? E(9) : "Reducers may not dispatch actions.");
|
|
116
116
|
try {
|
|
117
117
|
c = !0, s = i(s, h);
|
|
118
118
|
} finally {
|
|
119
119
|
c = !1;
|
|
120
120
|
}
|
|
121
|
-
for (var
|
|
122
|
-
var
|
|
123
|
-
|
|
121
|
+
for (var S = a = o, d = 0; d < S.length; d++) {
|
|
122
|
+
var f = S[d];
|
|
123
|
+
f();
|
|
124
124
|
}
|
|
125
125
|
return h;
|
|
126
126
|
}
|
|
127
127
|
function u(h) {
|
|
128
128
|
if (typeof h != "function")
|
|
129
|
-
throw new Error(process.env.NODE_ENV === "production" ?
|
|
130
|
-
i = h,
|
|
131
|
-
type:
|
|
129
|
+
throw new Error(process.env.NODE_ENV === "production" ? E(10) : "Expected the nextReducer to be a function. Instead, received: '" + M(h));
|
|
130
|
+
i = h, m({
|
|
131
|
+
type: me.REPLACE
|
|
132
132
|
});
|
|
133
133
|
}
|
|
134
134
|
function D() {
|
|
135
|
-
var h,
|
|
135
|
+
var h, S = v;
|
|
136
136
|
return h = {
|
|
137
137
|
/**
|
|
138
138
|
* The minimal observable subscription method.
|
|
@@ -142,33 +142,33 @@ function Ce(t, e, r) {
|
|
|
142
142
|
* be used to unsubscribe the observable from the store, and prevent further
|
|
143
143
|
* emission of values from the observable.
|
|
144
144
|
*/
|
|
145
|
-
subscribe: function(
|
|
146
|
-
if (typeof
|
|
147
|
-
throw new Error(process.env.NODE_ENV === "production" ?
|
|
148
|
-
function
|
|
149
|
-
|
|
145
|
+
subscribe: function(f) {
|
|
146
|
+
if (typeof f != "object" || f === null)
|
|
147
|
+
throw new Error(process.env.NODE_ENV === "production" ? E(11) : "Expected the observer to be an object. Instead, received: '" + M(f) + "'");
|
|
148
|
+
function b() {
|
|
149
|
+
f.next && f.next(p());
|
|
150
150
|
}
|
|
151
|
-
|
|
152
|
-
var
|
|
151
|
+
b();
|
|
152
|
+
var O = S(b);
|
|
153
153
|
return {
|
|
154
|
-
unsubscribe:
|
|
154
|
+
unsubscribe: O
|
|
155
155
|
};
|
|
156
156
|
}
|
|
157
|
-
}, h[
|
|
157
|
+
}, h[he] = function() {
|
|
158
158
|
return this;
|
|
159
159
|
}, h;
|
|
160
160
|
}
|
|
161
|
-
return
|
|
162
|
-
type:
|
|
161
|
+
return m({
|
|
162
|
+
type: me.INIT
|
|
163
163
|
}), n = {
|
|
164
|
-
dispatch:
|
|
165
|
-
subscribe:
|
|
166
|
-
getState:
|
|
164
|
+
dispatch: m,
|
|
165
|
+
subscribe: v,
|
|
166
|
+
getState: p,
|
|
167
167
|
replaceReducer: u
|
|
168
|
-
}, n[
|
|
168
|
+
}, n[he] = D, n;
|
|
169
169
|
}
|
|
170
|
-
function
|
|
171
|
-
if (
|
|
170
|
+
function g(t, e, ...r) {
|
|
171
|
+
if (pt() && e === void 0)
|
|
172
172
|
throw new Error("invariant requires an error message argument");
|
|
173
173
|
if (!t) {
|
|
174
174
|
let n;
|
|
@@ -183,103 +183,103 @@ function l(t, e, ...r) {
|
|
|
183
183
|
throw n.framesToPop = 1, n;
|
|
184
184
|
}
|
|
185
185
|
}
|
|
186
|
-
function
|
|
186
|
+
function pt() {
|
|
187
187
|
return typeof process < "u" && process.env.NODE_ENV === "production";
|
|
188
188
|
}
|
|
189
|
-
function
|
|
189
|
+
function mt(t, e, r) {
|
|
190
190
|
return e.split(".").reduce(
|
|
191
191
|
(n, i) => n && n[i] ? n[i] : r || null,
|
|
192
192
|
t
|
|
193
193
|
);
|
|
194
194
|
}
|
|
195
|
-
function
|
|
195
|
+
function vt(t, e) {
|
|
196
196
|
return t.filter(
|
|
197
197
|
(r) => r !== e
|
|
198
198
|
);
|
|
199
199
|
}
|
|
200
|
-
function
|
|
200
|
+
function _e(t) {
|
|
201
201
|
return typeof t == "object";
|
|
202
202
|
}
|
|
203
|
-
function
|
|
203
|
+
function yt(t, e) {
|
|
204
204
|
const r = /* @__PURE__ */ new Map(), n = (s) => {
|
|
205
205
|
r.set(s, r.has(s) ? r.get(s) + 1 : 1);
|
|
206
206
|
};
|
|
207
207
|
t.forEach(n), e.forEach(n);
|
|
208
208
|
const i = [];
|
|
209
|
-
return r.forEach((s,
|
|
210
|
-
s === 1 && i.push(
|
|
209
|
+
return r.forEach((s, a) => {
|
|
210
|
+
s === 1 && i.push(a);
|
|
211
211
|
}), i;
|
|
212
212
|
}
|
|
213
|
-
function
|
|
213
|
+
function Dt(t, e) {
|
|
214
214
|
return t.filter(
|
|
215
215
|
(r) => e.indexOf(r) > -1
|
|
216
216
|
);
|
|
217
217
|
}
|
|
218
|
-
const
|
|
219
|
-
function
|
|
218
|
+
const ae = "dnd-core/INIT_COORDS", $ = "dnd-core/BEGIN_DRAG", ce = "dnd-core/PUBLISH_DRAG_SOURCE", G = "dnd-core/HOVER", Y = "dnd-core/DROP", z = "dnd-core/END_DRAG";
|
|
219
|
+
function ve(t, e) {
|
|
220
220
|
return {
|
|
221
|
-
type:
|
|
221
|
+
type: ae,
|
|
222
222
|
payload: {
|
|
223
223
|
sourceClientOffset: e || null,
|
|
224
224
|
clientOffset: t || null
|
|
225
225
|
}
|
|
226
226
|
};
|
|
227
227
|
}
|
|
228
|
-
const
|
|
229
|
-
type:
|
|
228
|
+
const St = {
|
|
229
|
+
type: ae,
|
|
230
230
|
payload: {
|
|
231
231
|
clientOffset: null,
|
|
232
232
|
sourceClientOffset: null
|
|
233
233
|
}
|
|
234
234
|
};
|
|
235
|
-
function
|
|
235
|
+
function bt(t) {
|
|
236
236
|
return function(r = [], n = {
|
|
237
237
|
publishSource: !0
|
|
238
238
|
}) {
|
|
239
|
-
const { publishSource: i = !0, clientOffset: s, getSourceClientOffset:
|
|
240
|
-
t.dispatch(
|
|
241
|
-
const
|
|
242
|
-
if (
|
|
243
|
-
t.dispatch(
|
|
239
|
+
const { publishSource: i = !0, clientOffset: s, getSourceClientOffset: a } = n, o = t.getMonitor(), c = t.getRegistry();
|
|
240
|
+
t.dispatch(ve(s)), Ot(r, o, c);
|
|
241
|
+
const l = It(r, o);
|
|
242
|
+
if (l == null) {
|
|
243
|
+
t.dispatch(St);
|
|
244
244
|
return;
|
|
245
245
|
}
|
|
246
|
-
let
|
|
246
|
+
let p = null;
|
|
247
247
|
if (s) {
|
|
248
|
-
if (!
|
|
248
|
+
if (!a)
|
|
249
249
|
throw new Error("getSourceClientOffset must be defined");
|
|
250
|
-
|
|
250
|
+
Tt(a), p = a(l);
|
|
251
251
|
}
|
|
252
|
-
t.dispatch(
|
|
253
|
-
const
|
|
254
|
-
if (
|
|
252
|
+
t.dispatch(ve(s, p));
|
|
253
|
+
const m = c.getSource(l).beginDrag(o, l);
|
|
254
|
+
if (m == null)
|
|
255
255
|
return;
|
|
256
|
-
|
|
257
|
-
const u = c.getSourceType(
|
|
256
|
+
Et(m), c.pinSource(l);
|
|
257
|
+
const u = c.getSourceType(l);
|
|
258
258
|
return {
|
|
259
|
-
type:
|
|
259
|
+
type: $,
|
|
260
260
|
payload: {
|
|
261
261
|
itemType: u,
|
|
262
|
-
item:
|
|
263
|
-
sourceId:
|
|
262
|
+
item: m,
|
|
263
|
+
sourceId: l,
|
|
264
264
|
clientOffset: s || null,
|
|
265
|
-
sourceClientOffset:
|
|
265
|
+
sourceClientOffset: p || null,
|
|
266
266
|
isSourcePublic: !!i
|
|
267
267
|
}
|
|
268
268
|
};
|
|
269
269
|
};
|
|
270
270
|
}
|
|
271
|
-
function
|
|
272
|
-
|
|
273
|
-
|
|
271
|
+
function Ot(t, e, r) {
|
|
272
|
+
g(!e.isDragging(), "Cannot call beginDrag while dragging."), t.forEach(function(n) {
|
|
273
|
+
g(r.getSource(n), "Expected sourceIds to be registered.");
|
|
274
274
|
});
|
|
275
275
|
}
|
|
276
|
-
function
|
|
277
|
-
|
|
276
|
+
function Tt(t) {
|
|
277
|
+
g(typeof t == "function", "When clientOffset is provided, getSourceClientOffset must be a function.");
|
|
278
278
|
}
|
|
279
|
-
function
|
|
280
|
-
|
|
279
|
+
function Et(t) {
|
|
280
|
+
g(_e(t), "Item must be an object.");
|
|
281
281
|
}
|
|
282
|
-
function
|
|
282
|
+
function It(t, e) {
|
|
283
283
|
let r = null;
|
|
284
284
|
for (let n = t.length - 1; n >= 0; n--)
|
|
285
285
|
if (e.canDragSource(t[n])) {
|
|
@@ -288,7 +288,7 @@ function mt(t, e) {
|
|
|
288
288
|
}
|
|
289
289
|
return r;
|
|
290
290
|
}
|
|
291
|
-
function
|
|
291
|
+
function Ct(t, e, r) {
|
|
292
292
|
return e in t ? Object.defineProperty(t, e, {
|
|
293
293
|
value: r,
|
|
294
294
|
enumerable: !0,
|
|
@@ -296,70 +296,70 @@ function vt(t, e, r) {
|
|
|
296
296
|
writable: !0
|
|
297
297
|
}) : t[e] = r, t;
|
|
298
298
|
}
|
|
299
|
-
function
|
|
299
|
+
function wt(t) {
|
|
300
300
|
for (var e = 1; e < arguments.length; e++) {
|
|
301
301
|
var r = arguments[e] != null ? arguments[e] : {}, n = Object.keys(r);
|
|
302
302
|
typeof Object.getOwnPropertySymbols == "function" && (n = n.concat(Object.getOwnPropertySymbols(r).filter(function(i) {
|
|
303
303
|
return Object.getOwnPropertyDescriptor(r, i).enumerable;
|
|
304
304
|
}))), n.forEach(function(i) {
|
|
305
|
-
|
|
305
|
+
Ct(t, i, r[i]);
|
|
306
306
|
});
|
|
307
307
|
}
|
|
308
308
|
return t;
|
|
309
309
|
}
|
|
310
|
-
function
|
|
310
|
+
function Nt(t) {
|
|
311
311
|
return function(r = {}) {
|
|
312
312
|
const n = t.getMonitor(), i = t.getRegistry();
|
|
313
|
-
|
|
314
|
-
const c =
|
|
315
|
-
type:
|
|
313
|
+
Pt(n), Mt(n).forEach((a, o) => {
|
|
314
|
+
const c = xt(a, o, i, n), l = {
|
|
315
|
+
type: Y,
|
|
316
316
|
payload: {
|
|
317
|
-
dropResult:
|
|
317
|
+
dropResult: wt({}, r, c)
|
|
318
318
|
}
|
|
319
319
|
};
|
|
320
|
-
t.dispatch(
|
|
320
|
+
t.dispatch(l);
|
|
321
321
|
});
|
|
322
322
|
};
|
|
323
323
|
}
|
|
324
|
-
function
|
|
325
|
-
|
|
324
|
+
function Pt(t) {
|
|
325
|
+
g(t.isDragging(), "Cannot call drop while not dragging."), g(!t.didDrop(), "Cannot call drop twice during one drag operation.");
|
|
326
326
|
}
|
|
327
|
-
function
|
|
327
|
+
function xt(t, e, r, n) {
|
|
328
328
|
const i = r.getTarget(t);
|
|
329
329
|
let s = i ? i.drop(n, t) : void 0;
|
|
330
|
-
return
|
|
330
|
+
return Rt(s), typeof s > "u" && (s = e === 0 ? {} : n.getDropResult()), s;
|
|
331
331
|
}
|
|
332
|
-
function
|
|
333
|
-
|
|
332
|
+
function Rt(t) {
|
|
333
|
+
g(typeof t > "u" || _e(t), "Drop result must either be an object or undefined.");
|
|
334
334
|
}
|
|
335
|
-
function
|
|
335
|
+
function Mt(t) {
|
|
336
336
|
const e = t.getTargetIds().filter(t.canDropOnTarget, t);
|
|
337
337
|
return e.reverse(), e;
|
|
338
338
|
}
|
|
339
|
-
function
|
|
339
|
+
function _t(t) {
|
|
340
340
|
return function() {
|
|
341
341
|
const r = t.getMonitor(), n = t.getRegistry();
|
|
342
|
-
|
|
342
|
+
kt(r);
|
|
343
343
|
const i = r.getSourceId();
|
|
344
344
|
return i != null && (n.getSource(i, !0).endDrag(r, i), n.unpinSource()), {
|
|
345
|
-
type:
|
|
345
|
+
type: z
|
|
346
346
|
};
|
|
347
347
|
};
|
|
348
348
|
}
|
|
349
|
-
function
|
|
350
|
-
|
|
349
|
+
function kt(t) {
|
|
350
|
+
g(t.isDragging(), "Cannot call endDrag while not dragging.");
|
|
351
351
|
}
|
|
352
|
-
function
|
|
352
|
+
function re(t, e) {
|
|
353
353
|
return e === null ? t === null : Array.isArray(t) ? t.some(
|
|
354
354
|
(r) => r === e
|
|
355
355
|
) : t === e;
|
|
356
356
|
}
|
|
357
|
-
function
|
|
357
|
+
function Lt(t) {
|
|
358
358
|
return function(r, { clientOffset: n } = {}) {
|
|
359
|
-
|
|
360
|
-
const i = r.slice(0), s = t.getMonitor(),
|
|
361
|
-
return
|
|
362
|
-
type:
|
|
359
|
+
At(r);
|
|
360
|
+
const i = r.slice(0), s = t.getMonitor(), a = t.getRegistry(), o = s.getItemType();
|
|
361
|
+
return jt(i, a, o), Ht(i, s, a), Vt(i, s, a), {
|
|
362
|
+
type: G,
|
|
363
363
|
payload: {
|
|
364
364
|
targetIds: i,
|
|
365
365
|
clientOffset: n || null
|
|
@@ -367,47 +367,47 @@ function Ct(t) {
|
|
|
367
367
|
};
|
|
368
368
|
};
|
|
369
369
|
}
|
|
370
|
-
function
|
|
371
|
-
|
|
370
|
+
function At(t) {
|
|
371
|
+
g(Array.isArray(t), "Expected targetIds to be an array.");
|
|
372
372
|
}
|
|
373
|
-
function
|
|
374
|
-
|
|
373
|
+
function Ht(t, e, r) {
|
|
374
|
+
g(e.isDragging(), "Cannot call hover while not dragging."), g(!e.didDrop(), "Cannot call hover after drop.");
|
|
375
375
|
for (let n = 0; n < t.length; n++) {
|
|
376
376
|
const i = t[n];
|
|
377
|
-
|
|
377
|
+
g(t.lastIndexOf(i) === n, "Expected targetIds to be unique in the passed array.");
|
|
378
378
|
const s = r.getTarget(i);
|
|
379
|
-
|
|
379
|
+
g(s, "Expected targetIds to be registered.");
|
|
380
380
|
}
|
|
381
381
|
}
|
|
382
|
-
function
|
|
382
|
+
function jt(t, e, r) {
|
|
383
383
|
for (let n = t.length - 1; n >= 0; n--) {
|
|
384
384
|
const i = t[n], s = e.getTargetType(i);
|
|
385
|
-
|
|
385
|
+
re(s, r) || t.splice(n, 1);
|
|
386
386
|
}
|
|
387
387
|
}
|
|
388
|
-
function
|
|
388
|
+
function Vt(t, e, r) {
|
|
389
389
|
t.forEach(function(n) {
|
|
390
390
|
r.getTarget(n).hover(e, n);
|
|
391
391
|
});
|
|
392
392
|
}
|
|
393
|
-
function
|
|
393
|
+
function Bt(t) {
|
|
394
394
|
return function() {
|
|
395
395
|
if (t.getMonitor().isDragging())
|
|
396
396
|
return {
|
|
397
|
-
type:
|
|
397
|
+
type: ce
|
|
398
398
|
};
|
|
399
399
|
};
|
|
400
400
|
}
|
|
401
|
-
function
|
|
401
|
+
function Ut(t) {
|
|
402
402
|
return {
|
|
403
|
-
beginDrag:
|
|
404
|
-
publishDragSource:
|
|
405
|
-
hover:
|
|
406
|
-
drop:
|
|
407
|
-
endDrag:
|
|
403
|
+
beginDrag: bt(t),
|
|
404
|
+
publishDragSource: Bt(t),
|
|
405
|
+
hover: Lt(t),
|
|
406
|
+
drop: Nt(t),
|
|
407
|
+
endDrag: _t(t)
|
|
408
408
|
};
|
|
409
409
|
}
|
|
410
|
-
class
|
|
410
|
+
class Ft {
|
|
411
411
|
receiveBackend(e) {
|
|
412
412
|
this.backend = e;
|
|
413
413
|
}
|
|
@@ -423,15 +423,15 @@ class _t {
|
|
|
423
423
|
getActions() {
|
|
424
424
|
const e = this, { dispatch: r } = this.store;
|
|
425
425
|
function n(s) {
|
|
426
|
-
return (...
|
|
427
|
-
const
|
|
428
|
-
typeof
|
|
426
|
+
return (...a) => {
|
|
427
|
+
const o = s.apply(e, a);
|
|
428
|
+
typeof o < "u" && r(o);
|
|
429
429
|
};
|
|
430
430
|
}
|
|
431
|
-
const i =
|
|
432
|
-
return Object.keys(i).reduce((s,
|
|
433
|
-
const
|
|
434
|
-
return s[
|
|
431
|
+
const i = Ut(this);
|
|
432
|
+
return Object.keys(i).reduce((s, a) => {
|
|
433
|
+
const o = i[a];
|
|
434
|
+
return s[a] = n(o), s;
|
|
435
435
|
}, {});
|
|
436
436
|
}
|
|
437
437
|
dispatch(e) {
|
|
@@ -444,49 +444,49 @@ class _t {
|
|
|
444
444
|
}, this.store = e, this.monitor = r, e.subscribe(this.handleRefCountChange);
|
|
445
445
|
}
|
|
446
446
|
}
|
|
447
|
-
function
|
|
447
|
+
function qt(t, e) {
|
|
448
448
|
return {
|
|
449
449
|
x: t.x + e.x,
|
|
450
450
|
y: t.y + e.y
|
|
451
451
|
};
|
|
452
452
|
}
|
|
453
|
-
function
|
|
453
|
+
function ke(t, e) {
|
|
454
454
|
return {
|
|
455
455
|
x: t.x - e.x,
|
|
456
456
|
y: t.y - e.y
|
|
457
457
|
};
|
|
458
458
|
}
|
|
459
|
-
function
|
|
459
|
+
function $t(t) {
|
|
460
460
|
const { clientOffset: e, initialClientOffset: r, initialSourceClientOffset: n } = t;
|
|
461
|
-
return !e || !r || !n ? null :
|
|
461
|
+
return !e || !r || !n ? null : ke(qt(e, n), r);
|
|
462
462
|
}
|
|
463
|
-
function
|
|
463
|
+
function Gt(t) {
|
|
464
464
|
const { clientOffset: e, initialClientOffset: r } = t;
|
|
465
|
-
return !e || !r ? null :
|
|
465
|
+
return !e || !r ? null : ke(e, r);
|
|
466
466
|
}
|
|
467
|
-
const
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
function
|
|
471
|
-
return t ===
|
|
467
|
+
const H = [], ue = [];
|
|
468
|
+
H.__IS_NONE__ = !0;
|
|
469
|
+
ue.__IS_ALL__ = !0;
|
|
470
|
+
function Yt(t, e) {
|
|
471
|
+
return t === H ? !1 : t === ue || typeof e > "u" ? !0 : Dt(e, t).length > 0;
|
|
472
472
|
}
|
|
473
|
-
class
|
|
473
|
+
class zt {
|
|
474
474
|
subscribeToStateChange(e, r = {}) {
|
|
475
475
|
const { handlerIds: n } = r;
|
|
476
|
-
|
|
476
|
+
g(typeof e == "function", "listener must be a function."), g(typeof n > "u" || Array.isArray(n), "handlerIds, when specified, must be an array of strings.");
|
|
477
477
|
let i = this.store.getState().stateId;
|
|
478
478
|
const s = () => {
|
|
479
|
-
const
|
|
479
|
+
const a = this.store.getState(), o = a.stateId;
|
|
480
480
|
try {
|
|
481
|
-
|
|
481
|
+
o === i || o === i + 1 && !Yt(a.dirtyHandlerIds, n) || e();
|
|
482
482
|
} finally {
|
|
483
|
-
i =
|
|
483
|
+
i = o;
|
|
484
484
|
}
|
|
485
485
|
};
|
|
486
486
|
return this.store.subscribe(s);
|
|
487
487
|
}
|
|
488
488
|
subscribeToOffsetChange(e) {
|
|
489
|
-
|
|
489
|
+
g(typeof e == "function", "listener must be a function.");
|
|
490
490
|
let r = this.store.getState().dragOffset;
|
|
491
491
|
const n = () => {
|
|
492
492
|
const i = this.store.getState().dragOffset;
|
|
@@ -498,16 +498,16 @@ class jt {
|
|
|
498
498
|
if (!e)
|
|
499
499
|
return !1;
|
|
500
500
|
const r = this.registry.getSource(e);
|
|
501
|
-
return
|
|
501
|
+
return g(r, `Expected to find a valid source. sourceId=${e}`), this.isDragging() ? !1 : r.canDrag(this, e);
|
|
502
502
|
}
|
|
503
503
|
canDropOnTarget(e) {
|
|
504
504
|
if (!e)
|
|
505
505
|
return !1;
|
|
506
506
|
const r = this.registry.getTarget(e);
|
|
507
|
-
if (
|
|
507
|
+
if (g(r, `Expected to find a valid target. targetId=${e}`), !this.isDragging() || this.didDrop())
|
|
508
508
|
return !1;
|
|
509
509
|
const n = this.registry.getTargetType(e), i = this.getItemType();
|
|
510
|
-
return
|
|
510
|
+
return re(n, i) && r.canDrop(this, e);
|
|
511
511
|
}
|
|
512
512
|
isDragging() {
|
|
513
513
|
return !!this.getItemType();
|
|
@@ -516,7 +516,7 @@ class jt {
|
|
|
516
516
|
if (!e)
|
|
517
517
|
return !1;
|
|
518
518
|
const r = this.registry.getSource(e, !0);
|
|
519
|
-
if (
|
|
519
|
+
if (g(r, `Expected to find a valid source. sourceId=${e}`), !this.isDragging() || !this.isSourcePublic())
|
|
520
520
|
return !1;
|
|
521
521
|
const n = this.registry.getSourceType(e), i = this.getItemType();
|
|
522
522
|
return n !== i ? !1 : r.isDragging(this, e);
|
|
@@ -530,13 +530,13 @@ class jt {
|
|
|
530
530
|
if (!this.isDragging())
|
|
531
531
|
return !1;
|
|
532
532
|
const i = this.registry.getTargetType(e), s = this.getItemType();
|
|
533
|
-
if (s && !
|
|
533
|
+
if (s && !re(i, s))
|
|
534
534
|
return !1;
|
|
535
|
-
const
|
|
536
|
-
if (!
|
|
535
|
+
const a = this.getTargetIds();
|
|
536
|
+
if (!a.length)
|
|
537
537
|
return !1;
|
|
538
|
-
const
|
|
539
|
-
return n ?
|
|
538
|
+
const o = a.indexOf(e);
|
|
539
|
+
return n ? o === a.length - 1 : o > -1;
|
|
540
540
|
}
|
|
541
541
|
getItemType() {
|
|
542
542
|
return this.store.getState().dragOperation.itemType;
|
|
@@ -569,17 +569,17 @@ class jt {
|
|
|
569
569
|
return this.store.getState().dragOffset.clientOffset;
|
|
570
570
|
}
|
|
571
571
|
getSourceClientOffset() {
|
|
572
|
-
return
|
|
572
|
+
return $t(this.store.getState().dragOffset);
|
|
573
573
|
}
|
|
574
574
|
getDifferenceFromInitialOffset() {
|
|
575
|
-
return
|
|
575
|
+
return Gt(this.store.getState().dragOffset);
|
|
576
576
|
}
|
|
577
577
|
constructor(e, r) {
|
|
578
578
|
this.store = e, this.registry = r;
|
|
579
579
|
}
|
|
580
580
|
}
|
|
581
|
-
const
|
|
582
|
-
function
|
|
581
|
+
const ye = typeof global < "u" ? global : self, Le = ye.MutationObserver || ye.WebKitMutationObserver;
|
|
582
|
+
function Ae(t) {
|
|
583
583
|
return function() {
|
|
584
584
|
const r = setTimeout(i, 0), n = setInterval(i, 50);
|
|
585
585
|
function i() {
|
|
@@ -587,16 +587,16 @@ function xe(t) {
|
|
|
587
587
|
}
|
|
588
588
|
};
|
|
589
589
|
}
|
|
590
|
-
function
|
|
590
|
+
function Wt(t) {
|
|
591
591
|
let e = 1;
|
|
592
|
-
const r = new
|
|
592
|
+
const r = new Le(t), n = document.createTextNode("");
|
|
593
593
|
return r.observe(n, {
|
|
594
594
|
characterData: !0
|
|
595
595
|
}), function() {
|
|
596
596
|
e = -e, n.data = e;
|
|
597
597
|
};
|
|
598
598
|
}
|
|
599
|
-
const
|
|
599
|
+
const Xt = typeof Le == "function" ? (
|
|
600
600
|
// reliably everywhere they are implemented.
|
|
601
601
|
// They are implemented in all modern browsers.
|
|
602
602
|
//
|
|
@@ -607,7 +607,7 @@ const Ut = typeof Pe == "function" ? (
|
|
|
607
607
|
// - iPad Safari 6-7.1
|
|
608
608
|
// - iPhone Safari 7-7.1
|
|
609
609
|
// - Safari 6-7
|
|
610
|
-
|
|
610
|
+
Wt
|
|
611
611
|
) : (
|
|
612
612
|
// task queue, are implemented in Internet Explorer 10, Safari 5.0-1, and Opera
|
|
613
613
|
// 11-12, and in web workers in many engines.
|
|
@@ -633,9 +633,9 @@ const Ut = typeof Pe == "function" ? (
|
|
|
633
633
|
// - Internet Explorer 6-9
|
|
634
634
|
// - iPad Safari 4.3
|
|
635
635
|
// - Lynx 2.8.7
|
|
636
|
-
|
|
636
|
+
Ae
|
|
637
637
|
);
|
|
638
|
-
class
|
|
638
|
+
class Kt {
|
|
639
639
|
// Use the fastest means possible to execute a task in its own turn, with
|
|
640
640
|
// priority over other events including IO, animation, reflow, and redraw
|
|
641
641
|
// events in browsers.
|
|
@@ -664,13 +664,13 @@ class Vt {
|
|
|
664
664
|
e.length = 0, this.index = 0, this.flushing = !1;
|
|
665
665
|
}, this.registerPendingError = (e) => {
|
|
666
666
|
this.pendingErrors.push(e), this.requestErrorThrow();
|
|
667
|
-
}, this.requestFlush =
|
|
667
|
+
}, this.requestFlush = Xt(this.flush), this.requestErrorThrow = Ae(() => {
|
|
668
668
|
if (this.pendingErrors.length)
|
|
669
669
|
throw this.pendingErrors.shift();
|
|
670
670
|
});
|
|
671
671
|
}
|
|
672
672
|
}
|
|
673
|
-
class
|
|
673
|
+
class Zt {
|
|
674
674
|
call() {
|
|
675
675
|
try {
|
|
676
676
|
this.task && this.task();
|
|
@@ -684,9 +684,9 @@ class Ft {
|
|
|
684
684
|
this.onError = e, this.release = r, this.task = null;
|
|
685
685
|
}
|
|
686
686
|
}
|
|
687
|
-
class
|
|
687
|
+
class Qt {
|
|
688
688
|
create(e) {
|
|
689
|
-
const r = this.freeTasks, n = r.length ? r.pop() : new
|
|
689
|
+
const r = this.freeTasks, n = r.length ? r.pop() : new Zt(
|
|
690
690
|
this.onError,
|
|
691
691
|
(i) => r[r.length] = i
|
|
692
692
|
);
|
|
@@ -696,88 +696,88 @@ class qt {
|
|
|
696
696
|
this.onError = e, this.freeTasks = [];
|
|
697
697
|
}
|
|
698
698
|
}
|
|
699
|
-
const
|
|
700
|
-
function
|
|
701
|
-
|
|
699
|
+
const He = new Kt(), Jt = new Qt(He.registerPendingError);
|
|
700
|
+
function er(t) {
|
|
701
|
+
He.enqueueTask(Jt.create(t));
|
|
702
702
|
}
|
|
703
|
-
const
|
|
704
|
-
function
|
|
703
|
+
const le = "dnd-core/ADD_SOURCE", de = "dnd-core/ADD_TARGET", ge = "dnd-core/REMOVE_SOURCE", W = "dnd-core/REMOVE_TARGET";
|
|
704
|
+
function tr(t) {
|
|
705
705
|
return {
|
|
706
|
-
type:
|
|
706
|
+
type: le,
|
|
707
707
|
payload: {
|
|
708
708
|
sourceId: t
|
|
709
709
|
}
|
|
710
710
|
};
|
|
711
711
|
}
|
|
712
|
-
function
|
|
712
|
+
function rr(t) {
|
|
713
713
|
return {
|
|
714
|
-
type:
|
|
714
|
+
type: de,
|
|
715
715
|
payload: {
|
|
716
716
|
targetId: t
|
|
717
717
|
}
|
|
718
718
|
};
|
|
719
719
|
}
|
|
720
|
-
function
|
|
720
|
+
function nr(t) {
|
|
721
721
|
return {
|
|
722
|
-
type:
|
|
722
|
+
type: ge,
|
|
723
723
|
payload: {
|
|
724
724
|
sourceId: t
|
|
725
725
|
}
|
|
726
726
|
};
|
|
727
727
|
}
|
|
728
|
-
function
|
|
728
|
+
function ir(t) {
|
|
729
729
|
return {
|
|
730
|
-
type:
|
|
730
|
+
type: W,
|
|
731
731
|
payload: {
|
|
732
732
|
targetId: t
|
|
733
733
|
}
|
|
734
734
|
};
|
|
735
735
|
}
|
|
736
|
-
function
|
|
737
|
-
|
|
736
|
+
function sr(t) {
|
|
737
|
+
g(typeof t.canDrag == "function", "Expected canDrag to be a function."), g(typeof t.beginDrag == "function", "Expected beginDrag to be a function."), g(typeof t.endDrag == "function", "Expected endDrag to be a function.");
|
|
738
738
|
}
|
|
739
|
-
function
|
|
740
|
-
|
|
739
|
+
function or(t) {
|
|
740
|
+
g(typeof t.canDrop == "function", "Expected canDrop to be a function."), g(typeof t.hover == "function", "Expected hover to be a function."), g(typeof t.drop == "function", "Expected beginDrag to be a function.");
|
|
741
741
|
}
|
|
742
|
-
function
|
|
742
|
+
function ne(t, e) {
|
|
743
743
|
if (e && Array.isArray(t)) {
|
|
744
744
|
t.forEach(
|
|
745
|
-
(r) =>
|
|
745
|
+
(r) => ne(r, !1)
|
|
746
746
|
);
|
|
747
747
|
return;
|
|
748
748
|
}
|
|
749
|
-
|
|
749
|
+
g(typeof t == "string" || typeof t == "symbol", e ? "Type can only be a string, a symbol, or an array of either." : "Type can only be a string or a symbol.");
|
|
750
750
|
}
|
|
751
|
-
var
|
|
751
|
+
var I;
|
|
752
752
|
(function(t) {
|
|
753
753
|
t.SOURCE = "SOURCE", t.TARGET = "TARGET";
|
|
754
|
-
})(
|
|
755
|
-
let
|
|
756
|
-
function
|
|
757
|
-
return
|
|
754
|
+
})(I || (I = {}));
|
|
755
|
+
let ar = 0;
|
|
756
|
+
function cr() {
|
|
757
|
+
return ar++;
|
|
758
758
|
}
|
|
759
|
-
function
|
|
760
|
-
const e =
|
|
759
|
+
function ur(t) {
|
|
760
|
+
const e = cr().toString();
|
|
761
761
|
switch (t) {
|
|
762
|
-
case
|
|
762
|
+
case I.SOURCE:
|
|
763
763
|
return `S${e}`;
|
|
764
|
-
case
|
|
764
|
+
case I.TARGET:
|
|
765
765
|
return `T${e}`;
|
|
766
766
|
default:
|
|
767
767
|
throw new Error(`Unknown Handler Role: ${t}`);
|
|
768
768
|
}
|
|
769
769
|
}
|
|
770
|
-
function
|
|
770
|
+
function De(t) {
|
|
771
771
|
switch (t[0]) {
|
|
772
772
|
case "S":
|
|
773
|
-
return
|
|
773
|
+
return I.SOURCE;
|
|
774
774
|
case "T":
|
|
775
|
-
return
|
|
775
|
+
return I.TARGET;
|
|
776
776
|
default:
|
|
777
777
|
throw new Error(`Cannot parse handler ID: ${t}`);
|
|
778
778
|
}
|
|
779
779
|
}
|
|
780
|
-
function
|
|
780
|
+
function Se(t, e) {
|
|
781
781
|
const r = t.entries();
|
|
782
782
|
let n = !1;
|
|
783
783
|
do {
|
|
@@ -788,66 +788,66 @@ function pe(t, e) {
|
|
|
788
788
|
} while (!n);
|
|
789
789
|
return !1;
|
|
790
790
|
}
|
|
791
|
-
class
|
|
791
|
+
class lr {
|
|
792
792
|
addSource(e, r) {
|
|
793
|
-
|
|
794
|
-
const n = this.addHandler(
|
|
795
|
-
return this.store.dispatch(
|
|
793
|
+
ne(e), sr(r);
|
|
794
|
+
const n = this.addHandler(I.SOURCE, e, r);
|
|
795
|
+
return this.store.dispatch(tr(n)), n;
|
|
796
796
|
}
|
|
797
797
|
addTarget(e, r) {
|
|
798
|
-
|
|
799
|
-
const n = this.addHandler(
|
|
800
|
-
return this.store.dispatch(
|
|
798
|
+
ne(e, !0), or(r);
|
|
799
|
+
const n = this.addHandler(I.TARGET, e, r);
|
|
800
|
+
return this.store.dispatch(rr(n)), n;
|
|
801
801
|
}
|
|
802
802
|
containsHandler(e) {
|
|
803
|
-
return
|
|
803
|
+
return Se(this.dragSources, e) || Se(this.dropTargets, e);
|
|
804
804
|
}
|
|
805
805
|
getSource(e, r = !1) {
|
|
806
|
-
return
|
|
806
|
+
return g(this.isSourceId(e), "Expected a valid source ID."), r && e === this.pinnedSourceId ? this.pinnedSource : this.dragSources.get(e);
|
|
807
807
|
}
|
|
808
808
|
getTarget(e) {
|
|
809
|
-
return
|
|
809
|
+
return g(this.isTargetId(e), "Expected a valid target ID."), this.dropTargets.get(e);
|
|
810
810
|
}
|
|
811
811
|
getSourceType(e) {
|
|
812
|
-
return
|
|
812
|
+
return g(this.isSourceId(e), "Expected a valid source ID."), this.types.get(e);
|
|
813
813
|
}
|
|
814
814
|
getTargetType(e) {
|
|
815
|
-
return
|
|
815
|
+
return g(this.isTargetId(e), "Expected a valid target ID."), this.types.get(e);
|
|
816
816
|
}
|
|
817
817
|
isSourceId(e) {
|
|
818
|
-
return
|
|
818
|
+
return De(e) === I.SOURCE;
|
|
819
819
|
}
|
|
820
820
|
isTargetId(e) {
|
|
821
|
-
return
|
|
821
|
+
return De(e) === I.TARGET;
|
|
822
822
|
}
|
|
823
823
|
removeSource(e) {
|
|
824
|
-
|
|
824
|
+
g(this.getSource(e), "Expected an existing source."), this.store.dispatch(nr(e)), er(() => {
|
|
825
825
|
this.dragSources.delete(e), this.types.delete(e);
|
|
826
826
|
});
|
|
827
827
|
}
|
|
828
828
|
removeTarget(e) {
|
|
829
|
-
|
|
829
|
+
g(this.getTarget(e), "Expected an existing target."), this.store.dispatch(ir(e)), this.dropTargets.delete(e), this.types.delete(e);
|
|
830
830
|
}
|
|
831
831
|
pinSource(e) {
|
|
832
832
|
const r = this.getSource(e);
|
|
833
|
-
|
|
833
|
+
g(r, "Expected an existing source."), this.pinnedSourceId = e, this.pinnedSource = r;
|
|
834
834
|
}
|
|
835
835
|
unpinSource() {
|
|
836
|
-
|
|
836
|
+
g(this.pinnedSource, "No source is pinned at the time."), this.pinnedSourceId = null, this.pinnedSource = null;
|
|
837
837
|
}
|
|
838
838
|
addHandler(e, r, n) {
|
|
839
|
-
const i =
|
|
840
|
-
return this.types.set(i, r), e ===
|
|
839
|
+
const i = ur(e);
|
|
840
|
+
return this.types.set(i, r), e === I.SOURCE ? this.dragSources.set(i, n) : e === I.TARGET && this.dropTargets.set(i, n), i;
|
|
841
841
|
}
|
|
842
842
|
constructor(e) {
|
|
843
843
|
this.types = /* @__PURE__ */ new Map(), this.dragSources = /* @__PURE__ */ new Map(), this.dropTargets = /* @__PURE__ */ new Map(), this.pinnedSourceId = null, this.pinnedSource = null, this.store = e;
|
|
844
844
|
}
|
|
845
845
|
}
|
|
846
|
-
const
|
|
847
|
-
function
|
|
846
|
+
const dr = (t, e) => t === e;
|
|
847
|
+
function gr(t, e) {
|
|
848
848
|
return !t && !e ? !0 : !t || !e ? !1 : t.x === e.x && t.y === e.y;
|
|
849
849
|
}
|
|
850
|
-
function
|
|
850
|
+
function fr(t, e, r = dr) {
|
|
851
851
|
if (t.length !== e.length)
|
|
852
852
|
return !1;
|
|
853
853
|
for (let n = 0; n < t.length; ++n)
|
|
@@ -855,29 +855,29 @@ function ir(t, e, r = rr) {
|
|
|
855
855
|
return !1;
|
|
856
856
|
return !0;
|
|
857
857
|
}
|
|
858
|
-
function
|
|
858
|
+
function hr(t = H, e) {
|
|
859
859
|
switch (e.type) {
|
|
860
|
-
case
|
|
860
|
+
case G:
|
|
861
861
|
break;
|
|
862
|
-
case
|
|
863
|
-
case
|
|
864
|
-
case
|
|
865
|
-
case
|
|
866
|
-
return
|
|
867
|
-
case
|
|
868
|
-
case
|
|
869
|
-
case
|
|
870
|
-
case
|
|
862
|
+
case le:
|
|
863
|
+
case de:
|
|
864
|
+
case W:
|
|
865
|
+
case ge:
|
|
866
|
+
return H;
|
|
867
|
+
case $:
|
|
868
|
+
case ce:
|
|
869
|
+
case z:
|
|
870
|
+
case Y:
|
|
871
871
|
default:
|
|
872
|
-
return
|
|
872
|
+
return ue;
|
|
873
873
|
}
|
|
874
|
-
const { targetIds: r = [], prevTargetIds: n = [] } = e.payload, i =
|
|
875
|
-
if (!(i.length > 0 || !
|
|
876
|
-
return
|
|
877
|
-
const
|
|
878
|
-
return
|
|
874
|
+
const { targetIds: r = [], prevTargetIds: n = [] } = e.payload, i = yt(r, n);
|
|
875
|
+
if (!(i.length > 0 || !fr(r, n)))
|
|
876
|
+
return H;
|
|
877
|
+
const a = n[n.length - 1], o = r[r.length - 1];
|
|
878
|
+
return a !== o && (a && i.push(a), o && i.push(o)), i;
|
|
879
879
|
}
|
|
880
|
-
function
|
|
880
|
+
function pr(t, e, r) {
|
|
881
881
|
return e in t ? Object.defineProperty(t, e, {
|
|
882
882
|
value: r,
|
|
883
883
|
enumerable: !0,
|
|
@@ -885,44 +885,44 @@ function or(t, e, r) {
|
|
|
885
885
|
writable: !0
|
|
886
886
|
}) : t[e] = r, t;
|
|
887
887
|
}
|
|
888
|
-
function
|
|
888
|
+
function mr(t) {
|
|
889
889
|
for (var e = 1; e < arguments.length; e++) {
|
|
890
890
|
var r = arguments[e] != null ? arguments[e] : {}, n = Object.keys(r);
|
|
891
891
|
typeof Object.getOwnPropertySymbols == "function" && (n = n.concat(Object.getOwnPropertySymbols(r).filter(function(i) {
|
|
892
892
|
return Object.getOwnPropertyDescriptor(r, i).enumerable;
|
|
893
893
|
}))), n.forEach(function(i) {
|
|
894
|
-
|
|
894
|
+
pr(t, i, r[i]);
|
|
895
895
|
});
|
|
896
896
|
}
|
|
897
897
|
return t;
|
|
898
898
|
}
|
|
899
|
-
const
|
|
899
|
+
const be = {
|
|
900
900
|
initialSourceClientOffset: null,
|
|
901
901
|
initialClientOffset: null,
|
|
902
902
|
clientOffset: null
|
|
903
903
|
};
|
|
904
|
-
function
|
|
904
|
+
function vr(t = be, e) {
|
|
905
905
|
const { payload: r } = e;
|
|
906
906
|
switch (e.type) {
|
|
907
|
-
case
|
|
908
|
-
case
|
|
907
|
+
case ae:
|
|
908
|
+
case $:
|
|
909
909
|
return {
|
|
910
910
|
initialSourceClientOffset: r.sourceClientOffset,
|
|
911
911
|
initialClientOffset: r.clientOffset,
|
|
912
912
|
clientOffset: r.clientOffset
|
|
913
913
|
};
|
|
914
|
-
case
|
|
915
|
-
return
|
|
914
|
+
case G:
|
|
915
|
+
return gr(t.clientOffset, r.clientOffset) ? t : mr({}, t, {
|
|
916
916
|
clientOffset: r.clientOffset
|
|
917
917
|
});
|
|
918
|
-
case
|
|
919
|
-
case
|
|
920
|
-
return
|
|
918
|
+
case z:
|
|
919
|
+
case Y:
|
|
920
|
+
return be;
|
|
921
921
|
default:
|
|
922
922
|
return t;
|
|
923
923
|
}
|
|
924
924
|
}
|
|
925
|
-
function
|
|
925
|
+
function yr(t, e, r) {
|
|
926
926
|
return e in t ? Object.defineProperty(t, e, {
|
|
927
927
|
value: r,
|
|
928
928
|
enumerable: !0,
|
|
@@ -930,18 +930,18 @@ function ur(t, e, r) {
|
|
|
930
930
|
writable: !0
|
|
931
931
|
}) : t[e] = r, t;
|
|
932
932
|
}
|
|
933
|
-
function
|
|
933
|
+
function _(t) {
|
|
934
934
|
for (var e = 1; e < arguments.length; e++) {
|
|
935
935
|
var r = arguments[e] != null ? arguments[e] : {}, n = Object.keys(r);
|
|
936
936
|
typeof Object.getOwnPropertySymbols == "function" && (n = n.concat(Object.getOwnPropertySymbols(r).filter(function(i) {
|
|
937
937
|
return Object.getOwnPropertyDescriptor(r, i).enumerable;
|
|
938
938
|
}))), n.forEach(function(i) {
|
|
939
|
-
|
|
939
|
+
yr(t, i, r[i]);
|
|
940
940
|
});
|
|
941
941
|
}
|
|
942
942
|
return t;
|
|
943
943
|
}
|
|
944
|
-
const
|
|
944
|
+
const Dr = {
|
|
945
945
|
itemType: null,
|
|
946
946
|
item: null,
|
|
947
947
|
sourceId: null,
|
|
@@ -950,11 +950,11 @@ const lr = {
|
|
|
950
950
|
didDrop: !1,
|
|
951
951
|
isSourcePublic: null
|
|
952
952
|
};
|
|
953
|
-
function
|
|
953
|
+
function Sr(t = Dr, e) {
|
|
954
954
|
const { payload: r } = e;
|
|
955
955
|
switch (e.type) {
|
|
956
|
-
case
|
|
957
|
-
return
|
|
956
|
+
case $:
|
|
957
|
+
return _({}, t, {
|
|
958
958
|
itemType: r.itemType,
|
|
959
959
|
item: r.item,
|
|
960
960
|
sourceId: r.sourceId,
|
|
@@ -962,26 +962,26 @@ function dr(t = lr, e) {
|
|
|
962
962
|
dropResult: null,
|
|
963
963
|
didDrop: !1
|
|
964
964
|
});
|
|
965
|
-
case
|
|
966
|
-
return
|
|
965
|
+
case ce:
|
|
966
|
+
return _({}, t, {
|
|
967
967
|
isSourcePublic: !0
|
|
968
968
|
});
|
|
969
|
-
case
|
|
970
|
-
return
|
|
969
|
+
case G:
|
|
970
|
+
return _({}, t, {
|
|
971
971
|
targetIds: r.targetIds
|
|
972
972
|
});
|
|
973
|
-
case
|
|
974
|
-
return t.targetIds.indexOf(r.targetId) === -1 ? t :
|
|
975
|
-
targetIds:
|
|
973
|
+
case W:
|
|
974
|
+
return t.targetIds.indexOf(r.targetId) === -1 ? t : _({}, t, {
|
|
975
|
+
targetIds: vt(t.targetIds, r.targetId)
|
|
976
976
|
});
|
|
977
|
-
case
|
|
978
|
-
return
|
|
977
|
+
case Y:
|
|
978
|
+
return _({}, t, {
|
|
979
979
|
dropResult: r.dropResult,
|
|
980
980
|
didDrop: !0,
|
|
981
981
|
targetIds: []
|
|
982
982
|
});
|
|
983
|
-
case
|
|
984
|
-
return
|
|
983
|
+
case z:
|
|
984
|
+
return _({}, t, {
|
|
985
985
|
itemType: null,
|
|
986
986
|
item: null,
|
|
987
987
|
sourceId: null,
|
|
@@ -994,22 +994,22 @@ function dr(t = lr, e) {
|
|
|
994
994
|
return t;
|
|
995
995
|
}
|
|
996
996
|
}
|
|
997
|
-
function
|
|
997
|
+
function br(t = 0, e) {
|
|
998
998
|
switch (e.type) {
|
|
999
|
-
case
|
|
1000
|
-
case
|
|
999
|
+
case le:
|
|
1000
|
+
case de:
|
|
1001
1001
|
return t + 1;
|
|
1002
|
-
case
|
|
1003
|
-
case
|
|
1002
|
+
case ge:
|
|
1003
|
+
case W:
|
|
1004
1004
|
return t - 1;
|
|
1005
1005
|
default:
|
|
1006
1006
|
return t;
|
|
1007
1007
|
}
|
|
1008
1008
|
}
|
|
1009
|
-
function
|
|
1009
|
+
function Or(t = 0) {
|
|
1010
1010
|
return t + 1;
|
|
1011
1011
|
}
|
|
1012
|
-
function
|
|
1012
|
+
function Tr(t, e, r) {
|
|
1013
1013
|
return e in t ? Object.defineProperty(t, e, {
|
|
1014
1014
|
value: r,
|
|
1015
1015
|
enumerable: !0,
|
|
@@ -1017,45 +1017,45 @@ function hr(t, e, r) {
|
|
|
1017
1017
|
writable: !0
|
|
1018
1018
|
}) : t[e] = r, t;
|
|
1019
1019
|
}
|
|
1020
|
-
function
|
|
1020
|
+
function Er(t) {
|
|
1021
1021
|
for (var e = 1; e < arguments.length; e++) {
|
|
1022
1022
|
var r = arguments[e] != null ? arguments[e] : {}, n = Object.keys(r);
|
|
1023
1023
|
typeof Object.getOwnPropertySymbols == "function" && (n = n.concat(Object.getOwnPropertySymbols(r).filter(function(i) {
|
|
1024
1024
|
return Object.getOwnPropertyDescriptor(r, i).enumerable;
|
|
1025
1025
|
}))), n.forEach(function(i) {
|
|
1026
|
-
|
|
1026
|
+
Tr(t, i, r[i]);
|
|
1027
1027
|
});
|
|
1028
1028
|
}
|
|
1029
1029
|
return t;
|
|
1030
1030
|
}
|
|
1031
|
-
function
|
|
1031
|
+
function Ir(t = {}, e) {
|
|
1032
1032
|
return {
|
|
1033
|
-
dirtyHandlerIds:
|
|
1033
|
+
dirtyHandlerIds: hr(t.dirtyHandlerIds, {
|
|
1034
1034
|
type: e.type,
|
|
1035
|
-
payload:
|
|
1036
|
-
prevTargetIds:
|
|
1035
|
+
payload: Er({}, e.payload, {
|
|
1036
|
+
prevTargetIds: mt(t, "dragOperation.targetIds", [])
|
|
1037
1037
|
})
|
|
1038
1038
|
}),
|
|
1039
|
-
dragOffset:
|
|
1040
|
-
refCount:
|
|
1041
|
-
dragOperation:
|
|
1042
|
-
stateId:
|
|
1039
|
+
dragOffset: vr(t.dragOffset, e),
|
|
1040
|
+
refCount: br(t.refCount, e),
|
|
1041
|
+
dragOperation: Sr(t.dragOperation, e),
|
|
1042
|
+
stateId: Or(t.stateId)
|
|
1043
1043
|
};
|
|
1044
1044
|
}
|
|
1045
|
-
function
|
|
1046
|
-
const i =
|
|
1047
|
-
return
|
|
1045
|
+
function Cr(t, e = void 0, r = {}, n = !1) {
|
|
1046
|
+
const i = wr(n), s = new zt(i, new lr(i)), a = new Ft(i, s), o = t(a, e, r);
|
|
1047
|
+
return a.receiveBackend(o), a;
|
|
1048
1048
|
}
|
|
1049
|
-
function
|
|
1049
|
+
function wr(t) {
|
|
1050
1050
|
const e = typeof window < "u" && window.__REDUX_DEVTOOLS_EXTENSION__;
|
|
1051
|
-
return
|
|
1051
|
+
return Me(Ir, t && e && e({
|
|
1052
1052
|
name: "dnd-core",
|
|
1053
1053
|
instanceId: "dnd-core"
|
|
1054
1054
|
}));
|
|
1055
1055
|
}
|
|
1056
|
-
function
|
|
1056
|
+
function Nr(t, e) {
|
|
1057
1057
|
if (t == null) return {};
|
|
1058
|
-
var r =
|
|
1058
|
+
var r = Pr(t, e), n, i;
|
|
1059
1059
|
if (Object.getOwnPropertySymbols) {
|
|
1060
1060
|
var s = Object.getOwnPropertySymbols(t);
|
|
1061
1061
|
for (i = 0; i < s.length; i++)
|
|
@@ -1063,33 +1063,33 @@ function yr(t, e) {
|
|
|
1063
1063
|
}
|
|
1064
1064
|
return r;
|
|
1065
1065
|
}
|
|
1066
|
-
function
|
|
1066
|
+
function Pr(t, e) {
|
|
1067
1067
|
if (t == null) return {};
|
|
1068
1068
|
var r = {}, n = Object.keys(t), i, s;
|
|
1069
1069
|
for (s = 0; s < n.length; s++)
|
|
1070
1070
|
i = n[s], !(e.indexOf(i) >= 0) && (r[i] = t[i]);
|
|
1071
1071
|
return r;
|
|
1072
1072
|
}
|
|
1073
|
-
let
|
|
1074
|
-
const
|
|
1075
|
-
var
|
|
1076
|
-
var { children: r } = e, n =
|
|
1073
|
+
let Oe = 0;
|
|
1074
|
+
const U = Symbol.for("__REACT_DND_CONTEXT_INSTANCE__");
|
|
1075
|
+
var xr = /* @__PURE__ */ rt(function(e) {
|
|
1076
|
+
var { children: r } = e, n = Nr(e, [
|
|
1077
1077
|
"children"
|
|
1078
1078
|
]);
|
|
1079
|
-
const [i, s] =
|
|
1080
|
-
return
|
|
1079
|
+
const [i, s] = Rr(n);
|
|
1080
|
+
return q(() => {
|
|
1081
1081
|
if (s) {
|
|
1082
|
-
const
|
|
1083
|
-
return ++
|
|
1084
|
-
--
|
|
1082
|
+
const a = je();
|
|
1083
|
+
return ++Oe, () => {
|
|
1084
|
+
--Oe === 0 && (a[U] = null);
|
|
1085
1085
|
};
|
|
1086
1086
|
}
|
|
1087
|
-
}, []), /* @__PURE__ */
|
|
1087
|
+
}, []), /* @__PURE__ */ y(Re.Provider, {
|
|
1088
1088
|
value: i,
|
|
1089
1089
|
children: r
|
|
1090
1090
|
});
|
|
1091
1091
|
});
|
|
1092
|
-
function
|
|
1092
|
+
function Rr(t) {
|
|
1093
1093
|
if ("manager" in t)
|
|
1094
1094
|
return [
|
|
1095
1095
|
{
|
|
@@ -1097,24 +1097,24 @@ function Tr(t) {
|
|
|
1097
1097
|
},
|
|
1098
1098
|
!1
|
|
1099
1099
|
];
|
|
1100
|
-
const e =
|
|
1100
|
+
const e = Mr(t.backend, t.context, t.options, t.debugMode), r = !t.context;
|
|
1101
1101
|
return [
|
|
1102
1102
|
e,
|
|
1103
1103
|
r
|
|
1104
1104
|
];
|
|
1105
1105
|
}
|
|
1106
|
-
function
|
|
1106
|
+
function Mr(t, e = je(), r, n) {
|
|
1107
1107
|
const i = e;
|
|
1108
|
-
return i[
|
|
1109
|
-
dragDropManager:
|
|
1110
|
-
}), i[
|
|
1108
|
+
return i[U] || (i[U] = {
|
|
1109
|
+
dragDropManager: Cr(t, e, r, n)
|
|
1110
|
+
}), i[U];
|
|
1111
1111
|
}
|
|
1112
|
-
function
|
|
1112
|
+
function je() {
|
|
1113
1113
|
return typeof global < "u" ? global : window;
|
|
1114
1114
|
}
|
|
1115
|
-
var
|
|
1116
|
-
function
|
|
1117
|
-
return
|
|
1115
|
+
var K, Te;
|
|
1116
|
+
function _r() {
|
|
1117
|
+
return Te || (Te = 1, K = function t(e, r) {
|
|
1118
1118
|
if (e === r) return !0;
|
|
1119
1119
|
if (e && r && typeof e == "object" && typeof r == "object") {
|
|
1120
1120
|
if (e.constructor !== r.constructor) return !1;
|
|
@@ -1132,40 +1132,40 @@ function Er() {
|
|
|
1132
1132
|
for (i = n; i-- !== 0; )
|
|
1133
1133
|
if (!Object.prototype.hasOwnProperty.call(r, s[i])) return !1;
|
|
1134
1134
|
for (i = n; i-- !== 0; ) {
|
|
1135
|
-
var
|
|
1136
|
-
if (!t(e[
|
|
1135
|
+
var a = s[i];
|
|
1136
|
+
if (!t(e[a], r[a])) return !1;
|
|
1137
1137
|
}
|
|
1138
1138
|
return !0;
|
|
1139
1139
|
}
|
|
1140
1140
|
return e !== e && r !== r;
|
|
1141
|
-
}),
|
|
1141
|
+
}), K;
|
|
1142
1142
|
}
|
|
1143
|
-
var
|
|
1144
|
-
const
|
|
1145
|
-
function
|
|
1146
|
-
const [n, i] =
|
|
1143
|
+
var kr = _r();
|
|
1144
|
+
const Lr = /* @__PURE__ */ ut(kr), R = typeof window < "u" ? nt : q;
|
|
1145
|
+
function Ar(t, e, r) {
|
|
1146
|
+
const [n, i] = Ne(
|
|
1147
1147
|
() => e(t)
|
|
1148
|
-
), s =
|
|
1149
|
-
const
|
|
1150
|
-
|
|
1148
|
+
), s = B(() => {
|
|
1149
|
+
const a = e(t);
|
|
1150
|
+
Lr(n, a) || (i(a), r && r());
|
|
1151
1151
|
}, [
|
|
1152
1152
|
n,
|
|
1153
1153
|
t,
|
|
1154
1154
|
r
|
|
1155
1155
|
]);
|
|
1156
|
-
return
|
|
1156
|
+
return R(s), [
|
|
1157
1157
|
n,
|
|
1158
1158
|
s
|
|
1159
1159
|
];
|
|
1160
1160
|
}
|
|
1161
|
-
function
|
|
1162
|
-
const [n, i] =
|
|
1163
|
-
return
|
|
1164
|
-
const
|
|
1165
|
-
if (
|
|
1161
|
+
function Hr(t, e, r) {
|
|
1162
|
+
const [n, i] = Ar(t, e, r);
|
|
1163
|
+
return R(function() {
|
|
1164
|
+
const a = t.getHandlerId();
|
|
1165
|
+
if (a != null)
|
|
1166
1166
|
return t.subscribeToStateChange(i, {
|
|
1167
1167
|
handlerIds: [
|
|
1168
|
-
|
|
1168
|
+
a
|
|
1169
1169
|
]
|
|
1170
1170
|
});
|
|
1171
1171
|
}, [
|
|
@@ -1173,35 +1173,35 @@ function Nr(t, e, r) {
|
|
|
1173
1173
|
i
|
|
1174
1174
|
]), n;
|
|
1175
1175
|
}
|
|
1176
|
-
function
|
|
1177
|
-
return
|
|
1176
|
+
function Ve(t, e, r) {
|
|
1177
|
+
return Hr(
|
|
1178
1178
|
e,
|
|
1179
1179
|
t || (() => ({})),
|
|
1180
1180
|
() => r.reconnect()
|
|
1181
1181
|
);
|
|
1182
1182
|
}
|
|
1183
|
-
function
|
|
1183
|
+
function Be(t, e) {
|
|
1184
1184
|
const r = [];
|
|
1185
|
-
return typeof t != "function" && r.push(t),
|
|
1185
|
+
return typeof t != "function" && r.push(t), C(() => typeof t == "function" ? t() : t, r);
|
|
1186
1186
|
}
|
|
1187
|
-
function
|
|
1188
|
-
return
|
|
1187
|
+
function jr(t) {
|
|
1188
|
+
return C(
|
|
1189
1189
|
() => t.hooks.dragSource(),
|
|
1190
1190
|
[
|
|
1191
1191
|
t
|
|
1192
1192
|
]
|
|
1193
1193
|
);
|
|
1194
1194
|
}
|
|
1195
|
-
function
|
|
1196
|
-
return
|
|
1195
|
+
function Vr(t) {
|
|
1196
|
+
return C(
|
|
1197
1197
|
() => t.hooks.dragPreview(),
|
|
1198
1198
|
[
|
|
1199
1199
|
t
|
|
1200
1200
|
]
|
|
1201
1201
|
);
|
|
1202
1202
|
}
|
|
1203
|
-
let
|
|
1204
|
-
class
|
|
1203
|
+
let Z = !1, Q = !1;
|
|
1204
|
+
class Br {
|
|
1205
1205
|
receiveHandlerId(e) {
|
|
1206
1206
|
this.sourceId = e;
|
|
1207
1207
|
}
|
|
@@ -1209,21 +1209,21 @@ class Rr {
|
|
|
1209
1209
|
return this.sourceId;
|
|
1210
1210
|
}
|
|
1211
1211
|
canDrag() {
|
|
1212
|
-
|
|
1212
|
+
g(!Z, "You may not call monitor.canDrag() inside your canDrag() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");
|
|
1213
1213
|
try {
|
|
1214
|
-
return
|
|
1214
|
+
return Z = !0, this.internalMonitor.canDragSource(this.sourceId);
|
|
1215
1215
|
} finally {
|
|
1216
|
-
|
|
1216
|
+
Z = !1;
|
|
1217
1217
|
}
|
|
1218
1218
|
}
|
|
1219
1219
|
isDragging() {
|
|
1220
1220
|
if (!this.sourceId)
|
|
1221
1221
|
return !1;
|
|
1222
|
-
|
|
1222
|
+
g(!Q, "You may not call monitor.isDragging() inside your isDragging() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");
|
|
1223
1223
|
try {
|
|
1224
|
-
return
|
|
1224
|
+
return Q = !0, this.internalMonitor.isDraggingSource(this.sourceId);
|
|
1225
1225
|
} finally {
|
|
1226
|
-
|
|
1226
|
+
Q = !1;
|
|
1227
1227
|
}
|
|
1228
1228
|
}
|
|
1229
1229
|
subscribeToStateChange(e, r) {
|
|
@@ -1284,8 +1284,8 @@ class Rr {
|
|
|
1284
1284
|
this.sourceId = null, this.internalMonitor = e.getMonitor();
|
|
1285
1285
|
}
|
|
1286
1286
|
}
|
|
1287
|
-
let
|
|
1288
|
-
class
|
|
1287
|
+
let J = !1;
|
|
1288
|
+
class Ur {
|
|
1289
1289
|
receiveHandlerId(e) {
|
|
1290
1290
|
this.targetId = e;
|
|
1291
1291
|
}
|
|
@@ -1298,11 +1298,11 @@ class Mr {
|
|
|
1298
1298
|
canDrop() {
|
|
1299
1299
|
if (!this.targetId)
|
|
1300
1300
|
return !1;
|
|
1301
|
-
|
|
1301
|
+
g(!J, "You may not call monitor.canDrop() inside your canDrop() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target-monitor");
|
|
1302
1302
|
try {
|
|
1303
|
-
return
|
|
1303
|
+
return J = !0, this.internalMonitor.canDropOnTarget(this.targetId);
|
|
1304
1304
|
} finally {
|
|
1305
|
-
|
|
1305
|
+
J = !1;
|
|
1306
1306
|
}
|
|
1307
1307
|
}
|
|
1308
1308
|
isOver(e) {
|
|
@@ -1339,21 +1339,21 @@ class Mr {
|
|
|
1339
1339
|
this.targetId = null, this.internalMonitor = e.getMonitor();
|
|
1340
1340
|
}
|
|
1341
1341
|
}
|
|
1342
|
-
function
|
|
1342
|
+
function Fr(t, e, r) {
|
|
1343
1343
|
const n = r.getRegistry(), i = n.addTarget(t, e);
|
|
1344
1344
|
return [
|
|
1345
1345
|
i,
|
|
1346
1346
|
() => n.removeTarget(i)
|
|
1347
1347
|
];
|
|
1348
1348
|
}
|
|
1349
|
-
function
|
|
1349
|
+
function qr(t, e, r) {
|
|
1350
1350
|
const n = r.getRegistry(), i = n.addSource(t, e);
|
|
1351
1351
|
return [
|
|
1352
1352
|
i,
|
|
1353
1353
|
() => n.removeSource(i)
|
|
1354
1354
|
];
|
|
1355
1355
|
}
|
|
1356
|
-
function
|
|
1356
|
+
function ie(t, e, r, n) {
|
|
1357
1357
|
let i;
|
|
1358
1358
|
if (i !== void 0)
|
|
1359
1359
|
return !!i;
|
|
@@ -1361,68 +1361,68 @@ function Q(t, e, r, n) {
|
|
|
1361
1361
|
return !0;
|
|
1362
1362
|
if (typeof t != "object" || !t || typeof e != "object" || !e)
|
|
1363
1363
|
return !1;
|
|
1364
|
-
const s = Object.keys(t),
|
|
1365
|
-
if (s.length !==
|
|
1364
|
+
const s = Object.keys(t), a = Object.keys(e);
|
|
1365
|
+
if (s.length !== a.length)
|
|
1366
1366
|
return !1;
|
|
1367
|
-
const
|
|
1367
|
+
const o = Object.prototype.hasOwnProperty.bind(e);
|
|
1368
1368
|
for (let c = 0; c < s.length; c++) {
|
|
1369
|
-
const
|
|
1370
|
-
if (!
|
|
1369
|
+
const l = s[c];
|
|
1370
|
+
if (!o(l))
|
|
1371
1371
|
return !1;
|
|
1372
|
-
const
|
|
1373
|
-
if (i = void 0, i === !1 || i === void 0 &&
|
|
1372
|
+
const p = t[l], v = e[l];
|
|
1373
|
+
if (i = void 0, i === !1 || i === void 0 && p !== v)
|
|
1374
1374
|
return !1;
|
|
1375
1375
|
}
|
|
1376
1376
|
return !0;
|
|
1377
1377
|
}
|
|
1378
|
-
function
|
|
1378
|
+
function se(t) {
|
|
1379
1379
|
return (
|
|
1380
1380
|
// eslint-disable-next-line no-prototype-builtins
|
|
1381
1381
|
t !== null && typeof t == "object" && Object.prototype.hasOwnProperty.call(t, "current")
|
|
1382
1382
|
);
|
|
1383
1383
|
}
|
|
1384
|
-
function
|
|
1384
|
+
function $r(t) {
|
|
1385
1385
|
if (typeof t.type == "string")
|
|
1386
1386
|
return;
|
|
1387
1387
|
const e = t.type.displayName || t.type.name || "the component";
|
|
1388
1388
|
throw new Error(`Only native element nodes can now be passed to React DnD connectors.You can either wrap ${e} into a <div>, or turn it into a drag source or a drop target itself.`);
|
|
1389
1389
|
}
|
|
1390
|
-
function
|
|
1390
|
+
function Gr(t) {
|
|
1391
1391
|
return (e = null, r = null) => {
|
|
1392
|
-
if (!
|
|
1392
|
+
if (!it(e)) {
|
|
1393
1393
|
const s = e;
|
|
1394
1394
|
return t(s, r), s;
|
|
1395
1395
|
}
|
|
1396
1396
|
const n = e;
|
|
1397
|
-
return
|
|
1397
|
+
return $r(n), Yr(n, r ? (s) => t(s, r) : t);
|
|
1398
1398
|
};
|
|
1399
1399
|
}
|
|
1400
|
-
function
|
|
1400
|
+
function Ue(t) {
|
|
1401
1401
|
const e = {};
|
|
1402
1402
|
return Object.keys(t).forEach((r) => {
|
|
1403
1403
|
const n = t[r];
|
|
1404
1404
|
if (r.endsWith("Ref"))
|
|
1405
1405
|
e[r] = t[r];
|
|
1406
1406
|
else {
|
|
1407
|
-
const i =
|
|
1407
|
+
const i = Gr(n);
|
|
1408
1408
|
e[r] = () => i;
|
|
1409
1409
|
}
|
|
1410
1410
|
}), e;
|
|
1411
1411
|
}
|
|
1412
|
-
function
|
|
1412
|
+
function Ee(t, e) {
|
|
1413
1413
|
typeof t == "function" ? t(e) : t.current = e;
|
|
1414
1414
|
}
|
|
1415
|
-
function
|
|
1415
|
+
function Yr(t, e) {
|
|
1416
1416
|
const r = t.ref;
|
|
1417
|
-
return
|
|
1417
|
+
return g(typeof r != "string", "Cannot connect React DnD to an element with an existing string ref. Please convert it to use a callback ref instead, or wrap it into a <span> or <div>. Read more: https://reactjs.org/docs/refs-and-the-dom.html#callback-refs"), r ? fe(t, {
|
|
1418
1418
|
ref: (n) => {
|
|
1419
|
-
|
|
1419
|
+
Ee(r, n), Ee(e, n);
|
|
1420
1420
|
}
|
|
1421
|
-
}) :
|
|
1421
|
+
}) : fe(t, {
|
|
1422
1422
|
ref: e
|
|
1423
1423
|
});
|
|
1424
1424
|
}
|
|
1425
|
-
class
|
|
1425
|
+
class zr {
|
|
1426
1426
|
receiveHandlerId(e) {
|
|
1427
1427
|
this.handlerId !== e && (this.handlerId = e, this.reconnect());
|
|
1428
1428
|
}
|
|
@@ -1469,10 +1469,10 @@ class jr {
|
|
|
1469
1469
|
return this.lastConnectedDragPreview !== this.dragPreview;
|
|
1470
1470
|
}
|
|
1471
1471
|
didDragSourceOptionsChange() {
|
|
1472
|
-
return !
|
|
1472
|
+
return !ie(this.lastConnectedDragSourceOptions, this.dragSourceOptions);
|
|
1473
1473
|
}
|
|
1474
1474
|
didDragPreviewOptionsChange() {
|
|
1475
|
-
return !
|
|
1475
|
+
return !ie(this.lastConnectedDragPreviewOptions, this.dragPreviewOptions);
|
|
1476
1476
|
}
|
|
1477
1477
|
disconnectDragSource() {
|
|
1478
1478
|
this.dragSourceUnsubscribe && (this.dragSourceUnsubscribe(), this.dragSourceUnsubscribe = void 0);
|
|
@@ -1493,17 +1493,17 @@ class jr {
|
|
|
1493
1493
|
this.dragPreviewNode = null, this.dragPreviewRef = null;
|
|
1494
1494
|
}
|
|
1495
1495
|
constructor(e) {
|
|
1496
|
-
this.hooks =
|
|
1496
|
+
this.hooks = Ue({
|
|
1497
1497
|
dragSource: (r, n) => {
|
|
1498
|
-
this.clearDragSource(), this.dragSourceOptions = n || null,
|
|
1498
|
+
this.clearDragSource(), this.dragSourceOptions = n || null, se(r) ? this.dragSourceRef = r : this.dragSourceNode = r, this.reconnectDragSource();
|
|
1499
1499
|
},
|
|
1500
1500
|
dragPreview: (r, n) => {
|
|
1501
|
-
this.clearDragPreview(), this.dragPreviewOptions = n || null,
|
|
1501
|
+
this.clearDragPreview(), this.dragPreviewOptions = n || null, se(r) ? this.dragPreviewRef = r : this.dragPreviewNode = r, this.reconnectDragPreview();
|
|
1502
1502
|
}
|
|
1503
1503
|
}), this.handlerId = null, this.dragSourceRef = null, this.dragSourceOptionsInternal = null, this.dragPreviewRef = null, this.dragPreviewOptionsInternal = null, this.lastConnectedHandlerId = null, this.lastConnectedDragSource = null, this.lastConnectedDragSourceOptions = null, this.lastConnectedDragPreview = null, this.lastConnectedDragPreviewOptions = null, this.backend = e;
|
|
1504
1504
|
}
|
|
1505
1505
|
}
|
|
1506
|
-
class
|
|
1506
|
+
class Wr {
|
|
1507
1507
|
get connectTarget() {
|
|
1508
1508
|
return this.dropTarget;
|
|
1509
1509
|
}
|
|
@@ -1535,7 +1535,7 @@ class Br {
|
|
|
1535
1535
|
return this.lastConnectedDropTarget !== this.dropTarget;
|
|
1536
1536
|
}
|
|
1537
1537
|
didOptionsChange() {
|
|
1538
|
-
return !
|
|
1538
|
+
return !ie(this.lastConnectedDropTargetOptions, this.dropTargetOptions);
|
|
1539
1539
|
}
|
|
1540
1540
|
disconnectDropTarget() {
|
|
1541
1541
|
this.unsubscribeDropTarget && (this.unsubscribeDropTarget(), this.unsubscribeDropTarget = void 0);
|
|
@@ -1547,42 +1547,42 @@ class Br {
|
|
|
1547
1547
|
this.dropTargetRef = null, this.dropTargetNode = null;
|
|
1548
1548
|
}
|
|
1549
1549
|
constructor(e) {
|
|
1550
|
-
this.hooks =
|
|
1550
|
+
this.hooks = Ue({
|
|
1551
1551
|
dropTarget: (r, n) => {
|
|
1552
|
-
this.clearDropTarget(), this.dropTargetOptions = n,
|
|
1552
|
+
this.clearDropTarget(), this.dropTargetOptions = n, se(r) ? this.dropTargetRef = r : this.dropTargetNode = r, this.reconnect();
|
|
1553
1553
|
}
|
|
1554
1554
|
}), this.handlerId = null, this.dropTargetRef = null, this.dropTargetOptionsInternal = null, this.lastConnectedHandlerId = null, this.lastConnectedDropTarget = null, this.lastConnectedDropTargetOptions = null, this.backend = e;
|
|
1555
1555
|
}
|
|
1556
1556
|
}
|
|
1557
|
-
function
|
|
1558
|
-
const { dragDropManager: t } =
|
|
1559
|
-
return
|
|
1557
|
+
function k() {
|
|
1558
|
+
const { dragDropManager: t } = st(Re);
|
|
1559
|
+
return g(t != null, "Expected drag drop context"), t;
|
|
1560
1560
|
}
|
|
1561
|
-
function
|
|
1562
|
-
const r =
|
|
1563
|
-
() => new
|
|
1561
|
+
function Xr(t, e) {
|
|
1562
|
+
const r = k(), n = C(
|
|
1563
|
+
() => new zr(r.getBackend()),
|
|
1564
1564
|
[
|
|
1565
1565
|
r
|
|
1566
1566
|
]
|
|
1567
1567
|
);
|
|
1568
|
-
return
|
|
1568
|
+
return R(() => (n.dragSourceOptions = t || null, n.reconnect(), () => n.disconnectDragSource()), [
|
|
1569
1569
|
n,
|
|
1570
1570
|
t
|
|
1571
|
-
]),
|
|
1571
|
+
]), R(() => (n.dragPreviewOptions = e || null, n.reconnect(), () => n.disconnectDragPreview()), [
|
|
1572
1572
|
n,
|
|
1573
1573
|
e
|
|
1574
1574
|
]), n;
|
|
1575
1575
|
}
|
|
1576
|
-
function
|
|
1577
|
-
const t =
|
|
1578
|
-
return
|
|
1579
|
-
() => new
|
|
1576
|
+
function Kr() {
|
|
1577
|
+
const t = k();
|
|
1578
|
+
return C(
|
|
1579
|
+
() => new Br(t),
|
|
1580
1580
|
[
|
|
1581
1581
|
t
|
|
1582
1582
|
]
|
|
1583
1583
|
);
|
|
1584
1584
|
}
|
|
1585
|
-
class
|
|
1585
|
+
class Zr {
|
|
1586
1586
|
beginDrag() {
|
|
1587
1587
|
const e = this.spec, r = this.monitor;
|
|
1588
1588
|
let n = null;
|
|
@@ -1604,34 +1604,34 @@ class Fr {
|
|
|
1604
1604
|
this.spec = e, this.monitor = r, this.connector = n;
|
|
1605
1605
|
}
|
|
1606
1606
|
}
|
|
1607
|
-
function
|
|
1608
|
-
const n =
|
|
1609
|
-
() => new
|
|
1607
|
+
function Qr(t, e, r) {
|
|
1608
|
+
const n = C(
|
|
1609
|
+
() => new Zr(t, e, r),
|
|
1610
1610
|
[
|
|
1611
1611
|
e,
|
|
1612
1612
|
r
|
|
1613
1613
|
]
|
|
1614
1614
|
);
|
|
1615
|
-
return
|
|
1615
|
+
return q(() => {
|
|
1616
1616
|
n.spec = t;
|
|
1617
1617
|
}, [
|
|
1618
1618
|
t
|
|
1619
1619
|
]), n;
|
|
1620
1620
|
}
|
|
1621
|
-
function
|
|
1622
|
-
return
|
|
1621
|
+
function Jr(t) {
|
|
1622
|
+
return C(() => {
|
|
1623
1623
|
const e = t.type;
|
|
1624
|
-
return
|
|
1624
|
+
return g(e != null, "spec.type must be defined"), e;
|
|
1625
1625
|
}, [
|
|
1626
1626
|
t
|
|
1627
1627
|
]);
|
|
1628
1628
|
}
|
|
1629
|
-
function
|
|
1630
|
-
const n =
|
|
1631
|
-
|
|
1629
|
+
function en(t, e, r) {
|
|
1630
|
+
const n = k(), i = Qr(t, e, r), s = Jr(t);
|
|
1631
|
+
R(function() {
|
|
1632
1632
|
if (s != null) {
|
|
1633
|
-
const [
|
|
1634
|
-
return e.receiveHandlerId(
|
|
1633
|
+
const [o, c] = qr(s, i, n);
|
|
1634
|
+
return e.receiveHandlerId(o), r.receiveHandlerId(o), c;
|
|
1635
1635
|
}
|
|
1636
1636
|
}, [
|
|
1637
1637
|
n,
|
|
@@ -1641,53 +1641,53 @@ function Gr(t, e, r) {
|
|
|
1641
1641
|
s
|
|
1642
1642
|
]);
|
|
1643
1643
|
}
|
|
1644
|
-
function
|
|
1645
|
-
const r =
|
|
1646
|
-
|
|
1647
|
-
const n =
|
|
1648
|
-
return
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1644
|
+
function Fe(t, e) {
|
|
1645
|
+
const r = Be(t);
|
|
1646
|
+
g(!r.begin, "useDrag::spec.begin was deprecated in v14. Replace spec.begin() with spec.item(). (see more here - https://react-dnd.github.io/react-dnd/docs/api/use-drag)");
|
|
1647
|
+
const n = Kr(), i = Xr(r.options, r.previewOptions);
|
|
1648
|
+
return en(r, n, i), [
|
|
1649
|
+
Ve(r.collect, n, i),
|
|
1650
|
+
jr(i),
|
|
1651
|
+
Vr(i)
|
|
1652
1652
|
];
|
|
1653
1653
|
}
|
|
1654
|
-
function
|
|
1655
|
-
return
|
|
1654
|
+
function tn(t) {
|
|
1655
|
+
return C(
|
|
1656
1656
|
() => t.hooks.dropTarget(),
|
|
1657
1657
|
[
|
|
1658
1658
|
t
|
|
1659
1659
|
]
|
|
1660
1660
|
);
|
|
1661
1661
|
}
|
|
1662
|
-
function
|
|
1663
|
-
const e =
|
|
1664
|
-
() => new
|
|
1662
|
+
function rn(t) {
|
|
1663
|
+
const e = k(), r = C(
|
|
1664
|
+
() => new Wr(e.getBackend()),
|
|
1665
1665
|
[
|
|
1666
1666
|
e
|
|
1667
1667
|
]
|
|
1668
1668
|
);
|
|
1669
|
-
return
|
|
1669
|
+
return R(() => (r.dropTargetOptions = t || null, r.reconnect(), () => r.disconnectDropTarget()), [
|
|
1670
1670
|
t
|
|
1671
1671
|
]), r;
|
|
1672
1672
|
}
|
|
1673
|
-
function
|
|
1674
|
-
const t =
|
|
1675
|
-
return
|
|
1676
|
-
() => new
|
|
1673
|
+
function nn() {
|
|
1674
|
+
const t = k();
|
|
1675
|
+
return C(
|
|
1676
|
+
() => new Ur(t),
|
|
1677
1677
|
[
|
|
1678
1678
|
t
|
|
1679
1679
|
]
|
|
1680
1680
|
);
|
|
1681
1681
|
}
|
|
1682
|
-
function
|
|
1682
|
+
function sn(t) {
|
|
1683
1683
|
const { accept: e } = t;
|
|
1684
|
-
return
|
|
1684
|
+
return C(() => (g(t.accept != null, "accept must be defined"), Array.isArray(e) ? e : [
|
|
1685
1685
|
e
|
|
1686
1686
|
]), [
|
|
1687
1687
|
e
|
|
1688
1688
|
]);
|
|
1689
1689
|
}
|
|
1690
|
-
class
|
|
1690
|
+
class on {
|
|
1691
1691
|
canDrop() {
|
|
1692
1692
|
const e = this.spec, r = this.monitor;
|
|
1693
1693
|
return e.canDrop ? e.canDrop(r.getItem(), r) : !0;
|
|
@@ -1705,51 +1705,51 @@ class Qr {
|
|
|
1705
1705
|
this.spec = e, this.monitor = r;
|
|
1706
1706
|
}
|
|
1707
1707
|
}
|
|
1708
|
-
function
|
|
1709
|
-
const r =
|
|
1710
|
-
() => new
|
|
1708
|
+
function an(t, e) {
|
|
1709
|
+
const r = C(
|
|
1710
|
+
() => new on(t, e),
|
|
1711
1711
|
[
|
|
1712
1712
|
e
|
|
1713
1713
|
]
|
|
1714
1714
|
);
|
|
1715
|
-
return
|
|
1715
|
+
return q(() => {
|
|
1716
1716
|
r.spec = t;
|
|
1717
1717
|
}, [
|
|
1718
1718
|
t
|
|
1719
1719
|
]), r;
|
|
1720
1720
|
}
|
|
1721
|
-
function
|
|
1722
|
-
const n =
|
|
1723
|
-
|
|
1724
|
-
const [
|
|
1725
|
-
return e.receiveHandlerId(
|
|
1721
|
+
function cn(t, e, r) {
|
|
1722
|
+
const n = k(), i = an(t, e), s = sn(t);
|
|
1723
|
+
R(function() {
|
|
1724
|
+
const [o, c] = Fr(s, i, n);
|
|
1725
|
+
return e.receiveHandlerId(o), r.receiveHandlerId(o), c;
|
|
1726
1726
|
}, [
|
|
1727
1727
|
n,
|
|
1728
1728
|
e,
|
|
1729
1729
|
i,
|
|
1730
1730
|
r,
|
|
1731
1731
|
s.map(
|
|
1732
|
-
(
|
|
1732
|
+
(a) => a.toString()
|
|
1733
1733
|
).join("|")
|
|
1734
1734
|
]);
|
|
1735
1735
|
}
|
|
1736
|
-
function
|
|
1737
|
-
const r =
|
|
1738
|
-
return
|
|
1739
|
-
|
|
1740
|
-
|
|
1736
|
+
function qe(t, e) {
|
|
1737
|
+
const r = Be(t), n = nn(), i = rn(r.options);
|
|
1738
|
+
return cn(r, n, i), [
|
|
1739
|
+
Ve(r.collect, n, i),
|
|
1740
|
+
tn(i)
|
|
1741
1741
|
];
|
|
1742
1742
|
}
|
|
1743
|
-
function
|
|
1743
|
+
function $e(t) {
|
|
1744
1744
|
let e = null;
|
|
1745
1745
|
return () => (e == null && (e = t()), e);
|
|
1746
1746
|
}
|
|
1747
|
-
function
|
|
1747
|
+
function un(t, e) {
|
|
1748
1748
|
return t.filter(
|
|
1749
1749
|
(r) => r !== e
|
|
1750
1750
|
);
|
|
1751
1751
|
}
|
|
1752
|
-
function
|
|
1752
|
+
function ln(t, e) {
|
|
1753
1753
|
const r = /* @__PURE__ */ new Set(), n = (s) => r.add(s);
|
|
1754
1754
|
t.forEach(n), e.forEach(n);
|
|
1755
1755
|
const i = [];
|
|
@@ -1757,16 +1757,16 @@ function rn(t, e) {
|
|
|
1757
1757
|
(s) => i.push(s)
|
|
1758
1758
|
), i;
|
|
1759
1759
|
}
|
|
1760
|
-
class
|
|
1760
|
+
class dn {
|
|
1761
1761
|
enter(e) {
|
|
1762
1762
|
const r = this.entered.length, n = (i) => this.isNodeInDocument(i) && (!i.contains || i.contains(e));
|
|
1763
|
-
return this.entered =
|
|
1763
|
+
return this.entered = ln(this.entered.filter(n), [
|
|
1764
1764
|
e
|
|
1765
1765
|
]), r === 0 && this.entered.length > 0;
|
|
1766
1766
|
}
|
|
1767
1767
|
leave(e) {
|
|
1768
1768
|
const r = this.entered.length;
|
|
1769
|
-
return this.entered =
|
|
1769
|
+
return this.entered = un(this.entered.filter(this.isNodeInDocument), e), r > 0 && this.entered.length === 0;
|
|
1770
1770
|
}
|
|
1771
1771
|
reset() {
|
|
1772
1772
|
this.entered = [];
|
|
@@ -1775,7 +1775,7 @@ class nn {
|
|
|
1775
1775
|
this.entered = [], this.isNodeInDocument = e;
|
|
1776
1776
|
}
|
|
1777
1777
|
}
|
|
1778
|
-
class
|
|
1778
|
+
class gn {
|
|
1779
1779
|
initializeExposedProperties() {
|
|
1780
1780
|
Object.keys(this.config.exposeProperties).forEach((e) => {
|
|
1781
1781
|
Object.defineProperty(this.item, e, {
|
|
@@ -1815,22 +1815,22 @@ class sn {
|
|
|
1815
1815
|
this.config = e, this.item = {}, this.initializeExposedProperties();
|
|
1816
1816
|
}
|
|
1817
1817
|
}
|
|
1818
|
-
const
|
|
1818
|
+
const Ge = "__NATIVE_FILE__", Ye = "__NATIVE_URL__", ze = "__NATIVE_TEXT__", We = "__NATIVE_HTML__", Ie = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1819
1819
|
__proto__: null,
|
|
1820
|
-
FILE:
|
|
1821
|
-
HTML:
|
|
1822
|
-
TEXT:
|
|
1823
|
-
URL:
|
|
1820
|
+
FILE: Ge,
|
|
1821
|
+
HTML: We,
|
|
1822
|
+
TEXT: ze,
|
|
1823
|
+
URL: Ye
|
|
1824
1824
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
1825
|
-
function
|
|
1825
|
+
function ee(t, e, r) {
|
|
1826
1826
|
const n = e.reduce(
|
|
1827
1827
|
(i, s) => i || t.getData(s),
|
|
1828
1828
|
""
|
|
1829
1829
|
);
|
|
1830
1830
|
return n ?? r;
|
|
1831
1831
|
}
|
|
1832
|
-
const
|
|
1833
|
-
[
|
|
1832
|
+
const oe = {
|
|
1833
|
+
[Ge]: {
|
|
1834
1834
|
exposeProperties: {
|
|
1835
1835
|
files: (t) => Array.prototype.slice.call(t.files),
|
|
1836
1836
|
items: (t) => t.items,
|
|
@@ -1840,9 +1840,9 @@ const J = {
|
|
|
1840
1840
|
"Files"
|
|
1841
1841
|
]
|
|
1842
1842
|
},
|
|
1843
|
-
[
|
|
1843
|
+
[We]: {
|
|
1844
1844
|
exposeProperties: {
|
|
1845
|
-
html: (t, e) =>
|
|
1845
|
+
html: (t, e) => ee(t, e, ""),
|
|
1846
1846
|
dataTransfer: (t) => t
|
|
1847
1847
|
},
|
|
1848
1848
|
matchesTypes: [
|
|
@@ -1850,9 +1850,9 @@ const J = {
|
|
|
1850
1850
|
"text/html"
|
|
1851
1851
|
]
|
|
1852
1852
|
},
|
|
1853
|
-
[
|
|
1853
|
+
[Ye]: {
|
|
1854
1854
|
exposeProperties: {
|
|
1855
|
-
urls: (t, e) =>
|
|
1855
|
+
urls: (t, e) => ee(t, e, "").split(`
|
|
1856
1856
|
`),
|
|
1857
1857
|
dataTransfer: (t) => t
|
|
1858
1858
|
},
|
|
@@ -1861,9 +1861,9 @@ const J = {
|
|
|
1861
1861
|
"text/uri-list"
|
|
1862
1862
|
]
|
|
1863
1863
|
},
|
|
1864
|
-
[
|
|
1864
|
+
[ze]: {
|
|
1865
1865
|
exposeProperties: {
|
|
1866
|
-
text: (t, e) =>
|
|
1866
|
+
text: (t, e) => ee(t, e, ""),
|
|
1867
1867
|
dataTransfer: (t) => t
|
|
1868
1868
|
},
|
|
1869
1869
|
matchesTypes: [
|
|
@@ -1872,49 +1872,49 @@ const J = {
|
|
|
1872
1872
|
]
|
|
1873
1873
|
}
|
|
1874
1874
|
};
|
|
1875
|
-
function
|
|
1876
|
-
const r =
|
|
1875
|
+
function fn(t, e) {
|
|
1876
|
+
const r = oe[t];
|
|
1877
1877
|
if (!r)
|
|
1878
1878
|
throw new Error(`native type ${t} has no configuration`);
|
|
1879
|
-
const n = new
|
|
1879
|
+
const n = new gn(r);
|
|
1880
1880
|
return n.loadDataTransfer(e), n;
|
|
1881
1881
|
}
|
|
1882
|
-
function
|
|
1882
|
+
function te(t) {
|
|
1883
1883
|
if (!t)
|
|
1884
1884
|
return null;
|
|
1885
1885
|
const e = Array.prototype.slice.call(t.types || []);
|
|
1886
|
-
return Object.keys(
|
|
1887
|
-
const n =
|
|
1886
|
+
return Object.keys(oe).filter((r) => {
|
|
1887
|
+
const n = oe[r];
|
|
1888
1888
|
return n?.matchesTypes ? n.matchesTypes.some(
|
|
1889
1889
|
(i) => e.indexOf(i) > -1
|
|
1890
1890
|
) : !1;
|
|
1891
1891
|
})[0] || null;
|
|
1892
1892
|
}
|
|
1893
|
-
const
|
|
1893
|
+
const hn = $e(
|
|
1894
1894
|
() => /firefox/i.test(navigator.userAgent)
|
|
1895
|
-
),
|
|
1895
|
+
), Xe = $e(
|
|
1896
1896
|
() => !!window.safari
|
|
1897
1897
|
);
|
|
1898
|
-
class
|
|
1898
|
+
class Ce {
|
|
1899
1899
|
interpolate(e) {
|
|
1900
|
-
const { xs: r, ys: n, c1s: i, c2s: s, c3s:
|
|
1901
|
-
let
|
|
1902
|
-
if (e === r[
|
|
1903
|
-
return n[
|
|
1904
|
-
let c = 0,
|
|
1905
|
-
for (; c <=
|
|
1906
|
-
|
|
1907
|
-
const u = r[
|
|
1900
|
+
const { xs: r, ys: n, c1s: i, c2s: s, c3s: a } = this;
|
|
1901
|
+
let o = r.length - 1;
|
|
1902
|
+
if (e === r[o])
|
|
1903
|
+
return n[o];
|
|
1904
|
+
let c = 0, l = a.length - 1, p;
|
|
1905
|
+
for (; c <= l; ) {
|
|
1906
|
+
p = Math.floor(0.5 * (c + l));
|
|
1907
|
+
const u = r[p];
|
|
1908
1908
|
if (u < e)
|
|
1909
|
-
c =
|
|
1909
|
+
c = p + 1;
|
|
1910
1910
|
else if (u > e)
|
|
1911
|
-
|
|
1911
|
+
l = p - 1;
|
|
1912
1912
|
else
|
|
1913
|
-
return n[
|
|
1913
|
+
return n[p];
|
|
1914
1914
|
}
|
|
1915
|
-
|
|
1916
|
-
const
|
|
1917
|
-
return n[
|
|
1915
|
+
o = Math.max(0, l);
|
|
1916
|
+
const v = e - r[o], m = v * v;
|
|
1917
|
+
return n[o] + i[o] * v + s[o] * m + a[o] * v * m;
|
|
1918
1918
|
}
|
|
1919
1919
|
constructor(e, r) {
|
|
1920
1920
|
const { length: n } = e, i = [];
|
|
@@ -1923,37 +1923,37 @@ class Oe {
|
|
|
1923
1923
|
i.sort(
|
|
1924
1924
|
(u, D) => e[u] < e[D] ? -1 : 1
|
|
1925
1925
|
);
|
|
1926
|
-
const s = [],
|
|
1927
|
-
let
|
|
1926
|
+
const s = [], a = [];
|
|
1927
|
+
let o, c;
|
|
1928
1928
|
for (let u = 0; u < n - 1; u++)
|
|
1929
|
-
|
|
1930
|
-
const
|
|
1931
|
-
|
|
1929
|
+
o = e[u + 1] - e[u], c = r[u + 1] - r[u], s.push(o), a.push(c / o);
|
|
1930
|
+
const l = [
|
|
1931
|
+
a[0]
|
|
1932
1932
|
];
|
|
1933
1933
|
for (let u = 0; u < s.length - 1; u++) {
|
|
1934
|
-
const D =
|
|
1934
|
+
const D = a[u], h = a[u + 1];
|
|
1935
1935
|
if (D * h <= 0)
|
|
1936
|
-
|
|
1936
|
+
l.push(0);
|
|
1937
1937
|
else {
|
|
1938
|
-
|
|
1939
|
-
const
|
|
1940
|
-
|
|
1938
|
+
o = s[u];
|
|
1939
|
+
const S = s[u + 1], d = o + S;
|
|
1940
|
+
l.push(3 * d / ((d + S) / D + (d + o) / h));
|
|
1941
1941
|
}
|
|
1942
1942
|
}
|
|
1943
|
-
|
|
1944
|
-
const
|
|
1945
|
-
let
|
|
1946
|
-
for (let u = 0; u <
|
|
1947
|
-
|
|
1948
|
-
const D =
|
|
1949
|
-
|
|
1943
|
+
l.push(a[a.length - 1]);
|
|
1944
|
+
const p = [], v = [];
|
|
1945
|
+
let m;
|
|
1946
|
+
for (let u = 0; u < l.length - 1; u++) {
|
|
1947
|
+
m = a[u];
|
|
1948
|
+
const D = l[u], h = 1 / s[u], S = D + l[u + 1] - m - m;
|
|
1949
|
+
p.push((m - D - S) * h), v.push(S * h * h);
|
|
1950
1950
|
}
|
|
1951
|
-
this.xs = e, this.ys = r, this.c1s =
|
|
1951
|
+
this.xs = e, this.ys = r, this.c1s = l, this.c2s = p, this.c3s = v;
|
|
1952
1952
|
}
|
|
1953
1953
|
}
|
|
1954
|
-
const
|
|
1955
|
-
function
|
|
1956
|
-
const e = t.nodeType ===
|
|
1954
|
+
const pn = 1;
|
|
1955
|
+
function Ke(t) {
|
|
1956
|
+
const e = t.nodeType === pn ? t : t.parentElement;
|
|
1957
1957
|
if (!e)
|
|
1958
1958
|
return null;
|
|
1959
1959
|
const { top: r, left: n } = e.getBoundingClientRect();
|
|
@@ -1962,29 +1962,29 @@ function Fe(t) {
|
|
|
1962
1962
|
y: r
|
|
1963
1963
|
};
|
|
1964
1964
|
}
|
|
1965
|
-
function
|
|
1965
|
+
function V(t) {
|
|
1966
1966
|
return {
|
|
1967
1967
|
x: t.clientX,
|
|
1968
1968
|
y: t.clientY
|
|
1969
1969
|
};
|
|
1970
1970
|
}
|
|
1971
|
-
function
|
|
1971
|
+
function mn(t) {
|
|
1972
1972
|
var e;
|
|
1973
|
-
return t.nodeName === "IMG" && (
|
|
1973
|
+
return t.nodeName === "IMG" && (hn() || !(!((e = document.documentElement) === null || e === void 0) && e.contains(t)));
|
|
1974
1974
|
}
|
|
1975
|
-
function
|
|
1975
|
+
function vn(t, e, r, n) {
|
|
1976
1976
|
let i = t ? e.width : r, s = t ? e.height : n;
|
|
1977
|
-
return
|
|
1977
|
+
return Xe() && t && (s /= window.devicePixelRatio, i /= window.devicePixelRatio), {
|
|
1978
1978
|
dragPreviewWidth: i,
|
|
1979
1979
|
dragPreviewHeight: s
|
|
1980
1980
|
};
|
|
1981
1981
|
}
|
|
1982
|
-
function
|
|
1983
|
-
const s =
|
|
1984
|
-
x: r.x -
|
|
1985
|
-
y: r.y -
|
|
1986
|
-
}, { offsetWidth:
|
|
1987
|
-
let
|
|
1982
|
+
function yn(t, e, r, n, i) {
|
|
1983
|
+
const s = mn(e), o = Ke(s ? t : e), c = {
|
|
1984
|
+
x: r.x - o.x,
|
|
1985
|
+
y: r.y - o.y
|
|
1986
|
+
}, { offsetWidth: l, offsetHeight: p } = t, { anchorX: v, anchorY: m } = n, { dragPreviewWidth: u, dragPreviewHeight: D } = vn(s, e, l, p), h = () => {
|
|
1987
|
+
let L = new Ce([
|
|
1988
1988
|
0,
|
|
1989
1989
|
0.5,
|
|
1990
1990
|
1
|
|
@@ -1992,12 +1992,12 @@ function dn(t, e, r, n, i) {
|
|
|
1992
1992
|
// Dock to the top
|
|
1993
1993
|
c.y,
|
|
1994
1994
|
// Align at the center
|
|
1995
|
-
c.y /
|
|
1995
|
+
c.y / p * D,
|
|
1996
1996
|
// Dock to the bottom
|
|
1997
|
-
c.y + D -
|
|
1998
|
-
]).interpolate(
|
|
1999
|
-
return
|
|
2000
|
-
},
|
|
1997
|
+
c.y + D - p
|
|
1998
|
+
]).interpolate(m);
|
|
1999
|
+
return Xe() && s && (L += (window.devicePixelRatio - 1) * D), L;
|
|
2000
|
+
}, S = () => new Ce([
|
|
2001
2001
|
0,
|
|
2002
2002
|
0.5,
|
|
2003
2003
|
1
|
|
@@ -2005,16 +2005,16 @@ function dn(t, e, r, n, i) {
|
|
|
2005
2005
|
// Dock to the left
|
|
2006
2006
|
c.x,
|
|
2007
2007
|
// Align at the center
|
|
2008
|
-
c.x /
|
|
2008
|
+
c.x / l * u,
|
|
2009
2009
|
// Dock to the right
|
|
2010
|
-
c.x + u -
|
|
2011
|
-
]).interpolate(
|
|
2010
|
+
c.x + u - l
|
|
2011
|
+
]).interpolate(v), { offsetX: d, offsetY: f } = i, b = d === 0 || d, O = f === 0 || f;
|
|
2012
2012
|
return {
|
|
2013
|
-
x:
|
|
2014
|
-
y:
|
|
2013
|
+
x: b ? d : S(),
|
|
2014
|
+
y: O ? f : h()
|
|
2015
2015
|
};
|
|
2016
2016
|
}
|
|
2017
|
-
class
|
|
2017
|
+
class Dn {
|
|
2018
2018
|
get window() {
|
|
2019
2019
|
if (this.globalContext)
|
|
2020
2020
|
return this.globalContext;
|
|
@@ -2033,7 +2033,7 @@ class gn {
|
|
|
2033
2033
|
this.ownerDocument = null, this.globalContext = e, this.optionsArgs = r;
|
|
2034
2034
|
}
|
|
2035
2035
|
}
|
|
2036
|
-
function
|
|
2036
|
+
function Sn(t, e, r) {
|
|
2037
2037
|
return e in t ? Object.defineProperty(t, e, {
|
|
2038
2038
|
value: r,
|
|
2039
2039
|
enumerable: !0,
|
|
@@ -2041,18 +2041,18 @@ function fn(t, e, r) {
|
|
|
2041
2041
|
writable: !0
|
|
2042
2042
|
}) : t[e] = r, t;
|
|
2043
2043
|
}
|
|
2044
|
-
function
|
|
2044
|
+
function we(t) {
|
|
2045
2045
|
for (var e = 1; e < arguments.length; e++) {
|
|
2046
2046
|
var r = arguments[e] != null ? arguments[e] : {}, n = Object.keys(r);
|
|
2047
2047
|
typeof Object.getOwnPropertySymbols == "function" && (n = n.concat(Object.getOwnPropertySymbols(r).filter(function(i) {
|
|
2048
2048
|
return Object.getOwnPropertyDescriptor(r, i).enumerable;
|
|
2049
2049
|
}))), n.forEach(function(i) {
|
|
2050
|
-
|
|
2050
|
+
Sn(t, i, r[i]);
|
|
2051
2051
|
});
|
|
2052
2052
|
}
|
|
2053
2053
|
return t;
|
|
2054
2054
|
}
|
|
2055
|
-
class
|
|
2055
|
+
class bn {
|
|
2056
2056
|
/**
|
|
2057
2057
|
* Generate profiling statistics for the HTML5Backend.
|
|
2058
2058
|
*/
|
|
@@ -2104,13 +2104,13 @@ class hn {
|
|
|
2104
2104
|
}
|
|
2105
2105
|
connectDragSource(e, r, n) {
|
|
2106
2106
|
this.sourceNodes.set(e, r), this.sourceNodeOptions.set(e, n);
|
|
2107
|
-
const i = (
|
|
2107
|
+
const i = (a) => this.handleDragStart(a, e), s = (a) => this.handleSelectStart(a);
|
|
2108
2108
|
return r.setAttribute("draggable", "true"), r.addEventListener("dragstart", i), r.addEventListener("selectstart", s), () => {
|
|
2109
2109
|
this.sourceNodes.delete(e), this.sourceNodeOptions.delete(e), r.removeEventListener("dragstart", i), r.removeEventListener("selectstart", s), r.setAttribute("draggable", "false");
|
|
2110
2110
|
};
|
|
2111
2111
|
}
|
|
2112
2112
|
connectDropTarget(e, r) {
|
|
2113
|
-
const n = (
|
|
2113
|
+
const n = (a) => this.handleDragEnter(a, e), i = (a) => this.handleDragOver(a, e), s = (a) => this.handleDrop(a, e);
|
|
2114
2114
|
return r.addEventListener("dragenter", n), r.addEventListener("dragover", i), r.addEventListener("drop", s), () => {
|
|
2115
2115
|
r.removeEventListener("dragenter", n), r.removeEventListener("dragover", i), r.removeEventListener("drop", s);
|
|
2116
2116
|
};
|
|
@@ -2123,7 +2123,7 @@ class hn {
|
|
|
2123
2123
|
}
|
|
2124
2124
|
getCurrentSourceNodeOptions() {
|
|
2125
2125
|
const e = this.monitor.getSourceId(), r = this.sourceNodeOptions.get(e);
|
|
2126
|
-
return
|
|
2126
|
+
return we({
|
|
2127
2127
|
dropEffect: this.altKeyPressed ? "copy" : "move"
|
|
2128
2128
|
}, r || {});
|
|
2129
2129
|
}
|
|
@@ -2132,7 +2132,7 @@ class hn {
|
|
|
2132
2132
|
}
|
|
2133
2133
|
getCurrentSourcePreviewNodeOptions() {
|
|
2134
2134
|
const e = this.monitor.getSourceId(), r = this.sourcePreviewNodeOptions.get(e);
|
|
2135
|
-
return
|
|
2135
|
+
return we({
|
|
2136
2136
|
anchorX: 0.5,
|
|
2137
2137
|
anchorY: 0.5,
|
|
2138
2138
|
captureDraggingState: !1
|
|
@@ -2140,12 +2140,12 @@ class hn {
|
|
|
2140
2140
|
}
|
|
2141
2141
|
isDraggingNativeItem() {
|
|
2142
2142
|
const e = this.monitor.getItemType();
|
|
2143
|
-
return Object.keys(
|
|
2144
|
-
(r) =>
|
|
2143
|
+
return Object.keys(Ie).some(
|
|
2144
|
+
(r) => Ie[r] === e
|
|
2145
2145
|
);
|
|
2146
2146
|
}
|
|
2147
2147
|
beginDragNativeItem(e, r) {
|
|
2148
|
-
this.clearCurrentDragSourceNode(), this.currentNativeSource =
|
|
2148
|
+
this.clearCurrentDragSourceNode(), this.currentNativeSource = fn(e, r), this.currentNativeHandle = this.registry.addSource(e, this.currentNativeSource), this.actions.beginDrag([
|
|
2149
2149
|
this.currentNativeHandle
|
|
2150
2150
|
]);
|
|
2151
2151
|
}
|
|
@@ -2182,7 +2182,7 @@ class hn {
|
|
|
2182
2182
|
constructor(e, r, n) {
|
|
2183
2183
|
this.sourcePreviewNodes = /* @__PURE__ */ new Map(), this.sourcePreviewNodeOptions = /* @__PURE__ */ new Map(), this.sourceNodes = /* @__PURE__ */ new Map(), this.sourceNodeOptions = /* @__PURE__ */ new Map(), this.dragStartSourceIds = null, this.dropTargetIds = [], this.dragEnterTargetIds = [], this.currentNativeSource = null, this.currentNativeHandle = null, this.currentDragSourceNode = null, this.altKeyPressed = !1, this.mouseMoveTimeoutTimer = null, this.asyncEndDragFrameId = null, this.dragOverTargetIds = null, this.lastClientOffset = null, this.hoverRafId = null, this.getSourceClientOffset = (i) => {
|
|
2184
2184
|
const s = this.sourceNodes.get(i);
|
|
2185
|
-
return s &&
|
|
2185
|
+
return s && Ke(s) || null;
|
|
2186
2186
|
}, this.endDragNativeItem = () => {
|
|
2187
2187
|
this.isDraggingNativeItem() && (this.actions.endDrag(), this.currentNativeHandle && this.registry.removeSource(this.currentNativeHandle), this.currentNativeHandle = null, this.currentNativeSource = null);
|
|
2188
2188
|
}, this.isNodeInDocument = (i) => !!(i && this.document && this.document.body && this.document.body.contains(i)), this.endDragIfSourceWasRemovedFromDOM = () => {
|
|
@@ -2203,41 +2203,41 @@ class hn {
|
|
|
2203
2203
|
return;
|
|
2204
2204
|
const { dragStartSourceIds: s } = this;
|
|
2205
2205
|
this.dragStartSourceIds = null;
|
|
2206
|
-
const
|
|
2206
|
+
const a = V(i);
|
|
2207
2207
|
this.monitor.isDragging() && (this.actions.endDrag(), this.cancelHover()), this.actions.beginDrag(s || [], {
|
|
2208
2208
|
publishSource: !1,
|
|
2209
2209
|
getSourceClientOffset: this.getSourceClientOffset,
|
|
2210
|
-
clientOffset:
|
|
2210
|
+
clientOffset: a
|
|
2211
2211
|
});
|
|
2212
|
-
const { dataTransfer:
|
|
2212
|
+
const { dataTransfer: o } = i, c = te(o);
|
|
2213
2213
|
if (this.monitor.isDragging()) {
|
|
2214
|
-
if (
|
|
2215
|
-
const
|
|
2216
|
-
if (
|
|
2217
|
-
const { anchorX: u, anchorY: D, offsetX: h, offsetY:
|
|
2214
|
+
if (o && typeof o.setDragImage == "function") {
|
|
2215
|
+
const p = this.monitor.getSourceId(), v = this.sourceNodes.get(p), m = this.sourcePreviewNodes.get(p) || v;
|
|
2216
|
+
if (m) {
|
|
2217
|
+
const { anchorX: u, anchorY: D, offsetX: h, offsetY: S } = this.getCurrentSourcePreviewNodeOptions(), b = yn(v, m, a, {
|
|
2218
2218
|
anchorX: u,
|
|
2219
2219
|
anchorY: D
|
|
2220
2220
|
}, {
|
|
2221
2221
|
offsetX: h,
|
|
2222
|
-
offsetY:
|
|
2222
|
+
offsetY: S
|
|
2223
2223
|
});
|
|
2224
|
-
|
|
2224
|
+
o.setDragImage(m, b.x, b.y);
|
|
2225
2225
|
}
|
|
2226
2226
|
}
|
|
2227
2227
|
try {
|
|
2228
|
-
|
|
2228
|
+
o?.setData("application/json", {});
|
|
2229
2229
|
} catch {
|
|
2230
2230
|
}
|
|
2231
2231
|
this.setCurrentDragSourceNode(i.target);
|
|
2232
|
-
const { captureDraggingState:
|
|
2233
|
-
|
|
2232
|
+
const { captureDraggingState: l } = this.getCurrentSourcePreviewNodeOptions();
|
|
2233
|
+
l ? this.actions.publishDragSource() : setTimeout(
|
|
2234
2234
|
() => this.actions.publishDragSource(),
|
|
2235
2235
|
0
|
|
2236
2236
|
);
|
|
2237
2237
|
} else if (c)
|
|
2238
2238
|
this.beginDragNativeItem(c);
|
|
2239
2239
|
else {
|
|
2240
|
-
if (
|
|
2240
|
+
if (o && !o.types && (i.target && !i.target.hasAttribute || !i.target.hasAttribute("draggable")))
|
|
2241
2241
|
return;
|
|
2242
2242
|
i.preventDefault();
|
|
2243
2243
|
}
|
|
@@ -2250,16 +2250,16 @@ class hn {
|
|
|
2250
2250
|
}
|
|
2251
2251
|
if (!this.enterLeaveCounter.enter(i.target) || this.monitor.isDragging())
|
|
2252
2252
|
return;
|
|
2253
|
-
const { dataTransfer:
|
|
2254
|
-
c && this.beginDragNativeItem(c,
|
|
2253
|
+
const { dataTransfer: o } = i, c = te(o);
|
|
2254
|
+
c && this.beginDragNativeItem(c, o);
|
|
2255
2255
|
}, this.handleTopDragEnter = (i) => {
|
|
2256
2256
|
const { dragEnterTargetIds: s } = this;
|
|
2257
2257
|
if (this.dragEnterTargetIds = [], !this.monitor.isDragging())
|
|
2258
2258
|
return;
|
|
2259
2259
|
this.altKeyPressed = i.altKey, s.length > 0 && this.actions.hover(s, {
|
|
2260
|
-
clientOffset:
|
|
2260
|
+
clientOffset: V(i)
|
|
2261
2261
|
}), s.some(
|
|
2262
|
-
(
|
|
2262
|
+
(o) => this.monitor.canDropOnTarget(o)
|
|
2263
2263
|
) && (i.preventDefault(), i.dataTransfer && (i.dataTransfer.dropEffect = this.getCurrentDropEffect()));
|
|
2264
2264
|
}, this.handleTopDragOverCapture = (i) => {
|
|
2265
2265
|
if (this.dragOverTargetIds = [], this.isDraggingNativeItem()) {
|
|
@@ -2272,8 +2272,8 @@ class hn {
|
|
|
2272
2272
|
i.preventDefault(), i.dataTransfer && (i.dataTransfer.dropEffect = "none");
|
|
2273
2273
|
return;
|
|
2274
2274
|
}
|
|
2275
|
-
this.altKeyPressed = i.altKey, this.lastClientOffset =
|
|
2276
|
-
(
|
|
2275
|
+
this.altKeyPressed = i.altKey, this.lastClientOffset = V(i), this.scheduleHover(s), (s || []).some(
|
|
2276
|
+
(o) => this.monitor.canDropOnTarget(o)
|
|
2277
2277
|
) ? (i.preventDefault(), i.dataTransfer && (i.dataTransfer.dropEffect = this.getCurrentDropEffect())) : this.isDraggingNativeItem() ? i.preventDefault() : (i.preventDefault(), i.dataTransfer && (i.dataTransfer.dropEffect = "none"));
|
|
2278
2278
|
}, this.handleTopDragLeaveCapture = (i) => {
|
|
2279
2279
|
this.isDraggingNativeItem() && i.preventDefault(), this.enterLeaveCounter.leave(i.target) && (this.isDraggingNativeItem() && setTimeout(
|
|
@@ -2284,66 +2284,113 @@ class hn {
|
|
|
2284
2284
|
if (this.dropTargetIds = [], this.isDraggingNativeItem()) {
|
|
2285
2285
|
var s;
|
|
2286
2286
|
i.preventDefault(), (s = this.currentNativeSource) === null || s === void 0 || s.loadDataTransfer(i.dataTransfer);
|
|
2287
|
-
} else
|
|
2287
|
+
} else te(i.dataTransfer) && i.preventDefault();
|
|
2288
2288
|
this.enterLeaveCounter.reset();
|
|
2289
2289
|
}, this.handleTopDrop = (i) => {
|
|
2290
2290
|
const { dropTargetIds: s } = this;
|
|
2291
2291
|
this.dropTargetIds = [], this.actions.hover(s, {
|
|
2292
|
-
clientOffset:
|
|
2292
|
+
clientOffset: V(i)
|
|
2293
2293
|
}), this.actions.drop({
|
|
2294
2294
|
dropEffect: this.getCurrentDropEffect()
|
|
2295
2295
|
}), this.isDraggingNativeItem() ? this.endDragNativeItem() : this.monitor.isDragging() && this.actions.endDrag(), this.cancelHover();
|
|
2296
2296
|
}, this.handleSelectStart = (i) => {
|
|
2297
2297
|
const s = i.target;
|
|
2298
2298
|
typeof s.dragDrop == "function" && (s.tagName === "INPUT" || s.tagName === "SELECT" || s.tagName === "TEXTAREA" || s.isContentEditable || (i.preventDefault(), s.dragDrop()));
|
|
2299
|
-
}, this.options = new
|
|
2300
|
-
}
|
|
2299
|
+
}, this.options = new Dn(r, n), this.actions = e.getActions(), this.monitor = e.getMonitor(), this.registry = e.getRegistry(), this.enterLeaveCounter = new dn(this.isNodeInDocument);
|
|
2300
|
+
}
|
|
2301
|
+
}
|
|
2302
|
+
const On = function(e, r, n) {
|
|
2303
|
+
return new bn(e, r, n);
|
|
2304
|
+
}, Ze = (t) => /* @__PURE__ */ w.createElement("svg", { width: 14, height: 14, viewBox: "0 0 14 14", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...t }, /* @__PURE__ */ w.createElement("g", { clipPath: "url(#clip0_2638_2364)" }, /* @__PURE__ */ w.createElement("path", { d: "M5.25 2.84375C5.61244 2.84375 5.90625 3.13756 5.90625 3.5C5.90625 3.86244 5.61244 4.15625 5.25 4.15625C4.88756 4.15625 4.59375 3.86244 4.59375 3.5C4.59375 3.13756 4.88756 2.84375 5.25 2.84375Z", fill: "#2B2B2B", stroke: "#2B2B2B", strokeWidth: 0.4375 }), /* @__PURE__ */ w.createElement("path", { d: "M7.875 3.5C7.875 3.98325 8.26675 4.375 8.75 4.375C9.23325 4.375 9.625 3.98325 9.625 3.5C9.625 3.01675 9.23325 2.625 8.75 2.625C8.26675 2.625 7.875 3.01675 7.875 3.5Z", fill: "#2B2B2B" }), /* @__PURE__ */ w.createElement("path", { d: "M4.375 7C4.375 7.48325 4.76675 7.875 5.25 7.875C5.73325 7.875 6.125 7.48325 6.125 7C6.125 6.51675 5.73325 6.125 5.25 6.125C4.76675 6.125 4.375 6.51675 4.375 7Z", fill: "#2B2B2B" }), /* @__PURE__ */ w.createElement("path", { d: "M7.875 7C7.875 7.48325 8.26675 7.875 8.75 7.875C9.23325 7.875 9.625 7.48325 9.625 7C9.625 6.51675 9.23325 6.125 8.75 6.125C8.26675 6.125 7.875 6.51675 7.875 7Z", fill: "#2B2B2B" }), /* @__PURE__ */ w.createElement("path", { d: "M4.375 10.5C4.375 10.9832 4.76675 11.375 5.25 11.375C5.73325 11.375 6.125 10.9832 6.125 10.5C6.125 10.0168 5.73325 9.625 5.25 9.625C4.76675 9.625 4.375 10.0168 4.375 10.5Z", fill: "#2B2B2B" }), /* @__PURE__ */ w.createElement("path", { d: "M7.875 10.5C7.875 10.9832 8.26675 11.375 8.75 11.375C9.23325 11.375 9.625 10.9832 9.625 10.5C9.625 10.0168 9.23325 9.625 8.75 9.625C8.26675 9.625 7.875 10.0168 7.875 10.5Z", fill: "#2B2B2B" })), /* @__PURE__ */ w.createElement("defs", null, /* @__PURE__ */ w.createElement("clipPath", { id: "clip0_2638_2364" }, /* @__PURE__ */ w.createElement("rect", { width: 14, height: 14, fill: "white" }))));
|
|
2305
|
+
function Tn({
|
|
2306
|
+
label: t,
|
|
2307
|
+
logicalIndex: e,
|
|
2308
|
+
allVisible: r,
|
|
2309
|
+
onToggle: n,
|
|
2310
|
+
moveLogicalItem: i
|
|
2311
|
+
}) {
|
|
2312
|
+
const s = Pe(null), [, a] = qe({
|
|
2313
|
+
accept: F,
|
|
2314
|
+
hover(l) {
|
|
2315
|
+
l.index !== e && (i(l.index, e), l.index = e);
|
|
2316
|
+
}
|
|
2317
|
+
}), [{ isDragging: o }, c] = Fe({
|
|
2318
|
+
type: F,
|
|
2319
|
+
item: { index: e },
|
|
2320
|
+
collect: (l) => ({
|
|
2321
|
+
isDragging: l.isDragging()
|
|
2322
|
+
})
|
|
2323
|
+
});
|
|
2324
|
+
return c(a(s)), /* @__PURE__ */ P(
|
|
2325
|
+
"div",
|
|
2326
|
+
{
|
|
2327
|
+
ref: s,
|
|
2328
|
+
className: "ckds-dragable-list-item",
|
|
2329
|
+
style: { opacity: o ? 0.5 : 1 },
|
|
2330
|
+
children: [
|
|
2331
|
+
/* @__PURE__ */ y("div", { className: "ckds-drag-handle", style: { cursor: "grab" }, children: /* @__PURE__ */ y(Ze, { style: { color: "var(--ckcl-black-500, #2b2b2b)", width: "14px", height: "14px" } }) }),
|
|
2332
|
+
/* @__PURE__ */ y(A, { variant: "body-sm", className: "ckds-dragable-list-item-label", children: t }),
|
|
2333
|
+
/* @__PURE__ */ y(
|
|
2334
|
+
xe,
|
|
2335
|
+
{
|
|
2336
|
+
checked: r,
|
|
2337
|
+
onChange: n,
|
|
2338
|
+
className: "ckds-dragable-list-item-toggle",
|
|
2339
|
+
size: "small"
|
|
2340
|
+
}
|
|
2341
|
+
)
|
|
2342
|
+
]
|
|
2343
|
+
}
|
|
2344
|
+
);
|
|
2301
2345
|
}
|
|
2302
|
-
|
|
2303
|
-
return new hn(e, r, n);
|
|
2304
|
-
}, mn = (t) => /* @__PURE__ */ E.createElement("svg", { width: 14, height: 14, viewBox: "0 0 14 14", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...t }, /* @__PURE__ */ E.createElement("g", { clipPath: "url(#clip0_2638_2364)" }, /* @__PURE__ */ E.createElement("path", { d: "M5.25 2.84375C5.61244 2.84375 5.90625 3.13756 5.90625 3.5C5.90625 3.86244 5.61244 4.15625 5.25 4.15625C4.88756 4.15625 4.59375 3.86244 4.59375 3.5C4.59375 3.13756 4.88756 2.84375 5.25 2.84375Z", fill: "#2B2B2B", stroke: "#2B2B2B", strokeWidth: 0.4375 }), /* @__PURE__ */ E.createElement("path", { d: "M7.875 3.5C7.875 3.98325 8.26675 4.375 8.75 4.375C9.23325 4.375 9.625 3.98325 9.625 3.5C9.625 3.01675 9.23325 2.625 8.75 2.625C8.26675 2.625 7.875 3.01675 7.875 3.5Z", fill: "#2B2B2B" }), /* @__PURE__ */ E.createElement("path", { d: "M4.375 7C4.375 7.48325 4.76675 7.875 5.25 7.875C5.73325 7.875 6.125 7.48325 6.125 7C6.125 6.51675 5.73325 6.125 5.25 6.125C4.76675 6.125 4.375 6.51675 4.375 7Z", fill: "#2B2B2B" }), /* @__PURE__ */ E.createElement("path", { d: "M7.875 7C7.875 7.48325 8.26675 7.875 8.75 7.875C9.23325 7.875 9.625 7.48325 9.625 7C9.625 6.51675 9.23325 6.125 8.75 6.125C8.26675 6.125 7.875 6.51675 7.875 7Z", fill: "#2B2B2B" }), /* @__PURE__ */ E.createElement("path", { d: "M4.375 10.5C4.375 10.9832 4.76675 11.375 5.25 11.375C5.73325 11.375 6.125 10.9832 6.125 10.5C6.125 10.0168 5.73325 9.625 5.25 9.625C4.76675 9.625 4.375 10.0168 4.375 10.5Z", fill: "#2B2B2B" }), /* @__PURE__ */ E.createElement("path", { d: "M7.875 10.5C7.875 10.9832 8.26675 11.375 8.75 11.375C9.23325 11.375 9.625 10.9832 9.625 10.5C9.625 10.0168 9.23325 9.625 8.75 9.625C8.26675 9.625 7.875 10.0168 7.875 10.5Z", fill: "#2B2B2B" })), /* @__PURE__ */ E.createElement("defs", null, /* @__PURE__ */ E.createElement("clipPath", { id: "clip0_2638_2364" }, /* @__PURE__ */ E.createElement("rect", { width: 14, height: 14, fill: "white" }))));
|
|
2305
|
-
function vn({
|
|
2346
|
+
function En({
|
|
2306
2347
|
column: t,
|
|
2307
|
-
|
|
2308
|
-
|
|
2348
|
+
logicalIndex: e,
|
|
2349
|
+
moveLogicalItem: r,
|
|
2309
2350
|
visibility: n,
|
|
2310
2351
|
onToggleVisibility: i
|
|
2311
2352
|
}) {
|
|
2312
|
-
const s = t.isDraggable !== !1,
|
|
2313
|
-
accept:
|
|
2314
|
-
hover(
|
|
2315
|
-
s
|
|
2353
|
+
const s = t.isDraggable !== !1, a = t.toogleVisibility !== !1 && t.toggleVisibility !== !1, o = Pe(null), [, c] = qe({
|
|
2354
|
+
accept: F,
|
|
2355
|
+
hover(v, m) {
|
|
2356
|
+
if (!s || !o.current) return;
|
|
2357
|
+
const u = v.index, D = e;
|
|
2358
|
+
if (u === D) return;
|
|
2359
|
+
const h = o.current.getBoundingClientRect(), S = (h.bottom - h.top) / 2, d = m.getClientOffset();
|
|
2360
|
+
if (!d) return;
|
|
2361
|
+
const f = d.y - h.top;
|
|
2362
|
+
u < D && f < S || u > D && f > S || (r(u, D), v.index = D);
|
|
2316
2363
|
}
|
|
2317
|
-
}), [{ isDragging:
|
|
2318
|
-
type:
|
|
2364
|
+
}), [{ isDragging: l }, p] = Fe({
|
|
2365
|
+
type: F,
|
|
2319
2366
|
item: { index: e },
|
|
2320
2367
|
canDrag: s,
|
|
2321
|
-
collect: (
|
|
2322
|
-
isDragging:
|
|
2368
|
+
collect: (v) => ({
|
|
2369
|
+
isDragging: v.isDragging()
|
|
2323
2370
|
})
|
|
2324
2371
|
});
|
|
2325
|
-
return s ?
|
|
2372
|
+
return s ? p(c(o)) : c(o), /* @__PURE__ */ P(
|
|
2326
2373
|
"div",
|
|
2327
2374
|
{
|
|
2328
|
-
ref:
|
|
2375
|
+
ref: o,
|
|
2329
2376
|
className: "ckds-dragable-list-item",
|
|
2330
|
-
style: { opacity:
|
|
2377
|
+
style: { opacity: l ? 0.5 : 1 },
|
|
2331
2378
|
children: [
|
|
2332
|
-
/* @__PURE__ */
|
|
2379
|
+
/* @__PURE__ */ y(
|
|
2333
2380
|
"div",
|
|
2334
2381
|
{
|
|
2335
2382
|
className: "ckds-drag-handle",
|
|
2336
2383
|
style: { cursor: s ? "grab" : "not-allowed", opacity: s ? 1 : 0.3 },
|
|
2337
|
-
children: /* @__PURE__ */
|
|
2384
|
+
children: /* @__PURE__ */ y(Ze, { style: { color: "var(--ckcl-black-500, #2b2b2b)", width: "14px", height: "14px" } })
|
|
2338
2385
|
}
|
|
2339
2386
|
),
|
|
2340
|
-
/* @__PURE__ */
|
|
2341
|
-
/* @__PURE__ */
|
|
2342
|
-
|
|
2387
|
+
/* @__PURE__ */ y(A, { variant: "body-sm", className: "ckds-dragable-list-item-label", children: t.header }),
|
|
2388
|
+
/* @__PURE__ */ y(
|
|
2389
|
+
xe,
|
|
2343
2390
|
{
|
|
2344
2391
|
checked: n[t.accessorKey] !== !1,
|
|
2345
2392
|
onChange: () => i(t.accessorKey),
|
|
2346
|
-
disabled: !
|
|
2393
|
+
disabled: !a,
|
|
2347
2394
|
className: "ckds-dragable-list-item-toggle",
|
|
2348
2395
|
size: "small"
|
|
2349
2396
|
}
|
|
@@ -2352,99 +2399,159 @@ function vn({
|
|
|
2352
2399
|
}
|
|
2353
2400
|
);
|
|
2354
2401
|
}
|
|
2355
|
-
function
|
|
2402
|
+
function An({
|
|
2356
2403
|
draftConfig: t,
|
|
2357
2404
|
setDraftConfig: e,
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
|
|
2362
|
-
|
|
2363
|
-
|
|
2405
|
+
handleApplyPref: r,
|
|
2406
|
+
setModalOpen: n,
|
|
2407
|
+
handleResetToDefault: i,
|
|
2408
|
+
isDefault: s,
|
|
2409
|
+
isConfigChanged: a,
|
|
2410
|
+
headerGroupDefs: o
|
|
2364
2411
|
}) {
|
|
2365
|
-
const [c,
|
|
2366
|
-
(
|
|
2367
|
-
e((
|
|
2368
|
-
...
|
|
2412
|
+
const [c, l] = Ne(""), p = B(
|
|
2413
|
+
(d) => {
|
|
2414
|
+
e((f) => ({
|
|
2415
|
+
...f,
|
|
2369
2416
|
columnVisibility: {
|
|
2370
|
-
...
|
|
2371
|
-
[
|
|
2417
|
+
...f.columnVisibility,
|
|
2418
|
+
[d]: !(f.columnVisibility[d] ?? !0)
|
|
2372
2419
|
}
|
|
2373
2420
|
}));
|
|
2374
2421
|
},
|
|
2375
2422
|
[e]
|
|
2376
|
-
),
|
|
2377
|
-
(
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
|
|
2384
|
-
|
|
2423
|
+
), v = B(
|
|
2424
|
+
(d) => {
|
|
2425
|
+
e((f) => {
|
|
2426
|
+
const b = d.every((T) => f.columnVisibility[T] !== !1), O = { ...f.columnVisibility };
|
|
2427
|
+
return d.forEach((T) => {
|
|
2428
|
+
O[T] = !b;
|
|
2429
|
+
}), { ...f, columnVisibility: O };
|
|
2430
|
+
});
|
|
2431
|
+
},
|
|
2432
|
+
[e]
|
|
2433
|
+
), m = /* @__PURE__ */ new Set();
|
|
2434
|
+
o && o.forEach((d) => d.columns.forEach((f) => m.add(f)));
|
|
2435
|
+
const u = [], D = /* @__PURE__ */ new Set();
|
|
2436
|
+
t.columns.forEach((d) => {
|
|
2437
|
+
if (m.has(d.accessorKey)) {
|
|
2438
|
+
const f = o?.find((b) => b.columns.includes(d.accessorKey));
|
|
2439
|
+
if (f) {
|
|
2440
|
+
const b = f.columns.join(",");
|
|
2441
|
+
D.has(b) || (D.add(b), u.push({ type: "group", label: f.label, columnIds: f.columns }));
|
|
2442
|
+
}
|
|
2443
|
+
} else
|
|
2444
|
+
u.push({ type: "column", accessorKey: d.accessorKey, header: d.header });
|
|
2445
|
+
});
|
|
2446
|
+
const h = B((d, f) => {
|
|
2447
|
+
e((b) => {
|
|
2448
|
+
const O = /* @__PURE__ */ new Set();
|
|
2449
|
+
o && o.forEach((N) => N.columns.forEach((x) => O.add(x)));
|
|
2450
|
+
const T = [], L = /* @__PURE__ */ new Set();
|
|
2451
|
+
b.columns.forEach((N) => {
|
|
2452
|
+
if (O.has(N.accessorKey)) {
|
|
2453
|
+
const x = o?.find((j) => j.columns.includes(N.accessorKey));
|
|
2454
|
+
if (x) {
|
|
2455
|
+
const j = x.columns.join(",");
|
|
2456
|
+
L.has(j) || (L.add(j), T.push({ type: "group", keys: x.columns }));
|
|
2457
|
+
}
|
|
2458
|
+
} else
|
|
2459
|
+
T.push({ type: "column", keys: [N.accessorKey] });
|
|
2460
|
+
});
|
|
2461
|
+
const [Qe] = T.splice(d, 1);
|
|
2462
|
+
T.splice(f, 0, Qe);
|
|
2463
|
+
const Je = new Map(b.columns.map((N) => [N.accessorKey, N])), et = T.flatMap(
|
|
2464
|
+
(N) => N.keys.map((x) => Je.get(x)).filter(Boolean)
|
|
2465
|
+
);
|
|
2466
|
+
return { ...b, columns: et };
|
|
2467
|
+
});
|
|
2468
|
+
}, [e, o]), S = u.filter((d) => d.type === "column" ? d.header.toLowerCase().includes(c.toLowerCase()) : d.label.toLowerCase().includes(c.toLowerCase()));
|
|
2469
|
+
return /* @__PURE__ */ P(xr, { backend: On, children: [
|
|
2470
|
+
/* @__PURE__ */ P("div", { className: "ckds-column-manager-wrapper", children: [
|
|
2471
|
+
/* @__PURE__ */ P("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between" }, children: [
|
|
2472
|
+
/* @__PURE__ */ y(A, { variant: "body-lg", weight: "semibold", children: "Column Manager" }),
|
|
2473
|
+
/* @__PURE__ */ y(
|
|
2474
|
+
X,
|
|
2385
2475
|
{
|
|
2386
|
-
onClick:
|
|
2476
|
+
onClick: i,
|
|
2387
2477
|
variant: "hyperlink",
|
|
2388
|
-
disabled:
|
|
2389
|
-
icons: { left: /* @__PURE__ */
|
|
2478
|
+
disabled: s,
|
|
2479
|
+
icons: { left: /* @__PURE__ */ y(at, {}) },
|
|
2390
2480
|
label: "Reset",
|
|
2391
2481
|
size: "medium",
|
|
2392
|
-
className:
|
|
2482
|
+
className: s ? "" : "ckds-reset-btn-active"
|
|
2393
2483
|
}
|
|
2394
2484
|
)
|
|
2395
2485
|
] }),
|
|
2396
|
-
/* @__PURE__ */
|
|
2397
|
-
/* @__PURE__ */
|
|
2398
|
-
/* @__PURE__ */
|
|
2399
|
-
/* @__PURE__ */
|
|
2400
|
-
/* @__PURE__ */
|
|
2401
|
-
/* @__PURE__ */
|
|
2486
|
+
/* @__PURE__ */ P("div", { style: { display: "flex", marginTop: "24px" }, children: [
|
|
2487
|
+
/* @__PURE__ */ y(ct, { draftConfig: t, setDraftConfig: e }),
|
|
2488
|
+
/* @__PURE__ */ P("div", { style: { flex: 1, marginLeft: "28px" }, children: [
|
|
2489
|
+
/* @__PURE__ */ y(A, { variant: "body-sm", weight: "medium", children: "Visible Columns" }),
|
|
2490
|
+
/* @__PURE__ */ y(A, { variant: "body-xs", color: "secondary", children: "Toggle columns on/off and drag to reorder" }),
|
|
2491
|
+
/* @__PURE__ */ y(
|
|
2402
2492
|
"div",
|
|
2403
2493
|
{
|
|
2404
|
-
className:
|
|
2494
|
+
className: S.length > 9 ? "ckds-search-border-bottom" : "",
|
|
2405
2495
|
style: { paddingBottom: "12px", marginTop: "16px" },
|
|
2406
|
-
children: /* @__PURE__ */
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
)
|
|
2417
|
-
] })
|
|
2496
|
+
children: /* @__PURE__ */ y(
|
|
2497
|
+
ot,
|
|
2498
|
+
{
|
|
2499
|
+
value: c,
|
|
2500
|
+
placeholder: "Search",
|
|
2501
|
+
onChange: (d) => l(d),
|
|
2502
|
+
onClear: () => l(""),
|
|
2503
|
+
size: "medium"
|
|
2504
|
+
}
|
|
2505
|
+
)
|
|
2418
2506
|
}
|
|
2419
2507
|
),
|
|
2420
|
-
/* @__PURE__ */
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
|
|
2426
|
-
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
|
|
2430
|
-
|
|
2508
|
+
/* @__PURE__ */ y("div", { children: c && S.length === 0 ? /* @__PURE__ */ y("div", { style: { display: "flex", flex: 1, alignItems: "center", justifyContent: "center", height: "318px" }, children: /* @__PURE__ */ y("p", { className: "text-sm", style: { color: "var(--ckcl-black-400, #737373)" }, children: "No columns found" }) }) : /* @__PURE__ */ y("div", { className: "ckds-dragable-list", children: S.map((d, f) => {
|
|
2509
|
+
if (d.type === "group") {
|
|
2510
|
+
const O = d.columnIds.every(
|
|
2511
|
+
(T) => t.columnVisibility[T] !== !1
|
|
2512
|
+
);
|
|
2513
|
+
return /* @__PURE__ */ y(
|
|
2514
|
+
Tn,
|
|
2515
|
+
{
|
|
2516
|
+
label: d.label,
|
|
2517
|
+
logicalIndex: f,
|
|
2518
|
+
allVisible: O,
|
|
2519
|
+
onToggle: () => v(d.columnIds),
|
|
2520
|
+
moveLogicalItem: h
|
|
2521
|
+
},
|
|
2522
|
+
`group-${d.label}`
|
|
2523
|
+
);
|
|
2524
|
+
}
|
|
2525
|
+
const b = t.columns.find((O) => O.accessorKey === d.accessorKey);
|
|
2526
|
+
return b ? /* @__PURE__ */ y(
|
|
2527
|
+
En,
|
|
2528
|
+
{
|
|
2529
|
+
column: b,
|
|
2530
|
+
logicalIndex: f,
|
|
2531
|
+
moveLogicalItem: h,
|
|
2532
|
+
visibility: t.columnVisibility,
|
|
2533
|
+
onToggleVisibility: p
|
|
2534
|
+
},
|
|
2535
|
+
d.accessorKey
|
|
2536
|
+
) : null;
|
|
2537
|
+
}) }) })
|
|
2431
2538
|
] })
|
|
2432
2539
|
] })
|
|
2433
2540
|
] }),
|
|
2434
|
-
/* @__PURE__ */
|
|
2435
|
-
/* @__PURE__ */
|
|
2436
|
-
|
|
2541
|
+
/* @__PURE__ */ P("div", { className: "ckds-column-manager-footer", children: [
|
|
2542
|
+
/* @__PURE__ */ y(
|
|
2543
|
+
X,
|
|
2437
2544
|
{
|
|
2438
|
-
onClick: () =>
|
|
2545
|
+
onClick: () => n({ open: !1, type: "columnManager", activeOption: "" }),
|
|
2439
2546
|
variant: "secondary",
|
|
2440
2547
|
size: "medium",
|
|
2441
2548
|
label: "Cancel"
|
|
2442
2549
|
}
|
|
2443
2550
|
),
|
|
2444
|
-
/* @__PURE__ */
|
|
2445
|
-
|
|
2551
|
+
/* @__PURE__ */ y(
|
|
2552
|
+
X,
|
|
2446
2553
|
{
|
|
2447
|
-
onClick:
|
|
2554
|
+
onClick: r,
|
|
2448
2555
|
variant: "primary",
|
|
2449
2556
|
size: "medium",
|
|
2450
2557
|
disabled: !a,
|
|
@@ -2455,5 +2562,5 @@ function Pn({
|
|
|
2455
2562
|
] });
|
|
2456
2563
|
}
|
|
2457
2564
|
export {
|
|
2458
|
-
|
|
2565
|
+
An as default
|
|
2459
2566
|
};
|