@vertesia/ui 1.4.0 → 1.5.0-dev.20260713.151751Z
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/lib/core/components/InputList.d.ts.map +1 -1
- package/lib/core/components/InputList.js +3 -2
- package/lib/core/components/InputList.js.map +1 -1
- package/lib/core/components/SelectList.d.ts.map +1 -1
- package/lib/core/components/SelectList.js +1 -1
- package/lib/core/components/SelectList.js.map +1 -1
- package/lib/core/components/TagsInput.d.ts.map +1 -1
- package/lib/core/components/TagsInput.js +36 -4
- package/lib/core/components/TagsInput.js.map +1 -1
- package/lib/core/components/popup/Popup.js +2 -1
- package/lib/core/components/popup/Popup.js.map +1 -1
- package/lib/core/components/popup/position.d.ts.map +1 -1
- package/lib/core/components/popup/position.js +3 -6
- package/lib/core/components/popup/position.js.map +1 -1
- package/lib/core/components/shadcn/badge.d.ts +2 -2
- package/lib/core/components/shadcn/badge.d.ts.map +1 -1
- package/lib/core/components/shadcn/badge.js +3 -0
- package/lib/core/components/shadcn/badge.js.map +1 -1
- package/lib/core/components/shadcn/breadcrumb.d.ts.map +1 -1
- package/lib/core/components/shadcn/breadcrumb.js +2 -2
- package/lib/core/components/shadcn/breadcrumb.js.map +1 -1
- package/lib/core/components/shadcn/filters/filterBar.d.ts.map +1 -1
- package/lib/core/components/shadcn/filters/filterBar.js +1 -3
- package/lib/core/components/shadcn/filters/filterBar.js.map +1 -1
- package/lib/core/components/shadcn/resizeable.d.ts +1 -1
- package/lib/core/components/shadcn/resizeable.d.ts.map +1 -1
- package/lib/core/components/shadcn/resizeable.js +12 -2
- package/lib/core/components/shadcn/resizeable.js.map +1 -1
- package/lib/core/components/shadcn/selectBox.d.ts +7 -1
- package/lib/core/components/shadcn/selectBox.d.ts.map +1 -1
- package/lib/core/components/shadcn/selectBox.js +29 -12
- package/lib/core/components/shadcn/selectBox.js.map +1 -1
- package/lib/core/components/table/index.d.ts.map +1 -1
- package/lib/core/components/table/index.js +1 -1
- package/lib/core/components/table/index.js.map +1 -1
- package/lib/core/hooks/useIntersectionObserver.d.ts.map +1 -1
- package/lib/core/hooks/useIntersectionObserver.js +3 -1
- package/lib/core/hooks/useIntersectionObserver.js.map +1 -1
- package/lib/features/agent/chat/AgentRightPanel.d.ts.map +1 -1
- package/lib/features/agent/chat/AgentRightPanel.js +3 -6
- package/lib/features/agent/chat/AgentRightPanel.js.map +1 -1
- package/lib/features/agent/chat/AnimatedThinkingDots.d.ts.map +1 -1
- package/lib/features/agent/chat/AnimatedThinkingDots.js +1 -1
- package/lib/features/agent/chat/AnimatedThinkingDots.js.map +1 -1
- package/lib/features/agent/chat/AskUserWidget.d.ts.map +1 -1
- package/lib/features/agent/chat/AskUserWidget.js +4 -3
- package/lib/features/agent/chat/AskUserWidget.js.map +1 -1
- package/lib/features/agent/chat/ModernAgentConversation.d.ts.map +1 -1
- package/lib/features/agent/chat/ModernAgentConversation.js +56 -11
- package/lib/features/agent/chat/ModernAgentConversation.js.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/AllMessagesMixed.d.ts +8 -1
- package/lib/features/agent/chat/ModernAgentOutput/AllMessagesMixed.d.ts.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/AllMessagesMixed.js +40 -31
- package/lib/features/agent/chat/ModernAgentOutput/AllMessagesMixed.js.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/InlineSlidingPlanPanel.js +3 -3
- package/lib/features/agent/chat/ModernAgentOutput/InlineSlidingPlanPanel.js.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/MessageInput.d.ts.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/MessageInput.js +5 -1
- package/lib/features/agent/chat/ModernAgentOutput/MessageInput.js.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/MessageItem.js +3 -7
- package/lib/features/agent/chat/ModernAgentOutput/MessageItem.js.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/PlanPanel.d.ts.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/PlanPanel.js +5 -5
- package/lib/features/agent/chat/ModernAgentOutput/PlanPanel.js.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/SlidingPlanPanel.d.ts.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/SlidingPlanPanel.js +4 -4
- package/lib/features/agent/chat/ModernAgentOutput/SlidingPlanPanel.js.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/ToolCallGroup.d.ts.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/ToolCallGroup.js +3 -3
- package/lib/features/agent/chat/ModernAgentOutput/ToolCallGroup.js.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/WorkstreamTabs.d.ts.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/WorkstreamTabs.js +156 -8
- package/lib/features/agent/chat/ModernAgentOutput/WorkstreamTabs.js.map +1 -1
- package/lib/features/agent/chat/hooks/useFileProcessing.d.ts +1 -0
- package/lib/features/agent/chat/hooks/useFileProcessing.d.ts.map +1 -1
- package/lib/features/agent/chat/hooks/useFileProcessing.js +37 -3
- package/lib/features/agent/chat/hooks/useFileProcessing.js.map +1 -1
- package/lib/features/facets/AgentRunnerFacetsNav.d.ts.map +1 -1
- package/lib/features/facets/AgentRunnerFacetsNav.js +1 -1
- package/lib/features/facets/AgentRunnerFacetsNav.js.map +1 -1
- package/lib/features/facets/InteractionsFacetsNav.d.ts +10 -1
- package/lib/features/facets/InteractionsFacetsNav.d.ts.map +1 -1
- package/lib/features/facets/InteractionsFacetsNav.js +14 -5
- package/lib/features/facets/InteractionsFacetsNav.js.map +1 -1
- package/lib/features/facets/PromptsFacetsNav.d.ts.map +1 -1
- package/lib/features/facets/PromptsFacetsNav.js +12 -1
- package/lib/features/facets/PromptsFacetsNav.js.map +1 -1
- package/lib/features/facets/RunsFacetsNav.d.ts.map +1 -1
- package/lib/features/facets/RunsFacetsNav.js +1 -1
- package/lib/features/facets/RunsFacetsNav.js.map +1 -1
- package/lib/features/magic-pdf/AnnotatedImageSlider.d.ts.map +1 -1
- package/lib/features/magic-pdf/AnnotatedImageSlider.js +1 -3
- package/lib/features/magic-pdf/AnnotatedImageSlider.js.map +1 -1
- package/lib/features/magic-pdf/MagicPdfProvider.js +2 -3
- package/lib/features/magic-pdf/MagicPdfProvider.js.map +1 -1
- package/lib/features/store/objects/DocumentSearchResults.d.ts +6 -2
- package/lib/features/store/objects/DocumentSearchResults.d.ts.map +1 -1
- package/lib/features/store/objects/DocumentSearchResults.js +6 -6
- package/lib/features/store/objects/DocumentSearchResults.js.map +1 -1
- package/lib/features/store/objects/components/ContentOverview.js +1 -1
- package/lib/features/store/objects/components/ContentOverview.js.map +1 -1
- package/lib/features/store/objects/components/DocumentIcon.d.ts.map +1 -1
- package/lib/features/store/objects/components/DocumentIcon.js +1 -1
- package/lib/features/store/objects/components/DocumentIcon.js.map +1 -1
- package/lib/features/store/objects/components/DocumentInput.js.map +1 -1
- package/lib/features/store/objects/search/DocumentSearchContext.d.ts +4 -4
- package/lib/features/store/objects/search/DocumentSearchContext.d.ts.map +1 -1
- package/lib/features/store/objects/search/DocumentSearchContext.js +1 -1
- package/lib/features/store/objects/search/DocumentSearchContext.js.map +1 -1
- package/lib/features/store/objects/selection/ObjectsActionContext.d.ts.map +1 -1
- package/lib/features/store/objects/selection/ObjectsActionContext.js +2 -25
- package/lib/features/store/objects/selection/ObjectsActionContext.js.map +1 -1
- package/lib/features/store/objects/selection/ObjectsActionContextClass.d.ts +0 -2
- package/lib/features/store/objects/selection/ObjectsActionContextClass.d.ts.map +1 -1
- package/lib/features/store/objects/selection/ObjectsActionContextClass.js +1 -7
- package/lib/features/store/objects/selection/ObjectsActionContextClass.js.map +1 -1
- package/lib/features/store/objects/selection/ObjectsActionHooks.d.ts +0 -1
- package/lib/features/store/objects/selection/ObjectsActionHooks.d.ts.map +1 -1
- package/lib/features/store/objects/selection/ObjectsActionHooks.js +0 -10
- package/lib/features/store/objects/selection/ObjectsActionHooks.js.map +1 -1
- package/lib/features/store/objects/selection/SelectionActions.d.ts +4 -0
- package/lib/features/store/objects/selection/SelectionActions.d.ts.map +1 -1
- package/lib/features/store/objects/selection/SelectionActions.js +4 -18
- package/lib/features/store/objects/selection/SelectionActions.js.map +1 -1
- package/lib/features/store/objects/selection/actions/DeleteObjectsAction.d.ts.map +1 -1
- package/lib/features/store/objects/selection/actions/DeleteObjectsAction.js +16 -7
- package/lib/features/store/objects/selection/actions/DeleteObjectsAction.js.map +1 -1
- package/lib/features/store/objects/selection/actions/StartWorkflowButton.d.ts +7 -0
- package/lib/features/store/objects/selection/actions/StartWorkflowButton.d.ts.map +1 -0
- package/lib/features/store/objects/selection/actions/StartWorkflowButton.js +51 -0
- package/lib/features/store/objects/selection/actions/StartWorkflowButton.js.map +1 -0
- package/lib/features/store/objects/selection/actions/index.d.ts +0 -1
- package/lib/features/store/objects/selection/actions/index.d.ts.map +1 -1
- package/lib/features/store/objects/selection/actions/index.js +0 -1
- package/lib/features/store/objects/selection/actions/index.js.map +1 -1
- package/lib/features/store/types/ContentObjectTypesSearch.d.ts.map +1 -1
- package/lib/features/store/types/ContentObjectTypesSearch.js +55 -3
- package/lib/features/store/types/ContentObjectTypesSearch.js.map +1 -1
- package/lib/features/store/types/ContentObjectTypesTable.d.ts +5 -1
- package/lib/features/store/types/ContentObjectTypesTable.d.ts.map +1 -1
- package/lib/features/store/types/ContentObjectTypesTable.js +4 -2
- package/lib/features/store/types/ContentObjectTypesTable.js.map +1 -1
- package/lib/features/store/types/search/ObjectTypeSearchContext.js +1 -1
- package/lib/features/store/types/search/ObjectTypeSearchContext.js.map +1 -1
- package/lib/i18n/locales/ar.json +17 -0
- package/lib/i18n/locales/de.json +17 -0
- package/lib/i18n/locales/en.json +33 -0
- package/lib/i18n/locales/es.json +17 -0
- package/lib/i18n/locales/fr.json +17 -0
- package/lib/i18n/locales/it.json +17 -0
- package/lib/i18n/locales/ja.json +17 -0
- package/lib/i18n/locales/ko.json +17 -0
- package/lib/i18n/locales/pt.json +17 -0
- package/lib/i18n/locales/ru.json +17 -0
- package/lib/i18n/locales/tr.json +17 -0
- package/lib/i18n/locales/zh-TW.json +17 -0
- package/lib/i18n/locales/zh.json +17 -0
- package/lib/layout/Sidebar.d.ts +5 -1
- package/lib/layout/Sidebar.d.ts.map +1 -1
- package/lib/layout/Sidebar.js.map +1 -1
- package/lib/router/NestedRouterProvider.d.ts +1 -1
- package/lib/router/NestedRouterProvider.d.ts.map +1 -1
- package/lib/router/NestedRouterProvider.js +2 -2
- package/lib/router/NestedRouterProvider.js.map +1 -1
- package/lib/router/Redirect.d.ts +13 -0
- package/lib/router/Redirect.d.ts.map +1 -0
- package/lib/router/Redirect.js +20 -0
- package/lib/router/Redirect.js.map +1 -0
- package/lib/router/Router.d.ts.map +1 -1
- package/lib/router/Router.js +1 -2
- package/lib/router/Router.js.map +1 -1
- package/lib/router/index.d.ts +1 -0
- package/lib/router/index.d.ts.map +1 -1
- package/lib/router/index.js +1 -0
- package/lib/router/index.js.map +1 -1
- package/lib/session/DevSessionProvider.d.ts +8 -0
- package/lib/session/DevSessionProvider.d.ts.map +1 -0
- package/lib/session/DevSessionProvider.js +33 -0
- package/lib/session/DevSessionProvider.js.map +1 -0
- package/lib/session/UserSessionProvider.d.ts.map +1 -1
- package/lib/session/UserSessionProvider.js +16 -2
- package/lib/session/UserSessionProvider.js.map +1 -1
- package/lib/session/auth/composable.d.ts +10 -1
- package/lib/session/auth/composable.d.ts.map +1 -1
- package/lib/session/auth/composable.js +38 -2
- package/lib/session/auth/composable.js.map +1 -1
- package/lib/session/index.d.ts +1 -0
- package/lib/session/index.d.ts.map +1 -1
- package/lib/session/index.js +1 -0
- package/lib/session/index.js.map +1 -1
- package/lib/shell/VertesiaShell.d.ts +3 -1
- package/lib/shell/VertesiaShell.d.ts.map +1 -1
- package/lib/shell/VertesiaShell.js +5 -4
- package/lib/shell/VertesiaShell.js.map +1 -1
- package/lib/shell/login/SignInRestrictedEnvStep.d.ts +14 -0
- package/lib/shell/login/SignInRestrictedEnvStep.d.ts.map +1 -0
- package/lib/shell/login/SignInRestrictedEnvStep.js +50 -0
- package/lib/shell/login/SignInRestrictedEnvStep.js.map +1 -0
- package/lib/shell/login/SigninScreen.d.ts.map +1 -1
- package/lib/shell/login/SigninScreen.js +16 -3
- package/lib/shell/login/SigninScreen.js.map +1 -1
- package/lib/shell/login/productionUrl.d.ts +16 -0
- package/lib/shell/login/productionUrl.d.ts.map +1 -0
- package/lib/shell/login/productionUrl.js +19 -0
- package/lib/shell/login/productionUrl.js.map +1 -0
- package/lib/shell/login/signInUtils.d.ts.map +1 -1
- package/lib/shell/login/signInUtils.js +14 -1
- package/lib/shell/login/signInUtils.js.map +1 -1
- package/lib/vertesia-ui-core.js +95 -2
- package/lib/vertesia-ui-core.js.map +1 -1
- package/lib/vertesia-ui-env.js +2 -2
- package/lib/vertesia-ui-env.js.map +1 -1
- package/lib/vertesia-ui-features.js +454 -2
- package/lib/vertesia-ui-features.js.map +1 -1
- package/lib/vertesia-ui-i18n.js +41 -2
- package/lib/vertesia-ui-i18n.js.map +1 -1
- package/lib/vertesia-ui-layout.js +2 -2
- package/lib/vertesia-ui-layout.js.map +1 -1
- package/lib/vertesia-ui-router.js +2 -2
- package/lib/vertesia-ui-router.js.map +1 -1
- package/lib/vertesia-ui-session.js +2 -2
- package/lib/vertesia-ui-session.js.map +1 -1
- package/lib/vertesia-ui-shell.js +2 -2
- package/lib/vertesia-ui-shell.js.map +1 -1
- package/lib/vertesia-ui-widgets.js +9 -2
- package/lib/vertesia-ui-widgets.js.map +1 -1
- package/lib/widgets/json-view/JSONCode.d.ts.map +1 -1
- package/lib/widgets/json-view/JSONCode.js +1 -1
- package/lib/widgets/json-view/JSONCode.js.map +1 -1
- package/lib/widgets/json-view/JSONTable.d.ts.map +1 -1
- package/lib/widgets/json-view/JSONTable.js +1 -1
- package/lib/widgets/json-view/JSONTable.js.map +1 -1
- package/lib/widgets/markdown/ArtifactContentRenderer.d.ts.map +1 -1
- package/lib/widgets/markdown/ArtifactContentRenderer.js +1 -1
- package/lib/widgets/markdown/ArtifactContentRenderer.js.map +1 -1
- package/lib/widgets/markdown/CodeBlockPlaceholder.d.ts.map +1 -1
- package/lib/widgets/markdown/CodeBlockPlaceholder.js +1 -1
- package/lib/widgets/markdown/CodeBlockPlaceholder.js.map +1 -1
- package/lib/widgets/monacoEditor/foldingProviders.d.ts.map +1 -1
- package/lib/widgets/monacoEditor/foldingProviders.js +5 -10
- package/lib/widgets/monacoEditor/foldingProviders.js.map +1 -1
- package/lib/widgets/schema-editor/ManagedSchema.d.ts.map +1 -1
- package/lib/widgets/schema-editor/ManagedSchema.js +1 -2
- package/lib/widgets/schema-editor/ManagedSchema.js.map +1 -1
- package/lib/widgets/upload/UploadResultCategory.d.ts.map +1 -1
- package/lib/widgets/upload/UploadResultCategory.js +1 -1
- package/lib/widgets/upload/UploadResultCategory.js.map +1 -1
- package/lib/widgets/xml-viewer/components/TextElement/index.d.ts.map +1 -1
- package/lib/widgets/xml-viewer/components/TextElement/index.js +1 -1
- package/lib/widgets/xml-viewer/components/TextElement/index.js.map +1 -1
- package/package.json +38 -43
- package/src/core/components/InputList.tsx +5 -10
- package/src/core/components/SelectList.tsx +7 -2
- package/src/core/components/TagsInput.tsx +41 -4
- package/src/core/components/popup/Popup.tsx +3 -3
- package/src/core/components/popup/position.ts +3 -6
- package/src/core/components/shadcn/badge.tsx +3 -0
- package/src/core/components/shadcn/breadcrumb.tsx +2 -4
- package/src/core/components/shadcn/filters/filterBar.tsx +2 -3
- package/src/core/components/shadcn/resizeable.test.tsx +77 -0
- package/src/core/components/shadcn/resizeable.tsx +28 -2
- package/src/core/components/shadcn/selectBox.tsx +70 -36
- package/src/core/components/table/index.tsx +1 -2
- package/src/core/hooks/useIntersectionObserver.tsx +3 -1
- package/src/features/agent/chat/AgentRightPanel.tsx +5 -6
- package/src/features/agent/chat/AnimatedThinkingDots.tsx +1 -2
- package/src/features/agent/chat/AskUserWidget.test.tsx +49 -0
- package/src/features/agent/chat/AskUserWidget.tsx +32 -22
- package/src/features/agent/chat/ModernAgentConversation.test.tsx +198 -1
- package/src/features/agent/chat/ModernAgentConversation.tsx +62 -15
- package/src/features/agent/chat/ModernAgentOutput/AllMessagesMixed.tsx +60 -34
- package/src/features/agent/chat/ModernAgentOutput/InlineSlidingPlanPanel.tsx +3 -3
- package/src/features/agent/chat/ModernAgentOutput/MessageInput.test.tsx +25 -0
- package/src/features/agent/chat/ModernAgentOutput/MessageInput.tsx +5 -1
- package/src/features/agent/chat/ModernAgentOutput/MessageItem.tsx +30 -30
- package/src/features/agent/chat/ModernAgentOutput/PlanPanel.tsx +5 -6
- package/src/features/agent/chat/ModernAgentOutput/SlidingPlanPanel.tsx +4 -5
- package/src/features/agent/chat/ModernAgentOutput/ToolCallGroup.tsx +3 -5
- package/src/features/agent/chat/ModernAgentOutput/WorkstreamTabs.tsx +326 -42
- package/src/features/agent/chat/hooks/useFileProcessing.test.tsx +70 -0
- package/src/features/agent/chat/hooks/useFileProcessing.ts +37 -6
- package/src/features/facets/AgentRunnerFacetsNav.tsx +1 -2
- package/src/features/facets/InteractionsFacetsNav.tsx +30 -5
- package/src/features/facets/PromptsFacetsNav.tsx +13 -1
- package/src/features/facets/RunsFacetsNav.tsx +1 -2
- package/src/features/magic-pdf/AnnotatedImageSlider.tsx +1 -2
- package/src/features/magic-pdf/MagicPdfProvider.tsx +4 -4
- package/src/features/store/objects/DocumentSearchResults.tsx +11 -1
- package/src/features/store/objects/components/ContentOverview.tsx +1 -2
- package/src/features/store/objects/components/DocumentIcon.tsx +1 -2
- package/src/features/store/objects/components/DocumentInput.tsx +2 -2
- package/src/features/store/objects/search/DocumentSearchContext.test.ts +2 -2
- package/src/features/store/objects/search/DocumentSearchContext.ts +3 -3
- package/src/features/store/objects/selection/ObjectsActionContext.tsx +2 -27
- package/src/features/store/objects/selection/ObjectsActionContextClass.ts +1 -7
- package/src/features/store/objects/selection/ObjectsActionHooks.ts +0 -11
- package/src/features/store/objects/selection/SelectionActions.tsx +9 -34
- package/src/features/store/objects/selection/actions/DeleteObjectsAction.tsx +40 -7
- package/src/features/store/objects/selection/actions/StartWorkflowButton.tsx +104 -0
- package/src/features/store/objects/selection/actions/index.ts +0 -1
- package/src/features/store/types/ContentObjectTypesSearch.tsx +110 -1
- package/src/features/store/types/ContentObjectTypesTable.tsx +42 -3
- package/src/features/store/types/search/ObjectTypeSearchContext.tsx +1 -1
- package/src/i18n/locales/ar.json +17 -0
- package/src/i18n/locales/de.json +17 -0
- package/src/i18n/locales/en.json +33 -0
- package/src/i18n/locales/es.json +17 -0
- package/src/i18n/locales/fr.json +17 -0
- package/src/i18n/locales/it.json +17 -0
- package/src/i18n/locales/ja.json +17 -0
- package/src/i18n/locales/ko.json +17 -0
- package/src/i18n/locales/pt.json +17 -0
- package/src/i18n/locales/ru.json +17 -0
- package/src/i18n/locales/tr.json +17 -0
- package/src/i18n/locales/zh-TW.json +17 -0
- package/src/i18n/locales/zh.json +17 -0
- package/src/layout/Sidebar.tsx +6 -1
- package/src/router/NestedRouterProvider.tsx +2 -2
- package/src/router/Redirect.tsx +29 -0
- package/src/router/Router.tsx +1 -2
- package/src/router/index.ts +1 -0
- package/src/session/DevSessionProvider.tsx +46 -0
- package/src/session/UserSessionProvider.tsx +18 -2
- package/src/session/auth/composable.ts +41 -3
- package/src/session/index.ts +1 -0
- package/src/shell/VertesiaShell.tsx +27 -14
- package/src/shell/login/SignInRestrictedEnvStep.tsx +87 -0
- package/src/shell/login/SigninScreen.tsx +29 -16
- package/src/shell/login/productionUrl.test.ts +19 -0
- package/src/shell/login/productionUrl.ts +18 -0
- package/src/shell/login/signInUtils.ts +14 -1
- package/src/widgets/json-view/JSONCode.tsx +1 -2
- package/src/widgets/json-view/JSONTable.tsx +1 -2
- package/src/widgets/markdown/ArtifactContentRenderer.tsx +4 -7
- package/src/widgets/markdown/CodeBlockPlaceholder.tsx +1 -2
- package/src/widgets/monacoEditor/foldingProviders.ts +10 -15
- package/src/widgets/schema-editor/ManagedSchema.ts +1 -2
- package/src/widgets/upload/UploadResultCategory.tsx +2 -3
- package/src/widgets/xml-viewer/components/TextElement/index.tsx +1 -2
- package/lib/features/store/objects/selection/actions/StartWorkflowComponent.d.ts +0 -4
- package/lib/features/store/objects/selection/actions/StartWorkflowComponent.d.ts.map +0 -1
- package/lib/features/store/objects/selection/actions/StartWorkflowComponent.js +0 -77
- package/lib/features/store/objects/selection/actions/StartWorkflowComponent.js.map +0 -1
- package/src/features/store/objects/selection/actions/StartWorkflowComponent.tsx +0 -127
package/src/i18n/locales/ja.json
CHANGED
|
@@ -1,4 +1,13 @@
|
|
|
1
1
|
{
|
|
2
|
+
"abac_perms.collection.content_manager": "コレクション管理者",
|
|
3
|
+
"abac_perms.collection.content_reader": "コレクション閲覧者",
|
|
4
|
+
"abac_perms.collection.content_writer": "コレクション編集者",
|
|
5
|
+
"abac_perms.document.content_manager": "コンテンツ管理者",
|
|
6
|
+
"abac_perms.document.content_reader": "コンテンツ閲覧者",
|
|
7
|
+
"abac_perms.document.content_writer": "コンテンツ編集者",
|
|
8
|
+
"abac_perms.scope.collection": "コレクション",
|
|
9
|
+
"abac_perms.scope.document": "ドキュメント",
|
|
10
|
+
"abac_perms.scope.task": "タスク",
|
|
2
11
|
"agent.activeWorkstreams_one": "エージェントは{{count}}つのアクティブなワークストリームを実行中",
|
|
3
12
|
"agent.activeWorkstreams_other": "エージェントは{{count}}つのアクティブなワークストリームを実行中",
|
|
4
13
|
"agent.addAttachment": "添付ファイルを追加",
|
|
@@ -226,6 +235,14 @@
|
|
|
226
235
|
"auth.providers.bodyConsumer": "続行するには、以下のプロバイダーのいずれかを選択してください。",
|
|
227
236
|
"auth.providers.eyebrow": "サインイン方法を選択",
|
|
228
237
|
"auth.providers.title": "あと一歩です",
|
|
238
|
+
"auth.restricted.autoRedirect": "{{seconds}} 秒後にメインサイトへ移動します…",
|
|
239
|
+
"auth.restricted.body": "このサイトは、新機能や修正への早期アクセス権を持つユーザーに限定されています。メインサイトに進むか、このサイトへの早期アクセスについて Vertesia にお問い合わせください。",
|
|
240
|
+
"auth.restricted.calloutMeta": "早期アクセスについては Vertesia にお問い合わせください",
|
|
241
|
+
"auth.restricted.calloutTitle": "早期アクセスが必要です",
|
|
242
|
+
"auth.restricted.eyebrow": "制限付きサイト",
|
|
243
|
+
"auth.restricted.redirect": "メインサイトへ移動",
|
|
244
|
+
"auth.restricted.title": "アクセスが制限されています",
|
|
245
|
+
"auth.restricted.useDifferent": "別のメールアドレスを使う",
|
|
229
246
|
"auth.returning.body": "チームのプロジェクトはいつでも準備万端です。前回使用した方法で続けるか、別の方法に切り替えてください。",
|
|
230
247
|
"auth.returning.eyebrow": "Vertesia へお帰りなさい",
|
|
231
248
|
"auth.returning.notYou": "あなたではありませんか?",
|
package/src/i18n/locales/ko.json
CHANGED
|
@@ -1,4 +1,13 @@
|
|
|
1
1
|
{
|
|
2
|
+
"abac_perms.collection.content_manager": "컬렉션 관리자",
|
|
3
|
+
"abac_perms.collection.content_reader": "컬렉션 열람자",
|
|
4
|
+
"abac_perms.collection.content_writer": "컬렉션 편집자",
|
|
5
|
+
"abac_perms.document.content_manager": "콘텐츠 관리자",
|
|
6
|
+
"abac_perms.document.content_reader": "콘텐츠 열람자",
|
|
7
|
+
"abac_perms.document.content_writer": "콘텐츠 편집자",
|
|
8
|
+
"abac_perms.scope.collection": "컬렉션",
|
|
9
|
+
"abac_perms.scope.document": "문서",
|
|
10
|
+
"abac_perms.scope.task": "작업",
|
|
2
11
|
"agent.activeWorkstreams_one": "에이전트가 {{count}}개의 활성 워크스트림을 실행 중",
|
|
3
12
|
"agent.activeWorkstreams_other": "에이전트가 {{count}}개의 활성 워크스트림을 실행 중",
|
|
4
13
|
"agent.addAttachment": "첨부 파일 추가",
|
|
@@ -226,6 +235,14 @@
|
|
|
226
235
|
"auth.providers.bodyConsumer": "계속하려면 아래 공급자 중 하나를 선택하세요.",
|
|
227
236
|
"auth.providers.eyebrow": "로그인 방법 선택",
|
|
228
237
|
"auth.providers.title": "한 단계만 더",
|
|
238
|
+
"auth.restricted.autoRedirect": "{{seconds}}초 후 메인 사이트로 이동합니다…",
|
|
239
|
+
"auth.restricted.body": "이 사이트는 새로운 기능 및 수정 사항에 대한 얼리 액세스 권한이 있는 사용자로 제한됩니다. 메인 사이트로 계속하거나 이 사이트에 대한 얼리 액세스에 관해 Vertesia에 문의하세요.",
|
|
240
|
+
"auth.restricted.calloutMeta": "얼리 액세스는 Vertesia에 문의하세요",
|
|
241
|
+
"auth.restricted.calloutTitle": "얼리 액세스 필요",
|
|
242
|
+
"auth.restricted.eyebrow": "제한된 사이트",
|
|
243
|
+
"auth.restricted.redirect": "메인 사이트로 이동",
|
|
244
|
+
"auth.restricted.title": "액세스가 제한됨",
|
|
245
|
+
"auth.restricted.useDifferent": "다른 이메일 사용",
|
|
229
246
|
"auth.returning.body": "팀 프로젝트가 준비되어 있습니다. 마지막에 사용한 방법으로 계속하거나 다른 방법을 선택하세요.",
|
|
230
247
|
"auth.returning.eyebrow": "Vertesia 에 다시 오신 것을 환영합니다",
|
|
231
248
|
"auth.returning.notYou": "본인이 아니신가요?",
|
package/src/i18n/locales/pt.json
CHANGED
|
@@ -1,4 +1,13 @@
|
|
|
1
1
|
{
|
|
2
|
+
"abac_perms.collection.content_manager": "Gerenciador de coleção",
|
|
3
|
+
"abac_perms.collection.content_reader": "Leitor de coleção",
|
|
4
|
+
"abac_perms.collection.content_writer": "Editor de coleção",
|
|
5
|
+
"abac_perms.document.content_manager": "Gerenciador de conteúdo",
|
|
6
|
+
"abac_perms.document.content_reader": "Leitor de conteúdo",
|
|
7
|
+
"abac_perms.document.content_writer": "Editor de conteúdo",
|
|
8
|
+
"abac_perms.scope.collection": "Coleção",
|
|
9
|
+
"abac_perms.scope.document": "Documento",
|
|
10
|
+
"abac_perms.scope.task": "Tarefa",
|
|
2
11
|
"agent.activeWorkstreams_one": "O agente tem {{count}} fluxo de trabalho ativo em execução",
|
|
3
12
|
"agent.activeWorkstreams_many": "O agente tem {{count}} fluxos de trabalho ativos em execução",
|
|
4
13
|
"agent.activeWorkstreams_other": "O agente tem {{count}} fluxos de trabalho ativos em execução",
|
|
@@ -228,6 +237,14 @@
|
|
|
228
237
|
"auth.providers.bodyConsumer": "Escolha um dos provedores abaixo para continuar.",
|
|
229
238
|
"auth.providers.eyebrow": "Escolha como entrar",
|
|
230
239
|
"auth.providers.title": "Mais um passo",
|
|
240
|
+
"auth.restricted.autoRedirect": "Redirecionando para o site principal em {{seconds}} s…",
|
|
241
|
+
"auth.restricted.body": "Este site é restrito a usuários com acesso antecipado a novos recursos e correções. Continue para o site principal ou entre em contato com a Vertesia sobre o acesso antecipado a este site.",
|
|
242
|
+
"auth.restricted.calloutMeta": "Entre em contato com a Vertesia para acesso antecipado",
|
|
243
|
+
"auth.restricted.calloutTitle": "Acesso antecipado necessário",
|
|
244
|
+
"auth.restricted.eyebrow": "Site restrito",
|
|
245
|
+
"auth.restricted.redirect": "Ir para o site principal",
|
|
246
|
+
"auth.restricted.title": "Acesso restrito",
|
|
247
|
+
"auth.restricted.useDifferent": "Usar outro e-mail",
|
|
231
248
|
"auth.returning.body": "O projeto da sua equipe está pronto quando você estiver. Continue com o último método usado, ou mude.",
|
|
232
249
|
"auth.returning.eyebrow": "Retornando ao Vertesia",
|
|
233
250
|
"auth.returning.notYou": "Não é você?",
|
package/src/i18n/locales/ru.json
CHANGED
|
@@ -1,4 +1,13 @@
|
|
|
1
1
|
{
|
|
2
|
+
"abac_perms.collection.content_manager": "Менеджер коллекций",
|
|
3
|
+
"abac_perms.collection.content_reader": "Читатель коллекций",
|
|
4
|
+
"abac_perms.collection.content_writer": "Редактор коллекций",
|
|
5
|
+
"abac_perms.document.content_manager": "Менеджер контента",
|
|
6
|
+
"abac_perms.document.content_reader": "Читатель контента",
|
|
7
|
+
"abac_perms.document.content_writer": "Редактор контента",
|
|
8
|
+
"abac_perms.scope.collection": "Коллекция",
|
|
9
|
+
"abac_perms.scope.document": "Документ",
|
|
10
|
+
"abac_perms.scope.task": "Задача",
|
|
2
11
|
"agent.activeWorkstreams_one": "У агента {{count}} активный рабочий поток",
|
|
3
12
|
"agent.activeWorkstreams_few": "У агента {{count}} активных рабочих потока",
|
|
4
13
|
"agent.activeWorkstreams_many": "У агента {{count}} активных рабочих потоков",
|
|
@@ -230,6 +239,14 @@
|
|
|
230
239
|
"auth.providers.bodyConsumer": "Выберите одного из провайдеров ниже, чтобы продолжить.",
|
|
231
240
|
"auth.providers.eyebrow": "Выберите способ входа",
|
|
232
241
|
"auth.providers.title": "Ещё один шаг",
|
|
242
|
+
"auth.restricted.autoRedirect": "Перенаправление на основной сайт через {{seconds}} с…",
|
|
243
|
+
"auth.restricted.body": "Этот сайт доступен только пользователям с ранним доступом к новым функциям и исправлениям. Перейдите на основной сайт или свяжитесь с Vertesia по вопросу раннего доступа к этому сайту.",
|
|
244
|
+
"auth.restricted.calloutMeta": "Свяжитесь с Vertesia для получения раннего доступа",
|
|
245
|
+
"auth.restricted.calloutTitle": "Требуется ранний доступ",
|
|
246
|
+
"auth.restricted.eyebrow": "Сайт с ограниченным доступом",
|
|
247
|
+
"auth.restricted.redirect": "Перейти на основной сайт",
|
|
248
|
+
"auth.restricted.title": "Доступ ограничен",
|
|
249
|
+
"auth.restricted.useDifferent": "Использовать другой адрес",
|
|
233
250
|
"auth.returning.body": "Проект вашей команды готов. Продолжите с последним использованным способом или смените его.",
|
|
234
251
|
"auth.returning.eyebrow": "Возвращение в Vertesia",
|
|
235
252
|
"auth.returning.notYou": "Это не вы?",
|
package/src/i18n/locales/tr.json
CHANGED
|
@@ -1,4 +1,13 @@
|
|
|
1
1
|
{
|
|
2
|
+
"abac_perms.collection.content_manager": "Koleksiyon Yöneticisi",
|
|
3
|
+
"abac_perms.collection.content_reader": "Koleksiyon Okuyucusu",
|
|
4
|
+
"abac_perms.collection.content_writer": "Koleksiyon Yazarı",
|
|
5
|
+
"abac_perms.document.content_manager": "İçerik Yöneticisi",
|
|
6
|
+
"abac_perms.document.content_reader": "İçerik Okuyucusu",
|
|
7
|
+
"abac_perms.document.content_writer": "İçerik Yazarı",
|
|
8
|
+
"abac_perms.scope.collection": "Koleksiyon",
|
|
9
|
+
"abac_perms.scope.document": "Belge",
|
|
10
|
+
"abac_perms.scope.task": "Görev",
|
|
2
11
|
"agent.activeWorkstreams_one": "Ajanın {{count}} aktif iş akışı çalışıyor",
|
|
3
12
|
"agent.activeWorkstreams_other": "Ajanın {{count}} aktif iş akışı çalışıyor",
|
|
4
13
|
"agent.addAttachment": "Ek dosya ekle",
|
|
@@ -226,6 +235,14 @@
|
|
|
226
235
|
"auth.providers.bodyConsumer": "Devam etmek için aşağıdaki sağlayıcılardan birini seçin.",
|
|
227
236
|
"auth.providers.eyebrow": "Oturum açma yöntemini seç",
|
|
228
237
|
"auth.providers.title": "Bir adım daha",
|
|
238
|
+
"auth.restricted.autoRedirect": "{{seconds}} sn içinde ana siteye yönlendiriliyorsunuz…",
|
|
239
|
+
"auth.restricted.body": "Bu site, yeni özelliklere ve düzeltmelere erken erişimi olan kullanıcılarla sınırlıdır. Lütfen ana siteye devam edin veya bu siteye erken erişim hakkında Vertesia ile iletişime geçin.",
|
|
240
|
+
"auth.restricted.calloutMeta": "Erken erişim için Vertesia ile iletişime geçin",
|
|
241
|
+
"auth.restricted.calloutTitle": "Erken erişim gerekli",
|
|
242
|
+
"auth.restricted.eyebrow": "Kısıtlı site",
|
|
243
|
+
"auth.restricted.redirect": "Ana siteye git",
|
|
244
|
+
"auth.restricted.title": "Erişim kısıtlı",
|
|
245
|
+
"auth.restricted.useDifferent": "Farklı bir e-posta kullan",
|
|
229
246
|
"auth.returning.body": "Ekibinizin projesi siz hazır olduğunuzda hazır. Son kullandığınız yöntemle devam edin veya yöntemi değiştirin.",
|
|
230
247
|
"auth.returning.eyebrow": "Vertesia'ya tekrar hoş geldiniz",
|
|
231
248
|
"auth.returning.notYou": "Siz değil misiniz?",
|
|
@@ -1,4 +1,13 @@
|
|
|
1
1
|
{
|
|
2
|
+
"abac_perms.collection.content_manager": "集合管理員",
|
|
3
|
+
"abac_perms.collection.content_reader": "集合檢視者",
|
|
4
|
+
"abac_perms.collection.content_writer": "集合編輯者",
|
|
5
|
+
"abac_perms.document.content_manager": "內容管理員",
|
|
6
|
+
"abac_perms.document.content_reader": "內容檢視者",
|
|
7
|
+
"abac_perms.document.content_writer": "內容編輯者",
|
|
8
|
+
"abac_perms.scope.collection": "集合",
|
|
9
|
+
"abac_perms.scope.document": "文件",
|
|
10
|
+
"abac_perms.scope.task": "任務",
|
|
2
11
|
"agent.activeWorkstreams_one": "代理有{{count}}個活躍的工作流正在運行",
|
|
3
12
|
"agent.activeWorkstreams_other": "代理有{{count}}個活躍的工作流正在運行",
|
|
4
13
|
"agent.addAttachment": "新增附件",
|
|
@@ -226,6 +235,14 @@
|
|
|
226
235
|
"auth.providers.bodyConsumer": "請從下方提供者中選擇一個繼續。",
|
|
227
236
|
"auth.providers.eyebrow": "選擇登入方式",
|
|
228
237
|
"auth.providers.title": "再一步",
|
|
238
|
+
"auth.restricted.autoRedirect": "{{seconds}} 秒後前往主網站…",
|
|
239
|
+
"auth.restricted.body": "本網站僅限擁有新功能和修復搶先體驗權限的使用者使用。請繼續前往主網站,或就此網站的搶先體驗事宜聯絡 Vertesia。",
|
|
240
|
+
"auth.restricted.calloutMeta": "聯絡 Vertesia 取得搶先體驗權限",
|
|
241
|
+
"auth.restricted.calloutTitle": "需要搶先體驗權限",
|
|
242
|
+
"auth.restricted.eyebrow": "受限網站",
|
|
243
|
+
"auth.restricted.redirect": "前往主網站",
|
|
244
|
+
"auth.restricted.title": "存取受限",
|
|
245
|
+
"auth.restricted.useDifferent": "使用其他電子郵件",
|
|
229
246
|
"auth.returning.body": "團隊專案隨時為您準備就緒。繼續使用上次的方式,或更換其他方式。",
|
|
230
247
|
"auth.returning.eyebrow": "回到 Vertesia",
|
|
231
248
|
"auth.returning.notYou": "不是您?",
|
package/src/i18n/locales/zh.json
CHANGED
|
@@ -1,4 +1,13 @@
|
|
|
1
1
|
{
|
|
2
|
+
"abac_perms.collection.content_manager": "集合管理员",
|
|
3
|
+
"abac_perms.collection.content_reader": "集合查看者",
|
|
4
|
+
"abac_perms.collection.content_writer": "集合编辑者",
|
|
5
|
+
"abac_perms.document.content_manager": "内容管理员",
|
|
6
|
+
"abac_perms.document.content_reader": "内容查看者",
|
|
7
|
+
"abac_perms.document.content_writer": "内容编辑者",
|
|
8
|
+
"abac_perms.scope.collection": "集合",
|
|
9
|
+
"abac_perms.scope.document": "文档",
|
|
10
|
+
"abac_perms.scope.task": "任务",
|
|
2
11
|
"agent.activeWorkstreams_one": "代理有{{count}}个活跃的工作流正在运行",
|
|
3
12
|
"agent.activeWorkstreams_other": "代理有{{count}}个活跃的工作流正在运行",
|
|
4
13
|
"agent.addAttachment": "添加附件",
|
|
@@ -226,6 +235,14 @@
|
|
|
226
235
|
"auth.providers.bodyConsumer": "请从下方提供商中选择一个继续。",
|
|
227
236
|
"auth.providers.eyebrow": "选择登录方式",
|
|
228
237
|
"auth.providers.title": "再一步",
|
|
238
|
+
"auth.restricted.autoRedirect": "{{seconds}} 秒后前往主站点…",
|
|
239
|
+
"auth.restricted.body": "本站点仅限拥有新功能和修复抢先体验权限的用户使用。请继续前往主站点,或就此站点的抢先体验事宜联系 Vertesia。",
|
|
240
|
+
"auth.restricted.calloutMeta": "联系 Vertesia 获取抢先体验权限",
|
|
241
|
+
"auth.restricted.calloutTitle": "需要抢先体验权限",
|
|
242
|
+
"auth.restricted.eyebrow": "受限站点",
|
|
243
|
+
"auth.restricted.redirect": "前往主站点",
|
|
244
|
+
"auth.restricted.title": "访问受限",
|
|
245
|
+
"auth.restricted.useDifferent": "使用其他邮箱",
|
|
229
246
|
"auth.returning.body": "团队项目随时为您准备就绪。继续使用上次的方式,或更换其他方式。",
|
|
230
247
|
"auth.returning.eyebrow": "回到 Vertesia",
|
|
231
248
|
"auth.returning.notYou": "不是您?",
|
package/src/layout/Sidebar.tsx
CHANGED
|
@@ -70,10 +70,15 @@ export function SidebarTooltip({ children, text }: { children: React.ReactNode;
|
|
|
70
70
|
);
|
|
71
71
|
}
|
|
72
72
|
|
|
73
|
+
export interface SidebarItemIconProps {
|
|
74
|
+
className?: string;
|
|
75
|
+
'aria-hidden'?: boolean | 'true' | 'false';
|
|
76
|
+
}
|
|
77
|
+
|
|
73
78
|
export interface SidebarItemProps {
|
|
74
79
|
href: string;
|
|
75
80
|
to?: string;
|
|
76
|
-
icon?: React.ComponentType<
|
|
81
|
+
icon?: React.ComponentType<SidebarItemIconProps>;
|
|
77
82
|
current?: boolean;
|
|
78
83
|
onClick?: (event: React.MouseEvent<HTMLAnchorElement, MouseEvent>) => void;
|
|
79
84
|
children: React.ReactNode | React.ReactNode[];
|
|
@@ -46,12 +46,12 @@ export function NestedRouterProvider({ routes, index, children, fixLinks = false
|
|
|
46
46
|
: (elem: React.ReactNode) => elem;
|
|
47
47
|
|
|
48
48
|
return (
|
|
49
|
+
nestedRouter &&
|
|
49
50
|
nestedRouteMatch && (
|
|
50
51
|
<ReactRouterContext.Provider
|
|
51
52
|
value={{
|
|
52
53
|
...ctx,
|
|
53
|
-
|
|
54
|
-
router: nestedRouter!,
|
|
54
|
+
router: nestedRouter,
|
|
55
55
|
route: nestedRouteMatch.value,
|
|
56
56
|
params: nestedRouteMatch.params,
|
|
57
57
|
matchedRoutePath: `/${nestedRouteMatch.matchedSegments.join('/')}`,
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { useEffect } from 'react';
|
|
2
|
+
import type { NavigateOptions } from './HistoryNavigator';
|
|
3
|
+
import { useNavigate } from './Router';
|
|
4
|
+
|
|
5
|
+
export interface RedirectProps {
|
|
6
|
+
to: string;
|
|
7
|
+
replace?: boolean;
|
|
8
|
+
state?: unknown;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export function Redirect({ to, replace = true, state }: RedirectProps) {
|
|
12
|
+
const navigate = useNavigate();
|
|
13
|
+
|
|
14
|
+
useEffect(() => {
|
|
15
|
+
navigate(to, { replace, state });
|
|
16
|
+
}, [navigate, replace, state, to]);
|
|
17
|
+
|
|
18
|
+
return null;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Creates a route component that redirects to another route when rendered.
|
|
23
|
+
* Useful in route tables, for example: `{ path: '/', Component: redirectTo('/content') }`.
|
|
24
|
+
*/
|
|
25
|
+
export function redirectTo(to: string, options: Pick<NavigateOptions, 'replace' | 'state'> = {}) {
|
|
26
|
+
return function RedirectRoute() {
|
|
27
|
+
return <Redirect to={to} replace={options.replace} state={options.state} />;
|
|
28
|
+
};
|
|
29
|
+
}
|
package/src/router/Router.tsx
CHANGED
|
@@ -40,8 +40,7 @@ export abstract class BaseRouter {
|
|
|
40
40
|
|
|
41
41
|
match(path: string): PathMatch<Route> | null {
|
|
42
42
|
const useIndex = isRootPath(path) && this.index;
|
|
43
|
-
|
|
44
|
-
return this.matcher.match(useIndex ? this.index! : path);
|
|
43
|
+
return this.matcher.match(useIndex || path);
|
|
45
44
|
}
|
|
46
45
|
|
|
47
46
|
abstract navigate(path: string, options?: NavigateOptions): void;
|
package/src/router/index.ts
CHANGED
|
@@ -5,6 +5,7 @@ export * from './NestedNavigationContext.js';
|
|
|
5
5
|
export * from './NestedRouterProvider.js';
|
|
6
6
|
export * from './PathMatcher.js';
|
|
7
7
|
export * as Path from './path.js';
|
|
8
|
+
export * from './Redirect.js';
|
|
8
9
|
export * from './RouteComponent.js';
|
|
9
10
|
export * from './Router.js';
|
|
10
11
|
export * from './RouterProvider.js';
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { AuthTokenPayload } from '@vertesia/common';
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
3
|
+
import { useMemo } from 'react';
|
|
4
|
+
import { LastSelectedAccountId_KEY, LastSelectedProjectId_KEY } from './constants';
|
|
5
|
+
import { UserSession, UserSessionContext } from './UserSession';
|
|
6
|
+
|
|
7
|
+
function decodeJwtPayload(token: string): AuthTokenPayload {
|
|
8
|
+
const [, payload] = token.split('.');
|
|
9
|
+
if (!payload) {
|
|
10
|
+
throw new Error('Invalid Vertesia auth token');
|
|
11
|
+
}
|
|
12
|
+
const padded = payload
|
|
13
|
+
.replace(/-/g, '+')
|
|
14
|
+
.replace(/_/g, '/')
|
|
15
|
+
.padEnd(Math.ceil(payload.length / 4) * 4, '=');
|
|
16
|
+
return JSON.parse(atob(padded)) as AuthTokenPayload;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
interface DevSessionProviderProps {
|
|
20
|
+
children: ReactNode;
|
|
21
|
+
token: string;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export function DevSessionProvider({ children, token }: DevSessionProviderProps) {
|
|
25
|
+
const session = useMemo(() => {
|
|
26
|
+
const next = new UserSession();
|
|
27
|
+
next.isLoading = false;
|
|
28
|
+
|
|
29
|
+
try {
|
|
30
|
+
next.authToken = decodeJwtPayload(token);
|
|
31
|
+
next.client.withAuthCallback(() => Promise.resolve(`Bearer ${token}`));
|
|
32
|
+
|
|
33
|
+
localStorage.setItem(LastSelectedAccountId_KEY, next.authToken.account.id);
|
|
34
|
+
localStorage.setItem(
|
|
35
|
+
`${LastSelectedProjectId_KEY}-${next.authToken.account.id}`,
|
|
36
|
+
next.authToken.project?.id ?? '',
|
|
37
|
+
);
|
|
38
|
+
} catch (error: unknown) {
|
|
39
|
+
next.authError = error instanceof Error ? error : new Error(String(error));
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
return next.clone();
|
|
43
|
+
}, [token]);
|
|
44
|
+
|
|
45
|
+
return <UserSessionContext.Provider value={session}>{children}</UserSessionContext.Provider>;
|
|
46
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Env } from '@vertesia/ui/env';
|
|
2
2
|
import { onAuthStateChanged } from 'firebase/auth';
|
|
3
3
|
import { type ReactNode, useEffect, useRef, useState } from 'react';
|
|
4
|
-
import { getComposableToken, STSError, UserNotFoundError } from './auth/composable';
|
|
4
|
+
import { getComposableToken, RestrictedEnvironmentError, STSError, UserNotFoundError } from './auth/composable';
|
|
5
5
|
import { shouldRedirectToCentralAuth } from './auth/domainRouting';
|
|
6
6
|
import { getFirebaseAuth } from './auth/firebase';
|
|
7
7
|
import { useAuthState } from './auth/useAuthState';
|
|
@@ -91,6 +91,17 @@ export function UserSessionProvider({ children, loadOnboardingStatus = true }: U
|
|
|
91
91
|
return;
|
|
92
92
|
}
|
|
93
93
|
|
|
94
|
+
// Restricted environment (preview/preprod without early-access): surface the
|
|
95
|
+
// error so the sign-in screen shows the dedicated step. Redirecting to central
|
|
96
|
+
// auth here would loop, since the identity is valid but the environment is gated.
|
|
97
|
+
if (err instanceof RestrictedEnvironmentError) {
|
|
98
|
+
console.warn('Restricted environment - user lacks early-access', err);
|
|
99
|
+
session.isLoading = false;
|
|
100
|
+
session.authError = err;
|
|
101
|
+
setSession(session.clone());
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
|
|
94
105
|
if (err instanceof STSError) {
|
|
95
106
|
console.error('STS error during token exchange', err);
|
|
96
107
|
Env.logger.error('STS error during token exchange', {
|
|
@@ -184,7 +195,12 @@ export function UserSessionProvider({ children, loadOnboardingStatus = true }: U
|
|
|
184
195
|
error: err,
|
|
185
196
|
},
|
|
186
197
|
});
|
|
187
|
-
|
|
198
|
+
// Keep the Firebase session for UserNotFoundError (signup flow) and
|
|
199
|
+
// RestrictedEnvironmentError (identity is valid; the environment is gated).
|
|
200
|
+
// Logging out would retrigger onAuthStateChanged and clear the authError.
|
|
201
|
+
if (!(err instanceof UserNotFoundError) && !(err instanceof RestrictedEnvironmentError)) {
|
|
202
|
+
session.logout();
|
|
203
|
+
}
|
|
188
204
|
session.isLoading = false;
|
|
189
205
|
session.authError = err;
|
|
190
206
|
setSession(session.clone());
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Handle client caching and refresh of auth token
|
|
3
3
|
*/
|
|
4
|
-
import type
|
|
4
|
+
import { type AuthTokenPayload, RESTRICTED_ENVIRONMENT_ERROR_CODE } from '@vertesia/common';
|
|
5
5
|
import { Env } from '@vertesia/ui/env';
|
|
6
6
|
import { jwtDecode } from 'jwt-decode';
|
|
7
7
|
import { LastSelectedAccountId_KEY, LastSelectedProjectId_KEY } from '../constants';
|
|
@@ -174,6 +174,26 @@ export async function fetchComposableToken(
|
|
|
174
174
|
}
|
|
175
175
|
|
|
176
176
|
if (stsRes.status === 403) {
|
|
177
|
+
// Distinguish the "restricted environment" rejection (preview/preprod gated to
|
|
178
|
+
// early-access users) from the account-access 403 handled below. The STS tags it
|
|
179
|
+
// with a machine-readable business error code. Peek a clone so the body stays
|
|
180
|
+
// readable for the fall-through path.
|
|
181
|
+
const body = await stsRes
|
|
182
|
+
.clone()
|
|
183
|
+
.json()
|
|
184
|
+
.catch(() => undefined);
|
|
185
|
+
if (body?.errorCode === RESTRICTED_ENVIRONMENT_ERROR_CODE) {
|
|
186
|
+
Env.logger.warn('403: User lacks early-access for this restricted environment', {
|
|
187
|
+
vertesia: {
|
|
188
|
+
account_id: accountId,
|
|
189
|
+
project_id: projectId,
|
|
190
|
+
},
|
|
191
|
+
});
|
|
192
|
+
throw new RestrictedEnvironmentError(
|
|
193
|
+
body.message ?? "You don't have sufficient permission to visit unstable environments",
|
|
194
|
+
);
|
|
195
|
+
}
|
|
196
|
+
|
|
177
197
|
// User doesn't have access to the requested account/project, or has no accounts
|
|
178
198
|
// This can happen with:
|
|
179
199
|
// 1. Stale localStorage from previous user
|
|
@@ -233,8 +253,13 @@ export async function fetchComposableToken(
|
|
|
233
253
|
Env.logger.info('Successfully got token from STS');
|
|
234
254
|
return token;
|
|
235
255
|
} catch (error) {
|
|
236
|
-
if (
|
|
237
|
-
|
|
256
|
+
if (
|
|
257
|
+
error instanceof UserNotFoundError ||
|
|
258
|
+
error instanceof STSError ||
|
|
259
|
+
error instanceof RestrictedEnvironmentError
|
|
260
|
+
) {
|
|
261
|
+
// Re-throw typed auth errors to be handled separately in the caller
|
|
262
|
+
throw error;
|
|
238
263
|
}
|
|
239
264
|
|
|
240
265
|
// Clear any stale account/project from localStorage on error
|
|
@@ -356,3 +381,16 @@ export class STSError extends Error {
|
|
|
356
381
|
this.stsURL = stsURL;
|
|
357
382
|
}
|
|
358
383
|
}
|
|
384
|
+
|
|
385
|
+
/**
|
|
386
|
+
* Thrown when the STS rejects sign-in because the current environment (preview/preprod) is
|
|
387
|
+
* restricted to early-access users and this user lacks the `early-access` annotation. The
|
|
388
|
+
* sign-in screen renders a dedicated "restricted environment" step for this error.
|
|
389
|
+
* See docs/restrict-access-to-non-production-envs.md.
|
|
390
|
+
*/
|
|
391
|
+
export class RestrictedEnvironmentError extends Error {
|
|
392
|
+
constructor(message: string) {
|
|
393
|
+
super(message);
|
|
394
|
+
this.name = 'RestrictedEnvironmentError';
|
|
395
|
+
}
|
|
396
|
+
}
|
package/src/session/index.ts
CHANGED
|
@@ -2,6 +2,7 @@ export * from './auth/composable';
|
|
|
2
2
|
export * from './auth/firebase';
|
|
3
3
|
export * from './auth/useAuthState';
|
|
4
4
|
export * from './auth/useCurrentTenant';
|
|
5
|
+
export * from './DevSessionProvider';
|
|
5
6
|
export * from './UserSession';
|
|
6
7
|
export * from './UserSessionProvider';
|
|
7
8
|
export * from './useUXTracking';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ThemeProvider, ToastProvider } from '@vertesia/ui/core';
|
|
2
2
|
import { TypeRegistryProvider, UserPermissionProvider } from '@vertesia/ui/features';
|
|
3
3
|
import { LanguageBoundI18nProvider, LanguageProvider, type SupportedLanguage } from '@vertesia/ui/i18n';
|
|
4
|
-
import { UserSessionProvider } from '@vertesia/ui/session';
|
|
4
|
+
import { DevSessionProvider, UserSessionProvider } from '@vertesia/ui/session';
|
|
5
5
|
import type { ReactNode } from 'react';
|
|
6
6
|
import { SigninScreen } from './login/SigninScreen';
|
|
7
7
|
import { SplashScreen } from './SplashScreen';
|
|
@@ -14,6 +14,8 @@ interface VertesiaShellProps {
|
|
|
14
14
|
loadOnboardingStatus?: boolean;
|
|
15
15
|
preserveSignInPath?: boolean;
|
|
16
16
|
suppressSignInErrorPrefixes?: string | string[];
|
|
17
|
+
/** Use an already-issued Vertesia token instead of starting the normal sign-in flow. */
|
|
18
|
+
authToken?: string;
|
|
17
19
|
/** Force a default language. If omitted, falls back to localStorage then navigator.language then 'en'. */
|
|
18
20
|
defaultLanguage?: SupportedLanguage;
|
|
19
21
|
}
|
|
@@ -25,15 +27,16 @@ export function VertesiaShell({
|
|
|
25
27
|
loadOnboardingStatus,
|
|
26
28
|
preserveSignInPath,
|
|
27
29
|
suppressSignInErrorPrefixes,
|
|
30
|
+
authToken,
|
|
28
31
|
defaultLanguage,
|
|
29
32
|
}: VertesiaShellProps) {
|
|
30
|
-
|
|
31
|
-
<
|
|
32
|
-
<
|
|
33
|
-
<
|
|
34
|
-
<
|
|
35
|
-
|
|
36
|
-
|
|
33
|
+
const content = (
|
|
34
|
+
<TypeRegistryProvider>
|
|
35
|
+
<ThemeProvider defaultTheme="system" storageKey="vite-ui-theme">
|
|
36
|
+
<LanguageProvider defaultLanguage={defaultLanguage}>
|
|
37
|
+
<LanguageBoundI18nProvider>
|
|
38
|
+
{!authToken && (
|
|
39
|
+
<>
|
|
37
40
|
<SplashScreen icon={loadingIcon} />
|
|
38
41
|
<SigninScreen
|
|
39
42
|
allowedPrefix="/shared/"
|
|
@@ -42,12 +45,22 @@ export function VertesiaShell({
|
|
|
42
45
|
preservePath={preserveSignInPath}
|
|
43
46
|
suppressAuthErrorPrefix={suppressSignInErrorPrefixes}
|
|
44
47
|
/>
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
</
|
|
48
|
-
</
|
|
49
|
-
</
|
|
50
|
-
</
|
|
48
|
+
</>
|
|
49
|
+
)}
|
|
50
|
+
<UserPermissionProvider>{children}</UserPermissionProvider>
|
|
51
|
+
</LanguageBoundI18nProvider>
|
|
52
|
+
</LanguageProvider>
|
|
53
|
+
</ThemeProvider>
|
|
54
|
+
</TypeRegistryProvider>
|
|
55
|
+
);
|
|
56
|
+
|
|
57
|
+
return (
|
|
58
|
+
<ToastProvider>
|
|
59
|
+
{authToken ? (
|
|
60
|
+
<DevSessionProvider token={authToken}>{content}</DevSessionProvider>
|
|
61
|
+
) : (
|
|
62
|
+
<UserSessionProvider loadOnboardingStatus={loadOnboardingStatus}>{content}</UserSessionProvider>
|
|
63
|
+
)}
|
|
51
64
|
</ToastProvider>
|
|
52
65
|
);
|
|
53
66
|
}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { Env } from '@vertesia/ui/env';
|
|
2
|
+
import { useUITranslation } from '@vertesia/ui/i18n';
|
|
3
|
+
import { ShieldOff } from 'lucide-react';
|
|
4
|
+
import { useEffect, useState } from 'react';
|
|
5
|
+
import { getProductionAppUrl } from './productionUrl';
|
|
6
|
+
import { SignInCallout, SignInStepButton, SignInStepHeader, SignInStepLayout } from './SignInPrimitives';
|
|
7
|
+
import { resetSignInState } from './signInUtils';
|
|
8
|
+
|
|
9
|
+
interface SignInRestrictedEnvStepProps {
|
|
10
|
+
/** Return to the email-entry step to sign in with a different account. */
|
|
11
|
+
onUseDifferentEmail: () => void;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/** Seconds of inactivity on this screen before the user is redirected to production automatically. */
|
|
15
|
+
const AUTO_REDIRECT_SECONDS = 15;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Shown when the STS rejects sign-in because the current environment (preview/preprod) is
|
|
19
|
+
* restricted to early-access users. Offers a redirect to the production web application — in the
|
|
20
|
+
* user's own region — and a way to sign in with a different account. If the user takes no action, it
|
|
21
|
+
* redirects automatically after {@link AUTO_REDIRECT_SECONDS}. See
|
|
22
|
+
* docs/restrict-access-to-non-production-envs.md.
|
|
23
|
+
*/
|
|
24
|
+
export default function SignInRestrictedEnvStep({ onUseDifferentEmail }: SignInRestrictedEnvStepProps) {
|
|
25
|
+
const { t } = useUITranslation();
|
|
26
|
+
// Region-aware: send the user to their own region's production site, never another region's (an
|
|
27
|
+
// EU user must not be redirected to the US site). Falls back to the canonical site when unknown.
|
|
28
|
+
const productionUrl = getProductionAppUrl(Env.region);
|
|
29
|
+
const [secondsLeft, setSecondsLeft] = useState(AUTO_REDIRECT_SECONDS);
|
|
30
|
+
|
|
31
|
+
// Clear the rejected session (Firebase sign-out + cached login) once the screen is shown, so a
|
|
32
|
+
// page reload restarts the normal sign-in flow instead of re-triggering the STS 403 and landing
|
|
33
|
+
// straight back here. `mode` in SigninScreen is sticky, so clearing the session does not hide
|
|
34
|
+
// this screen in the current session.
|
|
35
|
+
useEffect(() => {
|
|
36
|
+
void resetSignInState();
|
|
37
|
+
}, []);
|
|
38
|
+
|
|
39
|
+
// Auto-redirect to production after AUTO_REDIRECT_SECONDS of inactivity. Taking an action —
|
|
40
|
+
// "Use a different email" unmounts this step, "Go to the main site" redirects immediately — runs
|
|
41
|
+
// the cleanup below and cancels the timer, so the automatic redirect only fires on inactivity.
|
|
42
|
+
useEffect(() => {
|
|
43
|
+
const redirect = setTimeout(() => {
|
|
44
|
+
window.location.href = productionUrl;
|
|
45
|
+
}, AUTO_REDIRECT_SECONDS * 1000);
|
|
46
|
+
const countdown = setInterval(() => {
|
|
47
|
+
setSecondsLeft((s) => (s > 0 ? s - 1 : 0));
|
|
48
|
+
}, 1000);
|
|
49
|
+
return () => {
|
|
50
|
+
clearTimeout(redirect);
|
|
51
|
+
clearInterval(countdown);
|
|
52
|
+
};
|
|
53
|
+
}, [productionUrl]);
|
|
54
|
+
|
|
55
|
+
return (
|
|
56
|
+
<SignInStepLayout>
|
|
57
|
+
<SignInStepHeader
|
|
58
|
+
variant="destructive"
|
|
59
|
+
eyebrow={t('auth.restricted.eyebrow')}
|
|
60
|
+
title={t('auth.restricted.title')}
|
|
61
|
+
body={t('auth.restricted.body')}
|
|
62
|
+
/>
|
|
63
|
+
|
|
64
|
+
<div className="flex flex-col gap-2">
|
|
65
|
+
<SignInCallout
|
|
66
|
+
icon={ShieldOff}
|
|
67
|
+
title={t('auth.restricted.calloutTitle')}
|
|
68
|
+
meta={t('auth.restricted.calloutMeta')}
|
|
69
|
+
/>
|
|
70
|
+
<SignInStepButton
|
|
71
|
+
className="w-full"
|
|
72
|
+
onClick={() => {
|
|
73
|
+
window.location.href = productionUrl;
|
|
74
|
+
}}
|
|
75
|
+
>
|
|
76
|
+
{t('auth.restricted.redirect')}
|
|
77
|
+
</SignInStepButton>
|
|
78
|
+
<SignInStepButton variant="ghost" onClick={onUseDifferentEmail}>
|
|
79
|
+
{t('auth.restricted.useDifferent')}
|
|
80
|
+
</SignInStepButton>
|
|
81
|
+
<p className="text-center text-xs text-muted">
|
|
82
|
+
{t('auth.restricted.autoRedirect', { seconds: secondsLeft })}
|
|
83
|
+
</p>
|
|
84
|
+
</div>
|
|
85
|
+
</SignInStepLayout>
|
|
86
|
+
);
|
|
87
|
+
}
|