kwikid-forms 0.4.1 → 0.5.2

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.
Files changed (106) hide show
  1. package/bundles/kwikid-forms.umd.js +1904 -3666
  2. package/bundles/kwikid-forms.umd.js.map +1 -1
  3. package/esm2015/lib/builder/builder-form-editor/builder-form-editor.component.js +403 -0
  4. package/esm2015/lib/builder/builder-form-editor/builder-form-editor.definitions.js +6 -0
  5. package/esm2015/lib/builder/builder-form-editor/builder-form-editor.helper.js +29 -0
  6. package/esm2015/lib/builder/builder-form-editor/builder-form-editor.module.js +39 -0
  7. package/esm2015/lib/builder/builder-form-editor/builder.form-editor.constants.js +189 -0
  8. package/esm2015/lib/builder/builder-form-editor/builder.form-editor.service.js +43 -0
  9. package/esm2015/lib/builder/builder-form-list/builder-forms-list.component.js +99 -0
  10. package/esm2015/lib/builder/builder-form-list/builder-forms-list.module.js +40 -0
  11. package/esm2015/lib/builder/builder.component.js +111 -258
  12. package/esm2015/lib/builder/builder.helper.js +78 -0
  13. package/esm2015/lib/builder/builder.module.js +15 -72
  14. package/esm2015/lib/kwikid-forms.module.js +4 -16
  15. package/esm2015/lib/renderer/config-converter/config-converter.constants.js +74 -0
  16. package/esm2015/lib/renderer/config-converter/config-converter.helper.js +49 -0
  17. package/esm2015/lib/renderer/config-converter/config-converter.js +514 -0
  18. package/esm2015/lib/renderer/form-view/definitions/form-view.actions.definition.js +2 -1
  19. package/esm2015/lib/renderer/form-view/definitions/form-view.fields.definition.js +2 -1
  20. package/esm2015/lib/renderer/form-view/form-view.component.js +52 -51
  21. package/esm2015/lib/renderer/form-view/form-view.module.js +7 -6
  22. package/esm2015/lib/renderer/forms-list/forms-list.component.js +3 -5
  23. package/esm2015/lib/renderer/forms-list/forms-list.module.js +7 -5
  24. package/esm2015/lib/renderer/renderer.component.js +4 -6
  25. package/esm2015/public_api.js +1 -3
  26. package/fesm2015/kwikid-forms.js +1482 -5044
  27. package/fesm2015/kwikid-forms.js.map +1 -1
  28. package/lib/builder/builder-form-editor/builder-form-editor.component.d.ts +108 -0
  29. package/lib/builder/builder-form-editor/builder-form-editor.definitions.d.ts +5 -0
  30. package/lib/builder/builder-form-editor/builder-form-editor.helper.d.ts +3 -0
  31. package/lib/builder/builder-form-editor/builder-form-editor.module.d.ts +11 -0
  32. package/lib/{builder2 → builder}/builder-form-editor/builder.form-editor.constants.d.ts +76 -0
  33. package/lib/builder/builder-form-editor/builder.form-editor.service.d.ts +7 -0
  34. package/lib/{builder2 → builder}/builder-form-list/builder-forms-list.component.d.ts +2 -1
  35. package/lib/{builder2 → builder}/builder-form-list/builder-forms-list.module.d.ts +1 -1
  36. package/lib/builder/builder.component.d.ts +15 -34
  37. package/lib/builder/builder.helper.d.ts +1 -0
  38. package/lib/builder/builder.module.d.ts +7 -21
  39. package/lib/kwikid-forms.module.d.ts +2 -3
  40. package/lib/renderer/config-converter/config-converter.constants.d.ts +73 -0
  41. package/lib/renderer/config-converter/config-converter.d.ts +5 -0
  42. package/lib/renderer/config-converter/config-converter.helper.d.ts +7 -0
  43. package/lib/renderer/form-view/definitions/form-view.actions.definition.d.ts +3 -2
  44. package/lib/renderer/form-view/definitions/form-view.fields.definition.d.ts +1 -0
  45. package/lib/renderer/form-view/form-view.component.d.ts +2 -5
  46. package/lib/renderer/form-view/form-view.module.d.ts +7 -9
  47. package/lib/renderer/forms-list/forms-list.module.d.ts +5 -6
  48. package/package.json +3 -3
  49. package/public_api.d.ts +0 -2
  50. package/esm2015/lib/builder/element-config-editor/editors/basic/checkbox-config.editor.component.js +0 -72
  51. package/esm2015/lib/builder/element-config-editor/editors/basic/date-config.editor.component.js +0 -72
  52. package/esm2015/lib/builder/element-config-editor/editors/basic/number-config.editor.component.js +0 -72
  53. package/esm2015/lib/builder/element-config-editor/editors/basic/otp-config.editor.component.js +0 -130
  54. package/esm2015/lib/builder/element-config-editor/editors/basic/phone-config.editor.component.js +0 -132
  55. package/esm2015/lib/builder/element-config-editor/editors/basic/radio-config.editor.component.js +0 -396
  56. package/esm2015/lib/builder/element-config-editor/editors/basic/select-config.editor.component.js +0 -302
  57. package/esm2015/lib/builder/element-config-editor/editors/basic/text-config.editor.component.js +0 -132
  58. package/esm2015/lib/builder/element-config-editor/editors/basic-element-config.editor.component.js +0 -698
  59. package/esm2015/lib/builder/element-config-editor/editors/document/aadhaar-number-config.editor.component.js +0 -130
  60. package/esm2015/lib/builder/element-config-editor/editors/document/pan-number-config.editor.component.js +0 -135
  61. package/esm2015/lib/builder/element-config-editor/editors/document-element-config.editor.component.js +0 -610
  62. package/esm2015/lib/builder/element-config-editor/editors/other/html-config.editor.component.js +0 -120
  63. package/esm2015/lib/builder/element-config-editor/editors/other/title-config.editor.component.js +0 -121
  64. package/esm2015/lib/builder/element-config-editor/editors/other-element-config.editor.component.js +0 -214
  65. package/esm2015/lib/builder/element-config-editor/element-config-editor.component.js +0 -97
  66. package/esm2015/lib/builder/shared/elements.js +0 -90
  67. package/esm2015/lib/builder/shared/helpers.js +0 -6
  68. package/esm2015/lib/builder2/builder-form-editor/builder-form-editor.component.js +0 -268
  69. package/esm2015/lib/builder2/builder-form-editor/builder-form-editor.module.js +0 -38
  70. package/esm2015/lib/builder2/builder-form-editor/builder-form-editor.pipe.js +0 -19
  71. package/esm2015/lib/builder2/builder-form-editor/builder.form-editor.constants.js +0 -178
  72. package/esm2015/lib/builder2/builder-form-list/builder-forms-list.component.js +0 -85
  73. package/esm2015/lib/builder2/builder-form-list/builder-forms-list.module.js +0 -37
  74. package/esm2015/lib/builder2/builder2.component.js +0 -169
  75. package/esm2015/lib/builder2/builder2.module.js +0 -46
  76. package/esm2015/lib/renderer/config-converter.helper.js +0 -629
  77. package/esm2015/lib/renderer/form-view/pipes/safe-html.pipe.js +0 -25
  78. package/esm2015/lib/renderer/form-view/pipes/safe-url.pipe.js +0 -25
  79. package/esm2015/lib/renderer/forms-list/pipes/safe-html.pipe.js +0 -25
  80. package/lib/builder/element-config-editor/editors/basic/checkbox-config.editor.component.d.ts +0 -16
  81. package/lib/builder/element-config-editor/editors/basic/date-config.editor.component.d.ts +0 -16
  82. package/lib/builder/element-config-editor/editors/basic/number-config.editor.component.d.ts +0 -16
  83. package/lib/builder/element-config-editor/editors/basic/otp-config.editor.component.d.ts +0 -16
  84. package/lib/builder/element-config-editor/editors/basic/phone-config.editor.component.d.ts +0 -16
  85. package/lib/builder/element-config-editor/editors/basic/radio-config.editor.component.d.ts +0 -25
  86. package/lib/builder/element-config-editor/editors/basic/select-config.editor.component.d.ts +0 -24
  87. package/lib/builder/element-config-editor/editors/basic/text-config.editor.component.d.ts +0 -16
  88. package/lib/builder/element-config-editor/editors/basic-element-config.editor.component.d.ts +0 -20
  89. package/lib/builder/element-config-editor/editors/document/aadhaar-number-config.editor.component.d.ts +0 -16
  90. package/lib/builder/element-config-editor/editors/document/pan-number-config.editor.component.d.ts +0 -16
  91. package/lib/builder/element-config-editor/editors/document-element-config.editor.component.d.ts +0 -20
  92. package/lib/builder/element-config-editor/editors/other/html-config.editor.component.d.ts +0 -16
  93. package/lib/builder/element-config-editor/editors/other/title-config.editor.component.d.ts +0 -16
  94. package/lib/builder/element-config-editor/editors/other-element-config.editor.component.d.ts +0 -20
  95. package/lib/builder/element-config-editor/element-config-editor.component.d.ts +0 -20
  96. package/lib/builder/shared/elements.d.ts +0 -34
  97. package/lib/builder/shared/helpers.d.ts +0 -1
  98. package/lib/builder2/builder-form-editor/builder-form-editor.component.d.ts +0 -48
  99. package/lib/builder2/builder-form-editor/builder-form-editor.module.d.ts +0 -12
  100. package/lib/builder2/builder-form-editor/builder-form-editor.pipe.d.ts +0 -7
  101. package/lib/builder2/builder2.component.d.ts +0 -37
  102. package/lib/builder2/builder2.module.d.ts +0 -13
  103. package/lib/renderer/config-converter.helper.d.ts +0 -9
  104. package/lib/renderer/form-view/pipes/safe-html.pipe.d.ts +0 -15
  105. package/lib/renderer/form-view/pipes/safe-url.pipe.d.ts +0 -15
  106. package/lib/renderer/forms-list/pipes/safe-html.pipe.d.ts +0 -15
