@elevasis/ui 2.15.0 → 2.17.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 (78) hide show
  1. package/dist/api/index.js +3 -2
  2. package/dist/app/index.js +9 -7
  3. package/dist/auth/index.js +4 -3
  4. package/dist/charts/index.js +11 -10
  5. package/dist/{chunk-C7BX547M.js → chunk-2TDZBYXI.js} +9 -3
  6. package/dist/{chunk-5IBTTMWX.js → chunk-34NQLV2W.js} +2 -2
  7. package/dist/{chunk-FL67C3WY.js → chunk-6IA2OMAE.js} +1 -1
  8. package/dist/{chunk-L4XXM55J.js → chunk-7YQKVWSD.js} +1 -1
  9. package/dist/{chunk-XJ7KC54A.js → chunk-ABUDMATM.js} +7 -8
  10. package/dist/{chunk-TUXTSEAF.js → chunk-DK2HVHCY.js} +1 -1
  11. package/dist/{chunk-GHIPBT5V.js → chunk-E4WQGJNS.js} +1 -1
  12. package/dist/{chunk-5SXYCICG.js → chunk-FNWWVX5N.js} +8 -6
  13. package/dist/{chunk-IOKL7BKE.js → chunk-GCBWGGI6.js} +133 -1
  14. package/dist/chunk-GRGRBWIO.js +383 -0
  15. package/dist/{chunk-SLVC5OJ2.js → chunk-HQ7M6PBW.js} +1 -1
  16. package/dist/chunk-IRW7JMQ4.js +28 -0
  17. package/dist/{chunk-YNPVQDNB.js → chunk-JU6UB4YA.js} +4 -4
  18. package/dist/{chunk-SFW573HS.js → chunk-MDO4UCEJ.js} +4 -4
  19. package/dist/{chunk-STZJ7SY5.js → chunk-MJ6YV2B5.js} +3 -2
  20. package/dist/{chunk-D7HBX5US.js → chunk-MUZIYL5Q.js} +5 -4
  21. package/dist/{chunk-DKQQK3WX.js → chunk-OCCZRPER.js} +1 -1
  22. package/dist/{chunk-FFXHKADZ.js → chunk-OXWQQCDR.js} +13 -32
  23. package/dist/{chunk-ZB5GAV7J.js → chunk-P3TFNFZS.js} +6 -5
  24. package/dist/{chunk-QEPXAWE2.js → chunk-QHSW4WHM.js} +3 -26
  25. package/dist/{chunk-LXHZYSMQ.js → chunk-QSTH6T77.js} +2 -52
  26. package/dist/{chunk-U2RXVZGY.js → chunk-R7GKX4HW.js} +66 -461
  27. package/dist/{chunk-X75JEGHS.js → chunk-S6CYH4RI.js} +7 -6
  28. package/dist/{chunk-MTJ43R2E.js → chunk-SLH2QLKV.js} +1 -1
  29. package/dist/{chunk-32NXXCQU.js → chunk-TP5NMF6K.js} +6 -7
  30. package/dist/{chunk-SQQGLGHW.js → chunk-TTP62HWW.js} +3 -3
  31. package/dist/{chunk-NVOCKXUQ.js → chunk-VDM6DQES.js} +1 -1
  32. package/dist/chunk-ZTWA5H77.js +94 -0
  33. package/dist/components/index.d.ts +2640 -2640
  34. package/dist/components/index.js +38 -35
  35. package/dist/execution/index.js +2 -2
  36. package/dist/features/auth/index.js +5 -4
  37. package/dist/features/crm/index.d.ts +51 -51
  38. package/dist/features/crm/index.js +21 -19
  39. package/dist/features/dashboard/index.js +23 -21
  40. package/dist/features/delivery/index.d.ts +2604 -2604
  41. package/dist/features/delivery/index.js +21 -19
  42. package/dist/features/lead-gen/index.js +29 -26
  43. package/dist/features/monitoring/index.js +26 -24
  44. package/dist/features/monitoring/requests/index.d.ts +26 -26
  45. package/dist/features/monitoring/requests/index.js +21 -19
  46. package/dist/features/operations/index.d.ts +10 -10
  47. package/dist/features/operations/index.js +28 -25
  48. package/dist/features/seo/index.js +1 -1
  49. package/dist/features/settings/index.d.ts +34 -34
  50. package/dist/features/settings/index.js +22 -20
  51. package/dist/hooks/delivery/index.css +589 -0
  52. package/dist/hooks/delivery/index.d.ts +3044 -0
  53. package/dist/hooks/delivery/index.js +4 -0
  54. package/dist/hooks/index.d.ts +3103 -3120
  55. package/dist/hooks/index.js +20 -18
  56. package/dist/hooks/operations/command-view/utils/transformCommandViewData.d.ts +506 -0
  57. package/dist/hooks/operations/command-view/utils/transformCommandViewData.js +1 -0
  58. package/dist/hooks/published.d.ts +3103 -3120
  59. package/dist/hooks/published.js +20 -18
  60. package/dist/index.d.ts +3409 -3361
  61. package/dist/index.js +21 -19
  62. package/dist/initialization/index.js +4 -3
  63. package/dist/layout/index.js +3 -3
  64. package/dist/organization/index.js +4 -3
  65. package/dist/profile/index.js +2 -1
  66. package/dist/provider/ElevasisServiceContext.d.ts +54 -0
  67. package/dist/provider/ElevasisServiceContext.js +1 -0
  68. package/dist/provider/index.d.ts +244 -240
  69. package/dist/provider/index.js +17 -16
  70. package/dist/provider/published.d.ts +244 -240
  71. package/dist/provider/published.js +15 -14
  72. package/dist/types/index.d.ts +2349 -2332
  73. package/dist/utils/index.d.ts +73 -1
  74. package/dist/utils/index.js +2 -1
  75. package/dist/zustand/index.d.ts +7 -7
  76. package/package.json +3 -3
  77. package/dist/{chunk-4BF74JVD.js → chunk-6GUW5GGF.js} +1 -1
  78. package/dist/{chunk-ELJIFLCB.js → chunk-KRWALB24.js} +6 -6
