@elevasis/ui 2.73.0 → 2.74.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 (97) hide show
  1. package/dist/api/index.js +3 -3
  2. package/dist/app/index.d.ts +58 -0
  3. package/dist/app/index.js +9 -10
  4. package/dist/auth/index.js +5 -6
  5. package/dist/charts/index.js +5 -6
  6. package/dist/chunk-2GIJBHZT.js +60 -0
  7. package/dist/{chunk-ETN3TTRT.js → chunk-2MRRDF32.js} +115 -8
  8. package/dist/chunk-3LOKYZJC.js +231 -0
  9. package/dist/chunk-3QHX4ZKV.js +224 -0
  10. package/dist/chunk-43LC6XAX.js +69 -0
  11. package/dist/chunk-4M2BSHVT.js +116 -0
  12. package/dist/{chunk-SWKAH2YM.js → chunk-4MXNHJTA.js} +63 -30
  13. package/dist/{chunk-LZT2H2MA.js → chunk-5A6KCFS5.js} +36 -43
  14. package/dist/{chunk-OCVSPAKM.js → chunk-6JN2TLV2.js} +1150 -4346
  15. package/dist/{chunk-JYBJMVNY.js → chunk-7ARBBELS.js} +1 -1
  16. package/dist/{chunk-AJOVWB47.js → chunk-7RJ7P6S6.js} +6 -3
  17. package/dist/chunk-ARAFQBNI.js +515 -0
  18. package/dist/{chunk-Z4ICFQXG.js → chunk-BA3AZJUR.js} +1 -1
  19. package/dist/chunk-BRTGCFBH.js +305 -0
  20. package/dist/{chunk-IGBPWD6S.js → chunk-CQPULKKL.js} +5 -3
  21. package/dist/chunk-CRA7WQZH.js +49 -0
  22. package/dist/{chunk-U2H3TIHD.js → chunk-DCQKTDIG.js} +2 -52
  23. package/dist/{chunk-3TS5U5BL.js → chunk-E6YGA5WH.js} +1 -1
  24. package/dist/chunk-FA7LMNQO.js +439 -0
  25. package/dist/chunk-FZSG6M6W.js +45 -0
  26. package/dist/chunk-GDOR57D7.js +165 -0
  27. package/dist/{chunk-CJ2232PQ.js → chunk-GO4XJ5D4.js} +1 -1
  28. package/dist/chunk-GPQQGQGT.js +645 -0
  29. package/dist/chunk-HYQOGRWG.js +54 -0
  30. package/dist/{chunk-LEPYXLJ2.js → chunk-LN4UW6S4.js} +1 -1
  31. package/dist/chunk-N6K2Q5BM.js +393 -0
  32. package/dist/{chunk-NHNTX6ZL.js → chunk-O32UQ26A.js} +3 -2
  33. package/dist/{chunk-M7WWRZ5Z.js → chunk-QFGNRKIE.js} +1 -78
  34. package/dist/{chunk-IBCEAVB2.js → chunk-R5UGIFYU.js} +41 -5
  35. package/dist/{chunk-5B2ZFO44.js → chunk-RFNJ2PTO.js} +1 -1
  36. package/dist/chunk-VM2OWOXL.js +24 -0
  37. package/dist/{chunk-ZDKPHFTH.js → chunk-W2QRBQQA.js} +5 -3
  38. package/dist/chunk-WDBNW44Z.js +49 -0
  39. package/dist/{chunk-4CW2C5BD.js → chunk-WZU3MCKI.js} +1 -1
  40. package/dist/chunk-YQQ5GRUR.js +21 -0
  41. package/dist/{chunk-PQ4B62HH.js → chunk-ZFA56VSR.js} +2 -2
  42. package/dist/{chunk-NI37YNRP.js → chunk-ZWI62BQ6.js} +7 -4
  43. package/dist/chunk-ZYNVCWDZ.js +286 -0
  44. package/dist/components/index.d.ts +187 -2
  45. package/dist/components/index.js +44 -34
  46. package/dist/components/navigation/index.js +6 -7
  47. package/dist/features/auth/index.d.ts +78 -2
  48. package/dist/features/auth/index.js +18 -9
  49. package/dist/features/clients/index.js +7 -7
  50. package/dist/features/content/index.d.ts +226 -5
  51. package/dist/features/content/index.js +263 -15
  52. package/dist/features/crm/index.d.ts +58 -0
  53. package/dist/features/crm/index.js +10 -8
  54. package/dist/features/dashboard/index.js +9 -8
  55. package/dist/features/delivery/index.d.ts +58 -0
  56. package/dist/features/delivery/index.js +23 -7
  57. package/dist/features/knowledge/index.js +5 -6
  58. package/dist/features/lead-gen/index.d.ts +9 -15
  59. package/dist/features/lead-gen/index.js +12 -8
  60. package/dist/features/monitoring/index.js +11 -9
  61. package/dist/features/monitoring/requests/index.js +8 -7
  62. package/dist/features/operations/index.js +15 -11
  63. package/dist/features/public-agent-chat/index.js +3 -1
  64. package/dist/features/settings/index.d.ts +58 -0
  65. package/dist/features/settings/index.js +9 -8
  66. package/dist/hooks/access/index.js +5 -6
  67. package/dist/hooks/delivery/index.d.ts +58 -0
  68. package/dist/hooks/delivery/index.js +3 -2
  69. package/dist/hooks/operations/command-view/utils/transformCommandViewData.d.ts +1 -1
  70. package/dist/hooks/published.d.ts +175 -3
  71. package/dist/hooks/published.js +22 -6
  72. package/dist/initialization/index.d.ts +58 -0
  73. package/dist/knowledge/index.js +167 -11
  74. package/dist/{knowledge-search-index-RZLIVWPJ.js → knowledge-search-index-6GQK55IQ.js} +1 -1
  75. package/dist/layout/index.js +8 -9
  76. package/dist/profile/index.d.ts +58 -0
  77. package/dist/provider/index.d.ts +77 -1
  78. package/dist/provider/index.js +5 -6
  79. package/dist/provider/published.d.ts +105 -1
  80. package/dist/provider/published.js +5 -6
  81. package/dist/test-utils/index.d.ts +16 -5
  82. package/dist/test-utils/index.js +17 -18
  83. package/dist/types/index.d.ts +59 -1
  84. package/dist/utils/index.d.ts +83 -3
  85. package/dist/utils/index.js +1 -1
  86. package/package.json +6 -5
  87. package/dist/chunk-6M6OLGQY.js +0 -36
  88. package/dist/chunk-MKH2KOAO.js +0 -39
  89. package/dist/hooks/index.css +0 -659
  90. package/dist/hooks/index.d.ts +0 -14073
  91. package/dist/hooks/index.js +0 -27
  92. package/dist/supabase/index.d.ts +0 -7118
  93. package/dist/supabase/index.js +0 -3
  94. package/dist/typeform/index.d.ts +0 -462
  95. package/dist/typeform/index.js +0 -2051
  96. package/dist/typeform/schemas.d.ts +0 -67
  97. package/dist/typeform/schemas.js +0 -2
