@progress/kendo-angular-grid 19.3.0-develop.22 → 19.3.0-develop.24

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.
Files changed (65) hide show
  1. package/columns/columns-container.d.ts +2 -0
  2. package/common/data-layout-mode.d.ts +19 -0
  3. package/common/stacked-layout-settings.d.ts +24 -0
  4. package/directives.d.ts +4 -3
  5. package/editing-directives/editing-directive-base.d.ts +3 -0
  6. package/esm2022/columns/column-base.mjs +4 -4
  7. package/esm2022/columns/column.component.mjs +1 -1
  8. package/esm2022/columns/columns-container.mjs +3 -0
  9. package/esm2022/common/column-info.service.mjs +1 -1
  10. package/esm2022/common/data-layout-mode.mjs +5 -0
  11. package/esm2022/common/stacked-layout-settings.mjs +5 -0
  12. package/esm2022/directives.mjs +3 -1
  13. package/esm2022/editing-directives/editing-directive-base.mjs +17 -2
  14. package/esm2022/editing-directives/in-cell-editing.directive.mjs +2 -1
  15. package/esm2022/filtering/filter-row.component.mjs +5 -2
  16. package/esm2022/grid.component.mjs +111 -33
  17. package/esm2022/grid.module.mjs +101 -100
  18. package/esm2022/grouping/group-header.component.mjs +39 -4
  19. package/esm2022/index.mjs +1 -0
  20. package/esm2022/localization/messages.mjs +2 -2
  21. package/esm2022/navigation/default-focusable-element.mjs +14 -2
  22. package/esm2022/navigation/focusable.directive.mjs +1 -1
  23. package/esm2022/navigation/navigation-cursor.mjs +7 -1
  24. package/esm2022/navigation/navigation-metadata.mjs +3 -1
  25. package/esm2022/navigation/navigation.service.mjs +136 -5
  26. package/esm2022/package-metadata.mjs +2 -2
  27. package/esm2022/pdf/export-element.mjs +14 -5
  28. package/esm2022/pdf/pdf.component.mjs +3 -1
  29. package/esm2022/rendering/cell.component.mjs +466 -188
  30. package/esm2022/rendering/common/col-group.component.mjs +20 -7
  31. package/esm2022/rendering/footer/footer.component.mjs +117 -54
  32. package/esm2022/rendering/header/header.component.mjs +5 -2
  33. package/esm2022/rendering/list.component.mjs +13 -8
  34. package/esm2022/rendering/table-body.component.mjs +384 -171
  35. package/esm2022/rendering/toolbar/tools/ai-assistant/ai-assistant.component.mjs +7 -3
  36. package/esm2022/rendering/toolbar/tools/ai-assistant/ai-tool.directive.mjs +1 -1
  37. package/esm2022/rendering/toolbar/tools/select-all-command-tool.directive.mjs +93 -0
  38. package/esm2022/row-reordering/row-reorder.service.mjs +2 -2
  39. package/esm2022/row-reordering/utils.mjs +6 -4
  40. package/esm2022/selection/cell-selection.service.mjs +6 -3
  41. package/fesm2022/progress-kendo-angular-grid.mjs +1515 -567
  42. package/filtering/filter-row.component.d.ts +1 -0
  43. package/grid.component.d.ts +22 -1
  44. package/grid.module.d.ts +100 -99
  45. package/grouping/group-header.component.d.ts +1 -0
  46. package/index.d.ts +3 -0
  47. package/localization/messages.d.ts +2 -2
  48. package/navigation/default-focusable-element.d.ts +3 -1
  49. package/navigation/focus-group.d.ts +1 -1
  50. package/navigation/navigation-metadata.d.ts +2 -1
  51. package/navigation/navigation.service.d.ts +6 -0
  52. package/package.json +21 -21
  53. package/rendering/cell.component.d.ts +32 -17
  54. package/rendering/common/col-group.component.d.ts +5 -0
  55. package/rendering/footer/footer.component.d.ts +4 -1
  56. package/rendering/header/header.component.d.ts +1 -0
  57. package/rendering/list.component.d.ts +4 -1
  58. package/rendering/table-body.component.d.ts +2 -1
  59. package/rendering/toolbar/tools/ai-assistant/ai-assistant.component.d.ts +1 -0
  60. package/rendering/toolbar/tools/ai-assistant/ai-tool.directive.d.ts +1 -1
  61. package/rendering/toolbar/tools/select-all-command-tool.directive.d.ts +36 -0
  62. package/row-reordering/row-reorder.service.d.ts +1 -1
  63. package/row-reordering/utils.d.ts +1 -1
  64. package/schematics/ngAdd/index.js +4 -4
  65. package/selection/cell-selection.service.d.ts +1 -0
