@progress/kendo-angular-grid 19.3.0-develop.4 → 19.3.0-develop.41
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/columns/columns-container.d.ts +2 -0
- package/common/data-layout-mode.d.ts +21 -0
- package/common/grid-col-size.d.ts +13 -0
- package/common/provider.service.d.ts +2 -0
- package/common/toolbar-tool-base.directive.d.ts +1 -0
- package/data/data-mapping.service.d.ts +3 -1
- package/directives.d.ts +7 -4
- package/editing/toolbar-editing-tool-base.directive.d.ts +3 -2
- package/editing-directives/editing-directive-base.d.ts +3 -0
- package/editing-directives/in-cell-editing.directive.d.ts +1 -1
- package/editing-directives/reactive-editing.directive.d.ts +1 -1
- package/editing-directives/template-editing.directive.d.ts +1 -1
- package/esm2022/adaptiveness/adaptive-renderer.component.mjs +1 -2
- package/esm2022/column-menu/column-chooser.component.mjs +1 -1
- package/esm2022/column-menu/column-list.component.mjs +8 -7
- package/esm2022/column-menu/column-menu-item.directive.mjs +1 -1
- package/esm2022/column-menu/column-menu.component.mjs +1 -1
- package/esm2022/columns/column-base.mjs +4 -4
- package/esm2022/columns/column.component.mjs +1 -1
- package/esm2022/columns/columns-container.mjs +3 -0
- package/esm2022/common/column-info.service.mjs +1 -1
- package/esm2022/common/data-layout-mode.mjs +5 -0
- package/esm2022/common/grid-col-size.mjs +5 -0
- package/esm2022/common/provider.service.mjs +1 -0
- package/esm2022/common/toolbar-tool-base.directive.mjs +6 -2
- package/esm2022/data/data-mapping.service.mjs +14 -3
- package/esm2022/directives.mjs +8 -1
- package/esm2022/editing/form/form-formfield.component.mjs +2 -2
- package/esm2022/editing/toolbar-editing-tool-base.directive.mjs +5 -0
- package/esm2022/editing-directives/editing-directive-base.mjs +17 -2
- package/esm2022/editing-directives/in-cell-editing.directive.mjs +5 -3
- package/esm2022/editing-directives/reactive-editing.directive.mjs +1 -1
- package/esm2022/editing-directives/template-editing.directive.mjs +1 -1
- package/esm2022/filtering/cell/boolean-filter-cell.component.mjs +1 -1
- package/esm2022/filtering/cell/date-filter-cell.component.mjs +1 -1
- package/esm2022/filtering/cell/filter-cell-operators.component.mjs +3 -4
- package/esm2022/filtering/cell/numeric-filter-cell.component.mjs +1 -1
- package/esm2022/filtering/cell/string-filter-cell.component.mjs +1 -1
- package/esm2022/filtering/filter-row.component.mjs +6 -3
- package/esm2022/filtering/menu/boolean-filter-menu.component.mjs +1 -2
- package/esm2022/filtering/menu/date-filter-menu-input.component.mjs +1 -1
- package/esm2022/filtering/menu/date-filter-menu.component.mjs +1 -1
- package/esm2022/filtering/menu/filter-menu-dropdownlist.directive.mjs +1 -1
- package/esm2022/filtering/menu/filter-menu-input-wrapper.component.mjs +1 -1
- package/esm2022/filtering/menu/filter-menu.component.mjs +1 -1
- package/esm2022/filtering/menu/numeric-filter-menu-input.component.mjs +1 -1
- package/esm2022/filtering/menu/numeric-filter-menu.component.mjs +1 -1
- package/esm2022/filtering/menu/string-filter-menu-input.component.mjs +1 -1
- package/esm2022/filtering/menu/string-filter-menu.component.mjs +1 -1
- package/esm2022/grid.component.mjs +191 -39
- package/esm2022/grid.module.mjs +103 -100
- package/esm2022/grouping/group-header.component.mjs +39 -4
- package/esm2022/grouping/group-panel.component.mjs +13 -8
- package/esm2022/highlight/highlight-item.mjs +5 -0
- package/esm2022/highlight/highlight.directive.mjs +132 -0
- package/esm2022/index.mjs +4 -0
- package/esm2022/localization/messages.mjs +57 -3
- package/esm2022/navigation/navigation-cursor.mjs +7 -1
- package/esm2022/navigation/navigation-metadata.mjs +3 -1
- package/esm2022/navigation/navigation.service.mjs +162 -16
- package/esm2022/navigation/toolbar-tool-name.mjs +2 -1
- package/esm2022/package-metadata.mjs +2 -2
- package/esm2022/pdf/export-element.mjs +14 -5
- package/esm2022/pdf/pdf.component.mjs +3 -1
- package/esm2022/rendering/cell.component.mjs +466 -188
- package/esm2022/rendering/common/col-group.component.mjs +21 -7
- package/esm2022/rendering/details-expand.directive.mjs +5 -2
- package/esm2022/rendering/footer/footer.component.mjs +117 -54
- package/esm2022/rendering/header/header.component.mjs +13 -9
- package/esm2022/rendering/list.component.mjs +19 -12
- package/esm2022/rendering/loading-template.directive.mjs +1 -0
- package/esm2022/rendering/table-body.component.mjs +394 -174
- package/esm2022/rendering/toolbar/tools/ai-assistant/ai-assistant.component.mjs +305 -0
- package/esm2022/rendering/toolbar/tools/ai-assistant/ai-tool.directive.mjs +269 -0
- package/esm2022/rendering/toolbar/tools/ai-assistant/utils.mjs +74 -0
- package/esm2022/rendering/toolbar/tools/column-chooser-tool.directive.mjs +0 -3
- package/esm2022/rendering/toolbar/tools/group-toolbar-tool.component.mjs +11 -9
- package/esm2022/rendering/toolbar/tools/select-all-command-tool.directive.mjs +93 -0
- package/esm2022/row-reordering/row-reorder.service.mjs +2 -2
- package/esm2022/row-reordering/utils.mjs +6 -4
- package/esm2022/selection/cell-selection.service.mjs +6 -3
- package/esm2022/selection/pair-set.mjs +87 -10
- package/esm2022/selection/selection-checkbox.directive.mjs +1 -1
- package/esm2022/selection/selection.directive.mjs +1 -1
- package/esm2022/utils.mjs +0 -4
- package/fesm2022/progress-kendo-angular-grid.mjs +2568 -642
- package/filtering/filter-row.component.d.ts +1 -0
- package/grid.component.d.ts +29 -1
- package/grid.module.d.ts +102 -99
- package/grouping/group-header.component.d.ts +1 -0
- package/grouping/group-panel.component.d.ts +1 -1
- package/highlight/highlight-item.d.ts +17 -0
- package/highlight/highlight.directive.d.ts +56 -0
- package/index.d.ts +8 -1
- package/localization/messages.d.ts +39 -3
- package/navigation/focus-group.d.ts +1 -1
- package/navigation/navigation-metadata.d.ts +2 -1
- package/navigation/navigation.service.d.ts +6 -0
- package/navigation/toolbar-tool-name.d.ts +1 -0
- package/package.json +22 -21
- package/rendering/cell.component.d.ts +30 -15
- package/rendering/common/col-group.component.d.ts +5 -0
- package/rendering/details-expand.directive.d.ts +5 -2
- package/rendering/footer/footer.component.d.ts +4 -1
- package/rendering/header/header.component.d.ts +1 -0
- package/rendering/list.component.d.ts +4 -1
- package/rendering/loading-template.directive.d.ts +1 -0
- package/rendering/table-body.component.d.ts +3 -1
- package/rendering/toolbar/tools/ai-assistant/ai-assistant.component.d.ts +49 -0
- package/rendering/toolbar/tools/ai-assistant/ai-tool.directive.d.ts +115 -0
- package/rendering/toolbar/tools/ai-assistant/utils.d.ts +124 -0
- package/rendering/toolbar/tools/column-chooser-tool.directive.d.ts +0 -1
- package/rendering/toolbar/tools/select-all-command-tool.directive.d.ts +36 -0
- package/row-reordering/row-reorder.service.d.ts +1 -1
- package/row-reordering/utils.d.ts +1 -1
- package/schematics/ngAdd/index.js +4 -4
- package/selection/cell-selection.service.d.ts +1 -0
- package/selection/pair-set.d.ts +36 -8
- package/selection/selection.directive.d.ts +1 -1
- package/utils.d.ts +0 -4
|
@@ -12,20 +12,27 @@ import { ReactiveFormsModule } from '@angular/forms';
|
|
|
12
12
|
import { isPresent, isNullOrEmptyString, extractFormat } from '../utils';
|
|
13
13
|
import { CELL_CONTEXT } from './common/cell-context';
|
|
14
14
|
import { IdService } from '../common/id.service';
|
|
15
|
-
import { reorderIcon } from '@progress/kendo-svg-icons';
|
|
15
|
+
import { minusIcon, plusIcon, reorderIcon } from '@progress/kendo-svg-icons';
|
|
16
16
|
import { ContextService } from '../common/provider.service';
|
|
17
17
|
import { FieldAccessorPipe } from './common/field-accessor.pipe';
|
|
18
18
|
import { IconWrapperComponent } from '@progress/kendo-angular-icons';
|
|
19
19
|
import { SelectionCheckboxDirective } from '../selection/selection-checkbox.directive';
|
|
20
20
|
import { FocusableDirective } from '../navigation/focusable.directive';
|
|
21
|
-
import { NgSwitch, NgSwitchCase, NgIf, NgTemplateOutlet, NgFor, NgSwitchDefault } from '@angular/common';
|
|
21
|
+
import { NgSwitch, NgSwitchCase, NgIf, NgTemplateOutlet, NgFor, NgSwitchDefault, NgClass, NgStyle } from '@angular/common';
|
|
22
22
|
import { CheckBoxComponent, NumericTextBoxComponent, TextBoxComponent } from '@progress/kendo-angular-inputs';
|
|
23
23
|
import { DatePickerComponent } from '@progress/kendo-angular-dateinputs';
|
|
24
|
+
import { TemplateContextDirective } from '@progress/kendo-angular-common';
|
|
25
|
+
import { ButtonComponent } from '@progress/kendo-angular-buttons';
|
|
26
|
+
import { DetailTemplateDirective } from './details/detail-template.directive';
|
|
27
|
+
import { DetailsService } from './details/details.service';
|
|
28
|
+
import { LocalizationService } from '@progress/kendo-angular-l10n';
|
|
24
29
|
import * as i0 from "@angular/core";
|
|
25
30
|
import * as i1 from "../editing/edit.service";
|
|
26
31
|
import * as i2 from "../common/id.service";
|
|
27
32
|
import * as i3 from "../common/provider.service";
|
|
28
|
-
import * as i4 from "
|
|
33
|
+
import * as i4 from "./details/details.service";
|
|
34
|
+
import * as i5 from "@progress/kendo-angular-l10n";
|
|
35
|
+
import * as i6 from "@angular/forms";
|
|
29
36
|
/**
|
|
30
37
|
* @hidden
|
|
31
38
|
*/
|
|
@@ -33,6 +40,8 @@ export class CellComponent {
|
|
|
33
40
|
editService;
|
|
34
41
|
idService;
|
|
35
42
|
ctx;
|
|
43
|
+
detailsService;
|
|
44
|
+
localization;
|
|
36
45
|
cellContext;
|
|
37
46
|
get commandCellClass() {
|
|
38
47
|
return this.isCommand(this.column);
|
|
@@ -44,11 +53,14 @@ export class CellComponent {
|
|
|
44
53
|
return isRowReorderColumn(this.column) ? this.ctx.localization.get('dragRowHandleLabel') : undefined;
|
|
45
54
|
}
|
|
46
55
|
column;
|
|
56
|
+
columns;
|
|
47
57
|
columnIndex;
|
|
48
58
|
isNew = false;
|
|
49
59
|
isLoading = false;
|
|
50
60
|
isVirtual = false;
|
|
51
61
|
loadingTemplate;
|
|
62
|
+
detailTemplate;
|
|
63
|
+
item;
|
|
52
64
|
set rowIndex(index) {
|
|
53
65
|
this._rowIndex = index;
|
|
54
66
|
this.updateCellContext();
|
|
@@ -58,12 +70,42 @@ export class CellComponent {
|
|
|
58
70
|
}
|
|
59
71
|
dataItem;
|
|
60
72
|
reorderIcon = reorderIcon;
|
|
61
|
-
|
|
62
|
-
|
|
73
|
+
minusIcon = minusIcon;
|
|
74
|
+
plusIcon = plusIcon;
|
|
75
|
+
detailButtonIconName(viewItem) {
|
|
76
|
+
return viewItem.isExpanded ? 'minus' : 'plus';
|
|
77
|
+
}
|
|
78
|
+
detailButtonSvgIcon(viewItem) {
|
|
79
|
+
return viewItem.isExpanded ? this.minusIcon : this.plusIcon;
|
|
80
|
+
}
|
|
81
|
+
detailButtonText(viewItem) {
|
|
82
|
+
return viewItem.isExpanded ? this.localization.get('detailCollapse') : this.localization.get('detailExpand');
|
|
83
|
+
}
|
|
84
|
+
toggleRow(index, dataItem) {
|
|
85
|
+
this.detailsService.toggleRow(index, dataItem);
|
|
86
|
+
return false;
|
|
87
|
+
}
|
|
88
|
+
get stackedRowClass() {
|
|
89
|
+
const columnsLength = this.ctx.grid.stackedColumns?.columns.length;
|
|
90
|
+
if (this.ctx.grid.stackedColumns.areDefault && columnsLength > 1) {
|
|
91
|
+
return `k-grid-cols-${columnsLength}`;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
get stackedRowStyle() {
|
|
95
|
+
const columnsWidths = this.ctx.grid.stackedColumns.columns.map(c => c.width).join(' ');
|
|
96
|
+
if (!this.ctx.grid.stackedColumns.areDefault && columnsWidths) {
|
|
97
|
+
return {
|
|
98
|
+
'grid-template-columns': `${columnsWidths}`
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
isEdited(column) {
|
|
103
|
+
const currentColumn = column || this.column;
|
|
104
|
+
if (!(this.editService.isEditing() || this.isNew) || !this.isColumnEditable(column)) {
|
|
63
105
|
return false;
|
|
64
106
|
}
|
|
65
|
-
const editContext = this.editService.columnContext(this.rowIndex,
|
|
66
|
-
return this.isFieldEditable(editContext,
|
|
107
|
+
const editContext = this.editService.columnContext(this.rowIndex, currentColumn);
|
|
108
|
+
return this.isFieldEditable(editContext, currentColumn);
|
|
67
109
|
}
|
|
68
110
|
get showLoading() {
|
|
69
111
|
return this.isVirtual && this.isLoading;
|
|
@@ -71,13 +113,22 @@ export class CellComponent {
|
|
|
71
113
|
get formGroup() {
|
|
72
114
|
return this.editService.context(this.rowIndex).group;
|
|
73
115
|
}
|
|
74
|
-
|
|
116
|
+
getTemplateContext(column) {
|
|
117
|
+
this._templateContext.isNew = this.isNew;
|
|
118
|
+
this._templateContext.column = column || this.column;
|
|
119
|
+
this._templateContext.dataItem = this.dataItem;
|
|
120
|
+
this._templateContext.rowIndex = this.rowIndex;
|
|
121
|
+
this._templateContext.columnIndex = this.columnIndex;
|
|
122
|
+
this._templateContext.$implicit = this.dataItem;
|
|
75
123
|
return this._templateContext;
|
|
76
124
|
}
|
|
77
|
-
get
|
|
125
|
+
get isStackedLayoutMode() {
|
|
126
|
+
return this.ctx.grid?.isStacked;
|
|
127
|
+
}
|
|
128
|
+
getEditTemplateContext(column) {
|
|
78
129
|
this._editTemplateContext.$implicit = this.formGroup;
|
|
79
130
|
this._editTemplateContext.isNew = this.isNew;
|
|
80
|
-
this._editTemplateContext.column = this.column;
|
|
131
|
+
this._editTemplateContext.column = column || this.column;
|
|
81
132
|
this._editTemplateContext.dataItem = this.dataItem;
|
|
82
133
|
this._editTemplateContext.formGroup = this.formGroup;
|
|
83
134
|
this._editTemplateContext.rowIndex = this.rowIndex;
|
|
@@ -95,11 +146,13 @@ export class CellComponent {
|
|
|
95
146
|
}
|
|
96
147
|
return undefined;
|
|
97
148
|
}
|
|
98
|
-
|
|
99
|
-
|
|
149
|
+
isBoundColumn(column) {
|
|
150
|
+
const currentColumn = column || this.column;
|
|
151
|
+
return currentColumn.field && !currentColumn.templateRef;
|
|
100
152
|
}
|
|
101
|
-
|
|
102
|
-
|
|
153
|
+
isCheckboxColumn(column) {
|
|
154
|
+
const currentColumn = column || this.column;
|
|
155
|
+
return isCheckboxColumn(currentColumn) && !currentColumn.templateRef;
|
|
103
156
|
}
|
|
104
157
|
get selectionCheckboxId() {
|
|
105
158
|
return this.idService.selectionCheckboxId(this.rowIndex);
|
|
@@ -113,37 +166,36 @@ export class CellComponent {
|
|
|
113
166
|
get children() {
|
|
114
167
|
return columnsToRender([this.column]);
|
|
115
168
|
}
|
|
116
|
-
|
|
117
|
-
|
|
169
|
+
isRowReorderColumn(column) {
|
|
170
|
+
const currentColumn = column || this.column;
|
|
171
|
+
return isRowReorderColumn(currentColumn) && !currentColumn.templateRef;
|
|
118
172
|
}
|
|
119
|
-
|
|
120
|
-
|
|
173
|
+
isRowSelectable(column) {
|
|
174
|
+
const currentColumn = column || this.column;
|
|
175
|
+
return currentColumn.rowSelectable(this._rowIndex);
|
|
121
176
|
}
|
|
122
177
|
_rowIndex;
|
|
123
|
-
|
|
124
|
-
|
|
178
|
+
isColumnEditable(column) {
|
|
179
|
+
const currentColumn = column || this.column;
|
|
180
|
+
if (!currentColumn || this.isCommand(currentColumn)) {
|
|
125
181
|
return false;
|
|
126
182
|
}
|
|
127
|
-
return
|
|
183
|
+
return currentColumn.editable !== false;
|
|
128
184
|
}
|
|
129
185
|
_templateContext = {};
|
|
130
186
|
_editTemplateContext = {};
|
|
131
187
|
_rowReorderTemplateContext = {};
|
|
132
|
-
constructor(editService, idService, ctx, cellContext) {
|
|
188
|
+
constructor(editService, idService, ctx, detailsService, localization, cellContext) {
|
|
133
189
|
this.editService = editService;
|
|
134
190
|
this.idService = idService;
|
|
135
191
|
this.ctx = ctx;
|
|
192
|
+
this.detailsService = detailsService;
|
|
193
|
+
this.localization = localization;
|
|
136
194
|
this.cellContext = cellContext;
|
|
137
195
|
}
|
|
138
196
|
ngDoCheck() {
|
|
139
197
|
this.updateCellContext();
|
|
140
198
|
}
|
|
141
|
-
ngOnChanges() {
|
|
142
|
-
this.updateTemplateContext();
|
|
143
|
-
}
|
|
144
|
-
ngAfterContentChecked() {
|
|
145
|
-
this.updateTemplateContext();
|
|
146
|
-
}
|
|
147
199
|
isCommand(column) {
|
|
148
200
|
return column instanceof CommandColumnComponent;
|
|
149
201
|
}
|
|
@@ -161,203 +213,423 @@ export class CellComponent {
|
|
|
161
213
|
this.cellContext.rowIndex = this._rowIndex;
|
|
162
214
|
}
|
|
163
215
|
}
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
<ng-container [ngSwitch]="isEdited">
|
|
179
|
-
<ng-container *ngSwitchCase="false">
|
|
180
|
-
<ng-container *ngIf="!showLoading; else loading">
|
|
181
|
-
<ng-template *ngIf="column.templateRef"
|
|
182
|
-
[ngTemplateOutlet]="column.templateRef"
|
|
183
|
-
[ngTemplateOutletContext]="templateContext">
|
|
184
|
-
</ng-template>
|
|
185
|
-
<ng-container *ngIf="isSpanColumn">
|
|
186
|
-
<ng-container *ngFor="let childColumn of children">
|
|
187
|
-
{{ dataItem | valueOf: childColumn.field: childColumn.format}}
|
|
216
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CellComponent, deps: [{ token: i1.EditService }, { token: i2.IdService }, { token: i3.ContextService }, { token: i4.DetailsService }, { token: i5.LocalizationService }, { token: CELL_CONTEXT, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
217
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: CellComponent, isStandalone: true, selector: "[kendoGridCell]", inputs: { column: "column", columns: "columns", columnIndex: "columnIndex", isNew: "isNew", isLoading: "isLoading", isVirtual: "isVirtual", loadingTemplate: "loadingTemplate", detailTemplate: "detailTemplate", item: "item", rowIndex: "rowIndex", dataItem: "dataItem" }, host: { properties: { "class.k-command-cell": "this.commandCellClass", "class.k-drag-cell": "this.dragHandleCellClass", "class.k-touch-action-none": "this.dragHandleCellClass", "attr.aria-label": "this.dragRowHandleLabel" } }, ngImport: i0, template: `
|
|
218
|
+
<ng-container *ngIf="isStackedLayoutMode">
|
|
219
|
+
<div class="k-grid-stack-row"
|
|
220
|
+
[ngClass]="stackedRowClass"
|
|
221
|
+
[ngStyle]="stackedRowStyle">
|
|
222
|
+
<div class="k-grid-stack-cell" *ngFor="let col of columns"
|
|
223
|
+
[class.k-grid-stack-edit-cell]="isEdited(col)"
|
|
224
|
+
[class.k-drag-cell]="isRowReorderColumn(col) && !isNew"
|
|
225
|
+
[class.k-command-cell]="isCommand(col)"
|
|
226
|
+
[kendoGridFocusable]="!isCommand(col)">
|
|
227
|
+
<div class="k-grid-stack-header">
|
|
228
|
+
<ng-container *ngIf="!col.headerTemplateRef; else headerTemplate">
|
|
229
|
+
{{col.displayTitle}}
|
|
188
230
|
</ng-container>
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
231
|
+
|
|
232
|
+
<ng-template #headerTemplate
|
|
233
|
+
[templateContext]="{
|
|
234
|
+
templateRef: col.headerTemplateRef,
|
|
235
|
+
columnIndex: col.leafIndex,
|
|
236
|
+
column: col,
|
|
237
|
+
$implicit: col
|
|
238
|
+
}">
|
|
239
|
+
</ng-template>
|
|
240
|
+
</div>
|
|
241
|
+
<div class="k-grid-stack-content">
|
|
242
|
+
<ng-container *ngIf="!isEdited(col)">
|
|
243
|
+
<ng-container *ngIf="!col.templateRef; else template">
|
|
244
|
+
<ng-container *ngIf="isBoundColumn(col)">{{ dataItem | valueOf: col.field: col.format}}</ng-container>
|
|
245
|
+
<ng-container *ngIf="isCheckboxColumn(col) && !isNew">
|
|
246
|
+
<ng-container *ngIf="isRowSelectable(col); else nonSelectableRow">
|
|
247
|
+
<kendo-checkbox
|
|
248
|
+
[kendoGridSelectionCheckbox]="rowIndex"
|
|
249
|
+
[attr.id]="selectionCheckboxId"
|
|
250
|
+
[inputAttributes]="{'aria-label': selectionCheckboxLabel}"
|
|
251
|
+
[title]="selectionCheckboxLabel">
|
|
252
|
+
</kendo-checkbox>
|
|
253
|
+
</ng-container>
|
|
254
|
+
<ng-template #nonSelectableRow>
|
|
255
|
+
<kendo-checkbox *ngIf="col.showDisabledCheckbox"
|
|
256
|
+
[kendoGridSelectionCheckbox]="rowIndex"
|
|
257
|
+
[attr.id]="selectionCheckboxId"
|
|
258
|
+
[inputAttributes]="{'aria-label': selectionCheckboxLabel}"
|
|
259
|
+
[title]="selectionCheckboxLabel"
|
|
260
|
+
[disabled]="true"
|
|
261
|
+
></kendo-checkbox>
|
|
262
|
+
</ng-template>
|
|
263
|
+
</ng-container>
|
|
264
|
+
<ng-container *ngIf="isRowReorderColumn(col) && !isNew">
|
|
265
|
+
<kendo-icon-wrapper *ngIf="!col.dragHandleTemplate?.first"
|
|
266
|
+
name="reorder"
|
|
267
|
+
[svgIcon]="reorderIcon">
|
|
268
|
+
</kendo-icon-wrapper>
|
|
269
|
+
<ng-template *ngIf="col.dragHandleTemplate?.first"
|
|
270
|
+
[ngTemplateOutlet]="col.rowDragHandleTemplateRef"
|
|
271
|
+
[ngTemplateOutletContext]="rowReorderTemplateContext">
|
|
272
|
+
</ng-template>
|
|
273
|
+
</ng-container>
|
|
274
|
+
</ng-container>
|
|
275
|
+
<ng-template #template
|
|
276
|
+
[ngTemplateOutlet]="col.templateRef"
|
|
277
|
+
[ngTemplateOutletContext]="getTemplateContext(col)">
|
|
278
|
+
</ng-template>
|
|
279
|
+
</ng-container>
|
|
280
|
+
<ng-container *ngIf="isEdited(col)">
|
|
281
|
+
<ng-container [ngSwitch]="col.editor" *ngIf="!col.editTemplateRef">
|
|
282
|
+
<kendo-numerictextbox
|
|
283
|
+
*ngSwitchCase="'numeric'"
|
|
284
|
+
[format]="format"
|
|
285
|
+
[formControl]="$any(formGroup.get(col.field))"
|
|
286
|
+
kendoGridFocusable
|
|
287
|
+
></kendo-numerictextbox>
|
|
288
|
+
|
|
289
|
+
<kendo-datepicker
|
|
290
|
+
*ngSwitchCase="'date'"
|
|
291
|
+
[format]="format"
|
|
292
|
+
[formControl]="$any(formGroup.get(col.field))"
|
|
293
|
+
kendoGridFocusable
|
|
294
|
+
></kendo-datepicker>
|
|
295
|
+
|
|
296
|
+
<kendo-checkbox
|
|
297
|
+
*ngSwitchCase="'boolean'"
|
|
298
|
+
[formControl]="$any(formGroup.get(col.field))"
|
|
299
|
+
kendoGridFocusable
|
|
300
|
+
></kendo-checkbox>
|
|
301
|
+
|
|
302
|
+
<kendo-textbox
|
|
303
|
+
*ngSwitchDefault
|
|
304
|
+
[formControl]="$any(formGroup.get(col.field))"
|
|
305
|
+
kendoGridFocusable
|
|
306
|
+
></kendo-textbox>
|
|
307
|
+
</ng-container>
|
|
308
|
+
<ng-template *ngIf="col.editTemplateRef"
|
|
309
|
+
[ngTemplateOutlet]="col.editTemplateRef"
|
|
310
|
+
[ngTemplateOutletContext]="getEditTemplateContext(col)">
|
|
311
|
+
</ng-template>
|
|
198
312
|
</ng-container>
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
313
|
+
</div>
|
|
314
|
+
</div>
|
|
315
|
+
<div class="k-grid-stack-cell" *ngIf="detailTemplate?.showIf(item.data, $any(item).index)">
|
|
316
|
+
<div class="k-grid-stack-content">
|
|
317
|
+
<button kendoButton
|
|
318
|
+
fillMode="flat"
|
|
319
|
+
themeColor="primary"
|
|
320
|
+
[icon]="detailButtonIconName(item)"
|
|
321
|
+
[svgIcon]="detailButtonSvgIcon(item)"
|
|
322
|
+
(click)="toggleRow($any(item).index, item.data)">
|
|
323
|
+
{{ detailButtonText(item) }}
|
|
324
|
+
</button>
|
|
325
|
+
</div>
|
|
326
|
+
</div>
|
|
327
|
+
</div>
|
|
328
|
+
</ng-container>
|
|
329
|
+
|
|
330
|
+
<ng-container *ngIf="!isStackedLayoutMode">
|
|
331
|
+
<ng-container [ngSwitch]="isEdited()">
|
|
332
|
+
<ng-container *ngSwitchCase="false">
|
|
333
|
+
<ng-container *ngIf="!showLoading; else loading">
|
|
334
|
+
<ng-template *ngIf="column.templateRef"
|
|
335
|
+
[ngTemplateOutlet]="column.templateRef"
|
|
336
|
+
[ngTemplateOutletContext]="getTemplateContext()">
|
|
206
337
|
</ng-template>
|
|
338
|
+
<ng-container *ngIf="isSpanColumn">
|
|
339
|
+
<ng-container *ngFor="let childColumn of children">
|
|
340
|
+
{{ dataItem | valueOf: childColumn.field: childColumn.format}}
|
|
341
|
+
</ng-container>
|
|
342
|
+
</ng-container>
|
|
343
|
+
<ng-container *ngIf="isBoundColumn()">{{ dataItem | valueOf: column.field: column.format}}</ng-container>
|
|
344
|
+
<ng-container *ngIf="isCheckboxColumn() && !isNew">
|
|
345
|
+
<ng-container *ngIf="isRowSelectable(); else nonSelectableRow">
|
|
346
|
+
<kendo-checkbox
|
|
347
|
+
[kendoGridSelectionCheckbox]="rowIndex"
|
|
348
|
+
[attr.id]="selectionCheckboxId"
|
|
349
|
+
[inputAttributes]="{'aria-label': selectionCheckboxLabel}"
|
|
350
|
+
[title]="selectionCheckboxLabel">
|
|
351
|
+
</kendo-checkbox>
|
|
352
|
+
</ng-container>
|
|
353
|
+
<ng-template #nonSelectableRow>
|
|
354
|
+
<kendo-checkbox *ngIf="column.showDisabledCheckbox"
|
|
355
|
+
[kendoGridSelectionCheckbox]="rowIndex"
|
|
356
|
+
[attr.id]="selectionCheckboxId"
|
|
357
|
+
[inputAttributes]="{'aria-label': selectionCheckboxLabel}"
|
|
358
|
+
[title]="selectionCheckboxLabel"
|
|
359
|
+
[disabled]="true"
|
|
360
|
+
></kendo-checkbox>
|
|
361
|
+
</ng-template>
|
|
362
|
+
</ng-container>
|
|
363
|
+
<ng-container *ngIf="isRowReorderColumn() && !isNew">
|
|
364
|
+
<kendo-icon-wrapper *ngIf="!column.dragHandleTemplate?.first"
|
|
365
|
+
name="reorder"
|
|
366
|
+
[svgIcon]="reorderIcon">
|
|
367
|
+
</kendo-icon-wrapper>
|
|
368
|
+
<ng-template *ngIf="column.dragHandleTemplate?.first"
|
|
369
|
+
[ngTemplateOutlet]="column.rowDragHandleTemplateRef"
|
|
370
|
+
[ngTemplateOutletContext]="rowReorderTemplateContext">
|
|
371
|
+
</ng-template>
|
|
372
|
+
</ng-container>
|
|
207
373
|
</ng-container>
|
|
208
|
-
<ng-
|
|
209
|
-
<
|
|
210
|
-
|
|
211
|
-
[
|
|
212
|
-
|
|
213
|
-
<ng-template *ngIf="column.dragHandleTemplate?.first"
|
|
214
|
-
[ngTemplateOutlet]="column.rowDragHandleTemplateRef"
|
|
215
|
-
[ngTemplateOutletContext]="rowReorderTemplateContext">
|
|
374
|
+
<ng-template #loading>
|
|
375
|
+
<ng-template
|
|
376
|
+
*ngIf="loadingTemplate"
|
|
377
|
+
[ngTemplateOutlet]="loadingTemplate"
|
|
378
|
+
[ngTemplateOutletContext]="{$implicit: column}">
|
|
216
379
|
</ng-template>
|
|
217
|
-
|
|
380
|
+
<div *ngIf="!loadingTemplate" class="k-skeleton-text k-skeleton"></div>
|
|
381
|
+
</ng-template>
|
|
218
382
|
</ng-container>
|
|
219
|
-
<ng-
|
|
383
|
+
<ng-container *ngSwitchCase="true">
|
|
220
384
|
<ng-template
|
|
221
|
-
*ngIf="
|
|
222
|
-
[ngTemplateOutlet]="
|
|
223
|
-
[ngTemplateOutletContext]="
|
|
385
|
+
*ngIf="column.editTemplateRef"
|
|
386
|
+
[ngTemplateOutlet]="column.editTemplateRef"
|
|
387
|
+
[ngTemplateOutletContext]="getEditTemplateContext()">
|
|
224
388
|
</ng-template>
|
|
225
|
-
<
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
[ngTemplateOutletContext]="editTemplateContext">
|
|
233
|
-
</ng-template>
|
|
234
|
-
<ng-container [ngSwitch]="column.editor" *ngIf="!column.editTemplateRef">
|
|
235
|
-
<kendo-numerictextbox
|
|
236
|
-
*ngSwitchCase="'numeric'"
|
|
237
|
-
[format]="format"
|
|
238
|
-
[formControl]="$any(formGroup.get(column.field))"
|
|
239
|
-
kendoGridFocusable
|
|
240
|
-
></kendo-numerictextbox>
|
|
389
|
+
<ng-container [ngSwitch]="column.editor" *ngIf="!column.editTemplateRef">
|
|
390
|
+
<kendo-numerictextbox
|
|
391
|
+
*ngSwitchCase="'numeric'"
|
|
392
|
+
[format]="format"
|
|
393
|
+
[formControl]="$any(formGroup.get(column.field))"
|
|
394
|
+
kendoGridFocusable
|
|
395
|
+
></kendo-numerictextbox>
|
|
241
396
|
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
397
|
+
<kendo-datepicker
|
|
398
|
+
*ngSwitchCase="'date'"
|
|
399
|
+
[format]="format"
|
|
400
|
+
[formControl]="$any(formGroup.get(column.field))"
|
|
401
|
+
kendoGridFocusable
|
|
402
|
+
></kendo-datepicker>
|
|
248
403
|
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
404
|
+
<kendo-checkbox
|
|
405
|
+
*ngSwitchCase="'boolean'"
|
|
406
|
+
[formControl]="$any(formGroup.get(column.field))"
|
|
407
|
+
kendoGridFocusable
|
|
408
|
+
></kendo-checkbox>
|
|
254
409
|
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
410
|
+
<kendo-textbox
|
|
411
|
+
*ngSwitchDefault
|
|
412
|
+
[formControl]="$any(formGroup.get(column.field))"
|
|
413
|
+
kendoGridFocusable
|
|
414
|
+
></kendo-textbox>
|
|
415
|
+
</ng-container>
|
|
260
416
|
</ng-container>
|
|
261
417
|
</ng-container>
|
|
262
418
|
</ng-container>
|
|
263
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: FocusableDirective, selector: "[kendoGridFocusable],\n [kendoGridEditCommand],\n [kendoGridRemoveCommand],\n [kendoGridSaveCommand],\n [kendoGridCancelCommand],\n [kendoGridSelectionCheckbox]\n ", inputs: ["kendoGridFocusable"] }, { kind: "directive", type: SelectionCheckboxDirective, selector: "[kendoGridSelectionCheckbox]", inputs: ["kendoGridSelectionCheckbox"] }, { kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }, { kind: "component", type: NumericTextBoxComponent, selector: "kendo-numerictextbox", inputs: ["focusableId", "disabled", "readonly", "title", "autoCorrect", "format", "max", "min", "decimals", "placeholder", "step", "spinners", "rangeValidation", "tabindex", "tabIndex", "changeValueOnScroll", "selectOnFocus", "value", "maxlength", "size", "rounded", "fillMode", "inputAttributes"], outputs: ["valueChange", "focus", "blur", "inputFocus", "inputBlur"], exportAs: ["kendoNumericTextBox"] }, { kind: "component", type: DatePickerComponent, selector: "kendo-datepicker", inputs: ["focusableId", "cellTemplate", "clearButton", "inputAttributes", "monthCellTemplate", "yearCellTemplate", "decadeCellTemplate", "centuryCellTemplate", "weekNumberTemplate", "headerTitleTemplate", "headerTemplate", "footerTemplate", "footer", "navigationItemTemplate", "weekDaysFormat", "showOtherMonthDays", "activeView", "bottomView", "topView", "calendarType", "animateCalendarNavigation", "disabled", "readonly", "readOnlyInput", "popupSettings", "navigation", "min", "max", "incompleteDateValidation", "autoCorrectParts", "autoSwitchParts", "autoSwitchKeys", "enableMouseWheel", "allowCaretMode", "autoFill", "focusedDate", "value", "format", "twoDigitYearMax", "formatPlaceholder", "placeholder", "tabindex", "tabIndex", "disabledDates", "adaptiveTitle", "adaptiveSubtitle", "rangeValidation", "disabledDatesValidation", "weekNumber", "size", "rounded", "fillMode", "adaptiveMode"], outputs: ["valueChange", "focus", "blur", "open", "close", "escape"], exportAs: ["kendo-datepicker"] }, { kind: "directive", type: NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "pipe", type: FieldAccessorPipe, name: "valueOf" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type:
|
|
419
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: FocusableDirective, selector: "[kendoGridFocusable],\n [kendoGridEditCommand],\n [kendoGridRemoveCommand],\n [kendoGridSaveCommand],\n [kendoGridCancelCommand],\n [kendoGridSelectionCheckbox]\n ", inputs: ["kendoGridFocusable"] }, { kind: "directive", type: SelectionCheckboxDirective, selector: "[kendoGridSelectionCheckbox]", inputs: ["kendoGridSelectionCheckbox"] }, { kind: "directive", type: TemplateContextDirective, selector: "[templateContext]", inputs: ["templateContext"] }, { kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }, { kind: "component", type: NumericTextBoxComponent, selector: "kendo-numerictextbox", inputs: ["focusableId", "disabled", "readonly", "title", "autoCorrect", "format", "max", "min", "decimals", "placeholder", "step", "spinners", "rangeValidation", "tabindex", "tabIndex", "changeValueOnScroll", "selectOnFocus", "value", "maxlength", "size", "rounded", "fillMode", "inputAttributes"], outputs: ["valueChange", "focus", "blur", "inputFocus", "inputBlur"], exportAs: ["kendoNumericTextBox"] }, { kind: "component", type: DatePickerComponent, selector: "kendo-datepicker", inputs: ["focusableId", "cellTemplate", "clearButton", "inputAttributes", "monthCellTemplate", "yearCellTemplate", "decadeCellTemplate", "centuryCellTemplate", "weekNumberTemplate", "headerTitleTemplate", "headerTemplate", "footerTemplate", "footer", "navigationItemTemplate", "weekDaysFormat", "showOtherMonthDays", "activeView", "bottomView", "topView", "calendarType", "animateCalendarNavigation", "disabled", "readonly", "readOnlyInput", "popupSettings", "navigation", "min", "max", "incompleteDateValidation", "autoCorrectParts", "autoSwitchParts", "autoSwitchKeys", "enableMouseWheel", "allowCaretMode", "autoFill", "focusedDate", "value", "format", "twoDigitYearMax", "formatPlaceholder", "placeholder", "tabindex", "tabIndex", "disabledDates", "adaptiveTitle", "adaptiveSubtitle", "rangeValidation", "disabledDatesValidation", "weekNumber", "size", "rounded", "fillMode", "adaptiveMode"], outputs: ["valueChange", "focus", "blur", "open", "close", "escape"], exportAs: ["kendo-datepicker"] }, { kind: "directive", type: NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "pipe", type: FieldAccessorPipe, name: "valueOf" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i6.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i6.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: CheckBoxComponent, selector: "kendo-checkbox", inputs: ["checkedState", "rounded"], outputs: ["checkedStateChange"], exportAs: ["kendoCheckBox"] }, { kind: "component", type: TextBoxComponent, selector: "kendo-textbox", inputs: ["focusableId", "title", "type", "disabled", "readonly", "tabindex", "value", "selectOnFocus", "showSuccessIcon", "showErrorIcon", "clearButton", "successIcon", "successSvgIcon", "errorIcon", "errorSvgIcon", "clearButtonIcon", "clearButtonSvgIcon", "size", "rounded", "fillMode", "tabIndex", "placeholder", "maxlength", "inputAttributes"], outputs: ["valueChange", "inputFocus", "inputBlur", "focus", "blur"], exportAs: ["kendoTextBox"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: ButtonComponent, selector: "button[kendoButton]", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }] });
|
|
264
420
|
}
|
|
265
421
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CellComponent, decorators: [{
|
|
266
422
|
type: Component,
|
|
267
423
|
args: [{
|
|
268
424
|
selector: '[kendoGridCell]',
|
|
269
425
|
template: `
|
|
270
|
-
<ng-container
|
|
271
|
-
<
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
426
|
+
<ng-container *ngIf="isStackedLayoutMode">
|
|
427
|
+
<div class="k-grid-stack-row"
|
|
428
|
+
[ngClass]="stackedRowClass"
|
|
429
|
+
[ngStyle]="stackedRowStyle">
|
|
430
|
+
<div class="k-grid-stack-cell" *ngFor="let col of columns"
|
|
431
|
+
[class.k-grid-stack-edit-cell]="isEdited(col)"
|
|
432
|
+
[class.k-drag-cell]="isRowReorderColumn(col) && !isNew"
|
|
433
|
+
[class.k-command-cell]="isCommand(col)"
|
|
434
|
+
[kendoGridFocusable]="!isCommand(col)">
|
|
435
|
+
<div class="k-grid-stack-header">
|
|
436
|
+
<ng-container *ngIf="!col.headerTemplateRef; else headerTemplate">
|
|
437
|
+
{{col.displayTitle}}
|
|
280
438
|
</ng-container>
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
439
|
+
|
|
440
|
+
<ng-template #headerTemplate
|
|
441
|
+
[templateContext]="{
|
|
442
|
+
templateRef: col.headerTemplateRef,
|
|
443
|
+
columnIndex: col.leafIndex,
|
|
444
|
+
column: col,
|
|
445
|
+
$implicit: col
|
|
446
|
+
}">
|
|
447
|
+
</ng-template>
|
|
448
|
+
</div>
|
|
449
|
+
<div class="k-grid-stack-content">
|
|
450
|
+
<ng-container *ngIf="!isEdited(col)">
|
|
451
|
+
<ng-container *ngIf="!col.templateRef; else template">
|
|
452
|
+
<ng-container *ngIf="isBoundColumn(col)">{{ dataItem | valueOf: col.field: col.format}}</ng-container>
|
|
453
|
+
<ng-container *ngIf="isCheckboxColumn(col) && !isNew">
|
|
454
|
+
<ng-container *ngIf="isRowSelectable(col); else nonSelectableRow">
|
|
455
|
+
<kendo-checkbox
|
|
456
|
+
[kendoGridSelectionCheckbox]="rowIndex"
|
|
457
|
+
[attr.id]="selectionCheckboxId"
|
|
458
|
+
[inputAttributes]="{'aria-label': selectionCheckboxLabel}"
|
|
459
|
+
[title]="selectionCheckboxLabel">
|
|
460
|
+
</kendo-checkbox>
|
|
461
|
+
</ng-container>
|
|
462
|
+
<ng-template #nonSelectableRow>
|
|
463
|
+
<kendo-checkbox *ngIf="col.showDisabledCheckbox"
|
|
464
|
+
[kendoGridSelectionCheckbox]="rowIndex"
|
|
465
|
+
[attr.id]="selectionCheckboxId"
|
|
466
|
+
[inputAttributes]="{'aria-label': selectionCheckboxLabel}"
|
|
467
|
+
[title]="selectionCheckboxLabel"
|
|
468
|
+
[disabled]="true"
|
|
469
|
+
></kendo-checkbox>
|
|
470
|
+
</ng-template>
|
|
471
|
+
</ng-container>
|
|
472
|
+
<ng-container *ngIf="isRowReorderColumn(col) && !isNew">
|
|
473
|
+
<kendo-icon-wrapper *ngIf="!col.dragHandleTemplate?.first"
|
|
474
|
+
name="reorder"
|
|
475
|
+
[svgIcon]="reorderIcon">
|
|
476
|
+
</kendo-icon-wrapper>
|
|
477
|
+
<ng-template *ngIf="col.dragHandleTemplate?.first"
|
|
478
|
+
[ngTemplateOutlet]="col.rowDragHandleTemplateRef"
|
|
479
|
+
[ngTemplateOutletContext]="rowReorderTemplateContext">
|
|
480
|
+
</ng-template>
|
|
481
|
+
</ng-container>
|
|
482
|
+
</ng-container>
|
|
483
|
+
<ng-template #template
|
|
484
|
+
[ngTemplateOutlet]="col.templateRef"
|
|
485
|
+
[ngTemplateOutletContext]="getTemplateContext(col)">
|
|
486
|
+
</ng-template>
|
|
487
|
+
</ng-container>
|
|
488
|
+
<ng-container *ngIf="isEdited(col)">
|
|
489
|
+
<ng-container [ngSwitch]="col.editor" *ngIf="!col.editTemplateRef">
|
|
490
|
+
<kendo-numerictextbox
|
|
491
|
+
*ngSwitchCase="'numeric'"
|
|
492
|
+
[format]="format"
|
|
493
|
+
[formControl]="$any(formGroup.get(col.field))"
|
|
494
|
+
kendoGridFocusable
|
|
495
|
+
></kendo-numerictextbox>
|
|
496
|
+
|
|
497
|
+
<kendo-datepicker
|
|
498
|
+
*ngSwitchCase="'date'"
|
|
499
|
+
[format]="format"
|
|
500
|
+
[formControl]="$any(formGroup.get(col.field))"
|
|
501
|
+
kendoGridFocusable
|
|
502
|
+
></kendo-datepicker>
|
|
503
|
+
|
|
504
|
+
<kendo-checkbox
|
|
505
|
+
*ngSwitchCase="'boolean'"
|
|
506
|
+
[formControl]="$any(formGroup.get(col.field))"
|
|
507
|
+
kendoGridFocusable
|
|
508
|
+
></kendo-checkbox>
|
|
509
|
+
|
|
510
|
+
<kendo-textbox
|
|
511
|
+
*ngSwitchDefault
|
|
512
|
+
[formControl]="$any(formGroup.get(col.field))"
|
|
513
|
+
kendoGridFocusable
|
|
514
|
+
></kendo-textbox>
|
|
515
|
+
</ng-container>
|
|
516
|
+
<ng-template *ngIf="col.editTemplateRef"
|
|
517
|
+
[ngTemplateOutlet]="col.editTemplateRef"
|
|
518
|
+
[ngTemplateOutletContext]="getEditTemplateContext(col)">
|
|
519
|
+
</ng-template>
|
|
290
520
|
</ng-container>
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
521
|
+
</div>
|
|
522
|
+
</div>
|
|
523
|
+
<div class="k-grid-stack-cell" *ngIf="detailTemplate?.showIf(item.data, $any(item).index)">
|
|
524
|
+
<div class="k-grid-stack-content">
|
|
525
|
+
<button kendoButton
|
|
526
|
+
fillMode="flat"
|
|
527
|
+
themeColor="primary"
|
|
528
|
+
[icon]="detailButtonIconName(item)"
|
|
529
|
+
[svgIcon]="detailButtonSvgIcon(item)"
|
|
530
|
+
(click)="toggleRow($any(item).index, item.data)">
|
|
531
|
+
{{ detailButtonText(item) }}
|
|
532
|
+
</button>
|
|
533
|
+
</div>
|
|
534
|
+
</div>
|
|
535
|
+
</div>
|
|
536
|
+
</ng-container>
|
|
537
|
+
|
|
538
|
+
<ng-container *ngIf="!isStackedLayoutMode">
|
|
539
|
+
<ng-container [ngSwitch]="isEdited()">
|
|
540
|
+
<ng-container *ngSwitchCase="false">
|
|
541
|
+
<ng-container *ngIf="!showLoading; else loading">
|
|
542
|
+
<ng-template *ngIf="column.templateRef"
|
|
543
|
+
[ngTemplateOutlet]="column.templateRef"
|
|
544
|
+
[ngTemplateOutletContext]="getTemplateContext()">
|
|
298
545
|
</ng-template>
|
|
546
|
+
<ng-container *ngIf="isSpanColumn">
|
|
547
|
+
<ng-container *ngFor="let childColumn of children">
|
|
548
|
+
{{ dataItem | valueOf: childColumn.field: childColumn.format}}
|
|
549
|
+
</ng-container>
|
|
550
|
+
</ng-container>
|
|
551
|
+
<ng-container *ngIf="isBoundColumn()">{{ dataItem | valueOf: column.field: column.format}}</ng-container>
|
|
552
|
+
<ng-container *ngIf="isCheckboxColumn() && !isNew">
|
|
553
|
+
<ng-container *ngIf="isRowSelectable(); else nonSelectableRow">
|
|
554
|
+
<kendo-checkbox
|
|
555
|
+
[kendoGridSelectionCheckbox]="rowIndex"
|
|
556
|
+
[attr.id]="selectionCheckboxId"
|
|
557
|
+
[inputAttributes]="{'aria-label': selectionCheckboxLabel}"
|
|
558
|
+
[title]="selectionCheckboxLabel">
|
|
559
|
+
</kendo-checkbox>
|
|
560
|
+
</ng-container>
|
|
561
|
+
<ng-template #nonSelectableRow>
|
|
562
|
+
<kendo-checkbox *ngIf="column.showDisabledCheckbox"
|
|
563
|
+
[kendoGridSelectionCheckbox]="rowIndex"
|
|
564
|
+
[attr.id]="selectionCheckboxId"
|
|
565
|
+
[inputAttributes]="{'aria-label': selectionCheckboxLabel}"
|
|
566
|
+
[title]="selectionCheckboxLabel"
|
|
567
|
+
[disabled]="true"
|
|
568
|
+
></kendo-checkbox>
|
|
569
|
+
</ng-template>
|
|
570
|
+
</ng-container>
|
|
571
|
+
<ng-container *ngIf="isRowReorderColumn() && !isNew">
|
|
572
|
+
<kendo-icon-wrapper *ngIf="!column.dragHandleTemplate?.first"
|
|
573
|
+
name="reorder"
|
|
574
|
+
[svgIcon]="reorderIcon">
|
|
575
|
+
</kendo-icon-wrapper>
|
|
576
|
+
<ng-template *ngIf="column.dragHandleTemplate?.first"
|
|
577
|
+
[ngTemplateOutlet]="column.rowDragHandleTemplateRef"
|
|
578
|
+
[ngTemplateOutletContext]="rowReorderTemplateContext">
|
|
579
|
+
</ng-template>
|
|
580
|
+
</ng-container>
|
|
299
581
|
</ng-container>
|
|
300
|
-
<ng-
|
|
301
|
-
<
|
|
302
|
-
|
|
303
|
-
[
|
|
304
|
-
|
|
305
|
-
<ng-template *ngIf="column.dragHandleTemplate?.first"
|
|
306
|
-
[ngTemplateOutlet]="column.rowDragHandleTemplateRef"
|
|
307
|
-
[ngTemplateOutletContext]="rowReorderTemplateContext">
|
|
582
|
+
<ng-template #loading>
|
|
583
|
+
<ng-template
|
|
584
|
+
*ngIf="loadingTemplate"
|
|
585
|
+
[ngTemplateOutlet]="loadingTemplate"
|
|
586
|
+
[ngTemplateOutletContext]="{$implicit: column}">
|
|
308
587
|
</ng-template>
|
|
309
|
-
|
|
588
|
+
<div *ngIf="!loadingTemplate" class="k-skeleton-text k-skeleton"></div>
|
|
589
|
+
</ng-template>
|
|
310
590
|
</ng-container>
|
|
311
|
-
<ng-
|
|
591
|
+
<ng-container *ngSwitchCase="true">
|
|
312
592
|
<ng-template
|
|
313
|
-
*ngIf="
|
|
314
|
-
[ngTemplateOutlet]="
|
|
315
|
-
[ngTemplateOutletContext]="
|
|
593
|
+
*ngIf="column.editTemplateRef"
|
|
594
|
+
[ngTemplateOutlet]="column.editTemplateRef"
|
|
595
|
+
[ngTemplateOutletContext]="getEditTemplateContext()">
|
|
316
596
|
</ng-template>
|
|
317
|
-
<
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
[ngTemplateOutletContext]="editTemplateContext">
|
|
325
|
-
</ng-template>
|
|
326
|
-
<ng-container [ngSwitch]="column.editor" *ngIf="!column.editTemplateRef">
|
|
327
|
-
<kendo-numerictextbox
|
|
328
|
-
*ngSwitchCase="'numeric'"
|
|
329
|
-
[format]="format"
|
|
330
|
-
[formControl]="$any(formGroup.get(column.field))"
|
|
331
|
-
kendoGridFocusable
|
|
332
|
-
></kendo-numerictextbox>
|
|
597
|
+
<ng-container [ngSwitch]="column.editor" *ngIf="!column.editTemplateRef">
|
|
598
|
+
<kendo-numerictextbox
|
|
599
|
+
*ngSwitchCase="'numeric'"
|
|
600
|
+
[format]="format"
|
|
601
|
+
[formControl]="$any(formGroup.get(column.field))"
|
|
602
|
+
kendoGridFocusable
|
|
603
|
+
></kendo-numerictextbox>
|
|
333
604
|
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
605
|
+
<kendo-datepicker
|
|
606
|
+
*ngSwitchCase="'date'"
|
|
607
|
+
[format]="format"
|
|
608
|
+
[formControl]="$any(formGroup.get(column.field))"
|
|
609
|
+
kendoGridFocusable
|
|
610
|
+
></kendo-datepicker>
|
|
340
611
|
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
612
|
+
<kendo-checkbox
|
|
613
|
+
*ngSwitchCase="'boolean'"
|
|
614
|
+
[formControl]="$any(formGroup.get(column.field))"
|
|
615
|
+
kendoGridFocusable
|
|
616
|
+
></kendo-checkbox>
|
|
346
617
|
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
618
|
+
<kendo-textbox
|
|
619
|
+
*ngSwitchDefault
|
|
620
|
+
[formControl]="$any(formGroup.get(column.field))"
|
|
621
|
+
kendoGridFocusable
|
|
622
|
+
></kendo-textbox>
|
|
623
|
+
</ng-container>
|
|
352
624
|
</ng-container>
|
|
353
625
|
</ng-container>
|
|
354
626
|
</ng-container>
|
|
355
627
|
`,
|
|
356
628
|
standalone: true,
|
|
357
|
-
imports: [NgSwitch, NgSwitchCase, NgIf, NgTemplateOutlet, NgFor, FocusableDirective, SelectionCheckboxDirective,
|
|
358
|
-
IconWrapperComponent, NumericTextBoxComponent, DatePickerComponent, NgSwitchDefault, FieldAccessorPipe, ReactiveFormsModule, CheckBoxComponent, TextBoxComponent]
|
|
629
|
+
imports: [NgSwitch, NgSwitchCase, NgIf, NgTemplateOutlet, NgFor, FocusableDirective, SelectionCheckboxDirective, TemplateContextDirective,
|
|
630
|
+
IconWrapperComponent, NumericTextBoxComponent, DatePickerComponent, NgSwitchDefault, FieldAccessorPipe, ReactiveFormsModule, CheckBoxComponent, TextBoxComponent, NgClass, NgStyle, ButtonComponent]
|
|
359
631
|
}]
|
|
360
|
-
}], ctorParameters: function () { return [{ type: i1.EditService }, { type: i2.IdService }, { type: i3.ContextService }, { type: undefined, decorators: [{
|
|
632
|
+
}], ctorParameters: function () { return [{ type: i1.EditService }, { type: i2.IdService }, { type: i3.ContextService }, { type: i4.DetailsService }, { type: i5.LocalizationService }, { type: undefined, decorators: [{
|
|
361
633
|
type: Optional
|
|
362
634
|
}, {
|
|
363
635
|
type: Inject,
|
|
@@ -376,6 +648,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
376
648
|
args: ['attr.aria-label']
|
|
377
649
|
}], column: [{
|
|
378
650
|
type: Input
|
|
651
|
+
}], columns: [{
|
|
652
|
+
type: Input
|
|
379
653
|
}], columnIndex: [{
|
|
380
654
|
type: Input
|
|
381
655
|
}], isNew: [{
|
|
@@ -386,6 +660,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
386
660
|
type: Input
|
|
387
661
|
}], loadingTemplate: [{
|
|
388
662
|
type: Input
|
|
663
|
+
}], detailTemplate: [{
|
|
664
|
+
type: Input
|
|
665
|
+
}], item: [{
|
|
666
|
+
type: Input
|
|
389
667
|
}], rowIndex: [{
|
|
390
668
|
type: Input
|
|
391
669
|
}], dataItem: [{
|