@dev-tcloud/tcloud-ui 0.1.5 → 0.1.7
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/directives.module.mjs +10 -5
- package/esm2020/lib/_directives/el-copy/el-copy.directive.mjs +51 -0
- package/esm2020/lib/_modules/tcloud-ui-welcome/tcloud-ui-welcome.component.mjs +3 -3
- package/esm2020/public-api.mjs +2 -1
- package/fesm2015/dev-tcloud-tcloud-ui.mjs +60 -7
- package/fesm2015/dev-tcloud-tcloud-ui.mjs.map +1 -1
- package/fesm2020/dev-tcloud-tcloud-ui.mjs +60 -7
- package/fesm2020/dev-tcloud-tcloud-ui.mjs.map +1 -1
- package/lib/_directives/directives.module.d.ts +2 -1
- package/lib/_directives/el-copy/el-copy.directive.d.ts +13 -0
- package/lib/_modules/tcloud-ui-welcome/tcloud-ui-welcome.component.d.ts +1 -1
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
- package/scss/components/custom/el-copy.scss +6 -0
- package/scss/components/styles.scss +1 -0
|
@@ -4477,14 +4477,65 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
|
|
|
4477
4477
|
type: Input
|
|
4478
4478
|
}] } });
|
|
4479
4479
|
|
|
4480
|
+
class TCloudUiElCopyDirective {
|
|
4481
|
+
constructor(el, renderer) {
|
|
4482
|
+
this.el = el;
|
|
4483
|
+
this.renderer = renderer;
|
|
4484
|
+
this._isCopy = false;
|
|
4485
|
+
}
|
|
4486
|
+
ngOnInit() {
|
|
4487
|
+
console.log('el', this.el.nativeElement);
|
|
4488
|
+
this.setItemFuncCopy();
|
|
4489
|
+
}
|
|
4490
|
+
setItemFuncCopy() {
|
|
4491
|
+
const btn_copy = this.renderer.createElement('i');
|
|
4492
|
+
var copyText = () => {
|
|
4493
|
+
const elementWithCopyAttribute = document.querySelector(`[data-el-copy="${id}"]`);
|
|
4494
|
+
const copyText = elementWithCopyAttribute?.textContent;
|
|
4495
|
+
navigator.clipboard.writeText(copyText);
|
|
4496
|
+
this.renderer.removeClass(btn_copy, 'fa-copy');
|
|
4497
|
+
this.renderer.addClass(btn_copy, 'fa-check');
|
|
4498
|
+
setTimeout(() => {
|
|
4499
|
+
this.renderer.removeClass(btn_copy, 'fa-check');
|
|
4500
|
+
this.renderer.addClass(btn_copy, 'fa-copy');
|
|
4501
|
+
}, 3000);
|
|
4502
|
+
};
|
|
4503
|
+
const id = this.generateID();
|
|
4504
|
+
this.renderer.setAttribute(this.el.nativeElement, 'data-el-copy', `${id}`);
|
|
4505
|
+
this.renderer.setStyle(btn_copy, 'cursor', 'pointer');
|
|
4506
|
+
this.renderer.setStyle(btn_copy, 'margin-left', '3px');
|
|
4507
|
+
this.renderer.addClass(btn_copy, 'fas');
|
|
4508
|
+
this.renderer.addClass(btn_copy, 'fa-copy');
|
|
4509
|
+
this.renderer.addClass(btn_copy, 'tcloud-ui-el-copy');
|
|
4510
|
+
this.renderer.setAttribute(btn_copy, 'id', id);
|
|
4511
|
+
this.renderer.setAttribute(btn_copy, 'title', 'Copy');
|
|
4512
|
+
this.renderer.listen(btn_copy, 'click', () => { copyText(); });
|
|
4513
|
+
this.renderer.appendChild(this.el.nativeElement, btn_copy);
|
|
4514
|
+
}
|
|
4515
|
+
generateID(target) {
|
|
4516
|
+
const ref = (target) ? `-${target}` : '';
|
|
4517
|
+
return `tc-el-copy-${Math.floor(Math.random() * Math.floor(Math.random() * Date.now()))}${ref}`;
|
|
4518
|
+
}
|
|
4519
|
+
}
|
|
4520
|
+
TCloudUiElCopyDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiElCopyDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
|
|
4521
|
+
TCloudUiElCopyDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.12", type: TCloudUiElCopyDirective, selector: "[TCCopy]", ngImport: i0 });
|
|
4522
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiElCopyDirective, decorators: [{
|
|
4523
|
+
type: Directive,
|
|
4524
|
+
args: [{
|
|
4525
|
+
selector: '[TCCopy]'
|
|
4526
|
+
}]
|
|
4527
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }]; } });
|
|
4528
|
+
|
|
4480
4529
|
class TCloudUiDirectiveModule {
|
|
4481
4530
|
}
|
|
4482
4531
|
TCloudUiDirectiveModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiDirectiveModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
4483
4532
|
TCloudUiDirectiveModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiDirectiveModule, declarations: [TCloudUiTooltipDirective,
|
|
4484
4533
|
TCloudUiAlignDirective,
|
|
4485
|
-
TCloudUiHoverParentDirective
|
|
4534
|
+
TCloudUiHoverParentDirective,
|
|
4535
|
+
TCloudUiElCopyDirective], exports: [TCloudUiTooltipDirective,
|
|
4486
4536
|
TCloudUiAlignDirective,
|
|
4487
|
-
TCloudUiHoverParentDirective
|
|
4537
|
+
TCloudUiHoverParentDirective,
|
|
4538
|
+
TCloudUiElCopyDirective] });
|
|
4488
4539
|
TCloudUiDirectiveModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiDirectiveModule });
|
|
4489
4540
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiDirectiveModule, decorators: [{
|
|
4490
4541
|
type: NgModule,
|
|
@@ -4492,12 +4543,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
|
|
|
4492
4543
|
declarations: [
|
|
4493
4544
|
TCloudUiTooltipDirective,
|
|
4494
4545
|
TCloudUiAlignDirective,
|
|
4495
|
-
TCloudUiHoverParentDirective
|
|
4546
|
+
TCloudUiHoverParentDirective,
|
|
4547
|
+
TCloudUiElCopyDirective
|
|
4496
4548
|
],
|
|
4497
4549
|
exports: [
|
|
4498
4550
|
TCloudUiTooltipDirective,
|
|
4499
4551
|
TCloudUiAlignDirective,
|
|
4500
|
-
TCloudUiHoverParentDirective
|
|
4552
|
+
TCloudUiHoverParentDirective,
|
|
4553
|
+
TCloudUiElCopyDirective
|
|
4501
4554
|
],
|
|
4502
4555
|
}]
|
|
4503
4556
|
}] });
|
|
@@ -4969,10 +5022,10 @@ class TCloudUiWelcomeComponent {
|
|
|
4969
5022
|
}
|
|
4970
5023
|
}
|
|
4971
5024
|
TCloudUiWelcomeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiWelcomeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4972
|
-
TCloudUiWelcomeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: TCloudUiWelcomeComponent, selector: "tcloud-ui-welcome", inputs: { imgSrc: "imgSrc", title: "title", description: "description", size: "size", font: "font", mirrored: "mirrored" }, ngImport: i0, template: "<div class=\"tcloud-ui-welcome\">\r\n <div class=\"row\">\r\n\r\n <ng-container
|
|
5025
|
+
TCloudUiWelcomeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: TCloudUiWelcomeComponent, selector: "tcloud-ui-welcome", inputs: { imgSrc: "imgSrc", title: "title", description: "description", size: "size", font: "font", mirrored: "mirrored" }, ngImport: i0, template: "<div class=\"tcloud-ui-welcome\">\r\n <div class=\"row\">\r\n\r\n <ng-container>\r\n <div class=\"{{ col4 }} text-center\" *ngIf=\"imgSrc !== ''\" >\r\n <img class=\"containt-img-{{ size }}\" src=\"{{ imgSrc }}\">\r\n </div>\r\n <div class=\"{{ (imgSrc === '') ? col12 : col8 }} text-center\">\r\n <div class=\"info-new-window\">\r\n\r\n <div class=\"w-info-text\" *ngIf=\"title !== ''\" [innerHTML]=\"title\" ></div>\r\n \r\n <div class=\"info-{{ font }}\" *ngIf=\"description !== ''\" [innerHTML]=\"description\"></div>\r\n \r\n <div class=\"mt-5 text-center\">\r\n <ng-content></ng-content>\r\n </div>\r\n \r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n </div>\r\n</div>", styles: [".containt-img-small{text-align:center;width:100%;max-width:370px;max-height:310px;padding:10px}.w-info-text{color:var(--tc-primary);font-size:1.5em}.containt-img-normal{text-align:center;width:100%;max-width:540px;max-height:345px;padding:10px}.containt-img-big{text-align:center;width:100%;max-width:640px;max-height:425px;padding:10px}.info-new-window{position:relative;top:50%;transform:translateY(-50%)}.info-small{font-size:.7rem}.info-normal{font-size:.8rem}.info-big{font-size:1rem}.top-info{font-size:15px}h2{color:var(--tc-primary)}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
4973
5026
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiWelcomeComponent, decorators: [{
|
|
4974
5027
|
type: Component,
|
|
4975
|
-
args: [{ selector: 'tcloud-ui-welcome', template: "<div class=\"tcloud-ui-welcome\">\r\n <div class=\"row\">\r\n\r\n <ng-container
|
|
5028
|
+
args: [{ selector: 'tcloud-ui-welcome', template: "<div class=\"tcloud-ui-welcome\">\r\n <div class=\"row\">\r\n\r\n <ng-container>\r\n <div class=\"{{ col4 }} text-center\" *ngIf=\"imgSrc !== ''\" >\r\n <img class=\"containt-img-{{ size }}\" src=\"{{ imgSrc }}\">\r\n </div>\r\n <div class=\"{{ (imgSrc === '') ? col12 : col8 }} text-center\">\r\n <div class=\"info-new-window\">\r\n\r\n <div class=\"w-info-text\" *ngIf=\"title !== ''\" [innerHTML]=\"title\" ></div>\r\n \r\n <div class=\"info-{{ font }}\" *ngIf=\"description !== ''\" [innerHTML]=\"description\"></div>\r\n \r\n <div class=\"mt-5 text-center\">\r\n <ng-content></ng-content>\r\n </div>\r\n \r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n </div>\r\n</div>", styles: [".containt-img-small{text-align:center;width:100%;max-width:370px;max-height:310px;padding:10px}.w-info-text{color:var(--tc-primary);font-size:1.5em}.containt-img-normal{text-align:center;width:100%;max-width:540px;max-height:345px;padding:10px}.containt-img-big{text-align:center;width:100%;max-width:640px;max-height:425px;padding:10px}.info-new-window{position:relative;top:50%;transform:translateY(-50%)}.info-small{font-size:.7rem}.info-normal{font-size:.8rem}.info-big{font-size:1rem}.top-info{font-size:15px}h2{color:var(--tc-primary)}\n"] }]
|
|
4976
5029
|
}], ctorParameters: function () { return []; }, propDecorators: { imgSrc: [{
|
|
4977
5030
|
type: Input
|
|
4978
5031
|
}], title: [{
|
|
@@ -5331,5 +5384,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
|
|
|
5331
5384
|
* Generated bundle index. Do not edit.
|
|
5332
5385
|
*/
|
|
5333
5386
|
|
|
5334
|
-
export { BytesPipe, CNPJPipe, CPFPipe, CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR, DateBRPipe, MonthNamePipe, RespectivePipe, StatusInfoPipe, TCCondition, TCFiltersType, TCloudUiAccordionBodyComponent, TCloudUiAccordionComponent, TCloudUiAccordionModule, TCloudUiAccordionTitleComponent, TCloudUiAlignDirective, TCloudUiChoiceIssuesComponent, TCloudUiChoiceIssuesModule, TCloudUiDataListComponent, TCloudUiDataListModule, TCloudUiDataListOptionComponent, TCloudUiDatepickerComponent, TCloudUiDatepickerModule, TCloudUiDatepickerTimeComponent, TCloudUiDatepickerTimeModule, TCloudUiDirectiveModule, TCloudUiFiltersComponent, TCloudUiFiltersModule, TCloudUiHoverParentDirective, TCloudUiInputPasswordComponent, TCloudUiInputPasswordModule, TCloudUiInputSearchComponent, TCloudUiInputSearchModule, TCloudUiLineStepCircleComponent, TCloudUiLineStepCircleModule, TCloudUiLinhaLogoComponent, TCloudUiLinhaLogoModule, TCloudUiLoadingTransitionsService, TCloudUiModalBodyComponent, TCloudUiModalComponent, TCloudUiModalFooterComponent, TCloudUiModalHeaderComponent, TCloudUiModalModule, TCloudUiModule, TCloudUiMultiInputComponent, TCloudUiMultiInputModule, TCloudUiMultiSelectComponent, TCloudUiMultiSelectModule, TCloudUiMultiplesValuesComponent, TCloudUiMultiplesValuesModule, TCloudUiNotFoundComponent, TCloudUiNotFoundModule, TCloudUiNumberStepComponent, TCloudUiNumberStepModule, TCloudUiPipesModule, TCloudUiRangeDateComponent, TCloudUiScrollBoxComponent, TCloudUiScrollBoxModule, TCloudUiSearchInObjectService, TCloudUiTabContentComponent, TCloudUiTabHeadComponent, TCloudUiTabMenuComponent, TCloudUiTabMenuModule, TCloudUiTabSubtitleComponent, TCloudUiTabTitleComponent, TCloudUiTableComponent, TCloudUiTableModule, TCloudUiTooltipDirective, TCloudUiWelcomeComponent, TCloudUiWelcomeModule, ToTextPipe };
|
|
5387
|
+
export { BytesPipe, CNPJPipe, CPFPipe, CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR, DateBRPipe, MonthNamePipe, RespectivePipe, StatusInfoPipe, TCCondition, TCFiltersType, TCloudUiAccordionBodyComponent, TCloudUiAccordionComponent, TCloudUiAccordionModule, TCloudUiAccordionTitleComponent, TCloudUiAlignDirective, TCloudUiChoiceIssuesComponent, TCloudUiChoiceIssuesModule, TCloudUiDataListComponent, TCloudUiDataListModule, TCloudUiDataListOptionComponent, TCloudUiDatepickerComponent, TCloudUiDatepickerModule, TCloudUiDatepickerTimeComponent, TCloudUiDatepickerTimeModule, TCloudUiDirectiveModule, TCloudUiElCopyDirective, TCloudUiFiltersComponent, TCloudUiFiltersModule, TCloudUiHoverParentDirective, TCloudUiInputPasswordComponent, TCloudUiInputPasswordModule, TCloudUiInputSearchComponent, TCloudUiInputSearchModule, TCloudUiLineStepCircleComponent, TCloudUiLineStepCircleModule, TCloudUiLinhaLogoComponent, TCloudUiLinhaLogoModule, TCloudUiLoadingTransitionsService, TCloudUiModalBodyComponent, TCloudUiModalComponent, TCloudUiModalFooterComponent, TCloudUiModalHeaderComponent, TCloudUiModalModule, TCloudUiModule, TCloudUiMultiInputComponent, TCloudUiMultiInputModule, TCloudUiMultiSelectComponent, TCloudUiMultiSelectModule, TCloudUiMultiplesValuesComponent, TCloudUiMultiplesValuesModule, TCloudUiNotFoundComponent, TCloudUiNotFoundModule, TCloudUiNumberStepComponent, TCloudUiNumberStepModule, TCloudUiPipesModule, TCloudUiRangeDateComponent, TCloudUiScrollBoxComponent, TCloudUiScrollBoxModule, TCloudUiSearchInObjectService, TCloudUiTabContentComponent, TCloudUiTabHeadComponent, TCloudUiTabMenuComponent, TCloudUiTabMenuModule, TCloudUiTabSubtitleComponent, TCloudUiTabTitleComponent, TCloudUiTableComponent, TCloudUiTableModule, TCloudUiTooltipDirective, TCloudUiWelcomeComponent, TCloudUiWelcomeModule, ToTextPipe };
|
|
5335
5388
|
//# sourceMappingURL=dev-tcloud-tcloud-ui.mjs.map
|