@@ -132,9 +132,7 @@ export class AiAssistantComponent {
132
132
  prompt: this.lastMessage,
133
133
  output: responseContentStart.concat(responseContentBody).join(''),
134
134
  };
135
- if (this.promptOutputs[0].id === this.loadingOutput.id) {
136
- this.promptOutputs.splice(0, 1);
137
- }
135
+ this.deleteDummyLoadingOutput();
138
136
  this.promptOutputs.unshift(output);
139
137
  this.aiToolDirective.responseSuccess.emit(response);
140
138
  }
@@ -144,9 +142,15 @@ export class AiAssistantComponent {
144
142
  prompt: this.lastMessage,
145
143
  output: error.message
146
144
  };
145
+ this.deleteDummyLoadingOutput();
147
146
  this.promptOutputs.unshift(output);
148
147
  this.aiToolDirective.responseError.emit(error);
149
148
  }
149
+ deleteDummyLoadingOutput() {
150
+ if (this.promptOutputs[0].id === this.loadingOutput.id) {
151
+ this.promptOutputs.splice(0, 1);
152
+ }
153
+ }
150
154
  unsubscribeCurrentRequest() {
151
155
  if (this.currentRequestSubscription) {
152
156
  this.currentRequestSubscription.unsubscribe();
@@ -49,7 +49,7 @@ export class AIAssistantToolbarDirective extends ToolbarToolBase {
49
49
  * Configures the request options that the AI Assistant tool sends with the AI request.
50
50
  *
51
51
  * @default
52
- * ```typescript
52
+ * ```ts
53
53
  * {
54
54
  * headers: new HttpHeaders({ 'Content-Type': 'application/json' }),
55
55
  * role: 'user',
@@ -0,0 +1,93 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2025 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the project root for more information
4
+ *-------------------------------------------------------------------------------------------*/
5
+ import { Component, forwardRef } from '@angular/core';
6
+ import { ContextService } from '../../../common/provider.service';
7
+ import { CheckBoxComponent } from '@progress/kendo-angular-inputs';
8
+ import { IdService } from '../../../common/id.service';
9
+ import { ToolBarToolComponent } from '@progress/kendo-angular-toolbar';
10
+ import { SelectAllCheckboxDirective } from '../../../selection/selectall-checkbox.directive';
11
+ import { FocusableDirective } from '../../../navigation/focusable.directive';
12
+ import { LabelDirective } from '@progress/kendo-angular-label';
13
+ import * as i0 from "@angular/core";
14
+ import * as i1 from "../../../common/id.service";
15
+ import * as i2 from "../../../common/provider.service";
16
+ /**
17
+ * Represents the toolbar tool for showing a select-all `kendoGridSelectAllCheckbox` checkbox.
18
+ * Use this component inside a ToolbarComponent in the Grid.
19
+ *
20
+ * @example
21
+ * ```html
22
+ * <kendo-grid>
23
+ * <kendo-toolbar>
24
+ * <kendo-grid-select-all-tool text="Select All"></kendo-grid-select-all-tool>
25
+ * </kendo-toolbar>
26
+ * </kendo-grid>
27
+ * ```
28
+ */
29
+ export class SelectAllToolbarToolComponent extends ToolBarToolComponent {
30
+ idService;
31
+ ctx;
32
+ constructor(idService, ctx) {
33
+ super();
34
+ this.idService = idService;
35
+ this.ctx = ctx;
36
+ }
37
+ /**
38
+ * @hidden
39
+ */
40
+ selectAllCheckboxId() {
41
+ return this.idService.selectAllCheckboxId();
42
+ }
43
+ /**
44
+ * @hidden
45
+ */
46
+ get selectAllCheckboxLabel() {
47
+ return this.ctx.localization.get('selectAllCheckboxLabel');
48
+ }
49
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SelectAllToolbarToolComponent, deps: [{ token: i1.IdService }, { token: i2.ContextService }], target: i0.ɵɵFactoryTarget.Component });
50
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: SelectAllToolbarToolComponent, isStandalone: true, selector: "kendo-grid-select-all-tool", providers: [
51
+ {
52
+ provide: ToolBarToolComponent,
53
+ useExisting: forwardRef(() => SelectAllToolbarToolComponent)
54
+ }
55
+ ], usesInheritance: true, ngImport: i0, template: `
56
+ <ng-template #toolbarTemplate #sectionTemplate #popupTemplate>
57
+ <kendo-checkbox #checkbox
58
+ [attr.id]="selectAllCheckboxId()"
59
+ size="large"
60
+ [inputAttributes]="{'aria-label': selectAllCheckboxLabel}"
61
+ kendoGridSelectAllCheckbox
62
+ kendoGridFocusable
63
+ ></kendo-checkbox>
64
+ <label class="k-checkbox-label" [for]="checkbox.focusableId">{{selectAllCheckboxLabel}}</label>
65
+ </ng-template>
66
+ `, isInline: true, dependencies: [{ kind: "component", type: CheckBoxComponent, selector: "kendo-checkbox", inputs: ["checkedState", "rounded"], outputs: ["checkedStateChange"], exportAs: ["kendoCheckBox"] }, { kind: "directive", type: SelectAllCheckboxDirective, selector: "[kendoGridSelectAllCheckbox]", inputs: ["state"], outputs: ["selectAllChange"] }, { kind: "directive", type: FocusableDirective, selector: "[kendoGridFocusable],\n [kendoGridEditCommand],\n [kendoGridRemoveCommand],\n [kendoGridSaveCommand],\n [kendoGridCancelCommand],\n [kendoGridSelectionCheckbox]\n ", inputs: ["kendoGridFocusable"] }, { kind: "directive", type: LabelDirective, selector: "label[for]", inputs: ["for", "labelClass"] }] });
67
+ }
68
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SelectAllToolbarToolComponent, decorators: [{
69
+ type: Component,
70
+ args: [{
71
+ providers: [
72
+ {
73
+ provide: ToolBarToolComponent,
74
+ useExisting: forwardRef(() => SelectAllToolbarToolComponent)
75
+ }
76
+ ],
77
+ selector: 'kendo-grid-select-all-tool',
78
+ template: `
79
+ <ng-template #toolbarTemplate #sectionTemplate #popupTemplate>
80
+ <kendo-checkbox #checkbox
81
+ [attr.id]="selectAllCheckboxId()"
82
+ size="large"
83
+ [inputAttributes]="{'aria-label': selectAllCheckboxLabel}"
84
+ kendoGridSelectAllCheckbox
85
+ kendoGridFocusable
86
+ ></kendo-checkbox>
87
+ <label class="k-checkbox-label" [for]="checkbox.focusableId">{{selectAllCheckboxLabel}}</label>
88
+ </ng-template>
89
+ `,
90
+ standalone: true,
91
+ imports: [CheckBoxComponent, SelectAllCheckboxDirective, FocusableDirective, LabelDirective]
92
+ }]
93
+ }], ctorParameters: function () { return [{ type: i1.IdService }, { type: i2.ContextService }]; } });
@@ -4,7 +4,7 @@
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  import { EventEmitter, Injectable, Output, Renderer2 } from '@angular/core';
6
6
  import { isDocumentAvailable, isPresent } from '@progress/kendo-angular-common';
