@questpie/admin 3.0.3 → 3.0.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 (253) hide show
  1. package/README.md +34 -5
  2. package/dist/client/blocks/block-renderer.d.mts +2 -2
  3. package/dist/client/blocks/block-renderer.mjs +4 -1
  4. package/dist/client/builder/types/action-types.d.mts +31 -3
  5. package/dist/client/builder/types/collection-types.d.mts +140 -0
  6. package/dist/client/builder/types/ui-config.d.mts +16 -2
  7. package/dist/client/builder/types/views.d.mts +57 -0
  8. package/dist/client/builder/types/widget-types.d.mts +5 -0
  9. package/dist/client/components/actions/action-button.mjs +137 -199
  10. package/dist/client/components/actions/action-dialog.mjs +198 -156
  11. package/dist/client/components/actions/confirmation-dialog.mjs +2 -2
  12. package/dist/client/components/actions/header-actions.mjs +52 -53
  13. package/dist/client/components/admin-link.d.mts +2 -2
  14. package/dist/client/components/auth/auth-loading.mjs +41 -18
  15. package/dist/client/components/blocks/block-editor-layout.mjs +2 -2
  16. package/dist/client/components/blocks/block-fields-renderer.mjs +64 -28
  17. package/dist/client/components/blocks/block-insert-button.mjs +4 -4
  18. package/dist/client/components/blocks/block-item.mjs +2 -2
  19. package/dist/client/components/blocks/block-library-sidebar.mjs +91 -63
  20. package/dist/client/components/component-renderer.mjs +1 -1
  21. package/dist/client/components/fields/array-field.mjs +14 -14
  22. package/dist/client/components/fields/asset-preview-field.mjs +1 -1
  23. package/dist/client/components/fields/blocks-field/blocks-field.mjs +84 -104
  24. package/dist/client/components/fields/json-field.mjs +2 -2
  25. package/dist/client/components/fields/object-array-field.mjs +22 -22
  26. package/dist/client/components/fields/object-field.mjs +5 -5
  27. package/dist/client/components/fields/relation/displays/cards-display.mjs +16 -9
  28. package/dist/client/components/fields/relation/displays/chips-display.mjs +15 -12
  29. package/dist/client/components/fields/relation/displays/grid-display.mjs +15 -11
  30. package/dist/client/components/fields/relation/displays/list-display.mjs +33 -20
  31. package/dist/client/components/fields/relation/displays/table-display.mjs +62 -93
  32. package/dist/client/components/fields/relation/relation-items-display.mjs +1 -1
  33. package/dist/client/components/fields/relation-picker.mjs +7 -6
  34. package/dist/client/components/fields/relation-select.mjs +71 -47
  35. package/dist/client/components/fields/rich-text-editor/bubble-menu.mjs +392 -82
  36. package/dist/client/components/fields/rich-text-editor/extensions.mjs +54 -23
  37. package/dist/client/components/fields/rich-text-editor/image-popover.mjs +24 -50
  38. package/dist/client/components/fields/rich-text-editor/image-upload.mjs +66 -0
  39. package/dist/client/components/fields/rich-text-editor/index.d.mts +38 -0
  40. package/dist/client/components/fields/rich-text-editor/index.mjs +637 -376
  41. package/dist/client/components/fields/rich-text-editor/link-utils.mjs +26 -0
  42. package/dist/client/components/fields/rich-text-editor/presets.d.mts +10 -0
  43. package/dist/client/components/fields/rich-text-editor/slash-commands.mjs +27 -6
  44. package/dist/client/components/fields/rich-text-editor/toolbar.mjs +464 -346
  45. package/dist/client/components/fields/rich-text-editor/types.d.mts +77 -0
  46. package/dist/client/components/fields/upload-field.mjs +45 -49
  47. package/dist/client/components/filter-builder/columns-tab.mjs +69 -62
  48. package/dist/client/components/filter-builder/filter-builder-sheet.mjs +473 -308
  49. package/dist/client/components/filter-builder/filters-tab.mjs +109 -82
  50. package/dist/client/components/filter-builder/saved-views-tab.mjs +300 -198
  51. package/dist/client/components/history-sidebar.mjs +850 -340
  52. package/dist/client/components/layout/field-layout-renderer.mjs +6 -5
  53. package/dist/client/components/locale-switcher.mjs +8 -8
  54. package/dist/client/components/media/media-grid.mjs +106 -86
  55. package/dist/client/components/media/media-picker-dialog.mjs +242 -230
  56. package/dist/client/components/preview/live-preview-mode.mjs +1 -1
  57. package/dist/client/components/primitives/asset-preview.mjs +37 -22
  58. package/dist/client/components/primitives/date-input.mjs +212 -249
  59. package/dist/client/components/primitives/dropzone.mjs +192 -159
  60. package/dist/client/components/primitives/field-select-control.mjs +93 -0
  61. package/dist/client/components/primitives/select-multi.mjs +406 -365
  62. package/dist/client/components/primitives/select-single.mjs +391 -323
  63. package/dist/client/components/primitives/time-input.mjs +2 -2
  64. package/dist/client/components/sheets/resource-sheet.mjs +2 -0
  65. package/dist/client/components/ui/accordion.mjs +4 -4
  66. package/dist/client/components/ui/alert.mjs +3 -3
  67. package/dist/client/components/ui/badge.mjs +4 -4
  68. package/dist/client/components/ui/button.mjs +47 -37
  69. package/dist/client/components/ui/card.mjs +2 -2
  70. package/dist/client/components/ui/checkbox.mjs +1 -1
  71. package/dist/client/components/ui/command.mjs +5 -5
  72. package/dist/client/components/ui/dialog.mjs +3 -3
  73. package/dist/client/components/ui/drawer.mjs +1 -1
  74. package/dist/client/components/ui/dropdown-menu.mjs +157 -15
  75. package/dist/client/components/ui/empty-state.mjs +88 -59
  76. package/dist/client/components/ui/field.mjs +2 -2
  77. package/dist/client/components/ui/input-group.mjs +3 -3
  78. package/dist/client/components/ui/input.mjs +1 -1
  79. package/dist/client/components/ui/kbd.mjs +1 -1
  80. package/dist/client/components/ui/label.mjs +1 -1
  81. package/dist/client/components/ui/popover.mjs +19 -11
  82. package/dist/client/components/ui/scroll-fade.mjs +170 -0
  83. package/dist/client/components/ui/search-input.mjs +1 -1
  84. package/dist/client/components/ui/select.mjs +129 -27
  85. package/dist/client/components/ui/sheet.mjs +54 -34
  86. package/dist/client/components/ui/sidebar.mjs +15 -14
  87. package/dist/client/components/ui/skeleton.mjs +28 -12
  88. package/dist/client/components/ui/switch.mjs +2 -2
  89. package/dist/client/components/ui/table.mjs +82 -74
  90. package/dist/client/components/ui/tabs.mjs +26 -31
  91. package/dist/client/components/ui/textarea.mjs +1 -1
  92. package/dist/client/components/ui/tooltip.mjs +1 -1
  93. package/dist/client/components/widgets/chart-widget.mjs +154 -100
  94. package/dist/client/components/widgets/progress-widget.mjs +63 -36
  95. package/dist/client/components/widgets/quick-actions-widget.mjs +207 -115
  96. package/dist/client/components/widgets/recent-items-widget.mjs +147 -103
  97. package/dist/client/components/widgets/stats-widget.mjs +91 -72
  98. package/dist/client/components/widgets/table-widget.mjs +161 -247
  99. package/dist/client/components/widgets/timeline-widget.mjs +119 -78
  100. package/dist/client/components/widgets/value-widget.mjs +286 -157
  101. package/dist/client/components/widgets/widget-empty-state.mjs +88 -0
  102. package/dist/client/components/widgets/widget-skeletons.mjs +53 -20
  103. package/dist/client/contexts/focus-context.d.mts +2 -2
  104. package/dist/client/hooks/use-action.mjs +63 -55
  105. package/dist/client/hooks/use-audit-history.mjs +1 -65
  106. package/dist/client/hooks/use-collection-validation.mjs +36 -23
  107. package/dist/client/hooks/use-collection.mjs +96 -1
  108. package/dist/client/hooks/use-saved-views.mjs +70 -49
  109. package/dist/client/hooks/use-server-actions.mjs +70 -46
  110. package/dist/client/hooks/use-server-validation.mjs +156 -41
  111. package/dist/client/hooks/use-server-widget-data.mjs +1 -1
  112. package/dist/client/hooks/use-setup-status.d.mts +3 -3
  113. package/dist/client/hooks/use-setup-status.mjs +2 -2
  114. package/dist/client/hooks/use-transition-stage.mjs +2 -10
  115. package/dist/client/hooks/use-validation-error-map.mjs +31 -13
  116. package/dist/client/hooks/use-view-state.mjs +238 -174
  117. package/dist/client/i18n/date-locale.mjs +33 -0
  118. package/dist/client/i18n/hooks.mjs +17 -1
  119. package/dist/client/lib/utils.mjs +3 -2
  120. package/dist/client/preview/block-scope-context.d.mts +2 -2
  121. package/dist/client/preview/preview-banner.d.mts +2 -2
  122. package/dist/client/preview/preview-banner.mjs +75 -46
  123. package/dist/client/preview/preview-field.d.mts +4 -4
  124. package/dist/client/preview/preview-field.mjs +2 -2
  125. package/dist/client/runtime/provider.mjs +8 -1
  126. package/dist/client/runtime/translations-provider.mjs +1 -1
  127. package/dist/client/scope/picker.d.mts +2 -2
  128. package/dist/client/scope/provider.d.mts +2 -2
  129. package/dist/client/styles/base.css +1022 -0
  130. package/dist/client/styles/index.css +3 -589
  131. package/dist/client/utils/auto-expand-fields.mjs +4 -2
  132. package/dist/client/utils/keyboard-shortcuts.mjs +26 -0
  133. package/dist/client/utils/use-lazy-component.mjs +80 -0
  134. package/dist/client/views/auth/accept-invite-form.d.mts +2 -2
  135. package/dist/client/views/auth/auth-layout.d.mts +17 -10
  136. package/dist/client/views/auth/auth-layout.mjs +291 -80
  137. package/dist/client/views/auth/forgot-password-form.d.mts +2 -2
  138. package/dist/client/views/auth/forgot-password-form.mjs +2 -2
  139. package/dist/client/views/auth/login-form.d.mts +2 -2
  140. package/dist/client/views/auth/login-form.mjs +1 -1
  141. package/dist/client/views/auth/reset-password-form.d.mts +2 -2
  142. package/dist/client/views/auth/reset-password-form.mjs +2 -2
  143. package/dist/client/views/auth/setup-form.d.mts +2 -2
  144. package/dist/client/views/collection/auto-form-fields.mjs +11 -9
  145. package/dist/client/views/collection/bulk-action-toolbar.mjs +173 -138
  146. package/dist/client/views/collection/cells/complex-cells.mjs +22 -22
  147. package/dist/client/views/collection/cells/primitive-cells.mjs +1 -1
  148. package/dist/client/views/collection/cells/relation-cells.mjs +147 -129
  149. package/dist/client/views/collection/cells/shared/asset-thumbnail.mjs +224 -278
  150. package/dist/client/views/collection/cells/shared/relation-chip.mjs +64 -36
  151. package/dist/client/views/collection/cells/upload-cells.mjs +199 -9
  152. package/dist/client/views/collection/columns/build-columns.mjs +29 -9
  153. package/dist/client/views/collection/columns/column-defaults.mjs +2 -2
  154. package/dist/client/views/collection/field-renderer.mjs +50 -89
  155. package/dist/client/views/collection/form-view.mjs +237 -227
  156. package/dist/client/views/collection/table-view.mjs +1167 -234
  157. package/dist/client/views/collection/view-skeletons.mjs +222 -79
  158. package/dist/client/views/common/global-search.mjs +29 -18
  159. package/dist/client/views/dashboard/dashboard-grid.mjs +678 -501
  160. package/dist/client/views/dashboard/dashboard-widget.mjs +6 -3
  161. package/dist/client/views/dashboard/widget-card.mjs +23 -14
  162. package/dist/client/views/globals/global-form-view.mjs +634 -589
  163. package/dist/client/views/layout/admin-layout-provider.mjs +67 -70
  164. package/dist/client/views/layout/admin-layout.d.mts +3 -6
  165. package/dist/client/views/layout/admin-layout.mjs +152 -155
  166. package/dist/client/views/layout/admin-router.mjs +936 -616
  167. package/dist/client/views/layout/admin-sidebar.d.mts +38 -1
  168. package/dist/client/views/layout/admin-sidebar.mjs +762 -592
  169. package/dist/client/views/layout/admin-theme.d.mts +10 -0
  170. package/dist/client/views/layout/admin-theme.mjs +84 -0
  171. package/dist/client/views/layout/admin-view-layout.mjs +161 -0
  172. package/dist/client/views/pages/accept-invite-page.d.mts +2 -2
  173. package/dist/client/views/pages/accept-invite-page.mjs +49 -26
  174. package/dist/client/views/pages/dashboard-page.d.mts +2 -2
  175. package/dist/client/views/pages/forgot-password-page.d.mts +2 -2
  176. package/dist/client/views/pages/forgot-password-page.mjs +2 -19
  177. package/dist/client/views/pages/invite-page.d.mts +2 -2
  178. package/dist/client/views/pages/invite-page.mjs +2 -19
  179. package/dist/client/views/pages/login-page.d.mts +3 -3
  180. package/dist/client/views/pages/login-page.mjs +4 -21
  181. package/dist/client/views/pages/reset-password-page.d.mts +2 -2
  182. package/dist/client/views/pages/reset-password-page.mjs +3 -20
  183. package/dist/client/views/pages/setup-page.d.mts +2 -2
  184. package/dist/client/views/pages/setup-page.mjs +70 -71
  185. package/dist/client.d.mts +6 -2
  186. package/dist/client.mjs +2 -1
  187. package/dist/components/rich-text/rich-text-renderer.d.mts +2 -2
  188. package/dist/index.d.mts +6 -2
  189. package/dist/index.mjs +2 -1
  190. package/dist/server/augmentation/dashboard.d.mts +67 -3
  191. package/dist/server/augmentation/form-layout.d.mts +21 -0
  192. package/dist/server/augmentation/index.d.mts +1 -1
  193. package/dist/server/codegen/admin-client-template.mjs +4 -0
  194. package/dist/server/fields/blocks.d.mts +1 -1
  195. package/dist/server/fields/blocks.mjs +12 -0
  196. package/dist/server/fields/rich-text.d.mts +1 -1
  197. package/dist/server/fields/rich-text.mjs +8 -0
  198. package/dist/server/i18n/index.mjs +29 -7
  199. package/dist/server/i18n/messages/cs.mjs +414 -1
  200. package/dist/server/i18n/messages/de.mjs +412 -1
  201. package/dist/server/i18n/messages/en.mjs +166 -1
  202. package/dist/server/i18n/messages/es.mjs +412 -1
  203. package/dist/server/i18n/messages/fr.mjs +412 -1
  204. package/dist/server/i18n/messages/pl.mjs +416 -1
  205. package/dist/server/i18n/messages/pt.mjs +409 -1
  206. package/dist/server/i18n/messages/sk.mjs +216 -2
  207. package/dist/server/modules/admin/block/introspection.mjs +4 -1
  208. package/dist/server/modules/admin/block/prefetch.mjs +12 -2
  209. package/dist/server/modules/admin/collections/account.d.mts +2 -2
  210. package/dist/server/modules/admin/collections/admin-locks.d.mts +2 -2
  211. package/dist/server/modules/admin/collections/admin-preferences.d.mts +39 -39
  212. package/dist/server/modules/admin/collections/admin-saved-views.d.mts +47 -47
  213. package/dist/server/modules/admin/collections/apikey.d.mts +42 -42
  214. package/dist/server/modules/admin/collections/assets.d.mts +20 -20
  215. package/dist/server/modules/admin/collections/assets.mjs +0 -1
  216. package/dist/server/modules/admin/collections/session.d.mts +42 -42
  217. package/dist/server/modules/admin/collections/user.d.mts +40 -28
  218. package/dist/server/modules/admin/collections/user.mjs +40 -9
  219. package/dist/server/modules/admin/collections/verification.d.mts +36 -36
  220. package/dist/server/modules/admin/dto/admin-config.dto.mjs +2 -0
  221. package/dist/server/modules/admin/factories.mjs +7 -18
  222. package/dist/server/modules/admin/index.d.mts +1 -1
  223. package/dist/server/modules/admin/routes/admin-config.d.mts +2 -2
  224. package/dist/server/modules/admin/routes/admin-config.mjs +34 -16
  225. package/dist/server/modules/admin/routes/execute-action.d.mts +9 -9
  226. package/dist/server/modules/admin/routes/execute-action.mjs +67 -28
  227. package/dist/server/modules/admin/routes/i18n-helpers.mjs +34 -0
  228. package/dist/server/modules/admin/routes/locales.d.mts +2 -2
  229. package/dist/server/modules/admin/routes/preview.mjs +25 -17
  230. package/dist/server/modules/admin/routes/reactive.d.mts +9 -9
  231. package/dist/server/modules/admin/routes/route-helpers.mjs +1 -1
  232. package/dist/server/modules/admin/routes/setup.d.mts +10 -10
  233. package/dist/server/modules/admin/routes/setup.mjs +16 -13
  234. package/dist/server/modules/admin/routes/translations.d.mts +4 -4
  235. package/dist/server/modules/admin/routes/translations.mjs +5 -1
  236. package/dist/server/modules/admin-preferences/collections/admin-preferences.mjs +1 -1
  237. package/dist/server/modules/admin-preferences/collections/saved-views.d.mts +2 -2
  238. package/dist/server/modules/audit/.generated/module.d.mts +1 -1
  239. package/dist/server/modules/audit/.generated/module.mjs +1 -1
  240. package/dist/server/modules/audit/collections/audit-log.d.mts +2 -2
  241. package/dist/server/modules/audit/collections/audit-log.mjs +1 -1
  242. package/dist/server/modules/audit/config/app.mjs +99 -42
  243. package/dist/server/modules/audit/jobs/audit-cleanup.mjs +1 -1
  244. package/dist/server/plugin.mjs +4 -2
  245. package/dist/server/proxy-factories.d.mts +4 -3
  246. package/dist/server/proxy-factories.mjs +34 -8
  247. package/dist/shared/types/saved-views.types.d.mts +2 -0
  248. package/package.json +6 -4
  249. package/dist/client/components/fields/rich-text-editor/link-popover.mjs +0 -85
  250. package/dist/client/components/ui/spinner.mjs +0 -52
  251. package/dist/client/components/ui/toolbar.mjs +0 -136
  252. package/dist/client/contexts/breadcrumb-context.mjs +0 -60
  253. package/dist/client/views/layout/admin-topbar.mjs +0 -236
