@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,469 +0,0 @@
1
- import { getSemanticIconComponent } from './chunk-IOXOPMYS.js';
2
- import { devOnlyFor, requiresAdminFor, topLevel, parentOf, ancestorsOf, childrenOf, findById, findByPath, listAllSystems, defaultPathFor, getSortedSidebarEntries } from './chunk-52K5RFDH.js';
3
- import { useInitialization } from './chunk-533DUEQY.js';
4
- import { useOrganization } from './chunk-DD3CCMCZ.js';
5
- import { createContext, useMemo, useCallback, useContext } from 'react';
6
- import { jsx } from 'react/jsx-runtime';
7
-
8
- function createFeatureAccessHook({
9
- useInitialization: useInitialization2,
10
- useOrganization: useOrganization2
11
- }) {
12
- return function useFeatureAccess2() {
13
- const { profile, organizationReady } = useInitialization2();
14
- const { currentMembership } = useOrganization2();
15
- const { orgConfig, membershipConfig } = useMemo(() => {
16
- const organizationConfig = currentMembership?.organization?.config;
17
- const memberConfig = currentMembership?.config;
18
- return { orgConfig: organizationConfig, membershipConfig: memberConfig };
19
- }, [currentMembership]);
20
- const userConfig = profile?.config;
21
- const checkFeature = useCallback(
22
- (featureKey) => {
23
- if (profile?.is_platform_admin) {
24
- return { allowed: true, restrictedBy: null };
25
- }
26
- const membershipValue = membershipConfig?.features?.[featureKey];
27
- if (membershipValue === false) return { allowed: false, restrictedBy: "membership" };
28
- return { allowed: true, restrictedBy: null };
29
- },
30
- [profile?.is_platform_admin, membershipConfig]
31
- );
32
- const hasFeature = useCallback((featureKey) => checkFeature(featureKey).allowed, [checkFeature]);
33
- return {
34
- orgConfig,
35
- membershipConfig,
36
- userConfig,
37
- hasFeature,
38
- checkFeature,
39
- isReady: organizationReady
40
- };
41
- };
42
- }
43
-
44
- // src/provider/resolvers/RouteResolver.ts
45
- function normalizeRoutePath(path) {
46
- const trimmedPath = path.trim();
47
- if (!trimmedPath || trimmedPath === "/") {
48
- return "/";
49
- }
50
- return trimmedPath.replace(/\/+$/, "") || "/";
51
- }
52
- function isRouteMatch(currentPath, route) {
53
- const normalizedCurrentPath = normalizeRoutePath(currentPath);
54
- const normalizedRoute = normalizeRoutePath(route);
55
- return normalizedCurrentPath === normalizedRoute || normalizedCurrentPath.startsWith(`${normalizedRoute}/`);
56
- }
57
-
58
- // src/provider/resolvers/NavResolver.ts
59
- function uniqueIds(ids) {
60
- return ids ? [...new Set(ids)] : [];
61
- }
62
-
63
- // src/provider/validateManifests.ts
64
- function listSystemRefs(systems) {
65
- const refs = [];
66
- function walk(map, prefix = "") {
67
- for (const [key, system] of Object.entries(map)) {
68
- const path = prefix ? `${prefix}.${key}` : key;
69
- refs.push(path, system.id);
70
- const subsystems = system.subsystems;
71
- if (subsystems) {
72
- walk(subsystems, path);
73
- }
74
- }
75
- }
76
- walk(systems);
77
- return refs;
78
- }
79
- function validateManifests(manifests, organizationModel) {
80
- if (!organizationModel) {
81
- return;
82
- }
83
- const validSystemIds = /* @__PURE__ */ new Set([
84
- ...Object.keys(organizationModel.systems ?? {}),
85
- ...listSystemRefs(organizationModel.systems ?? {})
86
- ]);
87
- const errors = [];
88
- for (const manifest of manifests) {
89
- const key = manifest.key;
90
- const systemId = manifest.systemId;
91
- if (!systemId) {
92
- continue;
93
- }
94
- if (!validSystemIds.has(systemId)) {
95
- errors.push(
96
- `Manifest "${key}": systemId "${systemId}" is not a known system id. Valid values: ${[...validSystemIds].sort().join(", ")}`
97
- );
98
- }
99
- }
100
- if (errors.length > 0) {
101
- throw new Error(
102
- `System manifest validation failed with ${errors.length} error(s):
103
- ` + errors.map((e, i) => ` ${i + 1}. ${e}`).join("\n")
104
- );
105
- }
106
- }
107
- var ElevasisSystemsContext = createContext(null);
108
-
109
- // src/provider/sidebarProjection.ts
110
- function isLifecycleEnabled(system) {
111
- if (system.enabled === false) return false;
112
- return system.lifecycle !== "deprecated" && system.lifecycle !== "archived";
113
- }
114
- function isSystemAccessible(systemId, context) {
115
- const system = context.shellModel.findById(systemId);
116
- if (!system || !isLifecycleEnabled(system)) return false;
117
- if (!context.isSystemEnabled(systemId)) return false;
118
- if (context.shellModel.requiresAdminFor(systemId) && !context.isPlatformAdmin) return false;
119
- if (context.shellModel.devOnlyFor(systemId) && !context.isDev) return false;
120
- return true;
121
- }
122
- function isSurfaceAccessible(node, context) {
123
- if (node.devOnly && !context.isDev) return false;
124
- if (node.requiresAdmin && !context.isPlatformAdmin) return false;
125
- const systemTargets = node.targets?.systems ?? [];
126
- if (systemTargets.length === 0) return true;
127
- return systemTargets.some((systemId) => isSystemAccessible(systemId, context));
128
- }
129
- function iconForNode(node, context) {
130
- if (node.type === "surface") {
131
- const targetIcon = node.targets?.systems?.map((systemId) => context.shellModel.findById(systemId)?.iconComponent).find(Boolean);
132
- if (targetIcon) return targetIcon;
133
- }
134
- return getSemanticIconComponent(node.icon);
135
- }
136
- function activeMatchPathsForSurface(node, context) {
137
- const targets = node.targets?.systems ?? [];
138
- if (targets.length !== 1) return void 0;
139
- const paths = context.shellModel.childrenOf(targets[0]).map((child) => child.path).filter((path) => Boolean(path && path !== node.path));
140
- return paths.length > 0 ? [...new Set(paths)] : void 0;
141
- }
142
- function surfaceToLinkItem(node, context, siblings) {
143
- if (!isSurfaceAccessible(node, context)) return void 0;
144
- const siblingShadows = siblings.some((sibling) => sibling !== node && sibling.path.startsWith(`${node.path}/`));
145
- const activeMatchPaths = activeMatchPathsForSurface(node, context);
146
- return {
147
- label: node.label,
148
- link: node.path,
149
- ...siblingShadows ? { exact: true } : {},
150
- ...activeMatchPaths ? { activeMatchPaths } : {}
151
- };
152
- }
153
- function projectNode(node, context) {
154
- if (node.type === "surface") {
155
- if (!isSurfaceAccessible(node, context)) return void 0;
156
- return {
157
- label: node.label,
158
- icon: iconForNode(node, context),
159
- link: node.path
160
- };
161
- }
162
- const childEntries = getSortedSidebarEntries(node.children);
163
- const childSurfaces = childEntries.map(([, child]) => child).filter((child) => child.type === "surface");
164
- const links = childEntries.flatMap(([, child]) => {
165
- if (child.type === "surface") {
166
- const link = surfaceToLinkItem(child, context, childSurfaces);
167
- return link ? [link] : [];
168
- }
169
- const nestedGroup = projectNode(child, context);
170
- return nestedGroup?.link ? [
171
- {
172
- label: nestedGroup.label,
173
- link: nestedGroup.link
174
- }
175
- ] : nestedGroup?.links ?? [];
176
- });
177
- if (links.length === 0) return void 0;
178
- return {
179
- label: node.label,
180
- icon: iconForNode(node, context),
181
- links
182
- };
183
- }
184
- function projectSection(section, context) {
185
- const entries = getSortedSidebarEntries(section);
186
- return entries.flatMap(([, node]) => {
187
- const group = projectNode(node, context);
188
- return group ? [group] : [];
189
- });
190
- }
191
- function projectSidebarLinks({
192
- shellModel,
193
- organizationModel,
194
- isSystemEnabled,
195
- isPlatformAdmin = false,
196
- isDev = false,
197
- section
198
- }) {
199
- const context = {
200
- shellModel,
201
- isSystemEnabled,
202
- isPlatformAdmin,
203
- isDev
204
- };
205
- const sidebar = organizationModel?.navigation.sidebar;
206
- if (!sidebar) return [];
207
- if (section) {
208
- return projectSection(sidebar[section], context);
209
- }
210
- return [...projectSection(sidebar.primary, context), ...projectSection(sidebar.bottom, context)];
211
- }
212
- var useFeatureAccess = createFeatureAccessHook({
213
- useInitialization,
214
- useOrganization
215
- });
216
- function useElevasisSystems() {
217
- const context = useContext(ElevasisSystemsContext);
218
- if (!context) {
219
- throw new Error(
220
- "useElevasisSystems must be used within an ElevasisSystemsProvider. Wrap your app (or the relevant subtree) with <ElevasisSystemsProvider>."
221
- );
222
- }
223
- return context;
224
- }
225
- function useOptionalElevasisSystems() {
226
- return useContext(ElevasisSystemsContext);
227
- }
228
- function defaultSystems(organizationModel) {
229
- if (!organizationModel) return [];
230
- return listAllSystems(organizationModel).map(({ path, system }) => ({ ...system, id: path }));
231
- }
232
- function systemPath(system) {
233
- return system.ui?.path ?? system.path ?? defaultPathFor(system.id);
234
- }
235
- function systemLabel(system) {
236
- return system.label ?? system.title ?? system.id;
237
- }
238
- function moduleSystemId(module) {
239
- return module.systemId ?? module.key;
240
- }
241
- function isLifecycleEnabled2(system) {
242
- if (system.enabled === false) return false;
243
- return system.lifecycle !== "deprecated" && system.lifecycle !== "archived";
244
- }
245
- function isOrganizationModelSystemEnabled(organizationModel, systemId) {
246
- const system = defaultSystems(organizationModel).find((candidate) => candidate.id === systemId);
247
- return system ? isLifecycleEnabled2(system) : void 0;
248
- }
249
- function resolveSystemModules(systems, isSystemEnabled) {
250
- return systems.map((system) => {
251
- const systemId = system.systemId;
252
- const accessKey = systemId ?? system.key;
253
- return {
254
- ...system,
255
- systemId,
256
- access: {
257
- systemKey: system.key,
258
- systemId,
259
- enabled: isSystemEnabled(accessKey)
260
- },
261
- semantics: {
262
- capabilityIds: uniqueIds(system.capabilityIds ?? [])
263
- }
264
- };
265
- });
266
- }
267
- function buildShellSystems(organizationModel, modules) {
268
- const iconBySystemId = new Map(
269
- modules.flatMap((module) => module.systemId ? [[moduleSystemId(module), module.icon]] : [])
270
- );
271
- return defaultSystems(organizationModel).map((system) => ({
272
- ...system,
273
- label: systemLabel(system),
274
- path: systemPath(system),
275
- iconComponent: iconBySystemId.get(system.id)
276
- }));
277
- }
278
- function createShellModel(systems) {
279
- const systemsRecord = Object.fromEntries(systems.map((s) => [s.id, s]));
280
- return {
281
- systems,
282
- findByPath: (path) => findByPath(systemsRecord, normalizeRoutePath(path)),
283
- findById: (id) => findById(systemsRecord, id),
284
- childrenOf: (id) => childrenOf(systemsRecord, id),
285
- ancestorsOf: (id) => ancestorsOf(systemsRecord, id),
286
- parentOf: (id) => parentOf(systemsRecord, id),
287
- topLevel: () => topLevel(systemsRecord),
288
- requiresAdminFor: (id) => requiresAdminFor(systemsRecord, id),
289
- devOnlyFor: (id) => devOnlyFor(systemsRecord, id)
290
- };
291
- }
292
- function resolveOrganizationGraphSystem(systems, shellModel) {
293
- for (const system of systems) {
294
- const graphBridge = system.organizationGraph;
295
- if (!graphBridge) continue;
296
- const systemId = graphBridge.systemId;
297
- if (!systemId) continue;
298
- const node = shellModel.findById(systemId);
299
- return {
300
- available: Boolean(node),
301
- systemId,
302
- systemPath: node ? systemPath(node) : void 0
303
- };
304
- }
305
- return {
306
- available: false
307
- };
308
- }
309
- function findMatchingNode(shellModel, currentPath) {
310
- const normalizedPath = normalizeRoutePath(currentPath);
311
- const exact = shellModel.findByPath(normalizedPath);
312
- if (exact) return exact;
313
- return [...shellModel.systems].filter((system) => {
314
- const path = normalizeRoutePath(systemPath(system));
315
- return path !== "/" && isRouteMatch(normalizedPath, path);
316
- }).sort((a, b) => systemPath(b).length - systemPath(a).length)[0];
317
- }
318
- function ownsNode(module, node) {
319
- if (!node || !module.systemId) return false;
320
- return node.id === module.systemId || node.id.startsWith(`${module.systemId}.`);
321
- }
322
- function ownsRoutePrefix(module, normalizedPath) {
323
- return (module.routePrefixes ?? []).some((prefix) => isRouteMatch(normalizedPath, normalizeRoutePath(prefix)));
324
- }
325
- function resolveRoute(systems, shellModel, currentPath, disabledSubsectionPaths) {
326
- const node = findMatchingNode(shellModel, currentPath);
327
- const normalizedPath = normalizeRoutePath(currentPath);
328
- if (disabledSubsectionPaths.some((disabledPath) => isRouteMatch(normalizedPath, disabledPath))) {
329
- return {
330
- status: "hidden",
331
- path: currentPath,
332
- node
333
- };
334
- }
335
- const system = systems.find((candidate) => ownsNode(candidate, node)) ?? systems.filter((candidate) => ownsRoutePrefix(candidate, normalizedPath)).sort(
336
- (a, b) => Math.max(...(b.routePrefixes ?? []).map((prefix) => prefix.length)) - Math.max(...(a.routePrefixes ?? []).map((prefix) => prefix.length))
337
- )[0];
338
- if (!system) {
339
- return {
340
- status: "unmatched",
341
- path: currentPath,
342
- node
343
- };
344
- }
345
- return {
346
- status: "matched",
347
- path: currentPath,
348
- system,
349
- node
350
- };
351
- }
352
- function ElevasisSystemsProvider({
353
- systems,
354
- organizationModel,
355
- timeRange,
356
- operationsApiUrl,
357
- operationsSSEManager,
358
- deliveryApiUrl,
359
- deliverySSEManager,
360
- disabledSubsectionPaths = [],
361
- children
362
- }) {
363
- const activeSystems = systems ?? [];
364
- const resolvedOrganizationModel = useMemo(() => {
365
- if (!organizationModel) {
366
- return void 0;
367
- }
368
- return {
369
- ...organizationModel,
370
- knowledge: organizationModel.knowledge ?? {}
371
- };
372
- }, [organizationModel]);
373
- useMemo(() => validateManifests(activeSystems, resolvedOrganizationModel), [activeSystems, resolvedOrganizationModel]);
374
- const { hasFeature } = useFeatureAccess();
375
- const hasResolvedSystem = useCallback(
376
- (key) => {
377
- if (!hasFeature(key)) {
378
- return false;
379
- }
380
- const organizationModelSystemEnabled = isOrganizationModelSystemEnabled(resolvedOrganizationModel, key);
381
- return organizationModelSystemEnabled ?? true;
382
- },
383
- [hasFeature, resolvedOrganizationModel]
384
- );
385
- const shellSystems = useMemo(
386
- () => buildShellSystems(resolvedOrganizationModel, activeSystems),
387
- [resolvedOrganizationModel, activeSystems]
388
- );
389
- const shellModel = useMemo(() => createShellModel(shellSystems), [shellSystems]);
390
- const normalizedDisabledSubsectionPaths = useMemo(
391
- () => [...new Set(disabledSubsectionPaths.map((path) => normalizeRoutePath(path)))],
392
- [disabledSubsectionPaths]
393
- );
394
- const resolvedSystems = useMemo(
395
- () => resolveSystemModules(activeSystems, hasResolvedSystem),
396
- [activeSystems, hasResolvedSystem]
397
- );
398
- const enabledResolvedSystems = useMemo(
399
- () => resolvedSystems.filter((system) => system.access.enabled),
400
- [resolvedSystems]
401
- );
402
- const organizationGraph = useMemo(
403
- () => resolveOrganizationGraphSystem(enabledResolvedSystems, shellModel),
404
- [enabledResolvedSystems, shellModel]
405
- );
406
- const getResolvedSystem = useCallback(
407
- (key) => resolvedSystems.find((system) => system.key === key),
408
- [resolvedSystems]
409
- );
410
- const isSystemEnabled = useCallback((key) => hasResolvedSystem(key), [hasResolvedSystem]);
411
- const getSidebarLinks = useCallback(
412
- (options = {}) => projectSidebarLinks({
413
- shellModel,
414
- organizationModel: resolvedOrganizationModel,
415
- isSystemEnabled,
416
- ...options
417
- }),
418
- [shellModel, resolvedOrganizationModel, isSystemEnabled]
419
- );
420
- const resolveRouteByPath = useCallback(
421
- (path) => resolveRoute(enabledResolvedSystems, shellModel, path, normalizedDisabledSubsectionPaths),
422
- [enabledResolvedSystems, shellModel, normalizedDisabledSubsectionPaths]
423
- );
424
- const shellRuntime = useMemo(
425
- () => ({
426
- resolveRoute: resolveRouteByPath
427
- }),
428
- [resolveRouteByPath]
429
- );
430
- const value = useMemo(
431
- () => ({
432
- shellModel,
433
- shellRuntime,
434
- getSidebarLinks,
435
- enabledResolvedSystems,
436
- resolvedSystems,
437
- organizationGraph,
438
- organizationModel: resolvedOrganizationModel,
439
- timeRange,
440
- operationsApiUrl,
441
- operationsSSEManager,
442
- deliveryApiUrl,
443
- deliverySSEManager,
444
- disabledSubsectionPaths: normalizedDisabledSubsectionPaths,
445
- isSystemEnabled,
446
- getResolvedSystem
447
- }),
448
- [
449
- shellModel,
450
- shellRuntime,
451
- enabledResolvedSystems,
452
- resolvedSystems,
453
- organizationGraph,
454
- resolvedOrganizationModel,
455
- timeRange,
456
- operationsApiUrl,
457
- operationsSSEManager,
458
- deliveryApiUrl,
459
- deliverySSEManager,
460
- normalizedDisabledSubsectionPaths,
461
- isSystemEnabled,
462
- getResolvedSystem,
463
- getSidebarLinks
464
- ]
465
- );
466
- return /* @__PURE__ */ jsx(ElevasisSystemsContext.Provider, { value, children });
467
- }
468
-
469
- export { ElevasisSystemsProvider, createFeatureAccessHook, useElevasisSystems, useOptionalElevasisSystems };
@@ -1,53 +0,0 @@
1
- import { sidebarIconSize, sidebarIconStroke, sidebarIconInnerSize } from './chunk-DT3QYZVU.js';
2
- import { Box, Group, ThemeIcon } from '@mantine/core';
3
- import { jsx, jsxs } from 'react/jsx-runtime';
4
-
5
- var SubshellSidebarSection = ({
6
- icon: Icon,
7
- label,
8
- rightSection,
9
- withTopBorder = false
10
- }) => {
11
- return /* @__PURE__ */ jsx(
12
- Box,
13
- {
14
- p: "sm",
15
- style: {
16
- borderTop: withTopBorder ? "1px solid var(--color-border)" : void 0,
17
- borderBottom: "1px solid var(--color-border)"
18
- },
19
- children: /* @__PURE__ */ jsxs(Group, { gap: "xs", children: [
20
- /* @__PURE__ */ jsx(
21
- ThemeIcon,
22
- {
23
- variant: "light",
24
- size: sidebarIconSize,
25
- style: {
26
- backgroundColor: "var(--color-surface)",
27
- color: "var(--color-primary)",
28
- flexShrink: 0
29
- },
30
- children: /* @__PURE__ */ jsx(Icon, { size: sidebarIconInnerSize, stroke: sidebarIconStroke })
31
- }
32
- ),
33
- /* @__PURE__ */ jsx(
34
- Box,
35
- {
36
- c: "var(--color-text)",
37
- style: {
38
- fontFamily: "var(--elevasis-font-family-subtitle)",
39
- flex: 1,
40
- fontSize: "var(--mantine-font-size-md)",
41
- fontWeight: 500,
42
- lineHeight: 1.2
43
- },
44
- children: label
45
- }
46
- ),
47
- rightSection
48
- ] })
49
- }
50
- );
51
- };
52
-
53
- export { SubshellSidebarSection };
@@ -1,145 +0,0 @@
1
- import { IconMail, IconSend, IconFileText, IconClock, IconArrowUp, IconMessageCircle, IconRocket, IconEye, IconEdit, IconAlertTriangle, IconRefresh, IconX, IconCheck, IconShieldLock, IconActivity, IconTopologyStar3, IconApps, IconBriefcase, IconBuilding, IconBolt, IconSearch, IconChartBar, IconUsers, IconInfoCircle, IconDatabase, IconGitBranch, IconDashboard, IconBuildingStore, IconUser, IconPlug, IconBrain, IconTargetArrow, IconBook, IconLayoutGrid, IconArchive, IconSettings, IconTool, IconCalendar } from '@tabler/icons-react';
2
- import { jsx } from 'react/jsx-runtime';
3
-
4
- // src/icons/registry.tsx
5
- var DEFAULT_SEMANTIC_ICON_REGISTRY = {
6
- // Navigation / app areas
7
- dashboard: IconDashboard,
8
- calendar: IconCalendar,
9
- sales: IconChartBar,
10
- crm: IconBuildingStore,
11
- "lead-gen": IconTargetArrow,
12
- projects: IconBriefcase,
13
- operations: IconTool,
14
- monitoring: IconChartBar,
15
- knowledge: IconBrain,
16
- settings: IconSettings,
17
- admin: IconShieldLock,
18
- archive: IconArchive,
19
- business: IconBriefcase,
20
- finance: IconChartBar,
21
- platform: IconLayoutGrid,
22
- seo: IconSearch,
23
- // Knowledge kinds
24
- playbook: IconBook,
25
- strategy: IconTargetArrow,
26
- reference: IconFileText,
27
- // Resource kinds
28
- agent: IconBrain,
29
- workflow: IconGitBranch,
30
- integration: IconPlug,
31
- database: IconDatabase,
32
- user: IconUser,
33
- team: IconUsers,
34
- // Integration specifics
35
- gmail: IconMail,
36
- "google-sheets": IconDatabase,
37
- attio: IconBuildingStore,
38
- // Surface / UI views
39
- overview: IconDashboard,
40
- "command-view": IconTopologyStar3,
41
- "command-queue": IconSend,
42
- pipeline: IconGitBranch,
43
- lists: IconFileText,
44
- resources: IconDatabase,
45
- // Actions
46
- approve: IconCheck,
47
- reject: IconX,
48
- retry: IconRefresh,
49
- edit: IconEdit,
50
- view: IconEye,
51
- launch: IconRocket,
52
- message: IconMessageCircle,
53
- escalate: IconAlertTriangle,
54
- promote: IconArrowUp,
55
- submit: IconSend,
56
- email: IconMail,
57
- // Status
58
- success: IconCheck,
59
- error: IconX,
60
- warning: IconAlertTriangle,
61
- info: IconInfoCircle,
62
- pending: IconClock,
63
- // OM / UI group icons
64
- bolt: IconBolt,
65
- building: IconBuilding,
66
- briefcase: IconBriefcase,
67
- apps: IconApps,
68
- graph: IconTopologyStar3,
69
- shield: IconShieldLock,
70
- users: IconUsers,
71
- "chart-bar": IconChartBar,
72
- search: IconSearch,
73
- // UI-only om.* group tokens (not in the core enum — kept for registry lookup
74
- // by components that reference them directly via extendSemanticIconRegistry)
75
- "om.quick-access": IconBolt,
76
- "om.profile": IconBuilding,
77
- "om.business-model": IconBriefcase,
78
- "om.systems": IconApps,
79
- "om.graph": IconTopologyStar3,
80
- "om.governance-wiring": IconShieldLock,
81
- // Graph node-kind fallback tokens (used internally by knowledge-tree helpers)
82
- "entity.record": IconActivity,
83
- "event.lifecycle": IconActivity,
84
- "policy.governance": IconShieldLock,
85
- // Compatibility aliases for existing command queue payloads.
86
- IconCheck,
87
- IconX,
88
- IconRefresh,
89
- IconAlertTriangle,
90
- IconEdit,
91
- IconEye,
92
- IconRocket,
93
- IconMessageCircle,
94
- IconArrowUp,
95
- IconClock,
96
- IconFileText,
97
- IconSend,
98
- IconMail
99
- };
100
- var semanticIconRegistry = { ...DEFAULT_SEMANTIC_ICON_REGISTRY };
101
- function extendSemanticIconRegistry(overrides) {
102
- semanticIconRegistry = { ...semanticIconRegistry, ...overrides };
103
- }
104
- function getSemanticIconComponent(token, fallbackToken) {
105
- const icon = resolveSemanticIconComponent(token);
106
- if (icon) return icon;
107
- if (fallbackToken && semanticIconRegistry[fallbackToken]) return semanticIconRegistry[fallbackToken];
108
- return IconInfoCircle;
109
- }
110
- function resolveSemanticIconComponent(token) {
111
- if (!token) return null;
112
- return semanticIconRegistry[token] ?? null;
113
- }
114
- function SemanticIcon({
115
- token,
116
- fallbackToken,
117
- size = 16,
118
- stroke = 1.8,
119
- className,
120
- style,
121
- "aria-hidden": ariaHidden = true
122
- }) {
123
- const Icon = getSemanticIconComponent(token, fallbackToken);
124
- return /* @__PURE__ */ jsx(
125
- "span",
126
- {
127
- className,
128
- "aria-hidden": ariaHidden,
129
- style: {
130
- display: "inline-flex",
131
- alignItems: "center",
132
- justifyContent: "center",
133
- width: size,
134
- height: size,
135
- minWidth: size,
136
- color: "currentColor",
137
- flexShrink: 0,
138
- ...style
139
- },
140
- children: /* @__PURE__ */ jsx(Icon, { size, stroke })
141
- }
142
- );
143
- }
144
-
145
- export { SemanticIcon, extendSemanticIconRegistry, getSemanticIconComponent, resolveSemanticIconComponent };