@mittwald/flow-react-components 0.1.0-alpha.219 → 0.1.0-alpha.220

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,59 +1,59 @@
1
1
  "use client"
2
2
  /* */
3
- var ze = Object.defineProperty;
4
- var Ue = (a, e, t) => e in a ? ze(a, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : a[e] = t;
5
- var r = (a, e, t) => Ue(a, typeof e != "symbol" ? e + "" : e, t);
6
- import n, { createContext as Oe, useContext as He, createElement as me, useState as O, useEffect as k, useRef as qe, cloneElement as Ke } from "react";
3
+ var Ue = Object.defineProperty;
4
+ var Oe = (a, e, t) => e in a ? Ue(a, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : a[e] = t;
5
+ var r = (a, e, t) => Oe(a, typeof e != "symbol" ? e + "" : e, t);
6
+ import n, { createContext as He, useContext as qe, createElement as me, useState as O, useEffect as k, useRef as Ke, Suspense as Ge, cloneElement as je } from "react";
7
7
  import "./propsContext-DzAKlmhS.js";
8
- import { P as Ge } from "./PropsContextProvider-C6Z4XGp6.js";
8
+ import { P as _e } from "./PropsContextProvider-C6Z4XGp6.js";
9
9
  import "@react-aria/utils";
10
- import { isShallowEqual as je, unique as _e, times as We } from "remeda";
11
- import { d as Je } from "./dynamic-ClpUSmEt.js";
10
+ import { isShallowEqual as We, unique as Je, times as Ye } from "remeda";
11
+ import { d as Qe } from "./dynamic-ClpUSmEt.js";
12
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 Ye } from "./IconContextMenu-jwoVcLvd.js";
15
+ import { I as Xe } from "./IconContextMenu-jwoVcLvd.js";
16
16
  import { a as B, C as H } from "./ContextMenuTrigger-Bh65PWwi.js";
17
17
  import { M as q } from "./MenuItem-DcfYvfPJ.js";
18
18
  import { useLocalizedStringFormatter as y } from "react-aria";
19
- import { TunnelProvider as Qe, TunnelExit as ie } from "@mittwald/react-tunnel";
19
+ import { TunnelProvider as Ze, TunnelExit as ie } from "@mittwald/react-tunnel";
20
20
  import v from "clsx";
21
- import { g as Xe } from "./getContainerBreakpointSizeClassName-BrcFDcCY.js";
22
- import { f as Ze } from "./flowComponent-DHPUcYyM.js";
23
- import { R as et } from "./Render-BdlTa7Qb.js";
21
+ import { g as et } from "./getContainerBreakpointSizeClassName-BrcFDcCY.js";
22
+ import { f as tt } from "./flowComponent-DHPUcYyM.js";
23
+ import { R as st } from "./Render-BdlTa7Qb.js";
24
24
  import { T as E } from "./Text-Sd5q3Yme.js";
25
25
  import { I as he } from "./IconChevronDown--OxZLX8L.js";
26
- import { I as tt } from "./IconClose-BFwPT_IX.js";
27
- import { makeObservable as st, observable as ne, computed as re, action as D } from "mobx";
26
+ import { I as at } from "./IconClose-BFwPT_IX.js";
27
+ import { makeObservable as it, observable as ne, computed as re, action as D } from "mobx";
28
28
  import "./context-Cf7tqFtF.js";
29
- import { u as at } from "./useOnChange-C1Quwyuz.js";
30
- import { S as it } from "./SearchField-DstUFmq4.js";
29
+ import { u as nt } from "./useOnChange-C1Quwyuz.js";
30
+ import { S as rt } from "./SearchField-DstUFmq4.js";
31
31
  import { H as K } from "./Heading-BEC6iPfF.js";
32
- import { S as nt } from "./Section-B0hiMFoD.js";
33
- import { I as rt } from "./IconSettings-CisOFpPV.js";
34
- import { getProperty as ot } from "dot-prop";
32
+ import { S as ot } from "./Section-B0hiMFoD.js";
33
+ import { I as lt } from "./IconSettings-CisOFpPV.js";
34
+ import { getProperty as ct } from "dot-prop";
35
35
  import { hash as pe } from "object-code";
36
- import { useReactTable as lt, getCoreRowModel as ct, getSortedRowModel as dt, getFilteredRowModel as ut, getPaginationRowModel as mt, getFacetedUniqueValues as ht } from "@tanstack/react-table";
36
+ import { useReactTable as dt, getCoreRowModel as ut, getSortedRowModel as mt, getFilteredRowModel as ht, getPaginationRowModel as pt, getFacetedUniqueValues as gt } from "@tanstack/react-table";
37
37
  import ge from "invariant";
38
38
  import { getAsyncResource as oe } from "@mittwald/react-use-promise";
39
39
  import { u as le } from "./useSelector-DpU7_HMO.js";
40
40
  import * as G from "react-aria-components";
41
- import { I as pt } from "./IllustratedMessage-B3MHD01M.js";
42
- import { I as gt } from "./IconSearch-C7VQTAqK.js";
43
41
  import { S as A } from "./SkeletonText-B5ZghZhO.js";
42
+ import { I as ft } from "./IllustratedMessage-B3MHD01M.js";
43
+ import { I as bt } from "./IconSearch-C7VQTAqK.js";
44
44
  import { d as f, a as I } from "./deepFindOfType-6pG0fH7S.js";
45
- import { ListLoaderAsyncResource as ft, TypedListLoaderAsyncResource as bt } from "./List/ListLoaderAsyncResource.js";
46
- import { S as St } from "./Skeleton-CKLaTmDR.js";
47
- import { T as fe, d as be, c as Se, a as we, e as ve, b as ye } from "./TableRow-K-cWiurd.js";
48
- const wt = "flow--list--items--item--view", vt = "flow--list--items--item--view--title", yt = "flow--list--items--item--view--top-content", Et = "flow--list--items--item--view--content", Tt = "flow--list--items--item--view--action", Ft = "flow--list--items--item--view--avatar", Ct = "flow--list--items--item--view--text", It = "flow--list--items--item--view--heading", m = {
49
- view: wt,
50
- title: vt,
51
- topContent: yt,
52
- content: Et,
53
- action: Tt,
54
- avatar: Ft,
55
- text: Ct,
56
- heading: It,
45
+ import { ListLoaderAsyncResource as St, TypedListLoaderAsyncResource as wt } from "./List/ListLoaderAsyncResource.js";
46
+ import { S as vt } from "./Skeleton-CKLaTmDR.js";
47
+ import { T as fe, d as be, c as Se, a as we, e as ve, b as ye } from "./TableRow-BsPgWqkU.js";
48
+ 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", It = "flow--list--items--item--view--avatar", Lt = "flow--list--items--item--view--text", Pt = "flow--list--items--item--view--heading", m = {
49
+ view: yt,
50
+ title: Et,
51
+ topContent: Tt,
52
+ content: Ft,
53
+ action: Ct,
54
+ avatar: It,
55
+ text: Lt,
56
+ heading: Pt,
57
57
  "container-breakpoint-size-xs": "flow--list--items--item--view--container-breakpoint-size-xs",
58
58
  "container-breakpoint-size-s": "flow--list--items--item--view--container-breakpoint-size-s",
59
59
  "container-breakpoint-size-m": "flow--list--items--item--view--container-breakpoint-size-m",
@@ -85,7 +85,7 @@ const wt = "flow--list--items--item--view", vt = "flow--list--items--item--view-
85
85
  "list.settings.viewMode.table": "Table",
86
86
  "list.showMore": "Show more",
87
87
  "list.sorting": "Sorting"
88
- } }, Lt = (a) => {
88
+ } }, kt = (a) => {
89
89
  const { className: e, children: t } = a, s = y(b);
90
90
  return /* @__PURE__ */ n.createElement(B, null, /* @__PURE__ */ n.createElement(
91
91
  w,
@@ -94,12 +94,12 @@ const wt = "flow--list--items--item--view", vt = "flow--list--items--item--view-
94
94
  className: e,
95
95
  "aria-label": s.format("list.options")
96
96
  },
97
- /* @__PURE__ */ n.createElement(Ye, null)
97
+ /* @__PURE__ */ n.createElement(Xe, null)
98
98
  ), t);
