@questpie/admin 3.0.3 → 3.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +34 -5
- package/dist/client/blocks/block-renderer.d.mts +2 -2
- package/dist/client/blocks/block-renderer.mjs +4 -1
- package/dist/client/builder/types/action-types.d.mts +31 -3
- package/dist/client/builder/types/collection-types.d.mts +140 -0
- package/dist/client/builder/types/ui-config.d.mts +16 -2
- package/dist/client/builder/types/views.d.mts +57 -0
- package/dist/client/builder/types/widget-types.d.mts +5 -0
- package/dist/client/components/actions/action-button.mjs +137 -199
- package/dist/client/components/actions/action-dialog.mjs +198 -156
- package/dist/client/components/actions/confirmation-dialog.mjs +2 -2
- package/dist/client/components/actions/header-actions.mjs +52 -53
- package/dist/client/components/admin-link.d.mts +2 -2
- package/dist/client/components/auth/auth-loading.mjs +41 -18
- package/dist/client/components/blocks/block-fields-renderer.mjs +64 -28
- package/dist/client/components/blocks/block-insert-button.mjs +4 -4
- package/dist/client/components/blocks/block-item.mjs +2 -2
- package/dist/client/components/blocks/block-library-sidebar.mjs +2 -2
- package/dist/client/components/component-renderer.mjs +1 -1
- package/dist/client/components/fields/array-field.mjs +14 -14
- package/dist/client/components/fields/asset-preview-field.mjs +1 -1
- package/dist/client/components/fields/blocks-field/blocks-field.mjs +84 -104
- package/dist/client/components/fields/json-field.mjs +2 -2
- package/dist/client/components/fields/object-array-field.mjs +22 -22
- package/dist/client/components/fields/object-field.mjs +5 -5
- package/dist/client/components/fields/relation/displays/cards-display.mjs +16 -9
- package/dist/client/components/fields/relation/displays/chips-display.mjs +15 -12
- package/dist/client/components/fields/relation/displays/grid-display.mjs +15 -11
- package/dist/client/components/fields/relation/displays/list-display.mjs +33 -20
- package/dist/client/components/fields/relation/displays/table-display.mjs +62 -93
- package/dist/client/components/fields/relation/relation-items-display.mjs +1 -1
- package/dist/client/components/fields/relation-picker.mjs +7 -6
- package/dist/client/components/fields/relation-select.mjs +71 -47
- package/dist/client/components/fields/rich-text-editor/bubble-menu.mjs +392 -82
- package/dist/client/components/fields/rich-text-editor/extensions.mjs +54 -23
- package/dist/client/components/fields/rich-text-editor/image-popover.mjs +24 -50
- package/dist/client/components/fields/rich-text-editor/image-upload.mjs +66 -0
- package/dist/client/components/fields/rich-text-editor/index.d.mts +38 -0
- package/dist/client/components/fields/rich-text-editor/index.mjs +637 -376
- package/dist/client/components/fields/rich-text-editor/link-utils.mjs +26 -0
- package/dist/client/components/fields/rich-text-editor/presets.d.mts +10 -0
- package/dist/client/components/fields/rich-text-editor/slash-commands.mjs +27 -6
- package/dist/client/components/fields/rich-text-editor/toolbar.mjs +464 -346
- package/dist/client/components/fields/rich-text-editor/types.d.mts +77 -0
- package/dist/client/components/fields/upload-field.mjs +45 -49
- package/dist/client/components/filter-builder/columns-tab.mjs +69 -62
- package/dist/client/components/filter-builder/filter-builder-sheet.mjs +473 -308
- package/dist/client/components/filter-builder/filters-tab.mjs +109 -82
- package/dist/client/components/filter-builder/saved-views-tab.mjs +300 -198
- package/dist/client/components/history-sidebar.mjs +850 -340
- package/dist/client/components/layout/field-layout-renderer.mjs +6 -5
- package/dist/client/components/locale-switcher.mjs +8 -8
- package/dist/client/components/media/media-grid.mjs +12 -9
- package/dist/client/components/media/media-picker-dialog.mjs +242 -230
- package/dist/client/components/preview/live-preview-mode.mjs +1 -1
- package/dist/client/components/primitives/asset-preview.mjs +37 -22
- package/dist/client/components/primitives/date-input.mjs +212 -249
- package/dist/client/components/primitives/dropzone.mjs +192 -159
- package/dist/client/components/primitives/field-select-control.mjs +93 -0
- package/dist/client/components/primitives/select-multi.mjs +251 -230
- package/dist/client/components/primitives/select-single.mjs +345 -290
- package/dist/client/components/primitives/time-input.mjs +2 -2
- package/dist/client/components/sheets/resource-sheet.mjs +2 -0
- package/dist/client/components/ui/accordion.mjs +4 -4
- package/dist/client/components/ui/alert.mjs +3 -3
- package/dist/client/components/ui/badge.mjs +4 -4
- package/dist/client/components/ui/button.mjs +47 -37
- package/dist/client/components/ui/card.mjs +2 -2
- package/dist/client/components/ui/checkbox.mjs +1 -1
- package/dist/client/components/ui/command.mjs +5 -5
- package/dist/client/components/ui/dialog.mjs +3 -3
- package/dist/client/components/ui/drawer.mjs +1 -1
- package/dist/client/components/ui/dropdown-menu.mjs +157 -15
- package/dist/client/components/ui/empty-state.mjs +88 -59
- package/dist/client/components/ui/field.mjs +2 -2
- package/dist/client/components/ui/input-group.mjs +3 -3
- package/dist/client/components/ui/input.mjs +1 -1
- package/dist/client/components/ui/kbd.mjs +1 -1
- package/dist/client/components/ui/label.mjs +1 -1
- package/dist/client/components/ui/popover.mjs +19 -11
- package/dist/client/components/ui/scroll-fade.mjs +170 -0
- package/dist/client/components/ui/search-input.mjs +1 -1
- package/dist/client/components/ui/select.mjs +129 -27
- package/dist/client/components/ui/sheet.mjs +54 -34
- package/dist/client/components/ui/sidebar.mjs +15 -14
- package/dist/client/components/ui/skeleton.mjs +28 -12
- package/dist/client/components/ui/switch.mjs +2 -2
- package/dist/client/components/ui/table.mjs +82 -74
- package/dist/client/components/ui/tabs.mjs +26 -31
- package/dist/client/components/ui/textarea.mjs +1 -1
- package/dist/client/components/ui/tooltip.mjs +1 -1
- package/dist/client/components/widgets/chart-widget.mjs +134 -96
- package/dist/client/components/widgets/progress-widget.mjs +59 -34
- package/dist/client/components/widgets/quick-actions-widget.mjs +184 -113
- package/dist/client/components/widgets/recent-items-widget.mjs +144 -102
- package/dist/client/components/widgets/stats-widget.mjs +91 -72
- package/dist/client/components/widgets/table-widget.mjs +159 -246
- package/dist/client/components/widgets/timeline-widget.mjs +66 -43
- package/dist/client/components/widgets/value-widget.mjs +261 -152
- package/dist/client/components/widgets/widget-empty-state.mjs +88 -0
- package/dist/client/components/widgets/widget-skeletons.mjs +53 -20
- package/dist/client/contexts/focus-context.d.mts +2 -2
- package/dist/client/hooks/use-action.mjs +63 -55
- package/dist/client/hooks/use-audit-history.mjs +1 -65
- package/dist/client/hooks/use-collection-validation.mjs +36 -23
- package/dist/client/hooks/use-collection.mjs +96 -1
- package/dist/client/hooks/use-saved-views.mjs +70 -49
- package/dist/client/hooks/use-server-actions.mjs +59 -40
- package/dist/client/hooks/use-server-validation.mjs +156 -41
- package/dist/client/hooks/use-server-widget-data.mjs +1 -1
- package/dist/client/hooks/use-setup-status.d.mts +3 -3
- package/dist/client/hooks/use-setup-status.mjs +2 -2
- package/dist/client/hooks/use-transition-stage.mjs +2 -10
- package/dist/client/hooks/use-validation-error-map.mjs +31 -13
- package/dist/client/hooks/use-view-state.mjs +238 -174
- package/dist/client/i18n/date-locale.mjs +33 -0
- package/dist/client/i18n/hooks.mjs +17 -1
- package/dist/client/lib/utils.mjs +3 -2
- package/dist/client/preview/block-scope-context.d.mts +2 -2
- package/dist/client/preview/preview-banner.d.mts +2 -2
- package/dist/client/preview/preview-field.d.mts +4 -4
- package/dist/client/preview/preview-field.mjs +2 -2
- package/dist/client/runtime/provider.mjs +8 -1
- package/dist/client/runtime/translations-provider.mjs +1 -1
- package/dist/client/scope/picker.d.mts +2 -2
- package/dist/client/scope/provider.d.mts +2 -2
- package/dist/client/styles/base.css +1022 -0
- package/dist/client/styles/index.css +3 -589
- package/dist/client/utils/auto-expand-fields.mjs +4 -2
- package/dist/client/utils/keyboard-shortcuts.mjs +26 -0
- package/dist/client/utils/use-lazy-component.mjs +80 -0
- package/dist/client/views/auth/auth-layout.d.mts +18 -11
- package/dist/client/views/auth/auth-layout.mjs +291 -80
- package/dist/client/views/auth/forgot-password-form.d.mts +2 -2
- package/dist/client/views/auth/forgot-password-form.mjs +2 -2
- package/dist/client/views/auth/login-form.d.mts +2 -2
- package/dist/client/views/auth/login-form.mjs +1 -1
- package/dist/client/views/auth/reset-password-form.d.mts +2 -2
- package/dist/client/views/auth/reset-password-form.mjs +2 -2
- package/dist/client/views/auth/setup-form.d.mts +2 -2
- package/dist/client/views/collection/auto-form-fields.mjs +11 -9
- package/dist/client/views/collection/bulk-action-toolbar.mjs +173 -138
- package/dist/client/views/collection/cells/complex-cells.mjs +22 -22
- package/dist/client/views/collection/cells/primitive-cells.mjs +1 -1
- package/dist/client/views/collection/cells/relation-cells.mjs +147 -129
- package/dist/client/views/collection/cells/shared/asset-thumbnail.mjs +224 -278
- package/dist/client/views/collection/cells/shared/relation-chip.mjs +64 -36
- package/dist/client/views/collection/cells/upload-cells.mjs +199 -9
- package/dist/client/views/collection/columns/build-columns.mjs +29 -9
- package/dist/client/views/collection/columns/column-defaults.mjs +2 -2
- package/dist/client/views/collection/field-renderer.mjs +50 -89
- package/dist/client/views/collection/form-view.mjs +237 -227
- package/dist/client/views/collection/table-view.mjs +1162 -229
- package/dist/client/views/collection/view-skeletons.mjs +222 -79
- package/dist/client/views/common/global-search.mjs +29 -18
- package/dist/client/views/dashboard/dashboard-grid.mjs +678 -501
- package/dist/client/views/dashboard/dashboard-widget.mjs +6 -3
- package/dist/client/views/dashboard/widget-card.mjs +23 -14
- package/dist/client/views/globals/global-form-view.mjs +634 -589
- package/dist/client/views/layout/admin-layout-provider.mjs +67 -70
- package/dist/client/views/layout/admin-layout.d.mts +3 -6
- package/dist/client/views/layout/admin-layout.mjs +149 -172
- package/dist/client/views/layout/admin-router.mjs +747 -544
- package/dist/client/views/layout/admin-sidebar.d.mts +38 -1
- package/dist/client/views/layout/admin-sidebar.mjs +751 -591
- package/dist/client/views/layout/admin-theme.d.mts +10 -0
- package/dist/client/views/layout/admin-theme.mjs +84 -0
- package/dist/client/views/layout/admin-view-layout.mjs +161 -0
- package/dist/client/views/pages/accept-invite-page.d.mts +2 -2
- package/dist/client/views/pages/accept-invite-page.mjs +49 -26
- package/dist/client/views/pages/dashboard-page.d.mts +2 -2
- package/dist/client/views/pages/forgot-password-page.d.mts +2 -2
- package/dist/client/views/pages/forgot-password-page.mjs +2 -19
- package/dist/client/views/pages/invite-page.d.mts +2 -2
- package/dist/client/views/pages/invite-page.mjs +2 -19
- package/dist/client/views/pages/login-page.d.mts +1 -1
- package/dist/client/views/pages/login-page.mjs +4 -21
- package/dist/client/views/pages/reset-password-page.d.mts +2 -2
- package/dist/client/views/pages/reset-password-page.mjs +3 -20
- package/dist/client/views/pages/setup-page.d.mts +2 -2
- package/dist/client/views/pages/setup-page.mjs +3 -20
- package/dist/client.d.mts +6 -2
- package/dist/client.mjs +2 -1
- package/dist/components/rich-text/rich-text-renderer.d.mts +2 -2
- package/dist/index.d.mts +6 -2
- package/dist/index.mjs +2 -1
- package/dist/server/augmentation/dashboard.d.mts +67 -3
- package/dist/server/augmentation/form-layout.d.mts +21 -0
- package/dist/server/augmentation/index.d.mts +1 -1
- package/dist/server/codegen/admin-client-template.mjs +4 -0
- package/dist/server/fields/blocks.d.mts +1 -1
- package/dist/server/fields/blocks.mjs +12 -0
- package/dist/server/fields/rich-text.d.mts +1 -1
- package/dist/server/fields/rich-text.mjs +8 -0
- package/dist/server/i18n/index.mjs +17 -1
- package/dist/server/i18n/messages/cs.mjs +23 -0
- package/dist/server/i18n/messages/de.mjs +23 -0
- package/dist/server/i18n/messages/en.mjs +64 -1
- package/dist/server/i18n/messages/es.mjs +23 -0
- package/dist/server/i18n/messages/fr.mjs +23 -0
- package/dist/server/i18n/messages/pl.mjs +23 -0
- package/dist/server/i18n/messages/pt.mjs +23 -0
- package/dist/server/i18n/messages/sk.mjs +83 -1
- package/dist/server/modules/admin/block/introspection.mjs +4 -1
- package/dist/server/modules/admin/block/prefetch.mjs +12 -2
- package/dist/server/modules/admin/collections/account.d.mts +50 -50
- package/dist/server/modules/admin/collections/admin-locks.d.mts +54 -54
- package/dist/server/modules/admin/collections/admin-preferences.d.mts +39 -39
- package/dist/server/modules/admin/collections/admin-saved-views.d.mts +47 -47
- package/dist/server/modules/admin/collections/apikey.d.mts +68 -68
- package/dist/server/modules/admin/collections/assets.d.mts +20 -20
- package/dist/server/modules/admin/collections/assets.mjs +0 -1
- package/dist/server/modules/admin/collections/session.d.mts +42 -42
- package/dist/server/modules/admin/collections/user.d.mts +12 -0
- package/dist/server/modules/admin/collections/user.mjs +40 -9
- package/dist/server/modules/admin/collections/verification.d.mts +2 -2
- package/dist/server/modules/admin/dto/admin-config.dto.mjs +2 -0
- package/dist/server/modules/admin/factories.mjs +7 -18
- package/dist/server/modules/admin/index.d.mts +1 -1
- package/dist/server/modules/admin/routes/admin-config.d.mts +2 -2
- package/dist/server/modules/admin/routes/admin-config.mjs +34 -16
- package/dist/server/modules/admin/routes/execute-action.d.mts +9 -9
- package/dist/server/modules/admin/routes/execute-action.mjs +33 -0
- package/dist/server/modules/admin/routes/locales.d.mts +2 -2
- package/dist/server/modules/admin/routes/preview.d.mts +11 -11
- package/dist/server/modules/admin/routes/reactive.d.mts +9 -9
- package/dist/server/modules/admin/routes/setup.d.mts +10 -10
- package/dist/server/modules/admin/routes/setup.mjs +7 -7
- package/dist/server/modules/admin/routes/translations.d.mts +4 -4
- package/dist/server/modules/admin/routes/translations.mjs +5 -1
- package/dist/server/modules/admin/routes/widget-data.d.mts +5 -5
- package/dist/server/modules/admin-preferences/collections/admin-preferences.mjs +1 -1
- package/dist/server/modules/admin-preferences/collections/saved-views.d.mts +27 -27
- package/dist/server/modules/audit/.generated/module.d.mts +1 -1
- package/dist/server/modules/audit/.generated/module.mjs +1 -1
- package/dist/server/modules/audit/collections/audit-log.d.mts +2 -2
- package/dist/server/modules/audit/collections/audit-log.mjs +1 -1
- package/dist/server/modules/audit/config/app.mjs +99 -42
- package/dist/server/modules/audit/jobs/audit-cleanup.mjs +1 -1
- package/dist/server/plugin.mjs +4 -2
- package/dist/server/proxy-factories.d.mts +4 -3
- package/dist/server/proxy-factories.mjs +34 -8
- package/dist/shared/types/saved-views.types.d.mts +2 -0
- package/package.json +6 -4
- package/dist/client/components/fields/rich-text-editor/link-popover.mjs +0 -85
- package/dist/client/components/ui/spinner.mjs +0 -52
- package/dist/client/components/ui/toolbar.mjs +0 -136
- package/dist/client/contexts/breadcrumb-context.mjs +0 -60
- 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 {
|
|
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(
|
|
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] !==
|
|
17
|
-
t1 = (
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
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.
|
|
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] !==
|
|
37
|
-
t3 =
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
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 ($[
|
|
46
|
-
t4 = t("viewOptions.
|
|
47
|
-
$[
|
|
48
|
-
$[
|
|
49
|
-
|
|
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 ($[
|
|
52
|
-
t5 =
|
|
53
|
-
|
|
54
|
-
|
|
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 ($[
|
|
57
|
-
t6 = (
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
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 ($[
|
|
63
|
-
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, {
|
|
64
135
|
className: "h-9 flex-1",
|
|
65
|
-
placeholder:
|
|
136
|
+
placeholder: t12,
|
|
66
137
|
value: viewName,
|
|
67
|
-
onChange:
|
|
68
|
-
onKeyDown:
|
|
138
|
+
onChange: t13,
|
|
139
|
+
onKeyDown: t14
|
|
69
140
|
});
|
|
70
|
-
$[
|
|
71
|
-
$[
|
|
72
|
-
$[
|
|
73
|
-
$[
|
|
74
|
-
} else
|
|
75
|
-
let
|
|
76
|
-
if ($[
|
|
77
|
-
|
|
78
|
-
$[
|
|
79
|
-
$[
|
|
80
|
-
} else
|
|
81
|
-
const
|
|
82
|
-
let
|
|
83
|
-
if ($[
|
|
84
|
-
|
|
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
|
-
$[
|
|
90
|
-
} else
|
|
91
|
-
let
|
|
92
|
-
if ($[
|
|
93
|
-
|
|
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:
|
|
172
|
+
disabled: t17,
|
|
96
173
|
size: "sm",
|
|
97
|
-
className: "h-9 px-3",
|
|
98
|
-
children:
|
|
174
|
+
className: "h-9 gap-2 px-3",
|
|
175
|
+
children: [t18, t19]
|
|
99
176
|
});
|
|
100
|
-
$[
|
|
101
|
-
$[
|
|
102
|
-
$[
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
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: [
|
|
186
|
+
children: [t15, t20]
|
|
109
187
|
});
|
|
110
|
-
$[
|
|
111
|
-
$[
|
|
112
|
-
$[
|
|
113
|
-
} else
|
|
114
|
-
let
|
|
115
|
-
if ($[
|
|
116
|
-
|
|
117
|
-
|
|
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
|
-
$[
|
|
136
|
-
$[
|
|
137
|
-
$[
|
|
138
|
-
} else
|
|
139
|
-
let
|
|
140
|
-
if ($[
|
|
141
|
-
|
|
142
|
-
className: "
|
|
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
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
t15
|
|
207
|
+
t11,
|
|
208
|
+
t21,
|
|
209
|
+
t22
|
|
148
210
|
]
|
|
149
211
|
});
|
|
150
|
-
$[
|
|
151
|
-
$[
|
|
152
|
-
$[
|
|
153
|
-
$[
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
$[
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
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
|
-
$[
|
|
169
|
-
$[
|
|
170
|
-
} else
|
|
171
|
-
let
|
|
172
|
-
if ($[
|
|
173
|
-
|
|
174
|
-
className: "text-muted-foreground
|
|
175
|
-
children:
|
|
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
|
-
$[
|
|
181
|
-
$[
|
|
182
|
-
} else
|
|
183
|
-
let
|
|
184
|
-
if ($[
|
|
185
|
-
|
|
186
|
-
className: "
|
|
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
|
-
$[
|
|
190
|
-
$[
|
|
191
|
-
$[
|
|
192
|
-
$[
|
|
193
|
-
} else
|
|
194
|
-
let
|
|
195
|
-
if ($[
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
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__ */
|
|
203
|
-
className: "
|
|
204
|
-
children:
|
|
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", {
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
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: (
|
|
223
|
-
|
|
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-
|
|
338
|
+
className: "text-muted-foreground opacity-0 transition-opacity group-hover:opacity-100"
|
|
237
339
|
})]
|
|
238
340
|
})]
|
|
239
341
|
}, view.id));
|
|
240
|
-
$[
|
|
241
|
-
$[
|
|
242
|
-
$[
|
|
243
|
-
$[
|
|
244
|
-
$[
|
|
245
|
-
$[
|
|
246
|
-
} else
|
|
247
|
-
let
|
|
248
|
-
if ($[
|
|
249
|
-
|
|
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
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
354
|
+
t27,
|
|
355
|
+
t28,
|
|
356
|
+
t29,
|
|
357
|
+
t30
|
|
256
358
|
]
|
|
257
359
|
});
|
|
258
|
-
$[
|
|
259
|
-
$[
|
|
260
|
-
$[
|
|
261
|
-
$[
|
|
262
|
-
$[
|
|
263
|
-
} else
|
|
264
|
-
let
|
|
265
|
-
if ($[
|
|
266
|
-
|
|
267
|
-
className: "space-y-
|
|
268
|
-
children: [
|
|
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
|
-
$[
|
|
271
|
-
$[
|
|
272
|
-
$[
|
|
273
|
-
} else
|
|
274
|
-
return
|
|
372
|
+
$[87] = t23;
|
|
373
|
+
$[88] = t31;
|
|
374
|
+
$[89] = t32;
|
|
375
|
+
} else t32 = $[89];
|
|
376
|
+
return t32;
|
|
275
377
|
}
|
|
276
378
|
|
|
277
379
|
//#endregion
|