@questpie/admin 3.2.4 → 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 (248) 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.mjs +40 -126
  8. package/dist/client/components/auth/auth-loading.mjs +9 -44
  9. package/dist/client/components/blocks/block-canvas.mjs +31 -95
  10. package/dist/client/components/blocks/block-editor-context.mjs +13 -57
  11. package/dist/client/components/blocks/block-editor-layout.mjs +72 -166
  12. package/dist/client/components/blocks/block-editor-provider.mjs +184 -245
  13. package/dist/client/components/blocks/block-fields-renderer.mjs +54 -229
  14. package/dist/client/components/blocks/block-insert-button.mjs +49 -165
  15. package/dist/client/components/blocks/block-item-menu.mjs +102 -301
  16. package/dist/client/components/blocks/block-item.mjs +136 -370
  17. package/dist/client/components/blocks/block-library-sidebar.mjs +103 -230
  18. package/dist/client/components/blocks/block-tree.mjs +12 -68
  19. package/dist/client/components/blocks/block-type-icon.mjs +14 -56
  20. package/dist/client/components/brand-logo.mjs +35 -149
  21. package/dist/client/components/component-renderer.mjs +42 -118
  22. package/dist/client/components/error-boundary.mjs +14 -58
  23. package/dist/client/components/fields/array-field.mjs +209 -521
  24. package/dist/client/components/fields/asset-preview-field.mjs +41 -141
  25. package/dist/client/components/fields/blocks-field/blocks-field.mjs +60 -156
  26. package/dist/client/components/fields/boolean-field.mjs +29 -59
  27. package/dist/client/components/fields/date-field.mjs +7 -37
  28. package/dist/client/components/fields/datetime-field.mjs +7 -38
  29. package/dist/client/components/fields/email-field.mjs +25 -54
  30. package/dist/client/components/fields/field-wrapper.mjs +30 -105
  31. package/dist/client/components/fields/json-field.mjs +94 -296
  32. package/dist/client/components/fields/locale-badge.mjs +6 -15
  33. package/dist/client/components/fields/number-field.mjs +27 -60
  34. package/dist/client/components/fields/object-array-field.mjs +283 -659
  35. package/dist/client/components/fields/object-field.mjs +165 -633
  36. package/dist/client/components/fields/relation/displays/cards-display.mjs +106 -220
  37. package/dist/client/components/fields/relation/displays/chips-display.mjs +78 -150
  38. package/dist/client/components/fields/relation/displays/grid-display.mjs +92 -186
  39. package/dist/client/components/fields/relation/displays/list-display.mjs +122 -239
  40. package/dist/client/components/fields/relation/displays/table-display.mjs +70 -244
  41. package/dist/client/components/fields/relation/relation-items-display.mjs +30 -126
  42. package/dist/client/components/fields/relation-field.mjs +10 -66
  43. package/dist/client/components/fields/relation-picker.mjs +18 -18
  44. package/dist/client/components/fields/relation-select.mjs +12 -12
  45. package/dist/client/components/fields/rich-text-editor/bubble-menu.mjs +80 -180
  46. package/dist/client/components/fields/rich-text-editor/image-popover.mjs +2 -2
  47. package/dist/client/components/fields/rich-text-editor/image-upload.mjs +13 -29
  48. package/dist/client/components/fields/rich-text-editor/index.mjs +195 -513
  49. package/dist/client/components/fields/rich-text-editor/slash-commands.mjs +61 -111
  50. package/dist/client/components/fields/rich-text-editor/table-controls.mjs +105 -415
  51. package/dist/client/components/fields/rich-text-editor/toolbar.mjs +256 -511
  52. package/dist/client/components/fields/rich-text-field.mjs +14 -53
  53. package/dist/client/components/fields/select-field.mjs +39 -74
  54. package/dist/client/components/fields/text-field.mjs +26 -59
  55. package/dist/client/components/fields/textarea-field.mjs +26 -58
  56. package/dist/client/components/fields/time-field.mjs +7 -35
  57. package/dist/client/components/fields/upload-field.mjs +47 -165
  58. package/dist/client/components/filter-builder/columns-tab.mjs +80 -280
  59. package/dist/client/components/filter-builder/filter-builder-sheet.mjs +197 -540
  60. package/dist/client/components/filter-builder/filters-tab.mjs +96 -386
  61. package/dist/client/components/filter-builder/saved-views-tab.mjs +133 -351
  62. package/dist/client/components/history-sidebar.mjs +285 -605
  63. package/dist/client/components/layout/field-layout-renderer.mjs +106 -254
  64. package/dist/client/components/locale-switcher.mjs +106 -228
  65. package/dist/client/components/media/media-grid.mjs +84 -273
  66. package/dist/client/components/media/media-picker-dialog.mjs +176 -476
  67. package/dist/client/components/preview/live-preview-mode.mjs +233 -458
  68. package/dist/client/components/preview/preview-pane.mjs +22 -22
  69. package/dist/client/components/primitives/asset-preview.mjs +290 -666
  70. package/dist/client/components/primitives/checkbox-input.mjs +9 -35
  71. package/dist/client/components/primitives/date-input.mjs +109 -327
  72. package/dist/client/components/primitives/dropzone.mjs +209 -336
  73. package/dist/client/components/primitives/field-select-control.mjs +12 -80
  74. package/dist/client/components/primitives/number-input.mjs +4 -4
  75. package/dist/client/components/primitives/select-multi.mjs +200 -559
  76. package/dist/client/components/primitives/select-single.mjs +165 -499
  77. package/dist/client/components/primitives/time-input.mjs +43 -117
  78. package/dist/client/components/primitives/toggle-input.mjs +9 -29
  79. package/dist/client/components/sheets/resource-sheet.mjs +61 -70
  80. package/dist/client/components/ui/accordion.mjs +35 -155
  81. package/dist/client/components/ui/alert.mjs +13 -68
  82. package/dist/client/components/ui/badge.mjs +9 -51
  83. package/dist/client/components/ui/button.mjs +8 -54
  84. package/dist/client/components/ui/card.mjs +37 -193
  85. package/dist/client/components/ui/checkbox.mjs +12 -68
  86. package/dist/client/components/ui/command.mjs +48 -219
  87. package/dist/client/components/ui/dialog.mjs +50 -262
  88. package/dist/client/components/ui/drawer.mjs +55 -259
  89. package/dist/client/components/ui/dropdown-menu.mjs +86 -427
  90. package/dist/client/components/ui/empty-state.mjs +28 -98
  91. package/dist/client/components/ui/field.mjs +73 -309
  92. package/dist/client/components/ui/input-group.mjs +42 -167
  93. package/dist/client/components/ui/input.mjs +7 -37
  94. package/dist/client/components/ui/kbd.mjs +6 -36
  95. package/dist/client/components/ui/label.mjs +7 -37
  96. package/dist/client/components/ui/popover.mjs +34 -169
  97. package/dist/client/components/ui/responsive-dialog.mjs +67 -273
  98. package/dist/client/components/ui/scroll-fade.mjs +63 -158
  99. package/dist/client/components/ui/search-input.mjs +33 -100
  100. package/dist/client/components/ui/select.mjs +72 -393
  101. package/dist/client/components/ui/separator.mjs +7 -38
  102. package/dist/client/components/ui/sheet.mjs +49 -269
  103. package/dist/client/components/ui/sidebar.mjs +171 -690
  104. package/dist/client/components/ui/skeleton.mjs +7 -38
  105. package/dist/client/components/ui/sonner.mjs +11 -42
  106. package/dist/client/components/ui/switch.mjs +9 -45
  107. package/dist/client/components/ui/table.mjs +48 -266
  108. package/dist/client/components/ui/tabs.mjs +26 -139
  109. package/dist/client/components/ui/textarea.mjs +6 -32
  110. package/dist/client/components/ui/tooltip.mjs +27 -129
  111. package/dist/client/components/widgets/chart-widget.mjs +174 -522
  112. package/dist/client/components/widgets/progress-widget.mjs +66 -172
  113. package/dist/client/components/widgets/quick-actions-widget.mjs +102 -261
  114. package/dist/client/components/widgets/recent-items-widget.mjs +69 -195
  115. package/dist/client/components/widgets/stats-widget.mjs +41 -175
  116. package/dist/client/components/widgets/table-widget.mjs +9 -9
  117. package/dist/client/components/widgets/timeline-widget.mjs +86 -226
  118. package/dist/client/components/widgets/value-widget.mjs +74 -381
  119. package/dist/client/components/widgets/widget-empty-state.mjs +26 -76
  120. package/dist/client/components/widgets/widget-skeletons.mjs +138 -421
  121. package/dist/client/contexts/focus-context.mjs +63 -146
  122. package/dist/client/hooks/typed-hooks.mjs +241 -701
  123. package/dist/client/hooks/use-action.mjs +62 -198
  124. package/dist/client/hooks/use-admin-config.mjs +5 -35
  125. package/dist/client/hooks/use-admin-preferences.mjs +16 -88
  126. package/dist/client/hooks/use-admin-routes.mjs +22 -56
  127. package/dist/client/hooks/use-audit-history.mjs +21 -69
  128. package/dist/client/hooks/use-brand.mjs +1 -9
  129. package/dist/client/hooks/use-collection-fields.mjs +17 -57
  130. package/dist/client/hooks/use-collection-meta.mjs +12 -44
  131. package/dist/client/hooks/use-collection-schema.mjs +10 -33
  132. package/dist/client/hooks/use-collection-validation.mjs +23 -53
  133. package/dist/client/hooks/use-collection.mjs +194 -614
  134. package/dist/client/hooks/use-current-user.mjs +0 -1
  135. package/dist/client/hooks/use-field-hooks.mjs +10 -10
  136. package/dist/client/hooks/use-field-options.mjs +61 -202
  137. package/dist/client/hooks/use-global-fields.mjs +14 -46
  138. package/dist/client/hooks/use-global-meta.mjs +9 -30
  139. package/dist/client/hooks/use-global-schema.mjs +9 -30
  140. package/dist/client/hooks/use-global.mjs +63 -219
  141. package/dist/client/hooks/use-locks.mjs +117 -325
  142. package/dist/client/hooks/use-media-query.mjs +16 -36
  143. package/dist/client/hooks/use-prefill-params.mjs +0 -1
  144. package/dist/client/hooks/use-questpie-query-options.mjs +12 -29
  145. package/dist/client/hooks/use-reactive-fields.mjs +1 -1
  146. package/dist/client/hooks/use-reactive-prop.mjs +65 -223
  147. package/dist/client/hooks/use-realtime-highlight.mjs +51 -114
  148. package/dist/client/hooks/use-saved-views.mjs +22 -103
  149. package/dist/client/hooks/use-search-param-toggle.mjs +28 -79
  150. package/dist/client/hooks/use-search.mjs +31 -143
  151. package/dist/client/hooks/use-server-actions.mjs +18 -50
  152. package/dist/client/hooks/use-server-validation.mjs +72 -166
  153. package/dist/client/hooks/use-server-widget-data.mjs +7 -33
  154. package/dist/client/hooks/use-setup-status.mjs +12 -25
  155. package/dist/client/hooks/use-sidebar-search-param.mjs +33 -78
  156. package/dist/client/hooks/use-transition-stage.mjs +8 -38
  157. package/dist/client/hooks/use-upload.mjs +54 -152
  158. package/dist/client/hooks/use-validation-error-map.mjs +6 -26
  159. package/dist/client/hooks/use-view-state.mjs +187 -437
  160. package/dist/client/i18n/hooks.mjs +65 -197
  161. package/dist/client/lib/render-profiler.mjs +14 -41
  162. package/dist/client/preview/block-scope-context.d.mts +2 -2
  163. package/dist/client/preview/block-scope-context.mjs +14 -36
  164. package/dist/client/preview/preview-banner.d.mts +2 -2
  165. package/dist/client/preview/preview-banner.mjs +42 -108
  166. package/dist/client/preview/preview-field.d.mts +4 -4
  167. package/dist/client/preview/preview-field.mjs +167 -348
  168. package/dist/client/preview/use-collection-preview.mjs +121 -215
  169. package/dist/client/runtime/content-locales-provider.mjs +31 -83
  170. package/dist/client/runtime/locale-scope.mjs +22 -63
  171. package/dist/client/runtime/provider.mjs +100 -255
  172. package/dist/client/runtime/translations-provider.mjs +41 -107
  173. package/dist/client/scope/picker.d.mts +2 -2
  174. package/dist/client/scope/picker.mjs +86 -321
  175. package/dist/client/scope/provider.d.mts +2 -2
  176. package/dist/client/scope/provider.mjs +8 -17
  177. package/dist/client/views/auth/accept-invite-form.d.mts +2 -2
  178. package/dist/client/views/auth/accept-invite-form.mjs +121 -412
  179. package/dist/client/views/auth/auth-layout.d.mts +3 -3
  180. package/dist/client/views/auth/auth-layout.mjs +104 -284
  181. package/dist/client/views/auth/forgot-password-form.mjs +94 -325
  182. package/dist/client/views/auth/invite-form.mjs +107 -442
  183. package/dist/client/views/auth/login-form.d.mts +2 -2
  184. package/dist/client/views/auth/login-form.mjs +116 -337
  185. package/dist/client/views/auth/reset-password-form.d.mts +2 -2
  186. package/dist/client/views/auth/reset-password-form.mjs +128 -453
  187. package/dist/client/views/auth/setup-form.d.mts +2 -2
  188. package/dist/client/views/auth/setup-form.mjs +140 -478
  189. package/dist/client/views/collection/auto-form-fields.mjs +243 -615
  190. package/dist/client/views/collection/bulk-action-toolbar.mjs +212 -379
  191. package/dist/client/views/collection/cells/complex-cells.mjs +183 -611
  192. package/dist/client/views/collection/cells/primitive-cells.mjs +109 -363
  193. package/dist/client/views/collection/cells/relation-cells.mjs +86 -233
  194. package/dist/client/views/collection/cells/shared/asset-thumbnail.mjs +142 -371
  195. package/dist/client/views/collection/cells/shared/relation-chip.mjs +35 -131
  196. package/dist/client/views/collection/cells/upload-cells.mjs +60 -177
  197. package/dist/client/views/collection/columns/build-columns.mjs +8 -48
  198. package/dist/client/views/collection/field-renderer.mjs +58 -182
  199. package/dist/client/views/collection/form-view.mjs +284 -518
  200. package/dist/client/views/collection/table-view.mjs +231 -463
  201. package/dist/client/views/collection/view-skeletons.mjs +112 -237
  202. package/dist/client/views/common/global-search.mjs +241 -560
  203. package/dist/client/views/dashboard/dashboard-grid.mjs +256 -775
  204. package/dist/client/views/dashboard/dashboard-widget.mjs +38 -126
  205. package/dist/client/views/dashboard/widget-card.mjs +61 -269
  206. package/dist/client/views/globals/global-form-view.mjs +477 -1301
  207. package/dist/client/views/layout/admin-layout-provider.mjs +28 -88
  208. package/dist/client/views/layout/admin-layout.mjs +83 -246
  209. package/dist/client/views/layout/admin-router.mjs +458 -1274
  210. package/dist/client/views/layout/admin-sidebar.mjs +510 -1292
  211. package/dist/client/views/layout/admin-theme.mjs +30 -64
  212. package/dist/client/views/layout/admin-view-layout.mjs +40 -144
  213. package/dist/client/views/pages/accept-invite-page.d.mts +2 -2
  214. package/dist/client/views/pages/accept-invite-page.mjs +95 -290
  215. package/dist/client/views/pages/dashboard-page.d.mts +2 -2
  216. package/dist/client/views/pages/dashboard-page.mjs +11 -57
  217. package/dist/client/views/pages/forgot-password-page.d.mts +2 -2
  218. package/dist/client/views/pages/forgot-password-page.mjs +31 -83
  219. package/dist/client/views/pages/invite-page.d.mts +2 -2
  220. package/dist/client/views/pages/invite-page.mjs +35 -90
  221. package/dist/client/views/pages/login-page.mjs +41 -121
  222. package/dist/client/views/pages/reset-password-page.mjs +46 -173
  223. package/dist/client/views/pages/setup-page.mjs +33 -95
  224. package/dist/components/rich-text/rich-text-renderer.d.mts +2 -2
  225. package/dist/components/rich-text/rich-text-renderer.mjs +9 -33
  226. package/dist/server/modules/admin/collections/account.d.mts +46 -46
  227. package/dist/server/modules/admin/collections/admin-locks.d.mts +50 -50
  228. package/dist/server/modules/admin/collections/admin-preferences.d.mts +39 -39
  229. package/dist/server/modules/admin/collections/admin-saved-views.d.mts +47 -47
  230. package/dist/server/modules/admin/collections/apikey.d.mts +68 -68
  231. package/dist/server/modules/admin/collections/assets.d.mts +39 -39
  232. package/dist/server/modules/admin/collections/session.d.mts +41 -41
  233. package/dist/server/modules/admin/collections/user.d.mts +63 -63
  234. package/dist/server/modules/admin/collections/verification.d.mts +36 -36
  235. package/dist/server/modules/admin/index.d.mts +20 -19
  236. package/dist/server/modules/admin/routes/admin-config.d.mts +2 -2
  237. package/dist/server/modules/admin/routes/execute-action.d.mts +9 -9
  238. package/dist/server/modules/admin/routes/locales.d.mts +2 -2
  239. package/dist/server/modules/admin/routes/preview.d.mts +11 -11
  240. package/dist/server/modules/admin/routes/reactive.d.mts +9 -9
  241. package/dist/server/modules/admin/routes/setup.d.mts +7 -7
  242. package/dist/server/modules/admin/routes/translations.d.mts +4 -4
  243. package/dist/server/modules/admin/routes/widget-data.d.mts +5 -5
  244. package/dist/server/modules/admin-preferences/collections/saved-views.d.mts +45 -45
  245. package/dist/server/modules/audit/.generated/module.d.mts +6 -6
  246. package/dist/server/modules/audit/collections/audit-log.d.mts +78 -78
  247. package/dist/server/modules/audit/jobs/audit-cleanup.d.mts +2 -2
  248. package/package.json +3 -5
