@mittwald/flow-react-components 0.1.0-alpha.117 → 0.1.0-alpha.119
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/{Accordion-BzSb2drj.js → Accordion-OIqrGajq.js} +3 -3
- package/dist/Accordion.js +1 -1
- package/dist/Avatar.js +25 -27
- package/dist/Breadcrumb.js +2 -2
- package/dist/{Button-_8JcP9d1.js → Button-BCQWyOr4.js} +5 -5
- package/dist/Button.js +1 -1
- package/dist/ButtonGroup.js +1 -1
- package/dist/{Checkbox-CoDeuNsM.js → Checkbox-D0OKOlbQ.js} +4 -4
- package/dist/Checkbox.js +1 -1
- package/dist/{CheckboxButton-D_i7P_qt.js → CheckboxButton-m7uqvePd.js} +2 -2
- package/dist/CheckboxButton.js +1 -1
- package/dist/CheckboxGroup.js +3 -3
- package/dist/{Content-BK2g3Yro.js → Content-Dv4LJl-8.js} +1 -1
- package/dist/Content.js +1 -1
- package/dist/{ContextMenu-kfsMEIUy.js → ContextMenu-BQ1H5T2h.js} +1 -1
- package/dist/ContextMenu.js +2 -2
- package/dist/CopyButton.js +4 -4
- package/dist/FieldDescription.js +2 -2
- package/dist/{FieldError-ef2wRBhJ.js → FieldError-DaMdHZmc.js} +3 -3
- package/dist/FieldError.js +1 -1
- package/dist/Header.js +1 -1
- package/dist/Heading-CI96mO-u.js +48 -0
- package/dist/Heading.js +3 -45
- package/dist/{Icon-DAE3MVF2.js → Icon-BI5DQvoY.js} +1 -1
- package/dist/Icon.js +1 -1
- package/dist/{IconCheck-B_TL6rk7.js → IconCheck-BtMaGPKR.js} +1 -1
- package/dist/{IconCheckboxEmpty-9LFcjE0j.js → IconCheckboxEmpty-DS-0Y9DS.js} +1 -1
- package/dist/{IconCheckboxIndeterminate-CVt-Emyf.js → IconCheckboxIndeterminate-Coqmr05a.js} +1 -1
- package/dist/{IconChevronDown-4x9PZE3A.js → IconChevronDown-B47aUcVu.js} +1 -1
- package/dist/{IconChevronRight-BGr3gKMc.js → IconChevronRight-DRtwShTy.js} +1 -1
- package/dist/{IconClose-D5y8_cAW.js → IconClose-BCVIZgsO.js} +1 -1
- package/dist/{IconContextMenu-CscpZMqu.js → IconContextMenu-B6l97s-1.js} +1 -1
- package/dist/{IconCopy-J5KCFCD0.js → IconCopy-CmdUQbjo.js} +1 -1
- package/dist/{IconDanger-Be-8YO4Z.js → IconDanger-FoTA8c58.js} +1 -1
- package/dist/{IconPending-UvsvM-yo.js → IconPending-DaIqc2wH.js} +1 -1
- package/dist/{IconPlus-BZ0ojVn-.js → IconPlus-DHGdrWaP.js} +1 -1
- package/dist/{IconRadioOn-DKF0Bkmh.js → IconRadioOn-Dw-cld05.js} +1 -1
- package/dist/IconSearch-BfGdDu2q.js +9 -0
- package/dist/{IconSucceeded-C8ICBiWF.js → IconSucceeded-Dac_avN3.js} +1 -1
- package/dist/{IconWarning-D4N03eMl.js → IconWarning-DW8orO_0.js} +1 -1
- package/dist/Icons.js +81 -80
- package/dist/IllustratedMessage-D1xVzeZO.js +38 -0
- package/dist/IllustratedMessage.js +3 -35
- package/dist/Image.js +1 -1
- package/dist/Initials.js +1 -1
- package/dist/InlineAlert.js +2 -2
- package/dist/{Label-u7aknIoq.js → Label-CZL5PpdM.js} +1 -1
- package/dist/Label.js +1 -1
- package/dist/LayoutCard.js +1 -1
- package/dist/{Link-DGmaq49u.js → Link-Dudjl8oZ.js} +1 -1
- package/dist/Link.js +1 -1
- package/dist/List.js +268 -250
- package/dist/{LoadingSpinner-DdxaPznB.js → LoadingSpinner-CKlvSFNo.js} +2 -2
- package/dist/LoadingSpinner.js +1 -1
- package/dist/{MenuItem-D4OlNY0-.js → MenuItem-DhbpDBP7.js} +5 -5
- package/dist/MenuItem.js +1 -1
- package/dist/Modal.js +1 -1
- package/dist/Navigation.js +2 -2
- package/dist/NumberField.js +6 -6
- package/dist/OffCanvas.js +3 -3
- package/dist/RadioGroup.js +5 -5
- package/dist/Section.js +1 -1
- package/dist/Select.js +4 -4
- package/dist/StatusBadge.js +3 -3
- package/dist/{StatusIcon-bhiGnLh6.js → StatusIcon-D1TnVROF.js} +3 -3
- package/dist/StatusIcon.js +1 -1
- package/dist/Switch.js +5 -5
- package/dist/Tabs.js +7 -7
- package/dist/{Text-CMf42YK8.js → Text-fD3dK4JJ.js} +1 -1
- package/dist/Text.js +1 -1
- package/dist/TextArea.js +2 -2
- package/dist/TextField.js +2 -2
- package/dist/{TextFieldBase-DFFlaU7o.js → TextFieldBase-CmWxHsqM.js} +1 -1
- package/dist/flowComponent-DZ4pwhof.js +117 -0
- package/dist/react-hook-form.js +1 -1
- package/dist/styles.css +1 -1
- package/dist/types/components/Avatar/Avatar.d.ts +4 -3
- package/dist/types/components/Content/Content.d.ts +1 -0
- package/dist/types/components/Header/Header.d.ts +1 -1
- package/dist/types/components/List/stories/ListItem.stories.d.ts +5 -4
- package/package.json +4 -4
- package/dist/flowComponent-D-odaa-x.js +0 -36
- package/dist/useProps-L-mDIVx4.js +0 -91
package/dist/List.js
CHANGED
|
@@ -1,141 +1,150 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
/* */
|
|
3
3
|
var Q = Object.defineProperty;
|
|
4
|
-
var X = (
|
|
5
|
-
var o = (
|
|
6
|
-
import
|
|
7
|
-
import { C as
|
|
8
|
-
import { M as
|
|
9
|
-
import * as
|
|
10
|
-
import { MenuTrigger as
|
|
11
|
-
import { T as
|
|
4
|
+
var X = (r, t, e) => t in r ? Q(r, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[t] = e;
|
|
5
|
+
var o = (r, t, e) => (X(r, typeof t != "symbol" ? t + "" : t, e), e);
|
|
6
|
+
import s, { createContext as Z, useContext as _, createElement as tt, useEffect as C, useState as et, Suspense as at } from "react";
|
|
7
|
+
import { C as O } from "./ContextMenu-BQ1H5T2h.js";
|
|
8
|
+
import { M as $, d as st } from "./MenuItem-DhbpDBP7.js";
|
|
9
|
+
import * as H from "react-aria-components";
|
|
10
|
+
import { MenuTrigger as nt } from "react-aria-components";
|
|
11
|
+
import { T as f } from "./Text-fD3dK4JJ.js";
|
|
12
12
|
import "@tabler/icons-react";
|
|
13
|
-
import "./Icon-
|
|
14
|
-
import { I as
|
|
15
|
-
import { B as
|
|
16
|
-
import { useMessageFormatter as
|
|
17
|
-
import
|
|
18
|
-
import { I as rt } from "./IconClose-
|
|
19
|
-
import { getProperty as
|
|
20
|
-
import { useReactTable as
|
|
21
|
-
import
|
|
22
|
-
import { useLocalObservable as
|
|
23
|
-
import { autorun as
|
|
13
|
+
import "./Icon-BI5DQvoY.js";
|
|
14
|
+
import { I as q } from "./IconChevronDown-B47aUcVu.js";
|
|
15
|
+
import { B as g } from "./Button-BCQWyOr4.js";
|
|
16
|
+
import { useMessageFormatter as K, useLocalizedStringFormatter as E } from "react-aria";
|
|
17
|
+
import j from "clsx";
|
|
18
|
+
import { I as rt } from "./IconClose-BCVIZgsO.js";
|
|
19
|
+
import { getProperty as it } from "dot-prop";
|
|
20
|
+
import { useReactTable as ot, getCoreRowModel as lt, getSortedRowModel as ct, getFilteredRowModel as ut, getPaginationRowModel as mt, getFacetedUniqueValues as dt } from "@tanstack/react-table";
|
|
21
|
+
import J from "invariant";
|
|
22
|
+
import { useLocalObservable as ht } from "mobx-react-lite";
|
|
23
|
+
import { autorun as gt, runInAction as pt, makeObservable as ft, observable as k, computed as D, action as y } from "mobx";
|
|
24
24
|
import { getAsyncResource as P } from "@mittwald/react-use-promise";
|
|
25
|
-
import { times as
|
|
26
|
-
import { u as
|
|
25
|
+
import { times as bt } from "remeda";
|
|
26
|
+
import { u as M } from "./useSelector-DpU7_HMO.js";
|
|
27
27
|
import "./propsContext-CauylOgH.js";
|
|
28
|
-
import { P as
|
|
28
|
+
import { P as St } from "./PropsContextProvider-DZvwqHLP.js";
|
|
29
29
|
import "@react-aria/utils";
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
|
|
30
|
+
import { d as yt } from "./dynamic-ClpUSmEt.js";
|
|
31
|
+
import { W as Ct } from "./Wrap-DGT1h1o3.js";
|
|
32
|
+
import { L as vt } from "./Link-Dudjl8oZ.js";
|
|
33
|
+
import { I as Et } from "./IconContextMenu-B6l97s-1.js";
|
|
34
|
+
import { TunnelProvider as Ft, TunnelExit as N } from "@mittwald/react-tunnel";
|
|
35
|
+
import { I as Tt } from "./IllustratedMessage-D1xVzeZO.js";
|
|
36
|
+
import { I as wt } from "./IconSearch-BfGdDu2q.js";
|
|
37
|
+
import { H as It } from "./Heading-CI96mO-u.js";
|
|
38
|
+
import { d as b, a as V } from "./deepFindOfType-6pG0fH7S.js";
|
|
39
|
+
import { I as Lt } from "./InlineCode-BV2i5uN0.js";
|
|
40
|
+
import { ListLoaderAsyncResource as Bt } from "./List/ListLoaderAsyncResource.js";
|
|
41
|
+
const W = Z({}), h = () => _(W).list, At = (r) => /* @__PURE__ */ s.createElement(s.Fragment, null, r.children()), Rt = () => h().loader.getLoaderInvocationHooks().map((t, e) => /* @__PURE__ */ s.createElement(At, { key: e }, () => {
|
|
37
42
|
t();
|
|
38
|
-
})),
|
|
39
|
-
const { sorting: t } =
|
|
40
|
-
return /* @__PURE__ */
|
|
41
|
-
},
|
|
43
|
+
})), kt = (r) => {
|
|
44
|
+
const { sorting: t } = r;
|
|
45
|
+
return /* @__PURE__ */ s.createElement($, { id: t.getTableColumn().id }, t.name);
|
|
46
|
+
}, d = {
|
|
42
47
|
"de-DE": {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
"list.noResult.heading": "Keine Suchergebnisse gefunden",
|
|
49
|
+
"list.noResult.text": "Deine Suche ergab keine Ergebnisse. Bitte passe die Suchanfrage oder deine Filter an.",
|
|
50
|
+
"list.options": "Optionen",
|
|
51
|
+
"list.paginationInfo": "{visibleItemsCount} von insgesamt {totalItemsCount} angezeigt",
|
|
52
|
+
"list.paginationInfoFiltered": "{visibleItemsCount} von insgesamt {filteredItemsCount} (gefiltert aus {totalItemsCount}) angezeigt",
|
|
53
|
+
"list.resetAll": "Alles zurücksetzen",
|
|
54
|
+
"list.setSorting": "Sortierung: {property}",
|
|
55
|
+
"list.showMore": "Mehr anzeigen",
|
|
56
|
+
"list.sorting": "Sortierung"
|
|
50
57
|
},
|
|
51
58
|
"en-EN": {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
59
|
+
"list.noResult.heading": "No search results found",
|
|
60
|
+
"list.noResult.text": "Your search did not return any results. Please adjust the search query or your filters.",
|
|
61
|
+
"list.options": "Options",
|
|
62
|
+
"list.paginationInfo": "Showing {visibleItemsCount} of {totalItemsCount}",
|
|
63
|
+
"list.paginationInfoFiltered": "Showing {visibleItemsCount} of {filteredItemsCount} (unfiltered total count {totalItemsCount})",
|
|
64
|
+
"list.resetAll": "Reset filters",
|
|
65
|
+
"list.setSorting": "Sorting: {property}",
|
|
66
|
+
"list.showMore": "Show more",
|
|
67
|
+
"list.sorting": "Sorting"
|
|
68
|
+
}
|
|
69
|
+
}, v = (r) => {
|
|
70
|
+
const { children: t, locales: e, variables: a } = r;
|
|
71
|
+
return K(e)(t, a);
|
|
72
|
+
}, Dt = () => {
|
|
73
|
+
const r = h(), t = r.sorting.map((n) => /* @__PURE__ */ s.createElement(kt, { sorting: n, key: n.getTableColumn().id }));
|
|
74
|
+
if (r.sorting.length === 0)
|
|
66
75
|
return null;
|
|
67
|
-
const e =
|
|
76
|
+
const e = r.sorting.find((n) => n.isSorted()), a = /* @__PURE__ */ s.createElement(f, null, e ? /* @__PURE__ */ s.createElement(
|
|
68
77
|
v,
|
|
69
78
|
{
|
|
70
|
-
locales:
|
|
79
|
+
locales: d,
|
|
71
80
|
variables: {
|
|
72
81
|
property: e.name ?? e.property
|
|
73
82
|
}
|
|
74
83
|
},
|
|
75
|
-
"setSorting"
|
|
76
|
-
) : /* @__PURE__ */
|
|
77
|
-
return /* @__PURE__ */
|
|
78
|
-
|
|
84
|
+
"list.setSorting"
|
|
85
|
+
) : /* @__PURE__ */ s.createElement(v, { locales: d }, "list.sorting"));
|
|
86
|
+
return /* @__PURE__ */ s.createElement(H.MenuTrigger, null, /* @__PURE__ */ s.createElement(g, { variant: "soft", size: "s", color: "secondary" }, a, /* @__PURE__ */ s.createElement(q, null)), /* @__PURE__ */ s.createElement(
|
|
87
|
+
O,
|
|
79
88
|
{
|
|
80
89
|
selectionMode: "single",
|
|
81
90
|
selectedKeys: e ? [e.property] : [],
|
|
82
|
-
onAction: (
|
|
83
|
-
|
|
91
|
+
onAction: (n) => {
|
|
92
|
+
r.getSorting(String(n)).enable();
|
|
84
93
|
}
|
|
85
94
|
},
|
|
86
95
|
t
|
|
87
96
|
));
|
|
88
|
-
},
|
|
89
|
-
const { filter: t } =
|
|
90
|
-
t.toggleValue(
|
|
97
|
+
}, Pt = (r) => {
|
|
98
|
+
const { filter: t } = r, e = t.values.map((i) => /* @__PURE__ */ s.createElement($, { key: t.getValueId(i), id: String(i) }, String(i))), a = t.values.filter((i) => t.isValueActive(i)).map((i) => String(i)), n = (i) => {
|
|
99
|
+
t.toggleValue(i);
|
|
91
100
|
};
|
|
92
|
-
return /* @__PURE__ */
|
|
93
|
-
|
|
101
|
+
return /* @__PURE__ */ s.createElement(H.MenuTrigger, null, /* @__PURE__ */ s.createElement(g, { variant: "soft", size: "s", color: "secondary" }, /* @__PURE__ */ s.createElement(f, null, t.name ?? t.property), /* @__PURE__ */ s.createElement(q, null)), /* @__PURE__ */ s.createElement(
|
|
102
|
+
O,
|
|
94
103
|
{
|
|
95
|
-
onAction:
|
|
104
|
+
onAction: n,
|
|
96
105
|
selectionMode: "multiple",
|
|
97
106
|
selectedKeys: a
|
|
98
107
|
},
|
|
99
108
|
e
|
|
100
109
|
));
|
|
101
|
-
},
|
|
102
|
-
header:
|
|
103
|
-
pickerList:
|
|
104
|
-
},
|
|
105
|
-
activeFilters:
|
|
106
|
-
clearButton:
|
|
107
|
-
},
|
|
108
|
-
const
|
|
109
|
-
(e) => e.values.filter((a) => e.isValueActive(a)).map((a) => /* @__PURE__ */
|
|
110
|
-
|
|
110
|
+
}, Mt = "flow--list--header", Nt = "flow--list--header--picker-list", x = {
|
|
111
|
+
header: Mt,
|
|
112
|
+
pickerList: Nt
|
|
113
|
+
}, Vt = "flow--list--header--active-filters", xt = "flow--list--header--clear-button", z = {
|
|
114
|
+
activeFilters: Vt,
|
|
115
|
+
clearButton: xt
|
|
116
|
+
}, zt = () => {
|
|
117
|
+
const r = h(), t = r.filters.flatMap(
|
|
118
|
+
(e) => e.values.filter((a) => e.isValueActive(a)).map((a) => /* @__PURE__ */ s.createElement(
|
|
119
|
+
g,
|
|
111
120
|
{
|
|
112
121
|
variant: "soft",
|
|
113
122
|
size: "s",
|
|
114
123
|
key: String(a),
|
|
115
124
|
onPress: () => e.deactivateValue(a)
|
|
116
125
|
},
|
|
117
|
-
/* @__PURE__ */
|
|
118
|
-
/* @__PURE__ */
|
|
126
|
+
/* @__PURE__ */ s.createElement(f, null, String(a)),
|
|
127
|
+
/* @__PURE__ */ s.createElement(rt, null)
|
|
119
128
|
))
|
|
120
129
|
);
|
|
121
|
-
return t.length <= 0 ? null : /* @__PURE__ */
|
|
122
|
-
|
|
130
|
+
return t.length <= 0 ? null : /* @__PURE__ */ s.createElement("div", { className: z.activeFilters }, t, /* @__PURE__ */ s.createElement(
|
|
131
|
+
g,
|
|
123
132
|
{
|
|
124
|
-
className:
|
|
133
|
+
className: z.clearButton,
|
|
125
134
|
size: "s",
|
|
126
135
|
variant: "plain",
|
|
127
|
-
onPress: () =>
|
|
136
|
+
onPress: () => r.clearFilters()
|
|
128
137
|
},
|
|
129
|
-
/* @__PURE__ */
|
|
138
|
+
/* @__PURE__ */ s.createElement(v, { locales: d }, "list.resetAll")
|
|
130
139
|
));
|
|
131
|
-
},
|
|
132
|
-
const { className: t } =
|
|
133
|
-
return /* @__PURE__ */
|
|
134
|
-
},
|
|
135
|
-
list:
|
|
140
|
+
}, Ut = (r) => {
|
|
141
|
+
const { className: t } = r, a = h().filters.map((n) => /* @__PURE__ */ s.createElement(Pt, { key: n.property, filter: n }));
|
|
142
|
+
return /* @__PURE__ */ s.createElement("div", { className: j(t, x.header) }, /* @__PURE__ */ s.createElement("div", { className: x.pickerList }, /* @__PURE__ */ s.createElement(Dt, null), a), /* @__PURE__ */ s.createElement(zt, null));
|
|
143
|
+
}, Ot = "flow--list", $t = {
|
|
144
|
+
list: Ot
|
|
136
145
|
};
|
|
137
|
-
var
|
|
138
|
-
let
|
|
146
|
+
var m;
|
|
147
|
+
let Ht = (m = class {
|
|
139
148
|
constructor(t, e, a) {
|
|
140
149
|
o(this, "id");
|
|
141
150
|
o(this, "data");
|
|
@@ -143,12 +152,12 @@ let Rt = (u = class {
|
|
|
143
152
|
this.collection = t, this.id = e, this.data = a;
|
|
144
153
|
}
|
|
145
154
|
render() {
|
|
146
|
-
return (this.collection.list.render ??
|
|
155
|
+
return (this.collection.list.render ?? m.fallbackRenderItemFn)(this.data);
|
|
147
156
|
}
|
|
148
157
|
static fromRow(t, e) {
|
|
149
|
-
return new
|
|
158
|
+
return new m(t, e.id, e.original);
|
|
150
159
|
}
|
|
151
|
-
}, o(
|
|
160
|
+
}, o(m, "fallbackRenderItemFn", (t) => tt("pre", void 0, JSON.stringify(t))), m);
|
|
152
161
|
class F {
|
|
153
162
|
constructor(t) {
|
|
154
163
|
o(this, "list");
|
|
@@ -158,15 +167,15 @@ class F {
|
|
|
158
167
|
return new F(t);
|
|
159
168
|
}
|
|
160
169
|
get entries() {
|
|
161
|
-
return this.list.reactTable.table.getRowModel().rows.map((t) =>
|
|
170
|
+
return this.list.reactTable.table.getRowModel().rows.map((t) => Ht.fromRow(this, t));
|
|
162
171
|
}
|
|
163
172
|
}
|
|
164
|
-
class
|
|
173
|
+
class qt {
|
|
165
174
|
constructor(t, e = {}) {
|
|
166
175
|
o(this, "batchSize");
|
|
167
176
|
o(this, "list");
|
|
168
177
|
const { batchSize: a = 20 } = e;
|
|
169
|
-
this.list = t, this.batchSize = a, t.filters.forEach((
|
|
178
|
+
this.list = t, this.batchSize = a, t.filters.forEach((n) => n.onFilterUpdated(() => this.reset()));
|
|
170
179
|
}
|
|
171
180
|
get reactTable() {
|
|
172
181
|
return this.list.reactTable.table;
|
|
@@ -210,8 +219,8 @@ class zt {
|
|
|
210
219
|
}
|
|
211
220
|
}
|
|
212
221
|
}
|
|
213
|
-
const
|
|
214
|
-
class
|
|
222
|
+
const Kt = (r, t) => r === t;
|
|
223
|
+
class jt {
|
|
215
224
|
constructor(t, e) {
|
|
216
225
|
o(this, "_values");
|
|
217
226
|
o(this, "list");
|
|
@@ -220,28 +229,28 @@ class Ut {
|
|
|
220
229
|
o(this, "matcher");
|
|
221
230
|
o(this, "name");
|
|
222
231
|
o(this, "onFilterUpdateCallbacks", /* @__PURE__ */ new Set());
|
|
223
|
-
this.list = t, this.property = e.property, this.mode = e.mode ?? "one", this._values = e.values, this.matcher = e.matcher ??
|
|
232
|
+
this.list = t, this.property = e.property, this.mode = e.mode ?? "one", this._values = e.values, this.matcher = e.matcher ?? Kt, this.name = e.name;
|
|
224
233
|
}
|
|
225
234
|
updateTableColumnDef(t) {
|
|
226
235
|
t.enableColumnFilter = !0, t.filterFn = this.getReactTableFilterFn();
|
|
227
236
|
}
|
|
228
237
|
getReactTableFilterFn() {
|
|
229
238
|
return (t, e, a) => this.checkFilterMatches(
|
|
230
|
-
|
|
239
|
+
it(t.original, this.property),
|
|
231
240
|
a
|
|
232
241
|
);
|
|
233
242
|
}
|
|
234
243
|
checkFilterMatches(t, e) {
|
|
235
244
|
if (e === null)
|
|
236
245
|
return !0;
|
|
237
|
-
const a = (
|
|
246
|
+
const a = (i) => Array.isArray(i) ? i : [i], n = (i) => this.matcher(i, t);
|
|
238
247
|
if (this.mode === "all")
|
|
239
|
-
return a(e).every(
|
|
248
|
+
return a(e).every(n);
|
|
240
249
|
if (this.mode === "some") {
|
|
241
|
-
const
|
|
242
|
-
return
|
|
250
|
+
const i = a(e);
|
|
251
|
+
return i.length === 0 || i.some(n);
|
|
243
252
|
} else if (this.mode === "one")
|
|
244
|
-
return
|
|
253
|
+
return n(e);
|
|
245
254
|
throw new Error(`Unknown filter mode '${this.mode}'`);
|
|
246
255
|
}
|
|
247
256
|
getTableColumnFilter() {
|
|
@@ -273,12 +282,12 @@ class Ut {
|
|
|
273
282
|
activateValue(t) {
|
|
274
283
|
const e = this.getArrayValue();
|
|
275
284
|
let a;
|
|
276
|
-
this.mode === "all" || this.mode === "some" ? a = [...e, t] : a = t, this.list.reactTable.getTableColumn(this.property).setFilterValue(a), this.onFilterUpdateCallbacks.forEach((
|
|
285
|
+
this.mode === "all" || this.mode === "some" ? a = [...e, t] : a = t, this.list.reactTable.getTableColumn(this.property).setFilterValue(a), this.onFilterUpdateCallbacks.forEach((n) => n());
|
|
277
286
|
}
|
|
278
287
|
deactivateValue(t) {
|
|
279
288
|
const e = this.getArrayValue();
|
|
280
289
|
let a;
|
|
281
|
-
this.mode === "all" || this.mode === "some" ? a = e.filter((
|
|
290
|
+
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());
|
|
282
291
|
}
|
|
283
292
|
clearValues() {
|
|
284
293
|
let t;
|
|
@@ -286,14 +295,14 @@ class Ut {
|
|
|
286
295
|
}
|
|
287
296
|
toggleValue(t) {
|
|
288
297
|
const e = this.isValueActive(t), a = this.getArrayValue();
|
|
289
|
-
let
|
|
290
|
-
this.mode === "all" || this.mode === "some" ? e ?
|
|
298
|
+
let n;
|
|
299
|
+
this.mode === "all" || this.mode === "some" ? e ? n = a.filter((i) => i !== t) : n = [...a, t] : n = e ? null : t, this.list.reactTable.getTableColumn(this.property).setFilterValue(n), this.onFilterUpdateCallbacks.forEach((i) => i());
|
|
291
300
|
}
|
|
292
301
|
onFilterUpdated(t) {
|
|
293
302
|
this.onFilterUpdateCallbacks.add(t);
|
|
294
303
|
}
|
|
295
304
|
}
|
|
296
|
-
class
|
|
305
|
+
class Jt {
|
|
297
306
|
constructor(t, e) {
|
|
298
307
|
o(this, "list");
|
|
299
308
|
o(this, "property");
|
|
@@ -318,8 +327,8 @@ class Ot {
|
|
|
318
327
|
this.list.reactTable.getTableColumn(this.property).clearSorting();
|
|
319
328
|
}
|
|
320
329
|
}
|
|
321
|
-
const
|
|
322
|
-
class
|
|
330
|
+
const Wt = (r) => C(gt(r));
|
|
331
|
+
class T {
|
|
323
332
|
constructor(t, e = {}) {
|
|
324
333
|
o(this, "list");
|
|
325
334
|
o(this, "table");
|
|
@@ -329,40 +338,40 @@ class E {
|
|
|
329
338
|
if (!e)
|
|
330
339
|
return;
|
|
331
340
|
const a = typeof t == "function" ? t(e) : t;
|
|
332
|
-
|
|
341
|
+
pt(() => {
|
|
333
342
|
this.tableState.value = this.getUpdatedTableState(e, a);
|
|
334
343
|
});
|
|
335
344
|
});
|
|
336
|
-
this.list = t, this.tableState =
|
|
345
|
+
this.list = t, this.tableState = ht(() => ({ value: void 0 })), this.table = this.useReactTable(e);
|
|
337
346
|
}
|
|
338
347
|
static useNew(t, e = {}) {
|
|
339
|
-
return new
|
|
348
|
+
return new T(t, e);
|
|
340
349
|
}
|
|
341
350
|
useReactTable(t = {}) {
|
|
342
|
-
const e = this.list.loader.useData(), a = this.list.sorting.filter((
|
|
351
|
+
const e = this.list.loader.useData(), a = this.list.sorting.filter((i) => i.defaultEnabled), n = ot({
|
|
343
352
|
data: e,
|
|
344
353
|
initialState: {
|
|
345
354
|
pagination: {
|
|
346
355
|
pageSize: this.list.batches.batchSize
|
|
347
356
|
},
|
|
348
|
-
sorting: a.map((
|
|
349
|
-
id: String(
|
|
350
|
-
desc:
|
|
357
|
+
sorting: a.map((i) => ({
|
|
358
|
+
id: String(i.property),
|
|
359
|
+
desc: i.direction === "desc"
|
|
351
360
|
}))
|
|
352
361
|
},
|
|
353
362
|
columns: this.getTableColumnDefs(),
|
|
354
|
-
getCoreRowModel:
|
|
355
|
-
getSortedRowModel:
|
|
356
|
-
getFilteredRowModel:
|
|
357
|
-
getPaginationRowModel:
|
|
358
|
-
getFacetedUniqueValues:
|
|
363
|
+
getCoreRowModel: lt(),
|
|
364
|
+
getSortedRowModel: ct(),
|
|
365
|
+
getFilteredRowModel: ut(),
|
|
366
|
+
getPaginationRowModel: mt(),
|
|
367
|
+
getFacetedUniqueValues: dt(),
|
|
359
368
|
onStateChange: this.onTableStateChange,
|
|
360
369
|
...t
|
|
361
370
|
});
|
|
362
|
-
return this.useUpdateTableState(
|
|
371
|
+
return this.useUpdateTableState(n), n;
|
|
363
372
|
}
|
|
364
373
|
useUpdateTableState(t) {
|
|
365
|
-
|
|
374
|
+
Wt(() => {
|
|
366
375
|
const e = this.tableState.value;
|
|
367
376
|
e ? t.setOptions((a) => ({
|
|
368
377
|
...a,
|
|
@@ -375,20 +384,20 @@ class E {
|
|
|
375
384
|
}
|
|
376
385
|
getTableColumn(t) {
|
|
377
386
|
const e = this.table.getColumn(t);
|
|
378
|
-
return
|
|
387
|
+
return J(!!e, `Column #${t} is not defined`), e;
|
|
379
388
|
}
|
|
380
389
|
getTableColumnDefs() {
|
|
381
390
|
const t = /* @__PURE__ */ new Map(), e = (a) => {
|
|
382
|
-
const
|
|
383
|
-
if (
|
|
384
|
-
return
|
|
385
|
-
const
|
|
391
|
+
const n = t.get(a);
|
|
392
|
+
if (n)
|
|
393
|
+
return n;
|
|
394
|
+
const i = {
|
|
386
395
|
id: a,
|
|
387
396
|
accessorKey: a,
|
|
388
397
|
enableSorting: !1,
|
|
389
398
|
enableColumnFilter: !1
|
|
390
399
|
};
|
|
391
|
-
return t.set(a,
|
|
400
|
+
return t.set(a, i), i;
|
|
392
401
|
};
|
|
393
402
|
return this.list.filters.forEach(
|
|
394
403
|
(a) => a.updateTableColumnDef(e(a.property))
|
|
@@ -397,12 +406,12 @@ class E {
|
|
|
397
406
|
), Array.from(t.values());
|
|
398
407
|
}
|
|
399
408
|
}
|
|
400
|
-
class
|
|
409
|
+
class w {
|
|
401
410
|
constructor() {
|
|
402
411
|
o(this, "dataBatches", []);
|
|
403
412
|
o(this, "prevDataBatches", []);
|
|
404
413
|
o(this, "batchLoadingStates", []);
|
|
405
|
-
|
|
414
|
+
ft(this, {
|
|
406
415
|
dataBatches: k,
|
|
407
416
|
batchLoadingStates: k,
|
|
408
417
|
mergedData: D,
|
|
@@ -413,7 +422,7 @@ class T {
|
|
|
413
422
|
});
|
|
414
423
|
}
|
|
415
424
|
static useNew() {
|
|
416
|
-
return
|
|
425
|
+
return et(new w())[0];
|
|
417
426
|
}
|
|
418
427
|
reset() {
|
|
419
428
|
this.batchLoadingStates = [], this.dataBatches = [];
|
|
@@ -428,17 +437,17 @@ class T {
|
|
|
428
437
|
return (this.dataBatches.length === 0 ? this.prevDataBatches : this.dataBatches).flatMap((e) => e);
|
|
429
438
|
}
|
|
430
439
|
useMergedData() {
|
|
431
|
-
return
|
|
440
|
+
return M(() => this.mergedData);
|
|
432
441
|
}
|
|
433
442
|
get isLoading() {
|
|
434
443
|
return this.batchLoadingStates.some((t) => t === "loading");
|
|
435
444
|
}
|
|
436
445
|
useIsLoading() {
|
|
437
|
-
return
|
|
446
|
+
return M(() => this.isLoading);
|
|
438
447
|
}
|
|
439
448
|
}
|
|
440
|
-
const
|
|
441
|
-
class
|
|
449
|
+
const Yt = [];
|
|
450
|
+
class I {
|
|
442
451
|
constructor(t, e = {}) {
|
|
443
452
|
o(this, "list");
|
|
444
453
|
o(this, "dataSource");
|
|
@@ -447,12 +456,12 @@ class w {
|
|
|
447
456
|
o(this, "manualPagination");
|
|
448
457
|
o(this, "loaderState");
|
|
449
458
|
const { source: a } = e;
|
|
450
|
-
this.dataSource = a ?? { staticData:
|
|
451
|
-
const
|
|
452
|
-
this.list = t, this.loaderState =
|
|
459
|
+
this.dataSource = a ?? { staticData: Yt };
|
|
460
|
+
const n = "manualPagination" in this.dataSource ? this.dataSource.manualPagination : void 0, i = "manualFiltering" in this.dataSource ? this.dataSource.manualFiltering : void 0, l = "manualSorting" in this.dataSource ? this.dataSource.manualSorting : void 0;
|
|
461
|
+
this.list = t, this.loaderState = w.useNew(), this.manualPagination = n ?? !1, this.manualFiltering = i ?? this.manualPagination, this.manualSorting = l ?? this.manualPagination, this.list.filters.forEach((u) => u.onFilterUpdated(() => this.reset()));
|
|
453
462
|
}
|
|
454
463
|
static useNew(t, e = {}) {
|
|
455
|
-
return new
|
|
464
|
+
return new I(t, e);
|
|
456
465
|
}
|
|
457
466
|
reset() {
|
|
458
467
|
this.loaderState.reset();
|
|
@@ -464,7 +473,7 @@ class w {
|
|
|
464
473
|
return this.loaderState.useMergedData();
|
|
465
474
|
}
|
|
466
475
|
getLoaderInvocationHooks() {
|
|
467
|
-
return
|
|
476
|
+
return bt(this.list.batches.getBatchIndex() + 1, (e) => e).map((e) => () => {
|
|
468
477
|
this.useLoadBatch(e);
|
|
469
478
|
});
|
|
470
479
|
}
|
|
@@ -475,13 +484,13 @@ class w {
|
|
|
475
484
|
C(() => {
|
|
476
485
|
if (!a.hasValue)
|
|
477
486
|
return;
|
|
478
|
-
const { data:
|
|
479
|
-
this.loaderState.setDataBatch(t,
|
|
487
|
+
const { data: n, itemTotalCount: i } = a.value;
|
|
488
|
+
this.loaderState.setDataBatch(t, n), i !== void 0 && this.list.batches.updateItemTotalCount(i);
|
|
480
489
|
}, [t, a.maybeValue]), C(() => (this.loaderState.setBatchLoadingState(
|
|
481
490
|
t,
|
|
482
491
|
e.state.value
|
|
483
|
-
), e.state.observe((
|
|
484
|
-
this.loaderState.setBatchLoadingState(t,
|
|
492
|
+
), e.state.observe((n) => {
|
|
493
|
+
this.loaderState.setBatchLoadingState(t, n);
|
|
485
494
|
})), [e, t]);
|
|
486
495
|
}
|
|
487
496
|
getDataLoaderOptions(t) {
|
|
@@ -504,27 +513,27 @@ class w {
|
|
|
504
513
|
getBatchDataAsyncResource(t) {
|
|
505
514
|
const e = this.dataSource, a = this.getDataLoaderOptions(t);
|
|
506
515
|
if ("staticData" in e) {
|
|
507
|
-
const
|
|
516
|
+
const n = e.staticData;
|
|
508
517
|
return P(
|
|
509
518
|
async () => ({
|
|
510
|
-
data:
|
|
511
|
-
itemTotalCount:
|
|
519
|
+
data: n,
|
|
520
|
+
itemTotalCount: n.length
|
|
512
521
|
}),
|
|
513
522
|
[]
|
|
514
523
|
);
|
|
515
524
|
}
|
|
516
525
|
if ("asyncLoader" in e) {
|
|
517
|
-
const
|
|
518
|
-
return P(
|
|
526
|
+
const n = e.asyncLoader;
|
|
527
|
+
return P(n, [a]);
|
|
519
528
|
}
|
|
520
529
|
if ("asyncResourceFactory" in e) {
|
|
521
|
-
const
|
|
522
|
-
return
|
|
530
|
+
const n = e.asyncResourceFactory;
|
|
531
|
+
return n(a);
|
|
523
532
|
}
|
|
524
533
|
throw new Error("Unknown data source");
|
|
525
534
|
}
|
|
526
535
|
}
|
|
527
|
-
let
|
|
536
|
+
let Gt = class Y {
|
|
528
537
|
constructor(t) {
|
|
529
538
|
o(this, "filters");
|
|
530
539
|
o(this, "sorting");
|
|
@@ -533,22 +542,22 @@ let qt = class W {
|
|
|
533
542
|
o(this, "reactTable");
|
|
534
543
|
o(this, "batches");
|
|
535
544
|
o(this, "loader");
|
|
536
|
-
const { render: e, filters: a = [], sorting:
|
|
537
|
-
this.render = e, this.items = F.useNew(this), this.filters = a.map((l) => new
|
|
545
|
+
const { render: e, filters: a = [], sorting: n = [], batchesController: i } = t;
|
|
546
|
+
this.render = e, this.items = F.useNew(this), this.filters = a.map((l) => new jt(this, l)), this.sorting = n.map((l) => new Jt(this, l)), this.batches = new qt(this, i), this.loader = I.useNew(this, t.loader), this.reactTable = T.useNew(this, {
|
|
538
547
|
manualFiltering: this.loader.manualFiltering,
|
|
539
548
|
manualPagination: this.loader.manualPagination,
|
|
540
549
|
manualSorting: this.loader.manualSorting
|
|
541
550
|
});
|
|
542
551
|
}
|
|
543
552
|
static useNew(t) {
|
|
544
|
-
return new
|
|
553
|
+
return new Y(t);
|
|
545
554
|
}
|
|
546
555
|
isFiltered() {
|
|
547
556
|
return this.filters.some((t) => t.isActive());
|
|
548
557
|
}
|
|
549
558
|
getSorting(t) {
|
|
550
559
|
const e = this.sorting.find((a) => a.property === t);
|
|
551
|
-
return
|
|
560
|
+
return J(!!e, `Could not get Sorting (property: ${t})`), e;
|
|
552
561
|
}
|
|
553
562
|
clearSorting() {
|
|
554
563
|
return this.sorting.forEach((t) => t.clear());
|
|
@@ -557,50 +566,60 @@ let qt = class W {
|
|
|
557
566
|
return this.filters.forEach((t) => t.clearValues());
|
|
558
567
|
}
|
|
559
568
|
};
|
|
560
|
-
const
|
|
561
|
-
itemList:
|
|
562
|
-
isLoading:
|
|
563
|
-
},
|
|
564
|
-
item:
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
569
|
+
const Qt = "flow--list--items--item-list", Xt = "flow--list--items--is-loading", U = {
|
|
570
|
+
itemList: Qt,
|
|
571
|
+
isLoading: Xt
|
|
572
|
+
}, Zt = "flow--list--items--item", _t = "flow--list--items--title", te = "flow--list--items--top-content", ee = "flow--list--items--content", ae = "flow--list--items--action", se = "flow--list--items--avatar", ne = "flow--list--items--text", re = "flow--list--items--status-badge", ie = "flow--list--items--heading", c = {
|
|
573
|
+
item: Zt,
|
|
574
|
+
title: _t,
|
|
575
|
+
topContent: te,
|
|
576
|
+
content: ee,
|
|
577
|
+
action: ae,
|
|
578
|
+
avatar: se,
|
|
579
|
+
text: ne,
|
|
580
|
+
statusBadge: re,
|
|
581
|
+
heading: ie
|
|
582
|
+
}, oe = (r) => {
|
|
583
|
+
const { className: t, children: e } = r, a = E(d);
|
|
584
|
+
return /* @__PURE__ */ s.createElement(nt, null, /* @__PURE__ */ s.createElement(
|
|
585
|
+
g,
|
|
575
586
|
{
|
|
576
587
|
variant: "plain",
|
|
577
588
|
className: t,
|
|
578
|
-
"aria-label": a.format("options")
|
|
589
|
+
"aria-label": a.format("list.options")
|
|
579
590
|
},
|
|
580
|
-
/* @__PURE__ */
|
|
591
|
+
/* @__PURE__ */ s.createElement(Et, null)
|
|
581
592
|
), e);
|
|
582
|
-
},
|
|
583
|
-
const { children: t } =
|
|
593
|
+
}, le = (r) => r === "top" ? c.topContent : r === "bottom" ? c.content : c.topContent, ce = (r) => {
|
|
594
|
+
const { children: t } = r, e = st(t, vt), a = {
|
|
595
|
+
ContextMenu: {
|
|
596
|
+
render: (i, l) => /* @__PURE__ */ s.createElement(oe, { className: c.action }, /* @__PURE__ */ s.createElement(i, { ...l, placement: "bottom end" }))
|
|
597
|
+
},
|
|
598
|
+
Button: {
|
|
599
|
+
className: c.action
|
|
600
|
+
},
|
|
601
|
+
Content: {
|
|
602
|
+
className: yt((i) => le(i.slot)),
|
|
603
|
+
tunnelId: "topContent"
|
|
604
|
+
},
|
|
584
605
|
Avatar: {
|
|
585
|
-
className: c.avatar
|
|
606
|
+
className: c.avatar,
|
|
607
|
+
tunnelId: "title"
|
|
586
608
|
},
|
|
587
609
|
Heading: {
|
|
588
610
|
className: c.heading,
|
|
589
|
-
level:
|
|
611
|
+
level: 4,
|
|
612
|
+
tunnelId: "title"
|
|
590
613
|
},
|
|
591
614
|
Text: {
|
|
592
|
-
className: c.text
|
|
615
|
+
className: c.text,
|
|
616
|
+
tunnelId: "title"
|
|
593
617
|
},
|
|
594
618
|
StatusBadge: {
|
|
595
|
-
className: c.statusBadge
|
|
596
|
-
|
|
597
|
-
Content: {
|
|
598
|
-
className: c.content
|
|
599
|
-
},
|
|
600
|
-
ContextMenu: {
|
|
601
|
-
render: (n, l) => /* @__PURE__ */ r.createElement(_t, { className: c.optionsButton }, /* @__PURE__ */ r.createElement(n, { ...l, placement: "bottom end" }))
|
|
619
|
+
className: c.statusBadge,
|
|
620
|
+
tunnelId: "title"
|
|
602
621
|
}
|
|
603
|
-
},
|
|
622
|
+
}, n = {
|
|
604
623
|
...a,
|
|
605
624
|
Link: {
|
|
606
625
|
className: c.item,
|
|
@@ -608,102 +627,101 @@ const Kt = "flow--list--items--item-list", jt = "flow--list--items--is-loading",
|
|
|
608
627
|
...a
|
|
609
628
|
}
|
|
610
629
|
};
|
|
611
|
-
return /* @__PURE__ */
|
|
612
|
-
},
|
|
613
|
-
const { className: t } =
|
|
614
|
-
|
|
630
|
+
return /* @__PURE__ */ s.createElement(Ct, { if: !e }, /* @__PURE__ */ s.createElement("div", { className: c.item }, /* @__PURE__ */ s.createElement(St, { props: n }, /* @__PURE__ */ s.createElement(Ft, null, t, /* @__PURE__ */ s.createElement("div", { className: c.title }, /* @__PURE__ */ s.createElement(N, { id: "title" })), /* @__PURE__ */ s.createElement(N, { id: "topContent" })))));
|
|
631
|
+
}, ue = (r) => /* @__PURE__ */ s.createElement(Lt, null, JSON.stringify(r.data)), me = (r) => {
|
|
632
|
+
const { className: t } = r, e = h(), a = e.loader.useIsLoading(), n = E(d), i = e.items.entries.map((u) => /* @__PURE__ */ s.createElement(ce, { key: u.id }, /* @__PURE__ */ s.createElement(at, null, u.render()))), l = j(
|
|
633
|
+
U.itemList,
|
|
615
634
|
t,
|
|
616
|
-
a &&
|
|
635
|
+
a && U.isLoading
|
|
617
636
|
);
|
|
618
|
-
return /* @__PURE__ */
|
|
637
|
+
return /* @__PURE__ */ s.createElement(s.Fragment, null, /* @__PURE__ */ s.createElement("div", { className: l }, i), i.length <= 0 && !a && /* @__PURE__ */ s.createElement(Tt, null, /* @__PURE__ */ s.createElement(wt, null), /* @__PURE__ */ s.createElement(It, null, n.format("list.noResult.heading")), /* @__PURE__ */ s.createElement(f, null, n.format("list.noResult.text"))));
|
|
619
638
|
};
|
|
620
|
-
function
|
|
639
|
+
function de(r) {
|
|
621
640
|
return null;
|
|
622
641
|
}
|
|
623
|
-
function
|
|
642
|
+
function he(r) {
|
|
624
643
|
return null;
|
|
625
644
|
}
|
|
626
|
-
function
|
|
645
|
+
function ge(r) {
|
|
627
646
|
return null;
|
|
628
647
|
}
|
|
629
|
-
function
|
|
648
|
+
function pe(r) {
|
|
630
649
|
return null;
|
|
631
650
|
}
|
|
632
|
-
function
|
|
651
|
+
function fe(r) {
|
|
633
652
|
return null;
|
|
634
653
|
}
|
|
635
|
-
const
|
|
636
|
-
footer:
|
|
637
|
-
},
|
|
638
|
-
const t =
|
|
639
|
-
if (
|
|
654
|
+
const be = "flow--list--footer", Se = {
|
|
655
|
+
footer: be
|
|
656
|
+
}, ye = (r) => {
|
|
657
|
+
const t = K(d), e = h(), a = e.batches, n = e.isFiltered() && !e.loader.manualFiltering, i = a.getTotalItemsCount(), l = a.getFilteredItemsCount(), u = a.getVisibleItemsCount();
|
|
658
|
+
if (i === 0)
|
|
640
659
|
return null;
|
|
641
|
-
const S =
|
|
642
|
-
visibleItemsCount:
|
|
660
|
+
const S = n ? t("list.paginationInfoFiltered", {
|
|
661
|
+
visibleItemsCount: u,
|
|
643
662
|
filteredItemsCount: l,
|
|
644
|
-
totalItemsCount:
|
|
645
|
-
}) : t("paginationInfo", {
|
|
646
|
-
visibleItemsCount:
|
|
647
|
-
totalItemsCount:
|
|
663
|
+
totalItemsCount: i
|
|
664
|
+
}) : t("list.paginationInfo", {
|
|
665
|
+
visibleItemsCount: u,
|
|
666
|
+
totalItemsCount: i
|
|
648
667
|
});
|
|
649
|
-
return /* @__PURE__ */
|
|
650
|
-
},
|
|
651
|
-
const t =
|
|
652
|
-
return /* @__PURE__ */
|
|
653
|
-
|
|
668
|
+
return /* @__PURE__ */ s.createElement(f, { ...r }, S);
|
|
669
|
+
}, Ce = (r) => {
|
|
670
|
+
const t = E(d), e = h(), a = e.loader.useIsLoading();
|
|
671
|
+
return e.batches.hasNextBatch() ? /* @__PURE__ */ s.createElement(
|
|
672
|
+
g,
|
|
654
673
|
{
|
|
655
674
|
isPending: a,
|
|
656
|
-
...
|
|
675
|
+
...r,
|
|
657
676
|
onPress: () => e.batches.nextBatch(),
|
|
658
677
|
variant: "plain",
|
|
659
|
-
isDisabled: !n,
|
|
660
678
|
size: "s"
|
|
661
679
|
},
|
|
662
|
-
t.format("showMore")
|
|
663
|
-
);
|
|
664
|
-
},
|
|
665
|
-
function
|
|
666
|
-
var L,
|
|
667
|
-
const { children: t, batchSize: e, ...a } =
|
|
680
|
+
t.format("list.showMore")
|
|
681
|
+
) : null;
|
|
682
|
+
}, ve = () => /* @__PURE__ */ s.createElement("div", { className: Se.footer }, /* @__PURE__ */ s.createElement(ye, null), /* @__PURE__ */ s.createElement(Ce, null));
|
|
683
|
+
function sa(r) {
|
|
684
|
+
var L, B, A, R;
|
|
685
|
+
const { children: t, batchSize: e, ...a } = r, n = (L = b(t, de)) == null ? void 0 : L.props, i = (B = b(
|
|
668
686
|
t,
|
|
669
|
-
|
|
670
|
-
)) == null ? void 0 :
|
|
671
|
-
source:
|
|
672
|
-
...s,
|
|
673
|
-
asyncLoader: s.children
|
|
674
|
-
} : n ? {
|
|
687
|
+
Bt
|
|
688
|
+
)) == null ? void 0 : B.props, l = (A = b(t, fe)) == null ? void 0 : A.props, u = {
|
|
689
|
+
source: n ? {
|
|
675
690
|
...n,
|
|
676
|
-
|
|
691
|
+
asyncLoader: n.children
|
|
692
|
+
} : i ? {
|
|
693
|
+
...i,
|
|
694
|
+
asyncResourceFactory: i.children
|
|
677
695
|
} : l ? {
|
|
678
696
|
staticData: l.data
|
|
679
697
|
} : void 0
|
|
680
|
-
}, S = (p) => /* @__PURE__ */
|
|
681
|
-
loader:
|
|
682
|
-
filters:
|
|
683
|
-
sorting:
|
|
684
|
-
render: ((
|
|
698
|
+
}, S = (p) => /* @__PURE__ */ s.createElement(ue, { data: p }), G = Gt.useNew({
|
|
699
|
+
loader: u,
|
|
700
|
+
filters: V(t, he).map((p) => p.props),
|
|
701
|
+
sorting: V(t, ge).map((p) => p.props),
|
|
702
|
+
render: ((R = b(t, pe)) == null ? void 0 : R.props.children) ?? S,
|
|
685
703
|
...a,
|
|
686
704
|
batchesController: {
|
|
687
705
|
batchSize: e
|
|
688
706
|
}
|
|
689
707
|
});
|
|
690
|
-
return /* @__PURE__ */
|
|
691
|
-
|
|
708
|
+
return /* @__PURE__ */ s.createElement(
|
|
709
|
+
W.Provider,
|
|
692
710
|
{
|
|
693
711
|
value: {
|
|
694
712
|
list: G
|
|
695
713
|
}
|
|
696
714
|
},
|
|
697
|
-
/* @__PURE__ */
|
|
698
|
-
/* @__PURE__ */
|
|
715
|
+
/* @__PURE__ */ s.createElement(Rt, null),
|
|
716
|
+
/* @__PURE__ */ s.createElement("div", { className: $t.list }, /* @__PURE__ */ s.createElement(Ut, null), /* @__PURE__ */ s.createElement(me, null), /* @__PURE__ */ s.createElement(ve, null))
|
|
699
717
|
);
|
|
700
718
|
}
|
|
701
719
|
export {
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
720
|
+
sa as List,
|
|
721
|
+
he as ListFilter,
|
|
722
|
+
pe as ListItemView,
|
|
723
|
+
de as ListLoaderAsync,
|
|
724
|
+
ge as ListSorting,
|
|
725
|
+
fe as ListStaticData,
|
|
726
|
+
sa as default
|
|
709
727
|
};
|