@@ -1,217 +1,319 @@
1
1
  import { useTranslation } from "../../i18n/hooks.mjs";
2
2
  import { Button } from "../ui/button.mjs";
3
3
  import { Input } from "../ui/input.mjs";
4
+ import { Skeleton } from "../ui/skeleton.mjs";
4
5
  import { c } from "react/compiler-runtime";
5
6
  import { Icon } from "@iconify/react";
6
7
  import { useState } from "react";
7
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
8
+ import { jsx, jsxs } from "react/jsx-runtime";
8
9
 
9
10
  //#region src/client/components/filter-builder/saved-views-tab.tsx
10
11
  function SavedViewsTab(t0) {
11
- const $ = c(62);
12
+ const $ = c(90);
12
13
  const { currentConfig, savedViews, isLoading, onLoadView, onSaveView, onDeleteView } = t0;
13
14
  const { t } = useTranslation();
14
15
  const [viewName, setViewName] = useState("");
16
+ const activeFilters = currentConfig.filters.length;
17
+ const visibleColumns = currentConfig.visibleColumns.length;
18
+ const hasSort = !!currentConfig.sortConfig;
19
+ const hasGrouping = !!currentConfig.groupBy;
15
20
  let t1;
16
- if ($[0] !== currentConfig || $[1] !== onSaveView || $[2] !== viewName) {
17
- t1 = () => {
18
- if (!viewName.trim()) return;
19
- onSaveView(viewName.trim(), currentConfig);
20
- setViewName("");
21
- };
22
- $[0] = currentConfig;
23
- $[1] = onSaveView;
24
- $[2] = viewName;
25
- $[3] = t1;
26
- } else t1 = $[3];
27
- const handleSave = t1;
28
- const hasActiveConfig = currentConfig.filters.length > 0 || currentConfig.sortConfig !== null || currentConfig.visibleColumns.length > 0;
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];
29
27
  let t2;