@@ -0,0 +1,108 @@
1
+ import { EventEmitter, OnChanges, OnInit, SimpleChanges } from "@angular/core";
2
+ import { FormGroup } from "@angular/forms";
3
+ import { TFormEditorType } from "./builder-form-editor.definitions";
4
+ import { KwikIDFormBuilderFormEditorService } from "./builder.form-editor.service";
5
+ import * as i0 from "@angular/core";
6
+ export declare class KwikIDBuilderFormEditorComponent implements OnInit, OnChanges {
7
+ kwikidBuilderFormEditorService: KwikIDFormBuilderFormEditorService;
8
+ /**
9
+ * Components Inputs
10
+ */
11
+ activeFormConfig: any;
12
+ /**
13
+ * Component Outputs (Event Emitters)
14
+ */
15
+ onClickSaveActiveFormConfig: EventEmitter<any>;
16
+ /**
17
+ * Component Variables
18
+ */
19
+ rows: any[];
20
+ columns: any[];
21
+ activeFieldConfigEditing: any;
22
+ showFieldConfigValidatorsConfigEditor: boolean;
23
+ activeFieldConfigValidatorsConfig: any;
24
+ showFieldConfigPropertiesConfigEditor: boolean;
25
+ activeFieldConfigPropertiesConfig: any;
26
+ editorTypeOptions: any[];
27
+ activeEditorType: TFormEditorType;
28
+ activeFormConfig_Fields: any[];
29
+ activeFormConfig_NoFields: any;
30
+ showConfigPreview: boolean;
31
+ formGroup: FormGroup;
32
+ savedConfig: boolean;
33
+ markSaved(): void;
34
+ markUnsaved(): void;
35
+ loader: boolean;
36
+ startLoader(): void;
37
+ stopLoader(): void;
38
+ dialogOpen: boolean;
39
+ showDialog(): void;
40
+ hideDialog(): void;
41
+ dialogError: boolean;
42
+ showDialogError(): void;
43
+ hideDialogError(): void;
44
+ constructor(kwikidBuilderFormEditorService: KwikIDFormBuilderFormEditorService);
45
+ /**
46
+ * Angular Lifecycle Methods
47
+ */
48
+ ngOnInit(): void;
49
+ ngOnChanges(changes: SimpleChanges): void;
50
+ initFormEditor(activeFormConfig: any): void;
51
+ /**
52
+ * General Editor Common Methods
53
+ */
54
+ handleOnClickChangeActiveEditor(editorType: string): void;
55
+ handleOnClickSaveActiveFormConfig(): void;
56
+ /**
57
+ * Fields Editor Related Methods
58
+ */
59
+ /**
60
+ * Methods to handle addition of new field
61
+ */
62
+ handleOnClickAddField(): void;
63
+ /**
64
+ * Methods to handle editing of field key-values
65
+ */
66
+ handleOnClickEditValidators(e: any): void;
67
+ handleOnClickEditProperties(e: any): void;
68
+ /**
69
+ * Methods to handle change in input values for Fields Keys
70
+ */
71
+ handleOnInput(e: any): void;
72
+ handleOnInputFieldConfigValidatorsConfig(e: any): void;
73
+ handleOnInputFieldConfigPropertiesConfig(e: any): void;
74
+ /**
75
+ * Methods to handle deletion of field
76
+ */
77
+ handleOnClickDeleteField(e: any): void;
78
+ /**
79
+ * Non Fields Editor Related Methods
80
+ */
81
+ handleOnClickSaveActiveFormConfig_NoFields(e: any): void;
82
+ /**
83
+ * Other Component Methods
84
+ */
85
+ handleOnClickPreview(): void;
86
+ closeJSONPopup(): void;
87
+ /**
88
+ * Other Helper Methods
89
+ */
90
+ copyToClipboard(): void;
91
+ downloadJSON(): void;
92
+ /**
93
+ * Misc Methods
94
+ */
95
+ getOptions(index: any, value: any, key: any, path: any): any;
96
+ memoizedGetOptions: any;
97
+ isOptions(index: any, value: any, key: any, path: any): boolean;
98
+ isBoolean(value: any): boolean;
99
+ isString(value: any): boolean;
100
+ isNumber(value: any): boolean;
101
+ isObject(value: any): boolean;
102
+ /**
103
+ * Angular Specific Methods
104
+ */
105
+ trackByFn(index: number, item: any): any;
106
+ static ɵfac: i0.ɵɵFactoryDeclaration<KwikIDBuilderFormEditorComponent, never>;
107
+ static ɵcmp: i0.ɵɵComponentDeclaration<KwikIDBuilderFormEditorComponent, "kwikid-builder-form-editor", never, { "activeFormConfig": "activeFormConfig"; }, { "onClickSaveActiveFormConfig": "onClickSaveActiveFormConfig"; }, never, never>;
108
+ }
@@ -0,0 +1,5 @@
1
+ export declare enum EFormEditorType {
2
+ FIELDS = "FIELDS",
3
+ NON_FIELDS = "NON_FIELDS"
4
+ }
5
+ export declare type TFormEditorType = EFormEditorType.FIELDS | EFormEditorType.NON_FIELDS;
@@ -0,0 +1,3 @@
1
+ export declare const removeField: (fields: any[], fieldKey: string) => any;
2
+ export declare const getFieldIndex: (fields: any[], identifier: any) => number;
3
+ export declare const findModifiedKeys: (defaultJson: any, modifiedJson: any, currentPath?: string) => any;
@@ -0,0 +1,11 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./builder-form-editor.component";
3
+ import * as i2 from "@angular/common";
4
+ import * as i3 from "@angular/forms";
5
+ import * as i4 from "kwikui";
6
+ import * as i5 from "@taiga-ui/core";
7
+ export declare class KwikIDBuilderFormEditorModule {
8
+ static ɵfac: i0.ɵɵFactoryDeclaration<KwikIDBuilderFormEditorModule, never>;
9
+ static ɵmod: i0.ɵɵNgModuleDeclaration<KwikIDBuilderFormEditorModule, [typeof i1.KwikIDBuilderFormEditorComponent], [typeof i2.CommonModule, typeof i3.FormsModule, typeof i3.ReactiveFormsModule, typeof i4.KwikUIModule, typeof i5.TuiSvgModule], [typeof i1.KwikIDBuilderFormEditorComponent]>;
10
+ static ɵinj: i0.ɵɵInjectorDeclaration<KwikIDBuilderFormEditorModule>;
11
+ }
@@ -40,6 +40,7 @@ export declare const OPTIONS: {
40
40
  imageType: string[];
41
41
  loadingType: string[];
42
42
  };
