@dev-tcloud/tcloud-ui 0.1.17 → 0.1.19

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.
@@ -4410,38 +4410,41 @@ class TCloudUiTooltipDirective {
4410
4410
  }
4411
4411
  };
4412
4412
  hoverOutCallback;
4413
- const scrollTop = window.scrollY || window.pageYOffset;
4414
- const tooltip = this.renderer.createElement('div');
4415
- const rect = this.el.nativeElement?.getBoundingClientRect();
4416
- const direction = this.el.nativeElement?.attributes['ng-reflect--t-cdirection']?.value || 'top';
4417
- const el_position_x = (rect?.left) ? parseInt(rect?.left) : 0;
4418
- const el_position_y = (rect?.top) ? parseInt(rect?.top + scrollTop) : 0;
4419
- let width = 0;
4420
- let height = 0;
4421
- if (event && event.target) {
4422
- const _event = event.target;
4423
- height = _event.offsetHeight;
4424
- width = _event.offsetWidth;
4425
- }
4426
- const top = `${(el_position_y - ((height / 2) + 10))}px`;
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);
4413
+ setTimeout(() => {
4414
+ const scrollTop = window.scrollY || window.pageYOffset;
4415
+ const tooltip = this.renderer.createElement('div');
4416
+ const rect = this.el.nativeElement?.getBoundingClientRect();
4417
+ // const direction = this.el.nativeElement?.attributes['ng-reflect--t-cdirection']?.value || 'top';
4418
+ const direction = this._direction || 'top';
4419
+ const el_position_x = (rect?.left) ? parseInt(rect?.left) : 0;
4420
+ const el_position_y = (rect?.top) ? parseInt(rect?.top + scrollTop) : 0;
4421
+ let width = 0;
4422
+ let height = 0;
4423
+ if (event && event.target) {
4424
+ const _event = event.target;
4425
+ height = _event.offsetHeight;
4426
+ width = _event.offsetWidth;
4443
4427
  }
4444
- }
4428
+ const top = `${(el_position_y - ((height / 2) + 10))}px`;
4429
+ const left = `${el_position_x + (width / 2)}px`;
4430
+ this.renderer.setStyle(tooltip, 'top', '0px');
4431
+ this.renderer.setStyle(tooltip, 'left', '0px');
4432
+ this.renderer.setStyle(tooltip, 'opacity', '0');
4433
+ this.renderer.addClass(tooltip, 'tc-directive-tooltip');
4434
+ this.renderer.addClass(tooltip, `tc-directive-tooltip-${direction}`);
4435
+ const id = this.generateID();
4436
+ this.renderer.setAttribute(tooltip, 'id', id);
4437
+ const textNode = this.info_text;
4438
+ if (textNode !== undefined && textNode !== null && textNode !== '') {
4439
+ tooltip.innerHTML = textNode;
4440
+ this.renderer.appendChild(document.body, tooltip);
4441
+ this.start_tooltip(id, height, width, el_position_x, el_position_y, direction);
4442
+ if (tooltip) {
4443
+ tooltip.addEventListener('mouseenter', hoverInCallback);
4444
+ tooltip.addEventListener('mouseleave', hoverOutCallback);
4445
+ }
4446
+ }
4447
+ });
4445
4448
  }
4446
4449
  onMouseOut(event) {
4447
4450
  this.remove = true;
@@ -5265,6 +5268,115 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
5265
5268
  }]
5266
5269
  }] });
5267
5270
 
