@questpie/admin 3.0.2 → 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 +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 +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 +64 -64
- 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 +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 +25 -25
- package/dist/server/modules/audit/.generated/module.d.mts +7 -7
- package/dist/server/modules/audit/.generated/module.mjs +1 -1
- package/dist/server/modules/audit/collections/audit-log.d.mts +39 -39
- 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
|
@@ -29,16 +29,16 @@ function ChartWidgetSkeleton() {
|
|
|
29
29
|
t0 = /* @__PURE__ */ jsxs("div", {
|
|
30
30
|
className: "flex h-48 w-full items-end gap-2 pt-4",
|
|
31
31
|
children: [
|
|
32
|
-
/* @__PURE__ */ jsx(Skeleton, { className: "h-[40%] flex-1 rounded-t" }),
|
|
33
|
-
/* @__PURE__ */ jsx(Skeleton, { className: "h-[65%] flex-1 rounded-t" }),
|
|
34
|
-
/* @__PURE__ */ jsx(Skeleton, { className: "h-[45%] flex-1 rounded-t" }),
|
|
35
|
-
/* @__PURE__ */ jsx(Skeleton, { className: "h-[80%] flex-1 rounded-t" }),
|
|
36
|
-
/* @__PURE__ */ jsx(Skeleton, { className: "h-[55%] flex-1 rounded-t" }),
|
|
37
|
-
/* @__PURE__ */ jsx(Skeleton, { className: "h-[70%] flex-1 rounded-t" }),
|
|
38
|
-
/* @__PURE__ */ jsx(Skeleton, { className: "h-[50%] flex-1 rounded-t" }),
|
|
39
|
-
/* @__PURE__ */ jsx(Skeleton, { className: "h-[75%] flex-1 rounded-t" }),
|
|
40
|
-
/* @__PURE__ */ jsx(Skeleton, { className: "h-[60%] flex-1 rounded-t" }),
|
|
41
|
-
/* @__PURE__ */ jsx(Skeleton, { className: "h-[85%] flex-1 rounded-t" })
|
|
32
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-[40%] flex-1 rounded-t-sm" }),
|
|
33
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-[65%] flex-1 rounded-t-sm" }),
|
|
34
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-[45%] flex-1 rounded-t-sm" }),
|
|
35
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-[80%] flex-1 rounded-t-sm" }),
|
|
36
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-[55%] flex-1 rounded-t-sm" }),
|
|
37
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-[70%] flex-1 rounded-t-sm" }),
|
|
38
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-[50%] flex-1 rounded-t-sm" }),
|
|
39
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-[75%] flex-1 rounded-t-sm" }),
|
|
40
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-[60%] flex-1 rounded-t-sm" }),
|
|
41
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-[85%] flex-1 rounded-t-sm" })
|
|
42
42
|
]
|
|
43
43
|
});
|
|
44
44
|
$[0] = t0;
|
|
@@ -120,18 +120,27 @@ function TableWidgetSkeleton(t0) {
|
|
|
120
120
|
const columns = t2 === void 0 ? 3 : t2;
|
|
121
121
|
let t3;
|
|
122
122
|
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
123
|
-
t3 = /* @__PURE__ */ jsx(Skeleton, {
|
|
123
|
+
t3 = /* @__PURE__ */ jsx(Skeleton, {
|
|
124
|
+
variant: "text",
|
|
125
|
+
className: "h-4 w-24"
|
|
126
|
+
});
|
|
124
127
|
$[0] = t3;
|
|
125
128
|
} else t3 = $[0];
|
|
126
129
|
let t4;
|
|
127
130
|
if ($[1] !== columns) {
|
|
128
|
-
t4 = columns > 1 && /* @__PURE__ */ jsx(Skeleton, {
|
|
131
|
+
t4 = columns > 1 && /* @__PURE__ */ jsx(Skeleton, {
|
|
132
|
+
variant: "text",
|
|
133
|
+
className: "h-4 flex-1"
|
|
134
|
+
});
|
|
129
135
|
$[1] = columns;
|
|
130
136
|
$[2] = t4;
|
|
131
137
|
} else t4 = $[2];
|
|
132
138
|
let t5;
|
|
133
139
|
if ($[3] !== columns) {
|
|
134
|
-
t5 = columns > 2 && /* @__PURE__ */ jsx(Skeleton, {
|
|
140
|
+
t5 = columns > 2 && /* @__PURE__ */ jsx(Skeleton, {
|
|
141
|
+
variant: "text",
|
|
142
|
+
className: "h-4 flex-1"
|
|
143
|
+
});
|
|
135
144
|
$[3] = columns;
|
|
136
145
|
$[4] = t5;
|
|
137
146
|
} else t5 = $[4];
|
|
@@ -222,18 +231,27 @@ function TableSkeletonRow(t0) {
|
|
|
222
231
|
} else t4 = $[1];
|
|
223
232
|
let t5;
|
|
224
233
|
if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
225
|
-
t5 = /* @__PURE__ */ jsx(Skeleton, {
|
|
234
|
+
t5 = /* @__PURE__ */ jsx(Skeleton, {
|
|
235
|
+
variant: "text",
|
|
236
|
+
className: "h-4 w-20"
|
|
237
|
+
});
|
|
226
238
|
$[2] = t5;
|
|
227
239
|
} else t5 = $[2];
|
|
228
240
|
let t6;
|
|
229
241
|
if ($[3] !== columns) {
|
|
230
|
-
t6 = columns > 1 && /* @__PURE__ */ jsx(Skeleton, {
|
|
242
|
+
t6 = columns > 1 && /* @__PURE__ */ jsx(Skeleton, {
|
|
243
|
+
variant: "text",
|
|
244
|
+
className: "h-4 flex-1"
|
|
245
|
+
});
|
|
231
246
|
$[3] = columns;
|
|
232
247
|
$[4] = t6;
|
|
233
248
|
} else t6 = $[4];
|
|
234
249
|
let t7;
|
|
235
250
|
if ($[5] !== columns) {
|
|
236
|
-
t7 = columns > 2 && /* @__PURE__ */ jsx(Skeleton, {
|
|
251
|
+
t7 = columns > 2 && /* @__PURE__ */ jsx(Skeleton, {
|
|
252
|
+
variant: "text",
|
|
253
|
+
className: "h-4 flex-1"
|
|
254
|
+
});
|
|
237
255
|
$[5] = columns;
|
|
238
256
|
$[6] = t7;
|
|
239
257
|
} else t7 = $[6];
|
|
@@ -313,7 +331,10 @@ function TimelineSkeletonItem(t0) {
|
|
|
313
331
|
const last = t1 === void 0 ? false : t1;
|
|
314
332
|
let t2;
|
|
315
333
|
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
316
|
-
t2 = /* @__PURE__ */ jsx(Skeleton, {
|
|
334
|
+
t2 = /* @__PURE__ */ jsx(Skeleton, {
|
|
335
|
+
variant: "avatar",
|
|
336
|
+
className: "h-3 w-3"
|
|
337
|
+
});
|
|
317
338
|
$[0] = t2;
|
|
318
339
|
} else t2 = $[0];
|
|
319
340
|
let t3;
|
|
@@ -363,10 +384,22 @@ function ProgressWidgetSkeleton() {
|
|
|
363
384
|
children: [
|
|
364
385
|
/* @__PURE__ */ jsxs("div", {
|
|
365
386
|
className: "flex items-center justify-between",
|
|
366
|
-
children: [/* @__PURE__ */ jsx(Skeleton, {
|
|
387
|
+
children: [/* @__PURE__ */ jsx(Skeleton, {
|
|
388
|
+
variant: "text",
|
|
389
|
+
className: "h-4 w-32"
|
|
390
|
+
}), /* @__PURE__ */ jsx(Skeleton, {
|
|
391
|
+
variant: "text",
|
|
392
|
+
className: "h-4 w-12"
|
|
393
|
+
})]
|
|
394
|
+
}),
|
|
395
|
+
/* @__PURE__ */ jsx(Skeleton, {
|
|
396
|
+
variant: "chip",
|
|
397
|
+
className: "h-2 w-full"
|
|
367
398
|
}),
|
|
368
|
-
/* @__PURE__ */ jsx(Skeleton, {
|
|
369
|
-
|
|
399
|
+
/* @__PURE__ */ jsx(Skeleton, {
|
|
400
|
+
variant: "text",
|
|
401
|
+
className: "h-3 w-24"
|
|
402
|
+
})
|
|
370
403
|
]
|
|
371
404
|
});
|
|
372
405
|
$[0] = t0;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime16 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/client/contexts/focus-context.d.ts
|
|
5
5
|
|
|
@@ -48,7 +48,7 @@ type FocusProviderProps = {
|
|
|
48
48
|
declare function FocusProvider({
|
|
49
49
|
children,
|
|
50
50
|
onFocusChange
|
|
51
|
-
}: FocusProviderProps):
|
|
51
|
+
}: FocusProviderProps): react_jsx_runtime16.JSX.Element;
|
|
52
52
|
/**
|
|
53
53
|
* Use the focus context
|
|
54
54
|
*/
|
|
@@ -221,7 +221,7 @@ function useActionHelpers(t0) {
|
|
|
221
221
|
*/
|
|
222
222
|
function _temp() {}
|
|
223
223
|
function useActions(t0) {
|
|
224
|
-
const $ = c(
|
|
224
|
+
const $ = c(25);
|
|
225
225
|
const { collection, actionsConfig, onRefresh } = t0;
|
|
226
226
|
const [dialogAction, setDialogAction] = React.useState(null);
|
|
227
227
|
const [dialogItem, setDialogItem] = React.useState(null);
|
|
@@ -233,7 +233,7 @@ function useActions(t0) {
|
|
|
233
233
|
const defaultActions = t1;
|
|
234
234
|
let t2;
|
|
235
235
|
if ($[1] !== actionsConfig) {
|
|
236
|
-
t2 = actionsConfig?.header
|
|
236
|
+
t2 = actionsConfig?.header !== void 0 ? actionsConfig.header : defaultActions.header ?? {
|
|
237
237
|
primary: [],
|
|
238
238
|
secondary: []
|
|
239
239
|
};
|
|
@@ -241,72 +241,80 @@ function useActions(t0) {
|
|
|
241
241
|
$[2] = t2;
|
|
242
242
|
} else t2 = $[2];
|
|
243
243
|
let t3;
|
|
244
|
-
if ($[3] !== actionsConfig) {
|
|
245
|
-
t3 = actionsConfig?.
|
|
246
|
-
$[3] = actionsConfig;
|
|
244
|
+
if ($[3] !== actionsConfig?.row) {
|
|
245
|
+
t3 = actionsConfig?.row ?? [];
|
|
246
|
+
$[3] = actionsConfig?.row;
|
|
247
247
|
$[4] = t3;
|
|
248
248
|
} else t3 = $[4];
|
|
249
249
|
let t4;
|
|
250
|
-
if ($[5] !==
|
|
251
|
-
t4 =
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
$[5] = t2;
|
|
256
|
-
$[6] = t3;
|
|
257
|
-
$[7] = t4;
|
|
258
|
-
} else t4 = $[7];
|
|
259
|
-
const actions = t4;
|
|
250
|
+
if ($[5] !== actionsConfig) {
|
|
251
|
+
t4 = actionsConfig?.bulk !== void 0 ? actionsConfig.bulk : defaultActions.bulk ?? [];
|
|
252
|
+
$[5] = actionsConfig;
|
|
253
|
+
$[6] = t4;
|
|
254
|
+
} else t4 = $[6];
|
|
260
255
|
let t5;
|
|
261
|
-
if ($[8]
|
|
262
|
-
t5 =
|
|
263
|
-
|
|
264
|
-
|
|
256
|
+
if ($[7] !== t2 || $[8] !== t3 || $[9] !== t4) {
|
|
257
|
+
t5 = {
|
|
258
|
+
header: t2,
|
|
259
|
+
row: t3,
|
|
260
|
+
bulk: t4
|
|
265
261
|
};
|
|
266
|
-
$[
|
|
267
|
-
|
|
268
|
-
|
|
262
|
+
$[7] = t2;
|
|
263
|
+
$[8] = t3;
|
|
264
|
+
$[9] = t4;
|
|
265
|
+
$[10] = t5;
|
|
266
|
+
} else t5 = $[10];
|
|
267
|
+
const actions = t5;
|
|
269
268
|
let t6;
|
|
270
|
-
if ($[
|
|
269
|
+
if ($[11] === Symbol.for("react.memo_cache_sentinel")) {
|
|
271
270
|
t6 = () => {
|
|
272
|
-
|
|
271
|
+
setDialogAction(null);
|
|
272
|
+
setDialogItem(null);
|
|
273
273
|
};
|
|
274
|
-
$[
|
|
275
|
-
|
|
276
|
-
|
|
274
|
+
$[11] = t6;
|
|
275
|
+
} else t6 = $[11];
|
|
276
|
+
const closeDialog = t6;
|
|
277
277
|
let t7;
|
|
278
|
-
if ($[
|
|
279
|
-
t7 = {
|
|
280
|
-
|
|
281
|
-
onRefresh: t6
|
|
278
|
+
if ($[12] !== onRefresh) {
|
|
279
|
+
t7 = () => {
|
|
280
|
+
onRefresh?.();
|
|
282
281
|
};
|
|
283
|
-
$[
|
|
284
|
-
$[12] = t6;
|
|
282
|
+
$[12] = onRefresh;
|
|
285
283
|
$[13] = t7;
|
|
286
284
|
} else t7 = $[13];
|
|
287
|
-
const { helpers: baseHelpers } = useActionHelpers(t7);
|
|
288
285
|
let t8;
|
|
289
|
-
if ($[14] !==
|
|
286
|
+
if ($[14] !== collection || $[15] !== t7) {
|
|
290
287
|
t8 = {
|
|
288
|
+
collection,
|
|
289
|
+
onRefresh: t7
|
|
290
|
+
};
|
|
291
|
+
$[14] = collection;
|
|
292
|
+
$[15] = t7;
|
|
293
|
+
$[16] = t8;
|
|
294
|
+
} else t8 = $[16];
|
|
295
|
+
const { helpers: baseHelpers } = useActionHelpers(t8);
|
|
296
|
+
let t9;
|
|
297
|
+
if ($[17] !== baseHelpers) {
|
|
298
|
+
t9 = {
|
|
291
299
|
...baseHelpers,
|
|
292
300
|
closeDialog
|
|
293
301
|
};
|
|
294
|
-
$[
|
|
295
|
-
$[
|
|
296
|
-
} else
|
|
297
|
-
const helpers =
|
|
298
|
-
let
|
|
299
|
-
if ($[
|
|
300
|
-
|
|
302
|
+
$[17] = baseHelpers;
|
|
303
|
+
$[18] = t9;
|
|
304
|
+
} else t9 = $[18];
|
|
305
|
+
const helpers = t9;
|
|
306
|
+
let t10;
|
|
307
|
+
if ($[19] === Symbol.for("react.memo_cache_sentinel")) {
|
|
308
|
+
t10 = (action, item) => {
|
|
301
309
|
setDialogAction(action);
|
|
302
310
|
setDialogItem(item ?? null);
|
|
303
311
|
};
|
|
304
|
-
$[
|
|
305
|
-
} else
|
|
306
|
-
const openDialog =
|
|
307
|
-
let
|
|
308
|
-
if ($[
|
|
309
|
-
|
|
312
|
+
$[19] = t10;
|
|
313
|
+
} else t10 = $[19];
|
|
314
|
+
const openDialog = t10;
|
|
315
|
+
let t11;
|
|
316
|
+
if ($[20] !== actions || $[21] !== dialogAction || $[22] !== dialogItem || $[23] !== helpers) {
|
|
317
|
+
t11 = {
|
|
310
318
|
helpers,
|
|
311
319
|
actions,
|
|
312
320
|
dialogAction,
|
|
@@ -316,13 +324,13 @@ function useActions(t0) {
|
|
|
316
324
|
openDialog,
|
|
317
325
|
closeDialog
|
|
318
326
|
};
|
|
319
|
-
$[
|
|
320
|
-
$[
|
|
321
|
-
$[
|
|
322
|
-
$[
|
|
323
|
-
$[
|
|
324
|
-
} else
|
|
325
|
-
return
|
|
327
|
+
$[20] = actions;
|
|
328
|
+
$[21] = dialogAction;
|
|
329
|
+
$[22] = dialogItem;
|
|
330
|
+
$[23] = helpers;
|
|
331
|
+
$[24] = t11;
|
|
332
|
+
} else t11 = $[24];
|
|
333
|
+
return t11;
|
|
326
334
|
}
|
|
327
335
|
|
|
328
336
|
//#endregion
|
|
@@ -31,70 +31,6 @@ function useAuditFetcher(path) {
|
|
|
31
31
|
} else t1 = $[4];
|
|
32
32
|
return t1;
|
|
33
33
|
}
|
|
34
|
-
function useCollectionAuditHistory(collection, id, options, queryOptions) {
|
|
35
|
-
const $ = c(17);
|
|
36
|
-
let t0;
|
|
37
|
-
let t1;
|
|
38
|
-
let t2;
|
|
39
|
-
if ($[0] !== collection || $[1] !== id || $[2] !== options) {
|
|
40
|
-
const params = new URLSearchParams();
|
|
41
|
-
if (options?.limit) params.set("limit", String(options.limit));
|
|
42
|
-
t0 = collection;
|
|
43
|
-
t1 = id;
|
|
44
|
-
t2 = params.toString() ? `?${params}` : "";
|
|
45
|
-
$[0] = collection;
|
|
46
|
-
$[1] = id;
|
|
47
|
-
$[2] = options;
|
|
48
|
-
$[3] = t0;
|
|
49
|
-
$[4] = t1;
|
|
50
|
-
$[5] = t2;
|
|
51
|
-
} else {
|
|
52
|
-
t0 = $[3];
|
|
53
|
-
t1 = $[4];
|
|
54
|
-
t2 = $[5];
|
|
55
|
-
}
|
|
56
|
-
const fetchAudit = useAuditFetcher(`/${t0}/${t1}/audit${t2}`);
|
|
57
|
-
let t3;
|
|
58
|
-
if ($[6] !== collection || $[7] !== id || $[8] !== options) {
|
|
59
|
-
t3 = [
|
|
60
|
-
"questpie",
|
|
61
|
-
"audit",
|
|
62
|
-
"collection",
|
|
63
|
-
collection,
|
|
64
|
-
id,
|
|
65
|
-
options
|
|
66
|
-
];
|
|
67
|
-
$[6] = collection;
|
|
68
|
-
$[7] = id;
|
|
69
|
-
$[8] = options;
|
|
70
|
-
$[9] = t3;
|
|
71
|
-
} else t3 = $[9];
|
|
72
|
-
let t4;
|
|
73
|
-
if ($[10] !== fetchAudit) {
|
|
74
|
-
t4 = (t5$1) => {
|
|
75
|
-
const { signal } = t5$1;
|
|
76
|
-
return fetchAudit(signal);
|
|
77
|
-
};
|
|
78
|
-
$[10] = fetchAudit;
|
|
79
|
-
$[11] = t4;
|
|
80
|
-
} else t4 = $[11];
|
|
81
|
-
const t5 = !!collection && !!id && (queryOptions?.enabled ?? true);
|
|
82
|
-
let t6;
|
|
83
|
-
if ($[12] !== queryOptions || $[13] !== t3 || $[14] !== t4 || $[15] !== t5) {
|
|
84
|
-
t6 = {
|
|
85
|
-
queryKey: t3,
|
|
86
|
-
queryFn: t4,
|
|
87
|
-
enabled: t5,
|
|
88
|
-
...queryOptions
|
|
89
|
-
};
|
|
90
|
-
$[12] = queryOptions;
|
|
91
|
-
$[13] = t3;
|
|
92
|
-
$[14] = t4;
|
|
93
|
-
$[15] = t5;
|
|
94
|
-
$[16] = t6;
|
|
95
|
-
} else t6 = $[16];
|
|
96
|
-
return useQuery(t6);
|
|
97
|
-
}
|
|
98
34
|
function useGlobalAuditHistory(globalName, options, queryOptions) {
|
|
99
35
|
const $ = c(14);
|
|
100
36
|
let t0;
|
|
@@ -154,4 +90,4 @@ function useGlobalAuditHistory(globalName, options, queryOptions) {
|
|
|
154
90
|
}
|
|
155
91
|
|
|
156
92
|
//#endregion
|
|
157
|
-
export {
|
|
93
|
+
export { useGlobalAuditHistory };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createFormSchema } from "../builder/validation.mjs";
|
|
2
|
-
import { useCollectionFields } from "./use-collection-fields.mjs";
|
|
3
2
|
import { useValidationErrorMap } from "./use-validation-error-map.mjs";
|
|
3
|
+
import { useCollectionFields } from "./use-collection-fields.mjs";
|
|
4
4
|
import { c } from "react/compiler-runtime";
|
|
5
5
|
|
|
6
6
|
//#region src/client/hooks/use-collection-validation.ts
|
|
@@ -26,28 +26,41 @@ import { c } from "react/compiler-runtime";
|
|
|
26
26
|
* }
|
|
27
27
|
* ```
|
|
28
28
|
*/
|
|
29
|
-
function useCollectionValidation(collection) {
|
|
30
|
-
const $ = c(
|
|
31
|
-
|
|
32
|
-
|
|
29
|
+
function useCollectionValidation(collection, t0) {
|
|
30
|
+
const $ = c(9);
|
|
31
|
+
let t1;
|
|
32
|
+
if ($[0] !== t0) {
|
|
33
|
+
t1 = t0 === void 0 ? {} : t0;
|
|
34
|
+
$[0] = t0;
|
|
35
|
+
$[1] = t1;
|
|
36
|
+
} else t1 = $[1];
|
|
37
|
+
const enabled = t1.enabled ?? true;
|
|
38
|
+
let t2;
|
|
39
|
+
if ($[2] !== enabled) {
|
|
40
|
+
t2 = { schemaQueryOptions: { enabled } };
|
|
41
|
+
$[2] = enabled;
|
|
42
|
+
$[3] = t2;
|
|
43
|
+
} else t2 = $[3];
|
|
44
|
+
const { fields } = useCollectionFields(collection, t2);
|
|
45
|
+
let t3;
|
|
33
46
|
bb0: {
|
|
34
|
-
if (!fields || Object.keys(fields).length === 0) {
|
|
35
|
-
|
|
47
|
+
if (!enabled || !fields || Object.keys(fields).length === 0) {
|
|
48
|
+
t3 = void 0;
|
|
36
49
|
break bb0;
|
|
37
50
|
}
|
|
38
|
-
let
|
|
39
|
-
if ($[
|
|
40
|
-
|
|
41
|
-
$[
|
|
42
|
-
$[
|
|
43
|
-
} else
|
|
44
|
-
|
|
51
|
+
let t4$1;
|
|
52
|
+
if ($[4] !== fields) {
|
|
53
|
+
t4$1 = createFormSchema(fields);
|
|
54
|
+
$[4] = fields;
|
|
55
|
+
$[5] = t4$1;
|
|
56
|
+
} else t4$1 = $[5];
|
|
57
|
+
t3 = t4$1;
|
|
45
58
|
}
|
|
46
|
-
const schema =
|
|
59
|
+
const schema = t3;
|
|
47
60
|
const errorMap = useValidationErrorMap();
|
|
48
|
-
let
|
|
49
|
-
if ($[
|
|
50
|
-
|
|
61
|
+
let t4;
|
|
62
|
+
if ($[6] !== errorMap || $[7] !== schema) {
|
|
63
|
+
t4 = async (values, _context, _options) => {
|
|
51
64
|
if (!schema) return {
|
|
52
65
|
values,
|
|
53
66
|
errors: {}
|
|
@@ -62,11 +75,11 @@ function useCollectionValidation(collection) {
|
|
|
62
75
|
errors: zodErrorToFieldErrors(result.error, errorMap)
|
|
63
76
|
};
|
|
64
77
|
};
|
|
65
|
-
$[
|
|
66
|
-
$[
|
|
67
|
-
$[
|
|
68
|
-
} else
|
|
69
|
-
return schema ?
|
|
78
|
+
$[6] = errorMap;
|
|
79
|
+
$[7] = schema;
|
|
80
|
+
$[8] = t4;
|
|
81
|
+
} else t4 = $[8];
|
|
82
|
+
return enabled && schema ? t4 : void 0;
|
|
70
83
|
}
|
|
71
84
|
/**
|
|
72
85
|
* Convert Zod error to react-hook-form FieldErrors format with i18n support
|
|
@@ -324,6 +324,101 @@ function useCollectionUpdate(collection, mutationOptions) {
|
|
|
324
324
|
return useMutation(t7);
|
|
325
325
|
}
|
|
326
326
|
/**
|
|
327
|
+
* Hook to update multiple collection items with distinct data per record.
|
|
328
|
+
*/
|
|
329
|
+
function useCollectionUpdateBatch(collection, mutationOptions) {
|
|
330
|
+
const $ = c(29);
|
|
331
|
+
const { client, queryOpts, queryClient, locale } = useQuestpieQueryOptions();
|
|
332
|
+
let t0;
|
|
333
|
+
if ($[0] !== collection || $[1] !== locale || $[2] !== queryOpts) {
|
|
334
|
+
t0 = queryOpts.key([
|
|
335
|
+
"collections",
|
|
336
|
+
collection,
|
|
337
|
+
"find",
|
|
338
|
+
locale
|
|
339
|
+
]);
|
|
340
|
+
$[0] = collection;
|
|
341
|
+
$[1] = locale;
|
|
342
|
+
$[2] = queryOpts;
|
|
343
|
+
$[3] = t0;
|
|
344
|
+
} else t0 = $[3];
|
|
345
|
+
const listQueryKey = t0;
|
|
346
|
+
let t1;
|
|
347
|
+
if ($[4] !== collection || $[5] !== locale || $[6] !== queryOpts) {
|
|
348
|
+
t1 = queryOpts.key([
|
|
349
|
+
"collections",
|
|
350
|
+
collection,
|
|
351
|
+
"count",
|
|
352
|
+
locale
|
|
353
|
+
]);
|
|
354
|
+
$[4] = collection;
|
|
355
|
+
$[5] = locale;
|
|
356
|
+
$[6] = queryOpts;
|
|
357
|
+
$[7] = t1;
|
|
358
|
+
} else t1 = $[7];
|
|
359
|
+
const countQueryKey = t1;
|
|
360
|
+
let t2;
|
|
361
|
+
if ($[8] !== collection || $[9] !== locale || $[10] !== queryOpts) {
|
|
362
|
+
t2 = queryOpts.key([
|
|
363
|
+
"collections",
|
|
364
|
+
collection,
|
|
365
|
+
"findOne",
|
|
366
|
+
locale
|
|
367
|
+
]);
|
|
368
|
+
$[8] = collection;
|
|
369
|
+
$[9] = locale;
|
|
370
|
+
$[10] = queryOpts;
|
|
371
|
+
$[11] = t2;
|
|
372
|
+
} else t2 = $[11];
|
|
373
|
+
const itemQueryKey = t2;
|
|
374
|
+
let t3;
|
|
375
|
+
if ($[12] !== client || $[13] !== collection || $[14] !== locale) {
|
|
376
|
+
t3 = (params) => client.collections[collection].updateBatch(params, { locale });
|
|
377
|
+
$[12] = client;
|
|
378
|
+
$[13] = collection;
|
|
379
|
+
$[14] = locale;
|
|
380
|
+
$[15] = t3;
|
|
381
|
+
} else t3 = $[15];
|
|
382
|
+
let t4;
|
|
383
|
+
if ($[16] !== mutationOptions?.onSuccess) {
|
|
384
|
+
t4 = (data, variables, context) => {
|
|
385
|
+
(mutationOptions?.onSuccess)?.(data, variables, context);
|
|
386
|
+
};
|
|
387
|
+
$[16] = mutationOptions?.onSuccess;
|
|
388
|
+
$[17] = t4;
|
|
389
|
+
} else t4 = $[17];
|
|
390
|
+
let t5;
|
|
391
|
+
if ($[18] !== countQueryKey || $[19] !== itemQueryKey || $[20] !== listQueryKey || $[21] !== mutationOptions?.onSettled || $[22] !== queryClient) {
|
|
392
|
+
t5 = (data_0, error, variables_0, context_0) => {
|
|
393
|
+
queryClient.invalidateQueries({ queryKey: listQueryKey });
|
|
394
|
+
queryClient.invalidateQueries({ queryKey: countQueryKey });
|
|
395
|
+
queryClient.invalidateQueries({ queryKey: itemQueryKey });
|
|
396
|
+
(mutationOptions?.onSettled)?.(data_0, error, variables_0, context_0);
|
|
397
|
+
};
|
|
398
|
+
$[18] = countQueryKey;
|
|
399
|
+
$[19] = itemQueryKey;
|
|
400
|
+
$[20] = listQueryKey;
|
|
401
|
+
$[21] = mutationOptions?.onSettled;
|
|
402
|
+
$[22] = queryClient;
|
|
403
|
+
$[23] = t5;
|
|
404
|
+
} else t5 = $[23];
|
|
405
|
+
let t6;
|
|
406
|
+
if ($[24] !== mutationOptions || $[25] !== t3 || $[26] !== t4 || $[27] !== t5) {
|
|
407
|
+
t6 = {
|
|
408
|
+
mutationFn: t3,
|
|
409
|
+
onSuccess: t4,
|
|
410
|
+
onSettled: t5,
|
|
411
|
+
...mutationOptions
|
|
412
|
+
};
|
|
413
|
+
$[24] = mutationOptions;
|
|
414
|
+
$[25] = t3;
|
|
415
|
+
$[26] = t4;
|
|
416
|
+
$[27] = t5;
|
|
417
|
+
$[28] = t6;
|
|
418
|
+
} else t6 = $[28];
|
|
419
|
+
return useMutation(t6);
|
|
420
|
+
}
|
|
421
|
+
/**
|
|
327
422
|
* Hook to delete collection item
|
|
328
423
|
*
|
|
329
424
|
* Uses RegisteredCMS from module augmentation for automatic type inference.
|
|
@@ -670,4 +765,4 @@ function useCollectionRevertVersion(collection, mutationOptions) {
|
|
|
670
765
|
}
|
|
671
766
|
|
|
672
767
|
//#endregion
|
|
673
|
-
export { useCollectionCount, useCollectionCreate, useCollectionDelete, useCollectionItem, useCollectionList, useCollectionRestore, useCollectionRevertVersion, useCollectionUpdate, useCollectionVersions };
|
|
768
|
+
export { useCollectionCount, useCollectionCreate, useCollectionDelete, useCollectionItem, useCollectionList, useCollectionRestore, useCollectionRevertVersion, useCollectionUpdate, useCollectionUpdateBatch, useCollectionVersions };
|