kwikid-forms 0.6.11 → 0.6.13
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 +816 -337
- package/bundles/kwikid-forms.umd.js.map +1 -1
- package/esm2015/lib/builder/builder-form-editor/builder-form-editor.component.js +2 -2
- package/esm2015/lib/builder/builder-form-editor/builder.form-editor.constants.js +6 -4
- package/esm2015/lib/builder/builder-form-list/builder-forms-list.component.js +1 -1
- package/esm2015/lib/builder/builder.component.js +1 -1
- package/esm2015/lib/renderer/config-converter/config-converter.constants.js +7 -3
- package/esm2015/lib/renderer/config-converter/config-converter.js +52 -48
- package/esm2015/lib/renderer/form-view/definitions/form-view.actions.definition.js +7 -1
- package/esm2015/lib/renderer/form-view/definitions/form-view.apis.definition.js +1 -1
- package/esm2015/lib/renderer/form-view/definitions/form-view.fields.definition.js +1 -1
- package/esm2015/lib/renderer/form-view/form-view.component.js +169 -9
- package/esm2015/lib/renderer/form-view/form-view.service.js +12 -2
- package/esm2015/lib/renderer/form-view/helpers/form-view.apis.helper.js +81 -7
- package/esm2015/lib/renderer/form-view/helpers/form-view.defaults.helper.js +31 -1
- package/fesm2015/kwikid-forms.js +357 -67
- package/fesm2015/kwikid-forms.js.map +1 -1
- package/lib/builder/builder-form-editor/builder.form-editor.constants.d.ts +8 -0
- package/lib/renderer/config-converter/config-converter.constants.d.ts +4 -0
- package/lib/renderer/form-view/definitions/form-view.actions.definition.d.ts +7 -1
- package/lib/renderer/form-view/definitions/form-view.apis.definition.d.ts +3 -3
- package/lib/renderer/form-view/definitions/form-view.fields.definition.d.ts +10 -0
- package/lib/renderer/form-view/form-view.component.d.ts +7 -1
- package/lib/renderer/form-view/helpers/form-view.defaults.helper.d.ts +1 -0
- package/package.json +1 -1
|
@@ -229,6 +229,8 @@ export declare const FIELD_PROPERTIES_CONFIG: {
|
|
|
229
229
|
icon: string;
|
|
230
230
|
showMediaFiles: boolean;
|
|
231
231
|
uploadFileToServer: boolean;
|
|
232
|
+
isCroppedImage: boolean;
|
|
233
|
+
isMaskedImage: boolean;
|
|
232
234
|
cameraConfig: {
|
|
233
235
|
header: {
|
|
234
236
|
title: string;
|
|
@@ -239,8 +241,10 @@ export declare const FIELD_PROPERTIES_CONFIG: {
|
|
|
239
241
|
footer: {
|
|
240
242
|
isUpload: boolean;
|
|
241
243
|
isFlip: boolean;
|
|
244
|
+
isSwitch: boolean;
|
|
242
245
|
};
|
|
243
246
|
others: {
|
|
247
|
+
isFrontCamera: boolean;
|
|
244
248
|
flipHorizontal: boolean;
|
|
245
249
|
mask: {
|
|
246
250
|
shape: string;
|
|
@@ -803,6 +807,8 @@ export declare const FIELD_CONFIG: {
|
|
|
803
807
|
icon: string;
|
|
804
808
|
showMediaFiles: boolean;
|
|
805
809
|
uploadFileToServer: boolean;
|
|
810
|
+
isCroppedImage: boolean;
|
|
811
|
+
isMaskedImage: boolean;
|
|
806
812
|
cameraConfig: {
|
|
807
813
|
header: {
|
|
808
814
|
title: string;
|
|
@@ -813,8 +819,10 @@ export declare const FIELD_CONFIG: {
|
|
|
813
819
|
footer: {
|
|
814
820
|
isUpload: boolean;
|
|
815
821
|
isFlip: boolean;
|
|
822
|
+
isSwitch: boolean;
|
|
816
823
|
};
|
|
817
824
|
others: {
|
|
825
|
+
isFrontCamera: boolean;
|
|
818
826
|
flipHorizontal: boolean;
|
|
819
827
|
mask: {
|
|
820
828
|
shape: string;
|
|
@@ -133,6 +133,8 @@ export declare const FIELD_PROPERTIES: {
|
|
|
133
133
|
icon: string;
|
|
134
134
|
showMediaFiles: boolean;
|
|
135
135
|
uploadFileToServer: boolean;
|
|
136
|
+
isCroppedImage: boolean;
|
|
137
|
+
isMaskedImage: boolean;
|
|
136
138
|
cameraConfig: {
|
|
137
139
|
header: {
|
|
138
140
|
title: string;
|
|
@@ -143,8 +145,10 @@ export declare const FIELD_PROPERTIES: {
|
|
|
143
145
|
footer: {
|
|
144
146
|
isUpload: boolean;
|
|
145
147
|
isFlip: boolean;
|
|
148
|
+
isSwitch: boolean;
|
|
146
149
|
};
|
|
147
150
|
others: {
|
|
151
|
+
isFrontCamera: boolean;
|
|
148
152
|
flipHorizontal: boolean;
|
|
149
153
|
mask: {
|
|
150
154
|
shape: string;
|
|
@@ -3,6 +3,12 @@ import { TMessage } from "./form-view.commons.definition";
|
|
|
3
3
|
export declare enum EActionKey {
|
|
4
4
|
SET_VALUE = "SET_VALUE",
|
|
5
5
|
SET_FIELD_DEFAULT_VALUE = "SET_FIELD_DEFAULT_VALUE",
|
|
6
|
+
SET_API_STATUS = "SET_API_STATUS",
|
|
7
|
+
SET_API_HEADER_VALUE = "SET_API_HEADER_VALUE",
|
|
8
|
+
SET_API_HEADER_VALIDITY = "SET_API_HEADER_VALIDITY",
|
|
9
|
+
SET_API_BODY_VALUE = "SET_API_BODY_VALUE",
|
|
10
|
+
SET_API_BODY_VALIDITY = "SET_API_BODY_VALIDITY",
|
|
11
|
+
SET_FIELD_VALIDITY = "SET_FIELD_VALIDITY",
|
|
6
12
|
FIELD_MESSAGE_SHOW = "FIELD_MESSAGE_SHOW",
|
|
7
13
|
FIELD_MESSAGES_HIDE = "FIELD_MESSAGES_HIDE",
|
|
8
14
|
FIELD_ERROR_SHOW = "FIELD_ERROR_SHOW",
|
|
@@ -39,7 +45,7 @@ export declare enum EActionKey {
|
|
|
39
45
|
SAVE_FORM = "SAVE_FORM",
|
|
40
46
|
ALERT_SHOW = "ALERT_SHOW"
|
|
41
47
|
}
|
|
42
|
-
export declare type TActionKey = EActionKey.SET_VALUE | EActionKey.SET_FIELD_DEFAULT_VALUE | 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;
|
|
48
|
+
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_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;
|
|
43
49
|
export declare type TActionSetValue = TAction & {
|
|
44
50
|
key: EActionKey.SET_VALUE;
|
|
45
51
|
props: {
|
|
@@ -12,7 +12,7 @@ export declare type TApiRequestBodyParam = {
|
|
|
12
12
|
sources: Array<TSource>;
|
|
13
13
|
value: any;
|
|
14
14
|
};
|
|
15
|
-
export declare type TApiRequestBody = {
|
|
15
|
+
export declare type TApiRequestBody = TValidation & {
|
|
16
16
|
value: any;
|
|
17
17
|
params: Array<TApiRequestBodyParam>;
|
|
18
18
|
validation: TValidation;
|
|
@@ -22,7 +22,7 @@ export declare type TApiRequestHeadersParam = {
|
|
|
22
22
|
sources: Array<TSource>;
|
|
23
23
|
value: any;
|
|
24
24
|
};
|
|
25
|
-
export declare type TApiRequestHeaders = {
|
|
25
|
+
export declare type TApiRequestHeaders = TValidation & {
|
|
26
26
|
value: any;
|
|
27
27
|
params: Array<any>;
|
|
28
28
|
validation: TValidation;
|
|
@@ -34,7 +34,7 @@ export declare type TApiRequest = {
|
|
|
34
34
|
body: TApiRequestBody;
|
|
35
35
|
};
|
|
36
36
|
export declare type TApiResponseBody = any;
|
|
37
|
-
export declare type TApiResponse = {
|
|
37
|
+
export declare type TApiResponse = TValidation & {
|
|
38
38
|
is_valid: boolean;
|
|
39
39
|
body: TApiResponseBody;
|
|
40
40
|
validation: TValidation;
|
|
@@ -48,9 +48,15 @@ export declare type TFieldDefaultDropdownOptions = {
|
|
|
48
48
|
rules: TRule[];
|
|
49
49
|
actions: TAction[];
|
|
50
50
|
};
|
|
51
|
+
export declare type TFieldDefaultApiValue = {
|
|
52
|
+
triggers: TTrigger[];
|
|
53
|
+
rules: TRule[];
|
|
54
|
+
actions: TAction[];
|
|
55
|
+
};
|
|
51
56
|
export declare type TFieldDefault = {
|
|
52
57
|
value: TFieldDefaultValue;
|
|
53
58
|
options: TFieldDefaultDropdownOptions;
|
|
59
|
+
api: TFieldDefaultApiValue;
|
|
54
60
|
};
|
|
55
61
|
export declare type TFieldProperties = {};
|
|
56
62
|
export declare type TFieldTextProperties = TFieldProperties & {
|
|
@@ -151,6 +157,8 @@ export declare type TFieldCaptureProperties = TFieldProperties & {
|
|
|
151
157
|
icon: string;
|
|
152
158
|
showMediaFiles: boolean;
|
|
153
159
|
uploadFileToServer: boolean;
|
|
160
|
+
isCroppedImage: boolean;
|
|
161
|
+
isMaskedImage: boolean;
|
|
154
162
|
cameraConfig: {
|
|
155
163
|
header: {
|
|
156
164
|
title: string;
|
|
@@ -161,8 +169,10 @@ export declare type TFieldCaptureProperties = TFieldProperties & {
|
|
|
161
169
|
footer: {
|
|
162
170
|
isUpload: boolean;
|
|
163
171
|
isFlip: boolean;
|
|
172
|
+
isSwitch: boolean;
|
|
164
173
|
};
|
|
165
174
|
others: {
|
|
175
|
+
isFrontCamera: boolean;
|
|
166
176
|
flipHorizontal: boolean;
|
|
167
177
|
mask: {
|
|
168
178
|
shape: string;
|
|
@@ -110,7 +110,7 @@ export declare class KwikIDFormViewComponent implements OnInit, AfterViewInit {
|
|
|
110
110
|
api: any;
|
|
111
111
|
}>;
|
|
112
112
|
executeApiCall(api: any, object: any): Promise<any>;
|
|
113
|
-
isValidRequestHeadersAndBody(api:
|
|
113
|
+
isValidRequestHeadersAndBody(api: TApi): any;
|
|
114
114
|
showApiLoader(): void;
|
|
115
115
|
hideApiLoader(): void;
|
|
116
116
|
handleOnClickApiCall(e: any): Promise<void>;
|
|
@@ -141,6 +141,12 @@ export declare class KwikIDFormViewComponent implements OnInit, AfterViewInit {
|
|
|
141
141
|
fieldMessageHide(fieldKey: string, message: TMessage): void;
|
|
142
142
|
setValue(action: TAction, object: any): Promise<void>;
|
|
143
143
|
setFieldDefaultValue(action: TAction, object: any): Promise<void>;
|
|
144
|
+
setApiStatus(action: TAction, object: any): Promise<void>;
|
|
145
|
+
setApiHeaderValue(action: TAction, object: any): Promise<void>;
|
|
146
|
+
setApiHeaderValidity(action: TAction, object: any): Promise<void>;
|
|
147
|
+
setApiBodyValue(action: TAction, object: any): Promise<void>;
|
|
148
|
+
setApiBodyValidity(action: TAction, object: any): Promise<void>;
|
|
149
|
+
setFieldValidity(action: TAction, object: any): Promise<void>;
|
|
144
150
|
setDropdownOptions(action: TAction, object: any): Promise<void>;
|
|
145
151
|
apiCall(action: TAction, object: any): Promise<TApi>;
|
|
146
152
|
fieldApiCall(action: TAction, object: any): Promise<void>;
|
|
@@ -8,5 +8,6 @@ export declare class Defaults {
|
|
|
8
8
|
private _takeAction;
|
|
9
9
|
constructor(field: TField, formFields: any[], allFormsData: any, formData: any, previousFormData: any, takeAction: Function);
|
|
10
10
|
getFormFieldValue(): Promise<any>;
|
|
11
|
+
getFormFieldApiValue(): Promise<void>;
|
|
11
12
|
getFormFieldOptions(): Promise<void>;
|
|
12
13
|
}
|