@jini-ai/admin 0.7.2 → 0.7.3-next.1
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/CHANGELOG.md +4 -6
- package/dist/agent-plugins/agent-plugins.module.d.ts +1 -1
- package/dist/agent-plugins/agent-plugins.module.js +1 -1
- package/dist/agent-plugins/controllers/agent-plugin-files.controller.d.ts +3 -3
- package/dist/agent-plugins/controllers/agent-plugin-files.controller.js +1 -1
- package/dist/agent-plugins/controllers/agent-plugins.controller.d.ts +3 -3
- package/dist/agent-plugins/controllers/agent-plugins.controller.js +30 -27
- package/dist/agent-plugins/index.d.ts +11 -8
- package/dist/agent-plugins/index.js +7 -8
- package/dist/agent-plugins/models.d.ts +19 -11
- package/dist/agent-plugins/ports.d.ts +1 -1
- package/dist/agent-plugins/ports.js +1 -1
- package/dist/agent-plugins/react/components/AgentPluginFileContent.d.ts +4 -2
- package/dist/agent-plugins/react/components/AgentPluginFileContent.js +3 -3
- package/dist/agent-plugins/react/components/AgentPluginFileTree.d.ts +4 -2
- package/dist/agent-plugins/react/components/AgentPluginFileTree.js +2 -2
- package/dist/agent-plugins/react/components/AgentPluginInspector.d.ts +4 -2
- package/dist/agent-plugins/react/components/AgentPluginInspector.js +3 -3
- package/dist/agent-plugins/react/components/AgentPluginListPanel.d.ts +5 -3
- package/dist/agent-plugins/react/components/AgentPluginListPanel.js +3 -3
- package/dist/agent-plugins/react/components/AgentPluginRow.d.ts +3 -1
- package/dist/agent-plugins/react/components/AgentPluginRow.js +3 -3
- package/dist/agent-plugins/react/hooks/AgentPluginInspector.hooks.js +2 -2
- package/dist/agent-plugins/react/hooks/AgentPluginPanel.hooks.d.ts +6 -5
- package/dist/agent-plugins/react/hooks/AgentPluginRow.hooks.d.ts +5 -4
- package/dist/agent-plugins/react/hooks/AgentPluginsPage.hooks.d.ts +11 -7
- package/dist/agent-plugins/react/hooks/AgentPluginsPage.hooks.js +3 -3
- package/dist/agent-plugins/react/hooks/AgentPluginsPorts.hooks.d.ts +5 -0
- package/dist/agent-plugins/react/hooks/AgentPluginsPorts.hooks.js +11 -1
- package/dist/agent-plugins/react/hooks/MarketplaceTab.hooks.d.ts +1 -1
- package/dist/agent-plugins/react/index.d.ts +25 -71
- package/dist/agent-plugins/react/index.js +9 -6
- package/dist/agent-plugins/react/pages/AgentPluginsPage.d.ts +8 -2
- package/dist/agent-plugins/react/pages/AgentPluginsPage.js +3 -3
- package/dist/agent-plugins/react/tabs/DownloadedTab.d.ts +2 -2
- package/dist/agent-plugins/react/tabs/DownloadedTab.js +1 -1
- package/dist/agent-plugins/react/tabs/InstalledTab.d.ts +2 -2
- package/dist/agent-plugins/react/tabs/InstalledTab.js +1 -1
- package/dist/agent-plugins/react/tabs/MarketplaceTab.d.ts +5 -2
- package/dist/agent-plugins/react/tabs/MarketplaceTab.js +3 -3
- package/dist/browser/index.d.ts +2 -0
- package/dist/browser/index.js +2 -0
- package/dist/browser/react-root-errors.d.ts +19 -0
- package/dist/browser/react-root-errors.js +16 -0
- package/dist/comments/adapters/http.js +2 -3
- package/dist/comments/adapters/memory.d.ts +5 -3
- package/dist/comments/adapters/memory.js +5 -6
- package/dist/comments/comments.module.d.ts +3 -3
- package/dist/comments/comments.module.js +1 -1
- package/dist/comments/controllers/comment-queue.controller.d.ts +14 -12
- package/dist/comments/controllers/comment-queue.controller.js +154 -155
- package/dist/comments/controllers/comment-settings.controller.d.ts +4 -4
- package/dist/comments/controllers/comment-settings.controller.js +40 -39
- package/dist/comments/controllers/comments.controller.d.ts +4 -4
- package/dist/comments/controllers/comments.controller.js +1 -2
- package/dist/comments/ports.d.ts +3 -3
- package/dist/comments/ports.js +1 -1
- package/dist/comments/react/components/QueueActionsCell.d.ts +20 -0
- package/dist/comments/react/components/QueueActionsCell.js +15 -0
- package/dist/comments/react/components/QueueSection.d.ts +20 -9
- package/dist/comments/react/components/QueueSection.js +9 -20
- package/dist/comments/react/components/SettingsFields.d.ts +13 -0
- package/dist/comments/react/components/SettingsFields.js +17 -0
- package/dist/comments/react/components/SettingsSection.d.ts +4 -1
- package/dist/comments/react/components/SettingsSection.js +5 -10
- package/dist/comments/react/hooks/CommentsPage.hooks.js +1 -1
- package/dist/comments/react/hooks/CommentsPorts.hooks.d.ts +5 -0
- package/dist/comments/react/hooks/CommentsPorts.hooks.js +11 -1
- package/dist/comments/react/hooks/QueueActionsCell.hooks.d.ts +13 -0
- package/dist/comments/react/hooks/QueueActionsCell.hooks.js +7 -0
- package/dist/comments/react/hooks/QueueSection.hooks.d.ts +3 -11
- package/dist/comments/react/hooks/QueueSection.hooks.js +8 -11
- package/dist/comments/react/hooks/use-comment-queue.hooks.js +4 -4
- package/dist/comments/react/hooks/use-comment-settings.hooks.js +3 -3
- package/dist/comments/react/hooks/use-comments.hooks.js +3 -3
- package/dist/comments/react/index.d.ts +27 -89
- package/dist/comments/react/index.js +5 -6
- package/dist/comments/react/pages/CommentsPage.d.ts +4 -1
- package/dist/comments/react/pages/CommentsPage.js +2 -2
- package/dist/comments/rules.d.ts +1 -1
- package/dist/comments/rules.js +2 -3
- package/dist/contracts/credential-management.d.ts +1 -1
- package/dist/contracts/credential-management.js +1 -1
- package/dist/contracts/media-picker.d.ts +1 -1
- package/dist/contracts/media-picker.js +1 -1
- package/dist/contracts/playground-render-target.d.ts +1 -1
- package/dist/contracts/playground-render-target.js +1 -1
- package/dist/core/entities/rules.d.ts +8 -2
- package/dist/core/entities/rules.js +3 -3
- package/dist/core/index.d.ts +1 -2
- package/dist/core/index.js +1 -3
- package/dist/core/ledger-slice.d.ts +3 -3
- package/dist/core/ledger-slice.js +3 -3
- package/dist/core/manifest/rules.js +1 -1
- package/dist/core/manifest/types.d.ts +11 -0
- package/dist/core/module/create-admin.d.ts +1 -8
- package/dist/core/module/create-admin.js +4 -9
- package/dist/core/module/index.d.ts +1 -5
- package/dist/core/module/index.js +1 -3
- package/dist/core/ports/auth.d.ts +2 -2
- package/dist/core/ports/auth.js +1 -1
- package/dist/core/ports/comment-repo.d.ts +53 -0
- package/dist/core/ports/comment-repo.js +2 -0
- package/dist/core/ports/comments.d.ts +1 -1
- package/dist/core/ports/comments.js +1 -1
- package/dist/core/ports/database.d.ts +1 -1
- package/dist/core/ports/embed-policy.d.ts +19 -0
- package/dist/core/ports/embed-policy.js +2 -0
- package/dist/core/ports/entities.d.ts +14 -0
- package/dist/core/ports/forms-catalog.d.ts +27 -0
- package/dist/core/ports/forms-catalog.js +2 -0
- package/dist/core/ports/forms.d.ts +3 -3
- package/dist/core/ports/identity.d.ts +1 -1
- package/dist/core/ports/identity.js +1 -1
- package/dist/core/ports/index.d.ts +3 -0
- package/dist/core/ports/media.d.ts +1 -1
- package/dist/core/ports/plugins.d.ts +1 -1
- package/dist/core/react/bind-react.d.ts +6 -16
- package/dist/core/react/bind-react.js +1 -1
- package/dist/core/react/index.d.ts +3 -2
- package/dist/core/react/index.js +3 -2
- package/dist/core/react/module-ui.d.ts +10 -0
- package/dist/core/react/module-ui.js +6 -0
- package/dist/core/react/use-controller.d.ts +1 -1
- package/dist/core/react/use-controller.js +2 -1
- package/dist/core/routing/route-template.d.ts +11 -0
- package/dist/core/routing/route-template.js +23 -0
- package/dist/core/transport/http.js +7 -5
- package/dist/core/transport/index.d.ts +0 -1
- package/dist/core/transport/index.js +0 -1
- package/dist/forms/adapters/http.js +2 -2
- package/dist/forms/adapters/memory.d.ts +1 -1
- package/dist/forms/adapters/memory.js +35 -26
- package/dist/forms/controllers/draft-store.d.ts +4 -4
- package/dist/forms/controllers/draft-store.js +1 -1
- package/dist/forms/controllers/field-attributes-dialog.controller.d.ts +7 -8
- package/dist/forms/controllers/field-attributes-dialog.controller.js +8 -6
- package/dist/forms/controllers/form-editor.controller.d.ts +8 -5
- package/dist/forms/controllers/form-editor.controller.js +2 -2
- package/dist/forms/controllers/form-fields-editor.controller.d.ts +4 -4
- package/dist/forms/controllers/form-submission-detail.controller.d.ts +4 -4
- package/dist/forms/controllers/form-submissions.controller.d.ts +4 -4
- package/dist/forms/controllers/forms-list.controller.d.ts +4 -4
- package/dist/forms/field-settings.d.ts +32 -16
- package/dist/forms/field-settings.js +52 -41
- package/dist/forms/forms.module.d.ts +5 -4
- package/dist/forms/forms.module.js +3 -3
- package/dist/forms/html-rules.d.ts +4 -2
- package/dist/forms/html-rules.js +19 -19
- package/dist/forms/index.d.ts +6 -4
- package/dist/forms/index.js +3 -3
- package/dist/forms/messages.en.js +1 -1
- package/dist/forms/models.d.ts +1 -1
- package/dist/forms/ports.d.ts +8 -4
- package/dist/forms/ports.js +3 -1
- package/dist/forms/react/components/FieldAttributesDialog.d.ts +4 -1
- package/dist/forms/react/components/FieldAttributesDialog.js +6 -28
- package/dist/forms/react/components/FieldAttributesStyling.d.ts +26 -0
- package/dist/forms/react/components/FieldAttributesStyling.js +42 -0
- package/dist/forms/react/components/FieldSettingsRows.js +3 -4
- package/dist/forms/react/components/FieldSettingsSection.d.ts +4 -1
- package/dist/forms/react/components/FieldSettingsSection.js +3 -3
- package/dist/forms/react/components/FormEditorFieldsBody.d.ts +5 -2
- package/dist/forms/react/components/FormEditorFieldsBody.js +3 -3
- package/dist/forms/react/components/FormEditorFieldsBodyParts.js +1 -1
- package/dist/forms/react/components/FormEditorFieldsSlot.d.ts +6 -0
- package/dist/forms/react/components/FormEditorFieldsSlot.js +10 -0
- package/dist/forms/react/components/FormEditorHeader.d.ts +9 -0
- package/dist/forms/react/components/FormEditorHeader.js +16 -0
- package/dist/forms/react/components/FormEditorHeaderText.d.ts +1 -1
- package/dist/forms/react/components/FormEditorHeaderText.js +1 -1
- package/dist/forms/react/components/FormEditorMainPanel.d.ts +1 -1
- package/dist/forms/react/components/FormEditorMainPanel.js +4 -4
- package/dist/forms/react/components/FormEditorTabStrip.d.ts +5 -2
- package/dist/forms/react/components/FormEditorTabStrip.js +3 -4
- package/dist/forms/react/components/FormFieldRow.d.ts +10 -0
- package/dist/forms/react/components/FormFieldRow.js +53 -0
- package/dist/forms/react/components/FormFieldsEditor.d.ts +4 -1
- package/dist/forms/react/components/FormFieldsEditor.js +6 -22
- package/dist/forms/react/components/FormFieldsTableParts.d.ts +10 -0
- package/dist/forms/react/components/FormFieldsTableParts.js +11 -0
- package/dist/forms/react/components/FormSubmissionDate.d.ts +1 -1
- package/dist/forms/react/components/FormSubmissionDate.js +1 -1
- package/dist/forms/react/components/FormSubmissionDetail.d.ts +4 -1
- package/dist/forms/react/components/FormSubmissionDetail.js +3 -3
- package/dist/forms/react/components/FormSubmissions.d.ts +6 -1
- package/dist/forms/react/components/FormSubmissions.js +3 -3
- package/dist/forms/react/components/FormSubmissionsTable.js +1 -1
- package/dist/forms/react/components/FormsListParts.d.ts +36 -0
- package/dist/forms/react/components/FormsListParts.js +41 -0
- package/dist/forms/react/hooks/FormsPorts.hooks.d.ts +7 -1
- package/dist/forms/react/hooks/FormsPorts.hooks.js +11 -1
- package/dist/forms/react/hooks/forms-view.hooks.d.ts +17 -11
- package/dist/forms/react/hooks/forms-view.hooks.js +13 -11
- package/dist/forms/react/hooks/use-field-attributes-dialog.hooks.d.ts +4 -1
- package/dist/forms/react/hooks/use-field-attributes-dialog.hooks.js +6 -4
- package/dist/forms/react/hooks/use-form-editor-parts.hooks.d.ts +127 -0
- package/dist/forms/react/hooks/use-form-editor-parts.hooks.js +223 -0
- package/dist/forms/react/hooks/use-form-editor.hooks.d.ts +13 -3
- package/dist/forms/react/hooks/use-form-editor.hooks.js +34 -210
- package/dist/forms/react/hooks/use-form-fields-editor.hooks.js +2 -2
- package/dist/forms/react/hooks/use-form-submission-detail.hooks.d.ts +2 -2
- package/dist/forms/react/hooks/use-form-submission-detail.hooks.js +4 -4
- package/dist/forms/react/hooks/use-form-submissions.hooks.d.ts +2 -2
- package/dist/forms/react/hooks/use-form-submissions.hooks.js +4 -5
- package/dist/forms/react/hooks/use-forms-list.hooks.js +3 -3
- package/dist/forms/react/index.d.ts +35 -26
- package/dist/forms/react/index.js +5 -6
- package/dist/forms/react/pages/FormEditor.d.ts +2 -2
- package/dist/forms/react/pages/FormEditor.js +7 -12
- package/dist/forms/react/pages/FormsList.d.ts +5 -2
- package/dist/forms/react/pages/FormsList.js +4 -30
- package/dist/forms/rules.d.ts +5 -5
- package/dist/forms/rules.js +8 -20
- package/dist/media/adapters/http.d.ts +24 -2
- package/dist/media/adapters/http.js +133 -10
- package/dist/media/adapters/memory.js +41 -46
- package/dist/media/conformance/media-api.conformance.js +60 -42
- package/dist/media/controllers/edit-media.controller.d.ts +5 -5
- package/dist/media/controllers/edit-media.controller.js +20 -17
- package/dist/media/controllers/library.controller.d.ts +14 -14
- package/dist/media/controllers/library.controller.js +180 -167
- package/dist/media/controllers/providers.controller.d.ts +4 -4
- package/dist/media/controllers/providers.controller.js +46 -40
- package/dist/media/html-attributes.d.ts +23 -13
- package/dist/media/html-attributes.js +15 -23
- package/dist/media/index.d.ts +5 -4
- package/dist/media/index.js +3 -3
- package/dist/media/media.module.d.ts +6 -5
- package/dist/media/media.module.js +3 -3
- package/dist/media/ports.d.ts +8 -3
- package/dist/media/ports.js +4 -1
- package/dist/media/react/components/EditMediaPanel.d.ts +4 -1
- package/dist/media/react/components/EditMediaPanel.js +3 -3
- package/dist/media/react/components/MediaCard.d.ts +7 -2
- package/dist/media/react/components/MediaCard.js +6 -6
- package/dist/media/react/components/MediaDialog.d.ts +4 -1
- package/dist/media/react/components/MediaDialog.js +3 -3
- package/dist/media/react/components/MediaGrid.d.ts +4 -1
- package/dist/media/react/components/MediaGrid.js +2 -2
- package/dist/media/react/components/MediaIcons.d.ts +9 -9
- package/dist/media/react/components/MediaIcons.js +9 -9
- package/dist/media/react/components/MediaLightbox.d.ts +4 -1
- package/dist/media/react/components/MediaLightbox.js +3 -3
- package/dist/media/react/components/MediaPicker.d.ts +4 -1
- package/dist/media/react/components/MediaPicker.js +3 -3
- package/dist/media/react/components/MediaPurgeDialog.d.ts +4 -1
- package/dist/media/react/components/MediaPurgeDialog.js +3 -3
- package/dist/media/react/components/UploadButton.d.ts +4 -1
- package/dist/media/react/components/UploadButton.js +3 -3
- package/dist/media/react/hooks/EditMediaPanel.hooks.d.ts +6 -3
- package/dist/media/react/hooks/EditMediaPanel.hooks.js +62 -50
- package/dist/media/react/hooks/LibraryTab.hooks.d.ts +23 -23
- package/dist/media/react/hooks/LibraryTab.hooks.js +52 -36
- package/dist/media/react/hooks/MediaCard.hooks.d.ts +1 -1
- package/dist/media/react/hooks/MediaCard.hooks.js +2 -1
- package/dist/media/react/hooks/MediaDialog.hooks.d.ts +1 -1
- package/dist/media/react/hooks/MediaPage.hooks.d.ts +22 -18
- package/dist/media/react/hooks/MediaPage.hooks.js +3 -3
- package/dist/media/react/hooks/MediaPicker.hooks.d.ts +1 -1
- package/dist/media/react/hooks/MediaPicker.hooks.js +2 -2
- package/dist/media/react/hooks/MediaPorts.hooks.d.ts +7 -0
- package/dist/media/react/hooks/MediaPorts.hooks.js +11 -1
- package/dist/media/react/hooks/MediaQuery.hooks.d.ts +3 -3
- package/dist/media/react/hooks/MediaQuery.hooks.js +1 -1
- package/dist/media/react/hooks/ProvidersTab.hooks.d.ts +7 -1
- package/dist/media/react/hooks/ProvidersTab.hooks.js +49 -46
- package/dist/media/react/index.d.ts +39 -114
- package/dist/media/react/index.js +55 -48
- package/dist/media/react/pages/MediaPage.d.ts +4 -1
- package/dist/media/react/pages/MediaPage.js +2 -2
- package/dist/media/react/tabs/LibraryTab.d.ts +5 -2
- package/dist/media/react/tabs/LibraryTab.js +3 -3
- package/dist/media/react/tabs/ProvidersTab.d.ts +5 -2
- package/dist/media/react/tabs/ProvidersTab.js +2 -2
- package/dist/media/rules.d.ts +0 -7
- package/dist/media/rules.js +0 -12
- package/dist/playground/controllers/playground.controller.d.ts +3 -3
- package/dist/playground/controllers/playground.controller.js +1 -1
- package/dist/playground/playground.module.d.ts +1 -1
- package/dist/playground/playground.module.js +1 -1
- package/dist/playground/react/components/Canvas.d.ts +5 -2
- package/dist/playground/react/components/Canvas.js +3 -3
- package/dist/playground/react/hooks/Canvas.hooks.d.ts +1 -1
- package/dist/playground/react/hooks/PlaygroundPage.hooks.d.ts +7 -3
- package/dist/playground/react/hooks/PlaygroundPorts.hooks.js +1 -1
- package/dist/playground/react/index.d.ts +9 -9
- package/dist/playground/react/pages/PlaygroundPage.d.ts +8 -2
- package/dist/playground/react/pages/PlaygroundPage.js +3 -3
- package/dist/playground/react/tabs/CanvasTab.d.ts +2 -2
- package/dist/playground/react/tabs/CanvasTab.js +1 -1
- package/dist/react/OverlayHost.d.ts +4 -1
- package/dist/react/OverlayHost.js +2 -2
- package/dist/react/components/ConfirmDialog/ConfirmDialog.d.ts +12 -2
- package/dist/react/components/ConfirmDialog/ConfirmDialog.hooks.js +1 -2
- package/dist/react/components/ConfirmDialog/ConfirmDialog.js +6 -4
- package/dist/react/components/ConfirmDialog/confirm-dialog-attrs.d.ts +1 -1
- package/dist/react/components/ConfirmDialog/confirm-dialog-attrs.js +1 -1
- package/dist/react/components/InteractiveHtmlEditor/InteractiveHtmlEditor.d.ts +2 -2
- package/dist/react/components/InteractiveHtmlEditor/InteractiveHtmlEditor.js +9 -8
- package/dist/react/components/RowMenu/RowMenu.hooks.js +66 -63
- package/dist/react/components/RowMenu/RowMenu.js +1 -1
- package/dist/react/components/Sidebar.d.ts +11 -4
- package/dist/react/components/Sidebar.js +11 -101
- package/dist/react/components/SidebarIcon.d.ts +4 -0
- package/dist/react/components/SidebarIcon.js +91 -0
- package/dist/react/components/ThemePreviewReloadControl.d.ts +7 -0
- package/dist/react/components/ThemePreviewReloadControl.js +5 -0
- package/dist/react/entities/EntityDetail.d.ts +4 -1
- package/dist/react/entities/EntityDetail.hooks.d.ts +14 -0
- package/dist/react/entities/EntityDetail.hooks.js +10 -0
- package/dist/react/entities/EntityDetail.js +3 -6
- package/dist/react/entities/EntityEdit.d.ts +6 -1
- package/dist/react/entities/EntityEdit.js +23 -6
- package/dist/react/entities/EntityField.d.ts +3 -1
- package/dist/react/entities/EntityField.js +9 -6
- package/dist/react/entities/EntityList.d.ts +4 -1
- package/dist/react/entities/EntityList.hooks.d.ts +33 -0
- package/dist/react/entities/EntityList.hooks.js +28 -0
- package/dist/react/entities/EntityList.js +3 -23
- package/dist/react/entities/FailureNotice.d.ts +29 -0
- package/dist/react/entities/FailureNotice.js +33 -0
- package/dist/react/entities/contribution.d.ts +2 -0
- package/dist/react/entities/contribution.js +2 -2
- package/dist/react/entities/rules.d.ts +6 -1
- package/dist/react/entities/rules.js +7 -4
- package/dist/react/entities/types.d.ts +19 -0
- package/dist/react/entities/use-entity-edit.d.ts +11 -2
- package/dist/react/entities/use-entity-edit.js +18 -12
- package/dist/react/entities/use-entity-read.d.ts +7 -2
- package/dist/react/entities/use-entity-read.js +9 -4
- package/dist/react/hooks/use-browser-telemetry-feed.d.ts +13 -0
- package/dist/react/hooks/use-browser-telemetry-feed.js +14 -0
- package/dist/react/hooks/use-overflow-title.d.ts +17 -0
- package/dist/react/hooks/use-overflow-title.js +29 -0
- package/dist/react/hooks/use-process-restart.d.ts +46 -0
- package/dist/react/hooks/use-process-restart.js +59 -0
- package/dist/react/hooks/use-rail-label-titles.d.ts +18 -0
- package/dist/react/hooks/use-rail-label-titles.js +44 -0
- package/dist/react/index.d.ts +6 -0
- package/dist/react/index.js +5 -0
- package/dist/react/kit-media-providers.d.ts +187 -0
- package/dist/react/kit-media-providers.js +2 -0
- package/dist/react/kit.d.ts +478 -0
- package/dist/react/kit.js +75 -0
- package/dist/react/overlays.d.ts +4 -4
- package/dist/react/overlays.js +1 -1
- package/dist/react/shell/AdminShell.d.ts +2 -2
- package/dist/react/shell/AdminShell.js +56 -24
- package/dist/react/shell/index.d.ts +1 -1
- package/dist/react/shell/model.d.ts +9 -1
- package/dist/react/shell/model.js +31 -15
- package/dist/react/shell/shell-hooks.d.ts +34 -0
- package/dist/react/shell/shell-hooks.js +31 -0
- package/dist/react/shell/theme-ports.d.ts +1 -1
- package/dist/react/shell/types.d.ts +97 -3
- package/dist/react/shell/use-admin-theme.d.ts +4 -2
- package/dist/react/shell/use-admin-theme.js +4 -3
- package/dist/react/testing-kit-media-providers.d.ts +3 -0
- package/dist/react/testing-kit-media-providers.js +96 -0
- package/dist/react/testing-kit.d.ts +11 -0
- package/dist/react/testing-kit.js +114 -0
- package/dist/redirects/adapters/memory.js +42 -33
- package/dist/redirects/conformance/redirects-api.conformance.js +1 -1
- package/dist/redirects/controllers/hit-count.controller.d.ts +5 -5
- package/dist/redirects/controllers/hit-count.controller.js +1 -1
- package/dist/redirects/controllers/import-redirects.controller.d.ts +5 -5
- package/dist/redirects/controllers/import-redirects.controller.js +1 -1
- package/dist/redirects/controllers/redirects.controller.d.ts +5 -5
- package/dist/redirects/controllers/redirects.controller.js +1 -1
- package/dist/redirects/index.d.ts +11 -7
- package/dist/redirects/index.js +6 -7
- package/dist/redirects/ports.d.ts +2 -2
- package/dist/redirects/ports.js +1 -1
- package/dist/redirects/react/components/CreateRedirectForm.d.ts +17 -0
- package/dist/redirects/react/components/CreateRedirectForm.js +19 -0
- package/dist/redirects/react/components/HitCountCell.js +2 -2
- package/dist/redirects/react/components/ImportRedirectsForm.js +1 -1
- package/dist/redirects/react/hooks/RedirectsPage.hooks.d.ts +1 -1
- package/dist/redirects/react/hooks/RedirectsPorts.hooks.d.ts +5 -0
- package/dist/redirects/react/hooks/RedirectsPorts.hooks.js +11 -1
- package/dist/redirects/react/hooks/use-hit-count-cell.hooks.js +3 -3
- package/dist/redirects/react/hooks/use-import-redirects-form.hooks.js +4 -4
- package/dist/redirects/react/hooks/use-redirects.hooks.d.ts +1 -1
- package/dist/redirects/react/hooks/use-redirects.hooks.js +4 -4
- package/dist/redirects/react/hooks/wired.hooks.d.ts +1 -1
- package/dist/redirects/react/index.d.ts +25 -90
- package/dist/redirects/react/index.js +6 -7
- package/dist/redirects/react/pages/RedirectsPage.d.ts +3 -1
- package/dist/redirects/react/pages/RedirectsPage.js +5 -5
- package/dist/redirects/redirects.module.d.ts +2 -2
- package/dist/redirects/redirects.module.js +1 -1
- package/dist/security/controllers/access-tokens.controller.d.ts +4 -4
- package/dist/security/controllers/access-tokens.controller.js +20 -15
- package/dist/security/controllers/other-credentials.controller.d.ts +4 -4
- package/dist/security/controllers/other-credentials.controller.js +1 -1
- package/dist/security/controllers/root-key.controller.d.ts +4 -4
- package/dist/security/controllers/root-key.controller.js +1 -1
- package/dist/security/ports.d.ts +3 -3
- package/dist/security/ports.js +1 -1
- package/dist/security/react/components/CredentialEditor.d.ts +4 -2
- package/dist/security/react/components/CredentialEditor.js +3 -3
- package/dist/security/react/hooks/AccessTokensTab.hooks.d.ts +5 -5
- package/dist/security/react/hooks/RootKeyTab.hooks.d.ts +1 -1
- package/dist/security/react/hooks/SecurityPage.hooks.d.ts +7 -3
- package/dist/security/react/hooks/SecurityPorts.hooks.js +1 -1
- package/dist/security/react/index.d.ts +22 -22
- package/dist/security/react/pages/SecurityPage.d.ts +8 -2
- package/dist/security/react/pages/SecurityPage.js +3 -3
- package/dist/security/react/tabs/AccessTokensTab.d.ts +5 -2
- package/dist/security/react/tabs/AccessTokensTab.js +3 -3
- package/dist/security/react/tabs/RootKeyTab.d.ts +5 -2
- package/dist/security/react/tabs/RootKeyTab.js +3 -3
- package/dist/security/rules.d.ts +1 -1
- package/dist/security/security.module.d.ts +4 -4
- package/dist/security/security.module.js +1 -1
- package/dist/seo/controllers/entry-picker.controller.d.ts +7 -7
- package/dist/seo/controllers/entry-picker.controller.js +1 -1
- package/dist/seo/controllers/entry-section.controller.d.ts +9 -9
- package/dist/seo/controllers/entry-section.controller.js +1 -1
- package/dist/seo/controllers/media-ref.controller.d.ts +9 -9
- package/dist/seo/controllers/media-ref.controller.js +1 -1
- package/dist/seo/controllers/seo-entry.controller.d.ts +7 -7
- package/dist/seo/controllers/seo-entry.controller.js +1 -1
- package/dist/seo/controllers/seo.controller.d.ts +7 -7
- package/dist/seo/controllers/seo.controller.js +1 -1
- package/dist/seo/controllers/sitemap.controller.d.ts +7 -7
- package/dist/seo/controllers/sitemap.controller.js +2 -2
- package/dist/seo/index.d.ts +4 -2
- package/dist/seo/index.js +2 -2
- package/dist/seo/ports.d.ts +2 -2
- package/dist/seo/ports.js +1 -1
- package/dist/seo/react/components/AnalyzePanel.d.ts +13 -0
- package/dist/seo/react/components/AnalyzePanel.js +21 -0
- package/dist/seo/react/components/EntryPicker.d.ts +19 -0
- package/dist/seo/react/components/EntryPicker.js +25 -0
- package/dist/seo/react/components/MediaPickerBridge.d.ts +4 -1
- package/dist/seo/react/components/MediaPickerBridge.js +2 -2
- package/dist/seo/react/components/MediaRefField.d.ts +5 -2
- package/dist/seo/react/components/MediaRefField.js +5 -5
- package/dist/seo/react/components/SeoEntryFields.d.ts +19 -0
- package/dist/seo/react/components/SeoEntryFields.js +19 -0
- package/dist/seo/react/components/SeoEntryPanel.d.ts +31 -0
- package/dist/seo/react/components/SeoEntryPanel.js +64 -0
- package/dist/seo/react/components/SeoIcons.d.ts +3 -3
- package/dist/seo/react/components/SeoIcons.js +3 -3
- package/dist/seo/react/components/SeoSection.d.ts +27 -0
- package/dist/seo/react/components/SeoSection.js +24 -0
- package/dist/seo/react/components/SitemapModal.d.ts +42 -2
- package/dist/seo/react/components/SitemapModal.js +17 -17
- package/dist/seo/react/hooks/MediaRefField.hooks.js +6 -6
- package/dist/seo/react/hooks/SeoModuleTabs.d.ts +2 -2
- package/dist/seo/react/hooks/SeoModuleTabs.js +3 -1
- package/dist/seo/react/hooks/SeoPage.hooks.d.ts +2 -2
- package/dist/seo/react/hooks/SeoPorts.hooks.d.ts +5 -0
- package/dist/seo/react/hooks/SeoPorts.hooks.js +11 -1
- package/dist/seo/react/hooks/SeoQuery.hooks.d.ts +3 -3
- package/dist/seo/react/hooks/SeoQuery.hooks.js +1 -1
- package/dist/seo/react/hooks/SitemapModal.hooks.js +1 -1
- package/dist/seo/react/hooks/use-entry-picker.hooks.js +1 -1
- package/dist/seo/react/hooks/use-seo-entry-panel.hooks.js +3 -3
- package/dist/seo/react/hooks/use-seo-entry-section.hooks.js +2 -2
- package/dist/seo/react/hooks/use-seo.hooks.js +3 -3
- package/dist/seo/react/hooks/use-share-image-warning.hooks.js +1 -1
- package/dist/seo/react/hooks/use-sitemap-modal.hooks.d.ts +4 -1
- package/dist/seo/react/hooks/use-sitemap-modal.hooks.js +6 -5
- package/dist/seo/react/index.d.ts +28 -21
- package/dist/seo/react/index.js +5 -6
- package/dist/seo/react/pages/SeoPage.d.ts +16 -82
- package/dist/seo/react/pages/SeoPage.js +29 -216
- package/dist/seo/react/tabs/SeoDefaultsSections.d.ts +19 -0
- package/dist/seo/react/tabs/SeoDefaultsSections.js +48 -0
- package/dist/seo/react/tabs/SeoDefaultsTab.d.ts +24 -0
- package/dist/seo/react/tabs/SeoDefaultsTab.js +30 -0
- package/dist/seo/react/tabs/SeoSitemapTab.d.ts +24 -0
- package/dist/seo/react/tabs/SeoSitemapTab.js +38 -0
- package/dist/seo/rules.d.ts +3 -3
- package/dist/seo/rules.js +6 -6
- package/dist/seo/seo.module.d.ts +3 -3
- package/dist/seo/seo.module.js +1 -1
- package/dist/source-control/controllers/source-control.controller.d.ts +3 -3
- package/dist/source-control/controllers/source-control.controller.js +1 -1
- package/dist/source-control/ports.d.ts +1 -1
- package/dist/source-control/ports.js +1 -1
- package/dist/source-control/react/components/SourceControlCredentialFields.d.ts +4 -2
- package/dist/source-control/react/components/SourceControlCredentialFields.js +3 -3
- package/dist/source-control/react/components/SourceControlProviderRow.d.ts +1 -1
- package/dist/source-control/react/components/SourceControlProviderRow.js +2 -2
- package/dist/source-control/react/hooks/ProvidersTab.hooks.d.ts +1 -1
- package/dist/source-control/react/hooks/ProvidersTab.hooks.js +2 -2
- package/dist/source-control/react/hooks/SourceControlPage.hooks.d.ts +7 -3
- package/dist/source-control/react/hooks/SourceControlPorts.hooks.d.ts +5 -0
- package/dist/source-control/react/hooks/SourceControlPorts.hooks.js +11 -1
- package/dist/source-control/react/index.d.ts +25 -50
- package/dist/source-control/react/index.js +9 -6
- package/dist/source-control/react/pages/SourceControlPage.d.ts +8 -2
- package/dist/source-control/react/pages/SourceControlPage.js +3 -3
- package/dist/source-control/react/tabs/ProvidersTab.d.ts +5 -2
- package/dist/source-control/react/tabs/ProvidersTab.js +3 -3
- package/dist/source-control/source-control.module.d.ts +2 -2
- package/dist/source-control/source-control.module.js +1 -1
- package/dist/widgets/adapters/http.js +2 -2
- package/dist/widgets/adapters/memory.js +26 -20
- package/dist/widgets/controllers/instance-editor.controller.d.ts +3 -3
- package/dist/widgets/controllers/instance-editor.controller.js +48 -38
- package/dist/widgets/controllers/library.controller.d.ts +3 -3
- package/dist/widgets/controllers/library.controller.js +1 -2
- package/dist/widgets/controllers/region-editor.controller.d.ts +3 -3
- package/dist/widgets/controllers/region-editor.controller.js +5 -5
- package/dist/widgets/controllers/regions.controller.d.ts +3 -3
- package/dist/widgets/controllers/regions.controller.js +1 -2
- package/dist/widgets/index.d.ts +2 -1
- package/dist/widgets/index.js +1 -1
- package/dist/widgets/messages.en.js +1 -1
- package/dist/widgets/ports.d.ts +3 -3
- package/dist/widgets/ports.js +1 -1
- package/dist/widgets/react/components/RegionPlacementRow.d.ts +14 -0
- package/dist/widgets/react/components/RegionPlacementRow.js +8 -0
- package/dist/widgets/react/components/TrashWidgetDialog.d.ts +11 -0
- package/dist/widgets/react/components/TrashWidgetDialog.js +8 -0
- package/dist/widgets/react/components/WidgetInstanceNotices.js +1 -1
- package/dist/widgets/react/components/WidgetPageHeaders.d.ts +42 -0
- package/dist/widgets/react/components/WidgetPageHeaders.js +54 -0
- package/dist/widgets/react/components/WidgetRegionEditorHeaderActions.js +1 -1
- package/dist/widgets/react/components/WidgetTableColumns.d.ts +12 -0
- package/dist/widgets/react/components/WidgetTableColumns.js +47 -0
- package/dist/widgets/react/hooks/WidgetsPorts.hooks.d.ts +12 -7
- package/dist/widgets/react/hooks/WidgetsPorts.hooks.js +11 -0
- package/dist/widgets/react/hooks/WidgetsQuery.hooks.d.ts +2 -2
- package/dist/widgets/react/hooks/WidgetsQuery.hooks.js +1 -1
- package/dist/widgets/react/hooks/page-views.hooks.d.ts +1 -1
- package/dist/widgets/react/hooks/page-views.hooks.js +1 -1
- package/dist/widgets/react/hooks/use-widget-instance-editor.hooks.d.ts +2 -2
- package/dist/widgets/react/hooks/use-widget-instance-editor.hooks.js +3 -3
- package/dist/widgets/react/hooks/use-widget-region-editor.hooks.d.ts +1 -1
- package/dist/widgets/react/hooks/use-widget-region-editor.hooks.js +2 -2
- package/dist/widgets/react/hooks/use-widget-regions.hooks.d.ts +3 -1
- package/dist/widgets/react/hooks/use-widget-regions.hooks.js +7 -6
- package/dist/widgets/react/hooks/use-widgets-library.hooks.d.ts +4 -2
- package/dist/widgets/react/hooks/use-widgets-library.hooks.js +7 -6
- package/dist/widgets/react/index.d.ts +41 -34
- package/dist/widgets/react/index.js +5 -6
- package/dist/widgets/react/pages/WidgetInstanceEditor.d.ts +5 -1
- package/dist/widgets/react/pages/WidgetInstanceEditor.js +7 -9
- package/dist/widgets/react/pages/WidgetRegionEditor.d.ts +5 -1
- package/dist/widgets/react/pages/WidgetRegionEditor.js +8 -10
- package/dist/widgets/react/pages/WidgetRegions.d.ts +5 -1
- package/dist/widgets/react/pages/WidgetRegions.js +6 -8
- package/dist/widgets/react/pages/WidgetsLibrary.d.ts +5 -1
- package/dist/widgets/react/pages/WidgetsLibrary.js +8 -45
- package/dist/widgets/rules.d.ts +5 -3
- package/dist/widgets/rules.js +4 -9
- package/dist/widgets/widgets.module.d.ts +3 -3
- package/dist/widgets/widgets.module.js +1 -1
- package/package.json +23 -57
- package/dist/consent/react/ConsentFields.d.ts +0 -39
- package/dist/consent/react/ConsentFields.js +0 -87
- package/dist/consent/react/ConsentPreviewFrame.d.ts +0 -14
- package/dist/consent/react/ConsentPreviewFrame.js +0 -14
- package/dist/consent/react/ConsentSettingsPanel.d.ts +0 -54
- package/dist/consent/react/ConsentSettingsPanel.js +0 -13
- package/dist/consent/react/index.d.ts +0 -8
- package/dist/consent/react/index.js +0 -4
- package/dist/consent/react/settings-panel.hooks.d.ts +0 -49
- package/dist/consent/react/settings-panel.hooks.js +0 -57
- package/dist/core/module/controller-store.d.ts +0 -22
- package/dist/core/module/controller-store.js +0 -32
- package/dist/core/module/define-admin-module.d.ts +0 -4
- package/dist/core/module/define-admin-module.js +0 -5
- package/dist/core/module/token.d.ts +0 -19
- package/dist/core/module/token.js +0 -4
- package/dist/core/module/types.d.ts +0 -79
- package/dist/core/module/types.js +0 -2
- package/dist/core/permissions/rules.d.ts +0 -35
- package/dist/core/permissions/rules.js +0 -34
- package/dist/core/transport/errors.d.ts +0 -62
- package/dist/core/transport/errors.js +0 -63
- package/dist/core/transport/query-suffix.d.ts +0 -3
- package/dist/core/transport/query-suffix.js +0 -5
- package/dist/media/styles.d.ts +0 -4
- package/dist/media/styles.js +0 -5
- package/dist/react/bind-react.d.ts +0 -2
- package/dist/react/bind-react.js +0 -3
- package/dist/react/use-controller.d.ts +0 -2
- package/dist/react/use-controller.js +0 -3
|
@@ -14,7 +14,7 @@ export declare function useRedirects({ api }: {
|
|
|
14
14
|
events?: RedirectsEventsPort;
|
|
15
15
|
}): {
|
|
16
16
|
redirects: readonly AdminRedirect[] | undefined;
|
|
17
|
-
listStatus: import("@jini-ai/
|
|
17
|
+
listStatus: import("@jini-ai/core/fetch").QueryStatus;
|
|
18
18
|
listError: Error | null;
|
|
19
19
|
error: Error | null;
|
|
20
20
|
saving: boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useCallback, useEffect, useRef } from 'react';
|
|
2
|
-
import { useFetchQuery, useFetchMutation, useInvalidate } from '
|
|
3
|
-
import { buildAgentListHandles } from '@jini-ai/
|
|
4
|
-
import {
|
|
2
|
+
import { useFetchQuery, useFetchMutation, useInvalidate } from '../../../react/kit.js';
|
|
3
|
+
import { buildAgentListHandles } from '@jini-ai/core/agent-handles';
|
|
4
|
+
import { useRedirectsController } from './RedirectsPorts.hooks.js';
|
|
5
5
|
import { createRedirectsController } from '../../controllers/redirects.controller.js';
|
|
6
6
|
import { KEYS, buildCreateRedirectPayload, nextRedirectStatus, firstWriteError, isAnyWritePending, visibleRedirectsError } from '../../rules.js';
|
|
7
7
|
import { translateRedirectsEn } from '../../messages.en.js';
|
|
@@ -37,7 +37,7 @@ export function useRedirects({ api }, { t = translateRedirectsEn, locale = 'en',
|
|
|
37
37
|
write.reset();
|
|
38
38
|
},
|
|
39
39
|
};
|
|
40
|
-
const { controller, snapshot } =
|
|
40
|
+
const { controller, snapshot } = useRedirectsController({ create: () => createRedirectsController({ actions: () => actions.current }), dependencies: [] });
|
|
41
41
|
const redirects = list.data;
|
|
42
42
|
const createRedirect = (form) => controller?.createRedirect({ form }) ?? Promise.resolve(false);
|
|
43
43
|
function submitCreate(e) {
|
|
@@ -4,7 +4,7 @@ import type { RedirectsTranslate } from '../../models.js';
|
|
|
4
4
|
/** Resolve localization once for the list; every row receives that bound translator. */
|
|
5
5
|
export declare function useWiredRedirects(_required?: Record<string, never>, _optional?: {}): {
|
|
6
6
|
redirects: readonly import("../../index.js").AdminRedirect[] | undefined;
|
|
7
|
-
listStatus: import("@jini-ai/
|
|
7
|
+
listStatus: import("@jini-ai/core/fetch").QueryStatus;
|
|
8
8
|
listError: Error | null;
|
|
9
9
|
error: Error | null;
|
|
10
10
|
saving: boolean;
|
|
@@ -1,19 +1,28 @@
|
|
|
1
|
+
import { type ComponentType, type ReactNode } from 'react';
|
|
2
|
+
import type { AdminInstance, AdminModuleUi } from '@jini-ai/core/contracts/admin-module';
|
|
1
3
|
import type { RedirectsReactOptions } from './hooks/RedirectsOptions.hooks.js';
|
|
2
4
|
export type { RedirectsReactOptions, RedirectsRenderMessageInput } from './hooks/RedirectsOptions.hooks.js';
|
|
3
|
-
export { useRedirectsPorts } from './hooks/RedirectsPorts.hooks.js';
|
|
5
|
+
export { useRedirectsPorts, RedirectsControllerContext } from './hooks/RedirectsPorts.hooks.js';
|
|
4
6
|
export { useRedirects } from './hooks/use-redirects.hooks.js';
|
|
5
7
|
export { useHitCountCell } from './hooks/use-hit-count-cell.hooks.js';
|
|
6
8
|
export { useImportRedirectsForm } from './hooks/use-import-redirects-form.hooks.js';
|
|
9
|
+
/** The host injects the renderer helpers; this module states the contract and imports no implementation. */
|
|
10
|
+
type ModuleUi<Page, Tab> = AdminModuleUi<Page, Tab, ComponentType<{
|
|
11
|
+
admin: AdminInstance;
|
|
12
|
+
children: ReactNode;
|
|
13
|
+
}>>;
|
|
7
14
|
/** Instance-scoped options and lazy list page; host supplies publish action and localized markup.
|
|
8
|
-
* @example redirects({}, { t, headerActions, slots: { renderMessage } });
|
|
15
|
+
* @example redirects({ ui }, { t, headerActions, slots: { renderMessage } });
|
|
9
16
|
*/
|
|
10
|
-
export declare function redirects
|
|
17
|
+
export declare function redirects<Page, Tab>({ ui }: {
|
|
18
|
+
ui: ModuleUi<Page, Tab>;
|
|
19
|
+
}, options?: RedirectsReactOptions): {
|
|
11
20
|
id: "redirects";
|
|
12
21
|
requires: {
|
|
13
|
-
readonly redirectsApi: import("
|
|
22
|
+
readonly redirectsApi: import("@jini-ai/core/contracts/admin-module").AdminPortToken<import("../ports.js").AdminRedirectsPort, "admin.redirects.api">;
|
|
14
23
|
};
|
|
15
24
|
optional: {
|
|
16
|
-
readonly redirectsEvents: import("
|
|
25
|
+
readonly redirectsEvents: import("@jini-ai/core/contracts/admin-module").AdminPortToken<import("../ports.js").RedirectsEventsPort, "admin.redirects.events">;
|
|
17
26
|
};
|
|
18
27
|
messages: {
|
|
19
28
|
readonly "Loading\u2026": "Loading…";
|
|
@@ -83,93 +92,19 @@ export declare function redirects(_required: Record<string, never>, options?: Re
|
|
|
83
92
|
};
|
|
84
93
|
} & {
|
|
85
94
|
react: {
|
|
86
|
-
Provider: ({ admin, children, options: currentOptions }:
|
|
87
|
-
admin:
|
|
88
|
-
children:
|
|
89
|
-
}
|
|
90
|
-
readonly id: "redirects";
|
|
91
|
-
readonly requires: {
|
|
92
|
-
readonly redirectsApi: import("../../core/module/token.js").AdminPortToken<import("../ports.js").AdminRedirectsPort, "admin.redirects.api">;
|
|
93
|
-
};
|
|
94
|
-
readonly optional: {
|
|
95
|
-
readonly redirectsEvents: import("../../core/module/token.js").AdminPortToken<import("../ports.js").RedirectsEventsPort, "admin.redirects.events">;
|
|
96
|
-
};
|
|
97
|
-
readonly messages: {
|
|
98
|
-
readonly "Loading\u2026": "Loading…";
|
|
99
|
-
readonly "Load hits": "Load hits";
|
|
100
|
-
readonly "Bulk import": "Bulk import";
|
|
101
|
-
readonly "rule objects (1-500 items)": "rule objects (1-500 items)";
|
|
102
|
-
readonly "Importing\u2026": "Importing…";
|
|
103
|
-
readonly Import: "Import";
|
|
104
|
-
readonly Marketing: "Marketing";
|
|
105
|
-
readonly Redirects: "Redirects";
|
|
106
|
-
readonly "Manage URL redirects, including those created automatically when a page's address changes.": "Manage URL redirects, including those created automatically when a page's address changes.";
|
|
107
|
-
readonly "Match type": "Match type";
|
|
108
|
-
readonly "From path": "From path";
|
|
109
|
-
readonly "To target": "To target";
|
|
110
|
-
readonly "Status code": "Status code";
|
|
111
|
-
readonly "301 (permanent)": "301 (permanent)";
|
|
112
|
-
readonly "302 (temporary)": "302 (temporary)";
|
|
113
|
-
readonly "307 (temporary, method-preserving)": "307 (temporary, method-preserving)";
|
|
114
|
-
readonly "308 (permanent, method-preserving)": "308 (permanent, method-preserving)";
|
|
115
|
-
readonly "Add redirect": "Add redirect";
|
|
116
|
-
readonly "No redirect rules yet.": "No redirect rules yet.";
|
|
117
|
-
readonly From: "From";
|
|
118
|
-
readonly To: "To";
|
|
119
|
-
readonly Type: "Type";
|
|
120
|
-
readonly Code: "Code";
|
|
121
|
-
readonly Source: "Source";
|
|
122
|
-
readonly Hits: "Hits";
|
|
123
|
-
readonly "Delete redirect rule?": "Delete redirect rule?";
|
|
124
|
-
readonly "Loading redirects\u2026": "Loading redirects…";
|
|
125
|
-
readonly "Not valid JSON.": "Not valid JSON.";
|
|
126
|
-
readonly "Must be a JSON array of rule objects.": "Must be a JSON array of rule objects.";
|
|
127
|
-
readonly exact: "Exact match";
|
|
128
|
-
readonly prefix: "Starts with";
|
|
129
|
-
readonly wildcard: "Wildcard";
|
|
130
|
-
readonly Status: "Status";
|
|
131
|
-
readonly More: "More";
|
|
132
|
-
readonly Delete: "Delete";
|
|
133
|
-
readonly Disable: "Disable";
|
|
134
|
-
readonly Enable: "Enable";
|
|
135
|
-
readonly "Saving\u2026": "Saving…";
|
|
136
|
-
readonly Created: "Created";
|
|
137
|
-
readonly active: "Active";
|
|
138
|
-
readonly disabled: "Disabled";
|
|
139
|
-
readonly "{created} created, {failed} failed.": "{created} created, {failed} failed.";
|
|
140
|
-
readonly "Item {index} ({code})": "Item {index} ({code})";
|
|
141
|
-
readonly "Actions for redirect rule from \"{fromPattern}\"": "Actions for redirect rule from \"{fromPattern}\"";
|
|
142
|
-
readonly "Paste a JSON array of ": "Paste a JSON array of ";
|
|
143
|
-
readonly " rule objects (1-500 items)": " rule objects (1-500 items)";
|
|
144
|
-
readonly "Delete the redirect rule from \"": "Delete the redirect rule from \"";
|
|
145
|
-
readonly "\"?": "\"?";
|
|
146
|
-
readonly manual: "Manual";
|
|
147
|
-
readonly auto_slug_change: "URL change";
|
|
148
|
-
readonly import: "Imported";
|
|
149
|
-
};
|
|
150
|
-
readonly pages: {
|
|
151
|
-
readonly list: {
|
|
152
|
-
readonly path: "/redirects";
|
|
153
|
-
readonly label: "Redirects";
|
|
154
|
-
readonly permissions: readonly ["admin.redirects.manage"];
|
|
155
|
-
readonly agentReachable: true;
|
|
156
|
-
readonly nav: {
|
|
157
|
-
readonly group: "marketing";
|
|
158
|
-
readonly icon: "arrow-right";
|
|
159
|
-
};
|
|
160
|
-
readonly tabs: {};
|
|
161
|
-
};
|
|
162
|
-
};
|
|
163
|
-
}> | null>>>[0] & {
|
|
95
|
+
Provider: ({ admin, children, options: currentOptions }: {
|
|
96
|
+
admin: AdminInstance;
|
|
97
|
+
children: ReactNode;
|
|
98
|
+
} & {
|
|
164
99
|
options?: RedirectsReactOptions;
|
|
165
100
|
}) => import("react").FunctionComponentElement<import("react").ProviderProps<RedirectsReactOptions>>;
|
|
166
101
|
module: {
|
|
167
102
|
readonly id: "redirects";
|
|
168
103
|
readonly requires: {
|
|
169
|
-
readonly redirectsApi: import("
|
|
104
|
+
readonly redirectsApi: import("@jini-ai/core/contracts/admin-module").AdminPortToken<import("../ports.js").AdminRedirectsPort, "admin.redirects.api">;
|
|
170
105
|
};
|
|
171
106
|
readonly optional: {
|
|
172
|
-
readonly redirectsEvents: import("
|
|
107
|
+
readonly redirectsEvents: import("@jini-ai/core/contracts/admin-module").AdminPortToken<import("../ports.js").RedirectsEventsPort, "admin.redirects.events">;
|
|
173
108
|
};
|
|
174
109
|
readonly messages: {
|
|
175
110
|
readonly "Loading\u2026": "Loading…";
|
|
@@ -240,17 +175,17 @@ export declare function redirects(_required: Record<string, never>, options?: Re
|
|
|
240
175
|
};
|
|
241
176
|
pages: {
|
|
242
177
|
readonly list: {
|
|
243
|
-
Page:
|
|
244
|
-
tabs: {};
|
|
178
|
+
readonly Page: Page;
|
|
179
|
+
readonly tabs: {};
|
|
245
180
|
};
|
|
246
181
|
};
|
|
247
|
-
usePorts
|
|
182
|
+
usePorts(required?: Record<string, never>, optional?: Record<string, never>): import("@jini-ai/core/contracts/admin-module").ScopedPorts<{
|
|
248
183
|
readonly id: "redirects";
|
|
249
184
|
readonly requires: {
|
|
250
|
-
readonly redirectsApi: import("
|
|
185
|
+
readonly redirectsApi: import("@jini-ai/core/contracts/admin-module").AdminPortToken<import("../ports.js").AdminRedirectsPort, "admin.redirects.api">;
|
|
251
186
|
};
|
|
252
187
|
readonly optional: {
|
|
253
|
-
readonly redirectsEvents: import("
|
|
188
|
+
readonly redirectsEvents: import("@jini-ai/core/contracts/admin-module").AdminPortToken<import("../ports.js").RedirectsEventsPort, "admin.redirects.events">;
|
|
254
189
|
};
|
|
255
190
|
readonly messages: {
|
|
256
191
|
readonly "Loading\u2026": "Loading…";
|
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
import { createElement } from 'react';
|
|
2
|
-
import { bindReact } from '../../core/react/bind-react.js';
|
|
3
2
|
import { redirectsModule } from '../redirects.module.js';
|
|
4
|
-
import { RedirectsPortsContext } from './hooks/RedirectsPorts.hooks.js';
|
|
3
|
+
import { RedirectsPortsContext, RedirectsControllerContext } from './hooks/RedirectsPorts.hooks.js';
|
|
5
4
|
import { RedirectsOptionsContext } from './hooks/RedirectsOptions.hooks.js';
|
|
6
|
-
export { useRedirectsPorts } from './hooks/RedirectsPorts.hooks.js';
|
|
5
|
+
export { useRedirectsPorts, RedirectsControllerContext } from './hooks/RedirectsPorts.hooks.js';
|
|
7
6
|
export { useRedirects } from './hooks/use-redirects.hooks.js';
|
|
8
7
|
export { useHitCountCell } from './hooks/use-hit-count-cell.hooks.js';
|
|
9
8
|
export { useImportRedirectsForm } from './hooks/use-import-redirects-form.hooks.js';
|
|
10
9
|
/** Instance-scoped options and lazy list page; host supplies publish action and localized markup.
|
|
11
|
-
* @example redirects({}, { t, headerActions, slots: { renderMessage } });
|
|
10
|
+
* @example redirects({ ui }, { t, headerActions, slots: { renderMessage } });
|
|
12
11
|
*/
|
|
13
|
-
export function redirects(
|
|
14
|
-
const react = bindReact({ module: redirectsModule, views: { list: { tabs: {}, page: async () => {
|
|
12
|
+
export function redirects({ ui }, options = {}) {
|
|
13
|
+
const react = ui.bindReact({ module: redirectsModule, views: { list: { tabs: {}, page: async () => {
|
|
15
14
|
const { RedirectsPage } = await import('./pages/RedirectsPage.js');
|
|
16
15
|
return { default: () => createElement(RedirectsPage) };
|
|
17
16
|
} } } }, { context: RedirectsPortsContext });
|
|
@@ -21,7 +20,7 @@ export function redirects(_required, options = {}) {
|
|
|
21
20
|
* @example createElement(feature.react.Provider, { admin, options: localizedOptions, children });
|
|
22
21
|
*/
|
|
23
22
|
function Provider({ admin, children, options: currentOptions = options }) {
|
|
24
|
-
return createElement(RedirectsOptionsContext.Provider, { value: currentOptions }, createElement(ScopeProvider, { admin, children }));
|
|
23
|
+
return createElement(RedirectsOptionsContext.Provider, { value: currentOptions }, createElement(RedirectsControllerContext.Provider, { value: ui.useController }, createElement(ScopeProvider, { admin, children })));
|
|
25
24
|
}
|
|
26
25
|
return Object.assign({ ...redirectsModule }, { react: { ...react, Provider } });
|
|
27
26
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { useWiredRedirects } from '../hooks/wired.hooks.js';
|
|
2
|
+
import { useRedirectsPage } from '../hooks/RedirectsPage.hooks.js';
|
|
2
3
|
/** Redirects list markup. The original fetch-query pilot rationale is retained in SOURCE-RATIONALE.md.
|
|
3
4
|
* Controllers own local state; hooks bind query effects, table projections and the host's translator.
|
|
4
5
|
* Locale is supplied once per scope, never fetched independently by each row.
|
|
@@ -10,6 +11,7 @@ export interface RedirectsProps {
|
|
|
10
11
|
* nothing and behave exactly as before. See `PostsProps.usePostsHook` for the full rationale.
|
|
11
12
|
*/
|
|
12
13
|
useRedirectsHook?: typeof useWiredRedirects;
|
|
14
|
+
useRedirectsPageHook?: typeof useRedirectsPage;
|
|
13
15
|
}
|
|
14
|
-
export declare function RedirectsPage({ useRedirectsHook }?: RedirectsProps): import("react").JSX.Element;
|
|
16
|
+
export declare function RedirectsPage({ useRedirectsHook, useRedirectsPageHook }?: RedirectsProps): import("react").JSX.Element;
|
|
15
17
|
//# sourceMappingURL=RedirectsPage.d.ts.map
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { DataTable } from '../../../react/components/DataTable.js';
|
|
3
3
|
import { ConfirmDialog } from '../../../react/components/ConfirmDialog/ConfirmDialog.js';
|
|
4
|
-
import {
|
|
5
|
-
import { describeApiError } from '../../../core/transport/errors.js';
|
|
4
|
+
import { describeApiError } from '@jini-ai/core/admin-runtime';
|
|
6
5
|
import { ImportRedirectsForm } from '../components/ImportRedirectsForm.js';
|
|
6
|
+
import { CreateRedirectForm, RedirectsHeader } from '../components/CreateRedirectForm.js';
|
|
7
7
|
import { useWiredRedirects } from '../hooks/wired.hooks.js';
|
|
8
8
|
import { useRedirectsPage } from '../hooks/RedirectsPage.hooks.js';
|
|
9
|
-
export function RedirectsPage({ useRedirectsHook = useWiredRedirects } = {}) {
|
|
10
|
-
const { redirects, listStatus, listError, error, saving, pendingDelete, confirmDelete, deletePending, submitCreate, t, locale, columns, deleteBody, cancelDelete, headerActions } =
|
|
9
|
+
export function RedirectsPage({ useRedirectsHook = useWiredRedirects, useRedirectsPageHook = useRedirectsPage } = {}) {
|
|
10
|
+
const { redirects, listStatus, listError, error, saving, pendingDelete, confirmDelete, deletePending, submitCreate, t, locale, columns, deleteBody, cancelDelete, headerActions } = useRedirectsPageHook({ useRedirectsHook });
|
|
11
11
|
// Only a FIRST load blocks the screen. A refetch triggered by a write keeps
|
|
12
12
|
// the table on screen (`status` stays `'success'`), where the old
|
|
13
13
|
// `if (!redirects)` guard blanked the whole page after every single edit.
|
|
@@ -16,6 +16,6 @@ export function RedirectsPage({ useRedirectsHook = useWiredRedirects } = {}) {
|
|
|
16
16
|
}
|
|
17
17
|
if (!redirects)
|
|
18
18
|
return _jsx("div", { className: "notice", children: t("Loading redirects…") });
|
|
19
|
-
return (_jsxs("div", { className: "page", children: [
|
|
19
|
+
return (_jsxs("div", { className: "page", children: [_jsx(RedirectsHeader, { headerActions: headerActions, t: t }), error ? _jsx("div", { className: "notice error", children: describeApiError({ e: error, fallback: "request failed" }) }) : null, _jsx(CreateRedirectForm, { t: t, saving: saving, submitCreate: submitCreate }), _jsx(ImportRedirectsForm, { t: t, locale: locale }), _jsx(DataTable, { rows: redirects, rowKey: (rule) => rule.id, empty: _jsx("div", { className: "card", children: _jsx("div", { className: "empty-state", children: _jsx("p", { children: t("No redirect rules yet.") }) }) }), columns: columns }), _jsx(ConfirmDialog, { open: pendingDelete !== null, agentHandle: "redirects-delete", title: t("Delete redirect rule?"), body: deleteBody, confirmLabel: t("Delete"), destructive: true, pending: deletePending, onConfirm: confirmDelete, onCancel: cancelDelete })] }));
|
|
20
20
|
}
|
|
21
21
|
//# sourceMappingURL=RedirectsPage.js.map
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
export declare const redirectsModule: {
|
|
3
3
|
readonly id: "redirects";
|
|
4
4
|
readonly requires: {
|
|
5
|
-
readonly redirectsApi: import("
|
|
5
|
+
readonly redirectsApi: import("@jini-ai/core/contracts/admin-module").AdminPortToken<import("./ports.js").AdminRedirectsPort, "admin.redirects.api">;
|
|
6
6
|
};
|
|
7
7
|
readonly optional: {
|
|
8
|
-
readonly redirectsEvents: import("
|
|
8
|
+
readonly redirectsEvents: import("@jini-ai/core/contracts/admin-module").AdminPortToken<import("./ports.js").RedirectsEventsPort, "admin.redirects.events">;
|
|
9
9
|
};
|
|
10
10
|
readonly messages: {
|
|
11
11
|
readonly "Loading\u2026": "Loading…";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineAdminModule } from '
|
|
1
|
+
import { defineAdminModule } from '@jini-ai/core/contracts/admin-module';
|
|
2
2
|
import { redirectsApiToken, redirectsEventsToken } from './ports.js';
|
|
3
3
|
import { redirectsMessagesEn } from './messages.en.js';
|
|
4
4
|
/** Existing route identity and permission are part of the host's navigation contract. */
|
|
@@ -4,7 +4,7 @@ export declare function createAccessTokensController({ api, permissions }: {
|
|
|
4
4
|
api: SecurityApiPort;
|
|
5
5
|
permissions?: readonly string[];
|
|
6
6
|
}, _optional?: {}): {
|
|
7
|
-
getSnapshot: () =>
|
|
7
|
+
getSnapshot: (required?: Record<string, never>, optional?: Record<string, never>) => {
|
|
8
8
|
rows: readonly CredentialSummary[];
|
|
9
9
|
providers: readonly CredentialProvider[];
|
|
10
10
|
draft: CredentialDraft | null;
|
|
@@ -14,10 +14,10 @@ export declare function createAccessTokensController({ api, permissions }: {
|
|
|
14
14
|
errors: Readonly<Record<string, string>>;
|
|
15
15
|
query: string;
|
|
16
16
|
category: CredentialCategory | "all";
|
|
17
|
-
}
|
|
18
|
-
subscribe: (
|
|
17
|
+
};
|
|
18
|
+
subscribe: (required: {
|
|
19
19
|
listener: () => void;
|
|
20
|
-
}) => () => void;
|
|
20
|
+
}, optional?: Record<string, never>) => () => void;
|
|
21
21
|
load: (_required: Record<string, never>, _optional?: {}) => Promise<void>;
|
|
22
22
|
begin: ({ row, kind, providerId }: {
|
|
23
23
|
row?: CredentialSummary;
|
|
@@ -1,49 +1,54 @@
|
|
|
1
|
-
import { createControllerStore } from '
|
|
1
|
+
import { createControllerStore } from '@jini-ai/core/admin-runtime';
|
|
2
2
|
import { blankCredentialDraft, buildCredentialPatch, credentialCategory, credentialStore, validateCredentialDraft, writePermission, credentialLabel } from '../rules.js';
|
|
3
3
|
/** An edit draft never carries the saved secret: token and extra values start blank. */
|
|
4
4
|
function draftFromRow({ row, providers }, _optional = {}) {
|
|
5
5
|
return { ...blankCredentialDraft({ kind: row.kind, providerId: row.providerId }), id: row.id, label: credentialLabel({ row, providers }), category: credentialCategory({ row }), baseUrl: row.baseUrl ?? '', additionalHosts: row.additionalHosts?.join('\n') ?? '', username: row.username ?? '' };
|
|
6
6
|
}
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
async function load(_required, _optional = {}) {
|
|
7
|
+
function createAccessTokenStore() {
|
|
8
|
+
return createControllerStore({ initial: { rows: [], providers: [], draft: null, loading: false, saving: false, error: null, errors: {}, query: '', category: 'all' } });
|
|
9
|
+
}
|
|
10
|
+
function createCredentialLoader(api, store, { grants, nextGeneration, isCurrent }) {
|
|
11
|
+
return async function load(_required, _optional = {}) {
|
|
13
12
|
if (store.signal.aborted || !grants.has('security.read'))
|
|
14
13
|
return;
|
|
15
|
-
|
|
16
|
-
const ticket = generation;
|
|
14
|
+
const ticket = nextGeneration();
|
|
17
15
|
store.set({ patch: { loading: true } });
|
|
18
16
|
// Independent stores retain their own successful results; one unavailable store cannot hide the rest.
|
|
19
17
|
const kinds = ['publish', 'source-control', 'custom'];
|
|
20
18
|
const tasks = kinds.map(async (kind) => {
|
|
21
19
|
try {
|
|
22
20
|
const rows = await credentialStore({ api, kind }).list({}, { signal: store.signal });
|
|
23
|
-
if (ticket
|
|
21
|
+
if (isCurrent(ticket)) {
|
|
24
22
|
const errors = { ...store.getSnapshot().errors };
|
|
25
23
|
delete errors[kind];
|
|
26
24
|
store.set({ patch: { rows: Object.freeze([...store.getSnapshot().rows.filter(r => r.kind !== kind), ...rows]), errors } });
|
|
27
25
|
}
|
|
28
26
|
}
|
|
29
27
|
catch {
|
|
30
|
-
if (ticket
|
|
28
|
+
if (isCurrent(ticket))
|
|
31
29
|
store.set({ patch: { errors: { ...store.getSnapshot().errors, [kind]: 'Credential store unavailable' } } });
|
|
32
30
|
}
|
|
33
31
|
});
|
|
34
32
|
tasks.push((async () => { try {
|
|
35
33
|
const providers = await api.providers({}, { signal: store.signal });
|
|
36
|
-
if (ticket
|
|
34
|
+
if (isCurrent(ticket))
|
|
37
35
|
store.set({ patch: { providers, error: null } });
|
|
38
36
|
}
|
|
39
37
|
catch {
|
|
40
|
-
if (ticket
|
|
38
|
+
if (isCurrent(ticket))
|
|
41
39
|
store.set({ patch: { error: 'Provider catalog unavailable' } });
|
|
42
40
|
} })());
|
|
43
41
|
await Promise.all(tasks);
|
|
44
|
-
if (ticket
|
|
42
|
+
if (isCurrent(ticket))
|
|
45
43
|
store.set({ patch: { loading: false } });
|
|
46
|
-
}
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
export function createAccessTokensController({ api, permissions = [] }, _optional = {}) {
|
|
47
|
+
const grants = new Set(permissions);
|
|
48
|
+
const store = createAccessTokenStore();
|
|
49
|
+
let generation = 0;
|
|
50
|
+
const allowed = (kind) => !store.signal.aborted && grants.has('security.read') && grants.has(writePermission({ kind }));
|
|
51
|
+
const load = createCredentialLoader(api, store, { grants, nextGeneration: () => ++generation, isCurrent: ticket => ticket === generation });
|
|
47
52
|
function begin({ row, kind, providerId }, _optional = {}) {
|
|
48
53
|
const k = row?.kind ?? kind ?? 'custom';
|
|
49
54
|
if (!allowed(k) || store.getSnapshot().saving)
|
|
@@ -4,16 +4,16 @@ export declare function createOtherCredentialsController({ api, permissions }: {
|
|
|
4
4
|
api: OtherCredentialsPort;
|
|
5
5
|
permissions?: readonly string[];
|
|
6
6
|
}, _optional?: {}): {
|
|
7
|
-
getSnapshot: () =>
|
|
7
|
+
getSnapshot: (required?: Record<string, never>, optional?: Record<string, never>) => {
|
|
8
8
|
rows: readonly OtherCredentialSummary[];
|
|
9
9
|
drafts: Readonly<Record<string, string>>;
|
|
10
10
|
errors: Readonly<Record<string, string>>;
|
|
11
11
|
loading: boolean;
|
|
12
12
|
saving: boolean;
|
|
13
|
-
}
|
|
14
|
-
subscribe: (
|
|
13
|
+
};
|
|
14
|
+
subscribe: (required: {
|
|
15
15
|
listener: () => void;
|
|
16
|
-
}) => () => void;
|
|
16
|
+
}, optional?: Record<string, never>) => () => void;
|
|
17
17
|
load: (_required: Record<string, never>, _optional?: {}) => Promise<void>;
|
|
18
18
|
setDraft({ key, token }: {
|
|
19
19
|
key: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createControllerStore } from '
|
|
1
|
+
import { createControllerStore } from '@jini-ai/core/admin-runtime';
|
|
2
2
|
import { OTHER_STORES, otherWritePermission } from '../rules.js';
|
|
3
3
|
export function createOtherCredentialsController({ api, permissions = [] }, _optional = {}) {
|
|
4
4
|
const grants = new Set(permissions);
|
|
@@ -4,7 +4,7 @@ export declare function createRootKeyController({ api, permissions }: {
|
|
|
4
4
|
api: RootKeyPort;
|
|
5
5
|
permissions?: readonly string[];
|
|
6
6
|
}, _optional?: {}): {
|
|
7
|
-
getSnapshot: () =>
|
|
7
|
+
getSnapshot: (required?: Record<string, never>, optional?: Record<string, never>) => {
|
|
8
8
|
status: RootKeyStatus | null;
|
|
9
9
|
preview: RootKeyPreview | null;
|
|
10
10
|
token: string;
|
|
@@ -14,10 +14,10 @@ export declare function createRootKeyController({ api, permissions }: {
|
|
|
14
14
|
error: string | null;
|
|
15
15
|
result: string | null;
|
|
16
16
|
confirming: boolean;
|
|
17
|
-
}
|
|
18
|
-
subscribe: (
|
|
17
|
+
};
|
|
18
|
+
subscribe: (required: {
|
|
19
19
|
listener: () => void;
|
|
20
|
-
}) => () => void;
|
|
20
|
+
}, optional?: Record<string, never>) => () => void;
|
|
21
21
|
load: (_required: Record<string, never>, _optional?: {}) => Promise<void>;
|
|
22
22
|
setToken({ value }: {
|
|
23
23
|
value: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createControllerStore } from '
|
|
1
|
+
import { createControllerStore } from '@jini-ai/core/admin-runtime';
|
|
2
2
|
import { ROOT_KEY_PERMISSION, START_FRESH_CONFIRMATION, isRootKeyLocked } from '../rules.js';
|
|
3
3
|
const receiverLabel = (w) => `${w.label} (${w.targetUrl})`;
|
|
4
4
|
/** Receivers named in a result need their new signing secret; the message tells the operator which ones. */
|
package/dist/security/ports.d.ts
CHANGED
|
@@ -45,9 +45,9 @@ export interface RootKeyPort {
|
|
|
45
45
|
confirm: string;
|
|
46
46
|
}, optional?: RequestOptions): Promise<RootKeyResult>;
|
|
47
47
|
}
|
|
48
|
-
export declare const securityApiToken: import("
|
|
49
|
-
export declare const otherCredentialsToken: import("
|
|
50
|
-
export declare const rootKeyToken: import("
|
|
48
|
+
export declare const securityApiToken: import("@jini-ai/core/contracts/admin-module").AdminPortToken<SecurityApiPort, "admin.security.api">;
|
|
49
|
+
export declare const otherCredentialsToken: import("@jini-ai/core/contracts/admin-module").AdminPortToken<OtherCredentialsPort, "admin.security.other">;
|
|
50
|
+
export declare const rootKeyToken: import("@jini-ai/core/contracts/admin-module").AdminPortToken<RootKeyPort, "admin.security.root-key">;
|
|
51
51
|
export interface SecurityTransportPort {
|
|
52
52
|
request<T>(required: {
|
|
53
53
|
path: string;
|
package/dist/security/ports.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { adminPort } from '
|
|
1
|
+
import { adminPort } from '@jini-ai/core/contracts/admin-module';
|
|
2
2
|
export const securityApiToken = adminPort({ id: 'admin.security.api' });
|
|
3
3
|
export const otherCredentialsToken = adminPort({ id: 'admin.security.other' });
|
|
4
4
|
export const rootKeyToken = adminPort({ id: 'admin.security.root-key' });
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
-
import { type CredentialEditorProps } from '../hooks/CredentialEditor.hooks.js';
|
|
2
|
-
export declare function CredentialEditor(props: CredentialEditorProps
|
|
1
|
+
import { useCredentialEditor, type CredentialEditorProps } from '../hooks/CredentialEditor.hooks.js';
|
|
2
|
+
export declare function CredentialEditor({ useCredentialEditorHook, ...props }: CredentialEditorProps & {
|
|
3
|
+
useCredentialEditorHook?: typeof useCredentialEditor;
|
|
4
|
+
}): import("react").JSX.Element;
|
|
3
5
|
//# sourceMappingURL=CredentialEditor.d.ts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Button, TextField, TextArea, Select, Dialog } from '
|
|
2
|
+
import { Button, TextField, TextArea, Select, Dialog } from '../../../react/kit.js';
|
|
3
3
|
import { useCredentialEditor } from '../hooks/CredentialEditor.hooks.js';
|
|
4
|
-
export function CredentialEditor(
|
|
5
|
-
const vm =
|
|
4
|
+
export function CredentialEditor({ useCredentialEditorHook = useCredentialEditor, ...props }) {
|
|
5
|
+
const vm = useCredentialEditorHook(props);
|
|
6
6
|
return _jsxs(Dialog, { open: true, title: vm.title, onClose: vm.cancel, pending: vm.saving, children: [_jsx(TextField, { label: "Name", value: props.draft.label, onValueChange: vm.onLabel, disabled: vm.saving }), _jsx(TextField, { label: vm.tokenLabel, type: "password", value: props.draft.token, onValueChange: vm.onToken, disabled: vm.saving, attrs: { 'data-agent-private': 'true' } }), vm.fields.map(field => _jsx(TextField, { label: field.label, type: field.secret ? 'password' : 'text', value: field.value, onValueChange: field.onValueChange, required: field.required === true, disabled: vm.saving }, field.name)), props.draft.kind === 'custom' && _jsxs(_Fragment, { children: [_jsx(Select, { label: "Category", value: props.draft.category, options: vm.categories, onValueChange: vm.onCategory, disabled: vm.saving }), _jsx(TextField, { label: "Base URL", type: "url", value: props.draft.baseUrl, onValueChange: vm.onUrl, disabled: vm.saving }), _jsx(TextField, { label: "Username", value: props.draft.username, onValueChange: vm.onUsername, disabled: vm.saving }), _jsx(TextArea, { label: "Additional hosts", value: props.draft.additionalHosts, onValueChange: vm.onHosts, disabled: vm.saving })] }), _jsx(Button, { onPress: vm.save, pending: vm.saving, children: "Save" }), _jsx(Button, { onPress: vm.cancel, disabled: vm.saving, children: "Cancel" })] });
|
|
7
7
|
}
|
|
8
8
|
//# sourceMappingURL=CredentialEditor.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { TabViewProps } from '
|
|
1
|
+
import type { TabViewProps } from '@jini-ai/core/contracts/admin-module';
|
|
2
2
|
import type { CredentialSummary, OtherCredentialSummary, CredentialCategory } from '../../models.js';
|
|
3
3
|
type Removal = {
|
|
4
4
|
row: CredentialSummary | OtherCredentialSummary;
|
|
@@ -20,7 +20,7 @@ export declare function useAccessTokensTab({ permissions }: TabViewProps, _optio
|
|
|
20
20
|
cancelRemove(): void;
|
|
21
21
|
confirmRemove(): Promise<void>;
|
|
22
22
|
controller: {
|
|
23
|
-
getSnapshot: () =>
|
|
23
|
+
getSnapshot: (required?: Record<string, never>, optional?: Record<string, never>) => {
|
|
24
24
|
rows: readonly CredentialSummary[];
|
|
25
25
|
providers: readonly import("../../models.js").CredentialProvider[];
|
|
26
26
|
draft: import("../../models.js").CredentialDraft | null;
|
|
@@ -30,10 +30,10 @@ export declare function useAccessTokensTab({ permissions }: TabViewProps, _optio
|
|
|
30
30
|
errors: Readonly<Record<string, string>>;
|
|
31
31
|
query: string;
|
|
32
32
|
category: CredentialCategory | "all";
|
|
33
|
-
}
|
|
34
|
-
subscribe: (
|
|
33
|
+
};
|
|
34
|
+
subscribe: (required: {
|
|
35
35
|
listener: () => void;
|
|
36
|
-
}) => () => void;
|
|
36
|
+
}, optional?: Record<string, never>) => () => void;
|
|
37
37
|
load: (_required: Record<string, never>, _optional?: {}) => Promise<void>;
|
|
38
38
|
begin: ({ row, kind, providerId }: {
|
|
39
39
|
row?: CredentialSummary;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { TabViewProps } from '
|
|
1
|
+
import type { TabViewProps } from '@jini-ai/core/contracts/admin-module';
|
|
2
2
|
export declare function useRootKeyTab({ permissions, params }: TabViewProps, _optional?: {}): {
|
|
3
3
|
onToken({ value }: {
|
|
4
4
|
value: string;
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
1
|
+
import type { ComponentType } from 'react';
|
|
2
|
+
import type { ModulePageProps, TabViewProps } from '@jini-ai/core/contracts/admin-module';
|
|
3
|
+
/** The shell passes this page its tabs as renderable components. */
|
|
4
|
+
type TabbedPageProps = ModulePageProps<ComponentType<TabViewProps>>;
|
|
5
|
+
export declare function useSecurityPage(props: TabbedPageProps, _optional?: {}): {
|
|
3
6
|
denied: boolean;
|
|
4
7
|
active: string;
|
|
5
|
-
ActiveTab:
|
|
8
|
+
ActiveTab: ComponentType<TabViewProps> | undefined;
|
|
6
9
|
params: Readonly<Record<string, unknown>>;
|
|
7
10
|
permissions: readonly string[];
|
|
8
11
|
items: {
|
|
@@ -14,4 +17,5 @@ export declare function useSecurityPage(props: ModulePageProps, _optional?: {}):
|
|
|
14
17
|
value: string;
|
|
15
18
|
}): void;
|
|
16
19
|
};
|
|
20
|
+
export {};
|
|
17
21
|
//# sourceMappingURL=SecurityPage.hooks.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createContext, useContext } from 'react';
|
|
2
|
-
import { AdminConfigError } from '
|
|
2
|
+
import { AdminConfigError } from '@jini-ai/core/admin-runtime';
|
|
3
3
|
const refuse = async () => { throw new Error('Unavailable'); };
|
|
4
4
|
/** Stand-ins for optional ports the host did not supply. Hooks always run, so a tab still builds
|
|
5
5
|
* its controller; these keep it inert: nothing to list, every other call refused. */
|