@rebasepro/plugin-insights 0.2.3 → 0.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. package/dist/common/src/collections/default-collections.d.ts +9 -0
  2. package/dist/common/src/collections/index.d.ts +1 -0
  3. package/dist/common/src/util/permissions.d.ts +1 -0
  4. package/dist/core/src/components/LoginView/LoginView.d.ts +25 -1
  5. package/dist/core/src/components/common/types.d.ts +10 -7
  6. package/dist/core/src/components/common/useDebouncedData.d.ts +1 -1
  7. package/dist/core/src/core/RebaseProps.d.ts +13 -2
  8. package/dist/core/src/core/RebaseRouter.d.ts +1 -1
  9. package/dist/core/src/hooks/data/useCollectionFetch.d.ts +12 -1
  10. package/dist/core/src/hooks/index.d.ts +0 -1
  11. package/dist/core/src/util/entity_cache.d.ts +0 -5
  12. package/dist/core/src/util/index.d.ts +0 -2
  13. package/dist/core/src/util/useStorageUploadController.d.ts +2 -2
  14. package/dist/formex/src/utils.d.ts +2 -2
  15. package/dist/index.es.js +216 -164
  16. package/dist/index.es.js.map +1 -1
  17. package/dist/index.umd.js +216 -164
  18. package/dist/index.umd.js.map +1 -1
  19. package/dist/plugin-insights/src/components/InsightWidget.d.ts +2 -2
  20. package/dist/plugin-insights/src/components/InsightWidgetSkeleton.d.ts +3 -1
  21. package/dist/plugin-insights/src/components/InsightsScorecardView.d.ts +3 -1
  22. package/dist/types/src/controllers/auth.d.ts +4 -26
  23. package/dist/types/src/controllers/client.d.ts +25 -43
  24. package/dist/types/src/controllers/collection_registry.d.ts +1 -1
  25. package/dist/types/src/controllers/data.d.ts +4 -0
  26. package/dist/types/src/controllers/data_driver.d.ts +23 -0
  27. package/dist/types/src/controllers/registry.d.ts +5 -4
  28. package/dist/types/src/rebase_context.d.ts +1 -1
  29. package/dist/types/src/types/auth_adapter.d.ts +5 -60
  30. package/dist/types/src/types/backend.d.ts +2 -2
  31. package/dist/types/src/types/backend_hooks.d.ts +2 -17
  32. package/dist/types/src/types/collections.d.ts +0 -4
  33. package/dist/types/src/types/component_ref.d.ts +1 -1
  34. package/dist/types/src/types/cron.d.ts +1 -1
  35. package/dist/types/src/types/entity_views.d.ts +1 -0
  36. package/dist/types/src/types/export_import.d.ts +1 -1
  37. package/dist/types/src/types/formex.d.ts +2 -2
  38. package/dist/types/src/types/properties.d.ts +9 -7
  39. package/dist/types/src/types/translations.d.ts +28 -12
  40. package/dist/types/src/types/user_management_delegate.d.ts +22 -57
  41. package/dist/types/src/users/index.d.ts +0 -1
  42. package/dist/types/src/users/user.d.ts +0 -1
  43. package/dist/ui/src/components/Button.d.ts +2 -2
  44. package/dist/ui/src/components/ErrorBoundary.d.ts +25 -3
  45. package/dist/ui/src/components/VirtualTable/VirtualTable.d.ts +1 -1
  46. package/dist/ui/src/components/VirtualTable/VirtualTableCell.d.ts +6 -6
  47. package/dist/ui/src/components/VirtualTable/VirtualTableHeader.d.ts +8 -8
  48. package/dist/ui/src/components/VirtualTable/VirtualTableHeaderRow.d.ts +1 -1
  49. package/dist/ui/src/components/VirtualTable/VirtualTableProps.d.ts +11 -11
  50. package/dist/ui/src/components/VirtualTable/VirtualTableRow.d.ts +1 -1
  51. package/dist/ui/src/components/VirtualTable/types.d.ts +9 -9
  52. package/dist/ui/src/hooks/useDebounceCallback.d.ts +1 -1
  53. package/dist/ui/src/util/debounce.d.ts +1 -1
  54. package/package.json +4 -3
  55. package/src/components/InsightWidget.tsx +33 -4
  56. package/src/components/InsightWidgetSkeleton.tsx +7 -1
  57. package/src/components/InsightsScorecardView.tsx +4 -1
  58. package/src/engine/InsightsCache.test.ts +56 -0
  59. package/src/engine/useInsightsData.ts +1 -0
  60. package/dist/core/src/hooks/useValidateAuthenticator.d.ts +0 -21
  61. package/dist/core/src/util/icon_synonyms.d.ts +0 -1
  62. package/dist/core/src/util/useTraceUpdate.d.ts +0 -2
  63. package/dist/types/src/users/roles.d.ts +0 -22
