@elevasis/ui 2.33.2 → 2.35.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.
Files changed (116) hide show
  1. package/dist/api/index.d.ts +9 -2
  2. package/dist/api/index.js +3 -3
  3. package/dist/app/index.css +452 -0
  4. package/dist/app/index.d.ts +1255 -8
  5. package/dist/app/index.js +151 -13
  6. package/dist/charts/index.js +3 -6
  7. package/dist/chunk-26HFM4MH.js +41449 -0
  8. package/dist/{chunk-52K5RFDH.js → chunk-4U3XAWCN.js} +1328 -2492
  9. package/dist/{chunk-ND5TDV2J.js → chunk-57OZ3AEG.js} +1 -1
  10. package/dist/{chunk-E4WQGJNS.js → chunk-7FPLLSHN.js} +14 -1
  11. package/dist/{chunk-RQA2EVN3.js → chunk-AKW7KISS.js} +39 -3
  12. package/dist/chunk-AUDNF2Q7.js +2050 -0
  13. package/dist/{chunk-TYRUKGGD.js → chunk-GX6XBRRF.js} +1 -2
  14. package/dist/{chunk-V6SZ4ECN.js → chunk-LUYVRATI.js} +257 -6
  15. package/dist/{chunk-X4WBGKJQ.js → chunk-R3VCBZDC.js} +50 -3
  16. package/dist/chunk-SIQ3P4OR.js +1764 -0
  17. package/dist/{chunk-Z2K2EAPL.js → chunk-VDOOGGBA.js} +5 -6
  18. package/dist/{chunk-3FV6HBXS.js → chunk-WF7CONXF.js} +23 -23
  19. package/dist/chunk-YYX7OPZQ.js +25 -0
  20. package/dist/components/index.d.ts +69 -92
  21. package/dist/components/index.js +20 -3216
  22. package/dist/components/navigation/index.js +25 -7
  23. package/dist/execution/index.d.ts +9 -9
  24. package/dist/execution/index.js +1 -2
  25. package/dist/features/auth/index.js +23 -2
  26. package/dist/features/clients/index.js +20 -31
  27. package/dist/features/crm/index.js +20 -35
  28. package/dist/features/dashboard/index.d.ts +68 -91
  29. package/dist/features/dashboard/index.js +20 -33
  30. package/dist/features/delivery/index.js +20 -35
  31. package/dist/features/knowledge/index.js +25 -11
  32. package/dist/features/lead-gen/index.d.ts +9 -9
  33. package/dist/features/lead-gen/index.js +20 -36
  34. package/dist/features/monitoring/index.js +20 -35
  35. package/dist/features/monitoring/requests/index.js +20 -30
  36. package/dist/features/operations/index.d.ts +197 -188
  37. package/dist/features/operations/index.js +18 -42
  38. package/dist/features/seo/index.js +3 -4
  39. package/dist/features/settings/index.js +20 -32
  40. package/dist/graph/index.js +1 -1
  41. package/dist/hooks/delivery/index.js +30 -2
  42. package/dist/hooks/index.d.ts +105 -112
  43. package/dist/hooks/index.js +20 -26
  44. package/dist/hooks/operations/command-view/utils/transformCommandViewData.d.ts +55 -62
  45. package/dist/hooks/published.d.ts +105 -112
  46. package/dist/hooks/published.js +20 -25
  47. package/dist/index.css +532 -532
  48. package/dist/index.d.ts +10261 -6793
  49. package/dist/index.js +22 -31
  50. package/dist/knowledge/index.d.ts +51 -59
  51. package/dist/knowledge/index.js +40 -211
  52. package/dist/{knowledge-search-index-VMAW7FLR.js → knowledge-search-index-ORIJCEZX.js} +3 -3
  53. package/dist/layout/index.js +4 -10
  54. package/dist/organization/index.js +27 -2
  55. package/dist/provider/index.d.ts +71 -52
  56. package/dist/provider/index.js +20 -20
  57. package/dist/provider/published.d.ts +39 -47
  58. package/dist/provider/published.js +20 -15
  59. package/dist/test-utils/index.d.ts +2 -0
  60. package/dist/test-utils/index.js +16 -4
  61. package/dist/test-utils/setup.js +38 -0
  62. package/dist/theme/index.js +2 -3
  63. package/dist/theme/presets/index.d.ts +28 -3
  64. package/dist/theme/presets/index.js +1 -1
  65. package/dist/typeform/index.js +1 -2049
  66. package/dist/types/index.d.ts +88 -95
  67. package/dist/utils/index.d.ts +46 -69
  68. package/dist/utils/index.js +1 -1
  69. package/dist/zustand/index.d.ts +21 -8
  70. package/dist/zustand/index.js +32 -1
  71. package/package.json +5 -5
  72. package/dist/chunk-2ZZ72TAB.js +0 -2281
  73. package/dist/chunk-32I2RCGC.js +0 -85
  74. package/dist/chunk-3MEXPLWT.js +0 -265
  75. package/dist/chunk-3ZMAGTWF.js +0 -18
  76. package/dist/chunk-44I4LOH6.js +0 -1593
  77. package/dist/chunk-4DYOXEH6.js +0 -951
  78. package/dist/chunk-7M2VOCYN.js +0 -1
  79. package/dist/chunk-A4VDJJCV.js +0 -1864
  80. package/dist/chunk-BZZCNLT6.js +0 -12
  81. package/dist/chunk-CLDCYJQT.js +0 -1
  82. package/dist/chunk-E565XMTQ.js +0 -17
  83. package/dist/chunk-EPTHX4VZ.js +0 -749
  84. package/dist/chunk-GWGQI6V4.js +0 -447
  85. package/dist/chunk-HUJCU55S.js +0 -159
  86. package/dist/chunk-IBWMR4TI.js +0 -469
  87. package/dist/chunk-IIMU5YAJ.js +0 -53
  88. package/dist/chunk-IOXOPMYS.js +0 -145
  89. package/dist/chunk-J2UD7BOH.js +0 -347
  90. package/dist/chunk-JA5ECJJB.js +0 -387
  91. package/dist/chunk-JFL3GRD4.js +0 -39
  92. package/dist/chunk-KW7ZNQD7.js +0 -126
  93. package/dist/chunk-LGKLC5MG.js +0 -44
  94. package/dist/chunk-N55DVMAG.js +0 -14
  95. package/dist/chunk-O56ESZCQ.js +0 -1874
  96. package/dist/chunk-OIBHQH5Q.js +0 -96
  97. package/dist/chunk-PDHTXPSF.js +0 -12
  98. package/dist/chunk-QDFJSUG3.js +0 -13
  99. package/dist/chunk-R2XR4FCV.js +0 -48
  100. package/dist/chunk-R66W5UDG.js +0 -26
  101. package/dist/chunk-RYTEQBAO.js +0 -37
  102. package/dist/chunk-SZHARWKU.js +0 -15
  103. package/dist/chunk-T3J6U77J.js +0 -12056
  104. package/dist/chunk-TBVLQRXT.js +0 -68
  105. package/dist/chunk-TGVAIWIL.js +0 -1778
  106. package/dist/chunk-TKAYX2SP.js +0 -204
  107. package/dist/chunk-TUMSNGTX.js +0 -35
  108. package/dist/chunk-VGU4ZFYZ.js +0 -4752
  109. package/dist/chunk-VNAZTCHA.js +0 -65
  110. package/dist/chunk-VNFR57DF.js +0 -87
  111. package/dist/chunk-WKW6B5ID.js +0 -29
  112. package/dist/chunk-XCYKC6OZ.js +0 -1
  113. package/dist/chunk-XZGSCABI.js +0 -383
  114. package/dist/chunk-ZMK5Z6KE.js +0 -5198
  115. /package/dist/{chunk-2RJMVWFJ.js → chunk-GEFWMU26.js} +0 -0
  116. /package/dist/{chunk-22UVE3RA.js → chunk-HENXLGVD.js} +0 -0
