@progress/kendo-angular-pivotgrid 17.0.0-develop.4 → 17.0.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/README.md +37 -15
- package/configurator/chip-menu/chip-menu-filter.component.d.ts +1 -1
- package/configurator/chip-menu/chip-menu-item-base.d.ts +1 -1
- package/configurator/chip-menu/chip-menu-item.component.d.ts +1 -1
- package/configurator/chip-menu/chip-menu-item.directive.d.ts +1 -1
- package/configurator/chip-menu/chip-menu-reorder.component.d.ts +1 -1
- package/configurator/chip-menu/chip-menu-sort.component.d.ts +1 -1
- package/configurator/chip-menu/chip-menu.component.d.ts +6 -4
- package/configurator/chip-menu/filtering/filter-menu-container.component.d.ts +1 -1
- package/configurator/chip-menu/filtering/filter-menu-dropdownlist.directive.d.ts +1 -1
- package/configurator/chip-menu/filtering/string-filter-menu.component.d.ts +3 -3
- package/configurator/configurator.component.d.ts +3 -6
- package/configurator/draggable.directive.d.ts +4 -5
- package/configurator/drop-target.directive.d.ts +1 -1
- package/data-binding/base-binding-directive.d.ts +1 -1
- package/data-binding/local-binding.directive.d.ts +1 -1
- package/data-binding/olap-binding.directive.d.ts +1 -1
- package/{esm2020 → esm2022}/configurator/chip-kb-nav.directive.mjs +8 -5
- package/{esm2020 → esm2022}/configurator/chip-menu/chip-menu-container.component.mjs +8 -5
- package/{esm2020 → esm2022}/configurator/chip-menu/chip-menu-filter.component.mjs +25 -19
- package/{esm2020 → esm2022}/configurator/chip-menu/chip-menu-item-base.mjs +9 -6
- package/{esm2020 → esm2022}/configurator/chip-menu/chip-menu-item-content-template.directive.mjs +4 -3
- package/{esm2020 → esm2022}/configurator/chip-menu/chip-menu-item.component.mjs +65 -40
- package/{esm2020 → esm2022}/configurator/chip-menu/chip-menu-item.directive.mjs +35 -28
- package/{esm2020 → esm2022}/configurator/chip-menu/chip-menu-reorder.component.mjs +27 -19
- package/{esm2020 → esm2022}/configurator/chip-menu/chip-menu-sort.component.mjs +10 -6
- package/{esm2020 → esm2022}/configurator/chip-menu/chip-menu.component.mjs +36 -39
- package/{esm2020 → esm2022}/configurator/chip-menu/chip-menu.service.mjs +12 -10
- package/{esm2020 → esm2022}/configurator/chip-menu/filtering/filter-menu-container.component.mjs +22 -9
- package/{esm2020 → esm2022}/configurator/chip-menu/filtering/filter-menu-dropdownlist.directive.mjs +11 -9
- package/{esm2020 → esm2022}/configurator/chip-menu/filtering/menu-tabbing.service.mjs +7 -6
- package/{esm2020 → esm2022}/configurator/chip-menu/filtering/string-filter-menu.component.mjs +25 -15
- package/{esm2020 → esm2022}/configurator/chip-menu/single-popup.service.mjs +21 -10
- package/{esm2020 → esm2022}/configurator/configurator.component.mjs +137 -120
- package/{esm2020 → esm2022}/configurator/configurator.service.mjs +12 -5
- package/{esm2020 → esm2022}/configurator/draggable.directive.mjs +22 -15
- package/{esm2020 → esm2022}/configurator/drop-cue.service.mjs +4 -3
- package/{esm2020 → esm2022}/configurator/drop-target.directive.mjs +15 -4
- package/{esm2020 → esm2022}/data-binding/base-binding-directive.mjs +43 -35
- package/{esm2020 → esm2022}/data-binding/local-binding.directive.mjs +17 -5
- package/{esm2020 → esm2022}/data-binding/olap-binding.directive.mjs +16 -4
- package/{esm2020 → esm2022}/data-binding/pivotgrid-data.service.mjs +25 -14
- package/{esm2020 → esm2022}/localization/custom-messages.component.mjs +9 -8
- package/{esm2020 → esm2022}/localization/localized-messages.directive.mjs +9 -8
- package/esm2022/localization/messages.mjs +284 -0
- package/{esm2020 → esm2022}/localization/pivot-localization.service.mjs +4 -3
- package/{esm2020 → esm2022}/models/configuration-change-event.mjs +20 -0
- package/{esm2020 → esm2022}/models/configurator-settings.mjs +5 -0
- package/{esm2020 → esm2022}/models/expanded-change-event.mjs +12 -0
- package/{esm2020 → esm2022}/package-metadata.mjs +2 -2
- package/{esm2020 → esm2022}/pivotgrid.component.mjs +101 -76
- package/{esm2020 → esm2022}/pivotgrid.module.mjs +13 -14
- package/{esm2020 → esm2022}/rendering/pivotgrid-cell.directive.mjs +38 -26
- package/{esm2020 → esm2022}/rendering/pivotgrid-table.component.mjs +66 -48
- package/{esm2020 → esm2022}/rendering/templates/pivotgrid-cell-template.directive.mjs +4 -3
- package/{esm2020 → esm2022}/rendering/templates/pivotgrid-column-header-cell-template.directive.mjs +4 -3
- package/{esm2020 → esm2022}/rendering/templates/pivotgrid-row-header-cell-template.directive.mjs +4 -3
- package/{esm2020 → esm2022}/rendering/templates/pivotgrid-value-cell-template.directive.mjs +4 -3
- package/{esm2020 → esm2022}/virtual/scroll.service.mjs +5 -6
- package/{esm2020 → esm2022}/virtual/scrollable-container.mjs +57 -43
- package/{fesm2020 → fesm2022}/progress-kendo-angular-pivotgrid.mjs +1169 -679
- package/localization/messages.d.ts +1 -1
- package/models/configurator-chipmenu-reorder-target.d.ts +1 -1
- package/models/configurator-orientation.d.ts +1 -1
- package/models/configurator-position.d.ts +1 -1
- package/models/drop-section.d.ts +1 -1
- package/models/drop-target.d.ts +1 -1
- package/models/expanded-state-action.d.ts +2 -2
- package/models/virtualization-settings.d.ts +1 -1
- package/package.json +22 -28
- package/pivotgrid.component.d.ts +1 -1
- package/pivotgrid.module.d.ts +1 -2
- package/rendering/pivotgrid-cell.directive.d.ts +1 -1
- package/rendering/pivotgrid-table.component.d.ts +1 -1
- package/schematics/ngAdd/index.js +2 -2
- package/esm2020/localization/messages.mjs +0 -87
- package/fesm2015/progress-kendo-angular-pivotgrid.mjs +0 -4947
- /package/{esm2020 → esm2022}/directives.mjs +0 -0
- /package/{esm2020 → esm2022}/index.mjs +0 -0
- /package/{esm2020 → esm2022}/models/configurator-chipmenu-reorder-target.mjs +0 -0
- /package/{esm2020 → esm2022}/models/configurator-orientation.mjs +0 -0
- /package/{esm2020 → esm2022}/models/configurator-position.mjs +0 -0
- /package/{esm2020 → esm2022}/models/data-row-item.mjs +0 -0
- /package/{esm2020 → esm2022}/models/drop-section.mjs +0 -0
- /package/{esm2020 → esm2022}/models/drop-target.mjs +0 -0
- /package/{esm2020 → esm2022}/models/expanded-state-action.mjs +0 -0
- /package/{esm2020 → esm2022}/models/loader-settings.mjs +0 -0
- /package/{esm2020 → esm2022}/models/virtualization-settings.mjs +0 -0
- /package/{esm2020 → esm2022}/progress-kendo-angular-pivotgrid.mjs +0 -0
- /package/{esm2020 → esm2022}/util.mjs +0 -0
@@ -4,7 +4,7 @@
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
5
5
|
import { ChangeDetectorRef, Component, EventEmitter, HostBinding, Input, NgZone, Output, ViewChild } from '@angular/core';
|
6
6
|
import { ConfiguratorNavigation } from '@progress/kendo-pivotgrid-common';
|
7
|
-
import { ExpandDirective, NodeTemplateDirective, TreeViewComponent } from '@progress/kendo-angular-treeview';
|
7
|
+
import { CheckDirective, ExpandDirective, NodeTemplateDirective, TreeViewComponent } from '@progress/kendo-angular-treeview';
|
8
8
|
import { PivotGridDataService } from '../data-binding/pivotgrid-data.service';
|
9
9
|
import { ConfiguratorService } from './configurator.service';
|
10
10
|
import { DropCueService } from './drop-cue.service';
|
@@ -20,7 +20,7 @@ import { DraggableChipDirective } from './draggable.directive';
|
|
20
20
|
import { DropTargetDirective } from './drop-target.directive';
|
21
21
|
import { NgClass, NgStyle, NgIf, NgTemplateOutlet, NgFor } from '@angular/common';
|
22
22
|
import { DraggableDirective } from '@progress/kendo-angular-common';
|
23
|
-
import {
|
23
|
+
import { CheckBoxComponent } from '@progress/kendo-angular-inputs';
|
24
24
|
import * as i0 from "@angular/core";
|
25
25
|
import * as i1 from "../data-binding/pivotgrid-data.service";
|
26
26
|
import * as i2 from "@progress/kendo-angular-l10n";
|
@@ -30,41 +30,44 @@ import * as i3 from "./configurator.service";
|
|
30
30
|
* Represents the Kendo UI PivotGrid Configurator component for Angular.
|
31
31
|
*/
|
32
32
|
export class PivotGridConfiguratorComponent {
|
33
|
+
dataService;
|
34
|
+
localization;
|
35
|
+
configuratorService;
|
36
|
+
cdr;
|
37
|
+
zone;
|
38
|
+
hostClass = true;
|
39
|
+
hostAriaRole = 'dialog';
|
40
|
+
get headerTextId() {
|
41
|
+
return `k-pivotgrid-${this.dataService.pivotGridId}-configurator-header`;
|
42
|
+
}
|
43
|
+
orientation = 'vertical';
|
44
|
+
sort = new Array();
|
45
|
+
filter;
|
46
|
+
navigation;
|
47
|
+
close = new EventEmitter();
|
48
|
+
treeView;
|
49
|
+
columnsList;
|
50
|
+
rowsList;
|
51
|
+
originalState;
|
52
|
+
state;
|
53
|
+
fields;
|
54
|
+
checked = [];
|
55
|
+
get isHorizontal() {
|
56
|
+
return this.orientation === 'horizontal';
|
57
|
+
}
|
58
|
+
subs = new Subscription();
|
59
|
+
/**
|
60
|
+
* A function which determines if a specific node has child nodes.
|
61
|
+
*/
|
62
|
+
hasChildren = (node) => !('hierarchyUniqueName' in node) && !('aggregator' in node);
|
33
63
|
constructor(dataService, localization, configuratorService, cdr, zone) {
|
34
64
|
this.dataService = dataService;
|
35
65
|
this.localization = localization;
|
36
66
|
this.configuratorService = configuratorService;
|
37
67
|
this.cdr = cdr;
|
38
68
|
this.zone = zone;
|
39
|
-
this.hostClass = true;
|
40
|
-
this.hostAriaRole = 'dialog';
|
41
|
-
this.orientation = 'vertical';
|
42
|
-
this.sort = new Array();
|
43
|
-
this.close = new EventEmitter();
|
44
|
-
this.checked = [];
|
45
|
-
this.subs = new Subscription();
|
46
|
-
/**
|
47
|
-
* A function which determines if a specific node has child nodes.
|
48
|
-
*/
|
49
|
-
this.hasChildren = (node) => !('hierarchyUniqueName' in node) && !('aggregator' in node);
|
50
|
-
/**
|
51
|
-
* A function which provides the child nodes for a given parent node.
|
52
|
-
*/
|
53
|
-
this.children = (node) => {
|
54
|
-
if (this.dataService.directive.type === 'olap') {
|
55
|
-
const observable = from(this.dataService.directive.fetchChildren(node, this.fields));
|
56
|
-
return observable.pipe(mergeMap(value => of(value)));
|
57
|
-
}
|
58
|
-
return of(node.children);
|
59
|
-
};
|
60
69
|
this.configuratorService.configuratorInstance = this;
|
61
70
|
}
|
62
|
-
get headerTextId() {
|
63
|
-
return `k-pivotgrid-${this.dataService.pivotGridId}-configurator-header`;
|
64
|
-
}
|
65
|
-
get isHorizontal() {
|
66
|
-
return this.orientation === 'horizontal';
|
67
|
-
}
|
68
71
|
ngOnInit() {
|
69
72
|
this.subs.add(this.dataService.fields
|
70
73
|
.subscribe(res => {
|
@@ -201,16 +204,9 @@ export class PivotGridConfiguratorComponent {
|
|
201
204
|
].some((h) => (h === f.uniqueName || h === f.defaultHierarchy)));
|
202
205
|
this.checked = checked;
|
203
206
|
}
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
isItemChecked(node) {
|
208
|
-
const res = this.checked.some(s => node.defaultHierarchy
|
209
|
-
? s.defaultHierarchy === node.defaultHierarchy
|
210
|
-
: s.uniqueName === node.uniqueName)
|
211
|
-
|| (node.children?.length && node.children?.every((c) => c.checked));
|
212
|
-
return res || null;
|
213
|
-
}
|
207
|
+
checkItemBy = (context) => {
|
208
|
+
return context.dataItem;
|
209
|
+
};
|
214
210
|
/**
|
215
211
|
* Determines if a checkbox should be rendered.
|
216
212
|
*/
|
@@ -220,6 +216,16 @@ export class PivotGridConfiguratorComponent {
|
|
220
216
|
|| (node.type === 2)
|
221
217
|
|| node.uniqueName === '[KPIs]');
|
222
218
|
}
|
219
|
+
/**
|
220
|
+
* A function which provides the child nodes for a given parent node.
|
221
|
+
*/
|
222
|
+
children = (node) => {
|
223
|
+
if (this.dataService.directive.type === 'olap') {
|
224
|
+
const observable = from(this.dataService.directive.fetchChildren(node, this.fields));
|
225
|
+
return observable.pipe(mergeMap(value => of(value)));
|
226
|
+
}
|
227
|
+
return of(node.children);
|
228
|
+
};
|
223
229
|
/**
|
224
230
|
* Check if the newly loaded child nodes have checked items.
|
225
231
|
* (Only for OLAP data-binding directive)
|
@@ -231,21 +237,14 @@ export class PivotGridConfiguratorComponent {
|
|
231
237
|
const fields = event.children.map(item => item.dataItem);
|
232
238
|
this.setChecked(fields);
|
233
239
|
}
|
234
|
-
handleCheckedChange(event
|
235
|
-
|
236
|
-
|
237
|
-
}
|
238
|
-
else {
|
239
|
-
const itemIndex = this.checked.findIndex(checkedItem => checkedItem.uniqueName === item.uniqueName);
|
240
|
-
this.checked.splice(itemIndex, 1);
|
241
|
-
}
|
240
|
+
handleCheckedChange(event) {
|
241
|
+
const itemIndex = this.checked.findIndex(checkedItem => checkedItem.uniqueName === event.item.dataItem.uniqueName);
|
242
|
+
this.checked.splice(itemIndex, 1);
|
242
243
|
const action = {
|
243
244
|
type: 'PIVOT_CONFIGURATOR_ACTION_TOGGLE_SELECTION',
|
244
|
-
payload: item
|
245
|
+
payload: event.item.dataItem
|
245
246
|
};
|
246
247
|
this.configuratorService.parseConfiguratorState(action);
|
247
|
-
const closestItem = event.target.closest('.k-treeview-item');
|
248
|
-
this.zone.runOutsideAngular(() => setTimeout(() => closestItem.focus()));
|
249
248
|
}
|
250
249
|
onTreeViewSelect(ev) {
|
251
250
|
const closestItem = ev.target.closest('.k-treeview-item');
|
@@ -313,13 +312,12 @@ export class PivotGridConfiguratorComponent {
|
|
313
312
|
this.cdr.detectChanges();
|
314
313
|
this[`${targetCollectionName}sList`]?.chips.last.focus();
|
315
314
|
}
|
316
|
-
}
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
], 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: `
|
315
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PivotGridConfiguratorComponent, deps: [{ token: i1.PivotGridDataService }, { token: i2.LocalizationService }, { token: i3.ConfiguratorService }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
|
316
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", 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: [
|
317
|
+
ConfiguratorService,
|
318
|
+
DropCueService,
|
319
|
+
SinglePopupService
|
320
|
+
], 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: `
|
323
321
|
<div
|
324
322
|
class="k-pivotgrid-configurator-panel k-pivotgrid-configurator-push"
|
325
323
|
[ngClass]="{
|
@@ -334,7 +332,7 @@ PivotGridConfiguratorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
334
332
|
</div>
|
335
333
|
|
336
334
|
<div class="k-pivotgrid-configurator-content">
|
337
|
-
<div class="k-form" [class.k-form-horizontal]="isHorizontal" role="form">
|
335
|
+
<div class="k-form k-form-md" [class.k-form-horizontal]="isHorizontal" [class.k-form-vertical]="!isHorizontal" role="form">
|
338
336
|
<div class="k-form-field-wrapper" [ngStyle]="isHorizontal ? {'padding-left': 0 } : null">
|
339
337
|
<div class="k-form-field" [style]="'padding-top: 1em; margin-top: 0;'" [ngStyle]="isHorizontal ? {'padding-top': 0, 'padding-left': '16px' } : null">
|
340
338
|
<span [id]="contentLabelId('fields')" class="k-label">{{messageFor('configuratorFieldsText')}}</span>
|
@@ -349,21 +347,14 @@ PivotGridConfiguratorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
349
347
|
textField="caption"
|
350
348
|
[children]="children"
|
351
349
|
[hasChildren]="hasChildren"
|
350
|
+
kendoTreeViewCheckable
|
351
|
+
[hasCheckbox]="isSelectable"
|
352
|
+
[(checkedKeys)]="checked"
|
353
|
+
[checkBy]="checkItemBy"
|
354
|
+
(checkedChange)="handleCheckedChange($event)"
|
352
355
|
kendoTreeViewExpandable
|
353
356
|
(childrenLoaded)="handleChildrenLoaded($event)"
|
354
357
|
(keydown.space)="onTreeViewSelect($event)">
|
355
|
-
<ng-template kendoTreeViewNodeTemplate let-dataItem>
|
356
|
-
<input kendoCheckBox
|
357
|
-
*ngIf="isSelectable(dataItem)"
|
358
|
-
type="checkbox"
|
359
|
-
kendoCheckBox
|
360
|
-
tabindex="-1"
|
361
|
-
role="none"
|
362
|
-
aria-hidden="true"
|
363
|
-
[checked]="isItemChecked(dataItem)"
|
364
|
-
(change)="handleCheckedChange($event, dataItem)"/>
|
365
|
-
{{ dataItem.caption }}
|
366
|
-
</ng-template>
|
367
358
|
</kendo-treeview>
|
368
359
|
|
369
360
|
</div>
|
@@ -381,8 +372,10 @@ PivotGridConfiguratorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
381
372
|
|
382
373
|
<kendo-chiplist
|
383
374
|
*ngIf="state.columnAxes && state.columnAxes.length; else noColumnAxes"
|
375
|
+
[navigable]="false"
|
384
376
|
#columnsChiplist
|
385
377
|
kendoDropTarget
|
378
|
+
class="k-column-fields"
|
386
379
|
axes="columnAxes"
|
387
380
|
[style.width.%]="100"
|
388
381
|
[attr.aria-labelledby]="headerTextId + ' ' + contentLabelId('columns')"
|
@@ -390,20 +383,25 @@ PivotGridConfiguratorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
390
383
|
>
|
391
384
|
<ng-container *ngFor="let item of state.columnAxes">
|
392
385
|
<kendo-chip *ngIf="item.name.length === 1"
|
386
|
+
#chip
|
393
387
|
kendoChipDraggable
|
394
388
|
kendoDraggable
|
395
389
|
kendoDropTarget
|
396
390
|
kendoChipKeyboardNavigation
|
397
391
|
[item]="item"
|
392
|
+
[label]="getName(item.name)"
|
398
393
|
axes="columnAxes"
|
399
|
-
rounded="full"
|
400
394
|
[removable]="true"
|
395
|
+
[hasMenu]="true"
|
396
|
+
(menuToggle)="chipMenuColumns.toggle($event)"
|
401
397
|
(remove)="onChipRemove($event, item, 'column')"
|
402
398
|
(reorder)="onReorder($event, 'column', item)"
|
403
|
-
>
|
399
|
+
>
|
404
400
|
<kendo-pivot-chip-menu
|
405
|
-
|
406
|
-
|
401
|
+
#chipMenuColumns
|
402
|
+
[chip]="item"
|
403
|
+
[anchor]="chip"
|
404
|
+
></kendo-pivot-chip-menu>
|
407
405
|
</kendo-chip>
|
408
406
|
</ng-container>
|
409
407
|
</kendo-chiplist>
|
@@ -418,8 +416,10 @@ PivotGridConfiguratorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
418
416
|
|
419
417
|
<kendo-chiplist
|
420
418
|
*ngIf="state.rowAxes && state.rowAxes.length; else noRowAxes"
|
419
|
+
[navigable]="false"
|
421
420
|
#rowsChiplist
|
422
421
|
kendoDropTarget
|
422
|
+
class="k-row-fields"
|
423
423
|
axes="rowAxes"
|
424
424
|
[attr.aria-labelledby]="headerTextId + ' ' + contentLabelId('rows')"
|
425
425
|
[ngStyle]="isHorizontal ? {'padding-top': 0, 'padding-left': '16px' } : null"
|
@@ -427,22 +427,25 @@ PivotGridConfiguratorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
427
427
|
>
|
428
428
|
<ng-container *ngFor="let item of state.rowAxes">
|
429
429
|
<kendo-chip *ngIf="item.name.length === 1"
|
430
|
+
#chip
|
430
431
|
kendoChipDraggable
|
431
432
|
kendoDraggable
|
432
433
|
kendoDropTarget
|
433
434
|
kendoChipKeyboardNavigation
|
434
435
|
[item]="item"
|
436
|
+
[label]="getName(item.name)"
|
435
437
|
axes="rowAxes"
|
436
|
-
rounded="full"
|
437
438
|
[removable]="true"
|
439
|
+
[hasMenu]="true"
|
440
|
+
(menuToggle)="chipMenuRows.toggle($event)"
|
438
441
|
(remove)="onChipRemove($event, item, 'row')"
|
439
442
|
(reorder)="onReorder($event, 'row', item)"
|
440
443
|
>
|
441
|
-
{{ getName(item.name) }}
|
442
|
-
|
443
444
|
<kendo-pivot-chip-menu
|
444
|
-
|
445
|
-
|
445
|
+
#chipMenuRows
|
446
|
+
[chip]="item"
|
447
|
+
[anchor]="chip"
|
448
|
+
></kendo-pivot-chip-menu>
|
446
449
|
</kendo-chip>
|
447
450
|
</ng-container>
|
448
451
|
</kendo-chiplist>
|
@@ -463,30 +466,34 @@ PivotGridConfiguratorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
463
466
|
|
464
467
|
<kendo-chiplist
|
465
468
|
*ngIf="state.measureAxes && state.measureAxes.length; else noMeasureAxes"
|
469
|
+
[navigable]="false"
|
466
470
|
kendoDropTarget
|
471
|
+
class="k-filter-fields"
|
467
472
|
axes="measureAxes"
|
468
473
|
[attr.aria-labelledby]="headerTextId + ' ' + contentLabelId('values')"
|
469
474
|
[ngStyle]="isHorizontal ? {'padding-top': 0, 'padding-left': '16px' } : null"
|
470
475
|
[style.width.%]="100"
|
471
476
|
>
|
472
477
|
<kendo-chip *ngFor="let item of state.measureAxes"
|
478
|
+
#chip
|
473
479
|
kendoChipDraggable
|
474
480
|
kendoDraggable
|
475
481
|
kendoDropTarget
|
476
482
|
kendoChipKeyboardNavigation
|
477
483
|
[item]="item"
|
484
|
+
[label]="getName(item.name)"
|
478
485
|
axes="measureAxes"
|
479
|
-
rounded="full"
|
480
486
|
[removable]="true"
|
487
|
+
[hasMenu]="true"
|
488
|
+
(menuToggle)="chipMenuValues.toggle($event)"
|
481
489
|
(remove)="onChipRemove($event, item, 'measure')"
|
482
490
|
(reorder)="onReorder($event, 'measure', item)"
|
483
491
|
>
|
484
|
-
|
485
|
-
|
486
|
-
|
487
|
-
|
488
|
-
|
489
|
-
</kendo-pivot-chip-menu>
|
492
|
+
<kendo-pivot-chip-menu
|
493
|
+
#chipMenuValues
|
494
|
+
[chip]="item"
|
495
|
+
[anchor]="chip"
|
496
|
+
></kendo-pivot-chip-menu>
|
490
497
|
</kendo-chip>
|
491
498
|
</kendo-chiplist>
|
492
499
|
|
@@ -497,13 +504,14 @@ PivotGridConfiguratorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
497
504
|
|
498
505
|
</div>
|
499
506
|
</div>
|
500
|
-
<div class="k-pivotgrid-configurator-actions k-actions k-
|
507
|
+
<div class="k-pivotgrid-configurator-actions k-actions k-actions-end k-actions-horizontal">
|
501
508
|
<button kendoButton type="button" (click)="handleReset()">{{messageFor('configuratorCancelButtonText')}}</button>
|
502
509
|
<button kendoButton themeColor="primary" type="button" (click)="handleSubmit()">{{messageFor('configuratorApplyButtonText')}}</button>
|
503
510
|
</div>
|
504
511
|
</div>
|
505
|
-
`, 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:
|
506
|
-
|
512
|
+
`, 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: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { 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: ["selection", "size", "role", "navigable"], outputs: ["selectedChange", "remove"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { 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"] }] });
|
513
|
+
}
|
514
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PivotGridConfiguratorComponent, decorators: [{
|
507
515
|
type: Component,
|
508
516
|
args: [{
|
509
517
|
selector: 'kendo-pivotgrid-configurator',
|
@@ -527,7 +535,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
527
535
|
</div>
|
528
536
|
|
529
537
|
<div class="k-pivotgrid-configurator-content">
|
530
|
-
<div class="k-form" [class.k-form-horizontal]="isHorizontal" role="form">
|
538
|
+
<div class="k-form k-form-md" [class.k-form-horizontal]="isHorizontal" [class.k-form-vertical]="!isHorizontal" role="form">
|
531
539
|
<div class="k-form-field-wrapper" [ngStyle]="isHorizontal ? {'padding-left': 0 } : null">
|
532
540
|
<div class="k-form-field" [style]="'padding-top: 1em; margin-top: 0;'" [ngStyle]="isHorizontal ? {'padding-top': 0, 'padding-left': '16px' } : null">
|
533
541
|
<span [id]="contentLabelId('fields')" class="k-label">{{messageFor('configuratorFieldsText')}}</span>
|
@@ -542,21 +550,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
542
550
|
textField="caption"
|
543
551
|
[children]="children"
|
544
552
|
[hasChildren]="hasChildren"
|
553
|
+
kendoTreeViewCheckable
|
554
|
+
[hasCheckbox]="isSelectable"
|
555
|
+
[(checkedKeys)]="checked"
|
556
|
+
[checkBy]="checkItemBy"
|
557
|
+
(checkedChange)="handleCheckedChange($event)"
|
545
558
|
kendoTreeViewExpandable
|
546
559
|
(childrenLoaded)="handleChildrenLoaded($event)"
|
547
560
|
(keydown.space)="onTreeViewSelect($event)">
|
548
|
-
<ng-template kendoTreeViewNodeTemplate let-dataItem>
|
549
|
-
<input kendoCheckBox
|
550
|
-
*ngIf="isSelectable(dataItem)"
|
551
|
-
type="checkbox"
|
552
|
-
kendoCheckBox
|
553
|
-
tabindex="-1"
|
554
|
-
role="none"
|
555
|
-
aria-hidden="true"
|
556
|
-
[checked]="isItemChecked(dataItem)"
|
557
|
-
(change)="handleCheckedChange($event, dataItem)"/>
|
558
|
-
{{ dataItem.caption }}
|
559
|
-
</ng-template>
|
560
561
|
</kendo-treeview>
|
561
562
|
|
562
563
|
</div>
|
@@ -574,8 +575,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
574
575
|
|
575
576
|
<kendo-chiplist
|
576
577
|
*ngIf="state.columnAxes && state.columnAxes.length; else noColumnAxes"
|
578
|
+
[navigable]="false"
|
577
579
|
#columnsChiplist
|
578
580
|
kendoDropTarget
|
581
|
+
class="k-column-fields"
|
579
582
|
axes="columnAxes"
|
580
583
|
[style.width.%]="100"
|
581
584
|
[attr.aria-labelledby]="headerTextId + ' ' + contentLabelId('columns')"
|
@@ -583,20 +586,25 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
583
586
|
>
|
584
587
|
<ng-container *ngFor="let item of state.columnAxes">
|
585
588
|
<kendo-chip *ngIf="item.name.length === 1"
|
589
|
+
#chip
|
586
590
|
kendoChipDraggable
|
587
591
|
kendoDraggable
|
588
592
|
kendoDropTarget
|
589
593
|
kendoChipKeyboardNavigation
|
590
594
|
[item]="item"
|
595
|
+
[label]="getName(item.name)"
|
591
596
|
axes="columnAxes"
|
592
|
-
rounded="full"
|
593
597
|
[removable]="true"
|
598
|
+
[hasMenu]="true"
|
599
|
+
(menuToggle)="chipMenuColumns.toggle($event)"
|
594
600
|
(remove)="onChipRemove($event, item, 'column')"
|
595
601
|
(reorder)="onReorder($event, 'column', item)"
|
596
|
-
>
|
602
|
+
>
|
597
603
|
<kendo-pivot-chip-menu
|
598
|
-
|
599
|
-
|
604
|
+
#chipMenuColumns
|
605
|
+
[chip]="item"
|
606
|
+
[anchor]="chip"
|
607
|
+
></kendo-pivot-chip-menu>
|
600
608
|
</kendo-chip>
|
601
609
|
</ng-container>
|
602
610
|
</kendo-chiplist>
|
@@ -611,8 +619,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
611
619
|
|
612
620
|
<kendo-chiplist
|
613
621
|
*ngIf="state.rowAxes && state.rowAxes.length; else noRowAxes"
|
622
|
+
[navigable]="false"
|
614
623
|
#rowsChiplist
|
615
624
|
kendoDropTarget
|
625
|
+
class="k-row-fields"
|
616
626
|
axes="rowAxes"
|
617
627
|
[attr.aria-labelledby]="headerTextId + ' ' + contentLabelId('rows')"
|
618
628
|
[ngStyle]="isHorizontal ? {'padding-top': 0, 'padding-left': '16px' } : null"
|
@@ -620,22 +630,25 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
620
630
|
>
|
621
631
|
<ng-container *ngFor="let item of state.rowAxes">
|
622
632
|
<kendo-chip *ngIf="item.name.length === 1"
|
633
|
+
#chip
|
623
634
|
kendoChipDraggable
|
624
635
|
kendoDraggable
|
625
636
|
kendoDropTarget
|
626
637
|
kendoChipKeyboardNavigation
|
627
638
|
[item]="item"
|
639
|
+
[label]="getName(item.name)"
|
628
640
|
axes="rowAxes"
|
629
|
-
rounded="full"
|
630
641
|
[removable]="true"
|
642
|
+
[hasMenu]="true"
|
643
|
+
(menuToggle)="chipMenuRows.toggle($event)"
|
631
644
|
(remove)="onChipRemove($event, item, 'row')"
|
632
645
|
(reorder)="onReorder($event, 'row', item)"
|
633
646
|
>
|
634
|
-
{{ getName(item.name) }}
|
635
|
-
|
636
647
|
<kendo-pivot-chip-menu
|
637
|
-
|
638
|
-
|
648
|
+
#chipMenuRows
|
649
|
+
[chip]="item"
|
650
|
+
[anchor]="chip"
|
651
|
+
></kendo-pivot-chip-menu>
|
639
652
|
</kendo-chip>
|
640
653
|
</ng-container>
|
641
654
|
</kendo-chiplist>
|
@@ -656,30 +669,34 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
656
669
|
|
657
670
|
<kendo-chiplist
|
658
671
|
*ngIf="state.measureAxes && state.measureAxes.length; else noMeasureAxes"
|
672
|
+
[navigable]="false"
|
659
673
|
kendoDropTarget
|
674
|
+
class="k-filter-fields"
|
660
675
|
axes="measureAxes"
|
661
676
|
[attr.aria-labelledby]="headerTextId + ' ' + contentLabelId('values')"
|
662
677
|
[ngStyle]="isHorizontal ? {'padding-top': 0, 'padding-left': '16px' } : null"
|
663
678
|
[style.width.%]="100"
|
664
679
|
>
|
665
680
|
<kendo-chip *ngFor="let item of state.measureAxes"
|
681
|
+
#chip
|
666
682
|
kendoChipDraggable
|
667
683
|
kendoDraggable
|
668
684
|
kendoDropTarget
|
669
685
|
kendoChipKeyboardNavigation
|
670
686
|
[item]="item"
|
687
|
+
[label]="getName(item.name)"
|
671
688
|
axes="measureAxes"
|
672
|
-
rounded="full"
|
673
689
|
[removable]="true"
|
690
|
+
[hasMenu]="true"
|
691
|
+
(menuToggle)="chipMenuValues.toggle($event)"
|
674
692
|
(remove)="onChipRemove($event, item, 'measure')"
|
675
693
|
(reorder)="onReorder($event, 'measure', item)"
|
676
694
|
>
|
677
|
-
|
678
|
-
|
679
|
-
|
680
|
-
|
681
|
-
|
682
|
-
</kendo-pivot-chip-menu>
|
695
|
+
<kendo-pivot-chip-menu
|
696
|
+
#chipMenuValues
|
697
|
+
[chip]="item"
|
698
|
+
[anchor]="chip"
|
699
|
+
></kendo-pivot-chip-menu>
|
683
700
|
</kendo-chip>
|
684
701
|
</kendo-chiplist>
|
685
702
|
|
@@ -690,7 +707,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
690
707
|
|
691
708
|
</div>
|
692
709
|
</div>
|
693
|
-
<div class="k-pivotgrid-configurator-actions k-actions k-
|
710
|
+
<div class="k-pivotgrid-configurator-actions k-actions k-actions-end k-actions-horizontal">
|
694
711
|
<button kendoButton type="button" (click)="handleReset()">{{messageFor('configuratorCancelButtonText')}}</button>
|
695
712
|
<button kendoButton themeColor="primary" type="button" (click)="handleSubmit()">{{messageFor('configuratorApplyButtonText')}}</button>
|
696
713
|
</div>
|
@@ -698,7 +715,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
698
715
|
`,
|
699
716
|
standalone: true,
|
700
717
|
imports: [
|
701
|
-
NgClass, NgStyle, TreeViewComponent, ExpandDirective, NodeTemplateDirective, NgIf,
|
718
|
+
NgClass, NgStyle, TreeViewComponent, ExpandDirective, CheckDirective, NodeTemplateDirective, NgIf, CheckBoxComponent,
|
702
719
|
NgTemplateOutlet, DropTargetDirective, ChipListComponent, NgFor, ChipComponent, DraggableChipDirective,
|
703
720
|
DraggableDirective, ChipKeyboardNavigationDirective, ChipMenuComponent, ButtonComponent
|
704
721
|
]
|
@@ -12,10 +12,17 @@ import * as i1 from "../data-binding/pivotgrid-data.service";
|
|
12
12
|
* @hidden
|
13
13
|
*/
|
14
14
|
export class ConfiguratorService {
|
15
|
+
dataService;
|
16
|
+
configuratorInstance;
|
17
|
+
state;
|
18
|
+
draggedElement;
|
19
|
+
dropTargetElement;
|
20
|
+
cueContainer;
|
21
|
+
orientation;
|
22
|
+
configuratorStateChange = new EventEmitter();
|
23
|
+
closeMenu = new EventEmitter();
|
15
24
|
constructor(dataService) {
|
16
25
|
this.dataService = dataService;
|
17
|
-
this.configuratorStateChange = new EventEmitter();
|
18
|
-
this.closeMenu = new EventEmitter();
|
19
26
|
}
|
20
27
|
parseConfiguratorState(action) {
|
21
28
|
const newState = configuratorReducer({
|
@@ -34,10 +41,10 @@ export class ConfiguratorService {
|
|
34
41
|
this.dataService.state = new PivotGridState(this.state.columnAxes, this.state.rowAxes, this.state.measureAxes, this.state.sort, this.state.filter);
|
35
42
|
this.configuratorStateChange.emit(this.state);
|
36
43
|
}
|
44
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ConfiguratorService, deps: [{ token: i1.PivotGridDataService }], target: i0.ɵɵFactoryTarget.Injectable });
|
45
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ConfiguratorService });
|
37
46
|
}
|
38
|
-
|
39
|
-
ConfiguratorService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ConfiguratorService });
|
40
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ConfiguratorService, decorators: [{
|
47
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ConfiguratorService, decorators: [{
|
41
48
|
type: Injectable
|
42
49
|
}], ctorParameters: function () { return [{ type: i1.PivotGridDataService }]; }, propDecorators: { configuratorStateChange: [{
|
43
50
|
type: Output
|