package/dist/index.umd.js CHANGED
@@ -143,6 +143,7 @@
143
143
  setData(result_0);
144
144
  }
145
145
  }).catch((err_0) => {
146
+ cache.invalidate(cacheKey);
146
147
  if (!cancelled) {
147
148
  setError(err_0 instanceof Error ? err_0 : new Error(String(err_0)));
148
149
  }
@@ -213,13 +214,14 @@
213
214
  return formatted;
214
215
  }
215
216
  function InsightsScorecardView(t0) {
216
- const $ = reactCompilerRuntime.c(58);
217
+ const $ = reactCompilerRuntime.c(59);
217
218
  const {
218
219
  config,
219
220
  data,
220
221
  title,
221
222
  compact: t1,
222
- embedded: t2
223
+ embedded: t2,
224
+ fixedHeight
223
225
  } = t0;
224
226
  const compact = t1 === void 0 ? false : t1;
225
227
  const embedded = t2 === void 0 ? false : t2;
@@ -379,113 +381,117 @@
379
381
  }
380
382
  const baseClass = t7;
381
383
  let t8;
382
- if ($[28] !== embedded || $[29] !== isSmall) {
383
- t8 = embedded ? void 0 : {
384
+ if ($[28] !== embedded || $[29] !== fixedHeight || $[30] !== isSmall) {
385
+ t8 = embedded ? void 0 : fixedHeight ? {
386
+ height: fixedHeight
387
+ } : {
384
388
  minHeight: isSmall ? 68 : 92
385
389
  };
386
390
  $[28] = embedded;
387
- $[29] = isSmall;
388
- $[30] = t8;
391
+ $[29] = fixedHeight;
392
+ $[30] = isSmall;
393
+ $[31] = t8;
389
394
  } else {
390
- t8 = $[30];
395
+ t8 = $[31];
391
396
  }
392
397
  const t9 = `flex items-center justify-between ${isSmall ? "mb-1" : "mb-2"}`;
393
398
  const t10 = `font-medium leading-snug truncate text-surface-500 dark:text-surface-400 ${isSmall ? "text-[11px]" : "text-xs"}`;
394
399
  let t11;
395
- if ($[31] !== t10 || $[32] !== title) {
400
+ if ($[32] !== t10 || $[33] !== title) {
396
401
  t11 = /* @__PURE__ */ jsxRuntime.jsx("span", { className: t10, children: title });
397
- $[31] = t10;
398
- $[32] = title;
399
- $[33] = t11;
402
+ $[32] = t10;
403
+ $[33] = title;
404
+ $[34] = t11;
400
405
  } else {
401
- t11 = $[33];
406
+ t11 = $[34];
402
407
  }
403
408
  let t12;
404
- if ($[34] !== config.dateRange || $[35] !== isSmall) {
409
+ if ($[35] !== config.dateRange || $[36] !== isSmall) {
405
410
  t12 = config.dateRange && !isSmall && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] text-surface-400 dark:text-surface-500 truncate mt-0.5", children: config.dateRange });
406
- $[34] = config.dateRange;
407
- $[35] = isSmall;
408
- $[36] = t12;
411
+ $[35] = config.dateRange;
412
+ $[36] = isSmall;
413
+ $[37] = t12;
409
414
  } else {
410
- t12 = $[36];
415
+ t12 = $[37];
411
416
  }
412
417
  let t13;
413
- if ($[37] !== t11 || $[38] !== t12) {
418
+ if ($[38] !== t11 || $[39] !== t12) {
414
419
  t13 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col min-w-0", children: [
415
420
  t11,
416
421
  t12
417
422
  ] });
418
- $[37] = t11;
419
- $[38] = t12;
420
- $[39] = t13;
423
+ $[38] = t11;
424
+ $[39] = t12;
425
+ $[40] = t13;
421
426
  } else {
422
- t13 = $[39];
427
+ t13 = $[40];
423
428
  }
424
429
  let t14;
425
- if ($[40] !== iconElement) {
430
+ if ($[41] !== iconElement) {
426
431
  t14 = iconElement && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-2 shrink-0", children: iconElement });
427
- $[40] = iconElement;
428
- $[41] = t14;
432
+ $[41] = iconElement;
433
+ $[42] = t14;
429
434
  } else {
430
- t14 = $[41];
435
+ t14 = $[42];
431
436
  }
432
437
  let t15;
433
- if ($[42] !== t13 || $[43] !== t14 || $[44] !== t9) {
438
+ if ($[43] !== t13 || $[44] !== t14 || $[45] !== t9) {
434
439
  t15 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: t9, children: [
435
440
  t13,
436
441
  t14
437
442
  ] });
438
- $[42] = t13;
439
- $[43] = t14;
440
- $[44] = t9;
441
- $[45] = t15;
443
+ $[43] = t13;
444
+ $[44] = t14;
445
+ $[45] = t9;
446
+ $[46] = t15;
442
447
  } else {
443
- t15 = $[45];
448
+ t15 = $[46];
444
449
  }
445
450
  const t16 = `font-semibold leading-tight tracking-tight break-all text-surface-800 dark:text-surface-100 ${isSmall ? "text-lg" : containerWidth !== null && containerWidth < 300 ? "text-xl" : "text-2xl"}`;
446
451
  let t17;
447
- if ($[46] !== formattedValue || $[47] !== t16) {
452
+ if ($[47] !== formattedValue || $[48] !== t16) {
448
453
  t17 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: t16, children: formattedValue });
449
- $[46] = formattedValue;
450
- $[47] = t16;
451
- $[48] = t17;
454
+ $[47] = formattedValue;
455
+ $[48] = t16;
456
+ $[49] = t17;
452
457
  } else {
453
- t17 = $[48];
458
+ t17 = $[49];
454
459
  }
455
460
  let t18;
456
- if ($[49] !== comparisonElement || $[50] !== isSmall) {
461
+ if ($[50] !== comparisonElement || $[51] !== isSmall) {
457
462
  t18 = comparisonElement && /* @__PURE__ */ jsxRuntime.jsx("div", { className: isSmall ? "mt-0.5" : "mt-1", children: comparisonElement });
458
- $[49] = comparisonElement;
459
- $[50] = isSmall;
460
- $[51] = t18;
463
+ $[50] = comparisonElement;
464
+ $[51] = isSmall;
465
+ $[52] = t18;
461
466
  } else {
462
- t18 = $[51];
467
+ t18 = $[52];
463
468
  }
464
469
  let t19;
465
- if ($[52] !== baseClass || $[53] !== t15 || $[54] !== t17 || $[55] !== t18 || $[56] !== t8) {
470
+ if ($[53] !== baseClass || $[54] !== t15 || $[55] !== t17 || $[56] !== t18 || $[57] !== t8) {
466
471
  t19 = /* @__PURE__ */ jsxRuntime.jsxs("div", { ref: containerRef, className: baseClass, style: t8, children: [
467
472
  t15,
468
473
  t17,
469
474
  t18
470
475
  ] });
471
- $[52] = baseClass;
472
- $[53] = t15;
473
- $[54] = t17;
474
- $[55] = t18;
475
- $[56] = t8;
476
- $[57] = t19;
476
+ $[53] = baseClass;
477
+ $[54] = t15;
478
+ $[55] = t17;
479
+ $[56] = t18;
480
+ $[57] = t8;
481
+ $[58] = t19;
477
482
  } else {
478
- t19 = $[57];
483
+ t19 = $[58];
479
484
  }
480
485
  return t19;
481
486
  }
482
487
  InsightsScorecardView.displayName = "InsightsScorecardView";
483
488
  function InsightWidgetSkeleton(t0) {
484
- const $ = reactCompilerRuntime.c(17);
489
+ const $ = reactCompilerRuntime.c(18);
485
490
  const {
486
491
  config,
487
492
  compact: t1,
488
- embedded: t2
493
+ embedded: t2,
494
+ fixedHeight
489
495
  } = t0;
490
496
  const compact = t1 === void 0 ? false : t1;
491
497
  const embedded = t2 === void 0 ? false : t2;
@@ -561,25 +567,27 @@
561
567
  return t10;
562
568
  }
563
569
  let t3;
564
- if ($[12] !== embedded || $[13] !== hasComparison || $[14] !== hasDateRange || $[15] !== hasIcon) {
565
- t3 = /* @__PURE__ */ jsxRuntime.jsx(StandardSkeleton, { hasComparison, hasIcon, hasDateRange, embedded });
570
+ if ($[12] !== embedded || $[13] !== fixedHeight || $[14] !== hasComparison || $[15] !== hasDateRange || $[16] !== hasIcon) {
571
+ t3 = /* @__PURE__ */ jsxRuntime.jsx(StandardSkeleton, { hasComparison, hasIcon, hasDateRange, embedded, fixedHeight });
566
572
  $[12] = embedded;
567
- $[13] = hasComparison;
568
- $[14] = hasDateRange;
569
- $[15] = hasIcon;
570
- $[16] = t3;
573
+ $[13] = fixedHeight;
574
+ $[14] = hasComparison;
575
+ $[15] = hasDateRange;
576
+ $[16] = hasIcon;
577
+ $[17] = t3;
571
578
  } else {
572
- t3 = $[16];
579
+ t3 = $[17];
573
580
  }
574
581
  return t3;
575
582
  }
576
583
  function StandardSkeleton(t0) {
577
- const $ = reactCompilerRuntime.c(36);
584
+ const $ = reactCompilerRuntime.c(37);
578
585
  const {
579
586
  hasComparison,
580
587
  hasIcon,
581
588
  hasDateRange,
582
- embedded
589
+ embedded,
590
+ fixedHeight
583
591
  } = t0;
584
592
  const containerRef = React.useRef(null);
585
593
  const [containerWidth, setContainerWidth] = React.useState(null);
@@ -626,122 +634,131 @@
626
634
  t4 = $[5];
627
635
  }
628
636
  let t5;
629
- if ($[6] !== embedded || $[7] !== isSmall) {
630
- t5 = embedded ? void 0 : {
637
+ if ($[6] !== embedded || $[7] !== fixedHeight || $[8] !== isSmall) {
638
+ t5 = embedded ? void 0 : fixedHeight ? {
639
+ height: fixedHeight
640
+ } : {
631
641
  minHeight: isSmall ? 68 : 92
632
642
  };
633
643
  $[6] = embedded;
634
- $[7] = isSmall;
635
- $[8] = t5;
644
+ $[7] = fixedHeight;
645
+ $[8] = isSmall;
646
+ $[9] = t5;
636
647
  } else {
637
- t5 = $[8];
648
+ t5 = $[9];
638
649
  }
639
650
  const t6 = `flex items-center justify-between ${isSmall ? "mb-1" : "mb-2"}`;
640
651
  let t7;
641
- if ($[9] !== titleHeight) {
652
+ if ($[10] !== titleHeight) {
642
653
  t7 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "bg-surface-200 dark:bg-surface-700 rounded", style: {
643
654
  height: titleHeight,
644
655
  width: "60%"
645
656
  } });
646
- $[9] = titleHeight;
647
- $[10] = t7;
657
+ $[10] = titleHeight;
658
+ $[11] = t7;
648
659
  } else {
649
- t7 = $[10];
660
+ t7 = $[11];
650
661
  }
651
662
  let t8;
652
- if ($[11] !== hasDateRange || $[12] !== isSmall) {
663
+ if ($[12] !== hasDateRange || $[13] !== isSmall) {
653
664
  t8 = hasDateRange && !isSmall && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "bg-surface-200/60 dark:bg-surface-700/60 rounded mt-0.5", style: {
654
665
  height: 14,
655
666
  width: "40%"
656
667
  } });
657
- $[11] = hasDateRange;
658
- $[12] = isSmall;
659
- $[13] = t8;
668
+ $[12] = hasDateRange;
669
+ $[13] = isSmall;
670
+ $[14] = t8;
660
671
  } else {
661
- t8 = $[13];
672
+ t8 = $[14];
662
673
  }
663
674
  let t9;
664
- if ($[14] !== t7 || $[15] !== t8) {
675
+ if ($[15] !== t7 || $[16] !== t8) {
665
676
  t9 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col min-w-0", children: [
666
677
  t7,
667
678
  t8
668
679
  ] });
669
- $[14] = t7;
670
- $[15] = t8;
671
- $[16] = t9;
680
+ $[15] = t7;
681
+ $[16] = t8;
682
+ $[17] = t9;
672
683
  } else {
673
- t9 = $[16];
684
+ t9 = $[17];
674
685
  }