package/dist/app/index.js CHANGED
@@ -1,26 +1,42 @@
1
- import { ElevasisUIProvider } from '../chunk-OIBHQH5Q.js';
2
- import '../chunk-RQA2EVN3.js';
3
- import '../chunk-3FV6HBXS.js';
1
+ import { AppErrorBoundary, ElevasisSystemsProvider, useElevasisSystems, SystemShell, ElevasisUIProvider } from '../chunk-26HFM4MH.js';
2
+ import '../chunk-CXY7FMUM.js';
3
+ import '../chunk-SIQ3P4OR.js';
4
+ import '../chunk-3KMDHCAR.js';
5
+ import '../chunk-AKW7KISS.js';
6
+ import '../chunk-WF7CONXF.js';
7
+ import '../chunk-ZTWA5H77.js';
8
+ import '../chunk-AUDNF2Q7.js';
9
+ import '../chunk-6M6OLGQY.js';
10
+ import '../chunk-BRXELOHC.js';
11
+ import { listAllSystems } from '../chunk-4U3XAWCN.js';
12
+ import { SidebarProvider, AppShellContainer, Sidebar, AppShellRightSideContainer, AppShellRightSideOuterContainer } from '../chunk-LUYVRATI.js';
13
+ import '../chunk-NYBEU5TE.js';
4
14
  import '../chunk-WLOQ4IBG.js';
