@case-framework/survey-ui 0.6.2 → 0.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +40 -34
- 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 -63
- 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-animations.css +0 -87
- package/dist/survey-editor-animations.css.d.ts +0 -2
- 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
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { Content } from '@case-framework/survey-core';
|
|
2
|
-
import { ChoiceOptionConfig } from '../model';
|
|
3
|
-
interface ChoiceOptionCreateProps {
|
|
4
|
-
isOpen: boolean;
|
|
5
|
-
open: () => void;
|
|
6
|
-
existingOptions: ChoiceOptionConfig[];
|
|
7
|
-
onCancel: () => void;
|
|
8
|
-
onSubmit: (option: ChoiceOptionConfig, labelContent?: Content) => void;
|
|
9
|
-
}
|
|
10
|
-
export declare const ChoiceOptionCreate: React.FC<ChoiceOptionCreateProps>;
|
|
11
|
-
export {};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { Content, SurveyItemTranslations } from '@case-framework/survey-core';
|
|
2
|
-
import { FormItemConfig } from '../../form/model';
|
|
3
|
-
import { ChoiceOptionConfig } from '../model';
|
|
4
|
-
type ChoiceOptionEditorFocusField = "label" | "key" | "advanced";
|
|
5
|
-
interface ChoiceOptionEditDialogProps {
|
|
6
|
-
open: boolean;
|
|
7
|
-
option: ChoiceOptionConfig | null;
|
|
8
|
-
existingOptions: ChoiceOptionConfig[];
|
|
9
|
-
initialLabelContent?: Content;
|
|
10
|
-
initialFocusField?: ChoiceOptionEditorFocusField;
|
|
11
|
-
initialAdvancedOpen?: boolean;
|
|
12
|
-
itemId: string;
|
|
13
|
-
embeddedFormConfig: FormItemConfig;
|
|
14
|
-
embeddedFormEditingConfig: FormItemConfig;
|
|
15
|
-
selectedLocale: string;
|
|
16
|
-
translationNamespace: string;
|
|
17
|
-
onSave: (option: ChoiceOptionConfig, labelContent?: Content) => void;
|
|
18
|
-
onPersistEmbeddedForm: (applyChanges: (nextConfig: FormItemConfig, nextTranslations: SurveyItemTranslations) => void | boolean) => boolean;
|
|
19
|
-
}
|
|
20
|
-
export declare const ChoiceOptionEditDialog: React.FC<ChoiceOptionEditDialogProps>;
|
|
21
|
-
export {};
|
package/dist/src/modules/default-item-registry/items/choice/editor/option-editor-fields.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { RichTextEditorChange } from '../../../../../../components/rich-text-editor';
|
|
2
|
-
import { SerializedEditorState } from 'lexical';
|
|
3
|
-
import { ReactNode } from 'react';
|
|
4
|
-
interface ChoiceOptionEditorFieldsProps {
|
|
5
|
-
draftKey: string;
|
|
6
|
-
draftLabelEditorValue: SerializedEditorState;
|
|
7
|
-
keyValidationMessage: string | null;
|
|
8
|
-
labelEditorInstanceKey: number;
|
|
9
|
-
labelAutoFocus?: boolean;
|
|
10
|
-
keyAutoFocus?: boolean;
|
|
11
|
-
keyRowTrailing?: ReactNode;
|
|
12
|
-
onDraftKeyChange: (value: string) => void;
|
|
13
|
-
onDraftLabelChange: (change: RichTextEditorChange) => void;
|
|
14
|
-
onSubmitShortcut?: () => void;
|
|
15
|
-
}
|
|
16
|
-
export declare const ChoiceOptionEditorFields: React.FC<ChoiceOptionEditorFieldsProps>;
|
|
17
|
-
export {};
|
package/dist/src/modules/default-item-registry/items/choice/editor/response-options-list.d.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { Content } from '@case-framework/survey-core';
|
|
2
|
-
import { default as React } from 'react';
|
|
3
|
-
import { ChoiceOptionConfig } from '../model';
|
|
4
|
-
export interface ChoiceOptionListItem {
|
|
5
|
-
option: ChoiceOptionConfig;
|
|
6
|
-
label: string;
|
|
7
|
-
labelContent?: Content;
|
|
8
|
-
}
|
|
9
|
-
interface ChoiceResponseOptionsListProps {
|
|
10
|
-
itemId: string;
|
|
11
|
-
items: ChoiceOptionListItem[];
|
|
12
|
-
onItemEditLabel: (optionId: string) => void;
|
|
13
|
-
onItemEditKey: (optionId: string) => void;
|
|
14
|
-
onItemEditEmbeddedForm: (optionId: string) => void;
|
|
15
|
-
onItemDuplicate: (optionId: string) => void;
|
|
16
|
-
onItemDelete: (optionId: string) => void;
|
|
17
|
-
onItemsReorder: (nextItems: ChoiceOptionConfig[]) => void;
|
|
18
|
-
}
|
|
19
|
-
export declare const ChoiceResponseOptionsList: React.FC<ChoiceResponseOptionsListProps>;
|
|
20
|
-
export {};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { SurveyItemTranslations } from '@case-framework/survey-core';
|
|
2
|
-
import { FormItemConfig } from '../model';
|
|
3
|
-
interface FormConfigEditorProps {
|
|
4
|
-
itemId: string;
|
|
5
|
-
config: FormItemConfig;
|
|
6
|
-
editingConfig: FormItemConfig;
|
|
7
|
-
selectedLocale: string;
|
|
8
|
-
translationNamespace?: string;
|
|
9
|
-
onPersist: (applyChanges: (nextConfig: FormItemConfig, nextTranslations: SurveyItemTranslations) => void | boolean) => boolean;
|
|
10
|
-
}
|
|
11
|
-
export declare const FormConfigEditor: React.FC<FormConfigEditorProps>;
|
|
12
|
-
export {};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { FormFieldConfig } from '../model';
|
|
2
|
-
interface FormFieldEditDialogProps {
|
|
3
|
-
open: boolean;
|
|
4
|
-
field: FormFieldConfig | null;
|
|
5
|
-
allFields: FormFieldConfig[];
|
|
6
|
-
onOpenChange: (open: boolean) => void;
|
|
7
|
-
onSave: (nextField: FormFieldConfig) => void;
|
|
8
|
-
}
|
|
9
|
-
export declare const FormFieldEditDialog: React.FC<FormFieldEditDialogProps>;
|
|
10
|
-
export {};
|
package/dist/src/modules/default-item-registry/items/form/editor/field-group-header-dialog.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
interface FormFieldGroupHeaderDialogProps {
|
|
2
|
-
open: boolean;
|
|
3
|
-
initialTitle?: string;
|
|
4
|
-
initialDescription?: string;
|
|
5
|
-
onOpenChange: (open: boolean) => void;
|
|
6
|
-
onSave: (nextHeader: {
|
|
7
|
-
title?: string;
|
|
8
|
-
description?: string;
|
|
9
|
-
}) => void;
|
|
10
|
-
}
|
|
11
|
-
export declare const FormFieldGroupHeaderDialog: React.FC<FormFieldGroupHeaderDialogProps>;
|
|
12
|
-
export {};
|
package/dist/src/modules/default-item-registry/items/form/editor/field-group-layout-dialog.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { FormFieldGroupLayoutConfig } from '../model';
|
|
2
|
-
interface FormFieldGroupLayoutDialogProps {
|
|
3
|
-
open: boolean;
|
|
4
|
-
initialLayout: FormFieldGroupLayoutConfig;
|
|
5
|
-
onOpenChange: (open: boolean) => void;
|
|
6
|
-
onSave: (nextLayout: FormFieldGroupLayoutConfig) => void;
|
|
7
|
-
}
|
|
8
|
-
export declare const FormFieldGroupLayoutDialog: React.FC<FormFieldGroupLayoutDialogProps>;
|
|
9
|
-
export {};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { FormFieldType } from '../model';
|
|
2
|
-
export interface FormFieldItemPreviewProps {
|
|
3
|
-
codingKey: string;
|
|
4
|
-
fieldType: FormFieldType;
|
|
5
|
-
label?: string;
|
|
6
|
-
required?: boolean;
|
|
7
|
-
hasValidations?: boolean;
|
|
8
|
-
isInvalid?: boolean;
|
|
9
|
-
variant?: "bordered" | "plain";
|
|
10
|
-
className?: string;
|
|
11
|
-
onClick?: () => void;
|
|
12
|
-
onEditKey?: () => void;
|
|
13
|
-
onDelete?: () => void;
|
|
14
|
-
}
|
|
15
|
-
export declare function FormFieldItemPreview({ codingKey, fieldType, label, required, hasValidations, isInvalid, variant, className, onClick, onEditKey, onDelete, }: FormFieldItemPreviewProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { FormFieldConfig } from '../model';
|
|
2
|
-
interface FormFieldKeyDialogProps {
|
|
3
|
-
open: boolean;
|
|
4
|
-
field: FormFieldConfig | null;
|
|
5
|
-
allFields: FormFieldConfig[];
|
|
6
|
-
onOpenChange: (open: boolean) => void;
|
|
7
|
-
onSave: (nextKey: string) => void;
|
|
8
|
-
}
|
|
9
|
-
export declare const FormFieldKeyDialog: React.FC<FormFieldKeyDialogProps>;
|
|
10
|
-
export {};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { FormFieldConfig } from '../model';
|
|
2
|
-
interface FormFieldSortDialogProps {
|
|
3
|
-
open: boolean;
|
|
4
|
-
groupId: string | null;
|
|
5
|
-
groupTitle?: string;
|
|
6
|
-
fields: FormFieldConfig[];
|
|
7
|
-
onOpenChange: (open: boolean) => void;
|
|
8
|
-
onFieldsReorder: (nextFields: FormFieldConfig[]) => void;
|
|
9
|
-
}
|
|
10
|
-
export declare const FormFieldSortDialog: React.FC<FormFieldSortDialogProps>;
|
|
11
|
-
export {};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { FormFieldType } from '../model';
|
|
2
|
-
export declare const FORM_FIELD_TYPES: ("number" | "input" | "select" | "textarea" | "switch" | "slider" | "datepicker")[];
|
|
3
|
-
export declare const FORM_FIELD_TYPE_ICON: {
|
|
4
|
-
input: import('react').ForwardRefExoticComponent<Omit<import('lucide-react').LucideProps, "ref"> & import('react').RefAttributes<SVGSVGElement>>;
|
|
5
|
-
textarea: import('react').ForwardRefExoticComponent<Omit<import('lucide-react').LucideProps, "ref"> & import('react').RefAttributes<SVGSVGElement>>;
|
|
6
|
-
number: import('react').ForwardRefExoticComponent<Omit<import('lucide-react').LucideProps, "ref"> & import('react').RefAttributes<SVGSVGElement>>;
|
|
7
|
-
datepicker: import('react').ForwardRefExoticComponent<Omit<import('lucide-react').LucideProps, "ref"> & import('react').RefAttributes<SVGSVGElement>>;
|
|
8
|
-
switch: import('react').ForwardRefExoticComponent<Omit<import('lucide-react').LucideProps, "ref"> & import('react').RefAttributes<SVGSVGElement>>;
|
|
9
|
-
select: import('react').ForwardRefExoticComponent<Omit<import('lucide-react').LucideProps, "ref"> & import('react').RefAttributes<SVGSVGElement>>;
|
|
10
|
-
slider: import('react').ForwardRefExoticComponent<Omit<import('lucide-react').LucideProps, "ref"> & import('react').RefAttributes<SVGSVGElement>>;
|
|
11
|
-
};
|
|
12
|
-
export declare function getFormFieldTypeLabel(t: (key: string) => string, fieldType: FormFieldType): string;
|
package/dist/src/modules/default-item-registry/items/form/editor/response-field-groups-list.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { FormFieldType, FormFieldGroupConfig } from '../model';
|
|
2
|
-
interface FormResponseFieldGroupsListProps {
|
|
3
|
-
itemId: string;
|
|
4
|
-
items: FormFieldGroupConfig[];
|
|
5
|
-
onAddField: (groupId: string, fieldType: FormFieldType) => void;
|
|
6
|
-
onChangeGroupHeader: (groupId: string) => void;
|
|
7
|
-
onEditLayout: (groupId: string) => void;
|
|
8
|
-
onDeleteGroup: (groupId: string) => void;
|
|
9
|
-
onDeleteField: (groupId: string, fieldId: string) => void;
|
|
10
|
-
onEditField: (groupId: string, fieldId: string) => void;
|
|
11
|
-
onEditFieldKey: (groupId: string, fieldId: string) => void;
|
|
12
|
-
onSortFields: (groupId: string) => void;
|
|
13
|
-
onItemsReorder: (nextItems: FormFieldGroupConfig[]) => void;
|
|
14
|
-
}
|
|
15
|
-
export declare const FormResponseFieldGroupsList: React.FC<FormResponseFieldGroupsListProps>;
|
|
16
|
-
export {};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { Content } from '@case-framework/survey-core';
|
|
2
|
-
export declare function QuestionHeaderPreview({ title, subtitle, resolveImageAssetUrl, }: {
|
|
3
|
-
title?: Content;
|
|
4
|
-
subtitle?: Content;
|
|
5
|
-
resolveImageAssetUrl?: (assetId: string) => string | undefined;
|
|
6
|
-
}): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { ItemPreviewComponentProps } from '../../../../../modules/survey-editor';
|
|
2
|
-
import { Content } from '@case-framework/survey-core';
|
|
3
|
-
export declare function getTranslatedContent(itemContent: ItemPreviewComponentProps["itemContent"], locale: string, contentKey: string): Content | undefined;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { RichTextStyleControl, RichTextTemplateVariable } from '../../../../../components/rich-text-editor';
|
|
2
|
-
import { RichTextContentPolicy, RichTextImageAssetOption } from '../../../../../components/rich-text';
|
|
3
|
-
export interface DeferredLocalizedRichTextFieldProps {
|
|
4
|
-
itemId: string;
|
|
5
|
-
locale: string;
|
|
6
|
-
contentKey: string;
|
|
7
|
-
label: string;
|
|
8
|
-
placeholder: string;
|
|
9
|
-
description?: string;
|
|
10
|
-
/** Omit Field chrome; use for inline question title/subtitle. */
|
|
11
|
-
bare?: boolean;
|
|
12
|
-
contentPolicy?: RichTextContentPolicy;
|
|
13
|
-
wrapperClassName?: string;
|
|
14
|
-
surfaceClassName?: string;
|
|
15
|
-
contentClassName?: string;
|
|
16
|
-
placeholderClassName?: string;
|
|
17
|
-
styleControls?: RichTextStyleControl[];
|
|
18
|
-
templateVariables?: RichTextTemplateVariable[];
|
|
19
|
-
resolveImageAssetUrl?: (assetId: string) => string | undefined;
|
|
20
|
-
imageAssets?: RichTextImageAssetOption[];
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* Binds one survey item translation `contentKey` to a rich text editor.
|
|
24
|
-
* Commits to the editor store on blur; syncs draft from survey on focus.
|
|
25
|
-
*/
|
|
26
|
-
export declare const DeferredLocalizedRichTextField: React.FC<DeferredLocalizedRichTextFieldProps>;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
interface QuestionItemEditorLayoutProps {
|
|
3
|
-
itemId: string;
|
|
4
|
-
locale: string;
|
|
5
|
-
responseSection: ReactNode;
|
|
6
|
-
}
|
|
7
|
-
declare const QuestionItemEditorLayout: React.FC<QuestionItemEditorLayoutProps>;
|
|
8
|
-
export default QuestionItemEditorLayout;
|
package/dist/src/modules/default-item-registry/shared/question-editor/rich-text-editors.d.ts
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
interface QuestionCardFooterEditorProps {
|
|
2
|
-
itemId: string;
|
|
3
|
-
locale: string;
|
|
4
|
-
}
|
|
5
|
-
interface QuestionContentEditorProps {
|
|
6
|
-
itemId: string;
|
|
7
|
-
locale: string;
|
|
8
|
-
contentKey: "topContent" | "bottomContent";
|
|
9
|
-
placeholder: string;
|
|
10
|
-
/** When true (choice questions), editors may insert heading and info box blocks in top/bottom content. */
|
|
11
|
-
allowAdvancedBlocks?: boolean;
|
|
12
|
-
}
|
|
13
|
-
/** Card footer rich text (choice/form items); stored as item translation key `cardFooter`. */
|
|
14
|
-
export declare const QuestionCardFooterEditor: React.FC<QuestionCardFooterEditorProps>;
|
|
15
|
-
export declare const QuestionContentEditor: React.FC<QuestionContentEditorProps>;
|
|
16
|
-
interface InfoItemContentEditorProps {
|
|
17
|
-
itemId: string;
|
|
18
|
-
locale: string;
|
|
19
|
-
placeholder: string;
|
|
20
|
-
}
|
|
21
|
-
/** Single rich text body for info items; stored as item translation key `content`. */
|
|
22
|
-
export declare const InfoItemContentEditor: React.FC<InfoItemContentEditorProps>;
|
|
23
|
-
export {};
|
package/dist/src/modules/default-item-registry/shared/question-editor/rich-text-policies.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { RichTextContentPolicy } from '../../../../../components/rich-text';
|
|
2
|
-
export declare const QUESTION_TITLE_CONTENT_POLICY: RichTextContentPolicy;
|
|
3
|
-
export declare const QUESTION_SUBTITLE_CONTENT_POLICY: RichTextContentPolicy;
|
|
4
|
-
export declare const QUESTION_BODY_CONTENT_POLICY: RichTextContentPolicy;
|
|
5
|
-
export declare const QUESTION_CHOICE_BODY_CONTENT_POLICY: RichTextContentPolicy;
|
|
6
|
-
/** Info item: full block editor (paragraphs, lists, images, separators, headings, info boxes). */
|
|
7
|
-
export declare const INFO_ITEM_CONTENT_POLICY: RichTextContentPolicy;
|
|
8
|
-
export declare const QUESTION_CARD_FOOTER_CONTENT_POLICY: RichTextContentPolicy;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { RichTextStyleControl, RichTextTemplateVariable } from '../../../../../components/rich-text-editor';
|
|
2
|
-
/**
|
|
3
|
-
* Template variables and floating toolbar presets shared by question item rich text editors.
|
|
4
|
-
* `subtitleStyleControls` omits italic to match the subtitle content policy.
|
|
5
|
-
*/
|
|
6
|
-
export declare function useQuestionItemRichTextToolbars(): {
|
|
7
|
-
templateVariables: RichTextTemplateVariable[];
|
|
8
|
-
defaultStyleControls: RichTextStyleControl[];
|
|
9
|
-
subtitleStyleControls: RichTextStyleControl[];
|
|
10
|
-
};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { buildSurveyAssistantTaskContext } from '@case-framework/survey-assistant/engine';
|
|
2
|
-
import { SurveyAssistantSuggestItemKeyInput, SurveyAssistantSuggestItemKeyResult, SurveyAssistantSuggestItemLabelInput, SurveyAssistantSuggestItemLabelResult, SurveyAssistantTranslateContentInput, SurveyAssistantTranslateContentResult, SurveyDocumentSnapshot } from '@case-framework/survey-assistant/protocol';
|
|
3
|
-
import { SurveyAIRequestOptions, SurveyEditorAIProvider } from './types';
|
|
4
|
-
export interface SurveyEditorAITaskExecution {
|
|
5
|
-
cacheScope?: string;
|
|
6
|
-
}
|
|
7
|
-
export interface SurveyEditorAITaskExecutor {
|
|
8
|
-
suggestItemKey: (request: SurveyAssistantSuggestItemKeyInput, context: ReturnType<typeof buildSurveyAssistantTaskContext>, options?: SurveyAIRequestOptions, execution?: SurveyEditorAITaskExecution) => Promise<SurveyAssistantSuggestItemKeyResult>;
|
|
9
|
-
suggestItemLabel: (request: SurveyAssistantSuggestItemLabelInput, context: ReturnType<typeof buildSurveyAssistantTaskContext>, options?: SurveyAIRequestOptions, execution?: SurveyEditorAITaskExecution) => Promise<SurveyAssistantSuggestItemLabelResult>;
|
|
10
|
-
translateContent: (request: SurveyAssistantTranslateContentInput, context: ReturnType<typeof buildSurveyAssistantTaskContext>, options?: SurveyAIRequestOptions, execution?: SurveyEditorAITaskExecution) => Promise<SurveyAssistantTranslateContentResult>;
|
|
11
|
-
}
|
|
12
|
-
export interface SurveyEditorAITaskCacheOptions {
|
|
13
|
-
ttlMs?: number;
|
|
14
|
-
maxEntries?: number;
|
|
15
|
-
getScope?: () => string | undefined;
|
|
16
|
-
}
|
|
17
|
-
export interface CreateSnapshotSurveyEditorAIProviderOptions {
|
|
18
|
-
getSnapshot: () => SurveyDocumentSnapshot | null;
|
|
19
|
-
tasks: SurveyEditorAITaskExecutor;
|
|
20
|
-
cache?: false | SurveyEditorAITaskCacheOptions;
|
|
21
|
-
}
|
|
22
|
-
export declare const createSnapshotSurveyEditorAIProvider: ({ getSnapshot, tasks, cache: cacheOptions, }: CreateSnapshotSurveyEditorAIProviderOptions) => SurveyEditorAIProvider;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { SurveyAssistantSuggestItemKeyInput, SurveyAssistantSuggestItemKeyResult, SurveyAssistantSuggestItemLabelInput, SurveyAssistantSuggestItemLabelResult, SurveyAssistantTaskInvocationMode, SurveyAssistantTranslateContentInput, SurveyAssistantTranslateContentResult } from '@case-framework/survey-assistant/protocol';
|
|
2
|
-
export interface SurveyAIRequestOptions {
|
|
3
|
-
signal?: AbortSignal;
|
|
4
|
-
mode?: SurveyAssistantTaskInvocationMode;
|
|
5
|
-
cache?: "default" | "refresh";
|
|
6
|
-
}
|
|
7
|
-
export interface SurveyEditorAIProvider {
|
|
8
|
-
suggestItemKey?: (request: SurveyAssistantSuggestItemKeyInput, options?: SurveyAIRequestOptions) => Promise<SurveyAssistantSuggestItemKeyResult>;
|
|
9
|
-
suggestItemLabel?: (request: SurveyAssistantSuggestItemLabelInput, options?: SurveyAIRequestOptions) => Promise<SurveyAssistantSuggestItemLabelResult>;
|
|
10
|
-
translateContent?: (request: SurveyAssistantTranslateContentInput, options?: SurveyAIRequestOptions) => Promise<SurveyAssistantTranslateContentResult>;
|
|
11
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { SurveyAssistantController } from '@case-framework/survey-assistant/react/integration';
|
|
2
|
-
import { SurveyEditorAIProvider } from './types';
|
|
3
|
-
import { SurveyEditorAssistantController } from '../assistant';
|
|
4
|
-
export interface UseSurveyEditorAssistantIntegrationOptions {
|
|
5
|
-
initialModelId?: string;
|
|
6
|
-
onModelChange?(modelId: string): void;
|
|
7
|
-
taskApi?: string;
|
|
8
|
-
}
|
|
9
|
-
export interface SurveyEditorAssistantIntegration {
|
|
10
|
-
aiProvider: SurveyEditorAIProvider;
|
|
11
|
-
controller: SurveyAssistantController;
|
|
12
|
-
controllerRef(controller: SurveyEditorAssistantController | null): void;
|
|
13
|
-
modelId: string | undefined;
|
|
14
|
-
selectModel(modelId: string): void;
|
|
15
|
-
}
|
|
16
|
-
export declare const useSurveyEditorAssistantIntegration: ({ initialModelId, onModelChange, taskApi, }?: UseSurveyEditorAssistantIntegrationOptions) => SurveyEditorAssistantIntegration;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
export { SurveyImageAssetManager } from './survey-image-asset-manager';
|
|
2
|
-
export type { SurveyImageAssetManagerProps } from './survey-image-asset-manager';
|
|
3
|
-
export { useSurveyAssets, useSurveyImageAssets, useUnusedSurveyAssetCount, } from './use-survey-assets';
|
|
4
|
-
export { getSurveyAssetDisplayName, getSurveyAssetSecondaryLabel, getSurveyImageAssetUrl, } from './utils';
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { RawSurveyAsset } from '@case-framework/survey-core';
|
|
2
|
-
export declare function useSurveyAssets(): Map<string, RawSurveyAsset>;
|
|
3
|
-
export declare function useSurveyImageAssets(): Array<[string, RawSurveyAsset]>;
|
|
4
|
-
export declare function useUnusedSurveyAssetCount(): number;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { RawSurveyAsset } from '@case-framework/survey-core';
|
|
2
|
-
export declare function readFileAsBase64(file: File): Promise<string>;
|
|
3
|
-
export declare function getSurveyImageAssetUrl(asset?: RawSurveyAsset): string | undefined;
|
|
4
|
-
export declare function getSurveyAssetDisplayName(asset: RawSurveyAsset, assetId: string): string;
|
|
5
|
-
export declare function getSurveyAssetSecondaryLabel(asset: RawSurveyAsset, assetId: string): string;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { SurveyEditor as SurveyEditorCore } from '@case-framework/survey-core/editor';
|
|
2
|
-
import { ComposedEditorItemRegistry } from '../registry';
|
|
3
|
-
import { SurveyApplyResult, SurveyBatchApplyResult, SurveyChangeSet, SurveyDocumentVersion } from '@case-framework/survey-assistant/protocol';
|
|
4
|
-
export interface SurveyAssistantEditorApplyResult extends SurveyApplyResult {
|
|
5
|
-
editor?: SurveyEditorCore;
|
|
6
|
-
}
|
|
7
|
-
export interface SurveyAssistantEditorBatchApplyResult extends SurveyBatchApplyResult {
|
|
8
|
-
editor?: SurveyEditorCore;
|
|
9
|
-
}
|
|
10
|
-
interface ApplySurveyAssistantChangeInput {
|
|
11
|
-
change: SurveyChangeSet;
|
|
12
|
-
currentPrecondition: SurveyDocumentVersion;
|
|
13
|
-
editor: SurveyEditorCore;
|
|
14
|
-
itemRegistry: ComposedEditorItemRegistry;
|
|
15
|
-
}
|
|
16
|
-
interface ApplySurveyAssistantChangesInput {
|
|
17
|
-
changes: SurveyChangeSet[];
|
|
18
|
-
currentPrecondition: SurveyDocumentVersion;
|
|
19
|
-
editor: SurveyEditorCore;
|
|
20
|
-
itemRegistry: ComposedEditorItemRegistry;
|
|
21
|
-
}
|
|
22
|
-
export declare const applySurveyAssistantChangesToEditor: ({ changes, currentPrecondition, editor, itemRegistry, }: ApplySurveyAssistantChangesInput) => SurveyAssistantEditorBatchApplyResult;
|
|
23
|
-
export declare const applySurveyAssistantChangeToEditor: ({ change, currentPrecondition, editor, itemRegistry, }: ApplySurveyAssistantChangeInput) => SurveyAssistantEditorApplyResult;
|
|
24
|
-
export {};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
export { applySurveyAssistantChangeToEditor, applySurveyAssistantChangesToEditor, type SurveyAssistantEditorApplyResult, type SurveyAssistantEditorBatchApplyResult, } from './apply';
|
|
2
|
-
export { buildSurveyAssistantItemRegistryManifest, buildSurveyAssistantSnapshot, type SurveyAssistantSnapshotOptions, type SurveyEditorAssistantController, } from './snapshot';
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { SurveyEditor } from '@case-framework/survey-core/editor';
|
|
2
|
-
import { SurveyEditorLocation } from '../navigation/types';
|
|
3
|
-
import { SurveyApplyResult, SurveyAssistantItemRegistryManifest, SurveyAssistantSnapshot, SurveyBatchApplyResult, SurveyChangeSet } from '@case-framework/survey-assistant/protocol';
|
|
4
|
-
import { ComposedEditorItemRegistry } from '../registry';
|
|
5
|
-
export interface SurveyAssistantSnapshotOptions {
|
|
6
|
-
createdAt?: string;
|
|
7
|
-
uiContext?: {
|
|
8
|
-
activeSurface?: string;
|
|
9
|
-
openPanels?: string[];
|
|
10
|
-
highlights?: Array<{
|
|
11
|
-
kind: string;
|
|
12
|
-
itemId?: string;
|
|
13
|
-
componentId?: string;
|
|
14
|
-
label?: string;
|
|
15
|
-
details?: string;
|
|
16
|
-
}>;
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
export interface SurveyEditorAssistantController {
|
|
20
|
-
getSnapshot(options?: SurveyAssistantSnapshotOptions): SurveyAssistantSnapshot;
|
|
21
|
-
applyAssistantChange(change: SurveyChangeSet): SurveyApplyResult;
|
|
22
|
-
applyAssistantChanges(changes: SurveyChangeSet[]): SurveyBatchApplyResult;
|
|
23
|
-
}
|
|
24
|
-
interface BuildSurveyAssistantSnapshotInput {
|
|
25
|
-
sessionId: string | null;
|
|
26
|
-
revision: number;
|
|
27
|
-
editor: SurveyEditor;
|
|
28
|
-
location: SurveyEditorLocation;
|
|
29
|
-
navigationHistory: SurveyEditorLocation[];
|
|
30
|
-
selectedLocale: string;
|
|
31
|
-
itemRegistry: ComposedEditorItemRegistry;
|
|
32
|
-
historyIndex: number;
|
|
33
|
-
options?: SurveyAssistantSnapshotOptions;
|
|
34
|
-
}
|
|
35
|
-
export declare const buildSurveyAssistantItemRegistryManifest: ({ itemRegistry, }: {
|
|
36
|
-
itemRegistry: ComposedEditorItemRegistry;
|
|
37
|
-
}) => SurveyAssistantItemRegistryManifest;
|
|
38
|
-
export declare const buildSurveyAssistantSnapshot: ({ sessionId, revision, editor, location, navigationHistory, selectedLocale, itemRegistry, historyIndex, options, }: BuildSurveyAssistantSnapshotInput) => SurveyAssistantSnapshot;
|
|
39
|
-
export {};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export declare const LAST_USED_ITEM_TYPE_KEY = "case.survey-editor.last-used-item-type";
|
|
2
|
-
export declare const RECENT_ITEM_TYPES_KEY = "case.survey-editor.recent-item-types";
|
|
3
|
-
export declare const MAX_RECENT_ITEM_TYPES = 5;
|
|
4
|
-
export declare const DEFAULT_TOP_ITEM_TYPES: readonly ["infoItem", "formItem"];
|
|
5
|
-
export declare const STRUCTURE_ITEM_TYPES: Set<string>;
|
package/dist/src/modules/survey-editor/editor-card/add-items/hooks/use-add-item-actions.d.ts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { SurveyItemTranslations, SurveyItemCore } from '@case-framework/survey-core';
|
|
2
|
-
import { SurveyItemClipboardData, Target } from '@case-framework/survey-core/editor';
|
|
3
|
-
import { ComposedEditorItemRegistry } from '../../../../../../modules/survey-editor/registry';
|
|
4
|
-
import { ItemTypeOption } from '../types';
|
|
5
|
-
interface UseAddItemActionsParams {
|
|
6
|
-
editorItemRegistry: ComposedEditorItemRegistry;
|
|
7
|
-
addItem: (target: Target | null, item: SurveyItemCore, content?: SurveyItemTranslations) => void;
|
|
8
|
-
pasteItem: (clipboardData: SurveyItemClipboardData, target: Target) => string | null;
|
|
9
|
-
commitByUser: (meta: {
|
|
10
|
-
label: string;
|
|
11
|
-
}) => void;
|
|
12
|
-
setPreferredPreviewItemId: (itemId: string | null) => void;
|
|
13
|
-
closeDialog: () => void;
|
|
14
|
-
targetGroupId?: string;
|
|
15
|
-
targetIndex?: number;
|
|
16
|
-
rootItemId?: string;
|
|
17
|
-
clipboardValue: string | null;
|
|
18
|
-
recordRecentItemType: (itemType: string) => void;
|
|
19
|
-
}
|
|
20
|
-
export declare function useAddItemActions({ editorItemRegistry, addItem, pasteItem, commitByUser, setPreferredPreviewItemId, closeDialog, targetGroupId, targetIndex, rootItemId, clipboardValue, recordRecentItemType, }: UseAddItemActionsParams): {
|
|
21
|
-
handleSelectOption: (option: ItemTypeOption) => void;
|
|
22
|
-
pasteFromClipboard: () => void;
|
|
23
|
-
};
|
|
24
|
-
export {};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { SurveyEditor } from '@case-framework/survey-core/editor';
|
|
2
|
-
import { TargetGroupInfo } from '../types';
|
|
3
|
-
interface UseAddItemTargetParams {
|
|
4
|
-
editor: SurveyEditor | null;
|
|
5
|
-
selectedItemId: string | null;
|
|
6
|
-
targetParentId?: string;
|
|
7
|
-
}
|
|
8
|
-
export declare function useAddItemTarget({ editor, selectedItemId, targetParentId, }: UseAddItemTargetParams): TargetGroupInfo | null;
|
|
9
|
-
export {};
|
package/dist/src/modules/survey-editor/editor-card/add-items/hooks/use-option-group-navigation.d.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { FocusEvent as ReactFocusEvent, KeyboardEvent as ReactKeyboardEvent, RefObject } from 'react';
|
|
2
|
-
interface UseOptionGroupNavigationParams<TOption> {
|
|
3
|
-
options: TOption[];
|
|
4
|
-
onSelect: (option: TOption) => void;
|
|
5
|
-
rowSize?: number;
|
|
6
|
-
enableTabNavigation?: boolean;
|
|
7
|
-
}
|
|
8
|
-
export interface OptionGroupNavigation {
|
|
9
|
-
groupRef: RefObject<HTMLDivElement | null>;
|
|
10
|
-
activeIndex: number;
|
|
11
|
-
isFocused: boolean;
|
|
12
|
-
setActiveIndex: (index: number) => void;
|
|
13
|
-
focusGroup: () => void;
|
|
14
|
-
reset: (index?: number) => void;
|
|
15
|
-
handleGroupFocus: () => void;
|
|
16
|
-
handleGroupBlur: (event: ReactFocusEvent<HTMLDivElement>) => void;
|
|
17
|
-
handleGroupKeyDown: (event: ReactKeyboardEvent<HTMLDivElement>) => void;
|
|
18
|
-
}
|
|
19
|
-
export declare function useOptionGroupNavigation<TOption>({ options, onSelect, rowSize, enableTabNavigation, }: UseOptionGroupNavigationParams<TOption>): OptionGroupNavigation;
|
|
20
|
-
export {};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { LucideIcon } from 'lucide-react';
|
|
2
|
-
import { ItemTypeInfos } from '../../../../../modules/survey-editor/utils/item-type-infos';
|
|
3
|
-
export type AddDialogView = "entry" | "blank-item" | "structure" | "catalogue";
|
|
4
|
-
export interface ItemTypeOption extends ItemTypeInfos {
|
|
5
|
-
itemType: string;
|
|
6
|
-
categories: string[];
|
|
7
|
-
}
|
|
8
|
-
export interface EntryOption {
|
|
9
|
-
id: AddDialogView;
|
|
10
|
-
title: string;
|
|
11
|
-
description: string;
|
|
12
|
-
icon: LucideIcon;
|
|
13
|
-
enabled: boolean;
|
|
14
|
-
}
|
|
15
|
-
export interface TargetGroupInfo {
|
|
16
|
-
id: string;
|
|
17
|
-
itemKey?: string;
|
|
18
|
-
itemLabel?: string;
|
|
19
|
-
isRoot: boolean;
|
|
20
|
-
itemCount: number;
|
|
21
|
-
}
|