@c10t/nice-component-library 0.0.27-b → 0.0.28
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/components/table/cva-smart-table.component.d.ts +1 -1
- package/components/table/cva-table.component.d.ts +1 -1
- package/fesm2022/c10t-nice-component-library.mjs +10 -7
- package/fesm2022/c10t-nice-component-library.mjs.map +1 -1
- package/models/button-click.event.d.ts +1 -0
- package/package.json +1 -1
|
@@ -58,7 +58,7 @@ export declare class CvaSmartTableComponent implements ControlValueAccessor, OnC
|
|
|
58
58
|
ngOnChanges(): void;
|
|
59
59
|
ngOnInit(): void;
|
|
60
60
|
ngAfterContentChecked(): void;
|
|
61
|
-
onClick(action: string, result: any, index: number | null): void;
|
|
61
|
+
onClick(action: string, result: any, index: number | null, mouseEvent?: MouseEvent): void;
|
|
62
62
|
onCellValueChange(result: any, column: ColumnModel, $event: any): void;
|
|
63
63
|
toggleSelect(val: MatCheckboxChange | null, result?: any, column?: ColumnModel): void;
|
|
64
64
|
onDisplayHeaderCell(column: ColumnModel): boolean;
|
|
@@ -47,7 +47,7 @@ export declare class CvaTableComponent implements OnInit, AfterViewChecked {
|
|
|
47
47
|
set paging(value: TablePagingRequestModel);
|
|
48
48
|
isExpandColumn(col: ColumnModel): boolean;
|
|
49
49
|
getPage(pageable: any): void;
|
|
50
|
-
onClick(action: string, result: any): void;
|
|
50
|
+
onClick(action: string, result: any, mouseEvent?: MouseEvent): void;
|
|
51
51
|
ngOnInit(): void;
|
|
52
52
|
onRowClick(result: any, index?: number): void;
|
|
53
53
|
onDisplayHeaderCell(column: ColumnModel): boolean;
|
|
@@ -98,6 +98,7 @@ class ButtonClickEvent {
|
|
|
98
98
|
action;
|
|
99
99
|
object;
|
|
100
100
|
index;
|
|
101
|
+
mouseEvent;
|
|
101
102
|
constructor(action, object, index) {
|
|
102
103
|
this.action = action;
|
|
103
104
|
this.object = object;
|
|
@@ -547,7 +548,7 @@ class BaseTableComponent {
|
|
|
547
548
|
onRowButtonClick(event) {
|
|
548
549
|
const window = this;
|
|
549
550
|
if (window[event.action]) {
|
|
550
|
-
window[event.action](event.object, event.index);
|
|
551
|
+
window[event.action](event.object, event.index, event.mouseEvent);
|
|
551
552
|
}
|
|
552
553
|
}
|
|
553
554
|
_collectParams(searchForm, map) {
|
|
@@ -2591,8 +2592,9 @@ class CvaTableComponent {
|
|
|
2591
2592
|
this.toggleSelect(null, null);
|
|
2592
2593
|
this.goToPageNumber = this.varPaging.pageNumber;
|
|
2593
2594
|
}
|
|
2594
|
-
onClick(action, result) {
|
|
2595
|
+
onClick(action, result, mouseEvent) {
|
|
2595
2596
|
const buttonClickEvent = new ButtonClickEvent(action, result);
|
|
2597
|
+
buttonClickEvent.mouseEvent = mouseEvent;
|
|
2596
2598
|
this.clickAction.emit(buttonClickEvent);
|
|
2597
2599
|
}
|
|
2598
2600
|
ngOnInit() {
|
|
@@ -2707,7 +2709,7 @@ class CvaTableComponent {
|
|
|
2707
2709
|
fxLayout="row" [fxLayoutAlign]="TableService.alignCellContent(column)"
|
|
2708
2710
|
(click)="$event.stopPropagation()">
|
|
2709
2711
|
<button mat-icon-button color="{{column.button.color}}"
|
|
2710
|
-
(click)="onClick(column.button.click, result)"
|
|
2712
|
+
(click)="onClick(column.button.click, result, $event)"
|
|
2711
2713
|
disabled="{{column.button.disabled ? column.button.disabled(result) : false}}"
|
|
2712
2714
|
matTooltip="{{(column.button.title ? column.button.title : '') | translate}}"
|
|
2713
2715
|
class="{{column.button.className}}"
|
|
@@ -2917,7 +2919,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImpor
|
|
|
2917
2919
|
fxLayout="row" [fxLayoutAlign]="TableService.alignCellContent(column)"
|
|
2918
2920
|
(click)="$event.stopPropagation()">
|
|
2919
2921
|
<button mat-icon-button color="{{column.button.color}}"
|
|
2920
|
-
(click)="onClick(column.button.click, result)"
|
|
2922
|
+
(click)="onClick(column.button.click, result, $event)"
|
|
2921
2923
|
disabled="{{column.button.disabled ? column.button.disabled(result) : false}}"
|
|
2922
2924
|
matTooltip="{{(column.button.title ? column.button.title : '') | translate}}"
|
|
2923
2925
|
class="{{column.button.className}}"
|
|
@@ -5173,8 +5175,9 @@ class CvaSmartTableComponent {
|
|
|
5173
5175
|
/*
|
|
5174
5176
|
Nếu sử dụng expandTableRow khi xử lý sự kiện bên ngoài component không sử dụng index bên trong base, set index lại bằng indexOf
|
|
5175
5177
|
*/
|
|
5176
|
-
onClick(action, result, index) {
|
|
5178
|
+
onClick(action, result, index, mouseEvent) {
|
|
5177
5179
|
const buttonClickEvent = new ButtonClickEvent(action, result, index);
|
|
5180
|
+
buttonClickEvent.mouseEvent = mouseEvent;
|
|
5178
5181
|
this.clickAction.emit(buttonClickEvent);
|
|
5179
5182
|
}
|
|
5180
5183
|
onCellValueChange(result, column, $event) {
|
|
@@ -5351,7 +5354,7 @@ class CvaSmartTableComponent {
|
|
|
5351
5354
|
<button mat-icon-button type="button"
|
|
5352
5355
|
color="{{column.button.color}}"
|
|
5353
5356
|
[ngClass]="column.button.className"
|
|
5354
|
-
(click)="onClick(column.button.click, result, i)"
|
|
5357
|
+
(click)="onClick(column.button.click, result, i, $event)"
|
|
5355
5358
|
disabled="{{column.button && column.button.disabled ? column.button.disabled(result) : false}}"
|
|
5356
5359
|
matTooltip="{{(column.button.title ? column.button.title : '') | translate}}"
|
|
5357
5360
|
[ngSwitch]="TableService.getIconType(column.button)">
|
|
@@ -5628,7 +5631,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImpor
|
|
|
5628
5631
|
<button mat-icon-button type="button"
|
|
5629
5632
|
color="{{column.button.color}}"
|
|
5630
5633
|
[ngClass]="column.button.className"
|
|
5631
|
-
(click)="onClick(column.button.click, result, i)"
|
|
5634
|
+
(click)="onClick(column.button.click, result, i, $event)"
|
|
5632
5635
|
disabled="{{column.button && column.button.disabled ? column.button.disabled(result) : false}}"
|
|
5633
5636
|
matTooltip="{{(column.button.title ? column.button.title : '') | translate}}"
|
|
5634
5637
|
[ngSwitch]="TableService.getIconType(column.button)">
|