@mittwald/flow-react-components 0.1.0-alpha.162 → 0.1.0-alpha.164

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/List.js CHANGED
@@ -5,10 +5,10 @@ var tt = (s, t, e) => t in s ? _(s, t, { enumerable: !0, configurable: !0, writa
5
5
  var o = (s, t, e) => tt(s, typeof t != "symbol" ? t + "" : t, e);
6
6
  import n, { createContext as et, useContext as at, createElement as st, useEffect as F, useRef as nt, Suspense as it } from "react";
7
7
  import { R as rt } from "./Render-BdlTa7Qb.js";
8
- import { a as w, C as j } from "./ContextMenuTrigger-BQd2xsku.js";
8
+ import { a as T, C as j } from "./ContextMenuTrigger-BQd2xsku.js";
9
9
  import { M as J } from "./MenuItem-u7V4XOL3.js";
10
10
  import "react-aria-components";
11
- import { autorun as ot, runInAction as lt, makeObservable as ct, observable as V, computed as x, action as I } from "mobx";
11
+ import { autorun as ot, runInAction as lt, makeObservable as ct, observable as M, computed as V, action as I } from "mobx";
12
12
  import "./context-BB3_MApL.js";
13
13
  import "./propsContext-DzAKlmhS.js";
14
14
  import "@react-aria/utils";
@@ -20,12 +20,12 @@ import "./Icon-BTTw8v9z.js";
20
20
  import { I as W } from "./IconChevronDown-CPh2XLia.js";
21
21
  import { B as p } from "./Button-Dz22EEEz.js";
22
22
  import { useLocalizedStringFormatter as v } from "react-aria";
23
- import B from "clsx";
23
+ import k from "clsx";
24
24
  import { I as dt } from "./IconClose-D3xiRQc_.js";
25
25
  import { useReactTable as ht, getCoreRowModel as gt, getSortedRowModel as pt, getFilteredRowModel as ft, getPaginationRowModel as bt, getFacetedUniqueValues as St } from "@tanstack/react-table";
26
26
  import Y from "invariant";
27
27
  import { useLocalObservable as yt } from "mobx-react-lite";
28
- import { getAsyncResource as z } from "@mittwald/react-use-promise";
28
+ import { getAsyncResource as x } from "@mittwald/react-use-promise";
29
29
  import { u as $ } from "./useSelector-DpU7_HMO.js";
30
30
  import { I as vt } from "./IllustratedMessage-B3MHD01M.js";
31
31
  import { I as Ct } from "./IconSearch-CzWSJj1g.js";
@@ -33,14 +33,15 @@ import { H as Et } from "./Heading-DccQpM5H.js";
33
33
  import { S as G } from "./Skeleton-CKLaTmDR.js";
34
34
  import { P as It } from "./PropsContextProvider-C6Z4XGp6.js";
35
35
  import { d as Ft } from "./dynamic-ClpUSmEt.js";
36
- import { I as Lt } from "./IconContextMenu-BeUYeVED.js";
37
- import { TunnelProvider as Tt, TunnelExit as O } from "@mittwald/react-tunnel";
38
- import { L as wt } from "./Link-DrSmRSXL.js";
36
+ import { I as wt } from "./IconContextMenu-BeUYeVED.js";
37
+ import { TunnelProvider as Lt, TunnelExit as O } from "@mittwald/react-tunnel";
38
+ import { L as Tt } from "./Link-DrSmRSXL.js";
39
+ import { g as kt } from "./getContainerBreakpointSizeClassName-BrcFDcCY.js";
39
40
  import { d as E, a as U } from "./deepFindOfType-6pG0fH7S.js";
40
41
  import { ListLoaderAsyncResource as Bt } from "./List/ListLoaderAsyncResource.js";
41
42
  import { I as At } from "./InlineCode-BT-PKxVv.js";
42
43
  import "react-children-utilities";
43
- const Q = et({}), g = () => at(Q).list, kt = () => g().loader.getLoaderInvocationHooks().map((t, e) => /* @__PURE__ */ n.createElement(rt, { key: e }, () => {
44
+ const Q = et({}), g = () => at(Q).list, Nt = () => g().loader.getLoaderInvocationHooks().map((t, e) => /* @__PURE__ */ n.createElement(rt, { key: e }, () => {
44
45
  t();
45
46
  })), Dt = (s) => {
46
47
  const { sorting: t } = s;
@@ -65,15 +66,15 @@ const Q = et({}), g = () => at(Q).list, kt = () => g().loader.getLoaderInvocatio
65
66
  "list.setSorting": (s) => `Sorting: ${s.property}`,
66
67
  "list.showMore": "Show more",
67
68
  "list.sorting": "Sorting"
68
- } }, L = (s) => {
69
+ } }, w = (s) => {
69
70
  const { children: t, locales: e, variables: a } = s;
70
71
  return v(e).format(t, a);
71
- }, Nt = () => {
72
+ }, Pt = () => {
72
73
  const s = g(), t = s.sorting.map((i) => /* @__PURE__ */ n.createElement(Dt, { sorting: i, key: i.getTableColumn().id }));
73
74
  if (s.sorting.length === 0)
74
75
  return null;
75
76
  const e = s.sorting.find((i) => i.isSorted()), a = /* @__PURE__ */ n.createElement(y, null, e ? /* @__PURE__ */ n.createElement(
76
- L,
77
+ w,
77
78
  {
78
79
  locales: h,
79
80
  variables: {
@@ -81,8 +82,8 @@ const Q = et({}), g = () => at(Q).list, kt = () => g().loader.getLoaderInvocatio
81
82
  }
82
83
  },
83
84
  "list.setSorting"
84
- ) : /* @__PURE__ */ n.createElement(L, { locales: h }, "list.sorting"));
85
- return /* @__PURE__ */ n.createElement(w, null, /* @__PURE__ */ n.createElement(p, { variant: "soft", size: "s", color: "secondary" }, a, /* @__PURE__ */ n.createElement(W, null)), /* @__PURE__ */ n.createElement(
85
+ ) : /* @__PURE__ */ n.createElement(w, { locales: h }, "list.sorting"));
86
+ return /* @__PURE__ */ n.createElement(T, null, /* @__PURE__ */ n.createElement(p, { variant: "soft", size: "s", color: "secondary" }, a, /* @__PURE__ */ n.createElement(W, null)), /* @__PURE__ */ n.createElement(
86
87
  j,
87
88
  {
88
89
  selectionMode: "single",
@@ -93,11 +94,11 @@ const Q = et({}), g = () => at(Q).list, kt = () => g().loader.getLoaderInvocatio
93
94
  },
94
95
  t
95
96
  ));
96
- }, Pt = (s) => {
97
+ }, Rt = (s) => {
97
98
  const { filter: t } = s, e = t.values.map((r) => /* @__PURE__ */ n.createElement(J, { key: t.getValueId(r), id: String(r) }, String(r))), a = t.values.filter((r) => t.isValueActive(r)).map((r) => String(r)), i = (r) => {
98
99
  t.toggleValue(r);
99
100
  };
100
- return /* @__PURE__ */ n.createElement(w, null, /* @__PURE__ */ n.createElement(p, { variant: "soft", size: "s", color: "secondary" }, /* @__PURE__ */ n.createElement(y, null, t.name ?? t.property), /* @__PURE__ */ n.createElement(W, null)), /* @__PURE__ */ n.createElement(
101
+ return /* @__PURE__ */ n.createElement(T, null, /* @__PURE__ */ n.createElement(p, { variant: "soft", size: "s", color: "secondary" }, /* @__PURE__ */ n.createElement(y, null, t.name ?? t.property), /* @__PURE__ */ n.createElement(W, null)), /* @__PURE__ */ n.createElement(
101
102
  j,
102
103
  {
103
104
  onAction: i,
@@ -106,13 +107,13 @@ const Q = et({}), g = () => at(Q).list, kt = () => g().loader.getLoaderInvocatio
106
107
  },
107
108
  e
108
109
  ));
109
- }, Rt = "flow--list--header", Mt = "flow--list--header--picker-list", H = {
110
- header: Rt,
110
+ }, zt = "flow--list--header", Mt = "flow--list--header--picker-list", H = {
111
+ header: zt,
111
112
  pickerList: Mt
112
113
  }, Vt = "flow--list--header--active-filters", xt = "flow--list--header--clear-button", q = {
113
114
  activeFilters: Vt,
114
115
  clearButton: xt
115
- }, zt = () => {
116
+ }, $t = () => {
116
117
  const s = g(), t = s.filters.flatMap(
117
118
  (e) => e.values.filter((a) => e.isValueActive(a)).map((a) => /* @__PURE__ */ n.createElement(
118
119
  p,
@@ -134,13 +135,13 @@ const Q = et({}), g = () => at(Q).list, kt = () => g().loader.getLoaderInvocatio
134
135
  variant: "plain",
135
136
  onPress: () => s.clearFilters()
136
137
  },
137
- /* @__PURE__ */ n.createElement(L, { locales: h }, "list.resetAll")
138
+ /* @__PURE__ */ n.createElement(w, { locales: h }, "list.resetAll")
138
139
  ));
139
- }, $t = (s) => {
140
- const { className: t } = s, a = g().filters.map((i) => /* @__PURE__ */ n.createElement(Pt, { key: i.property, filter: i }));
141
- return /* @__PURE__ */ n.createElement("div", { className: B(t, H.header) }, /* @__PURE__ */ n.createElement("div", { className: H.pickerList }, /* @__PURE__ */ n.createElement(Nt, null), a), /* @__PURE__ */ n.createElement(zt, null));
142
- }, Ot = "flow--list", Ut = {
143
- list: Ot
140
+ }, Ot = (s) => {
141
+ const { className: t } = s, a = g().filters.map((i) => /* @__PURE__ */ n.createElement(Rt, { key: i.property, filter: i }));
142
+ return /* @__PURE__ */ n.createElement("div", { className: k(t, H.header) }, /* @__PURE__ */ n.createElement("div", { className: H.pickerList }, /* @__PURE__ */ n.createElement(Pt, null), a), /* @__PURE__ */ n.createElement($t, null));
143
+ }, Ut = "flow--list", Ht = {
144
+ list: Ut
144
145
  }, S = class S {
145
146
  constructor(t, e, a) {
146
147
  o(this, "id");
@@ -156,20 +157,20 @@ const Q = et({}), g = () => at(Q).list, kt = () => g().loader.getLoaderInvocatio
156
157
  }
157
158
  };
158
159
  o(S, "fallbackRenderItemFn", (t) => st("pre", void 0, JSON.stringify(t)));
159
- let T = S;
160
- class A {
160
+ let L = S;
161
+ class B {
161
162
  constructor(t) {
162
163
  o(this, "list");
163
164
  this.list = t;
164
165
  }
165
166
  static useNew(t) {
166
- return new A(t);
167
+ return new B(t);
167
168
  }
168
169
  get entries() {
169
- return this.list.reactTable.table.getRowModel().rows.map((t) => T.fromRow(this, t));
170
+ return this.list.reactTable.table.getRowModel().rows.map((t) => L.fromRow(this, t));
170
171
  }
171
172
  }
172
- class Ht {
173
+ class qt {
173
174
  constructor(t, e = {}) {
174
175
  o(this, "batchSize");
175
176
  o(this, "list");
@@ -218,8 +219,8 @@ class Ht {
218
219
  }
219
220
  }
220
221
  }
221
- const qt = (s, t) => s === t;
222
- class Kt {
222
+ const Kt = (s, t) => s === t;
223
+ class jt {
223
224
  constructor(t, e) {
224
225
  o(this, "_values");
225
226
  o(this, "list");
@@ -228,7 +229,7 @@ class Kt {
228
229
  o(this, "matcher");
229
230
  o(this, "name");
230
231
  o(this, "onFilterUpdateCallbacks", /* @__PURE__ */ new Set());
231
- this.list = t, this.property = e.property, this.mode = e.mode ?? "one", this._values = e.values, this.matcher = e.matcher ?? qt, this.name = e.name;
232
+ this.list = t, this.property = e.property, this.mode = e.mode ?? "one", this._values = e.values, this.matcher = e.matcher ?? Kt, this.name = e.name;
232
233
  }
233
234
  updateTableColumnDef(t) {
234
235
  t.enableColumnFilter = !0, t.filterFn = this.getReactTableFilterFn();
@@ -301,7 +302,7 @@ class Kt {
301
302
  this.onFilterUpdateCallbacks.add(t);
302
303
  }
303
304
  }
304
- class jt {
305
+ class Jt {
305
306
  constructor(t, e) {
306
307
  o(this, "list");
307
308
  o(this, "property");
@@ -326,8 +327,8 @@ class jt {
326
327
  this.list.reactTable.getTableColumn(this.property).clearSorting();
327
328
  }
328
329
  }
329
- const Jt = (s) => F(ot(s));
330
- class k {
330
+ const Wt = (s) => F(ot(s));
331
+ class A {
331
332
  constructor(t, e = {}) {
332
333
  o(this, "list");
333
334
  o(this, "table");
@@ -344,7 +345,7 @@ class k {
344
345
  this.list = t, this.tableState = yt(() => ({ value: void 0 })), this.table = this.useReactTable(e);
345
346
  }
346
347
  static useNew(t, e = {}) {
347
- return new k(t, e);
348
+ return new A(t, e);
348
349
  }
349
350
  useReactTable(t = {}) {
350
351
  const e = this.list.loader.useData(), a = this.list.sorting.filter((r) => r.defaultEnabled), i = ht({
@@ -370,7 +371,7 @@ class k {
370
371
  return this.useUpdateTableState(i), i;
371
372
  }
372
373
  useUpdateTableState(t) {
373
- Jt(() => {
374
+ Wt(() => {
374
375
  const e = this.tableState.value;
375
376
  e ? t.setOptions((a) => ({
376
377
  ...a,
@@ -405,23 +406,23 @@ class k {
405
406
  ), Array.from(t.values());
406
407
  }
407
408
  }
408
- class D {
409
+ class N {
409
410
  constructor() {
410
411
  o(this, "dataBatches", []);
411
412
  o(this, "prevDataBatches", []);
412
413
  o(this, "batchLoadingStates", ["void"]);
413
414
  ct(this, {
414
- dataBatches: V.shallow,
415
- batchLoadingStates: V.shallow,
416
- mergedData: x,
417
- isLoading: x,
415
+ dataBatches: M.shallow,
416
+ batchLoadingStates: M.shallow,
417
+ mergedData: V,
418
+ isLoading: V,
418
419
  reset: I.bound,
419
420
  setDataBatch: I.bound,
420
421
  setBatchLoadingState: I.bound
421
422
  });
422
423
  }
423
424
  static useNew() {
424
- return nt(new D()).current;
425
+ return nt(new N()).current;
425
426
  }
426
427
  reset() {
427
428
  this.batchLoadingStates = [], this.dataBatches = [];
@@ -445,8 +446,8 @@ class D {
445
446
  return $(() => this.isLoading);
446
447
  }
447
448
  }
448
- const Wt = [];
449
- class N {
449
+ const Yt = [];
450
+ class D {
450
451
  constructor(t, e = {}) {
451
452
  o(this, "list");
452
453
  o(this, "dataSource");
@@ -455,12 +456,12 @@ class N {
455
456
  o(this, "manualPagination");
456
457
  o(this, "loaderState");
457
458
  const { source: a } = e;
458
- this.dataSource = a ?? { staticData: Wt };
459
+ this.dataSource = a ?? { staticData: Yt };
459
460
  const i = "manualPagination" in this.dataSource ? this.dataSource.manualPagination : void 0, r = "manualFiltering" in this.dataSource ? this.dataSource.manualFiltering : void 0, l = "manualSorting" in this.dataSource ? this.dataSource.manualSorting : void 0;
460
- this.list = t, this.loaderState = D.useNew(), this.manualPagination = i ?? !1, this.manualFiltering = r ?? this.manualPagination, this.manualSorting = l ?? this.manualPagination, this.list.filters.forEach((u) => u.onFilterUpdated(() => this.reset()));
461
+ this.list = t, this.loaderState = N.useNew(), this.manualPagination = i ?? !1, this.manualFiltering = r ?? this.manualPagination, this.manualSorting = l ?? this.manualPagination, this.list.filters.forEach((m) => m.onFilterUpdated(() => this.reset()));
461
462
  }
462
463
  static useNew(t, e = {}) {
463
- return new N(t, e);
464
+ return new D(t, e);
464
465
  }
465
466
  reset() {
466
467
  this.loaderState.reset();
@@ -522,7 +523,7 @@ class N {
522
523
  getBatchDataAsyncResource(t) {
523
524
  const e = this.dataSource, a = this.getDataLoaderOptions(t);
524
525
  if ("staticData" in e)
525
- return z(
526
+ return x(
526
527
  async (i) => ({
527
528
  data: i,
528
529
  itemTotalCount: i.length
@@ -531,7 +532,7 @@ class N {
531
532
  );
532
533
  if ("asyncLoader" in e) {
533
534
  const i = e.asyncLoader;
534
- return z(i, [a]);
535
+ return x(i, [a]);
535
536
  }
536
537
  if ("asyncResourceFactory" in e) {
537
538
  const i = e.asyncResourceFactory;
@@ -540,7 +541,7 @@ class N {
540
541
  throw new Error("Unknown data source");
541
542
  }
542
543
  }
543
- let Yt = class X {
544
+ let Gt = class X {
544
545
  constructor(t) {
545
546
  o(this, "filters");
546
547
  o(this, "sorting");
@@ -550,7 +551,7 @@ let Yt = class X {
550
551
  o(this, "batches");
551
552
  o(this, "loader");
552
553
  const { render: e, filters: a = [], sorting: i = [], batchesController: r } = t;
553
- this.render = e, this.items = A.useNew(this), this.filters = a.map((l) => new Kt(this, l)), this.sorting = i.map((l) => new jt(this, l)), this.batches = new Ht(this, r), this.loader = N.useNew(this, t.loader), this.reactTable = k.useNew(this, {
554
+ this.render = e, this.items = B.useNew(this), this.filters = a.map((l) => new jt(this, l)), this.sorting = i.map((l) => new Jt(this, l)), this.batches = new qt(this, r), this.loader = D.useNew(this, t.loader), this.reactTable = A.useNew(this, {
554
555
  manualFiltering: this.loader.manualFiltering,
555
556
  manualPagination: this.loader.manualPagination,
556
557
  manualSorting: this.loader.manualSorting
@@ -576,76 +577,88 @@ let Yt = class X {
576
577
  return !this.loader.useIsLoading() && this.items.entries.length === 0;
577
578
  }
578
579
  };
579
- const Gt = "flow--list--items--item-list", Qt = "flow--list--items--is-loading", K = {
580
- itemList: Gt,
581
- isLoading: Qt
582
- }, Xt = "flow--list--items--item", Zt = "flow--list--items--title", _t = "flow--list--items--top-content", te = "flow--list--items--content", ee = "flow--list--items--action", ae = "flow--list--items--avatar", se = "flow--list--items--text", ne = "flow--list--items--status-badge", ie = "flow--list--items--heading", c = {
583
- item: Xt,
584
- title: Zt,
585
- topContent: _t,
586
- content: te,
587
- action: ee,
588
- avatar: ae,
589
- text: se,
590
- statusBadge: ne,
591
- heading: ie
592
- }, re = (s) => {
580
+ const Qt = "flow--list--items--item-list", Xt = "flow--list--items--is-loading", K = {
581
+ itemList: Qt,
582
+ isLoading: Xt
583
+ }, Zt = "flow--list--items--item", _t = "flow--list--items--title", te = "flow--list--items--top-content", ee = "flow--list--items--content", ae = "flow--list--items--action", se = "flow--list--items--avatar", ne = "flow--list--items--text", ie = "flow--list--items--status-badge", re = "flow--list--items--heading", u = {
584
+ item: Zt,
585
+ title: _t,
586
+ topContent: te,
587
+ content: ee,
588
+ action: ae,
589
+ avatar: se,
590
+ text: ne,
591
+ statusBadge: ie,
592
+ heading: re,
593
+ "container-breakpoint-size-xs": "flow--list--items--container-breakpoint-size-xs",
594
+ "container-breakpoint-size-s": "flow--list--items--container-breakpoint-size-s",
595
+ "container-breakpoint-size-m": "flow--list--items--container-breakpoint-size-m",
596
+ "container-breakpoint-size-l": "flow--list--items--container-breakpoint-size-l",
597
+ "container-breakpoint-size-xl": "flow--list--items--container-breakpoint-size-xl"
598
+ }, oe = (s) => {
593
599
  const { className: t, children: e } = s, a = v(h);
594
- return /* @__PURE__ */ n.createElement(w, null, /* @__PURE__ */ n.createElement(
600
+ return /* @__PURE__ */ n.createElement(T, null, /* @__PURE__ */ n.createElement(
595
601
  p,
596
602
  {
597
603
  variant: "plain",
598
604
  className: t,
599
605
  "aria-label": a.format("list.options")
600
606
  },
601
- /* @__PURE__ */ n.createElement(Lt, null)
607
+ /* @__PURE__ */ n.createElement(wt, null)
602
608
  ), e);
603
- }, oe = (s) => s === "top" ? c.topContent : s === "bottom" ? c.content : c.topContent, Z = (s) => {
604
- const { children: t, href: e, className: a, ...i } = s, r = {
609
+ }, le = (s) => s === "top" ? u.topContent : s === "bottom" ? u.content : u.topContent, Z = (s) => {
610
+ const {
611
+ children: t,
612
+ href: e,
613
+ className: a,
614
+ containerBreakpointSize: i = "m",
615
+ ...r
616
+ } = s, l = {
605
617
  ContextMenu: {
606
- wrapWith: /* @__PURE__ */ n.createElement(re, { className: c.action }),
618
+ wrapWith: /* @__PURE__ */ n.createElement(oe, { className: u.action }),
607
619
  placement: "bottom end"
608
620
  },
609
621
  Button: {
610
- className: c.action
622
+ className: u.action
611
623
  },
612
624
  Content: {
613
- className: Ft((m) => oe(m.slot)),
625
+ className: Ft((c) => le(c.slot)),
614
626
  tunnelId: "topContent"
615
627
  },
616
628
  Avatar: {
617
- className: c.avatar,
629
+ className: u.avatar,
618
630
  tunnelId: "title"
619
631
  },
620
632
  Heading: {
621
- className: c.heading,
633
+ className: u.heading,
622
634
  level: 4,
623
635
  tunnelId: "title"
624
636
  },
625
637
  Text: {
626
- className: c.text,
638
+ className: u.text,
627
639
  tunnelId: "title"
628
640
  },
629
641
  StatusBadge: {
630
- className: c.statusBadge,
642
+ className: u.statusBadge,
631
643
  tunnelId: "title"
632
644
  },
633
645
  Link: {
634
646
  unstyled: !0
635
647
  }
636
- }, l = B(c.item, a), u = (m) => e ? /* @__PURE__ */ n.createElement(wt, { unstyled: !0, ...i, className: l, href: e }, m.children) : /* @__PURE__ */ n.createElement("div", { className: l }, m.children);
637
- return /* @__PURE__ */ n.createElement(u, null, /* @__PURE__ */ n.createElement(It, { props: r }, /* @__PURE__ */ n.createElement(Tt, null, t, /* @__PURE__ */ n.createElement("div", { className: c.title }, /* @__PURE__ */ n.createElement(O, { id: "title" })), /* @__PURE__ */ n.createElement(O, { id: "topContent" }))));
638
- }, b = () => /* @__PURE__ */ n.createElement(Z, null, /* @__PURE__ */ n.createElement(G, { height: "3rem" })), le = (s) => {
639
- const { className: t } = s, e = g(), a = e.loader.useIsLoading(), i = e.loader.useIsInitiallyLoading(), r = e.useIsEmpty(), l = v(h), u = e.items.entries.map((d) => /* @__PURE__ */ n.createElement(it, { key: d.id }, d.render())), m = B(
648
+ }, m = k(
649
+ u.item,
650
+ a,
651
+ u[kt(i)]
652
+ ), d = (c) => e ? /* @__PURE__ */ n.createElement(Tt, { unstyled: !0, ...r, className: m, href: e }, c.children) : /* @__PURE__ */ n.createElement("div", { className: m }, c.children);
653
+ return /* @__PURE__ */ n.createElement(d, null, /* @__PURE__ */ n.createElement(It, { props: l }, /* @__PURE__ */ n.createElement(Lt, null, t, /* @__PURE__ */ n.createElement("div", { className: u.title }, /* @__PURE__ */ n.createElement(O, { id: "title" })), /* @__PURE__ */ n.createElement(O, { id: "topContent" }))));
654
+ }, b = () => /* @__PURE__ */ n.createElement(Z, null, /* @__PURE__ */ n.createElement(G, { height: "3rem" })), ce = (s) => {
655
+ const { className: t } = s, e = g(), a = e.loader.useIsLoading(), i = e.loader.useIsInitiallyLoading(), r = e.useIsEmpty(), l = v(h), m = e.items.entries.map((c) => /* @__PURE__ */ n.createElement(it, { key: c.id }, c.render())), d = k(
640
656
  K.itemList,
641
657
  t,
642
658
  a && K.isLoading
643
659
  );
644
- return r ? /* @__PURE__ */ n.createElement(vt, null, /* @__PURE__ */ n.createElement(Ct, null), /* @__PURE__ */ n.createElement(Et, null, l.format("list.noResult.heading")), /* @__PURE__ */ n.createElement(y, null, l.format("list.noResult.text"))) : /* @__PURE__ */ n.createElement("div", { className: m }, i ? ce : u);
645
- }, ce = /* @__PURE__ */ n.createElement(n.Fragment, null, /* @__PURE__ */ n.createElement(b, null), /* @__PURE__ */ n.createElement(b, null), /* @__PURE__ */ n.createElement(b, null), /* @__PURE__ */ n.createElement(b, null), /* @__PURE__ */ n.createElement(b, null));
646
- function ue(s) {
647
- return null;
648
- }
660
+ return r ? /* @__PURE__ */ n.createElement(vt, null, /* @__PURE__ */ n.createElement(Ct, null), /* @__PURE__ */ n.createElement(Et, null, l.format("list.noResult.heading")), /* @__PURE__ */ n.createElement(y, null, l.format("list.noResult.text"))) : /* @__PURE__ */ n.createElement("div", { className: d }, i ? ue : m);
661
+ }, ue = /* @__PURE__ */ n.createElement(n.Fragment, null, /* @__PURE__ */ n.createElement(b, null), /* @__PURE__ */ n.createElement(b, null), /* @__PURE__ */ n.createElement(b, null), /* @__PURE__ */ n.createElement(b, null), /* @__PURE__ */ n.createElement(b, null));
649
662
  function me(s) {
650
663
  return null;
651
664
  }
@@ -658,22 +671,25 @@ function he(s) {
658
671
  function ge(s) {
659
672
  return null;
660
673
  }
661
- const pe = "flow--list--footer", fe = {
662
- footer: pe
663
- }, be = (s) => {
664
- const t = v(h), e = g(), a = e.batches, i = e.isFiltered() && !e.loader.manualFiltering, r = e.loader.useIsInitiallyLoading(), l = e.useIsEmpty(), u = a.getTotalItemsCount() ?? 0, m = a.getFilteredItemsCount() ?? 0, d = a.getVisibleItemsCount() ?? 0;
674
+ function pe(s) {
675
+ return null;
676
+ }
677
+ const fe = "flow--list--footer", be = {
678
+ footer: fe
679
+ }, Se = (s) => {
680
+ const t = v(h), e = g(), a = e.batches, i = e.isFiltered() && !e.loader.manualFiltering, r = e.loader.useIsInitiallyLoading(), l = e.useIsEmpty(), m = a.getTotalItemsCount() ?? 0, d = a.getFilteredItemsCount() ?? 0, c = a.getVisibleItemsCount() ?? 0;
665
681
  if (l)
666
682
  return null;
667
683
  const C = r ? /* @__PURE__ */ n.createElement(G, { width: "200px" }) : i ? t.format("list.paginationInfoFiltered", {
668
- visibleItemsCount: d,
669
- filteredItemsCount: m,
670
- totalItemsCount: u
684
+ visibleItemsCount: c,
685
+ filteredItemsCount: d,
686
+ totalItemsCount: m
671
687
  }) : t.format("list.paginationInfo", {
672
- visibleItemsCount: d,
673
- totalItemsCount: u
688
+ visibleItemsCount: c,
689
+ totalItemsCount: m
674
690
  });
675
691
  return /* @__PURE__ */ n.createElement(y, { ...s }, C);
676
- }, Se = (s) => {
692
+ }, ye = (s) => {
677
693
  const t = v(h), e = g(), a = e.loader.useIsLoading(), i = e.loader.useIsInitiallyLoading();
678
694
  return !e.batches.hasNextBatch() && !a ? null : /* @__PURE__ */ n.createElement(
679
695
  p,
@@ -687,13 +703,13 @@ const pe = "flow--list--footer", fe = {
687
703
  },
688
704
  t.format("list.showMore")
689
705
  );
690
- }, ye = () => /* @__PURE__ */ n.createElement("div", { className: fe.footer }, /* @__PURE__ */ n.createElement(be, null), /* @__PURE__ */ n.createElement(Se, null)), ve = (s) => /* @__PURE__ */ n.createElement(Z, null, /* @__PURE__ */ n.createElement(At, null, JSON.stringify(s.data)));
691
- function ia(s) {
692
- var C, P, R, M;
693
- const { children: t, batchSize: e, ...a } = s, i = (C = E(t, ue)) == null ? void 0 : C.props, r = (P = E(
706
+ }, ve = () => /* @__PURE__ */ n.createElement("div", { className: be.footer }, /* @__PURE__ */ n.createElement(Se, null), /* @__PURE__ */ n.createElement(ye, null)), Ce = (s) => /* @__PURE__ */ n.createElement(Z, null, /* @__PURE__ */ n.createElement(At, null, JSON.stringify(s.data)));
707
+ function oa(s) {
708
+ var C, P, R, z;
709
+ const { children: t, batchSize: e, ...a } = s, i = (C = E(t, me)) == null ? void 0 : C.props, r = (P = E(
694
710
  t,
695
711
  Bt
696
- )) == null ? void 0 : P.props, l = (R = E(t, ge)) == null ? void 0 : R.props, u = {
712
+ )) == null ? void 0 : P.props, l = (R = E(t, pe)) == null ? void 0 : R.props, m = {
697
713
  source: i ? {
698
714
  ...i,
699
715
  asyncLoader: i.children
@@ -703,11 +719,11 @@ function ia(s) {
703
719
  } : l ? {
704
720
  staticData: l.data
705
721
  } : void 0
706
- }, m = (f) => /* @__PURE__ */ n.createElement(ve, { data: f }), d = Yt.useNew({
707
- loader: u,
708
- filters: U(t, me).map((f) => f.props),
709
- sorting: U(t, de).map((f) => f.props),
710
- render: ((M = E(t, he)) == null ? void 0 : M.props.children) ?? m,
722
+ }, d = (f) => /* @__PURE__ */ n.createElement(Ce, { data: f }), c = Gt.useNew({
723
+ loader: m,
724
+ filters: U(t, de).map((f) => f.props),
725
+ sorting: U(t, he).map((f) => f.props),
726
+ render: ((z = E(t, ge)) == null ? void 0 : z.props.children) ?? d,
711
727
  ...a,
712
728
  batchesController: {
713
729
  batchSize: e
@@ -717,20 +733,20 @@ function ia(s) {
717
733
  Q.Provider,
718
734
  {
719
735
  value: {
720
- list: d
736
+ list: c
721
737
  }
722
738
  },
723
- /* @__PURE__ */ n.createElement(kt, null),
724
- /* @__PURE__ */ n.createElement("div", { className: Ut.list }, /* @__PURE__ */ n.createElement($t, null), /* @__PURE__ */ n.createElement(le, null), /* @__PURE__ */ n.createElement(ye, null))
739
+ /* @__PURE__ */ n.createElement(Nt, null),
740
+ /* @__PURE__ */ n.createElement("div", { className: Ht.list }, /* @__PURE__ */ n.createElement(Ot, null), /* @__PURE__ */ n.createElement(ce, null), /* @__PURE__ */ n.createElement(ve, null))
725
741
  );
726
742
  }
727
743
  export {
728
- ia as List,
729
- me as ListFilter,
744
+ oa as List,
745
+ de as ListFilter,
730
746
  Z as ListItem,
731
- he as ListItemView,
732
- ue as ListLoaderAsync,
733
- de as ListSorting,
734
- ge as ListStaticData,
735
- ia as default
747
+ ge as ListItemView,
748
+ me as ListLoaderAsync,
749
+ he as ListSorting,
750
+ pe as ListStaticData,
751
+ oa as default
736
752
  };
@@ -3,29 +3,29 @@
3
3
  import e from "react";
4
4
  import * as r from "react-aria-components";
5
5
  import { s as t } from "./FormField.module-DHK6nIcD.js";
6
- import E from "clsx";
7
- import { C as N } from "./ClearPropsContext-CUvsbMn8.js";
8
- import { P as I } from "./PropsContextProvider-C6Z4XGp6.js";
6
+ import u from "clsx";
7
+ import { C as f } from "./ClearPropsContext-CUvsbMn8.js";
8
+ import { P as d } from "./PropsContextProvider-C6Z4XGp6.js";
9
9
  import "@react-aria/utils";
10
10
  import "./propsContext-DzAKlmhS.js";
11
11
  import "remeda";
12
- import { F as b } from "./FieldError-C3KKqMzM.js";
13
- import { B as m } from "./Button-Dz22EEEz.js";
12
+ import { F as E } from "./FieldError-C3KKqMzM.js";
13
+ import { B as s } from "./Button-Dz22EEEz.js";
14
14
  import "@tabler/icons-react";
15
15
  import "./Icon-BTTw8v9z.js";
16
- import { I as C } from "./IconChevronDown-CPh2XLia.js";
17
- import { I as h } from "./IconChevronUp-ClAQYdXn.js";
18
- import { I as P, a as F } from "./IconPlus-DHuWcs1-.js";
19
- import { f as w } from "./flowComponent-TgbbWDzO.js";
20
- const B = "flow--number-field--group", g = "flow--number-field--input", v = "flow--number-field--decrement-button", x = "flow--number-field--increment-button", y = "flow--number-field--coarse-pointer-icon", D = "flow--number-field--touch-icon", o = {
21
- group: B,
22
- input: g,
23
- decrementButton: v,
24
- incrementButton: x,
25
- coarsePointerIcon: y,
26
- touchIcon: D
27
- }, Q = w("NumberField", (n) => {
28
- const { children: c, className: a, refProp: l, onChange: s, ...i } = n, p = E(t.formField, a), u = {
16
+ import { I as N } from "./IconChevronDown-CPh2XLia.js";
17
+ import { I } from "./IconChevronUp-ClAQYdXn.js";
18
+ import { I as b, a as P } from "./IconPlus-DHuWcs1-.js";
19
+ import { f as C } from "./flowComponent-TgbbWDzO.js";
20
+ const F = "flow--number-field--group", w = "flow--number-field--input", B = "flow--number-field--decrement-button", h = "flow--number-field--increment-button", v = "flow--number-field--coarse-pointer-icon", x = "flow--number-field--touch-icon", o = {
21
+ group: F,
22
+ input: w,
23
+ decrementButton: B,
24
+ incrementButton: h,
25
+ coarsePointerIcon: v,
26
+ touchIcon: x
27
+ }, K = C("NumberField", (n) => {
28
+ const { children: m, className: c, refProp: a, ...l } = n, i = u(t.formField, c), p = {
29
29
  Label: {
30
30
  className: t.label,
31
31
  optional: !n.isRequired
@@ -36,46 +36,32 @@ const B = "flow--number-field--group", g = "flow--number-field--input", v = "flo
36
36
  FieldError: {
37
37
  className: t.customFieldError
38
38
  }
39
- }, f = (d) => {
40
- setTimeout(() => {
41
- s && s(d);
42
- }, 150);
43
39
  };
44
- return /* @__PURE__ */ e.createElement(N, null, /* @__PURE__ */ e.createElement(
45
- r.NumberField,
40
+ return /* @__PURE__ */ e.createElement(f, null, /* @__PURE__ */ e.createElement(r.NumberField, { ...l, className: i }, /* @__PURE__ */ e.createElement(r.Group, { className: o.group }, /* @__PURE__ */ e.createElement(
41
+ s,
46
42
  {
47
- ...i,
48
- className: p,
49
- onChange: f
43
+ slot: "decrement",
44
+ className: o.decrementButton,
45
+ size: "s",
46
+ variant: "plain",
47
+ color: "secondary"
50
48
  },
51
- /* @__PURE__ */ e.createElement(r.Group, { className: o.group }, /* @__PURE__ */ e.createElement(
52
- m,
53
- {
54
- slot: "decrement",
55
- className: o.decrementButton,
56
- size: "s",
57
- variant: "plain",
58
- color: "secondary"
59
- },
60
- /* @__PURE__ */ e.createElement(C, null),
61
- /* @__PURE__ */ e.createElement(P, { className: o.coarsePointerIcon })
62
- ), /* @__PURE__ */ e.createElement(r.Input, { className: o.input, ref: l }), /* @__PURE__ */ e.createElement(
63
- m,
64
- {
65
- slot: "increment",
66
- className: o.incrementButton,
67
- size: "s",
68
- variant: "plain",
69
- color: "secondary"
70
- },
71
- /* @__PURE__ */ e.createElement(h, null),
72
- /* @__PURE__ */ e.createElement(F, { className: o.coarsePointerIcon })
73
- )),
74
- /* @__PURE__ */ e.createElement(I, { props: u }, c),
75
- /* @__PURE__ */ e.createElement(b, { className: t.fieldError })
76
- ));
49
+ /* @__PURE__ */ e.createElement(N, null),
50
+ /* @__PURE__ */ e.createElement(b, { className: o.coarsePointerIcon })
51
+ ), /* @__PURE__ */ e.createElement(r.Input, { className: o.input, ref: a }), /* @__PURE__ */ e.createElement(
52
+ s,
53
+ {
54
+ slot: "increment",
55
+ className: o.incrementButton,
56
+ size: "s",
57
+ variant: "plain",
58
+ color: "secondary"
59
+ },
60
+ /* @__PURE__ */ e.createElement(I, null),
61
+ /* @__PURE__ */ e.createElement(P, { className: o.coarsePointerIcon })
62
+ )), /* @__PURE__ */ e.createElement(d, { props: p }, m), /* @__PURE__ */ e.createElement(E, { className: t.fieldError })));
77
63
  });
78
64
  export {
79
- Q as NumberField,
80
- Q as default
65
+ K as NumberField,
66
+ K as default
81
67
  };