@elevasis/ui 1.19.0 → 1.20.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (94) hide show
  1. package/dist/api/index.js +2 -2
  2. package/dist/auth/index.js +3 -3
  3. package/dist/charts/index.css +14 -0
  4. package/dist/charts/index.js +8 -6
  5. package/dist/{chunk-7ATCF6UL.js → chunk-3DIU726S.js} +11 -4
  6. package/dist/chunk-4SY4EQSK.js +68 -0
  7. package/dist/{chunk-2Z7LYTIX.js → chunk-AQ5MQDSS.js} +30 -17
  8. package/dist/chunk-AWMZCYKH.js +639 -0
  9. package/dist/{chunk-BVNAC4SQ.js → chunk-C7AD6N23.js} +38 -48
  10. package/dist/{chunk-ZFCG5SHW.js → chunk-COTI2QPO.js} +1 -1
  11. package/dist/{chunk-WAPZN2U3.js → chunk-EMN755L5.js} +7 -41
  12. package/dist/{chunk-LBY7FVFD.js → chunk-ERVB3QJQ.js} +31 -715
  13. package/dist/chunk-GBMNCNHX.js +105 -0
  14. package/dist/{chunk-MBZDE6UT.js → chunk-IOKL7BKE.js} +9 -1
  15. package/dist/{chunk-35UWYH2A.js → chunk-JFRG2JJE.js} +8 -2
  16. package/dist/chunk-JIABC3AE.js +2622 -0
  17. package/dist/chunk-JZEXFQ6N.js +671 -0
  18. package/dist/chunk-LGKLC5MG.js +44 -0
  19. package/dist/chunk-MG3NF7QL.js +63 -0
  20. package/dist/{chunk-KBLGVZBD.js → chunk-NNKKBSJN.js} +2 -22
  21. package/dist/{chunk-JNBHUCKW.js → chunk-NVOCKXUQ.js} +1 -1
  22. package/dist/chunk-OFAXUZPZ.js +2411 -0
  23. package/dist/chunk-PDHTXPSF.js +12 -0
  24. package/dist/chunk-QJ2S46NI.js +23 -0
  25. package/dist/{chunk-NUULWBAD.js → chunk-R3R367QY.js} +1 -1
  26. package/dist/{chunk-UANJP5P7.js → chunk-R7WLWGPO.js} +5 -5
  27. package/dist/{chunk-CC3SDRIF.js → chunk-RWQIFKMJ.js} +1 -1
  28. package/dist/chunk-UMFPUM7Q.js +1281 -0
  29. package/dist/{chunk-KNJKCD73.js → chunk-VLTVZXP6.js} +4 -4
  30. package/dist/chunk-WWEMNIHW.js +37 -0
  31. package/dist/{chunk-UTWJZEOJ.js → chunk-XOTN3X3Z.js} +3 -3
  32. package/dist/components/index.css +14 -0
  33. package/dist/components/index.d.ts +41 -7
  34. package/dist/components/index.js +564 -5023
  35. package/dist/components/navigation/index.js +2 -63
  36. package/dist/features/auth/index.css +579 -0
  37. package/dist/features/auth/index.d.ts +2557 -0
  38. package/dist/features/auth/index.js +125 -0
  39. package/dist/features/dashboard/index.css +579 -0
  40. package/dist/features/dashboard/index.d.ts +244 -0
  41. package/dist/features/dashboard/index.js +650 -0
  42. package/dist/features/monitoring/index.css +579 -0
  43. package/dist/features/monitoring/index.d.ts +121 -0
  44. package/dist/features/monitoring/index.js +538 -0
  45. package/dist/features/operations/index.css +14 -0
  46. package/dist/features/operations/index.d.ts +1675 -2
  47. package/dist/features/operations/index.js +2148 -28
  48. package/dist/features/settings/index.css +579 -0
  49. package/dist/features/settings/index.d.ts +2589 -0
  50. package/dist/features/settings/index.js +1437 -0
  51. package/dist/hooks/index.css +14 -0
  52. package/dist/hooks/index.d.ts +29 -11
  53. package/dist/hooks/index.js +13 -13
  54. package/dist/hooks/published.css +14 -0
  55. package/dist/hooks/published.d.ts +29 -11
  56. package/dist/hooks/published.js +12 -12
  57. package/dist/index.css +14 -0
  58. package/dist/index.d.ts +41 -12
  59. package/dist/index.js +15 -15
  60. package/dist/initialization/index.js +2 -2
  61. package/dist/layout/index.d.ts +7 -1
  62. package/dist/layout/index.js +7 -5
  63. package/dist/organization/index.js +2 -2
  64. package/dist/provider/index.css +14 -0
  65. package/dist/provider/index.d.ts +1 -1
  66. package/dist/provider/index.js +10 -10
  67. package/dist/provider/published.d.ts +1 -1
  68. package/dist/provider/published.js +6 -6
  69. package/dist/theme/index.d.ts +1 -1
  70. package/dist/theme/index.js +3 -3
  71. package/dist/theme/presets/__tests__/getPreset.test.d.ts +2 -0
  72. package/dist/theme/presets/__tests__/getPreset.test.d.ts.map +1 -0
  73. package/dist/theme/presets/__tests__/getPreset.test.js +92 -0
  74. package/dist/theme/presets/cyber-volt.d.ts +12 -0
  75. package/dist/theme/presets/cyber-volt.d.ts.map +1 -0
  76. package/dist/theme/presets/cyber-volt.js +70 -0
  77. package/dist/theme/presets/regal.d.ts +8 -0
  78. package/dist/theme/presets/regal.d.ts.map +1 -0
  79. package/dist/theme/presets/regal.js +69 -0
  80. package/dist/theme/presets/rose-gold.d.ts +12 -0
  81. package/dist/theme/presets/rose-gold.d.ts.map +1 -0
  82. package/dist/theme/presets/rose-gold.js +76 -0
  83. package/dist/types/index.d.ts +1 -1
  84. package/dist/utils/index.d.ts +12 -1
  85. package/dist/utils/index.js +1 -1
  86. package/dist/zustand/index.d.ts +80 -0
  87. package/dist/zustand/index.js +105 -0
  88. package/package.json +55 -4
  89. package/dist/chunk-2YW3LDFT.js +0 -1542
  90. package/dist/theme/presets/cyber-void.d.ts +0 -12
  91. package/dist/theme/presets/cyber-void.d.ts.map +0 -1
  92. package/dist/theme/presets/cyber-void.js +0 -75
  93. package/dist/{chunk-DVKEEY5J.js → chunk-TUXTSEAF.js} +1 -1
  94. package/dist/{chunk-U2522LSW.js → chunk-V7XHGJQZ.js} +1 -1
