@questpie/admin 3.2.3 → 3.2.5

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.
Files changed (244) hide show
  1. package/dist/client/blocks/block-renderer.d.mts +2 -2
  2. package/dist/client/blocks/block-renderer.mjs +164 -339
  3. package/dist/client/components/actions/action-button.mjs +9 -9
  4. package/dist/client/components/actions/action-dialog.mjs +195 -493
  5. package/dist/client/components/actions/confirmation-dialog.mjs +44 -159
  6. package/dist/client/components/actions/header-actions.mjs +73 -165
  7. package/dist/client/components/admin-link.d.mts +2 -2
  8. package/dist/client/components/admin-link.mjs +40 -126
  9. package/dist/client/components/auth/auth-loading.mjs +9 -44
  10. package/dist/client/components/blocks/block-canvas.mjs +31 -95
  11. package/dist/client/components/blocks/block-editor-context.mjs +13 -57
  12. package/dist/client/components/blocks/block-editor-layout.mjs +72 -166
  13. package/dist/client/components/blocks/block-editor-provider.mjs +184 -245
  14. package/dist/client/components/blocks/block-fields-renderer.mjs +54 -229
  15. package/dist/client/components/blocks/block-insert-button.mjs +49 -165
  16. package/dist/client/components/blocks/block-item-menu.mjs +102 -301
  17. package/dist/client/components/blocks/block-item.mjs +136 -370
  18. package/dist/client/components/blocks/block-library-sidebar.mjs +106 -220
  19. package/dist/client/components/blocks/block-tree.mjs +12 -68
  20. package/dist/client/components/blocks/block-type-icon.mjs +14 -56
  21. package/dist/client/components/brand-logo.mjs +35 -149
  22. package/dist/client/components/component-renderer.mjs +42 -118
  23. package/dist/client/components/error-boundary.mjs +14 -58
  24. package/dist/client/components/fields/array-field.mjs +209 -521
  25. package/dist/client/components/fields/asset-preview-field.mjs +41 -141
  26. package/dist/client/components/fields/blocks-field/blocks-field.mjs +60 -156
  27. package/dist/client/components/fields/boolean-field.mjs +29 -59
  28. package/dist/client/components/fields/date-field.mjs +7 -37
  29. package/dist/client/components/fields/datetime-field.mjs +7 -38
  30. package/dist/client/components/fields/email-field.mjs +25 -54
  31. package/dist/client/components/fields/field-wrapper.mjs +30 -105
  32. package/dist/client/components/fields/json-field.mjs +107 -313
  33. package/dist/client/components/fields/locale-badge.mjs +6 -15
  34. package/dist/client/components/fields/number-field.mjs +27 -60
  35. package/dist/client/components/fields/object-array-field.mjs +283 -659
  36. package/dist/client/components/fields/object-field.mjs +165 -633
  37. package/dist/client/components/fields/relation/displays/cards-display.mjs +106 -220
  38. package/dist/client/components/fields/relation/displays/chips-display.mjs +78 -150
  39. package/dist/client/components/fields/relation/displays/grid-display.mjs +92 -186
  40. package/dist/client/components/fields/relation/displays/list-display.mjs +122 -239
  41. package/dist/client/components/fields/relation/displays/table-display.mjs +70 -244
  42. package/dist/client/components/fields/relation/relation-items-display.mjs +30 -126
  43. package/dist/client/components/fields/relation-field.mjs +10 -66
  44. package/dist/client/components/fields/relation-picker.mjs +18 -18
  45. package/dist/client/components/fields/relation-select.mjs +12 -12
  46. package/dist/client/components/fields/rich-text-editor/bubble-menu.mjs +80 -182
  47. package/dist/client/components/fields/rich-text-editor/image-popover.mjs +8 -19
  48. package/dist/client/components/fields/rich-text-editor/image-upload.mjs +13 -29
  49. package/dist/client/components/fields/rich-text-editor/index.mjs +196 -530
  50. package/dist/client/components/fields/rich-text-editor/slash-commands.mjs +61 -111
  51. package/dist/client/components/fields/rich-text-editor/table-controls.mjs +105 -415
  52. package/dist/client/components/fields/rich-text-editor/toolbar.mjs +256 -511
  53. package/dist/client/components/fields/rich-text-field.mjs +14 -53
  54. package/dist/client/components/fields/select-field.mjs +39 -74
  55. package/dist/client/components/fields/text-field.mjs +26 -59
  56. package/dist/client/components/fields/textarea-field.mjs +26 -58
  57. package/dist/client/components/fields/time-field.mjs +7 -35
  58. package/dist/client/components/fields/upload-field.mjs +47 -165
  59. package/dist/client/components/filter-builder/columns-tab.mjs +80 -280
  60. package/dist/client/components/filter-builder/filter-builder-sheet.mjs +197 -540
  61. package/dist/client/components/filter-builder/filters-tab.mjs +96 -386
  62. package/dist/client/components/filter-builder/saved-views-tab.mjs +133 -351
  63. package/dist/client/components/history-sidebar.mjs +306 -611
  64. package/dist/client/components/layout/field-layout-renderer.mjs +106 -254
  65. package/dist/client/components/locale-switcher.mjs +106 -228
  66. package/dist/client/components/media/media-grid.mjs +84 -273
  67. package/dist/client/components/media/media-picker-dialog.mjs +177 -494
  68. package/dist/client/components/preview/live-preview-mode.mjs +240 -438
  69. package/dist/client/components/preview/preview-pane.mjs +22 -22
  70. package/dist/client/components/primitives/asset-preview.mjs +290 -666
  71. package/dist/client/components/primitives/checkbox-input.mjs +9 -35
  72. package/dist/client/components/primitives/date-input.mjs +109 -327
  73. package/dist/client/components/primitives/dropzone.mjs +209 -336
  74. package/dist/client/components/primitives/field-select-control.mjs +12 -80
  75. package/dist/client/components/primitives/number-input.mjs +4 -4
  76. package/dist/client/components/primitives/select-multi.mjs +200 -559
  77. package/dist/client/components/primitives/select-single.mjs +165 -499
  78. package/dist/client/components/primitives/time-input.mjs +43 -117
  79. package/dist/client/components/primitives/toggle-input.mjs +9 -29
  80. package/dist/client/components/sheets/resource-sheet.mjs +61 -70
  81. package/dist/client/components/ui/accordion.mjs +35 -155
  82. package/dist/client/components/ui/alert.mjs +13 -68
  83. package/dist/client/components/ui/badge.mjs +9 -51
  84. package/dist/client/components/ui/button.mjs +8 -54
  85. package/dist/client/components/ui/card.mjs +37 -193
  86. package/dist/client/components/ui/checkbox.mjs +12 -68
  87. package/dist/client/components/ui/command.mjs +48 -219
  88. package/dist/client/components/ui/dialog.mjs +50 -262
  89. package/dist/client/components/ui/drawer.mjs +55 -259
  90. package/dist/client/components/ui/dropdown-menu.mjs +86 -427
  91. package/dist/client/components/ui/empty-state.mjs +28 -98
  92. package/dist/client/components/ui/field.mjs +73 -309
  93. package/dist/client/components/ui/input-group.mjs +42 -167
  94. package/dist/client/components/ui/input.mjs +7 -37
  95. package/dist/client/components/ui/kbd.mjs +6 -36
  96. package/dist/client/components/ui/label.mjs +7 -37
  97. package/dist/client/components/ui/popover.mjs +34 -169
  98. package/dist/client/components/ui/responsive-dialog.mjs +67 -273
  99. package/dist/client/components/ui/scroll-fade.mjs +63 -158
  100. package/dist/client/components/ui/search-input.mjs +33 -100
  101. package/dist/client/components/ui/select.mjs +72 -393
  102. package/dist/client/components/ui/separator.mjs +7 -38
  103. package/dist/client/components/ui/sheet.mjs +49 -269
  104. package/dist/client/components/ui/sidebar.mjs +171 -690
  105. package/dist/client/components/ui/skeleton.mjs +7 -38
  106. package/dist/client/components/ui/sonner.mjs +11 -42
  107. package/dist/client/components/ui/switch.mjs +9 -45
  108. package/dist/client/components/ui/table.mjs +48 -266
  109. package/dist/client/components/ui/tabs.mjs +26 -139
  110. package/dist/client/components/ui/textarea.mjs +6 -32
  111. package/dist/client/components/ui/tooltip.mjs +27 -129
  112. package/dist/client/components/widgets/chart-widget.mjs +174 -522
  113. package/dist/client/components/widgets/progress-widget.mjs +66 -172
  114. package/dist/client/components/widgets/quick-actions-widget.mjs +102 -261
  115. package/dist/client/components/widgets/recent-items-widget.mjs +69 -195
  116. package/dist/client/components/widgets/stats-widget.mjs +41 -175
  117. package/dist/client/components/widgets/table-widget.mjs +9 -9
  118. package/dist/client/components/widgets/timeline-widget.mjs +86 -226
  119. package/dist/client/components/widgets/value-widget.mjs +74 -381
  120. package/dist/client/components/widgets/widget-empty-state.mjs +26 -76
  121. package/dist/client/components/widgets/widget-skeletons.mjs +138 -421
  122. package/dist/client/contexts/focus-context.d.mts +4 -0
  123. package/dist/client/contexts/focus-context.mjs +87 -150
  124. package/dist/client/hooks/typed-hooks.mjs +241 -701
  125. package/dist/client/hooks/use-action.mjs +62 -198
  126. package/dist/client/hooks/use-admin-config.mjs +5 -35
  127. package/dist/client/hooks/use-admin-preferences.mjs +16 -88
  128. package/dist/client/hooks/use-admin-routes.mjs +22 -56
  129. package/dist/client/hooks/use-audit-history.mjs +21 -69
  130. package/dist/client/hooks/use-brand.mjs +1 -9
  131. package/dist/client/hooks/use-collection-fields.mjs +17 -57
  132. package/dist/client/hooks/use-collection-meta.mjs +12 -44
  133. package/dist/client/hooks/use-collection-schema.mjs +10 -33
  134. package/dist/client/hooks/use-collection-validation.mjs +23 -53
  135. package/dist/client/hooks/use-collection.mjs +194 -614
  136. package/dist/client/hooks/use-current-user.mjs +0 -1
  137. package/dist/client/hooks/use-field-hooks.mjs +10 -10
  138. package/dist/client/hooks/use-field-options.mjs +61 -202
  139. package/dist/client/hooks/use-global-fields.mjs +14 -46
  140. package/dist/client/hooks/use-global-meta.mjs +9 -30
  141. package/dist/client/hooks/use-global-schema.mjs +9 -30
  142. package/dist/client/hooks/use-global.mjs +63 -219
  143. package/dist/client/hooks/use-locks.mjs +117 -325
  144. package/dist/client/hooks/use-media-query.mjs +16 -36
  145. package/dist/client/hooks/use-prefill-params.mjs +0 -1
  146. package/dist/client/hooks/use-questpie-query-options.mjs +12 -29
  147. package/dist/client/hooks/use-reactive-fields.mjs +1 -1
  148. package/dist/client/hooks/use-reactive-prop.mjs +65 -223
  149. package/dist/client/hooks/use-realtime-highlight.mjs +51 -114
  150. package/dist/client/hooks/use-saved-views.mjs +22 -103
  151. package/dist/client/hooks/use-search-param-toggle.mjs +28 -79
  152. package/dist/client/hooks/use-search.mjs +31 -143
  153. package/dist/client/hooks/use-server-actions.mjs +18 -50
  154. package/dist/client/hooks/use-server-validation.mjs +72 -166
  155. package/dist/client/hooks/use-server-widget-data.mjs +7 -33
  156. package/dist/client/hooks/use-setup-status.mjs +12 -25
  157. package/dist/client/hooks/use-sidebar-search-param.mjs +33 -78
  158. package/dist/client/hooks/use-transition-stage.mjs +8 -38
  159. package/dist/client/hooks/use-upload.mjs +54 -152
  160. package/dist/client/hooks/use-validation-error-map.mjs +6 -26
  161. package/dist/client/hooks/use-view-state.mjs +187 -437
  162. package/dist/client/i18n/hooks.mjs +65 -197
  163. package/dist/client/lib/render-profiler.mjs +14 -41
  164. package/dist/client/preview/block-scope-context.d.mts +2 -2
  165. package/dist/client/preview/block-scope-context.mjs +14 -36
  166. package/dist/client/preview/diff.mjs +110 -0
  167. package/dist/client/preview/preview-banner.mjs +42 -108
  168. package/dist/client/preview/preview-field.d.mts +4 -4
  169. package/dist/client/preview/preview-field.mjs +166 -409
  170. package/dist/client/preview/use-collection-preview.mjs +135 -201
  171. package/dist/client/runtime/content-locales-provider.mjs +31 -83
  172. package/dist/client/runtime/locale-scope.mjs +22 -63
  173. package/dist/client/runtime/provider.mjs +100 -255
  174. package/dist/client/runtime/translations-provider.mjs +41 -107
  175. package/dist/client/scope/picker.d.mts +2 -2
  176. package/dist/client/scope/picker.mjs +86 -321
  177. package/dist/client/scope/provider.d.mts +2 -2
  178. package/dist/client/scope/provider.mjs +8 -17
  179. package/dist/client/views/auth/accept-invite-form.d.mts +2 -2
  180. package/dist/client/views/auth/accept-invite-form.mjs +121 -412
  181. package/dist/client/views/auth/auth-layout.d.mts +3 -3
  182. package/dist/client/views/auth/auth-layout.mjs +104 -284
  183. package/dist/client/views/auth/forgot-password-form.d.mts +2 -2
  184. package/dist/client/views/auth/forgot-password-form.mjs +94 -325
  185. package/dist/client/views/auth/invite-form.mjs +107 -442
  186. package/dist/client/views/auth/login-form.d.mts +2 -2
  187. package/dist/client/views/auth/login-form.mjs +116 -337
  188. package/dist/client/views/auth/reset-password-form.mjs +128 -453
  189. package/dist/client/views/auth/setup-form.mjs +140 -478
  190. package/dist/client/views/collection/auto-form-fields.mjs +243 -615
  191. package/dist/client/views/collection/bulk-action-toolbar.mjs +212 -400
  192. package/dist/client/views/collection/cells/complex-cells.mjs +183 -611
  193. package/dist/client/views/collection/cells/primitive-cells.mjs +109 -363
  194. package/dist/client/views/collection/cells/relation-cells.mjs +86 -233
  195. package/dist/client/views/collection/cells/shared/asset-thumbnail.mjs +142 -371
  196. package/dist/client/views/collection/cells/shared/relation-chip.mjs +35 -131
  197. package/dist/client/views/collection/cells/upload-cells.mjs +60 -177
  198. package/dist/client/views/collection/columns/build-columns.mjs +8 -48
  199. package/dist/client/views/collection/field-renderer.mjs +11 -24
  200. package/dist/client/views/collection/form-view.mjs +288 -560
  201. package/dist/client/views/collection/table-view.mjs +239 -469
  202. package/dist/client/views/collection/view-skeletons.mjs +112 -237
  203. package/dist/client/views/common/global-search.mjs +241 -543
  204. package/dist/client/views/dashboard/dashboard-grid.mjs +256 -775
  205. package/dist/client/views/dashboard/dashboard-widget.mjs +38 -126
  206. package/dist/client/views/dashboard/widget-card.mjs +61 -269
  207. package/dist/client/views/globals/global-form-view.mjs +478 -1298
  208. package/dist/client/views/layout/admin-layout-provider.mjs +28 -88
  209. package/dist/client/views/layout/admin-layout.mjs +83 -246
  210. package/dist/client/views/layout/admin-router.mjs +457 -1289
  211. package/dist/client/views/layout/admin-sidebar.mjs +510 -1292
  212. package/dist/client/views/layout/admin-theme.mjs +30 -64
  213. package/dist/client/views/layout/admin-view-layout.mjs +40 -144
  214. package/dist/client/views/pages/accept-invite-page.mjs +95 -290
  215. package/dist/client/views/pages/dashboard-page.mjs +11 -57
  216. package/dist/client/views/pages/forgot-password-page.mjs +31 -83
  217. package/dist/client/views/pages/invite-page.mjs +35 -90
  218. package/dist/client/views/pages/login-page.mjs +41 -121
  219. package/dist/client/views/pages/reset-password-page.d.mts +2 -2
  220. package/dist/client/views/pages/reset-password-page.mjs +46 -173
  221. package/dist/client/views/pages/setup-page.d.mts +2 -2
  222. package/dist/client/views/pages/setup-page.mjs +33 -95
  223. package/dist/components/rich-text/rich-text-renderer.d.mts +2 -2
  224. package/dist/components/rich-text/rich-text-renderer.mjs +9 -33
  225. package/dist/server/modules/admin/collections/account.d.mts +50 -50
  226. package/dist/server/modules/admin/collections/admin-locks.d.mts +54 -54
  227. package/dist/server/modules/admin/collections/admin-preferences.d.mts +39 -39
  228. package/dist/server/modules/admin/collections/admin-saved-views.d.mts +47 -47
  229. package/dist/server/modules/admin/collections/apikey.d.mts +68 -68
  230. package/dist/server/modules/admin/collections/assets.d.mts +34 -34
  231. package/dist/server/modules/admin/collections/session.d.mts +42 -42
  232. package/dist/server/modules/admin/collections/user.d.mts +53 -53
  233. package/dist/server/modules/admin/collections/verification.d.mts +36 -36
  234. package/dist/server/modules/admin/index.d.mts +21 -20
  235. package/dist/server/modules/admin/routes/admin-config.d.mts +2 -2
  236. package/dist/server/modules/admin/routes/execute-action.d.mts +9 -9
  237. package/dist/server/modules/admin/routes/locales.d.mts +2 -2
  238. package/dist/server/modules/admin/routes/preview.d.mts +11 -11
  239. package/dist/server/modules/admin/routes/reactive.d.mts +9 -9
  240. package/dist/server/modules/admin/routes/setup.d.mts +7 -7
  241. package/dist/server/modules/admin/routes/translations.d.mts +4 -4
  242. package/dist/server/modules/admin/routes/widget-data.d.mts +5 -5
  243. package/dist/server/modules/admin-preferences/collections/saved-views.d.mts +27 -27
  244. package/package.json +3 -5