5
- import '../chunk-GWGQI6V4.js';
6
- import '../chunk-SZHARWKU.js';
7
- import '../chunk-52K5RFDH.js';
8
- import '../chunk-ND5TDV2J.js';
9
- import '../chunk-HUJCU55S.js';
10
- import '../chunk-E565XMTQ.js';
11
- import '../chunk-2RJMVWFJ.js';
15
+ import '../chunk-57OZ3AEG.js';
16
+ import '../chunk-JBWJ6WHZ.js';
17
+ import '../chunk-GX6XBRRF.js';
18
+ import '../chunk-R3VCBZDC.js';
19
+ import '../chunk-DT3QYZVU.js';
20
+ import { TanStackRouterBridge, ScrollToTop } from '../chunk-2IFYDILW.js';
21
+ import '../chunk-Q7DJKLEN.js';
22
+ import '../chunk-HENXLGVD.js';
23
+ import '../chunk-7FPLLSHN.js';
24
+ import '../chunk-RNP5R5I3.js';
25
+ import '../chunk-GEFWMU26.js';
12
26
  import '../chunk-KRWALB24.js';
27
+ import { useSessionCheck } from '../chunk-VKIZUUPM.js';
13
28
  import { useInitialization } from '../chunk-533DUEQY.js';
14
29
  import '../chunk-DD3CCMCZ.js';
15
30
  import '../chunk-2Q2JQSQO.js';
16
31
  import '../chunk-KJ3QUBNU.js';
17
32
  import '../chunk-BRJ3QZ4E.js';
18
33
  import '../chunk-I2KLQ2HA.js';
19
- import { useCallback, useEffect } from 'react';
20
- import { RouterProvider } from '@tanstack/react-router';
34
+ import { useMemo, useCallback, useEffect } from 'react';
35
+ import { useLocation, Outlet, useNavigate, RouterProvider } from '@tanstack/react-router';
21
36
  import { Notifications } from '@mantine/notifications';
22
37
  import { useAuth } from '@workos-inc/authkit-react';
23
38
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
39
+ import { useComputedColorScheme } from '@mantine/core';
24
40
 
25
41
  var DEFAULT_PRESET = "default";
26
42
  var DEFAULT_COLOR_SCHEME = "dark";
@@ -98,5 +114,127 @@ function createElevasisApp(config) {
98
114
  ElevasisApp.displayName = "ElevasisApp";
99
115
  return ElevasisApp;
100
116
  }
