@mittwald/flow-react-components 0.1.0-alpha.189 → 0.1.0-alpha.190
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-44t1KJbp.js → Accordion-C3Df-FUx.js} +1 -1
- package/dist/Accordion.js +1 -1
- package/dist/Avatar.js +12 -11
- package/dist/Button-CVDWL-od.js +129 -0
- package/dist/Button.js +1 -1
- package/dist/CopyButton.js +22 -13
- package/dist/Icons.js +101 -100
- package/dist/List.js +276 -241
- package/dist/Modal.js +1 -1
- package/dist/Navigation.js +1 -1
- package/dist/Notification.js +1 -1
- package/dist/NumberField.js +17 -17
- package/dist/{SearchField-BxKrfsvy.js → SearchField-Dbr_5Zy4.js} +1 -1
- package/dist/SearchField.js +1 -1
- package/dist/Slider.js +1 -1
- package/dist/Tabs.js +1 -1
- package/dist/styles.css +1 -1
- package/dist/types/components/Avatar/Avatar.d.ts +1 -1
- package/dist/types/components/Icon/components/icons/IconContractPartner.d.ts +5 -0
- package/dist/types/components/Icon/components/icons/IconGrid.d.ts +5 -0
- package/dist/types/components/Icon/components/icons/IconList.d.ts +5 -0
- package/dist/types/components/Icon/components/icons/IconPayment.d.ts +5 -0
- package/dist/types/components/Icon/components/icons/IconRefresh.d.ts +5 -0
- package/dist/types/components/Icon/components/icons/index.d.ts +6 -5
- package/dist/types/components/Label/stories/Default.stories.d.ts +1 -0
- package/dist/types/components/List/model/filter/Filter.d.ts +10 -10
- package/dist/types/components/List/model/filter/FilterValue.d.ts +13 -0
- package/dist/types/components/List/model/filter/types.d.ts +2 -1
- package/dist/types/components/List/model/types.d.ts +7 -2
- package/dist/types/components/List/setupComponents/ListFilter.d.ts +4 -2
- package/dist/types/components/List/typedList.d.ts +3 -249
- package/dist/types/components/Text/stories/Default.stories.d.ts +3 -0
- package/package.json +46 -46
- package/dist/Button-Bewd_wSa.js +0 -117
package/dist/List.js
CHANGED
|
@@ -1,55 +1,56 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
/* */
|
|
3
|
-
var
|
|
4
|
-
var mt = (i, t, e) => t in i ?
|
|
3
|
+
var ht = Object.defineProperty;
|
|
4
|
+
var mt = (i, t, e) => t in i ? ht(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e;
|
|
5
5
|
var r = (i, t, e) => mt(i, typeof t != "symbol" ? t + "" : t, e);
|
|
6
|
-
import n, { createContext as
|
|
6
|
+
import n, { createContext as dt, useContext as gt, createElement as Y, useState as pt, useEffect as L, useRef as ft, cloneElement as bt } from "react";
|
|
7
7
|
import "./propsContext-DzAKlmhS.js";
|
|
8
|
-
import { P as
|
|
8
|
+
import { P as St } from "./PropsContextProvider-C6Z4XGp6.js";
|
|
9
9
|
import "@react-aria/utils";
|
|
10
|
-
import { unique as
|
|
11
|
-
import { d as
|
|
12
|
-
import { B as p } from "./Button-
|
|
10
|
+
import { isShallowEqual as vt, unique as yt, times as wt } from "remeda";
|
|
11
|
+
import { d as Et } from "./dynamic-ClpUSmEt.js";
|
|
12
|
+
import { B as p } from "./Button-CVDWL-od.js";
|
|
13
13
|
import "@tabler/icons-react";
|
|
14
14
|
import "./Icon-CUhvR1IT.js";
|
|
15
|
-
import { I as
|
|
16
|
-
import { a as A, C as
|
|
17
|
-
import { M as
|
|
15
|
+
import { I as Ct } from "./IconContextMenu-C9_95BDt.js";
|
|
16
|
+
import { a as A, C as Q } from "./ContextMenuTrigger-CvljOFns.js";
|
|
17
|
+
import { M as X } from "./MenuItem-DaY0bRCQ.js";
|
|
18
18
|
import { useLocalizedStringFormatter as S } from "react-aria";
|
|
19
|
-
import { TunnelProvider as
|
|
20
|
-
import
|
|
21
|
-
import { g as
|
|
22
|
-
import { f as
|
|
23
|
-
import { R as
|
|
19
|
+
import { TunnelProvider as Ft, TunnelExit as $ } from "@mittwald/react-tunnel";
|
|
20
|
+
import E from "clsx";
|
|
21
|
+
import { g as Lt } from "./getContainerBreakpointSizeClassName-BrcFDcCY.js";
|
|
22
|
+
import { f as Tt } from "./flowComponent-COVzhVCB.js";
|
|
23
|
+
import { R as It } from "./Render-BdlTa7Qb.js";
|
|
24
24
|
import { T as f } from "./Text-DQmfbsPC.js";
|
|
25
|
-
import { I as
|
|
26
|
-
import { I as
|
|
27
|
-
import { autorun as
|
|
25
|
+
import { I as Z } from "./IconChevronDown-0Qm5hGlw.js";
|
|
26
|
+
import { I as kt } from "./IconClose-BHf4btna.js";
|
|
27
|
+
import { autorun as At, runInAction as xt, toJS as Bt, makeObservable as Pt, 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 {
|
|
33
|
-
import
|
|
34
|
-
import
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import
|
|
38
|
-
import
|
|
39
|
-
import { I as
|
|
40
|
-
import {
|
|
29
|
+
import { u as Dt } from "./useOnChange-C1Quwyuz.js";
|
|
30
|
+
import { S as Vt } from "./SearchField-Dbr_5Zy4.js";
|
|
31
|
+
import { getProperty as Nt } from "dot-prop";
|
|
32
|
+
import { hash as Rt } from "object-code";
|
|
33
|
+
import { useReactTable as zt, getCoreRowModel as Mt, getSortedRowModel as $t, getFilteredRowModel as Ut, getPaginationRowModel as Ot, getFacetedUniqueValues as qt } from "@tanstack/react-table";
|
|
34
|
+
import _ from "invariant";
|
|
35
|
+
import { useLocalObservable as Ht } from "mobx-react-lite";
|
|
36
|
+
import { getAsyncResource as q } from "@mittwald/react-use-promise";
|
|
37
|
+
import { u as H } from "./useSelector-DpU7_HMO.js";
|
|
38
|
+
import * as x from "react-aria-components";
|
|
39
|
+
import { I as Kt } from "./IllustratedMessage-B3MHD01M.js";
|
|
40
|
+
import { I as Gt } from "./IconSearch-D6QHaNuF.js";
|
|
41
|
+
import { H as tt } from "./Heading-BzwQly28.js";
|
|
41
42
|
import { d as b, a as K } from "./deepFindOfType-6pG0fH7S.js";
|
|
42
|
-
import { ListLoaderAsyncResource as
|
|
43
|
-
import { S as
|
|
44
|
-
const
|
|
45
|
-
view:
|
|
46
|
-
title:
|
|
47
|
-
topContent:
|
|
48
|
-
content:
|
|
49
|
-
action:
|
|
50
|
-
avatar:
|
|
51
|
-
text:
|
|
52
|
-
heading:
|
|
43
|
+
import { ListLoaderAsyncResource as jt, TypedListLoaderAsyncResource as Jt } from "./List/ListLoaderAsyncResource.js";
|
|
44
|
+
import { S as Wt } from "./Skeleton-CKLaTmDR.js";
|
|
45
|
+
const Yt = "flow--list--items--item--view", Qt = "flow--list--items--item--view--title", Xt = "flow--list--items--item--view--top-content", Zt = "flow--list--items--item--view--content", _t = "flow--list--items--item--view--action", te = "flow--list--items--item--view--avatar", ee = "flow--list--items--item--view--text", se = "flow--list--items--item--view--heading", m = {
|
|
46
|
+
view: Yt,
|
|
47
|
+
title: Qt,
|
|
48
|
+
topContent: Xt,
|
|
49
|
+
content: Zt,
|
|
50
|
+
action: _t,
|
|
51
|
+
avatar: te,
|
|
52
|
+
text: ee,
|
|
53
|
+
heading: se,
|
|
53
54
|
"container-breakpoint-size-xs": "flow--list--items--item--view--container-breakpoint-size-xs",
|
|
54
55
|
"container-breakpoint-size-s": "flow--list--items--item--view--container-breakpoint-size-s",
|
|
55
56
|
"container-breakpoint-size-m": "flow--list--items--item--view--container-breakpoint-size-m",
|
|
@@ -73,7 +74,7 @@ const Gt = "flow--list--items--item--view", jt = "flow--list--items--item--view-
|
|
|
73
74
|
"list.setSorting": (i) => `Sorting: ${i.property}`,
|
|
74
75
|
"list.showMore": "Show more",
|
|
75
76
|
"list.sorting": "Sorting"
|
|
76
|
-
} },
|
|
77
|
+
} }, ae = (i) => {
|
|
77
78
|
const { className: t, children: e } = i, s = S(g);
|
|
78
79
|
return /* @__PURE__ */ n.createElement(A, null, /* @__PURE__ */ n.createElement(
|
|
79
80
|
p,
|
|
@@ -82,53 +83,53 @@ const Gt = "flow--list--items--item--view", jt = "flow--list--items--item--view-
|
|
|
82
83
|
className: t,
|
|
83
84
|
"aria-label": s.format("list.options")
|
|
84
85
|
},
|
|
85
|
-
/* @__PURE__ */ n.createElement(
|
|
86
|
+
/* @__PURE__ */ n.createElement(Ct, null)
|
|
86
87
|
), e);
|
|
87
|
-
},
|
|
88
|
+
}, ie = (i) => i === "top" ? m.topContent : i === "bottom" ? m.content : m.topContent, et = (i) => {
|
|
88
89
|
const { children: t, className: e, containerBreakpointSize: s = "m" } = i, a = {
|
|
89
90
|
ContextMenu: {
|
|
90
|
-
wrapWith: /* @__PURE__ */ n.createElement(
|
|
91
|
+
wrapWith: /* @__PURE__ */ n.createElement(ae, { className: m.action }),
|
|
91
92
|
placement: "bottom end"
|
|
92
93
|
},
|
|
93
94
|
Button: {
|
|
94
|
-
className:
|
|
95
|
+
className: m.action
|
|
95
96
|
},
|
|
96
97
|
Content: {
|
|
97
|
-
className:
|
|
98
|
+
className: Et((l) => ie(l.slot)),
|
|
98
99
|
tunnelId: "topContent"
|
|
99
100
|
},
|
|
100
101
|
Avatar: {
|
|
101
|
-
className:
|
|
102
|
+
className: m.avatar,
|
|
102
103
|
tunnelId: "title"
|
|
103
104
|
},
|
|
104
105
|
Heading: {
|
|
105
|
-
className:
|
|
106
|
+
className: m.heading,
|
|
106
107
|
level: 5,
|
|
107
108
|
tunnelId: "title"
|
|
108
109
|
},
|
|
109
110
|
Text: {
|
|
110
|
-
className:
|
|
111
|
+
className: m.text,
|
|
111
112
|
tunnelId: "title"
|
|
112
113
|
},
|
|
113
114
|
Link: {
|
|
114
115
|
unstyled: !0
|
|
115
116
|
}
|
|
116
|
-
}, o =
|
|
117
|
-
|
|
117
|
+
}, o = E(
|
|
118
|
+
m.view,
|
|
118
119
|
e,
|
|
119
|
-
|
|
120
|
+
m[Lt(s)]
|
|
120
121
|
);
|
|
121
|
-
return /* @__PURE__ */ n.createElement("div", { className: o }, /* @__PURE__ */ n.createElement(
|
|
122
|
-
},
|
|
122
|
+
return /* @__PURE__ */ n.createElement("div", { className: o }, /* @__PURE__ */ n.createElement(St, { props: a }, /* @__PURE__ */ n.createElement(Ft, null, t, /* @__PURE__ */ n.createElement("div", { className: m.title }, /* @__PURE__ */ n.createElement($, { id: "title" })), /* @__PURE__ */ n.createElement($, { id: "topContent" }))));
|
|
123
|
+
}, st = dt({}), d = () => gt(st).list, ne = () => d().loader.getLoaderInvocationHooks().map((t, e) => /* @__PURE__ */ n.createElement(It, { key: e }, () => {
|
|
123
124
|
t();
|
|
124
|
-
})),
|
|
125
|
+
})), re = (i) => {
|
|
125
126
|
const { sorting: t } = i;
|
|
126
|
-
return /* @__PURE__ */ n.createElement(
|
|
127
|
+
return /* @__PURE__ */ n.createElement(X, { id: t.id }, t.name);
|
|
127
128
|
}, T = (i) => {
|
|
128
129
|
const { children: t, locales: e, variables: s } = i;
|
|
129
130
|
return S(e).format(t, s);
|
|
130
|
-
},
|
|
131
|
-
const i = d(), t = i.visibleSorting.map((a) => /* @__PURE__ */ n.createElement(
|
|
131
|
+
}, oe = () => {
|
|
132
|
+
const i = d(), t = i.visibleSorting.map((a) => /* @__PURE__ */ n.createElement(re, { sorting: a, key: a.id }));
|
|
132
133
|
if (t.length === 0)
|
|
133
134
|
return null;
|
|
134
135
|
const e = i.visibleSorting.find((a) => a.isSorted()), s = /* @__PURE__ */ n.createElement(f, null, e ? /* @__PURE__ */ n.createElement(
|
|
@@ -141,8 +142,8 @@ const Gt = "flow--list--items--item--view", jt = "flow--list--items--item--view-
|
|
|
141
142
|
},
|
|
142
143
|
"list.setSorting"
|
|
143
144
|
) : /* @__PURE__ */ n.createElement(T, { locales: g }, "list.sorting"));
|
|
144
|
-
return /* @__PURE__ */ n.createElement(A, null, /* @__PURE__ */ n.createElement(p, { variant: "soft", size: "s", color: "secondary" }, s, /* @__PURE__ */ n.createElement(
|
|
145
|
-
|
|
145
|
+
return /* @__PURE__ */ n.createElement(A, null, /* @__PURE__ */ n.createElement(p, { variant: "soft", size: "s", color: "secondary" }, s, /* @__PURE__ */ n.createElement(Z, null)), /* @__PURE__ */ n.createElement(
|
|
146
|
+
Q,
|
|
146
147
|
{
|
|
147
148
|
selectionMode: "single",
|
|
148
149
|
selectedKeys: e ? [e.id] : [],
|
|
@@ -152,39 +153,46 @@ const Gt = "flow--list--items--item--view", jt = "flow--list--items--item--view-
|
|
|
152
153
|
},
|
|
153
154
|
t
|
|
154
155
|
));
|
|
155
|
-
},
|
|
156
|
-
const { filter: t } = i, { values: e, mode: s, name: a, property: o } = t, l = e.map((c) => /* @__PURE__ */ n.createElement(
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
156
|
+
}, le = (i) => {
|
|
157
|
+
const { filter: t } = i, { values: e, mode: s, name: a, property: o } = t, l = e.map((c) => /* @__PURE__ */ n.createElement(
|
|
158
|
+
X,
|
|
159
|
+
{
|
|
160
|
+
id: c.id,
|
|
161
|
+
key: c.id,
|
|
162
|
+
onAction: () => {
|
|
163
|
+
c.toggle();
|
|
164
|
+
}
|
|
165
|
+
},
|
|
166
|
+
c.render()
|
|
167
|
+
)), u = e.filter((c) => c.isActive).map((c) => c.id);
|
|
168
|
+
return /* @__PURE__ */ n.createElement(A, null, /* @__PURE__ */ n.createElement(p, { variant: "soft", size: "s", color: "secondary" }, /* @__PURE__ */ n.createElement(f, null, a ?? o), /* @__PURE__ */ n.createElement(Z, null)), /* @__PURE__ */ n.createElement(
|
|
169
|
+
Q,
|
|
161
170
|
{
|
|
162
|
-
onAction: m,
|
|
163
171
|
selectionMode: s === "one" ? "single" : "multiple",
|
|
164
172
|
selectedKeys: u
|
|
165
173
|
},
|
|
166
174
|
l
|
|
167
175
|
));
|
|
168
|
-
},
|
|
169
|
-
header:
|
|
170
|
-
pickerListAndSearch:
|
|
171
|
-
pickerList:
|
|
172
|
-
searchField:
|
|
173
|
-
},
|
|
174
|
-
activeFilters:
|
|
175
|
-
clearButton:
|
|
176
|
-
},
|
|
176
|
+
}, ce = "flow--list--header", ue = "flow--list--header--picker-list-and-search", he = "flow--list--header--picker-list", me = "flow--list--header--search-field", y = {
|
|
177
|
+
header: ce,
|
|
178
|
+
pickerListAndSearch: ue,
|
|
179
|
+
pickerList: he,
|
|
180
|
+
searchField: me
|
|
181
|
+
}, de = "flow--list--header--active-filters", ge = "flow--list--header--active-filters--clear-button", G = {
|
|
182
|
+
activeFilters: de,
|
|
183
|
+
clearButton: ge
|
|
184
|
+
}, pe = () => {
|
|
177
185
|
const i = d(), t = i.filters.flatMap(
|
|
178
|
-
(e) => e.values.filter((s) =>
|
|
186
|
+
(e) => e.values.filter((s) => s.isActive).map((s) => /* @__PURE__ */ n.createElement(
|
|
179
187
|
p,
|
|
180
188
|
{
|
|
181
189
|
variant: "soft",
|
|
182
190
|
size: "s",
|
|
183
|
-
key:
|
|
184
|
-
onPress: () =>
|
|
191
|
+
key: s.id,
|
|
192
|
+
onPress: () => s.deactivate()
|
|
185
193
|
},
|
|
186
|
-
/* @__PURE__ */ n.createElement(f, null,
|
|
187
|
-
/* @__PURE__ */ n.createElement(
|
|
194
|
+
/* @__PURE__ */ n.createElement(f, null, s.render()),
|
|
195
|
+
/* @__PURE__ */ n.createElement(kt, null)
|
|
188
196
|
))
|
|
189
197
|
);
|
|
190
198
|
return t.length <= 0 ? null : /* @__PURE__ */ n.createElement("div", { className: G.activeFilters }, t, /* @__PURE__ */ n.createElement(
|
|
@@ -197,45 +205,45 @@ const Gt = "flow--list--items--item--view", jt = "flow--list--items--item--view-
|
|
|
197
205
|
},
|
|
198
206
|
/* @__PURE__ */ n.createElement(T, { locales: g }, "list.resetAll")
|
|
199
207
|
));
|
|
200
|
-
},
|
|
201
|
-
const { className: t, onChange: e, value: s, ...a } = i, [o, l] =
|
|
202
|
-
|
|
208
|
+
}, fe = (i) => {
|
|
209
|
+
const { className: t, onChange: e, value: s, ...a } = i, [o, l] = pt(s ?? "");
|
|
210
|
+
Dt(s, () => {
|
|
203
211
|
l(s ?? "");
|
|
204
212
|
}, [o]);
|
|
205
213
|
const u = () => {
|
|
206
214
|
e(void 0), l("");
|
|
207
|
-
},
|
|
208
|
-
|
|
215
|
+
}, c = (h) => {
|
|
216
|
+
h.key === "Enter" ? o.trim() === "" ? e(void 0) : e(o) : h.key === "Escape" && u();
|
|
209
217
|
};
|
|
210
218
|
return /* @__PURE__ */ n.createElement(
|
|
211
|
-
|
|
219
|
+
Vt,
|
|
212
220
|
{
|
|
213
221
|
className: t,
|
|
214
222
|
value: o,
|
|
215
|
-
onKeyUp:
|
|
216
|
-
onChange: (
|
|
223
|
+
onKeyUp: c,
|
|
224
|
+
onChange: (h) => l(h),
|
|
217
225
|
onClear: u,
|
|
218
226
|
...a
|
|
219
227
|
}
|
|
220
228
|
);
|
|
221
|
-
},
|
|
222
|
-
const { className: t, search: e } = i, s = e.render ??
|
|
223
|
-
return
|
|
229
|
+
}, be = (i) => {
|
|
230
|
+
const { className: t, search: e } = i, s = e.render ?? fe;
|
|
231
|
+
return Y(s, {
|
|
224
232
|
className: t,
|
|
225
233
|
value: e.value,
|
|
226
234
|
onChange: e.setValue.bind(e),
|
|
227
235
|
...e.textFieldProps
|
|
228
236
|
});
|
|
229
|
-
},
|
|
237
|
+
}, Se = (i) => {
|
|
230
238
|
const { className: t } = i, e = d();
|
|
231
239
|
if (e.filters.length === 0 && e.visibleSorting.length === 0 && !e.search)
|
|
232
240
|
return null;
|
|
233
|
-
const s = e.filters.map((a) => /* @__PURE__ */ n.createElement(
|
|
234
|
-
return /* @__PURE__ */ n.createElement("div", { className:
|
|
235
|
-
},
|
|
236
|
-
list:
|
|
241
|
+
const s = e.filters.map((a) => /* @__PURE__ */ n.createElement(le, { key: a.property, filter: a }));
|
|
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(oe, null), s), e.search && /* @__PURE__ */ n.createElement(be, { className: y.searchField, search: e.search })), /* @__PURE__ */ n.createElement(pe, null));
|
|
243
|
+
}, ve = "flow--list", ye = {
|
|
244
|
+
list: ve
|
|
237
245
|
};
|
|
238
|
-
let
|
|
246
|
+
let we = class at {
|
|
239
247
|
constructor(t, e, s) {
|
|
240
248
|
r(this, "id");
|
|
241
249
|
r(this, "data");
|
|
@@ -243,19 +251,19 @@ let be = class st {
|
|
|
243
251
|
this.collection = t, this.id = e, this.data = s;
|
|
244
252
|
}
|
|
245
253
|
static fromRow(t, e) {
|
|
246
|
-
return new
|
|
254
|
+
return new at(t, e.id, e.original);
|
|
247
255
|
}
|
|
248
256
|
};
|
|
249
|
-
class
|
|
257
|
+
class Ee {
|
|
250
258
|
constructor(t) {
|
|
251
259
|
r(this, "list");
|
|
252
260
|
this.list = t;
|
|
253
261
|
}
|
|
254
262
|
get entries() {
|
|
255
|
-
return this.list.reactTable.table.getRowModel().rows.map((t) =>
|
|
263
|
+
return this.list.reactTable.table.getRowModel().rows.map((t) => we.fromRow(this, t));
|
|
256
264
|
}
|
|
257
265
|
}
|
|
258
|
-
class
|
|
266
|
+
class Ce {
|
|
259
267
|
constructor(t, e = {}) {
|
|
260
268
|
r(this, "batchSize");
|
|
261
269
|
r(this, "list");
|
|
@@ -302,31 +310,60 @@ class ve {
|
|
|
302
310
|
}
|
|
303
311
|
}
|
|
304
312
|
}
|
|
305
|
-
const
|
|
306
|
-
class
|
|
313
|
+
const Fe = "$";
|
|
314
|
+
class j {
|
|
315
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
316
|
+
constructor(t, e) {
|
|
317
|
+
r(this, "filter");
|
|
318
|
+
r(this, "value");
|
|
319
|
+
this.filter = t, this.value = e;
|
|
320
|
+
}
|
|
321
|
+
equals(t) {
|
|
322
|
+
return vt(this.value, t.value);
|
|
323
|
+
}
|
|
324
|
+
get id() {
|
|
325
|
+
return `${this.filter.property}@@${Rt(this.value)}`;
|
|
326
|
+
}
|
|
327
|
+
get isActive() {
|
|
328
|
+
return this.filter.isValueActive(this);
|
|
329
|
+
}
|
|
330
|
+
render() {
|
|
331
|
+
return this.filter.renderItem(this.value);
|
|
332
|
+
}
|
|
333
|
+
toggle() {
|
|
334
|
+
this.filter.toggleValue(this);
|
|
335
|
+
}
|
|
336
|
+
deactivate() {
|
|
337
|
+
this.filter.deactivateValue(this);
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
const Le = (i, t) => i === t, Te = (i) => String(i);
|
|
341
|
+
class Ie {
|
|
307
342
|
constructor(t, e) {
|
|
308
343
|
r(this, "_values");
|
|
309
344
|
r(this, "list");
|
|
310
345
|
r(this, "property");
|
|
311
346
|
r(this, "mode");
|
|
312
347
|
r(this, "matcher");
|
|
348
|
+
r(this, "renderItem");
|
|
313
349
|
r(this, "name");
|
|
314
350
|
r(this, "onFilterUpdateCallbacks", /* @__PURE__ */ new Set());
|
|
315
|
-
|
|
351
|
+
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((a) => new j(this, a)), this.matcher = e.matcher ?? Le, this.renderItem = e.renderItem ?? Te, this.name = e.name;
|
|
316
353
|
}
|
|
317
354
|
updateTableColumnDef(t) {
|
|
318
355
|
t.enableColumnFilter = !0, t.filterFn = this.getReactTableFilterFn();
|
|
319
356
|
}
|
|
320
357
|
getReactTableFilterFn() {
|
|
321
|
-
return (t, e, s) =>
|
|
322
|
-
|
|
323
|
-
s
|
|
324
|
-
|
|
358
|
+
return (t, e, s) => {
|
|
359
|
+
const a = this.property, o = a.startsWith(Fe) ? t.original : Nt(t.original, a);
|
|
360
|
+
return this.checkFilterMatches(o, s);
|
|
361
|
+
};
|
|
325
362
|
}
|
|
326
363
|
checkFilterMatches(t, e) {
|
|
327
364
|
if (e === null)
|
|
328
365
|
return !0;
|
|
329
|
-
const s = (o) => Array.isArray(o) ? o : [o], a = (o) => this.matcher(o, t);
|
|
366
|
+
const s = (o) => Array.isArray(o) ? o : [o], a = (o) => this.matcher(o.value, t);
|
|
330
367
|
if (this.mode === "all")
|
|
331
368
|
return s(e).every(a);
|
|
332
369
|
if (this.mode === "some") {
|
|
@@ -346,48 +383,40 @@ class we {
|
|
|
346
383
|
var t;
|
|
347
384
|
return ((t = this.getTableColumnFilter()) == null ? void 0 : t.value) ?? null;
|
|
348
385
|
}
|
|
349
|
-
getValueId(t) {
|
|
350
|
-
return `${this.property}@@${String(t)}`;
|
|
351
|
-
}
|
|
352
386
|
get values() {
|
|
353
|
-
return this._values === void 0 && (this._values =
|
|
387
|
+
return this._values === void 0 && (this._values = yt(
|
|
354
388
|
Array.from(this.getTableColumn().getFacetedUniqueValues().keys()).flatMap((t) => t).filter((t) => t != null)
|
|
355
|
-
)), this._values;
|
|
389
|
+
).map((t) => new j(this, t))), this._values;
|
|
356
390
|
}
|
|
357
391
|
getArrayValue() {
|
|
358
392
|
const t = this.getValue();
|
|
359
393
|
return Array.isArray(t) ? t : t === null ? [] : [t];
|
|
360
394
|
}
|
|
361
395
|
isValueActive(t) {
|
|
362
|
-
return this.getArrayValue().
|
|
396
|
+
return this.getArrayValue().some((e) => e.equals(t));
|
|
363
397
|
}
|
|
364
398
|
isActive() {
|
|
365
399
|
return this.getArrayValue().length > 0;
|
|
366
400
|
}
|
|
367
|
-
activateValue(t) {
|
|
368
|
-
const e = this.getArrayValue();
|
|
369
|
-
let s;
|
|
370
|
-
this.mode === "all" || this.mode === "some" ? s = [...e, t] : s = t, this.list.reactTable.getTableColumn(this.property).setFilterValue(s), this.onFilterUpdateCallbacks.forEach((a) => a());
|
|
371
|
-
}
|
|
372
401
|
deactivateValue(t) {
|
|
373
402
|
const e = this.getArrayValue();
|
|
374
403
|
let s;
|
|
375
|
-
this.mode === "all" || this.mode === "some" ? s = e.filter((a) => a
|
|
404
|
+
this.mode === "all" || this.mode === "some" ? s = e.filter((a) => !a.equals(t)) : s = null, this.list.reactTable.getTableColumn(this.property).setFilterValue(s), this.onFilterUpdateCallbacks.forEach((a) => a());
|
|
376
405
|
}
|
|
377
406
|
clearValues() {
|
|
378
407
|
let t;
|
|
379
408
|
this.mode === "all" || this.mode === "some" ? t = [] : t = null, this.list.reactTable.getTableColumn(this.property).setFilterValue(t), this.onFilterUpdateCallbacks.forEach((e) => e());
|
|
380
409
|
}
|
|
381
410
|
toggleValue(t) {
|
|
382
|
-
const e = this.
|
|
383
|
-
let
|
|
384
|
-
this.mode === "all" || this.mode === "some" ?
|
|
411
|
+
const e = this.getArrayValue();
|
|
412
|
+
let s;
|
|
413
|
+
this.mode === "all" || this.mode === "some" ? t.isActive ? s = e.filter((a) => !a.equals(t)) : s = [...e, t] : s = t.isActive ? null : t, this.list.reactTable.getTableColumn(this.property).setFilterValue(s), this.onFilterUpdateCallbacks.forEach((a) => a());
|
|
385
414
|
}
|
|
386
415
|
onFilterUpdated(t) {
|
|
387
416
|
this.onFilterUpdateCallbacks.add(t);
|
|
388
417
|
}
|
|
389
418
|
}
|
|
390
|
-
class
|
|
419
|
+
class ke {
|
|
391
420
|
constructor(t, e) {
|
|
392
421
|
r(this, "list");
|
|
393
422
|
r(this, "property");
|
|
@@ -421,8 +450,8 @@ class Ee {
|
|
|
421
450
|
return `${this.getTableColumn().id}:${this.direction}`;
|
|
422
451
|
}
|
|
423
452
|
}
|
|
424
|
-
const
|
|
425
|
-
class
|
|
453
|
+
const Ae = (i) => L(At(i));
|
|
454
|
+
class B {
|
|
426
455
|
constructor(t, e = {}) {
|
|
427
456
|
r(this, "list");
|
|
428
457
|
r(this, "table");
|
|
@@ -432,19 +461,19 @@ class x {
|
|
|
432
461
|
if (!e)
|
|
433
462
|
return;
|
|
434
463
|
const s = typeof t == "function" ? t(e) : t;
|
|
435
|
-
|
|
464
|
+
xt(() => {
|
|
436
465
|
this.finalizeTableState(s), this.tableState.value = s;
|
|
437
466
|
});
|
|
438
467
|
});
|
|
439
|
-
this.list = t, this.tableState =
|
|
468
|
+
this.list = t, this.tableState = Ht(() => ({ value: void 0 })), this.table = this.useReactTable(e);
|
|
440
469
|
}
|
|
441
470
|
static useNew(t, e = {}) {
|
|
442
|
-
return new
|
|
471
|
+
return new B(t, e);
|
|
443
472
|
}
|
|
444
473
|
useReactTable(t = {}) {
|
|
445
474
|
const e = this.list.loader.useData(), s = this.list.sorting.filter(
|
|
446
475
|
(o) => o.defaultEnabled !== !1
|
|
447
|
-
), a =
|
|
476
|
+
), a = zt({
|
|
448
477
|
data: e,
|
|
449
478
|
initialState: {
|
|
450
479
|
pagination: {
|
|
@@ -453,11 +482,11 @@ class x {
|
|
|
453
482
|
sorting: s.map((o) => o.getReactTableColumnSort())
|
|
454
483
|
},
|
|
455
484
|
columns: this.getTableColumnDefs(),
|
|
456
|
-
getCoreRowModel:
|
|
457
|
-
getSortedRowModel:
|
|
458
|
-
getFilteredRowModel:
|
|
459
|
-
getPaginationRowModel:
|
|
460
|
-
getFacetedUniqueValues:
|
|
485
|
+
getCoreRowModel: Mt(),
|
|
486
|
+
getSortedRowModel: $t(),
|
|
487
|
+
getFilteredRowModel: Ut(),
|
|
488
|
+
getPaginationRowModel: Ot(),
|
|
489
|
+
getFacetedUniqueValues: qt(),
|
|
461
490
|
onStateChange: this.onTableStateChange,
|
|
462
491
|
globalFilterFn: "auto",
|
|
463
492
|
...t
|
|
@@ -465,11 +494,11 @@ class x {
|
|
|
465
494
|
return this.useUpdateTableState(a), a;
|
|
466
495
|
}
|
|
467
496
|
useUpdateTableState(t) {
|
|
468
|
-
|
|
497
|
+
Ae(() => {
|
|
469
498
|
const e = this.tableState.value;
|
|
470
499
|
e ? t.setOptions((s) => ({
|
|
471
500
|
...s,
|
|
472
|
-
state: e
|
|
501
|
+
state: Bt(e)
|
|
473
502
|
})) : this.tableState.value = t.getState();
|
|
474
503
|
});
|
|
475
504
|
}
|
|
@@ -485,7 +514,7 @@ class x {
|
|
|
485
514
|
}
|
|
486
515
|
getTableColumn(t) {
|
|
487
516
|
const e = this.table.getColumn(t);
|
|
488
|
-
return
|
|
517
|
+
return _(!!e, `Column #${t} is not defined`), e;
|
|
489
518
|
}
|
|
490
519
|
getTableColumnDefs() {
|
|
491
520
|
const t = /* @__PURE__ */ new Map(), e = (s) => {
|
|
@@ -507,12 +536,12 @@ class x {
|
|
|
507
536
|
), Array.from(t.values());
|
|
508
537
|
}
|
|
509
538
|
}
|
|
510
|
-
class
|
|
539
|
+
class P {
|
|
511
540
|
constructor() {
|
|
512
541
|
r(this, "dataBatches", []);
|
|
513
542
|
r(this, "prevDataBatches", []);
|
|
514
543
|
r(this, "batchLoadingStates", ["void"]);
|
|
515
|
-
|
|
544
|
+
Pt(this, {
|
|
516
545
|
prevDataBatches: !1,
|
|
517
546
|
useMergedData: !1,
|
|
518
547
|
useIsLoading: !1,
|
|
@@ -526,7 +555,7 @@ class B {
|
|
|
526
555
|
});
|
|
527
556
|
}
|
|
528
557
|
static useNew() {
|
|
529
|
-
return
|
|
558
|
+
return ft(new P()).current;
|
|
530
559
|
}
|
|
531
560
|
reset() {
|
|
532
561
|
this.batchLoadingStates = [], this.dataBatches = [];
|
|
@@ -541,17 +570,17 @@ class B {
|
|
|
541
570
|
return (this.dataBatches.length === 0 ? this.prevDataBatches : this.dataBatches).flatMap((e) => e);
|
|
542
571
|
}
|
|
543
572
|
useMergedData() {
|
|
544
|
-
return
|
|
573
|
+
return H(() => this.mergedData);
|
|
545
574
|
}
|
|
546
575
|
get isLoading() {
|
|
547
576
|
return this.batchLoadingStates.some((t) => t === "loading" || t === "void");
|
|
548
577
|
}
|
|
549
578
|
useIsLoading() {
|
|
550
|
-
return
|
|
579
|
+
return H(() => this.isLoading);
|
|
551
580
|
}
|
|
552
581
|
}
|
|
553
|
-
const
|
|
554
|
-
class
|
|
582
|
+
const xe = [];
|
|
583
|
+
class D {
|
|
555
584
|
constructor(t, e = {}) {
|
|
556
585
|
r(this, "list");
|
|
557
586
|
r(this, "dataSource");
|
|
@@ -561,12 +590,12 @@ class P {
|
|
|
561
590
|
r(this, "loaderState");
|
|
562
591
|
var u;
|
|
563
592
|
const { source: s } = e;
|
|
564
|
-
this.dataSource = s ?? { staticData:
|
|
593
|
+
this.dataSource = s ?? { staticData: xe };
|
|
565
594
|
const a = "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;
|
|
566
|
-
this.list = t, this.loaderState =
|
|
595
|
+
this.list = t, this.loaderState = P.useNew(), this.manualPagination = a ?? !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());
|
|
567
596
|
}
|
|
568
597
|
static useNew(t, e = {}) {
|
|
569
|
-
return new
|
|
598
|
+
return new D(t, e);
|
|
570
599
|
}
|
|
571
600
|
reset() {
|
|
572
601
|
this.loaderState.reset();
|
|
@@ -581,7 +610,7 @@ class P {
|
|
|
581
610
|
return this.loaderState.useMergedData();
|
|
582
611
|
}
|
|
583
612
|
getLoaderInvocationHooks() {
|
|
584
|
-
return
|
|
613
|
+
return wt(this.list.batches.getBatchIndex() + 1, (e) => e).map((e) => () => {
|
|
585
614
|
this.useLoadBatch(e);
|
|
586
615
|
});
|
|
587
616
|
}
|
|
@@ -620,7 +649,10 @@ class P {
|
|
|
620
649
|
filtering: this.manualFiltering ? Object.fromEntries(
|
|
621
650
|
this.list.filters.filter((e) => e.getValue() !== null).map((e) => [
|
|
622
651
|
e.property,
|
|
623
|
-
{
|
|
652
|
+
{
|
|
653
|
+
mode: e.mode,
|
|
654
|
+
values: e.getArrayValue().map((s) => s.value)
|
|
655
|
+
}
|
|
624
656
|
])
|
|
625
657
|
) : void 0,
|
|
626
658
|
searchString: this.manualFiltering ? this.list.reactTable.searchString : void 0
|
|
@@ -629,7 +661,7 @@ class P {
|
|
|
629
661
|
getBatchDataAsyncResource(t) {
|
|
630
662
|
const e = this.dataSource, s = this.getDataLoaderOptions(t);
|
|
631
663
|
if ("staticData" in e)
|
|
632
|
-
return
|
|
664
|
+
return q(
|
|
633
665
|
async (a) => ({
|
|
634
666
|
data: a,
|
|
635
667
|
itemTotalCount: a.length
|
|
@@ -638,7 +670,7 @@ class P {
|
|
|
638
670
|
);
|
|
639
671
|
if ("asyncLoader" in e) {
|
|
640
672
|
const a = e.asyncLoader;
|
|
641
|
-
return
|
|
673
|
+
return q(a, [s]);
|
|
642
674
|
}
|
|
643
675
|
if ("asyncResourceFactory" in e) {
|
|
644
676
|
const a = e.asyncResourceFactory;
|
|
@@ -647,7 +679,7 @@ class P {
|
|
|
647
679
|
throw new Error("Unknown data source");
|
|
648
680
|
}
|
|
649
681
|
}
|
|
650
|
-
class
|
|
682
|
+
class Be {
|
|
651
683
|
constructor(t, e) {
|
|
652
684
|
r(this, "list");
|
|
653
685
|
r(this, "render");
|
|
@@ -671,7 +703,7 @@ class Le {
|
|
|
671
703
|
this.onUpdateCallbacks.add(t);
|
|
672
704
|
}
|
|
673
705
|
}
|
|
674
|
-
const
|
|
706
|
+
const w = class w {
|
|
675
707
|
constructor(t, e = {}) {
|
|
676
708
|
r(this, "list");
|
|
677
709
|
r(this, "textValue");
|
|
@@ -683,11 +715,11 @@ const y = class y {
|
|
|
683
715
|
this.list = t, this.textValue = o, this.renderFn = u, this.href = l, this.onAction = s, this.fallback = a;
|
|
684
716
|
}
|
|
685
717
|
render(t) {
|
|
686
|
-
return (this.renderFn ??
|
|
718
|
+
return (this.renderFn ?? w.fallbackRenderItemFn)(t);
|
|
687
719
|
}
|
|
688
720
|
};
|
|
689
|
-
r(
|
|
690
|
-
let I =
|
|
721
|
+
r(w, "fallbackRenderItemFn", (t) => Y("pre", void 0, JSON.stringify(t)));
|
|
722
|
+
let I = w, Pe = class it {
|
|
691
723
|
constructor(t) {
|
|
692
724
|
r(this, "filters");
|
|
693
725
|
r(this, "itemView");
|
|
@@ -705,14 +737,14 @@ let I = y, Te = class at {
|
|
|
705
737
|
batchesController: o,
|
|
706
738
|
hasAction: l
|
|
707
739
|
} = t;
|
|
708
|
-
this.items = new
|
|
740
|
+
this.items = new Ee(this), this.filters = s.map((u) => new Ie(this, u)), this.sorting = a.map((u) => new ke(this, u)), this.search = t.search ? new Be(this, t.search) : void 0, this.itemView = new I(this, e), this.batches = new Ce(this, o), this.loader = D.useNew(this, t.loader), this.reactTable = B.useNew(this, {
|
|
709
741
|
manualFiltering: this.loader.manualFiltering,
|
|
710
742
|
manualPagination: this.loader.manualPagination,
|
|
711
743
|
manualSorting: this.loader.manualSorting
|
|
712
744
|
}), this.hasAction = l;
|
|
713
745
|
}
|
|
714
746
|
static useNew(t) {
|
|
715
|
-
return new
|
|
747
|
+
return new it(t);
|
|
716
748
|
}
|
|
717
749
|
get isFiltered() {
|
|
718
750
|
return this.filters.some((t) => t.isActive()) || !!this.search && this.search.isSet;
|
|
@@ -722,7 +754,7 @@ let I = y, Te = class at {
|
|
|
722
754
|
}
|
|
723
755
|
getSorting(t) {
|
|
724
756
|
const e = this.sorting.find((s) => s.id === t);
|
|
725
|
-
return
|
|
757
|
+
return _(!!e, `Could not get Sorting (ID: ${t})`), e;
|
|
726
758
|
}
|
|
727
759
|
clearSorting() {
|
|
728
760
|
return this.sorting.forEach((t) => t.clear());
|
|
@@ -735,55 +767,55 @@ let I = y, Te = class at {
|
|
|
735
767
|
return !this.loader.useIsLoading() && this.items.entries.length === 0;
|
|
736
768
|
}
|
|
737
769
|
};
|
|
738
|
-
const
|
|
739
|
-
items:
|
|
740
|
-
isLoading:
|
|
741
|
-
},
|
|
742
|
-
item:
|
|
743
|
-
hasAction:
|
|
744
|
-
},
|
|
745
|
-
const { data: t, children: e } = i, s = d(), a = s.itemView, o = a.onAction, l = a.textValue ? a.textValue(t) : void 0, u = o ? () => o(t) : void 0,
|
|
770
|
+
const De = "flow--list--items", Ve = "flow--list--items--is-loading", J = {
|
|
771
|
+
items: De,
|
|
772
|
+
isLoading: Ve
|
|
773
|
+
}, Ne = "flow--list--items--item", Re = "flow--list--items--item--has-action", k = {
|
|
774
|
+
item: Ne,
|
|
775
|
+
hasAction: Re
|
|
776
|
+
}, ze = (i) => {
|
|
777
|
+
const { data: t, children: e } = i, s = d(), a = s.itemView, o = a.onAction, l = a.textValue ? a.textValue(t) : void 0, u = o ? () => o(t) : void 0, c = a.href ? a.href(t) : void 0, h = s.hasAction || !!u || !!c, C = E(k.item, h && k.hasAction);
|
|
746
778
|
return /* @__PURE__ */ n.createElement(
|
|
747
|
-
|
|
779
|
+
x.GridListItem,
|
|
748
780
|
{
|
|
749
|
-
className:
|
|
781
|
+
className: C,
|
|
750
782
|
onAction: u,
|
|
751
783
|
textValue: l,
|
|
752
|
-
href:
|
|
784
|
+
href: c
|
|
753
785
|
},
|
|
754
786
|
e ?? a.render(t)
|
|
755
787
|
);
|
|
756
|
-
},
|
|
788
|
+
}, Me = (i) => /* @__PURE__ */ n.createElement(x.GridListItem, { textValue: "-", className: k.item }, i.children), $e = () => {
|
|
757
789
|
const i = S(g);
|
|
758
|
-
return /* @__PURE__ */ n.createElement(
|
|
759
|
-
},
|
|
760
|
-
skeletonText:
|
|
761
|
-
shimmer:
|
|
762
|
-
},
|
|
790
|
+
return /* @__PURE__ */ n.createElement(Kt, null, /* @__PURE__ */ n.createElement(Gt, null), /* @__PURE__ */ n.createElement(tt, null, i.format("list.noResult.heading")), /* @__PURE__ */ n.createElement(f, null, i.format("list.noResult.text")));
|
|
791
|
+
}, Ue = "flow--skeleton-text", Oe = "flow--skeleton-text--shimmer", qe = {
|
|
792
|
+
skeletonText: Ue,
|
|
793
|
+
shimmer: Oe
|
|
794
|
+
}, W = (i) => {
|
|
763
795
|
const { width: t, style: e = {}, ...s } = i;
|
|
764
|
-
return /* @__PURE__ */ n.createElement("div", { "aria-hidden": !0, style: { width: t, ...e }, ...s }, /* @__PURE__ */ n.createElement("div", { className:
|
|
765
|
-
},
|
|
766
|
-
const t = d().itemView.fallback ?? /* @__PURE__ */ n.createElement(
|
|
767
|
-
return Array.from(Array(5)).map((e, s) => /* @__PURE__ */ n.createElement(
|
|
768
|
-
},
|
|
769
|
-
const { className: t, ...e } = i, s = d(), a = s.loader.useIsLoading(), o = s.loader.useIsInitiallyLoading(), l = s.useIsEmpty(), u = s.items.entries.map((
|
|
770
|
-
|
|
796
|
+
return /* @__PURE__ */ n.createElement("div", { "aria-hidden": !0, style: { width: t, ...e }, ...s }, /* @__PURE__ */ n.createElement("div", { className: qe.skeletonText }));
|
|
797
|
+
}, He = () => /* @__PURE__ */ n.createElement(et, null, /* @__PURE__ */ n.createElement(tt, null, /* @__PURE__ */ n.createElement(W, { width: "200px" })), /* @__PURE__ */ n.createElement(f, null, /* @__PURE__ */ n.createElement(W, { width: "300px" }))), Ke = () => {
|
|
798
|
+
const t = d().itemView.fallback ?? /* @__PURE__ */ n.createElement(He, null);
|
|
799
|
+
return Array.from(Array(5)).map((e, s) => /* @__PURE__ */ n.createElement(Me, { key: s }, bt(t)));
|
|
800
|
+
}, Ge = (i) => {
|
|
801
|
+
const { className: t, ...e } = i, s = d(), a = s.loader.useIsLoading(), o = s.loader.useIsInitiallyLoading(), l = s.useIsEmpty(), u = s.items.entries.map((h) => /* @__PURE__ */ n.createElement(ze, { key: h.id, data: h.data })), c = E(
|
|
802
|
+
J.items,
|
|
771
803
|
t,
|
|
772
|
-
a &&
|
|
804
|
+
a && J.isLoading
|
|
773
805
|
);
|
|
774
|
-
return l ? /* @__PURE__ */ n.createElement(
|
|
775
|
-
},
|
|
776
|
-
footer:
|
|
777
|
-
},
|
|
806
|
+
return l ? /* @__PURE__ */ n.createElement($e, null) : /* @__PURE__ */ n.createElement("div", { "aria-hidden": o, "aria-busy": a }, /* @__PURE__ */ n.createElement(x.GridList, { className: c, ...e }, o ? /* @__PURE__ */ n.createElement(Ke, null) : u));
|
|
807
|
+
}, nt = (i) => null, je = () => nt, rt = (i) => null, Je = () => rt, ot = (i) => null, We = () => ot, lt = (i) => null, Ye = () => lt, ct = (i) => null, Qe = () => ct, Xe = "flow--list--footer", Ze = {
|
|
808
|
+
footer: Xe
|
|
809
|
+
}, _e = (i) => {
|
|
778
810
|
const t = S(g), e = d(), s = e.batches, a = e.loader.useIsInitiallyLoading(), o = e.useIsEmpty(), l = s.getTotalItemsCount(), u = s.getVisibleItemsCount();
|
|
779
811
|
if (o)
|
|
780
812
|
return null;
|
|
781
|
-
const
|
|
813
|
+
const c = a ? /* @__PURE__ */ n.createElement(Wt, { width: "200px" }) : t.format("list.paginationInfo", {
|
|
782
814
|
visibleItemsCount: u,
|
|
783
815
|
totalItemsCount: l
|
|
784
816
|
});
|
|
785
|
-
return /* @__PURE__ */ n.createElement(f, { ...i },
|
|
786
|
-
},
|
|
817
|
+
return /* @__PURE__ */ n.createElement(f, { ...i }, c);
|
|
818
|
+
}, ts = (i) => {
|
|
787
819
|
const t = S(g), e = d(), s = e.loader.useIsLoading(), a = e.loader.useIsInitiallyLoading();
|
|
788
820
|
return !e.batches.hasNextBatch() && !s ? null : /* @__PURE__ */ n.createElement(
|
|
789
821
|
p,
|
|
@@ -797,19 +829,19 @@ const Ie = "flow--list--items", ke = "flow--list--items--is-loading", j = {
|
|
|
797
829
|
},
|
|
798
830
|
t.format("list.showMore")
|
|
799
831
|
);
|
|
800
|
-
},
|
|
801
|
-
function
|
|
832
|
+
}, es = () => /* @__PURE__ */ n.createElement("div", { className: Ze.footer }, /* @__PURE__ */ n.createElement(_e, null), /* @__PURE__ */ n.createElement(ts, null));
|
|
833
|
+
function ut(i) {
|
|
802
834
|
return null;
|
|
803
835
|
}
|
|
804
|
-
const
|
|
805
|
-
var
|
|
806
|
-
const { children: t, batchSize: e, ...s } = i, a = (
|
|
836
|
+
const ss = () => ut, as = Tt("List", (i) => {
|
|
837
|
+
var V, N, R, z, M;
|
|
838
|
+
const { children: t, batchSize: e, ...s } = i, a = (V = b(
|
|
807
839
|
t,
|
|
808
|
-
|
|
809
|
-
)) == null ? void 0 :
|
|
840
|
+
nt
|
|
841
|
+
)) == null ? void 0 : V.props, o = (N = b(
|
|
810
842
|
t,
|
|
811
|
-
|
|
812
|
-
)) == null ? void 0 : N.props, l = (R = b(t,
|
|
843
|
+
jt
|
|
844
|
+
)) == null ? void 0 : N.props, l = (R = b(t, ct)) == null ? void 0 : R.props, u = {
|
|
813
845
|
source: a ? {
|
|
814
846
|
...a,
|
|
815
847
|
asyncLoader: a.children
|
|
@@ -819,19 +851,22 @@ const Qe = () => ct, Xe = Ft("List", (i) => {
|
|
|
819
851
|
} : l ? {
|
|
820
852
|
staticData: l.data
|
|
821
853
|
} : void 0
|
|
822
|
-
},
|
|
854
|
+
}, c = (z = b(t, ut)) == null ? void 0 : z.props, h = (M = b(t, lt)) == null ? void 0 : M.props, C = Pe.useNew({
|
|
823
855
|
loader: u,
|
|
824
|
-
filters: K(t,
|
|
825
|
-
(
|
|
856
|
+
filters: K(t, rt).map(
|
|
857
|
+
(v) => ({
|
|
858
|
+
...v.props,
|
|
859
|
+
renderItem: v.props.children
|
|
860
|
+
})
|
|
826
861
|
),
|
|
827
|
-
search:
|
|
828
|
-
render:
|
|
829
|
-
textFieldProps:
|
|
862
|
+
search: c ? {
|
|
863
|
+
render: c.children,
|
|
864
|
+
textFieldProps: c
|
|
830
865
|
} : void 0,
|
|
831
|
-
sorting: K(t,
|
|
832
|
-
itemView:
|
|
833
|
-
...
|
|
834
|
-
renderFn:
|
|
866
|
+
sorting: K(t, ot).map((v) => v.props),
|
|
867
|
+
itemView: h ? {
|
|
868
|
+
...h,
|
|
869
|
+
renderFn: h.children
|
|
835
870
|
} : void 0,
|
|
836
871
|
batchesController: {
|
|
837
872
|
batchSize: e
|
|
@@ -839,38 +874,38 @@ const Qe = () => ct, Xe = Ft("List", (i) => {
|
|
|
839
874
|
hasAction: !!i.onAction
|
|
840
875
|
});
|
|
841
876
|
return /* @__PURE__ */ n.createElement(
|
|
842
|
-
|
|
877
|
+
st.Provider,
|
|
843
878
|
{
|
|
844
879
|
value: {
|
|
845
|
-
list:
|
|
880
|
+
list: C
|
|
846
881
|
}
|
|
847
882
|
},
|
|
848
|
-
/* @__PURE__ */ n.createElement(
|
|
849
|
-
/* @__PURE__ */ n.createElement("div", { className:
|
|
883
|
+
/* @__PURE__ */ n.createElement(ne, null),
|
|
884
|
+
/* @__PURE__ */ n.createElement("div", { className: ye.list }, /* @__PURE__ */ n.createElement(Se, null), /* @__PURE__ */ n.createElement(Ge, { ...s }), /* @__PURE__ */ n.createElement(es, null))
|
|
850
885
|
);
|
|
851
|
-
}),
|
|
852
|
-
List:
|
|
853
|
-
Filter:
|
|
854
|
-
Search:
|
|
855
|
-
Sorting:
|
|
856
|
-
Item:
|
|
857
|
-
ItemView:
|
|
858
|
-
StaticData:
|
|
859
|
-
LoaderAsync:
|
|
860
|
-
LoaderAsyncResource:
|
|
886
|
+
}), Hs = () => ({
|
|
887
|
+
List: as,
|
|
888
|
+
Filter: Je(),
|
|
889
|
+
Search: ss(),
|
|
890
|
+
Sorting: We(),
|
|
891
|
+
Item: Ye(),
|
|
892
|
+
ItemView: et,
|
|
893
|
+
StaticData: Qe(),
|
|
894
|
+
LoaderAsync: je(),
|
|
895
|
+
LoaderAsyncResource: Jt()
|
|
861
896
|
});
|
|
862
897
|
export {
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
898
|
+
as as List,
|
|
899
|
+
rt as ListFilter,
|
|
900
|
+
lt as ListItem,
|
|
901
|
+
et as ListItemView,
|
|
902
|
+
nt as ListLoaderAsync,
|
|
903
|
+
ot as ListSorting,
|
|
904
|
+
ct as ListStaticData,
|
|
905
|
+
Je as TypedListFilter,
|
|
906
|
+
Ye as TypedListItem,
|
|
907
|
+
je as TypedListLoaderAsync,
|
|
908
|
+
We as TypedListSorting,
|
|
909
|
+
Qe as TypedListStaticData,
|
|
910
|
+
Hs as typedList
|
|
876
911
|
};
|