@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
@@ -1,387 +0,0 @@
1
- import { useOrganization } from './chunk-DD3CCMCZ.js';
2
- import { useUserProfile } from './chunk-2Q2JQSQO.js';
3
- import { useAuthContext } from './chunk-BRJ3QZ4E.js';
4
- import { useState, useRef, useEffect, useCallback } from 'react';
5
- import { Badge, Group, Button, Loader, Menu, Text } from '@mantine/core';
6
- import { IconLock, IconChevronDown, IconBuilding, IconCheck } from '@tabler/icons-react';
7
- import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
8
- import { useAuth } from '@workos-inc/authkit-react';
9
-
10
- function RoleBadge({ name, isSystem }) {
11
- return /* @__PURE__ */ jsx(Badge, { color: isSystem ? "gray" : "primary", variant: "light", children: /* @__PURE__ */ jsxs(Group, { gap: 4, wrap: "nowrap", children: [
12
- isSystem && /* @__PURE__ */ jsx(IconLock, { size: 10 }),
13
- name
14
- ] }) });
15
- }
16
- function OrganizationSwitcher({
17
- currentOrganization,
18
- memberships,
19
- isLoading,
20
- onSwitch
21
- }) {
22
- const [opened, setOpened] = useState(false);
23
- const [switching, setSwitching] = useState(false);
24
- const otherMemberships = memberships.filter((m) => m.organizationId !== currentOrganization?.id);
25
- const handleSwitch = async (workosOrgId) => {
26
- setSwitching(true);
27
- try {
28
- await onSwitch(workosOrgId);
29
- setOpened(false);
30
- } catch (error) {
31
- console.error("Failed to switch organization:", error);
32
- } finally {
33
- setSwitching(false);
34
- }
35
- };
36
- if (isLoading) {
37
- return /* @__PURE__ */ jsx(Button, { variant: "light", size: "xs", disabled: true, children: /* @__PURE__ */ jsx(Loader, { size: 14 }) });
38
- }
39
- if (memberships.length === 0) {
40
- return /* @__PURE__ */ jsx(Button, { variant: "light", size: "xs", disabled: true, children: "None" });
41
- }
42
- return /* @__PURE__ */ jsxs(Menu, { opened, onChange: setOpened, position: "bottom-start", withinPortal: true, children: [
43
- /* @__PURE__ */ jsx(Menu.Target, { children: /* @__PURE__ */ jsx(
44
- Button,
45
- {
46
- variant: "light",
47
- size: "xs",
48
- leftSection: /* @__PURE__ */ jsx(IconBuilding, { size: 16 }),
49
- rightSection: /* @__PURE__ */ jsx(IconChevronDown, { size: 14 }),
50
- loading: switching,
51
- children: /* @__PURE__ */ jsx(Text, { truncate: true, style: { maxWidth: 200 }, size: "xs", children: currentOrganization?.name || "Select Organization" })
52
- }
53
- ) }),
54
- /* @__PURE__ */ jsxs(
55
- Menu.Dropdown,
56
- {
57
- style: {
58
- background: "var(--glass-background)",
59
- backdropFilter: "var(--glass-blur)",
60
- WebkitBackdropFilter: "var(--glass-blur)"
61
- },
62
- children: [
63
- currentOrganization && /* @__PURE__ */ jsxs(Fragment, { children: [
64
- /* @__PURE__ */ jsx(Menu.Label, { children: "Current Organization" }),
65
- /* @__PURE__ */ jsx(Menu.Item, { disabled: true, rightSection: /* @__PURE__ */ jsx(IconCheck, { size: 14 }), leftSection: /* @__PURE__ */ jsx(IconBuilding, { size: 14 }), children: currentOrganization.name }),
66
- otherMemberships.length > 0 && /* @__PURE__ */ jsxs(Fragment, { children: [
67
- /* @__PURE__ */ jsx(Menu.Divider, {}),
68
- /* @__PURE__ */ jsx(Menu.Label, { children: "Switch Organization" })
69
- ] })
70
- ] }),
71
- otherMemberships.length > 0 && /* @__PURE__ */ jsx("div", { children: otherMemberships.map((membership, index) => /* @__PURE__ */ jsx(
72
- Menu.Item,
73
- {
74
- leftSection: /* @__PURE__ */ jsx(IconBuilding, { size: 14 }),
75
- rightSection: /* @__PURE__ */ jsx(
76
- RoleBadge,
77
- {
78
- slug: membership.role.slug,
79
- name: membership.role.slug.charAt(0).toUpperCase() + membership.role.slug.slice(1),
80
- isSystem: true
81
- }
82
- ),
83
- onClick: () => {
84
- const workosOrgId = membership.organization?.workos_org_id;
85
- if (!workosOrgId) {
86
- console.error("Organization missing WorkOS ID:", membership.organization?.name);
87
- return;
88
- }
89
- handleSwitch(workosOrgId);
90
- },
91
- disabled: switching,
92
- children: membership.organization?.name || "Unknown Organization"
93
- },
94
- `${membership.organizationId}-${index}`
95
- )) }, "other-memberships"),
96
- !currentOrganization && memberships.length > 0 && /* @__PURE__ */ jsxs(Fragment, { children: [
97
- /* @__PURE__ */ jsx(Menu.Label, { children: "Select Organization" }),
98
- memberships.map((membership) => /* @__PURE__ */ jsx(
99
- Menu.Item,
100
- {
101
- leftSection: /* @__PURE__ */ jsx(IconBuilding, { size: 14 }),
102
- rightSection: /* @__PURE__ */ jsx(
103
- RoleBadge,
104
- {
105
- slug: membership.role.slug,
106
- name: membership.role.slug.charAt(0).toUpperCase() + membership.role.slug.slice(1),
107
- isSystem: true
108
- }
109
- ),
110
- onClick: () => {
111
- const workosOrgId = membership.organization?.workos_org_id;
112
- if (!workosOrgId) {
113
- console.error("Organization missing WorkOS ID:", membership.organization?.name);
114
- return;
115
- }
116
- handleSwitch(workosOrgId);
117
- },
118
- disabled: switching,
119
- children: membership.organization?.name || "Unknown Organization"
120
- },
121
- membership.organizationId
122
- ))
123
- ] })
124
- ]
125
- }
126
- )
127
- ] });
128
- }
129
- function OrganizationSwitcherConnected() {
130
- const { switchToOrganization } = useAuth();
131
- const { currentMembership, memberships, isInitializing, isOrgRefreshing, switchOrganization } = useOrganization();
132
- return /* @__PURE__ */ jsx(
133
- OrganizationSwitcher,
134
- {
135
- currentOrganization: currentMembership?.organization,
136
- memberships,
137
- isLoading: isInitializing || isOrgRefreshing,
138
- onSwitch: async (workosOrgId) => {
139
- await switchToOrganization({ organizationId: workosOrgId });
140
- switchOrganization(workosOrgId);
141
- }
142
- }
143
- );
144
- }
145
-
146
- // src/organization/store/organizationsSlice.ts
147
- var initialOrganizationsState = {
148
- currentWorkOSOrganizationId: null,
149
- currentSupabaseOrganizationId: null,
150
- currentMembership: null,
151
- isInitializing: true,
152
- // Start as initializing
153
- isOrgRefreshing: false,
154
- error: null
155
- };
156
- var createOrganizationsSlice = (set, _get, _store) => ({
157
- // Organizations state
158
- organizations: initialOrganizationsState,
159
- // Organization actions
160
- setCurrentWorkOSOrganizationId: (workOSorgId) => {
161
- set(
162
- (state) => {
163
- state.organizations.currentWorkOSOrganizationId = workOSorgId;
164
- },
165
- void 0,
166
- "organizations/setCurrentWorkOSOrganizationId"
167
- );
168
- },
169
- setCurrentMembership: (membership) => {
170
- set(
171
- (state) => {
172
- state.organizations.currentMembership = membership;
173
- state.organizations.currentSupabaseOrganizationId = membership?.organization?.id || null;
174
- },
175
- void 0,
176
- "organizations/setCurrentMembership"
177
- );
178
- },
179
- setOrganizationsInitializing: (initializing) => set(
180
- (state) => {
181
- state.organizations.isInitializing = initializing;
182
- },
183
- void 0,
184
- "organizations/setInitializing"
185
- ),
186
- setOrganizationsLoading: (loading) => set(
187
- (state) => {
188
- state.organizations.isOrgRefreshing = loading;
189
- },
190
- void 0,
191
- "organizations/setLoading"
192
- ),
193
- setOrganizationsError: (error) => set(
194
- (state) => {
195
- state.organizations.error = error;
196
- },
197
- void 0,
198
- "organizations/setError"
199
- )
200
- });
201
-
202
- // src/organization/hooks/useOrganizations.ts
203
- function createUseOrganizations(useStore) {
204
- return () => {
205
- const organizations = useStore((state) => state.organizations);
206
- const setCurrentWorkOSOrganizationId = useStore((state) => state.setCurrentWorkOSOrganizationId);
207
- const setCurrentMembership = useStore((state) => state.setCurrentMembership);
208
- const setOrganizationsInitializing = useStore((state) => state.setOrganizationsInitializing);
209
- const setOrganizationsLoading = useStore((state) => state.setOrganizationsLoading);
210
- const setOrganizationsError = useStore((state) => state.setOrganizationsError);
211
- return {
212
- ...organizations,
213
- setCurrentWorkOSOrganizationId,
214
- setCurrentMembership,
215
- setOrganizationsInitializing,
216
- setOrganizationsLoading,
217
- setOrganizationsError,
218
- organizations
219
- // Also return the full organizations object for easy access
220
- };
221
- };
222
- }
223
- function createUseOrgInitialization(useOrganizations, useApiClient) {
224
- return function useOrgInitialization() {
225
- const { user, organizationId: workosOrgId } = useAuthContext();
226
- const { apiRequest } = useApiClient();
227
- const { profile } = useUserProfile();
228
- const {
229
- currentWorkOSOrganizationId,
230
- currentMembership,
231
- setCurrentWorkOSOrganizationId,
232
- setCurrentMembership,
233
- setOrganizationsInitializing,
234
- setOrganizationsLoading,
235
- setOrganizationsError,
236
- organizations
237
- } = useOrganizations();
238
- const [memberships, setMemberships] = useState([]);
239
- const [profileLoaded, setProfileLoaded] = useState(false);
240
- const hasInitializedRef = useRef(false);
241
- const currentMembershipIdRef = useRef(null);
242
- currentMembershipIdRef.current = currentMembership?.id ?? null;
243
- useEffect(() => {
244
- if (profile !== void 0 && profile !== null) {
245
- setProfileLoaded(true);
246
- }
247
- }, [profile]);
248
- const selectOrganization = useCallback(
249
- async (data) => {
250
- let selectedMembership = null;
251
- if (profile?.last_visited_org) {
252
- const supabaseLastVisitedOrgId = profile.last_visited_org;
253
- selectedMembership = data.find((m) => m.organizationId === supabaseLastVisitedOrgId) || null;
254
- }
255
- if (!selectedMembership && workosOrgId) {
256
- selectedMembership = data.find((m) => m.organization?.workos_org_id === workosOrgId) || null;
257
- }
258
- if (!selectedMembership && data.length > 0) {
259
- selectedMembership = data[0];
260
- }
261
- if (selectedMembership) {
262
- const workosSelectedOrgId = selectedMembership.organization?.workos_org_id;
263
- if (workosSelectedOrgId) {
264
- setCurrentWorkOSOrganizationId(workosSelectedOrgId);
265
- setCurrentMembership(selectedMembership);
266
- }
267
- }
268
- },
269
- [profile?.last_visited_org, workosOrgId, setCurrentWorkOSOrganizationId, setCurrentMembership]
270
- );
271
- const validateCurrentOrganization = useCallback(
272
- (data) => {
273
- const workosCurrentOrgId = currentWorkOSOrganizationId;
274
- const currentOrg = data.find((m) => m.organization?.workos_org_id === workosCurrentOrgId);
275
- if (!currentOrg) {
276
- setCurrentWorkOSOrganizationId(null);
277
- setCurrentMembership(null);
278
- if (data.length > 0) {
279
- const fallbackOrg = data[0];
280
- const workosFallbackOrgId = fallbackOrg.organization?.workos_org_id;
281
- if (workosFallbackOrgId) {
282
- setCurrentWorkOSOrganizationId(workosFallbackOrgId);
283
- setCurrentMembership(fallbackOrg);
284
- }
285
- }
286
- } else {
287
- if (currentOrg.id !== currentMembershipIdRef.current) {
288
- setCurrentMembership(currentOrg);
289
- }
290
- }
291
- },
292
- [currentWorkOSOrganizationId, setCurrentWorkOSOrganizationId, setCurrentMembership]
293
- );
294
- useEffect(() => {
295
- const initializeOrganizations = async () => {
296
- if (!user?.id || !profileLoaded) {
297
- return;
298
- }
299
- if (hasInitializedRef.current) {
300
- return;
301
- }
302
- if (memberships.length === 0) {
303
- setOrganizationsInitializing(true);
304
- } else {
305
- setOrganizationsLoading(true);
306
- }
307
- setOrganizationsError(null);
308
- try {
309
- const data = await apiRequest("/memberships/my-memberships");
310
- if (!Array.isArray(data)) {
311
- throw new Error("Invalid memberships response");
312
- }
313
- setMemberships(data);
314
- if (data.length === 0) {
315
- setOrganizationsError("No organization memberships found. Please contact your administrator or try refreshing the page.");
316
- hasInitializedRef.current = true;
317
- return;
318
- }
319
- if (!currentWorkOSOrganizationId && data.length > 0) {
320
- await selectOrganization(data);
321
- } else if (currentWorkOSOrganizationId) {
322
- validateCurrentOrganization(data);
323
- }
324
- hasInitializedRef.current = true;
325
- } catch (error) {
326
- setOrganizationsError(error instanceof Error ? error.message : "Failed to load organizations");
327
- } finally {
328
- setOrganizationsInitializing(false);
329
- setOrganizationsLoading(false);
330
- }
331
- };
332
- initializeOrganizations();
333
- }, [
334
- user?.id,
335
- profileLoaded,
336
- profile?.last_visited_org,
337
- currentWorkOSOrganizationId,
338
- apiRequest,
339
- setOrganizationsInitializing,
340
- setOrganizationsLoading,
341
- setOrganizationsError,
342
- selectOrganization,
343
- validateCurrentOrganization
344
- // REMOVED: memberships.length - causes feedback loop (memberships change as RESULT of effect, not INPUT)
345
- ]);
346
- const retryInitialization = useCallback(async () => {
347
- hasInitializedRef.current = false;
348
- setOrganizationsError(null);
349
- setOrganizationsInitializing(true);
350
- try {
351
- const data = await apiRequest("/memberships/my-memberships");
352
- if (!Array.isArray(data)) {
353
- throw new Error("Invalid memberships response");
354
- }
355
- setMemberships(data);
356
- if (!currentWorkOSOrganizationId && data.length > 0) {
357
- await selectOrganization(data);
358
- } else if (currentWorkOSOrganizationId) {
359
- validateCurrentOrganization(data);
360
- }
361
- hasInitializedRef.current = true;
362
- } catch (error) {
363
- setOrganizationsError(error instanceof Error ? error.message : "Failed to load organizations");
364
- } finally {
365
- setOrganizationsInitializing(false);
366
- }
367
- }, [
368
- apiRequest,
369
- currentWorkOSOrganizationId,
370
- setOrganizationsError,
371
- setOrganizationsInitializing,
372
- selectOrganization,
373
- validateCurrentOrganization
374
- ]);
375
- return {
376
- memberships,
377
- isInitializing: organizations.isInitializing,
378
- isLoading: organizations.isOrgRefreshing,
379
- isInitialized: hasInitializedRef.current && !organizations.isInitializing && !organizations.isOrgRefreshing,
380
- error: organizations.error,
381
- currentOrganization: currentMembership?.organization || null,
382
- retry: retryInitialization
383
- };
384
- };
385
- }
386
-
387
- export { OrganizationSwitcher, OrganizationSwitcherConnected, RoleBadge, createOrganizationsSlice, createUseOrgInitialization, createUseOrganizations };
@@ -1,39 +0,0 @@
1
- import { usePresetsContext } from './chunk-RQA2EVN3.js';
2
- import { useMemo } from 'react';
3
-
4
- var BUILT_IN_NAMES = /* @__PURE__ */ new Set([
5
- "default",
6
- "tactical",
7
- "regal",
8
- "cyber-volt",
9
- "aurora",
10
- "rose-gold",
11
- "midnight",
12
- "titanium",
13
- "obsidian",
14
- "honey",
15
- "abyss",
16
- "canopy",
17
- "slate",
18
- "cyber-strike",
19
- "cyber-chrome",
20
- "cyber-void",
21
- "quarry"
22
- ]);
23
- function titleCase(str) {
24
- return str.replace(/(^|-)(\w)/g, (_, sep, char) => (sep ? " " : "") + char.toUpperCase());
25
- }
26
- function useAvailablePresets() {
27
- const presetsMap = usePresetsContext();
28
- return useMemo(() => {
29
- return Object.entries(presetsMap).map(([key, preset]) => ({
30
- value: key,
31
- label: preset.label ?? titleCase(key),
32
- description: preset.description ?? "",
33
- colors: preset.colors ?? [preset.dark.primary, preset.dark.background, preset.light.background],
34
- isCustom: !BUILT_IN_NAMES.has(key)
35
- }));
36
- }, [presetsMap]);
37
- }
38
-
39
- export { useAvailablePresets };
@@ -1,126 +0,0 @@
1
- // src/features/operations/organization-graph/types.ts
2
- var ORGANIZATION_GRAPH_NODE_KIND_ORDER = [
3
- "organization",
4
- "system",
5
- "role",
6
- "action",
7
- "entity",
8
- "event",
9
- "policy",
10
- "stage",
11
- "resource",
12
- "knowledge",
13
- "customer-segment",
14
- "offering",
15
- "goal",
16
- "surface",
17
- "navigation-group",
18
- "ontology",
19
- "content-node"
20
- ];
21
- var ORGANIZATION_GRAPH_NODE_KIND_LABELS = {
22
- organization: "Organization",
23
- system: "System",
24
- role: "Role",
25
- action: "Action",
26
- entity: "Entity",
27
- event: "Event",
28
- policy: "Policy",
29
- stage: "Stage",
30
- resource: "Resource",
31
- knowledge: "Knowledge",
32
- "customer-segment": "Customer segment",
33
- offering: "Offering",
34
- goal: "Goal",
35
- surface: "Surface",
36
- "navigation-group": "Navigation group",
37
- ontology: "Ontology",
38
- "content-node": "Content node"
39
- };
40
- var ORGANIZATION_GRAPH_NODE_KIND_DETAIL_LABELS = {
41
- organization: "Organization root",
42
- system: "System",
43
- role: "Role",
44
- action: "Action",
45
- entity: "Entity",
46
- event: "Event",
47
- policy: "Policy",
48
- stage: "Stage",
49
- resource: "Resource",
50
- knowledge: "Knowledge",
51
- "customer-segment": "Customer segment",
52
- offering: "Offering",
53
- goal: "Goal",
54
- surface: "Surface",
55
- "navigation-group": "Navigation group",
56
- ontology: "Ontology record",
57
- "content-node": "Content node"
58
- };
59
- var ORGANIZATION_GRAPH_NODE_KIND_MEANINGS = {
60
- organization: "The root of the shared organization model and the parent for every derived node.",
61
- system: "A canonical Organization Model system for ownership, routing, and governance.",
62
- role: "An Organization Model role that owns responsibilities and may govern systems.",
63
- action: "A reusable action that can be attached to a system.",
64
- entity: "A modeled business object or stateful data domain owned by the organization model.",
65
- event: "A derived domain or runtime event emitted by entities, resources, or actions.",
66
- policy: "A governance rule that applies to targets and may trigger effects across the graph.",
67
- stage: "A lifecycle stage that records progress for an entity through a build pipeline.",
68
- resource: "A concrete command-view or mapped resource that bridges execution topology into the model.",
69
- knowledge: "An operational knowledge node that documents a process, strategy, or runbook in the org model.",
70
- "customer-segment": "A defined segment of customers or prospects that the organization targets or serves.",
71
- offering: "A product, service, or value proposition the organization delivers to customer segments.",
72
- goal: "A strategic or operational objective that guides priorities and measures progress.",
73
- surface: "A navigation surface (page or view) that is exposed through the platform shell.",
74
- "navigation-group": "A logical grouping of navigation surfaces within the platform shell.",
75
- ontology: "A compiled ontology record such as an object, action, catalog, value type, surface, or resource binding.",
76
- "content-node": "A system-scoped content node authored in system.content (schema, config, or tenant-defined kind)."
77
- };
78
- var ORGANIZATION_GRAPH_EDGE_KIND_LABELS = {
79
- contains: "Containment",
80
- references: "Reference",
81
- maps_to: "Mapping",
82
- uses: "Uses",
83
- governs: "Governs",
84
- links: "Links",
85
- affects: "Affects",
86
- emits: "Emits",
87
- originates_from: "Originates from",
88
- triggers: "Triggers",
89
- approval: "Approval",
90
- applies_to: "Applies to",
91
- effects: "Effects",
92
- actions: "Actions",
93
- reads: "Reads",
94
- writes: "Writes",
95
- uses_catalog: "Uses catalog"
96
- };
97
- var ORGANIZATION_GRAPH_EDGE_KIND_MEANINGS = {
98
- contains: "A hierarchy or ownership link inside the shared graph.",
99
- references: "A semantic association or dependency between two graph nodes.",
100
- maps_to: "An action is aligned to a concrete resource.",
101
- uses: "A graph node depends on another node, resource, entity, or integration.",
102
- governs: "A knowledge node, role, or policy provides authoritative guidance for another node.",
103
- links: "Two modeled nodes are associated without stronger ownership or execution semantics.",
104
- affects: "The source can influence the behavior, state, or outcome of the target.",
105
- emits: "The source produces an event that can be inspected or traversed.",
106
- originates_from: "The source is derived from or owned by the target origin.",
107
- triggers: "The source can start or activate the target.",
108
- approval: "The source requests or participates in an approval path.",
109
- applies_to: "A policy or rule targets the node it applies to.",
110
- effects: "A policy or event produces the target effect.",
111
- actions: "The source is bound to the target ontology action contract.",
112
- reads: "The source reads data described by the target ontology record.",
113
- writes: "The source writes data described by the target ontology record.",
114
- uses_catalog: "The source uses the target ontology catalog."
115
- };
116
- var DEFAULT_ORGANIZATION_GRAPH_FILTERS = {
117
- search: "",
118
- nodeKinds: [],
119
- topologyPresence: "all",
120
- environmentStatus: "all",
121
- resourceTypes: [],
122
- showIntegrations: true,
123
- domainFilters: {}
124
- };
125
-
126
- export { DEFAULT_ORGANIZATION_GRAPH_FILTERS, ORGANIZATION_GRAPH_EDGE_KIND_LABELS, ORGANIZATION_GRAPH_EDGE_KIND_MEANINGS, ORGANIZATION_GRAPH_NODE_KIND_DETAIL_LABELS, ORGANIZATION_GRAPH_NODE_KIND_LABELS, ORGANIZATION_GRAPH_NODE_KIND_MEANINGS, ORGANIZATION_GRAPH_NODE_KIND_ORDER };
@@ -1,44 +0,0 @@
1
- import { Box, Text } from '@mantine/core';
2
- import { AreaChart } from '@mantine/charts';
3
- import { jsx } from 'react/jsx-runtime';
4
-
5
- // src/components/monitoring/ResourceHealthChart.tsx
6
- function getHealthColor(successRate, hasExecutions = true) {
7
- if (!hasExecutions) return "var(--mantine-color-gray-6)";
8
- if (successRate >= 95) return "var(--color-success)";
9
- if (successRate >= 80) return "var(--color-warning)";
10
- return "var(--color-error)";
11
- }
12
- function ResourceHealthChart({
13
- healthData,
14
- hasExecutions = true,
15
- width = 300,
16
- height = 60
17
- }) {
18
- if (!healthData || healthData.trendData.length === 0) {
19
- return /* @__PURE__ */ jsx(Box, { w: width, h: height, style: { display: "flex", alignItems: "center", justifyContent: "center" }, children: /* @__PURE__ */ jsx(Text, { size: "xs", c: "dimmed", children: "No activity" }) });
20
- }
21
- const chartData = healthData.trendData.map((d) => ({
22
- time: d.time,
23
- rate: d.rate
24
- }));
25
- const chartColor = getHealthColor(healthData.summary.successRate, hasExecutions);
26
- return /* @__PURE__ */ jsx(Box, { w: width, h: height, children: /* @__PURE__ */ jsx(
27
- AreaChart,
28
- {
29
- h: height,
30
- data: chartData,
31
- dataKey: "time",
32
- series: [{ name: "rate", color: chartColor }],
33
- curveType: "monotone",
34
- withDots: false,
35
- withTooltip: false,
36
- withXAxis: false,
37
- withYAxis: false,
38
- fillOpacity: 0.2,
39
- gridAxis: "none"
40
- }
41
- ) });
42
- }
43
-
44
- export { ResourceHealthChart, getHealthColor };
@@ -1,14 +0,0 @@
1
- import { useAppearance } from './chunk-E565XMTQ.js';
2
- import { Center, Box } from '@mantine/core';
3
- import { jsx } from 'react/jsx-runtime';
4
-
5
- function SubshellLoader() {
6
- const { loader } = useAppearance();
7
- return /* @__PURE__ */ jsx(Center, { mih: "calc(100vh - 70px)", children: loader });
8
- }
9
- function SubshellSidebarLoader({ padding = "sm" }) {
10
- const { loader } = useAppearance();
11
- return /* @__PURE__ */ jsx(Box, { style: { flex: 1, minHeight: 0, display: "flex" }, children: /* @__PURE__ */ jsx(Center, { p: padding, style: { flex: 1, minHeight: 0 }, children: loader }) });
12
- }
13
-
14
- export { SubshellLoader, SubshellSidebarLoader };