kwikid-forms 0.7.0 → 0.8.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/bundles/kwikid-forms.umd.js +406 -220
- package/bundles/kwikid-forms.umd.js.map +1 -1
- package/esm2015/lib/builder/builder-form-editor/builder.form-editor.constants.js +18 -7
- package/esm2015/lib/builder/builder.component.js +1 -1
- package/esm2015/lib/renderer/config-converter/config-converter.constants.js +36 -3
- package/esm2015/lib/renderer/config-converter/config-converter.js +40 -10
- package/esm2015/lib/renderer/form-view/definitions/form-view.actions.definition.js +1 -1
- package/esm2015/lib/renderer/form-view/definitions/form-view.fields.definition.js +3 -1
- package/esm2015/lib/renderer/form-view/form-view.component.js +75 -36
- package/esm2015/lib/renderer/form-view/form-view.module.js +11 -5
- package/esm2015/lib/renderer/form-view/helpers/form-view.form-data.helper.js +65 -0
- package/esm2015/lib/renderer/form-view/helpers/form-view.form-validations.helper.js +4 -2
- package/esm2015/lib/renderer/helpers/forms-storage.helper.js +1 -1
- package/fesm2015/kwikid-forms.js +247 -63
- package/fesm2015/kwikid-forms.js.map +1 -1
- package/lib/builder/builder-form-editor/builder.form-editor.constants.d.ts +102 -0
- package/lib/renderer/config-converter/config-converter.constants.d.ts +33 -0
- package/lib/renderer/form-view/definitions/form-view.actions.definition.d.ts +8 -2
- package/lib/renderer/form-view/definitions/form-view.fields.definition.d.ts +41 -3
- package/lib/renderer/form-view/form-view.component.d.ts +1 -1
- package/lib/renderer/form-view/form-view.module.d.ts +1 -1
- package/lib/renderer/form-view/helpers/form-view.form-data.helper.d.ts +25 -0
- package/package.json +3 -3
|
@@ -43,6 +43,8 @@ export declare const OPTIONS: {
|
|
|
43
43
|
};
|
|
44
44
|
file: {};
|
|
45
45
|
capture: {};
|
|
46
|
+
record: {};
|
|
47
|
+
mic: {};
|
|
46
48
|
};
|
|
47
49
|
validators: {
|
|
48
50
|
required: boolean[];
|
|
@@ -77,10 +79,16 @@ export declare const FIELD_PROPERTIES_CONFIG: {
|
|
|
77
79
|
};
|
|
78
80
|
text: {
|
|
79
81
|
case: string;
|
|
82
|
+
description: string;
|
|
83
|
+
speechToText: boolean;
|
|
84
|
+
textToSpeech: boolean;
|
|
80
85
|
readOnly: boolean;
|
|
81
86
|
placeholder: string;
|
|
82
87
|
};
|
|
83
88
|
textarea: {
|
|
89
|
+
description: string;
|
|
90
|
+
speechToText: boolean;
|
|
91
|
+
textToSpeech: boolean;
|
|
84
92
|
readOnly: boolean;
|
|
85
93
|
placeholder: string;
|
|
86
94
|
};
|
|
@@ -145,6 +153,7 @@ export declare const FIELD_PROPERTIES_CONFIG: {
|
|
|
145
153
|
placeholder: string;
|
|
146
154
|
};
|
|
147
155
|
select: {
|
|
156
|
+
description: string;
|
|
148
157
|
readOnly: boolean;
|
|
149
158
|
placeholder: string;
|
|
150
159
|
};
|
|
@@ -181,6 +190,16 @@ export declare const FIELD_PROPERTIES_CONFIG: {
|
|
|
181
190
|
readOnly: boolean;
|
|
182
191
|
placeholder: string;
|
|
183
192
|
};
|
|
193
|
+
masked: {
|
|
194
|
+
maskChar: string;
|
|
195
|
+
maskCount: number;
|
|
196
|
+
maskDirection: string;
|
|
197
|
+
maxLength: any;
|
|
198
|
+
pattern: string;
|
|
199
|
+
storeMaskValue: boolean;
|
|
200
|
+
readOnly: boolean;
|
|
201
|
+
placeholder: string;
|
|
202
|
+
};
|
|
184
203
|
image: {
|
|
185
204
|
altText: string;
|
|
186
205
|
html: {
|
|
@@ -223,6 +242,22 @@ export declare const FIELD_PROPERTIES_CONFIG: {
|
|
|
223
242
|
readOnly: boolean;
|
|
224
243
|
placeholder: string;
|
|
225
244
|
};
|
|
245
|
+
mic: {
|
|
246
|
+
buttonText: string;
|
|
247
|
+
icon: string;
|
|
248
|
+
isUpload: boolean;
|
|
249
|
+
minRecordingTimeInSeconds: number;
|
|
250
|
+
maxRecordingTimeInSeconds: number;
|
|
251
|
+
mimeType: string;
|
|
252
|
+
accept: string;
|
|
253
|
+
showMediaFiles: boolean;
|
|
254
|
+
uploadFileToServer: boolean;
|
|
255
|
+
preview: {
|
|
256
|
+
show: boolean;
|
|
257
|
+
};
|
|
258
|
+
readOnly: boolean;
|
|
259
|
+
placeholder: string;
|
|
260
|
+
};
|
|
226
261
|
capture: {
|
|
227
262
|
containerStyles: string;
|
|
228
263
|
buttonText: string;
|
|
@@ -304,6 +339,9 @@ export declare const FIELD_CONFIG: {
|
|
|
304
339
|
type: string;
|
|
305
340
|
properties: {
|
|
306
341
|
case: string;
|
|
342
|
+
description: string;
|
|
343
|
+
speechToText: boolean;
|
|
344
|
+
textToSpeech: boolean;
|
|
307
345
|
readOnly: boolean;
|
|
308
346
|
placeholder: string;
|
|
309
347
|
};
|
|
@@ -346,6 +384,9 @@ export declare const FIELD_CONFIG: {
|
|
|
346
384
|
textarea: {
|
|
347
385
|
type: string;
|
|
348
386
|
properties: {
|
|
387
|
+
description: string;
|
|
388
|
+
speechToText: boolean;
|
|
389
|
+
textToSpeech: boolean;
|
|
349
390
|
readOnly: boolean;
|
|
350
391
|
placeholder: string;
|
|
351
392
|
};
|
|
@@ -531,6 +572,7 @@ export declare const FIELD_CONFIG: {
|
|
|
531
572
|
select: {
|
|
532
573
|
type: string;
|
|
533
574
|
properties: {
|
|
575
|
+
description: string;
|
|
534
576
|
readOnly: boolean;
|
|
535
577
|
placeholder: string;
|
|
536
578
|
};
|
|
@@ -685,6 +727,33 @@ export declare const FIELD_CONFIG: {
|
|
|
685
727
|
max: number;
|
|
686
728
|
};
|
|
687
729
|
};
|
|
730
|
+
masked: {
|
|
731
|
+
type: string;
|
|
732
|
+
properties: {
|
|
733
|
+
maskChar: string;
|
|
734
|
+
maskCount: number;
|
|
735
|
+
maskDirection: string;
|
|
736
|
+
maxLength: any;
|
|
737
|
+
pattern: string;
|
|
738
|
+
storeMaskValue: boolean;
|
|
739
|
+
readOnly: boolean;
|
|
740
|
+
placeholder: string;
|
|
741
|
+
};
|
|
742
|
+
key: string;
|
|
743
|
+
label: string;
|
|
744
|
+
disabled: boolean;
|
|
745
|
+
validators: {
|
|
746
|
+
required: boolean;
|
|
747
|
+
minLength: number;
|
|
748
|
+
maxLength: number;
|
|
749
|
+
pattern: {
|
|
750
|
+
key: string;
|
|
751
|
+
pattern: string;
|
|
752
|
+
};
|
|
753
|
+
min: number;
|
|
754
|
+
max: number;
|
|
755
|
+
};
|
|
756
|
+
};
|
|
688
757
|
image: {
|
|
689
758
|
type: string;
|
|
690
759
|
properties: {
|
|
@@ -854,6 +923,39 @@ export declare const FIELD_CONFIG: {
|
|
|
854
923
|
max: number;
|
|
855
924
|
};
|
|
856
925
|
};
|
|
926
|
+
mic: {
|
|
927
|
+
type: string;
|
|
928
|
+
properties: {
|
|
929
|
+
buttonText: string;
|
|
930
|
+
icon: string;
|
|
931
|
+
isUpload: boolean;
|
|
932
|
+
minRecordingTimeInSeconds: number;
|
|
933
|
+
maxRecordingTimeInSeconds: number;
|
|
934
|
+
mimeType: string;
|
|
935
|
+
accept: string;
|
|
936
|
+
showMediaFiles: boolean;
|
|
937
|
+
uploadFileToServer: boolean;
|
|
938
|
+
preview: {
|
|
939
|
+
show: boolean;
|
|
940
|
+
};
|
|
941
|
+
readOnly: boolean;
|
|
942
|
+
placeholder: string;
|
|
943
|
+
};
|
|
944
|
+
key: string;
|
|
945
|
+
label: string;
|
|
946
|
+
disabled: boolean;
|
|
947
|
+
validators: {
|
|
948
|
+
required: boolean;
|
|
949
|
+
minLength: number;
|
|
950
|
+
maxLength: number;
|
|
951
|
+
pattern: {
|
|
952
|
+
key: string;
|
|
953
|
+
pattern: string;
|
|
954
|
+
};
|
|
955
|
+
min: number;
|
|
956
|
+
max: number;
|
|
957
|
+
};
|
|
958
|
+
};
|
|
857
959
|
};
|
|
858
960
|
export declare const NOFIELD_CONFIG: {
|
|
859
961
|
required: boolean;
|
|
@@ -16,6 +16,10 @@ export declare const FIELD_PROPERTIES: {
|
|
|
16
16
|
containerStyles: string;
|
|
17
17
|
postfix: string;
|
|
18
18
|
prefix: string;
|
|
19
|
+
description: string;
|
|
20
|
+
isShowLabelOutside: boolean;
|
|
21
|
+
speechToText: boolean;
|
|
22
|
+
textToSpeech: boolean;
|
|
19
23
|
};
|
|
20
24
|
currency: {
|
|
21
25
|
containerStyles: string;
|
|
@@ -23,6 +27,15 @@ export declare const FIELD_PROPERTIES: {
|
|
|
23
27
|
prefix: string;
|
|
24
28
|
currencyType: string;
|
|
25
29
|
};
|
|
30
|
+
masked: {
|
|
31
|
+
containerStyles: string;
|
|
32
|
+
maskChar: string;
|
|
33
|
+
maskCount: number;
|
|
34
|
+
maskDirection: string;
|
|
35
|
+
maxLength: any;
|
|
36
|
+
pattern: string;
|
|
37
|
+
storeMaskValue: boolean;
|
|
38
|
+
};
|
|
26
39
|
email: {
|
|
27
40
|
case: string;
|
|
28
41
|
containerStyles: string;
|
|
@@ -69,7 +82,10 @@ export declare const FIELD_PROPERTIES: {
|
|
|
69
82
|
};
|
|
70
83
|
textarea: {
|
|
71
84
|
containerStyles: string;
|
|
85
|
+
description: string;
|
|
72
86
|
isShowLabelOutside: boolean;
|
|
87
|
+
speechToText: boolean;
|
|
88
|
+
textToSpeech: boolean;
|
|
73
89
|
};
|
|
74
90
|
title: {
|
|
75
91
|
containerStyles: string;
|
|
@@ -208,6 +224,21 @@ export declare const FIELD_PROPERTIES: {
|
|
|
208
224
|
};
|
|
209
225
|
};
|
|
210
226
|
};
|
|
227
|
+
mic: {
|
|
228
|
+
containerStyles: string;
|
|
229
|
+
buttonText: string;
|
|
230
|
+
icon: string;
|
|
231
|
+
isUpload: boolean;
|
|
232
|
+
minRecordingTimeInSeconds: number;
|
|
233
|
+
maxRecordingTimeInSeconds: number;
|
|
234
|
+
mimeType: string;
|
|
235
|
+
accept: string;
|
|
236
|
+
showMediaFiles: boolean;
|
|
237
|
+
uploadFileToServer: boolean;
|
|
238
|
+
preview: {
|
|
239
|
+
show: boolean;
|
|
240
|
+
};
|
|
241
|
+
};
|
|
211
242
|
record: {
|
|
212
243
|
containerStyles: string;
|
|
213
244
|
buttonText: string;
|
|
@@ -243,12 +274,14 @@ export declare const FIELD_PROPERTIES: {
|
|
|
243
274
|
};
|
|
244
275
|
select: {
|
|
245
276
|
containerStyles: string;
|
|
277
|
+
description: string;
|
|
246
278
|
isShowLabelOutside: boolean;
|
|
247
279
|
searchable: boolean;
|
|
248
280
|
};
|
|
249
281
|
"dropdown-with-search": {
|
|
250
282
|
searchable: boolean;
|
|
251
283
|
containerStyles: string;
|
|
284
|
+
description: string;
|
|
252
285
|
isShowLabelOutside: boolean;
|
|
253
286
|
};
|
|
254
287
|
"star-rating": {
|
|
@@ -55,7 +55,7 @@ export declare enum EActionKey {
|
|
|
55
55
|
ALERT_SHOW = "ALERT_SHOW",
|
|
56
56
|
SET_HTML = "SET_HTML"
|
|
57
57
|
}
|
|
58
|
-
export declare type TActionKey = EActionKey.SET_VALUE | EActionKey.SET_FIELD_DEFAULT_VALUE | EActionKey.SET_API_STATUS | EActionKey.SET_API_HEADER_VALUE | EActionKey.SET_API_HEADER_VALIDITY | EActionKey.SET_API_BODY_VALUE | EActionKey.SET_API_BODY_VALIDITY | EActionKey.SET_FIELD_VALIDITY | EActionKey.FIELD_API_TIMER_MESSAGE_SHOW | EActionKey.FIELD_API_TIMER_MESSAGE_HIDE | EActionKey.FIELD_MESSAGE_SHOW | EActionKey.FIELD_MESSAGES_HIDE | EActionKey.FIELD_ERROR_SHOW | EActionKey.FIELD_ERROR_HIDE | EActionKey.FIELD_SHOW | EActionKey.FIELD_HIDE | EActionKey.FIELD_ENABLE | EActionKey.FIELD_DISABLE | EActionKey.FIELD_RESET | EActionKey.FIELD_GROUP_SHOW_API_LOADER | EActionKey.FIELD_GROUP_HIDE_API_LOADER | EActionKey.FIELD_SHOW_API_LOADER | EActionKey.FIELD_HIDE_API_LOADER | EActionKey.HANDLE_CONNECTED_ELEMENTS | EActionKey.CUSTOM | EActionKey.FIELD_GROUP_SHOW | EActionKey.FIELD_GROUP_HIDE | EActionKey.FIELD_GROUP_ENABLE | EActionKey.FIELD_GROUP_DISABLE | EActionKey.API_CALL | EActionKey.API_CALL_MULTIPLE | EActionKey.API_CALL_MULTIPLE_END | EActionKey.TASK_API_CALL | EActionKey.TASK_API_CALL_MULTIPLE | EActionKey.TASK_API_CALL_MULTIPLE_END | EActionKey.SET_DROPDOWN_OPTIONS | EActionKey.PREVIEW_DIALOG_SHOW | EActionKey.POPUP_FORM_SHOW | EActionKey.STOP_WAITING | EActionKey.NOTIFICATION_ERROR_SHOW | EActionKey.NOTIFICATION_ERROR_HIDE | EActionKey.DIALOG_SHOW | EActionKey.DIALOG_HIDE | EActionKey.RESUME_TASK_EXECUTION | EActionKey.STOP_TASK_EXECUTION | EActionKey.REDIRECT_TO_URL | EActionKey.SAVE_FORM | EActionKey.ALERT_SHOW | EActionKey.SET_HTML;
|
|
58
|
+
export declare type TActionKey = EActionKey.SET_VALUE | EActionKey.SET_FIELD_DEFAULT_VALUE | EActionKey.SET_API_STATUS | EActionKey.SET_API_HEADER_VALUE | EActionKey.SET_API_HEADER_VALIDITY | EActionKey.SET_API_BODY_VALUE | EActionKey.SET_API_BODY_VALIDITY | EActionKey.SET_FIELD_VALIDITY | EActionKey.FIELD_API_TIMER_MESSAGE_SHOW | EActionKey.FIELD_API_TIMER_MESSAGE_HIDE | EActionKey.FIELD_MESSAGE_SHOW | EActionKey.FIELD_MESSAGES_HIDE | EActionKey.FIELD_ERROR_SHOW | EActionKey.FIELD_ERROR_HIDE | EActionKey.FIELD_SHOW | EActionKey.FIELD_HIDE | EActionKey.FIELD_ENABLE | EActionKey.FIELD_DISABLE | EActionKey.FIELD_RESET | EActionKey.FIELD_GROUP_SHOW_API_LOADER | EActionKey.FIELD_GROUP_HIDE_API_LOADER | EActionKey.FIELD_SHOW_API_LOADER | EActionKey.FIELD_HIDE_API_LOADER | EActionKey.HANDLE_CONNECTED_ELEMENTS | EActionKey.CUSTOM | EActionKey.FIELD_GROUP_SHOW | EActionKey.FIELD_GROUP_HIDE | EActionKey.FIELD_GROUP_ENABLE | EActionKey.FIELD_GROUP_DISABLE | EActionKey.FIELD_GROUP_RESET | EActionKey.API_CALL | EActionKey.API_CALL_MULTIPLE | EActionKey.API_CALL_MULTIPLE_END | EActionKey.TASK_API_CALL | EActionKey.TASK_API_CALL_MULTIPLE | EActionKey.TASK_API_CALL_MULTIPLE_END | EActionKey.SET_DROPDOWN_OPTIONS | EActionKey.PREVIEW_DIALOG_SHOW | EActionKey.POPUP_FORM_SHOW | EActionKey.STOP_WAITING | EActionKey.NOTIFICATION_ERROR_SHOW | EActionKey.NOTIFICATION_ERROR_HIDE | EActionKey.DIALOG_SHOW | EActionKey.DIALOG_HIDE | EActionKey.RESUME_TASK_EXECUTION | EActionKey.STOP_TASK_EXECUTION | EActionKey.REDIRECT_TO_URL | EActionKey.SAVE_FORM | EActionKey.ALERT_SHOW | EActionKey.SET_HTML;
|
|
59
59
|
export declare type TActionSetValue = TAction & {
|
|
60
60
|
key: EActionKey.SET_VALUE;
|
|
61
61
|
props: {
|
|
@@ -97,7 +97,13 @@ export declare type IFieldErrorHide = TAction & {
|
|
|
97
97
|
key: EActionKey.FIELD_ERROR_HIDE;
|
|
98
98
|
props: {
|
|
99
99
|
fieldKey: string;
|
|
100
|
-
message
|
|
100
|
+
message?: TMessage;
|
|
101
|
+
};
|
|
102
|
+
};
|
|
103
|
+
export declare type TActionFieldGroupReset = TAction & {
|
|
104
|
+
key: EActionKey.FIELD_GROUP_RESET;
|
|
105
|
+
props: {
|
|
106
|
+
groupKey: string;
|
|
101
107
|
};
|
|
102
108
|
};
|
|
103
109
|
export declare type TActionFieldShow = TAction & {
|
|
@@ -29,12 +29,14 @@ export declare enum EFieldType {
|
|
|
29
29
|
EMAIL = "email",
|
|
30
30
|
CAPTURE = "capture",
|
|
31
31
|
RECORD = "record",
|
|
32
|
+
MIC = "mic",
|
|
32
33
|
STAR_RATING = "star-rating",
|
|
33
34
|
LIVE_LOCATION = "live-location",
|
|
34
35
|
DATA_HOLDER = "data-holder",
|
|
35
|
-
CURRENCY = "currency"
|
|
36
|
+
CURRENCY = "currency",
|
|
37
|
+
MASKED = "masked"
|
|
36
38
|
}
|
|
37
|
-
export declare type TFieldType = EFieldType.HTML | EFieldType.TITLE | EFieldType.BUTTON | EFieldType.TEXT | EFieldType.TEXTAREA | EFieldType.CHECKBOX | EFieldType.NUMBER | EFieldType.DATE | EFieldType.TIME | EFieldType.PREVIEW_IMAGE | EFieldType.PHONE | EFieldType.RADIO | EFieldType.DROPDOWN_WITH_SEARCH | EFieldType.SELECT | EFieldType.API | EFieldType.API_CALL | EFieldType.OTP | EFieldType.AADHAAR_NUMBER | EFieldType.SLIDER | EFieldType.FILE | EFieldType.PASSWORD | EFieldType.EMAIL | EFieldType.CAPTURE | EFieldType.RECORD | EFieldType.STAR_RATING | EFieldType.LIVE_LOCATION | EFieldType.DATA_HOLDER | EFieldType.CURRENCY;
|
|
39
|
+
export declare type TFieldType = EFieldType.HTML | EFieldType.TITLE | EFieldType.BUTTON | EFieldType.TEXT | EFieldType.TEXTAREA | EFieldType.CHECKBOX | EFieldType.NUMBER | EFieldType.DATE | EFieldType.TIME | EFieldType.PREVIEW_IMAGE | EFieldType.PHONE | EFieldType.RADIO | EFieldType.DROPDOWN_WITH_SEARCH | EFieldType.SELECT | EFieldType.API | EFieldType.API_CALL | EFieldType.OTP | EFieldType.AADHAAR_NUMBER | EFieldType.SLIDER | EFieldType.FILE | EFieldType.PASSWORD | EFieldType.EMAIL | EFieldType.CAPTURE | EFieldType.RECORD | EFieldType.MIC | EFieldType.STAR_RATING | EFieldType.LIVE_LOCATION | EFieldType.DATA_HOLDER | EFieldType.CURRENCY | EFieldType.MASKED;
|
|
38
40
|
export declare type TFieldSelectOption = {
|
|
39
41
|
title: string;
|
|
40
42
|
value: string;
|
|
@@ -67,6 +69,9 @@ export declare type TFieldTextProperties = {
|
|
|
67
69
|
case: string;
|
|
68
70
|
placeholder: string;
|
|
69
71
|
readOnly: string;
|
|
72
|
+
description: string;
|
|
73
|
+
speechToText: boolean;
|
|
74
|
+
textToSpeech: boolean;
|
|
70
75
|
};
|
|
71
76
|
export declare type TFieldCurrencyProperties = {
|
|
72
77
|
containerStyles: string;
|
|
@@ -74,6 +79,17 @@ export declare type TFieldCurrencyProperties = {
|
|
|
74
79
|
placeholder: string;
|
|
75
80
|
readOnly: string;
|
|
76
81
|
};
|
|
82
|
+
export declare type TFieldMaskedProperties = {
|
|
83
|
+
containerStyles: string;
|
|
84
|
+
maskChar: string;
|
|
85
|
+
maskCount: number;
|
|
86
|
+
maskDirection: string;
|
|
87
|
+
maxLength: number | null;
|
|
88
|
+
pattern: string;
|
|
89
|
+
placeholder: string;
|
|
90
|
+
readOnly: string;
|
|
91
|
+
storeMaskValue: boolean;
|
|
92
|
+
};
|
|
77
93
|
export declare type TFieldEmailProperties = {
|
|
78
94
|
case: string;
|
|
79
95
|
domains: Array<string>;
|
|
@@ -90,6 +106,9 @@ export declare type TFieldTextareaProperties = {
|
|
|
90
106
|
isShowLabelOutside: boolean;
|
|
91
107
|
placeholder: string;
|
|
92
108
|
readOnly: string;
|
|
109
|
+
description: string;
|
|
110
|
+
speechToText: boolean;
|
|
111
|
+
textToSpeech: boolean;
|
|
93
112
|
};
|
|
94
113
|
export declare type TFieldCheckboxProperties = {
|
|
95
114
|
contentAlign: string;
|
|
@@ -160,6 +179,7 @@ export declare type TFieldSelectProperties = {
|
|
|
160
179
|
isShowLabelOutside: boolean;
|
|
161
180
|
placeholder: string;
|
|
162
181
|
readOnly: boolean;
|
|
182
|
+
description: string;
|
|
163
183
|
};
|
|
164
184
|
export declare type TFieldApiCallProperties = {};
|
|
165
185
|
export declare type TFieldDataHolderProperties = {};
|
|
@@ -262,6 +282,21 @@ export declare type TFieldRecordProperties = {
|
|
|
262
282
|
};
|
|
263
283
|
};
|
|
264
284
|
};
|
|
285
|
+
export declare type TFieldMicProperties = {
|
|
286
|
+
accept: string;
|
|
287
|
+
containerStyles: string;
|
|
288
|
+
buttonText: string;
|
|
289
|
+
icon: string;
|
|
290
|
+
isUpload: boolean;
|
|
291
|
+
minRecordingTimeInSeconds: number;
|
|
292
|
+
maxRecordingTimeInSeconds: number;
|
|
293
|
+
mimeType: string;
|
|
294
|
+
showMediaFiles: boolean;
|
|
295
|
+
uploadFileToServer: boolean;
|
|
296
|
+
preview: {
|
|
297
|
+
show: boolean;
|
|
298
|
+
};
|
|
299
|
+
};
|
|
265
300
|
export declare type TFieldStarRatingProperties = {
|
|
266
301
|
color: string;
|
|
267
302
|
icon: string;
|
|
@@ -281,7 +316,7 @@ export declare type TFieldLiveLocationProperties = {
|
|
|
281
316
|
styles: string;
|
|
282
317
|
shape: string;
|
|
283
318
|
};
|
|
284
|
-
export declare type TFieldProperties = TFieldTextProperties | TFieldCurrencyProperties | TFieldEmailProperties | TFieldPasswordProperties | TFieldTextareaProperties | TFieldCheckboxProperties | TFieldNumberProperties | TFieldDateProperties | TFieldPhoneProperties | TFieldPreviewImageProperties | TFieldSliderProperties | TFieldRadioProperties | TFieldSelectProperties | TFieldApiCallProperties | TFieldOtpProperties | TFieldAadhaarNumberProperties | TFieldCaptureProperties | TFieldRecordProperties | TFieldStarRatingProperties | TFieldLiveLocationProperties;
|
|
319
|
+
export declare type TFieldProperties = TFieldTextProperties | TFieldCurrencyProperties | TFieldEmailProperties | TFieldPasswordProperties | TFieldTextareaProperties | TFieldCheckboxProperties | TFieldNumberProperties | TFieldDateProperties | TFieldPhoneProperties | TFieldPreviewImageProperties | TFieldSliderProperties | TFieldRadioProperties | TFieldSelectProperties | TFieldApiCallProperties | TFieldOtpProperties | TFieldAadhaarNumberProperties | TFieldCaptureProperties | TFieldRecordProperties | TFieldMicProperties | TFieldStarRatingProperties | TFieldLiveLocationProperties;
|
|
285
320
|
export declare type TField = {
|
|
286
321
|
label: string;
|
|
287
322
|
type: TFieldType;
|
|
@@ -366,6 +401,9 @@ export declare type TFieldPreviewImage = TField & {
|
|
|
366
401
|
export declare type TFieldCapture = TField & {
|
|
367
402
|
properties: TFieldCaptureProperties;
|
|
368
403
|
};
|
|
404
|
+
export declare type TFieldMic = TField & {
|
|
405
|
+
properties: TFieldMicProperties;
|
|
406
|
+
};
|
|
369
407
|
export declare type TFieldStarRating = TField & {
|
|
370
408
|
properties: TFieldStarRatingProperties;
|
|
371
409
|
};
|
|
@@ -175,7 +175,7 @@ export declare class KwikIDFormViewComponent implements OnInit, OnChanges, OnDes
|
|
|
175
175
|
fieldShowApiLoader(fieldKey: string): void;
|
|
176
176
|
setHtml(fieldKey: string, message: TMessage): void;
|
|
177
177
|
fieldErrorShow(fieldKey: string, message: TMessage): void;
|
|
178
|
-
fieldErrorHide(fieldKey: string, message
|
|
178
|
+
fieldErrorHide(fieldKey: string, message?: TMessage): void;
|
|
179
179
|
fieldMessageShow(fieldKey: string, message: TMessage): void;
|
|
180
180
|
fieldMessageHide(fieldKey: string, message: TMessage): void;
|
|
181
181
|
fieldApiTimerMessageShow(fieldKey: string, timer: TApiTimer): Promise<void>;
|
|
@@ -13,6 +13,6 @@ import * as i11 from "kwikui";
|
|
|
13
13
|
import * as i12 from "kwikid-camera";
|
|
14
14
|
export declare class KwikIDFormViewModule {
|
|
15
15
|
static ɵfac: i0.ɵɵFactoryDeclaration<KwikIDFormViewModule, never>;
|
|
16
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<KwikIDFormViewModule, [typeof i1.KwikIDFormViewComponent, typeof i2.StyleSanitizerPipe, typeof i3.TimerPipe, typeof i4.FilterImageUrlOrBase64FromObjectPipe, typeof i5.FilterVideoUrlOrBase64FromObjectPipe], [typeof i6.CommonModule, typeof i7.FormsModule, typeof i7.ReactiveFormsModule, typeof i8.TuiLabelModule, typeof i9.TuiPushModule, typeof i8.TuiSvgModule, typeof i10.TuiPreviewModule, typeof i8.TuiButtonModule, typeof i10.TuiPreviewActionModule, typeof i8.TuiDialogModule, typeof i11.KwikUIPipeModule, typeof i11.KwikUIModule, typeof i12.KwikIDCameraModule, typeof i12.KwikUIInputCameraModule, typeof i11.KwikUIInputEmailModule], [typeof i1.KwikIDFormViewComponent]>;
|
|
16
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<KwikIDFormViewModule, [typeof i1.KwikIDFormViewComponent, typeof i2.StyleSanitizerPipe, typeof i3.TimerPipe, typeof i4.FilterImageUrlOrBase64FromObjectPipe, typeof i5.FilterVideoUrlOrBase64FromObjectPipe], [typeof i6.CommonModule, typeof i7.FormsModule, typeof i7.ReactiveFormsModule, typeof i8.TuiLabelModule, typeof i9.TuiPushModule, typeof i8.TuiSvgModule, typeof i10.TuiPreviewModule, typeof i8.TuiButtonModule, typeof i10.TuiPreviewActionModule, typeof i8.TuiDialogModule, typeof i11.KwikUIPipeModule, typeof i11.KwikUIModule, typeof i12.KwikIDCameraModule, typeof i12.KwikUIInputCameraModule, typeof i11.KwikUIInputEmailModule, typeof i11.KwikUIInputMaskedModule, typeof i11.KwikUIInputMicModule], [typeof i1.KwikIDFormViewComponent]>;
|
|
17
17
|
static ɵinj: i0.ɵɵInjectorDeclaration<KwikIDFormViewModule>;
|
|
18
18
|
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { TApiEndpoint } from "../definitions/form-view.apis.definition";
|
|
2
|
+
/**
|
|
3
|
+
* Collects each endpoint's response.value under its apiKey.
|
|
4
|
+
* Used by API_CALL_MULTIPLE_END so form storage keeps
|
|
5
|
+
* { nsdl: {...}, dedupe: {...} } instead of a blank control value.
|
|
6
|
+
*/
|
|
7
|
+
export declare const collectMultipleApiCallResponses: (endpoints?: TApiEndpoint[]) => Record<string, any>;
|
|
8
|
+
/**
|
|
9
|
+
* Writes the aggregated multi-API result onto the live formData object.
|
|
10
|
+
* Mutates in place so in-flight Action/Source objects that share this
|
|
11
|
+
* FORM_DATA reference still see the stored object after later SET_VALUE.
|
|
12
|
+
*/
|
|
13
|
+
export declare const applyMultipleApiCallResponsesToFormData: (formData: Record<string, any>, fieldKey: string, responses: Record<string, any>, actionObject?: {
|
|
14
|
+
FORM_DATA?: Record<string, any>;
|
|
15
|
+
}) => Record<string, any>;
|
|
16
|
+
/**
|
|
17
|
+
* API-call buttons keep "" on the FormControl. When saving, prefer the
|
|
18
|
+
* object already stored on this.formData (keyed by each apiKey).
|
|
19
|
+
*/
|
|
20
|
+
export declare const resolveFormFieldValueForSave: (fieldType: string, controlValue: any, storedValue: any) => any;
|
|
21
|
+
/**
|
|
22
|
+
* SET_VALUE later in a multi-API chain can hold a stale FORM_DATA snapshot
|
|
23
|
+
* where the api-call field is still "". Do not let that wipe a stored object.
|
|
24
|
+
*/
|
|
25
|
+
export declare const syncFormDataPreservingApiObjects: (currentFormData: Record<string, any>, incomingFormData: Record<string, any>) => Record<string, any>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "kwikid-forms",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0",
|
|
4
4
|
"description": "KwikID's JSON Configuration based Forms Renderer and Builder",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Baiju Dodhia"
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
"axios": "^1.6.8",
|
|
29
29
|
"jsonpath": "^1.1.1",
|
|
30
30
|
"kwikid-camera": "0.0.24",
|
|
31
|
-
"kwikid-toolkit": "^0.2.
|
|
32
|
-
"kwikui": "^0.
|
|
31
|
+
"kwikid-toolkit": "^0.2.25",
|
|
32
|
+
"kwikui": "^1.0.0",
|
|
33
33
|
"lodash": "^4.17.21",
|
|
34
34
|
"tslib": "^2.2.0"
|
|
35
35
|
},
|