@bnsights/bbsf-controls 1.2.27 → 1.2.29
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/README.md +69 -46
- package/fesm2022/bnsights-bbsf-controls.mjs +121 -38
- package/fesm2022/bnsights-bbsf-controls.mjs.map +1 -1
- package/lib/Shared/Models/ControlOptionsBase.d.ts +46 -0
- package/lib/Shared/Models/FileUploadCropperOptions.d.ts +4 -0
- package/lib/Shared/Models/FileUploadOptions.d.ts +14 -0
- package/lib/Shared/services/ControlUtility.d.ts +2 -1
- package/lib/Shared/services/validationErrorMassage.service.d.ts +2 -1
- package/lib/controls/LogoCropper/LogoCropper.component.d.ts +18 -1
- package/package.json +1 -1
|
@@ -43,5 +43,51 @@ export declare class ControlOptionsBase {
|
|
|
43
43
|
isReadonly: boolean;
|
|
44
44
|
/** Set output function for repeater */
|
|
45
45
|
outputFunction: Function;
|
|
46
|
+
/** Overrides the 'RequiredValidationKey' label (required error). */
|
|
47
|
+
requiredErrorMsg?: string;
|
|
48
|
+
/** Overrides the 'EmailValidationKey' label (email errors: 'email' / 'EmailValidationKey'). */
|
|
49
|
+
emailErrorMsg?: string;
|
|
50
|
+
/** Overrides the 'urlValidationError' label (URL error). */
|
|
51
|
+
urlErrorMsg?: string;
|
|
52
|
+
/** Overrides the 'NumberValidationKey' label (numbers-only 'pattern' error). */
|
|
53
|
+
numberErrorMsg?: string;
|
|
54
|
+
/** Overrides the 'MaxLenghtValidationKey' label (maxlength error). */
|
|
55
|
+
maxLengthErrorMsg?: string;
|
|
56
|
+
/** Overrides the 'MinLenghtValidationKey' label (minlength error). */
|
|
57
|
+
minLengthErrorMsg?: string;
|
|
58
|
+
/** Overrides the 'MinValueValidationKey' label (min value error). */
|
|
59
|
+
minValueErrorMsg?: string;
|
|
60
|
+
/** Overrides the 'MaxValueValidationKey' label (max value error). */
|
|
61
|
+
maxValueErrorMsg?: string;
|
|
62
|
+
/** Overrides the 'IntegerNumberValidationKey' label (integer-only error). */
|
|
63
|
+
integerNumberErrorMsg?: string;
|
|
64
|
+
/** Overrides the 'PositiveNumberValidationKey' label (positive-number error). */
|
|
65
|
+
positiveNumberErrorMsg?: string;
|
|
66
|
+
/** Overrides the 'PhoneNumberValidationKey' label (phone validity error). */
|
|
67
|
+
phoneNumberErrorMsg?: string;
|
|
68
|
+
/** Overrides the 'MaskValidationKey' label (mask error). */
|
|
69
|
+
maskErrorMsg?: string;
|
|
70
|
+
/** Overrides the 'PasswordComplexityHasNumber' label. */
|
|
71
|
+
passwordHasNumberErrorMsg?: string;
|
|
72
|
+
/** Overrides the 'PasswordComplexityHasCapitalLetter' label. */
|
|
73
|
+
passwordHasCapitalLetterErrorMsg?: string;
|
|
74
|
+
/** Overrides the 'PasswordComplexityHasSmallLetter' label. */
|
|
75
|
+
passwordHasSmallLetterErrorMsg?: string;
|
|
76
|
+
/** Overrides the 'PasswordComplexityHasSpecialLetter' label. */
|
|
77
|
+
passwordHasSpecialLetterErrorMsg?: string;
|
|
78
|
+
/** Overrides the 'ArabicLetterOnly' label. */
|
|
79
|
+
arabicLetterOnlyErrorMsg?: string;
|
|
80
|
+
/** Overrides the 'EnglishLetterOnly' label. */
|
|
81
|
+
englishLetterOnlyErrorMsg?: string;
|
|
82
|
+
/** Overrides the 'VAL_ArabicIsRequiredAndOnly50CharactersEnglish' label. */
|
|
83
|
+
arabicRequiredAndEnglishMax50ErrorMsg?: string;
|
|
84
|
+
/** Overrides the 'MaxWordCountValidationKey' label (max word count error). */
|
|
85
|
+
maxWordCountErrorMsg?: string;
|
|
86
|
+
/** Overrides the 'NewSelectionValidationKey' label (must-select-from-list error). */
|
|
87
|
+
newSelectionErrorMsg?: string;
|
|
88
|
+
/** Overrides the 'InvalidStartDate' label (date-range start error). */
|
|
89
|
+
invalidStartDateErrorMsg?: string;
|
|
90
|
+
/** Overrides the 'InvalidEndDate' label (date-range end error). */
|
|
91
|
+
invalidEndDateErrorMsg?: string;
|
|
46
92
|
get displayValue(): any;
|
|
47
93
|
}
|
|
@@ -12,6 +12,10 @@ export declare class FileUploadCropperOptions {
|
|
|
12
12
|
backdrop: boolean | 'static';
|
|
13
13
|
maintainAspectRatio: boolean;
|
|
14
14
|
onlyScaleDown: boolean;
|
|
15
|
+
allowMoveImage: boolean;
|
|
16
|
+
containWithinAspectRatio: boolean;
|
|
17
|
+
maxDisplayWidth: number;
|
|
18
|
+
maxDisplayHeight: number;
|
|
15
19
|
cancelBehavior: 'clear' | 'keep';
|
|
16
20
|
horizontal: FileUploadCropperPreset;
|
|
17
21
|
vertical: FileUploadCropperPreset;
|
|
@@ -35,4 +35,18 @@ export declare class FileUploadOptions extends ControlOptionsBase {
|
|
|
35
35
|
maxFileCountLbl?: string;
|
|
36
36
|
/** Optional image cropper configuration for single-file, non-async uploads. */
|
|
37
37
|
cropperOptions?: FileUploadCropperOptions;
|
|
38
|
+
/** Overrides the 'MaxFileCountValidationKey' resource label in the max-file-count error message. */
|
|
39
|
+
maxFileCountErrorMsg?: string;
|
|
40
|
+
/** Overrides the 'MinFileCountValidationKey' resource label in the min-file-count error message. */
|
|
41
|
+
minFileCountErrorMsg?: string;
|
|
42
|
+
/** Overrides the 'MaxSizeForAllFilesInMB' resource label in the total-size error message. */
|
|
43
|
+
maxSizeTotalErrorMsg?: string;
|
|
44
|
+
/** Overrides the 'FileMaxSizeInMB' resource label in the per-file max-size error message. */
|
|
45
|
+
maxFileSizeErrorMsg?: string;
|
|
46
|
+
/** Overrides the 'ToolTipTypeError' resource label in the invalid-file-type error message. */
|
|
47
|
+
toolTipTypeErrorMsg?: string;
|
|
48
|
+
/** Overrides the hardcoded 'File(s) already exist' fallback in the duplicate-file error message. */
|
|
49
|
+
duplicateFileErrorMsg?: string;
|
|
50
|
+
/** Overrides the 'RequiredValidationKey' resource label in the required error message. */
|
|
51
|
+
requiredErrorMsg?: string;
|
|
38
52
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { CustomValidation } from '../Models/CustomValidation';
|
|
2
|
+
import { FileUploadOptions } from '../Models/FileUploadOptions';
|
|
2
3
|
import { ErrorMassageValidation } from './validationErrorMassage.service';
|
|
3
4
|
import { ValidationErrors, ValidatorFn, AbstractControl } from '@angular/forms';
|
|
4
5
|
import { ControlValidationService, UtilityService } from '@bnsights/bbsf-utilities/ui';
|
|
@@ -8,7 +9,7 @@ export declare class ControlUtility {
|
|
|
8
9
|
private controlValidationService;
|
|
9
10
|
private utilityService;
|
|
10
11
|
constructor(ErrorHandler: ErrorMassageValidation, controlValidationService: ControlValidationService, utilityService: UtilityService);
|
|
11
|
-
getErrorValidation(ErrorsItem: any[], customValidation?: CustomValidation): string;
|
|
12
|
+
getErrorValidation(ErrorsItem: any[], customValidation?: CustomValidation, options?: FileUploadOptions): string;
|
|
12
13
|
patternValidator(regex: RegExp, error: ValidationErrors): ValidatorFn;
|
|
13
14
|
patchControlValue(originalValue: any, PatchFunction: any, PatchPath: any): void;
|
|
14
15
|
arabicValidator(error: ValidationErrors): ValidatorFn;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ControlContainer } from '@angular/forms';
|
|
2
2
|
import { UtilityService } from '@bnsights/bbsf-utilities/ui';
|
|
3
|
+
import { FileUploadOptions } from '../Models/FileUploadOptions';
|
|
3
4
|
import * as i0 from "@angular/core";
|
|
4
5
|
export declare class ErrorMassageValidation {
|
|
5
6
|
private controlContainer;
|
|
@@ -8,7 +9,7 @@ export declare class ErrorMassageValidation {
|
|
|
8
9
|
constructor(controlContainer: ControlContainer, utilityService: UtilityService);
|
|
9
10
|
url: string;
|
|
10
11
|
static showerror(FormControlName: string): void;
|
|
11
|
-
getErrorMassageValidation(error: any): string;
|
|
12
|
+
getErrorMassageValidation(error: any, options?: FileUploadOptions): string;
|
|
12
13
|
static ɵfac: i0.ɵɵFactoryDeclaration<ErrorMassageValidation, [{ optional: true; }, null]>;
|
|
13
14
|
static ɵprov: i0.ɵɵInjectableDeclaration<ErrorMassageValidation>;
|
|
14
15
|
}
|
|
@@ -13,21 +13,38 @@ export declare class LogoCropperComponent implements OnInit {
|
|
|
13
13
|
cropperStaticWidth: number;
|
|
14
14
|
cropperStaticHeight: number;
|
|
15
15
|
onlyScaleDown: boolean;
|
|
16
|
+
allowMoveImage: boolean;
|
|
17
|
+
containWithinAspectRatio: boolean;
|
|
18
|
+
maxDisplayWidth: number;
|
|
19
|
+
maxDisplayHeight: number;
|
|
16
20
|
transform: ImageTransform;
|
|
21
|
+
canvasRotation: number;
|
|
17
22
|
croppedBlob: Blob | null;
|
|
18
23
|
private readonly minScale;
|
|
19
24
|
private readonly maxScale;
|
|
20
25
|
private readonly scaleStep;
|
|
21
26
|
constructor(activeModal: NgbActiveModal, utilityService: UtilityService);
|
|
22
27
|
ngOnInit(): void;
|
|
28
|
+
get displayScalingEnabled(): boolean;
|
|
29
|
+
get displayScale(): number;
|
|
30
|
+
get displayWidth(): number;
|
|
31
|
+
get displayHeight(): number;
|
|
32
|
+
get effectiveAspectRatio(): number;
|
|
33
|
+
get sourceMaxHeight(): string | null;
|
|
34
|
+
get sourceMaxWidth(): string | null;
|
|
23
35
|
translate(key: string): string;
|
|
24
36
|
imageCropped(event: ImageCroppedEvent): void;
|
|
37
|
+
imageLoadFailed(error?: unknown): void;
|
|
38
|
+
onWheel(event: WheelEvent): void;
|
|
25
39
|
zoomIn(): void;
|
|
26
40
|
zoomOut(): void;
|
|
41
|
+
rotateLeft(): void;
|
|
42
|
+
rotateRight(): void;
|
|
27
43
|
resetZoom(): void;
|
|
44
|
+
reset(): void;
|
|
28
45
|
confirm(): void;
|
|
29
46
|
dismiss(): void;
|
|
30
47
|
private setScale;
|
|
31
48
|
static ɵfac: i0.ɵɵFactoryDeclaration<LogoCropperComponent, never>;
|
|
32
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<LogoCropperComponent, "BBSF-LogoCropper", never, { "imageFile": { "alias": "imageFile"; "required": false; }; "isHorizontal": { "alias": "isHorizontal"; "required": false; }; "aspectRatio": { "alias": "aspectRatio"; "required": false; }; "maintainAspectRatio": { "alias": "maintainAspectRatio"; "required": false; }; "cropperStaticWidth": { "alias": "cropperStaticWidth"; "required": false; }; "cropperStaticHeight": { "alias": "cropperStaticHeight"; "required": false; }; "onlyScaleDown": { "alias": "onlyScaleDown"; "required": false; }; }, {}, never, never, true, never>;
|
|
49
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<LogoCropperComponent, "BBSF-LogoCropper", never, { "imageFile": { "alias": "imageFile"; "required": false; }; "isHorizontal": { "alias": "isHorizontal"; "required": false; }; "aspectRatio": { "alias": "aspectRatio"; "required": false; }; "maintainAspectRatio": { "alias": "maintainAspectRatio"; "required": false; }; "cropperStaticWidth": { "alias": "cropperStaticWidth"; "required": false; }; "cropperStaticHeight": { "alias": "cropperStaticHeight"; "required": false; }; "onlyScaleDown": { "alias": "onlyScaleDown"; "required": false; }; "allowMoveImage": { "alias": "allowMoveImage"; "required": false; }; "containWithinAspectRatio": { "alias": "containWithinAspectRatio"; "required": false; }; "maxDisplayWidth": { "alias": "maxDisplayWidth"; "required": false; }; "maxDisplayHeight": { "alias": "maxDisplayHeight"; "required": false; }; }, {}, never, never, true, never>;
|
|
33
50
|
}
|