@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.
@@ -4413,7 +4413,6 @@ class TCloudUiTooltipDirective {
4413
4413
  this._direction = 'top';
4414
4414
  }
4415
4415
  onMouseOver(event) {
4416
- var _a, _b, _c;
4417
4416
  let hoverInCallback = () => {
4418
4417
  this.remove = false;
4419
4418
  };
@@ -4425,38 +4424,42 @@ class TCloudUiTooltipDirective {
4425
4424
  }
4426
4425
  };
4427
4426
  hoverOutCallback;
4428
- const scrollTop = window.scrollY || window.pageYOffset;
4429
- const tooltip = this.renderer.createElement('div');
4430
- const rect = (_a = this.el.nativeElement) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
4431
- const direction = ((_c = (_b = this.el.nativeElement) === null || _b === void 0 ? void 0 : _b.attributes['ng-reflect--t-cdirection']) === null || _c === void 0 ? void 0 : _c.value) || 'top';
4432
- const el_position_x = (rect === null || rect === void 0 ? void 0 : rect.left) ? parseInt(rect === null || rect === void 0 ? void 0 : rect.left) : 0;
4433
- const el_position_y = (rect === null || rect === void 0 ? void 0 : rect.top) ? parseInt((rect === null || rect === void 0 ? void 0 : rect.top) + scrollTop) : 0;
4434
- let width = 0;
4435
- let height = 0;
4436
- if (event && event.target) {
4437
- const _event = event.target;
4438
- height = _event.offsetHeight;
4439
- width = _event.offsetWidth;
4440
- }
4441
- const top = `${(el_position_y - ((height / 2) + 10))}px`;
4442
- const left = `${el_position_x + (width / 2)}px`;
4443
- this.renderer.setStyle(tooltip, 'top', '0px');
4444
- this.renderer.setStyle(tooltip, 'left', '0px');
4445
- this.renderer.setStyle(tooltip, 'opacity', '0');
4446
- this.renderer.addClass(tooltip, 'tc-directive-tooltip');
4447
- this.renderer.addClass(tooltip, `tc-directive-tooltip-${direction}`);
4448
- const id = this.generateID();
4449
- this.renderer.setAttribute(tooltip, 'id', id);
4450
- const textNode = this.info_text;
4451
- if (textNode !== undefined && textNode !== null && textNode !== '') {
4452
- tooltip.innerHTML = textNode;
4453
- this.renderer.appendChild(document.body, tooltip);
4454
- this.start_tooltip(id, height, width, el_position_x, el_position_y, direction);
4455
- if (tooltip) {
4456
- tooltip.addEventListener('mouseenter', hoverInCallback);
4457
- tooltip.addEventListener('mouseleave', hoverOutCallback);
4427
+ setTimeout(() => {
4428
+ var _a;
4429
+ const scrollTop = window.scrollY || window.pageYOffset;
4430
+ const tooltip = this.renderer.createElement('div');
4431
+ const rect = (_a = this.el.nativeElement) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
4432
+ // const direction = this.el.nativeElement?.attributes['ng-reflect--t-cdirection']?.value || 'top';
4433
+ const direction = this._direction || 'top';
4434
+ const el_position_x = (rect === null || rect === void 0 ? void 0 : rect.left) ? parseInt(rect === null || rect === void 0 ? void 0 : rect.left) : 0;
4435
+ const el_position_y = (rect === null || rect === void 0 ? void 0 : rect.top) ? parseInt((rect === null || rect === void 0 ? void 0 : rect.top) + scrollTop) : 0;
4436
+ let width = 0;
4437
+ let height = 0;
4438
+ if (event && event.target) {
4439
+ const _event = event.target;
4440
+ height = _event.offsetHeight;
4441
+ width = _event.offsetWidth;
4458
4442
  }
4459
- }
4443
+ const top = `${(el_position_y - ((height / 2) + 10))}px`;
4444
+ const left = `${el_position_x + (width / 2)}px`;
4445
+ this.renderer.setStyle(tooltip, 'top', '0px');
4446
+ this.renderer.setStyle(tooltip, 'left', '0px');
4447
+ this.renderer.setStyle(tooltip, 'opacity', '0');
4448
+ this.renderer.addClass(tooltip, 'tc-directive-tooltip');
4449
+ this.renderer.addClass(tooltip, `tc-directive-tooltip-${direction}`);
4450
+ const id = this.generateID();
4451
+ this.renderer.setAttribute(tooltip, 'id', id);
4452
+ const textNode = this.info_text;
4453
+ if (textNode !== undefined && textNode !== null && textNode !== '') {
4454
+ tooltip.innerHTML = textNode;
4455
+ this.renderer.appendChild(document.body, tooltip);
4456
+ this.start_tooltip(id, height, width, el_position_x, el_position_y, direction);
4457
+ if (tooltip) {
4458
+ tooltip.addEventListener('mouseenter', hoverInCallback);
4459
+ tooltip.addEventListener('mouseleave', hoverOutCallback);
4460
+ }
4461
+ }
4462
+ });
4460
4463
  }
