@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.
Files changed (249) hide show
  1. package/README.md +34 -5
  2. package/dist/client/blocks/block-renderer.d.mts +2 -2
  3. package/dist/client/blocks/block-renderer.mjs +4 -1
  4. package/dist/client/builder/types/action-types.d.mts +31 -3
  5. package/dist/client/builder/types/collection-types.d.mts +140 -0
  6. package/dist/client/builder/types/ui-config.d.mts +16 -2
  7. package/dist/client/builder/types/views.d.mts +57 -0
  8. package/dist/client/builder/types/widget-types.d.mts +5 -0
  9. package/dist/client/components/actions/action-button.mjs +137 -199
  10. package/dist/client/components/actions/action-dialog.mjs +198 -156
  11. package/dist/client/components/actions/confirmation-dialog.mjs +2 -2
  12. package/dist/client/components/actions/header-actions.mjs +52 -53
  13. package/dist/client/components/admin-link.d.mts +2 -2
  14. package/dist/client/components/auth/auth-loading.mjs +41 -18
  15. package/dist/client/components/blocks/block-fields-renderer.mjs +64 -28
  16. package/dist/client/components/blocks/block-insert-button.mjs +4 -4
  17. package/dist/client/components/blocks/block-item.mjs +2 -2
  18. package/dist/client/components/blocks/block-library-sidebar.mjs +2 -2
  19. package/dist/client/components/component-renderer.mjs +1 -1
  20. package/dist/client/components/fields/array-field.mjs +14 -14
  21. package/dist/client/components/fields/asset-preview-field.mjs +1 -1
  22. package/dist/client/components/fields/blocks-field/blocks-field.mjs +84 -104
  23. package/dist/client/components/fields/json-field.mjs +2 -2
  24. package/dist/client/components/fields/object-array-field.mjs +22 -22
  25. package/dist/client/components/fields/object-field.mjs +5 -5
  26. package/dist/client/components/fields/relation/displays/cards-display.mjs +16 -9
  27. package/dist/client/components/fields/relation/displays/chips-display.mjs +15 -12
  28. package/dist/client/components/fields/relation/displays/grid-display.mjs +15 -11
  29. package/dist/client/components/fields/relation/displays/list-display.mjs +33 -20
  30. package/dist/client/components/fields/relation/displays/table-display.mjs +62 -93
  31. package/dist/client/components/fields/relation/relation-items-display.mjs +1 -1
  32. package/dist/client/components/fields/relation-picker.mjs +7 -6
  33. package/dist/client/components/fields/relation-select.mjs +71 -47
  34. package/dist/client/components/fields/rich-text-editor/bubble-menu.mjs +392 -82
  35. package/dist/client/components/fields/rich-text-editor/extensions.mjs +54 -23
  36. package/dist/client/components/fields/rich-text-editor/image-popover.mjs +24 -50
  37. package/dist/client/components/fields/rich-text-editor/image-upload.mjs +66 -0
  38. package/dist/client/components/fields/rich-text-editor/index.d.mts +38 -0
  39. package/dist/client/components/fields/rich-text-editor/index.mjs +637 -376
  40. package/dist/client/components/fields/rich-text-editor/link-utils.mjs +26 -0
  41. package/dist/client/components/fields/rich-text-editor/presets.d.mts +10 -0
  42. package/dist/client/components/fields/rich-text-editor/slash-commands.mjs +27 -6
  43. package/dist/client/components/fields/rich-text-editor/toolbar.mjs +464 -346
  44. package/dist/client/components/fields/rich-text-editor/types.d.mts +77 -0
  45. package/dist/client/components/fields/upload-field.mjs +45 -49
  46. package/dist/client/components/filter-builder/columns-tab.mjs +69 -62
  47. package/dist/client/components/filter-builder/filter-builder-sheet.mjs +473 -308
  48. package/dist/client/components/filter-builder/filters-tab.mjs +109 -82
  49. package/dist/client/components/filter-builder/saved-views-tab.mjs +300 -198
  50. package/dist/client/components/history-sidebar.mjs +850 -340
  51. package/dist/client/components/layout/field-layout-renderer.mjs +6 -5
  52. package/dist/client/components/locale-switcher.mjs +8 -8
  53. package/dist/client/components/media/media-grid.mjs +12 -9
  54. package/dist/client/components/media/media-picker-dialog.mjs +242 -230
  55. package/dist/client/components/preview/live-preview-mode.mjs +1 -1
  56. package/dist/client/components/primitives/asset-preview.mjs +37 -22
  57. package/dist/client/components/primitives/date-input.mjs +212 -249
  58. package/dist/client/components/primitives/dropzone.mjs +192 -159
  59. package/dist/client/components/primitives/field-select-control.mjs +93 -0
  60. package/dist/client/components/primitives/select-multi.mjs +251 -230
  61. package/dist/client/components/primitives/select-single.mjs +345 -290
  62. package/dist/client/components/primitives/time-input.mjs +2 -2
  63. package/dist/client/components/sheets/resource-sheet.mjs +2 -0
  64. package/dist/client/components/ui/accordion.mjs +4 -4
  65. package/dist/client/components/ui/alert.mjs +3 -3
  66. package/dist/client/components/ui/badge.mjs +4 -4
  67. package/dist/client/components/ui/button.mjs +47 -37
  68. package/dist/client/components/ui/card.mjs +2 -2
  69. package/dist/client/components/ui/checkbox.mjs +1 -1
  70. package/dist/client/components/ui/command.mjs +5 -5
  71. package/dist/client/components/ui/dialog.mjs +3 -3
  72. package/dist/client/components/ui/drawer.mjs +1 -1
  73. package/dist/client/components/ui/dropdown-menu.mjs +157 -15
  74. package/dist/client/components/ui/empty-state.mjs +88 -59
  75. package/dist/client/components/ui/field.mjs +2 -2
  76. package/dist/client/components/ui/input-group.mjs +3 -3
  77. package/dist/client/components/ui/input.mjs +1 -1
  78. package/dist/client/components/ui/kbd.mjs +1 -1
  79. package/dist/client/components/ui/label.mjs +1 -1
  80. package/dist/client/components/ui/popover.mjs +19 -11
  81. package/dist/client/components/ui/scroll-fade.mjs +170 -0
  82. package/dist/client/components/ui/search-input.mjs +1 -1
  83. package/dist/client/components/ui/select.mjs +129 -27
  84. package/dist/client/components/ui/sheet.mjs +54 -34
  85. package/dist/client/components/ui/sidebar.mjs +15 -14
  86. package/dist/client/components/ui/skeleton.mjs +28 -12
  87. package/dist/client/components/ui/switch.mjs +2 -2
  88. package/dist/client/components/ui/table.mjs +82 -74
  89. package/dist/client/components/ui/tabs.mjs +26 -31
  90. package/dist/client/components/ui/textarea.mjs +1 -1
  91. package/dist/client/components/ui/tooltip.mjs +1 -1
  92. package/dist/client/components/widgets/chart-widget.mjs +134 -96
  93. package/dist/client/components/widgets/progress-widget.mjs +59 -34
  94. package/dist/client/components/widgets/quick-actions-widget.mjs +184 -113
  95. package/dist/client/components/widgets/recent-items-widget.mjs +144 -102
  96. package/dist/client/components/widgets/stats-widget.mjs +91 -72
  97. package/dist/client/components/widgets/table-widget.mjs +159 -246
  98. package/dist/client/components/widgets/timeline-widget.mjs +66 -43
  99. package/dist/client/components/widgets/value-widget.mjs +261 -152
  100. package/dist/client/components/widgets/widget-empty-state.mjs +88 -0
  101. package/dist/client/components/widgets/widget-skeletons.mjs +53 -20
  102. package/dist/client/contexts/focus-context.d.mts +2 -2
  103. package/dist/client/hooks/use-action.mjs +63 -55
  104. package/dist/client/hooks/use-audit-history.mjs +1 -65
  105. package/dist/client/hooks/use-collection-validation.mjs +36 -23
  106. package/dist/client/hooks/use-collection.mjs +96 -1
  107. package/dist/client/hooks/use-saved-views.mjs +70 -49
  108. package/dist/client/hooks/use-server-actions.mjs +59 -40
  109. package/dist/client/hooks/use-server-validation.mjs +156 -41
  110. package/dist/client/hooks/use-server-widget-data.mjs +1 -1
  111. package/dist/client/hooks/use-setup-status.d.mts +3 -3
  112. package/dist/client/hooks/use-setup-status.mjs +2 -2
  113. package/dist/client/hooks/use-transition-stage.mjs +2 -10
  114. package/dist/client/hooks/use-validation-error-map.mjs +31 -13
  115. package/dist/client/hooks/use-view-state.mjs +238 -174
  116. package/dist/client/i18n/date-locale.mjs +33 -0
  117. package/dist/client/i18n/hooks.mjs +17 -1
  118. package/dist/client/lib/utils.mjs +3 -2
  119. package/dist/client/preview/block-scope-context.d.mts +2 -2
  120. package/dist/client/preview/preview-banner.d.mts +2 -2
  121. package/dist/client/preview/preview-field.d.mts +4 -4
  122. package/dist/client/preview/preview-field.mjs +2 -2
  123. package/dist/client/runtime/provider.mjs +8 -1
  124. package/dist/client/runtime/translations-provider.mjs +1 -1
  125. package/dist/client/scope/picker.d.mts +2 -2
  126. package/dist/client/scope/provider.d.mts +2 -2
  127. package/dist/client/styles/base.css +1022 -0
  128. package/dist/client/styles/index.css +3 -589
  129. package/dist/client/utils/auto-expand-fields.mjs +4 -2
  130. package/dist/client/utils/keyboard-shortcuts.mjs +26 -0
  131. package/dist/client/utils/use-lazy-component.mjs +80 -0
  132. package/dist/client/views/auth/auth-layout.d.mts +18 -11
  133. package/dist/client/views/auth/auth-layout.mjs +291 -80
  134. package/dist/client/views/auth/forgot-password-form.d.mts +2 -2
  135. package/dist/client/views/auth/forgot-password-form.mjs +2 -2
  136. package/dist/client/views/auth/login-form.d.mts +2 -2
  137. package/dist/client/views/auth/login-form.mjs +1 -1
  138. package/dist/client/views/auth/reset-password-form.d.mts +2 -2
  139. package/dist/client/views/auth/reset-password-form.mjs +2 -2
  140. package/dist/client/views/auth/setup-form.d.mts +2 -2
  141. package/dist/client/views/collection/auto-form-fields.mjs +11 -9
  142. package/dist/client/views/collection/bulk-action-toolbar.mjs +173 -138
  143. package/dist/client/views/collection/cells/complex-cells.mjs +22 -22
  144. package/dist/client/views/collection/cells/primitive-cells.mjs +1 -1
  145. package/dist/client/views/collection/cells/relation-cells.mjs +147 -129
  146. package/dist/client/views/collection/cells/shared/asset-thumbnail.mjs +224 -278
  147. package/dist/client/views/collection/cells/shared/relation-chip.mjs +64 -36
  148. package/dist/client/views/collection/cells/upload-cells.mjs +199 -9
  149. package/dist/client/views/collection/columns/build-columns.mjs +29 -9
  150. package/dist/client/views/collection/columns/column-defaults.mjs +2 -2
  151. package/dist/client/views/collection/field-renderer.mjs +50 -89
  152. package/dist/client/views/collection/form-view.mjs +237 -227
  153. package/dist/client/views/collection/table-view.mjs +1162 -229
  154. package/dist/client/views/collection/view-skeletons.mjs +222 -79
  155. package/dist/client/views/common/global-search.mjs +29 -18
  156. package/dist/client/views/dashboard/dashboard-grid.mjs +678 -501
  157. package/dist/client/views/dashboard/dashboard-widget.mjs +6 -3
  158. package/dist/client/views/dashboard/widget-card.mjs +23 -14
  159. package/dist/client/views/globals/global-form-view.mjs +634 -589
  160. package/dist/client/views/layout/admin-layout-provider.mjs +67 -70
  161. package/dist/client/views/layout/admin-layout.d.mts +3 -6
  162. package/dist/client/views/layout/admin-layout.mjs +149 -172
  163. package/dist/client/views/layout/admin-router.mjs +747 -544
  164. package/dist/client/views/layout/admin-sidebar.d.mts +38 -1
  165. package/dist/client/views/layout/admin-sidebar.mjs +751 -591
  166. package/dist/client/views/layout/admin-theme.d.mts +10 -0
  167. package/dist/client/views/layout/admin-theme.mjs +84 -0
  168. package/dist/client/views/layout/admin-view-layout.mjs +161 -0
  169. package/dist/client/views/pages/accept-invite-page.d.mts +2 -2
  170. package/dist/client/views/pages/accept-invite-page.mjs +49 -26
  171. package/dist/client/views/pages/dashboard-page.d.mts +2 -2
  172. package/dist/client/views/pages/forgot-password-page.d.mts +2 -2
  173. package/dist/client/views/pages/forgot-password-page.mjs +2 -19
  174. package/dist/client/views/pages/invite-page.d.mts +2 -2
  175. package/dist/client/views/pages/invite-page.mjs +2 -19
  176. package/dist/client/views/pages/login-page.d.mts +3 -3
  177. package/dist/client/views/pages/login-page.mjs +4 -21
  178. package/dist/client/views/pages/reset-password-page.d.mts +2 -2
  179. package/dist/client/views/pages/reset-password-page.mjs +3 -20
  180. package/dist/client/views/pages/setup-page.d.mts +2 -2
  181. package/dist/client/views/pages/setup-page.mjs +3 -20
  182. package/dist/client.d.mts +6 -2
  183. package/dist/client.mjs +2 -1
  184. package/dist/components/rich-text/rich-text-renderer.d.mts +2 -2
  185. package/dist/index.d.mts +6 -2
  186. package/dist/index.mjs +2 -1
  187. package/dist/server/augmentation/dashboard.d.mts +67 -3
  188. package/dist/server/augmentation/form-layout.d.mts +21 -0
  189. package/dist/server/augmentation/index.d.mts +1 -1
  190. package/dist/server/codegen/admin-client-template.mjs +4 -0
  191. package/dist/server/fields/blocks.d.mts +1 -1
  192. package/dist/server/fields/blocks.mjs +12 -0
  193. package/dist/server/fields/rich-text.d.mts +1 -1
  194. package/dist/server/fields/rich-text.mjs +8 -0
  195. package/dist/server/i18n/index.mjs +17 -1
  196. package/dist/server/i18n/messages/cs.mjs +23 -0
  197. package/dist/server/i18n/messages/de.mjs +23 -0
  198. package/dist/server/i18n/messages/en.mjs +64 -1
  199. package/dist/server/i18n/messages/es.mjs +23 -0
  200. package/dist/server/i18n/messages/fr.mjs +23 -0
  201. package/dist/server/i18n/messages/pl.mjs +23 -0
  202. package/dist/server/i18n/messages/pt.mjs +23 -0
  203. package/dist/server/i18n/messages/sk.mjs +83 -1
  204. package/dist/server/modules/admin/block/introspection.mjs +4 -1
  205. package/dist/server/modules/admin/block/prefetch.mjs +12 -2
  206. package/dist/server/modules/admin/collections/account.d.mts +50 -50
  207. package/dist/server/modules/admin/collections/admin-locks.d.mts +54 -54
  208. package/dist/server/modules/admin/collections/admin-preferences.d.mts +39 -39
  209. package/dist/server/modules/admin/collections/admin-saved-views.d.mts +47 -47
  210. package/dist/server/modules/admin/collections/apikey.d.mts +64 -64
  211. package/dist/server/modules/admin/collections/assets.d.mts +20 -20
  212. package/dist/server/modules/admin/collections/assets.mjs +0 -1
  213. package/dist/server/modules/admin/collections/session.d.mts +42 -42
  214. package/dist/server/modules/admin/collections/user.d.mts +40 -28
  215. package/dist/server/modules/admin/collections/user.mjs +40 -9
  216. package/dist/server/modules/admin/collections/verification.d.mts +36 -36
  217. package/dist/server/modules/admin/dto/admin-config.dto.mjs +2 -0
  218. package/dist/server/modules/admin/factories.mjs +7 -18
  219. package/dist/server/modules/admin/index.d.mts +1 -1
  220. package/dist/server/modules/admin/routes/admin-config.d.mts +2 -2
  221. package/dist/server/modules/admin/routes/admin-config.mjs +34 -16
  222. package/dist/server/modules/admin/routes/execute-action.d.mts +9 -9
  223. package/dist/server/modules/admin/routes/execute-action.mjs +33 -0
  224. package/dist/server/modules/admin/routes/locales.d.mts +2 -2
  225. package/dist/server/modules/admin/routes/preview.d.mts +11 -11
  226. package/dist/server/modules/admin/routes/reactive.d.mts +9 -9
  227. package/dist/server/modules/admin/routes/setup.d.mts +10 -10
  228. package/dist/server/modules/admin/routes/setup.mjs +7 -7
  229. package/dist/server/modules/admin/routes/translations.d.mts +4 -4
  230. package/dist/server/modules/admin/routes/translations.mjs +5 -1
  231. package/dist/server/modules/admin/routes/widget-data.d.mts +5 -5
  232. package/dist/server/modules/admin-preferences/collections/admin-preferences.mjs +1 -1
  233. package/dist/server/modules/admin-preferences/collections/saved-views.d.mts +25 -25
  234. package/dist/server/modules/audit/.generated/module.d.mts +7 -7
  235. package/dist/server/modules/audit/.generated/module.mjs +1 -1
  236. package/dist/server/modules/audit/collections/audit-log.d.mts +39 -39
  237. package/dist/server/modules/audit/collections/audit-log.mjs +1 -1
  238. package/dist/server/modules/audit/config/app.mjs +99 -42
  239. package/dist/server/modules/audit/jobs/audit-cleanup.mjs +1 -1
  240. package/dist/server/plugin.mjs +4 -2
  241. package/dist/server/proxy-factories.d.mts +4 -3
  242. package/dist/server/proxy-factories.mjs +34 -8
  243. package/dist/shared/types/saved-views.types.d.mts +2 -0
  244. package/package.json +6 -4
  245. package/dist/client/components/fields/rich-text-editor/link-popover.mjs +0 -85
  246. package/dist/client/components/ui/spinner.mjs +0 -52
  247. package/dist/client/components/ui/toolbar.mjs +0 -136
  248. package/dist/client/contexts/breadcrumb-context.mjs +0 -60
  249. 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-xs", className);
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 w-full overflow-x-auto",
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 [&_tr]:border-border bg-card sticky top-0 z-10 [&_tr]:border-b", className);
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 [&_tr:last-child]:border-0", className);
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
- function TableRow(t0) {
107
- const $ = c(8);
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 bg-background hover:bg-muted data-[state=selected]:bg-accent border-border h-10 border-b transition-colors", className);
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] = t1;
134
- $[7] = t2;
135
- } else t2 = $[7];
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(21);
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
- let t4;
165
- if ($[6] !== className || $[7] !== t2 || $[8] !== t3) {
166
- t4 = cn("qa-table__head text-muted-foreground bg-card h-10 min-w-[100px] px-4 text-left align-middle font-mono text-[10px] font-semibold tracking-[0.08em] whitespace-nowrap uppercase [&:has([role=checkbox])]:px-2", t2, t3, className);
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
- } else t4 = $[9];
172
- let t5;
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 ($[13] !== style || $[14] !== t5) {
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
- ...t5
189
+ ...t6
184
190
  };
