@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
|
@@ -1,175 +1,174 @@
|
|
|
1
|
-
import { createControllerStore } from '
|
|
2
|
-
import { hasPermission } from '../../core/permissions/rules.js';
|
|
3
|
-
import { describeApiError } from '../../core/transport/errors.js';
|
|
1
|
+
import { createControllerStore, hasPermission, describeApiError } from '@jini-ai/core/admin-runtime';
|
|
4
2
|
import { describeModerationError, emptyRowState } from '../rules.js';
|
|
5
3
|
import { englishComments } from '../messages.en.js';
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
*/
|
|
12
|
-
export function createCommentQueueController({ api, permissions: initialPermissions = [] }, { t = englishComments, onInvalidate, loadPage } = {}) {
|
|
13
|
-
const store = createControllerStore({ initial: {
|
|
14
|
-
status: 'pending', items: null, nextCursor: null, error: null, loadingMore: false,
|
|
15
|
-
rowState: {}, pendingPurge: null,
|
|
4
|
+
function publishPages({ ctx }) {
|
|
5
|
+
const { store, t } = ctx;
|
|
6
|
+
store.set({ patch: {
|
|
7
|
+
items: ctx.firstPage ? [...ctx.firstPage.items, ...ctx.morePages] : null,
|
|
8
|
+
error: ctx.moreError ?? (ctx.firstError ? describeApiError({ e: ctx.firstError, fallback: t('failed to load the moderation queue') }) : null),
|
|
16
9
|
} });
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
//
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
if (
|
|
59
|
-
return;
|
|
60
|
-
permissions = nextPermissions;
|
|
61
|
-
if (t === nextTranslator)
|
|
10
|
+
}
|
|
11
|
+
// Accumulated pages belong to the current first page. A status switch or refreshed page one
|
|
12
|
+
// supersedes an in-flight cursor read AND releases its synchronous lock, avoiding stuck busy.
|
|
13
|
+
function resetMorePages({ ctx }) {
|
|
14
|
+
ctx.pageGeneration++;
|
|
15
|
+
ctx.loadingMore = false;
|
|
16
|
+
ctx.morePages = [];
|
|
17
|
+
ctx.moreError = null;
|
|
18
|
+
ctx.store.set({ patch: { loadingMore: false } });
|
|
19
|
+
}
|
|
20
|
+
function patchRowState({ ctx, id, patch }) {
|
|
21
|
+
const current = ctx.store.getSnapshot().rowState;
|
|
22
|
+
ctx.store.set({ patch: { rowState: { ...current, [id]: { ...emptyRowState(), ...current[id], ...patch } } } });
|
|
23
|
+
}
|
|
24
|
+
function reloadAfterAction({ ctx }) {
|
|
25
|
+
resetMorePages({ ctx });
|
|
26
|
+
publishPages({ ctx });
|
|
27
|
+
// An action moves a row to another status. Invalidating only the current filter would leave
|
|
28
|
+
// previously visited status caches stale, so the hook invalidates KEYS.queueRoot.
|
|
29
|
+
ctx.onInvalidate?.();
|
|
30
|
+
}
|
|
31
|
+
/** A cursor read may only publish while it is still the newest one and the store is live. */
|
|
32
|
+
function isCurrentRead({ ctx, generation }) {
|
|
33
|
+
return generation === ctx.pageGeneration && !ctx.store.signal.aborted;
|
|
34
|
+
}
|
|
35
|
+
function readMorePage({ ctx, status, cursor }) {
|
|
36
|
+
return ctx.loadPage ? ctx.loadPage({ status, cursor }) : ctx.api.listCommentsQueue({}, { status, cursor });
|
|
37
|
+
}
|
|
38
|
+
async function loadMore({ ctx }) {
|
|
39
|
+
const { store } = ctx;
|
|
40
|
+
const { nextCursor, status } = store.getSnapshot();
|
|
41
|
+
if (store.signal.aborted || !nextCursor || ctx.loadingMore)
|
|
42
|
+
return;
|
|
43
|
+
ctx.loadingMore = true;
|
|
44
|
+
ctx.pageGeneration += 1;
|
|
45
|
+
const generation = ctx.pageGeneration;
|
|
46
|
+
ctx.moreError = null; // A retry clears the prior failure before its request settles.
|
|
47
|
+
store.set({ patch: { loadingMore: true } });
|
|
48
|
+
publishPages({ ctx });
|
|
49
|
+
try {
|
|
50
|
+
const page = await readMorePage({ ctx, status, cursor: nextCursor });
|
|
51
|
+
if (!isCurrentRead({ ctx, generation }))
|
|
62
52
|
return;
|
|
63
|
-
|
|
64
|
-
|
|
53
|
+
ctx.morePages = [...ctx.morePages, ...page.items];
|
|
54
|
+
store.set({ patch: { nextCursor: page.nextCursor } });
|
|
55
|
+
publishPages({ ctx });
|
|
65
56
|
}
|
|
66
|
-
|
|
67
|
-
if (
|
|
57
|
+
catch (e) {
|
|
58
|
+
if (!isCurrentRead({ ctx, generation }))
|
|
68
59
|
return;
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
firstError = null;
|
|
72
|
-
store.set({ patch: { status, items: null, nextCursor: null, error: null, rowState: {} } });
|
|
60
|
+
ctx.moreError = describeApiError({ e, fallback: ctx.t('failed to load the moderation queue') });
|
|
61
|
+
publishPages({ ctx });
|
|
73
62
|
}
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
if (page !== firstPage) {
|
|
80
|
-
resetMorePages();
|
|
81
|
-
firstPage = page;
|
|
82
|
-
store.set({ patch: { nextCursor: page?.nextCursor ?? null } });
|
|
63
|
+
finally {
|
|
64
|
+
// The reset already released a superseded call's lock; it must not unlock a newer call.
|
|
65
|
+
if (isCurrentRead({ ctx, generation })) {
|
|
66
|
+
ctx.loadingMore = false;
|
|
67
|
+
store.set({ patch: { loadingMore: false } });
|
|
83
68
|
}
|
|
84
|
-
firstError = error;
|
|
85
|
-
publishPages();
|
|
86
69
|
}
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
70
|
+
}
|
|
71
|
+
async function onModerate({ ctx, comment, action }) {
|
|
72
|
+
const { store, busyRowIds } = ctx;
|
|
73
|
+
const permission = action === 'trash' ? 'comments.delete' : 'comments.moderate';
|
|
74
|
+
if (store.signal.aborted || !hasPermission({ permissions: ctx.permissions, permission }) || busyRowIds.has(comment.id))
|
|
75
|
+
return;
|
|
76
|
+
busyRowIds.add(comment.id);
|
|
77
|
+
patchRowState({ ctx, id: comment.id, patch: { busy: true, error: null } });
|
|
78
|
+
try {
|
|
79
|
+
await ctx.api.moderateComment({ commentId: comment.id, action, expectedVersion: comment.version });
|
|
80
|
+
if (!store.signal.aborted)
|
|
81
|
+
reloadAfterAction({ ctx });
|
|
90
82
|
}
|
|
91
|
-
|
|
92
|
-
|
|
83
|
+
catch (e) {
|
|
84
|
+
patchRowState({ ctx, id: comment.id, patch: { busy: false, error: describeModerationError({ e }, { t: ctx.t }) } });
|
|
93
85
|
}
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
if (store.signal.aborted || !nextCursor || loadingMore)
|
|
97
|
-
return;
|
|
98
|
-
loadingMore = true;
|
|
99
|
-
pageGeneration += 1;
|
|
100
|
-
const generation = pageGeneration;
|
|
101
|
-
moreError = null; // A retry clears the prior failure before its request settles.
|
|
102
|
-
store.set({ patch: { loadingMore: true } });
|
|
103
|
-
publishPages();
|
|
104
|
-
try {
|
|
105
|
-
const page = await readMorePage({ status, cursor: nextCursor });
|
|
106
|
-
if (!isCurrentRead({ generation }))
|
|
107
|
-
return;
|
|
108
|
-
morePages = [...morePages, ...page.items];
|
|
109
|
-
store.set({ patch: { nextCursor: page.nextCursor } });
|
|
110
|
-
publishPages();
|
|
111
|
-
}
|
|
112
|
-
catch (e) {
|
|
113
|
-
if (!isCurrentRead({ generation }))
|
|
114
|
-
return;
|
|
115
|
-
moreError = describeApiError({ e, fallback: t('failed to load the moderation queue') });
|
|
116
|
-
publishPages();
|
|
117
|
-
}
|
|
118
|
-
finally {
|
|
119
|
-
// The reset already released a superseded call's lock; it must not unlock a newer call.
|
|
120
|
-
if (isCurrentRead({ generation })) {
|
|
121
|
-
loadingMore = false;
|
|
122
|
-
store.set({ patch: { loadingMore: false } });
|
|
123
|
-
}
|
|
124
|
-
}
|
|
86
|
+
finally {
|
|
87
|
+
busyRowIds.delete(comment.id);
|
|
125
88
|
}
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
}
|
|
140
|
-
finally {
|
|
141
|
-
busyRowIds.delete(comment.id);
|
|
142
|
-
}
|
|
89
|
+
}
|
|
90
|
+
/** Confirmation closes on success and failure. Errors remain on the affected row. */
|
|
91
|
+
async function onPurge({ ctx }) {
|
|
92
|
+
const { store, busyRowIds } = ctx;
|
|
93
|
+
const comment = store.getSnapshot().pendingPurge;
|
|
94
|
+
if (store.signal.aborted || !comment || !hasPermission({ permissions: ctx.permissions, permission: 'comments.delete.force' }) || busyRowIds.has(comment.id))
|
|
95
|
+
return;
|
|
96
|
+
busyRowIds.add(comment.id);
|
|
97
|
+
patchRowState({ ctx, id: comment.id, patch: { busy: true, error: null } });
|
|
98
|
+
try {
|
|
99
|
+
await ctx.api.purgeComment({ commentId: comment.id });
|
|
100
|
+
if (!store.signal.aborted)
|
|
101
|
+
reloadAfterAction({ ctx });
|
|
143
102
|
}
|
|
144
|
-
|
|
145
|
-
|
|
103
|
+
catch (e) {
|
|
104
|
+
patchRowState({ ctx, id: comment.id, patch: { busy: false, error: describeApiError({ e, fallback: ctx.t('Failed to purge comment.') }) } });
|
|
146
105
|
}
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
if (store.signal.aborted || !comment || !hasPermission({ permissions, permission: 'comments.delete.force' }) || busyRowIds.has(comment.id))
|
|
151
|
-
return;
|
|
152
|
-
busyRowIds.add(comment.id);
|
|
153
|
-
patchRowState(comment.id, { busy: true, error: null });
|
|
154
|
-
try {
|
|
155
|
-
await api.purgeComment({ commentId: comment.id });
|
|
156
|
-
if (!store.signal.aborted)
|
|
157
|
-
reloadAfterAction();
|
|
158
|
-
}
|
|
159
|
-
catch (e) {
|
|
160
|
-
patchRowState(comment.id, { busy: false, error: describeApiError({ e, fallback: t('Failed to purge comment.') }) });
|
|
161
|
-
}
|
|
162
|
-
finally {
|
|
163
|
-
busyRowIds.delete(comment.id);
|
|
164
|
-
setPendingPurge({ comment: null });
|
|
165
|
-
}
|
|
106
|
+
finally {
|
|
107
|
+
busyRowIds.delete(comment.id);
|
|
108
|
+
store.set({ patch: { pendingPurge: null } });
|
|
166
109
|
}
|
|
110
|
+
}
|
|
111
|
+
function settleFirstPage({ ctx, page, error, status }) {
|
|
112
|
+
if (ctx.store.signal.aborted || status !== ctx.store.getSnapshot().status)
|
|
113
|
+
return;
|
|
114
|
+
// A successful new page drops stale cursor pages. Error-only notifications do not erase
|
|
115
|
+
// already rendered data or invalidate a current cursor read.
|
|
116
|
+
if (page !== ctx.firstPage) {
|
|
117
|
+
resetMorePages({ ctx });
|
|
118
|
+
ctx.firstPage = page;
|
|
119
|
+
ctx.store.set({ patch: { nextCursor: page?.nextCursor ?? null } });
|
|
120
|
+
}
|
|
121
|
+
ctx.firstError = error;
|
|
122
|
+
publishPages({ ctx });
|
|
123
|
+
}
|
|
124
|
+
function setStatus({ ctx, status }) {
|
|
125
|
+
if (ctx.store.signal.aborted || status === ctx.store.getSnapshot().status)
|
|
126
|
+
return;
|
|
127
|
+
resetMorePages({ ctx });
|
|
128
|
+
ctx.firstPage = null;
|
|
129
|
+
ctx.firstError = null;
|
|
130
|
+
ctx.store.set({ patch: { status, items: null, nextCursor: null, error: null, rowState: {} } });
|
|
131
|
+
}
|
|
132
|
+
/** Locale/grant changes update affordances without losing the existing cursor or row state. */
|
|
133
|
+
function configure({ ctx, permissions, t }) {
|
|
134
|
+
if (ctx.store.signal.aborted)
|
|
135
|
+
return;
|
|
136
|
+
ctx.permissions = permissions;
|
|
137
|
+
if (ctx.t === t)
|
|
138
|
+
return;
|
|
139
|
+
ctx.t = t;
|
|
140
|
+
publishPages({ ctx });
|
|
141
|
+
}
|
|
142
|
+
/** Headless cursor accumulation and per-row actions; page one remains owned by fetch-query.
|
|
143
|
+
* Permissions are affordances, denied by default. Every server write must reauthorize.
|
|
144
|
+
* @param required The core API and current session grants.
|
|
145
|
+
* @param optional Translator and an invalidation callback for every cached status.
|
|
146
|
+
* @returns An instance-scoped store and actions; dispose makes pending settlements inert.
|
|
147
|
+
*/
|
|
148
|
+
export function createCommentQueueController({ api, permissions = [] }, { t = englishComments, onInvalidate, loadPage } = {}) {
|
|
149
|
+
const store = createControllerStore({ initial: {
|
|
150
|
+
status: 'pending', items: null, nextCursor: null, error: null, loadingMore: false,
|
|
151
|
+
rowState: {}, pendingPurge: null,
|
|
152
|
+
} });
|
|
153
|
+
const ctx = {
|
|
154
|
+
store, api, onInvalidate, loadPage, permissions, t, firstPage: null, morePages: [],
|
|
155
|
+
firstError: null, moreError: null, pageGeneration: 0, loadingMore: false, busyRowIds: new Set(),
|
|
156
|
+
};
|
|
167
157
|
function dispose(_required = {}, _optional = {}) {
|
|
168
|
-
pageGeneration++;
|
|
169
|
-
busyRowIds.clear();
|
|
158
|
+
ctx.pageGeneration++;
|
|
159
|
+
ctx.busyRowIds.clear();
|
|
170
160
|
store.dispose();
|
|
171
161
|
}
|
|
172
|
-
return {
|
|
173
|
-
|
|
162
|
+
return {
|
|
163
|
+
getSnapshot: store.getSnapshot, subscribe: store.subscribe, dispose,
|
|
164
|
+
stateFor: ({ id }, _optional = {}) => store.getSnapshot().rowState[id] ?? emptyRowState(),
|
|
165
|
+
configure: (args, _optional = {}) => configure({ ctx, ...args }),
|
|
166
|
+
setStatus: (args, _optional = {}) => setStatus({ ctx, ...args }),
|
|
167
|
+
settleFirstPage: (args, _optional = {}) => settleFirstPage({ ctx, ...args }),
|
|
168
|
+
loadMore: (_required = {}, _optional = {}) => loadMore({ ctx }),
|
|
169
|
+
onModerate: (args, _optional = {}) => onModerate({ ctx, ...args }),
|
|
170
|
+
setPendingPurge: ({ comment }, _optional = {}) => store.set({ patch: { pendingPurge: comment } }),
|
|
171
|
+
onPurge: (_required = {}, _optional = {}) => onPurge({ ctx }),
|
|
172
|
+
};
|
|
174
173
|
}
|
|
175
174
|
//# sourceMappingURL=comment-queue.controller.js.map
|
|
@@ -12,11 +12,11 @@ export declare function createCommentSettingsController({ api, permissions }: {
|
|
|
12
12
|
t?: CommentsTranslator;
|
|
13
13
|
onInvalidate?: () => void;
|
|
14
14
|
}): {
|
|
15
|
-
getSnapshot: () =>
|
|
16
|
-
subscribe: (
|
|
15
|
+
getSnapshot: (required?: Record<string, never>, optional?: Record<string, never>) => CommentSettingsState;
|
|
16
|
+
subscribe: (required: {
|
|
17
17
|
listener: () => void;
|
|
18
|
-
}) => () => void;
|
|
19
|
-
dispose: () => void;
|
|
18
|
+
}, optional?: Record<string, never>) => () => void;
|
|
19
|
+
dispose: (required?: Record<string, never>, optional?: Record<string, never>) => void;
|
|
20
20
|
configure: ({ permissions: nextPermissions, t: nextTranslator }: {
|
|
21
21
|
permissions: readonly string[];
|
|
22
22
|
t: CommentsTranslator;
|
|
@@ -1,7 +1,40 @@
|
|
|
1
|
-
import { createControllerStore } from '
|
|
2
|
-
import { hasPermission } from '../../core/permissions/rules.js';
|
|
1
|
+
import { createControllerStore, hasPermission } from '@jini-ai/core/admin-runtime';
|
|
3
2
|
import { buildSettingsPatch, validateSettingsPatch, visibleCommentSettingsError } from '../rules.js';
|
|
4
3
|
import { englishComments } from '../messages.en.js';
|
|
4
|
+
function createCommentSettingsSaver({ api, store }, { current, errors, publishError }, onInvalidate) {
|
|
5
|
+
const currentTranslator = () => current().t;
|
|
6
|
+
return async function save({ form }, _optional = {}) {
|
|
7
|
+
const settings = store.getSnapshot().settings;
|
|
8
|
+
if (!current().canConfigure || !settings || store.signal.aborted)
|
|
9
|
+
return;
|
|
10
|
+
store.set({ patch: { notice: null } });
|
|
11
|
+
const patch = buildSettingsPatch({ form, current: settings });
|
|
12
|
+
// Validate before sending, matching the backend's spam score bound.
|
|
13
|
+
errors.validationError = validateSettingsPatch({ patch }, { t: current().t });
|
|
14
|
+
if (errors.validationError) {
|
|
15
|
+
publishError();
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
errors.saveError = null;
|
|
19
|
+
store.set({ patch: { saving: true } });
|
|
20
|
+
publishError();
|
|
21
|
+
try {
|
|
22
|
+
const updated = await api.putCommentsSettings({}, patch);
|
|
23
|
+
if (store.signal.aborted)
|
|
24
|
+
return;
|
|
25
|
+
onInvalidate?.();
|
|
26
|
+
// Read-your-writes must settle immediately; cache invalidation is deliberately not awaited.
|
|
27
|
+
store.set({ patch: { settings: updated, notice: currentTranslator()('Saved.') } });
|
|
28
|
+
}
|
|
29
|
+
catch (e) {
|
|
30
|
+
errors.saveError = e instanceof Error ? e : new Error(currentTranslator()('failed to save Comments settings'));
|
|
31
|
+
}
|
|
32
|
+
finally {
|
|
33
|
+
store.set({ patch: { saving: false } });
|
|
34
|
+
publishError();
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
}
|
|
5
38
|
/** Own the uncontrolled form's diff baseline, validation and server-confirmed save.
|
|
6
39
|
* The query cache owns reads; the FIRST successful read seeds the baseline once.
|
|
7
40
|
* @returns An instance store with seed/save operations; action grants default denied.
|
|
@@ -9,13 +42,11 @@ import { englishComments } from '../messages.en.js';
|
|
|
9
42
|
export function createCommentSettingsController({ api, permissions = [] }, { t = englishComments, onInvalidate } = {}) {
|
|
10
43
|
const store = createControllerStore({ initial: { settings: null, error: null, saving: false, notice: null } });
|
|
11
44
|
let canConfigure = hasPermission({ permissions, permission: 'comments.configure' });
|
|
45
|
+
const errors = { listError: null, saveError: null, validationError: null };
|
|
12
46
|
let seeded = false;
|
|
13
|
-
let listError = null;
|
|
14
|
-
let saveError = null;
|
|
15
|
-
let validationError = null;
|
|
16
47
|
function publishError() {
|
|
17
|
-
store.set({ patch: { error: visibleCommentSettingsError({ validationError, saveError,
|
|
18
|
-
saveFallback: t('failed to save Comments settings'), listError,
|
|
48
|
+
store.set({ patch: { error: visibleCommentSettingsError({ validationError: errors.validationError, saveError: errors.saveError,
|
|
49
|
+
saveFallback: t('failed to save Comments settings'), listError: errors.listError,
|
|
19
50
|
listFallback: t('failed to load Comments settings'), hasSettings: store.getSnapshot().settings !== null }) } });
|
|
20
51
|
}
|
|
21
52
|
/** Update grants/copy while preserving the one-shot uncontrolled-form baseline. */
|
|
@@ -38,40 +69,10 @@ export function createCommentSettingsController({ api, permissions = [] }, { t =
|
|
|
38
69
|
seeded = true;
|
|
39
70
|
store.set({ patch: { settings } });
|
|
40
71
|
}
|
|
41
|
-
listError = error;
|
|
72
|
+
errors.listError = error;
|
|
42
73
|
publishError();
|
|
43
74
|
}
|
|
44
|
-
|
|
45
|
-
const settings = store.getSnapshot().settings;
|
|
46
|
-
if (!canConfigure || !settings || store.signal.aborted)
|
|
47
|
-
return;
|
|
48
|
-
store.set({ patch: { notice: null } });
|
|
49
|
-
const patch = buildSettingsPatch({ form, current: settings });
|
|
50
|
-
// Validate before sending, matching the backend's spam score bound.
|
|
51
|
-
validationError = validateSettingsPatch({ patch }, { t });
|
|
52
|
-
if (validationError) {
|
|
53
|
-
publishError();
|
|
54
|
-
return;
|
|
55
|
-
}
|
|
56
|
-
saveError = null;
|
|
57
|
-
store.set({ patch: { saving: true } });
|
|
58
|
-
publishError();
|
|
59
|
-
try {
|
|
60
|
-
const updated = await api.putCommentsSettings({}, patch);
|
|
61
|
-
if (store.signal.aborted)
|
|
62
|
-
return;
|
|
63
|
-
onInvalidate?.();
|
|
64
|
-
// Read-your-writes must settle immediately; cache invalidation is deliberately not awaited.
|
|
65
|
-
store.set({ patch: { settings: updated, notice: t('Saved.') } });
|
|
66
|
-
}
|
|
67
|
-
catch (e) {
|
|
68
|
-
saveError = e instanceof Error ? e : new Error(t('failed to save Comments settings'));
|
|
69
|
-
}
|
|
70
|
-
finally {
|
|
71
|
-
store.set({ patch: { saving: false } });
|
|
72
|
-
publishError();
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
+
const save = createCommentSettingsSaver({ api, store }, { current: () => ({ canConfigure, t }), errors, publishError }, onInvalidate);
|
|
75
76
|
return { getSnapshot: store.getSnapshot, subscribe: store.subscribe, dispose: store.dispose, configure, settleRead, save };
|
|
76
77
|
}
|
|
77
78
|
//# sourceMappingURL=comment-settings.controller.js.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { CommentsState } from '../models.js';
|
|
2
2
|
/** Permissions settle from the shared query cache; absent grants default to denied. */
|
|
3
3
|
export declare function createCommentsController(_required: Record<string, never>, _optional?: Record<string, never>): {
|
|
4
|
-
getSnapshot: () =>
|
|
5
|
-
subscribe: (
|
|
4
|
+
getSnapshot: (required?: Record<string, never>, optional?: Record<string, never>) => CommentsState;
|
|
5
|
+
subscribe: (required: {
|
|
6
6
|
listener: () => void;
|
|
7
|
-
}) => () => void;
|
|
8
|
-
dispose: () => void;
|
|
7
|
+
}, optional?: Record<string, never>) => () => void;
|
|
8
|
+
dispose: (required?: Record<string, never>, optional?: Record<string, never>) => void;
|
|
9
9
|
settle({ data, error }: {
|
|
10
10
|
data: {
|
|
11
11
|
effectivePermissions?: readonly string[];
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { createControllerStore } from '
|
|
2
|
-
import { describeApiError } from '../../core/transport/errors.js';
|
|
1
|
+
import { createControllerStore, describeApiError } from '@jini-ai/core/admin-runtime';
|
|
3
2
|
/** Permissions settle from the shared query cache; absent grants default to denied. */
|
|
4
3
|
export function createCommentsController(_required, _optional = {}) {
|
|
5
4
|
const store = createControllerStore({ initial: { permissions: null, error: null } });
|
package/dist/comments/ports.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ export interface CommentsEventsPort {
|
|
|
8
8
|
onRefresh: () => void;
|
|
9
9
|
}, optional?: Record<string, never>): () => void;
|
|
10
10
|
}
|
|
11
|
-
export declare const commentsApiToken: import("
|
|
12
|
-
export declare const commentsSessionToken: import("
|
|
13
|
-
export declare const commentsEventsToken: import("
|
|
11
|
+
export declare const commentsApiToken: import("@jini-ai/core/contracts/admin-module").AdminPortToken<AdminCommentsPort, "admin.comments.api">;
|
|
12
|
+
export declare const commentsSessionToken: import("@jini-ai/core/contracts/admin-module").AdminPortToken<CommentsSessionPort, "admin.comments.session">;
|
|
13
|
+
export declare const commentsEventsToken: import("@jini-ai/core/contracts/admin-module").AdminPortToken<CommentsEventsPort, "admin.comments.events">;
|
|
14
14
|
//# sourceMappingURL=ports.d.ts.map
|
package/dist/comments/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 commentsApiToken = adminPort({ id: 'admin.comments.api' });
|
|
3
3
|
export const commentsSessionToken = adminPort({ id: 'admin.comments.session' });
|
|
4
4
|
export const commentsEventsToken = adminPort({ id: 'admin.comments.events' });
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { AdminComment, CommentModerationAction, CommentStatus } from '../../../core/ports/comments.js';
|
|
2
|
+
import type { CommentsTranslator } from '../../messages.en.js';
|
|
3
|
+
import type { RowActionState } from '../../rules.js';
|
|
4
|
+
import { useQueueActionsCell } from '../hooks/QueueActionsCell.hooks.js';
|
|
5
|
+
/** The moderation-queue table's "More" column — a `RowMenu` built from `commentRowMenuItems`, or
|
|
6
|
+
* an em dash when the operator's permissions leave no items, plus this row's own error (if the
|
|
7
|
+
* last action against it failed). Top-level rather than an inline `cell` closure so it has its
|
|
8
|
+
* own directly-testable scope, per `commentRowMenuItems`'s own risk ranking. */
|
|
9
|
+
export declare function QueueActionsCell({ useQueueActionsCellHook, ...props }: {
|
|
10
|
+
useQueueActionsCellHook?: typeof useQueueActionsCell;
|
|
11
|
+
comment: AdminComment;
|
|
12
|
+
agentHandleBase: string;
|
|
13
|
+
permissions: readonly string[];
|
|
14
|
+
status: CommentStatus;
|
|
15
|
+
rowState: RowActionState;
|
|
16
|
+
t: CommentsTranslator;
|
|
17
|
+
onModerate: (comment: AdminComment, action: CommentModerationAction) => void;
|
|
18
|
+
onRequestPurge: (comment: AdminComment) => void;
|
|
19
|
+
}): import("react").JSX.Element;
|
|
20
|
+
//# sourceMappingURL=QueueActionsCell.d.ts.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { RowMenu } from '../../../react/components/RowMenu/RowMenu.js';
|
|
3
|
+
import { useQueueActionsCell } from '../hooks/QueueActionsCell.hooks.js';
|
|
4
|
+
import { interpolate } from '@jini-ai/core/text';
|
|
5
|
+
/** The moderation-queue table's "More" column — a `RowMenu` built from `commentRowMenuItems`, or
|
|
6
|
+
* an em dash when the operator's permissions leave no items, plus this row's own error (if the
|
|
7
|
+
* last action against it failed). Top-level rather than an inline `cell` closure so it has its
|
|
8
|
+
* own directly-testable scope, per `commentRowMenuItems`'s own risk ranking. */
|
|
9
|
+
export function QueueActionsCell({ useQueueActionsCellHook = useQueueActionsCell, ...props }) {
|
|
10
|
+
const { menuItems } = useQueueActionsCellHook(props);
|
|
11
|
+
return (_jsxs(_Fragment, { children: [menuItems.length > 0 ? (_jsx(RowMenu, { triggerLabel: interpolate({ template: props.t('Actions for the comment by "{author}"'), vars: {
|
|
12
|
+
author: props.comment.authorName,
|
|
13
|
+
} }), agentHandle: `${props.agentHandleBase}-menu`, items: menuItems })) : (_jsx("span", { className: "muted-cell", children: "\u2014" })), props.rowState.error ? (_jsx("div", { className: "notice error", role: "alert", children: props.rowState.error })) : null] }));
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=QueueActionsCell.js.map
|
|
@@ -2,16 +2,25 @@ import type { AdminComment, CommentModerationAction, CommentStatus } from '../..
|
|
|
2
2
|
import type { CommentsTranslator } from '../../messages.en.js';
|
|
3
3
|
import type { RowActionState } from '../../rules.js';
|
|
4
4
|
import { useWiredCommentQueue } from '../hooks/use-comment-queue.hooks.js';
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
5
|
+
import { useQueueSection, useQueueTable, useQueueToolbar } from '../hooks/QueueSection.hooks.js';
|
|
6
|
+
/** The status-filter `<select>` — pure presentation, no state of its own. */
|
|
7
|
+
export declare function QueueToolbar({ status, onStatusChange, t, useQueueToolbarHook, }: {
|
|
8
|
+
status: CommentStatus;
|
|
9
|
+
onStatusChange: (s: CommentStatus) => void;
|
|
10
|
+
t: CommentsTranslator;
|
|
11
|
+
useQueueToolbarHook?: typeof useQueueToolbar;
|
|
12
|
+
}): import("react").JSX.Element;
|
|
13
|
+
/** The populated-queue view: the table plus its "Load more" pager. Only rendered once
|
|
14
|
+
* `QueueItemsView` has already ruled out the loading/empty states. */
|
|
15
|
+
export declare function QueueTable({ useQueueTableHook, ...props }: {
|
|
16
|
+
useQueueTableHook?: typeof useQueueTable;
|
|
17
|
+
items: readonly AdminComment[];
|
|
18
|
+
nextCursor: string | null;
|
|
19
|
+
loadingMore: boolean;
|
|
20
|
+
loadMore: () => void;
|
|
12
21
|
permissions: readonly string[];
|
|
13
22
|
status: CommentStatus;
|
|
14
|
-
|
|
23
|
+
stateFor: (id: string) => RowActionState;
|
|
15
24
|
t: CommentsTranslator;
|
|
16
25
|
onModerate: (comment: AdminComment, action: CommentModerationAction) => void;
|
|
17
26
|
onRequestPurge: (comment: AdminComment) => void;
|
|
@@ -26,5 +35,7 @@ export interface QueueSectionProps {
|
|
|
26
35
|
}
|
|
27
36
|
/** Exported (2026-08-14, previously module-private) so `QueueSection.unit.test.tsx` can drive its
|
|
28
37
|
* own DI seam directly — the same reason `AiAssistant.tsx`'s `AdminExecutionMode` is exported. */
|
|
29
|
-
export declare function QueueSection(props: QueueSectionProps
|
|
38
|
+
export declare function QueueSection({ useQueueSectionHook, ...props }: QueueSectionProps & {
|
|
39
|
+
useQueueSectionHook?: typeof useQueueSection;
|
|
40
|
+
}): import("react").JSX.Element;
|
|
30
41
|
//# sourceMappingURL=QueueSection.d.ts.map
|