kwikid-forms 0.0.8 → 0.1.0

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.
@@ -10,5 +10,9 @@ export declare enum EActionKey {
10
10
  FIELD_DISABLE = "FIELD_DISABLE",
11
11
  FIELD_RESET = "FIELD_RESET",
12
12
  HANDLE_CONNECTED_ELEMENTS = "HANDLE_CONNECTED_ELEMENTS",
13
- CUSTOM = "CUSTOM"
13
+ CUSTOM = "CUSTOM",
14
+ FIELD_GROUP_SHOW = "FIELD_GROUP_SHOW",
15
+ FIELD_GROUP_HIDE = "FIELD_GROUP_HIDE",
16
+ FIELD_GROUP_ENABLE = "FIELD_GROUP_ENABLE",
17
+ FIELD_GROUP_DISABLE = "FIELD_GROUP_DISABLE"
14
18
  }
@@ -1,7 +1,7 @@
1
1
  import { TMessage } from "../common/form-view.common.type.definitions";
2
2
  import { TSourceKey } from "../sources/form-view.sources.type.definitions";
3
3
  import { EActionKey } from "./form-view.actions.enum.definitions";
4
- export declare type TActionKey = EActionKey.SET_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;
4
+ export declare type TActionKey = EActionKey.SET_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;
5
5
  export declare type TAction = {
6
6
  id: string;
7
7
  key: TActionKey;
@@ -21,6 +21,7 @@ export declare class KwikIDFormViewComponent implements OnInit, AfterViewInit {
21
21
  onClickSaveForm: EventEmitter<any>;
22
22
  onClickApiCall: EventEmitter<any>;
23
23
  getActiveFormData: EventEmitter<any>;
24
+ fieldGroups: any;
24
25
  formFields: any[];
25
26
  previousFormData: any;
26
27
  loading: boolean;
@@ -39,10 +40,13 @@ export declare class KwikIDFormViewComponent implements OnInit, AfterViewInit {
39
40
  ngOnChanges(changes: SimpleChanges): void;
40
41
  initFormConfig(formConfig: any): Promise<void>;
41
42
  setFormFieldsFromFormConfig(formConfig: any): void;
43
+ setFormFieldGroupsFromFormConfig(formConfig: any): void;
42
44
  setFormDataFromAllFormsData(): void;
45
+ handleConnectedElementFieldGroupActions(childFieldGroupConfig: any, parentField: any): Promise<void>;
46
+ handleConnectedElementFieldGroup(currentField: any, connectedFieldGroupConfig: any, eventType: string): Promise<void>;
43
47
  handleConnectedElementFieldActions(connectedFieldConfig: any, connectedField: any): Promise<any>;
44
48
  handleConnectedElementFields(currentField: any, connectedFieldConfig: any, eventType: string): Promise<any>;
45
- handleConnectedElements(e: any, eventType: string): void;
49
+ handleConnectedElements(e: any, eventType: string): Promise<void>;
46
50
  handleGetKeyValue(e: any): void;
47
51
  handleOnClickResetFormFields(e: any, field: TFieldTitle): Promise<void>;
48
52
  handleOnClickApiCall(e: any): Promise<void>;
@@ -51,9 +55,13 @@ export declare class KwikIDFormViewComponent implements OnInit, AfterViewInit {
51
55
  showErrorNotification: boolean;
52
56
  toggleErrorNotification(show: any): void;
53
57
  fieldHide(fieldKey: string): void;
58
+ fieldGroupHide(fieldGroup: string): void;
54
59
  fieldShow(fieldKey: string): void;
60
+ fieldGroupShow(fieldGroup: string): void;
55
61
  fieldDisable(fieldKey: string): void;
62
+ fieldGroupDisable(fieldGroup: string): void;
56
63
  fieldEnable(fieldKey: string): void;
64
+ fieldGroupEnable(fieldGroup: string): void;
57
65
  fieldReset(fieldKey: string): void;
58
66
  fieldErrorShow(fieldKey: string, message: TMessage): void;
59
67
  fieldErrorHide(fieldKey: string, message: TMessage): void;
@@ -65,6 +73,7 @@ export declare class KwikIDFormViewComponent implements OnInit, AfterViewInit {
65
73
  isFieldEnabled(fieldKey: string): boolean;
66
74
  getFormGroupRawValues(): any;
67
75
  handleFieldTypeSearchText(field: any, childField: any): Promise<any>;
76
+ takeActionOnFieldGroup(action: TAction, field: TField, allFormsData: any, formData: any, previousFormData: any): Promise<void>;
68
77
  takeAction(action: TAction, field: TField, allFormsData: any, formData: any, previousFormData: any): Promise<void>;
69
78
  static ɵfac: i0.ɵɵFactoryDeclaration<KwikIDFormViewComponent, never>;
70
79
  static ɵcmp: i0.ɵɵComponentDeclaration<KwikIDFormViewComponent, "kwikid-form-view", never, { "formConfig": "formConfig"; "formData": "formData"; "apiCallResponse": "apiCallResponse"; "isMobileView": "isMobileView"; "allFormsData": "allFormsData"; "formsList": "formsList"; }, { "onClickViewForms": "onClickViewForms"; "onClickSaveForm": "onClickSaveForm"; "onClickApiCall": "onClickApiCall"; "getActiveFormData": "getActiveFormData"; }, never, never>;
@@ -21,6 +21,7 @@ export declare class KwikIDRendererService {
21
21
  markFormInFormsListAsCompleted(formsList: any[], formsListCompleted: string[]): any[];
22
22
  markFormInFormsListAsDisabled(formsList: any[], formsListCompleted: string[]): any[];
23
23
  assignSequenceNoToForm(formsList: any[]): any[];
24
+ filterAllFormsData(allFormsData: any, formsList: any[]): any;
24
25
  updateFormsList(): void;
25
26
  static ɵfac: i0.ɵɵFactoryDeclaration<KwikIDRendererService, never>;
26
27
  static ɵprov: i0.ɵɵInjectableDeclaration<KwikIDRendererService>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kwikid-forms",
3
- "version": "0.0.8",
3
+ "version": "0.1.0",
4
4
  "description": "Kwik.ID's JSON based Forms Builder and Renderer.",
5
5
  "author": {
6
6
  "name": "Baiju Dodhia"
@@ -33,7 +33,7 @@
33
33
  },
34
34
  "dependencies": {
35
35
  "jsonpath": "^1.1.1",
36
- "kwikui": "0.0.13",
36
+ "kwikui": "^0.1.0",
37
37
  "lodash": "^4.17.21",
38
38
  "tslib": "^2.2.0"
39
39
  },