43
+ file: {};
43
44
  };
44
45
  validators: {
45
46
  required: boolean[];
@@ -158,6 +159,14 @@ export declare const FIELD_PROPERTIES_CONFIG: {
158
159
  readOnly: boolean;
159
160
  placeholder: string;
160
161
  };
162
+ "api-call": {
163
+ readOnly: boolean;
164
+ placeholder: string;
165
+ };
166
+ "aadhaar-number": {
167
+ readOnly: boolean;
168
+ placeholder: string;
169
+ };
161
170
  "input-aadhaar": {
162
171
  readOnly: boolean;
163
172
  placeholder: string;
@@ -192,6 +201,10 @@ export declare const FIELD_PROPERTIES_CONFIG: {
192
201
  readOnly: boolean;
193
202
  placeholder: string;
194
203
  };
204
+ file: {
205
+ readOnly: boolean;
206
+ placeholder: string;
207
+ };
195
208
  };
196
209
  export declare const FIELD_COMMON_CONFIG: {
197
210
  key: string;
@@ -511,6 +524,48 @@ export declare const FIELD_CONFIG: {
511
524
  max: number;
512
525
  };
513
526
  };
527
+ "api-call": {
528
+ type: string;
529
+ properties: {
530
+ readOnly: boolean;
531
+ placeholder: string;
532
+ };
533
+ key: string;
534
+ label: string;
535
+ disabled: boolean;
536
+ validators: {
537
+ required: boolean;
538
+ minLength: number;
539
+ maxLength: number;
540
+ pattern: {
541
+ key: string;
542
+ pattern: string;
543
+ };
544
+ min: number;
545
+ max: number;
546
+ };
547
+ };
548
+ "aadhaar-number": {
549
+ type: string;
550
+ properties: {
551
+ readOnly: boolean;
552
+ placeholder: string;
553
+ };
554
+ key: string;
555
+ label: string;
556
+ disabled: boolean;
557
+ validators: {
558
+ required: boolean;
559
+ minLength: number;
560
+ maxLength: number;
561
+ pattern: {
562
+ key: string;
563
+ pattern: string;
564
+ };
565
+ min: number;
566
+ max: number;
567
+ };
568
+ };
514
569
  "input-aadhaar": {
515
570
  type: string;
516
571
  properties: {
@@ -617,4 +672,25 @@ export declare const FIELD_CONFIG: {
617
672
  max: number;
618
673
  };
619
674
  };
675
+ file: {
676
+ type: string;
677
+ properties: {
678
+ readOnly: boolean;
679
+ placeholder: string;
680
+ };
681
+ key: string;
682
+ label: string;
683
+ disabled: boolean;
684
+ validators: {
685
+ required: boolean;
686
+ minLength: number;
687
+ maxLength: number;
688
+ pattern: {
689
+ key: string;
690
+ pattern: string;
691
+ };
692
+ min: number;
693
+ max: number;
694
+ };
695
+ };
620
696
  };
@@ -0,0 +1,7 @@
1
+ import { FormGroup } from "@angular/forms";
2
+ export declare class KwikIDFormBuilderFormEditorService {
3
+ constructor();
4
+ createNestedFormGroup(object: any[]): FormGroup;
5
+ downloadJSON(object: any): void;
6
+ copyToClipboard(text: any): void;
7
+ }
@@ -5,6 +5,7 @@ export declare class KwikIDBuilderFormsListComponent implements OnInit, OnChange
5
5
  activeFormConfig: any;
6
6
  formsList: any[];
7
7
  onClickSetActiveForm: EventEmitter<any>;
8
+ getFormsList: EventEmitter<any>;
8
9
  loader: boolean;
9
10
  selectedForm: string;
10
11
  setSelectedForm(selected_form: string): void;
@@ -15,5 +16,5 @@ export declare class KwikIDBuilderFormsListComponent implements OnInit, OnChange
15
16
  handleOnClickSetActiveForm(selectedForm: string): void;
16
17
  handleOnClickAddForm(): void;
17
18
  static ɵfac: i0.ɵɵFactoryDeclaration<KwikIDBuilderFormsListComponent, never>;
18
- static ɵcmp: i0.ɵɵComponentDeclaration<KwikIDBuilderFormsListComponent, "kwikid-builder-forms-list", never, { "activeFormConfig": "activeFormConfig"; "formsList": "formsList"; }, { "onClickSetActiveForm": "onClickSetActiveForm"; }, never, never>;
19
+ static ɵcmp: i0.ɵɵComponentDeclaration<KwikIDBuilderFormsListComponent, "kwikid-builder-forms-list", never, { "activeFormConfig": "activeFormConfig"; "formsList": "formsList"; }, { "onClickSetActiveForm": "onClickSetActiveForm"; "getFormsList": "getFormsList"; }, never, never>;
19
20
  }