@@ -266,6 +266,45 @@ declare const LinkSchema: z.ZodObject<{
266
266
  }, z.core.$strip>;
267
267
  type Link = z.infer<typeof LinkSchema>;
268
268
 
269
+ /**
270
+ * Registration surface for the generic readiness engine (`./engine`).
271
+ *
272
+ * This module owns two independent extension points so `./engine` never has
273
+ * to import anything from `business/**`:
274
+ *
275
+ * - `registerBuiltInReadinessProfile` — a profile id (e.g. `sales.lead-gen.api`)
276
+ * maps to structural validation logic plus an optional model-preparation
277
+ * hook run before ontology compilation (e.g. injecting a derived catalog).
278
+ * This is the ONE readiness-profile registry (`_builtInProfileValidators`
279
+ * below) — `../domains/systems`'s `isBuiltInReadinessProfile` /
280
+ * `lookupReadinessProfile` read it directly via `getBuiltInReadinessProfile`
281
+ * rather than mirroring registrations into a second map, so a profile id
282
+ * can never read as built-in without an actual registered validator.
283
+ * - `registerReadinessInterfaceMarker` — a `(systemPath, interfaceKey)` pair
284
+ * maps to a synthesized interface marker for interfaces that are not
285
+ * authored on `system.apiInterface` (e.g. the lead-gen/CRM handoff bridge,
286
+ * which is derived from scoped resources rather than declared directly).
287
+ *
288
+ * `business/acquisition/ontology-validation.ts` calls both at module load to
289
+ * register its three built-in profiles. Both registries are module-level
290
+ * mutable maps with no reset function. Reachable by a tenant via the
291
+ * `./organization-model/readiness` subpath (see `./index`).
292
+ */
293
+
294
+ type SystemInterfaceReadinessIssueFamily = 'SYSTEM_INTERFACE_MISSING' | 'SYSTEM_INTERFACE_DISABLED' | 'SYSTEM_INTERFACE_INVALID' | 'SYSTEM_INTERFACE_NOT_READY' | 'SYSTEM_BRIDGE_NOT_READY'
295
+ /**
296
+ * The deployed OM snapshot hash does not match the canonical source hash.
297
+ * Redeploy with `pnpm operations:deploy` to refresh the snapshot.
298
+ */
299
+ | 'STALE_OM_SNAPSHOT';
300
+ interface SystemInterfaceReadinessIssue {
301
+ family: SystemInterfaceReadinessIssueFamily;
302
+ code: string;
303
+ path?: string;
304
+ ref?: string;
305
+ message: string;
306
+ }
307
+
269
308
  /**
270
309
  * Time range selector for dashboard metrics
271
310
  */