675
686
  let t10;
676
- if ($[17] !== hasIcon || $[18] !== iconSize) {
687
+ if ($[18] !== hasIcon || $[19] !== iconSize) {
677
688
  t10 = hasIcon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-2 shrink-0", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "bg-surface-200 dark:bg-surface-700 rounded", style: {
678
689
  height: iconSize,
679
690
  width: iconSize
680
691
  } }) });
681
- $[17] = hasIcon;
682
- $[18] = iconSize;
683
- $[19] = t10;
692
+ $[18] = hasIcon;
693
+ $[19] = iconSize;
694
+ $[20] = t10;
684
695
  } else {
685
- t10 = $[19];
696
+ t10 = $[20];
686
697
  }
687
698
  let t11;
688
- if ($[20] !== t10 || $[21] !== t6 || $[22] !== t9) {
699
+ if ($[21] !== t10 || $[22] !== t6 || $[23] !== t9) {
689
700
  t11 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: t6, children: [
690
701
  t9,
691
702
  t10
692
703
  ] });
693
- $[20] = t10;
694
- $[21] = t6;
695
- $[22] = t9;
696
- $[23] = t11;
704
+ $[21] = t10;
705
+ $[22] = t6;
706
+ $[23] = t9;
707
+ $[24] = t11;
697
708
  } else {
698
- t11 = $[23];
709
+ t11 = $[24];
699
710
  }