4461
4464
  onMouseOut(event) {
4462
4465
  this.remove = true;
@@ -5283,6 +5286,115 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
5283
5286
  }]
5284
5287
  }] });
5285
5288
 
5289
+ class TCloudUiProgressBarComponent {
5290
+ constructor() {
5291
+ /*
5292
+ status
5293
+ */
5294
+ this._status = '0';
5295
+ /*
5296
+ mode
5297
+ */
5298
+ this._mode = 'primary';
5299
+ /*
5300
+ height
5301
+ */
5302
+ this._height = 'normal';
5303
+ this.progress_class = '';
5304
+ this.height_class = '';
5305
+ }
5306
+ set status(status) {
5307
+ let value = `${status}`;
5308
+ if (value) {
5309
+ setTimeout(() => {
5310
+ this._status = value;
5311
+ });
5312
+ }
5313
+ }
5314
+ get status() { return this._status; }
5315
+ set mode(mode) {
5316
+ if (mode) {
5317
+ this._mode = mode;
5318
+ this.setMode();
5319
+ }
5320
+ }
5321
+ get mode() { return this._mode; }
5322
+ set height(height) {
5323
+ if (height) {
5324
+ this._height = height;
5325
+ this.setheight();
5326
+ }
5327
+ }
5328
+ get height() { return this._height; }
5329
+ ngOnInit() {
5330
+ this.setMode();
5331
+ this.setheight();
5332
+ }
5333
+ setMode() {
5334
+ const mode = this.mode;
5335
+ let progress_class = 'progress-primary';
5336
+ switch (mode) {
5337
+ case 'primary':
5338
+ progress_class = 'progress-primary';
5339
+ break;
5340
+ case 'danger':
5341
+ progress_class = 'progress-danger';
5342
+ break;
5343
+ case 'warning':
5344
+ progress_class = 'progress-warning';
5345
+ break;
5346
+ case 'info':
5347
+ progress_class = 'progress-info';
5348
+ break;
5349
+ }
5350
+ this.progress_class = progress_class;
5351
+ }
5352
+ setheight() {
5353
+ const height = this.height;
5354
+ let height_class = 'height-normal';
5355
+ switch (height) {
5356
+ case 'normal':
5357
+ height_class = 'height-normal';
5358
+ break;
5359
+ case 'slim':
5360
+ height_class = 'height-slim';
5361
+ break;
5362
+ case 'fat':
5363
+ height_class = 'height-fat';
5364
+ break;
5365
+ }
5366
+ this.height_class = height_class;
5367
+ }
5368
+ }
5369
+ TCloudUiProgressBarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiProgressBarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
5370
+ 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"] });
5371
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiProgressBarComponent, decorators: [{
5372
+ type: Component,
5373
+ 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"] }]
5374
+ }], ctorParameters: function () { return []; }, propDecorators: { status: [{
5375
+ type: Input
5376
+ }], mode: [{
5377
+ type: Input
5378
+ }], height: [{
5379
+ type: Input
5380
+ }] } });
5381
+
5382
+ class TCloudUiProgressBarModule {
5383
+ }
5384
+ TCloudUiProgressBarModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiProgressBarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
5385
+ TCloudUiProgressBarModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiProgressBarModule, declarations: [TCloudUiProgressBarComponent], imports: [CommonModule], exports: [TCloudUiProgressBarComponent] });
5386
+ TCloudUiProgressBarModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiProgressBarModule, imports: [CommonModule] });
5387
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiProgressBarModule, decorators: [{
5388
+ type: NgModule,
5389
+ args: [{
5390
+ declarations: [TCloudUiProgressBarComponent],
5391
+ exports: [TCloudUiProgressBarComponent],
5392
+ imports: [
5393
+ CommonModule
5394
+ ]
5395
+ }]
5396
+ }] });
5397
+
5286
5398
  class TCloudUiModule {
5287
5399
  }
