@mittwald/flow-react-components 0.1.0-alpha.206 → 0.1.0-alpha.207
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 +16 -16
- package/package.json +4 -4
package/dist/List.js
CHANGED
|
@@ -24,9 +24,9 @@ import { R as kt } from "./Render-BdlTa7Qb.js";
|
|
|
24
24
|
import { T as f } from "./Text-Sd5q3Yme.js";
|
|
25
25
|
import { I as Z } from "./IconChevronDown--OxZLX8L.js";
|
|
26
26
|
import { I as At } from "./IconClose-BFwPT_IX.js";
|
|
27
|
-
import { makeObservable as
|
|
27
|
+
import { makeObservable as Vt, observable as $, computed as O, action as L } from "mobx";
|
|
28
28
|
import "./context-BB3_MApL.js";
|
|
29
|
-
import { u as
|
|
29
|
+
import { u as Bt } from "./useOnChange-C1Quwyuz.js";
|
|
30
30
|
import { S as Pt } from "./SearchField-DstUFmq4.js";
|
|
31
31
|
import { getProperty as xt } from "dot-prop";
|
|
32
32
|
import { hash as Dt } from "object-code";
|
|
@@ -34,7 +34,7 @@ import { useReactTable as Nt, getCoreRowModel as Rt, getSortedRowModel as Mt, ge
|
|
|
34
34
|
import tt from "invariant";
|
|
35
35
|
import { getAsyncResource as q } from "@mittwald/react-use-promise";
|
|
36
36
|
import { u as H } from "./useSelector-DpU7_HMO.js";
|
|
37
|
-
import * as
|
|
37
|
+
import * as V from "react-aria-components";
|
|
38
38
|
import { I as Ot } from "./IllustratedMessage-B3MHD01M.js";
|
|
39
39
|
import { I as qt } from "./IconSearch-C7VQTAqK.js";
|
|
40
40
|
import { H as et } from "./Heading-BEC6iPfF.js";
|
|
@@ -211,7 +211,7 @@ const jt = "flow--list--items--item--view", Wt = "flow--list--items--item--view-
|
|
|
211
211
|
));
|
|
212
212
|
}, me = (i) => {
|
|
213
213
|
const { className: t, onChange: e, value: s, ...a } = i, [o, l] = Y(s ?? "");
|
|
214
|
-
|
|
214
|
+
Bt(s, () => {
|
|
215
215
|
l(s ?? "");
|
|
216
216
|
}, [o]);
|
|
217
217
|
const u = () => {
|
|
@@ -398,7 +398,7 @@ class Ce {
|
|
|
398
398
|
}
|
|
399
399
|
deleteUnknownFilterValues() {
|
|
400
400
|
if (this.values !== this.valuesFromTableState)
|
|
401
|
-
for (const t of this.
|
|
401
|
+
for (const t of this.getArrayValue())
|
|
402
402
|
this.checkIfValueIsUnknown(t) && this.deactivateValue(t);
|
|
403
403
|
}
|
|
404
404
|
get values() {
|
|
@@ -469,7 +469,7 @@ class Le {
|
|
|
469
469
|
return `${this.getTableColumn().id}:${this.direction}`;
|
|
470
470
|
}
|
|
471
471
|
}
|
|
472
|
-
class
|
|
472
|
+
class B {
|
|
473
473
|
constructor(t, e, s = {}) {
|
|
474
474
|
n(this, "list");
|
|
475
475
|
n(this, "table");
|
|
@@ -484,7 +484,7 @@ class V {
|
|
|
484
484
|
this.sortingState = o, this.updateSortingState = l, this.table = this.useReactTable(e, s);
|
|
485
485
|
}
|
|
486
486
|
static useNew(t, e, s = {}) {
|
|
487
|
-
return new
|
|
487
|
+
return new B(t, e, s);
|
|
488
488
|
}
|
|
489
489
|
useReactTable(t, e = {}) {
|
|
490
490
|
const s = this.list.loader.useData(), a = Nt({
|
|
@@ -551,7 +551,7 @@ class P {
|
|
|
551
551
|
n(this, "dataBatches", []);
|
|
552
552
|
n(this, "prevDataBatches", []);
|
|
553
553
|
n(this, "batchLoadingStates", ["void"]);
|
|
554
|
-
|
|
554
|
+
Vt(this, {
|
|
555
555
|
prevDataBatches: !1,
|
|
556
556
|
useMergedData: !1,
|
|
557
557
|
useIsLoading: !1,
|
|
@@ -751,7 +751,7 @@ let I = F, ke = class rt {
|
|
|
751
751
|
hasAction: l,
|
|
752
752
|
onChange: u
|
|
753
753
|
} = t;
|
|
754
|
-
this.items = new ve(this), this.filters = s.map((c) => new Ce(this, c)), this.sorting = a.map((c) => new Le(this, c)), this.search = t.search ? new Ie(this, t.search) : void 0, this.itemView = new I(this, e), this.batches = new ye(this, o), this.loader = x.useNew(this, t.loader), this.reactTable =
|
|
754
|
+
this.items = new ve(this), this.filters = s.map((c) => new Ce(this, c)), this.sorting = a.map((c) => new Le(this, c)), this.search = t.search ? new Ie(this, t.search) : void 0, this.itemView = new I(this, e), this.batches = new ye(this, o), this.loader = x.useNew(this, t.loader), this.reactTable = B.useNew(this, u, {
|
|
755
755
|
manualFiltering: this.loader.manualFiltering,
|
|
756
756
|
manualPagination: this.loader.manualPagination,
|
|
757
757
|
manualSorting: this.loader.manualSorting
|
|
@@ -783,16 +783,16 @@ let I = F, ke = class rt {
|
|
|
783
783
|
return !this.loader.useIsLoading() && this.items.entries.length === 0;
|
|
784
784
|
}
|
|
785
785
|
};
|
|
786
|
-
const Ae = "flow--list--items",
|
|
786
|
+
const Ae = "flow--list--items", Ve = "flow--list--items--is-loading", _ = {
|
|
787
787
|
items: Ae,
|
|
788
|
-
isLoading:
|
|
789
|
-
},
|
|
790
|
-
item:
|
|
788
|
+
isLoading: Ve
|
|
789
|
+
}, Be = "flow--list--items--item", Pe = "flow--list--items--item--has-action", k = {
|
|
790
|
+
item: Be,
|
|
791
791
|
hasAction: Pe
|
|
792
792
|
}, xe = (i) => {
|
|
793
793
|
const { data: t, children: e } = i, s = m(), a = s.itemView, o = a.onAction, l = a.textValue ? a.textValue(t) : void 0, u = o ? () => o(t) : void 0, c = a.href ? a.href(t) : void 0, h = s.hasAction || !!u || !!c, b = C(k.item, h && k.hasAction);
|
|
794
794
|
return /* @__PURE__ */ r.createElement(
|
|
795
|
-
|
|
795
|
+
V.GridListItem,
|
|
796
796
|
{
|
|
797
797
|
className: b,
|
|
798
798
|
onAction: u,
|
|
@@ -801,7 +801,7 @@ const Ae = "flow--list--items", Be = "flow--list--items--is-loading", _ = {
|
|
|
801
801
|
},
|
|
802
802
|
e ?? a.render(t)
|
|
803
803
|
);
|
|
804
|
-
}, De = (i) => /* @__PURE__ */ r.createElement(
|
|
804
|
+
}, De = (i) => /* @__PURE__ */ r.createElement(V.GridListItem, { textValue: "-", className: k.item }, i.children), Ne = () => {
|
|
805
805
|
const i = v(g);
|
|
806
806
|
return /* @__PURE__ */ r.createElement(Ot, null, /* @__PURE__ */ r.createElement(qt, null), /* @__PURE__ */ r.createElement(et, null, i.format("list.noResult.heading")), /* @__PURE__ */ r.createElement(f, null, i.format("list.noResult.text")));
|
|
807
807
|
}, Re = () => /* @__PURE__ */ r.createElement(st, null, /* @__PURE__ */ r.createElement(et, null, /* @__PURE__ */ r.createElement(K, { width: "200px" })), /* @__PURE__ */ r.createElement(f, null, /* @__PURE__ */ r.createElement(K, { width: "300px" }))), Me = () => {
|
|
@@ -813,7 +813,7 @@ const Ae = "flow--list--items", Be = "flow--list--items--is-loading", _ = {
|
|
|
813
813
|
t,
|
|
814
814
|
a && _.isLoading
|
|
815
815
|
);
|
|
816
|
-
return l ? /* @__PURE__ */ r.createElement(Ne, null) : /* @__PURE__ */ r.createElement("div", { "aria-hidden": o, "aria-busy": a }, /* @__PURE__ */ r.createElement(
|
|
816
|
+
return l ? /* @__PURE__ */ r.createElement(Ne, null) : /* @__PURE__ */ r.createElement("div", { "aria-hidden": o, "aria-busy": a }, /* @__PURE__ */ r.createElement(V.GridList, { className: c, ...e }, o ? /* @__PURE__ */ r.createElement(Me, null) : u));
|
|
817
817
|
}, nt = (i) => null, Ue = () => nt, ot = (i) => null, $e = () => ot, lt = (i) => null, Oe = () => lt, ct = (i) => null, qe = () => ct, ut = (i) => null, He = () => ut, Ke = "flow--list--footer", Ge = {
|
|
818
818
|
footer: Ke
|
|
819
819
|
}, je = (i) => {
|
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.207",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A React implementation of Flow, mittwald’s design system",
|
|
6
6
|
"homepage": "https://mittwald.github.io/flow",
|
|
@@ -292,7 +292,7 @@
|
|
|
292
292
|
"dependencies": {
|
|
293
293
|
"@chakra-ui/live-region": "^2.1.0",
|
|
294
294
|
"@internationalized/string-compiler": "^3.2.4",
|
|
295
|
-
"@mittwald/react-tunnel": "^0.1.0-alpha.
|
|
295
|
+
"@mittwald/react-tunnel": "^0.1.0-alpha.207",
|
|
296
296
|
"@mittwald/react-use-promise": "^2.3.13",
|
|
297
297
|
"@react-aria/utils": "^3.25.1",
|
|
298
298
|
"@react-types/shared": "^3.24.1",
|
|
@@ -318,7 +318,7 @@
|
|
|
318
318
|
},
|
|
319
319
|
"devDependencies": {
|
|
320
320
|
"@faker-js/faker": "^8.4.1",
|
|
321
|
-
"@mittwald/flow-design-tokens": "^0.1.0-alpha.
|
|
321
|
+
"@mittwald/flow-design-tokens": "^0.1.0-alpha.207",
|
|
322
322
|
"@mittwald/react-use-promise": "^2.3.13",
|
|
323
323
|
"@nx/storybook": "^19.5.6",
|
|
324
324
|
"@storybook/addon-a11y": "^8.2.7",
|
|
@@ -396,5 +396,5 @@
|
|
|
396
396
|
"optional": true
|
|
397
397
|
}
|
|
398
398
|
},
|
|
399
|
-
"gitHead": "
|
|
399
|
+
"gitHead": "9a013d07dc863c485ab5bad240b8bc56e15c35c3"
|
|
400
400
|
}
|