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.
- package/esm2022/lib/components/index.mjs +13 -13
- package/esm2022/lib/components/special-autocomplete/special-autocomplete.component.mjs +75 -75
- package/esm2022/lib/components/special-autocomplete/special-autocomplete.interface.mjs +2 -2
- package/esm2022/lib/components/special-checkbox/special-checkbox.component.mjs +39 -36
- package/esm2022/lib/components/special-checkbox/special-checkbox.interface.mjs +3 -2
- package/esm2022/lib/components/special-datepicker/special-datepicker.component.mjs +43 -40
- package/esm2022/lib/components/special-datepicker/special-datepicker.interface.mjs +3 -2
- package/esm2022/lib/components/special-dropdown/special-dropdown.component.mjs +48 -47
- package/esm2022/lib/components/special-dropdown/special-dropdown.interface.mjs +3 -2
- package/esm2022/lib/components/special-form/special-form.component.mjs +99 -99
- package/esm2022/lib/components/special-form/special-form.module.mjs +78 -78
- package/esm2022/lib/components/special-input/special-input.component.mjs +56 -56
- package/esm2022/lib/components/special-input/special-input.interface.mjs +2 -2
- package/esm2022/lib/components/special-label/special-label.component.mjs +27 -27
- package/esm2022/lib/components/special-label/special-label.interface.mjs +2 -2
- package/esm2022/lib/components/special-multiple-autocomplete/special-multiple-autocomplete.component.mjs +97 -97
- package/esm2022/lib/components/special-multiple-autocomplete/special-multiple-autocomplete.interface.mjs +2 -2
- package/esm2022/lib/components/special-richtext/special-richtext.component.mjs +54 -45
- package/esm2022/lib/components/special-richtext/special-richtext.interface.mjs +3 -2
- package/esm2022/lib/components/special-text-area/special-text-area.component.mjs +44 -44
- package/esm2022/lib/components/special-text-area/special-text-area.interface.mjs +2 -2
- package/esm2022/lib/components/special-upload/special-upload.component.mjs +84 -84
- package/esm2022/lib/components/special-upload/special-upload.interface.mjs +2 -2
- package/esm2022/lib/core/aux-data/control-types.enum.mjs +17 -17
- package/esm2022/lib/core/aux-data/input-types.mjs +15 -15
- package/esm2022/lib/core/forms/special-forms.mjs +240 -260
- package/esm2022/lib/core/interfaces/field-basics.interfaces.mjs +1 -1
- package/esm2022/lib/core/interfaces/form.interfaces.mjs +2 -2
- package/esm2022/lib/core/interfaces/special-control.interface.mjs +2 -2
- package/esm2022/lib/core/masks/currency.mask.mjs +10 -10
- package/esm2022/lib/core/masks/index.mjs +2 -2
- package/esm2022/lib/core/masks/number.mask.mjs +2 -2
- package/esm2022/lib/core/pipes/controls-list-pipe/controls-list.pipe.mjs +17 -17
- package/esm2022/lib/core/pipes/error-message-pipe/error.pipe.mjs +22 -22
- package/esm2022/lib/core/pipes/index.mjs +3 -3
- package/esm2022/lib/core/pipes/text-by-function/text-by-function.pipe.mjs +21 -21
- package/esm2022/lib/core/services/error-state-matcher/error-matcher.mjs +12 -12
- package/esm2022/lib/core/services/index.mjs +3 -3
- package/esm2022/lib/core/services/special-form-builder/special-form-builder.service.mjs +156 -156
- package/esm2022/public-api.mjs +12 -12
- package/esm2022/special-forms.mjs +4 -4
- package/fesm2022/special-forms.mjs +1018 -1024
- package/fesm2022/special-forms.mjs.map +1 -1
- package/index.d.ts +5 -5
- package/lib/components/index.d.ts +23 -23
- package/lib/components/special-autocomplete/special-autocomplete.component.d.ts +19 -19
- package/lib/components/special-autocomplete/special-autocomplete.interface.d.ts +19 -18
- package/lib/components/special-checkbox/special-checkbox.component.d.ts +12 -11
- package/lib/components/special-checkbox/special-checkbox.interface.d.ts +13 -12
- package/lib/components/special-datepicker/special-datepicker.component.d.ts +13 -12
- package/lib/components/special-datepicker/special-datepicker.interface.d.ts +12 -11
- package/lib/components/special-dropdown/special-dropdown.component.d.ts +11 -11
- package/lib/components/special-dropdown/special-dropdown.interface.d.ts +17 -16
- package/lib/components/special-form/special-form.component.d.ts +31 -31
- package/lib/components/special-form/special-form.module.d.ts +20 -20
- package/lib/components/special-input/special-input.component.d.ts +15 -15
- package/lib/components/special-input/special-input.interface.d.ts +17 -16
- package/lib/components/special-label/special-label.component.d.ts +13 -13
- package/lib/components/special-label/special-label.interface.d.ts +13 -12
- package/lib/components/special-multiple-autocomplete/special-multiple-autocomplete.component.d.ts +22 -22
- package/lib/components/special-multiple-autocomplete/special-multiple-autocomplete.interface.d.ts +19 -18
- package/lib/components/special-richtext/special-richtext.component.d.ts +17 -17
- package/lib/components/special-richtext/special-richtext.interface.d.ts +10 -9
- package/lib/components/special-text-area/special-text-area.component.d.ts +13 -13
- package/lib/components/special-text-area/special-text-area.interface.d.ts +8 -7
- package/lib/components/special-upload/special-upload.component.d.ts +21 -21
- package/lib/components/special-upload/special-upload.interface.d.ts +12 -11
- package/lib/core/aux-data/control-types.enum.d.ts +16 -16
- package/lib/core/aux-data/input-types.d.ts +2 -2
- package/lib/core/forms/special-forms.d.ts +108 -123
- package/lib/core/interfaces/field-basics.interfaces.d.ts +22 -22
- package/lib/core/interfaces/form.interfaces.d.ts +58 -55
- package/lib/core/interfaces/special-control.interface.d.ts +4 -4
- package/lib/core/masks/currency.mask.d.ts +1 -1
- package/lib/core/masks/index.d.ts +2 -2
- package/lib/core/masks/number.mask.d.ts +1 -1
- package/lib/core/pipes/controls-list-pipe/controls-list.pipe.d.ts +11 -11
- package/lib/core/pipes/error-message-pipe/error.pipe.d.ts +12 -12
- package/lib/core/pipes/index.d.ts +3 -3
- package/lib/core/pipes/text-by-function/text-by-function.pipe.d.ts +7 -7
- package/lib/core/services/error-state-matcher/error-matcher.d.ts +8 -8
- package/lib/core/services/index.d.ts +3 -3
- package/lib/core/services/special-form-builder/special-form-builder.service.d.ts +25 -25
- package/lib/styles/tailwind-final.scss +31 -0
- package/package.json +9 -9
- 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": "
|
|
3
|
+
"version": "17.0.0",
|
|
4
4
|
"peerDependencies": {
|
|
5
|
-
"@angular/common": "
|
|
6
|
-
"@angular/
|
|
7
|
-
"@
|
|
8
|
-
"@angular/material": "
|
|
9
|
-
"@
|
|
10
|
-
"inputmask": "
|
|
11
|
-
"ngx-dropzone": "
|
|
12
|
-
"ngx-editor": "
|
|
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';
|