@mittwald/flow-react-components 0.1.0-alpha.384 → 0.1.0-alpha.385
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 +13 -0
- package/dist/css/List.css +1 -1
- package/dist/js/List.js +91 -92
- package/dist/js/all.css +1 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,19 @@
|
|
|
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.385](https://github.com/mittwald/flow/compare/0.1.0-alpha.384...0.1.0-alpha.385) (2024-12-18)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
- **List:** update search field size
|
|
11
|
+
([#1068](https://github.com/mittwald/flow/issues/1068))
|
|
12
|
+
([22e7008](https://github.com/mittwald/flow/commit/22e7008e0047fab8a5bda8afe8d6655fabfee2a7))
|
|
13
|
+
|
|
14
|
+
# Change Log
|
|
15
|
+
|
|
16
|
+
All notable changes to this project will be documented in this file. See
|
|
17
|
+
[Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
18
|
+
|
|
6
19
|
# [0.1.0-alpha.384](https://github.com/mittwald/flow/compare/0.1.0-alpha.383...0.1.0-alpha.384) (2024-12-18)
|
|
7
20
|
|
|
8
21
|
### Bug Fixes
|
package/dist/css/List.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@charset "UTF-8";.flow--list--items--item--view{display:flex;padding:var(--list-item--padding);gap:var(--list-item--content-to-content-spacing);align-items:start}.flow--list--items--item--view .flow--list--items--item--view--content{display:flex;flex-wrap:wrap;gap:var(--list-item--content-to-content-spacing);align-items:center;flex-grow:1}.flow--list--items--item--view .flow--list--items--item--view--title{order:0;flex-grow:1;display:grid;grid-column-gap:var(--list-item--content-to-content-spacing);grid-template-areas:"avatar title " "avatar subtitle";grid-template-columns:auto 1fr}.flow--list--items--item--view .flow--list--items--item--view--title:empty{display:none}.flow--list--items--item--view .flow--list--items--item--view--title:not(:has(.flow--list--items--item--view--avatar)){grid-template-areas:"title " "subtitle";grid-template-columns:1fr}.flow--list--items--item--view .flow--list--items--item--view--title:not(:has(.flow--list--items--item--view--sub-title)){grid-template-areas:"avatar title"}.flow--list--items--item--view .flow--list--items--item--view--title:not(:has(.flow--list--items--item--view--sub-title)):not(:has(.flow--list--items--item--view--avatar)){grid-template-areas:"title"}.flow--list--items--item--view .flow--list--items--item--view--title .flow--list--items--item--view--avatar{grid-area:avatar;align-self:center}.flow--list--items--item--view .flow--list--items--item--view--title .flow--list--items--item--view--heading{grid-area:title;align-self:center}.flow--list--items--item--view .flow--list--items--item--view--title .flow--list--items--item--view--sub-title{grid-area:subtitle;font-size:var(--list-item--subtitle-font-size)}.flow--list--items--item--view .flow--list--items--item--view--title .flow--list--items--item--view--sub-title .flow--list--items--item--view--text:not(:last-child):after{content:"–";display:inline-block;margin:0 var(--size-rem--s)}.flow--list--items--item--view .flow--list--items--item--view--top-content{order:2}.flow--list--items--item--view .flow--list--items--item--view--action{margin-left:auto}.flow--list--items--item--view .flow--list--items--item--view--bottom-content{order:4;width:100%}.flow--list--list-summary{border-width:var(--list-item--border-width);border-bottom-width:0;border-style:var(--list-item--border-style);border-color:var(--list-item--border-color);padding:var(--list-item--padding);border-top-left-radius:var(--list-item--corner-radius);border-top-right-radius:var(--list-item--corner-radius)}.flow--list--header{display:flex;flex-direction:column;row-gap:var(--list--content-to-content-spacing)}.flow--list--header .flow--list--header--picker-list-and-search{display:flex;gap:var(--list--block-to-block-spacing);align-items:center;justify-content:space-between;flex-wrap:wrap-reverse}.flow--list--header .flow--list--header--picker-list{display:flex;flex-
|
|
1
|
+
@charset "UTF-8";.flow--list--items--item--view{display:flex;padding:var(--list-item--padding);gap:var(--list-item--content-to-content-spacing);align-items:start}.flow--list--items--item--view .flow--list--items--item--view--content{display:flex;flex-wrap:wrap;gap:var(--list-item--content-to-content-spacing);align-items:center;flex-grow:1}.flow--list--items--item--view .flow--list--items--item--view--title{order:0;flex-grow:1;display:grid;grid-column-gap:var(--list-item--content-to-content-spacing);grid-template-areas:"avatar title " "avatar subtitle";grid-template-columns:auto 1fr}.flow--list--items--item--view .flow--list--items--item--view--title:empty{display:none}.flow--list--items--item--view .flow--list--items--item--view--title:not(:has(.flow--list--items--item--view--avatar)){grid-template-areas:"title " "subtitle";grid-template-columns:1fr}.flow--list--items--item--view .flow--list--items--item--view--title:not(:has(.flow--list--items--item--view--sub-title)){grid-template-areas:"avatar title"}.flow--list--items--item--view .flow--list--items--item--view--title:not(:has(.flow--list--items--item--view--sub-title)):not(:has(.flow--list--items--item--view--avatar)){grid-template-areas:"title"}.flow--list--items--item--view .flow--list--items--item--view--title .flow--list--items--item--view--avatar{grid-area:avatar;align-self:center}.flow--list--items--item--view .flow--list--items--item--view--title .flow--list--items--item--view--heading{grid-area:title;align-self:center}.flow--list--items--item--view .flow--list--items--item--view--title .flow--list--items--item--view--sub-title{grid-area:subtitle;font-size:var(--list-item--subtitle-font-size)}.flow--list--items--item--view .flow--list--items--item--view--title .flow--list--items--item--view--sub-title .flow--list--items--item--view--text:not(:last-child):after{content:"–";display:inline-block;margin:0 var(--size-rem--s)}.flow--list--items--item--view .flow--list--items--item--view--top-content{order:2}.flow--list--items--item--view .flow--list--items--item--view--action{margin-left:auto}.flow--list--items--item--view .flow--list--items--item--view--bottom-content{order:4;width:100%}.flow--list--list-summary{border-width:var(--list-item--border-width);border-bottom-width:0;border-style:var(--list-item--border-style);border-color:var(--list-item--border-color);padding:var(--list-item--padding);border-top-left-radius:var(--list-item--corner-radius);border-top-right-radius:var(--list-item--corner-radius)}.flow--list--header{display:flex;flex-direction:column;row-gap:var(--list--content-to-content-spacing)}.flow--list--header .flow--list--header--picker-list-and-search{display:flex;gap:var(--list--block-to-block-spacing);align-items:center;justify-content:space-between;flex-wrap:wrap-reverse}.flow--list--header .flow--list--header--picker-list{display:flex;flex-wrap:wrap;gap:var(--list--content-to-content-spacing)}.flow--list--header .flow--list--header--search-and-actions{display:flex;flex-grow:1;gap:var(--list--content-to-content-spacing);flex-wrap:wrap-reverse;justify-content:end}.flow--list--header .flow--list--header--search-field{max-width:180px;flex-grow:1;transition:max-width var(--transition--duration--default)}.flow--list--header .flow--list--header--search-field:has(input:focus){max-width:600px}.flow--list--header--active-filters{display:flex;flex-direction:row;column-gap:var(--list--content-to-content-spacing);row-gap:var(--list--content-to-content-spacing);flex-wrap:wrap;align-items:center}.flow--list--header--active-filters .flow--list--header--active-filters--clear-button{margin-inline-start:auto}.flow--list{display:flex;flex-direction:column;row-gap:var(--list--block-to-block-spacing);container-type:inline-size}.flow--list :has(.flow--list--list-summary) .flow--list--items,.flow--list :has(.flow--list--list-summary) .flow--list--table{border-top-left-radius:0;border-top-right-radius:0}.flow--list--items{display:flex;flex-direction:column;border-radius:var(--list-item--corner-radius);border-color:var(--list-item--border-color);border-width:var(--list-item--border-width);border-style:var(--list-item--border-style);overflow:hidden}.flow--list--items:empty{display:none}.flow--list--items.flow--list--items--is-loading{pointer-events:none;opacity:.5}.flow--list--items[data-empty=true]{border:none}.flow--list--items--item{cursor:default;background-color:var(--list-item--background-color--default)}.flow--list--items--item{outline-color:var(--focus--outline-color);outline-offset:var(--focus--outline-offset);outline-width:var(--focus--outline-width);outline-style:none}.flow--list--items--item[data-focused],.flow--list--items--item:focus{outline-style:none}.flow--list--items--item[data-focus-visible],.flow--list--items--item:focus-visible{outline-style:auto}.flow--list--items--item[data-focused]:not([data-focus-visible]):focus-visible{outline-style:none}.flow--list--items--item.flow--list--items--item{outline-offset:calc(var(--size-px--xs) * -1)}.flow--list--items--item:where(.flow--list--items--item--is-selected){background-color:var(--list-item--background-color--pressed)}.flow--list--items--item:not(:last-child){border-bottom-color:var(--list-item--border-color);border-bottom-width:var(--list-item--border-width);border-bottom-style:var(--list-item--border-style)}.flow--list--items--item:where(.flow--list--items--item--has-action):not(.flow--list--items--item--is-selected):hover{background-color:var(--list-item--background-color--hover)}.flow--list--items--item:where(.flow--list--items--item--has-action)[data-pressed]{background-color:var(--list-item--background-color--pressed)}.flow--list--footer{font-size:var(--font-size-text--s);display:flex;flex-direction:column;align-items:center;row-gap:var(--list--content-to-content-spacing)}.flow--list--table.flow--list--table--is-loading{pointer-events:none;opacity:.5}.flow--list--table--row.flow--list--table--is-selected{background-color:var(--list-item--background-color--pressed)}.flow--list--table--row:where(.flow--list--table--has-action){cursor:default}.flow--list--table--row:where(.flow--list--table--has-action):not(.flow--list--table--is-selected):hover{background-color:var(--list-item--background-color--hover)}.flow--list--table--row:where(.flow--list--table--has-action)[data-pressed]{background-color:var(--list-item--background-color--pressed)}
|
package/dist/js/List.js
CHANGED
|
@@ -148,7 +148,7 @@ const Ue = "flow--list--items--item--view", ze = "flow--list--items--item--view-
|
|
|
148
148
|
return /* @__PURE__ */ a.createElement("div", { className: i }, /* @__PURE__ */ a.createElement(Z, { props: s, mergeInParentContext: !0 }, /* @__PURE__ */ a.createElement(Ft, null, /* @__PURE__ */ a.createElement("div", { className: g.content }, t, /* @__PURE__ */ a.createElement("div", { className: g.title }, /* @__PURE__ */ a.createElement(M, { id: "title" }), /* @__PURE__ */ a.createElement("div", { className: g.subTitle }, /* @__PURE__ */ a.createElement(M, { id: "text" })))), /* @__PURE__ */ a.createElement(M, { id: "button" }))));
|
|
149
149
|
}, Xe = "flow--list--list-summary", Ze = {
|
|
150
150
|
listSummary: Xe
|
|
151
|
-
},
|
|
151
|
+
}, ii = It("ListSummary", (n) => {
|
|
152
152
|
const { children: t } = n;
|
|
153
153
|
return /* @__PURE__ */ a.createElement("header", { className: Ze.listSummary, ...n }, t);
|
|
154
154
|
}), xt = _t({}), f = () => te(xt).list, _e = () => f().loader.getLoaderInvocationHooks().map((t, e) => /* @__PURE__ */ a.createElement(de, { key: e }, () => {
|
|
@@ -195,17 +195,16 @@ const Ue = "flow--list--items--item--view", ze = "flow--list--items--item--view-
|
|
|
195
195
|
},
|
|
196
196
|
c
|
|
197
197
|
));
|
|
198
|
-
}, as = "flow--list--header", is = "flow--list--header--picker-list-and-search", ns = "flow--list--header--picker-list", rs = "flow--list--header--search-and-actions", os = "flow--list--header--search-field",
|
|
198
|
+
}, as = "flow--list--header", is = "flow--list--header--picker-list-and-search", ns = "flow--list--header--picker-list", rs = "flow--list--header--search-and-actions", os = "flow--list--header--search-field", V = {
|
|
199
199
|
header: as,
|
|
200
200
|
pickerListAndSearch: is,
|
|
201
201
|
pickerList: ns,
|
|
202
202
|
searchAndActions: rs,
|
|
203
|
-
searchField: os
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
}, ms = fe(() => {
|
|
203
|
+
searchField: os
|
|
204
|
+
}, ls = "flow--list--header--active-filters", cs = "flow--list--header--active-filters--clear-button", ds = {
|
|
205
|
+
activeFilters: ls,
|
|
206
|
+
clearButton: cs
|
|
207
|
+
}, us = fe(() => {
|
|
209
208
|
const n = f(), t = I(b), s = n.filters.flatMap((l) => l.values).filter((l) => l.isActive).map((l) => /* @__PURE__ */ a.createElement(be, { key: l.id, onClose: () => l.deactivate() }, /* @__PURE__ */ a.createElement(T, null, l.render()))), i = n.filters.filter((l) => l.hasChanged()).length > 0, o = n.supportsSettingsStorage && i && /* @__PURE__ */ a.createElement(G, null, /* @__PURE__ */ a.createElement(W, null, /* @__PURE__ */ a.createElement(R, { locales: b }, "list.filters.store")), /* @__PURE__ */ a.createElement(
|
|
210
209
|
E,
|
|
211
210
|
{
|
|
@@ -236,8 +235,8 @@ const Ue = "flow--list--items--item--view", ze = "flow--list--items--item--view-
|
|
|
236
235
|
},
|
|
237
236
|
/* @__PURE__ */ a.createElement(pt, null, /* @__PURE__ */ a.createElement(ge, null))
|
|
238
237
|
)) : void 0;
|
|
239
|
-
return s.length === 0 && !o && !c ? null : /* @__PURE__ */ a.createElement("div", { className:
|
|
240
|
-
}),
|
|
238
|
+
return s.length === 0 && !o && !c ? null : /* @__PURE__ */ a.createElement("div", { className: ds.activeFilters }, s, o, c, d);
|
|
239
|
+
}), ms = (n) => {
|
|
241
240
|
const { className: t, onChange: e, value: s, ...i } = n, [o, c] = O(s ?? "");
|
|
242
241
|
ve(s, () => {
|
|
243
242
|
c(s ?? "");
|
|
@@ -258,15 +257,15 @@ const Ue = "flow--list--items--item--view", ze = "flow--list--items--item--view-
|
|
|
258
257
|
...i
|
|
259
258
|
}
|
|
260
259
|
);
|
|
261
|
-
},
|
|
262
|
-
const { className: t, search: e } = n, s = e.render ??
|
|
260
|
+
}, hs = (n) => {
|
|
261
|
+
const { className: t, search: e } = n, s = e.render ?? ms;
|
|
263
262
|
return Et(s, {
|
|
264
263
|
className: t,
|
|
265
264
|
value: e.value,
|
|
266
265
|
onChange: e.setValue.bind(e),
|
|
267
266
|
...e.textFieldProps
|
|
268
267
|
});
|
|
269
|
-
},
|
|
268
|
+
}, gs = () => {
|
|
270
269
|
const n = I(b), t = f(), e = t.viewMode, s = [];
|
|
271
270
|
return t.itemView && s.push("list"), t.table && s.push("table"), s.length <= 1 ? null : /* @__PURE__ */ a.createElement(H, null, /* @__PURE__ */ a.createElement(
|
|
272
271
|
E,
|
|
@@ -288,16 +287,16 @@ const Ue = "flow--list--items--item--view", ze = "flow--list--items--item--view-
|
|
|
288
287
|
},
|
|
289
288
|
n.format(`list.settings.viewMode.${i}`)
|
|
290
289
|
)))));
|
|
291
|
-
},
|
|
290
|
+
}, ps = (n) => {
|
|
292
291
|
const { className: t, hasActionGroup: e } = n, s = f();
|
|
293
292
|
if (s.filters.length === 0 && s.visibleSorting.length === 0 && !s.search && !s.table && !e)
|
|
294
293
|
return null;
|
|
295
294
|
const i = s.filters.map((o) => /* @__PURE__ */ a.createElement(ss, { key: o.property, filter: o }));
|
|
296
|
-
return /* @__PURE__ */ a.createElement("div", { className: k(t, V.header) }, /* @__PURE__ */ a.createElement("div", { className: V.pickerListAndSearch }, /* @__PURE__ */ a.createElement("div", { className: V.pickerList }, /* @__PURE__ */ a.createElement(
|
|
297
|
-
},
|
|
298
|
-
list:
|
|
295
|
+
return /* @__PURE__ */ a.createElement("div", { className: k(t, V.header) }, /* @__PURE__ */ a.createElement("div", { className: V.pickerListAndSearch }, /* @__PURE__ */ a.createElement("div", { className: V.pickerList }, /* @__PURE__ */ a.createElement(gs, null), /* @__PURE__ */ a.createElement(es, null), i), /* @__PURE__ */ a.createElement("div", { className: V.searchAndActions }, s.search && /* @__PURE__ */ a.createElement(hs, { className: V.searchField, search: s.search }), /* @__PURE__ */ a.createElement(M, { id: "actions" }))), /* @__PURE__ */ a.createElement(us, null));
|
|
296
|
+
}, fs = "flow--list", bs = {
|
|
297
|
+
list: fs
|
|
299
298
|
};
|
|
300
|
-
let
|
|
299
|
+
let Ss = class Dt {
|
|
301
300
|
constructor(t, e, s) {
|
|
302
301
|
r(this, "id");
|
|
303
302
|
r(this, "data");
|
|
@@ -308,16 +307,16 @@ let vs = class Dt {
|
|
|
308
307
|
return new Dt(t, e.id, e.original);
|
|
309
308
|
}
|
|
310
309
|
};
|
|
311
|
-
class
|
|
310
|
+
class vs {
|
|
312
311
|
constructor(t) {
|
|
313
312
|
r(this, "list");
|
|
314
313
|
this.list = t;
|
|
315
314
|
}
|
|
316
315
|
get entries() {
|
|
317
|
-
return this.list.reactTable.table.getRowModel().rows.map((t) =>
|
|
316
|
+
return this.list.reactTable.table.getRowModel().rows.map((t) => Ss.fromRow(this, t));
|
|
318
317
|
}
|
|
319
318
|
}
|
|
320
|
-
class
|
|
319
|
+
class ys {
|
|
321
320
|
constructor(t, e = {}) {
|
|
322
321
|
r(this, "batchSize");
|
|
323
322
|
r(this, "list");
|
|
@@ -364,7 +363,7 @@ class Es {
|
|
|
364
363
|
}
|
|
365
364
|
}
|
|
366
365
|
}
|
|
367
|
-
const
|
|
366
|
+
const Es = "$";
|
|
368
367
|
class F {
|
|
369
368
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
370
369
|
constructor(t, e) {
|
|
@@ -394,7 +393,7 @@ class F {
|
|
|
394
393
|
this.filter.deactivateValue(this);
|
|
395
394
|
}
|
|
396
395
|
}
|
|
397
|
-
const J = (n) => Array.isArray(n) ? n : [n],
|
|
396
|
+
const J = (n) => Array.isArray(n) ? n : [n], ws = (n, t) => n === t, Fs = (n) => String(n);
|
|
398
397
|
class $ {
|
|
399
398
|
constructor(t, e) {
|
|
400
399
|
r(this, "_values");
|
|
@@ -408,7 +407,7 @@ class $ {
|
|
|
408
407
|
r(this, "onFilterUpdateCallbacks", /* @__PURE__ */ new Set());
|
|
409
408
|
r(this, "defaultSelectedValues");
|
|
410
409
|
var s;
|
|
411
|
-
this.list = t, this.property = e.property, this.mode = e.mode ?? "one", this._values = (s = e.values) == null ? void 0 : s.map((i) => F.create(this, i)), this.matcher = e.matcher ??
|
|
410
|
+
this.list = t, this.property = e.property, this.mode = e.mode ?? "one", this._values = (s = e.values) == null ? void 0 : s.map((i) => F.create(this, i)), this.matcher = e.matcher ?? ws, this.renderItem = e.renderItem ?? Fs, this.name = e.name, this.defaultSelectedValues = e.defaultSelected;
|
|
412
411
|
}
|
|
413
412
|
getStoredSelectedIds() {
|
|
414
413
|
var t;
|
|
@@ -429,7 +428,7 @@ class $ {
|
|
|
429
428
|
}
|
|
430
429
|
getReactTableFilterFn() {
|
|
431
430
|
return (t, e, s) => {
|
|
432
|
-
const i = this.property, o = i.startsWith(
|
|
431
|
+
const i = this.property, o = i.startsWith(Es) ? t.original : we(t.original, i);
|
|
433
432
|
return this.checkFilterMatches(o, s);
|
|
434
433
|
};
|
|
435
434
|
}
|
|
@@ -520,7 +519,7 @@ class $ {
|
|
|
520
519
|
}
|
|
521
520
|
}
|
|
522
521
|
r($, "settingsStorageSchema", N.record(N.array(N.string())).optional());
|
|
523
|
-
class
|
|
522
|
+
class Is {
|
|
524
523
|
constructor(t, e) {
|
|
525
524
|
r(this, "list");
|
|
526
525
|
r(this, "property");
|
|
@@ -684,7 +683,7 @@ class it {
|
|
|
684
683
|
return t in this.dataBatches;
|
|
685
684
|
}
|
|
686
685
|
}
|
|
687
|
-
const
|
|
686
|
+
const Ts = [];
|
|
688
687
|
class nt {
|
|
689
688
|
constructor(t, e = {}) {
|
|
690
689
|
r(this, "list");
|
|
@@ -695,7 +694,7 @@ class nt {
|
|
|
695
694
|
r(this, "loaderState");
|
|
696
695
|
var d;
|
|
697
696
|
const { source: s } = e;
|
|
698
|
-
this.dataSource = s ?? { staticData:
|
|
697
|
+
this.dataSource = s ?? { staticData: Ts };
|
|
699
698
|
const i = "manualPagination" in this.dataSource ? this.dataSource.manualPagination : void 0, o = "manualFiltering" in this.dataSource ? this.dataSource.manualFiltering : void 0, c = "manualSorting" in this.dataSource ? this.dataSource.manualSorting : void 0;
|
|
700
699
|
this.list = t, this.loaderState = it.useNew(), this.manualPagination = i ?? !1, this.manualFiltering = o ?? this.manualPagination, this.manualSorting = c ?? this.manualPagination, this.list.filters.forEach((l) => l.onFilterUpdated(() => this.reset())), (d = this.list.search) == null || d.onUpdated(() => this.reset());
|
|
701
700
|
}
|
|
@@ -787,7 +786,7 @@ class nt {
|
|
|
787
786
|
throw new Error("Unknown data source");
|
|
788
787
|
}
|
|
789
788
|
}
|
|
790
|
-
class
|
|
789
|
+
class Cs {
|
|
791
790
|
constructor(t, e) {
|
|
792
791
|
r(this, "list");
|
|
793
792
|
r(this, "render");
|
|
@@ -834,21 +833,21 @@ const K = class K {
|
|
|
834
833
|
}
|
|
835
834
|
};
|
|
836
835
|
r(K, "fallbackRenderItemFn", (t) => Et("pre", void 0, JSON.stringify(t)));
|
|
837
|
-
let Q = K,
|
|
836
|
+
let Q = K, Ls = class {
|
|
838
837
|
constructor(t, e = {}) {
|
|
839
838
|
r(this, "tableHeader");
|
|
840
839
|
r(this, "componentProps");
|
|
841
840
|
this.tableHeader = t, this.componentProps = e;
|
|
842
841
|
}
|
|
843
|
-
},
|
|
842
|
+
}, Ps = class {
|
|
844
843
|
constructor(t, e = {}) {
|
|
845
844
|
r(this, "table");
|
|
846
845
|
r(this, "componentProps");
|
|
847
846
|
r(this, "columns");
|
|
848
847
|
const { columns: s = [], ...i } = e;
|
|
849
|
-
this.table = t, this.columns = s.map((o) => new
|
|
848
|
+
this.table = t, this.columns = s.map((o) => new Ls(this, o)), this.componentProps = i;
|
|
850
849
|
}
|
|
851
|
-
},
|
|
850
|
+
}, As = class {
|
|
852
851
|
constructor(t, e = {}) {
|
|
853
852
|
r(this, "row");
|
|
854
853
|
r(this, "renderFn");
|
|
@@ -856,34 +855,34 @@ let Q = K, Ps = class {
|
|
|
856
855
|
const { renderFn: s, ...i } = e;
|
|
857
856
|
this.row = t, this.renderFn = s, this.componentProps = i;
|
|
858
857
|
}
|
|
859
|
-
},
|
|
858
|
+
}, Vs = class {
|
|
860
859
|
constructor(t, e = {}) {
|
|
861
860
|
r(this, "tableBody");
|
|
862
861
|
r(this, "cells");
|
|
863
862
|
r(this, "componentProps");
|
|
864
863
|
const { cells: s = [], ...i } = e;
|
|
865
|
-
this.tableBody = t, this.cells = s.map((o) => new
|
|
864
|
+
this.tableBody = t, this.cells = s.map((o) => new As(this, o)), this.componentProps = i;
|
|
866
865
|
}
|
|
867
|
-
},
|
|
866
|
+
}, ks = class {
|
|
868
867
|
constructor(t, e = {}) {
|
|
869
868
|
r(this, "table");
|
|
870
869
|
r(this, "componentProps");
|
|
871
870
|
r(this, "row");
|
|
872
871
|
const { row: s, ...i } = e;
|
|
873
|
-
this.table = t, this.row = new
|
|
872
|
+
this.table = t, this.row = new Vs(this, s), this.componentProps = i;
|
|
874
873
|
}
|
|
875
|
-
},
|
|
874
|
+
}, Bs = class {
|
|
876
875
|
constructor(t, e = {}) {
|
|
877
876
|
r(this, "list");
|
|
878
877
|
r(this, "header");
|
|
879
878
|
r(this, "body");
|
|
880
879
|
r(this, "componentProps");
|
|
881
880
|
const { header: s, body: i, ...o } = e;
|
|
882
|
-
this.list = t, this.header = new
|
|
881
|
+
this.list = t, this.header = new Ps(this, s), this.body = new ks(this, i), this.componentProps = o;
|
|
883
882
|
}
|
|
884
883
|
};
|
|
885
884
|
var y;
|
|
886
|
-
let
|
|
885
|
+
let Ms = (y = class {
|
|
887
886
|
constructor(t) {
|
|
888
887
|
r(this, "filters");
|
|
889
888
|
r(this, "itemView");
|
|
@@ -921,7 +920,7 @@ let xs = (y = class {
|
|
|
921
920
|
accordion: P = !1,
|
|
922
921
|
...p
|
|
923
922
|
} = t;
|
|
924
|
-
this.settingsStore = Ae(), this.settingStorageKey = e, this.filterSettingsStorageKey = e ? `${e}.activeFilters` : void 0, this.viewModeStorageKey = e ? `${e}.viewMode` : void 0, this.supportsSettingsStorage = !!this.settingStorageKey, this.items = new
|
|
923
|
+
this.settingsStore = Ae(), this.settingStorageKey = e, this.filterSettingsStorageKey = e ? `${e}.activeFilters` : void 0, this.viewModeStorageKey = e ? `${e}.viewMode` : void 0, this.supportsSettingsStorage = !!this.settingStorageKey, this.items = new vs(this), this.filters = o.map((h) => new $(this, h)), this.sorting = c.map((h) => new Is(this, h)), this.search = m ? new Cs(this, m) : void 0, this.itemView = s ? new Q(this, s) : void 0, this.accordion = P, this.table = i ? new Bs(this, i) : void 0, this.batches = new ys(this, d), this.componentProps = p, this.loader = nt.useNew(this, u), this.onAction = w, this.getItemId = C, this.reactTable = at.useNew(this, l, {
|
|
925
924
|
manualFiltering: this.loader.manualFiltering,
|
|
926
925
|
manualPagination: this.loader.manualPagination,
|
|
927
926
|
manualSorting: this.loader.manualSorting
|
|
@@ -998,14 +997,14 @@ let xs = (y = class {
|
|
|
998
997
|
return !this.loader.useIsLoading() && this.items.entries.length === 0;
|
|
999
998
|
}
|
|
1000
999
|
}, r(y, "viewModeSettingsStorageSchema", N.enum(["list", "table"]).optional()), y);
|
|
1001
|
-
const
|
|
1002
|
-
items:
|
|
1003
|
-
isLoading:
|
|
1004
|
-
},
|
|
1005
|
-
item:
|
|
1006
|
-
isSelected:
|
|
1007
|
-
hasAction:
|
|
1008
|
-
}, Nt = () => /* @__PURE__ */ a.createElement(Mt, null, /* @__PURE__ */ a.createElement(et, null, /* @__PURE__ */ a.createElement(z, { width: "200px" })), /* @__PURE__ */ a.createElement(T, null, /* @__PURE__ */ a.createElement(z, { width: "300px" }))),
|
|
1000
|
+
const xs = "flow--list--items", Ds = "flow--list--items--is-loading", yt = {
|
|
1001
|
+
items: xs,
|
|
1002
|
+
isLoading: Ds
|
|
1003
|
+
}, Ns = "flow--list--items--item", Rs = "flow--list--items--item--is-selected", $s = "flow--list--items--item--has-action", U = {
|
|
1004
|
+
item: Ns,
|
|
1005
|
+
isSelected: Rs,
|
|
1006
|
+
hasAction: $s
|
|
1007
|
+
}, Nt = () => /* @__PURE__ */ a.createElement(Mt, null, /* @__PURE__ */ a.createElement(et, null, /* @__PURE__ */ a.createElement(z, { width: "200px" })), /* @__PURE__ */ a.createElement(T, null, /* @__PURE__ */ a.createElement(z, { width: "300px" }))), Us = (n) => {
|
|
1009
1008
|
const { isExpanded: t, toggle: e, children: s, contentElementId: i } = n, o = I(b);
|
|
1010
1009
|
return /* @__PURE__ */ a.createElement(a.Fragment, null, /* @__PURE__ */ a.createElement(
|
|
1011
1010
|
E,
|
|
@@ -1021,7 +1020,7 @@ const Ds = "flow--list--items", Ns = "flow--list--items--is-loading", yt = {
|
|
|
1021
1020
|
},
|
|
1022
1021
|
t ? /* @__PURE__ */ a.createElement(ke, null) : /* @__PURE__ */ a.createElement(Ve, null)
|
|
1023
1022
|
), t && s);
|
|
1024
|
-
},
|
|
1023
|
+
}, zs = (n) => {
|
|
1025
1024
|
var P;
|
|
1026
1025
|
const { data: t, children: e } = n, s = f(), i = s.itemView, o = s.onAction, [c, d] = O(
|
|
1027
1026
|
((P = i == null ? void 0 : i.defaultExpanded) == null ? void 0 : P.call(i, t)) ?? !1
|
|
@@ -1045,7 +1044,7 @@ const Ds = "flow--list--items", Ns = "flow--list--items--is-loading", yt = {
|
|
|
1045
1044
|
id: Y((p) => p.slot === "bottom" ? l : void 0),
|
|
1046
1045
|
wrapWith: Y(
|
|
1047
1046
|
(p) => p.slot === "bottom" ? /* @__PURE__ */ a.createElement(
|
|
1048
|
-
|
|
1047
|
+
Us,
|
|
1049
1048
|
{
|
|
1050
1049
|
contentElementId: l,
|
|
1051
1050
|
toggle: C,
|
|
@@ -1069,8 +1068,8 @@ const Ds = "flow--list--items", Ns = "flow--list--items--is-loading", yt = {
|
|
|
1069
1068
|
w
|
|
1070
1069
|
)
|
|
1071
1070
|
};
|
|
1072
|
-
},
|
|
1073
|
-
const { id: t, data: e } = n, i = f().itemView, { gridItemProps: o, children: c } =
|
|
1071
|
+
}, Ks = (n) => {
|
|
1072
|
+
const { id: t, data: e } = n, i = f().itemView, { gridItemProps: o, children: c } = zs(n);
|
|
1074
1073
|
if (!i)
|
|
1075
1074
|
return null;
|
|
1076
1075
|
const d = i.textValue ? i.textValue(e) : void 0, l = i.href ? i.href(e) : void 0, u = !!o.onAction || !!l;
|
|
@@ -1089,18 +1088,18 @@ const Ds = "flow--list--items", Ns = "flow--list--items--is-loading", yt = {
|
|
|
1089
1088
|
},
|
|
1090
1089
|
/* @__PURE__ */ a.createElement(se, { fallback: /* @__PURE__ */ a.createElement(Nt, null) }, c)
|
|
1091
1090
|
);
|
|
1092
|
-
},
|
|
1091
|
+
}, Os = (n) => /* @__PURE__ */ a.createElement(st.GridListItem, { textValue: "-", className: U.item }, n.children), X = () => {
|
|
1093
1092
|
const n = I(b);
|
|
1094
1093
|
return /* @__PURE__ */ a.createElement(Be, null, /* @__PURE__ */ a.createElement(Me, null), /* @__PURE__ */ a.createElement(et, null, n.format("list.noResult.heading")), /* @__PURE__ */ a.createElement(T, null, n.format("list.noResult.text")));
|
|
1095
|
-
},
|
|
1094
|
+
}, Hs = () => {
|
|
1096
1095
|
var e;
|
|
1097
1096
|
const t = ((e = f().itemView) == null ? void 0 : e.fallback) ?? /* @__PURE__ */ a.createElement(Nt, null);
|
|
1098
|
-
return Array.from(Array(5)).map((s, i) => /* @__PURE__ */ a.createElement(
|
|
1099
|
-
},
|
|
1097
|
+
return Array.from(Array(5)).map((s, i) => /* @__PURE__ */ a.createElement(Os, { key: i }, ae(t)));
|
|
1098
|
+
}, qs = () => {
|
|
1100
1099
|
const n = f(), t = n.loader.useIsLoading(), e = n.loader.useIsInitiallyLoading();
|
|
1101
1100
|
if (!n.itemView)
|
|
1102
1101
|
return null;
|
|
1103
|
-
const s = n.items.entries.map((o) => /* @__PURE__ */ a.createElement(
|
|
1102
|
+
const s = n.items.entries.map((o) => /* @__PURE__ */ a.createElement(Ks, { key: o.id, data: o.data, id: o.id })), i = k(yt.items, t && yt.isLoading);
|
|
1104
1103
|
return /* @__PURE__ */ a.createElement("div", { "aria-hidden": e, "aria-busy": t }, /* @__PURE__ */ a.createElement(
|
|
1105
1104
|
st.GridList,
|
|
1106
1105
|
{
|
|
@@ -1108,11 +1107,11 @@ const Ds = "flow--list--items", Ns = "flow--list--items--is-loading", yt = {
|
|
|
1108
1107
|
...n.componentProps,
|
|
1109
1108
|
renderEmptyState: () => /* @__PURE__ */ a.createElement(X, null)
|
|
1110
1109
|
},
|
|
1111
|
-
e ? /* @__PURE__ */ a.createElement(
|
|
1110
|
+
e ? /* @__PURE__ */ a.createElement(Hs, null) : s
|
|
1112
1111
|
));
|
|
1113
|
-
}, Rt = (n) => null,
|
|
1114
|
-
footer:
|
|
1115
|
-
},
|
|
1112
|
+
}, Rt = (n) => null, Gs = () => Rt, $t = (n) => null, Ws = () => $t, Ut = (n) => null, js = () => Ut, zt = (n) => null, Js = () => zt, Kt = (n) => null, Ys = () => Kt, Qs = "flow--list--footer", Xs = {
|
|
1113
|
+
footer: Qs
|
|
1114
|
+
}, Zs = (n) => {
|
|
1116
1115
|
const t = I(b), e = f(), s = e.batches, i = e.loader.useIsInitiallyLoading(), o = e.useIsEmpty(), c = s.getTotalItemsCount(), d = s.getVisibleItemsCount();
|
|
1117
1116
|
if (o)
|
|
1118
1117
|
return null;
|
|
@@ -1121,7 +1120,7 @@ const Ds = "flow--list--items", Ns = "flow--list--items--is-loading", yt = {
|
|
|
1121
1120
|
totalItemsCount: c
|
|
1122
1121
|
});
|
|
1123
1122
|
return /* @__PURE__ */ a.createElement(T, { ...n }, l);
|
|
1124
|
-
},
|
|
1123
|
+
}, _s = (n) => {
|
|
1125
1124
|
const t = I(b), e = f(), s = e.loader.useIsLoading(), i = e.loader.useIsInitiallyLoading();
|
|
1126
1125
|
return !e.batches.hasNextBatch() && !s ? null : /* @__PURE__ */ a.createElement(
|
|
1127
1126
|
E,
|
|
@@ -1135,22 +1134,22 @@ const Ds = "flow--list--items", Ns = "flow--list--items--is-loading", yt = {
|
|
|
1135
1134
|
},
|
|
1136
1135
|
t.format("list.showMore")
|
|
1137
1136
|
);
|
|
1138
|
-
},
|
|
1137
|
+
}, ta = () => /* @__PURE__ */ a.createElement("div", { className: Xs.footer }, /* @__PURE__ */ a.createElement(Zs, null), /* @__PURE__ */ a.createElement(_s, null));
|
|
1139
1138
|
function Ot(n) {
|
|
1140
1139
|
return null;
|
|
1141
1140
|
}
|
|
1142
|
-
const
|
|
1143
|
-
table:
|
|
1144
|
-
isLoading:
|
|
1145
|
-
row:
|
|
1146
|
-
isSelected:
|
|
1147
|
-
hasAction:
|
|
1148
|
-
},
|
|
1141
|
+
const ea = () => Ot, Ht = (n) => null, qt = (n) => null, Gt = (n) => null, sa = (n) => /* @__PURE__ */ a.createElement(Lt, { ...n }, /* @__PURE__ */ a.createElement(Pt, null, /* @__PURE__ */ a.createElement(At, null, /* @__PURE__ */ a.createElement(z, { width: "100%" }))), /* @__PURE__ */ a.createElement(Vt, null, Array.from(Array(5)).map((t, e) => /* @__PURE__ */ a.createElement(kt, { key: e }, /* @__PURE__ */ a.createElement(Bt, null, /* @__PURE__ */ a.createElement(z, { width: "100%" })))))), aa = "flow--list--table", ia = "flow--list--table--is-loading", na = "flow--list--table--row", ra = "flow--list--table--is-selected", oa = "flow--list--table--has-action", B = {
|
|
1142
|
+
table: aa,
|
|
1143
|
+
isLoading: ia,
|
|
1144
|
+
row: na,
|
|
1145
|
+
isSelected: ra,
|
|
1146
|
+
hasAction: oa
|
|
1147
|
+
}, la = () => {
|
|
1149
1148
|
const n = f(), t = n.table, e = n.useIsEmpty(), s = n.loader.useIsLoading(), i = n.loader.useIsInitiallyLoading();
|
|
1150
1149
|
if (!t)
|
|
1151
1150
|
return null;
|
|
1152
1151
|
if (i)
|
|
1153
|
-
return /* @__PURE__ */ a.createElement(
|
|
1152
|
+
return /* @__PURE__ */ a.createElement(sa, { ...t.componentProps });
|
|
1154
1153
|
if (e)
|
|
1155
1154
|
return /* @__PURE__ */ a.createElement(X, null);
|
|
1156
1155
|
const o = t.list.onAction, c = k(
|
|
@@ -1193,7 +1192,7 @@ const sa = () => Ot, Ht = (n) => null, qt = (n) => null, Gt = (n) => null, aa =
|
|
|
1193
1192
|
})
|
|
1194
1193
|
)
|
|
1195
1194
|
);
|
|
1196
|
-
}, Wt = (n) => null, jt = (n) => null, Jt = (n) => null,
|
|
1195
|
+
}, Wt = (n) => null, jt = (n) => null, Jt = (n) => null, ca = It("List", (n) => {
|
|
1197
1196
|
var rt, ot, lt, ct, dt, ut, mt, ht, gt;
|
|
1198
1197
|
const { children: t, batchSize: e, onChange: s, refProp: i, ...o } = n, c = (rt = v(
|
|
1199
1198
|
t,
|
|
@@ -1221,7 +1220,7 @@ const sa = () => Ot, Ht = (n) => null, qt = (n) => null, Gt = (n) => null, aa =
|
|
|
1221
1220
|
...S.props,
|
|
1222
1221
|
renderFn: S.props.children
|
|
1223
1222
|
})
|
|
1224
|
-
), p = (mt = v(t, qt)) == null ? void 0 : mt.props, A = (ht = v(t, jt)) == null ? void 0 : ht.props, q = (gt = v(t, Jt)) == null ? void 0 : gt.props, h =
|
|
1223
|
+
), p = (mt = v(t, qt)) == null ? void 0 : mt.props, A = (ht = v(t, jt)) == null ? void 0 : ht.props, q = (gt = v(t, Jt)) == null ? void 0 : gt.props, h = Ms.useNew({
|
|
1225
1224
|
onChange: s,
|
|
1226
1225
|
loader: u,
|
|
1227
1226
|
filters: D(t, $t).map(
|
|
@@ -1276,14 +1275,14 @@ const sa = () => Ot, Ht = (n) => null, qt = (n) => null, Gt = (n) => null, aa =
|
|
|
1276
1275
|
}
|
|
1277
1276
|
},
|
|
1278
1277
|
/* @__PURE__ */ a.createElement(_e, null),
|
|
1279
|
-
/* @__PURE__ */ a.createElement("div", { className:
|
|
1278
|
+
/* @__PURE__ */ a.createElement("div", { className: bs.list, ref: i }, t, /* @__PURE__ */ a.createElement(ps, { hasActionGroup: Qt }), /* @__PURE__ */ a.createElement("div", null, h.items.entries.length > 0 && /* @__PURE__ */ a.createElement(M, { id: "listSummary" }), h.viewMode === "list" && /* @__PURE__ */ a.createElement(qs, null), h.viewMode === "table" && /* @__PURE__ */ a.createElement(la, null)), /* @__PURE__ */ a.createElement(ta, null))
|
|
1280
1279
|
)));
|
|
1281
|
-
}),
|
|
1282
|
-
List:
|
|
1283
|
-
Filter:
|
|
1284
|
-
Search:
|
|
1285
|
-
Sorting:
|
|
1286
|
-
Item:
|
|
1280
|
+
}), da = () => ca, ui = () => ({
|
|
1281
|
+
List: da(),
|
|
1282
|
+
Filter: Ws(),
|
|
1283
|
+
Search: ea(),
|
|
1284
|
+
Sorting: js(),
|
|
1285
|
+
Item: Js(),
|
|
1287
1286
|
ItemView: Mt,
|
|
1288
1287
|
TableHeader: jt,
|
|
1289
1288
|
TableColumn: Ht,
|
|
@@ -1291,25 +1290,25 @@ const sa = () => Ot, Ht = (n) => null, qt = (n) => null, Gt = (n) => null, aa =
|
|
|
1291
1290
|
TableRow: qt,
|
|
1292
1291
|
TableCell: Gt,
|
|
1293
1292
|
Table: Wt,
|
|
1294
|
-
StaticData:
|
|
1295
|
-
LoaderAsync:
|
|
1293
|
+
StaticData: Ys(),
|
|
1294
|
+
LoaderAsync: Gs(),
|
|
1296
1295
|
LoaderAsyncResource: Ne()
|
|
1297
1296
|
});
|
|
1298
1297
|
export {
|
|
1299
|
-
|
|
1298
|
+
ca as List,
|
|
1300
1299
|
$t as ListFilter,
|
|
1301
1300
|
zt as ListItem,
|
|
1302
1301
|
Mt as ListItemView,
|
|
1303
1302
|
Rt as ListLoaderAsync,
|
|
1304
1303
|
Ut as ListSorting,
|
|
1305
1304
|
Kt as ListStaticData,
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1305
|
+
ii as ListSummary,
|
|
1306
|
+
da as TypedList,
|
|
1307
|
+
Ws as TypedListFilter,
|
|
1308
|
+
Js as TypedListItem,
|
|
1309
|
+
Gs as TypedListLoaderAsync,
|
|
1310
|
+
js as TypedListSorting,
|
|
1311
|
+
Ys as TypedListStaticData,
|
|
1312
|
+
ui as typedList,
|
|
1314
1313
|
f as useList
|
|
1315
1314
|
};
|