@@ -402,12 +441,53 @@ declare class APIClientError extends Error {
402
441
  readonly requestId?: string;
403
442
  readonly fields?: Record<string, string[]>;
404
443
  readonly retryAfter?: number;
405
- constructor(message: string, code: APIErrorCode, statusCode: number, requestId?: string, fields?: Record<string, string[]>, retryAfter?: number);
444
+ /**
445
+ * Structured detail payload carried on `APIErrorResponse.details`
446
+ * (`packages/core/src/platform/api/types.ts`). Deliberately typed as a
447
+ * general bag rather than narrowed to any one error family — CONFLICT
448
+ * linked-row counts, SERVICE_UNAVAILABLE readiness payloads, and future
449
+ * error shapes all flow through the same field. Use a shape-specific
450
+ * accessor (e.g. `getSystemReadinessServerErrorDetails`) to narrow it.
451
+ */
452
+ readonly details?: Record<string, unknown>;
453
+ constructor(message: string, code: APIErrorCode, statusCode: number, requestId?: string, fields?: Record<string, string[]>, retryAfter?: number, details?: Record<string, unknown>);
406
454
  }
407
455
  /**
408
456
  * Type guard to check if an error is an APIClientError
409
457
  */
410
458
  declare function isAPIClientError(error: unknown): error is APIClientError;
