@case-framework/survey-editor-ui 0.3.0 → 0.3.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/dist/src/index.d.ts +1 -1
- package/dist/src/modules/survey-editor/registry/types.d.ts +7 -2
- package/dist/src/modules/survey-editor/store/editor-store.d.ts +2 -0
- package/dist/survey-editor-ui.cjs.js +23 -23
- package/dist/survey-editor-ui.cjs.js.map +1 -1
- package/dist/survey-editor-ui.css +1 -1
- package/dist/survey-editor-ui.es.js +9656 -9476
- package/dist/survey-editor-ui.es.js.map +1 -1
- package/package.json +4 -4
package/dist/src/index.d.ts
CHANGED
|
@@ -6,6 +6,6 @@ export { SortableTree } from './components/common/sortable-tree';
|
|
|
6
6
|
export type { SortableTreeDropEvent, SortableTreeDropPosition, SortableTreeEmptyGroupProps, SortableTreeMoveEvent, SortableTreePosition, SortableTreeProps, SortableTreeRenderItemProps, } from './components/common/sortable-tree';
|
|
7
7
|
export { cloneRegistryEntries, createComposedEditorRegistry, createRegistryEntries, createSurveyPlayerRegistry, getDefaultComposedEditorRegistry, getDefaultRegistryEntries, getDefaultSurveyPlayerRegistry, } from './modules/default-item-registry';
|
|
8
8
|
export type { CreateComposedEditorRegistryOptions, CreateRegistryEntriesOptions, CreateSurveyPlayerRegistryOptions, RegistryConflictStrategy, } from './modules/default-item-registry';
|
|
9
|
-
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';
|
|
9
|
+
export type { SurveyEditorProps, SurveyEditorStateChange, SurveyEditorWorkspace, SurveyEditorWorkspacePanelOptions, SurveyEditorAssistantController, SurveyAssistantSnapshotOptions, CreateSnapshotSurveyEditorAIProviderOptions, UseSurveyEditorAssistantIntegrationOptions, SurveyEditorAITaskCacheOptions, SurveyEditorAITaskExecution, SurveyEditorAITaskExecutor, SurveyEditorLocation, EditorItemDefinition, EditorItemDefinitionRegistry, ItemInitialDataContext, 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';
|
|
10
10
|
export type { SurveyEditorDateLocales } from './modules/survey-editor/localization/date-fns';
|
|
11
11
|
export type { FilepickerDropzoneLabels, FilepickerDropzoneProps, } from './components/c-ui/filepicker-dropzone';
|
|
@@ -87,11 +87,16 @@ export interface EditorItemDefinition {
|
|
|
87
87
|
capabilities?: ItemEditorCapabilities;
|
|
88
88
|
expressions?: AnyItemExpressionDefinition[];
|
|
89
89
|
isRootOnly?: boolean;
|
|
90
|
-
getInitialItem?: () => ItemInitialData;
|
|
90
|
+
getInitialItem?: (context?: ItemInitialDataContext) => ItemInitialData;
|
|
91
91
|
createItem?: (ctx: CreateItemContext) => string;
|
|
92
92
|
searchAdapters?: ItemSearchAdapter[];
|
|
93
93
|
includeDefaultSearchAdapter?: boolean;
|
|
94
94
|
}
|
|
95
|
+
/** Context available when the editor creates an item from a registry entry. */
|
|
96
|
+
export interface ItemInitialDataContext {
|
|
97
|
+
/** The language currently selected in the editor. */
|
|
98
|
+
locale: string;
|
|
99
|
+
}
|
|
95
100
|
export type EditorItemDefinitionRegistry = Record<string, EditorItemDefinition>;
|
|
96
101
|
export interface ComposedEditorItemRegistry {
|
|
97
102
|
coreRegistry: ItemTypeRegistry;
|
|
@@ -142,7 +147,7 @@ export interface ItemRegistryEntry {
|
|
|
142
147
|
/** Editor-only */
|
|
143
148
|
capabilities?: ItemEditorCapabilities;
|
|
144
149
|
/** Editor-only: default raw item when creating new */
|
|
145
|
-
getInitialItem?: () => ItemInitialData;
|
|
150
|
+
getInitialItem?: (context?: ItemInitialDataContext) => ItemInitialData;
|
|
146
151
|
/** Editor-only: custom creation flow (advanced) */
|
|
147
152
|
createItem?: (ctx: CreateItemContext) => string;
|
|
148
153
|
/** Editor-only: hide from add-item options in non-root context */
|