@questpie/admin 3.0.3 → 3.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +34 -5
- package/dist/client/blocks/block-renderer.d.mts +2 -2
- package/dist/client/blocks/block-renderer.mjs +4 -1
- package/dist/client/builder/types/action-types.d.mts +31 -3
- package/dist/client/builder/types/collection-types.d.mts +140 -0
- package/dist/client/builder/types/ui-config.d.mts +16 -2
- package/dist/client/builder/types/views.d.mts +57 -0
- package/dist/client/builder/types/widget-types.d.mts +5 -0
- package/dist/client/components/actions/action-button.mjs +137 -199
- package/dist/client/components/actions/action-dialog.mjs +198 -156
- package/dist/client/components/actions/confirmation-dialog.mjs +2 -2
- package/dist/client/components/actions/header-actions.mjs +52 -53
- package/dist/client/components/admin-link.d.mts +2 -2
- package/dist/client/components/auth/auth-loading.mjs +41 -18
- package/dist/client/components/blocks/block-fields-renderer.mjs +64 -28
- package/dist/client/components/blocks/block-insert-button.mjs +4 -4
- package/dist/client/components/blocks/block-item.mjs +2 -2
- package/dist/client/components/blocks/block-library-sidebar.mjs +2 -2
- package/dist/client/components/component-renderer.mjs +1 -1
- package/dist/client/components/fields/array-field.mjs +14 -14
- package/dist/client/components/fields/asset-preview-field.mjs +1 -1
- package/dist/client/components/fields/blocks-field/blocks-field.mjs +84 -104
- package/dist/client/components/fields/json-field.mjs +2 -2
- package/dist/client/components/fields/object-array-field.mjs +22 -22
- package/dist/client/components/fields/object-field.mjs +5 -5
- package/dist/client/components/fields/relation/displays/cards-display.mjs +16 -9
- package/dist/client/components/fields/relation/displays/chips-display.mjs +15 -12
- package/dist/client/components/fields/relation/displays/grid-display.mjs +15 -11
- package/dist/client/components/fields/relation/displays/list-display.mjs +33 -20
- package/dist/client/components/fields/relation/displays/table-display.mjs +62 -93
- package/dist/client/components/fields/relation/relation-items-display.mjs +1 -1
- package/dist/client/components/fields/relation-picker.mjs +7 -6
- package/dist/client/components/fields/relation-select.mjs +71 -47
- package/dist/client/components/fields/rich-text-editor/bubble-menu.mjs +392 -82
- package/dist/client/components/fields/rich-text-editor/extensions.mjs +54 -23
- package/dist/client/components/fields/rich-text-editor/image-popover.mjs +24 -50
- package/dist/client/components/fields/rich-text-editor/image-upload.mjs +66 -0
- package/dist/client/components/fields/rich-text-editor/index.d.mts +38 -0
- package/dist/client/components/fields/rich-text-editor/index.mjs +637 -376
- package/dist/client/components/fields/rich-text-editor/link-utils.mjs +26 -0
- package/dist/client/components/fields/rich-text-editor/presets.d.mts +10 -0
- package/dist/client/components/fields/rich-text-editor/slash-commands.mjs +27 -6
- package/dist/client/components/fields/rich-text-editor/toolbar.mjs +464 -346
- package/dist/client/components/fields/rich-text-editor/types.d.mts +77 -0
- package/dist/client/components/fields/upload-field.mjs +45 -49
- package/dist/client/components/filter-builder/columns-tab.mjs +69 -62
- package/dist/client/components/filter-builder/filter-builder-sheet.mjs +473 -308
- package/dist/client/components/filter-builder/filters-tab.mjs +109 -82
- package/dist/client/components/filter-builder/saved-views-tab.mjs +300 -198
- package/dist/client/components/history-sidebar.mjs +850 -340
- package/dist/client/components/layout/field-layout-renderer.mjs +6 -5
- package/dist/client/components/locale-switcher.mjs +8 -8
- package/dist/client/components/media/media-grid.mjs +12 -9
- package/dist/client/components/media/media-picker-dialog.mjs +242 -230
- package/dist/client/components/preview/live-preview-mode.mjs +1 -1
- package/dist/client/components/primitives/asset-preview.mjs +37 -22
- package/dist/client/components/primitives/date-input.mjs +212 -249
- package/dist/client/components/primitives/dropzone.mjs +192 -159
- package/dist/client/components/primitives/field-select-control.mjs +93 -0
- package/dist/client/components/primitives/select-multi.mjs +251 -230
- package/dist/client/components/primitives/select-single.mjs +345 -290
- package/dist/client/components/primitives/time-input.mjs +2 -2
- package/dist/client/components/sheets/resource-sheet.mjs +2 -0
- package/dist/client/components/ui/accordion.mjs +4 -4
- package/dist/client/components/ui/alert.mjs +3 -3
- package/dist/client/components/ui/badge.mjs +4 -4
- package/dist/client/components/ui/button.mjs +47 -37
- package/dist/client/components/ui/card.mjs +2 -2
- package/dist/client/components/ui/checkbox.mjs +1 -1
- package/dist/client/components/ui/command.mjs +5 -5
- package/dist/client/components/ui/dialog.mjs +3 -3
- package/dist/client/components/ui/drawer.mjs +1 -1
- package/dist/client/components/ui/dropdown-menu.mjs +157 -15
- package/dist/client/components/ui/empty-state.mjs +88 -59
- package/dist/client/components/ui/field.mjs +2 -2
- package/dist/client/components/ui/input-group.mjs +3 -3
- package/dist/client/components/ui/input.mjs +1 -1
- package/dist/client/components/ui/kbd.mjs +1 -1
- package/dist/client/components/ui/label.mjs +1 -1
- package/dist/client/components/ui/popover.mjs +19 -11
- package/dist/client/components/ui/scroll-fade.mjs +170 -0
- package/dist/client/components/ui/search-input.mjs +1 -1
- package/dist/client/components/ui/select.mjs +129 -27
- package/dist/client/components/ui/sheet.mjs +54 -34
- package/dist/client/components/ui/sidebar.mjs +15 -14
- package/dist/client/components/ui/skeleton.mjs +28 -12
- package/dist/client/components/ui/switch.mjs +2 -2
- package/dist/client/components/ui/table.mjs +82 -74
- package/dist/client/components/ui/tabs.mjs +26 -31
- package/dist/client/components/ui/textarea.mjs +1 -1
- package/dist/client/components/ui/tooltip.mjs +1 -1
- package/dist/client/components/widgets/chart-widget.mjs +134 -96
- package/dist/client/components/widgets/progress-widget.mjs +59 -34
- package/dist/client/components/widgets/quick-actions-widget.mjs +184 -113
- package/dist/client/components/widgets/recent-items-widget.mjs +144 -102
- package/dist/client/components/widgets/stats-widget.mjs +91 -72
- package/dist/client/components/widgets/table-widget.mjs +159 -246
- package/dist/client/components/widgets/timeline-widget.mjs +66 -43
- package/dist/client/components/widgets/value-widget.mjs +261 -152
- package/dist/client/components/widgets/widget-empty-state.mjs +88 -0
- package/dist/client/components/widgets/widget-skeletons.mjs +53 -20
- package/dist/client/contexts/focus-context.d.mts +2 -2
- package/dist/client/hooks/use-action.mjs +63 -55
- package/dist/client/hooks/use-audit-history.mjs +1 -65
- package/dist/client/hooks/use-collection-validation.mjs +36 -23
- package/dist/client/hooks/use-collection.mjs +96 -1
- package/dist/client/hooks/use-saved-views.mjs +70 -49
- package/dist/client/hooks/use-server-actions.mjs +59 -40
- package/dist/client/hooks/use-server-validation.mjs +156 -41
- package/dist/client/hooks/use-server-widget-data.mjs +1 -1
- package/dist/client/hooks/use-setup-status.d.mts +3 -3
- package/dist/client/hooks/use-setup-status.mjs +2 -2
- package/dist/client/hooks/use-transition-stage.mjs +2 -10
- package/dist/client/hooks/use-validation-error-map.mjs +31 -13
- package/dist/client/hooks/use-view-state.mjs +238 -174
- package/dist/client/i18n/date-locale.mjs +33 -0
- package/dist/client/i18n/hooks.mjs +17 -1
- package/dist/client/lib/utils.mjs +3 -2
- package/dist/client/preview/block-scope-context.d.mts +2 -2
- package/dist/client/preview/preview-banner.d.mts +2 -2
- package/dist/client/preview/preview-field.d.mts +4 -4
- package/dist/client/preview/preview-field.mjs +2 -2
- package/dist/client/runtime/provider.mjs +8 -1
- package/dist/client/runtime/translations-provider.mjs +1 -1
- package/dist/client/scope/picker.d.mts +2 -2
- package/dist/client/scope/provider.d.mts +2 -2
- package/dist/client/styles/base.css +1022 -0
- package/dist/client/styles/index.css +3 -589
- package/dist/client/utils/auto-expand-fields.mjs +4 -2
- package/dist/client/utils/keyboard-shortcuts.mjs +26 -0
- package/dist/client/utils/use-lazy-component.mjs +80 -0
- package/dist/client/views/auth/auth-layout.d.mts +18 -11
- package/dist/client/views/auth/auth-layout.mjs +291 -80
- package/dist/client/views/auth/forgot-password-form.d.mts +2 -2
- package/dist/client/views/auth/forgot-password-form.mjs +2 -2
- package/dist/client/views/auth/login-form.d.mts +2 -2
- package/dist/client/views/auth/login-form.mjs +1 -1
- package/dist/client/views/auth/reset-password-form.d.mts +2 -2
- package/dist/client/views/auth/reset-password-form.mjs +2 -2
- package/dist/client/views/auth/setup-form.d.mts +2 -2
- package/dist/client/views/collection/auto-form-fields.mjs +11 -9
- package/dist/client/views/collection/bulk-action-toolbar.mjs +173 -138
- package/dist/client/views/collection/cells/complex-cells.mjs +22 -22
- package/dist/client/views/collection/cells/primitive-cells.mjs +1 -1
- package/dist/client/views/collection/cells/relation-cells.mjs +147 -129
- package/dist/client/views/collection/cells/shared/asset-thumbnail.mjs +224 -278
- package/dist/client/views/collection/cells/shared/relation-chip.mjs +64 -36
- package/dist/client/views/collection/cells/upload-cells.mjs +199 -9
- package/dist/client/views/collection/columns/build-columns.mjs +29 -9
- package/dist/client/views/collection/columns/column-defaults.mjs +2 -2
- package/dist/client/views/collection/field-renderer.mjs +50 -89
- package/dist/client/views/collection/form-view.mjs +237 -227
- package/dist/client/views/collection/table-view.mjs +1162 -229
- package/dist/client/views/collection/view-skeletons.mjs +222 -79
- package/dist/client/views/common/global-search.mjs +29 -18
- package/dist/client/views/dashboard/dashboard-grid.mjs +678 -501
- package/dist/client/views/dashboard/dashboard-widget.mjs +6 -3
- package/dist/client/views/dashboard/widget-card.mjs +23 -14
- package/dist/client/views/globals/global-form-view.mjs +634 -589
- package/dist/client/views/layout/admin-layout-provider.mjs +67 -70
- package/dist/client/views/layout/admin-layout.d.mts +3 -6
- package/dist/client/views/layout/admin-layout.mjs +149 -172
- package/dist/client/views/layout/admin-router.mjs +747 -544
- package/dist/client/views/layout/admin-sidebar.d.mts +38 -1
- package/dist/client/views/layout/admin-sidebar.mjs +751 -591
- package/dist/client/views/layout/admin-theme.d.mts +10 -0
- package/dist/client/views/layout/admin-theme.mjs +84 -0
- package/dist/client/views/layout/admin-view-layout.mjs +161 -0
- package/dist/client/views/pages/accept-invite-page.d.mts +2 -2
- package/dist/client/views/pages/accept-invite-page.mjs +49 -26
- package/dist/client/views/pages/dashboard-page.d.mts +2 -2
- package/dist/client/views/pages/forgot-password-page.d.mts +2 -2
- package/dist/client/views/pages/forgot-password-page.mjs +2 -19
- package/dist/client/views/pages/invite-page.d.mts +2 -2
- package/dist/client/views/pages/invite-page.mjs +2 -19
- package/dist/client/views/pages/login-page.d.mts +1 -1
- package/dist/client/views/pages/login-page.mjs +4 -21
- package/dist/client/views/pages/reset-password-page.d.mts +2 -2
- package/dist/client/views/pages/reset-password-page.mjs +3 -20
- package/dist/client/views/pages/setup-page.d.mts +2 -2
- package/dist/client/views/pages/setup-page.mjs +3 -20
- package/dist/client.d.mts +6 -2
- package/dist/client.mjs +2 -1
- package/dist/components/rich-text/rich-text-renderer.d.mts +2 -2
- package/dist/index.d.mts +6 -2
- package/dist/index.mjs +2 -1
- package/dist/server/augmentation/dashboard.d.mts +67 -3
- package/dist/server/augmentation/form-layout.d.mts +21 -0
- package/dist/server/augmentation/index.d.mts +1 -1
- package/dist/server/codegen/admin-client-template.mjs +4 -0
- package/dist/server/fields/blocks.d.mts +1 -1
- package/dist/server/fields/blocks.mjs +12 -0
- package/dist/server/fields/rich-text.d.mts +1 -1
- package/dist/server/fields/rich-text.mjs +8 -0
- package/dist/server/i18n/index.mjs +17 -1
- package/dist/server/i18n/messages/cs.mjs +23 -0
- package/dist/server/i18n/messages/de.mjs +23 -0
- package/dist/server/i18n/messages/en.mjs +64 -1
- package/dist/server/i18n/messages/es.mjs +23 -0
- package/dist/server/i18n/messages/fr.mjs +23 -0
- package/dist/server/i18n/messages/pl.mjs +23 -0
- package/dist/server/i18n/messages/pt.mjs +23 -0
- package/dist/server/i18n/messages/sk.mjs +83 -1
- package/dist/server/modules/admin/block/introspection.mjs +4 -1
- package/dist/server/modules/admin/block/prefetch.mjs +12 -2
- package/dist/server/modules/admin/collections/account.d.mts +50 -50
- package/dist/server/modules/admin/collections/admin-locks.d.mts +54 -54
- package/dist/server/modules/admin/collections/admin-preferences.d.mts +39 -39
- package/dist/server/modules/admin/collections/admin-saved-views.d.mts +47 -47
- package/dist/server/modules/admin/collections/apikey.d.mts +68 -68
- package/dist/server/modules/admin/collections/assets.d.mts +20 -20
- package/dist/server/modules/admin/collections/assets.mjs +0 -1
- package/dist/server/modules/admin/collections/session.d.mts +42 -42
- package/dist/server/modules/admin/collections/user.d.mts +12 -0
- package/dist/server/modules/admin/collections/user.mjs +40 -9
- package/dist/server/modules/admin/collections/verification.d.mts +2 -2
- package/dist/server/modules/admin/dto/admin-config.dto.mjs +2 -0
- package/dist/server/modules/admin/factories.mjs +7 -18
- package/dist/server/modules/admin/index.d.mts +1 -1
- package/dist/server/modules/admin/routes/admin-config.d.mts +2 -2
- package/dist/server/modules/admin/routes/admin-config.mjs +34 -16
- package/dist/server/modules/admin/routes/execute-action.d.mts +9 -9
- package/dist/server/modules/admin/routes/execute-action.mjs +33 -0
- package/dist/server/modules/admin/routes/locales.d.mts +2 -2
- package/dist/server/modules/admin/routes/preview.d.mts +11 -11
- package/dist/server/modules/admin/routes/reactive.d.mts +9 -9
- package/dist/server/modules/admin/routes/setup.d.mts +10 -10
- package/dist/server/modules/admin/routes/setup.mjs +7 -7
- package/dist/server/modules/admin/routes/translations.d.mts +4 -4
- package/dist/server/modules/admin/routes/translations.mjs +5 -1
- package/dist/server/modules/admin/routes/widget-data.d.mts +5 -5
- package/dist/server/modules/admin-preferences/collections/admin-preferences.mjs +1 -1
- package/dist/server/modules/admin-preferences/collections/saved-views.d.mts +27 -27
- package/dist/server/modules/audit/.generated/module.d.mts +1 -1
- package/dist/server/modules/audit/.generated/module.mjs +1 -1
- package/dist/server/modules/audit/collections/audit-log.d.mts +2 -2
- package/dist/server/modules/audit/collections/audit-log.mjs +1 -1
- package/dist/server/modules/audit/config/app.mjs +99 -42
- package/dist/server/modules/audit/jobs/audit-cleanup.mjs +1 -1
- package/dist/server/plugin.mjs +4 -2
- package/dist/server/proxy-factories.d.mts +4 -3
- package/dist/server/proxy-factories.mjs +34 -8
- package/dist/shared/types/saved-views.types.d.mts +2 -0
- package/package.json +6 -4
- package/dist/client/components/fields/rich-text-editor/link-popover.mjs +0 -85
- package/dist/client/components/ui/spinner.mjs +0 -52
- package/dist/client/components/ui/toolbar.mjs +0 -136
- package/dist/client/contexts/breadcrumb-context.mjs +0 -60
- package/dist/client/views/layout/admin-topbar.mjs +0 -236
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { cn } from "../../lib/utils.mjs";
|
|
2
2
|
import { c } from "react/compiler-runtime";
|
|
3
|
+
import * as React from "react";
|
|
3
4
|
import { jsx } from "react/jsx-runtime";
|
|
4
5
|
|
|
5
6
|
//#region src/client/components/ui/table.tsx
|
|
@@ -18,7 +19,7 @@ function Table(t0) {
|
|
|
18
19
|
}
|
|
19
20
|
let t1;
|
|
20
21
|
if ($[3] !== className) {
|
|
21
|
-
t1 = cn("qa-table w-full caption-bottom border-separate border-spacing-0 text-
|
|
22
|
+
t1 = cn("qa-table w-full caption-bottom border-separate border-spacing-0 text-sm", className);
|
|
22
23
|
$[3] = className;
|
|
23
24
|
$[4] = t1;
|
|
24
25
|
} else t1 = $[4];
|
|
@@ -26,7 +27,7 @@ function Table(t0) {
|
|
|
26
27
|
if ($[5] !== props || $[6] !== t1) {
|
|
27
28
|
t2 = /* @__PURE__ */ jsx("div", {
|
|
28
29
|
"data-slot": "table-container",
|
|
29
|
-
className: "qa-table-container scrollbar-thin relative min-w-0
|
|
30
|
+
className: "qa-table-container scrollbar-thin relative w-full min-w-0 overflow-x-auto",
|
|
30
31
|
children: /* @__PURE__ */ jsx("table", {
|
|
31
32
|
"data-slot": "table",
|
|
32
33
|
className: t1,
|
|
@@ -54,7 +55,7 @@ function TableHeader(t0) {
|
|
|
54
55
|
}
|
|
55
56
|
let t1;
|
|
56
57
|
if ($[3] !== className) {
|
|
57
|
-
t1 = cn("qa-table__header
|
|
58
|
+
t1 = cn("qa-table__header bg-background sticky top-0 z-10", className);
|
|
58
59
|
$[3] = className;
|
|
59
60
|
$[4] = t1;
|
|
60
61
|
} else t1 = $[4];
|
|
@@ -86,7 +87,7 @@ function TableBody(t0) {
|
|
|
86
87
|
}
|
|
87
88
|
let t1;
|
|
88
89
|
if ($[3] !== className) {
|
|
89
|
-
t1 = cn("qa-table__body
|
|
90
|
+
t1 = cn("qa-table__body", className);
|
|
90
91
|
$[3] = className;
|
|
91
92
|
$[4] = t1;
|
|
92
93
|
} else t1 = $[4];
|
|
@@ -103,8 +104,8 @@ function TableBody(t0) {
|
|
|
103
104
|
} else t2 = $[7];
|
|
104
105
|
return t2;
|
|
105
106
|
}
|
|
106
|
-
|
|
107
|
-
const $ = c(
|
|
107
|
+
const TableRow = React.forwardRef((t0, ref) => {
|
|
108
|
+
const $ = c(9);
|
|
108
109
|
let className;
|
|
109
110
|
let props;
|
|
110
111
|
if ($[0] !== t0) {
|
|
@@ -118,25 +119,28 @@ function TableRow(t0) {
|
|
|
118
119
|
}
|
|
119
120
|
let t1;
|
|
120
121
|
if ($[3] !== className) {
|
|
121
|
-
t1 = cn("qa-table__row group/row
|
|
122
|
+
t1 = cn("qa-table__row group/row hover:bg-accent data-[state=selected]:bg-muted h-10 bg-transparent transition-colors", className);
|
|
122
123
|
$[3] = className;
|
|
123
124
|
$[4] = t1;
|
|
124
125
|
} else t1 = $[4];
|
|
125
126
|
let t2;
|
|
126
|
-
if ($[5] !== props || $[6] !== t1) {
|
|
127
|
+
if ($[5] !== props || $[6] !== ref || $[7] !== t1) {
|
|
127
128
|
t2 = /* @__PURE__ */ jsx("tr", {
|
|
129
|
+
ref,
|
|
128
130
|
"data-slot": "table-row",
|
|
129
131
|
className: t1,
|
|
130
132
|
...props
|
|
131
133
|
});
|
|
132
134
|
$[5] = props;
|
|
133
|
-
$[6] =
|
|
134
|
-
$[7] =
|
|
135
|
-
|
|
135
|
+
$[6] = ref;
|
|
136
|
+
$[7] = t1;
|
|
137
|
+
$[8] = t2;
|
|
138
|
+
} else t2 = $[8];
|
|
136
139
|
return t2;
|
|
137
|
-
}
|
|
140
|
+
});
|
|
141
|
+
TableRow.displayName = "TableRow";
|
|
138
142
|
function TableHead(t0) {
|
|
139
|
-
const $ = c(
|
|
143
|
+
const $ = c(22);
|
|
140
144
|
let className;
|
|
141
145
|
let props;
|
|
142
146
|
let showStickyBorder;
|
|
@@ -160,51 +164,53 @@ function TableHead(t0) {
|
|
|
160
164
|
const isSticky = stickyLeft !== void 0;
|
|
161
165
|
const t1 = isSticky ? "" : void 0;
|
|
162
166
|
const t2 = isSticky && "sticky z-20 min-w-0";
|
|
163
|
-
const t3 = showStickyBorder && "after:bg-border after:absolute after:top-0 after:right-0 after:bottom-0 after:w-px";
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
+
const t3 = showStickyBorder && "after:bg-border-subtle after:absolute after:top-0 after:right-0 after:bottom-0 after:w-px";
|
|
168
|
+
const t4 = showStickyBorder && !isSticky && "relative";
|
|
169
|
+
let t5;
|
|
170
|
+
if ($[6] !== className || $[7] !== t2 || $[8] !== t3 || $[9] !== t4) {
|
|
171
|
+
t5 = cn("qa-table__head font-chrome text-muted-foreground bg-background chrome-meta h-9 min-w-[100px] overflow-hidden px-3 text-left align-middle text-[11px] font-medium text-ellipsis whitespace-nowrap [&:has([role=checkbox])]:px-2", t2, t3, t4, className);
|
|
167
172
|
$[6] = className;
|
|
168
173
|
$[7] = t2;
|
|
169
174
|
$[8] = t3;
|
|
170
175
|
$[9] = t4;
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
if ($[10] !== isSticky || $[11] !== stickyLeft) {
|
|
174
|
-
t5 = isSticky ? { left: stickyLeft } : {};
|
|
175
|
-
$[10] = isSticky;
|
|
176
|
-
$[11] = stickyLeft;
|
|
177
|
-
$[12] = t5;
|
|
178
|
-
} else t5 = $[12];
|
|
176
|
+
$[10] = t5;
|
|
177
|
+
} else t5 = $[10];
|
|
179
178
|
let t6;
|
|
180
|
-
if ($[
|
|
181
|
-
t6 = {
|
|
179
|
+
if ($[11] !== isSticky || $[12] !== stickyLeft) {
|
|
180
|
+
t6 = isSticky ? { left: stickyLeft } : {};
|
|
181
|
+
$[11] = isSticky;
|
|
182
|
+
$[12] = stickyLeft;
|
|
183
|
+
$[13] = t6;
|
|
184
|
+
} else t6 = $[13];
|
|
185
|
+
let t7;
|
|
186
|
+
if ($[14] !== style || $[15] !== t6) {
|
|
187
|
+
t7 = {
|
|
182
188
|
...style,
|
|
183
|
-
...
|
|
189
|
+
...t6
|
|
184
190
|
};
|
|
185
|
-
$[
|
|
186
|
-
$[14] = t5;
|
|
191
|
+
$[14] = style;
|
|
187
192
|
$[15] = t6;
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
193
|
+
$[16] = t7;
|
|
194
|
+
} else t7 = $[16];
|
|
195
|
+
let t8;
|
|
196
|
+
if ($[17] !== props || $[18] !== t1 || $[19] !== t5 || $[20] !== t7) {
|
|
197
|
+
t8 = /* @__PURE__ */ jsx("th", {
|
|
192
198
|
"data-slot": "table-head",
|
|
193
199
|
"data-sticky-left": t1,
|
|
194
|
-
className:
|
|
195
|
-
style:
|
|
200
|
+
className: t5,
|
|
201
|
+
style: t7,
|
|
196
202
|
...props
|
|
197
203
|
});
|
|
198
|
-
$[
|
|
199
|
-
$[
|
|
200
|
-
$[
|
|
201
|
-
$[19] = t6;
|
|
204
|
+
$[17] = props;
|
|
205
|
+
$[18] = t1;
|
|
206
|
+
$[19] = t5;
|
|
202
207
|
$[20] = t7;
|
|
203
|
-
|
|
204
|
-
|
|
208
|
+
$[21] = t8;
|
|
209
|
+
} else t8 = $[21];
|
|
210
|
+
return t8;
|
|
205
211
|
}
|
|
206
212
|
function TableCell(t0) {
|
|
207
|
-
const $ = c(
|
|
213
|
+
const $ = c(22);
|
|
208
214
|
let className;
|
|
209
215
|
let props;
|
|
210
216
|
let showStickyBorder;
|
|
@@ -227,49 +233,51 @@ function TableCell(t0) {
|
|
|
227
233
|
}
|
|
228
234
|
const isSticky = stickyLeft !== void 0;
|
|
229
235
|
const t1 = isSticky ? "" : void 0;
|
|
230
|
-
const t2 = isSticky && "sticky z-10 min-w-0
|
|
231
|
-
const t3 = showStickyBorder && "after:bg-border after:absolute after:top-0 after:right-0 after:bottom-0 after:w-px";
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
236
|
+
const t2 = isSticky && "group-data-[state=selected]/row:bg-muted group-hover/row:bg-accent bg-background sticky z-10 min-w-0";
|
|
237
|
+
const t3 = showStickyBorder && "after:bg-border-subtle after:absolute after:top-0 after:right-0 after:bottom-0 after:w-px";
|
|
238
|
+
const t4 = showStickyBorder && !isSticky && "relative";
|
|
239
|
+
let t5;
|
|
240
|
+
if ($[6] !== className || $[7] !== t2 || $[8] !== t3 || $[9] !== t4) {
|
|
241
|
+
t5 = cn("qa-table__cell min-w-[100px] overflow-hidden px-3 py-2 align-middle text-ellipsis whitespace-nowrap tabular-nums transition-colors [&:has([role=checkbox])]:px-2", t2, t3, t4, className);
|
|
235
242
|
$[6] = className;
|
|
236
243
|
$[7] = t2;
|
|
237
244
|
$[8] = t3;
|
|
238
245
|
$[9] = t4;
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
if ($[10] !== isSticky || $[11] !== stickyLeft) {
|
|
242
|
-
t5 = isSticky ? { left: stickyLeft } : {};
|
|
243
|
-
$[10] = isSticky;
|
|
244
|
-
$[11] = stickyLeft;
|
|
245
|
-
$[12] = t5;
|
|
246
|
-
} else t5 = $[12];
|
|
246
|
+
$[10] = t5;
|
|
247
|
+
} else t5 = $[10];
|
|
247
248
|
let t6;
|
|
248
|
-
if ($[
|
|
249
|
-
t6 = {
|
|
249
|
+
if ($[11] !== isSticky || $[12] !== stickyLeft) {
|
|
250
|
+
t6 = isSticky ? { left: stickyLeft } : {};
|
|
251
|
+
$[11] = isSticky;
|
|
252
|
+
$[12] = stickyLeft;
|
|
253
|
+
$[13] = t6;
|
|
254
|
+
} else t6 = $[13];
|
|
255
|
+
let t7;
|
|
256
|
+
if ($[14] !== style || $[15] !== t6) {
|
|
257
|
+
t7 = {
|
|
250
258
|
...style,
|
|
251
|
-
...
|
|
259
|
+
...t6
|
|
252
260
|
};
|
|
253
|
-
$[
|
|
254
|
-
$[14] = t5;
|
|
261
|
+
$[14] = style;
|
|
255
262
|
$[15] = t6;
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
263
|
+
$[16] = t7;
|
|
264
|
+
} else t7 = $[16];
|
|
265
|
+
let t8;
|
|
266
|
+
if ($[17] !== props || $[18] !== t1 || $[19] !== t5 || $[20] !== t7) {
|
|
267
|
+
t8 = /* @__PURE__ */ jsx("td", {
|
|
260
268
|
"data-slot": "table-cell",
|
|
261
269
|
"data-sticky-left": t1,
|
|
262
|
-
className:
|
|
263
|
-
style:
|
|
264
|
-
|
|
270
|
+
className: t5,
|
|
271
|
+
style: t7,
|
|
272
|
+
...props
|
|
265
273
|
});
|
|
266
|
-
$[
|
|
267
|
-
$[
|
|
268
|
-
$[
|
|
269
|
-
$[19] = t6;
|
|
274
|
+
$[17] = props;
|
|
275
|
+
$[18] = t1;
|
|
276
|
+
$[19] = t5;
|
|
270
277
|
$[20] = t7;
|
|
271
|
-
|
|
272
|
-
|
|
278
|
+
$[21] = t8;
|
|
279
|
+
} else t8 = $[21];
|
|
280
|
+
return t8;
|
|
273
281
|
}
|
|
274
282
|
|
|
275
283
|
//#endregion
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
import { cn } from "../../lib/utils.mjs";
|
|
4
4
|
import { c } from "react/compiler-runtime";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
6
|
-
import { cva } from "class-variance-authority";
|
|
7
6
|
import { Tabs } from "@base-ui/react/tabs";
|
|
8
7
|
|
|
9
8
|
//#region src/client/components/ui/tabs.tsx
|
|
@@ -45,51 +44,47 @@ function Tabs$1(t0) {
|
|
|
45
44
|
} else t3 = $[9];
|
|
46
45
|
return t3;
|
|
47
46
|
}
|
|
48
|
-
const
|
|
49
|
-
|
|
50
|
-
default: "bg-muted",
|
|
51
|
-
line: "gap-1 bg-transparent"
|
|
52
|
-
} },
|
|
53
|
-
defaultVariants: { variant: "default" }
|
|
54
|
-
});
|
|
47
|
+
const tabsListBase = "qa-tabs__list group/tabs-list text-muted-foreground bg-surface-low border-border-subtle inline-flex w-fit items-center justify-center gap-1 rounded-md border p-1 group-data-horizontal/tabs:min-h-9 group-data-[orientation=vertical]/tabs:h-fit group-data-[orientation=vertical]/tabs:flex-col";
|
|
48
|
+
const tabsListVariantStyles = { pills: "border-transparent bg-muted/70" };
|
|
55
49
|
function TabsList(t0) {
|
|
56
50
|
const $ = c(11);
|
|
57
51
|
let className;
|
|
58
52
|
let props;
|
|
59
|
-
let
|
|
53
|
+
let variant;
|
|
60
54
|
if ($[0] !== t0) {
|
|
61
|
-
({className, variant
|
|
55
|
+
({className, variant, ...props} = t0);
|
|
62
56
|
$[0] = t0;
|
|
63
57
|
$[1] = className;
|
|
64
58
|
$[2] = props;
|
|
65
|
-
$[3] =
|
|
59
|
+
$[3] = variant;
|
|
66
60
|
} else {
|
|
67
61
|
className = $[1];
|
|
68
62
|
props = $[2];
|
|
69
|
-
|
|
63
|
+
variant = $[3];
|
|
70
64
|
}
|
|
71
|
-
const
|
|
72
|
-
|
|
73
|
-
if ($[4] !== className || $[5] !== variant) {
|
|
74
|
-
t2 = cn(tabsListVariants({ variant }), className);
|
|
75
|
-
$[4] = className;
|
|
76
|
-
$[5] = variant;
|
|
77
|
-
$[6] = t2;
|
|
78
|
-
} else t2 = $[6];
|
|
65
|
+
const t1 = variant ?? "default";
|
|
66
|
+
const t2 = variant && tabsListVariantStyles[variant];
|
|
79
67
|
let t3;
|
|
80
|
-
if ($[
|
|
81
|
-
t3 =
|
|
68
|
+
if ($[4] !== className || $[5] !== t2) {
|
|
69
|
+
t3 = cn(tabsListBase, t2, className);
|
|
70
|
+
$[4] = className;
|
|
71
|
+
$[5] = t2;
|
|
72
|
+
$[6] = t3;
|
|
73
|
+
} else t3 = $[6];
|
|
74
|
+
let t4;
|
|
75
|
+
if ($[7] !== props || $[8] !== t1 || $[9] !== t3) {
|
|
76
|
+
t4 = /* @__PURE__ */ jsx(Tabs.List, {
|
|
82
77
|
"data-slot": "tabs-list",
|
|
83
|
-
"data-variant":
|
|
84
|
-
className:
|
|
78
|
+
"data-variant": t1,
|
|
79
|
+
className: t3,
|
|
85
80
|
...props
|
|
86
81
|
});
|
|
87
82
|
$[7] = props;
|
|
88
|
-
$[8] =
|
|
89
|
-
$[9] =
|
|
90
|
-
$[10] =
|
|
91
|
-
} else
|
|
92
|
-
return
|
|
83
|
+
$[8] = t1;
|
|
84
|
+
$[9] = t3;
|
|
85
|
+
$[10] = t4;
|
|
86
|
+
} else t4 = $[10];
|
|
87
|
+
return t4;
|
|
93
88
|
}
|
|
94
89
|
function TabsTrigger(t0) {
|
|
95
90
|
const $ = c(8);
|
|
@@ -106,7 +101,7 @@ function TabsTrigger(t0) {
|
|
|
106
101
|
}
|
|
107
102
|
let t1;
|
|
108
103
|
if ($[3] !== className) {
|
|
109
|
-
t1 = cn("qa-tabs__trigger
|
|
104
|
+
t1 = cn("qa-tabs__trigger font-chrome text-muted-foreground hover:text-foreground data-active:bg-surface-high data-active:text-foreground focus-visible:ring-ring/20 relative inline-flex min-h-7 flex-1 cursor-pointer items-center justify-center gap-1.5 rounded-sm border border-transparent px-3 py-1 text-xs font-medium whitespace-nowrap tabular-nums transition-[background-color,color,border-color,box-shadow,transform] duration-[var(--motion-duration-base)] ease-[var(--motion-ease-standard)] group-data-[orientation=vertical]/tabs:w-full group-data-[orientation=vertical]/tabs:justify-start focus-visible:ring-[3px] focus-visible:outline-none active:scale-[0.96] disabled:pointer-events-none disabled:opacity-50 motion-reduce:transition-none motion-reduce:active:scale-100 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5", className);
|
|
110
105
|
$[3] = className;
|
|
111
106
|
$[4] = t1;
|
|
112
107
|
} else t1 = $[4];
|
|
@@ -138,7 +133,7 @@ function TabsContent(t0) {
|
|
|
138
133
|
}
|
|
139
134
|
let t1;
|
|
140
135
|
if ($[3] !== className) {
|
|
141
|
-
t1 = cn("qa-tabs__content flex-1 text-xs/relaxed outline-none", className);
|
|
136
|
+
t1 = cn("qa-tabs__content flex-1 text-xs/relaxed transition-opacity duration-[var(--motion-duration-fast)] ease-[var(--motion-ease-standard)] outline-none motion-reduce:transition-none", className);
|
|
142
137
|
$[3] = className;
|
|
143
138
|
$[4] = t1;
|
|
144
139
|
} else t1 = $[4];
|
|
@@ -18,7 +18,7 @@ function Textarea(t0) {
|
|
|
18
18
|
}
|
|
19
19
|
let t1;
|
|
20
20
|
if ($[3] !== className) {
|
|
21
|
-
t1 = cn("qa-textarea
|
|
21
|
+
t1 = cn("qa-textarea control-surface font-chrome focus-visible:border-border-strong focus-visible:ring-ring/20 aria-invalid:border-border-strong aria-invalid:ring-ring/20 placeholder:text-muted-foreground flex h-auto min-h-24 w-full resize-none px-3 py-2.5 text-sm outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:ring-[3px]", className);
|
|
22
22
|
$[3] = className;
|
|
23
23
|
$[4] = t1;
|
|
24
24
|
} else t1 = $[4];
|
|
@@ -105,7 +105,7 @@ function TooltipContent(t0) {
|
|
|
105
105
|
const alignOffset = t4 === void 0 ? 0 : t4;
|
|
106
106
|
let t5;
|
|
107
107
|
if ($[8] !== className) {
|
|
108
|
-
t5 = cn("qa-tooltip__content
|
|
108
|
+
t5 = cn("qa-tooltip__content floating-surface motion-floating-fast font-chrome text-popover-foreground z-50 w-fit max-w-xs origin-(--transform-origin) px-2.5 py-1.5 text-xs data-ending-style:scale-[var(--motion-scale-enter)] data-ending-style:opacity-0 data-starting-style:scale-[var(--motion-scale-enter)] data-starting-style:opacity-0", className);
|
|
109
109
|
$[8] = className;
|
|
110
110
|
$[9] = t5;
|
|
111
111
|
} else t5 = $[9];
|
|
@@ -3,6 +3,7 @@ import { formatLabel } from "../../lib/utils.mjs";
|
|
|
3
3
|
import { useCollectionList } from "../../hooks/use-collection.mjs";
|
|
4
4
|
import { WidgetCard } from "../../views/dashboard/widget-card.mjs";
|
|
5
5
|
import { useServerWidgetData } from "../../hooks/use-server-widget-data.mjs";
|
|
6
|
+
import { WidgetEmptyState } from "./widget-empty-state.mjs";
|
|
6
7
|
import { ChartWidgetSkeleton } from "./widget-skeletons.mjs";
|
|
7
8
|
import { c } from "react/compiler-runtime";
|
|
8
9
|
import "react";
|
|
@@ -74,7 +75,7 @@ function _temp(entry) {
|
|
|
74
75
|
}, String(entry.name));
|
|
75
76
|
}
|
|
76
77
|
function ChartWidget(t0) {
|
|
77
|
-
const $ = c(
|
|
78
|
+
const $ = c(49);
|
|
78
79
|
const { config } = t0;
|
|
79
80
|
const resolveText = useResolveText();
|
|
80
81
|
const { collection, field, chartType: t1, timeRange: t2, label, color: t3, showGrid: t4, realtime, hasLoader, refreshInterval } = config;
|
|
@@ -99,55 +100,75 @@ function ChartWidget(t0) {
|
|
|
99
100
|
t7 = { limit: 1e3 };
|
|
100
101
|
$[3] = t7;
|
|
101
102
|
} else t7 = $[3];
|
|
102
|
-
|
|
103
|
-
if ($[4] !== realtime) {
|
|
104
|
-
t8 = { realtime };
|
|
105
|
-
$[4] = realtime;
|
|
106
|
-
$[5] = t8;
|
|
107
|
-
} else t8 = $[5];
|
|
108
|
-
const collectionQuery = useCollectionList(collection, t7, void 0, t8);
|
|
109
|
-
const { isLoading, error, refetch } = hasLoader ? serverQuery : collectionQuery;
|
|
103
|
+
const t8 = !hasLoader;
|
|
110
104
|
let t9;
|
|
111
|
-
if ($[
|
|
112
|
-
t9 =
|
|
113
|
-
$[
|
|
114
|
-
$[
|
|
115
|
-
|
|
116
|
-
} else t9 = $[8];
|
|
117
|
-
const collectionItems = t9;
|
|
105
|
+
if ($[4] !== t8) {
|
|
106
|
+
t9 = { enabled: t8 };
|
|
107
|
+
$[4] = t8;
|
|
108
|
+
$[5] = t9;
|
|
109
|
+
} else t9 = $[5];
|
|
118
110
|
let t10;
|
|
119
|
-
if ($[
|
|
120
|
-
t10 =
|
|
121
|
-
$[
|
|
122
|
-
$[
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
} else t10 = $[13];
|
|
127
|
-
const displayLabel = t10;
|
|
111
|
+
if ($[6] !== realtime) {
|
|
112
|
+
t10 = { realtime };
|
|
113
|
+
$[6] = realtime;
|
|
114
|
+
$[7] = t10;
|
|
115
|
+
} else t10 = $[7];
|
|
116
|
+
const collectionQuery = useCollectionList(collection, t7, t9, t10);
|
|
117
|
+
const { isLoading, error, refetch, isFetching } = hasLoader ? serverQuery : collectionQuery;
|
|
128
118
|
let t11;
|
|
129
119
|
bb0: {
|
|
130
120
|
if (hasLoader) {
|
|
131
121
|
let t12$2;
|
|
132
|
-
if ($[
|
|
133
|
-
t12$2 = serverQuery.data ?? [];
|
|
134
|
-
$[14] = serverQuery.data;
|
|
135
|
-
$[15] = t12$2;
|
|
136
|
-
} else t12$2 = $[15];
|
|
137
|
-
t11 = t12$2;
|
|
138
|
-
break bb0;
|
|
139
|
-
}
|
|
140
|
-
if (!collectionItems.length) {
|
|
141
|
-
let t12$2;
|
|
142
|
-
if ($[16] === Symbol.for("react.memo_cache_sentinel")) {
|
|
122
|
+
if ($[8] === Symbol.for("react.memo_cache_sentinel")) {
|
|
143
123
|
t12$2 = [];
|
|
144
|
-
$[
|
|
145
|
-
} else t12$2 = $[
|
|
124
|
+
$[8] = t12$2;
|
|
125
|
+
} else t12$2 = $[8];
|
|
146
126
|
t11 = t12$2;
|
|
147
127
|
break bb0;
|
|
148
128
|
}
|
|
149
129
|
let t12$1;
|
|
150
|
-
if ($[
|
|
130
|
+
if ($[9] !== collectionQuery.data) {
|
|
131
|
+
t12$1 = Array.isArray(collectionQuery.data?.docs) ? collectionQuery.data.docs : [];
|
|
132
|
+
$[9] = collectionQuery.data;
|
|
133
|
+
$[10] = t12$1;
|
|
134
|
+
} else t12$1 = $[10];
|
|
135
|
+
t11 = t12$1;
|
|
136
|
+
}
|
|
137
|
+
const collectionItems = t11;
|
|
138
|
+
let t12;
|
|
139
|
+
if ($[11] !== collection || $[12] !== config.title || $[13] !== field || $[14] !== label || $[15] !== resolveText) {
|
|
140
|
+
t12 = config.title ? resolveText(config.title) : label ? resolveText(label) : `${formatLabel(collection)} by ${field}`;
|
|
141
|
+
$[11] = collection;
|
|
142
|
+
$[12] = config.title;
|
|
143
|
+
$[13] = field;
|
|
144
|
+
$[14] = label;
|
|
145
|
+
$[15] = resolveText;
|
|
146
|
+
$[16] = t12;
|
|
147
|
+
} else t12 = $[16];
|
|
148
|
+
const displayLabel = t12;
|
|
149
|
+
let t13;
|
|
150
|
+
bb1: {
|
|
151
|
+
if (hasLoader) {
|
|
152
|
+
let t14$2;
|
|
153
|
+
if ($[17] !== serverQuery.data) {
|
|
154
|
+
t14$2 = serverQuery.data ?? [];
|
|
155
|
+
$[17] = serverQuery.data;
|
|
156
|
+
$[18] = t14$2;
|
|
157
|
+
} else t14$2 = $[18];
|
|
158
|
+
t13 = t14$2;
|
|
159
|
+
break bb1;
|
|
160
|
+
}
|
|
161
|
+
if (!collectionItems.length) {
|
|
162
|
+
let t14$2;
|
|
163
|
+
if ($[19] === Symbol.for("react.memo_cache_sentinel")) {
|
|
164
|
+
t14$2 = [];
|
|
165
|
+
$[19] = t14$2;
|
|
166
|
+
} else t14$2 = $[19];
|
|
167
|
+
t13 = t14$2;
|
|
168
|
+
break bb1;
|
|
169
|
+
}
|
|
170
|
+
let t14$1;
|
|
171
|
+
if ($[20] !== collectionItems || $[21] !== field || $[22] !== timeRange) {
|
|
151
172
|
const grouped = collectionItems.reduce((acc, item) => {
|
|
152
173
|
const value = item[field];
|
|
153
174
|
if (value === void 0 || value === null) return acc;
|
|
@@ -157,30 +178,29 @@ function ChartWidget(t0) {
|
|
|
157
178
|
acc[key] = (acc[key] || 0) + 1;
|
|
158
179
|
return acc;
|
|
159
180
|
}, {});
|
|
160
|
-
|
|
161
|
-
$[
|
|
162
|
-
$[
|
|
163
|
-
$[
|
|
164
|
-
$[
|
|
165
|
-
} else
|
|
166
|
-
|
|
181
|
+
t14$1 = Object.entries(grouped).map(_temp2).sort(_temp3);
|
|
182
|
+
$[20] = collectionItems;
|
|
183
|
+
$[21] = field;
|
|
184
|
+
$[22] = timeRange;
|
|
185
|
+
$[23] = t14$1;
|
|
186
|
+
} else t14$1 = $[23];
|
|
187
|
+
t13 = t14$1;
|
|
167
188
|
}
|
|
168
|
-
const chartData =
|
|
169
|
-
let
|
|
170
|
-
if ($[
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
})
|
|
189
|
+
const chartData = t13;
|
|
190
|
+
let t14;
|
|
191
|
+
if ($[24] === Symbol.for("react.memo_cache_sentinel")) {
|
|
192
|
+
t14 = /* @__PURE__ */ jsx(WidgetEmptyState, {
|
|
193
|
+
iconName: "ph:chart-line",
|
|
194
|
+
title: "No chart data",
|
|
195
|
+
description: "There are no values for this range.",
|
|
196
|
+
className: "min-h-48"
|
|
177
197
|
});
|
|
178
|
-
$[
|
|
179
|
-
} else
|
|
180
|
-
const emptyContent =
|
|
181
|
-
let
|
|
182
|
-
if ($[
|
|
183
|
-
|
|
198
|
+
$[24] = t14;
|
|
199
|
+
} else t14 = $[24];
|
|
200
|
+
const emptyContent = t14;
|
|
201
|
+
let t15;
|
|
202
|
+
if ($[25] !== chartData || $[26] !== chartType || $[27] !== color || $[28] !== showGrid) {
|
|
203
|
+
t15 = chartData.length === 0 ? emptyContent : /* @__PURE__ */ jsx("div", {
|
|
184
204
|
className: "h-48 w-full",
|
|
185
205
|
children: /* @__PURE__ */ jsx(ResponsiveContainer, {
|
|
186
206
|
width: "100%",
|
|
@@ -193,48 +213,66 @@ function ChartWidget(t0) {
|
|
|
193
213
|
})
|
|
194
214
|
})
|
|
195
215
|
});
|
|
196
|
-
$[
|
|
197
|
-
$[
|
|
198
|
-
$[
|
|
199
|
-
$[
|
|
200
|
-
$[26] = t13;
|
|
201
|
-
} else t13 = $[26];
|
|
202
|
-
const chartContent = t13;
|
|
203
|
-
let t14;
|
|
204
|
-
if ($[27] === Symbol.for("react.memo_cache_sentinel")) {
|
|
205
|
-
t14 = /* @__PURE__ */ jsx(ChartWidgetSkeleton, {});
|
|
206
|
-
$[27] = t14;
|
|
207
|
-
} else t14 = $[27];
|
|
208
|
-
let t15;
|
|
209
|
-
if ($[28] !== error) {
|
|
210
|
-
t15 = error instanceof Error ? error : error ? new Error(String(error)) : null;
|
|
211
|
-
$[28] = error;
|
|
216
|
+
$[25] = chartData;
|
|
217
|
+
$[26] = chartType;
|
|
218
|
+
$[27] = color;
|
|
219
|
+
$[28] = showGrid;
|
|
212
220
|
$[29] = t15;
|
|
213
221
|
} else t15 = $[29];
|
|
222
|
+
const chartContent = t15;
|
|
214
223
|
let t16;
|
|
215
|
-
if ($[30] !==
|
|
216
|
-
t16 = ()
|
|
217
|
-
$[30] =
|
|
218
|
-
$[31] =
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
224
|
+
if ($[30] !== config.description || $[31] !== resolveText) {
|
|
225
|
+
t16 = config.description ? resolveText(config.description) : void 0;
|
|
226
|
+
$[30] = config.description;
|
|
227
|
+
$[31] = resolveText;
|
|
228
|
+
$[32] = t16;
|
|
229
|
+
} else t16 = $[32];
|
|
230
|
+
const t17 = isFetching && !isLoading;
|
|
231
|
+
let t18;
|
|
232
|
+
if ($[33] === Symbol.for("react.memo_cache_sentinel")) {
|
|
233
|
+
t18 = /* @__PURE__ */ jsx(ChartWidgetSkeleton, {});
|
|
234
|
+
$[33] = t18;
|
|
235
|
+
} else t18 = $[33];
|
|
236
|
+
let t19;
|
|
237
|
+
if ($[34] !== error) {
|
|
238
|
+
t19 = error instanceof Error ? error : error ? new Error(String(error)) : null;
|
|
239
|
+
$[34] = error;
|
|
240
|
+
$[35] = t19;
|
|
241
|
+
} else t19 = $[35];
|
|
242
|
+
let t20;
|
|
243
|
+
if ($[36] !== refetch) {
|
|
244
|
+
t20 = () => refetch();
|
|
245
|
+
$[36] = refetch;
|
|
246
|
+
$[37] = t20;
|
|
247
|
+
} else t20 = $[37];
|
|
248
|
+
let t21;
|
|
249
|
+
if ($[38] !== chartContent || $[39] !== config.actions || $[40] !== config.cardVariant || $[41] !== config.className || $[42] !== displayLabel || $[43] !== isLoading || $[44] !== t16 || $[45] !== t17 || $[46] !== t19 || $[47] !== t20) {
|
|
250
|
+
t21 = /* @__PURE__ */ jsx(WidgetCard, {
|
|
223
251
|
title: displayLabel,
|
|
252
|
+
description: t16,
|
|
253
|
+
variant: config.cardVariant,
|
|
224
254
|
isLoading,
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
255
|
+
isRefreshing: t17,
|
|
256
|
+
loadingSkeleton: t18,
|
|
257
|
+
error: t19,
|
|
258
|
+
onRefresh: t20,
|
|
259
|
+
actions: config.actions,
|
|
260
|
+
className: config.className,
|
|
228
261
|
children: chartContent
|
|
229
262
|
});
|
|
230
|
-
$[
|
|
231
|
-
$[
|
|
232
|
-
$[
|
|
233
|
-
$[
|
|
234
|
-
$[
|
|
235
|
-
$[
|
|
236
|
-
|
|
237
|
-
|
|
263
|
+
$[38] = chartContent;
|
|
264
|
+
$[39] = config.actions;
|
|
265
|
+
$[40] = config.cardVariant;
|
|
266
|
+
$[41] = config.className;
|
|
267
|
+
$[42] = displayLabel;
|
|
268
|
+
$[43] = isLoading;
|
|
269
|
+
$[44] = t16;
|
|
270
|
+
$[45] = t17;
|
|
271
|
+
$[46] = t19;
|
|
272
|
+
$[47] = t20;
|
|
273
|
+
$[48] = t21;
|
|
274
|
+
} else t21 = $[48];
|
|
275
|
+
return t21;
|
|
238
276
|
}
|
|
239
277
|
/**
|
|
240
278
|
* Renders the appropriate chart type as a proper component
|