@mittwald/flow-react-components 0.1.0-alpha.351 → 0.1.0-alpha.352

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