@wildo-ai/saas-frontend-lib 1.1.13 → 1.1.15
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/esm/components/ai-elements/meta/agent-wrappers.d.ts +1 -0
- package/dist/esm/components/ai-elements/meta/agent-wrappers.d.ts.map +1 -1
- package/dist/esm/components/ai-elements/meta/agent-wrappers.js.map +1 -1
- package/dist/esm/components/compliance/EmbeddedSigningFrame.d.ts +38 -0
- package/dist/esm/components/compliance/EmbeddedSigningFrame.d.ts.map +1 -0
- package/dist/esm/components/compliance/EmbeddedSigningFrame.js +106 -0
- package/dist/esm/components/compliance/EmbeddedSigningFrame.js.map +1 -0
- package/dist/esm/components/data-display/DisplayValueDispatcher.d.ts.map +1 -1
- package/dist/esm/components/data-display/DisplayValueDispatcher.js +17 -1
- package/dist/esm/components/data-display/DisplayValueDispatcher.js.map +1 -1
- package/dist/esm/components/data-display/ResourceAutomaticDisplayer.d.ts.map +1 -1
- package/dist/esm/components/data-display/ResourceAutomaticDisplayer.js +22 -0
- package/dist/esm/components/data-display/ResourceAutomaticDisplayer.js.map +1 -1
- package/dist/esm/components/data-display/external-data-provenance/external-data-provenance.frontend.d.ts.map +1 -1
- package/dist/esm/components/data-display/external-data-provenance/external-data-provenance.frontend.js +5 -2
- package/dist/esm/components/data-display/external-data-provenance/external-data-provenance.frontend.js.map +1 -1
- package/dist/esm/components/flows-actors/agent-config.labels.d.ts.map +1 -1
- package/dist/esm/components/flows-actors/agent-config.labels.js +2 -0
- package/dist/esm/components/flows-actors/agent-config.labels.js.map +1 -1
- package/dist/esm/components/flows-actors/approval.d.ts +7 -1
- package/dist/esm/components/flows-actors/approval.d.ts.map +1 -1
- package/dist/esm/components/flows-actors/approval.js +22 -5
- package/dist/esm/components/flows-actors/approval.js.map +1 -1
- package/dist/esm/components/form/automated/ResourceAutomatedForm.d.ts.map +1 -1
- package/dist/esm/components/form/automated/ResourceAutomatedForm.js +20 -1
- package/dist/esm/components/form/automated/ResourceAutomatedForm.js.map +1 -1
- package/dist/esm/components/form/chromes/FormFieldChrome.js +1 -1
- package/dist/esm/components/form/chromes/FormFieldChrome.js.map +1 -1
- package/dist/esm/components/form/chromes/field-control-aria.d.ts +8 -1
- package/dist/esm/components/form/chromes/field-control-aria.d.ts.map +1 -1
- package/dist/esm/components/form/chromes/field-control-aria.js +19 -2
- package/dist/esm/components/form/chromes/field-control-aria.js.map +1 -1
- package/dist/esm/components/form/validation-errors/validate-field-url.frontend.d.ts +5 -0
- package/dist/esm/components/form/validation-errors/validate-field-url.frontend.d.ts.map +1 -1
- package/dist/esm/components/form/validation-errors/validate-field-url.frontend.js +6 -2
- package/dist/esm/components/form/validation-errors/validate-field-url.frontend.js.map +1 -1
- package/dist/esm/components/resources/ResourceCollectionBody_Table.d.ts.map +1 -1
- package/dist/esm/components/resources/ResourceCollectionBody_Table.js +8 -1
- package/dist/esm/components/resources/ResourceCollectionBody_Table.js.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_DangerZone.d.ts.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_DangerZone.js +2 -2
- package/dist/esm/components/resources/ResourceLayout_DangerZone.js.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_RecordSharing.js +2 -2
- package/dist/esm/components/resources/ResourceLayout_RecordSharing.js.map +1 -1
- package/dist/esm/components/resources/ResourceListItemRenderer.d.ts.map +1 -1
- package/dist/esm/components/resources/ResourceListItemRenderer.js +6 -1
- package/dist/esm/components/resources/ResourceListItemRenderer.js.map +1 -1
- package/dist/esm/components/resources/skeleton/DisplayLayout.js +2 -2
- package/dist/esm/components/resources/skeleton/DisplayLayout.js.map +1 -1
- package/dist/esm/components/resources-fields/_presets/resource-reference/ResourceFieldDisplayPreset_ResourceReference_Default.d.ts.map +1 -1
- package/dist/esm/components/resources-fields/_presets/resource-reference/ResourceFieldDisplayPreset_ResourceReference_Default.js +71 -16
- package/dist/esm/components/resources-fields/_presets/resource-reference/ResourceFieldDisplayPreset_ResourceReference_Default.js.map +1 -1
- package/dist/esm/components/sections/surface.d.ts +12 -0
- package/dist/esm/components/sections/surface.d.ts.map +1 -1
- package/dist/esm/components/sections/surface.js +14 -0
- package/dist/esm/components/sections/surface.js.map +1 -1
- package/dist/esm/core/app-shell/shell-motion/shell-motion-origins.d.ts.map +1 -1
- package/dist/esm/core/app-shell/shell-motion/shell-motion-origins.js +3 -2
- package/dist/esm/core/app-shell/shell-motion/shell-motion-origins.js.map +1 -1
- package/dist/esm/core/app-shell/shell-motion/shell-motion-vocabulary.d.ts +15 -0
- package/dist/esm/core/app-shell/shell-motion/shell-motion-vocabulary.d.ts.map +1 -1
- package/dist/esm/core/app-shell/shell-motion/shell-motion-vocabulary.js +29 -0
- package/dist/esm/core/app-shell/shell-motion/shell-motion-vocabulary.js.map +1 -1
- package/dist/esm/core/app-shell/shell-motion/use-shell-motion.d.ts.map +1 -1
- package/dist/esm/core/app-shell/shell-motion/use-shell-motion.js +2 -2
- package/dist/esm/core/app-shell/shell-motion/use-shell-motion.js.map +1 -1
- package/dist/esm/core/branding/useBrandPresentation.d.ts.map +1 -1
- package/dist/esm/core/branding/useBrandPresentation.js +17 -6
- package/dist/esm/core/branding/useBrandPresentation.js.map +1 -1
- package/dist/esm/core/events/events.frontend.schemas.d.ts +40 -0
- package/dist/esm/core/events/events.frontend.schemas.d.ts.map +1 -1
- package/dist/esm/core/events/events.frontend.schemas.js +24 -1
- package/dist/esm/core/events/events.frontend.schemas.js.map +1 -1
- package/dist/esm/core/execution/useExecutionResourceOperationContextBuilder.d.ts.map +1 -1
- package/dist/esm/core/execution/useExecutionResourceOperationContextBuilder.js +11 -1
- package/dist/esm/core/execution/useExecutionResourceOperationContextBuilder.js.map +1 -1
- package/dist/esm/core/i18n/I18nContext.d.ts.map +1 -1
- package/dist/esm/core/i18n/I18nContext.js +8 -2
- package/dist/esm/core/i18n/I18nContext.js.map +1 -1
- package/dist/esm/core/i18n/component-label-resolution.utils.d.ts.map +1 -1
- package/dist/esm/core/i18n/component-label-resolution.utils.js +6 -1
- package/dist/esm/core/i18n/component-label-resolution.utils.js.map +1 -1
- package/dist/esm/core/monitoring/analytics/AnalyticsContext.d.ts +0 -15
- package/dist/esm/core/monitoring/analytics/AnalyticsContext.d.ts.map +1 -1
- package/dist/esm/core/monitoring/analytics/AnalyticsContext.js +102 -5
- package/dist/esm/core/monitoring/analytics/AnalyticsContext.js.map +1 -1
- package/dist/esm/core/monitoring/analytics/AnalyticsEventBridge.d.ts.map +1 -1
- package/dist/esm/core/monitoring/analytics/AnalyticsEventBridge.js +12 -3
- package/dist/esm/core/monitoring/analytics/AnalyticsEventBridge.js.map +1 -1
- package/dist/esm/core/navigation/NavigationContext.d.ts.map +1 -1
- package/dist/esm/core/navigation/NavigationContext.js +60 -17
- package/dist/esm/core/navigation/NavigationContext.js.map +1 -1
- package/dist/esm/core/navigation/launcher-resolution.d.ts +29 -0
- package/dist/esm/core/navigation/launcher-resolution.d.ts.map +1 -1
- package/dist/esm/core/navigation/launcher-resolution.js +31 -0
- package/dist/esm/core/navigation/launcher-resolution.js.map +1 -1
- package/dist/esm/core/navigation/navigation-controller-internals.d.ts +48 -0
- package/dist/esm/core/navigation/navigation-controller-internals.d.ts.map +1 -1
- package/dist/esm/core/navigation/navigation-controller-internals.js +56 -3
- package/dist/esm/core/navigation/navigation-controller-internals.js.map +1 -1
- package/dist/esm/core/navigation/useNavigationRouterSync.d.ts.map +1 -1
- package/dist/esm/core/navigation/useNavigationRouterSync.js +30 -2
- package/dist/esm/core/navigation/useNavigationRouterSync.js.map +1 -1
- package/dist/esm/core/resources/resource-read-cache.frontend.service.d.ts +6 -1
- package/dist/esm/core/resources/resource-read-cache.frontend.service.d.ts.map +1 -1
- package/dist/esm/core/resources/resource-read-cache.frontend.service.js +11 -1
- package/dist/esm/core/resources/resource-read-cache.frontend.service.js.map +1 -1
- package/dist/esm/core/resources/route-parent-relocation.frontend.utils.d.ts +44 -0
- package/dist/esm/core/resources/route-parent-relocation.frontend.utils.d.ts.map +1 -0
- package/dist/esm/core/resources/route-parent-relocation.frontend.utils.js +63 -0
- package/dist/esm/core/resources/route-parent-relocation.frontend.utils.js.map +1 -0
- package/dist/esm/core/resources/useOperationDirectExecution.d.ts.map +1 -1
- package/dist/esm/core/resources/useOperationDirectExecution.js +45 -6
- package/dist/esm/core/resources/useOperationDirectExecution.js.map +1 -1
- package/dist/esm/core/runtime/AppRouter.d.ts.map +1 -1
- package/dist/esm/core/runtime/AppRouter.js +18 -1
- package/dist/esm/core/runtime/AppRouter.js.map +1 -1
- package/dist/esm/core/runtime/ApplicationMainContext.d.ts +1 -1
- package/dist/esm/core/runtime/ApplicationMainContext.d.ts.map +1 -1
- package/dist/esm/core/runtime/ApplicationMainContext.js +12 -3
- package/dist/esm/core/runtime/ApplicationMainContext.js.map +1 -1
- package/dist/esm/core/security/UserOrgsContext.d.ts +6 -1
- package/dist/esm/core/security/UserOrgsContext.d.ts.map +1 -1
- package/dist/esm/core/security/UserOrgsContext.js +87 -10
- package/dist/esm/core/security/UserOrgsContext.js.map +1 -1
- package/dist/esm/core/security/consent-gate.frontend.utils.d.ts +17 -5
- package/dist/esm/core/security/consent-gate.frontend.utils.d.ts.map +1 -1
- package/dist/esm/core/security/consent-gate.frontend.utils.js +16 -7
- package/dist/esm/core/security/consent-gate.frontend.utils.js.map +1 -1
- package/dist/esm/core/security/useConsentGateBehavior.js +1 -1
- package/dist/esm/core/security/useConsentGateBehavior.js.map +1 -1
- package/dist/esm/core/security/useGrantedConsentPurposes.js +1 -1
- package/dist/esm/core/security/useGrantedConsentPurposes.js.map +1 -1
- package/dist/esm/core/ui/inner-control-activation.utils.d.ts +16 -0
- package/dist/esm/core/ui/inner-control-activation.utils.d.ts.map +1 -0
- package/dist/esm/core/ui/inner-control-activation.utils.js +44 -0
- package/dist/esm/core/ui/inner-control-activation.utils.js.map +1 -0
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +1 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +8 -8
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-wrappers.d.ts","sourceRoot":"","sources":["../../../../../src/components/ai-elements/meta/agent-wrappers.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,EAAE,oBAAoB,EAAE,MAAM,kFAAkF,CAAA;AACvH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAA;AAI3C,MAAM,MAAM,WAAW,GAAG,QAAQ,GAAG,UAAU,GAAG,YAAY,CAAA;AAC9D,MAAM,MAAM,cAAc,GAAG,YAAY,GAAG,UAAU,GAAG,gBAAgB,GAAG,UAAU,GAAG,MAAM,GAAG,QAAQ,CAAA;AAC1G,MAAM,MAAM,cAAc,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,CAAA;AACtD,MAAM,MAAM,SAAS,GAAG,SAAS,GAAG,QAAQ,GAAG,QAAQ,GAAG,WAAW,CAAA;AACrE,MAAM,MAAM,mBAAmB,GAAG,UAAU,GAAG,QAAQ,GAAG,SAAS,GAAG,OAAO,GAAG,YAAY,CAAA;AAC5F,MAAM,MAAM,sBAAsB,GAAG,KAAK,GAAG,OAAO,GAAG,cAAc,GAAG,MAAM,CAAA;AAE9E,MAAM,MAAM,eAAe,GAAG;IAC5B,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,mBAAmB,CAAA;IACzB,WAAW,CAAC,EAAE,QAAQ,GAAG,MAAM,GAAG,KAAK,CAAA;CACxC,CAAA;AAED,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,cAAc,CAAC,EAAE,cAAc,CAAA;IAC/B,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC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,CAAC,EAAE,MAAgC,EAAE,GAAG,KAAK,EAAE,EAAE,iBAAiB,GAAG,oBAAoB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAGxI;AAED,wBAAgB,YAAY,CAAC,EAAE,MAAgC,EAAE,GAAG,KAAK,EAAE,EAAE,iBAAiB,GAAG,oBAAoB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAGxI;AAED,wBAAgB,kBAAkB,CAAC,EAAE,MAAgC,EAAE,GAAG,KAAK,EAAE,EAAE,uBAAuB,GAAG,oBAAoB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAGpJ;AAED,wBAAgB,oBAAoB,CAAC,EAAE,MAAgC,EAAE,GAAG,KAAK,EAAE,EAAE,yBAAyB,GAAG,oBAAoB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAGxJ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-wrappers.js","sourceRoot":"","sources":["../../../../../src/components/ai-elements/meta/agent-wrappers.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,qBAAqB,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAA;AAC5F,OAAO,EAAE,uBAAuB,EAAE,MAAM,iFAAiF,CAAA;
|
|
1
|
+
{"version":3,"file":"agent-wrappers.js","sourceRoot":"","sources":["../../../../../src/components/ai-elements/meta/agent-wrappers.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,qBAAqB,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAA;AAC5F,OAAO,EAAE,uBAAuB,EAAE,MAAM,iFAAiF,CAAA;AAoGzH,mBAAmB;AAEnB,MAAM,UAAU,YAAY,CAAC,EAAE,MAAM,GAAG,eAAe,CAAC,OAAO,EAAE,GAAG,KAAK,EAA4C;IACnH,MAAM,SAAS,GAAG,uBAAuB,CAAoB,qBAAqB,CAAC,uBAAuB,EAAE,cAAc,CAAC,CAAC,MAAM,CAAC,CAAA;IACnI,OAAO,KAAC,SAAS,OAAK,KAAK,GAAI,CAAA;AACjC,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,EAAE,MAAM,GAAG,eAAe,CAAC,OAAO,EAAE,GAAG,KAAK,EAA4C;IACnH,MAAM,SAAS,GAAG,uBAAuB,CAAoB,qBAAqB,CAAC,uBAAuB,EAAE,cAAc,CAAC,CAAC,MAAM,CAAC,CAAA;IACnI,OAAO,KAAC,SAAS,OAAK,KAAK,GAAI,CAAA;AACjC,CAAC;AAED,MAAM,UAAU,kBAAkB,CAAC,EAAE,MAAM,GAAG,eAAe,CAAC,OAAO,EAAE,GAAG,KAAK,EAAkD;IAC/H,MAAM,SAAS,GAAG,uBAAuB,CAA0B,qBAAqB,CAAC,8BAA8B,EAAE,oBAAoB,CAAC,CAAC,MAAM,CAAC,CAAA;IACtJ,OAAO,KAAC,SAAS,OAAK,KAAK,GAAI,CAAA;AACjC,CAAC;AAED,MAAM,UAAU,oBAAoB,CAAC,EAAE,MAAM,GAAG,eAAe,CAAC,OAAO,EAAE,GAAG,KAAK,EAAoD;IACnI,MAAM,SAAS,GAAG,uBAAuB,CAA4B,qBAAqB,CAAC,+BAA+B,EAAE,sBAAsB,CAAC,CAAC,MAAM,CAAC,CAAA;IAC3J,OAAO,KAAC,SAAS,OAAK,KAAK,GAAI,CAAA;AACjC,CAAC","sourcesContent":["import React from 'react'\nimport { FrontendComponentType, CorePresetNames } from '@wildo-ai/presets-components-models'\nimport { createComponentResolver } from '~wildo-frontend-lib/core/components-registry/component-resolver.frontend.helper'\nimport { ComponentPresetProps } from '~wildo-frontend-lib/core/components-registry/component-registry.frontend.schemas'\nimport type { ComponentProps } from 'react'\n\n// --- Contracts ---\n\nexport type AgentStatus = \"ACTIVE\" | \"INACTIVE\" | \"DEPRECATED\"\nexport type AgentSkillType = \"GENERATION\" | \"ANALYSIS\" | \"TRANSFORMATION\" | \"DECISION\" | \"CHAT\" | \"CUSTOM\"\nexport type AgentVerbosity = \"LOW\" | \"MEDIUM\" | \"HIGH\"\nexport type AgentTone = \"NEUTRAL\" | \"CASUAL\" | \"FORMAL\" | \"TECHNICAL\"\nexport type AgentConstraintType = \"SECURITY\" | \"SAFETY\" | \"PRIVACY\" | \"SCOPE\" | \"COMPLIANCE\"\nexport type AgentUncertaintyPolicy = \"ASK\" | \"INFER\" | \"CONSERVATIVE\" | \"FAIL\"\n\nexport type AgentConstraint = {\n id: string\n text: string\n type: AgentConstraintType\n onViolation?: \"refuse\" | \"warn\" | \"log\"\n}\n\nexport type AgentOutputSpec = {\n type?: string\n fileFormat?: string\n lengthGuidance?: AgentVerbosity\n includeReasoning?: boolean\n requiredSections?: string[]\n}\n\nexport type AgentUncertainty = {\n policy: AgentUncertaintyPolicy\n confidenceThreshold?: number\n}\n\nexport type AgentExample = {\n input: string\n output: string\n explanation?: string\n}\n\nexport type AgentPromptSpec = {\n role: string\n persona?: string\n skillType: AgentSkillType\n constraints?: AgentConstraint[]\n goal?: string\n output?: AgentOutputSpec\n instructions?: string[]\n hints?: string[]\n uncertainty?: AgentUncertainty\n outOfScope?: string[]\n examples?: AgentExample[]\n style?: { verbosity?: AgentVerbosity; tone?: AgentTone }\n curation?: { maxItems?: number; minRelevance?: number; maxTokens?: number }\n promptFormatOverride?: string\n metadata?: { version?: string; lastModified?: string; author?: string; changelog?: string }\n}\n\nexport type AgentCapabilities = {\n tools?: {\n functionRefs: string[]\n mcpRefs: string[]\n remoteAgentRefs?: string[]\n }\n}\n\nexport type AgentConfigData = {\n operationKey?: string\n seed?: number\n modelName?: string\n}\n\nexport type AgentData = {\n ref: string\n displayName: string\n status: AgentStatus\n promptSpec: AgentPromptSpec\n capabilities?: AgentCapabilities\n config?: AgentConfigData\n version?: string\n createdAt?: string\n updatedAt?: string\n}\n\nexport type AI_AgentListProps = ComponentProps<\"div\"> & {\n agents: AgentData[]\n}\n\nexport type AI_AgentCardProps = ComponentProps<\"div\"> & {\n agent: AgentData\n defaultExpanded?: boolean\n}\n\nexport type AI_AgentPromptSpecProps = ComponentProps<\"div\"> & {\n spec: AgentPromptSpec\n}\n\nexport type AI_AgentCapabilitiesProps = ComponentProps<\"div\"> & {\n capabilities?: AgentCapabilities\n}\n\n// --- Wrappers ---\n\nexport function AI_AgentList({ preset = CorePresetNames.DEFAULT, ...props }: AI_AgentListProps & ComponentPresetProps): React.JSX.Element {\n const Component = createComponentResolver<AI_AgentListProps>(FrontendComponentType.LOW_LEVEL_AI_AGENT_LIST, 'AI_AgentList')(preset)\n return <Component {...props} />\n}\n\nexport function AI_AgentCard({ preset = CorePresetNames.DEFAULT, ...props }: AI_AgentCardProps & ComponentPresetProps): React.JSX.Element {\n const Component = createComponentResolver<AI_AgentCardProps>(FrontendComponentType.LOW_LEVEL_AI_AGENT_CARD, 'AI_AgentCard')(preset)\n return <Component {...props} />\n}\n\nexport function AI_AgentPromptSpec({ preset = CorePresetNames.DEFAULT, ...props }: AI_AgentPromptSpecProps & ComponentPresetProps): React.JSX.Element {\n const Component = createComponentResolver<AI_AgentPromptSpecProps>(FrontendComponentType.LOW_LEVEL_AI_AGENT_PROMPT_SPEC, 'AI_AgentPromptSpec')(preset)\n return <Component {...props} />\n}\n\nexport function AI_AgentCapabilities({ preset = CorePresetNames.DEFAULT, ...props }: AI_AgentCapabilitiesProps & ComponentPresetProps): React.JSX.Element {\n const Component = createComponentResolver<AI_AgentCapabilitiesProps>(FrontendComponentType.LOW_LEVEL_AI_AGENT_CAPABILITIES, 'AI_AgentCapabilities')(preset)\n return <Component {...props} />\n}\n"]}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/** @wildo_source:part:start saas.frontend.electronic-signatures.embedded-signing-frame facet:layer:frontend facet:audience:app-developer */
|
|
3
|
+
/**
|
|
4
|
+
* Embedded signing: the signed-in person signs a record's deliverable at the signature vendor, inside a frame of the
|
|
5
|
+
* application, instead of following the vendor's e-mail. Import from `@wildo-ai/saas-frontend-lib`.
|
|
6
|
+
*
|
|
7
|
+
* Place it where the person meets the record (an engagement letter's page, say). On mount it asks the backend for the
|
|
8
|
+
* vendor's signing page (`signatureRequestSigners.openSigningSession`). The answer is given only to a signer an open
|
|
9
|
+
* request on that record names and the vendor says has not signed yet, so for anybody else, once the person has signed,
|
|
10
|
+
* and when the request's provider signs from its e-mail only, the component renders NOTHING. The page is valid for
|
|
11
|
+
* minutes and is never stored, which is why it is asked for here, when the person is in front of it. A signer whose turn
|
|
12
|
+
* has not come (signers who sign in turn) is shown nothing either, until it does.
|
|
13
|
+
*
|
|
14
|
+
* When the person is done, a vendor that redirects sends the frame to the application's own {@link SIGNING_RETURN_PAGE_PATH};
|
|
15
|
+
* the frame sees it arrive (it is now same-origin), closes, and calls `onSigningReturned`. A vendor that does not redirect
|
|
16
|
+
* (or redirects to another of the application's origins) keeps showing its own end page. Either way nothing here says the
|
|
17
|
+
* document is signed: every vendor's own guidance is that the end of the frame is not the outcome, and the request becomes
|
|
18
|
+
* SIGNED only once the engine has validated the signed document, at its next re-read (poll or vendor notification).
|
|
19
|
+
*
|
|
20
|
+
* What it needs elsewhere: a provider that claims `EMBEDDED_ELECTRONIC_SIGNATURE` and declares `embeddedSigning`, and a
|
|
21
|
+
* `wildo config sync` then `wildo dev sync-csp` since it was added, which put the vendor's signing origins in the SaaS
|
|
22
|
+
* frontend's CSP `frame-src` from the provider's own declaration; without them the browser refuses to load the frame.
|
|
23
|
+
*
|
|
24
|
+
* It renders no words of its own: the application passes the frame's accessible `title`.
|
|
25
|
+
*/
|
|
26
|
+
export interface EmbeddedSigningFrameProps {
|
|
27
|
+
/** The record the deliverable belongs to: the signature request's `linkedResourceType`. */
|
|
28
|
+
readonly linkedResourceType: string;
|
|
29
|
+
/** The record the deliverable belongs to: the signature request's `linkedResourceId`. */
|
|
30
|
+
readonly linkedResourceId: string;
|
|
31
|
+
/** The frame's accessible name (WCAG 4.1.2), in the person's language, e.g. "Sign the engagement letter". */
|
|
32
|
+
readonly title: string;
|
|
33
|
+
/** Called once the person left the vendor's page. Re-read the record if you show its signature state. */
|
|
34
|
+
readonly onSigningReturned?: () => void;
|
|
35
|
+
readonly className?: string;
|
|
36
|
+
}
|
|
37
|
+
export declare function EmbeddedSigningFrame({ linkedResourceType, linkedResourceId, title, onSigningReturned, className }: EmbeddedSigningFrameProps): React.JSX.Element | null;
|
|
38
|
+
//# sourceMappingURL=EmbeddedSigningFrame.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EmbeddedSigningFrame.d.ts","sourceRoot":"","sources":["../../../../src/components/compliance/EmbeddedSigningFrame.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmD,MAAM,OAAO,CAAC;AAiBxE,4IAA4I;AAC5I;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,WAAW,yBAAyB;IACxC,2FAA2F;IAC3F,QAAQ,CAAC,kBAAkB,EAAE,MAAM,CAAC;IACpC,yFAAyF;IACzF,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAClC,6GAA6G;IAC7G,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,yGAAyG;IACzG,QAAQ,CAAC,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAC;IACxC,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC7B;AAmCD,wBAAgB,oBAAoB,CAAC,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,KAAK,EAAE,iBAAiB,EAAE,SAAS,EAAE,EAAE,yBAAyB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,GAAG,IAAI,CA2EvK"}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useCallback, useEffect, useRef, useState } from 'react';
|
|
3
|
+
import { CoreResourceType, ErrorType, ResourceOperationVariantType, ResourcesConfig_OperationPathUtils, SIGNING_RETURN_PAGE_PATH, SignatureRequestSigners_Operations, } from '@wildo-ai/saas-models';
|
|
4
|
+
import { LoadingSpinner } from '../../components/feedback/loading-spinner.js';
|
|
5
|
+
import { Alert, AlertDescription } from '../../components/overlays/containers/alert.js';
|
|
6
|
+
import { isBackendRefusal } from '../../core/errors/backend-refusal.frontend.js';
|
|
7
|
+
import { useUserFacingErrorMessage } from '../../core/errors/useUserFacingErrorMessage.js';
|
|
8
|
+
import { useResourceRegistry } from '../../core/resources/useResourceRegistry.js';
|
|
9
|
+
import { cn } from '../../core/ui/cn.js';
|
|
10
|
+
/** @wildo_source:part:end saas.frontend.electronic-signatures.embedded-signing-frame */
|
|
11
|
+
/** Where the frame is. */
|
|
12
|
+
var EmbeddedSigningFrameStatus;
|
|
13
|
+
(function (EmbeddedSigningFrameStatus) {
|
|
14
|
+
/** Asking the backend for the signing page. */
|
|
15
|
+
EmbeddedSigningFrameStatus["OPENING"] = "opening";
|
|
16
|
+
/** The vendor's page is in the frame. */
|
|
17
|
+
EmbeddedSigningFrameStatus["SIGNING"] = "signing";
|
|
18
|
+
/** Nothing for this person to sign here, or they have left the vendor's page: nothing is rendered. */
|
|
19
|
+
EmbeddedSigningFrameStatus["NOTHING"] = "nothing";
|
|
20
|
+
/** The page could not be opened. */
|
|
21
|
+
EmbeddedSigningFrameStatus["FAILED"] = "failed";
|
|
22
|
+
})(EmbeddedSigningFrameStatus || (EmbeddedSigningFrameStatus = {}));
|
|
23
|
+
const OPEN_SIGNING_SESSION_KEY = ResourcesConfig_OperationPathUtils.createOperationPathKey({
|
|
24
|
+
resourceIdentifier: CoreResourceType.SIGNATURE_REQUEST_SIGNERS,
|
|
25
|
+
operationIdentifier: SignatureRequestSigners_Operations.OPEN_SIGNING_SESSION,
|
|
26
|
+
variantType: ResourceOperationVariantType.API_CALL,
|
|
27
|
+
isOperationDefault: true,
|
|
28
|
+
isBulkOperation: false,
|
|
29
|
+
});
|
|
30
|
+
/**
|
|
31
|
+
* Whether the frame has reached the application's signing-return page. While it shows the vendor's page, reading its
|
|
32
|
+
* location throws (another origin): that is "not yet".
|
|
33
|
+
*/
|
|
34
|
+
function frameReturned(frame) {
|
|
35
|
+
try {
|
|
36
|
+
return frame?.contentWindow?.location.pathname === SIGNING_RETURN_PAGE_PATH;
|
|
37
|
+
}
|
|
38
|
+
catch {
|
|
39
|
+
return false;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
export function EmbeddedSigningFrame({ linkedResourceType, linkedResourceId, title, onSigningReturned, className }) {
|
|
43
|
+
const { doOperation } = useResourceRegistry();
|
|
44
|
+
const toUserFacingErrorMessage = useUserFacingErrorMessage();
|
|
45
|
+
const [status, setStatus] = useState(EmbeddedSigningFrameStatus.OPENING);
|
|
46
|
+
const [url, setUrl] = useState(null);
|
|
47
|
+
const [failure, setFailure] = useState(null);
|
|
48
|
+
const frameRef = useRef(null);
|
|
49
|
+
// Read through refs so a provider handing out new function identities cannot make the frame ask again.
|
|
50
|
+
const doOperationRef = useRef(doOperation);
|
|
51
|
+
doOperationRef.current = doOperation;
|
|
52
|
+
const toMessageRef = useRef(toUserFacingErrorMessage);
|
|
53
|
+
toMessageRef.current = toUserFacingErrorMessage;
|
|
54
|
+
const onReturnedRef = useRef(onSigningReturned);
|
|
55
|
+
onReturnedRef.current = onSigningReturned;
|
|
56
|
+
useEffect(() => {
|
|
57
|
+
let cancelled = false;
|
|
58
|
+
setStatus(EmbeddedSigningFrameStatus.OPENING);
|
|
59
|
+
doOperationRef.current(OPEN_SIGNING_SESSION_KEY,
|
|
60
|
+
// The application scope (its id in the route) is merged in by the scoped registry.
|
|
61
|
+
{ contextualParameters: {}, requestData: { linkedResourceType, linkedResourceId, returnUrl: `${window.location.origin}${SIGNING_RETURN_PAGE_PATH}` } },
|
|
62
|
+
// A person with nothing to sign is the common case, not an error: no global error toast.
|
|
63
|
+
{ silent: true })
|
|
64
|
+
.then((session) => {
|
|
65
|
+
if (cancelled)
|
|
66
|
+
return;
|
|
67
|
+
setUrl(session.url);
|
|
68
|
+
setStatus(EmbeddedSigningFrameStatus.SIGNING);
|
|
69
|
+
})
|
|
70
|
+
.catch((error) => {
|
|
71
|
+
if (cancelled)
|
|
72
|
+
return;
|
|
73
|
+
// Nothing to sign here (404), or the request's provider signs from its e-mail only (409): nothing to show.
|
|
74
|
+
if (isBackendRefusal(error) && (error.errorType === ErrorType.NOT_FOUND || error.errorType === ErrorType.CONFLICT)) {
|
|
75
|
+
setStatus(EmbeddedSigningFrameStatus.NOTHING);
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
setFailure(toMessageRef.current(error));
|
|
79
|
+
setStatus(EmbeddedSigningFrameStatus.FAILED);
|
|
80
|
+
});
|
|
81
|
+
return () => {
|
|
82
|
+
cancelled = true;
|
|
83
|
+
};
|
|
84
|
+
}, [linkedResourceType, linkedResourceId]);
|
|
85
|
+
const handleLoad = useCallback(() => {
|
|
86
|
+
if (!frameReturned(frameRef.current))
|
|
87
|
+
return;
|
|
88
|
+
setStatus(EmbeddedSigningFrameStatus.NOTHING);
|
|
89
|
+
setUrl(null);
|
|
90
|
+
onReturnedRef.current?.();
|
|
91
|
+
}, []);
|
|
92
|
+
if (status === EmbeddedSigningFrameStatus.NOTHING)
|
|
93
|
+
return null;
|
|
94
|
+
if (status === EmbeddedSigningFrameStatus.OPENING)
|
|
95
|
+
return _jsx(LoadingSpinner, {});
|
|
96
|
+
if (status === EmbeddedSigningFrameStatus.FAILED) {
|
|
97
|
+
return (_jsx(Alert, { variant: "destructive", children: _jsx(AlertDescription, { children: failure }) }));
|
|
98
|
+
}
|
|
99
|
+
return (_jsx("iframe", { ref: frameRef, src: url ?? undefined, title: title, onLoad: handleLoad,
|
|
100
|
+
// The vendor's page runs its own scripts and forms, on its own origin, and may open a window (an identity check);
|
|
101
|
+
// it may not navigate the application's own page.
|
|
102
|
+
sandbox: "allow-scripts allow-same-origin allow-forms allow-popups allow-popups-to-escape-sandbox",
|
|
103
|
+
// The origin only, never the path: some vendors admit a frame by the embedding site's domain (Yousign's allowlist).
|
|
104
|
+
referrerPolicy: "strict-origin", className: cn('h-[80vh] w-full rounded-md border-0', className) }));
|
|
105
|
+
}
|
|
106
|
+
//# sourceMappingURL=EmbeddedSigningFrame.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EmbeddedSigningFrame.js","sourceRoot":"","sources":["../../../../src/components/compliance/EmbeddedSigningFrame.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxE,OAAO,EACL,gBAAgB,EAChB,SAAS,EACT,4BAA4B,EAC5B,kCAAkC,EAClC,wBAAwB,EACxB,kCAAkC,GAEnC,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,cAAc,EAAE,MAAM,yDAAyD,CAAC;AACzF,OAAO,EAAE,KAAK,EAAE,gBAAgB,EAAE,MAAM,0DAA0D,CAAC;AACnG,OAAO,EAAE,gBAAgB,EAAE,MAAM,0DAA0D,CAAC;AAC5F,OAAO,EAAE,yBAAyB,EAAE,MAAM,2DAA2D,CAAC;AACtG,OAAO,EAAE,mBAAmB,EAAE,MAAM,wDAAwD,CAAC;AAC7F,OAAO,EAAE,EAAE,EAAE,MAAM,gCAAgC,CAAC;AAqCpD,wFAAwF;AAExF,0BAA0B;AAC1B,IAAK,0BASJ;AATD,WAAK,0BAA0B;IAC7B,+CAA+C;IAC/C,iDAAmB,CAAA;IACnB,yCAAyC;IACzC,iDAAmB,CAAA;IACnB,sGAAsG;IACtG,iDAAmB,CAAA;IACnB,oCAAoC;IACpC,+CAAiB,CAAA;AACnB,CAAC,EATI,0BAA0B,KAA1B,0BAA0B,QAS9B;AAED,MAAM,wBAAwB,GAAG,kCAAkC,CAAC,sBAAsB,CAAC;IACzF,kBAAkB,EAAE,gBAAgB,CAAC,yBAAyB;IAC9D,mBAAmB,EAAE,kCAAkC,CAAC,oBAAoB;IAC5E,WAAW,EAAE,4BAA4B,CAAC,QAAQ;IAClD,kBAAkB,EAAE,IAAI;IACxB,eAAe,EAAE,KAAK;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QACb,aAAa,CAAC,OAAO,EAAE,EAAE,CAAC;IAC5B,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,IAAI,MAAM,KAAK,0BAA0B,CAAC,OAAO;QAAE,OAAO,IAAI,CAAC;IAC/D,IAAI,MAAM,KAAK,0BAA0B,CAAC,OAAO;QAAE,OAAO,KAAC,cAAc,KAAG,CAAC;IAC7E,IAAI,MAAM,KAAK,0BAA0B,CAAC,MAAM,EAAE,CAAC;QACjD,OAAO,CACL,KAAC,KAAK,IAAC,OAAO,EAAC,aAAa,YAC1B,KAAC,gBAAgB,cAAE,OAAO,GAAoB,GACxC,CACT,CAAC;IACJ,CAAC;IACD,OAAO,CACL,iBACE,GAAG,EAAE,QAAQ,EACb,GAAG,EAAE,GAAG,IAAI,SAAS,EACrB,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,UAAU;QAClB,kHAAkH;QAClH,kDAAkD;QAClD,OAAO,EAAC,yFAAyF;QACjG,oHAAoH;QACpH,cAAc,EAAC,eAAe,EAC9B,SAAS,EAAE,EAAE,CAAC,qCAAqC,EAAE,SAAS,CAAC,GAC/D,CACH,CAAC;AACJ,CAAC","sourcesContent":["import React, { useCallback, useEffect, useRef, useState } from 'react';\nimport {\n CoreResourceType,\n ErrorType,\n ResourceOperationVariantType,\n ResourcesConfig_OperationPathUtils,\n SIGNING_RETURN_PAGE_PATH,\n SignatureRequestSigners_Operations,\n type SignatureRequestSigners_OpenSigningSessionResponse,\n} from '@wildo-ai/saas-models';\nimport { LoadingSpinner } from '~wildo-frontend-lib/components/feedback/loading-spinner';\nimport { Alert, AlertDescription } from '~wildo-frontend-lib/components/overlays/containers/alert';\nimport { isBackendRefusal } from '~wildo-frontend-lib/core/errors/backend-refusal.frontend';\nimport { useUserFacingErrorMessage } from '~wildo-frontend-lib/core/errors/useUserFacingErrorMessage';\nimport { useResourceRegistry } from '~wildo-frontend-lib/core/resources/useResourceRegistry';\nimport { cn } from '~wildo-frontend-lib/core/ui/cn';\n\n/** @wildo_source:part:start saas.frontend.electronic-signatures.embedded-signing-frame facet:layer:frontend facet:audience:app-developer */\n/**\n * Embedded signing: the signed-in person signs a record's deliverable at the signature vendor, inside a frame of the\n * application, instead of following the vendor's e-mail. Import from `@wildo-ai/saas-frontend-lib`.\n *\n * Place it where the person meets the record (an engagement letter's page, say). On mount it asks the backend for the\n * vendor's signing page (`signatureRequestSigners.openSigningSession`). The answer is given only to a signer an open\n * request on that record names and the vendor says has not signed yet, so for anybody else, once the person has signed,\n * and when the request's provider signs from its e-mail only, the component renders NOTHING. The page is valid for\n * minutes and is never stored, which is why it is asked for here, when the person is in front of it. A signer whose turn\n * has not come (signers who sign in turn) is shown nothing either, until it does.\n *\n * When the person is done, a vendor that redirects sends the frame to the application's own {@link SIGNING_RETURN_PAGE_PATH};\n * the frame sees it arrive (it is now same-origin), closes, and calls `onSigningReturned`. A vendor that does not redirect\n * (or redirects to another of the application's origins) keeps showing its own end page. Either way nothing here says the\n * document is signed: every vendor's own guidance is that the end of the frame is not the outcome, and the request becomes\n * SIGNED only once the engine has validated the signed document, at its next re-read (poll or vendor notification).\n *\n * What it needs elsewhere: a provider that claims `EMBEDDED_ELECTRONIC_SIGNATURE` and declares `embeddedSigning`, and a\n * `wildo config sync` then `wildo dev sync-csp` since it was added, which put the vendor's signing origins in the SaaS\n * frontend's CSP `frame-src` from the provider's own declaration; without them the browser refuses to load the frame.\n *\n * It renders no words of its own: the application passes the frame's accessible `title`.\n */\nexport interface EmbeddedSigningFrameProps {\n /** The record the deliverable belongs to: the signature request's `linkedResourceType`. */\n readonly linkedResourceType: string;\n /** The record the deliverable belongs to: the signature request's `linkedResourceId`. */\n readonly linkedResourceId: string;\n /** The frame's accessible name (WCAG 4.1.2), in the person's language, e.g. \"Sign the engagement letter\". */\n readonly title: string;\n /** Called once the person left the vendor's page. Re-read the record if you show its signature state. */\n readonly onSigningReturned?: () => void;\n readonly className?: string;\n}\n/** @wildo_source:part:end saas.frontend.electronic-signatures.embedded-signing-frame */\n\n/** Where the frame is. */\nenum EmbeddedSigningFrameStatus {\n /** Asking the backend for the signing page. */\n OPENING = 'opening',\n /** The vendor's page is in the frame. */\n SIGNING = 'signing',\n /** Nothing for this person to sign here, or they have left the vendor's page: nothing is rendered. */\n NOTHING = 'nothing',\n /** The page could not be opened. */\n FAILED = 'failed',\n}\n\nconst OPEN_SIGNING_SESSION_KEY = ResourcesConfig_OperationPathUtils.createOperationPathKey({\n resourceIdentifier: CoreResourceType.SIGNATURE_REQUEST_SIGNERS,\n operationIdentifier: SignatureRequestSigners_Operations.OPEN_SIGNING_SESSION,\n variantType: ResourceOperationVariantType.API_CALL,\n isOperationDefault: true,\n isBulkOperation: false,\n});\n\n/**\n * Whether the frame has reached the application's signing-return page. While it shows the vendor's page, reading its\n * location throws (another origin): that is \"not yet\".\n */\nfunction frameReturned(frame: HTMLIFrameElement | null): boolean {\n try {\n return frame?.contentWindow?.location.pathname === SIGNING_RETURN_PAGE_PATH;\n } catch {\n return false;\n }\n}\n\nexport function EmbeddedSigningFrame({ linkedResourceType, linkedResourceId, title, onSigningReturned, className }: EmbeddedSigningFrameProps): React.JSX.Element | null {\n const { doOperation } = useResourceRegistry();\n const toUserFacingErrorMessage = useUserFacingErrorMessage();\n const [status, setStatus] = useState<EmbeddedSigningFrameStatus>(EmbeddedSigningFrameStatus.OPENING);\n const [url, setUrl] = useState<string | null>(null);\n const [failure, setFailure] = useState<string | null>(null);\n const frameRef = useRef<HTMLIFrameElement | null>(null);\n // Read through refs so a provider handing out new function identities cannot make the frame ask again.\n const doOperationRef = useRef(doOperation);\n doOperationRef.current = doOperation;\n const toMessageRef = useRef(toUserFacingErrorMessage);\n toMessageRef.current = toUserFacingErrorMessage;\n const onReturnedRef = useRef(onSigningReturned);\n onReturnedRef.current = onSigningReturned;\n\n useEffect(() => {\n let cancelled = false;\n setStatus(EmbeddedSigningFrameStatus.OPENING);\n doOperationRef.current<SignatureRequestSigners_OpenSigningSessionResponse>(\n OPEN_SIGNING_SESSION_KEY,\n // The application scope (its id in the route) is merged in by the scoped registry.\n { contextualParameters: {}, requestData: { linkedResourceType, linkedResourceId, returnUrl: `${window.location.origin}${SIGNING_RETURN_PAGE_PATH}` } },\n // A person with nothing to sign is the common case, not an error: no global error toast.\n { silent: true },\n )\n .then((session) => {\n if (cancelled) return;\n setUrl(session.url);\n setStatus(EmbeddedSigningFrameStatus.SIGNING);\n })\n .catch((error: unknown) => {\n if (cancelled) return;\n // Nothing to sign here (404), or the request's provider signs from its e-mail only (409): nothing to show.\n if (isBackendRefusal(error) && (error.errorType === ErrorType.NOT_FOUND || error.errorType === ErrorType.CONFLICT)) {\n setStatus(EmbeddedSigningFrameStatus.NOTHING);\n return;\n }\n setFailure(toMessageRef.current(error));\n setStatus(EmbeddedSigningFrameStatus.FAILED);\n });\n return () => {\n cancelled = true;\n };\n }, [linkedResourceType, linkedResourceId]);\n\n const handleLoad = useCallback(() => {\n if (!frameReturned(frameRef.current)) return;\n setStatus(EmbeddedSigningFrameStatus.NOTHING);\n setUrl(null);\n onReturnedRef.current?.();\n }, []);\n\n if (status === EmbeddedSigningFrameStatus.NOTHING) return null;\n if (status === EmbeddedSigningFrameStatus.OPENING) return <LoadingSpinner />;\n if (status === EmbeddedSigningFrameStatus.FAILED) {\n return (\n <Alert variant=\"destructive\">\n <AlertDescription>{failure}</AlertDescription>\n </Alert>\n );\n }\n return (\n <iframe\n ref={frameRef}\n src={url ?? undefined}\n title={title}\n onLoad={handleLoad}\n // The vendor's page runs its own scripts and forms, on its own origin, and may open a window (an identity check);\n // it may not navigate the application's own page.\n sandbox=\"allow-scripts allow-same-origin allow-forms allow-popups allow-popups-to-escape-sandbox\"\n // The origin only, never the path: some vendors admit a frame by the embedding site's domain (Yousign's allowlist).\n referrerPolicy=\"strict-origin\"\n className={cn('h-[80vh] w-full rounded-md border-0', className)}\n />\n );\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DisplayValueDispatcher.d.ts","sourceRoot":"","sources":["../../../../src/components/data-display/DisplayValueDispatcher.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAUxB,OAAO,EAAc,KAAK,cAAc,EAAE,MAAM,qCAAqC,CAAC;AAMtF,OAAO,EAGL,eAAe,
|
|
1
|
+
{"version":3,"file":"DisplayValueDispatcher.d.ts","sourceRoot":"","sources":["../../../../src/components/data-display/DisplayValueDispatcher.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAUxB,OAAO,EAAc,KAAK,cAAc,EAAE,MAAM,qCAAqC,CAAC;AAMtF,OAAO,EAGL,eAAe,EAsBf,KAAK,kBAAkB,EACvB,KAAK,qBAAqB,IAAI,yBAAyB,EAIxD,MAAM,0BAA0B,CAAC;AAGlC,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AAiO9E,MAAM,WAAW,2BAA2B;IAC1C,MAAM,EAAE,CAAC,CAAC,UAAU,CAAC;IACrB,UAAU,EAAE,eAAe,CAAC;IAC5B,KAAK,EAAE,OAAO,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACpC,gBAAgB,CAAC,EAAE,yBAAyB,CAAC;IAC7C,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACrC;;;OAGG;IACH,iBAAiB,CAAC,EAAE,wBAAwB,CAAC;IAC7C,6FAA6F;IAC7F,UAAU,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,CAAC,CAAC,UAAU,KAAK,KAAK,CAAC,SAAS,CAAC;IAC7E,UAAU,CAAC,EAAE,cAAc,CAAC;IAC5B,iBAAiB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAC;IAEvD,iBAAiB,EAAE,OAAO,CAAC;IAC3B,kBAAkB,EAAE,MAAM,IAAI,CAAC;IAC/B,mBAAmB,EAAE,OAAO,CAAC;IAC7B,oBAAoB,EAAE,MAAM,IAAI,CAAC;CAClC;AAMD,wBAAgB,sBAAsB,CAAC,EACrC,MAAM,EACN,UAAU,EAAE,kBAAkB,EAC9B,KAAK,EACL,SAAS,EACT,KAAK,EACL,SAAS,EACT,UAAU,EACV,gBAAgB,EAChB,UAAU,EACV,iBAAiB,EACjB,UAAU,EACV,UAAU,EACV,iBAAiB,EACjB,iBAAiB,EACjB,kBAAkB,EAClB,mBAAmB,EACnB,oBAAoB,GACrB,EAAE,2BAA2B,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,GAAG,IAAI,CAkhCxD;yBApiCe,sBAAsB"}
|
|
@@ -31,7 +31,7 @@ import { cn } from '../../core/ui/cn.js';
|
|
|
31
31
|
import { Skeleton } from '../../components/feedback/skeleton.js';
|
|
32
32
|
import { Badge } from '../../components/data-display/badge.js';
|
|
33
33
|
import { resolveContextualDisplayParams, useDisplayContextKind } from './DisplayContextKindContext.js';
|
|
34
|
-
import { ArrayListStyle, ArrayObjectItemLayout, DisplayChromeMode, FieldSchemaType, getFieldUIDisplayConfig, getObjectKeys, getObjectShape, getRecordValueSchema, getRecordKeySchema, getSystemEnumName, getSetValueSchema, getTupleItemSchemas, getMapSchemas, resolveDiscriminatedUnionVariant, getSchemaType, inferFieldSchemaTypeFromValue, getArrayUI, getObjectUI, isForeignKey, resolveDisplayEmptyReason, resolveForeignKeyLabelFallback, DISPLAY_EMPTY_REASON_LABEL_KEYS, getForeignKeyUIDisplay, unwrapSchema, } from '@wildo-ai/zod-decorators';
|
|
34
|
+
import { ArrayListStyle, ArrayObjectItemLayout, DisplayChromeMode, FieldSchemaType, getFieldUIDisplayConfig, getObjectKeys, getObjectShape, getRecordValueSchema, getRecordKeySchema, getSystemEnumName, getSetValueSchema, getTupleItemSchemas, getMapSchemas, resolveDiscriminatedUnionVariant, getSchemaType, inferFieldSchemaTypeFromValue, getArrayUI, getObjectUI, isForeignKey, getResourceReferenceTargetSet, resolveDisplayEmptyReason, resolveForeignKeyLabelFallback, DISPLAY_EMPTY_REASON_LABEL_KEYS, getForeignKeyUIDisplay, unwrapSchema, } from '@wildo-ai/zod-decorators';
|
|
35
35
|
import { ResourcesConfigNamingUtils } from '@wildo-ai/saas-models';
|
|
36
36
|
import { AutomatedLayoutFrontendUtils } from '../../core/automated-layout/automated-layout.frontend.utils.js';
|
|
37
37
|
import { DisplayFieldBoolean } from './formatters/display-field-boolean.js';
|
|
@@ -352,6 +352,22 @@ export function DisplayValueDispatcher({ schema, schemaType: declaredSchemaType,
|
|
|
352
352
|
});
|
|
353
353
|
return (_jsx(ResourceFieldDisplay_ResourceReference, { fieldName: fieldName || '', value: value, data: fkPopulated ?? undefined, labelFallback: resolveForeignKeyLabelFallback(schema, parentData), resourceType: polymorphicResourceType, displayParams: getForeignKeyUIDisplay(schema), schema: schema, className: className }));
|
|
354
354
|
}
|
|
355
|
+
/*
|
|
356
|
+
* A reference to ONE row of a resource whose TYPE the value itself carries (`.isResourceReference({ targetSet })`,
|
|
357
|
+
* #2471): `{ resourceType, resourceId }`, such as a run's `caseRef` (`WorkUnitRefSchema`). It is not a foreign key —
|
|
358
|
+
* no relationship names it and its type is not fixed — so neither branch above reached it, and it fell to the plain
|
|
359
|
+
* object branch below, which printed its two members: the resource's API name and the raw row id (#3819). It is read
|
|
360
|
+
* exactly as a foreign key is, through the same reference display, with the type taken from the value: the row's
|
|
361
|
+
* label, linked to the row, or "unavailable" (id on hover) when the reader cannot read it. The edit side has the
|
|
362
|
+
* matching control (`FormFieldResourceReference`). A value missing either member is not a reference yet and keeps
|
|
363
|
+
* the object rendering, which shows what is there.
|
|
364
|
+
*/
|
|
365
|
+
if (getResourceReferenceTargetSet(schema) && value && typeof value === 'object' && !Array.isArray(value)) {
|
|
366
|
+
const { resourceType: referencedType, resourceId: referencedId } = value;
|
|
367
|
+
if (typeof referencedType === 'string' && referencedType !== '' && typeof referencedId === 'string' && referencedId !== '') {
|
|
368
|
+
return (_jsx(ResourceFieldDisplay_ResourceReference, { fieldName: fieldName || '', value: referencedId, resourceType: referencedType, schema: schema, className: className }));
|
|
369
|
+
}
|
|
370
|
+
}
|
|
355
371
|
if (relationshipObjectSemantics &&
|
|
356
372
|
relationshipObjectSemantics.semantics.nature !== RelationshipNature.COMPOSITION &&
|
|
357
373
|
relationshipObjectIdentity) {
|