@mittwald/flow-react-components 0.1.0-alpha.181 → 0.1.0-alpha.183
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/List.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
/* */
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var r = (i, t, e) =>
|
|
3
|
+
var mt = Object.defineProperty;
|
|
4
|
+
var dt = (i, t, e) => t in i ? mt(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e;
|
|
5
|
+
var r = (i, t, e) => dt(i, typeof t != "symbol" ? t + "" : t, e);
|
|
6
6
|
import n, { createContext as ht, useContext as gt, createElement as W, useState as pt, useEffect as T, useRef as ft, cloneElement as bt } from "react";
|
|
7
7
|
import "./propsContext-DzAKlmhS.js";
|
|
8
8
|
import { P as St } from "./PropsContextProvider-C6Z4XGp6.js";
|
|
9
9
|
import "@react-aria/utils";
|
|
10
10
|
import { unique as vt, times as yt } from "remeda";
|
|
11
|
-
import { d as
|
|
11
|
+
import { d as wt } from "./dynamic-ClpUSmEt.js";
|
|
12
12
|
import { B as f } from "./Button-BRmT11B1.js";
|
|
13
13
|
import "@tabler/icons-react";
|
|
14
14
|
import "./Icon-BCN5qdXA.js";
|
|
15
|
-
import { I as
|
|
15
|
+
import { I as Et } from "./IconContextMenu-Cy6_2TgT.js";
|
|
16
16
|
import { a as x, C as Y } from "./ContextMenuTrigger-DuiGa0Zj.js";
|
|
17
17
|
import { M as Q } from "./MenuItem-Cb7EDu-b.js";
|
|
18
18
|
import { useLocalizedStringFormatter as b } from "react-aria";
|
|
@@ -29,7 +29,7 @@ import { autorun as At, runInAction as kt, makeObservable as Vt, observable as O
|
|
|
29
29
|
import "./context-BB3_MApL.js";
|
|
30
30
|
import { u as xt } from "./useOnChange-C1Quwyuz.js";
|
|
31
31
|
import { getProperty as Bt } from "dot-prop";
|
|
32
|
-
import { useReactTable as Pt, getCoreRowModel as Dt, getSortedRowModel as Nt, getFilteredRowModel as Rt, getPaginationRowModel as
|
|
32
|
+
import { useReactTable as Pt, getCoreRowModel as Dt, getSortedRowModel as Nt, getFilteredRowModel as Rt, getPaginationRowModel as zt, getFacetedUniqueValues as Mt } from "@tanstack/react-table";
|
|
33
33
|
import _ from "invariant";
|
|
34
34
|
import { useLocalObservable as Ut } from "mobx-react-lite";
|
|
35
35
|
import { getAsyncResource as q } from "@mittwald/react-use-promise";
|
|
@@ -41,7 +41,7 @@ import { H as tt } from "./Heading-1M1gRZfk.js";
|
|
|
41
41
|
import { S as I } from "./Skeleton-CgOx_15R.js";
|
|
42
42
|
import { d as y, a as K } from "./deepFindOfType-6pG0fH7S.js";
|
|
43
43
|
import { ListLoaderAsyncResource as Ht, TypedListLoaderAsyncResource as qt } from "./List/ListLoaderAsyncResource.js";
|
|
44
|
-
const Gt = "flow--list--items--item--view", Kt = "flow--list--items--item--view--title", jt = "flow--list--items--item--view--top-content", Jt = "flow--list--items--item--view--content", Wt = "flow--list--items--item--view--action", Yt = "flow--list--items--item--view--avatar", Qt = "flow--list--items--item--view--text", Xt = "flow--list--items--item--view--heading",
|
|
44
|
+
const Gt = "flow--list--items--item--view", Kt = "flow--list--items--item--view--title", jt = "flow--list--items--item--view--top-content", Jt = "flow--list--items--item--view--content", Wt = "flow--list--items--item--view--action", Yt = "flow--list--items--item--view--avatar", Qt = "flow--list--items--item--view--text", Xt = "flow--list--items--item--view--heading", d = {
|
|
45
45
|
view: Gt,
|
|
46
46
|
title: Kt,
|
|
47
47
|
topContent: jt,
|
|
@@ -84,43 +84,43 @@ const Gt = "flow--list--items--item--view", Kt = "flow--list--items--item--view-
|
|
|
84
84
|
className: t,
|
|
85
85
|
"aria-label": a.format("list.options")
|
|
86
86
|
},
|
|
87
|
-
/* @__PURE__ */ n.createElement(
|
|
87
|
+
/* @__PURE__ */ n.createElement(Et, null)
|
|
88
88
|
), e);
|
|
89
|
-
}, _t = (i) => i === "top" ?
|
|
89
|
+
}, _t = (i) => i === "top" ? d.topContent : i === "bottom" ? d.content : d.topContent, et = (i) => {
|
|
90
90
|
const { children: t, className: e, containerBreakpointSize: a = "m" } = i, s = {
|
|
91
91
|
ContextMenu: {
|
|
92
|
-
wrapWith: /* @__PURE__ */ n.createElement(Zt, { className:
|
|
92
|
+
wrapWith: /* @__PURE__ */ n.createElement(Zt, { className: d.action }),
|
|
93
93
|
placement: "bottom end"
|
|
94
94
|
},
|
|
95
95
|
Button: {
|
|
96
|
-
className:
|
|
96
|
+
className: d.action
|
|
97
97
|
},
|
|
98
98
|
Content: {
|
|
99
|
-
className:
|
|
99
|
+
className: wt((l) => _t(l.slot)),
|
|
100
100
|
tunnelId: "topContent"
|
|
101
101
|
},
|
|
102
102
|
Avatar: {
|
|
103
|
-
className:
|
|
103
|
+
className: d.avatar,
|
|
104
104
|
tunnelId: "title"
|
|
105
105
|
},
|
|
106
106
|
Heading: {
|
|
107
|
-
className:
|
|
107
|
+
className: d.heading,
|
|
108
108
|
level: 5,
|
|
109
109
|
tunnelId: "title"
|
|
110
110
|
},
|
|
111
111
|
Text: {
|
|
112
|
-
className:
|
|
112
|
+
className: d.text,
|
|
113
113
|
tunnelId: "title"
|
|
114
114
|
},
|
|
115
115
|
Link: {
|
|
116
116
|
unstyled: !0
|
|
117
117
|
}
|
|
118
118
|
}, o = C(
|
|
119
|
-
|
|
119
|
+
d.view,
|
|
120
120
|
e,
|
|
121
|
-
|
|
121
|
+
d[Ft(a)]
|
|
122
122
|
);
|
|
123
|
-
return /* @__PURE__ */ n.createElement("div", { className: o }, /* @__PURE__ */ n.createElement(St, { props: s }, /* @__PURE__ */ n.createElement(Ct, null, t, /* @__PURE__ */ n.createElement("div", { className:
|
|
123
|
+
return /* @__PURE__ */ n.createElement("div", { className: o }, /* @__PURE__ */ n.createElement(St, { props: s }, /* @__PURE__ */ n.createElement(Ct, null, t, /* @__PURE__ */ n.createElement("div", { className: d.title }, /* @__PURE__ */ n.createElement($, { id: "title" })), /* @__PURE__ */ n.createElement($, { id: "topContent" }))));
|
|
124
124
|
}, at = ht({}), h = () => gt(at).list, te = () => h().loader.getLoaderInvocationHooks().map((t, e) => /* @__PURE__ */ n.createElement(Tt, { key: e }, () => {
|
|
125
125
|
t();
|
|
126
126
|
})), ee = (i) => {
|
|
@@ -155,19 +155,19 @@ const Gt = "flow--list--items--item--view", Kt = "flow--list--items--item--view-
|
|
|
155
155
|
t
|
|
156
156
|
));
|
|
157
157
|
}, se = (i) => {
|
|
158
|
-
const { filter: t } = i, { values: e, mode: a, name: s, property: o } = t, l = e.map((u) => /* @__PURE__ */ n.createElement(Q, { key: t.getValueId(u), id: String(u) }, String(u))), c = e.filter((u) => t.isValueActive(u)).map((u) => String(u)),
|
|
158
|
+
const { filter: t } = i, { values: e, mode: a, name: s, property: o } = t, l = e.map((u) => /* @__PURE__ */ n.createElement(Q, { key: t.getValueId(u), id: String(u) }, String(u))), c = e.filter((u) => t.isValueActive(u)).map((u) => String(u)), m = (u) => {
|
|
159
159
|
t.toggleValue(u);
|
|
160
160
|
};
|
|
161
161
|
return /* @__PURE__ */ n.createElement(x, null, /* @__PURE__ */ n.createElement(f, { variant: "soft", size: "s", color: "secondary" }, /* @__PURE__ */ n.createElement(S, null, s ?? o), /* @__PURE__ */ n.createElement(X, null)), /* @__PURE__ */ n.createElement(
|
|
162
162
|
Y,
|
|
163
163
|
{
|
|
164
|
-
onAction:
|
|
164
|
+
onAction: m,
|
|
165
165
|
selectionMode: a === "one" ? "single" : "multiple",
|
|
166
166
|
selectedKeys: c
|
|
167
167
|
},
|
|
168
168
|
l
|
|
169
169
|
));
|
|
170
|
-
}, ie = "flow--list--header", ne = "flow--list--header--picker-list-and-search", re = "flow--list--header--picker-list", oe = "flow--list--header--search-field",
|
|
170
|
+
}, ie = "flow--list--header", ne = "flow--list--header--picker-list-and-search", re = "flow--list--header--picker-list", oe = "flow--list--header--search-field", w = {
|
|
171
171
|
header: ie,
|
|
172
172
|
pickerListAndSearch: ne,
|
|
173
173
|
pickerList: re,
|
|
@@ -199,12 +199,12 @@ const Gt = "flow--list--items--item--view", Kt = "flow--list--items--item--view-
|
|
|
199
199
|
},
|
|
200
200
|
/* @__PURE__ */ n.createElement(A, { locales: g }, "list.resetAll")
|
|
201
201
|
));
|
|
202
|
-
},
|
|
202
|
+
}, me = (i) => {
|
|
203
203
|
const { className: t, onChange: e, value: a, ...s } = i, o = b(g), [l, c] = pt(a ?? "");
|
|
204
204
|
xt(a, () => {
|
|
205
205
|
c(a ?? "");
|
|
206
206
|
}, [l]);
|
|
207
|
-
const
|
|
207
|
+
const m = o.format("list.search"), u = () => {
|
|
208
208
|
e(void 0), c("");
|
|
209
209
|
}, v = (p) => {
|
|
210
210
|
p.key === "Enter" ? l.trim() === "" ? e(void 0) : e(l) : p.key === "Escape" && u();
|
|
@@ -213,8 +213,8 @@ const Gt = "flow--list--items--item--view", Kt = "flow--list--items--item--view-
|
|
|
213
213
|
It,
|
|
214
214
|
{
|
|
215
215
|
style: { flexGrow: "1" },
|
|
216
|
-
"aria-label":
|
|
217
|
-
placeholder:
|
|
216
|
+
"aria-label": m,
|
|
217
|
+
placeholder: m,
|
|
218
218
|
value: l,
|
|
219
219
|
onKeyUp: v,
|
|
220
220
|
onChange: (p) => c(p),
|
|
@@ -231,8 +231,8 @@ const Gt = "flow--list--items--item--view", Kt = "flow--list--items--item--view-
|
|
|
231
231
|
},
|
|
232
232
|
/* @__PURE__ */ n.createElement(Z, null)
|
|
233
233
|
));
|
|
234
|
-
},
|
|
235
|
-
const { className: t, search: e } = i, a = e.render ??
|
|
234
|
+
}, de = (i) => {
|
|
235
|
+
const { className: t, search: e } = i, a = e.render ?? me;
|
|
236
236
|
return W(a, {
|
|
237
237
|
className: t,
|
|
238
238
|
value: e.value,
|
|
@@ -244,7 +244,7 @@ const Gt = "flow--list--items--item--view", Kt = "flow--list--items--item--view-
|
|
|
244
244
|
if (e.filters.length === 0 && e.visibleSorting.length === 0 && !e.search)
|
|
245
245
|
return null;
|
|
246
246
|
const a = e.filters.map((s) => /* @__PURE__ */ n.createElement(se, { key: s.property, filter: s }));
|
|
247
|
-
return /* @__PURE__ */ n.createElement("div", { className: C(t,
|
|
247
|
+
return /* @__PURE__ */ n.createElement("div", { className: C(t, w.header) }, /* @__PURE__ */ n.createElement("div", { className: w.pickerListAndSearch }, /* @__PURE__ */ n.createElement("div", { className: w.pickerList }, /* @__PURE__ */ n.createElement(ae, null), a), e.search && /* @__PURE__ */ n.createElement(de, { className: w.searchField, search: e.search })), /* @__PURE__ */ n.createElement(ue, null));
|
|
248
248
|
}, ge = "flow--list", pe = {
|
|
249
249
|
list: ge
|
|
250
250
|
};
|
|
@@ -400,7 +400,7 @@ class ye {
|
|
|
400
400
|
this.onFilterUpdateCallbacks.add(t);
|
|
401
401
|
}
|
|
402
402
|
}
|
|
403
|
-
class
|
|
403
|
+
class we {
|
|
404
404
|
constructor(t, e) {
|
|
405
405
|
r(this, "list");
|
|
406
406
|
r(this, "property");
|
|
@@ -434,7 +434,7 @@ class Ee {
|
|
|
434
434
|
return `${this.getTableColumn().id}:${this.direction}`;
|
|
435
435
|
}
|
|
436
436
|
}
|
|
437
|
-
const
|
|
437
|
+
const Ee = (i) => T(At(i));
|
|
438
438
|
class P {
|
|
439
439
|
constructor(t, e = {}) {
|
|
440
440
|
r(this, "list");
|
|
@@ -446,7 +446,7 @@ class P {
|
|
|
446
446
|
return;
|
|
447
447
|
const a = typeof t == "function" ? t(e) : t;
|
|
448
448
|
kt(() => {
|
|
449
|
-
this.tableState.value =
|
|
449
|
+
this.finalizeTableState(a), this.tableState.value = a;
|
|
450
450
|
});
|
|
451
451
|
});
|
|
452
452
|
this.list = t, this.tableState = Ut(() => ({ value: void 0 })), this.table = this.useReactTable(e);
|
|
@@ -469,8 +469,8 @@ class P {
|
|
|
469
469
|
getCoreRowModel: Dt(),
|
|
470
470
|
getSortedRowModel: Nt(),
|
|
471
471
|
getFilteredRowModel: Rt(),
|
|
472
|
-
getPaginationRowModel:
|
|
473
|
-
getFacetedUniqueValues:
|
|
472
|
+
getPaginationRowModel: zt(),
|
|
473
|
+
getFacetedUniqueValues: Mt(),
|
|
474
474
|
onStateChange: this.onTableStateChange,
|
|
475
475
|
globalFilterFn: "auto",
|
|
476
476
|
...t
|
|
@@ -478,7 +478,7 @@ class P {
|
|
|
478
478
|
return this.useUpdateTableState(s), s;
|
|
479
479
|
}
|
|
480
480
|
useUpdateTableState(t) {
|
|
481
|
-
|
|
481
|
+
Ee(() => {
|
|
482
482
|
const e = this.tableState.value;
|
|
483
483
|
e ? t.setOptions((a) => ({
|
|
484
484
|
...a,
|
|
@@ -486,14 +486,11 @@ class P {
|
|
|
486
486
|
})) : this.tableState.value = t.getState();
|
|
487
487
|
});
|
|
488
488
|
}
|
|
489
|
-
|
|
490
|
-
const
|
|
491
|
-
(
|
|
492
|
-
).map((
|
|
493
|
-
|
|
494
|
-
...e,
|
|
495
|
-
sorting: [...a, ...e.sorting]
|
|
496
|
-
};
|
|
489
|
+
finalizeTableState(t) {
|
|
490
|
+
const e = this.list.sorting.filter(
|
|
491
|
+
(a) => a.defaultEnabled === "hidden" && !t.sorting.some((s) => s.id === a.property)
|
|
492
|
+
).map((a) => a.getReactTableColumnSort());
|
|
493
|
+
t.sorting.unshift(...e);
|
|
497
494
|
}
|
|
498
495
|
get searchString() {
|
|
499
496
|
var t;
|
|
@@ -579,7 +576,7 @@ class N {
|
|
|
579
576
|
const { source: a } = e;
|
|
580
577
|
this.dataSource = a ?? { staticData: Ce };
|
|
581
578
|
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;
|
|
582
|
-
this.list = t, this.loaderState = D.useNew(), this.manualPagination = s ?? !1, this.manualFiltering = o ?? this.manualPagination, this.manualSorting = l ?? this.manualPagination, this.list.filters.forEach((
|
|
579
|
+
this.list = t, this.loaderState = D.useNew(), this.manualPagination = s ?? !1, this.manualFiltering = o ?? this.manualPagination, this.manualSorting = l ?? this.manualPagination, this.list.filters.forEach((m) => m.onFilterUpdated(() => this.reset())), (c = this.list.search) == null || c.onUpdated(() => this.reset());
|
|
583
580
|
}
|
|
584
581
|
static useNew(t, e = {}) {
|
|
585
582
|
return new N(t, e);
|
|
@@ -687,7 +684,7 @@ class Fe {
|
|
|
687
684
|
this.onUpdateCallbacks.add(t);
|
|
688
685
|
}
|
|
689
686
|
}
|
|
690
|
-
const
|
|
687
|
+
const E = class E {
|
|
691
688
|
constructor(t, e = {}) {
|
|
692
689
|
r(this, "list");
|
|
693
690
|
r(this, "textValue");
|
|
@@ -699,11 +696,11 @@ const w = class w {
|
|
|
699
696
|
this.list = t, this.textValue = o, this.renderFn = c, this.href = l, this.onAction = a, this.fallback = s;
|
|
700
697
|
}
|
|
701
698
|
render(t) {
|
|
702
|
-
return (this.renderFn ??
|
|
699
|
+
return (this.renderFn ?? E.fallbackRenderItemFn)(t);
|
|
703
700
|
}
|
|
704
701
|
};
|
|
705
|
-
r(
|
|
706
|
-
let k =
|
|
702
|
+
r(E, "fallbackRenderItemFn", (t) => W("pre", void 0, JSON.stringify(t)));
|
|
703
|
+
let k = E, Le = class it {
|
|
707
704
|
constructor(t) {
|
|
708
705
|
r(this, "filters");
|
|
709
706
|
r(this, "itemView");
|
|
@@ -721,7 +718,7 @@ let k = w, Le = class it {
|
|
|
721
718
|
batchesController: o,
|
|
722
719
|
hasAction: l
|
|
723
720
|
} = t;
|
|
724
|
-
this.items = new be(this), this.filters = a.map((c) => new ye(this, c)), this.sorting = s.map((c) => new
|
|
721
|
+
this.items = new be(this), this.filters = a.map((c) => new ye(this, c)), this.sorting = s.map((c) => new we(this, c)), this.search = t.search ? new Fe(this, t.search) : void 0, this.itemView = new k(this, e), this.batches = new Se(this, o), this.loader = N.useNew(this, t.loader), this.reactTable = P.useNew(this, {
|
|
725
722
|
manualFiltering: this.loader.manualFiltering,
|
|
726
723
|
manualPagination: this.loader.manualPagination,
|
|
727
724
|
manualSorting: this.loader.manualSorting
|
|
@@ -758,14 +755,14 @@ const Te = "flow--list--items", Ie = "flow--list--items--is-loading", J = {
|
|
|
758
755
|
item: Ae,
|
|
759
756
|
hasAction: ke
|
|
760
757
|
}, Ve = (i) => {
|
|
761
|
-
const { data: t, children: e } = i, a = h(), s = a.itemView, o = s.onAction, l = s.textValue ? s.textValue(t) : void 0, c = o ? () => o(t) : void 0,
|
|
758
|
+
const { data: t, children: e } = i, a = h(), s = a.itemView, o = s.onAction, l = s.textValue ? s.textValue(t) : void 0, c = o ? () => o(t) : void 0, m = s.href ? s.href(t) : void 0, u = a.hasAction || !!c || !!m, v = C(V.item, u && V.hasAction);
|
|
762
759
|
return /* @__PURE__ */ n.createElement(
|
|
763
760
|
B.GridListItem,
|
|
764
761
|
{
|
|
765
762
|
className: v,
|
|
766
763
|
onAction: c,
|
|
767
764
|
textValue: l,
|
|
768
|
-
href:
|
|
765
|
+
href: m
|
|
769
766
|
},
|
|
770
767
|
e ?? s.render(t)
|
|
771
768
|
);
|
|
@@ -776,23 +773,23 @@ const Te = "flow--list--items", Ie = "flow--list--items--is-loading", J = {
|
|
|
776
773
|
const t = h().itemView.fallback ?? /* @__PURE__ */ n.createElement(Pe, null);
|
|
777
774
|
return Array.from(Array(5)).map((e, a) => /* @__PURE__ */ n.createElement(xe, { key: a }, bt(t)));
|
|
778
775
|
}, Ne = (i) => {
|
|
779
|
-
const { className: t, ...e } = i, a = h(), s = a.loader.useIsLoading(), o = a.loader.useIsInitiallyLoading(), l = a.useIsEmpty(), c = a.items.entries.map((u) => /* @__PURE__ */ n.createElement(Ve, { key: u.id, data: u.data })),
|
|
776
|
+
const { className: t, ...e } = i, a = h(), s = a.loader.useIsLoading(), o = a.loader.useIsInitiallyLoading(), l = a.useIsEmpty(), c = a.items.entries.map((u) => /* @__PURE__ */ n.createElement(Ve, { key: u.id, data: u.data })), m = C(
|
|
780
777
|
J.items,
|
|
781
778
|
t,
|
|
782
779
|
s && J.isLoading
|
|
783
780
|
);
|
|
784
|
-
return l ? /* @__PURE__ */ n.createElement(Be, null) : /* @__PURE__ */ n.createElement("div", { "aria-hidden": o, "aria-busy": s }, /* @__PURE__ */ n.createElement(B.GridList, { className:
|
|
785
|
-
}, nt = (i) => null, Re = () => nt, rt = (i) => null,
|
|
781
|
+
return l ? /* @__PURE__ */ n.createElement(Be, null) : /* @__PURE__ */ n.createElement("div", { "aria-hidden": o, "aria-busy": s }, /* @__PURE__ */ n.createElement(B.GridList, { className: m, ...e }, o ? /* @__PURE__ */ n.createElement(De, null) : c));
|
|
782
|
+
}, nt = (i) => null, Re = () => nt, rt = (i) => null, ze = () => rt, ot = (i) => null, Me = () => ot, lt = (i) => null, Ue = () => lt, ct = (i) => null, $e = () => ct, Oe = "flow--list--footer", He = {
|
|
786
783
|
footer: Oe
|
|
787
784
|
}, qe = (i) => {
|
|
788
785
|
const t = b(g), e = h(), a = e.batches, s = e.loader.useIsInitiallyLoading(), o = e.useIsEmpty(), l = a.getTotalItemsCount(), c = a.getVisibleItemsCount();
|
|
789
786
|
if (o)
|
|
790
787
|
return null;
|
|
791
|
-
const
|
|
788
|
+
const m = s ? /* @__PURE__ */ n.createElement(I, { width: "200px" }) : t.format("list.paginationInfo", {
|
|
792
789
|
visibleItemsCount: c,
|
|
793
790
|
totalItemsCount: l
|
|
794
791
|
});
|
|
795
|
-
return /* @__PURE__ */ n.createElement(S, { ...i },
|
|
792
|
+
return /* @__PURE__ */ n.createElement(S, { ...i }, m);
|
|
796
793
|
}, Ge = (i) => {
|
|
797
794
|
const t = b(g), e = h(), a = e.loader.useIsLoading(), s = e.loader.useIsInitiallyLoading();
|
|
798
795
|
return !e.batches.hasNextBatch() && !a ? null : /* @__PURE__ */ n.createElement(
|
|
@@ -812,14 +809,14 @@ function ut(i) {
|
|
|
812
809
|
return null;
|
|
813
810
|
}
|
|
814
811
|
const je = () => ut, Je = Lt("List", (i) => {
|
|
815
|
-
var p, R,
|
|
812
|
+
var p, R, z, M, U;
|
|
816
813
|
const { children: t, batchSize: e, ...a } = i, s = (p = y(
|
|
817
814
|
t,
|
|
818
815
|
nt
|
|
819
816
|
)) == null ? void 0 : p.props, o = (R = y(
|
|
820
817
|
t,
|
|
821
818
|
Ht
|
|
822
|
-
)) == null ? void 0 : R.props, l = (
|
|
819
|
+
)) == null ? void 0 : R.props, l = (z = y(t, ct)) == null ? void 0 : z.props, c = {
|
|
823
820
|
source: s ? {
|
|
824
821
|
...s,
|
|
825
822
|
asyncLoader: s.children
|
|
@@ -829,14 +826,14 @@ const je = () => ut, Je = Lt("List", (i) => {
|
|
|
829
826
|
} : l ? {
|
|
830
827
|
staticData: l.data
|
|
831
828
|
} : void 0
|
|
832
|
-
},
|
|
829
|
+
}, m = (M = y(t, ut)) == null ? void 0 : M.props, u = (U = y(t, lt)) == null ? void 0 : U.props, v = Le.useNew({
|
|
833
830
|
loader: c,
|
|
834
831
|
filters: K(t, rt).map(
|
|
835
832
|
(F) => F.props
|
|
836
833
|
),
|
|
837
|
-
search:
|
|
838
|
-
render:
|
|
839
|
-
textFieldProps:
|
|
834
|
+
search: m ? {
|
|
835
|
+
render: m.children,
|
|
836
|
+
textFieldProps: m
|
|
840
837
|
} : void 0,
|
|
841
838
|
sorting: K(t, ot).map((F) => F.props),
|
|
842
839
|
itemView: u ? {
|
|
@@ -860,9 +857,9 @@ const je = () => ut, Je = Lt("List", (i) => {
|
|
|
860
857
|
);
|
|
861
858
|
}), Ba = () => ({
|
|
862
859
|
List: Je,
|
|
863
|
-
Filter:
|
|
860
|
+
Filter: ze(),
|
|
864
861
|
Search: je(),
|
|
865
|
-
Sorting:
|
|
862
|
+
Sorting: Me(),
|
|
866
863
|
Item: Ue(),
|
|
867
864
|
ItemView: et,
|
|
868
865
|
StaticData: $e(),
|
|
@@ -877,10 +874,10 @@ export {
|
|
|
877
874
|
nt as ListLoaderAsync,
|
|
878
875
|
ot as ListSorting,
|
|
879
876
|
ct as ListStaticData,
|
|
880
|
-
|
|
877
|
+
ze as TypedListFilter,
|
|
881
878
|
Ue as TypedListItem,
|
|
882
879
|
Re as TypedListLoaderAsync,
|
|
883
|
-
|
|
880
|
+
Me as TypedListSorting,
|
|
884
881
|
$e as TypedListStaticData,
|
|
885
882
|
Ba as typedList
|
|
886
883
|
};
|
|
@@ -12,7 +12,7 @@ export declare class ReactTable<T> {
|
|
|
12
12
|
private useReactTable;
|
|
13
13
|
private useUpdateTableState;
|
|
14
14
|
private onTableStateChange;
|
|
15
|
-
private
|
|
15
|
+
private finalizeTableState;
|
|
16
16
|
get searchString(): SearchValue;
|
|
17
17
|
getTableColumn(property: PropertyName<T>): Column<T>;
|
|
18
18
|
private getTableColumnDefs;
|
|
@@ -263,7 +263,7 @@ export declare const typedList: <T>() => {
|
|
|
263
263
|
children?: import('react').ReactNode | undefined;
|
|
264
264
|
} & import('../../lib/types/props').PropsWithClassName & import('../../lib/types/props').PropsWithContainerBreakpointSize) => import("react").JSX.Element;
|
|
265
265
|
StaticData: import('react').ComponentType<{
|
|
266
|
-
data: T[];
|
|
266
|
+
data: T[] | readonly T[];
|
|
267
267
|
}>;
|
|
268
268
|
LoaderAsync: import('react').ComponentType<Omit<import('./model/loading/types').AsyncDataLoaderShape<T>, "asyncLoader"> & {
|
|
269
269
|
children: import('./model/loading/types').AsyncDataLoader<T>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mittwald/flow-react-components",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.183",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A React implementation of Flow, mittwald’s design system",
|
|
6
6
|
"homepage": "https://mittwald.github.io/flow",
|
|
@@ -280,7 +280,7 @@
|
|
|
280
280
|
"dependencies": {
|
|
281
281
|
"@chakra-ui/live-region": "^2.1.0",
|
|
282
282
|
"@internationalized/string-compiler": "^3.2.4",
|
|
283
|
-
"@mittwald/react-tunnel": "^0.1.0-alpha.
|
|
283
|
+
"@mittwald/react-tunnel": "^0.1.0-alpha.183",
|
|
284
284
|
"@mittwald/react-use-promise": "^2.3.13",
|
|
285
285
|
"@react-aria/utils": "^3.24.1",
|
|
286
286
|
"@react-types/shared": "^3.23.1",
|
|
@@ -307,7 +307,7 @@
|
|
|
307
307
|
},
|
|
308
308
|
"devDependencies": {
|
|
309
309
|
"@faker-js/faker": "^8.4.1",
|
|
310
|
-
"@mittwald/flow-design-tokens": "^0.1.0-alpha.
|
|
310
|
+
"@mittwald/flow-design-tokens": "^0.1.0-alpha.183",
|
|
311
311
|
"@mittwald/react-use-promise": "^2.3.13",
|
|
312
312
|
"@nx/storybook": "^19.5.0",
|
|
313
313
|
"@storybook/addon-a11y": "^8.2.4",
|
|
@@ -384,5 +384,5 @@
|
|
|
384
384
|
"optional": true
|
|
385
385
|
}
|
|
386
386
|
},
|
|
387
|
-
"gitHead": "
|
|
387
|
+
"gitHead": "3cb9e8febea284d02970e087f9fb468c99b49455"
|
|
388
388
|
}
|