@elevasis/ui 2.36.0 → 2.38.0
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/api/index.js +4 -3
- package/dist/app/index.css +0 -384
- package/dist/app/index.d.ts +75 -2
- package/dist/app/index.js +22 -21
- package/dist/auth/index.d.ts +91 -28
- package/dist/auth/index.js +5 -1
- package/dist/charts/index.js +9 -3
- package/dist/chunk-4O3VAALW.js +349 -0
- package/dist/{chunk-O2Q4VMRN.js → chunk-566XWGPP.js} +76 -109
- package/dist/chunk-5EYJ2GIN.js +122 -0
- package/dist/chunk-6D4LCJ52.js +10 -0
- package/dist/chunk-6ROXVZ3L.js +9 -0
- package/dist/{chunk-YYX7OPZQ.js → chunk-73EWE2EW.js} +1 -1
- package/dist/{chunk-SIQ3P4OR.js → chunk-7GQFIWP4.js} +8 -756
- package/dist/{chunk-VKIZUUPM.js → chunk-7YXZFS56.js} +31 -14
- package/dist/{chunk-AKW7KISS.js → chunk-7ZWXTH5J.js} +2 -44
- package/dist/chunk-A7IG36LB.js +215 -0
- package/dist/chunk-B2DZLPDL.js +39 -0
- package/dist/chunk-C6BDBZRO.js +422 -0
- package/dist/chunk-CLDCYJQT.js +1 -0
- package/dist/{chunk-LUYVRATI.js → chunk-DA6I5VEY.js} +5 -213
- package/dist/chunk-H2MEFUQD.js +337 -0
- package/dist/chunk-I53EX4VU.js +734 -0
- package/dist/chunk-IIMU5YAJ.js +53 -0
- package/dist/chunk-JXVNHVK7.js +79 -0
- package/dist/chunk-M7Q4UBRY.js +85 -0
- package/dist/{chunk-K4UZU3TU.js → chunk-P34FFSOX.js} +1 -1
- package/dist/chunk-PGWANFNE.js +112 -0
- package/dist/{chunk-F6EFC2MJ.js → chunk-Q64E2TZY.js} +440 -2075
- package/dist/chunk-S3XR4II4.js +30 -0
- package/dist/chunk-SHZT7ULK.js +425 -0
- package/dist/{chunk-GX6XBRRF.js → chunk-TYRUKGGD.js} +2 -1
- package/dist/{chunk-R3VCBZDC.js → chunk-X4WBGKJQ.js} +3 -50
- package/dist/{chunk-GEFWMU26.js → chunk-X66MVMZT.js} +1 -9
- package/dist/{chunk-57OZ3AEG.js → chunk-Y3JQBSKQ.js} +1 -1
- package/dist/components/index.d.ts +74 -42
- package/dist/components/index.js +34 -19
- package/dist/components/navigation/index.js +3 -31
- package/dist/features/auth/index.d.ts +97 -99
- package/dist/features/auth/index.js +37 -99
- package/dist/features/clients/index.js +34 -19
- package/dist/features/crm/index.d.ts +65 -0
- package/dist/features/crm/index.js +34 -19
- package/dist/features/dashboard/index.js +34 -19
- package/dist/features/delivery/index.d.ts +65 -0
- package/dist/features/delivery/index.js +34 -19
- package/dist/features/knowledge/index.js +6 -30
- package/dist/features/lead-gen/index.d.ts +1096 -1
- package/dist/features/lead-gen/index.js +34 -19
- package/dist/features/monitoring/index.js +34 -19
- package/dist/features/monitoring/requests/index.js +34 -19
- package/dist/features/notes/index.d.ts +72 -0
- package/dist/features/notes/index.js +621 -0
- package/dist/features/operations/index.d.ts +10 -2
- package/dist/features/operations/index.js +34 -19
- package/dist/features/right-panel-host/index.d.ts +214 -0
- package/dist/features/right-panel-host/index.js +639 -0
- package/dist/features/seo/index.js +3 -2
- package/dist/features/settings/index.d.ts +68 -35
- package/dist/features/settings/index.js +34 -19
- package/dist/hooks/access/index.d.ts +90 -0
- package/dist/hooks/access/index.js +10 -0
- package/dist/hooks/delivery/index.d.ts +65 -0
- package/dist/hooks/delivery/index.js +34 -19
- package/dist/hooks/index.d.ts +1644 -1651
- package/dist/hooks/index.js +34 -19
- package/dist/hooks/published.d.ts +1644 -1651
- package/dist/hooks/published.js +34 -19
- package/dist/hooks/user-notes/index.d.ts +57 -0
- package/dist/hooks/user-notes/index.js +3 -0
- package/dist/index.d.ts +294 -277
- package/dist/index.js +35 -20
- package/dist/initialization/index.d.ts +65 -19
- package/dist/knowledge/index.d.ts +10 -2
- package/dist/knowledge/index.js +173 -28
- package/dist/layout/index.js +5 -3
- package/dist/organization/index.d.ts +0 -19
- package/dist/organization/index.js +34 -19
- package/dist/profile/index.d.ts +65 -0
- package/dist/provider/index.css +0 -384
- package/dist/provider/index.d.ts +75 -2
- package/dist/provider/index.js +16 -21
- package/dist/provider/published.css +0 -523
- package/dist/provider/published.d.ts +75 -2
- package/dist/provider/published.js +11 -21
- package/dist/supabase/index.d.ts +127 -0
- package/dist/test-utils/index.d.ts +2 -21
- package/dist/test-utils/index.js +5 -18
- package/dist/theme/index.js +3 -1
- package/dist/types/index.d.ts +115 -59
- package/dist/utils/index.js +2 -1
- package/package.json +21 -5
- package/src/auth/README.md +6 -6
- package/dist/components/navigation/index.css +0 -649
- package/dist/features/knowledge/index.css +0 -649
|
@@ -1,16 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { ResourceStatusColors } from './chunk-KRWALB24.js';
|
|
1
|
+
import { CenteredErrorState, TrendIndicator, EmptyState, StatCard } from './chunk-I53EX4VU.js';
|
|
2
|
+
import { CardHeader } from './chunk-S3XR4II4.js';
|
|
3
|
+
import { getTimeRangeLabel, getTimeRangeDates, formatBucketTime } from './chunk-X66MVMZT.js';
|
|
5
4
|
import { useElevasisServices } from './chunk-KJ3QUBNU.js';
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { useComputedColorScheme, Group, Text, Box, Stack, Center, Title, Button, Loader, Badge, Collapse, ScrollArea, Card, Select, Alert, Code, ThemeIcon, Paper, Grid, Timeline, NumberFormatter, Space, Tooltip as Tooltip$1, SimpleGrid, SegmentedControl } from '@mantine/core';
|
|
5
|
+
import { useRef, useState, useLayoutEffect, useEffect, useMemo, useCallback } from 'react';
|
|
6
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
7
|
+
import { useComputedColorScheme, Group, Text, Box, Stack, Center, Loader, Paper, Button, NumberFormatter, Badge, Space, Tooltip as Tooltip$1, SimpleGrid, Alert, SegmentedControl } from '@mantine/core';
|
|
10
8
|
import { ResponsiveContainer, AreaChart, CartesianGrid, XAxis, YAxis, Tooltip, ReferenceLine as ReferenceLine$1, Area, PieChart, Pie, Cell } from 'recharts';
|
|
11
|
-
import {
|
|
12
|
-
import { Prism } from 'react-syntax-highlighter';
|
|
13
|
-
import { oneDark } from 'react-syntax-highlighter/dist/esm/styles/prism';
|
|
9
|
+
import { IconActivity, IconDownload, IconChartLine, IconInfoCircle, IconApps, IconPlayerPlay, IconChartBar, IconAlertTriangle, IconRocket, IconAlertCircle } from '@tabler/icons-react';
|
|
14
10
|
import { useQuery } from '@tanstack/react-query';
|
|
15
11
|
|
|
16
12
|
function ChartFrame({ h, debounceMs = 150, children }) {
|
|
@@ -579,750 +575,6 @@ function CyberDonut({
|
|
|
579
575
|
] }, seg.name)) })
|
|
580
576
|
] });
|
|
581
577
|
}
|
|
582
|
-
function EmptyState({ icon: Icon, title, description, action, py = "xl" }) {
|
|
583
|
-
return /* @__PURE__ */ jsx(Center, { py, children: /* @__PURE__ */ jsxs(Stack, { align: "center", gap: "xs", children: [
|
|
584
|
-
/* @__PURE__ */ jsx(Icon, { size: 48, style: { opacity: 0.5 } }),
|
|
585
|
-
/* @__PURE__ */ jsx(Title, { order: 4, children: title }),
|
|
586
|
-
description && /* @__PURE__ */ jsx(Text, { size: "sm", c: "dimmed", ta: "center", children: description }),
|
|
587
|
-
action && /* @__PURE__ */ jsx(Button, { variant: "light", onClick: action.onClick, leftSection: action.icon, mt: "sm", children: action.label })
|
|
588
|
-
] }) });
|
|
589
|
-
}
|
|
590
|
-
function TabCountBadge({ count, isLoading }) {
|
|
591
|
-
return /* @__PURE__ */ jsx(Box, { miw: 20, h: 20, style: { display: "flex", alignItems: "center", justifyContent: "center" }, children: isLoading ? /* @__PURE__ */ jsx(Loader, { size: 12 }) : /* @__PURE__ */ jsx(Badge, { size: "sm", variant: "light", circle: count < 10, children: count }) });
|
|
592
|
-
}
|
|
593
|
-
function TrendIndicator({ current, previous, inverse }) {
|
|
594
|
-
const change = previous === 0 ? 0 : (current - previous) / previous * 100;
|
|
595
|
-
const isPositive = inverse ? change < 0 : change > 0;
|
|
596
|
-
const isFlat = Math.abs(change) < 0.1;
|
|
597
|
-
const color = isFlat ? "gray" : isPositive ? "green" : "red";
|
|
598
|
-
const Icon = isFlat ? IconMinus : change > 0 ? IconTrendingUp : IconTrendingDown;
|
|
599
|
-
return /* @__PURE__ */ jsxs(Group, { gap: 4, children: [
|
|
600
|
-
/* @__PURE__ */ jsx(Icon, { size: 12 }),
|
|
601
|
-
/* @__PURE__ */ jsx(Badge, { size: "sm", color, variant: "light", children: isFlat ? "No change" : `${isPositive ? "+" : ""}${Math.abs(change).toFixed(1)}%` })
|
|
602
|
-
] });
|
|
603
|
-
}
|
|
604
|
-
function CollapsibleSection({
|
|
605
|
-
title,
|
|
606
|
-
count,
|
|
607
|
-
countLabel,
|
|
608
|
-
children,
|
|
609
|
-
emptyMessage,
|
|
610
|
-
defaultExpanded = true,
|
|
611
|
-
maxHeight = 300
|
|
612
|
-
}) {
|
|
613
|
-
const [expanded, setExpanded] = useState(defaultExpanded);
|
|
614
|
-
const isEmpty = count === 0;
|
|
615
|
-
return /* @__PURE__ */ jsxs(
|
|
616
|
-
"div",
|
|
617
|
-
{
|
|
618
|
-
style: {
|
|
619
|
-
borderRadius: "8px",
|
|
620
|
-
padding: "8px",
|
|
621
|
-
border: "1px solid var(--color-border)",
|
|
622
|
-
boxShadow: "var(--standard-box-shadow)"
|
|
623
|
-
},
|
|
624
|
-
children: [
|
|
625
|
-
/* @__PURE__ */ jsxs(
|
|
626
|
-
Group,
|
|
627
|
-
{
|
|
628
|
-
gap: "xs",
|
|
629
|
-
mb: expanded ? "xs" : 0,
|
|
630
|
-
justify: "space-between",
|
|
631
|
-
align: "center",
|
|
632
|
-
style: { cursor: "pointer" },
|
|
633
|
-
onClick: () => setExpanded(!expanded),
|
|
634
|
-
children: [
|
|
635
|
-
/* @__PURE__ */ jsxs(Group, { gap: "xs", align: "center", style: { flex: 1 }, children: [
|
|
636
|
-
typeof title === "string" ? /* @__PURE__ */ jsx(
|
|
637
|
-
Text,
|
|
638
|
-
{
|
|
639
|
-
fw: 600,
|
|
640
|
-
size: "sm",
|
|
641
|
-
c: "var(--color-text)",
|
|
642
|
-
style: { fontFamily: "var(--elevasis-font-family-subtitle)" },
|
|
643
|
-
children: title
|
|
644
|
-
}
|
|
645
|
-
) : title,
|
|
646
|
-
count !== void 0 && countLabel && /* @__PURE__ */ jsxs(Badge, { size: "sm", variant: "light", color: "gray", children: [
|
|
647
|
-
count,
|
|
648
|
-
" ",
|
|
649
|
-
count === 1 ? countLabel.replace(/s$/, "") : countLabel
|
|
650
|
-
] })
|
|
651
|
-
] }),
|
|
652
|
-
expanded ? /* @__PURE__ */ jsx(IconChevronUp, { size: 16 }) : /* @__PURE__ */ jsx(IconChevronDown, { size: 16 })
|
|
653
|
-
]
|
|
654
|
-
}
|
|
655
|
-
),
|
|
656
|
-
/* @__PURE__ */ jsx(Collapse, { in: expanded, children: isEmpty && emptyMessage ? /* @__PURE__ */ jsx(Text, { size: "sm", c: "dimmed", children: emptyMessage }) : /* @__PURE__ */ jsx(ScrollArea, { h: maxHeight, type: "scroll", offsetScrollbars: true, children }) })
|
|
657
|
-
]
|
|
658
|
-
}
|
|
659
|
-
);
|
|
660
|
-
}
|
|
661
|
-
var PageTitleCaption = ({ title, caption, rightSection }) => {
|
|
662
|
-
const renderCaption = () => {
|
|
663
|
-
if (!caption) return null;
|
|
664
|
-
return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(Text, { style: { fontFamily: "var(--elevasis-font-family-subtitle)", color: "var(--color-text-dimmed)" }, children: caption }) });
|
|
665
|
-
};
|
|
666
|
-
const titleContent = /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column" }, children: [
|
|
667
|
-
/* @__PURE__ */ jsx(Title, { order: 1, children: title }),
|
|
668
|
-
/* @__PURE__ */ jsx(Space, { h: "4" }),
|
|
669
|
-
renderCaption()
|
|
670
|
-
] });
|
|
671
|
-
if (!rightSection) {
|
|
672
|
-
return titleContent;
|
|
673
|
-
}
|
|
674
|
-
return /* @__PURE__ */ jsxs(Group, { justify: "space-between", align: "end", children: [
|
|
675
|
-
titleContent,
|
|
676
|
-
rightSection
|
|
677
|
-
] });
|
|
678
|
-
};
|
|
679
|
-
function StatsCardSkeleton({ chartHeight = 200 }) {
|
|
680
|
-
return /* @__PURE__ */ jsx(Card, { withBorder: true, children: /* @__PURE__ */ jsx(Center, { mih: chartHeight, children: /* @__PURE__ */ jsx(Loader, { size: "md" }) }) });
|
|
681
|
-
}
|
|
682
|
-
function ListSkeleton({ rows = 3, rowHeight = 50 }) {
|
|
683
|
-
return /* @__PURE__ */ jsx(Stack, { children: /* @__PURE__ */ jsx(Center, { mih: rows * rowHeight, children: /* @__PURE__ */ jsx(Loader, { size: "md" }) }) });
|
|
684
|
-
}
|
|
685
|
-
function DetailCardSkeleton({ rows = 3 }) {
|
|
686
|
-
return /* @__PURE__ */ jsx(Card, { withBorder: true, children: /* @__PURE__ */ jsx(Center, { mih: rows * 60 + 100, children: /* @__PURE__ */ jsx(Loader, { size: "md" }) }) });
|
|
687
|
-
}
|
|
688
|
-
function CustomSelector({
|
|
689
|
-
value,
|
|
690
|
-
onChange,
|
|
691
|
-
data,
|
|
692
|
-
leftSection,
|
|
693
|
-
placeholder,
|
|
694
|
-
w,
|
|
695
|
-
withCheckIcon = false,
|
|
696
|
-
disabled
|
|
697
|
-
}) {
|
|
698
|
-
return /* @__PURE__ */ jsx(
|
|
699
|
-
Select,
|
|
700
|
-
{
|
|
701
|
-
value,
|
|
702
|
-
onChange,
|
|
703
|
-
data,
|
|
704
|
-
leftSection,
|
|
705
|
-
placeholder,
|
|
706
|
-
w,
|
|
707
|
-
size: "xs",
|
|
708
|
-
variant: "unstyled",
|
|
709
|
-
withCheckIcon,
|
|
710
|
-
disabled,
|
|
711
|
-
styles: {
|
|
712
|
-
wrapper: {
|
|
713
|
-
border: "1px solid var(--color-border)",
|
|
714
|
-
borderRadius: "var(--mantine-radius-default)",
|
|
715
|
-
backgroundColor: "var(--color-surface)",
|
|
716
|
-
transition: "border-color 150ms ease, background-color 150ms ease",
|
|
717
|
-
"&:hover": {
|
|
718
|
-
borderColor: "var(--color-border-hover, var(--mantine-color-dark-3))"
|
|
719
|
-
}
|
|
720
|
-
},
|
|
721
|
-
input: {
|
|
722
|
-
fontSize: "var(--mantine-font-size-xs)",
|
|
723
|
-
fontWeight: 500,
|
|
724
|
-
height: "30px",
|
|
725
|
-
minHeight: "30px",
|
|
726
|
-
paddingLeft: leftSection ? "30px" : void 0,
|
|
727
|
-
borderRadius: "var(--mantine-radius-default)",
|
|
728
|
-
cursor: "pointer"
|
|
729
|
-
},
|
|
730
|
-
section: {
|
|
731
|
-
color: "var(--color-text-subtle)"
|
|
732
|
-
},
|
|
733
|
-
dropdown: {
|
|
734
|
-
border: "1px solid var(--color-border)",
|
|
735
|
-
backgroundColor: "var(--color-surface)",
|
|
736
|
-
boxShadow: "var(--card-shadow)"
|
|
737
|
-
},
|
|
738
|
-
option: {
|
|
739
|
-
fontSize: "var(--mantine-font-size-xs)"
|
|
740
|
-
}
|
|
741
|
-
}
|
|
742
|
-
}
|
|
743
|
-
);
|
|
744
|
-
}
|
|
745
|
-
function APIErrorAlert({
|
|
746
|
-
error,
|
|
747
|
-
title,
|
|
748
|
-
showRequestId = true,
|
|
749
|
-
icon = /* @__PURE__ */ jsx(IconAlertCircle, {}),
|
|
750
|
-
color = "red"
|
|
751
|
-
}) {
|
|
752
|
-
const { message, code, requestId, retryAfter } = getErrorInfo(error);
|
|
753
|
-
const alertTitle = title || getErrorTitle(code);
|
|
754
|
-
return /* @__PURE__ */ jsxs(Alert, { icon, title: alertTitle, color, variant: "light", children: [
|
|
755
|
-
/* @__PURE__ */ jsx(Text, { size: "sm", children: message }),
|
|
756
|
-
retryAfter && /* @__PURE__ */ jsxs(Text, { size: "sm", mt: "xs", children: [
|
|
757
|
-
"Please wait ",
|
|
758
|
-
retryAfter,
|
|
759
|
-
" seconds before retrying."
|
|
760
|
-
] }),
|
|
761
|
-
showRequestId && requestId && /* @__PURE__ */ jsxs(Text, { size: "xs", c: "dimmed", mt: "xs", children: [
|
|
762
|
-
"Request ID: ",
|
|
763
|
-
/* @__PURE__ */ jsx(Code, { children: requestId })
|
|
764
|
-
] })
|
|
765
|
-
] });
|
|
766
|
-
}
|
|
767
|
-
function CenteredErrorState({ error, title, h = 300, py }) {
|
|
768
|
-
return /* @__PURE__ */ jsx(Center, { h, py, children: /* @__PURE__ */ jsx(APIErrorAlert, { error, title }) });
|
|
769
|
-
}
|
|
770
|
-
|
|
771
|
-
// src/components/display/StatCard.module.css.js
|
|
772
|
-
var StatCard_module_css_default = { "heroCard": "heroCard", "iconRing": "iconRing", "iconRingSm": "iconRingSm", "heroValue": "heroValue", "heroValueSm": "heroValueSm", "heroLabel": "heroLabel", "heroLabelSm": "heroLabelSm" };
|
|
773
|
-
function StatCard(props) {
|
|
774
|
-
if (props.variant === "hero") {
|
|
775
|
-
return /* @__PURE__ */ jsx(HeroStatCard, { ...props });
|
|
776
|
-
}
|
|
777
|
-
const { label, value, icon: IconComponent, color } = props;
|
|
778
|
-
return /* @__PURE__ */ jsx(Card, { withBorder: true, children: /* @__PURE__ */ jsxs(Group, { gap: "xs", children: [
|
|
779
|
-
/* @__PURE__ */ jsx(ThemeIcon, { size: "lg", variant: "light", color, children: /* @__PURE__ */ jsx(IconComponent, { size: 18 }) }),
|
|
780
|
-
/* @__PURE__ */ jsxs("div", { children: [
|
|
781
|
-
/* @__PURE__ */ jsx(Text, { size: "xs", c: "dimmed", children: label }),
|
|
782
|
-
/* @__PURE__ */ jsx(Text, { size: "lg", fw: 600, style: { fontFamily: "var(--elevasis-font-family-subtitle)" }, children: value })
|
|
783
|
-
] })
|
|
784
|
-
] }) });
|
|
785
|
-
}
|
|
786
|
-
function HeroStatCard({
|
|
787
|
-
icon: IconComponent,
|
|
788
|
-
value,
|
|
789
|
-
label,
|
|
790
|
-
valueColor,
|
|
791
|
-
isLoading,
|
|
792
|
-
size = "sm",
|
|
793
|
-
children
|
|
794
|
-
}) {
|
|
795
|
-
const sm = size === "sm";
|
|
796
|
-
const iconSize = sm ? 36 : 46;
|
|
797
|
-
if (isLoading) {
|
|
798
|
-
return /* @__PURE__ */ jsx(Paper, { p: sm ? "md" : "lg", className: StatCard_module_css_default.heroCard, children: /* @__PURE__ */ jsx(Center, { mih: iconSize + 16, children: /* @__PURE__ */ jsx(Loader, { size: "sm" }) }) });
|
|
799
|
-
}
|
|
800
|
-
return /* @__PURE__ */ jsx(Paper, { p: sm ? "md" : "lg", className: StatCard_module_css_default.heroCard, children: /* @__PURE__ */ jsxs(Group, { gap: sm ? "sm" : "md", wrap: "nowrap", children: [
|
|
801
|
-
/* @__PURE__ */ jsx("div", { className: sm ? StatCard_module_css_default.iconRingSm : StatCard_module_css_default.iconRing, children: /* @__PURE__ */ jsx(IconComponent, { size: sm ? 18 : 22 }) }),
|
|
802
|
-
/* @__PURE__ */ jsxs(Stack, { gap: 2, style: { flex: children ? 1 : void 0 }, children: [
|
|
803
|
-
/* @__PURE__ */ jsx(
|
|
804
|
-
"span",
|
|
805
|
-
{
|
|
806
|
-
className: sm ? StatCard_module_css_default.heroValueSm : StatCard_module_css_default.heroValue,
|
|
807
|
-
style: valueColor ? { color: valueColor } : void 0,
|
|
808
|
-
children: value
|
|
809
|
-
}
|
|
810
|
-
),
|
|
811
|
-
children ? /* @__PURE__ */ jsxs(Group, { gap: "sm", wrap: "nowrap", style: { flex: 1 }, children: [
|
|
812
|
-
/* @__PURE__ */ jsx("span", { className: sm ? StatCard_module_css_default.heroLabelSm : StatCard_module_css_default.heroLabel, children: label }),
|
|
813
|
-
/* @__PURE__ */ jsx("div", { style: { flex: 1 }, children })
|
|
814
|
-
] }) : /* @__PURE__ */ jsx("span", { className: sm ? StatCard_module_css_default.heroLabelSm : StatCard_module_css_default.heroLabel, children: label })
|
|
815
|
-
] })
|
|
816
|
-
] }) });
|
|
817
|
-
}
|
|
818
|
-
function StatCardSkeleton() {
|
|
819
|
-
return /* @__PURE__ */ jsx(Card, { withBorder: true, children: /* @__PURE__ */ jsx(Center, { mih: 60, children: /* @__PURE__ */ jsx(Loader, { size: "sm" }) }) });
|
|
820
|
-
}
|
|
821
|
-
var jsonTheme = Object.fromEntries(
|
|
822
|
-
Object.entries(oneDark).map(([key, value]) => [
|
|
823
|
-
key,
|
|
824
|
-
typeof value === "object" && value !== null ? { ...value, background: "none", backgroundColor: "none" } : value
|
|
825
|
-
])
|
|
826
|
-
);
|
|
827
|
-
function JsonViewer({ data, maxHeight, fontSize = "0.8rem" }) {
|
|
828
|
-
const jsonString = typeof data === "string" ? data : JSON.stringify(data, null, 2);
|
|
829
|
-
return /* @__PURE__ */ jsx(
|
|
830
|
-
Prism,
|
|
831
|
-
{
|
|
832
|
-
language: "json",
|
|
833
|
-
style: jsonTheme,
|
|
834
|
-
customStyle: {
|
|
835
|
-
margin: 0,
|
|
836
|
-
fontSize,
|
|
837
|
-
maxHeight,
|
|
838
|
-
overflow: maxHeight ? "auto" : void 0,
|
|
839
|
-
overflowX: "auto"
|
|
840
|
-
},
|
|
841
|
-
children: jsonString
|
|
842
|
-
}
|
|
843
|
-
);
|
|
844
|
-
}
|
|
845
|
-
var subtleMarkdownComponents = {
|
|
846
|
-
p: ({ children }) => /* @__PURE__ */ jsx(Text, { size: "sm", m: 0, c: "var(--color-text-subtle)", style: { whiteSpace: "pre-wrap" }, children })
|
|
847
|
-
};
|
|
848
|
-
var subtleMarkdownWrapperStyle = {
|
|
849
|
-
display: "flex",
|
|
850
|
-
flexDirection: "column",
|
|
851
|
-
gap: 8
|
|
852
|
-
};
|
|
853
|
-
function ContextViewer({ data }) {
|
|
854
|
-
return /* @__PURE__ */ jsx(ContextNode, { data, depth: 0 });
|
|
855
|
-
}
|
|
856
|
-
function ContextNode({ data, depth }) {
|
|
857
|
-
if (data === null || data === void 0) {
|
|
858
|
-
return /* @__PURE__ */ jsx(Text, { size: "sm", c: "dimmed", fs: "italic", children: "No context provided" });
|
|
859
|
-
}
|
|
860
|
-
if (typeof data === "string") {
|
|
861
|
-
return /* @__PURE__ */ jsx(StyledMarkdown, { components: subtleMarkdownComponents, style: subtleMarkdownWrapperStyle, children: data });
|
|
862
|
-
}
|
|
863
|
-
if (typeof data === "number" || typeof data === "boolean") {
|
|
864
|
-
return /* @__PURE__ */ jsx(Text, { size: "sm", children: String(data) });
|
|
865
|
-
}
|
|
866
|
-
if (Array.isArray(data)) {
|
|
867
|
-
return /* @__PURE__ */ jsx(ArrayView, { items: data, depth });
|
|
868
|
-
}
|
|
869
|
-
if (typeof data === "object") {
|
|
870
|
-
return /* @__PURE__ */ jsx(ObjectView, { data, depth });
|
|
871
|
-
}
|
|
872
|
-
return /* @__PURE__ */ jsx(Text, { size: "sm", children: String(data) });
|
|
873
|
-
}
|
|
874
|
-
var ACRONYMS = ["AI", "URL", "UUID", "ID", "API", "HTTP", "JSON"];
|
|
875
|
-
function formatLabel(key) {
|
|
876
|
-
const titleCased = key.replace(/([a-z])([A-Z])/g, "$1 $2").replace(/[_-]/g, " ").replace(/\b\w/g, (c) => c.toUpperCase());
|
|
877
|
-
return titleCased.replace(
|
|
878
|
-
new RegExp(`\\b(${ACRONYMS.map((a) => a[0] + a.slice(1).toLowerCase()).join("|")})\\b`, "g"),
|
|
879
|
-
(match) => match.toUpperCase()
|
|
880
|
-
);
|
|
881
|
-
}
|
|
882
|
-
function hasMarkdown(value) {
|
|
883
|
-
return /(\*\*.+\*\*|^#{1,6}\s|^\s*[-*]\s|\[.+\]\(.+\)|^\|.+\|$|^>\s|```)/.test(value);
|
|
884
|
-
}
|
|
885
|
-
function NestedSection({ title, children }) {
|
|
886
|
-
const [expanded, setExpanded] = useState(true);
|
|
887
|
-
return /* @__PURE__ */ jsxs(Stack, { gap: 6, children: [
|
|
888
|
-
/* @__PURE__ */ jsxs(Group, { gap: 4, style: { cursor: "pointer", userSelect: "none" }, onClick: () => setExpanded((v) => !v), children: [
|
|
889
|
-
expanded ? /* @__PURE__ */ jsx(IconChevronDown, { size: 14, color: "var(--color-primary)", style: { flexShrink: 0 } }) : /* @__PURE__ */ jsx(IconChevronRight, { size: 14, color: "var(--color-primary)", style: { flexShrink: 0 } }),
|
|
890
|
-
/* @__PURE__ */ jsx(Text, { size: "sm", fw: 600, style: { fontFamily: "var(--mantine-font-family-headings)" }, children: title })
|
|
891
|
-
] }),
|
|
892
|
-
expanded && /* @__PURE__ */ jsx(Box, { pl: "sm", style: { borderLeft: "2px solid var(--color-border)" }, children })
|
|
893
|
-
] });
|
|
894
|
-
}
|
|
895
|
-
function PrimitiveValue({ value }) {
|
|
896
|
-
if (value === null || value === void 0) {
|
|
897
|
-
return /* @__PURE__ */ jsx(Text, { size: "sm", c: "dimmed", fs: "italic", children: "\u2014" });
|
|
898
|
-
}
|
|
899
|
-
if (typeof value === "boolean") {
|
|
900
|
-
return /* @__PURE__ */ jsx(Text, { size: "sm", m: 0, children: value ? "Yes" : "No" });
|
|
901
|
-
}
|
|
902
|
-
if (typeof value === "number") {
|
|
903
|
-
return /* @__PURE__ */ jsx(Text, { size: "sm", m: 0, children: value.toLocaleString() });
|
|
904
|
-
}
|
|
905
|
-
const str = String(value);
|
|
906
|
-
if (hasMarkdown(str)) {
|
|
907
|
-
return /* @__PURE__ */ jsx(StyledMarkdown, { components: subtleMarkdownComponents, children: str });
|
|
908
|
-
}
|
|
909
|
-
return /* @__PURE__ */ jsx(Text, { size: "sm", m: 0, c: "var(--color-text-subtle)", style: { whiteSpace: "pre-wrap" }, children: str });
|
|
910
|
-
}
|
|
911
|
-
function ArrayView({ items, depth }) {
|
|
912
|
-
if (items.length === 0) {
|
|
913
|
-
return /* @__PURE__ */ jsx(Text, { size: "sm", c: "dimmed", fs: "italic", children: "Empty list" });
|
|
914
|
-
}
|
|
915
|
-
const allPrimitive = items.every((item) => typeof item !== "object" || item === null);
|
|
916
|
-
if (allPrimitive) {
|
|
917
|
-
return /* @__PURE__ */ jsx(Stack, { gap: 2, children: items.map((item, i) => /* @__PURE__ */ jsxs(Group, { gap: "xs", align: "flex-start", children: [
|
|
918
|
-
/* @__PURE__ */ jsx(Text, { size: "sm", c: "dimmed", style: { userSelect: "none" }, children: "\u2022" }),
|
|
919
|
-
/* @__PURE__ */ jsx(PrimitiveValue, { value: item })
|
|
920
|
-
] }, i)) });
|
|
921
|
-
}
|
|
922
|
-
return /* @__PURE__ */ jsx(Stack, { gap: "sm", children: items.map((item, i) => /* @__PURE__ */ jsx(Paper, { p: "sm", style: { border: "1px solid var(--color-border)" }, children: /* @__PURE__ */ jsx(ContextNode, { data: item, depth: depth + 1 }) }, i)) });
|
|
923
|
-
}
|
|
924
|
-
function ObjectView({ data, depth }) {
|
|
925
|
-
const entries = Object.entries(data);
|
|
926
|
-
if (entries.length === 0) {
|
|
927
|
-
return /* @__PURE__ */ jsx(Text, { size: "sm", c: "dimmed", fs: "italic", children: "Empty" });
|
|
928
|
-
}
|
|
929
|
-
const simpleEntries = [];
|
|
930
|
-
const complexEntries = [];
|
|
931
|
-
for (const [key, value] of entries) {
|
|
932
|
-
if (value === null || value === void 0 || typeof value === "boolean" || typeof value === "number") {
|
|
933
|
-
simpleEntries.push([key, value]);
|
|
934
|
-
} else if (typeof value === "string") {
|
|
935
|
-
if (hasMarkdown(value) || value.length > 120) {
|
|
936
|
-
complexEntries.push([key, value]);
|
|
937
|
-
} else {
|
|
938
|
-
simpleEntries.push([key, value]);
|
|
939
|
-
}
|
|
940
|
-
} else {
|
|
941
|
-
complexEntries.push([key, value]);
|
|
942
|
-
}
|
|
943
|
-
}
|
|
944
|
-
return /* @__PURE__ */ jsxs(Stack, { gap: 10, children: [
|
|
945
|
-
simpleEntries.length > 0 && /* @__PURE__ */ jsx(Stack, { gap: 6, children: simpleEntries.map(([key, value]) => /* @__PURE__ */ jsxs(Group, { gap: "sm", align: "flex-start", wrap: "nowrap", children: [
|
|
946
|
-
/* @__PURE__ */ jsx(
|
|
947
|
-
Text,
|
|
948
|
-
{
|
|
949
|
-
size: "sm",
|
|
950
|
-
style: { minWidth: 140, flexShrink: 0, fontFamily: "var(--mantine-font-family-headings)" },
|
|
951
|
-
children: formatLabel(key)
|
|
952
|
-
}
|
|
953
|
-
),
|
|
954
|
-
/* @__PURE__ */ jsx(PrimitiveValue, { value })
|
|
955
|
-
] }, key)) }),
|
|
956
|
-
complexEntries.map(([key, value]) => /* @__PURE__ */ jsx(NestedSection, { title: formatLabel(key), children: /* @__PURE__ */ jsx(ContextNode, { data: value, depth: depth + 1 }) }, key))
|
|
957
|
-
] });
|
|
958
|
-
}
|
|
959
|
-
var TIME_RANGE_OPTIONS = [
|
|
960
|
-
{ value: "1h", label: "Last 1 hour" },
|
|
961
|
-
{ value: "24h", label: "Last 24 hours" },
|
|
962
|
-
{ value: "7d", label: "Last 7 days" },
|
|
963
|
-
{ value: "30d", label: "Last 30 days" }
|
|
964
|
-
];
|
|
965
|
-
function TimeRangeSelector({ value, onChange, width = 180 }) {
|
|
966
|
-
return /* @__PURE__ */ jsx(
|
|
967
|
-
CustomSelector,
|
|
968
|
-
{
|
|
969
|
-
value,
|
|
970
|
-
onChange: (newValue) => newValue && onChange(newValue),
|
|
971
|
-
data: TIME_RANGE_OPTIONS,
|
|
972
|
-
leftSection: /* @__PURE__ */ jsx(IconClock, { size: 16, color: "var(--color-text-subtle)" }),
|
|
973
|
-
w: width,
|
|
974
|
-
withCheckIcon: true
|
|
975
|
-
}
|
|
976
|
-
);
|
|
977
|
-
}
|
|
978
|
-
function PageNotFound() {
|
|
979
|
-
const { currentPath, navigate } = useRouterContext();
|
|
980
|
-
const { user, isLoading } = useAuthContext();
|
|
981
|
-
const isAuthPage = currentPath === "/login" || currentPath === "/auth-redirect";
|
|
982
|
-
const shouldShowSidebar = user && !isLoading && !isAuthPage;
|
|
983
|
-
const height = shouldShowSidebar ? "100%" : "100vh";
|
|
984
|
-
return /* @__PURE__ */ jsx(Center, { h: height, bg: "var(--color-background)", children: /* @__PURE__ */ jsxs(Stack, { align: "center", justify: "center", children: [
|
|
985
|
-
/* @__PURE__ */ jsx(IconInfoCircle, { size: 60, color: "var(--color-text-subtle)" }),
|
|
986
|
-
/* @__PURE__ */ jsx(Title, { order: 1, children: "Page Not Found" }),
|
|
987
|
-
/* @__PURE__ */ jsx(Text, { c: "dimmed", size: "lg", children: "The page you are looking for does not exist." }),
|
|
988
|
-
/* @__PURE__ */ jsx(Group, { justify: "center", children: /* @__PURE__ */ jsx(Button, { size: "md", onClick: () => navigate("/"), children: "Go Home" }) })
|
|
989
|
-
] }) });
|
|
990
|
-
}
|
|
991
|
-
function FeatureUnavailableState({ path }) {
|
|
992
|
-
const { navigate } = useRouterContext();
|
|
993
|
-
return /* @__PURE__ */ jsx(
|
|
994
|
-
Center,
|
|
995
|
-
{
|
|
996
|
-
style: {
|
|
997
|
-
flex: 1,
|
|
998
|
-
minHeight: "100%",
|
|
999
|
-
width: "100%",
|
|
1000
|
-
padding: 24,
|
|
1001
|
-
background: "linear-gradient(180deg, color-mix(in srgb, var(--color-surface) 72%, transparent), transparent)"
|
|
1002
|
-
},
|
|
1003
|
-
children: /* @__PURE__ */ jsxs(
|
|
1004
|
-
Stack,
|
|
1005
|
-
{
|
|
1006
|
-
align: "center",
|
|
1007
|
-
gap: "md",
|
|
1008
|
-
style: {
|
|
1009
|
-
maxWidth: 560,
|
|
1010
|
-
padding: "32px 28px",
|
|
1011
|
-
borderRadius: 24,
|
|
1012
|
-
border: "1px solid var(--color-border)",
|
|
1013
|
-
background: "color-mix(in srgb, var(--glass-background) 86%, transparent)",
|
|
1014
|
-
boxShadow: "var(--card-shadow)",
|
|
1015
|
-
backdropFilter: "var(--glass-blur)",
|
|
1016
|
-
textAlign: "center"
|
|
1017
|
-
},
|
|
1018
|
-
children: [
|
|
1019
|
-
/* @__PURE__ */ jsx(IconBan, { size: 44, stroke: 1.8, color: "var(--color-text-subtle)" }),
|
|
1020
|
-
/* @__PURE__ */ jsxs(Stack, { gap: 6, align: "center", children: [
|
|
1021
|
-
/* @__PURE__ */ jsx(Title, { order: 2, children: "This section is unavailable" }),
|
|
1022
|
-
/* @__PURE__ */ jsx(Text, { c: "dimmed", size: "sm", maw: 420, children: path ? `The requested route ${path} is currently disabled in this workspace.` : "The requested subsection is currently disabled in this workspace." })
|
|
1023
|
-
] }),
|
|
1024
|
-
/* @__PURE__ */ jsx(Group, { gap: "sm", justify: "center", children: /* @__PURE__ */ jsx(Button, { onClick: () => navigate("/"), children: "Go home" }) })
|
|
1025
|
-
]
|
|
1026
|
-
}
|
|
1027
|
-
)
|
|
1028
|
-
}
|
|
1029
|
-
);
|
|
1030
|
-
}
|
|
1031
|
-
function ResourceCard({
|
|
1032
|
-
resource,
|
|
1033
|
-
onClick,
|
|
1034
|
-
layout = "stack",
|
|
1035
|
-
rightSection,
|
|
1036
|
-
topSection,
|
|
1037
|
-
lastRunLabel,
|
|
1038
|
-
style,
|
|
1039
|
-
...rest
|
|
1040
|
-
}) {
|
|
1041
|
-
const Icon = getResourceIcon(resource.type);
|
|
1042
|
-
if (!Icon) {
|
|
1043
|
-
return /* @__PURE__ */ jsx(Card, { shadow: "sm", withBorder: true, children: /* @__PURE__ */ jsxs(Text, { children: [
|
|
1044
|
-
"Invalid resource type: ",
|
|
1045
|
-
resource.type
|
|
1046
|
-
] }) });
|
|
1047
|
-
}
|
|
1048
|
-
const cardStyle = {
|
|
1049
|
-
cursor: "pointer",
|
|
1050
|
-
...layout === "grid" || layout === "card" ? { transition: "box-shadow var(--duration-fast) var(--easing)" } : {},
|
|
1051
|
-
...style
|
|
1052
|
-
};
|
|
1053
|
-
const iconSize = layout === "grid" ? 28 : 20;
|
|
1054
|
-
const details = /* @__PURE__ */ jsxs(Group, { gap: "sm", wrap: "nowrap", children: [
|
|
1055
|
-
/* @__PURE__ */ jsx(Icon, { size: iconSize, color: "var(--color-primary)" }),
|
|
1056
|
-
/* @__PURE__ */ jsxs(Stack, { gap: 4, style: { flex: 1, minWidth: 0 }, children: [
|
|
1057
|
-
/* @__PURE__ */ jsxs(Group, { gap: "xs", align: "center", children: [
|
|
1058
|
-
/* @__PURE__ */ jsx(
|
|
1059
|
-
Text,
|
|
1060
|
-
{
|
|
1061
|
-
fw: 600,
|
|
1062
|
-
size: "sm",
|
|
1063
|
-
style: { fontFamily: "var(--elevasis-font-family-subtitle)" },
|
|
1064
|
-
...layout === "stack" ? { lineClamp: 1 } : { truncate: true },
|
|
1065
|
-
children: resource.name
|
|
1066
|
-
}
|
|
1067
|
-
),
|
|
1068
|
-
/* @__PURE__ */ jsx(Badge, { variant: "light", size: layout === "grid" ? "xs" : "sm", children: resource.type })
|
|
1069
|
-
] }),
|
|
1070
|
-
resource.description && /* @__PURE__ */ jsx(Text, { size: "sm", c: "dimmed", ...layout === "stack" ? { lineClamp: 1 } : { truncate: true }, children: resource.description }),
|
|
1071
|
-
/* @__PURE__ */ jsxs(Group, { gap: "xs", children: [
|
|
1072
|
-
resource.version && /* @__PURE__ */ jsxs(Badge, { variant: "outline", size: "xs", children: [
|
|
1073
|
-
"v",
|
|
1074
|
-
resource.version
|
|
1075
|
-
] }),
|
|
1076
|
-
/* @__PURE__ */ jsx(Badge, { color: ResourceStatusColors[resource.status], variant: "outline", size: layout === "grid" ? "xs" : "sm", children: resource.status.toUpperCase() })
|
|
1077
|
-
] }),
|
|
1078
|
-
lastRunLabel && /* @__PURE__ */ jsx(Text, { size: "sm", c: "dimmed", children: lastRunLabel }),
|
|
1079
|
-
/* @__PURE__ */ jsx(Text, { size: layout === "grid" ? "sm" : "xs", c: "dimmed", ff: "monospace", children: resource.resourceId })
|
|
1080
|
-
] })
|
|
1081
|
-
] });
|
|
1082
|
-
if (layout === "card") {
|
|
1083
|
-
return /* @__PURE__ */ jsx(
|
|
1084
|
-
Card,
|
|
1085
|
-
{
|
|
1086
|
-
withBorder: true,
|
|
1087
|
-
padding: 0,
|
|
1088
|
-
style: cardStyle,
|
|
1089
|
-
onClick: () => onClick(resource),
|
|
1090
|
-
"data-resource-id": rest["data-resource-id"],
|
|
1091
|
-
children: /* @__PURE__ */ jsxs(Stack, { gap: 8, p: "sm", pb: "xs", children: [
|
|
1092
|
-
/* @__PURE__ */ jsxs(Group, { gap: "xs", wrap: "nowrap", justify: "space-between", children: [
|
|
1093
|
-
/* @__PURE__ */ jsxs(Group, { gap: "xs", wrap: "nowrap", style: { minWidth: 0 }, children: [
|
|
1094
|
-
/* @__PURE__ */ jsx(Icon, { size: 20, color: "var(--color-primary)", style: { flexShrink: 0 } }),
|
|
1095
|
-
/* @__PURE__ */ jsx(Text, { fw: 600, size: "md", style: { fontFamily: "var(--elevasis-font-family-subtitle)" }, truncate: true, children: resource.name })
|
|
1096
|
-
] }),
|
|
1097
|
-
/* @__PURE__ */ jsxs(Group, { gap: 6, wrap: "nowrap", style: { flexShrink: 0 }, children: [
|
|
1098
|
-
resource.version && /* @__PURE__ */ jsxs(Badge, { variant: "light", size: "sm", children: [
|
|
1099
|
-
"v",
|
|
1100
|
-
resource.version
|
|
1101
|
-
] }),
|
|
1102
|
-
/* @__PURE__ */ jsx(Badge, { color: ResourceStatusColors[resource.status], variant: "light", size: "sm", children: resource.status.toUpperCase() })
|
|
1103
|
-
] })
|
|
1104
|
-
] }),
|
|
1105
|
-
resource.description && /* @__PURE__ */ jsx(Text, { size: "sm", c: "dimmed", truncate: true, children: resource.description }),
|
|
1106
|
-
/* @__PURE__ */ jsxs(Group, { gap: "xs", justify: "space-between", wrap: "nowrap", children: [
|
|
1107
|
-
rightSection || /* @__PURE__ */ jsx("span", {}),
|
|
1108
|
-
lastRunLabel && /* @__PURE__ */ jsx(Text, { size: "sm", c: "dimmed", style: { whiteSpace: "nowrap" }, children: lastRunLabel })
|
|
1109
|
-
] }),
|
|
1110
|
-
topSection
|
|
1111
|
-
] })
|
|
1112
|
-
}
|
|
1113
|
-
);
|
|
1114
|
-
}
|
|
1115
|
-
if (layout === "row") {
|
|
1116
|
-
const [hovered, setHovered] = useState(false);
|
|
1117
|
-
return /* @__PURE__ */ jsx(
|
|
1118
|
-
Card,
|
|
1119
|
-
{
|
|
1120
|
-
padding: 0,
|
|
1121
|
-
style: {
|
|
1122
|
-
cursor: "pointer",
|
|
1123
|
-
border: "1px solid var(--color-border)",
|
|
1124
|
-
transition: "background 150ms ease",
|
|
1125
|
-
background: hovered ? "var(--active-background)" : "var(--color-surface)",
|
|
1126
|
-
...style
|
|
1127
|
-
},
|
|
1128
|
-
onClick: () => onClick(resource),
|
|
1129
|
-
onMouseEnter: () => setHovered(true),
|
|
1130
|
-
onMouseLeave: () => setHovered(false),
|
|
1131
|
-
"data-resource-id": rest["data-resource-id"],
|
|
1132
|
-
children: /* @__PURE__ */ jsxs(
|
|
1133
|
-
"div",
|
|
1134
|
-
{
|
|
1135
|
-
style: {
|
|
1136
|
-
display: "grid",
|
|
1137
|
-
gridTemplateColumns: "18px 200px 120px 1fr 180px 200px 14px",
|
|
1138
|
-
alignItems: "center",
|
|
1139
|
-
gap: "var(--mantine-spacing-sm)"
|
|
1140
|
-
},
|
|
1141
|
-
children: [
|
|
1142
|
-
/* @__PURE__ */ jsx(Icon, { size: 18, color: "var(--color-primary)" }),
|
|
1143
|
-
/* @__PURE__ */ jsx(Text, { fw: 600, size: "md", truncate: true, style: { fontFamily: "var(--elevasis-font-family-subtitle)" }, children: resource.name }),
|
|
1144
|
-
/* @__PURE__ */ jsxs(Group, { gap: 6, wrap: "nowrap", children: [
|
|
1145
|
-
resource.version && /* @__PURE__ */ jsxs(Badge, { variant: "light", size: "sm", children: [
|
|
1146
|
-
"v",
|
|
1147
|
-
resource.version
|
|
1148
|
-
] }),
|
|
1149
|
-
/* @__PURE__ */ jsx(Badge, { color: ResourceStatusColors[resource.status], variant: "light", size: "sm", children: resource.status.toUpperCase() })
|
|
1150
|
-
] }),
|
|
1151
|
-
/* @__PURE__ */ jsx(Text, { size: "sm", c: "dimmed", truncate: true, style: { minWidth: 0 }, children: resource.description || "" }),
|
|
1152
|
-
/* @__PURE__ */ jsx("div", { style: { whiteSpace: "nowrap" }, children: rightSection }),
|
|
1153
|
-
/* @__PURE__ */ jsx(Text, { size: "sm", c: "dimmed", style: { whiteSpace: "nowrap", textAlign: "right" }, children: lastRunLabel || "" }),
|
|
1154
|
-
/* @__PURE__ */ jsx(
|
|
1155
|
-
IconChevronRight,
|
|
1156
|
-
{
|
|
1157
|
-
size: 14,
|
|
1158
|
-
style: {
|
|
1159
|
-
opacity: hovered ? 0.7 : 0,
|
|
1160
|
-
transition: "opacity 150ms ease"
|
|
1161
|
-
}
|
|
1162
|
-
}
|
|
1163
|
-
)
|
|
1164
|
-
]
|
|
1165
|
-
}
|
|
1166
|
-
)
|
|
1167
|
-
}
|
|
1168
|
-
);
|
|
1169
|
-
}
|
|
1170
|
-
if (layout === "grid") {
|
|
1171
|
-
return /* @__PURE__ */ jsx(
|
|
1172
|
-
Card,
|
|
1173
|
-
{
|
|
1174
|
-
withBorder: true,
|
|
1175
|
-
padding: "sm",
|
|
1176
|
-
style: cardStyle,
|
|
1177
|
-
onClick: () => onClick(resource),
|
|
1178
|
-
"data-resource-id": rest["data-resource-id"],
|
|
1179
|
-
children: /* @__PURE__ */ jsxs(Grid, { gutter: "sm", align: "center", children: [
|
|
1180
|
-
/* @__PURE__ */ jsx(Grid.Col, { span: 8, children: details }),
|
|
1181
|
-
rightSection && /* @__PURE__ */ jsx(Grid.Col, { span: 4, children: /* @__PURE__ */ jsx(Group, { justify: "flex-end", gap: "md", wrap: "nowrap", children: rightSection }) })
|
|
1182
|
-
] })
|
|
1183
|
-
}
|
|
1184
|
-
);
|
|
1185
|
-
}
|
|
1186
|
-
return /* @__PURE__ */ jsx(
|
|
1187
|
-
Card,
|
|
1188
|
-
{
|
|
1189
|
-
shadow: "sm",
|
|
1190
|
-
withBorder: true,
|
|
1191
|
-
style: cardStyle,
|
|
1192
|
-
onClick: () => onClick(resource),
|
|
1193
|
-
"data-resource-id": rest["data-resource-id"],
|
|
1194
|
-
children: /* @__PURE__ */ jsx(Stack, { children: details })
|
|
1195
|
-
}
|
|
1196
|
-
);
|
|
1197
|
-
}
|
|
1198
|
-
function CardHeader({
|
|
1199
|
-
icon,
|
|
1200
|
-
title,
|
|
1201
|
-
subtitle,
|
|
1202
|
-
rightSection,
|
|
1203
|
-
titleOrder = 3,
|
|
1204
|
-
iconColor,
|
|
1205
|
-
mb = "md"
|
|
1206
|
-
}) {
|
|
1207
|
-
const wrappedIcon = icon ? /* @__PURE__ */ jsx(ThemeIcon, { size: "md", variant: "light", color: iconColor, children: icon }) : null;
|
|
1208
|
-
return /* @__PURE__ */ jsxs(Group, { justify: "space-between", mb, gap: "md", align: "flex-start", wrap: "nowrap", children: [
|
|
1209
|
-
subtitle ? /* @__PURE__ */ jsxs(Box, { style: { minWidth: 0 }, children: [
|
|
1210
|
-
/* @__PURE__ */ jsxs(Group, { gap: "xs", children: [
|
|
1211
|
-
wrappedIcon,
|
|
1212
|
-
/* @__PURE__ */ jsx(Title, { order: titleOrder, style: { overflowWrap: "anywhere" }, children: title })
|
|
1213
|
-
] }),
|
|
1214
|
-
/* @__PURE__ */ jsx(Text, { size: "sm", mt: 2, style: { color: "var(--color-text-dimmed)", overflowWrap: "anywhere" }, children: subtitle })
|
|
1215
|
-
] }) : /* @__PURE__ */ jsxs(Group, { gap: "xs", children: [
|
|
1216
|
-
wrappedIcon,
|
|
1217
|
-
/* @__PURE__ */ jsx(Title, { order: titleOrder, style: { overflowWrap: "anywhere" }, children: title })
|
|
1218
|
-
] }),
|
|
1219
|
-
rightSection
|
|
1220
|
-
] });
|
|
1221
|
-
}
|
|
1222
|
-
|
|
1223
|
-
// src/components/display/ElevasisLoader.module.css.js
|
|
1224
|
-
var ElevasisLoader_module_css_default = { "wrapper": "wrapper", "loader": "loader", "chevron": "chevron", "c1": "c1", "c2": "c2", "c3": "c3" };
|
|
1225
|
-
var ElevasisLoader = forwardRef(({ style, className, ...others }, ref) => /* @__PURE__ */ jsx("div", { ref, style, className: `${ElevasisLoader_module_css_default.wrapper} ${className ?? ""}`, ...others, children: /* @__PURE__ */ jsxs("svg", { className: ElevasisLoader_module_css_default.loader, viewBox: "-10 -5 60 50", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
1226
|
-
/* @__PURE__ */ jsx("polyline", { className: `${ElevasisLoader_module_css_default.chevron} ${ElevasisLoader_module_css_default.c1}`, points: "5,36 20,25 35,36" }),
|
|
1227
|
-
/* @__PURE__ */ jsx("polyline", { className: `${ElevasisLoader_module_css_default.chevron} ${ElevasisLoader_module_css_default.c2}`, points: "9,23 20,14 31,23" }),
|
|
1228
|
-
/* @__PURE__ */ jsx("polyline", { className: `${ElevasisLoader_module_css_default.chevron} ${ElevasisLoader_module_css_default.c3}`, points: "13,11 20,5 27,11" })
|
|
1229
|
-
] }) }));
|
|
1230
|
-
ElevasisLoader.displayName = "ElevasisLoader";
|
|
1231
|
-
var SIZE_MAP = {
|
|
1232
|
-
sm: { dot: 7, inner: 6, outer: 12 },
|
|
1233
|
-
md: { dot: 10, inner: 8, outer: 16 },
|
|
1234
|
-
lg: { dot: 12, inner: 10, outer: 20 }
|
|
1235
|
-
};
|
|
1236
|
-
function GlowDot({ color, size = "md" }) {
|
|
1237
|
-
const { dot, inner, outer } = SIZE_MAP[size];
|
|
1238
|
-
return /* @__PURE__ */ jsx(
|
|
1239
|
-
"div",
|
|
1240
|
-
{
|
|
1241
|
-
style: {
|
|
1242
|
-
width: dot,
|
|
1243
|
-
height: dot,
|
|
1244
|
-
borderRadius: "50%",
|
|
1245
|
-
backgroundColor: color,
|
|
1246
|
-
boxShadow: `0 0 ${inner}px ${color}, 0 0 ${outer}px ${color}40`,
|
|
1247
|
-
flexShrink: 0
|
|
1248
|
-
}
|
|
1249
|
-
}
|
|
1250
|
-
);
|
|
1251
|
-
}
|
|
1252
|
-
var STATUS_COLORS = {
|
|
1253
|
-
// Project
|
|
1254
|
-
active: "blue",
|
|
1255
|
-
on_track: "green",
|
|
1256
|
-
at_risk: "yellow",
|
|
1257
|
-
blocked: "red",
|
|
1258
|
-
completed: "teal",
|
|
1259
|
-
paused: "gray",
|
|
1260
|
-
// Milestone
|
|
1261
|
-
upcoming: "gray",
|
|
1262
|
-
in_progress: "blue",
|
|
1263
|
-
overdue: "red",
|
|
1264
|
-
// Task
|
|
1265
|
-
pending: "gray",
|
|
1266
|
-
planned: "gray",
|
|
1267
|
-
submitted: "yellow",
|
|
1268
|
-
approved: "green",
|
|
1269
|
-
rejected: "red",
|
|
1270
|
-
revision_requested: "orange",
|
|
1271
|
-
cancelled: "gray",
|
|
1272
|
-
// Note
|
|
1273
|
-
call_note: "blue",
|
|
1274
|
-
status_update: "green",
|
|
1275
|
-
issue: "yellow",
|
|
1276
|
-
blocker: "red",
|
|
1277
|
-
agent_learning: "grape"
|
|
1278
|
-
};
|
|
1279
|
-
function StatusBadge({ status, ...props }) {
|
|
1280
|
-
const label = status.split("_").map((w) => w.charAt(0).toUpperCase() + w.slice(1)).join(" ");
|
|
1281
|
-
return /* @__PURE__ */ jsx(Badge, { variant: "light", color: STATUS_COLORS[status] || "gray", size: "sm", ...props, children: label });
|
|
1282
|
-
}
|
|
1283
|
-
var ICON_MAP = {
|
|
1284
|
-
deal_created: IconPlus,
|
|
1285
|
-
stage_change: IconArrowRight,
|
|
1286
|
-
discovery_submitted: IconFileText,
|
|
1287
|
-
proposal_generated: IconFileText,
|
|
1288
|
-
proposal_sent: IconSend,
|
|
1289
|
-
proposal_reviewed: IconEye,
|
|
1290
|
-
closed_lost: IconX,
|
|
1291
|
-
fees_updated: IconCreditCard,
|
|
1292
|
-
closed_won: IconCircleCheck,
|
|
1293
|
-
reply_received: IconMessageReply,
|
|
1294
|
-
booking_cancelled: IconCalendarCancel,
|
|
1295
|
-
booking_rescheduled: IconCalendarEvent,
|
|
1296
|
-
reminder_sent: IconBell,
|
|
1297
|
-
reply_sent_to_lead: IconMailForward,
|
|
1298
|
-
followup_email_sent: IconMailForward,
|
|
1299
|
-
no_show: IconUserOff,
|
|
1300
|
-
moved_to_nurturing: IconHeartHandshake
|
|
1301
|
-
};
|
|
1302
|
-
function ActivityTimeline({ activities }) {
|
|
1303
|
-
if (!activities.length) {
|
|
1304
|
-
return /* @__PURE__ */ jsx(EmptyState, { icon: IconInbox, title: "No activity events yet" });
|
|
1305
|
-
}
|
|
1306
|
-
const sorted = [...activities].reverse();
|
|
1307
|
-
return /* @__PURE__ */ jsx(Paper, { withBorder: true, children: /* @__PURE__ */ jsx(Timeline, { active: sorted.length - 1, bulletSize: 28, lineWidth: 2, color: "var(--color-primary)", children: sorted.map((activity, index) => {
|
|
1308
|
-
const Icon = ICON_MAP[activity.type] || IconActivity;
|
|
1309
|
-
return /* @__PURE__ */ jsx(
|
|
1310
|
-
Timeline.Item,
|
|
1311
|
-
{
|
|
1312
|
-
bullet: /* @__PURE__ */ jsx(ThemeIcon, { size: 28, variant: "filled", color: "var(--color-primary)", radius: "xl", children: /* @__PURE__ */ jsx(Icon, { size: 14 }) }),
|
|
1313
|
-
children: /* @__PURE__ */ jsxs(Stack, { gap: 2, children: [
|
|
1314
|
-
/* @__PURE__ */ jsx(Text, { size: "sm", fw: 500, children: activity.title }),
|
|
1315
|
-
activity.description && /* @__PURE__ */ jsx(Text, { size: "xs", c: "dimmed", children: activity.description }),
|
|
1316
|
-
/* @__PURE__ */ jsxs(Text, { size: "xs", c: "dimmed", children: [
|
|
1317
|
-
formatTimeAgo(activity.occurredAt),
|
|
1318
|
-
activity.actor && ` by ${activity.actor}`
|
|
1319
|
-
] })
|
|
1320
|
-
] })
|
|
1321
|
-
},
|
|
1322
|
-
index
|
|
1323
|
-
);
|
|
1324
|
-
}) }) });
|
|
1325
|
-
}
|
|
1326
578
|
var GRANULARITY_MAP = {
|
|
1327
579
|
"1h": "hour",
|
|
1328
580
|
"24h": "hour",
|
|
@@ -1761,4 +1013,4 @@ function CombinedTrendChart({
|
|
|
1761
1013
|
] });
|
|
1762
1014
|
}
|
|
1763
1015
|
|
|
1764
|
-
export {
|
|
1016
|
+
export { ActivityTrendChart, ChartFrame, CombinedTrendChart, CostTrendChart, CyberAreaChart, CyberDonut, CyberDonutTooltip, CyberLegendItem, HeroStatsRow, getSeriesColor, observabilityKeys, useCyberColors, useErrorTrends };
|