@elevasis/ui 2.20.0 → 2.22.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 (100) hide show
  1. package/dist/api/index.js +2 -2
  2. package/dist/app/index.js +5 -5
  3. package/dist/charts/index.js +3 -3
  4. package/dist/{chunk-TO7QXDBX.js → chunk-3HEUGBOT.js} +3 -3
  5. package/dist/chunk-AXXTN44Z.js +26 -0
  6. package/dist/{chunk-FMFX4K6E.js → chunk-B4FHWKEF.js} +3390 -2929
  7. package/dist/{chunk-AL23U6C3.js → chunk-BIWHHWCJ.js} +1 -2
  8. package/dist/{chunk-MZFJWCPH.js → chunk-BSZRKBAW.js} +277 -92
  9. package/dist/{chunk-GP3AFJYG.js → chunk-COG4ABRI.js} +8 -13
  10. package/dist/chunk-DDZOHLHB.js +48 -0
  11. package/dist/{chunk-ZE2KQSHL.js → chunk-GJ7EIABJ.js} +4 -4
  12. package/dist/{chunk-YP6T426C.js → chunk-IBUYJXA3.js} +1326 -1110
  13. package/dist/{chunk-2CFOFSSG.js → chunk-IOTLB6ND.js} +8 -13
  14. package/dist/{chunk-GBMNCNHX.js → chunk-KVJ3LFH2.js} +3 -1
  15. package/dist/chunk-LJWV4TWV.js +335 -0
  16. package/dist/{chunk-PJVG3ISO.js → chunk-LKVBEE63.js} +7 -9
  17. package/dist/{chunk-JR5WNTLA.js → chunk-LVJGPE6H.js} +11 -24
  18. package/dist/{chunk-OUYH2SBS.js → chunk-LVUCBY7X.js} +2 -2
  19. package/dist/{chunk-TIIPYB2Z.js → chunk-QZJM3RYI.js} +1 -1
  20. package/dist/{chunk-OD7GWIZS.js → chunk-SGXXJE52.js} +1 -121
  21. package/dist/{chunk-7YQKVWSD.js → chunk-SQ5JGELM.js} +25 -5
  22. package/dist/{chunk-R7OJCNL3.js → chunk-T6INEVX6.js} +1 -1
  23. package/dist/{chunk-RX4UWZZR.js → chunk-TKAYX2SP.js} +8 -3
  24. package/dist/{chunk-CTTY6FUT.js → chunk-TSSKOQBX.js} +2 -2
  25. package/dist/{chunk-GTYUP7MB.js → chunk-WWJ6S2HQ.js} +10 -22
  26. package/dist/{chunk-Q5HC6ENG.js → chunk-XOTJNW4Q.js} +1 -1
  27. package/dist/{chunk-BHR7IV72.js → chunk-XUYBOO32.js} +1 -1
  28. package/dist/{chunk-M7W7CGPL.js → chunk-Z6FAH4XV.js} +1 -1
  29. package/dist/{chunk-Q4QJOSVS.js → chunk-ZBCTB5CA.js} +1 -1
  30. package/dist/components/index.css +85 -85
  31. package/dist/components/index.d.ts +970 -746
  32. package/dist/components/index.js +246 -39
  33. package/dist/components/navigation/index.css +589 -0
  34. package/dist/components/navigation/index.d.ts +1 -13
  35. package/dist/components/navigation/index.js +11 -1
  36. package/dist/execution/index.d.ts +27 -0
  37. package/dist/features/auth/index.css +2 -2
  38. package/dist/features/auth/index.d.ts +184 -3
  39. package/dist/features/crm/index.css +2 -2
  40. package/dist/features/crm/index.d.ts +201 -38
  41. package/dist/features/crm/index.js +15 -14
  42. package/dist/features/dashboard/index.css +2 -2
  43. package/dist/features/dashboard/index.d.ts +25 -27
  44. package/dist/features/dashboard/index.js +15 -14
  45. package/dist/features/delivery/index.css +85 -85
  46. package/dist/features/delivery/index.d.ts +201 -38
  47. package/dist/features/delivery/index.js +15 -14
  48. package/dist/features/lead-gen/index.css +2 -2
  49. package/dist/features/lead-gen/index.d.ts +19 -37
  50. package/dist/features/lead-gen/index.js +15 -14
  51. package/dist/features/monitoring/index.css +85 -85
  52. package/dist/features/monitoring/index.d.ts +18 -36
  53. package/dist/features/monitoring/index.js +17 -16
  54. package/dist/features/monitoring/requests/index.css +2 -2
  55. package/dist/features/monitoring/requests/index.d.ts +18 -36
  56. package/dist/features/monitoring/requests/index.js +15 -14
  57. package/dist/features/operations/index.css +2 -2
  58. package/dist/features/operations/index.d.ts +49 -67
  59. package/dist/features/operations/index.js +18 -17
  60. package/dist/features/seo/index.d.ts +17 -35
  61. package/dist/features/seo/index.js +1 -1
  62. package/dist/features/settings/index.css +2 -2
  63. package/dist/features/settings/index.d.ts +222 -44
  64. package/dist/features/settings/index.js +16 -15
  65. package/dist/graph/index.css +2 -2
  66. package/dist/hooks/delivery/index.css +2 -2
  67. package/dist/hooks/delivery/index.d.ts +184 -3
  68. package/dist/hooks/delivery/index.js +2 -2
  69. package/dist/hooks/index.css +85 -85
  70. package/dist/hooks/index.d.ts +1862 -1582
  71. package/dist/hooks/index.js +13 -12
  72. package/dist/hooks/operations/command-view/utils/transformCommandViewData.d.ts +92 -121
  73. package/dist/hooks/published.css +85 -85
  74. package/dist/hooks/published.d.ts +1862 -1582
  75. package/dist/hooks/published.js +13 -12
  76. package/dist/index.css +12 -12
  77. package/dist/index.d.ts +689 -470
  78. package/dist/index.js +14 -13
  79. package/dist/initialization/index.d.ts +184 -3
  80. package/dist/layout/index.js +2 -2
  81. package/dist/organization/index.css +589 -0
  82. package/dist/organization/index.js +1 -1
  83. package/dist/profile/index.d.ts +184 -3
  84. package/dist/provider/index.css +384 -0
  85. package/dist/provider/index.d.ts +68 -125
  86. package/dist/provider/index.js +11 -10
  87. package/dist/provider/published.css +463 -0
  88. package/dist/provider/published.d.ts +68 -125
  89. package/dist/provider/published.js +8 -7
  90. package/dist/supabase/index.d.ts +359 -6
  91. package/dist/test-utils/index.d.ts +46 -2
  92. package/dist/test-utils/index.js +104 -3
  93. package/dist/theme/index.js +2 -2
  94. package/dist/types/index.d.ts +303 -141
  95. package/dist/utils/index.d.ts +26 -59
  96. package/dist/utils/index.js +1 -1
  97. package/package.json +4 -4
  98. package/dist/chunk-LR5CRY5A.js +0 -514
  99. package/dist/chunk-MG3NF7QL.js +0 -63
  100. /package/dist/{chunk-6GUW5GGF.js → chunk-6Z3G4U2R.js} +0 -0
