@mittwald/flow-react-components 0.1.0-alpha.211 → 0.1.0-alpha.212

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/List.js CHANGED
@@ -1,60 +1,60 @@
1
1
  "use client"
2
2
  /* */
3
- var Ot = Object.defineProperty;
4
- var Ht = (a, t, e) => t in a ? Ot(a, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[t] = e;
5
- var r = (a, t, e) => Ht(a, typeof t != "symbol" ? t + "" : t, e);
6
- import n, { createContext as qt, useContext as Kt, createElement as ot, useState as lt, useEffect as I, useRef as ct, cloneElement as Gt } from "react";
3
+ var Oe = Object.defineProperty;
4
+ var He = (a, e, t) => e in a ? Oe(a, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : a[e] = t;
5
+ var r = (a, e, t) => He(a, typeof e != "symbol" ? e + "" : e, t);
6
+ import n, { createContext as qe, useContext as Ke, createElement as ce, useState as de, useEffect as k, useRef as me, cloneElement as Ge } from "react";
7
7
  import "./propsContext-DzAKlmhS.js";
8
- import { P as jt } from "./PropsContextProvider-C6Z4XGp6.js";
8
+ import { P as je } from "./PropsContextProvider-C6Z4XGp6.js";
9
9
  import "@react-aria/utils";
10
- import { isShallowEqual as _t, unique as Wt, times as Jt } from "remeda";
11
- import { d as Yt } from "./dynamic-ClpUSmEt.js";
12
- import { B as v } from "./Button-DQtavSbo.js";
10
+ import { isShallowEqual as _e, unique as We, times as Je } from "remeda";
11
+ import { d as Ye } from "./dynamic-ClpUSmEt.js";
12
+ import { B as w } from "./Button-DQtavSbo.js";
13
13
  import "@tabler/icons-react";
14
14
  import "./Icon-DPoIVASu.js";
15
- import { I as Qt } from "./IconContextMenu-jwoVcLvd.js";
16
- import { a as A, C as R } from "./ContextMenuTrigger-DOCNHDwJ.js";
17
- import { M as D } from "./MenuItem-DcfYvfPJ.js";
18
- import { useLocalizedStringFormatter as E } from "react-aria";
19
- import { TunnelProvider as Xt, TunnelExit as Z } from "@mittwald/react-tunnel";
20
- import y from "clsx";
21
- import { g as Zt } from "./getContainerBreakpointSizeClassName-BrcFDcCY.js";
22
- import { f as te } from "./flowComponent-DHPUcYyM.js";
23
- import { R as ee } from "./Render-BdlTa7Qb.js";
24
- import { T } from "./Text-Sd5q3Yme.js";
25
- import { I as dt } from "./IconChevronDown--OxZLX8L.js";
26
- import { I as se } from "./IconClose-BFwPT_IX.js";
27
- import { makeObservable as ae, observable as tt, computed as et, action as B, makeAutoObservable as ie } from "mobx";
15
+ import { I as Qe } from "./IconContextMenu-jwoVcLvd.js";
16
+ import { a as B, C as z } from "./ContextMenuTrigger-DOCNHDwJ.js";
17
+ import { M as U } from "./MenuItem-DcfYvfPJ.js";
18
+ import { useLocalizedStringFormatter as y } from "react-aria";
19
+ import { TunnelProvider as Xe, TunnelExit as te } from "@mittwald/react-tunnel";
20
+ import v from "clsx";
21
+ import { g as Ze } from "./getContainerBreakpointSizeClassName-BrcFDcCY.js";
22
+ import { f as et } from "./flowComponent-DHPUcYyM.js";
23
+ import { R as tt } from "./Render-BdlTa7Qb.js";
24
+ import { T as E } from "./Text-Sd5q3Yme.js";
25
+ import { I as ue } from "./IconChevronDown--OxZLX8L.js";
26
+ import { I as st } from "./IconClose-BFwPT_IX.js";
27
+ import { makeObservable as at, observable as se, computed as ae, action as R, makeAutoObservable as it } from "mobx";
28
28
  import "./context-Cf7tqFtF.js";
29
- import { u as ne } from "./useOnChange-C1Quwyuz.js";
30
- import { S as re } from "./SearchField-DstUFmq4.js";
31
- import { H as $ } from "./Heading-BEC6iPfF.js";
32
- import { S as oe } from "./Section-DTR9rFAc.js";
33
- import { I as le } from "./IconSettings-CisOFpPV.js";
34
- import { getProperty as ce } from "dot-prop";
35
- import { observer as ut } from "mobx-react-lite";
36
- import { hash as mt } from "object-code";
37
- import { useReactTable as de, getCoreRowModel as ue, getSortedRowModel as me, getFilteredRowModel as he, getPaginationRowModel as pe, getFacetedUniqueValues as ge } from "@tanstack/react-table";
38
- import ht from "invariant";
39
- import { getAsyncResource as st } from "@mittwald/react-use-promise";
40
- import { u as at } from "./useSelector-DpU7_HMO.js";
41
- import * as z from "react-aria-components";
42
- import { I as be } from "./IllustratedMessage-B3MHD01M.js";
43
- import { I as fe } from "./IconSearch-C7VQTAqK.js";
44
- import { S as P } from "./SkeletonText-B5ZghZhO.js";
45
- import { d as b, a as C } from "./deepFindOfType-6pG0fH7S.js";
46
- import { ListLoaderAsyncResource as Se, TypedListLoaderAsyncResource as we } from "./List/ListLoaderAsyncResource.js";
47
- import { S as ve } from "./Skeleton-CKLaTmDR.js";
48
- import { T as pt, d as gt, c as bt, a as ft, e as St, b as wt } from "./TableRow-BAVeHa5X.js";
49
- const ye = "flow--list--items--item--view", Ee = "flow--list--items--item--view--title", Te = "flow--list--items--item--view--top-content", Ce = "flow--list--items--item--view--content", Fe = "flow--list--items--item--view--action", Le = "flow--list--items--item--view--avatar", Ie = "flow--list--items--item--view--text", Pe = "flow--list--items--item--view--heading", m = {
50
- view: ye,
51
- title: Ee,
52
- topContent: Te,
53
- content: Ce,
54
- action: Fe,
55
- avatar: Le,
56
- text: Ie,
57
- heading: Pe,
29
+ import { u as nt } from "./useOnChange-C1Quwyuz.js";
30
+ import { S as rt } from "./SearchField-DstUFmq4.js";
31
+ import { H as O } from "./Heading-BEC6iPfF.js";
32
+ import { S as ot } from "./Section-DTR9rFAc.js";
33
+ import { I as lt } from "./IconSettings-CisOFpPV.js";
34
+ import { getProperty as ct } from "dot-prop";
35
+ import { observer as he } from "mobx-react-lite";
36
+ import { hash as pe } from "object-code";
37
+ import { useReactTable as dt, getCoreRowModel as mt, getSortedRowModel as ut, getFilteredRowModel as ht, getPaginationRowModel as pt, getFacetedUniqueValues as gt } from "@tanstack/react-table";
38
+ import ge from "invariant";
39
+ import { getAsyncResource as ie } from "@mittwald/react-use-promise";
40
+ import { u as ne } from "./useSelector-DpU7_HMO.js";
41
+ import * as H from "react-aria-components";
42
+ import { I as bt } from "./IllustratedMessage-B3MHD01M.js";
43
+ import { I as ft } from "./IconSearch-C7VQTAqK.js";
44
+ import { S as A } from "./SkeletonText-B5ZghZhO.js";
45
+ import { d as b, a as L } from "./deepFindOfType-6pG0fH7S.js";
46
+ import { ListLoaderAsyncResource as St, TypedListLoaderAsyncResource as wt } from "./List/ListLoaderAsyncResource.js";
47
+ import { S as vt } from "./Skeleton-CKLaTmDR.js";
48
+ import { T as be, d as fe, c as Se, a as we, e as ve, b as ye } from "./TableRow-K-cWiurd.js";
49
+ const yt = "flow--list--items--item--view", Et = "flow--list--items--item--view--title", Tt = "flow--list--items--item--view--top-content", Ft = "flow--list--items--item--view--content", Ct = "flow--list--items--item--view--action", Lt = "flow--list--items--item--view--avatar", It = "flow--list--items--item--view--text", Pt = "flow--list--items--item--view--heading", u = {
50
+ view: yt,
51
+ title: Et,
52
+ topContent: Tt,
53
+ content: Ft,
54
+ action: Ct,
55
+ avatar: Lt,
56
+ text: It,
57
+ heading: Pt,
58
58
  "container-breakpoint-size-xs": "flow--list--items--item--view--container-breakpoint-size-xs",
59
59
  "container-breakpoint-size-s": "flow--list--items--item--view--container-breakpoint-size-s",
60
60
  "container-breakpoint-size-m": "flow--list--items--item--view--container-breakpoint-size-m",
@@ -86,227 +86,227 @@ const ye = "flow--list--items--item--view", Ee = "flow--list--items--item--view-
86
86
  "list.settings.viewMode.table": "Table",
87
87
  "list.showMore": "Show more",
88
88
  "list.sorting": "Sorting"
89
- } }, ke = (a) => {
90
- const { className: t, children: e } = a, s = E(f);
91
- return /* @__PURE__ */ n.createElement(A, null, /* @__PURE__ */ n.createElement(
92
- v,
89
+ } }, kt = (a) => {
90
+ const { className: e, children: t } = a, s = y(f);
91
+ return /* @__PURE__ */ n.createElement(B, null, /* @__PURE__ */ n.createElement(
92
+ w,
93
93
  {
94
94
  variant: "plain",
95
- className: t,
95
+ className: e,
96
96
  "aria-label": s.format("list.options")
97
97
  },
98
- /* @__PURE__ */ n.createElement(Qt, null)
99
- ), e);
100
- }, Ae = (a) => a === "top" ? m.topContent : a === "bottom" ? m.content : m.topContent, vt = (a) => {
101
- const { children: t, className: e, containerBreakpointSize: s = "m" } = a, i = {
98
+ /* @__PURE__ */ n.createElement(Qe, null)
99
+ ), t);
100
+ }, At = (a) => a === "top" ? u.topContent : a === "bottom" ? u.content : u.topContent, Ee = (a) => {
101
+ const { children: e, className: t, containerBreakpointSize: s = "m" } = a, i = {
102
102
  ContextMenu: {
103
- wrapWith: /* @__PURE__ */ n.createElement(ke, { className: m.action }),
103
+ wrapWith: /* @__PURE__ */ n.createElement(kt, { className: u.action }),
104
104
  placement: "bottom end"
105
105
  },
106
106
  Button: {
107
- className: m.action
107
+ className: u.action
108
108
  },
109
109
  ActionGroup: {
110
- className: m.action,
110
+ className: u.action,
111
111
  ignoreBreakpoint: !0
112
112
  },
113
113
  Content: {
114
- className: Yt((l) => Ae(l.slot)),
114
+ className: Ye((l) => At(l.slot)),
115
115
  tunnelId: "topContent"
116
116
  },
117
117
  Avatar: {
118
- className: m.avatar,
118
+ className: u.avatar,
119
119
  tunnelId: "title"
120
120
  },
121
121
  Heading: {
122
- className: m.heading,
122
+ className: u.heading,
123
123
  level: 5,
124
124
  tunnelId: "title"
125
125
  },
126
126
  Text: {
127
- className: m.text,
127
+ className: u.text,
128
128
  tunnelId: "title"
129
129
  },
130
130
  Link: {
131
131
  unstyled: !0
132
132
  }
133
- }, o = y(
134
- m.view,
135
- e,
136
- m[Zt(s)]
133
+ }, o = v(
134
+ u.view,
135
+ t,
136
+ u[Ze(s)]
137
137
  );
138
- return /* @__PURE__ */ n.createElement("div", { className: o }, /* @__PURE__ */ n.createElement(jt, { props: i }, /* @__PURE__ */ n.createElement(Xt, null, t, /* @__PURE__ */ n.createElement("div", { className: m.title }, /* @__PURE__ */ n.createElement(Z, { id: "title" })), /* @__PURE__ */ n.createElement(Z, { id: "topContent" }))));
139
- }, yt = qt({}), h = () => Kt(yt).list, Ve = () => h().loader.getLoaderInvocationHooks().map((t, e) => /* @__PURE__ */ n.createElement(ee, { key: e }, () => {
140
- t();
141
- })), Be = (a) => {
142
- const { sorting: t } = a;
143
- return /* @__PURE__ */ n.createElement(D, { id: t.id }, t.name);
144
- }, M = (a) => {
145
- const { children: t, locales: e, variables: s } = a;
146
- return E(e).format(t, s);
147
- }, Me = () => {
148
- const a = h(), t = a.visibleSorting.map((i) => /* @__PURE__ */ n.createElement(Be, { sorting: i, key: i.id }));
149
- if (t.length === 0)
138
+ return /* @__PURE__ */ n.createElement("div", { className: o }, /* @__PURE__ */ n.createElement(je, { props: i }, /* @__PURE__ */ n.createElement(Xe, null, e, /* @__PURE__ */ n.createElement("div", { className: u.title }, /* @__PURE__ */ n.createElement(te, { id: "title" })), /* @__PURE__ */ n.createElement(te, { id: "topContent" }))));
139
+ }, Te = qe({}), h = () => Ke(Te).list, Vt = () => h().loader.getLoaderInvocationHooks().map((e, t) => /* @__PURE__ */ n.createElement(tt, { key: t }, () => {
140
+ e();
141
+ })), Bt = (a) => {
142
+ const { sorting: e } = a;
143
+ return /* @__PURE__ */ n.createElement(U, { id: e.id }, e.name);
144
+ }, N = (a) => {
145
+ const { children: e, locales: t, variables: s } = a;
146
+ return y(t).format(e, s);
147
+ }, Mt = () => {
148
+ const a = h(), e = a.visibleSorting.map((i) => /* @__PURE__ */ n.createElement(Bt, { sorting: i, key: i.id }));
149
+ if (e.length === 0)
150
150
  return null;
151
- const e = a.visibleSorting.find((i) => i.isSorted()), s = /* @__PURE__ */ n.createElement(T, null, e ? /* @__PURE__ */ n.createElement(
152
- M,
151
+ const t = a.visibleSorting.find((i) => i.isSorted()), s = /* @__PURE__ */ n.createElement(E, null, t ? /* @__PURE__ */ n.createElement(
152
+ N,
153
153
  {
154
154
  locales: f,
155
155
  variables: {
156
- property: e.name ?? e.property
156
+ property: t.name ?? t.property
157
157
  }
158
158
  },
159
159
  "list.setSorting"
160
- ) : /* @__PURE__ */ n.createElement(M, { locales: f }, "list.sorting"));
161
- return /* @__PURE__ */ n.createElement(A, null, /* @__PURE__ */ n.createElement(v, { variant: "soft", size: "s", color: "secondary" }, s, /* @__PURE__ */ n.createElement(dt, null)), /* @__PURE__ */ n.createElement(
162
- R,
160
+ ) : /* @__PURE__ */ n.createElement(N, { locales: f }, "list.sorting"));
161
+ return /* @__PURE__ */ n.createElement(B, null, /* @__PURE__ */ n.createElement(w, { variant: "soft", size: "s", color: "secondary" }, s, /* @__PURE__ */ n.createElement(ue, null)), /* @__PURE__ */ n.createElement(
162
+ z,
163
163
  {
164
164
  selectionMode: "single",
165
- selectedKeys: e ? [e.id] : [],
165
+ selectedKeys: t ? [t.id] : [],
166
166
  onAction: (i) => {
167
167
  a.getSorting(String(i)).enable();
168
168
  }
169
169
  },
170
- t
170
+ e
171
171
  ));
172
- }, Ne = (a) => {
173
- const { filter: t } = a, { values: e, mode: s, name: i, property: o } = t, l = e.map((c) => /* @__PURE__ */ n.createElement(
174
- D,
172
+ }, xt = (a) => {
173
+ const { filter: e } = a, { values: t, mode: s, name: i, property: o } = e, l = t.map((d) => /* @__PURE__ */ n.createElement(
174
+ U,
175
175
  {
176
- id: c.id,
177
- key: c.id,
176
+ id: d.id,
177
+ key: d.id,
178
178
  onAction: () => {
179
- c.toggle();
179
+ d.toggle();
180
180
  }
181
181
  },
182
- c.render()
183
- )), d = e.filter((c) => c.isActive).map((c) => c.id);
184
- return /* @__PURE__ */ n.createElement(A, null, /* @__PURE__ */ n.createElement(v, { variant: "soft", size: "s", color: "secondary" }, /* @__PURE__ */ n.createElement(T, null, i ?? o), /* @__PURE__ */ n.createElement(dt, null)), /* @__PURE__ */ n.createElement(
185
- R,
182
+ d.render()
183
+ )), c = t.filter((d) => d.isActive).map((d) => d.id);
184
+ return /* @__PURE__ */ n.createElement(B, null, /* @__PURE__ */ n.createElement(w, { variant: "soft", size: "s", color: "secondary" }, /* @__PURE__ */ n.createElement(E, null, i ?? o), /* @__PURE__ */ n.createElement(ue, null)), /* @__PURE__ */ n.createElement(
185
+ z,
186
186
  {
187
187
  selectionMode: s === "one" ? "single" : "multiple",
188
- selectedKeys: d
188
+ selectedKeys: c
189
189
  },
190
190
  l
191
191
  ));
192
- }, xe = "flow--list--header", Re = "flow--list--header--picker-list-and-search", De = "flow--list--header--picker-list", $e = "flow--list--header--search-field", F = {
193
- header: xe,
194
- pickerListAndSearch: Re,
195
- pickerList: De,
196
- searchField: $e
197
- }, ze = "flow--list--header--active-filters", Ue = "flow--list--header--active-filters--clear-button", it = {
198
- activeFilters: ze,
199
- clearButton: Ue
200
- }, Oe = () => {
201
- const a = h(), t = a.filters.flatMap(
202
- (e) => e.values.filter((s) => s.isActive).map((s) => /* @__PURE__ */ n.createElement(
203
- v,
192
+ }, Rt = "flow--list--header", Nt = "flow--list--header--picker-list-and-search", Dt = "flow--list--header--picker-list", $t = "flow--list--header--search-field", I = {
193
+ header: Rt,
194
+ pickerListAndSearch: Nt,
195
+ pickerList: Dt,
196
+ searchField: $t
197
+ }, zt = "flow--list--header--active-filters", Ut = "flow--list--header--active-filters--clear-button", re = {
198
+ activeFilters: zt,
199
+ clearButton: Ut
200
+ }, Ot = () => {
201
+ const a = h(), e = a.filters.flatMap(
202
+ (t) => t.values.filter((s) => s.isActive).map((s) => /* @__PURE__ */ n.createElement(
203
+ w,
204
204
  {
205
205
  variant: "soft",
206
206
  size: "s",
207
207
  key: s.id,
208
208
  onPress: () => s.deactivate()
209
209
  },
210
- /* @__PURE__ */ n.createElement(T, null, s.render()),
211
- /* @__PURE__ */ n.createElement(se, null)
210
+ /* @__PURE__ */ n.createElement(E, null, s.render()),
211
+ /* @__PURE__ */ n.createElement(st, null)
212
212
  ))
213
213
  );
214
- return t.length <= 0 ? null : /* @__PURE__ */ n.createElement("div", { className: it.activeFilters }, t, /* @__PURE__ */ n.createElement(
215
- v,
214
+ return e.length <= 0 ? null : /* @__PURE__ */ n.createElement("div", { className: re.activeFilters }, e, /* @__PURE__ */ n.createElement(
215
+ w,
216
216
  {
217
- className: it.clearButton,
217
+ className: re.clearButton,
218
218
  size: "s",
219
219
  variant: "plain",
220
220
  onPress: () => a.clearFilters()
221
221
  },
222
- /* @__PURE__ */ n.createElement(M, { locales: f }, "list.resetAll")
222
+ /* @__PURE__ */ n.createElement(N, { locales: f }, "list.resetAll")
223
223
  ));
224
- }, He = (a) => {
225
- const { className: t, onChange: e, value: s, ...i } = a, [o, l] = lt(s ?? "");
226
- ne(s, () => {
224
+ }, Ht = (a) => {
225
+ const { className: e, onChange: t, value: s, ...i } = a, [o, l] = de(s ?? "");
226
+ nt(s, () => {
227
227
  l(s ?? "");
228
228
  }, [o]);
229
- const d = () => {
230
- e(void 0), l("");
231
- }, c = (u) => {
232
- u.key === "Enter" ? o.trim() === "" ? e(void 0) : e(o) : u.key === "Escape" && d();
229
+ const c = () => {
230
+ t(void 0), l("");
231
+ }, d = (m) => {
232
+ m.key === "Enter" ? o.trim() === "" ? t(void 0) : t(o) : m.key === "Escape" && c();
233
233
  };
234
234
  return /* @__PURE__ */ n.createElement(
235
- re,
235
+ rt,
236
236
  {
237
- className: t,
237
+ className: e,
238
238
  value: o,
239
- onKeyUp: c,
240
- onChange: (u) => l(u),
241
- onClear: d,
239
+ onKeyUp: d,
240
+ onChange: (m) => l(m),
241
+ onClear: c,
242
242
  ...i
243
243
  }
244
244
  );
245
- }, qe = (a) => {
246
- const { className: t, search: e } = a, s = e.render ?? He;
247
- return ot(s, {
248
- className: t,
249
- value: e.value,
250
- onChange: e.setValue.bind(e),
251
- ...e.textFieldProps
245
+ }, qt = (a) => {
246
+ const { className: e, search: t } = a, s = t.render ?? Ht;
247
+ return ce(s, {
248
+ className: e,
249
+ value: t.value,
250
+ onChange: t.setValue.bind(t),
251
+ ...t.textFieldProps
252
252
  });
253
- }, Ke = ut(() => {
254
- const a = E(f), t = h(), e = t.viewMode, s = [];
255
- return t.itemView && s.push("list"), t.table && s.push("table"), s.length <= 1 ? null : /* @__PURE__ */ n.createElement(A, null, /* @__PURE__ */ n.createElement(
256
- v,
253
+ }, Kt = he(() => {
254
+ const a = y(f), e = h(), t = e.viewMode, s = [];
255
+ return e.itemView && s.push("list"), e.table && s.push("table"), s.length <= 1 ? null : /* @__PURE__ */ n.createElement(B, null, /* @__PURE__ */ n.createElement(
256
+ w,
257
257
  {
258
258
  variant: "plain",
259
259
  color: "secondary",
260
260
  "aria-label": a.format("list.settings")
261
261
  },
262
- /* @__PURE__ */ n.createElement(le, null)
263
- ), /* @__PURE__ */ n.createElement(R, { selectionMode: "single", selectedKeys: [e] }, /* @__PURE__ */ n.createElement(oe, null, /* @__PURE__ */ n.createElement($, null, a.format("list.settings.viewMode")), s.map((i) => /* @__PURE__ */ n.createElement(
264
- D,
262
+ /* @__PURE__ */ n.createElement(lt, null)
263
+ ), /* @__PURE__ */ n.createElement(z, { selectionMode: "single", selectedKeys: [t] }, /* @__PURE__ */ n.createElement(ot, null, /* @__PURE__ */ n.createElement(O, null, a.format("list.settings.viewMode")), s.map((i) => /* @__PURE__ */ n.createElement(
264
+ U,
265
265
  {
266
266
  id: i,
267
267
  key: i,
268
268
  onAction: () => {
269
- t.setViewMode(i);
269
+ e.setViewMode(i);
270
270
  }
271
271
  },
272
272
  a.format(`list.settings.viewMode.${i}`)
273
273
  )))));
274
- }), Ge = (a) => {
275
- const { className: t } = a, e = h();
276
- if (e.filters.length === 0 && e.visibleSorting.length === 0 && !e.search)
274
+ }), Gt = (a) => {
275
+ const { className: e } = a, t = h();
276
+ if (t.filters.length === 0 && t.visibleSorting.length === 0 && !t.search)
277
277
  return null;
278
- const s = e.filters.map((i) => /* @__PURE__ */ n.createElement(Ne, { key: i.property, filter: i }));
279
- return /* @__PURE__ */ n.createElement("div", { className: y(t, F.header) }, /* @__PURE__ */ n.createElement("div", { className: F.pickerListAndSearch }, /* @__PURE__ */ n.createElement("div", { className: F.pickerList }, /* @__PURE__ */ n.createElement(Me, null), s), e.search && /* @__PURE__ */ n.createElement(qe, { className: F.searchField, search: e.search }), /* @__PURE__ */ n.createElement(Ke, null)), /* @__PURE__ */ n.createElement(Oe, null));
280
- }, je = "flow--list", _e = {
281
- list: je
278
+ const s = t.filters.map((i) => /* @__PURE__ */ n.createElement(xt, { key: i.property, filter: i }));
279
+ return /* @__PURE__ */ n.createElement("div", { className: v(e, I.header) }, /* @__PURE__ */ n.createElement("div", { className: I.pickerListAndSearch }, /* @__PURE__ */ n.createElement("div", { className: I.pickerList }, /* @__PURE__ */ n.createElement(Mt, null), s), t.search && /* @__PURE__ */ n.createElement(qt, { className: I.searchField, search: t.search }), /* @__PURE__ */ n.createElement(Kt, null)), /* @__PURE__ */ n.createElement(Ot, null));
280
+ }, jt = "flow--list", _t = {
281
+ list: jt
282
282
  };
283
- let We = class Et {
284
- constructor(t, e, s) {
283
+ let Wt = class Fe {
284
+ constructor(e, t, s) {
285
285
  r(this, "id");
286
286
  r(this, "data");
287
287
  r(this, "collection");
288
- this.collection = t, this.id = e, this.data = s;
288
+ this.collection = e, this.id = t, this.data = s;
289
289
  }
290
- static fromRow(t, e) {
291
- return new Et(t, e.id, e.original);
290
+ static fromRow(e, t) {
291
+ return new Fe(e, t.id, t.original);
292
292
  }
293
293
  };
294
- class Je {
295
- constructor(t) {
294
+ class Jt {
295
+ constructor(e) {
296
296
  r(this, "list");
297
- this.list = t;
297
+ this.list = e;
298
298
  }
299
299
  get entries() {
300
- return this.list.reactTable.table.getRowModel().rows.map((t) => We.fromRow(this, t));
300
+ return this.list.reactTable.table.getRowModel().rows.map((e) => Wt.fromRow(this, e));
301
301
  }
302
302
  }
303
- class Ye {
304
- constructor(t, e = {}) {
303
+ class Yt {
304
+ constructor(e, t = {}) {
305
305
  r(this, "batchSize");
306
306
  r(this, "list");
307
307
  var i;
308
- const { batchSize: s = 20 } = e;
309
- this.list = t, this.batchSize = s, t.filters.forEach((o) => o.onFilterUpdated(() => this.reset())), (i = t.search) == null || i.onUpdated(() => this.reset());
308
+ const { batchSize: s = 20 } = t;
309
+ this.list = e, this.batchSize = s, e.filters.forEach((o) => o.onFilterUpdated(() => this.reset())), (i = e.search) == null || i.onUpdated(() => this.reset());
310
310
  }
311
311
  get reactTable() {
312
312
  return this.list.reactTable.table;
@@ -323,10 +323,10 @@ class Ye {
323
323
  getVisibleItemsCount() {
324
324
  return this.reactTable.getRowModel().rows.length ?? 0;
325
325
  }
326
- updateItemTotalCount(t) {
327
- this.reactTable.setOptions((e) => ({
328
- ...e,
329
- rowCount: t
326
+ updateItemTotalCount(e) {
327
+ this.reactTable.setOptions((t) => ({
328
+ ...t,
329
+ rowCount: e
330
330
  }));
331
331
  }
332
332
  reset() {
@@ -339,27 +339,27 @@ class Ye {
339
339
  if (this.list.loader.manualPagination)
340
340
  this.reactTable.nextPage();
341
341
  else {
342
- const t = this.reactTable.getState().pagination.pageSize + this.batchSize;
343
- this.reactTable.setPagination((e) => ({
344
- ...e,
345
- pageSize: t
342
+ const e = this.reactTable.getState().pagination.pageSize + this.batchSize;
343
+ this.reactTable.setPagination((t) => ({
344
+ ...t,
345
+ pageSize: e
346
346
  }));
347
347
  }
348
348
  }
349
349
  }
350
- const Qe = "$";
351
- class nt {
350
+ const Qt = "$";
351
+ class oe {
352
352
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
353
- constructor(t, e) {
353
+ constructor(e, t) {
354
354
  r(this, "filter");
355
355
  r(this, "value");
356
- this.filter = t, this.value = e;
356
+ this.filter = e, this.value = t;
357
357
  }
358
- equals(t) {
359
- return _t(this.value, t.value);
358
+ equals(e) {
359
+ return _e(this.value, e.value);
360
360
  }
361
361
  get id() {
362
- return `${this.filter.property}@@${mt(this.value)}`;
362
+ return `${this.filter.property}@@${pe(this.value)}`;
363
363
  }
364
364
  get isActive() {
365
365
  return this.filter.isValueActive(this);
@@ -374,9 +374,9 @@ class nt {
374
374
  this.filter.deactivateValue(this);
375
375
  }
376
376
  }
377
- const Xe = (a, t) => a === t, Ze = (a) => String(a);
378
- class ts {
379
- constructor(t, e) {
377
+ const Xt = (a, e) => a === e, Zt = (a) => String(a);
378
+ class es {
379
+ constructor(e, t) {
380
380
  r(this, "_values");
381
381
  r(this, "_valuesFromTableState");
382
382
  r(this, "list");
@@ -387,52 +387,52 @@ class ts {
387
387
  r(this, "name");
388
388
  r(this, "onFilterUpdateCallbacks", /* @__PURE__ */ new Set());
389
389
  var s;
390
- this.list = t, this.property = e.property, this.mode = e.mode ?? "one", this._values = (s = e.values) == null ? void 0 : s.map((i) => new nt(this, i)), this.matcher = e.matcher ?? Xe, this.renderItem = e.renderItem ?? Ze, this.name = e.name;
390
+ this.list = e, this.property = t.property, this.mode = t.mode ?? "one", this._values = (s = t.values) == null ? void 0 : s.map((i) => new oe(this, i)), this.matcher = t.matcher ?? Xt, this.renderItem = t.renderItem ?? Zt, this.name = t.name;
391
391
  }
392
- updateTableColumnDef(t) {
393
- t.enableColumnFilter = !0, t.filterFn = this.getReactTableFilterFn();
392
+ updateTableColumnDef(e) {
393
+ e.enableColumnFilter = !0, e.filterFn = this.getReactTableFilterFn();
394
394
  }
395
395
  getReactTableFilterFn() {
396
- return (t, e, s) => {
397
- const i = this.property, o = i.startsWith(Qe) ? t.original : ce(t.original, i);
396
+ return (e, t, s) => {
397
+ const i = this.property, o = i.startsWith(Qt) ? e.original : ct(e.original, i);
398
398
  return this.checkFilterMatches(o, s);
399
399
  };
400
400
  }
401
- checkFilterMatches(t, e) {
402
- if (e === null)
401
+ checkFilterMatches(e, t) {
402
+ if (t === null)
403
403
  return !0;
404
- const s = (o) => Array.isArray(o) ? o : [o], i = (o) => this.matcher(o.value, t);
404
+ const s = (o) => Array.isArray(o) ? o : [o], i = (o) => this.matcher(o.value, e);
405
405
  if (this.mode === "all")
406
- return s(e).every(i);
406
+ return s(t).every(i);
407
407
  if (this.mode === "some") {
408
- const o = s(e);
408
+ const o = s(t);
409
409
  return o.length === 0 || o.some(i);
410
410
  } else if (this.mode === "one")
411
- return i(e);
411
+ return i(t);
412
412
  throw new Error(`Unknown filter mode '${this.mode}'`);
413
413
  }
414
414
  getTableColumnFilter() {
415
- return this.list.reactTable.table.getState().columnFilters.find((t) => t.id === this.property);
415
+ return this.list.reactTable.table.getState().columnFilters.find((e) => e.id === this.property);
416
416
  }
417
417
  getTableColumn() {
418
418
  return this.list.reactTable.getTableColumn(this.property);
419
419
  }
420
420
  getValue() {
421
- var t;
422
- return ((t = this.getTableColumnFilter()) == null ? void 0 : t.value) ?? null;
421
+ var e;
422
+ return ((e = this.getTableColumnFilter()) == null ? void 0 : e.value) ?? null;
423
423
  }
424
424
  getValuesFromTableState() {
425
- return Wt(
426
- Array.from(this.getTableColumn().getFacetedUniqueValues().keys()).flatMap((t) => t).filter((t) => t != null)
427
- ).map((t) => new nt(this, t));
425
+ return We(
426
+ Array.from(this.getTableColumn().getFacetedUniqueValues().keys()).flatMap((e) => e).filter((e) => e != null)
427
+ ).map((e) => new oe(this, e));
428
428
  }
429
- checkIfValueIsUnknown(t) {
430
- return !this.values.some((s) => s.id === t.id);
429
+ checkIfValueIsUnknown(e) {
430
+ return !this.values.some((s) => s.id === e.id);
431
431
  }
432
432
  deleteUnknownFilterValues() {
433
433
  if (this.values !== this.valuesFromTableState)
434
- for (const t of this.getArrayValue())
435
- this.checkIfValueIsUnknown(t) && this.deactivateValue(t);
434
+ for (const e of this.getArrayValue())
435
+ this.checkIfValueIsUnknown(e) && this.deactivateValue(e);
436
436
  }
437
437
  get values() {
438
438
  return this._values ?? this.valuesFromTableState;
@@ -441,44 +441,44 @@ class ts {
441
441
  return this._valuesFromTableState || (this._valuesFromTableState = this.getValuesFromTableState()), this._valuesFromTableState;
442
442
  }
443
443
  getArrayValue() {
444
- const t = this.getValue();
445
- return Array.isArray(t) ? t : t === null ? [] : [t];
444
+ const e = this.getValue();
445
+ return Array.isArray(e) ? e : e === null ? [] : [e];
446
446
  }
447
- isValueActive(t) {
448
- return this.getArrayValue().some((e) => e.equals(t));
447
+ isValueActive(e) {
448
+ return this.getArrayValue().some((t) => t.equals(e));
449
449
  }
450
450
  isActive() {
451
451
  return this.getArrayValue().length > 0;
452
452
  }
453
- deactivateValue(t) {
454
- const e = this.getArrayValue();
453
+ deactivateValue(e) {
454
+ const t = this.getArrayValue();
455
455
  let s;
456
- this.mode === "all" || this.mode === "some" ? s = e.filter((i) => !i.equals(t)) : s = null, this.list.reactTable.getTableColumn(this.property).setFilterValue(s), this.onFilterUpdateCallbacks.forEach((i) => i());
456
+ 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());
457
457
  }
458
458
  clearValues() {
459
- let t;
460
- this.mode === "all" || this.mode === "some" ? t = [] : t = null, this.list.reactTable.getTableColumn(this.property).setFilterValue(t), this.onFilterUpdateCallbacks.forEach((e) => e());
459
+ let e;
460
+ this.mode === "all" || this.mode === "some" ? e = [] : e = null, this.list.reactTable.getTableColumn(this.property).setFilterValue(e), this.onFilterUpdateCallbacks.forEach((t) => t());
461
461
  }
462
- toggleValue(t) {
463
- const e = this.getArrayValue();
462
+ toggleValue(e) {
463
+ const t = this.getArrayValue();
464
464
  let s;
465
- this.mode === "all" || this.mode === "some" ? t.isActive ? s = e.filter((i) => !i.equals(t)) : s = [...e, t] : s = t.isActive ? null : t, this.list.reactTable.getTableColumn(this.property).setFilterValue(s), this.onFilterUpdateCallbacks.forEach((i) => i());
465
+ 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());
466
466
  }
467
- onFilterUpdated(t) {
468
- this.onFilterUpdateCallbacks.add(t);
467
+ onFilterUpdated(e) {
468
+ this.onFilterUpdateCallbacks.add(e);
469
469
  }
470
470
  }
471
- class es {
472
- constructor(t, e) {
471
+ class ts {
472
+ constructor(e, t) {
473
473
  r(this, "list");
474
474
  r(this, "property");
475
475
  r(this, "name");
476
476
  r(this, "direction");
477
477
  r(this, "defaultEnabled");
478
- this.list = t, this.property = e.property, this.name = e.name, this.direction = e.direction ?? "asc", this.defaultEnabled = e.defaultEnabled ?? !1;
478
+ this.list = e, this.property = t.property, this.name = t.name, this.direction = t.direction ?? "asc", this.defaultEnabled = t.defaultEnabled ?? !1;
479
479
  }
480
- updateTableColumnDef(t) {
481
- t.enableSorting = !0;
480
+ updateTableColumnDef(e) {
481
+ e.enableSorting = !0;
482
482
  }
483
483
  getReactTableColumnSort() {
484
484
  return {
@@ -502,66 +502,67 @@ class es {
502
502
  return `${this.getTableColumn().id}:${this.direction}`;
503
503
  }
504
504
  }
505
- class U {
506
- constructor(t, e, s = {}) {
505
+ class q {
506
+ constructor(e, t, s = {}) {
507
507
  r(this, "list");
508
508
  r(this, "table");
509
509
  r(this, "sortingState");
510
510
  r(this, "updateSortingState");
511
- this.list = t;
511
+ this.list = e;
512
512
  const i = this.list.sorting.filter(
513
- (d) => d.defaultEnabled !== !1
514
- ), [o, l] = lt(
515
- i.map((d) => d.getReactTableColumnSort())
513
+ (c) => c.defaultEnabled !== !1
514
+ ), [o, l] = de(
515
+ i.map((c) => c.getReactTableColumnSort())
516
516
  );
517
- this.sortingState = o, this.updateSortingState = l, this.table = this.useReactTable(e, s);
517
+ this.sortingState = o, this.updateSortingState = l, this.table = this.useReactTable(t, s);
518
518
  }
519
- static useNew(t, e, s = {}) {
520
- return new U(t, e, s);
519
+ static useNew(e, t, s = {}) {
520
+ return new q(e, t, s);
521
521
  }
522
- useReactTable(t, e = {}) {
523
- const s = this.list.loader.useData(), i = de({
522
+ useReactTable(e, t = {}) {
523
+ const s = this.list.loader.useData(), i = dt({
524
524
  data: s,
525
525
  state: {
526
526
  sorting: this.sortingState
527
527
  },
528
+ getRowId: this.list.getItemId,
528
529
  initialState: {
529
530
  pagination: {
530
531
  pageSize: this.list.batches.batchSize
531
532
  }
532
533
  },
533
534
  columns: this.getTableColumnDefs(),
534
- getCoreRowModel: ue(),
535
- getSortedRowModel: me(),
536
- getFilteredRowModel: he(),
537
- getPaginationRowModel: pe(),
538
- getFacetedUniqueValues: ge(),
535
+ getCoreRowModel: mt(),
536
+ getSortedRowModel: ut(),
537
+ getFilteredRowModel: ht(),
538
+ getPaginationRowModel: pt(),
539
+ getFacetedUniqueValues: gt(),
539
540
  onSortingChange: (o) => {
540
541
  this.handleSortingStateUpdate(o);
541
542
  },
542
543
  globalFilterFn: "auto",
543
- ...e
544
+ ...t
544
545
  });
545
- return I(() => {
546
- t && t(this.list);
547
- }, [this.list, t, i]), i;
546
+ return k(() => {
547
+ e && e(this.list);
548
+ }, [this.list, e, i]), i;
548
549
  }
549
- handleSortingStateUpdate(t) {
550
- const e = typeof t == "function" ? t(this.sortingState) : t, s = this.list.sorting.filter(
551
- (i) => i.defaultEnabled === "hidden" && !e.some((o) => o.id === i.property)
550
+ handleSortingStateUpdate(e) {
551
+ const t = typeof e == "function" ? e(this.sortingState) : e, s = this.list.sorting.filter(
552
+ (i) => i.defaultEnabled === "hidden" && !t.some((o) => o.id === i.property)
552
553
  ).map((i) => i.getReactTableColumnSort());
553
- this.updateSortingState([...s, ...e]);
554
+ this.updateSortingState([...s, ...t]);
554
555
  }
555
556
  get searchString() {
556
557
  return this.table.getState().globalFilter;
557
558
  }
558
- getTableColumn(t) {
559
- const e = this.table.getColumn(t);
560
- return ht(!!e, `Column #${t} is not defined`), e;
559
+ getTableColumn(e) {
560
+ const t = this.table.getColumn(e);
561
+ return ge(!!t, `Column #${e} is not defined`), t;
561
562
  }
562
563
  getTableColumnDefs() {
563
- const t = /* @__PURE__ */ new Map(), e = (s) => {
564
- const i = t.get(s);
564
+ const e = /* @__PURE__ */ new Map(), t = (s) => {
565
+ const i = e.get(s);
565
566
  if (i)
566
567
  return i;
567
568
  const o = {
@@ -570,75 +571,75 @@ class U {
570
571
  enableSorting: !1,
571
572
  enableColumnFilter: !1
572
573
  };
573
- return t.set(s, o), o;
574
+ return e.set(s, o), o;
574
575
  };
575
576
  return this.list.filters.forEach(
576
- (s) => s.updateTableColumnDef(e(s.property))
577
+ (s) => s.updateTableColumnDef(t(s.property))
577
578
  ), this.list.sorting.forEach(
578
- (s) => s.updateTableColumnDef(e(s.property))
579
- ), Array.from(t.values());
579
+ (s) => s.updateTableColumnDef(t(s.property))
580
+ ), Array.from(e.values());
580
581
  }
581
582
  }
582
- class O {
583
+ class K {
583
584
  constructor() {
584
585
  r(this, "dataBatches", []);
585
586
  r(this, "prevDataBatches", []);
586
587
  r(this, "batchLoadingStates", ["void"]);
587
- ae(this, {
588
+ at(this, {
588
589
  prevDataBatches: !1,
589
590
  useMergedData: !1,
590
591
  useIsLoading: !1,
591
- dataBatches: tt.shallow,
592
- batchLoadingStates: tt.shallow,
593
- mergedData: et,
594
- isLoading: et,
595
- reset: B.bound,
596
- setDataBatch: B.bound,
597
- setBatchLoadingState: B.bound
592
+ dataBatches: se.shallow,
593
+ batchLoadingStates: se.shallow,
594
+ mergedData: ae,
595
+ isLoading: ae,
596
+ reset: R.bound,
597
+ setDataBatch: R.bound,
598
+ setBatchLoadingState: R.bound
598
599
  });
599
600
  }
600
601
  static useNew() {
601
- return ct(new O()).current;
602
+ return me(new K()).current;
602
603
  }
603
604
  reset() {
604
605
  this.batchLoadingStates = [], this.dataBatches = [];
605
606
  }
606
- setDataBatch(t, e) {
607
- this.dataBatches.length === 0 && (this.prevDataBatches = []), this.dataBatches[t] !== e && (this.dataBatches[t] = e, this.prevDataBatches[t] = e);
607
+ setDataBatch(e, t) {
608
+ this.dataBatches.length === 0 && (this.prevDataBatches = []), this.dataBatches[e] !== t && (this.dataBatches[e] = t, this.prevDataBatches[e] = t);
608
609
  }
609
- setBatchLoadingState(t, e) {
610
- this.batchLoadingStates[t] !== e && (this.batchLoadingStates[t] = e);
610
+ setBatchLoadingState(e, t) {
611
+ this.batchLoadingStates[e] !== t && (this.batchLoadingStates[e] = t);
611
612
  }
612
613
  get mergedData() {
613
- return (this.dataBatches.length === 0 ? this.prevDataBatches : this.dataBatches).flatMap((e) => e);
614
+ return (this.dataBatches.length === 0 ? this.prevDataBatches : this.dataBatches).flatMap((t) => t);
614
615
  }
615
616
  useMergedData() {
616
- return at(() => this.mergedData);
617
+ return ne(() => this.mergedData);
617
618
  }
618
619
  get isLoading() {
619
- return this.batchLoadingStates.some((t) => t === "loading" || t === "void");
620
+ return this.batchLoadingStates.some((e) => e === "loading" || e === "void");
620
621
  }
621
622
  useIsLoading() {
622
- return at(() => this.isLoading);
623
+ return ne(() => this.isLoading);
623
624
  }
624
625
  }
625
626
  const ss = [];
626
- class H {
627
- constructor(t, e = {}) {
627
+ class G {
628
+ constructor(e, t = {}) {
628
629
  r(this, "list");
629
630
  r(this, "dataSource");
630
631
  r(this, "manualSorting");
631
632
  r(this, "manualFiltering");
632
633
  r(this, "manualPagination");
633
634
  r(this, "loaderState");
634
- var d;
635
- const { source: s } = e;
635
+ var c;
636
+ const { source: s } = t;
636
637
  this.dataSource = s ?? { staticData: ss };
637
638
  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;
638
- this.list = t, this.loaderState = O.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());
639
+ this.list = e, this.loaderState = K.useNew(), this.manualPagination = i ?? !1, this.manualFiltering = o ?? this.manualPagination, this.manualSorting = l ?? this.manualPagination, this.list.filters.forEach((d) => d.onFilterUpdated(() => this.reset())), (c = this.list.search) == null || c.onUpdated(() => this.reset());
639
640
  }
640
- static useNew(t, e = {}) {
641
- return new H(t, e);
641
+ static useNew(e, t = {}) {
642
+ return new G(e, t);
642
643
  }
643
644
  reset() {
644
645
  this.loaderState.reset();
@@ -653,84 +654,84 @@ class H {
653
654
  return this.loaderState.useMergedData();
654
655
  }
655
656
  getLoaderInvocationHooks() {
656
- return Jt(this.list.batches.getBatchIndex() + 1, (e) => e).map((e) => () => {
657
- this.useLoadBatch(e);
657
+ return Je(this.list.batches.getBatchIndex() + 1, (t) => t).map((t) => () => {
658
+ this.useLoadBatch(t);
658
659
  });
659
660
  }
660
- useLoadBatch(t) {
661
- const e = this.getBatchDataAsyncResource(t);
662
- e.use({
661
+ useLoadBatch(e) {
662
+ const t = this.getBatchDataAsyncResource(e);
663
+ t.use({
663
664
  useSuspense: !1
664
- }), this.useObserveBatchData(e, t), this.useObserveBatchLoadingState(e, t);
665
+ }), this.useObserveBatchData(t, e), this.useObserveBatchLoadingState(t, e);
665
666
  }
666
- useObserveBatchLoadingState(t, e) {
667
- I(() => (this.loaderState.setBatchLoadingState(
668
- e,
669
- t.state.value
670
- ), t.state.observe((s) => {
671
- this.loaderState.setBatchLoadingState(e, s);
672
- })), [t, e]);
667
+ useObserveBatchLoadingState(e, t) {
668
+ k(() => (this.loaderState.setBatchLoadingState(
669
+ t,
670
+ e.state.value
671
+ ), e.state.observe((s) => {
672
+ this.loaderState.setBatchLoadingState(t, s);
673
+ })), [e, t]);
673
674
  }
674
- useObserveBatchData(t, e) {
675
+ useObserveBatchData(e, t) {
675
676
  const s = (i) => {
676
677
  const { data: o, itemTotalCount: l } = i;
677
- this.loaderState.setDataBatch(e, o), l !== void 0 && this.list.batches.updateItemTotalCount(l);
678
+ this.loaderState.setDataBatch(t, o), l !== void 0 && this.list.batches.updateItemTotalCount(l);
678
679
  };
679
- I(() => (t.value.value.isSet && s(t.value.value.value), t.value.observe((i) => {
680
+ k(() => (e.value.value.isSet && s(e.value.value.value), e.value.observe((i) => {
680
681
  i.isSet && s(i.value);
681
- })), [t, e]);
682
+ })), [e, t]);
682
683
  }
683
- getDataLoaderOptions(t) {
684
+ getDataLoaderOptions(e) {
684
685
  return {
685
686
  pagination: this.manualPagination ? {
686
687
  limit: this.list.batches.batchSize,
687
- offset: this.list.batches.batchSize * t
688
+ offset: this.list.batches.batchSize * e
688
689
  } : void 0,
689
690
  sorting: this.manualSorting ? Object.fromEntries(
690
- this.list.sorting.filter((e) => e.isSorted()).map((e) => [e.property, e.direction])
691
+ this.list.sorting.filter((t) => t.isSorted()).map((t) => [t.property, t.direction])
691
692
  ) : void 0,
692
693
  filtering: this.manualFiltering ? Object.fromEntries(
693
- this.list.filters.filter((e) => e.getValue() !== null).map((e) => [
694
- e.property,
694
+ this.list.filters.filter((t) => t.getValue() !== null).map((t) => [
695
+ t.property,
695
696
  {
696
- mode: e.mode,
697
- values: e.getArrayValue().map((s) => s.value)
697
+ mode: t.mode,
698
+ values: t.getArrayValue().map((s) => s.value)
698
699
  }
699
700
  ])
700
701
  ) : void 0,
701
702
  searchString: this.manualFiltering ? this.list.reactTable.searchString : void 0
702
703
  };
703
704
  }
704
- getBatchDataAsyncResource(t) {
705
- const e = this.dataSource, s = this.getDataLoaderOptions(t);
706
- if ("staticData" in e)
707
- return st(
705
+ getBatchDataAsyncResource(e) {
706
+ const t = this.dataSource, s = this.getDataLoaderOptions(e);
707
+ if ("staticData" in t)
708
+ return ie(
708
709
  async (i) => ({
709
710
  data: i,
710
711
  itemTotalCount: i.length
711
712
  }),
712
- [e.staticData]
713
+ [t.staticData]
713
714
  );
714
- if ("asyncLoader" in e) {
715
- const i = e.asyncLoader, o = e.dependencies, l = o ? mt(o).toString() : void 0;
716
- return st(i, [s], {
715
+ if ("asyncLoader" in t) {
716
+ const i = t.asyncLoader, o = t.dependencies, l = o ? pe(o).toString() : void 0;
717
+ return ie(i, [s], {
717
718
  loaderId: l
718
719
  });
719
720
  }
720
- if ("asyncResourceFactory" in e) {
721
- const i = e.asyncResourceFactory;
721
+ if ("asyncResourceFactory" in t) {
722
+ const i = t.asyncResourceFactory;
722
723
  return i(s);
723
724
  }
724
725
  throw new Error("Unknown data source");
725
726
  }
726
727
  }
727
728
  class as {
728
- constructor(t, e) {
729
+ constructor(e, t) {
729
730
  r(this, "list");
730
731
  r(this, "render");
731
732
  r(this, "textFieldProps");
732
733
  r(this, "onUpdateCallbacks", /* @__PURE__ */ new Set());
733
- this.list = t, this.render = e.render, this.textFieldProps = e.textFieldProps;
734
+ this.list = e, this.render = t.render, this.textFieldProps = t.textFieldProps;
734
735
  }
735
736
  get value() {
736
737
  return this.list.reactTable.searchString;
@@ -739,83 +740,82 @@ class as {
739
740
  return this.value !== void 0;
740
741
  }
741
742
  callOnUpdateCallbacks() {
742
- this.onUpdateCallbacks.forEach((t) => t());
743
+ this.onUpdateCallbacks.forEach((e) => e());
743
744
  }
744
- setValue(t) {
745
- t === void 0 || t.trim() === "" ? this.list.reactTable.table.getState().globalFilter && (this.list.reactTable.table.resetGlobalFilter(), this.callOnUpdateCallbacks()) : (this.list.reactTable.table.setGlobalFilter(t), this.callOnUpdateCallbacks());
745
+ setValue(e) {
746
+ e === void 0 || e.trim() === "" ? this.list.reactTable.table.getState().globalFilter && (this.list.reactTable.table.resetGlobalFilter(), this.callOnUpdateCallbacks()) : (this.list.reactTable.table.setGlobalFilter(e), this.callOnUpdateCallbacks());
746
747
  }
747
748
  clear() {
748
749
  this.setValue(void 0);
749
750
  }
750
- onUpdated(t) {
751
- this.onUpdateCallbacks.add(t);
751
+ onUpdated(e) {
752
+ this.onUpdateCallbacks.add(e);
752
753
  }
753
754
  }
754
- const k = class k {
755
- constructor(t, e = {}) {
755
+ const V = class V {
756
+ constructor(e, t = {}) {
756
757
  r(this, "list");
757
758
  r(this, "textValue");
758
759
  r(this, "href");
759
760
  r(this, "fallback");
760
761
  r(this, "renderFn");
761
- const { fallback: s, textValue: i, href: o, renderFn: l } = e;
762
- this.list = t, this.textValue = i, this.renderFn = l, this.href = o, this.fallback = s;
762
+ const { fallback: s, textValue: i, href: o, renderFn: l } = t;
763
+ this.list = e, this.textValue = i, this.renderFn = l, this.href = o, this.fallback = s;
763
764
  }
764
- render(t) {
765
- return (this.renderFn ?? k.fallbackRenderItemFn)(t);
765
+ render(e) {
766
+ return (this.renderFn ?? V.fallbackRenderItemFn)(e);
766
767
  }
767
768
  };
768
- r(k, "fallbackRenderItemFn", (t) => ot("pre", void 0, JSON.stringify(t)));
769
- let N = k, is = class {
770
- constructor(t, e = {}) {
769
+ r(V, "fallbackRenderItemFn", (e) => ce("pre", void 0, JSON.stringify(e)));
770
+ let D = V, is = class {
771
+ constructor(e, t = {}) {
771
772
  r(this, "tableHeader");
772
773
  r(this, "componentProps");
773
- this.tableHeader = t, this.componentProps = e;
774
+ this.tableHeader = e, this.componentProps = t;
774
775
  }
775
776
  }, ns = class {
776
- constructor(t, e = {}) {
777
+ constructor(e, t = {}) {
777
778
  r(this, "table");
778
779
  r(this, "componentProps");
779
780
  r(this, "columns");
780
- const { columns: s = [], ...i } = e;
781
- this.table = t, this.columns = s.map((o) => new is(this, o)), this.componentProps = i;
781
+ const { columns: s = [], ...i } = t;
782
+ this.table = e, this.columns = s.map((o) => new is(this, o)), this.componentProps = i;
782
783
  }
783
784
  }, rs = class {
784
- constructor(t, e = {}) {
785
+ constructor(e, t = {}) {
785
786
  r(this, "row");
786
787
  r(this, "renderFn");
787
788
  r(this, "componentProps");
788
- const { renderFn: s, ...i } = e;
789
- this.row = t, this.renderFn = s, this.componentProps = i;
789
+ const { renderFn: s, ...i } = t;
790
+ this.row = e, this.renderFn = s, this.componentProps = i;
790
791
  }
791
792
  }, os = class {
792
- constructor(t, e = {}) {
793
+ constructor(e, t = {}) {
793
794
  r(this, "tableBody");
794
- r(this, "onAction");
795
795
  r(this, "cells");
796
796
  r(this, "componentProps");
797
- const { onAction: s, cells: i = [], ...o } = e;
798
- this.tableBody = t, this.onAction = s, this.cells = i.map((l) => new rs(this, l)), this.componentProps = o;
797
+ const { cells: s = [], ...i } = t;
798
+ this.tableBody = e, this.cells = s.map((o) => new rs(this, o)), this.componentProps = i;
799
799
  }
800
800
  }, ls = class {
801
- constructor(t, e = {}) {
801
+ constructor(e, t = {}) {
802
802
  r(this, "table");
803
803
  r(this, "componentProps");
804
804
  r(this, "row");
805
- const { row: s, ...i } = e;
806
- this.table = t, this.row = new os(this, s), this.componentProps = i;
805
+ const { row: s, ...i } = t;
806
+ this.table = e, this.row = new os(this, s), this.componentProps = i;
807
807
  }
808
808
  }, cs = class {
809
- constructor(t, e = {}) {
809
+ constructor(e, t = {}) {
810
810
  r(this, "list");
811
811
  r(this, "header");
812
812
  r(this, "body");
813
813
  r(this, "componentProps");
814
- const { header: s, body: i, ...o } = e;
815
- this.list = t, this.header = new ns(this, s), this.body = new ls(this, i), this.componentProps = o;
814
+ const { header: s, body: i, ...o } = t;
815
+ this.list = e, this.header = new ns(this, s), this.body = new ls(this, i), this.componentProps = o;
816
816
  }
817
- }, ds = class Tt {
818
- constructor(t) {
817
+ }, ds = class Ce {
818
+ constructor(e) {
819
819
  r(this, "filters");
820
820
  r(this, "itemView");
821
821
  r(this, "table");
@@ -826,199 +826,225 @@ let N = k, is = class {
826
826
  r(this, "batches");
827
827
  r(this, "loader");
828
828
  r(this, "onAction");
829
+ r(this, "getItemId");
829
830
  r(this, "componentProps");
830
- r(this, "viewMode", "list");
831
+ r(this, "viewMode");
831
832
  const {
832
- itemView: e,
833
+ itemView: t,
833
834
  table: s,
834
835
  filters: i = [],
835
836
  sorting: o = [],
836
837
  batchesController: l,
837
- onChange: d,
838
- loader: c,
839
- search: u,
838
+ onChange: c,
839
+ loader: d,
840
+ search: m,
840
841
  onAction: g,
841
- ...S
842
- } = t;
843
- this.items = new Je(this), this.filters = i.map((w) => new ts(this, w)), this.sorting = o.map((w) => new es(this, w)), this.search = u ? new as(this, u) : void 0, this.itemView = e ? new N(this, e) : void 0, this.table = s ? new cs(this, s) : void 0, this.batches = new Ye(this, l), this.componentProps = S, this.loader = H.useNew(this, c), this.onAction = g, this.reactTable = U.useNew(this, d, {
842
+ getItemId: T,
843
+ defaultViewMode: M,
844
+ ...C
845
+ } = e;
846
+ this.items = new Jt(this), this.viewMode = M ?? "list", this.filters = i.map((S) => new es(this, S)), this.sorting = o.map((S) => new ts(this, S)), this.search = m ? new as(this, m) : void 0, this.itemView = t ? new D(this, t) : void 0, this.table = s ? new cs(this, s) : void 0, this.batches = new Yt(this, l), this.componentProps = C, this.loader = G.useNew(this, d), this.onAction = g, this.getItemId = T, this.reactTable = q.useNew(this, c, {
844
847
  manualFiltering: this.loader.manualFiltering,
845
848
  manualPagination: this.loader.manualPagination,
846
849
  manualSorting: this.loader.manualSorting
847
- }), I(() => {
848
- this.filters.forEach((w) => w.deleteUnknownFilterValues());
849
- }, [this.filters]), ie(this, { viewMode: !0, setViewMode: !0 });
850
+ }), k(() => {
851
+ this.filters.forEach((S) => S.deleteUnknownFilterValues());
852
+ }, [this.filters]), it(this, { viewMode: !0, setViewMode: !0 });
850
853
  }
851
- static useNew(t) {
852
- return ct(new Tt(t)).current;
854
+ static useNew(e) {
855
+ return me(new Ce(e)).current;
853
856
  }
854
857
  get isFiltered() {
855
- return this.filters.some((t) => t.isActive()) || !!this.search && this.search.isSet;
858
+ return this.filters.some((e) => e.isActive()) || !!this.search && this.search.isSet;
856
859
  }
857
860
  get visibleSorting() {
858
- return this.sorting.filter((t) => t.defaultEnabled !== "hidden");
861
+ return this.sorting.filter((e) => e.defaultEnabled !== "hidden");
859
862
  }
860
- getSorting(t) {
861
- const e = this.sorting.find((s) => s.id === t);
862
- return ht(!!e, `Could not get Sorting (ID: ${t})`), e;
863
+ getSorting(e) {
864
+ const t = this.sorting.find((s) => s.id === e);
865
+ return ge(!!t, `Could not get Sorting (ID: ${e})`), t;
863
866
  }
864
867
  clearSorting() {
865
- return this.sorting.forEach((t) => t.clear());
868
+ return this.sorting.forEach((e) => e.clear());
866
869
  }
867
870
  clearFilters() {
868
- var t;
869
- return (t = this.search) == null || t.clear(), this.filters.forEach((e) => e.clearValues());
871
+ var e;
872
+ return (e = this.search) == null || e.clear(), this.filters.forEach((t) => t.clearValues());
870
873
  }
871
874
  useIsEmpty() {
872
875
  return !this.loader.useIsLoading() && this.items.entries.length === 0;
873
876
  }
874
- setViewMode(t) {
875
- this.viewMode = t;
877
+ setViewMode(e) {
878
+ this.viewMode = e;
876
879
  }
877
880
  };
878
- const us = "flow--list--items", ms = "flow--list--items--is-loading", rt = {
879
- items: us,
880
- isLoading: ms
881
- }, hs = "flow--list--items--item", ps = "flow--list--items--item--has-action", x = {
881
+ const ms = "flow--list--items", us = "flow--list--items--is-loading", le = {
882
+ items: ms,
883
+ isLoading: us
884
+ }, hs = "flow--list--items--item", ps = "flow--list--items--item--is-selected", gs = "flow--list--items--item--has-action", P = {
882
885
  item: hs,
883
- hasAction: ps
884
- }, gs = (a) => {
885
- const { data: t, children: e } = a, i = h().itemView;
886
- if (!i)
886
+ isSelected: ps,
887
+ hasAction: gs
888
+ }, bs = (a) => {
889
+ const { id: e, data: t, children: s } = a, o = h().itemView;
890
+ if (!o)
887
891
  return null;
888
- const o = i.list.onAction, l = i.textValue ? i.textValue(t) : void 0, d = i.href ? i.href(t) : void 0, c = !!o || !!d, u = y(x.item, c && x.hasAction);
892
+ const l = o.list.onAction, c = o.textValue ? o.textValue(t) : void 0, d = o.href ? o.href(t) : void 0, m = !!l || !!d;
889
893
  return /* @__PURE__ */ n.createElement(
890
- z.GridListItem,
894
+ H.GridListItem,
891
895
  {
892
- className: u,
893
- onAction: () => o && o(t),
894
- textValue: l,
896
+ id: e,
897
+ className: (g) => v(
898
+ P.item,
899
+ m && P.hasAction,
900
+ g.isSelected && P.isSelected
901
+ ),
902
+ onAction: () => l && l(t),
903
+ textValue: c,
895
904
  href: d
896
905
  },
897
- e ?? i.render(t)
906
+ s ?? o.render(t)
898
907
  );
899
- }, bs = (a) => /* @__PURE__ */ n.createElement(z.GridListItem, { textValue: "-", className: x.item }, a.children), Ct = () => {
900
- const a = E(f);
901
- return /* @__PURE__ */ n.createElement(be, null, /* @__PURE__ */ n.createElement(fe, null), /* @__PURE__ */ n.createElement($, null, a.format("list.noResult.heading")), /* @__PURE__ */ n.createElement(T, null, a.format("list.noResult.text")));
902
- }, fs = () => /* @__PURE__ */ n.createElement(vt, null, /* @__PURE__ */ n.createElement($, null, /* @__PURE__ */ n.createElement(P, { width: "200px" })), /* @__PURE__ */ n.createElement(T, null, /* @__PURE__ */ n.createElement(P, { width: "300px" }))), Ss = () => {
903
- var e;
904
- const t = ((e = h().itemView) == null ? void 0 : e.fallback) ?? /* @__PURE__ */ n.createElement(fs, null);
905
- return Array.from(Array(5)).map((s, i) => /* @__PURE__ */ n.createElement(bs, { key: i }, Gt(t)));
906
- }, ws = () => {
907
- const a = h(), t = a.loader.useIsLoading(), e = a.loader.useIsInitiallyLoading(), s = a.useIsEmpty();
908
+ }, fs = (a) => /* @__PURE__ */ n.createElement(H.GridListItem, { textValue: "-", className: P.item }, a.children), $ = () => {
909
+ const a = y(f);
910
+ return /* @__PURE__ */ n.createElement(bt, null, /* @__PURE__ */ n.createElement(ft, null), /* @__PURE__ */ n.createElement(O, null, a.format("list.noResult.heading")), /* @__PURE__ */ n.createElement(E, null, a.format("list.noResult.text")));
911
+ }, Ss = () => /* @__PURE__ */ n.createElement(Ee, null, /* @__PURE__ */ n.createElement(O, null, /* @__PURE__ */ n.createElement(A, { width: "200px" })), /* @__PURE__ */ n.createElement(E, null, /* @__PURE__ */ n.createElement(A, { width: "300px" }))), ws = () => {
912
+ var t;
913
+ const e = ((t = h().itemView) == null ? void 0 : t.fallback) ?? /* @__PURE__ */ n.createElement(Ss, null);
914
+ return Array.from(Array(5)).map((s, i) => /* @__PURE__ */ n.createElement(fs, { key: i }, Ge(e)));
915
+ }, vs = () => {
916
+ const a = h(), e = a.loader.useIsLoading(), t = a.loader.useIsInitiallyLoading();
908
917
  if (!a.itemView)
909
918
  return null;
910
- const i = a.items.entries.map((l) => /* @__PURE__ */ n.createElement(gs, { key: l.id, data: l.data })), o = y(rt.items, t && rt.isLoading);
911
- return s ? /* @__PURE__ */ n.createElement(Ct, null) : /* @__PURE__ */ n.createElement("div", { "aria-hidden": e, "aria-busy": t }, /* @__PURE__ */ n.createElement(z.GridList, { className: o, ...a.componentProps }, e ? /* @__PURE__ */ n.createElement(Ss, null) : i));
912
- }, Ft = (a) => null, vs = () => Ft, Lt = (a) => null, ys = () => Lt, It = (a) => null, Es = () => It, Pt = (a) => null, Ts = () => Pt, kt = (a) => null, Cs = () => kt, Fs = "flow--list--footer", Ls = {
913
- footer: Fs
914
- }, Is = (a) => {
915
- const t = E(f), e = h(), s = e.batches, i = e.loader.useIsInitiallyLoading(), o = e.useIsEmpty(), l = s.getTotalItemsCount(), d = s.getVisibleItemsCount();
919
+ const s = a.items.entries.map((o) => /* @__PURE__ */ n.createElement(bs, { key: o.id, data: o.data, id: o.id })), i = v(le.items, e && le.isLoading);
920
+ return /* @__PURE__ */ n.createElement("div", { "aria-hidden": t, "aria-busy": e }, /* @__PURE__ */ n.createElement(
921
+ H.GridList,
922
+ {
923
+ className: i,
924
+ ...a.componentProps,
925
+ renderEmptyState: () => /* @__PURE__ */ n.createElement($, null)
926
+ },
927
+ t ? /* @__PURE__ */ n.createElement(ws, null) : s
928
+ ));
929
+ }, Le = (a) => null, ys = () => Le, Ie = (a) => null, Es = () => Ie, Pe = (a) => null, Ts = () => Pe, ke = (a) => null, Fs = () => ke, Ae = (a) => null, Cs = () => Ae, Ls = "flow--list--footer", Is = {
930
+ footer: Ls
931
+ }, Ps = (a) => {
932
+ const e = y(f), t = h(), s = t.batches, i = t.loader.useIsInitiallyLoading(), o = t.useIsEmpty(), l = s.getTotalItemsCount(), c = s.getVisibleItemsCount();
916
933
  if (o)
917
934
  return null;
918
- const c = i ? /* @__PURE__ */ n.createElement(ve, { width: "200px" }) : t.format("list.paginationInfo", {
919
- visibleItemsCount: d,
935
+ const d = i ? /* @__PURE__ */ n.createElement(vt, { width: "200px" }) : e.format("list.paginationInfo", {
936
+ visibleItemsCount: c,
920
937
  totalItemsCount: l
921
938
  });
922
- return /* @__PURE__ */ n.createElement(T, { ...a }, c);
923
- }, Ps = (a) => {
924
- const t = E(f), e = h(), s = e.loader.useIsLoading(), i = e.loader.useIsInitiallyLoading();
925
- return !e.batches.hasNextBatch() && !s ? null : /* @__PURE__ */ n.createElement(
926
- v,
939
+ return /* @__PURE__ */ n.createElement(E, { ...a }, d);
940
+ }, ks = (a) => {
941
+ const e = y(f), t = h(), s = t.loader.useIsLoading(), i = t.loader.useIsInitiallyLoading();
942
+ return !t.batches.hasNextBatch() && !s ? null : /* @__PURE__ */ n.createElement(
943
+ w,
927
944
  {
928
945
  isPending: s && !i,
929
946
  isDisabled: i,
930
947
  ...a,
931
- onPress: () => e.batches.nextBatch(),
948
+ onPress: () => t.batches.nextBatch(),
932
949
  variant: "plain",
933
950
  size: "s"
934
951
  },
935
- t.format("list.showMore")
952
+ e.format("list.showMore")
936
953
  );
937
- }, ks = () => /* @__PURE__ */ n.createElement("div", { className: Ls.footer }, /* @__PURE__ */ n.createElement(Is, null), /* @__PURE__ */ n.createElement(Ps, null));
938
- function At(a) {
954
+ }, As = () => /* @__PURE__ */ n.createElement("div", { className: Is.footer }, /* @__PURE__ */ n.createElement(Ps, null), /* @__PURE__ */ n.createElement(ks, null));
955
+ function Ve(a) {
939
956
  return null;
940
957
  }
941
- const As = () => At, Vt = (a) => null, Bt = (a) => null, Mt = (a) => null, Vs = (a) => /* @__PURE__ */ n.createElement(pt, { ...a }, /* @__PURE__ */ n.createElement(gt, null, /* @__PURE__ */ n.createElement(bt, null, /* @__PURE__ */ n.createElement(P, { width: "100%" }))), /* @__PURE__ */ n.createElement(ft, null, Array.from(Array(5)).map((t, e) => /* @__PURE__ */ n.createElement(St, { key: e }, /* @__PURE__ */ n.createElement(wt, null, /* @__PURE__ */ n.createElement(P, { width: "100%" })))))), Bs = "flow--list--table", Ms = "flow--list--table--is-loading", Ns = "flow--list--table--row", xs = "flow--list--table--has-action", L = {
942
- table: Bs,
943
- isLoading: Ms,
944
- row: Ns,
945
- hasAction: xs
946
- }, Rs = () => {
947
- const a = h(), t = a.table, e = a.useIsEmpty(), s = a.loader.useIsLoading(), i = a.loader.useIsInitiallyLoading();
948
- if (!t)
958
+ const Vs = () => Ve, Be = (a) => null, Me = (a) => null, xe = (a) => null, Bs = (a) => /* @__PURE__ */ n.createElement(be, { ...a }, /* @__PURE__ */ n.createElement(fe, null, /* @__PURE__ */ n.createElement(Se, null, /* @__PURE__ */ n.createElement(A, { width: "100%" }))), /* @__PURE__ */ n.createElement(we, null, Array.from(Array(5)).map((e, t) => /* @__PURE__ */ n.createElement(ve, { key: t }, /* @__PURE__ */ n.createElement(ye, null, /* @__PURE__ */ n.createElement(A, { width: "100%" })))))), Ms = "flow--list--table", xs = "flow--list--table--is-loading", Rs = "flow--list--table--row", Ns = "flow--list--table--is-selected", Ds = "flow--list--table--has-action", F = {
959
+ table: Ms,
960
+ isLoading: xs,
961
+ row: Rs,
962
+ isSelected: Ns,
963
+ hasAction: Ds
964
+ }, $s = () => {
965
+ const a = h(), e = a.table, t = a.useIsEmpty(), s = a.loader.useIsLoading(), i = a.loader.useIsInitiallyLoading();
966
+ if (!e)
949
967
  return null;
950
968
  if (i)
951
- return /* @__PURE__ */ n.createElement(Vs, { ...t.componentProps });
952
- if (e)
953
- return /* @__PURE__ */ n.createElement(Ct, null);
954
- const o = t.body.row.onAction, l = y(
955
- L.row,
956
- o && L.hasAction,
957
- t.body.row.componentProps.className
958
- ), d = y(
959
- L.table,
960
- s && L.isLoading,
961
- t.componentProps.className
969
+ return /* @__PURE__ */ n.createElement(Bs, { ...e.componentProps });
970
+ if (t)
971
+ return /* @__PURE__ */ n.createElement($, null);
972
+ const o = e.list.onAction, l = v(
973
+ F.table,
974
+ s && F.isLoading,
975
+ e.componentProps.className
962
976
  );
963
977
  return /* @__PURE__ */ n.createElement(
964
- pt,
978
+ be,
965
979
  {
966
980
  ...a.componentProps,
967
- ...t.componentProps,
968
- className: d
981
+ ...e.componentProps,
982
+ className: l
969
983
  },
970
- /* @__PURE__ */ n.createElement(gt, { ...t.header.componentProps }, t.header.columns.map((c, u) => /* @__PURE__ */ n.createElement(bt, { key: u, ...c.componentProps }))),
971
- /* @__PURE__ */ n.createElement(ft, { ...t.body.componentProps }, a.items.entries.map((c) => {
972
- var u;
973
- return /* @__PURE__ */ n.createElement(
974
- St,
975
- {
976
- className: l,
977
- key: c.id,
978
- onAction: o ? () => o(c.data) : void 0,
979
- ...t.body.row.componentProps
980
- },
981
- (u = t.body.row) == null ? void 0 : u.cells.map((g, S) => /* @__PURE__ */ n.createElement(wt, { key: S, ...g.componentProps }, g.renderFn ? g.renderFn(c.data) : void 0))
982
- );
983
- }))
984
+ /* @__PURE__ */ n.createElement(fe, { ...e.header.componentProps }, e.header.columns.map((c, d) => /* @__PURE__ */ n.createElement(Se, { key: d, ...c.componentProps }))),
985
+ /* @__PURE__ */ n.createElement(
986
+ we,
987
+ {
988
+ ...e.body.componentProps,
989
+ renderEmptyState: () => /* @__PURE__ */ n.createElement($, null)
990
+ },
991
+ a.items.entries.map((c) => {
992
+ var d;
993
+ return /* @__PURE__ */ n.createElement(
994
+ ve,
995
+ {
996
+ className: (m) => v(
997
+ F.row,
998
+ o && F.hasAction,
999
+ e.body.row.componentProps.className,
1000
+ m.isSelected && F.isSelected
1001
+ ),
1002
+ key: c.id,
1003
+ onAction: o ? () => o(c.data) : void 0,
1004
+ ...e.body.row.componentProps
1005
+ },
1006
+ (d = e.body.row) == null ? void 0 : d.cells.map((m, g) => /* @__PURE__ */ n.createElement(ye, { key: g, ...m.componentProps }, m.renderFn ? m.renderFn(c.data) : void 0))
1007
+ );
1008
+ })
1009
+ )
984
1010
  );
985
- }, Nt = (a) => null, xt = (a) => null, Rt = (a) => null, Ds = te(
1011
+ }, Re = (a) => null, Ne = (a) => null, De = (a) => null, zs = et(
986
1012
  "List",
987
- ut((a) => {
988
- var K, G, j, _, W, J, Y, Q, X;
989
- const { children: t, batchSize: e, onChange: s, refProp: i, ...o } = a, l = (K = b(
990
- t,
991
- Ft
992
- )) == null ? void 0 : K.props, d = (G = b(
993
- t,
994
- Se
995
- )) == null ? void 0 : G.props, c = (j = b(
996
- t,
997
- kt
998
- )) == null ? void 0 : j.props, u = {
1013
+ he((a) => {
1014
+ var j, _, W, J, Y, Q, X, Z, ee;
1015
+ const { children: e, batchSize: t, onChange: s, refProp: i, ...o } = a, l = (j = b(
1016
+ e,
1017
+ Le
1018
+ )) == null ? void 0 : j.props, c = (_ = b(
1019
+ e,
1020
+ St
1021
+ )) == null ? void 0 : _.props, d = (W = b(
1022
+ e,
1023
+ Ae
1024
+ )) == null ? void 0 : W.props, m = {
999
1025
  source: l ? {
1000
1026
  ...l,
1001
1027
  asyncLoader: l.children
1002
- } : d ? {
1003
- ...d,
1004
- asyncResourceFactory: d.children
1005
1028
  } : c ? {
1006
- staticData: c.data
1029
+ ...c,
1030
+ asyncResourceFactory: c.children
1031
+ } : d ? {
1032
+ staticData: d.data
1007
1033
  } : void 0
1008
- }, g = (_ = b(t, At)) == null ? void 0 : _.props, S = (W = b(t, Pt)) == null ? void 0 : W.props, w = (J = b(t, Nt)) == null ? void 0 : J.props, q = C(t, Vt).map(
1034
+ }, g = (J = b(e, Ve)) == null ? void 0 : J.props, T = (Y = b(e, ke)) == null ? void 0 : Y.props, M = (Q = b(e, Re)) == null ? void 0 : Q.props, C = L(e, Be).map(
1009
1035
  (p) => ({
1010
1036
  ...p.props,
1011
1037
  name: p.props.children
1012
1038
  })
1013
- ), Dt = C(t, Mt).map(
1039
+ ), S = L(e, xe).map(
1014
1040
  (p) => ({
1015
1041
  ...p.props,
1016
1042
  renderFn: p.props.children
1017
1043
  })
1018
- ), $t = (Y = b(t, Bt)) == null ? void 0 : Y.props, zt = (Q = b(t, xt)) == null ? void 0 : Q.props, Ut = (X = b(t, Rt)) == null ? void 0 : X.props, V = ds.useNew({
1044
+ ), $e = (X = b(e, Me)) == null ? void 0 : X.props, ze = (Z = b(e, Ne)) == null ? void 0 : Z.props, Ue = (ee = b(e, De)) == null ? void 0 : ee.props, x = ds.useNew({
1019
1045
  onChange: s,
1020
- loader: u,
1021
- filters: C(t, Lt).map(
1046
+ loader: m,
1047
+ filters: L(e, Ie).map(
1022
1048
  (p) => ({
1023
1049
  ...p.props,
1024
1050
  renderItem: p.props.children
@@ -1028,73 +1054,73 @@ const As = () => At, Vt = (a) => null, Bt = (a) => null, Mt = (a) => null, Vs =
1028
1054
  render: g.children,
1029
1055
  textFieldProps: g
1030
1056
  } : void 0,
1031
- sorting: C(t, It).map(
1057
+ sorting: L(e, Pe).map(
1032
1058
  (p) => p.props
1033
1059
  ),
1034
- itemView: S ? {
1035
- ...S,
1036
- renderFn: S.children
1060
+ itemView: T ? {
1061
+ ...T,
1062
+ renderFn: T.children
1037
1063
  } : void 0,
1038
- table: q.length > 0 ? {
1064
+ table: C.length > 0 ? {
1039
1065
  header: {
1040
- ...zt,
1041
- columns: q
1066
+ ...ze,
1067
+ columns: C
1042
1068
  },
1043
1069
  body: {
1044
- ...Ut,
1070
+ ...Ue,
1045
1071
  row: {
1046
- ...$t,
1047
- cells: Dt
1072
+ ...$e,
1073
+ cells: S
1048
1074
  }
1049
1075
  },
1050
- ...w
1076
+ ...M
1051
1077
  } : void 0,
1052
1078
  batchesController: {
1053
- batchSize: e
1079
+ batchSize: t
1054
1080
  },
1055
1081
  ...o
1056
1082
  });
1057
1083
  return /* @__PURE__ */ n.createElement(
1058
- yt.Provider,
1084
+ Te.Provider,
1059
1085
  {
1060
1086
  value: {
1061
- list: V
1087
+ list: x
1062
1088
  }
1063
1089
  },
1064
- /* @__PURE__ */ n.createElement(Ve, null),
1065
- /* @__PURE__ */ n.createElement("div", { className: _e.list, ref: i }, /* @__PURE__ */ n.createElement(Ge, null), V.viewMode === "list" && /* @__PURE__ */ n.createElement(ws, null), V.viewMode === "table" && /* @__PURE__ */ n.createElement(Rs, null), /* @__PURE__ */ n.createElement(ks, null))
1090
+ /* @__PURE__ */ n.createElement(Vt, null),
1091
+ /* @__PURE__ */ n.createElement("div", { className: _t.list, ref: i }, /* @__PURE__ */ n.createElement(Gt, null), x.viewMode === "list" && /* @__PURE__ */ n.createElement(vs, null), x.viewMode === "table" && /* @__PURE__ */ n.createElement($s, null), /* @__PURE__ */ n.createElement(As, null))
1066
1092
  );
1067
1093
  })
1068
- ), $s = () => Ds, Na = () => ({
1069
- List: $s(),
1070
- Filter: ys(),
1071
- Search: As(),
1072
- Sorting: Es(),
1073
- Item: Ts(),
1074
- ItemView: vt,
1075
- TableHeader: xt,
1076
- TableColumn: Vt,
1077
- TableBody: Rt,
1078
- TableRow: Bt,
1079
- TableCell: Mt,
1080
- Table: Nt,
1094
+ ), Us = () => zs, Na = () => ({
1095
+ List: Us(),
1096
+ Filter: Es(),
1097
+ Search: Vs(),
1098
+ Sorting: Ts(),
1099
+ Item: Fs(),
1100
+ ItemView: Ee,
1101
+ TableHeader: Ne,
1102
+ TableColumn: Be,
1103
+ TableBody: De,
1104
+ TableRow: Me,
1105
+ TableCell: xe,
1106
+ Table: Re,
1081
1107
  StaticData: Cs(),
1082
- LoaderAsync: vs(),
1083
- LoaderAsyncResource: we()
1108
+ LoaderAsync: ys(),
1109
+ LoaderAsyncResource: wt()
1084
1110
  });
1085
1111
  export {
1086
- Ds as List,
1087
- Lt as ListFilter,
1088
- Pt as ListItem,
1089
- vt as ListItemView,
1090
- Ft as ListLoaderAsync,
1091
- It as ListSorting,
1092
- kt as ListStaticData,
1093
- $s as TypedList,
1094
- ys as TypedListFilter,
1095
- Ts as TypedListItem,
1096
- vs as TypedListLoaderAsync,
1097
- Es as TypedListSorting,
1112
+ zs as List,
1113
+ Ie as ListFilter,
1114
+ ke as ListItem,
1115
+ Ee as ListItemView,
1116
+ Le as ListLoaderAsync,
1117
+ Pe as ListSorting,
1118
+ Ae as ListStaticData,
1119
+ Us as TypedList,
1120
+ Es as TypedListFilter,
1121
+ Fs as TypedListItem,
1122
+ ys as TypedListLoaderAsync,
1123
+ Ts as TypedListSorting,
1098
1124
  Cs as TypedListStaticData,
1099
1125
  Na as typedList,
1100
1126
  h as useList