7
- import { getOffset, isNextSibling, isPreviousSibling, dropPosition, hintIcons, hintSVGIcons, hintClasses, hintStyles, dropIndicatorClasses, dropIndicatorStyles, isDifferentParent, defaultSelectors } from './utils';
7
+ import { getOffset, isNextSibling, isPreviousSibling, dropPosition, hintIcons, hintSVGIcons, hintClasses, hintStyles, dropIndicatorClasses, dropIndicatorStyles, isDifferentParent, getDefaultSelectors } from './utils';
8
8
  import * as i0 from "@angular/core";
9
9
  /**
10
10
  * @hidden
@@ -12,7 +12,7 @@ import * as i0 from "@angular/core";
12
12
  export class RowReorderService {
13
13
  renderer;
14
14
  hintElement = null;
15
- defaultSelectors = defaultSelectors;
15
+ defaultSelectors = getDefaultSelectors;
16
16
  hintText = '';
17
17
  skip;
18
18
  dropIndicator;
@@ -77,10 +77,12 @@ export const dropIndicatorClasses = ['k-drop-hint', 'k-drop-hint-h'];
77
77
  /**
78
78
  * @hidden
79
79
  */
80
- export const defaultSelectors = {
81
- handle: '.k-table-td.k-drag-cell',
82
- dragTarget: '.k-master-row',
83
- dropTarget: '.k-master-row'
80
+ export const getDefaultSelectors = (isStacked) => {
81
+ return {
82
+ handle: isStacked ? '.k-grid-stack-cell.k-drag-cell' : '.k-table-td.k-drag-cell',
83
+ dragTarget: '.k-master-row',
84
+ dropTarget: '.k-master-row'
85
+ };
84
86
  };
85
87
  const getDocument = element => element?.ownerDocument.documentElement;
86
88
  const getWindow = element => element?.ownerDocument.defaultView;
@@ -31,7 +31,7 @@ export class CellSelectionService {
31
31
  nonSelectableRows = new Map();
32
32
  get enableMarquee() {
33
33
  const checkboxOnly = this.settings && typeof this.settings === 'object' && this.settings.checkboxOnly;
34
- if (!this.settings || checkboxOnly) {
34
+ if (!this.settings || checkboxOnly || this.settings.isStacked) {
35
35
  return false;
36
36
  }
37
37
  const selectableSettings = this.settings.selectable;
@@ -67,7 +67,7 @@ export class CellSelectionService {
67
67
  this.settings = settings;
68
68
  this.currentSelection = [];
69
69
  this.nonSelectableRows = new Map();
70
- if (settings.selectable && settings.selectable.enabled !== false) {
70
+ if (settings.selectable && settings.selectable.enabled !== false && !settings.isStacked) {
71
71
  const iterator = this.getIterator();
72
72
  let item = iterator.next();
73
73
  while (!item.done) {
@@ -91,7 +91,7 @@ export class CellSelectionService {
91
91
  }
92
92
  }
93
93
  isCellSelected(item, col) {
94
- if (this.settings && this.active) {
94
+ if (this.settings && this.active && !this.settings.isStacked) {
95
95
  const selectedCellArgs = this.settings.cellSelected({ dataItem: item.data, index: item.index }, col, col.leafIndex);
96
96
  return this.options.enabled && selectedCellArgs.selected && !this.nonSelectableRows.has(item.index);
97
97
  }
@@ -102,6 +102,9 @@ export class CellSelectionService {
102
102
  this.dragging = false;
103
103
  return;
104
104
  }
105
+ if (this.settings.isStacked) {
106
+ return;
107
+ }
105
108
  let ev;
106
109
  const ctrlKey = event.ctrlKey || event.metaKey;
107
110
  if (this.options.mode === "single" && ctrlKey && this.isCellSelected(item, item.column)) {