@smartbit4all/ng-client 7.2.9 → 7.2.10
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.
|
@@ -19219,9 +19219,7 @@ class SmartGridComponent {
|
|
|
19219
19219
|
else {
|
|
19220
19220
|
this.pageSizeOptions = this.defaultPageSizeOptions;
|
|
19221
19221
|
}
|
|
19222
|
-
|
|
19223
|
-
this.smartGrid.showEditColumns = gridModel?.view?.descriptor?.showEditColumns;
|
|
19224
|
-
}
|
|
19222
|
+
this.smartGrid.showEditColumns = gridModel?.view?.descriptor?.showEditColumns;
|
|
19225
19223
|
let kind = gridModel?.view?.descriptor?.kind;
|
|
19226
19224
|
if (kind) {
|
|
19227
19225
|
let layoutDef;
|
|
@@ -19296,7 +19294,8 @@ class SmartGridComponent {
|
|
|
19296
19294
|
else {
|
|
19297
19295
|
this.tableType = SmartTableType.INHERITED;
|
|
19298
19296
|
}
|
|
19299
|
-
if (this.smartGrid.layoutDef === SmartLayoutDef.TABLE ||
|
|
19297
|
+
if (this.smartGrid.layoutDef === SmartLayoutDef.TABLE ||
|
|
19298
|
+
this.smartGrid.layoutDef === SmartLayoutDef.TREE_GRID) {
|
|
19300
19299
|
let tableConfig = {
|
|
19301
19300
|
...this.smartGrid.tableConfig,
|
|
19302
19301
|
title: this.smartGrid?.gridModel.title,
|
|
@@ -19847,14 +19846,16 @@ class SmartGridComponent {
|
|
|
19847
19846
|
!!selectionMode &&
|
|
19848
19847
|
selectionMode !== GridSelectionMode.NONE &&
|
|
19849
19848
|
row.selectable !== false &&
|
|
19850
|
-
!(this.cardActionTrigger === GridDefaultRowActionTrigger.CLICK &&
|
|
19849
|
+
!(this.cardActionTrigger === GridDefaultRowActionTrigger.CLICK &&
|
|
19850
|
+
this.hasCardDefaultAction(row)));
|
|
19851
19851
|
}
|
|
19852
19852
|
/** Whether the trigger gesture on the card of this row fires a default row action. */
|
|
19853
19853
|
hasCardDefaultAction(row) {
|
|
19854
19854
|
return !!this.rowLayoutOf(row) && !!this.defaultRowActionOf(row);
|
|
19855
19855
|
}
|
|
19856
19856
|
onCardClick(row, event) {
|
|
19857
|
-
if (this.cardActionTrigger === GridDefaultRowActionTrigger.CLICK &&
|
|
19857
|
+
if (this.cardActionTrigger === GridDefaultRowActionTrigger.CLICK &&
|
|
19858
|
+
this.hasCardDefaultAction(row)) {
|
|
19858
19859
|
// The later clicks of a double click: an action that returns between the two would fire again.
|
|
19859
19860
|
if (event.detail <= 1) {
|
|
19860
19861
|
this.fireCardDefaultAction(row, event);
|
|
@@ -19969,7 +19970,26 @@ class SmartGridComponent {
|
|
|
19969
19970
|
}
|
|
19970
19971
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SmartGridComponent, decorators: [{
|
|
19971
19972
|
type: Component,
|
|
19972
|
-
args: [{ selector: 'smart-grid', providers: [SmartGridService], imports: [
|
|
19973
|
+
args: [{ selector: 'smart-grid', providers: [SmartGridService], imports: [
|
|
19974
|
+
UiActionToolbarComponent,
|
|
19975
|
+
UiActionButtonComponent,
|
|
19976
|
+
MatMiniFabButton,
|
|
19977
|
+
MatIcon,
|
|
19978
|
+
ExpandableSectionComponent,
|
|
19979
|
+
NgStyle,
|
|
19980
|
+
NgClass,
|
|
19981
|
+
SmartGridCardComponent,
|
|
19982
|
+
DefaultActionsPopupComponent,
|
|
19983
|
+
MatTree,
|
|
19984
|
+
MatTreeNodeDef,
|
|
19985
|
+
MatTreeNode,
|
|
19986
|
+
MatTreeNodeToggle,
|
|
19987
|
+
MatTreeNodePadding,
|
|
19988
|
+
MatIconButton,
|
|
19989
|
+
MatCheckbox,
|
|
19990
|
+
MatTooltip,
|
|
19991
|
+
MatPaginator,
|
|
19992
|
+
], template: "@if (smartGrid) {\r\n<div class=\"smartGrid-container\">\r\n <div class=\"smart-grid-toolbar\">\r\n <smart-ui-action-toolbar [id]=\"toolbarId\"></smart-ui-action-toolbar>\r\n @if (smartGrid.showEditColumns) {\r\n <ui-action-button (actionClick)=\"editColumns()\" [descriptor]=\"showEditColumns\">\r\n </ui-action-button>\r\n }\r\n </div>\r\n <!-- <div [ngClass]=\"isBlocked ? 'blocked' : ''\"></div> -->\r\n <div class=\"smartGridContent\">\r\n <div>\r\n @if (smartGrid.showResultCount) {\r\n <div>\r\n <div class=\"smartGrid-data-number\">\r\n {{ smartGrid.gridModel.totalRowCount }}\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n <div class=\"smart-grid-table-container\">\r\n <ng-template #table></ng-template>\r\n </div>\r\n @if (smartGrid.layoutDef === layoutDef().EXPANDABLE) {\r\n <div>\r\n @for (expandableSection of expandableSections; track expandableSection) {\r\n <smart-expandable-section #gridExpandableSection [data]=\"expandableSection\"></smart-expandable-section>\r\n }\r\n </div>\r\n }\r\n @if (smartGrid.layoutDef === layoutDef().CARD && smartGrid.dataLayoutDef) {\r\n <div class=\"cards-container\" [ngStyle]=\"{\r\n 'grid-template-columns':\r\n smartGrid.numberOfColumn !== undefined\r\n ? 'repeat(' + smartGrid.numberOfColumn + ', 1fr)'\r\n : '',\r\n }\">\r\n @for (row of smartGrid.gridModel.page.rows; track row.id) {\r\n\r\n <app-smart-grid-card class=\"smartGrid-card-container\" [ngClass]=\"calcClasses(row.style)\"\r\n [ngStyle]=\"calcStyle(row.style)\"\r\n [class.clickable-row]=\"isCardSelectable(row) || hasCardDefaultAction(row)\"\r\n [class.selected]=\"!!row.selected && !!rowLayoutOf(row)\"\r\n (click)=\"onCardClick(row, $event)\" (dblclick)=\"onCardDoubleClick(row, $event)\" [item]=\"row\"\r\n [layout]=\"rowLayoutOf(row)\" [smartGrid]=\"smartGrid\"\r\n [parentLayoutComponent]=\"parentLayoutComponent()\"></app-smart-grid-card>\r\n }\r\n @if (cardMenuRow(); as menuRow) {\r\n <lib-default-actions-popup [buttons]=\"cardMenuButtons()\" [row]=\"menuRow\"></lib-default-actions-popup>\r\n }\r\n </div>\r\n }\r\n @if (smartGrid.layoutDef === layoutDef().TREE && treeControl) {\r\n <div class=\"tree-container\" [ngStyle]=\"{\r\n 'grid-template-columns':\r\n smartGrid.numberOfColumn !== undefined\r\n ? 'repeat(' + smartGrid.numberOfColumn + ', 1fr)'\r\n : '',\r\n }\">\r\n <mat-tree [dataSource]=\"treeDataSource!\" [treeControl]=\"treeControl!\">\r\n <mat-tree-node *matTreeNodeDef=\"let node\" matTreeNodeToggle matTreeNodePadding matTreeNodePaddingIndent=\"24\">\r\n <button mat-icon-button disabled class=\"tree-button\"></button>\r\n <mat-checkbox class=\"checklist-leaf-node\"\r\n [checked]=\"$safeNavigationMigration(treeChecklistSelection?.isSelected(node))\"\r\n (change)=\"treeNodeSelectionToggle(node)\">{{ getTreeItem(node) }}</mat-checkbox>\r\n </mat-tree-node>\r\n <mat-tree-node *matTreeNodeDef=\"let node; when: hasChild\" matTreeNodePadding matTreeNodePaddingIndent=\"24\">\r\n <button mat-icon-button matTreeNodeToggle class=\"tree-button\" [attr.aria-label]=\"'Toggle ' + node.item\">\r\n <mat-icon class=\"mat-icon-rtl-mirror\">\r\n {{ treeControl!.isExpanded(node) ? 'expand_more' : 'chevron_right' }}\r\n </mat-icon>\r\n </button>\r\n <mat-checkbox [checked]=\"$safeNavigationMigration(treeChecklistSelection?.isSelected(node))\"\r\n [indeterminate]=\"descendantsPartiallySelected(node)\" (change)=\"treeNodeSelectionToggle(node)\">{{\r\n getTreeItem(node) }}</mat-checkbox>\r\n </mat-tree-node>\r\n </mat-tree>\r\n </div>\r\n }\r\n </div>\r\n @if (smartGrid.paginator) {\r\n <div class=\"paginator-row-material\">\r\n @if (smartGrid.gridModel.refreshEnabled) {\r\n <button mat-icon-button type=\"button\" matTooltip=\"Friss\u00EDt\u00E9s\" (click)=\"refreshPartialResults()\">\r\n <mat-icon>refresh</mat-icon>\r\n </button>\r\n }\r\n @if (smartGrid.paginator && !treeControl) {\r\n <mat-paginator #paginator [length]=\"length\" [pageIndex]=\"pageIndex\" [pageSize]=\"pageSize\"\r\n [pageSizeOptions]=\"pageSizeOptions\" (page)=\"onChangePage($event)\"></mat-paginator>\r\n }\r\n </div>\r\n }\r\n</div>\r\n}", styles: [".smartGrid-container{position:relative;padding:1.5rem;display:flex;flex-direction:column;gap:1rem}.smartGrid-data-number{padding-bottom:1rem}.cards-container{display:grid;gap:1rem;padding:1rem}.smartGrid-container ::ng-deep .mat-form-field-appearance-legacy .mat-form-field-underline{bottom:0}.smartGridContent{width:100%;flex:1;overflow:auto}.blocked{position:absolute;width:calc(100% - 3rem);height:calc(100% - 3rem);z-index:110;background-color:#0003}.smart-grid-table-container{display:flex;flex-direction:column;gap:1rem}.smart-grid-toolbar{display:flex;flex-direction:row;justify-content:flex-end;align-items:center}.smart-grid-toolbar smart-ui-action-toolbar{width:100%}.smart-grid-edit-icon{color:var(--light-gray)}.tree-button{width:24px!important;height:24px!important}.paginator-row-material{display:flex;align-items:center;align-self:flex-end;gap:.25rem}.clickable-row{cursor:pointer}.smartGrid-card-container.selected{outline:2px solid var(--mat-sys-primary, currentColor)}\n"] }]
|
|
19973
19993
|
}], ctorParameters: () => [], propDecorators: { smartGrid: [{
|
|
19974
19994
|
type: Input
|
|
19975
19995
|
}], uuid: [{
|