@arudovwen/form-builder-react 1.9.13 → 1.9.14

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,7 +1,7 @@
1
1
  import { jsxs as ce, jsx as D, Fragment as De } from "react/jsx-runtime";
2
2
  import ht, { memo as le, useState as xe, useCallback as we, forwardRef as Oo, useRef as ne, useEffect as ie, useContext as gt, createContext as fn, useMemo as be, useLayoutEffect as Aa } from "react";
3
3
  import "react-dom";
4
- import { A as Ia } from "./index-okrlYnnk.js";
4
+ import { A as Ia } from "./index-B84gL1zr.js";
5
5
  function ue(e) {
6
6
  if (typeof e == "string" || typeof e == "number") return "" + e;
7
7
  let t = "";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arudovwen/form-builder-react",
3
- "version": "1.9.13",
3
+ "version": "1.9.14",
4
4
  "description": "A React-based form builder component library.",
5
5
  "type": "module",
6
6
  "main": "./dist/form-builder.umd.js",
@@ -22,6 +22,7 @@ export interface FormRendererProps {
22
22
  uploadUrl?: string;
23
23
  pollResults?: Record<string, any>;
24
24
  showResults?: boolean;
25
+ hideInputsOnResults?: boolean;
25
26
  sendHiddenSectionsAsEmpty?: boolean;
26
27
  }
27
28
  declare const _default: React.NamedExoticComponent<FormRendererProps>;
@@ -5,5 +5,6 @@ export interface PollResultsProps {
5
5
  totalResponses: number;
6
6
  responsesData: any;
7
7
  };
8
+ hideInputs: boolean;
8
9
  }
9
10
  export declare const PollResultsBreakdown: React.FC<PollResultsProps>;
@@ -21,12 +21,12 @@ export declare const demoPollApiResponse: {
21
21
  count: number;
22
22
  percentage: number;
23
23
  }[];
24
- rows?: undefined;
25
24
  average?: undefined;
26
25
  nps?: undefined;
27
26
  rankings?: undefined;
28
27
  topRankWeight?: undefined;
29
28
  totalPoints?: undefined;
29
+ rows?: undefined;
30
30
  };
