kwikid-forms 0.6.31 → 0.6.33

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.
@@ -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",
@@ -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
+ }
@@ -6,15 +6,17 @@ 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";
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;
@@ -142,6 +144,7 @@ export declare class KwikIDFormViewComponent implements OnInit, AfterViewInit, O
142
144
  handleOnClickGoBack(e: any, mode: TFormViewGoBackMode): void;
143
145
  handleOnClickViewForms(e: any): void;
144
146
  handleOnClickSaveForm(e: any): Promise<void>;
147
+ handleOnApiTimerStop(e: any): Promise<void>;
145
148
  showErrorNotification: boolean;
146
149
  toggleErrorNotification(show: boolean): void;
147
150
  fieldHide(fieldKey: string): void;
@@ -158,6 +161,8 @@ export declare class KwikIDFormViewComponent implements OnInit, AfterViewInit, O
158
161
  fieldErrorHide(fieldKey: string, message: TMessage): void;
159
162
  fieldMessageShow(fieldKey: string, message: TMessage): void;
160
163
  fieldMessageHide(fieldKey: string, message: TMessage): void;
164
+ fieldApiTimerMessageShow(fieldKey: string, timer: TApiTimer): Promise<void>;
165
+ fieldApiTimerMessageHide(fieldKey: string): Promise<void>;
161
166
  setValue(action: TAction, object: any): Promise<void>;
162
167
  setFieldDefaultValue(action: TAction, object: any): Promise<void>;
163
168
  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.31",
3
+ "version": "0.6.33",
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.8",
28
+ "kwikui": "^0.3.12",
28
29
  "lodash": "^4.17.21",
29
30
  "tslib": "^2.2.0"
30
31
  },