@@ -6,6 +6,6 @@ import * as i4 from "kwikui";
6
6
  import * as i5 from "@taiga-ui/core";
7
7
  export declare class KwikIDBuilderFormsListModule {
8
8
  static ɵfac: i0.ɵɵFactoryDeclaration<KwikIDBuilderFormsListModule, never>;
9
- static ɵmod: i0.ɵɵNgModuleDeclaration<KwikIDBuilderFormsListModule, [typeof i1.KwikIDBuilderFormsListComponent], [typeof i2.CommonModule, typeof i3.FormsModule, typeof i3.ReactiveFormsModule, typeof i4.KwikUIModule, typeof i5.TuiSvgModule], [typeof i1.KwikIDBuilderFormsListComponent]>;
9
+ static ɵmod: i0.ɵɵNgModuleDeclaration<KwikIDBuilderFormsListModule, [typeof i1.KwikIDBuilderFormsListComponent], [typeof i2.CommonModule, typeof i3.FormsModule, typeof i3.ReactiveFormsModule, typeof i4.KwikUIPipeModule, typeof i4.KwikUIModule, typeof i5.TuiSvgModule], [typeof i1.KwikIDBuilderFormsListComponent]>;
10
10
  static ɵinj: i0.ɵɵInjectorDeclaration<KwikIDBuilderFormsListModule>;
11
11
  }
