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