@wildo-ai/saas-frontend-lib 1.1.13 → 1.1.14

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 (101) hide show
  1. package/dist/esm/components/data-display/DisplayValueDispatcher.d.ts.map +1 -1
  2. package/dist/esm/components/data-display/DisplayValueDispatcher.js +17 -1
  3. package/dist/esm/components/data-display/DisplayValueDispatcher.js.map +1 -1
  4. package/dist/esm/components/data-display/external-data-provenance/external-data-provenance.frontend.d.ts.map +1 -1
  5. package/dist/esm/components/data-display/external-data-provenance/external-data-provenance.frontend.js +5 -2
  6. package/dist/esm/components/data-display/external-data-provenance/external-data-provenance.frontend.js.map +1 -1
  7. package/dist/esm/components/form/automated/ResourceAutomatedForm.d.ts.map +1 -1
  8. package/dist/esm/components/form/automated/ResourceAutomatedForm.js +20 -1
  9. package/dist/esm/components/form/automated/ResourceAutomatedForm.js.map +1 -1
  10. package/dist/esm/components/form/chromes/FormFieldChrome.js +1 -1
  11. package/dist/esm/components/form/chromes/FormFieldChrome.js.map +1 -1
  12. package/dist/esm/components/form/chromes/field-control-aria.d.ts +8 -1
  13. package/dist/esm/components/form/chromes/field-control-aria.d.ts.map +1 -1
  14. package/dist/esm/components/form/chromes/field-control-aria.js +19 -2
  15. package/dist/esm/components/form/chromes/field-control-aria.js.map +1 -1
  16. package/dist/esm/components/form/validation-errors/validate-field-url.frontend.d.ts +5 -0
  17. package/dist/esm/components/form/validation-errors/validate-field-url.frontend.d.ts.map +1 -1
  18. package/dist/esm/components/form/validation-errors/validate-field-url.frontend.js +6 -2
  19. package/dist/esm/components/form/validation-errors/validate-field-url.frontend.js.map +1 -1
  20. package/dist/esm/components/resources/ResourceCollectionBody_Table.d.ts.map +1 -1
  21. package/dist/esm/components/resources/ResourceCollectionBody_Table.js +8 -1
  22. package/dist/esm/components/resources/ResourceCollectionBody_Table.js.map +1 -1
  23. package/dist/esm/components/resources/ResourceLayout_DangerZone.d.ts.map +1 -1
  24. package/dist/esm/components/resources/ResourceLayout_DangerZone.js +2 -2
  25. package/dist/esm/components/resources/ResourceLayout_DangerZone.js.map +1 -1
  26. package/dist/esm/components/resources/ResourceLayout_RecordSharing.js +2 -2
  27. package/dist/esm/components/resources/ResourceLayout_RecordSharing.js.map +1 -1
  28. package/dist/esm/components/resources/ResourceListItemRenderer.d.ts.map +1 -1
  29. package/dist/esm/components/resources/ResourceListItemRenderer.js +6 -1
  30. package/dist/esm/components/resources/ResourceListItemRenderer.js.map +1 -1
  31. package/dist/esm/components/resources/skeleton/DisplayLayout.js +2 -2
  32. package/dist/esm/components/resources/skeleton/DisplayLayout.js.map +1 -1
  33. package/dist/esm/components/resources-fields/_presets/resource-reference/ResourceFieldDisplayPreset_ResourceReference_Default.d.ts.map +1 -1
  34. package/dist/esm/components/resources-fields/_presets/resource-reference/ResourceFieldDisplayPreset_ResourceReference_Default.js +71 -16
  35. package/dist/esm/components/resources-fields/_presets/resource-reference/ResourceFieldDisplayPreset_ResourceReference_Default.js.map +1 -1
  36. package/dist/esm/components/sections/surface.d.ts +12 -0
  37. package/dist/esm/components/sections/surface.d.ts.map +1 -1
  38. package/dist/esm/components/sections/surface.js +14 -0
  39. package/dist/esm/components/sections/surface.js.map +1 -1
  40. package/dist/esm/core/app-shell/shell-motion/shell-motion-origins.d.ts.map +1 -1
  41. package/dist/esm/core/app-shell/shell-motion/shell-motion-origins.js +3 -2
  42. package/dist/esm/core/app-shell/shell-motion/shell-motion-origins.js.map +1 -1
  43. package/dist/esm/core/app-shell/shell-motion/shell-motion-vocabulary.d.ts +15 -0
  44. package/dist/esm/core/app-shell/shell-motion/shell-motion-vocabulary.d.ts.map +1 -1
  45. package/dist/esm/core/app-shell/shell-motion/shell-motion-vocabulary.js +29 -0
  46. package/dist/esm/core/app-shell/shell-motion/shell-motion-vocabulary.js.map +1 -1
  47. package/dist/esm/core/app-shell/shell-motion/use-shell-motion.d.ts.map +1 -1
  48. package/dist/esm/core/app-shell/shell-motion/use-shell-motion.js +2 -2
  49. package/dist/esm/core/app-shell/shell-motion/use-shell-motion.js.map +1 -1
  50. package/dist/esm/core/branding/useBrandPresentation.d.ts.map +1 -1
  51. package/dist/esm/core/branding/useBrandPresentation.js +17 -6
  52. package/dist/esm/core/branding/useBrandPresentation.js.map +1 -1
  53. package/dist/esm/core/execution/useExecutionResourceOperationContextBuilder.d.ts.map +1 -1
  54. package/dist/esm/core/execution/useExecutionResourceOperationContextBuilder.js +11 -1
  55. package/dist/esm/core/execution/useExecutionResourceOperationContextBuilder.js.map +1 -1
  56. package/dist/esm/core/i18n/I18nContext.d.ts.map +1 -1
  57. package/dist/esm/core/i18n/I18nContext.js +8 -2
  58. package/dist/esm/core/i18n/I18nContext.js.map +1 -1
  59. package/dist/esm/core/i18n/component-label-resolution.utils.d.ts.map +1 -1
  60. package/dist/esm/core/i18n/component-label-resolution.utils.js +6 -1
  61. package/dist/esm/core/i18n/component-label-resolution.utils.js.map +1 -1
  62. package/dist/esm/core/monitoring/analytics/AnalyticsContext.d.ts +0 -15
  63. package/dist/esm/core/monitoring/analytics/AnalyticsContext.d.ts.map +1 -1
  64. package/dist/esm/core/monitoring/analytics/AnalyticsContext.js +71 -6
  65. package/dist/esm/core/monitoring/analytics/AnalyticsContext.js.map +1 -1
  66. package/dist/esm/core/monitoring/analytics/AnalyticsEventBridge.d.ts.map +1 -1
  67. package/dist/esm/core/monitoring/analytics/AnalyticsEventBridge.js +12 -3
  68. package/dist/esm/core/monitoring/analytics/AnalyticsEventBridge.js.map +1 -1
  69. package/dist/esm/core/navigation/NavigationContext.d.ts.map +1 -1
  70. package/dist/esm/core/navigation/NavigationContext.js +60 -17
  71. package/dist/esm/core/navigation/NavigationContext.js.map +1 -1
  72. package/dist/esm/core/navigation/launcher-resolution.d.ts +29 -0
  73. package/dist/esm/core/navigation/launcher-resolution.d.ts.map +1 -1
  74. package/dist/esm/core/navigation/launcher-resolution.js +31 -0
  75. package/dist/esm/core/navigation/launcher-resolution.js.map +1 -1
  76. package/dist/esm/core/navigation/navigation-controller-internals.d.ts +48 -0
  77. package/dist/esm/core/navigation/navigation-controller-internals.d.ts.map +1 -1
  78. package/dist/esm/core/navigation/navigation-controller-internals.js +56 -3
  79. package/dist/esm/core/navigation/navigation-controller-internals.js.map +1 -1
  80. package/dist/esm/core/navigation/useNavigationRouterSync.d.ts.map +1 -1
  81. package/dist/esm/core/navigation/useNavigationRouterSync.js +30 -2
  82. package/dist/esm/core/navigation/useNavigationRouterSync.js.map +1 -1
  83. package/dist/esm/core/resources/route-parent-relocation.frontend.utils.d.ts +44 -0
  84. package/dist/esm/core/resources/route-parent-relocation.frontend.utils.d.ts.map +1 -0
  85. package/dist/esm/core/resources/route-parent-relocation.frontend.utils.js +63 -0
  86. package/dist/esm/core/resources/route-parent-relocation.frontend.utils.js.map +1 -0
  87. package/dist/esm/core/resources/useOperationDirectExecution.d.ts.map +1 -1
  88. package/dist/esm/core/resources/useOperationDirectExecution.js +45 -6
  89. package/dist/esm/core/resources/useOperationDirectExecution.js.map +1 -1
  90. package/dist/esm/core/runtime/AppRouter.d.ts.map +1 -1
  91. package/dist/esm/core/runtime/AppRouter.js +18 -1
  92. package/dist/esm/core/runtime/AppRouter.js.map +1 -1
  93. package/dist/esm/core/security/UserOrgsContext.d.ts.map +1 -1
  94. package/dist/esm/core/security/UserOrgsContext.js +61 -8
  95. package/dist/esm/core/security/UserOrgsContext.js.map +1 -1
  96. package/dist/esm/core/ui/inner-control-activation.utils.d.ts +16 -0
  97. package/dist/esm/core/ui/inner-control-activation.utils.d.ts.map +1 -0
  98. package/dist/esm/core/ui/inner-control-activation.utils.js +44 -0
  99. package/dist/esm/core/ui/inner-control-activation.utils.js.map +1 -0
  100. package/dist/tsconfig.build.tsbuildinfo +1 -1
  101. package/package.json +8 -8
