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