special-forms 16.2.1 → 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,11 +1,11 @@
1
- import { PipeTransform } from '@angular/core';
2
- import { AbstractControl } from '@angular/forms';
3
- import { SpecialFormControl } from '../../forms/special-forms';
4
- import * as i0 from "@angular/core";
5
- export declare class FormControlsListPipe implements PipeTransform {
6
- transform(controls: {
7
- [key: string]: AbstractControl;
8
- }): SpecialFormControl<any>[];
9
- static ɵfac: i0.ɵɵFactoryDeclaration<FormControlsListPipe, never>;
10
- static ɵpipe: i0.ɵɵPipeDeclaration<FormControlsListPipe, "controlsList", true>;
11
- }
1
+ import { PipeTransform } from '@angular/core';
2
+ import { AbstractControl } from '@angular/forms';
3
+ import { SpecialFormControl } from '../../forms/special-forms';
4
+ import * as i0 from "@angular/core";
5
+ export declare class FormControlsListPipe implements PipeTransform {
6
+ transform(controls: {
7
+ [key: string]: AbstractControl;
8
+ }): SpecialFormControl<any>[];
9
+ static ɵfac: i0.ɵɵFactoryDeclaration<FormControlsListPipe, never>;
10
+ static ɵpipe: i0.ɵɵPipeDeclaration<FormControlsListPipe, "controlsList", true>;
11
+ }
@@ -1,12 +1,12 @@
1
- import { PipeTransform } from "@angular/core";
2
- import { FormControl } from "@angular/forms";
3
- import * as i0 from "@angular/core";
4
- export declare class ErrorMessagePipe implements PipeTransform {
5
- transform(errorsObj: {
6
- [key: string]: any;
7
- }, errorMessages: {
8
- [key: string]: any;
9
- }, control?: FormControl): any;
10
- static ɵfac: i0.ɵɵFactoryDeclaration<ErrorMessagePipe, never>;
11
- static ɵpipe: i0.ɵɵPipeDeclaration<ErrorMessagePipe, "errorMessage", true>;
12
- }
1
+ import { PipeTransform } from "@angular/core";
2
+ import { FormControl } from "@angular/forms";
3
+ import * as i0 from "@angular/core";
4
+ export declare class ErrorMessagePipe implements PipeTransform {
5
+ transform(errorsObj: {
6
+ [key: string]: any;
7
+ }, errorMessages: {
8
+ [key: string]: any;
9
+ }, control?: FormControl): any;
10
+ static ɵfac: i0.ɵɵFactoryDeclaration<ErrorMessagePipe, never>;
11
+ static ɵpipe: i0.ɵɵPipeDeclaration<ErrorMessagePipe, "errorMessage", true>;
12
+ }
@@ -1,3 +1,3 @@
1
- export { ErrorMessagePipe } from './error-message-pipe/error.pipe';
2
- export { TextByFunctionPipe } from './text-by-function/text-by-function.pipe';
3
- export { FormControlsListPipe } from './controls-list-pipe/controls-list.pipe';
1
+ export { ErrorMessagePipe } from './error-message-pipe/error.pipe';
2
+ export { TextByFunctionPipe } from './text-by-function/text-by-function.pipe';
3
+ export { FormControlsListPipe } from './controls-list-pipe/controls-list.pipe';
@@ -1,7 +1,7 @@
1
- import { PipeTransform } from '@angular/core';
2
- import * as i0 from "@angular/core";
3
- export declare class TextByFunctionPipe implements PipeTransform {
4
- transform(value: any, field: string | ((value: any) => string)): any;
5
- static ɵfac: i0.ɵɵFactoryDeclaration<TextByFunctionPipe, never>;
6
- static ɵpipe: i0.ɵɵPipeDeclaration<TextByFunctionPipe, "textByFunction", true>;
7
- }
1
+ import { PipeTransform } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class TextByFunctionPipe implements PipeTransform {
4
+ transform(value: any, field: string | ((value: any) => string)): any;
5
+ static ɵfac: i0.ɵɵFactoryDeclaration<TextByFunctionPipe, never>;
6
+ static ɵpipe: i0.ɵɵPipeDeclaration<TextByFunctionPipe, "textByFunction", true>;
7
+ }
@@ -1,8 +1,8 @@
1
- import { FormControl } from '@angular/forms';
2
- import { ErrorStateMatcher } from '@angular/material/core';
3
- import * as i0 from "@angular/core";
4
- export declare class ErrorStateMatcherService implements ErrorStateMatcher {
5
- isErrorState(control: FormControl): boolean;
6
- static ɵfac: i0.ɵɵFactoryDeclaration<ErrorStateMatcherService, never>;
7
- static ɵprov: i0.ɵɵInjectableDeclaration<ErrorStateMatcherService>;
8
- }
1
+ import { FormControl } from '@angular/forms';
2
+ import { ErrorStateMatcher } from '@angular/material/core';
3
+ import * as i0 from "@angular/core";
4
+ export declare class ErrorStateMatcherService implements ErrorStateMatcher {
5
+ isErrorState(control: FormControl): boolean;
6
+ static ɵfac: i0.ɵɵFactoryDeclaration<ErrorStateMatcherService, never>;
7
+ static ɵprov: i0.ɵɵInjectableDeclaration<ErrorStateMatcherService>;
8
+ }
@@ -1,3 +1,3 @@
1
- import { SpecialFormBuilderService } from './special-form-builder/special-form-builder.service';
2
- import { ErrorStateMatcherService } from './error-state-matcher/error-matcher';
3
- export { SpecialFormBuilderService, ErrorStateMatcherService };
1
+ import { SpecialFormBuilderService } from './special-form-builder/special-form-builder.service';
2
+ import { ErrorStateMatcherService } from './error-state-matcher/error-matcher';
3
+ export { SpecialFormBuilderService, ErrorStateMatcherService };
@@ -1,25 +1,25 @@
1
- import { SpecialFormControl, SpecialFormGroup } from '../../forms/special-forms';
2
- import { IFormStructure, TSpecialFields, TSpecialForm } from '../../interfaces/form.interfaces';
3
- import * as i0 from "@angular/core";
4
- export declare class SpecialFormBuilderService {
5
- private readonly defectField;
6
- private readonly inputDefectField;
7
- private readonly formDefectField;
8
- private readonly arrayDefectField;
9
- constructor();
10
- control(field: Partial<TSpecialFields>): SpecialFormControl<any>;
11
- group(fields: IFormStructure, parentField?: Partial<TSpecialForm>): SpecialFormGroup;
12
- array(): void;
13
- fieldDataToArray(fields: IFormStructure): TSpecialFields[];
14
- private setDefectFieldOptions;
15
- private formGenerator;
16
- private getControlAndNameByType;
17
- private setFormGroup;
18
- private setFormArray;
19
- private setFormControl;
20
- private setRequiredValidator;
21
- private setValidatorsArray;
22
- private arrayLengthRequired;
23
- static ɵfac: i0.ɵɵFactoryDeclaration<SpecialFormBuilderService, never>;
24
- static ɵprov: i0.ɵɵInjectableDeclaration<SpecialFormBuilderService>;
25
- }
1
+ import { SpecialFormControl, SpecialFormGroup } from '../../forms/special-forms';
2
+ import { IFormStructure, TSpecialFields, TSpecialForm } from '../../interfaces/form.interfaces';
3
+ import * as i0 from "@angular/core";
4
+ export declare class SpecialFormBuilderService {
5
+ private readonly defectField;
6
+ private readonly inputDefectField;
7
+ private readonly formDefectField;
8
+ private readonly arrayDefectField;
9
+ constructor();
10
+ control(field: Partial<TSpecialFields>): SpecialFormControl<any>;
11
+ group(fields: IFormStructure, parentField?: Partial<TSpecialForm>): SpecialFormGroup;
12
+ array(): void;
13
+ fieldDataToArray(fields: IFormStructure): TSpecialFields[];
14
+ private setDefectFieldOptions;
15
+ private formGenerator;
16
+ private getControlAndNameByType;
17
+ private setFormGroup;
18
+ private setFormArray;
19
+ private setFormControl;
20
+ private setRequiredValidator;
21
+ private setValidatorsArray;
22
+ private arrayLengthRequired;
23
+ static ɵfac: i0.ɵɵFactoryDeclaration<SpecialFormBuilderService, never>;
24
+ static ɵprov: i0.ɵɵInjectableDeclaration<SpecialFormBuilderService>;
25
+ }
@@ -282,6 +282,10 @@
282
282
  margin-bottom: auto