@@ -44,7 +44,6 @@ import { useRealtimeHighlight } from "../../hooks/use-realtime-highlight.mjs";
44
44
  import { useDeleteSavedView, useSaveView, useSavedViews } from "../../hooks/use-saved-views.mjs";
45
45
  import { useViewState } from "../../hooks/use-view-state.mjs";
46
46
  import { BulkActionToolbar } from "./bulk-action-toolbar.mjs";
47
- import { c } from "react/compiler-runtime";
48
47
  import { Icon } from "@iconify/react";
49
48
  import * as React from "react";
50
49
  import { Suspense, useMemo, useState } from "react";
@@ -70,76 +69,38 @@ const REORDER_DROP_ANIMATION = {
70
69
  duration: REORDER_DROP_DURATION,
71
70
  easing: REORDER_MOVE_EASING
72
71
  };
73
- function UploadCollectionButton(t0) {
74
- const $ = c(13);
75
- const { collection, onUploaded } = t0;
72
+ function UploadCollectionButton({ collection, onUploaded }) {
76
73
  const { t } = useTranslation();
77
74
  const [open, setOpen] = React.useState(false);
78
- let t1;
79
- let t2;
80
- if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
81
- t1 = () => setOpen(true);
82
- t2 = /* @__PURE__ */ jsx(Icon, {
75
+ return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsxs(Button, {
76
+ variant: "default",
77
+ size: "sm",
78
+ className: "gap-2",
79
+ onClick: () => setOpen(true),
80
+ children: [/* @__PURE__ */ jsx(Icon, {
83
81
  icon: "ph:cloud-arrow-up",
84
82
  className: "size-3.5"
85
- });
86
- $[0] = t1;
87
- $[1] = t2;
88
- } else {
89
- t1 = $[0];
90
- t2 = $[1];
91
- }
92
- let t3;
93
- if ($[2] !== t) {
94
- t3 = t("common.upload");
95
- $[2] = t;
96
- $[3] = t3;
97
- } else t3 = $[3];
98
- let t4;
99
- if ($[4] !== t3) {
100
- t4 = /* @__PURE__ */ jsxs(Button, {
101
- variant: "default",
102
- size: "sm",
103
- className: "gap-2",
104
- onClick: t1,
105
- children: [t2, t3]
106
- });
107
- $[4] = t3;
108
- $[5] = t4;
109
- } else t4 = $[5];
110
- let t5;
111
- if ($[6] !== collection || $[7] !== onUploaded || $[8] !== open) {
112
- t5 = /* @__PURE__ */ jsx(UploadCollectionSheet, {
113
- open,
114
- onOpenChange: setOpen,
115
- collection,
116
- onUploaded
117
- });
118
- $[6] = collection;
119
- $[7] = onUploaded;
120
- $[8] = open;
121
- $[9] = t5;
122
- } else t5 = $[9];
123
- let t6;
124
- if ($[10] !== t4 || $[11] !== t5) {
125
- t6 = /* @__PURE__ */ jsxs(Fragment, { children: [t4, t5] });
126
- $[10] = t4;
127
- $[11] = t5;
128
- $[12] = t6;
129
- } else t6 = $[12];
130
- return t6;
83
+ }), t("common.upload")]
84
+ }), /* @__PURE__ */ jsx(UploadCollectionSheet, {
85
+ open,
86
+ onOpenChange: setOpen,
87
+ collection,
88
+ onUploaded
89
+ })] });
131
90
  }
