@mittwald/flow-react-components 0.1.0-alpha.173 → 0.1.0-alpha.175
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/ListLoaderAsyncResource.js +3 -4
- package/dist/List.js +275 -273
- package/dist/styles.css +1 -1
- package/dist/types/components/List/components/Header/FilterPicker/FilterPicker.d.ts +1 -2
- package/dist/types/components/List/components/Header/ListFilter.d.ts +6 -3
- package/dist/types/components/List/components/Header/ListSorting.d.ts +4 -4
- package/dist/types/components/List/components/Header/SortingPickerItem/SortingPickerItem.d.ts +1 -2
- package/dist/types/components/List/components/Items/ListItem/FallbackRenderer.d.ts +1 -2
- package/dist/types/components/List/components/Items/ListItemView.d.ts +6 -4
- package/dist/types/components/List/components/ListLoaderAsync.d.ts +5 -3
- package/dist/types/components/List/components/ListLoaderAsyncResource.d.ts +5 -3
- package/dist/types/components/List/components/ListStaticData.d.ts +6 -3
- package/dist/types/components/List/hooks/useList.d.ts +1 -1
- package/dist/types/components/List/index.d.ts +1 -0
- package/dist/types/components/List/listContext.d.ts +1 -2
- package/dist/types/components/List/model/List.d.ts +3 -3
- package/dist/types/components/List/model/ReactTable.d.ts +1 -1
- package/dist/types/components/List/model/filter/Filter.d.ts +4 -4
- package/dist/types/components/List/model/filter/types.d.ts +8 -6
- package/dist/types/components/List/model/item/Item.d.ts +1 -3
- package/dist/types/components/List/model/item/types.d.ts +3 -5
- package/dist/types/components/List/model/sorting/Sorting.d.ts +2 -1
- package/dist/types/components/List/model/sorting/types.d.ts +1 -1
- package/dist/types/components/List/model/types.d.ts +5 -2
- package/dist/types/components/List/typedList.d.ts +25 -0
- package/dist/types/lib/types/array.d.ts +1 -0
- package/package.json +4 -4
package/dist/List.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
/* */
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
import
|
|
7
|
-
import { R as
|
|
3
|
+
var it = Object.defineProperty;
|
|
4
|
+
var nt = (s, t, e) => t in s ? it(s, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[t] = e;
|
|
5
|
+
var r = (s, t, e) => nt(s, typeof t != "symbol" ? t + "" : t, e);
|
|
6
|
+
import i, { createContext as rt, useContext as ot, createElement as lt, useEffect as I, useRef as ct, Suspense as ut } from "react";
|
|
7
|
+
import { R as mt } from "./Render-BdlTa7Qb.js";
|
|
8
8
|
import { a as T, C as j } from "./ContextMenuTrigger-B8ZhwBtd.js";
|
|
9
9
|
import { M as J } from "./MenuItem-DvOltniq.js";
|
|
10
10
|
import { T as y } from "./Text-DMctOg-g.js";
|
|
@@ -14,36 +14,36 @@ import { I as W } from "./IconChevronDown-H4ANoHQh.js";
|
|
|
14
14
|
import { B as p } from "./Button-Dh-FA0K8.js";
|
|
15
15
|
import { useLocalizedStringFormatter as v } from "react-aria";
|
|
16
16
|
import k from "clsx";
|
|
17
|
-
import { I as
|
|
18
|
-
import { getProperty as
|
|
19
|
-
import { useReactTable as
|
|
17
|
+
import { I as dt } from "./IconClose-B9Tmq1hI.js";
|
|
18
|
+
import { getProperty as ht } from "dot-prop";
|
|
19
|
+
import { useReactTable as gt, getCoreRowModel as pt, getSortedRowModel as ft, getFilteredRowModel as bt, getPaginationRowModel as St, getFacetedUniqueValues as yt } from "@tanstack/react-table";
|
|
20
20
|
import Y from "invariant";
|
|
21
|
-
import { useLocalObservable as
|
|
22
|
-
import { autorun as
|
|
21
|
+
import { useLocalObservable as vt } from "mobx-react-lite";
|
|
22
|
+
import { autorun as Ct, runInAction as Et, makeObservable as Lt, observable as z, computed as M, action as L } from "mobx";
|
|
23
23
|
import { getAsyncResource as x } from "@mittwald/react-use-promise";
|
|
24
|
-
import { times as
|
|
24
|
+
import { times as It } from "remeda";
|
|
25
25
|
import { u as $ } from "./useSelector-DpU7_HMO.js";
|
|
26
|
-
import { I as
|
|
27
|
-
import { I as
|
|
28
|
-
import { H as
|
|
26
|
+
import { I as Ft } from "./IllustratedMessage-B3MHD01M.js";
|
|
27
|
+
import { I as wt } from "./IconSearch-BdmeRdRR.js";
|
|
28
|
+
import { H as Tt } from "./Heading-BkHvZG9C.js";
|
|
29
29
|
import { S as G } from "./Skeleton-CKLaTmDR.js";
|
|
30
30
|
import "./propsContext-DzAKlmhS.js";
|
|
31
|
-
import { P as
|
|
31
|
+
import { P as kt } from "./PropsContextProvider-C6Z4XGp6.js";
|
|
32
32
|
import "@react-aria/utils";
|
|
33
|
-
import { d as
|
|
34
|
-
import { I as
|
|
35
|
-
import { TunnelProvider as
|
|
36
|
-
import { L as
|
|
37
|
-
import { g as
|
|
33
|
+
import { d as Bt } from "./dynamic-ClpUSmEt.js";
|
|
34
|
+
import { I as At } from "./IconContextMenu-BbFVCu4A.js";
|
|
35
|
+
import { TunnelProvider as Dt, TunnelExit as O } from "@mittwald/react-tunnel";
|
|
36
|
+
import { L as Nt } from "./Link-BoQ8K6ao.js";
|
|
37
|
+
import { g as Rt } from "./getContainerBreakpointSizeClassName-BrcFDcCY.js";
|
|
38
38
|
import { d as E, a as U } from "./deepFindOfType-6pG0fH7S.js";
|
|
39
|
-
import { ListLoaderAsyncResource as
|
|
40
|
-
import { I as
|
|
39
|
+
import { ListLoaderAsyncResource as Pt, TypedListLoaderAsyncResource as Vt } from "./List/ListLoaderAsyncResource.js";
|
|
40
|
+
import { I as zt } from "./InlineCode-BT-PKxVv.js";
|
|
41
41
|
import "react-children-utilities";
|
|
42
|
-
const Q =
|
|
42
|
+
const Q = rt({}), g = () => ot(Q).list, Mt = () => g().loader.getLoaderInvocationHooks().map((t, e) => /* @__PURE__ */ i.createElement(mt, { key: e }, () => {
|
|
43
43
|
t();
|
|
44
|
-
})),
|
|
44
|
+
})), xt = (s) => {
|
|
45
45
|
const { sorting: t } = s;
|
|
46
|
-
return /* @__PURE__ */
|
|
46
|
+
return /* @__PURE__ */ i.createElement(J, { id: t.id }, t.name);
|
|
47
47
|
}, h = { "de-DE": {
|
|
48
48
|
"list.noResult.heading": "Keine Suchergebnisse gefunden",
|
|
49
49
|
"list.noResult.text": "Deine Suche ergab keine Ergebnisse. Bitte passe die Suchanfrage oder deine Filter an.",
|
|
@@ -64,15 +64,15 @@ const Q = et({}), g = () => at(Q).list, Nt = () => g().loader.getLoaderInvocatio
|
|
|
64
64
|
"list.setSorting": (s) => `Sorting: ${s.property}`,
|
|
65
65
|
"list.showMore": "Show more",
|
|
66
66
|
"list.sorting": "Sorting"
|
|
67
|
-
} },
|
|
67
|
+
} }, F = (s) => {
|
|
68
68
|
const { children: t, locales: e, variables: a } = s;
|
|
69
69
|
return v(e).format(t, a);
|
|
70
|
-
},
|
|
71
|
-
const s = g(), t = s.sorting.map((
|
|
70
|
+
}, $t = () => {
|
|
71
|
+
const s = g(), t = s.sorting.map((n) => /* @__PURE__ */ i.createElement(xt, { sorting: n, key: n.id }));
|
|
72
72
|
if (s.sorting.length === 0)
|
|
73
73
|
return null;
|
|
74
|
-
const e = s.sorting.find((
|
|
75
|
-
|
|
74
|
+
const e = s.sorting.find((n) => n.isSorted()), a = /* @__PURE__ */ i.createElement(y, null, e ? /* @__PURE__ */ i.createElement(
|
|
75
|
+
F,
|
|
76
76
|
{
|
|
77
77
|
locales: h,
|
|
78
78
|
variables: {
|
|
@@ -80,40 +80,40 @@ const Q = et({}), g = () => at(Q).list, Nt = () => g().loader.getLoaderInvocatio
|
|
|
80
80
|
}
|
|
81
81
|
},
|
|
82
82
|
"list.setSorting"
|
|
83
|
-
) : /* @__PURE__ */
|
|
84
|
-
return /* @__PURE__ */
|
|
83
|
+
) : /* @__PURE__ */ i.createElement(F, { locales: h }, "list.sorting"));
|
|
84
|
+
return /* @__PURE__ */ i.createElement(T, null, /* @__PURE__ */ i.createElement(p, { variant: "soft", size: "s", color: "secondary" }, a, /* @__PURE__ */ i.createElement(W, null)), /* @__PURE__ */ i.createElement(
|
|
85
85
|
j,
|
|
86
86
|
{
|
|
87
87
|
selectionMode: "single",
|
|
88
|
-
selectedKeys: e ? [e.
|
|
89
|
-
onAction: (
|
|
90
|
-
s.getSorting(String(
|
|
88
|
+
selectedKeys: e ? [e.id] : [],
|
|
89
|
+
onAction: (n) => {
|
|
90
|
+
s.getSorting(String(n)).enable();
|
|
91
91
|
}
|
|
92
92
|
},
|
|
93
93
|
t
|
|
94
94
|
));
|
|
95
|
-
},
|
|
96
|
-
const { filter: t } = s, e = t.
|
|
97
|
-
t.toggleValue(
|
|
95
|
+
}, Ot = (s) => {
|
|
96
|
+
const { filter: t } = s, { values: e, mode: a, name: n, property: o } = t, c = e.map((l) => /* @__PURE__ */ i.createElement(J, { key: t.getValueId(l), id: String(l) }, String(l))), u = e.filter((l) => t.isValueActive(l)).map((l) => String(l)), d = (l) => {
|
|
97
|
+
t.toggleValue(l);
|
|
98
98
|
};
|
|
99
|
-
return /* @__PURE__ */
|
|
99
|
+
return /* @__PURE__ */ i.createElement(T, null, /* @__PURE__ */ i.createElement(p, { variant: "soft", size: "s", color: "secondary" }, /* @__PURE__ */ i.createElement(y, null, n ?? o), /* @__PURE__ */ i.createElement(W, null)), /* @__PURE__ */ i.createElement(
|
|
100
100
|
j,
|
|
101
101
|
{
|
|
102
|
-
onAction:
|
|
103
|
-
selectionMode: "multiple",
|
|
104
|
-
selectedKeys:
|
|
102
|
+
onAction: d,
|
|
103
|
+
selectionMode: a === "one" ? "single" : "multiple",
|
|
104
|
+
selectedKeys: u
|
|
105
105
|
},
|
|
106
|
-
|
|
106
|
+
c
|
|
107
107
|
));
|
|
108
|
-
},
|
|
109
|
-
header:
|
|
110
|
-
pickerList:
|
|
111
|
-
},
|
|
112
|
-
activeFilters:
|
|
113
|
-
clearButton:
|
|
114
|
-
},
|
|
108
|
+
}, Ut = "flow--list--header", Ht = "flow--list--header--picker-list", H = {
|
|
109
|
+
header: Ut,
|
|
110
|
+
pickerList: Ht
|
|
111
|
+
}, qt = "flow--list--header--active-filters", Kt = "flow--list--header--clear-button", q = {
|
|
112
|
+
activeFilters: qt,
|
|
113
|
+
clearButton: Kt
|
|
114
|
+
}, jt = () => {
|
|
115
115
|
const s = g(), t = s.filters.flatMap(
|
|
116
|
-
(e) => e.values.filter((a) => e.isValueActive(a)).map((a) => /* @__PURE__ */
|
|
116
|
+
(e) => e.values.filter((a) => e.isValueActive(a)).map((a) => /* @__PURE__ */ i.createElement(
|
|
117
117
|
p,
|
|
118
118
|
{
|
|
119
119
|
variant: "soft",
|
|
@@ -121,11 +121,11 @@ const Q = et({}), g = () => at(Q).list, Nt = () => g().loader.getLoaderInvocatio
|
|
|
121
121
|
key: String(a),
|
|
122
122
|
onPress: () => e.deactivateValue(a)
|
|
123
123
|
},
|
|
124
|
-
/* @__PURE__ */
|
|
125
|
-
/* @__PURE__ */
|
|
124
|
+
/* @__PURE__ */ i.createElement(y, null, String(a)),
|
|
125
|
+
/* @__PURE__ */ i.createElement(dt, null)
|
|
126
126
|
))
|
|
127
127
|
);
|
|
128
|
-
return t.length <= 0 ? null : /* @__PURE__ */
|
|
128
|
+
return t.length <= 0 ? null : /* @__PURE__ */ i.createElement("div", { className: q.activeFilters }, t, /* @__PURE__ */ i.createElement(
|
|
129
129
|
p,
|
|
130
130
|
{
|
|
131
131
|
className: q.clearButton,
|
|
@@ -133,18 +133,18 @@ const Q = et({}), g = () => at(Q).list, Nt = () => g().loader.getLoaderInvocatio
|
|
|
133
133
|
variant: "plain",
|
|
134
134
|
onPress: () => s.clearFilters()
|
|
135
135
|
},
|
|
136
|
-
/* @__PURE__ */
|
|
136
|
+
/* @__PURE__ */ i.createElement(F, { locales: h }, "list.resetAll")
|
|
137
137
|
));
|
|
138
|
-
},
|
|
139
|
-
const { className: t } = s, a = g().filters.map((
|
|
140
|
-
return /* @__PURE__ */
|
|
141
|
-
},
|
|
142
|
-
list:
|
|
138
|
+
}, Jt = (s) => {
|
|
139
|
+
const { className: t } = s, a = g().filters.map((n) => /* @__PURE__ */ i.createElement(Ot, { key: n.property, filter: n }));
|
|
140
|
+
return /* @__PURE__ */ i.createElement("div", { className: k(t, H.header) }, /* @__PURE__ */ i.createElement("div", { className: H.pickerList }, /* @__PURE__ */ i.createElement($t, null), a), /* @__PURE__ */ i.createElement(jt, null));
|
|
141
|
+
}, Wt = "flow--list", Yt = {
|
|
142
|
+
list: Wt
|
|
143
143
|
}, S = class S {
|
|
144
144
|
constructor(t, e, a) {
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
145
|
+
r(this, "id");
|
|
146
|
+
r(this, "data");
|
|
147
|
+
r(this, "collection");
|
|
148
148
|
this.collection = t, this.id = e, this.data = a;
|
|
149
149
|
}
|
|
150
150
|
render() {
|
|
@@ -154,26 +154,26 @@ const Q = et({}), g = () => at(Q).list, Nt = () => g().loader.getLoaderInvocatio
|
|
|
154
154
|
return new S(t, e.id, e.original);
|
|
155
155
|
}
|
|
156
156
|
};
|
|
157
|
-
|
|
158
|
-
let
|
|
157
|
+
r(S, "fallbackRenderItemFn", (t) => lt("pre", void 0, JSON.stringify(t)));
|
|
158
|
+
let w = S;
|
|
159
159
|
class B {
|
|
160
160
|
constructor(t) {
|
|
161
|
-
|
|
161
|
+
r(this, "list");
|
|
162
162
|
this.list = t;
|
|
163
163
|
}
|
|
164
164
|
static useNew(t) {
|
|
165
165
|
return new B(t);
|
|
166
166
|
}
|
|
167
167
|
get entries() {
|
|
168
|
-
return this.list.reactTable.table.getRowModel().rows.map((t) =>
|
|
168
|
+
return this.list.reactTable.table.getRowModel().rows.map((t) => w.fromRow(this, t));
|
|
169
169
|
}
|
|
170
170
|
}
|
|
171
|
-
class
|
|
171
|
+
class Gt {
|
|
172
172
|
constructor(t, e = {}) {
|
|
173
|
-
|
|
174
|
-
|
|
173
|
+
r(this, "batchSize");
|
|
174
|
+
r(this, "list");
|
|
175
175
|
const { batchSize: a = 20 } = e;
|
|
176
|
-
this.list = t, this.batchSize = a, t.filters.forEach((
|
|
176
|
+
this.list = t, this.batchSize = a, t.filters.forEach((n) => n.onFilterUpdated(() => this.reset()));
|
|
177
177
|
}
|
|
178
178
|
get reactTable() {
|
|
179
179
|
return this.list.reactTable.table;
|
|
@@ -217,38 +217,38 @@ class qt {
|
|
|
217
217
|
}
|
|
218
218
|
}
|
|
219
219
|
}
|
|
220
|
-
const
|
|
221
|
-
class
|
|
220
|
+
const Qt = (s, t) => s === t;
|
|
221
|
+
class Xt {
|
|
222
222
|
constructor(t, e) {
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
this.list = t, this.property = e.property, this.mode = e.mode ?? "one", this._values = e.values, this.matcher = e.matcher ??
|
|
223
|
+
r(this, "_values");
|
|
224
|
+
r(this, "list");
|
|
225
|
+
r(this, "property");
|
|
226
|
+
r(this, "mode");
|
|
227
|
+
r(this, "matcher");
|
|
228
|
+
r(this, "name");
|
|
229
|
+
r(this, "onFilterUpdateCallbacks", /* @__PURE__ */ new Set());
|
|
230
|
+
this.list = t, this.property = e.property, this.mode = e.mode ?? "one", this._values = e.values, this.matcher = e.matcher ?? Qt, this.name = e.name;
|
|
231
231
|
}
|
|
232
232
|
updateTableColumnDef(t) {
|
|
233
233
|
t.enableColumnFilter = !0, t.filterFn = this.getReactTableFilterFn();
|
|
234
234
|
}
|
|
235
235
|
getReactTableFilterFn() {
|
|
236
236
|
return (t, e, a) => this.checkFilterMatches(
|
|
237
|
-
|
|
237
|
+
ht(t.original, this.property),
|
|
238
238
|
a
|
|
239
239
|
);
|
|
240
240
|
}
|
|
241
241
|
checkFilterMatches(t, e) {
|
|
242
242
|
if (e === null)
|
|
243
243
|
return !0;
|
|
244
|
-
const a = (
|
|
244
|
+
const a = (o) => Array.isArray(o) ? o : [o], n = (o) => this.matcher(o, t);
|
|
245
245
|
if (this.mode === "all")
|
|
246
|
-
return a(e).every(
|
|
246
|
+
return a(e).every(n);
|
|
247
247
|
if (this.mode === "some") {
|
|
248
|
-
const
|
|
249
|
-
return
|
|
248
|
+
const o = a(e);
|
|
249
|
+
return o.length === 0 || o.some(n);
|
|
250
250
|
} else if (this.mode === "one")
|
|
251
|
-
return
|
|
251
|
+
return n(e);
|
|
252
252
|
throw new Error(`Unknown filter mode '${this.mode}'`);
|
|
253
253
|
}
|
|
254
254
|
getTableColumnFilter() {
|
|
@@ -280,12 +280,12 @@ class jt {
|
|
|
280
280
|
activateValue(t) {
|
|
281
281
|
const e = this.getArrayValue();
|
|
282
282
|
let a;
|
|
283
|
-
this.mode === "all" || this.mode === "some" ? a = [...e, t] : a = t, this.list.reactTable.getTableColumn(this.property).setFilterValue(a), this.onFilterUpdateCallbacks.forEach((
|
|
283
|
+
this.mode === "all" || this.mode === "some" ? a = [...e, t] : a = t, this.list.reactTable.getTableColumn(this.property).setFilterValue(a), this.onFilterUpdateCallbacks.forEach((n) => n());
|
|
284
284
|
}
|
|
285
285
|
deactivateValue(t) {
|
|
286
286
|
const e = this.getArrayValue();
|
|
287
287
|
let a;
|
|
288
|
-
this.mode === "all" || this.mode === "some" ? a = e.filter((
|
|
288
|
+
this.mode === "all" || this.mode === "some" ? a = e.filter((n) => n !== t) : a = null, this.list.reactTable.getTableColumn(this.property).setFilterValue(a), this.onFilterUpdateCallbacks.forEach((n) => n());
|
|
289
289
|
}
|
|
290
290
|
clearValues() {
|
|
291
291
|
let t;
|
|
@@ -293,27 +293,27 @@ class jt {
|
|
|
293
293
|
}
|
|
294
294
|
toggleValue(t) {
|
|
295
295
|
const e = this.isValueActive(t), a = this.getArrayValue();
|
|
296
|
-
let
|
|
297
|
-
this.mode === "all" || this.mode === "some" ? e ?
|
|
296
|
+
let n;
|
|
297
|
+
this.mode === "all" || this.mode === "some" ? e ? n = a.filter((o) => o !== t) : n = [...a, t] : n = e ? null : t, this.list.reactTable.getTableColumn(this.property).setFilterValue(n), this.onFilterUpdateCallbacks.forEach((o) => o());
|
|
298
298
|
}
|
|
299
299
|
onFilterUpdated(t) {
|
|
300
300
|
this.onFilterUpdateCallbacks.add(t);
|
|
301
301
|
}
|
|
302
302
|
}
|
|
303
|
-
class
|
|
303
|
+
class Zt {
|
|
304
304
|
constructor(t, e) {
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
305
|
+
r(this, "list");
|
|
306
|
+
r(this, "property");
|
|
307
|
+
r(this, "name");
|
|
308
|
+
r(this, "direction");
|
|
309
|
+
r(this, "defaultEnabled");
|
|
310
310
|
this.list = t, this.property = e.property, this.name = e.name, this.direction = e.direction ?? "asc", this.defaultEnabled = !!e.defaultEnabled;
|
|
311
311
|
}
|
|
312
312
|
updateTableColumnDef(t) {
|
|
313
313
|
t.enableSorting = !0;
|
|
314
314
|
}
|
|
315
315
|
isSorted() {
|
|
316
|
-
return this.
|
|
316
|
+
return this.getTableColumn().getIsSorted() == this.direction;
|
|
317
317
|
}
|
|
318
318
|
getTableColumn() {
|
|
319
319
|
return this.list.reactTable.getTableColumn(this.property);
|
|
@@ -324,52 +324,55 @@ class Jt {
|
|
|
324
324
|
clear() {
|
|
325
325
|
this.list.reactTable.getTableColumn(this.property).clearSorting();
|
|
326
326
|
}
|
|
327
|
+
get id() {
|
|
328
|
+
return `${this.getTableColumn().id}:${this.direction}`;
|
|
329
|
+
}
|
|
327
330
|
}
|
|
328
|
-
const
|
|
331
|
+
const _t = (s) => I(Ct(s));
|
|
329
332
|
class A {
|
|
330
333
|
constructor(t, e = {}) {
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
334
|
+
r(this, "list");
|
|
335
|
+
r(this, "table");
|
|
336
|
+
r(this, "tableState");
|
|
337
|
+
r(this, "onTableStateChange", (t) => {
|
|
335
338
|
const e = this.tableState.value;
|
|
336
339
|
if (!e)
|
|
337
340
|
return;
|
|
338
341
|
const a = typeof t == "function" ? t(e) : t;
|
|
339
|
-
|
|
342
|
+
Et(() => {
|
|
340
343
|
this.tableState.value = this.getUpdatedTableState(e, a);
|
|
341
344
|
});
|
|
342
345
|
});
|
|
343
|
-
this.list = t, this.tableState =
|
|
346
|
+
this.list = t, this.tableState = vt(() => ({ value: void 0 })), this.table = this.useReactTable(e);
|
|
344
347
|
}
|
|
345
348
|
static useNew(t, e = {}) {
|
|
346
349
|
return new A(t, e);
|
|
347
350
|
}
|
|
348
351
|
useReactTable(t = {}) {
|
|
349
|
-
const e = this.list.loader.useData(), a = this.list.sorting.filter((
|
|
352
|
+
const e = this.list.loader.useData(), a = this.list.sorting.filter((o) => o.defaultEnabled), n = gt({
|
|
350
353
|
data: e,
|
|
351
354
|
initialState: {
|
|
352
355
|
pagination: {
|
|
353
356
|
pageSize: this.list.batches.batchSize
|
|
354
357
|
},
|
|
355
|
-
sorting: a.map((
|
|
356
|
-
id: String(
|
|
357
|
-
desc:
|
|
358
|
+
sorting: a.map((o) => ({
|
|
359
|
+
id: String(o.property),
|
|
360
|
+
desc: o.direction === "desc"
|
|
358
361
|
}))
|
|
359
362
|
},
|
|
360
363
|
columns: this.getTableColumnDefs(),
|
|
361
|
-
getCoreRowModel:
|
|
362
|
-
getSortedRowModel:
|
|
363
|
-
getFilteredRowModel:
|
|
364
|
-
getPaginationRowModel:
|
|
365
|
-
getFacetedUniqueValues:
|
|
364
|
+
getCoreRowModel: pt(),
|
|
365
|
+
getSortedRowModel: ft(),
|
|
366
|
+
getFilteredRowModel: bt(),
|
|
367
|
+
getPaginationRowModel: St(),
|
|
368
|
+
getFacetedUniqueValues: yt(),
|
|
366
369
|
onStateChange: this.onTableStateChange,
|
|
367
370
|
...t
|
|
368
371
|
});
|
|
369
|
-
return this.useUpdateTableState(
|
|
372
|
+
return this.useUpdateTableState(n), n;
|
|
370
373
|
}
|
|
371
374
|
useUpdateTableState(t) {
|
|
372
|
-
|
|
375
|
+
_t(() => {
|
|
373
376
|
const e = this.tableState.value;
|
|
374
377
|
e ? t.setOptions((a) => ({
|
|
375
378
|
...a,
|
|
@@ -386,16 +389,16 @@ class A {
|
|
|
386
389
|
}
|
|
387
390
|
getTableColumnDefs() {
|
|
388
391
|
const t = /* @__PURE__ */ new Map(), e = (a) => {
|
|
389
|
-
const
|
|
390
|
-
if (
|
|
391
|
-
return
|
|
392
|
-
const
|
|
392
|
+
const n = t.get(a);
|
|
393
|
+
if (n)
|
|
394
|
+
return n;
|
|
395
|
+
const o = {
|
|
393
396
|
id: a,
|
|
394
397
|
accessorKey: a,
|
|
395
398
|
enableSorting: !1,
|
|
396
399
|
enableColumnFilter: !1
|
|
397
400
|
};
|
|
398
|
-
return t.set(a,
|
|
401
|
+
return t.set(a, o), o;
|
|
399
402
|
};
|
|
400
403
|
return this.list.filters.forEach(
|
|
401
404
|
(a) => a.updateTableColumnDef(e(a.property))
|
|
@@ -404,23 +407,23 @@ class A {
|
|
|
404
407
|
), Array.from(t.values());
|
|
405
408
|
}
|
|
406
409
|
}
|
|
407
|
-
class
|
|
410
|
+
class D {
|
|
408
411
|
constructor() {
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
dataBatches:
|
|
414
|
-
batchLoadingStates:
|
|
415
|
-
mergedData:
|
|
416
|
-
isLoading:
|
|
417
|
-
reset:
|
|
418
|
-
setDataBatch:
|
|
419
|
-
setBatchLoadingState:
|
|
412
|
+
r(this, "dataBatches", []);
|
|
413
|
+
r(this, "prevDataBatches", []);
|
|
414
|
+
r(this, "batchLoadingStates", ["void"]);
|
|
415
|
+
Lt(this, {
|
|
416
|
+
dataBatches: z.shallow,
|
|
417
|
+
batchLoadingStates: z.shallow,
|
|
418
|
+
mergedData: M,
|
|
419
|
+
isLoading: M,
|
|
420
|
+
reset: L.bound,
|
|
421
|
+
setDataBatch: L.bound,
|
|
422
|
+
setBatchLoadingState: L.bound
|
|
420
423
|
});
|
|
421
424
|
}
|
|
422
425
|
static useNew() {
|
|
423
|
-
return
|
|
426
|
+
return ct(new D()).current;
|
|
424
427
|
}
|
|
425
428
|
reset() {
|
|
426
429
|
this.batchLoadingStates = [], this.dataBatches = [];
|
|
@@ -444,22 +447,22 @@ class N {
|
|
|
444
447
|
return $(() => this.isLoading);
|
|
445
448
|
}
|
|
446
449
|
}
|
|
447
|
-
const
|
|
448
|
-
class
|
|
450
|
+
const te = [];
|
|
451
|
+
class N {
|
|
449
452
|
constructor(t, e = {}) {
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
453
|
+
r(this, "list");
|
|
454
|
+
r(this, "dataSource");
|
|
455
|
+
r(this, "manualSorting");
|
|
456
|
+
r(this, "manualFiltering");
|
|
457
|
+
r(this, "manualPagination");
|
|
458
|
+
r(this, "loaderState");
|
|
456
459
|
const { source: a } = e;
|
|
457
|
-
this.dataSource = a ?? { staticData:
|
|
458
|
-
const
|
|
459
|
-
this.list = t, this.loaderState =
|
|
460
|
+
this.dataSource = a ?? { staticData: te };
|
|
461
|
+
const n = "manualPagination" in this.dataSource ? this.dataSource.manualPagination : void 0, o = "manualFiltering" in this.dataSource ? this.dataSource.manualFiltering : void 0, c = "manualSorting" in this.dataSource ? this.dataSource.manualSorting : void 0;
|
|
462
|
+
this.list = t, this.loaderState = D.useNew(), this.manualPagination = n ?? !1, this.manualFiltering = o ?? this.manualPagination, this.manualSorting = c ?? this.manualPagination, this.list.filters.forEach((u) => u.onFilterUpdated(() => this.reset()));
|
|
460
463
|
}
|
|
461
464
|
static useNew(t, e = {}) {
|
|
462
|
-
return new
|
|
465
|
+
return new N(t, e);
|
|
463
466
|
}
|
|
464
467
|
reset() {
|
|
465
468
|
this.loaderState.reset();
|
|
@@ -474,7 +477,7 @@ class D {
|
|
|
474
477
|
return this.loaderState.useMergedData();
|
|
475
478
|
}
|
|
476
479
|
getLoaderInvocationHooks() {
|
|
477
|
-
return
|
|
480
|
+
return It(this.list.batches.getBatchIndex() + 1, (e) => e).map((e) => () => {
|
|
478
481
|
this.useLoadBatch(e);
|
|
479
482
|
});
|
|
480
483
|
}
|
|
@@ -485,7 +488,7 @@ class D {
|
|
|
485
488
|
}), this.useObserveBatchData(e, t), this.useObserveBatchLoadingState(e, t);
|
|
486
489
|
}
|
|
487
490
|
useObserveBatchLoadingState(t, e) {
|
|
488
|
-
|
|
491
|
+
I(() => (this.loaderState.setBatchLoadingState(
|
|
489
492
|
e,
|
|
490
493
|
t.state.value
|
|
491
494
|
), t.state.observe((a) => {
|
|
@@ -493,12 +496,12 @@ class D {
|
|
|
493
496
|
})), [t, e]);
|
|
494
497
|
}
|
|
495
498
|
useObserveBatchData(t, e) {
|
|
496
|
-
const a = (
|
|
497
|
-
const { data:
|
|
498
|
-
this.loaderState.setDataBatch(e,
|
|
499
|
+
const a = (n) => {
|
|
500
|
+
const { data: o, itemTotalCount: c } = n;
|
|
501
|
+
this.loaderState.setDataBatch(e, o), c !== void 0 && this.list.batches.updateItemTotalCount(c);
|
|
499
502
|
};
|
|
500
|
-
|
|
501
|
-
|
|
503
|
+
I(() => (t.value.value.isSet && a(t.value.value.value), t.value.observe((n) => {
|
|
504
|
+
n.isSet && a(n.value);
|
|
502
505
|
})), [t, e]);
|
|
503
506
|
}
|
|
504
507
|
getDataLoaderOptions(t) {
|
|
@@ -522,34 +525,34 @@ class D {
|
|
|
522
525
|
const e = this.dataSource, a = this.getDataLoaderOptions(t);
|
|
523
526
|
if ("staticData" in e)
|
|
524
527
|
return x(
|
|
525
|
-
async (
|
|
526
|
-
data:
|
|
527
|
-
itemTotalCount:
|
|
528
|
+
async (n) => ({
|
|
529
|
+
data: n,
|
|
530
|
+
itemTotalCount: n.length
|
|
528
531
|
}),
|
|
529
532
|
[e.staticData]
|
|
530
533
|
);
|
|
531
534
|
if ("asyncLoader" in e) {
|
|
532
|
-
const
|
|
533
|
-
return x(
|
|
535
|
+
const n = e.asyncLoader;
|
|
536
|
+
return x(n, [a]);
|
|
534
537
|
}
|
|
535
538
|
if ("asyncResourceFactory" in e) {
|
|
536
|
-
const
|
|
537
|
-
return
|
|
539
|
+
const n = e.asyncResourceFactory;
|
|
540
|
+
return n(a);
|
|
538
541
|
}
|
|
539
542
|
throw new Error("Unknown data source");
|
|
540
543
|
}
|
|
541
544
|
}
|
|
542
|
-
let
|
|
545
|
+
let ee = class X {
|
|
543
546
|
constructor(t) {
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
const { render: e, filters: a = [], sorting:
|
|
552
|
-
this.render = e, this.items = B.useNew(this), this.filters = a.map((
|
|
547
|
+
r(this, "filters");
|
|
548
|
+
r(this, "sorting");
|
|
549
|
+
r(this, "items");
|
|
550
|
+
r(this, "render");
|
|
551
|
+
r(this, "reactTable");
|
|
552
|
+
r(this, "batches");
|
|
553
|
+
r(this, "loader");
|
|
554
|
+
const { render: e, filters: a = [], sorting: n = [], batchesController: o } = t;
|
|
555
|
+
this.render = e, this.items = B.useNew(this), this.filters = a.map((c) => new Xt(this, c)), this.sorting = n.map((c) => new Zt(this, c)), this.batches = new Gt(this, o), this.loader = N.useNew(this, t.loader), this.reactTable = A.useNew(this, {
|
|
553
556
|
manualFiltering: this.loader.manualFiltering,
|
|
554
557
|
manualPagination: this.loader.manualPagination,
|
|
555
558
|
manualSorting: this.loader.manualSorting
|
|
@@ -562,8 +565,8 @@ let Gt = class X {
|
|
|
562
565
|
return this.filters.some((t) => t.isActive());
|
|
563
566
|
}
|
|
564
567
|
getSorting(t) {
|
|
565
|
-
const e = this.sorting.find((a) => a.
|
|
566
|
-
return Y(!!e, `Could not get Sorting (
|
|
568
|
+
const e = this.sorting.find((a) => a.id === t);
|
|
569
|
+
return Y(!!e, `Could not get Sorting (ID: ${t})`), e;
|
|
567
570
|
}
|
|
568
571
|
clearSorting() {
|
|
569
572
|
return this.sorting.forEach((t) => t.clear());
|
|
@@ -575,125 +578,104 @@ let Gt = class X {
|
|
|
575
578
|
return !this.loader.useIsLoading() && this.items.entries.length === 0;
|
|
576
579
|
}
|
|
577
580
|
};
|
|
578
|
-
const
|
|
579
|
-
itemList:
|
|
580
|
-
isLoading:
|
|
581
|
-
},
|
|
582
|
-
item:
|
|
583
|
-
title:
|
|
584
|
-
topContent:
|
|
585
|
-
content:
|
|
586
|
-
action:
|
|
587
|
-
avatar:
|
|
588
|
-
text:
|
|
589
|
-
|
|
590
|
-
heading: re,
|
|
581
|
+
const ae = "flow--list--items--item-list", se = "flow--list--items--is-loading", K = {
|
|
582
|
+
itemList: ae,
|
|
583
|
+
isLoading: se
|
|
584
|
+
}, ie = "flow--list--items--item", ne = "flow--list--items--title", re = "flow--list--items--top-content", oe = "flow--list--items--content", le = "flow--list--items--action", ce = "flow--list--items--avatar", ue = "flow--list--items--text", me = "flow--list--items--heading", m = {
|
|
585
|
+
item: ie,
|
|
586
|
+
title: ne,
|
|
587
|
+
topContent: re,
|
|
588
|
+
content: oe,
|
|
589
|
+
action: le,
|
|
590
|
+
avatar: ce,
|
|
591
|
+
text: ue,
|
|
592
|
+
heading: me,
|
|
591
593
|
"container-breakpoint-size-xs": "flow--list--items--container-breakpoint-size-xs",
|
|
592
594
|
"container-breakpoint-size-s": "flow--list--items--container-breakpoint-size-s",
|
|
593
595
|
"container-breakpoint-size-m": "flow--list--items--container-breakpoint-size-m",
|
|
594
596
|
"container-breakpoint-size-l": "flow--list--items--container-breakpoint-size-l",
|
|
595
597
|
"container-breakpoint-size-xl": "flow--list--items--container-breakpoint-size-xl"
|
|
596
|
-
},
|
|
598
|
+
}, de = (s) => {
|
|
597
599
|
const { className: t, children: e } = s, a = v(h);
|
|
598
|
-
return /* @__PURE__ */
|
|
600
|
+
return /* @__PURE__ */ i.createElement(T, null, /* @__PURE__ */ i.createElement(
|
|
599
601
|
p,
|
|
600
602
|
{
|
|
601
603
|
variant: "plain",
|
|
602
604
|
className: t,
|
|
603
605
|
"aria-label": a.format("list.options")
|
|
604
606
|
},
|
|
605
|
-
/* @__PURE__ */
|
|
607
|
+
/* @__PURE__ */ i.createElement(At, null)
|
|
606
608
|
), e);
|
|
607
|
-
},
|
|
609
|
+
}, he = (s) => s === "top" ? m.topContent : s === "bottom" ? m.content : m.topContent, Z = (s) => {
|
|
608
610
|
const {
|
|
609
611
|
children: t,
|
|
610
612
|
href: e,
|
|
611
613
|
className: a,
|
|
612
|
-
containerBreakpointSize:
|
|
613
|
-
...
|
|
614
|
-
} = s,
|
|
614
|
+
containerBreakpointSize: n = "m",
|
|
615
|
+
...o
|
|
616
|
+
} = s, c = {
|
|
615
617
|
ContextMenu: {
|
|
616
|
-
wrapWith: /* @__PURE__ */
|
|
618
|
+
wrapWith: /* @__PURE__ */ i.createElement(de, { className: m.action }),
|
|
617
619
|
placement: "bottom end"
|
|
618
620
|
},
|
|
619
621
|
Button: {
|
|
620
|
-
className:
|
|
622
|
+
className: m.action
|
|
621
623
|
},
|
|
622
624
|
Content: {
|
|
623
|
-
className:
|
|
625
|
+
className: Bt((l) => he(l.slot)),
|
|
624
626
|
tunnelId: "topContent"
|
|
625
627
|
},
|
|
626
628
|
Avatar: {
|
|
627
|
-
className:
|
|
629
|
+
className: m.avatar,
|
|
628
630
|
tunnelId: "title"
|
|
629
631
|
},
|
|
630
632
|
Heading: {
|
|
631
|
-
className:
|
|
632
|
-
level:
|
|
633
|
+
className: m.heading,
|
|
634
|
+
level: 5,
|
|
633
635
|
tunnelId: "title"
|
|
634
636
|
},
|
|
635
637
|
Text: {
|
|
636
|
-
className:
|
|
637
|
-
tunnelId: "title"
|
|
638
|
-
},
|
|
639
|
-
StatusBadge: {
|
|
640
|
-
className: u.statusBadge,
|
|
638
|
+
className: m.text,
|
|
641
639
|
tunnelId: "title"
|
|
642
640
|
},
|
|
643
641
|
Link: {
|
|
644
642
|
unstyled: !0
|
|
645
643
|
}
|
|
646
|
-
},
|
|
647
|
-
|
|
644
|
+
}, u = k(
|
|
645
|
+
m.item,
|
|
648
646
|
a,
|
|
649
|
-
|
|
650
|
-
), d = (
|
|
651
|
-
return /* @__PURE__ */
|
|
652
|
-
}, b = () => /* @__PURE__ */
|
|
653
|
-
const { className: t } = s, e = g(), a = e.loader.useIsLoading(),
|
|
647
|
+
m[Rt(n)]
|
|
648
|
+
), d = (l) => e ? /* @__PURE__ */ i.createElement(Nt, { unstyled: !0, ...o, className: u, href: e }, l.children) : /* @__PURE__ */ i.createElement("div", { className: u }, l.children);
|
|
649
|
+
return /* @__PURE__ */ i.createElement(d, null, /* @__PURE__ */ i.createElement(kt, { props: c }, /* @__PURE__ */ i.createElement(Dt, null, t, /* @__PURE__ */ i.createElement("div", { className: m.title }, /* @__PURE__ */ i.createElement(O, { id: "title" })), /* @__PURE__ */ i.createElement(O, { id: "topContent" }))));
|
|
650
|
+
}, b = () => /* @__PURE__ */ i.createElement(Z, null, /* @__PURE__ */ i.createElement(G, { height: "3rem" })), ge = (s) => {
|
|
651
|
+
const { className: t } = s, e = g(), a = e.loader.useIsLoading(), n = e.loader.useIsInitiallyLoading(), o = e.useIsEmpty(), c = v(h), u = e.items.entries.map((l) => /* @__PURE__ */ i.createElement(ut, { key: l.id }, l.render())), d = k(
|
|
654
652
|
K.itemList,
|
|
655
653
|
t,
|
|
656
654
|
a && K.isLoading
|
|
657
655
|
);
|
|
658
|
-
return
|
|
659
|
-
},
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
return null;
|
|
665
|
-
}
|
|
666
|
-
function he(s) {
|
|
667
|
-
return null;
|
|
668
|
-
}
|
|
669
|
-
function ge(s) {
|
|
670
|
-
return null;
|
|
671
|
-
}
|
|
672
|
-
function pe(s) {
|
|
673
|
-
return null;
|
|
674
|
-
}
|
|
675
|
-
const fe = "flow--list--footer", be = {
|
|
676
|
-
footer: fe
|
|
677
|
-
}, Se = (s) => {
|
|
678
|
-
const t = v(h), e = g(), a = e.batches, i = e.isFiltered() && !e.loader.manualFiltering, r = e.loader.useIsInitiallyLoading(), l = e.useIsEmpty(), m = a.getTotalItemsCount() ?? 0, d = a.getFilteredItemsCount() ?? 0, c = a.getVisibleItemsCount() ?? 0;
|
|
679
|
-
if (l)
|
|
656
|
+
return o ? /* @__PURE__ */ i.createElement(Ft, null, /* @__PURE__ */ i.createElement(wt, null), /* @__PURE__ */ i.createElement(Tt, null, c.format("list.noResult.heading")), /* @__PURE__ */ i.createElement(y, null, c.format("list.noResult.text"))) : /* @__PURE__ */ i.createElement("div", { className: d }, n ? pe : u);
|
|
657
|
+
}, pe = /* @__PURE__ */ i.createElement(i.Fragment, null, /* @__PURE__ */ i.createElement(b, null), /* @__PURE__ */ i.createElement(b, null), /* @__PURE__ */ i.createElement(b, null), /* @__PURE__ */ i.createElement(b, null), /* @__PURE__ */ i.createElement(b, null)), _ = (s) => null, fe = () => _, tt = (s) => null, be = () => tt, et = (s) => null, Se = () => et, at = (s) => null, ye = () => at, st = (s) => null, ve = () => st, Ce = "flow--list--footer", Ee = {
|
|
658
|
+
footer: Ce
|
|
659
|
+
}, Le = (s) => {
|
|
660
|
+
const t = v(h), e = g(), a = e.batches, n = e.isFiltered() && !e.loader.manualFiltering, o = e.loader.useIsInitiallyLoading(), c = e.useIsEmpty(), u = a.getTotalItemsCount() ?? 0, d = a.getFilteredItemsCount() ?? 0, l = a.getVisibleItemsCount() ?? 0;
|
|
661
|
+
if (c)
|
|
680
662
|
return null;
|
|
681
|
-
const C =
|
|
682
|
-
visibleItemsCount:
|
|
663
|
+
const C = o ? /* @__PURE__ */ i.createElement(G, { width: "200px" }) : n ? t.format("list.paginationInfoFiltered", {
|
|
664
|
+
visibleItemsCount: l,
|
|
683
665
|
filteredItemsCount: d,
|
|
684
|
-
totalItemsCount:
|
|
666
|
+
totalItemsCount: u
|
|
685
667
|
}) : t.format("list.paginationInfo", {
|
|
686
|
-
visibleItemsCount:
|
|
687
|
-
totalItemsCount:
|
|
668
|
+
visibleItemsCount: l,
|
|
669
|
+
totalItemsCount: u
|
|
688
670
|
});
|
|
689
|
-
return /* @__PURE__ */
|
|
690
|
-
},
|
|
691
|
-
const t = v(h), e = g(), a = e.loader.useIsLoading(),
|
|
692
|
-
return !e.batches.hasNextBatch() && !a ? null : /* @__PURE__ */
|
|
671
|
+
return /* @__PURE__ */ i.createElement(y, { ...s }, C);
|
|
672
|
+
}, Ie = (s) => {
|
|
673
|
+
const t = v(h), e = g(), a = e.loader.useIsLoading(), n = e.loader.useIsInitiallyLoading();
|
|
674
|
+
return !e.batches.hasNextBatch() && !a ? null : /* @__PURE__ */ i.createElement(
|
|
693
675
|
p,
|
|
694
676
|
{
|
|
695
|
-
isPending: a && !
|
|
696
|
-
isDisabled:
|
|
677
|
+
isPending: a && !n,
|
|
678
|
+
isDisabled: n,
|
|
697
679
|
...s,
|
|
698
680
|
onPress: () => e.batches.nextBatch(),
|
|
699
681
|
variant: "plain",
|
|
@@ -701,50 +683,70 @@ const fe = "flow--list--footer", be = {
|
|
|
701
683
|
},
|
|
702
684
|
t.format("list.showMore")
|
|
703
685
|
);
|
|
704
|
-
},
|
|
705
|
-
function
|
|
706
|
-
var C,
|
|
707
|
-
const { children: t, batchSize: e, ...a } = s,
|
|
686
|
+
}, Fe = () => /* @__PURE__ */ i.createElement("div", { className: Ee.footer }, /* @__PURE__ */ i.createElement(Le, null), /* @__PURE__ */ i.createElement(Ie, null)), we = (s) => /* @__PURE__ */ i.createElement(Z, null, /* @__PURE__ */ i.createElement(zt, null, JSON.stringify(s.data)));
|
|
687
|
+
function Te(s) {
|
|
688
|
+
var C, R, P, V;
|
|
689
|
+
const { children: t, batchSize: e, ...a } = s, n = (C = E(
|
|
690
|
+
t,
|
|
691
|
+
_
|
|
692
|
+
)) == null ? void 0 : C.props, o = (R = E(
|
|
708
693
|
t,
|
|
709
|
-
|
|
710
|
-
)) == null ? void 0 :
|
|
711
|
-
source:
|
|
712
|
-
...
|
|
713
|
-
asyncLoader:
|
|
714
|
-
} :
|
|
715
|
-
...
|
|
716
|
-
asyncResourceFactory:
|
|
717
|
-
} :
|
|
718
|
-
staticData:
|
|
694
|
+
Pt
|
|
695
|
+
)) == null ? void 0 : R.props, c = (P = E(t, st)) == null ? void 0 : P.props, u = {
|
|
696
|
+
source: n ? {
|
|
697
|
+
...n,
|
|
698
|
+
asyncLoader: n.children
|
|
699
|
+
} : o ? {
|
|
700
|
+
...o,
|
|
701
|
+
asyncResourceFactory: o.children
|
|
702
|
+
} : c ? {
|
|
703
|
+
staticData: c.data
|
|
719
704
|
} : void 0
|
|
720
|
-
}, d = (f) => /* @__PURE__ */
|
|
721
|
-
loader:
|
|
722
|
-
filters: U(t,
|
|
723
|
-
|
|
724
|
-
|
|
705
|
+
}, d = (f) => /* @__PURE__ */ i.createElement(we, { data: f }), l = ee.useNew({
|
|
706
|
+
loader: u,
|
|
707
|
+
filters: U(t, tt).map(
|
|
708
|
+
(f) => f.props
|
|
709
|
+
),
|
|
710
|
+
sorting: U(t, et).map((f) => f.props),
|
|
711
|
+
render: ((V = E(t, at)) == null ? void 0 : V.props.children) ?? d,
|
|
725
712
|
...a,
|
|
726
713
|
batchesController: {
|
|
727
714
|
batchSize: e
|
|
728
715
|
}
|
|
729
716
|
});
|
|
730
|
-
return /* @__PURE__ */
|
|
717
|
+
return /* @__PURE__ */ i.createElement(
|
|
731
718
|
Q.Provider,
|
|
732
719
|
{
|
|
733
720
|
value: {
|
|
734
|
-
list:
|
|
721
|
+
list: l
|
|
735
722
|
}
|
|
736
723
|
},
|
|
737
|
-
/* @__PURE__ */
|
|
738
|
-
/* @__PURE__ */
|
|
724
|
+
/* @__PURE__ */ i.createElement(Mt, null),
|
|
725
|
+
/* @__PURE__ */ i.createElement("div", { className: Yt.list }, /* @__PURE__ */ i.createElement(Jt, null), /* @__PURE__ */ i.createElement(ge, null), /* @__PURE__ */ i.createElement(Fe, null))
|
|
739
726
|
);
|
|
740
727
|
}
|
|
728
|
+
const ma = () => ({
|
|
729
|
+
List: Te,
|
|
730
|
+
Filter: be(),
|
|
731
|
+
Sorting: Se(),
|
|
732
|
+
ItemView: ye(),
|
|
733
|
+
StaticData: ve(),
|
|
734
|
+
LoaderAsync: fe(),
|
|
735
|
+
LoaderAsyncResource: Vt()
|
|
736
|
+
});
|
|
741
737
|
export {
|
|
742
|
-
|
|
743
|
-
|
|
738
|
+
Te as List,
|
|
739
|
+
tt as ListFilter,
|
|
744
740
|
Z as ListItem,
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
741
|
+
at as ListItemView,
|
|
742
|
+
_ as ListLoaderAsync,
|
|
743
|
+
et as ListSorting,
|
|
744
|
+
st as ListStaticData,
|
|
745
|
+
be as TypedListFilter,
|
|
746
|
+
ye as TypedListItemView,
|
|
747
|
+
fe as TypedListLoaderAsync,
|
|
748
|
+
Se as TypedListSorting,
|
|
749
|
+
ve as TypedListStaticData,
|
|
750
|
+
Te as default,
|
|
751
|
+
ma as typedList
|
|
750
752
|
};
|