99
- }, Pt = (a) => a === "top" ? m.topContent : a === "bottom" ? m.content : m.topContent, Ee = (a) => {
99
+ }, At = (a) => a === "top" ? m.topContent : a === "bottom" ? m.content : m.topContent, Ee = (a) => {
100
100
  const { children: e, className: t, containerBreakpointSize: s = "m" } = a, i = {
101
101
  ContextMenu: {
102
- wrapWith: /* @__PURE__ */ n.createElement(Lt, { className: m.action }),
102
+ wrapWith: /* @__PURE__ */ n.createElement(kt, { className: m.action }),
103
103
  placement: "bottom end"
104
104
  },
105
105
  Button: {
@@ -110,7 +110,7 @@ const wt = "flow--list--items--item--view", vt = "flow--list--items--item--view-
110
110
  ignoreBreakpoint: !0
111
111
  },
112
112
  Content: {
113
- className: Je((l) => Pt(l.slot)),
113
+ className: Qe((l) => At(l.slot)),
114
114
  tunnelId: "topContent"
115
115
  },
116
116
  Avatar: {
@@ -132,19 +132,19 @@ const wt = "flow--list--items--item--view", vt = "flow--list--items--item--view-
132
132
  }, o = v(
133
133
  m.view,
134
134
  t,
135
- m[Xe(s)]
135
+ m[et(s)]
136
136
  );
137
- return /* @__PURE__ */ n.createElement("div", { className: o }, /* @__PURE__ */ n.createElement(Ge, { props: i }, /* @__PURE__ */ n.createElement(Qe, null, e, /* @__PURE__ */ n.createElement("div", { className: m.title }, /* @__PURE__ */ n.createElement(ie, { id: "title" })), /* @__PURE__ */ n.createElement(ie, { id: "topContent" }))));
138
- }, Te = Oe({}), h = () => He(Te).list, kt = () => h().loader.getLoaderInvocationHooks().map((e, t) => /* @__PURE__ */ n.createElement(et, { key: t }, () => {
137
+ return /* @__PURE__ */ n.createElement("div", { className: o }, /* @__PURE__ */ n.createElement(_e, { props: i }, /* @__PURE__ */ n.createElement(Ze, null, e, /* @__PURE__ */ n.createElement("div", { className: m.title }, /* @__PURE__ */ n.createElement(ie, { id: "title" })), /* @__PURE__ */ n.createElement(ie, { id: "topContent" }))));
138
+ }, Te = He({}), h = () => qe(Te).list, Vt = () => h().loader.getLoaderInvocationHooks().map((e, t) => /* @__PURE__ */ n.createElement(st, { key: t }, () => {
139
139
  e();
140
- })), At = (a) => {
140
+ })), Bt = (a) => {
141
141
  const { sorting: e } = a;
142
142
  return /* @__PURE__ */ n.createElement(q, { id: e.id }, e.name);
143
143
  }, $ = (a) => {
144
144
  const { children: e, locales: t, variables: s } = a;
145
145
  return y(t).format(e, s);
146
- }, Vt = () => {
147
- const a = h(), e = a.visibleSorting.map((i) => /* @__PURE__ */ n.createElement(At, { sorting: i, key: i.id }));
146
+ }, Mt = () => {
147
+ const a = h(), e = a.visibleSorting.map((i) => /* @__PURE__ */ n.createElement(Bt, { sorting: i, key: i.id }));
148
148
  if (e.length === 0)
149
149
  return null;
150
150
  const t = a.visibleSorting.find((i) => i.isSorted()), s = /* @__PURE__ */ n.createElement(E, null, t ? /* @__PURE__ */ n.createElement(
@@ -168,7 +168,7 @@ const wt = "flow--list--items--item--view", vt = "flow--list--items--item--view-
168
168
  },
169
169
  e
170
170
  ));
171
- }, Bt = (a) => {
171
+ }, xt = (a) => {
172
172
  const { filter: e } = a, { values: t, mode: s, name: i, property: o } = e, l = t.map((d) => /* @__PURE__ */ n.createElement(
173
173
  q,
174
174
  {
@@ -188,15 +188,15 @@ const wt = "flow--list--items--item--view", vt = "flow--list--items--item--view-
188
188
  },
189
189
  l
190
190
  ));
191
- }, Mt = "flow--list--header", xt = "flow--list--header--picker-list-and-search", Rt = "flow--list--header--picker-list", Nt = "flow--list--header--search-field", L = {
192
- header: Mt,
193
- pickerListAndSearch: xt,
194
- pickerList: Rt,
195
- searchField: Nt
196
- }, Dt = "flow--list--header--active-filters", $t = "flow--list--header--active-filters--clear-button", ce = {
197
- activeFilters: Dt,
198
- clearButton: $t
199
- }, zt = () => {
191
+ }, Rt = "flow--list--header", Nt = "flow--list--header--picker-list-and-search", Dt = "flow--list--header--picker-list", $t = "flow--list--header--search-field", L = {
192
+ header: Rt,
193
+ pickerListAndSearch: Nt,
194
+ pickerList: Dt,
195
+ searchField: $t
196
+ }, zt = "flow--list--header--active-filters", Ut = "flow--list--header--active-filters--clear-button", ce = {
197
+ activeFilters: zt,
198
+ clearButton: Ut
199
+ }, Ot = () => {
200
200
  const a = h(), e = a.filters.flatMap(
201
201
  (t) => t.values.filter((s) => s.isActive).map((s) => /* @__PURE__ */ n.createElement(
202
202
  w,
@@ -207,7 +207,7 @@ const wt = "flow--list--items--item--view", vt = "flow--list--items--item--view-
207
207
  onPress: () => s.deactivate()
208
208
  },
209
209
  /* @__PURE__ */ n.createElement(E, null, s.render()),
210
- /* @__PURE__ */ n.createElement(tt, null)
210
+ /* @__PURE__ */ n.createElement(at, null)
211
211
  ))
212
212
  );
