@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,7 +1,8 @@
|
|
|
1
|
-
import { useResolveText } from "../../i18n/hooks.mjs";
|
|
1
|
+
import { useResolveText, useTranslation } from "../../i18n/hooks.mjs";
|
|
2
2
|
import { cn, formatLabel } from "../../lib/utils.mjs";
|
|
3
3
|
import { resolveIconElement } from "../component-renderer.mjs";
|
|
4
4
|
import { WidgetCard } from "../../views/dashboard/widget-card.mjs";
|
|
5
|
+
import { WidgetEmptyState } from "./widget-empty-state.mjs";
|
|
5
6
|
import { c } from "react/compiler-runtime";
|
|
6
7
|
import { Icon } from "@iconify/react";
|
|
7
8
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -20,189 +21,280 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
20
21
|
* of other dashboard widgets like recent-items.
|
|
21
22
|
*/
|
|
22
23
|
function QuickActionsWidget(t0) {
|
|
23
|
-
const $ = c(
|
|
24
|
+
const $ = c(66);
|
|
24
25
|
const { config, basePath: t1, navigate } = t0;
|
|
25
26
|
const basePath = t1 === void 0 ? "/admin" : t1;
|
|
26
27
|
const resolveText = useResolveText();
|
|
27
|
-
const {
|
|
28
|
+
const { t } = useTranslation();
|
|
29
|
+
const { layout: t2 } = config;
|
|
28
30
|
const layout = t2 === void 0 ? "list" : t2;
|
|
29
|
-
let t3;
|
|
30
|
-
if ($[0] !== config.title || $[1] !== resolveText) {
|
|
31
|
-
t3 = config.title ? resolveText(config.title) : "Quick Actions";
|
|
32
|
-
$[0] = config.title;
|
|
33
|
-
$[1] = resolveText;
|
|
34
|
-
$[2] = t3;
|
|
35
|
-
} else t3 = $[2];
|
|
36
|
-
const title = t3;
|
|
37
31
|
let T0;
|
|
32
|
+
let t3;
|
|
38
33
|
let t4;
|
|
39
34
|
let t5;
|
|
40
35
|
let t6;
|
|
41
36
|
let t7;
|
|
42
|
-
|
|
43
|
-
|
|
37
|
+
let t8;
|
|
38
|
+
let t9;
|
|
39
|
+
if ($[0] !== basePath || $[1] !== config.actions || $[2] !== config.cardVariant || $[3] !== config.className || $[4] !== config.description || $[5] !== config.label || $[6] !== config.quickActions || $[7] !== config.title || $[8] !== layout || $[9] !== navigate || $[10] !== resolveText || $[11] !== t) {
|
|
40
|
+
t9 = Symbol.for("react.early_return_sentinel");
|
|
44
41
|
bb0: {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
42
|
+
const quickActions = config.quickActions ?? config.actions ?? [];
|
|
43
|
+
let t10$1;
|
|
44
|
+
if ($[20] !== config.label || $[21] !== config.title || $[22] !== resolveText || $[23] !== t) {
|
|
45
|
+
t10$1 = config.title ? resolveText(config.title) : config.label ? resolveText(config.label) : t("dashboard.quickActions");
|
|
46
|
+
$[20] = config.label;
|
|
47
|
+
$[21] = config.title;
|
|
48
|
+
$[22] = resolveText;
|
|
49
|
+
$[23] = t;
|
|
50
|
+
$[24] = t10$1;
|
|
51
|
+
} else t10$1 = $[24];
|
|
52
|
+
const title = t10$1;
|
|
53
|
+
let t11$1;
|
|
54
|
+
if ($[25] !== basePath) {
|
|
55
|
+
t11$1 = (action, fallback) => {
|
|
56
|
+
if (!action) return fallback;
|
|
57
|
+
if (action.type === "create") return `${basePath}/collections/${action.collection}/create`;
|
|
58
|
+
if (action.type === "page") return `${basePath}/${action.pageId}`;
|
|
59
|
+
return action.href;
|
|
60
|
+
};
|
|
61
|
+
$[25] = basePath;
|
|
62
|
+
$[26] = t11$1;
|
|
63
|
+
} else t11$1 = $[26];
|
|
64
|
+
const resolveActionHref = t11$1;
|
|
65
|
+
let t12;
|
|
66
|
+
if ($[27] !== basePath || $[28] !== resolveActionHref || $[29] !== resolveText || $[30] !== t) {
|
|
67
|
+
t12 = (action_0, index) => {
|
|
68
|
+
if (typeof action_0 === "string") {
|
|
69
|
+
const [collection, actionType] = action_0.split(".");
|
|
50
70
|
return {
|
|
51
|
-
id: `${
|
|
52
|
-
label:
|
|
71
|
+
id: `${action_0}-${index}`,
|
|
72
|
+
label: actionType === "create" ? t("collection.new", { name: formatLabel(collection) }) : `${actionType} ${formatLabel(collection)}`,
|
|
53
73
|
href: `${basePath}/collections/${collection}/${actionType === "create" ? "create" : ""}`,
|
|
54
74
|
icon: void 0,
|
|
55
75
|
variant: "default"
|
|
56
76
|
};
|
|
57
77
|
}
|
|
78
|
+
const serverAction = "action" in action_0 ? action_0.action : void 0;
|
|
58
79
|
return {
|
|
59
80
|
id: `action-${index}`,
|
|
60
|
-
label: resolveText(
|
|
61
|
-
href:
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
81
|
+
label: resolveText(action_0.label),
|
|
82
|
+
href: resolveActionHref(serverAction, action_0.href),
|
|
83
|
+
external: serverAction?.type === "link" ? serverAction.external : false,
|
|
84
|
+
onClick: action_0.onClick,
|
|
85
|
+
icon: action_0.icon,
|
|
86
|
+
variant: action_0.variant || "default"
|
|
65
87
|
};
|
|
66
88
|
};
|
|
67
|
-
$[
|
|
68
|
-
$[
|
|
69
|
-
$[
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
89
|
+
$[27] = basePath;
|
|
90
|
+
$[28] = resolveActionHref;
|
|
91
|
+
$[29] = resolveText;
|
|
92
|
+
$[30] = t;
|
|
93
|
+
$[31] = t12;
|
|
94
|
+
} else t12 = $[31];
|
|
95
|
+
const parsedActions = quickActions.map(t12);
|
|
96
|
+
let t13;
|
|
97
|
+
if ($[32] !== navigate) {
|
|
98
|
+
t13 = (action_1) => {
|
|
99
|
+
if (action_1.onClick) action_1.onClick();
|
|
100
|
+
else if (action_1.href && action_1.external) window.open(action_1.href, "_blank", "noopener,noreferrer");
|
|
101
|
+
else if (action_1.href && navigate) navigate(action_1.href);
|
|
77
102
|
};
|
|
78
|
-
$[
|
|
79
|
-
$[
|
|
80
|
-
} else
|
|
81
|
-
const handleClick =
|
|
103
|
+
$[32] = navigate;
|
|
104
|
+
$[33] = t13;
|
|
105
|
+
} else t13 = $[33];
|
|
106
|
+
const handleClick = t13;
|
|
82
107
|
const variantStyles = {
|
|
83
|
-
default: "hover:bg-
|
|
84
|
-
primary: "
|
|
85
|
-
secondary: "hover:bg-secondary cursor-pointer",
|
|
86
|
-
outline: "border
|
|
108
|
+
default: "border-border-subtle bg-surface-low/60 hover:border-border hover:bg-surface-high cursor-pointer",
|
|
109
|
+
primary: "border-primary/30 bg-primary/10 text-foreground hover:border-primary/45 hover:bg-primary/15 [&_svg]:text-primary cursor-pointer",
|
|
110
|
+
secondary: "border-border-subtle bg-secondary/60 hover:bg-secondary cursor-pointer",
|
|
111
|
+
outline: "border-border bg-background hover:bg-muted cursor-pointer"
|
|
87
112
|
};
|
|
88
113
|
const iconVariantStyles = {
|
|
89
114
|
default: "bg-muted text-muted-foreground",
|
|
90
|
-
primary: "bg-primary/
|
|
115
|
+
primary: "bg-primary/15 text-primary",
|
|
91
116
|
secondary: "bg-secondary text-secondary-foreground",
|
|
92
117
|
outline: "bg-background text-muted-foreground"
|
|
93
118
|
};
|
|
94
119
|
if (parsedActions.length === 0) {
|
|
95
|
-
let
|
|
96
|
-
if ($[
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
120
|
+
let t14;
|
|
121
|
+
if ($[34] !== config.description || $[35] !== resolveText) {
|
|
122
|
+
t14 = config.description ? resolveText(config.description) : void 0;
|
|
123
|
+
$[34] = config.description;
|
|
124
|
+
$[35] = resolveText;
|
|
125
|
+
$[36] = t14;
|
|
126
|
+
} else t14 = $[36];
|
|
127
|
+
const t15 = config.cardVariant;
|
|
128
|
+
const t16 = config.className;
|
|
129
|
+
let t17;
|
|
130
|
+
if ($[37] !== t) {
|
|
131
|
+
t17 = t("widget.quickActions.emptyTitle");
|
|
132
|
+
$[37] = t;
|
|
133
|
+
$[38] = t17;
|
|
134
|
+
} else t17 = $[38];
|
|
135
|
+
let t18;
|
|
136
|
+
if ($[39] !== t) {
|
|
137
|
+
t18 = t("widget.quickActions.emptyDescription");
|
|
138
|
+
$[39] = t;
|
|
139
|
+
$[40] = t18;
|
|
140
|
+
} else t18 = $[40];
|
|
141
|
+
let t19;
|
|
142
|
+
if ($[41] !== t17 || $[42] !== t18) {
|
|
143
|
+
t19 = /* @__PURE__ */ jsx(WidgetEmptyState, {
|
|
144
|
+
iconName: "ph:lightning",
|
|
145
|
+
title: t17,
|
|
146
|
+
description: t18
|
|
100
147
|
});
|
|
101
|
-
$[
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
148
|
+
$[41] = t17;
|
|
149
|
+
$[42] = t18;
|
|
150
|
+
$[43] = t19;
|
|
151
|
+
} else t19 = $[43];
|
|
152
|
+
let t20;
|
|
153
|
+
if ($[44] !== config.cardVariant || $[45] !== config.className || $[46] !== t14 || $[47] !== t19 || $[48] !== title) {
|
|
154
|
+
t20 = /* @__PURE__ */ jsx(WidgetCard, {
|
|
106
155
|
title,
|
|
107
|
-
|
|
156
|
+
description: t14,
|
|
157
|
+
variant: t15,
|
|
158
|
+
className: t16,
|
|
159
|
+
children: t19
|
|
108
160
|
});
|
|
109
|
-
$[
|
|
110
|
-
$[
|
|
111
|
-
|
|
112
|
-
|
|
161
|
+
$[44] = config.cardVariant;
|
|
162
|
+
$[45] = config.className;
|
|
163
|
+
$[46] = t14;
|
|
164
|
+
$[47] = t19;
|
|
165
|
+
$[48] = title;
|
|
166
|
+
$[49] = t20;
|
|
167
|
+
} else t20 = $[49];
|
|
168
|
+
t9 = t20;
|
|
113
169
|
break bb0;
|
|
114
170
|
}
|
|
115
171
|
if (layout === "grid") {
|
|
116
|
-
|
|
172
|
+
let t14;
|
|
173
|
+
if ($[50] !== config.description || $[51] !== resolveText) {
|
|
174
|
+
t14 = config.description ? resolveText(config.description) : void 0;
|
|
175
|
+
$[50] = config.description;
|
|
176
|
+
$[51] = resolveText;
|
|
177
|
+
$[52] = t14;
|
|
178
|
+
} else t14 = $[52];
|
|
179
|
+
t9 = /* @__PURE__ */ jsx(WidgetCard, {
|
|
117
180
|
title,
|
|
181
|
+
description: t14,
|
|
182
|
+
variant: config.cardVariant,
|
|
183
|
+
className: config.className,
|
|
118
184
|
children: /* @__PURE__ */ jsx("div", {
|
|
119
|
-
className: "grid grid-cols-2 gap-
|
|
120
|
-
children: parsedActions.map((
|
|
121
|
-
const iconElement = resolveIconElement(
|
|
185
|
+
className: "grid h-full grid-cols-2 gap-3",
|
|
186
|
+
children: parsedActions.map((action_2) => {
|
|
187
|
+
const iconElement = resolveIconElement(action_2.icon, { className: "h-4 w-4" });
|
|
122
188
|
return /* @__PURE__ */ jsxs("button", {
|
|
123
189
|
type: "button",
|
|
124
|
-
onClick: () => handleClick(
|
|
125
|
-
className: cn("flex flex-col items-center justify-center gap-2 p-3 text-center transition-
|
|
190
|
+
onClick: () => handleClick(action_2),
|
|
191
|
+
className: cn("flex min-h-24 flex-col items-center justify-center gap-2 rounded-md border p-3 text-center", "transition-[background-color,border-color,transform] active:scale-[0.96]", variantStyles[action_2.variant]),
|
|
126
192
|
children: [iconElement && /* @__PURE__ */ jsx("div", {
|
|
127
|
-
className: cn("flex h-9 w-9 items-center justify-center", iconVariantStyles[
|
|
193
|
+
className: cn("flex h-9 w-9 items-center justify-center rounded-md", iconVariantStyles[action_2.variant]),
|
|
128
194
|
children: iconElement
|
|
129
195
|
}), /* @__PURE__ */ jsx("span", {
|
|
130
|
-
className: "text-xs font-medium",
|
|
131
|
-
children:
|
|
196
|
+
className: "text-xs leading-tight font-medium text-balance",
|
|
197
|
+
children: action_2.label
|
|
132
198
|
})]
|
|
133
|
-
},
|
|
199
|
+
}, action_2.id);
|
|
134
200
|
})
|
|
135
201
|
})
|
|
136
202
|
});
|
|
137
203
|
break bb0;
|
|
138
204
|
}
|
|
139
205
|
T0 = WidgetCard;
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
206
|
+
t5 = title;
|
|
207
|
+
if ($[53] !== config.description || $[54] !== resolveText) {
|
|
208
|
+
t6 = config.description ? resolveText(config.description) : void 0;
|
|
209
|
+
$[53] = config.description;
|
|
210
|
+
$[54] = resolveText;
|
|
211
|
+
$[55] = t6;
|
|
212
|
+
} else t6 = $[55];
|
|
213
|
+
t7 = config.cardVariant;
|
|
214
|
+
t8 = config.className;
|
|
215
|
+
t3 = "-mx-1 space-y-1";
|
|
216
|
+
t4 = parsedActions.map((action_3) => {
|
|
217
|
+
const iconElement_0 = resolveIconElement(action_3.icon, { className: "h-4 w-4" });
|
|
144
218
|
return /* @__PURE__ */ jsxs("button", {
|
|
145
219
|
type: "button",
|
|
146
|
-
onClick: () => handleClick(
|
|
147
|
-
className: cn("flex w-full items-center gap-3 px-2 py-2 text-left transition-
|
|
220
|
+
onClick: () => handleClick(action_3),
|
|
221
|
+
className: cn("group flex min-h-10 w-full items-center gap-3 rounded-md px-2 py-2 text-left transition-[background-color,transform] active:scale-[0.96]", variantStyles[action_3.variant]),
|
|
148
222
|
children: [
|
|
149
223
|
iconElement_0 && /* @__PURE__ */ jsx("div", {
|
|
150
|
-
className: cn("flex h-8 w-8 shrink-0 items-center justify-center", iconVariantStyles[
|
|
224
|
+
className: cn("flex h-8 w-8 shrink-0 items-center justify-center rounded-md", iconVariantStyles[action_3.variant]),
|
|
151
225
|
children: iconElement_0
|
|
152
226
|
}),
|
|
153
227
|
/* @__PURE__ */ jsx("span", {
|
|
154
228
|
className: "flex-1 truncate text-sm font-medium",
|
|
155
|
-
children:
|
|
229
|
+
children: action_3.label
|
|
156
230
|
}),
|
|
157
231
|
/* @__PURE__ */ jsx(Icon, {
|
|
158
232
|
icon: "ph:arrow-right",
|
|
159
233
|
className: "text-muted-foreground h-4 w-4 opacity-0 transition-opacity group-hover:opacity-100"
|
|
160
234
|
})
|
|
161
235
|
]
|
|
162
|
-
},
|
|
236
|
+
}, action_3.id);
|
|
163
237
|
});
|
|
164
238
|
}
|
|
165
|
-
$[
|
|
166
|
-
$[
|
|
167
|
-
$[
|
|
168
|
-
$[
|
|
169
|
-
$[
|
|
170
|
-
$[
|
|
171
|
-
$[
|
|
172
|
-
$[
|
|
173
|
-
$[
|
|
174
|
-
$[
|
|
175
|
-
$[
|
|
239
|
+
$[0] = basePath;
|
|
240
|
+
$[1] = config.actions;
|
|
241
|
+
$[2] = config.cardVariant;
|
|
242
|
+
$[3] = config.className;
|
|
243
|
+
$[4] = config.description;
|
|
244
|
+
$[5] = config.label;
|
|
245
|
+
$[6] = config.quickActions;
|
|
246
|
+
$[7] = config.title;
|
|
247
|
+
$[8] = layout;
|
|
248
|
+
$[9] = navigate;
|
|
249
|
+
$[10] = resolveText;
|
|
250
|
+
$[11] = t;
|
|
251
|
+
$[12] = T0;
|
|
252
|
+
$[13] = t3;
|
|
253
|
+
$[14] = t4;
|
|
254
|
+
$[15] = t5;
|
|
255
|
+
$[16] = t6;
|
|
256
|
+
$[17] = t7;
|
|
257
|
+
$[18] = t8;
|
|
258
|
+
$[19] = t9;
|
|
176
259
|
} else {
|
|
177
|
-
T0 = $[
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
260
|
+
T0 = $[12];
|
|
261
|
+
t3 = $[13];
|
|
262
|
+
t4 = $[14];
|
|
263
|
+
t5 = $[15];
|
|
264
|
+
t6 = $[16];
|
|
265
|
+
t7 = $[17];
|
|
266
|
+
t8 = $[18];
|
|
267
|
+
t9 = $[19];
|
|
182
268
|
}
|
|
183
|
-
if (
|
|
184
|
-
let
|
|
185
|
-
if ($[
|
|
186
|
-
|
|
187
|
-
className:
|
|
188
|
-
children:
|
|
269
|
+
if (t9 !== Symbol.for("react.early_return_sentinel")) return t9;
|
|
270
|
+
let t10;
|
|
271
|
+
if ($[56] !== t3 || $[57] !== t4) {
|
|
272
|
+
t10 = /* @__PURE__ */ jsx("div", {
|
|
273
|
+
className: t3,
|
|
274
|
+
children: t4
|
|
189
275
|
});
|
|
190
|
-
$[
|
|
191
|
-
$[
|
|
192
|
-
$[
|
|
193
|
-
} else
|
|
194
|
-
let
|
|
195
|
-
if ($[
|
|
196
|
-
|
|
197
|
-
title:
|
|
198
|
-
|
|
276
|
+
$[56] = t3;
|
|
277
|
+
$[57] = t4;
|
|
278
|
+
$[58] = t10;
|
|
279
|
+
} else t10 = $[58];
|
|
280
|
+
let t11;
|
|
281
|
+
if ($[59] !== T0 || $[60] !== t10 || $[61] !== t5 || $[62] !== t6 || $[63] !== t7 || $[64] !== t8) {
|
|
282
|
+
t11 = /* @__PURE__ */ jsx(T0, {
|
|
283
|
+
title: t5,
|
|
284
|
+
description: t6,
|
|
285
|
+
variant: t7,
|
|
286
|
+
className: t8,
|
|
287
|
+
children: t10
|
|
199
288
|
});
|
|
200
|
-
$[
|
|
201
|
-
$[
|
|
202
|
-
$[
|
|
203
|
-
$[
|
|
204
|
-
|
|
205
|
-
|
|
289
|
+
$[59] = T0;
|
|
290
|
+
$[60] = t10;
|
|
291
|
+
$[61] = t5;
|
|
292
|
+
$[62] = t6;
|
|
293
|
+
$[63] = t7;
|
|
294
|
+
$[64] = t8;
|
|
295
|
+
$[65] = t11;
|
|
296
|
+
} else t11 = $[65];
|
|
297
|
+
return t11;
|
|
206
298
|
}
|
|
207
299
|
|
|
208
300
|
//#endregion
|