@panneau/lists 5.0.0-alpha.12 → 5.0.0-alpha.13
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/README.md +13 -11
- package/dist/List.d.ts +1 -1
- package/dist/List.d.ts.map +1 -1
- package/dist/List.js +29 -50
- package/dist/List.js.map +1 -1
- package/dist/ListView.d.ts +34 -5
- package/dist/ListView.d.ts.map +1 -1
- package/dist/ListView.js +416 -359
- package/dist/ListView.js.map +1 -1
- package/dist/columns.d.ts +10 -0
- package/dist/columns.d.ts.map +1 -0
- package/dist/columns.js +25 -0
- package/dist/columns.js.map +1 -0
- package/dist/displays/Displays.css +12 -0
- package/dist/displays/Displays.module.js +6 -2
- package/dist/displays/Displays.module.js.map +1 -1
- package/dist/displays/displays.d.ts +11 -1
- package/dist/displays/displays.d.ts.map +1 -1
- package/dist/displays/displays.js +185 -22
- package/dist/displays/displays.js.map +1 -1
- package/dist/images.d.ts +6 -0
- package/dist/images.d.ts.map +1 -0
- package/dist/images.js +18 -0
- package/dist/images.js.map +1 -0
- package/dist/index.d.ts +5 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -2
- package/dist/inline/Inline.css +58 -0
- package/dist/inline/Inline.module.js +20 -0
- package/dist/inline/Inline.module.js.map +1 -0
- package/dist/inline/InlineCell.d.ts +27 -0
- package/dist/inline/InlineCell.d.ts.map +1 -0
- package/dist/inline/InlineCell.js +471 -0
- package/dist/inline/InlineCell.js.map +1 -0
- package/dist/inline/editable.d.ts +12 -0
- package/dist/inline/editable.d.ts.map +1 -0
- package/dist/inline/editable.js +29 -0
- package/dist/inline/editable.js.map +1 -0
- package/dist/layouts/CalendarLayout.css +153 -0
- package/dist/layouts/CalendarLayout.d.ts +9 -0
- package/dist/layouts/CalendarLayout.d.ts.map +1 -0
- package/dist/layouts/CalendarLayout.js +298 -0
- package/dist/layouts/CalendarLayout.js.map +1 -0
- package/dist/layouts/CalendarLayout.module.js +28 -0
- package/dist/layouts/CalendarLayout.module.js.map +1 -0
- package/dist/layouts/CardsLayout.js +1 -1
- package/dist/layouts/GalleryLayout.css +80 -0
- package/dist/layouts/GalleryLayout.d.ts +8 -0
- package/dist/layouts/GalleryLayout.d.ts.map +1 -0
- package/dist/layouts/GalleryLayout.js +129 -0
- package/dist/layouts/GalleryLayout.js.map +1 -0
- package/dist/layouts/GalleryLayout.module.js +26 -0
- package/dist/layouts/GalleryLayout.module.js.map +1 -0
- package/dist/layouts/TableLayout.d.ts +1 -1
- package/dist/layouts/TableLayout.d.ts.map +1 -1
- package/dist/layouts/TableLayout.js +44 -39
- package/dist/layouts/TableLayout.js.map +1 -1
- package/dist/layouts/builtIn.d.ts +1 -1
- package/dist/layouts/builtIn.d.ts.map +1 -1
- package/dist/layouts/builtIn.js +6 -2
- package/dist/layouts/builtIn.js.map +1 -1
- package/dist/toolbar/ColumnMenu.d.ts +17 -0
- package/dist/toolbar/ColumnMenu.d.ts.map +1 -0
- package/dist/toolbar/ColumnMenu.js +193 -0
- package/dist/toolbar/ColumnMenu.js.map +1 -0
- package/dist/toolbar/LayoutSwitch.d.ts.map +1 -1
- package/dist/toolbar/LayoutSwitch.js +73 -55
- package/dist/toolbar/LayoutSwitch.js.map +1 -1
- package/dist/toolbar/Toolbar.css +36 -0
- package/dist/toolbar/Toolbar.module.js +12 -2
- package/dist/toolbar/Toolbar.module.js.map +1 -1
- package/dist/types.d.ts +42 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/values.d.ts +1 -0
- package/dist/values.d.ts.map +1 -1
- package/dist/values.js +1 -1
- package/dist/values.js.map +1 -1
- package/package.json +7 -7
package/dist/ListView.js
CHANGED
|
@@ -9,14 +9,19 @@ import { ListSkeleton } from "./ListSkeleton.js";
|
|
|
9
9
|
import ListView_module_default from "./ListView.module.js";
|
|
10
10
|
import { ActionButton } from "./actions/ActionButton.js";
|
|
11
11
|
import { RowActions } from "./actions/RowActions.js";
|
|
12
|
+
import { getShownColumns } from "./columns.js";
|
|
12
13
|
import { FilterChips, FilterControls, useFilterLabels } from "./filters/Filters.js";
|
|
14
|
+
import { getImageUrl } from "./images.js";
|
|
15
|
+
import { InlineCell } from "./inline/InlineCell.js";
|
|
16
|
+
import { getInlineField } from "./inline/editable.js";
|
|
13
17
|
import { countSelected, getPageSelection, isItemSelected } from "./selection.js";
|
|
18
|
+
import { ColumnMenu } from "./toolbar/ColumnMenu.js";
|
|
14
19
|
import { LayoutSwitch } from "./toolbar/LayoutSwitch.js";
|
|
15
20
|
import { CursorPagination, Pagination } from "./toolbar/Pagination.js";
|
|
16
21
|
import { SearchField } from "./toolbar/SearchField.js";
|
|
17
22
|
import { SortSelect } from "./toolbar/SortSelect.js";
|
|
18
23
|
import { useListState } from "./useListState.js";
|
|
19
|
-
import { selectItemActions, usePlugins } from "@panneau/core";
|
|
24
|
+
import { currentMonth, formatRuleFailure, selectItemActions, usePlugins } from "@panneau/core";
|
|
20
25
|
import { c } from "react/compiler-runtime";
|
|
21
26
|
import { getActionLabel } from "@panneau/intl";
|
|
22
27
|
import { Alert, Button, Checkbox, usePanneauIntl, useToast } from "@panneau/ui";
|
|
@@ -32,147 +37,187 @@ function keyOf(action, item) {
|
|
|
32
37
|
* fetches nothing: the caller gives the items of the list's query and their total.
|
|
33
38
|
*/
|
|
34
39
|
function ListView(t0) {
|
|
35
|
-
const $ = c(
|
|
36
|
-
const { list, items, columns, total, cursors, isLoading:
|
|
37
|
-
const
|
|
38
|
-
const
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
$[
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
$[
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
const
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
const layoutsProp = t10;
|
|
61
|
-
const currentItemId = t7 === void 0 ? null : t7;
|
|
40
|
+
const $ = c(118);
|
|
41
|
+
const { list, items, columns: allColumns, columnChoice: t1, total, cursors, isLoading: t2, error: t3, onRetry, filters: t4, fields: t5, search: t6, layouts: t7, layout: controlledLayout, onLayoutChange, perPageOptions, selectable: selectableProp, actions: actionsProp, onAction, previewAction, actionIcons, itemTitle, itemImage, calendar: t8, getItemLabel: getItemLabelProp, getItemHref, getLinkHref, currentItemId: t9, displays, layoutComponents, filterControls, inlineEdit: t10, onInlineEdit, formatError: t11, toolbar, emptyMessage, "aria-label": ariaLabel, className } = t0;
|
|
42
|
+
const columnChoice = t1 === void 0 ? true : t1;
|
|
43
|
+
const isLoading = t2 === void 0 ? false : t2;
|
|
44
|
+
const error = t3 === void 0 ? null : t3;
|
|
45
|
+
let t12;
|
|
46
|
+
if ($[0] !== t4) {
|
|
47
|
+
t12 = t4 === void 0 ? [] : t4;
|
|
48
|
+
$[0] = t4;
|
|
49
|
+
$[1] = t12;
|
|
50
|
+
} else t12 = $[1];
|
|
51
|
+
const filtersProp = t12;
|
|
52
|
+
let t13;
|
|
53
|
+
if ($[2] !== t5) {
|
|
54
|
+
t13 = t5 === void 0 ? [] : t5;
|
|
55
|
+
$[2] = t5;
|
|
56
|
+
$[3] = t13;
|
|
57
|
+
} else t13 = $[3];
|
|
58
|
+
const fields = t13;
|
|
59
|
+
const search = t6 === void 0 ? false : t6;
|
|
60
|
+
const layoutsProp = t7 === void 0 ? ["table"] : t7;
|
|
61
|
+
const calendar = t8 === void 0 ? null : t8;
|
|
62
|
+
const currentItemId = t9 === void 0 ? null : t9;
|
|
63
|
+
const inlineEdit = t10 === void 0 ? [] : t10;
|
|
64
|
+
const formatError = t11 === void 0 ? formatRuleFailure : t11;
|
|
62
65
|
const intl = usePanneauIntl();
|
|
63
66
|
const toasts = useToast();
|
|
64
67
|
const plugins = usePlugins();
|
|
65
|
-
const { query, selection } = useListState(list);
|
|
68
|
+
const { query, view, selection } = useListState(list);
|
|
66
69
|
const filterLabels = useFilterLabels();
|
|
67
|
-
const [uncontrolledLayout, setLayout] = useState(null);
|
|
68
70
|
const [confirming, setConfirming] = useState(null);
|
|
69
71
|
const [preview, setPreview] = useState(null);
|
|
70
72
|
const confirmation = useRef(0);
|
|
71
73
|
const [pending, setPending] = useState(null);
|
|
72
|
-
let t11;
|
|
73
|
-
if ($[6] !== ariaLabel || $[7] !== intl) {
|
|
74
|
-
t11 = ariaLabel ?? intl.formatMessage(messages.list);
|
|
75
|
-
$[6] = ariaLabel;
|
|
76
|
-
$[7] = intl;
|
|
77
|
-
$[8] = t11;
|
|
78
|
-
} else t11 = $[8];
|
|
79
|
-
const label = t11;
|
|
80
|
-
const pageItems = items ?? [];
|
|
81
|
-
const count = total ?? pageItems.length;
|
|
82
|
-
let t12;
|
|
83
|
-
if ($[9] !== query.sort) {
|
|
84
|
-
t12 = query.sort ?? [];
|
|
85
|
-
$[9] = query.sort;
|
|
86
|
-
$[10] = t12;
|
|
87
|
-
} else t12 = $[10];
|
|
88
|
-
const sort = t12;
|
|
89
|
-
let t13;
|
|
90
|
-
if ($[11] !== query.filter) {
|
|
91
|
-
t13 = query.filter ?? {};
|
|
92
|
-
$[11] = query.filter;
|
|
93
|
-
$[12] = t13;
|
|
94
|
-
} else t13 = $[12];
|
|
95
|
-
const filterValues = t13;
|
|
96
74
|
let t14;
|
|
97
|
-
if ($[
|
|
98
|
-
t14 =
|
|
99
|
-
$[
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
} else t14 = $[15];
|
|
103
|
-
const hasQuery = t14;
|
|
75
|
+
if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
|
|
76
|
+
t14 = {};
|
|
77
|
+
$[4] = t14;
|
|
78
|
+
} else t14 = $[4];
|
|
79
|
+
const [saved, setSaved] = useState(t14);
|
|
104
80
|
let t15;
|
|
105
|
-
if ($[
|
|
106
|
-
t15 =
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
81
|
+
if ($[5] !== items) {
|
|
82
|
+
t15 = (item) => {
|
|
83
|
+
const base = items?.find((candidate) => candidate.id === item.id);
|
|
84
|
+
if (base !== void 0) setSaved((current) => ({
|
|
85
|
+
...current,
|
|
86
|
+
[item.id]: {
|
|
87
|
+
base,
|
|
88
|
+
item
|
|
89
|
+
}
|
|
90
|
+
}));
|
|
91
|
+
};
|
|
92
|
+
$[5] = items;
|
|
93
|
+
$[6] = t15;
|
|
94
|
+
} else t15 = $[6];
|
|
95
|
+
const showItem = t15;
|
|
96
|
+
let t16;
|
|
97
|
+
if ($[7] !== ariaLabel || $[8] !== intl) {
|
|
98
|
+
t16 = ariaLabel ?? intl.formatMessage(messages.list);
|
|
99
|
+
$[7] = ariaLabel;
|
|
100
|
+
$[8] = intl;
|
|
101
|
+
$[9] = t16;
|
|
102
|
+
} else t16 = $[9];
|
|
103
|
+
const label = t16;
|
|
111
104
|
let t17;
|
|
112
|
-
if ($[
|
|
113
|
-
t17 =
|
|
105
|
+
if ($[10] !== saved) {
|
|
106
|
+
t17 = (item_0) => saved[item_0.id]?.base === item_0 ? saved[item_0.id]?.item ?? item_0 : item_0;
|
|
107
|
+
$[10] = saved;
|
|
108
|
+
$[11] = t17;
|
|
109
|
+
} else t17 = $[11];
|
|
110
|
+
const pageItems = (items ?? []).map(t17);
|
|
111
|
+
const count = total ?? pageItems.length;
|
|
112
|
+
let t18;
|
|
113
|
+
if ($[12] !== query.sort) {
|
|
114
|
+
t18 = query.sort ?? [];
|
|
115
|
+
$[12] = query.sort;
|
|
116
|
+
$[13] = t18;
|
|
117
|
+
} else t18 = $[13];
|
|
118
|
+
const sort = t18;
|
|
119
|
+
let t19;
|
|
120
|
+
if ($[14] !== plugins.listLayouts) {
|
|
121
|
+
t19 = Object.fromEntries(plugins.listLayouts);
|
|
122
|
+
$[14] = plugins.listLayouts;
|
|
123
|
+
$[15] = t19;
|
|
124
|
+
} else t19 = $[15];
|
|
125
|
+
const t20 = t19;
|
|
126
|
+
let t21;
|
|
127
|
+
if ($[16] !== layoutComponents || $[17] !== t20) {
|
|
128
|
+
t21 = {
|
|
114
129
|
...builtInLayouts,
|
|
115
|
-
...
|
|
130
|
+
...t20,
|
|
116
131
|
...layoutComponents
|
|
117
132
|
};
|
|
118
|
-
$[
|
|
119
|
-
$[
|
|
120
|
-
$[
|
|
121
|
-
} else
|
|
122
|
-
const allLayouts =
|
|
123
|
-
let
|
|
124
|
-
if ($[
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
const available = t18;
|
|
137
|
-
let t19;
|
|
138
|
-
if ($[26] !== available) {
|
|
139
|
-
t19 = available.length > 0 ? available : ["table"];
|
|
140
|
-
$[26] = available;
|
|
141
|
-
$[27] = t19;
|
|
142
|
-
} else t19 = $[27];
|
|
143
|
-
const layouts = t19;
|
|
144
|
-
const layout = controlledLayout ?? uncontrolledLayout ?? layouts[0] ?? "table";
|
|
133
|
+
$[16] = layoutComponents;
|
|
134
|
+
$[17] = t20;
|
|
135
|
+
$[18] = t21;
|
|
136
|
+
} else t21 = $[18];
|
|
137
|
+
const allLayouts = t21;
|
|
138
|
+
let t22;
|
|
139
|
+
if ($[19] !== allLayouts || $[20] !== calendar || $[21] !== itemImage) {
|
|
140
|
+
t22 = (id) => allLayouts[id] !== void 0 && (id !== "gallery" || itemImage !== void 0) && (id !== "calendar" || calendar !== null);
|
|
141
|
+
$[19] = allLayouts;
|
|
142
|
+
$[20] = calendar;
|
|
143
|
+
$[21] = itemImage;
|
|
144
|
+
$[22] = t22;
|
|
145
|
+
} else t22 = $[22];
|
|
146
|
+
const available = layoutsProp.filter(t22);
|
|
147
|
+
const layouts = available.length > 0 ? available : ["table"];
|
|
148
|
+
const chosenLayout = view.layout !== void 0 && layouts.includes(view.layout) ? view.layout : void 0;
|
|
149
|
+
const layout = controlledLayout ?? chosenLayout ?? layouts[0] ?? "table";
|
|
150
|
+
const columns = getShownColumns(allColumns, view.columns);
|
|
145
151
|
const Layout = allLayouts[layout] ?? builtInLayouts.table;
|
|
152
|
+
const inCalendar = layout === "calendar" && calendar !== null;
|
|
153
|
+
let t23;
|
|
154
|
+
if ($[23] !== calendar || $[24] !== filtersProp || $[25] !== inCalendar) {
|
|
155
|
+
t23 = inCalendar ? filtersProp.filter((filter) => filter.id !== calendar.filter) : filtersProp;
|
|
156
|
+
$[23] = calendar;
|
|
157
|
+
$[24] = filtersProp;
|
|
158
|
+
$[25] = inCalendar;
|
|
159
|
+
$[26] = t23;
|
|
160
|
+
} else t23 = $[26];
|
|
161
|
+
const filters = t23;
|
|
162
|
+
let t24;
|
|
163
|
+
if ($[27] !== calendar || $[28] !== inCalendar || $[29] !== query.filter) {
|
|
164
|
+
t24 = Object.fromEntries(Object.entries(query.filter ?? {}).filter((t25) => {
|
|
165
|
+
const [id_0] = t25;
|
|
166
|
+
return !(inCalendar && id_0 === calendar.filter);
|
|
167
|
+
}));
|
|
168
|
+
$[27] = calendar;
|
|
169
|
+
$[28] = inCalendar;
|
|
170
|
+
$[29] = query.filter;
|
|
171
|
+
$[30] = t24;
|
|
172
|
+
} else t24 = $[30];
|
|
173
|
+
const filterValues = t24;
|
|
174
|
+
let t25;
|
|
175
|
+
if ($[31] !== filterValues || $[32] !== query.q) {
|
|
176
|
+
t25 = Object.keys(filterValues).length > 0 || (query.q ?? "") !== "";
|
|
177
|
+
$[31] = filterValues;
|
|
178
|
+
$[32] = query.q;
|
|
179
|
+
$[33] = t25;
|
|
180
|
+
} else t25 = $[33];
|
|
181
|
+
const hasQuery = t25;
|
|
146
182
|
const grouped = groupListActions(actionsProp);
|
|
147
183
|
const toolbarActions = [...grouped.toolbar, ...grouped.menu].filter(_temp);
|
|
148
184
|
const selectionActions = toolbarActions.filter(_temp2);
|
|
149
185
|
const resourceActions = toolbarActions.filter(_temp3);
|
|
150
186
|
const selectable = selectableProp ?? selectionActions.length > 0;
|
|
151
187
|
const selectedCount = selectable ? countSelected(selection, count) : 0;
|
|
152
|
-
let
|
|
153
|
-
if ($[
|
|
154
|
-
|
|
155
|
-
$[
|
|
156
|
-
$[
|
|
157
|
-
} else
|
|
158
|
-
const selectedItems = pageItems.filter(
|
|
188
|
+
let t26;
|
|
189
|
+
if ($[34] !== selection) {
|
|
190
|
+
t26 = (item_1) => isItemSelected(selection, item_1.id);
|
|
191
|
+
$[34] = selection;
|
|
192
|
+
$[35] = t26;
|
|
193
|
+
} else t26 = $[35];
|
|
194
|
+
const selectedItems = pageItems.filter(t26);
|
|
159
195
|
const pageSelection = getPageSelection(selection, pageItems);
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
return title !== "" ? title : item_0.id;
|
|
167
|
-
};
|
|
168
|
-
$[30] = columns;
|
|
169
|
-
$[31] = getItemLabelProp;
|
|
170
|
-
$[32] = intl.locale;
|
|
171
|
-
$[33] = itemTitle;
|
|
172
|
-
$[34] = t21;
|
|
173
|
-
} else t21 = $[34];
|
|
174
|
-
const getItemLabel = t21;
|
|
196
|
+
const getItemLabel = (item_2) => {
|
|
197
|
+
if (getItemLabelProp !== void 0) return getItemLabelProp(item_2);
|
|
198
|
+
const titleColumn = allColumns.find((column) => column.id === itemTitle) ?? (itemTitle === void 0 ? columns[0] : void 0);
|
|
199
|
+
const title = titleColumn !== void 0 ? toText(getColumnValue(item_2, titleColumn, intl.locale), intl.locale) : itemTitle !== void 0 ? toText(item_2[itemTitle], intl.locale) : "";
|
|
200
|
+
return title !== "" ? title : item_2.id;
|
|
201
|
+
};
|
|
175
202
|
const renderValue = useRenderValue(displays);
|
|
203
|
+
const renderCell = (item_3, column_0, content) => {
|
|
204
|
+
const field = onInlineEdit !== void 0 ? getInlineField(column_0, item_3, inlineEdit) : null;
|
|
205
|
+
if (field === null || onInlineEdit === void 0) return content;
|
|
206
|
+
return /* @__PURE__ */ jsx(InlineCell, {
|
|
207
|
+
item: item_3,
|
|
208
|
+
field,
|
|
209
|
+
itemLabel: getItemLabel(item_3),
|
|
210
|
+
renderValue: (current_0) => renderValue(current_0, column_0),
|
|
211
|
+
onSave: (base_0, value) => onInlineEdit({
|
|
212
|
+
item: base_0,
|
|
213
|
+
field,
|
|
214
|
+
value
|
|
215
|
+
}),
|
|
216
|
+
onItem: showItem,
|
|
217
|
+
formatError: (failure) => formatError(failure, field.name),
|
|
218
|
+
children: content
|
|
219
|
+
}, `${item_3.id}\u0000${column_0.id}`);
|
|
220
|
+
};
|
|
176
221
|
const closeConfirmation = () => {
|
|
177
222
|
confirmation.current = confirmation.current + 1;
|
|
178
223
|
setConfirming(null);
|
|
@@ -195,19 +240,19 @@ function ListView(t0) {
|
|
|
195
240
|
const run = (event_0) => {
|
|
196
241
|
const { action: action_2, selection: selection_0 } = event_0;
|
|
197
242
|
if (previewAction !== void 0 && action_2.dryRun === true && selection_0 !== void 0 && "query" in selection_0) {
|
|
198
|
-
const
|
|
243
|
+
const current_1 = confirmation.current = confirmation.current + 1;
|
|
199
244
|
const asks = action_2.confirm !== void 0 && action_2.confirm !== false;
|
|
200
245
|
setConfirming(event_0);
|
|
201
246
|
setPreview({ status: "loading" });
|
|
202
247
|
previewAction(event_0).then((result) => {
|
|
203
|
-
if (confirmation.current !==
|
|
248
|
+
if (confirmation.current !== current_1) return;
|
|
204
249
|
if ((result?.skipped ?? event_0.skipped.length) === 0 && !asks) execute(event_0);
|
|
205
250
|
else setPreview(result !== null ? {
|
|
206
251
|
status: "done",
|
|
207
252
|
...result
|
|
208
253
|
} : null);
|
|
209
254
|
}, () => {
|
|
210
|
-
if (confirmation.current !==
|
|
255
|
+
if (confirmation.current !== current_1) return;
|
|
211
256
|
if (needsConfirmation(event_0)) setPreview(null);
|
|
212
257
|
else execute(event_0);
|
|
213
258
|
});
|
|
@@ -216,10 +261,10 @@ function ListView(t0) {
|
|
|
216
261
|
if (needsConfirmation(event_0)) setConfirming(event_0);
|
|
217
262
|
else execute(event_0);
|
|
218
263
|
};
|
|
219
|
-
const runOnItem = (action_3,
|
|
264
|
+
const runOnItem = (action_3, item_4) => run({
|
|
220
265
|
action: action_3,
|
|
221
266
|
scope: "item",
|
|
222
|
-
item:
|
|
267
|
+
item: item_4,
|
|
223
268
|
count: 1,
|
|
224
269
|
skipped: []
|
|
225
270
|
});
|
|
@@ -231,7 +276,7 @@ function ListView(t0) {
|
|
|
231
276
|
scope: "selection",
|
|
232
277
|
selection: selected,
|
|
233
278
|
count: selectedCount,
|
|
234
|
-
skipped: selectedItems.filter((
|
|
279
|
+
skipped: selectedItems.filter((item_5) => !isAllowedOn(action_4, item_5))
|
|
235
280
|
});
|
|
236
281
|
};
|
|
237
282
|
const runOnResource = (action_5) => run({
|
|
@@ -240,28 +285,28 @@ function ListView(t0) {
|
|
|
240
285
|
count,
|
|
241
286
|
skipped: []
|
|
242
287
|
});
|
|
243
|
-
const renderActions = (
|
|
244
|
-
const allowed = selectItemActions(grouped.row,
|
|
245
|
-
const menu = selectItemActions(grouped.menu,
|
|
288
|
+
const renderActions = (item_6) => {
|
|
289
|
+
const allowed = selectItemActions(grouped.row, item_6, "row", { getLinkHref });
|
|
290
|
+
const menu = selectItemActions(grouped.menu, item_6, "menu", { getLinkHref });
|
|
246
291
|
if (allowed.length === 0 && menu.length === 0) return null;
|
|
247
|
-
const running = pending?.endsWith(`\u0000${
|
|
292
|
+
const running = pending?.endsWith(`\u0000${item_6.id}`) === true ? pending.split("\0")[0] : null;
|
|
248
293
|
return /* @__PURE__ */ jsx(RowActions, {
|
|
249
|
-
itemLabel: getItemLabel(
|
|
294
|
+
itemLabel: getItemLabel(item_6),
|
|
250
295
|
actions: allowed,
|
|
251
296
|
menu,
|
|
252
297
|
pending: running ?? null,
|
|
253
|
-
onRun: (action_6) => runOnItem(action_6,
|
|
298
|
+
onRun: (action_6) => runOnItem(action_6, item_6),
|
|
254
299
|
icons: actionIcons
|
|
255
300
|
});
|
|
256
301
|
};
|
|
257
|
-
let
|
|
258
|
-
if ($[
|
|
259
|
-
|
|
260
|
-
$[
|
|
261
|
-
$[
|
|
262
|
-
} else
|
|
302
|
+
let t27;
|
|
303
|
+
if ($[36] !== intl) {
|
|
304
|
+
t27 = intl.formatMessage(messages.selectPage);
|
|
305
|
+
$[36] = intl;
|
|
306
|
+
$[37] = t27;
|
|
307
|
+
} else t27 = $[37];
|
|
263
308
|
const pageCheckbox = /* @__PURE__ */ jsx(Checkbox, {
|
|
264
|
-
"aria-label":
|
|
309
|
+
"aria-label": t27,
|
|
265
310
|
isSelected: pageSelection === "all",
|
|
266
311
|
isIndeterminate: pageSelection === "some",
|
|
267
312
|
isDisabled: pageItems.length === 0,
|
|
@@ -271,165 +316,170 @@ function ListView(t0) {
|
|
|
271
316
|
else list.select(ids);
|
|
272
317
|
}
|
|
273
318
|
});
|
|
274
|
-
const sortable =
|
|
275
|
-
const
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
319
|
+
const sortable = allColumns.some(_temp5);
|
|
320
|
+
const choosesColumns = columnChoice && allColumns.length > 1;
|
|
321
|
+
const showToolbar = search || filters.length > 0 || sortable || choosesColumns || layouts.length > 1 || resourceActions.length > 0 || toolbar !== void 0;
|
|
322
|
+
let t28;
|
|
323
|
+
if ($[38] !== filterValues || $[39] !== list || $[40] !== query.q) {
|
|
324
|
+
t28 = function clearFilters() {
|
|
325
|
+
Object.keys(filterValues).forEach((id_1) => list.setFilter(id_1, void 0));
|
|
280
326
|
if ((query.q ?? "") !== "") list.setSearch("");
|
|
281
327
|
};
|
|
282
|
-
$[
|
|
283
|
-
$[
|
|
284
|
-
$[
|
|
285
|
-
$[
|
|
286
|
-
} else
|
|
287
|
-
const clearFilters =
|
|
288
|
-
let
|
|
328
|
+
$[38] = filterValues;
|
|
329
|
+
$[39] = list;
|
|
330
|
+
$[40] = query.q;
|
|
331
|
+
$[41] = t28;
|
|
332
|
+
} else t28 = $[41];
|
|
333
|
+
const clearFilters = t28;
|
|
334
|
+
let t29;
|
|
289
335
|
bb0: {
|
|
290
336
|
if (error !== null) {
|
|
291
|
-
let
|
|
292
|
-
if ($[
|
|
293
|
-
|
|
294
|
-
$[
|
|
295
|
-
$[
|
|
296
|
-
} else
|
|
297
|
-
let
|
|
298
|
-
if ($[
|
|
299
|
-
|
|
337
|
+
let t30;
|
|
338
|
+
if ($[42] !== intl) {
|
|
339
|
+
t30 = intl.formatMessage(messages.loadFailed);
|
|
340
|
+
$[42] = intl;
|
|
341
|
+
$[43] = t30;
|
|
342
|
+
} else t30 = $[43];
|
|
343
|
+
let t31;
|
|
344
|
+
if ($[44] !== intl || $[45] !== onRetry) {
|
|
345
|
+
t31 = onRetry !== void 0 ? /* @__PURE__ */ jsx(Button, {
|
|
300
346
|
size: "sm",
|
|
301
347
|
onPress: onRetry,
|
|
302
348
|
children: intl.formatMessage(messages.retry)
|
|
303
349
|
}) : void 0;
|
|
304
|
-
$[
|
|
305
|
-
$[
|
|
306
|
-
$[
|
|
307
|
-
} else
|
|
308
|
-
let
|
|
309
|
-
if ($[
|
|
310
|
-
|
|
350
|
+
$[44] = intl;
|
|
351
|
+
$[45] = onRetry;
|
|
352
|
+
$[46] = t31;
|
|
353
|
+
} else t31 = $[46];
|
|
354
|
+
let t32;
|
|
355
|
+
if ($[47] !== error.message || $[48] !== t30 || $[49] !== t31) {
|
|
356
|
+
t32 = /* @__PURE__ */ jsx(Alert, {
|
|
311
357
|
tone: "danger",
|
|
312
|
-
title:
|
|
313
|
-
actions:
|
|
358
|
+
title: t30,
|
|
359
|
+
actions: t31,
|
|
314
360
|
children: error.message
|
|
315
361
|
});
|
|
316
|
-
$[
|
|
317
|
-
$[
|
|
318
|
-
$[
|
|
319
|
-
$[
|
|
320
|
-
} else
|
|
321
|
-
|
|
362
|
+
$[47] = error.message;
|
|
363
|
+
$[48] = t30;
|
|
364
|
+
$[49] = t31;
|
|
365
|
+
$[50] = t32;
|
|
366
|
+
} else t32 = $[50];
|
|
367
|
+
t29 = t32;
|
|
322
368
|
break bb0;
|
|
323
369
|
}
|
|
324
370
|
if (items === void 0) {
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
label
|
|
333
|
-
});
|
|
334
|
-
$[50] = Layout;
|
|
335
|
-
$[51] = columns;
|
|
336
|
-
$[52] = label;
|
|
337
|
-
$[53] = query.perPage;
|
|
338
|
-
$[54] = sort;
|
|
339
|
-
$[55] = t25;
|
|
340
|
-
} else t25 = $[55];
|
|
341
|
-
t24 = t25;
|
|
371
|
+
t29 = /* @__PURE__ */ jsx(ListSkeleton, {
|
|
372
|
+
Layout,
|
|
373
|
+
columns,
|
|
374
|
+
perPage: query.perPage,
|
|
375
|
+
sort,
|
|
376
|
+
label
|
|
377
|
+
});
|
|
342
378
|
break bb0;
|
|
343
379
|
}
|
|
344
|
-
if (pageItems.length === 0) {
|
|
345
|
-
let
|
|
346
|
-
if ($[
|
|
347
|
-
|
|
348
|
-
$[
|
|
349
|
-
$[
|
|
350
|
-
$[
|
|
351
|
-
$[
|
|
352
|
-
} else
|
|
353
|
-
let
|
|
354
|
-
if ($[
|
|
355
|
-
|
|
356
|
-
$[
|
|
357
|
-
$[
|
|
358
|
-
} else
|
|
359
|
-
let
|
|
360
|
-
if ($[
|
|
361
|
-
|
|
380
|
+
if (pageItems.length === 0 && !inCalendar) {
|
|
381
|
+
let t30;
|
|
382
|
+
if ($[51] !== emptyMessage || $[52] !== hasQuery || $[53] !== intl) {
|
|
383
|
+
t30 = hasQuery ? intl.formatMessage(messages.noResults) : emptyMessage ?? intl.formatMessage(messages.empty);
|
|
384
|
+
$[51] = emptyMessage;
|
|
385
|
+
$[52] = hasQuery;
|
|
386
|
+
$[53] = intl;
|
|
387
|
+
$[54] = t30;
|
|
388
|
+
} else t30 = $[54];
|
|
389
|
+
let t31;
|
|
390
|
+
if ($[55] !== t30) {
|
|
391
|
+
t31 = /* @__PURE__ */ jsx("p", { children: t30 });
|
|
392
|
+
$[55] = t30;
|
|
393
|
+
$[56] = t31;
|
|
394
|
+
} else t31 = $[56];
|
|
395
|
+
let t32;
|
|
396
|
+
if ($[57] !== clearFilters || $[58] !== hasQuery || $[59] !== intl) {
|
|
397
|
+
t32 = hasQuery ? /* @__PURE__ */ jsx(Button, {
|
|
362
398
|
size: "sm",
|
|
363
399
|
onPress: () => clearFilters(),
|
|
364
400
|
children: intl.formatMessage(messages.clearFilters)
|
|
365
401
|
}) : null;
|
|
366
|
-
$[
|
|
367
|
-
$[
|
|
368
|
-
$[
|
|
369
|
-
$[
|
|
370
|
-
} else
|
|
371
|
-
let
|
|
372
|
-
if ($[
|
|
373
|
-
|
|
402
|
+
$[57] = clearFilters;
|
|
403
|
+
$[58] = hasQuery;
|
|
404
|
+
$[59] = intl;
|
|
405
|
+
$[60] = t32;
|
|
406
|
+
} else t32 = $[60];
|
|
407
|
+
let t33;
|
|
408
|
+
if ($[61] !== t31 || $[62] !== t32) {
|
|
409
|
+
t33 = /* @__PURE__ */ jsxs("div", {
|
|
374
410
|
className: ListView_module_default.state,
|
|
375
|
-
children: [
|
|
411
|
+
children: [t31, t32]
|
|
376
412
|
});
|
|
377
|
-
$[
|
|
378
|
-
$[
|
|
379
|
-
$[
|
|
380
|
-
} else
|
|
381
|
-
|
|
413
|
+
$[61] = t31;
|
|
414
|
+
$[62] = t32;
|
|
415
|
+
$[63] = t33;
|
|
416
|
+
} else t33 = $[63];
|
|
417
|
+
t29 = t33;
|
|
382
418
|
break bb0;
|
|
383
419
|
}
|
|
384
|
-
let
|
|
385
|
-
if ($[
|
|
386
|
-
|
|
387
|
-
$[
|
|
388
|
-
$[
|
|
389
|
-
} else
|
|
390
|
-
let
|
|
391
|
-
if ($[
|
|
392
|
-
|
|
393
|
-
$[
|
|
394
|
-
$[
|
|
395
|
-
} else
|
|
396
|
-
let
|
|
397
|
-
if ($[
|
|
398
|
-
|
|
399
|
-
$[
|
|
400
|
-
$[
|
|
401
|
-
} else
|
|
402
|
-
let
|
|
403
|
-
if ($[
|
|
404
|
-
|
|
405
|
-
$[
|
|
406
|
-
$[
|
|
407
|
-
} else
|
|
408
|
-
|
|
420
|
+
let t30;
|
|
421
|
+
if ($[64] !== itemImage) {
|
|
422
|
+
t30 = itemImage !== void 0 ? (item_8) => getImageUrl(item_8[itemImage]) : void 0;
|
|
423
|
+
$[64] = itemImage;
|
|
424
|
+
$[65] = t30;
|
|
425
|
+
} else t30 = $[65];
|
|
426
|
+
let t31;
|
|
427
|
+
if ($[66] !== currentItemId) {
|
|
428
|
+
t31 = (item_9) => item_9.id === currentItemId;
|
|
429
|
+
$[66] = currentItemId;
|
|
430
|
+
$[67] = t31;
|
|
431
|
+
} else t31 = $[67];
|
|
432
|
+
let t32;
|
|
433
|
+
if ($[68] !== selection) {
|
|
434
|
+
t32 = (item_10) => isItemSelected(selection, item_10.id);
|
|
435
|
+
$[68] = selection;
|
|
436
|
+
$[69] = t32;
|
|
437
|
+
} else t32 = $[69];
|
|
438
|
+
let t33;
|
|
439
|
+
if ($[70] !== list) {
|
|
440
|
+
t33 = (item_11) => list.toggle(item_11.id);
|
|
441
|
+
$[70] = list;
|
|
442
|
+
$[71] = t33;
|
|
443
|
+
} else t33 = $[71];
|
|
444
|
+
let t34;
|
|
445
|
+
if ($[72] !== list) {
|
|
446
|
+
t34 = (column_2) => list.toggleSort(column_2.id);
|
|
447
|
+
$[72] = list;
|
|
448
|
+
$[73] = t34;
|
|
449
|
+
} else t34 = $[73];
|
|
450
|
+
t29 = /* @__PURE__ */ jsx(Layout, {
|
|
409
451
|
items: pageItems,
|
|
410
452
|
columns,
|
|
411
453
|
renderValue,
|
|
412
454
|
getItemLabel,
|
|
413
455
|
getItemHref,
|
|
414
|
-
|
|
456
|
+
getItemImage: t30,
|
|
457
|
+
calendar: inCalendar ? {
|
|
458
|
+
field: calendar.field,
|
|
459
|
+
month: view.month ?? currentMonth(),
|
|
460
|
+
onMonthChange: (month) => list.setMonth(month),
|
|
461
|
+
more: total !== void 0 && total > pageItems.length ? { total } : cursors !== void 0 && cursors.next !== null ? { total: null } : null
|
|
462
|
+
} : void 0,
|
|
463
|
+
isCurrent: t31,
|
|
415
464
|
selectable,
|
|
416
|
-
isSelected:
|
|
417
|
-
onToggle:
|
|
465
|
+
isSelected: t32,
|
|
466
|
+
onToggle: t33,
|
|
418
467
|
renderActions,
|
|
419
468
|
sort,
|
|
420
|
-
onSort:
|
|
469
|
+
onSort: t34,
|
|
421
470
|
label,
|
|
422
|
-
pageSelection: pageCheckbox
|
|
471
|
+
pageSelection: pageCheckbox,
|
|
472
|
+
renderCell
|
|
423
473
|
});
|
|
424
474
|
}
|
|
425
|
-
const body =
|
|
426
|
-
let
|
|
427
|
-
if ($[
|
|
428
|
-
|
|
429
|
-
$[
|
|
430
|
-
$[
|
|
431
|
-
} else
|
|
432
|
-
const
|
|
475
|
+
const body = t29;
|
|
476
|
+
let t30;
|
|
477
|
+
if ($[74] !== className) {
|
|
478
|
+
t30 = cx(ListView_module_default.list, className);
|
|
479
|
+
$[74] = className;
|
|
480
|
+
$[75] = t30;
|
|
481
|
+
} else t30 = $[75];
|
|
482
|
+
const t31 = showToolbar ? /* @__PURE__ */ jsxs("div", {
|
|
433
483
|
className: ListView_module_default.toolbar,
|
|
434
484
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
435
485
|
className: ListView_module_default.toolbarStart,
|
|
@@ -439,10 +489,10 @@ function ListView(t0) {
|
|
|
439
489
|
}) : null, filters.length > 0 ? /* @__PURE__ */ jsx(FilterControls, {
|
|
440
490
|
filters,
|
|
441
491
|
values: filterValues,
|
|
442
|
-
onChange: (
|
|
492
|
+
onChange: (id_2, value_0) => list.setFilter(id_2, value_0),
|
|
443
493
|
onLabel: filterLabels.remember,
|
|
444
494
|
controls: filterControls,
|
|
445
|
-
columns,
|
|
495
|
+
columns: allColumns,
|
|
446
496
|
fields,
|
|
447
497
|
labels: filterLabels.labels
|
|
448
498
|
}) : null]
|
|
@@ -452,7 +502,7 @@ function ListView(t0) {
|
|
|
452
502
|
sortable ? /* @__PURE__ */ jsx("div", {
|
|
453
503
|
className: layout === "table" ? ListView_module_default.tableSort : void 0,
|
|
454
504
|
children: /* @__PURE__ */ jsx(SortSelect, {
|
|
455
|
-
columns,
|
|
505
|
+
columns: allColumns,
|
|
456
506
|
sort,
|
|
457
507
|
onChange: (next) => list.setSort(next)
|
|
458
508
|
})
|
|
@@ -461,10 +511,16 @@ function ListView(t0) {
|
|
|
461
511
|
layouts,
|
|
462
512
|
value: layout,
|
|
463
513
|
onChange: (next_0) => {
|
|
464
|
-
setLayout(next_0);
|
|
514
|
+
if (controlledLayout === void 0) list.setLayout(next_0);
|
|
465
515
|
onLayoutChange?.(next_0);
|
|
466
516
|
}
|
|
467
517
|
}) : null,
|
|
518
|
+
choosesColumns ? /* @__PURE__ */ jsx(ColumnMenu, {
|
|
519
|
+
columns: allColumns,
|
|
520
|
+
shown: columns,
|
|
521
|
+
onChange: (ids_0) => list.setColumns(ids_0),
|
|
522
|
+
onReset: view.columns !== void 0 ? () => list.resetColumns() : null
|
|
523
|
+
}) : null,
|
|
468
524
|
resourceActions.filter((action_7) => selectedCount === 0 || !hasScope(action_7, "selection")).map((action_8) => /* @__PURE__ */ jsx(ActionButton, {
|
|
469
525
|
action: action_8,
|
|
470
526
|
icons: actionIcons,
|
|
@@ -477,43 +533,43 @@ function ListView(t0) {
|
|
|
477
533
|
]
|
|
478
534
|
})]
|
|
479
535
|
}) : null;
|
|
480
|
-
let
|
|
481
|
-
let
|
|
482
|
-
if ($[
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
$[
|
|
486
|
-
$[
|
|
487
|
-
$[
|
|
536
|
+
let t32;
|
|
537
|
+
let t33;
|
|
538
|
+
if ($[76] !== list) {
|
|
539
|
+
t32 = (id_3) => list.setFilter(id_3, void 0);
|
|
540
|
+
t33 = () => list.setSearch("");
|
|
541
|
+
$[76] = list;
|
|
542
|
+
$[77] = t32;
|
|
543
|
+
$[78] = t33;
|
|
488
544
|
} else {
|
|
489
|
-
|
|
490
|
-
|
|
545
|
+
t32 = $[77];
|
|
546
|
+
t33 = $[78];
|
|
491
547
|
}
|
|
492
|
-
let
|
|
493
|
-
if ($[
|
|
494
|
-
|
|
548
|
+
let t34;
|
|
549
|
+
if ($[79] !== allColumns || $[80] !== clearFilters || $[81] !== fields || $[82] !== filterLabels.labels || $[83] !== filterValues || $[84] !== filters || $[85] !== query.q || $[86] !== t32 || $[87] !== t33) {
|
|
550
|
+
t34 = /* @__PURE__ */ jsx(FilterChips, {
|
|
495
551
|
filters,
|
|
496
552
|
values: filterValues,
|
|
497
553
|
q: query.q,
|
|
498
|
-
onRemove:
|
|
499
|
-
onClearSearch:
|
|
554
|
+
onRemove: t32,
|
|
555
|
+
onClearSearch: t33,
|
|
500
556
|
onClear: clearFilters,
|
|
501
|
-
columns,
|
|
557
|
+
columns: allColumns,
|
|
502
558
|
fields,
|
|
503
559
|
labels: filterLabels.labels
|
|
504
560
|
});
|
|
505
|
-
$[
|
|
506
|
-
$[
|
|
507
|
-
$[
|
|
508
|
-
$[
|
|
509
|
-
$[
|
|
510
|
-
$[
|
|
511
|
-
$[
|
|
512
|
-
$[
|
|
513
|
-
$[
|
|
514
|
-
$[
|
|
515
|
-
} else
|
|
516
|
-
const
|
|
561
|
+
$[79] = allColumns;
|
|
562
|
+
$[80] = clearFilters;
|
|
563
|
+
$[81] = fields;
|
|
564
|
+
$[82] = filterLabels.labels;
|
|
565
|
+
$[83] = filterValues;
|
|
566
|
+
$[84] = filters;
|
|
567
|
+
$[85] = query.q;
|
|
568
|
+
$[86] = t32;
|
|
569
|
+
$[87] = t33;
|
|
570
|
+
$[88] = t34;
|
|
571
|
+
} else t34 = $[88];
|
|
572
|
+
const t35 = selectedCount > 0 ? /* @__PURE__ */ jsxs("div", {
|
|
517
573
|
className: ListView_module_default.selection,
|
|
518
574
|
children: [
|
|
519
575
|
/* @__PURE__ */ jsx("span", {
|
|
@@ -536,7 +592,7 @@ function ListView(t0) {
|
|
|
536
592
|
selectionActions.length > 0 ? /* @__PURE__ */ jsx("div", {
|
|
537
593
|
className: ListView_module_default.selectionActions,
|
|
538
594
|
children: selectionActions.map((action_9) => {
|
|
539
|
-
const skipped_0 = selectedItems.filter((
|
|
595
|
+
const skipped_0 = selectedItems.filter((item_12) => !isAllowedOn(action_9, item_12)).length;
|
|
540
596
|
return /* @__PURE__ */ jsx(ActionButton, {
|
|
541
597
|
action: action_9,
|
|
542
598
|
icons: actionIcons,
|
|
@@ -550,21 +606,21 @@ function ListView(t0) {
|
|
|
550
606
|
}) : null
|
|
551
607
|
]
|
|
552
608
|
}) : null;
|
|
553
|
-
const
|
|
554
|
-
let
|
|
555
|
-
if ($[
|
|
556
|
-
|
|
609
|
+
const t36 = isLoading && items !== void 0;
|
|
610
|
+
let t37;
|
|
611
|
+
if ($[89] !== body || $[90] !== t36) {
|
|
612
|
+
t37 = /* @__PURE__ */ jsx("div", {
|
|
557
613
|
className: ListView_module_default.body,
|
|
558
|
-
"aria-busy":
|
|
614
|
+
"aria-busy": t36,
|
|
559
615
|
children: body
|
|
560
616
|
});
|
|
561
|
-
$[
|
|
562
|
-
$[
|
|
563
|
-
$[
|
|
564
|
-
} else
|
|
565
|
-
let
|
|
566
|
-
if ($[
|
|
567
|
-
|
|
617
|
+
$[89] = body;
|
|
618
|
+
$[90] = t36;
|
|
619
|
+
$[91] = t37;
|
|
620
|
+
} else t37 = $[91];
|
|
621
|
+
let t38;
|
|
622
|
+
if ($[92] !== cursors || $[93] !== error || $[94] !== inCalendar || $[95] !== list || $[96] !== pageItems || $[97] !== perPageOptions || $[98] !== query.cursor || $[99] !== query.page || $[100] !== query.perPage || $[101] !== total) {
|
|
623
|
+
t38 = inCalendar ? null : cursors !== void 0 && error === null ? /* @__PURE__ */ jsx(CursorPagination, {
|
|
568
624
|
perPage: query.perPage ?? pageItems.length,
|
|
569
625
|
hasPrevious: query.cursor !== void 0,
|
|
570
626
|
hasNext: cursors.next !== null,
|
|
@@ -582,66 +638,67 @@ function ListView(t0) {
|
|
|
582
638
|
perPageOptions,
|
|
583
639
|
onPerPageChange: (perPage_0) => list.setPerPage(perPage_0)
|
|
584
640
|
}) : null;
|
|
585
|
-
$[
|
|
586
|
-
$[
|
|
587
|
-
$[
|
|
588
|
-
$[
|
|
589
|
-
$[
|
|
590
|
-
$[
|
|
591
|
-
$[
|
|
592
|
-
$[
|
|
593
|
-
$[
|
|
594
|
-
$[
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
$[
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
641
|
+
$[92] = cursors;
|
|
642
|
+
$[93] = error;
|
|
643
|
+
$[94] = inCalendar;
|
|
644
|
+
$[95] = list;
|
|
645
|
+
$[96] = pageItems;
|
|
646
|
+
$[97] = perPageOptions;
|
|
647
|
+
$[98] = query.cursor;
|
|
648
|
+
$[99] = query.page;
|
|
649
|
+
$[100] = query.perPage;
|
|
650
|
+
$[101] = total;
|
|
651
|
+
$[102] = t38;
|
|
652
|
+
} else t38 = $[102];
|
|
653
|
+
let t39;
|
|
654
|
+
if ($[103] !== execute) {
|
|
655
|
+
t39 = (event_1) => void execute(event_1);
|
|
656
|
+
$[103] = execute;
|
|
657
|
+
$[104] = t39;
|
|
658
|
+
} else t39 = $[104];
|
|
659
|
+
let t40;
|
|
660
|
+
if ($[105] !== closeConfirmation || $[106] !== confirming || $[107] !== preview || $[108] !== t39) {
|
|
661
|
+
t40 = /* @__PURE__ */ jsx(ConfirmDialog, {
|
|
605
662
|
event: confirming,
|
|
606
663
|
preview,
|
|
607
|
-
onConfirm:
|
|
664
|
+
onConfirm: t39,
|
|
608
665
|
onCancel: closeConfirmation
|
|
609
666
|
});
|
|
610
|
-
$[
|
|
611
|
-
$[
|
|
612
|
-
$[
|
|
613
|
-
$[
|
|
614
|
-
$[
|
|
615
|
-
} else
|
|
616
|
-
let
|
|
617
|
-
if ($[
|
|
618
|
-
|
|
619
|
-
className:
|
|
667
|
+
$[105] = closeConfirmation;
|
|
668
|
+
$[106] = confirming;
|
|
669
|
+
$[107] = preview;
|
|
670
|
+
$[108] = t39;
|
|
671
|
+
$[109] = t40;
|
|
672
|
+
} else t40 = $[109];
|
|
673
|
+
let t41;
|
|
674
|
+
if ($[110] !== t30 || $[111] !== t31 || $[112] !== t34 || $[113] !== t35 || $[114] !== t37 || $[115] !== t38 || $[116] !== t40) {
|
|
675
|
+
t41 = /* @__PURE__ */ jsxs("div", {
|
|
676
|
+
className: t30,
|
|
620
677
|
children: [
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
678
|
+
t31,
|
|
679
|
+
t34,
|
|
680
|
+
t35,
|
|
681
|
+
t37,
|
|
682
|
+
t38,
|
|
683
|
+
t40
|
|
627
684
|
]
|
|
628
685
|
});
|
|
629
|
-
$[
|
|
630
|
-
$[
|
|
631
|
-
$[
|
|
632
|
-
$[
|
|
633
|
-
$[
|
|
634
|
-
$[
|
|
635
|
-
$[
|
|
636
|
-
$[
|
|
637
|
-
} else
|
|
638
|
-
return
|
|
686
|
+
$[110] = t30;
|
|
687
|
+
$[111] = t31;
|
|
688
|
+
$[112] = t34;
|
|
689
|
+
$[113] = t35;
|
|
690
|
+
$[114] = t37;
|
|
691
|
+
$[115] = t38;
|
|
692
|
+
$[116] = t40;
|
|
693
|
+
$[117] = t41;
|
|
694
|
+
} else t41 = $[117];
|
|
695
|
+
return t41;
|
|
639
696
|
}
|
|
640
|
-
function _temp5(
|
|
641
|
-
return
|
|
697
|
+
function _temp5(column_1) {
|
|
698
|
+
return column_1.sortable === true;
|
|
642
699
|
}
|
|
643
|
-
function _temp4(
|
|
644
|
-
return
|
|
700
|
+
function _temp4(item_7) {
|
|
701
|
+
return item_7.id;
|
|
645
702
|
}
|
|
646
703
|
function _temp3(action_1) {
|
|
647
704
|
return hasScope(action_1, "resource");
|
|
@@ -650,7 +707,7 @@ function _temp2(action_0) {
|
|
|
650
707
|
return hasScope(action_0, "selection");
|
|
651
708
|
}
|
|
652
709
|
function _temp(action, index, all) {
|
|
653
|
-
return (hasScope(action, "selection") || hasScope(action, "resource")) && all.findIndex((
|
|
710
|
+
return (hasScope(action, "selection") || hasScope(action, "resource")) && all.findIndex((candidate_0) => candidate_0.id === action.id) === index;
|
|
654
711
|
}
|
|
655
712
|
//#endregion
|
|
656
713
|
export { ListView };
|