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