@@ -3,12 +3,12 @@ import { TableSelectionToolbar, SortableHeader } from './chunk-TUMSNGTX.js';
3
3
  import { SubshellNavItem } from './chunk-CEWTOKE7.js';
4
4
  import { SubshellSidebarSection } from './chunk-IIMU5YAJ.js';
5
5
  import { FilterBar } from './chunk-PDHTXPSF.js';
6
- import { CustomModal } from './chunk-GBMNCNHX.js';
7
- import { useDealTasksDue, useDealsLookup, useCreateDealTask, useDealsSummary, useDeleteDeal, usePaginationState, useDeals, useTableSort, sortData, useTableSelection, useDealDetail, useCompany } from './chunk-FMFX4K6E.js';
8
- import { SubshellContentContainer } from './chunk-RX4UWZZR.js';
9
- import { CenteredErrorState, CardHeader, PageTitleCaption, EmptyState, ActivityTimeline } from './chunk-BHR7IV72.js';
6
+ import { CustomModal } from './chunk-KVJ3LFH2.js';
7
+ import { useDealTasksDue, useDealsLookup, useCreateDealTask, useDealsSummary, useDeleteDeal, usePaginationState, useDeals, useTableSort, sortData, useTableSelection, useDealDetail, useCompany } from './chunk-B4FHWKEF.js';
8
+ import { SubshellContentContainer } from './chunk-TKAYX2SP.js';
9
+ import { CenteredErrorState, CardHeader, PageTitleCaption, EmptyState, ActivityTimeline } from './chunk-XUYBOO32.js';
10
10
  import { useRouterContext } from './chunk-Q7DJKLEN.js';
11
- import { PAGE_SIZE_DEFAULT, formatTimeAgo } from './chunk-OD7GWIZS.js';
11
+ import { PAGE_SIZE_DEFAULT, formatTimeAgo } from './chunk-SGXXJE52.js';
12
12
  import { useElevasisServices } from './chunk-IRW7JMQ4.js';
13
13
  import { Box, Stack, Group, Text, Badge, Center, Loader, UnstyledButton, Button, Modal, Title, Select, TextInput, Textarea, Paper, Alert, SimpleGrid, Table, Checkbox, Pagination, ActionIcon, Tabs, Card, Code, Divider, Anchor } from '@mantine/core';
14
14
  import { IconLayoutGrid, IconColumns, IconFileInvoice, IconAddressBook, IconTrophy, IconClockExclamation, IconUser, IconPlus, IconChecklist, IconAlertCircle, IconHistory, IconSearch, IconTargetArrow, IconAlertTriangle, IconArrowLeft, IconFileText, IconTrash, IconX, IconBuilding, IconCheckbox, IconCalendar, IconMail, IconPhone, IconArrowRight, IconNote } from '@tabler/icons-react';
