kwikid-forms 0.6.32 → 0.6.34
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 +1413 -769
- package/bundles/kwikid-forms.umd.js.map +1 -1
- package/esm2015/lib/renderer/config-converter/config-converter.constants.js +11 -1
- package/esm2015/lib/renderer/config-converter/config-converter.js +36 -1
- package/esm2015/lib/renderer/form-view/definitions/form-view.actions.definition.js +5 -1
- package/esm2015/lib/renderer/form-view/definitions/form-view.fields.definition.js +2 -1
- package/esm2015/lib/renderer/form-view/definitions/form-view.logs.definition.js +7 -2
- package/esm2015/lib/renderer/form-view/form-view.api.service.js +256 -0
- package/esm2015/lib/renderer/form-view/form-view.component.js +319 -64
- package/fesm2015/kwikid-forms.js +635 -74
- package/fesm2015/kwikid-forms.js.map +1 -1
- package/lib/renderer/config-converter/config-converter.constants.d.ts +10 -0
- package/lib/renderer/form-view/definitions/form-view.actions.definition.d.ts +5 -1
- package/lib/renderer/form-view/definitions/form-view.fields.definition.d.ts +17 -2
- package/lib/renderer/form-view/definitions/form-view.logs.definition.d.ts +6 -1
- package/lib/renderer/form-view/form-view.api.service.d.ts +11 -0
- package/lib/renderer/form-view/form-view.component.d.ts +9 -1
- package/package.json +3 -2
|
@@ -225,4 +225,14 @@ export declare const FIELD_PROPERTIES: {
|
|
|
225
225
|
placeholder: string;
|
|
226
226
|
size: string;
|
|
227
227
|
};
|
|
228
|
+
"live-location": {
|
|
229
|
+
isGetLocationFromLatLong: boolean;
|
|
230
|
+
isShowLatLongCaptureTimestamp: boolean;
|
|
231
|
+
color: string;
|
|
232
|
+
containerStyles: string;
|
|
233
|
+
placeholder: string;
|
|
234
|
+
size: string;
|
|
235
|
+
styles: string;
|
|
236
|
+
shape: string;
|
|
237
|
+
};
|
|
228
238
|
};
|
|
@@ -20,6 +20,10 @@ export declare enum EActionKey {
|
|
|
20
20
|
FIELD_ENABLE = "FIELD_ENABLE",
|
|
21
21
|
FIELD_DISABLE = "FIELD_DISABLE",
|
|
22
22
|
FIELD_RESET = "FIELD_RESET",
|
|
23
|
+
FIELD_GROUP_SHOW_API_LOADER = "FIELD_GROUP_SHOW_API_LOADER",
|
|
24
|
+
FIELD_GROUP_HIDE_API_LOADER = "FIELD_GROUP_HIDE_API_LOADER",
|
|
25
|
+
FIELD_SHOW_API_LOADER = "FIELD_SHOW_API_LOADER",
|
|
26
|
+
FIELD_HIDE_API_LOADER = "FIELD_HIDE_API_LOADER",
|
|
23
27
|
HANDLE_CONNECTED_ELEMENTS = "HANDLE_CONNECTED_ELEMENTS",
|
|
24
28
|
CUSTOM = "CUSTOM",
|
|
25
29
|
FIELD_GROUP_SHOW = "FIELD_GROUP_SHOW",
|
|
@@ -48,7 +52,7 @@ export declare enum EActionKey {
|
|
|
48
52
|
ALERT_SHOW = "ALERT_SHOW",
|
|
49
53
|
SET_HTML = "SET_HTML"
|
|
50
54
|
}
|
|
51
|
-
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.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;
|
|
55
|
+
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;
|
|
52
56
|
export declare type TActionSetValue = TAction & {
|
|
53
57
|
key: EActionKey.SET_VALUE;
|
|
54
58
|
props: {
|
|
@@ -29,9 +29,10 @@ export declare enum EFieldType {
|
|
|
29
29
|
EMAIL = "email",
|
|
30
30
|
CAPTURE = "capture",
|
|
31
31
|
RECORD = "record",
|
|
32
|
-
STAR_RATING = "star-rating"
|
|
32
|
+
STAR_RATING = "star-rating",
|
|
33
|
+
LIVE_LOCATION = "live-location"
|
|
33
34
|
}
|
|
34
|
-
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;
|
|
35
|
+
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;
|
|
35
36
|
export declare type TFieldSelectOption = {
|
|
36
37
|
title: string;
|
|
37
38
|
value: string;
|
|
@@ -234,6 +235,16 @@ export declare type TFieldStarRatingProperties = TFieldProperties & {
|
|
|
234
235
|
placeholder: string;
|
|
235
236
|
size: string;
|
|
236
237
|
};
|
|
238
|
+
export declare type TFieldLiveLocationProperties = TFieldProperties & {
|
|
239
|
+
isGetLocationFromLatLong: boolean;
|
|
240
|
+
isShowLatLongCaptureTimestamp: boolean;
|
|
241
|
+
color: string;
|
|
242
|
+
containerStyles: string;
|
|
243
|
+
placeholder: string;
|
|
244
|
+
size: string;
|
|
245
|
+
styles: string;
|
|
246
|
+
shape: string;
|
|
247
|
+
};
|
|
237
248
|
export declare type TField = {
|
|
238
249
|
label: string;
|
|
239
250
|
type: TFieldType;
|
|
@@ -294,6 +305,10 @@ export declare type TFieldApiCall = TField & {
|
|
|
294
305
|
api: TApi;
|
|
295
306
|
properties: TFieldApiCallProperties;
|
|
296
307
|
};
|
|
308
|
+
export declare type TFieldLiveLocation = TField & {
|
|
309
|
+
api: TApi;
|
|
310
|
+
properties: TFieldLiveLocationProperties;
|
|
311
|
+
};
|
|
297
312
|
export declare type TFieldOtp = TField & {
|
|
298
313
|
properties: TFieldOtpProperties;
|
|
299
314
|
};
|
|
@@ -7,10 +7,12 @@ export declare enum ELogEventType {
|
|
|
7
7
|
FORM__API_BUTTON_CLICK = "FORM__API_BUTTON_CLICK",
|
|
8
8
|
FORM__API_REQUEST = "FORM__API_REQUEST",
|
|
9
9
|
FORM__API_REQUEST_INVALID = "FORM__API_REQUEST_INVALID",
|
|
10
|
+
FORM__API_REQUEST_REVERSE_LAT_LONG = "FORM__API_REQUEST_REVERSE_LAT_LONG",
|
|
10
11
|
FORM__API_REQUEST_UPLOAD_FILE = "FORM__API_REQUEST_UPLOAD_FILE",
|
|
11
12
|
FORM__API_REQUEST_UPLOAD_IMAGE = "FORM__API_REQUEST_UPLOAD_IMAGE",
|
|
12
13
|
FORM__API_REQUEST_UPLOAD_VIDEO = "FORM__API_REQUEST_UPLOAD_VIDEO",
|
|
13
14
|
FORM__API_RESPONSE = "FORM__API_RESPONSE",
|
|
15
|
+
FORM__API_RESPONSE_REVERSE_LAT_LONG = "FORM__API_RESPONSE_REVERSE_LAT_LONG",
|
|
14
16
|
FORM__API_RESPONSE_UPLOAD_FILE = "FORM__API_RESPONSE_UPLOAD_FILE",
|
|
15
17
|
FORM__API_RESPONSE_UPLOAD_IMAGE = "FORM__API_RESPONSE_UPLOAD_IMAGE",
|
|
16
18
|
FORM__API_RESPONSE_UPLOAD_VIDEO = "FORM__API_RESPONSE_UPLOAD_VIDEO",
|
|
@@ -21,8 +23,8 @@ export declare enum ELogEventType {
|
|
|
21
23
|
FORM__DIALOG_ERROR = "FORM__DIALOG_ERROR",
|
|
22
24
|
FORM__DIALOG_HIDE = "FORM__DIALOG_HIDE",
|
|
23
25
|
FORM__DIALOG_SHOW = "FORM__DIALOG_SHOW",
|
|
24
|
-
FORM__FIELD_API_TIMER_MESSAGE_SHOW = "FORM__FIELD_API_TIMER_MESSAGE_SHOW",
|
|
25
26
|
FORM__FIELD_API_TIMER_MESSAGE_HIDE = "FORM__FIELD_API_TIMER_MESSAGE_HIDE",
|
|
27
|
+
FORM__FIELD_API_TIMER_MESSAGE_SHOW = "FORM__FIELD_API_TIMER_MESSAGE_SHOW",
|
|
26
28
|
FORM__FIELD_BUTTON_CLICK = "FORM__FIELD_BUTTON_CLICK",
|
|
27
29
|
FORM__FIELD_CAMERA_BUTTON_CLICK = "FORM__FIELD_CAMERA_BUTTON_CLICK",
|
|
28
30
|
FORM__FIELD_DISABLE = "FORM__FIELD_DISABLE",
|
|
@@ -38,6 +40,9 @@ export declare enum ELogEventType {
|
|
|
38
40
|
FORM__FIELD_RESET = "FORM__FIELD_RESET",
|
|
39
41
|
FORM__FIELD_RESET_BUTTON_CLICK = "FORM__FIELD_RESET_BUTTON_CLICK",
|
|
40
42
|
FORM__FIELD_SHOW = "FORM__FIELD_SHOW",
|
|
43
|
+
FORM__LIVE_LOCATION_BUTTON_CLICK = "FORM__LIVE_LOCATION_BUTTON_CLICK",
|
|
44
|
+
FORM__LIVE_LOCATION_PERMISSION_ERROR = "FORM__LIVE_LOCATION_PERMISSION_ERROR",
|
|
45
|
+
FORM__LIVE_LOCATION_PERMISSION_SUCCESS = "FORM__LIVE_LOCATION_PERMISSION_SUCCESS",
|
|
41
46
|
FORM__PREVIEW_ERROR = "FORM__PREVIEW_ERROR",
|
|
42
47
|
FORM__PREVIEW_HIDE = "FORM__PREVIEW_HIDE",
|
|
43
48
|
FORM__PREVIEW_SHOW = "FORM__PREVIEW_SHOW",
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Observable } from "rxjs";
|
|
2
|
+
export declare class KwikIDFormViewApiService {
|
|
3
|
+
private bytecode;
|
|
4
|
+
constructor();
|
|
5
|
+
dataDerivativeLogic(data: any): string;
|
|
6
|
+
preProcessHeader(headerData: any, isVerifySignature: boolean): any;
|
|
7
|
+
verifySignature(data: any, header: any, url: any, isVerifySignature: any): Promise<unknown>;
|
|
8
|
+
post(url: any, body: any, headerData: any, isEncrypt?: boolean, isDecrypt?: boolean, isVerifySignature?: boolean, isSkipHeaderAlteration?: boolean): Observable<unknown>;
|
|
9
|
+
get(url: any, headerData?: any, isDecrypt?: boolean, isVerifySignature?: boolean, isSkipHeaderAlteration?: boolean): Observable<unknown>;
|
|
10
|
+
executeApiCall(url: any, method: any, body: any, headers: any, isEncrypt: any, isDecrypt: any, isVerifySignature: any): Promise<unknown>;
|
|
11
|
+
}
|
|
@@ -10,11 +10,13 @@ import { TApi, TApiTimer } from "./definitions/form-view.apis.definition";
|
|
|
10
10
|
import { TFormViewGoBackMode, TMessage } from "./definitions/form-view.commons.definition";
|
|
11
11
|
import { TFieldApiCall, TFieldTitle } from "./definitions/form-view.fields.definition";
|
|
12
12
|
import { ELogEventType } from "./definitions/form-view.logs.definition";
|
|
13
|
+
import { KwikIDFormViewApiService } from "./form-view.api.service";
|
|
13
14
|
import { KwikIDFormViewService } from "./form-view.service";
|
|
14
15
|
import * as i0 from "@angular/core";
|
|
15
16
|
export declare class KwikIDFormViewComponent implements OnInit, AfterViewInit, OnChanges, OnDestroy {
|
|
16
17
|
private cd;
|
|
17
18
|
private formViewService;
|
|
19
|
+
private formViewApiService;
|
|
18
20
|
protected readonly push: TuiPushService;
|
|
19
21
|
protected readonly alertService: TuiAlertService;
|
|
20
22
|
private readonly previewDialogService;
|
|
@@ -81,7 +83,7 @@ export declare class KwikIDFormViewComponent implements OnInit, AfterViewInit, O
|
|
|
81
83
|
taskData: any;
|
|
82
84
|
previewDialogRef: any;
|
|
83
85
|
formGroup: FormGroup;
|
|
84
|
-
constructor(cd: ChangeDetectorRef, formViewService: KwikIDFormViewService, push: TuiPushService, alertService: TuiAlertService, previewDialogService: TuiPreviewDialogService, dialogService: TuiDialogService, loaderService: KwikUILoaderService, cameraRecordService: KwikIDCameraRecordService, ref: ChangeDetectorRef);
|
|
86
|
+
constructor(cd: ChangeDetectorRef, formViewService: KwikIDFormViewService, formViewApiService: KwikIDFormViewApiService, push: TuiPushService, alertService: TuiAlertService, previewDialogService: TuiPreviewDialogService, dialogService: TuiDialogService, loaderService: KwikUILoaderService, cameraRecordService: KwikIDCameraRecordService, ref: ChangeDetectorRef);
|
|
85
87
|
ngOnInit(): void;
|
|
86
88
|
ngAfterViewInit(): void;
|
|
87
89
|
ngOnChanges(changes: SimpleChanges): void;
|
|
@@ -118,6 +120,8 @@ export declare class KwikIDFormViewComponent implements OnInit, AfterViewInit, O
|
|
|
118
120
|
*/
|
|
119
121
|
uploadFile(field: any, file: any): Promise<void>;
|
|
120
122
|
handleOnClickFormFieldButton(field: any): void;
|
|
123
|
+
handleOnLocationPermission(e: any): void;
|
|
124
|
+
handleOnClickLiveLocation(e: any): Promise<void>;
|
|
121
125
|
handleGetKeyValue(e: any): void;
|
|
122
126
|
handleOnClickResetFormFields(e: any, field: TFieldTitle): Promise<void>;
|
|
123
127
|
handleFieldApiCall(field: TFieldApiCall, api: any): Promise<{
|
|
@@ -145,6 +149,8 @@ export declare class KwikIDFormViewComponent implements OnInit, AfterViewInit, O
|
|
|
145
149
|
handleOnApiTimerStop(e: any): Promise<void>;
|
|
146
150
|
showErrorNotification: boolean;
|
|
147
151
|
toggleErrorNotification(show: boolean): void;
|
|
152
|
+
showPermissionErrorNotification: boolean;
|
|
153
|
+
togglePermissionErrorNotification(show: boolean): void;
|
|
148
154
|
fieldHide(fieldKey: string): void;
|
|
149
155
|
fieldGroupHide(fieldGroup: string): void;
|
|
150
156
|
fieldShow(fieldKey: string): void;
|
|
@@ -154,6 +160,8 @@ export declare class KwikIDFormViewComponent implements OnInit, AfterViewInit, O
|
|
|
154
160
|
fieldEnable(fieldKey: string): void;
|
|
155
161
|
fieldGroupEnable(fieldGroup: string): void;
|
|
156
162
|
fieldReset(fieldKey: string): void;
|
|
163
|
+
fieldHideApiLoader(fieldKey: string): void;
|
|
164
|
+
fieldShowApiLoader(fieldKey: string): void;
|
|
157
165
|
setHtml(fieldKey: string, message: TMessage): void;
|
|
158
166
|
fieldErrorShow(fieldKey: string, message: TMessage): void;
|
|
159
167
|
fieldErrorHide(fieldKey: string, message: TMessage): void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "kwikid-forms",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.34",
|
|
4
4
|
"description": "KwikID's JSON Configuration based Forms Renderer and Builder",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Baiju Dodhia"
|
|
@@ -21,10 +21,11 @@
|
|
|
21
21
|
"@angular/core": ">=6.0.0"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
+
"axios": "^1.6.8",
|
|
24
25
|
"jsonpath": "^1.1.1",
|
|
25
26
|
"kwikid-camera": "0.0.21",
|
|
26
27
|
"kwikid-toolkit": "^0.2.6",
|
|
27
|
-
"kwikui": "^0.3.
|
|
28
|
+
"kwikui": "^0.3.13",
|
|
28
29
|
"lodash": "^4.17.21",
|
|
29
30
|
"tslib": "^2.2.0"
|
|
30
31
|
},
|