@jini-ai/admin 0.4.2 → 0.4.4
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 +15 -0
- package/README.md +7 -0
- package/dist/agent-plugins/react/components/AgentPluginListPanel.d.ts +1 -1
- package/dist/agent-plugins/react/hooks/AgentPluginInspector.hooks.js +1 -1
- package/dist/agent-plugins/react/hooks/AgentPluginPanel.hooks.d.ts +1 -1
- package/dist/agent-plugins/react/hooks/AgentPluginsPage.hooks.d.ts +1 -1
- package/dist/agent-plugins/react/hooks/AgentPluginsPage.hooks.js +1 -1
- package/dist/agent-plugins/react/hooks/MarketplaceTab.hooks.d.ts +1 -1
- package/dist/agent-plugins/react/index.js +1 -1
- package/dist/agent-plugins/react/pages/AgentPluginsPage.d.ts +1 -1
- package/dist/agent-plugins/react/tabs/DownloadedTab.d.ts +1 -1
- package/dist/agent-plugins/react/tabs/InstalledTab.d.ts +1 -1
- package/dist/agent-plugins/react/tabs/MarketplaceTab.d.ts +1 -1
- package/dist/comments/adapters/http.d.ts +29 -0
- package/dist/comments/adapters/http.js +50 -0
- package/dist/comments/adapters/memory.d.ts +17 -0
- package/dist/comments/adapters/memory.js +61 -0
- package/dist/comments/comments.module.d.ts +73 -0
- package/dist/comments/comments.module.js +16 -0
- package/dist/comments/conformance/comments-api.conformance.d.ts +9 -0
- package/dist/comments/conformance/comments-api.conformance.js +63 -0
- package/dist/comments/controllers/comment-queue.controller.d.ts +48 -0
- package/dist/comments/controllers/comment-queue.controller.js +164 -0
- package/dist/comments/controllers/comment-settings.controller.d.ts +32 -0
- package/dist/comments/controllers/comment-settings.controller.js +77 -0
- package/dist/comments/controllers/comments.controller.d.ts +16 -0
- package/dist/comments/controllers/comments.controller.js +16 -0
- package/dist/comments/index.d.ts +13 -0
- package/dist/comments/index.js +8 -0
- package/dist/comments/messages.en.d.ts +54 -0
- package/dist/comments/messages.en.js +56 -0
- package/dist/comments/models.d.ts +22 -0
- package/dist/comments/models.js +2 -0
- package/dist/comments/ports.d.ts +14 -0
- package/dist/comments/ports.js +5 -0
- package/dist/comments/react/components/QueueSection.d.ts +30 -0
- package/dist/comments/react/components/QueueSection.js +57 -0
- package/dist/comments/react/components/SettingsSection.d.ts +14 -0
- package/dist/comments/react/components/SettingsSection.js +23 -0
- package/dist/comments/react/hooks/CommentsPage.hooks.d.ts +9 -0
- package/dist/comments/react/hooks/CommentsPage.hooks.js +10 -0
- package/dist/comments/react/hooks/CommentsPorts.hooks.d.ts +13 -0
- package/dist/comments/react/hooks/CommentsPorts.hooks.js +15 -0
- package/dist/comments/react/hooks/QueueSection.hooks.d.ts +62 -0
- package/dist/comments/react/hooks/QueueSection.hooks.js +57 -0
- package/dist/comments/react/hooks/SettingsSection.hooks.d.ts +12 -0
- package/dist/comments/react/hooks/SettingsSection.hooks.js +21 -0
- package/dist/comments/react/hooks/use-comment-queue.hooks.d.ts +34 -0
- package/dist/comments/react/hooks/use-comment-queue.hooks.js +47 -0
- package/dist/comments/react/hooks/use-comment-settings.hooks.d.ts +22 -0
- package/dist/comments/react/hooks/use-comment-settings.hooks.js +30 -0
- package/dist/comments/react/hooks/use-comments.hooks.d.ts +15 -0
- package/dist/comments/react/hooks/use-comments.hooks.js +20 -0
- package/dist/comments/react/index.d.ts +316 -0
- package/dist/comments/react/index.js +35 -0
- package/dist/comments/react/pages/CommentsPage.d.ts +12 -0
- package/dist/comments/react/pages/CommentsPage.js +15 -0
- package/dist/comments/rules.d.ts +140 -0
- package/dist/comments/rules.js +199 -0
- package/dist/core/index.d.ts +3 -1
- package/dist/core/index.js +1 -0
- package/dist/core/ledger-slice.d.ts +90 -0
- package/dist/core/ledger-slice.js +81 -0
- package/dist/core/ports/comments.d.ts +2 -0
- package/dist/core/ports/forms.d.ts +19 -7
- package/dist/core/ports/forms.js +4 -4
- package/dist/core/ports/index.d.ts +1 -1
- package/dist/core/ports/seo.d.ts +33 -6
- package/dist/core/react/bind-react.d.ts +46 -0
- package/dist/core/react/bind-react.js +28 -0
- package/dist/core/react/index.d.ts +3 -0
- package/dist/core/react/index.js +3 -0
- package/dist/core/react/use-controller.d.ts +16 -0
- package/dist/core/react/use-controller.js +18 -0
- package/dist/forms/adapters/http.d.ts +26 -0
- package/dist/forms/adapters/http.js +43 -0
- package/dist/forms/adapters/memory.d.ts +14 -0
- package/dist/forms/adapters/memory.js +77 -0
- package/dist/forms/conformance/forms-api.conformance.d.ts +17 -0
- package/dist/forms/conformance/forms-api.conformance.js +71 -0
- package/dist/forms/controllers/draft-store.d.ts +18 -0
- package/dist/forms/controllers/draft-store.js +17 -0
- package/dist/forms/controllers/field-attributes-dialog.controller.d.ts +37 -0
- package/dist/forms/controllers/field-attributes-dialog.controller.js +27 -0
- package/dist/forms/controllers/form-editor.controller.d.ts +36 -0
- package/dist/forms/controllers/form-editor.controller.js +22 -0
- package/dist/forms/controllers/form-fields-editor.controller.d.ts +20 -0
- package/dist/forms/controllers/form-fields-editor.controller.js +10 -0
- package/dist/forms/controllers/form-submission-detail.controller.d.ts +20 -0
- package/dist/forms/controllers/form-submission-detail.controller.js +10 -0
- package/dist/forms/controllers/form-submissions.controller.d.ts +25 -0
- package/dist/forms/controllers/form-submissions.controller.js +10 -0
- package/dist/forms/controllers/forms-list.controller.d.ts +22 -0
- package/dist/forms/controllers/forms-list.controller.js +10 -0
- package/dist/forms/forms.module.d.ts +138 -0
- package/dist/forms/forms.module.js +17 -0
- package/dist/forms/html-rules.d.ts +34 -0
- package/dist/forms/html-rules.js +34 -0
- package/dist/forms/index.d.ts +14 -0
- package/dist/forms/index.js +12 -0
- package/dist/forms/messages.en.d.ts +101 -0
- package/dist/forms/messages.en.js +105 -0
- package/dist/forms/models.d.ts +29 -0
- package/dist/forms/models.js +8 -0
- package/dist/forms/ports.d.ts +26 -0
- package/dist/forms/ports.js +6 -0
- package/dist/forms/react/components/FieldAttributesDialog.d.ts +14 -0
- package/dist/forms/react/components/FieldAttributesDialog.js +47 -0
- package/dist/forms/react/components/FormEditorFieldsBody.d.ts +28 -0
- package/dist/forms/react/components/FormEditorFieldsBody.js +24 -0
- package/dist/forms/react/components/FormEditorHeaderText.d.ts +7 -0
- package/dist/forms/react/components/FormEditorHeaderText.js +8 -0
- package/dist/forms/react/components/FormEditorMainPanel.d.ts +12 -0
- package/dist/forms/react/components/FormEditorMainPanel.js +13 -0
- package/dist/forms/react/components/FormEditorTabStrip.d.ts +13 -0
- package/dist/forms/react/components/FormEditorTabStrip.js +14 -0
- package/dist/forms/react/components/FormFieldsEditor.d.ts +13 -0
- package/dist/forms/react/components/FormFieldsEditor.js +39 -0
- package/dist/forms/react/components/FormSubmissionDate.d.ts +8 -0
- package/dist/forms/react/components/FormSubmissionDate.js +5 -0
- package/dist/forms/react/components/FormSubmissionDetail.d.ts +15 -0
- package/dist/forms/react/components/FormSubmissionDetail.js +30 -0
- package/dist/forms/react/components/FormSubmissions.d.ts +12 -0
- package/dist/forms/react/components/FormSubmissions.js +46 -0
- package/dist/forms/react/hooks/FormsPorts.hooks.d.ts +41 -0
- package/dist/forms/react/hooks/FormsPorts.hooks.js +16 -0
- package/dist/forms/react/hooks/forms-view.hooks.d.ts +117 -0
- package/dist/forms/react/hooks/forms-view.hooks.js +78 -0
- package/dist/forms/react/hooks/use-field-attributes-dialog.hooks.d.ts +31 -0
- package/dist/forms/react/hooks/use-field-attributes-dialog.hooks.js +22 -0
- package/dist/forms/react/hooks/use-form-editor.hooks.d.ts +118 -0
- package/dist/forms/react/hooks/use-form-editor.hooks.js +208 -0
- package/dist/forms/react/hooks/use-form-fields-editor.hooks.d.ts +34 -0
- package/dist/forms/react/hooks/use-form-fields-editor.hooks.js +36 -0
- package/dist/forms/react/hooks/use-form-submission-date.hooks.d.ts +12 -0
- package/dist/forms/react/hooks/use-form-submission-date.hooks.js +9 -0
- package/dist/forms/react/hooks/use-form-submission-detail.hooks.d.ts +68 -0
- package/dist/forms/react/hooks/use-form-submission-detail.hooks.js +81 -0
- package/dist/forms/react/hooks/use-form-submissions.hooks.d.ts +67 -0
- package/dist/forms/react/hooks/use-form-submissions.hooks.js +110 -0
- package/dist/forms/react/hooks/use-forms-list.hooks.d.ts +78 -0
- package/dist/forms/react/hooks/use-forms-list.hooks.js +103 -0
- package/dist/forms/react/index.d.ts +452 -0
- package/dist/forms/react/index.js +35 -0
- package/dist/forms/react/pages/FormEditor.d.ts +19 -0
- package/dist/forms/react/pages/FormEditor.js +40 -0
- package/dist/forms/react/pages/FormsList.d.ts +39 -0
- package/dist/forms/react/pages/FormsList.js +50 -0
- package/dist/forms/rules.d.ts +291 -0
- package/dist/forms/rules.js +338 -0
- package/dist/media/react/hooks/EditMediaPanel.hooks.js +1 -1
- package/dist/media/react/hooks/LibraryTab.hooks.d.ts +1 -1
- package/dist/media/react/hooks/LibraryTab.hooks.js +1 -1
- package/dist/media/react/hooks/MediaCard.hooks.js +6 -20
- package/dist/media/react/hooks/MediaGrid.hooks.d.ts +2 -2
- package/dist/media/react/hooks/MediaPage.hooks.d.ts +1 -1
- package/dist/media/react/hooks/MediaPage.hooks.js +1 -1
- package/dist/media/react/hooks/MediaPicker.hooks.js +1 -1
- package/dist/media/react/index.js +1 -1
- package/dist/media/react/tabs/LibraryTab.d.ts +1 -1
- package/dist/media/react/tabs/ProvidersTab.d.ts +1 -1
- package/dist/playground/react/components/Canvas.d.ts +1 -1
- package/dist/playground/react/hooks/Canvas.hooks.d.ts +1 -1
- package/dist/playground/react/hooks/Canvas.hooks.js +1 -1
- package/dist/playground/react/hooks/PlaygroundPage.hooks.d.ts +1 -1
- package/dist/playground/react/index.js +1 -1
- package/dist/playground/react/pages/PlaygroundPage.d.ts +1 -1
- package/dist/playground/react/tabs/CanvasTab.d.ts +1 -1
- package/dist/react/bind-react.d.ts +1 -45
- package/dist/react/bind-react.js +2 -27
- package/dist/react/components/ConfirmDialog/ConfirmDialog.d.ts +22 -5
- package/dist/react/components/ConfirmDialog/ConfirmDialog.hooks.d.ts +2 -2
- package/dist/react/components/ConfirmDialog/ConfirmDialog.hooks.js +17 -55
- package/dist/react/components/ConfirmDialog/ConfirmDialog.js +33 -70
- package/dist/react/components/RowMenu/RowMenu.hooks.js +14 -3
- package/dist/react/use-controller.d.ts +1 -15
- package/dist/react/use-controller.js +2 -17
- package/dist/redirects/adapters/http.d.ts +20 -0
- package/dist/redirects/adapters/http.js +31 -0
- package/dist/redirects/adapters/memory.d.ts +13 -0
- package/dist/redirects/adapters/memory.js +83 -0
- package/dist/redirects/conformance/redirects-api.conformance.d.ts +12 -0
- package/dist/redirects/conformance/redirects-api.conformance.js +66 -0
- package/dist/redirects/controllers/hit-count.controller.d.ts +14 -0
- package/dist/redirects/controllers/hit-count.controller.js +10 -0
- package/dist/redirects/controllers/import-redirects.controller.d.ts +28 -0
- package/dist/redirects/controllers/import-redirects.controller.js +29 -0
- package/dist/redirects/controllers/redirects.controller.d.ts +37 -0
- package/dist/redirects/controllers/redirects.controller.js +38 -0
- package/dist/redirects/index.d.ts +11 -0
- package/dist/redirects/index.js +10 -0
- package/dist/redirects/messages.en.d.ts +58 -0
- package/dist/redirects/messages.en.js +60 -0
- package/dist/redirects/models.d.ts +14 -0
- package/dist/redirects/models.js +2 -0
- package/dist/redirects/ports.d.ts +9 -0
- package/dist/redirects/ports.js +4 -0
- package/dist/redirects/react/components/HitCountCell.d.ts +19 -0
- package/dist/redirects/react/components/HitCountCell.js +19 -0
- package/dist/redirects/react/components/ImportRedirectsForm.d.ts +17 -0
- package/dist/redirects/react/components/ImportRedirectsForm.js +12 -0
- package/dist/redirects/react/hooks/RedirectsOptions.hooks.d.ts +27 -0
- package/dist/redirects/react/hooks/RedirectsOptions.hooks.js +15 -0
- package/dist/redirects/react/hooks/RedirectsPage.hooks.d.ts +50 -0
- package/dist/redirects/react/hooks/RedirectsPage.hooks.js +30 -0
- package/dist/redirects/react/hooks/RedirectsPorts.hooks.d.ts +10 -0
- package/dist/redirects/react/hooks/RedirectsPorts.hooks.js +11 -0
- package/dist/redirects/react/hooks/use-hit-count-cell.hooks.d.ts +19 -0
- package/dist/redirects/react/hooks/use-hit-count-cell.hooks.js +15 -0
- package/dist/redirects/react/hooks/use-import-redirects-form.hooks.d.ts +21 -0
- package/dist/redirects/react/hooks/use-import-redirects-form.hooks.js +25 -0
- package/dist/redirects/react/hooks/use-redirects.hooks.d.ts +34 -0
- package/dist/redirects/react/hooks/use-redirects.hooks.js +63 -0
- package/dist/redirects/react/hooks/wired.hooks.d.ts +55 -0
- package/dist/redirects/react/hooks/wired.hooks.js +31 -0
- package/dist/redirects/react/index.d.ts +324 -0
- package/dist/redirects/react/index.js +28 -0
- package/dist/redirects/react/pages/RedirectsPage.d.ts +15 -0
- package/dist/redirects/react/pages/RedirectsPage.js +20 -0
- package/dist/redirects/redirects.module.d.ts +77 -0
- package/dist/redirects/redirects.module.js +13 -0
- package/dist/redirects/rules.d.ts +131 -0
- package/dist/redirects/rules.js +134 -0
- package/dist/security/react/hooks/AccessTokensTab.hooks.d.ts +1 -1
- package/dist/security/react/hooks/AccessTokensTab.hooks.js +1 -1
- package/dist/security/react/hooks/RootKeyTab.hooks.d.ts +1 -1
- package/dist/security/react/hooks/RootKeyTab.hooks.js +1 -1
- package/dist/security/react/hooks/SecurityPage.hooks.d.ts +1 -1
- package/dist/security/react/index.js +1 -1
- package/dist/security/react/pages/SecurityPage.d.ts +1 -1
- package/dist/security/react/tabs/AccessTokensTab.d.ts +1 -1
- package/dist/security/react/tabs/RootKeyTab.d.ts +1 -1
- package/dist/seo/adapters/http.d.ts +31 -0
- package/dist/seo/adapters/http.js +37 -0
- package/dist/seo/adapters/memory.d.ts +28 -0
- package/dist/seo/adapters/memory.js +129 -0
- package/dist/seo/conformance/seo-api.conformance.d.ts +8 -0
- package/dist/seo/conformance/seo-api.conformance.js +44 -0
- package/dist/seo/controllers/entry-picker.controller.d.ts +21 -0
- package/dist/seo/controllers/entry-picker.controller.js +17 -0
- package/dist/seo/controllers/entry-section.controller.d.ts +20 -0
- package/dist/seo/controllers/entry-section.controller.js +7 -0
- package/dist/seo/controllers/media-ref.controller.d.ts +26 -0
- package/dist/seo/controllers/media-ref.controller.js +14 -0
- package/dist/seo/controllers/seo-entry.controller.d.ts +31 -0
- package/dist/seo/controllers/seo-entry.controller.js +52 -0
- package/dist/seo/controllers/seo.controller.d.ts +29 -0
- package/dist/seo/controllers/seo.controller.js +50 -0
- package/dist/seo/controllers/sitemap.controller.d.ts +25 -0
- package/dist/seo/controllers/sitemap.controller.js +27 -0
- package/dist/seo/index.d.ts +14 -0
- package/dist/seo/index.js +12 -0
- package/dist/seo/messages.en.d.ts +79 -0
- package/dist/seo/messages.en.js +79 -0
- package/dist/seo/models.d.ts +179 -0
- package/dist/seo/models.js +8 -0
- package/dist/seo/ports.d.ts +11 -0
- package/dist/seo/ports.js +4 -0
- package/dist/seo/react/components/MediaPickerBridge.d.ts +4 -0
- package/dist/seo/react/components/MediaPickerBridge.js +8 -0
- package/dist/seo/react/components/MediaRefField.d.ts +40 -0
- package/dist/seo/react/components/MediaRefField.js +12 -0
- package/dist/seo/react/components/SeoIcons.d.ts +13 -0
- package/dist/seo/react/components/SeoIcons.js +32 -0
- package/dist/seo/react/components/SitemapModal.d.ts +48 -0
- package/dist/seo/react/components/SitemapModal.js +72 -0
- package/dist/seo/react/hooks/MediaPickerBridge.hooks.d.ts +6 -0
- package/dist/seo/react/hooks/MediaPickerBridge.hooks.js +27 -0
- package/dist/seo/react/hooks/MediaRefField.hooks.d.ts +25 -0
- package/dist/seo/react/hooks/MediaRefField.hooks.js +30 -0
- package/dist/seo/react/hooks/SeoModuleTabs.d.ts +14 -0
- package/dist/seo/react/hooks/SeoModuleTabs.js +18 -0
- package/dist/seo/react/hooks/SeoPage.hooks.d.ts +69 -0
- package/dist/seo/react/hooks/SeoPage.hooks.js +37 -0
- package/dist/seo/react/hooks/SeoPorts.hooks.d.ts +19 -0
- package/dist/seo/react/hooks/SeoPorts.hooks.js +22 -0
- package/dist/seo/react/hooks/SitemapModal.hooks.d.ts +26 -0
- package/dist/seo/react/hooks/SitemapModal.hooks.js +20 -0
- package/dist/seo/react/hooks/use-entry-picker.hooks.d.ts +11 -0
- package/dist/seo/react/hooks/use-entry-picker.hooks.js +20 -0
- package/dist/seo/react/hooks/use-seo-entry-panel.hooks.d.ts +14 -0
- package/dist/seo/react/hooks/use-seo-entry-panel.hooks.js +26 -0
- package/dist/seo/react/hooks/use-seo-entry-section.hooks.d.ts +4 -0
- package/dist/seo/react/hooks/use-seo-entry-section.hooks.js +7 -0
- package/dist/seo/react/hooks/use-seo.hooks.d.ts +11 -0
- package/dist/seo/react/hooks/use-seo.hooks.js +29 -0
- package/dist/seo/react/hooks/use-sitemap-modal.hooks.d.ts +10 -0
- package/dist/seo/react/hooks/use-sitemap-modal.hooks.js +18 -0
- package/dist/seo/react/index.d.ts +369 -0
- package/dist/seo/react/index.js +30 -0
- package/dist/seo/react/options.d.ts +26 -0
- package/dist/seo/react/options.js +2 -0
- package/dist/seo/react/pages/SeoPage.d.ts +161 -0
- package/dist/seo/react/pages/SeoPage.js +215 -0
- package/dist/seo/rules.d.ts +142 -0
- package/dist/seo/rules.js +220 -0
- package/dist/seo/seo.module.d.ts +115 -0
- package/dist/seo/seo.module.js +14 -0
- package/dist/source-control/react/hooks/ProvidersTab.hooks.d.ts +1 -1
- package/dist/source-control/react/hooks/ProvidersTab.hooks.js +1 -1
- package/dist/source-control/react/hooks/SourceControlPage.hooks.d.ts +1 -1
- package/dist/source-control/react/index.js +1 -1
- package/dist/source-control/react/pages/SourceControlPage.d.ts +1 -1
- package/dist/source-control/react/tabs/ProvidersTab.d.ts +1 -1
- package/dist/widgets/adapters/http.d.ts +19 -0
- package/dist/widgets/adapters/http.js +33 -0
- package/dist/widgets/adapters/memory.d.ts +22 -0
- package/dist/widgets/adapters/memory.js +93 -0
- package/dist/widgets/conformance/widgets-api.conformance.d.ts +6 -0
- package/dist/widgets/conformance/widgets-api.conformance.js +55 -0
- package/dist/widgets/controllers/instance-editor.controller.d.ts +49 -0
- package/dist/widgets/controllers/instance-editor.controller.js +87 -0
- package/dist/widgets/controllers/library.controller.d.ts +33 -0
- package/dist/widgets/controllers/library.controller.js +53 -0
- package/dist/widgets/controllers/region-editor.controller.d.ts +42 -0
- package/dist/widgets/controllers/region-editor.controller.js +69 -0
- package/dist/widgets/controllers/regions.controller.d.ts +27 -0
- package/dist/widgets/controllers/regions.controller.js +44 -0
- package/dist/widgets/index.d.ts +11 -0
- package/dist/widgets/index.js +9 -0
- package/dist/widgets/messages.en.d.ts +78 -0
- package/dist/widgets/messages.en.js +83 -0
- package/dist/widgets/models.d.ts +62 -0
- package/dist/widgets/models.js +2 -0
- package/dist/widgets/ports.d.ts +79 -0
- package/dist/widgets/ports.js +5 -0
- package/dist/widgets/react/components/WidgetInstanceNotices.d.ts +14 -0
- package/dist/widgets/react/components/WidgetInstanceNotices.js +25 -0
- package/dist/widgets/react/components/WidgetRegionEditorHeaderActions.d.ts +22 -0
- package/dist/widgets/react/components/WidgetRegionEditorHeaderActions.js +18 -0
- package/dist/widgets/react/components/WidgetsLibraryNotices.d.ts +13 -0
- package/dist/widgets/react/components/WidgetsLibraryNotices.js +10 -0
- package/dist/widgets/react/hooks/WidgetsPorts.hooks.d.ts +270 -0
- package/dist/widgets/react/hooks/WidgetsPorts.hooks.js +17 -0
- package/dist/widgets/react/hooks/navigation.hooks.d.ts +9 -0
- package/dist/widgets/react/hooks/navigation.hooks.js +6 -0
- package/dist/widgets/react/hooks/page-views.hooks.d.ts +87 -0
- package/dist/widgets/react/hooks/page-views.hooks.js +30 -0
- package/dist/widgets/react/hooks/use-widget-instance-editor.hooks.d.ts +56 -0
- package/dist/widgets/react/hooks/use-widget-instance-editor.hooks.js +38 -0
- package/dist/widgets/react/hooks/use-widget-region-editor.hooks.d.ts +32 -0
- package/dist/widgets/react/hooks/use-widget-region-editor.hooks.js +22 -0
- package/dist/widgets/react/hooks/use-widget-regions.hooks.d.ts +23 -0
- package/dist/widgets/react/hooks/use-widget-regions.hooks.js +22 -0
- package/dist/widgets/react/hooks/use-widgets-library.hooks.d.ts +37 -0
- package/dist/widgets/react/hooks/use-widgets-library.hooks.js +23 -0
- package/dist/widgets/react/index.d.ts +391 -0
- package/dist/widgets/react/index.js +31 -0
- package/dist/widgets/react/pages/WidgetInstanceEditor.d.ts +23 -0
- package/dist/widgets/react/pages/WidgetInstanceEditor.js +37 -0
- package/dist/widgets/react/pages/WidgetRegionEditor.d.ts +22 -0
- package/dist/widgets/react/pages/WidgetRegionEditor.js +25 -0
- package/dist/widgets/react/pages/WidgetRegions.d.ts +21 -0
- package/dist/widgets/react/pages/WidgetRegions.js +31 -0
- package/dist/widgets/react/pages/WidgetsLibrary.d.ts +24 -0
- package/dist/widgets/react/pages/WidgetsLibrary.js +61 -0
- package/dist/widgets/rules.d.ts +94 -0
- package/dist/widgets/rules.js +83 -0
- package/dist/widgets/widgets.module.d.ts +122 -0
- package/dist/widgets/widgets.module.js +21 -0
- package/package.json +206 -9
|
@@ -0,0 +1,316 @@
|
|
|
1
|
+
import { type CommentsTranslator } from '../messages.en.js';
|
|
2
|
+
export type { CommentsProps } from './pages/CommentsPage.js';
|
|
3
|
+
export type { QueueSectionProps } from './components/QueueSection.js';
|
|
4
|
+
export type { SettingsSectionProps } from './components/SettingsSection.js';
|
|
5
|
+
export { useComments, useWiredComments } from './hooks/use-comments.hooks.js';
|
|
6
|
+
export { useCommentQueue, useWiredCommentQueue } from './hooks/use-comment-queue.hooks.js';
|
|
7
|
+
export { useCommentSettings, useWiredCommentSettings } from './hooks/use-comment-settings.hooks.js';
|
|
8
|
+
export { useCommentsPorts } from './hooks/CommentsPorts.hooks.js';
|
|
9
|
+
/** One comments module per admin scope. Host translation is scoped without adding rendered DOM.
|
|
10
|
+
* The queue page is loaded lazily; its two sections retain their current single-page composition.
|
|
11
|
+
*/
|
|
12
|
+
export declare function comments(_required: Record<string, never>, { t }?: {
|
|
13
|
+
t?: CommentsTranslator;
|
|
14
|
+
}): {
|
|
15
|
+
id: "comments";
|
|
16
|
+
requires: {
|
|
17
|
+
readonly commentsApi: import("../../core/module/token.js").AdminPortToken<import("../index.js").AdminCommentsPort, "admin.comments.api">;
|
|
18
|
+
readonly commentsSession: import("../../core/module/token.js").AdminPortToken<import("../ports.js").CommentsSessionPort, "admin.comments.session">;
|
|
19
|
+
};
|
|
20
|
+
optional: {
|
|
21
|
+
readonly commentsEvents: import("../../core/module/token.js").AdminPortToken<import("../ports.js").CommentsEventsPort, "admin.comments.events">;
|
|
22
|
+
};
|
|
23
|
+
messages: {
|
|
24
|
+
readonly Status: "Status";
|
|
25
|
+
readonly "Actions for the comment by \"{author}\"": "Actions for the comment by \"{author}\"";
|
|
26
|
+
readonly Author: "Author";
|
|
27
|
+
readonly Comment: "Comment";
|
|
28
|
+
readonly Depth: "Depth";
|
|
29
|
+
readonly Created: "Created";
|
|
30
|
+
readonly More: "More";
|
|
31
|
+
readonly "Loading\u2026": "Loading…";
|
|
32
|
+
readonly "Load more": "Load more";
|
|
33
|
+
readonly "Loading comments\u2026": "Loading comments…";
|
|
34
|
+
readonly "No {status} comments.": "No {status} comments.";
|
|
35
|
+
readonly "Permanently delete this comment?": "Permanently delete this comment?";
|
|
36
|
+
readonly "Permanently delete this comment by \"{author}\"? This cannot be undone.": "Permanently delete this comment by \"{author}\"? This cannot be undone.";
|
|
37
|
+
readonly "Permanently delete": "Permanently delete";
|
|
38
|
+
readonly "Loading Comments settings\u2026": "Loading Comments settings…";
|
|
39
|
+
readonly Settings: "Settings";
|
|
40
|
+
readonly "Comments enabled": "Comments enabled";
|
|
41
|
+
readonly "Require moderation (new comments start pending)": "Require moderation (new comments start pending)";
|
|
42
|
+
readonly "Max thread depth": "Max thread depth";
|
|
43
|
+
readonly "Close submissions after (days, blank = never)": "Close submissions after (days, blank = never)";
|
|
44
|
+
readonly "Spam auto-reject score (0\u20131)": "Spam auto-reject score (0–1)";
|
|
45
|
+
readonly "Max submissions per IP per hour": "Max submissions per IP per hour";
|
|
46
|
+
readonly "Saving\u2026": "Saving…";
|
|
47
|
+
readonly "Save settings": "Save settings";
|
|
48
|
+
readonly "Loading Comments\u2026": "Loading Comments…";
|
|
49
|
+
readonly People: "People";
|
|
50
|
+
readonly Comments: "Comments";
|
|
51
|
+
readonly "Moderate incoming comments and configure workspace-wide comment behavior.": "Moderate incoming comments and configure workspace-wide comment behavior.";
|
|
52
|
+
readonly "You do not have permission to view the moderation queue.": "You do not have permission to view the moderation queue.";
|
|
53
|
+
readonly "This comment changed since you loaded it (current version {currentVersion}) \u2014 refresh and try again.": "This comment changed since you loaded it (current version {currentVersion}) — refresh and try again.";
|
|
54
|
+
readonly "This comment changed since you loaded it \u2014 refresh and try again.": "This comment changed since you loaded it — refresh and try again.";
|
|
55
|
+
readonly "Failed to update comment.": "Failed to update comment.";
|
|
56
|
+
readonly Approve: "Approve";
|
|
57
|
+
readonly Spam: "Spam";
|
|
58
|
+
readonly Trash: "Trash";
|
|
59
|
+
readonly Restore: "Restore";
|
|
60
|
+
readonly Purge: "Purge";
|
|
61
|
+
readonly "Spam auto-reject score must be between 0 and 1.": "Spam auto-reject score must be between 0 and 1.";
|
|
62
|
+
readonly "failed to load the moderation queue": "failed to load the moderation queue";
|
|
63
|
+
readonly "Failed to purge comment.": "Failed to purge comment.";
|
|
64
|
+
readonly "Saved.": "Saved.";
|
|
65
|
+
readonly "failed to save Comments settings": "failed to save Comments settings";
|
|
66
|
+
readonly "failed to load Comments settings": "failed to load Comments settings";
|
|
67
|
+
readonly pending: "Pending";
|
|
68
|
+
readonly approved: "Approved";
|
|
69
|
+
readonly spam: "Spam";
|
|
70
|
+
readonly trash: "Trash";
|
|
71
|
+
};
|
|
72
|
+
pages: {
|
|
73
|
+
readonly queue: {
|
|
74
|
+
readonly path: "/comments";
|
|
75
|
+
readonly label: "Comments";
|
|
76
|
+
readonly permissions: readonly ["comments.read"];
|
|
77
|
+
readonly agentReachable: true;
|
|
78
|
+
readonly nav: {
|
|
79
|
+
readonly group: "people";
|
|
80
|
+
readonly icon: "message-circle";
|
|
81
|
+
};
|
|
82
|
+
readonly tabs: {};
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
} & {
|
|
86
|
+
react: {
|
|
87
|
+
Provider: ({ admin, children, t: currentTranslation }: Parameters<({ admin, children }: {
|
|
88
|
+
admin: import("../../core/module/types.js").AdminInstance;
|
|
89
|
+
children: import("react").ReactNode;
|
|
90
|
+
}, _optional?: Record<string, never>) => import("react").FunctionComponentElement<import("react").ProviderProps<import("../../core/module/types.js").ScopedPorts<{
|
|
91
|
+
id: "comments";
|
|
92
|
+
requires: {
|
|
93
|
+
readonly commentsApi: import("../../core/module/token.js").AdminPortToken<import("../index.js").AdminCommentsPort, "admin.comments.api">;
|
|
94
|
+
readonly commentsSession: import("../../core/module/token.js").AdminPortToken<import("../ports.js").CommentsSessionPort, "admin.comments.session">;
|
|
95
|
+
};
|
|
96
|
+
optional: {
|
|
97
|
+
readonly commentsEvents: import("../../core/module/token.js").AdminPortToken<import("../ports.js").CommentsEventsPort, "admin.comments.events">;
|
|
98
|
+
};
|
|
99
|
+
messages: {
|
|
100
|
+
readonly Status: "Status";
|
|
101
|
+
readonly "Actions for the comment by \"{author}\"": "Actions for the comment by \"{author}\"";
|
|
102
|
+
readonly Author: "Author";
|
|
103
|
+
readonly Comment: "Comment";
|
|
104
|
+
readonly Depth: "Depth";
|
|
105
|
+
readonly Created: "Created";
|
|
106
|
+
readonly More: "More";
|
|
107
|
+
readonly "Loading\u2026": "Loading…";
|
|
108
|
+
readonly "Load more": "Load more";
|
|
109
|
+
readonly "Loading comments\u2026": "Loading comments…";
|
|
110
|
+
readonly "No {status} comments.": "No {status} comments.";
|
|
111
|
+
readonly "Permanently delete this comment?": "Permanently delete this comment?";
|
|
112
|
+
readonly "Permanently delete this comment by \"{author}\"? This cannot be undone.": "Permanently delete this comment by \"{author}\"? This cannot be undone.";
|
|
113
|
+
readonly "Permanently delete": "Permanently delete";
|
|
114
|
+
readonly "Loading Comments settings\u2026": "Loading Comments settings…";
|
|
115
|
+
readonly Settings: "Settings";
|
|
116
|
+
readonly "Comments enabled": "Comments enabled";
|
|
117
|
+
readonly "Require moderation (new comments start pending)": "Require moderation (new comments start pending)";
|
|
118
|
+
readonly "Max thread depth": "Max thread depth";
|
|
119
|
+
readonly "Close submissions after (days, blank = never)": "Close submissions after (days, blank = never)";
|
|
120
|
+
readonly "Spam auto-reject score (0\u20131)": "Spam auto-reject score (0–1)";
|
|
121
|
+
readonly "Max submissions per IP per hour": "Max submissions per IP per hour";
|
|
122
|
+
readonly "Saving\u2026": "Saving…";
|
|
123
|
+
readonly "Save settings": "Save settings";
|
|
124
|
+
readonly "Loading Comments\u2026": "Loading Comments…";
|
|
125
|
+
readonly People: "People";
|
|
126
|
+
readonly Comments: "Comments";
|
|
127
|
+
readonly "Moderate incoming comments and configure workspace-wide comment behavior.": "Moderate incoming comments and configure workspace-wide comment behavior.";
|
|
128
|
+
readonly "You do not have permission to view the moderation queue.": "You do not have permission to view the moderation queue.";
|
|
129
|
+
readonly "This comment changed since you loaded it (current version {currentVersion}) \u2014 refresh and try again.": "This comment changed since you loaded it (current version {currentVersion}) — refresh and try again.";
|
|
130
|
+
readonly "This comment changed since you loaded it \u2014 refresh and try again.": "This comment changed since you loaded it — refresh and try again.";
|
|
131
|
+
readonly "Failed to update comment.": "Failed to update comment.";
|
|
132
|
+
readonly Approve: "Approve";
|
|
133
|
+
readonly Spam: "Spam";
|
|
134
|
+
readonly Trash: "Trash";
|
|
135
|
+
readonly Restore: "Restore";
|
|
136
|
+
readonly Purge: "Purge";
|
|
137
|
+
readonly "Spam auto-reject score must be between 0 and 1.": "Spam auto-reject score must be between 0 and 1.";
|
|
138
|
+
readonly "failed to load the moderation queue": "failed to load the moderation queue";
|
|
139
|
+
readonly "Failed to purge comment.": "Failed to purge comment.";
|
|
140
|
+
readonly "Saved.": "Saved.";
|
|
141
|
+
readonly "failed to save Comments settings": "failed to save Comments settings";
|
|
142
|
+
readonly "failed to load Comments settings": "failed to load Comments settings";
|
|
143
|
+
readonly pending: "Pending";
|
|
144
|
+
readonly approved: "Approved";
|
|
145
|
+
readonly spam: "Spam";
|
|
146
|
+
readonly trash: "Trash";
|
|
147
|
+
};
|
|
148
|
+
pages: {
|
|
149
|
+
readonly queue: {
|
|
150
|
+
readonly path: "/comments";
|
|
151
|
+
readonly label: "Comments";
|
|
152
|
+
readonly permissions: readonly ["comments.read"];
|
|
153
|
+
readonly agentReachable: true;
|
|
154
|
+
readonly nav: {
|
|
155
|
+
readonly group: "people";
|
|
156
|
+
readonly icon: "message-circle";
|
|
157
|
+
};
|
|
158
|
+
readonly tabs: {};
|
|
159
|
+
};
|
|
160
|
+
};
|
|
161
|
+
}> | null>>>[0] & {
|
|
162
|
+
t?: CommentsTranslator;
|
|
163
|
+
}) => import("react").FunctionComponentElement<import("react").ProviderProps<CommentsTranslator>>;
|
|
164
|
+
module: {
|
|
165
|
+
id: "comments";
|
|
166
|
+
requires: {
|
|
167
|
+
readonly commentsApi: import("../../core/module/token.js").AdminPortToken<import("../index.js").AdminCommentsPort, "admin.comments.api">;
|
|
168
|
+
readonly commentsSession: import("../../core/module/token.js").AdminPortToken<import("../ports.js").CommentsSessionPort, "admin.comments.session">;
|
|
169
|
+
};
|
|
170
|
+
optional: {
|
|
171
|
+
readonly commentsEvents: import("../../core/module/token.js").AdminPortToken<import("../ports.js").CommentsEventsPort, "admin.comments.events">;
|
|
172
|
+
};
|
|
173
|
+
messages: {
|
|
174
|
+
readonly Status: "Status";
|
|
175
|
+
readonly "Actions for the comment by \"{author}\"": "Actions for the comment by \"{author}\"";
|
|
176
|
+
readonly Author: "Author";
|
|
177
|
+
readonly Comment: "Comment";
|
|
178
|
+
readonly Depth: "Depth";
|
|
179
|
+
readonly Created: "Created";
|
|
180
|
+
readonly More: "More";
|
|
181
|
+
readonly "Loading\u2026": "Loading…";
|
|
182
|
+
readonly "Load more": "Load more";
|
|
183
|
+
readonly "Loading comments\u2026": "Loading comments…";
|
|
184
|
+
readonly "No {status} comments.": "No {status} comments.";
|
|
185
|
+
readonly "Permanently delete this comment?": "Permanently delete this comment?";
|
|
186
|
+
readonly "Permanently delete this comment by \"{author}\"? This cannot be undone.": "Permanently delete this comment by \"{author}\"? This cannot be undone.";
|
|
187
|
+
readonly "Permanently delete": "Permanently delete";
|
|
188
|
+
readonly "Loading Comments settings\u2026": "Loading Comments settings…";
|
|
189
|
+
readonly Settings: "Settings";
|
|
190
|
+
readonly "Comments enabled": "Comments enabled";
|
|
191
|
+
readonly "Require moderation (new comments start pending)": "Require moderation (new comments start pending)";
|
|
192
|
+
readonly "Max thread depth": "Max thread depth";
|
|
193
|
+
readonly "Close submissions after (days, blank = never)": "Close submissions after (days, blank = never)";
|
|
194
|
+
readonly "Spam auto-reject score (0\u20131)": "Spam auto-reject score (0–1)";
|
|
195
|
+
readonly "Max submissions per IP per hour": "Max submissions per IP per hour";
|
|
196
|
+
readonly "Saving\u2026": "Saving…";
|
|
197
|
+
readonly "Save settings": "Save settings";
|
|
198
|
+
readonly "Loading Comments\u2026": "Loading Comments…";
|
|
199
|
+
readonly People: "People";
|
|
200
|
+
readonly Comments: "Comments";
|
|
201
|
+
readonly "Moderate incoming comments and configure workspace-wide comment behavior.": "Moderate incoming comments and configure workspace-wide comment behavior.";
|
|
202
|
+
readonly "You do not have permission to view the moderation queue.": "You do not have permission to view the moderation queue.";
|
|
203
|
+
readonly "This comment changed since you loaded it (current version {currentVersion}) \u2014 refresh and try again.": "This comment changed since you loaded it (current version {currentVersion}) — refresh and try again.";
|
|
204
|
+
readonly "This comment changed since you loaded it \u2014 refresh and try again.": "This comment changed since you loaded it — refresh and try again.";
|
|
205
|
+
readonly "Failed to update comment.": "Failed to update comment.";
|
|
206
|
+
readonly Approve: "Approve";
|
|
207
|
+
readonly Spam: "Spam";
|
|
208
|
+
readonly Trash: "Trash";
|
|
209
|
+
readonly Restore: "Restore";
|
|
210
|
+
readonly Purge: "Purge";
|
|
211
|
+
readonly "Spam auto-reject score must be between 0 and 1.": "Spam auto-reject score must be between 0 and 1.";
|
|
212
|
+
readonly "failed to load the moderation queue": "failed to load the moderation queue";
|
|
213
|
+
readonly "Failed to purge comment.": "Failed to purge comment.";
|
|
214
|
+
readonly "Saved.": "Saved.";
|
|
215
|
+
readonly "failed to save Comments settings": "failed to save Comments settings";
|
|
216
|
+
readonly "failed to load Comments settings": "failed to load Comments settings";
|
|
217
|
+
readonly pending: "Pending";
|
|
218
|
+
readonly approved: "Approved";
|
|
219
|
+
readonly spam: "Spam";
|
|
220
|
+
readonly trash: "Trash";
|
|
221
|
+
};
|
|
222
|
+
pages: {
|
|
223
|
+
readonly queue: {
|
|
224
|
+
readonly path: "/comments";
|
|
225
|
+
readonly label: "Comments";
|
|
226
|
+
readonly permissions: readonly ["comments.read"];
|
|
227
|
+
readonly agentReachable: true;
|
|
228
|
+
readonly nav: {
|
|
229
|
+
readonly group: "people";
|
|
230
|
+
readonly icon: "message-circle";
|
|
231
|
+
};
|
|
232
|
+
readonly tabs: {};
|
|
233
|
+
};
|
|
234
|
+
};
|
|
235
|
+
};
|
|
236
|
+
pages: {
|
|
237
|
+
readonly queue: {
|
|
238
|
+
Page: import("react").LazyExoticComponent<import("react").ComponentType<import("../../react/bind-react.js").ModulePageProps>>;
|
|
239
|
+
tabs: {};
|
|
240
|
+
};
|
|
241
|
+
};
|
|
242
|
+
usePorts: (_required?: Record<string, never>, _optional?: Record<string, never>) => import("../../core/module/types.js").ScopedPorts<{
|
|
243
|
+
id: "comments";
|
|
244
|
+
requires: {
|
|
245
|
+
readonly commentsApi: import("../../core/module/token.js").AdminPortToken<import("../index.js").AdminCommentsPort, "admin.comments.api">;
|
|
246
|
+
readonly commentsSession: import("../../core/module/token.js").AdminPortToken<import("../ports.js").CommentsSessionPort, "admin.comments.session">;
|
|
247
|
+
};
|
|
248
|
+
optional: {
|
|
249
|
+
readonly commentsEvents: import("../../core/module/token.js").AdminPortToken<import("../ports.js").CommentsEventsPort, "admin.comments.events">;
|
|
250
|
+
};
|
|
251
|
+
messages: {
|
|
252
|
+
readonly Status: "Status";
|
|
253
|
+
readonly "Actions for the comment by \"{author}\"": "Actions for the comment by \"{author}\"";
|
|
254
|
+
readonly Author: "Author";
|
|
255
|
+
readonly Comment: "Comment";
|
|
256
|
+
readonly Depth: "Depth";
|
|
257
|
+
readonly Created: "Created";
|
|
258
|
+
readonly More: "More";
|
|
259
|
+
readonly "Loading\u2026": "Loading…";
|
|
260
|
+
readonly "Load more": "Load more";
|
|
261
|
+
readonly "Loading comments\u2026": "Loading comments…";
|
|
262
|
+
readonly "No {status} comments.": "No {status} comments.";
|
|
263
|
+
readonly "Permanently delete this comment?": "Permanently delete this comment?";
|
|
264
|
+
readonly "Permanently delete this comment by \"{author}\"? This cannot be undone.": "Permanently delete this comment by \"{author}\"? This cannot be undone.";
|
|
265
|
+
readonly "Permanently delete": "Permanently delete";
|
|
266
|
+
readonly "Loading Comments settings\u2026": "Loading Comments settings…";
|
|
267
|
+
readonly Settings: "Settings";
|
|
268
|
+
readonly "Comments enabled": "Comments enabled";
|
|
269
|
+
readonly "Require moderation (new comments start pending)": "Require moderation (new comments start pending)";
|
|
270
|
+
readonly "Max thread depth": "Max thread depth";
|
|
271
|
+
readonly "Close submissions after (days, blank = never)": "Close submissions after (days, blank = never)";
|
|
272
|
+
readonly "Spam auto-reject score (0\u20131)": "Spam auto-reject score (0–1)";
|
|
273
|
+
readonly "Max submissions per IP per hour": "Max submissions per IP per hour";
|
|
274
|
+
readonly "Saving\u2026": "Saving…";
|
|
275
|
+
readonly "Save settings": "Save settings";
|
|
276
|
+
readonly "Loading Comments\u2026": "Loading Comments…";
|
|
277
|
+
readonly People: "People";
|
|
278
|
+
readonly Comments: "Comments";
|
|
279
|
+
readonly "Moderate incoming comments and configure workspace-wide comment behavior.": "Moderate incoming comments and configure workspace-wide comment behavior.";
|
|
280
|
+
readonly "You do not have permission to view the moderation queue.": "You do not have permission to view the moderation queue.";
|
|
281
|
+
readonly "This comment changed since you loaded it (current version {currentVersion}) \u2014 refresh and try again.": "This comment changed since you loaded it (current version {currentVersion}) — refresh and try again.";
|
|
282
|
+
readonly "This comment changed since you loaded it \u2014 refresh and try again.": "This comment changed since you loaded it — refresh and try again.";
|
|
283
|
+
readonly "Failed to update comment.": "Failed to update comment.";
|
|
284
|
+
readonly Approve: "Approve";
|
|
285
|
+
readonly Spam: "Spam";
|
|
286
|
+
readonly Trash: "Trash";
|
|
287
|
+
readonly Restore: "Restore";
|
|
288
|
+
readonly Purge: "Purge";
|
|
289
|
+
readonly "Spam auto-reject score must be between 0 and 1.": "Spam auto-reject score must be between 0 and 1.";
|
|
290
|
+
readonly "failed to load the moderation queue": "failed to load the moderation queue";
|
|
291
|
+
readonly "Failed to purge comment.": "Failed to purge comment.";
|
|
292
|
+
readonly "Saved.": "Saved.";
|
|
293
|
+
readonly "failed to save Comments settings": "failed to save Comments settings";
|
|
294
|
+
readonly "failed to load Comments settings": "failed to load Comments settings";
|
|
295
|
+
readonly pending: "Pending";
|
|
296
|
+
readonly approved: "Approved";
|
|
297
|
+
readonly spam: "Spam";
|
|
298
|
+
readonly trash: "Trash";
|
|
299
|
+
};
|
|
300
|
+
pages: {
|
|
301
|
+
readonly queue: {
|
|
302
|
+
readonly path: "/comments";
|
|
303
|
+
readonly label: "Comments";
|
|
304
|
+
readonly permissions: readonly ["comments.read"];
|
|
305
|
+
readonly agentReachable: true;
|
|
306
|
+
readonly nav: {
|
|
307
|
+
readonly group: "people";
|
|
308
|
+
readonly icon: "message-circle";
|
|
309
|
+
};
|
|
310
|
+
readonly tabs: {};
|
|
311
|
+
};
|
|
312
|
+
};
|
|
313
|
+
}>;
|
|
314
|
+
};
|
|
315
|
+
};
|
|
316
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { createElement } from 'react';
|
|
2
|
+
import { bindReact } from '../../core/react/bind-react.js';
|
|
3
|
+
import { commentsModule } from '../comments.module.js';
|
|
4
|
+
import { englishComments } from '../messages.en.js';
|
|
5
|
+
import { CommentsPortsContext, CommentsTranslationContext } from './hooks/CommentsPorts.hooks.js';
|
|
6
|
+
export { useComments, useWiredComments } from './hooks/use-comments.hooks.js';
|
|
7
|
+
export { useCommentQueue, useWiredCommentQueue } from './hooks/use-comment-queue.hooks.js';
|
|
8
|
+
export { useCommentSettings, useWiredCommentSettings } from './hooks/use-comment-settings.hooks.js';
|
|
9
|
+
export { useCommentsPorts } from './hooks/CommentsPorts.hooks.js';
|
|
10
|
+
/** One comments module per admin scope. Host translation is scoped without adding rendered DOM.
|
|
11
|
+
* The queue page is loaded lazily; its two sections retain their current single-page composition.
|
|
12
|
+
*/
|
|
13
|
+
export function comments(_required, { t = englishComments } = {}) {
|
|
14
|
+
// Scope membership uses object identity, so bind and return this same per-admin module.
|
|
15
|
+
const module = { ...commentsModule };
|
|
16
|
+
const react = bindReact({ module, views: {
|
|
17
|
+
queue: {
|
|
18
|
+
page: async () => {
|
|
19
|
+
const { CommentsPage } = await import('./pages/CommentsPage.js');
|
|
20
|
+
return { default: (_props) => createElement(CommentsPage, {}) };
|
|
21
|
+
},
|
|
22
|
+
tabs: {},
|
|
23
|
+
},
|
|
24
|
+
} }, { context: CommentsPortsContext });
|
|
25
|
+
const ScopeProvider = react.Provider;
|
|
26
|
+
/** A live translator override keeps locale changes inside the existing scope: rebuilding
|
|
27
|
+
* the module would remount the queue and discard the uncontrolled settings form.
|
|
28
|
+
* @example createElement(feature.react.Provider, { admin, t: hostTranslator, children })
|
|
29
|
+
*/
|
|
30
|
+
function Provider({ admin, children, t: currentTranslation = t }) {
|
|
31
|
+
return createElement(CommentsTranslationContext.Provider, { value: currentTranslation }, createElement(ScopeProvider, { admin, children }));
|
|
32
|
+
}
|
|
33
|
+
return Object.assign(module, { react: { ...react, Provider } });
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { useWiredComments } from '../hooks/use-comments.hooks.js';
|
|
2
|
+
export interface CommentsProps {
|
|
3
|
+
/**
|
|
4
|
+
* Dependency injection seam for tests — the same convention `@jini-ai/ui`'s `CustomSelect` uses
|
|
5
|
+
* for `useCustomSelect`. Defaulted to the real hook, so production callers (`panels.tsx`) pass
|
|
6
|
+
* nothing and behave exactly as before.
|
|
7
|
+
*/
|
|
8
|
+
useCommentsHook?: typeof useWiredComments;
|
|
9
|
+
}
|
|
10
|
+
export declare function CommentsPage(props?: CommentsProps): import("react").JSX.Element;
|
|
11
|
+
export default CommentsPage;
|
|
12
|
+
//# sourceMappingURL=CommentsPage.d.ts.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { QueueSection } from '../components/QueueSection.js';
|
|
3
|
+
import { SettingsSection } from '../components/SettingsSection.js';
|
|
4
|
+
import { useWiredComments } from '../hooks/use-comments.hooks.js';
|
|
5
|
+
import { useCommentsPage } from '../hooks/CommentsPage.hooks.js';
|
|
6
|
+
export function CommentsPage(props = {}) {
|
|
7
|
+
const { permissions, error, t, canRead, canConfigure } = useCommentsPage(props);
|
|
8
|
+
if (error)
|
|
9
|
+
return _jsx("div", { className: "notice error", children: error });
|
|
10
|
+
if (!permissions)
|
|
11
|
+
return _jsx("div", { className: "notice", children: t("Loading Comments…") });
|
|
12
|
+
return (_jsxs("div", { className: "page", children: [_jsx("div", { className: "page-header", children: _jsxs("div", { className: "page-header-text", children: [_jsx("p", { className: "page-kicker", children: t("People") }), _jsx("h1", { className: "page-title", children: t("Comments") }), _jsx("p", { className: "page-description", children: t("Moderate incoming comments and configure workspace-wide comment behavior.") })] }) }), canRead ? (_jsx(QueueSection, { permissions: permissions, t: t })) : (_jsx("div", { className: "notice", children: t("You do not have permission to view the moderation queue.") })), _jsx(SettingsSection, { canConfigure: canConfigure, t: t })] }));
|
|
13
|
+
}
|
|
14
|
+
export default CommentsPage;
|
|
15
|
+
//# sourceMappingURL=CommentsPage.js.map
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import type { AdminComment, CommentModerationAction, CommentsSettings, CommentStatus } from '../core/ports/comments.js';
|
|
2
|
+
import type { RowMenuItem } from '../react/components/RowMenu/RowMenu.js';
|
|
3
|
+
import { type CommentsTranslator } from './messages.en.js';
|
|
4
|
+
/**
|
|
5
|
+
* @file Pure logic for the `comments` feature — everything that computes a value rather than
|
|
6
|
+
* rendering one. Follows the `posts/rules.ts` convention: no React import, no hooks, directly
|
|
7
|
+
* testable.
|
|
8
|
+
*
|
|
9
|
+
* Moved here from `react/pages/CommentsPage.tsx`: `RowActionState`/`emptyRowState` and `describeModerationError`/
|
|
10
|
+
* `truncate` (already module-scope free functions in the original, just not exported), the
|
|
11
|
+
* moderation-queue row-menu item builder (a permission-and-status branch per action), and the
|
|
12
|
+
* Comments-settings patch builder plus its validation (REQ-08/09/10).
|
|
13
|
+
*
|
|
14
|
+
* `KEYS` (fetch-query migration, 2026-08-12): three independent resources this feature's three
|
|
15
|
+
* hooks each own — the operator's own effective permissions, the moderation queue (one cache
|
|
16
|
+
* identity PER status filter, `queue(status)`), and the settings form. `queueRoot` is the
|
|
17
|
+
* INVALIDATION target for a moderation action succeeding, not a read key of its own: a moderate/
|
|
18
|
+
* purge action always moves a comment to a DIFFERENT status than the one currently filtered, so the
|
|
19
|
+
* pre-migration `reloadFirstPage()` only ever refreshed the CURRENT filter's page — leaving a
|
|
20
|
+
* previously-visited OTHER status tab's cache stale (missing the comment) until the operator
|
|
21
|
+
* happened to force a reload. Invalidating the shared `["comments","queue"]` prefix instead
|
|
22
|
+
* refreshes every status tab's cache at once (matching by prefix — see `@jini-ai/ui/fetch-query`'s
|
|
23
|
+
* `QueryKey` doc), closing that gap; see `react/hooks/use-comment-queue.hooks.ts`'s own doc comment.
|
|
24
|
+
*/
|
|
25
|
+
export declare const KEYS: {
|
|
26
|
+
permissions: readonly ["comments", "permissions"];
|
|
27
|
+
queueRoot: readonly ["comments", "queue"];
|
|
28
|
+
queue: (status: CommentStatus) => readonly string[];
|
|
29
|
+
settings: readonly ["comments", "settings"];
|
|
30
|
+
};
|
|
31
|
+
/** The moderation queue's name on `lib/content-refresh-bus.ts` — see `taxonomy/rules.ts`'s
|
|
32
|
+
* `TAXONOMY_RESOURCE` for why this is a plain colocated constant rather than a shared registry.
|
|
33
|
+
* Agent-writable via `comments_approve_comment`/`comments_mark_comment_spam`/
|
|
34
|
+
* `comments_trash_comment`/`comments_restore_comment` (`apps/website/src/features/comments/
|
|
35
|
+
* agent-tools.ts`), all of which move a comment between statuses this queue lists.
|
|
36
|
+
*
|
|
37
|
+
* There is deliberately NO sibling `COMMENTS_SETTINGS_RESOURCE`: `react/hooks/use-comment-settings.hooks.ts`'s
|
|
38
|
+
* own header records a real, already-fixed lost-update bug (TM-TOVU-2026-08-12-A) whose fix is a
|
|
39
|
+
* ONE-SHOT seed guard that refuses to re-seed `settings` from any later successful load, including
|
|
40
|
+
* this bus's own out-of-band notification. Wiring that hook to the bus would either do nothing
|
|
41
|
+
* (the guard blocks it) or, if the guard were bypassed instead, reintroduce the exact silent
|
|
42
|
+
* revert the guard exists to prevent — so `comments_update_settings` stays unwired to this bus on
|
|
43
|
+
* purpose. See that hook's own file header for the full incident record. */
|
|
44
|
+
export declare const COMMENTS_QUEUE_RESOURCE = "comments-queue";
|
|
45
|
+
/** Per-row moderation-action state (Approve/Spam/Trash/Restore/Purge share one `busy` flag — only
|
|
46
|
+
* one action per row at a time). */
|
|
47
|
+
export interface RowActionState {
|
|
48
|
+
busy: boolean;
|
|
49
|
+
error: string | null;
|
|
50
|
+
}
|
|
51
|
+
export declare function emptyRowState(_required?: Record<string, never>, _optional?: Record<string, never>): RowActionState;
|
|
52
|
+
/** REQ-07: a 409 (stale `expectedVersion`) gets its own message instead of the generic fallback,
|
|
53
|
+
* using the route's own `{error, currentVersion}` body when present. */
|
|
54
|
+
export declare function describeModerationError({ e }: {
|
|
55
|
+
e: unknown;
|
|
56
|
+
}, { t }?: {
|
|
57
|
+
t?: CommentsTranslator;
|
|
58
|
+
}): string;
|
|
59
|
+
export declare function truncate({ text, max }: {
|
|
60
|
+
text: string;
|
|
61
|
+
max: number;
|
|
62
|
+
}, _optional?: Record<string, never>): string;
|
|
63
|
+
/** The callbacks a row menu needs. Passed in rather than imported, so this module stays free of
|
|
64
|
+
* state (same convention as `posts/rules.ts`'s `PostRowMenuHandlers`). */
|
|
65
|
+
export interface CommentRowMenuHandlers {
|
|
66
|
+
onModerate: (comment: AdminComment, action: CommentModerationAction) => void;
|
|
67
|
+
/** Opens the confirm dialog; only offered under the trash filter for an already-trashed
|
|
68
|
+
* comment, and only with `comments.delete.force`. */
|
|
69
|
+
onRequestPurge: (comment: AdminComment) => void;
|
|
70
|
+
}
|
|
71
|
+
/** At-rest row actions for `RowMenu` — every condition here is copied verbatim from the inline
|
|
72
|
+
* buttons this replaces, so a permission/status combination that used to hide a button still
|
|
73
|
+
* omits the matching menu item rather than rendering a guaranteed-failing click. Each candidate
|
|
74
|
+
* item is its own single-condition pure function above; this just resolves permissions once and
|
|
75
|
+
* filters out the misses.
|
|
76
|
+
*
|
|
77
|
+
* @complexity Time: O(p) for three permission scans, p = effective grant count; output space is
|
|
78
|
+
* constant, with at most five menu entries. Permission ownership stays in the core helper.
|
|
79
|
+
*/
|
|
80
|
+
export declare function commentRowMenuItems({ comment, context, handlers }: {
|
|
81
|
+
comment: AdminComment;
|
|
82
|
+
context: {
|
|
83
|
+
permissions: readonly string[];
|
|
84
|
+
currentFilterStatus: CommentStatus;
|
|
85
|
+
};
|
|
86
|
+
handlers: CommentRowMenuHandlers;
|
|
87
|
+
}, { t }?: {
|
|
88
|
+
t?: CommentsTranslator;
|
|
89
|
+
}): RowMenuItem[];
|
|
90
|
+
/** A blank or non-numeric raw value means "no opinion" — the field is left out of the patch
|
|
91
|
+
* rather than coerced to `0`/`NaN`. Shared by every numeric settings field except
|
|
92
|
+
* `closeAfterDays`, whose blank case means something else (see {@link parseCloseAfterDays}). */
|
|
93
|
+
export declare function parseOptionalNumber({ raw }: {
|
|
94
|
+
raw: string;
|
|
95
|
+
}, _optional?: Record<string, never>): number | undefined;
|
|
96
|
+
/** REQ-10: blank means "never closes" -> `null` on the wire; the UI never sends the backend's own
|
|
97
|
+
* `-1` sentinel, only `null` or a positive number. A non-numeric raw value is "no opinion"
|
|
98
|
+
* (`undefined`), same as the other numeric fields. */
|
|
99
|
+
export declare function parseCloseAfterDays({ raw }: {
|
|
100
|
+
raw: string;
|
|
101
|
+
}, _optional?: Record<string, never>): number | null | undefined;
|
|
102
|
+
/** REQ-08/09/10: builds a partial patch containing only the fields the operator actually changed
|
|
103
|
+
* (the backend's `setCommentsSettings` is a partial-patch contract — REQ-08 asks the client to
|
|
104
|
+
* mirror that instead of always sending the full object, as `Seo.tsx`'s form does). Each field's
|
|
105
|
+
* diff logic is a standalone pure helper above so it can be tested (and reasoned about) on its
|
|
106
|
+
* own; this function is just the merge. */
|
|
107
|
+
export declare function buildSettingsPatch(required: {
|
|
108
|
+
form: FormData;
|
|
109
|
+
current: CommentsSettings;
|
|
110
|
+
}, _optional?: Record<string, never>): Partial<CommentsSettings>;
|
|
111
|
+
/** REQ-09: client-side validates `spamAutoRejectScore` before the network call — mirrors the
|
|
112
|
+
* backend's own `validateCommentsSettingsPatch` bound (`src/comments/settings.ts`). Returns the
|
|
113
|
+
* error message to show, or `null` when the patch is valid. Split out of `save`'s body (originally
|
|
114
|
+
* an inline `if`) because it is the one piece of that flow that computes a value rather than
|
|
115
|
+
* performing an effect. */
|
|
116
|
+
export declare function validateSettingsPatch({ patch }: {
|
|
117
|
+
patch: Partial<CommentsSettings>;
|
|
118
|
+
}, { t }?: {
|
|
119
|
+
t?: CommentsTranslator;
|
|
120
|
+
}): string | null;
|
|
121
|
+
/**
|
|
122
|
+
* `useCommentSettings`'s error banner, extracted out of that hook (`refactor/fetch-query`
|
|
123
|
+
* complexity pass, 2026-08-12 — same reason `redirects/rules.ts`'s `visibleRedirectsError` was
|
|
124
|
+
* extracted). Precedence, highest first: a client-side validation failure (the operator hasn't even
|
|
125
|
+
* submitted a valid patch yet — a stale write/list error underneath it would be a confusing second
|
|
126
|
+
* message), then the save write's own failure, then — only before `settings` has ever loaded — the
|
|
127
|
+
* list-read failure, matching every other migrated feature's "a later background failure must not
|
|
128
|
+
* blank an already-rendered screen" guard.
|
|
129
|
+
*
|
|
130
|
+
* @complexity Time/space: O(1) — four fixed checks, no iteration.
|
|
131
|
+
*/
|
|
132
|
+
export declare function visibleCommentSettingsError(params: {
|
|
133
|
+
validationError: string | null;
|
|
134
|
+
saveError: Error | null;
|
|
135
|
+
saveFallback: string;
|
|
136
|
+
listError: Error | null;
|
|
137
|
+
listFallback: string;
|
|
138
|
+
hasSettings: boolean;
|
|
139
|
+
}, _optional?: Record<string, never>): string | null;
|
|
140
|
+
//# sourceMappingURL=rules.d.ts.map
|