@@ -0,0 +1,105 @@
1
+ import { Modal, Center, Space, Text, Button, Title, TextInput } from '@mantine/core';
2
+ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
3
+ import { cloneElement } from 'react';
4
+
5
+ // src/components/modal/CustomModal.tsx
6
+ var CustomModal = ({ children, opened, onClose, loading, style, size }) => {
7
+ const canClose = loading === true ? false : true;
8
+ return /* @__PURE__ */ jsx(
9
+ Modal,
10
+ {
11
+ opened,
12
+ onClose,
13
+ padding: "xs",
14
+ withCloseButton: false,
15
+ closeOnClickOutside: canClose,
16
+ closeOnEscape: canClose,
17
+ centered: true,
18
+ style,
19
+ size,
20
+ children
21
+ }
22
+ );
23
+ };
24
+ var ConfirmationModal = ({
25
+ opened,
26
+ onClose,
27
+ loading,
28
+ icon,
29
+ confirmationHandler,
30
+ style,
31
+ title,
32
+ text,
33
+ buttonText,
34
+ buttonColor,
35
+ centerText
36
+ }) => {
37
+ const styledIcon = cloneElement(icon, {
38
+ size: 55,
39
+ strokeWidth: 1.5
40
+ });
41
+ return /* @__PURE__ */ jsxs(CustomModal, { opened, onClose, loading, style, children: [
42
+ /* @__PURE__ */ jsx(Center, { children: styledIcon }),
43
+ /* @__PURE__ */ jsx(Space, { h: 16 }),
44
+ /* @__PURE__ */ jsx(Center, { style: { textAlign: "center" }, children: /* @__PURE__ */ jsx(Text, { size: "lg", c: "var(--color-text)", children: title }) }),
45
+ /* @__PURE__ */ jsx(Space, { h: 16 }),
46
+ text && /* @__PURE__ */ jsxs(Fragment, { children: [
47
+ /* @__PURE__ */ jsx(Text, { size: "sm", c: "var(--color-text-dimmed)", style: { textAlign: centerText ? "center" : "left" }, children: text }),
48
+ /* @__PURE__ */ jsx(Space, { h: 16 })
49
+ ] }),
50
+ /* @__PURE__ */ jsx(Button, { color: buttonColor || "blue", fullWidth: true, onClick: confirmationHandler, loading, children: buttonText || "Confirm" })
51
+ ] });
52
+ };
53
+ var ConfirmationInputModal = ({
54
+ opened,
55
+ onClose,
56
+ loading,
57
+ icon,
58
+ confirmationHandler,
59
+ style,
60
+ title,
61
+ text,
62
+ buttonText,
63
+ buttonColor,
64
+ inputValue,
65
+ onInputChange,
66
+ expectedValue,
67
+ placeholder
68
+ }) => {
69
+ const styledIcon = cloneElement(icon, {
70
+ size: 55,
71
+ strokeWidth: 1.5
72
+ });
73
+ return /* @__PURE__ */ jsxs(CustomModal, { opened, onClose, loading, style, children: [
74
+ /* @__PURE__ */ jsx(Center, { children: styledIcon }),
75
+ /* @__PURE__ */ jsx(Space, { h: 16 }),
76
+ /* @__PURE__ */ jsx(Center, { children: /* @__PURE__ */ jsx(Title, { order: 3, children: title }) }),
77
+ /* @__PURE__ */ jsx(Space, { h: 16 }),
78
+ text && /* @__PURE__ */ jsxs(Fragment, { children: [
79
+ /* @__PURE__ */ jsx(Text, { size: "sm", c: "var(--color-text-dimmed)", children: text }),
80
+ /* @__PURE__ */ jsx(Space, { h: 8 })
81
+ ] }),
82
+ /* @__PURE__ */ jsx(
83
+ TextInput,
84
+ {
85
+ placeholder: placeholder || "Enter confirmation text",
86
+ value: inputValue,
87
+ onChange: (event) => onInputChange(event.currentTarget.value)
88
+ }
89
+ ),
90
+ /* @__PURE__ */ jsx(Space, { h: 16 }),
91
+ /* @__PURE__ */ jsx(
92
+ Button,
93
+ {
94
+ color: buttonColor || "blue",
95
+ fullWidth: true,
96
+ onClick: confirmationHandler,
97
+ loading,
98
+ disabled: inputValue !== expectedValue,
99
+ children: buttonText || "Confirm"
100
+ }
101
+ )
102
+ ] });
103
+ };
104
+
105
+ export { ConfirmationInputModal, ConfirmationModal, CustomModal };
@@ -266,6 +266,11 @@ var DOMAIN_MAP = {
266
266
  [DOMAINS.DIAGNOSTIC]: DIAGNOSTIC_DOMAIN
267
267
  };