117
+ function devOnlySubsectionPaths(organizationModel) {
118
+ return listAllSystems(organizationModel).filter(({ system }) => system.devOnly && (system.ui?.path ?? system.path)).flatMap(({ system }) => {
119
+ const path = system.ui?.path ?? system.path;
120
+ return path ? [path] : [];
121
+ });
122
+ }
123
+ function renderTopbar(topbar, context) {
124
+ return typeof topbar === "function" ? topbar(context) : topbar;
125
+ }
126
+ function ElevasisAuthenticatedShell({
127
+ systems,
128
+ organizationModel,
129
+ logos,
130
+ topbar,
131
+ children,
132
+ fullScreenPaths = ["/login", "/auth-redirect"],
133
+ readyMode = "organization",
134
+ accountPath = "/settings/account",
135
+ signOutReturnTo,
136
+ appVersion,
137
+ timeRange,
138
+ operationsApiUrl,
139
+ operationsSSEManager,
140
+ deliveryApiUrl,
141
+ deliverySSEManager,
142
+ disabledSubsectionPaths,
143
+ isDev = import.meta.env?.DEV ?? false,
144
+ errorFallback,
145
+ onError,
146
+ sidebarLinks
147
+ }) {
148
+ const computedColorScheme = useComputedColorScheme("dark");
149
+ const { user, isLoading, signOut } = useAuth();
150
+ const initialization = useInitialization();
151
+ const location = useLocation();
152
+ const isDark = computedColorScheme === "dark";
153
+ useSessionCheck();
154
+ const resolvedDisabledSubsectionPaths = useMemo(() => {
155
+ if (isDev) return [...disabledSubsectionPaths ?? []];
156
+ return [.../* @__PURE__ */ new Set([...devOnlySubsectionPaths(organizationModel), ...disabledSubsectionPaths ?? []])];
157
+ }, [disabledSubsectionPaths, isDev, organizationModel]);
158
+ const isFullScreenPage = fullScreenPaths.includes(location.pathname);
159
+ const isReady = readyMode === "user" ? initialization.userReady : initialization.allReady;
160
+ const shouldShowSidebar = Boolean(user && !isLoading && !isFullScreenPage && isReady);
161
+ if (!shouldShowSidebar) {
162
+ return /* @__PURE__ */ jsx(TanStackRouterBridge, { children: children ?? /* @__PURE__ */ jsx(Outlet, {}) });
163
+ }
164
+ return /* @__PURE__ */ jsx(TanStackRouterBridge, { children: /* @__PURE__ */ jsx(AppErrorBoundary, { fallback: errorFallback, onError, appVersion, children: /* @__PURE__ */ jsx(SidebarProvider, { children: /* @__PURE__ */ jsx(
165
+ ElevasisSystemsProvider,
166
+ {
167
+ systems,
168
+ organizationModel,
169
+ timeRange,
170
+ operationsApiUrl,
171
+ operationsSSEManager,
172
+ deliveryApiUrl,
173
+ deliverySSEManager,
174
+ disabledSubsectionPaths: resolvedDisabledSubsectionPaths,
175
+ children: /* @__PURE__ */ jsx(
176
+ AuthenticatedShellLayout,
177
+ {
178
+ accountPath,
179
+ children,
180
+ initialization,
181
+ isDark,
182
+ isDev,
183
+ logos,
184
+ sidebarLinks,
185
+ signOutReturnTo,
186
+ signOut,
187
+ topbar,
188
+ user
189
+ }
190
+ )
191
+ }
192
+ ) }) }) });
193
+ }
194
+ function AuthenticatedShellLayout({
195
+ accountPath,
196
+ children,
197
+ initialization,
198
+ isDark,
199
+ isDev,
200
+ logos,
201
+ sidebarLinks,
202
+ signOutReturnTo,
203
+ signOut,
204
+ topbar,
205
+ user
206
+ }) {
207
+ const navigate = useNavigate();
208
+ const { getSidebarLinks } = useElevasisSystems();
209
+ const isPlatformAdmin = Boolean(initialization.profile?.is_platform_admin);
210
+ const projectedLinks = getSidebarLinks({ isPlatformAdmin, isDev });
211
+ const visibleNavItems = sidebarLinks ? sidebarLinks(projectedLinks) : projectedLinks;
212
+ const handleLogout = () => {
213
+ if (signOutReturnTo) {
214
+ signOut({ returnTo: signOutReturnTo });
215
+ } else {
216
+ signOut();
217
+ }
218
+ };
219
+ return /* @__PURE__ */ jsxs(AppShellContainer, { children: [
220
+ /* @__PURE__ */ jsx(
221
+ Sidebar,
222
+ {
223
+ user: user ?? void 0,
224
+ links: visibleNavItems,
225
+ onLogout: handleLogout,
226
+ onAccountClick: () => navigate({ to: accountPath }),
227
+ logo: isDark ? logos?.dark : logos?.light
228
+ }
229
+ ),
230
+ /* @__PURE__ */ jsxs(AppShellRightSideContainer, { children: [
231
+ renderTopbar(topbar, { isDark, user, initialization }),
232
+ /* @__PURE__ */ jsxs(AppShellRightSideOuterContainer, { children: [
233
+ /* @__PURE__ */ jsx(ScrollToTop, {}),
234
+ /* @__PURE__ */ jsx(SystemShell, { children: children ?? /* @__PURE__ */ jsx(Outlet, {}) })
235
+ ] })
236
+ ] })
237
+ ] });
238
+ }
101
239
 
102
- export { createElevasisApp };
240
+ export { ElevasisAuthenticatedShell, createElevasisApp };
@@ -1,13 +1,10 @@
1
- export { ActivityTrendChart, ChartFrame, CombinedTrendChart, CostTrendChart, CyberAreaChart, CyberDonut, CyberDonutTooltip, CyberLegendItem, HeroStatsRow, getSeriesColor, useCyberColors } from '../chunk-4DYOXEH6.js';
2
- import '../chunk-VNAZTCHA.js';
3
- import '../chunk-EPTHX4VZ.js';
1
+ export { ActivityTrendChart, ChartFrame, CombinedTrendChart, CostTrendChart, CyberAreaChart, CyberDonut, CyberDonutTooltip, CyberLegendItem, HeroStatsRow, getSeriesColor, useCyberColors } from '../chunk-SIQ3P4OR.js';
4
2
  import '../chunk-3KMDHCAR.js';
5
- import '../chunk-SZHARWKU.js';
6
3
  import '../chunk-NYBEU5TE.js';
4
+ import '../chunk-DT3QYZVU.js';
7
5
  import '../chunk-2IFYDILW.js';
8
6
  import '../chunk-Q7DJKLEN.js';
9
- import '../chunk-DT3QYZVU.js';
10
- import '../chunk-2RJMVWFJ.js';
7
+ import '../chunk-GEFWMU26.js';
11
8
  import '../chunk-KRWALB24.js';
12
9
  import '../chunk-VKIZUUPM.js';
13
10
  import '../chunk-533DUEQY.js';