@panneau/lists 5.0.0-alpha.15 → 5.0.0-alpha.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/ListView.js CHANGED
@@ -2,6 +2,7 @@ import { getActionHref, groupListActions, hasScope, isAllowedOn } from "./action
2
2
  import { messages } from "./messages.js";
3
3
  import { ConfirmDialog, needsConfirmation } from "./actions/ConfirmDialog.js";
4
4
  import { getColumnValue, toText } from "./values.js";
5
+ import { getCalendarTimeZone } from "./layouts/calendarDays.js";
5
6
  import { cx } from "./cx.js";
6
7
  import { builtInLayouts } from "./layouts/builtIn.js";
7
8
  import { useRenderValue } from "./useRenderValue.js";
@@ -37,7 +38,7 @@ function keyOf(action, item) {
37
38
  * fetches nothing: the caller gives the items of the list's query and their total.
38
39
  */
39
40
  function ListView(t0) {
40
- const $ = c(118);
41
+ const $ = c(116);
41
42
  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
43
  const columnChoice = t1 === void 0 ? true : t1;
43
44
  const isLoading = t2 === void 0 ? false : t2;
@@ -49,13 +50,7 @@ function ListView(t0) {
49
50
  $[1] = t12;
50
51
  } else t12 = $[1];
51
52
  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;
53
+ const fields = t5 === void 0 ? [] : t5;
59
54
  const search = t6 === void 0 ? false : t6;
60
55
  const layoutsProp = t7 === void 0 ? ["table"] : t7;
61
56
  const calendar = t8 === void 0 ? null : t8;
@@ -71,15 +66,15 @@ function ListView(t0) {
71
66
  const [preview, setPreview] = useState(null);
72
67
  const confirmation = useRef(0);
73
68
  const [pending, setPending] = useState(null);
69
+ let t13;
70
+ if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
71
+ t13 = {};
72
+ $[2] = t13;
73
+ } else t13 = $[2];
74
+ const [saved, setSaved] = useState(t13);
74
75
  let 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);
80
- let t15;
81
- if ($[5] !== items) {
82
- t15 = (item) => {
76
+ if ($[3] !== items) {
77
+ t14 = (item) => {
83
78
  const base = items?.find((candidate) => candidate.id === item.id);
84
79
  if (base !== void 0) setSaved((current) => ({
85
80
  ...current,
@@ -89,109 +84,109 @@ function ListView(t0) {
89
84
  }
90
85
  }));
91
86
  };
92
- $[5] = items;
93
- $[6] = t15;
94
- } else t15 = $[6];
95
- const showItem = t15;
87
+ $[3] = items;
88
+ $[4] = t14;
89
+ } else t14 = $[4];
90
+ const showItem = t14;
91
+ let t15;
92
+ if ($[5] !== ariaLabel || $[6] !== intl) {
93
+ t15 = ariaLabel ?? intl.formatMessage(messages.list);
94
+ $[5] = ariaLabel;
95
+ $[6] = intl;
96
+ $[7] = t15;
97
+ } else t15 = $[7];
98
+ const label = t15;
96
99
  let t16;
97
- if ($[7] !== ariaLabel || $[8] !== intl) {
98
- t16 = ariaLabel ?? intl.formatMessage(messages.list);
99
- $[7] = ariaLabel;
100
- $[8] = intl;
100
+ if ($[8] !== saved) {
101
+ t16 = (item_0) => saved[item_0.id]?.base === item_0 ? saved[item_0.id]?.item ?? item_0 : item_0;
102
+ $[8] = saved;
101
103
  $[9] = t16;
102
104
  } else t16 = $[9];
103
- const label = t16;
105
+ const pageItems = (items ?? []).map(t16);
106
+ const count = total ?? pageItems.length;
104
107
  let 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
+ if ($[10] !== query.sort) {
109
+ t17 = query.sort ?? [];
110
+ $[10] = query.sort;
108
111
  $[11] = t17;
109
112
  } else t17 = $[11];
110
- const pageItems = (items ?? []).map(t17);
111
- const count = total ?? pageItems.length;
113
+ const sort = t17;
112
114
  let t18;
113
- if ($[12] !== query.sort) {
114
- t18 = query.sort ?? [];
115
- $[12] = query.sort;
115
+ if ($[12] !== plugins.listLayouts) {
116
+ t18 = Object.fromEntries(plugins.listLayouts);
117
+ $[12] = plugins.listLayouts;
116
118
  $[13] = t18;
117
119
  } 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 = {
120
+ const t19 = t18;
121
+ let t20;
122
+ if ($[14] !== layoutComponents || $[15] !== t19) {
123
+ t20 = {
129
124
  ...builtInLayouts,
130
- ...t20,
125
+ ...t19,
131
126
  ...layoutComponents
132
127
  };
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);
128
+ $[14] = layoutComponents;
129
+ $[15] = t19;
130
+ $[16] = t20;
131
+ } else t20 = $[16];
132
+ const allLayouts = t20;
133
+ let t21;
134
+ if ($[17] !== allLayouts || $[18] !== calendar || $[19] !== itemImage) {
135
+ t21 = (id) => allLayouts[id] !== void 0 && (id !== "gallery" || itemImage !== void 0) && (id !== "calendar" || calendar !== null);
136
+ $[17] = allLayouts;
137
+ $[18] = calendar;
138
+ $[19] = itemImage;
139
+ $[20] = t21;
140
+ } else t21 = $[20];
141
+ const available = layoutsProp.filter(t21);
147
142
  const layouts = available.length > 0 ? available : ["table"];
148
143
  const chosenLayout = view.layout !== void 0 && layouts.includes(view.layout) ? view.layout : void 0;
149
144
  const layout = controlledLayout ?? chosenLayout ?? layouts[0] ?? "table";
150
145
  const columns = getShownColumns(allColumns, view.columns);
151
146
  const Layout = allLayouts[layout] ?? builtInLayouts.table;
152
147
  const inCalendar = layout === "calendar" && calendar !== null;
148
+ let t22;
149
+ if ($[21] !== calendar || $[22] !== filtersProp || $[23] !== inCalendar) {
150
+ t22 = inCalendar ? filtersProp.filter((filter) => filter.id !== calendar.filter) : filtersProp;
151
+ $[21] = calendar;
152
+ $[22] = filtersProp;
153
+ $[23] = inCalendar;
154
+ $[24] = t22;
155
+ } else t22 = $[24];
156
+ const filters = t22;
153
157
  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;
158
+ if ($[25] !== calendar || $[26] !== inCalendar || $[27] !== query.filter) {
159
+ t23 = Object.fromEntries(Object.entries(query.filter ?? {}).filter((t24) => {
160
+ const [id_0] = t24;
166
161
  return !(inCalendar && id_0 === calendar.filter);
167
162
  }));
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;
163
+ $[25] = calendar;
164
+ $[26] = inCalendar;
165
+ $[27] = query.filter;
166
+ $[28] = t23;
167
+ } else t23 = $[28];
168
+ const filterValues = t23;
169
+ let t24;
170
+ if ($[29] !== filterValues || $[30] !== query.q) {
171
+ t24 = Object.keys(filterValues).length > 0 || (query.q ?? "") !== "";
172
+ $[29] = filterValues;
173
+ $[30] = query.q;
174
+ $[31] = t24;
175
+ } else t24 = $[31];
176
+ const hasQuery = t24;
182
177
  const grouped = groupListActions(actionsProp);
183
178
  const toolbarActions = [...grouped.toolbar, ...grouped.menu].filter(_temp);
184
179
  const selectionActions = toolbarActions.filter(_temp2);
185
180
  const resourceActions = toolbarActions.filter(_temp3);
186
181
  const selectable = selectableProp ?? selectionActions.length > 0;
187
182
  const selectedCount = selectable ? countSelected(selection, count) : 0;
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);
183
+ let t25;
184
+ if ($[32] !== selection) {
185
+ t25 = (item_1) => isItemSelected(selection, item_1.id);
186
+ $[32] = selection;
187
+ $[33] = t25;
188
+ } else t25 = $[33];
189
+ const selectedItems = pageItems.filter(t25);
195
190
  const pageSelection = getPageSelection(selection, pageItems);
196
191
  const getItemLabel = (item_2) => {
197
192
  if (getItemLabelProp !== void 0) return getItemLabelProp(item_2);
@@ -299,14 +294,14 @@ function ListView(t0) {
299
294
  icons: actionIcons
300
295
  });
301
296
  };
302
- let t27;
303
- if ($[36] !== intl) {
304
- t27 = intl.formatMessage(messages.selectPage);
305
- $[36] = intl;
306
- $[37] = t27;
307
- } else t27 = $[37];
297
+ let t26;
298
+ if ($[34] !== intl) {
299
+ t26 = intl.formatMessage(messages.selectPage);
300
+ $[34] = intl;
301
+ $[35] = t26;
302
+ } else t26 = $[35];
308
303
  const pageCheckbox = /* @__PURE__ */ jsx(Checkbox, {
309
- "aria-label": t27,
304
+ "aria-label": t26,
310
305
  isSelected: pageSelection === "all",
311
306
  isIndeterminate: pageSelection === "some",
312
307
  isDisabled: pageItems.length === 0,
@@ -319,56 +314,56 @@ function ListView(t0) {
319
314
  const sortable = allColumns.some(_temp5);
320
315
  const choosesColumns = columnChoice && allColumns.length > 1;
321
316
  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() {
317
+ let t27;
318
+ if ($[36] !== filterValues || $[37] !== list || $[38] !== query.q) {
319
+ t27 = function clearFilters() {
325
320
  Object.keys(filterValues).forEach((id_1) => list.setFilter(id_1, void 0));
326
321
  if ((query.q ?? "") !== "") list.setSearch("");
327
322
  };
328
- $[38] = filterValues;
329
- $[39] = list;
330
- $[40] = query.q;
331
- $[41] = t28;
332
- } else t28 = $[41];
333
- const clearFilters = t28;
334
- let t29;
323
+ $[36] = filterValues;
324
+ $[37] = list;
325
+ $[38] = query.q;
326
+ $[39] = t27;
327
+ } else t27 = $[39];
328
+ const clearFilters = t27;
329
+ let t28;
335
330
  bb0: {
336
331
  if (error !== null) {
332
+ let t29;
333
+ if ($[40] !== intl) {
334
+ t29 = intl.formatMessage(messages.loadFailed);
335
+ $[40] = intl;
336
+ $[41] = t29;
337
+ } else t29 = $[41];
337
338
  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, {
339
+ if ($[42] !== intl || $[43] !== onRetry) {
340
+ t30 = onRetry !== void 0 ? /* @__PURE__ */ jsx(Button, {
346
341
  size: "sm",
347
342
  onPress: onRetry,
348
343
  children: intl.formatMessage(messages.retry)
349
344
  }) : void 0;
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, {
345
+ $[42] = intl;
346
+ $[43] = onRetry;
347
+ $[44] = t30;
348
+ } else t30 = $[44];
349
+ let t31;
350
+ if ($[45] !== error.message || $[46] !== t29 || $[47] !== t30) {
351
+ t31 = /* @__PURE__ */ jsx(Alert, {
357
352
  tone: "danger",
358
- title: t30,
359
- actions: t31,
353
+ title: t29,
354
+ actions: t30,
360
355
  children: error.message
361
356
  });
362
- $[47] = error.message;
363
- $[48] = t30;
364
- $[49] = t31;
365
- $[50] = t32;
366
- } else t32 = $[50];
367
- t29 = t32;
357
+ $[45] = error.message;
358
+ $[46] = t29;
359
+ $[47] = t30;
360
+ $[48] = t31;
361
+ } else t31 = $[48];
362
+ t28 = t31;
368
363
  break bb0;
369
364
  }
370
365
  if (items === void 0) {
371
- t29 = /* @__PURE__ */ jsx(ListSkeleton, {
366
+ t28 = /* @__PURE__ */ jsx(ListSkeleton, {
372
367
  Layout,
373
368
  columns,
374
369
  perPage: query.perPage,
@@ -378,108 +373,109 @@ function ListView(t0) {
378
373
  break bb0;
379
374
  }
380
375
  if (pageItems.length === 0 && !inCalendar) {
376
+ let t29;
377
+ if ($[49] !== emptyMessage || $[50] !== hasQuery || $[51] !== intl) {
378
+ t29 = hasQuery ? intl.formatMessage(messages.noResults) : emptyMessage ?? intl.formatMessage(messages.empty);
379
+ $[49] = emptyMessage;
380
+ $[50] = hasQuery;
381
+ $[51] = intl;
382
+ $[52] = t29;
383
+ } else t29 = $[52];
381
384
  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;
385
+ if ($[53] !== t29) {
386
+ t30 = /* @__PURE__ */ jsx("p", { children: t29 });
387
+ $[53] = t29;
387
388
  $[54] = t30;
388
389
  } else t30 = $[54];
389
390
  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, {
391
+ if ($[55] !== clearFilters || $[56] !== hasQuery || $[57] !== intl) {
392
+ t31 = hasQuery ? /* @__PURE__ */ jsx(Button, {
398
393
  size: "sm",
399
394
  onPress: () => clearFilters(),
400
395
  children: intl.formatMessage(messages.clearFilters)
401
396
  }) : null;
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", {
397
+ $[55] = clearFilters;
398
+ $[56] = hasQuery;
399
+ $[57] = intl;
400
+ $[58] = t31;
401
+ } else t31 = $[58];
402
+ let t32;
403
+ if ($[59] !== t30 || $[60] !== t31) {
404
+ t32 = /* @__PURE__ */ jsxs("div", {
410
405
  className: ListView_module_default.state,
411
- children: [t31, t32]
406
+ children: [t30, t31]
412
407
  });
413
- $[61] = t31;
414
- $[62] = t32;
415
- $[63] = t33;
416
- } else t33 = $[63];
417
- t29 = t33;
408
+ $[59] = t30;
409
+ $[60] = t31;
410
+ $[61] = t32;
411
+ } else t32 = $[61];
412
+ t28 = t32;
418
413
  break bb0;
419
414
  }
415
+ let t29;
416
+ if ($[62] !== itemImage) {
417
+ t29 = itemImage !== void 0 ? (item_8) => getImageUrl(item_8[itemImage]) : void 0;
418
+ $[62] = itemImage;
419
+ $[63] = t29;
420
+ } else t29 = $[63];
420
421
  let t30;
421
- if ($[64] !== itemImage) {
422
- t30 = itemImage !== void 0 ? (item_8) => getImageUrl(item_8[itemImage]) : void 0;
423
- $[64] = itemImage;
422
+ if ($[64] !== currentItemId) {
423
+ t30 = (item_9) => item_9.id === currentItemId;
424
+ $[64] = currentItemId;
424
425
  $[65] = t30;
425
426
  } else t30 = $[65];
426
427
  let t31;
427
- if ($[66] !== currentItemId) {
428
- t31 = (item_9) => item_9.id === currentItemId;
429
- $[66] = currentItemId;
428
+ if ($[66] !== selection) {
429
+ t31 = (item_10) => isItemSelected(selection, item_10.id);
430
+ $[66] = selection;
430
431
  $[67] = t31;
431
432
  } else t31 = $[67];
432
433
  let t32;
433
- if ($[68] !== selection) {
434
- t32 = (item_10) => isItemSelected(selection, item_10.id);
435
- $[68] = selection;
434
+ if ($[68] !== list) {
435
+ t32 = (item_11) => list.toggle(item_11.id);
436
+ $[68] = list;
436
437
  $[69] = t32;
437
438
  } else t32 = $[69];
438
439
  let t33;
439
440
  if ($[70] !== list) {
440
- t33 = (item_11) => list.toggle(item_11.id);
441
+ t33 = (column_3) => list.toggleSort(column_3.id);
441
442
  $[70] = list;
442
443
  $[71] = t33;
443
444
  } 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, {
445
+ t28 = /* @__PURE__ */ jsx(Layout, {
451
446
  items: pageItems,
452
447
  columns,
453
448
  renderValue,
454
449
  getItemLabel,
455
450
  getItemHref,
456
- getItemImage: t30,
451
+ getItemImage: t29,
457
452
  calendar: inCalendar ? {
458
453
  field: calendar.field,
454
+ timeZone: getCalendarTimeZone([...fields, ...allColumns.map(_temp6)].find((field_0) => field_0?.name === calendar.field)),
459
455
  month: view.month ?? currentMonth(),
460
456
  onMonthChange: (month) => list.setMonth(month),
461
457
  more: total !== void 0 && total > pageItems.length ? { total } : cursors !== void 0 && cursors.next !== null ? { total: null } : null
462
458
  } : void 0,
463
- isCurrent: t31,
459
+ isCurrent: t30,
464
460
  selectable,
465
- isSelected: t32,
466
- onToggle: t33,
461
+ isSelected: t31,
462
+ onToggle: t32,
467
463
  renderActions,
468
464
  sort,
469
- onSort: t34,
465
+ onSort: t33,
470
466
  label,
471
467
  pageSelection: pageCheckbox,
472
468
  renderCell
473
469
  });
474
470
  }
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", {
471
+ const body = t28;
472
+ let t29;
473
+ if ($[72] !== className) {
474
+ t29 = cx(ListView_module_default.list, className);
475
+ $[72] = className;
476
+ $[73] = t29;
477
+ } else t29 = $[73];
478
+ const t30 = showToolbar ? /* @__PURE__ */ jsxs("div", {
483
479
  className: ListView_module_default.toolbar,
484
480
  children: [/* @__PURE__ */ jsxs("div", {
485
481
  className: ListView_module_default.toolbarStart,
@@ -533,43 +529,43 @@ function ListView(t0) {
533
529
  ]
534
530
  })]
535
531
  }) : null;
532
+ let t31;
536
533
  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;
534
+ if ($[74] !== list) {
535
+ t31 = (id_3) => list.setFilter(id_3, void 0);
536
+ t32 = () => list.setSearch("");
537
+ $[74] = list;
538
+ $[75] = t31;
539
+ $[76] = t32;
544
540
  } else {
545
- t32 = $[77];
546
- t33 = $[78];
541
+ t31 = $[75];
542
+ t32 = $[76];
547
543
  }
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, {
544
+ let t33;
545
+ if ($[77] !== allColumns || $[78] !== clearFilters || $[79] !== fields || $[80] !== filterLabels.labels || $[81] !== filterValues || $[82] !== filters || $[83] !== query.q || $[84] !== t31 || $[85] !== t32) {
546
+ t33 = /* @__PURE__ */ jsx(FilterChips, {
551
547
  filters,
552
548
  values: filterValues,
553
549
  q: query.q,
554
- onRemove: t32,
555
- onClearSearch: t33,
550
+ onRemove: t31,
551
+ onClearSearch: t32,
556
552
  onClear: clearFilters,
557
553
  columns: allColumns,
558
554
  fields,
559
555
  labels: filterLabels.labels
560
556
  });
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", {
557
+ $[77] = allColumns;
558
+ $[78] = clearFilters;
559
+ $[79] = fields;
560
+ $[80] = filterLabels.labels;
561
+ $[81] = filterValues;
562
+ $[82] = filters;
563
+ $[83] = query.q;
564
+ $[84] = t31;
565
+ $[85] = t32;
566
+ $[86] = t33;
567
+ } else t33 = $[86];
568
+ const t34 = selectedCount > 0 ? /* @__PURE__ */ jsxs("div", {
573
569
  className: ListView_module_default.selection,
574
570
  children: [
575
571
  /* @__PURE__ */ jsx("span", {
@@ -606,21 +602,21 @@ function ListView(t0) {
606
602
  }) : null
607
603
  ]
608
604
  }) : null;
609
- const t36 = isLoading && items !== void 0;
610
- let t37;
611
- if ($[89] !== body || $[90] !== t36) {
612
- t37 = /* @__PURE__ */ jsx("div", {
605
+ const t35 = isLoading && items !== void 0;
606
+ let t36;
607
+ if ($[87] !== body || $[88] !== t35) {
608
+ t36 = /* @__PURE__ */ jsx("div", {
613
609
  className: ListView_module_default.body,
614
- "aria-busy": t36,
610
+ "aria-busy": t35,
615
611
  children: body
616
612
  });
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, {
613
+ $[87] = body;
614
+ $[88] = t35;
615
+ $[89] = t36;
616
+ } else t36 = $[89];
617
+ let t37;
618
+ if ($[90] !== cursors || $[91] !== error || $[92] !== inCalendar || $[93] !== list || $[94] !== pageItems || $[95] !== perPageOptions || $[96] !== query.cursor || $[97] !== query.page || $[98] !== query.perPage || $[99] !== total) {
619
+ t37 = inCalendar ? null : cursors !== void 0 && error === null ? /* @__PURE__ */ jsx(CursorPagination, {
624
620
  perPage: query.perPage ?? pageItems.length,
625
621
  hasPrevious: query.cursor !== void 0,
626
622
  hasNext: cursors.next !== null,
@@ -638,61 +634,64 @@ function ListView(t0) {
638
634
  perPageOptions,
639
635
  onPerPageChange: (perPage_0) => list.setPerPage(perPage_0)
640
636
  }) : null;
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;
637
+ $[90] = cursors;
638
+ $[91] = error;
639
+ $[92] = inCalendar;
640
+ $[93] = list;
641
+ $[94] = pageItems;
642
+ $[95] = perPageOptions;
643
+ $[96] = query.cursor;
644
+ $[97] = query.page;
645
+ $[98] = query.perPage;
646
+ $[99] = total;
647
+ $[100] = t37;
648
+ } else t37 = $[100];
649
+ let t38;
650
+ if ($[101] !== execute) {
651
+ t38 = (event_1) => void execute(event_1);
652
+ $[101] = execute;
651
653
  $[102] = t38;
652
654
  } else t38 = $[102];
653
655
  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, {
656
+ if ($[103] !== closeConfirmation || $[104] !== confirming || $[105] !== preview || $[106] !== t38) {
657
+ t39 = /* @__PURE__ */ jsx(ConfirmDialog, {
662
658
  event: confirming,
663
659
  preview,
664
- onConfirm: t39,
660
+ onConfirm: t38,
665
661
  onCancel: closeConfirmation
666
662
  });
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,
663
+ $[103] = closeConfirmation;
664
+ $[104] = confirming;
665
+ $[105] = preview;
666
+ $[106] = t38;
667
+ $[107] = t39;
668
+ } else t39 = $[107];
669
+ let t40;
670
+ if ($[108] !== t29 || $[109] !== t30 || $[110] !== t33 || $[111] !== t34 || $[112] !== t36 || $[113] !== t37 || $[114] !== t39) {
671
+ t40 = /* @__PURE__ */ jsxs("div", {
672
+ className: t29,
677
673
  children: [
678
- t31,
674
+ t30,
675
+ t33,
679
676
  t34,
680
- t35,
677
+ t36,
681
678
  t37,
682
- t38,
683
- t40
679
+ t39
684
680
  ]
685
681
  });
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;
682
+ $[108] = t29;
683
+ $[109] = t30;
684
+ $[110] = t33;
685
+ $[111] = t34;
686
+ $[112] = t36;
687
+ $[113] = t37;
688
+ $[114] = t39;
689
+ $[115] = t40;
690
+ } else t40 = $[115];
691
+ return t40;
692
+ }
693
+ function _temp6(column_2) {
694
+ return column_2.field;
696
695
  }
697
696
  function _temp5(column_1) {
698
697
  return column_1.sortable === true;