@elevasis/ui 2.6.0 → 2.7.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-CC4WGHGG.js → chunk-6FDGVZFL.js} +2 -2
- package/dist/{chunk-MU5EZV3L.js → chunk-HRIJZKFL.js} +1 -1
- package/dist/{chunk-FH5QGCXL.js → chunk-IFH4L6CR.js} +181 -6
- package/dist/{chunk-4GZ6VZWO.js → chunk-N6GYYWY3.js} +1 -1
- package/dist/{chunk-PHRDZFJT.js → chunk-SBND6P3L.js} +2 -2
- package/dist/{chunk-O4PMRC6J.js → chunk-SPMKW4VO.js} +29 -36
- package/dist/{chunk-X4BLH3JL.js → chunk-T6R3V4GW.js} +2 -2
- package/dist/{chunk-DQJM7T2N.js → chunk-TENLM2GN.js} +2 -2
- package/dist/{chunk-POFDRPDI.js → chunk-V6Z2U6ZV.js} +1 -1
- package/dist/{chunk-PEDPD3PU.js → chunk-VGBMSGYC.js} +1 -1
- package/dist/{chunk-6RGNVHG3.js → chunk-X4HUZINF.js} +2 -2
- package/dist/{chunk-ZB5PKIX5.js → chunk-Z5RHDI7T.js} +2 -2
- package/dist/components/index.d.ts +2 -1
- package/dist/components/index.js +32 -23
- package/dist/features/auth/index.js +9 -2
- package/dist/features/crm/index.js +5 -5
- package/dist/features/dashboard/index.js +5 -5
- package/dist/features/delivery/index.js +5 -5
- package/dist/features/lead-gen/index.js +8 -8
- package/dist/features/monitoring/index.js +6 -6
- package/dist/features/operations/index.js +7 -7
- package/dist/features/settings/index.d.ts +2 -1
- package/dist/features/settings/index.js +5 -5
- package/dist/hooks/index.d.ts +2 -1
- package/dist/hooks/index.js +4 -4
- package/dist/hooks/published.d.ts +2 -1
- package/dist/hooks/published.js +3 -3
- package/dist/index.d.ts +176 -18
- package/dist/index.js +4 -4
- package/dist/initialization/index.d.ts +2 -1
- package/dist/organization/index.d.ts +2 -1
- package/dist/provider/index.d.ts +174 -17
- package/dist/provider/index.js +2 -2
- package/dist/provider/published.d.ts +174 -17
- package/dist/provider/published.js +1 -1
- package/dist/types/index.d.ts +2 -1
- package/package.json +60 -88
package/dist/provider/index.d.ts
CHANGED
|
@@ -311,16 +311,179 @@ declare const SurfaceDefinitionSchema = z.object({
|
|
|
311
311
|
parentId: ModelIdSchema.optional()
|
|
312
312
|
})
|
|
313
313
|
|
|
314
|
-
declare const OrganizationModelSchema =
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
314
|
+
declare const OrganizationModelSchema = OrganizationModelSchemaBase.superRefine((model, ctx) => {
|
|
315
|
+
const domainsById = collectIds(model.domains, ctx, ['domains'], 'Domain')
|
|
316
|
+
const surfacesById = collectIds(model.navigation.surfaces, ctx, ['navigation', 'surfaces'], 'Surface')
|
|
317
|
+
collectIds(model.navigation.groups, ctx, ['navigation', 'groups'], 'Navigation group')
|
|
318
|
+
collectIds(model.resourceMappings, ctx, ['resourceMappings'], 'Resource mapping')
|
|
319
|
+
|
|
320
|
+
const resourceMappingsByResourceId = new Map<string, (typeof model.resourceMappings)[number]>()
|
|
321
|
+
model.resourceMappings.forEach((resourceMapping, index) => {
|
|
322
|
+
if (resourceMappingsByResourceId.has(resourceMapping.resourceId)) {
|
|
323
|
+
addIssue(
|
|
324
|
+
ctx,
|
|
325
|
+
['resourceMappings', index, 'resourceId'],
|
|
326
|
+
`Resource mapping resourceId "${resourceMapping.resourceId}" must be unique`
|
|
327
|
+
)
|
|
328
|
+
return
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
resourceMappingsByResourceId.set(resourceMapping.resourceId, resourceMapping)
|
|
332
|
+
})
|
|
333
|
+
|
|
334
|
+
if (model.navigation.defaultSurfaceId && !surfacesById.has(model.navigation.defaultSurfaceId)) {
|
|
335
|
+
addIssue(
|
|
336
|
+
ctx,
|
|
337
|
+
['navigation', 'defaultSurfaceId'],
|
|
338
|
+
`Default surface "${model.navigation.defaultSurfaceId}" must reference a declared navigation surface`
|
|
339
|
+
)
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
model.navigation.groups.forEach((group, groupIndex) => {
|
|
343
|
+
group.surfaceIds.forEach((surfaceId, surfaceIndex) => {
|
|
344
|
+
if (!surfacesById.has(surfaceId)) {
|
|
345
|
+
addIssue(
|
|
346
|
+
ctx,
|
|
347
|
+
['navigation', 'groups', groupIndex, 'surfaceIds', surfaceIndex],
|
|
348
|
+
`Navigation group "${group.id}" references unknown surface "${surfaceId}"`
|
|
349
|
+
)
|
|
350
|
+
}
|
|
351
|
+
})
|
|
352
|
+
})
|
|
353
|
+
|
|
354
|
+
model.domains.forEach((domain, domainIndex) => {
|
|
355
|
+
domain.surfaceIds.forEach((surfaceId, surfaceIndex) => {
|
|
356
|
+
const surface = surfacesById.get(surfaceId)
|
|
357
|
+
if (!surface) {
|
|
358
|
+
addIssue(
|
|
359
|
+
ctx,
|
|
360
|
+
['domains', domainIndex, 'surfaceIds', surfaceIndex],
|
|
361
|
+
`Domain "${domain.id}" references unknown surface "${surfaceId}"`
|
|
362
|
+
)
|
|
363
|
+
return
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
if (!surface.domainIds.includes(domain.id)) {
|
|
367
|
+
addIssue(
|
|
368
|
+
ctx,
|
|
369
|
+
['domains', domainIndex, 'surfaceIds', surfaceIndex],
|
|
370
|
+
`Domain "${domain.id}" references surface "${surfaceId}" but that surface does not include domain "${domain.id}"`
|
|
371
|
+
)
|
|
372
|
+
}
|
|
373
|
+
})
|
|
374
|
+
|
|
375
|
+
domain.resourceIds.forEach((resourceId, resourceIndex) => {
|
|
376
|
+
const resourceMapping = resourceMappingsByResourceId.get(resourceId)
|
|
377
|
+
if (!resourceMapping) {
|
|
378
|
+
addIssue(
|
|
379
|
+
ctx,
|
|
380
|
+
['domains', domainIndex, 'resourceIds', resourceIndex],
|
|
381
|
+
`Domain "${domain.id}" references unknown resource "${resourceId}"`
|
|
382
|
+
)
|
|
383
|
+
return
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
if (!resourceMapping.domainIds.includes(domain.id)) {
|
|
387
|
+
addIssue(
|
|
388
|
+
ctx,
|
|
389
|
+
['domains', domainIndex, 'resourceIds', resourceIndex],
|
|
390
|
+
`Domain "${domain.id}" references resource "${resourceId}" but that resource mapping does not include domain "${domain.id}"`
|
|
391
|
+
)
|
|
392
|
+
}
|
|
393
|
+
})
|
|
394
|
+
})
|
|
395
|
+
|
|
396
|
+
model.navigation.surfaces.forEach((surface, surfaceIndex) => {
|
|
397
|
+
if (surface.parentId && !surfacesById.has(surface.parentId)) {
|
|
398
|
+
addIssue(
|
|
399
|
+
ctx,
|
|
400
|
+
['navigation', 'surfaces', surfaceIndex, 'parentId'],
|
|
401
|
+
`Surface "${surface.id}" references unknown parent surface "${surface.parentId}"`
|
|
402
|
+
)
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
surface.domainIds.forEach((domainId, domainIndex) => {
|
|
406
|
+
const domain = domainsById.get(domainId)
|
|
407
|
+
if (!domain) {
|
|
408
|
+
addIssue(
|
|
409
|
+
ctx,
|
|
410
|
+
['navigation', 'surfaces', surfaceIndex, 'domainIds', domainIndex],
|
|
411
|
+
`Surface "${surface.id}" references unknown domain "${domainId}"`
|
|
412
|
+
)
|
|
413
|
+
return
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
if (!domain.surfaceIds.includes(surface.id)) {
|
|
417
|
+
addIssue(
|
|
418
|
+
ctx,
|
|
419
|
+
['navigation', 'surfaces', surfaceIndex, 'domainIds', domainIndex],
|
|
420
|
+
`Surface "${surface.id}" references domain "${domainId}" but that domain does not include surface "${surface.id}"`
|
|
421
|
+
)
|
|
422
|
+
}
|
|
423
|
+
})
|
|
424
|
+
|
|
425
|
+
surface.resourceIds.forEach((resourceId, resourceIndex) => {
|
|
426
|
+
const resourceMapping = resourceMappingsByResourceId.get(resourceId)
|
|
427
|
+
if (!resourceMapping) {
|
|
428
|
+
addIssue(
|
|
429
|
+
ctx,
|
|
430
|
+
['navigation', 'surfaces', surfaceIndex, 'resourceIds', resourceIndex],
|
|
431
|
+
`Surface "${surface.id}" references unknown resource "${resourceId}"`
|
|
432
|
+
)
|
|
433
|
+
return
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
if (!resourceMapping.surfaceIds.includes(surface.id)) {
|
|
437
|
+
addIssue(
|
|
438
|
+
ctx,
|
|
439
|
+
['navigation', 'surfaces', surfaceIndex, 'resourceIds', resourceIndex],
|
|
440
|
+
`Surface "${surface.id}" references resource "${resourceId}" but that resource mapping does not include surface "${surface.id}"`
|
|
441
|
+
)
|
|
442
|
+
}
|
|
443
|
+
})
|
|
444
|
+
})
|
|
445
|
+
|
|
446
|
+
model.resourceMappings.forEach((resourceMapping, resourceIndex) => {
|
|
447
|
+
resourceMapping.domainIds.forEach((domainId, domainIndex) => {
|
|
448
|
+
const domain = domainsById.get(domainId)
|
|
449
|
+
if (!domain) {
|
|
450
|
+
addIssue(
|
|
451
|
+
ctx,
|
|
452
|
+
['resourceMappings', resourceIndex, 'domainIds', domainIndex],
|
|
453
|
+
`Resource mapping "${resourceMapping.id}" references unknown domain "${domainId}"`
|
|
454
|
+
)
|
|
455
|
+
return
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
if (!domain.resourceIds.includes(resourceMapping.resourceId)) {
|
|
459
|
+
addIssue(
|
|
460
|
+
ctx,
|
|
461
|
+
['resourceMappings', resourceIndex, 'domainIds', domainIndex],
|
|
462
|
+
`Resource mapping "${resourceMapping.id}" references domain "${domainId}" but that domain does not include resource "${resourceMapping.resourceId}"`
|
|
463
|
+
)
|
|
464
|
+
}
|
|
465
|
+
})
|
|
466
|
+
|
|
467
|
+
resourceMapping.surfaceIds.forEach((surfaceId, surfaceIndex) => {
|
|
468
|
+
const surface = surfacesById.get(surfaceId)
|
|
469
|
+
if (!surface) {
|
|
470
|
+
addIssue(
|
|
471
|
+
ctx,
|
|
472
|
+
['resourceMappings', resourceIndex, 'surfaceIds', surfaceIndex],
|
|
473
|
+
`Resource mapping "${resourceMapping.id}" references unknown surface "${surfaceId}"`
|
|
474
|
+
)
|
|
475
|
+
return
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
if (!surface.resourceIds.includes(resourceMapping.resourceId)) {
|
|
479
|
+
addIssue(
|
|
480
|
+
ctx,
|
|
481
|
+
['resourceMappings', resourceIndex, 'surfaceIds', surfaceIndex],
|
|
482
|
+
`Resource mapping "${resourceMapping.id}" references surface "${surfaceId}" but that surface does not include resource "${resourceMapping.resourceId}"`
|
|
483
|
+
)
|
|
484
|
+
}
|
|
485
|
+
})
|
|
486
|
+
})
|
|
324
487
|
})
|
|
325
488
|
|
|
326
489
|
type OrganizationModel = z.infer<typeof OrganizationModelSchema>
|
|
@@ -385,7 +548,6 @@ interface FeatureModule {
|
|
|
385
548
|
subshellRoutes?: string[];
|
|
386
549
|
organizationGraph?: OrganizationGraphFeatureBridge;
|
|
387
550
|
}
|
|
388
|
-
type ShellModuleDefinition = FeatureModule;
|
|
389
551
|
interface ResolvedFeatureAccess {
|
|
390
552
|
featureKey: string;
|
|
391
553
|
label?: string;
|
|
@@ -406,7 +568,6 @@ type ShellNavSource = 'app' | 'feature';
|
|
|
406
568
|
interface ResolvedShellNavItem extends FeatureNavEntry {
|
|
407
569
|
placement: ShellNavPlacement;
|
|
408
570
|
source: ShellNavSource;
|
|
409
|
-
shellModuleKey?: string;
|
|
410
571
|
accessFeatureKey?: string;
|
|
411
572
|
}
|
|
412
573
|
interface ResolvedShellModel {
|
|
@@ -425,7 +586,6 @@ interface ResolvedShellRouteMatch {
|
|
|
425
586
|
navLink?: FeatureNavLink;
|
|
426
587
|
}
|
|
427
588
|
interface ShellRuntime {
|
|
428
|
-
shellModel: ResolvedShellModel;
|
|
429
589
|
resolveRoute: (path: string) => ResolvedShellRouteMatch;
|
|
430
590
|
}
|
|
431
591
|
interface OrganizationGraphFeatureBridge {
|
|
@@ -438,9 +598,6 @@ interface OrganizationGraphContextValue {
|
|
|
438
598
|
surfaceType?: OrganizationModelSurface['surfaceType'];
|
|
439
599
|
featureKey?: OrganizationModelFeatureKey;
|
|
440
600
|
}
|
|
441
|
-
interface FeatureRegistry {
|
|
442
|
-
features: FeatureModule[];
|
|
443
|
-
}
|
|
444
601
|
interface ElevasisFeaturesProviderProps {
|
|
445
602
|
features: FeatureModule[];
|
|
446
603
|
organizationModel?: OrganizationModel;
|
|
@@ -537,4 +694,4 @@ interface ElevasisUIProviderProps extends Omit<ElevasisCoreProviderProps, 'theme
|
|
|
537
694
|
declare function ElevasisUIProvider({ theme, children, ...coreProps }: ElevasisUIProviderProps): react_jsx_runtime.JSX.Element;
|
|
538
695
|
|
|
539
696
|
export { AppearanceProvider, ElevasisCoreProvider, ElevasisFeaturesProvider, ElevasisServiceProvider, ElevasisUIProvider, FeatureShell, NotificationProvider, useAppearance, useElevasisFeatures, useElevasisServices, useNotificationAdapter, useOptionalElevasisFeatures };
|
|
540
|
-
export type { ApiKeyConfig, AppShellOverrides, AppearanceConfig, AuthConfig, AuthKitConfig, ElevasisCoreProviderProps, ElevasisCoreThemeConfig, ElevasisFeaturesContextValue, ElevasisFeaturesProviderProps, ElevasisServiceContextValue, ElevasisServiceProviderProps, ElevasisThemeConfig, ElevasisTokenOverrides, FeatureModule, FeatureNavEntry, FeatureNavLink,
|
|
697
|
+
export type { ApiKeyConfig, AppShellOverrides, AppearanceConfig, AuthConfig, AuthKitConfig, ElevasisCoreProviderProps, ElevasisCoreThemeConfig, ElevasisFeaturesContextValue, ElevasisFeaturesProviderProps, ElevasisServiceContextValue, ElevasisServiceProviderProps, ElevasisThemeConfig, ElevasisTokenOverrides, FeatureModule, FeatureNavEntry, FeatureNavLink, FeatureSidebarComponent, NotificationAdapter, OrganizationGraphContextValue, OrganizationGraphFeatureBridge, PresetName, ResolvedFeatureAccess, ResolvedFeatureModule, ResolvedFeatureSemantics, ResolvedShellModel, ResolvedShellNavItem, ResolvedShellRouteMatch, ShellNavPlacement, ShellNavSource, ShellRouteMatchStatus, ShellRuntime, WithSchemes };
|
package/dist/provider/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { ElevasisUIProvider } from '../chunk-
|
|
1
|
+
export { ElevasisUIProvider } from '../chunk-N6GYYWY3.js';
|
|
2
2
|
import '../chunk-47YILFON.js';
|
|
3
3
|
import '../chunk-CYXZHBP4.js';
|
|
4
|
-
export { ElevasisCoreProvider, ElevasisFeaturesProvider, FeatureShell, NotificationProvider, useElevasisFeatures, useNotificationAdapter, useOptionalElevasisFeatures } from '../chunk-
|
|
4
|
+
export { ElevasisCoreProvider, ElevasisFeaturesProvider, FeatureShell, NotificationProvider, useElevasisFeatures, useNotificationAdapter, useOptionalElevasisFeatures } from '../chunk-SPMKW4VO.js';
|
|
5
5
|
import '../chunk-RX4UWZZR.js';
|
|
6
6
|
import '../chunk-Y3D3WFJG.js';
|
|
7
7
|
import '../chunk-3KMDHCAR.js';
|
|
@@ -310,16 +310,179 @@ declare const SurfaceDefinitionSchema = z.object({
|
|
|
310
310
|
parentId: ModelIdSchema.optional()
|
|
311
311
|
})
|
|
312
312
|
|
|
313
|
-
declare const OrganizationModelSchema =
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
313
|
+
declare const OrganizationModelSchema = OrganizationModelSchemaBase.superRefine((model, ctx) => {
|
|
314
|
+
const domainsById = collectIds(model.domains, ctx, ['domains'], 'Domain')
|
|
315
|
+
const surfacesById = collectIds(model.navigation.surfaces, ctx, ['navigation', 'surfaces'], 'Surface')
|
|
316
|
+
collectIds(model.navigation.groups, ctx, ['navigation', 'groups'], 'Navigation group')
|
|
317
|
+
collectIds(model.resourceMappings, ctx, ['resourceMappings'], 'Resource mapping')
|
|
318
|
+
|
|
319
|
+
const resourceMappingsByResourceId = new Map<string, (typeof model.resourceMappings)[number]>()
|
|
320
|
+
model.resourceMappings.forEach((resourceMapping, index) => {
|
|
321
|
+
if (resourceMappingsByResourceId.has(resourceMapping.resourceId)) {
|
|
322
|
+
addIssue(
|
|
323
|
+
ctx,
|
|
324
|
+
['resourceMappings', index, 'resourceId'],
|
|
325
|
+
`Resource mapping resourceId "${resourceMapping.resourceId}" must be unique`
|
|
326
|
+
)
|
|
327
|
+
return
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
resourceMappingsByResourceId.set(resourceMapping.resourceId, resourceMapping)
|
|
331
|
+
})
|
|
332
|
+
|
|
333
|
+
if (model.navigation.defaultSurfaceId && !surfacesById.has(model.navigation.defaultSurfaceId)) {
|
|
334
|
+
addIssue(
|
|
335
|
+
ctx,
|
|
336
|
+
['navigation', 'defaultSurfaceId'],
|
|
337
|
+
`Default surface "${model.navigation.defaultSurfaceId}" must reference a declared navigation surface`
|
|
338
|
+
)
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
model.navigation.groups.forEach((group, groupIndex) => {
|
|
342
|
+
group.surfaceIds.forEach((surfaceId, surfaceIndex) => {
|
|
343
|
+
if (!surfacesById.has(surfaceId)) {
|
|
344
|
+
addIssue(
|
|
345
|
+
ctx,
|
|
346
|
+
['navigation', 'groups', groupIndex, 'surfaceIds', surfaceIndex],
|
|
347
|
+
`Navigation group "${group.id}" references unknown surface "${surfaceId}"`
|
|
348
|
+
)
|
|
349
|
+
}
|
|
350
|
+
})
|
|
351
|
+
})
|
|
352
|
+
|
|
353
|
+
model.domains.forEach((domain, domainIndex) => {
|
|
354
|
+
domain.surfaceIds.forEach((surfaceId, surfaceIndex) => {
|
|
355
|
+
const surface = surfacesById.get(surfaceId)
|
|
356
|
+
if (!surface) {
|
|
357
|
+
addIssue(
|
|
358
|
+
ctx,
|
|
359
|
+
['domains', domainIndex, 'surfaceIds', surfaceIndex],
|
|
360
|
+
`Domain "${domain.id}" references unknown surface "${surfaceId}"`
|
|
361
|
+
)
|
|
362
|
+
return
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
if (!surface.domainIds.includes(domain.id)) {
|
|
366
|
+
addIssue(
|
|
367
|
+
ctx,
|
|
368
|
+
['domains', domainIndex, 'surfaceIds', surfaceIndex],
|
|
369
|
+
`Domain "${domain.id}" references surface "${surfaceId}" but that surface does not include domain "${domain.id}"`
|
|
370
|
+
)
|
|
371
|
+
}
|
|
372
|
+
})
|
|
373
|
+
|
|
374
|
+
domain.resourceIds.forEach((resourceId, resourceIndex) => {
|
|
375
|
+
const resourceMapping = resourceMappingsByResourceId.get(resourceId)
|
|
376
|
+
if (!resourceMapping) {
|
|
377
|
+
addIssue(
|
|
378
|
+
ctx,
|
|
379
|
+
['domains', domainIndex, 'resourceIds', resourceIndex],
|
|
380
|
+
`Domain "${domain.id}" references unknown resource "${resourceId}"`
|
|
381
|
+
)
|
|
382
|
+
return
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
if (!resourceMapping.domainIds.includes(domain.id)) {
|
|
386
|
+
addIssue(
|
|
387
|
+
ctx,
|
|
388
|
+
['domains', domainIndex, 'resourceIds', resourceIndex],
|
|
389
|
+
`Domain "${domain.id}" references resource "${resourceId}" but that resource mapping does not include domain "${domain.id}"`
|
|
390
|
+
)
|
|
391
|
+
}
|
|
392
|
+
})
|
|
393
|
+
})
|
|
394
|
+
|
|
395
|
+
model.navigation.surfaces.forEach((surface, surfaceIndex) => {
|
|
396
|
+
if (surface.parentId && !surfacesById.has(surface.parentId)) {
|
|
397
|
+
addIssue(
|
|
398
|
+
ctx,
|
|
399
|
+
['navigation', 'surfaces', surfaceIndex, 'parentId'],
|
|
400
|
+
`Surface "${surface.id}" references unknown parent surface "${surface.parentId}"`
|
|
401
|
+
)
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
surface.domainIds.forEach((domainId, domainIndex) => {
|
|
405
|
+
const domain = domainsById.get(domainId)
|
|
406
|
+
if (!domain) {
|
|
407
|
+
addIssue(
|
|
408
|
+
ctx,
|
|
409
|
+
['navigation', 'surfaces', surfaceIndex, 'domainIds', domainIndex],
|
|
410
|
+
`Surface "${surface.id}" references unknown domain "${domainId}"`
|
|
411
|
+
)
|
|
412
|
+
return
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
if (!domain.surfaceIds.includes(surface.id)) {
|
|
416
|
+
addIssue(
|
|
417
|
+
ctx,
|
|
418
|
+
['navigation', 'surfaces', surfaceIndex, 'domainIds', domainIndex],
|
|
419
|
+
`Surface "${surface.id}" references domain "${domainId}" but that domain does not include surface "${surface.id}"`
|
|
420
|
+
)
|
|
421
|
+
}
|
|
422
|
+
})
|
|
423
|
+
|
|
424
|
+
surface.resourceIds.forEach((resourceId, resourceIndex) => {
|
|
425
|
+
const resourceMapping = resourceMappingsByResourceId.get(resourceId)
|
|
426
|
+
if (!resourceMapping) {
|
|
427
|
+
addIssue(
|
|
428
|
+
ctx,
|
|
429
|
+
['navigation', 'surfaces', surfaceIndex, 'resourceIds', resourceIndex],
|
|
430
|
+
`Surface "${surface.id}" references unknown resource "${resourceId}"`
|
|
431
|
+
)
|
|
432
|
+
return
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
if (!resourceMapping.surfaceIds.includes(surface.id)) {
|
|
436
|
+
addIssue(
|
|
437
|
+
ctx,
|
|
438
|
+
['navigation', 'surfaces', surfaceIndex, 'resourceIds', resourceIndex],
|
|
439
|
+
`Surface "${surface.id}" references resource "${resourceId}" but that resource mapping does not include surface "${surface.id}"`
|
|
440
|
+
)
|
|
441
|
+
}
|
|
442
|
+
})
|
|
443
|
+
})
|
|
444
|
+
|
|
445
|
+
model.resourceMappings.forEach((resourceMapping, resourceIndex) => {
|
|
446
|
+
resourceMapping.domainIds.forEach((domainId, domainIndex) => {
|
|
447
|
+
const domain = domainsById.get(domainId)
|
|
448
|
+
if (!domain) {
|
|
449
|
+
addIssue(
|
|
450
|
+
ctx,
|
|
451
|
+
['resourceMappings', resourceIndex, 'domainIds', domainIndex],
|
|
452
|
+
`Resource mapping "${resourceMapping.id}" references unknown domain "${domainId}"`
|
|
453
|
+
)
|
|
454
|
+
return
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
if (!domain.resourceIds.includes(resourceMapping.resourceId)) {
|
|
458
|
+
addIssue(
|
|
459
|
+
ctx,
|
|
460
|
+
['resourceMappings', resourceIndex, 'domainIds', domainIndex],
|
|
461
|
+
`Resource mapping "${resourceMapping.id}" references domain "${domainId}" but that domain does not include resource "${resourceMapping.resourceId}"`
|
|
462
|
+
)
|
|
463
|
+
}
|
|
464
|
+
})
|
|
465
|
+
|
|
466
|
+
resourceMapping.surfaceIds.forEach((surfaceId, surfaceIndex) => {
|
|
467
|
+
const surface = surfacesById.get(surfaceId)
|
|
468
|
+
if (!surface) {
|
|
469
|
+
addIssue(
|
|
470
|
+
ctx,
|
|
471
|
+
['resourceMappings', resourceIndex, 'surfaceIds', surfaceIndex],
|
|
472
|
+
`Resource mapping "${resourceMapping.id}" references unknown surface "${surfaceId}"`
|
|
473
|
+
)
|
|
474
|
+
return
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
if (!surface.resourceIds.includes(resourceMapping.resourceId)) {
|
|
478
|
+
addIssue(
|
|
479
|
+
ctx,
|
|
480
|
+
['resourceMappings', resourceIndex, 'surfaceIds', surfaceIndex],
|
|
481
|
+
`Resource mapping "${resourceMapping.id}" references surface "${surfaceId}" but that surface does not include resource "${resourceMapping.resourceId}"`
|
|
482
|
+
)
|
|
483
|
+
}
|
|
484
|
+
})
|
|
485
|
+
})
|
|
323
486
|
})
|
|
324
487
|
|
|
325
488
|
type OrganizationModel = z.infer<typeof OrganizationModelSchema>
|
|
@@ -384,7 +547,6 @@ interface FeatureModule {
|
|
|
384
547
|
subshellRoutes?: string[];
|
|
385
548
|
organizationGraph?: OrganizationGraphFeatureBridge;
|
|
386
549
|
}
|
|
387
|
-
type ShellModuleDefinition = FeatureModule;
|
|
388
550
|
interface ResolvedFeatureAccess {
|
|
389
551
|
featureKey: string;
|
|
390
552
|
label?: string;
|
|
@@ -405,7 +567,6 @@ type ShellNavSource = 'app' | 'feature';
|
|
|
405
567
|
interface ResolvedShellNavItem extends FeatureNavEntry {
|
|
406
568
|
placement: ShellNavPlacement;
|
|
407
569
|
source: ShellNavSource;
|
|
408
|
-
shellModuleKey?: string;
|
|
409
570
|
accessFeatureKey?: string;
|
|
410
571
|
}
|
|
411
572
|
interface ResolvedShellModel {
|
|
@@ -424,7 +585,6 @@ interface ResolvedShellRouteMatch {
|
|
|
424
585
|
navLink?: FeatureNavLink;
|
|
425
586
|
}
|
|
426
587
|
interface ShellRuntime {
|
|
427
|
-
shellModel: ResolvedShellModel;
|
|
428
588
|
resolveRoute: (path: string) => ResolvedShellRouteMatch;
|
|
429
589
|
}
|
|
430
590
|
interface OrganizationGraphFeatureBridge {
|
|
@@ -437,9 +597,6 @@ interface OrganizationGraphContextValue {
|
|
|
437
597
|
surfaceType?: OrganizationModelSurface['surfaceType'];
|
|
438
598
|
featureKey?: OrganizationModelFeatureKey;
|
|
439
599
|
}
|
|
440
|
-
interface FeatureRegistry {
|
|
441
|
-
features: FeatureModule[];
|
|
442
|
-
}
|
|
443
600
|
interface ElevasisFeaturesProviderProps {
|
|
444
601
|
features: FeatureModule[];
|
|
445
602
|
organizationModel?: OrganizationModel;
|
|
@@ -515,4 +672,4 @@ declare function useElevasisServices(): ElevasisServiceContextValue;
|
|
|
515
672
|
declare function ElevasisServiceProvider({ apiRequest, organizationId, isReady, children }: ElevasisServiceProviderProps): react_jsx_runtime.JSX.Element;
|
|
516
673
|
|
|
517
674
|
export { AppearanceProvider, ElevasisCoreProvider, ElevasisFeaturesProvider, ElevasisServiceProvider, FeatureShell, NotificationProvider, useAppearance, useElevasisFeatures, useElevasisServices, useNotificationAdapter, useOptionalElevasisFeatures };
|
|
518
|
-
export type { ApiKeyConfig, AppShellOverrides, AppearanceConfig, AuthConfig, AuthKitConfig, ElevasisCoreProviderProps, ElevasisCoreThemeConfig, ElevasisFeaturesContextValue, ElevasisFeaturesProviderProps, ElevasisServiceContextValue, ElevasisServiceProviderProps, ElevasisTokenOverrides, FeatureModule, FeatureNavEntry, FeatureNavLink,
|
|
675
|
+
export type { ApiKeyConfig, AppShellOverrides, AppearanceConfig, AuthConfig, AuthKitConfig, ElevasisCoreProviderProps, ElevasisCoreThemeConfig, ElevasisFeaturesContextValue, ElevasisFeaturesProviderProps, ElevasisServiceContextValue, ElevasisServiceProviderProps, ElevasisTokenOverrides, FeatureModule, FeatureNavEntry, FeatureNavLink, FeatureSidebarComponent, NotificationAdapter, OrganizationGraphContextValue, OrganizationGraphFeatureBridge, ResolvedFeatureAccess, ResolvedFeatureModule, ResolvedFeatureSemantics, ResolvedShellModel, ResolvedShellNavItem, ResolvedShellRouteMatch, ShellNavPlacement, ShellNavSource, ShellRouteMatchStatus, ShellRuntime, WithSchemes };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { ElevasisCoreProvider, ElevasisFeaturesProvider, FeatureShell, NotificationProvider, useElevasisFeatures, useNotificationAdapter, useOptionalElevasisFeatures } from '../chunk-
|
|
1
|
+
export { ElevasisCoreProvider, ElevasisFeaturesProvider, FeatureShell, NotificationProvider, useElevasisFeatures, useNotificationAdapter, useOptionalElevasisFeatures } from '../chunk-SPMKW4VO.js';
|
|
2
2
|
import '../chunk-RX4UWZZR.js';
|
|
3
3
|
import '../chunk-Y3D3WFJG.js';
|
|
4
4
|
import '../chunk-3KMDHCAR.js';
|
package/dist/types/index.d.ts
CHANGED
|
@@ -3219,13 +3219,14 @@ interface SessionTokenUsage {
|
|
|
3219
3219
|
/**
|
|
3220
3220
|
* Per-user-per-org config (stored in org_memberships.config)
|
|
3221
3221
|
* Controls which features a specific member can access within their org
|
|
3222
|
-
* Valid feature keys: operations, monitoring, acquisition, calibration, seo
|
|
3222
|
+
* Valid feature keys: operations, monitoring, acquisition, delivery, calibration, seo
|
|
3223
3223
|
*/
|
|
3224
3224
|
interface MembershipFeatureConfig {
|
|
3225
3225
|
features?: {
|
|
3226
3226
|
operations?: boolean;
|
|
3227
3227
|
monitoring?: boolean;
|
|
3228
3228
|
acquisition?: boolean;
|
|
3229
|
+
delivery?: boolean;
|
|
3229
3230
|
calibration?: boolean;
|
|
3230
3231
|
seo?: boolean;
|
|
3231
3232
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elevasis/ui",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.7.0",
|
|
4
4
|
"description": "UI components and platform-aware hooks for building custom frontends on the Elevasis platform",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -144,103 +144,28 @@
|
|
|
144
144
|
"import": "./dist/zustand/index.js"
|
|
145
145
|
}
|
|
146
146
|
},
|
|
147
|
-
"publishConfig": {
|
|
148
|
-
"name": "@elevasis/ui",
|
|
149
|
-
"peerDependencies": {
|
|
150
|
-
"react": "^19.2.0",
|
|
151
|
-
"react-dom": "^19.2.0",
|
|
152
|
-
"@tanstack/react-query": "^5.76.2",
|
|
153
|
-
"@tanstack/react-router": "^1.131.28",
|
|
154
|
-
"zod": "^4.1.0",
|
|
155
|
-
"zustand": "^5.0.5",
|
|
156
|
-
"cytoscape": "^3.33.1",
|
|
157
|
-
"@mantine/core": "8.2.7",
|
|
158
|
-
"@mantine/hooks": "8.2.7",
|
|
159
|
-
"@mantine/charts": "8.2.7",
|
|
160
|
-
"@mantine/notifications": "8.2.7",
|
|
161
|
-
"@mantine/form": "8.2.7",
|
|
162
|
-
"@mantine/tiptap": "8.2.7",
|
|
163
|
-
"@tiptap/extension-link": "^2.11.7",
|
|
164
|
-
"@tiptap/extension-placeholder": "^2.11.7",
|
|
165
|
-
"@tiptap/react": "^2.11.7",
|
|
166
|
-
"@tiptap/starter-kit": "^2.11.7",
|
|
167
|
-
"@tabler/icons-react": "^3.27.0",
|
|
168
|
-
"@xyflow/react": "^12.8.5",
|
|
169
|
-
"recharts": "^3.2.1",
|
|
170
|
-
"date-fns": "^4.1.0"
|
|
171
|
-
},
|
|
172
|
-
"peerDependenciesMeta": {
|
|
173
|
-
"@mantine/core": {
|
|
174
|
-
"optional": true
|
|
175
|
-
},
|
|
176
|
-
"@mantine/hooks": {
|
|
177
|
-
"optional": true
|
|
178
|
-
},
|
|
179
|
-
"@mantine/charts": {
|
|
180
|
-
"optional": true
|
|
181
|
-
},
|
|
182
|
-
"@mantine/notifications": {
|
|
183
|
-
"optional": true
|
|
184
|
-
},
|
|
185
|
-
"@mantine/form": {
|
|
186
|
-
"optional": true
|
|
187
|
-
},
|
|
188
|
-
"@tabler/icons-react": {
|
|
189
|
-
"optional": true
|
|
190
|
-
},
|
|
191
|
-
"@xyflow/react": {
|
|
192
|
-
"optional": true
|
|
193
|
-
},
|
|
194
|
-
"cytoscape": {
|
|
195
|
-
"optional": true
|
|
196
|
-
},
|
|
197
|
-
"recharts": {
|
|
198
|
-
"optional": true
|
|
199
|
-
},
|
|
200
|
-
"date-fns": {
|
|
201
|
-
"optional": true
|
|
202
|
-
},
|
|
203
|
-
"@mantine/tiptap": {
|
|
204
|
-
"optional": true
|
|
205
|
-
},
|
|
206
|
-
"@tiptap/extension-link": {
|
|
207
|
-
"optional": true
|
|
208
|
-
},
|
|
209
|
-
"@tiptap/extension-placeholder": {
|
|
210
|
-
"optional": true
|
|
211
|
-
},
|
|
212
|
-
"@tiptap/react": {
|
|
213
|
-
"optional": true
|
|
214
|
-
},
|
|
215
|
-
"@tiptap/starter-kit": {
|
|
216
|
-
"optional": true
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
},
|
|
220
147
|
"peerDependencies": {
|
|
221
|
-
"
|
|
148
|
+
"react": "^19.2.0",
|
|
149
|
+
"react-dom": "^19.2.0",
|
|
150
|
+
"@tanstack/react-query": "^5.76.2",
|
|
151
|
+
"@tanstack/react-router": "^1.131.28",
|
|
152
|
+
"zod": "^4.1.0",
|
|
153
|
+
"zustand": "^5.0.5",
|
|
154
|
+
"cytoscape": "^3.33.1",
|
|
222
155
|
"@mantine/core": "8.2.7",
|
|
223
|
-
"@mantine/form": "8.2.7",
|
|
224
156
|
"@mantine/hooks": "8.2.7",
|
|
157
|
+
"@mantine/charts": "8.2.7",
|
|
225
158
|
"@mantine/notifications": "8.2.7",
|
|
159
|
+
"@mantine/form": "8.2.7",
|
|
226
160
|
"@mantine/tiptap": "8.2.7",
|
|
227
161
|
"@tiptap/extension-link": "^2.11.7",
|
|
228
162
|
"@tiptap/extension-placeholder": "^2.11.7",
|
|
229
163
|
"@tiptap/react": "^2.11.7",
|
|
230
164
|
"@tiptap/starter-kit": "^2.11.7",
|
|
231
|
-
"@supabase/supabase-js": "^2.49.4",
|
|
232
165
|
"@tabler/icons-react": "^3.27.0",
|
|
233
|
-
"@tanstack/react-query": "^5.76.2",
|
|
234
|
-
"@tanstack/react-router": "^1.131.28",
|
|
235
|
-
"@workos-inc/authkit-react": "^0.11.0",
|
|
236
166
|
"@xyflow/react": "^12.8.5",
|
|
237
|
-
"cytoscape": "^3.33.1",
|
|
238
|
-
"date-fns": "^4.1.0",
|
|
239
|
-
"react": "^19.2.0",
|
|
240
|
-
"react-dom": "^19.2.0",
|
|
241
167
|
"recharts": "^3.2.1",
|
|
242
|
-
"
|
|
243
|
-
"zustand": "^5.0.5"
|
|
168
|
+
"date-fns": "^4.1.0"
|
|
244
169
|
},
|
|
245
170
|
"devDependencies": {
|
|
246
171
|
"@mantine/charts": "8.2.7",
|
|
@@ -262,14 +187,61 @@
|
|
|
262
187
|
"typescript": "5.9.2",
|
|
263
188
|
"vite": "^7.0.0",
|
|
264
189
|
"@repo/core": "0.1.0",
|
|
265
|
-
"@repo/
|
|
266
|
-
"@repo/
|
|
190
|
+
"@repo/typescript-config": "0.0.0",
|
|
191
|
+
"@repo/eslint-config": "0.0.0"
|
|
267
192
|
},
|
|
268
193
|
"dependencies": {
|
|
269
194
|
"@dagrejs/dagre": "^1.1.4",
|
|
270
195
|
"@microsoft/fetch-event-source": "^2.0.1",
|
|
271
196
|
"react-json-pretty": "^2.2.0"
|
|
272
197
|
},
|
|
198
|
+
"peerDependenciesMeta": {
|
|
199
|
+
"@mantine/core": {
|
|
200
|
+
"optional": true
|
|
201
|
+
},
|
|
202
|
+
"@mantine/hooks": {
|
|
203
|
+
"optional": true
|
|
204
|
+
},
|
|
205
|
+
"@mantine/charts": {
|
|
206
|
+
"optional": true
|
|
207
|
+
},
|
|
208
|
+
"@mantine/notifications": {
|
|
209
|
+
"optional": true
|
|
210
|
+
},
|
|
211
|
+
"@mantine/form": {
|
|
212
|
+
"optional": true
|
|
213
|
+
},
|
|
214
|
+
"@tabler/icons-react": {
|
|
215
|
+
"optional": true
|
|
216
|
+
},
|
|
217
|
+
"@xyflow/react": {
|
|
218
|
+
"optional": true
|
|
219
|
+
},
|
|
220
|
+
"cytoscape": {
|
|
221
|
+
"optional": true
|
|
222
|
+
},
|
|
223
|
+
"recharts": {
|
|
224
|
+
"optional": true
|
|
225
|
+
},
|
|
226
|
+
"date-fns": {
|
|
227
|
+
"optional": true
|
|
228
|
+
},
|
|
229
|
+
"@mantine/tiptap": {
|
|
230
|
+
"optional": true
|
|
231
|
+
},
|
|
232
|
+
"@tiptap/extension-link": {
|
|
233
|
+
"optional": true
|
|
234
|
+
},
|
|
235
|
+
"@tiptap/extension-placeholder": {
|
|
236
|
+
"optional": true
|
|
237
|
+
},
|
|
238
|
+
"@tiptap/react": {
|
|
239
|
+
"optional": true
|
|
240
|
+
},
|
|
241
|
+
"@tiptap/starter-kit": {
|
|
242
|
+
"optional": true
|
|
243
|
+
}
|
|
244
|
+
},
|
|
273
245
|
"scripts": {
|
|
274
246
|
"build": "tsc --noEmit",
|
|
275
247
|
"build:publish": "node -e \"require('fs').rmSync('dist',{recursive:true,force:true})\" && tsc -p tsconfig.core-dts.json && tsc -p tsconfig.build.json && tsup && rollup -c rollup.dts.config.mjs && node -e \"require('fs').rmSync('dist/_dts',{recursive:true,force:true})\"",
|