kwikid-forms 0.3.7 → 0.3.9
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 +1182 -379
- package/bundles/kwikid-forms.umd.js.map +1 -1
- package/esm2015/lib/renderer/config-converter.helper.js +11 -32
- package/esm2015/lib/renderer/form-view/definitions/form-view.actions.definition.js +15 -2
- package/esm2015/lib/renderer/form-view/definitions/form-view.commons.definition.js +6 -1
- package/esm2015/lib/renderer/form-view/form-view.component.js +530 -136
- package/esm2015/lib/renderer/form-view/form-view.module.js +18 -4
- package/esm2015/lib/renderer/form-view/helpers/form-view.apis.helper.js +5 -1
- package/esm2015/lib/renderer/form-view/helpers/form-view.tasks.helper.js +28 -0
- package/esm2015/lib/renderer/form-view/pipes/safe-url.pipe.js +25 -0
- package/esm2015/lib/renderer/forms-list/forms-list.component.js +7 -1
- package/esm2015/lib/renderer/renderer.component.js +176 -14
- package/esm2015/lib/renderer/renderer.module.js +15 -2
- package/fesm2015/kwikid-forms.js +815 -185
- package/fesm2015/kwikid-forms.js.map +1 -1
- package/lib/renderer/form-view/definitions/form-view.actions.definition.d.ts +28 -2
- package/lib/renderer/form-view/definitions/form-view.commons.definition.d.ts +5 -0
- package/lib/renderer/form-view/form-view.component.d.ts +45 -7
- package/lib/renderer/form-view/form-view.module.d.ts +8 -6
- package/lib/renderer/form-view/helpers/form-view.tasks.helper.d.ts +7 -0
- package/lib/renderer/form-view/pipes/safe-url.pipe.d.ts +15 -0
- package/lib/renderer/renderer.component.d.ts +33 -4
- package/lib/renderer/renderer.module.d.ts +2 -1
- package/package.json +2 -2
|
@@ -20,9 +20,22 @@ export declare enum EActionKey {
|
|
|
20
20
|
FIELD_GROUP_DISABLE = "FIELD_GROUP_DISABLE",
|
|
21
21
|
SET_DROPDOWN_OPTIONS = "SET_DROPDOWN_OPTIONS",
|
|
22
22
|
API_CALL = "API_CALL",
|
|
23
|
-
|
|
23
|
+
API_CALL_MULTIPLE = "API_CALL_MULTIPLE",
|
|
24
|
+
API_CALL_MULTIPLE_END = "API_CALL_MULTIPLE_END",
|
|
25
|
+
TASK_API_CALL = "TASK_API_CALL",
|
|
26
|
+
TASK_API_CALL_MULTIPLE = "TASK_API_CALL_MULTIPLE",
|
|
27
|
+
TASK_API_CALL_MULTIPLE_END = "TASK_API_CALL_MULTIPLE_END",
|
|
28
|
+
PREVIEW_DIALOG_SHOW = "PREVIEW_DIALOG_SHOW",
|
|
29
|
+
POPUP_FORM_SHOW = "POPUP_FORM_SHOW",
|
|
30
|
+
MOVE_AHEAD = "MOVE_AHEAD",
|
|
31
|
+
NOTIFICATION_ERROR_SHOW = "NOTIFICATION_ERROR_SHOW",
|
|
32
|
+
NOTIFICATION_ERROR_HIDE = "NOTIFICATION_ERROR_HIDE",
|
|
33
|
+
DIALOG_SHOW = "DIALOG_SHOW",
|
|
34
|
+
DIALOG_HIDE = "DIALOG_HIDE",
|
|
35
|
+
RESUME_TASK_EXECUTION = "RESUME_TASK_EXECUTION",
|
|
36
|
+
STOP_TASK_EXECUTION = "STOP_TASK_EXECUTION"
|
|
24
37
|
}
|
|
25
|
-
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.
|
|
38
|
+
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.MOVE_AHEAD | EActionKey.NOTIFICATION_ERROR_SHOW | EActionKey.NOTIFICATION_ERROR_HIDE | EActionKey.DIALOG_SHOW | EActionKey.DIALOG_HIDE | EActionKey.RESUME_TASK_EXECUTION | EActionKey.STOP_TASK_EXECUTION;
|
|
26
39
|
export declare type TActionSetValue = TAction & {
|
|
27
40
|
key: EActionKey.SET_VALUE;
|
|
28
41
|
props: {
|
|
@@ -116,3 +129,16 @@ export declare type TActionApiCallsDone = TAction & {
|
|
|
116
129
|
fieldKey: string;
|
|
117
130
|
};
|
|
118
131
|
};
|
|
132
|
+
export declare type TActionPreviewDialogShow = TAction & {
|
|
133
|
+
key: EActionKey.PREVIEW_DIALOG_SHOW;
|
|
134
|
+
props: {
|
|
135
|
+
html?: {
|
|
136
|
+
before?: string;
|
|
137
|
+
after?: string;
|
|
138
|
+
};
|
|
139
|
+
iframe?: {
|
|
140
|
+
src: string;
|
|
141
|
+
title?: string;
|
|
142
|
+
};
|
|
143
|
+
};
|
|
144
|
+
};
|
|
@@ -9,3 +9,8 @@ export declare type TMessage = {
|
|
|
9
9
|
message: string;
|
|
10
10
|
type: TMessageType;
|
|
11
11
|
};
|
|
12
|
+
export declare enum EFormViewGoBackMode {
|
|
13
|
+
DIRECT = "DIRECT",
|
|
14
|
+
TABBED = "TABBED"
|
|
15
|
+
}
|
|
16
|
+
export declare type TFormViewGoBackMode = EFormViewGoBackMode.DIRECT | EFormViewGoBackMode.TABBED;
|
|
@@ -1,27 +1,40 @@
|
|
|
1
|
-
import { AfterViewInit, EventEmitter, OnInit, SimpleChanges } from "@angular/core";
|
|
1
|
+
import { AfterViewInit, ChangeDetectorRef, EventEmitter, OnInit, SimpleChanges, TemplateRef } from "@angular/core";
|
|
2
2
|
import { FormGroup } from "@angular/forms";
|
|
3
|
-
import {
|
|
3
|
+
import { TuiPreviewDialogService } from "@taiga-ui/addon-preview";
|
|
4
|
+
import { TuiAlertService, TuiDialogContext, TuiDialogService } from "@taiga-ui/core";
|
|
4
5
|
import { TuiPushService } from "@taiga-ui/kit";
|
|
5
6
|
import { TAction } from "kwikid-toolkit";
|
|
6
|
-
import { TMessage } from "./definitions/form-view.commons.definition";
|
|
7
|
+
import { TFormViewGoBackMode, TMessage } from "./definitions/form-view.commons.definition";
|
|
7
8
|
import { TFieldApiCall, TFieldTitle } from "./definitions/form-view.fields.definition";
|
|
8
9
|
import { KwikIDFormViewService } from "./form-view.service";
|
|
9
10
|
import * as i0 from "@angular/core";
|
|
10
11
|
export declare class KwikIDFormViewComponent implements OnInit, AfterViewInit {
|
|
12
|
+
private cd;
|
|
13
|
+
private formViewService;
|
|
11
14
|
protected readonly push: TuiPushService;
|
|
12
15
|
protected readonly alert: TuiAlertService;
|
|
13
|
-
private
|
|
16
|
+
private readonly previewDialogService;
|
|
17
|
+
private readonly dialogs;
|
|
18
|
+
readonly preview: TemplateRef<TuiDialogContext<void>>;
|
|
14
19
|
formConfig: any;
|
|
15
20
|
formData: any;
|
|
16
21
|
isMobileView: boolean;
|
|
17
22
|
allFormsData: any;
|
|
23
|
+
popupFormCallback: any;
|
|
24
|
+
onClickGoBack: EventEmitter<any>;
|
|
18
25
|
onClickViewForms: EventEmitter<any>;
|
|
19
26
|
onClickSaveForm: EventEmitter<any>;
|
|
20
27
|
onClickApiCall: EventEmitter<any>;
|
|
28
|
+
onActionShowPopupForm: EventEmitter<any>;
|
|
21
29
|
fieldGroups: any;
|
|
22
30
|
formFields: any[];
|
|
23
31
|
previousFormData: any;
|
|
32
|
+
previewProperties: any;
|
|
24
33
|
loading: boolean;
|
|
34
|
+
backButton: {
|
|
35
|
+
disabled: boolean;
|
|
36
|
+
showLoader: boolean;
|
|
37
|
+
};
|
|
25
38
|
viewFormsButton: {
|
|
26
39
|
disabled: boolean;
|
|
27
40
|
showLoader: boolean;
|
|
@@ -30,8 +43,13 @@ export declare class KwikIDFormViewComponent implements OnInit, AfterViewInit {
|
|
|
30
43
|
disabled: boolean;
|
|
31
44
|
showLoader: boolean;
|
|
32
45
|
};
|
|
46
|
+
stopTaskExecution: boolean;
|
|
47
|
+
waitingForChanges: boolean;
|
|
48
|
+
popupFormConfig: any;
|
|
49
|
+
popupFormData: any;
|
|
50
|
+
tasksData: any;
|
|
33
51
|
formGroup: FormGroup;
|
|
34
|
-
constructor(push: TuiPushService, alert: TuiAlertService,
|
|
52
|
+
constructor(cd: ChangeDetectorRef, formViewService: KwikIDFormViewService, push: TuiPushService, alert: TuiAlertService, previewDialogService: TuiPreviewDialogService, dialogs: TuiDialogService);
|
|
35
53
|
ngOnInit(): void;
|
|
36
54
|
ngAfterViewInit(): void;
|
|
37
55
|
ngOnChanges(changes: SimpleChanges): void;
|
|
@@ -46,10 +64,16 @@ export declare class KwikIDFormViewComponent implements OnInit, AfterViewInit {
|
|
|
46
64
|
handleConnectedElements(e: any, eventType: string): Promise<void>;
|
|
47
65
|
handleGetKeyValue(e: any): void;
|
|
48
66
|
handleOnClickResetFormFields(e: any, field: TFieldTitle): Promise<void>;
|
|
49
|
-
|
|
67
|
+
handleFieldApiCall(field: TFieldApiCall, api: any): Promise<{
|
|
50
68
|
field: TFieldApiCall;
|
|
51
69
|
api: any;
|
|
52
70
|
}>;
|
|
71
|
+
handleTaskApiCall(api: any): Promise<{
|
|
72
|
+
api: any;
|
|
73
|
+
}>;
|
|
74
|
+
handleApiCall(api: any, object: any): Promise<any>;
|
|
75
|
+
showApiLoader(): void;
|
|
76
|
+
hideApiLoader(): void;
|
|
53
77
|
handleOnClickApiCall(e: any): Promise<void>;
|
|
54
78
|
/**
|
|
55
79
|
* Method to optimize the DOM update by Angular for using *ngFor on large no. of items.
|
|
@@ -58,6 +82,7 @@ export declare class KwikIDFormViewComponent implements OnInit, AfterViewInit {
|
|
|
58
82
|
* @returns string
|
|
59
83
|
*/
|
|
60
84
|
getUniqueIdentifier(index: number, item: any): string;
|
|
85
|
+
handleOnClickGoBack(e: any, mode: TFormViewGoBackMode): void;
|
|
61
86
|
handleOnClickViewForms(e: any): void;
|
|
62
87
|
handleOnClickSaveForm(e: any): Promise<void>;
|
|
63
88
|
showErrorNotification: boolean;
|
|
@@ -75,13 +100,26 @@ export declare class KwikIDFormViewComponent implements OnInit, AfterViewInit {
|
|
|
75
100
|
fieldErrorHide(fieldKey: string, message: TMessage): void;
|
|
76
101
|
fieldMessageShow(fieldKey: string, message: TMessage): void;
|
|
77
102
|
fieldMessageHide(fieldKey: string, message: TMessage): void;
|
|
103
|
+
setValue(action: TAction, object: any): Promise<void>;
|
|
104
|
+
setFieldDefaultValue(action: TAction, object: any): Promise<void>;
|
|
105
|
+
setDropdownOptions(action: TAction, object: any): Promise<void>;
|
|
106
|
+
fieldMultipleApiCalls(action: TAction, object: any): Promise<void>;
|
|
107
|
+
fieldMultipleApiCallsEnd(action: TAction, object: any): Promise<void>;
|
|
108
|
+
taskApiCall(action: TAction, object: any): Promise<void>;
|
|
109
|
+
taskMultipleApiCalls(action: TAction, object: any): Promise<void>;
|
|
110
|
+
taskMultipleApiCallsEnd(action: TAction, object: any): Promise<void>;
|
|
111
|
+
dialogRef: any;
|
|
112
|
+
dialogShow(options: any): void;
|
|
113
|
+
dialogHide(): void;
|
|
78
114
|
patchFieldControlValue(key: string, value: any): void;
|
|
79
115
|
patchFormGroup(formData: any): void;
|
|
80
116
|
isFieldValid(fieldKey: string): boolean;
|
|
81
117
|
isFieldEnabled(fieldKey: string): boolean;
|
|
82
118
|
getFormGroupRawValues(): any;
|
|
119
|
+
showPreview(previewProperties: any): void;
|
|
120
|
+
showPopupForm(popupFormKey: string): void;
|
|
83
121
|
takeActionOnFieldGroup(action: TAction, object: any): Promise<void>;
|
|
84
122
|
takeAction(action: TAction, object: any): Promise<void>;
|
|
85
123
|
static ɵfac: i0.ɵɵFactoryDeclaration<KwikIDFormViewComponent, never>;
|
|
86
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<KwikIDFormViewComponent, "kwikid-form-view", never, { "formConfig": "formConfig"; "formData": "formData"; "isMobileView": "isMobileView"; "allFormsData": "allFormsData"; }, { "onClickViewForms": "onClickViewForms"; "onClickSaveForm": "onClickSaveForm"; "onClickApiCall": "onClickApiCall"; }, never, never>;
|
|
124
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<KwikIDFormViewComponent, "kwikid-form-view", never, { "formConfig": "formConfig"; "formData": "formData"; "isMobileView": "isMobileView"; "allFormsData": "allFormsData"; "popupFormCallback": "popupFormCallback"; }, { "onClickGoBack": "onClickGoBack"; "onClickViewForms": "onClickViewForms"; "onClickSaveForm": "onClickSaveForm"; "onClickApiCall": "onClickApiCall"; "onActionShowPopupForm": "onActionShowPopupForm"; }, never, never>;
|
|
87
125
|
}
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
2
|
import * as i1 from "./form-view.component";
|
|
3
3
|
import * as i2 from "./pipes/safe-html.pipe";
|
|
4
|
-
import * as i3 from "
|
|
5
|
-
import * as i4 from "@angular/
|
|
6
|
-
import * as i5 from "@
|
|
7
|
-
import * as i6 from "@taiga-ui/
|
|
8
|
-
import * as i7 from "
|
|
4
|
+
import * as i3 from "./pipes/safe-url.pipe";
|
|
5
|
+
import * as i4 from "@angular/common";
|
|
6
|
+
import * as i5 from "@angular/forms";
|
|
7
|
+
import * as i6 from "@taiga-ui/core";
|
|
8
|
+
import * as i7 from "@taiga-ui/kit";
|
|
9
|
+
import * as i8 from "@taiga-ui/addon-preview";
|
|
10
|
+
import * as i9 from "kwikui";
|
|
9
11
|
export declare class KwikIDFormViewModule {
|
|
10
12
|
static ɵfac: i0.ɵɵFactoryDeclaration<KwikIDFormViewModule, never>;
|
|
11
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<KwikIDFormViewModule, [typeof i1.KwikIDFormViewComponent, typeof i2.SafeHtmlPipe], [typeof
|
|
13
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<KwikIDFormViewModule, [typeof i1.KwikIDFormViewComponent, typeof i2.SafeHtmlPipe, typeof i3.SafeUrlPipe], [typeof i4.CommonModule, typeof i5.FormsModule, typeof i5.ReactiveFormsModule, typeof i6.TuiLabelModule, typeof i7.TuiPushModule, typeof i6.TuiSvgModule, typeof i8.TuiPreviewModule, typeof i6.TuiButtonModule, typeof i8.TuiPreviewActionModule, typeof i6.TuiDialogModule, typeof i9.KwikUIModule], [typeof i1.KwikIDFormViewComponent]>;
|
|
12
14
|
static ɵinj: i0.ɵɵInjectorDeclaration<KwikIDFormViewModule>;
|
|
13
15
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { PipeTransform } from "@angular/core";
|
|
2
|
+
import { DomSanitizer } from "@angular/platform-browser";
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
/**
|
|
5
|
+
* Generated class for the SafeUrlPipe pipe.
|
|
6
|
+
*
|
|
7
|
+
* See https://angular.io/api/core/Pipe for more info on Angular Pipes.
|
|
8
|
+
*/
|
|
9
|
+
export declare class SafeUrlPipe implements PipeTransform {
|
|
10
|
+
private sanitizer;
|
|
11
|
+
constructor(sanitizer: DomSanitizer);
|
|
12
|
+
transform(url: string): import("@angular/platform-browser").SafeResourceUrl;
|
|
13
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SafeUrlPipe, never>;
|
|
14
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<SafeUrlPipe, "safeUrl">;
|
|
15
|
+
}
|
|
@@ -1,12 +1,18 @@
|
|
|
1
|
-
import { ChangeDetectorRef, ElementRef, EventEmitter, OnChanges, OnInit, SimpleChanges } from "@angular/core";
|
|
1
|
+
import { ChangeDetectorRef, ElementRef, EventEmitter, OnChanges, OnInit, SimpleChanges, TemplateRef } from "@angular/core";
|
|
2
|
+
import { TuiPreviewDialogService } from "@taiga-ui/addon-preview";
|
|
3
|
+
import { TuiDialogContext } from "@taiga-ui/core";
|
|
2
4
|
import * as i0 from "@angular/core";
|
|
3
5
|
export declare class KwikIDFormsRendererComponent implements OnInit, OnChanges {
|
|
4
6
|
private hostElement;
|
|
5
7
|
private cdr;
|
|
8
|
+
private readonly previewDialogService;
|
|
6
9
|
windowResizeWatcher(): void;
|
|
10
|
+
readonly preview: TemplateRef<TuiDialogContext<void>>;
|
|
11
|
+
private previewDialogRef;
|
|
7
12
|
stepConfig: any;
|
|
8
13
|
userConfig: any;
|
|
9
14
|
formsData: any;
|
|
15
|
+
activeFormData: any;
|
|
10
16
|
apiCallResponse: any;
|
|
11
17
|
onClickSubmit: EventEmitter<any>;
|
|
12
18
|
getFormData: EventEmitter<any>;
|
|
@@ -15,16 +21,21 @@ export declare class KwikIDFormsRendererComponent implements OnInit, OnChanges {
|
|
|
15
21
|
loader: boolean;
|
|
16
22
|
showErrorNotification: boolean;
|
|
17
23
|
toggleErrorNotification(show: any): void;
|
|
24
|
+
activePopupFormData: any;
|
|
25
|
+
popupFormCallback: any;
|
|
18
26
|
activeFormConfig: any;
|
|
19
27
|
activeFormFields: any[];
|
|
20
28
|
allFormsData: any;
|
|
29
|
+
allFormsSubmitted: boolean;
|
|
21
30
|
formsList: any[];
|
|
22
31
|
formsListCompleted: string[];
|
|
23
32
|
isMobileView: boolean;
|
|
33
|
+
previewProperties: any;
|
|
34
|
+
popupFormConfig: any;
|
|
24
35
|
showForm: boolean;
|
|
25
36
|
showFormFields: boolean;
|
|
26
37
|
showFormSections: boolean;
|
|
27
|
-
constructor(hostElement: ElementRef, cdr: ChangeDetectorRef);
|
|
38
|
+
constructor(hostElement: ElementRef, cdr: ChangeDetectorRef, previewDialogService: TuiPreviewDialogService);
|
|
28
39
|
ngOnInit(): void;
|
|
29
40
|
ngOnChanges(changes: SimpleChanges): void;
|
|
30
41
|
fetchFormConfig(url: string): Promise<any>;
|
|
@@ -57,6 +68,7 @@ export declare class KwikIDFormsRendererComponent implements OnInit, OnChanges {
|
|
|
57
68
|
checkIfFormsStatusCompleted(formsList: any, formsListCompleted: string[]): any;
|
|
58
69
|
findActiveFormConfig(formsList: any[]): any;
|
|
59
70
|
updateFormsList(): Promise<void>;
|
|
71
|
+
showPreview(previewProperties: any): void;
|
|
60
72
|
formHide(formKey: string): void;
|
|
61
73
|
formShow(formKey: string): void;
|
|
62
74
|
takeAction(action: any, object: any): Promise<void>;
|
|
@@ -74,16 +86,33 @@ export declare class KwikIDFormsRendererComponent implements OnInit, OnChanges {
|
|
|
74
86
|
* @param e any
|
|
75
87
|
*/
|
|
76
88
|
handleOnClickApiCall(e: any): void;
|
|
89
|
+
handleOnActionShowPopupForm(e: any): void;
|
|
77
90
|
/**
|
|
78
91
|
* FormView - Listens to event of getting the Active Form's Data when the Form is Saved and emits (read as passes) the same event to the library consumer.
|
|
79
92
|
* @param e any
|
|
80
93
|
*/
|
|
81
|
-
handleOnClickSaveForm(e: any): void;
|
|
94
|
+
handleOnClickSaveForm(e: any, eventType: "FORM" | "POPUP_FORM"): void;
|
|
82
95
|
/**
|
|
83
96
|
* FormView - Listens to event of showing the Forms List in Mobile View.
|
|
84
97
|
* @param e any
|
|
85
98
|
*/
|
|
86
99
|
handleOnClickViewForms(e: any): void;
|
|
100
|
+
/**
|
|
101
|
+
* Handles the event of going back to the previous form directly or by tabbing, without showing the form list in mobile view.
|
|
102
|
+
*
|
|
103
|
+
* Prerequisite: The current form can never be locked; it should either be in an editable or completed state.
|
|
104
|
+
*
|
|
105
|
+
* Logic:
|
|
106
|
+
* 1. For DIRECT mode, find the config of the previous form starting from the first form, such that the previous form is editable and its sequence number is one less than the current active form's sequence number.
|
|
107
|
+
* If no previous form is found or all forms have been completed, show the form list.
|
|
108
|
+
* 2. For TABBED mode, find the config of the previous form in the list, such that the previous form's sequence number is less than the current active form's sequence number and the form is editable.
|
|
109
|
+
* If no previous form is found, show the form list.
|
|
110
|
+
*
|
|
111
|
+
* @param {Object} e - The event object containing the mode to go back in.
|
|
112
|
+
* @param {string} e.mode - The mode of going back: DIRECT or TABBED.
|
|
113
|
+
* @returns {void}
|
|
114
|
+
*/
|
|
115
|
+
handleOnClickGoBack(e: any): void;
|
|
87
116
|
/**
|
|
88
117
|
* FormList - Listens to event of submitting all the forms and moving out of the library and also handles the validation of all the forms.
|
|
89
118
|
* @param e any
|
|
@@ -94,5 +123,5 @@ export declare class KwikIDFormsRendererComponent implements OnInit, OnChanges {
|
|
|
94
123
|
*/
|
|
95
124
|
handleResize(formsList: any[]): void;
|
|
96
125
|
static ɵfac: i0.ɵɵFactoryDeclaration<KwikIDFormsRendererComponent, never>;
|
|
97
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<KwikIDFormsRendererComponent, "kwikid-forms-renderer", never, { "stepConfig": "stepConfig"; "userConfig": "userConfig"; "formsData": "formsData"; "apiCallResponse": "apiCallResponse"; }, { "onClickSubmit": "onClickSubmit"; "getFormData": "getFormData"; "onClickApiCall": "onClickApiCall"; }, never, never>;
|
|
126
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<KwikIDFormsRendererComponent, "kwikid-forms-renderer", never, { "stepConfig": "stepConfig"; "userConfig": "userConfig"; "formsData": "formsData"; "activeFormData": "activeFormData"; "apiCallResponse": "apiCallResponse"; }, { "onClickSubmit": "onClickSubmit"; "getFormData": "getFormData"; "onClickApiCall": "onClickApiCall"; }, never, never>;
|
|
98
127
|
}
|
|
@@ -7,8 +7,9 @@ import * as i5 from "./forms-list/forms-list.module";
|
|
|
7
7
|
import * as i6 from "kwikui";
|
|
8
8
|
import * as i7 from "@taiga-ui/core";
|
|
9
9
|
import * as i8 from "@taiga-ui/kit";
|
|
10
|
+
import * as i9 from "@taiga-ui/addon-preview";
|
|
10
11
|
export declare class KwikIDFormRendererModule {
|
|
11
12
|
static ɵfac: i0.ɵɵFactoryDeclaration<KwikIDFormRendererModule, never>;
|
|
12
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<KwikIDFormRendererModule, [typeof i1.KwikIDFormsRendererComponent], [typeof i2.CommonModule, typeof i3.HttpClientModule, typeof i4.KwikIDFormViewModule, typeof i5.KwikIDFormsListModule, typeof i6.KwikUIModule, typeof i7.TuiLoaderModule, typeof i8.TuiPushModule, typeof i7.TuiSvgModule], [typeof i1.KwikIDFormsRendererComponent]>;
|
|
13
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<KwikIDFormRendererModule, [typeof i1.KwikIDFormsRendererComponent], [typeof i2.CommonModule, typeof i3.HttpClientModule, typeof i4.KwikIDFormViewModule, typeof i5.KwikIDFormsListModule, typeof i6.KwikUIModule, typeof i7.TuiLoaderModule, typeof i8.TuiPushModule, typeof i9.TuiPreviewActionModule, typeof i9.TuiPreviewModule, typeof i7.TuiButtonModule, typeof i9.TuiPreviewActionModule, typeof i7.TuiSvgModule], [typeof i1.KwikIDFormsRendererComponent]>;
|
|
13
14
|
static ɵinj: i0.ɵɵInjectorDeclaration<KwikIDFormRendererModule>;
|
|
14
15
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "kwikid-forms",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.9",
|
|
4
4
|
"description": "Kwik.ID's JSON based Forms Builder and Renderer.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Baiju Dodhia"
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"jsonpath": "^1.1.1",
|
|
36
36
|
"kwikid-toolkit": "^0.1.1",
|
|
37
|
-
"kwikui": "^0.2.
|
|
37
|
+
"kwikui": "^0.2.25",
|
|
38
38
|
"lodash": "^4.17.21",
|
|
39
39
|
"tslib": "^2.2.0"
|
|
40
40
|
},
|