@rebasepro/plugin-insights 0.2.4 → 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.
@@ -1,12 +1,9 @@
1
- import { PostgresCollection } from "@rebasepro/types";
1
+ import type { PostgresCollection } from "@rebasepro/types";
2
2
  /**
3
- * Default users collection definition.
3
+ * Default users collection.
4
4
  *
5
- * Shared between the admin UI (for navigation/display) and the backend
6
- * (for schema generation). Both consumers prepend this to the developer's
7
- * collections array and rely on generic slug-based deduplication
8
- * (Map keyed by slug, last-write-wins) so that developer-defined
9
- * collections with the same slug override this default — no hardcoded
10
- * string checks required.
5
+ * Prepended to the developer's collections array by the admin and server.
6
+ * Slug-based dedup (Map keyed by slug, last-write-wins) lets developers
7
+ * override by defining their own collection with `slug: "users"`.
11
8
  */
12
9
  export declare const defaultUsersCollection: PostgresCollection;
@@ -92,10 +92,18 @@ export interface LoginViewProps {
92
92
  * If not set, derived from `authController.capabilities.registration`.
93
93
  */
94
94
  registrationEnabled?: boolean;
95
+ /**
96
+ * Pre-fill the email field (e.g. for demo or testing environments).
97
+ */
98
+ defaultEmail?: string;
99
+ /**
100
+ * Pre-fill the password field (e.g. for demo or testing environments).
101
+ */
102
+ defaultPassword?: string;
95
103
  }
96
104
  /**
97
105
  * Generic login view component that works with any AuthControllerExtended.
98
106
  * Feature-detects capabilities to show/hide login methods.
99
107
  * @group Core
100
108
  */
