@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
|
@@ -22,7 +22,7 @@ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
|
22
22
|
* Opens detail sheet on click
|
|
23
23
|
*/
|
|
24
24
|
function RelationCell(t0) {
|
|
25
|
-
const $ = c(
|
|
25
|
+
const $ = c(59);
|
|
26
26
|
const { value, fieldDef } = t0;
|
|
27
27
|
const resolveText = useResolveText();
|
|
28
28
|
let t1;
|
|
@@ -50,109 +50,121 @@ function RelationCell(t0) {
|
|
|
50
50
|
$[2] = t2;
|
|
51
51
|
} else t2 = $[2];
|
|
52
52
|
const handleChipClick = t2;
|
|
53
|
+
let t3;
|
|
54
|
+
if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
|
|
55
|
+
t3 = (open) => {
|
|
56
|
+
setSheetOpen(open);
|
|
57
|
+
if (!open) {
|
|
58
|
+
setSheetItemId(void 0);
|
|
59
|
+
setSheetCollection(void 0);
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
$[3] = t3;
|
|
63
|
+
} else t3 = $[3];
|
|
64
|
+
const handleSheetOpenChange = t3;
|
|
53
65
|
if (value === null || value === void 0) {
|
|
54
|
-
let
|
|
55
|
-
if ($[
|
|
56
|
-
|
|
66
|
+
let t4$1;
|
|
67
|
+
if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
|
|
68
|
+
t4$1 = /* @__PURE__ */ jsx("span", {
|
|
57
69
|
className: "text-muted-foreground",
|
|
58
70
|
children: "-"
|
|
59
71
|
});
|
|
60
|
-
$[
|
|
61
|
-
} else
|
|
62
|
-
return
|
|
72
|
+
$[4] = t4$1;
|
|
73
|
+
} else t4$1 = $[4];
|
|
74
|
+
return t4$1;
|
|
63
75
|
}
|
|
64
76
|
if (Array.isArray(value)) {
|
|
65
77
|
if (value.length === 0) {
|
|
66
|
-
let
|
|
67
|
-
if ($[
|
|
68
|
-
|
|
78
|
+
let t4$2;
|
|
79
|
+
if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
|
|
80
|
+
t4$2 = /* @__PURE__ */ jsx("span", {
|
|
69
81
|
className: "text-muted-foreground",
|
|
70
82
|
children: "-"
|
|
71
83
|
});
|
|
72
|
-
$[
|
|
73
|
-
} else
|
|
74
|
-
return
|
|
84
|
+
$[5] = t4$2;
|
|
85
|
+
} else t4$2 = $[5];
|
|
86
|
+
return t4$2;
|
|
75
87
|
}
|
|
76
88
|
let T0;
|
|
77
89
|
let T1;
|
|
78
90
|
let remainingCount;
|
|
79
|
-
let t3$1;
|
|
80
91
|
let t4$1;
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
92
|
+
let t5$1;
|
|
93
|
+
if ($[6] !== avatarField || $[7] !== labelField || $[8] !== showAvatar || $[9] !== targetCollection || $[10] !== value) {
|
|
94
|
+
const visibleItems = value.slice(0, 2);
|
|
95
|
+
remainingCount = value.length - 2;
|
|
84
96
|
T1 = Tooltip;
|
|
85
97
|
T0 = TooltipTrigger;
|
|
86
|
-
|
|
87
|
-
let
|
|
88
|
-
if ($[
|
|
89
|
-
|
|
98
|
+
t4$1 = "inline-flex max-w-[260px] flex-nowrap items-center gap-1 overflow-hidden";
|
|
99
|
+
let t6$2;
|
|
100
|
+
if ($[16] !== avatarField || $[17] !== labelField || $[18] !== showAvatar || $[19] !== targetCollection) {
|
|
101
|
+
t6$2 = (item) => {
|
|
90
102
|
const itemId_0 = getRelationItemId(item);
|
|
91
103
|
return /* @__PURE__ */ jsx(RelationChip, {
|
|
92
104
|
item,
|
|
93
105
|
targetCollection,
|
|
94
106
|
onClick: handleChipClick,
|
|
95
|
-
className: "shrink-0",
|
|
107
|
+
className: "max-w-28 shrink-0",
|
|
96
108
|
showAvatar,
|
|
97
109
|
avatarField,
|
|
98
110
|
labelField
|
|
99
111
|
}, itemId_0 ?? String(item));
|
|
100
112
|
};
|
|
101
|
-
$[
|
|
102
|
-
$[
|
|
103
|
-
$[
|
|
104
|
-
$[
|
|
105
|
-
$[
|
|
106
|
-
} else
|
|
107
|
-
|
|
108
|
-
$[
|
|
109
|
-
$[
|
|
110
|
-
$[
|
|
111
|
-
$[
|
|
112
|
-
$[
|
|
113
|
-
$[
|
|
114
|
-
$[
|
|
115
|
-
$[
|
|
116
|
-
$[13] = t3$1;
|
|
113
|
+
$[16] = avatarField;
|
|
114
|
+
$[17] = labelField;
|
|
115
|
+
$[18] = showAvatar;
|
|
116
|
+
$[19] = targetCollection;
|
|
117
|
+
$[20] = t6$2;
|
|
118
|
+
} else t6$2 = $[20];
|
|
119
|
+
t5$1 = visibleItems.map(t6$2);
|
|
120
|
+
$[6] = avatarField;
|
|
121
|
+
$[7] = labelField;
|
|
122
|
+
$[8] = showAvatar;
|
|
123
|
+
$[9] = targetCollection;
|
|
124
|
+
$[10] = value;
|
|
125
|
+
$[11] = T0;
|
|
126
|
+
$[12] = T1;
|
|
127
|
+
$[13] = remainingCount;
|
|
117
128
|
$[14] = t4$1;
|
|
129
|
+
$[15] = t5$1;
|
|
118
130
|
} else {
|
|
119
|
-
T0 = $[
|
|
120
|
-
T1 = $[
|
|
121
|
-
remainingCount = $[
|
|
122
|
-
t3$1 = $[13];
|
|
131
|
+
T0 = $[11];
|
|
132
|
+
T1 = $[12];
|
|
133
|
+
remainingCount = $[13];
|
|
123
134
|
t4$1 = $[14];
|
|
135
|
+
t5$1 = $[15];
|
|
124
136
|
}
|
|
125
|
-
let
|
|
126
|
-
if ($[
|
|
127
|
-
|
|
128
|
-
variant: "
|
|
137
|
+
let t6$1;
|
|
138
|
+
if ($[21] !== remainingCount) {
|
|
139
|
+
t6$1 = remainingCount > 0 && /* @__PURE__ */ jsxs(Badge, {
|
|
140
|
+
variant: "outline",
|
|
129
141
|
className: "h-5 shrink-0 px-1.5 text-[10px]",
|
|
130
142
|
children: ["+", remainingCount]
|
|
131
143
|
});
|
|
132
|
-
$[
|
|
133
|
-
$[
|
|
134
|
-
} else
|
|
135
|
-
let
|
|
136
|
-
if ($[
|
|
137
|
-
|
|
138
|
-
className:
|
|
139
|
-
children: [
|
|
144
|
+
$[21] = remainingCount;
|
|
145
|
+
$[22] = t6$1;
|
|
146
|
+
} else t6$1 = $[22];
|
|
147
|
+
let t7;
|
|
148
|
+
if ($[23] !== t4$1 || $[24] !== t5$1 || $[25] !== t6$1) {
|
|
149
|
+
t7 = /* @__PURE__ */ jsxs("span", {
|
|
150
|
+
className: t4$1,
|
|
151
|
+
children: [t5$1, t6$1]
|
|
140
152
|
});
|
|
141
|
-
$[22] = t3$1;
|
|
142
153
|
$[23] = t4$1;
|
|
143
154
|
$[24] = t5$1;
|
|
144
|
-
$[25] = t6;
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
if ($[26] !== T0 || $[27] !== t6) {
|
|
148
|
-
t7 = /* @__PURE__ */ jsx(T0, { render: t6 });
|
|
149
|
-
$[26] = T0;
|
|
150
|
-
$[27] = t6;
|
|
151
|
-
$[28] = t7;
|
|
152
|
-
} else t7 = $[28];
|
|
155
|
+
$[25] = t6$1;
|
|
156
|
+
$[26] = t7;
|
|
157
|
+
} else t7 = $[26];
|
|
153
158
|
let t8;
|
|
154
|
-
if ($[
|
|
155
|
-
t8 =
|
|
159
|
+
if ($[27] !== T0 || $[28] !== t7) {
|
|
160
|
+
t8 = /* @__PURE__ */ jsx(T0, { render: t7 });
|
|
161
|
+
$[27] = T0;
|
|
162
|
+
$[28] = t7;
|
|
163
|
+
$[29] = t8;
|
|
164
|
+
} else t8 = $[29];
|
|
165
|
+
let t9;
|
|
166
|
+
if ($[30] !== labelField || $[31] !== resolveText || $[32] !== targetCollection || $[33] !== value) {
|
|
167
|
+
t9 = value.length > 3 && /* @__PURE__ */ jsx(TooltipContent, {
|
|
156
168
|
side: "bottom",
|
|
157
169
|
align: "start",
|
|
158
170
|
className: "w-56 p-0",
|
|
@@ -163,61 +175,67 @@ function RelationCell(t0) {
|
|
|
163
175
|
const id = getRelationItemId(item_0);
|
|
164
176
|
const canNavigate = targetCollection && id;
|
|
165
177
|
const key = id ?? label ?? `item-${idx}`;
|
|
166
|
-
return /* @__PURE__ */ jsxs("
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
className: "
|
|
178
|
+
return canNavigate ? /* @__PURE__ */ jsxs("button", {
|
|
179
|
+
type: "button",
|
|
180
|
+
onClick: (e) => {
|
|
181
|
+
e.stopPropagation();
|
|
182
|
+
handleChipClick(id, targetCollection);
|
|
183
|
+
},
|
|
184
|
+
className: "item-surface border-border hover:bg-accent hover:text-accent-foreground flex w-full items-center gap-2 px-2 py-1.5 text-left text-sm",
|
|
185
|
+
children: [/* @__PURE__ */ jsx("span", { className: "bg-muted-foreground/50 size-1.5 shrink-0 rounded-full" }), /* @__PURE__ */ jsx("span", {
|
|
186
|
+
className: "truncate",
|
|
187
|
+
children: label
|
|
188
|
+
})]
|
|
189
|
+
}, key) : /* @__PURE__ */ jsxs("div", {
|
|
190
|
+
className: "item-surface border-border flex w-full items-center gap-2 px-2 py-1.5 text-sm",
|
|
191
|
+
children: [/* @__PURE__ */ jsx("span", { className: "bg-muted-foreground/50 size-1.5 shrink-0 rounded-full" }), /* @__PURE__ */ jsx("span", {
|
|
192
|
+
className: "truncate",
|
|
175
193
|
children: label
|
|
176
|
-
})
|
|
194
|
+
})]
|
|
177
195
|
}, key);
|
|
178
196
|
})
|
|
179
197
|
})
|
|
180
198
|
});
|
|
181
|
-
$[
|
|
182
|
-
$[
|
|
183
|
-
$[
|
|
184
|
-
$[
|
|
185
|
-
$[
|
|
186
|
-
} else
|
|
187
|
-
let
|
|
188
|
-
if ($[
|
|
189
|
-
|
|
190
|
-
$[
|
|
191
|
-
$[35] = t7;
|
|
199
|
+
$[30] = labelField;
|
|
200
|
+
$[31] = resolveText;
|
|
201
|
+
$[32] = targetCollection;
|
|
202
|
+
$[33] = value;
|
|
203
|
+
$[34] = t9;
|
|
204
|
+
} else t9 = $[34];
|
|
205
|
+
let t10;
|
|
206
|
+
if ($[35] !== T1 || $[36] !== t8 || $[37] !== t9) {
|
|
207
|
+
t10 = /* @__PURE__ */ jsxs(T1, { children: [t8, t9] });
|
|
208
|
+
$[35] = T1;
|
|
192
209
|
$[36] = t8;
|
|
193
210
|
$[37] = t9;
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
211
|
+
$[38] = t10;
|
|
212
|
+
} else t10 = $[38];
|
|
213
|
+
let t11;
|
|
214
|
+
if ($[39] !== sheetCollection || $[40] !== sheetItemId || $[41] !== sheetOpen) {
|
|
215
|
+
t11 = sheetCollection && sheetItemId && /* @__PURE__ */ jsx(ResourceSheet, {
|
|
198
216
|
type: "collection",
|
|
199
217
|
collection: sheetCollection,
|
|
200
218
|
itemId: sheetItemId,
|
|
201
219
|
open: sheetOpen,
|
|
202
|
-
onOpenChange:
|
|
220
|
+
onOpenChange: handleSheetOpenChange
|
|
203
221
|
});
|
|
204
|
-
$[
|
|
205
|
-
$[
|
|
206
|
-
$[
|
|
207
|
-
$[
|
|
208
|
-
} else
|
|
209
|
-
let
|
|
210
|
-
if ($[
|
|
211
|
-
|
|
212
|
-
$[
|
|
213
|
-
$[43] = t9;
|
|
222
|
+
$[39] = sheetCollection;
|
|
223
|
+
$[40] = sheetItemId;
|
|
224
|
+
$[41] = sheetOpen;
|
|
225
|
+
$[42] = t11;
|
|
226
|
+
} else t11 = $[42];
|
|
227
|
+
let t12;
|
|
228
|
+
if ($[43] !== t10 || $[44] !== t11) {
|
|
229
|
+
t12 = /* @__PURE__ */ jsxs(Fragment, { children: [t10, t11] });
|
|
230
|
+
$[43] = t10;
|
|
214
231
|
$[44] = t11;
|
|
215
|
-
|
|
216
|
-
|
|
232
|
+
$[45] = t12;
|
|
233
|
+
} else t12 = $[45];
|
|
234
|
+
return t12;
|
|
217
235
|
}
|
|
218
|
-
let
|
|
219
|
-
if ($[
|
|
220
|
-
|
|
236
|
+
let t4;
|
|
237
|
+
if ($[46] !== avatarField || $[47] !== labelField || $[48] !== showAvatar || $[49] !== targetCollection || $[50] !== value) {
|
|
238
|
+
t4 = /* @__PURE__ */ jsx(RelationChip, {
|
|
221
239
|
item: value,
|
|
222
240
|
targetCollection,
|
|
223
241
|
onClick: handleChipClick,
|
|
@@ -225,35 +243,35 @@ function RelationCell(t0) {
|
|
|
225
243
|
avatarField,
|
|
226
244
|
labelField
|
|
227
245
|
});
|
|
228
|
-
$[
|
|
229
|
-
$[
|
|
230
|
-
$[
|
|
231
|
-
$[
|
|
232
|
-
$[
|
|
233
|
-
$[
|
|
234
|
-
} else
|
|
235
|
-
let
|
|
236
|
-
if ($[
|
|
237
|
-
|
|
246
|
+
$[46] = avatarField;
|
|
247
|
+
$[47] = labelField;
|
|
248
|
+
$[48] = showAvatar;
|
|
249
|
+
$[49] = targetCollection;
|
|
250
|
+
$[50] = value;
|
|
251
|
+
$[51] = t4;
|
|
252
|
+
} else t4 = $[51];
|
|
253
|
+
let t5;
|
|
254
|
+
if ($[52] !== sheetCollection || $[53] !== sheetItemId || $[54] !== sheetOpen) {
|
|
255
|
+
t5 = sheetCollection && sheetItemId && /* @__PURE__ */ jsx(ResourceSheet, {
|
|
238
256
|
type: "collection",
|
|
239
257
|
collection: sheetCollection,
|
|
240
258
|
itemId: sheetItemId,
|
|
241
259
|
open: sheetOpen,
|
|
242
|
-
onOpenChange:
|
|
260
|
+
onOpenChange: handleSheetOpenChange
|
|
243
261
|
});
|
|
244
|
-
$[
|
|
245
|
-
$[
|
|
246
|
-
$[
|
|
247
|
-
$[
|
|
248
|
-
} else
|
|
249
|
-
let
|
|
250
|
-
if ($[
|
|
251
|
-
|
|
252
|
-
$[55] = t3;
|
|
262
|
+
$[52] = sheetCollection;
|
|
263
|
+
$[53] = sheetItemId;
|
|
264
|
+
$[54] = sheetOpen;
|
|
265
|
+
$[55] = t5;
|
|
266
|
+
} else t5 = $[55];
|
|
267
|
+
let t6;
|
|
268
|
+
if ($[56] !== t4 || $[57] !== t5) {
|
|
269
|
+
t6 = /* @__PURE__ */ jsxs(Fragment, { children: [t4, t5] });
|
|
253
270
|
$[56] = t4;
|
|
254
271
|
$[57] = t5;
|
|
255
|
-
|
|
256
|
-
|
|
272
|
+
$[58] = t6;
|
|
273
|
+
} else t6 = $[58];
|
|
274
|
+
return t6;
|
|
257
275
|
}
|
|
258
276
|
|
|
259
277
|
//#endregion
|