@mittwald/flow-react-components 0.1.0-alpha.53 → 0.1.0-alpha.55

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.
@@ -0,0 +1,97 @@
1
+ "use client"
2
+ /* */
3
+ import n from "react";
4
+ import * as E from "react-aria-components";
5
+ import v from "clsx";
6
+ import { C as x } from "./ClearPropsContext-CD1-9TZA.js";
7
+ import { P as C } from "./PropsContextProvider-B6QiUIPM.js";
8
+ import "@react-aria/utils";
9
+ import "./propsContext-Dx7WKmmM.js";
10
+ import "remeda";
11
+ import "@tabler/icons-react";
12
+ import "html-react-parser";
13
+ import { f as I } from "./flowComponent-92d7kP4i.js";
14
+ import { b as h, I as N, a as z } from "./IconSucceeded-C_S9H4Jp.js";
15
+ import { T as B } from "./Text-Dts2bzGQ.js";
16
+ import { useLocalizedStringFormatter as D } from "react-aria";
17
+ const L = "flow--button", T = "flow--button--icon", A = "flow--button--text", K = "flow--button--content", U = "flow--button--state-icon", $ = "flow--button--is-succeeded", R = "flow--button--is-failed", W = "flow--button--is-pending", _ = "flow--button--plain", j = "flow--button--primary", k = "flow--button--solid", q = "flow--button--accent", G = "flow--button--danger", H = "flow--button--secondary", J = "flow--button--soft", e = {
18
+ button: L,
19
+ icon: T,
20
+ text: A,
21
+ content: K,
22
+ stateIcon: U,
23
+ "size-s": "flow--button--size-s",
24
+ isSucceeded: $,
25
+ isFailed: R,
26
+ isPending: W,
27
+ plain: _,
28
+ primary: j,
29
+ solid: k,
30
+ accent: q,
31
+ danger: G,
32
+ secondary: H,
33
+ soft: J
34
+ }, m = (t) => {
35
+ const { if: c, children: o } = t;
36
+ return c ? o : o.props.children;
37
+ }, M = {
38
+ "de-DE": {
39
+ "button.isFailed": "Fehlgeschlagen",
40
+ "button.isPending": "Ausstehend",
41
+ "button.isSucceeded": "Erfolgreich"
42
+ },
43
+ "en-EN": {
44
+ "button.isFailed": "Failed",
45
+ "button.isPending": "Pending",
46
+ "button.isSucceeded": "Succeeded"
47
+ }
48
+ }, O = (t) => ((t.isPending || t.isSucceeded || t.isFailed) && (t = { ...t }, t.onPress = void 0, t.onPressStart = void 0, t.onPressEnd = void 0, t.onPressChange = void 0, t.onPressUp = void 0, t.onKeyDown = void 0, t.onKeyUp = void 0), t), rt = I("Button", (t) => {
49
+ t = O(t);
50
+ const {
51
+ variant: c = "primary",
52
+ style: o = "solid",
53
+ children: d,
54
+ className: f,
55
+ size: a = "m",
56
+ isPending: r,
57
+ isDisabled: b,
58
+ isSucceeded: s,
59
+ isFailed: i,
60
+ "aria-label": g,
61
+ ...P
62
+ } = t, w = v(
63
+ e.button,
64
+ r && e.isPending,
65
+ s && e.isSucceeded,
66
+ i && e.isFailed,
67
+ e[`size-${a}`],
68
+ e[c],
69
+ e[o],
70
+ f
71
+ ), S = {
72
+ Icon: {
73
+ className: e.icon,
74
+ "aria-hidden": !0,
75
+ size: a
76
+ },
77
+ Text: {
78
+ className: e.text
79
+ }
80
+ }, F = D(M), p = s || i || r ? F.format(
81
+ `button.${s ? "isSucceeded" : i ? "isFailed" : "isPending"}`
82
+ ) : void 0, l = s ? h : i ? N : r ? z : void 0, u = l && /* @__PURE__ */ n.createElement(l, { size: a, className: e.stateIcon }), y = typeof d == "string";
83
+ return /* @__PURE__ */ n.createElement(x, null, /* @__PURE__ */ n.createElement(
84
+ E.Button,
85
+ {
86
+ className: w,
87
+ isDisabled: b,
88
+ "aria-label": p ?? g,
89
+ ...P
90
+ },
91
+ /* @__PURE__ */ n.createElement(m, { if: u }, /* @__PURE__ */ n.createElement("span", { className: e.content }, /* @__PURE__ */ n.createElement(m, { if: y }, /* @__PURE__ */ n.createElement(B, null, /* @__PURE__ */ n.createElement(C, { props: S }, d))))),
92
+ u
93
+ ));
94
+ });
95
+ export {
96
+ rt as B
97
+ };
package/dist/Button.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use client"
2
2
  /* */
