@messaia/cdk 13.3.2-rc02 → 13.3.2-rc05
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/base/components/generic-list.component.mjs +18 -5
- package/esm2020/lib/layout/layout-nav/layout-nav.component.mjs +4 -2
- package/fesm2015/messaia-cdk.mjs +20 -8
- package/fesm2015/messaia-cdk.mjs.map +1 -1
- package/fesm2020/messaia-cdk.mjs +19 -5
- package/fesm2020/messaia-cdk.mjs.map +1 -1
- package/lib/base/components/generic-list.component.d.ts +12 -1
- package/package.json +1 -1
package/fesm2020/messaia-cdk.mjs
CHANGED
|
@@ -4702,8 +4702,7 @@ class GenericListComponent extends BaseComponent {
|
|
|
4702
4702
|
icon: 'delete_forever',
|
|
4703
4703
|
iconClass: 'tc-orange-800',
|
|
4704
4704
|
event: () => this.deleteItems(),
|
|
4705
|
-
disable: () => !this.
|
|
4706
|
-
!this.dataSource?.selectionModel?.selected?.every(x => this.canDeleteItem(x))
|
|
4705
|
+
disable: () => !this.canExecuteMultipleOperations((x) => this.canDeleteItem(x))
|
|
4707
4706
|
});
|
|
4708
4707
|
}
|
|
4709
4708
|
}
|
|
@@ -4717,7 +4716,7 @@ class GenericListComponent extends BaseComponent {
|
|
|
4717
4716
|
name: 'select',
|
|
4718
4717
|
type: TableColumnType.Checkbox,
|
|
4719
4718
|
disable: (row) => !this.canSelectItem(row),
|
|
4720
|
-
cellNgClass: (row) => this.
|
|
4719
|
+
cellNgClass: (row) => this.selectRowNgClass(row)
|
|
4721
4720
|
});
|
|
4722
4721
|
}
|
|
4723
4722
|
/* Add duplicate menu */
|
|
@@ -4782,7 +4781,21 @@ class GenericListComponent extends BaseComponent {
|
|
|
4782
4781
|
/**
|
|
4783
4782
|
* Returns NgClass object for select column
|
|
4784
4783
|
*/
|
|
4785
|
-
|
|
4784
|
+
selectRowNgClass(_) { }
|
|
4785
|
+
/**
|
|
4786
|
+
* Check if the there any selected row
|
|
4787
|
+
* @returns
|
|
4788
|
+
*/
|
|
4789
|
+
hasSelectedRows() { return this.dataSource?.selectionModel?.hasValue(); }
|
|
4790
|
+
;
|
|
4791
|
+
/**
|
|
4792
|
+
* Checks if the user can perform multiple operations (Like 'delete selected').
|
|
4793
|
+
* @param action
|
|
4794
|
+
* @returns
|
|
4795
|
+
*/
|
|
4796
|
+
canExecuteMultipleOperations(action = null) {
|
|
4797
|
+
return this.hasSelectedRows() && (action ? this.dataSource?.selectionModel?.selected?.every(x => action(x)) : true);
|
|
4798
|
+
}
|
|
4786
4799
|
/**
|
|
4787
4800
|
* Responds to user-initiated events
|
|
4788
4801
|
* @param event
|
|
@@ -14962,7 +14975,8 @@ class VdLayoutNavComponent {
|
|
|
14962
14975
|
*/
|
|
14963
14976
|
handleBackNavigationClick() {
|
|
14964
14977
|
if (this.backNavigationRouteEnabled) {
|
|
14965
|
-
|
|
14978
|
+
var urlParts = Utils.getUrlParts(this.backNavigationRoute);
|
|
14979
|
+
this.router.navigate([urlParts.url], { queryParams: urlParts.params, fragment: urlParts.hash, relativeTo: this.route });
|
|
14966
14980
|
}
|
|
14967
14981
|
}
|
|
14968
14982
|
/**
|