kwikid-forms 0.6.12 → 0.6.14
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 +1165 -679
- 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/definitions/from-view.logs.definition.js +5 -0
- package/esm2015/lib/renderer/form-view/form-view.component.js +170 -10
- 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/esm2015/lib/renderer/renderer.component.js +12 -3
- package/fesm2015/kwikid-forms.js +359 -62
- 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/definitions/from-view.logs.definition.d.ts +3 -0
- package/lib/renderer/form-view/form-view.component.d.ts +9 -2
- package/lib/renderer/form-view/helpers/form-view.defaults.helper.d.ts +1 -0
- package/lib/renderer/renderer.component.d.ts +3 -1
- 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 & {
|
|
@@ -33,6 +33,7 @@ export declare class KwikIDFormViewComponent implements OnInit, AfterViewInit {
|
|
|
33
33
|
getUnsavedDataState: EventEmitter<any>;
|
|
34
34
|
onClickSaveForm: EventEmitter<any>;
|
|
35
35
|
onClickApiCall: EventEmitter<any>;
|
|
36
|
+
getLogs: EventEmitter<any>;
|
|
36
37
|
onActionShowPopupForm: EventEmitter<any>;
|
|
37
38
|
onClickFormFieldButton: EventEmitter<any>;
|
|
38
39
|
fieldGroups: any;
|
|
@@ -110,7 +111,7 @@ export declare class KwikIDFormViewComponent implements OnInit, AfterViewInit {
|
|
|
110
111
|
api: any;
|
|
111
112
|
}>;
|
|
112
113
|
executeApiCall(api: any, object: any): Promise<any>;
|
|
113
|
-
isValidRequestHeadersAndBody(api:
|
|
114
|
+
isValidRequestHeadersAndBody(api: TApi): any;
|
|
114
115
|
showApiLoader(): void;
|
|
115
116
|
hideApiLoader(): void;
|
|
116
117
|
handleOnClickApiCall(e: any): Promise<void>;
|
|
@@ -141,6 +142,12 @@ export declare class KwikIDFormViewComponent implements OnInit, AfterViewInit {
|
|
|
141
142
|
fieldMessageHide(fieldKey: string, message: TMessage): void;
|
|
142
143
|
setValue(action: TAction, object: any): Promise<void>;
|
|
143
144
|
setFieldDefaultValue(action: TAction, object: any): Promise<void>;
|
|
145
|
+
setApiStatus(action: TAction, object: any): Promise<void>;
|
|
146
|
+
setApiHeaderValue(action: TAction, object: any): Promise<void>;
|
|
147
|
+
setApiHeaderValidity(action: TAction, object: any): Promise<void>;
|
|
148
|
+
setApiBodyValue(action: TAction, object: any): Promise<void>;
|
|
149
|
+
setApiBodyValidity(action: TAction, object: any): Promise<void>;
|
|
150
|
+
setFieldValidity(action: TAction, object: any): Promise<void>;
|
|
144
151
|
setDropdownOptions(action: TAction, object: any): Promise<void>;
|
|
145
152
|
apiCall(action: TAction, object: any): Promise<TApi>;
|
|
146
153
|
fieldApiCall(action: TAction, object: any): Promise<void>;
|
|
@@ -166,5 +173,5 @@ export declare class KwikIDFormViewComponent implements OnInit, AfterViewInit {
|
|
|
166
173
|
takeActionOnFieldGroup(action: TAction, object: any): Promise<void>;
|
|
167
174
|
takeAction(action: TAction, object: any): Promise<void>;
|
|
168
175
|
static ɵfac: i0.ɵɵFactoryDeclaration<KwikIDFormViewComponent, never>;
|
|
169
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<KwikIDFormViewComponent, "kwikid-form-view", never, { "formConfig": "formConfig"; "formData": "formData"; "isMobileView": "isMobileView"; "allFormsData": "allFormsData"; "userConfig": "userConfig"; "apiCallResponse": "apiCallResponse"; "buttonClickResponse": "buttonClickResponse"; "popupFormCallback": "popupFormCallback"; }, { "onClickGoBack": "onClickGoBack"; "onClickViewForms": "onClickViewForms"; "getUnsavedDataState": "getUnsavedDataState"; "onClickSaveForm": "onClickSaveForm"; "onClickApiCall": "onClickApiCall"; "onActionShowPopupForm": "onActionShowPopupForm"; "onClickFormFieldButton": "onClickFormFieldButton"; }, never, never>;
|
|
176
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<KwikIDFormViewComponent, "kwikid-form-view", never, { "formConfig": "formConfig"; "formData": "formData"; "isMobileView": "isMobileView"; "allFormsData": "allFormsData"; "userConfig": "userConfig"; "apiCallResponse": "apiCallResponse"; "buttonClickResponse": "buttonClickResponse"; "popupFormCallback": "popupFormCallback"; }, { "onClickGoBack": "onClickGoBack"; "onClickViewForms": "onClickViewForms"; "getUnsavedDataState": "getUnsavedDataState"; "onClickSaveForm": "onClickSaveForm"; "onClickApiCall": "onClickApiCall"; "getLogs": "getLogs"; "onActionShowPopupForm": "onActionShowPopupForm"; "onClickFormFieldButton": "onClickFormFieldButton"; }, never, never>;
|
|
170
177
|
}
|
|
@@ -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
|
}
|
|
@@ -21,6 +21,7 @@ export declare class KwikIDFormsRendererComponent implements OnInit, OnChanges {
|
|
|
21
21
|
onClickSubmit: EventEmitter<any>;
|
|
22
22
|
getFormData: EventEmitter<any>;
|
|
23
23
|
onClickApiCall: EventEmitter<any>;
|
|
24
|
+
getLogs: EventEmitter<any>;
|
|
24
25
|
onClickFormFieldButton: EventEmitter<any>;
|
|
25
26
|
loading: boolean;
|
|
26
27
|
showErrorNotification: boolean;
|
|
@@ -126,10 +127,11 @@ export declare class KwikIDFormsRendererComponent implements OnInit, OnChanges {
|
|
|
126
127
|
* @param e any
|
|
127
128
|
*/
|
|
128
129
|
handleOnClickSubmitForms(e: any): Promise<void>;
|
|
130
|
+
handleGetLogs(event: any): void;
|
|
129
131
|
/**
|
|
130
132
|
* Miscellaneous Methods
|
|
131
133
|
*/
|
|
132
134
|
handleResize(formsList: any[]): void;
|
|
133
135
|
static ɵfac: i0.ɵɵFactoryDeclaration<KwikIDFormsRendererComponent, never>;
|
|
134
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<KwikIDFormsRendererComponent, "kwikid-forms-renderer", never, { "stepConfig": "stepConfig"; "userConfig": "userConfig"; "formsData": "formsData"; "activeFormData": "activeFormData"; "apiCallResponse": "apiCallResponse"; "buttonClickResponse": "buttonClickResponse"; }, { "onClickSubmit": "onClickSubmit"; "getFormData": "getFormData"; "onClickApiCall": "onClickApiCall"; "onClickFormFieldButton": "onClickFormFieldButton"; }, never, never>;
|
|
136
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<KwikIDFormsRendererComponent, "kwikid-forms-renderer", never, { "stepConfig": "stepConfig"; "userConfig": "userConfig"; "formsData": "formsData"; "activeFormData": "activeFormData"; "apiCallResponse": "apiCallResponse"; "buttonClickResponse": "buttonClickResponse"; }, { "onClickSubmit": "onClickSubmit"; "getFormData": "getFormData"; "onClickApiCall": "onClickApiCall"; "getLogs": "getLogs"; "onClickFormFieldButton": "onClickFormFieldButton"; }, never, never>;
|
|
135
137
|
}
|