@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
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Group, Box, Title, Text, ThemeIcon } from '@mantine/core';
|
|
2
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
|
+
|
|
4
|
+
// src/components/display/CardHeader.tsx
|
|
5
|
+
function CardHeader({
|
|
6
|
+
icon,
|
|
7
|
+
title,
|
|
8
|
+
subtitle,
|
|
9
|
+
rightSection,
|
|
10
|
+
titleOrder = 3,
|
|
11
|
+
iconColor,
|
|
12
|
+
mb = "md"
|
|
13
|
+
}) {
|
|
14
|
+
const wrappedIcon = icon ? /* @__PURE__ */ jsx(ThemeIcon, { size: "md", variant: "light", color: iconColor, children: icon }) : null;
|
|
15
|
+
return /* @__PURE__ */ jsxs(Group, { justify: "space-between", mb, gap: "md", align: "flex-start", wrap: "nowrap", children: [
|
|
16
|
+
subtitle ? /* @__PURE__ */ jsxs(Box, { style: { minWidth: 0 }, children: [
|
|
17
|
+
/* @__PURE__ */ jsxs(Group, { gap: "xs", children: [
|
|
18
|
+
wrappedIcon,
|
|
19
|
+
/* @__PURE__ */ jsx(Title, { order: titleOrder, style: { overflowWrap: "anywhere" }, children: title })
|
|
20
|
+
] }),
|
|
21
|
+
/* @__PURE__ */ jsx(Text, { size: "sm", mt: 2, style: { color: "var(--color-text-dimmed)", overflowWrap: "anywhere" }, children: subtitle })
|
|
22
|
+
] }) : /* @__PURE__ */ jsxs(Group, { gap: "xs", children: [
|
|
23
|
+
wrappedIcon,
|
|
24
|
+
/* @__PURE__ */ jsx(Title, { order: titleOrder, style: { overflowWrap: "anywhere" }, children: title })
|
|
25
|
+
] }),
|
|
26
|
+
rightSection
|
|
27
|
+
] });
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export { CardHeader };
|
|
@@ -0,0 +1,425 @@
|
|
|
1
|
+
import { useAppearance } from './chunk-A7IG36LB.js';
|
|
2
|
+
import { useState, Component } from 'react';
|
|
3
|
+
import { CopyButton, Tooltip } from '@mantine/core';
|
|
4
|
+
import { IconCheck, IconCopy } from '@tabler/icons-react';
|
|
5
|
+
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
6
|
+
|
|
7
|
+
var tokens = {
|
|
8
|
+
cardBg: "rgba(16, 16, 20, 0.92)",
|
|
9
|
+
cardBorder: "rgba(255, 255, 255, 0.06)",
|
|
10
|
+
accentRed: "#ff5555",
|
|
11
|
+
accentRedDim: "rgba(255, 85, 85, 0.15)",
|
|
12
|
+
textPrimary: "#e8e8e8",
|
|
13
|
+
textSecondary: "rgba(255, 255, 255, 0.5)",
|
|
14
|
+
textTertiary: "rgba(255, 255, 255, 0.3)",
|
|
15
|
+
codeBg: "rgba(0, 0, 0, 0.35)",
|
|
16
|
+
codeBorder: "rgba(255, 255, 255, 0.05)",
|
|
17
|
+
fileHighlight: "#7dd3fc",
|
|
18
|
+
separator: "rgba(255, 255, 255, 0.06)",
|
|
19
|
+
mono: "'JetBrains Mono', 'Fira Code', 'Cascadia Code', ui-monospace, monospace",
|
|
20
|
+
sans: "'Inter', -apple-system, system-ui, sans-serif"
|
|
21
|
+
};
|
|
22
|
+
function parseStackFrames(stack) {
|
|
23
|
+
return stack.split("\n").filter((line) => line.trim().startsWith("at ")).map((line) => {
|
|
24
|
+
const trimmed = line.trim();
|
|
25
|
+
const parenMatch = trimmed.match(/^at\s+(.+?)\s+\((.+)\)$/);
|
|
26
|
+
if (parenMatch) {
|
|
27
|
+
return { fn: parenMatch[1], file: parenMatch[2], raw: trimmed };
|
|
28
|
+
}
|
|
29
|
+
const simpleMatch = trimmed.match(/^at\s+(.+)$/);
|
|
30
|
+
if (simpleMatch) {
|
|
31
|
+
return { fn: "", file: simpleMatch[1], raw: trimmed };
|
|
32
|
+
}
|
|
33
|
+
return { fn: "", file: "", raw: trimmed };
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
var COMPONENT_NOISE = /* @__PURE__ */ new Set([
|
|
37
|
+
"div",
|
|
38
|
+
"main",
|
|
39
|
+
"span",
|
|
40
|
+
"section",
|
|
41
|
+
"Lazy",
|
|
42
|
+
"Suspense",
|
|
43
|
+
"SafeFragment",
|
|
44
|
+
"MatchImpl",
|
|
45
|
+
"MatchInnerImpl",
|
|
46
|
+
"OutletImpl",
|
|
47
|
+
"CatchBoundaryImpl",
|
|
48
|
+
"CatchBoundary",
|
|
49
|
+
"MatchesInner",
|
|
50
|
+
"Matches",
|
|
51
|
+
"SplitComponent"
|
|
52
|
+
]);
|
|
53
|
+
function isNoiseComponent(name) {
|
|
54
|
+
if (COMPONENT_NOISE.has(name)) return true;
|
|
55
|
+
if (name.startsWith("@mantine/") || name.startsWith("@tanstack/")) return true;
|
|
56
|
+
return false;
|
|
57
|
+
}
|
|
58
|
+
function parseComponentStack(stack) {
|
|
59
|
+
return stack.trim().split("\n").map((line) => line.trim()).filter((line) => line.startsWith("at ")).map((line) => {
|
|
60
|
+
const match = line.match(/^at\s+(\S+)/);
|
|
61
|
+
return match ? match[1] : line.replace(/^at\s+/, "");
|
|
62
|
+
}).filter((name) => !isNoiseComponent(name));
|
|
63
|
+
}
|
|
64
|
+
function SectionLabel({ children }) {
|
|
65
|
+
return /* @__PURE__ */ jsx(
|
|
66
|
+
"div",
|
|
67
|
+
{
|
|
68
|
+
style: {
|
|
69
|
+
fontSize: 10,
|
|
70
|
+
fontFamily: tokens.sans,
|
|
71
|
+
fontWeight: 600,
|
|
72
|
+
textTransform: "uppercase",
|
|
73
|
+
letterSpacing: "0.08em",
|
|
74
|
+
color: tokens.textTertiary,
|
|
75
|
+
marginBottom: 6
|
|
76
|
+
},
|
|
77
|
+
children
|
|
78
|
+
}
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
function CodeBlock({ children, style }) {
|
|
82
|
+
return /* @__PURE__ */ jsx(
|
|
83
|
+
"div",
|
|
84
|
+
{
|
|
85
|
+
style: {
|
|
86
|
+
background: tokens.codeBg,
|
|
87
|
+
border: `1px solid ${tokens.codeBorder}`,
|
|
88
|
+
borderRadius: 6,
|
|
89
|
+
padding: "10px 14px",
|
|
90
|
+
fontFamily: tokens.mono,
|
|
91
|
+
fontSize: 12,
|
|
92
|
+
lineHeight: 1.6,
|
|
93
|
+
color: tokens.textPrimary,
|
|
94
|
+
overflowX: "auto",
|
|
95
|
+
...style
|
|
96
|
+
},
|
|
97
|
+
children
|
|
98
|
+
}
|
|
99
|
+
);
|
|
100
|
+
}
|
|
101
|
+
function StackFrameRow({ frame }) {
|
|
102
|
+
return /* @__PURE__ */ jsxs("div", { style: { display: "flex", gap: 8, alignItems: "baseline" }, children: [
|
|
103
|
+
frame.fn && /* @__PURE__ */ jsx("span", { style: { color: tokens.textPrimary, flexShrink: 0 }, children: frame.fn }),
|
|
104
|
+
/* @__PURE__ */ jsx("span", { style: { color: tokens.fileHighlight, opacity: 0.7, fontSize: 11 }, children: frame.file })
|
|
105
|
+
] });
|
|
106
|
+
}
|
|
107
|
+
function Separator() {
|
|
108
|
+
return /* @__PURE__ */ jsx("div", { style: { height: 1, background: tokens.separator, margin: "4px 0" } });
|
|
109
|
+
}
|
|
110
|
+
function ErrorReportCard({
|
|
111
|
+
errorName,
|
|
112
|
+
errorMessage,
|
|
113
|
+
errorStack,
|
|
114
|
+
componentStack,
|
|
115
|
+
eventId,
|
|
116
|
+
url,
|
|
117
|
+
timestamp,
|
|
118
|
+
reportText,
|
|
119
|
+
appVersion
|
|
120
|
+
}) {
|
|
121
|
+
const [expanded, setExpanded] = useState(true);
|
|
122
|
+
const frames = errorStack ? parseStackFrames(errorStack) : [];
|
|
123
|
+
const components = componentStack ? parseComponentStack(componentStack) : [];
|
|
124
|
+
return /* @__PURE__ */ jsxs(
|
|
125
|
+
"div",
|
|
126
|
+
{
|
|
127
|
+
style: {
|
|
128
|
+
background: tokens.cardBg,
|
|
129
|
+
border: `1px solid ${tokens.cardBorder}`,
|
|
130
|
+
borderTop: `3px solid ${tokens.accentRed}`,
|
|
131
|
+
borderRadius: 10,
|
|
132
|
+
maxWidth: 720,
|
|
133
|
+
width: "100%",
|
|
134
|
+
fontFamily: tokens.sans,
|
|
135
|
+
backdropFilter: "blur(20px)",
|
|
136
|
+
boxShadow: "0 25px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(255, 85, 85, 0.05)"
|
|
137
|
+
},
|
|
138
|
+
children: [
|
|
139
|
+
/* @__PURE__ */ jsxs("div", { style: { padding: "20px 24px 0" }, children: [
|
|
140
|
+
/* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between", marginBottom: 12 }, children: [
|
|
141
|
+
/* @__PURE__ */ jsx("div", { style: { display: "flex", alignItems: "center", gap: 10 }, children: /* @__PURE__ */ jsx(
|
|
142
|
+
"span",
|
|
143
|
+
{
|
|
144
|
+
style: {
|
|
145
|
+
background: tokens.accentRedDim,
|
|
146
|
+
color: tokens.accentRed,
|
|
147
|
+
fontSize: 12,
|
|
148
|
+
fontWeight: 600,
|
|
149
|
+
fontFamily: tokens.mono,
|
|
150
|
+
padding: "3px 10px",
|
|
151
|
+
borderRadius: 4,
|
|
152
|
+
letterSpacing: "0.02em"
|
|
153
|
+
},
|
|
154
|
+
children: errorName
|
|
155
|
+
}
|
|
156
|
+
) }),
|
|
157
|
+
/* @__PURE__ */ jsx(CopyButton, { value: reportText, timeout: 2e3, children: ({ copied, copy }) => /* @__PURE__ */ jsx(Tooltip, { label: copied ? "Copied!" : "Copy error report", position: "left", children: /* @__PURE__ */ jsxs(
|
|
158
|
+
"button",
|
|
159
|
+
{
|
|
160
|
+
onClick: copy,
|
|
161
|
+
style: {
|
|
162
|
+
background: copied ? "rgba(45, 212, 191, 0.15)" : "rgba(255, 255, 255, 0.06)",
|
|
163
|
+
border: `1px solid ${copied ? "rgba(45, 212, 191, 0.3)" : "rgba(255, 255, 255, 0.08)"}`,
|
|
164
|
+
borderRadius: 6,
|
|
165
|
+
padding: "5px 12px",
|
|
166
|
+
color: copied ? "#2dd4bf" : tokens.textSecondary,
|
|
167
|
+
cursor: "pointer",
|
|
168
|
+
display: "flex",
|
|
169
|
+
alignItems: "center",
|
|
170
|
+
gap: 6,
|
|
171
|
+
fontSize: 12,
|
|
172
|
+
fontFamily: tokens.sans,
|
|
173
|
+
transition: "all 0.15s ease"
|
|
174
|
+
},
|
|
175
|
+
children: [
|
|
176
|
+
copied ? /* @__PURE__ */ jsx(IconCheck, { size: 13 }) : /* @__PURE__ */ jsx(IconCopy, { size: 13 }),
|
|
177
|
+
copied ? "Copied" : "Copy"
|
|
178
|
+
]
|
|
179
|
+
}
|
|
180
|
+
) }) })
|
|
181
|
+
] }),
|
|
182
|
+
/* @__PURE__ */ jsx(
|
|
183
|
+
"div",
|
|
184
|
+
{
|
|
185
|
+
style: {
|
|
186
|
+
fontSize: 16,
|
|
187
|
+
fontWeight: 500,
|
|
188
|
+
color: tokens.textPrimary,
|
|
189
|
+
lineHeight: 1.5,
|
|
190
|
+
marginBottom: 16
|
|
191
|
+
},
|
|
192
|
+
children: errorMessage
|
|
193
|
+
}
|
|
194
|
+
),
|
|
195
|
+
/* @__PURE__ */ jsxs(
|
|
196
|
+
"div",
|
|
197
|
+
{
|
|
198
|
+
style: {
|
|
199
|
+
background: tokens.codeBg,
|
|
200
|
+
border: `1px solid ${tokens.codeBorder}`,
|
|
201
|
+
borderRadius: 6,
|
|
202
|
+
padding: "8px 12px",
|
|
203
|
+
fontFamily: tokens.mono,
|
|
204
|
+
fontSize: 12,
|
|
205
|
+
color: tokens.fileHighlight,
|
|
206
|
+
marginBottom: 16,
|
|
207
|
+
display: "flex",
|
|
208
|
+
alignItems: "center",
|
|
209
|
+
gap: 8
|
|
210
|
+
},
|
|
211
|
+
children: [
|
|
212
|
+
/* @__PURE__ */ jsx("span", { style: { color: tokens.textTertiary, fontSize: 10, flexShrink: 0 }, children: "URL" }),
|
|
213
|
+
/* @__PURE__ */ jsx("span", { style: { opacity: 0.8 }, children: url })
|
|
214
|
+
]
|
|
215
|
+
}
|
|
216
|
+
)
|
|
217
|
+
] }),
|
|
218
|
+
/* @__PURE__ */ jsx("div", { style: { padding: "0 24px" }, children: /* @__PURE__ */ jsxs(
|
|
219
|
+
"button",
|
|
220
|
+
{
|
|
221
|
+
onClick: () => setExpanded((v) => !v),
|
|
222
|
+
style: {
|
|
223
|
+
background: "none",
|
|
224
|
+
border: "none",
|
|
225
|
+
color: tokens.textTertiary,
|
|
226
|
+
fontSize: 11,
|
|
227
|
+
fontFamily: tokens.sans,
|
|
228
|
+
cursor: "pointer",
|
|
229
|
+
padding: "4px 0",
|
|
230
|
+
display: "flex",
|
|
231
|
+
alignItems: "center",
|
|
232
|
+
gap: 4,
|
|
233
|
+
letterSpacing: "0.05em",
|
|
234
|
+
textTransform: "uppercase",
|
|
235
|
+
fontWeight: 600
|
|
236
|
+
},
|
|
237
|
+
children: [
|
|
238
|
+
expanded ? "- Hide" : "+ Show",
|
|
239
|
+
" details"
|
|
240
|
+
]
|
|
241
|
+
}
|
|
242
|
+
) }),
|
|
243
|
+
expanded && /* @__PURE__ */ jsxs("div", { style: { padding: "8px 24px 20px" }, children: [
|
|
244
|
+
frames.length > 0 && /* @__PURE__ */ jsxs("div", { style: { marginBottom: 16 }, children: [
|
|
245
|
+
/* @__PURE__ */ jsx(SectionLabel, { children: "Stack Trace" }),
|
|
246
|
+
/* @__PURE__ */ jsx(CodeBlock, { style: { maxHeight: 220, overflowY: "auto" }, children: frames.map((frame, i) => /* @__PURE__ */ jsx(StackFrameRow, { frame }, i)) })
|
|
247
|
+
] }),
|
|
248
|
+
components.length > 0 && /* @__PURE__ */ jsxs("div", { style: { marginBottom: 16 }, children: [
|
|
249
|
+
/* @__PURE__ */ jsx(SectionLabel, { children: "Component Tree" }),
|
|
250
|
+
/* @__PURE__ */ jsx(CodeBlock, { style: { maxHeight: 120, overflowY: "auto" }, children: /* @__PURE__ */ jsx("div", { style: { display: "flex", flexWrap: "wrap", gap: "2px 0", alignItems: "center" }, children: components.map((name, i) => /* @__PURE__ */ jsxs("span", { style: { display: "inline-flex", alignItems: "center" }, children: [
|
|
251
|
+
/* @__PURE__ */ jsx(
|
|
252
|
+
"span",
|
|
253
|
+
{
|
|
254
|
+
style: {
|
|
255
|
+
color: i === 0 ? tokens.accentRed : tokens.textPrimary,
|
|
256
|
+
fontWeight: i === 0 ? 600 : 400
|
|
257
|
+
},
|
|
258
|
+
children: name
|
|
259
|
+
}
|
|
260
|
+
),
|
|
261
|
+
i < components.length - 1 && /* @__PURE__ */ jsx("span", { style: { color: tokens.textTertiary, margin: "0 6px", fontSize: 10 }, children: "\u203A" })
|
|
262
|
+
] }, i)) }) })
|
|
263
|
+
] }),
|
|
264
|
+
/* @__PURE__ */ jsx(Separator, {}),
|
|
265
|
+
/* @__PURE__ */ jsxs(
|
|
266
|
+
"div",
|
|
267
|
+
{
|
|
268
|
+
style: {
|
|
269
|
+
display: "grid",
|
|
270
|
+
gridTemplateColumns: "auto 1fr",
|
|
271
|
+
gap: "4px 16px",
|
|
272
|
+
fontSize: 11,
|
|
273
|
+
fontFamily: tokens.mono,
|
|
274
|
+
paddingTop: 12
|
|
275
|
+
},
|
|
276
|
+
children: [
|
|
277
|
+
appVersion && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
278
|
+
/* @__PURE__ */ jsx("span", { style: { color: tokens.textTertiary }, children: "version" }),
|
|
279
|
+
/* @__PURE__ */ jsx("span", { style: { color: tokens.textSecondary }, children: appVersion })
|
|
280
|
+
] }),
|
|
281
|
+
/* @__PURE__ */ jsx("span", { style: { color: tokens.textTertiary }, children: "timestamp" }),
|
|
282
|
+
/* @__PURE__ */ jsx("span", { style: { color: tokens.textSecondary }, children: timestamp }),
|
|
283
|
+
/* @__PURE__ */ jsx("span", { style: { color: tokens.textTertiary }, children: "viewport" }),
|
|
284
|
+
/* @__PURE__ */ jsxs("span", { style: { color: tokens.textSecondary }, children: [
|
|
285
|
+
window.innerWidth,
|
|
286
|
+
"x",
|
|
287
|
+
window.innerHeight
|
|
288
|
+
] }),
|
|
289
|
+
eventId && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
290
|
+
/* @__PURE__ */ jsx("span", { style: { color: tokens.textTertiary }, children: "sentry" }),
|
|
291
|
+
/* @__PURE__ */ jsx("span", { style: { color: tokens.textSecondary }, children: eventId })
|
|
292
|
+
] })
|
|
293
|
+
]
|
|
294
|
+
}
|
|
295
|
+
)
|
|
296
|
+
] }),
|
|
297
|
+
/* @__PURE__ */ jsx(
|
|
298
|
+
"div",
|
|
299
|
+
{
|
|
300
|
+
style: {
|
|
301
|
+
borderTop: `1px solid ${tokens.separator}`,
|
|
302
|
+
padding: "12px 24px",
|
|
303
|
+
display: "flex",
|
|
304
|
+
justifyContent: "center"
|
|
305
|
+
},
|
|
306
|
+
children: /* @__PURE__ */ jsx(
|
|
307
|
+
"button",
|
|
308
|
+
{
|
|
309
|
+
onClick: () => window.location.reload(),
|
|
310
|
+
style: {
|
|
311
|
+
background: "none",
|
|
312
|
+
border: "none",
|
|
313
|
+
color: tokens.textTertiary,
|
|
314
|
+
fontSize: 12,
|
|
315
|
+
fontFamily: tokens.sans,
|
|
316
|
+
cursor: "pointer",
|
|
317
|
+
padding: "2px 8px",
|
|
318
|
+
textDecoration: "underline",
|
|
319
|
+
textUnderlineOffset: 3
|
|
320
|
+
},
|
|
321
|
+
children: "Reload page"
|
|
322
|
+
}
|
|
323
|
+
)
|
|
324
|
+
}
|
|
325
|
+
)
|
|
326
|
+
]
|
|
327
|
+
}
|
|
328
|
+
);
|
|
329
|
+
}
|
|
330
|
+
function getErrorName(error) {
|
|
331
|
+
if (error instanceof Error) {
|
|
332
|
+
return error.constructor.name === "Error" ? "Error" : error.constructor.name;
|
|
333
|
+
}
|
|
334
|
+
return "Error";
|
|
335
|
+
}
|
|
336
|
+
function buildErrorReport(opts) {
|
|
337
|
+
const { error, componentStack, eventId } = opts;
|
|
338
|
+
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
339
|
+
const errorStack = error instanceof Error ? error.stack : void 0;
|
|
340
|
+
const url = opts.url ?? window.location.href;
|
|
341
|
+
const sections = [
|
|
342
|
+
`## Error Report`,
|
|
343
|
+
`**Timestamp:** ${(/* @__PURE__ */ new Date()).toISOString()}`,
|
|
344
|
+
`**URL:** ${url}`,
|
|
345
|
+
opts.appVersion && `**App Version:** ${opts.appVersion}`,
|
|
346
|
+
eventId && `**Sentry Event ID:** ${eventId}`,
|
|
347
|
+
`**User Agent:** ${navigator.userAgent}`,
|
|
348
|
+
`**Viewport:** ${window.innerWidth}x${window.innerHeight}`,
|
|
349
|
+
"",
|
|
350
|
+
`### Error`,
|
|
351
|
+
"```",
|
|
352
|
+
`${getErrorName(error)}: ${errorMessage}`,
|
|
353
|
+
"```",
|
|
354
|
+
"",
|
|
355
|
+
errorStack && `### Stack Trace`,
|
|
356
|
+
errorStack && "```",
|
|
357
|
+
errorStack,
|
|
358
|
+
errorStack && "```",
|
|
359
|
+
errorStack && "",
|
|
360
|
+
componentStack && `### Component Stack`,
|
|
361
|
+
componentStack && "```",
|
|
362
|
+
componentStack?.trim(),
|
|
363
|
+
componentStack && "```"
|
|
364
|
+
];
|
|
365
|
+
return sections.filter(Boolean).join("\n");
|
|
366
|
+
}
|
|
367
|
+
function CrashErrorFallback({ error, componentStack, eventId, appVersion }) {
|
|
368
|
+
const { background } = useAppearance();
|
|
369
|
+
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
370
|
+
const errorStack = error instanceof Error ? error.stack : void 0;
|
|
371
|
+
const errorName = getErrorName(error);
|
|
372
|
+
const reportText = buildErrorReport({ error, componentStack, eventId, appVersion });
|
|
373
|
+
const timestamp = (/* @__PURE__ */ new Date()).toISOString();
|
|
374
|
+
return /* @__PURE__ */ jsxs(
|
|
375
|
+
"div",
|
|
376
|
+
{
|
|
377
|
+
style: {
|
|
378
|
+
position: "fixed",
|
|
379
|
+
inset: 0,
|
|
380
|
+
overflow: "auto",
|
|
381
|
+
background: "var(--color-background)",
|
|
382
|
+
display: "flex",
|
|
383
|
+
alignItems: "center",
|
|
384
|
+
justifyContent: "center",
|
|
385
|
+
padding: 24
|
|
386
|
+
},
|
|
387
|
+
children: [
|
|
388
|
+
background,
|
|
389
|
+
/* @__PURE__ */ jsx("div", { style: { position: "relative", zIndex: 1, width: "100%", display: "flex", justifyContent: "center" }, children: /* @__PURE__ */ jsx(
|
|
390
|
+
ErrorReportCard,
|
|
391
|
+
{
|
|
392
|
+
errorName,
|
|
393
|
+
errorMessage,
|
|
394
|
+
errorStack,
|
|
395
|
+
componentStack,
|
|
396
|
+
eventId,
|
|
397
|
+
url: window.location.href,
|
|
398
|
+
timestamp,
|
|
399
|
+
reportText,
|
|
400
|
+
appVersion
|
|
401
|
+
}
|
|
402
|
+
) })
|
|
403
|
+
]
|
|
404
|
+
}
|
|
405
|
+
);
|
|
406
|
+
}
|
|
407
|
+
var AppErrorBoundary = class extends Component {
|
|
408
|
+
state = { error: null, componentStack: "" };
|
|
409
|
+
static getDerivedStateFromError(error) {
|
|
410
|
+
return { error };
|
|
411
|
+
}
|
|
412
|
+
componentDidCatch(error, errorInfo) {
|
|
413
|
+
this.setState({ componentStack: errorInfo.componentStack ?? "" });
|
|
414
|
+
this.props.onError?.(error, errorInfo);
|
|
415
|
+
}
|
|
416
|
+
render() {
|
|
417
|
+
if (this.state.error !== null) {
|
|
418
|
+
const props = { error: this.state.error, componentStack: this.state.componentStack };
|
|
419
|
+
return this.props.fallback ? this.props.fallback(props) : /* @__PURE__ */ jsx(CrashErrorFallback, { ...props, appVersion: this.props.appVersion });
|
|
420
|
+
}
|
|
421
|
+
return this.props.children;
|
|
422
|
+
}
|
|
423
|
+
};
|
|
424
|
+
|
|
425
|
+
export { AppErrorBoundary, CrashErrorFallback, ErrorReportCard, buildErrorReport };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SubshellNavItem } from './chunk-X4WBGKJQ.js';
|
|
2
|
+
import { SubshellSidebarSection } from './chunk-IIMU5YAJ.js';
|
|
2
3
|
import { useRouterContext } from './chunk-Q7DJKLEN.js';
|
|
3
4
|
import { Stack } from '@mantine/core';
|
|
4
5
|
import { IconSearch, IconChartBar, IconTrendingUp } from '@tabler/icons-react';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { UnstyledButton,
|
|
1
|
+
import { subshellNavItemIconSize } from './chunk-DT3QYZVU.js';
|
|
2
|
+
import { UnstyledButton, Stack, Group, Text } from '@mantine/core';
|
|
3
3
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
4
4
|
|
|
5
5
|
var activeColor = "var(--color-primary)";
|
|
@@ -134,52 +134,5 @@ var SubshellNavItem = ({
|
|
|
134
134
|
}
|
|
135
135
|
);
|
|
136
136
|
};
|
|
137
|
-
var SubshellSidebarSection = ({
|
|
138
|
-
icon: Icon,
|
|
139
|
-
label,
|
|
140
|
-
rightSection,
|
|
141
|
-
withTopBorder = false
|
|
142
|
-
}) => {
|
|
143
|
-
return /* @__PURE__ */ jsx(
|
|
144
|
-
Box,
|
|
145
|
-
{
|
|
146
|
-
p: "sm",
|
|
147
|
-
style: {
|
|
148
|
-
borderTop: withTopBorder ? "1px solid var(--color-border)" : void 0,
|
|
149
|
-
borderBottom: "1px solid var(--color-border)"
|
|
150
|
-
},
|
|
151
|
-
children: /* @__PURE__ */ jsxs(Group, { gap: "xs", children: [
|
|
152
|
-
/* @__PURE__ */ jsx(
|
|
153
|
-
ThemeIcon,
|
|
154
|
-
{
|
|
155
|
-
variant: "light",
|
|
156
|
-
size: sidebarIconSize,
|
|
157
|
-
style: {
|
|
158
|
-
backgroundColor: "var(--color-surface)",
|
|
159
|
-
color: "var(--color-primary)",
|
|
160
|
-
flexShrink: 0
|
|
161
|
-
},
|
|
162
|
-
children: /* @__PURE__ */ jsx(Icon, { size: sidebarIconInnerSize, stroke: sidebarIconStroke })
|
|
163
|
-
}
|
|
164
|
-
),
|
|
165
|
-
/* @__PURE__ */ jsx(
|
|
166
|
-
Box,
|
|
167
|
-
{
|
|
168
|
-
c: "var(--color-text)",
|
|
169
|
-
style: {
|
|
170
|
-
fontFamily: "var(--elevasis-font-family-subtitle)",
|
|
171
|
-
flex: 1,
|
|
172
|
-
fontSize: "var(--mantine-font-size-md)",
|
|
173
|
-
fontWeight: 500,
|
|
174
|
-
lineHeight: 1.2
|
|
175
|
-
},
|
|
176
|
-
children: label
|
|
177
|
-
}
|
|
178
|
-
),
|
|
179
|
-
rightSection
|
|
180
|
-
] })
|
|
181
|
-
}
|
|
182
|
-
);
|
|
183
|
-
};
|
|
184
137
|
|
|
185
|
-
export { SubshellNavItem
|
|
138
|
+
export { SubshellNavItem };
|
|
@@ -282,14 +282,6 @@ function getResourceIcon(type) {
|
|
|
282
282
|
// src/utils/constants/api.ts
|
|
283
283
|
var API_URL = import.meta.env.PROD ? "https://api.elevasis.io" : "http://localhost:5170";
|
|
284
284
|
|
|
285
|
-
// src/utils/constants/cache.ts
|
|
286
|
-
var STALE_TIME_MONITORING = 3e4;
|
|
287
|
-
var STALE_TIME_ADMIN = 6e4;
|
|
288
|
-
var STALE_TIME_DEFAULT = 3e5;
|
|
289
|
-
var GC_TIME_SHORT = 3e5;
|
|
290
|
-
var GC_TIME_MEDIUM = 6e5;
|
|
291
|
-
var GC_TIME_LONG = 18e5;
|
|
292
|
-
|
|
293
285
|
// src/utils/constants/polling.ts
|
|
294
286
|
var REFETCH_INTERVAL_DASHBOARD = 6e4;
|
|
295
287
|
var REFETCH_INTERVAL_REALTIME = 3e4;
|
|
@@ -378,4 +370,4 @@ function setupBrowserMocks() {
|
|
|
378
370
|
setupResizeObserver();
|
|
379
371
|
}
|
|
380
372
|
|
|
381
|
-
export { APIClientError, API_URL, CredentialNameSchema, DEBOUNCE_FILTER, DEBOUNCE_SLIDER,
|
|
373
|
+
export { APIClientError, API_URL, CredentialNameSchema, DEBOUNCE_FILTER, DEBOUNCE_SLIDER, LIMIT_ACTIVITY_FEED, NonEmptyStringSchema, OAUTH_FLOW_TIMEOUT, OriginResourceTypeSchema, PAGE_SIZE_DEFAULT, REFETCH_INTERVAL_DASHBOARD, REFETCH_INTERVAL_REALTIME, REFETCH_INTERVAL_RUNNING, REFETCH_INTERVAL_RUNNING_FAST, ResourceTypeSchema, SSE_CLOSE_GRACE_PERIOD, SSE_TOKEN_REFRESH_DELAY, UuidSchema, WS_MAX_RETRIES_BEFORE_ERROR, WS_RECONNECT_BASE_DELAY, WS_RECONNECT_MAX_DELAY, debounce, formatBucketTime, formatChartAxisDate, formatDate, formatDateTime, formatErrorMessage, formatRelativeTime, formatTimeAgo, getErrorInfo, getErrorTitle, getResourceColor, getResourceIcon, getTimeRangeDates, getTimeRangeLabel, isAPIClientError, restoreConsole, setupBrowserMocks, suppressKnownWarnings, validateEmail };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { APIClientError } from './chunk-
|
|
1
|
+
import { APIClientError } from './chunk-X66MVMZT.js';
|
|
2
2
|
import { OrganizationContext } from './chunk-DD3CCMCZ.js';
|
|
3
3
|
import { createContext, useContext, useMemo, useCallback } from 'react';
|
|
4
4
|
import { jsx } from 'react/jsx-runtime';
|