@mittwald/flow-react-components 0.1.0-alpha.304 → 0.1.0-alpha.305
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/CHANGELOG.md +12 -0
- package/dist/js/List.js +54 -54
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,18 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See
|
|
4
4
|
[Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [0.1.0-alpha.305](https://github.com/mittwald/flow/compare/0.1.0-alpha.304...0.1.0-alpha.305) (2024-10-28)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
- **List:** hide summary in empty list
|
|
11
|
+
([77f5a54](https://github.com/mittwald/flow/commit/77f5a540cdd77a8b8e93fd14b954b80c2e1be72a))
|
|
12
|
+
|
|
13
|
+
# Change Log
|
|
14
|
+
|
|
15
|
+
All notable changes to this project will be documented in this file. See
|
|
16
|
+
[Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
17
|
+
|
|
6
18
|
# [0.1.0-alpha.304](https://github.com/mittwald/flow/compare/0.1.0-alpha.303...0.1.0-alpha.304) (2024-10-28)
|
|
7
19
|
|
|
8
20
|
### Bug Fixes
|
package/dist/js/List.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var Je = Object.defineProperty;
|
|
4
4
|
var Ye = (a, e, t) => e in a ? Je(a, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : a[e] = t;
|
|
5
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
|
|
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";
|
|
7
7
|
import "./propsContext-DzAKlmhS.js";
|
|
8
8
|
import { P as ve } from "./PropsContextProvider-C6Z4XGp6.js";
|
|
9
9
|
import "@react-aria/utils";
|
|
@@ -13,10 +13,10 @@ import { B as y } from "./Button-Da1fC2tj.js";
|
|
|
13
13
|
import { IconArrowBackUp as rt } from "@tabler/icons-react";
|
|
14
14
|
import { I as ue } from "./Icon-COqUQ8Af.js";
|
|
15
15
|
import { I as lt } from "./IconContextMenu-CzXLrZcd.js";
|
|
16
|
-
import { a as
|
|
16
|
+
import { a as $, C as Y } from "./ContextMenuTrigger-C0auvmeM.js";
|
|
17
17
|
import { M as _ } from "./MenuItem-CWcJNHm3.js";
|
|
18
18
|
import { useLocalizedStringFormatter as w } from "react-aria";
|
|
19
|
-
import { TunnelProvider as ye, TunnelExit as
|
|
19
|
+
import { TunnelProvider as ye, TunnelExit as x } from "@mittwald/react-tunnel";
|
|
20
20
|
import T from "clsx";
|
|
21
21
|
import { g as ot } from "./getContainerBreakpointSizeClassName-BrcFDcCY.js";
|
|
22
22
|
import { f as we } from "./flowComponent-uZXy7sF4.js";
|
|
@@ -34,17 +34,17 @@ import { H as Q } from "./Heading-CB3ASpaU.js";
|
|
|
34
34
|
import { S as yt } from "./Section-DszRJOuI.js";
|
|
35
35
|
import { getProperty as wt } from "dot-prop";
|
|
36
36
|
import { hash as Ee } from "object-code";
|
|
37
|
-
import
|
|
37
|
+
import k from "zod";
|
|
38
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
39
|
import Fe from "invariant";
|
|
40
40
|
import { getAsyncResource as ge } from "@mittwald/react-use-promise";
|
|
41
41
|
import { u as pe } from "./useSelector-DpU7_HMO.js";
|
|
42
42
|
import { u as Pt } from "./SettingsProvider-D9oDS5r9.js";
|
|
43
43
|
import * as X from "react-aria-components";
|
|
44
|
-
import { S as
|
|
44
|
+
import { S as N } from "./SkeletonText-B5ZghZhO.js";
|
|
45
45
|
import { I as Vt } from "./IllustratedMessage-CeYE8bxs.js";
|
|
46
46
|
import { I as kt } from "./IconSearch-Bufq0n5e.js";
|
|
47
|
-
import { d as S, a as
|
|
47
|
+
import { d as S, a as V } from "./deepFindOfType-6pG0fH7S.js";
|
|
48
48
|
import { ListLoaderAsyncResource as At, TypedListLoaderAsyncResource as Mt } from "./List/ListLoaderAsyncResource.js";
|
|
49
49
|
import { S as Bt } from "./Skeleton-CKLaTmDR.js";
|
|
50
50
|
import { a as Te, e as Ce, d as Ie, b as Le, T as Pe, c as Ve } from "./Table-BdpXhsOd.js";
|
|
@@ -93,7 +93,7 @@ const xt = "flow--list--items--item--view", Nt = "flow--list--items--item--view-
|
|
|
93
93
|
"list.sorting": "Sorting"
|
|
94
94
|
} }, Ht = (a) => {
|
|
95
95
|
const { className: e, children: t } = a, s = w(b);
|
|
96
|
-
return /* @__PURE__ */ i.createElement(
|
|
96
|
+
return /* @__PURE__ */ i.createElement($, null, /* @__PURE__ */ i.createElement(
|
|
97
97
|
y,
|
|
98
98
|
{
|
|
99
99
|
variant: "plain",
|
|
@@ -140,7 +140,7 @@ const xt = "flow--list--items--item--view", Nt = "flow--list--items--item--view-
|
|
|
140
140
|
t,
|
|
141
141
|
m[ot(s)]
|
|
142
142
|
);
|
|
143
|
-
return /* @__PURE__ */ i.createElement("div", { className: l }, /* @__PURE__ */ i.createElement(ve, { props: n }, /* @__PURE__ */ i.createElement(ye, null, e, /* @__PURE__ */ i.createElement("div", { className: m.title }, /* @__PURE__ */ i.createElement(
|
|
143
|
+
return /* @__PURE__ */ i.createElement("div", { className: l }, /* @__PURE__ */ i.createElement(ve, { props: n }, /* @__PURE__ */ i.createElement(ye, null, e, /* @__PURE__ */ i.createElement("div", { className: m.title }, /* @__PURE__ */ i.createElement(x, { id: "title" })), /* @__PURE__ */ i.createElement(x, { id: "topContent" }))));
|
|
144
144
|
}, Gt = "flow--list--list-summary", jt = {
|
|
145
145
|
listSummary: Gt
|
|
146
146
|
}, _i = we("ListSummary", (a) => {
|
|
@@ -151,15 +151,15 @@ const xt = "flow--list--items--item--view", Nt = "flow--list--items--item--view-
|
|
|
151
151
|
})), Jt = (a) => {
|
|
152
152
|
const { sorting: e } = a;
|
|
153
153
|
return /* @__PURE__ */ i.createElement(_, { id: e.id }, e.name);
|
|
154
|
-
},
|
|
154
|
+
}, A = (a) => {
|
|
155
155
|
const { children: e, locales: t, variables: s } = a;
|
|
156
156
|
return w(t).format(e, s);
|
|
157
157
|
}, Yt = () => {
|
|
158
158
|
const a = g(), e = a.visibleSorting.map((n) => /* @__PURE__ */ i.createElement(Jt, { sorting: n, key: n.id }));
|
|
159
159
|
if (e.length === 0)
|
|
160
160
|
return null;
|
|
161
|
-
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(
|
|
162
|
-
return /* @__PURE__ */ i.createElement(
|
|
161
|
+
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: b }, "list.sorting"));
|
|
162
|
+
return /* @__PURE__ */ i.createElement($, null, /* @__PURE__ */ i.createElement(y, { variant: "outline", color: "secondary" }, s, /* @__PURE__ */ i.createElement(dt, null)), /* @__PURE__ */ i.createElement(
|
|
163
163
|
Y,
|
|
164
164
|
{
|
|
165
165
|
selectionMode: "single",
|
|
@@ -182,7 +182,7 @@ const xt = "flow--list--items--item--view", Nt = "flow--list--items--item--view-
|
|
|
182
182
|
},
|
|
183
183
|
c.render()
|
|
184
184
|
)), d = t.filter((c) => c.isActive).map((c) => c.id);
|
|
185
|
-
return /* @__PURE__ */ i.createElement(
|
|
185
|
+
return /* @__PURE__ */ i.createElement($, null, /* @__PURE__ */ i.createElement(y, { variant: "outline", color: "secondary" }, /* @__PURE__ */ i.createElement(E, null, n ?? l), /* @__PURE__ */ i.createElement(ut, null)), /* @__PURE__ */ i.createElement(
|
|
186
186
|
Y,
|
|
187
187
|
{
|
|
188
188
|
selectionMode: s === "one" ? "single" : "multiple",
|
|
@@ -201,7 +201,7 @@ const xt = "flow--list--items--item--view", Nt = "flow--list--items--item--view-
|
|
|
201
201
|
activeFilters: is,
|
|
202
202
|
clearButton: as
|
|
203
203
|
}, rs = pt(() => {
|
|
204
|
-
const a = g(), e = w(b), 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, l = a.supportsSettingsStorage && n && /* @__PURE__ */ i.createElement(H, null, /* @__PURE__ */ i.createElement(q, null, /* @__PURE__ */ i.createElement(
|
|
204
|
+
const a = g(), e = w(b), 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, l = a.supportsSettingsStorage && n && /* @__PURE__ */ i.createElement(H, null, /* @__PURE__ */ i.createElement(q, null, /* @__PURE__ */ i.createElement(A, { locales: b }, "list.filters.store")), /* @__PURE__ */ i.createElement(
|
|
205
205
|
y,
|
|
206
206
|
{
|
|
207
207
|
size: "s",
|
|
@@ -211,7 +211,7 @@ const xt = "flow--list--items--item--view", Nt = "flow--list--items--item--view-
|
|
|
211
211
|
"aria-label": e.format("list.filters.store")
|
|
212
212
|
},
|
|
213
213
|
/* @__PURE__ */ i.createElement(mt, null)
|
|
214
|
-
)), o = n ? /* @__PURE__ */ i.createElement(H, null, /* @__PURE__ */ i.createElement(q, null, /* @__PURE__ */ i.createElement(
|
|
214
|
+
)), o = n ? /* @__PURE__ */ i.createElement(H, null, /* @__PURE__ */ i.createElement(q, null, /* @__PURE__ */ i.createElement(A, { locales: b }, "list.filters.reset")), /* @__PURE__ */ i.createElement(
|
|
215
215
|
y,
|
|
216
216
|
{
|
|
217
217
|
size: "s",
|
|
@@ -221,7 +221,7 @@ const xt = "flow--list--items--item--view", Nt = "flow--list--items--item--view-
|
|
|
221
221
|
"aria-label": e.format("list.filters.reset")
|
|
222
222
|
},
|
|
223
223
|
/* @__PURE__ */ i.createElement(ue, null, /* @__PURE__ */ i.createElement(rt, null))
|
|
224
|
-
)) : void 0, d = s.length > 0 ? /* @__PURE__ */ i.createElement(H, null, /* @__PURE__ */ i.createElement(q, null, /* @__PURE__ */ i.createElement(
|
|
224
|
+
)) : void 0, d = s.length > 0 ? /* @__PURE__ */ i.createElement(H, null, /* @__PURE__ */ i.createElement(q, null, /* @__PURE__ */ i.createElement(A, { locales: b }, "list.filters.clear")), /* @__PURE__ */ i.createElement(
|
|
225
225
|
y,
|
|
226
226
|
{
|
|
227
227
|
size: "s",
|
|
@@ -263,7 +263,7 @@ const xt = "flow--list--items--item--view", Nt = "flow--list--items--item--view-
|
|
|
263
263
|
});
|
|
264
264
|
}, cs = () => {
|
|
265
265
|
const a = w(b), e = g(), t = e.viewMode, s = [];
|
|
266
|
-
return e.itemView && s.push("list"), e.table && s.push("table"), s.length <= 1 ? null : /* @__PURE__ */ i.createElement(
|
|
266
|
+
return e.itemView && s.push("list"), e.table && s.push("table"), s.length <= 1 ? null : /* @__PURE__ */ i.createElement($, null, /* @__PURE__ */ i.createElement(
|
|
267
267
|
y,
|
|
268
268
|
{
|
|
269
269
|
variant: "outline",
|
|
@@ -288,7 +288,7 @@ const xt = "flow--list--items--item--view", Nt = "flow--list--items--item--view-
|
|
|
288
288
|
if (s.filters.length === 0 && s.visibleSorting.length === 0 && !s.search && !s.table && !t)
|
|
289
289
|
return null;
|
|
290
290
|
const n = s.filters.map((l) => /* @__PURE__ */ i.createElement(_t, { key: l.property, filter: l }));
|
|
291
|
-
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(cs, null), /* @__PURE__ */ i.createElement(Yt, null), n), /* @__PURE__ */ i.createElement("div", { className: F.searchAndActions }, s.search && /* @__PURE__ */ i.createElement(os, { className: F.searchField, search: s.search }), /* @__PURE__ */ i.createElement(
|
|
291
|
+
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(cs, null), /* @__PURE__ */ i.createElement(Yt, null), n), /* @__PURE__ */ i.createElement("div", { className: F.searchAndActions }, s.search && /* @__PURE__ */ i.createElement(os, { className: F.searchField, search: s.search }), /* @__PURE__ */ i.createElement(x, { id: "actions" }))), /* @__PURE__ */ i.createElement(rs, null));
|
|
292
292
|
}, us = "flow--list", ms = {
|
|
293
293
|
list: us
|
|
294
294
|
};
|
|
@@ -387,7 +387,7 @@ class fe {
|
|
|
387
387
|
}
|
|
388
388
|
}
|
|
389
389
|
const Ss = (a, e) => a === e, bs = (a) => String(a);
|
|
390
|
-
class
|
|
390
|
+
class M {
|
|
391
391
|
constructor(e, t) {
|
|
392
392
|
r(this, "_values");
|
|
393
393
|
r(this, "_valuesFromTableState");
|
|
@@ -512,7 +512,7 @@ class A {
|
|
|
512
512
|
this.onFilterUpdateCallbacks.add(e);
|
|
513
513
|
}
|
|
514
514
|
}
|
|
515
|
-
r(
|
|
515
|
+
r(M, "settingsStorageSchema", k.record(k.array(k.unknown())).optional());
|
|
516
516
|
class vs {
|
|
517
517
|
constructor(e, t) {
|
|
518
518
|
r(this, "list");
|
|
@@ -594,7 +594,7 @@ class Z {
|
|
|
594
594
|
globalFilterFn: "auto",
|
|
595
595
|
...t
|
|
596
596
|
});
|
|
597
|
-
return
|
|
597
|
+
return D(() => {
|
|
598
598
|
e && e(this.list);
|
|
599
599
|
}, [this.list, e, l]), l;
|
|
600
600
|
}
|
|
@@ -716,7 +716,7 @@ class te {
|
|
|
716
716
|
}), this.useObserveBatchData(t, e), this.useObserveBatchLoadingState(t, e);
|
|
717
717
|
}
|
|
718
718
|
useObserveBatchLoadingState(e, t) {
|
|
719
|
-
|
|
719
|
+
D(() => (this.loaderState.setBatchLoadingState(
|
|
720
720
|
t,
|
|
721
721
|
e.state.value
|
|
722
722
|
), e.state.observe((s) => {
|
|
@@ -728,7 +728,7 @@ class te {
|
|
|
728
728
|
const { data: l, itemTotalCount: o } = n;
|
|
729
729
|
this.loaderState.setDataBatch(t, l), o !== void 0 && this.list.batches.updateItemTotalCount(o);
|
|
730
730
|
};
|
|
731
|
-
|
|
731
|
+
D(() => (e.value.value.isSet && s(e.value.value.value), e.value.observe((n) => {
|
|
732
732
|
n.isSet && s(n.value);
|
|
733
733
|
})), [e, t]);
|
|
734
734
|
}
|
|
@@ -807,7 +807,7 @@ class ws {
|
|
|
807
807
|
this.onUpdateCallbacks.add(e);
|
|
808
808
|
}
|
|
809
809
|
}
|
|
810
|
-
const
|
|
810
|
+
const R = class R {
|
|
811
811
|
constructor(e, t = {}) {
|
|
812
812
|
r(this, "list");
|
|
813
813
|
r(this, "textValue");
|
|
@@ -818,11 +818,11 @@ const N = class N {
|
|
|
818
818
|
this.list = e, this.textValue = n, this.renderFn = o, this.href = l, this.fallback = s;
|
|
819
819
|
}
|
|
820
820
|
render(e) {
|
|
821
|
-
return (this.renderFn ??
|
|
821
|
+
return (this.renderFn ?? R.fallbackRenderItemFn)(e, this.list);
|
|
822
822
|
}
|
|
823
823
|
};
|
|
824
|
-
r(
|
|
825
|
-
let j =
|
|
824
|
+
r(R, "fallbackRenderItemFn", (e) => be("pre", void 0, JSON.stringify(e)));
|
|
825
|
+
let j = R, Es = class {
|
|
826
826
|
constructor(e, t = {}) {
|
|
827
827
|
r(this, "tableHeader");
|
|
828
828
|
r(this, "componentProps");
|
|
@@ -903,26 +903,26 @@ let Ps = (v = class {
|
|
|
903
903
|
loader: u,
|
|
904
904
|
search: h,
|
|
905
905
|
onAction: C,
|
|
906
|
-
getItemId:
|
|
906
|
+
getItemId: z,
|
|
907
907
|
defaultViewMode: L,
|
|
908
|
-
...
|
|
908
|
+
...U
|
|
909
909
|
} = e;
|
|
910
|
-
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 gs(this), this.filters = l.map((p) => new
|
|
910
|
+
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 gs(this), this.filters = l.map((p) => new M(this, p)), this.sorting = o.map((p) => new vs(this, p)), this.search = h ? new ws(this, h) : void 0, this.itemView = s ? new j(this, s) : void 0, this.table = n ? new Ls(this, n) : void 0, this.batches = new ps(this, d), this.componentProps = U, this.loader = te.useNew(this, u), this.onAction = C, this.getItemId = z, this.reactTable = Z.useNew(this, c, {
|
|
911
911
|
manualFiltering: this.loader.manualFiltering,
|
|
912
912
|
manualPagination: this.loader.manualPagination,
|
|
913
913
|
manualSorting: this.loader.manualSorting
|
|
914
914
|
});
|
|
915
|
-
const [
|
|
915
|
+
const [K, O] = J(
|
|
916
916
|
L ?? this.getStoredViewModeDefaultSetting() ?? "list"
|
|
917
917
|
);
|
|
918
|
-
this.viewMode =
|
|
919
|
-
|
|
918
|
+
this.viewMode = K, this.setViewMode = (p) => {
|
|
919
|
+
O(p), this.settingsStore && this.viewModeStorageKey && this.settingsStore.set(
|
|
920
920
|
"List",
|
|
921
921
|
this.viewModeStorageKey,
|
|
922
922
|
v.viewModeSettingsStorageSchema,
|
|
923
923
|
p
|
|
924
924
|
);
|
|
925
|
-
},
|
|
925
|
+
}, D(() => {
|
|
926
926
|
this.filters.forEach((p) => p.deleteUnknownFilterValues());
|
|
927
927
|
}, [this.filters]);
|
|
928
928
|
}
|
|
@@ -946,7 +946,7 @@ let Ps = (v = class {
|
|
|
946
946
|
this.settingsStore.set(
|
|
947
947
|
"List",
|
|
948
948
|
this.filterSettingsStorageKey,
|
|
949
|
-
|
|
949
|
+
M.settingsStorageSchema,
|
|
950
950
|
e
|
|
951
951
|
);
|
|
952
952
|
}
|
|
@@ -956,7 +956,7 @@ let Ps = (v = class {
|
|
|
956
956
|
return this.settingsStore.get(
|
|
957
957
|
"List",
|
|
958
958
|
this.filterSettingsStorageKey,
|
|
959
|
-
|
|
959
|
+
M.settingsStorageSchema
|
|
960
960
|
);
|
|
961
961
|
}
|
|
962
962
|
getStoredViewModeDefaultSetting() {
|
|
@@ -983,15 +983,15 @@ let Ps = (v = class {
|
|
|
983
983
|
useIsEmpty() {
|
|
984
984
|
return !this.loader.useIsLoading() && this.items.entries.length === 0;
|
|
985
985
|
}
|
|
986
|
-
}, r(v, "viewModeSettingsStorageSchema",
|
|
986
|
+
}, r(v, "viewModeSettingsStorageSchema", k.enum(["list", "table"]).optional()), v);
|
|
987
987
|
const Vs = "flow--list--items", ks = "flow--list--items--is-loading", Se = {
|
|
988
988
|
items: Vs,
|
|
989
989
|
isLoading: ks
|
|
990
|
-
}, As = "flow--list--items--item", Ms = "flow--list--items--item--is-selected", Bs = "flow--list--items--item--has-action",
|
|
990
|
+
}, As = "flow--list--items--item", Ms = "flow--list--items--item--is-selected", Bs = "flow--list--items--item--has-action", B = {
|
|
991
991
|
item: As,
|
|
992
992
|
isSelected: Ms,
|
|
993
993
|
hasAction: Bs
|
|
994
|
-
}, Be = () => /* @__PURE__ */ i.createElement(ke, null, /* @__PURE__ */ i.createElement(Q, null, /* @__PURE__ */ i.createElement(
|
|
994
|
+
}, Be = () => /* @__PURE__ */ i.createElement(ke, null, /* @__PURE__ */ i.createElement(Q, null, /* @__PURE__ */ i.createElement(N, { width: "200px" })), /* @__PURE__ */ i.createElement(E, null, /* @__PURE__ */ i.createElement(N, { width: "300px" }))), Ds = (a) => {
|
|
995
995
|
const { id: e, data: t, children: s } = a, l = g().itemView;
|
|
996
996
|
if (!l)
|
|
997
997
|
return null;
|
|
@@ -1001,9 +1001,9 @@ const Vs = "flow--list--items", ks = "flow--list--items--is-loading", Se = {
|
|
|
1001
1001
|
{
|
|
1002
1002
|
id: e,
|
|
1003
1003
|
className: (h) => T(
|
|
1004
|
-
|
|
1005
|
-
u &&
|
|
1006
|
-
h.isSelected &&
|
|
1004
|
+
B.item,
|
|
1005
|
+
u && B.hasAction,
|
|
1006
|
+
h.isSelected && B.isSelected
|
|
1007
1007
|
),
|
|
1008
1008
|
onAction: () => o && o(t),
|
|
1009
1009
|
textValue: d,
|
|
@@ -1011,7 +1011,7 @@ const Vs = "flow--list--items", ks = "flow--list--items--is-loading", Se = {
|
|
|
1011
1011
|
},
|
|
1012
1012
|
/* @__PURE__ */ i.createElement(Ze, { fallback: /* @__PURE__ */ i.createElement(Be, null) }, s ?? l.render(t))
|
|
1013
1013
|
);
|
|
1014
|
-
}, xs = (a) => /* @__PURE__ */ i.createElement(X.GridListItem, { textValue: "-", className:
|
|
1014
|
+
}, xs = (a) => /* @__PURE__ */ i.createElement(X.GridListItem, { textValue: "-", className: B.item }, a.children), W = () => {
|
|
1015
1015
|
const a = w(b);
|
|
1016
1016
|
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")));
|
|
1017
1017
|
}, Ns = () => {
|
|
@@ -1061,7 +1061,7 @@ const Vs = "flow--list--items", ks = "flow--list--items--is-loading", Se = {
|
|
|
1061
1061
|
function ze(a) {
|
|
1062
1062
|
return null;
|
|
1063
1063
|
}
|
|
1064
|
-
const Js = () => ze, Ue = (a) => null, Ke = (a) => null, Oe = (a) => null, Ys = (a) => /* @__PURE__ */ i.createElement(Te, { ...a }, /* @__PURE__ */ i.createElement(Ce, null, /* @__PURE__ */ i.createElement(Ie, null, /* @__PURE__ */ i.createElement(
|
|
1064
|
+
const Js = () => ze, Ue = (a) => null, Ke = (a) => null, Oe = (a) => null, Ys = (a) => /* @__PURE__ */ i.createElement(Te, { ...a }, /* @__PURE__ */ i.createElement(Ce, null, /* @__PURE__ */ i.createElement(Ie, null, /* @__PURE__ */ i.createElement(N, { 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(N, { width: "100%" })))))), _s = "flow--list--table", Qs = "flow--list--table--is-loading", Xs = "flow--list--table--row", Zs = "flow--list--table--is-selected", ei = "flow--list--table--has-action", I = {
|
|
1065
1065
|
table: _s,
|
|
1066
1066
|
isLoading: Qs,
|
|
1067
1067
|
row: Xs,
|
|
@@ -1133,20 +1133,20 @@ const Js = () => ze, Ue = (a) => null, Ke = (a) => null, Oe = (a) => null, Ys =
|
|
|
1133
1133
|
} : c ? {
|
|
1134
1134
|
staticData: c.data
|
|
1135
1135
|
} : void 0
|
|
1136
|
-
}, h = (ne = S(e, ze)) == null ? void 0 : ne.props, C = (re = S(e, Re)) == null ? void 0 : re.props,
|
|
1136
|
+
}, h = (ne = S(e, ze)) == null ? void 0 : ne.props, C = (re = S(e, Re)) == null ? void 0 : re.props, z = (le = S(e, He)) == null ? void 0 : le.props, L = V(e, Ue).map(
|
|
1137
1137
|
(f) => ({
|
|
1138
1138
|
...f.props,
|
|
1139
1139
|
name: f.props.children
|
|
1140
1140
|
})
|
|
1141
|
-
),
|
|
1141
|
+
), U = V(e, Oe).map(
|
|
1142
1142
|
(f) => ({
|
|
1143
1143
|
...f.props,
|
|
1144
1144
|
renderFn: f.props.children
|
|
1145
1145
|
})
|
|
1146
|
-
),
|
|
1146
|
+
), K = (oe = S(e, Ke)) == null ? void 0 : oe.props, O = (ce = S(e, qe)) == null ? void 0 : ce.props, p = (de = S(e, Ge)) == null ? void 0 : de.props, P = Ps.useNew({
|
|
1147
1147
|
onChange: s,
|
|
1148
1148
|
loader: u,
|
|
1149
|
-
filters:
|
|
1149
|
+
filters: V(e, xe).map(
|
|
1150
1150
|
(f) => ({
|
|
1151
1151
|
...f.props,
|
|
1152
1152
|
renderItem: f.props.children
|
|
@@ -1157,24 +1157,24 @@ const Js = () => ze, Ue = (a) => null, Ke = (a) => null, Oe = (a) => null, Ys =
|
|
|
1157
1157
|
textFieldProps: h,
|
|
1158
1158
|
defaultValue: h.defaultValue
|
|
1159
1159
|
} : void 0,
|
|
1160
|
-
sorting:
|
|
1160
|
+
sorting: V(e, Ne).map((f) => f.props),
|
|
1161
1161
|
itemView: C ? {
|
|
1162
1162
|
...C,
|
|
1163
1163
|
renderFn: C.children
|
|
1164
1164
|
} : void 0,
|
|
1165
1165
|
table: L.length > 0 ? {
|
|
1166
1166
|
header: {
|
|
1167
|
-
...
|
|
1167
|
+
...O,
|
|
1168
1168
|
columns: L
|
|
1169
1169
|
},
|
|
1170
1170
|
body: {
|
|
1171
1171
|
...p,
|
|
1172
1172
|
row: {
|
|
1173
|
-
...
|
|
1174
|
-
cells:
|
|
1173
|
+
...K,
|
|
1174
|
+
cells: U
|
|
1175
1175
|
}
|
|
1176
1176
|
},
|
|
1177
|
-
|
|
1177
|
+
...z
|
|
1178
1178
|
} : void 0,
|
|
1179
1179
|
batchesController: {
|
|
1180
1180
|
batchSize: t
|
|
@@ -1194,11 +1194,11 @@ const Js = () => ze, Ue = (a) => null, Ke = (a) => null, Oe = (a) => null, Ys =
|
|
|
1194
1194
|
Ae.Provider,
|
|
1195
1195
|
{
|
|
1196
1196
|
value: {
|
|
1197
|
-
list:
|
|
1197
|
+
list: P
|
|
1198
1198
|
}
|
|
1199
1199
|
},
|
|
1200
1200
|
/* @__PURE__ */ i.createElement(Wt, null),
|
|
1201
|
-
/* @__PURE__ */ i.createElement("div", { className: ms.list, ref: n }, e, /* @__PURE__ */ i.createElement(ds, { hasActionGroup: We }), /* @__PURE__ */ i.createElement("div", null, /* @__PURE__ */ i.createElement(
|
|
1201
|
+
/* @__PURE__ */ i.createElement("div", { className: ms.list, ref: n }, e, /* @__PURE__ */ i.createElement(ds, { hasActionGroup: We }), /* @__PURE__ */ i.createElement("div", null, P.items.entries.length > 0 && /* @__PURE__ */ i.createElement(x, { id: "listSummary" }), P.viewMode === "list" && /* @__PURE__ */ i.createElement(Rs, null), P.viewMode === "table" && /* @__PURE__ */ i.createElement(ti, null)), /* @__PURE__ */ i.createElement(Ws, null))
|
|
1202
1202
|
)));
|
|
1203
1203
|
}), ii = () => si, ia = () => ({
|
|
1204
1204
|
List: ii(),
|
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.305",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A React implementation of Flow, mittwald’s design system",
|
|
6
6
|
"homepage": "https://mittwald.github.io/flow",
|
|
@@ -384,7 +384,7 @@
|
|
|
384
384
|
"@chakra-ui/live-region": "^2.1.0",
|
|
385
385
|
"@internationalized/date": "^3.5.6",
|
|
386
386
|
"@internationalized/string-compiler": "^3.2.5",
|
|
387
|
-
"@mittwald/react-tunnel": "^0.1.0-alpha.
|
|
387
|
+
"@mittwald/react-tunnel": "^0.1.0-alpha.305",
|
|
388
388
|
"@mittwald/react-use-promise": "^2.5.0",
|
|
389
389
|
"@react-aria/utils": "^3.25.3",
|
|
390
390
|
"@react-types/shared": "^3.25.0",
|
|
@@ -412,7 +412,7 @@
|
|
|
412
412
|
},
|
|
413
413
|
"devDependencies": {
|
|
414
414
|
"@faker-js/faker": "^9.0.3",
|
|
415
|
-
"@mittwald/flow-design-tokens": "^0.1.0-alpha.
|
|
415
|
+
"@mittwald/flow-design-tokens": "^0.1.0-alpha.305",
|
|
416
416
|
"@mittwald/react-use-promise": "^2.5.0",
|
|
417
417
|
"@nx/storybook": "^20.0.0",
|
|
418
418
|
"@storybook/addon-a11y": "^8.3.5",
|
|
@@ -491,5 +491,5 @@
|
|
|
491
491
|
"optional": true
|
|
492
492
|
}
|
|
493
493
|
},
|
|
494
|
-
"gitHead": "
|
|
494
|
+
"gitHead": "9aa19d24ecb93c2557d948bf80233740a9bd12a8"
|
|
495
495
|
}
|