31
31
  } | {
32
32
  sectionId: string;
@@ -35,25 +35,18 @@ export declare const demoPollApiResponse: {
35
35
  label: string;
36
36
  totalResponses: number;
37
37
  responsesData: {
38
- rows: {
39
- rowId: string;
38
+ options: {
40
39
  label: string;
41
40
  value: string;
42
- totalResponses: number;
43
- columns: {
44
- optionId: string;
45
- label: string;
46
- value: string;
47
- count: number;
48
- percentage: number;
49
- }[];
41
+ count: number;
42
+ percentage: number;
50
43
  }[];
51
- options?: undefined;
52
- average?: undefined;
44
+ average: number;
53
45
  nps?: undefined;
54
46
  rankings?: undefined;
55
47
  topRankWeight?: undefined;
56
48
  totalPoints?: undefined;
49
+ rows?: undefined;
57
50
  };
58
51
  } | {
59
52
  sectionId: string;
@@ -75,10 +68,10 @@ export declare const demoPollApiResponse: {
75
68
  detractors: number;
76
69
  score: number;
77
70
  };
78
- rows?: undefined;
79
71
  rankings?: undefined;
80
72
  topRankWeight?: undefined;
81
73
  totalPoints?: undefined;
74
+ rows?: undefined;
82
75
  };
83
76
  } | {
84
77
  sectionId: string;
@@ -87,18 +80,23 @@ export declare const demoPollApiResponse: {
87
80
  label: string;
88
81
  totalResponses: number;
89
82
  responsesData: {
90
- options: {
83
+ rankings: {
84
+ optionId: string;
91
85
  label: string;
92
86
  value: string;
93
87
  count: number;
94
88
  percentage: number;
89
+ averageRank: number;
90
+ points: number;
91
+ pointsPercentage: number;
92
+ isTopRanked: boolean;
95
93
  }[];
96
- average: number;
97
- rows?: undefined;
94
+ topRankWeight: number;
95
+ totalPoints: number;
96
+ options?: undefined;
97
+ average?: undefined;
98
98
  nps?: undefined;
99
- rankings?: undefined;
100
- topRankWeight?: undefined;
101
- totalPoints?: undefined;
99
+ rows?: undefined;
102
100
  };
103
101
  } | {
104
102
  sectionId: string;
@@ -107,23 +105,25 @@ export declare const demoPollApiResponse: {
107
105
  label: string;
108
106
  totalResponses: number;
109
107
  responsesData: {
110
- rankings: {
111
- optionId: string;
108
+ rows: {
109
+ rowId: string;
112
110
  label: string;
113
111
  value: string;
114
- count: number;
115
- percentage: number;
116
- averageRank: number;
117
- points: number;
118
- pointsPercentage: number;
119
- isTopRanked: boolean;
112
+ totalResponses: number;
113
+ columns: {
114
+ optionId: string;
115
+ label: string;
116
+ value: string;
117
+ count: number;
118
+ percentage: number;
119
+ }[];
120
120
  }[];
121
- topRankWeight: number;
122
- totalPoints: number;
123
121
  options?: undefined;
124
- rows?: undefined;
125
122
  average?: undefined;
126
123
  nps?: undefined;
124
+ rankings?: undefined;
125
+ topRankWeight?: undefined;
126
+ totalPoints?: undefined;
127
127
  };
128
128
  })[];
129
129
  };
@@ -132,53 +132,180 @@ export declare const demoQuestionDa: {
132
132
  title: string;
133
133
  description: string;
134
134
  id: string;
135
+ disabled: boolean;
136
+ isHidden: boolean;
135
137
  questionData: ({
136
- required: boolean;
137
- isReadOnly: boolean;
138
- isDisabled: boolean;
139
138
  id: string;
140
139
  sectionId: string;
141
140
  type: string;
142
141
  label: string;
142
+ icon: string;
143
143
  inputLabel: string;
144
144
  inputType: string;
145
- } | {
145
+ required: boolean;
146
+ placeholder: string;
147
+ description: string;
146
148
  options: {
147
- id: any;
148
- label: any;
149
- value: any;
149
+ id: string;
150
+ label: string;
151
+ value: string;
150
152
  }[];
151
- options1: {
152
- id: any;
153
- label: any;
154
- value: any;
153
+ minLabel?: undefined;
154
+ maxLabel?: undefined;
155
+ options1?: undefined;
156
+ selectType?: undefined;
157
+ } | {
158
+ id: string;
159
+ sectionId: string;
160
+ type: string;
161
+ label: string;
162
+ icon: string;
163
+ inputLabel: string;
164
+ inputType: string;
165
+ required: boolean;
166
+ description: string;
167
+ options: {
168
+ id: string;
169
+ label: string;
170
+ value: string;
155
171
  }[];
172
+ placeholder?: undefined;
173
+ minLabel?: undefined;
174
+ maxLabel?: undefined;
175
+ options1?: undefined;
176
+ selectType?: undefined;
177
+ } | {
178
+ id: string;
179
+ sectionId: string;
180
+ type: string;
181
+ label: string;
182
+ icon: string;
183
+ inputLabel: string;
184
+ inputType: string;
156
185
  required: boolean;
157
- isReadOnly: boolean;
158
- isDisabled: boolean;
186
+ description: string;
187
+ placeholder?: undefined;
188
+ options?: undefined;
189
+ minLabel?: undefined;
190
+ maxLabel?: undefined;
191
+ options1?: undefined;
192
+ selectType?: undefined;
193
+ } | {
159
194
  id: string;
160
195
  sectionId: string;
161
196
  type: string;
162
197
  label: string;
198
+ icon: string;
163
199
  inputLabel: string;
164
200
  inputType: string;
201
+ minLabel: string;
202
+ maxLabel: string;
203
+ required: boolean;
204
+ description: string;
205
+ placeholder?: undefined;
206
+ options?: undefined;
207
+ options1?: undefined;
208
+ selectType?: undefined;
165
209
  } | {
210
+ id: string;
211
+ sectionId: string;
212
+ type: string;
213
+ label: string;
214
+ icon: string;
215
+ inputLabel: string;
216
+ inputType: string;
217
+ required: boolean;
218
+ description: string;
166
219
  options: {
167
- id: any;
168
- label: any;
169
- value: any;
220
+ id: string;
221
+ label: string;
222
+ value: string;
170
223
  }[];
171
- required: boolean;
172
- isReadOnly: boolean;
173
- isDisabled: boolean;
224
+ options1: {
225
+ id: string;
226
+ label: string;
227
+ value: string;
228
+ }[];
229
+ placeholder?: undefined;
230
+ minLabel?: undefined;
231
+ maxLabel?: undefined;
232
+ selectType?: undefined;
233
+ } | {
174
234
  id: string;
175
235
  sectionId: string;
176
236
  type: string;
177
237
  label: string;
238
+ icon: string;
178
239
  inputLabel: string;
179
240
  inputType: string;
241
+ selectType: string;
242
+ required: boolean;
243
+ placeholder: string;
244
+ description: string;
245
+ options: {
246
+ id: string;
247
+ label: string;
248
+ value: string;
249
+ }[];
250
+ minLabel?: undefined;
251
+ maxLabel?: undefined;
252
+ options1?: undefined;
180
253
  })[];
181
254
  }[];
255
+ export declare const demoPollAnswerData: ({
256
+ id: string;
257
+ sectionId: string;
258
+ type: string;
259
+ value: string;
260
+ files: any;
261
+ metaData: {
262
+ responseObject?: undefined;
263
+ };
264
+ } | {
265
+ id: string;
266
+ sectionId: string;
267
+ type: string;
268
+ value: string[];
269
+ files: any;
270
+ metaData: {
271
+ responseObject?: undefined;
272
+ };
273
+ } | {
274
+ id: string;
275
+ sectionId: string;
276
+ type: string;
277
+ value: number;
278
+ files: any;
279
+ metaData: {
280
+ responseObject?: undefined;
281
+ };
282
+ } | {
283
+ id: string;
284
+ sectionId: string;
285
+ type: string;
286
+ value: {
287
+ budgeting: string;
288
+ retirement: string;
289
+ emergency: string;
290
+ };
291
+ files: any;
292
+ metaData: {
293
+ responseObject?: undefined;
294
+ };
295
+ } | {
296
+ id: string;
297
+ sectionId: string;
298
+ type: string;
299
+ value: string;
300
+ files: any;
301
+ metaData: {
302
+ responseObject: {
303
+ id: string;
304
+ label: string;
305
+ value: string;
306
+ };
307
+ };
308
+ })[];
182
309
  export declare const demoFormData: ({
183
310
  title: string;
184
311
  description: string;
@@ -18,6 +18,7 @@ export interface RenderProps {
18
18
  uploadUrl?: string;
19
19
  pollResults?: Record<string, any>;
20
20
  showResults?: boolean;
21
+ hideInputsOnResults?: boolean;
21
22
  sendHiddenSectionsAsEmpty?: boolean;
22
23
  }
23
- export default function Viewer({ answerData, form_data, ignoreValidation, onSubmit, isReadOnly, loading, config, renderType, children, hideFooter, onGetValues, uploadUrl, pollResults, showResults, sendHiddenSectionsAsEmpty, }: RenderProps): import("react/jsx-runtime").JSX.Element;
24
+ export default function Viewer({ answerData, form_data, ignoreValidation, onSubmit, isReadOnly, loading, config, renderType, children, hideFooter, onGetValues, uploadUrl, pollResults, showResults, hideInputsOnResults, sendHiddenSectionsAsEmpty, }: RenderProps): import("react/jsx-runtime").JSX.Element;