@wildo-ai/presets-components 1.1.5 → 1.1.7
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/.native.tsbuildinfo +1 -0
- package/dist/esm/components/actions/action-bar.d.ts.map +1 -1
- package/dist/esm/components/actions/action-bar.js +5 -2
- package/dist/esm/components/actions/action-bar.js.map +1 -1
- package/dist/esm/components/ai-elements/chat/suggestion.d.ts.map +1 -1
- package/dist/esm/components/ai-elements/chat/suggestion.js +8 -1
- package/dist/esm/components/ai-elements/chat/suggestion.js.map +1 -1
- package/dist/esm/components/ai-elements/decision/approval.d.ts +108 -13
- package/dist/esm/components/ai-elements/decision/approval.d.ts.map +1 -1
- package/dist/esm/components/ai-elements/decision/approval.js +60 -10
- package/dist/esm/components/ai-elements/decision/approval.js.map +1 -1
- package/dist/esm/components/ai-elements/graph/graph-runtime.d.ts +3 -1
- package/dist/esm/components/ai-elements/graph/graph-runtime.d.ts.map +1 -1
- package/dist/esm/components/ai-elements/graph/graph-runtime.js +3 -1
- package/dist/esm/components/ai-elements/graph/graph-runtime.js.map +1 -1
- package/dist/esm/components/app/app-layout-main-container.d.ts +9 -0
- package/dist/esm/components/app/app-layout-main-container.d.ts.map +1 -1
- package/dist/esm/components/app/app-layout-main-container.js +17 -23
- package/dist/esm/components/app/app-layout-main-container.js.map +1 -1
- package/dist/esm/components/app/app-layout-main-container.labels.d.ts.map +1 -1
- package/dist/esm/components/app/app-layout-main-container.labels.js +27 -0
- package/dist/esm/components/app/app-layout-main-container.labels.js.map +1 -1
- package/dist/esm/components/billing/billing-plan-change-preview.d.ts.map +1 -1
- package/dist/esm/components/billing/billing-plan-change-preview.js +5 -2
- package/dist/esm/components/billing/billing-plan-change-preview.js.map +1 -1
- package/dist/esm/components/billing/billing-plan-change-preview.labels.d.ts.map +1 -1
- package/dist/esm/components/billing/billing-plan-change-preview.labels.js +3 -0
- package/dist/esm/components/billing/billing-plan-change-preview.labels.js.map +1 -1
- package/dist/esm/components/billing/billing-pricing-table.d.ts +1 -1
- package/dist/esm/components/billing/billing-pricing-table.d.ts.map +1 -1
- package/dist/esm/components/billing/billing-pricing-table.js +8 -4
- package/dist/esm/components/billing/billing-pricing-table.js.map +1 -1
- package/dist/esm/components/billing/billing-pricing-table.labels.d.ts.map +1 -1
- package/dist/esm/components/billing/billing-pricing-table.labels.js +7 -1
- package/dist/esm/components/billing/billing-pricing-table.labels.js.map +1 -1
- package/dist/esm/components/billing/billing-usage-dashboard.d.ts.map +1 -1
- package/dist/esm/components/billing/billing-usage-dashboard.js +6 -3
- package/dist/esm/components/billing/billing-usage-dashboard.js.map +1 -1
- package/dist/esm/components/billing/billing-usage-dashboard.labels.d.ts.map +1 -1
- package/dist/esm/components/billing/billing-usage-dashboard.labels.js +2 -1
- package/dist/esm/components/billing/billing-usage-dashboard.labels.js.map +1 -1
- package/dist/esm/components/data-display/formatters/display-field-enum.d.ts.map +1 -1
- package/dist/esm/components/data-display/formatters/display-field-enum.js +18 -4
- package/dist/esm/components/data-display/formatters/display-field-enum.js.map +1 -1
- package/dist/esm/components/data-display/formatters/display-field-file.d.ts.map +1 -1
- package/dist/esm/components/data-display/formatters/display-field-file.js +13 -14
- package/dist/esm/components/data-display/formatters/display-field-file.js.map +1 -1
- package/dist/esm/components/data-display/formatters/display-field-file.labels.d.ts.map +1 -1
- package/dist/esm/components/data-display/formatters/display-field-file.labels.js +1 -0
- package/dist/esm/components/data-display/formatters/display-field-file.labels.js.map +1 -1
- package/dist/esm/components/data-display/formatters/display-field-number.d.ts.map +1 -1
- package/dist/esm/components/data-display/formatters/display-field-number.js +6 -1
- package/dist/esm/components/data-display/formatters/display-field-number.js.map +1 -1
- package/dist/esm/components/data-display/formatters/display-field-number.labels.d.ts.map +1 -1
- package/dist/esm/components/data-display/formatters/display-field-number.labels.js +5 -2
- package/dist/esm/components/data-display/formatters/display-field-number.labels.js.map +1 -1
- package/dist/esm/components/data-display/formatters/display-field-string.d.ts +1 -1
- package/dist/esm/components/data-display/formatters/display-field-string.d.ts.map +1 -1
- package/dist/esm/components/data-display/formatters/display-field-string.js +51 -12
- package/dist/esm/components/data-display/formatters/display-field-string.js.map +1 -1
- package/dist/esm/components/data-display/untrusted-html-content.d.ts +55 -0
- package/dist/esm/components/data-display/untrusted-html-content.d.ts.map +1 -0
- package/dist/esm/components/data-display/untrusted-html-content.js +67 -0
- package/dist/esm/components/data-display/untrusted-html-content.js.map +1 -0
- package/dist/esm/components/form/chromes/form-primitive.labels.d.ts.map +1 -1
- package/dist/esm/components/form/chromes/form-primitive.labels.js +9 -0
- package/dist/esm/components/form/chromes/form-primitive.labels.js.map +1 -1
- package/dist/esm/components/form/combobox.d.ts.map +1 -1
- package/dist/esm/components/form/combobox.js +10 -10
- package/dist/esm/components/form/combobox.js.map +1 -1
- package/dist/esm/components/form/controls/address/providers/google-places-address-lookup.adapter.d.ts +42 -0
- package/dist/esm/components/form/controls/address/providers/google-places-address-lookup.adapter.d.ts.map +1 -0
- package/dist/esm/components/form/controls/address/providers/google-places-address-lookup.adapter.js +120 -0
- package/dist/esm/components/form/controls/address/providers/google-places-address-lookup.adapter.js.map +1 -0
- package/dist/esm/components/form/controls/address/providers/google-places-address-lookup.d.ts +16 -0
- package/dist/esm/components/form/controls/address/providers/google-places-address-lookup.d.ts.map +1 -0
- package/dist/esm/components/form/controls/address/providers/google-places-address-lookup.js +8 -0
- package/dist/esm/components/form/controls/address/providers/google-places-address-lookup.js.map +1 -0
- package/dist/esm/components/navigation/app-level/activity-bar.d.ts.map +1 -1
- package/dist/esm/components/navigation/app-level/activity-bar.js +2 -2
- package/dist/esm/components/navigation/app-level/activity-bar.js.map +1 -1
- package/dist/esm/components/navigation/app-level/menu-user-org.d.ts.map +1 -1
- package/dist/esm/components/navigation/app-level/menu-user-org.js +10 -4
- package/dist/esm/components/navigation/app-level/menu-user-org.js.map +1 -1
- package/dist/esm/components/navigation/app-level/menu-user-org.labels.d.ts.map +1 -1
- package/dist/esm/components/navigation/app-level/menu-user-org.labels.js +7 -0
- package/dist/esm/components/navigation/app-level/menu-user-org.labels.js.map +1 -1
- package/dist/esm/components/navigation/app-level/menubar.d.ts.map +1 -1
- package/dist/esm/components/navigation/app-level/menubar.js +6 -6
- package/dist/esm/components/navigation/app-level/menubar.js.map +1 -1
- package/dist/esm/components/navigation/app-level/navigation-back.d.ts.map +1 -1
- package/dist/esm/components/navigation/app-level/navigation-back.js +27 -9
- package/dist/esm/components/navigation/app-level/navigation-back.js.map +1 -1
- package/dist/esm/components/navigation/app-level/sidebar.js +3 -3
- package/dist/esm/components/navigation/app-level/sidebar.js.map +1 -1
- package/dist/esm/components/navigation/app-level/status-bar.js +2 -2
- package/dist/esm/components/navigation/app-level/status-bar.js.map +1 -1
- package/dist/esm/components/navigation/app-level/toolbar.d.ts.map +1 -1
- package/dist/esm/components/navigation/app-level/toolbar.js +2 -2
- package/dist/esm/components/navigation/app-level/toolbar.js.map +1 -1
- package/dist/esm/components/navigation/app-level/utility-panel.js +2 -2
- package/dist/esm/components/navigation/app-level/utility-panel.js.map +1 -1
- package/dist/esm/components/navigation/breadcrumb.js +1 -1
- package/dist/esm/components/navigation/breadcrumb.js.map +1 -1
- package/dist/esm/components/sections/stepper.d.ts.map +1 -1
- package/dist/esm/components/sections/stepper.js +5 -3
- package/dist/esm/components/sections/stepper.js.map +1 -1
- package/dist/esm/config/preset-navigation.d.ts.map +1 -1
- package/dist/esm/config/preset-navigation.js +23 -2
- package/dist/esm/config/preset-navigation.js.map +1 -1
- package/dist/esm/config/resources/agent-work.resource-presets.d.ts +4 -0
- package/dist/esm/config/resources/agent-work.resource-presets.d.ts.map +1 -0
- package/dist/esm/config/resources/agent-work.resource-presets.js +115 -0
- package/dist/esm/config/resources/agent-work.resource-presets.js.map +1 -0
- package/dist/esm/config/resources/api-key-rotation-window.d.ts +22 -0
- package/dist/esm/config/resources/api-key-rotation-window.d.ts.map +1 -0
- package/dist/esm/config/resources/api-key-rotation-window.js +45 -0
- package/dist/esm/config/resources/api-key-rotation-window.js.map +1 -0
- package/dist/esm/config/resources/application.resource-presets.d.ts.map +1 -1
- package/dist/esm/config/resources/application.resource-presets.js +147 -61
- package/dist/esm/config/resources/application.resource-presets.js.map +1 -1
- package/dist/esm/config/resources/billing.resource-presets.d.ts +4 -3
- package/dist/esm/config/resources/billing.resource-presets.d.ts.map +1 -1
- package/dist/esm/config/resources/billing.resource-presets.js +240 -111
- package/dist/esm/config/resources/billing.resource-presets.js.map +1 -1
- package/dist/esm/config/resources/conversation-threads.resource-presets.d.ts +4 -0
- package/dist/esm/config/resources/conversation-threads.resource-presets.d.ts.map +1 -0
- package/dist/esm/config/resources/conversation-threads.resource-presets.js +105 -0
- package/dist/esm/config/resources/conversation-threads.resource-presets.js.map +1 -0
- package/dist/esm/config/resources/guidance.resource-presets.d.ts.map +1 -1
- package/dist/esm/config/resources/guidance.resource-presets.js +18 -11
- package/dist/esm/config/resources/guidance.resource-presets.js.map +1 -1
- package/dist/esm/config/resources/identity.resource-presets.d.ts +0 -13
- package/dist/esm/config/resources/identity.resource-presets.d.ts.map +1 -1
- package/dist/esm/config/resources/identity.resource-presets.js +48 -16
- package/dist/esm/config/resources/identity.resource-presets.js.map +1 -1
- package/dist/esm/config/resources/inbound-deliveries.resource-presets.d.ts +6 -0
- package/dist/esm/config/resources/inbound-deliveries.resource-presets.d.ts.map +1 -0
- package/dist/esm/config/resources/inbound-deliveries.resource-presets.js +112 -0
- package/dist/esm/config/resources/inbound-deliveries.resource-presets.js.map +1 -0
- package/dist/esm/config/resources/inbound-email.resource-presets.d.ts +4 -0
- package/dist/esm/config/resources/inbound-email.resource-presets.d.ts.map +1 -0
- package/dist/esm/config/resources/inbound-email.resource-presets.js +182 -0
- package/dist/esm/config/resources/inbound-email.resource-presets.js.map +1 -0
- package/dist/esm/config/resources/index.d.ts.map +1 -1
- package/dist/esm/config/resources/index.js +9 -2
- package/dist/esm/config/resources/index.js.map +1 -1
- package/dist/esm/config/resources/legal-holds.resource-presets.d.ts +4 -0
- package/dist/esm/config/resources/legal-holds.resource-presets.d.ts.map +1 -0
- package/dist/esm/config/resources/legal-holds.resource-presets.js +76 -0
- package/dist/esm/config/resources/legal-holds.resource-presets.js.map +1 -0
- package/dist/esm/config/resources/organizations.resource-presets.d.ts.map +1 -1
- package/dist/esm/config/resources/organizations.resource-presets.js +139 -36
- package/dist/esm/config/resources/organizations.resource-presets.js.map +1 -1
- package/dist/esm/config/resources/resource.config.utils.d.ts +20 -0
- package/dist/esm/config/resources/resource.config.utils.d.ts.map +1 -1
- package/dist/esm/config/resources/resource.config.utils.js +20 -0
- package/dist/esm/config/resources/resource.config.utils.js.map +1 -1
- package/dist/esm/config/resources/retention-enforcement.resource-presets.d.ts +5 -0
- package/dist/esm/config/resources/retention-enforcement.resource-presets.d.ts.map +1 -0
- package/dist/esm/config/resources/retention-enforcement.resource-presets.js +74 -0
- package/dist/esm/config/resources/retention-enforcement.resource-presets.js.map +1 -0
- package/dist/esm/config/resources/security.resource-presets.d.ts +3 -1
- package/dist/esm/config/resources/security.resource-presets.d.ts.map +1 -1
- package/dist/esm/config/resources/security.resource-presets.js +563 -133
- package/dist/esm/config/resources/security.resource-presets.js.map +1 -1
- package/dist/esm/config/resources/service-providers.resource-presets.d.ts +4 -0
- package/dist/esm/config/resources/service-providers.resource-presets.d.ts.map +1 -0
- package/dist/esm/config/resources/service-providers.resource-presets.js +321 -0
- package/dist/esm/config/resources/service-providers.resource-presets.js.map +1 -0
- package/dist/esm/config/resources/webhooks.resource-presets.d.ts +4 -3
- package/dist/esm/config/resources/webhooks.resource-presets.d.ts.map +1 -1
- package/dist/esm/config/resources/webhooks.resource-presets.js +76 -25
- package/dist/esm/config/resources/webhooks.resource-presets.js.map +1 -1
- 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/esm/registration/register-common-enums.d.ts.map +1 -1
- package/dist/esm/registration/register-common-enums.js +15 -0
- package/dist/esm/registration/register-common-enums.js.map +1 -1
- package/dist/esm/registration/register-provider-components.d.ts.map +1 -1
- package/dist/esm/registration/register-provider-components.js +6 -0
- package/dist/esm/registration/register-provider-components.js.map +1 -1
- package/dist/esm/themes/dense.theme.d.ts.map +1 -1
- package/dist/esm/themes/dense.theme.js +22 -2
- package/dist/esm/themes/dense.theme.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +8 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"approval.js","sourceRoot":"","sources":["../../../../../../src/components/ai-elements/decision/approval.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EACL,KAAK,EACL,gBAAgB,EAChB,WAAW,EACX,iBAAiB,EACjB,iBAAiB,EACjB,kBAAkB,EAClB,sBAAsB,EACtB,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,kBAAkB,EAClB,KAAK,EACL,MAAM,EACN,sBAAsB,EACtB,UAAU,EACV,YAAY,EACZ,EAAE,EACF,OAAO,EACP,OAAO,GACR,MAAM,6BAA6B,CAAC;AAGrC,OAAO,EAAE,qBAAqB,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AACxG,OAAO,EAAE,0BAA0B,EAAE,sBAAsB,EAAE,6BAA6B,EAAE,MAAM,4BAA4B,CAAC;AAG/H,MAAM,EAAE,GAA0B,qBAAqB,CAAC,qBAAqB,CAAC;AAE9E,iEAAiE;AACjE,yCAAyC;AACzC,EAAE;AACF,wBAAwB;AACxB,0EAA0E;AAC1E,iEAAiE;AACjE,yDAAyD;AACzD,6EAA6E;AAC7E,EAAE;AACF,gEAAgE;AAChE,6DAA6D;AAC7D,iEAAiE;AAEjE,iEAAiE;AACjE,wCAAwC;AACxC,iEAAiE;AAEjE,SAAS,YAAY,CAAC,SAA2B;IAC/C,MAAM,C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pB,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,UAAU,EACtB,YAAY,EAAE,aAAa,EAAE,GAAG,CAAC,IAAI,CAAC,UAAU,CAAC,GACjD,KApBM,IAAI,CAAC,UAAU,CAqBnB,CACP,CAAC,GACE,GACK,CACd,IACG,CACP,CAAC;AACJ,CAAC,CAAC","sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport {\n Alert,\n AlertDescription,\n AlertDialog,\n AlertDialogAction,\n AlertDialogCancel,\n AlertDialogContent,\n AlertDialogDescription,\n AlertDialogFooter,\n AlertDialogHeader,\n AlertDialogTitle,\n AlertDialogTrigger,\n Badge,\n Button,\n ButtonVariants_Variant,\n ScrollArea,\n TextareaRoot,\n cn,\n useI18n,\n Surface,\n} from '@wildo-ai/saas-frontend-lib';\nimport type { SerializableZodSchema } from '@wildo-ai/zod-decorators';\n\nimport { FrontendComponentType, ButtonSize, SurfaceVariant } from \"@wildo-ai/presets-components-models\";\nimport { ApprovalArgumentEditorMode, ApprovalArgumentFields, fieldsEditableArgumentsSchema } from \"./approval-argument-fields\";\nimport type { ComponentProps } from \"react\";\n\nconst CT: FrontendComponentType = FrontendComponentType.LOW_LEVEL_AI_APPROVAL;\n\n//===============================================================\n// Human-in-the-Loop Approval Components\n//\n// BACKEND DEPENDENCIES:\n// - FlowsActorsContext.respondToApproval() — implemented (WebSocket emit)\n// - WebSocket event: FLOWS_ACTORS_APPROVAL_REQUEST — implemented\n// - FlowsActorsExecution.pendingApproval — schema ready:\n// { approvalId, actionDescription, riskLevel, expiresAt?, requiredRoles? }\n//\n// Components render approval UI from props. Wire to context via\n// the saas-frontend-lib wrapper (flows-actors/approval.tsx).\n//===============================================================\n\n//===============================================================\n// useCountdown — shared countdown hook\n//===============================================================\n\nfunction useCountdown(expiresAt: Date | undefined): { remaining: string | null; isExpired: boolean } {\n const [now, setNow] = React.useState(() => Date.now());\n\n React.useEffect(() => {\n if (!expiresAt) return;\n const id = setInterval(() => setNow(Date.now()), 1_000);\n return () => clearInterval(id);\n }, [expiresAt]);\n\n if (!expiresAt) return { remaining: null, isExpired: false };\n\n const diff = expiresAt.getTime() - now;\n if (diff <= 0) return { remaining: null, isExpired: true };\n\n const totalSeconds = Math.floor(diff / 1_000);\n const minutes = Math.floor(totalSeconds / 60);\n const seconds = totalSeconds % 60;\n const remaining = minutes > 0\n ? `${minutes}m ${String(seconds).padStart(2, \"0\")}s`\n : `${seconds}s`;\n\n return { remaining, isExpired: false };\n}\n\n//===============================================================\n// AI_ApprovalRequest\n//===============================================================\n\nexport type AI_ApprovalRequestProps = ComponentProps<typeof Alert> & {\n approvalId: string;\n actionDescription: string;\n /**\n * OPTIONAL, because nothing populates it. A risk level exists only on\n * `WS_FlowsActorsApprovalRequestPayload`, a payload no code emits; the announcement a paused turn\n * really sends carries a tool name and its arguments and no risk claim (#528). Absent means the\n * badge is not rendered — a default here would show a severity nobody declared.\n */\n riskLevel?: \"low\" | \"medium\" | \"high\" | \"critical\";\n executionId: string;\n systemRef?: string;\n expiresAt?: Date;\n requiredRoles?: string[];\n /**\n * The gated tool call, and the arguments proposed for it.\n *\n * `toolName` is an IDENTIFIER, rendered as authored — it is the thing the agent asked to run,\n * and humanizing it here would invent display text no i18n tree owns.\n * `executionContext` carries the arguments (#455).\n */\n toolName?: string;\n executionContext?: Record<string, unknown>;\n /**\n * Offer the approver an EDITOR over the proposed arguments (#566).\n *\n * Off by default, and it is not a styling preference: turning it on changes what an approval MEANS\n * — the approver stops assenting to the agent's call and starts authoring one. A surface that\n * shows the editor must be wired to a decision path that carries the result, or it collects a\n * change and drops it, which is the failure #537 refused to ship.\n *\n * The editor offers the tool's FIELDS when `argumentsSchema` describes a shape they can express\n * (#587), and raw JSON otherwise; the raw editor stays one click away in both cases. Neither is the\n * control: the server re-validates the edit against the tool's live schema and refuses a violation\n * with a readable message, which is why a field editor that drops refinements is still honest.\n */\n allowArgumentModification?: boolean;\n /** The gated tool's input-schema descriptor (#587). Absent, or a shape fields cannot express, means raw JSON. */\n argumentsSchema?: SerializableZodSchema;\n /**\n * Why the last submitted edit was refused (#587), as LOCALIZED text. The approval is still pending: the\n * editor reopens on the refused arguments and shows this reason beside them. The engine wrapper renders it\n * from the approval's own labels, one per refusal reason, naming the tool and the offending arguments\n * (#1186) — a direct consumer must pass words the reader can read, never a server's sentence.\n */\n argumentModificationError?: string;\n /** What the approver submitted when that edit was refused (#587) — the reopened editor starts from it. */\n rejectedArguments?: Record<string, unknown>;\n /**\n * `modifiedToolArgs` is present only when the approver EDITED the arguments. Absent means \"run the\n * call as proposed\", which is what every approval meant before this parameter existed.\n */\n onApprove?: (approvalId: string, comment?: string, modifiedToolArgs?: Record<string, unknown>) => void;\n onDeny?: (approvalId: string, comment?: string) => void;\n onEscalate?: (approvalId: string, comment?: string) => void;\n isProcessing?: boolean;\n createdAt?: Date;\n};\n\nexport const AI_ApprovalRequest = ({\n approvalId,\n actionDescription,\n riskLevel,\n executionId,\n systemRef,\n expiresAt,\n requiredRoles,\n toolName,\n executionContext,\n allowArgumentModification,\n argumentsSchema,\n argumentModificationError,\n rejectedArguments,\n onApprove,\n onDeny,\n onEscalate,\n isProcessing,\n createdAt,\n className,\n ...props\n}: AI_ApprovalRequestProps): React.JSX.Element | null => {\n const { tComponent, isReady } = useI18n({ component: CT });\n const { remaining, isExpired } = useCountdown(expiresAt);\n const variant = riskLevel === \"critical\" || riskLevel === \"high\" ? \"destructive\" : \"default\";\n\n /*\n * The argument editor's state (#566).\n *\n * `draft` is `null` while the approver is reading rather than editing — distinct from an empty\n * string, which is a draft they have cleared. Opening the editor seeds it from the PROPOSED\n * arguments, so the starting point is the call the agent asked for and an approver changes one\n * value rather than retyping the object.\n */\n const fieldsSchema = React.useMemo(() => fieldsEditableArgumentsSchema(argumentsSchema), [argumentsSchema]);\n /*\n * A refused edit reopens on what the approver SUBMITTED (#587). The request unmounted while its\n * decision was in flight, so without this the approver would land back on the model's proposal and\n * lose the change the server has just explained.\n */\n const reopenedOn = argumentModificationError !== undefined ? (rejectedArguments ?? executionContext) : undefined;\n const [editorMode, setEditorMode] = React.useState<ApprovalArgumentEditorMode | null>(() =>\n reopenedOn === undefined ? null : fieldsSchema ? ApprovalArgumentEditorMode.FIELDS : ApprovalArgumentEditorMode.JSON,\n );\n // The value the field editor (re)mounts on — replaced when the approver switches back from JSON.\n const [fieldsSeed, setFieldsSeed] = React.useState<Record<string, unknown>>(() => reopenedOn ?? executionContext ?? {});\n const [fieldsEdit, setFieldsEdit] = React.useState<{ value: Record<string, unknown> | undefined; invalid: boolean }>({\n value: undefined,\n invalid: false,\n });\n const handleFieldsChange = React.useCallback(\n (next: { value: Record<string, unknown> | undefined; invalid: boolean }) => setFieldsEdit(next),\n [],\n );\n const [draft, setDraft] = React.useState<string>(() => JSON.stringify(reopenedOn ?? executionContext ?? {}, null, 2));\n const parsedDraft = React.useMemo(() => {\n try {\n const value = JSON.parse(draft) as unknown;\n // An array or a scalar is valid JSON and cannot be a tool's arguments. Refusing it HERE spares\n // the round trip; the server refuses it too, which is what actually protects the call.\n if (value === null || typeof value !== \"object\" || Array.isArray(value)) return { value: undefined, invalid: true };\n return { value: value as Record<string, unknown>, invalid: false };\n } catch {\n return { value: undefined, invalid: true };\n }\n }, [draft]);\n\n if (!isReady) return null;\n\n return (\n <Alert variant={variant} className={cn(\"flex flex-col gap-card-sm\", className)} {...props}>\n <div className=\"flex items-center justify-between gap-element\">\n <div className=\"flex items-center gap-element\">\n {riskLevel && (\n <Badge\n variant={riskLevel === \"critical\" || riskLevel === \"high\" ? \"destructive\" : \"outline\"}\n className=\"text-2xs\"\n >\n {tComponent(CT, `risk${riskLevel.charAt(0).toUpperCase()}${riskLevel.slice(1)}` as any)}\n </Badge>\n )}\n {systemRef && (\n <span className=\"text-2xs text-muted-foreground\">{systemRef}</span>\n )}\n </div>\n\n {/* Countdown / Expired indicator */}\n {remaining && (\n <Badge variant=\"secondary\" className=\"text-2xs tabular-nums\">\n {tComponent(CT, \"expiresCountdown\", { time: remaining })}\n </Badge>\n )}\n {isExpired && (\n <Badge variant=\"destructive\" className=\"text-2xs\">\n {tComponent(CT, \"expired\")}\n </Badge>\n )}\n </div>\n\n <AlertDescription className=\"text-sm\">\n {actionDescription}\n </AlertDescription>\n\n {/* Required roles display */}\n {requiredRoles && requiredRoles.length > 0 && (\n <div className=\"flex items-center gap-element\">\n <span className=\"text-2xs text-muted-foreground\">{tComponent(CT, \"requiredRoles\")}:</span>\n <div className=\"flex gap-1\">\n {requiredRoles.map((role) => (\n <Badge key={role} variant=\"outline\" className=\"text-2xs\">\n {role}\n </Badge>\n ))}\n </div>\n </div>\n )}\n\n {/* The gated tool call — WHAT the approver is being asked to authorize (#455). */}\n {toolName !== undefined && (\n <div className=\"flex items-center gap-element\">\n <span className=\"text-2xs text-muted-foreground\">{tComponent(CT, \"toolCall\")}:</span>\n {/*\n * Rendered as authored. A tool name is an IDENTIFIER the agent runtime owns, and turning\n * `renameTodo` into \"Rename Todo\" would invent display text no i18n tree can correct —\n * the exact fallback `display-text-comes-from-i18n.md` retired. The approver is better\n * served by the name the system will actually run.\n */}\n <code className=\"rounded bg-muted px-1 py-0.5 text-2xs font-mono\">{toolName}</code>\n </div>\n )}\n\n {/*\n * The proposed ARGUMENTS, one row per key, expanded by default.\n *\n * This was a collapsed `JSON.stringify` in a `<pre>`. Two things were wrong with that and only\n * the second is cosmetic: a blob is not readable at approval speed, and COLLAPSED-BY-DEFAULT\n * hides the very thing being approved — an approver who never opens it is signing an unread\n * document, which is how an approval prompt stops being read at all.\n *\n * Keys render VERBATIM. They are the tool's own parameter names, they carry no i18n entry, and\n * humanizing them is forbidden for the same reason as the tool name. A value that is not a\n * primitive is serialized, because a nested object has no honest one-line form — and that\n * narrow case is the only place a JSON fragment survives.\n */}\n {executionContext && Object.keys(executionContext).length > 0 && (\n <div className=\"flex flex-col gap-element\">\n <div className=\"flex items-center justify-between gap-element\">\n <span className=\"text-2xs text-muted-foreground\">{tComponent(CT, \"toolArguments\")}:</span>\n {/*\n * The door to approve-with-modifications (#566), rendered only when the surface's owner\n * declared it. An approver who edits these is AUTHORING a call the agent never\n * proposed, so it is opt-in per surface rather than always present.\n */}\n {allowArgumentModification && (\n <div className=\"flex items-center gap-1\">\n {/*\n * Fields ⇄ JSON (#587). Offered only when the descriptor can be expressed as fields, and\n * JSON → fields only from a draft that parses, so switching never discards an edit.\n */}\n {editorMode !== null && fieldsSchema && (\n <Button\n type=\"button\"\n variant={ButtonVariants_Variant.GHOST}\n size={ButtonSize.SM}\n disabled={isProcessing || isExpired || (editorMode === ApprovalArgumentEditorMode.JSON && parsedDraft.invalid)}\n onClick={() => {\n if (editorMode === ApprovalArgumentEditorMode.FIELDS) {\n setDraft(JSON.stringify(fieldsEdit.value ?? fieldsSeed, null, 2));\n setEditorMode(ApprovalArgumentEditorMode.JSON);\n } else if (parsedDraft.value) {\n setFieldsSeed(parsedDraft.value);\n setEditorMode(ApprovalArgumentEditorMode.FIELDS);\n }\n }}\n >\n {tComponent(CT, editorMode === ApprovalArgumentEditorMode.FIELDS ? \"editArgumentsAsJson\" : \"editArgumentsAsFields\")}\n </Button>\n )}\n <Button\n type=\"button\"\n variant={ButtonVariants_Variant.GHOST}\n size={ButtonSize.SM}\n disabled={isProcessing || isExpired}\n onClick={() => {\n if (editorMode !== null) {\n setEditorMode(null);\n return;\n }\n // Opening always starts from the call the agent PROPOSED.\n const proposed = executionContext ?? {};\n setFieldsSeed(proposed);\n setDraft(JSON.stringify(proposed, null, 2));\n setEditorMode(fieldsSchema ? ApprovalArgumentEditorMode.FIELDS : ApprovalArgumentEditorMode.JSON);\n }}\n >\n {tComponent(CT, editorMode === null ? \"editArguments\" : \"discardArgumentEdits\")}\n </Button>\n </div>\n )}\n </div>\n {/*\n * Why the last submitted edit was refused (#587). The words are the approval's own labels,\n * resolved by the wrapper per refusal reason with the offending arguments named (#1186); the\n * server's sentence no longer reaches this card. The approval is still pending while it shows.\n */}\n {argumentModificationError !== undefined && editorMode !== null && (\n <span className=\"text-2xs text-destructive\">\n {tComponent(CT, \"argumentModificationRefused\")}: {argumentModificationError}\n </span>\n )}\n {editorMode === null ? (\n <Surface asChild emitPolicyVars={false} variant={SurfaceVariant.INSET}>\n <dl className=\"grid grid-cols-[auto_1fr] gap-x-element gap-y-0.5 rounded-md bg-muted p-2 text-2xs\">\n {Object.entries(executionContext).map(([key, value]) => (\n <React.Fragment key={key}>\n <dt className=\"font-mono text-muted-foreground\">{key}</dt>\n <dd className=\"min-w-0 break-words font-mono\">\n {typeof value === \"string\" || typeof value === \"number\" || typeof value === \"boolean\"\n ? String(value)\n : JSON.stringify(value)}\n </dd>\n </React.Fragment>\n ))}\n </dl>\n </Surface>\n ) : editorMode === ApprovalArgumentEditorMode.FIELDS && fieldsSchema ? (\n <ApprovalArgumentFields\n schema={fieldsSchema}\n initialValue={fieldsSeed}\n disabled={isProcessing || isExpired}\n invalidJsonMessage={tComponent(CT, \"argumentValueNotValidJson\")}\n onChange={handleFieldsChange}\n />\n ) : (\n <>\n <TextareaRoot\n rows={Math.min(12, Object.keys(executionContext).length + 3)}\n value={draft}\n onChange={(e) => setDraft(e.target.value)}\n className=\"font-mono text-2xs\"\n disabled={isProcessing || isExpired}\n aria-invalid={parsedDraft.invalid || undefined}\n aria-label={tComponent(CT, \"editArguments\")}\n />\n {/*\n * Local JSON validity only. Whether these arguments SUIT the tool is the server's\n * question — it holds the tool's `inputSchema`, refuses an edit that violates it, and\n * leaves the approval pending with a message naming the offending argument. Judging\n * that here would be a second, weaker copy of the control.\n */}\n {parsedDraft.invalid && (\n <span className=\"text-2xs text-destructive\">{tComponent(CT, \"argumentsNotValidJson\")}</span>\n )}\n </>\n )}\n </div>\n )}\n\n <AI_ApprovalActions\n approvalId={approvalId}\n riskLevel={riskLevel}\n onApprove={onApprove}\n onDeny={onDeny}\n onEscalate={onEscalate}\n isProcessing={isProcessing}\n // Approving with unparseable text would send nothing and silently run the model's own\n // arguments — a change collected and dropped, which is the one outcome this feature exists\n // to prevent. The button is unavailable until the draft is an object.\n disabled={\n isExpired\n || (editorMode === ApprovalArgumentEditorMode.FIELDS && fieldsEdit.invalid)\n || (editorMode === ApprovalArgumentEditorMode.JSON && parsedDraft.invalid)\n }\n // Whatever the approver is authoring in — and `undefined` whenever the editor is closed, which is\n // what \"run the call as proposed\" means on the wire.\n modifiedToolArgs={\n editorMode === ApprovalArgumentEditorMode.FIELDS\n ? fieldsEdit.value\n : editorMode === ApprovalArgumentEditorMode.JSON\n ? parsedDraft.value\n : undefined\n }\n />\n </Alert>\n );\n};\n\n//===============================================================\n// AI_ApprovalActions\n//===============================================================\n\nexport type AI_ApprovalActionsProps = ComponentProps<\"div\"> & {\n approvalId: string;\n riskLevel?: \"low\" | \"medium\" | \"high\" | \"critical\";\n /** Present only while the approver has the argument editor open with a parseable draft (#566). */\n modifiedToolArgs?: Record<string, unknown>;\n onApprove?: (approvalId: string, comment?: string, modifiedToolArgs?: Record<string, unknown>) => void;\n onDeny?: (approvalId: string, comment?: string) => void;\n onEscalate?: (approvalId: string, comment?: string) => void;\n isProcessing?: boolean;\n disabled?: boolean;\n};\n\nexport const AI_ApprovalActions = ({\n approvalId,\n riskLevel,\n modifiedToolArgs,\n onApprove,\n onDeny,\n onEscalate,\n isProcessing,\n disabled,\n className,\n ...props\n}: AI_ApprovalActionsProps): React.JSX.Element | null => {\n const { tComponent, isReady } = useI18n({ component: CT });\n const [comment, setComment] = React.useState(\"\");\n const isHighRisk = riskLevel === \"high\" || riskLevel === \"critical\";\n const actionsDisabled = isProcessing || disabled;\n\n if (!isReady) return null;\n\n const approveButton = (\n <Button\n type=\"button\"\n variant={ButtonVariants_Variant.DEFAULT}\n size={ButtonSize.SM}\n disabled={actionsDisabled}\n onClick={isHighRisk ? undefined : () => onApprove?.(approvalId, comment || undefined, modifiedToolArgs)}\n >\n {isProcessing ? tComponent(CT, \"processing\") : tComponent(CT, \"approve\")}\n </Button>\n );\n\n return (\n <div className={cn(\"flex flex-col gap-2\", className)} {...props}>\n {/* Comment textarea */}\n <TextareaRoot\n rows={2}\n value={comment}\n onChange={(e) => setComment(e.target.value)}\n placeholder={tComponent(CT, \"commentPlaceholder\")}\n className=\"text-xs\"\n disabled={actionsDisabled}\n />\n\n <div className=\"flex items-center gap-element\">\n {/* Approve — with confirmation dialog for high/critical risk */}\n {isHighRisk ? (\n <AlertDialog>\n <AlertDialogTrigger asChild>\n {approveButton}\n </AlertDialogTrigger>\n <AlertDialogContent>\n <AlertDialogHeader>\n <AlertDialogTitle>{tComponent(CT, \"confirmTitle\")}</AlertDialogTitle>\n <AlertDialogDescription>{tComponent(CT, \"confirmDescription\")}</AlertDialogDescription>\n </AlertDialogHeader>\n <AlertDialogFooter>\n <AlertDialogCancel>{tComponent(CT, \"confirmCancel\")}</AlertDialogCancel>\n <AlertDialogAction onClick={() => onApprove?.(approvalId, comment || undefined, modifiedToolArgs)}>\n {tComponent(CT, \"confirmProceed\")}\n </AlertDialogAction>\n </AlertDialogFooter>\n </AlertDialogContent>\n </AlertDialog>\n ) : (\n approveButton\n )}\n\n {/* Deny */}\n <Button\n type=\"button\"\n variant={ButtonVariants_Variant.OUTLINE}\n size={ButtonSize.SM}\n disabled={actionsDisabled}\n onClick={() => onDeny?.(approvalId, comment || undefined)}\n >\n {tComponent(CT, \"deny\")}\n </Button>\n\n {/* Escalate (optional) */}\n {onEscalate && (\n <Button\n type=\"button\"\n variant={ButtonVariants_Variant.SECONDARY}\n size={ButtonSize.SM}\n disabled={actionsDisabled}\n onClick={() => onEscalate?.(approvalId, comment || undefined)}\n >\n {tComponent(CT, \"escalate\")}\n </Button>\n )}\n </div>\n </div>\n );\n};\n\n//===============================================================\n// AI_ApprovalQueue\n//===============================================================\n\nconst RISK_ORDER: Record<string, number> = { critical: 0, high: 1, medium: 2, low: 3 };\n\nexport type AI_ApprovalQueueItem = {\n approvalId: string;\n executionId: string;\n systemRef: string;\n actionDescription: string;\n /** OPTIONAL for the same reason as on a single request — nothing populates it (#528). */\n riskLevel?: \"low\" | \"medium\" | \"high\" | \"critical\";\n expiresAt?: Date;\n requiredRoles?: string[];\n executionContext?: Record<string, unknown>;\n createdAt?: Date;\n};\n\nexport type AI_ApprovalQueueProps = ComponentProps<\"div\"> & {\n items: AI_ApprovalQueueItem[];\n onApprove?: (approvalId: string, comment?: string) => void;\n onDeny?: (approvalId: string, comment?: string) => void;\n onEscalate?: (approvalId: string, comment?: string) => void;\n processingIds?: Set<string>;\n filter?: string;\n onFilterChange?: (filter: string) => void;\n};\n\nfunction useRelativeTimeFormatter(): (date: Date) => string {\n const { tComponent } = useI18n({ component: CT });\n return React.useCallback((date: Date): string => {\n const seconds = Math.floor((Date.now() - date.getTime()) / 1_000);\n if (seconds < 60) return tComponent(CT, \"timeAgoSeconds\", { count: String(seconds) });\n const minutes = Math.floor(seconds / 60);\n if (minutes < 60) return tComponent(CT, \"timeAgoMinutes\", { count: String(minutes) });\n const hours = Math.floor(minutes / 60);\n return tComponent(CT, \"timeAgoHours\", { count: String(hours) });\n }, [tComponent]);\n}\n\nexport const AI_ApprovalQueue = ({\n items,\n onApprove,\n onDeny,\n onEscalate,\n processingIds,\n filter,\n onFilterChange,\n className,\n ...props\n}: AI_ApprovalQueueProps): React.JSX.Element | null => {\n const { tComponent, isReady } = useI18n({ component: CT });\n const formatRelativeTime = useRelativeTimeFormatter();\n const [sortByRisk, setSortByRisk] = React.useState(true);\n const [internalFilter, setInternalFilter] = React.useState(\"\");\n\n const activeFilter = filter ?? internalFilter;\n\n const filtered = React.useMemo(() => {\n let result = items;\n if (activeFilter) {\n const q = activeFilter.toLowerCase();\n result = result.filter((i) =>\n i.systemRef.toLowerCase().includes(q) ||\n i.actionDescription.toLowerCase().includes(q) ||\n i.executionId.toLowerCase().includes(q)\n );\n }\n if (sortByRisk) {\n result = [...result].sort((a, b) =>\n (RISK_ORDER[a.riskLevel] ?? 4) - (RISK_ORDER[b.riskLevel] ?? 4)\n );\n }\n return result;\n }, [items, activeFilter, sortByRisk]);\n\n if (!isReady) return null;\n\n return (\n <div className={cn(\"flex flex-col gap-card\", className)} {...props}>\n <div className=\"flex items-center justify-between gap-element\">\n <div className=\"flex items-center gap-element\">\n <h3 className=\"text-sm font-semibold\">\n {tComponent(CT, \"queueTitle\")}\n </h3>\n <Badge variant=\"secondary\">{items.length}</Badge>\n </div>\n\n <Button\n type=\"button\"\n variant={sortByRisk ? ButtonVariants_Variant.SECONDARY : ButtonVariants_Variant.GHOST}\n size={ButtonSize.SM}\n className=\"h-6 text-2xs\"\n onClick={() => setSortByRisk(!sortByRisk)}\n >\n {tComponent(CT, \"queueSortRisk\")}\n </Button>\n </div>\n\n {items.length === 0 ? (\n <p className=\"py-card text-center text-sm text-muted-foreground\">\n {tComponent(CT, \"queueEmpty\")}\n </p>\n ) : (\n <ScrollArea className=\"max-h-96\">\n <div className=\"flex flex-col gap-card-sm\">\n {filtered.map((item) => (\n <div key={item.approvalId} className=\"relative\">\n {item.createdAt && (\n <span className=\"absolute end-2 top-2 text-2xs text-muted-foreground\">\n {formatRelativeTime(item.createdAt)}\n </span>\n )}\n <AI_ApprovalRequest\n approvalId={item.approvalId}\n executionId={item.executionId}\n systemRef={item.systemRef}\n actionDescription={item.actionDescription}\n riskLevel={item.riskLevel}\n expiresAt={item.expiresAt}\n requiredRoles={item.requiredRoles}\n executionContext={item.executionContext}\n createdAt={item.createdAt}\n onApprove={onApprove}\n onDeny={onDeny}\n onEscalate={onEscalate}\n isProcessing={processingIds?.has(item.approvalId)}\n />\n </div>\n ))}\n </div>\n </ScrollArea>\n )}\n </div>\n );\n};\n"]}
|
|
1
|
+
{"version":3,"file":"approval.js","sourceRoot":"","sources":["../../../../../../src/components/ai-elements/decision/approval.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EACL,KAAK,EACL,gBAAgB,EAChB,WAAW,EACX,iBAAiB,EACjB,iBAAiB,EACjB,kBAAkB,EAClB,sBAAsB,EACtB,iBAAiB,EACjB,iBAAi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C,iBAAiB,EACzC,SAAS,EAAE,SAAS,EACpB,MAAM,EAAE,MAAM;gCACd,gFAAgF;gCAChF,UAAU,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS,EACrD,OAAO,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,EAC5C,SAAS,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,EAClD,cAAc,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,SAAS,EAC7D,UAAU,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS,EACrD,kBAAkB,EAAE,IAAI,CAAC,kBAAkB,EAC3C,YAAY,EAAE,IAAI,CAAC,YAAY,EAC/B,YAAY,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,SAAS,EAC3D,aAAa,EAAE,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,SAAS,EAC9D,iBAAiB,EAAE,IAAI,CAAC,iBAAiB,EACzC,cAAc,EAAE,IAAI,CAAC,cAAc,EACnC,iBAAiB,EAAE,IAAI,CAAC,iBAAiB,EACzC,YAAY,EAAE,aAAa,EAAE,GAAG,CAAC,IAAI,CAAC,UAAU,CAAC,GACjD,KApCM,IAAI,CAAC,UAAU,CAqCnB,CACP,CAAC,GACE,GACK,CACd,IACG,CACP,CAAC;AACJ,CAAC,CAAC","sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport {\n Alert,\n AlertDescription,\n AlertDialog,\n AlertDialogAction,\n AlertDialogCancel,\n AlertDialogContent,\n AlertDialogDescription,\n AlertDialogFooter,\n AlertDialogHeader,\n AlertDialogTitle,\n AlertDialogTrigger,\n Badge,\n Button,\n ButtonVariants_Variant,\n ScrollArea,\n SelectContent,\n SelectItem,\n SelectRoot,\n SelectTrigger,\n SelectValue,\n TextareaRoot,\n cn,\n useI18n,\n Surface,\n} from '@wildo-ai/saas-frontend-lib';\nimport type { SerializableZodSchema } from '@wildo-ai/zod-decorators';\n\nimport { FrontendComponentType, ButtonSize, SurfaceVariant } from \"@wildo-ai/presets-components-models\";\nimport { ApprovalArgumentEditorMode, ApprovalArgumentFields, fieldsEditableArgumentsSchema } from \"./approval-argument-fields\";\nimport type { ComponentProps } from \"react\";\n\nconst CT: FrontendComponentType = FrontendComponentType.LOW_LEVEL_AI_APPROVAL;\n\n//===============================================================\n// Human-in-the-Loop Approval Components\n//\n// BACKEND DEPENDENCIES:\n// - FlowsActorsContext.respondToApproval() — implemented (WebSocket emit)\n// - WebSocket event: FLOWS_ACTORS_APPROVAL_REQUEST — implemented\n// - FlowsActorsExecution.pendingApproval — schema ready:\n// { approvalId, actionDescription, riskLevel, expiresAt?, requiredRoles? }\n//\n// Components render approval UI from props. Wire to context via\n// the saas-frontend-lib wrapper (flows-actors/approval.tsx).\n//===============================================================\n\n//===============================================================\n// useCountdown — shared countdown hook\n//===============================================================\n\nfunction useCountdown(expiresAt: Date | undefined): { remaining: string | null; isExpired: boolean } {\n const [now, setNow] = React.useState(() => Date.now());\n\n React.useEffect(() => {\n if (!expiresAt) return;\n const id = setInterval(() => setNow(Date.now()), 1_000);\n return () => clearInterval(id);\n }, [expiresAt]);\n\n if (!expiresAt) return { remaining: null, isExpired: false };\n\n const diff = expiresAt.getTime() - now;\n if (diff <= 0) return { remaining: null, isExpired: true };\n\n const totalSeconds = Math.floor(diff / 1_000);\n const minutes = Math.floor(totalSeconds / 60);\n const seconds = totalSeconds % 60;\n const remaining = minutes > 0\n ? `${minutes}m ${String(seconds).padStart(2, \"0\")}s`\n : `${seconds}s`;\n\n return { remaining, isExpired: false };\n}\n\n//===============================================================\n// AI_ApprovalRequest\n//===============================================================\n\n/** One person a decision may be moved to, as the surface shows them. `value` is their id. */\nexport type AI_ApprovalReassignCandidate = { value: string; label: string };\n\n/** One reason a decision's clocks may be paused for (#1628). `value` is the gate's pause-state identifier. */\nexport type AI_ApprovalPauseStateOption = { value: string; label: string };\n\n/**\n * One reason an approver may give for changing or rejecting an agent's proposal (#1921). `value` is a code of the\n * application's declared vocabulary; `label` is its word, as LOCALIZED text the surface's owner resolved.\n */\nexport type AI_ApprovalReasonCodeOption = { value: string; label: string };\n\n/**\n * What else a person may do with a decision besides answering it (#1594 D12). Each is offered only when its\n * callback is supplied, so a surface shows exactly the acts its owner can carry out — never a button that\n * submits into nothing.\n */\nexport type AI_ApprovalRoutingProps = {\n /** Take a decision routed to a role you hold for yourself. */\n onClaim?: (approvalId: string) => void;\n /** Give a decision you claimed back to its role. */\n onUnclaim?: (approvalId: string) => void;\n /** The reassign picker opened: load who it may go to, and pass them back as `reassignCandidates`. */\n onReassignOpen?: (approvalId: string) => void;\n /** Only people who could answer it. Absent while loading; empty when nobody else can. */\n reassignCandidates?: readonly AI_ApprovalReassignCandidate[];\n onReassign?: (approvalId: string, targetUserId: string, comment?: string) => void;\n /**\n * What the last act came to, as LOCALIZED text the surface's owner resolved — \"someone else settled this\",\n * \"there is nobody to escalate this to\". Absent when there is nothing to say.\n */\n actionNotice?: string;\n /**\n * Stop the decision's CLAIM and DECISION deadlines, naming one of `pauseStateOptions` (#1628). Offered only\n * with at least one option. Pausing never stops the decision from expiring.\n */\n onPauseClock?: (approvalId: string, pauseStateRef: string) => void;\n /** Restart paused deadlines; the paused time is added to them. */\n onResumeClock?: (approvalId: string) => void;\n /** The reasons the gate allows its deadlines to be paused for. */\n pauseStateOptions?: readonly AI_ApprovalPauseStateOption[];\n /** The next deadline ahead of the decision, as LOCALIZED text the surface's owner resolved. */\n deadlineNotice?: string;\n /** Set while its deadlines are paused: why, as LOCALIZED text the surface's owner resolved. */\n clockPausedNotice?: string;\n};\n\nexport type AI_ApprovalRequestProps = ComponentProps<typeof Alert> & AI_ApprovalRoutingProps & {\n /**\n * Whether THIS viewer may answer it (#1594). `false` renders the request with no actions — the person\n * whose conversation it is sees a question that a reviewer answers, and `actionNotice` says so. Default\n * `true`, which is every surface that answers its own questions.\n */\n answerable?: boolean;\n approvalId: string;\n actionDescription: string;\n /**\n * OPTIONAL, because nothing populates it. A risk level exists only on\n * `WS_FlowsActorsApprovalRequestPayload`, a payload no code emits; the announcement a paused turn\n * really sends carries a tool name and its arguments and no risk claim (#528). Absent means the\n * badge is not rendered — a default here would show a severity nobody declared.\n */\n riskLevel?: \"low\" | \"medium\" | \"high\" | \"critical\";\n executionId: string;\n systemRef?: string;\n expiresAt?: Date;\n requiredRoles?: string[];\n /**\n * The gated tool call, and the arguments proposed for it.\n *\n * `toolName` is an IDENTIFIER, rendered as authored — it is the thing the agent asked to run,\n * and humanizing it here would invent display text no i18n tree owns.\n * `executionContext` carries the arguments (#455).\n */\n toolName?: string;\n executionContext?: Record<string, unknown>;\n /**\n * Offer the approver an EDITOR over the proposed arguments (#566).\n *\n * Off by default, and it is not a styling preference: turning it on changes what an approval MEANS\n * — the approver stops assenting to the agent's call and starts authoring one. A surface that\n * shows the editor must be wired to a decision path that carries the result, or it collects a\n * change and drops it, which is the failure #537 refused to ship.\n *\n * The editor offers the tool's FIELDS when `argumentsSchema` describes a shape they can express\n * (#587), and raw JSON otherwise; the raw editor stays one click away in both cases. Neither is the\n * control: the server re-validates the edit against the tool's live schema and refuses a violation\n * with a readable message, which is why a field editor that drops refinements is still honest.\n */\n allowArgumentModification?: boolean;\n /** The gated tool's input-schema descriptor (#587). Absent, or a shape fields cannot express, means raw JSON. */\n argumentsSchema?: SerializableZodSchema;\n /**\n * Why the last submitted edit was refused (#587), as LOCALIZED text. The approval is still pending: the\n * editor reopens on the refused arguments and shows this reason beside them. The engine wrapper renders it\n * from the approval's own labels, one per refusal reason, naming the tool and the offending arguments\n * (#1186) — a direct consumer must pass words the reader can read, never a server's sentence.\n */\n argumentModificationError?: string;\n /** What the approver submitted when that edit was refused (#587) — the reopened editor starts from it. */\n rejectedArguments?: Record<string, unknown>;\n /**\n * The reasons an approver may give when they CHANGE or REJECT the proposal (#1921) — the application's declared\n * vocabulary, worded by the surface's owner. Offered only then: approving the call as proposed is not a correction.\n * Never required — a reason is evidence for why experts disagree with the agent, not a gate on answering.\n */\n reasonCodeOptions?: readonly AI_ApprovalReasonCodeOption[];\n /**\n * `modifiedToolArgs` is present only when the approver EDITED the arguments. Absent means \"run the\n * call as proposed\", which is what every approval meant before this parameter existed. `reasonCode` is present only\n * when the approver edited the call AND chose a reason for it (#1921).\n */\n onApprove?: (approvalId: string, comment?: string, modifiedToolArgs?: Record<string, unknown>, reasonCode?: string) => void;\n /** `reasonCode` is present only when the approver chose a reason for the rejection (#1921). */\n onDeny?: (approvalId: string, comment?: string, reasonCode?: string) => void;\n onEscalate?: (approvalId: string, comment?: string) => void;\n isProcessing?: boolean;\n createdAt?: Date;\n};\n\nexport const AI_ApprovalRequest = ({\n approvalId,\n actionDescription,\n riskLevel,\n executionId,\n systemRef,\n expiresAt,\n requiredRoles,\n toolName,\n executionContext,\n allowArgumentModification,\n argumentsSchema,\n argumentModificationError,\n rejectedArguments,\n reasonCodeOptions,\n onApprove,\n onDeny,\n onEscalate,\n onClaim,\n onUnclaim,\n onReassignOpen,\n reassignCandidates,\n onReassign,\n actionNotice,\n onPauseClock,\n onResumeClock,\n pauseStateOptions,\n deadlineNotice,\n clockPausedNotice,\n answerable = true,\n isProcessing,\n createdAt,\n className,\n ...props\n}: AI_ApprovalRequestProps): React.JSX.Element | null => {\n const { tComponent, isReady } = useI18n({ component: CT });\n const { remaining, isExpired } = useCountdown(expiresAt);\n const variant = riskLevel === \"critical\" || riskLevel === \"high\" ? \"destructive\" : \"default\";\n\n /*\n * The argument editor's state (#566).\n *\n * `draft` is `null` while the approver is reading rather than editing — distinct from an empty\n * string, which is a draft they have cleared. Opening the editor seeds it from the PROPOSED\n * arguments, so the starting point is the call the agent asked for and an approver changes one\n * value rather than retyping the object.\n */\n const fieldsSchema = React.useMemo(() => fieldsEditableArgumentsSchema(argumentsSchema), [argumentsSchema]);\n /*\n * A refused edit reopens on what the approver SUBMITTED (#587). The request unmounted while its\n * decision was in flight, so without this the approver would land back on the model's proposal and\n * lose the change the server has just explained.\n */\n const reopenedOn = argumentModificationError !== undefined ? (rejectedArguments ?? executionContext) : undefined;\n const [editorMode, setEditorMode] = React.useState<ApprovalArgumentEditorMode | null>(() =>\n reopenedOn === undefined ? null : fieldsSchema ? ApprovalArgumentEditorMode.FIELDS : ApprovalArgumentEditorMode.JSON,\n );\n // The value the field editor (re)mounts on — replaced when the approver switches back from JSON.\n const [fieldsSeed, setFieldsSeed] = React.useState<Record<string, unknown>>(() => reopenedOn ?? executionContext ?? {});\n const [fieldsEdit, setFieldsEdit] = React.useState<{ value: Record<string, unknown> | undefined; invalid: boolean }>({\n value: undefined,\n invalid: false,\n });\n const handleFieldsChange = React.useCallback(\n (next: { value: Record<string, unknown> | undefined; invalid: boolean }) => setFieldsEdit(next),\n [],\n );\n const [draft, setDraft] = React.useState<string>(() => JSON.stringify(reopenedOn ?? executionContext ?? {}, null, 2));\n const parsedDraft = React.useMemo(() => {\n try {\n const value = JSON.parse(draft) as unknown;\n // An array or a scalar is valid JSON and cannot be a tool's arguments. Refusing it HERE spares\n // the round trip; the server refuses it too, which is what actually protects the call.\n if (value === null || typeof value !== \"object\" || Array.isArray(value)) return { value: undefined, invalid: true };\n return { value: value as Record<string, unknown>, invalid: false };\n } catch {\n return { value: undefined, invalid: true };\n }\n }, [draft]);\n\n if (!isReady) return null;\n\n return (\n <Alert variant={variant} className={cn(\"flex flex-col gap-card-sm\", className)} {...props}>\n <div className=\"flex items-center justify-between gap-element\">\n <div className=\"flex items-center gap-element\">\n {riskLevel && (\n <Badge\n variant={riskLevel === \"critical\" || riskLevel === \"high\" ? \"destructive\" : \"outline\"}\n className=\"text-2xs\"\n >\n {tComponent(CT, `risk${riskLevel.charAt(0).toUpperCase()}${riskLevel.slice(1)}` as any)}\n </Badge>\n )}\n {systemRef && (\n <span className=\"text-2xs text-muted-foreground\">{systemRef}</span>\n )}\n </div>\n\n {/* Countdown / Expired indicator */}\n {remaining && (\n <Badge variant=\"secondary\" className=\"text-2xs tabular-nums\">\n {tComponent(CT, \"expiresCountdown\", { time: remaining })}\n </Badge>\n )}\n {isExpired && (\n <Badge variant=\"destructive\" className=\"text-2xs\">\n {tComponent(CT, \"expired\")}\n </Badge>\n )}\n </div>\n\n <AlertDescription className=\"text-sm\">\n {actionDescription}\n </AlertDescription>\n\n {/* #1628 — the next deadline ahead of it, or why its deadlines are paused. Neither is the expiry above. */}\n {clockPausedNotice !== undefined ? (\n <span className=\"text-2xs text-muted-foreground\">{clockPausedNotice}</span>\n ) : deadlineNotice !== undefined ? (\n <span className=\"text-2xs text-muted-foreground\">{deadlineNotice}</span>\n ) : null}\n\n {/* Required roles display */}\n {requiredRoles && requiredRoles.length > 0 && (\n <div className=\"flex items-center gap-element\">\n <span className=\"text-2xs text-muted-foreground\">{tComponent(CT, \"requiredRoles\")}:</span>\n <div className=\"flex gap-1\">\n {requiredRoles.map((role) => (\n <Badge key={role} variant=\"outline\" className=\"text-2xs\">\n {role}\n </Badge>\n ))}\n </div>\n </div>\n )}\n\n {/* The gated tool call — WHAT the approver is being asked to authorize (#455). */}\n {toolName !== undefined && (\n <div className=\"flex items-center gap-element\">\n <span className=\"text-2xs text-muted-foreground\">{tComponent(CT, \"toolCall\")}:</span>\n {/*\n * Rendered as authored. A tool name is an IDENTIFIER the agent runtime owns, and turning\n * `renameTodo` into \"Rename Todo\" would invent display text no i18n tree can correct —\n * the exact fallback `display-text-comes-from-i18n.md` retired. The approver is better\n * served by the name the system will actually run.\n */}\n <code className=\"rounded bg-muted px-1 py-0.5 text-2xs font-mono\">{toolName}</code>\n </div>\n )}\n\n {/*\n * The proposed ARGUMENTS, one row per key, expanded by default.\n *\n * This was a collapsed `JSON.stringify` in a `<pre>`. Two things were wrong with that and only\n * the second is cosmetic: a blob is not readable at approval speed, and COLLAPSED-BY-DEFAULT\n * hides the very thing being approved — an approver who never opens it is signing an unread\n * document, which is how an approval prompt stops being read at all.\n *\n * Keys render VERBATIM. They are the tool's own parameter names, they carry no i18n entry, and\n * humanizing them is forbidden for the same reason as the tool name. A value that is not a\n * primitive is serialized, because a nested object has no honest one-line form — and that\n * narrow case is the only place a JSON fragment survives.\n */}\n {executionContext && Object.keys(executionContext).length > 0 && (\n <div className=\"flex flex-col gap-element\">\n <div className=\"flex items-center justify-between gap-element\">\n <span className=\"text-2xs text-muted-foreground\">{tComponent(CT, \"toolArguments\")}:</span>\n {/*\n * The door to approve-with-modifications (#566), rendered only when the surface's owner\n * declared it. An approver who edits these is AUTHORING a call the agent never\n * proposed, so it is opt-in per surface rather than always present.\n */}\n {allowArgumentModification && (\n <div className=\"flex items-center gap-1\">\n {/*\n * Fields ⇄ JSON (#587). Offered only when the descriptor can be expressed as fields, and\n * JSON → fields only from a draft that parses, so switching never discards an edit.\n */}\n {editorMode !== null && fieldsSchema && (\n <Button\n type=\"button\"\n variant={ButtonVariants_Variant.GHOST}\n size={ButtonSize.SM}\n disabled={isProcessing || isExpired || (editorMode === ApprovalArgumentEditorMode.JSON && parsedDraft.invalid)}\n onClick={() => {\n if (editorMode === ApprovalArgumentEditorMode.FIELDS) {\n setDraft(JSON.stringify(fieldsEdit.value ?? fieldsSeed, null, 2));\n setEditorMode(ApprovalArgumentEditorMode.JSON);\n } else if (parsedDraft.value) {\n setFieldsSeed(parsedDraft.value);\n setEditorMode(ApprovalArgumentEditorMode.FIELDS);\n }\n }}\n >\n {tComponent(CT, editorMode === ApprovalArgumentEditorMode.FIELDS ? \"editArgumentsAsJson\" : \"editArgumentsAsFields\")}\n </Button>\n )}\n <Button\n type=\"button\"\n variant={ButtonVariants_Variant.GHOST}\n size={ButtonSize.SM}\n disabled={isProcessing || isExpired}\n onClick={() => {\n if (editorMode !== null) {\n setEditorMode(null);\n return;\n }\n // Opening always starts from the call the agent PROPOSED.\n const proposed = executionContext ?? {};\n setFieldsSeed(proposed);\n setDraft(JSON.stringify(proposed, null, 2));\n setEditorMode(fieldsSchema ? ApprovalArgumentEditorMode.FIELDS : ApprovalArgumentEditorMode.JSON);\n }}\n >\n {tComponent(CT, editorMode === null ? \"editArguments\" : \"discardArgumentEdits\")}\n </Button>\n </div>\n )}\n </div>\n {/*\n * Why the last submitted edit was refused (#587). The words are the approval's own labels,\n * resolved by the wrapper per refusal reason with the offending arguments named (#1186); the\n * server's sentence no longer reaches this card. The approval is still pending while it shows.\n */}\n {argumentModificationError !== undefined && editorMode !== null && (\n <span className=\"text-2xs text-destructive\">\n {tComponent(CT, \"argumentModificationRefused\")}: {argumentModificationError}\n </span>\n )}\n {editorMode === null ? (\n <Surface asChild emitPolicyVars={false} variant={SurfaceVariant.INSET}>\n <dl className=\"grid grid-cols-[auto_1fr] gap-x-element gap-y-0.5 rounded-md bg-muted p-2 text-2xs\">\n {Object.entries(executionContext).map(([key, value]) => (\n <React.Fragment key={key}>\n <dt className=\"font-mono text-muted-foreground\">{key}</dt>\n <dd className=\"min-w-0 break-words font-mono\">\n {typeof value === \"string\" || typeof value === \"number\" || typeof value === \"boolean\"\n ? String(value)\n : JSON.stringify(value)}\n </dd>\n </React.Fragment>\n ))}\n </dl>\n </Surface>\n ) : editorMode === ApprovalArgumentEditorMode.FIELDS && fieldsSchema ? (\n <ApprovalArgumentFields\n schema={fieldsSchema}\n initialValue={fieldsSeed}\n disabled={isProcessing || isExpired}\n invalidJsonMessage={tComponent(CT, \"argumentValueNotValidJson\")}\n onChange={handleFieldsChange}\n />\n ) : (\n <>\n <TextareaRoot\n rows={Math.min(12, Object.keys(executionContext).length + 3)}\n value={draft}\n onChange={(e) => setDraft(e.target.value)}\n className=\"font-mono text-2xs\"\n disabled={isProcessing || isExpired}\n aria-invalid={parsedDraft.invalid || undefined}\n aria-label={tComponent(CT, \"editArguments\")}\n />\n {/*\n * Local JSON validity only. Whether these arguments SUIT the tool is the server's\n * question — it holds the tool's `inputSchema`, refuses an edit that violates it, and\n * leaves the approval pending with a message naming the offending argument. Judging\n * that here would be a second, weaker copy of the control.\n */}\n {parsedDraft.invalid && (\n <span className=\"text-2xs text-destructive\">{tComponent(CT, \"argumentsNotValidJson\")}</span>\n )}\n </>\n )}\n </div>\n )}\n\n {!answerable ? (\n actionNotice !== undefined && <span role=\"status\" className=\"text-2xs text-muted-foreground\">{actionNotice}</span>\n ) : (\n <AI_ApprovalActions\n approvalId={approvalId}\n riskLevel={riskLevel}\n onApprove={onApprove}\n onDeny={onDeny}\n onEscalate={onEscalate}\n onClaim={onClaim}\n onUnclaim={onUnclaim}\n onReassignOpen={onReassignOpen}\n reassignCandidates={reassignCandidates}\n onReassign={onReassign}\n actionNotice={actionNotice}\n onPauseClock={onPauseClock}\n onResumeClock={onResumeClock}\n pauseStateOptions={pauseStateOptions}\n reasonCodeOptions={reasonCodeOptions}\n isProcessing={isProcessing}\n // Approving with unparseable text would send nothing and silently run the model's own\n // arguments — a change collected and dropped, which is the one outcome this feature exists\n // to prevent. The button is unavailable until the draft is an object.\n disabled={\n isExpired\n || (editorMode === ApprovalArgumentEditorMode.FIELDS && fieldsEdit.invalid)\n || (editorMode === ApprovalArgumentEditorMode.JSON && parsedDraft.invalid)\n }\n // Whatever the approver is authoring in — and `undefined` whenever the editor is closed, which is\n // what \"run the call as proposed\" means on the wire.\n modifiedToolArgs={\n editorMode === ApprovalArgumentEditorMode.FIELDS\n ? fieldsEdit.value\n : editorMode === ApprovalArgumentEditorMode.JSON\n ? parsedDraft.value\n : undefined\n }\n />\n )}\n </Alert>\n );\n};\n\n//===============================================================\n// AI_ApprovalActions\n//===============================================================\n\nexport type AI_ApprovalActionsProps = ComponentProps<\"div\"> & AI_ApprovalRoutingProps & {\n approvalId: string;\n riskLevel?: \"low\" | \"medium\" | \"high\" | \"critical\";\n /** Present only while the approver has the argument editor open with a parseable draft (#566). */\n modifiedToolArgs?: Record<string, unknown>;\n /** See {@link AI_ApprovalRequestProps.reasonCodeOptions} (#1921). */\n reasonCodeOptions?: readonly AI_ApprovalReasonCodeOption[];\n onApprove?: (approvalId: string, comment?: string, modifiedToolArgs?: Record<string, unknown>, reasonCode?: string) => void;\n onDeny?: (approvalId: string, comment?: string, reasonCode?: string) => void;\n onEscalate?: (approvalId: string, comment?: string) => void;\n isProcessing?: boolean;\n disabled?: boolean;\n};\n\nexport const AI_ApprovalActions = ({\n approvalId,\n riskLevel,\n modifiedToolArgs,\n reasonCodeOptions,\n onApprove,\n onDeny,\n onEscalate,\n onClaim,\n onUnclaim,\n onReassignOpen,\n reassignCandidates,\n onReassign,\n actionNotice,\n onPauseClock,\n onResumeClock,\n pauseStateOptions,\n isProcessing,\n disabled,\n className,\n ...props\n}: AI_ApprovalActionsProps): React.JSX.Element | null => {\n const { tComponent, isReady } = useI18n({ component: CT });\n const [comment, setComment] = React.useState(\"\");\n /*\n * #1921 — the reason an approver gives for a CORRECTION. `undefined` until one is chosen, and optional throughout.\n *\n * Offered only on the two answers that correct the agent: an EDITED approval (the editor is open, so\n * `modifiedToolArgs` is defined) and a rejection. Approving the call as proposed is agreement, so a reason there would\n * enter the record as the reason for a correction that never happened — it is never sent then, even if one was\n * picked while the editor was open. A rejection needs somewhere to choose BEFORE it is sent, so with reasons on offer\n * Reject opens a picker and a confirm button, the pattern Reassign and Pause already use.\n */\n const [reasonCode, setReasonCode] = React.useState<string | undefined>(undefined);\n const [rejecting, setRejecting] = React.useState(false);\n const offersReasons = (reasonCodeOptions?.length ?? 0) > 0;\n const isModifying = modifiedToolArgs !== undefined;\n // The reason rides as a TRAILING argument only when there is one, so an answer with no reason is called exactly as it\n // was before reasons existed — `(id, comment, args)` — and a consumer written against that shape sees no change.\n const correctionReason: [string] | [] = reasonCode !== undefined ? [reasonCode] : [];\n const approvalReason: [string] | [] = isModifying ? correctionReason : [];\n // #1628 — `null` while the pause picker is closed; the chosen reason once one is picked.\n const [pausing, setPausing] = React.useState<{ state: string | undefined } | null>(null);\n const canPause = !!onPauseClock && (pauseStateOptions?.length ?? 0) > 0;\n // `null` while the picker is closed; the chosen person's id once one is picked.\n const [reassigning, setReassigning] = React.useState<{ target: string | undefined } | null>(null);\n const isHighRisk = riskLevel === \"high\" || riskLevel === \"critical\";\n const actionsDisabled = isProcessing || disabled;\n\n if (!isReady) return null;\n\n const approveButton = (\n <Button\n type=\"button\"\n variant={ButtonVariants_Variant.DEFAULT}\n size={ButtonSize.SM}\n disabled={actionsDisabled}\n onClick={isHighRisk ? undefined : () => onApprove?.(approvalId, comment || undefined, modifiedToolArgs, ...approvalReason)}\n >\n {isProcessing ? tComponent(CT, \"processing\") : tComponent(CT, \"approve\")}\n </Button>\n );\n\n return (\n <div className={cn(\"flex flex-col gap-2\", className)} {...props}>\n {/* Comment textarea */}\n <TextareaRoot\n rows={2}\n value={comment}\n onChange={(e) => setComment(e.target.value)}\n placeholder={tComponent(CT, \"commentPlaceholder\")}\n className=\"text-xs\"\n disabled={actionsDisabled}\n />\n\n <div className=\"flex items-center gap-element\">\n {/* Approve — with confirmation dialog for high/critical risk */}\n {isHighRisk ? (\n <AlertDialog>\n <AlertDialogTrigger asChild>\n {approveButton}\n </AlertDialogTrigger>\n <AlertDialogContent>\n <AlertDialogHeader>\n <AlertDialogTitle>{tComponent(CT, \"confirmTitle\")}</AlertDialogTitle>\n <AlertDialogDescription>{tComponent(CT, \"confirmDescription\")}</AlertDialogDescription>\n </AlertDialogHeader>\n <AlertDialogFooter>\n <AlertDialogCancel>{tComponent(CT, \"confirmCancel\")}</AlertDialogCancel>\n <AlertDialogAction onClick={() => onApprove?.(approvalId, comment || undefined, modifiedToolArgs, ...approvalReason)}>\n {tComponent(CT, \"confirmProceed\")}\n </AlertDialogAction>\n </AlertDialogFooter>\n </AlertDialogContent>\n </AlertDialog>\n ) : (\n approveButton\n )}\n\n {/* Deny — with reasons on offer, it opens the reason picker first (#1921); otherwise it rejects at once. */}\n <Button\n type=\"button\"\n variant={ButtonVariants_Variant.OUTLINE}\n size={ButtonSize.SM}\n disabled={actionsDisabled}\n aria-expanded={offersReasons ? rejecting : undefined}\n onClick={() => {\n if (!offersReasons) { onDeny?.(approvalId, comment || undefined); return; }\n setRejecting(!rejecting);\n }}\n >\n {tComponent(CT, \"deny\")}\n </Button>\n\n {/* Escalate (optional) */}\n {onEscalate && (\n <Button\n type=\"button\"\n variant={ButtonVariants_Variant.SECONDARY}\n size={ButtonSize.SM}\n disabled={actionsDisabled}\n onClick={() => onEscalate?.(approvalId, comment || undefined)}\n >\n {tComponent(CT, \"escalate\")}\n </Button>\n )}\n\n {onClaim && (\n <Button type=\"button\" variant={ButtonVariants_Variant.GHOST} size={ButtonSize.SM} disabled={isProcessing} onClick={() => onClaim(approvalId)}>\n {tComponent(CT, \"claim\")}\n </Button>\n )}\n {onUnclaim && (\n <Button type=\"button\" variant={ButtonVariants_Variant.GHOST} size={ButtonSize.SM} disabled={isProcessing} onClick={() => onUnclaim(approvalId)}>\n {tComponent(CT, \"unclaim\")}\n </Button>\n )}\n {canPause && (\n <Button\n type=\"button\"\n variant={ButtonVariants_Variant.GHOST}\n size={ButtonSize.SM}\n disabled={isProcessing}\n aria-expanded={pausing !== null}\n onClick={() => setPausing(pausing !== null ? null : { state: undefined })}\n >\n {tComponent(CT, \"pauseClock\")}\n </Button>\n )}\n {onResumeClock && (\n <Button type=\"button\" variant={ButtonVariants_Variant.GHOST} size={ButtonSize.SM} disabled={isProcessing} onClick={() => onResumeClock(approvalId)}>\n {tComponent(CT, \"resumeClock\")}\n </Button>\n )}\n {onReassign && (\n <Button\n type=\"button\"\n variant={ButtonVariants_Variant.GHOST}\n size={ButtonSize.SM}\n disabled={isProcessing}\n aria-expanded={reassigning !== null}\n onClick={() => {\n if (reassigning !== null) { setReassigning(null); return; }\n setReassigning({ target: undefined });\n onReassignOpen?.(approvalId);\n }}\n >\n {tComponent(CT, \"reassign\")}\n </Button>\n )}\n </div>\n\n {/*\n * #1921 — the reason picker, shown while the approver is CORRECTING the agent: editing the call, or rejecting it.\n * It lists only the application's declared codes, so a reason chosen here is never refused for what it is. On a\n * rejection it carries the confirm button, because the rejection is sent from here.\n */}\n {offersReasons && (isModifying || rejecting) && (\n <div className=\"flex items-center gap-element\">\n <SelectRoot value={reasonCode ?? \"\"} onValueChange={(value) => setReasonCode(value || undefined)} disabled={actionsDisabled}>\n <SelectTrigger className=\"text-2xs\" aria-label={tComponent(CT, \"reasonCode\")}>\n <SelectValue placeholder={tComponent(CT, \"reasonCode\")} />\n </SelectTrigger>\n <SelectContent>\n {(reasonCodeOptions ?? []).map((option) => (\n <SelectItem key={option.value} value={option.value}>{option.label}</SelectItem>\n ))}\n </SelectContent>\n </SelectRoot>\n {reasonCode !== undefined && (\n <Button type=\"button\" variant={ButtonVariants_Variant.GHOST} size={ButtonSize.SM} disabled={actionsDisabled} onClick={() => setReasonCode(undefined)}>\n {tComponent(CT, \"reasonCodeClear\")}\n </Button>\n )}\n {rejecting && (\n <Button\n type=\"button\"\n variant={ButtonVariants_Variant.DESTRUCTIVE}\n size={ButtonSize.SM}\n disabled={actionsDisabled}\n onClick={() => {\n onDeny?.(approvalId, comment || undefined, ...correctionReason);\n setRejecting(false);\n }}\n >\n {tComponent(CT, \"denyConfirm\")}\n </Button>\n )}\n </div>\n )}\n\n {/*\n * The reassign picker. It lists only the people the server says could ANSWER this decision, so a\n * choice made here is never refused for who the person is — only if the decision moved meanwhile.\n */}\n {onReassign && reassigning !== null && (\n <div className=\"flex items-center gap-element\">\n {reassignCandidates === undefined ? (\n <span className=\"text-2xs text-muted-foreground\">{tComponent(CT, \"processing\")}</span>\n ) : reassignCandidates.length === 0 ? (\n <span className=\"text-2xs text-muted-foreground\">{tComponent(CT, \"reassignNoCandidates\")}</span>\n ) : (\n <>\n <SelectRoot value={reassigning.target} onValueChange={(target) => setReassigning({ target })} disabled={isProcessing}>\n <SelectTrigger className=\"text-2xs\" aria-label={tComponent(CT, \"reassignTarget\")}>\n <SelectValue placeholder={tComponent(CT, \"reassignTarget\")} />\n </SelectTrigger>\n <SelectContent>\n {reassignCandidates.map((candidate) => (\n <SelectItem key={candidate.value} value={candidate.value}>{candidate.label}</SelectItem>\n ))}\n </SelectContent>\n </SelectRoot>\n <Button\n type=\"button\"\n variant={ButtonVariants_Variant.SECONDARY}\n size={ButtonSize.SM}\n disabled={isProcessing || reassigning.target === undefined}\n onClick={() => {\n if (reassigning.target === undefined) return;\n onReassign(approvalId, reassigning.target, comment || undefined);\n setReassigning(null);\n }}\n >\n {tComponent(CT, \"reassignConfirm\")}\n </Button>\n </>\n )}\n </div>\n )}\n\n {/* #1628 — the pause picker: only the reasons the gate declares, so a pause is never refused for its reason. */}\n {canPause && pausing !== null && (\n <div className=\"flex items-center gap-element\">\n <SelectRoot value={pausing.state} onValueChange={(state) => setPausing({ state })} disabled={isProcessing}>\n <SelectTrigger className=\"text-2xs\" aria-label={tComponent(CT, \"pauseClockState\")}>\n <SelectValue placeholder={tComponent(CT, \"pauseClockState\")} />\n </SelectTrigger>\n <SelectContent>\n {(pauseStateOptions ?? []).map((option) => (\n <SelectItem key={option.value} value={option.value}>{option.label}</SelectItem>\n ))}\n </SelectContent>\n </SelectRoot>\n <Button\n type=\"button\"\n variant={ButtonVariants_Variant.SECONDARY}\n size={ButtonSize.SM}\n disabled={isProcessing || pausing.state === undefined}\n onClick={() => {\n if (pausing.state === undefined || !onPauseClock) return;\n onPauseClock(approvalId, pausing.state);\n setPausing(null);\n }}\n >\n {tComponent(CT, \"pauseClockConfirm\")}\n </Button>\n </div>\n )}\n\n {actionNotice !== undefined && (\n <span role=\"status\" className=\"text-2xs text-muted-foreground\">{actionNotice}</span>\n )}\n </div>\n );\n};\n\n//===============================================================\n// AI_ApprovalQueue\n//===============================================================\n\nconst RISK_ORDER: Record<string, number> = { critical: 0, high: 1, medium: 2, low: 3 };\n\nexport type AI_ApprovalQueueItem = {\n approvalId: string;\n executionId: string;\n systemRef: string;\n actionDescription: string;\n /** OPTIONAL for the same reason as on a single request — nothing populates it (#528). */\n riskLevel?: \"low\" | \"medium\" | \"high\" | \"critical\";\n expiresAt?: Date;\n requiredRoles?: string[];\n executionContext?: Record<string, unknown>;\n createdAt?: Date;\n /** The gated tool, rendered as authored (#455). */\n toolName?: string;\n /**\n * Which routing acts THIS item offers (#1594). Unset means none: the queue's callbacks are wired per item\n * only where the person may perform the act, so no item shows a button the server would refuse.\n */\n canEscalate?: boolean;\n canClaim?: boolean;\n canUnclaim?: boolean;\n canReassign?: boolean;\n /** See {@link AI_ApprovalRoutingProps.reassignCandidates}. */\n reassignCandidates?: readonly AI_ApprovalReassignCandidate[];\n /** See {@link AI_ApprovalRoutingProps.actionNotice}. */\n actionNotice?: string;\n /** #1628: whether this item offers Pause / Resume, the reasons it may be paused for, and its deadline lines. */\n canPauseClock?: boolean;\n canResumeClock?: boolean;\n pauseStateOptions?: readonly AI_ApprovalPauseStateOption[];\n deadlineNotice?: string;\n clockPausedNotice?: string;\n /** #1921: the reasons a reviewer may give when changing or rejecting this item's proposal. */\n reasonCodeOptions?: readonly AI_ApprovalReasonCodeOption[];\n /** #1921: offer the argument editor on this item, so a reviewer may CHANGE the proposed call. */\n allowArgumentModification?: boolean;\n /** The gated tool's input-schema descriptor, so the editor offers the tool's fields (#587). */\n argumentsSchema?: SerializableZodSchema;\n};\n\nexport type AI_ApprovalQueueProps = ComponentProps<\"div\"> & Omit<AI_ApprovalRoutingProps, 'reassignCandidates' | 'actionNotice' | 'pauseStateOptions' | 'deadlineNotice' | 'clockPausedNotice'> & {\n items: AI_ApprovalQueueItem[];\n /** `modifiedToolArgs` only when the reviewer edited the call; `reasonCode` only when they gave a reason (#1921). */\n onApprove?: (approvalId: string, comment?: string, modifiedToolArgs?: Record<string, unknown>, reasonCode?: string) => void;\n onDeny?: (approvalId: string, comment?: string, reasonCode?: string) => void;\n onEscalate?: (approvalId: string, comment?: string) => void;\n processingIds?: Set<string>;\n filter?: string;\n onFilterChange?: (filter: string) => void;\n};\n\nfunction useRelativeTimeFormatter(): (date: Date) => string {\n const { tComponent } = useI18n({ component: CT });\n return React.useCallback((date: Date): string => {\n const seconds = Math.floor((Date.now() - date.getTime()) / 1_000);\n if (seconds < 60) return tComponent(CT, \"timeAgoSeconds\", { count: String(seconds) });\n const minutes = Math.floor(seconds / 60);\n if (minutes < 60) return tComponent(CT, \"timeAgoMinutes\", { count: String(minutes) });\n const hours = Math.floor(minutes / 60);\n return tComponent(CT, \"timeAgoHours\", { count: String(hours) });\n }, [tComponent]);\n}\n\nexport const AI_ApprovalQueue = ({\n items,\n onApprove,\n onDeny,\n onEscalate,\n onClaim,\n onUnclaim,\n onReassignOpen,\n onReassign,\n onPauseClock,\n onResumeClock,\n processingIds,\n filter,\n onFilterChange,\n className,\n ...props\n}: AI_ApprovalQueueProps): React.JSX.Element | null => {\n const { tComponent, isReady } = useI18n({ component: CT });\n const formatRelativeTime = useRelativeTimeFormatter();\n const [sortByRisk, setSortByRisk] = React.useState(true);\n const [internalFilter, setInternalFilter] = React.useState(\"\");\n\n const activeFilter = filter ?? internalFilter;\n\n const filtered = React.useMemo(() => {\n let result = items;\n if (activeFilter) {\n const q = activeFilter.toLowerCase();\n result = result.filter((i) =>\n i.systemRef.toLowerCase().includes(q) ||\n i.actionDescription.toLowerCase().includes(q) ||\n i.executionId.toLowerCase().includes(q)\n );\n }\n if (sortByRisk) {\n result = [...result].sort((a, b) =>\n (RISK_ORDER[a.riskLevel] ?? 4) - (RISK_ORDER[b.riskLevel] ?? 4)\n );\n }\n return result;\n }, [items, activeFilter, sortByRisk]);\n\n if (!isReady) return null;\n\n return (\n <div className={cn(\"flex flex-col gap-card\", className)} {...props}>\n <div className=\"flex items-center justify-between gap-element\">\n <div className=\"flex items-center gap-element\">\n <h3 className=\"text-sm font-semibold\">\n {tComponent(CT, \"queueTitle\")}\n </h3>\n <Badge variant=\"secondary\">{items.length}</Badge>\n </div>\n\n <Button\n type=\"button\"\n variant={sortByRisk ? ButtonVariants_Variant.SECONDARY : ButtonVariants_Variant.GHOST}\n size={ButtonSize.SM}\n className=\"h-6 text-2xs\"\n onClick={() => setSortByRisk(!sortByRisk)}\n >\n {tComponent(CT, \"queueSortRisk\")}\n </Button>\n </div>\n\n {items.length === 0 ? (\n <p className=\"py-card text-center text-sm text-muted-foreground\">\n {tComponent(CT, \"queueEmpty\")}\n </p>\n ) : (\n <ScrollArea className=\"max-h-96\">\n <div className=\"flex flex-col gap-card-sm\">\n {filtered.map((item) => (\n <div key={item.approvalId} className=\"relative\">\n {item.createdAt && (\n <span className=\"absolute end-2 top-2 text-2xs text-muted-foreground\">\n {formatRelativeTime(item.createdAt)}\n </span>\n )}\n <AI_ApprovalRequest\n approvalId={item.approvalId}\n executionId={item.executionId}\n systemRef={item.systemRef}\n actionDescription={item.actionDescription}\n riskLevel={item.riskLevel}\n expiresAt={item.expiresAt}\n requiredRoles={item.requiredRoles}\n executionContext={item.executionContext}\n toolName={item.toolName}\n createdAt={item.createdAt}\n allowArgumentModification={item.allowArgumentModification}\n argumentsSchema={item.argumentsSchema}\n reasonCodeOptions={item.reasonCodeOptions}\n onApprove={onApprove}\n onDeny={onDeny}\n // Per item, not per queue: an item offers only the acts its person may perform.\n onEscalate={item.canEscalate ? onEscalate : undefined}\n onClaim={item.canClaim ? onClaim : undefined}\n onUnclaim={item.canUnclaim ? onUnclaim : undefined}\n onReassignOpen={item.canReassign ? onReassignOpen : undefined}\n onReassign={item.canReassign ? onReassign : undefined}\n reassignCandidates={item.reassignCandidates}\n actionNotice={item.actionNotice}\n onPauseClock={item.canPauseClock ? onPauseClock : undefined}\n onResumeClock={item.canResumeClock ? onResumeClock : undefined}\n pauseStateOptions={item.pauseStateOptions}\n deadlineNotice={item.deadlineNotice}\n clockPausedNotice={item.clockPausedNotice}\n isProcessing={processingIds?.has(item.approvalId)}\n />\n </div>\n ))}\n </div>\n </ScrollArea>\n )}\n </div>\n );\n};\n"]}
|
|
@@ -13,7 +13,9 @@
|
|
|
13
13
|
* The chain is not obscure: ~20 resource specifications in `@wildo-ai/saas-specifications`
|
|
14
14
|
* import UI-behavior sources from this package's ROOT, so `import('@wildo-ai/saas-specifications')`
|
|
15
15
|
* was unloadable in Node — which reaches the dev companion and forced two documented
|
|
16
|
-
* contortions in the CLI (
|
|
16
|
+
* contortions in the CLI's brand propagation (a dedicated brand-SSOT reader and a destination
|
|
17
|
+
* helper that routed around the specifications root; brand propagation has since moved to
|
|
18
|
+
* `@wildo-ai/application-creation-runtime`, which reads the SSOT through `loadConfigExport`).
|
|
17
19
|
* 2. **`@xyflow/react` shipped in every application's MAIN bundle.** All seven leaves were
|
|
18
20
|
* eagerly registered and eagerly re-exported, so the whole graph library sat in the entry
|
|
19
21
|
* chunk of applications that never render a graph.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graph-runtime.d.ts","sourceRoot":"","sources":["../../../../../../src/components/ai-elements/graph/graph-runtime.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"graph-runtime.d.ts","sourceRoot":"","sources":["../../../../../../src/components/ai-elements/graph/graph-runtime.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AAEH,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC"}
|
|
@@ -13,7 +13,9 @@
|
|
|
13
13
|
* The chain is not obscure: ~20 resource specifications in `@wildo-ai/saas-specifications`
|
|
14
14
|
* import UI-behavior sources from this package's ROOT, so `import('@wildo-ai/saas-specifications')`
|
|
15
15
|
* was unloadable in Node — which reaches the dev companion and forced two documented
|
|
16
|
-
* contortions in the CLI (
|
|
16
|
+
* contortions in the CLI's brand propagation (a dedicated brand-SSOT reader and a destination
|
|
17
|
+
* helper that routed around the specifications root; brand propagation has since moved to
|
|
18
|
+
* `@wildo-ai/application-creation-runtime`, which reads the SSOT through `loadConfigExport`).
|
|
17
19
|
* 2. **`@xyflow/react` shipped in every application's MAIN bundle.** All seven leaves were
|
|
18
20
|
* eagerly registered and eagerly re-exported, so the whole graph library sat in the entry
|
|
19
21
|
* chunk of applications that never render a graph.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graph-runtime.js","sourceRoot":"","sources":["../../../../../../src/components/ai-elements/graph/graph-runtime.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"graph-runtime.js","sourceRoot":"","sources":["../../../../../../src/components/ai-elements/graph/graph-runtime.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AAEH,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC","sourcesContent":["/**\n * graph-runtime — the SINGLE dynamic-import target for the whole `@xyflow/react` graph subtree.\n *\n * ## Why this module exists\n *\n * Two independent defects, both caused by the seven graph leaves being reachable EAGERLY from the\n * `@wildo-ai/presets-components` root barrel:\n *\n * 1. **Node consumers died at module load.** `canvas.tsx` carries\n * `import \"@xyflow/react/dist/style.css\"` — the only CSS import in this package. Node's ESM\n * loader has no `.css` handler, so ANY Node process that value-imports a package root reaching\n * it crashed with `Unknown file extension \".css\"` before a single line of its own logic ran.\n * The chain is not obscure: ~20 resource specifications in `@wildo-ai/saas-specifications`\n * import UI-behavior sources from this package's ROOT, so `import('@wildo-ai/saas-specifications')`\n * was unloadable in Node — which reaches the dev companion and forced two documented\n * contortions in the CLI's brand propagation (a dedicated brand-SSOT reader and a destination\n * helper that routed around the specifications root; brand propagation has since moved to\n * `@wildo-ai/application-creation-runtime`, which reads the SSOT through `loadConfigExport`).\n * 2. **`@xyflow/react` shipped in every application's MAIN bundle.** All seven leaves were\n * eagerly registered and eagerly re-exported, so the whole graph library sat in the entry\n * chunk of applications that never render a graph.\n *\n * ## Why ONE aggregate module rather than seven `*.lazy.tsx` split points\n *\n * Rollup (and therefore Vite) emits one async chunk per dynamically-imported MODULE. Seven doors\n * each doing `import('./canvas')`, `import('./controls')`, … would create seven dynamic entry\n * points over one shared library; Rollup then either duplicates `@xyflow/react` across them or\n * hoists it into a synthetic shared chunk — and the stylesheet attaches to whichever chunk\n * `canvas` lands in. Neither outcome is the single \"separated file\" this boundary is for.\n *\n * Every door in `graph.lazy.tsx` therefore names the SAME specifier — `./graph-runtime` — so the\n * bundler sees one dynamic target and emits exactly ONE async chunk carrying `@xyflow/react`\n * plus its extracted CSS asset. The runtime cost matches the usage: these components are only\n * ever composed together (a canvas with its controls, panel, nodes and edges), so one fetch that\n * satisfies all seven beats seven round trips to render one graph.\n *\n * ## Rules for this module\n *\n * - It is imported ONLY from `graph.lazy.tsx`, and only dynamically. A static import anywhere in\n * the eager graph merges the whole payload back into the entry chunk with no error and no\n * warning — enforced by `pnpm check:lazy-boundaries`.\n * - The `@xyflow/react` stylesheet stays where the component that needs it lives (`canvas.tsx`),\n * INSIDE this chunk's graph. Vite extracts CSS per async chunk and loads it with the chunk, so\n * moving it to an app entry would re-create defect 2 in a different place.\n */\n\nexport * from './canvas';\nexport * from './connection';\nexport * from './controls';\nexport * from './edge';\nexport * from './node';\nexport * from './panel';\nexport * from './toolbar';\n"]}
|
|
@@ -1,4 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { AppLayoutPreset_MainContainer_DefaultProps } from '@wildo-ai/saas-frontend-lib';
|
|
3
|
+
/**
|
|
4
|
+
* The default signed-in shell: the regions in a flex arrangement — activity bar and sidebar at the start edge,
|
|
5
|
+
* a column of status bar / menubar / toolbar / content / status bar, the utility panel at the end edge.
|
|
6
|
+
*
|
|
7
|
+
* Composed from the shell building blocks (`AppShellProviders`, `AppShellRegionOutlet`, `AppShellContentOutlet`,
|
|
8
|
+
* `AppShellOverlaysOutlet`, `useAppShellFirstReady`, #1842), so this file decides only the ARRANGEMENT and the
|
|
9
|
+
* shell's own surface; another layout can arrange the same regions differently without copying it. Its rendered
|
|
10
|
+
* DOM is pinned for every layout configuration by `app-layout-main-container.dom-snapshot.test.tsx`.
|
|
11
|
+
*/
|
|
3
12
|
export declare const AppLayoutPreset_MainContainer_Default: ({ children }: AppLayoutPreset_MainContainer_DefaultProps) => React.JSX.Element;
|
|
4
13
|
//# sourceMappingURL=app-layout-main-container.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app-layout-main-container.d.ts","sourceRoot":"","sources":["../../../../../src/components/app/app-layout-main-container.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"app-layout-main-container.d.ts","sourceRoot":"","sources":["../../../../../src/components/app/app-layout-main-container.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EACL,0CAA0C,EAY3C,MAAM,6BAA6B,CAAC;AAErC;;;;;;;;GAQG;AACH,eAAO,MAAM,qCAAqC,GAAI,cAAc,0CAA0C,KAAG,KAAK,CAAC,GAAG,CAAC,OA+E1H,CAAC"}
|
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
2
|
+
import { HorizontalPlacement, ShellAppearance, ShellRegion, SurfaceVariant, VerticalPlacement } from '@wildo-ai/presets-components-models';
|
|
3
|
+
import { AppShellContentOutlet, AppShellLoadingState, AppShellOverlaysOutlet, AppShellProviders, AppShellRegionOutlet, useAppShellFirstReady, useAppShellLayout, NON_CANONICAL_SHELL_SURFACE_POLICY_OVERRIDE, Surface, cn, useUI, } from '@wildo-ai/saas-frontend-lib';
|
|
4
|
+
/**
|
|
5
|
+
* The default signed-in shell: the regions in a flex arrangement — activity bar and sidebar at the start edge,
|
|
6
|
+
* a column of status bar / menubar / toolbar / content / status bar, the utility panel at the end edge.
|
|
7
|
+
*
|
|
8
|
+
* Composed from the shell building blocks (`AppShellProviders`, `AppShellRegionOutlet`, `AppShellContentOutlet`,
|
|
9
|
+
* `AppShellOverlaysOutlet`, `useAppShellFirstReady`, #1842), so this file decides only the ARRANGEMENT and the
|
|
10
|
+
* shell's own surface; another layout can arrange the same regions differently without copying it. Its rendered
|
|
11
|
+
* DOM is pinned for every layout configuration by `app-layout-main-container.dom-snapshot.test.tsx`.
|
|
12
|
+
*/
|
|
5
13
|
export const AppLayoutPreset_MainContainer_Default = ({ children }) => {
|
|
6
14
|
const layoutInfo = useAppShellLayout();
|
|
7
15
|
const { shellAppearance } = useUI();
|
|
@@ -9,31 +17,17 @@ export const AppLayoutPreset_MainContainer_Default = ({ children }) => {
|
|
|
9
17
|
// `backgroundLayer` (rendered by UIProvider behind the app) is the single
|
|
10
18
|
// continuous canvas under sidebar, bars, and content alike.
|
|
11
19
|
const isContinuousShell = shellAppearance === ShellAppearance.CONTINUOUS;
|
|
12
|
-
const [portalContainer, setPortalContainer] = useState(null);
|
|
13
|
-
const portalRef = useCallback((node) => {
|
|
14
|
-
setPortalContainer(node);
|
|
15
|
-
}, []);
|
|
16
20
|
// ===================================================================
|
|
17
21
|
// Loading State
|
|
18
22
|
// ===================================================================
|
|
19
|
-
//
|
|
20
|
-
//
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
// shell has ever been ready; later drops keep the shell mounted (per-component
|
|
25
|
-
// `has*` flags simply render nothing while config is absent).
|
|
26
|
-
const [hasLayoutBeenReady, setHasLayoutBeenReady] = useState(false);
|
|
27
|
-
useEffect(() => {
|
|
28
|
-
if (layoutInfo.isLayoutReady)
|
|
29
|
-
setHasLayoutBeenReady(true);
|
|
30
|
-
}, [layoutInfo.isLayoutReady]);
|
|
31
|
-
if (!layoutInfo.isLayoutReady && !hasLayoutBeenReady) {
|
|
32
|
-
return (_jsx(Surface, { asChild: true, emitPolicyVars: false, variant: SurfaceVariant.SHELL, policyOverride: NON_CANONICAL_SHELL_SURFACE_POLICY_OVERRIDE, children: _jsx("div", { className: "h-screen w-screen bg-background flex items-center justify-center", role: "status", "aria-live": "polite", children: _jsx("div", { className: "text-center", children: _jsx(LoadingSpinner, { size: 32, className: "text-primary mx-auto mb-field", "aria-hidden": "true" }) }) }) }));
|
|
33
|
-
}
|
|
23
|
+
// The spinner applies only BEFORE the shell has ever been ready: a later transient drop keeps the shell
|
|
24
|
+
// mounted (see `useAppShellFirstReady` for why a remount there destroys navigation state).
|
|
25
|
+
const hasLayoutBeenReady = useAppShellFirstReady(layoutInfo.isLayoutReady);
|
|
26
|
+
if (!layoutInfo.isLayoutReady && !hasLayoutBeenReady)
|
|
27
|
+
return _jsx(AppShellLoadingState, {});
|
|
34
28
|
// ===================================================================
|
|
35
29
|
// Main Layout Rendering - PLACEMENT ONLY
|
|
36
30
|
// ===================================================================
|
|
37
|
-
return (_jsx(
|
|
31
|
+
return (_jsx(AppShellProviders, { layout: layoutInfo, children: _jsx(Surface, { asChild: true, emitPolicyVars: false, variant: SurfaceVariant.SHELL, policyOverride: NON_CANONICAL_SHELL_SURFACE_POLICY_OVERRIDE, children: _jsxs("div", { className: cn('relative h-screen w-screen flex overflow-hidden', isContinuousShell ? 'bg-transparent' : 'bg-background'), children: [_jsx(AppShellRegionOutlet, { region: ShellRegion.ACTIVITY_BAR }), _jsx(AppShellRegionOutlet, { region: ShellRegion.SIDEBAR, placement: HorizontalPlacement.START }), _jsx(AppShellRegionOutlet, { region: ShellRegion.UTILITY_PANEL, placement: HorizontalPlacement.START }), _jsxs("div", { className: "flex-1 flex flex-col min-w-0 min-h-0", children: [_jsx(AppShellRegionOutlet, { region: ShellRegion.STATUS_BAR, placement: VerticalPlacement.TOP }), _jsx(AppShellRegionOutlet, { region: ShellRegion.MENUBAR }), _jsx(AppShellRegionOutlet, { region: ShellRegion.TOOLBAR }), _jsxs("div", { className: "flex-1 flex min-h-0", children: [_jsx(AppShellContentOutlet, { className: "flex-1 relative min-w-0", children: children }), _jsx(AppShellRegionOutlet, { region: ShellRegion.SIDEBAR, placement: HorizontalPlacement.END })] }), _jsx(AppShellRegionOutlet, { region: ShellRegion.STATUS_BAR, placement: VerticalPlacement.BOTTOM })] }), _jsx(AppShellOverlaysOutlet, {}), _jsx(AppShellRegionOutlet, { region: ShellRegion.UTILITY_PANEL, placement: HorizontalPlacement.END })] }) }) }));
|
|
38
32
|
};
|
|
39
33
|
//# sourceMappingURL=app-layout-main-container.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app-layout-main-container.js","sourceRoot":"","sources":["../../../../../src/components/app/app-layout-main-container.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"app-layout-main-container.js","sourceRoot":"","sources":["../../../../../src/components/app/app-layout-main-container.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,mBAAmB,EAAE,eAAe,EAAE,WAAW,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AAC3I,OAAO,EAEL,qBAAqB,EACrB,oBAAoB,EACpB,sBAAsB,EACtB,iBAAiB,EACjB,oBAAoB,EACpB,qBAAqB,EACrB,iBAAiB,EACjB,2CAA2C,EAC3C,OAAO,EACP,EAAE,EACF,KAAK,GACN,MAAM,6BAA6B,CAAC;AAErC;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,qCAAqC,GAAG,CAAC,EAAE,QAAQ,EAA8C,EAAqB,EAAE;IACnI,MAAM,UAAU,GAAG,iBAAiB,EAAE,CAAC;IACvC,MAAM,EAAE,eAAe,EAAE,GAAG,KAAK,EAAE,CAAC;IACpC,wEAAwE;IACxE,0EAA0E;IAC1E,4DAA4D;IAC5D,MAAM,iBAAiB,GAAG,eAAe,KAAK,eAAe,CAAC,UAAU,CAAC;IAEzE,sEAAsE;IACtE,gBAAgB;IAChB,sEAAsE;IAE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AAE,mBAAmB,CAAC,GAAG,GAAI,IACrF,EAGN,KAAC,oBAAoB,IAAC,MAAM,EAAE,WAAW,CAAC,UAAU,EAAE,SAAS,EAAE,iBAAiB,CAAC,MAAM,GAAI,IACzF,EAGN,KAAC,sBAAsB,KAAG,EAG1B,KAAC,oBAAoB,IAAC,MAAM,EAAE,WAAW,CAAC,aAAa,EAAE,SAAS,EAAE,mBAAmB,CAAC,GAAG,GAAI,IAC3F,GACE,GACQ,CACrB,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import React from 'react';\n\nimport { HorizontalPlacement, ShellAppearance, ShellRegion, SurfaceVariant, VerticalPlacement } from '@wildo-ai/presets-components-models';\nimport {\n AppLayoutPreset_MainContainer_DefaultProps,\n AppShellContentOutlet,\n AppShellLoadingState,\n AppShellOverlaysOutlet,\n AppShellProviders,\n AppShellRegionOutlet,\n useAppShellFirstReady,\n useAppShellLayout,\n NON_CANONICAL_SHELL_SURFACE_POLICY_OVERRIDE,\n Surface,\n cn,\n useUI,\n} from '@wildo-ai/saas-frontend-lib';\n\n/**\n * The default signed-in shell: the regions in a flex arrangement — activity bar and sidebar at the start edge,\n * a column of status bar / menubar / toolbar / content / status bar, the utility panel at the end edge.\n *\n * Composed from the shell building blocks (`AppShellProviders`, `AppShellRegionOutlet`, `AppShellContentOutlet`,\n * `AppShellOverlaysOutlet`, `useAppShellFirstReady`, #1842), so this file decides only the ARRANGEMENT and the\n * shell's own surface; another layout can arrange the same regions differently without copying it. Its rendered\n * DOM is pinned for every layout configuration by `app-layout-main-container.dom-snapshot.test.tsx`.\n */\nexport const AppLayoutPreset_MainContainer_Default = ({ children }: AppLayoutPreset_MainContainer_DefaultProps): React.JSX.Element => {\n const layoutInfo = useAppShellLayout();\n const { shellAppearance } = useUI();\n // CONTINUOUS shell chrome: the root paints NOTHING so the theme's fixed\n // `backgroundLayer` (rendered by UIProvider behind the app) is the single\n // continuous canvas under sidebar, bars, and content alike.\n const isContinuousShell = shellAppearance === ShellAppearance.CONTINUOUS;\n\n // ===================================================================\n // Loading State\n // ===================================================================\n\n // The spinner applies only BEFORE the shell has ever been ready: a later transient drop keeps the shell\n // mounted (see `useAppShellFirstReady` for why a remount there destroys navigation state).\n const hasLayoutBeenReady = useAppShellFirstReady(layoutInfo.isLayoutReady);\n\n if (!layoutInfo.isLayoutReady && !hasLayoutBeenReady) return <AppShellLoadingState />;\n\n // ===================================================================\n // Main Layout Rendering - PLACEMENT ONLY\n // ===================================================================\n\n return (\n <AppShellProviders layout={layoutInfo}>\n <Surface asChild emitPolicyVars={false} variant={SurfaceVariant.SHELL} policyOverride={NON_CANONICAL_SHELL_SURFACE_POLICY_OVERRIDE}>\n {/*\n `relative` is load-bearing (#1830). A theme's decorative `backgroundLayer` is rendered by `UIContext`\n in an `isolate` wrapper, which paints at the z-index:0 level — ABOVE ordinary in-flow content (see the\n note there, and #1204 for the public layout). A shell text with no positioned ancestor therefore\n vanished under the gradient: the status bar's \"Connected\" did, 1 of the shell's 91 visible texts.\n Positioning the root lifts the WHOLE shell to that level, after the layer in tree order.\n Deliberately NOT `isolate`: that would also make the shell one stacking context, so the consent\n prompt (`z-50`, outside the shell) would paint over the shell's own dialogs (`--z-overlay`, 300).\n A positioned root with `z-index: auto` creates no stacking context, so every z-index inside keeps\n its current global order. The root spans the unscrolled viewport, so no absolutely positioned\n descendant moves either.\n */}\n <div className={cn('relative h-screen w-screen flex overflow-hidden', isContinuousShell ? 'bg-transparent' : 'bg-background')}>\n {/* Activity Bar - leftmost */}\n <AppShellRegionOutlet region={ShellRegion.ACTIVITY_BAR} />\n\n {/* Sidebar - START (full height) */}\n <AppShellRegionOutlet region={ShellRegion.SIDEBAR} placement={HorizontalPlacement.START} />\n\n {/* Utility Panel trigger - START */}\n <AppShellRegionOutlet region={ShellRegion.UTILITY_PANEL} placement={HorizontalPlacement.START} />\n\n {/* Right side: Menubar, Toolbar, Content, Status Bar */}\n <div className=\"flex-1 flex flex-col min-w-0 min-h-0\">\n {/* Status Bar - TOP */}\n <AppShellRegionOutlet region={ShellRegion.STATUS_BAR} placement={VerticalPlacement.TOP} />\n\n {/* Menubar */}\n <AppShellRegionOutlet region={ShellRegion.MENUBAR} />\n\n {/* Toolbar */}\n <AppShellRegionOutlet region={ShellRegion.TOOLBAR} />\n\n {/* Main Content Area */}\n <div className=\"flex-1 flex min-h-0\">\n <AppShellContentOutlet className=\"flex-1 relative min-w-0\">{children}</AppShellContentOutlet>\n\n {/* Sidebar - END (full height within content area) */}\n <AppShellRegionOutlet region={ShellRegion.SIDEBAR} placement={HorizontalPlacement.END} />\n </div>\n\n {/* Status Bar - BOTTOM */}\n <AppShellRegionOutlet region={ShellRegion.STATUS_BAR} placement={VerticalPlacement.BOTTOM} />\n </div>\n\n {/* Navigation Overlays (Dialog & Sheet) and guidance */}\n <AppShellOverlaysOutlet />\n\n {/* Utility Panel trigger - END */}\n <AppShellRegionOutlet region={ShellRegion.UTILITY_PANEL} placement={HorizontalPlacement.END} />\n </div>\n </Surface>\n </AppShellProviders>\n );\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app-layout-main-container.labels.d.ts","sourceRoot":"","sources":["../../../../../src/components/app/app-layout-main-container.labels.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoC,KAAK,mBAAmB,EAA2B,MAAM,qCAAqC,CAAC;AAM1I,eAAO,MAAM,6BAA6B,EAAE,mBAAmB,
|
|
1
|
+
{"version":3,"file":"app-layout-main-container.labels.d.ts","sourceRoot":"","sources":["../../../../../src/components/app/app-layout-main-container.labels.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoC,KAAK,mBAAmB,EAA2B,MAAM,qCAAqC,CAAC;AAM1I,eAAO,MAAM,6BAA6B,EAAE,mBAAmB,EAgE9D,CAAC"}
|
|
@@ -31,6 +31,33 @@ export const AppLayoutsMainContainerLabels = [
|
|
|
31
31
|
purpose: 'The inverse of zoneExpand, shown while a pane has the whole content area: hands the room back '
|
|
32
32
|
+ 'to the split so the list appears beside the pane again. Escape does the same.',
|
|
33
33
|
},
|
|
34
|
+
{
|
|
35
|
+
ref: 'zoneRegionPrimary',
|
|
36
|
+
kind: LabelKind.ARIA,
|
|
37
|
+
purpose: 'Names the MAIN content column for screen readers, so a reader moving by landmark can tell it '
|
|
38
|
+
+ 'from the detail and companion panes beside it. Never read aloud on screen; two or three '
|
|
39
|
+
+ 'words naming what the column holds, in the reader\'s terms rather than the framework\'s.',
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
ref: 'zoneRegionSecondary',
|
|
43
|
+
kind: LabelKind.ARIA,
|
|
44
|
+
purpose: 'Names the adjacent DETAIL pane — the one a record opens into beside the list — for screen '
|
|
45
|
+
+ 'readers. Distinct from zoneRegionCompanion: a reader jumping between landmarks hears only '
|
|
46
|
+
+ 'these names, so two panes sharing one name is the same as neither being named.',
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
ref: 'zoneRegionCompanion',
|
|
50
|
+
kind: LabelKind.ARIA,
|
|
51
|
+
purpose: 'Names the third COMPANION pane (assistant, context, activity) for screen readers. See '
|
|
52
|
+
+ 'zoneRegionSecondary — the two must not be interchangeable.',
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
ref: 'zoneResizeHandle',
|
|
56
|
+
kind: LabelKind.ARIA,
|
|
57
|
+
purpose: 'Names the draggable divider between two content panes, which is also operable with the arrow '
|
|
58
|
+
+ 'keys once focused. A reader hears this instead of an unnamed "separator", so it should say '
|
|
59
|
+
+ 'what dragging it does (resize the panes), not what it looks like.',
|
|
60
|
+
},
|
|
34
61
|
];
|
|
35
62
|
registerComponentLabels(FrontendComponentType.APP_LAYOUTS_MAIN_CONTAINER, AppLayoutsMainContainerLabels);
|
|
36
63
|
//# sourceMappingURL=app-layout-main-container.labels.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app-layout-main-container.labels.js","sourceRoot":"","sources":["../../../../../src/components/app/app-layout-main-container.labels.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,SAAS,EAA4B,uBAAuB,EAAE,MAAM,qCAAqC,CAAC;AAE1I,2EAA2E;AAC3E,6EAA6E;AAC7E,+EAA+E;AAE/E,MAAM,CAAC,MAAM,6BAA6B,GAA0B;IAClE;QACE,GAAG,EAAE,gBAAgB;QACrB,IAAI,EAAE,SAAS,CAAC,WAAW;QAC3B,OAAO,EACL,gGAAgG;cAC9F,+FAA+F;cAC/F,yDAAyD;KAC9D;IACD;QACE,GAAG,EAAE,YAAY;QACjB,IAAI,EAAE,SAAS,CAAC,MAAM;QACtB,OAAO,EACL,6FAA6F;cAC3F,6FAA6F;cAC7F,0DAA0D;KAC/D;IACD;QACE,GAAG,EAAE,aAAa;QAClB,IAAI,EAAE,SAAS,CAAC,MAAM;QACtB,OAAO,EACL,+FAA+F;cAC7F,wFAAwF;cACxF,uFAAuF;cACvF,6EAA6E;KAClF;IACD;QACE,GAAG,EAAE,aAAa;QAClB,IAAI,EAAE,SAAS,CAAC,MAAM;QACtB,OAAO,EACL,gGAAgG;cAC9F,+EAA+E;KACpF;CACF,CAAC;AACF,uBAAuB,CAAC,qBAAqB,CAAC,0BAA0B,EAAE,6BAA6B,CAAC,CAAC","sourcesContent":["import { FrontendComponentType, LabelKind, type LabellingUnitaryDef, registerComponentLabels } from '@wildo-ai/presets-components-models';\n\n// Companion-only label metadata for this component: keys + params + (where\n// authored) per-key purpose / kind / variable meaning. Statically scanned by\n// the dev companion; NOT imported at runtime, so it never ships in the bundle.\n\nexport const AppLayoutsMainContainerLabels: LabellingUnitaryDef[] = [\n {\n ref: 'zoneEmptyState',\n kind: LabelKind.EMPTY_STATE,\n purpose:\n 'Shown in an adjacent content zone (detail / companion pane) that a layout keeps VISIBLE while '\n + 'empty via onEmpty: EMPTY_STATE — tells the reader the pane is waiting for a selection rather '\n + 'than broken. Not shown when the zone collapses instead.',\n },\n {\n ref: 'zoneExpand',\n kind: LabelKind.BUTTON,\n purpose:\n 'The control on an adjacent content zone (detail / companion pane) that gives that pane the '\n + 'WHOLE content area, folding the list it opened from out of view. Short, imperative, one or '\n + 'two words; it also names the control for screen readers.',\n },\n {\n ref: 'zoneDismiss',\n kind: LabelKind.BUTTON,\n purpose:\n 'The control that CLOSES an adjacent content zone (detail / companion pane) outright, handing '\n + 'its width back to the pane beside it. Offered only where the layout declares the zone '\n + 'collapses when empty, because that is where closing it actually returns room. Short, '\n + 'imperative, one or two words; it also names the control for screen readers.',\n },\n {\n ref: 'zoneRestore',\n kind: LabelKind.BUTTON,\n purpose:\n 'The inverse of zoneExpand, shown while a pane has the whole content area: hands the room back '\n + 'to the split so the list appears beside the pane again. Escape does the same.',\n },\n];\nregisterComponentLabels(FrontendComponentType.APP_LAYOUTS_MAIN_CONTAINER, AppLayoutsMainContainerLabels);\n"]}
|
|
1
|
+
{"version":3,"file":"app-layout-main-container.labels.js","sourceRoot":"","sources":["../../../../../src/components/app/app-layout-main-container.labels.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,SAAS,EAA4B,uBAAuB,EAAE,MAAM,qCAAqC,CAAC;AAE1I,2EAA2E;AAC3E,6EAA6E;AAC7E,+EAA+E;AAE/E,MAAM,CAAC,MAAM,6BAA6B,GAA0B;IAClE;QACE,GAAG,EAAE,gBAAgB;QACrB,IAAI,EAAE,SAAS,CAAC,WAAW;QAC3B,OAAO,EACL,gGAAgG;cAC9F,+FAA+F;cAC/F,yDAAyD;KAC9D;IACD;QACE,GAAG,EAAE,YAAY;QACjB,IAAI,EAAE,SAAS,CAAC,MAAM;QACtB,OAAO,EACL,6FAA6F;cAC3F,6FAA6F;cAC7F,0DAA0D;KAC/D;IACD;QACE,GAAG,EAAE,aAAa;QAClB,IAAI,EAAE,SAAS,CAAC,MAAM;QACtB,OAAO,EACL,+FAA+F;cAC7F,wFAAwF;cACxF,uFAAuF;cACvF,6EAA6E;KAClF;IACD;QACE,GAAG,EAAE,aAAa;QAClB,IAAI,EAAE,SAAS,CAAC,MAAM;QACtB,OAAO,EACL,gGAAgG;cAC9F,+EAA+E;KACpF;IACD;QACE,GAAG,EAAE,mBAAmB;QACxB,IAAI,EAAE,SAAS,CAAC,IAAI;QACpB,OAAO,EACL,+FAA+F;cAC7F,0FAA0F;cAC1F,0FAA0F;KAC/F;IACD;QACE,GAAG,EAAE,qBAAqB;QAC1B,IAAI,EAAE,SAAS,CAAC,IAAI;QACpB,OAAO,EACL,4FAA4F;cAC1F,4FAA4F;cAC5F,gFAAgF;KACrF;IACD;QACE,GAAG,EAAE,qBAAqB;QAC1B,IAAI,EAAE,SAAS,CAAC,IAAI;QACpB,OAAO,EACL,wFAAwF;cACtF,4DAA4D;KACjE;IACD;QACE,GAAG,EAAE,kBAAkB;QACvB,IAAI,EAAE,SAAS,CAAC,IAAI;QACpB,OAAO,EACL,+FAA+F;cAC7F,6FAA6F;cAC7F,mEAAmE;KACxE;CACF,CAAC;AACF,uBAAuB,CAAC,qBAAqB,CAAC,0BAA0B,EAAE,6BAA6B,CAAC,CAAC","sourcesContent":["import { FrontendComponentType, LabelKind, type LabellingUnitaryDef, registerComponentLabels } from '@wildo-ai/presets-components-models';\n\n// Companion-only label metadata for this component: keys + params + (where\n// authored) per-key purpose / kind / variable meaning. Statically scanned by\n// the dev companion; NOT imported at runtime, so it never ships in the bundle.\n\nexport const AppLayoutsMainContainerLabels: LabellingUnitaryDef[] = [\n {\n ref: 'zoneEmptyState',\n kind: LabelKind.EMPTY_STATE,\n purpose:\n 'Shown in an adjacent content zone (detail / companion pane) that a layout keeps VISIBLE while '\n + 'empty via onEmpty: EMPTY_STATE — tells the reader the pane is waiting for a selection rather '\n + 'than broken. Not shown when the zone collapses instead.',\n },\n {\n ref: 'zoneExpand',\n kind: LabelKind.BUTTON,\n purpose:\n 'The control on an adjacent content zone (detail / companion pane) that gives that pane the '\n + 'WHOLE content area, folding the list it opened from out of view. Short, imperative, one or '\n + 'two words; it also names the control for screen readers.',\n },\n {\n ref: 'zoneDismiss',\n kind: LabelKind.BUTTON,\n purpose:\n 'The control that CLOSES an adjacent content zone (detail / companion pane) outright, handing '\n + 'its width back to the pane beside it. Offered only where the layout declares the zone '\n + 'collapses when empty, because that is where closing it actually returns room. Short, '\n + 'imperative, one or two words; it also names the control for screen readers.',\n },\n {\n ref: 'zoneRestore',\n kind: LabelKind.BUTTON,\n purpose:\n 'The inverse of zoneExpand, shown while a pane has the whole content area: hands the room back '\n + 'to the split so the list appears beside the pane again. Escape does the same.',\n },\n {\n ref: 'zoneRegionPrimary',\n kind: LabelKind.ARIA,\n purpose:\n 'Names the MAIN content column for screen readers, so a reader moving by landmark can tell it '\n + 'from the detail and companion panes beside it. Never read aloud on screen; two or three '\n + 'words naming what the column holds, in the reader\\'s terms rather than the framework\\'s.',\n },\n {\n ref: 'zoneRegionSecondary',\n kind: LabelKind.ARIA,\n purpose:\n 'Names the adjacent DETAIL pane — the one a record opens into beside the list — for screen '\n + 'readers. Distinct from zoneRegionCompanion: a reader jumping between landmarks hears only '\n + 'these names, so two panes sharing one name is the same as neither being named.',\n },\n {\n ref: 'zoneRegionCompanion',\n kind: LabelKind.ARIA,\n purpose:\n 'Names the third COMPANION pane (assistant, context, activity) for screen readers. See '\n + 'zoneRegionSecondary — the two must not be interchangeable.',\n },\n {\n ref: 'zoneResizeHandle',\n kind: LabelKind.ARIA,\n purpose:\n 'Names the draggable divider between two content panes, which is also operable with the arrow '\n + 'keys once focused. A reader hears this instead of an unnamed \"separator\", so it should say '\n + 'what dragging it does (resize the panes), not what it looks like.',\n },\n];\nregisterComponentLabels(FrontendComponentType.APP_LAYOUTS_MAIN_CONTAINER, AppLayoutsMainContainerLabels);\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"billing-plan-change-preview.d.ts","sourceRoot":"","sources":["../../../../../src/components/billing/billing-plan-change-preview.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4C,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"billing-plan-change-preview.d.ts","sourceRoot":"","sources":["../../../../../src/components/billing/billing-plan-change-preview.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4C,MAAM,OAAO,CAAC;AAGjE,OAAO,EAAE,KAAK,sBAAsB,EAAkG,MAAM,6BAA6B,CAAC;AAG1K,mGAAmG;AACnG,wBAAgB,iBAAiB,CAAC,EAAE,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,YAAY,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,sBAAsB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,GAAG,IAAI,CA2ChL"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { useEffect, useId, useMemo, useRef } from 'react';
|
|
3
3
|
import { FrontendComponentType, SurfaceVariant, TypographyVariant, UIBehavior } from '@wildo-ai/presets-components-models';
|
|
4
|
+
import { BillingTiming } from '@wildo-ai/saas-models';
|
|
4
5
|
import { Alert, AlertDescription, Button, ButtonVariants_Variant, cn, Skeleton, Surface, useI18n, useUI } from '@wildo-ai/saas-frontend-lib';
|
|
5
6
|
import { useFormatMoney } from './billing-format.utils.js';
|
|
6
7
|
/** Provider invoice estimate; amount due is not presented as a promise of immediate collection. */
|
|
@@ -17,6 +18,8 @@ export function PlanChangePreview({ preview, targetPlanName, isLoading, isConfir
|
|
|
17
18
|
const description = getRecipe(UIBehavior.TYPOGRAPHY, TypographyVariant.DESCRIPTION);
|
|
18
19
|
if (!isReady)
|
|
19
20
|
return null;
|
|
20
|
-
|
|
21
|
+
// A change at the end of the period charges nothing now: the estimate is the renewal invoice on the new plan (#1868).
|
|
22
|
+
const deferred = preview?.timing === BillingTiming.AT_PERIOD_END;
|
|
23
|
+
return (_jsx(Surface, { asChild: true, emitPolicyVars: false, variant: SurfaceVariant.BASE, children: _jsxs("section", { ref: panel, tabIndex: -1, "aria-labelledby": headingId, "aria-busy": !!isLoading || !!isConfirming, className: "p-card space-y-card", children: [_jsx("h3", { id: headingId, className: cn(heading.base, heading.sizes?.md), children: t('title', { plan: targetPlanName }) }), _jsx("p", { className: description.base, children: t(deferred ? 'deferredEstimateExplanation' : 'estimateExplanation') }), hasError && _jsx(Alert, { variant: "destructive", children: _jsx(AlertDescription, { children: t(preview ? 'confirmationFailed' : 'previewFailed') }) }), isLoading && _jsxs("div", { role: "status", children: [_jsx("span", { children: t('loading') }), _jsx(Skeleton, { className: "h-8 w-32" })] }), preview && !isLoading && (_jsxs("div", { className: "space-y-element", children: [_jsxs("dl", { children: [deferred && _jsxs(_Fragment, { children: [_jsx("dt", { className: description.base, children: t('effectiveAt') }), _jsx("dd", { className: heading.base, children: formatDate(preview.effectiveAt) })] }), _jsx("dt", { className: description.base, children: t('amountDue') }), _jsx("dd", { className: heading.base, children: formatMoney(preview.amount) }), _jsx("dt", { className: description.base, children: t('invoicePeriod') }), _jsxs("dd", { children: [formatDate(preview.periodStart), " \u2014 ", formatDate(preview.periodEnd)] })] }), _jsx("ul", { className: "space-y-element", "aria-label": t('lineItems'), children: preview.lineItems.map((item, index) => _jsxs("li", { className: "flex flex-wrap justify-between gap-element", children: [_jsxs("span", { children: [item.description, " ", _jsx("span", { className: description.base, children: t('quantity', { quantity: formatNumber(item.quantity) }) })] }), _jsx("span", { children: formatMoney(item.amount) })] }, index)) }), _jsx("p", { className: description.base, children: t(deferred ? 'deferredConfirmationExplanation' : 'confirmationExplanation') })] })), _jsxs("div", { className: "flex flex-wrap gap-element", children: [_jsx(Button, { onClick: onCancel, disabled: isConfirming, variant: ButtonVariants_Variant.OUTLINE, children: t('cancel') }), onRetry && !isConfirming && _jsx(Button, { onClick: onRetry, disabled: isLoading, variant: ButtonVariants_Variant.OUTLINE, children: t('retryPreview') }), preview && onConfirm && _jsx(Button, { onClick: onConfirm, disabled: isLoading || isConfirming, children: t(isConfirming ? 'confirming' : 'confirmChange') })] })] }) }));
|
|
21
24
|
}
|
|
22
25
|
//# sourceMappingURL=billing-plan-change-preview.js.map
|