@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,138 @@
|
|
|
1
|
+
export declare const formsModule: {
|
|
2
|
+
readonly id: "forms";
|
|
3
|
+
readonly requires: {
|
|
4
|
+
readonly formsApi: import("../core/module/token.js").AdminPortToken<import("./ports.js").AdminFormsPort, "admin.forms.api">;
|
|
5
|
+
readonly formsTrash: import("../core/module/token.js").AdminPortToken<import("./ports.js").FormsTrashPort, "admin.forms.trash">;
|
|
6
|
+
};
|
|
7
|
+
readonly optional: {
|
|
8
|
+
readonly formsEvents: import("../core/module/token.js").AdminPortToken<import("./ports.js").FormsEventsPort, "admin.forms.events">;
|
|
9
|
+
readonly formsNavigation: import("../core/module/token.js").AdminPortToken<import("./ports.js").FormsNavigationPort, "admin.forms.navigation">;
|
|
10
|
+
};
|
|
11
|
+
readonly messages: {
|
|
12
|
+
readonly "Created / Updated": "Created / Updated";
|
|
13
|
+
readonly "Created {created} \u00B7 Updated {updated}": "Created {created} · Updated {updated}";
|
|
14
|
+
readonly "Created {date}": "Created {date}";
|
|
15
|
+
readonly "Updated {date}": "Updated {date}";
|
|
16
|
+
readonly Builder: "Builder";
|
|
17
|
+
readonly HTML: "HTML";
|
|
18
|
+
readonly "Form authoring mode": "Form authoring mode";
|
|
19
|
+
readonly "Form HTML": "Form HTML";
|
|
20
|
+
readonly "Copy HTML embed": "Copy HTML embed";
|
|
21
|
+
readonly "Copied!": "Copied!";
|
|
22
|
+
readonly "Could not copy embed": "Could not copy embed";
|
|
23
|
+
readonly Send: "Send";
|
|
24
|
+
readonly Back: "Back";
|
|
25
|
+
readonly Content: "Content";
|
|
26
|
+
readonly Forms: "Forms";
|
|
27
|
+
readonly "Manage the forms embedded across the site and their submissions.": "Manage the forms embedded across the site and their submissions.";
|
|
28
|
+
readonly "New form": "New form";
|
|
29
|
+
readonly "No forms yet.": "No forms yet.";
|
|
30
|
+
readonly "Create your first form to start collecting submissions.": "Create your first form to start collecting submissions.";
|
|
31
|
+
readonly Name: "Name";
|
|
32
|
+
readonly Slug: "Slug";
|
|
33
|
+
readonly Status: "Status";
|
|
34
|
+
readonly Fields: "Fields";
|
|
35
|
+
readonly Notify: "Notify";
|
|
36
|
+
readonly More: "More";
|
|
37
|
+
readonly off: "off";
|
|
38
|
+
readonly Edit: "Edit";
|
|
39
|
+
readonly Disable: "Disable";
|
|
40
|
+
readonly Enable: "Enable";
|
|
41
|
+
readonly "Move to trash?": "Move to trash?";
|
|
42
|
+
readonly "Move to trash": "Move to trash";
|
|
43
|
+
readonly Move: "Move";
|
|
44
|
+
readonly "to trash? It will disappear from the site and from this list.": "to trash? It will disappear from the site and from this list.";
|
|
45
|
+
readonly "Field attributes \u2014": "Field attributes —";
|
|
46
|
+
readonly "CSS classes": "CSS classes";
|
|
47
|
+
readonly "HTML attributes": "HTML attributes";
|
|
48
|
+
readonly Value: "Value";
|
|
49
|
+
readonly Remove: "Remove";
|
|
50
|
+
readonly "Add attribute": "Add attribute";
|
|
51
|
+
readonly Save: "Save";
|
|
52
|
+
readonly Cancel: "Cancel";
|
|
53
|
+
readonly ID: "ID";
|
|
54
|
+
readonly Label: "Label";
|
|
55
|
+
readonly Type: "Type";
|
|
56
|
+
readonly Req: "Req";
|
|
57
|
+
readonly "Max length": "Max length";
|
|
58
|
+
readonly "Add field": "Add field";
|
|
59
|
+
readonly "Back to submissions": "Back to submissions";
|
|
60
|
+
readonly "Submitted at": "Submitted at";
|
|
61
|
+
readonly "Source IP": "Source IP";
|
|
62
|
+
readonly "Delete submission": "Delete submission";
|
|
63
|
+
readonly "Confirm delete": "Confirm delete";
|
|
64
|
+
readonly "Delete permanently?": "Delete permanently?";
|
|
65
|
+
readonly "This cannot be undone.": "This cannot be undone.";
|
|
66
|
+
readonly "It will disappear from this list. You can restore it from the Trash.": "It will disappear from this list. You can restore it from the Trash.";
|
|
67
|
+
readonly View: "View";
|
|
68
|
+
readonly "Load more": "Load more";
|
|
69
|
+
readonly "Loading\u2026": "Loading…";
|
|
70
|
+
readonly "No submissions yet.": "No submissions yet.";
|
|
71
|
+
readonly "Create form": "Create form";
|
|
72
|
+
readonly Form: "Form";
|
|
73
|
+
readonly "Configure a new form's fields.": "Configure a new form's fields.";
|
|
74
|
+
readonly "Configure this form's fields, or review its submissions.": "Configure this form's fields, or review its submissions.";
|
|
75
|
+
readonly Submissions: "Submissions";
|
|
76
|
+
readonly "Back to forms": "Back to forms";
|
|
77
|
+
readonly "Actions for form \"{name}\"": "Actions for form \"{name}\"";
|
|
78
|
+
readonly "Loading forms\u2026": "Loading forms…";
|
|
79
|
+
readonly Delete: "Delete";
|
|
80
|
+
readonly "See more about field attributes": "See more about field attributes";
|
|
81
|
+
readonly "Add CSS classes and HTML attributes to this field\u2019s input. Classes are unrestricted \u2014 Tailwind utility classes like ": "Add CSS classes and HTML attributes to this field’s input. Classes are unrestricted — Tailwind utility classes like ";
|
|
82
|
+
readonly "or ": "or ";
|
|
83
|
+
readonly " work as expected. Attribute names are limited to a safe allowlist (": " work as expected. Attribute names are limited to a safe allowlist (";
|
|
84
|
+
readonly ", ": ", ";
|
|
85
|
+
readonly ", and a fixed list of layout/behavior attributes) \u2014 anything else, including event handlers like ": ", and a fixed list of layout/behavior attributes) — anything else, including event handlers like ";
|
|
86
|
+
readonly ", is rejected.": ", is rejected.";
|
|
87
|
+
readonly Attribute: "Attribute";
|
|
88
|
+
readonly "e.g. Enter your work email": "e.g. Enter your work email";
|
|
89
|
+
readonly "Existing fields cannot be removed once created": "Existing fields cannot be removed once created";
|
|
90
|
+
readonly "Loading submission\u2026": "Loading submission…";
|
|
91
|
+
readonly "Loading submissions\u2026": "Loading submissions…";
|
|
92
|
+
readonly "Form sections": "Form sections";
|
|
93
|
+
readonly "Loading form\u2026": "Loading form…";
|
|
94
|
+
readonly "failed to delete form": "failed to delete form";
|
|
95
|
+
readonly "This item changed since you loaded it. Reload and try again.": "This item changed since you loaded it. Reload and try again.";
|
|
96
|
+
readonly "failed to update form status": "failed to update form status";
|
|
97
|
+
readonly "failed to load forms": "failed to load forms";
|
|
98
|
+
readonly "save failed": "save failed";
|
|
99
|
+
readonly "status update failed": "status update failed";
|
|
100
|
+
readonly "failed to load form": "failed to load form";
|
|
101
|
+
readonly recipient: "recipient";
|
|
102
|
+
readonly recipients: "recipients";
|
|
103
|
+
readonly "failed to load submissions": "failed to load submissions";
|
|
104
|
+
readonly "failed to load submission": "failed to load submission";
|
|
105
|
+
readonly "delete failed": "delete failed";
|
|
106
|
+
readonly "Unknown field": "Unknown field";
|
|
107
|
+
};
|
|
108
|
+
readonly pages: {
|
|
109
|
+
readonly list: {
|
|
110
|
+
readonly path: "/forms";
|
|
111
|
+
readonly label: "Forms";
|
|
112
|
+
readonly permissions: readonly ["admin.forms.manage"];
|
|
113
|
+
readonly agentReachable: true;
|
|
114
|
+
readonly nav: {
|
|
115
|
+
readonly group: "content";
|
|
116
|
+
readonly icon: "forms";
|
|
117
|
+
};
|
|
118
|
+
readonly tabs: {};
|
|
119
|
+
};
|
|
120
|
+
readonly editor: {
|
|
121
|
+
readonly path: "/forms/:formId";
|
|
122
|
+
readonly label: "Form";
|
|
123
|
+
readonly permissions: readonly ["admin.forms.manage"];
|
|
124
|
+
readonly agentReachable: true;
|
|
125
|
+
readonly tabs: {
|
|
126
|
+
readonly fields: {
|
|
127
|
+
readonly label: "Fields";
|
|
128
|
+
readonly agentReachable: true;
|
|
129
|
+
};
|
|
130
|
+
readonly submissions: {
|
|
131
|
+
readonly label: "Submissions";
|
|
132
|
+
readonly agentReachable: true;
|
|
133
|
+
};
|
|
134
|
+
};
|
|
135
|
+
};
|
|
136
|
+
};
|
|
137
|
+
};
|
|
138
|
+
//# sourceMappingURL=forms.module.d.ts.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { defineAdminModule } from '../core/module/define-admin-module.js';
|
|
2
|
+
import { formsApiToken, formsTrashToken, formsEventsToken, formsNavigationToken } from './ports.js';
|
|
3
|
+
import { formsMessagesEn } from './messages.en.js';
|
|
4
|
+
export const formsModule = defineAdminModule({
|
|
5
|
+
id: 'forms',
|
|
6
|
+
requires: { formsApi: formsApiToken, formsTrash: formsTrashToken },
|
|
7
|
+
optional: { formsEvents: formsEventsToken, formsNavigation: formsNavigationToken },
|
|
8
|
+
messages: formsMessagesEn,
|
|
9
|
+
pages: {
|
|
10
|
+
list: { path: '/forms', label: 'Forms', permissions: ['admin.forms.manage'], agentReachable: true, nav: { group: 'content', icon: 'forms' }, tabs: {} },
|
|
11
|
+
editor: { path: '/forms/:formId', label: 'Form', permissions: ['admin.forms.manage'], agentReachable: true, tabs: {
|
|
12
|
+
fields: { label: 'Fields', agentReachable: true },
|
|
13
|
+
submissions: { label: 'Submissions', agentReachable: true },
|
|
14
|
+
} },
|
|
15
|
+
},
|
|
16
|
+
});
|
|
17
|
+
//# sourceMappingURL=forms.module.js.map
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { AdminFormField, AdminFormSubmission } from "./models.js";
|
|
2
|
+
export interface FormAnswerColumn {
|
|
3
|
+
key: string;
|
|
4
|
+
header: string;
|
|
5
|
+
cell: (submission: AdminFormSubmission) => string;
|
|
6
|
+
}
|
|
7
|
+
/** Persisted descriptors, including those derived from HTML, are the submission table's columns. */
|
|
8
|
+
export declare function formAnswerColumns({ fields }: {
|
|
9
|
+
fields: readonly AdminFormField[];
|
|
10
|
+
}, _optional?: {}): FormAnswerColumn[];
|
|
11
|
+
/** Detail rows reuse the table's persisted field labels, including HTML-derived descriptors.
|
|
12
|
+
* Removed fields retain their answers with a plain fallback instead of exposing their IDs.
|
|
13
|
+
* @complexity O(c + a) time and space for c columns and a submitted answers; no I/O.
|
|
14
|
+
*/
|
|
15
|
+
export declare function formSubmissionRows({ data, answerColumns }: {
|
|
16
|
+
data: AdminFormSubmission['data'];
|
|
17
|
+
answerColumns: readonly FormAnswerColumn[];
|
|
18
|
+
}, { unknownFieldLabel }?: {
|
|
19
|
+
unknownFieldLabel?: string;
|
|
20
|
+
}): Array<{
|
|
21
|
+
key: string;
|
|
22
|
+
label: string;
|
|
23
|
+
value: string;
|
|
24
|
+
}>;
|
|
25
|
+
/** Editable form BODY only: the server supplies the transport and spam-protection wrapper. */
|
|
26
|
+
export declare function formHtmlStarter({ fields }: {
|
|
27
|
+
fields: readonly AdminFormField[];
|
|
28
|
+
}, { submitLabel }?: {
|
|
29
|
+
submitLabel?: string;
|
|
30
|
+
}): string;
|
|
31
|
+
export declare function formHtmlEmbed({ slug }: {
|
|
32
|
+
slug: string;
|
|
33
|
+
}, _optional?: {}): string;
|
|
34
|
+
//# sourceMappingURL=html-rules.d.ts.map
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/** Persisted descriptors, including those derived from HTML, are the submission table's columns. */
|
|
2
|
+
export function formAnswerColumns({ fields }, _optional = {}) {
|
|
3
|
+
return fields.map((field) => ({
|
|
4
|
+
key: `answer:${field.id}`,
|
|
5
|
+
header: field.label,
|
|
6
|
+
cell: (submission) => submission.data[field.id] === undefined ? "" : String(submission.data[field.id]),
|
|
7
|
+
}));
|
|
8
|
+
}
|
|
9
|
+
/** Detail rows reuse the table's persisted field labels, including HTML-derived descriptors.
|
|
10
|
+
* Removed fields retain their answers with a plain fallback instead of exposing their IDs.
|
|
11
|
+
* @complexity O(c + a) time and space for c columns and a submitted answers; no I/O.
|
|
12
|
+
*/
|
|
13
|
+
export function formSubmissionRows({ data, answerColumns }, { unknownFieldLabel = "Unknown field" } = {}) {
|
|
14
|
+
const labels = new Map(answerColumns.map(column => [column.key, column.header]));
|
|
15
|
+
return Object.entries(data).map(([key, value]) => ({
|
|
16
|
+
key, label: labels.get(`answer:${key}`)?.trim() || unknownFieldLabel, value: String(value),
|
|
17
|
+
}));
|
|
18
|
+
}
|
|
19
|
+
function escapeHtml(value) {
|
|
20
|
+
return value.replace(/[&<>"']/g, (char) => ({ "&": "&", "<": "<", ">": ">", '"': """, "'": "'" })[char]);
|
|
21
|
+
}
|
|
22
|
+
/** Editable form BODY only: the server supplies the transport and spam-protection wrapper. */
|
|
23
|
+
export function formHtmlStarter({ fields }, { submitLabel = "Send" } = {}) {
|
|
24
|
+
return fields.map((field) => {
|
|
25
|
+
const attrs = `name="${escapeHtml(field.id)}"${field.required ? " required" : ""}${field.maxLength != null ? ` maxlength="${field.maxLength}"` : ""}`;
|
|
26
|
+
const control = field.type === "textarea" ? `<textarea ${attrs}></textarea>` : `<input type="${field.type}" ${attrs}>`;
|
|
27
|
+
return `<label>${escapeHtml(field.label)}\n ${control}\n</label>`;
|
|
28
|
+
}).join("\n\n") + `\n\n<button type="submit">${escapeHtml(submitLabel)}</button>`;
|
|
29
|
+
}
|
|
30
|
+
export function formHtmlEmbed({ slug }, _optional = {}) {
|
|
31
|
+
const config = JSON.stringify({ type: "form", id: slug, mode: "html" }).replace(/'/g, "'");
|
|
32
|
+
return `<div data-embed-config='${config}'></div>`;
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=html-rules.js.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export { formsModule } from './forms.module.js';
|
|
2
|
+
export { formsApiToken, formsTrashToken, formsEventsToken, formsNavigationToken } from './ports.js';
|
|
3
|
+
export type { AdminFormsPort, FormsTrashPort, FormsEventsPort, FormsNavigationPort } from './ports.js';
|
|
4
|
+
export type { AdminFormDefinition, AdminFormField, AdminFormNotify, AdminFormSubmission, FormsTranslator } from './models.js';
|
|
5
|
+
export { formsMessagesEn, translateForms } from './messages.en.js';
|
|
6
|
+
export * from './rules.js';
|
|
7
|
+
export * from './html-rules.js';
|
|
8
|
+
export { createFormsListController } from './controllers/forms-list.controller.js';
|
|
9
|
+
export { createFormEditorController } from './controllers/form-editor.controller.js';
|
|
10
|
+
export { createFormFieldsEditorController } from './controllers/form-fields-editor.controller.js';
|
|
11
|
+
export { createFieldAttributesDialogController } from './controllers/field-attributes-dialog.controller.js';
|
|
12
|
+
export { createFormSubmissionsController } from './controllers/form-submissions.controller.js';
|
|
13
|
+
export { createFormSubmissionDetailController } from './controllers/form-submission-detail.controller.js';
|
|
14
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export { formsModule } from './forms.module.js';
|
|
2
|
+
export { formsApiToken, formsTrashToken, formsEventsToken, formsNavigationToken } from './ports.js';
|
|
3
|
+
export { formsMessagesEn, translateForms } from './messages.en.js';
|
|
4
|
+
export * from './rules.js';
|
|
5
|
+
export * from './html-rules.js';
|
|
6
|
+
export { createFormsListController } from './controllers/forms-list.controller.js';
|
|
7
|
+
export { createFormEditorController } from './controllers/form-editor.controller.js';
|
|
8
|
+
export { createFormFieldsEditorController } from './controllers/form-fields-editor.controller.js';
|
|
9
|
+
export { createFieldAttributesDialogController } from './controllers/field-attributes-dialog.controller.js';
|
|
10
|
+
export { createFormSubmissionsController } from './controllers/form-submissions.controller.js';
|
|
11
|
+
export { createFormSubmissionDetailController } from './controllers/form-submission-detail.controller.js';
|
|
12
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import type { FormsTranslator } from "./models.js";
|
|
2
|
+
export declare const formsMessagesEn: {
|
|
3
|
+
readonly "Created / Updated": "Created / Updated";
|
|
4
|
+
readonly "Created {created} \u00B7 Updated {updated}": "Created {created} · Updated {updated}";
|
|
5
|
+
readonly "Created {date}": "Created {date}";
|
|
6
|
+
readonly "Updated {date}": "Updated {date}";
|
|
7
|
+
readonly Builder: "Builder";
|
|
8
|
+
readonly HTML: "HTML";
|
|
9
|
+
readonly "Form authoring mode": "Form authoring mode";
|
|
10
|
+
readonly "Form HTML": "Form HTML";
|
|
11
|
+
readonly "Copy HTML embed": "Copy HTML embed";
|
|
12
|
+
readonly "Copied!": "Copied!";
|
|
13
|
+
readonly "Could not copy embed": "Could not copy embed";
|
|
14
|
+
readonly Send: "Send";
|
|
15
|
+
readonly Back: "Back";
|
|
16
|
+
readonly Content: "Content";
|
|
17
|
+
readonly Forms: "Forms";
|
|
18
|
+
readonly "Manage the forms embedded across the site and their submissions.": "Manage the forms embedded across the site and their submissions.";
|
|
19
|
+
readonly "New form": "New form";
|
|
20
|
+
readonly "No forms yet.": "No forms yet.";
|
|
21
|
+
readonly "Create your first form to start collecting submissions.": "Create your first form to start collecting submissions.";
|
|
22
|
+
readonly Name: "Name";
|
|
23
|
+
readonly Slug: "Slug";
|
|
24
|
+
readonly Status: "Status";
|
|
25
|
+
readonly Fields: "Fields";
|
|
26
|
+
readonly Notify: "Notify";
|
|
27
|
+
readonly More: "More";
|
|
28
|
+
readonly off: "off";
|
|
29
|
+
readonly Edit: "Edit";
|
|
30
|
+
readonly Disable: "Disable";
|
|
31
|
+
readonly Enable: "Enable";
|
|
32
|
+
readonly "Move to trash?": "Move to trash?";
|
|
33
|
+
readonly "Move to trash": "Move to trash";
|
|
34
|
+
readonly Move: "Move";
|
|
35
|
+
readonly "to trash? It will disappear from the site and from this list.": "to trash? It will disappear from the site and from this list.";
|
|
36
|
+
readonly "Field attributes \u2014": "Field attributes —";
|
|
37
|
+
readonly "CSS classes": "CSS classes";
|
|
38
|
+
readonly "HTML attributes": "HTML attributes";
|
|
39
|
+
readonly Value: "Value";
|
|
40
|
+
readonly Remove: "Remove";
|
|
41
|
+
readonly "Add attribute": "Add attribute";
|
|
42
|
+
readonly Save: "Save";
|
|
43
|
+
readonly Cancel: "Cancel";
|
|
44
|
+
readonly ID: "ID";
|
|
45
|
+
readonly Label: "Label";
|
|
46
|
+
readonly Type: "Type";
|
|
47
|
+
readonly Req: "Req";
|
|
48
|
+
readonly "Max length": "Max length";
|
|
49
|
+
readonly "Add field": "Add field";
|
|
50
|
+
readonly "Back to submissions": "Back to submissions";
|
|
51
|
+
readonly "Submitted at": "Submitted at";
|
|
52
|
+
readonly "Source IP": "Source IP";
|
|
53
|
+
readonly "Delete submission": "Delete submission";
|
|
54
|
+
readonly "Confirm delete": "Confirm delete";
|
|
55
|
+
readonly "Delete permanently?": "Delete permanently?";
|
|
56
|
+
readonly "This cannot be undone.": "This cannot be undone.";
|
|
57
|
+
readonly "It will disappear from this list. You can restore it from the Trash.": "It will disappear from this list. You can restore it from the Trash.";
|
|
58
|
+
readonly View: "View";
|
|
59
|
+
readonly "Load more": "Load more";
|
|
60
|
+
readonly "Loading\u2026": "Loading…";
|
|
61
|
+
readonly "No submissions yet.": "No submissions yet.";
|
|
62
|
+
readonly "Create form": "Create form";
|
|
63
|
+
readonly Form: "Form";
|
|
64
|
+
readonly "Configure a new form's fields.": "Configure a new form's fields.";
|
|
65
|
+
readonly "Configure this form's fields, or review its submissions.": "Configure this form's fields, or review its submissions.";
|
|
66
|
+
readonly Submissions: "Submissions";
|
|
67
|
+
readonly "Back to forms": "Back to forms";
|
|
68
|
+
readonly "Actions for form \"{name}\"": "Actions for form \"{name}\"";
|
|
69
|
+
readonly "Loading forms\u2026": "Loading forms…";
|
|
70
|
+
readonly Delete: "Delete";
|
|
71
|
+
readonly "See more about field attributes": "See more about field attributes";
|
|
72
|
+
readonly "Add CSS classes and HTML attributes to this field\u2019s input. Classes are unrestricted \u2014 Tailwind utility classes like ": "Add CSS classes and HTML attributes to this field’s input. Classes are unrestricted — Tailwind utility classes like ";
|
|
73
|
+
readonly "or ": "or ";
|
|
74
|
+
readonly " work as expected. Attribute names are limited to a safe allowlist (": " work as expected. Attribute names are limited to a safe allowlist (";
|
|
75
|
+
readonly ", ": ", ";
|
|
76
|
+
readonly ", and a fixed list of layout/behavior attributes) \u2014 anything else, including event handlers like ": ", and a fixed list of layout/behavior attributes) — anything else, including event handlers like ";
|
|
77
|
+
readonly ", is rejected.": ", is rejected.";
|
|
78
|
+
readonly Attribute: "Attribute";
|
|
79
|
+
readonly "e.g. Enter your work email": "e.g. Enter your work email";
|
|
80
|
+
readonly "Existing fields cannot be removed once created": "Existing fields cannot be removed once created";
|
|
81
|
+
readonly "Loading submission\u2026": "Loading submission…";
|
|
82
|
+
readonly "Loading submissions\u2026": "Loading submissions…";
|
|
83
|
+
readonly "Form sections": "Form sections";
|
|
84
|
+
readonly "Loading form\u2026": "Loading form…";
|
|
85
|
+
readonly "failed to delete form": "failed to delete form";
|
|
86
|
+
readonly "This item changed since you loaded it. Reload and try again.": "This item changed since you loaded it. Reload and try again.";
|
|
87
|
+
readonly "failed to update form status": "failed to update form status";
|
|
88
|
+
readonly "failed to load forms": "failed to load forms";
|
|
89
|
+
readonly "save failed": "save failed";
|
|
90
|
+
readonly "status update failed": "status update failed";
|
|
91
|
+
readonly "failed to load form": "failed to load form";
|
|
92
|
+
readonly recipient: "recipient";
|
|
93
|
+
readonly recipients: "recipients";
|
|
94
|
+
readonly "failed to load submissions": "failed to load submissions";
|
|
95
|
+
readonly "failed to load submission": "failed to load submission";
|
|
96
|
+
readonly "delete failed": "delete failed";
|
|
97
|
+
readonly "Unknown field": "Unknown field";
|
|
98
|
+
};
|
|
99
|
+
/** Host translators may replace any key; the default preserves the original English bytes. */
|
|
100
|
+
export declare const translateForms: FormsTranslator;
|
|
101
|
+
//# sourceMappingURL=messages.en.d.ts.map
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
export const formsMessagesEn = {
|
|
2
|
+
"Created / Updated": "Created / Updated",
|
|
3
|
+
"Created {created} · Updated {updated}": "Created {created} · Updated {updated}",
|
|
4
|
+
"Created {date}": "Created {date}",
|
|
5
|
+
"Updated {date}": "Updated {date}",
|
|
6
|
+
"Builder": "Builder",
|
|
7
|
+
"HTML": "HTML",
|
|
8
|
+
"Form authoring mode": "Form authoring mode",
|
|
9
|
+
"Form HTML": "Form HTML",
|
|
10
|
+
"Copy HTML embed": "Copy HTML embed",
|
|
11
|
+
"Copied!": "Copied!",
|
|
12
|
+
"Could not copy embed": "Could not copy embed",
|
|
13
|
+
"Send": "Send",
|
|
14
|
+
"Back": "Back",
|
|
15
|
+
"Content": "Content",
|
|
16
|
+
"Forms": "Forms",
|
|
17
|
+
"Manage the forms embedded across the site and their submissions.": "Manage the forms embedded across the site and their submissions.",
|
|
18
|
+
"New form": "New form",
|
|
19
|
+
"No forms yet.": "No forms yet.",
|
|
20
|
+
"Create your first form to start collecting submissions.": "Create your first form to start collecting submissions.",
|
|
21
|
+
"Name": "Name",
|
|
22
|
+
"Slug": "Slug",
|
|
23
|
+
"Status": "Status",
|
|
24
|
+
"Fields": "Fields",
|
|
25
|
+
"Notify": "Notify",
|
|
26
|
+
"More": "More",
|
|
27
|
+
"off": "off",
|
|
28
|
+
"Edit": "Edit",
|
|
29
|
+
"Disable": "Disable",
|
|
30
|
+
"Enable": "Enable",
|
|
31
|
+
"Move to trash?": "Move to trash?",
|
|
32
|
+
"Move to trash": "Move to trash",
|
|
33
|
+
"Move": "Move",
|
|
34
|
+
"to trash? It will disappear from the site and from this list.": "to trash? It will disappear from the site and from this list.",
|
|
35
|
+
"Field attributes —": "Field attributes —",
|
|
36
|
+
"CSS classes": "CSS classes",
|
|
37
|
+
"HTML attributes": "HTML attributes",
|
|
38
|
+
"Value": "Value",
|
|
39
|
+
"Remove": "Remove",
|
|
40
|
+
"Add attribute": "Add attribute",
|
|
41
|
+
"Save": "Save",
|
|
42
|
+
"Cancel": "Cancel",
|
|
43
|
+
"ID": "ID",
|
|
44
|
+
"Label": "Label",
|
|
45
|
+
"Type": "Type",
|
|
46
|
+
"Req": "Req",
|
|
47
|
+
"Max length": "Max length",
|
|
48
|
+
"Add field": "Add field",
|
|
49
|
+
"Back to submissions": "Back to submissions",
|
|
50
|
+
"Submitted at": "Submitted at",
|
|
51
|
+
"Source IP": "Source IP",
|
|
52
|
+
"Delete submission": "Delete submission",
|
|
53
|
+
"Confirm delete": "Confirm delete",
|
|
54
|
+
"Delete permanently?": "Delete permanently?",
|
|
55
|
+
"This cannot be undone.": "This cannot be undone.",
|
|
56
|
+
"It will disappear from this list. You can restore it from the Trash.": "It will disappear from this list. You can restore it from the Trash.",
|
|
57
|
+
"View": "View",
|
|
58
|
+
"Load more": "Load more",
|
|
59
|
+
"Loading…": "Loading…",
|
|
60
|
+
"No submissions yet.": "No submissions yet.",
|
|
61
|
+
"Create form": "Create form",
|
|
62
|
+
"Form": "Form",
|
|
63
|
+
"Configure a new form's fields.": "Configure a new form's fields.",
|
|
64
|
+
"Configure this form's fields, or review its submissions.": "Configure this form's fields, or review its submissions.",
|
|
65
|
+
"Submissions": "Submissions",
|
|
66
|
+
"Back to forms": "Back to forms",
|
|
67
|
+
"Actions for form \"{name}\"": "Actions for form \"{name}\"",
|
|
68
|
+
"Loading forms…": "Loading forms…",
|
|
69
|
+
"Delete": "Delete",
|
|
70
|
+
"See more about field attributes": "See more about field attributes",
|
|
71
|
+
"Add CSS classes and HTML attributes to this field’s input. Classes are unrestricted — Tailwind utility classes like ": "Add CSS classes and HTML attributes to this field’s input. Classes are unrestricted — Tailwind utility classes like ",
|
|
72
|
+
"or ": "or ",
|
|
73
|
+
" work as expected. Attribute names are limited to a safe allowlist (": " work as expected. Attribute names are limited to a safe allowlist (",
|
|
74
|
+
", ": ", ",
|
|
75
|
+
", and a fixed list of layout/behavior attributes) — anything else, including event handlers like ": ", and a fixed list of layout/behavior attributes) — anything else, including event handlers like ",
|
|
76
|
+
", is rejected.": ", is rejected.",
|
|
77
|
+
"Attribute": "Attribute",
|
|
78
|
+
"e.g. Enter your work email": "e.g. Enter your work email",
|
|
79
|
+
"Existing fields cannot be removed once created": "Existing fields cannot be removed once created",
|
|
80
|
+
"Loading submission…": "Loading submission…",
|
|
81
|
+
"Loading submissions…": "Loading submissions…",
|
|
82
|
+
"Form sections": "Form sections",
|
|
83
|
+
"Loading form…": "Loading form…",
|
|
84
|
+
"failed to delete form": "failed to delete form",
|
|
85
|
+
"This item changed since you loaded it. Reload and try again.": "This item changed since you loaded it. Reload and try again.",
|
|
86
|
+
"failed to update form status": "failed to update form status",
|
|
87
|
+
"failed to load forms": "failed to load forms",
|
|
88
|
+
"save failed": "save failed",
|
|
89
|
+
"status update failed": "status update failed",
|
|
90
|
+
"failed to load form": "failed to load form",
|
|
91
|
+
"recipient": "recipient",
|
|
92
|
+
"recipients": "recipients",
|
|
93
|
+
"failed to load submissions": "failed to load submissions",
|
|
94
|
+
"failed to load submission": "failed to load submission",
|
|
95
|
+
"delete failed": "delete failed",
|
|
96
|
+
"Unknown field": "Unknown field",
|
|
97
|
+
};
|
|
98
|
+
/** Host translators may replace any key; the default preserves the original English bytes. */
|
|
99
|
+
export const translateForms = (key, vars = {}) => {
|
|
100
|
+
let text = formsMessagesEn[key] ?? key;
|
|
101
|
+
for (const [name, value] of Object.entries(vars))
|
|
102
|
+
text = text.replaceAll(`{${name}}`, String(value));
|
|
103
|
+
return text;
|
|
104
|
+
};
|
|
105
|
+
//# sourceMappingURL=messages.en.js.map
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { AdminFormDefinition as Definition, AdminFormField as Field, AdminFormSubmission as Submission } from '../core/ports/forms.js';
|
|
2
|
+
/** Mutable editor drafts project the core contract; they never define another API. */
|
|
3
|
+
export type AdminFormField = {
|
|
4
|
+
-readonly [K in keyof Field]: Field[K];
|
|
5
|
+
} & {
|
|
6
|
+
attributes?: Record<string, string> | undefined;
|
|
7
|
+
};
|
|
8
|
+
export type AdminFormNotify = {
|
|
9
|
+
enabled: boolean;
|
|
10
|
+
recipients: string[];
|
|
11
|
+
};
|
|
12
|
+
export type AdminFormDefinition = Omit<Definition, 'fields' | 'notify'> & {
|
|
13
|
+
workspaceId?: string;
|
|
14
|
+
fields: AdminFormField[];
|
|
15
|
+
notify: AdminFormNotify;
|
|
16
|
+
};
|
|
17
|
+
export type AdminFormSubmission = Omit<Submission, 'data'> & {
|
|
18
|
+
workspaceId?: string;
|
|
19
|
+
data: Record<string, string | boolean>;
|
|
20
|
+
};
|
|
21
|
+
export type FormsTranslator = (key: string, vars?: Record<string, string | number>) => string;
|
|
22
|
+
/** Copy drafts at the API boundary so editing cannot mutate a repository/cache snapshot. */
|
|
23
|
+
export declare function formView({ form }: {
|
|
24
|
+
form: Definition;
|
|
25
|
+
}, _optional?: {}): AdminFormDefinition;
|
|
26
|
+
export declare function submissionView({ submission }: {
|
|
27
|
+
submission: Submission;
|
|
28
|
+
}, _optional?: {}): AdminFormSubmission;
|
|
29
|
+
//# sourceMappingURL=models.d.ts.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** Copy drafts at the API boundary so editing cannot mutate a repository/cache snapshot. */
|
|
2
|
+
export function formView({ form }, _optional = {}) {
|
|
3
|
+
return { ...form, fields: form.fields.map(field => ({ ...field, ...(field.attributes ? { attributes: { ...field.attributes } } : {}) })), notify: { ...form.notify, recipients: [...form.notify.recipients] } };
|
|
4
|
+
}
|
|
5
|
+
export function submissionView({ submission }, _optional = {}) {
|
|
6
|
+
return { ...submission, data: { ...submission.data } };
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=models.js.map
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { AdminFormsPort } from '../core/ports/forms.js';
|
|
2
|
+
import type { AdminShellNavigationPort } from '../core/ports/shell.js';
|
|
3
|
+
export type { AdminFormsPort } from '../core/ports/forms.js';
|
|
4
|
+
/** Reversible removal delegates to the host's existing generic Trash service.
|
|
5
|
+
* This projection preserves the screens' generic POST for definitions and submissions; the
|
|
6
|
+
* core API also exposes the form-scoped submission DELETE route with the same Trash semantics. */
|
|
7
|
+
export interface FormsTrashPort {
|
|
8
|
+
trash(required: {
|
|
9
|
+
type: 'form' | 'form_submission';
|
|
10
|
+
id: string;
|
|
11
|
+
}, optional?: Record<string, never>): Promise<{
|
|
12
|
+
ok: true;
|
|
13
|
+
version: number | null;
|
|
14
|
+
}>;
|
|
15
|
+
}
|
|
16
|
+
export interface FormsEventsPort {
|
|
17
|
+
subscribe(required: {
|
|
18
|
+
onRefresh: () => void;
|
|
19
|
+
}, optional?: Record<string, never>): () => void;
|
|
20
|
+
}
|
|
21
|
+
export type FormsNavigationPort = Pick<AdminShellNavigationPort, 'navigate'>;
|
|
22
|
+
export declare const formsApiToken: import("../core/module/token.js").AdminPortToken<AdminFormsPort, "admin.forms.api">;
|
|
23
|
+
export declare const formsTrashToken: import("../core/module/token.js").AdminPortToken<FormsTrashPort, "admin.forms.trash">;
|
|
24
|
+
export declare const formsEventsToken: import("../core/module/token.js").AdminPortToken<FormsEventsPort, "admin.forms.events">;
|
|
25
|
+
export declare const formsNavigationToken: import("../core/module/token.js").AdminPortToken<FormsNavigationPort, "admin.forms.navigation">;
|
|
26
|
+
//# sourceMappingURL=ports.d.ts.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { adminPort } from '../core/module/token.js';
|
|
2
|
+
export const formsApiToken = adminPort({ id: 'admin.forms.api' });
|
|
3
|
+
export const formsTrashToken = adminPort({ id: 'admin.forms.trash' });
|
|
4
|
+
export const formsEventsToken = adminPort({ id: 'admin.forms.events' });
|
|
5
|
+
export const formsNavigationToken = adminPort({ id: 'admin.forms.navigation' });
|
|
6
|
+
//# sourceMappingURL=ports.js.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { AdminFormField } from '../../models.js';
|
|
2
|
+
import { useFieldAttributesDialog } from '../hooks/use-field-attributes-dialog.hooks.js';
|
|
3
|
+
export interface FieldAttributesDialogProps {
|
|
4
|
+
field: AdminFormField;
|
|
5
|
+
fieldIndex: number;
|
|
6
|
+
onSave: (patch: Partial<AdminFormField>) => void;
|
|
7
|
+
onCancel: () => void;
|
|
8
|
+
/** Dependency injection seam for tests — see `PostsProps.usePostsHook` for the convention. */
|
|
9
|
+
useFieldAttributesDialogHook?: typeof useFieldAttributesDialog;
|
|
10
|
+
/** Translator closure — see `FormEditor()`'s own `t`. */
|
|
11
|
+
t: (key: string) => string;
|
|
12
|
+
}
|
|
13
|
+
export declare function FieldAttributesDialog({ field, fieldIndex, onSave, onCancel, useFieldAttributesDialogHook, t, }: FieldAttributesDialogProps, _optional?: Record<string, never>): import("react").JSX.Element;
|
|
14
|
+
//# sourceMappingURL=FieldAttributesDialog.d.ts.map
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useFieldAttributesView } from "../hooks/forms-view.hooks.js";
|
|
3
|
+
import { Dialog } from '@jini-ai/ui-kit/react';
|
|
4
|
+
import { SeeMore } from '@jini-ai/ui/admin-widgets';
|
|
5
|
+
import { agentHandle } from '@jini-ai/agentic';
|
|
6
|
+
import { ATTRIBUTE_NAME_SUGGESTIONS } from '../../rules.js';
|
|
7
|
+
import { useFieldAttributesDialog } from '../hooks/use-field-attributes-dialog.hooks.js';
|
|
8
|
+
export function FieldAttributesDialog({ field, fieldIndex, onSave, onCancel, useFieldAttributesDialogHook = useFieldAttributesDialog, t, }, _optional = {}) {
|
|
9
|
+
const controller = useFieldAttributesDialogHook({
|
|
10
|
+
field,
|
|
11
|
+
onSave,
|
|
12
|
+
onCancel,
|
|
13
|
+
});
|
|
14
|
+
// One dialog is ever open at a time (`editingAttrsIndex` gates a single instance below), so this
|
|
15
|
+
// needs no per-instance disambiguation — unlike the attribute rows inside it, which are a real
|
|
16
|
+
// repeated list and do need `buildAgentListHandles`'s uniqueness search. Not `useMemo`d: `rows` is
|
|
17
|
+
// one field's own CSS-class/HTML-attribute rows (a handful at most), cheap enough that memoizing
|
|
18
|
+
// it was not judged worth the added indirection.
|
|
19
|
+
const { className, addRow, error, submit } = controller;
|
|
20
|
+
const { rows, displayName, onClose, onClassName } = useFieldAttributesView({ field, fieldIndex, controller, onCancel });
|
|
21
|
+
return (_jsx(Dialog, { open: true, title: `${t("Field attributes —")} ${displayName}`, onClose: onClose, className: "settings-dialog tovu-domain-dialog field-attrs-dialog", children: _jsxs("form", { onSubmit: submit, ...agentHandle({ handle: "form-field-attrs-dialog" }, {
|
|
22
|
+
role: "region",
|
|
23
|
+
label: "Field attributes dialog — CSS classes and HTML attributes for one form field",
|
|
24
|
+
}), children: [_jsxs(SeeMore, { lines: 2, textClassName: "field-attrs-hint", toggleAriaLabel: t("See more about field attributes"), children: [t("Add CSS classes and HTML attributes to this field’s input. Classes are unrestricted — Tailwind utility classes like "), _jsx("code", { children: "md:col-span-2" }), " ", t("or "), _jsx("code", { children: "w-1/2" }), t(" work as expected. Attribute names are limited to a safe allowlist ("), _jsx("code", { children: "aria-*" }), t(", "), _jsx("code", { children: "data-*" }), t(", and a fixed list of layout/behavior attributes) — anything else, including event handlers like "), _jsx("code", { children: "onclick" }), t(", is rejected.")] }), _jsxs("div", { className: "field", children: [_jsx("label", { className: "field-label", htmlFor: "field-attrs-classname", children: t("CSS classes") }), _jsx("input", { id: "field-attrs-classname", "data-jini-autofocus": "", value: className, placeholder: "e.g. md:col-span-2 w-1/2 focus:ring-2", onChange: onClassName, ...agentHandle({ handle: "form-field-attrs-classname" }, {
|
|
25
|
+
role: "field",
|
|
26
|
+
label: "CSS classes to add to this form field's input",
|
|
27
|
+
}) })] }), _jsxs("div", { className: "field-attrs-rows", children: [_jsx("span", { className: "field-label", children: t("HTML attributes") }), _jsx("datalist", { id: "field-attrs-name-suggestions", children: ATTRIBUTE_NAME_SUGGESTIONS.map((name) => (_jsx("option", { value: name }, name))) }), rows.map((row, index) => (_jsxs("fieldset", { className: "collections-field-row", children: [_jsxs("legend", { children: [t("Attribute"), " ", index + 1] }), _jsxs("div", { className: "field", children: [_jsx("label", { className: "field-label", htmlFor: `field-attrs-name-${row._rowId}`, children: t("Name") }), _jsx("input", { id: `field-attrs-name-${row._rowId}`, list: "field-attrs-name-suggestions", value: row.name, placeholder: "e.g. aria-label", onChange: row.onName, ...agentHandle({ handle: `${row.handle}-name` }, {
|
|
28
|
+
role: "field",
|
|
29
|
+
label: "This attribute's name — must be on the allowlisted set (aria-*, data-*, and a few others)",
|
|
30
|
+
}) })] }), _jsxs("div", { className: "field", children: [_jsx("label", { className: "field-label", htmlFor: `field-attrs-value-${row._rowId}`, children: t("Value") }), _jsx("input", { id: `field-attrs-value-${row._rowId}`, value: row.value, placeholder: t("e.g. Enter your work email"), onChange: row.onValue, ...agentHandle({ handle: `${row.handle}-value` }, {
|
|
31
|
+
role: "field",
|
|
32
|
+
label: "This attribute's value",
|
|
33
|
+
}) })] }), _jsx("button", { type: "button", className: "btn-secondary", onClick: row.onRemove, ...agentHandle({ handle: `${row.handle}-remove` }, {
|
|
34
|
+
role: "button",
|
|
35
|
+
label: "Remove this CSS-class/HTML-attribute row",
|
|
36
|
+
}), children: t("Remove") })] }, row._rowId))), _jsx("button", { type: "button", className: "btn-secondary", onClick: addRow, ...agentHandle({ handle: "form-field-attrs-add-row" }, {
|
|
37
|
+
role: "button",
|
|
38
|
+
label: "Add another HTML attribute row to this field",
|
|
39
|
+
}), children: t("Add attribute") })] }), error ? (_jsx("span", { className: "save-error", role: "alert", children: error })) : null, _jsxs("span", { className: "editor-actions", children: [_jsx("button", { type: "submit", ...agentHandle({ handle: "form-field-attrs-save" }, {
|
|
40
|
+
role: "button",
|
|
41
|
+
label: "Save this field's CSS classes and HTML attributes",
|
|
42
|
+
}), children: t("Save") }), _jsx("button", { type: "button", className: "btn-secondary", onClick: onCancel, ...agentHandle({ handle: "form-field-attrs-cancel" }, {
|
|
43
|
+
role: "button",
|
|
44
|
+
label: "Close this dialog without saving attribute changes",
|
|
45
|
+
}), children: t("Cancel") })] })] }) }));
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=FieldAttributesDialog.js.map
|