@kingteza/crud-component 1.0.63 → 1.0.65
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/crud/CrudComponent.cjs.js +1 -1
- package/crud/CrudComponent.d.ts +2 -2
- package/crud/CrudComponent.es.js +96 -185
- package/crud/actions/index.cjs.js +1 -0
- package/crud/actions/index.d.ts +26 -0
- package/crud/actions/index.es.js +83 -0
- package/crud/index.d.ts +4 -0
- package/crud/modal/index.cjs.js +1 -0
- package/crud/modal/index.d.ts +24 -0
- package/crud/modal/index.es.js +146 -0
- package/crud/view/CrudDecListView.cjs.js +1 -1
- package/crud/view/CrudDecListView.d.ts +5 -4
- package/crud/view/CrudDecListView.es.js +38 -26
- package/crud/view/CrudViewer.cjs.js +1 -1
- package/crud/view/CrudViewer.d.ts +7 -17
- package/crud/view/CrudViewer.es.js +243 -270
- package/index.cjs.js +1 -1
- package/index.es.js +24 -20
- package/package.json +1 -1
|
@@ -1,331 +1,304 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsx as e, jsxs as L, Fragment as ot } from "react/jsx-runtime";
|
|
2
2
|
import { Modal as It } from "antd";
|
|
3
3
|
import { DndContext as St } from "@dnd-kit/core";
|
|
4
|
-
import { restrictToVerticalAxis as
|
|
5
|
-
import { CSS as
|
|
6
|
-
import { arrayMove as
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import {
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import {
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
import ct from "../../util/CrudUtil.es.js";
|
|
23
|
-
import Kt from "../../common/layout/VerticalSpace.es.js";
|
|
24
|
-
const Qt = ut.memo(wt);
|
|
25
|
-
function yo({
|
|
4
|
+
import { restrictToVerticalAxis as Tt } from "@dnd-kit/modifiers";
|
|
5
|
+
import { CSS as Rt } from "@dnd-kit/utilities";
|
|
6
|
+
import { arrayMove as nt, SortableContext as lt, verticalListSortingStrategy as Bt, useSortable as Dt } from "@dnd-kit/sortable";
|
|
7
|
+
import Nt from "../../common/button/Button.es.js";
|
|
8
|
+
import { RefreshButton as dt } from "../../common/button/RefreshButton.es.js";
|
|
9
|
+
import jt from "../../common/button/ViewButtonTable.es.js";
|
|
10
|
+
import Et from "../actions/index.es.js";
|
|
11
|
+
import Lt from "../../common/table/table.es.js";
|
|
12
|
+
import mt, { useMemo as h, useState as V, useEffect as rt, useCallback as et, useContext as Mt } from "react";
|
|
13
|
+
import { useTranslationLib as Ot } from "../../locale/index.es.js";
|
|
14
|
+
import zt from "../CrudSearchComponent.es.js";
|
|
15
|
+
import { CrudDecListView as Vt } from "./CrudDecListView.es.js";
|
|
16
|
+
import { getRendererValueCrudViewer as ct } from "./CrudViewerUtil.es.js";
|
|
17
|
+
import { HolderOutlined as kt } from "@ant-design/icons";
|
|
18
|
+
import st from "../../util/CrudUtil.es.js";
|
|
19
|
+
import vt from "../../common/layout/VerticalSpace.es.js";
|
|
20
|
+
const At = mt.memo(Lt);
|
|
21
|
+
function ro({
|
|
26
22
|
idField: o = "id",
|
|
27
|
-
loadingData:
|
|
23
|
+
loadingData: C,
|
|
28
24
|
fields: u,
|
|
29
|
-
isDeleting:
|
|
30
|
-
isHiding:
|
|
31
|
-
viewable:
|
|
32
|
-
paginateProps:
|
|
33
|
-
onDelete:
|
|
34
|
-
onHide:
|
|
35
|
-
onUpdate:
|
|
36
|
-
data:
|
|
37
|
-
extraAction:
|
|
38
|
-
onClickUpdate:
|
|
39
|
-
minusHeight:
|
|
40
|
-
scroll:
|
|
41
|
-
onClickClone:
|
|
42
|
-
className:
|
|
43
|
-
expandable:
|
|
44
|
-
size:
|
|
45
|
-
bordered:
|
|
46
|
-
descListColumn:
|
|
47
|
-
extraView:
|
|
48
|
-
decListLayout:
|
|
49
|
-
scrollToTop:
|
|
50
|
-
onClickRefresh:
|
|
51
|
-
closeViewOnClickUpdate:
|
|
52
|
-
onExport:
|
|
53
|
-
confirmHiding:
|
|
54
|
-
confirmDeleting:
|
|
55
|
-
rowClassName:
|
|
56
|
-
actionWidth:
|
|
57
|
-
draggable:
|
|
58
|
-
...
|
|
25
|
+
isDeleting: D,
|
|
26
|
+
isHiding: R,
|
|
27
|
+
viewable: c = !1,
|
|
28
|
+
paginateProps: p,
|
|
29
|
+
onDelete: x,
|
|
30
|
+
onHide: N,
|
|
31
|
+
onUpdate: I,
|
|
32
|
+
data: S = [],
|
|
33
|
+
extraAction: d,
|
|
34
|
+
onClickUpdate: j,
|
|
35
|
+
minusHeight: M,
|
|
36
|
+
scroll: k,
|
|
37
|
+
onClickClone: v,
|
|
38
|
+
className: A,
|
|
39
|
+
expandable: _,
|
|
40
|
+
size: $,
|
|
41
|
+
bordered: q,
|
|
42
|
+
descListColumn: ft,
|
|
43
|
+
extraView: O,
|
|
44
|
+
decListLayout: it,
|
|
45
|
+
scrollToTop: qt,
|
|
46
|
+
onClickRefresh: G,
|
|
47
|
+
closeViewOnClickUpdate: J,
|
|
48
|
+
onExport: K,
|
|
49
|
+
confirmHiding: Q,
|
|
50
|
+
confirmDeleting: X,
|
|
51
|
+
rowClassName: Y,
|
|
52
|
+
actionWidth: Z = 190,
|
|
53
|
+
draggable: t,
|
|
54
|
+
...pt
|
|
59
55
|
}) {
|
|
60
|
-
const { t:
|
|
61
|
-
() => u.map(
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
}
|
|
74
|
-
),
|
|
56
|
+
const { t: P } = Ot(), W = h(
|
|
57
|
+
() => u.map(({ hideInTable: n, hidden: r, width: s, label: f, halign: T, ...B }) => {
|
|
58
|
+
const E = st.getRealName(B.name);
|
|
59
|
+
return {
|
|
60
|
+
title: f,
|
|
61
|
+
width: s,
|
|
62
|
+
key: E,
|
|
63
|
+
dataIndex: E,
|
|
64
|
+
hidden: n || r,
|
|
65
|
+
align: T ?? (B.type === "number" ? "right" : void 0),
|
|
66
|
+
render: ct(B)
|
|
67
|
+
};
|
|
68
|
+
}),
|
|
75
69
|
[u]
|
|
76
|
-
), [
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
}, [
|
|
80
|
-
|
|
81
|
-
if (
|
|
82
|
-
return
|
|
70
|
+
), [m, l] = V(), [H, U] = V(), [y, w] = V([]);
|
|
71
|
+
rt(() => {
|
|
72
|
+
S && w(S);
|
|
73
|
+
}, [S]), rt(() => {
|
|
74
|
+
S && l((n) => {
|
|
75
|
+
if (n)
|
|
76
|
+
return S.find((r) => r[o] === n[o]);
|
|
83
77
|
});
|
|
84
|
-
}, [
|
|
85
|
-
const
|
|
86
|
-
(
|
|
87
|
-
var
|
|
88
|
-
const
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
E && /* @__PURE__ */ s(Et, { value: t, onClick: (e) => E(e) }),
|
|
101
|
-
z && /* @__PURE__ */ s(
|
|
102
|
-
Mt,
|
|
103
|
-
{
|
|
104
|
-
value: t,
|
|
105
|
-
onClick: async (e) => await z(e)
|
|
106
|
-
}
|
|
107
|
-
),
|
|
108
|
-
x && /* @__PURE__ */ s(
|
|
109
|
-
Ot,
|
|
110
|
-
{
|
|
111
|
-
value: t,
|
|
112
|
-
disabled: S,
|
|
113
|
-
shouldConfirm: k,
|
|
114
|
-
loading: S && t[o] === V,
|
|
115
|
-
onClick: async (e) => {
|
|
116
|
-
w(e[o]), await x({ [o]: e[o] });
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
),
|
|
120
|
-
y && /* @__PURE__ */ s(
|
|
121
|
-
Lt,
|
|
122
|
-
{
|
|
123
|
-
value: t,
|
|
124
|
-
disabled: R,
|
|
125
|
-
shouldConfirm: H,
|
|
126
|
-
loading: R && t[o] === V,
|
|
127
|
-
onClick: async (e) => {
|
|
128
|
-
w(e[o]), await y({ [o]: e[o] });
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
)
|
|
132
|
-
] }) : void 0;
|
|
133
|
-
},
|
|
134
|
-
[
|
|
135
|
-
W,
|
|
136
|
-
H,
|
|
137
|
-
k,
|
|
138
|
-
C,
|
|
139
|
-
o,
|
|
140
|
-
R,
|
|
141
|
-
S,
|
|
142
|
-
E,
|
|
143
|
-
l,
|
|
144
|
-
y,
|
|
145
|
-
z,
|
|
146
|
-
x,
|
|
147
|
-
v,
|
|
148
|
-
V
|
|
149
|
-
]
|
|
150
|
-
), g = K(
|
|
151
|
-
(t) => {
|
|
152
|
-
var e;
|
|
153
|
-
const { active: n, over: m } = t;
|
|
154
|
-
if (r != null && r.onDragEnd && (r == null || r.onDragEnd(t)), n.id !== (m == null ? void 0 : m.id)) {
|
|
155
|
-
const $ = p.findIndex(
|
|
156
|
-
(i) => i[o] === n.id
|
|
157
|
-
), N = p.findIndex(
|
|
158
|
-
(i) => i[o] === (m == null ? void 0 : m.id)
|
|
159
|
-
), M = et(p, $, N);
|
|
160
|
-
F((i) => {
|
|
161
|
-
const vt = i.findIndex(
|
|
162
|
-
(q) => q[o] === (n == null ? void 0 : n.id)
|
|
163
|
-
), Tt = i.findIndex(
|
|
164
|
-
(q) => q[o] === (m == null ? void 0 : m.id)
|
|
78
|
+
}, [S, o, m]);
|
|
79
|
+
const F = et(
|
|
80
|
+
(n) => {
|
|
81
|
+
var f;
|
|
82
|
+
const { active: r, over: s } = n;
|
|
83
|
+
if (t != null && t.onDragEnd && (t == null || t.onDragEnd(n)), r.id !== (s == null ? void 0 : s.id)) {
|
|
84
|
+
const T = y.findIndex(
|
|
85
|
+
(i) => i[o] === r.id
|
|
86
|
+
), B = y.findIndex(
|
|
87
|
+
(i) => i[o] === (s == null ? void 0 : s.id)
|
|
88
|
+
), E = nt(y, T, B);
|
|
89
|
+
w((i) => {
|
|
90
|
+
const Ct = i.findIndex(
|
|
91
|
+
(z) => z[o] === (r == null ? void 0 : r.id)
|
|
92
|
+
), xt = i.findIndex(
|
|
93
|
+
(z) => z[o] === (s == null ? void 0 : s.id)
|
|
165
94
|
);
|
|
166
|
-
return
|
|
167
|
-
}), (
|
|
168
|
-
newOrder:
|
|
95
|
+
return nt(i, Ct, xt);
|
|
96
|
+
}), (f = t == null ? void 0 : t.onDrag) == null || f.call(t, {
|
|
97
|
+
newOrder: E.map((i) => i[o])
|
|
169
98
|
});
|
|
170
99
|
}
|
|
171
100
|
},
|
|
172
|
-
[
|
|
173
|
-
),
|
|
174
|
-
let
|
|
175
|
-
if (typeof
|
|
176
|
-
const
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
101
|
+
[y, o, t]
|
|
102
|
+
), yt = h(() => {
|
|
103
|
+
let n = typeof c == "string" ? m == null ? void 0 : m[c] : void 0;
|
|
104
|
+
if (typeof n == "object") {
|
|
105
|
+
const r = u.find((s) => st.getRealName(s.name) === c);
|
|
106
|
+
n = ct(r)(
|
|
107
|
+
n,
|
|
108
|
+
m,
|
|
180
109
|
0
|
|
181
110
|
);
|
|
182
111
|
}
|
|
183
|
-
return
|
|
184
|
-
}, [
|
|
112
|
+
return n;
|
|
113
|
+
}, [c, m, u]), a = h(
|
|
185
114
|
() => ({
|
|
186
|
-
rowClassName:
|
|
187
|
-
className:
|
|
188
|
-
scroll:
|
|
115
|
+
rowClassName: Y,
|
|
116
|
+
className: A,
|
|
117
|
+
scroll: k ?? (M ? { y: `calc(100vh - ${M})` } : void 0),
|
|
189
118
|
id: "crud-table",
|
|
190
|
-
bordered:
|
|
191
|
-
size:
|
|
192
|
-
expandable:
|
|
119
|
+
bordered: q,
|
|
120
|
+
size: $,
|
|
121
|
+
expandable: _
|
|
193
122
|
}),
|
|
194
|
-
[
|
|
195
|
-
),
|
|
196
|
-
() =>
|
|
197
|
-
total:
|
|
198
|
-
onChange:
|
|
199
|
-
current:
|
|
200
|
-
pageSize:
|
|
123
|
+
[Y, A, k, M, q, $, _]
|
|
124
|
+
), b = h(
|
|
125
|
+
() => p ? {
|
|
126
|
+
total: p.count,
|
|
127
|
+
onChange: p.setPage,
|
|
128
|
+
current: p.page,
|
|
129
|
+
pageSize: p.pageSize
|
|
201
130
|
} : void 0,
|
|
202
|
-
[
|
|
203
|
-
),
|
|
204
|
-
const
|
|
205
|
-
return
|
|
131
|
+
[p]
|
|
132
|
+
), g = h(() => {
|
|
133
|
+
const n = I || j || x || d || c, r = [];
|
|
134
|
+
return t && r.push({
|
|
206
135
|
key: "key",
|
|
207
136
|
align: "center",
|
|
208
137
|
width: 5,
|
|
209
|
-
title:
|
|
210
|
-
render: () => /* @__PURE__ */
|
|
211
|
-
}),
|
|
212
|
-
title:
|
|
138
|
+
title: t == null ? void 0 : t.columnLabel,
|
|
139
|
+
render: () => /* @__PURE__ */ e(_t, { tooltip: t == null ? void 0 : t.tooltip })
|
|
140
|
+
}), r.push(...W), n && n && r.push({
|
|
141
|
+
title: P("str.action"),
|
|
213
142
|
fixed: "right",
|
|
214
|
-
width:
|
|
215
|
-
render: (
|
|
216
|
-
|
|
217
|
-
|
|
143
|
+
width: Z,
|
|
144
|
+
render: (s, f) => /* @__PURE__ */ L(ot, { children: [
|
|
145
|
+
c && /* @__PURE__ */ e(
|
|
146
|
+
jt,
|
|
147
|
+
{
|
|
148
|
+
value: f,
|
|
149
|
+
onClick: typeof c == "object" ? () => {
|
|
150
|
+
var T;
|
|
151
|
+
return (T = c.onClick) == null ? void 0 : T.call(c, f);
|
|
152
|
+
} : l
|
|
153
|
+
}
|
|
154
|
+
),
|
|
155
|
+
/* @__PURE__ */ e(
|
|
156
|
+
Et,
|
|
157
|
+
{
|
|
158
|
+
data: f,
|
|
159
|
+
idField: o,
|
|
160
|
+
extraAction: d,
|
|
161
|
+
onUpdate: I,
|
|
162
|
+
onClickUpdate: j,
|
|
163
|
+
onClickClone: v,
|
|
164
|
+
onDelete: x,
|
|
165
|
+
onHide: N,
|
|
166
|
+
onExport: K,
|
|
167
|
+
isHiding: R,
|
|
168
|
+
isDeleting: D,
|
|
169
|
+
confirmHiding: Q,
|
|
170
|
+
confirmDeleting: X,
|
|
171
|
+
closeViewOnClickUpdate: J,
|
|
172
|
+
recentUpdateOrDeleteId: H,
|
|
173
|
+
setRecentUpdateOrDeleteId: U,
|
|
174
|
+
setOpenView: l
|
|
175
|
+
}
|
|
176
|
+
)
|
|
218
177
|
] })
|
|
219
|
-
}),
|
|
178
|
+
}), r;
|
|
220
179
|
}, [
|
|
180
|
+
W,
|
|
181
|
+
I,
|
|
182
|
+
j,
|
|
183
|
+
x,
|
|
221
184
|
d,
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
() => p.map((t) => t[o]),
|
|
232
|
-
[p, o]
|
|
233
|
-
), pt = K(() => {
|
|
234
|
-
const t = /* @__PURE__ */ s(
|
|
235
|
-
Qt,
|
|
185
|
+
c,
|
|
186
|
+
P,
|
|
187
|
+
Z
|
|
188
|
+
]), tt = h(
|
|
189
|
+
() => y.map((n) => n[o]),
|
|
190
|
+
[y, o]
|
|
191
|
+
), ht = et(() => {
|
|
192
|
+
const n = /* @__PURE__ */ e(
|
|
193
|
+
At,
|
|
236
194
|
{
|
|
237
|
-
...
|
|
238
|
-
dataSource:
|
|
239
|
-
loading:
|
|
240
|
-
components:
|
|
241
|
-
pagination:
|
|
242
|
-
columns:
|
|
195
|
+
...a,
|
|
196
|
+
dataSource: y,
|
|
197
|
+
loading: C,
|
|
198
|
+
components: t ? { body: { row: $t } } : void 0,
|
|
199
|
+
pagination: b,
|
|
200
|
+
columns: g
|
|
243
201
|
}
|
|
244
202
|
);
|
|
245
|
-
return
|
|
246
|
-
|
|
203
|
+
return t ? /* @__PURE__ */ e(St, { modifiers: [Tt], onDragEnd: F, children: /* @__PURE__ */ e(
|
|
204
|
+
lt,
|
|
247
205
|
{
|
|
248
|
-
items:
|
|
249
|
-
strategy:
|
|
250
|
-
children:
|
|
206
|
+
items: tt,
|
|
207
|
+
strategy: Bt,
|
|
208
|
+
children: n
|
|
251
209
|
}
|
|
252
|
-
) }) :
|
|
210
|
+
) }) : n;
|
|
253
211
|
}, [
|
|
212
|
+
a,
|
|
213
|
+
y,
|
|
214
|
+
C,
|
|
215
|
+
b,
|
|
216
|
+
g,
|
|
217
|
+
t,
|
|
254
218
|
tt,
|
|
255
|
-
|
|
256
|
-
I,
|
|
257
|
-
ot,
|
|
258
|
-
nt,
|
|
259
|
-
r,
|
|
260
|
-
rt,
|
|
261
|
-
g
|
|
219
|
+
F
|
|
262
220
|
]);
|
|
263
|
-
return /* @__PURE__ */
|
|
264
|
-
|
|
221
|
+
return /* @__PURE__ */ L("div", { children: [
|
|
222
|
+
typeof c == "boolean" || typeof c == "string" && /* @__PURE__ */ e(
|
|
265
223
|
It,
|
|
266
224
|
{
|
|
267
225
|
width: "100%",
|
|
268
|
-
open: !!
|
|
269
|
-
title:
|
|
270
|
-
footer: /* @__PURE__ */
|
|
226
|
+
open: !!m,
|
|
227
|
+
title: yt ?? /* @__PURE__ */ e("div", { children: " " }),
|
|
228
|
+
footer: /* @__PURE__ */ e(ot, {}),
|
|
271
229
|
closable: !0,
|
|
272
|
-
onCancel: () =>
|
|
273
|
-
children: !!
|
|
274
|
-
/* @__PURE__ */
|
|
275
|
-
|
|
230
|
+
onCancel: () => l(void 0),
|
|
231
|
+
children: !!m && /* @__PURE__ */ L("div", { children: [
|
|
232
|
+
/* @__PURE__ */ e(
|
|
233
|
+
Vt,
|
|
276
234
|
{
|
|
277
|
-
layout:
|
|
278
|
-
descListColumn:
|
|
279
|
-
data:
|
|
235
|
+
layout: it,
|
|
236
|
+
descListColumn: ft,
|
|
237
|
+
data: m,
|
|
280
238
|
fields: u,
|
|
281
|
-
|
|
239
|
+
idField: o,
|
|
240
|
+
extraAction: d,
|
|
241
|
+
onUpdate: I,
|
|
242
|
+
onClickUpdate: j,
|
|
243
|
+
onClickClone: v,
|
|
244
|
+
onDelete: x,
|
|
245
|
+
onHide: N,
|
|
246
|
+
onExport: K,
|
|
247
|
+
isHiding: R,
|
|
248
|
+
isDeleting: D,
|
|
249
|
+
confirmHiding: Q,
|
|
250
|
+
confirmDeleting: X,
|
|
251
|
+
closeViewOnClickUpdate: J,
|
|
252
|
+
recentUpdateOrDeleteId: H,
|
|
253
|
+
setRecentUpdateOrDeleteId: U,
|
|
254
|
+
setOpenView: l
|
|
282
255
|
}
|
|
283
256
|
),
|
|
284
|
-
|
|
285
|
-
] },
|
|
257
|
+
O == null ? void 0 : O(m)
|
|
258
|
+
] }, m == null ? void 0 : m[o])
|
|
286
259
|
}
|
|
287
260
|
),
|
|
288
|
-
/* @__PURE__ */
|
|
289
|
-
/* @__PURE__ */
|
|
290
|
-
!!
|
|
291
|
-
|
|
261
|
+
/* @__PURE__ */ e(zt, { fields: u, ...pt }),
|
|
262
|
+
/* @__PURE__ */ L(vt, { children: [
|
|
263
|
+
!!G && /* @__PURE__ */ e(dt, { onClick: G }),
|
|
264
|
+
ht()
|
|
292
265
|
] })
|
|
293
266
|
] });
|
|
294
267
|
}
|
|
295
|
-
const
|
|
296
|
-
const { setActivatorNodeRef:
|
|
297
|
-
return /* @__PURE__ */
|
|
298
|
-
|
|
268
|
+
const ut = mt.createContext({}), _t = ({ tooltip: o }) => {
|
|
269
|
+
const { setActivatorNodeRef: C, listeners: u } = Mt(ut);
|
|
270
|
+
return /* @__PURE__ */ e(
|
|
271
|
+
Nt,
|
|
299
272
|
{
|
|
300
273
|
type: "text",
|
|
301
274
|
size: "small",
|
|
302
275
|
tooltip: o,
|
|
303
|
-
icon: /* @__PURE__ */
|
|
276
|
+
icon: /* @__PURE__ */ e(kt, {}),
|
|
304
277
|
style: { cursor: "move", border: "none" },
|
|
305
|
-
ref:
|
|
278
|
+
ref: C,
|
|
306
279
|
...u
|
|
307
280
|
}
|
|
308
281
|
);
|
|
309
|
-
},
|
|
282
|
+
}, $t = (o) => {
|
|
310
283
|
const {
|
|
311
|
-
attributes:
|
|
284
|
+
attributes: C,
|
|
312
285
|
listeners: u,
|
|
313
|
-
setNodeRef:
|
|
314
|
-
setActivatorNodeRef:
|
|
315
|
-
transform:
|
|
316
|
-
transition:
|
|
317
|
-
isDragging:
|
|
318
|
-
} =
|
|
286
|
+
setNodeRef: D,
|
|
287
|
+
setActivatorNodeRef: R,
|
|
288
|
+
transform: c,
|
|
289
|
+
transition: p,
|
|
290
|
+
isDragging: x
|
|
291
|
+
} = Dt({ id: o["data-row-key"] }), N = {
|
|
319
292
|
...o.style,
|
|
320
|
-
transform:
|
|
321
|
-
transition:
|
|
322
|
-
...
|
|
323
|
-
},
|
|
324
|
-
() => ({ setActivatorNodeRef:
|
|
325
|
-
[
|
|
293
|
+
transform: Rt.Translate.toString(c),
|
|
294
|
+
transition: p,
|
|
295
|
+
...x ? { position: "relative", zIndex: 9999 } : {}
|
|
296
|
+
}, I = h(
|
|
297
|
+
() => ({ setActivatorNodeRef: R, listeners: u }),
|
|
298
|
+
[R, u]
|
|
326
299
|
);
|
|
327
|
-
return /* @__PURE__ */
|
|
300
|
+
return /* @__PURE__ */ e(ut.Provider, { value: I, children: /* @__PURE__ */ e("tr", { ...o, ref: D, style: N, ...C }) });
|
|
328
301
|
};
|
|
329
302
|
export {
|
|
330
|
-
|
|
303
|
+
ro as default
|
|
331
304
|
};
|
package/index.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./locale/hooks/translation-constants.cjs.js"),u=require("./locale/index.cjs.js"),l=require("./crud/CrudComponent.cjs.js"),r=require("./crud/CrudField.cjs.js"),t=require("./crud/CrudFormWizard.cjs.js"),C=require("./crud/CrudReportComponent.cjs.js"),n=require("./crud/CrudSearchComponent.cjs.js"),e=require("./crud/ImageCrudField.cjs.js"),o=require("./crud/FileCrudField.cjs.js"),a=require("./crud/import/CrudImportComponent.cjs.js"),s=require("./crud/import/CrudImportButton.cjs.js"),m=require("./crud/actions/index.cjs.js"),F=require("./crud/view/CrudViewer.cjs.js"),d=require("./crud/CrudForm.cjs.js"),c=require("./crud/modal/index.cjs.js"),p=require("./crud/view/CrudDecListView.cjs.js"),V=require("./crud/view/CrudViewerUtil.cjs.js");exports.TRANSLATION_NAMESPACE=i.TRANSLATION_NAMESPACE;exports.setupI18n=u.setupI18n;exports.updateTranslations=u.updateTranslations;exports.CrudComponent=l;exports.ColorCrudFieldComponent=r.ColorCrudFieldComponent;exports.CrudField=r.default;exports.SelectCrudFieldComponent=r.SelectCrudFieldComponent;exports.CrudFormWizard=t;exports.CrudReportComponent=C;exports.CrudSearchComponent=n;exports.FileDownloadProvider=e.FileDownloadProvider;exports.FileUploadProvider=e.FileUploadProvider;exports.ImageCellValue=e.ImageCellValue;exports.ImageCrudCellValue=e.ImageCrudCellValue;exports.ImageCrudField=e.default;exports.FileCellValue=o.FileCellValue;exports.FileCrudCellValue=o.FileCrudCellValue;exports.FileCrudField=o.default;exports.CrudImportComponent=a;exports.CrudImportButton=s;exports.CrudActions=m;exports.CrudViewer=F;exports.CrudForm=d.CrudForm;exports.CrudFormFields=d.CrudFormFields;exports.CrudModal=c;exports.CrudDecListView=p.CrudDecListView;exports.getRendererValueCrudViewer=V.getRendererValueCrudViewer;
|
package/index.es.js
CHANGED
|
@@ -1,42 +1,46 @@
|
|
|
1
1
|
import { TRANSLATION_NAMESPACE as o } from "./locale/hooks/translation-constants.es.js";
|
|
2
2
|
import { setupI18n as d, updateTranslations as l } from "./locale/index.es.js";
|
|
3
|
-
import { default as
|
|
4
|
-
import { ColorCrudFieldComponent as m, default as
|
|
3
|
+
import { default as u } from "./crud/CrudComponent.es.js";
|
|
4
|
+
import { ColorCrudFieldComponent as m, default as f, SelectCrudFieldComponent as p } from "./crud/CrudField.es.js";
|
|
5
5
|
import { default as n } from "./crud/CrudFormWizard.es.js";
|
|
6
6
|
import { default as x } from "./crud/CrudReportComponent.es.js";
|
|
7
7
|
import { default as V } from "./crud/CrudSearchComponent.es.js";
|
|
8
|
-
import { FileDownloadProvider as
|
|
8
|
+
import { FileDownloadProvider as A, FileUploadProvider as c, ImageCellValue as g, ImageCrudCellValue as w, default as S } from "./crud/ImageCrudField.es.js";
|
|
9
9
|
import { FileCellValue as P, FileCrudCellValue as R, default as T } from "./crud/FileCrudField.es.js";
|
|
10
10
|
import { default as D } from "./crud/import/CrudImportComponent.es.js";
|
|
11
11
|
import { default as L } from "./crud/import/CrudImportButton.es.js";
|
|
12
|
-
import { default as
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
12
|
+
import { default as h } from "./crud/actions/index.es.js";
|
|
13
|
+
import { default as B } from "./crud/view/CrudViewer.es.js";
|
|
14
|
+
import { CrudForm as U, CrudFormFields as W } from "./crud/CrudForm.es.js";
|
|
15
|
+
import { default as b } from "./crud/modal/index.es.js";
|
|
16
|
+
import { CrudDecListView as k } from "./crud/view/CrudDecListView.es.js";
|
|
17
|
+
import { getRendererValueCrudViewer as y } from "./crud/view/CrudViewerUtil.es.js";
|
|
16
18
|
export {
|
|
17
19
|
m as ColorCrudFieldComponent,
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
h as CrudActions,
|
|
21
|
+
u as CrudComponent,
|
|
22
|
+
k as CrudDecListView,
|
|
23
|
+
f as CrudField,
|
|
24
|
+
U as CrudForm,
|
|
25
|
+
W as CrudFormFields,
|
|
23
26
|
n as CrudFormWizard,
|
|
24
27
|
L as CrudImportButton,
|
|
25
28
|
D as CrudImportComponent,
|
|
29
|
+
b as CrudModal,
|
|
26
30
|
x as CrudReportComponent,
|
|
27
31
|
V as CrudSearchComponent,
|
|
28
|
-
|
|
32
|
+
B as CrudViewer,
|
|
29
33
|
P as FileCellValue,
|
|
30
34
|
R as FileCrudCellValue,
|
|
31
35
|
T as FileCrudField,
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
A as FileDownloadProvider,
|
|
37
|
+
c as FileUploadProvider,
|
|
38
|
+
g as ImageCellValue,
|
|
39
|
+
w as ImageCrudCellValue,
|
|
40
|
+
S as ImageCrudField,
|
|
41
|
+
p as SelectCrudFieldComponent,
|
|
38
42
|
o as TRANSLATION_NAMESPACE,
|
|
39
|
-
|
|
43
|
+
y as getRendererValueCrudViewer,
|
|
40
44
|
d as setupI18n,
|
|
41
45
|
l as updateTranslations
|
|
42
46
|
};
|