700
711
  let t12;
701
- if ($[24] !== valueHeight) {
712
+ if ($[25] !== valueHeight) {
702
713
  t12 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "bg-surface-200 dark:bg-surface-700 rounded", style: {
703
714
  height: valueHeight,
704
715
  width: "40%"
705
716
  } });
706
- $[24] = valueHeight;
707
- $[25] = t12;
717
+ $[25] = valueHeight;
718
+ $[26] = t12;
708
719
  } else {
709
- t12 = $[25];
720
+ t12 = $[26];
710
721
  }
711
722
  let t13;
712
- if ($[26] !== hasComparison || $[27] !== isSmall) {
723
+ if ($[27] !== hasComparison || $[28] !== isSmall) {
713
724
  t13 = hasComparison && /* @__PURE__ */ jsxRuntime.jsx("div", { className: isSmall ? "mt-0.5" : "mt-1", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "bg-surface-200/60 dark:bg-surface-700/60 rounded", style: {
714
725
  height: 16,
715
726
  width: "25%"
716
727
  } }) });
717
- $[26] = hasComparison;
718
- $[27] = isSmall;
719
- $[28] = t13;
728
+ $[27] = hasComparison;
729
+ $[28] = isSmall;
730
+ $[29] = t13;
720
731
  } else {
721
- t13 = $[28];
732
+ t13 = $[29];
722
733
  }