@@ -2,378 +2,160 @@ import { useTranslation } from "../../i18n/hooks.mjs";
2
2
  import { Button } from "../ui/button.mjs";
3
3
  import { Input } from "../ui/input.mjs";
4
4
  import { Skeleton } from "../ui/skeleton.mjs";
5
- import { c } from "react/compiler-runtime";
6
5
  import { Icon } from "@iconify/react";
7
6
  import { useState } from "react";
8
7
  import { jsx, jsxs } from "react/jsx-runtime";
9
8
 
10
9
  //#region src/client/components/filter-builder/saved-views-tab.tsx
11
- function SavedViewsTab(t0) {
12
- const $ = c(90);
13
- const { currentConfig, savedViews, isLoading, onLoadView, onSaveView, onDeleteView } = t0;
10
+ function SavedViewsTab({ currentConfig, savedViews, isLoading, onLoadView, onSaveView, onDeleteView }) {
14
11
  const { t } = useTranslation();
15
12
  const [viewName, setViewName] = useState("");
16
13
  const activeFilters = currentConfig.filters.length;
17
14
  const visibleColumns = currentConfig.visibleColumns.length;
18
15
  const hasSort = !!currentConfig.sortConfig;
19
16
  const hasGrouping = !!currentConfig.groupBy;
20
- let t1;
21
- if ($[0] !== t || $[1] !== visibleColumns) {
22
- t1 = t("viewOptions.columnsCount", { count: visibleColumns });
23
- $[0] = t;
24
- $[1] = visibleColumns;
25
- $[2] = t1;
26
- } else t1 = $[2];
27
- let t2;
28
- if ($[3] !== activeFilters || $[4] !== t) {
29
- t2 = t("viewOptions.filtersCount", { count: activeFilters });
30
- $[3] = activeFilters;
31
- $[4] = t;
32
- $[5] = t2;
33
- } else t2 = $[5];
34
- let t3;
35
- if ($[6] !== hasGrouping || $[7] !== t) {
36
- t3 = hasGrouping ? t("viewOptions.groupBy") : null;
37
- $[6] = hasGrouping;
38
- $[7] = t;
39
- $[8] = t3;
40
- } else t3 = $[8];
41
- let t4;
42
- if ($[9] !== hasSort || $[10] !== t) {
43
- t4 = hasSort ? t("viewOptions.sort") : null;
44
- $[9] = hasSort;
45
- $[10] = t;
46
- $[11] = t4;
47
- } else t4 = $[11];
48
- let t5;
49
- if ($[12] !== t1 || $[13] !== t2 || $[14] !== t3 || $[15] !== t4) {
50
- t5 = [
51
- t1,
52
- t2,
53
- t3,
54
- t4
55
- ].filter(Boolean);
56
- $[12] = t1;
57
- $[13] = t2;
58
- $[14] = t3;
59
- $[15] = t4;
60
- $[16] = t5;
61
- } else t5 = $[16];
62
- const saveSummary = t5.join(" · ");
63
- let t6;
64
- if ($[17] !== currentConfig || $[18] !== onSaveView || $[19] !== viewName) {
65
- t6 = () => {
66
- if (!viewName.trim()) return;
67
- onSaveView(viewName.trim(), currentConfig);
68
- setViewName("");
69
- };
70
- $[17] = currentConfig;
71
- $[18] = onSaveView;
72
- $[19] = viewName;
73
- $[20] = t6;
74
- } else t6 = $[20];
75
- const handleSave = t6;
17
+ const saveSummary = [
18
+ t("viewOptions.columnsCount", { count: visibleColumns }),
19
+ t("viewOptions.filtersCount", { count: activeFilters }),
20
+ hasGrouping ? t("viewOptions.groupBy") : null,
21
+ hasSort ? t("viewOptions.sort") : null
22
+ ].filter(Boolean).join(" · ");
23
+ const handleSave = () => {
24
+ if (!viewName.trim()) return;
25
+ onSaveView(viewName.trim(), currentConfig);
26
+ setViewName("");
27
+ };
76
28
  const hasActiveConfig = activeFilters > 0 || hasSort || hasGrouping || visibleColumns > 0;
77
- let t7;
78
- if ($[21] !== t) {
79
- t7 = t("viewOptions.saveCurrentConfig");
80
- $[21] = t;
81
- $[22] = t7;
82
- } else t7 = $[22];
83
- let t8;
84
- if ($[23] !== t7) {
85
- t8 = /* @__PURE__ */ jsx("p", {
86
- className: "text-sm font-medium",
87
- children: t7
88
- });
89
- $[23] = t7;
90
- $[24] = t8;
91
- } else t8 = $[24];
92
- let t9;
93
- if ($[25] !== saveSummary || $[26] !== t) {
94
- t9 = saveSummary || t("viewOptions.saveDescription");
95
- $[25] = saveSummary;
96
- $[26] = t;
97
- $[27] = t9;
98
- } else t9 = $[27];
99
- let t10;
100
- if ($[28] !== t9) {
101
- t10 = /* @__PURE__ */ jsx("p", {
102
- className: "text-muted-foreground mt-0.5 text-xs text-pretty",
103
- children: t9
104
- });
105
- $[28] = t9;
106
- $[29] = t10;
107
- } else t10 = $[29];
108
- let t11;
109
- if ($[30] !== t10 || $[31] !== t8) {
110
- t11 = /* @__PURE__ */ jsxs("div", { children: [t8, t10] });
111
- $[30] = t10;
112
- $[31] = t8;
113
- $[32] = t11;
114
- } else t11 = $[32];
115
- let t12;
116
- if ($[33] !== t) {
117
- t12 = t("viewOptions.viewNamePlaceholder");
118
- $[33] = t;
119
- $[34] = t12;
120
- } else t12 = $[34];
121
- let t13;
122
- if ($[35] === Symbol.for("react.memo_cache_sentinel")) {
123
- t13 = (e) => setViewName(e.target.value);
124
- $[35] = t13;
125
- } else t13 = $[35];
126
- let t14;
127
- if ($[36] !== handleSave) {
128
- t14 = (e_0) => e_0.key === "Enter" && handleSave();
129
- $[36] = handleSave;
130
- $[37] = t14;
131
- } else t14 = $[37];
132
- let t15;
133
- if ($[38] !== t12 || $[39] !== t14 || $[40] !== viewName) {
134
- t15 = /* @__PURE__ */ jsx(Input, {
135
- className: "h-9 flex-1",
136
- placeholder: t12,
137
- value: viewName,
138
- onChange: t13,
139
- onKeyDown: t14
140
- });
141
- $[38] = t12;
142
- $[39] = t14;
143
- $[40] = viewName;
144
- $[41] = t15;
145
- } else t15 = $[41];
146
- let t16;
147
- if ($[42] !== viewName) {
148
- t16 = viewName.trim();
149
- $[42] = viewName;
150
- $[43] = t16;
151
- } else t16 = $[43];
152
- const t17 = !t16;
153
- let t18;
154
- if ($[44] === Symbol.for("react.memo_cache_sentinel")) {
155
- t18 = /* @__PURE__ */ jsx(Icon, {
156
- icon: "ph:floppy-disk",
157
- width: 16,
158
- height: 16
159
- });
160
- $[44] = t18;
161
- } else t18 = $[44];
162
- let t19;
163
- if ($[45] !== t) {
164
- t19 = t("common.save");
165
- $[45] = t;
166
- $[46] = t19;
167
- } else t19 = $[46];
168
- let t20;
169
- if ($[47] !== handleSave || $[48] !== t17 || $[49] !== t19) {
170
- t20 = /* @__PURE__ */ jsxs(Button, {
171
- onClick: handleSave,
172
- disabled: t17,
173
- size: "sm",
174
- className: "h-9 gap-2 px-3",
175
- children: [t18, t19]
176
- });
177
- $[47] = handleSave;
178
- $[48] = t17;
179
- $[49] = t19;
180
- $[50] = t20;
181
- } else t20 = $[50];
182
- let t21;
183
- if ($[51] !== t15 || $[52] !== t20) {
184
- t21 = /* @__PURE__ */ jsxs("div", {
185
- className: "flex gap-2",
186
- children: [t15, t20]
187
- });
188
- $[51] = t15;
189
- $[52] = t20;
190
- $[53] = t21;
191
- } else t21 = $[53];
192
- let t22;
193
- if ($[54] !== hasActiveConfig || $[55] !== t) {
194
- t22 = !hasActiveConfig && /* @__PURE__ */ jsx("p", {
195
- className: "text-warning text-xs",
196
- children: t("viewOptions.noChangesToSave")
197
- });
198
- $[54] = hasActiveConfig;
199
- $[55] = t;
200
- $[56] = t22;
201
- } else t22 = $[56];
202
- let t23;
203
- if ($[57] !== t11 || $[58] !== t21 || $[59] !== t22) {
204
- t23 = /* @__PURE__ */ jsxs("div", {
29
+ return /* @__PURE__ */ jsxs("div", {
30
+ className: "space-y-4 py-4",
31
+ children: [/* @__PURE__ */ jsxs("div", {
205
32
  className: "space-y-2",
206
33
  children: [
207
- t11,
208
- t21,
209
- t22
34
+ /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("p", {
35
+ className: "text-sm font-medium",
36
+ children: t("viewOptions.saveCurrentConfig")
37
+ }), /* @__PURE__ */ jsx("p", {
38
+ className: "text-muted-foreground mt-0.5 text-xs text-pretty",
39
+ children: saveSummary || t("viewOptions.saveDescription")
40
+ })] }),
41
+ /* @__PURE__ */ jsxs("div", {
42
+ className: "flex gap-2",
43
+ children: [/* @__PURE__ */ jsx(Input, {
44
+ className: "h-9 flex-1",
45
+ placeholder: t("viewOptions.viewNamePlaceholder"),
46
+ value: viewName,
47
+ onChange: (e) => setViewName(e.target.value),
48
+ onKeyDown: (e) => e.key === "Enter" && handleSave()
49
+ }), /* @__PURE__ */ jsxs(Button, {
50
+ onClick: handleSave,
51
+ disabled: !viewName.trim(),
52
+ size: "sm",
53
+ className: "h-9 gap-2 px-3",
54
+ children: [/* @__PURE__ */ jsx(Icon, {
55
+ icon: "ph:floppy-disk",
56
+ width: 16,
57
+ height: 16
58
+ }), t("common.save")]
59
+ })]
60
+ }),
61
+ !hasActiveConfig && /* @__PURE__ */ jsx("p", {
62
+ className: "text-warning text-xs",
63
+ children: t("viewOptions.noChangesToSave")
64
+ })
210
65
  ]
211
- });
212
- $[57] = t11;
213
- $[58] = t21;
214
- $[59] = t22;
215
- $[60] = t23;
216
- } else t23 = $[60];
217
- let t24;
218
- if ($[61] !== t) {
219
- t24 = t("viewOptions.savedViews");
220
- $[61] = t;
221
- $[62] = t24;
222
- } else t24 = $[62];
223
- let t25;
224
- if ($[63] !== t24) {
225
- t25 = /* @__PURE__ */ jsx("p", {
226
- className: "text-muted-foreground font-chrome chrome-meta text-xs font-medium",
227
- children: t24
228
- });
229
- $[63] = t24;
230
- $[64] = t25;
231
- } else t25 = $[64];
232
- let t26;
233
- if ($[65] !== savedViews.length) {
234
- t26 = savedViews.length > 0 && /* @__PURE__ */ jsx("span", {
235
- className: "text-muted-foreground text-xs tabular-nums",
236
- children: savedViews.length
237
- });
238
- $[65] = savedViews.length;
239
- $[66] = t26;
240
- } else t26 = $[66];
241
- let t27;
242
- if ($[67] !== t25 || $[68] !== t26) {
243
- t27 = /* @__PURE__ */ jsxs("div", {
244
- className: "flex items-center justify-between",
245
- children: [t25, t26]
246
- });
247
- $[67] = t25;
248
- $[68] = t26;
249
- $[69] = t27;
250
- } else t27 = $[69];
251
- let t28;
252
- if ($[70] !== isLoading) {
253
- t28 = isLoading && /* @__PURE__ */ jsxs("div", {
254
- className: "space-y-2 py-2",
255
- "aria-busy": "true",
66
+ }), /* @__PURE__ */ jsxs("div", {
67
+ className: "space-y-2",
256
68
  children: [
257
- /* @__PURE__ */ jsx(Skeleton, { className: "h-9 w-full" }),
258
- /* @__PURE__ */ jsx(Skeleton, { className: "h-9 w-full" }),
259
- /* @__PURE__ */ jsx(Skeleton, { className: "h-9 w-full" })
260
- ]
261
- });
262
- $[70] = isLoading;
263
- $[71] = t28;
264
- } else t28 = $[71];
265
- let t29;
266
- if ($[72] !== isLoading || $[73] !== savedViews.length || $[74] !== t) {
267
- t29 = !isLoading && savedViews.length === 0 && /* @__PURE__ */ jsx("p", {
268
- className: "text-muted-foreground py-2 text-xs",
269
- children: t("viewOptions.noSavedViews")
270
- });
271
- $[72] = isLoading;
272
- $[73] = savedViews.length;
273
- $[74] = t;
274
- $[75] = t29;
275
- } else t29 = $[75];
276
- let t30;
277
- if ($[76] !== isLoading || $[77] !== onDeleteView || $[78] !== onLoadView || $[79] !== savedViews || $[80] !== t) {
278
- t30 = !isLoading && savedViews.map((view) => /* @__PURE__ */ jsxs("div", {
279
- role: "button",
280
- tabIndex: 0,
281
- className: "border-border-subtle bg-surface-low hover:border-border-strong hover:bg-surface-high group flex w-full cursor-pointer items-center justify-between gap-3 rounded-xl border p-3 text-left transition-[background-color,border-color]",
282
- onClick: () => onLoadView(view),
283
- onKeyDown: (e_1) => {
284
- if (e_1.key === "Enter" || e_1.key === " ") {
285
- e_1.preventDefault();
286
- onLoadView(view);
287
- }
288
- },
289
- children: [/* @__PURE__ */ jsxs("div", {
290
- className: "min-w-0 flex-1",
291
- children: [/* @__PURE__ */ jsxs("div", {
292
- className: "flex items-center gap-2",
293
- children: [/* @__PURE__ */ jsx(Icon, {
294
- icon: "ph:bookmark-simple",
295
- className: "text-muted-foreground size-4 shrink-0"
296
- }), /* @__PURE__ */ jsx("p", {
297
- className: "truncate text-sm font-medium transition-colors",
298
- children: view.name
69
+ /* @__PURE__ */ jsxs("div", {
70
+ className: "flex items-center justify-between",
71
+ children: [/* @__PURE__ */ jsx("p", {
72
+ className: "text-muted-foreground font-chrome chrome-meta text-xs font-medium",
73
+ children: t("viewOptions.savedViews")
74
+ }), savedViews.length > 0 && /* @__PURE__ */ jsx("span", {
75
+ className: "text-muted-foreground text-xs tabular-nums",
76
+ children: savedViews.length
299
77
  })]
300
- }), /* @__PURE__ */ jsxs("p", {
301
- className: "text-muted-foreground mt-1 flex flex-wrap gap-x-2 gap-y-1 pl-6 text-xs",
78
+ }),
79
+ isLoading && /* @__PURE__ */ jsxs("div", {
80
+ className: "space-y-2 py-2",
81
+ "aria-busy": "true",
302
82
  children: [
303
- /* @__PURE__ */ jsx("span", {
304
- className: "tabular-nums",
305
- children: t("viewOptions.filtersCount", { count: view.configuration.filters.length })
306
- }),
307
- /* @__PURE__ */ jsx("span", {
308
- className: "tabular-nums",
309
- children: t("viewOptions.columnsCount", { count: view.configuration.visibleColumns.length })
310
- }),
311
- view.configuration.groupBy && /* @__PURE__ */ jsx("span", { children: t("viewOptions.groupBy") }),
312
- view.configuration.sortConfig && /* @__PURE__ */ jsx("span", { children: t("viewOptions.sort") }),
313
- view.isDefault && /* @__PURE__ */ jsx("span", {
314
- className: "text-foreground",
315
- children: t("viewOptions.defaultView")
316
- })
83
+ /* @__PURE__ */ jsx(Skeleton, { className: "h-9 w-full" }),
84
+ /* @__PURE__ */ jsx(Skeleton, { className: "h-9 w-full" }),
85
+ /* @__PURE__ */ jsx(Skeleton, { className: "h-9 w-full" })
317
86
  ]
318
- })]
319
- }), /* @__PURE__ */ jsxs("div", {
320
- className: "flex items-center gap-1",
321
- children: [/* @__PURE__ */ jsx(Button, {
322
- variant: "ghost",
323
- size: "icon-sm",
324
- onClick: (e_2) => {
325
- e_2.stopPropagation();
326
- onDeleteView(view.id);
87
+ }),
88
+ !isLoading && savedViews.length === 0 && /* @__PURE__ */ jsx("p", {
89
+ className: "text-muted-foreground py-2 text-xs",
90
+ children: t("viewOptions.noSavedViews")
91
+ }),
92
+ !isLoading && savedViews.map((view) => /* @__PURE__ */ jsxs("div", {
93
+ role: "button",
94
+ tabIndex: 0,
95
+ className: "border-border-subtle bg-surface-low hover:border-border-strong hover:bg-surface-high group flex w-full cursor-pointer items-center justify-between gap-3 rounded-xl border p-3 text-left transition-[background-color,border-color]",
96
+ onClick: () => onLoadView(view),
97
+ onKeyDown: (e) => {
98
+ if (e.key === "Enter" || e.key === " ") {
99
+ e.preventDefault();
100
+ onLoadView(view);
101
+ }
327
102
  },
328
- className: "text-muted-foreground hover:text-destructive opacity-0 group-hover:opacity-100",
329
- children: /* @__PURE__ */ jsx(Icon, {
330
- icon: "ph:trash",
331
- width: 14,
332
- height: 14
333
- })
334
- }), /* @__PURE__ */ jsx(Icon, {
335
- icon: "ph:arrow-right",
336
- width: 14,
337
- height: 14,
338
- className: "text-muted-foreground opacity-0 transition-opacity group-hover:opacity-100"
339
- })]
340
- })]
341
- }, view.id));
342
- $[76] = isLoading;
343
- $[77] = onDeleteView;
344
- $[78] = onLoadView;
345
- $[79] = savedViews;
346
- $[80] = t;
347
- $[81] = t30;
348
- } else t30 = $[81];
349
- let t31;
350
- if ($[82] !== t27 || $[83] !== t28 || $[84] !== t29 || $[85] !== t30) {
351
- t31 = /* @__PURE__ */ jsxs("div", {
352
- className: "space-y-2",
353
- children: [
354
- t27,
355
- t28,
356
- t29,
357
- t30
103
+ children: [/* @__PURE__ */ jsxs("div", {
104
+ className: "min-w-0 flex-1",
105
+ children: [/* @__PURE__ */ jsxs("div", {
106
+ className: "flex items-center gap-2",
107
+ children: [/* @__PURE__ */ jsx(Icon, {
108
+ icon: "ph:bookmark-simple",
109
+ className: "text-muted-foreground size-4 shrink-0"
110
+ }), /* @__PURE__ */ jsx("p", {
111
+ className: "truncate text-sm font-medium transition-colors",
112
+ children: view.name
113
+ })]
114
+ }), /* @__PURE__ */ jsxs("p", {
115
+ className: "text-muted-foreground mt-1 flex flex-wrap gap-x-2 gap-y-1 pl-6 text-xs",
116
+ children: [
117
+ /* @__PURE__ */ jsx("span", {
118
+ className: "tabular-nums",
119
+ children: t("viewOptions.filtersCount", { count: view.configuration.filters.length })
120
+ }),
121
+ /* @__PURE__ */ jsx("span", {
122
+ className: "tabular-nums",
123
+ children: t("viewOptions.columnsCount", { count: view.configuration.visibleColumns.length })
124
+ }),
125
+ view.configuration.groupBy && /* @__PURE__ */ jsx("span", { children: t("viewOptions.groupBy") }),
126
+ view.configuration.sortConfig && /* @__PURE__ */ jsx("span", { children: t("viewOptions.sort") }),
127
+ view.isDefault && /* @__PURE__ */ jsx("span", {
128
+ className: "text-foreground",
129
+ children: t("viewOptions.defaultView")
130
+ })
131
+ ]
132
+ })]
133
+ }), /* @__PURE__ */ jsxs("div", {
134
+ className: "flex items-center gap-1",
135
+ children: [/* @__PURE__ */ jsx(Button, {
136
+ variant: "ghost",
137
+ size: "icon-sm",
138
+ onClick: (e) => {
139
+ e.stopPropagation();
140
+ onDeleteView(view.id);
141
+ },
142
+ className: "text-muted-foreground hover:text-destructive opacity-0 group-hover:opacity-100",
143
+ children: /* @__PURE__ */ jsx(Icon, {
144
+ icon: "ph:trash",
145
+ width: 14,
146
+ height: 14
147
+ })
148
+ }), /* @__PURE__ */ jsx(Icon, {
149
+ icon: "ph:arrow-right",
150
+ width: 14,
151
+ height: 14,
152
+ className: "text-muted-foreground opacity-0 transition-opacity group-hover:opacity-100"
153
+ })]
154
+ })]
155
+ }, view.id))
358
156
  ]
359
- });
360
- $[82] = t27;
361
- $[83] = t28;
362
- $[84] = t29;
363
- $[85] = t30;
364
- $[86] = t31;
365
- } else t31 = $[86];
366
- let t32;
367
- if ($[87] !== t23 || $[88] !== t31) {
368
- t32 = /* @__PURE__ */ jsxs("div", {
369
- className: "space-y-4 py-4",
370
- children: [t23, t31]
371
- });
372
- $[87] = t23;
373
- $[88] = t31;
374
- $[89] = t32;
375
- } else t32 = $[89];
376
- return t32;
157
+ })]
158
+ });
377
159
  }
378
160
 
379
161
  //#endregion