283
283
  }
284
284
 
285
+ .mb-2 {
286
+ margin-bottom: 0.5rem
287
+ }
288
+
285
289
  .mb-3 {
286
290
  margin-bottom: 0.75rem
287
291
  }
@@ -402,6 +406,10 @@
402
406
  grid-template-columns: none
403
407
  }
404
408
 
409
+ .grid-cols-subgrid {
410
+ grid-template-columns: subgrid
411
+ }
412
+
405
413
  .flex-col {
406
414
  flex-direction: column
407
415
  }
@@ -482,6 +490,11 @@
482
490
  padding-right: 0.5rem
483
491
  }
484
492
 
493
+ .px-5 {
494
+ padding-left: 1.25rem;
495
+ padding-right: 1.25rem
496
+ }
497
+
485
498
  .py-3 {
486
499
  padding-top: 0.75rem;
487
500
  padding-bottom: 0.75rem
@@ -491,6 +504,10 @@
491
504
  padding-bottom: 1.25rem
492
505
  }
493
506
 
507
+ .pl-2 {
508
+ padding-left: 0.5rem
509
+ }
510
+
494
511
  .pr-2 {
495
512
  padding-right: 0.5rem
496
513
  }
@@ -504,10 +521,19 @@
504
521
  line-height: 1.5rem
