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.
@@ -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, TEngine } from "kwikid-toolkit";
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
- sources: Array<TSource>;
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 { AfterViewInit, ChangeDetectorRef, EventEmitter, OnChanges, OnDestroy, OnInit, SimpleChanges, TemplateRef } from "@angular/core";
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, AfterViewInit, OnChanges, OnDestroy {
17
- private cd;
16
+ export declare class KwikIDFormViewComponent implements OnInit, OnChanges, OnDestroy {
17
+ private cdRef;
18
18
  private formViewService;
19
19
  private formViewApiService;
20
- protected readonly push: TuiPushService;
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(cd: ChangeDetectorRef, formViewService: KwikIDFormViewService, formViewApiService: KwikIDFormViewApiService, push: TuiPushService, alertService: TuiAlertService, previewDialogService: TuiPreviewDialogService, dialogService: TuiDialogService, loaderService: KwikUILoaderService, cameraRecordService: KwikIDCameraRecordService, ref: ChangeDetectorRef);
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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kwikid-forms",
3
- "version": "0.6.42",
3
+ "version": "0.6.43",
4
4
  "description": "KwikID's JSON Configuration based Forms Renderer and Builder",
5
5
  "author": {
6
6
  "name": "Baiju Dodhia"