@mittwald/flow-react-components 0.1.0-alpha.250 → 0.1.0-alpha.252
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/ActionGroup.js +25 -21
- package/dist/IconView-B0kOF1Eh.js +12 -0
- package/dist/Icons.js +108 -108
- package/dist/List.js +293 -284
- package/dist/Modal.js +14 -13
- package/dist/styles.css +1 -1
- package/dist/types/components/ActionGroup/ActionGroup.d.ts +1 -0
- package/dist/types/components/List/components/Header/components/ViewModeMenu/ViewModeMenu.d.ts +2 -0
- package/dist/types/components/List/index.d.ts +1 -0
- package/dist/types/components/List/model/List.d.ts +3 -3
- package/dist/types/components/List/model/loading/types.d.ts +1 -1
- package/dist/types/components/List/typedList.d.ts +2 -2
- package/package.json +4 -4
- package/dist/IconSettings-De6OINaO.js +0 -10
- package/dist/types/components/List/components/Header/components/SettingsMenu/SettingsMenu.d.ts +0 -2
package/dist/List.js
CHANGED
|
@@ -1,63 +1,62 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
/* */
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var r = (a, t, e) =>
|
|
6
|
-
import i, { createContext as
|
|
3
|
+
var Gt = Object.defineProperty;
|
|
4
|
+
var jt = (a, t, e) => t in a ? Gt(a, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[t] = e;
|
|
5
|
+
var r = (a, t, e) => jt(a, typeof t != "symbol" ? t + "" : t, e);
|
|
6
|
+
import i, { createContext as _t, useContext as Wt, createElement as ft, useState as G, useEffect as k, useRef as Jt, Suspense as Yt, cloneElement as Qt } from "react";
|
|
7
7
|
import "./propsContext-DzAKlmhS.js";
|
|
8
|
-
import { P as
|
|
8
|
+
import { P as bt } from "./PropsContextProvider-C6Z4XGp6.js";
|
|
9
9
|
import "@react-aria/utils";
|
|
10
|
-
import { isShallowEqual as
|
|
11
|
-
import { d as
|
|
10
|
+
import { isShallowEqual as Xt, unique as Zt, difference as te, times as ee } from "remeda";
|
|
11
|
+
import { d as se } from "./dynamic-ClpUSmEt.js";
|
|
12
12
|
import { B as S } from "./Button-BepCRVIi.js";
|
|
13
|
-
import { IconArrowBackUp as
|
|
14
|
-
import { I as
|
|
15
|
-
import { I as
|
|
16
|
-
import { a as D, C as
|
|
17
|
-
import { M as
|
|
18
|
-
import { useLocalizedStringFormatter as
|
|
19
|
-
import { TunnelProvider as
|
|
20
|
-
import
|
|
13
|
+
import { IconArrowBackUp as ie } from "@tabler/icons-react";
|
|
14
|
+
import { I as ae } from "./Icon-cEgH3ZXQ.js";
|
|
15
|
+
import { I as ne } from "./IconContextMenu-DLHXM1Ph.js";
|
|
16
|
+
import { a as D, C as j } from "./ContextMenuTrigger-5-EjHDtY.js";
|
|
17
|
+
import { M as _ } from "./MenuItem-CFE7SA5J.js";
|
|
18
|
+
import { useLocalizedStringFormatter as w } from "react-aria";
|
|
19
|
+
import { TunnelProvider as St, TunnelExit as K } from "@mittwald/react-tunnel";
|
|
20
|
+
import F from "clsx";
|
|
21
21
|
import { g as re } from "./getContainerBreakpointSizeClassName-BrcFDcCY.js";
|
|
22
22
|
import { f as oe } from "./flowComponent-CY2oW3O9.js";
|
|
23
23
|
import { R as le } from "./Render-BdlTa7Qb.js";
|
|
24
|
-
import { T as
|
|
25
|
-
import { I as
|
|
26
|
-
import { I as
|
|
27
|
-
import {
|
|
28
|
-
import { observer as me } from "mobx-react-lite";
|
|
24
|
+
import { T as y } from "./Text-T_kNKeFe.js";
|
|
25
|
+
import { b as ce, I as de, a as ue, c as me } from "./IconView-B0kOF1Eh.js";
|
|
26
|
+
import { I as he } from "./IconClose-DVYTU3Rp.js";
|
|
27
|
+
import { observer as ge } from "mobx-react-lite";
|
|
29
28
|
import { a as lt, T as ct } from "./TooltipTrigger-TslkLN5s.js";
|
|
30
|
-
import { makeObservable as
|
|
29
|
+
import { makeObservable as pe, observable as dt, computed as ut, action as U } from "mobx";
|
|
31
30
|
import "./context-Cf7tqFtF.js";
|
|
32
|
-
import { u as
|
|
33
|
-
import { S as
|
|
34
|
-
import { H as
|
|
35
|
-
import { S as
|
|
36
|
-
import { getProperty as
|
|
37
|
-
import { hash as
|
|
31
|
+
import { u as fe } from "./useOnChange-C1Quwyuz.js";
|
|
32
|
+
import { S as be } from "./SearchField-CMvYWO_P.js";
|
|
33
|
+
import { H as W } from "./Heading-FRIQlW19.js";
|
|
34
|
+
import { S as Se } from "./Section-QApyOFfC.js";
|
|
35
|
+
import { getProperty as ve } from "dot-prop";
|
|
36
|
+
import { hash as vt } from "object-code";
|
|
38
37
|
import O from "zod";
|
|
39
|
-
import { useReactTable as
|
|
40
|
-
import
|
|
38
|
+
import { useReactTable as we, getCoreRowModel as ye, getSortedRowModel as Ee, getFilteredRowModel as Fe, getPaginationRowModel as Te, getFacetedUniqueValues as Ce } from "@tanstack/react-table";
|
|
39
|
+
import wt from "invariant";
|
|
41
40
|
import { getAsyncResource as mt } from "@mittwald/react-use-promise";
|
|
42
41
|
import { u as ht } from "./useSelector-DpU7_HMO.js";
|
|
43
|
-
import { u as
|
|
44
|
-
import * as
|
|
42
|
+
import { u as Ie } from "./SettingsProvider-D2-kWC3S.js";
|
|
43
|
+
import * as J from "react-aria-components";
|
|
45
44
|
import { S as A } from "./SkeletonText-B5ZghZhO.js";
|
|
46
|
-
import { I as
|
|
47
|
-
import { I as
|
|
48
|
-
import { d as b, a as
|
|
49
|
-
import { ListLoaderAsyncResource as
|
|
50
|
-
import { S as
|
|
51
|
-
import { T as yt, d as
|
|
52
|
-
const
|
|
53
|
-
view:
|
|
54
|
-
title:
|
|
55
|
-
topContent:
|
|
56
|
-
content:
|
|
57
|
-
action:
|
|
58
|
-
avatar:
|
|
59
|
-
text:
|
|
60
|
-
heading:
|
|
45
|
+
import { I as Le } from "./IllustratedMessage-B3MHD01M.js";
|
|
46
|
+
import { I as Pe } from "./IconSearch-a4VYepNE.js";
|
|
47
|
+
import { d as b, a as L } from "./deepFindOfType-6pG0fH7S.js";
|
|
48
|
+
import { ListLoaderAsyncResource as Ve, TypedListLoaderAsyncResource as ke } from "./List/ListLoaderAsyncResource.js";
|
|
49
|
+
import { S as Ae } from "./Skeleton-CKLaTmDR.js";
|
|
50
|
+
import { T as yt, d as Et, c as Ft, a as Tt, e as Ct, b as It } from "./TableRow-BsPgWqkU.js";
|
|
51
|
+
const Be = "flow--list--items--item--view", Me = "flow--list--items--item--view--title", De = "flow--list--items--item--view--top-content", xe = "flow--list--items--item--view--content", Ne = "flow--list--items--item--view--action", Re = "flow--list--items--item--view--avatar", $e = "flow--list--items--item--view--text", ze = "flow--list--items--item--view--heading", m = {
|
|
52
|
+
view: Be,
|
|
53
|
+
title: Me,
|
|
54
|
+
topContent: De,
|
|
55
|
+
content: xe,
|
|
56
|
+
action: Ne,
|
|
57
|
+
avatar: Re,
|
|
58
|
+
text: $e,
|
|
59
|
+
heading: ze,
|
|
61
60
|
"container-breakpoint-size-xs": "flow--list--items--item--view--container-breakpoint-size-xs",
|
|
62
61
|
"container-breakpoint-size-s": "flow--list--items--item--view--container-breakpoint-size-s",
|
|
63
62
|
"container-breakpoint-size-m": "flow--list--items--item--view--container-breakpoint-size-m",
|
|
@@ -91,8 +90,8 @@ const ke = "flow--list--items--item--view", Ae = "flow--list--items--item--view-
|
|
|
91
90
|
"list.settings.viewMode.table": "Table",
|
|
92
91
|
"list.showMore": "Show more",
|
|
93
92
|
"list.sorting": "Sorting"
|
|
94
|
-
} },
|
|
95
|
-
const { className: t, children: e } = a, s =
|
|
93
|
+
} }, Ue = (a) => {
|
|
94
|
+
const { className: t, children: e } = a, s = w(f);
|
|
96
95
|
return /* @__PURE__ */ i.createElement(D, null, /* @__PURE__ */ i.createElement(
|
|
97
96
|
S,
|
|
98
97
|
{
|
|
@@ -100,12 +99,12 @@ const ke = "flow--list--items--item--view", Ae = "flow--list--items--item--view-
|
|
|
100
99
|
className: t,
|
|
101
100
|
"aria-label": s.format("list.options")
|
|
102
101
|
},
|
|
103
|
-
/* @__PURE__ */ i.createElement(
|
|
102
|
+
/* @__PURE__ */ i.createElement(ne, null)
|
|
104
103
|
), e);
|
|
105
|
-
},
|
|
104
|
+
}, Oe = (a) => a === "top" ? m.topContent : a === "bottom" ? m.content : m.topContent, Lt = (a) => {
|
|
106
105
|
const { children: t, className: e, containerBreakpointSize: s = "m" } = a, n = {
|
|
107
106
|
ContextMenu: {
|
|
108
|
-
wrapWith: /* @__PURE__ */ i.createElement(
|
|
107
|
+
wrapWith: /* @__PURE__ */ i.createElement(Ue, { className: m.action }),
|
|
109
108
|
placement: "bottom end"
|
|
110
109
|
},
|
|
111
110
|
Button: {
|
|
@@ -116,7 +115,7 @@ const ke = "flow--list--items--item--view", Ae = "flow--list--items--item--view-
|
|
|
116
115
|
ignoreBreakpoint: !0
|
|
117
116
|
},
|
|
118
117
|
Content: {
|
|
119
|
-
className:
|
|
118
|
+
className: se((c) => Oe(c.slot)),
|
|
120
119
|
tunnelId: "topContent"
|
|
121
120
|
},
|
|
122
121
|
Avatar: {
|
|
@@ -135,25 +134,25 @@ const ke = "flow--list--items--item--view", Ae = "flow--list--items--item--view-
|
|
|
135
134
|
Link: {
|
|
136
135
|
unstyled: !0
|
|
137
136
|
}
|
|
138
|
-
}, o =
|
|
137
|
+
}, o = F(
|
|
139
138
|
m.view,
|
|
140
139
|
e,
|
|
141
140
|
m[re(s)]
|
|
142
141
|
);
|
|
143
|
-
return /* @__PURE__ */ i.createElement("div", { className: o }, /* @__PURE__ */ i.createElement(
|
|
144
|
-
},
|
|
142
|
+
return /* @__PURE__ */ i.createElement("div", { className: o }, /* @__PURE__ */ i.createElement(bt, { props: n }, /* @__PURE__ */ i.createElement(St, null, t, /* @__PURE__ */ i.createElement("div", { className: m.title }, /* @__PURE__ */ i.createElement(K, { id: "title" })), /* @__PURE__ */ i.createElement(K, { id: "topContent" }))));
|
|
143
|
+
}, Pt = _t({}), g = () => Wt(Pt).list, Ke = () => g().loader.getLoaderInvocationHooks().map((t, e) => /* @__PURE__ */ i.createElement(le, { key: e }, () => {
|
|
145
144
|
t();
|
|
146
|
-
})),
|
|
145
|
+
})), He = (a) => {
|
|
147
146
|
const { sorting: t } = a;
|
|
148
|
-
return /* @__PURE__ */ i.createElement(
|
|
147
|
+
return /* @__PURE__ */ i.createElement(_, { id: t.id }, t.name);
|
|
149
148
|
}, B = (a) => {
|
|
150
149
|
const { children: t, locales: e, variables: s } = a;
|
|
151
|
-
return
|
|
152
|
-
},
|
|
153
|
-
const a = g(), t = a.visibleSorting.map((n) => /* @__PURE__ */ i.createElement(
|
|
150
|
+
return w(e).format(t, s);
|
|
151
|
+
}, qe = () => {
|
|
152
|
+
const a = g(), t = a.visibleSorting.map((n) => /* @__PURE__ */ i.createElement(He, { sorting: n, key: n.id }));
|
|
154
153
|
if (t.length === 0)
|
|
155
154
|
return null;
|
|
156
|
-
const e = a.visibleSorting.find((n) => n.isSorted()), s = /* @__PURE__ */ i.createElement(
|
|
155
|
+
const e = a.visibleSorting.find((n) => n.isSorted()), s = /* @__PURE__ */ i.createElement(y, null, e ? /* @__PURE__ */ i.createElement(
|
|
157
156
|
B,
|
|
158
157
|
{
|
|
159
158
|
locales: f,
|
|
@@ -163,8 +162,8 @@ const ke = "flow--list--items--item--view", Ae = "flow--list--items--item--view-
|
|
|
163
162
|
},
|
|
164
163
|
"list.setSorting"
|
|
165
164
|
) : /* @__PURE__ */ i.createElement(B, { locales: f }, "list.sorting"));
|
|
166
|
-
return /* @__PURE__ */ i.createElement(D, null, /* @__PURE__ */ i.createElement(S, { variant: "soft", size: "s", color: "secondary" }, s, /* @__PURE__ */ i.createElement(
|
|
167
|
-
|
|
165
|
+
return /* @__PURE__ */ i.createElement(D, null, /* @__PURE__ */ i.createElement(S, { variant: "soft", size: "s", color: "secondary" }, s, /* @__PURE__ */ i.createElement(ce, null)), /* @__PURE__ */ i.createElement(
|
|
166
|
+
j,
|
|
168
167
|
{
|
|
169
168
|
selectionMode: "single",
|
|
170
169
|
selectedKeys: e ? [e.id] : [],
|
|
@@ -174,36 +173,38 @@ const ke = "flow--list--items--item--view", Ae = "flow--list--items--item--view-
|
|
|
174
173
|
},
|
|
175
174
|
t
|
|
176
175
|
));
|
|
177
|
-
},
|
|
178
|
-
const { filter: t } = a, { values: e, mode: s, name: n, property: o } = t, c = e.map((
|
|
179
|
-
|
|
176
|
+
}, Ge = (a) => {
|
|
177
|
+
const { filter: t } = a, { values: e, mode: s, name: n, property: o } = t, c = e.map((d) => /* @__PURE__ */ i.createElement(
|
|
178
|
+
_,
|
|
180
179
|
{
|
|
181
|
-
id:
|
|
182
|
-
key:
|
|
180
|
+
id: d.id,
|
|
181
|
+
key: d.id,
|
|
183
182
|
onAction: () => {
|
|
184
|
-
|
|
183
|
+
d.toggle();
|
|
185
184
|
}
|
|
186
185
|
},
|
|
187
|
-
|
|
188
|
-
)), l = e.filter((
|
|
189
|
-
return /* @__PURE__ */ i.createElement(D, null, /* @__PURE__ */ i.createElement(S, { variant: "soft", size: "s", color: "secondary" }, /* @__PURE__ */ i.createElement(
|
|
190
|
-
|
|
186
|
+
d.render()
|
|
187
|
+
)), l = e.filter((d) => d.isActive).map((d) => d.id);
|
|
188
|
+
return /* @__PURE__ */ i.createElement(D, null, /* @__PURE__ */ i.createElement(S, { variant: "soft", size: "s", color: "secondary" }, /* @__PURE__ */ i.createElement(y, null, n ?? o), /* @__PURE__ */ i.createElement(de, null)), /* @__PURE__ */ i.createElement(
|
|
189
|
+
j,
|
|
191
190
|
{
|
|
192
191
|
selectionMode: s === "one" ? "single" : "multiple",
|
|
193
192
|
selectedKeys: l
|
|
194
193
|
},
|
|
195
194
|
c
|
|
196
195
|
));
|
|
197
|
-
},
|
|
198
|
-
header:
|
|
199
|
-
pickerListAndSearch:
|
|
200
|
-
pickerList:
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
196
|
+
}, je = "flow--list--header", _e = "flow--list--header--picker-list-and-search", We = "flow--list--header--picker-list", Je = "flow--list--header--search-and-actions", Ye = "flow--list--header--search-field", Qe = "flow--list--header--actions", E = {
|
|
197
|
+
header: je,
|
|
198
|
+
pickerListAndSearch: _e,
|
|
199
|
+
pickerList: We,
|
|
200
|
+
searchAndActions: Je,
|
|
201
|
+
searchField: Ye,
|
|
202
|
+
actions: Qe
|
|
203
|
+
}, Xe = "flow--list--header--active-filters", Ze = "flow--list--header--active-filters--clear-button", ts = {
|
|
204
|
+
activeFilters: Xe,
|
|
205
|
+
clearButton: Ze
|
|
206
|
+
}, es = ge(() => {
|
|
207
|
+
const a = g(), t = w(f), s = a.filters.flatMap((l) => l.values).filter((l) => l.isActive).map((l) => /* @__PURE__ */ i.createElement(S, { variant: "soft", size: "s", key: l.id, onPress: () => l.deactivate() }, /* @__PURE__ */ i.createElement(y, null, l.render()), /* @__PURE__ */ i.createElement(he, null))), n = a.filters.filter((l) => l.hasChanged()).length > 0, o = a.supportsSettingsStorage && n && /* @__PURE__ */ i.createElement(lt, null, /* @__PURE__ */ i.createElement(ct, null, /* @__PURE__ */ i.createElement(B, { locales: f }, "list.filters.store")), /* @__PURE__ */ i.createElement(
|
|
207
208
|
S,
|
|
208
209
|
{
|
|
209
210
|
size: "s",
|
|
@@ -222,50 +223,52 @@ const ke = "flow--list--items--item--view", Ae = "flow--list--items--item--view-
|
|
|
222
223
|
onPress: () => a.resetFilters(),
|
|
223
224
|
"aria-label": t.format("list.filters.reset")
|
|
224
225
|
},
|
|
225
|
-
/* @__PURE__ */ i.createElement(
|
|
226
|
+
/* @__PURE__ */ i.createElement(ae, null, /* @__PURE__ */ i.createElement(ie, null))
|
|
226
227
|
)) : void 0;
|
|
227
|
-
return s.length === 0 && !o && !c ? null : /* @__PURE__ */ i.createElement("div", { className:
|
|
228
|
-
}),
|
|
229
|
-
const { className: t, onChange: e, value: s, ...n } = a, [o, c] =
|
|
230
|
-
|
|
228
|
+
return s.length === 0 && !o && !c ? null : /* @__PURE__ */ i.createElement("div", { className: ts.activeFilters }, s, o, c);
|
|
229
|
+
}), ss = (a) => {
|
|
230
|
+
const { className: t, onChange: e, value: s, ...n } = a, [o, c] = G(s ?? "");
|
|
231
|
+
fe(s, () => {
|
|
231
232
|
c(s ?? "");
|
|
232
233
|
}, [o]);
|
|
233
234
|
const l = () => {
|
|
234
235
|
e(void 0), c("");
|
|
235
|
-
},
|
|
236
|
-
|
|
236
|
+
}, d = (u) => {
|
|
237
|
+
u.key === "Enter" ? o.trim() === "" ? e(void 0) : e(o) : u.key === "Escape" && l();
|
|
237
238
|
};
|
|
238
239
|
return /* @__PURE__ */ i.createElement(
|
|
239
|
-
|
|
240
|
+
be,
|
|
240
241
|
{
|
|
241
242
|
className: t,
|
|
242
243
|
value: o,
|
|
243
|
-
onKeyUp:
|
|
244
|
-
onChange: (
|
|
244
|
+
onKeyUp: d,
|
|
245
|
+
onChange: (u) => c(u),
|
|
245
246
|
onClear: l,
|
|
246
247
|
...n
|
|
247
248
|
}
|
|
248
249
|
);
|
|
249
|
-
},
|
|
250
|
-
const { className: t, search: e } = a, s = e.render ??
|
|
250
|
+
}, is = (a) => {
|
|
251
|
+
const { className: t, search: e } = a, s = e.render ?? ss;
|
|
251
252
|
return ft(s, {
|
|
252
253
|
className: t,
|
|
253
254
|
value: e.value,
|
|
254
255
|
onChange: e.setValue.bind(e),
|
|
255
256
|
...e.textFieldProps
|
|
256
257
|
});
|
|
257
|
-
},
|
|
258
|
-
const a =
|
|
258
|
+
}, as = () => {
|
|
259
|
+
const a = w(f), t = g(), e = t.viewMode, s = [];
|
|
259
260
|
return t.itemView && s.push("list"), t.table && s.push("table"), s.length <= 1 ? null : /* @__PURE__ */ i.createElement(D, null, /* @__PURE__ */ i.createElement(
|
|
260
261
|
S,
|
|
261
262
|
{
|
|
262
|
-
variant: "
|
|
263
|
+
variant: "soft",
|
|
263
264
|
color: "secondary",
|
|
265
|
+
size: "s",
|
|
264
266
|
"aria-label": a.format("list.settings")
|
|
265
267
|
},
|
|
266
|
-
/* @__PURE__ */ i.createElement(
|
|
267
|
-
|
|
268
|
-
|
|
268
|
+
/* @__PURE__ */ i.createElement(y, null, a.format(`list.settings.viewMode.${e}`)),
|
|
269
|
+
/* @__PURE__ */ i.createElement(me, null)
|
|
270
|
+
), /* @__PURE__ */ i.createElement(j, { selectionMode: "single", selectedKeys: [e] }, /* @__PURE__ */ i.createElement(Se, null, /* @__PURE__ */ i.createElement(W, null, a.format("list.settings.viewMode")), s.map((n) => /* @__PURE__ */ i.createElement(
|
|
271
|
+
_,
|
|
269
272
|
{
|
|
270
273
|
id: n,
|
|
271
274
|
key: n,
|
|
@@ -275,16 +278,16 @@ const ke = "flow--list--items--item--view", Ae = "flow--list--items--item--view-
|
|
|
275
278
|
},
|
|
276
279
|
a.format(`list.settings.viewMode.${n}`)
|
|
277
280
|
)))));
|
|
278
|
-
},
|
|
281
|
+
}, ns = (a) => {
|
|
279
282
|
const { className: t } = a, e = g();
|
|
280
283
|
if (e.filters.length === 0 && e.visibleSorting.length === 0 && !e.search)
|
|
281
284
|
return null;
|
|
282
|
-
const s = e.filters.map((n) => /* @__PURE__ */ i.createElement(
|
|
283
|
-
return /* @__PURE__ */ i.createElement("div", { className:
|
|
284
|
-
},
|
|
285
|
-
list:
|
|
285
|
+
const s = e.filters.map((n) => /* @__PURE__ */ i.createElement(Ge, { key: n.property, filter: n }));
|
|
286
|
+
return /* @__PURE__ */ i.createElement("div", { className: F(t, E.header) }, /* @__PURE__ */ i.createElement("div", { className: E.pickerListAndSearch }, /* @__PURE__ */ i.createElement("div", { className: E.pickerList }, /* @__PURE__ */ i.createElement(as, null), /* @__PURE__ */ i.createElement(qe, null), s), /* @__PURE__ */ i.createElement("div", { className: E.searchAndActions }, e.search && /* @__PURE__ */ i.createElement(is, { className: E.searchField, search: e.search }), /* @__PURE__ */ i.createElement(K, { id: "actions" }))), /* @__PURE__ */ i.createElement(es, null));
|
|
287
|
+
}, rs = "flow--list", os = {
|
|
288
|
+
list: rs
|
|
286
289
|
};
|
|
287
|
-
let
|
|
290
|
+
let ls = class Vt {
|
|
288
291
|
constructor(t, e, s) {
|
|
289
292
|
r(this, "id");
|
|
290
293
|
r(this, "data");
|
|
@@ -292,19 +295,19 @@ let as = class Pt {
|
|
|
292
295
|
this.collection = t, this.id = e, this.data = s;
|
|
293
296
|
}
|
|
294
297
|
static fromRow(t, e) {
|
|
295
|
-
return new
|
|
298
|
+
return new Vt(t, e.id, e.original);
|
|
296
299
|
}
|
|
297
300
|
};
|
|
298
|
-
class
|
|
301
|
+
class cs {
|
|
299
302
|
constructor(t) {
|
|
300
303
|
r(this, "list");
|
|
301
304
|
this.list = t;
|
|
302
305
|
}
|
|
303
306
|
get entries() {
|
|
304
|
-
return this.list.reactTable.table.getRowModel().rows.map((t) =>
|
|
307
|
+
return this.list.reactTable.table.getRowModel().rows.map((t) => ls.fromRow(this, t));
|
|
305
308
|
}
|
|
306
309
|
}
|
|
307
|
-
class
|
|
310
|
+
class ds {
|
|
308
311
|
constructor(t, e = {}) {
|
|
309
312
|
r(this, "batchSize");
|
|
310
313
|
r(this, "list");
|
|
@@ -351,7 +354,7 @@ class rs {
|
|
|
351
354
|
}
|
|
352
355
|
}
|
|
353
356
|
}
|
|
354
|
-
const
|
|
357
|
+
const us = "$";
|
|
355
358
|
class gt {
|
|
356
359
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
357
360
|
constructor(t, e) {
|
|
@@ -360,10 +363,10 @@ class gt {
|
|
|
360
363
|
this.filter = t, this.value = e;
|
|
361
364
|
}
|
|
362
365
|
equals(t) {
|
|
363
|
-
return
|
|
366
|
+
return Xt(this.value, t.value);
|
|
364
367
|
}
|
|
365
368
|
get id() {
|
|
366
|
-
return `${this.filter.property}@@${
|
|
369
|
+
return `${this.filter.property}@@${vt(this.value)}`;
|
|
367
370
|
}
|
|
368
371
|
get isActive() {
|
|
369
372
|
return this.filter.isValueActive(this);
|
|
@@ -378,7 +381,7 @@ class gt {
|
|
|
378
381
|
this.filter.deactivateValue(this);
|
|
379
382
|
}
|
|
380
383
|
}
|
|
381
|
-
const
|
|
384
|
+
const ms = (a, t) => a === t, hs = (a) => String(a);
|
|
382
385
|
class P {
|
|
383
386
|
constructor(t, e) {
|
|
384
387
|
r(this, "_values");
|
|
@@ -392,7 +395,7 @@ class P {
|
|
|
392
395
|
r(this, "onFilterUpdateCallbacks", /* @__PURE__ */ new Set());
|
|
393
396
|
r(this, "defaultSelectedValues");
|
|
394
397
|
var s;
|
|
395
|
-
this.list = t, this.property = e.property, this.mode = e.mode ?? "one", this._values = (s = e.values) == null ? void 0 : s.map((n) => new gt(this, n)), this.matcher = e.matcher ??
|
|
398
|
+
this.list = t, this.property = e.property, this.mode = e.mode ?? "one", this._values = (s = e.values) == null ? void 0 : s.map((n) => new gt(this, n)), this.matcher = e.matcher ?? ms, this.renderItem = e.renderItem ?? hs, this.name = e.name, this.defaultSelectedValues = e.defaultSelected ? this.values.filter(
|
|
396
399
|
(n) => {
|
|
397
400
|
var o;
|
|
398
401
|
return (o = e.defaultSelected) == null ? void 0 : o.some((c) => c === n.value);
|
|
@@ -419,7 +422,7 @@ class P {
|
|
|
419
422
|
}
|
|
420
423
|
getReactTableFilterFn() {
|
|
421
424
|
return (t, e, s) => {
|
|
422
|
-
const n = this.property, o = n.startsWith(
|
|
425
|
+
const n = this.property, o = n.startsWith(us) ? t.original : ve(t.original, n);
|
|
423
426
|
return this.checkFilterMatches(o, s);
|
|
424
427
|
};
|
|
425
428
|
}
|
|
@@ -447,7 +450,7 @@ class P {
|
|
|
447
450
|
return ((t = this.getTableColumnFilter()) == null ? void 0 : t.value) ?? null;
|
|
448
451
|
}
|
|
449
452
|
getValuesFromTableState() {
|
|
450
|
-
return
|
|
453
|
+
return Zt(
|
|
451
454
|
Array.from(this.getTableColumn().getFacetedUniqueValues().keys()).flatMap((t) => t).filter((t) => t != null)
|
|
452
455
|
).map((t) => new gt(this, t));
|
|
453
456
|
}
|
|
@@ -482,7 +485,7 @@ class P {
|
|
|
482
485
|
}
|
|
483
486
|
hasChanged() {
|
|
484
487
|
const t = this.getArrayValue().map((s) => s.value), e = (this.getInitialValues() ?? []).map((s) => s.value);
|
|
485
|
-
return t.length !== e.length ||
|
|
488
|
+
return t.length !== e.length || te(t, e).length > 0;
|
|
486
489
|
}
|
|
487
490
|
getInitialValues() {
|
|
488
491
|
return this.getStoredDefaultSelectedValues() ?? this.defaultSelectedValues;
|
|
@@ -502,7 +505,7 @@ class P {
|
|
|
502
505
|
}
|
|
503
506
|
}
|
|
504
507
|
r(P, "settingsStorageSchema", O.record(O.array(O.unknown())).optional());
|
|
505
|
-
class
|
|
508
|
+
class gs {
|
|
506
509
|
constructor(t, e) {
|
|
507
510
|
r(this, "list");
|
|
508
511
|
r(this, "property");
|
|
@@ -536,7 +539,7 @@ class us {
|
|
|
536
539
|
return `${this.getTableColumn().id}:${this.direction}`;
|
|
537
540
|
}
|
|
538
541
|
}
|
|
539
|
-
class
|
|
542
|
+
class Y {
|
|
540
543
|
constructor(t, e, s = {}) {
|
|
541
544
|
r(this, "list");
|
|
542
545
|
r(this, "table");
|
|
@@ -545,13 +548,13 @@ class J {
|
|
|
545
548
|
this.list = t;
|
|
546
549
|
const n = this.list.sorting.filter(
|
|
547
550
|
(l) => l.defaultEnabled !== !1
|
|
548
|
-
), [o, c] =
|
|
551
|
+
), [o, c] = G(
|
|
549
552
|
n.map((l) => l.getReactTableColumnSort())
|
|
550
553
|
);
|
|
551
554
|
this.sortingState = o, this.updateSortingState = c, this.table = this.useReactTable(e, s);
|
|
552
555
|
}
|
|
553
556
|
static useNew(t, e, s = {}) {
|
|
554
|
-
return new
|
|
557
|
+
return new Y(t, e, s);
|
|
555
558
|
}
|
|
556
559
|
useReactTable(t, e = {}) {
|
|
557
560
|
var c;
|
|
@@ -564,7 +567,7 @@ class J {
|
|
|
564
567
|
for (const l of this.list.filters)
|
|
565
568
|
l.updateInitialState(n);
|
|
566
569
|
(c = this.list.search) == null || c.updateInitialState(n);
|
|
567
|
-
const o =
|
|
570
|
+
const o = we({
|
|
568
571
|
data: s,
|
|
569
572
|
state: {
|
|
570
573
|
sorting: this.sortingState
|
|
@@ -572,11 +575,11 @@ class J {
|
|
|
572
575
|
getRowId: this.list.getItemId,
|
|
573
576
|
initialState: n,
|
|
574
577
|
columns: this.getTableColumnDefs(),
|
|
575
|
-
getCoreRowModel:
|
|
576
|
-
getSortedRowModel:
|
|
577
|
-
getFilteredRowModel:
|
|
578
|
-
getPaginationRowModel:
|
|
579
|
-
getFacetedUniqueValues:
|
|
578
|
+
getCoreRowModel: ye(),
|
|
579
|
+
getSortedRowModel: Ee(),
|
|
580
|
+
getFilteredRowModel: Fe(),
|
|
581
|
+
getPaginationRowModel: Te(),
|
|
582
|
+
getFacetedUniqueValues: Ce(),
|
|
580
583
|
onSortingChange: (l) => {
|
|
581
584
|
this.handleSortingStateUpdate(l);
|
|
582
585
|
},
|
|
@@ -598,7 +601,7 @@ class J {
|
|
|
598
601
|
}
|
|
599
602
|
getTableColumn(t) {
|
|
600
603
|
const e = this.table.getColumn(t);
|
|
601
|
-
return
|
|
604
|
+
return wt(!!e, `Column #${t} is not defined`), e;
|
|
602
605
|
}
|
|
603
606
|
getTableColumnDefs() {
|
|
604
607
|
const t = /* @__PURE__ */ new Map(), e = (s) => {
|
|
@@ -620,26 +623,26 @@ class J {
|
|
|
620
623
|
), Array.from(t.values());
|
|
621
624
|
}
|
|
622
625
|
}
|
|
623
|
-
class
|
|
626
|
+
class Q {
|
|
624
627
|
constructor() {
|
|
625
628
|
r(this, "dataBatches", []);
|
|
626
629
|
r(this, "prevDataBatches", []);
|
|
627
630
|
r(this, "batchLoadingStates", ["void"]);
|
|
628
|
-
|
|
631
|
+
pe(this, {
|
|
629
632
|
prevDataBatches: !1,
|
|
630
633
|
useMergedData: !1,
|
|
631
634
|
useIsLoading: !1,
|
|
632
|
-
dataBatches:
|
|
633
|
-
batchLoadingStates:
|
|
634
|
-
mergedData:
|
|
635
|
-
isLoading:
|
|
635
|
+
dataBatches: dt.shallow,
|
|
636
|
+
batchLoadingStates: dt.shallow,
|
|
637
|
+
mergedData: ut,
|
|
638
|
+
isLoading: ut,
|
|
636
639
|
reset: U.bound,
|
|
637
640
|
setDataBatch: U.bound,
|
|
638
641
|
setBatchLoadingState: U.bound
|
|
639
642
|
});
|
|
640
643
|
}
|
|
641
644
|
static useNew() {
|
|
642
|
-
return
|
|
645
|
+
return Jt(new Q()).current;
|
|
643
646
|
}
|
|
644
647
|
reset() {
|
|
645
648
|
this.batchLoadingStates = [], this.dataBatches = [];
|
|
@@ -663,8 +666,8 @@ class Y {
|
|
|
663
666
|
return ht(() => this.isLoading);
|
|
664
667
|
}
|
|
665
668
|
}
|
|
666
|
-
const
|
|
667
|
-
class
|
|
669
|
+
const ps = [];
|
|
670
|
+
class X {
|
|
668
671
|
constructor(t, e = {}) {
|
|
669
672
|
r(this, "list");
|
|
670
673
|
r(this, "dataSource");
|
|
@@ -674,12 +677,12 @@ class Q {
|
|
|
674
677
|
r(this, "loaderState");
|
|
675
678
|
var l;
|
|
676
679
|
const { source: s } = e;
|
|
677
|
-
this.dataSource = s ?? { staticData:
|
|
680
|
+
this.dataSource = s ?? { staticData: ps };
|
|
678
681
|
const n = "manualPagination" in this.dataSource ? this.dataSource.manualPagination : void 0, o = "manualFiltering" in this.dataSource ? this.dataSource.manualFiltering : void 0, c = "manualSorting" in this.dataSource ? this.dataSource.manualSorting : void 0;
|
|
679
|
-
this.list = t, this.loaderState =
|
|
682
|
+
this.list = t, this.loaderState = Q.useNew(), this.manualPagination = n ?? !1, this.manualFiltering = o ?? this.manualPagination, this.manualSorting = c ?? this.manualPagination, this.list.filters.forEach((d) => d.onFilterUpdated(() => this.reset())), (l = this.list.search) == null || l.onUpdated(() => this.reset());
|
|
680
683
|
}
|
|
681
684
|
static useNew(t, e = {}) {
|
|
682
|
-
return new
|
|
685
|
+
return new X(t, e);
|
|
683
686
|
}
|
|
684
687
|
reset() {
|
|
685
688
|
this.loaderState.reset();
|
|
@@ -694,7 +697,7 @@ class Q {
|
|
|
694
697
|
return this.loaderState.useMergedData();
|
|
695
698
|
}
|
|
696
699
|
getLoaderInvocationHooks() {
|
|
697
|
-
return
|
|
700
|
+
return ee(this.list.batches.getBatchIndex() + 1, (e) => e).map((e) => () => {
|
|
698
701
|
this.useLoadBatch(e);
|
|
699
702
|
});
|
|
700
703
|
}
|
|
@@ -753,7 +756,7 @@ class Q {
|
|
|
753
756
|
[e.staticData]
|
|
754
757
|
);
|
|
755
758
|
if ("asyncLoader" in e) {
|
|
756
|
-
const n = e.asyncLoader, o = e.dependencies, c = o ?
|
|
759
|
+
const n = e.asyncLoader, o = e.dependencies, c = o ? vt(o).toString() : void 0;
|
|
757
760
|
return mt(n, [s], {
|
|
758
761
|
loaderId: c
|
|
759
762
|
});
|
|
@@ -765,7 +768,7 @@ class Q {
|
|
|
765
768
|
throw new Error("Unknown data source");
|
|
766
769
|
}
|
|
767
770
|
}
|
|
768
|
-
class
|
|
771
|
+
class fs {
|
|
769
772
|
constructor(t, e) {
|
|
770
773
|
r(this, "list");
|
|
771
774
|
r(this, "render");
|
|
@@ -811,21 +814,21 @@ const M = class M {
|
|
|
811
814
|
}
|
|
812
815
|
};
|
|
813
816
|
r(M, "fallbackRenderItemFn", (t) => ft("pre", void 0, JSON.stringify(t)));
|
|
814
|
-
let
|
|
817
|
+
let H = M, bs = class {
|
|
815
818
|
constructor(t, e = {}) {
|
|
816
819
|
r(this, "tableHeader");
|
|
817
820
|
r(this, "componentProps");
|
|
818
821
|
this.tableHeader = t, this.componentProps = e;
|
|
819
822
|
}
|
|
820
|
-
},
|
|
823
|
+
}, Ss = class {
|
|
821
824
|
constructor(t, e = {}) {
|
|
822
825
|
r(this, "table");
|
|
823
826
|
r(this, "componentProps");
|
|
824
827
|
r(this, "columns");
|
|
825
828
|
const { columns: s = [], ...n } = e;
|
|
826
|
-
this.table = t, this.columns = s.map((o) => new
|
|
829
|
+
this.table = t, this.columns = s.map((o) => new bs(this, o)), this.componentProps = n;
|
|
827
830
|
}
|
|
828
|
-
},
|
|
831
|
+
}, vs = class {
|
|
829
832
|
constructor(t, e = {}) {
|
|
830
833
|
r(this, "row");
|
|
831
834
|
r(this, "renderFn");
|
|
@@ -833,37 +836,35 @@ let K = M, hs = class {
|
|
|
833
836
|
const { renderFn: s, ...n } = e;
|
|
834
837
|
this.row = t, this.renderFn = s, this.componentProps = n;
|
|
835
838
|
}
|
|
836
|
-
},
|
|
839
|
+
}, ws = class {
|
|
837
840
|
constructor(t, e = {}) {
|
|
838
841
|
r(this, "tableBody");
|
|
839
842
|
r(this, "cells");
|
|
840
843
|
r(this, "componentProps");
|
|
841
844
|
const { cells: s = [], ...n } = e;
|
|
842
|
-
this.tableBody = t, this.cells = s.map((o) => new
|
|
845
|
+
this.tableBody = t, this.cells = s.map((o) => new vs(this, o)), this.componentProps = n;
|
|
843
846
|
}
|
|
844
|
-
},
|
|
847
|
+
}, ys = class {
|
|
845
848
|
constructor(t, e = {}) {
|
|
846
849
|
r(this, "table");
|
|
847
850
|
r(this, "componentProps");
|
|
848
851
|
r(this, "row");
|
|
849
852
|
const { row: s, ...n } = e;
|
|
850
|
-
this.table = t, this.row = new
|
|
853
|
+
this.table = t, this.row = new ws(this, s), this.componentProps = n;
|
|
851
854
|
}
|
|
852
|
-
},
|
|
855
|
+
}, Es = class {
|
|
853
856
|
constructor(t, e = {}) {
|
|
854
857
|
r(this, "list");
|
|
855
858
|
r(this, "header");
|
|
856
859
|
r(this, "body");
|
|
857
860
|
r(this, "componentProps");
|
|
858
861
|
const { header: s, body: n, ...o } = e;
|
|
859
|
-
this.list = t, this.header = new
|
|
862
|
+
this.list = t, this.header = new Ss(this, s), this.body = new ys(this, n), this.componentProps = o;
|
|
860
863
|
}
|
|
861
|
-
},
|
|
864
|
+
}, Fs = class kt {
|
|
862
865
|
constructor(t) {
|
|
863
866
|
r(this, "settingStorageKey");
|
|
864
867
|
r(this, "supportsSettingsStorage");
|
|
865
|
-
r(this, "filterSettingsStorageKey");
|
|
866
|
-
r(this, "defaultSettings");
|
|
867
868
|
r(this, "filters");
|
|
868
869
|
r(this, "itemView");
|
|
869
870
|
r(this, "table");
|
|
@@ -878,6 +879,8 @@ let K = M, hs = class {
|
|
|
878
879
|
r(this, "componentProps");
|
|
879
880
|
r(this, "viewMode");
|
|
880
881
|
r(this, "setViewMode");
|
|
882
|
+
r(this, "filterSettingsStorageKey");
|
|
883
|
+
r(this, "defaultSettings");
|
|
881
884
|
const {
|
|
882
885
|
settingStorageKey: e,
|
|
883
886
|
itemView: s,
|
|
@@ -885,33 +888,33 @@ let K = M, hs = class {
|
|
|
885
888
|
filters: o = [],
|
|
886
889
|
sorting: c = [],
|
|
887
890
|
batchesController: l,
|
|
888
|
-
onChange:
|
|
889
|
-
loader:
|
|
891
|
+
onChange: d,
|
|
892
|
+
loader: u,
|
|
890
893
|
search: h,
|
|
891
|
-
onAction:
|
|
894
|
+
onAction: T,
|
|
892
895
|
getItemId: x,
|
|
893
|
-
defaultViewMode:
|
|
894
|
-
...
|
|
896
|
+
defaultViewMode: I,
|
|
897
|
+
...N
|
|
895
898
|
} = t;
|
|
896
|
-
this.defaultSettings =
|
|
899
|
+
this.defaultSettings = Ie(), this.settingStorageKey = e, this.filterSettingsStorageKey = e ? `${e}.activeFilters` : void 0, this.supportsSettingsStorage = !!this.settingStorageKey, this.items = new cs(this), this.filters = o.map((v) => new P(this, v)), this.sorting = c.map((v) => new gs(this, v)), this.search = h ? new fs(this, h) : void 0, this.itemView = s ? new H(this, s) : void 0, this.table = n ? new Es(this, n) : void 0, this.batches = new ds(this, l), this.componentProps = N, this.loader = X.useNew(this, u), this.onAction = T, this.getItemId = x, this.reactTable = Y.useNew(this, d, {
|
|
897
900
|
manualFiltering: this.loader.manualFiltering,
|
|
898
901
|
manualPagination: this.loader.manualPagination,
|
|
899
902
|
manualSorting: this.loader.manualSorting
|
|
900
903
|
});
|
|
901
|
-
const [
|
|
902
|
-
this.viewMode =
|
|
904
|
+
const [R, $] = G(I ?? "list");
|
|
905
|
+
this.viewMode = R, this.setViewMode = $, k(() => {
|
|
903
906
|
this.filters.forEach((v) => v.deleteUnknownFilterValues());
|
|
904
907
|
}, [this.filters]);
|
|
905
908
|
}
|
|
906
|
-
static useNew(t) {
|
|
907
|
-
return new Vt(t);
|
|
908
|
-
}
|
|
909
909
|
get isFiltered() {
|
|
910
910
|
return this.filters.some((t) => t.isActive()) || !!this.search && this.search.isSet;
|
|
911
911
|
}
|
|
912
912
|
get visibleSorting() {
|
|
913
913
|
return this.sorting.filter((t) => t.defaultEnabled !== "hidden");
|
|
914
914
|
}
|
|
915
|
+
static useNew(t) {
|
|
916
|
+
return new kt(t);
|
|
917
|
+
}
|
|
915
918
|
storeFilterDefaultSettings() {
|
|
916
919
|
if (this.defaultSettings && this.filterSettingsStorageKey) {
|
|
917
920
|
const t = Object.fromEntries(
|
|
@@ -938,7 +941,7 @@ let K = M, hs = class {
|
|
|
938
941
|
}
|
|
939
942
|
getSorting(t) {
|
|
940
943
|
const e = this.sorting.find((s) => s.id === t);
|
|
941
|
-
return
|
|
944
|
+
return wt(!!e, `Could not get Sorting (ID: ${t})`), e;
|
|
942
945
|
}
|
|
943
946
|
clearSorting() {
|
|
944
947
|
return this.sorting.forEach((t) => t.clear());
|
|
@@ -950,67 +953,67 @@ let K = M, hs = class {
|
|
|
950
953
|
return !this.loader.useIsLoading() && this.items.entries.length === 0;
|
|
951
954
|
}
|
|
952
955
|
};
|
|
953
|
-
const
|
|
954
|
-
items:
|
|
955
|
-
isLoading:
|
|
956
|
-
},
|
|
957
|
-
item:
|
|
958
|
-
isSelected:
|
|
959
|
-
hasAction:
|
|
960
|
-
},
|
|
956
|
+
const Ts = "flow--list--items", Cs = "flow--list--items--is-loading", pt = {
|
|
957
|
+
items: Ts,
|
|
958
|
+
isLoading: Cs
|
|
959
|
+
}, Is = "flow--list--items--item", Ls = "flow--list--items--item--is-selected", Ps = "flow--list--items--item--has-action", V = {
|
|
960
|
+
item: Is,
|
|
961
|
+
isSelected: Ls,
|
|
962
|
+
hasAction: Ps
|
|
963
|
+
}, At = () => /* @__PURE__ */ i.createElement(Lt, null, /* @__PURE__ */ i.createElement(W, null, /* @__PURE__ */ i.createElement(A, { width: "200px" })), /* @__PURE__ */ i.createElement(y, null, /* @__PURE__ */ i.createElement(A, { width: "300px" }))), Vs = (a) => {
|
|
961
964
|
const { id: t, data: e, children: s } = a, o = g().itemView;
|
|
962
965
|
if (!o)
|
|
963
966
|
return null;
|
|
964
|
-
const c = o.list.onAction, l = o.textValue ? o.textValue(e) : void 0,
|
|
967
|
+
const c = o.list.onAction, l = o.textValue ? o.textValue(e) : void 0, d = o.href ? o.href(e) : void 0, u = !!c || !!d;
|
|
965
968
|
return /* @__PURE__ */ i.createElement(
|
|
966
|
-
|
|
969
|
+
J.GridListItem,
|
|
967
970
|
{
|
|
968
971
|
id: t,
|
|
969
|
-
className: (h) =>
|
|
972
|
+
className: (h) => F(
|
|
970
973
|
V.item,
|
|
971
|
-
|
|
974
|
+
u && V.hasAction,
|
|
972
975
|
h.isSelected && V.isSelected
|
|
973
976
|
),
|
|
974
977
|
onAction: () => c && c(e),
|
|
975
978
|
textValue: l,
|
|
976
|
-
href:
|
|
979
|
+
href: d
|
|
977
980
|
},
|
|
978
|
-
/* @__PURE__ */ i.createElement(
|
|
981
|
+
/* @__PURE__ */ i.createElement(Yt, { fallback: /* @__PURE__ */ i.createElement(At, null) }, s ?? o.render(e))
|
|
979
982
|
);
|
|
980
|
-
},
|
|
981
|
-
const a =
|
|
982
|
-
return /* @__PURE__ */ i.createElement(
|
|
983
|
-
},
|
|
983
|
+
}, ks = (a) => /* @__PURE__ */ i.createElement(J.GridListItem, { textValue: "-", className: V.item }, a.children), q = () => {
|
|
984
|
+
const a = w(f);
|
|
985
|
+
return /* @__PURE__ */ i.createElement(Le, null, /* @__PURE__ */ i.createElement(Pe, null), /* @__PURE__ */ i.createElement(W, null, a.format("list.noResult.heading")), /* @__PURE__ */ i.createElement(y, null, a.format("list.noResult.text")));
|
|
986
|
+
}, As = () => {
|
|
984
987
|
var e;
|
|
985
|
-
const t = ((e = g().itemView) == null ? void 0 : e.fallback) ?? /* @__PURE__ */ i.createElement(
|
|
986
|
-
return Array.from(Array(5)).map((s, n) => /* @__PURE__ */ i.createElement(
|
|
987
|
-
},
|
|
988
|
+
const t = ((e = g().itemView) == null ? void 0 : e.fallback) ?? /* @__PURE__ */ i.createElement(At, null);
|
|
989
|
+
return Array.from(Array(5)).map((s, n) => /* @__PURE__ */ i.createElement(ks, { key: n }, Qt(t)));
|
|
990
|
+
}, Bs = () => {
|
|
988
991
|
const a = g(), t = a.loader.useIsLoading(), e = a.loader.useIsInitiallyLoading();
|
|
989
992
|
if (!a.itemView)
|
|
990
993
|
return null;
|
|
991
|
-
const s = a.items.entries.map((o) => /* @__PURE__ */ i.createElement(
|
|
994
|
+
const s = a.items.entries.map((o) => /* @__PURE__ */ i.createElement(Vs, { key: o.id, data: o.data, id: o.id })), n = F(pt.items, t && pt.isLoading);
|
|
992
995
|
return /* @__PURE__ */ i.createElement("div", { "aria-hidden": e, "aria-busy": t }, /* @__PURE__ */ i.createElement(
|
|
993
|
-
|
|
996
|
+
J.GridList,
|
|
994
997
|
{
|
|
995
998
|
className: n,
|
|
996
999
|
...a.componentProps,
|
|
997
|
-
renderEmptyState: () => /* @__PURE__ */ i.createElement(
|
|
1000
|
+
renderEmptyState: () => /* @__PURE__ */ i.createElement(q, null)
|
|
998
1001
|
},
|
|
999
|
-
e ? /* @__PURE__ */ i.createElement(
|
|
1002
|
+
e ? /* @__PURE__ */ i.createElement(As, null) : s
|
|
1000
1003
|
));
|
|
1001
|
-
},
|
|
1002
|
-
footer:
|
|
1003
|
-
},
|
|
1004
|
-
const t =
|
|
1004
|
+
}, Bt = (a) => null, Ms = () => Bt, Mt = (a) => null, Ds = () => Mt, Dt = (a) => null, xs = () => Dt, xt = (a) => null, Ns = () => xt, Nt = (a) => null, Rs = () => Nt, $s = "flow--list--footer", zs = {
|
|
1005
|
+
footer: $s
|
|
1006
|
+
}, Us = (a) => {
|
|
1007
|
+
const t = w(f), e = g(), s = e.batches, n = e.loader.useIsInitiallyLoading(), o = e.useIsEmpty(), c = s.getTotalItemsCount(), l = s.getVisibleItemsCount();
|
|
1005
1008
|
if (o)
|
|
1006
1009
|
return null;
|
|
1007
|
-
const
|
|
1010
|
+
const d = n ? /* @__PURE__ */ i.createElement(Ae, { width: "200px" }) : t.format("list.paginationInfo", {
|
|
1008
1011
|
visibleItemsCount: l,
|
|
1009
1012
|
totalItemsCount: c
|
|
1010
1013
|
});
|
|
1011
|
-
return /* @__PURE__ */ i.createElement(
|
|
1012
|
-
},
|
|
1013
|
-
const t =
|
|
1014
|
+
return /* @__PURE__ */ i.createElement(y, { ...a }, d);
|
|
1015
|
+
}, Os = (a) => {
|
|
1016
|
+
const t = w(f), e = g(), s = e.loader.useIsLoading(), n = e.loader.useIsInitiallyLoading();
|
|
1014
1017
|
return !e.batches.hasNextBatch() && !s ? null : /* @__PURE__ */ i.createElement(
|
|
1015
1018
|
S,
|
|
1016
1019
|
{
|
|
@@ -1023,27 +1026,27 @@ const ys = "flow--list--items", ws = "flow--list--items--is-loading", pt = {
|
|
|
1023
1026
|
},
|
|
1024
1027
|
t.format("list.showMore")
|
|
1025
1028
|
);
|
|
1026
|
-
},
|
|
1029
|
+
}, Ks = () => /* @__PURE__ */ i.createElement("div", { className: zs.footer }, /* @__PURE__ */ i.createElement(Us, null), /* @__PURE__ */ i.createElement(Os, null));
|
|
1027
1030
|
function Rt(a) {
|
|
1028
1031
|
return null;
|
|
1029
1032
|
}
|
|
1030
|
-
const
|
|
1031
|
-
table:
|
|
1032
|
-
isLoading:
|
|
1033
|
-
row:
|
|
1034
|
-
isSelected:
|
|
1035
|
-
hasAction:
|
|
1036
|
-
},
|
|
1033
|
+
const Hs = () => Rt, $t = (a) => null, zt = (a) => null, Ut = (a) => null, qs = (a) => /* @__PURE__ */ i.createElement(yt, { ...a }, /* @__PURE__ */ i.createElement(Et, null, /* @__PURE__ */ i.createElement(Ft, null, /* @__PURE__ */ i.createElement(A, { width: "100%" }))), /* @__PURE__ */ i.createElement(Tt, null, Array.from(Array(5)).map((t, e) => /* @__PURE__ */ i.createElement(Ct, { key: e }, /* @__PURE__ */ i.createElement(It, null, /* @__PURE__ */ i.createElement(A, { width: "100%" })))))), Gs = "flow--list--table", js = "flow--list--table--is-loading", _s = "flow--list--table--row", Ws = "flow--list--table--is-selected", Js = "flow--list--table--has-action", C = {
|
|
1034
|
+
table: Gs,
|
|
1035
|
+
isLoading: js,
|
|
1036
|
+
row: _s,
|
|
1037
|
+
isSelected: Ws,
|
|
1038
|
+
hasAction: Js
|
|
1039
|
+
}, Ys = () => {
|
|
1037
1040
|
const a = g(), t = a.table, e = a.useIsEmpty(), s = a.loader.useIsLoading(), n = a.loader.useIsInitiallyLoading();
|
|
1038
1041
|
if (!t)
|
|
1039
1042
|
return null;
|
|
1040
1043
|
if (n)
|
|
1041
|
-
return /* @__PURE__ */ i.createElement(
|
|
1044
|
+
return /* @__PURE__ */ i.createElement(qs, { ...t.componentProps });
|
|
1042
1045
|
if (e)
|
|
1043
|
-
return /* @__PURE__ */ i.createElement(
|
|
1044
|
-
const o = t.list.onAction, c =
|
|
1045
|
-
|
|
1046
|
-
s &&
|
|
1046
|
+
return /* @__PURE__ */ i.createElement(q, null);
|
|
1047
|
+
const o = t.list.onAction, c = F(
|
|
1048
|
+
C.table,
|
|
1049
|
+
s && C.isLoading,
|
|
1047
1050
|
t.componentProps.className
|
|
1048
1051
|
);
|
|
1049
1052
|
return /* @__PURE__ */ i.createElement(
|
|
@@ -1053,66 +1056,66 @@ const zs = () => Rt, Nt = (a) => null, $t = (a) => null, zt = (a) => null, Us =
|
|
|
1053
1056
|
...t.componentProps,
|
|
1054
1057
|
className: c
|
|
1055
1058
|
},
|
|
1056
|
-
/* @__PURE__ */ i.createElement(
|
|
1059
|
+
/* @__PURE__ */ i.createElement(Et, { ...t.header.componentProps }, t.header.columns.map((l, d) => /* @__PURE__ */ i.createElement(Ft, { key: d, ...l.componentProps }))),
|
|
1057
1060
|
/* @__PURE__ */ i.createElement(
|
|
1058
|
-
|
|
1061
|
+
Tt,
|
|
1059
1062
|
{
|
|
1060
1063
|
...t.body.componentProps,
|
|
1061
|
-
renderEmptyState: () => /* @__PURE__ */ i.createElement(
|
|
1064
|
+
renderEmptyState: () => /* @__PURE__ */ i.createElement(q, null)
|
|
1062
1065
|
},
|
|
1063
1066
|
a.items.entries.map((l) => {
|
|
1064
|
-
var
|
|
1067
|
+
var d;
|
|
1065
1068
|
return /* @__PURE__ */ i.createElement(
|
|
1066
|
-
|
|
1069
|
+
Ct,
|
|
1067
1070
|
{
|
|
1068
|
-
className: (
|
|
1069
|
-
|
|
1070
|
-
o &&
|
|
1071
|
+
className: (u) => F(
|
|
1072
|
+
C.row,
|
|
1073
|
+
o && C.hasAction,
|
|
1071
1074
|
t.body.row.componentProps.className,
|
|
1072
|
-
|
|
1075
|
+
u.isSelected && C.isSelected
|
|
1073
1076
|
),
|
|
1074
1077
|
key: l.id,
|
|
1075
1078
|
id: l.id,
|
|
1076
1079
|
onAction: o ? () => o(l.data) : void 0,
|
|
1077
1080
|
...t.body.row.componentProps
|
|
1078
1081
|
},
|
|
1079
|
-
(
|
|
1082
|
+
(d = t.body.row) == null ? void 0 : d.cells.map((u, h) => /* @__PURE__ */ i.createElement(It, { key: h, ...u.componentProps }, u.renderFn ? u.renderFn(l.data) : void 0))
|
|
1080
1083
|
);
|
|
1081
1084
|
})
|
|
1082
1085
|
)
|
|
1083
1086
|
);
|
|
1084
|
-
},
|
|
1085
|
-
var
|
|
1086
|
-
const { children: t, batchSize: e, onChange: s, refProp: n, ...o } = a, c = (
|
|
1087
|
+
}, Ot = (a) => null, Kt = (a) => null, Ht = (a) => null, Qs = oe("List", (a) => {
|
|
1088
|
+
var Z, tt, et, st, it, at, nt, rt, ot;
|
|
1089
|
+
const { children: t, batchSize: e, onChange: s, refProp: n, ...o } = a, c = (Z = b(
|
|
1087
1090
|
t,
|
|
1088
|
-
|
|
1089
|
-
)) == null ? void 0 :
|
|
1091
|
+
Bt
|
|
1092
|
+
)) == null ? void 0 : Z.props, l = (tt = b(
|
|
1090
1093
|
t,
|
|
1091
|
-
|
|
1092
|
-
)) == null ? void 0 :
|
|
1094
|
+
Ve
|
|
1095
|
+
)) == null ? void 0 : tt.props, d = (et = b(t, Nt)) == null ? void 0 : et.props, u = {
|
|
1093
1096
|
source: c ? {
|
|
1094
1097
|
...c,
|
|
1095
1098
|
asyncLoader: c.children
|
|
1096
1099
|
} : l ? {
|
|
1097
1100
|
...l,
|
|
1098
1101
|
asyncResourceFactory: l.children
|
|
1099
|
-
} :
|
|
1100
|
-
staticData:
|
|
1102
|
+
} : d ? {
|
|
1103
|
+
staticData: d.data
|
|
1101
1104
|
} : void 0
|
|
1102
|
-
}, h = (
|
|
1105
|
+
}, h = (st = b(t, Rt)) == null ? void 0 : st.props, T = (it = b(t, xt)) == null ? void 0 : it.props, x = (at = b(t, Ot)) == null ? void 0 : at.props, I = L(t, $t).map(
|
|
1103
1106
|
(p) => ({
|
|
1104
1107
|
...p.props,
|
|
1105
1108
|
name: p.props.children
|
|
1106
1109
|
})
|
|
1107
|
-
),
|
|
1110
|
+
), N = L(t, Ut).map(
|
|
1108
1111
|
(p) => ({
|
|
1109
1112
|
...p.props,
|
|
1110
1113
|
renderFn: p.props.children
|
|
1111
1114
|
})
|
|
1112
|
-
),
|
|
1115
|
+
), R = (nt = b(t, zt)) == null ? void 0 : nt.props, $ = (rt = b(t, Kt)) == null ? void 0 : rt.props, v = (ot = b(t, Ht)) == null ? void 0 : ot.props, z = Fs.useNew({
|
|
1113
1116
|
onChange: s,
|
|
1114
|
-
loader:
|
|
1115
|
-
filters:
|
|
1117
|
+
loader: u,
|
|
1118
|
+
filters: L(t, Mt).map(
|
|
1116
1119
|
(p) => ({
|
|
1117
1120
|
...p.props,
|
|
1118
1121
|
renderItem: p.props.children
|
|
@@ -1123,21 +1126,21 @@ const zs = () => Rt, Nt = (a) => null, $t = (a) => null, zt = (a) => null, Us =
|
|
|
1123
1126
|
textFieldProps: h,
|
|
1124
1127
|
defaultValue: h.defaultValue
|
|
1125
1128
|
} : void 0,
|
|
1126
|
-
sorting:
|
|
1127
|
-
itemView:
|
|
1128
|
-
...
|
|
1129
|
-
renderFn:
|
|
1129
|
+
sorting: L(t, Dt).map((p) => p.props),
|
|
1130
|
+
itemView: T ? {
|
|
1131
|
+
...T,
|
|
1132
|
+
renderFn: T.children
|
|
1130
1133
|
} : void 0,
|
|
1131
|
-
table:
|
|
1134
|
+
table: I.length > 0 ? {
|
|
1132
1135
|
header: {
|
|
1133
1136
|
...$,
|
|
1134
|
-
columns:
|
|
1137
|
+
columns: I
|
|
1135
1138
|
},
|
|
1136
1139
|
body: {
|
|
1137
1140
|
...v,
|
|
1138
1141
|
row: {
|
|
1139
|
-
...
|
|
1140
|
-
cells:
|
|
1142
|
+
...R,
|
|
1143
|
+
cells: N
|
|
1141
1144
|
}
|
|
1142
1145
|
},
|
|
1143
1146
|
...x
|
|
@@ -1146,48 +1149,54 @@ const zs = () => Rt, Nt = (a) => null, $t = (a) => null, zt = (a) => null, Us =
|
|
|
1146
1149
|
batchSize: e
|
|
1147
1150
|
},
|
|
1148
1151
|
...o
|
|
1149
|
-
})
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
+
}), qt = {
|
|
1153
|
+
ActionGroup: {
|
|
1154
|
+
className: E.actions,
|
|
1155
|
+
tunnelId: "actions",
|
|
1156
|
+
ignoreBreakpoint: !0
|
|
1157
|
+
}
|
|
1158
|
+
};
|
|
1159
|
+
return /* @__PURE__ */ i.createElement(bt, { props: qt }, /* @__PURE__ */ i.createElement(St, null, /* @__PURE__ */ i.createElement(
|
|
1160
|
+
Pt.Provider,
|
|
1152
1161
|
{
|
|
1153
1162
|
value: {
|
|
1154
1163
|
list: z
|
|
1155
1164
|
}
|
|
1156
1165
|
},
|
|
1157
|
-
/* @__PURE__ */ i.createElement(
|
|
1158
|
-
/* @__PURE__ */ i.createElement("div", { className:
|
|
1159
|
-
);
|
|
1160
|
-
}),
|
|
1161
|
-
List:
|
|
1162
|
-
Filter:
|
|
1163
|
-
Search:
|
|
1164
|
-
Sorting:
|
|
1165
|
-
Item:
|
|
1166
|
-
ItemView:
|
|
1167
|
-
TableHeader:
|
|
1168
|
-
TableColumn:
|
|
1169
|
-
TableBody:
|
|
1170
|
-
TableRow:
|
|
1171
|
-
TableCell:
|
|
1172
|
-
Table:
|
|
1173
|
-
StaticData:
|
|
1174
|
-
LoaderAsync:
|
|
1175
|
-
LoaderAsyncResource:
|
|
1166
|
+
/* @__PURE__ */ i.createElement(Ke, null),
|
|
1167
|
+
/* @__PURE__ */ i.createElement("div", { className: os.list, ref: n }, t, /* @__PURE__ */ i.createElement(ns, null), z.viewMode === "list" && /* @__PURE__ */ i.createElement(Bs, null), z.viewMode === "table" && /* @__PURE__ */ i.createElement(Ys, null), /* @__PURE__ */ i.createElement(Ks, null))
|
|
1168
|
+
)));
|
|
1169
|
+
}), Xs = () => Qs, Yi = () => ({
|
|
1170
|
+
List: Xs(),
|
|
1171
|
+
Filter: Ds(),
|
|
1172
|
+
Search: Hs(),
|
|
1173
|
+
Sorting: xs(),
|
|
1174
|
+
Item: Ns(),
|
|
1175
|
+
ItemView: Lt,
|
|
1176
|
+
TableHeader: Kt,
|
|
1177
|
+
TableColumn: $t,
|
|
1178
|
+
TableBody: Ht,
|
|
1179
|
+
TableRow: zt,
|
|
1180
|
+
TableCell: Ut,
|
|
1181
|
+
Table: Ot,
|
|
1182
|
+
StaticData: Rs(),
|
|
1183
|
+
LoaderAsync: Ms(),
|
|
1184
|
+
LoaderAsyncResource: ke()
|
|
1176
1185
|
});
|
|
1177
1186
|
export {
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1187
|
+
Qs as List,
|
|
1188
|
+
Mt as ListFilter,
|
|
1189
|
+
xt as ListItem,
|
|
1190
|
+
Lt as ListItemView,
|
|
1191
|
+
Bt as ListLoaderAsync,
|
|
1192
|
+
Dt as ListSorting,
|
|
1193
|
+
Nt as ListStaticData,
|
|
1194
|
+
Xs as TypedList,
|
|
1195
|
+
Ds as TypedListFilter,
|
|
1196
|
+
Ns as TypedListItem,
|
|
1197
|
+
Ms as TypedListLoaderAsync,
|
|
1198
|
+
xs as TypedListSorting,
|
|
1199
|
+
Rs as TypedListStaticData,
|
|
1200
|
+
Yi as typedList,
|
|
1192
1201
|
g as useList
|
|
1193
1202
|
};
|