@@ -1,41 +1,22 @@
1
- import { CdkDrag } from "@angular/cdk/drag-drop";
2
1
  import { OnInit } from "@angular/core";
3
- import { FormGroup } from "@angular/forms";
4
2
  import * as i0 from "@angular/core";
5
3
  export declare class KwikIDFormsBuilderComponent implements OnInit {
6
- formKey: string;
7
- formTitle: string;
8
- builderFormGroup: FormGroup;
9
- basicElements: Array<any>;
10
- documentElements: Array<any>;
11
- otherElements: Array<any>;
12
- templateElements: Array<any>;
13
- elementsMapping: any;
14
- formElementsDragList: Array<any>;
15
- formElementsDropList: Array<any>;
16
- elementEditorElementConfig: any;
17
- finalJSONConfig: any;
18
- JSON: JSON;
4
+ userConfig: any;
5
+ formsList: any[];
6
+ activeFormConfig: any;
7
+ loader: boolean;
19
8
  constructor();
20
9
  ngOnInit(): void;
21
- handleOnChange(event: {
22
- target: {
23
- value: any;
24
- };
25
- }, id: string | number, key: string | number, idx: any): void;
26
- handleGetKeyValue(e: any): void;
27
- drop(event: any, elementCategory: string): void;
28
- exit(event: any, elementCategory: string): void;
29
- enter(event: any, elementCategory: string): void;
30
- /** Predicate function that only allows isElement: true items to be dropped into a list. */
31
- isElementPredicate(item: CdkDrag<any>): any;
32
- removeElement(idx: number, id: string): void;
33
- editElement(idx: number, item: any): void;
34
- handleOnSaveUpdateElement(event: any): void;
35
- handleOnClickSaveForms(event: any): void;
36
- copyToClipboard(): void;
37
- downloadJSON(): void;
38
- closeJSONPopup(): void;
10
+ fetchFormConfig(url: string): Promise<any>;
11
+ /**
12
+ * Forms List Listeners
13
+ */
14
+ handleGetFormsList(e: any): void;
15
+ handleOnClickSetActiveForm(selectedFormKey: string): Promise<void>;
16
+ /**
17
+ * Form Editor Listeners
18
+ */
19
+ handleOnClickSaveActiveFormConfig(activeFormConfig: any): void;
39
20
  static ɵfac: i0.ɵɵFactoryDeclaration<KwikIDFormsBuilderComponent, never>;
40
- static ɵcmp: i0.ɵɵComponentDeclaration<KwikIDFormsBuilderComponent, "kwikid-forms-builder", never, {}, {}, never, never>;
21
+ static ɵcmp: i0.ɵɵComponentDeclaration<KwikIDFormsBuilderComponent, "kwikid-forms-builder", never, { "userConfig": "userConfig"; }, {}, never, never>;
41
22
  }
@@ -0,0 +1 @@
1
+ export declare function convertFormListConfig(formsList: any[]): any[];
@@ -1,27 +1,13 @@
1
1
  import * as i0 from "@angular/core";
2
2
  import * as i1 from "./builder.component";