30
- if ($[4] !== t) {
31
- t2 = t("viewOptions.saveCurrentConfig");
28
+ if ($[3] !== activeFilters || $[4] !== t) {
29
+ t2 = t("viewOptions.filtersCount", { count: activeFilters });
30
+ $[3] = activeFilters;
32
31
  $[4] = t;
33
32
  $[5] = t2;
34
33
  } else t2 = $[5];
35
34
  let t3;
36
- if ($[6] !== t2) {
37
- t3 = /* @__PURE__ */ jsx("p", {
38
- className: "text-primary mb-2 block text-xs font-semibold uppercase",
39
- children: t2
40
- });
41
- $[6] = t2;
42
- $[7] = t3;
43
- } else t3 = $[7];
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];
44
41
  let t4;
45
- if ($[8] !== t) {
46
- t4 = t("viewOptions.viewNamePlaceholder");
47
- $[8] = t;
48
- $[9] = t4;
49
- } else t4 = $[9];
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];
50
48
  let t5;
51
- if ($[10] === Symbol.for("react.memo_cache_sentinel")) {
52
- t5 = (e) => setViewName(e.target.value);
53
- $[10] = t5;
54
- } else t5 = $[10];
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(" · ");
55
63
  let t6;
56
- if ($[11] !== handleSave) {
57
- t6 = (e_0) => e_0.key === "Enter" && handleSave();
58
- $[11] = handleSave;
59
- $[12] = t6;
60
- } else t6 = $[12];
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;
76
+ const hasActiveConfig = activeFilters > 0 || hasSort || hasGrouping || visibleColumns > 0;
61
77
  let t7;