5288
5400
  TCloudUiModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
@@ -5306,6 +5418,7 @@ TCloudUiModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version:
5306
5418
  TCloudUiMultiplesValuesModule,
5307
5419
  TCloudUiWelcomeModule,
5308
5420
  TCloudUiInputPasswordModule,
5421
+ TCloudUiProgressBarModule,
5309
5422
  // Directives
5310
5423
  TCloudUiDirectiveModule,
5311
5424
  // Pipes
@@ -5329,6 +5442,7 @@ TCloudUiModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version:
5329
5442
  TCloudUiMultiplesValuesModule,
5330
5443
  TCloudUiWelcomeModule,
5331
5444
  TCloudUiInputPasswordModule,
5445
+ TCloudUiProgressBarModule,
5332
5446
  // Directives
5333
5447
  TCloudUiDirectiveModule,
5334
5448
  // Pipes
@@ -5356,6 +5470,7 @@ TCloudUiModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version:
5356
5470
  TCloudUiMultiplesValuesModule,
5357
5471
  TCloudUiWelcomeModule,
5358
5472
  TCloudUiInputPasswordModule,
5473
+ TCloudUiProgressBarModule,
5359
5474
  // Directives
5360
5475
  TCloudUiDirectiveModule,
5361
5476
  // Pipes
@@ -5379,6 +5494,7 @@ TCloudUiModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version:
5379
5494
  TCloudUiMultiplesValuesModule,
5380
5495
  TCloudUiWelcomeModule,
5381
5496
  TCloudUiInputPasswordModule,
5497
+ TCloudUiProgressBarModule,
5382
5498
  // Directives
5383
5499
  TCloudUiDirectiveModule,
5384
5500
  // Pipes
@@ -5407,6 +5523,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
5407
5523
  TCloudUiMultiplesValuesModule,
5408
5524
  TCloudUiWelcomeModule,
5409
5525
  TCloudUiInputPasswordModule,
5526
+ TCloudUiProgressBarModule,
5410
5527
  // Directives
5411
5528
  TCloudUiDirectiveModule,
5412
5529
  // Pipes
@@ -5433,6 +5550,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
5433
5550
  TCloudUiMultiplesValuesModule,
5434
5551
  TCloudUiWelcomeModule,
5435
5552
  TCloudUiInputPasswordModule,
5553
+ TCloudUiProgressBarModule,
5436
5554
  // Directives
5437
5555
  TCloudUiDirectiveModule,
5438
5556
  // Pipes
@@ -5453,5 +5571,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
5453
5571
  * Generated bundle index. Do not edit.
5454
5572
  */
5455
5573
 
5456
- 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 };
5574
+ 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 };
5457
5575
  //# sourceMappingURL=dev-tcloud-tcloud-ui.mjs.map