3
- import * as i2 from "./element-config-editor/element-config-editor.component";
4
- import * as i3 from "./element-config-editor/editors/basic-element-config.editor.component";
5
- import * as i4 from "./element-config-editor/editors/basic/text-config.editor.component";
6
- import * as i5 from "./element-config-editor/editors/basic/radio-config.editor.component";
7
- import * as i6 from "./element-config-editor/editors/basic/select-config.editor.component";
8
- import * as i7 from "./element-config-editor/editors/basic/number-config.editor.component";
9
- import * as i8 from "./element-config-editor/editors/basic/checkbox-config.editor.component";
10
- import * as i9 from "./element-config-editor/editors/basic/date-config.editor.component";
11
- import * as i10 from "./element-config-editor/editors/basic/otp-config.editor.component";
12
- import * as i11 from "./element-config-editor/editors/basic/phone-config.editor.component";
13
- import * as i12 from "./element-config-editor/editors/document-element-config.editor.component";
14
- import * as i13 from "./element-config-editor/editors/document/aadhaar-number-config.editor.component";
15
- import * as i14 from "./element-config-editor/editors/document/pan-number-config.editor.component";
16
- import * as i15 from "./element-config-editor/editors/other-element-config.editor.component";
17
- import * as i16 from "./element-config-editor/editors/other/html-config.editor.component";
18
- import * as i17 from "./element-config-editor/editors/other/title-config.editor.component";
19
- import * as i18 from "@angular/common";
20
- import * as i19 from "@angular/forms";
21
- import * as i20 from "@angular/cdk/drag-drop";
22
- import * as i21 from "kwikui";
3
+ import * as i2 from "@angular/common";
4
+ import * as i3 from "@angular/forms";
5
+ import * as i4 from "@angular/cdk/drag-drop";
6
+ import * as i5 from "./builder-form-list/builder-forms-list.module";
7
+ import * as i6 from "./builder-form-editor/builder-form-editor.module";
8
+ import * as i7 from "kwikui";
23
9
  export declare class KwikIDFormBuilderModule {
24
10
  static ɵfac: i0.ɵɵFactoryDeclaration<KwikIDFormBuilderModule, never>;
25
- static ɵmod: i0.ɵɵNgModuleDeclaration<KwikIDFormBuilderModule, [typeof i1.KwikIDFormsBuilderComponent, typeof i2.ElementConfigEditor, typeof i3.BasicElementConfigEditor, typeof i4.BasicTextConfigEditor, typeof i5.BasicRadioConfigEditor, typeof i6.BasicSelectConfigEditor, typeof i7.BasicNumberConfigEditor, typeof i8.BasicCheckboxConfigEditor, typeof i9.BasicDateConfigEditor, typeof i10.BasicOtpConfigEditor, typeof i11.BasicPhoneConfigEditor, typeof i12.DocumentElementConfigEditor, typeof i13.DocumentAadhaarNumberConfigEditor, typeof i14.DocumentPanNumberConfigEditor, typeof i15.OtherElementConfigEditor, typeof i16.OtherHTMLConfigEditor, typeof i17.OtherTitleConfigEditor], [typeof i18.CommonModule, typeof i19.FormsModule, typeof i19.ReactiveFormsModule, typeof i20.DragDropModule, typeof i21.KwikUIButtonModule, typeof i21.KwikUIInputModule, typeof i21.KwikUIInputNumberModule, typeof i21.KwikUIInputSelectModule, typeof i21.KwikUITableModule, typeof i21.KwikUITextareaModule], [typeof i1.KwikIDFormsBuilderComponent]>;
11
+ static ɵmod: i0.ɵɵNgModuleDeclaration<KwikIDFormBuilderModule, [typeof i1.KwikIDFormsBuilderComponent], [typeof i2.CommonModule, typeof i3.FormsModule, typeof i3.ReactiveFormsModule, typeof i4.DragDropModule, typeof i5.KwikIDBuilderFormsListModule, typeof i6.KwikIDBuilderFormEditorModule, typeof i7.KwikUIModule], [typeof i1.KwikIDFormsBuilderComponent]>;
26
12
  static ɵinj: i0.ɵɵInjectorDeclaration<KwikIDFormBuilderModule>;
27
13
  }
@@ -2,10 +2,9 @@ import * as i0 from "@angular/core";
2
2
  import * as i1 from "@angular/common";
3
3
  import * as i2 from "@angular/forms";
4
4
  import * as i3 from "./builder/builder.module";
5
- import * as i4 from "./builder2/builder2.module";
6
- import * as i5 from "./renderer/renderer.module";
5
+ import * as i4 from "./renderer/renderer.module";
7
6
  export declare class KwikIDFormsModule {
8
7
  static ɵfac: i0.ɵɵFactoryDeclaration<KwikIDFormsModule, never>;
9
- static ɵmod: i0.ɵɵNgModuleDeclaration<KwikIDFormsModule, never, [typeof i1.CommonModule, typeof i2.FormsModule, typeof i2.ReactiveFormsModule, typeof i3.KwikIDFormBuilderModule, typeof i4.KwikIDFormBuilder2Module, typeof i5.KwikIDFormRendererModule], [typeof i3.KwikIDFormBuilderModule, typeof i5.KwikIDFormRendererModule, typeof i4.KwikIDFormBuilder2Module]>;
8
+ static ɵmod: i0.ɵɵNgModuleDeclaration<KwikIDFormsModule, never, [typeof i1.CommonModule, typeof i2.FormsModule, typeof i2.ReactiveFormsModule, typeof i3.KwikIDFormBuilderModule, typeof i4.KwikIDFormRendererModule], [typeof i4.KwikIDFormRendererModule, typeof i3.KwikIDFormBuilderModule]>;
10
9
  static ɵinj: i0.ɵɵInjectorDeclaration<KwikIDFormsModule>;
11
10
  }
