@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.
- 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-editor-layout.mjs +2 -2
- 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 +91 -63
- 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 +106 -86
- 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 +406 -365
- package/dist/client/components/primitives/select-single.mjs +391 -323
- 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 +154 -100
- package/dist/client/components/widgets/progress-widget.mjs +63 -36
- package/dist/client/components/widgets/quick-actions-widget.mjs +207 -115
- package/dist/client/components/widgets/recent-items-widget.mjs +147 -103
- package/dist/client/components/widgets/stats-widget.mjs +91 -72
- package/dist/client/components/widgets/table-widget.mjs +161 -247
- package/dist/client/components/widgets/timeline-widget.mjs +119 -78
- package/dist/client/components/widgets/value-widget.mjs +286 -157
- 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 +70 -46
- 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-banner.mjs +75 -46
- 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/accept-invite-form.d.mts +2 -2
- package/dist/client/views/auth/auth-layout.d.mts +17 -10
- 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 +1167 -234
- 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 +152 -155
- package/dist/client/views/layout/admin-router.mjs +936 -616
- package/dist/client/views/layout/admin-sidebar.d.mts +38 -1
- package/dist/client/views/layout/admin-sidebar.mjs +762 -592
- 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 +3 -3
- 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 +70 -71
- 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 +29 -7
- package/dist/server/i18n/messages/cs.mjs +414 -1
- package/dist/server/i18n/messages/de.mjs +412 -1
- package/dist/server/i18n/messages/en.mjs +166 -1
- package/dist/server/i18n/messages/es.mjs +412 -1
- package/dist/server/i18n/messages/fr.mjs +412 -1
- package/dist/server/i18n/messages/pl.mjs +416 -1
- package/dist/server/i18n/messages/pt.mjs +409 -1
- package/dist/server/i18n/messages/sk.mjs +216 -2
- 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 +2 -2
- package/dist/server/modules/admin/collections/admin-locks.d.mts +2 -2
- 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 +42 -42
- 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 +40 -28
- package/dist/server/modules/admin/collections/user.mjs +40 -9
- package/dist/server/modules/admin/collections/verification.d.mts +36 -36
- 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 +67 -28
- package/dist/server/modules/admin/routes/i18n-helpers.mjs +34 -0
- package/dist/server/modules/admin/routes/locales.d.mts +2 -2
- package/dist/server/modules/admin/routes/preview.mjs +25 -17
- package/dist/server/modules/admin/routes/reactive.d.mts +9 -9
- package/dist/server/modules/admin/routes/route-helpers.mjs +1 -1
- package/dist/server/modules/admin/routes/setup.d.mts +10 -10
- package/dist/server/modules/admin/routes/setup.mjs +16 -13
- 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-preferences/collections/admin-preferences.mjs +1 -1
- package/dist/server/modules/admin-preferences/collections/saved-views.d.mts +2 -2
- 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,6 +1,8 @@
|
|
|
1
1
|
import { Skeleton } from "../../components/ui/skeleton.mjs";
|
|
2
|
+
import { AdminViewHeader, AdminViewLayout } from "../layout/admin-view-layout.mjs";
|
|
3
|
+
import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "../../components/ui/table.mjs";
|
|
2
4
|
import { c } from "react/compiler-runtime";
|
|
3
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
4
6
|
|
|
5
7
|
//#region src/client/views/collection/view-skeletons.tsx
|
|
6
8
|
/**
|
|
@@ -9,49 +11,150 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
9
11
|
* Loading skeletons for collection views (table, form).
|
|
10
12
|
* Used with Suspense boundaries to show loading state.
|
|
11
13
|
*/
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
14
|
+
const TABLE_SKELETON_COLUMNS = [
|
|
15
|
+
{
|
|
16
|
+
width: 40,
|
|
17
|
+
header: "mx-auto h-4 w-4",
|
|
18
|
+
cells: ["mx-auto h-4 w-4"]
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
width: 360,
|
|
22
|
+
header: "h-4 w-28",
|
|
23
|
+
cells: [
|
|
24
|
+
"h-4 w-52",
|
|
25
|
+
"h-4 w-44",
|
|
26
|
+
"h-4 w-56",
|
|
27
|
+
"h-4 w-40"
|
|
28
|
+
]
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
width: 160,
|
|
32
|
+
header: "h-4 w-20",
|
|
33
|
+
cells: [
|
|
34
|
+
"h-4 w-24",
|
|
35
|
+
"h-4 w-20",
|
|
36
|
+
"h-4 w-28",
|
|
37
|
+
"h-4 w-16"
|
|
38
|
+
]
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
width: 140,
|
|
42
|
+
header: "h-4 w-24",
|
|
43
|
+
cells: [
|
|
44
|
+
"h-4 w-20",
|
|
45
|
+
"h-4 w-24",
|
|
46
|
+
"h-4 w-16",
|
|
47
|
+
"h-4 w-28"
|
|
48
|
+
]
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
width: 96,
|
|
52
|
+
header: "ml-auto h-4 w-16",
|
|
53
|
+
cells: [
|
|
54
|
+
"ml-auto h-4 w-14",
|
|
55
|
+
"ml-auto h-4 w-16",
|
|
56
|
+
"ml-auto h-4 w-12"
|
|
57
|
+
]
|
|
58
|
+
}
|
|
59
|
+
];
|
|
60
|
+
function getColumnSizeStyle(width) {
|
|
61
|
+
return {
|
|
62
|
+
width,
|
|
63
|
+
minWidth: width,
|
|
64
|
+
maxWidth: width
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
function getSkeletonWidth(widths, rowIndex) {
|
|
68
|
+
return widths[rowIndex % widths.length] ?? widths[0] ?? "h-4 w-20";
|
|
69
|
+
}
|
|
70
|
+
function TableSkeletonRows(t0) {
|
|
71
|
+
const $ = c(2);
|
|
72
|
+
const { rows: t1 } = t0;
|
|
73
|
+
const rows = t1 === void 0 ? 8 : t1;
|
|
74
|
+
let t2;
|
|
75
|
+
if ($[0] !== rows) {
|
|
76
|
+
t2 = /* @__PURE__ */ jsx(Fragment, { children: Array.from({ length: rows }, _temp) });
|
|
77
|
+
$[0] = rows;
|
|
78
|
+
$[1] = t2;
|
|
79
|
+
} else t2 = $[1];
|
|
80
|
+
return t2;
|
|
81
|
+
}
|
|
82
|
+
function _temp(_, rowIndex) {
|
|
83
|
+
return /* @__PURE__ */ jsx(TableRow, {
|
|
84
|
+
className: "hover:bg-transparent",
|
|
85
|
+
children: TABLE_SKELETON_COLUMNS.map((column, columnIndex) => {
|
|
86
|
+
return /* @__PURE__ */ jsx(TableCell, {
|
|
87
|
+
stickyLeft: columnIndex === 0 ? 0 : columnIndex === 1 ? 40 : void 0,
|
|
88
|
+
showStickyBorder: columnIndex === 1,
|
|
89
|
+
className: columnIndex === 0 ? "w-9 min-w-9 px-1.5" : "",
|
|
90
|
+
style: getColumnSizeStyle(column.width),
|
|
91
|
+
children: /* @__PURE__ */ jsx(Skeleton, {
|
|
92
|
+
variant: "text",
|
|
93
|
+
className: getSkeletonWidth(column.cells, rowIndex)
|
|
94
|
+
})
|
|
95
|
+
}, columnIndex);
|
|
96
|
+
})
|
|
97
|
+
}, rowIndex);
|
|
98
|
+
}
|
|
99
|
+
function TableSkeletonShell() {
|
|
100
|
+
const $ = c(5);
|
|
101
|
+
let t0;
|
|
21
102
|
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
$[
|
|
103
|
+
t0 = TABLE_SKELETON_COLUMNS.reduce(_temp2, 0);
|
|
104
|
+
$[0] = t0;
|
|
105
|
+
} else t0 = $[0];
|
|
106
|
+
const width = t0;
|
|
107
|
+
let t1;
|
|
108
|
+
let t2;
|
|
109
|
+
if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
|
|
110
|
+
t1 = { width };
|
|
111
|
+
t2 = /* @__PURE__ */ jsx("colgroup", { children: TABLE_SKELETON_COLUMNS.map(_temp3) });
|
|
112
|
+
$[1] = t1;
|
|
113
|
+
$[2] = t2;
|
|
32
114
|
} else {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
t5 = $[2];
|
|
36
|
-
t6 = $[3];
|
|
37
|
-
t7 = $[4];
|
|
115
|
+
t1 = $[1];
|
|
116
|
+
t2 = $[2];
|
|
38
117
|
}
|
|
39
|
-
let
|
|
40
|
-
if ($[
|
|
41
|
-
|
|
42
|
-
className:
|
|
118
|
+
let t3;
|
|
119
|
+
if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
|
|
120
|
+
t3 = /* @__PURE__ */ jsx(TableHeader, { children: /* @__PURE__ */ jsx(TableRow, {
|
|
121
|
+
className: "hover:bg-transparent",
|
|
122
|
+
children: TABLE_SKELETON_COLUMNS.map(_temp4)
|
|
123
|
+
}) });
|
|
124
|
+
$[3] = t3;
|
|
125
|
+
} else t3 = $[3];
|
|
126
|
+
let t4;
|
|
127
|
+
if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
|
|
128
|
+
t4 = /* @__PURE__ */ jsxs(Table, {
|
|
129
|
+
className: "table-fixed",
|
|
130
|
+
style: t1,
|
|
43
131
|
children: [
|
|
132
|
+
t2,
|
|
44
133
|
t3,
|
|
45
|
-
|
|
46
|
-
t5,
|
|
47
|
-
t6,
|
|
48
|
-
t7
|
|
134
|
+
/* @__PURE__ */ jsx(TableBody, { children: /* @__PURE__ */ jsx(TableSkeletonRows, {}) })
|
|
49
135
|
]
|
|
50
136
|
});
|
|
51
|
-
$[
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
137
|
+
$[4] = t4;
|
|
138
|
+
} else t4 = $[4];
|
|
139
|
+
return t4;
|
|
140
|
+
}
|
|
141
|
+
function _temp4(column_1, index_0) {
|
|
142
|
+
return /* @__PURE__ */ jsx(TableHead, {
|
|
143
|
+
stickyLeft: index_0 === 0 ? 0 : index_0 === 1 ? 40 : void 0,
|
|
144
|
+
showStickyBorder: index_0 === 1,
|
|
145
|
+
className: index_0 === 0 ? "w-9 min-w-9 px-1.5" : "",
|
|
146
|
+
style: getColumnSizeStyle(column_1.width),
|
|
147
|
+
children: /* @__PURE__ */ jsx(Skeleton, {
|
|
148
|
+
variant: "text",
|
|
149
|
+
className: column_1.header
|
|
150
|
+
})
|
|
151
|
+
}, index_0);
|
|
152
|
+
}
|
|
153
|
+
function _temp3(column_0, index) {
|
|
154
|
+
return /* @__PURE__ */ jsx("col", { style: { width: column_0.width } }, index);
|
|
155
|
+
}
|
|
156
|
+
function _temp2(total, column) {
|
|
157
|
+
return total + column.width;
|
|
55
158
|
}
|
|
56
159
|
function FormFieldSkeleton() {
|
|
57
160
|
const $ = c(1);
|
|
@@ -59,7 +162,10 @@ function FormFieldSkeleton() {
|
|
|
59
162
|
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
60
163
|
t0 = /* @__PURE__ */ jsxs("div", {
|
|
61
164
|
className: "space-y-2",
|
|
62
|
-
children: [/* @__PURE__ */ jsx(Skeleton, {
|
|
165
|
+
children: [/* @__PURE__ */ jsx(Skeleton, {
|
|
166
|
+
variant: "text",
|
|
167
|
+
className: "h-4 w-24"
|
|
168
|
+
}), /* @__PURE__ */ jsx(Skeleton, { className: "h-10 w-full" })]
|
|
63
169
|
});
|
|
64
170
|
$[0] = t0;
|
|
65
171
|
} else t0 = $[0];
|
|
@@ -71,65 +177,93 @@ function FormFieldSkeleton() {
|
|
|
71
177
|
* Shows a loading state that mimics the table layout.
|
|
72
178
|
*/
|
|
73
179
|
function TableViewSkeleton() {
|
|
74
|
-
const $ = c(
|
|
180
|
+
const $ = c(6);
|
|
75
181
|
let t0;
|
|
76
182
|
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
77
|
-
t0 = /* @__PURE__ */
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
className: "
|
|
81
|
-
|
|
82
|
-
|
|
183
|
+
t0 = /* @__PURE__ */ jsx(AdminViewHeader, {
|
|
184
|
+
title: /* @__PURE__ */ jsx(Skeleton, {
|
|
185
|
+
variant: "text",
|
|
186
|
+
className: "h-7 w-44"
|
|
187
|
+
}),
|
|
188
|
+
description: /* @__PURE__ */ jsx(Skeleton, {
|
|
189
|
+
variant: "text",
|
|
190
|
+
className: "h-4 w-64 max-w-full"
|
|
191
|
+
}),
|
|
192
|
+
actions: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
193
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "size-8" }),
|
|
194
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "size-8" }),
|
|
195
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-8 w-24" })
|
|
196
|
+
] })
|
|
83
197
|
});
|
|
84
198
|
$[0] = t0;
|
|
85
199
|
} else t0 = $[0];
|
|
86
200
|
let t1;
|
|
87
201
|
if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
|
|
88
|
-
t1 = /* @__PURE__ */
|
|
89
|
-
className: "
|
|
90
|
-
children:
|
|
91
|
-
/* @__PURE__ */ jsx(Skeleton, { className: "h-9 w-64" }),
|
|
92
|
-
/* @__PURE__ */ jsx(Skeleton, { className: "h-9 w-24" }),
|
|
93
|
-
/* @__PURE__ */ jsx(Skeleton, { className: "h-9 w-24" })
|
|
94
|
-
]
|
|
202
|
+
t1 = /* @__PURE__ */ jsx("span", {
|
|
203
|
+
className: "sr-only",
|
|
204
|
+
children: "Loading table view"
|
|
95
205
|
});
|
|
96
206
|
$[1] = t1;
|
|
97
207
|
} else t1 = $[1];
|
|
98
208
|
let t2;
|
|
99
209
|
if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
100
210
|
t2 = /* @__PURE__ */ jsx("div", {
|
|
101
|
-
className: "qa-table-
|
|
211
|
+
className: "qa-table-view__table-wrapper min-w-0",
|
|
212
|
+
children: /* @__PURE__ */ jsx(TableSkeletonShell, {})
|
|
213
|
+
});
|
|
214
|
+
$[2] = t2;
|
|
215
|
+
} else t2 = $[2];
|
|
216
|
+
let t3;
|
|
217
|
+
if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
|
|
218
|
+
t3 = /* @__PURE__ */ jsx(Skeleton, {
|
|
219
|
+
variant: "text",
|
|
220
|
+
className: "h-4 w-20"
|
|
221
|
+
});
|
|
222
|
+
$[3] = t3;
|
|
223
|
+
} else t3 = $[3];
|
|
224
|
+
let t4;
|
|
225
|
+
if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
|
|
226
|
+
t4 = /* @__PURE__ */ jsxs("div", {
|
|
227
|
+
className: "flex items-center gap-4",
|
|
228
|
+
children: [t3, /* @__PURE__ */ jsxs("div", {
|
|
229
|
+
className: "flex items-center gap-2",
|
|
230
|
+
children: [/* @__PURE__ */ jsx(Skeleton, {
|
|
231
|
+
variant: "text",
|
|
232
|
+
className: "h-4 w-10"
|
|
233
|
+
}), /* @__PURE__ */ jsx(Skeleton, { className: "h-8 w-[70px]" })]
|
|
234
|
+
})]
|
|
235
|
+
});
|
|
236
|
+
$[4] = t4;
|
|
237
|
+
} else t4 = $[4];
|
|
238
|
+
let t5;
|
|
239
|
+
if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
|
|
240
|
+
t5 = /* @__PURE__ */ jsx(AdminViewLayout, {
|
|
241
|
+
header: t0,
|
|
242
|
+
contentClassName: "overflow-y-auto pb-3",
|
|
102
243
|
children: /* @__PURE__ */ jsxs("div", {
|
|
103
|
-
className: "space-y-4",
|
|
244
|
+
className: "qa-table-view qa-table-view-skeleton min-w-0 space-y-4",
|
|
245
|
+
"aria-busy": "true",
|
|
104
246
|
children: [
|
|
105
|
-
t0,
|
|
106
247
|
t1,
|
|
248
|
+
t2,
|
|
107
249
|
/* @__PURE__ */ jsxs("div", {
|
|
108
|
-
className: "
|
|
109
|
-
children: [
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
]
|
|
119
|
-
}),
|
|
120
|
-
/* @__PURE__ */ jsx(TableSkeletonRow, {}),
|
|
121
|
-
/* @__PURE__ */ jsx(TableSkeletonRow, {}),
|
|
122
|
-
/* @__PURE__ */ jsx(TableSkeletonRow, {}),
|
|
123
|
-
/* @__PURE__ */ jsx(TableSkeletonRow, {}),
|
|
124
|
-
/* @__PURE__ */ jsx(TableSkeletonRow, { isLast: true })
|
|
125
|
-
]
|
|
250
|
+
className: "qa-table-view__pagination flex items-center justify-between gap-4 py-2",
|
|
251
|
+
children: [t4, /* @__PURE__ */ jsxs("div", {
|
|
252
|
+
className: "flex items-center gap-1",
|
|
253
|
+
children: [
|
|
254
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "size-8" }),
|
|
255
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "size-8" }),
|
|
256
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "size-8" }),
|
|
257
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "size-8" })
|
|
258
|
+
]
|
|
259
|
+
})]
|
|
126
260
|
})
|
|
127
261
|
]
|
|
128
262
|
})
|
|
129
263
|
});
|
|
130
|
-
$[
|
|
131
|
-
} else
|
|
132
|
-
return
|
|
264
|
+
$[5] = t5;
|
|
265
|
+
} else t5 = $[5];
|
|
266
|
+
return t5;
|
|
133
267
|
}
|
|
134
268
|
/**
|
|
135
269
|
* Skeleton for FormView
|
|
@@ -140,7 +274,10 @@ function FormViewSkeleton() {
|
|
|
140
274
|
const $ = c(8);
|
|
141
275
|
let t0;
|
|
142
276
|
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
143
|
-
t0 = /* @__PURE__ */ jsx(Skeleton, {
|
|
277
|
+
t0 = /* @__PURE__ */ jsx(Skeleton, {
|
|
278
|
+
variant: "text",
|
|
279
|
+
className: "h-8 w-8"
|
|
280
|
+
});
|
|
144
281
|
$[0] = t0;
|
|
145
282
|
} else t0 = $[0];
|
|
146
283
|
let t1;
|
|
@@ -150,7 +287,10 @@ function FormViewSkeleton() {
|
|
|
150
287
|
children: [
|
|
151
288
|
t0,
|
|
152
289
|
" ",
|
|
153
|
-
/* @__PURE__ */ jsx(Skeleton, {
|
|
290
|
+
/* @__PURE__ */ jsx(Skeleton, {
|
|
291
|
+
variant: "text",
|
|
292
|
+
className: "h-8 w-48"
|
|
293
|
+
})
|
|
154
294
|
]
|
|
155
295
|
});
|
|
156
296
|
$[1] = t1;
|
|
@@ -200,7 +340,10 @@ function FormViewSkeleton() {
|
|
|
200
340
|
t6,
|
|
201
341
|
/* @__PURE__ */ jsxs("div", {
|
|
202
342
|
className: "space-y-2",
|
|
203
|
-
children: [/* @__PURE__ */ jsx(Skeleton, {
|
|
343
|
+
children: [/* @__PURE__ */ jsx(Skeleton, {
|
|
344
|
+
variant: "text",
|
|
345
|
+
className: "h-4 w-32"
|
|
346
|
+
}), /* @__PURE__ */ jsx(Skeleton, { className: "h-32 w-full" })]
|
|
204
347
|
})
|
|
205
348
|
]
|
|
206
349
|
})]
|
|
@@ -3,6 +3,7 @@ import { cn } from "../../lib/utils.mjs";
|
|
|
3
3
|
import { selectBasePath, useAdminStore } from "../../runtime/provider.mjs";
|
|
4
4
|
import { resolveIconElement } from "../../components/component-renderer.mjs";
|
|
5
5
|
import { useAdminConfig } from "../../hooks/use-admin-config.mjs";
|
|
6
|
+
import { InputGroup, InputGroupAddon, InputGroupInput } from "../../components/ui/input-group.mjs";
|
|
6
7
|
import { ResponsiveDialog, ResponsiveDialogContent } from "../../components/ui/responsive-dialog.mjs";
|
|
7
8
|
import { Kbd } from "../../components/ui/kbd.mjs";
|
|
8
9
|
import { useDebouncedValue, useGlobalSearch } from "../../hooks/use-search.mjs";
|
|
@@ -53,7 +54,7 @@ function highlightText(text, query) {
|
|
|
53
54
|
if (parts.length === 1) return text;
|
|
54
55
|
return parts.map((part, i) => i % 2 === 1 ? React.createElement("mark", {
|
|
55
56
|
key: i,
|
|
56
|
-
className: "bg-
|
|
57
|
+
className: "bg-accent text-accent-foreground rounded-xs px-0.5"
|
|
57
58
|
}, part) : part);
|
|
58
59
|
}
|
|
59
60
|
/**
|
|
@@ -90,7 +91,7 @@ const SearchGroup = React.memo(function SearchGroup$1(t0) {
|
|
|
90
91
|
let t3;
|
|
91
92
|
if ($[3] !== t2) {
|
|
92
93
|
t3 = /* @__PURE__ */ jsx("h3", {
|
|
93
|
-
className: "text-muted-foreground mb-2 px-2
|
|
94
|
+
className: "qa-global-search__group-title text-muted-foreground font-chrome chrome-meta mb-2 px-2.5 text-xs font-medium",
|
|
94
95
|
children: t2
|
|
95
96
|
});
|
|
96
97
|
$[3] = t2;
|
|
@@ -102,11 +103,13 @@ const SearchGroup = React.memo(function SearchGroup$1(t0) {
|
|
|
102
103
|
if ($[13] !== onHover || $[14] !== onSelect || $[15] !== query || $[16] !== resolveText || $[17] !== selectedIndex || $[18] !== startIndex) {
|
|
103
104
|
t5$1 = (item, idx) => {
|
|
104
105
|
const globalIndex = startIndex + idx;
|
|
106
|
+
const isSelected = globalIndex === selectedIndex;
|
|
105
107
|
return /* @__PURE__ */ jsxs("button", {
|
|
106
108
|
type: "button",
|
|
107
109
|
onClick: () => onSelect(item),
|
|
108
110
|
onMouseEnter: () => onHover(globalIndex),
|
|
109
|
-
|
|
111
|
+
"data-selected": isSelected,
|
|
112
|
+
className: cn("item-surface flex w-full items-center gap-3 border-transparent px-3 py-2.5 text-sm transition-colors outline-none", isSelected ? "border-border bg-accent text-accent-foreground" : "hover:border-border hover:bg-accent hover:text-accent-foreground"),
|
|
110
113
|
children: [item.icon && /* @__PURE__ */ jsx("span", {
|
|
111
114
|
className: "text-muted-foreground flex h-4 w-4 shrink-0 items-center justify-center",
|
|
112
115
|
children: resolveIconElement(item.icon, { className: "h-4 w-4" })
|
|
@@ -450,9 +453,13 @@ function GlobalSearch(t0) {
|
|
|
450
453
|
} else t16 = $[55];
|
|
451
454
|
let t17;
|
|
452
455
|
if ($[56] === Symbol.for("react.memo_cache_sentinel")) {
|
|
453
|
-
t17 = /* @__PURE__ */ jsx(
|
|
454
|
-
|
|
455
|
-
className: "
|
|
456
|
+
t17 = /* @__PURE__ */ jsx(InputGroupAddon, {
|
|
457
|
+
align: "inline-start",
|
|
458
|
+
className: "pl-0",
|
|
459
|
+
children: /* @__PURE__ */ jsx(Icon, {
|
|
460
|
+
icon: "ph:magnifying-glass",
|
|
461
|
+
className: "size-5"
|
|
462
|
+
})
|
|
456
463
|
});
|
|
457
464
|
$[56] = t17;
|
|
458
465
|
} else t17 = $[56];
|
|
@@ -472,9 +479,9 @@ function GlobalSearch(t0) {
|
|
|
472
479
|
} else t19 = $[59];
|
|
473
480
|
let t20;
|
|
474
481
|
if ($[60] !== handleKeyDown || $[61] !== query || $[62] !== t18) {
|
|
475
|
-
t20 = /* @__PURE__ */ jsx(
|
|
482
|
+
t20 = /* @__PURE__ */ jsx(InputGroupInput, {
|
|
476
483
|
ref: inputRef,
|
|
477
|
-
className: "
|
|
484
|
+
className: "h-12 px-0 text-base",
|
|
478
485
|
placeholder: t18,
|
|
479
486
|
value: query,
|
|
480
487
|
onChange: t19,
|
|
@@ -489,7 +496,7 @@ function GlobalSearch(t0) {
|
|
|
489
496
|
if ($[64] !== isSearching) {
|
|
490
497
|
t21 = isSearching && /* @__PURE__ */ jsx(Icon, {
|
|
491
498
|
icon: "ph:spinner",
|
|
492
|
-
className: "
|
|
499
|
+
className: "size-4 animate-spin"
|
|
493
500
|
});
|
|
494
501
|
$[64] = isSearching;
|
|
495
502
|
$[65] = t21;
|
|
@@ -501,8 +508,9 @@ function GlobalSearch(t0) {
|
|
|
501
508
|
} else t22 = $[66];
|
|
502
509
|
let t23;
|
|
503
510
|
if ($[67] !== t21) {
|
|
504
|
-
t23 = /* @__PURE__ */ jsxs(
|
|
505
|
-
|
|
511
|
+
t23 = /* @__PURE__ */ jsxs(InputGroupAddon, {
|
|
512
|
+
align: "inline-end",
|
|
513
|
+
className: "gap-2 pr-0",
|
|
506
514
|
children: [t21, t22]
|
|
507
515
|
});
|
|
508
516
|
$[67] = t21;
|
|
@@ -510,13 +518,16 @@ function GlobalSearch(t0) {
|
|
|
510
518
|
} else t23 = $[68];
|
|
511
519
|
let t24;
|
|
512
520
|
if ($[69] !== t20 || $[70] !== t23) {
|
|
513
|
-
t24 = /* @__PURE__ */
|
|
514
|
-
className: "qa-global-search__input-area
|
|
515
|
-
children:
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
521
|
+
t24 = /* @__PURE__ */ jsx("div", {
|
|
522
|
+
className: "qa-global-search__input-area border-border-subtle bg-popover border-b p-3",
|
|
523
|
+
children: /* @__PURE__ */ jsxs(InputGroup, {
|
|
524
|
+
className: "h-12 border-transparent bg-transparent focus-within:border-transparent focus-within:ring-0 hover:border-transparent",
|
|
525
|
+
children: [
|
|
526
|
+
t17,
|
|
527
|
+
t20,
|
|
528
|
+
t23
|
|
529
|
+
]
|
|
530
|
+
})
|
|
520
531
|
});
|
|
521
532
|
$[69] = t20;
|
|
522
533
|
$[70] = t23;
|