@@ -1 +1 @@
1
- {"version":3,"file":"external-data-provenance.frontend.js","sourceRoot":"","sources":["../../../../../src/components/data-display/external-data-provenance/external-data-provenance.frontend.ts"],"names":[],"mappings":"AAA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C,KAAK,IAAI,EAAE;QACvB,IAAI,KAA4C,CAAC;QACjD,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,oCAAoC,CAAC,SAAS,CAAC,MAAM,UAAU,CAAC,GAAG,CAAU,IAAI,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;YACrH,KAAK,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC;QAC9C,CAAC;QAAC,MAAM,CAAC;YACP,KAAK,GAAG,IAAI,CAAC;QACf,CAAC;QACD,KAAK,CAAC,GAAG,CAAC,IAAI,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;QAClD,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QACtB,MAAM,EAAE,CAAC;IACX,CAAC,CAAC,EAAE,CAAC;IACL,QAAQ,CAAC,GAAG,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;AAC3B,CAAC;AAED,6CAA6C;AAC7C,MAAM,UAAU,gCAAgC;IAC9C,MAAM,GAAG,IAAI,OAAO,EAAE,CAAC;IACvB,MAAM,EAAE,CAAC;AACX,CAAC","sourcesContent":["/**\n * Reading a pipeline destination's provenance for the display chrome (#1997) — which fields a pipeline writes, the URL\n * of the destination's provenance route, and a small cache so a record with six synced fields asks once.\n *\n * ## Why a module cache and not a provider in the context tree\n *\n * The answer is per DESTINATION and per ORGANIZATION (the route is scoped by the destination's LIST URL, which carries\n * the organization), it changes at most once per pipeline pass, and only a handful of surfaces ever need it. A provider\n * would have to sit in every application's tree for a read most of them never make. So the cache is keyed by the HTTP\n * CLIENT and the RESOLVED URL (#2109). The URL already names the organization, so switching organizations reads a\n * different entry and never shows another tenant's answer; the client names the BACKEND, because a path is relative to\n * `/api/v1` and two applications rendered in one page (a workbench, a test harness) share paths but not backends. A path\n * alone handed the second application the first one's answer. Entries expire after {@link EXTERNAL_DATA_PROVENANCE_TTL_MS}: the hook schedules\n * a re-read at the expiry of the answer it shows, so a page left open across a pipeline pass does not keep saying\n * \"as of\" an instant the copy has since moved past.\n *\n * ## Failure reads as silence\n *\n * A refused or failed read caches `null` for the same period, and the cue then renders nothing. The cue is a courtesy\n * about a value that renders correctly without it; a failed read must not become an error on the field, and must not be\n * retried on every render of every synced field.\n */\nimport {\n MAIN_API_BASE_PATH,\n type ResourceConfiguration_Operation_UrlInitiatorInfo,\n CoreResourceOperation,\n isDefaultUrlBearingOperation,\n} from '@wildo-ai/saas-models';\nimport {\n EXTERNAL_DATA_PROVENANCE_ROUTE_SEGMENT,\n ExternalDataProvenanceResponseSchema,\n listExternalDataPipelineSyncedLocalFields,\n type ExternalDataPipelineDeclaration,\n type ExternalDataProvenanceResponse,\n} from '@wildo-ai/saas-models/external-data';\n\nimport { NavigationUtils } from '~wildo-frontend-lib/core/navigation/navigation.utils';\nimport { FrontendResourceUtils } from '~wildo-frontend-lib/core/resources/frontend-resource.utils';\nimport type { AnyFrontendResourceConfiguration } from '~wildo-frontend-lib/core/resources/resources.frontend.schemas';\nimport type { WildoBackendHttpClient } from '~wildo-frontend-lib/core/requests/wildo-http-client.frontend.service';\n\n/** How long one answer is trusted: well under a pipeline's shortest sensible interval, well over one page's life. */\nexport const EXTERNAL_DATA_PROVENANCE_TTL_MS = 5 * 60 * 1000;\n\n/**\n * What the display chrome is handed for a synced field — the provenance answer once a pass has COMPLETED. A pipeline\n * that never completed one produces no cue at all rather than an \"as of\" nobody can state.\n */\nexport interface DisplayFieldProvenance {\n /** The declared system-of-record instance NAME; its words come from `systems_of_record.<name>.displayName`. */\n readonly system: string;\n /** When the most recent completed pass BEGAN reading (ISO 8601) — the instant its rows are current as of. */\n readonly currentAsOf: string;\n}\n\nconst syncedFieldsByDeclaration = new WeakMap<ExternalDataPipelineDeclaration, ReadonlySet<string>>();\n\n/** The pipeline-written local fields of a destination, derived once per declaration object. */\nexport function externalDataSyncedFieldSet(declaration: ExternalDataPipelineDeclaration): ReadonlySet<string> {\n let fields = syncedFieldsByDeclaration.get(declaration);\n if (!fields) {\n fields = new Set(listExternalDataPipelineSyncedLocalFields(declaration));\n syncedFieldsByDeclaration.set(declaration, fields);\n }\n return fields;\n}\n\n/**\n * The provenance route of a destination, composed from its default LIST operation's initiator URL. The LIST operation is\n * selected with `isDefaultUrlBearingOperation`, the same predicate the backend mounts the route with\n * (`external-data-provenance-route.backend.ts`), and exactly one must match there too — so the two sides select one\n * operation and describe one path, rather than two selections that happen to agree.\n *\n * @returns a path under `/api/v1` for the HTTP client, or `undefined` when the destination has no LIST initiator whose\n * parameters the current context can fill — in which case no request is made and no cue is shown.\n */\nexport function buildExternalDataProvenancePath(params: {\n resourceConfiguration: AnyFrontendResourceConfiguration;\n contextualParameters: Record<string, string | number>;\n}): string | undefined {\n const { resourceConfiguration, contextualParameters } = params;\n const listOperations = (resourceConfiguration.operations ?? []).filter((operation) =>\n isDefaultUrlBearingOperation(operation, CoreResourceOperation.LIST));\n if (listOperations.length !== 1) return undefined;\n const initiatorInfos = (listOperations[0]!.initiatorInfos ?? []) as ResourceConfiguration_Operation_UrlInitiatorInfo[];\n if (initiatorInfos.length === 0) return undefined;\n const initiatorInfo = FrontendResourceUtils.selectOperationUrlInitiatorInfo({\n initiatorInfos,\n contextualParameters,\n targetResourceType: resourceConfiguration.resourceIdentifier,\n targetDefaultFieldIdentifier: resourceConfiguration.resourceFieldIdentifier,\n });\n if (!initiatorInfo) return undefined;\n const resolved = NavigationUtils.resolveUrlPath(`${MAIN_API_BASE_PATH}${initiatorInfo.url}`, contextualParameters);\n if (!resolved || NavigationUtils.hasUnresolvedPlaceholders(resolved)) return undefined;\n return `${resolved}/${EXTERNAL_DATA_PROVENANCE_ROUTE_SEGMENT}`;\n}\n\ninterface CacheEntry {\n readonly value: ExternalDataProvenanceResponse | null;\n readonly fetchedAt: number;\n}\n\n/** The client a read goes through; only its identity and `get` are used. */\ntype ProvenanceClient = Pick<WildoBackendHttpClient, 'get'>;\n\ninterface ClientStore {\n readonly cache: Map<string, CacheEntry>;\n readonly inFlight: Map<string, Promise<void>>;\n}\n\n/** One store per client, so an answer read through one backend is never shown for another (#2109). */\nlet stores = new WeakMap<ProvenanceClient, ClientStore>();\nconst listeners = new Set<() => void>();\n\nfunction storeOf(client: ProvenanceClient): ClientStore {\n let store = stores.get(client);\n if (!store) {\n store = { cache: new Map(), inFlight: new Map() };\n stores.set(client, store);\n }\n return store;\n}\n\nfunction notify(): void {\n for (const listener of listeners) listener();\n}\n\n/** `useSyncExternalStore` subscription. */\nexport function subscribeExternalDataProvenance(listener: () => void): () => void {\n listeners.add(listener);\n return () => { listeners.delete(listener); };\n}\n\n/**\n * How long until the cached answer for a path expires (ms, never negative), or `undefined` when nothing is cached — the\n * hook's cue to schedule its re-read.\n */\nexport function msUntilExternalDataProvenanceExpires(\n path: string | undefined,\n client: ProvenanceClient | undefined,\n now: number = Date.now(),\n): number | undefined {\n const entry = path && client ? stores.get(client)?.cache.get(path) : undefined;\n return entry ? Math.max(0, entry.fetchedAt + EXTERNAL_DATA_PROVENANCE_TTL_MS - now) : undefined;\n}\n\n/** The cached answer for a path: the response, `null` for a refused/failed read, `undefined` while unknown. */\nexport function peekExternalDataProvenance(path: string | undefined, client: ProvenanceClient | undefined): ExternalDataProvenanceResponse | null | undefined {\n if (!path || !client) return undefined;\n return stores.get(client)?.cache.get(path)?.value;\n}\n\n/**\n * Read the path unless a fresh answer is cached or a read is already on its way. Every synced field of a record calls\n * this; exactly one request leaves.\n */\nexport function ensureExternalDataProvenance(path: string, httpClient: ProvenanceClient, now: number = Date.now()): void {\n const { cache, inFlight } = storeOf(httpClient);\n const entry = cache.get(path);\n if (entry && now - entry.fetchedAt < EXTERNAL_DATA_PROVENANCE_TTL_MS) return;\n if (inFlight.has(path)) return;\n const read = (async () => {\n let value: ExternalDataProvenanceResponse | null;\n try {\n const parsed = ExternalDataProvenanceResponseSchema.safeParse(await httpClient.get<unknown>(path, { silent: true }));\n value = parsed.success ? parsed.data : null;\n } catch {\n value = null;\n }\n cache.set(path, { value, fetchedAt: Date.now() });\n inFlight.delete(path);\n notify();\n })();\n inFlight.set(path, read);\n}\n\n/** Test seam: forget every cached answer. */\nexport function resetExternalDataProvenanceCache(): void {\n stores = new WeakMap();\n notify();\n}\n"]}
1
+ {"version":3,"file":"external-data-provenance.frontend.js","sourceRoot":"","sources":["../../../../../src/components/data-display/external-data-provenance/external-data-provenance.frontend.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,OAAO,EAEL,qBAAqB,EACrB,4BAA4B,GAC7B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,sCAAsC,EACtC,oCAAoC,EACpC,yCAAyC,GAG1C,MAAM,qCAAqC,CAAC;AAE7C,OAAO,EAAE,eAAe,EAAE,MAAM,sDAAsD,CAAC;AACvF,OAAO,EAAE,qBAAqB,EAAE,MAAM,4DAA4D,CAAC;AAInG,qHAAqH;AACrH,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC;AAa7D,MAAM,yBAAyB,GAAG,IAAI,OAAO,EAAwD,CAAC;AAEtG,+FAA+F;AAC/F,MAAM,UAAU,0BAA0B,CAAC,WAA4C;IACrF,IAAI,MAAM,GAAG,yBAAyB,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;IACxD,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,MAAM,GAAG,IAAI,GAAG,CAAC,yCAAyC,CAAC,WAAW,CAAC,CAAC,CAAC;QACzE,yBAAyB,CAAC,GAAG,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;IACrD,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,+BAA+B,CAAC,MAG/C;IACC,MAAM,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,GAAG,MAAM,CAAC;IAC/D,MA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AG,EAAE;IAC/G,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;IAChD,MAAM,KAAK,GAAG,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IAC9B,IAAI,KAAK,IAAI,GAAG,GAAG,KAAK,CAAC,SAAS,GAAG,+BAA+B;QAAE,OAAO;IAC7E,IAAI,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC;QAAE,OAAO;IAC/B,MAAM,IAAI,GAAG,CAAC,KAAK,IAAI,EAAE;QACvB,IAAI,KAA4C,CAAC;QACjD,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,oCAAoC,CAAC,SAAS,CAAC,MAAM,UAAU,CAAC,GAAG,CAAU,IAAI,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;YACrH,KAAK,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC;QAC9C,CAAC;QAAC,MAAM,CAAC;YACP,KAAK,GAAG,IAAI,CAAC;QACf,CAAC;QACD,KAAK,CAAC,GAAG,CAAC,IAAI,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;QAClD,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QACtB,MAAM,EAAE,CAAC;IACX,CAAC,CAAC,EAAE,CAAC;IACL,QAAQ,CAAC,GAAG,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;AAC3B,CAAC;AAED,6CAA6C;AAC7C,MAAM,UAAU,gCAAgC;IAC9C,MAAM,GAAG,IAAI,OAAO,EAAE,CAAC;IACvB,MAAM,EAAE,CAAC;AACX,CAAC","sourcesContent":["/**\n * Reading a pipeline destination's provenance for the display chrome (#1997) — which fields a pipeline writes, the URL\n * of the destination's provenance route, and a small cache so a record with six synced fields asks once.\n *\n * ## Why a module cache and not a provider in the context tree\n *\n * The answer is per DESTINATION and per ORGANIZATION (the route is scoped by the destination's LIST URL, which carries\n * the organization), it changes at most once per pipeline pass, and only a handful of surfaces ever need it. A provider\n * would have to sit in every application's tree for a read most of them never make. So the cache is keyed by the HTTP\n * CLIENT and the RESOLVED URL (#2109). The URL already names the organization, so switching organizations reads a\n * different entry and never shows another tenant's answer; the client names the BACKEND, because a path is relative to\n * `/api/v1` and two applications rendered in one page (a workbench, a test harness) share paths but not backends. A path\n * alone handed the second application the first one's answer. Entries expire after {@link EXTERNAL_DATA_PROVENANCE_TTL_MS}: the hook schedules\n * a re-read at the expiry of the answer it shows, so a page left open across a pipeline pass does not keep saying\n * \"as of\" an instant the copy has since moved past.\n *\n * ## Failure reads as silence\n *\n * A refused or failed read caches `null` for the same period, and the cue then renders nothing. The cue is a courtesy\n * about a value that renders correctly without it; a failed read must not become an error on the field, and must not be\n * retried on every render of every synced field.\n */\nimport {\n type ResourceConfiguration_Operation_UrlInitiatorInfo,\n CoreResourceOperation,\n isDefaultUrlBearingOperation,\n} from '@wildo-ai/saas-models';\nimport {\n EXTERNAL_DATA_PROVENANCE_ROUTE_SEGMENT,\n ExternalDataProvenanceResponseSchema,\n listExternalDataPipelineSyncedLocalFields,\n type ExternalDataPipelineDeclaration,\n type ExternalDataProvenanceResponse,\n} from '@wildo-ai/saas-models/external-data';\n\nimport { NavigationUtils } from '~wildo-frontend-lib/core/navigation/navigation.utils';\nimport { FrontendResourceUtils } from '~wildo-frontend-lib/core/resources/frontend-resource.utils';\nimport type { AnyFrontendResourceConfiguration } from '~wildo-frontend-lib/core/resources/resources.frontend.schemas';\nimport type { WildoBackendHttpClient } from '~wildo-frontend-lib/core/requests/wildo-http-client.frontend.service';\n\n/** How long one answer is trusted: well under a pipeline's shortest sensible interval, well over one page's life. */\nexport const EXTERNAL_DATA_PROVENANCE_TTL_MS = 5 * 60 * 1000;\n\n/**\n * What the display chrome is handed for a synced field — the provenance answer once a pass has COMPLETED. A pipeline\n * that never completed one produces no cue at all rather than an \"as of\" nobody can state.\n */\nexport interface DisplayFieldProvenance {\n /** The declared system-of-record instance NAME; its words come from `systems_of_record.<name>.displayName`. */\n readonly system: string;\n /** When the most recent completed pass BEGAN reading (ISO 8601) — the instant its rows are current as of. */\n readonly currentAsOf: string;\n}\n\nconst syncedFieldsByDeclaration = new WeakMap<ExternalDataPipelineDeclaration, ReadonlySet<string>>();\n\n/** The pipeline-written local fields of a destination, derived once per declaration object. */\nexport function externalDataSyncedFieldSet(declaration: ExternalDataPipelineDeclaration): ReadonlySet<string> {\n let fields = syncedFieldsByDeclaration.get(declaration);\n if (!fields) {\n fields = new Set(listExternalDataPipelineSyncedLocalFields(declaration));\n syncedFieldsByDeclaration.set(declaration, fields);\n }\n return fields;\n}\n\n/**\n * The provenance route of a destination, composed from its default LIST operation's initiator URL. The LIST operation is\n * selected with `isDefaultUrlBearingOperation`, the same predicate the backend mounts the route with\n * (`external-data-provenance-route.backend.ts`), and exactly one must match there too — so the two sides select one\n * operation and describe one path, rather than two selections that happen to agree.\n *\n * @returns a path under `/api/v1` for the HTTP client, or `undefined` when the destination has no LIST initiator whose\n * parameters the current context can fill — in which case no request is made and no cue is shown.\n */\nexport function buildExternalDataProvenancePath(params: {\n resourceConfiguration: AnyFrontendResourceConfiguration;\n contextualParameters: Record<string, string | number>;\n}): string | undefined {\n const { resourceConfiguration, contextualParameters } = params;\n const listOperations = (resourceConfiguration.operations ?? []).filter((operation) =>\n isDefaultUrlBearingOperation(operation, CoreResourceOperation.LIST));\n if (listOperations.length !== 1) return undefined;\n const initiatorInfos = (listOperations[0]!.initiatorInfos ?? []) as ResourceConfiguration_Operation_UrlInitiatorInfo[];\n if (initiatorInfos.length === 0) return undefined;\n const initiatorInfo = FrontendResourceUtils.selectOperationUrlInitiatorInfo({\n initiatorInfos,\n contextualParameters,\n targetResourceType: resourceConfiguration.resourceIdentifier,\n targetDefaultFieldIdentifier: resourceConfiguration.resourceFieldIdentifier,\n });\n if (!initiatorInfo) return undefined;\n // The initiator URL is the API route the backend mounts verbatim, and it already begins with `/api/v1`\n // (`buildUrlForParentCombination` with `isFrontend: false`), so it is resolved as it is. Prefixing it again\n // doubled the base path, the defect #3858 found on the validate-field sibling of this composition.\n const resolved = NavigationUtils.resolveUrlPath(initiatorInfo.url, contextualParameters);\n if (!resolved || NavigationUtils.hasUnresolvedPlaceholders(resolved)) return undefined;\n return `${resolved}/${EXTERNAL_DATA_PROVENANCE_ROUTE_SEGMENT}`;\n}\n\ninterface CacheEntry {\n readonly value: ExternalDataProvenanceResponse | null;\n readonly fetchedAt: number;\n}\n\n/** The client a read goes through; only its identity and `get` are used. */\ntype ProvenanceClient = Pick<WildoBackendHttpClient, 'get'>;\n\ninterface ClientStore {\n readonly cache: Map<string, CacheEntry>;\n readonly inFlight: Map<string, Promise<void>>;\n}\n\n/** One store per client, so an answer read through one backend is never shown for another (#2109). */\nlet stores = new WeakMap<ProvenanceClient, ClientStore>();\nconst listeners = new Set<() => void>();\n\nfunction storeOf(client: ProvenanceClient): ClientStore {\n let store = stores.get(client);\n if (!store) {\n store = { cache: new Map(), inFlight: new Map() };\n stores.set(client, store);\n }\n return store;\n}\n\nfunction notify(): void {\n for (const listener of listeners) listener();\n}\n\n/** `useSyncExternalStore` subscription. */\nexport function subscribeExternalDataProvenance(listener: () => void): () => void {\n listeners.add(listener);\n return () => { listeners.delete(listener); };\n}\n\n/**\n * How long until the cached answer for a path expires (ms, never negative), or `undefined` when nothing is cached — the\n * hook's cue to schedule its re-read.\n */\nexport function msUntilExternalDataProvenanceExpires(\n path: string | undefined,\n client: ProvenanceClient | undefined,\n now: number = Date.now(),\n): number | undefined {\n const entry = path && client ? stores.get(client)?.cache.get(path) : undefined;\n return entry ? Math.max(0, entry.fetchedAt + EXTERNAL_DATA_PROVENANCE_TTL_MS - now) : undefined;\n}\n\n/** The cached answer for a path: the response, `null` for a refused/failed read, `undefined` while unknown. */\nexport function peekExternalDataProvenance(path: string | undefined, client: ProvenanceClient | undefined): ExternalDataProvenanceResponse | null | undefined {\n if (!path || !client) return undefined;\n return stores.get(client)?.cache.get(path)?.value;\n}\n\n/**\n * Read the path unless a fresh answer is cached or a read is already on its way. Every synced field of a record calls\n * this; exactly one request leaves.\n */\nexport function ensureExternalDataProvenance(path: string, httpClient: ProvenanceClient, now: number = Date.now()): void {\n const { cache, inFlight } = storeOf(httpClient);\n const entry = cache.get(path);\n if (entry && now - entry.fetchedAt < EXTERNAL_DATA_PROVENANCE_TTL_MS) return;\n if (inFlight.has(path)) return;\n const read = (async () => {\n let value: ExternalDataProvenanceResponse | null;\n try {\n const parsed = ExternalDataProvenanceResponseSchema.safeParse(await httpClient.get<unknown>(path, { silent: true }));\n value = parsed.success ? parsed.data : null;\n } catch {\n value = null;\n }\n cache.set(path, { value, fetchedAt: Date.now() });\n inFlight.delete(path);\n notify();\n })();\n inFlight.set(path, read);\n}\n\n/** Test seam: forget every cached answer. */\nexport function resetExternalDataProvenanceCache(): void {\n stores = new WeakMap();\n notify();\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"ResourceAutomatedForm.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/automated/ResourceAutomatedForm.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAIH,OAAO,KAAyF,MAAM,OAAO,CAAC;AAE9G,OAAO,EAAE,aAAa,EAA+B,MAAM,iBAAiB,CAAC;AAkD7E,OAAO,EAAqG,eAAe,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC9K,OAAO,EAEL,KAAK,mBAAmB,EACzB,MAAM,qCAAqC,CAAC;AAC7C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wDAAwD,CAAC;AAgC7F,OAAO,EAAE,gCAAgC,EAAE,MAAM,+DAA+D,CAAC;AAqDjH,OAAO,EAIL,KAAK,8BAA8B,EACpC,MAAM,+EAA+E,CAAC;AA4GvF,MAAM,WAAW,0BAA0B;IACzC,sEAAsE;IACtE,eAAe,EAAE,gC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5C,YAAY,CAAC,EAAE,MAAM,CAAC;KACvB,CAAC;IAEF;;;;;;;;OAQG;IACH,aAAa,CAAC,EAAE,CACd,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,MAAM,EAAE,EACpB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAC1B,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAE1B;;;OAGG;IACH,qBAAqB,CAAC,EAAE,aAAa,CAAC,GAAG,CAAC,CAAC;IAC3C,oEAAoE;IACpE,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC;;;;;;;;;;;;OAYG;IACH,8BAA8B,CAAC,EAAE,8BAA8B,CAAC;CACjE;AA4MD,wBAAgB,qBAAqB,CAAC,EACpC,eAAe,EACf,SAAS,EACT,OAAO,EACP,QAAQ,EACR,QAAgB,EAChB,SAAS,EACT,cAAc,EACd,gBAAuB,EACvB,cAAc,EACd,cAAc,EACd,WAAW,EACX,aAAa,EAAE,iBAAiB,EAChC,qBAAqB,EACrB,cAAc,EACd,8BAA8B,EAAE,oCAAoC,GACrE,EAAE,0BAA0B,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,GAAG,IAAI,CAi6FvD"}
1
+ {"version":3,"file":"ResourceAutomatedForm.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/automated/ResourceAutomatedForm.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAIH,OAAO,KAAyF,MAAM,OAAO,CAAC;AAE9G,OAAO,EAAE,aAAa,EAA+B,MAAM,iBAAiB,CAAC;AAkD7E,OAAO,EAAqG,eAAe,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC9K,OAAO,EAEL,KAAK,mBAAmB,EACzB,MAAM,qCAAqC,CAAC;AAC7C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wDAAwD,CAAC;AAgC7F,OAAO,EAAE,gCAAgC,EAAE,MAAM,+DAA+D,CAAC;AAsDjH,OAAO,EAI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,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;QAC5C,kDAAkD;QAClD,cAAc,CAAC,EAAE,MAAM,CAAC;QACxB,4CAA4C;QAC5C,YAAY,CAAC,EAAE,MAAM,CAAC;KACvB,CAAC;IAEF;;;;;;;;OAQG;IACH,aAAa,CAAC,EAAE,CACd,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,MAAM,EAAE,EACpB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAC1B,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAE1B;;;OAGG;IACH,qBAAqB,CAAC,EAAE,aAAa,CAAC,GAAG,CAAC,CAAC;IAC3C,oEAAoE;IACpE,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC;;;;;;;;;;;;OAYG;IACH,8BAA8B,CAAC,EAAE,8BAA8B,CAAC;CACjE;AA4MD,wBAAgB,qBAAqB,CAAC,EACpC,eAAe,EACf,SAAS,EACT,OAAO,EACP,QAAQ,EACR,QAAgB,EAChB,SAAS,EACT,cAAc,EACd,gBAAuB,EACvB,cAAc,EACd,cAAc,EACd,WAAW,EACX,aAAa,EAAE,iBAAiB,EAChC,qBAAqB,EACrB,cAAc,EACd,8BAA8B,EAAE,oCAAoC,GACrE,EAAE,0BAA0B,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,GAAG,IAAI,CAm7FvD"}
@@ -59,6 +59,7 @@ import { isLiteralCoreResourceOperation, isRiskyResourceOperation, isSingleResou
59
59
  import { pickPreferredOperationForCoreSemanticAddressability } from '../../../core/resources/resource-addressability.frontend.utils.js';
60
60
  import { useOperationEnabled } from '../../../core/resources/hooks/useOperationEnabled.js';
61
61
  import { frontendResourceUtils, FrontendResourceUtils } from '../../../core/resources/frontend-resource.utils.js';
62
+ import { readRequestFieldRowFields, resolveRouteParentRelocation, rowValuesSetByRequest } from '../../../core/resources/route-parent-relocation.frontend.utils.js';
62
63
  import { resolveRelationshipWriteSurface, } from '../../../core/resources/relationship-surface-runtime.frontend.utils.js';
63
64
  import { useEventBus } from '../../../core/events/useEventBus.js';
64
65
  import { useResourceOperationOutcomeEmitter } from '../../../core/resources/useResourceOperationOutcomeEmitter.js';
@@ -1657,11 +1658,25 @@ export function ResourceAutomatedForm({ resourceContext, onSuccess, onError, onC
1657
1658
  let result;
1658
1659
  // RMM path: queue full submit (cancelPendingAutosavesRef already called rmm.cancelPendingMutations())
1659
1660
  if (rmm) {
1661
+ /*
1662
+ * A write that moves the row out of a parent the route is scoped by (a todo moved out of the list it was opened
1663
+ * in) is not read back: the read is addressed under that parent, which answers 404 once the row has left, and a
1664
+ * failed read-back strips the answer and schedules recovery reads of the same dead address (#3860). The written
1665
+ * row is the answer instead, and the host opens it where it now is (`useOperationDirectExecution`).
1666
+ */
1667
+ const movesRowOutOfRoute = isUpdateLikeOperation && resolveRouteParentRelocation({
1668
+ resourceType,
1669
+ contextResourceIdentifiers: contextResourceIdentifiersWithResourceId,
1670
+ rowValues: rowValuesSetByRequest(data, readRequestFieldRowFields(operation)),
1671
+ registry,
1672
+ }) !== undefined;
1660
1673
  const mutationResult = await rmm.queueMutation(data, {
1661
1674
  type: MutationType.SUBMIT,
1662
1675
  priority: MutationPriority.HIGH,
1663
1676
  source: { type: MutationSourceType.FORM, subscriberId: 'submit' },
1664
- transportOverride: currentOperationTransportOverride,
1677
+ transportOverride: movesRowOutOfRoute
1678
+ ? { ...currentOperationTransportOverride, readBackOnSuccess: false }
1679
+ : currentOperationTransportOverride,
1665
1680
  });
1666
1681
  if (!mutationResult.success) {
1667
1682
  if (isConflictMutationFailure(mutationResult)) {
@@ -1808,7 +1823,11 @@ export function ResourceAutomatedForm({ resourceContext, onSuccess, onError, onC
1808
1823
  }, [
1809
1824
  assertRMMAvailableForDefaultUpdateLikeMutation,
1810
1825
  contextFieldValues,
1826
+ contextResourceIdentifiersWithResourceId,
1811
1827
  currentOperationTransportOverride,
1828
+ isUpdateLikeOperation,
1829
+ registry,
1830
+ resourceType,
1812
1831
  injectServerErrors,
1813
1832
  mergeRequestDataWithBulkSelection,
1814
1833
  operationIdentifier,