@plumile/backoffice-react 0.1.189 → 0.1.190
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/lib/esm/components/backoffice/detail/backofficeDetailRelationLink.css.js +1 -0
- package/lib/esm/components/backoffice/list/RowFlagsCell.css.js +0 -1
- package/lib/esm/components/backoffice/scaffolds/BackofficeEntityListScaffold.js +369 -298
- package/lib/esm/components/backoffice/scaffolds/BackofficeEntityListScaffold.js.map +1 -1
- package/lib/esm/components/backoffice/scaffolds/backofficeEntityListScaffold.css.js +2 -2
- package/lib/esm/components/backoffice/scaffolds/backofficeEntityListScaffold.css.js.map +1 -1
- package/lib/esm/i18n/locales/en/backofficeReact.js +4 -1
- package/lib/esm/i18n/locales/en/backofficeReact.js.map +1 -1
- package/lib/esm/i18n/locales/fr/backofficeReact.js +5 -1
- package/lib/esm/i18n/locales/fr/backofficeReact.js.map +1 -1
- package/lib/esm/pages/BackofficeEntityListDataPage.js +77 -70
- package/lib/esm/pages/BackofficeEntityListDataPage.js.map +1 -1
- package/lib/esm/pages/BackofficeEntityListPage.js +89 -85
- package/lib/esm/pages/BackofficeEntityListPage.js.map +1 -1
- package/lib/esm/pages/BackofficeEntityListRouteContext.js.map +1 -1
- package/lib/esm/provider/BackofficeListUiStateContext.js +88 -0
- package/lib/esm/provider/BackofficeListUiStateContext.js.map +1 -0
- package/lib/esm/provider/BackofficeProvider.js +80 -79
- package/lib/esm/provider/BackofficeProvider.js.map +1 -1
- package/lib/types/components/backoffice/scaffolds/BackofficeEntityListScaffold.d.ts +2 -0
- package/lib/types/components/backoffice/scaffolds/BackofficeEntityListScaffold.d.ts.map +1 -1
- package/lib/types/components/backoffice/scaffolds/backofficeEntityListScaffold.css.d.ts +2 -0
- package/lib/types/components/backoffice/scaffolds/backofficeEntityListScaffold.css.d.ts.map +1 -1
- package/lib/types/i18n/resources.d.ts +7 -0
- package/lib/types/i18n/resources.d.ts.map +1 -1
- package/lib/types/pages/BackofficeEntityListDataPage.d.ts.map +1 -1
- package/lib/types/pages/BackofficeEntityListPage.d.ts.map +1 -1
- package/lib/types/pages/BackofficeEntityListRouteContext.d.ts +2 -0
- package/lib/types/pages/BackofficeEntityListRouteContext.d.ts.map +1 -1
- package/lib/types/provider/BackofficeListUiStateContext.d.ts +21 -0
- package/lib/types/provider/BackofficeListUiStateContext.d.ts.map +1 -0
- package/lib/types/provider/BackofficeProvider.d.ts.map +1 -1
- package/package.json +13 -13
|
@@ -8,61 +8,65 @@ import { EntityFilterValue as o, EntityFilterValueText as ee } from "../filters/
|
|
|
8
8
|
import { BACKOFFICE_LIST_BODY_SCROLL_MODE as s } from "./backofficeListScrollMode.js";
|
|
9
9
|
import { useBackofficeInfiniteScrollSentinel as c } from "../../../hooks/useBackofficeInfiniteScrollSentinel.js";
|
|
10
10
|
import { isDevEnv as l } from "../../../relay/envHelpers.js";
|
|
11
|
-
import { controlsRow as
|
|
12
|
-
import { useCallback as
|
|
13
|
-
import { InlineBanner as
|
|
14
|
-
import { Fragment as
|
|
15
|
-
import { useTranslation as
|
|
16
|
-
import { Button as
|
|
17
|
-
import { SimpleSelect as
|
|
18
|
-
import { Spinner as
|
|
19
|
-
import { BackofficeEmptyState as
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
11
|
+
import { controlsRow as u, embeddedContainer as te, embeddedHeader as ne, entityIdListFilter as re, entityIdListTags as ie, filterInput as d, refreshingIndicator as ae, tableHost as oe } from "./backofficeEntityListScaffold.css.js";
|
|
12
|
+
import { useCallback as f, useEffect as se, useMemo as p, useState as m } from "react";
|
|
13
|
+
import { InlineBanner as ce } from "@plumile/ui/components/feedback/InlineBanner.js";
|
|
14
|
+
import { Fragment as h, jsx as g, jsxs as _ } from "react/jsx-runtime";
|
|
15
|
+
import { useTranslation as le } from "react-i18next";
|
|
16
|
+
import { Button as v } from "@plumile/ui/atomic/atoms/button/Button.js";
|
|
17
|
+
import { SimpleSelect as y } from "@plumile/ui/components/select/SimpleSelect.js";
|
|
18
|
+
import { Spinner as ue } from "@plumile/ui/backoffice/atoms/spinner/Spinner.js";
|
|
19
|
+
import { BackofficeEmptyState as de } from "@plumile/ui/backoffice/molecules/backoffice_empty_state/BackofficeEmptyState.js";
|
|
20
|
+
import { Tag as fe } from "@plumile/ui/backoffice/atoms/tag/Tag.js";
|
|
21
|
+
import { readWhereValue as b, setWhereValue as x } from "@plumile/backoffice-core/filters/where.js";
|
|
22
|
+
import { BackofficeFilterDrawer as pe } from "@plumile/ui/backoffice/molecules/backoffice_filter_drawer/BackofficeFilterDrawer.js";
|
|
23
|
+
import { BackofficeFilterField as me } from "@plumile/ui/backoffice/molecules/backoffice_filter_field/BackofficeFilterField.js";
|
|
24
|
+
import { BackofficeListFooter as he } from "@plumile/ui/backoffice/molecules/backoffice_list_footer/BackofficeListFooter.js";
|
|
25
|
+
import { BackofficePageHeader as ge } from "@plumile/ui/backoffice/molecules/backoffice_page_header/BackofficePageHeader.js";
|
|
26
|
+
import { BackofficeToolbar as _e } from "@plumile/ui/backoffice/molecules/backoffice_toolbar/BackofficeToolbar.js";
|
|
27
|
+
import { BackofficeTableSkeleton as ve } from "@plumile/ui/backoffice/molecules/backoffice_table_skeleton/BackofficeTableSkeleton.js";
|
|
28
|
+
import { FilterChipRow as ye } from "@plumile/ui/backoffice/molecules/filter_chip_row/FilterChipRow.js";
|
|
29
|
+
import { ListPageTemplate as be } from "@plumile/ui/backoffice/templates/list_page_template/ListPageTemplate.js";
|
|
30
|
+
import { ResponsiveRecordList as xe } from "@plumile/ui/components/data-table/ResponsiveRecordList.js";
|
|
31
|
+
import { VirtualizedConnectionTable as Se } from "@plumile/ui/components/data-table/VirtualizedConnectionTable.js";
|
|
32
|
+
import { denseTableClass as Ce } from "@plumile/ui/shared/backofficeTableDensity.css.js";
|
|
33
|
+
import { resolveBackofficeListRuntimeConfig as we } from "@plumile/backoffice-core/config/listRuntime.js";
|
|
33
34
|
//#region src/components/backoffice/scaffolds/BackofficeEntityListScaffold.tsx
|
|
34
|
-
var
|
|
35
|
+
var S = (e, t) => e(t), Te = (e, t) => e.fromGraphQL != null && t != null ? e.fromGraphQL(t) : b(t, e.whereKey ?? e.id, e.path), Ee = (e) => Array.isArray(e) ? e.map((e) => {
|
|
36
|
+
if (e == null) return null;
|
|
37
|
+
let t = String(e).trim();
|
|
38
|
+
return t === "" ? null : t;
|
|
39
|
+
}).filter((e) => e != null) : [], De = (e, t, n) => {
|
|
35
40
|
if (t == null) return null;
|
|
36
41
|
if (Array.isArray(t)) {
|
|
37
|
-
let
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
}).
|
|
42
|
-
return e.length === 0 ? null : e.join(", ");
|
|
42
|
+
let n = Ee(t);
|
|
43
|
+
return n.length === 0 ? null : e.kind === "entityIdList" ? /* @__PURE__ */ g(h, { children: n.map((t, r) => /* @__PURE__ */ _("span", { children: [/* @__PURE__ */ g(o, {
|
|
44
|
+
entityId: e.entity,
|
|
45
|
+
id: t
|
|
46
|
+
}), r < n.length - 1 ? ", " : null] }, t)) }) : n.join(", ");
|
|
43
47
|
}
|
|
44
48
|
if (typeof t == "boolean") return e.kind === "boolean" ? n.booleanLabel(t) : t ? n.fallbackBooleanLabels.yes : n.fallbackBooleanLabels.no;
|
|
45
49
|
if (typeof t != "string" && typeof t != "number") return null;
|
|
46
50
|
let r = String(t).trim();
|
|
47
|
-
return r === "" ? null : e.kind === "entityId" ? /* @__PURE__ */
|
|
51
|
+
return r === "" ? null : e.kind === "entityId" ? /* @__PURE__ */ g(o, {
|
|
48
52
|
entityId: e.entity,
|
|
49
53
|
id: r
|
|
50
54
|
}) : e.kind === "enum" ? n.enumLabel(r) : r;
|
|
51
|
-
},
|
|
55
|
+
}, Oe = (e) => {
|
|
52
56
|
let t = new Date(e);
|
|
53
57
|
if (Number.isNaN(t.getTime())) return e;
|
|
54
58
|
let n = t.getTimezoneOffset() * 6e4;
|
|
55
59
|
return new Date(t.getTime() - n).toISOString().slice(0, 16);
|
|
56
|
-
},
|
|
60
|
+
}, ke = (e) => {
|
|
57
61
|
let t = e.trim();
|
|
58
62
|
if (t === "") return "";
|
|
59
63
|
let n = new Date(t);
|
|
60
64
|
return Number.isNaN(n.getTime()) ? t : n.toISOString();
|
|
61
|
-
},
|
|
62
|
-
let { t:
|
|
65
|
+
}, C = (b) => {
|
|
66
|
+
let { t: C } = le(), { t: w } = e(), { config: T, state: E, pushState: D, rows: O, getRowId: k, columns: A, gridTemplateColumns: Ae, hasNextPage: j, isLoadingMore: M, isRefreshing: N = !1, onLoadMore: je, onRefresh: P, totalCount: F, loadedCountLabel: Me, emptyState: Ne, statusBanner: Pe, header: I, headerActions: Fe, isLoadingInitial: L = !1, variant: Ie = "page", showFilters: Le = !0 } = b, R = T.list, Re = T.listDefaults ?? R.defaultState ?? {
|
|
63
67
|
where: null,
|
|
64
68
|
sort: null
|
|
65
|
-
},
|
|
69
|
+
}, z = p(() => A.some((e) => e.isPrimary === !0) || A.length === 0 ? A : A.map((e, t) => {
|
|
66
70
|
let { header: n } = e;
|
|
67
71
|
return t === 0 ? {
|
|
68
72
|
...e,
|
|
@@ -72,32 +76,32 @@ var x = (e, t) => e(t), Ce = (e, t) => e.fromGraphQL != null && t != null ? e.fr
|
|
|
72
76
|
...e,
|
|
73
77
|
header: n
|
|
74
78
|
};
|
|
75
|
-
}), [
|
|
79
|
+
}), [A]), B = p(() => {
|
|
76
80
|
let e = [];
|
|
77
|
-
for (let t of
|
|
78
|
-
let n =
|
|
81
|
+
for (let t of R.filters) {
|
|
82
|
+
let n = Te(t, E.where), r = De(t, n, {
|
|
79
83
|
enumLabel: (e) => {
|
|
80
84
|
if (t.kind !== "enum") return e;
|
|
81
85
|
let n = t.options.find((t) => t.value === e);
|
|
82
|
-
return n == null ? e :
|
|
86
|
+
return n == null ? e : S(n.label, C);
|
|
83
87
|
},
|
|
84
88
|
booleanLabel: (e) => {
|
|
85
89
|
if (t.kind === "boolean") {
|
|
86
|
-
if (e && t.trueLabel != null) return
|
|
87
|
-
if (!e && t.falseLabel != null) return
|
|
90
|
+
if (e && t.trueLabel != null) return S(t.trueLabel, C);
|
|
91
|
+
if (!e && t.falseLabel != null) return S(t.falseLabel, C);
|
|
88
92
|
}
|
|
89
|
-
return
|
|
93
|
+
return w(e ? "filters.boolean.yes" : "filters.boolean.no");
|
|
90
94
|
},
|
|
91
95
|
fallbackBooleanLabels: {
|
|
92
|
-
yes:
|
|
93
|
-
no:
|
|
96
|
+
yes: w("filters.boolean.yes"),
|
|
97
|
+
no: w("filters.boolean.no")
|
|
94
98
|
}
|
|
95
99
|
});
|
|
96
100
|
if (r != null) {
|
|
97
101
|
let i = String(n);
|
|
98
102
|
Array.isArray(n) && (i = n.join(","));
|
|
99
|
-
let a = /* @__PURE__ */
|
|
100
|
-
|
|
103
|
+
let a = /* @__PURE__ */ _("span", { children: [
|
|
104
|
+
S(t.label, C),
|
|
101
105
|
": ",
|
|
102
106
|
r
|
|
103
107
|
] });
|
|
@@ -105,9 +109,9 @@ var x = (e, t) => e(t), Ce = (e, t) => e.fromGraphQL != null && t != null ? e.fr
|
|
|
105
109
|
id: `${t.id}:${i}`,
|
|
106
110
|
label: a,
|
|
107
111
|
onRemove: () => {
|
|
108
|
-
let e = t.whereKey ?? t.id, n =
|
|
109
|
-
|
|
110
|
-
...
|
|
112
|
+
let e = t.whereKey ?? t.id, n = x(E.where, e, null, t.path);
|
|
113
|
+
D({
|
|
114
|
+
...E,
|
|
111
115
|
where: n
|
|
112
116
|
});
|
|
113
117
|
}
|
|
@@ -116,85 +120,93 @@ var x = (e, t) => e(t), Ce = (e, t) => e.fromGraphQL != null && t != null ? e.fr
|
|
|
116
120
|
}
|
|
117
121
|
return e;
|
|
118
122
|
}, [
|
|
119
|
-
|
|
120
|
-
|
|
123
|
+
R.filters,
|
|
124
|
+
D,
|
|
125
|
+
E,
|
|
121
126
|
w,
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
127
|
+
C
|
|
128
|
+
]), V = f(() => {
|
|
129
|
+
D({ ...Re });
|
|
130
|
+
}, [Re, D]), [ze, Be] = m(!1), [Ve, He] = m(""), H = b.filterDrawerState ?? {
|
|
131
|
+
isOpen: ze,
|
|
132
|
+
search: Ve,
|
|
133
|
+
setOpen: Be,
|
|
134
|
+
setSearch: He,
|
|
135
|
+
reset: () => {
|
|
136
|
+
Be(!1), He("");
|
|
137
|
+
}
|
|
138
|
+
}, Ue = H.isOpen, U = H.search, W = H.setOpen, We = H.setSearch, Ge = H.reset, [G, K] = m(null), q = f((e) => {
|
|
139
|
+
let n = e.whereKey ?? e.id, r = Te(e, E.where), i = "";
|
|
128
140
|
typeof r == "string" && (i = r), typeof r == "number" && Number.isFinite(r) && (i = String(r));
|
|
129
|
-
let
|
|
141
|
+
let s = S(e.label, C);
|
|
130
142
|
if (e.kind === "text") {
|
|
131
|
-
let t =
|
|
132
|
-
return e.placeholderText != null && (t =
|
|
143
|
+
let t = w("filters.placeholders.search", { label: e.placeholderLabel == null ? s : S(e.placeholderLabel, C) });
|
|
144
|
+
return e.placeholderText != null && (t = S(e.placeholderText, C)), /* @__PURE__ */ g(a, {
|
|
133
145
|
value: i,
|
|
134
146
|
onApply: (t) => {
|
|
135
|
-
let r =
|
|
136
|
-
|
|
137
|
-
...
|
|
147
|
+
let r = x(E.where, n, t, e.path);
|
|
148
|
+
D({
|
|
149
|
+
...E,
|
|
138
150
|
where: r
|
|
139
151
|
});
|
|
140
152
|
},
|
|
141
153
|
placeholder: t,
|
|
142
154
|
ariaLabel: t,
|
|
143
|
-
className:
|
|
155
|
+
className: d
|
|
144
156
|
});
|
|
145
157
|
}
|
|
146
158
|
if (e.kind === "datetime") {
|
|
147
|
-
let t =
|
|
148
|
-
return e.placeholderText != null && (t =
|
|
149
|
-
value:
|
|
159
|
+
let t = w("filters.placeholders.search", { label: e.placeholderLabel == null ? s : S(e.placeholderLabel, C) });
|
|
160
|
+
return e.placeholderText != null && (t = S(e.placeholderText, C)), /* @__PURE__ */ g(a, {
|
|
161
|
+
value: Oe(i),
|
|
150
162
|
onApply: (t) => {
|
|
151
|
-
let r =
|
|
152
|
-
|
|
153
|
-
...
|
|
163
|
+
let r = ke(t), i = x(E.where, n, r, e.path);
|
|
164
|
+
D({
|
|
165
|
+
...E,
|
|
154
166
|
where: i
|
|
155
167
|
});
|
|
156
168
|
},
|
|
157
169
|
placeholder: t,
|
|
158
170
|
ariaLabel: t,
|
|
159
|
-
className:
|
|
171
|
+
className: d,
|
|
160
172
|
type: "datetime-local"
|
|
161
173
|
});
|
|
162
174
|
}
|
|
163
175
|
if (e.kind === "number") {
|
|
164
|
-
let t =
|
|
165
|
-
return e.placeholderText != null && (t =
|
|
176
|
+
let t = w("filters.placeholders.search", { label: e.placeholderLabel == null ? s : S(e.placeholderLabel, C) });
|
|
177
|
+
return e.placeholderText != null && (t = S(e.placeholderText, C)), /* @__PURE__ */ g(a, {
|
|
166
178
|
value: i,
|
|
167
179
|
onApply: (t) => {
|
|
168
|
-
let r = t.trim(), i = r === "" ? null : Number(r), a =
|
|
169
|
-
|
|
170
|
-
...
|
|
180
|
+
let r = t.trim(), i = r === "" ? null : Number(r), a = x(E.where, n, Number.isFinite(i) ? i : null, e.path);
|
|
181
|
+
D({
|
|
182
|
+
...E,
|
|
171
183
|
where: a
|
|
172
184
|
});
|
|
173
185
|
},
|
|
174
186
|
placeholder: t,
|
|
175
187
|
ariaLabel: t,
|
|
176
|
-
className:
|
|
188
|
+
className: d,
|
|
177
189
|
inputMode: e.inputMode ?? "numeric",
|
|
178
190
|
type: "text"
|
|
179
191
|
});
|
|
180
192
|
}
|
|
181
|
-
if (e.kind === "enum") return /* @__PURE__ */
|
|
193
|
+
if (e.kind === "enum") return /* @__PURE__ */ g(y, {
|
|
182
194
|
options: [{
|
|
183
195
|
id: "any",
|
|
184
196
|
value: "",
|
|
185
|
-
label:
|
|
197
|
+
label: w("filters.all", { label: s })
|
|
186
198
|
}, ...e.options.map((e) => ({
|
|
187
199
|
id: e.value,
|
|
188
200
|
value: e.value,
|
|
189
|
-
label:
|
|
201
|
+
label: S(e.label, C)
|
|
190
202
|
}))],
|
|
191
203
|
value: i,
|
|
192
204
|
size: "small",
|
|
193
|
-
ariaLabel:
|
|
205
|
+
ariaLabel: s,
|
|
194
206
|
onChange: (t) => {
|
|
195
|
-
let r =
|
|
196
|
-
|
|
197
|
-
...
|
|
207
|
+
let r = x(E.where, n, t, e.path);
|
|
208
|
+
D({
|
|
209
|
+
...E,
|
|
198
210
|
where: r
|
|
199
211
|
});
|
|
200
212
|
}
|
|
@@ -204,13 +216,13 @@ var x = (e, t) => e(t), Ce = (e, t) => e.fromGraphQL != null && t != null ? e.fr
|
|
|
204
216
|
typeof r == "boolean" && (t = r);
|
|
205
217
|
let i = "";
|
|
206
218
|
t === !0 && (i = "true"), t === !1 && (i = "false");
|
|
207
|
-
let a = e.trueLabel == null ?
|
|
208
|
-
return /* @__PURE__ */
|
|
219
|
+
let a = e.trueLabel == null ? w("filters.boolean.yes") : S(e.trueLabel, C), o = e.falseLabel == null ? w("filters.boolean.no") : S(e.falseLabel, C);
|
|
220
|
+
return /* @__PURE__ */ g(y, {
|
|
209
221
|
options: [
|
|
210
222
|
{
|
|
211
223
|
id: "any",
|
|
212
224
|
value: "",
|
|
213
|
-
label:
|
|
225
|
+
label: w("filters.all", { label: s })
|
|
214
226
|
},
|
|
215
227
|
{
|
|
216
228
|
id: "true",
|
|
@@ -220,136 +232,186 @@ var x = (e, t) => e(t), Ce = (e, t) => e.fromGraphQL != null && t != null ? e.fr
|
|
|
220
232
|
{
|
|
221
233
|
id: "false",
|
|
222
234
|
value: "false",
|
|
223
|
-
label:
|
|
235
|
+
label: o
|
|
224
236
|
}
|
|
225
237
|
],
|
|
226
238
|
value: i,
|
|
227
239
|
size: "small",
|
|
228
|
-
ariaLabel:
|
|
240
|
+
ariaLabel: s,
|
|
229
241
|
onChange: (t) => {
|
|
230
242
|
let r = null;
|
|
231
243
|
t === "true" && (r = !0), t === "false" && (r = !1);
|
|
232
|
-
let i =
|
|
233
|
-
|
|
234
|
-
...
|
|
244
|
+
let i = x(E.where, n, r, e.path);
|
|
245
|
+
D({
|
|
246
|
+
...E,
|
|
235
247
|
where: i
|
|
236
248
|
});
|
|
237
249
|
}
|
|
238
250
|
});
|
|
239
251
|
}
|
|
252
|
+
let c = (() => {
|
|
253
|
+
if (e.pickerScope != null) return typeof e.pickerScope == "function" ? e.pickerScope(E.where) : e.pickerScope;
|
|
254
|
+
})();
|
|
255
|
+
if (e.kind === "entityIdList") {
|
|
256
|
+
let i = Ee(r), a = i.length, ee = a === 0 ? null : w("filters.selectedEntities", { count: a }), l = (t) => {
|
|
257
|
+
let r = i.filter((e) => e !== t), a = x(E.where, n, r.length === 0 ? null : r, e.path);
|
|
258
|
+
D({
|
|
259
|
+
...E,
|
|
260
|
+
where: a
|
|
261
|
+
});
|
|
262
|
+
};
|
|
263
|
+
return /* @__PURE__ */ _("div", {
|
|
264
|
+
className: re,
|
|
265
|
+
children: [/* @__PURE__ */ g(t, {
|
|
266
|
+
label: s,
|
|
267
|
+
value: a === 0 ? null : i.join(","),
|
|
268
|
+
displayValue: ee,
|
|
269
|
+
placeholder: w("filters.placeholders.anyEntity", { label: s }),
|
|
270
|
+
onPick: () => {
|
|
271
|
+
K({
|
|
272
|
+
entity: e.entity,
|
|
273
|
+
whereKey: n,
|
|
274
|
+
label: s,
|
|
275
|
+
mode: "list",
|
|
276
|
+
currentIds: i,
|
|
277
|
+
path: e.path,
|
|
278
|
+
scope: c
|
|
279
|
+
});
|
|
280
|
+
},
|
|
281
|
+
onClear: () => {
|
|
282
|
+
let t = x(E.where, n, null, e.path);
|
|
283
|
+
D({
|
|
284
|
+
...E,
|
|
285
|
+
where: t
|
|
286
|
+
});
|
|
287
|
+
}
|
|
288
|
+
}), i.length > 0 ? /* @__PURE__ */ g("div", {
|
|
289
|
+
className: ie,
|
|
290
|
+
children: i.map((t) => /* @__PURE__ */ g(fe, {
|
|
291
|
+
removeLabel: w("filters.actions.removeFilterValue", { label: s }),
|
|
292
|
+
onRemove: () => {
|
|
293
|
+
l(t);
|
|
294
|
+
},
|
|
295
|
+
children: /* @__PURE__ */ g(o, {
|
|
296
|
+
entityId: e.entity,
|
|
297
|
+
id: t
|
|
298
|
+
})
|
|
299
|
+
}, t))
|
|
300
|
+
}) : null]
|
|
301
|
+
});
|
|
302
|
+
}
|
|
240
303
|
if (e.kind === "stringList") {
|
|
241
|
-
let t =
|
|
242
|
-
return e.placeholderText != null && (t =
|
|
304
|
+
let t = w("filters.placeholders.search", { label: e.placeholderLabel == null ? s : S(e.placeholderLabel, C) });
|
|
305
|
+
return e.placeholderText != null && (t = S(e.placeholderText, C)), /* @__PURE__ */ g(a, {
|
|
243
306
|
value: i,
|
|
244
307
|
onApply: (t) => {
|
|
245
|
-
let r = t.split(/[\n,]+/u).map((e) => e.trim()).filter((e) => e !== ""), i =
|
|
246
|
-
|
|
247
|
-
...
|
|
308
|
+
let r = t.split(/[\n,]+/u).map((e) => e.trim()).filter((e) => e !== ""), i = x(E.where, n, r, e.path);
|
|
309
|
+
D({
|
|
310
|
+
...E,
|
|
248
311
|
where: i
|
|
249
312
|
});
|
|
250
313
|
},
|
|
251
314
|
placeholder: t,
|
|
252
315
|
ariaLabel: t,
|
|
253
|
-
className:
|
|
316
|
+
className: d
|
|
254
317
|
});
|
|
255
318
|
}
|
|
256
|
-
let
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
typeof r == "string" && (c = r);
|
|
260
|
-
let l = (r = null, i = !1) => {
|
|
319
|
+
let l = null;
|
|
320
|
+
typeof r == "string" && (l = r);
|
|
321
|
+
let u = (r = null, i = !1) => {
|
|
261
322
|
let a = r?.trim() ?? "";
|
|
262
|
-
return /* @__PURE__ */
|
|
263
|
-
label:
|
|
264
|
-
value:
|
|
323
|
+
return /* @__PURE__ */ g(t, {
|
|
324
|
+
label: s,
|
|
325
|
+
value: l,
|
|
265
326
|
displayValue: a,
|
|
266
327
|
isResolving: i,
|
|
267
|
-
placeholder:
|
|
328
|
+
placeholder: w("filters.placeholders.anyEntity", { label: s }),
|
|
268
329
|
onPick: () => {
|
|
269
|
-
|
|
330
|
+
K({
|
|
270
331
|
entity: e.entity,
|
|
271
332
|
whereKey: n,
|
|
272
|
-
label:
|
|
333
|
+
label: s,
|
|
334
|
+
mode: "single",
|
|
273
335
|
path: e.path,
|
|
274
|
-
scope:
|
|
336
|
+
scope: c
|
|
275
337
|
});
|
|
276
338
|
},
|
|
277
339
|
onClear: () => {
|
|
278
|
-
let t =
|
|
279
|
-
|
|
280
|
-
...
|
|
340
|
+
let t = x(E.where, n, null, e.path);
|
|
341
|
+
D({
|
|
342
|
+
...E,
|
|
281
343
|
where: t
|
|
282
344
|
});
|
|
283
345
|
}
|
|
284
346
|
});
|
|
285
347
|
};
|
|
286
|
-
return
|
|
348
|
+
return l == null || l.trim() === "" ? u() : /* @__PURE__ */ g(ee, {
|
|
287
349
|
entityId: e.entity,
|
|
288
|
-
id:
|
|
350
|
+
id: l,
|
|
289
351
|
children: (e, t) => {
|
|
290
352
|
let n = t?.status === "loading";
|
|
291
|
-
return
|
|
353
|
+
return u(n ? w("common.loading") : e, n);
|
|
292
354
|
}
|
|
293
355
|
});
|
|
294
356
|
}, [
|
|
295
|
-
|
|
357
|
+
D,
|
|
358
|
+
E,
|
|
296
359
|
w,
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
return Fe ? B.filters.filter((e) => e.placement === "quick" || e.placement === "both") : B.filters.slice(0, e);
|
|
360
|
+
C
|
|
361
|
+
]), Ke = p(() => R.filters.some((e) => e.placement != null), [R.filters]), J = p(() => {
|
|
362
|
+
if (R.filters.length === 0) return [];
|
|
363
|
+
let e = R.ui?.toolbar?.maxPromotedFilters ?? 3;
|
|
364
|
+
return Ke ? R.filters.filter((e) => e.placement === "quick" || e.placement === "both") : R.filters.slice(0, e);
|
|
303
365
|
}, [
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
]), Y =
|
|
366
|
+
R.filters,
|
|
367
|
+
R.ui?.toolbar,
|
|
368
|
+
Ke
|
|
369
|
+
]), Y = p(() => R.filters.filter((e) => e.placement == null ? !0 : e.placement === "drawer" || e.placement === "both"), [R.filters]), X = p(() => J.find((e) => e.kind === "text"), [J]), qe = p(() => {
|
|
308
370
|
let e = J.filter((e) => e !== X);
|
|
309
|
-
return e.length === 0 ? null : /* @__PURE__ */
|
|
310
|
-
className:
|
|
311
|
-
children: e.map((e) => /* @__PURE__ */
|
|
371
|
+
return e.length === 0 ? null : /* @__PURE__ */ g("div", {
|
|
372
|
+
className: u,
|
|
373
|
+
children: e.map((e) => /* @__PURE__ */ g("span", { children: q(e) }, e.id))
|
|
312
374
|
});
|
|
313
375
|
}, [
|
|
314
376
|
J,
|
|
315
377
|
q,
|
|
316
378
|
X
|
|
317
|
-
]),
|
|
318
|
-
if (
|
|
319
|
-
let e =
|
|
320
|
-
return e == null ? null : /* @__PURE__ */
|
|
321
|
-
options:
|
|
379
|
+
]), Je = p(() => X == null ? null : q(X), [q, X]), Ye = p(() => {
|
|
380
|
+
if (R.sorts.length === 0) return null;
|
|
381
|
+
let e = R.sorts[0];
|
|
382
|
+
return e == null ? null : /* @__PURE__ */ g(y, {
|
|
383
|
+
options: R.sorts.map((e) => ({
|
|
322
384
|
id: e.id,
|
|
323
385
|
value: e.id,
|
|
324
|
-
label:
|
|
386
|
+
label: S(e.label, C)
|
|
325
387
|
})),
|
|
326
|
-
value:
|
|
388
|
+
value: E.sort ?? e.id,
|
|
327
389
|
size: "small",
|
|
328
|
-
ariaLabel:
|
|
390
|
+
ariaLabel: w("list.sort.label"),
|
|
329
391
|
onChange: (e) => {
|
|
330
|
-
|
|
331
|
-
...
|
|
392
|
+
D({
|
|
393
|
+
...E,
|
|
332
394
|
sort: e
|
|
333
395
|
});
|
|
334
396
|
}
|
|
335
397
|
});
|
|
336
398
|
}, [
|
|
337
|
-
|
|
338
|
-
|
|
399
|
+
R.sorts,
|
|
400
|
+
D,
|
|
401
|
+
E,
|
|
339
402
|
w,
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
}), [H, U]), Be = f(() => {
|
|
403
|
+
C
|
|
404
|
+
]), Xe = p(() => B.length === 0 ? null : /* @__PURE__ */ g(ye, {
|
|
405
|
+
chips: B,
|
|
406
|
+
onClearAll: V
|
|
407
|
+
}), [B, V]), Ze = p(() => {
|
|
346
408
|
if (Y.length === 0) return [];
|
|
347
|
-
let e =
|
|
409
|
+
let e = U.trim().toLowerCase(), t = [];
|
|
348
410
|
for (let n of Y) {
|
|
349
|
-
let r =
|
|
411
|
+
let r = S(n.label, C);
|
|
350
412
|
(e === "" || r.toLowerCase().includes(e)) && t.push({
|
|
351
413
|
id: n.id,
|
|
352
|
-
node: /* @__PURE__ */
|
|
414
|
+
node: /* @__PURE__ */ g(me, {
|
|
353
415
|
label: r,
|
|
354
416
|
children: q(n)
|
|
355
417
|
})
|
|
@@ -357,19 +419,19 @@ var x = (e, t) => e(t), Ce = (e, t) => e.fromGraphQL != null && t != null ? e.fr
|
|
|
357
419
|
}
|
|
358
420
|
return t.length === 0 ? [] : [{
|
|
359
421
|
id: "backoffice.filters.sections.default",
|
|
360
|
-
title:
|
|
422
|
+
title: w("filters.sections.default"),
|
|
361
423
|
items: t
|
|
362
424
|
}];
|
|
363
425
|
}, [
|
|
364
426
|
Y,
|
|
365
|
-
|
|
427
|
+
U,
|
|
366
428
|
q,
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
]),
|
|
429
|
+
w,
|
|
430
|
+
C
|
|
431
|
+
]), Qe = p(() => {
|
|
370
432
|
if (Y.length === 0) return null;
|
|
371
|
-
let e =
|
|
372
|
-
return e > 0 && (t =
|
|
433
|
+
let e = B.length, t = w("filters.trigger");
|
|
434
|
+
return e > 0 && (t = w("filters.triggerWithCount", { count: e })), /* @__PURE__ */ g(v, {
|
|
373
435
|
type: "button",
|
|
374
436
|
variant: "secondary",
|
|
375
437
|
size: "small",
|
|
@@ -379,226 +441,235 @@ var x = (e, t) => e(t), Ce = (e, t) => e.fromGraphQL != null && t != null ? e.fr
|
|
|
379
441
|
children: t
|
|
380
442
|
});
|
|
381
443
|
}, [
|
|
382
|
-
|
|
444
|
+
B.length,
|
|
383
445
|
Y.length,
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
446
|
+
W,
|
|
447
|
+
w
|
|
448
|
+
]), $e = /* @__PURE__ */ g(pe, {
|
|
449
|
+
isOpen: Ue,
|
|
387
450
|
onClose: () => {
|
|
388
|
-
|
|
451
|
+
Ge();
|
|
389
452
|
},
|
|
390
|
-
sections:
|
|
391
|
-
searchValue:
|
|
453
|
+
sections: Ze,
|
|
454
|
+
searchValue: U,
|
|
392
455
|
onSearchChange: (e) => {
|
|
393
|
-
|
|
456
|
+
We(e);
|
|
394
457
|
},
|
|
395
|
-
onReset:
|
|
396
|
-
emptyLabel:
|
|
397
|
-
}),
|
|
458
|
+
onReset: V,
|
|
459
|
+
emptyLabel: U.trim() === "" ? void 0 : w("filters.drawer.emptySearchResults")
|
|
460
|
+
}), et = p(() => Ne ?? (L ? /* @__PURE__ */ g(ve, {
|
|
398
461
|
variant: "embedded",
|
|
399
|
-
ariaLabel:
|
|
400
|
-
}) :
|
|
401
|
-
title:
|
|
402
|
-
description:
|
|
403
|
-
actions: /* @__PURE__ */
|
|
462
|
+
ariaLabel: w("common.loading")
|
|
463
|
+
}) : B.length > 0 ? /* @__PURE__ */ g(de, {
|
|
464
|
+
title: w("emptyState.listEmpty.title"),
|
|
465
|
+
description: w("emptyState.listEmptyFiltered.description"),
|
|
466
|
+
actions: /* @__PURE__ */ g(v, {
|
|
404
467
|
type: "button",
|
|
405
468
|
variant: "secondary",
|
|
406
469
|
size: "small",
|
|
407
|
-
onClick:
|
|
408
|
-
children:
|
|
470
|
+
onClick: V,
|
|
471
|
+
children: w("emptyState.listEmptyFiltered.actions.reset")
|
|
409
472
|
})
|
|
410
|
-
}) : /* @__PURE__ */
|
|
411
|
-
title:
|
|
412
|
-
description:
|
|
473
|
+
}) : /* @__PURE__ */ g(de, {
|
|
474
|
+
title: w("emptyState.listEmpty.title"),
|
|
475
|
+
description: w("emptyState.listEmpty.description")
|
|
413
476
|
})), [
|
|
414
|
-
|
|
477
|
+
B.length,
|
|
478
|
+
Ne,
|
|
479
|
+
V,
|
|
415
480
|
L,
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
]), We = f(() => I ?? (typeof F == "number" ? /* @__PURE__ */ h("span", { children: S("list.showing", {
|
|
420
|
-
shown: E.length,
|
|
481
|
+
w
|
|
482
|
+
]), tt = p(() => Me ?? (typeof F == "number" ? /* @__PURE__ */ g("span", { children: w("list.showing", {
|
|
483
|
+
shown: O.length,
|
|
421
484
|
total: F
|
|
422
|
-
}) }) :
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
485
|
+
}) }) : O.length === 0 ? null : /* @__PURE__ */ g("span", { children: w("list.loaded", { count: O.length }) })), [
|
|
486
|
+
Me,
|
|
487
|
+
O.length,
|
|
488
|
+
w,
|
|
426
489
|
F
|
|
427
|
-
]), Z =
|
|
428
|
-
let e =
|
|
429
|
-
return
|
|
430
|
-
kind:
|
|
490
|
+
]), Z = p(() => {
|
|
491
|
+
let e = R.ui?.displayMode ?? R.responsive?.mode ?? "auto";
|
|
492
|
+
return we({
|
|
493
|
+
kind: R.kind,
|
|
431
494
|
displayMode: e,
|
|
432
|
-
ui:
|
|
495
|
+
ui: R.ui
|
|
433
496
|
});
|
|
434
497
|
}, [
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
]), Q = typeof F == "number" &&
|
|
439
|
-
|
|
498
|
+
R.kind,
|
|
499
|
+
R.responsive?.mode,
|
|
500
|
+
R.ui
|
|
501
|
+
]), Q = typeof F == "number" && O.length < F && !j;
|
|
502
|
+
se(() => {
|
|
440
503
|
!Q || !Z.infiniteScroll.showInconsistentPageInfo || !l() || console.warn("Backoffice list received inconsistent pageInfo: loaded rows are lower than totalCount but hasNextPage is false.", {
|
|
441
|
-
entityId:
|
|
442
|
-
loadedCount:
|
|
504
|
+
entityId: T.id,
|
|
505
|
+
loadedCount: O.length,
|
|
443
506
|
totalCount: F
|
|
444
507
|
});
|
|
445
508
|
}, [
|
|
446
|
-
|
|
509
|
+
T.id,
|
|
447
510
|
Q,
|
|
448
|
-
|
|
511
|
+
O.length,
|
|
449
512
|
Z.infiniteScroll.showInconsistentPageInfo,
|
|
450
513
|
F
|
|
451
514
|
]);
|
|
452
|
-
let
|
|
453
|
-
enabled: !
|
|
454
|
-
hasNextPage:
|
|
455
|
-
isLoading:
|
|
456
|
-
onIntersect:
|
|
515
|
+
let nt = b.virtualize === !0 || Z.virtualization.enabled, { sentinelRef: rt } = c({
|
|
516
|
+
enabled: !nt && Z.infiniteScroll.enabled,
|
|
517
|
+
hasNextPage: j,
|
|
518
|
+
isLoading: M,
|
|
519
|
+
onIntersect: je,
|
|
457
520
|
rootMargin: Z.infiniteScroll.rootMargin,
|
|
458
521
|
threshold: Z.infiniteScroll.threshold
|
|
459
|
-
}),
|
|
522
|
+
}), it = I?.title ?? S(R.title, C), at = I?.subtitle, ot = z.find((e) => e.mobileRole === "action" || e.id === "actions"), st = R.ui?.displayMode ?? R.responsive?.mode ?? "auto", ct = R.ui?.density ?? R.responsive?.density ?? "compact", lt = /* @__PURE__ */ g(n, {
|
|
460
523
|
fallback: (e) => {
|
|
461
524
|
let { reset: t } = e;
|
|
462
|
-
return /* @__PURE__ */
|
|
525
|
+
return /* @__PURE__ */ g(ce, {
|
|
463
526
|
tone: "danger",
|
|
464
|
-
title:
|
|
465
|
-
actions: /* @__PURE__ */
|
|
527
|
+
title: w("list.errors.title"),
|
|
528
|
+
actions: /* @__PURE__ */ g(v, {
|
|
466
529
|
type: "button",
|
|
467
530
|
variant: "secondary",
|
|
468
531
|
size: "small",
|
|
469
532
|
onClick: () => {
|
|
470
533
|
t(), P?.();
|
|
471
534
|
},
|
|
472
|
-
children:
|
|
535
|
+
children: w("list.actions.retry")
|
|
473
536
|
}),
|
|
474
|
-
children:
|
|
537
|
+
children: w("list.errors.tableFailed")
|
|
475
538
|
});
|
|
476
539
|
},
|
|
477
|
-
children:
|
|
478
|
-
columns:
|
|
479
|
-
rows:
|
|
480
|
-
getRowId:
|
|
481
|
-
emptyState:
|
|
482
|
-
className:
|
|
483
|
-
gridTemplateColumns:
|
|
540
|
+
children: nt ? /* @__PURE__ */ g(Se, {
|
|
541
|
+
columns: z,
|
|
542
|
+
rows: O,
|
|
543
|
+
getRowId: k,
|
|
544
|
+
emptyState: et,
|
|
545
|
+
className: Ce,
|
|
546
|
+
gridTemplateColumns: Ae,
|
|
484
547
|
virtualization: Z.virtualization,
|
|
485
548
|
infiniteScroll: {
|
|
486
549
|
enabled: Z.infiniteScroll.enabled,
|
|
487
550
|
thresholdPx: Z.infiniteScroll.thresholdPx,
|
|
488
551
|
autoLoad: Z.infiniteScroll.autoLoad
|
|
489
552
|
},
|
|
490
|
-
hasNextPage:
|
|
491
|
-
isLoadingMore:
|
|
492
|
-
onLoadMore:
|
|
553
|
+
hasNextPage: j,
|
|
554
|
+
isLoadingMore: M,
|
|
555
|
+
onLoadMore: je,
|
|
493
556
|
bodyScrollMode: s
|
|
494
|
-
}) : /* @__PURE__ */
|
|
495
|
-
columns:
|
|
496
|
-
rows:
|
|
497
|
-
getRowId:
|
|
498
|
-
emptyState:
|
|
499
|
-
className:
|
|
500
|
-
gridTemplateColumns:
|
|
501
|
-
mode:
|
|
502
|
-
density:
|
|
557
|
+
}) : /* @__PURE__ */ g(xe, {
|
|
558
|
+
columns: z,
|
|
559
|
+
rows: O,
|
|
560
|
+
getRowId: k,
|
|
561
|
+
emptyState: et,
|
|
562
|
+
className: Ce,
|
|
563
|
+
gridTemplateColumns: Ae,
|
|
564
|
+
mode: st,
|
|
565
|
+
density: ct,
|
|
503
566
|
bodyScrollMode: s,
|
|
504
|
-
bodyFooterNode: Z.infiniteScroll.enabled ? /* @__PURE__ */
|
|
505
|
-
ref:
|
|
567
|
+
bodyFooterNode: Z.infiniteScroll.enabled ? /* @__PURE__ */ g("div", {
|
|
568
|
+
ref: rt,
|
|
506
569
|
"aria-hidden": "true"
|
|
507
570
|
}) : null,
|
|
508
|
-
renderAction: (e) =>
|
|
571
|
+
renderAction: (e) => ot?.cell(e) ?? null
|
|
509
572
|
})
|
|
510
|
-
}),
|
|
511
|
-
search:
|
|
512
|
-
primaryFilters:
|
|
513
|
-
filterDrawerTrigger:
|
|
514
|
-
sort:
|
|
515
|
-
utilityActions: P == null ? null : /* @__PURE__ */
|
|
573
|
+
}), ut = Le ? /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ g(_e, {
|
|
574
|
+
search: Je,
|
|
575
|
+
primaryFilters: qe,
|
|
576
|
+
filterDrawerTrigger: Qe,
|
|
577
|
+
sort: Ye,
|
|
578
|
+
utilityActions: P == null ? null : /* @__PURE__ */ g(v, {
|
|
516
579
|
type: "button",
|
|
517
580
|
variant: "secondary",
|
|
518
581
|
size: "small",
|
|
519
|
-
isLoading:
|
|
520
|
-
loadingLabel:
|
|
582
|
+
isLoading: N,
|
|
583
|
+
loadingLabel: w("list.actions.refreshing"),
|
|
521
584
|
onClick: () => {
|
|
522
585
|
P();
|
|
523
586
|
},
|
|
524
|
-
children:
|
|
587
|
+
children: w("list.actions.refresh")
|
|
525
588
|
}),
|
|
526
|
-
chips:
|
|
589
|
+
chips: Xe,
|
|
527
590
|
density: "compact"
|
|
528
|
-
}),
|
|
529
|
-
className:
|
|
530
|
-
"aria-busy":
|
|
591
|
+
}), $e] }) : null, dt = /* @__PURE__ */ _("div", {
|
|
592
|
+
className: oe,
|
|
593
|
+
"aria-busy": N ? "true" : void 0,
|
|
531
594
|
children: [
|
|
532
|
-
|
|
533
|
-
className:
|
|
595
|
+
N && !L ? /* @__PURE__ */ _("div", {
|
|
596
|
+
className: ae,
|
|
534
597
|
role: "status",
|
|
535
|
-
children: [/* @__PURE__ */
|
|
598
|
+
children: [/* @__PURE__ */ g(ue, {
|
|
536
599
|
size: 14,
|
|
537
|
-
ariaLabel:
|
|
538
|
-
}), /* @__PURE__ */
|
|
600
|
+
ariaLabel: w("list.refreshingRows")
|
|
601
|
+
}), /* @__PURE__ */ g("span", { children: w("list.refreshingRows") })]
|
|
539
602
|
}) : null,
|
|
540
|
-
|
|
541
|
-
/* @__PURE__ */
|
|
542
|
-
isOpen:
|
|
543
|
-
entity:
|
|
544
|
-
title:
|
|
545
|
-
scope:
|
|
603
|
+
lt,
|
|
604
|
+
/* @__PURE__ */ g(r, {
|
|
605
|
+
isOpen: G != null,
|
|
606
|
+
entity: G?.entity ?? T.id,
|
|
607
|
+
title: G?.label ?? w("picker.title"),
|
|
608
|
+
scope: G?.scope,
|
|
546
609
|
onClose: () => {
|
|
547
|
-
|
|
610
|
+
K(null);
|
|
548
611
|
},
|
|
549
612
|
onSelectId: (e) => {
|
|
550
|
-
if (
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
613
|
+
if (G == null) return;
|
|
614
|
+
if (G.mode === "list") {
|
|
615
|
+
let t = G.currentIds ?? [], n = t.includes(e) ? t : [...t, e], r = x(E.where, G.whereKey, n, G.path);
|
|
616
|
+
W(!0), D({
|
|
617
|
+
...E,
|
|
618
|
+
where: r
|
|
619
|
+
});
|
|
620
|
+
return;
|
|
621
|
+
}
|
|
622
|
+
let t = x(E.where, G.whereKey, e, G.path);
|
|
623
|
+
W(!0), D({
|
|
624
|
+
...E,
|
|
554
625
|
where: t
|
|
555
626
|
});
|
|
556
627
|
}
|
|
557
628
|
})
|
|
558
629
|
]
|
|
559
|
-
}), $ =
|
|
630
|
+
}), $ = O.length > 0 || M || j ? /* @__PURE__ */ g(h, { children: /* @__PURE__ */ g(he, {
|
|
560
631
|
mode: "status",
|
|
561
|
-
loadedCount:
|
|
632
|
+
loadedCount: O.length,
|
|
562
633
|
totalCount: F,
|
|
563
|
-
hasNextPage:
|
|
564
|
-
isLoading:
|
|
565
|
-
pageInfoState: Q ? "inconsistent" :
|
|
634
|
+
hasNextPage: j,
|
|
635
|
+
isLoading: M,
|
|
636
|
+
pageInfoState: Q ? "inconsistent" : M ? "loading" : j ? "ready" : "complete",
|
|
566
637
|
labels: {
|
|
567
|
-
loaded:
|
|
568
|
-
loading:
|
|
569
|
-
end:
|
|
638
|
+
loaded: tt,
|
|
639
|
+
loading: w("list.loadMore.loading"),
|
|
640
|
+
end: w("list.loadMore.end")
|
|
570
641
|
}
|
|
571
642
|
}) }) : null;
|
|
572
|
-
return
|
|
573
|
-
config:
|
|
574
|
-
state:
|
|
575
|
-
pushState:
|
|
576
|
-
children: /* @__PURE__ */
|
|
577
|
-
className:
|
|
643
|
+
return Ie === "embedded" ? /* @__PURE__ */ g(i, {
|
|
644
|
+
config: T,
|
|
645
|
+
state: E,
|
|
646
|
+
pushState: D,
|
|
647
|
+
children: /* @__PURE__ */ _("div", {
|
|
648
|
+
className: te,
|
|
578
649
|
children: [
|
|
579
|
-
/* @__PURE__ */
|
|
580
|
-
className:
|
|
581
|
-
children:
|
|
650
|
+
/* @__PURE__ */ g("div", {
|
|
651
|
+
className: ne,
|
|
652
|
+
children: it
|
|
582
653
|
}),
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
654
|
+
ut,
|
|
655
|
+
Pe,
|
|
656
|
+
dt,
|
|
586
657
|
$
|
|
587
658
|
]
|
|
588
659
|
})
|
|
589
|
-
}) : /* @__PURE__ */
|
|
590
|
-
config:
|
|
591
|
-
state:
|
|
592
|
-
pushState:
|
|
593
|
-
children: /* @__PURE__ */
|
|
594
|
-
headerNode: /* @__PURE__ */
|
|
595
|
-
title:
|
|
596
|
-
subtitle:
|
|
597
|
-
actions:
|
|
660
|
+
}) : /* @__PURE__ */ g(i, {
|
|
661
|
+
config: T,
|
|
662
|
+
state: E,
|
|
663
|
+
pushState: D,
|
|
664
|
+
children: /* @__PURE__ */ g(be, {
|
|
665
|
+
headerNode: /* @__PURE__ */ g(ge, {
|
|
666
|
+
title: it,
|
|
667
|
+
subtitle: at,
|
|
668
|
+
actions: Fe
|
|
598
669
|
}),
|
|
599
|
-
toolbarNode:
|
|
600
|
-
statusNode:
|
|
601
|
-
tableNode:
|
|
670
|
+
toolbarNode: ut,
|
|
671
|
+
statusNode: Pe,
|
|
672
|
+
tableNode: dt,
|
|
602
673
|
tableFooterNode: $,
|
|
603
674
|
presentation: "flat",
|
|
604
675
|
bodyScrollMode: s
|
|
@@ -606,6 +677,6 @@ var x = (e, t) => e(t), Ce = (e, t) => e.fromGraphQL != null && t != null ? e.fr
|
|
|
606
677
|
});
|
|
607
678
|
};
|
|
608
679
|
//#endregion
|
|
609
|
-
export {
|
|
680
|
+
export { C as BackofficeEntityListScaffold, C as default };
|
|
610
681
|
|
|
611
682
|
//# sourceMappingURL=BackofficeEntityListScaffold.js.map
|