@dev-tcloud/tcloud-ui 0.1.18 → 0.1.20
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/esm2020/lib/_directives/el-copy/el-copy.directive.mjs +21 -3
- package/esm2020/lib/_directives/tooltip/tooltip.directive.mjs +35 -32
- package/esm2020/lib/_modules/tcloud-ui-input-password/tcloud-ui-input-password.component.mjs +13 -4
- package/esm2020/lib/_pipes/bytes.mjs +10 -2
- package/fesm2015/dev-tcloud-tcloud-ui.mjs +77 -38
- package/fesm2015/dev-tcloud-tcloud-ui.mjs.map +1 -1
- package/fesm2020/dev-tcloud-tcloud-ui.mjs +75 -37
- package/fesm2020/dev-tcloud-tcloud-ui.mjs.map +1 -1
- package/lib/_modules/tcloud-ui-input-password/tcloud-ui-input-password.component.d.ts +4 -1
- package/lib/_pipes/bytes.d.ts +1 -1
- package/package.json +1 -1
- package/scss/components/custom/el-copy.scss +12 -0
|
@@ -2112,7 +2112,15 @@ class BytesPipe {
|
|
|
2112
2112
|
const c = 0 > b ? 0 : b, d = Math.floor(Math.log(a) / Math.log(1024));
|
|
2113
2113
|
return parseFloat((a / Math.pow(1024, d)).toFixed(c)) + ' ' + ["Bytes", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"][d];
|
|
2114
2114
|
}
|
|
2115
|
-
transform(value) {
|
|
2115
|
+
transform(value, typeValue) {
|
|
2116
|
+
if (typeValue !== undefined && typeValue !== null && typeValue !== '') {
|
|
2117
|
+
if ((typeValue).toLowerCase() === 'kb') {
|
|
2118
|
+
value = value * 1024;
|
|
2119
|
+
}
|
|
2120
|
+
if ((typeValue).toLowerCase() === 'mb') {
|
|
2121
|
+
value = (value * 1024) * 1024;
|
|
2122
|
+
}
|
|
2123
|
+
}
|
|
2116
2124
|
const b = +value;
|
|
2117
2125
|
return this.formatBytes(b);
|
|
2118
2126
|
}
|
|
@@ -4410,38 +4418,41 @@ class TCloudUiTooltipDirective {
|
|
|
4410
4418
|
}
|
|
4411
4419
|
};
|
|
4412
4420
|
hoverOutCallback;
|
|
4413
|
-
|
|
4414
|
-
|
|
4415
|
-
|
|
4416
|
-
|
|
4417
|
-
|
|
4418
|
-
|
|
4419
|
-
|
|
4420
|
-
|
|
4421
|
-
|
|
4422
|
-
|
|
4423
|
-
|
|
4424
|
-
|
|
4425
|
-
|
|
4426
|
-
|
|
4427
|
-
const left = `${el_position_x + (width / 2)}px`;
|
|
4428
|
-
this.renderer.setStyle(tooltip, 'top', '0px');
|
|
4429
|
-
this.renderer.setStyle(tooltip, 'left', '0px');
|
|
4430
|
-
this.renderer.setStyle(tooltip, 'opacity', '0');
|
|
4431
|
-
this.renderer.addClass(tooltip, 'tc-directive-tooltip');
|
|
4432
|
-
this.renderer.addClass(tooltip, `tc-directive-tooltip-${direction}`);
|
|
4433
|
-
const id = this.generateID();
|
|
4434
|
-
this.renderer.setAttribute(tooltip, 'id', id);
|
|
4435
|
-
const textNode = this.info_text;
|
|
4436
|
-
if (textNode !== undefined && textNode !== null && textNode !== '') {
|
|
4437
|
-
tooltip.innerHTML = textNode;
|
|
4438
|
-
this.renderer.appendChild(document.body, tooltip);
|
|
4439
|
-
this.start_tooltip(id, height, width, el_position_x, el_position_y, direction);
|
|
4440
|
-
if (tooltip) {
|
|
4441
|
-
tooltip.addEventListener('mouseenter', hoverInCallback);
|
|
4442
|
-
tooltip.addEventListener('mouseleave', hoverOutCallback);
|
|
4421
|
+
setTimeout(() => {
|
|
4422
|
+
const scrollTop = window.scrollY || window.pageYOffset;
|
|
4423
|
+
const tooltip = this.renderer.createElement('div');
|
|
4424
|
+
const rect = this.el.nativeElement?.getBoundingClientRect();
|
|
4425
|
+
// const direction = this.el.nativeElement?.attributes['ng-reflect--t-cdirection']?.value || 'top';
|
|
4426
|
+
const direction = this._direction || 'top';
|
|
4427
|
+
const el_position_x = (rect?.left) ? parseInt(rect?.left) : 0;
|
|
4428
|
+
const el_position_y = (rect?.top) ? parseInt(rect?.top + scrollTop) : 0;
|
|
4429
|
+
let width = 0;
|
|
4430
|
+
let height = 0;
|
|
4431
|
+
if (event && event.target) {
|
|
4432
|
+
const _event = event.target;
|
|
4433
|
+
height = _event.offsetHeight;
|
|
4434
|
+
width = _event.offsetWidth;
|
|
4443
4435
|
}
|
|
4444
|
-
|
|
4436
|
+
const top = `${(el_position_y - ((height / 2) + 10))}px`;
|
|
4437
|
+
const left = `${el_position_x + (width / 2)}px`;
|
|
4438
|
+
this.renderer.setStyle(tooltip, 'top', '0px');
|
|
4439
|
+
this.renderer.setStyle(tooltip, 'left', '0px');
|
|
4440
|
+
this.renderer.setStyle(tooltip, 'opacity', '0');
|
|
4441
|
+
this.renderer.addClass(tooltip, 'tc-directive-tooltip');
|
|
4442
|
+
this.renderer.addClass(tooltip, `tc-directive-tooltip-${direction}`);
|
|
4443
|
+
const id = this.generateID();
|
|
4444
|
+
this.renderer.setAttribute(tooltip, 'id', id);
|
|
4445
|
+
const textNode = this.info_text;
|
|
4446
|
+
if (textNode !== undefined && textNode !== null && textNode !== '') {
|
|
4447
|
+
tooltip.innerHTML = textNode;
|
|
4448
|
+
this.renderer.appendChild(document.body, tooltip);
|
|
4449
|
+
this.start_tooltip(id, height, width, el_position_x, el_position_y, direction);
|
|
4450
|
+
if (tooltip) {
|
|
4451
|
+
tooltip.addEventListener('mouseenter', hoverInCallback);
|
|
4452
|
+
tooltip.addEventListener('mouseleave', hoverOutCallback);
|
|
4453
|
+
}
|
|
4454
|
+
}
|
|
4455
|
+
});
|
|
4445
4456
|
}
|
|
4446
4457
|
onMouseOut(event) {
|
|
4447
4458
|
this.remove = true;
|
|
@@ -4544,7 +4555,13 @@ class TCloudUiElCopyDirective {
|
|
|
4544
4555
|
const btn_copy = this.renderer.createElement('i');
|
|
4545
4556
|
var copyText = () => {
|
|
4546
4557
|
const elementWithCopyAttribute = document.querySelector(`[data-el-copy="${id}"]`);
|
|
4547
|
-
|
|
4558
|
+
let copyText = '';
|
|
4559
|
+
if (elementWithCopyAttribute && elementWithCopyAttribute.tagName && (elementWithCopyAttribute.tagName).toUpperCase() === 'INPUT') {
|
|
4560
|
+
copyText = elementWithCopyAttribute?.value;
|
|
4561
|
+
}
|
|
4562
|
+
else {
|
|
4563
|
+
copyText = elementWithCopyAttribute?.textContent;
|
|
4564
|
+
}
|
|
4548
4565
|
navigator.clipboard.writeText(copyText);
|
|
4549
4566
|
this.renderer.removeClass(btn_copy, 'fa-copy');
|
|
4550
4567
|
this.renderer.addClass(btn_copy, 'fa-check');
|
|
@@ -4563,7 +4580,19 @@ class TCloudUiElCopyDirective {
|
|
|
4563
4580
|
this.renderer.setAttribute(btn_copy, 'id', id);
|
|
4564
4581
|
this.renderer.setAttribute(btn_copy, 'title', 'Copy');
|
|
4565
4582
|
this.renderer.listen(btn_copy, 'click', () => { copyText(); });
|
|
4566
|
-
|
|
4583
|
+
if (((this.el.nativeElement).tagName).toUpperCase() === 'INPUT') {
|
|
4584
|
+
let classList = this.el.nativeElement?.classList;
|
|
4585
|
+
if (classList && (classList).length > 0 && ('tc-form-control').indexOf(classList) > -1) {
|
|
4586
|
+
this.renderer.addClass(btn_copy, 'tcloud-ui-el-input-copy-tc-form-control');
|
|
4587
|
+
}
|
|
4588
|
+
else {
|
|
4589
|
+
this.renderer.addClass(btn_copy, 'tcloud-ui-el-input-copy');
|
|
4590
|
+
}
|
|
4591
|
+
this.renderer.appendChild(this.el.nativeElement.parentNode, btn_copy);
|
|
4592
|
+
}
|
|
4593
|
+
else {
|
|
4594
|
+
this.renderer.appendChild(this.el.nativeElement, btn_copy);
|
|
4595
|
+
}
|
|
4567
4596
|
}
|
|
4568
4597
|
generateID(target) {
|
|
4569
4598
|
const ref = (target) ? `-${target}` : '';
|
|
@@ -5120,6 +5149,9 @@ const noop = () => {
|
|
|
5120
5149
|
};
|
|
5121
5150
|
class TCloudUiInputPasswordComponent {
|
|
5122
5151
|
constructor() {
|
|
5152
|
+
this.actionView = true;
|
|
5153
|
+
this.actionCopy = true;
|
|
5154
|
+
this.actionGeneratePassword = true;
|
|
5123
5155
|
this.numberOfCharacter = 14;
|
|
5124
5156
|
this.atLeastOneUppercaseLetter = true;
|
|
5125
5157
|
this.atLeastOneLowercaseLetter = true;
|
|
@@ -5221,11 +5253,17 @@ class TCloudUiInputPasswordComponent {
|
|
|
5221
5253
|
}
|
|
5222
5254
|
}
|
|
5223
5255
|
TCloudUiInputPasswordComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiInputPasswordComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
5224
|
-
TCloudUiInputPasswordComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: TCloudUiInputPasswordComponent, selector: "tcloud-ui-input-password", inputs: { numberOfCharacter: "numberOfCharacter", atLeastOneUppercaseLetter: "atLeastOneUppercaseLetter", atLeastOneLowercaseLetter: "atLeastOneLowercaseLetter", atLeastOneSpecialCharacter: "atLeastOneSpecialCharacter", ngModel: "ngModel" }, outputs: { ngModelChange: "ngModelChange" }, providers: [CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR], ngImport: i0, template: "<div class=\"tcloud-ui-input-password\">\r\n <table>\r\n <tr>\r\n <!-- input password -->\r\n <td>\r\n <form #_form=\"ngForm\">\r\n <ng-container *ngIf=\"passwordRegex\">\r\n <input class=\"tc-form-control\" *ngIf=\"mode == 'password'\" type=\"password\" name=\"tc_password\" [pattern]=\"passwordRegex\" autoComplete=\"new-password\" [(ngModel)]=\"innerValue\" required>\r\n <input class=\"tc-form-control\" *ngIf=\"mode == 'text'\" type=\"text\" name=\"tc_text\" [pattern]=\"passwordRegex\" [(ngModel)]=\"innerValue\" required>\r\n </ng-container>\r\n </form>\r\n </td>\r\n\r\n <!-- action show hide -->\r\n <td>\r\n <button type=\"button\" (click)=\"toggleMode()\" [title]=\"(mode == 'password') ? 'Visualizar Senha' : 'Esconder Senha'\">\r\n <i *ngIf=\"mode == 'password'\" class=\"far fa-eye-slash\"></i>\r\n <i *ngIf=\"mode == 'text'\" class=\"far fa-eye\"></i> \r\n </button>\r\n </td>\r\n\r\n <!-- action generate pass -->\r\n <td>\r\n <button type=\"button\" [title]=\"'Gerar Senha'\" (click)=\"generatePassword()\">\r\n <i class=\"fa-solid fa-key\"></i>\r\n </button>\r\n </td>\r\n\r\n <!-- action copy pass -->\r\n <td>\r\n <button type=\"button\" [title]=\"'Copiar Senha'\" (click)=\"copyText()\">\r\n <i *ngIf=\"!isCopy\" class=\"fa-regular fa-copy\"></i>\r\n <i *ngIf=\"isCopy\" class=\"fa-solid fa-check\"></i>\r\n </button>\r\n </td>\r\n </tr>\r\n </table>\r\n</div>", styles: [".tcloud-ui-input-password{border:1px solid var(--tc-gray-300);border-radius:3px}.tcloud-ui-input-password table{width:100%}.tcloud-ui-input-password table td:first-child{width:100%!important}.tcloud-ui-input-password table td:first-child input{width:100%;border:none;height:38px;padding-left:8px}.tcloud-ui-input-password table td{width:50px;height:40px;background-color:#fff}.tcloud-ui-input-password table td button{background:transparent;border:none;margin-right:3px;cursor:pointer;color:var(--tc-gray-500)}.tcloud-ui-input-password table td button:hover{color:var(--tc-primary2)}.tcloud-ui-input-password .ng-invalid.ng-touched{border:1px solid var(--red)!important}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { 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.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2.PatternValidator, selector: "[pattern][formControlName],[pattern][formControl],[pattern][ngModel]", inputs: ["pattern"] }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i2.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }] });
|
|
5256
|
+
TCloudUiInputPasswordComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: TCloudUiInputPasswordComponent, selector: "tcloud-ui-input-password", inputs: { actionView: "actionView", actionCopy: "actionCopy", actionGeneratePassword: "actionGeneratePassword", numberOfCharacter: "numberOfCharacter", atLeastOneUppercaseLetter: "atLeastOneUppercaseLetter", atLeastOneLowercaseLetter: "atLeastOneLowercaseLetter", atLeastOneSpecialCharacter: "atLeastOneSpecialCharacter", ngModel: "ngModel" }, outputs: { ngModelChange: "ngModelChange" }, providers: [CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR], ngImport: i0, template: "<div class=\"tcloud-ui-input-password\">\r\n <table>\r\n <tr>\r\n <!-- input password -->\r\n <td>\r\n <form #_form=\"ngForm\">\r\n <ng-container *ngIf=\"passwordRegex\">\r\n <input class=\"tc-form-control\" *ngIf=\"mode == 'password'\" type=\"password\" name=\"tc_password\" [pattern]=\"passwordRegex\" autoComplete=\"new-password\" [(ngModel)]=\"innerValue\" required>\r\n <input class=\"tc-form-control\" *ngIf=\"mode == 'text'\" type=\"text\" name=\"tc_text\" [pattern]=\"passwordRegex\" [(ngModel)]=\"innerValue\" required>\r\n </ng-container>\r\n </form>\r\n </td>\r\n\r\n <!-- action show hide -->\r\n <td *ngIf=\"actionView\">\r\n <button type=\"button\" (click)=\"toggleMode()\" [title]=\"(mode == 'password') ? 'Visualizar Senha' : 'Esconder Senha'\">\r\n <i *ngIf=\"mode == 'password'\" class=\"far fa-eye-slash\"></i>\r\n <i *ngIf=\"mode == 'text'\" class=\"far fa-eye\"></i> \r\n </button>\r\n </td>\r\n\r\n <!-- action generate pass -->\r\n <td *ngIf=\"actionGeneratePassword\">\r\n <button type=\"button\" [title]=\"'Gerar Senha'\" (click)=\"generatePassword()\">\r\n <i class=\"fa-solid fa-key\"></i>\r\n </button>\r\n </td>\r\n\r\n <!-- action copy pass -->\r\n <td *ngIf=\"actionCopy\">\r\n <button type=\"button\" [title]=\"'Copiar Senha'\" (click)=\"copyText()\">\r\n <i *ngIf=\"!isCopy\" class=\"fa-regular fa-copy\"></i>\r\n <i *ngIf=\"isCopy\" class=\"fa-solid fa-check\"></i>\r\n </button>\r\n </td>\r\n </tr>\r\n </table>\r\n</div>", styles: [".tcloud-ui-input-password{border:1px solid var(--tc-gray-300);border-radius:3px}.tcloud-ui-input-password table{width:100%}.tcloud-ui-input-password table td:first-child{width:100%!important}.tcloud-ui-input-password table td:first-child input{width:100%;border:none;height:38px;padding-left:8px}.tcloud-ui-input-password table td{width:50px;height:40px;background-color:#fff}.tcloud-ui-input-password table td button{background:transparent;border:none;margin-right:3px;cursor:pointer;color:var(--tc-gray-500)}.tcloud-ui-input-password table td button:hover{color:var(--tc-primary2)}.tcloud-ui-input-password .ng-invalid.ng-touched{border:1px solid var(--red)!important}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { 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.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2.PatternValidator, selector: "[pattern][formControlName],[pattern][formControl],[pattern][ngModel]", inputs: ["pattern"] }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i2.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }] });
|
|
5225
5257
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiInputPasswordComponent, decorators: [{
|
|
5226
5258
|
type: Component,
|
|
5227
|
-
args: [{ selector: 'tcloud-ui-input-password', providers: [CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR], template: "<div class=\"tcloud-ui-input-password\">\r\n <table>\r\n <tr>\r\n <!-- input password -->\r\n <td>\r\n <form #_form=\"ngForm\">\r\n <ng-container *ngIf=\"passwordRegex\">\r\n <input class=\"tc-form-control\" *ngIf=\"mode == 'password'\" type=\"password\" name=\"tc_password\" [pattern]=\"passwordRegex\" autoComplete=\"new-password\" [(ngModel)]=\"innerValue\" required>\r\n <input class=\"tc-form-control\" *ngIf=\"mode == 'text'\" type=\"text\" name=\"tc_text\" [pattern]=\"passwordRegex\" [(ngModel)]=\"innerValue\" required>\r\n </ng-container>\r\n </form>\r\n </td>\r\n\r\n <!-- action show hide -->\r\n <td>\r\n <button type=\"button\" (click)=\"toggleMode()\" [title]=\"(mode == 'password') ? 'Visualizar Senha' : 'Esconder Senha'\">\r\n <i *ngIf=\"mode == 'password'\" class=\"far fa-eye-slash\"></i>\r\n <i *ngIf=\"mode == 'text'\" class=\"far fa-eye\"></i> \r\n </button>\r\n </td>\r\n\r\n <!-- action generate pass -->\r\n <td>\r\n <button type=\"button\" [title]=\"'Gerar Senha'\" (click)=\"generatePassword()\">\r\n <i class=\"fa-solid fa-key\"></i>\r\n </button>\r\n </td>\r\n\r\n <!-- action copy pass -->\r\n <td>\r\n <button type=\"button\" [title]=\"'Copiar Senha'\" (click)=\"copyText()\">\r\n <i *ngIf=\"!isCopy\" class=\"fa-regular fa-copy\"></i>\r\n <i *ngIf=\"isCopy\" class=\"fa-solid fa-check\"></i>\r\n </button>\r\n </td>\r\n </tr>\r\n </table>\r\n</div>", styles: [".tcloud-ui-input-password{border:1px solid var(--tc-gray-300);border-radius:3px}.tcloud-ui-input-password table{width:100%}.tcloud-ui-input-password table td:first-child{width:100%!important}.tcloud-ui-input-password table td:first-child input{width:100%;border:none;height:38px;padding-left:8px}.tcloud-ui-input-password table td{width:50px;height:40px;background-color:#fff}.tcloud-ui-input-password table td button{background:transparent;border:none;margin-right:3px;cursor:pointer;color:var(--tc-gray-500)}.tcloud-ui-input-password table td button:hover{color:var(--tc-primary2)}.tcloud-ui-input-password .ng-invalid.ng-touched{border:1px solid var(--red)!important}\n"] }]
|
|
5228
|
-
}], ctorParameters: function () { return []; }, propDecorators: {
|
|
5259
|
+
args: [{ selector: 'tcloud-ui-input-password', providers: [CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR], template: "<div class=\"tcloud-ui-input-password\">\r\n <table>\r\n <tr>\r\n <!-- input password -->\r\n <td>\r\n <form #_form=\"ngForm\">\r\n <ng-container *ngIf=\"passwordRegex\">\r\n <input class=\"tc-form-control\" *ngIf=\"mode == 'password'\" type=\"password\" name=\"tc_password\" [pattern]=\"passwordRegex\" autoComplete=\"new-password\" [(ngModel)]=\"innerValue\" required>\r\n <input class=\"tc-form-control\" *ngIf=\"mode == 'text'\" type=\"text\" name=\"tc_text\" [pattern]=\"passwordRegex\" [(ngModel)]=\"innerValue\" required>\r\n </ng-container>\r\n </form>\r\n </td>\r\n\r\n <!-- action show hide -->\r\n <td *ngIf=\"actionView\">\r\n <button type=\"button\" (click)=\"toggleMode()\" [title]=\"(mode == 'password') ? 'Visualizar Senha' : 'Esconder Senha'\">\r\n <i *ngIf=\"mode == 'password'\" class=\"far fa-eye-slash\"></i>\r\n <i *ngIf=\"mode == 'text'\" class=\"far fa-eye\"></i> \r\n </button>\r\n </td>\r\n\r\n <!-- action generate pass -->\r\n <td *ngIf=\"actionGeneratePassword\">\r\n <button type=\"button\" [title]=\"'Gerar Senha'\" (click)=\"generatePassword()\">\r\n <i class=\"fa-solid fa-key\"></i>\r\n </button>\r\n </td>\r\n\r\n <!-- action copy pass -->\r\n <td *ngIf=\"actionCopy\">\r\n <button type=\"button\" [title]=\"'Copiar Senha'\" (click)=\"copyText()\">\r\n <i *ngIf=\"!isCopy\" class=\"fa-regular fa-copy\"></i>\r\n <i *ngIf=\"isCopy\" class=\"fa-solid fa-check\"></i>\r\n </button>\r\n </td>\r\n </tr>\r\n </table>\r\n</div>", styles: [".tcloud-ui-input-password{border:1px solid var(--tc-gray-300);border-radius:3px}.tcloud-ui-input-password table{width:100%}.tcloud-ui-input-password table td:first-child{width:100%!important}.tcloud-ui-input-password table td:first-child input{width:100%;border:none;height:38px;padding-left:8px}.tcloud-ui-input-password table td{width:50px;height:40px;background-color:#fff}.tcloud-ui-input-password table td button{background:transparent;border:none;margin-right:3px;cursor:pointer;color:var(--tc-gray-500)}.tcloud-ui-input-password table td button:hover{color:var(--tc-primary2)}.tcloud-ui-input-password .ng-invalid.ng-touched{border:1px solid var(--red)!important}\n"] }]
|
|
5260
|
+
}], ctorParameters: function () { return []; }, propDecorators: { actionView: [{
|
|
5261
|
+
type: Input
|
|
5262
|
+
}], actionCopy: [{
|
|
5263
|
+
type: Input
|
|
5264
|
+
}], actionGeneratePassword: [{
|
|
5265
|
+
type: Input
|
|
5266
|
+
}], numberOfCharacter: [{
|
|
5229
5267
|
type: Input
|
|
5230
5268
|
}], atLeastOneUppercaseLetter: [{
|
|
5231
5269
|
type: Input
|