kwikid-forms 0.6.42 → 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 +532 -224
- 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 +114 -21
- package/esm2015/lib/renderer/form-view/helpers/form-view.apis.helper.js +5 -5
- package/esm2015/lib/renderer/form-view/helpers/form-view.defaults.helper.js +65 -24
- package/esm2015/lib/renderer/form-view/helpers/form-view.fields.helper.js +9 -4
- package/esm2015/lib/renderer/renderer.component.js +2 -2
- package/fesm2015/kwikid-forms.js +227 -84
- 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 +11 -6
- 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,17 +13,20 @@ 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;
|
|
@@ -85,9 +88,8 @@ export declare class KwikIDFormViewComponent implements OnInit, AfterViewInit, O
|
|
|
85
88
|
taskData: any;
|
|
86
89
|
previewDialogRef: any;
|
|
87
90
|
formGroup: FormGroup;
|
|
88
|
-
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);
|
|
89
92
|
ngOnInit(): void;
|
|
90
|
-
ngAfterViewInit(): void;
|
|
91
93
|
ngOnChanges(changes: SimpleChanges): void;
|
|
92
94
|
ngOnDestroy(): void;
|
|
93
95
|
triggerLogs(eventType: ELogEventType, logs: any): void;
|
|
@@ -126,6 +128,7 @@ export declare class KwikIDFormViewComponent implements OnInit, AfterViewInit, O
|
|
|
126
128
|
handleOnLocationPermission(e: any): void;
|
|
127
129
|
handleOnClickLiveLocation(e: any): Promise<void>;
|
|
128
130
|
handleGetKeyValue(e: any): void;
|
|
131
|
+
handleOnClickResetFormFields2(e: any, field: TFieldTitle): Promise<void>;
|
|
129
132
|
handleOnClickResetFormFields(e: any, field: TFieldTitle): Promise<void>;
|
|
130
133
|
handleFieldApiCall(field: TFieldApiCall, api: any): Promise<{
|
|
131
134
|
field: TFieldApiCall;
|
|
@@ -150,6 +153,7 @@ export declare class KwikIDFormViewComponent implements OnInit, AfterViewInit, O
|
|
|
150
153
|
handleOnClickViewForms(e: any): void;
|
|
151
154
|
handleOnClickSaveForm(e: any): Promise<void>;
|
|
152
155
|
handleOnApiTimerStop(e: any): Promise<void>;
|
|
156
|
+
handleOnScrollToField(fieldKey: string): void;
|
|
153
157
|
showErrorNotification: boolean;
|
|
154
158
|
toggleErrorNotification(show: boolean): void;
|
|
155
159
|
showPermissionErrorNotification: boolean;
|
|
@@ -163,6 +167,7 @@ export declare class KwikIDFormViewComponent implements OnInit, AfterViewInit, O
|
|
|
163
167
|
fieldEnable(fieldKey: string): void;
|
|
164
168
|
fieldGroupEnable(fieldGroup: string): void;
|
|
165
169
|
fieldReset(fieldKey: string): void;
|
|
170
|
+
fieldGroupReset(fieldGroup: string): void;
|
|
166
171
|
fieldHideApiLoader(fieldKey: string): void;
|
|
167
172
|
fieldShowApiLoader(fieldKey: string): void;
|
|
168
173
|
setHtml(fieldKey: string, message: TMessage): void;
|