special-forms 16.2.0 → 17.0.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.
Files changed (86) hide show
  1. package/esm2022/lib/components/index.mjs +13 -13
  2. package/esm2022/lib/components/special-autocomplete/special-autocomplete.component.mjs +75 -75
  3. package/esm2022/lib/components/special-autocomplete/special-autocomplete.interface.mjs +2 -2
  4. package/esm2022/lib/components/special-checkbox/special-checkbox.component.mjs +39 -36
  5. package/esm2022/lib/components/special-checkbox/special-checkbox.interface.mjs +3 -2
  6. package/esm2022/lib/components/special-datepicker/special-datepicker.component.mjs +43 -40
  7. package/esm2022/lib/components/special-datepicker/special-datepicker.interface.mjs +3 -2
  8. package/esm2022/lib/components/special-dropdown/special-dropdown.component.mjs +48 -47
  9. package/esm2022/lib/components/special-dropdown/special-dropdown.interface.mjs +3 -2
  10. package/esm2022/lib/components/special-form/special-form.component.mjs +99 -99
  11. package/esm2022/lib/components/special-form/special-form.module.mjs +78 -78
  12. package/esm2022/lib/components/special-input/special-input.component.mjs +56 -56
  13. package/esm2022/lib/components/special-input/special-input.interface.mjs +2 -2
  14. package/esm2022/lib/components/special-label/special-label.component.mjs +27 -27
  15. package/esm2022/lib/components/special-label/special-label.interface.mjs +2 -2
  16. package/esm2022/lib/components/special-multiple-autocomplete/special-multiple-autocomplete.component.mjs +97 -97
  17. package/esm2022/lib/components/special-multiple-autocomplete/special-multiple-autocomplete.interface.mjs +2 -2
  18. package/esm2022/lib/components/special-richtext/special-richtext.component.mjs +54 -45
  19. package/esm2022/lib/components/special-richtext/special-richtext.interface.mjs +3 -2
  20. package/esm2022/lib/components/special-text-area/special-text-area.component.mjs +44 -44
  21. package/esm2022/lib/components/special-text-area/special-text-area.interface.mjs +2 -2
  22. package/esm2022/lib/components/special-upload/special-upload.component.mjs +84 -84
  23. package/esm2022/lib/components/special-upload/special-upload.interface.mjs +2 -2
  24. package/esm2022/lib/core/aux-data/control-types.enum.mjs +17 -17
  25. package/esm2022/lib/core/aux-data/input-types.mjs +15 -15
  26. package/esm2022/lib/core/forms/special-forms.mjs +240 -260
  27. package/esm2022/lib/core/interfaces/field-basics.interfaces.mjs +1 -1
  28. package/esm2022/lib/core/interfaces/form.interfaces.mjs +2 -2
  29. package/esm2022/lib/core/interfaces/special-control.interface.mjs +2 -2
  30. package/esm2022/lib/core/masks/currency.mask.mjs +10 -10
  31. package/esm2022/lib/core/masks/index.mjs +2 -2
  32. package/esm2022/lib/core/masks/number.mask.mjs +2 -2
  33. package/esm2022/lib/core/pipes/controls-list-pipe/controls-list.pipe.mjs +17 -17
  34. package/esm2022/lib/core/pipes/error-message-pipe/error.pipe.mjs +22 -22
  35. package/esm2022/lib/core/pipes/index.mjs +3 -3
  36. package/esm2022/lib/core/pipes/text-by-function/text-by-function.pipe.mjs +21 -21
  37. package/esm2022/lib/core/services/error-state-matcher/error-matcher.mjs +12 -12
  38. package/esm2022/lib/core/services/index.mjs +3 -3
  39. package/esm2022/lib/core/services/special-form-builder/special-form-builder.service.mjs +156 -156
  40. package/esm2022/public-api.mjs +12 -12
  41. package/esm2022/special-forms.mjs +4 -4
  42. package/fesm2022/special-forms.mjs +1018 -1024
  43. package/fesm2022/special-forms.mjs.map +1 -1
  44. package/index.d.ts +5 -5
  45. package/lib/components/index.d.ts +23 -23
  46. package/lib/components/special-autocomplete/special-autocomplete.component.d.ts +19 -19
  47. package/lib/components/special-autocomplete/special-autocomplete.interface.d.ts +19 -18
  48. package/lib/components/special-checkbox/special-checkbox.component.d.ts +12 -11
  49. package/lib/components/special-checkbox/special-checkbox.interface.d.ts +13 -12
  50. package/lib/components/special-datepicker/special-datepicker.component.d.ts +13 -12
  51. package/lib/components/special-datepicker/special-datepicker.interface.d.ts +12 -11
  52. package/lib/components/special-dropdown/special-dropdown.component.d.ts +11 -11
  53. package/lib/components/special-dropdown/special-dropdown.interface.d.ts +17 -16
  54. package/lib/components/special-form/special-form.component.d.ts +31 -31
  55. package/lib/components/special-form/special-form.module.d.ts +20 -20
  56. package/lib/components/special-input/special-input.component.d.ts +15 -15
  57. package/lib/components/special-input/special-input.interface.d.ts +17 -16
  58. package/lib/components/special-label/special-label.component.d.ts +13 -13
  59. package/lib/components/special-label/special-label.interface.d.ts +13 -12
  60. package/lib/components/special-multiple-autocomplete/special-multiple-autocomplete.component.d.ts +22 -22
  61. package/lib/components/special-multiple-autocomplete/special-multiple-autocomplete.interface.d.ts +19 -18
  62. package/lib/components/special-richtext/special-richtext.component.d.ts +17 -17
  63. package/lib/components/special-richtext/special-richtext.interface.d.ts +10 -9
  64. package/lib/components/special-text-area/special-text-area.component.d.ts +13 -13
  65. package/lib/components/special-text-area/special-text-area.interface.d.ts +8 -7
  66. package/lib/components/special-upload/special-upload.component.d.ts +21 -21
  67. package/lib/components/special-upload/special-upload.interface.d.ts +12 -11
  68. package/lib/core/aux-data/control-types.enum.d.ts +16 -16
  69. package/lib/core/aux-data/input-types.d.ts +2 -2
  70. package/lib/core/forms/special-forms.d.ts +108 -123
  71. package/lib/core/interfaces/field-basics.interfaces.d.ts +22 -22
  72. package/lib/core/interfaces/form.interfaces.d.ts +58 -55
  73. package/lib/core/interfaces/special-control.interface.d.ts +4 -4
  74. package/lib/core/masks/currency.mask.d.ts +1 -1
  75. package/lib/core/masks/index.d.ts +2 -2
  76. package/lib/core/masks/number.mask.d.ts +1 -1
  77. package/lib/core/pipes/controls-list-pipe/controls-list.pipe.d.ts +11 -11
  78. package/lib/core/pipes/error-message-pipe/error.pipe.d.ts +12 -12
  79. package/lib/core/pipes/index.d.ts +3 -3
  80. package/lib/core/pipes/text-by-function/text-by-function.pipe.d.ts +7 -7
  81. package/lib/core/services/error-state-matcher/error-matcher.d.ts +8 -8
  82. package/lib/core/services/index.d.ts +3 -3
  83. package/lib/core/services/special-form-builder/special-form-builder.service.d.ts +25 -25
  84. package/lib/styles/tailwind-final.scss +31 -0
  85. package/package.json +9 -9
  86. package/public-api.d.ts +9 -9
