@vertesia/ui 1.5.0-dev.20260717.131047Z → 1.5.0-dev.20260722.120446Z
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/SidePanel.js +1 -1
- package/lib/core/components/SidePanel.js.map +1 -1
- package/lib/core/components/shadcn/button.d.ts +10 -3
- package/lib/core/components/shadcn/button.d.ts.map +1 -1
- package/lib/core/components/shadcn/button.js +41 -9
- package/lib/core/components/shadcn/button.js.map +1 -1
- package/lib/core/components/shadcn/modal/dialog.js +1 -1
- package/lib/core/components/shadcn/modal/dialog.js.map +1 -1
- package/lib/core/components/shadcn/theme/ThemeSwitcher.js +1 -1
- package/lib/core/components/shadcn/theme/ThemeSwitcher.js.map +1 -1
- package/lib/features/agent/chat/AgentChatPlaybackControls.d.ts.map +1 -1
- package/lib/features/agent/chat/AgentChatPlaybackControls.js +2 -2
- package/lib/features/agent/chat/AgentChatPlaybackControls.js.map +1 -1
- package/lib/features/agent/chat/AgentRequestInputOverlay.d.ts.map +1 -1
- package/lib/features/agent/chat/AgentRequestInputOverlay.js +2 -2
- package/lib/features/agent/chat/AgentRequestInputOverlay.js.map +1 -1
- package/lib/features/agent/chat/ArtifactsTab.d.ts.map +1 -1
- package/lib/features/agent/chat/ArtifactsTab.js +5 -2
- package/lib/features/agent/chat/ArtifactsTab.js.map +1 -1
- package/lib/features/agent/chat/ImageLightbox.d.ts.map +1 -1
- package/lib/features/agent/chat/ImageLightbox.js +1 -1
- package/lib/features/agent/chat/ImageLightbox.js.map +1 -1
- package/lib/features/agent/chat/ModernAgentConversation.js +1 -1
- package/lib/features/agent/chat/ModernAgentConversation.js.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/AllMessagesMixed.d.ts.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/AllMessagesMixed.js +5 -5
- package/lib/features/agent/chat/ModernAgentOutput/AllMessagesMixed.js.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/Header.d.ts.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/Header.js +4 -2
- package/lib/features/agent/chat/ModernAgentOutput/Header.js.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/MessageInput.d.ts.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/MessageInput.js +2 -2
- package/lib/features/agent/chat/ModernAgentOutput/MessageInput.js.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/MessageItem.d.ts.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/MessageItem.js +2 -1
- package/lib/features/agent/chat/ModernAgentOutput/MessageItem.js.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/requestInputMessages.d.ts +6 -0
- package/lib/features/agent/chat/ModernAgentOutput/requestInputMessages.d.ts.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/requestInputMessages.js +15 -1
- package/lib/features/agent/chat/ModernAgentOutput/requestInputMessages.js.map +1 -1
- package/lib/features/environment/SelectEnvironment.d.ts +28 -0
- package/lib/features/environment/SelectEnvironment.d.ts.map +1 -0
- package/lib/features/environment/SelectEnvironment.js +97 -0
- package/lib/features/environment/SelectEnvironment.js.map +1 -0
- package/lib/features/environment/index.d.ts +2 -0
- package/lib/features/environment/index.d.ts.map +1 -0
- package/lib/features/environment/index.js +2 -0
- package/lib/features/environment/index.js.map +1 -0
- package/lib/features/index.d.ts +2 -0
- package/lib/features/index.d.ts.map +1 -1
- package/lib/features/index.js +2 -0
- package/lib/features/index.js.map +1 -1
- package/lib/features/magic-pdf/AnnotatedImageSlider.js +12 -12
- package/lib/features/magic-pdf/AnnotatedImageSlider.js.map +1 -1
- package/lib/features/magic-pdf/DownloadPopover.d.ts.map +1 -1
- package/lib/features/magic-pdf/DownloadPopover.js +3 -17
- package/lib/features/magic-pdf/DownloadPopover.js.map +1 -1
- package/lib/features/magic-pdf/ExtractedContentView.js +2 -6
- package/lib/features/magic-pdf/ExtractedContentView.js.map +1 -1
- package/lib/features/magic-pdf/GroundedExtractionAssistantPanel.d.ts +25 -0
- package/lib/features/magic-pdf/GroundedExtractionAssistantPanel.d.ts.map +1 -0
- package/lib/features/magic-pdf/GroundedExtractionAssistantPanel.js +42 -0
- package/lib/features/magic-pdf/GroundedExtractionAssistantPanel.js.map +1 -0
- package/lib/features/magic-pdf/GroundedExtractionView.d.ts +27 -0
- package/lib/features/magic-pdf/GroundedExtractionView.d.ts.map +1 -0
- package/lib/features/magic-pdf/GroundedExtractionView.js +377 -0
- package/lib/features/magic-pdf/GroundedExtractionView.js.map +1 -0
- package/lib/features/magic-pdf/MagicPdfProvider.d.ts +0 -2
- package/lib/features/magic-pdf/MagicPdfProvider.d.ts.map +1 -1
- package/lib/features/magic-pdf/MagicPdfProvider.js +15 -42
- package/lib/features/magic-pdf/MagicPdfProvider.js.map +1 -1
- package/lib/features/magic-pdf/MagicPdfView.d.ts.map +1 -1
- package/lib/features/magic-pdf/MagicPdfView.js +2 -19
- package/lib/features/magic-pdf/MagicPdfView.js.map +1 -1
- package/lib/features/magic-pdf/index.d.ts +1 -0
- package/lib/features/magic-pdf/index.d.ts.map +1 -1
- package/lib/features/magic-pdf/index.js +1 -0
- package/lib/features/magic-pdf/index.js.map +1 -1
- package/lib/features/magic-pdf/types.d.ts +1 -1
- package/lib/features/magic-pdf/types.d.ts.map +1 -1
- package/lib/features/oauth/McpConnectionsButton.d.ts.map +1 -1
- package/lib/features/oauth/McpConnectionsButton.js +2 -2
- package/lib/features/oauth/McpConnectionsButton.js.map +1 -1
- package/lib/features/oauth/McpConnectionsDialog.d.ts.map +1 -1
- package/lib/features/oauth/McpConnectionsDialog.js +1 -1
- package/lib/features/oauth/McpConnectionsDialog.js.map +1 -1
- package/lib/features/oauth/RemoteMcpConnectionButton.d.ts.map +1 -1
- package/lib/features/oauth/RemoteMcpConnectionButton.js +1 -1
- package/lib/features/oauth/RemoteMcpConnectionButton.js.map +1 -1
- package/lib/features/pdf-viewer/PdfPageSlider.js +2 -2
- package/lib/features/pdf-viewer/PdfPageSlider.js.map +1 -1
- package/lib/features/pdf-viewer/SimplePdfViewer.d.ts.map +1 -1
- package/lib/features/pdf-viewer/SimplePdfViewer.js +3 -3
- package/lib/features/pdf-viewer/SimplePdfViewer.js.map +1 -1
- package/lib/features/permissions/UserPermissionsProvider.js +1 -1
- package/lib/features/permissions/UserPermissionsProvider.js.map +1 -1
- package/lib/features/store/objects/DocumentQuickFilter.d.ts.map +1 -1
- package/lib/features/store/objects/DocumentQuickFilter.js +5 -5
- package/lib/features/store/objects/DocumentQuickFilter.js.map +1 -1
- package/lib/features/store/objects/DocumentSearchResults.d.ts.map +1 -1
- package/lib/features/store/objects/DocumentSearchResults.js +2 -2
- package/lib/features/store/objects/DocumentSearchResults.js.map +1 -1
- package/lib/features/store/objects/components/ContentDispositionButton.d.ts.map +1 -1
- package/lib/features/store/objects/components/ContentDispositionButton.js +1 -1
- package/lib/features/store/objects/components/ContentDispositionButton.js.map +1 -1
- package/lib/features/store/objects/components/ContentOverview.d.ts.map +1 -1
- package/lib/features/store/objects/components/ContentOverview.js +78 -21
- package/lib/features/store/objects/components/ContentOverview.js.map +1 -1
- package/lib/features/store/objects/components/DocumentIcon.js +1 -1
- package/lib/features/store/objects/components/VectorSearchWidget.js +1 -1
- package/lib/features/store/objects/components/VectorSearchWidget.js.map +1 -1
- package/lib/features/store/objects/components/useContentPanelHooks.d.ts +1 -2
- package/lib/features/store/objects/components/useContentPanelHooks.d.ts.map +1 -1
- package/lib/features/store/objects/components/useContentPanelHooks.js +4 -8
- package/lib/features/store/objects/components/useContentPanelHooks.js.map +1 -1
- package/lib/features/store/objects/layout/renderers.d.ts.map +1 -1
- package/lib/features/store/objects/layout/renderers.js +2 -2
- package/lib/features/store/objects/layout/renderers.js.map +1 -1
- package/lib/features/store/objects/selection/SelectionActions.js +1 -1
- package/lib/features/store/objects/selection/SelectionActions.js.map +1 -1
- package/lib/features/store/types/ContentObjectTypesTable.d.ts.map +1 -1
- package/lib/features/store/types/ContentObjectTypesTable.js +4 -4
- package/lib/features/store/types/ContentObjectTypesTable.js.map +1 -1
- package/lib/features/store/types/IntakePolicyEditor.d.ts +15 -0
- package/lib/features/store/types/IntakePolicyEditor.d.ts.map +1 -0
- package/lib/features/store/types/IntakePolicyEditor.js +455 -0
- package/lib/features/store/types/IntakePolicyEditor.js.map +1 -0
- package/lib/features/store/types/IntakePolicyForm.d.ts +11 -0
- package/lib/features/store/types/IntakePolicyForm.d.ts.map +1 -0
- package/lib/features/store/types/IntakePolicyForm.js +91 -0
- package/lib/features/store/types/IntakePolicyForm.js.map +1 -0
- package/lib/features/store/types/SelectContentTypeModal.js +1 -1
- package/lib/features/store/types/SelectContentTypeModal.js.map +1 -1
- package/lib/features/store/types/index.d.ts +2 -0
- package/lib/features/store/types/index.d.ts.map +1 -1
- package/lib/features/store/types/index.js +2 -0
- package/lib/features/store/types/index.js.map +1 -1
- package/lib/features/store/types/intake-policy-editor.logic.d.ts +7 -0
- package/lib/features/store/types/intake-policy-editor.logic.d.ts.map +1 -0
- package/lib/features/store/types/intake-policy-editor.logic.js +60 -0
- package/lib/features/store/types/intake-policy-editor.logic.js.map +1 -0
- package/lib/features/store/types/typeCatalogCache.d.ts +5 -0
- package/lib/features/store/types/typeCatalogCache.d.ts.map +1 -0
- package/lib/features/store/types/typeCatalogCache.js +40 -0
- package/lib/features/store/types/typeCatalogCache.js.map +1 -0
- package/lib/features/user/UserInfo.js +7 -3
- package/lib/features/user/UserInfo.js.map +1 -1
- package/lib/features/views/ViewExperience.d.ts +20 -0
- package/lib/features/views/ViewExperience.d.ts.map +1 -0
- package/lib/features/views/ViewExperience.js +188 -0
- package/lib/features/views/ViewExperience.js.map +1 -0
- package/lib/features/views/ViewNavigation.d.ts +3 -0
- package/lib/features/views/ViewNavigation.d.ts.map +1 -0
- package/lib/features/views/ViewNavigation.js +36 -0
- package/lib/features/views/ViewNavigation.js.map +1 -0
- package/lib/features/views/ViewResults.d.ts +9 -0
- package/lib/features/views/ViewResults.d.ts.map +1 -0
- package/lib/features/views/ViewResults.js +229 -0
- package/lib/features/views/ViewResults.js.map +1 -0
- package/lib/features/views/ViewSearch.d.ts +3 -0
- package/lib/features/views/ViewSearch.d.ts.map +1 -0
- package/lib/features/views/ViewSearch.js +74 -0
- package/lib/features/views/ViewSearch.js.map +1 -0
- package/lib/features/views/index.d.ts +7 -0
- package/lib/features/views/index.d.ts.map +1 -0
- package/lib/features/views/index.js +7 -0
- package/lib/features/views/index.js.map +1 -0
- package/lib/features/views/types.d.ts +39 -0
- package/lib/features/views/types.d.ts.map +1 -0
- package/lib/features/views/types.js +2 -0
- package/lib/features/views/types.js.map +1 -0
- package/lib/features/views/viewState.d.ts +14 -0
- package/lib/features/views/viewState.d.ts.map +1 -0
- package/lib/features/views/viewState.js +117 -0
- package/lib/features/views/viewState.js.map +1 -0
- package/lib/i18n/locales/ar.json +16 -0
- package/lib/i18n/locales/de.json +12 -0
- package/lib/i18n/locales/en.json +245 -33
- package/lib/i18n/locales/es.json +13 -0
- package/lib/i18n/locales/fr.json +13 -0
- package/lib/i18n/locales/it.json +13 -0
- package/lib/i18n/locales/ja.json +11 -0
- package/lib/i18n/locales/ko.json +11 -0
- package/lib/i18n/locales/pt.json +13 -0
- package/lib/i18n/locales/ru.json +14 -0
- package/lib/i18n/locales/tr.json +12 -0
- package/lib/i18n/locales/zh-TW.json +11 -0
- package/lib/i18n/locales/zh.json +11 -0
- package/lib/router/HistoryNavigator.d.ts.map +1 -1
- package/lib/router/HistoryNavigator.js +23 -13
- package/lib/router/HistoryNavigator.js.map +1 -1
- package/lib/router/Nav.d.ts.map +1 -1
- package/lib/router/Nav.js +15 -6
- package/lib/router/Nav.js.map +1 -1
- package/lib/session/UserSession.d.ts.map +1 -1
- package/lib/session/UserSession.js +5 -3
- package/lib/session/UserSession.js.map +1 -1
- package/lib/vertesia-ui-core.js +4 -4
- package/lib/vertesia-ui-core.js.map +1 -1
- package/lib/vertesia-ui-features.js +34 -27
- package/lib/vertesia-ui-features.js.map +1 -1
- package/lib/vertesia-ui-i18n.js +15 -15
- package/lib/vertesia-ui-i18n.js.map +1 -1
- package/lib/vertesia-ui-router.js +1 -1
- package/lib/vertesia-ui-router.js.map +1 -1
- package/lib/vertesia-ui-session.js +1 -1
- package/lib/vertesia-ui-session.js.map +1 -1
- package/lib/vertesia-ui-shell.js +1 -1
- package/lib/vertesia-ui-shell.js.map +1 -1
- package/lib/vertesia-ui-widgets.js +7 -7
- package/lib/vertesia-ui-widgets.js.map +1 -1
- package/lib/widgets/form/Form.js +1 -1
- package/lib/widgets/form/Form.js.map +1 -1
- package/lib/widgets/json-view/JSONSwitcher.js +1 -1
- package/lib/widgets/json-view/JSONSwitcher.js.map +1 -1
- package/lib/widgets/json-view/JSONView.js +6 -6
- package/lib/widgets/json-view/JSONView.js.map +1 -1
- package/lib/widgets/monacoEditor/MonacoEditor.d.ts.map +1 -1
- package/lib/widgets/monacoEditor/MonacoEditor.js +29 -0
- package/lib/widgets/monacoEditor/MonacoEditor.js.map +1 -1
- package/lib/widgets/schema-editor/ManagedSchema.d.ts +8 -0
- package/lib/widgets/schema-editor/ManagedSchema.d.ts.map +1 -1
- package/lib/widgets/schema-editor/ManagedSchema.js +16 -0
- package/lib/widgets/schema-editor/ManagedSchema.js.map +1 -1
- package/lib/widgets/schema-editor/editor/EditableSchemaProperty.d.ts +2 -0
- package/lib/widgets/schema-editor/editor/EditableSchemaProperty.d.ts.map +1 -1
- package/lib/widgets/schema-editor/editor/EditableSchemaProperty.js +1 -0
- package/lib/widgets/schema-editor/editor/EditableSchemaProperty.js.map +1 -1
- package/lib/widgets/schema-editor/editor/PropertyViewer.d.ts.map +1 -1
- package/lib/widgets/schema-editor/editor/PropertyViewer.js +4 -1
- package/lib/widgets/schema-editor/editor/PropertyViewer.js.map +1 -1
- package/lib/widgets/schema-editor/editor/SchemaEditor.d.ts.map +1 -1
- package/lib/widgets/schema-editor/editor/SchemaEditor.js +22 -11
- package/lib/widgets/schema-editor/editor/SchemaEditor.js.map +1 -1
- package/package.json +32 -32
- package/src/__tests__/a11y.test.tsx +73 -0
- package/src/core/components/SidePanel.tsx +1 -1
- package/src/core/components/shadcn/button.tsx +67 -12
- package/src/core/components/shadcn/modal/dialog.tsx +1 -1
- package/src/core/components/shadcn/theme/ThemeSwitcher.tsx +1 -1
- package/src/features/agent/chat/AgentChatPlaybackControls.tsx +0 -5
- package/src/features/agent/chat/AgentRequestInputOverlay.test.tsx +31 -0
- package/src/features/agent/chat/AgentRequestInputOverlay.tsx +6 -2
- package/src/features/agent/chat/ArtifactsTab.tsx +19 -9
- package/src/features/agent/chat/ImageLightbox.tsx +0 -1
- package/src/features/agent/chat/ModernAgentConversation.test.tsx +48 -0
- package/src/features/agent/chat/ModernAgentConversation.tsx +0 -2
- package/src/features/agent/chat/ModernAgentOutput/AllMessagesMixed.test.tsx +6 -1
- package/src/features/agent/chat/ModernAgentOutput/AllMessagesMixed.tsx +21 -15
- package/src/features/agent/chat/ModernAgentOutput/Header.tsx +3 -3
- package/src/features/agent/chat/ModernAgentOutput/MessageInput.tsx +0 -2
- package/src/features/agent/chat/ModernAgentOutput/MessageItem.tsx +4 -1
- package/src/features/agent/chat/ModernAgentOutput/requestInputMessages.test.ts +80 -0
- package/src/features/agent/chat/ModernAgentOutput/requestInputMessages.ts +21 -1
- package/src/features/environment/SelectEnvironment.tsx +186 -0
- package/src/features/environment/index.ts +1 -0
- package/src/features/index.ts +2 -0
- package/src/features/magic-pdf/AnnotatedImageSlider.tsx +62 -66
- package/src/features/magic-pdf/DownloadPopover.tsx +5 -48
- package/src/features/magic-pdf/ExtractedContentView.tsx +2 -14
- package/src/features/magic-pdf/GroundedExtractionAssistantPanel.tsx +86 -0
- package/src/features/magic-pdf/GroundedExtractionView.test.tsx +65 -0
- package/src/features/magic-pdf/GroundedExtractionView.tsx +1055 -0
- package/src/features/magic-pdf/MagicPdfProvider.tsx +17 -47
- package/src/features/magic-pdf/MagicPdfView.tsx +3 -51
- package/src/features/magic-pdf/index.ts +1 -0
- package/src/features/magic-pdf/types.ts +1 -1
- package/src/features/oauth/McpConnectionsButton.tsx +0 -2
- package/src/features/oauth/McpConnectionsDialog.tsx +0 -1
- package/src/features/oauth/RemoteMcpConnectionButton.tsx +0 -1
- package/src/features/pdf-viewer/PdfPageSlider.tsx +5 -5
- package/src/features/pdf-viewer/SimplePdfViewer.tsx +11 -12
- package/src/features/permissions/UserPermissionsProvider.tsx +1 -1
- package/src/features/store/objects/DocumentQuickFilter.tsx +13 -15
- package/src/features/store/objects/DocumentSearchResults.tsx +3 -6
- package/src/features/store/objects/components/ContentDispositionButton.tsx +5 -1
- package/src/features/store/objects/components/ContentOverview.tsx +144 -44
- package/src/features/store/objects/components/DocumentIcon.tsx +1 -1
- package/src/features/store/objects/components/VectorSearchWidget.tsx +2 -2
- package/src/features/store/objects/components/useContentPanelHooks.ts +3 -15
- package/src/features/store/objects/layout/renderers.tsx +1 -2
- package/src/features/store/objects/selection/SelectionActions.tsx +1 -1
- package/src/features/store/types/ContentObjectTypesTable.tsx +12 -14
- package/src/features/store/types/IntakePolicyEditor.tsx +679 -0
- package/src/features/store/types/IntakePolicyForm.tsx +838 -0
- package/src/features/store/types/SelectContentTypeModal.tsx +2 -2
- package/src/features/store/types/index.ts +2 -0
- package/src/features/store/types/intake-policy-editor.logic.test.ts +109 -0
- package/src/features/store/types/intake-policy-editor.logic.ts +87 -0
- package/src/features/store/types/typeCatalogCache.ts +45 -0
- package/src/features/user/UserInfo.tsx +7 -7
- package/src/features/views/ViewExperience.test.tsx +273 -0
- package/src/features/views/ViewExperience.tsx +408 -0
- package/src/features/views/ViewNavigation.test.tsx +86 -0
- package/src/features/views/ViewNavigation.tsx +187 -0
- package/src/features/views/ViewResults.test.ts +82 -0
- package/src/features/views/ViewResults.tsx +609 -0
- package/src/features/views/ViewSearch.test.tsx +147 -0
- package/src/features/views/ViewSearch.tsx +205 -0
- package/src/features/views/index.ts +6 -0
- package/src/features/views/types.ts +57 -0
- package/src/features/views/viewState.test.ts +111 -0
- package/src/features/views/viewState.ts +132 -0
- package/src/i18n/locales/ar.json +16 -0
- package/src/i18n/locales/de.json +12 -0
- package/src/i18n/locales/en.json +965 -753
- package/src/i18n/locales/es.json +13 -0
- package/src/i18n/locales/fr.json +13 -0
- package/src/i18n/locales/it.json +13 -0
- package/src/i18n/locales/ja.json +11 -0
- package/src/i18n/locales/ko.json +11 -0
- package/src/i18n/locales/pt.json +13 -0
- package/src/i18n/locales/ru.json +14 -0
- package/src/i18n/locales/tr.json +12 -0
- package/src/i18n/locales/zh-TW.json +11 -0
- package/src/i18n/locales/zh.json +11 -0
- package/src/router/HistoryNavigator.test.ts +48 -0
- package/src/router/HistoryNavigator.ts +24 -13
- package/src/router/Nav.tsx +18 -8
- package/src/session/UserSession.test.ts +39 -0
- package/src/session/UserSession.ts +5 -3
- package/src/widgets/form/Form.tsx +1 -1
- package/src/widgets/json-view/JSONSwitcher.tsx +2 -2
- package/src/widgets/json-view/JSONView.tsx +7 -7
- package/src/widgets/monacoEditor/MonacoEditor.tsx +29 -0
- package/src/widgets/schema-editor/ManagedSchema.ts +22 -0
- package/src/widgets/schema-editor/editor/EditableSchemaProperty.tsx +3 -0
- package/src/widgets/schema-editor/editor/PropertyViewer.tsx +14 -3
- package/src/widgets/schema-editor/editor/SchemaEditor.tsx +80 -29
package/src/i18n/locales/es.json
CHANGED
|
@@ -275,6 +275,7 @@
|
|
|
275
275
|
"filter.selectRange": "Seleccionar rango",
|
|
276
276
|
"filter.to": "Hasta:",
|
|
277
277
|
"form.filter": "Filtrar...",
|
|
278
|
+
"grounded.checkerboard": "Cuadrícula",
|
|
278
279
|
"language.label": "Idioma",
|
|
279
280
|
"language.placeholder": "Elegir idioma",
|
|
280
281
|
"layout.pageNotFound": "Página no encontrada",
|
|
@@ -744,6 +745,18 @@
|
|
|
744
745
|
"user.unnamedGroup": "Grupo sin nombre",
|
|
745
746
|
"user.user": "Usuario",
|
|
746
747
|
"user.userId": "ID de usuario",
|
|
748
|
+
"view.display": "Visualización",
|
|
749
|
+
"view.from": "Desde",
|
|
750
|
+
"view.pagination": "Páginas de resultados",
|
|
751
|
+
"view.ranges": "Rangos",
|
|
752
|
+
"view.removeSelection": "Quitar {{value}}",
|
|
753
|
+
"view.resultsCount_one": "{{count}} resultado",
|
|
754
|
+
"view.resultsCount_many": "{{count}} resultados",
|
|
755
|
+
"view.resultsCount_other": "{{count}} resultados",
|
|
756
|
+
"view.searchFields": "Campos de búsqueda",
|
|
757
|
+
"view.sort": "Ordenar",
|
|
758
|
+
"view.to": "Hasta",
|
|
759
|
+
"view.warning": "Aviso de vista",
|
|
747
760
|
"widgets.schema.editDescription": "Editar descripción",
|
|
748
761
|
"widgets.schema.invalidPropertyDeclaration": "Declaración de propiedad inválida"
|
|
749
762
|
}
|
package/src/i18n/locales/fr.json
CHANGED
|
@@ -275,6 +275,7 @@
|
|
|
275
275
|
"filter.selectRange": "Sélectionner une plage",
|
|
276
276
|
"filter.to": "À :",
|
|
277
277
|
"form.filter": "Filtrer...",
|
|
278
|
+
"grounded.checkerboard": "Quadrillage",
|
|
278
279
|
"language.label": "Langue",
|
|
279
280
|
"language.placeholder": "Choisir la langue",
|
|
280
281
|
"layout.pageNotFound": "Page non trouvée",
|
|
@@ -744,6 +745,18 @@
|
|
|
744
745
|
"user.unnamedGroup": "Groupe sans nom",
|
|
745
746
|
"user.user": "Utilisateur",
|
|
746
747
|
"user.userId": "ID utilisateur",
|
|
748
|
+
"view.display": "Affichage",
|
|
749
|
+
"view.from": "De",
|
|
750
|
+
"view.pagination": "Pages de résultats",
|
|
751
|
+
"view.ranges": "Plages",
|
|
752
|
+
"view.removeSelection": "Supprimer {{value}}",
|
|
753
|
+
"view.resultsCount_one": "{{count}} résultat",
|
|
754
|
+
"view.resultsCount_many": "{{count}} résultats",
|
|
755
|
+
"view.resultsCount_other": "{{count}} résultats",
|
|
756
|
+
"view.searchFields": "Champs de recherche",
|
|
757
|
+
"view.sort": "Trier",
|
|
758
|
+
"view.to": "À",
|
|
759
|
+
"view.warning": "Avis sur la vue",
|
|
747
760
|
"widgets.schema.editDescription": "Modifier la description",
|
|
748
761
|
"widgets.schema.invalidPropertyDeclaration": "Déclaration de propriété invalide"
|
|
749
762
|
}
|
package/src/i18n/locales/it.json
CHANGED
|
@@ -275,6 +275,7 @@
|
|
|
275
275
|
"filter.selectRange": "Seleziona intervallo",
|
|
276
276
|
"filter.to": "A:",
|
|
277
277
|
"form.filter": "Filtra...",
|
|
278
|
+
"grounded.checkerboard": "Griglia",
|
|
278
279
|
"language.label": "Lingua",
|
|
279
280
|
"language.placeholder": "Scegli lingua",
|
|
280
281
|
"layout.pageNotFound": "Pagina non trovata",
|
|
@@ -744,6 +745,18 @@
|
|
|
744
745
|
"user.unnamedGroup": "Gruppo senza nome",
|
|
745
746
|
"user.user": "Utente",
|
|
746
747
|
"user.userId": "ID utente",
|
|
748
|
+
"view.display": "Visualizzazione",
|
|
749
|
+
"view.from": "Da",
|
|
750
|
+
"view.pagination": "Pagine dei risultati",
|
|
751
|
+
"view.ranges": "Intervalli",
|
|
752
|
+
"view.removeSelection": "Rimuovi {{value}}",
|
|
753
|
+
"view.resultsCount_one": "{{count}} risultato",
|
|
754
|
+
"view.resultsCount_many": "{{count}} risultati",
|
|
755
|
+
"view.resultsCount_other": "{{count}} risultati",
|
|
756
|
+
"view.searchFields": "Campi di ricerca",
|
|
757
|
+
"view.sort": "Ordina",
|
|
758
|
+
"view.to": "A",
|
|
759
|
+
"view.warning": "Avviso vista",
|
|
747
760
|
"widgets.schema.editDescription": "Modifica descrizione",
|
|
748
761
|
"widgets.schema.invalidPropertyDeclaration": "Dichiarazione di proprietà non valida"
|
|
749
762
|
}
|
package/src/i18n/locales/ja.json
CHANGED
|
@@ -273,6 +273,7 @@
|
|
|
273
273
|
"filter.selectRange": "範囲を選択",
|
|
274
274
|
"filter.to": "終了:",
|
|
275
275
|
"form.filter": "フィルター...",
|
|
276
|
+
"grounded.checkerboard": "チェッカーボード",
|
|
276
277
|
"language.label": "言語",
|
|
277
278
|
"language.placeholder": "言語を選択",
|
|
278
279
|
"layout.pageNotFound": "ページが見つかりません",
|
|
@@ -734,6 +735,16 @@
|
|
|
734
735
|
"user.unnamedGroup": "名前なしグループ",
|
|
735
736
|
"user.user": "ユーザー",
|
|
736
737
|
"user.userId": "ユーザーID",
|
|
738
|
+
"view.display": "表示",
|
|
739
|
+
"view.from": "開始",
|
|
740
|
+
"view.pagination": "結果ページ",
|
|
741
|
+
"view.ranges": "範囲",
|
|
742
|
+
"view.removeSelection": "{{value}}を削除",
|
|
743
|
+
"view.resultsCount_other": "{{count}} 件の結果",
|
|
744
|
+
"view.searchFields": "検索フィールド",
|
|
745
|
+
"view.sort": "並べ替え",
|
|
746
|
+
"view.to": "終了",
|
|
747
|
+
"view.warning": "ビューのお知らせ",
|
|
737
748
|
"widgets.schema.editDescription": "説明を編集",
|
|
738
749
|
"widgets.schema.invalidPropertyDeclaration": "無効なプロパティ宣言"
|
|
739
750
|
}
|
package/src/i18n/locales/ko.json
CHANGED
|
@@ -273,6 +273,7 @@
|
|
|
273
273
|
"filter.selectRange": "범위 선택",
|
|
274
274
|
"filter.to": "끝:",
|
|
275
275
|
"form.filter": "필터...",
|
|
276
|
+
"grounded.checkerboard": "체커보드",
|
|
276
277
|
"language.label": "언어",
|
|
277
278
|
"language.placeholder": "언어 선택",
|
|
278
279
|
"layout.pageNotFound": "페이지를 찾을 수 없음",
|
|
@@ -734,6 +735,16 @@
|
|
|
734
735
|
"user.unnamedGroup": "이름 없는 그룹",
|
|
735
736
|
"user.user": "사용자",
|
|
736
737
|
"user.userId": "사용자 ID",
|
|
738
|
+
"view.display": "표시",
|
|
739
|
+
"view.from": "시작",
|
|
740
|
+
"view.pagination": "결과 페이지",
|
|
741
|
+
"view.ranges": "범위",
|
|
742
|
+
"view.removeSelection": "{{value}} 제거",
|
|
743
|
+
"view.resultsCount_other": "{{count}}개 결과",
|
|
744
|
+
"view.searchFields": "검색 필드",
|
|
745
|
+
"view.sort": "정렬",
|
|
746
|
+
"view.to": "종료",
|
|
747
|
+
"view.warning": "보기 알림",
|
|
737
748
|
"widgets.schema.editDescription": "설명 편집",
|
|
738
749
|
"widgets.schema.invalidPropertyDeclaration": "유효하지 않은 속성 선언"
|
|
739
750
|
}
|
package/src/i18n/locales/pt.json
CHANGED
|
@@ -275,6 +275,7 @@
|
|
|
275
275
|
"filter.selectRange": "Selecionar intervalo",
|
|
276
276
|
"filter.to": "Até:",
|
|
277
277
|
"form.filter": "Filtrar...",
|
|
278
|
+
"grounded.checkerboard": "Grade quadriculada",
|
|
278
279
|
"language.label": "Idioma",
|
|
279
280
|
"language.placeholder": "Escolher idioma",
|
|
280
281
|
"layout.pageNotFound": "Página não encontrada",
|
|
@@ -744,6 +745,18 @@
|
|
|
744
745
|
"user.unnamedGroup": "Grupo sem nome",
|
|
745
746
|
"user.user": "Usuário",
|
|
746
747
|
"user.userId": "ID do usuário",
|
|
748
|
+
"view.display": "Exibição",
|
|
749
|
+
"view.from": "De",
|
|
750
|
+
"view.pagination": "Páginas de resultados",
|
|
751
|
+
"view.ranges": "Intervalos",
|
|
752
|
+
"view.removeSelection": "Remover {{value}}",
|
|
753
|
+
"view.resultsCount_one": "{{count}} resultado",
|
|
754
|
+
"view.resultsCount_many": "{{count}} resultados",
|
|
755
|
+
"view.resultsCount_other": "{{count}} resultados",
|
|
756
|
+
"view.searchFields": "Campos de pesquisa",
|
|
757
|
+
"view.sort": "Ordenar",
|
|
758
|
+
"view.to": "Até",
|
|
759
|
+
"view.warning": "Aviso de visualização",
|
|
747
760
|
"widgets.schema.editDescription": "Editar descrição",
|
|
748
761
|
"widgets.schema.invalidPropertyDeclaration": "Declaração de propriedade inválida"
|
|
749
762
|
}
|
package/src/i18n/locales/ru.json
CHANGED
|
@@ -277,6 +277,7 @@
|
|
|
277
277
|
"filter.selectRange": "Выбрать диапазон",
|
|
278
278
|
"filter.to": "До:",
|
|
279
279
|
"form.filter": "Фильтр...",
|
|
280
|
+
"grounded.checkerboard": "Клетчатая сетка",
|
|
280
281
|
"language.label": "Язык",
|
|
281
282
|
"language.placeholder": "Выберите язык",
|
|
282
283
|
"layout.pageNotFound": "Страница не найдена",
|
|
@@ -754,6 +755,19 @@
|
|
|
754
755
|
"user.unnamedGroup": "Группа без названия",
|
|
755
756
|
"user.user": "Пользователь",
|
|
756
757
|
"user.userId": "ID пользователя",
|
|
758
|
+
"view.display": "Отображение",
|
|
759
|
+
"view.from": "От",
|
|
760
|
+
"view.pagination": "Страницы результатов",
|
|
761
|
+
"view.ranges": "Диапазоны",
|
|
762
|
+
"view.removeSelection": "Удалить {{value}}",
|
|
763
|
+
"view.resultsCount_one": "{{count}} результат",
|
|
764
|
+
"view.resultsCount_few": "{{count}} результата",
|
|
765
|
+
"view.resultsCount_many": "{{count}} результатов",
|
|
766
|
+
"view.resultsCount_other": "{{count}} результата",
|
|
767
|
+
"view.searchFields": "Поля поиска",
|
|
768
|
+
"view.sort": "Сортировать",
|
|
769
|
+
"view.to": "До",
|
|
770
|
+
"view.warning": "Уведомление о представлении",
|
|
757
771
|
"widgets.schema.editDescription": "Редактировать описание",
|
|
758
772
|
"widgets.schema.invalidPropertyDeclaration": "Недопустимое объявление свойства"
|
|
759
773
|
}
|
package/src/i18n/locales/tr.json
CHANGED
|
@@ -273,6 +273,7 @@
|
|
|
273
273
|
"filter.selectRange": "Aralık seçin",
|
|
274
274
|
"filter.to": "Bitiş:",
|
|
275
275
|
"form.filter": "Filtrele...",
|
|
276
|
+
"grounded.checkerboard": "Damalı ızgara",
|
|
276
277
|
"language.label": "Dil",
|
|
277
278
|
"language.placeholder": "Dil seçin",
|
|
278
279
|
"layout.pageNotFound": "Sayfa Bulunamadı",
|
|
@@ -734,6 +735,17 @@
|
|
|
734
735
|
"user.unnamedGroup": "Adsız Grup",
|
|
735
736
|
"user.user": "Kullanıcı",
|
|
736
737
|
"user.userId": "Kullanıcı ID",
|
|
738
|
+
"view.display": "Görüntüle",
|
|
739
|
+
"view.from": "Başlangıç",
|
|
740
|
+
"view.pagination": "Sonuç sayfaları",
|
|
741
|
+
"view.ranges": "Aralıklar",
|
|
742
|
+
"view.removeSelection": "{{value}} seçimini kaldır",
|
|
743
|
+
"view.resultsCount_one": "{{count}} sonuç",
|
|
744
|
+
"view.resultsCount_other": "{{count}} sonuç",
|
|
745
|
+
"view.searchFields": "Arama alanları",
|
|
746
|
+
"view.sort": "Sırala",
|
|
747
|
+
"view.to": "Bitiş",
|
|
748
|
+
"view.warning": "Görünüm bildirimi",
|
|
737
749
|
"widgets.schema.editDescription": "Açıklamayı düzenle",
|
|
738
750
|
"widgets.schema.invalidPropertyDeclaration": "Geçersiz özellik bildirimi"
|
|
739
751
|
}
|
|
@@ -273,6 +273,7 @@
|
|
|
273
273
|
"filter.selectRange": "選擇範圍",
|
|
274
274
|
"filter.to": "至:",
|
|
275
275
|
"form.filter": "篩選...",
|
|
276
|
+
"grounded.checkerboard": "棋盤格",
|
|
276
277
|
"language.label": "語言",
|
|
277
278
|
"language.placeholder": "選擇語言",
|
|
278
279
|
"layout.pageNotFound": "頁面未找到",
|
|
@@ -734,6 +735,16 @@
|
|
|
734
735
|
"user.unnamedGroup": "未命名群組",
|
|
735
736
|
"user.user": "使用者",
|
|
736
737
|
"user.userId": "使用者ID",
|
|
738
|
+
"view.display": "顯示",
|
|
739
|
+
"view.from": "起始",
|
|
740
|
+
"view.pagination": "結果頁面",
|
|
741
|
+
"view.ranges": "範圍",
|
|
742
|
+
"view.removeSelection": "移除 {{value}}",
|
|
743
|
+
"view.resultsCount_other": "{{count}} 個結果",
|
|
744
|
+
"view.searchFields": "搜尋欄位",
|
|
745
|
+
"view.sort": "排序",
|
|
746
|
+
"view.to": "結束",
|
|
747
|
+
"view.warning": "檢視通知",
|
|
737
748
|
"widgets.schema.editDescription": "編輯描述",
|
|
738
749
|
"widgets.schema.invalidPropertyDeclaration": "無效的屬性宣告"
|
|
739
750
|
}
|
package/src/i18n/locales/zh.json
CHANGED
|
@@ -273,6 +273,7 @@
|
|
|
273
273
|
"filter.selectRange": "选择范围",
|
|
274
274
|
"filter.to": "至:",
|
|
275
275
|
"form.filter": "筛选...",
|
|
276
|
+
"grounded.checkerboard": "棋盘格",
|
|
276
277
|
"language.label": "语言",
|
|
277
278
|
"language.placeholder": "选择语言",
|
|
278
279
|
"layout.pageNotFound": "页面未找到",
|
|
@@ -734,6 +735,16 @@
|
|
|
734
735
|
"user.unnamedGroup": "未命名群组",
|
|
735
736
|
"user.user": "用户",
|
|
736
737
|
"user.userId": "用户ID",
|
|
738
|
+
"view.display": "显示",
|
|
739
|
+
"view.from": "起始",
|
|
740
|
+
"view.pagination": "结果页面",
|
|
741
|
+
"view.ranges": "范围",
|
|
742
|
+
"view.removeSelection": "移除 {{value}}",
|
|
743
|
+
"view.resultsCount_other": "{{count}} 个结果",
|
|
744
|
+
"view.searchFields": "搜索字段",
|
|
745
|
+
"view.sort": "排序",
|
|
746
|
+
"view.to": "结束",
|
|
747
|
+
"view.warning": "视图通知",
|
|
737
748
|
"widgets.schema.editDescription": "编辑描述",
|
|
738
749
|
"widgets.schema.invalidPropertyDeclaration": "无效的属性声明"
|
|
739
750
|
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { afterEach, describe, expect, it, vi } from 'vitest';
|
|
2
|
+
import { HistoryNavigator } from './HistoryNavigator';
|
|
3
|
+
|
|
4
|
+
describe('HistoryNavigator link interception', () => {
|
|
5
|
+
afterEach(() => {
|
|
6
|
+
document.body.replaceChildren();
|
|
7
|
+
vi.restoreAllMocks();
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
it('leaves targeted internal links to native browser navigation', () => {
|
|
11
|
+
const navigator = new HistoryNavigator();
|
|
12
|
+
const navigate = vi.spyOn(navigator as unknown as { _navigate: () => void }, '_navigate');
|
|
13
|
+
const link = document.createElement('a');
|
|
14
|
+
const icon = document.createElement('span');
|
|
15
|
+
link.href = '/store/executions/run-1?p=project&a=account';
|
|
16
|
+
link.target = '_blank';
|
|
17
|
+
link.append(icon);
|
|
18
|
+
document.body.append(link);
|
|
19
|
+
navigator.start();
|
|
20
|
+
|
|
21
|
+
const event = new MouseEvent('click', { bubbles: true, cancelable: true, button: 0 });
|
|
22
|
+
icon.dispatchEvent(event);
|
|
23
|
+
|
|
24
|
+
expect(event.defaultPrevented).toBe(false);
|
|
25
|
+
expect(navigate).not.toHaveBeenCalled();
|
|
26
|
+
navigator.stop();
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
it('continues to intercept ordinary same-origin links', () => {
|
|
30
|
+
const navigator = new HistoryNavigator();
|
|
31
|
+
const navigate = vi
|
|
32
|
+
.spyOn(navigator as unknown as { _navigate: () => void }, '_navigate')
|
|
33
|
+
.mockImplementation(() => undefined);
|
|
34
|
+
const link = document.createElement('a');
|
|
35
|
+
const label = document.createElement('span');
|
|
36
|
+
link.href = '/store/executions/run-1';
|
|
37
|
+
link.append(label);
|
|
38
|
+
document.body.append(link);
|
|
39
|
+
navigator.start();
|
|
40
|
+
|
|
41
|
+
const event = new MouseEvent('click', { bubbles: true, cancelable: true, button: 0 });
|
|
42
|
+
label.dispatchEvent(event);
|
|
43
|
+
|
|
44
|
+
expect(event.defaultPrevented).toBe(true);
|
|
45
|
+
expect(navigate).toHaveBeenCalledOnce();
|
|
46
|
+
navigator.stop();
|
|
47
|
+
});
|
|
48
|
+
});
|
|
@@ -72,14 +72,16 @@ export interface NavigateOptions {
|
|
|
72
72
|
title?: string;
|
|
73
73
|
}
|
|
74
74
|
|
|
75
|
-
function
|
|
76
|
-
if (
|
|
77
|
-
|
|
78
|
-
if (typeof href === 'string' && href.length > 0) {
|
|
79
|
-
return new URL(href);
|
|
80
|
-
}
|
|
75
|
+
function getClosestAnchor(target: EventTarget | null): HTMLAnchorElement | null {
|
|
76
|
+
if (!(target instanceof Element)) {
|
|
77
|
+
return null;
|
|
81
78
|
}
|
|
82
|
-
return
|
|
79
|
+
return target.closest<HTMLAnchorElement>('a[href]');
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
function getElementHrefAsUrl(elem: HTMLAnchorElement) {
|
|
83
|
+
const href = elem.href.trim();
|
|
84
|
+
return href.length > 0 ? new URL(href) : null;
|
|
83
85
|
}
|
|
84
86
|
|
|
85
87
|
export class HistoryNavigator {
|
|
@@ -236,16 +238,25 @@ export class HistoryNavigator {
|
|
|
236
238
|
this.fireLocationChange(new AfterLocationChangeEvent(type, to, state));
|
|
237
239
|
};
|
|
238
240
|
const _linkNavListener = (ev: MouseEvent) => {
|
|
239
|
-
|
|
240
|
-
//
|
|
241
|
+
// Let the browser handle modifier / non-primary clicks natively (open in new tab/window,
|
|
242
|
+
// download). Intercepting them here would preventDefault those affordances.
|
|
243
|
+
if (ev.defaultPrevented || ev.metaKey || ev.altKey || ev.ctrlKey || ev.shiftKey || ev.button !== 0) {
|
|
244
|
+
return;
|
|
245
|
+
}
|
|
246
|
+
const anchor = getClosestAnchor(ev.target);
|
|
247
|
+
if (!anchor) {
|
|
248
|
+
return;
|
|
249
|
+
}
|
|
250
|
+
const anchorTarget = anchor.getAttribute('target');
|
|
251
|
+
// Downloads, blob URLs, and explicitly targeted links require native browser navigation.
|
|
241
252
|
if (
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
253
|
+
anchor.hasAttribute('download') ||
|
|
254
|
+
anchor.href.startsWith('blob:') ||
|
|
255
|
+
(!!anchorTarget && anchorTarget.toLowerCase() !== '_self')
|
|
245
256
|
) {
|
|
246
257
|
return;
|
|
247
258
|
}
|
|
248
|
-
const url = getElementHrefAsUrl(
|
|
259
|
+
const url = getElementHrefAsUrl(anchor);
|
|
249
260
|
if (url && url.origin === window.location.origin) {
|
|
250
261
|
ev.preventDefault();
|
|
251
262
|
const to = new URL(this.addStickyParams(url.href));
|
package/src/router/Nav.tsx
CHANGED
|
@@ -1,7 +1,16 @@
|
|
|
1
|
-
import type { SyntheticEvent } from 'react';
|
|
1
|
+
import type { MouseEvent, SyntheticEvent } from 'react';
|
|
2
2
|
import { withMountBasename } from './path';
|
|
3
3
|
import { useNavigate, useRouterContext } from './Router';
|
|
4
4
|
|
|
5
|
+
/**
|
|
6
|
+
* True when the click carries a modifier the browser uses for alternate link behavior
|
|
7
|
+
* (open in new tab/window, download) or is not a primary-button click. Such clicks must fall
|
|
8
|
+
* through to the native anchor so the browser can handle them instead of the SPA router.
|
|
9
|
+
*/
|
|
10
|
+
function isModifiedClick(ev: MouseEvent): boolean {
|
|
11
|
+
return ev.metaKey || ev.altKey || ev.ctrlKey || ev.shiftKey || ev.button !== 0;
|
|
12
|
+
}
|
|
13
|
+
|
|
5
14
|
/**
|
|
6
15
|
* Wraps a <a href="..."> and perform the navigation to href through the router.
|
|
7
16
|
*/
|
|
@@ -71,19 +80,20 @@ export function NavLink({
|
|
|
71
80
|
skipStickyParams,
|
|
72
81
|
}: NavLinkProps) {
|
|
73
82
|
const { router } = useRouterContext();
|
|
74
|
-
//
|
|
75
|
-
//
|
|
83
|
+
// Resolve internal URLs even when a target makes navigation native. New-tab links still need
|
|
84
|
+
// the mount path and tenant sticky params, but must not be intercepted by the SPA router.
|
|
76
85
|
const isAnchorOrEmpty = !href || href.startsWith('#');
|
|
77
|
-
const
|
|
78
|
-
const
|
|
86
|
+
const isExternalUrl = /^[a-z][a-z0-9+.-]*:/i.test(href) || href.startsWith('//');
|
|
87
|
+
const isInternalUrl = !isAnchorOrEmpty && !isExternalUrl;
|
|
88
|
+
const isNativeNavigation = !!target && target !== '_self';
|
|
79
89
|
// Keep the rendered href under the served `<base href>` mount (correct middle-click / hover /
|
|
80
90
|
// open-in-new-tab); the onClick navigates via the router which applies the same rule. No-op when
|
|
81
91
|
// origin-served (Studio UI). Click handler below passes the raw `href` — navigate() re-bases it.
|
|
82
|
-
const resolvedHref =
|
|
92
|
+
const resolvedHref = isInternalUrl
|
|
83
93
|
? withMountBasename(!skipStickyParams ? router.getTopRouter().navigator.addStickyParams(href) : href)
|
|
84
94
|
: href;
|
|
85
|
-
const _onClick = (ev:
|
|
86
|
-
if (ev.defaultPrevented || !
|
|
95
|
+
const _onClick = (ev: MouseEvent) => {
|
|
96
|
+
if (ev.defaultPrevented || !isInternalUrl || isNativeNavigation || isModifiedClick(ev)) {
|
|
87
97
|
return;
|
|
88
98
|
}
|
|
89
99
|
ev.stopPropagation();
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { VertesiaClient } from '@vertesia/client';
|
|
2
|
+
import { describe, expect, it, vi } from 'vitest';
|
|
3
|
+
import { UserSession } from './UserSession';
|
|
4
|
+
|
|
5
|
+
function createSession(onboardingProgress: () => Promise<Record<string, boolean>>) {
|
|
6
|
+
const client = {
|
|
7
|
+
account: { onboardingProgress },
|
|
8
|
+
} as unknown as VertesiaClient;
|
|
9
|
+
const session = new UserSession(client);
|
|
10
|
+
session.setSession = vi.fn();
|
|
11
|
+
return session;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
describe('UserSession.fetchOnboardingStatus', () => {
|
|
15
|
+
it('does not replace the session when an incomplete status is unchanged', async () => {
|
|
16
|
+
const session = createSession(async () => ({ project_created: false }));
|
|
17
|
+
session.onboardingComplete = false;
|
|
18
|
+
|
|
19
|
+
await expect(session.fetchOnboardingStatus()).resolves.toBe(false);
|
|
20
|
+
expect(session.setSession).not.toHaveBeenCalled();
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
it('updates the session and reports when onboarding becomes complete', async () => {
|
|
24
|
+
const session = createSession(async () => ({ project_created: true }));
|
|
25
|
+
session.onboardingComplete = false;
|
|
26
|
+
|
|
27
|
+
await expect(session.fetchOnboardingStatus()).resolves.toBe(true);
|
|
28
|
+
expect(session.setSession).toHaveBeenCalledOnce();
|
|
29
|
+
expect(vi.mocked(session.setSession!).mock.calls[0]?.[0]?.onboardingComplete).toBe(true);
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
it('publishes the initial incomplete status without reporting completion', async () => {
|
|
33
|
+
const session = createSession(async () => ({ project_created: false }));
|
|
34
|
+
|
|
35
|
+
await expect(session.fetchOnboardingStatus()).resolves.toBe(false);
|
|
36
|
+
expect(session.setSession).toHaveBeenCalledOnce();
|
|
37
|
+
expect(vi.mocked(session.setSession!).mock.calls[0]?.[0]?.onboardingComplete).toBe(false);
|
|
38
|
+
});
|
|
39
|
+
});
|
|
@@ -260,13 +260,15 @@ class UserSession {
|
|
|
260
260
|
const onboarding = await this.client.account.onboardingProgress();
|
|
261
261
|
this.onboardingComplete = Object.values(onboarding).every((value) => value === true);
|
|
262
262
|
if (previousStatus !== this.onboardingComplete) {
|
|
263
|
-
|
|
263
|
+
this.setSession?.(this.clone());
|
|
264
264
|
}
|
|
265
|
-
this.
|
|
265
|
+
return previousStatus === false && this.onboardingComplete;
|
|
266
266
|
} catch (error) {
|
|
267
267
|
console.error('Error fetching onboarding status:', error);
|
|
268
268
|
this.onboardingComplete = false;
|
|
269
|
-
|
|
269
|
+
if (previousStatus !== this.onboardingComplete) {
|
|
270
|
+
this.setSession?.(this.clone());
|
|
271
|
+
}
|
|
270
272
|
}
|
|
271
273
|
return false;
|
|
272
274
|
}
|
|
@@ -184,7 +184,7 @@ function ListItem({ list, object, onDelete, disabled }: ListItemProps) {
|
|
|
184
184
|
return (
|
|
185
185
|
<div className="flex gap-2 w-full">
|
|
186
186
|
<div className="flex-1">{renderItemProperty(object, editor)}</div>
|
|
187
|
-
<Button variant="ghost" onClick={onDelete} disabled={disabled}
|
|
187
|
+
<Button variant="ghost" onClick={onDelete} disabled={disabled} title="Delete">
|
|
188
188
|
<Trash2 className="size-4 text-destructive" />
|
|
189
189
|
</Button>
|
|
190
190
|
</div>
|
|
@@ -14,7 +14,7 @@ export function JSONSwitcher({
|
|
|
14
14
|
<Button
|
|
15
15
|
variant={viewCode ? 'ghost' : 'primary'}
|
|
16
16
|
size="sm"
|
|
17
|
-
|
|
17
|
+
title="Preview properties"
|
|
18
18
|
onClick={() => setViewCode(false)}
|
|
19
19
|
>
|
|
20
20
|
{title}
|
|
@@ -22,7 +22,7 @@ export function JSONSwitcher({
|
|
|
22
22
|
<Button
|
|
23
23
|
variant={viewCode ? 'primary' : 'ghost'}
|
|
24
24
|
size="sm"
|
|
25
|
-
|
|
25
|
+
title="View in JSON format"
|
|
26
26
|
onClick={() => setViewCode(true)}
|
|
27
27
|
>
|
|
28
28
|
JSON
|
|
@@ -35,7 +35,7 @@ interface PropertyTitleProps {
|
|
|
35
35
|
name: string;
|
|
36
36
|
}
|
|
37
37
|
function PropertyTitle({ name }: PropertyTitleProps) {
|
|
38
|
-
return <div className="text-
|
|
38
|
+
return <div className="text-sm font-semibold">{computeTitleFromName(name)}</div>;
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
interface BlockElementProps {
|
|
@@ -64,14 +64,14 @@ function PropertyElement({ name, value }: PropertyElementProps) {
|
|
|
64
64
|
switch (info.type) {
|
|
65
65
|
case ValueType.Inline:
|
|
66
66
|
return (
|
|
67
|
-
<div className="w-full flex gap-2">
|
|
67
|
+
<div className="w-full flex gap-2 text-sm">
|
|
68
68
|
<PropertyTitle name={`${name}:`} />
|
|
69
69
|
<p>{info.value}</p>
|
|
70
70
|
</div>
|
|
71
71
|
);
|
|
72
72
|
case ValueType.Paragraph:
|
|
73
73
|
return (
|
|
74
|
-
<div>
|
|
74
|
+
<div className="w-full flex flex-col gap-2 text-sm">
|
|
75
75
|
<PropertyTitle name={name} />
|
|
76
76
|
<p>{info.value}</p>
|
|
77
77
|
</div>
|
|
@@ -80,14 +80,14 @@ function PropertyElement({ name, value }: PropertyElementProps) {
|
|
|
80
80
|
return (
|
|
81
81
|
<div className="prose dark:prose-invert">
|
|
82
82
|
<PropertyTitle name={name} />
|
|
83
|
-
<div className="vprose dark:prose-invert">{info.value}</div>
|
|
83
|
+
<div className="vprose prose-sm dark:prose-invert">{info.value}</div>
|
|
84
84
|
</div>
|
|
85
85
|
);
|
|
86
86
|
case ValueType.Array:
|
|
87
87
|
return <ArrayProperty name={name} value={value as JSONArray} />;
|
|
88
88
|
case ValueType.Object:
|
|
89
89
|
return (
|
|
90
|
-
<div>
|
|
90
|
+
<div className="w-full flex flex-col gap-2 text-sm">
|
|
91
91
|
<PropertyTitle name={name} />
|
|
92
92
|
<BlockElement className="mt-2">
|
|
93
93
|
{Object.entries(value as JSONObject).map(([key, value]) => (
|
|
@@ -164,8 +164,8 @@ function ItemProperty({ index, value, useBullet }: ItemPropertyProps) {
|
|
|
164
164
|
break;
|
|
165
165
|
}
|
|
166
166
|
return (
|
|
167
|
-
<div className="flex gap-4 hover:bg-
|
|
168
|
-
<div className="font-semibold text-
|
|
167
|
+
<div className="flex gap-4 hover:bg-muted py-2 pe-2 ps-4">
|
|
168
|
+
<div className="font-semibold text-muted">{bullet}</div>
|
|
169
169
|
<div>{content}</div>
|
|
170
170
|
</div>
|
|
171
171
|
);
|
|
@@ -8,6 +8,33 @@ import { registerCustomFoldingProviders } from './foldingProviders.js';
|
|
|
8
8
|
|
|
9
9
|
export type Monaco = typeof monaco;
|
|
10
10
|
|
|
11
|
+
/**
|
|
12
|
+
* Shared, body-level host for Monaco "overflow widgets" — the suggestion, hover, and
|
|
13
|
+
* parameter-hint popups. With `fixedOverflowWidgets` enabled these are `position: fixed`; a CSS
|
|
14
|
+
* `transform` on any ancestor (e.g. a modal centered with `translate(-50%, -50%)`) becomes their
|
|
15
|
+
* containing block and drags the popups away from the cursor, sometimes off-screen. Hosting them in
|
|
16
|
+
* an untransformed node appended to `document.body` keeps them anchored to the caret. The node
|
|
17
|
+
* carries the `monaco-editor` class so Monaco's (global) theme styles apply, and a high z-index so
|
|
18
|
+
* the popups render above modals/overlays. One shared node is reused by every editor instance.
|
|
19
|
+
*/
|
|
20
|
+
let overflowWidgetsNode: HTMLElement | undefined;
|
|
21
|
+
function getOverflowWidgetsNode(): HTMLElement | undefined {
|
|
22
|
+
if (typeof document === 'undefined') return undefined;
|
|
23
|
+
if (!overflowWidgetsNode) {
|
|
24
|
+
const node = document.createElement('div');
|
|
25
|
+
node.className = 'monaco-editor';
|
|
26
|
+
// `absolute` + z-index establishes a stacking context above modals without creating a
|
|
27
|
+
// containing block for the fixed-positioned popups (only transform/filter/etc. would).
|
|
28
|
+
node.style.position = 'absolute';
|
|
29
|
+
node.style.top = '0';
|
|
30
|
+
node.style.left = '0';
|
|
31
|
+
node.style.zIndex = '10000';
|
|
32
|
+
document.body.appendChild(node);
|
|
33
|
+
overflowWidgetsNode = node;
|
|
34
|
+
}
|
|
35
|
+
return overflowWidgetsNode;
|
|
36
|
+
}
|
|
37
|
+
|
|
11
38
|
export interface IEditorApi {
|
|
12
39
|
getValue(): string;
|
|
13
40
|
setValue(value?: string): void;
|
|
@@ -226,6 +253,8 @@ export function MonacoEditor({
|
|
|
226
253
|
tabSize: 2,
|
|
227
254
|
insertSpaces: true,
|
|
228
255
|
fixedOverflowWidgets: true, // Hover/diagnostic popovers float outside the editor bounds
|
|
256
|
+
// Host the fixed popups in a body-level node so a modal's CSS transform doesn't offset them.
|
|
257
|
+
overflowWidgetsDomNode: getOverflowWidgetsNode(),
|
|
229
258
|
glyphMargin: true, // Enable better error reporting
|
|
230
259
|
renderValidationDecorations: 'on', // Show error squiggles
|
|
231
260
|
renderLineHighlight: 'line', // Highlight entire line for errors
|
|
@@ -17,6 +17,11 @@ export interface NodeUpdate {
|
|
|
17
17
|
isRequired?: boolean;
|
|
18
18
|
editor?: string | null; // use null to force remove editor
|
|
19
19
|
description?: string;
|
|
20
|
+
/**
|
|
21
|
+
* When false, the property is marked `"x-extract": false` and is omitted from
|
|
22
|
+
* extraction result_schema. Default / true = extractable.
|
|
23
|
+
*/
|
|
24
|
+
extractable?: boolean;
|
|
20
25
|
}
|
|
21
26
|
|
|
22
27
|
interface SchemaLoader {
|
|
@@ -141,6 +146,19 @@ export class SchemaNode {
|
|
|
141
146
|
this.schema.description = value;
|
|
142
147
|
}
|
|
143
148
|
|
|
149
|
+
/** Whether extraction models may fill this field. Default true. */
|
|
150
|
+
get extractable(): boolean {
|
|
151
|
+
return (this.schema as Record<string, unknown>)['x-extract'] !== false;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
set extractable(value: boolean) {
|
|
155
|
+
if (value) {
|
|
156
|
+
delete (this.schema as Record<string, unknown>)['x-extract'];
|
|
157
|
+
} else {
|
|
158
|
+
(this.schema as Record<string, unknown>)['x-extract'] = false;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
|
|
144
162
|
get isParent() {
|
|
145
163
|
return this.type.isObject;
|
|
146
164
|
}
|
|
@@ -300,6 +318,10 @@ export class SchemaNode {
|
|
|
300
318
|
this.description = data.description;
|
|
301
319
|
updated = true;
|
|
302
320
|
}
|
|
321
|
+
if (data.extractable != null && this.extractable !== data.extractable) {
|
|
322
|
+
this.extractable = data.extractable;
|
|
323
|
+
updated = true;
|
|
324
|
+
}
|
|
303
325
|
|
|
304
326
|
return updated;
|
|
305
327
|
}
|