@bigbinary/neeto-form-frontend 1.3.3 → 2.0.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.
package/types.d.ts CHANGED
@@ -38,7 +38,6 @@ interface BuildFormProps {
38
38
  allowAdditionalGuests?: boolean;
39
39
  onUpdate?: (data: any) => void;
40
40
  buildRequestArgs?: any;
41
- showAddQuestionDivider?: boolean;
42
41
  nonRemovableFields?: string[];
43
42
  requiredFields?: string[];
44
43
  formDomProps?: FormHTMLAttributes<HTMLFormElement>;
@@ -56,9 +55,8 @@ interface BuildFormProps {
56
55
  }) => {
57
56
  kind: string;
58
57
  label: string;
59
- FieldComponent: React.FC;
60
- FieldIcon: string | any;
61
58
  isSingular: boolean;
59
+ questionProps?: KeyValuePair;
62
60
  };
63
61
  showLoader?: boolean;
64
62
  kindUniqueOn?: string[];
@@ -68,10 +66,12 @@ interface BuildFormProps {
68
66
  disabledAddButtonTooltipProps?: DisabledAddButtonTooltipProps;
69
67
  enableFieldCode?: boolean;
70
68
  availableLanguages?: AvailableLanguage[];
71
- formDescription?: React.ReactNode;
69
+ formDescription?: string;
72
70
  formTitle?: string;
73
71
  selectedLanguage?: string;
74
72
  onLanguageChange?: () => void;
73
+ additionalActionOptions?: MenuItems[];
74
+ additionalQuestionKindPattern?: (values: KeyValuePair) => KeyValuePair;
75
75
  }
76
76
 
77
77
  interface ExternalFormProps {
@@ -92,7 +92,6 @@ interface ExternalFormProps {
92
92
  submitButtonProps?: ButtonProps;
93
93
  cancelButtonProps?: ButtonProps;
94
94
  resetButtonProps?: ButtonProps;
95
- showPrefixIcons?: boolean;
96
95
  displayThankYou?: boolean;
97
96
  showSuccessToastr?: boolean;
98
97
  showEmptyState?: boolean;
@@ -105,6 +104,7 @@ interface ExternalFormProps {
105
104
  formDomProps?: FormHTMLAttributes<HTMLFormElement>;
106
105
  editorProps?: EditorProps;
107
106
  customValidator?: (question: Question) => Schema;
107
+ autoCompleteKinds?: string[];
108
108
  enablePreFilling?: boolean;
109
109
  language?: String;
110
110
  }
@@ -123,7 +123,6 @@ interface UrlBuilderProps {
123
123
  submitButtonProps?: ButtonProps;
124
124
  cancelButtonProps?: ButtonProps;
125
125
  resetButtonProps?: ButtonProps;
126
- showPrefixIcons?: boolean;
127
126
  showEmptyState?: boolean;
128
127
  className?: string;
129
128
  onChange?: (values: any) => void;
@@ -212,72 +211,11 @@ interface Item {
212
211
  nodeId: string;
213
212
  }
214
213
 
215
- interface EmailProps {
216
- name: string;
217
- isRequired: boolean;
218
- }
219
-
220
- interface NameProps {
221
- name: string;
222
- isRequired?: boolean;
223
- isLabelDisabled?: boolean;
224
- enableFieldCode?: boolean;
225
- }
226
-
227
- interface DropdownProps {
228
- item: Item;
229
- name: string;
230
- isRequired: boolean;
231
- }
232
-
233
- interface ShortTextProps {
234
- name: string;
235
- isRequired: boolean;
236
- }
237
-
238
- interface LongTextProps {
239
- name: string;
240
- isRequired: boolean;
241
- }
242
-
243
- interface MultipleChoiceProps {
244
- item: Item;
245
- name: string;
246
- isRequired: boolean;
247
- }
248
-
249
- interface SingleChoiceProps {
250
- item: Item;
251
- name: string;
252
- isRequired: boolean;
253
- }
254
-
255
- interface PhoneProps {
256
- name: string;
257
- isRequired: boolean;
258
- }
259
-
260
- interface RatingProps {
261
- name: string;
262
- isRequired: boolean;
263
- }
264
-
265
- interface TermsProps {
266
- name: string;
267
- }
268
-
269
- interface StarRatingProps {
270
- name: string;
271
- isRequired: boolean;
272
- }
273
-
274
- interface AdditionalGuestsProps {
275
- name: string;
276
- }
277
-
278
- interface ConditionProps {
279
- name: string;
280
- isRequired: boolean;
214
+ interface MenuItems {
215
+ label: string;
216
+ onClick: () => void;
217
+ key: string;
218
+ isVisible?: boolean;
281
219
  }
282
220
 
283
221
  export const BuildForm: React.FC<BuildFormProps>;
@@ -285,21 +223,6 @@ export const ExternalForm: React.FC<ExternalFormProps>;
285
223
  export const UrlBuilder: React.FC<UrlBuilderProps>;
286
224
  export const Submission: React.FC<SubmissionProps>;
287
225
  export const NeetoFormProvider: React.FC;
288
- export const Fields: {
289
- Email: React.FC<EmailProps>;
290
- Name: React.FC<NameProps>;
291
- Dropdown: React.FC<DropdownProps>;
292
- ShortText: React.FC<ShortTextProps>;
293
- LongText: React.FC<LongTextProps>;
294
- MultipleChoice: React.FC<MultipleChoiceProps>;
295
- SingleChoice: React.FC<SingleChoiceProps>;
296
- Phone: React.FC<PhoneProps>;
297
- Rating: React.FC<RatingProps>;
298
- Terms: React.FC<TermsProps>;
299
- StarRating: React.FC<StarRatingProps>;
300
- AdditionalGuests: React.FC<AdditionalGuestsProps>;
301
- Condition: React.FC<ConditionProps>;
302
- };
303
226
 
304
227
  export const useBuildFormState: () => IBuildFormState;
305
228
  export const useFormSubmission: (args: {