459
+ /**
460
+ * The structured 503 payload a System Interface readiness failure carries
461
+ * (`APIErrorResponse.details` shape produced by `createInterfaceReadinessApiError`
462
+ * in `apps/api/src/platform/organization-model/interface-readiness.ts`).
463
+ *
464
+ * Field-for-field identical to `SystemReadinessServerErrorDetails` in
465
+ * `packages/ui/src/components/display/SystemReadinessAlert.tsx` — same shape,
466
+ * different name to avoid a barrel export collision (both flow through
467
+ * `src/index.ts`) — so `getSystemReadinessServerErrorDetails`'s return value
468
+ * drops straight into that component's `serverError` prop. Declared
469
+ * independently here (rather than imported) to keep `utils` the dependency
470
+ * the `components` layer imports from, not the other way around.
471
+ */
472
+ interface SystemReadinessErrorDetails {
473
+ systemPath: string;
474
+ interfaceKey: string;
475
+ readinessProfile?: string;
476
+ readinessCode: SystemInterfaceReadinessIssueFamily;
477
+ issues: SystemInterfaceReadinessIssue[];
478
+ }
479
+ /**
480
+ * Narrows an unknown caught error to a System Interface readiness 503's
481
+ * structured details, or `undefined` when the error is not an
482
+ * `APIClientError`, carries no `details`, or carries a `details` payload
483
+ * from a different error family (e.g. a CONFLICT's linked-row counts).
484
+ *
485
+ * Intended for a one-line call site:
486
+ * ```ts
487
+ * <SystemReadinessAlert ... serverError={getSystemReadinessServerErrorDetails(error)} />
488
+ * ```
489
+ */
490
+ declare function getSystemReadinessServerErrorDetails(error: unknown): SystemReadinessErrorDetails | undefined;
411
491
  /**
412
492
  * Extract error information from any error type
413
493
  * Handles both APIClientError and generic Error instances
@@ -521,5 +601,5 @@ declare function restoreConsole(): void;
521
601
 
522
602
  declare function setupBrowserMocks(): void;
523
603
 
524
- export { APIClientError, API_URL, DEBOUNCE_FILTER, DEBOUNCE_SLIDER, GC_TIME_LONG, GC_TIME_MEDIUM, GC_TIME_SHORT, LIMIT_ACTIVITY_FEED, OAUTH_FLOW_TIMEOUT, PAGE_SIZE_DEFAULT, REFETCH_INTERVAL_DASHBOARD, REFETCH_INTERVAL_REALTIME, REFETCH_INTERVAL_RUNNING, REFETCH_INTERVAL_RUNNING_FAST, ResourceStatusColors, SSE_CLOSE_GRACE_PERIOD, SSE_TOKEN_REFRESH_DELAY, STALE_TIME_ADMIN, STALE_TIME_DEFAULT, STALE_TIME_MONITORING, WS_MAX_RETRIES_BEFORE_ERROR, WS_RECONNECT_BASE_DELAY, WS_RECONNECT_MAX_DELAY, debounce, formatChartAxisDate, formatDate, formatDateTime, formatErrorMessage, formatRelativeTime, formatTimeAgo, getErrorInfo, getErrorTitle, getResourceColor, getResourceIcon, getTimeRangeDates, getTimeRangeLabel, isAPIClientError, restoreConsole, setupBrowserMocks, suppressKnownWarnings, validateEmail };
525
- export type { TablerIcon };
604
+ export { APIClientError, API_URL, DEBOUNCE_FILTER, DEBOUNCE_SLIDER, GC_TIME_LONG, GC_TIME_MEDIUM, GC_TIME_SHORT, LIMIT_ACTIVITY_FEED, OAUTH_FLOW_TIMEOUT, PAGE_SIZE_DEFAULT, REFETCH_INTERVAL_DASHBOARD, REFETCH_INTERVAL_REALTIME, REFETCH_INTERVAL_RUNNING, REFETCH_INTERVAL_RUNNING_FAST, ResourceStatusColors, SSE_CLOSE_GRACE_PERIOD, SSE_TOKEN_REFRESH_DELAY, STALE_TIME_ADMIN, STALE_TIME_DEFAULT, STALE_TIME_MONITORING, WS_MAX_RETRIES_BEFORE_ERROR, WS_RECONNECT_BASE_DELAY, WS_RECONNECT_MAX_DELAY, debounce, formatChartAxisDate, formatDate, formatDateTime, formatErrorMessage, formatRelativeTime, formatTimeAgo, getErrorInfo, getErrorTitle, getResourceColor, getResourceIcon, getSystemReadinessServerErrorDetails, getTimeRangeDates, getTimeRangeLabel, isAPIClientError, restoreConsole, setupBrowserMocks, suppressKnownWarnings, validateEmail };
605
+ export type { SystemReadinessErrorDetails, TablerIcon };
@@ -1,4 +1,4 @@
1
- export { APIClientError, API_URL, DEBOUNCE_FILTER, DEBOUNCE_SLIDER, GC_TIME_LONG, GC_TIME_MEDIUM, GC_TIME_SHORT, LIMIT_ACTIVITY_FEED, OAUTH_FLOW_TIMEOUT, PAGE_SIZE_DEFAULT, STALE_TIME_ADMIN, STALE_TIME_DEFAULT, STALE_TIME_MONITORING, formatChartAxisDate, formatDate, formatDateTime, formatErrorMessage, formatRelativeTime, formatTimeAgo, getErrorInfo, getErrorTitle, getResourceColor, getResourceIcon, isAPIClientError, restoreConsole, setupBrowserMocks, suppressKnownWarnings, validateEmail } from '../chunk-IBCEAVB2.js';
1
+ export { APIClientError, API_URL, DEBOUNCE_FILTER, DEBOUNCE_SLIDER, GC_TIME_LONG, GC_TIME_MEDIUM, GC_TIME_SHORT, LIMIT_ACTIVITY_FEED, OAUTH_FLOW_TIMEOUT, PAGE_SIZE_DEFAULT, STALE_TIME_ADMIN, STALE_TIME_DEFAULT, STALE_TIME_MONITORING, formatChartAxisDate, formatDate, formatDateTime, formatErrorMessage, formatRelativeTime, formatTimeAgo, getErrorInfo, getErrorTitle, getResourceColor, getResourceIcon, getSystemReadinessServerErrorDetails, isAPIClientError, restoreConsole, setupBrowserMocks, suppressKnownWarnings, validateEmail } from '../chunk-R5UGIFYU.js';
2
2
  export { REFETCH_INTERVAL_DASHBOARD, REFETCH_INTERVAL_REALTIME, REFETCH_INTERVAL_RUNNING, REFETCH_INTERVAL_RUNNING_FAST, SSE_CLOSE_GRACE_PERIOD, SSE_TOKEN_REFRESH_DELAY, WS_MAX_RETRIES_BEFORE_ERROR, WS_RECONNECT_BASE_DELAY, WS_RECONNECT_MAX_DELAY, debounce, getTimeRangeDates, getTimeRangeLabel } from '../chunk-Y6I3IC45.js';
3
3
  export { ResourceStatusColors } from '../chunk-6SSQGWK7.js';
4
4
  import '../chunk-TVTSASST.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elevasis/ui",
3
- "version": "2.73.0",
3
+ "version": "2.74.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",
@@ -9,6 +9,7 @@
9
9
  ],
10
10
  "files": [
11
11
  "dist",
12
+ "!dist/metafile-*.json",
12
13
  "src/**/README.md"