@@ -1,17 +1,17 @@
1
- import { OnInit } from '@angular/core';
2
- import { SpecialFormControl } from '../../core/forms/special-forms';
3
- import { IRichTextSettings } from './special-richtext.interface';
4
- import { Toolbar, Editor } from 'ngx-editor';
5
- import * as i0 from "@angular/core";
6
- export declare class SpecialRichtextComponent implements OnInit {
7
- editor: Editor;
8
- formControl: SpecialFormControl<IRichTextSettings>;
9
- colorPresets: string[];
10
- set control(control: SpecialFormControl<IRichTextSettings>);
11
- toolbar: Toolbar;
12
- constructor();
13
- ngOnInit(): void;
14
- ngOnDestroy(): void;
15
- static ɵfac: i0.ɵɵFactoryDeclaration<SpecialRichtextComponent, never>;
16
- static ɵcmp: i0.ɵɵComponentDeclaration<SpecialRichtextComponent, "sp-input", never, { "control": { "alias": "control"; "required": false; }; }, {}, never, never, true, never>;
17
- }
1
+ import { OnInit } from '@angular/core';
2
+ import { SpecialFormControl } from '../../core/forms/special-forms';
3
+ import { IRichTextField } from './special-richtext.interface';
4
+ import { Toolbar, Editor } from 'ngx-editor';
5
+ import * as i0 from "@angular/core";
6
+ export declare class SpecialRichtextComponent implements OnInit {
7
+ editor: Editor;
8
+ formControl: SpecialFormControl<IRichTextField>;
9
+ colorPresets: string[];
10
+ set control(control: SpecialFormControl<IRichTextField>);
11
+ toolbar: Toolbar;
12
+ constructor();
13
+ ngOnInit(): void;
14
+ ngOnDestroy(): void;
15
+ static ɵfac: i0.ɵɵFactoryDeclaration<SpecialRichtextComponent, never>;
16
+ static ɵcmp: i0.ɵɵComponentDeclaration<SpecialRichtextComponent, "sp-input", never, { "control": { "alias": "control"; "required": false; }; }, {}, never, never, true, never>;
17
+ }
@@ -1,9 +1,10 @@
1
- import { EControlTypes } from '../../core/aux-data/control-types.enum';
2
- import { IFieldData } from '../../core/interfaces/field-basics.interfaces';
3
- export type IRichTextSettings = {
4
- colorPresets: string[];
5
- };
6
- export interface IRichTextField extends IFieldData {
7
- settings: IRichTextSettings;
8
- type: EControlTypes.richText;
9
- }
1
+ import { EControlTypes } from '../../core/aux-data/control-types.enum';
2
+ import { IFieldData } from '../../core/interfaces/field-basics.interfaces';
3
+ export interface IRichTextSettings {
4
+ colorPresets: string[];
5
+ }
6
+ export interface IRichTextField extends IFieldData {
7
+ settings: IRichTextSettings;
8
+ type: EControlTypes.richText;
9
+ defaultValue: string;
10
+ }
@@ -1,13 +1,13 @@
1
- import { EventEmitter, OnInit } from '@angular/core';
2
- import { SpecialFormControl } from '../../core/forms/special-forms';
3
- import { ITextAreaField } from './special-text-area.interface';
4
- import * as i0 from "@angular/core";
5
- export declare class SpecialTextAreaComponent implements OnInit {
6
- control: SpecialFormControl<ITextAreaField>;
7
- onBlur: EventEmitter<any>;
8
- onEnter: EventEmitter<any>;
9
- constructor();
10
- ngOnInit(): void;
11
- static ɵfac: i0.ɵɵFactoryDeclaration<SpecialTextAreaComponent, never>;
12
- static ɵcmp: i0.ɵɵComponentDeclaration<SpecialTextAreaComponent, "sp-text-area", never, { "control": { "alias": "control"; "required": false; }; }, { "onBlur": "onBlur"; "onEnter": "onEnter"; }, never, never, true, never>;
13
- }
1
+ import { EventEmitter, OnInit } from '@angular/core';
2
+ import { SpecialFormControl } from '../../core/forms/special-forms';
3
+ import { ITextAreaField } from './special-text-area.interface';
4
+ import * as i0 from "@angular/core";
5
+ export declare class SpecialTextAreaComponent implements OnInit {
6
+ control: SpecialFormControl<ITextAreaField>;
7
+ onBlur: EventEmitter<any>;
8
+ onEnter: EventEmitter<any>;
9
+ constructor();
10
+ ngOnInit(): void;
11
+ static ɵfac: i0.ɵɵFactoryDeclaration<SpecialTextAreaComponent, never>;
12
+ static ɵcmp: i0.ɵɵComponentDeclaration<SpecialTextAreaComponent, "sp-text-area", never, { "control": { "alias": "control"; "required": false; }; }, { "onBlur": "onBlur"; "onEnter": "onEnter"; }, never, never, true, never>;
13
+ }
@@ -1,7 +1,8 @@
1
- import { EControlTypes } from '../../core/aux-data/control-types.enum';
2
- import { IFieldData } from '../../core/interfaces/field-basics.interfaces';
3
- export type ITextAreaSettings = {};
4
- export interface ITextAreaField extends IFieldData {
5
- settings: ITextAreaSettings;
6
- type: EControlTypes.textArea;
7
- }
1
+ import { EControlTypes } from '../../core/aux-data/control-types.enum';
2
+ import { IFieldData } from '../../core/interfaces/field-basics.interfaces';
3
+ export type ITextAreaSettings = {};
4
+ export interface ITextAreaField extends IFieldData {
5
+ settings: ITextAreaSettings;
6
+ type: EControlTypes.textArea;
7
+ defaultValue: string;
8
+ }
@@ -1,21 +1,21 @@
1
- import { OnInit } from '@angular/core';
2
- import { SpecialFormControl } from '../../core/forms/special-forms';
3
- import { IUploadSettings } from './special-upload.interface';
4
- import { DomSanitizer } from '@angular/platform-browser';
5
- import * as i0 from "@angular/core";
6
- export declare class SpecialUploadComponent implements OnInit {
7
- private sanitizer;
8
- control: SpecialFormControl<IUploadSettings>;
9
- set controlSetter(control: SpecialFormControl<IUploadSettings>);
10
- previewImages: any[];
11
- constructor(sanitizer: DomSanitizer);
12
- ngOnInit(): void;
13
- onSelectMultiple(event: any): void;
14
- onSelectOne(event: any): void;
15
- private onselectFile;
16
- fixFileName(file: File): File;
17
- clean(): void;
18
- onRemove(file: File): void;
19
- static ɵfac: i0.ɵɵFactoryDeclaration<SpecialUploadComponent, never>;
20
- static ɵcmp: i0.ɵɵComponentDeclaration<SpecialUploadComponent, "sp-upload", never, { "controlSetter": { "alias": "control"; "required": false; }; }, {}, never, never, true, never>;
21
- }
1
+ import { OnInit } from '@angular/core';
2
+ import { SpecialFormControl } from '../../core/forms/special-forms';
3
+ import { IUploadField } from './special-upload.interface';
4
+ import { DomSanitizer } from '@angular/platform-browser';
5
+ import * as i0 from "@angular/core";
6
+ export declare class SpecialUploadComponent implements OnInit {
7
+ private sanitizer;
8
+ control: SpecialFormControl<IUploadField>;
9
+ set controlSetter(control: SpecialFormControl<IUploadField>);
10
+ previewImages: any[];
11
+ constructor(sanitizer: DomSanitizer);
12
+ ngOnInit(): void;
13
+ onSelectMultiple(event: any): void;
14
+ onSelectOne(event: any): void;
15
+ private onselectFile;
16
+ fixFileName(file: File): File;
17
+ clean(): void;
18
+ onRemove(file: File): void;
19
+ static ɵfac: i0.ɵɵFactoryDeclaration<SpecialUploadComponent, never>;
20
+ static ɵcmp: i0.ɵɵComponentDeclaration<SpecialUploadComponent, "sp-upload", never, { "controlSetter": { "alias": "control"; "required": false; }; }, {}, never, never, true, never>;
21
+ }
@@ -1,11 +1,12 @@
1
- import { EControlTypes } from '../../core/aux-data/control-types.enum';
2
- import { IFieldData } from '../../core/interfaces/field-basics.interfaces';
3
- export type IUploadSettings = {
4
- accept?: string;
5
- multiple?: boolean;
6
- onSelectFile?: (value: any) => void;
7
- };
8
- export interface IUploadField extends IFieldData {
9
- settings: IUploadSettings;
10
- type: EControlTypes.upload;
11
- }
1
+ import { EControlTypes } from '../../core/aux-data/control-types.enum';
2
+ import { IFieldData } from '../../core/interfaces/field-basics.interfaces';
3
+ export type IUploadSettings = {
4
+ accept?: string;
5
+ multiple?: boolean;
6
+ onSelectFile?: (value: any) => void;
7
+ };
8
+ export interface IUploadField extends IFieldData {
9
+ settings: IUploadSettings;
10
+ type: EControlTypes.upload;
11
+ defaultValue: any;
12
+ }
@@ -1,16 +1,16 @@
1
- export declare enum EControlTypes {
2
- pkey = "PRIMARY-KEY",
3
- input = "INPUT",
4
- richText = "RICH-TEXT",
5
- textArea = "TEXT-AREA",
6
- dropdown = "DROPDOWN",
7
- date = "DATE",
8
- checkbox = "CHECKBOX",
9
- upload = "UPLOAD",
10
- autocomplete = "AUTOCOMPLETE",
11
- multiple = "MULTIPLE-AUTOCOMPLETE",
12
- array = "ARRAY",
13
- form = "FORM",
14
- label = "LABEL",
15
- default = "DEFAULT"
16
- }
1
+ export declare enum EControlTypes {
2
+ pkey = "PRIMARY-KEY",
3
+ input = "INPUT",
4
+ richText = "RICH-TEXT",
5
+ textArea = "TEXT-AREA",
6
+ dropdown = "DROPDOWN",
7
+ date = "DATE",
8
+ checkbox = "CHECKBOX",
9
+ upload = "UPLOAD",
10
+ autocomplete = "AUTOCOMPLETE",
11
+ multiple = "MULTIPLE-AUTOCOMPLETE",
12
+ array = "ARRAY",
13
+ form = "FORM",
14
+ label = "LABEL",
15
+ default = "DEFAULT"
16
+ }
@@ -1,2 +1,2 @@
1
- export declare const InputTypes: readonly ["color", "date", "datetime-local", "email", "month", "number", "password", "search", "tel", "text", "time", "url", "week"];
2
- export type TInputTypes = typeof InputTypes[number];
1
+ export declare const InputTypes: readonly ["color", "date", "datetime-local", "email", "month", "number", "password", "search", "tel", "text", "time", "url", "week"];
2
+ export type TInputTypes = typeof InputTypes[number];
@@ -1,123 +1,108 @@
1
- import { AbstractControl, FormArray, FormControl, FormGroup } from '@angular/forms';
2
- import { EControlTypes } from '../aux-data/control-types.enum';
3
- import { IFieldBasicData } from '../interfaces/field-basics.interfaces';
4
- import { IArraySettings, IFormSettings, TSpecialFields, TSpecialForm, TSpecialArray } from '../interfaces/form.interfaces';
5
- export declare class SpecialFormControl<T> extends FormControl implements IFieldBasicData {
6
- name: string;
7
- placeholder: string;
8
- label: string;
9
- tooltip: string;
10
- icon: string;
11
- elementId: string;
12
- styleClasses: string;
13
- length: number;
14
- required: boolean;
15
- hidden: boolean;
16
- readOnly: boolean;
17
- settings: T;
18
- type: EControlTypes;
19
- errorMessages: {
20
- [key: string]: string;
21
- };
22
- constructor({ name, settings, type, validators, asyncValidators, elementId, styleClasses, defaultValue, hidden, icon, label, length, placeholder, readOnly, required, tooltip, errorMessages, disabled, }: TSpecialFields);
23
- markAsDirty(opts?: {
24
- onlySelf?: boolean;
25
- }): void;
26
- markAsPristine(opts?: {
27
- onlySelf?: boolean;
28
- }): void;
29
- markAsTouched(opts?: {
30
- onlySelf?: boolean;
31
- }): void;
32
- markAsUntouched(opts?: {
33
- onlySelf?: boolean;
34
- }): void;
35
- markAllAsTouched(): void;
36
- setReadOnly(status?: boolean): void;
37
- setDisabled(status?: boolean): void;
38
- setHidden(status?: boolean): void;
39
- }
40
- export declare class SpecialFormGroup extends FormGroup implements IFieldBasicData {
41
- name: string;
42
- placeholder: string;
43
- label: string;
44
- tooltip: string;
45
- icon: string;
46
- elementId: string;
47
- styleClasses: string;
48
- length: number;
49
- required: boolean;
50
- hidden: boolean;
51
- readOnly: boolean;
52
- settings: IFormSettings;
53
- type: EControlTypes.form;
54
- defaultValue: any;
55
- errorMessages: {
56
- [key: string]: string;
57
- };
58
- constructor({ name, settings, type, validators, asyncValidators, elementId, styleClasses, defaultValue, hidden, icon, label, length, placeholder, readOnly, required, tooltip, disabled, }: TSpecialForm, controls: {
59
- [key: string]: SpecialFormControl<any>;
60
- });
61
- getDirty(): void;
62
- specialReset(value?: {}): void;
63
- setReadOnly(status?: boolean): void;
64
- setReadOnlyByFields(fieldsObject: {
65
- [key: string]: boolean;
66
- }): void;
67
- setHiddenByFields(fields: {
68
- [key: string]: boolean;
69
- }): void;
70
- setDisabled(status: boolean): void;
71
- setDisabledByFields(fieldsObject: any): void;
72
- /**
73
- * donde value es el objeto semilla y detailForm es un arreglo de form key para dar un marco al formarray
74
- */
75
- setFormValue(value: any): void;
76
- /**
77
- * Método que retorna
78
- */
79
- getIdPkey(): SpecialFormControl<any> | undefined;
80
- }
81
- export declare class SpecialFormArray extends FormArray implements IFieldBasicData {
82
- name: string;
83
- placeholder: string;
84
- label: string;
85
- tooltip: string;
86
- icon: string;
87
- elementId: string;
88
- styleClasses: string;
89
- required: boolean;
90
- hidden: boolean;
91
- readOnly: boolean;
92
- settings: IArraySettings;
93
- type: EControlTypes;
94
- defaultValue: any;
95
- form: SpecialFormGroup;
96
- private formCreation;
97
- errorMessages: {
98
- [key: string]: string;
99
- };
100
- constructor({ name, settings, type, validators, asyncValidators, elementId, styleClasses, defaultValue, hidden, icon, label, placeholder, readOnly, required, tooltip, errorMessages, disabled, }: TSpecialArray, formCreation: () => SpecialFormGroup, controls: AbstractControl[]);
101
- fillFormArray(data: any[]): void;
102
- addItem(): void;
103
- specialPush(index?: number): void;
104
- specialInsert(index?: number): void;
105
- specialEdit(index: number, newValue: Object): void;
106
- /**
107
- * Vuelve todos los controles del formArray de lectura o de sololectura
108
- * @param status
109
- */
110
- setReadOnly(status: boolean): void;
111
- /**
112
- * Vuelve todos los controles del formArray habilitados o deshabilitados
113
- * @param status
114
- */
115
- setDisabled(status: boolean): void;
116
- /**
117
- * Permite editar un control especifico.
118
- * @param index
119
- */
120
- editControl(index: number): void;
121
- getDirty(): void;
122
- recursiveFillForm(form: FormGroup, data: any): FormGroup;
123
- }
1
+ import { AbstractControl, FormArray, FormControl, FormGroup } from '@angular/forms';
2
+ import { EControlTypes } from '../aux-data/control-types.enum';
3
+ import { IFieldBasicData } from '../interfaces/field-basics.interfaces';
4
+ import { IArraySettings, IFormSettings, TSpecialFields, TSpecialForm, TSpecialArray, TRawFields } from '../interfaces/form.interfaces';
5
+ export declare class SpecialFormControl<T extends TRawFields> extends FormControl {
6
+ name: string;
7
+ placeholder: T['placeholder'];
8
+ label: T['label'];
9
+ tooltip: T['tooltip'];
10
+ icon: T['icon'];
11
+ elementId: T['elementId'];
12
+ styleClasses: T['styleClasses'];
13
+ length: T['length'];
14
+ required: T['required'];
15
+ hidden: T['hidden'];
16
+ readOnly: T['readOnly'];
17
+ settings: T['settings'];
18
+ type: T['type'];
19
+ errorMessages: T['errorMessages'];
20
+ constructor({ name, settings, type, validators, asyncValidators, elementId, styleClasses, defaultValue, hidden, icon, label, length, placeholder, readOnly, required, tooltip, errorMessages, disabled, }: TSpecialFields);
21
+ setReadOnly(status?: boolean): void;
22
+ setDisabled(status?: boolean): void;
23
+ setHidden(status?: boolean): void;
24
+ }
25
+ export declare class SpecialFormGroup extends FormGroup {
26
+ name: string;
27
+ placeholder: string;
28
+ label: string;
29
+ tooltip: string;
30
+ icon: string;
31
+ elementId: string;
32
+ styleClasses: string;
33
+ length: number;
34
+ required: boolean;
35
+ hidden: boolean;
36
+ readOnly: boolean;
37
+ settings: IFormSettings;
38
+ type: EControlTypes.form;
39
+ defaultValue: any;
40
+ errorMessages: {
41
+ [key: string]: string;
42
+ };
43
+ constructor({ name, settings, type, validators, asyncValidators, elementId, styleClasses, defaultValue, hidden, icon, label, length, placeholder, readOnly, required, tooltip, disabled, }: TSpecialForm, controls: {
44
+ [key: string]: SpecialFormControl<any>;
45
+ });
46
+ getDirty(): void;
47
+ specialReset(value?: {}): void;
48
+ setReadOnly(status?: boolean): void;
49
+ setReadOnlyByFields(fieldsObject: {
50
+ [key: string]: boolean;
51
+ }): void;
52
+ setHiddenByFields(fields: {
53
+ [key: string]: boolean;
54
+ }): void;
55
+ setDisabled(status: boolean): void;
56
+ setDisabledByFields(fieldsObject: any): void;
57
+ /**
58
+ * donde value es el objeto semilla y detailForm es un arreglo de form key para dar un marco al formarray
59
+ */
60
+ setFormValue(value: any): void;
61
+ /**
62
+ * Método que retorna
63
+ */
64
+ getIdPkey(): SpecialFormControl<any> | undefined;
65
+ }
66
+ export declare class SpecialFormArray extends FormArray implements IFieldBasicData {
67
+ name: string;
68
+ placeholder: string;
69
+ label: string;
70
+ tooltip: string;
71
+ icon: string;
72
+ elementId: string;
73
+ styleClasses: string;
74
+ required: boolean;
75
+ hidden: boolean;
76
+ readOnly: boolean;
77
+ settings: IArraySettings;
78
+ type: EControlTypes;
79
+ defaultValue: any;
80
+ form: SpecialFormGroup;
81
+ private formCreation;
82
+ errorMessages: {
83
+ [key: string]: string;
84
+ };
85
+ constructor({ name, settings, type, validators, asyncValidators, elementId, styleClasses, defaultValue, hidden, icon, label, placeholder, readOnly, required, tooltip, errorMessages, disabled, }: TSpecialArray, formCreation: () => SpecialFormGroup, controls: AbstractControl[]);
86
+ fillFormArray(data: any[]): void;
87
+ addItem(): void;
88
+ specialPush(index?: number): void;
89
+ specialInsert(index?: number): void;
90
+ specialEdit(index: number, newValue: Object): void;
91
+ /**
92
+ * Vuelve todos los controles del formArray de lectura o de sololectura
93
+ * @param status
94
+ */
95
+ setReadOnly(status: boolean): void;
96
+ /**
97
+ * Vuelve todos los controles del formArray habilitados o deshabilitados
98
+ * @param status
99
+ */
100
+ setDisabled(status: boolean): void;
101
+ /**
102
+ * Permite editar un control especifico.
103
+ * @param index
104
+ */
105
+ editControl(index: number): void;
106
+ getDirty(): void;
107
+ recursiveFillForm(form: FormGroup, data: any): FormGroup;
108
+ }
@@ -1,22 +1,22 @@
1
- import { AsyncValidatorFn, ValidatorFn } from '@angular/forms';
2
- export interface IFieldBasicData {
3
- placeholder: string;
4
- label: string;
5
- tooltip: string;
6
- icon: string;
7
- elementId: string;
8
- styleClasses: string;
9
- length: number;
10
- required: boolean;
11
- hidden: boolean;
12
- readOnly: boolean;
13
- disabled: boolean;
14
- errorMessages: {
15
- [key: string]: string;
16
- };
17
- }
18
- export interface IFieldData extends IFieldBasicData {
19
- validators: ValidatorFn | ValidatorFn[] | null;
20
- asyncValidators: AsyncValidatorFn | AsyncValidatorFn[] | null;
21
- defaultValue: any;
22
- }
1
+ import { AsyncValidatorFn, ValidatorFn } from '@angular/forms';
2
+ export interface IFieldBasicData {
3
+ placeholder: string;
4
+ label: string;
5
+ tooltip: string;
6
+ icon: string;
7
+ elementId: string;
8
+ styleClasses: string;
9
+ length: number;
10
+ required: boolean;
11
+ hidden: boolean;
12
+ readOnly: boolean;
13
+ disabled: boolean;
14
+ errorMessages: {
15
+ [key: string]: string;
16
+ };
17
+ }
18
+ export interface IFieldData extends IFieldBasicData {
19
+ validators: ValidatorFn | ValidatorFn[] | null;
20
+ asyncValidators: AsyncValidatorFn | AsyncValidatorFn[] | null;
21
+ defaultValue: any;
22
+ }
@@ -1,55 +1,58 @@
1
- import { IAutocompleteField } from '../../components/special-autocomplete/special-autocomplete.interface';
2
- import { IDatePickerField } from '../../components/special-datepicker/special-datepicker.interface';
3
- import { IDropdownField } from '../../components/special-dropdown/special-dropdown.interface';
4
- import { IInputField } from '../../components/special-input/special-input.interface';
5
- import { ICheckboxField } from '../../components/special-checkbox/special-checkbox.interface';
6
- import { IMultipleAutocompleteField } from '../../components/special-multiple-autocomplete/special-multiple-autocomplete.interface';
7
- import { EControlTypes } from '../aux-data/control-types.enum';
8
- import { IFieldData } from './field-basics.interfaces';
9
- import { ITextAreaField } from '../../components/special-text-area/special-text-area.interface';
10
- import { IUploadField } from '../../components/special-upload/special-upload.interface';
11
- import { ILabelField } from '../../components/special-label/special-label.interface';
12
- import { IRichTextField } from '../../components/special-richtext/special-richtext.interface';
13
- interface IcontrolName {
14
- name: string;
15
- }
16
- export type IFormSettings = {
17
- formFields: IFormStructure;
18
- };
19
- export interface IFormField extends IFieldData {
20
- settings: IFormSettings;
21
- type: EControlTypes.form;
22
- }
23
- export type IArraySettings = {
24
- addActionLabel?: string;
25
- removeActionLabel?: string;
26
- formFields: IFormStructure;
27
- withFormHeader?: boolean;
28
- withActionButtons?: boolean;
29
- };
30
- export interface IArrayField extends IFieldData {
31
- settings: IArraySettings;
32
- type: EControlTypes.array;
33
- }
34
- export interface IDefaultField extends IFieldData {
35
- settings: any;
36
- type: EControlTypes.default;
37
- }
38
- export type TRawFields = IDefaultField | IInputField | IRichTextField | IDropdownField | IArrayField | IFormField | IAutocompleteField | IMultipleAutocompleteField | IDatePickerField | ITextAreaField | IUploadField | ILabelField | ICheckboxField;
39
- export type TSpecialInput = IInputField & IcontrolName;
40
- export type TSpecialDefault = IDefaultField & IcontrolName;
41
- export type TSpecialDropdown = IDropdownField & IcontrolName;
42
- export type TSpecialArray = IArrayField & IcontrolName;
43
- export type TSpecialForm = IFormField & IcontrolName;
44
- export type TSpecialRichText = IRichTextField & IcontrolName;
45
- export type TSpecialAutocomplete = IAutocompleteField & IcontrolName;
46
- export type TSpecialDatepicker = IDatePickerField & IcontrolName;
47
- export type ISpecialCheckbox = ICheckboxField & IcontrolName;
48
- export type ISpecialTextArea = ITextAreaField & IcontrolName;
49
- export type ISpecialLabel = ILabelField & IcontrolName;
50
- export type ISpecialUpload = IUploadField & IcontrolName;
51
- export type TSpecialFields = TSpecialDefault | TSpecialInput | TSpecialDropdown | TSpecialArray | TSpecialForm | TSpecialRichText | TSpecialAutocomplete | ISpecialCheckbox | ISpecialTextArea | ISpecialUpload | ISpecialLabel | TSpecialDatepicker;
52
- export interface IFormStructure {
53
- [name: string]: Partial<TRawFields>;
54
- }
55
- export {};
1
+ import { IAutocompleteField } from '../../components/special-autocomplete/special-autocomplete.interface';
2
+ import { IDatePickerField } from '../../components/special-datepicker/special-datepicker.interface';
3
+ import { IDropdownField } from '../../components/special-dropdown/special-dropdown.interface';
4
+ import { IInputField } from '../../components/special-input/special-input.interface';
5
+ import { ICheckboxField } from '../../components/special-checkbox/special-checkbox.interface';
6
+ import { IMultipleAutocompleteField } from '../../components/special-multiple-autocomplete/special-multiple-autocomplete.interface';
7
+ import { EControlTypes } from '../aux-data/control-types.enum';
8
+ import { IFieldData } from './field-basics.interfaces';
9
+ import { ITextAreaField } from '../../components/special-text-area/special-text-area.interface';
10
+ import { IUploadField } from '../../components/special-upload/special-upload.interface';
11
+ import { ILabelField } from '../../components/special-label/special-label.interface';
12
+ import { IRichTextField } from '../../components/special-richtext/special-richtext.interface';
13
+ interface IcontrolName {
14
+ name: string;
15
+ }
16
+ export type IFormSettings = {
17
+ formFields: IFormStructure;
18
+ };
19
+ export interface IFormField<T = any> extends IFieldData {
20
+ settings: IFormSettings;
21
+ type: EControlTypes.form;
22
+ defaultValue: T;
23
+ }
24
+ export type IArraySettings = {
25
+ addActionLabel?: string;
26
+ removeActionLabel?: string;
27
+ formFields: IFormStructure;
28
+ withFormHeader?: boolean;
29
+ withActionButtons?: boolean;
30
+ };
31
+ export interface IArrayField<T = any> extends IFieldData {
32
+ settings: IArraySettings;
33
+ type: EControlTypes.array;
34
+ defaultValue: T[];
35
+ }
36
+ export interface IDefaultField extends IFieldData {
37
+ settings: any;
38
+ type: EControlTypes.default;
39
+ defaultValue: any;
40
+ }
41
+ export type TRawFields = IDefaultField | IInputField | IRichTextField | IDropdownField | IArrayField | IFormField | IAutocompleteField | IMultipleAutocompleteField | IDatePickerField | ITextAreaField | IUploadField | ILabelField | ICheckboxField;
42
+ export type TSpecialInput = IInputField & IcontrolName;
43
+ export type TSpecialDefault = IDefaultField & IcontrolName;
44
+ export type TSpecialDropdown = IDropdownField & IcontrolName;
45
+ export type TSpecialArray = IArrayField & IcontrolName;
46
+ export type TSpecialForm = IFormField & IcontrolName;
47
+ export type TSpecialRichText = IRichTextField & IcontrolName;
48
+ export type TSpecialAutocomplete = IAutocompleteField & IcontrolName;
49
+ export type TSpecialDatepicker = IDatePickerField & IcontrolName;
50
+ export type ISpecialCheckbox = ICheckboxField & IcontrolName;
51
+ export type ISpecialTextArea = ITextAreaField & IcontrolName;
52
+ export type ISpecialLabel = ILabelField & IcontrolName;
53
+ export type ISpecialUpload = IUploadField & IcontrolName;
54
+ export type TSpecialFields = TSpecialDefault | TSpecialInput | TSpecialDropdown | TSpecialArray | TSpecialForm | TSpecialRichText | TSpecialAutocomplete | ISpecialCheckbox | ISpecialTextArea | ISpecialUpload | ISpecialLabel | TSpecialDatepicker;
55
+ export interface IFormStructure {
56
+ [name: string]: Partial<TRawFields>;
57
+ }
58
+ export {};
@@ -1,4 +1,4 @@
1
- import { SpecialFormControl, SpecialFormArray, SpecialFormGroup } from '../forms/special-forms';
2
- export declare abstract class ISpecialControl {
3
- control: SpecialFormControl<any> | SpecialFormArray | SpecialFormGroup;
4
- }
1
+ import { SpecialFormControl, SpecialFormArray, SpecialFormGroup } from '../forms/special-forms';
2
+ export declare abstract class ISpecialControl {
3
+ control: SpecialFormControl<any> | SpecialFormArray | SpecialFormGroup;
4
+ }
@@ -1 +1 @@
1
- export declare const currencyInputMask: any;
1
+ export declare const currencyInputMask: any;
@@ -1,2 +1,2 @@
1
- export { currencyInputMask } from './currency.mask';
2
- export { numberMask } from './number.mask';
1
+ export { currencyInputMask } from './currency.mask';
2
+ export { numberMask } from './number.mask';
@@ -1 +1 @@
1
- export declare const numberMask: (max?: number) => any;
1
+ export declare const numberMask: (max?: number) => any;