@mittwald/flow-react-components 0.1.0-alpha.190 → 0.1.0-alpha.192
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/List.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
/* */
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var r = (
|
|
6
|
-
import n, { createContext as
|
|
3
|
+
var mt = Object.defineProperty;
|
|
4
|
+
var ht = (a, t, e) => t in a ? mt(a, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[t] = e;
|
|
5
|
+
var r = (a, t, e) => ht(a, typeof t != "symbol" ? t + "" : t, e);
|
|
6
|
+
import n, { createContext as gt, useContext as pt, createElement as Y, useState as Q, useRef as ft, useEffect as z, cloneElement as bt } from "react";
|
|
7
7
|
import "./propsContext-DzAKlmhS.js";
|
|
8
8
|
import { P as St } from "./PropsContextProvider-C6Z4XGp6.js";
|
|
9
9
|
import "@react-aria/utils";
|
|
@@ -13,8 +13,8 @@ import { B as p } from "./Button-CVDWL-od.js";
|
|
|
13
13
|
import "@tabler/icons-react";
|
|
14
14
|
import "./Icon-CUhvR1IT.js";
|
|
15
15
|
import { I as Ct } from "./IconContextMenu-C9_95BDt.js";
|
|
16
|
-
import { a as
|
|
17
|
-
import { M as
|
|
16
|
+
import { a as k, C as X } from "./ContextMenuTrigger-CvljOFns.js";
|
|
17
|
+
import { M as Z } from "./MenuItem-DaY0bRCQ.js";
|
|
18
18
|
import { useLocalizedStringFormatter as S } from "react-aria";
|
|
19
19
|
import { TunnelProvider as Ft, TunnelExit as $ } from "@mittwald/react-tunnel";
|
|
20
20
|
import E from "clsx";
|
|
@@ -22,35 +22,34 @@ import { g as Lt } from "./getContainerBreakpointSizeClassName-BrcFDcCY.js";
|
|
|
22
22
|
import { f as Tt } from "./flowComponent-COVzhVCB.js";
|
|
23
23
|
import { R as It } from "./Render-BdlTa7Qb.js";
|
|
24
24
|
import { T as f } from "./Text-DQmfbsPC.js";
|
|
25
|
-
import { I as
|
|
25
|
+
import { I as _ } from "./IconChevronDown-0Qm5hGlw.js";
|
|
26
26
|
import { I as kt } from "./IconClose-BHf4btna.js";
|
|
27
|
-
import {
|
|
27
|
+
import { makeObservable as At, observable as U, computed as O, action as F } from "mobx";
|
|
28
28
|
import "./context-BB3_MApL.js";
|
|
29
|
-
import { u as
|
|
30
|
-
import { S as
|
|
31
|
-
import { getProperty as
|
|
32
|
-
import { hash as
|
|
33
|
-
import { useReactTable as
|
|
34
|
-
import
|
|
35
|
-
import { useLocalObservable as Ht } from "mobx-react-lite";
|
|
29
|
+
import { u as xt } from "./useOnChange-C1Quwyuz.js";
|
|
30
|
+
import { S as Bt } from "./SearchField-Dbr_5Zy4.js";
|
|
31
|
+
import { getProperty as Pt } from "dot-prop";
|
|
32
|
+
import { hash as Dt } from "object-code";
|
|
33
|
+
import { useReactTable as Vt, getCoreRowModel as Nt, getSortedRowModel as Rt, getFilteredRowModel as Mt, getPaginationRowModel as zt, getFacetedUniqueValues as $t } from "@tanstack/react-table";
|
|
34
|
+
import tt from "invariant";
|
|
36
35
|
import { getAsyncResource as q } from "@mittwald/react-use-promise";
|
|
37
36
|
import { u as H } from "./useSelector-DpU7_HMO.js";
|
|
38
|
-
import * as
|
|
39
|
-
import { I as
|
|
40
|
-
import { I as
|
|
41
|
-
import { H as
|
|
37
|
+
import * as A from "react-aria-components";
|
|
38
|
+
import { I as Ut } from "./IllustratedMessage-B3MHD01M.js";
|
|
39
|
+
import { I as Ot } from "./IconSearch-D6QHaNuF.js";
|
|
40
|
+
import { H as et } from "./Heading-BzwQly28.js";
|
|
42
41
|
import { d as b, a as K } from "./deepFindOfType-6pG0fH7S.js";
|
|
43
|
-
import { ListLoaderAsyncResource as
|
|
44
|
-
import { S as
|
|
45
|
-
const
|
|
46
|
-
view:
|
|
47
|
-
title:
|
|
48
|
-
topContent:
|
|
49
|
-
content:
|
|
50
|
-
action:
|
|
51
|
-
avatar:
|
|
52
|
-
text:
|
|
53
|
-
heading:
|
|
42
|
+
import { ListLoaderAsyncResource as qt, TypedListLoaderAsyncResource as Ht } from "./List/ListLoaderAsyncResource.js";
|
|
43
|
+
import { S as Kt } from "./Skeleton-CKLaTmDR.js";
|
|
44
|
+
const Gt = "flow--list--items--item--view", jt = "flow--list--items--item--view--title", Wt = "flow--list--items--item--view--top-content", Jt = "flow--list--items--item--view--content", Yt = "flow--list--items--item--view--action", Qt = "flow--list--items--item--view--avatar", Xt = "flow--list--items--item--view--text", Zt = "flow--list--items--item--view--heading", m = {
|
|
45
|
+
view: Gt,
|
|
46
|
+
title: jt,
|
|
47
|
+
topContent: Wt,
|
|
48
|
+
content: Jt,
|
|
49
|
+
action: Yt,
|
|
50
|
+
avatar: Qt,
|
|
51
|
+
text: Xt,
|
|
52
|
+
heading: Zt,
|
|
54
53
|
"container-breakpoint-size-xs": "flow--list--items--item--view--container-breakpoint-size-xs",
|
|
55
54
|
"container-breakpoint-size-s": "flow--list--items--item--view--container-breakpoint-size-s",
|
|
56
55
|
"container-breakpoint-size-m": "flow--list--items--item--view--container-breakpoint-size-m",
|
|
@@ -60,23 +59,23 @@ const Yt = "flow--list--items--item--view", Qt = "flow--list--items--item--view-
|
|
|
60
59
|
"list.noResult.heading": "Keine Suchergebnisse gefunden",
|
|
61
60
|
"list.noResult.text": "Deine Suche ergab keine Ergebnisse. Bitte passe die Suchanfrage oder deine Filter an.",
|
|
62
61
|
"list.options": "Optionen",
|
|
63
|
-
"list.paginationInfo": (
|
|
62
|
+
"list.paginationInfo": (a) => `${a.visibleItemsCount} von insgesamt ${a.totalItemsCount} angezeigt`,
|
|
64
63
|
"list.resetAll": "Alles zurücksetzen",
|
|
65
|
-
"list.setSorting": (
|
|
64
|
+
"list.setSorting": (a) => `Sortierung: ${a.property}`,
|
|
66
65
|
"list.showMore": "Mehr anzeigen",
|
|
67
66
|
"list.sorting": "Sortierung"
|
|
68
67
|
}, "en-EN": {
|
|
69
68
|
"list.noResult.heading": "No search results found",
|
|
70
69
|
"list.noResult.text": "Your search did not return any results. Please adjust the search query or your filters.",
|
|
71
70
|
"list.options": "Options",
|
|
72
|
-
"list.paginationInfo": (
|
|
71
|
+
"list.paginationInfo": (a) => `Showing ${a.visibleItemsCount} of ${a.totalItemsCount}`,
|
|
73
72
|
"list.resetAll": "Reset filters",
|
|
74
|
-
"list.setSorting": (
|
|
73
|
+
"list.setSorting": (a) => `Sorting: ${a.property}`,
|
|
75
74
|
"list.showMore": "Show more",
|
|
76
75
|
"list.sorting": "Sorting"
|
|
77
|
-
} },
|
|
78
|
-
const { className: t, children: e } =
|
|
79
|
-
return /* @__PURE__ */ n.createElement(
|
|
76
|
+
} }, _t = (a) => {
|
|
77
|
+
const { className: t, children: e } = a, s = S(g);
|
|
78
|
+
return /* @__PURE__ */ n.createElement(k, null, /* @__PURE__ */ n.createElement(
|
|
80
79
|
p,
|
|
81
80
|
{
|
|
82
81
|
variant: "plain",
|
|
@@ -85,17 +84,17 @@ const Yt = "flow--list--items--item--view", Qt = "flow--list--items--item--view-
|
|
|
85
84
|
},
|
|
86
85
|
/* @__PURE__ */ n.createElement(Ct, null)
|
|
87
86
|
), e);
|
|
88
|
-
},
|
|
89
|
-
const { children: t, className: e, containerBreakpointSize: s = "m" } =
|
|
87
|
+
}, te = (a) => a === "top" ? m.topContent : a === "bottom" ? m.content : m.topContent, st = (a) => {
|
|
88
|
+
const { children: t, className: e, containerBreakpointSize: s = "m" } = a, i = {
|
|
90
89
|
ContextMenu: {
|
|
91
|
-
wrapWith: /* @__PURE__ */ n.createElement(
|
|
90
|
+
wrapWith: /* @__PURE__ */ n.createElement(_t, { className: m.action }),
|
|
92
91
|
placement: "bottom end"
|
|
93
92
|
},
|
|
94
93
|
Button: {
|
|
95
94
|
className: m.action
|
|
96
95
|
},
|
|
97
96
|
Content: {
|
|
98
|
-
className: Et((l) =>
|
|
97
|
+
className: Et((l) => te(l.slot)),
|
|
99
98
|
tunnelId: "topContent"
|
|
100
99
|
},
|
|
101
100
|
Avatar: {
|
|
@@ -119,21 +118,21 @@ const Yt = "flow--list--items--item--view", Qt = "flow--list--items--item--view-
|
|
|
119
118
|
e,
|
|
120
119
|
m[Lt(s)]
|
|
121
120
|
);
|
|
122
|
-
return /* @__PURE__ */ n.createElement("div", { className: o }, /* @__PURE__ */ n.createElement(St, { props:
|
|
123
|
-
},
|
|
121
|
+
return /* @__PURE__ */ n.createElement("div", { className: o }, /* @__PURE__ */ n.createElement(St, { props: i }, /* @__PURE__ */ n.createElement(Ft, null, t, /* @__PURE__ */ n.createElement("div", { className: m.title }, /* @__PURE__ */ n.createElement($, { id: "title" })), /* @__PURE__ */ n.createElement($, { id: "topContent" }))));
|
|
122
|
+
}, it = gt({}), h = () => pt(it).list, ee = () => h().loader.getLoaderInvocationHooks().map((t, e) => /* @__PURE__ */ n.createElement(It, { key: e }, () => {
|
|
124
123
|
t();
|
|
125
|
-
})),
|
|
126
|
-
const { sorting: t } =
|
|
127
|
-
return /* @__PURE__ */ n.createElement(
|
|
128
|
-
},
|
|
129
|
-
const { children: t, locales: e, variables: s } =
|
|
124
|
+
})), se = (a) => {
|
|
125
|
+
const { sorting: t } = a;
|
|
126
|
+
return /* @__PURE__ */ n.createElement(Z, { id: t.id }, t.name);
|
|
127
|
+
}, L = (a) => {
|
|
128
|
+
const { children: t, locales: e, variables: s } = a;
|
|
130
129
|
return S(e).format(t, s);
|
|
131
|
-
},
|
|
132
|
-
const
|
|
130
|
+
}, ie = () => {
|
|
131
|
+
const a = h(), t = a.visibleSorting.map((i) => /* @__PURE__ */ n.createElement(se, { sorting: i, key: i.id }));
|
|
133
132
|
if (t.length === 0)
|
|
134
133
|
return null;
|
|
135
|
-
const e =
|
|
136
|
-
|
|
134
|
+
const e = a.visibleSorting.find((i) => i.isSorted()), s = /* @__PURE__ */ n.createElement(f, null, e ? /* @__PURE__ */ n.createElement(
|
|
135
|
+
L,
|
|
137
136
|
{
|
|
138
137
|
locales: g,
|
|
139
138
|
variables: {
|
|
@@ -141,21 +140,21 @@ const Yt = "flow--list--items--item--view", Qt = "flow--list--items--item--view-
|
|
|
141
140
|
}
|
|
142
141
|
},
|
|
143
142
|
"list.setSorting"
|
|
144
|
-
) : /* @__PURE__ */ n.createElement(
|
|
145
|
-
return /* @__PURE__ */ n.createElement(
|
|
146
|
-
|
|
143
|
+
) : /* @__PURE__ */ n.createElement(L, { locales: g }, "list.sorting"));
|
|
144
|
+
return /* @__PURE__ */ n.createElement(k, null, /* @__PURE__ */ n.createElement(p, { variant: "soft", size: "s", color: "secondary" }, s, /* @__PURE__ */ n.createElement(_, null)), /* @__PURE__ */ n.createElement(
|
|
145
|
+
X,
|
|
147
146
|
{
|
|
148
147
|
selectionMode: "single",
|
|
149
148
|
selectedKeys: e ? [e.id] : [],
|
|
150
|
-
onAction: (
|
|
151
|
-
|
|
149
|
+
onAction: (i) => {
|
|
150
|
+
a.getSorting(String(i)).enable();
|
|
152
151
|
}
|
|
153
152
|
},
|
|
154
153
|
t
|
|
155
154
|
));
|
|
156
|
-
},
|
|
157
|
-
const { filter: t } =
|
|
158
|
-
|
|
155
|
+
}, ae = (a) => {
|
|
156
|
+
const { filter: t } = a, { values: e, mode: s, name: i, property: o } = t, l = e.map((c) => /* @__PURE__ */ n.createElement(
|
|
157
|
+
Z,
|
|
159
158
|
{
|
|
160
159
|
id: c.id,
|
|
161
160
|
key: c.id,
|
|
@@ -165,24 +164,24 @@ const Yt = "flow--list--items--item--view", Qt = "flow--list--items--item--view-
|
|
|
165
164
|
},
|
|
166
165
|
c.render()
|
|
167
166
|
)), u = e.filter((c) => c.isActive).map((c) => c.id);
|
|
168
|
-
return /* @__PURE__ */ n.createElement(
|
|
169
|
-
|
|
167
|
+
return /* @__PURE__ */ n.createElement(k, null, /* @__PURE__ */ n.createElement(p, { variant: "soft", size: "s", color: "secondary" }, /* @__PURE__ */ n.createElement(f, null, i ?? o), /* @__PURE__ */ n.createElement(_, null)), /* @__PURE__ */ n.createElement(
|
|
168
|
+
X,
|
|
170
169
|
{
|
|
171
170
|
selectionMode: s === "one" ? "single" : "multiple",
|
|
172
171
|
selectedKeys: u
|
|
173
172
|
},
|
|
174
173
|
l
|
|
175
174
|
));
|
|
176
|
-
},
|
|
177
|
-
header:
|
|
178
|
-
pickerListAndSearch:
|
|
179
|
-
pickerList:
|
|
180
|
-
searchField:
|
|
181
|
-
},
|
|
182
|
-
activeFilters:
|
|
183
|
-
clearButton:
|
|
184
|
-
},
|
|
185
|
-
const
|
|
175
|
+
}, ne = "flow--list--header", re = "flow--list--header--picker-list-and-search", oe = "flow--list--header--picker-list", le = "flow--list--header--search-field", y = {
|
|
176
|
+
header: ne,
|
|
177
|
+
pickerListAndSearch: re,
|
|
178
|
+
pickerList: oe,
|
|
179
|
+
searchField: le
|
|
180
|
+
}, ce = "flow--list--header--active-filters", ue = "flow--list--header--active-filters--clear-button", G = {
|
|
181
|
+
activeFilters: ce,
|
|
182
|
+
clearButton: ue
|
|
183
|
+
}, de = () => {
|
|
184
|
+
const a = h(), t = a.filters.flatMap(
|
|
186
185
|
(e) => e.values.filter((s) => s.isActive).map((s) => /* @__PURE__ */ n.createElement(
|
|
187
186
|
p,
|
|
188
187
|
{
|
|
@@ -201,49 +200,49 @@ const Yt = "flow--list--items--item--view", Qt = "flow--list--items--item--view-
|
|
|
201
200
|
className: G.clearButton,
|
|
202
201
|
size: "s",
|
|
203
202
|
variant: "plain",
|
|
204
|
-
onPress: () =>
|
|
203
|
+
onPress: () => a.clearFilters()
|
|
205
204
|
},
|
|
206
|
-
/* @__PURE__ */ n.createElement(
|
|
205
|
+
/* @__PURE__ */ n.createElement(L, { locales: g }, "list.resetAll")
|
|
207
206
|
));
|
|
208
|
-
},
|
|
209
|
-
const { className: t, onChange: e, value: s, ...
|
|
210
|
-
|
|
207
|
+
}, me = (a) => {
|
|
208
|
+
const { className: t, onChange: e, value: s, ...i } = a, [o, l] = Q(s ?? "");
|
|
209
|
+
xt(s, () => {
|
|
211
210
|
l(s ?? "");
|
|
212
211
|
}, [o]);
|
|
213
212
|
const u = () => {
|
|
214
213
|
e(void 0), l("");
|
|
215
|
-
}, c = (
|
|
216
|
-
|
|
214
|
+
}, c = (d) => {
|
|
215
|
+
d.key === "Enter" ? o.trim() === "" ? e(void 0) : e(o) : d.key === "Escape" && u();
|
|
217
216
|
};
|
|
218
217
|
return /* @__PURE__ */ n.createElement(
|
|
219
|
-
|
|
218
|
+
Bt,
|
|
220
219
|
{
|
|
221
220
|
className: t,
|
|
222
221
|
value: o,
|
|
223
222
|
onKeyUp: c,
|
|
224
|
-
onChange: (
|
|
223
|
+
onChange: (d) => l(d),
|
|
225
224
|
onClear: u,
|
|
226
|
-
...
|
|
225
|
+
...i
|
|
227
226
|
}
|
|
228
227
|
);
|
|
229
|
-
},
|
|
230
|
-
const { className: t, search: e } =
|
|
228
|
+
}, he = (a) => {
|
|
229
|
+
const { className: t, search: e } = a, s = e.render ?? me;
|
|
231
230
|
return Y(s, {
|
|
232
231
|
className: t,
|
|
233
232
|
value: e.value,
|
|
234
233
|
onChange: e.setValue.bind(e),
|
|
235
234
|
...e.textFieldProps
|
|
236
235
|
});
|
|
237
|
-
},
|
|
238
|
-
const { className: t } =
|
|
236
|
+
}, ge = (a) => {
|
|
237
|
+
const { className: t } = a, e = h();
|
|
239
238
|
if (e.filters.length === 0 && e.visibleSorting.length === 0 && !e.search)
|
|
240
239
|
return null;
|
|
241
|
-
const s = e.filters.map((
|
|
242
|
-
return /* @__PURE__ */ n.createElement("div", { className: E(t, y.header) }, /* @__PURE__ */ n.createElement("div", { className: y.pickerListAndSearch }, /* @__PURE__ */ n.createElement("div", { className: y.pickerList }, /* @__PURE__ */ n.createElement(
|
|
243
|
-
},
|
|
244
|
-
list:
|
|
240
|
+
const s = e.filters.map((i) => /* @__PURE__ */ n.createElement(ae, { key: i.property, filter: i }));
|
|
241
|
+
return /* @__PURE__ */ n.createElement("div", { className: E(t, y.header) }, /* @__PURE__ */ n.createElement("div", { className: y.pickerListAndSearch }, /* @__PURE__ */ n.createElement("div", { className: y.pickerList }, /* @__PURE__ */ n.createElement(ie, null), s), e.search && /* @__PURE__ */ n.createElement(he, { className: y.searchField, search: e.search })), /* @__PURE__ */ n.createElement(de, null));
|
|
242
|
+
}, pe = "flow--list", fe = {
|
|
243
|
+
list: pe
|
|
245
244
|
};
|
|
246
|
-
let
|
|
245
|
+
let be = class at {
|
|
247
246
|
constructor(t, e, s) {
|
|
248
247
|
r(this, "id");
|
|
249
248
|
r(this, "data");
|
|
@@ -254,22 +253,22 @@ let we = class at {
|
|
|
254
253
|
return new at(t, e.id, e.original);
|
|
255
254
|
}
|
|
256
255
|
};
|
|
257
|
-
class
|
|
256
|
+
class Se {
|
|
258
257
|
constructor(t) {
|
|
259
258
|
r(this, "list");
|
|
260
259
|
this.list = t;
|
|
261
260
|
}
|
|
262
261
|
get entries() {
|
|
263
|
-
return this.list.reactTable.table.getRowModel().rows.map((t) =>
|
|
262
|
+
return this.list.reactTable.table.getRowModel().rows.map((t) => be.fromRow(this, t));
|
|
264
263
|
}
|
|
265
264
|
}
|
|
266
|
-
class
|
|
265
|
+
class ve {
|
|
267
266
|
constructor(t, e = {}) {
|
|
268
267
|
r(this, "batchSize");
|
|
269
268
|
r(this, "list");
|
|
270
|
-
var
|
|
269
|
+
var i;
|
|
271
270
|
const { batchSize: s = 20 } = e;
|
|
272
|
-
this.list = t, this.batchSize = s, t.filters.forEach((o) => o.onFilterUpdated(() => this.reset())), (
|
|
271
|
+
this.list = t, this.batchSize = s, t.filters.forEach((o) => o.onFilterUpdated(() => this.reset())), (i = t.search) == null || i.onUpdated(() => this.reset());
|
|
273
272
|
}
|
|
274
273
|
get reactTable() {
|
|
275
274
|
return this.list.reactTable.table;
|
|
@@ -310,7 +309,7 @@ class Ce {
|
|
|
310
309
|
}
|
|
311
310
|
}
|
|
312
311
|
}
|
|
313
|
-
const
|
|
312
|
+
const ye = "$";
|
|
314
313
|
class j {
|
|
315
314
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
316
315
|
constructor(t, e) {
|
|
@@ -322,7 +321,7 @@ class j {
|
|
|
322
321
|
return vt(this.value, t.value);
|
|
323
322
|
}
|
|
324
323
|
get id() {
|
|
325
|
-
return `${this.filter.property}@@${
|
|
324
|
+
return `${this.filter.property}@@${Dt(this.value)}`;
|
|
326
325
|
}
|
|
327
326
|
get isActive() {
|
|
328
327
|
return this.filter.isValueActive(this);
|
|
@@ -337,8 +336,8 @@ class j {
|
|
|
337
336
|
this.filter.deactivateValue(this);
|
|
338
337
|
}
|
|
339
338
|
}
|
|
340
|
-
const
|
|
341
|
-
class
|
|
339
|
+
const we = (a, t) => a === t, Ee = (a) => String(a);
|
|
340
|
+
class Ce {
|
|
342
341
|
constructor(t, e) {
|
|
343
342
|
r(this, "_values");
|
|
344
343
|
r(this, "list");
|
|
@@ -349,28 +348,28 @@ class Ie {
|
|
|
349
348
|
r(this, "name");
|
|
350
349
|
r(this, "onFilterUpdateCallbacks", /* @__PURE__ */ new Set());
|
|
351
350
|
var s;
|
|
352
|
-
this.list = t, this.property = e.property, this.mode = e.mode ?? "one", this._values = (s = e.values) == null ? void 0 : s.map((
|
|
351
|
+
this.list = t, this.property = e.property, this.mode = e.mode ?? "one", this._values = (s = e.values) == null ? void 0 : s.map((i) => new j(this, i)), this.matcher = e.matcher ?? we, this.renderItem = e.renderItem ?? Ee, this.name = e.name;
|
|
353
352
|
}
|
|
354
353
|
updateTableColumnDef(t) {
|
|
355
354
|
t.enableColumnFilter = !0, t.filterFn = this.getReactTableFilterFn();
|
|
356
355
|
}
|
|
357
356
|
getReactTableFilterFn() {
|
|
358
357
|
return (t, e, s) => {
|
|
359
|
-
const
|
|
358
|
+
const i = this.property, o = i.startsWith(ye) ? t.original : Pt(t.original, i);
|
|
360
359
|
return this.checkFilterMatches(o, s);
|
|
361
360
|
};
|
|
362
361
|
}
|
|
363
362
|
checkFilterMatches(t, e) {
|
|
364
363
|
if (e === null)
|
|
365
364
|
return !0;
|
|
366
|
-
const s = (o) => Array.isArray(o) ? o : [o],
|
|
365
|
+
const s = (o) => Array.isArray(o) ? o : [o], i = (o) => this.matcher(o.value, t);
|
|
367
366
|
if (this.mode === "all")
|
|
368
|
-
return s(e).every(
|
|
367
|
+
return s(e).every(i);
|
|
369
368
|
if (this.mode === "some") {
|
|
370
369
|
const o = s(e);
|
|
371
|
-
return o.length === 0 || o.some(
|
|
370
|
+
return o.length === 0 || o.some(i);
|
|
372
371
|
} else if (this.mode === "one")
|
|
373
|
-
return
|
|
372
|
+
return i(e);
|
|
374
373
|
throw new Error(`Unknown filter mode '${this.mode}'`);
|
|
375
374
|
}
|
|
376
375
|
getTableColumnFilter() {
|
|
@@ -401,7 +400,7 @@ class Ie {
|
|
|
401
400
|
deactivateValue(t) {
|
|
402
401
|
const e = this.getArrayValue();
|
|
403
402
|
let s;
|
|
404
|
-
this.mode === "all" || this.mode === "some" ? s = e.filter((
|
|
403
|
+
this.mode === "all" || this.mode === "some" ? s = e.filter((i) => !i.equals(t)) : s = null, this.list.reactTable.getTableColumn(this.property).setFilterValue(s), this.onFilterUpdateCallbacks.forEach((i) => i());
|
|
405
404
|
}
|
|
406
405
|
clearValues() {
|
|
407
406
|
let t;
|
|
@@ -410,13 +409,13 @@ class Ie {
|
|
|
410
409
|
toggleValue(t) {
|
|
411
410
|
const e = this.getArrayValue();
|
|
412
411
|
let s;
|
|
413
|
-
this.mode === "all" || this.mode === "some" ? t.isActive ? s = e.filter((
|
|
412
|
+
this.mode === "all" || this.mode === "some" ? t.isActive ? s = e.filter((i) => !i.equals(t)) : s = [...e, t] : s = t.isActive ? null : t, this.list.reactTable.getTableColumn(this.property).setFilterValue(s), this.onFilterUpdateCallbacks.forEach((i) => i());
|
|
414
413
|
}
|
|
415
414
|
onFilterUpdated(t) {
|
|
416
415
|
this.onFilterUpdateCallbacks.add(t);
|
|
417
416
|
}
|
|
418
417
|
}
|
|
419
|
-
class
|
|
418
|
+
class Fe {
|
|
420
419
|
constructor(t, e) {
|
|
421
420
|
r(this, "list");
|
|
422
421
|
r(this, "property");
|
|
@@ -450,77 +449,66 @@ class ke {
|
|
|
450
449
|
return `${this.getTableColumn().id}:${this.direction}`;
|
|
451
450
|
}
|
|
452
451
|
}
|
|
453
|
-
|
|
454
|
-
class B {
|
|
452
|
+
class x {
|
|
455
453
|
constructor(t, e = {}) {
|
|
456
454
|
r(this, "list");
|
|
457
455
|
r(this, "table");
|
|
458
|
-
r(this, "
|
|
459
|
-
r(this, "
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
});
|
|
468
|
-
this.list = t, this.tableState = Ht(() => ({ value: void 0 })), this.table = this.useReactTable(e);
|
|
456
|
+
r(this, "sortingState");
|
|
457
|
+
r(this, "updateSortingState");
|
|
458
|
+
this.list = t;
|
|
459
|
+
const s = this.list.sorting.filter(
|
|
460
|
+
(l) => l.defaultEnabled !== !1
|
|
461
|
+
), [i, o] = Q(
|
|
462
|
+
s.map((l) => l.getReactTableColumnSort())
|
|
463
|
+
);
|
|
464
|
+
this.sortingState = i, this.updateSortingState = o, this.table = this.useReactTable(e);
|
|
469
465
|
}
|
|
470
466
|
static useNew(t, e = {}) {
|
|
471
|
-
return new
|
|
467
|
+
return new x(t, e);
|
|
472
468
|
}
|
|
473
469
|
useReactTable(t = {}) {
|
|
474
|
-
const e = this.list.loader.useData()
|
|
475
|
-
|
|
476
|
-
), a = zt({
|
|
470
|
+
const e = this.list.loader.useData();
|
|
471
|
+
return Vt({
|
|
477
472
|
data: e,
|
|
473
|
+
state: {
|
|
474
|
+
sorting: this.sortingState
|
|
475
|
+
},
|
|
478
476
|
initialState: {
|
|
479
477
|
pagination: {
|
|
480
478
|
pageSize: this.list.batches.batchSize
|
|
481
|
-
}
|
|
482
|
-
sorting: s.map((o) => o.getReactTableColumnSort())
|
|
479
|
+
}
|
|
483
480
|
},
|
|
484
481
|
columns: this.getTableColumnDefs(),
|
|
485
|
-
getCoreRowModel:
|
|
486
|
-
getSortedRowModel:
|
|
487
|
-
getFilteredRowModel:
|
|
488
|
-
getPaginationRowModel:
|
|
489
|
-
getFacetedUniqueValues:
|
|
490
|
-
|
|
482
|
+
getCoreRowModel: Nt(),
|
|
483
|
+
getSortedRowModel: Rt(),
|
|
484
|
+
getFilteredRowModel: Mt(),
|
|
485
|
+
getPaginationRowModel: zt(),
|
|
486
|
+
getFacetedUniqueValues: $t(),
|
|
487
|
+
onSortingChange: (i) => {
|
|
488
|
+
this.handleSortingStateUpdate(i);
|
|
489
|
+
},
|
|
491
490
|
globalFilterFn: "auto",
|
|
492
491
|
...t
|
|
493
492
|
});
|
|
494
|
-
return this.useUpdateTableState(a), a;
|
|
495
|
-
}
|
|
496
|
-
useUpdateTableState(t) {
|
|
497
|
-
Ae(() => {
|
|
498
|
-
const e = this.tableState.value;
|
|
499
|
-
e ? t.setOptions((s) => ({
|
|
500
|
-
...s,
|
|
501
|
-
state: Bt(e)
|
|
502
|
-
})) : this.tableState.value = t.getState();
|
|
503
|
-
});
|
|
504
493
|
}
|
|
505
|
-
|
|
506
|
-
const e = this.list.sorting.filter(
|
|
507
|
-
(
|
|
508
|
-
).map((
|
|
509
|
-
|
|
494
|
+
handleSortingStateUpdate(t) {
|
|
495
|
+
const e = typeof t == "function" ? t(this.sortingState) : t, s = this.list.sorting.filter(
|
|
496
|
+
(i) => i.defaultEnabled === "hidden" && !e.some((o) => o.id === i.property)
|
|
497
|
+
).map((i) => i.getReactTableColumnSort());
|
|
498
|
+
this.updateSortingState([...s, ...e]);
|
|
510
499
|
}
|
|
511
500
|
get searchString() {
|
|
512
|
-
|
|
513
|
-
return (t = this.tableState.value) == null ? void 0 : t.globalFilter;
|
|
501
|
+
return this.table.getState().globalFilter;
|
|
514
502
|
}
|
|
515
503
|
getTableColumn(t) {
|
|
516
504
|
const e = this.table.getColumn(t);
|
|
517
|
-
return
|
|
505
|
+
return tt(!!e, `Column #${t} is not defined`), e;
|
|
518
506
|
}
|
|
519
507
|
getTableColumnDefs() {
|
|
520
508
|
const t = /* @__PURE__ */ new Map(), e = (s) => {
|
|
521
|
-
const
|
|
522
|
-
if (
|
|
523
|
-
return
|
|
509
|
+
const i = t.get(s);
|
|
510
|
+
if (i)
|
|
511
|
+
return i;
|
|
524
512
|
const o = {
|
|
525
513
|
id: s,
|
|
526
514
|
accessorKey: s,
|
|
@@ -536,12 +524,12 @@ class B {
|
|
|
536
524
|
), Array.from(t.values());
|
|
537
525
|
}
|
|
538
526
|
}
|
|
539
|
-
class
|
|
527
|
+
class B {
|
|
540
528
|
constructor() {
|
|
541
529
|
r(this, "dataBatches", []);
|
|
542
530
|
r(this, "prevDataBatches", []);
|
|
543
531
|
r(this, "batchLoadingStates", ["void"]);
|
|
544
|
-
|
|
532
|
+
At(this, {
|
|
545
533
|
prevDataBatches: !1,
|
|
546
534
|
useMergedData: !1,
|
|
547
535
|
useIsLoading: !1,
|
|
@@ -555,7 +543,7 @@ class P {
|
|
|
555
543
|
});
|
|
556
544
|
}
|
|
557
545
|
static useNew() {
|
|
558
|
-
return ft(new
|
|
546
|
+
return ft(new B()).current;
|
|
559
547
|
}
|
|
560
548
|
reset() {
|
|
561
549
|
this.batchLoadingStates = [], this.dataBatches = [];
|
|
@@ -579,8 +567,8 @@ class P {
|
|
|
579
567
|
return H(() => this.isLoading);
|
|
580
568
|
}
|
|
581
569
|
}
|
|
582
|
-
const
|
|
583
|
-
class
|
|
570
|
+
const Le = [];
|
|
571
|
+
class P {
|
|
584
572
|
constructor(t, e = {}) {
|
|
585
573
|
r(this, "list");
|
|
586
574
|
r(this, "dataSource");
|
|
@@ -590,12 +578,12 @@ class D {
|
|
|
590
578
|
r(this, "loaderState");
|
|
591
579
|
var u;
|
|
592
580
|
const { source: s } = e;
|
|
593
|
-
this.dataSource = s ?? { staticData:
|
|
594
|
-
const
|
|
595
|
-
this.list = t, this.loaderState =
|
|
581
|
+
this.dataSource = s ?? { staticData: Le };
|
|
582
|
+
const i = "manualPagination" in this.dataSource ? this.dataSource.manualPagination : void 0, o = "manualFiltering" in this.dataSource ? this.dataSource.manualFiltering : void 0, l = "manualSorting" in this.dataSource ? this.dataSource.manualSorting : void 0;
|
|
583
|
+
this.list = t, this.loaderState = B.useNew(), this.manualPagination = i ?? !1, this.manualFiltering = o ?? this.manualPagination, this.manualSorting = l ?? this.manualPagination, this.list.filters.forEach((c) => c.onFilterUpdated(() => this.reset())), (u = this.list.search) == null || u.onUpdated(() => this.reset());
|
|
596
584
|
}
|
|
597
585
|
static useNew(t, e = {}) {
|
|
598
|
-
return new
|
|
586
|
+
return new P(t, e);
|
|
599
587
|
}
|
|
600
588
|
reset() {
|
|
601
589
|
this.loaderState.reset();
|
|
@@ -621,7 +609,7 @@ class D {
|
|
|
621
609
|
}), this.useObserveBatchData(e, t), this.useObserveBatchLoadingState(e, t);
|
|
622
610
|
}
|
|
623
611
|
useObserveBatchLoadingState(t, e) {
|
|
624
|
-
|
|
612
|
+
z(() => (this.loaderState.setBatchLoadingState(
|
|
625
613
|
e,
|
|
626
614
|
t.state.value
|
|
627
615
|
), t.state.observe((s) => {
|
|
@@ -629,12 +617,12 @@ class D {
|
|
|
629
617
|
})), [t, e]);
|
|
630
618
|
}
|
|
631
619
|
useObserveBatchData(t, e) {
|
|
632
|
-
const s = (
|
|
633
|
-
const { data: o, itemTotalCount: l } =
|
|
620
|
+
const s = (i) => {
|
|
621
|
+
const { data: o, itemTotalCount: l } = i;
|
|
634
622
|
this.loaderState.setDataBatch(e, o), l !== void 0 && this.list.batches.updateItemTotalCount(l);
|
|
635
623
|
};
|
|
636
|
-
|
|
637
|
-
|
|
624
|
+
z(() => (t.value.value.isSet && s(t.value.value.value), t.value.observe((i) => {
|
|
625
|
+
i.isSet && s(i.value);
|
|
638
626
|
})), [t, e]);
|
|
639
627
|
}
|
|
640
628
|
getDataLoaderOptions(t) {
|
|
@@ -662,24 +650,24 @@ class D {
|
|
|
662
650
|
const e = this.dataSource, s = this.getDataLoaderOptions(t);
|
|
663
651
|
if ("staticData" in e)
|
|
664
652
|
return q(
|
|
665
|
-
async (
|
|
666
|
-
data:
|
|
667
|
-
itemTotalCount:
|
|
653
|
+
async (i) => ({
|
|
654
|
+
data: i,
|
|
655
|
+
itemTotalCount: i.length
|
|
668
656
|
}),
|
|
669
657
|
[e.staticData]
|
|
670
658
|
);
|
|
671
659
|
if ("asyncLoader" in e) {
|
|
672
|
-
const
|
|
673
|
-
return q(
|
|
660
|
+
const i = e.asyncLoader;
|
|
661
|
+
return q(i, [s]);
|
|
674
662
|
}
|
|
675
663
|
if ("asyncResourceFactory" in e) {
|
|
676
|
-
const
|
|
677
|
-
return
|
|
664
|
+
const i = e.asyncResourceFactory;
|
|
665
|
+
return i(s);
|
|
678
666
|
}
|
|
679
667
|
throw new Error("Unknown data source");
|
|
680
668
|
}
|
|
681
669
|
}
|
|
682
|
-
class
|
|
670
|
+
class Te {
|
|
683
671
|
constructor(t, e) {
|
|
684
672
|
r(this, "list");
|
|
685
673
|
r(this, "render");
|
|
@@ -711,15 +699,15 @@ const w = class w {
|
|
|
711
699
|
r(this, "onAction");
|
|
712
700
|
r(this, "fallback");
|
|
713
701
|
r(this, "renderFn");
|
|
714
|
-
const { onAction: s, fallback:
|
|
715
|
-
this.list = t, this.textValue = o, this.renderFn = u, this.href = l, this.onAction = s, this.fallback =
|
|
702
|
+
const { onAction: s, fallback: i, textValue: o, href: l, renderFn: u } = e;
|
|
703
|
+
this.list = t, this.textValue = o, this.renderFn = u, this.href = l, this.onAction = s, this.fallback = i;
|
|
716
704
|
}
|
|
717
705
|
render(t) {
|
|
718
706
|
return (this.renderFn ?? w.fallbackRenderItemFn)(t);
|
|
719
707
|
}
|
|
720
708
|
};
|
|
721
709
|
r(w, "fallbackRenderItemFn", (t) => Y("pre", void 0, JSON.stringify(t)));
|
|
722
|
-
let
|
|
710
|
+
let T = w, Ie = class nt {
|
|
723
711
|
constructor(t) {
|
|
724
712
|
r(this, "filters");
|
|
725
713
|
r(this, "itemView");
|
|
@@ -733,18 +721,18 @@ let I = w, Pe = class it {
|
|
|
733
721
|
const {
|
|
734
722
|
itemView: e,
|
|
735
723
|
filters: s = [],
|
|
736
|
-
sorting:
|
|
724
|
+
sorting: i = [],
|
|
737
725
|
batchesController: o,
|
|
738
726
|
hasAction: l
|
|
739
727
|
} = t;
|
|
740
|
-
this.items = new
|
|
728
|
+
this.items = new Se(this), this.filters = s.map((u) => new Ce(this, u)), this.sorting = i.map((u) => new Fe(this, u)), this.search = t.search ? new Te(this, t.search) : void 0, this.itemView = new T(this, e), this.batches = new ve(this, o), this.loader = P.useNew(this, t.loader), this.reactTable = x.useNew(this, {
|
|
741
729
|
manualFiltering: this.loader.manualFiltering,
|
|
742
730
|
manualPagination: this.loader.manualPagination,
|
|
743
731
|
manualSorting: this.loader.manualSorting
|
|
744
732
|
}), this.hasAction = l;
|
|
745
733
|
}
|
|
746
734
|
static useNew(t) {
|
|
747
|
-
return new
|
|
735
|
+
return new nt(t);
|
|
748
736
|
}
|
|
749
737
|
get isFiltered() {
|
|
750
738
|
return this.filters.some((t) => t.isActive()) || !!this.search && this.search.isSet;
|
|
@@ -754,7 +742,7 @@ let I = w, Pe = class it {
|
|
|
754
742
|
}
|
|
755
743
|
getSorting(t) {
|
|
756
744
|
const e = this.sorting.find((s) => s.id === t);
|
|
757
|
-
return
|
|
745
|
+
return tt(!!e, `Could not get Sorting (ID: ${t})`), e;
|
|
758
746
|
}
|
|
759
747
|
clearSorting() {
|
|
760
748
|
return this.sorting.forEach((t) => t.clear());
|
|
@@ -767,93 +755,93 @@ let I = w, Pe = class it {
|
|
|
767
755
|
return !this.loader.useIsLoading() && this.items.entries.length === 0;
|
|
768
756
|
}
|
|
769
757
|
};
|
|
770
|
-
const
|
|
771
|
-
items:
|
|
772
|
-
isLoading:
|
|
773
|
-
},
|
|
774
|
-
item:
|
|
775
|
-
hasAction:
|
|
776
|
-
},
|
|
777
|
-
const { data: t, children: e } =
|
|
758
|
+
const ke = "flow--list--items", Ae = "flow--list--items--is-loading", W = {
|
|
759
|
+
items: ke,
|
|
760
|
+
isLoading: Ae
|
|
761
|
+
}, xe = "flow--list--items--item", Be = "flow--list--items--item--has-action", I = {
|
|
762
|
+
item: xe,
|
|
763
|
+
hasAction: Be
|
|
764
|
+
}, Pe = (a) => {
|
|
765
|
+
const { data: t, children: e } = a, s = h(), i = s.itemView, o = i.onAction, l = i.textValue ? i.textValue(t) : void 0, u = o ? () => o(t) : void 0, c = i.href ? i.href(t) : void 0, d = s.hasAction || !!u || !!c, C = E(I.item, d && I.hasAction);
|
|
778
766
|
return /* @__PURE__ */ n.createElement(
|
|
779
|
-
|
|
767
|
+
A.GridListItem,
|
|
780
768
|
{
|
|
781
769
|
className: C,
|
|
782
770
|
onAction: u,
|
|
783
771
|
textValue: l,
|
|
784
772
|
href: c
|
|
785
773
|
},
|
|
786
|
-
e ??
|
|
774
|
+
e ?? i.render(t)
|
|
787
775
|
);
|
|
788
|
-
},
|
|
789
|
-
const
|
|
790
|
-
return /* @__PURE__ */ n.createElement(
|
|
791
|
-
},
|
|
792
|
-
skeletonText:
|
|
793
|
-
shimmer:
|
|
794
|
-
},
|
|
795
|
-
const { width: t, style: e = {}, ...s } =
|
|
796
|
-
return /* @__PURE__ */ n.createElement("div", { "aria-hidden": !0, style: { width: t, ...e }, ...s }, /* @__PURE__ */ n.createElement("div", { className:
|
|
797
|
-
},
|
|
798
|
-
const t =
|
|
799
|
-
return Array.from(Array(5)).map((e, s) => /* @__PURE__ */ n.createElement(
|
|
800
|
-
},
|
|
801
|
-
const { className: t, ...e } =
|
|
802
|
-
|
|
776
|
+
}, De = (a) => /* @__PURE__ */ n.createElement(A.GridListItem, { textValue: "-", className: I.item }, a.children), Ve = () => {
|
|
777
|
+
const a = S(g);
|
|
778
|
+
return /* @__PURE__ */ n.createElement(Ut, null, /* @__PURE__ */ n.createElement(Ot, null), /* @__PURE__ */ n.createElement(et, null, a.format("list.noResult.heading")), /* @__PURE__ */ n.createElement(f, null, a.format("list.noResult.text")));
|
|
779
|
+
}, Ne = "flow--skeleton-text", Re = "flow--skeleton-text--shimmer", Me = {
|
|
780
|
+
skeletonText: Ne,
|
|
781
|
+
shimmer: Re
|
|
782
|
+
}, J = (a) => {
|
|
783
|
+
const { width: t, style: e = {}, ...s } = a;
|
|
784
|
+
return /* @__PURE__ */ n.createElement("div", { "aria-hidden": !0, style: { width: t, ...e }, ...s }, /* @__PURE__ */ n.createElement("div", { className: Me.skeletonText }));
|
|
785
|
+
}, ze = () => /* @__PURE__ */ n.createElement(st, null, /* @__PURE__ */ n.createElement(et, null, /* @__PURE__ */ n.createElement(J, { width: "200px" })), /* @__PURE__ */ n.createElement(f, null, /* @__PURE__ */ n.createElement(J, { width: "300px" }))), $e = () => {
|
|
786
|
+
const t = h().itemView.fallback ?? /* @__PURE__ */ n.createElement(ze, null);
|
|
787
|
+
return Array.from(Array(5)).map((e, s) => /* @__PURE__ */ n.createElement(De, { key: s }, bt(t)));
|
|
788
|
+
}, Ue = (a) => {
|
|
789
|
+
const { className: t, ...e } = a, s = h(), i = s.loader.useIsLoading(), o = s.loader.useIsInitiallyLoading(), l = s.useIsEmpty(), u = s.items.entries.map((d) => /* @__PURE__ */ n.createElement(Pe, { key: d.id, data: d.data })), c = E(
|
|
790
|
+
W.items,
|
|
803
791
|
t,
|
|
804
|
-
|
|
792
|
+
i && W.isLoading
|
|
805
793
|
);
|
|
806
|
-
return l ? /* @__PURE__ */ n.createElement(
|
|
807
|
-
},
|
|
808
|
-
footer:
|
|
809
|
-
},
|
|
810
|
-
const t = S(g), e =
|
|
794
|
+
return l ? /* @__PURE__ */ n.createElement(Ve, null) : /* @__PURE__ */ n.createElement("div", { "aria-hidden": o, "aria-busy": i }, /* @__PURE__ */ n.createElement(A.GridList, { className: c, ...e }, o ? /* @__PURE__ */ n.createElement($e, null) : u));
|
|
795
|
+
}, rt = (a) => null, Oe = () => rt, ot = (a) => null, qe = () => ot, lt = (a) => null, He = () => lt, ct = (a) => null, Ke = () => ct, ut = (a) => null, Ge = () => ut, je = "flow--list--footer", We = {
|
|
796
|
+
footer: je
|
|
797
|
+
}, Je = (a) => {
|
|
798
|
+
const t = S(g), e = h(), s = e.batches, i = e.loader.useIsInitiallyLoading(), o = e.useIsEmpty(), l = s.getTotalItemsCount(), u = s.getVisibleItemsCount();
|
|
811
799
|
if (o)
|
|
812
800
|
return null;
|
|
813
|
-
const c =
|
|
801
|
+
const c = i ? /* @__PURE__ */ n.createElement(Kt, { width: "200px" }) : t.format("list.paginationInfo", {
|
|
814
802
|
visibleItemsCount: u,
|
|
815
803
|
totalItemsCount: l
|
|
816
804
|
});
|
|
817
|
-
return /* @__PURE__ */ n.createElement(f, { ...
|
|
818
|
-
},
|
|
819
|
-
const t = S(g), e =
|
|
805
|
+
return /* @__PURE__ */ n.createElement(f, { ...a }, c);
|
|
806
|
+
}, Ye = (a) => {
|
|
807
|
+
const t = S(g), e = h(), s = e.loader.useIsLoading(), i = e.loader.useIsInitiallyLoading();
|
|
820
808
|
return !e.batches.hasNextBatch() && !s ? null : /* @__PURE__ */ n.createElement(
|
|
821
809
|
p,
|
|
822
810
|
{
|
|
823
|
-
isPending: s && !
|
|
824
|
-
isDisabled:
|
|
825
|
-
...
|
|
811
|
+
isPending: s && !i,
|
|
812
|
+
isDisabled: i,
|
|
813
|
+
...a,
|
|
826
814
|
onPress: () => e.batches.nextBatch(),
|
|
827
815
|
variant: "plain",
|
|
828
816
|
size: "s"
|
|
829
817
|
},
|
|
830
818
|
t.format("list.showMore")
|
|
831
819
|
);
|
|
832
|
-
},
|
|
833
|
-
function
|
|
820
|
+
}, Qe = () => /* @__PURE__ */ n.createElement("div", { className: We.footer }, /* @__PURE__ */ n.createElement(Je, null), /* @__PURE__ */ n.createElement(Ye, null));
|
|
821
|
+
function dt(a) {
|
|
834
822
|
return null;
|
|
835
823
|
}
|
|
836
|
-
const
|
|
837
|
-
var V, N, R,
|
|
838
|
-
const { children: t, batchSize: e, ...s } =
|
|
824
|
+
const Xe = () => dt, Ze = Tt("List", (a) => {
|
|
825
|
+
var D, V, N, R, M;
|
|
826
|
+
const { children: t, batchSize: e, ...s } = a, i = (D = b(
|
|
839
827
|
t,
|
|
840
|
-
|
|
841
|
-
)) == null ? void 0 :
|
|
828
|
+
rt
|
|
829
|
+
)) == null ? void 0 : D.props, o = (V = b(
|
|
842
830
|
t,
|
|
843
|
-
|
|
844
|
-
)) == null ? void 0 :
|
|
845
|
-
source:
|
|
846
|
-
...
|
|
847
|
-
asyncLoader:
|
|
831
|
+
qt
|
|
832
|
+
)) == null ? void 0 : V.props, l = (N = b(t, ut)) == null ? void 0 : N.props, u = {
|
|
833
|
+
source: i ? {
|
|
834
|
+
...i,
|
|
835
|
+
asyncLoader: i.children
|
|
848
836
|
} : o ? {
|
|
849
837
|
...o,
|
|
850
838
|
asyncResourceFactory: o.children
|
|
851
839
|
} : l ? {
|
|
852
840
|
staticData: l.data
|
|
853
841
|
} : void 0
|
|
854
|
-
}, c = (
|
|
842
|
+
}, c = (R = b(t, dt)) == null ? void 0 : R.props, d = (M = b(t, ct)) == null ? void 0 : M.props, C = Ie.useNew({
|
|
855
843
|
loader: u,
|
|
856
|
-
filters: K(t,
|
|
844
|
+
filters: K(t, ot).map(
|
|
857
845
|
(v) => ({
|
|
858
846
|
...v.props,
|
|
859
847
|
renderItem: v.props.children
|
|
@@ -863,49 +851,49 @@ const ss = () => ut, as = Tt("List", (i) => {
|
|
|
863
851
|
render: c.children,
|
|
864
852
|
textFieldProps: c
|
|
865
853
|
} : void 0,
|
|
866
|
-
sorting: K(t,
|
|
867
|
-
itemView:
|
|
868
|
-
...
|
|
869
|
-
renderFn:
|
|
854
|
+
sorting: K(t, lt).map((v) => v.props),
|
|
855
|
+
itemView: d ? {
|
|
856
|
+
...d,
|
|
857
|
+
renderFn: d.children
|
|
870
858
|
} : void 0,
|
|
871
859
|
batchesController: {
|
|
872
860
|
batchSize: e
|
|
873
861
|
},
|
|
874
|
-
hasAction: !!
|
|
862
|
+
hasAction: !!a.onAction
|
|
875
863
|
});
|
|
876
864
|
return /* @__PURE__ */ n.createElement(
|
|
877
|
-
|
|
865
|
+
it.Provider,
|
|
878
866
|
{
|
|
879
867
|
value: {
|
|
880
868
|
list: C
|
|
881
869
|
}
|
|
882
870
|
},
|
|
883
|
-
/* @__PURE__ */ n.createElement(
|
|
884
|
-
/* @__PURE__ */ n.createElement("div", { className:
|
|
871
|
+
/* @__PURE__ */ n.createElement(ee, null),
|
|
872
|
+
/* @__PURE__ */ n.createElement("div", { className: fe.list }, /* @__PURE__ */ n.createElement(ge, null), /* @__PURE__ */ n.createElement(Ue, { ...s }), /* @__PURE__ */ n.createElement(Qe, null))
|
|
885
873
|
);
|
|
886
|
-
}),
|
|
887
|
-
List:
|
|
888
|
-
Filter:
|
|
889
|
-
Search:
|
|
890
|
-
Sorting:
|
|
891
|
-
Item:
|
|
892
|
-
ItemView:
|
|
893
|
-
StaticData:
|
|
894
|
-
LoaderAsync:
|
|
895
|
-
LoaderAsyncResource:
|
|
874
|
+
}), Ms = () => ({
|
|
875
|
+
List: Ze,
|
|
876
|
+
Filter: qe(),
|
|
877
|
+
Search: Xe(),
|
|
878
|
+
Sorting: He(),
|
|
879
|
+
Item: Ke(),
|
|
880
|
+
ItemView: st,
|
|
881
|
+
StaticData: Ge(),
|
|
882
|
+
LoaderAsync: Oe(),
|
|
883
|
+
LoaderAsyncResource: Ht()
|
|
896
884
|
});
|
|
897
885
|
export {
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
886
|
+
Ze as List,
|
|
887
|
+
ot as ListFilter,
|
|
888
|
+
ct as ListItem,
|
|
889
|
+
st as ListItemView,
|
|
890
|
+
rt as ListLoaderAsync,
|
|
891
|
+
lt as ListSorting,
|
|
892
|
+
ut as ListStaticData,
|
|
893
|
+
qe as TypedListFilter,
|
|
894
|
+
Ke as TypedListItem,
|
|
895
|
+
Oe as TypedListLoaderAsync,
|
|
896
|
+
He as TypedListSorting,
|
|
897
|
+
Ge as TypedListStaticData,
|
|
898
|
+
Ms as typedList
|
|
911
899
|
};
|