react-survey-builder 1.0.7 → 1.0.8

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/types/index.d.ts CHANGED
@@ -46,7 +46,7 @@ export type StaticElement = {
46
46
  };
47
47
  export type SurveyBuilderInput = {
48
48
  canHaveAnswer?: true;
49
- field_name: string;
49
+ fieldName: string;
50
50
  label: string;
51
51
  };
52
52
  export type Option = {
@@ -59,7 +59,7 @@ export type SelectableElement = {
59
59
  options: Option[];
60
60
  } & SurveyBuilderInput;
61
61
  export type ImageElement = {
62
- field_name: string;
62
+ fieldName: string;
63
63
  src: string;
64
64
  };
65
65
  export type DateElement = {
@@ -72,15 +72,16 @@ export type DateElement = {
72
72
  timeFormat: string;
73
73
  } & SurveyBuilderInput;
74
74
  export type RangeElement = {
75
- max_label: string;
76
- max_value: number;
77
- min_label: string;
78
- min_value: number;
75
+ maxLabel: string;
76
+ maxValue: number;
77
+ minLabel: string;
78
+ minValue: number;
79
+ step: number;
79
80
  } & SurveyBuilderInput;
80
81
  export type FileElement = {
81
82
  _href: string;
82
- file_path: string;
83
- field_name: string;
83
+ filePath: string;
84
+ fieldName: string;
84
85
  } & StaticElement;
85
86
  export type WebsiteElement = {
86
87
  href: string;
@@ -104,7 +105,7 @@ export type TaskData = BaseElement &
104
105
  export type SurveyBuilderLayout = {
105
106
  isContainer: true;
106
107
  childItems: TaskData[];
107
- field_name: string;
108
+ fieldName: string;
108
109
  };
109
110
  export type SurveyBuilderPostData = {
110
111
  task_data: TaskData[];
@@ -123,7 +124,7 @@ export interface SurveyBuilderProps {
123
124
  files?: any[];
124
125
  url?: string;
125
126
  showCorrectColumn?: boolean;
126
- show_description?: boolean;
127
+ showDescription?: boolean;
127
128
  onLoad?: () => Promise<SurveyBuilderPostData>;
128
129
  onPost?: (data: SurveyBuilderPostData) => void;
129
130
  saveUrl?: string;
@@ -137,28 +138,29 @@ export class ReactSurveyBuilder extends React.Component<SurveyBuilderProps> {}
137
138
  export interface SurveyGeneratorOnSubmitParams {
138
139
  id: number;
139
140
  name: string;
140
- custom_name: string;
141
+ customName: string;
141
142
  help: string;
142
143
  value: string | string[];
144
+ label: string;
143
145
  }
144
146
 
145
147
  export interface SurveyGeneratorProps {
146
- form_action: string;
147
- form_method: string;
148
- action_name?: string;
148
+ formAction: string;
149
+ formMethod: string;
150
+ actionName?: string;
149
151
  onBlur?: (info: SurveyGeneratorOnSubmitParams[]) => void;
150
152
  onSubmit?: (info: SurveyGeneratorOnSubmitParams[]) => void;
151
153
  onChange?: (info: SurveyGeneratorOnSubmitParams[]) => void;
152
154
  data: any[];
153
- back_action?: string;
154
- back_name?: string;
155
+ backAction?: string;
156
+ backName?: string;
155
157
  task_id?: number;
156
- answer_data?: any[];
158
+ answerData?: any[];
157
159
  authenticity_token?: string;
158
- hide_actions?: boolean;
159
- skip_validations?: boolean;
160
- display_short?: boolean;
161
- read_only?: boolean;
160
+ hideActions?: boolean;
161
+ skipValidations?: boolean;
162
+ displayShort?: boolean;
163
+ readOnly?: boolean;
162
164
  // eslint-disable-next-line no-undef
163
165
  variables?: Record<any, any>;
164
166
  submitButton?: JSX.Element;