5271
+ class TCloudUiProgressBarComponent {
5272
+ constructor() {
5273
+ /*
5274
+ status
5275
+ */
5276
+ this._status = '0';
5277
+ /*
5278
+ mode
5279
+ */
5280
+ this._mode = 'primary';
5281
+ /*
5282
+ height
5283
+ */
5284
+ this._height = 'normal';
5285
+ this.progress_class = '';
5286
+ this.height_class = '';
5287
+ }
5288
+ set status(status) {
5289
+ let value = `${status}`;
5290
+ if (value) {
5291
+ setTimeout(() => {
5292
+ this._status = value;
5293
+ });
5294
+ }
5295
+ }
5296
+ get status() { return this._status; }
5297
+ set mode(mode) {
5298
+ if (mode) {
5299
+ this._mode = mode;
5300
+ this.setMode();
5301
+ }
5302
+ }
5303
+ get mode() { return this._mode; }
5304
+ set height(height) {
5305
+ if (height) {
5306
+ this._height = height;
5307
+ this.setheight();
5308
+ }
5309
+ }
5310
+ get height() { return this._height; }
5311
+ ngOnInit() {
5312
+ this.setMode();
5313
+ this.setheight();
5314
+ }
5315
+ setMode() {
5316
+ const mode = this.mode;
5317
+ let progress_class = 'progress-primary';
5318
+ switch (mode) {
5319
+ case 'primary':
5320
+ progress_class = 'progress-primary';
5321
+ break;
5322
+ case 'danger':
5323
+ progress_class = 'progress-danger';
5324
+ break;
5325
+ case 'warning':
5326
+ progress_class = 'progress-warning';
5327
+ break;
5328
+ case 'info':
5329
+ progress_class = 'progress-info';
5330
+ break;
5331
+ }
5332
+ this.progress_class = progress_class;
5333
+ }
5334
+ setheight() {
5335
+ const height = this.height;
5336
+ let height_class = 'height-normal';
5337
+ switch (height) {
5338
+ case 'normal':
5339
+ height_class = 'height-normal';
5340
+ break;
5341
+ case 'slim':
5342
+ height_class = 'height-slim';
5343
+ break;
5344
+ case 'fat':
5345
+ height_class = 'height-fat';
5346
+ break;
5347
+ }
5348
+ this.height_class = height_class;
5349
+ }
5350
+ }
5351
+ TCloudUiProgressBarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiProgressBarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
5352
+ TCloudUiProgressBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: TCloudUiProgressBarComponent, selector: "tcloud-ui-progress-bar", inputs: { status: "status", mode: "mode", height: "height" }, ngImport: i0, template: "<div class=\"tc-ui-progress-bar\">\n <div class=\"tc-progress-bar {{ height_class }}\">\n <div class=\"tc-progress-bar-status {{ progress_class }} {{ height_class }}\" [style]=\"'width: ' + status + '%'\"></div>\n </div>\n</div>", styles: [".tc-ui-progress-bar{border:1px solid #ccc;border-radius:9px}.tc-ui-progress-bar .height-slim{height:10px;border-radius:5px}.tc-ui-progress-bar .height-normal{height:15px;border-radius:8px}.tc-ui-progress-bar .height-fat{height:20px;border-radius:10px}.tc-ui-progress-bar .tc-progress-bar{border:1px solid #fff;background-color:var(--tc-gray-200);overflow:hidden}.tc-ui-progress-bar .tc-progress-bar .tc-progress-bar-status{transition:width 2s ease;position:relative;bottom:1px}.tc-ui-progress-bar .tc-progress-bar .tc-progress-bar-status.progress-primary{background-color:var(--tc-primary)}.tc-ui-progress-bar .tc-progress-bar .tc-progress-bar-status.progress-danger{background-color:var(--red)}.tc-ui-progress-bar .tc-progress-bar .tc-progress-bar-status.progress-warning{background-color:var(--orange)}.tc-ui-progress-bar .tc-progress-bar .tc-progress-bar-status.progress-info{background-color:var(--azul)}\n"] });
5353
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiProgressBarComponent, decorators: [{
5354
+ type: Component,
5355
+ args: [{ selector: 'tcloud-ui-progress-bar', template: "<div class=\"tc-ui-progress-bar\">\n <div class=\"tc-progress-bar {{ height_class }}\">\n <div class=\"tc-progress-bar-status {{ progress_class }} {{ height_class }}\" [style]=\"'width: ' + status + '%'\"></div>\n </div>\n</div>", styles: [".tc-ui-progress-bar{border:1px solid #ccc;border-radius:9px}.tc-ui-progress-bar .height-slim{height:10px;border-radius:5px}.tc-ui-progress-bar .height-normal{height:15px;border-radius:8px}.tc-ui-progress-bar .height-fat{height:20px;border-radius:10px}.tc-ui-progress-bar .tc-progress-bar{border:1px solid #fff;background-color:var(--tc-gray-200);overflow:hidden}.tc-ui-progress-bar .tc-progress-bar .tc-progress-bar-status{transition:width 2s ease;position:relative;bottom:1px}.tc-ui-progress-bar .tc-progress-bar .tc-progress-bar-status.progress-primary{background-color:var(--tc-primary)}.tc-ui-progress-bar .tc-progress-bar .tc-progress-bar-status.progress-danger{background-color:var(--red)}.tc-ui-progress-bar .tc-progress-bar .tc-progress-bar-status.progress-warning{background-color:var(--orange)}.tc-ui-progress-bar .tc-progress-bar .tc-progress-bar-status.progress-info{background-color:var(--azul)}\n"] }]
5356
+ }], ctorParameters: function () { return []; }, propDecorators: { status: [{
5357
+ type: Input
5358
+ }], mode: [{
5359
+ type: Input
5360
+ }], height: [{
5361
+ type: Input
5362
+ }] } });
5363
+
5364
+ class TCloudUiProgressBarModule {
5365
+ }
5366
+ TCloudUiProgressBarModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiProgressBarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
5367
+ TCloudUiProgressBarModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiProgressBarModule, declarations: [TCloudUiProgressBarComponent], imports: [CommonModule], exports: [TCloudUiProgressBarComponent] });
5368
+ TCloudUiProgressBarModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiProgressBarModule, imports: [CommonModule] });
5369
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiProgressBarModule, decorators: [{
5370
+ type: NgModule,
5371
+ args: [{
5372
+ declarations: [TCloudUiProgressBarComponent],
5373
+ exports: [TCloudUiProgressBarComponent],
5374
+ imports: [
5375
+ CommonModule
5376
+ ]
5377
+ }]
5378
+ }] });
5379
+
5268
5380
  class TCloudUiModule {
5269
5381
  }