3
- import { B as o } from "./Button-BnXrfuF-.js";
3
+ import { B as o } from "./Button-O2JAPot2.js";
4
4
  export {
5
5
  o as Button,
6
6
  o as default
@@ -0,0 +1,27 @@
1
+ "use client"
2
+ /* */
3
+ import c from "react";
4
+ import * as s from "react-aria-components";
5
+ import { MenuTrigger as C } from "react-aria-components";
6
+ import u from "clsx";
7
+ const x = "flow--context-menu", l = "flow--context-menu--menu-list", m = {
8
+ contextMenu: x,
9
+ "popover-slide": "flow--context-menu--popover-slide",
10
+ menuList: l
11
+ }, d = (e) => {
12
+ const { children: t, onAction: n, ...o } = e;
13
+ return /* @__PURE__ */ c.createElement(s.Popover, { className: m.contextMenu, ...o }, /* @__PURE__ */ c.createElement(s.Menu, { className: m.menuList, onAction: n }, t));
14
+ }, i = "flow--context-menu--context-menu-item", a = "flow--context-menu--context-menu-item--icon", M = "flow--context-menu--context-menu-item--text", f = {
15
+ contextMenuItem: i,
16
+ icon: a,
17
+ text: M
18
+ }, I = (e) => {
19
+ const { children: t, className: n, ...o } = e, r = u(f.contextMenuItem, n);
20
+ return /* @__PURE__ */ c.createElement(s.MenuItem, { ...o, className: r }, t);
21
+ };
22
+ export {
23
+ d as ContextMenu,
24
+ I as ContextMenuItem,
25
+ C as ContextMenuTrigger,
26
+ d as default
27
+ };
@@ -2,7 +2,7 @@
2
2
  /* */
3
3
  import o from "react";
4
4
  import n from "copy-to-clipboard";
5
- import { B as a } from "./Button-BnXrfuF-.js";
5
+ import { B as a } from "./Button-O2JAPot2.js";
6
6
  import "@tabler/icons-react";
7
7
  import "clsx";
8
8
  import "html-react-parser";
package/dist/List.js CHANGED
@@ -1,36 +1,36 @@
1
1
  "use client"
2
2
  /* */
3
- var V = Object.defineProperty;
4
- var B = (i, t, e) => t in i ? V(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e;
5
- var n = (i, t, e) => (B(i, typeof t != "symbol" ? t + "" : t, e), e);
6
- import r, { createContext as U, useContext as $, Suspense as D, createElement as x, useMemo as O, useEffect as I, isValidElement as H } from "react";
7
- import { useMessageFormatter as j, useLocalizedStringFormatter as q } from "react-aria";
8
- import { T as J } from "./Text-Dts2bzGQ.js";
9
- import { B as b } from "./Button-BnXrfuF-.js";
3
+ var B = Object.defineProperty;
4
+ var U = (i, t, e) => t in i ? B(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e;
5
+ var n = (i, t, e) => (U(i, typeof t != "symbol" ? t + "" : t, e), e);
6
+ import r, { createContext as $, useContext as O, Suspense as R, createElement as x, useMemo as H, useEffect as f, isValidElement as j } from "react";
7
+ import { useMessageFormatter as q, useLocalizedStringFormatter as J } from "react-aria";
8
+ import { T as K } from "./Text-Dts2bzGQ.js";
9
+ import { B as y } from "./Button-O2JAPot2.js";
10
10
  import "@tabler/icons-react";
11
- import R from "clsx";
11
+ import M from "clsx";
12
12
  import "html-react-parser";
13
13
  import "./propsContext-Dx7WKmmM.js";
14
14
  import "@react-aria/utils";
15
- import { times as K } from "remeda";
15
+ import { times as G } from "remeda";
16
16
  import "@mittwald/react-tunnel";
17
- import { a as G, I as Q } from "./IconChevronUp-CT0CRmbO.js";
18
- import { L as W } from "./Label-BtthqZPA.js";
19
- import { getProperty as X } from "dot-prop";
20
- import { useSignal as f } from "@preact/signals-react";
21
- import { useReactTable as Y, getCoreRowModel as Z, getSortedRowModel as _, getFilteredRowModel as tt, getPaginationRowModel as et, getFacetedUniqueValues as at } from "@tanstack/react-table";
22
- import { useSignals as S } from "@preact/signals-react/runtime";
23
- import it from "invariant";
17
+ import { a as Q, I as W } from "./IconChevronUp-CT0CRmbO.js";
18
+ import { L as X } from "./Label-BtthqZPA.js";
19
+ import { getProperty as Y } from "dot-prop";
20
+ import { useSignal as S } from "@preact/signals-react";
21
+ import { useReactTable as Z, getCoreRowModel as _, getSortedRowModel as tt, getFilteredRowModel as et, getPaginationRowModel as at, getFacetedUniqueValues as it } from "@tanstack/react-table";
22
+ import { useSignals as b } from "@preact/signals-react/runtime";
23
+ import st from "invariant";
24
24
  import { getAsyncResource as T } from "@mittwald/react-use-promise";
25
- import { deepFind as st, deepForEach as nt } from "react-children-utilities";
25
+ import { deepFind as nt, deepForEach as ot } from "react-children-utilities";
26
26
  import { I as rt } from "./InlineCode-DZzyKdCm.js";
27
- import { ListLoaderAsyncResource as ot } from "./List/ListLoaderAsyncResource.js";
28
- const M = U({}), g = () => $(M).list, lt = (i) => /* @__PURE__ */ r.createElement(r.Fragment, null, i.children()), ct = (i) => {
27
+ import { ListLoaderAsyncResource as lt } from "./List/ListLoaderAsyncResource.js";
28
+ const A = $({}), g = () => O(A).list, ct = (i) => /* @__PURE__ */ r.createElement(r.Fragment, null, i.children()), ut = (i) => {
29
29
  const { pageIndex: t } = i;
30
30
  return g().loader.useSuspenseHook(t), null;
31
- }, ut = () => g().loader.getLoaderInvocationHooks().map((t, e) => /* @__PURE__ */ r.createElement(D, { key: e, fallback: /* @__PURE__ */ r.createElement(ct, { pageIndex: e }) }, /* @__PURE__ */ r.createElement(lt, null, () => {
31
+ }, gt = () => g().loader.getLoaderInvocationHooks().map((t, e) => /* @__PURE__ */ r.createElement(R, { key: e, fallback: /* @__PURE__ */ r.createElement(ut, { pageIndex: e }) }, /* @__PURE__ */ r.createElement(ct, null, () => {
32
32
  t();
33
- }))), A = {
33
+ }))), N = {
34
34
  "de-DE": {
35
35
  paginationInfo: "{visibleItemsCount} von insgesamt {totalItemsCount} angezeigt",
36
36
  paginationInfoFiltered: "{visibleItemsCount} von insgesamt {filteredItemsCount} (gefiltert aus {totalItemsCount}) angezeigt",
@@ -41,23 +41,23 @@ const M = U({}), g = () => $(M).list, lt = (i) => /* @__PURE__ */ r.createElemen
41
41
  paginationInfoFiltered: "Showing {visibleItemsCount} of {filteredItemsCount} (unfiltered total count {totalItemsCount})",
42
42
  showMore: "Show more"
43
43
  }
44
- }, gt = (i) => {
45
- const t = j(A), e = g(), a = e.pagination, s = e.isFiltered() && !e.loader.manualFiltering, o = a.getTotalItemsCount(), c = a.getFilteredItemsCount(), l = a.getVisibleItemsCount();
44
+ }, mt = (i) => {
45
+ const t = q(N), e = g(), a = e.pagination, s = e.isFiltered() && !e.loader.manualFiltering, o = a.getTotalItemsCount(), l = a.getFilteredItemsCount(), c = a.getVisibleItemsCount();
46
46
  if (o === 0)
47
47
  return null;
48
48
  const h = s ? t("paginationInfoFiltered", {
49
- visibleItemsCount: l,
50
- filteredItemsCount: c,
49
+ visibleItemsCount: c,
50
+ filteredItemsCount: l,
51
51
  totalItemsCount: o
52
52
  }) : t("paginationInfo", {
53
- visibleItemsCount: l,
53
+ visibleItemsCount: c,
54
54
  totalItemsCount: o
55
55
  });
56
- return /* @__PURE__ */ r.createElement(J, { ...i }, h);
57
- }, mt = () => null, dt = (i) => {
58
- const { sorting: t } = i, e = t.direction, a = e === "asc" ? G : e === "desc" ? Q : mt, s = e !== !1;
56
+ return /* @__PURE__ */ r.createElement(K, { ...i }, h);
57
+ }, dt = () => null, pt = (i) => {
58
+ const { sorting: t } = i, e = t.direction, a = e === "asc" ? Q : e === "desc" ? W : dt, s = e !== !1;
59
59
  return /* @__PURE__ */ r.createElement(
60
- b,
60
+ y,
61
61
  {
62
62
  variant: s ? "primary" : "secondary",
63
63
  onPress: t.getTableColumn().getToggleSortingHandler()
@@ -65,18 +65,18 @@ const M = U({}), g = () => $(M).list, lt = (i) => /* @__PURE__ */ r.createElemen
65
65
  t.getTableColumn().id,
66
66
  /* @__PURE__ */ r.createElement(a, { size: "s" })
67
67
  );
68
- }, pt = "flow--list--filter-bar--sorting-picker", ht = "flow--list--filter-bar--sorting-picker--items", E = {
69
- sortingPicker: pt,
70
- items: ht
71
- }, ft = () => {
72
- const { sorting: i } = g(), t = i.map((e) => /* @__PURE__ */ r.createElement(dt, { sorting: e, key: e.getTableColumn().id }));
73
- return /* @__PURE__ */ r.createElement("div", { className: E.sortingPicker }, /* @__PURE__ */ r.createElement("div", { className: E.items }, t));
74
- }, St = "flow--list--filter-bar--filter-picker-item", bt = "flow--list--filter-bar--filter-picker-item--items", L = {
75
- filterPickerItem: St,
76
- items: bt
77
- }, yt = (i) => {
68
+ }, ht = "flow--list--filter-bar--sorting-picker", ft = "flow--list--filter-bar--sorting-picker--items", L = {
69
+ sortingPicker: ht,
70
+ items: ft
71
+ }, St = () => {
72
+ const { sorting: i } = g(), t = i.map((e) => /* @__PURE__ */ r.createElement(pt, { sorting: e, key: e.getTableColumn().id }));
73
+ return /* @__PURE__ */ r.createElement("div", { className: L.sortingPicker }, /* @__PURE__ */ r.createElement("div", { className: L.items }, t));
74
+ }, bt = "flow--list--filter-bar--filter-picker-item", yt = "flow--list--filter-bar--filter-picker-item--items", E = {
75
+ filterPickerItem: bt,
76
+ items: yt
77
+ }, wt = (i) => {
78
78
  const { filter: t } = i, a = t.values.map((s) => /* @__PURE__ */ r.createElement(
79
- b,
79
+ y,
80
80
  {
81
81
  variant: t.isValueActive(s) ? "primary" : "secondary",
82
82
  key: t.getValueId(s),
@@ -84,21 +84,21 @@ const M = U({}), g = () => $(M).list, lt = (i) => /* @__PURE__ */ r.createElemen
84
84
  },
85
85
  String(s)
86
86
  ));
87
- return /* @__PURE__ */ r.createElement("div", { className: L.filterPickerItem }, /* @__PURE__ */ r.createElement(W, null, t.property), /* @__PURE__ */ r.createElement("div", { className: L.items }, a));
88
- }, vt = () => g().filters.map((t) => /* @__PURE__ */ r.createElement(yt, { key: t.property, filter: t })), wt = "flow--list--filter-bar", Pt = {
89
- filterBar: wt
90
- }, Ft = (i) => {
87
+ return /* @__PURE__ */ r.createElement("div", { className: E.filterPickerItem }, /* @__PURE__ */ r.createElement(X, null, t.property), /* @__PURE__ */ r.createElement("div", { className: E.items }, a));
88
+ }, Pt = () => g().filters.map((t) => /* @__PURE__ */ r.createElement(wt, { key: t.property, filter: t })), vt = "flow--list--filter-bar", Ft = {
89
+ filterBar: vt
90
+ }, Ct = (i) => {
91
91
  const { className: t } = i;
92
- return /* @__PURE__ */ r.createElement("div", { className: R(t, Pt.filterBar) }, /* @__PURE__ */ r.createElement(ft, null), /* @__PURE__ */ r.createElement(vt, null));
93
- }, Ct = "flow--list", It = "flow--list--filter-bar", Tt = "flow--list--items", Et = "flow--list--pagination-infos", Lt = "flow--list--show-more-button", d = {
94
- list: Ct,
95
- filterBar: It,
96
- items: Tt,
92
+ return /* @__PURE__ */ r.createElement("div", { className: M(t, Ft.filterBar) }, /* @__PURE__ */ r.createElement(St, null), /* @__PURE__ */ r.createElement(Pt, null));
93
+ }, It = "flow--list", Tt = "flow--list--filter-bar", Lt = "flow--list--items", Et = "flow--list--pagination-infos", kt = "flow--list--show-more-button", d = {
94
+ list: It,
95
+ filterBar: Tt,
96
+ items: Lt,
97
97
  paginationInfos: Et,
98
- showMoreButton: Lt
98
+ showMoreButton: kt
99
99
  };
100
100
  var u;
101
- let kt = (u = class {
101
+ let Dt = (u = class {
102
102
  constructor(t, e, a) {
103
103
  n(this, "id");
104
104
  n(this, "data");
@@ -112,19 +112,19 @@ let kt = (u = class {
112
112
  return new u(t, e.id, e.original);
113
113
  }
114
114
  }, n(u, "fallbackRenderItemFn", (t) => x("pre", void 0, JSON.stringify(t))), u);
115
- class y {
115
+ class w {
116
116
  constructor(t) {
117
117
  n(this, "list");
118
118
  this.list = t;
119
119
  }
120
120
  static useNew(t) {
121
- return new y(t);
121
+ return new w(t);
122
122
  }
123
123
  get entries() {
124
- return this.list.reactTable.table.getRowModel().rows.map((t) => kt.fromRow(this, t));
124
+ return this.list.reactTable.table.getRowModel().rows.map((t) => Dt.fromRow(this, t));
125
125
  }
126
126
  }
127
- class Dt {
127
+ class Rt {
128
128
  constructor(t, e = {}) {
129
129
  n(this, "list");
130
130
  n(this, "initialPageSize");
@@ -165,8 +165,8 @@ class Dt {
165
165
  }));
166
166
  }
167
167
  }
168
- const Rt = (i, t) => i === t;
169
- class Mt {
168
+ const Mt = (i, t) => i === t;
169
+ class At {
170
170
  constructor(t, e) {
171
171
  n(this, "_values");
172
172
  n(this, "list");
@@ -174,14 +174,14 @@ class Mt {
174
174
  n(this, "mode");
175
175
  n(this, "matcher");
176
176
  n(this, "onFilterUpdateCallbacks", /* @__PURE__ */ new Set());
177
- this.list = t, this.property = e.property, this.mode = e.mode ?? "one", this._values = e.values, this.matcher = e.matcher ?? Rt;
177
+ this.list = t, this.property = e.property, this.mode = e.mode ?? "one", this._values = e.values, this.matcher = e.matcher ?? Mt;
178
178
  }
179
179
  updateTableColumnDef(t) {
180
180
  t.enableColumnFilter = !0, t.filterFn = this.getReactTableFilterFn();
181
181
  }
182
182
  getReactTableFilterFn() {
183
183
  return (t, e, a) => this.checkFilterMatches(
184
- X(t.original, this.property),
184
+ Y(t.original, this.property),
185
185
  a
186
186
  );
187
187
  }
@@ -233,7 +233,7 @@ class Mt {
233
233
  this.onFilterUpdateCallbacks.add(t);
234
234
  }
235
235
  }
236
- class At {
236
+ class Nt {
237
237
  constructor(t, e) {
238
238
  n(this, "list");
239
239
  n(this, "property");
@@ -249,7 +249,7 @@ class At {
249
249
  return this.list.reactTable.getTableColumn(this.property);
250
250
  }
251
251
  }
252
- class v {
252
+ class P {
253
253
  constructor(t, e = {}) {
254
254
  n(this, "list");
255
255
  n(this, "table");
@@ -261,13 +261,13 @@ class v {
261
261
  const a = typeof t == "function" ? t(e) : t;
262
262
  this.tableState.value = this.getUpdatedTableState(e, a);
263
263
  });
264
- this.list = t, this.tableState = f(void 0), this.table = this.useReactTable(e);
264
+ this.list = t, this.tableState = S(void 0), this.table = this.useReactTable(e);
265
265
  }
266
266
  static useNew(t, e = {}) {
267
- return new v(t, e);
267
+ return new P(t, e);
268
268
  }
269
269
  useReactTable(t = {}) {
270
- const e = this.list.loader.useData(), a = Y({
270
+ const e = this.list.loader.useData(), a = Z({
271
271
  data: e,
272
272
  initialState: {
273
273
  pagination: {
@@ -275,18 +275,18 @@ class v {
275
275
  }
276
276
  },
277
277
  columns: this.getTableColumnDefs(),
278
- getCoreRowModel: Z(),
279
- getSortedRowModel: _(),
280
- getFilteredRowModel: tt(),
281
- getPaginationRowModel: et(),
282
- getFacetedUniqueValues: at(),
278
+ getCoreRowModel: _(),
279
+ getSortedRowModel: tt(),
280
+ getFilteredRowModel: et(),
281
+ getPaginationRowModel: at(),
282
+ getFacetedUniqueValues: it(),
283
283
  onStateChange: this.onTableStateChange,
284
284
  ...t
285
285
  });
286
286
  return this.useUpdateTableState(a), a;
287
287
  }
288
288
  useUpdateTableState(t) {
289
- S();
289
+ b();
290
290
  const e = this.tableState.value;
291
291
  e ? t.setOptions((a) => ({
292
292
  ...a,
@@ -298,7 +298,7 @@ class v {
298
298
  }
299
299
  getTableColumn(t) {
300
300
  const e = this.table.getColumn(t);
301
- return it(!!e, `Column #${t} is not defined`), e;
301
+ return st(!!e, `Column #${t} is not defined`), e;
302
302
  }
303
303
  getTableColumnDefs() {
304
304
  const t = /* @__PURE__ */ new Map(), e = (a) => {
@@ -320,8 +320,8 @@ class v {
320
320
  ), Array.from(t.values());
321
321
  }
322
322
  }
323
- const Nt = [];
324
- class zt {
323
+ const zt = [];
324
+ class Vt {
325
325
  constructor(t, e = {}) {
326
326
  n(this, "list");
327
327
  n(this, "dataSource");
@@ -331,9 +331,9 @@ class zt {
331
331
  n(this, "manualFiltering");
332
332
  n(this, "manualPagination");
333
333
  const { source: a } = e;
334
- this.dataSource = a ?? { staticData: Nt };
335
- const s = "manualPagination" in this.dataSource ? this.dataSource.manualPagination : void 0, o = "manualFiltering" in this.dataSource ? this.dataSource.manualFiltering : void 0, c = "manualSorting" in this.dataSource ? this.dataSource.manualSorting : void 0;
336
- this.list = t, this.pagesDataSignal = f({}), this.pagesLoadingStateSignal = f({}), this.manualPagination = s ?? !1, this.manualFiltering = o ?? this.manualPagination, this.manualSorting = c ?? this.manualPagination, this.list.filters.forEach((l) => l.onFilterUpdated(() => this.reset()));
334
+ this.dataSource = a ?? { staticData: zt };
335
+ const s = "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;
336
+ this.list = t, this.pagesDataSignal = S({}), this.pagesLoadingStateSignal = S({}), this.manualPagination = s ?? !1, this.manualFiltering = o ?? this.manualPagination, this.manualSorting = l ?? this.manualPagination, this.list.filters.forEach((c) => c.onFilterUpdated(() => this.reset()));
337
337
  }
338
338
  reset() {
339
339
  this.pagesLoadingStateSignal.value = {}, this.pagesDataSignal.value = {}, this.list.reactTable.table.setPagination(() => ({
@@ -342,33 +342,35 @@ class zt {
342
342
  }));
343
343
  }
344
344
  useIsLoading() {
345
- return S(), Object.values(this.pagesLoadingStateSignal.value).some(
345
+ return b(), Object.values(this.pagesLoadingStateSignal.value).some(
346
346
  (t) => t === "loading"
347
347
  );
348
348
  }
349
349
  useData() {
350
- S();
350
+ b();
351
351
  const t = Object.values(this.pagesDataSignal.value);
352
- return O(
352
+ return H(
353
353
  () => t.flatMap((e) => e),
354
354
  [this.pagesDataSignal.value]
355
355
  );
356
356
  }
357
357
  useSuspenseHook(t) {
358
- I(() => (this.updatePageLoadingState(t, "loading"), () => {
358
+ f(() => (this.updatePageLoadingState(t, "loading"), () => {
359
359
  this.updatePageLoadingState(t, "loaded");
360
360
  }), [t]);
361
361
  }
362
362
  getLoaderInvocationHooks() {
363
- return K(this.list.pagination.getPageIndex() + 1, (e) => e).map((e) => () => {
363
+ return G(this.list.pagination.getPageIndex() + 1, (e) => e).map((e) => () => {
364
364
  this.useLoadPage(e);
365
365
  });
366
366
  }
367
367
  useLoadPage(t) {
368
- const e = this.getPageDataAsyncResource(t), { data: a, itemTotalCount: s } = e.use();
369
- I(() => {
368
+ const e = this.getPageDataAsyncResource(t), { data: a, itemTotalCount: s } = e.use(), o = e.watchState();
369
+ f(() => {
370
370
  this.updatePageData(t, a), s !== void 0 && this.list.pagination.updateItemTotalCount(s);
371
- }, [t, a, s, e]);
371
+ }, [t, a, s, e]), f(() => {
372
+ this.updatePageLoadingState(t, o);
373
+ }, [t, o]);
372
374
  }
373
375
  getDataLoaderOptions(t) {
374
376
  return {
@@ -427,7 +429,7 @@ class zt {
427
429
  );
428
430
  }
429
431
  }
430
- let Vt = class N {
432
+ let Bt = class z {
431
433
  constructor(t) {
432
434
  n(this, "filters");
433
435
  n(this, "sorting");
@@ -441,26 +443,26 @@ let Vt = class N {
441
443
  filters: a = [],
442
444
  sorting: s = [],
443
445
  pagination: o,
444
- enableMultiSort: c = !1
446
+ enableMultiSort: l = !1
445
447
  } = t;
446
- this.render = e, this.items = y.useNew(this), this.filters = a.map((l) => new Mt(this, l)), this.sorting = s.map((l) => new At(this, l)), this.pagination = new Dt(this, o), this.loader = new zt(this, t.loader), this.reactTable = v.useNew(this, {
447
- enableMultiSort: c,
448
+ this.render = e, this.items = w.useNew(this), this.filters = a.map((c) => new At(this, c)), this.sorting = s.map((c) => new Nt(this, c)), this.pagination = new Rt(this, o), this.loader = new Vt(this, t.loader), this.reactTable = P.useNew(this, {
449
+ enableMultiSort: l,
448
450
  manualFiltering: this.loader.manualFiltering,
449
451
  manualPagination: this.loader.manualPagination,
450
452
  manualSorting: this.loader.manualSorting
451
453
  });
452
454
  }
453
455
  static useNew(t) {
454
- return new N(t);
456
+ return new z(t);
455
457
  }
456
458
  isFiltered() {
457
459
  return this.filters.some((t) => t.isActive());
458
460
  }
459
461
  };
460
- const Bt = (i) => {
461
- const t = q(A), e = g(), a = e.loader.useIsLoading(), o = e.pagination.hasNextPage();
462
+ const Ut = (i) => {
463
+ const t = J(N), e = g(), a = e.loader.useIsLoading(), o = e.pagination.hasNextPage();
462
464
  return /* @__PURE__ */ r.createElement(
463
- b,
465
+ y,
464
466
  {
465
467
  isPending: a,
466
468
  ...i,
@@ -470,25 +472,27 @@ const Bt = (i) => {
470
472
  },
471
473
  t.format("showMore")
472
474
  );
473
- }, Ut = "flow--list--items", $t = {
474
- items: Ut
475
- }, xt = "flow--list--item--list-item", Ot = {
475
+ }, $t = "flow--list--items", Ot = "flow--list--items--is-loading", k = {
476
+ items: $t,
477
+ isLoading: Ot
478
+ }, xt = "flow--list--item--list-item", Ht = {
476
479
  listItem: xt
477
- }, Ht = (i) => {
478
- const { children: t } = i;
479
- return /* @__PURE__ */ r.createElement("div", { className: Ot.listItem }, t);
480
480
  }, jt = (i) => {
481
- const { className: t } = i, a = g().items.entries.map((s) => /* @__PURE__ */ r.createElement(Ht, { key: s.id }, /* @__PURE__ */ r.createElement(D, null, s.render())));
482
- return /* @__PURE__ */ r.createElement("div", { className: R($t.items, t) }, a);
483
- }, z = (i, t) => H(i) ? typeof t == "string" ? typeof i.type == "string" ? i.type === t : !1 : i.type === t : !1, p = (i, t) => st(i, (e) => z(e, t)), k = (i, t) => {
481
+ const { children: t } = i;
482
+ return /* @__PURE__ */ r.createElement("div", { className: Ht.listItem }, t);
483
+ }, qt = (i) => {
484
+ const { className: t } = i, e = g(), a = e.loader.useIsLoading(), s = e.items.entries.map((l) => /* @__PURE__ */ r.createElement(jt, { key: l.id }, /* @__PURE__ */ r.createElement(R, null, l.render()))), o = M(
485
+ k.items,
486
+ t,
487
+ a && k.isLoading
488
+ );
489
+ return /* @__PURE__ */ r.createElement("div", { className: o }, s);
490
+ }, V = (i, t) => j(i) ? typeof t == "string" ? typeof i.type == "string" ? i.type === t : !1 : i.type === t : !1, p = (i, t) => nt(i, (e) => V(e, t)), D = (i, t) => {
484
491
  const e = [];
485
- return nt(i, (a) => {
486
- z(a, t) && e.push(a);
492
+ return ot(i, (a) => {
493
+ V(a, t) && e.push(a);
487
494
  }), e;
488
495
  };
489
- function qt(i) {
490
- return null;
491
- }
492
496
  function Jt(i) {
493
497
  return null;
494
498
  }
@@ -501,13 +505,16 @@ function Gt(i) {
501
505
  function Qt(i) {
502
506
  return null;
503
507
  }
504
- const Wt = (i) => /* @__PURE__ */ r.createElement(rt, null, JSON.stringify(i.data));
505
- function ye(i) {
506
- var w, P, F, C;
507
- const { children: t, ...e } = i, a = (w = p(t, qt)) == null ? void 0 : w.props, s = (P = p(
508
+ function Wt(i) {
509
+ return null;
510
+ }
511
+ const Xt = (i) => /* @__PURE__ */ r.createElement(rt, null, JSON.stringify(i.data));
512
+ function we(i) {
513
+ var v, F, C, I;
514
+ const { children: t, ...e } = i, a = (v = p(t, Jt)) == null ? void 0 : v.props, s = (F = p(
508
515
  t,
509
- ot
510
- )) == null ? void 0 : P.props, o = (F = p(t, Qt)) == null ? void 0 : F.props, c = {
516
+ lt
517
+ )) == null ? void 0 : F.props, o = (C = p(t, Wt)) == null ? void 0 : C.props, l = {
511
518
  source: a ? {
512
519
  ...a,
513
520
  asyncLoader: a.children
@@ -517,30 +524,30 @@ function ye(i) {
517
524
  } : o ? {
518
525
  staticData: o.data
519
526
  } : void 0
520
- }, l = (m) => /* @__PURE__ */ r.createElement(Wt, { data: m }), h = Vt.useNew({
521
- loader: c,
522
- filters: k(t, Jt).map((m) => m.props),
523
- sorting: k(t, Kt).map((m) => m.props),
524
- render: ((C = p(t, Gt)) == null ? void 0 : C.props.children) ?? l,
527
+ }, c = (m) => /* @__PURE__ */ r.createElement(Xt, { data: m }), h = Bt.useNew({
528
+ loader: l,
529
+ filters: D(t, Kt).map((m) => m.props),
530
+ sorting: D(t, Gt).map((m) => m.props),
531
+ render: ((I = p(t, Qt)) == null ? void 0 : I.props.children) ?? c,
525
532
  ...e
526
533
  });
527
534
  return /* @__PURE__ */ r.createElement(
528
- M.Provider,
535
+ A.Provider,
529
536
  {
530
537
  value: {
531
538
  list: h
532
539
  }
533
540
  },
534
- /* @__PURE__ */ r.createElement(ut, null),
535
- /* @__PURE__ */ r.createElement("div", { className: d.list }, /* @__PURE__ */ r.createElement(Ft, { className: d.filterBar }), /* @__PURE__ */ r.createElement(jt, { className: d.rows }), /* @__PURE__ */ r.createElement(gt, { className: d.paginationInfos }), /* @__PURE__ */ r.createElement(Bt, { className: d.showMoreButton }))
541
+ /* @__PURE__ */ r.createElement(gt, null),
542
+ /* @__PURE__ */ r.createElement("div", { className: d.list }, /* @__PURE__ */ r.createElement(Ct, { className: d.filterBar }), /* @__PURE__ */ r.createElement(qt, { className: d.rows }), /* @__PURE__ */ r.createElement(mt, { className: d.paginationInfos }), /* @__PURE__ */ r.createElement(Ut, { className: d.showMoreButton }))
536
543
  );
537
544
  }
538
545
  export {
539
- ye as List,
540
- Jt as ListFilter,
541
- Gt as ListItemView,
542
- qt as ListLoaderAsync,
543
- Kt as ListSorting,
544
- Qt as ListStaticData,
545
- ye as default
546
+ we as List,
547
+ Kt as ListFilter,
548
+ Qt as ListItemView,
549
+ Jt as ListLoaderAsync,
550
+ Gt as ListSorting,
551
+ Wt as ListStaticData,
552
+ we as default
546
553
  };
@@ -10,7 +10,7 @@ import "@react-aria/utils";
10
10
  import "./propsContext-Dx7WKmmM.js";
11
11
  import "remeda";
12
12
  import { F as f } from "./FieldError-CQNWNYnn.js";
13
- import { B as s } from "./Button-BnXrfuF-.js";
13
+ import { B as s } from "./Button-O2JAPot2.js";
14
14
  import "@tabler/icons-react";
15
15
  import "html-react-parser";
16
16
  import "@mittwald/react-tunnel";