@daisforge/ui 1.11.0 → 1.12.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/chunks/FormDatePickers-BCyW24Pr.cjs +1 -0
- package/chunks/{FormDatePickers-BClwflaz.mjs → FormDatePickers-DfdGdbwP.mjs} +205 -202
- package/chunks/{FormTextArea-CS8BIeFe.mjs → FormTextArea-CCrYx4pL.mjs} +58 -59
- package/chunks/FormTextArea-sly1mY7h.cjs +1 -0
- package/chunks/{GridDND-Dn1CrBX6.mjs → GridDND-Bycwiynh.mjs} +150 -146
- package/chunks/GridDND-MsZt1fXJ.cjs +1 -0
- package/chunks/{TableCanvas-BF6IgvLA.mjs → TableCanvas-BYKPeWME.mjs} +3888 -3844
- package/chunks/{TableCanvas-Cv7CvnON.cjs → TableCanvas-ZmjSKk64.cjs} +7 -7
- package/components/GridDND/GridDND.styled.d.ts +1 -0
- package/components/GridDND/index.cjs +1 -1
- package/components/GridDND/index.d.ts +1 -0
- package/components/GridDND/index.mjs +5 -4
- package/components/GridDND/utils/index.cjs +1 -1
- package/components/GridDND/utils/index.mjs +3 -3
- package/components/TableCanvas/TableGlideInstance/adapters/column/index.cjs +1 -1
- package/components/TableCanvas/TableGlideInstance/adapters/column/index.mjs +1 -1
- package/components/TableCanvas/TableGlideInstance/adapters/index.cjs +1 -1
- package/components/TableCanvas/TableGlideInstance/adapters/index.mjs +1 -1
- package/components/TableCanvas/TableGlideInstance/index.cjs +1 -1
- package/components/TableCanvas/TableGlideInstance/index.mjs +1 -1
- package/components/TableCanvas/TableGlideInstance/utils/column/index.cjs +1 -1
- package/components/TableCanvas/TableGlideInstance/utils/column/index.mjs +1 -1
- package/components/TableCanvas/TableGlideInstance/utils/index.cjs +1 -1
- package/components/TableCanvas/TableGlideInstance/utils/index.mjs +1 -1
- package/components/TableCanvas/components/SplitIconButton/index.cjs +1 -1
- package/components/TableCanvas/components/SplitIconButton/index.mjs +1 -1
- package/components/TableCanvas/components/TableDropdown/index.cjs +1 -1
- package/components/TableCanvas/components/TableDropdown/index.mjs +1 -1
- package/components/TableCanvas/feature-cell-transfer/index.cjs +1 -1
- package/components/TableCanvas/feature-cell-transfer/index.mjs +1 -1
- package/components/TableCanvas/feature-collapse-table/index.cjs +1 -1
- package/components/TableCanvas/feature-collapse-table/index.mjs +1 -1
- package/components/TableCanvas/feature-column-control/ColumnsList/index.cjs +1 -1
- package/components/TableCanvas/feature-column-control/ColumnsList/index.mjs +1 -1
- package/components/TableCanvas/feature-column-control/index.cjs +1 -1
- package/components/TableCanvas/feature-column-control/index.mjs +1 -1
- package/components/TableCanvas/feature-columns-grouping/index.cjs +1 -1
- package/components/TableCanvas/feature-columns-grouping/index.mjs +1 -1
- package/components/TableCanvas/feature-content-state/index.cjs +1 -1
- package/components/TableCanvas/feature-content-state/index.mjs +1 -1
- package/components/TableCanvas/feature-context-menu/index.cjs +1 -1
- package/components/TableCanvas/feature-context-menu/index.mjs +1 -1
- package/components/TableCanvas/feature-edit/index.cjs +1 -1
- package/components/TableCanvas/feature-edit/index.mjs +1 -1
- package/components/TableCanvas/feature-filtering/combobox/index.cjs +1 -1
- package/components/TableCanvas/feature-filtering/combobox/index.mjs +3 -3
- package/components/TableCanvas/feature-filtering/filter-list-block/index.cjs +1 -1
- package/components/TableCanvas/feature-filtering/filter-list-block/index.mjs +1 -1
- package/components/TableCanvas/feature-filtering/header-filter-button/index.cjs +1 -1
- package/components/TableCanvas/feature-filtering/header-filter-button/index.mjs +1 -1
- package/components/TableCanvas/feature-filtering/index.cjs +1 -1
- package/components/TableCanvas/feature-filtering/index.mjs +1 -1
- package/components/TableCanvas/feature-filtering/sidebar-filter-block/index.cjs +1 -1
- package/components/TableCanvas/feature-filtering/sidebar-filter-block/index.mjs +1 -1
- package/components/TableCanvas/feature-infinity-scroll/index.cjs +1 -1
- package/components/TableCanvas/feature-infinity-scroll/index.mjs +1 -1
- package/components/TableCanvas/feature-key-text/index.cjs +1 -1
- package/components/TableCanvas/feature-key-text/index.mjs +1 -1
- package/components/TableCanvas/feature-notifications/index.cjs +1 -1
- package/components/TableCanvas/feature-notifications/index.mjs +1 -1
- package/components/TableCanvas/feature-pagination/index.cjs +1 -1
- package/components/TableCanvas/feature-pagination/index.mjs +1 -1
- package/components/TableCanvas/feature-popover-table/context/index.cjs +1 -1
- package/components/TableCanvas/feature-popover-table/context/index.mjs +1 -1
- package/components/TableCanvas/feature-popover-table/hooks/index.cjs +1 -1
- package/components/TableCanvas/feature-popover-table/hooks/index.mjs +1 -1
- package/components/TableCanvas/feature-popover-table/index.cjs +1 -1
- package/components/TableCanvas/feature-popover-table/index.mjs +1 -1
- package/components/TableCanvas/feature-popover-table/utils/index.cjs +1 -1
- package/components/TableCanvas/feature-popover-table/utils/index.mjs +1 -1
- package/components/TableCanvas/feature-right-sidebar/index.cjs +1 -1
- package/components/TableCanvas/feature-right-sidebar/index.mjs +1 -1
- package/components/TableCanvas/feature-row-detail/index.cjs +1 -1
- package/components/TableCanvas/feature-row-detail/index.mjs +1 -1
- package/components/TableCanvas/feature-row-instruments/index.cjs +1 -1
- package/components/TableCanvas/feature-row-instruments/index.mjs +1 -1
- package/components/TableCanvas/feature-row-markers/index.cjs +1 -1
- package/components/TableCanvas/feature-row-markers/index.mjs +1 -1
- package/components/TableCanvas/feature-row-size/index.cjs +1 -1
- package/components/TableCanvas/feature-row-size/index.mjs +1 -1
- package/components/TableCanvas/feature-rows-grouping/index.cjs +1 -1
- package/components/TableCanvas/feature-rows-grouping/index.mjs +1 -1
- package/components/TableCanvas/feature-searching/index.cjs +1 -1
- package/components/TableCanvas/feature-searching/index.mjs +1 -1
- package/components/TableCanvas/feature-select-row/index.cjs +1 -1
- package/components/TableCanvas/feature-select-row/index.mjs +1 -1
- package/components/TableCanvas/feature-sorting/index.cjs +1 -1
- package/components/TableCanvas/feature-sorting/index.mjs +1 -1
- package/components/TableCanvas/feature-table-settings/TableSettingsWithTabs.d.ts +25 -2
- package/components/TableCanvas/feature-table-settings/index.cjs +1 -1
- package/components/TableCanvas/feature-table-settings/index.d.ts +1 -1
- package/components/TableCanvas/feature-table-settings/index.mjs +3 -2
- package/components/TableCanvas/feature-tooltip/index.cjs +1 -1
- package/components/TableCanvas/feature-tooltip/index.mjs +1 -1
- package/components/TableCanvas/feature-tooltip/utils/index.cjs +1 -1
- package/components/TableCanvas/feature-tooltip/utils/index.mjs +1 -1
- package/components/TableCanvas/feature-tree/index.cjs +1 -1
- package/components/TableCanvas/feature-tree/index.mjs +1 -1
- package/components/TableCanvas/index.cjs +1 -1
- package/components/TableCanvas/index.mjs +1 -1
- package/components/TableCanvas/renders/formatCell/index.cjs +1 -1
- package/components/TableCanvas/renders/formatCell/index.mjs +1 -1
- package/components/TableCanvas/styles/index.cjs +1 -1
- package/components/TableCanvas/styles/index.mjs +1 -1
- package/components/TableCanvas/table-hooks/index.cjs +1 -1
- package/components/TableCanvas/table-hooks/index.mjs +1 -1
- package/components/TableCanvas/types/index.cjs +1 -1
- package/components/TableCanvas/types/index.mjs +1 -1
- package/components/TableCanvas/types/table-config.type.d.ts +4 -0
- package/components/TableCanvas/utils/index.cjs +1 -1
- package/components/TableCanvas/utils/index.mjs +1 -1
- package/components/TableCanvas/widgets/control-block/compression/index.cjs +1 -1
- package/components/TableCanvas/widgets/control-block/compression/index.mjs +1 -1
- package/components/TableCanvas/widgets/control-block/index.cjs +1 -1
- package/components/TableCanvas/widgets/control-block/index.mjs +1 -1
- package/components/TableCanvas/widgets/control-block/right-side/index.cjs +1 -1
- package/components/TableCanvas/widgets/control-block/right-side/index.mjs +1 -1
- package/components/TableCanvas/widgets/index.cjs +1 -1
- package/components/TableCanvas/widgets/index.mjs +1 -1
- package/components/TableCanvas/widgets/mass-actions/hooks/index.cjs +1 -1
- package/components/TableCanvas/widgets/mass-actions/hooks/index.mjs +1 -1
- package/components/TableCanvas/widgets/mass-actions/index.cjs +1 -1
- package/components/TableCanvas/widgets/mass-actions/index.mjs +1 -1
- package/components/TableGlide/lib/canvas/utils/portalHoverEvents.d.ts +3 -1
- package/formComponents/FormAutocomplete/FormAutocomplete.d.ts +1 -1
- package/formComponents/FormAutocomplete/index.cjs +1 -1
- package/formComponents/FormAutocomplete/index.mjs +40 -38
- package/formComponents/FormCombobox/index.cjs +1 -1
- package/formComponents/FormCombobox/index.mjs +29 -29
- package/formComponents/FormDatePickers/FormDatePicker/FormDatePicker.d.ts +1 -1
- package/formComponents/FormDatePickers/FormDatePicker/index.cjs +1 -1
- package/formComponents/FormDatePickers/FormDatePicker/index.mjs +1 -1
- package/formComponents/FormDatePickers/FormDatePickerRange/FormDatePickerRange.d.ts +1 -1
- package/formComponents/FormDatePickers/FormDatePickerRange/index.cjs +1 -1
- package/formComponents/FormDatePickers/FormDatePickerRange/index.mjs +1 -1
- package/formComponents/FormDatePickers/FormDatePickerRange/lib/utils/index.cjs +1 -1
- package/formComponents/FormDatePickers/FormDatePickerRange/lib/utils/index.mjs +1 -1
- package/formComponents/FormDatePickers/index.cjs +1 -1
- package/formComponents/FormDatePickers/index.mjs +1 -1
- package/formComponents/FormMask/FormMask.d.ts +1 -1
- package/formComponents/FormMask/index.cjs +1 -1
- package/formComponents/FormMask/index.mjs +34 -32
- package/formComponents/FormNumberFormat/FormNumberFormat.d.ts +1 -1
- package/formComponents/FormNumberFormat/index.cjs +1 -1
- package/formComponents/FormNumberFormat/index.mjs +36 -34
- package/formComponents/FormSelect/index.cjs +1 -1
- package/formComponents/FormSelect/index.mjs +21 -21
- package/formComponents/FormTextArea/index.cjs +1 -1
- package/formComponents/FormTextArea/index.mjs +1 -1
- package/formComponents/FormTextArea/ui/index.cjs +1 -1
- package/formComponents/FormTextArea/ui/index.mjs +1 -1
- package/formComponents/FormTextField/index.cjs +1 -1
- package/formComponents/FormTextField/index.mjs +21 -21
- package/index.cjs +1 -1
- package/index.mjs +1552 -1551
- package/package.json +1 -1
- package/chunks/FormDatePickers-k_9RxQ8v.cjs +0 -1
- package/chunks/FormTextArea-C-iavwsX.cjs +0 -1
- package/chunks/GridDND-2-SOnXN6.cjs +0 -1
|
@@ -3,16 +3,16 @@ import "react-grid-layout/css/styles.css";
|
|
|
3
3
|
import { iconButtonFilterClassNames as wt } from "../components/IconButton/index.mjs";
|
|
4
4
|
import { useRef as q, useState as z, useLayoutEffect as Dt, useEffect as te, forwardRef as ht, useCallback as A, useMemo as De, useImperativeHandle as yt } from "react";
|
|
5
5
|
import { b as Ke } from "./AnalyticalWidget-Ca_EuSTO.mjs";
|
|
6
|
-
import { Responsive as
|
|
7
|
-
import { c as
|
|
8
|
-
import { surfaceTransparentAccent as
|
|
9
|
-
import Fe from "styled-components";
|
|
6
|
+
import { Responsive as gt } from "react-grid-layout";
|
|
7
|
+
import { c as Nt } from "./utils-BNelzuI-.mjs";
|
|
8
|
+
import { surfaceTransparentAccent as bt, outlineAccent as kt, outlineAccentMinor as vt, shadowDownHardS as Gt, outlineTransparentAccent as Ot, shadowDownSoftS as Mt } from "@salutejs/sdds-themes/tokens/sdds_finai";
|
|
9
|
+
import Fe, { css as Rt } from "styled-components";
|
|
10
10
|
const U = {
|
|
11
11
|
gridItemWrapper: "grid-dnd__item-wrapper",
|
|
12
12
|
gridItem: "grid-dnd__item",
|
|
13
13
|
dragHandle: "grid-dnd__drag-handle",
|
|
14
14
|
noDrag: "grid-dnd__no-drag"
|
|
15
|
-
}, Ve = 248, Y = 6,
|
|
15
|
+
}, Ve = 248, Y = 6, At = ({
|
|
16
16
|
item: t,
|
|
17
17
|
actionsSlot: n,
|
|
18
18
|
actionsSlotStyle: r,
|
|
@@ -57,14 +57,14 @@ const U = {
|
|
|
57
57
|
},
|
|
58
58
|
void 0
|
|
59
59
|
);
|
|
60
|
-
function
|
|
60
|
+
function Et() {
|
|
61
61
|
const t = q(null), [n, r] = z(0);
|
|
62
62
|
return Dt(() => {
|
|
63
63
|
const a = t.current;
|
|
64
64
|
if (!a)
|
|
65
65
|
return;
|
|
66
66
|
let l = 0;
|
|
67
|
-
const o =
|
|
67
|
+
const o = Nt((s) => {
|
|
68
68
|
var D;
|
|
69
69
|
const f = ((D = s[0]) == null ? void 0 : D.contentRect.width) ?? 0;
|
|
70
70
|
cancelAnimationFrame(l), l = requestAnimationFrame(() => r(f));
|
|
@@ -74,8 +74,8 @@ function At() {
|
|
|
74
74
|
};
|
|
75
75
|
}, []), { ref: t, width: n };
|
|
76
76
|
}
|
|
77
|
-
function
|
|
78
|
-
const { onWidthChange: n, margin: r, cols: a, containerPadding: l } = t, { ref: o, width: s } =
|
|
77
|
+
function Ft(t) {
|
|
78
|
+
const { onWidthChange: n, margin: r, cols: a, containerPadding: l } = t, { ref: o, width: s } = Et(), f = q(0);
|
|
79
79
|
return te(() => {
|
|
80
80
|
s > 0 && s !== f.current && (n == null || n(
|
|
81
81
|
s,
|
|
@@ -83,7 +83,7 @@ function Et(t) {
|
|
|
83
83
|
a,
|
|
84
84
|
l
|
|
85
85
|
), f.current = s);
|
|
86
|
-
}, [s, n, r, a, l]), /* @__PURE__ */ P.jsxDEV("div", { ref: o, style: { width: "100%" }, children: s > 0 && /* @__PURE__ */ P.jsxDEV(
|
|
86
|
+
}, [s, n, r, a, l]), /* @__PURE__ */ P.jsxDEV("div", { ref: o, style: { width: "100%" }, children: s > 0 && /* @__PURE__ */ P.jsxDEV(gt, { ...t, width: s }, void 0, !1, {
|
|
87
87
|
fileName: "/home/runner/work/dais-ui/dais-ui/packages/ui-kit/src/components/GridDND/GridDND.MeasuredContainer.tsx",
|
|
88
88
|
lineNumber: 35,
|
|
89
89
|
columnNumber: 21
|
|
@@ -93,11 +93,14 @@ function Et(t) {
|
|
|
93
93
|
columnNumber: 5
|
|
94
94
|
}, this);
|
|
95
95
|
}
|
|
96
|
-
const
|
|
97
|
-
["
|
|
98
|
-
() =>
|
|
96
|
+
const Ht = Rt(
|
|
97
|
+
["background-color:", ";border-radius:16px;outline:1px solid ", ";"],
|
|
98
|
+
() => bt,
|
|
99
99
|
() => kt
|
|
100
|
-
),
|
|
100
|
+
), Tt = Fe.div.withConfig({ displayName: "GridDNDstyled__GridDNDContainer" })(
|
|
101
|
+
["width:100%;min-height:400px;max-width:1890px;&:has(.react-grid-placeholder){& .react-grid-item.react-grid-placeholder{", " opacity:1;}}"],
|
|
102
|
+
Ht
|
|
103
|
+
), Wt = Fe.div.attrs(() => ({
|
|
101
104
|
className: U.gridItem
|
|
102
105
|
})).withConfig({ displayName: "GridDNDstyled__GridItem" })(
|
|
103
106
|
["&.react-draggable-dragging{outline:2px solid ", ";box-shadow:", ";cursor:grabbing;}& .", "{cursor:default;}height:100%;width:100%;cursor:", ";background-color:white;border-radius:16px;outline:", ";box-shadow:", ";overflow:hidden;"],
|
|
@@ -107,8 +110,8 @@ const Ft = Fe.div.withConfig({ displayName: "GridDNDstyled__GridDNDContainer" })
|
|
|
107
110
|
(t) => t.$isDraggable ? "grab" : "default",
|
|
108
111
|
(t) => t.$isDraggable ? `2px solid ${Ot}` : "none",
|
|
109
112
|
() => Mt
|
|
110
|
-
),
|
|
111
|
-
function
|
|
113
|
+
), jt = Fe.div.withConfig({ displayName: "GridDNDstyled__GridItemContent" })(["height:100%;width:100%;"]), St = (t) => !t || t === "." || t === "-" || t === " ";
|
|
114
|
+
function Ct(t, n, r, a) {
|
|
112
115
|
var f, D;
|
|
113
116
|
const l = [], o = r[n], s = /* @__PURE__ */ new Set();
|
|
114
117
|
for (let G = 0; G < t.length; G++) {
|
|
@@ -117,25 +120,25 @@ function Zt(t, n, r, a) {
|
|
|
117
120
|
return l;
|
|
118
121
|
for (let i = 0; i < O.length; i++) {
|
|
119
122
|
const m = O[i];
|
|
120
|
-
if (!m ||
|
|
123
|
+
if (!m || St(m) || s.has(`${m}`))
|
|
121
124
|
continue;
|
|
122
125
|
let p = 0;
|
|
123
126
|
for (let d = i; d < O.length && O[d] === m; d++)
|
|
124
127
|
p++;
|
|
125
128
|
let w = 0;
|
|
126
129
|
for (let d = G; d < t.length; d++) {
|
|
127
|
-
let
|
|
128
|
-
for (let
|
|
129
|
-
if (!((f = t[d]) != null && f[
|
|
130
|
-
|
|
130
|
+
let g = !0;
|
|
131
|
+
for (let b = i; b < i + p; b++)
|
|
132
|
+
if (!((f = t[d]) != null && f[b]) || ((D = t[d]) == null ? void 0 : D[b]) !== m) {
|
|
133
|
+
g = !1;
|
|
131
134
|
break;
|
|
132
135
|
}
|
|
133
|
-
if (!
|
|
136
|
+
if (!g)
|
|
134
137
|
break;
|
|
135
138
|
w++;
|
|
136
139
|
}
|
|
137
140
|
for (let d = G; d < G + w; d++)
|
|
138
|
-
for (let
|
|
141
|
+
for (let g = i; g < i + p; g++)
|
|
139
142
|
s.add(`${m}`);
|
|
140
143
|
l.push({
|
|
141
144
|
i: m,
|
|
@@ -163,10 +166,10 @@ function Zt(t, n, r, a) {
|
|
|
163
166
|
}
|
|
164
167
|
return l;
|
|
165
168
|
}
|
|
166
|
-
function
|
|
169
|
+
function er(t) {
|
|
167
170
|
return Object.keys(t).sort((n, r) => (t[r] || 0) - (t[n] || 0));
|
|
168
171
|
}
|
|
169
|
-
function
|
|
172
|
+
function tr(t, n) {
|
|
170
173
|
const r = Object.keys(t).sort((a, l) => {
|
|
171
174
|
const o = t[a] || 0;
|
|
172
175
|
return (t[l] || 0) - o;
|
|
@@ -178,7 +181,7 @@ function Ct(t, n) {
|
|
|
178
181
|
}
|
|
179
182
|
return r[r.length - 1];
|
|
180
183
|
}
|
|
181
|
-
function
|
|
184
|
+
function rr(t, n, r) {
|
|
182
185
|
var l, o;
|
|
183
186
|
const a = r.indexOf(t);
|
|
184
187
|
if (a === -1)
|
|
@@ -195,7 +198,7 @@ function er(t, n, r) {
|
|
|
195
198
|
}
|
|
196
199
|
return null;
|
|
197
200
|
}
|
|
198
|
-
function
|
|
201
|
+
function nr(t, n) {
|
|
199
202
|
const r = [...t].map((i) => ({
|
|
200
203
|
...i,
|
|
201
204
|
// Ограничиваем ширину элемента количеством колонок
|
|
@@ -207,21 +210,21 @@ function tr(t, n) {
|
|
|
207
210
|
}, o = (i, m, p, w) => {
|
|
208
211
|
l(m + w);
|
|
209
212
|
for (let d = m; d < m + w; d++) {
|
|
210
|
-
const
|
|
211
|
-
if (!
|
|
213
|
+
const g = a[d];
|
|
214
|
+
if (!g)
|
|
212
215
|
return !1;
|
|
213
|
-
for (let
|
|
214
|
-
if (
|
|
216
|
+
for (let b = i; b < i + p; b++)
|
|
217
|
+
if (b >= n || g[b])
|
|
215
218
|
return !1;
|
|
216
219
|
}
|
|
217
220
|
return !0;
|
|
218
221
|
}, s = (i, m, p, w) => {
|
|
219
222
|
l(m + w);
|
|
220
223
|
for (let d = m; d < m + w; d++) {
|
|
221
|
-
const
|
|
222
|
-
if (
|
|
223
|
-
for (let
|
|
224
|
-
|
|
224
|
+
const g = a[d];
|
|
225
|
+
if (g)
|
|
226
|
+
for (let b = i; b < i + p; b++)
|
|
227
|
+
b < g.length && (g[b] = !0);
|
|
225
228
|
}
|
|
226
229
|
}, f = (i) => {
|
|
227
230
|
let m = i;
|
|
@@ -293,7 +296,7 @@ function ye(t, n, r) {
|
|
|
293
296
|
for (; t.length < n; )
|
|
294
297
|
t.push(Array(r).fill(!1));
|
|
295
298
|
}
|
|
296
|
-
function
|
|
299
|
+
function _t(t, n, r) {
|
|
297
300
|
ye(t, n + 1, r);
|
|
298
301
|
const a = t[n];
|
|
299
302
|
return a ? a.some((l) => !l) : !1;
|
|
@@ -323,7 +326,7 @@ function Xe(t, n, r, a, l, o) {
|
|
|
323
326
|
}
|
|
324
327
|
return !0;
|
|
325
328
|
}
|
|
326
|
-
function
|
|
329
|
+
function qt(t, n, r, a, l, o) {
|
|
327
330
|
ye(t, r + l, o);
|
|
328
331
|
for (let s = r; s < r + l; s++) {
|
|
329
332
|
const f = t[s];
|
|
@@ -335,12 +338,12 @@ function St(t, n, r, a, l, o) {
|
|
|
335
338
|
function Ye(t, n, r) {
|
|
336
339
|
let a = Math.max(0, n);
|
|
337
340
|
for (; ; ) {
|
|
338
|
-
if (
|
|
341
|
+
if (_t(t, a, r))
|
|
339
342
|
return a;
|
|
340
343
|
a++;
|
|
341
344
|
}
|
|
342
345
|
}
|
|
343
|
-
function
|
|
346
|
+
function It(t, n, r, a) {
|
|
344
347
|
const l = [], o = [];
|
|
345
348
|
let s = 0, f = 0;
|
|
346
349
|
for (const D of t) {
|
|
@@ -349,35 +352,35 @@ function _t(t, n, r, a) {
|
|
|
349
352
|
continue;
|
|
350
353
|
const O = G, i = Math.max(1, Math.min(O.w, r)), m = Math.max(1, O.h);
|
|
351
354
|
let p = null;
|
|
352
|
-
for (let
|
|
353
|
-
if (Xe(o,
|
|
355
|
+
for (let g = f; g <= r - i; g++)
|
|
356
|
+
if (Xe(o, g, s, i, m, r)) {
|
|
354
357
|
p = {
|
|
355
|
-
x:
|
|
358
|
+
x: g,
|
|
356
359
|
y: s
|
|
357
360
|
};
|
|
358
361
|
break;
|
|
359
362
|
}
|
|
360
363
|
if (!p) {
|
|
361
|
-
let
|
|
364
|
+
let g = s + 1;
|
|
362
365
|
for (; ; ) {
|
|
363
|
-
for (let
|
|
364
|
-
if (Xe(o,
|
|
366
|
+
for (let b = 0; b <= r - i; b++)
|
|
367
|
+
if (Xe(o, b, g, i, m, r)) {
|
|
365
368
|
p = {
|
|
366
|
-
x:
|
|
367
|
-
y:
|
|
369
|
+
x: b,
|
|
370
|
+
y: g
|
|
368
371
|
};
|
|
369
372
|
break;
|
|
370
373
|
}
|
|
371
374
|
if (p)
|
|
372
375
|
break;
|
|
373
|
-
|
|
376
|
+
g++;
|
|
374
377
|
}
|
|
375
378
|
}
|
|
376
379
|
const {
|
|
377
380
|
x: w,
|
|
378
381
|
y: d
|
|
379
382
|
} = p;
|
|
380
|
-
if (
|
|
383
|
+
if (qt(o, w, d, i, m, r), l.push({
|
|
381
384
|
i: D,
|
|
382
385
|
x: w,
|
|
383
386
|
y: d,
|
|
@@ -391,8 +394,8 @@ function _t(t, n, r, a) {
|
|
|
391
394
|
}), d > s)
|
|
392
395
|
s = d, f = Math.max(0, he(o, s, r, 0)), f === -1 && (s = Ye(o, s, r), f = he(o, s, r, 0));
|
|
393
396
|
else {
|
|
394
|
-
const
|
|
395
|
-
|
|
397
|
+
const g = he(o, s, r, w + i);
|
|
398
|
+
g === -1 ? (s = Ye(o, s, r), f = he(o, s, r, 0)) : f = g;
|
|
396
399
|
}
|
|
397
400
|
}
|
|
398
401
|
return l;
|
|
@@ -400,8 +403,8 @@ function _t(t, n, r, a) {
|
|
|
400
403
|
function ze(t) {
|
|
401
404
|
return [...t].sort((n, r) => n.y - r.y || n.x - r.x).map((n) => n.i);
|
|
402
405
|
}
|
|
403
|
-
const
|
|
404
|
-
function
|
|
406
|
+
const ir = (t) => Object.keys(t).sort((n, r) => (t[r] || 0) - (t[n] || 0))[0] ?? "lg";
|
|
407
|
+
function Bt(t, n, r, a, l = 0, o = 0) {
|
|
405
408
|
const s = t.reduce((i, m) => Math.max(i, m.y + m.h), 0), f = Array.from({
|
|
406
409
|
length: Math.max(s, o) + a + 1
|
|
407
410
|
}, () => Array(n).fill(!1));
|
|
@@ -413,9 +416,9 @@ function qt(t, n, r, a, l = 0, o = 0) {
|
|
|
413
416
|
} of t)
|
|
414
417
|
for (let d = m; d < m + w; d++) {
|
|
415
418
|
f[d] || (f[d] = Array(n).fill(!1));
|
|
416
|
-
const
|
|
417
|
-
for (let
|
|
418
|
-
d >= 0 &&
|
|
419
|
+
const g = f[d];
|
|
420
|
+
for (let b = i; b < i + p; b++)
|
|
421
|
+
d >= 0 && b >= 0 && b < n && g && (g[b] = !0);
|
|
419
422
|
}
|
|
420
423
|
const D = (i, m) => {
|
|
421
424
|
for (let p = m; p < m + a; p++) {
|
|
@@ -446,16 +449,16 @@ function qt(t, n, r, a, l = 0, o = 0) {
|
|
|
446
449
|
O++;
|
|
447
450
|
}
|
|
448
451
|
}
|
|
449
|
-
const
|
|
452
|
+
const sr = (t) => {
|
|
450
453
|
typeof requestAnimationFrame == "function" ? requestAnimationFrame(() => t(!1)) : setTimeout(() => t(!1), 0);
|
|
451
|
-
},
|
|
454
|
+
}, $t = ({ children: t, className: n }) => /* @__PURE__ */ P.jsxDEV(jt, { className: n, children: t }, void 0, !1, {
|
|
452
455
|
fileName: "/home/runner/work/dais-ui/dais-ui/packages/ui-kit/src/components/GridDND/GridDND.tsx",
|
|
453
456
|
lineNumber: 47,
|
|
454
457
|
columnNumber: 1
|
|
455
458
|
}, void 0), Pe = (...t) => (
|
|
456
459
|
// eslint-disable-next-line no-console
|
|
457
460
|
console.log("%c[GridDND]", "color:#6b5b95;font-weight:600", ...t)
|
|
458
|
-
),
|
|
461
|
+
), Vt = ht(
|
|
459
462
|
({
|
|
460
463
|
// Источник истины — последовательность
|
|
461
464
|
items: t,
|
|
@@ -476,8 +479,8 @@ const nr = (t) => {
|
|
|
476
479
|
compactType: p = "horizontal",
|
|
477
480
|
smartCompact: w = !0,
|
|
478
481
|
resizeHandles: d = ["se", "sw", "ne", "nw", "s", "w", "e", "n"],
|
|
479
|
-
draggableHandle:
|
|
480
|
-
draggableCancel:
|
|
482
|
+
draggableHandle: g = `.${U.dragHandle}`,
|
|
483
|
+
draggableCancel: b = `button, input, select, textarea, .${U.noDrag}, .${Ke.topSlot}, .${wt.root}`,
|
|
481
484
|
maxRows: Qe,
|
|
482
485
|
transformScale: Ue,
|
|
483
486
|
// Колбеки
|
|
@@ -489,9 +492,9 @@ const nr = (t) => {
|
|
|
489
492
|
onDragStart: se,
|
|
490
493
|
onDragStop: oe,
|
|
491
494
|
// Контент
|
|
492
|
-
children:
|
|
495
|
+
children: ge,
|
|
493
496
|
// Задержка активации D&D
|
|
494
|
-
dragActivationDelay:
|
|
497
|
+
dragActivationDelay: Ne = 0,
|
|
495
498
|
// Стилизация
|
|
496
499
|
gridItemComponent: He,
|
|
497
500
|
containerStyle: Je,
|
|
@@ -502,7 +505,7 @@ const nr = (t) => {
|
|
|
502
505
|
() => t.map((e) => e.id)
|
|
503
506
|
), J = q(
|
|
504
507
|
Object.fromEntries(t.map((e) => [e.id, ee(e.type)]))
|
|
505
|
-
),
|
|
508
|
+
), be = q(!1), Z = q({
|
|
506
509
|
lg: [],
|
|
507
510
|
md: [],
|
|
508
511
|
sm: [],
|
|
@@ -510,7 +513,7 @@ const nr = (t) => {
|
|
|
510
513
|
xxs: []
|
|
511
514
|
}), K = q("lg"), Q = q(
|
|
512
515
|
[]
|
|
513
|
-
), $ =
|
|
516
|
+
), $ = Ne > 0, [ke, We] = z(!1), [Ce, ve] = z(null), le = q(
|
|
514
517
|
null
|
|
515
518
|
), Ge = q(!1), Oe = q(null), ue = q(null), C = A(() => {
|
|
516
519
|
le.current && (clearTimeout(le.current), le.current = null);
|
|
@@ -536,7 +539,7 @@ const nr = (t) => {
|
|
|
536
539
|
}, h = (y) => {
|
|
537
540
|
const k = y.target;
|
|
538
541
|
return y.offsetX > k.clientWidth || y.offsetY > k.clientHeight;
|
|
539
|
-
},
|
|
542
|
+
}, N = (y) => {
|
|
540
543
|
if (y._synthetic || y.button !== 0 || h(y))
|
|
541
544
|
return;
|
|
542
545
|
C(), x();
|
|
@@ -564,24 +567,24 @@ const nr = (t) => {
|
|
|
564
567
|
xe._synthetic = !0, X.handleEl.dispatchEvent(xe);
|
|
565
568
|
});
|
|
566
569
|
});
|
|
567
|
-
},
|
|
570
|
+
}, Ne);
|
|
568
571
|
}, v = () => {
|
|
569
572
|
C(), x(), ue.current = null, Ge.current || requestAnimationFrame(() => {
|
|
570
573
|
ae();
|
|
571
574
|
});
|
|
572
575
|
};
|
|
573
|
-
return e.addEventListener("pointerdown",
|
|
574
|
-
e.removeEventListener("pointerdown",
|
|
576
|
+
return e.addEventListener("pointerdown", N), document.addEventListener("pointerup", v), () => {
|
|
577
|
+
e.removeEventListener("pointerdown", N), document.removeEventListener("pointerup", v), C(), x();
|
|
575
578
|
};
|
|
576
579
|
},
|
|
577
580
|
[
|
|
578
581
|
$,
|
|
579
|
-
|
|
582
|
+
Ne,
|
|
580
583
|
C,
|
|
581
584
|
ae
|
|
582
585
|
]
|
|
583
586
|
);
|
|
584
|
-
const je = $ ? l && ke : l, [
|
|
587
|
+
const je = $ ? l && ke : l, [I, Se] = z({
|
|
585
588
|
lg: [],
|
|
586
589
|
md: [],
|
|
587
590
|
sm: [],
|
|
@@ -590,10 +593,10 @@ const nr = (t) => {
|
|
|
590
593
|
}), [_e, tt] = z("lg"), [j, rt] = z(
|
|
591
594
|
a.lg ?? Ve
|
|
592
595
|
), [nt, de] = z(p), [it, qe] = z(!1), st = De(
|
|
593
|
-
() =>
|
|
594
|
-
[
|
|
596
|
+
() => g.split(".").join(" "),
|
|
597
|
+
[g]
|
|
595
598
|
), ot = De(
|
|
596
|
-
() => He ??
|
|
599
|
+
() => He ?? $t,
|
|
597
600
|
[He]
|
|
598
601
|
), fe = De(
|
|
599
602
|
() => new Map(t.map((e) => [e.id, e.type])),
|
|
@@ -601,7 +604,7 @@ const nr = (t) => {
|
|
|
601
604
|
), L = q(/* @__PURE__ */ new Map()), me = A(
|
|
602
605
|
(e) => L.current.get(e) ?? fe.get(e) ?? "s",
|
|
603
606
|
[fe]
|
|
604
|
-
),
|
|
607
|
+
), B = A(
|
|
605
608
|
(e) => e.map((u) => ({ id: u, type: me(u) })),
|
|
606
609
|
[me]
|
|
607
610
|
), Me = A(
|
|
@@ -609,19 +612,19 @@ const nr = (t) => {
|
|
|
609
612
|
[a]
|
|
610
613
|
), H = A(
|
|
611
614
|
(e, u, c) => {
|
|
612
|
-
const x = c ?? R, h = u[e] ?? [],
|
|
615
|
+
const x = c ?? R, h = u[e] ?? [], N = Z.current[e] ?? [], v = new Map(h.map((k) => [k.i, k])), y = new Map(N.map((k) => [k.i, k]));
|
|
613
616
|
return x.map((k) => {
|
|
614
617
|
const F = me(k), T = v.get(k) ?? y.get(k) ?? null, W = J.current[k] ?? ee(F), V = T ? { x: T.x, y: T.y, w: T.w, h: T.h } : { x: 0, y: 0, w: W.w, h: W.h };
|
|
615
618
|
return { id: k, type: F, position: V };
|
|
616
619
|
});
|
|
617
620
|
},
|
|
618
621
|
[R, me]
|
|
619
|
-
),
|
|
622
|
+
), Ie = A(
|
|
620
623
|
(e) => {
|
|
621
624
|
const u = Z.current[e] ?? [];
|
|
622
|
-
return u.length ? u :
|
|
625
|
+
return u.length ? u : I[e] ?? [];
|
|
623
626
|
},
|
|
624
|
-
[
|
|
627
|
+
[I]
|
|
625
628
|
), S = A(
|
|
626
629
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
627
630
|
(...e) => {
|
|
@@ -629,9 +632,9 @@ const nr = (t) => {
|
|
|
629
632
|
},
|
|
630
633
|
[Te]
|
|
631
634
|
), pe = A((e) => {
|
|
632
|
-
Z.current = e,
|
|
635
|
+
Z.current = e, be.current = !0, qe(!0), Se(e), requestAnimationFrame(() => {
|
|
633
636
|
requestAnimationFrame(() => {
|
|
634
|
-
|
|
637
|
+
be.current = !1, qe(!1), Pe("[GridDND] reflow window closed");
|
|
635
638
|
});
|
|
636
639
|
});
|
|
637
640
|
}, []), _ = A(
|
|
@@ -639,7 +642,7 @@ const nr = (t) => {
|
|
|
639
642
|
const u = {};
|
|
640
643
|
for (const c of Object.keys(r)) {
|
|
641
644
|
const x = r[c] ?? Y;
|
|
642
|
-
u[c] =
|
|
645
|
+
u[c] = It(
|
|
643
646
|
e,
|
|
644
647
|
J.current,
|
|
645
648
|
x,
|
|
@@ -649,18 +652,18 @@ const nr = (t) => {
|
|
|
649
652
|
return S("reflowAllByOrder", { order: e, out: u }), pe(u), u;
|
|
650
653
|
},
|
|
651
654
|
[r, o, pe, S]
|
|
652
|
-
),
|
|
655
|
+
), Be = A(
|
|
653
656
|
(e, u) => {
|
|
654
657
|
if (!w)
|
|
655
658
|
return;
|
|
656
659
|
const c = Date.now();
|
|
657
660
|
if (Q.current.push({ x: e, y: u, timestamp: c }), Q.current = Q.current.filter(
|
|
658
|
-
(
|
|
661
|
+
(N) => c - N.timestamp <= 300
|
|
659
662
|
), Q.current.length < 2)
|
|
660
663
|
return;
|
|
661
664
|
let x = 0, h = 0;
|
|
662
|
-
for (let
|
|
663
|
-
const v = Q.current[
|
|
665
|
+
for (let N = 1; N < Q.current.length; N += 1) {
|
|
666
|
+
const v = Q.current[N - 1], y = Q.current[N];
|
|
664
667
|
!v || !y || (x += Math.abs(y.x - v.x), h += Math.abs(y.y - v.y));
|
|
665
668
|
}
|
|
666
669
|
x + h < 10 || (x > h * 1.5 ? de("horizontal") : h > x * 1.5 && de("vertical"));
|
|
@@ -689,18 +692,18 @@ const nr = (t) => {
|
|
|
689
692
|
});
|
|
690
693
|
}, [t]);
|
|
691
694
|
const ct = A(
|
|
692
|
-
(e, u, c, x, h,
|
|
693
|
-
Q.current = [], de(p), $ && (Ge.current = !0), se == null || se(e, u, c, x, h,
|
|
695
|
+
(e, u, c, x, h, N) => {
|
|
696
|
+
Q.current = [], de(p), $ && (Ge.current = !0), se == null || se(e, u, c, x, h, N);
|
|
694
697
|
},
|
|
695
698
|
[p, se, $]
|
|
696
699
|
), lt = A(
|
|
697
|
-
(e, u, c, x, h,
|
|
698
|
-
|
|
700
|
+
(e, u, c, x, h, N) => {
|
|
701
|
+
Be(h.clientX, h.clientY), ie == null || ie(e, u, c, x, h, N);
|
|
699
702
|
},
|
|
700
|
-
[
|
|
703
|
+
[Be, ie]
|
|
701
704
|
), ut = A(
|
|
702
|
-
(e, u, c, x, h,
|
|
703
|
-
oe == null || oe(e, u, c, x, h,
|
|
705
|
+
(e, u, c, x, h, N) => {
|
|
706
|
+
oe == null || oe(e, u, c, x, h, N), $ && ae();
|
|
704
707
|
const v = ze(e);
|
|
705
708
|
S("[GridDND] dragStop: nextOrder(readingOrder)", v), ce(v);
|
|
706
709
|
const y = _(v), k = K.current, F = H(k, y, v);
|
|
@@ -712,7 +715,7 @@ const nr = (t) => {
|
|
|
712
715
|
items: F
|
|
713
716
|
},
|
|
714
717
|
y,
|
|
715
|
-
{ itemsOrder: v, itemsOrderTyped:
|
|
718
|
+
{ itemsOrder: v, itemsOrderTyped: B(v) }
|
|
716
719
|
), de(p);
|
|
717
720
|
const T = e, W = y[k];
|
|
718
721
|
Ee(T, W) ? S("[GridDND] dragStop: live layout == target (OK)") : (S(
|
|
@@ -732,7 +735,7 @@ const nr = (t) => {
|
|
|
732
735
|
p,
|
|
733
736
|
$e,
|
|
734
737
|
S,
|
|
735
|
-
|
|
738
|
+
B
|
|
736
739
|
]
|
|
737
740
|
), at = A(
|
|
738
741
|
(e, u) => {
|
|
@@ -742,7 +745,7 @@ const nr = (t) => {
|
|
|
742
745
|
S("[GridDND] onLayoutChange[IGNORED: equals-target]", { bp: c });
|
|
743
746
|
return;
|
|
744
747
|
}
|
|
745
|
-
if (
|
|
748
|
+
if (be.current) {
|
|
746
749
|
S("[GridDND] onLayoutChange[IGNORED: reflow-window]", {
|
|
747
750
|
bp: c,
|
|
748
751
|
cur: e
|
|
@@ -759,7 +762,7 @@ const nr = (t) => {
|
|
|
759
762
|
return;
|
|
760
763
|
}
|
|
761
764
|
Se((y) => ({ ...y, [c]: e.map((k) => ({ ...k })) }));
|
|
762
|
-
const v = H(c, { ...
|
|
765
|
+
const v = H(c, { ...I, [c]: e });
|
|
763
766
|
M == null || M(
|
|
764
767
|
{
|
|
765
768
|
breakpoint: c,
|
|
@@ -767,14 +770,14 @@ const nr = (t) => {
|
|
|
767
770
|
rowHeight: j,
|
|
768
771
|
items: v
|
|
769
772
|
},
|
|
770
|
-
{ ...
|
|
773
|
+
{ ...I, [c]: e },
|
|
771
774
|
{ itemsOrder: R }
|
|
772
775
|
);
|
|
773
776
|
},
|
|
774
777
|
[
|
|
775
778
|
M,
|
|
776
779
|
H,
|
|
777
|
-
|
|
780
|
+
I,
|
|
778
781
|
r,
|
|
779
782
|
j,
|
|
780
783
|
R,
|
|
@@ -807,16 +810,16 @@ const nr = (t) => {
|
|
|
807
810
|
), Re = A(
|
|
808
811
|
(e) => {
|
|
809
812
|
L.current.delete(e), delete J.current[e], ce((u) => {
|
|
810
|
-
const c = u.filter((v) => v !== e), x = _(c), h = K.current,
|
|
811
|
-
return E == null || E(
|
|
813
|
+
const c = u.filter((v) => v !== e), x = _(c), h = K.current, N = H(h, x, c);
|
|
814
|
+
return E == null || E(N), M == null || M(
|
|
812
815
|
{
|
|
813
816
|
breakpoint: h,
|
|
814
817
|
cols: r[h] ?? Y,
|
|
815
818
|
rowHeight: j,
|
|
816
|
-
items:
|
|
819
|
+
items: N
|
|
817
820
|
},
|
|
818
821
|
x,
|
|
819
|
-
{ itemsOrder: c, itemsOrderTyped:
|
|
822
|
+
{ itemsOrder: c, itemsOrderTyped: B(c) }
|
|
820
823
|
), c;
|
|
821
824
|
});
|
|
822
825
|
},
|
|
@@ -827,7 +830,7 @@ const nr = (t) => {
|
|
|
827
830
|
M,
|
|
828
831
|
r,
|
|
829
832
|
j,
|
|
830
|
-
|
|
833
|
+
B
|
|
831
834
|
]
|
|
832
835
|
), Ae = A(
|
|
833
836
|
(e, u) => {
|
|
@@ -839,7 +842,7 @@ const nr = (t) => {
|
|
|
839
842
|
w: Math.max(1, Math.min(h.w, x)),
|
|
840
843
|
h: Math.max(1, h.h)
|
|
841
844
|
};
|
|
842
|
-
const
|
|
845
|
+
const N = _(R), v = H(c, N, R);
|
|
843
846
|
E == null || E(v), M == null || M(
|
|
844
847
|
{
|
|
845
848
|
breakpoint: c,
|
|
@@ -847,8 +850,8 @@ const nr = (t) => {
|
|
|
847
850
|
rowHeight: j,
|
|
848
851
|
items: v
|
|
849
852
|
},
|
|
850
|
-
|
|
851
|
-
{ itemsOrder: R, itemsOrderTyped:
|
|
853
|
+
N,
|
|
854
|
+
{ itemsOrder: R, itemsOrderTyped: B(R) }
|
|
852
855
|
);
|
|
853
856
|
},
|
|
854
857
|
[
|
|
@@ -859,7 +862,7 @@ const nr = (t) => {
|
|
|
859
862
|
E,
|
|
860
863
|
M,
|
|
861
864
|
j,
|
|
862
|
-
|
|
865
|
+
B
|
|
863
866
|
]
|
|
864
867
|
);
|
|
865
868
|
yt(
|
|
@@ -867,7 +870,7 @@ const nr = (t) => {
|
|
|
867
870
|
() => ({
|
|
868
871
|
api: {
|
|
869
872
|
getOrder: () => R,
|
|
870
|
-
getOrderDetailed: () =>
|
|
873
|
+
getOrderDetailed: () => B(R),
|
|
871
874
|
setOrder: (e) => {
|
|
872
875
|
ce(e);
|
|
873
876
|
const u = _(e), c = K.current, x = H(c, u, e);
|
|
@@ -879,7 +882,7 @@ const nr = (t) => {
|
|
|
879
882
|
items: x
|
|
880
883
|
},
|
|
881
884
|
u,
|
|
882
|
-
{ itemsOrder: e, itemsOrderTyped:
|
|
885
|
+
{ itemsOrder: e, itemsOrderTyped: B(e) }
|
|
883
886
|
);
|
|
884
887
|
},
|
|
885
888
|
addItem: (e, u) => {
|
|
@@ -887,12 +890,12 @@ const nr = (t) => {
|
|
|
887
890
|
e.id,
|
|
888
891
|
e.type
|
|
889
892
|
);
|
|
890
|
-
const c = ee(e.type), x = K.current, h = r[x] ?? Y,
|
|
893
|
+
const c = ee(e.type), x = K.current, h = r[x] ?? Y, N = {
|
|
891
894
|
w: Math.max(1, Math.min(c.w, h)),
|
|
892
895
|
h: Math.max(1, c.h)
|
|
893
896
|
};
|
|
894
|
-
J.current[e.id] =
|
|
895
|
-
const v =
|
|
897
|
+
J.current[e.id] = N;
|
|
898
|
+
const v = Ie(x);
|
|
896
899
|
let y = 0, k = 0;
|
|
897
900
|
if (u != null) {
|
|
898
901
|
const xe = Math.max(
|
|
@@ -901,16 +904,16 @@ const nr = (t) => {
|
|
|
901
904
|
), pt = R[xe], we = v.find((xt) => xt.i === pt);
|
|
902
905
|
we && (k = we.y, y = we.x + we.w);
|
|
903
906
|
}
|
|
904
|
-
const F =
|
|
907
|
+
const F = Bt(
|
|
905
908
|
v,
|
|
906
909
|
h,
|
|
907
|
-
|
|
908
|
-
|
|
910
|
+
N.w,
|
|
911
|
+
N.h,
|
|
909
912
|
y,
|
|
910
913
|
k
|
|
911
914
|
), T = v.concat(
|
|
912
915
|
[
|
|
913
|
-
{ i: e.id, x: F.x, y: F.y, w:
|
|
916
|
+
{ i: e.id, x: F.x, y: F.y, w: N.w, h: N.h }
|
|
914
917
|
]
|
|
915
918
|
), W = ze(T);
|
|
916
919
|
ce(W);
|
|
@@ -925,15 +928,15 @@ const nr = (t) => {
|
|
|
925
928
|
V,
|
|
926
929
|
{
|
|
927
930
|
itemsOrder: W,
|
|
928
|
-
itemsOrderTyped:
|
|
931
|
+
itemsOrderTyped: B(W)
|
|
929
932
|
}
|
|
930
933
|
);
|
|
931
934
|
},
|
|
932
935
|
removeItem: Re,
|
|
933
936
|
setItemType: Ae,
|
|
934
|
-
getAllLayouts: () =>
|
|
937
|
+
getAllLayouts: () => I,
|
|
935
938
|
getCurrentLayout: () => {
|
|
936
|
-
const e = K.current, u = H(e,
|
|
939
|
+
const e = K.current, u = H(e, I, R);
|
|
937
940
|
return {
|
|
938
941
|
breakpoint: e,
|
|
939
942
|
cols: r[e] ?? Y,
|
|
@@ -947,23 +950,23 @@ const nr = (t) => {
|
|
|
947
950
|
Re,
|
|
948
951
|
Ae,
|
|
949
952
|
R,
|
|
950
|
-
|
|
953
|
+
B,
|
|
951
954
|
_,
|
|
952
955
|
H,
|
|
953
956
|
E,
|
|
954
957
|
M,
|
|
955
958
|
r,
|
|
956
959
|
j,
|
|
957
|
-
|
|
958
|
-
|
|
960
|
+
Ie,
|
|
961
|
+
I
|
|
959
962
|
]
|
|
960
963
|
);
|
|
961
964
|
const mt = De(
|
|
962
|
-
() => H(_e,
|
|
963
|
-
[_e,
|
|
965
|
+
() => H(_e, I, R),
|
|
966
|
+
[_e, I, R, H]
|
|
964
967
|
);
|
|
965
968
|
return /* @__PURE__ */ P.jsxDEV(
|
|
966
|
-
|
|
969
|
+
Tt,
|
|
967
970
|
{
|
|
968
971
|
ref: Oe,
|
|
969
972
|
style: {
|
|
@@ -971,10 +974,10 @@ const nr = (t) => {
|
|
|
971
974
|
...$ && ke ? { userSelect: "none", touchAction: "none" } : {}
|
|
972
975
|
},
|
|
973
976
|
children: /* @__PURE__ */ P.jsxDEV(
|
|
974
|
-
|
|
977
|
+
Ft,
|
|
975
978
|
{
|
|
976
979
|
className: "layout",
|
|
977
|
-
layouts:
|
|
980
|
+
layouts: I,
|
|
978
981
|
breakpoints: n,
|
|
979
982
|
cols: r,
|
|
980
983
|
rowHeight: j,
|
|
@@ -990,8 +993,8 @@ const nr = (t) => {
|
|
|
990
993
|
compactType: it ? null : w ? nt : p,
|
|
991
994
|
allowOverlap: G,
|
|
992
995
|
isBounded: O,
|
|
993
|
-
draggableHandle:
|
|
994
|
-
draggableCancel:
|
|
996
|
+
draggableHandle: g,
|
|
997
|
+
draggableCancel: b,
|
|
995
998
|
resizeHandles: o ? d : [],
|
|
996
999
|
maxRows: Qe,
|
|
997
1000
|
transformScale: Ue,
|
|
@@ -1002,7 +1005,7 @@ const nr = (t) => {
|
|
|
1002
1005
|
style: { background: "transparent", ...Ze },
|
|
1003
1006
|
children: mt.map(
|
|
1004
1007
|
(e) => /* @__PURE__ */ P.jsxDEV(
|
|
1005
|
-
|
|
1008
|
+
Wt,
|
|
1006
1009
|
{
|
|
1007
1010
|
$isDraggable: $ ? ke && Ce === e.id : l,
|
|
1008
1011
|
children: /* @__PURE__ */ P.jsxDEV(
|
|
@@ -1010,11 +1013,11 @@ const nr = (t) => {
|
|
|
1010
1013
|
{
|
|
1011
1014
|
isDraggable: je,
|
|
1012
1015
|
className: st,
|
|
1013
|
-
children: typeof
|
|
1016
|
+
children: typeof ge == "function" ? ge(
|
|
1014
1017
|
e,
|
|
1015
1018
|
() => Re(e.id),
|
|
1016
1019
|
(u) => Ae(e.id, u)
|
|
1017
|
-
) :
|
|
1020
|
+
) : ge
|
|
1018
1021
|
},
|
|
1019
1022
|
void 0,
|
|
1020
1023
|
!1,
|
|
@@ -1057,26 +1060,27 @@ const nr = (t) => {
|
|
|
1057
1060
|
void 0
|
|
1058
1061
|
);
|
|
1059
1062
|
}
|
|
1060
|
-
),
|
|
1061
|
-
ItemWrapper:
|
|
1063
|
+
), Xt = Object.assign(Vt, {
|
|
1064
|
+
ItemWrapper: At
|
|
1062
1065
|
});
|
|
1063
|
-
|
|
1066
|
+
Xt.displayName = "GridDND";
|
|
1064
1067
|
export {
|
|
1065
|
-
|
|
1068
|
+
Xt as G,
|
|
1066
1069
|
U as a,
|
|
1067
1070
|
Ve as b,
|
|
1068
|
-
|
|
1069
|
-
|
|
1071
|
+
Ct as c,
|
|
1072
|
+
rr as d,
|
|
1070
1073
|
tr as e,
|
|
1071
1074
|
Y as f,
|
|
1072
|
-
|
|
1073
|
-
|
|
1075
|
+
Ht as g,
|
|
1076
|
+
nr as h,
|
|
1074
1077
|
ee as i,
|
|
1075
|
-
|
|
1076
|
-
|
|
1078
|
+
St as j,
|
|
1079
|
+
ir as k,
|
|
1077
1080
|
Ee as l,
|
|
1078
|
-
|
|
1079
|
-
|
|
1081
|
+
Bt as m,
|
|
1082
|
+
er as o,
|
|
1083
|
+
It as p,
|
|
1080
1084
|
ze as r,
|
|
1081
|
-
|
|
1085
|
+
sr as u
|
|
1082
1086
|
};
|