723
734
  let t14;
724
- if ($[29] !== t11 || $[30] !== t12 || $[31] !== t13 || $[32] !== t3 || $[33] !== t4 || $[34] !== t5) {
735
+ if ($[30] !== t11 || $[31] !== t12 || $[32] !== t13 || $[33] !== t3 || $[34] !== t4 || $[35] !== t5) {
725
736
  t14 = /* @__PURE__ */ jsxRuntime.jsxs("div", { ref: t3, className: t4, style: t5, children: [
726
737
  t11,
727
738
  t12,
728
739
  t13
729
740
  ] });
730
- $[29] = t11;
731
- $[30] = t12;
732
- $[31] = t13;
733
- $[32] = t3;
734
- $[33] = t4;
735
- $[34] = t5;
736
- $[35] = t14;
741
+ $[30] = t11;
742
+ $[31] = t12;
743
+ $[32] = t13;
744
+ $[33] = t3;
745
+ $[34] = t4;
746
+ $[35] = t5;
747
+ $[36] = t14;
737
748
  } else {
738
- t14 = $[35];
749
+ t14 = $[36];
739
750
  }
740
751
  return t14;
741
752
  }
742
753
  InsightWidgetSkeleton.displayName = "InsightWidgetSkeleton";
754
+ function computeFixedHeight(config) {
755
+ let h = 86.5;
756
+ if (config.dateRange) h += 16;
757
+ if (config.comparison) h += 20;
758
+ return Math.ceil(h);
759
+ }
743
760
  function InsightWidget(t0) {
744
- const $ = reactCompilerRuntime.c(25);
761
+ const $ = reactCompilerRuntime.c(37);
745
762
  const {
746
763
  definition,
747
764
  collectionSlug,
@@ -771,82 +788,117 @@
771
788
  loading,
772
789
  error
773
790
  } = useInsightsData(definition, t3);
791
+ let t4;
792
+ if ($[4] !== compact || $[5] !== definition.scorecard || $[6] !== embedded) {
793
+ t4 = !compact && !embedded ? computeFixedHeight(definition.scorecard) : void 0;
794
+ $[4] = compact;
795
+ $[5] = definition.scorecard;
796
+ $[6] = embedded;
797
+ $[7] = t4;
798
+ } else {
799
+ t4 = $[7];
800
+ }
801
+ const fixedHeight = t4;
774
802
  if (loading) {
775
- let t42;
776
- if ($[4] !== compact || $[5] !== definition.scorecard || $[6] !== embedded) {
777
- t42 = /* @__PURE__ */ jsxRuntime.jsx(InsightWidgetSkeleton, { config: definition.scorecard, compact, embedded });
778
- $[4] = compact;
779
- $[5] = definition.scorecard;
780
- $[6] = embedded;
781
- $[7] = t42;
803
+ let t52;
804
+ if ($[8] !== compact || $[9] !== definition.scorecard || $[10] !== embedded || $[11] !== fixedHeight) {
805
+ t52 = /* @__PURE__ */ jsxRuntime.jsx(InsightWidgetSkeleton, { config: definition.scorecard, compact, embedded, fixedHeight });
806
+ $[8] = compact;
807
+ $[9] = definition.scorecard;
808
+ $[10] = embedded;
809
+ $[11] = fixedHeight;
810
+ $[12] = t52;
782
811
  } else {
783
- t42 = $[7];
812
+ t52 = $[12];
784
813
  }
785
- return t42;
814
+ return t52;
786
815
  }
787
816
  if (error) {
788
- const t42 = `text-red-500/70 dark:text-red-400/70 text-[0.8125rem] ${embedded ? "px-5 py-4 h-full" : `rounded-lg bg-red-500/5 dark:bg-red-400/5 border border-red-500/10 dark:border-red-400/10 ${compact ? "px-3.5 py-3" : "px-5 py-4"}`}`;
789
- let t52;
790
- if ($[8] !== definition.title) {
791
- t52 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "font-semibold mb-1", children: definition.title });
792
- $[8] = definition.title;
793
- $[9] = t52;
817
+ const t52 = `text-red-500/70 dark:text-red-400/70 text-[0.8125rem] ${embedded ? "px-5 py-4 h-full" : `rounded-lg bg-red-500/5 dark:bg-red-400/5 border border-red-500/10 dark:border-red-400/10 ${compact ? "px-3.5 py-3" : "px-5 py-4"}`}`;
818
+ let t62;
819
+ if ($[13] !== fixedHeight) {
820
+ t62 = fixedHeight ? {
821
+ height: fixedHeight
822
+ } : void 0;
823
+ $[13] = fixedHeight;
824
+ $[14] = t62;
794
825
  } else {
795
- t52 = $[9];
826
+ t62 = $[14];
796
827
  }
797
- let t6;
798
- if ($[10] !== error.message) {
799
- t6 = /* @__PURE__ */ jsxRuntime.jsx("div", { children: error.message });
800
- $[10] = error.message;
801
- $[11] = t6;
828
+ let t7;
829
+ if ($[15] !== definition.title) {
830
+ t7 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "font-semibold mb-1", children: definition.title });
831
+ $[15] = definition.title;
832
+ $[16] = t7;
802
833
  } else {
803
- t6 = $[11];
834
+ t7 = $[16];
804
835
  }
805
- let t7;
806
- if ($[12] !== t42 || $[13] !== t52 || $[14] !== t6) {
807
- t7 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: t42, children: [
808
- t52,
809
- t6
836
+ let t8;
837
+ if ($[17] !== error.message) {
838
+ t8 = /* @__PURE__ */ jsxRuntime.jsx("div", { children: error.message });
839
+ $[17] = error.message;
840
+ $[18] = t8;
841
+ } else {
842
+ t8 = $[18];
843
+ }
844
+ let t9;
845
+ if ($[19] !== t52 || $[20] !== t62 || $[21] !== t7 || $[22] !== t8) {
846
+ t9 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: t52, style: t62, children: [
847
+ t7,
848
+ t8
810
849
  ] });
811
- $[12] = t42;
812
- $[13] = t52;
813
- $[14] = t6;
814
- $[15] = t7;
850
+ $[19] = t52;
851
+ $[20] = t62;
852
+ $[21] = t7;
853
+ $[22] = t8;
854
+ $[23] = t9;
815
855
  } else {
816
- t7 = $[15];
856
+ t9 = $[23];
817
857
  }
818
- return t7;
858
+ return t9;
819
859
  }