5270
5382
  TCloudUiModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
@@ -5288,6 +5400,7 @@ TCloudUiModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version:
5288
5400
  TCloudUiMultiplesValuesModule,
5289
5401
  TCloudUiWelcomeModule,
5290
5402
  TCloudUiInputPasswordModule,
5403
+ TCloudUiProgressBarModule,
5291
5404
  // Directives
5292
5405
  TCloudUiDirectiveModule,
5293
5406
  // Pipes
@@ -5311,6 +5424,7 @@ TCloudUiModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version:
5311
5424
  TCloudUiMultiplesValuesModule,
5312
5425
  TCloudUiWelcomeModule,
5313
5426
  TCloudUiInputPasswordModule,
5427
+ TCloudUiProgressBarModule,
5314
5428
  // Directives
5315
5429
  TCloudUiDirectiveModule,
5316
5430
  // Pipes
@@ -5338,6 +5452,7 @@ TCloudUiModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version:
5338
5452
  TCloudUiMultiplesValuesModule,
5339
5453
  TCloudUiWelcomeModule,
5340
5454
  TCloudUiInputPasswordModule,
5455
+ TCloudUiProgressBarModule,
5341
5456
  // Directives
5342
5457
  TCloudUiDirectiveModule,
5343
5458
  // Pipes
@@ -5361,6 +5476,7 @@ TCloudUiModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version:
5361
5476
  TCloudUiMultiplesValuesModule,
5362
5477
  TCloudUiWelcomeModule,
5363
5478
  TCloudUiInputPasswordModule,
5479
+ TCloudUiProgressBarModule,
5364
5480
  // Directives
5365
5481
  TCloudUiDirectiveModule,
5366
5482
  // Pipes
@@ -5389,6 +5505,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
5389
5505
  TCloudUiMultiplesValuesModule,
5390
5506
  TCloudUiWelcomeModule,
5391
5507
  TCloudUiInputPasswordModule,
5508
+ TCloudUiProgressBarModule,
5392
5509
  // Directives
5393
5510
  TCloudUiDirectiveModule,
5394
5511
  // Pipes
@@ -5415,6 +5532,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
5415
5532
  TCloudUiMultiplesValuesModule,
5416
5533
  TCloudUiWelcomeModule,
5417
5534
  TCloudUiInputPasswordModule,
5535
+ TCloudUiProgressBarModule,
5418
5536
  // Directives
5419
5537
  TCloudUiDirectiveModule,
5420
5538
  // Pipes
@@ -5435,5 +5553,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
5435
5553
  * Generated bundle index. Do not edit.
5436
5554
  */
5437
5555
 
5438
- 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 };
5556
+ 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, TCloudUiProgressBarComponent, TCloudUiProgressBarModule, TCloudUiRangeDateComponent, TCloudUiScrollBoxComponent, TCloudUiScrollBoxModule, TCloudUiSearchInObjectService, TCloudUiTabContentComponent, TCloudUiTabHeadComponent, TCloudUiTabMenuComponent, TCloudUiTabMenuModule, TCloudUiTabSubtitleComponent, TCloudUiTabTitleComponent, TCloudUiTableComponent, TCloudUiTableModule, TCloudUiTooltipDirective, TCloudUiWelcomeComponent, TCloudUiWelcomeModule, ToTextPipe };
5439
5557
  //# sourceMappingURL=dev-tcloud-tcloud-ui.mjs.map