@@ -0,0 +1,73 @@
1
+ export declare const FIELD_PROPERTIES: {
2
+ text: {
3
+ case: string;
4
+ };
5
+ number: {
6
+ decimal: string;
7
+ min: number;
8
+ max: number;
9
+ placeholder: string;
10
+ prefix: string;
11
+ postfix: string;
12
+ precision: number;
13
+ };
14
+ phone: {
15
+ countryCode: string;
16
+ phoneMaskAfterCountryCode: string;
17
+ removeCountryCodeFromValue: boolean;
18
+ placeholder: string;
19
+ };
20
+ image: {
21
+ altText: string;
22
+ html: {};
23
+ before: string;
24
+ after: string;
25
+ imageType: string;
26
+ loadingType: string;
27
+ styles: string;
28
+ class: string;
29
+ };
30
+ date: {
31
+ minCalculatedFromToday: {
32
+ year: number;
33
+ month: number;
34
+ day: number;
35
+ };
36
+ maxCalculatedFromToday: {
37
+ year: number;
38
+ month: number;
39
+ day: number;
40
+ };
41
+ placeholder: string;
42
+ };
43
+ radio: {
44
+ size: string;
45
+ orientation: string;
46
+ };
47
+ slider: {
48
+ min: number;
49
+ max: number;
50
+ steps: number;
51
+ quantum: number;
52
+ size: string;
53
+ };
54
+ api: {
55
+ shape: any;
56
+ size: string;
57
+ };
58
+ otp: {
59
+ size: string;
60
+ mode: string;
61
+ otpLength: number;
62
+ placeholder: string;
63
+ };
64
+ file: {
65
+ multiple: boolean;
66
+ accept: string;
67
+ label: string;
68
+ uploadFileToServer: boolean;
69
+ link: string;
70
+ size: string;
71
+ maxFileSize: number;
72
+ };
73
+ };
@@ -0,0 +1,5 @@
1
+ export declare class Converter {
2
+ updateFormConfigMiscellaneous(formConfig: any, args: any): any;
3
+ updateFormConfigProperties(formConfig: any): any;
4
+ convertFormConfig(formConfig: any): any;
5
+ }
@@ -0,0 +1,7 @@
1
+ export declare const getFormFields: (formConfig: any) => any[];
2
+ export declare const setMissingFieldKeyValue: (field: any, key: string, value: any) => any;
3
+ export declare const setFieldKeyValue: (field: any, key: string, value: any) => any;
4
+ export declare const setFieldKeyHidden: (field: any) => any;
5
+ export declare const setFieldAsFormElement: (field: any, value: boolean) => any;
6
+ export declare const getMinDate: (field: any) => any;
7
+ export declare const getMaxDate: (field: any) => any;
@@ -34,9 +34,10 @@ export declare enum EActionKey {
34
34
  DIALOG_SHOW = "DIALOG_SHOW",
35
35
  DIALOG_HIDE = "DIALOG_HIDE",
36
36
  RESUME_TASK_EXECUTION = "RESUME_TASK_EXECUTION",
37
- STOP_TASK_EXECUTION = "STOP_TASK_EXECUTION"
37
+ STOP_TASK_EXECUTION = "STOP_TASK_EXECUTION",
38
+ REDIRECT_TO_URL = "REDIRECT_TO_URL"
38
39
  }
