kwikid-forms 0.6.30 → 0.6.32
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 +223 -120
- package/bundles/kwikid-forms.umd.js.map +1 -1
- package/esm2015/lib/renderer/form-view/definitions/form-view.actions.definition.js +3 -1
- package/esm2015/lib/renderer/form-view/definitions/form-view.apis.definition.js +1 -1
- package/esm2015/lib/renderer/form-view/definitions/form-view.logs.definition.js +3 -1
- package/esm2015/lib/renderer/form-view/form-view.component.js +70 -4
- package/esm2015/lib/renderer/form-view/helpers/form-view.fields.helper.js +11 -2
- package/fesm2015/kwikid-forms.js +82 -3
- package/fesm2015/kwikid-forms.js.map +1 -1
- package/lib/renderer/form-view/definitions/form-view.actions.definition.d.ts +3 -1
- package/lib/renderer/form-view/definitions/form-view.apis.definition.d.ts +8 -0
- package/lib/renderer/form-view/definitions/form-view.logs.definition.d.ts +2 -0
- package/lib/renderer/form-view/form-view.component.d.ts +4 -1
- package/lib/renderer/form-view/helpers/form-view.fields.helper.d.ts +1 -0
- package/package.json +2 -2
|
@@ -8,6 +8,8 @@ export declare enum EActionKey {
|
|
|
8
8
|
SET_API_HEADER_VALIDITY = "SET_API_HEADER_VALIDITY",
|
|
9
9
|
SET_API_BODY_VALUE = "SET_API_BODY_VALUE",
|
|
10
10
|
SET_API_BODY_VALIDITY = "SET_API_BODY_VALIDITY",
|
|
11
|
+
FIELD_API_TIMER_MESSAGE_SHOW = "FIELD_API_TIMER_MESSAGE_SHOW",
|
|
12
|
+
FIELD_API_TIMER_MESSAGE_HIDE = "FIELD_API_TIMER_MESSAGE_HIDE",
|
|
11
13
|
SET_FIELD_VALIDITY = "SET_FIELD_VALIDITY",
|
|
12
14
|
FIELD_MESSAGE_SHOW = "FIELD_MESSAGE_SHOW",
|
|
13
15
|
FIELD_MESSAGES_HIDE = "FIELD_MESSAGES_HIDE",
|
|
@@ -46,7 +48,7 @@ export declare enum EActionKey {
|
|
|
46
48
|
ALERT_SHOW = "ALERT_SHOW",
|
|
47
49
|
SET_HTML = "SET_HTML"
|
|
48
50
|
}
|
|
49
|
-
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 | EActionKey.SET_HTML;
|
|
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;
|
|
50
52
|
export declare type TActionSetValue = TAction & {
|
|
51
53
|
key: EActionKey.SET_VALUE;
|
|
52
54
|
props: {
|
|
@@ -27,6 +27,13 @@ export declare type TApiRequestHeaders = TValidation & {
|
|
|
27
27
|
params: Array<any>;
|
|
28
28
|
validation: TValidation;
|
|
29
29
|
};
|
|
30
|
+
export declare type TApiTimer = {
|
|
31
|
+
maxTime: number;
|
|
32
|
+
messageWithTimerPlaceholder: string;
|
|
33
|
+
timerChangeType: string;
|
|
34
|
+
timeFormat: string;
|
|
35
|
+
timerStep: number;
|
|
36
|
+
};
|
|
30
37
|
export declare type TApiRequest = {
|
|
31
38
|
url: string | any;
|
|
32
39
|
method?: string;
|
|
@@ -67,6 +74,7 @@ export declare type TApi = {
|
|
|
67
74
|
entrypoint: TApiEntryPoint;
|
|
68
75
|
endpoints: Array<TApiEndpoint>;
|
|
69
76
|
status: TApiStatus;
|
|
77
|
+
timer?: TApiTimer;
|
|
70
78
|
};
|
|
71
79
|
export declare enum EApiRequestUrlType {
|
|
72
80
|
MOCK = "MOCK",
|
|
@@ -21,6 +21,8 @@ export declare enum ELogEventType {
|
|
|
21
21
|
FORM__DIALOG_ERROR = "FORM__DIALOG_ERROR",
|
|
22
22
|
FORM__DIALOG_HIDE = "FORM__DIALOG_HIDE",
|
|
23
23
|
FORM__DIALOG_SHOW = "FORM__DIALOG_SHOW",
|
|
24
|
+
FORM__FIELD_API_TIMER_MESSAGE_SHOW = "FORM__FIELD_API_TIMER_MESSAGE_SHOW",
|
|
25
|
+
FORM__FIELD_API_TIMER_MESSAGE_HIDE = "FORM__FIELD_API_TIMER_MESSAGE_HIDE",
|
|
24
26
|
FORM__FIELD_BUTTON_CLICK = "FORM__FIELD_BUTTON_CLICK",
|
|
25
27
|
FORM__FIELD_CAMERA_BUTTON_CLICK = "FORM__FIELD_CAMERA_BUTTON_CLICK",
|
|
26
28
|
FORM__FIELD_DISABLE = "FORM__FIELD_DISABLE",
|
|
@@ -6,7 +6,7 @@ import { TuiPushService } from "@taiga-ui/kit";
|
|
|
6
6
|
import { KwikIDCameraRecordService } from "kwikid-camera";
|
|
7
7
|
import { TAction } from "kwikid-toolkit";
|
|
8
8
|
import { KwikUILoaderService } from "kwikui";
|
|
9
|
-
import { TApi } from "./definitions/form-view.apis.definition";
|
|
9
|
+
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";
|
|
@@ -142,6 +142,7 @@ export declare class KwikIDFormViewComponent implements OnInit, AfterViewInit, O
|
|
|
142
142
|
handleOnClickGoBack(e: any, mode: TFormViewGoBackMode): void;
|
|
143
143
|
handleOnClickViewForms(e: any): void;
|
|
144
144
|
handleOnClickSaveForm(e: any): Promise<void>;
|
|
145
|
+
handleOnApiTimerStop(e: any): Promise<void>;
|
|
145
146
|
showErrorNotification: boolean;
|
|
146
147
|
toggleErrorNotification(show: boolean): void;
|
|
147
148
|
fieldHide(fieldKey: string): void;
|
|
@@ -158,6 +159,8 @@ export declare class KwikIDFormViewComponent implements OnInit, AfterViewInit, O
|
|
|
158
159
|
fieldErrorHide(fieldKey: string, message: TMessage): void;
|
|
159
160
|
fieldMessageShow(fieldKey: string, message: TMessage): void;
|
|
160
161
|
fieldMessageHide(fieldKey: string, message: TMessage): void;
|
|
162
|
+
fieldApiTimerMessageShow(fieldKey: string, timer: TApiTimer): Promise<void>;
|
|
163
|
+
fieldApiTimerMessageHide(fieldKey: string): Promise<void>;
|
|
161
164
|
setValue(action: TAction, object: any): Promise<void>;
|
|
162
165
|
setFieldDefaultValue(action: TAction, object: any): Promise<void>;
|
|
163
166
|
setApiStatus(action: TAction, object: any): Promise<void>;
|
|
@@ -16,6 +16,7 @@ export declare const removeFormFieldMessage: (field: any, message: {
|
|
|
16
16
|
type: string;
|
|
17
17
|
message: string;
|
|
18
18
|
}) => any;
|
|
19
|
+
export declare const setApiTimerMessage: (field: any, timer?: any) => any;
|
|
19
20
|
export declare function showFormFieldError(fields: any, errors: any, key: string, error: boolean): any;
|
|
20
21
|
export declare const convertFormFieldTypeDateToKwikUIFormat: (date: string) => TuiDay;
|
|
21
22
|
export declare const convertFormFieldTypeTimeToKwikUIFormat: (time: string) => TuiTime;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "kwikid-forms",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.32",
|
|
4
4
|
"description": "KwikID's JSON Configuration based Forms Renderer and Builder",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Baiju Dodhia"
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"jsonpath": "^1.1.1",
|
|
25
25
|
"kwikid-camera": "0.0.21",
|
|
26
26
|
"kwikid-toolkit": "^0.2.6",
|
|
27
|
-
"kwikui": "^0.3.
|
|
27
|
+
"kwikui": "^0.3.12",
|
|
28
28
|
"lodash": "^4.17.21",
|
|
29
29
|
"tslib": "^2.2.0"
|
|
30
30
|
},
|