@dialob/composer-material 0.0.17 → 0.0.18

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.
@@ -466,7 +466,7 @@ export { LabelField }
466
466
  export { LanguageEditor }
467
467
 
468
468
  declare type LocalizedString = {
469
- [language: string]: string;
469
+ [language: string]: string | undefined;
470
470
  };
471
471
 
472
472
  export declare const LocalizedStringEditor: default_3.FC<{
@@ -574,6 +574,7 @@ declare interface SavingState {
574
574
  variables?: (ContextVariable | Variable)[];
575
575
  formMetadata?: FormMetadata;
576
576
  items?: DialobItems;
577
+ pendingVariableRenames?: VariableRename[];
577
578
  }
578
579
 
579
580
  export declare const SimpleField: default_2.FC<{
@@ -652,7 +653,7 @@ export declare const UploadValuesetDialog: default_2.FC<{
652
653
 
653
654
  export declare const useComposer: () => {
654
655
  addItem: (itemTemplate: DialobItemTemplate, parentItemId: string, afterItemId?: string, callbacks?: ComposerCallbacks) => void;
655
- updateItem: (itemId: string, attribute: string, value: string, language?: string) => void;
656
+ updateItem: (itemId: string, attribute: string, value: any, language?: string) => void;
656
657
  updateLocalizedString: (itemId: string, attribute: string, value: LocalizedString, index?: number) => void;
657
658
  changeItemType: (itemId: string, config: DialobItemTemplate) => void;
658
659
  deleteItem: (itemId: string) => void;
@@ -681,7 +682,7 @@ export declare const useComposer: () => {
681
682
  updateContextVariable: (variableId: string, contextType?: ContextVariableType | string, defaultValue?: any) => void;
682
683
  updateExpressionVariable: (variableId: string, expression: string) => void;
683
684
  updateVariablePublishing: (variableId: string, published: boolean) => void;
684
- updateVariableDescription: (variableId: string, description: string) => void;
685
+ updateVariableDescription: (variableId: string, description: string | undefined) => void;
685
686
  deleteVariable: (variableId: string) => void;
686
687
  moveVariable: (origin: ContextVariable | Variable, destination: ContextVariable | Variable) => void;
687
688
  addLanguage: (language: string, copyFrom?: string) => void;
@@ -691,6 +692,7 @@ export declare const useComposer: () => {
691
692
  applyItemChanges: (newState: SavingState) => void;
692
693
  applyListChanges: (newState: SavingState) => void;
693
694
  applyVariableChanges: (newState: SavingState) => void;
695
+ applyVariableList: (variables: (ContextVariable | Variable)[]) => void;
694
696
  applyFormChanges: (newState: SavingState) => void;
695
697
  applyTranslations: (translations: TranslationResult[], sourceLanguage: string, targetLanguage: string) => void;
696
698
  removeAITranslation: (entryId: string, targetLanguage: string) => void;
@@ -747,7 +749,7 @@ declare interface ValueSetProp {
747
749
  declare type Variable = {
748
750
  name: string;
749
751
  published?: boolean;
750
- expression: string;
752
+ expression: string | undefined;
751
753
  description?: string;
752
754
  };
753
755
 
@@ -757,6 +759,11 @@ declare interface VariableProps {
757
759
  onClose: () => void;
758
760
  }
759
761
 
762
+ declare interface VariableRename {
763
+ from: string;
764
+ to: string;
765
+ }
766
+
760
767
  export declare const VariablesDialog: default_2.FC<{
761
768
  open: boolean;
762
769
  onClose: () => void;