62
- if ($[13] !== t4 || $[14] !== t6 || $[15] !== viewName) {
63
- t7 = /* @__PURE__ */ jsx(Input, {
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, {
64
135
  className: "h-9 flex-1",
65
- placeholder: t4,
136
+ placeholder: t12,
66
137
  value: viewName,
67
- onChange: t5,
68
- onKeyDown: t6
138
+ onChange: t13,
139
+ onKeyDown: t14
69
140
  });
70
- $[13] = t4;
71
- $[14] = t6;
72
- $[15] = viewName;
73
- $[16] = t7;
74
- } else t7 = $[16];
75
- let t8;
76
- if ($[17] !== viewName) {
77
- t8 = viewName.trim();
78
- $[17] = viewName;
79
- $[18] = t8;
80
- } else t8 = $[18];
81
- const t9 = !t8;
82
- let t10;
83
- if ($[19] === Symbol.for("react.memo_cache_sentinel")) {
84
- t10 = /* @__PURE__ */ jsx(Icon, {
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, {
85
156
  icon: "ph:floppy-disk",
86
157
  width: 16,
87
158
  height: 16
88
159
  });
89
- $[19] = t10;
90
- } else t10 = $[19];
91
- let t11;
92
- if ($[20] !== handleSave || $[21] !== t9) {
93
- t11 = /* @__PURE__ */ jsx(Button, {
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, {
94
171
  onClick: handleSave,
95
- disabled: t9,
172
+ disabled: t17,
96
173
  size: "sm",
97
- className: "h-9 px-3",
98
- children: t10
174
+ className: "h-9 gap-2 px-3",
175
+ children: [t18, t19]
99
176
  });
100
- $[20] = handleSave;
101
- $[21] = t9;
102
- $[22] = t11;
103
- } else t11 = $[22];
104
- let t12;
105
- if ($[23] !== t11 || $[24] !== t7) {
106
- t12 = /* @__PURE__ */ jsxs("div", {
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", {
107
185
  className: "flex gap-2",
108
- children: [t7, t11]
186
+ children: [t15, t20]
109
187
  });
110
- $[23] = t11;
111
- $[24] = t7;
112
- $[25] = t12;
113
- } else t12 = $[25];
114
- let t13;
115
- if ($[26] !== t) {
116
- t13 = t("viewOptions.saveDescription");
117
- $[26] = t;
118
- $[27] = t13;
119
- } else t13 = $[27];
120
- let t14;
121
- if ($[28] !== t13) {
122
- t14 = /* @__PURE__ */ jsx("p", {
123
- className: "text-muted-foreground mt-2 text-xs",
124
- children: t13
125
- });
126
- $[28] = t13;
127
- $[29] = t14;
128
- } else t14 = $[29];
129
- let t15;
130
- if ($[30] !== hasActiveConfig || $[31] !== t) {
131
- t15 = !hasActiveConfig && /* @__PURE__ */ jsx("p", {
132
- className: "text-warning mt-1 text-xs",
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",
133
196
  children: t("viewOptions.noChangesToSave")
134
197
  });
135
- $[30] = hasActiveConfig;
136
- $[31] = t;
137
- $[32] = t15;
138
- } else t15 = $[32];
139
- let t16;
140
- if ($[33] !== t12 || $[34] !== t14 || $[35] !== t15 || $[36] !== t3) {
141
- t16 = /* @__PURE__ */ jsxs("div", {
142
- className: "bg-primary/5 border-primary/20 border p-4",
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", {
205
+ className: "space-y-2",
143
206
  children: [
144
- t3,
145
- t12,
146
- t14,
147
- t15
207
+ t11,
208
+ t21,
209
+ t22
148
210
  ]
149
211
  });
150
- $[33] = t12;
151
- $[34] = t14;
152
- $[35] = t15;
153
- $[36] = t3;
154
- $[37] = t16;
155
- } else t16 = $[37];
156
- let t17;
157
- if ($[38] !== t) {
158
- t17 = t("viewOptions.savedViews");
159
- $[38] = t;
160
- $[39] = t17;
161
- } else t17 = $[39];
162
- let t18;
163
- if ($[40] !== t17) {
164
- t18 = /* @__PURE__ */ jsx("p", {
165
- className: "text-muted-foreground mb-2 text-xs font-semibold uppercase",
166
- children: t17
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
167
228
  });
168
- $[40] = t17;
169
- $[41] = t18;
170
- } else t18 = $[41];
171
- let t19;
172
- if ($[42] !== isLoading) {
173
- t19 = isLoading && /* @__PURE__ */ jsx("div", {
174
- className: "text-muted-foreground flex justify-center p-4",
175
- children: /* @__PURE__ */ jsx(Icon, {
176
- icon: "ph:spinner-gap",
177
- className: "size-5 animate-spin"
178
- })
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
179
237
  });
180
- $[42] = isLoading;
181
- $[43] = t19;
182
- } else t19 = $[43];
183
- let t20;
184
- if ($[44] !== isLoading || $[45] !== savedViews || $[46] !== t) {
185
- t20 = !isLoading && savedViews.length === 0 && /* @__PURE__ */ jsx("div", {
186
- className: "text-muted-foreground p-4 text-center text-xs italic",
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",
256
+ 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",
187
269
  children: t("viewOptions.noSavedViews")
188
270
  });
189
- $[44] = isLoading;
190
- $[45] = savedViews;
191
- $[46] = t;
192
- $[47] = t20;
193
- } else t20 = $[47];
194
- let t21;
195
- if ($[48] !== isLoading || $[49] !== onDeleteView || $[50] !== onLoadView || $[51] !== savedViews || $[52] !== t) {
196
- t21 = !isLoading && savedViews.map((view) => /* @__PURE__ */ jsxs("button", {
197
- type: "button",
198
- className: "border-border hover:border-primary/50 bg-background group flex w-full cursor-pointer items-center justify-between border p-3 text-left transition-all hover:shadow-sm",
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]",
199
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
+ },
200
289
  children: [/* @__PURE__ */ jsxs("div", {
201
290
  className: "min-w-0 flex-1",
202
- children: [/* @__PURE__ */ jsx("p", {
203
- className: "group-hover:text-primary truncate text-sm font-medium transition-colors",
204
- children: view.name
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
299
+ })]
205
300
  }), /* @__PURE__ */ jsxs("p", {
206
- className: "text-muted-foreground flex gap-2 text-xs",
301
+ className: "text-muted-foreground mt-1 flex flex-wrap gap-x-2 gap-y-1 pl-6 text-xs",
207
302
  children: [
208
- /* @__PURE__ */ jsx("span", { children: t("viewOptions.filtersCount", { count: view.configuration.filters.length }) }),
209
- /* @__PURE__ */ jsx("span", { children: "" }),
210
- /* @__PURE__ */ jsx("span", { children: t("viewOptions.columnsCount", { count: view.configuration.visibleColumns.length }) }),
211
- view.isDefault && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("span", { children: "•" }), /* @__PURE__ */ jsx("span", {
212
- className: "text-primary",
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",
213
315
  children: t("viewOptions.defaultView")
214
- })] })
316
+ })
215
317
  ]
216
318
  })]
