kwikid-forms 0.6.41 → 0.6.43
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 +648 -272
- package/bundles/kwikid-forms.umd.js.map +1 -1
- package/esm2015/lib/renderer/config-converter/config-converter.js +38 -36
- package/esm2015/lib/renderer/form-view/definitions/form-view.actions.definition.js +3 -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 +177 -49
- package/esm2015/lib/renderer/form-view/form-view.service.js +3 -3
- package/esm2015/lib/renderer/form-view/helpers/form-view.apis.helper.js +5 -5
- package/esm2015/lib/renderer/form-view/helpers/form-view.camera.helper.js +5 -3
- package/esm2015/lib/renderer/form-view/helpers/form-view.defaults.helper.js +79 -30
- package/esm2015/lib/renderer/form-view/helpers/form-view.fields.helper.js +9 -4
- package/esm2015/lib/renderer/renderer.component.js +16 -6
- package/fesm2015/kwikid-forms.js +324 -126
- package/fesm2015/kwikid-forms.js.map +1 -1
- package/lib/renderer/form-view/definitions/form-view.actions.definition.d.ts +2 -0
- package/lib/renderer/form-view/definitions/form-view.fields.definition.d.ts +7 -3
- package/lib/renderer/form-view/form-view.component.d.ts +13 -7
- package/lib/renderer/form-view/form-view.service.d.ts +1 -1
- package/lib/renderer/form-view/helpers/form-view.camera.helper.d.ts +2 -1
- package/lib/renderer/form-view/helpers/form-view.defaults.helper.d.ts +2 -1
- package/lib/renderer/renderer.component.d.ts +2 -1
- package/package.json +1 -1
|
@@ -26,10 +26,12 @@ export declare enum EActionKey {
|
|
|
26
26
|
FIELD_HIDE_API_LOADER = "FIELD_HIDE_API_LOADER",
|
|
27
27
|
HANDLE_CONNECTED_ELEMENTS = "HANDLE_CONNECTED_ELEMENTS",
|
|
28
28
|
CUSTOM = "CUSTOM",
|
|
29
|
+
SCROLL_TO_FIELD = "SCROLL_TO_FIELD",
|
|
29
30
|
FIELD_GROUP_SHOW = "FIELD_GROUP_SHOW",
|
|
30
31
|
FIELD_GROUP_HIDE = "FIELD_GROUP_HIDE",
|
|
31
32
|
FIELD_GROUP_ENABLE = "FIELD_GROUP_ENABLE",
|
|
32
33
|
FIELD_GROUP_DISABLE = "FIELD_GROUP_DISABLE",
|
|
34
|
+
FIELD_GROUP_RESET = "FIELD_GROUP_RESET",
|
|
33
35
|
SET_DROPDOWN_OPTIONS = "SET_DROPDOWN_OPTIONS",
|
|
34
36
|
API_CALL = "API_CALL",
|
|
35
37
|
API_CALL_MULTIPLE = "API_CALL_MULTIPLE",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TAction, TRule, TSource
|
|
1
|
+
import { TAction, TEngine, TRule, TSource } from "kwikid-toolkit";
|
|
2
2
|
import { TApi } from "./form-view.apis.definition";
|
|
3
3
|
import { TMessage } from "./form-view.commons.definition";
|
|
4
4
|
import { TValidator } from "./form-view.form-validations.definition";
|
|
@@ -43,9 +43,9 @@ export declare type TFieldRadioOption = {
|
|
|
43
43
|
disabled: boolean;
|
|
44
44
|
};
|
|
45
45
|
export declare type TFieldDefaultValue = {
|
|
46
|
-
is_found: boolean;
|
|
47
46
|
value: any;
|
|
48
|
-
|
|
47
|
+
source?: TEngine;
|
|
48
|
+
sources?: Array<TSource>;
|
|
49
49
|
};
|
|
50
50
|
export declare type TFieldDefaultDropdownOptions = {
|
|
51
51
|
triggers: TTrigger[];
|
|
@@ -274,6 +274,10 @@ export declare type TFieldTitle = {
|
|
|
274
274
|
fieldKey: string;
|
|
275
275
|
actions: Array<TAction>;
|
|
276
276
|
}>;
|
|
277
|
+
fieldGroups: Array<{
|
|
278
|
+
groupKey: string;
|
|
279
|
+
actions: Array<TAction>;
|
|
280
|
+
}>;
|
|
277
281
|
};
|
|
278
282
|
properties?: {
|
|
279
283
|
bypassResetConfirmation?: boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ChangeDetectorRef, ElementRef, EventEmitter, OnChanges, OnDestroy, OnInit, QueryList, Renderer2, SimpleChanges, TemplateRef } from "@angular/core";
|
|
2
2
|
import { FormGroup } from "@angular/forms";
|
|
3
3
|
import { TuiPreviewDialogService } from "@taiga-ui/addon-preview";
|
|
4
4
|
import { TuiAlertService, TuiDialogContext, TuiDialogService, TuiNotification } from "@taiga-ui/core";
|
|
@@ -13,20 +13,24 @@ import { ELogEventType } from "./definitions/form-view.logs.definition";
|
|
|
13
13
|
import { KwikIDFormViewApiService } from "./form-view.api.service";
|
|
14
14
|
import { KwikIDFormViewService } from "./form-view.service";
|
|
15
15
|
import * as i0 from "@angular/core";
|
|
16
|
-
export declare class KwikIDFormViewComponent implements OnInit,
|
|
17
|
-
private
|
|
16
|
+
export declare class KwikIDFormViewComponent implements OnInit, OnChanges, OnDestroy {
|
|
17
|
+
private cdRef;
|
|
18
18
|
private formViewService;
|
|
19
19
|
private formViewApiService;
|
|
20
|
-
protected readonly
|
|
20
|
+
protected readonly pushService: TuiPushService;
|
|
21
21
|
protected readonly alertService: TuiAlertService;
|
|
22
22
|
private readonly previewDialogService;
|
|
23
23
|
private readonly dialogService;
|
|
24
24
|
loaderService: KwikUILoaderService;
|
|
25
25
|
private cameraRecordService;
|
|
26
26
|
private ref;
|
|
27
|
+
private renderer;
|
|
28
|
+
formFieldContainerRef: ElementRef;
|
|
29
|
+
formFieldsRef: QueryList<ElementRef>;
|
|
27
30
|
readonly dialog: TemplateRef<TuiDialogContext<void>>;
|
|
28
31
|
readonly preview: TemplateRef<TuiDialogContext<void>>;
|
|
29
32
|
allFormsData: any;
|
|
33
|
+
extraData: any;
|
|
30
34
|
apiCallResponse: any;
|
|
31
35
|
buttonClickResponse: any;
|
|
32
36
|
formConfig: any;
|
|
@@ -84,9 +88,8 @@ export declare class KwikIDFormViewComponent implements OnInit, AfterViewInit, O
|
|
|
84
88
|
taskData: any;
|
|
85
89
|
previewDialogRef: any;
|
|
86
90
|
formGroup: FormGroup;
|
|
87
|
-
constructor(
|
|
91
|
+
constructor(cdRef: ChangeDetectorRef, formViewService: KwikIDFormViewService, formViewApiService: KwikIDFormViewApiService, pushService: TuiPushService, alertService: TuiAlertService, previewDialogService: TuiPreviewDialogService, dialogService: TuiDialogService, loaderService: KwikUILoaderService, cameraRecordService: KwikIDCameraRecordService, ref: ChangeDetectorRef, renderer: Renderer2);
|
|
88
92
|
ngOnInit(): void;
|
|
89
|
-
ngAfterViewInit(): void;
|
|
90
93
|
ngOnChanges(changes: SimpleChanges): void;
|
|
91
94
|
ngOnDestroy(): void;
|
|
92
95
|
triggerLogs(eventType: ELogEventType, logs: any): void;
|
|
@@ -125,6 +128,7 @@ export declare class KwikIDFormViewComponent implements OnInit, AfterViewInit, O
|
|
|
125
128
|
handleOnLocationPermission(e: any): void;
|
|
126
129
|
handleOnClickLiveLocation(e: any): Promise<void>;
|
|
127
130
|
handleGetKeyValue(e: any): void;
|
|
131
|
+
handleOnClickResetFormFields2(e: any, field: TFieldTitle): Promise<void>;
|
|
128
132
|
handleOnClickResetFormFields(e: any, field: TFieldTitle): Promise<void>;
|
|
129
133
|
handleFieldApiCall(field: TFieldApiCall, api: any): Promise<{
|
|
130
134
|
field: TFieldApiCall;
|
|
@@ -149,6 +153,7 @@ export declare class KwikIDFormViewComponent implements OnInit, AfterViewInit, O
|
|
|
149
153
|
handleOnClickViewForms(e: any): void;
|
|
150
154
|
handleOnClickSaveForm(e: any): Promise<void>;
|
|
151
155
|
handleOnApiTimerStop(e: any): Promise<void>;
|
|
156
|
+
handleOnScrollToField(fieldKey: string): void;
|
|
152
157
|
showErrorNotification: boolean;
|
|
153
158
|
toggleErrorNotification(show: boolean): void;
|
|
154
159
|
showPermissionErrorNotification: boolean;
|
|
@@ -162,6 +167,7 @@ export declare class KwikIDFormViewComponent implements OnInit, AfterViewInit, O
|
|
|
162
167
|
fieldEnable(fieldKey: string): void;
|
|
163
168
|
fieldGroupEnable(fieldGroup: string): void;
|
|
164
169
|
fieldReset(fieldKey: string): void;
|
|
170
|
+
fieldGroupReset(fieldGroup: string): void;
|
|
165
171
|
fieldHideApiLoader(fieldKey: string): void;
|
|
166
172
|
fieldShowApiLoader(fieldKey: string): void;
|
|
167
173
|
setHtml(fieldKey: string, message: TMessage): void;
|
|
@@ -204,5 +210,5 @@ export declare class KwikIDFormViewComponent implements OnInit, AfterViewInit, O
|
|
|
204
210
|
takeActionOnFieldGroup(action: TAction, object: any): Promise<void>;
|
|
205
211
|
takeAction(action: TAction, object: any): Promise<void>;
|
|
206
212
|
static ɵfac: i0.ɵɵFactoryDeclaration<KwikIDFormViewComponent, never>;
|
|
207
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<KwikIDFormViewComponent, "kwikid-form-view", never, { "allFormsData": "allFormsData"; "apiCallResponse": "apiCallResponse"; "buttonClickResponse": "buttonClickResponse"; "formConfig": "formConfig"; "formData": "formData"; "isMobileView": "isMobileView"; "popupFormCallback": "popupFormCallback"; "userConfig": "userConfig"; "stepConfig": "stepConfig"; }, { "getLogs": "getLogs"; "getUnsavedDataState": "getUnsavedDataState"; "onActionShowPopupForm": "onActionShowPopupForm"; "onClickApiCall": "onClickApiCall"; "onClickViewFile": "onClickViewFile"; "onClickFormFieldButton": "onClickFormFieldButton"; "onClickGoBack": "onClickGoBack"; "onClickSaveForm": "onClickSaveForm"; "onClickViewForms": "onClickViewForms"; }, never, never>;
|
|
213
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<KwikIDFormViewComponent, "kwikid-form-view", never, { "allFormsData": "allFormsData"; "extraData": "extraData"; "apiCallResponse": "apiCallResponse"; "buttonClickResponse": "buttonClickResponse"; "formConfig": "formConfig"; "formData": "formData"; "isMobileView": "isMobileView"; "popupFormCallback": "popupFormCallback"; "userConfig": "userConfig"; "stepConfig": "stepConfig"; }, { "getLogs": "getLogs"; "getUnsavedDataState": "getUnsavedDataState"; "onActionShowPopupForm": "onActionShowPopupForm"; "onClickApiCall": "onClickApiCall"; "onClickViewFile": "onClickViewFile"; "onClickFormFieldButton": "onClickFormFieldButton"; "onClickGoBack": "onClickGoBack"; "onClickSaveForm": "onClickSaveForm"; "onClickViewForms": "onClickViewForms"; }, never, never>;
|
|
208
214
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FormGroup } from "@angular/forms";
|
|
2
2
|
export declare class KwikIDFormViewService {
|
|
3
3
|
constructor();
|
|
4
|
-
createFormGroup(fields: any, formData: any, previousFormData: any, allFormsData: any, takeAction: Function): Promise<FormGroup>;
|
|
4
|
+
createFormGroup(fields: any, formData: any, previousFormData: any, allFormsData: any, extraData: any, takeAction: Function): Promise<FormGroup>;
|
|
5
5
|
}
|
|
@@ -5,7 +5,8 @@ export declare class CameraHelper {
|
|
|
5
5
|
private _formFields;
|
|
6
6
|
private _formData;
|
|
7
7
|
private _previousFormData;
|
|
8
|
+
private _extraData;
|
|
8
9
|
private cameraData;
|
|
9
|
-
constructor(field: TFieldCapture, formFields: any[], allFormsData: any, formData: any, previousFormData: any);
|
|
10
|
+
constructor(field: TFieldCapture, formFields: any[], allFormsData: any, formData: any, previousFormData: any, extraData: any);
|
|
10
11
|
getCameraWatermarkData(): Promise<any>;
|
|
11
12
|
}
|
|
@@ -5,8 +5,9 @@ export declare class Defaults {
|
|
|
5
5
|
private _formFields;
|
|
6
6
|
private _formData;
|
|
7
7
|
private _previousFormData;
|
|
8
|
+
private _extraData;
|
|
8
9
|
private _takeAction;
|
|
9
|
-
constructor(field: TField, formFields: any[], allFormsData: any, formData: any, previousFormData: any, takeAction: Function);
|
|
10
|
+
constructor(field: TField, formFields: any[], allFormsData: any, formData: any, previousFormData: any, extraData: any, takeAction: Function);
|
|
10
11
|
getFormFieldValue(): Promise<any>;
|
|
11
12
|
getFormFieldApiValue(): Promise<void>;
|
|
12
13
|
getFormFieldOptions(): Promise<void>;
|
|
@@ -16,6 +16,7 @@ export declare class KwikIDFormsRendererComponent implements OnInit, OnChanges {
|
|
|
16
16
|
stepConfig: any;
|
|
17
17
|
userConfig: any;
|
|
18
18
|
formsData: any;
|
|
19
|
+
extraData: any;
|
|
19
20
|
activeFormData: any;
|
|
20
21
|
apiCallResponse: any;
|
|
21
22
|
buttonClickResponse: any;
|
|
@@ -137,5 +138,5 @@ export declare class KwikIDFormsRendererComponent implements OnInit, OnChanges {
|
|
|
137
138
|
*/
|
|
138
139
|
handleResize(formsList: any[]): void;
|
|
139
140
|
static ɵfac: i0.ɵɵFactoryDeclaration<KwikIDFormsRendererComponent, never>;
|
|
140
|
-
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"; "onClickViewFile": "onClickViewFile"; "getLogs": "getLogs"; "onClickFormFieldButton": "onClickFormFieldButton"; }, never, never>;
|
|
141
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<KwikIDFormsRendererComponent, "kwikid-forms-renderer", never, { "stepConfig": "stepConfig"; "userConfig": "userConfig"; "formsData": "formsData"; "extraData": "extraData"; "activeFormData": "activeFormData"; "apiCallResponse": "apiCallResponse"; "buttonClickResponse": "buttonClickResponse"; }, { "onClickSubmit": "onClickSubmit"; "getFormData": "getFormData"; "onClickApiCall": "onClickApiCall"; "onClickViewFile": "onClickViewFile"; "getLogs": "getLogs"; "onClickFormFieldButton": "onClickFormFieldButton"; }, never, never>;
|
|
141
142
|
}
|