@mittwald/flow-react-components 0.1.0-alpha.303 → 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 +29 -0
- package/dist/css/Header.css +1 -1
- package/dist/css/Section.css +1 -1
- package/dist/css/Select.css +1 -1
- package/dist/js/List.js +55 -55
- package/dist/js/Section-DszRJOuI.js +55 -0
- package/dist/js/Section.js +1 -1
- package/dist/js/all.css +1 -1
- package/dist/js/types/components/Select/Select.d.ts +1 -1
- package/dist/js/types/components/Select/components/Option/Option.d.ts +1 -1
- package/dist/js/types/components/Select/stories/Default.stories.d.ts +1 -0
- package/dist/js/types/components/Select/stories/EdgeCases.stories.d.ts +2 -1
- package/package.json +4 -4
- package/dist/js/Section-BXIIRoBN.js +0 -53
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,35 @@
|
|
|
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
|
+
|
|
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)
|
|
19
|
+
|
|
20
|
+
### Bug Fixes
|
|
21
|
+
|
|
22
|
+
- **Select:** fix overflow in select field
|
|
23
|
+
([c571018](https://github.com/mittwald/flow/commit/c571018830230b2441b97af39eb0d5e42508cd13))
|
|
24
|
+
|
|
25
|
+
### Features
|
|
26
|
+
|
|
27
|
+
- **Select:** Support numbers in select field
|
|
28
|
+
([29a9d21](https://github.com/mittwald/flow/commit/29a9d21baf32f68f2ede56204521a2957797330c))
|
|
29
|
+
|
|
30
|
+
# Change Log
|
|
31
|
+
|
|
32
|
+
All notable changes to this project will be documented in this file. See
|
|
33
|
+
[Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
34
|
+
|
|
6
35
|
# [0.1.0-alpha.303](https://github.com/mittwald/flow/compare/0.1.0-alpha.302...0.1.0-alpha.303) (2024-10-28)
|
|
7
36
|
|
|
8
37
|
### Bug Fixes
|
package/dist/css/Header.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.flow--section--section-header{display:flex;gap:var(--section-header--heading-to-actions-spacing);justify-content:space-between;align-items:center;flex-wrap:wrap}.flow--section--section-header .flow--section--section-header--actions{display:flex;gap:var(--section-header--action-to-action-spacing);margin-inline-start:auto;flex-wrap:wrap}
|
|
1
|
+
.flow--section--section-header{display:flex;gap:var(--section-header--heading-to-actions-spacing);justify-content:space-between;align-items:center;flex-wrap:wrap}.flow--section--section-header .flow--section--section-header--actions{display:flex;gap:var(--section-header--action-to-action-spacing);margin-inline-start:auto;flex-wrap:wrap}.flow--section--section-header:not(:first-child){margin-top:var(--section--sub-heading-spacing)}
|
package/dist/css/Section.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.flow--section{display:flex;flex-direction:column;row-gap:var(--section--content-to-content-spacing);container-type:inline-size}.flow--section+.flow--section{margin-block-start:var(--section--section-to-section-spacing);border-block-start-width:var(--section--border-width);border-block-start-style:var(--section--border-style);border-block-start-color:var(--section--border-color);padding-block-start:var(--section--section-to-section-spacing)}.flow--section .flow--
|
|
1
|
+
.flow--section{display:flex;flex-direction:column;row-gap:var(--section--content-to-content-spacing);container-type:inline-size}.flow--section+.flow--section{margin-block-start:var(--section--section-to-section-spacing);border-block-start-width:var(--section--border-width);border-block-start-style:var(--section--border-style);border-block-start-color:var(--section--border-color);padding-block-start:var(--section--section-to-section-spacing)}.flow--section .flow--section--heading:not(:first-child){margin-top:var(--section--sub-heading-spacing)}
|
package/dist/css/Select.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.flow--select .flow--select--toggle{display:flex;justify-content:space-between;align-items:center;font-weight:400;font-size:var(--font-size--default);text-align:left;border-width:var(--form-control--border-width);border-style:var(--form-control--border-style);border-radius:var(--form-control--corner-radius);padding-block:calc(var(--form-control--padding-y) - var(--form-control--border-width));padding-inline:var(--form-control--padding-x);color:var(--form-control--content-color--default);border-color:var(--form-control--border-color--default);background-color:var(--form-control--background-color--default);transition-property:color,background-color,border-color;transition-duration:var(--transition--duration--default);order:2}.flow--select .flow--select--toggle::placeholder{color:var(--form-control--placeholder-color--default)}.flow--select .flow--select--toggle:hover{background-color:var(--form-control--background-color--hover)}.flow--select .flow--select--toggle[data-invalid]{border-color:var(--form-control--border-color--invalid);background-color:var(--form-control--background-color--invalid)}.flow--select .flow--select--toggle:focus-within{border-color:var(--form-control--border-color--focused);background-color:var(--form-control--background-color--focused)}.flow--select .flow--select--toggle:focus-visible,.flow--select .flow--select--toggle:focus{outline:none}.flow--select .flow--select--toggle[data-selected]{color:var(--form-control--content-color--selected);border-color:var(--form-control--border-color--selected);background-color:var(--form-control--background-color--selected)}.flow--select .flow--select--toggle:disabled,.flow--select .flow--select--toggle[data-disabled],[aria-disabled] .flow--select .flow--select--toggle{color:var(--form-control--content-color--disabled);border-color:var(--form-control--border-color--disabled);background-color:var(--form-control--background-color--disabled)}.flow--select .flow--select--toggle:disabled::placeholder,.flow--select .flow--select--toggle[data-disabled]::placeholder,[aria-disabled] .flow--select .flow--select--toggle::placeholder{color:var(--form-control--placeholder-color--disabled)}.flow--select[data-invalid] .flow--select--toggle{border-color:var(--form-control--border-color--invalid);background-color:var(--form-control--background-color--invalid)}.flow--select--options--popover{width:var(--trigger-width)}.flow--select--options{display:flex;flex-direction:column;row-gap:var(--menu--item-to-item-spacing);outline:none}.flow--select--option{display:flex;flex-direction:row;border:none;border-radius:var(--menu-item--corner-radius);background-color:var(--menu-item--background-color--default);padding:var(--menu-item--padding-y) var(--menu-item--padding-x);align-items:center}.flow--select--option:not(a){cursor:default}.flow--select--option{outline-color:var(--focus--outline-color);outline-offset:var(--focus--outline-offset);outline-width:var(--focus--outline-width);outline-style:none}.flow--select--option[data-focused],.flow--select--option:focus{outline-style:none}.flow--select--option[data-focus-visible],.flow--select--option:focus-visible{outline-style:auto}.flow--select--option[data-focused]:not([data-focus-visible]):focus-visible{outline-style:none}.flow--select--option{outline-offset:calc(var(--size-px--xxs) * -1)}.flow--select--option .flow--select--option--icon{order:0;color:var(--menu-item--icon-color--default)}.flow--select--option .flow--select--option--text{order:1}.flow--select--option .flow--select--option--icon+.flow--select--option--text{margin-inline-start:var(--menu-item--icon-to-text-spacing)}.flow--select--option:hover{background-color:var(--menu-item--background-color--hover)}.flow--select--option[data-focused]{outline-style:none}.flow--select--option[data-focus-visible]{outline-style:solid}.flow--select--option:not(:has(.flow--select--option--control-icon))[aria-current],.flow--select--option:not(:has(.flow--select--option--control-icon))[data-selected]{background-color:var(--menu-item--background-color--current);font-weight:var(--menu-item--font-weight--current);color:var(--menu-item--color--current)}.flow--select--option[aria-current] .flow--select--option--icon,.flow--select--option[data-selected] .flow--select--option--icon{color:var(--menu-item--icon-color--current)}.flow--select--option[aria-disabled]{background-color:var(--menu-item--disabled-background-color);color:var(--menu-item--disabled-color)}
|
|
1
|
+
.flow--select .flow--select--toggle{display:flex;justify-content:space-between;align-items:center;font-weight:400;font-size:var(--font-size--default);text-align:left;border-width:var(--form-control--border-width);border-style:var(--form-control--border-style);border-radius:var(--form-control--corner-radius);padding-block:calc(var(--form-control--padding-y) - var(--form-control--border-width));padding-inline:var(--form-control--padding-x);color:var(--form-control--content-color--default);border-color:var(--form-control--border-color--default);background-color:var(--form-control--background-color--default);transition-property:color,background-color,border-color;transition-duration:var(--transition--duration--default);order:2}.flow--select .flow--select--toggle::placeholder{color:var(--form-control--placeholder-color--default)}.flow--select .flow--select--toggle:hover{background-color:var(--form-control--background-color--hover)}.flow--select .flow--select--toggle[data-invalid]{border-color:var(--form-control--border-color--invalid);background-color:var(--form-control--background-color--invalid)}.flow--select .flow--select--toggle:focus-within{border-color:var(--form-control--border-color--focused);background-color:var(--form-control--background-color--focused)}.flow--select .flow--select--toggle:focus-visible,.flow--select .flow--select--toggle:focus{outline:none}.flow--select .flow--select--toggle[data-selected]{color:var(--form-control--content-color--selected);border-color:var(--form-control--border-color--selected);background-color:var(--form-control--background-color--selected)}.flow--select .flow--select--toggle:disabled,.flow--select .flow--select--toggle[data-disabled],[aria-disabled] .flow--select .flow--select--toggle{color:var(--form-control--content-color--disabled);border-color:var(--form-control--border-color--disabled);background-color:var(--form-control--background-color--disabled)}.flow--select .flow--select--toggle:disabled::placeholder,.flow--select .flow--select--toggle[data-disabled]::placeholder,[aria-disabled] .flow--select .flow--select--toggle::placeholder{color:var(--form-control--placeholder-color--disabled)}.flow--select[data-invalid] .flow--select--toggle{border-color:var(--form-control--border-color--invalid);background-color:var(--form-control--background-color--invalid)}.flow--select .react-aria-SelectValue{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.flow--select--options--popover{width:var(--trigger-width)}.flow--select--options{display:flex;flex-direction:column;row-gap:var(--menu--item-to-item-spacing);outline:none}.flow--select--option{display:flex;flex-direction:row;border:none;border-radius:var(--menu-item--corner-radius);background-color:var(--menu-item--background-color--default);padding:var(--menu-item--padding-y) var(--menu-item--padding-x);align-items:center}.flow--select--option:not(a){cursor:default}.flow--select--option{outline-color:var(--focus--outline-color);outline-offset:var(--focus--outline-offset);outline-width:var(--focus--outline-width);outline-style:none}.flow--select--option[data-focused],.flow--select--option:focus{outline-style:none}.flow--select--option[data-focus-visible],.flow--select--option:focus-visible{outline-style:auto}.flow--select--option[data-focused]:not([data-focus-visible]):focus-visible{outline-style:none}.flow--select--option{outline-offset:calc(var(--size-px--xxs) * -1)}.flow--select--option .flow--select--option--icon{order:0;color:var(--menu-item--icon-color--default)}.flow--select--option .flow--select--option--text{order:1}.flow--select--option .flow--select--option--icon+.flow--select--option--text{margin-inline-start:var(--menu-item--icon-to-text-spacing)}.flow--select--option:hover{background-color:var(--menu-item--background-color--hover)}.flow--select--option[data-focused]{outline-style:none}.flow--select--option[data-focus-visible]{outline-style:solid}.flow--select--option:not(:has(.flow--select--option--control-icon))[aria-current],.flow--select--option:not(:has(.flow--select--option--control-icon))[data-selected]{background-color:var(--menu-item--background-color--current);font-weight:var(--menu-item--font-weight--current);color:var(--menu-item--color--current)}.flow--select--option[aria-current] .flow--select--option--icon,.flow--select--option[data-selected] .flow--select--option--icon{color:var(--menu-item--icon-color--current)}.flow--select--option[aria-disabled]{background-color:var(--menu-item--disabled-background-color);color:var(--menu-item--disabled-color)}
|
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";
|
|
@@ -31,20 +31,20 @@ import "./context-Cf7tqFtF.js";
|
|
|
31
31
|
import { u as bt } from "./useOnChange-C1Quwyuz.js";
|
|
32
32
|
import { S as vt } from "./SearchField-D_McGKsS.js";
|
|
33
33
|
import { H as Q } from "./Heading-CB3ASpaU.js";
|
|
34
|
-
import { S as yt } from "./Section-
|
|
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(),
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
/* */
|
|
3
|
+
import e, { useId as u } from "react";
|
|
4
|
+
import x from "clsx";
|
|
5
|
+
import "./propsContext-DzAKlmhS.js";
|
|
6
|
+
import { P as a } from "./PropsContextProvider-C6Z4XGp6.js";
|
|
7
|
+
import "@react-aria/utils";
|
|
8
|
+
import "remeda";
|
|
9
|
+
import { f as c } from "./flowComponent-uZXy7sF4.js";
|
|
10
|
+
import * as s from "react-aria-components";
|
|
11
|
+
import { s as C } from "./ContextMenu.module-BZingr2B.js";
|
|
12
|
+
const g = "flow--section", h = "flow--section--heading", i = {
|
|
13
|
+
section: g,
|
|
14
|
+
heading: h
|
|
15
|
+
}, S = c(
|
|
16
|
+
"ContextMenuSection",
|
|
17
|
+
(n) => {
|
|
18
|
+
const { children: t } = n, o = {
|
|
19
|
+
Heading: {
|
|
20
|
+
level: 5,
|
|
21
|
+
wrapWith: /* @__PURE__ */ e.createElement(s.Header, null)
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
return /* @__PURE__ */ e.createElement(s.Section, { className: C.section }, /* @__PURE__ */ e.createElement(a, { props: o, mergeInParentContext: !0 }, t));
|
|
25
|
+
}
|
|
26
|
+
), M = c("Section", (n) => {
|
|
27
|
+
const {
|
|
28
|
+
children: t,
|
|
29
|
+
className: o,
|
|
30
|
+
refProp: l,
|
|
31
|
+
renderContextMenuSection: m,
|
|
32
|
+
...p
|
|
33
|
+
} = n;
|
|
34
|
+
if (!t)
|
|
35
|
+
return null;
|
|
36
|
+
if (m)
|
|
37
|
+
return /* @__PURE__ */ e.createElement(S, null, t);
|
|
38
|
+
const d = x(i.section, o), r = u(), f = {
|
|
39
|
+
Heading: {
|
|
40
|
+
level: 2,
|
|
41
|
+
id: r,
|
|
42
|
+
className: i.heading
|
|
43
|
+
},
|
|
44
|
+
Header: {
|
|
45
|
+
renderSectionHeader: !0
|
|
46
|
+
},
|
|
47
|
+
List: {
|
|
48
|
+
"aria-labelledby": r
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
return /* @__PURE__ */ e.createElement("section", { ...p, className: d, ref: l }, /* @__PURE__ */ e.createElement(a, { props: f, mergeInParentContext: !0 }, t));
|
|
52
|
+
});
|
|
53
|
+
export {
|
|
54
|
+
M as S
|
|
55
|
+
};
|