217
319
  }), /* @__PURE__ */ jsxs("div", {
@@ -219,8 +321,8 @@ function SavedViewsTab(t0) {
219
321
  children: [/* @__PURE__ */ jsx(Button, {
220
322
  variant: "ghost",
221
323
  size: "icon-sm",
222
- onClick: (e_1) => {
223
- e_1.stopPropagation();
324
+ onClick: (e_2) => {
325
+ e_2.stopPropagation();
224
326
  onDeleteView(view.id);
225
327
  },
226
328
  className: "text-muted-foreground hover:text-destructive opacity-0 group-hover:opacity-100",
@@ -233,45 +335,45 @@ function SavedViewsTab(t0) {
233
335
  icon: "ph:arrow-right",
234
336
  width: 14,
235
337
  height: 14,
236
- className: "text-primary opacity-0 transition-opacity group-hover:opacity-100"
338
+ className: "text-muted-foreground opacity-0 transition-opacity group-hover:opacity-100"
237
339
  })]
238
340
  })]
239
341
  }, view.id));
240
- $[48] = isLoading;
241
- $[49] = onDeleteView;
242
- $[50] = onLoadView;
243
- $[51] = savedViews;
244
- $[52] = t;
245
- $[53] = t21;
246
- } else t21 = $[53];
247
- let t22;
248
- if ($[54] !== t18 || $[55] !== t19 || $[56] !== t20 || $[57] !== t21) {
249
- t22 = /* @__PURE__ */ jsxs("div", {
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", {
250
352
  className: "space-y-2",
251
353
  children: [
252
- t18,
253
- t19,
254
- t20,
255
- t21
354
+ t27,
355
+ t28,
356
+ t29,
357
+ t30
256
358
  ]
257
359
  });
258
- $[54] = t18;
259
- $[55] = t19;
260
- $[56] = t20;
261
- $[57] = t21;
262
- $[58] = t22;
263
- } else t22 = $[58];
264
- let t23;
265
- if ($[59] !== t16 || $[60] !== t22) {
266
- t23 = /* @__PURE__ */ jsxs("div", {
267
- className: "space-y-6 py-4",
268
- children: [t16, t22]
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]
269
371
  });
270
- $[59] = t16;
271
- $[60] = t22;
272
- $[61] = t23;
273
- } else t23 = $[61];
274
- return t23;
372
+ $[87] = t23;
373
+ $[88] = t31;
374
+ $[89] = t32;
375
+ } else t32 = $[89];
376
+ return t32;
275
377
  }
276
378
 
277
379
  //#endregion