13
14
  ],
14
15
  "exports": {
@@ -280,10 +281,10 @@
280
281
  "typescript": "5.9.2",
281
282
  "vite": "^7.0.0",
282
283
  "vitest": "^3.2.4",
283
- "@elevasis/sdk": "1.48.0",
284
- "@repo/core": "0.64.0",
285
- "@repo/typescript-config": "0.0.0",
284
+ "@repo/core": "0.65.0",
285
+ "@elevasis/sdk": "1.49.0",
286
286
  "@repo/elevasis-core": "1.0.0",
287
+ "@repo/typescript-config": "0.0.0",
287
288
  "@repo/eslint-config": "0.0.0"
288
289
  },
289
290
  "dependencies": {
@@ -361,7 +362,7 @@
361
362
  "lint": "eslint src --max-warnings 0",
362
363
  "check-types": "tsc --noEmit",
363
364
  "test": "vitest run --passWithNoTests",
364
- "test:publish-artifacts": "pnpm build:publish && vitest run src/__tests__/sdk-exports.test.ts src/provider/__tests__/published-surface.test.ts src/__tests__/published-artifact.test.ts src/__tests__/published-peer-dependencies.test.ts",
365
+ "test:publish-artifacts": "pnpm build:publish && vitest run src/__tests__/sdk-exports.test.ts src/provider/__tests__/published-surface.test.ts src/__tests__/published-artifact.test.ts src/__tests__/published-peer-dependencies.test.ts src/__tests__/published-subpath-identity.test.ts",
365
366
  "test:watch": "vitest watch"
366
367
  }
367
368
  }
@@ -1,36 +0,0 @@
1
- import { z } from 'zod';
2
-
3
- // src/components/typeform/schemas.ts
4
- var answerValueSchema = z.discriminatedUnion("type", [
5
- z.object({ type: z.literal("preset"), value: z.string() }),
6
- z.object({ type: z.literal("custom"), value: z.string() })
7
- ]);
8
- var multiAnswerValueSchema = z.array(answerValueSchema);
9
- function radioWithOtherSchema(presetValues) {
10
- return z.discriminatedUnion("type", [
11
- z.object({
12
- type: z.literal("preset"),
13
- value: z.enum(presetValues)
14
- }),
15
- z.object({
16
- type: z.literal("custom"),
17
- value: z.string().min(1, "Please specify a value")
18
- })
19
- ]);
20
- }
21
- function checkboxWithOtherSchema(presetValues) {
22
- return z.array(
23
- z.discriminatedUnion("type", [
24
- z.object({
25
- type: z.literal("preset"),
26
- value: z.enum(presetValues)
27
- }),
28
- z.object({
29
- type: z.literal("custom"),
30
- value: z.string().min(1, "Please specify a value")
31
- })
32
- ])
33
- );
34
- }
35
-
36
- export { answerValueSchema, checkboxWithOtherSchema, multiAnswerValueSchema, radioWithOtherSchema };
@@ -1,39 +0,0 @@
1
- import { useAuthContext } from './chunk-BRJ3QZ4E.js';
2
- import { createClient } from '@supabase/supabase-js';
3
- import { useMemo } from 'react';
4
-
5
- function getSupabaseConfig() {
6
- const url = import.meta.env?.VITE_SUPABASE_URL;
7
- const anonKey = import.meta.env?.VITE_SUPABASE_ANON_KEY;
8
- if (!url || !anonKey) {
9
- throw new Error("Missing Supabase environment variables (VITE_SUPABASE_URL, VITE_SUPABASE_ANON_KEY)");
10
- }
11
- return { url, anonKey };
12
- }
13
- var useSupabase = () => {
14
- const { getAccessToken } = useAuthContext();
15
- const { url, anonKey } = getSupabaseConfig();
16
- return useMemo(
17
- () => createClient(url, anonKey, {
18
- global: {
19
- headers: {
20
- // Additional headers if needed
21
- }
22
- },
23
- accessToken: async () => {
24
- try {
25
- const token = await getAccessToken();
26
- if (!token) {
27
- return null;
28
- }
29
- return token;
30
- } catch {
31
- return null;
32
- }
33
- }
34
- }),
35
- [getAccessToken, url, anonKey]
36
- );
37
- };
38
-
39
- export { useSupabase };