@bnsights/bbsf-controls 1.0.185 → 1.0.186
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 +6 -0
- package/esm2022/lib/Shared/services/ControlUtility.mjs +11 -11
- package/esm2022/lib/Shared/services/validationErrorMassage.service.mjs +19 -67
- package/esm2022/lib/controls/TextBox/TextBox.component.mjs +9 -10
- package/fesm2022/bnsights-bbsf-controls.mjs +34 -83
- package/fesm2022/bnsights-bbsf-controls.mjs.map +1 -1
- package/lib/Shared/services/ControlUtility.d.ts +1 -1
- package/lib/Shared/services/validationErrorMassage.service.d.ts +1 -1
- package/lib/controls/TextBox/TextBox.component.d.ts +2 -2
- package/package.json +1 -1
|
@@ -466,34 +466,19 @@ var InputType;
|
|
|
466
466
|
})(InputType || (InputType = {}));
|
|
467
467
|
|
|
468
468
|
class ErrorMassageValidation {
|
|
469
|
-
static { this.
|
|
470
|
-
// tslint:disable-next-line: deprecation
|
|
469
|
+
static { this.controlContainerStatic = null; }
|
|
471
470
|
constructor(controlContainer, utilityService) {
|
|
472
471
|
this.controlContainer = controlContainer;
|
|
473
472
|
this.utilityService = utilityService;
|
|
474
473
|
this.url = 'CheckEmailValidation';
|
|
475
|
-
ErrorMassageValidation.
|
|
474
|
+
ErrorMassageValidation.controlContainerStatic = this.controlContainer;
|
|
476
475
|
}
|
|
477
|
-
// tslint:disable-next-line: deprecation
|
|
478
476
|
static showerror(FormControlName) {
|
|
479
|
-
let form = ErrorMassageValidation.
|
|
480
|
-
.control;
|
|
477
|
+
let form = ErrorMassageValidation.controlContainerStatic.control;
|
|
481
478
|
let control = form.get(FormControlName);
|
|
482
|
-
//console.log(control)
|
|
483
479
|
control.setErrors({ minlength: true });
|
|
484
480
|
control.markAsTouched();
|
|
485
481
|
}
|
|
486
|
-
// isEmailRegisterd(Email: string)
|
|
487
|
-
// {
|
|
488
|
-
// let resource:object={
|
|
489
|
-
// email:Email
|
|
490
|
-
// };
|
|
491
|
-
// let body = JSON.stringify(resource);
|
|
492
|
-
// let headers = new Headers({ 'Content-Type': 'application/json' });
|
|
493
|
-
// let options = new RequestOptions({ headers: headers });
|
|
494
|
-
// return this.http.post(environment.baseUrl+this.url,body,options)
|
|
495
|
-
// .pipe(map(response => response.json()))
|
|
496
|
-
// }
|
|
497
482
|
getErrorMassageValidation(error) {
|
|
498
483
|
let result = '';
|
|
499
484
|
switch (error.key) {
|
|
@@ -513,28 +498,16 @@ class ErrorMassageValidation {
|
|
|
513
498
|
result = this.utilityService.getResourceValue('NumberValidationKey');
|
|
514
499
|
break;
|
|
515
500
|
case 'maxlength':
|
|
516
|
-
result =
|
|
517
|
-
this.utilityService.getResourceValue('MaxLenghtValidationKey') +
|
|
518
|
-
' ' +
|
|
519
|
-
error.value.requiredLength;
|
|
501
|
+
result = `${this.utilityService.getResourceValue('MaxLenghtValidationKey')} ${error.value.requiredLength}`;
|
|
520
502
|
break;
|
|
521
503
|
case 'minlength':
|
|
522
|
-
result =
|
|
523
|
-
this.utilityService.getResourceValue('MinLenghtValidationKey') +
|
|
524
|
-
' ' +
|
|
525
|
-
error.value.requiredLength;
|
|
504
|
+
result = `${this.utilityService.getResourceValue('MinLenghtValidationKey')} ${error.value.requiredLength}`;
|
|
526
505
|
break;
|
|
527
506
|
case 'min':
|
|
528
|
-
result =
|
|
529
|
-
this.utilityService.getResourceValue('MinValueValidationKey') +
|
|
530
|
-
' ' +
|
|
531
|
-
error.value.min;
|
|
507
|
+
result = `${this.utilityService.getResourceValue('MinValueValidationKey')} ${error.value.min}`;
|
|
532
508
|
break;
|
|
533
509
|
case 'max':
|
|
534
|
-
result =
|
|
535
|
-
this.utilityService.getResourceValue('MaxValueValidationKey') +
|
|
536
|
-
' ' +
|
|
537
|
-
error.value.max;
|
|
510
|
+
result = `${this.utilityService.getResourceValue('MaxValueValidationKey')} ${error.value.max}`;
|
|
538
511
|
break;
|
|
539
512
|
case 'IntegerNumberValidationKey':
|
|
540
513
|
result = this.utilityService.getResourceValue('IntegerNumberValidationKey');
|
|
@@ -546,12 +519,9 @@ class ErrorMassageValidation {
|
|
|
546
519
|
result = this.utilityService.getResourceValue('PhoneNumberValidationKey');
|
|
547
520
|
break;
|
|
548
521
|
case 'mask':
|
|
549
|
-
result =
|
|
550
|
-
this.utilityService.getResourceValue('MaskValidationKey') +
|
|
551
|
-
' ' +
|
|
552
|
-
error.value.requiredMask;
|
|
522
|
+
result = `${this.utilityService.getResourceValue('MaskValidationKey')} ${error.value.requiredMask}`;
|
|
553
523
|
break;
|
|
554
|
-
case '
|
|
524
|
+
case 'passwordComplexityHasNumber':
|
|
555
525
|
result = this.utilityService.getResourceValue('PasswordComplexityHasNumber');
|
|
556
526
|
break;
|
|
557
527
|
case 'ArabicLetterOnly':
|
|
@@ -563,53 +533,35 @@ class ErrorMassageValidation {
|
|
|
563
533
|
case 'ArabicIsRequiredAndOnly50CharactersEnglish':
|
|
564
534
|
result = this.utilityService.getResourceValue('VAL_ArabicIsRequiredAndOnly50CharactersEnglish');
|
|
565
535
|
break;
|
|
566
|
-
case '
|
|
536
|
+
case 'passwordComplexityHasCapitalLetter':
|
|
567
537
|
result = this.utilityService.getResourceValue('PasswordComplexityHasCapitalLetter');
|
|
568
538
|
break;
|
|
569
|
-
case '
|
|
539
|
+
case 'passwordComplexityHasSmallLetter':
|
|
570
540
|
result = this.utilityService.getResourceValue('PasswordComplexityHasSmallLetter');
|
|
571
541
|
break;
|
|
572
|
-
case '
|
|
542
|
+
case 'passwordComplexityHasSpecialLetter':
|
|
573
543
|
result = this.utilityService.getResourceValue('PasswordComplexityHasSpecialLetter');
|
|
574
544
|
break;
|
|
575
545
|
case 'MaxWordCountValidationKey':
|
|
576
|
-
result =
|
|
577
|
-
this.utilityService.getResourceValue('MaxWordCountValidationKey') +
|
|
578
|
-
' ' +
|
|
579
|
-
error.value;
|
|
546
|
+
result = `${this.utilityService.getResourceValue('MaxWordCountValidationKey')} ${error.value}`;
|
|
580
547
|
break;
|
|
581
548
|
case 'NewSelectionValidationKey':
|
|
582
549
|
result = this.utilityService.getResourceValue('NewSelectionValidationKey');
|
|
583
550
|
break;
|
|
584
551
|
case 'MaxFileCountValidationKey':
|
|
585
|
-
result =
|
|
586
|
-
this.utilityService.getResourceValue('MaxFileCountValidationKey') +
|
|
587
|
-
' ' +
|
|
588
|
-
error.value;
|
|
552
|
+
result = `${this.utilityService.getResourceValue('MaxFileCountValidationKey')} ${error.value}`;
|
|
589
553
|
break;
|
|
590
554
|
case 'MinFileCountValidationKey':
|
|
591
|
-
result =
|
|
592
|
-
this.utilityService.getResourceValue('MinFileCountValidationKey') +
|
|
593
|
-
' ' +
|
|
594
|
-
error.value;
|
|
555
|
+
result = `${this.utilityService.getResourceValue('MinFileCountValidationKey')} ${error.value}`;
|
|
595
556
|
break;
|
|
596
557
|
case 'MaxSizeForAllFilesInMB':
|
|
597
|
-
result =
|
|
598
|
-
this.utilityService.getResourceValue('MaxSizeForAllFilesInMB') +
|
|
599
|
-
' ' +
|
|
600
|
-
error.value;
|
|
558
|
+
result = `${this.utilityService.getResourceValue('MaxSizeForAllFilesInMB')} ${error.value}`;
|
|
601
559
|
break;
|
|
602
560
|
case 'FileMaxSizeInMB':
|
|
603
|
-
result =
|
|
604
|
-
this.utilityService.getResourceValue('FileMaxSizeInMB') +
|
|
605
|
-
' ' +
|
|
606
|
-
error.value;
|
|
561
|
+
result = `${this.utilityService.getResourceValue('FileMaxSizeInMB')} ${error.value}`;
|
|
607
562
|
break;
|
|
608
563
|
case 'ToolTipTypeError':
|
|
609
|
-
result =
|
|
610
|
-
this.utilityService.getResourceValue('ToolTipTypeError') +
|
|
611
|
-
' ' +
|
|
612
|
-
error.value;
|
|
564
|
+
result = `${this.utilityService.getResourceValue('ToolTipTypeError')} ${error.value}`;
|
|
613
565
|
break;
|
|
614
566
|
case 'InvalidEndDate':
|
|
615
567
|
result = this.utilityService.getResourceValue('InvalidEndDate');
|
|
@@ -640,26 +592,26 @@ class ControlUtility {
|
|
|
640
592
|
this.controlValidationService = controlValidationService;
|
|
641
593
|
this.utilityService = utilityService;
|
|
642
594
|
}
|
|
643
|
-
getErrorValidation(
|
|
644
|
-
let
|
|
645
|
-
|
|
646
|
-
if (element.key === 'customerError' &&
|
|
647
|
-
|
|
595
|
+
getErrorValidation(ErrorsItem, customValidation) {
|
|
596
|
+
let result = '';
|
|
597
|
+
ErrorsItem.forEach(element => {
|
|
598
|
+
if (element.key === 'customerError' && ErrorsItem.length === 1) {
|
|
599
|
+
result = customValidation[0].massage;
|
|
648
600
|
}
|
|
649
601
|
else if (element.key === 'EmailValidation') {
|
|
650
|
-
|
|
602
|
+
result = element.value;
|
|
651
603
|
}
|
|
652
604
|
else if (element.key === 'FluentApi') {
|
|
653
|
-
|
|
605
|
+
result = element.value;
|
|
654
606
|
}
|
|
655
607
|
else if (element.key === 'errorMassage') {
|
|
656
|
-
|
|
608
|
+
result = element.value;
|
|
657
609
|
}
|
|
658
610
|
else {
|
|
659
|
-
|
|
611
|
+
result = this.ErrorHandler.getErrorMassageValidation(element);
|
|
660
612
|
}
|
|
661
613
|
});
|
|
662
|
-
return
|
|
614
|
+
return result;
|
|
663
615
|
}
|
|
664
616
|
patternValidator(regex, error) {
|
|
665
617
|
return (control) => {
|
|
@@ -6177,8 +6129,7 @@ var LanguageValidation;
|
|
|
6177
6129
|
})(LanguageValidation || (LanguageValidation = {}));
|
|
6178
6130
|
|
|
6179
6131
|
class TextboxComponent {
|
|
6180
|
-
static { this.
|
|
6181
|
-
// tslint:disable-next-line: max-line-length
|
|
6132
|
+
static { this.controlContainerStatic = null; }
|
|
6182
6133
|
constructor(controlUtility, controlContainer, textControlHost, utilityService, controlValidationService, globalSettings) {
|
|
6183
6134
|
this.controlUtility = controlUtility;
|
|
6184
6135
|
this.controlContainer = controlContainer;
|
|
@@ -6195,7 +6146,7 @@ class TextboxComponent {
|
|
|
6195
6146
|
this.isShowWordCount = false;
|
|
6196
6147
|
this.markAllAsTouched = false;
|
|
6197
6148
|
this.validationRules = [];
|
|
6198
|
-
this.
|
|
6149
|
+
this.validationRulesAsync = [];
|
|
6199
6150
|
//For Show warning message of max length limit
|
|
6200
6151
|
this.currentCharsCount = 0;
|
|
6201
6152
|
this.showCharsLimitMsg = false;
|
|
@@ -6225,7 +6176,7 @@ class TextboxComponent {
|
|
|
6225
6176
|
this.isValid = () => {
|
|
6226
6177
|
this.controlUtility.isValid(this.textBoxFormControl);
|
|
6227
6178
|
};
|
|
6228
|
-
TextboxComponent.
|
|
6179
|
+
TextboxComponent.controlContainerStatic = this.controlContainer;
|
|
6229
6180
|
}
|
|
6230
6181
|
ngOnInit() {
|
|
6231
6182
|
if (this.options.isReadonly && !this.options.value) {
|
|
@@ -6338,7 +6289,7 @@ class TextboxComponent {
|
|
|
6338
6289
|
this.options.maxLength - this.options.maxLengthWarningLimit;
|
|
6339
6290
|
}
|
|
6340
6291
|
this.textBoxFormControl.setValidators(this.validationRules);
|
|
6341
|
-
this.textBoxFormControl.setAsyncValidators(this.
|
|
6292
|
+
this.textBoxFormControl.setAsyncValidators(this.validationRulesAsync);
|
|
6342
6293
|
if (this.options.isDisabled) {
|
|
6343
6294
|
this.textBoxFormControl.disable();
|
|
6344
6295
|
}
|
|
@@ -6458,11 +6409,11 @@ class TextboxComponent {
|
|
|
6458
6409
|
this.onBlur.emit(this.textBoxFormControl.value);
|
|
6459
6410
|
}
|
|
6460
6411
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: TextboxComponent, deps: [{ token: ControlUtility }, { token: i2.ControlContainer, optional: true }, { token: i2.FormGroupDirective }, { token: i3.UtilityService }, { token: i3.ControlValidationService }, { token: GlobalSettings }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
6461
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
6412
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: TextboxComponent, selector: "BBSF-TextBox", inputs: { group: "group", options: "options" }, outputs: { onChange: "onChange", onBlur: "onBlur" }, ngImport: i0, template: "<div class=\"form-group bbsf-control bbsf-textbox\" [formGroup]=\"group\">\r\n <div [ngClass]=\"options.viewType == 1 ? 'bbsf-vertical' : 'bbsf-horizontal'\">\r\n <!--label-->\r\n <label *ngIf=\"!options.hideLabel\" class=\"bbsf-label {{ options.labelExtraClasses }}\">\r\n {{ options.labelValue }}\r\n <!--Asterisk-->\r\n @if (((options.showAsterisk && options.isRequired) || options.isRequired) && !options.isReadonly) {\r\n <span class=\"text-danger\">*</span>\r\n }\r\n </label>\r\n <!--MaskPattern-->\r\n @if (maskPattern != null && maskPattern != '' && !options.isReadonly) {\r\n <div class=\"bbsf-input-container\" [ngClass]=\"options.enableCopyToClipboard ? 'p-40px' : ''\">\r\n <!--Icon-->\r\n <div *ngIf=\"options.icon != null\" class=\"svg svg-icon-grey bbsf-icon\"\r\n [ngClass]=\"options.iconPosition == 1 ? 'bbsf-left-icon' : 'bbsf-right-icon'\">\r\n <span [inlineSVG]=\"options.icon\"></span>\r\n </div>\r\n <!--input-->\r\n <input class=\"form-control {{ options.extraClasses }}\" [mask]=\"maskPattern\" placeHolderCharacter=\" \"\r\n [showMaskTyped]=\"true\" [validation]=\"true\" [dir]=\"textDir\" aria-describedby=\"email-error\" aria-invalid=\"true\"\r\n formControlName=\"{{ options.name }}\" type=\"{{ getInputType(options.type) }}\" [(ngModel)]=\"options.value\"\r\n [class.is-invalid]=\"textBoxFormControl.invalid && textBoxFormControl.touched\"\r\n placeholder=\"{{ options.placeholder }}\" id=\"{{ options.name }}\" autocomplete=\"{{ options.autoComplete }}\"\r\n (change)=\"trimControlValue()\" (keyup)=\"onTextChange()\" [readonly]=\"options.isReadonly\"\r\n (keydown)=\"wordCountArray > options.maxWordCount && $event.keyCode != 8 ? $event.preventDefault() : null\"\r\n #userInput (blur)=\"onTextBlur()\" />\r\n <!--CopyToClipboard-->\r\n <span class=\"copy-clipboard\" ngbTooltip=\"Copied!\" *ngIf=\"options.enableCopyToClipboard\"\r\n (click)=\"copyInputMessage(userInput)\">\r\n <i class=\"fas fa-copy\"></i>\r\n </span>\r\n </div>\r\n }\r\n <!--NoMaskPattern-->\r\n <div *ngIf=\"maskPattern == null || (maskPattern == '' && !options.isReadonly)\" class=\"bbsf-input-container\"\r\n [ngClass]=\"options.enableCopyToClipboard ? 'p-40px' : ''\">\r\n <!--Icon-->\r\n <div class=\"svg svg-icon-grey bbsf-icon\"\r\n [ngClass]=\"options.iconPosition == 1 ? 'bbsf-left-icon' : 'bbsf-right-icon'\" *ngIf=\"options.icon != null\">\r\n <span [inlineSVG]=\"options.icon\"></span>\r\n </div>\r\n <!--input-->\r\n <input class=\"form-control {{ options.extraClasses }} \" [dir]=\"textDir\" (focus)=\"onFocus(true)\"\r\n (focusout)=\"onFocus(false)\" maxlength=\"{{ options.maxLength }}\" minlength=\"{{ options.minLength }}\"\r\n aria-describedby=\"email-error\" aria-invalid=\"true\" formControlName=\"{{ options.name }}\"\r\n type=\"{{ getInputType(options.type) }}\"\r\n [class.is-invalid]=\"textBoxFormControl.invalid && textBoxFormControl.touched\"\r\n placeholder=\"{{ options.placeholder }}\" id=\"{{ options.name }}\" autocomplete=\"{{ options.autoComplete }}\"\r\n (change)=\"trimControlValue()\" (keyup)=\"onTextChange()\" [(ngModel)]=\"options.value\"\r\n (keydown)=\"wordCountArray > options.maxWordCount && $event.keyCode != 8 ? $event.preventDefault() : null\"\r\n [readonly]=\"options.isReadonly\" #userInput (blur)=\"onTextBlur()\" />\r\n <!--CopyToClipboard-->\r\n <span class=\"copy-clipboard\" ngbTooltip=\"Copied!\" triggers=\"click:blur\" *ngIf=\"options.enableCopyToClipboard\"\r\n (click)=\"copyInputMessage(userInput)\">\r\n <i class=\"fas fa-copy\"></i>\r\n </span>\r\n </div>\r\n <!-- readonly -->\r\n @if (options.isReadonly) {\r\n <div>\r\n <a *ngIf=\"options.type == inputType.Email\" href=\"mailto: {{ options.value }}\">{{ options.value }}</a>\r\n <a *ngIf=\"options.type == inputType.URL\" href=\"{{ options.value }}\" target=\"_blank\">{{ options.value }}</a>\r\n <span *ngIf=\"options.type != inputType.URL && options.type != inputType.Email\"\r\n class=\"readonly-view\">{{ options.value }}</span>\r\n </div>\r\n }\r\n </div>\r\n <div class=\"subtext-container\">\r\n <!--wordCount-->\r\n <div class=\"bbsf-word-count\" *ngIf=\"options.maxWordCount > 0 && isShowWordCount\">\r\n {{ wordCount }}/{{ options.maxWordCount }} Words</div>\r\n <!-- CharsLimitMsg-->\r\n <div class=\"bbsf-character-count\" *ngIf=\"showCharsLimitMsg\"\r\n [ngClass]=\"{ 'badge-light-warning': charsLimitMsgClass === 'warning', 'badge-light-danger': charsLimitMsgClass === 'danger' }\">\r\n {{ maxLimitWarningMsg }}\r\n </div>\r\n <!-- LabelDescription-->\r\n <div class=\"bbsf-control-desc\" *ngIf=\"options.labelDescription != null\">{{ options.labelDescription }}</div>\r\n <!-- requiredText-->\r\n <div class=\"bbsf-validation\" [dir]=\"textDir\" *ngIf=\"textBoxFormControl.invalid && textBoxFormControl.touched\">\r\n {{ getErrorValidation(textBoxFormControl.errors | keyvalue) }}\r\n </div>\r\n </div>\r\n\r\n @if ((group.valid && group.dirty && group.touched) || (group.untouched && group.invalid && group.dirty)) {\r\n <div>{{ resetError() }}</div>\r\n }\r\n</div>", dependencies: [{ kind: "directive", type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3$1.NgbTooltip, selector: "[ngbTooltip]", inputs: ["animation", "autoClose", "placement", "popperOptions", "triggers", "positionTarget", "container", "disableTooltip", "tooltipClass", "tooltipContext", "openDelay", "closeDelay", "ngbTooltip"], outputs: ["shown", "hidden"], exportAs: ["ngbTooltip"] }, { kind: "directive", type: i7$3.NgxMaskDirective, selector: "input[mask], textarea[mask]", inputs: ["mask", "specialCharacters", "patterns", "prefix", "suffix", "thousandSeparator", "decimalMarker", "dropSpecialCharacters", "hiddenInput", "showMaskTyped", "placeHolderCharacter", "shownMaskExpression", "showTemplate", "clearIfNotMatch", "validation", "separatorLimit", "allowNegativeNumbers", "leadZeroDateTime", "leadZero", "triggerOnMaskChange", "apm", "inputTransformFn", "outputTransformFn", "keepCharacterPositions"], outputs: ["maskFilled"], exportAs: ["mask", "ngxMask"] }, { kind: "directive", type: i6.Dir, selector: "[dir]", inputs: ["dir"], outputs: ["dirChange"], exportAs: ["dir"] }, { kind: "directive", type: i7.NativeElementInjectorDirective, selector: "[ngModel], [formControl], [formControlName]" }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.MinLengthValidator, selector: "[minlength][formControlName],[minlength][formControl],[minlength][ngModel]", inputs: ["minlength"] }, { kind: "directive", type: i2.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i8$3.InlineSVGDirective, selector: "[inlineSVG]", inputs: ["inlineSVG", "resolveSVGUrl", "replaceContents", "prepend", "injectComponent", "cacheSVG", "setSVGAttributes", "removeSVGAttributes", "forceEvalStyles", "evalScripts", "fallbackImgUrl", "fallbackSVG", "onSVGLoaded"], outputs: ["onSVGInserted", "onSVGFailed"] }, { kind: "pipe", type: i5.KeyValuePipe, name: "keyvalue" }] }); }
|
|
6462
6413
|
}
|
|
6463
6414
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: TextboxComponent, decorators: [{
|
|
6464
6415
|
type: Component,
|
|
6465
|
-
args: [{ selector: 'BBSF-TextBox', template: "<div class=\"form-group bbsf-control bbsf-textbox\" [formGroup]=\"group\">\r\n <div [ngClass]=\"
|
|
6416
|
+
args: [{ selector: 'BBSF-TextBox', template: "<div class=\"form-group bbsf-control bbsf-textbox\" [formGroup]=\"group\">\r\n <div [ngClass]=\"options.viewType == 1 ? 'bbsf-vertical' : 'bbsf-horizontal'\">\r\n <!--label-->\r\n <label *ngIf=\"!options.hideLabel\" class=\"bbsf-label {{ options.labelExtraClasses }}\">\r\n {{ options.labelValue }}\r\n <!--Asterisk-->\r\n @if (((options.showAsterisk && options.isRequired) || options.isRequired) && !options.isReadonly) {\r\n <span class=\"text-danger\">*</span>\r\n }\r\n </label>\r\n <!--MaskPattern-->\r\n @if (maskPattern != null && maskPattern != '' && !options.isReadonly) {\r\n <div class=\"bbsf-input-container\" [ngClass]=\"options.enableCopyToClipboard ? 'p-40px' : ''\">\r\n <!--Icon-->\r\n <div *ngIf=\"options.icon != null\" class=\"svg svg-icon-grey bbsf-icon\"\r\n [ngClass]=\"options.iconPosition == 1 ? 'bbsf-left-icon' : 'bbsf-right-icon'\">\r\n <span [inlineSVG]=\"options.icon\"></span>\r\n </div>\r\n <!--input-->\r\n <input class=\"form-control {{ options.extraClasses }}\" [mask]=\"maskPattern\" placeHolderCharacter=\" \"\r\n [showMaskTyped]=\"true\" [validation]=\"true\" [dir]=\"textDir\" aria-describedby=\"email-error\" aria-invalid=\"true\"\r\n formControlName=\"{{ options.name }}\" type=\"{{ getInputType(options.type) }}\" [(ngModel)]=\"options.value\"\r\n [class.is-invalid]=\"textBoxFormControl.invalid && textBoxFormControl.touched\"\r\n placeholder=\"{{ options.placeholder }}\" id=\"{{ options.name }}\" autocomplete=\"{{ options.autoComplete }}\"\r\n (change)=\"trimControlValue()\" (keyup)=\"onTextChange()\" [readonly]=\"options.isReadonly\"\r\n (keydown)=\"wordCountArray > options.maxWordCount && $event.keyCode != 8 ? $event.preventDefault() : null\"\r\n #userInput (blur)=\"onTextBlur()\" />\r\n <!--CopyToClipboard-->\r\n <span class=\"copy-clipboard\" ngbTooltip=\"Copied!\" *ngIf=\"options.enableCopyToClipboard\"\r\n (click)=\"copyInputMessage(userInput)\">\r\n <i class=\"fas fa-copy\"></i>\r\n </span>\r\n </div>\r\n }\r\n <!--NoMaskPattern-->\r\n <div *ngIf=\"maskPattern == null || (maskPattern == '' && !options.isReadonly)\" class=\"bbsf-input-container\"\r\n [ngClass]=\"options.enableCopyToClipboard ? 'p-40px' : ''\">\r\n <!--Icon-->\r\n <div class=\"svg svg-icon-grey bbsf-icon\"\r\n [ngClass]=\"options.iconPosition == 1 ? 'bbsf-left-icon' : 'bbsf-right-icon'\" *ngIf=\"options.icon != null\">\r\n <span [inlineSVG]=\"options.icon\"></span>\r\n </div>\r\n <!--input-->\r\n <input class=\"form-control {{ options.extraClasses }} \" [dir]=\"textDir\" (focus)=\"onFocus(true)\"\r\n (focusout)=\"onFocus(false)\" maxlength=\"{{ options.maxLength }}\" minlength=\"{{ options.minLength }}\"\r\n aria-describedby=\"email-error\" aria-invalid=\"true\" formControlName=\"{{ options.name }}\"\r\n type=\"{{ getInputType(options.type) }}\"\r\n [class.is-invalid]=\"textBoxFormControl.invalid && textBoxFormControl.touched\"\r\n placeholder=\"{{ options.placeholder }}\" id=\"{{ options.name }}\" autocomplete=\"{{ options.autoComplete }}\"\r\n (change)=\"trimControlValue()\" (keyup)=\"onTextChange()\" [(ngModel)]=\"options.value\"\r\n (keydown)=\"wordCountArray > options.maxWordCount && $event.keyCode != 8 ? $event.preventDefault() : null\"\r\n [readonly]=\"options.isReadonly\" #userInput (blur)=\"onTextBlur()\" />\r\n <!--CopyToClipboard-->\r\n <span class=\"copy-clipboard\" ngbTooltip=\"Copied!\" triggers=\"click:blur\" *ngIf=\"options.enableCopyToClipboard\"\r\n (click)=\"copyInputMessage(userInput)\">\r\n <i class=\"fas fa-copy\"></i>\r\n </span>\r\n </div>\r\n <!-- readonly -->\r\n @if (options.isReadonly) {\r\n <div>\r\n <a *ngIf=\"options.type == inputType.Email\" href=\"mailto: {{ options.value }}\">{{ options.value }}</a>\r\n <a *ngIf=\"options.type == inputType.URL\" href=\"{{ options.value }}\" target=\"_blank\">{{ options.value }}</a>\r\n <span *ngIf=\"options.type != inputType.URL && options.type != inputType.Email\"\r\n class=\"readonly-view\">{{ options.value }}</span>\r\n </div>\r\n }\r\n </div>\r\n <div class=\"subtext-container\">\r\n <!--wordCount-->\r\n <div class=\"bbsf-word-count\" *ngIf=\"options.maxWordCount > 0 && isShowWordCount\">\r\n {{ wordCount }}/{{ options.maxWordCount }} Words</div>\r\n <!-- CharsLimitMsg-->\r\n <div class=\"bbsf-character-count\" *ngIf=\"showCharsLimitMsg\"\r\n [ngClass]=\"{ 'badge-light-warning': charsLimitMsgClass === 'warning', 'badge-light-danger': charsLimitMsgClass === 'danger' }\">\r\n {{ maxLimitWarningMsg }}\r\n </div>\r\n <!-- LabelDescription-->\r\n <div class=\"bbsf-control-desc\" *ngIf=\"options.labelDescription != null\">{{ options.labelDescription }}</div>\r\n <!-- requiredText-->\r\n <div class=\"bbsf-validation\" [dir]=\"textDir\" *ngIf=\"textBoxFormControl.invalid && textBoxFormControl.touched\">\r\n {{ getErrorValidation(textBoxFormControl.errors | keyvalue) }}\r\n </div>\r\n </div>\r\n\r\n @if ((group.valid && group.dirty && group.touched) || (group.untouched && group.invalid && group.dirty)) {\r\n <div>{{ resetError() }}</div>\r\n }\r\n</div>" }]
|
|
6466
6417
|
}], ctorParameters: () => [{ type: ControlUtility }, { type: i2.ControlContainer, decorators: [{
|
|
6467
6418
|
type: Optional
|
|
6468
6419
|
}] }, { type: i2.FormGroupDirective }, { type: i3.UtilityService }, { type: i3.ControlValidationService }, { type: GlobalSettings }], propDecorators: { group: [{
|