820
860
  if (!data || data.rows.length === 0) {
821
- const t42 = `text-surface-400 dark:text-surface-500 text-[0.8125rem] ${embedded ? "px-5 py-4 h-full" : `rounded-lg bg-surface-100 dark:bg-surface-800 border border-surface-200 dark:border-surface-700 ${compact ? "px-3.5 py-3" : "px-5 py-4"}`}`;
822
- let t52;
823
- if ($[16] !== definition.title || $[17] !== t42) {
824
- t52 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: t42, children: [
861
+ const t52 = `text-surface-400 dark:text-surface-500 text-[0.8125rem] ${embedded ? "px-5 py-4 h-full" : `rounded-lg bg-surface-100 dark:bg-surface-800 border border-surface-200 dark:border-surface-700 ${compact ? "px-3.5 py-3" : "px-5 py-4"}`}`;
862
+ let t62;
863
+ if ($[24] !== fixedHeight) {
864
+ t62 = fixedHeight ? {
865
+ height: fixedHeight
866
+ } : void 0;
867
+ $[24] = fixedHeight;
868
+ $[25] = t62;
869
+ } else {
870
+ t62 = $[25];
871
+ }
872
+ let t7;
873
+ if ($[26] !== definition.title || $[27] !== t52 || $[28] !== t62) {
874
+ t7 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: t52, style: t62, children: [
825
875
  definition.title,
826
876
  " — No data"
827
877
  ] });
828
- $[16] = definition.title;
829
- $[17] = t42;
830
- $[18] = t52;
878
+ $[26] = definition.title;
879
+ $[27] = t52;
880
+ $[28] = t62;
881
+ $[29] = t7;
831
882
  } else {
832
- t52 = $[18];
883
+ t7 = $[29];
833
884
  }
834
- return t52;
885
+ return t7;
835
886
  }