268
268
 
269
+ // ../core/src/platform/registry/command-view.ts
270
+ function getNodeId(node) {
271
+ return node.resourceId;
272
+ }
273
+
269
274
  // ../core/src/platform/registry/resource-metadata.ts
270
275
  var resourceTypeIconNames = {
271
276
  agent: "IconBrain",
@@ -304,6 +309,9 @@ function getResourceIcon(type) {
304
309
  return iconNameToComponent[iconName];
305
310
  }
306
311
 
312
+ // src/utils/constants/api.ts
313
+ var API_URL = import.meta.env.PROD ? "https://api.elevasis.io" : "http://localhost:5170";
314
+
307
315
  // src/utils/constants/cache.ts
308
316
  var STALE_TIME_MONITORING = 3e4;
309
317
  var STALE_TIME_ADMIN = 6e4;
@@ -364,4 +372,4 @@ function restoreConsole() {
364
372
  console.warn = originalConsoleWarn;
365
373
  }
366
374
 
367
- export { APIClientError, DEBOUNCE_FILTER, DEBOUNCE_SLIDER, DOMAIN_MAP, GC_TIME_LONG, GC_TIME_MEDIUM, GC_TIME_SHORT, LIMIT_ACTIVITY_FEED, OAUTH_FLOW_TIMEOUT, OAUTH_POPUP_CHECK_INTERVAL, PAGE_SIZE_DEFAULT, REFETCH_INTERVAL_DASHBOARD, REFETCH_INTERVAL_REALTIME, REFETCH_INTERVAL_RUNNING, REFETCH_INTERVAL_RUNNING_FAST, SSE_CLOSE_GRACE_PERIOD, SSE_TOKEN_REFRESH_DELAY, STALE_TIME_ADMIN, STALE_TIME_DEFAULT, STALE_TIME_MONITORING, WS_MAX_RETRIES_BEFORE_ERROR, WS_RECONNECT_BASE_DELAY, WS_RECONNECT_MAX_DELAY, formatChartAxisDate, formatDate, formatDateTime, formatErrorMessage, formatRelativeTime, formatTimeAgo, getErrorInfo, getErrorTitle, getResourceColor, getResourceIcon, isAPIClientError, restoreConsole, suppressKnownWarnings, validateEmail };
375
+ export { APIClientError, API_URL, DEBOUNCE_FILTER, DEBOUNCE_SLIDER, DOMAIN_MAP, GC_TIME_LONG, GC_TIME_MEDIUM, GC_TIME_SHORT, LIMIT_ACTIVITY_FEED, OAUTH_FLOW_TIMEOUT, OAUTH_POPUP_CHECK_INTERVAL, PAGE_SIZE_DEFAULT, REFETCH_INTERVAL_DASHBOARD, REFETCH_INTERVAL_REALTIME, REFETCH_INTERVAL_RUNNING, REFETCH_INTERVAL_RUNNING_FAST, SSE_CLOSE_GRACE_PERIOD, SSE_TOKEN_REFRESH_DELAY, STALE_TIME_ADMIN, STALE_TIME_DEFAULT, STALE_TIME_MONITORING, WS_MAX_RETRIES_BEFORE_ERROR, WS_RECONNECT_BASE_DELAY, WS_RECONNECT_MAX_DELAY, formatChartAxisDate, formatDate, formatDateTime, formatErrorMessage, formatRelativeTime, formatTimeAgo, getErrorInfo, getErrorTitle, getNodeId, getResourceColor, getResourceIcon, isAPIClientError, restoreConsole, suppressKnownWarnings, validateEmail };
@@ -1,7 +1,13 @@
1
1
  import { useAppearance } from './chunk-QJ2KCHKX.js';
2
- import { Box, Group, Text, Center } from '@mantine/core';
2
+ import { Container, Stack, Box, Group, Text, Center } from '@mantine/core';
3
3
  import { jsx, jsxs } from 'react/jsx-runtime';
4
4
 
5
+ var PageContainer = ({ children }) => {
6
+ return (
7
+ // Add padding to the top of the container to adjust for the topbar height
8
+ /* @__PURE__ */ jsx(Container, { size: "xl", p: 0, w: "100%", children: /* @__PURE__ */ jsx(Stack, { gap: "lg", children }) })
9
+ );
10
+ };
5
11
  var SubshellSidebarSection = ({
6
12
  icon: Icon,
7
13
  label,
@@ -38,4 +44,4 @@ function SubshellLoader() {
38
44
  return /* @__PURE__ */ jsx(Center, { mih: "calc(100vh - 70px)", children: loader });
39
45
  }
40
46
 
41
- export { SubshellLoader, SubshellSidebarSection };
47
+ export { PageContainer, SubshellLoader, SubshellSidebarSection };