@processfocus/runtime-local 0.1.0-next.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +28 -0
- package/README.md +290 -0
- package/dist/authentication-server.mjs +188 -0
- package/dist/chunk-2sb4v2sx.js +70 -0
- package/dist/chunk-9weqs8n8.js +56031 -0
- package/dist/chunk-mvkr77wp.js +54113 -0
- package/dist/chunk-tkn4cnc8.js +453 -0
- package/dist/chunk-vpsm84e8.js +85 -0
- package/dist/dashboard-source/apps/frontend/app/%5Fpf/app-icons/[...path]/route.ts +63 -0
- package/dist/dashboard-source/apps/frontend/app/%5Fpf/health/page.tsx +19 -0
- package/dist/dashboard-source/apps/frontend/app/%5Fpf/public-form-branding/[...path]/route.ts +95 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/act-on-behalf/actions.ts +248 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/act-on-behalf/delegations-client.tsx +751 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/act-on-behalf/page.tsx +46 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/client-index.tsx +375 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/client.tsx +14 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/executions/@modal/(.)[executionId]/client.tsx +73 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/executions/@modal/(.)[executionId]/page.tsx +20 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/executions/@modal/(.)[executionId]/process-state/page.tsx +22 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/executions/@modal/default.tsx +3 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/executions/[executionId]/page.tsx +11 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/executions/[executionId]/process-state/page.tsx +23 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/executions/abandon-execution-dialog.tsx +137 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/executions/execution-card-menu.tsx +233 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/executions/layout.tsx +19 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/executions/page.tsx +1549 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/executions/process-state-dialog.tsx +91 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/executions/process-state-modal-client.tsx +33 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/executions/process-state-page-client.tsx +31 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/executions/process-state-route-fallback.tsx +18 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/executions/restart-execution-feedback.tsx +40 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/layout.tsx +129 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/lists/@modal/(.)item/[id]/client.tsx +215 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/lists/@modal/(.)item/[id]/page.tsx +23 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/lists/@modal/default.tsx +3 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/lists/[...listPath]/list-page-client.tsx +678 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/lists/[...listPath]/loading.tsx +10 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/lists/[...listPath]/page.tsx +228 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/lists/components/list-create-form.tsx +147 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/lists/components/list-item-edit-form.tsx +246 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/lists/hooks/metric-control-url-state.ts +71 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/lists/hooks/use-list-deleted-callback.ts +22 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/lists/hooks/use-list-item-detail.ts +315 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/lists/item/[id]/client.tsx +259 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/lists/item/[id]/page.tsx +46 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/lists/layout.tsx +14 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/lists/lib/list-detail-title.ts +20 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/lists/lib/list-refresh.ts +26 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/lists/utils.ts +20 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/loading.tsx +5 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/org-chart/org-chart-client.tsx +74 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/org-chart/page.tsx +120 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/page.tsx +13 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/passkeys/actions.ts +188 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/passkeys/page.tsx +33 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/passkeys/passkeys-client.tsx +320 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/processes/@modal/(.)start/[...startStepPath]/client.tsx +152 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/processes/@modal/(.)start/[...startStepPath]/page.tsx +41 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/processes/@modal/default.tsx +3 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/processes/client.tsx +33 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/processes/components/process-form-actions.tsx +105 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/processes/components/process-submit-button.tsx +81 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/processes/components/start-process-form.tsx +282 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/processes/layout.tsx +21 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/processes/lib/mobile-process-catalog.ts +28 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/processes/lib/start-process-actions.ts +13 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/processes/loading.tsx +10 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/processes/page.tsx +5 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/processes/processes-client.tsx +504 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/processes/start/[...startStepPath]/client.tsx +153 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/processes/start/[...startStepPath]/page.tsx +39 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/processes/workflow/[...processPath]/loading.tsx +20 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/processes/workflow/[...processPath]/page.tsx +131 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/processes/workflow/[...processPath]/process-documentation.tsx +209 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/processes/workflow/[...processPath]/use-workflow-auto-refresh.ts +120 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/processes/workflow/[...processPath]/workflow-flow.tsx +319 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/processes/workflow/[...processPath]/workflow-form-preview-sheet.tsx +98 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/settings/cedar/[[...tab]]/loading.tsx +1 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/settings/cedar/[[...tab]]/page.tsx +100 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/settings/cedar/access-handbook.tsx +110 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/settings/cedar/authorization-loading.tsx +25 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/settings/cedar/authorization-tabs.tsx +47 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/settings/cedar/cedar-authorize.ts +261 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/settings/cedar/cedar-helpers.ts +17 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/settings/cedar/cedar-source.tsx +34 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/settings/cedar/cedar-types.ts +79 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/settings/cedar/evaluate-cedar.ts +43 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/settings/cedar/explorer.tsx +526 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/settings/cedar/layout.tsx +23 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/settings/cedar/load-cedar.ts +174 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/settings/cedar/load-handbook.ts +390 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/settings/cedar/org-data.ts +70 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/settings/invitations/[invitationId]/page.tsx +22 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/settings/invitations/invitation-detail-client.tsx +594 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/settings/invitations/invitation-detail-skeleton.tsx +48 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/settings/invitations/new/page.tsx +5 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/settings/invitations-table.tsx +186 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/settings/page.tsx +69 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/settings/providers-table.tsx +48 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/settings/roles-table.tsx +62 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/settings/settings-client.tsx +244 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/settings/users/[userId]/client.tsx +329 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/settings/users/[userId]/page.tsx +21 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/settings/users/[userId]/tokens/page.tsx +39 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/settings/users-table.tsx +82 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/stats/[...statsPath]/error.tsx +34 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/stats/[...statsPath]/not-found.tsx +13 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/stats/[...statsPath]/page.tsx +84 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/stats/[...statsPath]/stats-data-fetcher.tsx +93 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/to-dos/@modal/(.)complete/[...stepPath]/client.tsx +143 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/to-dos/@modal/(.)complete/[...stepPath]/page.tsx +50 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/to-dos/@modal/default.tsx +3 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/to-dos/complete/[...stepPath]/client.tsx +131 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/to-dos/complete/[...stepPath]/page.tsx +50 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/to-dos/components/complete-todo-form.tsx +172 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/to-dos/components/public-completion-correction-form.tsx +233 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/to-dos/components/todo-form-actions.tsx +26 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/to-dos/correct/[...stepPath]/page.tsx +58 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/to-dos/layout.tsx +14 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/to-dos/lib/mobile-todo-list.ts +154 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/to-dos/page.tsx +1317 -0
- package/dist/dashboard-source/apps/frontend/app/api/auth/callback/route.ts +259 -0
- package/dist/dashboard-source/apps/frontend/app/api/auth/delegation/route.ts +127 -0
- package/dist/dashboard-source/apps/frontend/app/api/auth/login/route.ts +49 -0
- package/dist/dashboard-source/apps/frontend/app/api/auth/logout/route.ts +33 -0
- package/dist/dashboard-source/apps/frontend/app/api/auth/passkey/auth-options/route.ts +79 -0
- package/dist/dashboard-source/apps/frontend/app/api/auth/passkey/auth-verify/route.ts +142 -0
- package/dist/dashboard-source/apps/frontend/app/api/auth/passkey/register/route.ts +103 -0
- package/dist/dashboard-source/apps/frontend/app/api/auth/passkey/register-verify/route.ts +136 -0
- package/dist/dashboard-source/apps/frontend/app/api/auth/passkey/registration-session/route.ts +129 -0
- package/dist/dashboard-source/apps/frontend/app/api/auth/passkey/start/route.ts +153 -0
- package/dist/dashboard-source/apps/frontend/app/api/auth/refresh/route.ts +122 -0
- package/dist/dashboard-source/apps/frontend/app/api/auth/switch-role/route.ts +177 -0
- package/dist/dashboard-source/apps/frontend/app/api/dev/import-completed/route.ts +22 -0
- package/dist/dashboard-source/apps/frontend/app/api/dev/import-events/route.ts +38 -0
- package/dist/dashboard-source/apps/frontend/app/api/embed/lookup/route.ts +266 -0
- package/dist/dashboard-source/apps/frontend/app/api/embed/submit/route.ts +118 -0
- package/dist/dashboard-source/apps/frontend/app/api/embed/test-host/route.ts +125 -0
- package/dist/dashboard-source/apps/frontend/app/api/public/to-dos/calendar-slots/route.ts +44 -0
- package/dist/dashboard-source/apps/frontend/app/api/public/to-dos/complete/route.ts +56 -0
- package/dist/dashboard-source/apps/frontend/app/api/public/to-dos/lookup/route.ts +61 -0
- package/dist/dashboard-source/apps/frontend/app/api/public/to-dos/request-fresh-link/route.ts +41 -0
- package/dist/dashboard-source/apps/frontend/app/api/revalidate/route.ts +61 -0
- package/dist/dashboard-source/apps/frontend/app/app-shell.tsx +100 -0
- package/dist/dashboard-source/apps/frontend/app/cli-auth/route.ts +261 -0
- package/dist/dashboard-source/apps/frontend/app/embed/[...startStepPath]/embed-client.tsx +393 -0
- package/dist/dashboard-source/apps/frontend/app/embed/[...startStepPath]/loading.tsx +13 -0
- package/dist/dashboard-source/apps/frontend/app/embed/[...startStepPath]/page.tsx +51 -0
- package/dist/dashboard-source/apps/frontend/app/embed/embedded.css +48 -0
- package/dist/dashboard-source/apps/frontend/app/embed/layout.tsx +15 -0
- package/dist/dashboard-source/apps/frontend/app/global.css +13 -0
- package/dist/dashboard-source/apps/frontend/app/layout.tsx +102 -0
- package/dist/dashboard-source/apps/frontend/app/login/layout.tsx +9 -0
- package/dist/dashboard-source/apps/frontend/app/login/login-button.tsx +35 -0
- package/dist/dashboard-source/apps/frontend/app/login/login-form-content.tsx +117 -0
- package/dist/dashboard-source/apps/frontend/app/login/login-form.tsx +30 -0
- package/dist/dashboard-source/apps/frontend/app/login/page.tsx +52 -0
- package/dist/dashboard-source/apps/frontend/app/login/passkey-button.tsx +226 -0
- package/dist/dashboard-source/apps/frontend/app/login/secret-login-form.tsx +91 -0
- package/dist/dashboard-source/apps/frontend/app/manifest.ts +7 -0
- package/dist/dashboard-source/apps/frontend/app/public/form/[token]/error.tsx +63 -0
- package/dist/dashboard-source/apps/frontend/app/public/form/[token]/layout.tsx +34 -0
- package/dist/dashboard-source/apps/frontend/app/public/form/[token]/page.tsx +129 -0
- package/dist/dashboard-source/apps/frontend/app/public/form/[token]/public-form-branding-card.tsx +42 -0
- package/dist/dashboard-source/apps/frontend/app/public/form/[token]/public-form-branding-context.tsx +27 -0
- package/dist/dashboard-source/apps/frontend/app/public/form/[token]/public-form-branding-html.tsx +40 -0
- package/dist/dashboard-source/apps/frontend/app/public/form/[token]/public-todo-client.tsx +553 -0
- package/dist/dashboard-source/apps/frontend/app/public/form/[token]/public-todo-state-content.tsx +27 -0
- package/dist/dashboard-source/apps/frontend/app/public.css +33 -0
- package/dist/dashboard-source/apps/frontend/app/register/passkey/layout.tsx +49 -0
- package/dist/dashboard-source/apps/frontend/app/register/passkey/page.tsx +36 -0
- package/dist/dashboard-source/apps/frontend/app/register/passkey/register-passkey-client.tsx +292 -0
- package/dist/dashboard-source/apps/frontend/app/theme.css +117 -0
- package/dist/dashboard-source/apps/frontend/components/DashboardSection.tsx +693 -0
- package/dist/dashboard-source/apps/frontend/components/Header.tsx +481 -0
- package/dist/dashboard-source/apps/frontend/components/OrgUnitNode.tsx +41 -0
- package/dist/dashboard-source/apps/frontend/components/app-sidebar.tsx +245 -0
- package/dist/dashboard-source/apps/frontend/components/auth-provider.tsx +158 -0
- package/dist/dashboard-source/apps/frontend/components/collections/collection-table-card.tsx +218 -0
- package/dist/dashboard-source/apps/frontend/components/collections/collection-table-header-row.tsx +97 -0
- package/dist/dashboard-source/apps/frontend/components/config-provider.tsx +27 -0
- package/dist/dashboard-source/apps/frontend/components/copy-button.tsx +40 -0
- package/dist/dashboard-source/apps/frontend/components/dashboard-activity.tsx +35 -0
- package/dist/dashboard-source/apps/frontend/components/dashboard-skeleton.tsx +17 -0
- package/dist/dashboard-source/apps/frontend/components/delegation-expiry.tsx +21 -0
- package/dist/dashboard-source/apps/frontend/components/feature-permissions-provider.tsx +28 -0
- package/dist/dashboard-source/apps/frontend/components/form-dialog-content.tsx +66 -0
- package/dist/dashboard-source/apps/frontend/components/frontend-client-plugin-host.tsx +27 -0
- package/dist/dashboard-source/apps/frontend/components/frontend-client-plugin-identify.tsx +33 -0
- package/dist/dashboard-source/apps/frontend/components/frontend-client-plugin-provider.tsx +55 -0
- package/dist/dashboard-source/apps/frontend/components/journey-timeline.tsx +378 -0
- package/dist/dashboard-source/apps/frontend/components/mobile-home-switchboard.tsx +98 -0
- package/dist/dashboard-source/apps/frontend/components/mocks-provider.tsx +27 -0
- package/dist/dashboard-source/apps/frontend/components/notification-bell.tsx +137 -0
- package/dist/dashboard-source/apps/frontend/components/org-settings-provider.tsx +26 -0
- package/dist/dashboard-source/apps/frontend/components/process-workflow-link.tsx +36 -0
- package/dist/dashboard-source/apps/frontend/components/session-reissue.tsx +48 -0
- package/dist/dashboard-source/apps/frontend/components/sidebar-lists.tsx +89 -0
- package/dist/dashboard-source/apps/frontend/components/sidebar-stats-views.tsx +65 -0
- package/dist/dashboard-source/apps/frontend/components/theme-provider.tsx +132 -0
- package/dist/dashboard-source/apps/frontend/components/todo-count-badge.tsx +59 -0
- package/dist/dashboard-source/apps/frontend/components/token-refresh-scheduler.tsx +304 -0
- package/dist/dashboard-source/apps/frontend/components/ui/checkbox.tsx +31 -0
- package/dist/dashboard-source/apps/frontend/components/ui/dialog.tsx +142 -0
- package/dist/dashboard-source/apps/frontend/components/ui/dropdown-menu.tsx +256 -0
- package/dist/dashboard-source/apps/frontend/components/ui/input.tsx +20 -0
- package/dist/dashboard-source/apps/frontend/components/ui/pagination.tsx +59 -0
- package/dist/dashboard-source/apps/frontend/components/ui/sheet.tsx +138 -0
- package/dist/dashboard-source/apps/frontend/components/ui/sidebar.tsx +741 -0
- package/dist/dashboard-source/apps/frontend/components/ui/skeleton.tsx +13 -0
- package/dist/dashboard-source/apps/frontend/components/ui/tab-pill.tsx +30 -0
- package/dist/dashboard-source/apps/frontend/components/ui/table.tsx +115 -0
- package/dist/dashboard-source/apps/frontend/components/ui/tooltip.tsx +60 -0
- package/dist/dashboard-source/apps/frontend/components/without-waiting-badge.tsx +24 -0
- package/dist/dashboard-source/apps/frontend/components/workflow/step-node.tsx +116 -0
- package/dist/dashboard-source/apps/frontend/components/workflow/swimlane-node.tsx +46 -0
- package/dist/dashboard-source/apps/frontend/components/workflow/workflow-edge.tsx +172 -0
- package/dist/dashboard-source/apps/frontend/hooks/use-draft-process-save.ts +189 -0
- package/dist/dashboard-source/apps/frontend/hooks/use-draft-state.ts +79 -0
- package/dist/dashboard-source/apps/frontend/hooks/use-form-metadata.ts +74 -0
- package/dist/dashboard-source/apps/frontend/hooks/use-mobile.ts +27 -0
- package/dist/dashboard-source/apps/frontend/hooks/use-notification-preference.ts +246 -0
- package/dist/dashboard-source/apps/frontend/hooks/use-processes-query.ts +56 -0
- package/dist/dashboard-source/apps/frontend/hooks/use-weekly-execution-stats.ts +101 -0
- package/dist/dashboard-source/apps/frontend/index.d.ts +12 -0
- package/dist/dashboard-source/apps/frontend/instrumentation.node.ts +25 -0
- package/dist/dashboard-source/apps/frontend/instrumentation.ts +19 -0
- package/dist/dashboard-source/apps/frontend/lib/app-icons-metadata.ts +66 -0
- package/dist/dashboard-source/apps/frontend/lib/appsync-events/adapter.ts +128 -0
- package/dist/dashboard-source/apps/frontend/lib/appsync-events/client.ts +355 -0
- package/dist/dashboard-source/apps/frontend/lib/appsync-events/config.ts +18 -0
- package/dist/dashboard-source/apps/frontend/lib/appsync-events/reconnect-registry.ts +34 -0
- package/dist/dashboard-source/apps/frontend/lib/auth/act-on-behalf-menu.ts +9 -0
- package/dist/dashboard-source/apps/frontend/lib/auth/callback-error.ts +26 -0
- package/dist/dashboard-source/apps/frontend/lib/auth/client-session.ts +32 -0
- package/dist/dashboard-source/apps/frontend/lib/auth/client.ts +46 -0
- package/dist/dashboard-source/apps/frontend/lib/auth/config.ts +48 -0
- package/dist/dashboard-source/apps/frontend/lib/auth/delegations.ts +62 -0
- package/dist/dashboard-source/apps/frontend/lib/auth/issuer.ts +164 -0
- package/dist/dashboard-source/apps/frontend/lib/auth/jwt.ts +17 -0
- package/dist/dashboard-source/apps/frontend/lib/auth/logout.ts +35 -0
- package/dist/dashboard-source/apps/frontend/lib/auth/passkeys-menu.ts +9 -0
- package/dist/dashboard-source/apps/frontend/lib/auth/passkeys.ts +117 -0
- package/dist/dashboard-source/apps/frontend/lib/auth/providers.ts +52 -0
- package/dist/dashboard-source/apps/frontend/lib/auth/realtime-session-token.ts +62 -0
- package/dist/dashboard-source/apps/frontend/lib/auth/reauthentication-state.ts +16 -0
- package/dist/dashboard-source/apps/frontend/lib/auth/redirect.ts +105 -0
- package/dist/dashboard-source/apps/frontend/lib/auth/secret-login-presentation.ts +33 -0
- package/dist/dashboard-source/apps/frontend/lib/auth/session-cache-scope.ts +1 -0
- package/dist/dashboard-source/apps/frontend/lib/auth/session-role.ts +6 -0
- package/dist/dashboard-source/apps/frontend/lib/auth/session.ts +277 -0
- package/dist/dashboard-source/apps/frontend/lib/auth/ssr-session.ts +76 -0
- package/dist/dashboard-source/apps/frontend/lib/auth/verify-passkey.ts +95 -0
- package/dist/dashboard-source/apps/frontend/lib/authorization-tabs.ts +19 -0
- package/dist/dashboard-source/apps/frontend/lib/cedar-highlight.ts +116 -0
- package/dist/dashboard-source/apps/frontend/lib/client-plugin-error-reporting.ts +28 -0
- package/dist/dashboard-source/apps/frontend/lib/collections/collection-provider-factory.tsx +1119 -0
- package/dist/dashboard-source/apps/frontend/lib/collections/collection-provider-scope.ts +48 -0
- package/dist/dashboard-source/apps/frontend/lib/collections/database-error-ui.tsx +61 -0
- package/dist/dashboard-source/apps/frontend/lib/collections/draft-process-execution-collection-provider.tsx +32 -0
- package/dist/dashboard-source/apps/frontend/lib/collections/draft-process-execution.ts +161 -0
- package/dist/dashboard-source/apps/frontend/lib/collections/execution-collection-provider.tsx +42 -0
- package/dist/dashboard-source/apps/frontend/lib/collections/execution.ts +215 -0
- package/dist/dashboard-source/apps/frontend/lib/collections/graphql-stream.ts +123 -0
- package/dist/dashboard-source/apps/frontend/lib/collections/process-collection-provider.tsx +30 -0
- package/dist/dashboard-source/apps/frontend/lib/collections/process.ts +123 -0
- package/dist/dashboard-source/apps/frontend/lib/collections/replication-factory.ts +394 -0
- package/dist/dashboard-source/apps/frontend/lib/collections/replication-registry.ts +196 -0
- package/dist/dashboard-source/apps/frontend/lib/collections/rxdb-database-name.ts +19 -0
- package/dist/dashboard-source/apps/frontend/lib/collections/rxdb-lifecycle.ts +368 -0
- package/dist/dashboard-source/apps/frontend/lib/collections/rxdb-provider.tsx +577 -0
- package/dist/dashboard-source/apps/frontend/lib/collections/todo-collection-provider.tsx +30 -0
- package/dist/dashboard-source/apps/frontend/lib/collections/todo.ts +133 -0
- package/dist/dashboard-source/apps/frontend/lib/current-provider-user.ts +30 -0
- package/dist/dashboard-source/apps/frontend/lib/dev/frontend-port-file.ts +41 -0
- package/dist/dashboard-source/apps/frontend/lib/dev/import-completed-events.ts +21 -0
- package/dist/dashboard-source/apps/frontend/lib/dev/import-completed-query-invalidation.tsx +62 -0
- package/dist/dashboard-source/apps/frontend/lib/dev/import-completed-refresh.ts +40 -0
- package/dist/dashboard-source/apps/frontend/lib/effect/error-boundary.tsx +84 -0
- package/dist/dashboard-source/apps/frontend/lib/effect/index.ts +31 -0
- package/dist/dashboard-source/apps/frontend/lib/effect/params.ts +57 -0
- package/dist/dashboard-source/apps/frontend/lib/effect/run-effect.ts +17 -0
- package/dist/dashboard-source/apps/frontend/lib/effect/runtime.ts +168 -0
- package/dist/dashboard-source/apps/frontend/lib/effect/services/access-token.ts +48 -0
- package/dist/dashboard-source/apps/frontend/lib/effect/services/authorization.ts +206 -0
- package/dist/dashboard-source/apps/frontend/lib/effect/services/form-validation.ts +36 -0
- package/dist/dashboard-source/apps/frontend/lib/effect/services/graphql.ts +94 -0
- package/dist/dashboard-source/apps/frontend/lib/effect/services/index.ts +21 -0
- package/dist/dashboard-source/apps/frontend/lib/embed-manifest-store.ts +20 -0
- package/dist/dashboard-source/apps/frontend/lib/embed-manifest.ts +152 -0
- package/dist/dashboard-source/apps/frontend/lib/embed-request-origin.ts +39 -0
- package/dist/dashboard-source/apps/frontend/lib/errors/get-display-error-message.ts +22 -0
- package/dist/dashboard-source/apps/frontend/lib/execution-menu-actions-registry.ts +26 -0
- package/dist/dashboard-source/apps/frontend/lib/feature-permissions.ts +13 -0
- package/dist/dashboard-source/apps/frontend/lib/frontend-boot-health.tsx +161 -0
- package/dist/dashboard-source/apps/frontend/lib/frontend-client-plugin-registry.ts +45 -0
- package/dist/dashboard-source/apps/frontend/lib/frontend-manifest-store.ts +214 -0
- package/dist/dashboard-source/apps/frontend/lib/frontend-manifest.ts +74 -0
- package/dist/dashboard-source/apps/frontend/lib/frontend-plugin-loaders.ts +191 -0
- package/dist/dashboard-source/apps/frontend/lib/generated/gql/fragment-masking.ts +87 -0
- package/dist/dashboard-source/apps/frontend/lib/generated/gql/gql.ts +292 -0
- package/dist/dashboard-source/apps/frontend/lib/generated/gql/graphql.ts +443 -0
- package/dist/dashboard-source/apps/frontend/lib/generated/gql/index.ts +2 -0
- package/dist/dashboard-source/apps/frontend/lib/graphql/client-consumer.tsx +23 -0
- package/dist/dashboard-source/apps/frontend/lib/graphql/client-error-reporting.ts +268 -0
- package/dist/dashboard-source/apps/frontend/lib/graphql/client-provider.tsx +59 -0
- package/dist/dashboard-source/apps/frontend/lib/graphql/dashboard-activity.ts +7 -0
- package/dist/dashboard-source/apps/frontend/lib/graphql/dependent-lookup-query.ts +78 -0
- package/dist/dashboard-source/apps/frontend/lib/graphql/endpoint.ts +26 -0
- package/dist/dashboard-source/apps/frontend/lib/graphql/execution-queries.ts +70 -0
- package/dist/dashboard-source/apps/frontend/lib/graphql/file-upload-provider.tsx +82 -0
- package/dist/dashboard-source/apps/frontend/lib/graphql/graphql-identifiers.ts +10 -0
- package/dist/dashboard-source/apps/frontend/lib/graphql/list-queries.ts +327 -0
- package/dist/dashboard-source/apps/frontend/lib/graphql/lookup-provider.tsx +81 -0
- package/dist/dashboard-source/apps/frontend/lib/graphql/org-chart-operations.ts +63 -0
- package/dist/dashboard-source/apps/frontend/lib/graphql/org-chart-queries.ts +67 -0
- package/dist/dashboard-source/apps/frontend/lib/graphql/provider-user-queries.ts +65 -0
- package/dist/dashboard-source/apps/frontend/lib/graphql/queries.ts +80 -0
- package/dist/dashboard-source/apps/frontend/lib/graphql/server-client.ts +15 -0
- package/dist/dashboard-source/apps/frontend/lib/graphql/settings-queries.ts +634 -0
- package/dist/dashboard-source/apps/frontend/lib/graphql/stats-views-server.ts +16 -0
- package/dist/dashboard-source/apps/frontend/lib/graphql/stats-views.ts +33 -0
- package/dist/dashboard-source/apps/frontend/lib/graphql/user-queries.ts +138 -0
- package/dist/dashboard-source/apps/frontend/lib/graphql/workflow-operations.ts +54 -0
- package/dist/dashboard-source/apps/frontend/lib/graphql/workflow-queries.ts +50 -0
- package/dist/dashboard-source/apps/frontend/lib/mobile-home-view-model.ts +74 -0
- package/dist/dashboard-source/apps/frontend/lib/mobile-shell-policy.ts +124 -0
- package/dist/dashboard-source/apps/frontend/lib/mock-data.ts +364 -0
- package/dist/dashboard-source/apps/frontend/lib/notifications/notification-preference.ts +251 -0
- package/dist/dashboard-source/apps/frontend/lib/notifications/todo-notification-observer.ts +178 -0
- package/dist/dashboard-source/apps/frontend/lib/notifications/todo-notifications-runtime.tsx +14 -0
- package/dist/dashboard-source/apps/frontend/lib/notifications/use-todo-notifications.tsx +103 -0
- package/dist/dashboard-source/apps/frontend/lib/org-chart-data.ts +50 -0
- package/dist/dashboard-source/apps/frontend/lib/org-chart-depth-config.ts +71 -0
- package/dist/dashboard-source/apps/frontend/lib/org-chart-layout.ts +149 -0
- package/dist/dashboard-source/apps/frontend/lib/org-chart-types.ts +17 -0
- package/dist/dashboard-source/apps/frontend/lib/org-identity.ts +57 -0
- package/dist/dashboard-source/apps/frontend/lib/organisation-plugin-loaders.ts +13 -0
- package/dist/dashboard-source/apps/frontend/lib/organisation-plugin-preparation.ts +2 -0
- package/dist/dashboard-source/apps/frontend/lib/plugins-client.tsx +99 -0
- package/dist/dashboard-source/apps/frontend/lib/plugins.ts +1 -0
- package/dist/dashboard-source/apps/frontend/lib/public-todo-form-runtime.ts +9 -0
- package/dist/dashboard-source/apps/frontend/lib/public-todo-graphql-errors.ts +45 -0
- package/dist/dashboard-source/apps/frontend/lib/public-todo-model.ts +200 -0
- package/dist/dashboard-source/apps/frontend/lib/public-todo-server.ts +209 -0
- package/dist/dashboard-source/apps/frontend/lib/query-client.ts +41 -0
- package/dist/dashboard-source/apps/frontend/lib/restart-execution-action.ts +76 -0
- package/dist/dashboard-source/apps/frontend/lib/runtime-config.ts +23 -0
- package/dist/dashboard-source/apps/frontend/lib/telemetry/constants.ts +5 -0
- package/dist/dashboard-source/apps/frontend/lib/telemetry/otlp-config.ts +16 -0
- package/dist/dashboard-source/apps/frontend/lib/telemetry/register-otel.ts +308 -0
- package/dist/dashboard-source/apps/frontend/lib/theme.ts +9 -0
- package/dist/dashboard-source/apps/frontend/lib/todo-types.ts +64 -0
- package/dist/dashboard-source/apps/frontend/lib/todo-utils.ts +144 -0
- package/dist/dashboard-source/apps/frontend/lib/types/org-identity.ts +7 -0
- package/dist/dashboard-source/apps/frontend/lib/utils.ts +16 -0
- package/dist/dashboard-source/apps/frontend/lib/workflow/constants.ts +118 -0
- package/dist/dashboard-source/apps/frontend/lib/workflow/edge-routing.ts +195 -0
- package/dist/dashboard-source/apps/frontend/lib/workflow/form-preview.ts +8 -0
- package/dist/dashboard-source/apps/frontend/lib/workflow/layout.ts +878 -0
- package/dist/dashboard-source/apps/frontend/lib/workflow/types.ts +63 -0
- package/dist/dashboard-source/apps/frontend/next.config.ts +238 -0
- package/dist/dashboard-source/apps/frontend/package.json +71 -0
- package/dist/dashboard-source/apps/frontend/postcss.config.mjs +5 -0
- package/dist/dashboard-source/apps/frontend/proxy.ts +293 -0
- package/dist/dashboard-source/apps/frontend/public/.gitkeep +0 -0
- package/dist/dashboard-source/apps/frontend/public/favicon.ico +0 -0
- package/dist/dashboard-source/apps/frontend/public/processfocus-embed.js +553 -0
- package/dist/dashboard-source/apps/frontend/tsconfig.json +35 -0
- package/dist/dashboard-source/modules/auth-local-cedar/src/index.ts +7 -0
- package/dist/dashboard-source/modules/auth-local-cedar/src/lib/auth-local-cedar.ts +1397 -0
- package/dist/dashboard-source/modules/auth-local-cedar/src/lib/cedar-reload-notifier.ts +18 -0
- package/dist/dashboard-source/modules/auth-local-cedar/src/lib/config-base.ts +346 -0
- package/dist/dashboard-source/modules/auth-local-cedar/src/lib/policy-watcher.ts +172 -0
- package/dist/dashboard-source/modules/auth-policy/src/index.ts +4 -0
- package/dist/dashboard-source/modules/auth-policy/src/lib/auth-policy.ts +263 -0
- package/dist/dashboard-source/modules/auth-policy/src/lib/current-principal.ts +34 -0
- package/dist/dashboard-source/modules/auth-policy/src/lib/errors.ts +47 -0
- package/dist/dashboard-source/modules/auth-policy/src/lib/types.ts +595 -0
- package/dist/dashboard-source/modules/auth-session/src/index.ts +22 -0
- package/dist/dashboard-source/modules/auth-session/src/lib/issuer-url.ts +192 -0
- package/dist/dashboard-source/modules/auth-session/src/lib/realtime-recipient.ts +76 -0
- package/dist/dashboard-source/modules/auth-session/src/lib/session-cache-scope.ts +24 -0
- package/dist/dashboard-source/modules/auth-session/src/lib/subjects.ts +54 -0
- package/dist/dashboard-source/modules/auth-session/src/lib/url.ts +2 -0
- package/dist/dashboard-source/modules/aws-common/src/index.ts +3 -0
- package/dist/dashboard-source/modules/aws-common/src/lib/acm.ts +50 -0
- package/dist/dashboard-source/modules/aws-common/src/lib/otlp-config.ts +66 -0
- package/dist/dashboard-source/modules/aws-common/src/lib/runtime-ssm.ts +28 -0
- package/dist/dashboard-source/modules/effect-json-logger/src/index.ts +1 -0
- package/dist/dashboard-source/modules/effect-json-logger/src/lib/effect-json-logger.ts +65 -0
- package/dist/dashboard-source/modules/form/src/hooks/use-local-storage.ts +78 -0
- package/dist/dashboard-source/modules/form/src/index.ts +20 -0
- package/dist/dashboard-source/modules/form/src/lib/ajv-standard-schema.ts +152 -0
- package/dist/dashboard-source/modules/form/src/lib/client-components-to-form.tsx +1421 -0
- package/dist/dashboard-source/modules/form/src/lib/friendly-validation-message.ts +85 -0
- package/dist/dashboard-source/modules/form/src/lib/lookup-context.tsx +58 -0
- package/dist/dashboard-source/modules/form/src/lib/plugin-registry.ts +34 -0
- package/dist/dashboard-source/modules/form/src/lib/walker.tsx +1554 -0
- package/dist/dashboard-source/modules/form-client-representation/src/lib/client-form-definition.ts +440 -0
- package/dist/dashboard-source/modules/form-client-representation/src/lib/plugin-registry.ts +13 -0
- package/dist/dashboard-source/modules/form-client-representation/src/lib/types.ts +336 -0
- package/dist/dashboard-source/modules/form-rule/src/index.ts +21 -0
- package/dist/dashboard-source/modules/form-rule/src/lib/evaluator.ts +531 -0
- package/dist/dashboard-source/modules/form-rule/src/lib/paths.ts +102 -0
- package/dist/dashboard-source/modules/form-rule/src/lib/types.ts +121 -0
- package/dist/dashboard-source/modules/form-schema/src/index.ts +8 -0
- package/dist/dashboard-source/modules/form-schema/src/lib/annotation-helpers.ts +44 -0
- package/dist/dashboard-source/modules/form-schema/src/lib/deferred-value.ts +21 -0
- package/dist/dashboard-source/modules/form-schema/src/lib/email.ts +50 -0
- package/dist/dashboard-source/modules/form-schema/src/lib/field-count.ts +82 -0
- package/dist/dashboard-source/modules/form-schema/src/lib/form-annotations.ts +58 -0
- package/dist/dashboard-source/modules/form-schema/src/lib/form-schema.ts +975 -0
- package/dist/dashboard-source/modules/form-schema/src/lib/phone.ts +60 -0
- package/dist/dashboard-source/modules/form-schema/src/lib/property-signature.ts +45 -0
- package/dist/dashboard-source/modules/frontend-endpoints/src/endpoint.ts +137 -0
- package/dist/dashboard-source/modules/frontend-endpoints/src/index.ts +11 -0
- package/dist/dashboard-source/modules/frontend-endpoints/src/port-files.ts +219 -0
- package/dist/dashboard-source/modules/frontend-manifest/src/index.ts +2 -0
- package/dist/dashboard-source/modules/frontend-manifest/src/lib/browser-plugin-artifact.ts +201 -0
- package/dist/dashboard-source/modules/frontend-manifest/src/lib/frontend-manifest.ts +408 -0
- package/dist/dashboard-source/modules/frontend-plugin-host/src/index.ts +29 -0
- package/dist/dashboard-source/modules/frontend-plugin-host/src/lib/frontend-plugin-host.ts +288 -0
- package/dist/dashboard-source/modules/openauth/src/client.ts +1045 -0
- package/dist/dashboard-source/modules/openauth/src/error.ts +140 -0
- package/dist/dashboard-source/modules/openauth/src/pkce.ts +40 -0
- package/dist/dashboard-source/modules/openauth/src/random.ts +24 -0
- package/dist/dashboard-source/modules/openauth/src/subject.ts +132 -0
- package/dist/dashboard-source/modules/openauth/src/util.ts +13 -0
- package/dist/dashboard-source/modules/request-time/src/index.ts +1 -0
- package/dist/dashboard-source/modules/request-time/src/lib/request-time.ts +30 -0
- package/dist/dashboard-source/modules/rxdb-collections/generated/draft-process-execution-schema.json +45 -0
- package/dist/dashboard-source/modules/rxdb-collections/generated/execution-schema.json +217 -0
- package/dist/dashboard-source/modules/rxdb-collections/generated/process-schema.json +77 -0
- package/dist/dashboard-source/modules/rxdb-collections/generated/todo-schema.json +94 -0
- package/dist/dashboard-source/modules/rxdb-collections/src/index.ts +2 -0
- package/dist/dashboard-source/modules/rxdb-collections/src/lib/rxdb-collections.ts +181 -0
- package/dist/dashboard-source/modules/rxdb-collections/src/lib/to-rxdb-schema.ts +166 -0
- package/dist/dashboard-source/modules/shadcn-components/src/index.ts +60 -0
- package/dist/dashboard-source/modules/shadcn-components/src/lib/boolean-field.tsx +73 -0
- package/dist/dashboard-source/modules/shadcn-components/src/lib/calendar-slot-field.tsx +808 -0
- package/dist/dashboard-source/modules/shadcn-components/src/lib/date-field.tsx +127 -0
- package/dist/dashboard-source/modules/shadcn-components/src/lib/field-set.tsx +14 -0
- package/dist/dashboard-source/modules/shadcn-components/src/lib/file-field.tsx +321 -0
- package/dist/dashboard-source/modules/shadcn-components/src/lib/file-upload-context.tsx +45 -0
- package/dist/dashboard-source/modules/shadcn-components/src/lib/form-context.tsx +19 -0
- package/dist/dashboard-source/modules/shadcn-components/src/lib/lookup-field.tsx +394 -0
- package/dist/dashboard-source/modules/shadcn-components/src/lib/radio-field.tsx +96 -0
- package/dist/dashboard-source/modules/shadcn-components/src/lib/select-field.tsx +106 -0
- package/dist/dashboard-source/modules/shadcn-components/src/lib/text-field.tsx +245 -0
- package/dist/dashboard-source/modules/shadcn-components/src/lib/ui/button.tsx +63 -0
- package/dist/dashboard-source/modules/shadcn-components/src/lib/ui/checkbox.tsx +31 -0
- package/dist/dashboard-source/modules/shadcn-components/src/lib/ui/command.tsx +101 -0
- package/dist/dashboard-source/modules/shadcn-components/src/lib/ui/field.tsx +275 -0
- package/dist/dashboard-source/modules/shadcn-components/src/lib/ui/input.tsx +29 -0
- package/dist/dashboard-source/modules/shadcn-components/src/lib/ui/label.tsx +23 -0
- package/dist/dashboard-source/modules/shadcn-components/src/lib/ui/popover.tsx +31 -0
- package/dist/dashboard-source/modules/shadcn-components/src/lib/ui/separator.tsx +27 -0
- package/dist/dashboard-source/modules/shadcn-components/src/lib/ui/textarea.tsx +19 -0
- package/dist/dashboard-source/modules/shadcn-components/src/lib/utils/utils.ts +4 -0
- package/dist/dashboard-source.json +70 -0
- package/dist/graphql-server.mjs +1319 -0
- package/dist/job-worker.mjs +989 -0
- package/dist/main.mjs +495 -0
- package/dist/prepare-dashboard.mjs +35 -0
- package/dist/resources/cedar/policies.cedar +315 -0
- package/dist/resources/cedar/schema.cedarschema +276 -0
- package/dist/resources/graphql-schema/rxdb.graphql +401 -0
- package/dist/resources/graphql-schema/system.graphql +1200 -0
- package/package.json +98 -0
|
@@ -0,0 +1,975 @@
|
|
|
1
|
+
import type { Arbitrary, DateTime, Effect } from "effect"
|
|
2
|
+
import { Schema } from "effect"
|
|
3
|
+
import isURL from "validator/lib/isURL"
|
|
4
|
+
import type { DeferredValue, FormValue } from "./deferred-value.ts"
|
|
5
|
+
import {
|
|
6
|
+
FormAutoComplete,
|
|
7
|
+
FormCalendarSlotInput,
|
|
8
|
+
FormDateInput,
|
|
9
|
+
FormDefault,
|
|
10
|
+
FormDescription,
|
|
11
|
+
FormFileInput,
|
|
12
|
+
FormLabel,
|
|
13
|
+
FormListInput,
|
|
14
|
+
FormLookupInput,
|
|
15
|
+
FormNumberInput,
|
|
16
|
+
FormPermission,
|
|
17
|
+
FormProviderUserInput,
|
|
18
|
+
FormRadioInput,
|
|
19
|
+
FormReadOnly,
|
|
20
|
+
FormRequired,
|
|
21
|
+
FormSuggestionInput,
|
|
22
|
+
FormTableInput,
|
|
23
|
+
FormTextAreaInput,
|
|
24
|
+
} from "./form-annotations.ts"
|
|
25
|
+
|
|
26
|
+
// Symbol for marking schemas that should be flattened
|
|
27
|
+
export const FLATTEN_SYMBOL = Symbol.for("processfocus:internal-tag/form-schema/flatten")
|
|
28
|
+
|
|
29
|
+
// Symbol for marking structural-only elements (UI-only, excluded from submission)
|
|
30
|
+
export const STRUCTURAL_ONLY_SYMBOL = Symbol.for(
|
|
31
|
+
"processfocus:internal-tag/form-schema/structural-only",
|
|
32
|
+
)
|
|
33
|
+
|
|
34
|
+
// Symbol for storing the structural element type
|
|
35
|
+
export const STRUCTURAL_TYPE_SYMBOL = Symbol.for(
|
|
36
|
+
"processfocus:internal-tag/form-schema/structural-type",
|
|
37
|
+
)
|
|
38
|
+
|
|
39
|
+
export const TEXTBLOCK_CONTENT_SYMBOL = Symbol.for(
|
|
40
|
+
"processfocus:internal-tag/form-schema/textblock-content",
|
|
41
|
+
)
|
|
42
|
+
export const TEXTBLOCK_DYNAMIC_CONTENT_SYMBOL = Symbol.for(
|
|
43
|
+
"processfocus:internal-tag/form-schema/textblock-dynamic-content",
|
|
44
|
+
)
|
|
45
|
+
|
|
46
|
+
export const METRIC_BREAKDOWN_SYMBOL = Symbol.for(
|
|
47
|
+
"processfocus:internal-tag/form-schema/metric-breakdown",
|
|
48
|
+
)
|
|
49
|
+
|
|
50
|
+
export const LINK_URL_SYMBOL = Symbol.for("processfocus:internal-tag/form-schema/link-url")
|
|
51
|
+
export const LINK_TEXT_SYMBOL = Symbol.for("processfocus:internal-tag/form-schema/link-text")
|
|
52
|
+
export const LINK_DISPLAY_SYMBOL = Symbol.for("processfocus:internal-tag/form-schema/link-display")
|
|
53
|
+
export const LINK_COLOR_SYMBOL = Symbol.for("processfocus:internal-tag/form-schema/link-color")
|
|
54
|
+
|
|
55
|
+
export type LinkButtonColor = "blue"
|
|
56
|
+
|
|
57
|
+
export interface LinkButtonOptions {
|
|
58
|
+
readonly color?: LinkButtonColor
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export interface DynamicTextBlockOptions {
|
|
62
|
+
/** Placeholder content shown when render-time resolution fails. */
|
|
63
|
+
readonly text: string
|
|
64
|
+
/**
|
|
65
|
+
* Resolves the rendered text when form metadata is requested. Resolution
|
|
66
|
+
* failures are logged by the renderer and leave `text` in place. Any
|
|
67
|
+
* services used by the Effect must be available in the form metadata runtime;
|
|
68
|
+
* this is not compile-time enforced because the environment type is unknown.
|
|
69
|
+
*/
|
|
70
|
+
readonly resolve: () => Effect.Effect<string, unknown, unknown>
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export type MetricBreakdownColor =
|
|
74
|
+
| "amber"
|
|
75
|
+
| "emerald"
|
|
76
|
+
| "rose"
|
|
77
|
+
| "sky"
|
|
78
|
+
| "slate"
|
|
79
|
+
| "violet"
|
|
80
|
+
|
|
81
|
+
export interface MetricBreakdownBucket {
|
|
82
|
+
readonly label: string
|
|
83
|
+
readonly amount?: number
|
|
84
|
+
readonly description?: string
|
|
85
|
+
readonly color?: MetricBreakdownColor
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export interface MetricBreakdownField {
|
|
89
|
+
readonly label: string
|
|
90
|
+
readonly value?: string
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export interface MetricBreakdownSelectorOption {
|
|
94
|
+
readonly label: string
|
|
95
|
+
readonly value: string
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export interface MetricBreakdownSelectorControl {
|
|
99
|
+
readonly type: "selector"
|
|
100
|
+
/** Item-query/GraphQL argument name for this control. */
|
|
101
|
+
readonly name: string
|
|
102
|
+
/** Optional readable URL parameter key; value wiring is handled by callers. */
|
|
103
|
+
readonly urlParameter?: string
|
|
104
|
+
readonly label: string
|
|
105
|
+
readonly value?: string
|
|
106
|
+
readonly options: readonly [
|
|
107
|
+
MetricBreakdownSelectorOption,
|
|
108
|
+
...MetricBreakdownSelectorOption[],
|
|
109
|
+
]
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
export type MetricBreakdownControl = MetricBreakdownSelectorControl
|
|
113
|
+
|
|
114
|
+
export interface MetricBreakdownDataBucket {
|
|
115
|
+
readonly label: string
|
|
116
|
+
readonly amount: number
|
|
117
|
+
readonly description?: string
|
|
118
|
+
readonly color?: MetricBreakdownColor
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
export interface MetricBreakdownDataField {
|
|
122
|
+
readonly label: string
|
|
123
|
+
readonly value: string
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
export interface MetricBreakdownData {
|
|
127
|
+
readonly total: number
|
|
128
|
+
readonly currency: string
|
|
129
|
+
readonly badge?: string
|
|
130
|
+
readonly fields: readonly MetricBreakdownDataField[]
|
|
131
|
+
readonly buckets: readonly MetricBreakdownDataBucket[]
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
export interface MetricBreakdownOptions {
|
|
135
|
+
readonly title: string
|
|
136
|
+
readonly buckets: readonly MetricBreakdownBucket[]
|
|
137
|
+
readonly badge?: string
|
|
138
|
+
readonly currency?: string
|
|
139
|
+
readonly fields?: readonly MetricBreakdownField[]
|
|
140
|
+
readonly controls?: readonly MetricBreakdownControl[]
|
|
141
|
+
readonly contextFields?: readonly string[]
|
|
142
|
+
readonly dataSource?: "item"
|
|
143
|
+
readonly rendererPluginType?: string
|
|
144
|
+
readonly rendererPluginData?: Record<string, unknown>
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
export const CurrentProviderUser = Symbol.for(
|
|
148
|
+
"processfocus:internal-tag/form-schema/current-provider-user",
|
|
149
|
+
)
|
|
150
|
+
|
|
151
|
+
// Branded type to mark schemas for type-level flattening
|
|
152
|
+
export type FlattenMarker = { readonly __flatten: unique symbol }
|
|
153
|
+
|
|
154
|
+
// Branded type to mark structural-only elements
|
|
155
|
+
export type StructuralOnlyMarker = { readonly __structuralOnly: unique symbol }
|
|
156
|
+
|
|
157
|
+
export type ReadOnlyMarker = { readonly __readOnly: unique symbol }
|
|
158
|
+
export type ProviderUserMarker = { readonly __providerUser: unique symbol }
|
|
159
|
+
export type LookupMarker = { readonly __lookup: unique symbol }
|
|
160
|
+
export type CalendarSlotMarker = { readonly __calendarSlot: unique symbol }
|
|
161
|
+
/** Preserve read-only classification in downstream process-state inference. */
|
|
162
|
+
export const ReadOnly = <A, I, R>(
|
|
163
|
+
schema: Schema.Schema<A, I, R>,
|
|
164
|
+
): Schema.Schema<A, I, R> & ReadOnlyMarker =>
|
|
165
|
+
schema.annotations({ [FormReadOnly]: true }) as Schema.Schema<A, I, R> &
|
|
166
|
+
ReadOnlyMarker
|
|
167
|
+
|
|
168
|
+
type PresentationOnly<Field> = Field extends StructuralOnlyMarker
|
|
169
|
+
? true
|
|
170
|
+
: Field extends FlattenMarker & { readonly fields: infer Fields }
|
|
171
|
+
? Exclude<
|
|
172
|
+
{
|
|
173
|
+
[Key in keyof Fields]-?: PresentationOnly<
|
|
174
|
+
Exclude<Fields[Key], undefined>
|
|
175
|
+
>
|
|
176
|
+
}[keyof Fields],
|
|
177
|
+
true
|
|
178
|
+
> extends never
|
|
179
|
+
? true
|
|
180
|
+
: false
|
|
181
|
+
: false
|
|
182
|
+
|
|
183
|
+
/** Optional definition keys are presentation only; optional values use Schema.optional. */
|
|
184
|
+
export type StableFormFields<Fields> = {
|
|
185
|
+
[Key in keyof Fields]: undefined extends Fields[Key]
|
|
186
|
+
? PresentationOnly<Exclude<Fields[Key], undefined>> extends true
|
|
187
|
+
? Fields[Key]
|
|
188
|
+
: never
|
|
189
|
+
: Fields[Key] extends { readonly fields: infer Nested }
|
|
190
|
+
? Fields[Key] & { readonly fields: StableFormFields<Nested> }
|
|
191
|
+
: Fields[Key]
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
// Wrapper function - creates an annotated struct for semantic grouping with flattened type
|
|
195
|
+
export const Wrapper = <Fields extends Schema.Struct.Fields>(
|
|
196
|
+
fields: Fields & StableFormFields<NoInfer<Fields>>,
|
|
197
|
+
): Schema.Struct<Fields> & FlattenMarker =>
|
|
198
|
+
Schema.Struct<Fields>(fields).annotations({
|
|
199
|
+
[FLATTEN_SYMBOL]: true,
|
|
200
|
+
}) as Schema.Struct<Fields> & FlattenMarker
|
|
201
|
+
|
|
202
|
+
// Helper to create custom structural-only elements
|
|
203
|
+
const structuralElement = <T extends Record<string, unknown>>(
|
|
204
|
+
type: string,
|
|
205
|
+
data?: T,
|
|
206
|
+
): Schema.Schema.Any & StructuralOnlyMarker =>
|
|
207
|
+
Schema.Undefined.annotations({
|
|
208
|
+
[STRUCTURAL_ONLY_SYMBOL]: true,
|
|
209
|
+
[STRUCTURAL_TYPE_SYMBOL]: type,
|
|
210
|
+
...data,
|
|
211
|
+
}) as unknown as Schema.Schema.Any & StructuralOnlyMarker
|
|
212
|
+
|
|
213
|
+
// Generic structural-only marker for custom use cases
|
|
214
|
+
export const StructuralOnly = structuralElement("structural")
|
|
215
|
+
|
|
216
|
+
// Specific structural-only helpers for common UI elements
|
|
217
|
+
export const Divider = structuralElement("divider")
|
|
218
|
+
export const TextBlock = (text: string) =>
|
|
219
|
+
structuralElement("textblock", { [TEXTBLOCK_CONTENT_SYMBOL]: text })
|
|
220
|
+
export const DynamicTextBlock = (options: DynamicTextBlockOptions) =>
|
|
221
|
+
structuralElement("textblock", {
|
|
222
|
+
[TEXTBLOCK_CONTENT_SYMBOL]: options.text,
|
|
223
|
+
[TEXTBLOCK_DYNAMIC_CONTENT_SYMBOL]: options.resolve,
|
|
224
|
+
})
|
|
225
|
+
export const Image = (src: string, alt?: string) =>
|
|
226
|
+
structuralElement("image", { src, alt })
|
|
227
|
+
const linkElement = (
|
|
228
|
+
url: string,
|
|
229
|
+
text: string,
|
|
230
|
+
display?: "button",
|
|
231
|
+
options?: LinkButtonOptions,
|
|
232
|
+
) =>
|
|
233
|
+
structuralElement("link", {
|
|
234
|
+
[LINK_URL_SYMBOL]: url,
|
|
235
|
+
[LINK_TEXT_SYMBOL]: text,
|
|
236
|
+
...(display ? { [LINK_DISPLAY_SYMBOL]: display } : {}),
|
|
237
|
+
...(options?.color ? { [LINK_COLOR_SYMBOL]: options.color } : {}),
|
|
238
|
+
})
|
|
239
|
+
export const Link = (url: string, text: string) => linkElement(url, text)
|
|
240
|
+
export const LinkButton = (
|
|
241
|
+
url: string,
|
|
242
|
+
text: string,
|
|
243
|
+
options?: LinkButtonOptions,
|
|
244
|
+
) => linkElement(url, text, "button", options)
|
|
245
|
+
export const MetricBreakdown = (options: MetricBreakdownOptions) =>
|
|
246
|
+
structuralElement("metric-breakdown", { [METRIC_BREAKDOWN_SYMBOL]: options })
|
|
247
|
+
|
|
248
|
+
const isMetricBreakdownBucket = (
|
|
249
|
+
value: unknown,
|
|
250
|
+
): value is MetricBreakdownBucket => {
|
|
251
|
+
if (typeof value !== "object" || value === null || Array.isArray(value)) {
|
|
252
|
+
return false
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
return typeof (value as Record<string, unknown>)["label"] === "string"
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
const isMetricBreakdownSelectorOption = (
|
|
259
|
+
value: unknown,
|
|
260
|
+
): value is MetricBreakdownSelectorOption => {
|
|
261
|
+
if (typeof value !== "object" || value === null || Array.isArray(value)) {
|
|
262
|
+
return false
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
const record = value as Record<string, unknown>
|
|
266
|
+
return (
|
|
267
|
+
typeof record["label"] === "string" && typeof record["value"] === "string"
|
|
268
|
+
)
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
const isMetricBreakdownControl = (
|
|
272
|
+
value: unknown,
|
|
273
|
+
): value is MetricBreakdownControl => {
|
|
274
|
+
if (typeof value !== "object" || value === null || Array.isArray(value)) {
|
|
275
|
+
return false
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
const record = value as Record<string, unknown>
|
|
279
|
+
|
|
280
|
+
return (
|
|
281
|
+
record["type"] === "selector" &&
|
|
282
|
+
typeof record["name"] === "string" &&
|
|
283
|
+
(record["urlParameter"] === undefined ||
|
|
284
|
+
typeof record["urlParameter"] === "string") &&
|
|
285
|
+
typeof record["label"] === "string" &&
|
|
286
|
+
(record["value"] === undefined || typeof record["value"] === "string") &&
|
|
287
|
+
Array.isArray(record["options"]) &&
|
|
288
|
+
record["options"].length > 0 &&
|
|
289
|
+
record["options"].every(isMetricBreakdownSelectorOption)
|
|
290
|
+
)
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
export const isMetricBreakdownOptions = (
|
|
294
|
+
value: unknown,
|
|
295
|
+
): value is MetricBreakdownOptions => {
|
|
296
|
+
if (typeof value !== "object" || value === null || Array.isArray(value)) {
|
|
297
|
+
return false
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
const record = value as Record<string, unknown>
|
|
301
|
+
const dataSource = record["dataSource"]
|
|
302
|
+
const controls = record["controls"]
|
|
303
|
+
const rendererPluginType = record["rendererPluginType"]
|
|
304
|
+
const rendererPluginData = record["rendererPluginData"]
|
|
305
|
+
|
|
306
|
+
return (
|
|
307
|
+
typeof record["title"] === "string" &&
|
|
308
|
+
Array.isArray(record["buckets"]) &&
|
|
309
|
+
record["buckets"].every(isMetricBreakdownBucket) &&
|
|
310
|
+
(controls === undefined ||
|
|
311
|
+
(Array.isArray(controls) && controls.every(isMetricBreakdownControl))) &&
|
|
312
|
+
(dataSource === undefined || dataSource === "item") &&
|
|
313
|
+
(rendererPluginType === undefined ||
|
|
314
|
+
typeof rendererPluginType === "string") &&
|
|
315
|
+
(rendererPluginData === undefined ||
|
|
316
|
+
(typeof rendererPluginData === "object" &&
|
|
317
|
+
rendererPluginData !== null &&
|
|
318
|
+
!Array.isArray(rendererPluginData)))
|
|
319
|
+
)
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
/**
|
|
323
|
+
* Type for field options, generic over the field's value type.
|
|
324
|
+
* This ensures type safety for default values.
|
|
325
|
+
*/
|
|
326
|
+
export interface FieldOptions<T = unknown> {
|
|
327
|
+
label?: FormValue<string>
|
|
328
|
+
description?: FormValue<string>
|
|
329
|
+
autoComplete?: FormValue<string>
|
|
330
|
+
readOnly?: boolean
|
|
331
|
+
permission?: FieldPermissionMetadata
|
|
332
|
+
/**
|
|
333
|
+
* Default value for the field.
|
|
334
|
+
* Can be a static value or a function (closure) that returns the value.
|
|
335
|
+
* Must match the field's value type.
|
|
336
|
+
*
|
|
337
|
+
* @example Static default
|
|
338
|
+
* ```typescript
|
|
339
|
+
* TextField({ default: "N/A" })
|
|
340
|
+
* ```
|
|
341
|
+
*
|
|
342
|
+
* @example Lazy default using execution state
|
|
343
|
+
* ```typescript
|
|
344
|
+
* const flow = process.start(prevStep)
|
|
345
|
+
* new Form(flow, "Approval", {
|
|
346
|
+
* form: ({ value }) => ({
|
|
347
|
+
* cost: TextField({ default: value((state) => String(state.value)) }),
|
|
348
|
+
* count: NumberField({ default: value((state) => state.count) }),
|
|
349
|
+
* }),
|
|
350
|
+
* })
|
|
351
|
+
* ```
|
|
352
|
+
*/
|
|
353
|
+
default?: FormValue<T> | (() => T)
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
export interface ListFieldMetadata {
|
|
357
|
+
readonly addButtonLabel?: string
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
export const isListFieldMetadata = (
|
|
361
|
+
value: unknown,
|
|
362
|
+
): value is ListFieldMetadata =>
|
|
363
|
+
typeof value === "object" &&
|
|
364
|
+
value !== null &&
|
|
365
|
+
(!("addButtonLabel" in value) || typeof value.addButtonLabel === "string")
|
|
366
|
+
|
|
367
|
+
export interface ListFieldOptions<T> extends FieldOptions<T> {
|
|
368
|
+
readonly addButtonLabel?: string
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
export interface FieldPermissionRoleRef {
|
|
372
|
+
readonly node: { readonly path: string }
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
export interface FieldPermissionMetadata {
|
|
376
|
+
readonly modify: FieldPermissionRoleRef
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
export const isFieldPermissionMetadata = (
|
|
380
|
+
value: unknown,
|
|
381
|
+
): value is FieldPermissionMetadata =>
|
|
382
|
+
typeof value === "object" &&
|
|
383
|
+
value !== null &&
|
|
384
|
+
"modify" in value &&
|
|
385
|
+
typeof value.modify === "object" &&
|
|
386
|
+
value.modify !== null &&
|
|
387
|
+
"node" in value.modify &&
|
|
388
|
+
typeof value.modify.node === "object" &&
|
|
389
|
+
value.modify.node !== null &&
|
|
390
|
+
"path" in value.modify.node &&
|
|
391
|
+
typeof value.modify.node.path === "string"
|
|
392
|
+
|
|
393
|
+
// Helper to apply annotations to a schema
|
|
394
|
+
// Note: options type is separate from schema type to allow each field helper
|
|
395
|
+
// to enforce its own type constraint on default values
|
|
396
|
+
export const applyFieldAnnotations = <A, I, R>(
|
|
397
|
+
schema: Schema.Schema<A, I, R>,
|
|
398
|
+
options?: FieldOptions<unknown>,
|
|
399
|
+
): Schema.Schema<A, I, R> => {
|
|
400
|
+
if (!options) return schema
|
|
401
|
+
|
|
402
|
+
const annotations: Record<symbol, unknown> = {}
|
|
403
|
+
if (options.label !== undefined) {
|
|
404
|
+
annotations[FormLabel] = options.label
|
|
405
|
+
}
|
|
406
|
+
if (options.description !== undefined) {
|
|
407
|
+
annotations[FormDescription] = options.description
|
|
408
|
+
}
|
|
409
|
+
if (options.autoComplete !== undefined) {
|
|
410
|
+
annotations[FormAutoComplete] = options.autoComplete
|
|
411
|
+
}
|
|
412
|
+
if (options.readOnly !== undefined) {
|
|
413
|
+
annotations[FormReadOnly] = options.readOnly
|
|
414
|
+
}
|
|
415
|
+
if (isFieldPermissionMetadata(options.permission)) {
|
|
416
|
+
annotations[FormPermission] = options.permission
|
|
417
|
+
}
|
|
418
|
+
if (options.default !== undefined) {
|
|
419
|
+
annotations[FormDefault] = options.default
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
return Object.getOwnPropertySymbols(annotations).length > 0
|
|
423
|
+
? schema.annotations(annotations)
|
|
424
|
+
: schema
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
/**
|
|
428
|
+
* Create a text field with optional label and description
|
|
429
|
+
*
|
|
430
|
+
* @example
|
|
431
|
+
* ```typescript
|
|
432
|
+
* const schema = Schema.Struct({
|
|
433
|
+
* street: TextField({ label: "Street name", description: "Your street address" })
|
|
434
|
+
* })
|
|
435
|
+
* ```
|
|
436
|
+
*/
|
|
437
|
+
export function TextField(
|
|
438
|
+
options: FieldOptions<string> & { readonly readOnly: true },
|
|
439
|
+
): Schema.Schema<string, string, never> & ReadOnlyMarker
|
|
440
|
+
export function TextField(
|
|
441
|
+
options?: FieldOptions<string>,
|
|
442
|
+
): Schema.Schema<string, string, never>
|
|
443
|
+
export function TextField(
|
|
444
|
+
options?: FieldOptions<string>,
|
|
445
|
+
): Schema.Schema<string, string, never> {
|
|
446
|
+
return applyFieldAnnotations(Schema.String, options)
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
export function TextArea(
|
|
450
|
+
options: FieldOptions<string> & { readonly readOnly: true },
|
|
451
|
+
): Schema.Schema<string, string, never> & ReadOnlyMarker
|
|
452
|
+
export function TextArea(
|
|
453
|
+
options?: FieldOptions<string>,
|
|
454
|
+
): Schema.Schema<string, string, never>
|
|
455
|
+
export function TextArea(
|
|
456
|
+
options?: FieldOptions<string>,
|
|
457
|
+
): Schema.Schema<string, string, never> {
|
|
458
|
+
return applyFieldAnnotations(
|
|
459
|
+
Schema.String.annotations({ [FormTextAreaInput]: true }),
|
|
460
|
+
options,
|
|
461
|
+
)
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
/**
|
|
465
|
+
* Create a text field from a transformation schema
|
|
466
|
+
*
|
|
467
|
+
* @example
|
|
468
|
+
* ```typescript
|
|
469
|
+
* const schema = Schema.Struct({
|
|
470
|
+
* date: TextFieldFrom(Schema.DateFromString, { label: "Birth date" })
|
|
471
|
+
* })
|
|
472
|
+
* ```
|
|
473
|
+
*/
|
|
474
|
+
export const TextFieldFrom = <I, R>(
|
|
475
|
+
schema: Schema.Schema<string, I, R>,
|
|
476
|
+
options?: FieldOptions<I>,
|
|
477
|
+
): Schema.Schema<string, I, R> => applyFieldAnnotations(schema, options)
|
|
478
|
+
|
|
479
|
+
/**
|
|
480
|
+
* Validate that a string is a well-formed HTTPS URL.
|
|
481
|
+
*
|
|
482
|
+
* Uses `validator/lib/isURL` with `protocols: ["https"]` and
|
|
483
|
+
* `require_protocol: true` so bare hostnames and non-HTTPS schemes are
|
|
484
|
+
* rejected. TLDs are required to catch typos like `https://x`.
|
|
485
|
+
*
|
|
486
|
+
* Exported so server-side code (e.g. `updateRegion`) can reuse the same
|
|
487
|
+
* check without pulling in the full form-schema field constructor.
|
|
488
|
+
*/
|
|
489
|
+
export const isHttpsUrl = (value: string): boolean =>
|
|
490
|
+
isURL(value, {
|
|
491
|
+
protocols: ["https"],
|
|
492
|
+
require_protocol: true,
|
|
493
|
+
require_tld: true,
|
|
494
|
+
})
|
|
495
|
+
|
|
496
|
+
const httpsUrlSchema = Schema.String.pipe(
|
|
497
|
+
// Strict runtime validation via validator.js.
|
|
498
|
+
Schema.filter(isHttpsUrl, {
|
|
499
|
+
message: () => "Must be a valid HTTPS URL (e.g. https://example.com/path)",
|
|
500
|
+
}),
|
|
501
|
+
// Guide arbitrary generation for auto-gen test data only — not a
|
|
502
|
+
// runtime filter.
|
|
503
|
+
Schema.annotations({
|
|
504
|
+
arbitrary: (): Arbitrary.LazyArbitrary<string> => (fc) =>
|
|
505
|
+
fc.webUrl({ validSchemes: ["https"] }),
|
|
506
|
+
}),
|
|
507
|
+
)
|
|
508
|
+
|
|
509
|
+
/**
|
|
510
|
+
* Create an HTTPS URL text field with built-in validation via
|
|
511
|
+
* `validator.js`.
|
|
512
|
+
*
|
|
513
|
+
* The pattern annotation guides Effect's arbitrary generator so that
|
|
514
|
+
* auto-generated test data produces valid HTTPS URLs. The `isHttpsUrl`
|
|
515
|
+
* filter then performs the real validation using `validator/lib/isURL`.
|
|
516
|
+
*
|
|
517
|
+
* @example
|
|
518
|
+
* ```typescript
|
|
519
|
+
* const schema = Schema.Struct({
|
|
520
|
+
* endpoint: HttpsUrlField({ label: "OTLP Endpoint" })
|
|
521
|
+
* })
|
|
522
|
+
* ```
|
|
523
|
+
*/
|
|
524
|
+
export const HttpsUrlField = (
|
|
525
|
+
options?: FieldOptions<string>,
|
|
526
|
+
): Schema.Schema<string, string, never> => {
|
|
527
|
+
return applyFieldAnnotations(httpsUrlSchema, options)
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
/**
|
|
531
|
+
* Create a number field with optional label and description
|
|
532
|
+
*
|
|
533
|
+
* @example
|
|
534
|
+
* ```typescript
|
|
535
|
+
* const schema = Schema.Struct({
|
|
536
|
+
* age: NumberField({ label: "Your age", description: "Age in years" })
|
|
537
|
+
* })
|
|
538
|
+
* ```
|
|
539
|
+
*/
|
|
540
|
+
export const NumberField = (
|
|
541
|
+
options?: FieldOptions<number>,
|
|
542
|
+
): Schema.Schema<number, number, never> =>
|
|
543
|
+
applyFieldAnnotations(Schema.Number, options)
|
|
544
|
+
|
|
545
|
+
/**
|
|
546
|
+
* Create a number field from a transformation schema
|
|
547
|
+
*
|
|
548
|
+
* @example
|
|
549
|
+
* ```typescript
|
|
550
|
+
* const schema = Schema.Struct({
|
|
551
|
+
* age: NumberFieldFrom(Schema.NumberFromString, { label: "Your age" })
|
|
552
|
+
* })
|
|
553
|
+
* ```
|
|
554
|
+
*/
|
|
555
|
+
export const NumberFieldFrom = <I, R>(
|
|
556
|
+
schema: Schema.Schema<number, I, R>,
|
|
557
|
+
options?: FieldOptions<I> & { required?: boolean },
|
|
558
|
+
): Schema.Schema<number, I, R> => {
|
|
559
|
+
const base = options?.required
|
|
560
|
+
? schema.annotations({
|
|
561
|
+
jsonSchema: { minLength: 1 },
|
|
562
|
+
[FormRequired]: true,
|
|
563
|
+
[FormNumberInput]: true,
|
|
564
|
+
})
|
|
565
|
+
: schema.annotations({
|
|
566
|
+
[FormNumberInput]: true,
|
|
567
|
+
})
|
|
568
|
+
return applyFieldAnnotations(base, options)
|
|
569
|
+
}
|
|
570
|
+
|
|
571
|
+
export const DateField = (
|
|
572
|
+
options?: FieldOptions<string>,
|
|
573
|
+
): Schema.Schema<DateTime.Utc, string, never> =>
|
|
574
|
+
applyFieldAnnotations(
|
|
575
|
+
Schema.DateTimeUtc.annotations({ [FormDateInput]: true }),
|
|
576
|
+
options,
|
|
577
|
+
)
|
|
578
|
+
|
|
579
|
+
const requiredBooleanSchema = Schema.Boolean.pipe(
|
|
580
|
+
Schema.filter((b): b is boolean => b === true, {
|
|
581
|
+
message: () => "This field is required",
|
|
582
|
+
jsonSchema: { type: "boolean", enum: [true] },
|
|
583
|
+
[FormRequired]: true,
|
|
584
|
+
}),
|
|
585
|
+
)
|
|
586
|
+
|
|
587
|
+
/**
|
|
588
|
+
* Create a boolean field with optional label and description
|
|
589
|
+
*
|
|
590
|
+
* When `required: true`, the field must be checked (true) to pass validation.
|
|
591
|
+
*
|
|
592
|
+
* @example
|
|
593
|
+
* ```typescript
|
|
594
|
+
* const schema = Schema.Struct({
|
|
595
|
+
* acceptTerms: BooleanField({ label: "Accept terms and conditions" }),
|
|
596
|
+
* approved: BooleanField({ label: "I approve", required: true })
|
|
597
|
+
* })
|
|
598
|
+
* ```
|
|
599
|
+
*/
|
|
600
|
+
export const BooleanField = (
|
|
601
|
+
options?: FieldOptions<boolean> & { required?: boolean },
|
|
602
|
+
): Schema.Schema<boolean, boolean, never> => {
|
|
603
|
+
const base = options?.required ? requiredBooleanSchema : Schema.Boolean
|
|
604
|
+
return applyFieldAnnotations(base, options)
|
|
605
|
+
}
|
|
606
|
+
|
|
607
|
+
/**
|
|
608
|
+
* File upload metadata embedded in the FormFileInput annotation.
|
|
609
|
+
* Flows through the AST walker to the client representation.
|
|
610
|
+
*/
|
|
611
|
+
export interface FileFieldMetadata {
|
|
612
|
+
readonly documentStore: string
|
|
613
|
+
readonly accept?: string
|
|
614
|
+
readonly maxSize?: number
|
|
615
|
+
}
|
|
616
|
+
|
|
617
|
+
export interface DocumentStoreRef {
|
|
618
|
+
readonly node: { readonly path: string }
|
|
619
|
+
}
|
|
620
|
+
|
|
621
|
+
/**
|
|
622
|
+
* Create a file upload field with optional accept filter and max size.
|
|
623
|
+
*
|
|
624
|
+
* The underlying value is a `fileId` string (returned by the document store
|
|
625
|
+
* after upload). The frontend renders this as a file picker that handles
|
|
626
|
+
* upload automatically.
|
|
627
|
+
*
|
|
628
|
+
* @example
|
|
629
|
+
* ```typescript
|
|
630
|
+
* const schema = Schema.Struct({
|
|
631
|
+
* artifact: FileField({ label: "Deployment artifact", accept: ".zip", maxSize: 100_000_000 })
|
|
632
|
+
* })
|
|
633
|
+
* ```
|
|
634
|
+
*/
|
|
635
|
+
export const FileField = (
|
|
636
|
+
options: FieldOptions<string> & {
|
|
637
|
+
documentStore: DocumentStoreRef
|
|
638
|
+
accept?: string
|
|
639
|
+
maxSize?: number
|
|
640
|
+
},
|
|
641
|
+
): Schema.Schema<string, string, never> => {
|
|
642
|
+
const storePath = options.documentStore.node.path.startsWith("/")
|
|
643
|
+
? options.documentStore.node.path
|
|
644
|
+
: `/${options.documentStore.node.path}`
|
|
645
|
+
|
|
646
|
+
const metadata: FileFieldMetadata = {
|
|
647
|
+
documentStore: storePath,
|
|
648
|
+
...(options.accept != null && { accept: options.accept }),
|
|
649
|
+
...(options.maxSize != null && { maxSize: options.maxSize }),
|
|
650
|
+
}
|
|
651
|
+
const base = Schema.String.annotations({
|
|
652
|
+
[FormFileInput]: metadata,
|
|
653
|
+
})
|
|
654
|
+
return applyFieldAnnotations(base, options)
|
|
655
|
+
}
|
|
656
|
+
|
|
657
|
+
/**
|
|
658
|
+
* Create a list/array field whose items are structs.
|
|
659
|
+
*
|
|
660
|
+
* Produces `Schema.Array(Schema.Struct(itemFields))` with optional annotations.
|
|
661
|
+
*
|
|
662
|
+
* @example
|
|
663
|
+
* ```typescript
|
|
664
|
+
* const schema = Schema.Struct({
|
|
665
|
+
* students: ListField({
|
|
666
|
+
* first_name: TextField({ label: "First name" }),
|
|
667
|
+
* parent_email: TextField({ label: "Parent email" }),
|
|
668
|
+
* }, { label: "Students" }),
|
|
669
|
+
* })
|
|
670
|
+
* ```
|
|
671
|
+
*/
|
|
672
|
+
export const ListField = <Fields extends Schema.Struct.Fields>(
|
|
673
|
+
itemFields: Fields & StableFormFields<NoInfer<Fields>>,
|
|
674
|
+
options?: ListFieldOptions<ReadonlyArray<Schema.Struct.Encoded<Fields>>>,
|
|
675
|
+
) => {
|
|
676
|
+
const schema = Schema.Array(Schema.Struct<Fields>(itemFields))
|
|
677
|
+
const annotatedSchema =
|
|
678
|
+
options?.addButtonLabel === undefined
|
|
679
|
+
? schema
|
|
680
|
+
: schema.annotations({
|
|
681
|
+
[FormListInput]: {
|
|
682
|
+
addButtonLabel: options.addButtonLabel,
|
|
683
|
+
} satisfies ListFieldMetadata,
|
|
684
|
+
})
|
|
685
|
+
|
|
686
|
+
return applyFieldAnnotations(
|
|
687
|
+
annotatedSchema,
|
|
688
|
+
options,
|
|
689
|
+
) as unknown as Schema.Schema<
|
|
690
|
+
ReadonlyArray<Schema.Struct.Type<Fields>>,
|
|
691
|
+
ReadonlyArray<Schema.Struct.Encoded<Fields>>,
|
|
692
|
+
Schema.Struct.Context<Fields>
|
|
693
|
+
> &
|
|
694
|
+
ListFieldMarker<Fields>
|
|
695
|
+
}
|
|
696
|
+
|
|
697
|
+
export type ListFieldMarker<Fields extends Schema.Struct.Fields> = {
|
|
698
|
+
readonly __listFields: Fields
|
|
699
|
+
}
|
|
700
|
+
|
|
701
|
+
export type TableFieldMarker = { readonly __tableField: unique symbol }
|
|
702
|
+
|
|
703
|
+
/**
|
|
704
|
+
* Create a read-only table field whose rows are structs.
|
|
705
|
+
*
|
|
706
|
+
* The row field labels become the table column headings. Table fields are for
|
|
707
|
+
* display only and are excluded from form submissions via the read-only marker.
|
|
708
|
+
*/
|
|
709
|
+
export const TableField = <Fields extends Schema.Struct.Fields>(
|
|
710
|
+
itemFields: Fields & StableFormFields<NoInfer<Fields>>,
|
|
711
|
+
options?: Omit<
|
|
712
|
+
FieldOptions<ReadonlyArray<Schema.Struct.Encoded<Fields>>>,
|
|
713
|
+
"permission" | "readOnly"
|
|
714
|
+
>,
|
|
715
|
+
) =>
|
|
716
|
+
applyFieldAnnotations(
|
|
717
|
+
Schema.Array(Schema.Struct<Fields>(itemFields)).annotations({
|
|
718
|
+
[FormTableInput]: true,
|
|
719
|
+
}),
|
|
720
|
+
{ ...options, readOnly: true },
|
|
721
|
+
) as Schema.Schema<
|
|
722
|
+
ReadonlyArray<Schema.Schema.Type<Schema.Struct<Fields>>>,
|
|
723
|
+
ReadonlyArray<Schema.Schema.Encoded<Schema.Struct<Fields>>>,
|
|
724
|
+
never
|
|
725
|
+
> &
|
|
726
|
+
TableFieldMarker &
|
|
727
|
+
ReadOnlyMarker
|
|
728
|
+
|
|
729
|
+
/**
|
|
730
|
+
* An item returned by a lookup query.
|
|
731
|
+
*/
|
|
732
|
+
export interface LookupItem {
|
|
733
|
+
readonly value: string
|
|
734
|
+
readonly label: string
|
|
735
|
+
}
|
|
736
|
+
|
|
737
|
+
export interface RadioFieldOption<Value extends string = string> {
|
|
738
|
+
readonly value: Value
|
|
739
|
+
readonly label: string
|
|
740
|
+
}
|
|
741
|
+
|
|
742
|
+
export interface RadioFieldMetadata<Value extends string = string> {
|
|
743
|
+
readonly options: readonly [
|
|
744
|
+
RadioFieldOption<Value>,
|
|
745
|
+
...RadioFieldOption<Value>[],
|
|
746
|
+
]
|
|
747
|
+
}
|
|
748
|
+
|
|
749
|
+
export type RadioFieldMarker = { readonly __radioField: unique symbol }
|
|
750
|
+
|
|
751
|
+
type RadioOptionValues<
|
|
752
|
+
Options extends readonly [
|
|
753
|
+
RadioFieldOption<string>,
|
|
754
|
+
...RadioFieldOption<string>[],
|
|
755
|
+
],
|
|
756
|
+
> = Options[number]["value"]
|
|
757
|
+
|
|
758
|
+
export const RadioField = <
|
|
759
|
+
const Options extends readonly [
|
|
760
|
+
RadioFieldOption<string>,
|
|
761
|
+
...RadioFieldOption<string>[],
|
|
762
|
+
],
|
|
763
|
+
>(
|
|
764
|
+
options: FieldOptions<RadioOptionValues<Options>> & {
|
|
765
|
+
readonly options: Options
|
|
766
|
+
},
|
|
767
|
+
): Schema.Schema<
|
|
768
|
+
RadioOptionValues<Options>,
|
|
769
|
+
RadioOptionValues<Options>,
|
|
770
|
+
never
|
|
771
|
+
> &
|
|
772
|
+
RadioFieldMarker => {
|
|
773
|
+
const values = options.options.map((option) => option.value) as [
|
|
774
|
+
RadioOptionValues<Options>,
|
|
775
|
+
...RadioOptionValues<Options>[],
|
|
776
|
+
]
|
|
777
|
+
const metadata: RadioFieldMetadata<RadioOptionValues<Options>> = {
|
|
778
|
+
options: options.options,
|
|
779
|
+
}
|
|
780
|
+
|
|
781
|
+
return applyFieldAnnotations(
|
|
782
|
+
Schema.Literal(...values).annotations({ [FormRadioInput]: metadata }),
|
|
783
|
+
options,
|
|
784
|
+
) as Schema.Schema<
|
|
785
|
+
RadioOptionValues<Options>,
|
|
786
|
+
RadioOptionValues<Options>,
|
|
787
|
+
never
|
|
788
|
+
> &
|
|
789
|
+
RadioFieldMarker
|
|
790
|
+
}
|
|
791
|
+
|
|
792
|
+
/**
|
|
793
|
+
* Metadata stored in the FormLookupInput annotation.
|
|
794
|
+
* Contains the optional query function that searches for matching items.
|
|
795
|
+
* When no query is provided, the field is still marked as a lookup
|
|
796
|
+
* but the query must be supplied via `Form.lookups.<field>.setQuery()`.
|
|
797
|
+
*/
|
|
798
|
+
export interface LookupFieldMetadata {
|
|
799
|
+
readonly query?: (
|
|
800
|
+
filter: string,
|
|
801
|
+
limit: number,
|
|
802
|
+
) => Effect.Effect<ReadonlyArray<LookupItem>, unknown, unknown>
|
|
803
|
+
}
|
|
804
|
+
|
|
805
|
+
type QueryValue<Query> = Query | DeferredValue<Query>
|
|
806
|
+
|
|
807
|
+
export interface CalendarSlotItem {
|
|
808
|
+
readonly value: string
|
|
809
|
+
readonly startsAt: string
|
|
810
|
+
readonly endsAt: string
|
|
811
|
+
readonly label?: string | undefined
|
|
812
|
+
}
|
|
813
|
+
|
|
814
|
+
export type CalendarSlotWeekday = 0 | 1 | 2 | 3 | 4 | 5 | 6
|
|
815
|
+
|
|
816
|
+
export interface CalendarSlotCalendarMetadata {
|
|
817
|
+
readonly weekStartsOn?: CalendarSlotWeekday | undefined
|
|
818
|
+
readonly businessDays?: readonly CalendarSlotWeekday[] | undefined
|
|
819
|
+
}
|
|
820
|
+
|
|
821
|
+
export interface CalendarSlotFieldMetadata {
|
|
822
|
+
readonly timeZone: string
|
|
823
|
+
readonly locale: string
|
|
824
|
+
readonly query?: () => Effect.Effect<
|
|
825
|
+
ReadonlyArray<CalendarSlotItem>,
|
|
826
|
+
unknown,
|
|
827
|
+
unknown
|
|
828
|
+
>
|
|
829
|
+
readonly calendar?: CalendarSlotCalendarMetadata | undefined
|
|
830
|
+
readonly emptyMessageHtml?: string | undefined
|
|
831
|
+
readonly loadErrorMessageHtml?: string | undefined
|
|
832
|
+
}
|
|
833
|
+
|
|
834
|
+
export type CalendarSlotFieldOptions = FieldOptions<string> & {
|
|
835
|
+
readonly timeZone: string
|
|
836
|
+
/** BCP 47 locale used for date/time display, e.g. "en-NZ". */
|
|
837
|
+
readonly locale?: string | undefined
|
|
838
|
+
readonly query?: QueryValue<
|
|
839
|
+
() => Effect.Effect<ReadonlyArray<CalendarSlotItem>, unknown, unknown>
|
|
840
|
+
>
|
|
841
|
+
readonly calendar?: CalendarSlotCalendarMetadata | undefined
|
|
842
|
+
readonly emptyMessageHtml?: string | undefined
|
|
843
|
+
readonly loadErrorMessageHtml?: string | undefined
|
|
844
|
+
}
|
|
845
|
+
|
|
846
|
+
/**
|
|
847
|
+
* Create a searchable lookup/select field.
|
|
848
|
+
*
|
|
849
|
+
* The underlying value is a string (the selected item's value/ID).
|
|
850
|
+
* The `query` function is embedded in the schema annotation and executed
|
|
851
|
+
* server-side by the `lookupSuggestions` GraphQL resolver, which calls
|
|
852
|
+
* `Form.executeLookup()` to provide the Effect runtime context. Any
|
|
853
|
+
* service dependencies used via `yield*` are resolved automatically.
|
|
854
|
+
*
|
|
855
|
+
* @param options - Standard field options (label, description, etc.) plus
|
|
856
|
+
* a `query` function receiving a search filter and max result count,
|
|
857
|
+
* returning an Effect that yields {@link LookupItem LookupItem[]}.
|
|
858
|
+
*
|
|
859
|
+
* @example
|
|
860
|
+
* ```typescript
|
|
861
|
+
* const schema = Schema.Struct({
|
|
862
|
+
* regionId: LookupField({
|
|
863
|
+
* label: "Region",
|
|
864
|
+
* description: "AWS region for this project",
|
|
865
|
+
* query: (filter, limit) =>
|
|
866
|
+
* Effect.gen(function* () {
|
|
867
|
+
* const ops = yield* OrgOperations
|
|
868
|
+
* return yield* ops.searchRegions(filter, limit)
|
|
869
|
+
* }),
|
|
870
|
+
* }),
|
|
871
|
+
* })
|
|
872
|
+
* ```
|
|
873
|
+
*/
|
|
874
|
+
export const LookupField = (
|
|
875
|
+
options: FieldOptions<string> & {
|
|
876
|
+
query?: QueryValue<
|
|
877
|
+
(
|
|
878
|
+
filter: string,
|
|
879
|
+
limit: number,
|
|
880
|
+
) => Effect.Effect<ReadonlyArray<LookupItem>, unknown, unknown>
|
|
881
|
+
>
|
|
882
|
+
},
|
|
883
|
+
): Schema.Schema<string, string, never> & LookupMarker => {
|
|
884
|
+
const metadata = {
|
|
885
|
+
...(options.query != null && { query: options.query }),
|
|
886
|
+
}
|
|
887
|
+
const base = Schema.String.annotations({
|
|
888
|
+
[FormLookupInput]: metadata,
|
|
889
|
+
})
|
|
890
|
+
return applyFieldAnnotations(base, options) as Schema.Schema<
|
|
891
|
+
string,
|
|
892
|
+
string,
|
|
893
|
+
never
|
|
894
|
+
> &
|
|
895
|
+
LookupMarker
|
|
896
|
+
}
|
|
897
|
+
|
|
898
|
+
/**
|
|
899
|
+
* Create a text field with searchable suggestions.
|
|
900
|
+
*
|
|
901
|
+
* Unlike {@link LookupField}, the submitted value can be either one of the
|
|
902
|
+
* suggestion values or arbitrary text entered by the user. Use this for fields
|
|
903
|
+
* where known records are helpful but not exhaustive.
|
|
904
|
+
*/
|
|
905
|
+
export const SuggestionField = (
|
|
906
|
+
options: FieldOptions<string> & {
|
|
907
|
+
query?: QueryValue<
|
|
908
|
+
(
|
|
909
|
+
filter: string,
|
|
910
|
+
limit: number,
|
|
911
|
+
) => Effect.Effect<ReadonlyArray<LookupItem>, unknown, unknown>
|
|
912
|
+
>
|
|
913
|
+
},
|
|
914
|
+
): Schema.Schema<string, string, never> & LookupMarker => {
|
|
915
|
+
const metadata = {
|
|
916
|
+
...(options.query != null && { query: options.query }),
|
|
917
|
+
}
|
|
918
|
+
const base = Schema.String.annotations({
|
|
919
|
+
[FormLookupInput]: metadata,
|
|
920
|
+
[FormSuggestionInput]: true,
|
|
921
|
+
})
|
|
922
|
+
return applyFieldAnnotations(base, options) as Schema.Schema<
|
|
923
|
+
string,
|
|
924
|
+
string,
|
|
925
|
+
never
|
|
926
|
+
> &
|
|
927
|
+
LookupMarker
|
|
928
|
+
}
|
|
929
|
+
|
|
930
|
+
export const CalendarSlotField = (
|
|
931
|
+
options: CalendarSlotFieldOptions,
|
|
932
|
+
): Schema.Schema<string, string, never> & CalendarSlotMarker => {
|
|
933
|
+
const metadata = {
|
|
934
|
+
timeZone: options.timeZone,
|
|
935
|
+
locale: options.locale ?? "en",
|
|
936
|
+
...(options.query != null && { query: options.query }),
|
|
937
|
+
...(options.calendar != null && { calendar: options.calendar }),
|
|
938
|
+
...(options.emptyMessageHtml != null && {
|
|
939
|
+
emptyMessageHtml: options.emptyMessageHtml,
|
|
940
|
+
}),
|
|
941
|
+
...(options.loadErrorMessageHtml != null && {
|
|
942
|
+
loadErrorMessageHtml: options.loadErrorMessageHtml,
|
|
943
|
+
}),
|
|
944
|
+
}
|
|
945
|
+
return applyFieldAnnotations(
|
|
946
|
+
Schema.String.annotations({ [FormCalendarSlotInput]: metadata }),
|
|
947
|
+
options,
|
|
948
|
+
) as Schema.Schema<string, string, never> & CalendarSlotMarker
|
|
949
|
+
}
|
|
950
|
+
|
|
951
|
+
export type ProviderUserDefault = string | typeof CurrentProviderUser
|
|
952
|
+
|
|
953
|
+
export type ProviderUserFieldOptions = Omit<
|
|
954
|
+
FieldOptions<ProviderUserDefault>,
|
|
955
|
+
"default"
|
|
956
|
+
> & {
|
|
957
|
+
readonly default?:
|
|
958
|
+
| FormValue<ProviderUserDefault>
|
|
959
|
+
| (() => ProviderUserDefault)
|
|
960
|
+
}
|
|
961
|
+
|
|
962
|
+
/**
|
|
963
|
+
* Create a provider-user field.
|
|
964
|
+
*
|
|
965
|
+
* The submitted value is still a string: the selected provider user's id or
|
|
966
|
+
* email. `CurrentProviderUser` can be used as a symbolic default for later
|
|
967
|
+
* runtime resolution.
|
|
968
|
+
*/
|
|
969
|
+
export const ProviderUserField = (
|
|
970
|
+
options?: ProviderUserFieldOptions,
|
|
971
|
+
): Schema.Schema<string, string, never> & ProviderUserMarker =>
|
|
972
|
+
applyFieldAnnotations(
|
|
973
|
+
Schema.String.annotations({ [FormProviderUserInput]: true }),
|
|
974
|
+
options,
|
|
975
|
+
) as Schema.Schema<string, string, never> & ProviderUserMarker
|