132
91
  function UploadCollectionSheet({ open, onOpenChange, collection, onUploaded }) {
133
92
  const { t } = useTranslation();
134
93
  const { uploadMany, isUploading, progress } = useUpload();
135
94
  const [uploadedAssets, setUploadedAssets] = React.useState([]);
136
95
  const [editAssetId, setEditAssetId] = React.useState(null);
137
- React.useEffect(() => {
138
- if (!open) {
139
- setUploadedAssets([]);
140
- setEditAssetId(null);
141
- }
142
- }, [open]);
96
+ const resetUploadSheetState = React.useCallback(() => {
97
+ setUploadedAssets([]);
98
+ setEditAssetId(null);
99
+ }, []);
100
+ const handleOpenChange = React.useCallback((nextOpen) => {
101
+ if (!nextOpen) resetUploadSheetState();
102
+ onOpenChange(nextOpen);
103
+ }, [onOpenChange, resetUploadSheetState]);
143
104
  const handleValidationError = React.useCallback((errors) => {
144
105
  for (const validationError of errors) toast.error(validationError.message);
145
106
  }, []);
@@ -166,7 +127,7 @@ function UploadCollectionSheet({ open, onOpenChange, collection, onUploaded }) {
166
127
  ]);
167
128
  return /* @__PURE__ */ jsx(Sheet, {
168
129
  open,
169
- onOpenChange,
130
+ onOpenChange: handleOpenChange,
170
131
  modal: false,
171
132
  children: /* @__PURE__ */ jsxs(SheetContent, {
172
133
  side: "right",
@@ -206,7 +167,7 @@ function UploadCollectionSheet({ open, onOpenChange, collection, onUploaded }) {
206
167
  className: "border-t px-6 py-4",
207
168
  children: /* @__PURE__ */ jsx(Button, {
208
169
  variant: "outline",
209
- onClick: () => onOpenChange(false),
170
+ onClick: () => handleOpenChange(false),
210
171
  disabled: isUploading,
211
172
  children: t("common.close")
212
173
  })
@@ -326,247 +287,68 @@ function getGroupSortIndex(value, field) {
326
287
  }
327
288
  const ReorderRowContext = React.createContext(null);
328
289
  function ReorderHandle() {
329
- const $ = c(9);
330
290
  const sortable = React.useContext(ReorderRowContext);
331
- const t0 = sortable?.setActivatorNodeRef;
332
- let t1;
333
- if ($[0] !== sortable?.attributes) {
334
- t1 = sortable?.attributes ?? {};
335
- $[0] = sortable?.attributes;
336
- $[1] = t1;
337
- } else t1 = $[1];
338
- let t2;
339
- if ($[2] !== sortable?.listeners) {
340
- t2 = sortable?.listeners ?? {};
341
- $[2] = sortable?.listeners;
342
- $[3] = t2;
343
- } else t2 = $[3];
344
- let t3;
345
- if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
346
- t3 = /* @__PURE__ */ jsx(Icon, {
291
+ return /* @__PURE__ */ jsx("button", {
292
+ type: "button",
293
+ ref: sortable?.setActivatorNodeRef,
294
+ className: "text-muted-foreground/50 hover:text-muted-foreground focus-visible:ring-ring/40 flex h-8 w-full cursor-grab touch-none items-center justify-center rounded-md transition-colors select-none focus-visible:ring-2 focus-visible:outline-none active:cursor-grabbing",
295
+ "aria-label": "Drag to reorder",
296
+ ...sortable?.attributes ?? {},
297
+ ...sortable?.listeners ?? {},
298
+ children: /* @__PURE__ */ jsx(Icon, {
347
299
  icon: "ph:dots-six-vertical",
348
300
  className: "size-3.5"
349
- });
350
- $[4] = t3;
351
- } else t3 = $[4];
352
- let t4;
353
- if ($[5] !== t0 || $[6] !== t1 || $[7] !== t2) {
354
- t4 = /* @__PURE__ */ jsx("button", {
355
- type: "button",
356
- ref: t0,
357
- className: "text-muted-foreground/50 hover:text-muted-foreground focus-visible:ring-ring/40 flex h-8 w-full cursor-grab touch-none items-center justify-center rounded-md transition-colors select-none focus-visible:ring-2 focus-visible:outline-none active:cursor-grabbing",
358
- "aria-label": "Drag to reorder",
359
- ...t1,
360
- ...t2,
361
- children: t3
362
- });
363
- $[5] = t0;
364
- $[6] = t1;
365
- $[7] = t2;
366
- $[8] = t4;
367
- } else t4 = $[8];
368
- return t4;
301
+ })
302
+ });
369
303
  }
370
- function ReorderDragOverlay(t0) {
371
- const $ = c(24);
372
- const { row, columns, rect } = t0;
304
+ function ReorderDragOverlay({ row, columns, rect }) {
373
305
  if (!row) return null;
374
- let t1;
375
- let t2;
376
- let t3;
377
- let t4;
378
- let t5;
379
- if ($[0] !== columns || $[1] !== rect?.height || $[2] !== rect?.width || $[3] !== row) {
380
- const cells = row.getVisibleCells?.() ?? [];
381
- t4 = "bg-background text-foreground ring-border-strong pointer-events-none overflow-hidden rounded-md shadow-xl ring-1";
382
- const t6$1 = rect?.width;
383
- const t7$1 = rect?.height;
384
- if ($[9] !== t6$1 || $[10] !== t7$1) {
385
- t5 = {
386
- width: t6$1,
387
- height: t7$1
388
- };
389
- $[9] = t6$1;
390
- $[10] = t7$1;
391
- $[11] = t5;
392
- } else t5 = $[11];
393
- t1 = "grid h-full items-center";
394
- let t8;
395
- if ($[12] !== columns) {
396
- t8 = columns.map(_temp3).join(" ");
397
- $[12] = columns;
398
- $[13] = t8;
399
- } else t8 = $[13];
400
- if ($[14] !== t8) {
401
- t2 = { gridTemplateColumns: t8 };
402
- $[14] = t8;
403
- $[15] = t2;
404
- } else t2 = $[15];
405
- t3 = cells.map(_temp4);
406
- $[0] = columns;
407
- $[1] = rect?.height;
408
- $[2] = rect?.width;
409
- $[3] = row;
410
- $[4] = t1;
411
- $[5] = t2;
412
- $[6] = t3;
413
- $[7] = t4;
414
- $[8] = t5;
415
- } else {
416
- t1 = $[4];
417
- t2 = $[5];
418
- t3 = $[6];
419
- t4 = $[7];
420
- t5 = $[8];
421
- }
422
- let t6;
423
- if ($[16] !== t1 || $[17] !== t2 || $[18] !== t3) {
424
- t6 = /* @__PURE__ */ jsx("div", {
425
- className: t1,
426
- style: t2,
427
- children: t3
428
- });
429
- $[16] = t1;
430
- $[17] = t2;
431
- $[18] = t3;
432
- $[19] = t6;
433
- } else t6 = $[19];
434
- let t7;
435
- if ($[20] !== t4 || $[21] !== t5 || $[22] !== t6) {
436
- t7 = /* @__PURE__ */ jsx("div", {
437
- className: t4,
438
- style: t5,
439
- children: t6
440
- });
441
- $[20] = t4;
442
- $[21] = t5;
443
- $[22] = t6;
444
- $[23] = t7;
445
- } else t7 = $[23];
446
- return t7;
447
- }
448
- function _temp4(cell, index) {
306
+ const cells = row.getVisibleCells?.() ?? [];
449
307
  return /* @__PURE__ */ jsx("div", {
450
- className: cn("min-w-0 truncate px-3 py-1.5 text-sm whitespace-nowrap tabular-nums", index === 0 && "px-1.5 text-center"),
451
- children: index === 0 ? /* @__PURE__ */ jsx(Icon, {
452
- icon: "ph:dots-six-vertical",
453
- className: "text-muted-foreground mx-auto size-3.5"
454
- }) : flexRender(cell.column.columnDef.cell, cell.getContext())
455
- }, cell.id);
456
- }
457
- function _temp3(column) {
458
- return `${getColumnSize(column, 120)}px`;
308
+ className: "bg-background text-foreground ring-border-strong pointer-events-none overflow-hidden rounded-md shadow-xl ring-1",
309
+ style: {
310
+ width: rect?.width,
311
+ height: rect?.height
312
+ },
313
+ children: /* @__PURE__ */ jsx("div", {
314
+ className: "grid h-full items-center",
315
+ style: { gridTemplateColumns: columns.map((column) => `${getColumnSize(column, 120)}px`).join(" ") },
316
+ children: cells.map((cell, index) => /* @__PURE__ */ jsx("div", {
317
+ className: cn("min-w-0 truncate px-3 py-1.5 text-sm whitespace-nowrap tabular-nums", index === 0 && "px-1.5 text-center"),
318
+ children: index === 0 ? /* @__PURE__ */ jsx(Icon, {
319
+ icon: "ph:dots-six-vertical",
320
+ className: "text-muted-foreground mx-auto size-3.5"
321
+ }) : flexRender(cell.column.columnDef.cell, cell.getContext())
322
+ }, cell.id))
323
+ })
324
+ });
459
325
  }
460
- function SortableTableRow(t0) {
461
- const $ = c(33);
462
- let children;
463
- let className;
464
- let id;
465
- let props;
466
- if ($[0] !== t0) {
467
- ({id, className, children, ...props} = t0);
468
- $[0] = t0;
469
- $[1] = children;
470
- $[2] = className;
471
- $[3] = id;
472
- $[4] = props;
473
- } else {
474
- children = $[1];
475
- className = $[2];
476
- id = $[3];
477
- props = $[4];
478
- }
479
- let t1;
480
- if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
481
- t1 = {
326
+ function SortableTableRow({ id, className, children, ...props }) {
327
+ const { attributes, listeners, setNodeRef, setActivatorNodeRef, transform, transition, isDragging } = useSortable({
328
+ id,
329
+ transition: {
482
330
  duration: REORDER_DROP_DURATION,
483
331
  easing: REORDER_MOVE_EASING
484
- };
485
- $[5] = t1;
486
- } else t1 = $[5];
487
- let t2;
488
- if ($[6] !== id) {
489
- t2 = {
490
- id,
491
- transition: t1
492
- };
493
- $[6] = id;
494
- $[7] = t2;
495
- } else t2 = $[7];
496
- const { attributes, listeners, setNodeRef, setActivatorNodeRef, transform, transition, isDragging } = useSortable(t2);
497
- const t3 = isDragging && "bg-muted/[0.18] opacity-35";
498
- let t4;
499
- if ($[8] !== className || $[9] !== t3) {
500
- t4 = cn("select-none", t3, className);
501
- $[8] = className;
502
- $[9] = t3;
503
- $[10] = t4;
504
- } else t4 = $[10];
505
- let t5;
506
- if ($[11] !== isDragging || $[12] !== transform) {
507
- t5 = isDragging ? void 0 : CSS.Transform.toString(transform);
508
- $[11] = isDragging;
509
- $[12] = transform;
510
- $[13] = t5;
511
- } else t5 = $[13];
512
- const t6 = isDragging ? void 0 : transition;
513
- let t7;
514
- if ($[14] !== props.style) {
515
- t7 = props.style ?? {};
516
- $[14] = props.style;
517
- $[15] = t7;
518
- } else t7 = $[15];
519
- let t8;
520
- if ($[16] !== t5 || $[17] !== t6 || $[18] !== t7) {
521
- t8 = {
522
- transform: t5,
523
- transition: t6,
524
- ...t7
525
- };
526
- $[16] = t5;
527
- $[17] = t6;
528
- $[18] = t7;
529
- $[19] = t8;
530
- } else t8 = $[19];
531
- let t9;
532
- if ($[20] !== attributes || $[21] !== listeners || $[22] !== setActivatorNodeRef) {
533
- t9 = {
534
- attributes,
535
- listeners,
536
- setActivatorNodeRef
537
- };
538
- $[20] = attributes;
539
- $[21] = listeners;
540
- $[22] = setActivatorNodeRef;
541
- $[23] = t9;
542
- } else t9 = $[23];
543
- let t10;
544
- if ($[24] !== children || $[25] !== t9) {
545
- t10 = /* @__PURE__ */ jsx(ReorderRowContext.Provider, {
546
- value: t9,
332
+ }
333
+ });
334
+ return /* @__PURE__ */ jsx(TableRow, {
335
+ ref: setNodeRef,
336
+ className: cn("select-none", isDragging && "bg-muted/[0.18] opacity-35", className),
337
+ style: {
338
+ transform: isDragging ? void 0 : CSS.Transform.toString(transform),
339
+ transition: isDragging ? void 0 : transition,
340
+ ...props.style ?? {}
341
+ },
342
+ ...props,
343
+ children: /* @__PURE__ */ jsx(ReorderRowContext.Provider, {
344
+ value: {
345
+ attributes,
346
+ listeners,
347
+ setActivatorNodeRef
348
+ },
547
349
  children
548
- });
549
- $[24] = children;
550
- $[25] = t9;
551
- $[26] = t10;
552
- } else t10 = $[26];
553
- let t11;
554
- if ($[27] !== props || $[28] !== setNodeRef || $[29] !== t10 || $[30] !== t4 || $[31] !== t8) {
555
- t11 = /* @__PURE__ */ jsx(TableRow, {
556
- ref: setNodeRef,
557
- className: t4,
558
- style: t8,
559
- ...props,
560
- children: t10
561
- });
562
- $[27] = props;
563
- $[28] = setNodeRef;
564
- $[29] = t10;
565
- $[30] = t4;
566
- $[31] = t8;
567
- $[32] = t11;
568
- } else t11 = $[32];
569
- return t11;
350
+ })
351
+ });
570
352
  }
571
353
  /**
572
354
  * TableView - Default table-based list view for collections
@@ -595,22 +377,10 @@ function SortableTableRow(t0) {
595
377
  * ```
596
378
  */
597
379
  function TableView(props) {
598
- const $ = c(3);
599
- let t0;
600
- if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
601
- t0 = /* @__PURE__ */ jsx(TableViewSkeleton, {});
602
- $[0] = t0;
603
- } else t0 = $[0];
604
- let t1;
605
- if ($[1] !== props) {
606
- t1 = /* @__PURE__ */ jsx(Suspense, {
607
- fallback: t0,
608
- children: /* @__PURE__ */ jsx(TableViewInner, { ...props })
609
- });
610
- $[1] = props;
611
- $[2] = t1;
612
- } else t1 = $[2];
613
- return t1;
380
+ return /* @__PURE__ */ jsx(Suspense, {
381
+ fallback: /* @__PURE__ */ jsx(TableViewSkeleton, {}),
382
+ children: /* @__PURE__ */ jsx(TableViewInner, { ...props })
383
+ });
614
384
  }
615
385
  /**
616
386
  * Inner component that uses Suspense queries.
@@ -742,41 +512,41 @@ function TableViewInner({ collection, config, viewConfig, navigate, basePath = "
742
512
  if (Array.isArray(val)) return val.length === 0;
743
513
  return false;
744
514
  };
745
- const normalizeSelectValue = (val_0, fieldOptions) => {
515
+ const normalizeSelectValue = (val, fieldOptions) => {
746
516
  const optionsList = fieldOptions?.options;
747
- if (!optionsList) return val_0;
517
+ if (!optionsList) return val;
748
518
  const map = new Map(flattenOptions(optionsList).map((opt) => [String(opt.value), opt.value]));
749
519
  const mapValue = (item) => map.get(String(item)) ?? item;
750
- if (Array.isArray(val_0)) return val_0.map(mapValue);
751
- if (val_0 === void 0 || val_0 === null) return val_0;
752
- return mapValue(val_0);
520
+ if (Array.isArray(val)) return val.map(mapValue);
521
+ if (val === void 0 || val === null) return val;
522
+ return mapValue(val);
753
523
  };
754
- const coerceValue = (val_1, fieldDef) => {
755
- if (!fieldDef) return val_1;
524
+ const coerceValue = (val, fieldDef) => {
525
+ if (!fieldDef) return val;
756
526
  const fieldType = fieldDef?.name ?? "text";
757
- const fieldOptions_0 = fieldDef?.["~options"] ?? {};
758
- if (fieldType === "number" && typeof val_1 === "string") {
759
- const parsed = Number(val_1);
760
- return Number.isNaN(parsed) ? val_1 : parsed;
527
+ const fieldOptions = fieldDef?.["~options"] ?? {};
528
+ if (fieldType === "number" && typeof val === "string") {
529
+ const parsed = Number(val);
530
+ return Number.isNaN(parsed) ? val : parsed;
761
531
  }
762
- if ((fieldType === "checkbox" || fieldType === "switch") && typeof val_1 === "string") {
763
- if (val_1 === "true") return true;
764
- if (val_1 === "false") return false;
532
+ if ((fieldType === "checkbox" || fieldType === "switch") && typeof val === "string") {
533
+ if (val === "true") return true;
534
+ if (val === "false") return false;
765
535
  }
766
- if (fieldType === "select") return normalizeSelectValue(val_1, fieldOptions_0);
767
- return val_1;
536
+ if (fieldType === "select") return normalizeSelectValue(val, fieldOptions);
537
+ return val;
768
538
  };
769
- const toArray = (val_2) => {
770
- if (Array.isArray(val_2)) return val_2;
771
- if (val_2 === void 0 || val_2 === null || val_2 === "") return [];
772
- return [val_2];
539
+ const toArray = (val) => {
540
+ if (Array.isArray(val)) return val;
541
+ if (val === void 0 || val === null || val === "") return [];
542
+ return [val];
773
543
  };
774
- const buildRelationCondition = (operator, val_3, relationType) => {
544
+ const buildRelationCondition = (operator, val, relationType) => {
775
545
  const isMultiple = relationType === "multiple";
776
- const ids = toArray(val_3);
546
+ const ids = toArray(val);
777
547
  switch (operator) {
778
- case "equals": return isMultiple ? { some: { id: val_3 } } : { is: { id: val_3 } };
779
- case "not_equals": return isMultiple ? { none: { id: val_3 } } : { isNot: { id: val_3 } };
548
+ case "equals": return isMultiple ? { some: { id: val } } : { is: { id: val } };
549
+ case "not_equals": return isMultiple ? { none: { id: val } } : { isNot: { id: val } };
780
550
  case "in": return isMultiple ? { some: { id: { in: ids } } } : { is: { id: { in: ids } } };
781
551
  case "not_in": return isMultiple ? { none: { id: { in: ids } } } : { isNot: { id: { in: ids } } };
782
552
  case "some": return { some: { id: { in: ids } } };
@@ -788,63 +558,63 @@ function TableViewInner({ collection, config, viewConfig, navigate, basePath = "
788
558
  }
789
559
  };
790
560
  for (const filter of viewState.config.filters) {
791
- const { field: field_0, operator: operator_0, value } = filter;
792
- if (!field_0 || field_0 === "_title") continue;
793
- const fieldDef_0 = resolvedFields?.[field_0];
794
- const fieldType_0 = fieldDef_0?.name ?? "text";
795
- const fieldOptions_1 = fieldDef_0?.["~options"] ?? {};
796
- const relationName = fieldType_0 === "relation" ? fieldOptions_1.relationName ?? field_0 : void 0;
561
+ const { field, operator, value } = filter;
562
+ if (!field || field === "_title") continue;
563
+ const fieldDef = resolvedFields?.[field];
564
+ const fieldType = fieldDef?.name ?? "text";
565
+ const fieldOptions = fieldDef?.["~options"] ?? {};
566
+ const relationName = fieldType === "relation" ? fieldOptions.relationName ?? field : void 0;
797
567
  const hasRelation = relationName && (relationNames.length === 0 || relationNames.includes(relationName));
798
- const isRelationField = fieldType_0 === "relation" && !!hasRelation;
799
- if (operator_0 !== "is_empty" && operator_0 !== "is_not_empty" && isEmptyValue(value)) continue;
800
- const normalizedValue = coerceValue(value, fieldDef_0);
568
+ const isRelationField = fieldType === "relation" && !!hasRelation;
569
+ if (operator !== "is_empty" && operator !== "is_not_empty" && isEmptyValue(value)) continue;
570
+ const normalizedValue = coerceValue(value, fieldDef);
801
571
  if (isRelationField && relationName) {
802
- const condition = buildRelationCondition(operator_0, normalizedValue, fieldOptions_1.type === "multiple" ? "multiple" : "single");
572
+ const condition = buildRelationCondition(operator, normalizedValue, fieldOptions.type === "multiple" ? "multiple" : "single");
803
573
  if (condition) whereConditions[relationName] = condition;
804
574
  continue;
805
575
  }
806
- switch (operator_0) {
576
+ switch (operator) {
807
577
  case "equals":
808
- whereConditions[field_0] = normalizedValue;
578
+ whereConditions[field] = normalizedValue;
809
579
  break;
810
580
  case "not_equals":
811
- whereConditions[field_0] = { ne: normalizedValue };
581
+ whereConditions[field] = { ne: normalizedValue };
812
582
  break;
813
583
  case "contains":
814
- whereConditions[field_0] = { contains: normalizedValue };
584
+ whereConditions[field] = { contains: normalizedValue };
815
585
  break;
816
586
  case "not_contains":
817
- whereConditions[field_0] = { notIlike: `%${normalizedValue}%` };
587
+ whereConditions[field] = { notIlike: `%${normalizedValue}%` };
818
588
  break;
819
589
  case "starts_with":
820
- whereConditions[field_0] = { startsWith: normalizedValue };
590
+ whereConditions[field] = { startsWith: normalizedValue };
821
591
  break;
822
592
  case "ends_with":
823
- whereConditions[field_0] = { endsWith: normalizedValue };
593
+ whereConditions[field] = { endsWith: normalizedValue };
824
594
  break;
825
595
  case "greater_than":
826
- whereConditions[field_0] = { gt: normalizedValue };
596
+ whereConditions[field] = { gt: normalizedValue };
827
597
  break;
828
598
  case "less_than":
829
- whereConditions[field_0] = { lt: normalizedValue };
599
+ whereConditions[field] = { lt: normalizedValue };
830
600
  break;
831
601
  case "greater_than_or_equal":
832
- whereConditions[field_0] = { gte: normalizedValue };
602
+ whereConditions[field] = { gte: normalizedValue };
833
603
  break;
834
604
  case "less_than_or_equal":
835
- whereConditions[field_0] = { lte: normalizedValue };
605
+ whereConditions[field] = { lte: normalizedValue };
836
606
  break;
837
607
  case "in":
838
- whereConditions[field_0] = { in: Array.isArray(normalizedValue) ? normalizedValue : [normalizedValue] };
608
+ whereConditions[field] = { in: Array.isArray(normalizedValue) ? normalizedValue : [normalizedValue] };
839
609
  break;
840
610
  case "not_in":
841
- whereConditions[field_0] = { notIn: Array.isArray(normalizedValue) ? normalizedValue : [normalizedValue] };
611
+ whereConditions[field] = { notIn: Array.isArray(normalizedValue) ? normalizedValue : [normalizedValue] };
842
612
  break;
843
613
  case "is_empty":
844
- whereConditions[field_0] = { isNull: true };
614
+ whereConditions[field] = { isNull: true };
845
615
  break;
846
616
  case "is_not_empty":
847
- whereConditions[field_0] = { isNotNull: true };
617
+ whereConditions[field] = { isNotNull: true };
848
618
  break;
849
619
  }
850
620
  }
@@ -896,12 +666,12 @@ function TableViewInner({ collection, config, viewConfig, navigate, basePath = "
896
666
  const groupableNames = groupingConfig?.fields ?? [];
897
667
  if (groupableNames.length === 0) return [];
898
668
  const groupableSet = new Set(groupableNames);
899
- return availableFields.filter((field_1) => groupableSet.has(field_1.name));
669
+ return availableFields.filter((field) => groupableSet.has(field.name));
900
670
  }, [availableFields, groupingConfig?.fields]);
901
671
  const visibleColumnDefs = useMemo(() => {
902
672
  const selectCol = {
903
673
  id: "_select",
904
- header: ({ table: t_0 }) => {
674
+ header: ({ table: t$1 }) => {
905
675
  if (isReorderMode) return /* @__PURE__ */ jsx("div", {
906
676
  className: "text-muted-foreground/60 flex h-8 items-center justify-center",
907
677
  title: "Order",
@@ -911,16 +681,16 @@ function TableViewInner({ collection, config, viewConfig, navigate, basePath = "
911
681
  className: "size-3.5"
912
682
  })
913
683
  });
914
- const isAllSelected = t_0.getIsAllPageRowsSelected();
915
- const isSomeSelected = t_0.getIsSomePageRowsSelected();
684
+ const isAllSelected = t$1.getIsAllPageRowsSelected();
685
+ const isSomeSelected = t$1.getIsSomePageRowsSelected();
916
686
  return /* @__PURE__ */ jsx("div", {
917
687
  role: "presentation",
918
688
  onClick: (e) => e.stopPropagation(),
919
- onKeyDown: (e_0) => e_0.stopPropagation(),
689
+ onKeyDown: (e) => e.stopPropagation(),
920
690
  children: /* @__PURE__ */ jsx(Checkbox, {
921
691
  checked: isAllSelected,
922
692
  indeterminate: !isAllSelected && isSomeSelected,
923
- onCheckedChange: (checked) => t_0.toggleAllPageRowsSelected(!!checked),
693
+ onCheckedChange: (checked) => t$1.toggleAllPageRowsSelected(!!checked),
924
694
  "aria-label": "Select all"
925
695
  })
926
696
  });
@@ -929,12 +699,12 @@ function TableViewInner({ collection, config, viewConfig, navigate, basePath = "
929
699
  if (isReorderMode) return /* @__PURE__ */ jsx(ReorderHandle, {});
930
700
  return /* @__PURE__ */ jsx("div", {
931
701
  role: "presentation",
932
- onClick: (e_1) => e_1.stopPropagation(),
933
- onKeyDown: (e_2) => e_2.stopPropagation(),
702
+ onClick: (e) => e.stopPropagation(),
703
+ onKeyDown: (e) => e.stopPropagation(),
934
704
  children: /* @__PURE__ */ jsx(Checkbox, {
935
705
  checked: row.getIsSelected(),
936
706
  disabled: !row.getCanSelect(),
937
- onCheckedChange: (checked_0) => row.toggleSelected(!!checked_0),
707
+ onCheckedChange: (checked) => row.toggleSelected(!!checked),
938
708
  "aria-label": "Select row"
939
709
  })
940
710
  });
@@ -946,13 +716,13 @@ function TableViewInner({ collection, config, viewConfig, navigate, basePath = "
946
716
  const titleFieldName = collectionMeta?.title?.fieldName;
947
717
  const titleColName = collectionMeta?.title?.type === "field" && titleFieldName ? titleFieldName : "_title";
948
718
  const orderedColumns = [selectCol];
949
- const titleCol = columns.find((c$1) => c$1.accessorKey === titleColName || c$1.id === titleColName);
719
+ const titleCol = columns.find((c) => c.accessorKey === titleColName || c.id === titleColName);
950
720
  if (titleCol) orderedColumns.push(titleCol);
951
- const columnsToShow = viewState.config.visibleColumns.length > 0 ? viewState.config.visibleColumns : defaultColumns.length > 0 ? defaultColumns : columns.map((c_0) => c_0.accessorKey || c_0.id).filter(Boolean);
721
+ const columnsToShow = viewState.config.visibleColumns.length > 0 ? viewState.config.visibleColumns : defaultColumns.length > 0 ? defaultColumns : columns.map((c) => c.accessorKey || c.id).filter(Boolean);
952
722
  const columnMap = /* @__PURE__ */ new Map();
953
- for (const c_1 of columns) {
954
- const key = c_1.accessorKey || c_1.id;
955
- if (key) columnMap.set(key, c_1);
723
+ for (const c of columns) {
724
+ const key = c.accessorKey || c.id;
725
+ if (key) columnMap.set(key, c);
956
726
  }
957
727
  for (const colName of columnsToShow) {
958
728
  if (colName === titleColName) continue;
@@ -965,19 +735,19 @@ function TableViewInner({ collection, config, viewConfig, navigate, basePath = "
965
735
  className: "sr-only",
966
736
  children: t("common.actions")
967
737
  }),
968
- cell: ({ row: row_0 }) => /* @__PURE__ */ jsx("div", {
738
+ cell: ({ row }) => /* @__PURE__ */ jsx("div", {
969
739
  role: "presentation",
970
740
  className: "flex justify-end gap-1",
971
741
  onClick: (event) => event.stopPropagation(),
972
- onKeyDown: (event_0) => event_0.stopPropagation(),
742
+ onKeyDown: (event) => event.stopPropagation(),
973
743
  children: actions.row.map((action) => /* @__PURE__ */ jsx(ActionButton, {
974
744
  action,
975
745
  collection,
976
- item: row_0.original,
746
+ item: row.original,
977
747
  helpers: actionHelpers,
978
748
  size: "icon-sm",
979
749
  iconOnly: true,
980
- onOpenDialog: (dialogAction_0) => openDialog(dialogAction_0, row_0.original)
750
+ onOpenDialog: (dialogAction$1) => openDialog(dialogAction$1, row.original)
981
751
  }, action.id))
982
752
  }),
983
753
  size: 72,
@@ -1035,26 +805,26 @@ function TableViewInner({ collection, config, viewConfig, navigate, basePath = "
1035
805
  return;
1036
806
  }
1037
807
  setOptimisticOrderIds((current) => {
1038
- const itemIds = items.map((item_0) => String(item_0.id));
808
+ const itemIds = items.map((item) => String(item.id));
1039
809
  if (!current) return itemIds;
1040
810
  const knownIds = new Set(itemIds);
1041
811
  const next = current.filter((id) => knownIds.has(id));
1042
- for (const id_0 of itemIds) if (!next.includes(id_0)) next.push(id_0);
812
+ for (const id of itemIds) if (!next.includes(id)) next.push(id);
1043
813
  return next;
1044
814
  });
1045
815
  }, [isReorderMode, items]);
1046
816
  const filteredItems = useMemo(() => {
1047
817
  if (!isReorderMode || !optimisticOrderIds) return items;
1048
- const itemsById = new Map(items.map((item_1) => [String(item_1.id), item_1]));
818
+ const itemsById = new Map(items.map((item) => [String(item.id), item]));
1049
819
  const seen = /* @__PURE__ */ new Set();
1050
- const ordered = optimisticOrderIds.map((id_1) => {
1051
- const item_2 = itemsById.get(id_1);
1052
- if (item_2) seen.add(id_1);
1053
- return item_2;
820
+ const ordered = optimisticOrderIds.map((id) => {
821
+ const item = itemsById.get(id);
822
+ if (item) seen.add(id);
823
+ return item;
1054
824
  }).filter(Boolean);
1055
- for (const item_3 of items) {
1056
- const id_2 = String(item_3.id);
1057
- if (!seen.has(id_2)) ordered.push(item_3);
825
+ for (const item of items) {
826
+ const id = String(item.id);
827
+ if (!seen.has(id)) ordered.push(item);
1058
828
  }
1059
829
  return ordered;
1060
830
  }, [
@@ -1109,7 +879,7 @@ function TableViewInner({ collection, config, viewConfig, navigate, basePath = "
1109
879
  onSortingChange: handleSortingChange,
1110
880
  enableRowSelection: true,
1111
881
  onRowSelectionChange: setRowSelection,
1112
- getRowId: (row_1) => row_1.id,
882
+ getRowId: (row) => row.id,
1113
883
  state: {
1114
884
  sorting,
1115
885
  rowSelection
@@ -1119,31 +889,31 @@ function TableViewInner({ collection, config, viewConfig, navigate, basePath = "
1119
889
  const visibleLeafColumns = table.getVisibleLeafColumns();
1120
890
  const selectColumnWidth = getColumnSize(visibleLeafColumns[0], 40);
1121
891
  const titleColumnWidth = getColumnSize(visibleLeafColumns[1], 360);
1122
- const sortableRowIds = useMemo(() => tableRows.map((row_2) => String(row_2.id)), [tableRows]);
1123
- const activeReorderRow = useMemo(() => activeReorderId ? tableRows.find((row_3) => String(row_3.id) === activeReorderId) : null, [activeReorderId, tableRows]);
892
+ const sortableRowIds = useMemo(() => tableRows.map((row) => String(row.id)), [tableRows]);
893
+ const activeReorderRow = useMemo(() => activeReorderId ? tableRows.find((row) => String(row.id) === activeReorderId) : null, [activeReorderId, tableRows]);
1124
894
  const reorderSensors = useSensors(useSensor(PointerSensor, { activationConstraint: { distance: 4 } }), useSensor(KeyboardSensor, { coordinateGetter: sortableKeyboardCoordinates }));
1125
- const handleReorderDragStart = React.useCallback((event_1) => {
1126
- const initialRect = event_1.active.rect.current.initial;
895
+ const handleReorderDragStart = React.useCallback((event) => {
896
+ const initialRect = event.active.rect.current.initial;
1127
897
  clearReorderOverlay();
1128
898
  reorderStartOrderIdsRef.current = sortableRowIds;
1129
- setActiveReorderId(String(event_1.active.id));
899
+ setActiveReorderId(String(event.active.id));
1130
900
  setActiveReorderRect(initialRect ? {
1131
901
  width: initialRect.width,
1132
902
  height: initialRect.height
1133
903
  } : null);
1134
- setOptimisticOrderIds((current_0) => current_0 ?? sortableRowIds);
904
+ setOptimisticOrderIds((current) => current ?? sortableRowIds);
1135
905
  }, [clearReorderOverlay, sortableRowIds]);
1136
906
  const handleReorderDragCancel = React.useCallback(() => {
1137
907
  setOptimisticOrderIds(reorderStartOrderIdsRef.current);
1138
908
  clearReorderOverlay();
1139
909
  reorderStartOrderIdsRef.current = null;
1140
910
  }, [clearReorderOverlay]);
1141
- const handleReorderDragEnd = React.useCallback(async (event_2) => {
911
+ const handleReorderDragEnd = React.useCallback(async (event) => {
1142
912
  if (updateBatchMutation.isPending) {
1143
913
  clearReorderOverlay();
1144
914
  return;
1145
915
  }
1146
- const { active: active_0, over } = event_2;
916
+ const { active, over } = event;
1147
917
  const previousOrderIds = reorderStartOrderIdsRef.current ?? sortableRowIds;
1148
918
  reorderStartOrderIdsRef.current = null;
1149
919
  if (!over) {
@@ -1152,8 +922,8 @@ function TableViewInner({ collection, config, viewConfig, navigate, basePath = "
1152
922
  return;
1153
923
  }
1154
924
  let nextOrderIds = previousOrderIds;
1155
- if (active_0.id !== over.id) {
1156
- const oldIndex = previousOrderIds.indexOf(String(active_0.id));
925
+ if (active.id !== over.id) {
926
+ const oldIndex = previousOrderIds.indexOf(String(active.id));
1157
927
  const newIndex = previousOrderIds.indexOf(String(over.id));
1158
928
  if (oldIndex === -1 || newIndex === -1 || oldIndex === newIndex) {
1159
929
  clearReorderOverlay(REORDER_DROP_DURATION);
@@ -1167,11 +937,11 @@ function TableViewInner({ collection, config, viewConfig, navigate, basePath = "
1167
937
  }
1168
938
  setOptimisticOrderIds(nextOrderIds);
1169
939
  clearReorderOverlay(REORDER_DROP_DURATION);
1170
- const rowsById = new Map(tableRows.map((row_4) => [String(row_4.id), row_4]));
1171
- const reorderedRows = nextOrderIds.map((id_3) => rowsById.get(id_3)).filter((row_5) => !!row_5);
940
+ const rowsById = new Map(tableRows.map((row) => [String(row.id), row]));
941
+ const reorderedRows = nextOrderIds.map((id) => rowsById.get(id)).filter((row) => !!row);
1172
942
  try {
1173
- await updateBatchMutation.mutateAsync({ updates: reorderedRows.map((row_6, index) => ({
1174
- id: String(row_6.id),
943
+ await updateBatchMutation.mutateAsync({ updates: reorderedRows.map((row, index) => ({
944
+ id: String(row.id),
1175
945
  data: { [orderField]: (index + 1) * orderStep }
1176
946
  })) });
1177
947
  actionHelpers.toast.success(t("collection.orderSaved"));
@@ -1192,59 +962,59 @@ function TableViewInner({ collection, config, viewConfig, navigate, basePath = "
1192
962
  ]);
1193
963
  const groupedRowModel = useMemo(() => {
1194
964
  const rows = tableRows;
1195
- const groupBy_0 = viewState.config.groupBy;
1196
- if (!groupBy_0) return rows.map((row_7) => ({
965
+ const groupBy = viewState.config.groupBy;
966
+ if (!groupBy) return rows.map((row) => ({
1197
967
  type: "row",
1198
- row: row_7
968
+ row
1199
969
  }));
1200
- const groupField = groupableFields.find((field_2) => field_2.name === groupBy_0);
970
+ const groupField = groupableFields.find((field) => field.name === groupBy);
1201
971
  const collapsedGroups = new Set(viewState.config.collapsedGroups ?? []);
1202
972
  const serverGroups = !isSearching ? listData?.groups : void 0;
1203
973
  if (serverGroups?.length) {
1204
- const rowsById_0 = new Map(rows.map((row_8) => [row_8.id, row_8]));
974
+ const rowsById = new Map(rows.map((row) => [row.id, row]));
1205
975
  return serverGroups.flatMap((group) => {
1206
976
  const label = stringifyGroupValue(group.value, groupField, resolveText, t, uiLocale, t("common.noValue"));
1207
- const groupKey = `${groupBy_0}:${label}`;
977
+ const groupKey = `${groupBy}:${label}`;
1208
978
  const collapsed = collapsedGroups.has(groupKey);
1209
- const groupRows = (group.docs ?? []).map((doc) => rowsById_0.get(String(doc.id))).filter(Boolean);
979
+ const groupRows = (group.docs ?? []).map((doc) => rowsById.get(String(doc.id))).filter(Boolean);
1210
980
  return [{
1211
981
  type: "group",
1212
982
  key: groupKey,
1213
983
  label,
1214
984
  count: group.count,
1215
985
  collapsed
1216
- }, ...collapsed ? [] : groupRows.map((row_9) => ({
986
+ }, ...collapsed ? [] : groupRows.map((row) => ({
1217
987
  type: "row",
1218
- row: row_9
988
+ row
1219
989
  }))];
1220
990
  });
1221
991
  }
1222
992
  const groups = /* @__PURE__ */ new Map();
1223
- for (const row_10 of rows) {
1224
- const valueLabel = stringifyGroupValue(row_10.original?.[groupBy_0], groupField, resolveText, t, uiLocale, t("common.noValue"));
1225
- const groupKey_0 = `${groupBy_0}:${valueLabel}`;
1226
- const group_0 = groups.get(groupKey_0);
1227
- if (group_0) {
1228
- group_0.rows.push(row_10);
993
+ for (const row of rows) {
994
+ const valueLabel = stringifyGroupValue(row.original?.[groupBy], groupField, resolveText, t, uiLocale, t("common.noValue"));
995
+ const groupKey = `${groupBy}:${valueLabel}`;
996
+ const group = groups.get(groupKey);
997
+ if (group) {
998
+ group.rows.push(row);
1229
999
  continue;
1230
1000
  }
1231
- groups.set(groupKey_0, {
1001
+ groups.set(groupKey, {
1232
1002
  label: valueLabel,
1233
- rows: [row_10],
1234
- sortIndex: getGroupSortIndex(row_10.original?.[groupBy_0], groupField)
1003
+ rows: [row],
1004
+ sortIndex: getGroupSortIndex(row.original?.[groupBy], groupField)
1235
1005
  });
1236
1006
  }
1237
- return Array.from(groups.entries()).sort(([, a], [, b]) => a.sortIndex - b.sortIndex).flatMap(([key_0, group_1]) => {
1238
- const collapsed_0 = collapsedGroups.has(key_0);
1007
+ return Array.from(groups.entries()).sort(([, a], [, b]) => a.sortIndex - b.sortIndex).flatMap(([key, group]) => {
1008
+ const collapsed = collapsedGroups.has(key);
1239
1009
  return [{
1240
1010
  type: "group",
1241
- key: key_0,
1242
- label: group_1.label,
1243
- count: group_1.rows.length,
1244
- collapsed: collapsed_0
1245
- }, ...collapsed_0 ? [] : group_1.rows.map((row_11) => ({
1011
+ key,
1012
+ label: group.label,
1013
+ count: group.rows.length,
1014
+ collapsed
1015
+ }, ...collapsed ? [] : group.rows.map((row) => ({
1246
1016
  type: "row",
1247
- row: row_11
1017
+ row
1248
1018
  }))];
1249
1019
  });
1250
1020
  }, [
@@ -1258,22 +1028,22 @@ function TableViewInner({ collection, config, viewConfig, navigate, basePath = "
1258
1028
  t,
1259
1029
  uiLocale
1260
1030
  ]);
1261
- const handleSaveView = (name, config_0) => {
1031
+ const handleSaveView = (name, config$1) => {
1262
1032
  saveViewMutation.mutate({
1263
1033
  name,
1264
- configuration: config_0
1034
+ configuration: config$1
1265
1035
  });
1266
1036
  };
1267
1037
  const handleDeleteView = (viewId) => {
1268
1038
  deleteViewMutation.mutate(viewId);
1269
1039
  };
1270
- const handleRowClick = (item_4) => {
1271
- navigate(`${basePath}/collections/${collection}/${item_4.id}`);
1040
+ const handleRowClick = (item) => {
1041
+ navigate(`${basePath}/collections/${collection}/${item.id}`);
1272
1042
  };
1273
- const handleBulkDelete = React.useCallback(async (ids_0) => {
1274
- const results = await Promise.allSettled(ids_0.map((id_4) => deleteMutation.mutateAsync({ id: id_4 })));
1043
+ const handleBulkDelete = React.useCallback(async (ids) => {
1044
+ const results = await Promise.allSettled(ids.map((id) => deleteMutation.mutateAsync({ id })));
1275
1045
  const successCount = results.filter((r) => r.status === "fulfilled").length;
1276
- const failCount = results.filter((r_0) => r_0.status === "rejected").length;
1046
+ const failCount = results.filter((r) => r.status === "rejected").length;
1277
1047
  if (failCount === 0) actionHelpers.toast.success(t("collection.bulkDeleteSuccess", { count: successCount }));
1278
1048
  else if (successCount === 0) actionHelpers.toast.error(t("collection.bulkDeleteError"));
1279
1049
  else actionHelpers.toast.warning(t("collection.bulkDeletePartial", {
@@ -1285,15 +1055,15 @@ function TableViewInner({ collection, config, viewConfig, navigate, basePath = "
1285
1055
  actionHelpers,
1286
1056
  t
1287
1057
  ]);
1288
- const handleBulkRestore = React.useCallback(async (ids_1) => {
1289
- const results_0 = await Promise.allSettled(ids_1.map((id_5) => restoreMutation.mutateAsync({ id: id_5 })));
1290
- const successCount_0 = results_0.filter((r_1) => r_1.status === "fulfilled").length;
1291
- const failCount_0 = results_0.filter((r_2) => r_2.status === "rejected").length;
1292
- if (failCount_0 === 0) actionHelpers.toast.success(t("collection.bulkRestoreSuccess", { count: successCount_0 }));
1293
- else if (successCount_0 === 0) actionHelpers.toast.error(t("collection.bulkRestoreError"));
1058
+ const handleBulkRestore = React.useCallback(async (ids) => {
1059
+ const results = await Promise.allSettled(ids.map((id) => restoreMutation.mutateAsync({ id })));
1060
+ const successCount = results.filter((r) => r.status === "fulfilled").length;
1061
+ const failCount = results.filter((r) => r.status === "rejected").length;
1062
+ if (failCount === 0) actionHelpers.toast.success(t("collection.bulkRestoreSuccess", { count: successCount }));
1063
+ else if (successCount === 0) actionHelpers.toast.error(t("collection.bulkRestoreError"));
1294
1064
  else actionHelpers.toast.warning(t("collection.bulkRestorePartial", {
1295
- success: successCount_0,
1296
- failed: failCount_0
1065
+ success: successCount,
1066
+ failed: failCount
1297
1067
  }));
1298
1068
  }, [
1299
1069
  restoreMutation,
@@ -1402,7 +1172,7 @@ function TableViewInner({ collection, config, viewConfig, navigate, basePath = "
1402
1172
  actions: actions.header,
1403
1173
  collection,
1404
1174
  helpers: actionHelpers,
1405
- onOpenDialog: (action_0) => openDialog(action_0)
1175
+ onOpenDialog: (action) => openDialog(action)
1406
1176
  })
1407
1177
  ] })
1408
1178
  }),
@@ -1414,7 +1184,7 @@ function TableViewInner({ collection, config, viewConfig, navigate, basePath = "
1414
1184
  className: "max-w-xl",
1415
1185
  children: /* @__PURE__ */ jsx(SearchInput, {
1416
1186
  value: searchTerm,
1417
- onChange: (e_3) => setSearchTerm(e_3.target.value),
1187
+ onChange: (e) => setSearchTerm(e.target.value),
1418
1188
  onClear: () => setSearchTerm(""),
1419
1189
  placeholder: t("common.search"),
1420
1190
  containerClassName: "h-10"
@@ -1458,7 +1228,7 @@ function TableViewInner({ collection, config, viewConfig, navigate, basePath = "
1458
1228
  helpers: actionHelpers,
1459
1229
  totalCount: isSearching ? searchData?.total : listData?.totalDocs,
1460
1230
  pageCount: filteredItems.length,
1461
- onOpenDialog: (action_1, items_0) => openDialog(action_1, items_0),
1231
+ onOpenDialog: (action, items$1) => openDialog(action, items$1),
1462
1232
  onBulkDelete: handleBulkDelete,
1463
1233
  onBulkRestore: handleBulkRestore,
1464
1234
  filterCount: viewState.config.filters.length,
@@ -1549,28 +1319,28 @@ function TableViewInner({ collection, config, viewConfig, navigate, basePath = "
1549
1319
  })
1550
1320
  ]
1551
1321
  }, entry.key);
1552
- const row_12 = entry.row;
1553
- const isRowDeleted = !!row_12.original?.deletedAt;
1322
+ const row = entry.row;
1323
+ const isRowDeleted = !!row.original?.deletedAt;
1554
1324
  return /* @__PURE__ */ jsx(isReorderMode ? SortableTableRow : TableRow, {
1555
- id: String(row_12.id),
1556
- "data-state": row_12.getIsSelected() && "selected",
1557
- className: cn("group", isReorderMode && "bg-muted/[0.18]", isHighlighted(row_12.id) && "animate-realtime-pulse", isRowDeleted && "opacity-50"),
1558
- children: row_12.getVisibleCells().map((cell, cellIndex) => {
1559
- const isCheckboxCol_0 = cellIndex === 0;
1560
- const columnWidth_0 = getColumnSize(cell.column, isCheckboxCol_0 ? 40 : 120);
1561
- const stickyLeft_0 = cellIndex < STICKY_TABLE_COLUMN_COUNT ? getStickyLeftOffset(visibleLeafColumns, cellIndex) : void 0;
1325
+ id: String(row.id),
1326
+ "data-state": row.getIsSelected() && "selected",
1327
+ className: cn("group", isReorderMode && "bg-muted/[0.18]", isHighlighted(row.id) && "animate-realtime-pulse", isRowDeleted && "opacity-50"),
1328
+ children: row.getVisibleCells().map((cell, cellIndex) => {
1329
+ const isCheckboxCol = cellIndex === 0;
1330
+ const columnWidth = getColumnSize(cell.column, isCheckboxCol ? 40 : 120);
1331
+ const stickyLeft = cellIndex < STICKY_TABLE_COLUMN_COUNT ? getStickyLeftOffset(visibleLeafColumns, cellIndex) : void 0;
1562
1332
  const isTitleCol = cellIndex === 1;
1563
1333
  return /* @__PURE__ */ jsx(TableCell, {
1564
- stickyLeft: stickyLeft_0,
1334
+ stickyLeft,
1565
1335
  showStickyBorder: cellIndex === STICKY_TABLE_COLUMN_COUNT - 1,
1566
- className: isCheckboxCol_0 ? "w-9 min-w-9 px-1.5" : void 0,
1567
- style: getColumnSizeStyle(columnWidth_0),
1336
+ className: isCheckboxCol ? "w-9 min-w-9 px-1.5" : void 0,
1337
+ style: getColumnSizeStyle(columnWidth),
1568
1338
  children: isTitleCol ? /* @__PURE__ */ jsxs("div", {
1569
1339
  className: "flex min-w-0 items-center gap-2",
1570
1340
  children: [
1571
1341
  /* @__PURE__ */ jsx("button", {
1572
1342
  type: "button",
1573
- onClick: () => handleRowClick(row_12.original),
1343
+ onClick: () => handleRowClick(row.original),
1574
1344
  disabled: isReorderMode,
1575
1345
  className: cn("decoration-muted-foreground/50 hover:decoration-foreground max-w-full min-w-0 text-left underline underline-offset-2 transition-colors disabled:cursor-default disabled:no-underline", !isReorderMode && "cursor-pointer"),
1576
1346
  children: flexRender(cell.column.columnDef.cell, cell.getContext())
@@ -1582,14 +1352,14 @@ function TableViewInner({ collection, config, viewConfig, navigate, basePath = "
1582
1352
  className: "size-3"
1583
1353
  }), t("common.deleted")]
1584
1354
  }),
1585
- isDocLocked(row_12.id) && (() => {
1586
- const lock = getLock(row_12.id);
1587
- const user_0 = lock ? getLockUser(lock) : null;
1355
+ isDocLocked(row.id) && (() => {
1356
+ const lock = getLock(row.id);
1357
+ const user$1 = lock ? getLockUser(lock) : null;
1588
1358
  return /* @__PURE__ */ jsxs("span", {
1589
1359
  className: "text-muted-foreground bg-muted inline-flex items-center gap-1 rounded-full px-1.5 py-0.5 text-xs",
1590
- title: user_0?.name ?? user_0?.email ?? "Someone is editing",
1591
- children: [user_0?.image ? /* @__PURE__ */ jsx("img", {
1592
- src: user_0.image,
1360
+ title: user$1?.name ?? user$1?.email ?? "Someone is editing",
1361
+ children: [user$1?.image ? /* @__PURE__ */ jsx("img", {
1362
+ src: user$1.image,
1593
1363
  alt: "",
1594
1364
  className: "image-outline size-4 rounded-full"
1595
1365
  }) : /* @__PURE__ */ jsx(Icon, {
@@ -1597,7 +1367,7 @@ function TableViewInner({ collection, config, viewConfig, navigate, basePath = "
1597
1367
  className: "size-3"
1598
1368
  }), /* @__PURE__ */ jsx("span", {
1599
1369
  className: "max-w-20 truncate",
1600
- children: user_0?.name?.split(" ")[0] ?? t("table.editing")
1370
+ children: user$1?.name?.split(" ")[0] ?? t("table.editing")
1601
1371
  })]
1602
1372
  });
1603
1373
  })()
@@ -1605,7 +1375,7 @@ function TableViewInner({ collection, config, viewConfig, navigate, basePath = "
1605
1375
  }) : flexRender(cell.column.columnDef.cell, cell.getContext())
1606
1376
  }, cell.id);
1607
1377
  })
1608
- }, row_12.id);
1378
+ }, row.id);
1609
1379
  }) })
1610
1380
  })
1611
1381
  ]
@@ -1649,7 +1419,7 @@ function TableViewInner({ collection, config, viewConfig, navigate, basePath = "
1649
1419
  children: t("table.show")
1650
1420
  }), /* @__PURE__ */ jsxs(Select, {
1651
1421
  value: String(viewState.config.pagination?.pageSize ?? 25),
1652
- onValueChange: (value_0) => viewState.setPageSize(Number(value_0)),
1422
+ onValueChange: (value) => viewState.setPageSize(Number(value)),
1653
1423
  children: [/* @__PURE__ */ jsx(SelectTrigger, {
1654
1424
  className: "h-8 w-[70px]",
1655
1425
  children: /* @__PURE__ */ jsx(SelectValue, {})
@@ -1755,7 +1525,7 @@ function TableViewInner({ collection, config, viewConfig, navigate, basePath = "
1755
1525
  }),
1756
1526
  dialogAction && /* @__PURE__ */ jsx(ActionDialog, {
1757
1527
  open: !!dialogAction,
1758
- onOpenChange: (open_0) => !open_0 && closeDialog(),
1528
+ onOpenChange: (open) => !open && closeDialog(),
1759
1529
  action: dialogAction,
1760
1530
  collection,
1761
1531
  item: dialogItem,