@elevasis/ui 2.6.0 → 2.8.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.
- package/dist/{chunk-POFDRPDI.js → chunk-4PHPENKX.js} +3044 -1753
- package/dist/chunk-7M2VOCYN.js +1 -0
- package/dist/{chunk-PEDPD3PU.js → chunk-7PDDPNQS.js} +1 -1
- package/dist/{chunk-YIWLA2B6.js → chunk-C2OFFC7J.js} +0 -1
- package/dist/{chunk-ZB5PKIX5.js → chunk-CTWYIRKW.js} +1 -2
- package/dist/{chunk-FH5QGCXL.js → chunk-F5QSLYUB.js} +180 -7
- package/dist/{chunk-CC4WGHGG.js → chunk-KGEYEUR5.js} +1 -3
- package/dist/{chunk-MU5EZV3L.js → chunk-MGEC63TE.js} +5 -6
- package/dist/{chunk-SMJLS23U.js → chunk-NYMKWGKN.js} +18 -1
- package/dist/{chunk-X4BLH3JL.js → chunk-OFT2QK6B.js} +6 -7
- package/dist/{chunk-O4PMRC6J.js → chunk-OPT74SGF.js} +118 -111
- package/dist/{chunk-6RGNVHG3.js → chunk-UX3Q4YYN.js} +21 -13
- package/dist/{chunk-4GZ6VZWO.js → chunk-YCHZ4U5V.js} +10 -2
- package/dist/{chunk-PHRDZFJT.js → chunk-ZZ35VSNF.js} +1 -3
- package/dist/components/index.d.ts +134 -68
- package/dist/components/index.js +34 -25
- package/dist/features/auth/index.d.ts +3 -3
- package/dist/features/auth/index.js +9 -2
- package/dist/features/crm/index.d.ts +61 -5
- package/dist/features/crm/index.js +5 -5
- package/dist/features/dashboard/index.js +5 -5
- package/dist/features/delivery/index.d.ts +64 -4
- package/dist/features/delivery/index.js +5 -5
- package/dist/features/lead-gen/index.d.ts +61 -5
- package/dist/features/lead-gen/index.js +8 -8
- package/dist/features/monitoring/index.d.ts +20 -1
- package/dist/features/monitoring/index.js +6 -6
- package/dist/features/operations/index.d.ts +20 -1
- package/dist/features/operations/index.js +7 -7
- package/dist/features/seo/index.d.ts +20 -1
- package/dist/features/seo/index.js +1 -1
- package/dist/features/settings/index.d.ts +22 -2
- package/dist/features/settings/index.js +5 -5
- package/dist/hooks/index.d.ts +7735 -7719
- package/dist/hooks/index.js +4 -4
- package/dist/hooks/published.d.ts +3495 -48
- package/dist/hooks/published.js +3 -3
- package/dist/index.d.ts +1188 -989
- package/dist/index.js +4 -4
- package/dist/initialization/index.d.ts +2 -1
- package/dist/layout/index.d.ts +60 -2
- package/dist/layout/index.js +1 -1
- package/dist/organization/index.d.ts +2 -1
- package/dist/provider/index.d.ts +203 -20
- package/dist/provider/index.js +2 -2
- package/dist/provider/published.d.ts +194 -19
- package/dist/provider/published.js +1 -1
- package/dist/types/index.d.ts +2 -1
- package/package.json +58 -86
- package/dist/chunk-DQJM7T2N.js +0 -1303
|
@@ -125,11 +125,14 @@ function OrgServiceBridge({
|
|
|
125
125
|
const isReady = !!currentWorkOSOrganizationId && !isInitializing && !isOrgRefreshing;
|
|
126
126
|
return /* @__PURE__ */ jsx(ElevasisServiceProvider, { apiRequest, organizationId: currentWorkOSOrganizationId, isReady, children: /* @__PURE__ */ jsx(NotificationProvider, { adapter: notifications, children: /* @__PURE__ */ jsx(InitializationProvider, { children }) }) });
|
|
127
127
|
}
|
|
128
|
+
|
|
129
|
+
// src/hooks/feature-access/aliases.ts
|
|
128
130
|
var FEATURE_KEY_ALIASES = {
|
|
129
131
|
crm: "acquisition",
|
|
130
|
-
"lead-gen": "acquisition"
|
|
132
|
+
"lead-gen": "acquisition",
|
|
133
|
+
projects: "delivery"
|
|
131
134
|
};
|
|
132
|
-
function
|
|
135
|
+
function createFeatureAccessHook({
|
|
133
136
|
useInitialization: useInitialization2,
|
|
134
137
|
useOrganization: useOrganization2
|
|
135
138
|
}) {
|
|
@@ -166,7 +169,82 @@ function createUseFeatureAccess({
|
|
|
166
169
|
};
|
|
167
170
|
};
|
|
168
171
|
}
|
|
169
|
-
var
|
|
172
|
+
var createUseFeatureAccess = createFeatureAccessHook;
|
|
173
|
+
|
|
174
|
+
// src/provider/resolvers/RouteResolver.ts
|
|
175
|
+
function normalizeRoutePath(path) {
|
|
176
|
+
const trimmedPath = path.trim();
|
|
177
|
+
if (!trimmedPath || trimmedPath === "/") {
|
|
178
|
+
return "/";
|
|
179
|
+
}
|
|
180
|
+
return trimmedPath.replace(/\/+$/, "") || "/";
|
|
181
|
+
}
|
|
182
|
+
function isRouteMatch(currentPath, route) {
|
|
183
|
+
const normalizedCurrentPath = normalizeRoutePath(currentPath);
|
|
184
|
+
const normalizedRoute = normalizeRoutePath(route);
|
|
185
|
+
return normalizedCurrentPath === normalizedRoute || normalizedCurrentPath.startsWith(`${normalizedRoute}/`);
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
// src/provider/resolvers/NavResolver.ts
|
|
189
|
+
function uniqueIds(ids) {
|
|
190
|
+
return ids ? [...new Set(ids)] : [];
|
|
191
|
+
}
|
|
192
|
+
function collectNavLinkPaths(links) {
|
|
193
|
+
if (!links?.length) {
|
|
194
|
+
return [];
|
|
195
|
+
}
|
|
196
|
+
return links.flatMap((link) => [link.link, ...collectNavLinkPaths(link.links)]);
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
// src/provider/validateManifests.ts
|
|
200
|
+
function validateManifests(manifests, organizationModel) {
|
|
201
|
+
if (!organizationModel) {
|
|
202
|
+
return;
|
|
203
|
+
}
|
|
204
|
+
const validFeatureKeys = new Set(Object.keys(organizationModel.features.enabled));
|
|
205
|
+
const validDomainIds = new Set(organizationModel.domains.map((d) => d.id));
|
|
206
|
+
const validCapabilityIds = /* @__PURE__ */ new Set([
|
|
207
|
+
...organizationModel.domains.flatMap((d) => d.capabilityIds),
|
|
208
|
+
...organizationModel.navigation.surfaces.flatMap((s) => s.capabilityIds),
|
|
209
|
+
...organizationModel.resourceMappings.flatMap((r) => r.capabilityIds)
|
|
210
|
+
]);
|
|
211
|
+
const errors = [];
|
|
212
|
+
for (const manifest of manifests) {
|
|
213
|
+
const key = manifest.key;
|
|
214
|
+
if (!validFeatureKeys.has(manifest.accessFeatureKey)) {
|
|
215
|
+
errors.push(
|
|
216
|
+
`Manifest "${key}": accessFeatureKey "${manifest.accessFeatureKey}" is not a known feature key. Valid values: ${[...validFeatureKeys].sort().join(", ")}`
|
|
217
|
+
);
|
|
218
|
+
}
|
|
219
|
+
if (manifest.domainIds) {
|
|
220
|
+
for (let i = 0; i < manifest.domainIds.length; i++) {
|
|
221
|
+
const domainId = manifest.domainIds[i];
|
|
222
|
+
if (!validDomainIds.has(domainId)) {
|
|
223
|
+
errors.push(
|
|
224
|
+
`Manifest "${key}": domainIds[${i}] references unknown domain "${domainId}". Valid domains: ${[...validDomainIds].sort().join(", ")}`
|
|
225
|
+
);
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
if (manifest.capabilityIds) {
|
|
230
|
+
for (let i = 0; i < manifest.capabilityIds.length; i++) {
|
|
231
|
+
const capabilityId = manifest.capabilityIds[i];
|
|
232
|
+
if (!validCapabilityIds.has(capabilityId)) {
|
|
233
|
+
errors.push(
|
|
234
|
+
`Manifest "${key}": capabilityIds[${i}] references unknown capability "${capabilityId}". Valid capabilities: ${[...validCapabilityIds].sort().join(", ")}`
|
|
235
|
+
);
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
if (errors.length > 0) {
|
|
241
|
+
throw new Error(
|
|
242
|
+
`Feature manifest validation failed with ${errors.length} error(s):
|
|
243
|
+
` + errors.map((e, i) => ` ${i + 1}. ${e}`).join("\n")
|
|
244
|
+
);
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
var useFeatureAccess = createFeatureAccessHook({
|
|
170
248
|
useInitialization,
|
|
171
249
|
useOrganization
|
|
172
250
|
});
|
|
@@ -183,21 +261,6 @@ function useElevasisFeatures() {
|
|
|
183
261
|
function useOptionalElevasisFeatures() {
|
|
184
262
|
return useContext(ElevasisFeaturesContext);
|
|
185
263
|
}
|
|
186
|
-
function normalizeRoutePath(path) {
|
|
187
|
-
const trimmedPath = path.trim();
|
|
188
|
-
if (!trimmedPath || trimmedPath === "/") {
|
|
189
|
-
return "/";
|
|
190
|
-
}
|
|
191
|
-
return trimmedPath.replace(/\/+$/, "") || "/";
|
|
192
|
-
}
|
|
193
|
-
function isRouteMatch(currentPath, route) {
|
|
194
|
-
const normalizedCurrentPath = normalizeRoutePath(currentPath);
|
|
195
|
-
const normalizedRoute = normalizeRoutePath(route);
|
|
196
|
-
return normalizedCurrentPath === normalizedRoute || normalizedCurrentPath.startsWith(`${normalizedRoute}/`);
|
|
197
|
-
}
|
|
198
|
-
function uniqueIds(ids) {
|
|
199
|
-
return ids ? [...new Set(ids)] : [];
|
|
200
|
-
}
|
|
201
264
|
function hasOrganizationModelFeatureKey(organizationModel, key) {
|
|
202
265
|
if (!organizationModel) {
|
|
203
266
|
return false;
|
|
@@ -209,9 +272,7 @@ function findSurfaceByPath(organizationModel, path) {
|
|
|
209
272
|
return void 0;
|
|
210
273
|
}
|
|
211
274
|
const normalizedPath = normalizeRoutePath(path);
|
|
212
|
-
return organizationModel.navigation.surfaces.find(
|
|
213
|
-
(surface) => normalizeRoutePath(surface.path) === normalizedPath
|
|
214
|
-
);
|
|
275
|
+
return organizationModel.navigation.surfaces.find((surface) => normalizeRoutePath(surface.path) === normalizedPath);
|
|
215
276
|
}
|
|
216
277
|
function findSurfaceById(organizationModel, id) {
|
|
217
278
|
if (!organizationModel) {
|
|
@@ -246,12 +307,6 @@ function isOrganizationModelFeatureEnabled(organizationModel, key) {
|
|
|
246
307
|
}
|
|
247
308
|
return organizationModel.features.enabled[key];
|
|
248
309
|
}
|
|
249
|
-
function collectNavLinkPaths(links) {
|
|
250
|
-
if (!links?.length) {
|
|
251
|
-
return [];
|
|
252
|
-
}
|
|
253
|
-
return links.flatMap((link) => [link.link, ...collectNavLinkPaths(link.links)]);
|
|
254
|
-
}
|
|
255
310
|
function resolveOrganizationGraphSurface(features, organizationModel) {
|
|
256
311
|
for (const feature of features) {
|
|
257
312
|
const graphBridge = feature.organizationGraph;
|
|
@@ -301,16 +356,12 @@ function resolveFeatureModule(feature, organizationModel) {
|
|
|
301
356
|
};
|
|
302
357
|
}
|
|
303
358
|
function resolveFeatureSemantics(feature, resolvedFeature, organizationModel) {
|
|
304
|
-
const linkedPaths = [
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
].filter((path) => Boolean(path));
|
|
359
|
+
const linkedPaths = [resolvedFeature.navEntry?.link, ...collectNavLinkPaths(resolvedFeature.navEntry?.links)].filter(
|
|
360
|
+
(path) => Boolean(path)
|
|
361
|
+
);
|
|
308
362
|
const linkedSurfaces = findSurfacesByPaths(organizationModel, linkedPaths);
|
|
309
363
|
const organizationGraphSurface = feature.organizationGraph ? findSurfaceById(organizationModel, feature.organizationGraph.surfaceId) : void 0;
|
|
310
|
-
const surfaces = [
|
|
311
|
-
...linkedSurfaces,
|
|
312
|
-
...organizationGraphSurface ? [organizationGraphSurface] : []
|
|
313
|
-
].filter(
|
|
364
|
+
const surfaces = [...linkedSurfaces, ...organizationGraphSurface ? [organizationGraphSurface] : []].filter(
|
|
314
365
|
(surface, index, items) => Boolean(surface) && items.findIndex((candidate) => candidate.id === surface.id) === index
|
|
315
366
|
);
|
|
316
367
|
return {
|
|
@@ -358,22 +409,29 @@ function filterNavLinks(links, disabledSubsectionPaths, isFeatureEnabled) {
|
|
|
358
409
|
];
|
|
359
410
|
});
|
|
360
411
|
}
|
|
412
|
+
function createShellNavItem(navEntry, placement, source, accessFeatureKey, links = navEntry.links) {
|
|
413
|
+
return {
|
|
414
|
+
...navEntry,
|
|
415
|
+
links,
|
|
416
|
+
placement,
|
|
417
|
+
source,
|
|
418
|
+
accessFeatureKey
|
|
419
|
+
};
|
|
420
|
+
}
|
|
421
|
+
function createFeatureShellNavItem(feature, links = feature.navEntry?.links) {
|
|
422
|
+
if (!feature.navEntry) {
|
|
423
|
+
return void 0;
|
|
424
|
+
}
|
|
425
|
+
return createShellNavItem(feature.navEntry, "primary", "feature", feature.access.featureKey, links);
|
|
426
|
+
}
|
|
361
427
|
function getFeatureNavItems(features, disabledSubsectionPaths, isFeatureEnabled) {
|
|
362
428
|
return features.flatMap((feature) => {
|
|
363
429
|
if (!feature.navEntry) {
|
|
364
430
|
return [];
|
|
365
431
|
}
|
|
366
432
|
const links = feature.navEntry.links?.length ? filterNavLinks(feature.navEntry.links, disabledSubsectionPaths, isFeatureEnabled) : void 0;
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
...feature.navEntry,
|
|
370
|
-
links,
|
|
371
|
-
placement: "primary",
|
|
372
|
-
source: "feature",
|
|
373
|
-
shellModuleKey: feature.key,
|
|
374
|
-
accessFeatureKey: feature.access.featureKey
|
|
375
|
-
}
|
|
376
|
-
];
|
|
433
|
+
const navItem = createFeatureShellNavItem(feature, links);
|
|
434
|
+
return navItem ? [navItem] : [];
|
|
377
435
|
});
|
|
378
436
|
}
|
|
379
437
|
function resolveAppShellOverrides(appShellOverrides, organizationModel) {
|
|
@@ -381,12 +439,8 @@ function resolveAppShellOverrides(appShellOverrides, organizationModel) {
|
|
|
381
439
|
return {};
|
|
382
440
|
}
|
|
383
441
|
return {
|
|
384
|
-
primaryNavItems: appShellOverrides.primaryNavItems?.map(
|
|
385
|
-
|
|
386
|
-
),
|
|
387
|
-
bottomNavItems: appShellOverrides.bottomNavItems?.map(
|
|
388
|
-
(navItem) => resolveNavEntry(navItem, organizationModel)
|
|
389
|
-
)
|
|
442
|
+
primaryNavItems: appShellOverrides.primaryNavItems?.map((navItem) => resolveNavEntry(navItem, organizationModel)),
|
|
443
|
+
bottomNavItems: appShellOverrides.bottomNavItems?.map((navItem) => resolveNavEntry(navItem, organizationModel))
|
|
390
444
|
};
|
|
391
445
|
}
|
|
392
446
|
function getAppShellNavItems(navItems, placement, disabledSubsectionPaths, isFeatureEnabled) {
|
|
@@ -401,15 +455,7 @@ function getAppShellNavItems(navItems, placement, disabledSubsectionPaths, isFea
|
|
|
401
455
|
if (navItem.links && !links?.length && !navItem.link) {
|
|
402
456
|
return [];
|
|
403
457
|
}
|
|
404
|
-
return [
|
|
405
|
-
{
|
|
406
|
-
...navItem,
|
|
407
|
-
links,
|
|
408
|
-
placement,
|
|
409
|
-
source: "app",
|
|
410
|
-
accessFeatureKey: navItem.featureKey
|
|
411
|
-
}
|
|
412
|
-
];
|
|
458
|
+
return [createShellNavItem(navItem, placement, "app", navItem.featureKey, links)];
|
|
413
459
|
});
|
|
414
460
|
}
|
|
415
461
|
function findMatchingNavLink(links, currentPath) {
|
|
@@ -446,13 +492,7 @@ function resolveRoute(features, currentPath, disabledSubsectionPaths, isFeatureE
|
|
|
446
492
|
status: "hidden",
|
|
447
493
|
path: currentPath,
|
|
448
494
|
feature,
|
|
449
|
-
navItem: feature
|
|
450
|
-
...feature.navEntry,
|
|
451
|
-
placement: "primary",
|
|
452
|
-
source: "feature",
|
|
453
|
-
shellModuleKey: feature.key,
|
|
454
|
-
accessFeatureKey: feature.access.featureKey
|
|
455
|
-
} : void 0,
|
|
495
|
+
navItem: createFeatureShellNavItem(feature),
|
|
456
496
|
navLink: matchedLink
|
|
457
497
|
};
|
|
458
498
|
}
|
|
@@ -460,13 +500,7 @@ function resolveRoute(features, currentPath, disabledSubsectionPaths, isFeatureE
|
|
|
460
500
|
status: "matched",
|
|
461
501
|
path: currentPath,
|
|
462
502
|
feature,
|
|
463
|
-
navItem: feature
|
|
464
|
-
...feature.navEntry,
|
|
465
|
-
placement: "primary",
|
|
466
|
-
source: "feature",
|
|
467
|
-
shellModuleKey: feature.key,
|
|
468
|
-
accessFeatureKey: feature.access.featureKey
|
|
469
|
-
} : void 0,
|
|
503
|
+
navItem: createFeatureShellNavItem(feature),
|
|
470
504
|
navLink: matchedLink ?? void 0
|
|
471
505
|
};
|
|
472
506
|
}
|
|
@@ -485,16 +519,14 @@ function ElevasisFeaturesProvider({
|
|
|
485
519
|
disabledSubsectionPaths = [],
|
|
486
520
|
children
|
|
487
521
|
}) {
|
|
522
|
+
useMemo(() => validateManifests(features, organizationModel), [features, organizationModel]);
|
|
488
523
|
const { hasFeature } = useFeatureAccess();
|
|
489
524
|
const hasResolvedFeature = useCallback(
|
|
490
525
|
(key) => {
|
|
491
526
|
if (!hasFeature(key)) {
|
|
492
527
|
return false;
|
|
493
528
|
}
|
|
494
|
-
const organizationModelFeatureEnabled = isOrganizationModelFeatureEnabled(
|
|
495
|
-
organizationModel,
|
|
496
|
-
key
|
|
497
|
-
);
|
|
529
|
+
const organizationModelFeatureEnabled = isOrganizationModelFeatureEnabled(organizationModel, key);
|
|
498
530
|
if (organizationModelFeatureEnabled === void 0) {
|
|
499
531
|
return true;
|
|
500
532
|
}
|
|
@@ -519,11 +551,7 @@ function ElevasisFeaturesProvider({
|
|
|
519
551
|
[resolvedFeatures]
|
|
520
552
|
);
|
|
521
553
|
const featureNavItems = useMemo(
|
|
522
|
-
() => getFeatureNavItems(
|
|
523
|
-
enabledResolvedFeatures,
|
|
524
|
-
normalizedDisabledSubsectionPaths,
|
|
525
|
-
hasResolvedFeature
|
|
526
|
-
),
|
|
554
|
+
() => getFeatureNavItems(enabledResolvedFeatures, normalizedDisabledSubsectionPaths, hasResolvedFeature),
|
|
527
555
|
[enabledResolvedFeatures, normalizedDisabledSubsectionPaths, hasResolvedFeature]
|
|
528
556
|
);
|
|
529
557
|
const primaryNavItems = useMemo(
|
|
@@ -536,12 +564,7 @@ function ElevasisFeaturesProvider({
|
|
|
536
564
|
),
|
|
537
565
|
...featureNavItems
|
|
538
566
|
],
|
|
539
|
-
[
|
|
540
|
-
resolvedAppShellOverrides.primaryNavItems,
|
|
541
|
-
normalizedDisabledSubsectionPaths,
|
|
542
|
-
hasResolvedFeature,
|
|
543
|
-
featureNavItems
|
|
544
|
-
]
|
|
567
|
+
[resolvedAppShellOverrides.primaryNavItems, normalizedDisabledSubsectionPaths, hasResolvedFeature, featureNavItems]
|
|
545
568
|
);
|
|
546
569
|
const bottomNavItems = useMemo(
|
|
547
570
|
() => getAppShellNavItems(
|
|
@@ -550,16 +573,9 @@ function ElevasisFeaturesProvider({
|
|
|
550
573
|
normalizedDisabledSubsectionPaths,
|
|
551
574
|
hasResolvedFeature
|
|
552
575
|
),
|
|
553
|
-
[
|
|
554
|
-
resolvedAppShellOverrides.bottomNavItems,
|
|
555
|
-
normalizedDisabledSubsectionPaths,
|
|
556
|
-
hasResolvedFeature
|
|
557
|
-
]
|
|
558
|
-
);
|
|
559
|
-
const shellNavItems = useMemo(
|
|
560
|
-
() => [...primaryNavItems, ...bottomNavItems],
|
|
561
|
-
[primaryNavItems, bottomNavItems]
|
|
576
|
+
[resolvedAppShellOverrides.bottomNavItems, normalizedDisabledSubsectionPaths, hasResolvedFeature]
|
|
562
577
|
);
|
|
578
|
+
const shellNavItems = useMemo(() => [...primaryNavItems, ...bottomNavItems], [primaryNavItems, bottomNavItems]);
|
|
563
579
|
const shellModel = useMemo(
|
|
564
580
|
() => ({
|
|
565
581
|
navItems: shellNavItems
|
|
@@ -574,25 +590,16 @@ function ElevasisFeaturesProvider({
|
|
|
574
590
|
(key) => resolvedFeatures.find((feature) => feature.key === key),
|
|
575
591
|
[resolvedFeatures]
|
|
576
592
|
);
|
|
577
|
-
const isFeatureEnabled = useCallback(
|
|
578
|
-
(key) => hasResolvedFeature(key),
|
|
579
|
-
[hasResolvedFeature]
|
|
580
|
-
);
|
|
593
|
+
const isFeatureEnabled = useCallback((key) => hasResolvedFeature(key), [hasResolvedFeature]);
|
|
581
594
|
const resolveRouteByPath = useCallback(
|
|
582
|
-
(path) => resolveRoute(
|
|
583
|
-
enabledResolvedFeatures,
|
|
584
|
-
path,
|
|
585
|
-
normalizedDisabledSubsectionPaths,
|
|
586
|
-
isFeatureEnabled
|
|
587
|
-
),
|
|
595
|
+
(path) => resolveRoute(enabledResolvedFeatures, path, normalizedDisabledSubsectionPaths, isFeatureEnabled),
|
|
588
596
|
[enabledResolvedFeatures, normalizedDisabledSubsectionPaths, isFeatureEnabled]
|
|
589
597
|
);
|
|
590
598
|
const shellRuntime = useMemo(
|
|
591
599
|
() => ({
|
|
592
|
-
shellModel,
|
|
593
600
|
resolveRoute: resolveRouteByPath
|
|
594
601
|
}),
|
|
595
|
-
[
|
|
602
|
+
[resolveRouteByPath]
|
|
596
603
|
);
|
|
597
604
|
const value = useMemo(
|
|
598
605
|
() => ({
|
|
@@ -643,4 +650,4 @@ function FeatureShell({ children }) {
|
|
|
643
650
|
] });
|
|
644
651
|
}
|
|
645
652
|
|
|
646
|
-
export { ElevasisCoreProvider, ElevasisFeaturesProvider, FeatureShell, NotificationProvider, createUseFeatureAccess, useElevasisFeatures, useNotificationAdapter, useOptionalElevasisFeatures };
|
|
653
|
+
export { ElevasisCoreProvider, ElevasisFeaturesProvider, FEATURE_KEY_ALIASES, FeatureShell, NotificationProvider, createFeatureAccessHook, createUseFeatureAccess, useElevasisFeatures, useNotificationAdapter, useOptionalElevasisFeatures };
|
|
@@ -3,14 +3,13 @@ import { PageContainer } from './chunk-BZZCNLT6.js';
|
|
|
3
3
|
import { SubshellSidebarSection, SubshellNavItem } from './chunk-27COZ5AH.js';
|
|
4
4
|
import { FilterBar } from './chunk-PDHTXPSF.js';
|
|
5
5
|
import { CustomModal } from './chunk-GBMNCNHX.js';
|
|
6
|
-
import { useProjects,
|
|
7
|
-
import { useDeleteProject, useTableSort, sortData, usePaginationState, useTableSelection } from './chunk-POFDRPDI.js';
|
|
6
|
+
import { useProjects, useDeleteProject, useTableSort, sortData, usePaginationState, useTableSelection, useProject, useProjectNotes, useDeleteProject2, useUpdateMilestone, useCreateNote } from './chunk-4PHPENKX.js';
|
|
8
7
|
import { SubshellContentContainer } from './chunk-RX4UWZZR.js';
|
|
9
8
|
import { StatusBadge, EmptyState, PageTitleCaption, CenteredErrorState, StatCard } from './chunk-Y3D3WFJG.js';
|
|
10
9
|
import { PAGE_SIZE_DEFAULT, formatTimeAgo, formatDate } from './chunk-IOKL7BKE.js';
|
|
11
10
|
import { useRouterContext } from './chunk-Q7DJKLEN.js';
|
|
12
11
|
import { SimpleGrid, Card, Stack, Group, ThemeIcon, Text, RingProgress, Paper, Timeline, Badge, Collapse, ActionIcon, Select, TextInput, Center, Loader, Table, Checkbox, Pagination, Title, Button, Alert, CopyButton, Tooltip, Divider, Tabs, Textarea } from '@mantine/core';
|
|
13
|
-
import { IconBriefcase,
|
|
12
|
+
import { IconNotes, IconBriefcase, IconChecklist, IconFlag, IconHeartbeat, IconFileText, IconCalendar, IconInbox, IconLock, IconAlertTriangle, IconCircleCheck, IconClock, IconChevronDown, IconChevronRight, IconDownload, IconListCheck, IconMessageCircle, IconSearch, IconArrowLeft, IconCheck, IconCopy, IconPlus, IconX } from '@tabler/icons-react';
|
|
14
13
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
15
14
|
import { useState, useMemo } from 'react';
|
|
16
15
|
|
|
@@ -277,13 +276,23 @@ function TaskCard({ task }) {
|
|
|
277
276
|
var ProjectsSidebarTop = () => {
|
|
278
277
|
return /* @__PURE__ */ jsx(SubshellSidebarSection, { icon: IconBriefcase, label: "Projects" });
|
|
279
278
|
};
|
|
280
|
-
var
|
|
281
|
-
|
|
279
|
+
var DELIVERY_PROJECT_ITEMS = [
|
|
280
|
+
{ label: "Projects", to: "/projects", icon: IconBriefcase, exact: true }
|
|
281
|
+
];
|
|
282
|
+
var DELIVERY_WORK_ITEMS = [
|
|
282
283
|
{ label: "Tasks", to: "/projects/tasks", icon: IconChecklist, exact: false },
|
|
283
284
|
{ label: "Milestones", to: "/projects/milestones", icon: IconFlag, exact: false }
|
|
284
285
|
];
|
|
285
|
-
var
|
|
286
|
-
|
|
286
|
+
var DELIVERY_COMMUNICATION_ITEMS = [
|
|
287
|
+
{ label: "Notes", to: "/projects/notes", icon: IconNotes, exact: false }
|
|
288
|
+
];
|
|
289
|
+
var ProjectsSidebarMiddle = ({
|
|
290
|
+
currentPath,
|
|
291
|
+
onNavigate,
|
|
292
|
+
projectItems = DELIVERY_PROJECT_ITEMS,
|
|
293
|
+
workItems = DELIVERY_WORK_ITEMS,
|
|
294
|
+
communicationItems = DELIVERY_COMMUNICATION_ITEMS
|
|
295
|
+
} = {}) => {
|
|
287
296
|
const { currentPath: routerCurrentPath, navigate } = useRouterContext();
|
|
288
297
|
const resolvedCurrentPath = currentPath ?? routerCurrentPath;
|
|
289
298
|
const resolvedNavigate = onNavigate ?? navigate;
|
|
@@ -301,14 +310,14 @@ var ProjectsSidebarMiddle = ({ currentPath, onNavigate } = {}) => {
|
|
|
301
310
|
);
|
|
302
311
|
});
|
|
303
312
|
return /* @__PURE__ */ jsxs(Stack, { gap: 0, style: { flex: 1, overflowY: "auto" }, children: [
|
|
304
|
-
/* @__PURE__ */ jsx(Stack, { gap: 0, p: "sm", children: renderItems(
|
|
313
|
+
/* @__PURE__ */ jsx(Stack, { gap: 0, p: "sm", children: renderItems(projectItems) }),
|
|
305
314
|
/* @__PURE__ */ jsxs(Fragment, { children: [
|
|
306
315
|
/* @__PURE__ */ jsx(SubshellSidebarSection, { icon: IconListCheck, label: "Work", withTopBorder: true }),
|
|
307
|
-
/* @__PURE__ */ jsx(Stack, { gap: 0, p: "sm", children: renderItems(
|
|
316
|
+
/* @__PURE__ */ jsx(Stack, { gap: 0, p: "sm", children: renderItems(workItems) })
|
|
308
317
|
] }),
|
|
309
318
|
/* @__PURE__ */ jsxs(Fragment, { children: [
|
|
310
319
|
/* @__PURE__ */ jsx(SubshellSidebarSection, { icon: IconMessageCircle, label: "Communication", withTopBorder: true }),
|
|
311
|
-
/* @__PURE__ */ jsx(Stack, { gap: 0, p: "sm", children: renderItems(
|
|
320
|
+
/* @__PURE__ */ jsx(Stack, { gap: 0, p: "sm", children: renderItems(communicationItems) })
|
|
312
321
|
] })
|
|
313
322
|
] });
|
|
314
323
|
};
|
|
@@ -320,7 +329,6 @@ var ProjectsSidebar = () => {
|
|
|
320
329
|
};
|
|
321
330
|
var deliveryManifest = {
|
|
322
331
|
key: "delivery",
|
|
323
|
-
label: "Projects",
|
|
324
332
|
accessFeatureKey: "delivery",
|
|
325
333
|
domainIds: ["delivery"],
|
|
326
334
|
capabilityIds: ["delivery.projects.view"],
|
|
@@ -705,7 +713,7 @@ function AddNoteModal({ opened, onClose, projectId }) {
|
|
|
705
713
|
function ProjectDetailPage({ projectId, onBack, backLabel = "Projects" }) {
|
|
706
714
|
const { data: project, isLoading, error } = useProject(projectId);
|
|
707
715
|
const { data: notes } = useProjectNotes({ projectId });
|
|
708
|
-
const { mutate: deleteProject, isPending: isDeleting } =
|
|
716
|
+
const { mutate: deleteProject, isPending: isDeleting } = useDeleteProject2();
|
|
709
717
|
const [addNoteOpen, setAddNoteOpen] = useState(false);
|
|
710
718
|
const [deleteModalOpen, setDeleteModalOpen] = useState(false);
|
|
711
719
|
if (isLoading) {
|
|
@@ -954,4 +962,4 @@ function ProjectDetailPage({ projectId, onBack, backLabel = "Projects" }) {
|
|
|
954
962
|
] }) }) });
|
|
955
963
|
}
|
|
956
964
|
|
|
957
|
-
export { AllTasksPage, HealthStatusCard, MilestoneTimeline, ProjectDetailPage, ProjectsListPage, ProjectsSidebar, ProjectsSidebarMiddle, ProjectsSidebarTop, TaskCard, UpcomingMilestonesPage, calculateProgress, deliveryManifest, formatStatusLabel, milestoneStatusColors, noteTypeColors, projectStatusColors, taskStatusColors, taskTypeColors };
|
|
965
|
+
export { AllTasksPage, DELIVERY_COMMUNICATION_ITEMS, DELIVERY_PROJECT_ITEMS, DELIVERY_WORK_ITEMS, HealthStatusCard, MilestoneTimeline, ProjectDetailPage, ProjectsListPage, ProjectsSidebar, ProjectsSidebarMiddle, ProjectsSidebarTop, TaskCard, UpcomingMilestonesPage, calculateProgress, deliveryManifest, formatStatusLabel, milestoneStatusColors, noteTypeColors, projectStatusColors, taskStatusColors, taskTypeColors };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PRESETS, getPreset, generateShades, mantineThemeOverride, createCssVariablesResolver, PresetsProvider } from './chunk-47YILFON.js';
|
|
2
2
|
import { AppBackground } from './chunk-CYXZHBP4.js';
|
|
3
|
-
import { ElevasisCoreProvider } from './chunk-
|
|
3
|
+
import { ElevasisCoreProvider, ElevasisFeaturesProvider } from './chunk-OPT74SGF.js';
|
|
4
4
|
import { ElevasisLoader } from './chunk-Y3D3WFJG.js';
|
|
5
5
|
import { AppearanceProvider } from './chunk-QJ2KCHKX.js';
|
|
6
6
|
import { getErrorInfo, formatErrorMessage, getErrorTitle } from './chunk-IOKL7BKE.js';
|
|
@@ -91,5 +91,13 @@ function ElevasisUIProvider({ theme, children, ...coreProps }) {
|
|
|
91
91
|
}
|
|
92
92
|
);
|
|
93
93
|
}
|
|
94
|
+
function createTestFeaturesProvider({
|
|
95
|
+
organizationModel,
|
|
96
|
+
features = []
|
|
97
|
+
} = {}) {
|
|
98
|
+
return function TestFeaturesProvider({ children }) {
|
|
99
|
+
return /* @__PURE__ */ jsx(ElevasisFeaturesProvider, { features, organizationModel, children });
|
|
100
|
+
};
|
|
101
|
+
}
|
|
94
102
|
|
|
95
|
-
export { ElevasisUIProvider };
|
|
103
|
+
export { ElevasisUIProvider, createTestFeaturesProvider };
|
|
@@ -3,8 +3,7 @@ import { CustomModal } from './chunk-GBMNCNHX.js';
|
|
|
3
3
|
import { CyberAreaChart, CostTrendChart, ActivityTrendChart } from './chunk-KFICYU6S.js';
|
|
4
4
|
import { AppShellLoader } from './chunk-YEX4MQSY.js';
|
|
5
5
|
import { formatDuration } from './chunk-XA34RETF.js';
|
|
6
|
-
import { useExecutionLogsFilters, useTimeRangeDates, useActivityFilters } from './chunk-
|
|
7
|
-
import { useResolveError, useResolveAllErrors, usePaginationState, useErrorDetails, useMarkAsRead, useExecutionLogs, useExecutionHealth, useErrorAnalysis, useErrorDetail, useResolveErrorsByExecution, useResources, useCostTrends, useCostSummary, useCostByModel, useCostBreakdown, useActivityTrend, useActivities, useNotifications, useMarkAllAsRead, useTestNotification } from './chunk-POFDRPDI.js';
|
|
6
|
+
import { useResolveError, useResolveAllErrors, usePaginationState, useErrorDetails, useMarkAsRead, useExecutionLogsFilters, useExecutionLogs, useExecutionHealth, useErrorAnalysis, useTimeRangeDates, useErrorDetail, useResolveErrorsByExecution, useResources, useCostTrends, useCostSummary, useCostByModel, useCostBreakdown, useActivityFilters, useActivityTrend, useActivities, useNotifications, useMarkAllAsRead, useTestNotification } from './chunk-4PHPENKX.js';
|
|
8
7
|
import { formatBucketTime, getTimeRangeDates } from './chunk-LXHZYSMQ.js';
|
|
9
8
|
import { CenteredErrorState, CardHeader, StatsCardSkeleton, TrendIndicator, DetailCardSkeleton, EmptyState, PageTitleCaption, JsonViewer } from './chunk-Y3D3WFJG.js';
|
|
10
9
|
import { PAGE_SIZE_DEFAULT } from './chunk-IOKL7BKE.js';
|
|
@@ -1790,7 +1789,6 @@ function NotificationCenter({ pageSize = 20 }) {
|
|
|
1790
1789
|
}
|
|
1791
1790
|
var monitoringManifest = {
|
|
1792
1791
|
key: "monitoring",
|
|
1793
|
-
label: "Monitoring",
|
|
1794
1792
|
accessFeatureKey: "monitoring",
|
|
1795
1793
|
navEntry: {
|
|
1796
1794
|
label: "Monitoring",
|