@@ -278,249 +278,249 @@ declare function ElevasisCoreProvider({ auth, queryClient, apiUrl, onError, noti
278
278
  */
279
279
  type TimeRange = '1h' | '24h' | '7d' | '30d';
280
280
 
281
- declare const SurfaceDefinitionSchema = z.object({
282
- id: ModelIdSchema,
283
- label: LabelSchema,
284
- path: PathSchema,
285
- surfaceType: SurfaceTypeSchema,
286
- description: DescriptionSchema.optional(),
287
- enabled: z.boolean().default(true),
288
- icon: IconNameSchema.optional(),
289
- featureId: ModelIdSchema.optional(),
290
- featureIds: ReferenceIdsSchema,
291
- entityIds: ReferenceIdsSchema,
292
- resourceIds: ReferenceIdsSchema,
293
- capabilityIds: ReferenceIdsSchema,
294
- parentId: ModelIdSchema.optional()
281
+ declare const SurfaceDefinitionSchema = z.object({
282
+ id: ModelIdSchema,
283
+ label: LabelSchema,
284
+ path: PathSchema,
285
+ surfaceType: SurfaceTypeSchema,
286
+ description: DescriptionSchema.optional(),
287
+ enabled: z.boolean().default(true),
288
+ icon: IconNameSchema.optional(),
289
+ featureId: ModelIdSchema.optional(),
290
+ featureIds: ReferenceIdsSchema,
291
+ entityIds: ReferenceIdsSchema,
292
+ resourceIds: ReferenceIdsSchema,
293
+ capabilityIds: ReferenceIdsSchema,
294
+ parentId: ModelIdSchema.optional()
295
295
  })
296
296
 
297
- declare const OrganizationModelSchema = OrganizationModelSchemaBase.superRefine((model, ctx) => {
298
- const featuresById = collectIds(model.features, ctx, ['features'], 'Feature')
299
- const surfacesById = collectIds(model.navigation.surfaces, ctx, ['navigation', 'surfaces'], 'Surface')
300
- collectIds(model.navigation.groups, ctx, ['navigation', 'groups'], 'Navigation group')
301
- collectIds(model.resourceMappings, ctx, ['resourceMappings'], 'Resource mapping')
302
-
303
- const resourceMappingsByResourceId = new Map<string, (typeof model.resourceMappings)[number]>()
304
- model.resourceMappings.forEach((resourceMapping, index) => {
305
- if (resourceMappingsByResourceId.has(resourceMapping.resourceId)) {
306
- addIssue(
307
- ctx,
308
- ['resourceMappings', index, 'resourceId'],
309
- `Resource mapping resourceId "${resourceMapping.resourceId}" must be unique`
310
- )
311
- return
312
- }
313
-
314
- resourceMappingsByResourceId.set(resourceMapping.resourceId, resourceMapping)
315
- })
316
-
317
- if (model.navigation.defaultSurfaceId && !surfacesById.has(model.navigation.defaultSurfaceId)) {
318
- addIssue(
319
- ctx,
320
- ['navigation', 'defaultSurfaceId'],
321
- `Default surface "${model.navigation.defaultSurfaceId}" must reference a declared navigation surface`
322
- )
323
- }
324
-
325
- model.navigation.groups.forEach((group, groupIndex) => {
326
- group.surfaceIds.forEach((surfaceId, surfaceIndex) => {
327
- if (!surfacesById.has(surfaceId)) {
328
- addIssue(
329
- ctx,
330
- ['navigation', 'groups', groupIndex, 'surfaceIds', surfaceIndex],
331
- `Navigation group "${group.id}" references unknown surface "${surfaceId}"`
332
- )
333
- }
334
- })
335
- })
336
-
337
- // Feature -> Surface bidirectional validation
338
- model.features.forEach((feature, featureIndex) => {
339
- feature.surfaceIds.forEach((surfaceId, surfaceIndex) => {
340
- const surface = surfacesById.get(surfaceId)
341
- if (!surface) {
342
- addIssue(
343
- ctx,
344
- ['features', featureIndex, 'surfaceIds', surfaceIndex],
345
- `Feature "${feature.id}" references unknown surface "${surfaceId}"`
346
- )
347
- return
348
- }
349
-
350
- if (!surface.featureIds.includes(feature.id)) {
351
- addIssue(
352
- ctx,
353
- ['features', featureIndex, 'surfaceIds', surfaceIndex],
354
- `Feature "${feature.id}" references surface "${surfaceId}" but that surface does not include feature "${feature.id}"`
355
- )
356
- }
357
- })
358
-
359
- // Feature -> Resource bidirectional validation
360
- feature.resourceIds.forEach((resourceId, resourceIndex) => {
361
- const resourceMapping = resourceMappingsByResourceId.get(resourceId)
362
- if (!resourceMapping) {
363
- addIssue(
364
- ctx,
365
- ['features', featureIndex, 'resourceIds', resourceIndex],
366
- `Feature "${feature.id}" references unknown resource "${resourceId}"`
367
- )
368
- return
369
- }
370
-
371
- if (!resourceMapping.featureIds.includes(feature.id)) {
372
- addIssue(
373
- ctx,
374
- ['features', featureIndex, 'resourceIds', resourceIndex],
375
- `Feature "${feature.id}" references resource "${resourceId}" but that resource mapping does not include feature "${feature.id}"`
376
- )
377
- }
378
- })
379
- })
380
-
381
- // Surface -> Feature bidirectional validation and other surface refs
382
- model.navigation.surfaces.forEach((surface, surfaceIndex) => {
383
- if (surface.parentId && !surfacesById.has(surface.parentId)) {
384
- addIssue(
385
- ctx,
386
- ['navigation', 'surfaces', surfaceIndex, 'parentId'],
387
- `Surface "${surface.id}" references unknown parent surface "${surface.parentId}"`
388
- )
389
- }
390
-
391
- surface.featureIds.forEach((featureId, featureIndex) => {
392
- const feature = featuresById.get(featureId)
393
- if (!feature) {
394
- addIssue(
395
- ctx,
396
- ['navigation', 'surfaces', surfaceIndex, 'featureIds', featureIndex],
397
- `Surface "${surface.id}" references unknown feature "${featureId}"`
398
- )
399
- return
400
- }
401
-
402
- if (!feature.surfaceIds.includes(surface.id)) {
403
- addIssue(
404
- ctx,
405
- ['navigation', 'surfaces', surfaceIndex, 'featureIds', featureIndex],
406
- `Surface "${surface.id}" references feature "${featureId}" but that feature does not include surface "${surface.id}"`
407
- )
408
- }
409
- })
410
-
411
- // Surface -> Resource bidirectional validation
412
- surface.resourceIds.forEach((resourceId, resourceIndex) => {
413
- const resourceMapping = resourceMappingsByResourceId.get(resourceId)
414
- if (!resourceMapping) {
415
- addIssue(
416
- ctx,
417
- ['navigation', 'surfaces', surfaceIndex, 'resourceIds', resourceIndex],
418
- `Surface "${surface.id}" references unknown resource "${resourceId}"`
419
- )
420
- return
421
- }
422
-
423
- if (!resourceMapping.surfaceIds.includes(surface.id)) {
424
- addIssue(
425
- ctx,
426
- ['navigation', 'surfaces', surfaceIndex, 'resourceIds', resourceIndex],
427
- `Surface "${surface.id}" references resource "${resourceId}" but that surface does not include resource "${surface.id}"`
428
- )
429
- }
430
- })
431
- })
432
-
433
- // Offerings -> CustomerSegment cross-ref: targetSegmentIds must resolve
434
- const segmentsById = new Map(model.customers.segments.map((seg) => [seg.id, seg]))
435
- model.offerings.products.forEach((product, productIndex) => {
436
- product.targetSegmentIds.forEach((segmentId, segmentIndex) => {
437
- if (!segmentsById.has(segmentId)) {
438
- addIssue(
439
- ctx,
440
- ['offerings', 'products', productIndex, 'targetSegmentIds', segmentIndex],
441
- `Product "${product.id}" references unknown customer segment "${segmentId}"`
442
- )
443
- }
444
- })
445
-
446
- // Offerings -> Feature cross-ref: deliveryFeatureId must resolve (when present)
447
- if (product.deliveryFeatureId !== undefined && !featuresById.has(product.deliveryFeatureId)) {
448
- addIssue(
449
- ctx,
450
- ['offerings', 'products', productIndex, 'deliveryFeatureId'],
451
- `Product "${product.id}" references unknown delivery feature "${product.deliveryFeatureId}"`
452
- )
453
- }
454
- })
455
-
456
- // Goals -> period-range validation: periodEnd must be strictly after periodStart
457
- model.goals.objectives.forEach((objective, index) => {
458
- if (objective.periodEnd <= objective.periodStart) {
459
- addIssue(
460
- ctx,
461
- ['goals', 'objectives', index, 'periodEnd'],
462
- `Goal "${objective.id}" has periodEnd "${objective.periodEnd}" which must be strictly after periodStart "${objective.periodStart}"`
463
- )
464
- }
465
- })
466
-
467
- // Roles -> reportsToId cross-ref: each reportsToId must resolve to another role in the same collection
468
- const rolesById = new Map(model.roles.roles.map((role) => [role.id, role]))
469
- model.roles.roles.forEach((role, roleIndex) => {
470
- if (role.reportsToId !== undefined && !rolesById.has(role.reportsToId)) {
471
- addIssue(
472
- ctx,
473
- ['roles', 'roles', roleIndex, 'reportsToId'],
474
- `Role "${role.id}" references unknown reportsToId "${role.reportsToId}"`
475
- )
476
- }
477
- })
478
-
479
- // ResourceMapping -> Feature and Surface bidirectional validation
480
- model.resourceMappings.forEach((resourceMapping, resourceIndex) => {
481
- resourceMapping.featureIds.forEach((featureId, featureIndex) => {
482
- const feature = featuresById.get(featureId)
483
- if (!feature) {
484
- addIssue(
485
- ctx,
486
- ['resourceMappings', resourceIndex, 'featureIds', featureIndex],
487
- `Resource mapping "${resourceMapping.id}" references unknown feature "${featureId}"`
488
- )
489
- return
490
- }
491
-
492
- if (!feature.resourceIds.includes(resourceMapping.resourceId)) {
493
- addIssue(
494
- ctx,
495
- ['resourceMappings', resourceIndex, 'featureIds', featureIndex],
496
- `Resource mapping "${resourceMapping.id}" references feature "${featureId}" but that feature does not include resource "${resourceMapping.resourceId}"`
497
- )
498
- }
499
- })
500
-
501
- resourceMapping.surfaceIds.forEach((surfaceId, surfaceIndex) => {
502
- const surface = surfacesById.get(surfaceId)
503
- if (!surface) {
504
- addIssue(
505
- ctx,
506
- ['resourceMappings', resourceIndex, 'surfaceIds', surfaceIndex],
507
- `Resource mapping "${resourceMapping.id}" references unknown surface "${surfaceId}"`
508
- )
509
- return
510
- }
511
-
512
- if (!surface.resourceIds.includes(resourceMapping.resourceId)) {
513
- addIssue(
514
- ctx,
515
- ['resourceMappings', resourceIndex, 'surfaceIds', surfaceIndex],
516
- `Resource mapping "${resourceMapping.id}" references surface "${surfaceId}" but that surface does not include resource "${resourceMapping.resourceId}"`
517
- )
518
- }
519
- })
520
- })
297
+ declare const OrganizationModelSchema = OrganizationModelSchemaBase.superRefine((model, ctx) => {
298
+ const featuresById = collectIds(model.features, ctx, ['features'], 'Feature')
299
+ const surfacesById = collectIds(model.navigation.surfaces, ctx, ['navigation', 'surfaces'], 'Surface')
300
+ collectIds(model.navigation.groups, ctx, ['navigation', 'groups'], 'Navigation group')
301
+ collectIds(model.resourceMappings, ctx, ['resourceMappings'], 'Resource mapping')
302
+
303
+ const resourceMappingsByResourceId = new Map<string, (typeof model.resourceMappings)[number]>()
304
+ model.resourceMappings.forEach((resourceMapping, index) => {
305
+ if (resourceMappingsByResourceId.has(resourceMapping.resourceId)) {
306
+ addIssue(
307
+ ctx,
308
+ ['resourceMappings', index, 'resourceId'],
309
+ `Resource mapping resourceId "${resourceMapping.resourceId}" must be unique`
310
+ )
311
+ return
312
+ }
313
+
314
+ resourceMappingsByResourceId.set(resourceMapping.resourceId, resourceMapping)
315
+ })
316
+
317
+ if (model.navigation.defaultSurfaceId && !surfacesById.has(model.navigation.defaultSurfaceId)) {
318
+ addIssue(
319
+ ctx,
320
+ ['navigation', 'defaultSurfaceId'],
321
+ `Default surface "${model.navigation.defaultSurfaceId}" must reference a declared navigation surface`
322
+ )
323
+ }
324
+
325
+ model.navigation.groups.forEach((group, groupIndex) => {
326
+ group.surfaceIds.forEach((surfaceId, surfaceIndex) => {
327
+ if (!surfacesById.has(surfaceId)) {
328
+ addIssue(
329
+ ctx,
330
+ ['navigation', 'groups', groupIndex, 'surfaceIds', surfaceIndex],
331
+ `Navigation group "${group.id}" references unknown surface "${surfaceId}"`
332
+ )
333
+ }
334
+ })
335
+ })
336
+
337
+ // Feature -> Surface bidirectional validation
338
+ model.features.forEach((feature, featureIndex) => {
339
+ feature.surfaceIds.forEach((surfaceId, surfaceIndex) => {
340
+ const surface = surfacesById.get(surfaceId)
341
+ if (!surface) {
342
+ addIssue(
343
+ ctx,
344
+ ['features', featureIndex, 'surfaceIds', surfaceIndex],
345
+ `Feature "${feature.id}" references unknown surface "${surfaceId}"`
346
+ )
347
+ return
348
+ }
349
+
350
+ if (!surface.featureIds.includes(feature.id)) {
351
+ addIssue(
352
+ ctx,
353
+ ['features', featureIndex, 'surfaceIds', surfaceIndex],
354
+ `Feature "${feature.id}" references surface "${surfaceId}" but that surface does not include feature "${feature.id}"`
355
+ )
356
+ }
357
+ })
358
+
359
+ // Feature -> Resource bidirectional validation
360
+ feature.resourceIds.forEach((resourceId, resourceIndex) => {
361
+ const resourceMapping = resourceMappingsByResourceId.get(resourceId)
362
+ if (!resourceMapping) {
363
+ addIssue(
364
+ ctx,
365
+ ['features', featureIndex, 'resourceIds', resourceIndex],
366
+ `Feature "${feature.id}" references unknown resource "${resourceId}"`
367
+ )
368
+ return
369
+ }
370
+
371
+ if (!resourceMapping.featureIds.includes(feature.id)) {
372
+ addIssue(
373
+ ctx,
374
+ ['features', featureIndex, 'resourceIds', resourceIndex],
375
+ `Feature "${feature.id}" references resource "${resourceId}" but that resource mapping does not include feature "${feature.id}"`
376
+ )
377
+ }
378
+ })
379
+ })
380
+
381
+ // Surface -> Feature bidirectional validation and other surface refs
382
+ model.navigation.surfaces.forEach((surface, surfaceIndex) => {
383
+ if (surface.parentId && !surfacesById.has(surface.parentId)) {
384
+ addIssue(
385
+ ctx,
386
+ ['navigation', 'surfaces', surfaceIndex, 'parentId'],
387
+ `Surface "${surface.id}" references unknown parent surface "${surface.parentId}"`
388
+ )
389
+ }
390
+
391
+ surface.featureIds.forEach((featureId, featureIndex) => {
392
+ const feature = featuresById.get(featureId)
393
+ if (!feature) {
394
+ addIssue(
395
+ ctx,
396
+ ['navigation', 'surfaces', surfaceIndex, 'featureIds', featureIndex],
397
+ `Surface "${surface.id}" references unknown feature "${featureId}"`
398
+ )
399
+ return
400
+ }
401
+
402
+ if (!feature.surfaceIds.includes(surface.id)) {
403
+ addIssue(
404
+ ctx,
405
+ ['navigation', 'surfaces', surfaceIndex, 'featureIds', featureIndex],
406
+ `Surface "${surface.id}" references feature "${featureId}" but that feature does not include surface "${surface.id}"`
407
+ )
408
+ }
409
+ })
410
+
411
+ // Surface -> Resource bidirectional validation
412
+ surface.resourceIds.forEach((resourceId, resourceIndex) => {
413
+ const resourceMapping = resourceMappingsByResourceId.get(resourceId)
414
+ if (!resourceMapping) {
415
+ addIssue(
416
+ ctx,
417
+ ['navigation', 'surfaces', surfaceIndex, 'resourceIds', resourceIndex],
418
+ `Surface "${surface.id}" references unknown resource "${resourceId}"`
419
+ )
420
+ return
421
+ }
422
+
423
+ if (!resourceMapping.surfaceIds.includes(surface.id)) {
424
+ addIssue(
425
+ ctx,
426
+ ['navigation', 'surfaces', surfaceIndex, 'resourceIds', resourceIndex],
427
+ `Surface "${surface.id}" references resource "${resourceId}" but that surface does not include resource "${surface.id}"`
428
+ )
429
+ }
430
+ })
431
+ })
432
+
433
+ // Offerings -> CustomerSegment cross-ref: targetSegmentIds must resolve
434
+ const segmentsById = new Map(model.customers.segments.map((seg) => [seg.id, seg]))
435
+ model.offerings.products.forEach((product, productIndex) => {
436
+ product.targetSegmentIds.forEach((segmentId, segmentIndex) => {
437
+ if (!segmentsById.has(segmentId)) {
438
+ addIssue(
439
+ ctx,
440
+ ['offerings', 'products', productIndex, 'targetSegmentIds', segmentIndex],
441
+ `Product "${product.id}" references unknown customer segment "${segmentId}"`
442
+ )
443
+ }
444
+ })
445
+
446
+ // Offerings -> Feature cross-ref: deliveryFeatureId must resolve (when present)
447
+ if (product.deliveryFeatureId !== undefined && !featuresById.has(product.deliveryFeatureId)) {
448
+ addIssue(
449
+ ctx,
450
+ ['offerings', 'products', productIndex, 'deliveryFeatureId'],
451
+ `Product "${product.id}" references unknown delivery feature "${product.deliveryFeatureId}"`
452
+ )
453
+ }
454
+ })
455
+
456
+ // Goals -> period-range validation: periodEnd must be strictly after periodStart
457
+ model.goals.objectives.forEach((objective, index) => {
458
+ if (objective.periodEnd <= objective.periodStart) {
459
+ addIssue(
460
+ ctx,
461
+ ['goals', 'objectives', index, 'periodEnd'],
462
+ `Goal "${objective.id}" has periodEnd "${objective.periodEnd}" which must be strictly after periodStart "${objective.periodStart}"`
463
+ )
464
+ }
465
+ })
466
+
467
+ // Roles -> reportsToId cross-ref: each reportsToId must resolve to another role in the same collection
468
+ const rolesById = new Map(model.roles.roles.map((role) => [role.id, role]))
469
+ model.roles.roles.forEach((role, roleIndex) => {
470
+ if (role.reportsToId !== undefined && !rolesById.has(role.reportsToId)) {
471
+ addIssue(
472
+ ctx,
473
+ ['roles', 'roles', roleIndex, 'reportsToId'],
474
+ `Role "${role.id}" references unknown reportsToId "${role.reportsToId}"`
475
+ )
476
+ }
477
+ })
478
+
479
+ // ResourceMapping -> Feature and Surface bidirectional validation
480
+ model.resourceMappings.forEach((resourceMapping, resourceIndex) => {
481
+ resourceMapping.featureIds.forEach((featureId, featureIndex) => {
482
+ const feature = featuresById.get(featureId)
483
+ if (!feature) {
484
+ addIssue(
485
+ ctx,
486
+ ['resourceMappings', resourceIndex, 'featureIds', featureIndex],
487
+ `Resource mapping "${resourceMapping.id}" references unknown feature "${featureId}"`
488
+ )
489
+ return
490
+ }
491
+
492
+ if (!feature.resourceIds.includes(resourceMapping.resourceId)) {
493
+ addIssue(
494
+ ctx,
495
+ ['resourceMappings', resourceIndex, 'featureIds', featureIndex],
496
+ `Resource mapping "${resourceMapping.id}" references feature "${featureId}" but that feature does not include resource "${resourceMapping.resourceId}"`
497
+ )
498
+ }
499
+ })
500
+
501
+ resourceMapping.surfaceIds.forEach((surfaceId, surfaceIndex) => {
502
+ const surface = surfacesById.get(surfaceId)
503
+ if (!surface) {
504
+ addIssue(
505
+ ctx,
506
+ ['resourceMappings', resourceIndex, 'surfaceIds', surfaceIndex],
507
+ `Resource mapping "${resourceMapping.id}" references unknown surface "${surfaceId}"`
508
+ )
509
+ return
510
+ }
511
+
512
+ if (!surface.resourceIds.includes(resourceMapping.resourceId)) {
513
+ addIssue(
514
+ ctx,
515
+ ['resourceMappings', resourceIndex, 'surfaceIds', surfaceIndex],
516
+ `Resource mapping "${resourceMapping.id}" references surface "${surfaceId}" but that surface does not include resource "${resourceMapping.resourceId}"`
517
+ )
518
+ }
519
+ })
520
+ })
521
521
  })
522
522
 
523
- type OrganizationModel = z.infer<typeof OrganizationModelSchema>
523
+ type OrganizationModel = z.infer<typeof OrganizationModelSchema>
524
524
  type OrganizationModelSurface = z.infer<typeof SurfaceDefinitionSchema>
525
525
 
526
526
  interface EventSourceMessage {
@@ -649,6 +649,8 @@ interface ElevasisFeaturesProviderProps {
649
649
  timeRange?: TimeRange;
650
650
  operationsApiUrl?: string;
651
651
  operationsSSEManager?: SSEConnectionManagerLike;
652
+ deliveryApiUrl?: string;
653
+ deliverySSEManager?: SSEConnectionManagerLike;
652
654
  disabledSubsectionPaths?: string[];
653
655
  children: ReactNode;
654
656
  }
@@ -662,6 +664,8 @@ interface ElevasisFeaturesContextValue {
662
664
  timeRange?: TimeRange;
663
665
  operationsApiUrl?: string;
664
666
  operationsSSEManager?: SSEConnectionManagerLike;
667
+ deliveryApiUrl?: string;
668
+ deliverySSEManager?: SSEConnectionManagerLike;
665
669
  disabledSubsectionPaths: string[];
666
670
  isFeatureEnabled: (key: string) => boolean;
667
671
  getResolvedFeature: (key: string) => ResolvedFeatureModule | undefined;
@@ -669,7 +673,7 @@ interface ElevasisFeaturesContextValue {
669
673
 
670
674
  declare function useElevasisFeatures(): ElevasisFeaturesContextValue;
671
675
  declare function useOptionalElevasisFeatures(): ElevasisFeaturesContextValue | null;
672
- declare function ElevasisFeaturesProvider({ features, organizationModel, appShellOverrides, timeRange, operationsApiUrl, operationsSSEManager, disabledSubsectionPaths, children }: ElevasisFeaturesProviderProps): react_jsx_runtime.JSX.Element;
676
+ declare function ElevasisFeaturesProvider({ features, organizationModel, appShellOverrides, timeRange, operationsApiUrl, operationsSSEManager, deliveryApiUrl, deliverySSEManager, disabledSubsectionPaths, children }: ElevasisFeaturesProviderProps): react_jsx_runtime.JSX.Element;
673
677
 
674
678
  declare function FeatureShell({ children }: {
675
679
  children: ReactNode;
@@ -1,27 +1,28 @@
1
- export { createTestFeaturesProvider } from '../chunk-DKQQK3WX.js';
2
- export { ElevasisUIProvider } from '../chunk-5IBTTMWX.js';
1
+ export { createTestFeaturesProvider } from '../chunk-OCCZRPER.js';
2
+ export { ElevasisUIProvider } from '../chunk-34NQLV2W.js';
3
3
  import '../chunk-R73EHHPN.js';
4
4
  import '../chunk-WLOQ4IBG.js';
5
- export { ElevasisFeaturesProvider, FeatureShell, useElevasisFeatures, useOptionalElevasisFeatures } from '../chunk-C7BX547M.js';
5
+ export { ElevasisFeaturesProvider, FeatureShell, useElevasisFeatures, useOptionalElevasisFeatures } from '../chunk-2TDZBYXI.js';
6
+ export { ElevasisCoreProvider, NotificationProvider, useNotificationAdapter } from '../chunk-P3TFNFZS.js';
6
7
  import '../chunk-RX4UWZZR.js';
7
- import '../chunk-SQQGLGHW.js';
8
+ import '../chunk-TTP62HWW.js';
9
+ import '../chunk-SZHARWKU.js';
8
10
  import '../chunk-3KMDHCAR.js';
9
11
  import '../chunk-NYBEU5TE.js';
10
- export { ElevasisCoreProvider, NotificationProvider, useNotificationAdapter } from '../chunk-ZB5GAV7J.js';
11
- import '../chunk-SZHARWKU.js';
12
- import '../chunk-NVOCKXUQ.js';
12
+ import '../chunk-VDM6DQES.js';
13
13
  import '../chunk-2IFYDILW.js';
14
- import '../chunk-ELJIFLCB.js';
15
- import '../chunk-L4XXM55J.js';
16
- import '../chunk-FL67C3WY.js';
14
+ import '../chunk-Q7DJKLEN.js';
15
+ import '../chunk-7YQKVWSD.js';
16
+ import '../chunk-6IA2OMAE.js';
17
17
  export { AppearanceProvider, useAppearance } from '../chunk-QJ2KCHKX.js';
18
- import '../chunk-SLVC5OJ2.js';
18
+ import '../chunk-HQ7M6PBW.js';
19
19
  import '../chunk-DT3QYZVU.js';
20
20
  import '../chunk-RNP5R5I3.js';
21
- import '../chunk-IOKL7BKE.js';
22
- import '../chunk-MTJ43R2E.js';
23
- import '../chunk-TUXTSEAF.js';
21
+ import '../chunk-GCBWGGI6.js';
22
+ import '../chunk-KRWALB24.js';
23
+ import '../chunk-SLH2QLKV.js';
24
+ import '../chunk-DK2HVHCY.js';
24
25
  import '../chunk-DD3CCMCZ.js';
25
- export { ElevasisServiceProvider, useElevasisServices } from '../chunk-QEPXAWE2.js';
26
+ import '../chunk-QHSW4WHM.js';
27
+ export { ElevasisServiceProvider, useElevasisServices } from '../chunk-IRW7JMQ4.js';
26
28
  import '../chunk-BRJ3QZ4E.js';
27
- import '../chunk-Q7DJKLEN.js';