@case-framework/survey-ui 0.3.4 → 0.5.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.
@@ -1,9 +1,10 @@
1
- import { SerializedSurveyEditor, SurveyEditor as SurveyEditorCore } from '@case-framework/survey-core/editor';
1
+ import { SerializedSurveyEditor, SurveyEditorHistoryCommit, SurveyEditor as SurveyEditorCore } from '@case-framework/survey-core/editor';
2
2
  export interface EditorStateChangePayload {
3
3
  sessionId: string | null;
4
4
  state: SerializedSurveyEditor;
5
5
  revision: number;
6
6
  hasUncommittedChanges: boolean;
7
+ commitsSinceInitial: SurveyEditorHistoryCommit[];
7
8
  at: number;
8
9
  }
9
10
  interface UseEditorStateChangeOptions {
@@ -1,2 +1,7 @@
1
- declare const EditorMain: React.FC;
1
+ interface EditorMainProps {
2
+ onBackRequested?: () => void;
3
+ onSimulatorRequested?: () => void;
4
+ onSaveRequested: () => void;
5
+ }
6
+ declare const EditorMain: React.FC<EditorMainProps>;
2
7
  export default EditorMain;
@@ -1,4 +1,6 @@
1
1
  interface EditorProps {
2
+ onBackRequested?: () => void;
3
+ onSimulatorRequested?: () => void;
2
4
  onSaveRequested?: () => void;
3
5
  }
4
6
  declare const Editor: React.FC<EditorProps>;
@@ -1,2 +1,7 @@
1
- declare const ItemEditorToolbar: React.FC;
1
+ interface ItemEditorToolbarProps {
2
+ onBackRequested?: () => void;
3
+ onSimulatorRequested?: () => void;
4
+ onSaveRequested: () => void;
5
+ }
6
+ declare const ItemEditorToolbar: React.FC<ItemEditorToolbarProps>;
2
7
  export default ItemEditorToolbar;
@@ -1,2 +1,7 @@
1
- declare const ItemEditor: () => import("react/jsx-runtime").JSX.Element;
1
+ interface ItemEditorProps {
2
+ onBackRequested?: () => void;
3
+ onSimulatorRequested?: () => void;
4
+ onSaveRequested: () => void;
5
+ }
6
+ declare const ItemEditor: React.FC<ItemEditorProps>;
2
7
  export default ItemEditor;
@@ -1,5 +1,5 @@
1
1
  import { StoreApi } from 'zustand';
2
- import { SurveyEditor, Target, SurveyItemClipboardData, CommitMeta, UndoRedoConfig } from '@case-framework/survey-core/editor';
2
+ import { SurveyEditor, Target, SurveyItemClipboardData, CommitMeta, SurveyEditorHistoryCommit, UndoRedoConfig } from '@case-framework/survey-core/editor';
3
3
  import { SurveyItemCore, SurveyItemTranslations, RawSurveyItem, TemplateValueDefinition, GroupItemCore, RawSurveyAsset, SurveyCardContent, NavigationContent, Content } from '@case-framework/survey-core';
4
4
  import { ComposedEditorItemRegistry, ItemCategory, ItemLocaleMap, ItemRegistryEntry } from '../registry';
5
5
  interface StartNewSessionOptions {
@@ -44,6 +44,7 @@ export interface EditorStore {
44
44
  memorySize: number;
45
45
  isCurrent: boolean;
46
46
  }>;
47
+ getCommitsSinceInitial: () => SurveyEditorHistoryCommit[];
47
48
  addItem: (target: Target | null, item: SurveyItemCore, content?: SurveyItemTranslations) => void;
48
49
  removeItem: (itemId: string, nested?: boolean) => boolean;
49
50
  moveItem: (itemId: string, newTarget: Target) => boolean;
@@ -20,6 +20,8 @@ export interface SurveyEditorProps {
20
20
  helpLink?: string;
21
21
  navigationAdapter?: SurveyEditorNavigationAdapter | null;
22
22
  aiProvider?: SurveyEditorAIProvider | null;
23
+ onBackRequested?: () => void;
24
+ onSimulatorRequested?: () => void;
23
25
  onSaveRequested?: () => void;
24
26
  }
25
27
  declare const SurveyEditor: React.FC<SurveyEditorProps>;