@@ -664,15 +664,10 @@ function CrmOverview({
664
664
  }
665
665
  var crmManifest = {
666
666
  key: "crm",
667
- featureId: "crm",
667
+ featureId: "sales.crm",
668
668
  capabilityIds: ["crm.pipeline.manage"],
669
- sidebar: CrmSidebar,
670
- subshellRoutes: ["/crm"],
671
- navEntry: {
672
- label: "CRM",
673
- icon: IconAddressBook,
674
- link: "/crm"
675
- }
669
+ icon: IconAddressBook,
670
+ sidebar: CrmSidebar
676
671
  };
677
672
 
678
673
  // src/features/crm/pages/shared.ts
@@ -3,8 +3,10 @@ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
3
3
  import { cloneElement } from 'react';
4
4
 
5
5
  // src/components/modal/CustomModal.tsx
6
+ var FULL_SIZE = "80%";
6
7
  var CustomModal = ({ children, opened, onClose, loading, style, size }) => {
7
8
  const canClose = loading === true ? false : true;
9
+ const resolvedSize = size === "full" ? FULL_SIZE : size;
8
10
  return /* @__PURE__ */ jsx(
9
11
  Modal,
10
12
  {
@@ -16,7 +18,7 @@ var CustomModal = ({ children, opened, onClose, loading, style, size }) => {
16
18
  closeOnEscape: canClose,
17
19
  centered: true,
18
20
  style,
19
- size,
21
+ size: resolvedSize,
20
22
  children
21
23
  }
22
24
  );
@@ -0,0 +1,335 @@
1
+ import { useInitialization } from './chunk-DK2HVHCY.js';
2
+ import { useOrganization } from './chunk-DD3CCMCZ.js';
3
+ import { createContext, useMemo, useCallback, useContext } from 'react';
4
+ import { jsx } from 'react/jsx-runtime';
5
+
6
+ function createFeatureAccessHook({
7
+ useInitialization: useInitialization2,
8
+ useOrganization: useOrganization2
9
+ }) {
10
+ return function useFeatureAccess2() {
11
+ const { profile, organizationReady } = useInitialization2();
12
+ const { currentMembership } = useOrganization2();
13
+ const { orgConfig, membershipConfig } = useMemo(() => {
14
+ const organizationConfig = currentMembership?.organization?.config;
15
+ const memberConfig = currentMembership?.config;
16
+ return { orgConfig: organizationConfig, membershipConfig: memberConfig };
17
+ }, [currentMembership]);
18
+ const userConfig = profile?.config;
19
+ const checkFeature = useCallback(
20
+ (featureKey) => {
21
+ if (profile?.is_platform_admin) {
22
+ return { allowed: true, restrictedBy: null };
23
+ }
24
+ const membershipValue = membershipConfig?.features?.[featureKey];
25
+ if (membershipValue === false) return { allowed: false, restrictedBy: "membership" };
26
+ return { allowed: true, restrictedBy: null };
27
+ },
28
+ [profile?.is_platform_admin, membershipConfig]
29
+ );
30
+ const hasFeature = useCallback((featureKey) => checkFeature(featureKey).allowed, [checkFeature]);
31
+ return {
32
+ orgConfig,
33
+ membershipConfig,
34
+ userConfig,
35
+ hasFeature,
36
+ checkFeature,
37
+ isReady: organizationReady
38
+ };
39
+ };
40
+ }
41
+
42
+ // ../core/src/organization-model/helpers.ts
43
+ function defaultPathFor(id) {
44
+ return `/${id.replaceAll(".", "/")}`;
45
+ }
46
+ function parentIdOf(id) {
47
+ const index = id.lastIndexOf(".");
48
+ return index === -1 ? void 0 : id.slice(0, index);
49
+ }
50
+ function findById(features, id) {
51
+ return features.find((feature) => feature.id === id);
52
+ }
53
+ function findByPath(features, path) {
54
+ return features.find((feature) => (feature.path ?? defaultPathFor(feature.id)) === path);
55
+ }
56
+ function childrenOf(features, id) {
57
+ const prefix = `${id}.`;
58
+ return features.filter((feature) => feature.id.startsWith(prefix) && !feature.id.slice(prefix.length).includes("."));
59
+ }
60
+ function topLevel(features) {
61
+ return features.filter((feature) => !feature.id.includes("."));
62
+ }
63
+ function ancestorsOf(features, id) {
64
+ const segments = id.split(".");
65
+ const ids = segments.map((_, index) => segments.slice(0, index + 1).join("."));
66
+ return ids.map((ancestorId) => findById(features, ancestorId)).filter((feature) => Boolean(feature));
67
+ }
68
+ function parentOf(features, id) {
69
+ const parentId = parentIdOf(id);
70
+ return parentId ? findById(features, parentId) : void 0;
71
+ }
72
+ function inheritedValue(features, id, getValue) {
73
+ return ancestorsOf(features, id).slice().reverse().map(getValue).find((value) => value !== void 0);
74
+ }
75
+ function uiPositionFor(features, id) {
76
+ return inheritedValue(features, id, (feature) => feature.uiPosition);
77
+ }
78
+ function requiresAdminFor(features, id) {
79
+ return inheritedValue(features, id, (feature) => feature.requiresAdmin) ?? false;
80
+ }
81
+ function devOnlyFor(features, id) {
82
+ return inheritedValue(features, id, (feature) => feature.devOnly) ?? false;
83
+ }
84
+
85
+ // src/provider/resolvers/RouteResolver.ts
86
+ function normalizeRoutePath(path) {
87
+ const trimmedPath = path.trim();
88
+ if (!trimmedPath || trimmedPath === "/") {
89
+ return "/";
90
+ }
91
+ return trimmedPath.replace(/\/+$/, "") || "/";
92
+ }
93
+ function isRouteMatch(currentPath, route) {
94
+ const normalizedCurrentPath = normalizeRoutePath(currentPath);
95
+ const normalizedRoute = normalizeRoutePath(route);
96
+ return normalizedCurrentPath === normalizedRoute || normalizedCurrentPath.startsWith(`${normalizedRoute}/`);
97
+ }
98
+
99
+ // src/provider/resolvers/NavResolver.ts
100
+ function uniqueIds(ids) {
101
+ return ids ? [...new Set(ids)] : [];
102
+ }
103
+
104
+ // src/provider/validateManifests.ts
105
+ function validateManifests(manifests, organizationModel) {
106
+ if (!organizationModel) {
107
+ return;
108
+ }
109
+ const validFeatureIds = new Set(organizationModel.features.map((f) => f.id));
110
+ const errors = [];
111
+ for (const manifest of manifests) {
112
+ const key = manifest.key;
113
+ if (!validFeatureIds.has(manifest.featureId)) {
114
+ errors.push(
115
+ `Manifest "${key}": featureId "${manifest.featureId}" is not a known feature id. Valid values: ${[...validFeatureIds].sort().join(", ")}`
116
+ );
117
+ }
118
+ }
119
+ if (errors.length > 0) {
120
+ throw new Error(
121
+ `Feature manifest validation failed with ${errors.length} error(s):
122
+ ` + errors.map((e, i) => ` ${i + 1}. ${e}`).join("\n")
123
+ );
124
+ }
125
+ }
126
+ var useFeatureAccess = createFeatureAccessHook({
127
+ useInitialization,
128
+ useOrganization
129
+ });
130
+ var ElevasisFeaturesContext = createContext(null);
131
+ function useElevasisFeatures() {
132
+ const context = useContext(ElevasisFeaturesContext);
133
+ if (!context) {
134
+ throw new Error(
135
+ "useElevasisFeatures must be used within an ElevasisFeaturesProvider. Wrap your app (or the relevant subtree) with <ElevasisFeaturesProvider>."
136
+ );
137
+ }
138
+ return context;
139
+ }
140
+ function useOptionalElevasisFeatures() {
141
+ return useContext(ElevasisFeaturesContext);
142
+ }
143
+ function defaultFeatures(organizationModel) {
144
+ return organizationModel?.features ?? [];
145
+ }
146
+ function featurePath(feature) {
147
+ return feature.path ?? defaultPathFor(feature.id);
148
+ }
149
+ function isOrganizationModelFeatureEnabled(organizationModel, featureId) {
150
+ const feature = organizationModel?.features.find((f) => f.id === featureId);
151
+ return feature?.enabled;
152
+ }
153
+ function resolveFeatureModules(features, isFeatureEnabled) {
154
+ return features.map((feature) => {
155
+ const featureId = feature.featureId;
156
+ return {
157
+ ...feature,
158
+ access: {
159
+ featureId,
160
+ enabled: isFeatureEnabled(featureId)
161
+ },
162
+ semantics: {
163
+ capabilityIds: uniqueIds(feature.capabilityIds ?? [])
164
+ }
165
+ };
166
+ });
167
+ }
168
+ function buildShellFeatures(organizationModel, modules) {
169
+ const iconByFeatureId = new Map(modules.map((module) => [module.featureId, module.icon]));
170
+ return defaultFeatures(organizationModel).map((feature) => ({
171
+ ...feature,
172
+ iconComponent: iconByFeatureId.get(feature.id)
173
+ }));
174
+ }
175
+ function createShellModel(features) {
176
+ return {
177
+ features,
178
+ findByPath: (path) => findByPath(features, normalizeRoutePath(path)),
179
+ findById: (id) => findById(features, id),
180
+ childrenOf: (id) => childrenOf(features, id),
181
+ ancestorsOf: (id) => ancestorsOf(features, id),
182
+ parentOf: (id) => parentOf(features, id),
183
+ topLevel: () => topLevel(features),
184
+ uiPositionFor: (id) => uiPositionFor(features, id),
185
+ requiresAdminFor: (id) => requiresAdminFor(features, id),
186
+ devOnlyFor: (id) => devOnlyFor(features, id)
187
+ };
188
+ }
189
+ function resolveOrganizationGraphFeature(features, shellModel) {
190
+ for (const feature of features) {
191
+ const graphBridge = feature.organizationGraph;
192
+ if (!graphBridge) continue;
193
+ const node = shellModel.findById(graphBridge.featureId);
194
+ return {
195
+ available: Boolean(node),
196
+ featureId: graphBridge.featureId,
197
+ featurePath: node ? featurePath(node) : void 0
198
+ };
199
+ }
200
+ return {
201
+ available: false
202
+ };
203
+ }
204
+ function findMatchingNode(shellModel, currentPath) {
205
+ const normalizedPath = normalizeRoutePath(currentPath);
206
+ const exact = shellModel.findByPath(normalizedPath);
207
+ if (exact) return exact;
208
+ return [...shellModel.features].filter((feature) => {
209
+ const path = normalizeRoutePath(featurePath(feature));
210
+ return path !== "/" && isRouteMatch(normalizedPath, path);
211
+ }).sort((a, b) => featurePath(b).length - featurePath(a).length)[0];
212
+ }
213
+ function ownsNode(module, node) {
214
+ if (!node) return false;
215
+ return node.id === module.featureId || node.id.startsWith(`${module.featureId}.`);
216
+ }
217
+ function resolveRoute(features, shellModel, currentPath, disabledSubsectionPaths) {
218
+ const node = findMatchingNode(shellModel, currentPath);
219
+ const normalizedPath = normalizeRoutePath(currentPath);
220
+ if (disabledSubsectionPaths.some((disabledPath) => isRouteMatch(normalizedPath, disabledPath))) {
221
+ return {
222
+ status: "hidden",
223
+ path: currentPath,
224
+ node
225
+ };
226
+ }
227
+ const feature = features.find((candidate) => ownsNode(candidate, node));
228
+ if (!feature) {
229
+ return {
230
+ status: "unmatched",
231
+ path: currentPath,
232
+ node
233
+ };
234
+ }
235
+ return {
236
+ status: "matched",
237
+ path: currentPath,
238
+ feature,
239
+ node
240
+ };
241
+ }
242
+ function ElevasisFeaturesProvider({
243
+ features,
244
+ organizationModel,
245
+ timeRange,
246
+ operationsApiUrl,
247
+ operationsSSEManager,
248
+ deliveryApiUrl,
249
+ deliverySSEManager,
250
+ disabledSubsectionPaths = [],
251
+ children
252
+ }) {
253
+ useMemo(() => validateManifests(features, organizationModel), [features, organizationModel]);
254
+ const { hasFeature } = useFeatureAccess();
255
+ const hasResolvedFeature = useCallback(
256
+ (key) => {
257
+ if (!hasFeature(key)) {
258
+ return false;
259
+ }
260
+ const organizationModelFeatureEnabled = isOrganizationModelFeatureEnabled(organizationModel, key);
261
+ return organizationModelFeatureEnabled ?? true;
262
+ },
263
+ [hasFeature, organizationModel]
264
+ );
265
+ const shellFeatures = useMemo(() => buildShellFeatures(organizationModel, features), [organizationModel, features]);
266
+ const shellModel = useMemo(() => createShellModel(shellFeatures), [shellFeatures]);
267
+ const normalizedDisabledSubsectionPaths = useMemo(
268
+ () => [...new Set(disabledSubsectionPaths.map((path) => normalizeRoutePath(path)))],
269
+ [disabledSubsectionPaths]
270
+ );
271
+ const resolvedFeatures = useMemo(
272
+ () => resolveFeatureModules(features, hasResolvedFeature),
273
+ [features, hasResolvedFeature]
274
+ );
275
+ const enabledResolvedFeatures = useMemo(
276
+ () => resolvedFeatures.filter((feature) => feature.access.enabled),
277
+ [resolvedFeatures]
278
+ );
279
+ const organizationGraph = useMemo(
280
+ () => resolveOrganizationGraphFeature(enabledResolvedFeatures, shellModel),
281
+ [enabledResolvedFeatures, shellModel]
282
+ );
283
+ const getResolvedFeature = useCallback(
284
+ (key) => resolvedFeatures.find((feature) => feature.key === key),
285
+ [resolvedFeatures]
286
+ );
287
+ const isFeatureEnabled = useCallback((key) => hasResolvedFeature(key), [hasResolvedFeature]);
288
+ const resolveRouteByPath = useCallback(
289
+ (path) => resolveRoute(enabledResolvedFeatures, shellModel, path, normalizedDisabledSubsectionPaths),
290
+ [enabledResolvedFeatures, shellModel, normalizedDisabledSubsectionPaths]
291
+ );
292
+ const shellRuntime = useMemo(
293
+ () => ({
294
+ resolveRoute: resolveRouteByPath
295
+ }),
296
+ [resolveRouteByPath]
297
+ );
298
+ const value = useMemo(
299
+ () => ({
300
+ shellModel,
301
+ shellRuntime,
302
+ enabledResolvedFeatures,
303
+ resolvedFeatures,
304
+ organizationGraph,
305
+ organizationModel,
306
+ timeRange,
307
+ operationsApiUrl,
308
+ operationsSSEManager,
309
+ deliveryApiUrl,
310
+ deliverySSEManager,
311
+ disabledSubsectionPaths: normalizedDisabledSubsectionPaths,
312
+ isFeatureEnabled,
313
+ getResolvedFeature
314
+ }),
315
+ [
316
+ shellModel,
317
+ shellRuntime,
318
+ enabledResolvedFeatures,
319
+ resolvedFeatures,
320
+ organizationGraph,
321
+ organizationModel,
322
+ timeRange,
323
+ operationsApiUrl,
324
+ operationsSSEManager,
325
+ deliveryApiUrl,
326
+ deliverySSEManager,
327
+ normalizedDisabledSubsectionPaths,
328
+ isFeatureEnabled,
329
+ getResolvedFeature
330
+ ]
331
+ );
332
+ return /* @__PURE__ */ jsx(ElevasisFeaturesContext.Provider, { value, children });
333
+ }
334
+
335
+ export { ElevasisFeaturesProvider, createFeatureAccessHook, useElevasisFeatures, useOptionalElevasisFeatures };
@@ -1,12 +1,12 @@
1
1
  import { ResourceHealthChart } from './chunk-LGKLC5MG.js';
2
- import { useCyberColors, HeroStatsRow } from './chunk-CTTY6FUT.js';
2
+ import { useCyberColors, HeroStatsRow } from './chunk-TSSKOQBX.js';
3
3
  import { AppShellCenteredContainer, AppShellLoader } from './chunk-M25JL54Z.js';
4
4
  import { STATUS_COLORS, getStatusIcon, formatDuration, getStatusColors, AGENT_CONSTANTS, shouldAnimateEdge, TIMELINE_CONSTANTS, calculateBarPosition, CONTAINER_CONSTANTS, useExecutionPath, useUnifiedWorkflowLayout, WORKFLOW_CONSTANTS, useReactFlowAgent } from './chunk-E4WQGJNS.js';
5
- import { useExecuteResource, useDashboardMetrics, useResources, useTimeRangeDates, useUnresolvedErrors, useRecentExecutionsByResource, useCommandQueue, useScheduledTasks, useResourcesHealth } from './chunk-FMFX4K6E.js';
5
+ import { useExecuteResource, useDashboardMetrics, useResources, useTimeRangeDates, useUnresolvedErrors, useRecentExecutionsByResource, useCommandQueue, useScheduledTasks, useResourcesHealth } from './chunk-B4FHWKEF.js';
6
6
  import { Graph_module_css_default, useDirectedChainHighlighting, useNodeSelection, useFitViewTrigger } from './chunk-22UVE3RA.js';
7
- import { glassBase } from './chunk-Q5HC6ENG.js';
8
- import { GlowDot, CardHeader, EmptyState, PageTitleCaption, TabCountBadge } from './chunk-BHR7IV72.js';
9
- import { formatTimeAgo, getTimeRangeDates, formatRelativeTime } from './chunk-OD7GWIZS.js';
7
+ import { glassBase } from './chunk-XOTJNW4Q.js';
8
+ import { GlowDot, CardHeader, EmptyState, PageTitleCaption, TabCountBadge } from './chunk-XUYBOO32.js';
9
+ import { formatTimeAgo, getTimeRangeDates, formatRelativeTime } from './chunk-SGXXJE52.js';
10
10
  import { ResourceStatusColors } from './chunk-KRWALB24.js';
11
11
  import { useInitialization } from './chunk-DK2HVHCY.js';
12
12
  import { memo, useMemo, useEffect, useState, useCallback, Fragment } from 'react';
@@ -1406,15 +1406,13 @@ function RunResourceButton({
1406
1406
  label,
1407
1407
  icon,
1408
1408
  color,
1409
- organizationModel,
1410
1409
  onSuccess,
1411
1410
  onError
1412
1411
  }) {
1413
1412
  const [modalState, setModalState] = useState(null);
1414
1413
  const { execute, isPending } = useExecuteResource({ resourceId, resourceType });
1415
- const mapping = organizationModel?.resourceMappings?.find((m) => m.resourceId === resourceId);
1416
- const resolvedLabel = label ?? mapping?.label ?? "Run";
1417
- const resolvedColor = color ?? mapping?.color ?? void 0;
1414
+ const resolvedLabel = label ?? "Run";
1415
+ const resolvedColor = color ?? void 0;
1418
1416
  const handleExecute = useCallback(
1419
1417
  async (input) => {
1420
1418
  try {
@@ -4,13 +4,13 @@ import { TableSelectionToolbar, SortableHeader } from './chunk-TUMSNGTX.js';
4
4
  import { SubshellNavItem } from './chunk-CEWTOKE7.js';
5
5
  import { SubshellSidebarSection } from './chunk-IIMU5YAJ.js';
6
6
  import { FilterBar } from './chunk-PDHTXPSF.js';
7
- import { CustomModal } from './chunk-GBMNCNHX.js';
8
- import { useProjectRealtime, useTableSort, sortData, usePaginationState, useTableSelection, useProjectActivities } from './chunk-FMFX4K6E.js';
9
- import { useCreateTask, useCreateMilestone, useProjectMilestones, useUpdateTask, useProjects, useDeleteProject, useProject, useProjectNotes, useUpdateMilestone, useCreateNote, showApiErrorNotification, projectKeys } from './chunk-M7W7CGPL.js';
10
- import { SubshellContentContainer } from './chunk-RX4UWZZR.js';
11
- import { StatusBadge, EmptyState, PageTitleCaption, CenteredErrorState, StatCard, CardHeader } from './chunk-BHR7IV72.js';
7
+ import { CustomModal } from './chunk-KVJ3LFH2.js';
8
+ import { useProjectRealtime, useTableSort, sortData, usePaginationState, useTableSelection, useProjectActivities } from './chunk-B4FHWKEF.js';
9
+ import { useCreateTask, useCreateMilestone, useProjectMilestones, useUpdateTask, useProjects, useDeleteProject, useProject, useProjectNotes, useUpdateMilestone, useCreateNote, showApiErrorNotification, projectKeys } from './chunk-Z6FAH4XV.js';
10
+ import { SubshellContentContainer } from './chunk-TKAYX2SP.js';
11
+ import { StatusBadge, EmptyState, PageTitleCaption, CenteredErrorState, StatCard, CardHeader } from './chunk-XUYBOO32.js';
12
12
  import { useRouterContext } from './chunk-Q7DJKLEN.js';
13
- import { PAGE_SIZE_DEFAULT, formatTimeAgo, formatDate, formatRelativeTime } from './chunk-OD7GWIZS.js';
13
+ import { PAGE_SIZE_DEFAULT, formatTimeAgo, formatDate, formatRelativeTime } from './chunk-SGXXJE52.js';
14
14
  import { useElevasisServices } from './chunk-IRW7JMQ4.js';
15
15
  import { useState, useMemo, useCallback } from 'react';
16
16
  import { Stack, Text, Group, Checkbox, ActionIcon, TextInput, Button, Modal, Title, Textarea, Select, SimpleGrid, Card, ThemeIcon, RingProgress, Paper, Timeline, Badge, Collapse, Center, Loader, Table, Pagination, Alert, CopyButton, Tooltip, Space, Tabs, Divider, Anchor, Chip } from '@mantine/core';
@@ -545,13 +545,8 @@ var deliveryManifest = {
545
545
  key: "delivery",
546
546
  featureId: PROJECTS_FEATURE_ID,
547
547
  capabilityIds: [PROJECTS_VIEW_CAPABILITY_ID],
548
- navEntry: {
549
- label: "Projects",
550
- icon: IconBriefcase,
551
- link: "/projects"
552
- },
553
- sidebar: ProjectsSidebar,
554
- subshellRoutes: ["/projects"]
548
+ icon: IconBriefcase,
549
+ sidebar: ProjectsSidebar
555
550
  };
556
551
  function AllTasksPage() {
557
552
  return /* @__PURE__ */ jsx(SubshellContentContainer, { children: /* @__PURE__ */ jsxs(PageContainer, { children: [
@@ -1102,7 +1097,7 @@ function renderMilestoneBullet(status) {
1102
1097
  function getMilestoneSurfaceStyles(status) {
1103
1098
  const normalizedStatus = status ?? "upcoming";
1104
1099
  const accent = normalizedStatus === "completed" ? "var(--color-primary)" : normalizedStatus === "in_progress" ? "color-mix(in srgb, var(--color-primary) 72%, white)" : "color-mix(in srgb, var(--color-primary) 36%, var(--color-border))";
1105
- const background = normalizedStatus === "completed" ? "var(--color-primary)" : normalizedStatus === "in_progress" ? "linear-gradient(180deg, color-mix(in srgb, var(--color-primary) 3%, transparent) 0%, transparent 100%)" : "linear-gradient(180deg, color-mix(in srgb, var(--color-primary) 1.5%, transparent) 0%, transparent 100%)";
1100
+ const background = normalizedStatus === "completed" ? "linear-gradient(180deg, color-mix(in srgb, var(--color-primary) 1.5%, transparent) 0%, transparent 100%)" : normalizedStatus === "in_progress" ? "linear-gradient(180deg, color-mix(in srgb, var(--color-primary) 3%, transparent) 0%, transparent 100%)" : "linear-gradient(180deg, color-mix(in srgb, var(--color-primary) 1.5%, transparent) 0%, transparent 100%)";
1106
1101
  return {
1107
1102
  accent,
1108
1103
  background
@@ -1487,7 +1482,7 @@ function ProjectDetailPage({ projectId, onBack, backLabel = "Projects" }) {
1487
1482
  {
1488
1483
  fw: 700,
1489
1484
  size: "lg",
1490
- c: milestone.status === "completed" ? "var(--color-background)" : "var(--color-text)",
1485
+ c: "var(--color-text)",
1491
1486
  children: milestone.name
1492
1487
  }
1493
1488
  ),
@@ -1506,15 +1501,7 @@ function ProjectDetailPage({ projectId, onBack, backLabel = "Projects" }) {
1506
1501
  }
1507
1502
  )
1508
1503
  ] }),
1509
- milestone.description && /* @__PURE__ */ jsx(
1510
- Text,
1511
- {
1512
- size: "sm",
1513
- c: milestone.status === "completed" ? "color-mix(in srgb, var(--color-background) 82%, transparent)" : "var(--color-text-dimmed)",
1514
- maw: 900,
1515
- children: milestone.description
1516
- }
1517
- )
1504
+ milestone.description && /* @__PURE__ */ jsx(Text, { size: "sm", c: "var(--color-text-dimmed)", maw: 900, children: milestone.description })
1518
1505
  ] }),
1519
1506
  /* @__PURE__ */ jsxs(Group, { gap: "xs", wrap: "wrap", children: [
1520
1507
  milestone.due_date && /* @__PURE__ */ jsxs(
@@ -1,6 +1,6 @@
1
- import { ApiClientProvider, useApiClient } from './chunk-R7OJCNL3.js';
1
+ import { ApiClientProvider, useApiClient } from './chunk-T6INEVX6.js';
2
2
  import { OrganizationProvider } from './chunk-6IA2OMAE.js';
3
- import { getErrorInfo, getErrorTitle, formatErrorMessage } from './chunk-OD7GWIZS.js';
3
+ import { getErrorInfo, getErrorTitle, formatErrorMessage } from './chunk-SGXXJE52.js';
4
4
  import { InitializationProvider } from './chunk-DK2HVHCY.js';
5
5
  import { useOrganization } from './chunk-DD3CCMCZ.js';
6
6
  import { ProfileProvider } from './chunk-QHSW4WHM.js';
@@ -1,4 +1,4 @@
1
- import { usePresetsContext } from './chunk-Q5HC6ENG.js';
1
+ import { usePresetsContext } from './chunk-XOTJNW4Q.js';
2
2
  import { useMemo } from 'react';
3
3
 
4
4
  var BUILT_IN_NAMES = /* @__PURE__ */ new Set([
@@ -191,126 +191,6 @@ z.object({
191
191
  endDate: z.string().datetime()
192
192
  });
193
193
 
194
- // ../core/src/platform/registry/domains.ts
195
- var DOMAINS = {
196
- // Business domains
197
- INBOUND_PIPELINE: "inbound-pipeline",
198
- LEAD_GEN_PIPELINE: "lead-gen-pipeline",
199
- SUPPORT: "support",
200
- CLIENT_SUPPORT: "client-support",
201
- DELIVERY: "delivery",
202
- OPERATIONS: "operations",
203
- FINANCE: "finance",
204
- EXECUTIVE: "executive",
205
- INSTANTLY: "instantly",
206
- // Technical domains
207
- TESTING: "testing",
208
- INTERNAL: "internal",
209
- INTEGRATION: "integration",
210
- UTILITY: "utility",
211
- DIAGNOSTIC: "diagnostic"
212
- };
213
- var INBOUND_PIPELINE_DOMAIN = {
214
- id: DOMAINS.INBOUND_PIPELINE,
215
- name: "Inbound Pipeline",
216
- description: "End-to-end inbound client acquisition from first reply to onboarding",
217
- color: "blue"
218
- };
219
- var LEAD_GEN_PIPELINE_DOMAIN = {
220
- id: DOMAINS.LEAD_GEN_PIPELINE,
221
- name: "Lead Gen Pipeline",
222
- description: "Lead scraping, enrichment, qualification, and personalization",
223
- color: "cyan"
224
- };
225
- var SUPPORT_DOMAIN = {
226
- id: DOMAINS.SUPPORT,
227
- name: "Customer Support",
228
- description: "Ticket triage, knowledge base, escalations",
229
- color: "green"
230
- };
231
- var CLIENT_SUPPORT_DOMAIN = {
232
- id: DOMAINS.CLIENT_SUPPORT,
233
- name: "Client Support",
234
- description: "Client change requests, bug reports, and feature requests",
235
- color: "teal"
236
- };
237
- var DELIVERY_DOMAIN = {
238
- id: DOMAINS.DELIVERY,
239
- name: "Client Delivery",
240
- description: "Project execution and milestone tracking",
241
- color: "orange"
242
- };
243
- var OPERATIONS_DOMAIN = {
244
- id: DOMAINS.OPERATIONS,
245
- name: "Operations",
246
- description: "Internal business operations and administration",
247
- color: "violet"
248
- };
249
- var FINANCE_DOMAIN = {
250
- id: DOMAINS.FINANCE,
251
- name: "Finance",
252
- description: "Billing, invoicing, and financial operations",
253
- color: "pink"
254
- };
255
- var EXECUTIVE_DOMAIN = {
256
- id: DOMAINS.EXECUTIVE,
257
- name: "Executive Operations",
258
- description: "High-level business orchestration and decision-making",
259
- color: "indigo"
260
- };
261
- var TESTING_DOMAIN = {
262
- id: DOMAINS.TESTING,
263
- name: "Testing",
264
- description: "Test resources and development workflows",
265
- color: "gray"
266
- };
267
- var INTERNAL_DOMAIN = {
268
- id: DOMAINS.INTERNAL,
269
- name: "Internal",
270
- description: "Internal platform resources",
271
- color: "dark"
272
- };
273
- var INTEGRATION_DOMAIN = {
274
- id: DOMAINS.INTEGRATION,
275
- name: "Integration",
276
- description: "External service integrations",
277
- color: "teal"
278
- };
279
- var INSTANTLY_DOMAIN = {
280
- id: DOMAINS.INSTANTLY,
281
- name: "Instantly Toolkit",
282
- description: "Instantly campaign creation, analytics, and optimization",
283
- color: "lime"
284
- };
285
- var UTILITY_DOMAIN = {
286
- id: DOMAINS.UTILITY,
287
- name: "Utility",
288
- description: "Utility workflows for maintenance and diagnostics",
289
- color: "grape"
290
- };
291
- var DIAGNOSTIC_DOMAIN = {
292
- id: DOMAINS.DIAGNOSTIC,
293
- name: "Diagnostic",
294
- description: "Diagnostic workflows for testing integrations and services",
295
- color: "yellow"
296
- };
297
- var DOMAIN_MAP = {
298
- [DOMAINS.INBOUND_PIPELINE]: INBOUND_PIPELINE_DOMAIN,
299
- [DOMAINS.LEAD_GEN_PIPELINE]: LEAD_GEN_PIPELINE_DOMAIN,
300
- [DOMAINS.SUPPORT]: SUPPORT_DOMAIN,
301
- [DOMAINS.CLIENT_SUPPORT]: CLIENT_SUPPORT_DOMAIN,
302
- [DOMAINS.DELIVERY]: DELIVERY_DOMAIN,
303
- [DOMAINS.OPERATIONS]: OPERATIONS_DOMAIN,
304
- [DOMAINS.FINANCE]: FINANCE_DOMAIN,
305
- [DOMAINS.EXECUTIVE]: EXECUTIVE_DOMAIN,
306
- [DOMAINS.TESTING]: TESTING_DOMAIN,
307
- [DOMAINS.INTERNAL]: INTERNAL_DOMAIN,
308
- [DOMAINS.INSTANTLY]: INSTANTLY_DOMAIN,
309
- [DOMAINS.INTEGRATION]: INTEGRATION_DOMAIN,
310
- [DOMAINS.UTILITY]: UTILITY_DOMAIN,
311
- [DOMAINS.DIAGNOSTIC]: DIAGNOSTIC_DOMAIN
312
- };
313
-
314
194
  // ../core/src/platform/registry/command-view.ts
315
195
  function getNodeId(node) {
316
196
  return node.resourceId;
@@ -504,4 +384,4 @@ function setupBrowserMocks() {
504
384
  setupResizeObserver();
505
385
  }
506
386
 
507
- export { APIClientError, API_URL, CredentialNameSchema, DEBOUNCE_FILTER, DEBOUNCE_SLIDER, DOMAIN_MAP, GC_TIME_LONG, GC_TIME_MEDIUM, GC_TIME_SHORT, LIMIT_ACTIVITY_FEED, NonEmptyStringSchema, OAUTH_FLOW_TIMEOUT, OAUTH_POPUP_CHECK_INTERVAL, 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, STALE_TIME_ADMIN, STALE_TIME_DEFAULT, STALE_TIME_MONITORING, UuidSchema, WS_MAX_RETRIES_BEFORE_ERROR, WS_RECONNECT_BASE_DELAY, WS_RECONNECT_MAX_DELAY, debounce, formatBucketTime, formatChartAxisDate, formatDate, formatDateTime, formatErrorMessage, formatRelativeTime, formatTimeAgo, getErrorInfo, getErrorTitle, getNodeId, getResourceColor, getResourceIcon, getTimeRangeDates, getTimeRangeLabel, isAPIClientError, restoreConsole, setupBrowserMocks, suppressKnownWarnings, validateEmail };
387
+ export { APIClientError, API_URL, CredentialNameSchema, DEBOUNCE_FILTER, DEBOUNCE_SLIDER, GC_TIME_LONG, GC_TIME_MEDIUM, GC_TIME_SHORT, LIMIT_ACTIVITY_FEED, NonEmptyStringSchema, OAUTH_FLOW_TIMEOUT, OAUTH_POPUP_CHECK_INTERVAL, 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, STALE_TIME_ADMIN, STALE_TIME_DEFAULT, STALE_TIME_MONITORING, UuidSchema, WS_MAX_RETRIES_BEFORE_ERROR, WS_RECONNECT_BASE_DELAY, WS_RECONNECT_MAX_DELAY, debounce, formatBucketTime, formatChartAxisDate, formatDate, formatDateTime, formatErrorMessage, formatRelativeTime, formatTimeAgo, getErrorInfo, getErrorTitle, getNodeId, getResourceColor, getResourceIcon, getTimeRangeDates, getTimeRangeLabel, isAPIClientError, restoreConsole, setupBrowserMocks, suppressKnownWarnings, validateEmail };