kwikid-forms 0.6.7 → 0.6.9
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 +353 -60
- package/bundles/kwikid-forms.umd.js.map +1 -1
- package/esm2015/lib/builder/builder-form-editor/builder.form-editor.constants.js +33 -5
- package/esm2015/lib/renderer/config-converter/config-converter.constants.js +33 -1
- package/esm2015/lib/renderer/config-converter/config-converter.js +17 -1
- package/esm2015/lib/renderer/form-view/definitions/form-view.fields.definition.js +2 -1
- package/esm2015/lib/renderer/form-view/form-view.component.js +196 -32
- package/esm2015/lib/renderer/form-view/form-view.module.js +8 -1
- package/esm2015/lib/renderer/form-view/helpers/form-view.fields.helper.js +37 -2
- package/esm2015/lib/renderer/renderer.component.js +2 -2
- package/fesm2015/kwikid-forms.js +315 -33
- 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 +32 -0
- package/lib/renderer/form-view/definitions/form-view.fields.definition.d.ts +38 -2
- package/lib/renderer/form-view/form-view.component.d.ts +16 -1
- package/lib/renderer/form-view/form-view.module.d.ts +2 -1
- package/lib/renderer/form-view/helpers/form-view.fields.helper.d.ts +1 -0
- package/package.json +3 -2
|
@@ -42,6 +42,7 @@ export declare const OPTIONS: {
|
|
|
42
42
|
loadingType: string[];
|
|
43
43
|
};
|
|
44
44
|
file: {};
|
|
45
|
+
capture: {};
|
|
45
46
|
};
|
|
46
47
|
validators: {
|
|
47
48
|
required: boolean[];
|
|
@@ -211,6 +212,48 @@ export declare const FIELD_PROPERTIES_CONFIG: {
|
|
|
211
212
|
placeholder: string;
|
|
212
213
|
};
|
|
213
214
|
file: {
|
|
215
|
+
accept: string;
|
|
216
|
+
containerStyles: string;
|
|
217
|
+
label: string;
|
|
218
|
+
link: string;
|
|
219
|
+
maxFileSize: number;
|
|
220
|
+
multiple: boolean;
|
|
221
|
+
size: string;
|
|
222
|
+
uploadFileToServer: boolean;
|
|
223
|
+
readOnly: boolean;
|
|
224
|
+
placeholder: string;
|
|
225
|
+
};
|
|
226
|
+
capture: {
|
|
227
|
+
containerStyles: string;
|
|
228
|
+
buttonText: string;
|
|
229
|
+
icon: string;
|
|
230
|
+
showMediaFiles: boolean;
|
|
231
|
+
uploadFileToServer: boolean;
|
|
232
|
+
cameraConfig: {
|
|
233
|
+
header: {
|
|
234
|
+
title: string;
|
|
235
|
+
isBack: boolean;
|
|
236
|
+
isExpand: boolean;
|
|
237
|
+
isClose: boolean;
|
|
238
|
+
};
|
|
239
|
+
footer: {
|
|
240
|
+
isUpload: boolean;
|
|
241
|
+
isFlip: boolean;
|
|
242
|
+
};
|
|
243
|
+
others: {
|
|
244
|
+
flipHorizontal: boolean;
|
|
245
|
+
mask: {
|
|
246
|
+
shape: string;
|
|
247
|
+
};
|
|
248
|
+
preview: {
|
|
249
|
+
show: boolean;
|
|
250
|
+
header: {
|
|
251
|
+
isBack: boolean;
|
|
252
|
+
isClose: boolean;
|
|
253
|
+
};
|
|
254
|
+
};
|
|
255
|
+
};
|
|
256
|
+
};
|
|
214
257
|
readOnly: boolean;
|
|
215
258
|
placeholder: string;
|
|
216
259
|
};
|
|
@@ -726,6 +769,65 @@ export declare const FIELD_CONFIG: {
|
|
|
726
769
|
file: {
|
|
727
770
|
type: string;
|
|
728
771
|
properties: {
|
|
772
|
+
accept: string;
|
|
773
|
+
containerStyles: string;
|
|
774
|
+
label: string;
|
|
775
|
+
link: string;
|
|
776
|
+
maxFileSize: number;
|
|
777
|
+
multiple: boolean;
|
|
778
|
+
size: string;
|
|
779
|
+
uploadFileToServer: boolean;
|
|
780
|
+
readOnly: boolean;
|
|
781
|
+
placeholder: string;
|
|
782
|
+
};
|
|
783
|
+
key: string;
|
|
784
|
+
label: string;
|
|
785
|
+
disabled: boolean;
|
|
786
|
+
validators: {
|
|
787
|
+
required: boolean;
|
|
788
|
+
minLength: number;
|
|
789
|
+
maxLength: number;
|
|
790
|
+
pattern: {
|
|
791
|
+
key: string;
|
|
792
|
+
pattern: string;
|
|
793
|
+
};
|
|
794
|
+
min: number;
|
|
795
|
+
max: number;
|
|
796
|
+
};
|
|
797
|
+
};
|
|
798
|
+
capture: {
|
|
799
|
+
type: string;
|
|
800
|
+
properties: {
|
|
801
|
+
containerStyles: string;
|
|
802
|
+
buttonText: string;
|
|
803
|
+
icon: string;
|
|
804
|
+
showMediaFiles: boolean;
|
|
805
|
+
uploadFileToServer: boolean;
|
|
806
|
+
cameraConfig: {
|
|
807
|
+
header: {
|
|
808
|
+
title: string;
|
|
809
|
+
isBack: boolean;
|
|
810
|
+
isExpand: boolean;
|
|
811
|
+
isClose: boolean;
|
|
812
|
+
};
|
|
813
|
+
footer: {
|
|
814
|
+
isUpload: boolean;
|
|
815
|
+
isFlip: boolean;
|
|
816
|
+
};
|
|
817
|
+
others: {
|
|
818
|
+
flipHorizontal: boolean;
|
|
819
|
+
mask: {
|
|
820
|
+
shape: string;
|
|
821
|
+
};
|
|
822
|
+
preview: {
|
|
823
|
+
show: boolean;
|
|
824
|
+
header: {
|
|
825
|
+
isBack: boolean;
|
|
826
|
+
isClose: boolean;
|
|
827
|
+
};
|
|
828
|
+
};
|
|
829
|
+
};
|
|
830
|
+
};
|
|
729
831
|
readOnly: boolean;
|
|
730
832
|
placeholder: string;
|
|
731
833
|
};
|
|
@@ -127,6 +127,38 @@ export declare const FIELD_PROPERTIES: {
|
|
|
127
127
|
size: string;
|
|
128
128
|
uploadFileToServer: boolean;
|
|
129
129
|
};
|
|
130
|
+
capture: {
|
|
131
|
+
containerStyles: string;
|
|
132
|
+
buttonText: string;
|
|
133
|
+
icon: string;
|
|
134
|
+
showMediaFiles: boolean;
|
|
135
|
+
uploadFileToServer: boolean;
|
|
136
|
+
cameraConfig: {
|
|
137
|
+
header: {
|
|
138
|
+
title: string;
|
|
139
|
+
isBack: boolean;
|
|
140
|
+
isExpand: boolean;
|
|
141
|
+
isClose: boolean;
|
|
142
|
+
};
|
|
143
|
+
footer: {
|
|
144
|
+
isUpload: boolean;
|
|
145
|
+
isFlip: boolean;
|
|
146
|
+
};
|
|
147
|
+
others: {
|
|
148
|
+
flipHorizontal: boolean;
|
|
149
|
+
mask: {
|
|
150
|
+
shape: string;
|
|
151
|
+
};
|
|
152
|
+
preview: {
|
|
153
|
+
show: boolean;
|
|
154
|
+
header: {
|
|
155
|
+
isBack: boolean;
|
|
156
|
+
isClose: boolean;
|
|
157
|
+
};
|
|
158
|
+
};
|
|
159
|
+
};
|
|
160
|
+
};
|
|
161
|
+
};
|
|
130
162
|
select: {
|
|
131
163
|
containerStyles: string;
|
|
132
164
|
searchable: boolean;
|
|
@@ -25,9 +25,10 @@ export declare enum EFieldType {
|
|
|
25
25
|
SLIDER = "slider",
|
|
26
26
|
FILE = "file",
|
|
27
27
|
PASSWORD = "password",
|
|
28
|
-
EMAIL = "email"
|
|
28
|
+
EMAIL = "email",
|
|
29
|
+
CAPTURE = "capture"
|
|
29
30
|
}
|
|
30
|
-
export declare type TFieldType = EFieldType.HTML | EFieldType.TITLE | EFieldType.BUTTON | EFieldType.TEXT | EFieldType.TEXTAREA | EFieldType.CHECKBOX | EFieldType.NUMBER | EFieldType.DATE | 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;
|
|
31
|
+
export declare type TFieldType = EFieldType.HTML | EFieldType.TITLE | EFieldType.BUTTON | EFieldType.TEXT | EFieldType.TEXTAREA | EFieldType.CHECKBOX | EFieldType.NUMBER | EFieldType.DATE | 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;
|
|
31
32
|
export declare type TFieldSelectOption = {
|
|
32
33
|
title: string;
|
|
33
34
|
value: string;
|
|
@@ -143,6 +144,38 @@ export declare type TFieldAadhaarNumberProperties = TFieldProperties & {
|
|
|
143
144
|
mask: string;
|
|
144
145
|
readOnly: string;
|
|
145
146
|
};
|
|
147
|
+
export declare type TFieldCaptureProperties = TFieldProperties & {
|
|
148
|
+
containerStyles: string;
|
|
149
|
+
buttonText: string;
|
|
150
|
+
icon: string;
|
|
151
|
+
showMediaFiles: boolean;
|
|
152
|
+
uploadFileToServer: boolean;
|
|
153
|
+
cameraConfig: {
|
|
154
|
+
header: {
|
|
155
|
+
title: string;
|
|
156
|
+
isBack: boolean;
|
|
157
|
+
isExpand: boolean;
|
|
158
|
+
isClose: boolean;
|
|
159
|
+
};
|
|
160
|
+
footer: {
|
|
161
|
+
isUpload: boolean;
|
|
162
|
+
isFlip: boolean;
|
|
163
|
+
};
|
|
164
|
+
others: {
|
|
165
|
+
flipHorizontal: boolean;
|
|
166
|
+
mask: {
|
|
167
|
+
shape: string;
|
|
168
|
+
};
|
|
169
|
+
preview: {
|
|
170
|
+
show: boolean;
|
|
171
|
+
header: {
|
|
172
|
+
isBack: boolean;
|
|
173
|
+
isClose: boolean;
|
|
174
|
+
};
|
|
175
|
+
};
|
|
176
|
+
};
|
|
177
|
+
};
|
|
178
|
+
};
|
|
146
179
|
export declare type TField = {
|
|
147
180
|
label: string;
|
|
148
181
|
type: TFieldType;
|
|
@@ -210,3 +243,6 @@ export declare type TFieldAadhaarNumber = TField & {
|
|
|
210
243
|
export declare type TFieldPreviewImage = TField & {
|
|
211
244
|
properties: TFieldPreviewImageProperties;
|
|
212
245
|
};
|
|
246
|
+
export declare type TFieldCapture = TField & {
|
|
247
|
+
properties: TFieldCaptureProperties;
|
|
248
|
+
};
|
|
@@ -38,6 +38,12 @@ export declare class KwikIDFormViewComponent implements OnInit, AfterViewInit {
|
|
|
38
38
|
fieldGroups: any;
|
|
39
39
|
formFields: any[];
|
|
40
40
|
previousFormData: any;
|
|
41
|
+
readonly DEFAULT_CAMERA_CAPTURE_CONFIG: any;
|
|
42
|
+
isShowCameraCapture: boolean;
|
|
43
|
+
isShowCameraFullscreen: boolean;
|
|
44
|
+
cameraCaptureFieldKey: string;
|
|
45
|
+
cameraCaptureImage: string;
|
|
46
|
+
cameraCaptureConfig: any;
|
|
41
47
|
previewProperties: any;
|
|
42
48
|
loading: boolean;
|
|
43
49
|
apiLoading: boolean;
|
|
@@ -54,6 +60,7 @@ export declare class KwikIDFormViewComponent implements OnInit, AfterViewInit {
|
|
|
54
60
|
showLoader: boolean;
|
|
55
61
|
};
|
|
56
62
|
files: any;
|
|
63
|
+
mediaFiles: any;
|
|
57
64
|
stopTaskExecution: boolean;
|
|
58
65
|
waitingForChanges: boolean;
|
|
59
66
|
popupFormConfig: any;
|
|
@@ -76,6 +83,14 @@ export declare class KwikIDFormViewComponent implements OnInit, AfterViewInit {
|
|
|
76
83
|
handleConnectedElements(e: any, eventType: string): Promise<void>;
|
|
77
84
|
handleRemovedFile(e: any): void;
|
|
78
85
|
handleGetKeyValueFile(e: any): Promise<void>;
|
|
86
|
+
/** Methods for Camera related fields like 'CAPTURE' */
|
|
87
|
+
handleOnClickGetRemovedMediaFile(e: any): void;
|
|
88
|
+
handleOnClickInputCamera(e: any, field: any): void;
|
|
89
|
+
/** KwikID Camera Methods */
|
|
90
|
+
setImage(image: string): Promise<void>;
|
|
91
|
+
handleOnClickSaveCameraCapture(e: any): void;
|
|
92
|
+
handleGetImage(e: any): void;
|
|
93
|
+
handleOnClickCloseCamera(e: any): void;
|
|
79
94
|
/**
|
|
80
95
|
* This method is used to update the files array with the new file and it's state and response from the api of uploading the file.
|
|
81
96
|
*/
|
|
@@ -83,7 +98,7 @@ export declare class KwikIDFormViewComponent implements OnInit, AfterViewInit {
|
|
|
83
98
|
/**
|
|
84
99
|
* This is a api upload mocking method. Set's to loading at first at point when API is called and then changes the status to random status after 2 seconds of delay showing a mocked response from API.
|
|
85
100
|
*/
|
|
86
|
-
uploadFile(
|
|
101
|
+
uploadFile(field: any, file: any): Promise<void>;
|
|
87
102
|
handleOnClickFormFieldButton(field: any): void;
|
|
88
103
|
handleGetKeyValue(e: any): void;
|
|
89
104
|
handleOnClickResetFormFields(e: any, field: TFieldTitle): Promise<void>;
|
|
@@ -7,8 +7,9 @@ import * as i5 from "@taiga-ui/core";
|
|
|
7
7
|
import * as i6 from "@taiga-ui/kit";
|
|
8
8
|
import * as i7 from "@taiga-ui/addon-preview";
|
|
9
9
|
import * as i8 from "kwikui";
|
|
10
|
+
import * as i9 from "kwikid-camera";
|
|
10
11
|
export declare class KwikIDFormViewModule {
|
|
11
12
|
static ɵfac: i0.ɵɵFactoryDeclaration<KwikIDFormViewModule, never>;
|
|
12
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<KwikIDFormViewModule, [typeof i1.KwikIDFormViewComponent, typeof i2.StyleSanitizerPipe], [typeof i3.CommonModule, typeof i4.FormsModule, typeof i4.ReactiveFormsModule, typeof i5.TuiLabelModule, typeof i6.TuiPushModule, typeof i5.TuiSvgModule, typeof i7.TuiPreviewModule, typeof i5.TuiButtonModule, typeof i7.TuiPreviewActionModule, typeof i5.TuiDialogModule, typeof i8.KwikUIPipeModule, typeof i8.KwikUIModule, typeof i8.KwikUIInputEmailModule], [typeof i1.KwikIDFormViewComponent]>;
|
|
13
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<KwikIDFormViewModule, [typeof i1.KwikIDFormViewComponent, typeof i2.StyleSanitizerPipe], [typeof i3.CommonModule, typeof i4.FormsModule, typeof i4.ReactiveFormsModule, typeof i5.TuiLabelModule, typeof i6.TuiPushModule, typeof i5.TuiSvgModule, typeof i7.TuiPreviewModule, typeof i5.TuiButtonModule, typeof i7.TuiPreviewActionModule, typeof i5.TuiDialogModule, typeof i8.KwikUIPipeModule, typeof i8.KwikUIModule, typeof i9.KwikIDCameraModule, typeof i9.KwikUIInputCameraModule, typeof i8.KwikUIInputEmailModule], [typeof i1.KwikIDFormViewComponent]>;
|
|
13
14
|
static ɵinj: i0.ɵɵInjectorDeclaration<KwikIDFormViewModule>;
|
|
14
15
|
}
|
|
@@ -7,6 +7,7 @@ export declare const appendFormFieldMessage: (field: any, message: {
|
|
|
7
7
|
type: string;
|
|
8
8
|
message: string;
|
|
9
9
|
}) => any;
|
|
10
|
+
export declare const filterDuplicatesMediaFiles: (array: string[]) => string[];
|
|
10
11
|
export declare const filterDuplicatesFiles: (array: any[]) => any[];
|
|
11
12
|
export declare const removeFormFieldMessage: (field: any, message: {
|
|
12
13
|
type: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "kwikid-forms",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.9",
|
|
4
4
|
"description": "KwikID's JSON Configuration based Forms Renderer and Builder",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Baiju Dodhia"
|
|
@@ -22,9 +22,10 @@
|
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"jsonpath": "^1.1.1",
|
|
25
|
+
"lodash": "^4.17.21",
|
|
25
26
|
"kwikid-toolkit": "^0.1.6",
|
|
27
|
+
"kwikid-camera": "0.0.8",
|
|
26
28
|
"kwikui": "^0.3.3",
|
|
27
|
-
"lodash": "^4.17.21",
|
|
28
29
|
"tslib": "^2.2.0"
|
|
29
30
|
},
|
|
30
31
|
"main": "bundles/kwikid-forms.umd.js",
|