@mittwald/flow-react-components 0.1.0-alpha.380 → 0.1.0-alpha.382
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/CHANGELOG.md +25 -0
- package/dist/js/List.js +440 -438
- package/dist/js/types/components/List/model/List.d.ts +1 -1
- package/dist/js/types/components/List/model/filter/Filter.d.ts +3 -2
- package/dist/js/types/components/List/model/filter/FilterValue.d.ts +3 -2
- package/dist/js/types/components/List/model/filter/types.d.ts +1 -1
- package/dist/js/types/lib/array/toArray.d.ts +1 -0
- package/package.json +4 -4
package/dist/js/List.js
CHANGED
|
@@ -1,64 +1,64 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
/* */
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var r = (n, e, t) =>
|
|
6
|
-
import
|
|
3
|
+
var Xe = Object.defineProperty;
|
|
4
|
+
var Ze = (n, e, t) => e in n ? Xe(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
|
|
5
|
+
var r = (n, e, t) => Ze(n, typeof e != "symbol" ? e + "" : e, t);
|
|
6
|
+
import i, { createContext as _e, useContext as et, createElement as we, useState as O, useEffect as M, useRef as Ee, useId as tt, Suspense as st, cloneElement as it } from "react";
|
|
7
7
|
import "./propsContext-DzAKlmhS.js";
|
|
8
|
-
import { PropsContextProvider as
|
|
8
|
+
import { PropsContextProvider as Z } from "./PropsContextProvider.js";
|
|
9
9
|
import "@react-aria/utils";
|
|
10
|
-
import { isShallowEqual as at, unique as
|
|
11
|
-
import { d as
|
|
10
|
+
import { isShallowEqual as at, unique as nt, difference as rt, times as ot } from "remeda";
|
|
11
|
+
import { d as Y } from "./dynamic-ClpUSmEt.js";
|
|
12
12
|
import { B as w } from "./Button-BTc_iJae.js";
|
|
13
|
-
import { IconArrowBackUp as
|
|
14
|
-
import { I as
|
|
15
|
-
import { I as
|
|
16
|
-
import { a as
|
|
17
|
-
import { M as
|
|
18
|
-
import { useLocalizedStringFormatter as
|
|
19
|
-
import { TunnelProvider as
|
|
20
|
-
import
|
|
21
|
-
import { g as
|
|
22
|
-
import { f as
|
|
23
|
-
import { R as
|
|
24
|
-
import { T
|
|
25
|
-
import { c as
|
|
26
|
-
import { observer as
|
|
27
|
-
import { a as
|
|
28
|
-
import { B as
|
|
29
|
-
import { makeObservable as
|
|
13
|
+
import { IconArrowBackUp as lt } from "@tabler/icons-react";
|
|
14
|
+
import { I as pe } from "./Icon--OEo4TjW.js";
|
|
15
|
+
import { I as ct } from "./IconContextMenu-x1p9NcUF.js";
|
|
16
|
+
import { a as H, C as _ } from "./ContextMenuTrigger-CsnzKkVf.js";
|
|
17
|
+
import { M as ee } from "./MenuItem-a7BWfwHo.js";
|
|
18
|
+
import { useLocalizedStringFormatter as I } from "react-aria";
|
|
19
|
+
import { TunnelProvider as Fe, TunnelExit as z } from "@mittwald/react-tunnel";
|
|
20
|
+
import k from "clsx";
|
|
21
|
+
import { g as dt } from "./getContainerBreakpointSizeClassName-BrcFDcCY.js";
|
|
22
|
+
import { f as Ie } from "./flowComponent-BQs9wMX_.js";
|
|
23
|
+
import { R as ut } from "./Render-BOMk4emj.js";
|
|
24
|
+
import { T } from "./Text-Dh4iy9qD.js";
|
|
25
|
+
import { c as mt, a as ht, b as gt, I as pt, d as ft } from "./IconView-CSIFhlza.js";
|
|
26
|
+
import { observer as St } from "mobx-react-lite";
|
|
27
|
+
import { a as G, T as W } from "./Tooltip-D5QM-BbC.js";
|
|
28
|
+
import { B as bt } from "./Badge-CIT6Z_E_.js";
|
|
29
|
+
import { makeObservable as vt, observable as fe, computed as Se, action as j } from "mobx";
|
|
30
30
|
import "./context-BaYmTa0I.js";
|
|
31
|
-
import { u as
|
|
32
|
-
import { S as
|
|
33
|
-
import { H as
|
|
34
|
-
import { S as
|
|
35
|
-
import { getProperty as
|
|
36
|
-
import { hash as
|
|
37
|
-
import
|
|
38
|
-
import { useReactTable as
|
|
39
|
-
import
|
|
40
|
-
import { getAsyncResource as
|
|
41
|
-
import { u as
|
|
42
|
-
import { u as
|
|
43
|
-
import * as
|
|
44
|
-
import { S as
|
|
45
|
-
import { I as
|
|
46
|
-
import { I as
|
|
47
|
-
import { I as
|
|
48
|
-
import { I as
|
|
49
|
-
import { a as v, b as
|
|
50
|
-
import { ListLoaderAsyncResource as
|
|
51
|
-
import { S as
|
|
52
|
-
import { a as
|
|
53
|
-
import { A as
|
|
54
|
-
const
|
|
55
|
-
view:
|
|
56
|
-
title:
|
|
57
|
-
topContent:
|
|
58
|
-
content:
|
|
59
|
-
action:
|
|
60
|
-
avatar:
|
|
61
|
-
text:
|
|
31
|
+
import { u as yt } from "./useOnChange-C1Quwyuz.js";
|
|
32
|
+
import { S as wt } from "./SearchField-BGdC1K9_.js";
|
|
33
|
+
import { H as te } from "./Heading-C61IpDy1.js";
|
|
34
|
+
import { S as Et } from "./Section-7khrqgxc.js";
|
|
35
|
+
import { getProperty as Ft } from "dot-prop";
|
|
36
|
+
import { hash as Te } from "object-code";
|
|
37
|
+
import D from "zod";
|
|
38
|
+
import { useReactTable as It, getCoreRowModel as Tt, getSortedRowModel as Ct, getFilteredRowModel as Lt, getPaginationRowModel as Pt, getFacetedUniqueValues as At } from "@tanstack/react-table";
|
|
39
|
+
import Ce from "invariant";
|
|
40
|
+
import { getAsyncResource as be } from "@mittwald/react-use-promise";
|
|
41
|
+
import { u as ve } from "./useSelector-DpU7_HMO.js";
|
|
42
|
+
import { u as Vt } from "./SettingsProvider-D9oDS5r9.js";
|
|
43
|
+
import * as se from "react-aria-components";
|
|
44
|
+
import { S as U } from "./SkeletonText-B5ZghZhO.js";
|
|
45
|
+
import { I as kt } from "./IconChevronDown-wKRgAuyR.js";
|
|
46
|
+
import { I as Bt } from "./IconChevronUp-C2rq4v--.js";
|
|
47
|
+
import { I as Mt } from "./IllustratedMessage-DB1AH-Oq.js";
|
|
48
|
+
import { I as xt } from "./IconSearch-9xESFc33.js";
|
|
49
|
+
import { a as v, b as x, d as Dt } from "./deepHas-KHS5X1F_.js";
|
|
50
|
+
import { ListLoaderAsyncResource as Nt, TypedListLoaderAsyncResource as Rt } from "./List/ListLoaderAsyncResource.js";
|
|
51
|
+
import { S as $t } from "./Skeleton-CKLaTmDR.js";
|
|
52
|
+
import { a as Le, e as Pe, d as Ae, b as Ve, T as ke, c as Be } from "./Table-BdpXhsOd.js";
|
|
53
|
+
import { A as zt } from "./ActionGroup-Bd0aZvbX.js";
|
|
54
|
+
const Ut = "flow--list--items--item--view", Kt = "flow--list--items--item--view--title", Ot = "flow--list--items--item--view--top-content", Ht = "flow--list--items--item--view--content", qt = "flow--list--items--item--view--action", Gt = "flow--list--items--item--view--avatar", Wt = "flow--list--items--item--view--text", jt = "flow--list--items--item--view--heading", p = {
|
|
55
|
+
view: Ut,
|
|
56
|
+
title: Kt,
|
|
57
|
+
topContent: Ot,
|
|
58
|
+
content: Ht,
|
|
59
|
+
action: qt,
|
|
60
|
+
avatar: Gt,
|
|
61
|
+
text: Wt,
|
|
62
62
|
heading: jt,
|
|
63
63
|
"container-breakpoint-size-xs": "flow--list--items--item--view--container-breakpoint-size-xs",
|
|
64
64
|
"container-breakpoint-size-s": "flow--list--items--item--view--container-breakpoint-size-s",
|
|
@@ -97,9 +97,9 @@ const zt = "flow--list--items--item--view", Ut = "flow--list--items--item--view-
|
|
|
97
97
|
"list.sorting": "Sorting",
|
|
98
98
|
"list.toggleExpandButton.collapse": "Show less",
|
|
99
99
|
"list.toggleExpandButton.expand": "Show more"
|
|
100
|
-
} },
|
|
101
|
-
const { className: e, children: t } = n, s =
|
|
102
|
-
return /* @__PURE__ */
|
|
100
|
+
} }, Jt = (n) => {
|
|
101
|
+
const { className: e, children: t } = n, s = I(S);
|
|
102
|
+
return /* @__PURE__ */ i.createElement(H, null, /* @__PURE__ */ i.createElement(
|
|
103
103
|
w,
|
|
104
104
|
{
|
|
105
105
|
variant: "plain",
|
|
@@ -107,12 +107,12 @@ const zt = "flow--list--items--item--view", Ut = "flow--list--items--item--view-
|
|
|
107
107
|
className: e,
|
|
108
108
|
"aria-label": s.format("list.options")
|
|
109
109
|
},
|
|
110
|
-
/* @__PURE__ */
|
|
110
|
+
/* @__PURE__ */ i.createElement(ct, null)
|
|
111
111
|
), t);
|
|
112
|
-
},
|
|
113
|
-
const { children: e, className: t, containerBreakpointSize: s = "m" } = n,
|
|
112
|
+
}, Yt = (n) => n === "top" ? p.topContent : n === "bottom" ? p.content : p.topContent, Me = (n) => {
|
|
113
|
+
const { children: e, className: t, containerBreakpointSize: s = "m" } = n, a = {
|
|
114
114
|
ContextMenu: {
|
|
115
|
-
wrapWith: /* @__PURE__ */
|
|
115
|
+
wrapWith: /* @__PURE__ */ i.createElement(Jt, { className: p.action }),
|
|
116
116
|
placement: "bottom end"
|
|
117
117
|
},
|
|
118
118
|
Button: {
|
|
@@ -123,7 +123,7 @@ const zt = "flow--list--items--item--view", Ut = "flow--list--items--item--view-
|
|
|
123
123
|
ignoreBreakpoint: !0
|
|
124
124
|
},
|
|
125
125
|
Content: {
|
|
126
|
-
className:
|
|
126
|
+
className: Y((c) => Yt(c.slot)),
|
|
127
127
|
tunnelId: "topContent"
|
|
128
128
|
},
|
|
129
129
|
Avatar: {
|
|
@@ -142,73 +142,73 @@ const zt = "flow--list--items--item--view", Ut = "flow--list--items--item--view-
|
|
|
142
142
|
Link: {
|
|
143
143
|
unstyled: !0
|
|
144
144
|
}
|
|
145
|
-
}, o =
|
|
145
|
+
}, o = k(
|
|
146
146
|
p.view,
|
|
147
147
|
t,
|
|
148
|
-
p[
|
|
148
|
+
p[dt(s)]
|
|
149
149
|
);
|
|
150
|
-
return /* @__PURE__ */
|
|
151
|
-
},
|
|
152
|
-
listSummary:
|
|
153
|
-
},
|
|
150
|
+
return /* @__PURE__ */ i.createElement("div", { className: o }, /* @__PURE__ */ i.createElement(Z, { props: a, mergeInParentContext: !0 }, /* @__PURE__ */ i.createElement(Fe, null, e, /* @__PURE__ */ i.createElement("div", { className: p.title }, /* @__PURE__ */ i.createElement(z, { id: "title" })), /* @__PURE__ */ i.createElement(z, { id: "topContent" }))));
|
|
151
|
+
}, Qt = "flow--list--list-summary", Xt = {
|
|
152
|
+
listSummary: Qt
|
|
153
|
+
}, na = Ie("ListSummary", (n) => {
|
|
154
154
|
const { children: e } = n;
|
|
155
|
-
return /* @__PURE__ */
|
|
156
|
-
}),
|
|
155
|
+
return /* @__PURE__ */ i.createElement("header", { className: Xt.listSummary, ...n }, e);
|
|
156
|
+
}), xe = _e({}), f = () => et(xe).list, Zt = () => f().loader.getLoaderInvocationHooks().map((e, t) => /* @__PURE__ */ i.createElement(ut, { key: t }, () => {
|
|
157
157
|
e();
|
|
158
|
-
})),
|
|
158
|
+
})), _t = (n) => {
|
|
159
159
|
const { sorting: e } = n;
|
|
160
|
-
return /* @__PURE__ */
|
|
161
|
-
},
|
|
160
|
+
return /* @__PURE__ */ i.createElement(ee, { id: e.id }, e.name);
|
|
161
|
+
}, N = (n) => {
|
|
162
162
|
const { children: e, locales: t, variables: s } = n;
|
|
163
|
-
return
|
|
164
|
-
},
|
|
165
|
-
const n = f(), e = n.visibleSorting.map((
|
|
163
|
+
return I(t).format(e, s);
|
|
164
|
+
}, es = () => {
|
|
165
|
+
const n = f(), e = n.visibleSorting.map((a) => /* @__PURE__ */ i.createElement(_t, { sorting: a, key: a.id }));
|
|
166
166
|
if (e.length === 0)
|
|
167
167
|
return null;
|
|
168
|
-
const t = n.visibleSorting.find((
|
|
169
|
-
return /* @__PURE__ */
|
|
170
|
-
|
|
168
|
+
const t = n.visibleSorting.find((a) => a.isSorted()), s = /* @__PURE__ */ i.createElement(T, null, t ? /* @__PURE__ */ i.createElement(i.Fragment, null, t.name ?? t.property) : /* @__PURE__ */ i.createElement(N, { locales: S }, "list.sorting"));
|
|
169
|
+
return /* @__PURE__ */ i.createElement(H, null, /* @__PURE__ */ i.createElement(w, { variant: "outline", color: "secondary" }, s, /* @__PURE__ */ i.createElement(mt, null)), /* @__PURE__ */ i.createElement(
|
|
170
|
+
_,
|
|
171
171
|
{
|
|
172
172
|
selectionMode: "single",
|
|
173
173
|
selectedKeys: t ? [t.id] : [],
|
|
174
|
-
onAction: (
|
|
175
|
-
n.getSorting(String(
|
|
174
|
+
onAction: (a) => {
|
|
175
|
+
n.getSorting(String(a)).enable();
|
|
176
176
|
}
|
|
177
177
|
},
|
|
178
178
|
e
|
|
179
179
|
));
|
|
180
|
-
},
|
|
181
|
-
const { filter: e } = n, { values: t, mode: s, name:
|
|
182
|
-
|
|
180
|
+
}, ts = (n) => {
|
|
181
|
+
const { filter: e } = n, { values: t, mode: s, name: a, property: o } = e, c = t.map((l) => /* @__PURE__ */ i.createElement(
|
|
182
|
+
ee,
|
|
183
183
|
{
|
|
184
|
-
id:
|
|
185
|
-
key:
|
|
184
|
+
id: l.id,
|
|
185
|
+
key: l.id,
|
|
186
186
|
onAction: () => {
|
|
187
|
-
|
|
187
|
+
l.toggle();
|
|
188
188
|
}
|
|
189
189
|
},
|
|
190
|
-
|
|
191
|
-
)), d = t.filter((
|
|
192
|
-
return /* @__PURE__ */
|
|
193
|
-
|
|
190
|
+
l.render()
|
|
191
|
+
)), d = t.filter((l) => l.isActive).map((l) => l.id);
|
|
192
|
+
return /* @__PURE__ */ i.createElement(H, null, /* @__PURE__ */ i.createElement(w, { variant: "outline", color: "secondary" }, /* @__PURE__ */ i.createElement(T, null, a ?? o), /* @__PURE__ */ i.createElement(ht, null)), /* @__PURE__ */ i.createElement(
|
|
193
|
+
_,
|
|
194
194
|
{
|
|
195
195
|
selectionMode: s === "one" ? "single" : "multiple",
|
|
196
196
|
selectedKeys: d
|
|
197
197
|
},
|
|
198
|
-
|
|
198
|
+
c
|
|
199
199
|
));
|
|
200
|
-
},
|
|
201
|
-
header:
|
|
202
|
-
pickerListAndSearch:
|
|
200
|
+
}, ss = "flow--list--header", is = "flow--list--header--picker-list-and-search", as = "flow--list--header--picker-list", ns = "flow--list--header--search-and-actions", rs = "flow--list--header--search-field", os = "flow--list--header--actions", V = {
|
|
201
|
+
header: ss,
|
|
202
|
+
pickerListAndSearch: is,
|
|
203
203
|
pickerList: as,
|
|
204
|
-
searchAndActions:
|
|
205
|
-
searchField:
|
|
206
|
-
actions:
|
|
207
|
-
},
|
|
208
|
-
activeFilters:
|
|
209
|
-
clearButton:
|
|
210
|
-
},
|
|
211
|
-
const n = f(), e =
|
|
204
|
+
searchAndActions: ns,
|
|
205
|
+
searchField: rs,
|
|
206
|
+
actions: os
|
|
207
|
+
}, ls = "flow--list--header--active-filters", cs = "flow--list--header--active-filters--clear-button", ds = {
|
|
208
|
+
activeFilters: ls,
|
|
209
|
+
clearButton: cs
|
|
210
|
+
}, us = St(() => {
|
|
211
|
+
const n = f(), e = I(S), s = n.filters.flatMap((l) => l.values).filter((l) => l.isActive).map((l) => /* @__PURE__ */ i.createElement(bt, { key: l.id, onClose: () => l.deactivate() }, /* @__PURE__ */ i.createElement(T, null, l.render()))), a = n.filters.filter((l) => l.hasChanged()).length > 0, o = n.supportsSettingsStorage && a && /* @__PURE__ */ i.createElement(G, null, /* @__PURE__ */ i.createElement(W, null, /* @__PURE__ */ i.createElement(N, { locales: S }, "list.filters.store")), /* @__PURE__ */ i.createElement(
|
|
212
212
|
w,
|
|
213
213
|
{
|
|
214
214
|
size: "s",
|
|
@@ -217,8 +217,8 @@ const zt = "flow--list--items--item--view", Ut = "flow--list--items--item--view-
|
|
|
217
217
|
onPress: () => n.storeFilterDefaultSettings(),
|
|
218
218
|
"aria-label": e.format("list.filters.store")
|
|
219
219
|
},
|
|
220
|
-
/* @__PURE__ */
|
|
221
|
-
)),
|
|
220
|
+
/* @__PURE__ */ i.createElement(gt, null)
|
|
221
|
+
)), c = a ? /* @__PURE__ */ i.createElement(G, null, /* @__PURE__ */ i.createElement(W, null, /* @__PURE__ */ i.createElement(N, { locales: S }, "list.filters.reset")), /* @__PURE__ */ i.createElement(
|
|
222
222
|
w,
|
|
223
223
|
{
|
|
224
224
|
size: "s",
|
|
@@ -227,8 +227,8 @@ const zt = "flow--list--items--item--view", Ut = "flow--list--items--item--view-
|
|
|
227
227
|
onPress: () => n.resetFilters(),
|
|
228
228
|
"aria-label": e.format("list.filters.reset")
|
|
229
229
|
},
|
|
230
|
-
/* @__PURE__ */
|
|
231
|
-
)) : void 0, d = s.length > 0 ? /* @__PURE__ */
|
|
230
|
+
/* @__PURE__ */ i.createElement(pe, null, /* @__PURE__ */ i.createElement(lt, null))
|
|
231
|
+
)) : void 0, d = s.length > 0 ? /* @__PURE__ */ i.createElement(G, null, /* @__PURE__ */ i.createElement(W, null, /* @__PURE__ */ i.createElement(N, { locales: S }, "list.filters.clear")), /* @__PURE__ */ i.createElement(
|
|
232
232
|
w,
|
|
233
233
|
{
|
|
234
234
|
size: "s",
|
|
@@ -236,70 +236,70 @@ const zt = "flow--list--items--item--view", Ut = "flow--list--items--item--view-
|
|
|
236
236
|
color: "secondary",
|
|
237
237
|
onPress: () => n.clearFilters()
|
|
238
238
|
},
|
|
239
|
-
/* @__PURE__ */
|
|
239
|
+
/* @__PURE__ */ i.createElement(pe, null, /* @__PURE__ */ i.createElement(pt, null))
|
|
240
240
|
)) : void 0;
|
|
241
|
-
return s.length === 0 && !o && !
|
|
242
|
-
}),
|
|
243
|
-
const { className: e, onChange: t, value: s, ...
|
|
244
|
-
|
|
245
|
-
|
|
241
|
+
return s.length === 0 && !o && !c ? null : /* @__PURE__ */ i.createElement("div", { className: ds.activeFilters }, s, o, c, d);
|
|
242
|
+
}), ms = (n) => {
|
|
243
|
+
const { className: e, onChange: t, value: s, ...a } = n, [o, c] = O(s ?? "");
|
|
244
|
+
yt(s, () => {
|
|
245
|
+
c(s ?? "");
|
|
246
246
|
}, [o]);
|
|
247
247
|
const d = () => {
|
|
248
|
-
t(void 0),
|
|
249
|
-
},
|
|
248
|
+
t(void 0), c("");
|
|
249
|
+
}, l = (u) => {
|
|
250
250
|
u.key === "Enter" ? o.trim() === "" ? t(void 0) : t(o) : u.key === "Escape" && d();
|
|
251
251
|
};
|
|
252
|
-
return /* @__PURE__ */
|
|
253
|
-
|
|
252
|
+
return /* @__PURE__ */ i.createElement(
|
|
253
|
+
wt,
|
|
254
254
|
{
|
|
255
255
|
className: e,
|
|
256
256
|
value: o,
|
|
257
|
-
onKeyUp:
|
|
258
|
-
onChange: (u) =>
|
|
257
|
+
onKeyUp: l,
|
|
258
|
+
onChange: (u) => c(u),
|
|
259
259
|
onClear: d,
|
|
260
|
-
...
|
|
260
|
+
...a
|
|
261
261
|
}
|
|
262
262
|
);
|
|
263
|
-
},
|
|
264
|
-
const { className: e, search: t } = n, s = t.render ??
|
|
265
|
-
return
|
|
263
|
+
}, hs = (n) => {
|
|
264
|
+
const { className: e, search: t } = n, s = t.render ?? ms;
|
|
265
|
+
return we(s, {
|
|
266
266
|
className: e,
|
|
267
267
|
value: t.value,
|
|
268
268
|
onChange: t.setValue.bind(t),
|
|
269
269
|
...t.textFieldProps
|
|
270
270
|
});
|
|
271
|
-
},
|
|
272
|
-
const n =
|
|
273
|
-
return e.itemView && s.push("list"), e.table && s.push("table"), s.length <= 1 ? null : /* @__PURE__ */
|
|
271
|
+
}, gs = () => {
|
|
272
|
+
const n = I(S), e = f(), t = e.viewMode, s = [];
|
|
273
|
+
return e.itemView && s.push("list"), e.table && s.push("table"), s.length <= 1 ? null : /* @__PURE__ */ i.createElement(H, null, /* @__PURE__ */ i.createElement(
|
|
274
274
|
w,
|
|
275
275
|
{
|
|
276
276
|
variant: "outline",
|
|
277
277
|
color: "secondary",
|
|
278
278
|
"aria-label": n.format("list.settings")
|
|
279
279
|
},
|
|
280
|
-
/* @__PURE__ */
|
|
281
|
-
/* @__PURE__ */
|
|
282
|
-
), /* @__PURE__ */
|
|
283
|
-
|
|
280
|
+
/* @__PURE__ */ i.createElement(T, null, n.format(`list.settings.viewMode.${t}`)),
|
|
281
|
+
/* @__PURE__ */ i.createElement(ft, null)
|
|
282
|
+
), /* @__PURE__ */ i.createElement(_, { selectionMode: "single", selectedKeys: [t] }, /* @__PURE__ */ i.createElement(Et, null, /* @__PURE__ */ i.createElement(te, null, n.format("list.settings.viewMode")), s.map((a) => /* @__PURE__ */ i.createElement(
|
|
283
|
+
ee,
|
|
284
284
|
{
|
|
285
|
-
id:
|
|
286
|
-
key:
|
|
285
|
+
id: a,
|
|
286
|
+
key: a,
|
|
287
287
|
onAction: () => {
|
|
288
|
-
e.setViewMode(
|
|
288
|
+
e.setViewMode(a);
|
|
289
289
|
}
|
|
290
290
|
},
|
|
291
|
-
n.format(`list.settings.viewMode.${
|
|
291
|
+
n.format(`list.settings.viewMode.${a}`)
|
|
292
292
|
)))));
|
|
293
|
-
},
|
|
293
|
+
}, ps = (n) => {
|
|
294
294
|
const { className: e, hasActionGroup: t } = n, s = f();
|
|
295
295
|
if (s.filters.length === 0 && s.visibleSorting.length === 0 && !s.search && !s.table && !t)
|
|
296
296
|
return null;
|
|
297
|
-
const
|
|
298
|
-
return /* @__PURE__ */
|
|
299
|
-
},
|
|
300
|
-
list:
|
|
297
|
+
const a = s.filters.map((o) => /* @__PURE__ */ i.createElement(ts, { key: o.property, filter: o }));
|
|
298
|
+
return /* @__PURE__ */ i.createElement("div", { className: k(e, V.header) }, /* @__PURE__ */ i.createElement("div", { className: V.pickerListAndSearch }, /* @__PURE__ */ i.createElement("div", { className: V.pickerList }, /* @__PURE__ */ i.createElement(gs, null), /* @__PURE__ */ i.createElement(es, null), a), /* @__PURE__ */ i.createElement("div", { className: V.searchAndActions }, s.search && /* @__PURE__ */ i.createElement(hs, { className: V.searchField, search: s.search }), /* @__PURE__ */ i.createElement(z, { id: "actions" }))), /* @__PURE__ */ i.createElement(us, null));
|
|
299
|
+
}, fs = "flow--list", Ss = {
|
|
300
|
+
list: fs
|
|
301
301
|
};
|
|
302
|
-
let
|
|
302
|
+
let bs = class De {
|
|
303
303
|
constructor(e, t, s) {
|
|
304
304
|
r(this, "id");
|
|
305
305
|
r(this, "data");
|
|
@@ -307,25 +307,25 @@ let Ss = class xe {
|
|
|
307
307
|
this.collection = e, this.id = t, this.data = s;
|
|
308
308
|
}
|
|
309
309
|
static fromRow(e, t) {
|
|
310
|
-
return new
|
|
310
|
+
return new De(e, t.id, t.original);
|
|
311
311
|
}
|
|
312
312
|
};
|
|
313
|
-
class
|
|
313
|
+
class vs {
|
|
314
314
|
constructor(e) {
|
|
315
315
|
r(this, "list");
|
|
316
316
|
this.list = e;
|
|
317
317
|
}
|
|
318
318
|
get entries() {
|
|
319
|
-
return this.list.reactTable.table.getRowModel().rows.map((e) =>
|
|
319
|
+
return this.list.reactTable.table.getRowModel().rows.map((e) => bs.fromRow(this, e));
|
|
320
320
|
}
|
|
321
321
|
}
|
|
322
|
-
class
|
|
322
|
+
class ys {
|
|
323
323
|
constructor(e, t = {}) {
|
|
324
324
|
r(this, "batchSize");
|
|
325
325
|
r(this, "list");
|
|
326
|
-
var
|
|
326
|
+
var a;
|
|
327
327
|
const { batchSize: s = 20 } = t;
|
|
328
|
-
this.list = e, this.batchSize = s, e.filters.forEach((o) => o.onFilterUpdated(() => this.reset())), (
|
|
328
|
+
this.list = e, this.batchSize = s, e.filters.forEach((o) => o.onFilterUpdated(() => this.reset())), (a = e.search) == null || a.onUpdated(() => this.reset());
|
|
329
329
|
}
|
|
330
330
|
get reactTable() {
|
|
331
331
|
return this.list.reactTable.table;
|
|
@@ -366,20 +366,23 @@ class vs {
|
|
|
366
366
|
}
|
|
367
367
|
}
|
|
368
368
|
}
|
|
369
|
-
const
|
|
370
|
-
class
|
|
369
|
+
const ws = "$";
|
|
370
|
+
class F {
|
|
371
371
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
372
372
|
constructor(e, t) {
|
|
373
373
|
r(this, "filter");
|
|
374
374
|
r(this, "value");
|
|
375
|
-
this
|
|
375
|
+
r(this, "id");
|
|
376
|
+
var s;
|
|
377
|
+
this.filter = e, typeof t == "string" && t.startsWith("FilterValueId@@") ? (this.value = (s = e.values.find((a) => a.id === t)) == null ? void 0 : s.value, this.id = t) : (this.value = t, this.id = `FilterValueId@@${this.filter.property}@@${Te(this.value)}`);
|
|
378
|
+
}
|
|
379
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
380
|
+
static create(e, t) {
|
|
381
|
+
return t instanceof F ? t : new F(e, t);
|
|
376
382
|
}
|
|
377
383
|
equals(e) {
|
|
378
384
|
return at(this.value, e.value);
|
|
379
385
|
}
|
|
380
|
-
get id() {
|
|
381
|
-
return `${this.filter.property}@@${Ie(this.value)}`;
|
|
382
|
-
}
|
|
383
386
|
get isActive() {
|
|
384
387
|
return this.filter.isValueActive(this);
|
|
385
388
|
}
|
|
@@ -393,8 +396,8 @@ class be {
|
|
|
393
396
|
this.filter.deactivateValue(this);
|
|
394
397
|
}
|
|
395
398
|
}
|
|
396
|
-
const
|
|
397
|
-
class
|
|
399
|
+
const J = (n) => Array.isArray(n) ? n : [n], Es = (n, e) => n === e, Fs = (n) => String(n);
|
|
400
|
+
class R {
|
|
398
401
|
constructor(e, t) {
|
|
399
402
|
r(this, "_values");
|
|
400
403
|
r(this, "_valuesFromTableState");
|
|
@@ -407,17 +410,11 @@ class N {
|
|
|
407
410
|
r(this, "onFilterUpdateCallbacks", /* @__PURE__ */ new Set());
|
|
408
411
|
r(this, "defaultSelectedValues");
|
|
409
412
|
var s;
|
|
410
|
-
this.list = e, this.property = t.property, this.mode = t.mode ?? "one", this._values = (s = t.values) == null ? void 0 : s.map((
|
|
411
|
-
(i) => {
|
|
412
|
-
var o;
|
|
413
|
-
return (o = t.defaultSelected) == null ? void 0 : o.some((l) => l === i.value);
|
|
414
|
-
}
|
|
415
|
-
) : void 0;
|
|
413
|
+
this.list = e, this.property = t.property, this.mode = t.mode ?? "one", this._values = (s = t.values) == null ? void 0 : s.map((a) => F.create(this, a)), this.matcher = t.matcher ?? Es, this.renderItem = t.renderItem ?? Fs, this.name = t.name, this.defaultSelectedValues = t.defaultSelected;
|
|
416
414
|
}
|
|
417
|
-
|
|
418
|
-
var
|
|
419
|
-
|
|
420
|
-
return e ? this.values.filter((s) => e.includes(s.id)) : void 0;
|
|
415
|
+
getStoredSelectedIds() {
|
|
416
|
+
var e;
|
|
417
|
+
return (e = this.list.getStoredFilterDefaultSettings()) == null ? void 0 : e[String(this.property)];
|
|
421
418
|
}
|
|
422
419
|
updateInitialState(e) {
|
|
423
420
|
const t = this.getInitialValues();
|
|
@@ -434,21 +431,21 @@ class N {
|
|
|
434
431
|
}
|
|
435
432
|
getReactTableFilterFn() {
|
|
436
433
|
return (e, t, s) => {
|
|
437
|
-
const
|
|
434
|
+
const a = this.property, o = a.startsWith(ws) ? e.original : Ft(e.original, a);
|
|
438
435
|
return this.checkFilterMatches(o, s);
|
|
439
436
|
};
|
|
440
437
|
}
|
|
441
438
|
checkFilterMatches(e, t) {
|
|
442
439
|
if (t === null)
|
|
443
440
|
return !0;
|
|
444
|
-
const s = (o) =>
|
|
441
|
+
const s = (o) => this.matcher(o.value, e), a = (o) => F.create(this, o);
|
|
445
442
|
if (this.mode === "all")
|
|
446
|
-
return
|
|
443
|
+
return J(t).map(a).every(s);
|
|
447
444
|
if (this.mode === "some") {
|
|
448
|
-
const o =
|
|
449
|
-
return o.length === 0 || o.some(
|
|
445
|
+
const o = J(t);
|
|
446
|
+
return o.length === 0 || o.map(a).some(s);
|
|
450
447
|
} else if (this.mode === "one")
|
|
451
|
-
return
|
|
448
|
+
return s(a(t));
|
|
452
449
|
throw new Error(`Unknown filter mode '${this.mode}'`);
|
|
453
450
|
}
|
|
454
451
|
getTableColumnFilter() {
|
|
@@ -462,9 +459,9 @@ class N {
|
|
|
462
459
|
return ((e = this.getTableColumnFilter()) == null ? void 0 : e.value) ?? null;
|
|
463
460
|
}
|
|
464
461
|
getValuesFromTableState() {
|
|
465
|
-
return
|
|
462
|
+
return nt(
|
|
466
463
|
Array.from(this.getTableColumn().getFacetedUniqueValues().keys()).flatMap((e) => e).filter((e) => e != null)
|
|
467
|
-
).map((e) =>
|
|
464
|
+
).map((e) => F.create(this, e));
|
|
468
465
|
}
|
|
469
466
|
checkIfValueIsUnknown(e) {
|
|
470
467
|
return !this.values.some((s) => s.id === e.id);
|
|
@@ -482,7 +479,7 @@ class N {
|
|
|
482
479
|
}
|
|
483
480
|
getArrayValue() {
|
|
484
481
|
const e = this.getValue();
|
|
485
|
-
return
|
|
482
|
+
return e === null ? [] : J(e).map((t) => F.create(this, t));
|
|
486
483
|
}
|
|
487
484
|
isValueActive(e) {
|
|
488
485
|
return this.getArrayValue().some((t) => t.equals(e));
|
|
@@ -493,14 +490,19 @@ class N {
|
|
|
493
490
|
deactivateValue(e) {
|
|
494
491
|
const t = this.getArrayValue();
|
|
495
492
|
let s;
|
|
496
|
-
this.mode === "all" || this.mode === "some" ? s = t.filter((
|
|
493
|
+
this.mode === "all" || this.mode === "some" ? s = t.filter((a) => !a.equals(e)) : s = null, this.list.reactTable.getTableColumn(this.property).setFilterValue(s), this.onFilterUpdateCallbacks.forEach((a) => a());
|
|
497
494
|
}
|
|
498
495
|
hasChanged() {
|
|
499
|
-
|
|
500
|
-
|
|
496
|
+
var s;
|
|
497
|
+
const e = this.getArrayValue().map((a) => a.value), t = ((s = this.getInitialFilterValues()) == null ? void 0 : s.map((a) => a.value)) ?? [];
|
|
498
|
+
return e.length !== t.length || rt(e, t).length > 0;
|
|
501
499
|
}
|
|
502
500
|
getInitialValues() {
|
|
503
|
-
return this.
|
|
501
|
+
return this.getStoredSelectedIds() ?? this.defaultSelectedValues;
|
|
502
|
+
}
|
|
503
|
+
getInitialFilterValues() {
|
|
504
|
+
var e;
|
|
505
|
+
return (e = this.getInitialValues()) == null ? void 0 : e.map((t) => F.create(this, t));
|
|
504
506
|
}
|
|
505
507
|
resetValues() {
|
|
506
508
|
let e;
|
|
@@ -513,14 +515,14 @@ class N {
|
|
|
513
515
|
toggleValue(e) {
|
|
514
516
|
const t = this.getArrayValue();
|
|
515
517
|
let s;
|
|
516
|
-
this.mode === "all" || this.mode === "some" ? e.isActive ? s = t.filter((
|
|
518
|
+
this.mode === "all" || this.mode === "some" ? e.isActive ? s = t.filter((a) => !a.equals(e)) : s = [...t, e] : s = e.isActive ? null : e, this.list.reactTable.getTableColumn(this.property).setFilterValue(s), this.onFilterUpdateCallbacks.forEach((a) => a());
|
|
517
519
|
}
|
|
518
520
|
onFilterUpdated(e) {
|
|
519
521
|
this.onFilterUpdateCallbacks.add(e);
|
|
520
522
|
}
|
|
521
523
|
}
|
|
522
|
-
r(
|
|
523
|
-
class
|
|
524
|
+
r(R, "settingsStorageSchema", D.record(D.array(D.string())).optional());
|
|
525
|
+
class Is {
|
|
524
526
|
constructor(e, t) {
|
|
525
527
|
r(this, "list");
|
|
526
528
|
r(this, "property");
|
|
@@ -554,61 +556,61 @@ class Fs {
|
|
|
554
556
|
return `${this.getTableColumn().id}:${this.direction}`;
|
|
555
557
|
}
|
|
556
558
|
}
|
|
557
|
-
class
|
|
559
|
+
class ie {
|
|
558
560
|
constructor(e, t, s = {}) {
|
|
559
561
|
r(this, "list");
|
|
560
562
|
r(this, "table");
|
|
561
563
|
r(this, "sortingState");
|
|
562
564
|
r(this, "updateSortingState");
|
|
563
565
|
this.list = e;
|
|
564
|
-
const
|
|
566
|
+
const a = this.list.sorting.filter(
|
|
565
567
|
(d) => d.defaultEnabled !== !1
|
|
566
|
-
), [o,
|
|
567
|
-
|
|
568
|
+
), [o, c] = O(
|
|
569
|
+
a.map((d) => d.getReactTableColumnSort())
|
|
568
570
|
);
|
|
569
|
-
this.sortingState = o, this.updateSortingState =
|
|
571
|
+
this.sortingState = o, this.updateSortingState = c, this.table = this.useReactTable(t, s);
|
|
570
572
|
}
|
|
571
573
|
static useNew(e, t, s = {}) {
|
|
572
|
-
return new
|
|
574
|
+
return new ie(e, t, s);
|
|
573
575
|
}
|
|
574
576
|
useReactTable(e, t = {}) {
|
|
575
|
-
var
|
|
576
|
-
const s = this.list.loader.useData(),
|
|
577
|
+
var c;
|
|
578
|
+
const s = this.list.loader.useData(), a = {
|
|
577
579
|
pagination: {
|
|
578
580
|
pageSize: this.list.batches.batchSize
|
|
579
581
|
},
|
|
580
582
|
columnFilters: []
|
|
581
583
|
};
|
|
582
584
|
for (const d of this.list.filters)
|
|
583
|
-
d.updateInitialState(
|
|
584
|
-
(
|
|
585
|
-
const o =
|
|
585
|
+
d.updateInitialState(a);
|
|
586
|
+
(c = this.list.search) == null || c.updateInitialState(a);
|
|
587
|
+
const o = It({
|
|
586
588
|
data: s,
|
|
587
589
|
state: {
|
|
588
590
|
sorting: this.sortingState
|
|
589
591
|
},
|
|
590
592
|
getRowId: this.list.getItemId,
|
|
591
|
-
initialState:
|
|
593
|
+
initialState: a,
|
|
592
594
|
columns: this.getTableColumnDefs(),
|
|
593
|
-
getCoreRowModel:
|
|
594
|
-
getSortedRowModel:
|
|
595
|
-
getFilteredRowModel:
|
|
596
|
-
getPaginationRowModel:
|
|
597
|
-
getFacetedUniqueValues:
|
|
595
|
+
getCoreRowModel: Tt(),
|
|
596
|
+
getSortedRowModel: Ct(),
|
|
597
|
+
getFilteredRowModel: Lt(),
|
|
598
|
+
getPaginationRowModel: Pt(),
|
|
599
|
+
getFacetedUniqueValues: At(),
|
|
598
600
|
onSortingChange: (d) => {
|
|
599
601
|
this.handleSortingStateUpdate(d);
|
|
600
602
|
},
|
|
601
603
|
globalFilterFn: "auto",
|
|
602
604
|
...t
|
|
603
605
|
});
|
|
604
|
-
return
|
|
606
|
+
return M(() => {
|
|
605
607
|
e && e(this.list);
|
|
606
608
|
}, [this.list, e, o]), o;
|
|
607
609
|
}
|
|
608
610
|
handleSortingStateUpdate(e) {
|
|
609
611
|
const t = typeof e == "function" ? e(this.sortingState) : e, s = this.list.sorting.filter(
|
|
610
|
-
(
|
|
611
|
-
).map((
|
|
612
|
+
(a) => a.defaultEnabled === "hidden" && !t.some((o) => o.id === a.property)
|
|
613
|
+
).map((a) => a.getReactTableColumnSort());
|
|
612
614
|
this.updateSortingState([...s, ...t]);
|
|
613
615
|
}
|
|
614
616
|
get searchString() {
|
|
@@ -616,13 +618,13 @@ class te {
|
|
|
616
618
|
}
|
|
617
619
|
getTableColumn(e) {
|
|
618
620
|
const t = this.table.getColumn(e);
|
|
619
|
-
return
|
|
621
|
+
return Ce(!!t, `Column #${e} is not defined`), t;
|
|
620
622
|
}
|
|
621
623
|
getTableColumnDefs() {
|
|
622
624
|
const e = /* @__PURE__ */ new Map(), t = (s) => {
|
|
623
|
-
const
|
|
624
|
-
if (
|
|
625
|
-
return
|
|
625
|
+
const a = e.get(s);
|
|
626
|
+
if (a)
|
|
627
|
+
return a;
|
|
626
628
|
const o = {
|
|
627
629
|
id: s,
|
|
628
630
|
accessorKey: s,
|
|
@@ -638,26 +640,26 @@ class te {
|
|
|
638
640
|
), Array.from(e.values());
|
|
639
641
|
}
|
|
640
642
|
}
|
|
641
|
-
class
|
|
643
|
+
class ae {
|
|
642
644
|
constructor() {
|
|
643
645
|
r(this, "dataBatches", []);
|
|
644
646
|
r(this, "prevDataBatches", []);
|
|
645
647
|
r(this, "batchLoadingStates", ["void"]);
|
|
646
|
-
|
|
648
|
+
vt(this, {
|
|
647
649
|
prevDataBatches: !1,
|
|
648
650
|
useMergedData: !1,
|
|
649
651
|
useIsLoading: !1,
|
|
650
|
-
dataBatches:
|
|
651
|
-
batchLoadingStates:
|
|
652
|
-
mergedData:
|
|
653
|
-
isLoading:
|
|
652
|
+
dataBatches: fe.shallow,
|
|
653
|
+
batchLoadingStates: fe.shallow,
|
|
654
|
+
mergedData: Se,
|
|
655
|
+
isLoading: Se,
|
|
654
656
|
reset: j.bound,
|
|
655
657
|
setDataBatch: j.bound,
|
|
656
658
|
setBatchLoadingState: j.bound
|
|
657
659
|
});
|
|
658
660
|
}
|
|
659
661
|
static useNew() {
|
|
660
|
-
return
|
|
662
|
+
return Ee(new ae()).current;
|
|
661
663
|
}
|
|
662
664
|
reset() {
|
|
663
665
|
this.batchLoadingStates = [], this.dataBatches = [];
|
|
@@ -672,20 +674,20 @@ class se {
|
|
|
672
674
|
return (this.dataBatches.length === 0 ? this.prevDataBatches : this.dataBatches).flatMap((t) => t);
|
|
673
675
|
}
|
|
674
676
|
useMergedData() {
|
|
675
|
-
return
|
|
677
|
+
return ve(() => this.mergedData);
|
|
676
678
|
}
|
|
677
679
|
get isLoading() {
|
|
678
680
|
return this.batchLoadingStates.some((e) => e === "loading" || e === "void");
|
|
679
681
|
}
|
|
680
682
|
useIsLoading() {
|
|
681
|
-
return
|
|
683
|
+
return ve(() => this.isLoading);
|
|
682
684
|
}
|
|
683
685
|
isBatchLoaded(e) {
|
|
684
686
|
return e in this.dataBatches;
|
|
685
687
|
}
|
|
686
688
|
}
|
|
687
|
-
const
|
|
688
|
-
class
|
|
689
|
+
const Ts = [];
|
|
690
|
+
class ne {
|
|
689
691
|
constructor(e, t = {}) {
|
|
690
692
|
r(this, "list");
|
|
691
693
|
r(this, "dataSource");
|
|
@@ -695,12 +697,12 @@ class ae {
|
|
|
695
697
|
r(this, "loaderState");
|
|
696
698
|
var d;
|
|
697
699
|
const { source: s } = t;
|
|
698
|
-
this.dataSource = s ?? { staticData:
|
|
699
|
-
const
|
|
700
|
-
this.list = e, this.loaderState =
|
|
700
|
+
this.dataSource = s ?? { staticData: Ts };
|
|
701
|
+
const a = "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;
|
|
702
|
+
this.list = e, this.loaderState = ae.useNew(), this.manualPagination = a ?? !1, this.manualFiltering = o ?? this.manualPagination, this.manualSorting = c ?? this.manualPagination, this.list.filters.forEach((l) => l.onFilterUpdated(() => this.reset())), (d = this.list.search) == null || d.onUpdated(() => this.reset());
|
|
701
703
|
}
|
|
702
704
|
static useNew(e, t = {}) {
|
|
703
|
-
return new
|
|
705
|
+
return new ne(e, t);
|
|
704
706
|
}
|
|
705
707
|
reset() {
|
|
706
708
|
this.loaderState.reset();
|
|
@@ -715,7 +717,7 @@ class ae {
|
|
|
715
717
|
return this.loaderState.useMergedData();
|
|
716
718
|
}
|
|
717
719
|
getLoaderInvocationHooks() {
|
|
718
|
-
return
|
|
720
|
+
return ot(this.list.batches.getBatchIndex() + 1, (t) => t).map((t) => () => {
|
|
719
721
|
this.useLoadBatch(t);
|
|
720
722
|
});
|
|
721
723
|
}
|
|
@@ -726,21 +728,21 @@ class ae {
|
|
|
726
728
|
}), this.useObserveBatchData(t, e), this.useObserveBatchLoadingState(t, e);
|
|
727
729
|
}
|
|
728
730
|
useObserveBatchLoadingState(e, t) {
|
|
729
|
-
const s = (
|
|
731
|
+
const s = (a) => {
|
|
730
732
|
this.loaderState.setBatchLoadingState(
|
|
731
733
|
t,
|
|
732
|
-
this.loaderState.isBatchLoaded(t) ? "loaded" :
|
|
734
|
+
this.loaderState.isBatchLoaded(t) ? "loaded" : a
|
|
733
735
|
);
|
|
734
736
|
};
|
|
735
|
-
|
|
737
|
+
M(() => (s(e.state.value), e.state.observe(s)), [e, t]);
|
|
736
738
|
}
|
|
737
739
|
useObserveBatchData(e, t) {
|
|
738
|
-
const s = (
|
|
739
|
-
const { data: o, itemTotalCount:
|
|
740
|
-
this.loaderState.setDataBatch(t, o),
|
|
740
|
+
const s = (a) => {
|
|
741
|
+
const { data: o, itemTotalCount: c } = a;
|
|
742
|
+
this.loaderState.setDataBatch(t, o), c !== void 0 && this.list.batches.updateItemTotalCount(c);
|
|
741
743
|
};
|
|
742
|
-
|
|
743
|
-
|
|
744
|
+
M(() => (e.value.value.isSet && s(e.value.value.value), e.value.observe((a) => {
|
|
745
|
+
a.isSet && s(a.value);
|
|
744
746
|
})), [e, t]);
|
|
745
747
|
}
|
|
746
748
|
getDataLoaderOptions(e) {
|
|
@@ -767,27 +769,27 @@ class ae {
|
|
|
767
769
|
getBatchDataAsyncResource(e) {
|
|
768
770
|
const t = this.dataSource, s = this.getDataLoaderOptions(e);
|
|
769
771
|
if ("staticData" in t)
|
|
770
|
-
return
|
|
771
|
-
async (
|
|
772
|
-
data:
|
|
773
|
-
itemTotalCount:
|
|
772
|
+
return be(
|
|
773
|
+
async (a) => ({
|
|
774
|
+
data: a,
|
|
775
|
+
itemTotalCount: a.length
|
|
774
776
|
}),
|
|
775
777
|
[t.staticData]
|
|
776
778
|
);
|
|
777
779
|
if ("asyncLoader" in t) {
|
|
778
|
-
const
|
|
779
|
-
return
|
|
780
|
-
loaderId:
|
|
780
|
+
const a = t.asyncLoader, o = t.dependencies, c = o ? Te(o).toString() : void 0;
|
|
781
|
+
return be(a, [s], {
|
|
782
|
+
loaderId: c
|
|
781
783
|
});
|
|
782
784
|
}
|
|
783
785
|
if ("asyncResourceFactory" in t) {
|
|
784
|
-
const
|
|
785
|
-
return
|
|
786
|
+
const a = t.asyncResourceFactory;
|
|
787
|
+
return a(s);
|
|
786
788
|
}
|
|
787
789
|
throw new Error("Unknown data source");
|
|
788
790
|
}
|
|
789
791
|
}
|
|
790
|
-
class
|
|
792
|
+
class Cs {
|
|
791
793
|
constructor(e, t) {
|
|
792
794
|
r(this, "list");
|
|
793
795
|
r(this, "render");
|
|
@@ -818,7 +820,7 @@ class Ts {
|
|
|
818
820
|
this.onUpdateCallbacks.add(e);
|
|
819
821
|
}
|
|
820
822
|
}
|
|
821
|
-
const
|
|
823
|
+
const K = class K {
|
|
822
824
|
constructor(e, t = {}) {
|
|
823
825
|
r(this, "list");
|
|
824
826
|
r(this, "textValue");
|
|
@@ -826,64 +828,64 @@ const U = class U {
|
|
|
826
828
|
r(this, "defaultExpanded");
|
|
827
829
|
r(this, "fallback");
|
|
828
830
|
r(this, "renderFn");
|
|
829
|
-
const { fallback: s, textValue:
|
|
830
|
-
this.list = e, this.textValue =
|
|
831
|
+
const { fallback: s, textValue: a, href: o, defaultExpanded: c, renderFn: d } = t;
|
|
832
|
+
this.list = e, this.textValue = a, this.renderFn = d, this.href = o, this.defaultExpanded = c, this.fallback = s;
|
|
831
833
|
}
|
|
832
834
|
render(e) {
|
|
833
|
-
return (this.renderFn ??
|
|
835
|
+
return (this.renderFn ?? K.fallbackRenderItemFn)(e, this.list);
|
|
834
836
|
}
|
|
835
837
|
};
|
|
836
|
-
r(
|
|
837
|
-
let
|
|
838
|
+
r(K, "fallbackRenderItemFn", (e) => we("pre", void 0, JSON.stringify(e)));
|
|
839
|
+
let Q = K, Ls = class {
|
|
838
840
|
constructor(e, t = {}) {
|
|
839
841
|
r(this, "tableHeader");
|
|
840
842
|
r(this, "componentProps");
|
|
841
843
|
this.tableHeader = e, this.componentProps = t;
|
|
842
844
|
}
|
|
843
|
-
},
|
|
845
|
+
}, Ps = class {
|
|
844
846
|
constructor(e, t = {}) {
|
|
845
847
|
r(this, "table");
|
|
846
848
|
r(this, "componentProps");
|
|
847
849
|
r(this, "columns");
|
|
848
|
-
const { columns: s = [], ...
|
|
849
|
-
this.table = e, this.columns = s.map((o) => new
|
|
850
|
+
const { columns: s = [], ...a } = t;
|
|
851
|
+
this.table = e, this.columns = s.map((o) => new Ls(this, o)), this.componentProps = a;
|
|
850
852
|
}
|
|
851
|
-
},
|
|
853
|
+
}, As = class {
|
|
852
854
|
constructor(e, t = {}) {
|
|
853
855
|
r(this, "row");
|
|
854
856
|
r(this, "renderFn");
|
|
855
857
|
r(this, "componentProps");
|
|
856
|
-
const { renderFn: s, ...
|
|
857
|
-
this.row = e, this.renderFn = s, this.componentProps =
|
|
858
|
+
const { renderFn: s, ...a } = t;
|
|
859
|
+
this.row = e, this.renderFn = s, this.componentProps = a;
|
|
858
860
|
}
|
|
859
|
-
},
|
|
861
|
+
}, Vs = class {
|
|
860
862
|
constructor(e, t = {}) {
|
|
861
863
|
r(this, "tableBody");
|
|
862
864
|
r(this, "cells");
|
|
863
865
|
r(this, "componentProps");
|
|
864
|
-
const { cells: s = [], ...
|
|
865
|
-
this.tableBody = e, this.cells = s.map((o) => new
|
|
866
|
+
const { cells: s = [], ...a } = t;
|
|
867
|
+
this.tableBody = e, this.cells = s.map((o) => new As(this, o)), this.componentProps = a;
|
|
866
868
|
}
|
|
867
|
-
},
|
|
869
|
+
}, ks = class {
|
|
868
870
|
constructor(e, t = {}) {
|
|
869
871
|
r(this, "table");
|
|
870
872
|
r(this, "componentProps");
|
|
871
873
|
r(this, "row");
|
|
872
|
-
const { row: s, ...
|
|
873
|
-
this.table = e, this.row = new
|
|
874
|
+
const { row: s, ...a } = t;
|
|
875
|
+
this.table = e, this.row = new Vs(this, s), this.componentProps = a;
|
|
874
876
|
}
|
|
875
|
-
},
|
|
877
|
+
}, Bs = class {
|
|
876
878
|
constructor(e, t = {}) {
|
|
877
879
|
r(this, "list");
|
|
878
880
|
r(this, "header");
|
|
879
881
|
r(this, "body");
|
|
880
882
|
r(this, "componentProps");
|
|
881
|
-
const { header: s, body:
|
|
882
|
-
this.list = e, this.header = new
|
|
883
|
+
const { header: s, body: a, ...o } = t;
|
|
884
|
+
this.list = e, this.header = new Ps(this, s), this.body = new ks(this, a), this.componentProps = o;
|
|
883
885
|
}
|
|
884
886
|
};
|
|
885
887
|
var y;
|
|
886
|
-
let
|
|
888
|
+
let Ms = (y = class {
|
|
887
889
|
constructor(e) {
|
|
888
890
|
r(this, "filters");
|
|
889
891
|
r(this, "itemView");
|
|
@@ -908,35 +910,35 @@ let Bs = (y = class {
|
|
|
908
910
|
const {
|
|
909
911
|
settingStorageKey: t,
|
|
910
912
|
itemView: s,
|
|
911
|
-
table:
|
|
913
|
+
table: a,
|
|
912
914
|
filters: o = [],
|
|
913
|
-
sorting:
|
|
915
|
+
sorting: c = [],
|
|
914
916
|
batchesController: d,
|
|
915
|
-
onChange:
|
|
917
|
+
onChange: l,
|
|
916
918
|
loader: u,
|
|
917
919
|
search: m,
|
|
918
920
|
onAction: E,
|
|
919
|
-
getItemId:
|
|
920
|
-
defaultViewMode:
|
|
921
|
-
accordion:
|
|
921
|
+
getItemId: C,
|
|
922
|
+
defaultViewMode: L,
|
|
923
|
+
accordion: P = !1,
|
|
922
924
|
...g
|
|
923
925
|
} = e;
|
|
924
|
-
this.settingsStore =
|
|
926
|
+
this.settingsStore = Vt(), this.settingStorageKey = t, this.filterSettingsStorageKey = t ? `${t}.activeFilters` : void 0, this.viewModeStorageKey = t ? `${t}.viewMode` : void 0, this.supportsSettingsStorage = !!this.settingStorageKey, this.items = new vs(this), this.filters = o.map((h) => new R(this, h)), this.sorting = c.map((h) => new Is(this, h)), this.search = m ? new Cs(this, m) : void 0, this.itemView = s ? new Q(this, s) : void 0, this.accordion = P, this.table = a ? new Bs(this, a) : void 0, this.batches = new ys(this, d), this.componentProps = g, this.loader = ne.useNew(this, u), this.onAction = E, this.getItemId = C, this.reactTable = ie.useNew(this, l, {
|
|
925
927
|
manualFiltering: this.loader.manualFiltering,
|
|
926
928
|
manualPagination: this.loader.manualPagination,
|
|
927
929
|
manualSorting: this.loader.manualSorting
|
|
928
930
|
});
|
|
929
|
-
const [
|
|
930
|
-
|
|
931
|
+
const [A, q] = O(
|
|
932
|
+
L ?? this.getStoredViewModeDefaultSetting() ?? "list"
|
|
931
933
|
);
|
|
932
|
-
this.viewMode =
|
|
933
|
-
|
|
934
|
+
this.viewMode = A, this.setViewMode = (h) => {
|
|
935
|
+
q(h), this.settingsStore && this.viewModeStorageKey && this.settingsStore.set(
|
|
934
936
|
"List",
|
|
935
937
|
this.viewModeStorageKey,
|
|
936
938
|
y.viewModeSettingsStorageSchema,
|
|
937
939
|
h
|
|
938
940
|
);
|
|
939
|
-
},
|
|
941
|
+
}, M(() => {
|
|
940
942
|
this.filters.forEach((h) => h.deleteUnknownFilterValues());
|
|
941
943
|
}, [this.filters]);
|
|
942
944
|
}
|
|
@@ -960,7 +962,7 @@ let Bs = (y = class {
|
|
|
960
962
|
this.settingsStore.set(
|
|
961
963
|
"List",
|
|
962
964
|
this.filterSettingsStorageKey,
|
|
963
|
-
|
|
965
|
+
R.settingsStorageSchema,
|
|
964
966
|
e
|
|
965
967
|
);
|
|
966
968
|
}
|
|
@@ -970,7 +972,7 @@ let Bs = (y = class {
|
|
|
970
972
|
return this.settingsStore.get(
|
|
971
973
|
"List",
|
|
972
974
|
this.filterSettingsStorageKey,
|
|
973
|
-
|
|
975
|
+
R.settingsStorageSchema
|
|
974
976
|
);
|
|
975
977
|
}
|
|
976
978
|
getStoredViewModeDefaultSetting() {
|
|
@@ -983,7 +985,7 @@ let Bs = (y = class {
|
|
|
983
985
|
}
|
|
984
986
|
getSorting(e) {
|
|
985
987
|
const t = this.sorting.find((s) => s.id === e);
|
|
986
|
-
return
|
|
988
|
+
return Ce(!!t, `Could not get Sorting (ID: ${e})`), t;
|
|
987
989
|
}
|
|
988
990
|
clearSorting() {
|
|
989
991
|
return this.sorting.forEach((e) => e.clear());
|
|
@@ -997,17 +999,17 @@ let Bs = (y = class {
|
|
|
997
999
|
useIsEmpty() {
|
|
998
1000
|
return !this.loader.useIsLoading() && this.items.entries.length === 0;
|
|
999
1001
|
}
|
|
1000
|
-
}, r(y, "viewModeSettingsStorageSchema",
|
|
1001
|
-
const
|
|
1002
|
-
items:
|
|
1003
|
-
isLoading:
|
|
1004
|
-
},
|
|
1005
|
-
item:
|
|
1006
|
-
isSelected:
|
|
1007
|
-
hasAction:
|
|
1008
|
-
},
|
|
1009
|
-
const { isExpanded: e, toggle: t, children: s, contentElementId:
|
|
1010
|
-
return /* @__PURE__ */
|
|
1002
|
+
}, r(y, "viewModeSettingsStorageSchema", D.enum(["list", "table"]).optional()), y);
|
|
1003
|
+
const xs = "flow--list--items", Ds = "flow--list--items--is-loading", ye = {
|
|
1004
|
+
items: xs,
|
|
1005
|
+
isLoading: Ds
|
|
1006
|
+
}, Ns = "flow--list--items--item", Rs = "flow--list--items--item--is-selected", $s = "flow--list--items--item--has-action", $ = {
|
|
1007
|
+
item: Ns,
|
|
1008
|
+
isSelected: Rs,
|
|
1009
|
+
hasAction: $s
|
|
1010
|
+
}, Ne = () => /* @__PURE__ */ i.createElement(Me, null, /* @__PURE__ */ i.createElement(te, null, /* @__PURE__ */ i.createElement(U, { width: "200px" })), /* @__PURE__ */ i.createElement(T, null, /* @__PURE__ */ i.createElement(U, { width: "300px" }))), zs = (n) => {
|
|
1011
|
+
const { isExpanded: e, toggle: t, children: s, contentElementId: a } = n, o = I(S);
|
|
1012
|
+
return /* @__PURE__ */ i.createElement(i.Fragment, null, /* @__PURE__ */ i.createElement(
|
|
1011
1013
|
w,
|
|
1012
1014
|
{
|
|
1013
1015
|
variant: "plain",
|
|
@@ -1016,20 +1018,20 @@ const Ms = "flow--list--items", xs = "flow--list--items--is-loading", ve = {
|
|
|
1016
1018
|
"aria-label": o.format(
|
|
1017
1019
|
"list.toggleExpandButton." + (e ? "collapse" : "expand")
|
|
1018
1020
|
),
|
|
1019
|
-
"aria-controls":
|
|
1021
|
+
"aria-controls": a,
|
|
1020
1022
|
"aria-expanded": e
|
|
1021
1023
|
},
|
|
1022
|
-
e ? /* @__PURE__ */
|
|
1024
|
+
e ? /* @__PURE__ */ i.createElement(Bt, null) : /* @__PURE__ */ i.createElement(kt, null)
|
|
1023
1025
|
), e && s);
|
|
1024
|
-
},
|
|
1025
|
-
var
|
|
1026
|
-
const { data: e, children: t } = n, s = f(),
|
|
1027
|
-
((
|
|
1028
|
-
),
|
|
1029
|
-
if (
|
|
1030
|
-
var g,
|
|
1031
|
-
m && ((g = u.current) == null || g.setAttribute("aria-expanded", String(
|
|
1032
|
-
}, [
|
|
1026
|
+
}, Us = (n) => {
|
|
1027
|
+
var P;
|
|
1028
|
+
const { data: e, children: t } = n, s = f(), a = s.itemView, o = s.onAction, [c, d] = O(
|
|
1029
|
+
((P = a == null ? void 0 : a.defaultExpanded) == null ? void 0 : P.call(a, e)) ?? !1
|
|
1030
|
+
), l = tt(), u = Ee(null), m = s.accordion, E = t ?? (a == null ? void 0 : a.render(e));
|
|
1031
|
+
if (M(() => {
|
|
1032
|
+
var g, A;
|
|
1033
|
+
m && ((g = u.current) == null || g.setAttribute("aria-expanded", String(c)), (A = u.current) == null || A.setAttribute("aria-controls", l));
|
|
1034
|
+
}, [c, l, u.current, m]), !m)
|
|
1033
1035
|
return {
|
|
1034
1036
|
gridItemProps: {
|
|
1035
1037
|
onAction: o ? () => {
|
|
@@ -1038,18 +1040,18 @@ const Ms = "flow--list--items", xs = "flow--list--items--is-loading", ve = {
|
|
|
1038
1040
|
},
|
|
1039
1041
|
children: E
|
|
1040
1042
|
};
|
|
1041
|
-
const
|
|
1043
|
+
const C = () => {
|
|
1042
1044
|
d((g) => !g), o == null || o(e);
|
|
1043
|
-
},
|
|
1045
|
+
}, L = {
|
|
1044
1046
|
Content: {
|
|
1045
|
-
id:
|
|
1046
|
-
wrapWith:
|
|
1047
|
-
(g) => g.slot === "bottom" ? /* @__PURE__ */
|
|
1048
|
-
|
|
1047
|
+
id: Y((g) => g.slot === "bottom" ? l : void 0),
|
|
1048
|
+
wrapWith: Y(
|
|
1049
|
+
(g) => g.slot === "bottom" ? /* @__PURE__ */ i.createElement(
|
|
1050
|
+
zs,
|
|
1049
1051
|
{
|
|
1050
|
-
contentElementId:
|
|
1051
|
-
toggle:
|
|
1052
|
-
isExpanded:
|
|
1052
|
+
contentElementId: l,
|
|
1053
|
+
toggle: C,
|
|
1054
|
+
isExpanded: c
|
|
1053
1055
|
}
|
|
1054
1056
|
) : void 0
|
|
1055
1057
|
)
|
|
@@ -1058,76 +1060,76 @@ const Ms = "flow--list--items", xs = "flow--list--items--is-loading", ve = {
|
|
|
1058
1060
|
return {
|
|
1059
1061
|
gridItemProps: {
|
|
1060
1062
|
ref: u,
|
|
1061
|
-
onAction:
|
|
1063
|
+
onAction: C
|
|
1062
1064
|
},
|
|
1063
|
-
children: /* @__PURE__ */
|
|
1064
|
-
|
|
1065
|
+
children: /* @__PURE__ */ i.createElement(
|
|
1066
|
+
Z,
|
|
1065
1067
|
{
|
|
1066
|
-
props:
|
|
1067
|
-
dependencies: [
|
|
1068
|
+
props: L,
|
|
1069
|
+
dependencies: [l, c]
|
|
1068
1070
|
},
|
|
1069
1071
|
E
|
|
1070
1072
|
)
|
|
1071
1073
|
};
|
|
1072
|
-
},
|
|
1073
|
-
const { id: e, data: t } = n,
|
|
1074
|
-
if (!
|
|
1074
|
+
}, Ks = (n) => {
|
|
1075
|
+
const { id: e, data: t } = n, a = f().itemView, { gridItemProps: o, children: c } = Us(n);
|
|
1076
|
+
if (!a)
|
|
1075
1077
|
return null;
|
|
1076
|
-
const d =
|
|
1077
|
-
return /* @__PURE__ */
|
|
1078
|
-
|
|
1078
|
+
const d = a.textValue ? a.textValue(t) : void 0, l = a.href ? a.href(t) : void 0, u = !!o.onAction || !!l;
|
|
1079
|
+
return /* @__PURE__ */ i.createElement(
|
|
1080
|
+
se.GridListItem,
|
|
1079
1081
|
{
|
|
1080
1082
|
id: e,
|
|
1081
|
-
className: (m) =>
|
|
1082
|
-
|
|
1083
|
-
u &&
|
|
1084
|
-
m.isSelected &&
|
|
1083
|
+
className: (m) => k(
|
|
1084
|
+
$.item,
|
|
1085
|
+
u && $.hasAction,
|
|
1086
|
+
m.isSelected && $.isSelected
|
|
1085
1087
|
),
|
|
1086
1088
|
textValue: d,
|
|
1087
|
-
href:
|
|
1089
|
+
href: l,
|
|
1088
1090
|
...o
|
|
1089
1091
|
},
|
|
1090
|
-
/* @__PURE__ */
|
|
1092
|
+
/* @__PURE__ */ i.createElement(st, { fallback: /* @__PURE__ */ i.createElement(Ne, null) }, c)
|
|
1091
1093
|
);
|
|
1092
|
-
},
|
|
1093
|
-
const n =
|
|
1094
|
-
return /* @__PURE__ */
|
|
1095
|
-
}, Os = () => {
|
|
1096
|
-
var t;
|
|
1097
|
-
const e = ((t = f().itemView) == null ? void 0 : t.fallback) ?? /* @__PURE__ */ a.createElement(De, null);
|
|
1098
|
-
return Array.from(Array(5)).map((s, i) => /* @__PURE__ */ a.createElement(Ks, { key: i }, st(e)));
|
|
1094
|
+
}, Os = (n) => /* @__PURE__ */ i.createElement(se.GridListItem, { textValue: "-", className: $.item }, n.children), X = () => {
|
|
1095
|
+
const n = I(S);
|
|
1096
|
+
return /* @__PURE__ */ i.createElement(Mt, null, /* @__PURE__ */ i.createElement(xt, null), /* @__PURE__ */ i.createElement(te, null, n.format("list.noResult.heading")), /* @__PURE__ */ i.createElement(T, null, n.format("list.noResult.text")));
|
|
1099
1097
|
}, Hs = () => {
|
|
1098
|
+
var t;
|
|
1099
|
+
const e = ((t = f().itemView) == null ? void 0 : t.fallback) ?? /* @__PURE__ */ i.createElement(Ne, null);
|
|
1100
|
+
return Array.from(Array(5)).map((s, a) => /* @__PURE__ */ i.createElement(Os, { key: a }, it(e)));
|
|
1101
|
+
}, qs = () => {
|
|
1100
1102
|
const n = f(), e = n.loader.useIsLoading(), t = n.loader.useIsInitiallyLoading();
|
|
1101
1103
|
if (!n.itemView)
|
|
1102
1104
|
return null;
|
|
1103
|
-
const s = n.items.entries.map((o) => /* @__PURE__ */
|
|
1104
|
-
return /* @__PURE__ */
|
|
1105
|
-
|
|
1105
|
+
const s = n.items.entries.map((o) => /* @__PURE__ */ i.createElement(Ks, { key: o.id, data: o.data, id: o.id })), a = k(ye.items, e && ye.isLoading);
|
|
1106
|
+
return /* @__PURE__ */ i.createElement("div", { "aria-hidden": t, "aria-busy": e }, /* @__PURE__ */ i.createElement(
|
|
1107
|
+
se.GridList,
|
|
1106
1108
|
{
|
|
1107
|
-
className:
|
|
1109
|
+
className: a,
|
|
1108
1110
|
...n.componentProps,
|
|
1109
|
-
renderEmptyState: () => /* @__PURE__ */
|
|
1111
|
+
renderEmptyState: () => /* @__PURE__ */ i.createElement(X, null)
|
|
1110
1112
|
},
|
|
1111
|
-
t ? /* @__PURE__ */
|
|
1113
|
+
t ? /* @__PURE__ */ i.createElement(Hs, null) : s
|
|
1112
1114
|
));
|
|
1113
|
-
},
|
|
1114
|
-
footer:
|
|
1115
|
-
},
|
|
1116
|
-
const e =
|
|
1115
|
+
}, Re = (n) => null, Gs = () => Re, $e = (n) => null, Ws = () => $e, ze = (n) => null, js = () => ze, Ue = (n) => null, Js = () => Ue, Ke = (n) => null, Ys = () => Ke, Qs = "flow--list--footer", Xs = {
|
|
1116
|
+
footer: Qs
|
|
1117
|
+
}, Zs = (n) => {
|
|
1118
|
+
const e = I(S), t = f(), s = t.batches, a = t.loader.useIsInitiallyLoading(), o = t.useIsEmpty(), c = s.getTotalItemsCount(), d = s.getVisibleItemsCount();
|
|
1117
1119
|
if (o)
|
|
1118
1120
|
return null;
|
|
1119
|
-
const
|
|
1121
|
+
const l = a ? /* @__PURE__ */ i.createElement($t, { width: "200px" }) : e.format("list.paginationInfo", {
|
|
1120
1122
|
visibleItemsCount: d,
|
|
1121
|
-
totalItemsCount:
|
|
1123
|
+
totalItemsCount: c
|
|
1122
1124
|
});
|
|
1123
|
-
return /* @__PURE__ */
|
|
1124
|
-
},
|
|
1125
|
-
const e =
|
|
1126
|
-
return !t.batches.hasNextBatch() && !s ? null : /* @__PURE__ */
|
|
1125
|
+
return /* @__PURE__ */ i.createElement(T, { ...n }, l);
|
|
1126
|
+
}, _s = (n) => {
|
|
1127
|
+
const e = I(S), t = f(), s = t.loader.useIsLoading(), a = t.loader.useIsInitiallyLoading();
|
|
1128
|
+
return !t.batches.hasNextBatch() && !s ? null : /* @__PURE__ */ i.createElement(
|
|
1127
1129
|
w,
|
|
1128
1130
|
{
|
|
1129
|
-
isPending: s && !
|
|
1130
|
-
isDisabled:
|
|
1131
|
+
isPending: s && !a,
|
|
1132
|
+
isDisabled: a,
|
|
1131
1133
|
...n,
|
|
1132
1134
|
onPress: () => t.batches.nextBatch(),
|
|
1133
1135
|
variant: "plain",
|
|
@@ -1135,96 +1137,96 @@ const Ms = "flow--list--items", xs = "flow--list--items--is-loading", ve = {
|
|
|
1135
1137
|
},
|
|
1136
1138
|
e.format("list.showMore")
|
|
1137
1139
|
);
|
|
1138
|
-
},
|
|
1139
|
-
function
|
|
1140
|
+
}, ei = () => /* @__PURE__ */ i.createElement("div", { className: Xs.footer }, /* @__PURE__ */ i.createElement(Zs, null), /* @__PURE__ */ i.createElement(_s, null));
|
|
1141
|
+
function Oe(n) {
|
|
1140
1142
|
return null;
|
|
1141
1143
|
}
|
|
1142
|
-
const
|
|
1143
|
-
table:
|
|
1144
|
-
isLoading:
|
|
1145
|
-
row:
|
|
1146
|
-
isSelected:
|
|
1147
|
-
hasAction:
|
|
1148
|
-
},
|
|
1149
|
-
const n = f(), e = n.table, t = n.useIsEmpty(), s = n.loader.useIsLoading(),
|
|
1144
|
+
const ti = () => Oe, He = (n) => null, qe = (n) => null, Ge = (n) => null, si = (n) => /* @__PURE__ */ i.createElement(Le, { ...n }, /* @__PURE__ */ i.createElement(Pe, null, /* @__PURE__ */ i.createElement(Ae, null, /* @__PURE__ */ i.createElement(U, { width: "100%" }))), /* @__PURE__ */ i.createElement(Ve, null, Array.from(Array(5)).map((e, t) => /* @__PURE__ */ i.createElement(ke, { key: t }, /* @__PURE__ */ i.createElement(Be, null, /* @__PURE__ */ i.createElement(U, { width: "100%" })))))), ii = "flow--list--table", ai = "flow--list--table--is-loading", ni = "flow--list--table--row", ri = "flow--list--table--is-selected", oi = "flow--list--table--has-action", B = {
|
|
1145
|
+
table: ii,
|
|
1146
|
+
isLoading: ai,
|
|
1147
|
+
row: ni,
|
|
1148
|
+
isSelected: ri,
|
|
1149
|
+
hasAction: oi
|
|
1150
|
+
}, li = () => {
|
|
1151
|
+
const n = f(), e = n.table, t = n.useIsEmpty(), s = n.loader.useIsLoading(), a = n.loader.useIsInitiallyLoading();
|
|
1150
1152
|
if (!e)
|
|
1151
1153
|
return null;
|
|
1152
|
-
if (
|
|
1153
|
-
return /* @__PURE__ */
|
|
1154
|
+
if (a)
|
|
1155
|
+
return /* @__PURE__ */ i.createElement(si, { ...e.componentProps });
|
|
1154
1156
|
if (t)
|
|
1155
|
-
return /* @__PURE__ */
|
|
1156
|
-
const o = e.list.onAction,
|
|
1157
|
-
|
|
1158
|
-
s &&
|
|
1157
|
+
return /* @__PURE__ */ i.createElement(X, null);
|
|
1158
|
+
const o = e.list.onAction, c = k(
|
|
1159
|
+
B.table,
|
|
1160
|
+
s && B.isLoading,
|
|
1159
1161
|
e.componentProps.className
|
|
1160
1162
|
);
|
|
1161
|
-
return /* @__PURE__ */
|
|
1162
|
-
|
|
1163
|
+
return /* @__PURE__ */ i.createElement(
|
|
1164
|
+
Le,
|
|
1163
1165
|
{
|
|
1164
1166
|
...n.componentProps,
|
|
1165
1167
|
...e.componentProps,
|
|
1166
|
-
className:
|
|
1168
|
+
className: c
|
|
1167
1169
|
},
|
|
1168
|
-
/* @__PURE__ */
|
|
1169
|
-
/* @__PURE__ */
|
|
1170
|
-
|
|
1170
|
+
/* @__PURE__ */ i.createElement(Pe, { ...e.header.componentProps }, e.header.columns.map((d, l) => /* @__PURE__ */ i.createElement(Ae, { key: l, ...d.componentProps }))),
|
|
1171
|
+
/* @__PURE__ */ i.createElement(
|
|
1172
|
+
Ve,
|
|
1171
1173
|
{
|
|
1172
1174
|
...e.body.componentProps,
|
|
1173
|
-
renderEmptyState: () => /* @__PURE__ */
|
|
1175
|
+
renderEmptyState: () => /* @__PURE__ */ i.createElement(X, null)
|
|
1174
1176
|
},
|
|
1175
1177
|
n.items.entries.map((d) => {
|
|
1176
|
-
var
|
|
1177
|
-
return /* @__PURE__ */
|
|
1178
|
-
|
|
1178
|
+
var l;
|
|
1179
|
+
return /* @__PURE__ */ i.createElement(
|
|
1180
|
+
ke,
|
|
1179
1181
|
{
|
|
1180
|
-
className: (u) =>
|
|
1181
|
-
|
|
1182
|
-
o &&
|
|
1182
|
+
className: (u) => k(
|
|
1183
|
+
B.row,
|
|
1184
|
+
o && B.hasAction,
|
|
1183
1185
|
e.body.row.componentProps.className,
|
|
1184
|
-
u.isSelected &&
|
|
1186
|
+
u.isSelected && B.isSelected
|
|
1185
1187
|
),
|
|
1186
1188
|
key: d.id,
|
|
1187
1189
|
id: d.id,
|
|
1188
1190
|
onAction: o ? () => o(d.data) : void 0,
|
|
1189
1191
|
...e.body.row.componentProps
|
|
1190
1192
|
},
|
|
1191
|
-
(
|
|
1193
|
+
(l = e.body.row) == null ? void 0 : l.cells.map((u, m) => /* @__PURE__ */ i.createElement(Be, { key: m, ...u.componentProps }, u.renderFn ? u.renderFn(d.data, n) : void 0))
|
|
1192
1194
|
);
|
|
1193
1195
|
})
|
|
1194
1196
|
)
|
|
1195
1197
|
);
|
|
1196
|
-
},
|
|
1197
|
-
var
|
|
1198
|
-
const { children: e, batchSize: t, onChange: s, refProp:
|
|
1198
|
+
}, We = (n) => null, je = (n) => null, Je = (n) => null, ci = Ie("List", (n) => {
|
|
1199
|
+
var re, oe, le, ce, de, ue, me, he, ge;
|
|
1200
|
+
const { children: e, batchSize: t, onChange: s, refProp: a, ...o } = n, c = (re = v(
|
|
1199
1201
|
e,
|
|
1200
|
-
|
|
1201
|
-
)) == null ? void 0 :
|
|
1202
|
+
Re
|
|
1203
|
+
)) == null ? void 0 : re.props, d = (oe = v(
|
|
1202
1204
|
e,
|
|
1203
|
-
|
|
1204
|
-
)) == null ? void 0 :
|
|
1205
|
-
source:
|
|
1206
|
-
...
|
|
1207
|
-
asyncLoader:
|
|
1205
|
+
Nt
|
|
1206
|
+
)) == null ? void 0 : oe.props, l = (le = v(e, Ke)) == null ? void 0 : le.props, u = {
|
|
1207
|
+
source: c ? {
|
|
1208
|
+
...c,
|
|
1209
|
+
asyncLoader: c.children
|
|
1208
1210
|
} : d ? {
|
|
1209
1211
|
...d,
|
|
1210
1212
|
asyncResourceFactory: d.children
|
|
1211
|
-
} :
|
|
1212
|
-
staticData:
|
|
1213
|
+
} : l ? {
|
|
1214
|
+
staticData: l.data
|
|
1213
1215
|
} : void 0
|
|
1214
|
-
}, m = (
|
|
1216
|
+
}, m = (ce = v(e, Oe)) == null ? void 0 : ce.props, E = (de = v(e, Ue)) == null ? void 0 : de.props, C = (ue = v(e, We)) == null ? void 0 : ue.props, L = x(e, He).map(
|
|
1215
1217
|
(b) => ({
|
|
1216
1218
|
...b.props,
|
|
1217
1219
|
name: b.props.children
|
|
1218
1220
|
})
|
|
1219
|
-
),
|
|
1221
|
+
), P = x(e, Ge).map(
|
|
1220
1222
|
(b) => ({
|
|
1221
1223
|
...b.props,
|
|
1222
1224
|
renderFn: b.props.children
|
|
1223
1225
|
})
|
|
1224
|
-
), g = (
|
|
1226
|
+
), g = (me = v(e, qe)) == null ? void 0 : me.props, A = (he = v(e, je)) == null ? void 0 : he.props, q = (ge = v(e, Je)) == null ? void 0 : ge.props, h = Ms.useNew({
|
|
1225
1227
|
onChange: s,
|
|
1226
1228
|
loader: u,
|
|
1227
|
-
filters:
|
|
1229
|
+
filters: x(e, $e).map(
|
|
1228
1230
|
(b) => ({
|
|
1229
1231
|
...b.props,
|
|
1230
1232
|
renderItem: b.props.children
|
|
@@ -1235,81 +1237,81 @@ const ea = () => Ke, Oe = (n) => null, He = (n) => null, qe = (n) => null, ta =
|
|
|
1235
1237
|
textFieldProps: m,
|
|
1236
1238
|
defaultValue: m.defaultValue
|
|
1237
1239
|
} : void 0,
|
|
1238
|
-
sorting:
|
|
1240
|
+
sorting: x(e, ze).map((b) => b.props),
|
|
1239
1241
|
itemView: E ? {
|
|
1240
1242
|
...E,
|
|
1241
1243
|
renderFn: E.children
|
|
1242
1244
|
} : void 0,
|
|
1243
|
-
table:
|
|
1245
|
+
table: L.length > 0 ? {
|
|
1244
1246
|
header: {
|
|
1245
|
-
...
|
|
1246
|
-
columns:
|
|
1247
|
+
...A,
|
|
1248
|
+
columns: L
|
|
1247
1249
|
},
|
|
1248
1250
|
body: {
|
|
1249
|
-
...
|
|
1251
|
+
...q,
|
|
1250
1252
|
row: {
|
|
1251
1253
|
...g,
|
|
1252
|
-
cells:
|
|
1254
|
+
cells: P
|
|
1253
1255
|
}
|
|
1254
1256
|
},
|
|
1255
|
-
...
|
|
1257
|
+
...C
|
|
1256
1258
|
} : void 0,
|
|
1257
1259
|
batchesController: {
|
|
1258
1260
|
batchSize: t
|
|
1259
1261
|
},
|
|
1260
1262
|
...o
|
|
1261
|
-
}),
|
|
1263
|
+
}), Ye = {
|
|
1262
1264
|
ActionGroup: {
|
|
1263
|
-
className:
|
|
1265
|
+
className: V.actions,
|
|
1264
1266
|
tunnelId: "actions",
|
|
1265
1267
|
ignoreBreakpoint: !0
|
|
1266
1268
|
},
|
|
1267
1269
|
ListSummary: {
|
|
1268
1270
|
tunnelId: "listSummary"
|
|
1269
1271
|
}
|
|
1270
|
-
},
|
|
1271
|
-
return /* @__PURE__ */
|
|
1272
|
-
|
|
1272
|
+
}, Qe = Dt(e, zt);
|
|
1273
|
+
return /* @__PURE__ */ i.createElement(Z, { props: Ye }, /* @__PURE__ */ i.createElement(Fe, null, /* @__PURE__ */ i.createElement(
|
|
1274
|
+
xe.Provider,
|
|
1273
1275
|
{
|
|
1274
1276
|
value: {
|
|
1275
1277
|
list: h
|
|
1276
1278
|
}
|
|
1277
1279
|
},
|
|
1278
|
-
/* @__PURE__ */
|
|
1279
|
-
/* @__PURE__ */
|
|
1280
|
+
/* @__PURE__ */ i.createElement(Zt, null),
|
|
1281
|
+
/* @__PURE__ */ i.createElement("div", { className: Ss.list, ref: a }, e, /* @__PURE__ */ i.createElement(ps, { hasActionGroup: Qe }), /* @__PURE__ */ i.createElement("div", null, h.items.entries.length > 0 && /* @__PURE__ */ i.createElement(z, { id: "listSummary" }), h.viewMode === "list" && /* @__PURE__ */ i.createElement(qs, null), h.viewMode === "table" && /* @__PURE__ */ i.createElement(li, null)), /* @__PURE__ */ i.createElement(ei, null))
|
|
1280
1282
|
)));
|
|
1281
|
-
}),
|
|
1282
|
-
List:
|
|
1283
|
-
Filter:
|
|
1284
|
-
Search:
|
|
1283
|
+
}), di = () => ci, ma = () => ({
|
|
1284
|
+
List: di(),
|
|
1285
|
+
Filter: Ws(),
|
|
1286
|
+
Search: ti(),
|
|
1285
1287
|
Sorting: js(),
|
|
1286
|
-
Item:
|
|
1287
|
-
ItemView:
|
|
1288
|
+
Item: Js(),
|
|
1289
|
+
ItemView: Me,
|
|
1288
1290
|
TableHeader: je,
|
|
1289
|
-
TableColumn:
|
|
1290
|
-
TableBody:
|
|
1291
|
-
TableRow:
|
|
1292
|
-
TableCell:
|
|
1293
|
-
Table:
|
|
1294
|
-
StaticData:
|
|
1295
|
-
LoaderAsync:
|
|
1296
|
-
LoaderAsyncResource:
|
|
1291
|
+
TableColumn: He,
|
|
1292
|
+
TableBody: Je,
|
|
1293
|
+
TableRow: qe,
|
|
1294
|
+
TableCell: Ge,
|
|
1295
|
+
Table: We,
|
|
1296
|
+
StaticData: Ys(),
|
|
1297
|
+
LoaderAsync: Gs(),
|
|
1298
|
+
LoaderAsyncResource: Rt()
|
|
1297
1299
|
});
|
|
1298
1300
|
export {
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1301
|
+
ci as List,
|
|
1302
|
+
$e as ListFilter,
|
|
1303
|
+
Ue as ListItem,
|
|
1304
|
+
Me as ListItemView,
|
|
1305
|
+
Re as ListLoaderAsync,
|
|
1306
|
+
ze as ListSorting,
|
|
1307
|
+
Ke as ListStaticData,
|
|
1308
|
+
na as ListSummary,
|
|
1309
|
+
di as TypedList,
|
|
1310
|
+
Ws as TypedListFilter,
|
|
1311
|
+
Js as TypedListItem,
|
|
1312
|
+
Gs as TypedListLoaderAsync,
|
|
1311
1313
|
js as TypedListSorting,
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
+
Ys as TypedListStaticData,
|
|
1315
|
+
ma as typedList,
|
|
1314
1316
|
f as useList
|
|
1315
1317
|
};
|