@progress/kendo-angular-pivotgrid 21.4.1-develop.1 → 22.0.0-develop.1

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 (62) hide show
  1. package/configurator/chip-menu/chip-menu-item-base.d.ts +1 -1
  2. package/data-binding/base-binding-directive.d.ts +1 -1
  3. package/fesm2022/progress-kendo-angular-pivotgrid.mjs +120 -120
  4. package/localization/messages.d.ts +1 -1
  5. package/package.json +18 -26
  6. package/schematics/ngAdd/index.js +2 -2
  7. package/esm2022/configurator/chip-kb-nav.directive.mjs +0 -69
  8. package/esm2022/configurator/chip-menu/chip-menu-container.component.mjs +0 -51
  9. package/esm2022/configurator/chip-menu/chip-menu-filter.component.mjs +0 -135
  10. package/esm2022/configurator/chip-menu/chip-menu-item-base.mjs +0 -40
  11. package/esm2022/configurator/chip-menu/chip-menu-item-content-template.directive.mjs +0 -29
  12. package/esm2022/configurator/chip-menu/chip-menu-item.component.mjs +0 -206
  13. package/esm2022/configurator/chip-menu/chip-menu-item.directive.mjs +0 -98
  14. package/esm2022/configurator/chip-menu/chip-menu-reorder.component.mjs +0 -198
  15. package/esm2022/configurator/chip-menu/chip-menu-sort.component.mjs +0 -104
  16. package/esm2022/configurator/chip-menu/chip-menu.component.mjs +0 -165
  17. package/esm2022/configurator/chip-menu/chip-menu.service.mjs +0 -40
  18. package/esm2022/configurator/chip-menu/filtering/filter-menu-container.component.mjs +0 -186
  19. package/esm2022/configurator/chip-menu/filtering/filter-menu-dropdownlist.directive.mjs +0 -44
  20. package/esm2022/configurator/chip-menu/filtering/menu-tabbing.service.mjs +0 -20
  21. package/esm2022/configurator/chip-menu/filtering/string-filter-menu.component.mjs +0 -148
  22. package/esm2022/configurator/chip-menu/single-popup.service.mjs +0 -136
  23. package/esm2022/configurator/configurator.component.mjs +0 -806
  24. package/esm2022/configurator/configurator.service.mjs +0 -53
  25. package/esm2022/configurator/draggable.directive.mjs +0 -131
  26. package/esm2022/configurator/drop-cue.service.mjs +0 -86
  27. package/esm2022/configurator/drop-target.directive.mjs +0 -190
  28. package/esm2022/data-binding/base-binding-directive.mjs +0 -164
  29. package/esm2022/data-binding/local-binding.directive.mjs +0 -107
  30. package/esm2022/data-binding/olap-binding.directive.mjs +0 -204
  31. package/esm2022/data-binding/pivotgrid-data.service.mjs +0 -76
  32. package/esm2022/directives.mjs +0 -97
  33. package/esm2022/index.mjs +0 -28
  34. package/esm2022/localization/custom-messages.component.mjs +0 -57
  35. package/esm2022/localization/localized-messages.directive.mjs +0 -39
  36. package/esm2022/localization/messages.mjs +0 -254
  37. package/esm2022/localization/pivot-localization.service.mjs +0 -30
  38. package/esm2022/models/configuration-change-event.mjs +0 -37
  39. package/esm2022/models/configurator-chipmenu-reorder-target.mjs +0 -5
  40. package/esm2022/models/configurator-orientation.mjs +0 -5
  41. package/esm2022/models/configurator-position.mjs +0 -5
  42. package/esm2022/models/configurator-settings.mjs +0 -21
  43. package/esm2022/models/data-row-item.mjs +0 -5
  44. package/esm2022/models/drop-section.mjs +0 -5
  45. package/esm2022/models/drop-target.mjs +0 -5
  46. package/esm2022/models/expanded-change-event.mjs +0 -29
  47. package/esm2022/models/expanded-state-action.mjs +0 -5
  48. package/esm2022/models/loader-settings.mjs +0 -5
  49. package/esm2022/models/virtualization-settings.mjs +0 -25
  50. package/esm2022/package-metadata.mjs +0 -16
  51. package/esm2022/pivotgrid.component.mjs +0 -729
  52. package/esm2022/pivotgrid.module.mjs +0 -87
  53. package/esm2022/progress-kendo-angular-pivotgrid.mjs +0 -8
  54. package/esm2022/rendering/pivotgrid-cell.directive.mjs +0 -247
  55. package/esm2022/rendering/pivotgrid-table.component.mjs +0 -386
  56. package/esm2022/rendering/templates/pivotgrid-cell-template.directive.mjs +0 -44
  57. package/esm2022/rendering/templates/pivotgrid-column-header-cell-template.directive.mjs +0 -44
  58. package/esm2022/rendering/templates/pivotgrid-row-header-cell-template.directive.mjs +0 -44
  59. package/esm2022/rendering/templates/pivotgrid-value-cell-template.directive.mjs +0 -43
  60. package/esm2022/util.mjs +0 -223
  61. package/esm2022/virtual/scroll.service.mjs +0 -18
  62. package/esm2022/virtual/scrollable-container.mjs +0 -128
