@bigbinary/neeto-form-frontend 1.0.34 → 1.0.35

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/index.d.ts CHANGED
@@ -8,6 +8,29 @@ import {
8
8
  UseMutationOptions,
9
9
  } from "react-query";
10
10
  import { EditorProps } from "@bigbinary/neeto-editor";
11
+ import { Schema } from "yup";
12
+
13
+ interface Question {
14
+ id: string;
15
+ entityId?: string;
16
+ entityType?: string;
17
+ label: string;
18
+ placeholder?: string;
19
+ isRequired?: boolean;
20
+ optionsAttributes?: {
21
+ id: string;
22
+ label: string;
23
+ displayOrder: number;
24
+ }[];
25
+ highestRatingLabel?: string;
26
+ lowestRatingLabel?: string;
27
+ averageRatingLabel?: string;
28
+ options?: KeyValuePair[];
29
+ count?: number;
30
+ shape?: string;
31
+ kind: string;
32
+ [key: string]: any;
33
+ }
11
34
 
12
35
  interface BuildFormProps {
13
36
  id: string;
@@ -69,6 +92,7 @@ interface ExternalFormProps {
69
92
  initialValues?: any;
70
93
  formDomProps?: FormHTMLAttributes<HTMLFormElement>;
71
94
  editorProps?: EditorProps;
95
+ customValidator?: (question: Question) => Schema;
72
96
  }
73
97
 
74
98
  interface SubmissionProps {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bigbinary/neeto-form-frontend",
3
- "version": "1.0.34",
3
+ "version": "1.0.35",
4
4
  "description": "Neeto Form Engine Frontend",
5
5
  "author": "BigBinary",
6
6
  "license": "MIT",