kwikid-forms 0.6.12 → 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 +786 -326
- package/bundles/kwikid-forms.umd.js.map +1 -1
- 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 +153 -6
- 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 +327 -56
- package/fesm2015/kwikid-forms.js.map +1 -1
- 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 +6 -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
|
@@ -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 & {
|
|
@@ -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
|
}
|