185
- $[13] = style;
186
- $[14] = t5;
191
+ $[14] = style;
187
192
  $[15] = t6;
188
- } else t6 = $[15];
189
- let t7;
190
- if ($[16] !== props || $[17] !== t1 || $[18] !== t4 || $[19] !== t6) {
191
- t7 = /* @__PURE__ */ jsx("th", {
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: t4,
195
- style: t6,
200
+ className: t5,
201
+ style: t7,
196
202
  ...props
197
203
  });
198
- $[16] = props;
199
- $[17] = t1;
200
- $[18] = t4;
201
- $[19] = t6;
204
+ $[17] = props;
205
+ $[18] = t1;
206
+ $[19] = t5;
202
207
  $[20] = t7;
203
- } else t7 = $[20];
204
- return t7;
208
+ $[21] = t8;
209
+ } else t8 = $[21];
210
+ return t8;
205
211
  }
206
212
  function TableCell(t0) {
207
- const $ = c(21);
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 bg-inherit";
231
- const t3 = showStickyBorder && "after:bg-border after:absolute after:top-0 after:right-0 after:bottom-0 after:w-px";
232
- let t4;
233
- if ($[6] !== className || $[7] !== t2 || $[8] !== t3) {
234
- t4 = cn("qa-table__cell min-w-[100px] px-4 py-2.5 align-middle whitespace-nowrap [&:has([role=checkbox])]:px-2", t2, t3, className);
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
- } else t4 = $[9];
240
- let t5;
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 ($[13] !== style || $[14] !== t5) {
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
- ...t5
259
+ ...t6
252
260
  };
253
- $[13] = style;
254
- $[14] = t5;
261
+ $[14] = style;
255
262
  $[15] = t6;
256
- } else t6 = $[15];
257
- let t7;
258
- if ($[16] !== props.children || $[17] !== t1 || $[18] !== t4 || $[19] !== t6) {
259
- t7 = /* @__PURE__ */ jsx("td", {
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: t4,
263
- style: t6,
264
- children: props.children
270
+ className: t5,
271
+ style: t7,
272
+ ...props
265
273
  });
266
- $[16] = props.children;
267
- $[17] = t1;
268
- $[18] = t4;
269
- $[19] = t6;
274
+ $[17] = props;
275
+ $[18] = t1;
276
+ $[19] = t5;
270
277
  $[20] = t7;
271
- } else t7 = $[20];
272
- return t7;
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 tabsListVariants = cva("qa-tabs__list group/tabs-list text-muted-foreground inline-flex w-fit items-center justify-center p-[3px] group-data-horizontal/tabs:h-8 group-data-[orientation=vertical]/tabs:h-fit group-data-[orientation=vertical]/tabs:flex-col", {
49
- variants: { variant: {
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 t1;
53
+ let variant;
60
54
  if ($[0] !== t0) {
61
- ({className, variant: t1, ...props} = t0);
55
+ ({className, variant, ...props} = t0);
62
56
  $[0] = t0;
63
57
  $[1] = className;
64
58
  $[2] = props;
65
- $[3] = t1;
59
+ $[3] = variant;
66
60
  } else {
67
61
  className = $[1];
68
62
  props = $[2];
69
- t1 = $[3];
63
+ variant = $[3];
70
64
  }
71
- const variant = t1 === void 0 ? "default" : t1;
72
- let t2;
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 ($[7] !== props || $[8] !== t2 || $[9] !== variant) {
81
- t3 = /* @__PURE__ */ jsx(Tabs.List, {
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": variant,
84
- className: t2,
78
+ "data-variant": t1,
79
+ className: t3,
85
80
  ...props
86
81
  });
87
82
  $[7] = props;
88
- $[8] = t2;
89
- $[9] = variant;
90
- $[10] = t3;
91
- } else t3 = $[10];
92
- return t3;
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 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring text-foreground/60 hover:text-foreground dark:text-muted-foreground dark:hover:text-foreground relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 border border-transparent px-1.5 py-0.5 font-mono text-xs font-medium whitespace-nowrap transition-all group-data-vertical/tabs:py-[calc(--spacing(1.25))] group-data-[orientation=vertical]/tabs:w-full group-data-[orientation=vertical]/tabs:justify-start focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5", "group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent", "data-active:bg-background dark:data-active:text-foreground dark:data-active:border-border dark:data-active:bg-background data-active:text-foreground", "after:bg-primary after:absolute after:opacity-0 after:transition-opacity group-data-[orientation=horizontal]/tabs:after:inset-x-0 group-data-[orientation=horizontal]/tabs:after:bottom-[-5px] group-data-[orientation=horizontal]/tabs:after:h-0.5 group-data-[orientation=vertical]/tabs:after:inset-y-0 group-data-[orientation=vertical]/tabs:after:-right-1 group-data-[orientation=vertical]/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100", className);
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 border-input bg-transparent font-mono focus-visible:border-ring focus-visible:ring-ring/30 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 placeholder:text-muted-foreground flex field-sizing-content min-h-24 w-full resize-none border px-3 py-2.5 text-sm transition-all outline-none focus-visible:ring-[2px] disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:ring-[2px]", className);
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 data-open:animate-in data-open:fade-in-0 data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-closed:animate-out data-closed:fade-out-0 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 bg-card text-foreground border-border z-50 w-fit max-w-xs origin-(--transform-origin) border px-3 py-1.5 text-xs font-mono", className);
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(38);
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
- let t8;
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 ($[6] !== collectionQuery || $[7] !== hasLoader) {
112
- t9 = hasLoader ? [] : Array.isArray(collectionQuery.data?.docs) ? collectionQuery.data.docs : [];
113
- $[6] = collectionQuery;
114
- $[7] = hasLoader;
115
- $[8] = t9;
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 ($[9] !== collection || $[10] !== field || $[11] !== label || $[12] !== resolveText) {
120
- t10 = label ? resolveText(label) : `${formatLabel(collection)} by ${field}`;
121
- $[9] = collection;
122
- $[10] = field;
123
- $[11] = label;
124
- $[12] = resolveText;
125
- $[13] = t10;
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 ($[14] !== serverQuery.data) {
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
- $[16] = t12$2;
145
- } else t12$2 = $[16];
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 ($[17] !== collectionItems || $[18] !== field || $[19] !== timeRange) {
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
- t12$1 = Object.entries(grouped).map(_temp2).sort(_temp3);
161
- $[17] = collectionItems;
162
- $[18] = field;
163
- $[19] = timeRange;
164
- $[20] = t12$1;
165
- } else t12$1 = $[20];
166
- t11 = t12$1;
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 = t11;
169
- let t12;
170
- if ($[21] === Symbol.for("react.memo_cache_sentinel")) {
171
- t12 = /* @__PURE__ */ jsx("div", {
172
- className: "text-muted-foreground flex h-24 items-center justify-center",
173
- children: /* @__PURE__ */ jsx("p", {
174
- className: "text-sm",
175
- children: "No data available"
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
- $[21] = t12;
179
- } else t12 = $[21];
180
- const emptyContent = t12;
181
- let t13;
182
- if ($[22] !== chartData || $[23] !== chartType || $[24] !== color || $[25] !== showGrid) {
183
- t13 = chartData.length === 0 ? emptyContent : /* @__PURE__ */ jsx("div", {
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
- $[22] = chartData;
197
- $[23] = chartType;
198
- $[24] = color;
199
- $[25] = showGrid;
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] !== refetch) {
216
- t16 = () => refetch();
217
- $[30] = refetch;
218
- $[31] = t16;
219
- } else t16 = $[31];
220
- let t17;
221
- if ($[32] !== chartContent || $[33] !== displayLabel || $[34] !== isLoading || $[35] !== t15 || $[36] !== t16) {
222
- t17 = /* @__PURE__ */ jsx(WidgetCard, {
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
- loadingSkeleton: t14,
226
- error: t15,
227
- onRefresh: t16,
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
- $[32] = chartContent;
231
- $[33] = displayLabel;
232
- $[34] = isLoading;
233
- $[35] = t15;
234
- $[36] = t16;
235
- $[37] = t17;
236
- } else t17 = $[37];
237
- return t17;
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