39
- 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.STOP_WAITING | EActionKey.NOTIFICATION_ERROR_SHOW | EActionKey.NOTIFICATION_ERROR_HIDE | EActionKey.DIALOG_SHOW | EActionKey.DIALOG_HIDE | EActionKey.RESUME_TASK_EXECUTION | EActionKey.STOP_TASK_EXECUTION;
40
+ 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.STOP_WAITING | EActionKey.NOTIFICATION_ERROR_SHOW | EActionKey.NOTIFICATION_ERROR_HIDE | EActionKey.DIALOG_SHOW | EActionKey.DIALOG_HIDE | EActionKey.RESUME_TASK_EXECUTION | EActionKey.STOP_TASK_EXECUTION | EActionKey.REDIRECT_TO_URL;
40
41
  export declare type TActionSetValue = TAction & {
41
42
  key: EActionKey.SET_VALUE;
42
43
  props: {
@@ -18,6 +18,7 @@ export declare enum EFieldType {
18
18
  SELECT = "select",
19
19
  DROPDOWN_WITH_SEARCH = "dropdown-with-search",
20
20
  API_CALL = "api-call",
21
+ API = "api",
21
22
  OTP = "otp",
22
23
  AADHAAR_NUMBER = "aadhaar-number",
23
24
  SLIDER = "slider",
@@ -91,7 +91,7 @@ export declare class KwikIDFormViewComponent implements OnInit, AfterViewInit {
91
91
  api: any;
92
92
  }>;
93
93
  executeApiCall(api: any, object: any): Promise<any>;
94
- validateHeadersAndBody(api: any): Promise<boolean>;
94
+ isValidRequestHeadersAndBody(api: any): boolean;
95
95
  showApiLoader(): void;
96
96
  hideApiLoader(): void;
97
97
  handleOnClickApiCall(e: any): Promise<void>;
@@ -133,6 +133,7 @@ export declare class KwikIDFormViewComponent implements OnInit, AfterViewInit {
133
133
  dialogRef: any;
134
134
  dialogShow(options: any): void;
135
135
  dialogHide(): void;
136
+ redirectToUrl(action: TAction): void;
136
137
  patchFieldControlValue(key: string, value: any): void;
137
138
  setFieldControlValue(key: string, value: any): void;
138
139
  patchFormGroup(formData: any): void;
@@ -144,10 +145,6 @@ export declare class KwikIDFormViewComponent implements OnInit, AfterViewInit {
144
145
  showPopupForm(popupFormKey: string, popupType?: "DIALOG" | "POPUP"): void;
145
146
  takeActionOnFieldGroup(action: TAction, object: any): Promise<void>;
146
147
  takeAction(action: TAction, object: any): Promise<void>;
147
- /**
148
- * Miscellaneous Methods for Debugging
149
- */
150
- logVariables(message: string, ...obj: any): void;
151
148
  static ɵfac: i0.ɵɵFactoryDeclaration<KwikIDFormViewComponent, never>;
152
149
  static ɵcmp: i0.ɵɵComponentDeclaration<KwikIDFormViewComponent, "kwikid-form-view", never, { "formConfig": "formConfig"; "formData": "formData"; "isMobileView": "isMobileView"; "allFormsData": "allFormsData"; "userConfig": "userConfig"; "apiCallResponse": "apiCallResponse"; "popupFormCallback": "popupFormCallback"; }, { "onClickGoBack": "onClickGoBack"; "onClickViewForms": "onClickViewForms"; "onClickSaveForm": "onClickSaveForm"; "onClickApiCall": "onClickApiCall"; "onActionShowPopupForm": "onActionShowPopupForm"; }, never, never>;
153
150
  }
@@ -1,15 +1,13 @@
1
1
  import * as i0 from "@angular/core";
2
2
  import * as i1 from "./form-view.component";
3
- import * as i2 from "./pipes/safe-html.pipe";
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";
3
+ import * as i2 from "@angular/common";
4
+ import * as i3 from "@angular/forms";
5
+ import * as i4 from "@taiga-ui/core";
6
+ import * as i5 from "@taiga-ui/kit";
7
+ import * as i6 from "@taiga-ui/addon-preview";
8
+ import * as i7 from "kwikui";
11
9
  export declare class KwikIDFormViewModule {
12
10
  static ɵfac: i0.ɵɵFactoryDeclaration<KwikIDFormViewModule, never>;
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]>;
11
+ static ɵmod: i0.ɵɵNgModuleDeclaration<KwikIDFormViewModule, [typeof i1.KwikIDFormViewComponent], [typeof i2.CommonModule, typeof i3.FormsModule, typeof i3.ReactiveFormsModule, typeof i4.TuiLabelModule, typeof i5.TuiPushModule, typeof i4.TuiSvgModule, typeof i6.TuiPreviewModule, typeof i4.TuiButtonModule, typeof i6.TuiPreviewActionModule, typeof i4.TuiDialogModule, typeof i7.KwikUIPipeModule, typeof i7.KwikUIModule], [typeof i1.KwikIDFormViewComponent]>;
14
12
  static ɵinj: i0.ɵɵInjectorDeclaration<KwikIDFormViewModule>;
15
13
  }
@@ -1,12 +1,11 @@
1
1
  import * as i0 from "@angular/core";
2
2
  import * as i1 from "./forms-list.component";
3
- import * as i2 from "./pipes/safe-html.pipe";
4
- import * as i3 from "@angular/common";
5
- import * as i4 from "@angular/forms";
6
- import * as i5 from "kwikui";
7
- import * as i6 from "@taiga-ui/core";
3
+ import * as i2 from "@angular/common";
4
+ import * as i3 from "@angular/forms";
5
+ import * as i4 from "kwikui";
6
+ import * as i5 from "@taiga-ui/core";
8
7
  export declare class KwikIDFormsListModule {
9
8
  static ɵfac: i0.ɵɵFactoryDeclaration<KwikIDFormsListModule, never>;
10
- static ɵmod: i0.ɵɵNgModuleDeclaration<KwikIDFormsListModule, [typeof i1.KwikIDFormsListComponent, typeof i2.SafeHtmlPipe], [typeof i3.CommonModule, typeof i4.FormsModule, typeof i4.ReactiveFormsModule, typeof i5.KwikUIModule, typeof i6.TuiSvgModule], [typeof i1.KwikIDFormsListComponent]>;
9
+ static ɵmod: i0.ɵɵNgModuleDeclaration<KwikIDFormsListModule, [typeof i1.KwikIDFormsListComponent], [typeof i2.CommonModule, typeof i3.FormsModule, typeof i3.ReactiveFormsModule, typeof i4.KwikUIPipeModule, typeof i4.KwikUIModule, typeof i5.TuiSvgModule], [typeof i1.KwikIDFormsListComponent]>;
11
10
  static ɵinj: i0.ɵɵInjectorDeclaration<KwikIDFormsListModule>;
12
11
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kwikid-forms",
3
- "version": "0.4.1",
3
+ "version": "0.5.2",
4
4
  "description": "Kwik.ID's JSON based Forms Builder and Renderer.",
5
5
  "author": {
6
6
  "name": "Baiju Dodhia"
@@ -20,8 +20,8 @@
20
20
  },
21
21
  "dependencies": {
22
22
  "jsonpath": "^1.1.1",
23
- "kwikid-toolkit": "^0.1.1",
24
- "kwikui": "^0.2.37",
23
+ "kwikid-toolkit": "^0.1.3",
24
+ "kwikui": "^0.2.38",
25
25
  "lodash": "^4.17.21",
26
26
  "tslib": "^2.2.0"
27
27
  },
package/public_api.d.ts CHANGED
@@ -1,10 +1,8 @@
1
1
  export * from "./lib/builder/builder.component";
2
- export * from "./lib/builder2/builder2.component";
3
2
  export * from "./lib/renderer/form-view/form-view.component";
4
3
  export * from "./lib/renderer/forms-list/forms-list.component";
5
4
  export * from "./lib/renderer/renderer.component";
6
5
  export * from "./lib/builder/builder.module";
7
- export * from "./lib/builder2/builder2.module";
8
6
  export * from "./lib/renderer/form-view/form-view.module";
9
7
  export * from "./lib/renderer/forms-list/forms-list.module";
10
8
  export * from "./lib/renderer/renderer.module";