@case-framework/survey-ui 0.6.1 → 0.8.0
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/README.md +40 -26
- package/dist/src/index.d.ts +7 -13
- package/dist/src/lib/survey-assets.d.ts +2 -0
- package/dist/src/modules/survey-player/index.d.ts +2 -0
- package/dist/src/modules/survey-player/registry.d.ts +23 -0
- package/dist/src/modules/survey-player/survey-context.d.ts +1 -1
- package/dist/src/modules/survey-player/survey-item/survey-item-types/placeholder-item-renderers.d.ts +1 -1
- package/dist/src/modules/survey-player/survey-player.d.ts +1 -1
- package/dist/survey-ui.cjs +47 -0
- package/dist/survey-ui.cjs.map +1 -0
- package/dist/survey-ui.css +1 -1
- package/dist/survey-ui.js +14136 -0
- package/dist/survey-ui.js.map +1 -0
- package/package.json +25 -60
- package/dist/default-item-cores-C6VK2LFe.js +0 -10
- package/dist/default-item-cores-C6VK2LFe.js.map +0 -1
- package/dist/default-item-cores-gdu37TFX.mjs +0 -3988
- package/dist/default-item-cores-gdu37TFX.mjs.map +0 -1
- package/dist/item-core-registry.cjs.js +0 -2
- package/dist/item-core-registry.cjs.js.map +0 -1
- package/dist/item-core-registry.es.js +0 -11
- package/dist/item-core-registry.es.js.map +0 -1
- package/dist/src/components/c-ui/alert-provider.d.ts +0 -18
- package/dist/src/components/c-ui/dot-background.d.ts +0 -72
- package/dist/src/components/c-ui/filepicker-dropzone.d.ts +0 -38
- package/dist/src/components/c-ui/loading-button.d.ts +0 -9
- package/dist/src/components/common/content-editable-plain.d.ts +0 -17
- package/dist/src/components/common/sortable-tree.d.ts +0 -59
- package/dist/src/components/hooks/use-button-shortcut.d.ts +0 -18
- package/dist/src/components/hooks/use-document-keydown.d.ts +0 -7
- package/dist/src/components/rich-text/content-policy.d.ts +0 -19
- package/dist/src/components/rich-text/index.d.ts +0 -6
- package/dist/src/components/rich-text/nodes/rich-text-image-node.d.ts +0 -40
- package/dist/src/components/rich-text/nodes/rich-text-info-box-node.d.ts +0 -45
- package/dist/src/components/rich-text/nodes/survey-rich-text-heading-node.d.ts +0 -27
- package/dist/src/components/rich-text/rich-text-block-editor.d.ts +0 -8
- package/dist/src/components/rich-text/rich-text-editor-context.d.ts +0 -23
- package/dist/src/components/rich-text/rich-text-survey-content.d.ts +0 -7
- package/dist/src/components/rich-text/types.d.ts +0 -6
- package/dist/src/components/rich-text-editor/index.d.ts +0 -3
- package/dist/src/components/rich-text-editor/plugins/command-handler-plugin.d.ts +0 -5
- package/dist/src/components/rich-text-editor/plugins/editable-mode-plugin.d.ts +0 -3
- package/dist/src/components/rich-text-editor/plugins/floating-toolbar-plugin.d.ts +0 -11
- package/dist/src/components/rich-text-editor/plugins/image-dialog-plugin.d.ts +0 -4
- package/dist/src/components/rich-text-editor/plugins/info-box-popover-plugin.d.ts +0 -6
- package/dist/src/components/rich-text-editor/plugins/link-popover-plugin.d.ts +0 -6
- package/dist/src/components/rich-text-editor/plugins/rich-text-image-asset-deletion-plugin.d.ts +0 -1
- package/dist/src/components/rich-text-editor/plugins/slash-command-menu-plugin.d.ts +0 -15
- package/dist/src/components/rich-text-editor/plugins/sync-editor-value-plugin.d.ts +0 -4
- package/dist/src/components/rich-text-editor/rich-text-editor-utils.d.ts +0 -205
- package/dist/src/components/rich-text-editor/rich-text-editor.d.ts +0 -43
- package/dist/src/components/rich-text-editor/rich-text-image-editor-commands.d.ts +0 -12
- package/dist/src/components/rich-text-editor/rich-text-info-box-commands.d.ts +0 -20
- package/dist/src/components/rich-text-editor/style-control-icon.d.ts +0 -5
- package/dist/src/components/ui/alert.d.ts +0 -10
- package/dist/src/components/ui/badge.d.ts +0 -9
- package/dist/src/components/ui/breadcrumb.d.ts +0 -11
- package/dist/src/components/ui/card.d.ts +0 -11
- package/dist/src/components/ui/command.d.ts +0 -18
- package/dist/src/components/ui/context-menu.d.ts +0 -31
- package/dist/src/components/ui/dialog.d.ts +0 -20
- package/dist/src/components/ui/dropdown-menu.d.ts +0 -29
- package/dist/src/components/ui/kbd.d.ts +0 -3
- package/dist/src/components/ui/resizable.d.ts +0 -7
- package/dist/src/components/ui/scroll-area.d.ts +0 -5
- package/dist/src/components/ui/skeleton.d.ts +0 -2
- package/dist/src/components/ui/sonner.d.ts +0 -3
- package/dist/src/components/ui/tabs.d.ts +0 -11
- package/dist/src/components/ui/toggle-group.d.ts +0 -10
- package/dist/src/components/ui/toggle.d.ts +0 -9
- package/dist/src/components/ui/tooltip.d.ts +0 -7
- package/dist/src/dev/_components/nav-input.d.ts +0 -35
- package/dist/src/dev/app.d.ts +0 -2
- package/dist/src/dev/localizations/de.d.ts +0 -2
- package/dist/src/dev/main.d.ts +0 -0
- package/dist/src/item-core-registry.d.ts +0 -4
- package/dist/src/modules/default-item-registry/default-registry-entries.d.ts +0 -2
- package/dist/src/modules/default-item-registry/index.d.ts +0 -19
- package/dist/src/modules/default-item-registry/item-authoring-state.d.ts +0 -15
- package/dist/src/modules/default-item-registry/items/choice/editor/card.d.ts +0 -3
- package/dist/src/modules/default-item-registry/items/choice/editor/option-create.d.ts +0 -11
- package/dist/src/modules/default-item-registry/items/choice/editor/option-edit-dialog.d.ts +0 -21
- package/dist/src/modules/default-item-registry/items/choice/editor/option-editor-fields.d.ts +0 -17
- package/dist/src/modules/default-item-registry/items/choice/editor/response-options-list.d.ts +0 -20
- package/dist/src/modules/default-item-registry/items/choice/expression-registry.d.ts +0 -3
- package/dist/src/modules/default-item-registry/items/choice/preview/item.d.ts +0 -2
- package/dist/src/modules/default-item-registry/items/choice/search-adapter.d.ts +0 -2
- package/dist/src/modules/default-item-registry/items/form/editor/card.d.ts +0 -3
- package/dist/src/modules/default-item-registry/items/form/editor/config-editor.d.ts +0 -12
- package/dist/src/modules/default-item-registry/items/form/editor/field-edit-dialog.d.ts +0 -10
- package/dist/src/modules/default-item-registry/items/form/editor/field-group-header-dialog.d.ts +0 -12
- package/dist/src/modules/default-item-registry/items/form/editor/field-group-layout-dialog.d.ts +0 -9
- package/dist/src/modules/default-item-registry/items/form/editor/field-item-preview.d.ts +0 -15
- package/dist/src/modules/default-item-registry/items/form/editor/field-key-dialog.d.ts +0 -10
- package/dist/src/modules/default-item-registry/items/form/editor/field-sort-dialog.d.ts +0 -11
- package/dist/src/modules/default-item-registry/items/form/editor/field-type-shared.d.ts +0 -12
- package/dist/src/modules/default-item-registry/items/form/editor/response-field-groups-list.d.ts +0 -16
- package/dist/src/modules/default-item-registry/items/form/preview/item.d.ts +0 -2
- package/dist/src/modules/default-item-registry/items/form/search-adapter.d.ts +0 -2
- package/dist/src/modules/default-item-registry/items/info/editor-card.d.ts +0 -3
- package/dist/src/modules/default-item-registry/items/info/preview/item.d.ts +0 -2
- package/dist/src/modules/default-item-registry/items/info/search-adapter.d.ts +0 -2
- package/dist/src/modules/default-item-registry/items/structure/group/editor-card.d.ts +0 -3
- package/dist/src/modules/default-item-registry/items/structure/page-break/editor-card.d.ts +0 -3
- package/dist/src/modules/default-item-registry/items/structure/preview-renderers.d.ts +0 -3
- package/dist/src/modules/default-item-registry/items/structure/root/editor-card.d.ts +0 -3
- package/dist/src/modules/default-item-registry/shared/preview/question-header.d.ts +0 -6
- package/dist/src/modules/default-item-registry/shared/preview/utils.d.ts +0 -3
- package/dist/src/modules/default-item-registry/shared/question-editor/deferred-localized-rich-text-field.d.ts +0 -26
- package/dist/src/modules/default-item-registry/shared/question-editor/header-editor.d.ts +0 -6
- package/dist/src/modules/default-item-registry/shared/question-editor/layout.d.ts +0 -8
- package/dist/src/modules/default-item-registry/shared/question-editor/rich-text-editors.d.ts +0 -23
- package/dist/src/modules/default-item-registry/shared/question-editor/rich-text-policies.d.ts +0 -8
- package/dist/src/modules/default-item-registry/shared/question-editor/toolbar.d.ts +0 -10
- package/dist/src/modules/survey-editor/ai/create-provider.d.ts +0 -22
- package/dist/src/modules/survey-editor/ai/types.d.ts +0 -11
- package/dist/src/modules/survey-editor/ai/use-survey-assistant-integration.d.ts +0 -16
- package/dist/src/modules/survey-editor/assets/index.d.ts +0 -4
- package/dist/src/modules/survey-editor/assets/survey-image-asset-manager.d.ts +0 -4
- package/dist/src/modules/survey-editor/assets/use-survey-assets.d.ts +0 -4
- package/dist/src/modules/survey-editor/assets/utils.d.ts +0 -5
- package/dist/src/modules/survey-editor/assistant/apply.d.ts +0 -24
- package/dist/src/modules/survey-editor/assistant/index.d.ts +0 -2
- package/dist/src/modules/survey-editor/assistant/snapshot.d.ts +0 -39
- package/dist/src/modules/survey-editor/editor-card/add-items/constants.d.ts +0 -5
- package/dist/src/modules/survey-editor/editor-card/add-items/hooks/use-add-item-actions.d.ts +0 -24
- package/dist/src/modules/survey-editor/editor-card/add-items/hooks/use-add-item-target.d.ts +0 -9
- package/dist/src/modules/survey-editor/editor-card/add-items/hooks/use-option-group-navigation.d.ts +0 -20
- package/dist/src/modules/survey-editor/editor-card/add-items/types.d.ts +0 -21
- package/dist/src/modules/survey-editor/editor-card/add-items/views/back-button.d.ts +0 -5
- package/dist/src/modules/survey-editor/editor-card/add-items/views/blank-item-view.d.ts +0 -13
- package/dist/src/modules/survey-editor/editor-card/add-items/views/entry-view.d.ts +0 -15
- package/dist/src/modules/survey-editor/editor-card/add-items/views/item-type-grid-view.d.ts +0 -30
- package/dist/src/modules/survey-editor/editor-card/add-items/views/structure-view.d.ts +0 -16
- package/dist/src/modules/survey-editor/editor-card/add-items.d.ts +0 -1
- package/dist/src/modules/survey-editor/editor-card/copy-item-dropdown-menu.d.ts +0 -5
- package/dist/src/modules/survey-editor/editor-card/delete-item-context-menu.d.ts +0 -5
- package/dist/src/modules/survey-editor/editor-card/delete-item-dropdown-menu.d.ts +0 -7
- package/dist/src/modules/survey-editor/editor-card/editor-card-tab-trigger.d.ts +0 -15
- package/dist/src/modules/survey-editor/editor-card/expression-pseudo-code.d.ts +0 -8
- package/dist/src/modules/survey-editor/editor-card/group-items.d.ts +0 -2
- package/dist/src/modules/survey-editor/editor-card/hooks/use-armed-shortcut-sequence.d.ts +0 -11
- package/dist/src/modules/survey-editor/editor-card/hooks/use-group-list-keyboard.d.ts +0 -30
- package/dist/src/modules/survey-editor/editor-card/index.d.ts +0 -2
- package/dist/src/modules/survey-editor/editor-card/item-authoring-state-preview.d.ts +0 -16
- package/dist/src/modules/survey-editor/editor-card/item-color-menu.d.ts +0 -6
- package/dist/src/modules/survey-editor/editor-card/item-color-selector.d.ts +0 -5
- package/dist/src/modules/survey-editor/editor-card/item-editor-card-skeleton.d.ts +0 -2
- package/dist/src/modules/survey-editor/editor-card/item-editor-card.d.ts +0 -34
- package/dist/src/modules/survey-editor/editor-card/item-editor-context.d.ts +0 -23
- package/dist/src/modules/survey-editor/editor-card/item-expression-overview.d.ts +0 -33
- package/dist/src/modules/survey-editor/editor-card/item-key-editor.d.ts +0 -9
- package/dist/src/modules/survey-editor/editor-card/item-label-preview-and-editor.d.ts +0 -10
- package/dist/src/modules/survey-editor/editor-card/item-preview.d.ts +0 -8
- package/dist/src/modules/survey-editor/editor-card/item-sibling-navigation.d.ts +0 -5
- package/dist/src/modules/survey-editor/editor-card/item-type-icon-with-tooltip.d.ts +0 -8
- package/dist/src/modules/survey-editor/editor-card/survey-player-item-preview.d.ts +0 -6
- package/dist/src/modules/survey-editor/editor-instance-provider.d.ts +0 -9
- package/dist/src/modules/survey-editor/hooks/useClipboardValue.d.ts +0 -2
- package/dist/src/modules/survey-editor/hooks/useDeleteItem.d.ts +0 -11
- package/dist/src/modules/survey-editor/hooks/useEditor.d.ts +0 -12
- package/dist/src/modules/survey-editor/hooks/useEditorStateChange.d.ts +0 -18
- package/dist/src/modules/survey-editor/hooks/useKeyboardShortcuts.d.ts +0 -7
- package/dist/src/modules/survey-editor/index.d.ts +0 -20
- package/dist/src/modules/survey-editor/localization/date-fns.d.ts +0 -5
- package/dist/src/modules/survey-editor/localization/default-all.d.ts +0 -2
- package/dist/src/modules/survey-editor/localization/default-en.d.ts +0 -3
- package/dist/src/modules/survey-editor/localization/default-nl.d.ts +0 -2
- package/dist/src/modules/survey-editor/localization/index.d.ts +0 -5
- package/dist/src/modules/survey-editor/localization/runtime.d.ts +0 -4
- package/dist/src/modules/survey-editor/navigation/location.d.ts +0 -6
- package/dist/src/modules/survey-editor/navigation/navigation-provider.d.ts +0 -12
- package/dist/src/modules/survey-editor/navigation/navigation.d.ts +0 -22
- package/dist/src/modules/survey-editor/navigation/types.d.ts +0 -23
- package/dist/src/modules/survey-editor/primitives/input-with-ai-popover.d.ts +0 -35
- package/dist/src/modules/survey-editor/registry/authoring-state.d.ts +0 -17
- package/dist/src/modules/survey-editor/registry/index.d.ts +0 -8
- package/dist/src/modules/survey-editor/registry/registry-mappers.d.ts +0 -25
- package/dist/src/modules/survey-editor/registry/search-adapter.d.ts +0 -19
- package/dist/src/modules/survey-editor/registry/types.d.ts +0 -218
- package/dist/src/modules/survey-editor/routes/editor/_components/assistant-authoring-lock.d.ts +0 -7
- package/dist/src/modules/survey-editor/routes/editor/_components/editor-assistant-slot-context.d.ts +0 -6
- package/dist/src/modules/survey-editor/routes/editor/_components/editor-assistant-slot.d.ts +0 -8
- package/dist/src/modules/survey-editor/routes/editor/_components/editor-mode-switch.d.ts +0 -7
- package/dist/src/modules/survey-editor/routes/editor/_components/editor-workspace.d.ts +0 -30
- package/dist/src/modules/survey-editor/routes/editor/_components/footer.d.ts +0 -2
- package/dist/src/modules/survey-editor/routes/editor/_components/history-stack.d.ts +0 -2
- package/dist/src/modules/survey-editor/routes/editor/_components/main.d.ts +0 -7
- package/dist/src/modules/survey-editor/routes/editor/_components/workspace-presets.d.ts +0 -75
- package/dist/src/modules/survey-editor/routes/editor/asset-manager/index.d.ts +0 -2
- package/dist/src/modules/survey-editor/routes/editor/index.d.ts +0 -7
- package/dist/src/modules/survey-editor/routes/editor/item-editor/_components/item-editor-toolbar/breadcrumbs-nav.d.ts +0 -2
- package/dist/src/modules/survey-editor/routes/editor/item-editor/_components/item-editor-toolbar/item-editor-toolbar.d.ts +0 -6
- package/dist/src/modules/survey-editor/routes/editor/item-editor/_components/item-editor-toolbar/language-picker.d.ts +0 -2
- package/dist/src/modules/survey-editor/routes/editor/item-editor/_components/item-editor-toolbar/search-trigger.d.ts +0 -3
- package/dist/src/modules/survey-editor/routes/editor/item-editor/_components/item-editor-toolbar/survey-search.d.ts +0 -7
- package/dist/src/modules/survey-editor/routes/editor/item-editor/_components/survey-outline.d.ts +0 -3
- package/dist/src/modules/survey-editor/routes/editor/item-editor/_components/survey-workspace.d.ts +0 -12
- package/dist/src/modules/survey-editor/routes/editor/item-editor/index.d.ts +0 -6
- package/dist/src/modules/survey-editor/routes/editor/preview-mode/index.d.ts +0 -7
- package/dist/src/modules/survey-editor/routes/editor/preview-mode/page-break-divider.d.ts +0 -6
- package/dist/src/modules/survey-editor/routes/editor/preview-mode/preview-controls.d.ts +0 -15
- package/dist/src/modules/survey-editor/routes/editor/preview-mode/preview-tree.d.ts +0 -26
- package/dist/src/modules/survey-editor/routes/editor/preview-mode/survey-preview-canvas.d.ts +0 -16
- package/dist/src/modules/survey-editor/routes/editor/preview-mode/survey-preview-item.d.ts +0 -13
- package/dist/src/modules/survey-editor/routes/editor/preview-mode/use-preview-preferences.d.ts +0 -14
- package/dist/src/modules/survey-editor/routes/editor/translation-mode/index.d.ts +0 -2
- package/dist/src/modules/survey-editor/session-file.d.ts +0 -13
- package/dist/src/modules/survey-editor/store/editor-store-context.d.ts +0 -10
- package/dist/src/modules/survey-editor/store/editor-store-provider.d.ts +0 -7
- package/dist/src/modules/survey-editor/store/editor-store.d.ts +0 -109
- package/dist/src/modules/survey-editor/store/use-editor-store.d.ts +0 -4
- package/dist/src/modules/survey-editor/store/useItemNavigation.d.ts +0 -7
- package/dist/src/modules/survey-editor/survey-editor-config.d.ts +0 -38
- package/dist/src/modules/survey-editor/survey-editor.d.ts +0 -40
- package/dist/src/modules/survey-editor/utils/item-type-infos.d.ts +0 -23
- package/dist/src/modules/survey-editor/workspace.d.ts +0 -17
- package/dist/src/modules/survey-player/survey-item/survey-item-types/question-wrapper.d.ts +0 -5
- package/dist/survey-editor-defaults.css +0 -15
- package/dist/survey-editor-defaults.css.d.ts +0 -2
- package/dist/survey-ui.cjs.js +0 -199
- package/dist/survey-ui.cjs.js.map +0 -1
- package/dist/survey-ui.es.js +0 -57954
- package/dist/survey-ui.es.js.map +0 -1
- package/dist/vite.svg +0 -1
- /package/dist/src/{components/rich-text/rich-text-link-utils.d.ts → lib/rich-text-link-url.d.ts} +0 -0
package/README.md
CHANGED
|
@@ -1,40 +1,54 @@
|
|
|
1
|
-
#
|
|
1
|
+
# `@case-framework/survey-ui`
|
|
2
2
|
|
|
3
|
-
React
|
|
3
|
+
Participant-facing React components for rendering and completing CASE surveys.
|
|
4
|
+
This package intentionally excludes the Survey Editor and Survey Assistant.
|
|
4
5
|
|
|
5
|
-
##
|
|
6
|
+
## Styling in a Tailwind CSS v4 / shadcn host
|
|
6
7
|
|
|
7
|
-
Import the
|
|
8
|
+
Import the React API normally:
|
|
8
9
|
|
|
9
10
|
```tsx
|
|
10
|
-
import "@case-framework/survey-ui
|
|
11
|
+
import { SurveyPlayer } from "@case-framework/survey-ui";
|
|
11
12
|
```
|
|
12
13
|
|
|
13
|
-
|
|
14
|
+
Do not import `@case-framework/survey-ui/css` in a standard shadcn application.
|
|
15
|
+
The host already owns Tailwind, shadcn's semantic theme tokens, Preflight, and
|
|
16
|
+
the global `:root`/`.dark` theme. Importing another complete generated
|
|
17
|
+
stylesheet can duplicate those layers and overwrite host variables or base
|
|
18
|
+
element styles.
|
|
14
19
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
`@case-framework/survey-ui/css` already includes these defaults, so the standalone file is only needed when the host wants a separate variables-only layer.
|
|
20
|
-
|
|
21
|
-
If the host app uses Tailwind CSS v4, add the package as a source in the host global CSS file so Tailwind also scans the editor package:
|
|
20
|
+
Instead, explicitly register the installed package as a Tailwind source in the
|
|
21
|
+
host's existing global stylesheet:
|
|
22
22
|
|
|
23
23
|
```css
|
|
24
24
|
@import "tailwindcss";
|
|
25
|
-
@
|
|
26
|
-
|
|
25
|
+
@import "tw-animate-css";
|
|
26
|
+
@import "shadcn/tailwind.css";
|
|
27
27
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
```css
|
|
31
|
-
.survey-editor {
|
|
32
|
-
--surface-bg-color: oklch(1 0 0);
|
|
33
|
-
}
|
|
28
|
+
@source "../node_modules/@case-framework/survey-ui/dist";
|
|
34
29
|
```
|
|
35
30
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
31
|
+
The path is relative to the stylesheet containing `@source`; adjust it for the
|
|
32
|
+
host's directory layout. Tailwind generates only the utilities it detects in
|
|
33
|
+
the package, using the host application's theme.
|
|
34
|
+
|
|
35
|
+
`@case-framework/survey-ui/css` is currently a complete precompiled stylesheet
|
|
36
|
+
for standalone/non-Tailwind integrations. It includes global theme and base
|
|
37
|
+
rules, so treat it as an application-level stylesheet, import it only once, and
|
|
38
|
+
do not combine it with an existing shadcn global stylesheet without first
|
|
39
|
+
reviewing the cascade.
|
|
40
|
+
|
|
41
|
+
Install `@case-framework/survey-editor-ui` only in authoring applications.
|
|
42
|
+
|
|
43
|
+
## Why this integration
|
|
44
|
+
|
|
45
|
+
- [Tailwind: detecting classes in source files](https://tailwindcss.com/docs/detecting-classes-in-source-files#explicitly-registering-sources)
|
|
46
|
+
documents `@source` specifically for external UI libraries because
|
|
47
|
+
dependencies under `node_modules` are ignored by automatic source detection.
|
|
48
|
+
- [Tailwind: Preflight](https://tailwindcss.com/docs/preflight) documents that
|
|
49
|
+
`@import "tailwindcss"` includes global base styles by default.
|
|
50
|
+
- [shadcn: theming](https://ui.shadcn.com/docs/theming) recommends that the
|
|
51
|
+
application own semantic CSS variables such as `--background`, `--primary`,
|
|
52
|
+
and `--border`.
|
|
53
|
+
- [shadcn: Tailwind v4](https://ui.shadcn.com/docs/tailwind-v4) shows those
|
|
54
|
+
variables and `@theme inline` in the application's global stylesheet.
|
package/dist/src/index.d.ts
CHANGED
|
@@ -1,13 +1,7 @@
|
|
|
1
|
-
export { SurveyPlayer, SurveyContextProvider, SurveyItemRenderer, useSurveyCtx, useSurveyTranslation, } from './modules/survey-player';
|
|
2
|
-
export {
|
|
3
|
-
export {
|
|
4
|
-
export {
|
|
5
|
-
export {
|
|
6
|
-
export {
|
|
7
|
-
export
|
|
8
|
-
export { cloneRegistryEntries, createComposedEditorRegistry, createRegistryEntries, createSurveyPlayerRegistry, getDefaultComposedEditorRegistry, getDefaultRegistryEntries, getDefaultSurveyPlayerRegistry, } from './modules/default-item-registry';
|
|
9
|
-
export type { CreateComposedEditorRegistryOptions, CreateRegistryEntriesOptions, CreateSurveyPlayerRegistryOptions, RegistryConflictStrategy, } from './modules/default-item-registry';
|
|
10
|
-
export type { SurveyEditorProps, SurveyEditorStateChange, SurveyEditorWorkspace, SurveyEditorWorkspacePanelOptions, SurveyEditorAssistantController, SurveyAssistantSnapshotOptions, CreateSnapshotSurveyEditorAIProviderOptions, UseSurveyEditorAssistantIntegrationOptions, SurveyEditorAITaskCacheOptions, SurveyEditorAITaskExecution, SurveyEditorAITaskExecutor, SurveyEditorLocation, EditorItemDefinition, EditorItemDefinitionRegistry, ComposedEditorItemRegistry, EntriesToComposedEditorRegistryOptions, EntriesToParticipantRegistryOptions, ItemEditorComponentProps, ItemIconComponent, ItemPreviewComponentProps, ItemPreviewMode, ItemRegistryEntry, ItemRendererComponentProps, ItemSearchAdapter, RegistryValidationIssue, RegistryValidationMode, RegistryValidationOptions, RegistryValidationResult, SurveyPlayerItemRegistry, SurveyEditorAIProvider, SurveyAIRequestOptions, RichTextEditorChange, RichTextEditorProps, RichTextBlockEditorChange, RichTextBlockEditorProps, RichTextContentPolicy, RichTextLinkPayload, RichTextStyleControl, RichTextTemplateVariable, RichTextContentViewProps, RichTextEditorVariant, RichTextStyleAttribute, RichTextSupportedBlockType, SerializedRichTextLinkNode, SerializedTemplateVariableNode, SurveyImageAssetManagerProps, ParsedSurveySession, ParsedSurveySessionFormat, } from './modules/survey-editor';
|
|
11
|
-
export type { SurveyPlayerProps, SurveyContextProviderProps, SurveyItemRendererProps, } from './modules/survey-player';
|
|
12
|
-
export type { SurveyEditorDateLocales } from './modules/survey-editor/localization/date-fns';
|
|
13
|
-
export type { FilepickerDropzoneLabels, FilepickerDropzoneProps, } from './components/c-ui/filepicker-dropzone';
|
|
1
|
+
export { SurveyPlayer, SurveyContextProvider, SurveyItemRenderer, createSurveyPlayerRegistry, getDefaultSurveyPlayerRegistry, useSurveyCtx, useSurveyTranslation, } from './modules/survey-player';
|
|
2
|
+
export type { CreateSurveyPlayerRegistryOptions, ItemRendererComponentProps, SurveyContextProviderProps, SurveyItemRendererProps, SurveyPlayerItemRegistry, SurveyPlayerProps, SurveyPlayerRegistryEntry, } from './modules/survey-player';
|
|
3
|
+
export { ChoiceItemCore, FormItemCore, InfoItemCore, } from './modules/default-item-registry/default-item-cores';
|
|
4
|
+
export { ChoiceItemRenderer, FormItemRenderer, InfoItemRenderer, } from './modules/survey-player/survey-item/survey-item-types/placeholder-item-renderers';
|
|
5
|
+
export { createSurveyTranslator, mergeSurveyPlayerLocalizationSources, mergeSurveyPlayerLocalizations, } from './modules/survey-player/localization/runtime';
|
|
6
|
+
export { DEFAULT_SURVEY_PLAYER_LANGUAGE, defaultSurveyPlayerLocalizations, } from './modules/survey-player/localization/default-en';
|
|
7
|
+
export { InfoItemCardField } from './modules/default-item-registry/items/info/player/card-field';
|
|
@@ -2,3 +2,5 @@ export { SurveyPlayer } from './survey-player';
|
|
|
2
2
|
export { SurveyContextProvider, useSurveyCtx, useSurveyTranslation, type SurveyContextProviderProps, } from './survey-context';
|
|
3
3
|
export { SurveyItemRenderer, type SurveyItemRendererProps } from './survey-item/survey-item';
|
|
4
4
|
export type { SurveyPlayerProps } from './survey-player';
|
|
5
|
+
export { createSurveyPlayerRegistry, getDefaultSurveyPlayerRegistry } from './registry';
|
|
6
|
+
export type { CreateSurveyPlayerRegistryOptions, ItemRendererComponentProps, SurveyPlayerItemRegistry, SurveyPlayerRegistryEntry, } from './registry';
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ItemCoreConstructor, ItemTypeRegistry, RenderedSurveyItem } from '@case-framework/survey-core';
|
|
2
|
+
import { LocalizationCatalog } from '@case-framework/ui-localization';
|
|
3
|
+
import { default as React } from 'react';
|
|
4
|
+
export interface ItemRendererComponentProps {
|
|
5
|
+
renderedItem: RenderedSurveyItem;
|
|
6
|
+
}
|
|
7
|
+
export interface SurveyPlayerRegistryEntry {
|
|
8
|
+
itemType: string;
|
|
9
|
+
constructor?: ItemCoreConstructor;
|
|
10
|
+
renderComponent?: React.ComponentType<ItemRendererComponentProps>;
|
|
11
|
+
playerLocalizations?: LocalizationCatalog;
|
|
12
|
+
}
|
|
13
|
+
export interface SurveyPlayerItemRegistry {
|
|
14
|
+
coreRegistry: ItemTypeRegistry;
|
|
15
|
+
getRenderer: (itemType: string) => React.ComponentType<ItemRendererComponentProps> | undefined;
|
|
16
|
+
localizations: LocalizationCatalog;
|
|
17
|
+
}
|
|
18
|
+
export interface CreateSurveyPlayerRegistryOptions {
|
|
19
|
+
includeDefaultEntries?: boolean;
|
|
20
|
+
entries?: SurveyPlayerRegistryEntry[];
|
|
21
|
+
}
|
|
22
|
+
export declare function createSurveyPlayerRegistry(options?: CreateSurveyPlayerRegistryOptions): SurveyPlayerItemRegistry;
|
|
23
|
+
export declare function getDefaultSurveyPlayerRegistry(): SurveyPlayerItemRegistry;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { Survey, SurveyEngineCore } from '@case-framework/survey-core';
|
|
3
|
-
import { SurveyPlayerItemRegistry } from '
|
|
3
|
+
import { SurveyPlayerItemRegistry } from './registry';
|
|
4
4
|
import { LocalizationCatalog, LocalizationTranslate } from '@case-framework/ui-localization';
|
|
5
5
|
export type HandlerFuncArgType = string | number | boolean | null | undefined;
|
|
6
6
|
export type HandlerFunction = (handlerId: string, args?: HandlerFuncArgType[]) => Promise<{
|
package/dist/src/modules/survey-player/survey-item/survey-item-types/placeholder-item-renderers.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ItemRendererComponentProps } from '../../../../../modules/survey-
|
|
1
|
+
import { ItemRendererComponentProps } from '../../../../../modules/survey-player/registry';
|
|
2
2
|
export declare function InfoItemRenderer(props: ItemRendererComponentProps): import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export declare function FormItemRenderer(props: ItemRendererComponentProps): import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
export declare function ChoiceItemRenderer(props: ItemRendererComponentProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Survey, SurveyEngineCore, ScreenSize, SurveyItemResponse } from '@case-framework/survey-core';
|
|
2
|
-
import { SurveyPlayerItemRegistry } from '../../../modules/survey-
|
|
2
|
+
import { SurveyPlayerItemRegistry } from '../../../modules/survey-player/registry';
|
|
3
3
|
import { LocalizationCatalog } from '@case-framework/ui-localization';
|
|
4
4
|
export interface SurveyPlayerProps {
|
|
5
5
|
survey: Survey;
|