836
- const t4 = data.rows[0];
837
- let t5;
838
- if ($[19] !== compact || $[20] !== definition.scorecard || $[21] !== definition.title || $[22] !== embedded || $[23] !== t4) {
839
- t5 = /* @__PURE__ */ jsxRuntime.jsx(InsightsScorecardView, { config: definition.scorecard, data: t4, title: definition.title, compact, embedded });
840
- $[19] = compact;
841
- $[20] = definition.scorecard;
842
- $[21] = definition.title;
843
- $[22] = embedded;
844
- $[23] = t4;
845
- $[24] = t5;
887
+ const t5 = data.rows[0];
888
+ let t6;
889
+ if ($[30] !== compact || $[31] !== definition.scorecard || $[32] !== definition.title || $[33] !== embedded || $[34] !== fixedHeight || $[35] !== t5) {
890
+ t6 = /* @__PURE__ */ jsxRuntime.jsx(InsightsScorecardView, { config: definition.scorecard, data: t5, title: definition.title, compact, embedded, fixedHeight });
891
+ $[30] = compact;
892
+ $[31] = definition.scorecard;
893
+ $[32] = definition.title;
894
+ $[33] = embedded;
895
+ $[34] = fixedHeight;
896
+ $[35] = t5;
897
+ $[36] = t6;
846
898
  } else {
847
- t5 = $[24];
899
+ t6 = $[36];
848
900
  }
849
- return t5;
901
+ return t6;
850
902
  }
851
903
  InsightWidget.displayName = "InsightWidget";
852
904
  function HomeCardInsightSlot(t0) {