@@ -1,806 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2026 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- import { ChangeDetectorRef, Component, EventEmitter, HostBinding, Input, NgZone, Output, ViewChild } from '@angular/core';
6
- import { ConfiguratorNavigation } from '@progress/kendo-pivotgrid-common';
7
- import { CheckDirective, ExpandDirective, TreeViewComponent } from '@progress/kendo-angular-treeview';
8
- import { PivotGridDataService } from '../data-binding/pivotgrid-data.service';
9
- import { ConfiguratorService } from './configurator.service';
10
- import { DropCueService } from './drop-cue.service';
11
- import { from, of, Subscription } from 'rxjs';
12
- import { mergeMap } from 'rxjs/operators';
13
- import { clone, swapItems } from '../util';
14
- import { LocalizationService } from '@progress/kendo-angular-l10n';
15
- import { SinglePopupService } from './chip-menu/single-popup.service';
16
- import { ButtonComponent, ChipComponent, ChipListComponent } from '@progress/kendo-angular-buttons';
17
- import { ChipMenuComponent } from './chip-menu/chip-menu.component';
18
- import { ChipKeyboardNavigationDirective } from './chip-kb-nav.directive';
19
- import { DraggableChipDirective } from './draggable.directive';
20
- import { DropTargetDirective } from './drop-target.directive';
21
- import { NgClass, NgStyle, NgTemplateOutlet } from '@angular/common';
22
- import { DraggableDirective } from '@progress/kendo-angular-common';
23
- import * as i0 from "@angular/core";
24
- import * as i1 from "../data-binding/pivotgrid-data.service";
25
- import * as i2 from "@progress/kendo-angular-l10n";
26
- import * as i3 from "./configurator.service";
27
- /**
28
- * @hidden
29
- * Represents the Kendo UI PivotGrid Configurator component for Angular.
30
- */
31
- export class PivotGridConfiguratorComponent {
32
- dataService;
33
- localization;
34
- configuratorService;
35
- cdr;
36
- zone;
37
- hostClass = true;
38
- hostAriaRole = 'dialog';
39
- get headerTextId() {
40
- return `k-pivotgrid-${this.dataService.pivotGridId}-configurator-header`;
41
- }
42
- orientation = 'vertical';
43
- sort = new Array();
44
- filter;
45
- navigation;
46
- close = new EventEmitter();
47
- treeView;
48
- columnsList;
49
- rowsList;
50
- originalState;
51
- state;
52
- fields;
53
- checked = [];
54
- get isHorizontal() {
55
- return this.orientation === 'horizontal';
56
- }
57
- get isApplyDisabled() {
58
- return !this.state?.columnAxes?.length && !this.state?.rowAxes?.length && !this.state?.measureAxes?.length;
59
- }
60
- subs = new Subscription();
61
- /**
62
- * A function which determines if a specific node has child nodes.
63
- */
64
- hasChildren = (node) => !('hierarchyUniqueName' in node) && !('aggregator' in node);
65
- constructor(dataService, localization, configuratorService, cdr, zone) {
66
- this.dataService = dataService;
67
- this.localization = localization;
68
- this.configuratorService = configuratorService;
69
- this.cdr = cdr;
70
- this.zone = zone;
71
- this.configuratorService.configuratorInstance = this;
72
- }
73
- ngOnInit() {
74
- this.subs.add(this.dataService.fields
75
- .subscribe(res => {
76
- const measures = res.find(f => f.caption === 'Measures' && f.uniqueName === '[Measures]');
77
- if (measures) {
78
- measures.caption = this.messageFor('configuratorMeasuresText') || 'Measures';
79
- }
80
- this.fields = res;
81
- }));
82
- this.subs.add(this.dataService.configuredFields
83
- .subscribe(res => {
84
- const normalizedState = clone({ ...this.dataService.state, dragItem: res.dragItem, dropTarget: res.dropTarget, dropZone: res.dropZone, dropDirection: res.dropDirection });
85
- this.originalState = normalizedState;
86
- this.setState(normalizedState);
87
- this.setChecked();
88
- }));
89
- this.subs.add(this.configuratorService.configuratorStateChange
90
- .subscribe(res => {
91
- this.state = res;
92
- this.dataService.state = {
93
- columnAxes: res.columnAxes,
94
- rowAxes: res.rowAxes,
95
- measureAxes: res.measureAxes,
96
- sort: res.sort,
97
- filter: res.filter
98
- };
99
- this.cdr.detectChanges();
100
- }));
101
- }
102
- ngAfterViewInit() {
103
- this.treeView.focus();
104
- }
105
- ngOnDestroy() {
106
- this.subs.unsubscribe();
107
- }
108
- ngOnChanges(changes) {
109
- if (changes['orientation']) {
110
- this.configuratorService.orientation = this.orientation;
111
- }
112
- }
113
- getName(name) {
114
- return name.toString();
115
- }
116
- contentLabelId(section) {
117
- return `k-pivotgrid-${this.dataService.pivotGridId}-configurator-${section}`;
118
- }
119
- setState(state) {
120
- this.dataService.state = {
121
- columnAxes: state.columnAxes,
122
- rowAxes: state.rowAxes,
123
- measureAxes: state.measureAxes,
124
- sort: state.sort,
125
- filter: state.filter
126
- };
127
- this.state = this.configuratorService.state = state;
128
- this.cdr.detectChanges();
129
- }
130
- onReorder(ev, name, item) {
131
- const currentCollection = this.state[`${name}Axes`];
132
- const itemIndex = currentCollection.indexOf(item);
133
- switch (ev.direction) {
134
- case 'right':
135
- if (itemIndex !== currentCollection.length - 1) {
136
- this.swapChips(currentCollection, itemIndex, ev.direction, name);
137
- }
138
- break;
139
- case 'left':
140
- if (itemIndex !== 0) {
141
- this.swapChips(currentCollection, itemIndex, ev.direction, name);
142
- ev.sender.focus();
143
- }
144
- break;
145
- case 'up':
146
- if (name === 'row') {
147
- this.moveChip(currentCollection, item, itemIndex, name);
148
- }
149
- break;
150
- case 'down':
151
- if (name === 'column') {
152
- this.moveChip(currentCollection, item, itemIndex, name);
153
- }
154
- break;
155
- default:
156
- break;
157
- }
158
- }
159
- /**
160
- * Returns the localized message for a given token
161
- */
162
- messageFor(localizationToken) {
163
- return this.localization.get(localizationToken);
164
- }
165
- /**
166
- * Retrieves the 'Columns' section item names
167
- */
168
- get columnHierarchies() {
169
- return this.extractDefaultFields(this.dataService.state.columnAxes);
170
- }
171
- /**
172
- * Retrieves the 'Rows' section item names
173
- */
174
- get rowHierarchies() {
175
- return this.extractDefaultFields(this.dataService.state.rowAxes);
176
- }
177
- /**
178
- * Retrieves the 'Value' section item names
179
- */
180
- get measureHierarchies() {
181
- return this.extractDefaultFields(this.dataService.state.measureAxes);
182
- }
183
- /**
184
- * Updates the respective axis configuration of the current state
185
- * when a chip is deleted from the UI
186
- */
187
- onChipRemove(ev, item, section) {
188
- const filteredItems = this.dataService.state[`${section}Axes`].filter(descriptor => descriptor !== item);
189
- this.dataService.state[`${section}Axes`] = filteredItems;
190
- const newState = { ...this.state, ...this.dataService.state };
191
- this.checked = this.checked.filter(checkedItem => checkedItem.uniqueName !== item.name[0]);
192
- const targetIndex = this.navigation?.elements.indexOf(ev.sender.element.nativeElement);
193
- this.setState(newState);
194
- if (!this.navigation) {
195
- return;
196
- }
197
- this.zone.runOutsideAngular(() => setTimeout(() => this.navigation.focusElement(this.navigation.elements[targetIndex - 1], this.navigation.elements[targetIndex])));
198
- }
199
- /**
200
- * Constructs an array with all selected fields.
201
- * @param fields - used for when child nodes are loaded on demand.
202
- * Child nodes are concatinated to the root level nodes.
203
- */
204
- setChecked(fields = []) {
205
- const allFields = [...this.fields, ...fields];
206
- const checked = this.getFieldsFlatMap(allFields).filter((f) => [
207
- ...this.columnHierarchies,
208
- ...this.rowHierarchies,
209
- ...this.measureHierarchies
210
- ].some((h) => (h === f.uniqueName || h === f.defaultHierarchy)));
211
- this.checked = checked;
212
- }
213
- checkItemBy = (context) => {
214
- return context.dataItem;
215
- };
216
- /**
217
- * Determines if a checkbox should be rendered.
218
- */
219
- isSelectable(node) {
220
- const hasChildren = !('hierarchyUniqueName' in node) && !('aggregator' in node);
221
- return !((!hasChildren && !node.aggregator && !node.measure)
222
- || (node.type === 2)
223
- || node.uniqueName === '[KPIs]');
224
- }
225
- /**
226
- * A function which provides the child nodes for a given parent node.
227
- */
228
- children = (node) => {
229
- if (this.dataService.directive?.type === 'olap') {
230
- const observable = from(this.dataService.directive?.fetchChildren(node, this.fields));
231
- return observable.pipe(mergeMap(value => of(value)));
232
- }
233
- return of(node.children);
234
- };
235
- /**
236
- * Check if the newly loaded child nodes have checked items.
237
- * (Only for OLAP data-binding directive)
238
- */
239
- handleChildrenLoaded(event) {
240
- if (this.dataService.directive?.type === 'local') {
241
- return;
242
- }
243
- const fields = event.children.map(item => item.dataItem);
244
- this.setChecked(fields);
245
- }
246
- handleCheckedChange(event) {
247
- const itemIndex = this.checked.findIndex(checkedItem => checkedItem.uniqueName === event.item.dataItem.uniqueName);
248
- this.checked.splice(itemIndex, 1);
249
- const action = {
250
- type: 'PIVOT_CONFIGURATOR_ACTION_TOGGLE_SELECTION',
251
- payload: event.item.dataItem
252
- };
253
- this.configuratorService.parseConfiguratorState(action);
254
- }
255
- onTreeViewSelect(ev) {
256
- const closestItem = ev.target.closest('.k-treeview-item');
257
- if (closestItem) {
258
- closestItem.querySelector('.k-checkbox')?.click();
259
- }
260
- }
261
- onTreeViewEscape(ev) {
262
- ev.stopImmediatePropagation();
263
- this.close.emit();
264
- }
265
- handleSubmit() {
266
- if (this.isApplyDisabled) {
267
- return;
268
- }
269
- this.dataService.configuratorFieldChange.emit(this.dataService.state);
270
- }
271
- /**
272
- * Reset the configurator to the last saved state
273
- */
274
- handleReset() {
275
- this.setState(clone(this.originalState));
276
- this.setChecked();
277
- }
278
- /**
279
- * Flattens all available fields.
280
- */
281
- getFieldsFlatMap(nodes = []) {
282
- let result = [...nodes];
283
- (nodes || []).forEach((child) => {
284
- result = result.concat(this.getFieldsFlatMap(child.children));
285
- });
286
- return result;
287
- }
288
- /**
289
- * Creates an array containing only the field names, e.g. '[Date].[Calendar]' or 'Product'
290
- */
291
- extractDefaultFields(columns = []) {
292
- const result = new Set();
293
- columns.forEach((column) => {
294
- result.add(String(column.name));
295
- });
296
- return Array.from(result);
297
- }
298
- /**
299
- * Swaps chips within the same ChipList
300
- */
301
- swapChips(collection, itemIndex, direction, name) {
302
- const targetIndex = itemIndex + (direction === 'right' ? 1 : -1);
303
- swapItems(collection, itemIndex, targetIndex);
304
- this.dataService.state[`${name}Axes`] = collection;
305
- const newState = { ...this.state, ...this.dataService.state };
306
- this.setState(newState);
307
- this.cdr.detectChanges();
308
- }
309
- /**
310
- * Moves a chip from one ChipList to another
311
- */
312
- moveChip(collection, item, itemIndex, name) {
313
- collection.splice(itemIndex, 1);
314
- const targetCollectionName = name === 'row' ? 'column' : 'row';
315
- const axes = this.state[`${targetCollectionName}Axes`];
316
- axes.push(item);
317
- this.dataService.state[`${name}Axes`] = collection;
318
- this.dataService.state[targetCollectionName] = axes;
319
- const newState = { ...this.state, ...this.dataService.state };
320
- this.setState(newState);
321
- this.cdr.detectChanges();
322
- this[`${targetCollectionName}sList`]?.chips.last.focus();
323
- }
324
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: PivotGridConfiguratorComponent, deps: [{ token: i1.PivotGridDataService }, { token: i2.LocalizationService }, { token: i3.ConfiguratorService }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
325
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: PivotGridConfiguratorComponent, isStandalone: true, selector: "kendo-pivotgrid-configurator", inputs: { orientation: "orientation", sort: "sort", filter: "filter", navigation: "navigation" }, outputs: { close: "close" }, host: { properties: { "class.k-pivotgrid-configurator": "this.hostClass", "attr.role": "this.hostAriaRole", "attr.aria-labelledby": "this.headerTextId" } }, providers: [
326
- ConfiguratorService,
327
- DropCueService,
328
- SinglePopupService
329
- ], viewQueries: [{ propertyName: "treeView", first: true, predicate: TreeViewComponent, descendants: true }, { propertyName: "columnsList", first: true, predicate: ["columnsChiplist"], descendants: true }, { propertyName: "rowsList", first: true, predicate: ["rowsChiplist"], descendants: true }], usesOnChanges: true, ngImport: i0, template: `
330
- <div
331
- class="k-pivotgrid-configurator-panel k-pivotgrid-configurator-push"
332
- [ngClass]="{
333
- 'k-pivotgrid-configurator-horizontal': isHorizontal,
334
- 'k-pivotgrid-configurator-vertical': !isHorizontal
335
- }"
336
- >
337
- <div class="k-pivotgrid-configurator-header">
338
- <div
339
- [id]="headerTextId"
340
- class="k-pivotgrid-configurator-header-text">{{messageFor('configuratorHeaderText')}}</div>
341
- </div>
342
-
343
- <div class="k-pivotgrid-configurator-content">
344
- <div class="k-form k-form-md" [class.k-form-horizontal]="isHorizontal" [class.k-form-vertical]="!isHorizontal" role="form">
345
- <div class="k-form-field-wrapper" [ngStyle]="isHorizontal ? {'padding-left': 0 } : null">
346
- <div class="k-form-field" [style]="'padding-top: 1em; margin-top: 0;'" [ngStyle]="isHorizontal ? {'padding-top': 0, 'padding-left': '16px' } : null">
347
- <span [id]="contentLabelId('fields')" class="k-label">{{messageFor('configuratorFieldsText')}}</span>
348
- </div>
349
- <div class="k-form-field" [style]="'padding-top: 1em; margin-top: 0;'" [ngStyle]="isHorizontal ? {'padding-top': 0, 'padding-left': '16px' } : null">
350
- <div class="k-fields-list-wrapper">
351
- <kendo-treeview
352
- #treeview
353
- [attr.aria-labelledby]="headerTextId + ' ' + contentLabelId('fields')"
354
- (focus)="treeview.focus()"
355
- [nodes]="fields"
356
- textField="caption"
357
- [children]="children"
358
- [hasChildren]="hasChildren"
359
- kendoTreeViewCheckable
360
- [hasCheckbox]="isSelectable"
361
- [(checkedKeys)]="checked"
362
- [checkBy]="checkItemBy"
363
- (checkedChange)="handleCheckedChange($event)"
364
- kendoTreeViewExpandable
365
- (childrenLoaded)="handleChildrenLoaded($event)"
366
- (keydown.space)="onTreeViewSelect($event)">
367
- </kendo-treeview>
368
-
369
- </div>
370
- </div>
371
- </div>
372
-
373
- @if (isHorizontal) {
374
- <div class="k-form-field-wrapper" [ngStyle]="isHorizontal ? {'padding-left': 0 } : null">
375
- <ng-container *ngTemplateOutlet="verticalTemplate"></ng-container>
376
- </div>
377
- } @else {
378
- <ng-container *ngTemplateOutlet="verticalTemplate"></ng-container>
379
- }
380
-
381
- <ng-template #verticalTemplate>
382
- <div class="k-form-field" kendoDropTarget axes="columnAxes" [style]="'padding-top: 1em; margin-top: 0;'" [ngStyle]="isHorizontal ? {'padding-top': 0, 'padding-left': '16px' } : null">
383
- <span [id]="contentLabelId('columns')" class="k-label">{{messageFor('configuratorColumnsText')}}</span>
384
- </div>
385
-
386
- @if (state.columnAxes && state.columnAxes.length) {
387
- <kendo-chiplist
388
- [navigable]="false"
389
- #columnsChiplist
390
- kendoDropTarget
391
- class="k-column-fields"
392
- axes="columnAxes"
393
- [style.width.%]="100"
394
- [attr.aria-labelledby]="headerTextId + ' ' + contentLabelId('columns')"
395
- [ngStyle]="isHorizontal ? {'padding-top': 0, 'padding-left': '16px' } : null"
396
- >
397
- @for (item of state.columnAxes; track item.name) {
398
- @if (item.name.length === 1) {
399
- <kendo-chip
400
- #chip
401
- kendoChipDraggable
402
- kendoDraggable
403
- kendoDropTarget
404
- kendoChipKeyboardNavigation
405
- [item]="item"
406
- [label]="getName(item.name)"
407
- axes="columnAxes"
408
- [removable]="true"
409
- [hasMenu]="true"
410
- (menuToggle)="chipMenuColumns.toggle($event)"
411
- (remove)="onChipRemove($event, item, 'column')"
412
- (reorder)="onReorder($event, 'column', item)"
413
- >
414
- <kendo-pivot-chip-menu
415
- #chipMenuColumns
416
- [chip]="item"
417
- [anchor]="chip"
418
- ></kendo-pivot-chip-menu>
419
- </kendo-chip>
420
- }
421
- }
422
- </kendo-chiplist>
423
- } @else {
424
- <div class="k-settings-description" kendoDropTarget axes="columnAxes">{{messageFor('configuratorEmptyColumnsText')}}</div>
425
- }
426
-
427
- <ng-template #noColumnAxes>
428
- <div class="k-settings-description" kendoDropTarget axes="columnAxes">{{messageFor('configuratorEmptyColumnsText')}}</div>
429
- </ng-template>
430
-
431
- <div class="k-form-field" kendoDropTarget axes="rowAxes" [style]="'padding-top: 1em; margin-top: 0;'" [ngStyle]="isHorizontal ? {'padding-top': 0, 'padding-left': '16px' } : null">
432
- <span [id]="contentLabelId('rows')" class="k-label">{{messageFor('configuratorRowsText')}}</span>
433
- </div>
434
-
435
- @if (state.rowAxes && state.rowAxes.length) {
436
- <kendo-chiplist
437
- [navigable]="false"
438
- #rowsChiplist
439
- kendoDropTarget
440
- class="k-row-fields"
441
- axes="rowAxes"
442
- [attr.aria-labelledby]="headerTextId + ' ' + contentLabelId('rows')"
443
- [ngStyle]="isHorizontal ? {'padding-top': 0, 'padding-left': '16px' } : null"
444
- [style.width.%]="100"
445
- >
446
- @for (item of state.rowAxes; track item.name) {
447
- @if (item.name.length === 1) {
448
- <kendo-chip
449
- #chip
450
- kendoChipDraggable
451
- kendoDraggable
452
- kendoDropTarget
453
- kendoChipKeyboardNavigation
454
- [item]="item"
455
- [label]="getName(item.name)"
456
- axes="rowAxes"
457
- [removable]="true"
458
- [hasMenu]="true"
459
- (menuToggle)="chipMenuRows.toggle($event)"
460
- (remove)="onChipRemove($event, item, 'row')"
461
- (reorder)="onReorder($event, 'row', item)"
462
- >
463
- <kendo-pivot-chip-menu
464
- #chipMenuRows
465
- [chip]="item"
466
- [anchor]="chip"
467
- ></kendo-pivot-chip-menu>
468
- </kendo-chip>
469
- }
470
- }
471
- </kendo-chiplist>
472
- } @else {
473
- <div class="k-settings-description" kendoDropTarget axes="rowAxes">{{messageFor('configuratorEmptyRowsText')}}</div>
474
- }
475
-
476
- <ng-template #noRowAxes>
477
- <div class="k-settings-description" kendoDropTarget axes="rowAxes">{{messageFor('configuratorEmptyRowsText')}}</div>
478
- </ng-template>
479
- </ng-template>
480
-
481
- @if (isHorizontal) {
482
- <div class="k-form-field-wrapper" [ngStyle]="isHorizontal ? {'padding-left': 0 } : null" >
483
- <ng-container *ngTemplateOutlet="verticalMeasuresTemplate"></ng-container>
484
- </div>
485
- } @else {
486
- <ng-container *ngTemplateOutlet="verticalMeasuresTemplate"></ng-container>
487
- }
488
-
489
- <ng-template #verticalMeasuresTemplate>
490
- <div class="k-form-field" kendoDropTarget axes="measureAxes" [style]="'padding-top: 1em; margin-top: 0;'" [ngStyle]="isHorizontal ? {'padding-top': 0, 'padding-left': '16px' } : null">
491
- <span [id]="contentLabelId('values')" class="k-label">{{messageFor('configuratorValuesText')}}</span>
492
- </div>
493
-
494
- @if (state.measureAxes && state.measureAxes.length) {
495
- <kendo-chiplist
496
- [navigable]="false"
497
- kendoDropTarget
498
- class="k-filter-fields"
499
- axes="measureAxes"
500
- [attr.aria-labelledby]="headerTextId + ' ' + contentLabelId('values')"
501
- [ngStyle]="isHorizontal ? {'padding-top': 0, 'padding-left': '16px' } : null"
502
- [style.width.%]="100"
503
- >
504
- @for (item of state.measureAxes; track item.name) {
505
- <kendo-chip
506
- #chip
507
- kendoChipDraggable
508
- kendoDraggable
509
- kendoDropTarget
510
- kendoChipKeyboardNavigation
511
- [item]="item"
512
- [label]="getName(item.name)"
513
- axes="measureAxes"
514
- [removable]="true"
515
- [hasMenu]="true"
516
- (menuToggle)="chipMenuValues.toggle($event)"
517
- (remove)="onChipRemove($event, item, 'measure')"
518
- (reorder)="onReorder($event, 'measure', item)"
519
- >
520
- <kendo-pivot-chip-menu
521
- #chipMenuValues
522
- [chip]="item"
523
- [anchor]="chip"
524
- ></kendo-pivot-chip-menu>
525
- </kendo-chip>
526
- }
527
- </kendo-chiplist>
528
- } @else {
529
- <div class="k-settings-description" kendoDropTarget axes="measureAxes">{{messageFor('configuratorEmptyMeasuresText')}}</div>
530
- }
531
-
532
- <ng-template #noMeasureAxes>
533
- <div class="k-settings-description" kendoDropTarget axes="measureAxes">{{messageFor('configuratorEmptyMeasuresText')}}</div>
534
- </ng-template>
535
- </ng-template>
536
-
537
- </div>
538
- </div>
539
- <div class="k-pivotgrid-configurator-actions k-actions k-actions-end k-actions-horizontal">
540
- <button kendoButton type="button" (click)="handleReset()">{{messageFor('configuratorCancelButtonText')}}</button>
541
- <button kendoButton themeColor="primary" type="button" (click)="handleSubmit()" [disabled]="isApplyDisabled">{{messageFor('configuratorApplyButtonText')}}</button>
542
- </div>
543
- </div>
544
- `, isInline: true, dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: TreeViewComponent, selector: "kendo-treeview", inputs: ["filterInputPlaceholder", "expandDisabledNodes", "animate", "nodeTemplate", "loadMoreButtonTemplate", "trackBy", "nodes", "textField", "hasChildren", "isChecked", "isDisabled", "hasCheckbox", "isExpanded", "isSelected", "isVisible", "navigable", "children", "loadOnDemand", "filterable", "filter", "size", "disableParentNodesOnly"], outputs: ["childrenLoaded", "blur", "focus", "expand", "collapse", "nodeDragStart", "nodeDrag", "filterStateChange", "nodeDrop", "nodeDragEnd", "addItem", "removeItem", "checkedChange", "selectionChange", "filterChange", "nodeClick", "nodeDblClick"], exportAs: ["kendoTreeView"] }, { kind: "directive", type: ExpandDirective, selector: "[kendoTreeViewExpandable]", inputs: ["isExpanded", "expandBy", "expandOnFilter", "expandedKeys"], outputs: ["expandedKeysChange"] }, { kind: "directive", type: CheckDirective, selector: "[kendoTreeViewCheckable]", inputs: ["isChecked", "checkBy", "checkedKeys", "kendoTreeViewCheckable"], outputs: ["checkedKeysChange"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: DropTargetDirective, selector: "[kendoDropTarget]", inputs: ["item", "axes"] }, { kind: "component", type: ChipListComponent, selector: "kendo-chiplist, kendo-chip-list", inputs: ["orientation", "selection", "size", "role", "navigable"], outputs: ["selectedChange", "remove"] }, { kind: "component", type: ChipComponent, selector: "kendo-chip", inputs: ["label", "icon", "svgIcon", "iconClass", "avatarSettings", "selected", "removable", "removeIcon", "removeSvgIcon", "hasMenu", "menuIcon", "menuSvgIcon", "disabled", "size", "rounded", "fillMode", "themeColor"], outputs: ["remove", "menuToggle", "contentClick"] }, { kind: "directive", type: DraggableChipDirective, selector: "[kendoChipDraggable]", inputs: ["item"] }, { kind: "directive", type: DraggableDirective, selector: "[kendoDraggable]", inputs: ["enableDrag"], outputs: ["kendoPress", "kendoDrag", "kendoRelease"] }, { kind: "directive", type: ChipKeyboardNavigationDirective, selector: "[kendoChipKeyboardNavigation]", outputs: ["reorder"] }, { kind: "component", type: ChipMenuComponent, selector: "kendo-pivot-chip-menu", inputs: ["chip", "tabIndex", "isMeasureField", "anchor"] }, { 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"] }] });
545
- }
546
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: PivotGridConfiguratorComponent, decorators: [{
547
- type: Component,
548
- args: [{
549
- selector: 'kendo-pivotgrid-configurator',
550
- providers: [
551
- ConfiguratorService,
552
- DropCueService,
553
- SinglePopupService
554
- ],
555
- template: `
556
- <div
557
- class="k-pivotgrid-configurator-panel k-pivotgrid-configurator-push"
558
- [ngClass]="{
559
- 'k-pivotgrid-configurator-horizontal': isHorizontal,
560
- 'k-pivotgrid-configurator-vertical': !isHorizontal
561
- }"
562
- >
563
- <div class="k-pivotgrid-configurator-header">
564
- <div
565
- [id]="headerTextId"
566
- class="k-pivotgrid-configurator-header-text">{{messageFor('configuratorHeaderText')}}</div>
567
- </div>
568
-
569
- <div class="k-pivotgrid-configurator-content">
570
- <div class="k-form k-form-md" [class.k-form-horizontal]="isHorizontal" [class.k-form-vertical]="!isHorizontal" role="form">
571
- <div class="k-form-field-wrapper" [ngStyle]="isHorizontal ? {'padding-left': 0 } : null">
572
- <div class="k-form-field" [style]="'padding-top: 1em; margin-top: 0;'" [ngStyle]="isHorizontal ? {'padding-top': 0, 'padding-left': '16px' } : null">
573
- <span [id]="contentLabelId('fields')" class="k-label">{{messageFor('configuratorFieldsText')}}</span>
574
- </div>
575
- <div class="k-form-field" [style]="'padding-top: 1em; margin-top: 0;'" [ngStyle]="isHorizontal ? {'padding-top': 0, 'padding-left': '16px' } : null">
576
- <div class="k-fields-list-wrapper">
577
- <kendo-treeview
578
- #treeview
579
- [attr.aria-labelledby]="headerTextId + ' ' + contentLabelId('fields')"
580
- (focus)="treeview.focus()"
581
- [nodes]="fields"
582
- textField="caption"
583
- [children]="children"
584
- [hasChildren]="hasChildren"
585
- kendoTreeViewCheckable
586
- [hasCheckbox]="isSelectable"
587
- [(checkedKeys)]="checked"
588
- [checkBy]="checkItemBy"
589
- (checkedChange)="handleCheckedChange($event)"
590
- kendoTreeViewExpandable
591
- (childrenLoaded)="handleChildrenLoaded($event)"
592
- (keydown.space)="onTreeViewSelect($event)">
593
- </kendo-treeview>
594
-
595
- </div>
596
- </div>
597
- </div>
598
-
599
- @if (isHorizontal) {
600
- <div class="k-form-field-wrapper" [ngStyle]="isHorizontal ? {'padding-left': 0 } : null">
601
- <ng-container *ngTemplateOutlet="verticalTemplate"></ng-container>
602
- </div>
603
- } @else {
604
- <ng-container *ngTemplateOutlet="verticalTemplate"></ng-container>
605
- }
606
-
607
- <ng-template #verticalTemplate>
608
- <div class="k-form-field" kendoDropTarget axes="columnAxes" [style]="'padding-top: 1em; margin-top: 0;'" [ngStyle]="isHorizontal ? {'padding-top': 0, 'padding-left': '16px' } : null">
609
- <span [id]="contentLabelId('columns')" class="k-label">{{messageFor('configuratorColumnsText')}}</span>
610
- </div>
611
-
612
- @if (state.columnAxes && state.columnAxes.length) {
613
- <kendo-chiplist
614
- [navigable]="false"
615
- #columnsChiplist
616
- kendoDropTarget
617
- class="k-column-fields"
618
- axes="columnAxes"
619
- [style.width.%]="100"
620
- [attr.aria-labelledby]="headerTextId + ' ' + contentLabelId('columns')"
621
- [ngStyle]="isHorizontal ? {'padding-top': 0, 'padding-left': '16px' } : null"
622
- >
623
- @for (item of state.columnAxes; track item.name) {
624
- @if (item.name.length === 1) {
625
- <kendo-chip
626
- #chip
627
- kendoChipDraggable
628
- kendoDraggable
629
- kendoDropTarget
630
- kendoChipKeyboardNavigation
631
- [item]="item"
632
- [label]="getName(item.name)"
633
- axes="columnAxes"
634
- [removable]="true"
635
- [hasMenu]="true"
636
- (menuToggle)="chipMenuColumns.toggle($event)"
637
- (remove)="onChipRemove($event, item, 'column')"
638
- (reorder)="onReorder($event, 'column', item)"
639
- >
640
- <kendo-pivot-chip-menu
641
- #chipMenuColumns
642
- [chip]="item"
643
- [anchor]="chip"
644
- ></kendo-pivot-chip-menu>
645
- </kendo-chip>
646
- }
647
- }
648
- </kendo-chiplist>
649
- } @else {
650
- <div class="k-settings-description" kendoDropTarget axes="columnAxes">{{messageFor('configuratorEmptyColumnsText')}}</div>
651
- }
652
-
653
- <ng-template #noColumnAxes>
654
- <div class="k-settings-description" kendoDropTarget axes="columnAxes">{{messageFor('configuratorEmptyColumnsText')}}</div>
655
- </ng-template>
656
-
657
- <div class="k-form-field" kendoDropTarget axes="rowAxes" [style]="'padding-top: 1em; margin-top: 0;'" [ngStyle]="isHorizontal ? {'padding-top': 0, 'padding-left': '16px' } : null">
658
- <span [id]="contentLabelId('rows')" class="k-label">{{messageFor('configuratorRowsText')}}</span>
659
- </div>
660
-
661
- @if (state.rowAxes && state.rowAxes.length) {
662
- <kendo-chiplist
663
- [navigable]="false"
664
- #rowsChiplist
665
- kendoDropTarget
666
- class="k-row-fields"
667
- axes="rowAxes"
668
- [attr.aria-labelledby]="headerTextId + ' ' + contentLabelId('rows')"
669
- [ngStyle]="isHorizontal ? {'padding-top': 0, 'padding-left': '16px' } : null"
670
- [style.width.%]="100"
671
- >
672
- @for (item of state.rowAxes; track item.name) {
673
- @if (item.name.length === 1) {
674
- <kendo-chip
675
- #chip
676
- kendoChipDraggable
677
- kendoDraggable
678
- kendoDropTarget
679
- kendoChipKeyboardNavigation
680
- [item]="item"
681
- [label]="getName(item.name)"
682
- axes="rowAxes"
683
- [removable]="true"
684
- [hasMenu]="true"
685
- (menuToggle)="chipMenuRows.toggle($event)"
686
- (remove)="onChipRemove($event, item, 'row')"
687
- (reorder)="onReorder($event, 'row', item)"
688
- >
689
- <kendo-pivot-chip-menu
690
- #chipMenuRows
691
- [chip]="item"
692
- [anchor]="chip"
693
- ></kendo-pivot-chip-menu>
694
- </kendo-chip>
695
- }
696
- }
697
- </kendo-chiplist>
698
- } @else {
699
- <div class="k-settings-description" kendoDropTarget axes="rowAxes">{{messageFor('configuratorEmptyRowsText')}}</div>
700
- }
701
-
702
- <ng-template #noRowAxes>
703
- <div class="k-settings-description" kendoDropTarget axes="rowAxes">{{messageFor('configuratorEmptyRowsText')}}</div>
704
- </ng-template>
705
- </ng-template>
706
-
707
- @if (isHorizontal) {
708
- <div class="k-form-field-wrapper" [ngStyle]="isHorizontal ? {'padding-left': 0 } : null" >
709
- <ng-container *ngTemplateOutlet="verticalMeasuresTemplate"></ng-container>
710
- </div>
711
- } @else {
712
- <ng-container *ngTemplateOutlet="verticalMeasuresTemplate"></ng-container>
713
- }
714
-
715
- <ng-template #verticalMeasuresTemplate>
716
- <div class="k-form-field" kendoDropTarget axes="measureAxes" [style]="'padding-top: 1em; margin-top: 0;'" [ngStyle]="isHorizontal ? {'padding-top': 0, 'padding-left': '16px' } : null">
717
- <span [id]="contentLabelId('values')" class="k-label">{{messageFor('configuratorValuesText')}}</span>
718
- </div>
719
-
720
- @if (state.measureAxes && state.measureAxes.length) {
721
- <kendo-chiplist
722
- [navigable]="false"
723
- kendoDropTarget
724
- class="k-filter-fields"
725
- axes="measureAxes"
726
- [attr.aria-labelledby]="headerTextId + ' ' + contentLabelId('values')"
727
- [ngStyle]="isHorizontal ? {'padding-top': 0, 'padding-left': '16px' } : null"
728
- [style.width.%]="100"
729
- >
730
- @for (item of state.measureAxes; track item.name) {
731
- <kendo-chip
732
- #chip
733
- kendoChipDraggable
734
- kendoDraggable
735
- kendoDropTarget
736
- kendoChipKeyboardNavigation
737
- [item]="item"
738
- [label]="getName(item.name)"
739
- axes="measureAxes"
740
- [removable]="true"
741
- [hasMenu]="true"
742
- (menuToggle)="chipMenuValues.toggle($event)"
743
- (remove)="onChipRemove($event, item, 'measure')"
744
- (reorder)="onReorder($event, 'measure', item)"
745
- >
746
- <kendo-pivot-chip-menu
747
- #chipMenuValues
748
- [chip]="item"
749
- [anchor]="chip"
750
- ></kendo-pivot-chip-menu>
751
- </kendo-chip>
752
- }
753
- </kendo-chiplist>
754
- } @else {
755
- <div class="k-settings-description" kendoDropTarget axes="measureAxes">{{messageFor('configuratorEmptyMeasuresText')}}</div>
756
- }
757
-
758
- <ng-template #noMeasureAxes>
759
- <div class="k-settings-description" kendoDropTarget axes="measureAxes">{{messageFor('configuratorEmptyMeasuresText')}}</div>
760
- </ng-template>
761
- </ng-template>
762
-
763
- </div>
764
- </div>
765
- <div class="k-pivotgrid-configurator-actions k-actions k-actions-end k-actions-horizontal">
766
- <button kendoButton type="button" (click)="handleReset()">{{messageFor('configuratorCancelButtonText')}}</button>
767
- <button kendoButton themeColor="primary" type="button" (click)="handleSubmit()" [disabled]="isApplyDisabled">{{messageFor('configuratorApplyButtonText')}}</button>
768
- </div>
769
- </div>
770
- `,
771
- standalone: true,
772
- imports: [
773
- NgClass, NgStyle, TreeViewComponent, ExpandDirective, CheckDirective,
774
- NgTemplateOutlet, DropTargetDirective, ChipListComponent, ChipComponent, DraggableChipDirective,
775
- DraggableDirective, ChipKeyboardNavigationDirective, ChipMenuComponent, ButtonComponent
776
- ]
777
- }]
778
- }], ctorParameters: () => [{ type: i1.PivotGridDataService }, { type: i2.LocalizationService }, { type: i3.ConfiguratorService }, { type: i0.ChangeDetectorRef }, { type: i0.NgZone }], propDecorators: { hostClass: [{
779
- type: HostBinding,
780
- args: ['class.k-pivotgrid-configurator']
781
- }], hostAriaRole: [{
782
- type: HostBinding,
783
- args: ['attr.role']
784
- }], headerTextId: [{
785
- type: HostBinding,
786
- args: ['attr.aria-labelledby']
787
- }], orientation: [{
788
- type: Input
789
- }], sort: [{
790
- type: Input
791
- }], filter: [{
792
- type: Input
793
- }], navigation: [{
794
- type: Input
795
- }], close: [{
796
- type: Output
797
- }], treeView: [{
798
- type: ViewChild,
799
- args: [TreeViewComponent]
800
- }], columnsList: [{
801
- type: ViewChild,
802
- args: ['columnsChiplist']
803
- }], rowsList: [{
804
- type: ViewChild,
805
- args: ['rowsChiplist']
806
- }] } });