@mittwald/flow-react-components 0.1.0-alpha.204 → 0.1.0-alpha.206

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,55 +1,56 @@
1
1
  "use client"
2
2
  /* */
3
3
  var mt = Object.defineProperty;
4
- var gt = (a, t, e) => t in a ? mt(a, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[t] = e;
5
- var r = (a, t, e) => gt(a, typeof t != "symbol" ? t + "" : t, e);
6
- import n, { createContext as pt, useContext as ft, createElement as Y, useState as Q, useEffect as L, useRef as bt, cloneElement as St } from "react";
4
+ var gt = (i, t, e) => t in i ? mt(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e;
5
+ var n = (i, t, e) => gt(i, typeof t != "symbol" ? t + "" : t, e);
6
+ import r, { createContext as pt, useContext as ft, createElement as J, useState as Y, useEffect as E, useRef as bt, cloneElement as St } from "react";
7
7
  import "./propsContext-DzAKlmhS.js";
8
8
  import { P as vt } from "./PropsContextProvider-C6Z4XGp6.js";
9
9
  import "@react-aria/utils";
10
10
  import { isShallowEqual as yt, unique as wt, times as Et } from "remeda";
11
- import { d as Ct } from "./dynamic-ClpUSmEt.js";
11
+ import { d as Ft } from "./dynamic-ClpUSmEt.js";
12
12
  import { B as p } from "./Button-DQtavSbo.js";
13
13
  import "@tabler/icons-react";
14
14
  import "./Icon-DPoIVASu.js";
15
- import { I as Ft } from "./IconContextMenu-jwoVcLvd.js";
16
- import { a as A, C as X } from "./ContextMenuTrigger-BdJf5T8A.js";
17
- import { M as Z } from "./MenuItem-DcfYvfPJ.js";
15
+ import { I as Ct } from "./IconContextMenu-jwoVcLvd.js";
16
+ import { a as A, C as Q } from "./ContextMenuTrigger-BdJf5T8A.js";
17
+ import { M as X } from "./MenuItem-DcfYvfPJ.js";
18
18
  import { useLocalizedStringFormatter as v } from "react-aria";
19
- import { TunnelProvider as Lt, TunnelExit as $ } from "@mittwald/react-tunnel";
19
+ import { TunnelProvider as Lt, TunnelExit as U } from "@mittwald/react-tunnel";
20
20
  import C from "clsx";
21
21
  import { g as Tt } from "./getContainerBreakpointSizeClassName-BrcFDcCY.js";
22
22
  import { f as It } from "./flowComponent-DHPUcYyM.js";
23
23
  import { R as kt } from "./Render-BdlTa7Qb.js";
24
24
  import { T as f } from "./Text-Sd5q3Yme.js";
25
- import { I as _ } from "./IconChevronDown--OxZLX8L.js";
25
+ import { I as Z } from "./IconChevronDown--OxZLX8L.js";
26
26
  import { I as At } from "./IconClose-BFwPT_IX.js";
27
- import { makeObservable as xt, observable as U, computed as O, action as F } from "mobx";
27
+ import { makeObservable as Bt, observable as $, computed as O, action as L } from "mobx";
28
28
  import "./context-BB3_MApL.js";
29
- import { u as Bt } from "./useOnChange-C1Quwyuz.js";
29
+ import { u as Vt } from "./useOnChange-C1Quwyuz.js";
30
30
  import { S as Pt } from "./SearchField-DstUFmq4.js";
31
- import { getProperty as Dt } from "dot-prop";
32
- import { hash as Nt } from "object-code";
33
- import { useReactTable as Vt, getCoreRowModel as Rt, getSortedRowModel as Mt, getFilteredRowModel as zt, getPaginationRowModel as $t, getFacetedUniqueValues as Ut } from "@tanstack/react-table";
31
+ import { getProperty as xt } from "dot-prop";
32
+ import { hash as Dt } from "object-code";
33
+ import { useReactTable as Nt, getCoreRowModel as Rt, getSortedRowModel as Mt, getFilteredRowModel as zt, getPaginationRowModel as Ut, getFacetedUniqueValues as $t } from "@tanstack/react-table";
34
34
  import tt from "invariant";
35
35
  import { getAsyncResource as q } from "@mittwald/react-use-promise";
36
36
  import { u as H } from "./useSelector-DpU7_HMO.js";
37
- import * as x from "react-aria-components";
37
+ import * as B from "react-aria-components";
38
38
  import { I as Ot } from "./IllustratedMessage-B3MHD01M.js";
39
39
  import { I as qt } from "./IconSearch-C7VQTAqK.js";
40
40
  import { H as et } from "./Heading-BEC6iPfF.js";
41
- import { d as S, a as K } from "./deepFindOfType-6pG0fH7S.js";
41
+ import { S as K } from "./SkeletonText-B5ZghZhO.js";
42
+ import { d as S, a as G } from "./deepFindOfType-6pG0fH7S.js";
42
43
  import { ListLoaderAsyncResource as Ht, TypedListLoaderAsyncResource as Kt } from "./List/ListLoaderAsyncResource.js";
43
44
  import { S as Gt } from "./Skeleton-CKLaTmDR.js";
44
- const jt = "flow--list--items--item--view", Wt = "flow--list--items--item--view--title", Jt = "flow--list--items--item--view--top-content", Yt = "flow--list--items--item--view--content", Qt = "flow--list--items--item--view--action", Xt = "flow--list--items--item--view--avatar", Zt = "flow--list--items--item--view--text", _t = "flow--list--items--item--view--heading", h = {
45
+ const jt = "flow--list--items--item--view", Wt = "flow--list--items--item--view--title", _t = "flow--list--items--item--view--top-content", Jt = "flow--list--items--item--view--content", Yt = "flow--list--items--item--view--action", Qt = "flow--list--items--item--view--avatar", Xt = "flow--list--items--item--view--text", Zt = "flow--list--items--item--view--heading", d = {
45
46
  view: jt,
46
47
  title: Wt,
47
- topContent: Jt,
48
- content: Yt,
49
- action: Qt,
50
- avatar: Xt,
51
- text: Zt,
52
- heading: _t,
48
+ topContent: _t,
49
+ content: Jt,
50
+ action: Yt,
51
+ avatar: Qt,
52
+ text: Xt,
53
+ heading: Zt,
53
54
  "container-breakpoint-size-xs": "flow--list--items--item--view--container-breakpoint-size-xs",
54
55
  "container-breakpoint-size-s": "flow--list--items--item--view--container-breakpoint-size-s",
55
56
  "container-breakpoint-size-m": "flow--list--items--item--view--container-breakpoint-size-m",
@@ -59,83 +60,83 @@ const jt = "flow--list--items--item--view", Wt = "flow--list--items--item--view-
59
60
  "list.noResult.heading": "Keine Suchergebnisse gefunden",
60
61
  "list.noResult.text": "Deine Suche ergab keine Ergebnisse. Bitte passe die Suchanfrage oder deine Filter an.",
61
62
  "list.options": "Optionen",
62
- "list.paginationInfo": (a) => `${a.visibleItemsCount} von insgesamt ${a.totalItemsCount} angezeigt`,
63
+ "list.paginationInfo": (i) => `${i.visibleItemsCount} von insgesamt ${i.totalItemsCount} angezeigt`,
63
64
  "list.resetAll": "Alles zurücksetzen",
64
- "list.setSorting": (a) => `Sortierung: ${a.property}`,
65
+ "list.setSorting": (i) => `Sortierung: ${i.property}`,
65
66
  "list.showMore": "Mehr anzeigen",
66
67
  "list.sorting": "Sortierung"
67
68
  }, "en-EN": {
68
69
  "list.noResult.heading": "No search results found",
69
70
  "list.noResult.text": "Your search did not return any results. Please adjust the search query or your filters.",
70
71
  "list.options": "Options",
71
- "list.paginationInfo": (a) => `Showing ${a.visibleItemsCount} of ${a.totalItemsCount}`,
72
+ "list.paginationInfo": (i) => `Showing ${i.visibleItemsCount} of ${i.totalItemsCount}`,
72
73
  "list.resetAll": "Reset filters",
73
- "list.setSorting": (a) => `Sorting: ${a.property}`,
74
+ "list.setSorting": (i) => `Sorting: ${i.property}`,
74
75
  "list.showMore": "Show more",
75
76
  "list.sorting": "Sorting"
76
- } }, te = (a) => {
77
- const { className: t, children: e } = a, s = v(g);
78
- return /* @__PURE__ */ n.createElement(A, null, /* @__PURE__ */ n.createElement(
77
+ } }, te = (i) => {
78
+ const { className: t, children: e } = i, s = v(g);
79
+ return /* @__PURE__ */ r.createElement(A, null, /* @__PURE__ */ r.createElement(
79
80
  p,
80
81
  {
81
82
  variant: "plain",
82
83
  className: t,
83
84
  "aria-label": s.format("list.options")
84
85
  },
85
- /* @__PURE__ */ n.createElement(Ft, null)
86
+ /* @__PURE__ */ r.createElement(Ct, null)
86
87
  ), e);
87
- }, ee = (a) => a === "top" ? h.topContent : a === "bottom" ? h.content : h.topContent, st = (a) => {
88
- const { children: t, className: e, containerBreakpointSize: s = "m" } = a, i = {
88
+ }, ee = (i) => i === "top" ? d.topContent : i === "bottom" ? d.content : d.topContent, st = (i) => {
89
+ const { children: t, className: e, containerBreakpointSize: s = "m" } = i, a = {
89
90
  ContextMenu: {
90
- wrapWith: /* @__PURE__ */ n.createElement(te, { className: h.action }),
91
+ wrapWith: /* @__PURE__ */ r.createElement(te, { className: d.action }),
91
92
  placement: "bottom end"
92
93
  },
93
94
  Button: {
94
- className: h.action
95
+ className: d.action
95
96
  },
96
97
  ActionGroup: {
97
- className: h.action,
98
+ className: d.action,
98
99
  ignoreBreakpoint: !0
99
100
  },
100
101
  Content: {
101
- className: Ct((l) => ee(l.slot)),
102
+ className: Ft((l) => ee(l.slot)),
102
103
  tunnelId: "topContent"
103
104
  },
104
105
  Avatar: {
105
- className: h.avatar,
106
+ className: d.avatar,
106
107
  tunnelId: "title"
107
108
  },
108
109
  Heading: {
109
- className: h.heading,
110
+ className: d.heading,
110
111
  level: 5,
111
112
  tunnelId: "title"
112
113
  },
113
114
  Text: {
114
- className: h.text,
115
+ className: d.text,
115
116
  tunnelId: "title"
116
117
  },
117
118
  Link: {
118
119
  unstyled: !0
119
120
  }
120
121
  }, o = C(
121
- h.view,
122
+ d.view,
122
123
  e,
123
- h[Tt(s)]
124
+ d[Tt(s)]
124
125
  );
125
- return /* @__PURE__ */ n.createElement("div", { className: o }, /* @__PURE__ */ n.createElement(vt, { props: i }, /* @__PURE__ */ n.createElement(Lt, null, t, /* @__PURE__ */ n.createElement("div", { className: h.title }, /* @__PURE__ */ n.createElement($, { id: "title" })), /* @__PURE__ */ n.createElement($, { id: "topContent" }))));
126
- }, it = pt({}), m = () => ft(it).list, se = () => m().loader.getLoaderInvocationHooks().map((t, e) => /* @__PURE__ */ n.createElement(kt, { key: e }, () => {
126
+ return /* @__PURE__ */ r.createElement("div", { className: o }, /* @__PURE__ */ r.createElement(vt, { props: a }, /* @__PURE__ */ r.createElement(Lt, null, t, /* @__PURE__ */ r.createElement("div", { className: d.title }, /* @__PURE__ */ r.createElement(U, { id: "title" })), /* @__PURE__ */ r.createElement(U, { id: "topContent" }))));
127
+ }, at = pt({}), m = () => ft(at).list, se = () => m().loader.getLoaderInvocationHooks().map((t, e) => /* @__PURE__ */ r.createElement(kt, { key: e }, () => {
127
128
  t();
128
- })), ie = (a) => {
129
- const { sorting: t } = a;
130
- return /* @__PURE__ */ n.createElement(Z, { id: t.id }, t.name);
131
- }, T = (a) => {
132
- const { children: t, locales: e, variables: s } = a;
129
+ })), ae = (i) => {
130
+ const { sorting: t } = i;
131
+ return /* @__PURE__ */ r.createElement(X, { id: t.id }, t.name);
132
+ }, T = (i) => {
133
+ const { children: t, locales: e, variables: s } = i;
133
134
  return v(e).format(t, s);
134
- }, ae = () => {
135
- const a = m(), t = a.visibleSorting.map((i) => /* @__PURE__ */ n.createElement(ie, { sorting: i, key: i.id }));
135
+ }, ie = () => {
136
+ const i = m(), t = i.visibleSorting.map((a) => /* @__PURE__ */ r.createElement(ae, { sorting: a, key: a.id }));
136
137
  if (t.length === 0)
137
138
  return null;
138
- const e = a.visibleSorting.find((i) => i.isSorted()), s = /* @__PURE__ */ n.createElement(f, null, e ? /* @__PURE__ */ n.createElement(
139
+ const e = i.visibleSorting.find((a) => a.isSorted()), s = /* @__PURE__ */ r.createElement(f, null, e ? /* @__PURE__ */ r.createElement(
139
140
  T,
140
141
  {
141
142
  locales: g,
@@ -144,49 +145,49 @@ const jt = "flow--list--items--item--view", Wt = "flow--list--items--item--view-
144
145
  }
145
146
  },
146
147
  "list.setSorting"
147
- ) : /* @__PURE__ */ n.createElement(T, { locales: g }, "list.sorting"));
148
- return /* @__PURE__ */ n.createElement(A, null, /* @__PURE__ */ n.createElement(p, { variant: "soft", size: "s", color: "secondary" }, s, /* @__PURE__ */ n.createElement(_, null)), /* @__PURE__ */ n.createElement(
149
- X,
148
+ ) : /* @__PURE__ */ r.createElement(T, { locales: g }, "list.sorting"));
149
+ return /* @__PURE__ */ r.createElement(A, null, /* @__PURE__ */ r.createElement(p, { variant: "soft", size: "s", color: "secondary" }, s, /* @__PURE__ */ r.createElement(Z, null)), /* @__PURE__ */ r.createElement(
150
+ Q,
150
151
  {
151
152
  selectionMode: "single",
152
153
  selectedKeys: e ? [e.id] : [],
153
- onAction: (i) => {
154
- a.getSorting(String(i)).enable();
154
+ onAction: (a) => {
155
+ i.getSorting(String(a)).enable();
155
156
  }
156
157
  },
157
158
  t
158
159
  ));
159
- }, ne = (a) => {
160
- const { filter: t } = a, { values: e, mode: s, name: i, property: o } = t, l = e.map((u) => /* @__PURE__ */ n.createElement(
161
- Z,
160
+ }, re = (i) => {
161
+ const { filter: t } = i, { values: e, mode: s, name: a, property: o } = t, l = e.map((c) => /* @__PURE__ */ r.createElement(
162
+ X,
162
163
  {
163
- id: u.id,
164
- key: u.id,
164
+ id: c.id,
165
+ key: c.id,
165
166
  onAction: () => {
166
- u.toggle();
167
+ c.toggle();
167
168
  }
168
169
  },
169
- u.render()
170
- )), c = e.filter((u) => u.isActive).map((u) => u.id);
171
- return /* @__PURE__ */ n.createElement(A, null, /* @__PURE__ */ n.createElement(p, { variant: "soft", size: "s", color: "secondary" }, /* @__PURE__ */ n.createElement(f, null, i ?? o), /* @__PURE__ */ n.createElement(_, null)), /* @__PURE__ */ n.createElement(
172
- X,
170
+ c.render()
171
+ )), u = e.filter((c) => c.isActive).map((c) => c.id);
172
+ return /* @__PURE__ */ r.createElement(A, null, /* @__PURE__ */ r.createElement(p, { variant: "soft", size: "s", color: "secondary" }, /* @__PURE__ */ r.createElement(f, null, a ?? o), /* @__PURE__ */ r.createElement(Z, null)), /* @__PURE__ */ r.createElement(
173
+ Q,
173
174
  {
174
175
  selectionMode: s === "one" ? "single" : "multiple",
175
- selectedKeys: c
176
+ selectedKeys: u
176
177
  },
177
178
  l
178
179
  ));
179
- }, re = "flow--list--header", oe = "flow--list--header--picker-list-and-search", le = "flow--list--header--picker-list", ce = "flow--list--header--search-field", w = {
180
- header: re,
180
+ }, ne = "flow--list--header", oe = "flow--list--header--picker-list-and-search", le = "flow--list--header--picker-list", ce = "flow--list--header--search-field", w = {
181
+ header: ne,
181
182
  pickerListAndSearch: oe,
182
183
  pickerList: le,
183
184
  searchField: ce
184
- }, ue = "flow--list--header--active-filters", de = "flow--list--header--active-filters--clear-button", G = {
185
+ }, ue = "flow--list--header--active-filters", he = "flow--list--header--active-filters--clear-button", j = {
185
186
  activeFilters: ue,
186
- clearButton: de
187
- }, he = () => {
188
- const a = m(), t = a.filters.flatMap(
189
- (e) => e.values.filter((s) => s.isActive).map((s) => /* @__PURE__ */ n.createElement(
187
+ clearButton: he
188
+ }, de = () => {
189
+ const i = m(), t = i.filters.flatMap(
190
+ (e) => e.values.filter((s) => s.isActive).map((s) => /* @__PURE__ */ r.createElement(
190
191
  p,
191
192
  {
192
193
  variant: "soft",
@@ -194,72 +195,72 @@ const jt = "flow--list--items--item--view", Wt = "flow--list--items--item--view-
194
195
  key: s.id,
195
196
  onPress: () => s.deactivate()
196
197
  },
197
- /* @__PURE__ */ n.createElement(f, null, s.render()),
198
- /* @__PURE__ */ n.createElement(At, null)
198
+ /* @__PURE__ */ r.createElement(f, null, s.render()),
199
+ /* @__PURE__ */ r.createElement(At, null)
199
200
  ))
200
201
  );
201
- return t.length <= 0 ? null : /* @__PURE__ */ n.createElement("div", { className: G.activeFilters }, t, /* @__PURE__ */ n.createElement(
202
+ return t.length <= 0 ? null : /* @__PURE__ */ r.createElement("div", { className: j.activeFilters }, t, /* @__PURE__ */ r.createElement(
202
203
  p,
203
204
  {
204
- className: G.clearButton,
205
+ className: j.clearButton,
205
206
  size: "s",
206
207
  variant: "plain",
207
- onPress: () => a.clearFilters()
208
+ onPress: () => i.clearFilters()
208
209
  },
209
- /* @__PURE__ */ n.createElement(T, { locales: g }, "list.resetAll")
210
+ /* @__PURE__ */ r.createElement(T, { locales: g }, "list.resetAll")
210
211
  ));
211
- }, me = (a) => {
212
- const { className: t, onChange: e, value: s, ...i } = a, [o, l] = Q(s ?? "");
213
- Bt(s, () => {
212
+ }, me = (i) => {
213
+ const { className: t, onChange: e, value: s, ...a } = i, [o, l] = Y(s ?? "");
214
+ Vt(s, () => {
214
215
  l(s ?? "");
215
216
  }, [o]);
216
- const c = () => {
217
+ const u = () => {
217
218
  e(void 0), l("");
218
- }, u = (d) => {
219
- d.key === "Enter" ? o.trim() === "" ? e(void 0) : e(o) : d.key === "Escape" && c();
219
+ }, c = (h) => {
220
+ h.key === "Enter" ? o.trim() === "" ? e(void 0) : e(o) : h.key === "Escape" && u();
220
221
  };
221
- return /* @__PURE__ */ n.createElement(
222
+ return /* @__PURE__ */ r.createElement(
222
223
  Pt,
223
224
  {
224
225
  className: t,
225
226
  value: o,
226
- onKeyUp: u,
227
- onChange: (d) => l(d),
228
- onClear: c,
229
- ...i
227
+ onKeyUp: c,
228
+ onChange: (h) => l(h),
229
+ onClear: u,
230
+ ...a
230
231
  }
231
232
  );
232
- }, ge = (a) => {
233
- const { className: t, search: e } = a, s = e.render ?? me;
234
- return Y(s, {
233
+ }, ge = (i) => {
234
+ const { className: t, search: e } = i, s = e.render ?? me;
235
+ return J(s, {
235
236
  className: t,
236
237
  value: e.value,
237
238
  onChange: e.setValue.bind(e),
238
239
  ...e.textFieldProps
239
240
  });
240
- }, pe = (a) => {
241
- const { className: t } = a, e = m();
241
+ }, pe = (i) => {
242
+ const { className: t } = i, e = m();
242
243
  if (e.filters.length === 0 && e.visibleSorting.length === 0 && !e.search)
243
244
  return null;
244
- const s = e.filters.map((i) => /* @__PURE__ */ n.createElement(ne, { key: i.property, filter: i }));
245
- return /* @__PURE__ */ n.createElement("div", { className: C(t, w.header) }, /* @__PURE__ */ n.createElement("div", { className: w.pickerListAndSearch }, /* @__PURE__ */ n.createElement("div", { className: w.pickerList }, /* @__PURE__ */ n.createElement(ae, null), s), e.search && /* @__PURE__ */ n.createElement(ge, { className: w.searchField, search: e.search })), /* @__PURE__ */ n.createElement(he, null));
245
+ const s = e.filters.map((a) => /* @__PURE__ */ r.createElement(re, { key: a.property, filter: a }));
246
+ return /* @__PURE__ */ r.createElement("div", { className: C(t, w.header) }, /* @__PURE__ */ r.createElement("div", { className: w.pickerListAndSearch }, /* @__PURE__ */ r.createElement("div", { className: w.pickerList }, /* @__PURE__ */ r.createElement(ie, null), s), e.search && /* @__PURE__ */ r.createElement(ge, { className: w.searchField, search: e.search })), /* @__PURE__ */ r.createElement(de, null));
246
247
  }, fe = "flow--list", be = {
247
248
  list: fe
248
249
  };
249
- let Se = class at {
250
+ let Se = class it {
250
251
  constructor(t, e, s) {
251
- r(this, "id");
252
- r(this, "data");
253
- r(this, "collection");
252
+ n(this, "id");
253
+ n(this, "data");
254
+ n(this, "collection");
254
255
  this.collection = t, this.id = e, this.data = s;
255
256
  }
256
257
  static fromRow(t, e) {
257
- return new at(t, e.id, e.original);
258
+ return new it(t, e.id, e.original);
258
259
  }
259
260
  };
260
261
  class ve {
261
262
  constructor(t) {
262
- r(this, "list");
263
+ n(this, "list");
263
264
  this.list = t;
264
265
  }
265
266
  get entries() {
@@ -268,11 +269,11 @@ class ve {
268
269
  }
269
270
  class ye {
270
271
  constructor(t, e = {}) {
271
- r(this, "batchSize");
272
- r(this, "list");
273
- var i;
272
+ n(this, "batchSize");
273
+ n(this, "list");
274
+ var a;
274
275
  const { batchSize: s = 20 } = e;
275
- this.list = t, this.batchSize = s, t.filters.forEach((o) => o.onFilterUpdated(() => this.reset())), (i = t.search) == null || i.onUpdated(() => this.reset());
276
+ this.list = t, this.batchSize = s, t.filters.forEach((o) => o.onFilterUpdated(() => this.reset())), (a = t.search) == null || a.onUpdated(() => this.reset());
276
277
  }
277
278
  get reactTable() {
278
279
  return this.list.reactTable.table;
@@ -314,18 +315,18 @@ class ye {
314
315
  }
315
316
  }
316
317
  const we = "$";
317
- class j {
318
+ class W {
318
319
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
319
320
  constructor(t, e) {
320
- r(this, "filter");
321
- r(this, "value");
321
+ n(this, "filter");
322
+ n(this, "value");
322
323
  this.filter = t, this.value = e;
323
324
  }
324
325
  equals(t) {
325
326
  return yt(this.value, t.value);
326
327
  }
327
328
  get id() {
328
- return `${this.filter.property}@@${Nt(this.value)}`;
329
+ return `${this.filter.property}@@${Dt(this.value)}`;
329
330
  }
330
331
  get isActive() {
331
332
  return this.filter.isValueActive(this);
@@ -340,40 +341,41 @@ class j {
340
341
  this.filter.deactivateValue(this);
341
342
  }
342
343
  }
343
- const Ee = (a, t) => a === t, Ce = (a) => String(a);
344
- class Fe {
344
+ const Ee = (i, t) => i === t, Fe = (i) => String(i);
345
+ class Ce {
345
346
  constructor(t, e) {
346
- r(this, "_values");
347
- r(this, "list");
348
- r(this, "property");
349
- r(this, "mode");
350
- r(this, "matcher");
351
- r(this, "renderItem");
352
- r(this, "name");
353
- r(this, "onFilterUpdateCallbacks", /* @__PURE__ */ new Set());
347
+ n(this, "_values");
348
+ n(this, "_valuesFromTableState");
349
+ n(this, "list");
350
+ n(this, "property");
351
+ n(this, "mode");
352
+ n(this, "matcher");
353
+ n(this, "renderItem");
354
+ n(this, "name");
355
+ n(this, "onFilterUpdateCallbacks", /* @__PURE__ */ new Set());
354
356
  var s;
355
- this.list = t, this.property = e.property, this.mode = e.mode ?? "one", this._values = (s = e.values) == null ? void 0 : s.map((i) => new j(this, i)), this.matcher = e.matcher ?? Ee, this.renderItem = e.renderItem ?? Ce, this.name = e.name;
357
+ this.list = t, this.property = e.property, this.mode = e.mode ?? "one", this._values = (s = e.values) == null ? void 0 : s.map((a) => new W(this, a)), this.matcher = e.matcher ?? Ee, this.renderItem = e.renderItem ?? Fe, this.name = e.name;
356
358
  }
357
359
  updateTableColumnDef(t) {
358
360
  t.enableColumnFilter = !0, t.filterFn = this.getReactTableFilterFn();
359
361
  }
360
362
  getReactTableFilterFn() {
361
363
  return (t, e, s) => {
362
- const i = this.property, o = i.startsWith(we) ? t.original : Dt(t.original, i);
364
+ const a = this.property, o = a.startsWith(we) ? t.original : xt(t.original, a);
363
365
  return this.checkFilterMatches(o, s);
364
366
  };
365
367
  }
366
368
  checkFilterMatches(t, e) {
367
369
  if (e === null)
368
370
  return !0;
369
- const s = (o) => Array.isArray(o) ? o : [o], i = (o) => this.matcher(o.value, t);
371
+ const s = (o) => Array.isArray(o) ? o : [o], a = (o) => this.matcher(o.value, t);
370
372
  if (this.mode === "all")
371
- return s(e).every(i);
373
+ return s(e).every(a);
372
374
  if (this.mode === "some") {
373
375
  const o = s(e);
374
- return o.length === 0 || o.some(i);
376
+ return o.length === 0 || o.some(a);
375
377
  } else if (this.mode === "one")
376
- return i(e);
378
+ return a(e);
377
379
  throw new Error(`Unknown filter mode '${this.mode}'`);
378
380
  }
379
381
  getTableColumnFilter() {
@@ -386,10 +388,24 @@ class Fe {
386
388
  var t;
387
389
  return ((t = this.getTableColumnFilter()) == null ? void 0 : t.value) ?? null;
388
390
  }
389
- get values() {
390
- return this._values === void 0 && (this._values = wt(
391
+ getValuesFromTableState() {
392
+ return wt(
391
393
  Array.from(this.getTableColumn().getFacetedUniqueValues().keys()).flatMap((t) => t).filter((t) => t != null)
392
- ).map((t) => new j(this, t))), this._values;
394
+ ).map((t) => new W(this, t));
395
+ }
396
+ checkIfValueIsUnknown(t) {
397
+ return !this.values.some((s) => s.id === t.id);
398
+ }
399
+ deleteUnknownFilterValues() {
400
+ if (this.values !== this.valuesFromTableState)
401
+ for (const t of this.valuesFromTableState)
402
+ this.checkIfValueIsUnknown(t) && this.deactivateValue(t);
403
+ }
404
+ get values() {
405
+ return this._values ?? this.valuesFromTableState;
406
+ }
407
+ get valuesFromTableState() {
408
+ return this._valuesFromTableState || (this._valuesFromTableState = this.getValuesFromTableState()), this._valuesFromTableState;
393
409
  }
394
410
  getArrayValue() {
395
411
  const t = this.getValue();
@@ -404,7 +420,7 @@ class Fe {
404
420
  deactivateValue(t) {
405
421
  const e = this.getArrayValue();
406
422
  let s;
407
- 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());
423
+ this.mode === "all" || this.mode === "some" ? s = e.filter((a) => !a.equals(t)) : s = null, this.list.reactTable.getTableColumn(this.property).setFilterValue(s), this.onFilterUpdateCallbacks.forEach((a) => a());
408
424
  }
409
425
  clearValues() {
410
426
  let t;
@@ -413,7 +429,7 @@ class Fe {
413
429
  toggleValue(t) {
414
430
  const e = this.getArrayValue();
415
431
  let s;
416
- 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());
432
+ this.mode === "all" || this.mode === "some" ? t.isActive ? s = e.filter((a) => !a.equals(t)) : s = [...e, t] : s = t.isActive ? null : t, this.list.reactTable.getTableColumn(this.property).setFilterValue(s), this.onFilterUpdateCallbacks.forEach((a) => a());
417
433
  }
418
434
  onFilterUpdated(t) {
419
435
  this.onFilterUpdateCallbacks.add(t);
@@ -421,11 +437,11 @@ class Fe {
421
437
  }
422
438
  class Le {
423
439
  constructor(t, e) {
424
- r(this, "list");
425
- r(this, "property");
426
- r(this, "name");
427
- r(this, "direction");
428
- r(this, "defaultEnabled");
440
+ n(this, "list");
441
+ n(this, "property");
442
+ n(this, "name");
443
+ n(this, "direction");
444
+ n(this, "defaultEnabled");
429
445
  this.list = t, this.property = e.property, this.name = e.name, this.direction = e.direction ?? "asc", this.defaultEnabled = e.defaultEnabled ?? !1;
430
446
  }
431
447
  updateTableColumnDef(t) {
@@ -453,25 +469,25 @@ class Le {
453
469
  return `${this.getTableColumn().id}:${this.direction}`;
454
470
  }
455
471
  }
456
- class B {
472
+ class V {
457
473
  constructor(t, e, s = {}) {
458
- r(this, "list");
459
- r(this, "table");
460
- r(this, "sortingState");
461
- r(this, "updateSortingState");
474
+ n(this, "list");
475
+ n(this, "table");
476
+ n(this, "sortingState");
477
+ n(this, "updateSortingState");
462
478
  this.list = t;
463
- const i = this.list.sorting.filter(
464
- (c) => c.defaultEnabled !== !1
465
- ), [o, l] = Q(
466
- i.map((c) => c.getReactTableColumnSort())
479
+ const a = this.list.sorting.filter(
480
+ (u) => u.defaultEnabled !== !1
481
+ ), [o, l] = Y(
482
+ a.map((u) => u.getReactTableColumnSort())
467
483
  );
468
484
  this.sortingState = o, this.updateSortingState = l, this.table = this.useReactTable(e, s);
469
485
  }
470
486
  static useNew(t, e, s = {}) {
471
- return new B(t, e, s);
487
+ return new V(t, e, s);
472
488
  }
473
489
  useReactTable(t, e = {}) {
474
- const s = this.list.loader.useData(), i = Vt({
490
+ const s = this.list.loader.useData(), a = Nt({
475
491
  data: s,
476
492
  state: {
477
493
  sorting: this.sortingState
@@ -485,22 +501,22 @@ class B {
485
501
  getCoreRowModel: Rt(),
486
502
  getSortedRowModel: Mt(),
487
503
  getFilteredRowModel: zt(),
488
- getPaginationRowModel: $t(),
489
- getFacetedUniqueValues: Ut(),
504
+ getPaginationRowModel: Ut(),
505
+ getFacetedUniqueValues: $t(),
490
506
  onSortingChange: (o) => {
491
507
  this.handleSortingStateUpdate(o);
492
508
  },
493
509
  globalFilterFn: "auto",
494
510
  ...e
495
511
  });
496
- return L(() => {
512
+ return E(() => {
497
513
  t && t(this.list);
498
- }, [this.list, t, i]), i;
514
+ }, [this.list, t, a]), a;
499
515
  }
500
516
  handleSortingStateUpdate(t) {
501
517
  const e = typeof t == "function" ? t(this.sortingState) : t, s = this.list.sorting.filter(
502
- (i) => i.defaultEnabled === "hidden" && !e.some((o) => o.id === i.property)
503
- ).map((i) => i.getReactTableColumnSort());
518
+ (a) => a.defaultEnabled === "hidden" && !e.some((o) => o.id === a.property)
519
+ ).map((a) => a.getReactTableColumnSort());
504
520
  this.updateSortingState([...s, ...e]);
505
521
  }
506
522
  get searchString() {
@@ -512,9 +528,9 @@ class B {
512
528
  }
513
529
  getTableColumnDefs() {
514
530
  const t = /* @__PURE__ */ new Map(), e = (s) => {
515
- const i = t.get(s);
516
- if (i)
517
- return i;
531
+ const a = t.get(s);
532
+ if (a)
533
+ return a;
518
534
  const o = {
519
535
  id: s,
520
536
  accessorKey: s,
@@ -532,20 +548,20 @@ class B {
532
548
  }
533
549
  class P {
534
550
  constructor() {
535
- r(this, "dataBatches", []);
536
- r(this, "prevDataBatches", []);
537
- r(this, "batchLoadingStates", ["void"]);
538
- xt(this, {
551
+ n(this, "dataBatches", []);
552
+ n(this, "prevDataBatches", []);
553
+ n(this, "batchLoadingStates", ["void"]);
554
+ Bt(this, {
539
555
  prevDataBatches: !1,
540
556
  useMergedData: !1,
541
557
  useIsLoading: !1,
542
- dataBatches: U.shallow,
543
- batchLoadingStates: U.shallow,
558
+ dataBatches: $.shallow,
559
+ batchLoadingStates: $.shallow,
544
560
  mergedData: O,
545
561
  isLoading: O,
546
- reset: F.bound,
547
- setDataBatch: F.bound,
548
- setBatchLoadingState: F.bound
562
+ reset: L.bound,
563
+ setDataBatch: L.bound,
564
+ setBatchLoadingState: L.bound
549
565
  });
550
566
  }
551
567
  static useNew() {
@@ -574,22 +590,22 @@ class P {
574
590
  }
575
591
  }
576
592
  const Te = [];
577
- class D {
593
+ class x {
578
594
  constructor(t, e = {}) {
579
- r(this, "list");
580
- r(this, "dataSource");
581
- r(this, "manualSorting");
582
- r(this, "manualFiltering");
583
- r(this, "manualPagination");
584
- r(this, "loaderState");
585
- var c;
595
+ n(this, "list");
596
+ n(this, "dataSource");
597
+ n(this, "manualSorting");
598
+ n(this, "manualFiltering");
599
+ n(this, "manualPagination");
600
+ n(this, "loaderState");
601
+ var u;
586
602
  const { source: s } = e;
587
603
  this.dataSource = s ?? { staticData: Te };
588
- 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;
589
- this.list = t, this.loaderState = P.useNew(), this.manualPagination = i ?? !1, this.manualFiltering = o ?? this.manualPagination, this.manualSorting = l ?? this.manualPagination, this.list.filters.forEach((u) => u.onFilterUpdated(() => this.reset())), (c = this.list.search) == null || c.onUpdated(() => this.reset());
604
+ const a = "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;
605
+ this.list = t, this.loaderState = P.useNew(), this.manualPagination = a ?? !1, this.manualFiltering = o ?? this.manualPagination, this.manualSorting = l ?? this.manualPagination, this.list.filters.forEach((c) => c.onFilterUpdated(() => this.reset())), (u = this.list.search) == null || u.onUpdated(() => this.reset());
590
606
  }
591
607
  static useNew(t, e = {}) {
592
- return new D(t, e);
608
+ return new x(t, e);
593
609
  }
594
610
  reset() {
595
611
  this.loaderState.reset();
@@ -615,7 +631,7 @@ class D {
615
631
  }), this.useObserveBatchData(e, t), this.useObserveBatchLoadingState(e, t);
616
632
  }
617
633
  useObserveBatchLoadingState(t, e) {
618
- L(() => (this.loaderState.setBatchLoadingState(
634
+ E(() => (this.loaderState.setBatchLoadingState(
619
635
  e,
620
636
  t.state.value
621
637
  ), t.state.observe((s) => {
@@ -623,12 +639,12 @@ class D {
623
639
  })), [t, e]);
624
640
  }
625
641
  useObserveBatchData(t, e) {
626
- const s = (i) => {
627
- const { data: o, itemTotalCount: l } = i;
642
+ const s = (a) => {
643
+ const { data: o, itemTotalCount: l } = a;
628
644
  this.loaderState.setDataBatch(e, o), l !== void 0 && this.list.batches.updateItemTotalCount(l);
629
645
  };
630
- L(() => (t.value.value.isSet && s(t.value.value.value), t.value.observe((i) => {
631
- i.isSet && s(i.value);
646
+ E(() => (t.value.value.isSet && s(t.value.value.value), t.value.observe((a) => {
647
+ a.isSet && s(a.value);
632
648
  })), [t, e]);
633
649
  }
634
650
  getDataLoaderOptions(t) {
@@ -656,29 +672,29 @@ class D {
656
672
  const e = this.dataSource, s = this.getDataLoaderOptions(t);
657
673
  if ("staticData" in e)
658
674
  return q(
659
- async (i) => ({
660
- data: i,
661
- itemTotalCount: i.length
675
+ async (a) => ({
676
+ data: a,
677
+ itemTotalCount: a.length
662
678
  }),
663
679
  [e.staticData]
664
680
  );
665
681
  if ("asyncLoader" in e) {
666
- const i = e.asyncLoader;
667
- return q(i, [s]);
682
+ const a = e.asyncLoader;
683
+ return q(a, [s]);
668
684
  }
669
685
  if ("asyncResourceFactory" in e) {
670
- const i = e.asyncResourceFactory;
671
- return i(s);
686
+ const a = e.asyncResourceFactory;
687
+ return a(s);
672
688
  }
673
689
  throw new Error("Unknown data source");
674
690
  }
675
691
  }
676
692
  class Ie {
677
693
  constructor(t, e) {
678
- r(this, "list");
679
- r(this, "render");
680
- r(this, "textFieldProps");
681
- r(this, "onUpdateCallbacks", /* @__PURE__ */ new Set());
694
+ n(this, "list");
695
+ n(this, "render");
696
+ n(this, "textFieldProps");
697
+ n(this, "onUpdateCallbacks", /* @__PURE__ */ new Set());
682
698
  this.list = t, this.render = e.render, this.textFieldProps = e.textFieldProps;
683
699
  }
684
700
  get value() {
@@ -700,49 +716,51 @@ class Ie {
700
716
  this.onUpdateCallbacks.add(t);
701
717
  }
702
718
  }
703
- const E = class E {
719
+ const F = class F {
704
720
  constructor(t, e = {}) {
705
- r(this, "list");
706
- r(this, "textValue");
707
- r(this, "href");
708
- r(this, "onAction");
709
- r(this, "fallback");
710
- r(this, "renderFn");
711
- const { onAction: s, fallback: i, textValue: o, href: l, renderFn: c } = e;
712
- this.list = t, this.textValue = o, this.renderFn = c, this.href = l, this.onAction = s, this.fallback = i;
721
+ n(this, "list");
722
+ n(this, "textValue");
723
+ n(this, "href");
724
+ n(this, "onAction");
725
+ n(this, "fallback");
726
+ n(this, "renderFn");
727
+ const { onAction: s, fallback: a, textValue: o, href: l, renderFn: u } = e;
728
+ this.list = t, this.textValue = o, this.renderFn = u, this.href = l, this.onAction = s, this.fallback = a;
713
729
  }
714
730
  render(t) {
715
- return (this.renderFn ?? E.fallbackRenderItemFn)(t);
731
+ return (this.renderFn ?? F.fallbackRenderItemFn)(t);
716
732
  }
717
733
  };
718
- r(E, "fallbackRenderItemFn", (t) => Y("pre", void 0, JSON.stringify(t)));
719
- let I = E, ke = class nt {
734
+ n(F, "fallbackRenderItemFn", (t) => J("pre", void 0, JSON.stringify(t)));
735
+ let I = F, ke = class rt {
720
736
  constructor(t) {
721
- r(this, "filters");
722
- r(this, "itemView");
723
- r(this, "search");
724
- r(this, "sorting");
725
- r(this, "items");
726
- r(this, "reactTable");
727
- r(this, "batches");
728
- r(this, "loader");
729
- r(this, "hasAction");
737
+ n(this, "filters");
738
+ n(this, "itemView");
739
+ n(this, "search");
740
+ n(this, "sorting");
741
+ n(this, "items");
742
+ n(this, "reactTable");
743
+ n(this, "batches");
744
+ n(this, "loader");
745
+ n(this, "hasAction");
730
746
  const {
731
747
  itemView: e,
732
748
  filters: s = [],
733
- sorting: i = [],
749
+ sorting: a = [],
734
750
  batchesController: o,
735
751
  hasAction: l,
736
- onChange: c
752
+ onChange: u
737
753
  } = t;
738
- this.items = new ve(this), this.filters = s.map((u) => new Fe(this, u)), this.sorting = i.map((u) => new Le(this, u)), this.search = t.search ? new Ie(this, t.search) : void 0, this.itemView = new I(this, e), this.batches = new ye(this, o), this.loader = D.useNew(this, t.loader), this.reactTable = B.useNew(this, c, {
754
+ this.items = new ve(this), this.filters = s.map((c) => new Ce(this, c)), this.sorting = a.map((c) => new Le(this, c)), this.search = t.search ? new Ie(this, t.search) : void 0, this.itemView = new I(this, e), this.batches = new ye(this, o), this.loader = x.useNew(this, t.loader), this.reactTable = V.useNew(this, u, {
739
755
  manualFiltering: this.loader.manualFiltering,
740
756
  manualPagination: this.loader.manualPagination,
741
757
  manualSorting: this.loader.manualSorting
742
- }), this.hasAction = l;
758
+ }), E(() => {
759
+ this.filters.forEach((c) => c.deleteUnknownFilterValues());
760
+ }, [this.filters]), this.hasAction = l;
743
761
  }
744
762
  static useNew(t) {
745
- return new nt(t);
763
+ return new rt(t);
746
764
  }
747
765
  get isFiltered() {
748
766
  return this.filters.some((t) => t.isActive()) || !!this.search && this.search.isSet;
@@ -765,104 +783,98 @@ let I = E, ke = class nt {
765
783
  return !this.loader.useIsLoading() && this.items.entries.length === 0;
766
784
  }
767
785
  };
768
- const Ae = "flow--list--items", xe = "flow--list--items--is-loading", W = {
786
+ const Ae = "flow--list--items", Be = "flow--list--items--is-loading", _ = {
769
787
  items: Ae,
770
- isLoading: xe
771
- }, Be = "flow--list--items--item", Pe = "flow--list--items--item--has-action", k = {
772
- item: Be,
788
+ isLoading: Be
789
+ }, Ve = "flow--list--items--item", Pe = "flow--list--items--item--has-action", k = {
790
+ item: Ve,
773
791
  hasAction: Pe
774
- }, De = (a) => {
775
- const { data: t, children: e } = a, s = m(), i = s.itemView, o = i.onAction, l = i.textValue ? i.textValue(t) : void 0, c = o ? () => o(t) : void 0, u = i.href ? i.href(t) : void 0, d = s.hasAction || !!c || !!u, b = C(k.item, d && k.hasAction);
776
- return /* @__PURE__ */ n.createElement(
777
- x.GridListItem,
792
+ }, xe = (i) => {
793
+ const { data: t, children: e } = i, s = m(), a = s.itemView, o = a.onAction, l = a.textValue ? a.textValue(t) : void 0, u = o ? () => o(t) : void 0, c = a.href ? a.href(t) : void 0, h = s.hasAction || !!u || !!c, b = C(k.item, h && k.hasAction);
794
+ return /* @__PURE__ */ r.createElement(
795
+ B.GridListItem,
778
796
  {
779
797
  className: b,
780
- onAction: c,
798
+ onAction: u,
781
799
  textValue: l,
782
- href: u
800
+ href: c
783
801
  },
784
- e ?? i.render(t)
802
+ e ?? a.render(t)
785
803
  );
786
- }, Ne = (a) => /* @__PURE__ */ n.createElement(x.GridListItem, { textValue: "-", className: k.item }, a.children), Ve = () => {
787
- const a = v(g);
788
- return /* @__PURE__ */ n.createElement(Ot, null, /* @__PURE__ */ n.createElement(qt, null), /* @__PURE__ */ n.createElement(et, null, a.format("list.noResult.heading")), /* @__PURE__ */ n.createElement(f, null, a.format("list.noResult.text")));
789
- }, Re = "flow--skeleton-text", Me = "flow--skeleton-text--shimmer", ze = {
790
- skeletonText: Re,
791
- shimmer: Me
792
- }, J = (a) => {
793
- const { width: t, style: e = {}, ...s } = a;
794
- return /* @__PURE__ */ n.createElement("div", { "aria-hidden": !0, style: { width: t, ...e }, ...s }, /* @__PURE__ */ n.createElement("div", { className: ze.skeletonText }));
795
- }, $e = () => /* @__PURE__ */ n.createElement(st, null, /* @__PURE__ */ n.createElement(et, null, /* @__PURE__ */ n.createElement(J, { width: "200px" })), /* @__PURE__ */ n.createElement(f, null, /* @__PURE__ */ n.createElement(J, { width: "300px" }))), Ue = () => {
796
- const t = m().itemView.fallback ?? /* @__PURE__ */ n.createElement($e, null);
797
- return Array.from(Array(5)).map((e, s) => /* @__PURE__ */ n.createElement(Ne, { key: s }, St(t)));
798
- }, Oe = (a) => {
799
- const { className: t, ...e } = a, s = m(), i = s.loader.useIsLoading(), o = s.loader.useIsInitiallyLoading(), l = s.useIsEmpty(), c = s.items.entries.map((d) => /* @__PURE__ */ n.createElement(De, { key: d.id, data: d.data })), u = C(
800
- W.items,
804
+ }, De = (i) => /* @__PURE__ */ r.createElement(B.GridListItem, { textValue: "-", className: k.item }, i.children), Ne = () => {
805
+ const i = v(g);
806
+ return /* @__PURE__ */ r.createElement(Ot, null, /* @__PURE__ */ r.createElement(qt, null), /* @__PURE__ */ r.createElement(et, null, i.format("list.noResult.heading")), /* @__PURE__ */ r.createElement(f, null, i.format("list.noResult.text")));
807
+ }, Re = () => /* @__PURE__ */ r.createElement(st, null, /* @__PURE__ */ r.createElement(et, null, /* @__PURE__ */ r.createElement(K, { width: "200px" })), /* @__PURE__ */ r.createElement(f, null, /* @__PURE__ */ r.createElement(K, { width: "300px" }))), Me = () => {
808
+ const t = m().itemView.fallback ?? /* @__PURE__ */ r.createElement(Re, null);
809
+ return Array.from(Array(5)).map((e, s) => /* @__PURE__ */ r.createElement(De, { key: s }, St(t)));
810
+ }, ze = (i) => {
811
+ const { className: t, ...e } = i, s = m(), a = s.loader.useIsLoading(), o = s.loader.useIsInitiallyLoading(), l = s.useIsEmpty(), u = s.items.entries.map((h) => /* @__PURE__ */ r.createElement(xe, { key: h.id, data: h.data })), c = C(
812
+ _.items,
801
813
  t,
802
- i && W.isLoading
814
+ a && _.isLoading
803
815
  );
804
- return l ? /* @__PURE__ */ n.createElement(Ve, null) : /* @__PURE__ */ n.createElement("div", { "aria-hidden": o, "aria-busy": i }, /* @__PURE__ */ n.createElement(x.GridList, { className: u, ...e }, o ? /* @__PURE__ */ n.createElement(Ue, null) : c));
805
- }, rt = (a) => null, qe = () => rt, ot = (a) => null, He = () => ot, lt = (a) => null, Ke = () => lt, ct = (a) => null, Ge = () => ct, ut = (a) => null, je = () => ut, We = "flow--list--footer", Je = {
806
- footer: We
807
- }, Ye = (a) => {
808
- const t = v(g), e = m(), s = e.batches, i = e.loader.useIsInitiallyLoading(), o = e.useIsEmpty(), l = s.getTotalItemsCount(), c = s.getVisibleItemsCount();
816
+ return l ? /* @__PURE__ */ r.createElement(Ne, null) : /* @__PURE__ */ r.createElement("div", { "aria-hidden": o, "aria-busy": a }, /* @__PURE__ */ r.createElement(B.GridList, { className: c, ...e }, o ? /* @__PURE__ */ r.createElement(Me, null) : u));
817
+ }, nt = (i) => null, Ue = () => nt, ot = (i) => null, $e = () => ot, lt = (i) => null, Oe = () => lt, ct = (i) => null, qe = () => ct, ut = (i) => null, He = () => ut, Ke = "flow--list--footer", Ge = {
818
+ footer: Ke
819
+ }, je = (i) => {
820
+ const t = v(g), e = m(), s = e.batches, a = e.loader.useIsInitiallyLoading(), o = e.useIsEmpty(), l = s.getTotalItemsCount(), u = s.getVisibleItemsCount();
809
821
  if (o)
810
822
  return null;
811
- const u = i ? /* @__PURE__ */ n.createElement(Gt, { width: "200px" }) : t.format("list.paginationInfo", {
812
- visibleItemsCount: c,
823
+ const c = a ? /* @__PURE__ */ r.createElement(Gt, { width: "200px" }) : t.format("list.paginationInfo", {
824
+ visibleItemsCount: u,
813
825
  totalItemsCount: l
814
826
  });
815
- return /* @__PURE__ */ n.createElement(f, { ...a }, u);
816
- }, Qe = (a) => {
817
- const t = v(g), e = m(), s = e.loader.useIsLoading(), i = e.loader.useIsInitiallyLoading();
818
- return !e.batches.hasNextBatch() && !s ? null : /* @__PURE__ */ n.createElement(
827
+ return /* @__PURE__ */ r.createElement(f, { ...i }, c);
828
+ }, We = (i) => {
829
+ const t = v(g), e = m(), s = e.loader.useIsLoading(), a = e.loader.useIsInitiallyLoading();
830
+ return !e.batches.hasNextBatch() && !s ? null : /* @__PURE__ */ r.createElement(
819
831
  p,
820
832
  {
821
- isPending: s && !i,
822
- isDisabled: i,
823
- ...a,
833
+ isPending: s && !a,
834
+ isDisabled: a,
835
+ ...i,
824
836
  onPress: () => e.batches.nextBatch(),
825
837
  variant: "plain",
826
838
  size: "s"
827
839
  },
828
840
  t.format("list.showMore")
829
841
  );
830
- }, Xe = () => /* @__PURE__ */ n.createElement("div", { className: Je.footer }, /* @__PURE__ */ n.createElement(Ye, null), /* @__PURE__ */ n.createElement(Qe, null));
831
- function dt(a) {
842
+ }, _e = () => /* @__PURE__ */ r.createElement("div", { className: Ge.footer }, /* @__PURE__ */ r.createElement(je, null), /* @__PURE__ */ r.createElement(We, null));
843
+ function ht(i) {
832
844
  return null;
833
845
  }
834
- const Ze = () => dt, _e = It("List", (a) => {
835
- var N, V, R, M, z;
836
- const { children: t, batchSize: e, onChange: s, ...i } = a, o = (N = S(
846
+ const Je = () => ht, Ye = It("List", (i) => {
847
+ var D, N, R, M, z;
848
+ const { children: t, batchSize: e, onChange: s, ...a } = i, o = (D = S(
837
849
  t,
838
- rt
839
- )) == null ? void 0 : N.props, l = (V = S(
850
+ nt
851
+ )) == null ? void 0 : D.props, l = (N = S(
840
852
  t,
841
853
  Ht
842
- )) == null ? void 0 : V.props, c = (R = S(t, ut)) == null ? void 0 : R.props, u = {
854
+ )) == null ? void 0 : N.props, u = (R = S(t, ut)) == null ? void 0 : R.props, c = {
843
855
  source: o ? {
844
856
  ...o,
845
857
  asyncLoader: o.children
846
858
  } : l ? {
847
859
  ...l,
848
860
  asyncResourceFactory: l.children
849
- } : c ? {
850
- staticData: c.data
861
+ } : u ? {
862
+ staticData: u.data
851
863
  } : void 0
852
- }, d = (M = S(t, dt)) == null ? void 0 : M.props, b = (z = S(t, ct)) == null ? void 0 : z.props, ht = ke.useNew({
864
+ }, h = (M = S(t, ht)) == null ? void 0 : M.props, b = (z = S(t, ct)) == null ? void 0 : z.props, dt = ke.useNew({
853
865
  onChange: s,
854
- loader: u,
855
- filters: K(t, ot).map(
866
+ loader: c,
867
+ filters: G(t, ot).map(
856
868
  (y) => ({
857
869
  ...y.props,
858
870
  renderItem: y.props.children
859
871
  })
860
872
  ),
861
- search: d ? {
862
- render: d.children,
863
- textFieldProps: d
873
+ search: h ? {
874
+ render: h.children,
875
+ textFieldProps: h
864
876
  } : void 0,
865
- sorting: K(t, lt).map((y) => y.props),
877
+ sorting: G(t, lt).map((y) => y.props),
866
878
  itemView: b ? {
867
879
  ...b,
868
880
  renderFn: b.children
@@ -870,43 +882,43 @@ const Ze = () => dt, _e = It("List", (a) => {
870
882
  batchesController: {
871
883
  batchSize: e
872
884
  },
873
- hasAction: !!a.onAction
885
+ hasAction: !!i.onAction
874
886
  });
875
- return /* @__PURE__ */ n.createElement(
876
- it.Provider,
887
+ return /* @__PURE__ */ r.createElement(
888
+ at.Provider,
877
889
  {
878
890
  value: {
879
- list: ht
891
+ list: dt
880
892
  }
881
893
  },
882
- /* @__PURE__ */ n.createElement(se, null),
883
- /* @__PURE__ */ n.createElement("div", { className: be.list }, /* @__PURE__ */ n.createElement(pe, null), /* @__PURE__ */ n.createElement(Oe, { ...i }), /* @__PURE__ */ n.createElement(Xe, null))
894
+ /* @__PURE__ */ r.createElement(se, null),
895
+ /* @__PURE__ */ r.createElement("div", { className: be.list }, /* @__PURE__ */ r.createElement(pe, null), /* @__PURE__ */ r.createElement(ze, { ...a }), /* @__PURE__ */ r.createElement(_e, null))
884
896
  );
885
- }), ts = () => _e, $s = () => ({
886
- List: ts(),
887
- Filter: He(),
888
- Search: Ze(),
889
- Sorting: Ke(),
890
- Item: Ge(),
897
+ }), Qe = () => Ye, Ms = () => ({
898
+ List: Qe(),
899
+ Filter: $e(),
900
+ Search: Je(),
901
+ Sorting: Oe(),
902
+ Item: qe(),
891
903
  ItemView: st,
892
- StaticData: je(),
893
- LoaderAsync: qe(),
904
+ StaticData: He(),
905
+ LoaderAsync: Ue(),
894
906
  LoaderAsyncResource: Kt()
895
907
  });
896
908
  export {
897
- _e as List,
909
+ Ye as List,
898
910
  ot as ListFilter,
899
911
  ct as ListItem,
900
912
  st as ListItemView,
901
- rt as ListLoaderAsync,
913
+ nt as ListLoaderAsync,
902
914
  lt as ListSorting,
903
915
  ut as ListStaticData,
904
- ts as TypedList,
905
- He as TypedListFilter,
906
- Ge as TypedListItem,
907
- qe as TypedListLoaderAsync,
908
- Ke as TypedListSorting,
909
- je as TypedListStaticData,
910
- $s as typedList,
916
+ Qe as TypedList,
917
+ $e as TypedListFilter,
918
+ qe as TypedListItem,
919
+ Ue as TypedListLoaderAsync,
920
+ Oe as TypedListSorting,
921
+ He as TypedListStaticData,
922
+ Ms as typedList,
911
923
  m as useList
912
924
  };