|
77 | 77 | ></th>
|
78 | 78 |
|
79 | 79 | <!-- Coluna criada para caso as ações fiquem no lado esquerdo -->
|
| 80 | + <th |
| 81 | + #columnManagerLeft |
| 82 | + *ngIf="hasValidColumns && !hideColumnsManager && !actionRight" |
| 83 | + [class.po-table-header-column-manager]="!isSingleAction || !hasVisibleActions" |
| 84 | + [class.po-table-header-column-manager-border]="!height && container" |
| 85 | + [class.po-table-header-single-action]="isSingleAction" |
| 86 | + > |
| 87 | + <div |
| 88 | + [class.po-table-header-column-manager-border]="height && container" |
| 89 | + [class.po-table-header-column-manager-fixed-inner]="height" |
| 90 | + [style.width.px]="height && visibleActions.length ? columnManagerLeft.offsetWidth : undefined" |
| 91 | + > |
| 92 | + <button |
| 93 | + #columnManagerTargetLeft |
| 94 | + type="button" |
| 95 | + [attr.aria-label]="literals.columnsManager" |
| 96 | + class="po-table-header-column-manager-button po-icon po-icon-settings po-clickable" |
| 97 | + p-tooltip-position="right" |
| 98 | + [p-tooltip]="literals.columnsManager" |
| 99 | + (click)="onOpenColumnManager()" |
| 100 | + ></button> |
| 101 | + </div> |
| 102 | + </th> |
| 103 | + |
80 | 104 | <th
|
81 | 105 | #columnActionLeft
|
82 | 106 | *ngIf="!actionRight && (visibleActions.length > 1 || isSingleAction)"
|
|
121 | 145 | ></th>
|
122 | 146 |
|
123 | 147 | <th
|
124 |
| - #columnManager |
125 |
| - *ngIf="hasValidColumns && !hideColumnsManager" |
126 |
| - [class.po-table-header-column-manager]="!isSingleAction || !actionRight" |
| 148 | + #columnManagerRight |
| 149 | + *ngIf="hasValidColumns && !hideColumnsManager && actionRight" |
| 150 | + [class.po-table-header-column-manager]="!isSingleAction || !hasVisibleActions" |
127 | 151 | [class.po-table-header-column-manager-border]="!height && container"
|
128 |
| - [class.po-table-header-single-action]="isSingleAction && actionRight" |
| 152 | + [class.po-table-header-single-action]="isSingleAction" |
129 | 153 | >
|
130 | 154 | <div
|
131 | 155 | [class.po-table-header-column-manager-border]="height && container"
|
132 | 156 | [class.po-table-header-column-manager-fixed-inner]="height"
|
133 |
| - [style.width.px]="height && visibleActions.length ? columnManager.offsetWidth : undefined" |
| 157 | + [style.width.px]="height && visibleActions.length ? columnManagerRight.offsetWidth : undefined" |
134 | 158 | >
|
135 | 159 | <button
|
136 |
| - #columnManagerTarget |
| 160 | + #columnManagerTargetRight |
137 | 161 | type="button"
|
138 | 162 | [attr.aria-label]="literals.columnsManager"
|
139 | 163 | class="po-table-header-column-manager-button po-icon po-icon-settings po-clickable"
|
|
380 | 404 | ></th>
|
381 | 405 |
|
382 | 406 | <!-- Coluna criada para caso as ações fiquem no lado esquerdo -->
|
| 407 | + <th |
| 408 | + #columnManagerLeft |
| 409 | + *ngIf="hasValidColumns && !hideColumnsManager && !actionRight" |
| 410 | + [class.po-table-header-column-manager]="!isSingleAction || !hasVisibleActions" |
| 411 | + [class.po-table-header-column-manager-border]="!height && container" |
| 412 | + [class.po-table-header-single-action]="isSingleAction" |
| 413 | + > |
| 414 | + <div |
| 415 | + [class.po-table-header-column-manager-border]="height && container" |
| 416 | + [class.po-table-header-column-manager-fixed-inner]="height" |
| 417 | + [style.width.px]="height && visibleActions.length ? columnManagerLeft.offsetWidth : undefined" |
| 418 | + > |
| 419 | + <button |
| 420 | + #columnManagerTargetLeft |
| 421 | + type="button" |
| 422 | + [attr.aria-label]="literals.columnsManager" |
| 423 | + class="po-table-header-column-manager-button po-icon po-icon-settings po-clickable" |
| 424 | + p-tooltip-position="right" |
| 425 | + [p-tooltip]="literals.columnsManager" |
| 426 | + (click)="onOpenColumnManager()" |
| 427 | + ></button> |
| 428 | + </div> |
| 429 | + </th> |
| 430 | + |
383 | 431 | <th
|
384 | 432 | #columnActionLeft
|
385 |
| - *ngIf="!actionRight && (visibleActions.length > 1 || isSingleAction)" |
| 433 | + *ngIf="hasVisibleActions && hideColumnsManager && !actionRight" |
386 | 434 | [class.po-table-header-master-detail]="!isSingleAction"
|
387 | 435 | [class.po-table-header-single-action]="isSingleAction"
|
388 | 436 | ></th>
|
|
424 | 472 | ></th>
|
425 | 473 |
|
426 | 474 | <th
|
427 |
| - #columnManager |
428 |
| - *ngIf="hasValidColumns && !hideColumnsManager" |
429 |
| - [class.po-table-header-column-manager]="!isSingleAction || !actionRight" |
| 475 | + #columnManagerRight |
| 476 | + *ngIf="hasValidColumns && !hideColumnsManager && actionRight" |
| 477 | + [class.po-table-header-column-manager]="!isSingleAction || !hasVisibleActions" |
430 | 478 | [class.po-table-header-column-manager-border]="!height && container"
|
431 |
| - [class.po-table-header-single-action]="isSingleAction && actionRight" |
| 479 | + [class.po-table-header-single-action]="isSingleAction" |
432 | 480 | >
|
433 | 481 | <div
|
434 | 482 | [class.po-table-header-column-manager-border]="height && container"
|
435 | 483 | [class.po-table-header-column-manager-fixed-inner]="height"
|
436 |
| - [style.width.px]="height && visibleActions.length ? columnManager.offsetWidth : undefined" |
| 484 | + [style.width.px]="height && visibleActions.length ? columnManagerRight.offsetWidth : undefined" |
437 | 485 | >
|
438 | 486 | <button
|
439 |
| - #columnManagerTarget |
| 487 | + #columnManagerTargetRight |
440 | 488 | type="button"
|
441 | 489 | [attr.aria-label]="literals.columnsManager"
|
442 | 490 | class="po-table-header-column-manager-button po-icon po-icon-settings po-clickable"
|
|
486 | 534 | >
|
487 | 535 | </ng-template>
|
488 | 536 |
|
| 537 | + <!-- Coluna para não ficar em branco nas linhas de gerenciamento --> |
| 538 | + <ng-container *ngIf="!actionRight && !hasVisibleActions && !hideColumnsManager"> |
| 539 | + <td class="po-table-column"></td> |
| 540 | + </ng-container> |
| 541 | + |
489 | 542 | <!-- Valida se a origem do detail é pela diretiva -->
|
490 | 543 | <td
|
491 | 544 | *ngIf="hasRowTemplate && !hasRowTemplateWithArrowDirectionRight"
|
|
700 | 753 | <td
|
701 | 754 | *ngIf="isSingleAction"
|
702 | 755 | class="po-table-column po-table-column-single-action"
|
703 |
| - [style.width.px]="height && actionRight ? getWidthColumnManager() : ''" |
| 756 | + [style.width.px]="height && actionRight ? getWidthColumnManagerRight() : ''" |
704 | 757 | [style.max-width.px]="height && !actionRight ? getColumnWidthActionsLeft() : ''"
|
705 | 758 | [style.width.px]="height && !actionRight ? getColumnWidthActionsLeft() : ''"
|
706 | 759 | >
|
|
721 | 774 | </ng-template>
|
722 | 775 |
|
723 | 776 | <po-table-column-manager
|
724 |
| - *ngIf="!hideColumnsManager" |
| 777 | + *ngIf="!hideColumnsManager && actionRight" |
| 778 | + [p-columns]="columns" |
| 779 | + [p-max-columns]="maxColumns" |
| 780 | + [p-target]="columnManagerTargetRight" |
| 781 | + [p-last-visible-columns-selected]="lastVisibleColumnsSelected" |
| 782 | + (p-visible-columns-change)="onVisibleColumnsChange($event)" |
| 783 | + (p-change-visible-columns)="onChangeVisibleColumns($event)" |
| 784 | + [p-columns-default]="initialColumns" |
| 785 | + (p-initial-columns)="onColumnRestoreManager($event)" |
| 786 | +> |
| 787 | +</po-table-column-manager> |
| 788 | + |
| 789 | +<po-table-column-manager |
| 790 | + *ngIf="!hideColumnsManager && !actionRight" |
725 | 791 | [p-columns]="columns"
|
726 | 792 | [p-max-columns]="maxColumns"
|
727 |
| - [p-target]="columnManagerTarget" |
| 793 | + [p-target]="columnManagerTargetLeft" |
728 | 794 | [p-last-visible-columns-selected]="lastVisibleColumnsSelected"
|
729 | 795 | (p-visible-columns-change)="onVisibleColumnsChange($event)"
|
730 | 796 | (p-change-visible-columns)="onChangeVisibleColumns($event)"
|
|
0 commit comments