505
522
  }
506
523
 
524
+ .text-sm {
525
+ font-size: 0.875rem;
526
+ line-height: 1.25rem
527
+ }
528
+
507
529
  .font-bold {
508
530
  font-weight: 700
509
531
  }
510
532
 
533
+ .font-medium {
534
+ font-weight: 500
535
+ }
536
+
511
537
  .italic {
512
538
  font-style: italic
513
539
  }
@@ -522,6 +548,11 @@
522
548
  color: rgb(29 78 216 / var(--tw-text-opacity))
523
549
  }
524
550
 
551
+ .text-rose-500 {
552
+ --tw-text-opacity: 1;
553
+ color: rgb(244 63 94 / var(--tw-text-opacity))
554
+ }
555
+
525
556
  .underline {
526
557
  text-decoration-line: underline
527
558
  }
package/package.json CHANGED
@@ -1,15 +1,15 @@
1
1
  {
2
2
  "name": "special-forms",
3
- "version": "16.2.1",
3
+ "version": "17.0.0",
4
4
  "peerDependencies": {
5
- "@angular/common": "^16.2.0",
6
- "@angular/core": "^16.2.0",
7
- "@ngneat/input-mask": "6.1.0",
8
- "@angular/material": "^16.2.0",
9
- "@angular/cdk": "^16.2.0",
10
- "inputmask": "^5.0.8",
11
- "ngx-dropzone": "^3.1.0",
12
- "ngx-editor": "^16.0.1"
5
+ "@angular/common": ">=17",
6
+ "@angular/cdk": ">=17",
7
+ "@angular/core": ">=17",
8
+ "@angular/material": ">=17",
9
+ "@ngneat/input-mask": ">=6",
10
+ "inputmask": ">=5",
11
+ "ngx-dropzone": ">=3",
12
+ "ngx-editor": ">=17"
13
13
  },
14
14
  "dependencies": {
15
15
  "tslib": "^2.3.0"
package/public-api.d.ts CHANGED
@@ -1,9 +1,9 @@
1
- export * from './lib/components';
2
- export * from './lib/core/services/index';
3
- export { EControlTypes } from './lib/core/aux-data/control-types.enum';
4
- export * from './lib/core/forms/special-forms';
5
- export * from './lib/core/interfaces/field-basics.interfaces';
6
- export * from './lib/core/interfaces/form.interfaces';
7
- export * from './lib/core/interfaces/special-control.interface';
8
- export * from './lib/core/masks/index';
9
- export * from './lib/core/pipes/index';
1
+ export * from './lib/components';
2
+ export * from './lib/core/services/index';
3
+ export { EControlTypes } from './lib/core/aux-data/control-types.enum';
4
+ export * from './lib/core/forms/special-forms';
5
+ export * from './lib/core/interfaces/field-basics.interfaces';
6
+ export * from './lib/core/interfaces/form.interfaces';
7
+ export * from './lib/core/interfaces/special-control.interface';
8
+ export * from './lib/core/masks/index';
9
+ export * from './lib/core/pipes/index';