101
- export declare function LoginView({ logo, authController, noUserComponent, disableSignupScreen, disabled, notAllowedError, googleClientId, githubClientId, linkedinClientId, title, subtitle, needsSetup, registrationEnabled, additionalComponent }: LoginViewProps): import("react/jsx-runtime").JSX.Element;
109
+ export declare function LoginView({ logo, authController, noUserComponent, disableSignupScreen, disabled, notAllowedError, googleClientId, githubClientId, linkedinClientId, title, subtitle, needsSetup, registrationEnabled, additionalComponent, defaultEmail, defaultPassword }: LoginViewProps): import("react/jsx-runtime").JSX.Element;
@@ -16,6 +16,14 @@ export interface CollectionFetchProps<M extends Record<string, any>> {
16
16
  * Number of entities to fetch
17
17
  */
18
18
  itemCount?: number;
19
+ /**
20
+ * Number of items to skip
21
+ */
22
+ offset?: number;
23
+ /**
24
+ * Page number (1-indexed), alternative to offset
25
+ */
26
+ page?: number;
19
27
  /**
20
28
  * Filter the fetched data by the property
21
29
  */
@@ -37,6 +45,7 @@ export interface CollectionFetchResult<M extends Record<string, any>> {
37
45
  dataLoading: boolean;
38
46
  noMoreToLoad: boolean;
39
47
  dataLoadingError?: Error;
48
+ totalCount?: number;
40
49
  }
41
50
  /**
42
51
  * This hook is used to fetch collections using a given collection
@@ -45,7 +54,9 @@ export interface CollectionFetchResult<M extends Record<string, any>> {
45
54
  * @param filterValues
46
55
  * @param sortBy
47
56
  * @param itemCount
57
+ * @param offset
58
+ * @param page
48
59
  * @param searchString
49
60
  * @group Hooks and utilities
50
61
  */
51
- export declare function useCollectionFetch<M extends Record<string, any>, USER extends User>({ path, collection, filterValues, sortBy, itemCount, searchString }: CollectionFetchProps<M>): CollectionFetchResult<M>;
62
+ export declare function useCollectionFetch<M extends Record<string, any>, USER extends User>({ path, collection, filterValues, sortBy, itemCount, offset, page, searchString }: CollectionFetchProps<M>): CollectionFetchResult<M>;
package/dist/index.es.js CHANGED
@@ -215,13 +215,14 @@ function formatNumber(value, format) {
215
215
  return formatted;
216
216
  }
217
217
  function InsightsScorecardView(t0) {
218
- const $ = c(58);
218
+ const $ = c(59);
219
219
  const {
220
220
  config,
221
221
  data,
222
222
  title,
223
223
  compact: t1,
224
- embedded: t2
224
+ embedded: t2,
225
+ fixedHeight
225
226
  } = t0;
226
227
  const compact = t1 === void 0 ? false : t1;
227
228
  const embedded = t2 === void 0 ? false : t2;
@@ -381,113 +382,117 @@ function InsightsScorecardView(t0) {
381
382
  }
382
383
  const baseClass = t7;
383
384
  let t8;
384
- if ($[28] !== embedded || $[29] !== isSmall) {
385
- t8 = embedded ? void 0 : {
385
+ if ($[28] !== embedded || $[29] !== fixedHeight || $[30] !== isSmall) {
386
+ t8 = embedded ? void 0 : fixedHeight ? {
387
+ height: fixedHeight
388
+ } : {
386
389
  minHeight: isSmall ? 68 : 92
387
390
  };
388
391
  $[28] = embedded;
389
- $[29] = isSmall;
390
- $[30] = t8;
392
+ $[29] = fixedHeight;
393
+ $[30] = isSmall;
394
+ $[31] = t8;
391
395
  } else {
392
- t8 = $[30];
396
+ t8 = $[31];
393
397
  }
394
398
  const t9 = `flex items-center justify-between ${isSmall ? "mb-1" : "mb-2"}`;
395
399
  const t10 = `font-medium leading-snug truncate text-surface-500 dark:text-surface-400 ${isSmall ? "text-[11px]" : "text-xs"}`;
396
400
  let t11;
397
- if ($[31] !== t10 || $[32] !== title) {
401
+ if ($[32] !== t10 || $[33] !== title) {
398
402
  t11 = /* @__PURE__ */ jsx("span", { className: t10, children: title });
399
- $[31] = t10;
400
- $[32] = title;
401
- $[33] = t11;
403
+ $[32] = t10;
404
+ $[33] = title;
405
+ $[34] = t11;
402
406
  } else {
403
- t11 = $[33];
407
+ t11 = $[34];
404
408
  }
405
409
  let t12;
406
- if ($[34] !== config.dateRange || $[35] !== isSmall) {
410
+ if ($[35] !== config.dateRange || $[36] !== isSmall) {
407
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 });
408
- $[34] = config.dateRange;
409
- $[35] = isSmall;
410
- $[36] = t12;
412
+ $[35] = config.dateRange;
413
+ $[36] = isSmall;
414
+ $[37] = t12;
411
415
  } else {
412
- t12 = $[36];
416
+ t12 = $[37];
413
417
  }
414
418
  let t13;
415
- if ($[37] !== t11 || $[38] !== t12) {
419
+ if ($[38] !== t11 || $[39] !== t12) {
416
420
  t13 = /* @__PURE__ */ jsxs("div", { className: "flex flex-col min-w-0", children: [
417
421
  t11,
418
422
  t12
419
423
  ] });
420
- $[37] = t11;
421
- $[38] = t12;
422
- $[39] = t13;
424
+ $[38] = t11;
425
+ $[39] = t12;
426
+ $[40] = t13;
423
427
  } else {
424
- t13 = $[39];
428
+ t13 = $[40];
425
429
  }
426
430
  let t14;
427
- if ($[40] !== iconElement) {
431
+ if ($[41] !== iconElement) {
428
432
  t14 = iconElement && /* @__PURE__ */ jsx("span", { className: "ml-2 shrink-0", children: iconElement });
429
- $[40] = iconElement;
430
- $[41] = t14;
433
+ $[41] = iconElement;
434
+ $[42] = t14;
431
435
  } else {
432
- t14 = $[41];
436
+ t14 = $[42];
433
437
  }
434
438
  let t15;
435
- if ($[42] !== t13 || $[43] !== t14 || $[44] !== t9) {
439
+ if ($[43] !== t13 || $[44] !== t14 || $[45] !== t9) {
436
440
  t15 = /* @__PURE__ */ jsxs("div", { className: t9, children: [
437
441
  t13,
438
442
  t14
439
443
  ] });
440
- $[42] = t13;
441
- $[43] = t14;
442
- $[44] = t9;
443
- $[45] = t15;
444
+ $[43] = t13;
445
+ $[44] = t14;
446
+ $[45] = t9;
447
+ $[46] = t15;
444
448
  } else {
445
- t15 = $[45];
449
+ t15 = $[46];
446
450
  }
447
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"}`;
448
452
  let t17;
449
- if ($[46] !== formattedValue || $[47] !== t16) {
453
+ if ($[47] !== formattedValue || $[48] !== t16) {
450
454
  t17 = /* @__PURE__ */ jsx("div", { className: t16, children: formattedValue });
451
- $[46] = formattedValue;
452
- $[47] = t16;
453
- $[48] = t17;
455
+ $[47] = formattedValue;
456
+ $[48] = t16;
457
+ $[49] = t17;
454
458
  } else {
455
- t17 = $[48];
459
+ t17 = $[49];
456
460
  }
457
461
  let t18;
458
- if ($[49] !== comparisonElement || $[50] !== isSmall) {
462
+ if ($[50] !== comparisonElement || $[51] !== isSmall) {
459
463
  t18 = comparisonElement && /* @__PURE__ */ jsx("div", { className: isSmall ? "mt-0.5" : "mt-1", children: comparisonElement });
460
- $[49] = comparisonElement;
461
- $[50] = isSmall;
462
- $[51] = t18;
464
+ $[50] = comparisonElement;
465
+ $[51] = isSmall;
466
+ $[52] = t18;
463
467
  } else {
464
- t18 = $[51];
468
+ t18 = $[52];
465
469
  }
466
470
  let t19;
467
- if ($[52] !== baseClass || $[53] !== t15 || $[54] !== t17 || $[55] !== t18 || $[56] !== t8) {
471
+ if ($[53] !== baseClass || $[54] !== t15 || $[55] !== t17 || $[56] !== t18 || $[57] !== t8) {
468
472
  t19 = /* @__PURE__ */ jsxs("div", { ref: containerRef, className: baseClass, style: t8, children: [
469
473
  t15,
470
474
  t17,
471
475
  t18
472
476
  ] });
473
- $[52] = baseClass;
474
- $[53] = t15;
475
- $[54] = t17;
476
- $[55] = t18;
477
- $[56] = t8;
478
- $[57] = t19;
477
+ $[53] = baseClass;
478
+ $[54] = t15;
479
+ $[55] = t17;
480
+ $[56] = t18;
481
+ $[57] = t8;
482
+ $[58] = t19;
479
483
  } else {
480
- t19 = $[57];
484
+ t19 = $[58];
481
485
  }
482
486
  return t19;
483
487
  }
484
488
  InsightsScorecardView.displayName = "InsightsScorecardView";
485
489
  function InsightWidgetSkeleton(t0) {
486
- const $ = c(17);
490
+ const $ = c(18);
487
491
  const {
488
492
  config,
489
493
  compact: t1,
490
- embedded: t2
494
+ embedded: t2,
495
+ fixedHeight
491
496
  } = t0;
492
497
  const compact = t1 === void 0 ? false : t1;
493
498
  const embedded = t2 === void 0 ? false : t2;
@@ -563,25 +568,27 @@ function InsightWidgetSkeleton(t0) {
563
568
  return t10;
564
569
  }
565
570
  let t3;
566
- if ($[12] !== embedded || $[13] !== hasComparison || $[14] !== hasDateRange || $[15] !== hasIcon) {
567
- 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 });
568
573
  $[12] = embedded;
569
- $[13] = hasComparison;
570
- $[14] = hasDateRange;
571
- $[15] = hasIcon;
572
- $[16] = t3;
574
+ $[13] = fixedHeight;
575
+ $[14] = hasComparison;
576
+ $[15] = hasDateRange;
577
+ $[16] = hasIcon;
578
+ $[17] = t3;
573
579
  } else {
574
- t3 = $[16];
580
+ t3 = $[17];
575
581
  }
576
582
  return t3;
577
583
  }
578
584
  function StandardSkeleton(t0) {
579
- const $ = c(36);
585
+ const $ = c(37);
580
586
  const {
581
587
  hasComparison,
582
588
  hasIcon,
583
589
  hasDateRange,
584
- embedded
590
+ embedded,
591
+ fixedHeight
585
592
  } = t0;
586
593
  const containerRef = useRef(null);
587
594
  const [containerWidth, setContainerWidth] = useState(null);
@@ -628,122 +635,131 @@ function StandardSkeleton(t0) {
628
635
  t4 = $[5];
629
636
  }
630
637
  let t5;
631
- if ($[6] !== embedded || $[7] !== isSmall) {
632
- t5 = embedded ? void 0 : {
638
+ if ($[6] !== embedded || $[7] !== fixedHeight || $[8] !== isSmall) {
639
+ t5 = embedded ? void 0 : fixedHeight ? {
640
+ height: fixedHeight
641
+ } : {
633
642
  minHeight: isSmall ? 68 : 92
634
643
  };
635
644
  $[6] = embedded;
636
- $[7] = isSmall;
637
- $[8] = t5;
645
+ $[7] = fixedHeight;
646
+ $[8] = isSmall;
647
+ $[9] = t5;
638
648
  } else {
639
- t5 = $[8];
649
+ t5 = $[9];
640
650
  }
641
651
  const t6 = `flex items-center justify-between ${isSmall ? "mb-1" : "mb-2"}`;
642
652
  let t7;
643
- if ($[9] !== titleHeight) {
653
+ if ($[10] !== titleHeight) {
644
654
  t7 = /* @__PURE__ */ jsx("div", { className: "bg-surface-200 dark:bg-surface-700 rounded", style: {
645
655
  height: titleHeight,
646
656
  width: "60%"
647
657
  } });
648
- $[9] = titleHeight;
649
- $[10] = t7;
658
+ $[10] = titleHeight;
659
+ $[11] = t7;
650
660
  } else {
651
- t7 = $[10];
661
+ t7 = $[11];
652
662
  }
653
663
  let t8;
654
- if ($[11] !== hasDateRange || $[12] !== isSmall) {
664
+ if ($[12] !== hasDateRange || $[13] !== isSmall) {
655
665
  t8 = hasDateRange && !isSmall && /* @__PURE__ */ jsx("div", { className: "bg-surface-200/60 dark:bg-surface-700/60 rounded mt-0.5", style: {
656
666
  height: 14,
657
667
  width: "40%"
658
668
  } });
659
- $[11] = hasDateRange;
660
- $[12] = isSmall;
661
- $[13] = t8;
669
+ $[12] = hasDateRange;
670
+ $[13] = isSmall;
671
+ $[14] = t8;
662
672
  } else {
663
- t8 = $[13];
673
+ t8 = $[14];
664
674
  }
665
675
  let t9;
666
- if ($[14] !== t7 || $[15] !== t8) {
676
+ if ($[15] !== t7 || $[16] !== t8) {
667
677
  t9 = /* @__PURE__ */ jsxs("div", { className: "flex flex-col min-w-0", children: [
668
678
  t7,
669
679
  t8
670
680
  ] });
671
- $[14] = t7;
672
- $[15] = t8;
673
- $[16] = t9;
681
+ $[15] = t7;
682
+ $[16] = t8;
683
+ $[17] = t9;
674
684
  } else {
675
- t9 = $[16];
685
+ t9 = $[17];
676
686
  }
677
687
  let t10;
678
- if ($[17] !== hasIcon || $[18] !== iconSize) {
688
+ if ($[18] !== hasIcon || $[19] !== iconSize) {
679
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: {
680
690
  height: iconSize,
681
691
  width: iconSize
682
692
  } }) });
683
- $[17] = hasIcon;
684
- $[18] = iconSize;
685
- $[19] = t10;
693
+ $[18] = hasIcon;
694
+ $[19] = iconSize;
695
+ $[20] = t10;
686
696
  } else {
687
- t10 = $[19];
697
+ t10 = $[20];
688
698
  }
689
699
  let t11;
690
- if ($[20] !== t10 || $[21] !== t6 || $[22] !== t9) {
700
+ if ($[21] !== t10 || $[22] !== t6 || $[23] !== t9) {
691
701
  t11 = /* @__PURE__ */ jsxs("div", { className: t6, children: [
692
702
  t9,
693
703
  t10
694
704
  ] });
695
- $[20] = t10;
696
- $[21] = t6;
697
- $[22] = t9;
698
- $[23] = t11;
705
+ $[21] = t10;
706
+ $[22] = t6;
707
+ $[23] = t9;
708
+ $[24] = t11;
699
709
  } else {
700
- t11 = $[23];
710
+ t11 = $[24];
701
711
  }
702
712
  let t12;
703
- if ($[24] !== valueHeight) {
713
+ if ($[25] !== valueHeight) {
704
714
  t12 = /* @__PURE__ */ jsx("div", { className: "bg-surface-200 dark:bg-surface-700 rounded", style: {
705
715
  height: valueHeight,
706
716
  width: "40%"
707
717
  } });
708
- $[24] = valueHeight;
709
- $[25] = t12;
718
+ $[25] = valueHeight;
719
+ $[26] = t12;
710
720
  } else {
711
- t12 = $[25];
721
+ t12 = $[26];
712
722
  }
713
723
  let t13;
714
- if ($[26] !== hasComparison || $[27] !== isSmall) {
724
+ if ($[27] !== hasComparison || $[28] !== isSmall) {
715
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: {
716
726
  height: 16,
717
727
  width: "25%"
718
728
  } }) });
719
- $[26] = hasComparison;
720
- $[27] = isSmall;
721
- $[28] = t13;
729
+ $[27] = hasComparison;
730
+ $[28] = isSmall;
731
+ $[29] = t13;
722
732
  } else {
723
- t13 = $[28];
733
+ t13 = $[29];
724
734
  }
725
735
  let t14;
726
- 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) {
727
737
  t14 = /* @__PURE__ */ jsxs("div", { ref: t3, className: t4, style: t5, children: [
728
738
  t11,
729
739
  t12,
730
740
  t13
731
741
  ] });
732
- $[29] = t11;
733
- $[30] = t12;
734
- $[31] = t13;
735
- $[32] = t3;
736
- $[33] = t4;
737
- $[34] = t5;
738
- $[35] = t14;
742
+ $[30] = t11;
743
+ $[31] = t12;
744
+ $[32] = t13;
745
+ $[33] = t3;
746
+ $[34] = t4;
747
+ $[35] = t5;
748
+ $[36] = t14;
739
749
  } else {
740
- t14 = $[35];
750
+ t14 = $[36];
741
751
  }
742
752
  return t14;
743
753
  }
744
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
+ }
745
761
  function InsightWidget(t0) {
746
- const $ = c(25);
762
+ const $ = c(37);
747
763
  const {
748
764
  definition,
749
765
  collectionSlug,
@@ -773,82 +789,117 @@ function InsightWidget(t0) {
773
789
  loading,
774
790
  error
775
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;
776
803
  if (loading) {
777
- let t42;
778
- if ($[4] !== compact || $[5] !== definition.scorecard || $[6] !== embedded) {
779
- t42 = /* @__PURE__ */ jsx(InsightWidgetSkeleton, { config: definition.scorecard, compact, embedded });
780
- $[4] = compact;
781
- $[5] = definition.scorecard;
782
- $[6] = embedded;
783
- $[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;
784
812
  } else {
785
- t42 = $[7];
813
+ t52 = $[12];
786
814
  }
787
- return t42;
815
+ return t52;
788
816
  }
789
817
  if (error) {
790
- 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"}`}`;
791
- let t52;
792
- if ($[8] !== definition.title) {
793
- t52 = /* @__PURE__ */ jsx("div", { className: "font-semibold mb-1", children: definition.title });
794
- $[8] = definition.title;
795
- $[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;
796
826
  } else {
797
- t52 = $[9];
827
+ t62 = $[14];
798
828
  }
799
- let t6;
800
- if ($[10] !== error.message) {
801
- t6 = /* @__PURE__ */ jsx("div", { children: error.message });
802
- $[10] = error.message;
803
- $[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;
804
834
  } else {
805
- t6 = $[11];
835
+ t7 = $[16];
806
836
  }
807
- let t7;
808
- if ($[12] !== t42 || $[13] !== t52 || $[14] !== t6) {
809
- t7 = /* @__PURE__ */ jsxs("div", { className: t42, children: [
810
- t52,
811
- 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
812
850
  ] });
813
- $[12] = t42;
814
- $[13] = t52;
815
- $[14] = t6;
816
- $[15] = t7;
851
+ $[19] = t52;
852
+ $[20] = t62;
853
+ $[21] = t7;
854
+ $[22] = t8;
855
+ $[23] = t9;
817
856
  } else {
818
- t7 = $[15];
857
+ t9 = $[23];
819
858
  }
820
- return t7;
859
+ return t9;
821
860
  }
822
861
  if (!data || data.rows.length === 0) {
823
- 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"}`}`;
824
- let t52;
825
- if ($[16] !== definition.title || $[17] !== t42) {
826
- 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: [
827
876
  definition.title,
828
877
  " — No data"
829
878
  ] });
830
- $[16] = definition.title;
831
- $[17] = t42;
832
- $[18] = t52;
879
+ $[26] = definition.title;
880
+ $[27] = t52;
881
+ $[28] = t62;
882
+ $[29] = t7;
833
883
  } else {
834
- t52 = $[18];
884
+ t7 = $[29];
835
885
  }
836
- return t52;
886
+ return t7;
837
887
  }
838
- const t4 = data.rows[0];
839
- let t5;
840
- if ($[19] !== compact || $[20] !== definition.scorecard || $[21] !== definition.title || $[22] !== embedded || $[23] !== t4) {
841
- t5 = /* @__PURE__ */ jsx(InsightsScorecardView, { config: definition.scorecard, data: t4, title: definition.title, compact, embedded });
842
- $[19] = compact;
843
- $[20] = definition.scorecard;
844
- $[21] = definition.title;
845
- $[22] = embedded;
846
- $[23] = t4;
847
- $[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;
848
899
  } else {
849
- t5 = $[24];
900
+ t6 = $[36];
850
901
  }
851
- return t5;
902
+ return t6;
852
903
  }
853
904
  InsightWidget.displayName = "InsightWidget";
854
905
  function HomeCardInsightSlot(t0) {