213
213
  return e.length <= 0 ? null : /* @__PURE__ */ n.createElement("div", { className: ce.activeFilters }, e, /* @__PURE__ */ n.createElement(
@@ -220,9 +220,9 @@ const wt = "flow--list--items--item--view", vt = "flow--list--items--item--view-
220
220
  },
221
221
  /* @__PURE__ */ n.createElement($, { locales: b }, "list.resetAll")
222
222
  ));
223
- }, Ut = (a) => {
223
+ }, Ht = (a) => {
224
224
  const { className: e, onChange: t, value: s, ...i } = a, [o, l] = O(s ?? "");
225
- at(s, () => {
225
+ nt(s, () => {
226
226
  l(s ?? "");
227
227
  }, [o]);
228
228
  const c = () => {
@@ -231,7 +231,7 @@ const wt = "flow--list--items--item--view", vt = "flow--list--items--item--view-
231
231
  u.key === "Enter" ? o.trim() === "" ? t(void 0) : t(o) : u.key === "Escape" && c();
232
232
  };
233
233
  return /* @__PURE__ */ n.createElement(
234
- it,
234
+ rt,
235
235
  {
236
236
  className: e,
237
237
  value: o,
@@ -241,15 +241,15 @@ const wt = "flow--list--items--item--view", vt = "flow--list--items--item--view-
241
241
  ...i
242
242
  }
243
243
  );
244
- }, Ot = (a) => {
245
- const { className: e, search: t } = a, s = t.render ?? Ut;
244
+ }, qt = (a) => {
245
+ const { className: e, search: t } = a, s = t.render ?? Ht;
246
246
  return me(s, {
247
247
  className: e,
248
248
  value: t.value,
249
249
  onChange: t.setValue.bind(t),
250
250
  ...t.textFieldProps
251
251
  });
252
- }, Ht = () => {
252
+ }, Kt = () => {
253
253
  const a = y(b), e = h(), t = e.viewMode, s = [];
254
254
  return e.itemView && s.push("list"), e.table && s.push("table"), s.length <= 1 ? null : /* @__PURE__ */ n.createElement(B, null, /* @__PURE__ */ n.createElement(
255
255
  w,
@@ -258,8 +258,8 @@ const wt = "flow--list--items--item--view", vt = "flow--list--items--item--view-
258
258
  color: "secondary",
259
259
  "aria-label": a.format("list.settings")
260
260
  },
261
- /* @__PURE__ */ n.createElement(rt, null)
262
- ), /* @__PURE__ */ n.createElement(H, { selectionMode: "single", selectedKeys: [t] }, /* @__PURE__ */ n.createElement(nt, null, /* @__PURE__ */ n.createElement(K, null, a.format("list.settings.viewMode")), s.map((i) => /* @__PURE__ */ n.createElement(
261
+ /* @__PURE__ */ n.createElement(lt, null)
262
+ ), /* @__PURE__ */ n.createElement(H, { selectionMode: "single", selectedKeys: [t] }, /* @__PURE__ */ n.createElement(ot, null, /* @__PURE__ */ n.createElement(K, null, a.format("list.settings.viewMode")), s.map((i) => /* @__PURE__ */ n.createElement(
263
263
  q,
264
264
  {
265
265
  id: i,
@@ -270,16 +270,16 @@ const wt = "flow--list--items--item--view", vt = "flow--list--items--item--view-
270
270
  },
271
271
  a.format(`list.settings.viewMode.${i}`)
272
272
  )))));
273
- }, qt = (a) => {
273
+ }, Gt = (a) => {
274
274
  const { className: e } = a, t = h();
275
275
  if (t.filters.length === 0 && t.visibleSorting.length === 0 && !t.search)
276
276
  return null;
277
- const s = t.filters.map((i) => /* @__PURE__ */ n.createElement(Bt, { key: i.property, filter: i }));
278
- return /* @__PURE__ */ n.createElement("div", { className: v(e, L.header) }, /* @__PURE__ */ n.createElement("div", { className: L.pickerListAndSearch }, /* @__PURE__ */ n.createElement("div", { className: L.pickerList }, /* @__PURE__ */ n.createElement(Vt, null), s), t.search && /* @__PURE__ */ n.createElement(Ot, { className: L.searchField, search: t.search }), /* @__PURE__ */ n.createElement(Ht, null)), /* @__PURE__ */ n.createElement(zt, null));
279
- }, Kt = "flow--list", Gt = {
280
- list: Kt
277
+ const s = t.filters.map((i) => /* @__PURE__ */ n.createElement(xt, { key: i.property, filter: i }));
278
+ return /* @__PURE__ */ n.createElement("div", { className: v(e, L.header) }, /* @__PURE__ */ n.createElement("div", { className: L.pickerListAndSearch }, /* @__PURE__ */ n.createElement("div", { className: L.pickerList }, /* @__PURE__ */ n.createElement(Mt, null), s), t.search && /* @__PURE__ */ n.createElement(qt, { className: L.searchField, search: t.search }), /* @__PURE__ */ n.createElement(Kt, null)), /* @__PURE__ */ n.createElement(Ot, null));
279
+ }, jt = "flow--list", _t = {
280
+ list: jt
281
281
  };
282
- let jt = class Fe {
282
+ let Wt = class Fe {
283
283
  constructor(e, t, s) {
284
284
  r(this, "id");
285
285
  r(this, "data");
@@ -290,16 +290,16 @@ let jt = class Fe {
290
290
  return new Fe(e, t.id, t.original);
291
291
  }
292
292
  };
293
- class _t {
293
+ class Jt {
294
294
  constructor(e) {
295
295
  r(this, "list");
296
296
  this.list = e;
297
297
  }
298
298
  get entries() {
299
- return this.list.reactTable.table.getRowModel().rows.map((e) => jt.fromRow(this, e));
299
+ return this.list.reactTable.table.getRowModel().rows.map((e) => Wt.fromRow(this, e));
300
300
  }
301
301
  }
302
- class Wt {
302
+ class Yt {
303
303
  constructor(e, t = {}) {
304
304
  r(this, "batchSize");
305
305
  r(this, "list");
@@ -346,7 +346,7 @@ class Wt {
346
346
  }
347
347
  }
348
348
  }
349
- const Jt = "$";
349
+ const Qt = "$";
350
350
  class de {
351
351
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
352
352
  constructor(e, t) {
@@ -355,7 +355,7 @@ class de {
355
355
  this.filter = e, this.value = t;
356
356
  }
357
357
  equals(e) {
358
- return je(this.value, e.value);
358
+ return We(this.value, e.value);
359
359
  }
360
360
  get id() {
361
361
  return `${this.filter.property}@@${pe(this.value)}`;
@@ -373,8 +373,8 @@ class de {
373
373
  this.filter.deactivateValue(this);
374
374
  }
375
375
  }
376
- const Yt = (a, e) => a === e, Qt = (a) => String(a);
377
- class Xt {
376
+ const Xt = (a, e) => a === e, Zt = (a) => String(a);
377
+ class es {
378
378
  constructor(e, t) {
379
379
  r(this, "_values");
380
380
  r(this, "_valuesFromTableState");
@@ -387,7 +387,7 @@ class Xt {
387
387
  r(this, "onFilterUpdateCallbacks", /* @__PURE__ */ new Set());
388
388
  r(this, "defaultSelectedValues");
389
389
  var s;
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 de(this, i)), this.matcher = t.matcher ?? Yt, this.renderItem = t.renderItem ?? Qt, this.name = t.name, this.defaultSelectedValues = t.defaultSelected ? this.values.filter(
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 de(this, i)), this.matcher = t.matcher ?? Xt, this.renderItem = t.renderItem ?? Zt, this.name = t.name, this.defaultSelectedValues = t.defaultSelected ? this.values.filter(
391
391
  (i) => {
392
392
  var o;
393
393
  return (o = t.defaultSelected) == null ? void 0 : o.some((l) => l === i.value);
@@ -408,7 +408,7 @@ class Xt {
408
408
  }
409
409
  getReactTableFilterFn() {
410
410
  return (e, t, s) => {
411
- const i = this.property, o = i.startsWith(Jt) ? e.original : ot(e.original, i);
411
+ const i = this.property, o = i.startsWith(Qt) ? e.original : ct(e.original, i);
412
412
  return this.checkFilterMatches(o, s);
413
413
  };
414
414
  }
@@ -436,7 +436,7 @@ class Xt {
436
436
  return ((e = this.getTableColumnFilter()) == null ? void 0 : e.value) ?? null;
437
437
  }
438
438
  getValuesFromTableState() {
439
- return _e(
439
+ return Je(
440
440
  Array.from(this.getTableColumn().getFacetedUniqueValues().keys()).flatMap((e) => e).filter((e) => e != null)
441
441
  ).map((e) => new de(this, e));
442
442
  }
@@ -482,7 +482,7 @@ class Xt {
482
482
  this.onFilterUpdateCallbacks.add(e);
483
483
  }
484
484
  }
485
- class Zt {
485
+ class ts {
486
486
  constructor(e, t) {
487
487
  r(this, "list");
488
488
  r(this, "property");
@@ -544,7 +544,7 @@ class j {
544
544
  for (const c of this.list.filters)
545
545
  c.updateInitialState(i);
546
546
  (l = this.list.search) == null || l.updateInitialState(i);
547
- const o = lt({
547
+ const o = dt({
548
548
  data: s,
549
549
  state: {
550
550
  sorting: this.sortingState
@@ -552,11 +552,11 @@ class j {
552
552
  getRowId: this.list.getItemId,
553
553
  initialState: i,
554
554
  columns: this.getTableColumnDefs(),
555
- getCoreRowModel: ct(),
556
- getSortedRowModel: dt(),
557
- getFilteredRowModel: ut(),
558
- getPaginationRowModel: mt(),
559
- getFacetedUniqueValues: ht(),
555
+ getCoreRowModel: ut(),
556
+ getSortedRowModel: mt(),
557
+ getFilteredRowModel: ht(),
558
+ getPaginationRowModel: pt(),
559
+ getFacetedUniqueValues: gt(),
560
560
  onSortingChange: (c) => {
561
561
  this.handleSortingStateUpdate(c);
562
562
  },
@@ -605,7 +605,7 @@ class _ {
605
605
  r(this, "dataBatches", []);
606
606
  r(this, "prevDataBatches", []);
607
607
  r(this, "batchLoadingStates", ["void"]);
608
- st(this, {
608
+ it(this, {
609
609
  prevDataBatches: !1,
610
610
  useMergedData: !1,
611
611
  useIsLoading: !1,
@@ -619,7 +619,7 @@ class _ {
619
619
  });
620
620
  }
621
621
  static useNew() {
622
- return qe(new _()).current;
622
+ return Ke(new _()).current;
623
623
  }
624
624
  reset() {
625
625
  this.batchLoadingStates = [], this.dataBatches = [];
@@ -643,7 +643,7 @@ class _ {
643
643
  return le(() => this.isLoading);
644
644
  }
645
645
  }
646
- const es = [];
646
+ const ss = [];
647
647
  class W {
648
648
  constructor(e, t = {}) {
649
649
  r(this, "list");
@@ -654,7 +654,7 @@ class W {
654
654
  r(this, "loaderState");
655
655
  var c;
656
656
  const { source: s } = t;
657
- this.dataSource = s ?? { staticData: es };
657
+ this.dataSource = s ?? { staticData: ss };
658
658
  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;
659
659
  this.list = e, this.loaderState = _.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());
660
660
  }
@@ -674,7 +674,7 @@ class W {
674
674
  return this.loaderState.useMergedData();
675
675
  }
676
676
  getLoaderInvocationHooks() {
677
- return We(this.list.batches.getBatchIndex() + 1, (t) => t).map((t) => () => {
677
+ return Ye(this.list.batches.getBatchIndex() + 1, (t) => t).map((t) => () => {
678
678
  this.useLoadBatch(t);
679
679
  });
680
680
  }
@@ -745,7 +745,7 @@ class W {
745
745
  throw new Error("Unknown data source");
746
746
  }
747
747
  }
748
- class ts {
748
+ class as {
749
749
  constructor(e, t) {
750
750
  r(this, "list");
751
751
  r(this, "render");
@@ -791,21 +791,21 @@ const V = class V {
791
791
  }
792
792
  };
793
793
  r(V, "fallbackRenderItemFn", (e) => me("pre", void 0, JSON.stringify(e)));
794
- let z = V, ss = class {
794
+ let z = V, is = class {
795
795
  constructor(e, t = {}) {
796
796
  r(this, "tableHeader");
797
797
  r(this, "componentProps");
798
798
  this.tableHeader = e, this.componentProps = t;
799
799
  }
800
- }, as = class {
800
+ }, ns = class {
801
801
  constructor(e, t = {}) {
802
802
  r(this, "table");
803
803
  r(this, "componentProps");
804
804
  r(this, "columns");
805
805
  const { columns: s = [], ...i } = t;
806
- this.table = e, this.columns = s.map((o) => new ss(this, o)), this.componentProps = i;
806
+ this.table = e, this.columns = s.map((o) => new is(this, o)), this.componentProps = i;
807
807
  }
808
- }, is = class {
808
+ }, rs = class {
809
809
  constructor(e, t = {}) {
810
810
  r(this, "row");
811
811
  r(this, "renderFn");
@@ -813,32 +813,32 @@ let z = V, ss = class {
813
813
  const { renderFn: s, ...i } = t;
814
814
  this.row = e, this.renderFn = s, this.componentProps = i;
815
815
  }
816
- }, ns = class {
816
+ }, os = class {
817
817
  constructor(e, t = {}) {
818
818
  r(this, "tableBody");
819
819
  r(this, "cells");
820
820
  r(this, "componentProps");
821
821
  const { cells: s = [], ...i } = t;
822
- this.tableBody = e, this.cells = s.map((o) => new is(this, o)), this.componentProps = i;
822
+ this.tableBody = e, this.cells = s.map((o) => new rs(this, o)), this.componentProps = i;
823
823
  }
824
- }, rs = class {
824
+ }, ls = class {
825
825
  constructor(e, t = {}) {
826
826
  r(this, "table");
827
827
  r(this, "componentProps");
828
828
  r(this, "row");
829
829
  const { row: s, ...i } = t;
830
- this.table = e, this.row = new ns(this, s), this.componentProps = i;
830
+ this.table = e, this.row = new os(this, s), this.componentProps = i;
831
831
  }
832
- }, os = class {
832
+ }, cs = class {
833
833
  constructor(e, t = {}) {
834
834
  r(this, "list");
835
835
  r(this, "header");
836
836
  r(this, "body");
837
837
  r(this, "componentProps");
838
838
  const { header: s, body: i, ...o } = t;
839
- this.list = e, this.header = new as(this, s), this.body = new rs(this, i), this.componentProps = o;
839
+ this.list = e, this.header = new ns(this, s), this.body = new ls(this, i), this.componentProps = o;
840
840
  }
841
- }, ls = class Ce {
841
+ }, ds = class Ce {
842
842
  constructor(e) {
843
843
  r(this, "filters");
844
844
  r(this, "itemView");
@@ -868,7 +868,7 @@ let z = V, ss = class {
868
868
  defaultViewMode: M,
869
869
  ...C
870
870
  } = e;
871
- this.items = new _t(this), this.filters = i.map((S) => new Xt(this, S)), this.sorting = o.map((S) => new Zt(this, S)), this.search = u ? new ts(this, u) : void 0, this.itemView = t ? new z(this, t) : void 0, this.table = s ? new os(this, s) : void 0, this.batches = new Wt(this, l), this.componentProps = C, this.loader = W.useNew(this, d), this.onAction = p, this.getItemId = T, this.reactTable = j.useNew(this, c, {
871
+ this.items = new Jt(this), this.filters = i.map((S) => new es(this, S)), this.sorting = o.map((S) => new ts(this, S)), this.search = u ? new as(this, u) : void 0, this.itemView = t ? new z(this, t) : void 0, this.table = s ? new cs(this, s) : void 0, this.batches = new Yt(this, l), this.componentProps = C, this.loader = W.useNew(this, d), this.onAction = p, this.getItemId = T, this.reactTable = j.useNew(this, c, {
872
872
  manualFiltering: this.loader.manualFiltering,
873
873
  manualPagination: this.loader.manualPagination,
874
874
  manualSorting: this.loader.manualSorting
@@ -902,14 +902,14 @@ let z = V, ss = class {
902
902
  return !this.loader.useIsLoading() && this.items.entries.length === 0;
903
903
  }
904
904
  };
905
- const cs = "flow--list--items", ds = "flow--list--items--is-loading", ue = {
906
- items: cs,
907
- isLoading: ds
908
- }, us = "flow--list--items--item", ms = "flow--list--items--item--is-selected", hs = "flow--list--items--item--has-action", P = {
909
- item: us,
910
- isSelected: ms,
911
- hasAction: hs
912
- }, ps = (a) => {
905
+ const us = "flow--list--items", ms = "flow--list--items--is-loading", ue = {
906
+ items: us,
907
+ isLoading: ms
908
+ }, hs = "flow--list--items--item", ps = "flow--list--items--item--is-selected", gs = "flow--list--items--item--has-action", P = {
909
+ item: hs,
910
+ isSelected: ps,
911
+ hasAction: gs
912
+ }, Ie = () => /* @__PURE__ */ n.createElement(Ee, null, /* @__PURE__ */ n.createElement(K, null, /* @__PURE__ */ n.createElement(A, { width: "200px" })), /* @__PURE__ */ n.createElement(E, null, /* @__PURE__ */ n.createElement(A, { width: "300px" }))), fs = (a) => {
913
913
  const { id: e, data: t, children: s } = a, o = h().itemView;
914
914
  if (!o)
915
915
  return null;
@@ -927,20 +927,20 @@ const cs = "flow--list--items", ds = "flow--list--items--is-loading", ue = {
927
927
  textValue: c,
928
928
  href: d
929
929
  },
930
- s ?? o.render(t)
930
+ /* @__PURE__ */ n.createElement(Ge, { fallback: /* @__PURE__ */ n.createElement(Ie, null) }, s ?? o.render(t))
931
931
  );
932
- }, gs = (a) => /* @__PURE__ */ n.createElement(G.GridListItem, { textValue: "-", className: P.item }, a.children), U = () => {
932
+ }, bs = (a) => /* @__PURE__ */ n.createElement(G.GridListItem, { textValue: "-", className: P.item }, a.children), U = () => {
933
933
  const a = y(b);
934
- return /* @__PURE__ */ n.createElement(pt, null, /* @__PURE__ */ n.createElement(gt, null), /* @__PURE__ */ n.createElement(K, null, a.format("list.noResult.heading")), /* @__PURE__ */ n.createElement(E, null, a.format("list.noResult.text")));
935
- }, fs = () => /* @__PURE__ */ n.createElement(Ee, null, /* @__PURE__ */ n.createElement(K, null, /* @__PURE__ */ n.createElement(A, { width: "200px" })), /* @__PURE__ */ n.createElement(E, null, /* @__PURE__ */ n.createElement(A, { width: "300px" }))), bs = () => {
936
- var t;
937
- const e = ((t = h().itemView) == null ? void 0 : t.fallback) ?? /* @__PURE__ */ n.createElement(fs, null);
938
- return Array.from(Array(5)).map((s, i) => /* @__PURE__ */ n.createElement(gs, { key: i }, Ke(e)));
934
+ return /* @__PURE__ */ n.createElement(ft, null, /* @__PURE__ */ n.createElement(bt, null), /* @__PURE__ */ n.createElement(K, null, a.format("list.noResult.heading")), /* @__PURE__ */ n.createElement(E, null, a.format("list.noResult.text")));
939
935
  }, Ss = () => {
936
+ var t;
937
+ const e = ((t = h().itemView) == null ? void 0 : t.fallback) ?? /* @__PURE__ */ n.createElement(Ie, null);
938
+ return Array.from(Array(5)).map((s, i) => /* @__PURE__ */ n.createElement(bs, { key: i }, je(e)));
939
+ }, ws = () => {
940
940
  const a = h(), e = a.loader.useIsLoading(), t = a.loader.useIsInitiallyLoading();
941
941
  if (!a.itemView)
942
942
  return null;
943
- const s = a.items.entries.map((o) => /* @__PURE__ */ n.createElement(ps, { key: o.id, data: o.data, id: o.id })), i = v(ue.items, e && ue.isLoading);
943
+ const s = a.items.entries.map((o) => /* @__PURE__ */ n.createElement(fs, { key: o.id, data: o.data, id: o.id })), i = v(ue.items, e && ue.isLoading);
944
944
  return /* @__PURE__ */ n.createElement("div", { "aria-hidden": t, "aria-busy": e }, /* @__PURE__ */ n.createElement(
945
945
  G.GridList,
946
946
  {
@@ -948,20 +948,20 @@ const cs = "flow--list--items", ds = "flow--list--items--is-loading", ue = {
948
948
  ...a.componentProps,
949
949
  renderEmptyState: () => /* @__PURE__ */ n.createElement(U, null)
950
950
  },
951
- t ? /* @__PURE__ */ n.createElement(bs, null) : s
951
+ t ? /* @__PURE__ */ n.createElement(Ss, null) : s
952
952
  ));
953
- }, Ie = (a) => null, ws = () => Ie, Le = (a) => null, vs = () => Le, Pe = (a) => null, ys = () => Pe, ke = (a) => null, Es = () => ke, Ae = (a) => null, Ts = () => Ae, Fs = "flow--list--footer", Cs = {
954
- footer: Fs
955
- }, Is = (a) => {
953
+ }, Le = (a) => null, vs = () => Le, Pe = (a) => null, ys = () => Pe, ke = (a) => null, Es = () => ke, Ae = (a) => null, Ts = () => Ae, Ve = (a) => null, Fs = () => Ve, Cs = "flow--list--footer", Is = {
954
+ footer: Cs
955
+ }, Ls = (a) => {
956
956
  const e = y(b), t = h(), s = t.batches, i = t.loader.useIsInitiallyLoading(), o = t.useIsEmpty(), l = s.getTotalItemsCount(), c = s.getVisibleItemsCount();
957
957
  if (o)
958
958
  return null;
959
- const d = i ? /* @__PURE__ */ n.createElement(St, { width: "200px" }) : e.format("list.paginationInfo", {
959
+ const d = i ? /* @__PURE__ */ n.createElement(vt, { width: "200px" }) : e.format("list.paginationInfo", {
960
960
  visibleItemsCount: c,
961
961
  totalItemsCount: l
962
962
  });
963
963
  return /* @__PURE__ */ n.createElement(E, { ...a }, d);
964
- }, Ls = (a) => {
964
+ }, Ps = (a) => {
965
965
  const e = y(b), t = h(), s = t.loader.useIsLoading(), i = t.loader.useIsInitiallyLoading();
966
966
  return !t.batches.hasNextBatch() && !s ? null : /* @__PURE__ */ n.createElement(
967
967
  w,
@@ -975,22 +975,22 @@ const cs = "flow--list--items", ds = "flow--list--items--is-loading", ue = {
975
975
  },
976
976
  e.format("list.showMore")
977
977
  );
978
- }, Ps = () => /* @__PURE__ */ n.createElement("div", { className: Cs.footer }, /* @__PURE__ */ n.createElement(Is, null), /* @__PURE__ */ n.createElement(Ls, null));
979
- function Ve(a) {
978
+ }, ks = () => /* @__PURE__ */ n.createElement("div", { className: Is.footer }, /* @__PURE__ */ n.createElement(Ls, null), /* @__PURE__ */ n.createElement(Ps, null));
979
+ function Be(a) {
980
980
  return null;
981
981
  }
982
- const ks = () => Ve, Be = (a) => null, Me = (a) => null, xe = (a) => null, As = (a) => /* @__PURE__ */ n.createElement(fe, { ...a }, /* @__PURE__ */ n.createElement(be, 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%" })))))), Vs = "flow--list--table", Bs = "flow--list--table--is-loading", Ms = "flow--list--table--row", xs = "flow--list--table--is-selected", Rs = "flow--list--table--has-action", F = {
983
- table: Vs,
984
- isLoading: Bs,
985
- row: Ms,
986
- isSelected: xs,
987
- hasAction: Rs
988
- }, Ns = () => {
982
+ const As = () => Be, Me = (a) => null, xe = (a) => null, Re = (a) => null, Vs = (a) => /* @__PURE__ */ n.createElement(fe, { ...a }, /* @__PURE__ */ n.createElement(be, 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%" })))))), Bs = "flow--list--table", Ms = "flow--list--table--is-loading", xs = "flow--list--table--row", Rs = "flow--list--table--is-selected", Ns = "flow--list--table--has-action", F = {
983
+ table: Bs,
984
+ isLoading: Ms,
985
+ row: xs,
986
+ isSelected: Rs,
987
+ hasAction: Ns
988
+ }, Ds = () => {
989
989
  const a = h(), e = a.table, t = a.useIsEmpty(), s = a.loader.useIsLoading(), i = a.loader.useIsInitiallyLoading();
990
990
  if (!e)
991
991
  return null;
992
992
  if (i)
993
- return /* @__PURE__ */ n.createElement(As, { ...e.componentProps });
993
+ return /* @__PURE__ */ n.createElement(Vs, { ...e.componentProps });
994
994
  if (t)
995
995
  return /* @__PURE__ */ n.createElement(U, null);
996
996
  const o = e.list.onAction, l = v(
@@ -1032,15 +1032,15 @@ const ks = () => Ve, Be = (a) => null, Me = (a) => null, xe = (a) => null, As =
1032
1032
  })
1033
1033
  )
1034
1034
  );
1035
- }, Re = (a) => null, Ne = (a) => null, De = (a) => null, Ds = Ze("List", (a) => {
1035
+ }, Ne = (a) => null, De = (a) => null, $e = (a) => null, $s = tt("List", (a) => {
1036
1036
  var J, Y, Q, X, Z, ee, te, se, ae;
1037
1037
  const { children: e, batchSize: t, onChange: s, refProp: i, ...o } = a, l = (J = f(
1038
1038
  e,
1039
- Ie
1039
+ Le
1040
1040
  )) == null ? void 0 : J.props, c = (Y = f(
1041
1041
  e,
1042
- ft
1043
- )) == null ? void 0 : Y.props, d = (Q = f(e, Ae)) == null ? void 0 : Q.props, u = {
1042
+ St
1043
+ )) == null ? void 0 : Y.props, d = (Q = f(e, Ve)) == null ? void 0 : Q.props, u = {
1044
1044
  source: l ? {
1045
1045
  ...l,
1046
1046
  asyncLoader: l.children
@@ -1050,20 +1050,20 @@ const ks = () => Ve, Be = (a) => null, Me = (a) => null, xe = (a) => null, As =
1050
1050
  } : d ? {
1051
1051
  staticData: d.data
1052
1052
  } : void 0
1053
- }, p = (X = f(e, Ve)) == null ? void 0 : X.props, T = (Z = f(e, ke)) == null ? void 0 : Z.props, M = (ee = f(e, Re)) == null ? void 0 : ee.props, C = I(e, Be).map(
1053
+ }, p = (X = f(e, Be)) == null ? void 0 : X.props, T = (Z = f(e, Ae)) == null ? void 0 : Z.props, M = (ee = f(e, Ne)) == null ? void 0 : ee.props, C = I(e, Me).map(
1054
1054
  (g) => ({
1055
1055
  ...g.props,
1056
1056
  name: g.props.children
1057
1057
  })
1058
- ), x = I(e, xe).map(
1058
+ ), x = I(e, Re).map(
1059
1059
  (g) => ({
1060
1060
  ...g.props,
1061
1061
  renderFn: g.props.children
1062
1062
  })
1063
- ), R = (te = f(e, Me)) == null ? void 0 : te.props, S = (se = f(e, Ne)) == null ? void 0 : se.props, $e = (ae = f(e, De)) == null ? void 0 : ae.props, N = ls.useNew({
1063
+ ), R = (te = f(e, xe)) == null ? void 0 : te.props, S = (se = f(e, De)) == null ? void 0 : se.props, ze = (ae = f(e, $e)) == null ? void 0 : ae.props, N = ds.useNew({
1064
1064
  onChange: s,
1065
1065
  loader: u,
1066
- filters: I(e, Le).map(
1066
+ filters: I(e, Pe).map(
1067
1067
  (g) => ({
1068
1068
  ...g.props,
1069
1069
  renderItem: g.props.children
@@ -1074,7 +1074,7 @@ const ks = () => Ve, Be = (a) => null, Me = (a) => null, xe = (a) => null, As =
1074
1074
  textFieldProps: p,
1075
1075
  defaultValue: p.defaultValue
1076
1076
  } : void 0,
1077
- sorting: I(e, Pe).map((g) => g.props),
1077
+ sorting: I(e, ke).map((g) => g.props),
1078
1078
  itemView: T ? {
1079
1079
  ...T,
1080
1080
  renderFn: T.children
@@ -1085,7 +1085,7 @@ const ks = () => Ve, Be = (a) => null, Me = (a) => null, xe = (a) => null, As =
1085
1085
  columns: C
1086
1086
  },
1087
1087
  body: {
1088
- ...$e,
1088
+ ...ze,
1089
1089
  row: {
1090
1090
  ...R,
1091
1091
  cells: x
@@ -1105,40 +1105,40 @@ const ks = () => Ve, Be = (a) => null, Me = (a) => null, xe = (a) => null, As =
1105
1105
  list: N
1106
1106
  }
1107
1107
  },
1108
- /* @__PURE__ */ n.createElement(kt, null),
1109
- /* @__PURE__ */ n.createElement("div", { className: Gt.list, ref: i }, /* @__PURE__ */ n.createElement(qt, null), N.viewMode === "list" && /* @__PURE__ */ n.createElement(Ss, null), N.viewMode === "table" && /* @__PURE__ */ n.createElement(Ns, null), /* @__PURE__ */ n.createElement(Ps, null))
1108
+ /* @__PURE__ */ n.createElement(Vt, null),
1109
+ /* @__PURE__ */ n.createElement("div", { className: _t.list, ref: i }, /* @__PURE__ */ n.createElement(Gt, null), N.viewMode === "list" && /* @__PURE__ */ n.createElement(ws, null), N.viewMode === "table" && /* @__PURE__ */ n.createElement(Ds, null), /* @__PURE__ */ n.createElement(ks, null))
1110
1110
  );
1111
- }), $s = () => Ds, Ma = () => ({
1112
- List: $s(),
1113
- Filter: vs(),
1114
- Search: ks(),
1115
- Sorting: ys(),
1116
- Item: Es(),
1111
+ }), zs = () => $s, xa = () => ({
1112
+ List: zs(),
1113
+ Filter: ys(),
1114
+ Search: As(),
1115
+ Sorting: Es(),
1116
+ Item: Ts(),
1117
1117
  ItemView: Ee,
1118
- TableHeader: Ne,
1119
- TableColumn: Be,
1120
- TableBody: De,
1121
- TableRow: Me,
1122
- TableCell: xe,
1123
- Table: Re,
1124
- StaticData: Ts(),
1125
- LoaderAsync: ws(),
1126
- LoaderAsyncResource: bt()
1118
+ TableHeader: De,
1119
+ TableColumn: Me,
1120
+ TableBody: $e,
1121
+ TableRow: xe,
1122
+ TableCell: Re,
1123
+ Table: Ne,
1124
+ StaticData: Fs(),
1125
+ LoaderAsync: vs(),
1126
+ LoaderAsyncResource: wt()
1127
1127
  });
1128
1128
  export {
1129
- Ds as List,
1130
- Le as ListFilter,
1131
- ke as ListItem,
1129
+ $s as List,
1130
+ Pe as ListFilter,
1131
+ Ae as ListItem,
1132
1132
  Ee as ListItemView,
1133
- Ie as ListLoaderAsync,
1134
- Pe as ListSorting,
1135
- Ae as ListStaticData,
1136
- $s as TypedList,
1137
- vs as TypedListFilter,
1138
- Es as TypedListItem,
1139
- ws as TypedListLoaderAsync,
1140
- ys as TypedListSorting,
1141
- Ts as TypedListStaticData,
1142
- Ma as typedList,
1133
+ Le as ListLoaderAsync,
1134
+ ke as ListSorting,
1135
+ Ve as ListStaticData,
1136
+ zs as TypedList,
1137
+ ys as TypedListFilter,
1138
+ Ts as TypedListItem,
1139
+ vs as TypedListLoaderAsync,
1140
+ Es as TypedListSorting,
1141
+ Fs as TypedListStaticData,
1142
+ xa as typedList,
1143
1143
  h as useList
1144
1144
  };