@progress/kendo-angular-pivotgrid 21.4.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.
- package/configurator/chip-menu/chip-menu-item-base.d.ts +1 -1
- package/data-binding/base-binding-directive.d.ts +1 -1
- package/fesm2022/progress-kendo-angular-pivotgrid.mjs +120 -120
- package/localization/messages.d.ts +1 -1
- package/package.json +18 -26
- package/schematics/ngAdd/index.js +2 -2
- package/esm2022/configurator/chip-kb-nav.directive.mjs +0 -69
- package/esm2022/configurator/chip-menu/chip-menu-container.component.mjs +0 -51
- package/esm2022/configurator/chip-menu/chip-menu-filter.component.mjs +0 -135
- package/esm2022/configurator/chip-menu/chip-menu-item-base.mjs +0 -40
- package/esm2022/configurator/chip-menu/chip-menu-item-content-template.directive.mjs +0 -29
- package/esm2022/configurator/chip-menu/chip-menu-item.component.mjs +0 -206
- package/esm2022/configurator/chip-menu/chip-menu-item.directive.mjs +0 -98
- package/esm2022/configurator/chip-menu/chip-menu-reorder.component.mjs +0 -198
- package/esm2022/configurator/chip-menu/chip-menu-sort.component.mjs +0 -104
- package/esm2022/configurator/chip-menu/chip-menu.component.mjs +0 -165
- package/esm2022/configurator/chip-menu/chip-menu.service.mjs +0 -40
- package/esm2022/configurator/chip-menu/filtering/filter-menu-container.component.mjs +0 -186
- package/esm2022/configurator/chip-menu/filtering/filter-menu-dropdownlist.directive.mjs +0 -44
- package/esm2022/configurator/chip-menu/filtering/menu-tabbing.service.mjs +0 -20
- package/esm2022/configurator/chip-menu/filtering/string-filter-menu.component.mjs +0 -148
- package/esm2022/configurator/chip-menu/single-popup.service.mjs +0 -136
- package/esm2022/configurator/configurator.component.mjs +0 -806
- package/esm2022/configurator/configurator.service.mjs +0 -53
- package/esm2022/configurator/draggable.directive.mjs +0 -131
- package/esm2022/configurator/drop-cue.service.mjs +0 -86
- package/esm2022/configurator/drop-target.directive.mjs +0 -190
- package/esm2022/data-binding/base-binding-directive.mjs +0 -164
- package/esm2022/data-binding/local-binding.directive.mjs +0 -107
- package/esm2022/data-binding/olap-binding.directive.mjs +0 -204
- package/esm2022/data-binding/pivotgrid-data.service.mjs +0 -76
- package/esm2022/directives.mjs +0 -97
- package/esm2022/index.mjs +0 -28
- package/esm2022/localization/custom-messages.component.mjs +0 -57
- package/esm2022/localization/localized-messages.directive.mjs +0 -39
- package/esm2022/localization/messages.mjs +0 -254
- package/esm2022/localization/pivot-localization.service.mjs +0 -30
- package/esm2022/models/configuration-change-event.mjs +0 -37
- package/esm2022/models/configurator-chipmenu-reorder-target.mjs +0 -5
- package/esm2022/models/configurator-orientation.mjs +0 -5
- package/esm2022/models/configurator-position.mjs +0 -5
- package/esm2022/models/configurator-settings.mjs +0 -21
- package/esm2022/models/data-row-item.mjs +0 -5
- package/esm2022/models/drop-section.mjs +0 -5
- package/esm2022/models/drop-target.mjs +0 -5
- package/esm2022/models/expanded-change-event.mjs +0 -29
- package/esm2022/models/expanded-state-action.mjs +0 -5
- package/esm2022/models/loader-settings.mjs +0 -5
- package/esm2022/models/virtualization-settings.mjs +0 -25
- package/esm2022/package-metadata.mjs +0 -16
- package/esm2022/pivotgrid.component.mjs +0 -729
- package/esm2022/pivotgrid.module.mjs +0 -87
- package/esm2022/progress-kendo-angular-pivotgrid.mjs +0 -8
- package/esm2022/rendering/pivotgrid-cell.directive.mjs +0 -247
- package/esm2022/rendering/pivotgrid-table.component.mjs +0 -386
- package/esm2022/rendering/templates/pivotgrid-cell-template.directive.mjs +0 -44
- package/esm2022/rendering/templates/pivotgrid-column-header-cell-template.directive.mjs +0 -44
- package/esm2022/rendering/templates/pivotgrid-row-header-cell-template.directive.mjs +0 -44
- package/esm2022/rendering/templates/pivotgrid-value-cell-template.directive.mjs +0 -43
- package/esm2022/util.mjs +0 -223
- package/esm2022/virtual/scroll.service.mjs +0 -18
- package/esm2022/virtual/scrollable-container.mjs +0 -128
|
@@ -1,98 +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 { Directive, ElementRef, Input, NgZone, Renderer2 } from '@angular/core';
|
|
6
|
-
import { Subscription } from 'rxjs';
|
|
7
|
-
import { Keys } from '@progress/kendo-angular-common';
|
|
8
|
-
import * as i0 from "@angular/core";
|
|
9
|
-
/**
|
|
10
|
-
* @hidden
|
|
11
|
-
*/
|
|
12
|
-
export class ChipMenuItemDirective {
|
|
13
|
-
hostElement;
|
|
14
|
-
renderer;
|
|
15
|
-
ngZone;
|
|
16
|
-
menuItemComponent;
|
|
17
|
-
firstFocusableElement;
|
|
18
|
-
lastFocusableElement;
|
|
19
|
-
set isFirst(value) {
|
|
20
|
-
if (value) {
|
|
21
|
-
const focusableElement = this.chipMenuItems[0];
|
|
22
|
-
this.menuItemComponent.service.menuTabbingService.firstFocusable = focusableElement;
|
|
23
|
-
this.ngZone.runOutsideAngular(() => {
|
|
24
|
-
const firstItemKeydownSub = this.renderer.listen(focusableElement, 'keydown', this.onTab);
|
|
25
|
-
this.subs.add(firstItemKeydownSub);
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
this._isFirst = value;
|
|
29
|
-
}
|
|
30
|
-
get isFirst() {
|
|
31
|
-
return this._isFirst;
|
|
32
|
-
}
|
|
33
|
-
set isLast(value) {
|
|
34
|
-
if (!this.chipMenuItems) {
|
|
35
|
-
return;
|
|
36
|
-
}
|
|
37
|
-
if (value) {
|
|
38
|
-
const lastFocusableElement = this.getLastColumnMenuItem();
|
|
39
|
-
this.menuItemComponent.service.menuTabbingService.lastFocusable = lastFocusableElement;
|
|
40
|
-
this.ngZone.runOutsideAngular(() => {
|
|
41
|
-
const lastItemKeydownSub = this.renderer.listen(lastFocusableElement, 'keydown', this.onTab);
|
|
42
|
-
this.subs.add(lastItemKeydownSub);
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
this._isLast = value;
|
|
46
|
-
}
|
|
47
|
-
get isLast() {
|
|
48
|
-
return this._isLast;
|
|
49
|
-
}
|
|
50
|
-
_isFirst = false;
|
|
51
|
-
_isLast = false;
|
|
52
|
-
chipMenuItems;
|
|
53
|
-
subs = new Subscription();
|
|
54
|
-
constructor(hostElement, renderer, ngZone) {
|
|
55
|
-
this.hostElement = hostElement;
|
|
56
|
-
this.renderer = renderer;
|
|
57
|
-
this.ngZone = ngZone;
|
|
58
|
-
}
|
|
59
|
-
ngAfterViewInit() {
|
|
60
|
-
this.chipMenuItems = this.hostElement.nativeElement.querySelectorAll('.k-columnmenu-item');
|
|
61
|
-
this.chipMenuItems.forEach(el => this.renderer.setAttribute(el, 'tabindex', '0'));
|
|
62
|
-
}
|
|
63
|
-
ngOnDestroy() {
|
|
64
|
-
this.subs.unsubscribe();
|
|
65
|
-
}
|
|
66
|
-
onTab = (e) => {
|
|
67
|
-
if (e.code !== Keys.Tab) {
|
|
68
|
-
return;
|
|
69
|
-
}
|
|
70
|
-
if (this.isFirst && e.shiftKey && e.target === this.chipMenuItems[0]) {
|
|
71
|
-
e.preventDefault();
|
|
72
|
-
this.menuItemComponent.service.menuTabbingService.lastFocusable.focus();
|
|
73
|
-
}
|
|
74
|
-
if (this.isLast && !e.shiftKey) {
|
|
75
|
-
const lastColumnMenuItem = this.getLastColumnMenuItem();
|
|
76
|
-
const isExpanded = this.menuItemComponent.expanded;
|
|
77
|
-
if (lastColumnMenuItem === e.target && !isExpanded) {
|
|
78
|
-
e.preventDefault();
|
|
79
|
-
this.menuItemComponent.service.menuTabbingService.firstFocusable.focus();
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
};
|
|
83
|
-
getLastColumnMenuItem() {
|
|
84
|
-
return this.chipMenuItems[this.chipMenuItems.length - 1];
|
|
85
|
-
}
|
|
86
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ChipMenuItemDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Directive });
|
|
87
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: ChipMenuItemDirective, isStandalone: true, selector: "[kendoPivotChipMenuItem]", inputs: { menuItemComponent: ["kendoPivotChipMenuItem", "menuItemComponent"] }, ngImport: i0 });
|
|
88
|
-
}
|
|
89
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ChipMenuItemDirective, decorators: [{
|
|
90
|
-
type: Directive,
|
|
91
|
-
args: [{
|
|
92
|
-
selector: '[kendoPivotChipMenuItem]',
|
|
93
|
-
standalone: true
|
|
94
|
-
}]
|
|
95
|
-
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.NgZone }], propDecorators: { menuItemComponent: [{
|
|
96
|
-
type: Input,
|
|
97
|
-
args: ['kendoPivotChipMenuItem']
|
|
98
|
-
}] } });
|
|
@@ -1,198 +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, Input, NgZone, Renderer2 } from '@angular/core';
|
|
6
|
-
import { ChipMenuItemBase } from './chip-menu-item-base';
|
|
7
|
-
import { ConfiguratorService } from '../configurator.service';
|
|
8
|
-
import { PivotLocalizationService } from '../../localization/pivot-localization.service';
|
|
9
|
-
import { arrowLeftIcon, arrowRightIcon, columnsIcon, rowsIcon } from '@progress/kendo-svg-icons';
|
|
10
|
-
import { PivotGridDataService } from '../../data-binding/pivotgrid-data.service';
|
|
11
|
-
import { swapItems } from '../../util';
|
|
12
|
-
import { ChipMenuItemComponent } from './chip-menu-item.component';
|
|
13
|
-
import * as i0 from "@angular/core";
|
|
14
|
-
import * as i1 from "../../localization/pivot-localization.service";
|
|
15
|
-
import * as i2 from "../configurator.service";
|
|
16
|
-
import * as i3 from "../../data-binding/pivotgrid-data.service";
|
|
17
|
-
/**
|
|
18
|
-
* @hidden
|
|
19
|
-
*
|
|
20
|
-
* Represents a chip-menu item for reordering PivotGrid fields.
|
|
21
|
-
*/
|
|
22
|
-
export class ChipMenuReorderComponent extends ChipMenuItemBase {
|
|
23
|
-
localization;
|
|
24
|
-
renderer;
|
|
25
|
-
configuratorService;
|
|
26
|
-
dataService;
|
|
27
|
-
cdr;
|
|
28
|
-
ngZone;
|
|
29
|
-
chip;
|
|
30
|
-
columnsIcon = columnsIcon;
|
|
31
|
-
rowsIcon = rowsIcon;
|
|
32
|
-
arrowLeftIcon = arrowLeftIcon;
|
|
33
|
-
arrowRightIcon = arrowRightIcon;
|
|
34
|
-
rtl = false;
|
|
35
|
-
get isColumnsField() {
|
|
36
|
-
return this.configuratorService.state.columnAxes.some(item => item === this.chip);
|
|
37
|
-
}
|
|
38
|
-
get isRowsField() {
|
|
39
|
-
return this.configuratorService.state.rowAxes.some(item => item === this.chip);
|
|
40
|
-
}
|
|
41
|
-
get isMeasureField() {
|
|
42
|
-
return this.configuratorService.state.measureAxes.some(item => item === this.chip);
|
|
43
|
-
}
|
|
44
|
-
get isFirst() {
|
|
45
|
-
const state = this.configuratorService.state;
|
|
46
|
-
return this.isColumnsField && state.columnAxes[0] === this.chip ||
|
|
47
|
-
this.isRowsField && state.rowAxes[0] === this.chip ||
|
|
48
|
-
this.isMeasureField && state.measureAxes[0] === this.chip;
|
|
49
|
-
}
|
|
50
|
-
get isLast() {
|
|
51
|
-
const state = this.configuratorService.state;
|
|
52
|
-
return this.isColumnsField && state.columnAxes[state.columnAxes.length - 1] === this.chip ||
|
|
53
|
-
this.isRowsField && state.rowAxes[state.rowAxes.length - 1] === this.chip ||
|
|
54
|
-
this.isMeasureField && state.measureAxes[state.measureAxes.length - 1] === this.chip;
|
|
55
|
-
}
|
|
56
|
-
subs;
|
|
57
|
-
constructor(localization, renderer, configuratorService, dataService, cdr, ngZone) {
|
|
58
|
-
super();
|
|
59
|
-
this.localization = localization;
|
|
60
|
-
this.renderer = renderer;
|
|
61
|
-
this.configuratorService = configuratorService;
|
|
62
|
-
this.dataService = dataService;
|
|
63
|
-
this.cdr = cdr;
|
|
64
|
-
this.ngZone = ngZone;
|
|
65
|
-
this.subs = this.localization.localization.changes.subscribe(({ rtl }) => this.rtl = rtl);
|
|
66
|
-
}
|
|
67
|
-
ngOnDestroy() {
|
|
68
|
-
this.subs.unsubscribe();
|
|
69
|
-
}
|
|
70
|
-
messageFor(localizationToken) {
|
|
71
|
-
return this.localization.get(localizationToken);
|
|
72
|
-
}
|
|
73
|
-
move(e, target) {
|
|
74
|
-
const isDisabled = e.target.closest('.k-columnmenu-item').getAttribute('aria-disabled') !== 'false';
|
|
75
|
-
if (isDisabled) {
|
|
76
|
-
return;
|
|
77
|
-
}
|
|
78
|
-
const currentState = this.configuratorService.state;
|
|
79
|
-
switch (target) {
|
|
80
|
-
case 'columns':
|
|
81
|
-
{
|
|
82
|
-
const newRows = currentState.rowAxes.filter(item => item !== this.chip);
|
|
83
|
-
const newCols = [...currentState.columnAxes, this.chip];
|
|
84
|
-
const newState = { ...currentState, rowAxes: newRows, columnAxes: newCols };
|
|
85
|
-
this.configuratorService.configuratorInstance.setState(newState);
|
|
86
|
-
this.ngZone.runOutsideAngular(() => setTimeout(() => this.configuratorService.configuratorInstance[`${target}List`]?.chips.last.element.nativeElement.click()));
|
|
87
|
-
}
|
|
88
|
-
break;
|
|
89
|
-
case 'rows':
|
|
90
|
-
{
|
|
91
|
-
const newCols = currentState.columnAxes.filter(item => item !== this.chip);
|
|
92
|
-
const newRows = [...currentState.rowAxes, this.chip];
|
|
93
|
-
const newState = { ...currentState, rowAxes: newRows, columnAxes: newCols };
|
|
94
|
-
this.configuratorService.configuratorInstance.setState(newState);
|
|
95
|
-
this.ngZone.runOutsideAngular(() => setTimeout(() => this.configuratorService.configuratorInstance[`${target}List`]?.chips.last.element.nativeElement.click()));
|
|
96
|
-
}
|
|
97
|
-
break;
|
|
98
|
-
case 'prev':
|
|
99
|
-
{
|
|
100
|
-
const axis = currentState.rowAxes.indexOf(this.chip) > -1 ? 'row' : currentState.columnAxes.indexOf(this.chip) > -1 ? 'column' : 'measure';
|
|
101
|
-
const index = currentState[`${axis}Axes`].indexOf(this.chip);
|
|
102
|
-
swapItems(currentState[`${axis}Axes`], index, index - 1);
|
|
103
|
-
const newState = { ...currentState };
|
|
104
|
-
this.configuratorService.configuratorInstance.setState(newState);
|
|
105
|
-
}
|
|
106
|
-
break;
|
|
107
|
-
case 'next':
|
|
108
|
-
{
|
|
109
|
-
const axis = currentState.rowAxes.indexOf(this.chip) > -1 ? 'row' : currentState.columnAxes.indexOf(this.chip) > -1 ? 'column' : 'measure';
|
|
110
|
-
const index = currentState[`${axis}Axes`].indexOf(this.chip);
|
|
111
|
-
swapItems(currentState[`${axis}Axes`], index, index + 1);
|
|
112
|
-
const newState = { ...currentState };
|
|
113
|
-
this.configuratorService.configuratorInstance.setState(newState);
|
|
114
|
-
}
|
|
115
|
-
break;
|
|
116
|
-
}
|
|
117
|
-
this.close();
|
|
118
|
-
}
|
|
119
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ChipMenuReorderComponent, deps: [{ token: i1.PivotLocalizationService }, { token: i0.Renderer2 }, { token: i2.ConfiguratorService }, { token: i3.PivotGridDataService }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
|
|
120
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: ChipMenuReorderComponent, isStandalone: true, selector: "kendo-pivot-chipmenu-reorder", inputs: { chip: "chip" }, usesInheritance: true, ngImport: i0, template: `
|
|
121
|
-
@if (!isMeasureField) {
|
|
122
|
-
<kendo-pivot-chipmenu-item
|
|
123
|
-
[disabled]="isColumnsField"
|
|
124
|
-
[text]="messageFor('fieldMenuMoveToColumnsItem')"
|
|
125
|
-
icon="columns"
|
|
126
|
-
[svgIcon]="columnsIcon"
|
|
127
|
-
(itemClick)="move($event, 'columns')">
|
|
128
|
-
</kendo-pivot-chipmenu-item>
|
|
129
|
-
}
|
|
130
|
-
@if (!isMeasureField) {
|
|
131
|
-
<kendo-pivot-chipmenu-item
|
|
132
|
-
[disabled]="isRowsField"
|
|
133
|
-
[text]="messageFor('fieldMenuMoveToRowsItem')"
|
|
134
|
-
icon="rows"
|
|
135
|
-
[svgIcon]="rowsIcon"
|
|
136
|
-
(itemClick)="move($event, 'rows')">
|
|
137
|
-
</kendo-pivot-chipmenu-item>
|
|
138
|
-
}
|
|
139
|
-
<kendo-pivot-chipmenu-item
|
|
140
|
-
[disabled]="isFirst"
|
|
141
|
-
[text]="messageFor('fieldMenuMovePreviousItem')"
|
|
142
|
-
[icon]="rtl ? 'arrow-right' : 'arrow-left'"
|
|
143
|
-
[svgIcon]="rtl ? arrowRightIcon : arrowLeftIcon"
|
|
144
|
-
(itemClick)="move($event, 'prev')">
|
|
145
|
-
</kendo-pivot-chipmenu-item>
|
|
146
|
-
<kendo-pivot-chipmenu-item
|
|
147
|
-
[disabled]="isLast"
|
|
148
|
-
[text]="messageFor('fieldMenuMoveNextItem')"
|
|
149
|
-
[icon]="rtl ? 'arrow-left' : 'arrow-right'"
|
|
150
|
-
[svgIcon]="rtl ? arrowLeftIcon : arrowRightIcon"
|
|
151
|
-
(itemClick)="move($event, 'next')">
|
|
152
|
-
</kendo-pivot-chipmenu-item>
|
|
153
|
-
`, isInline: true, dependencies: [{ kind: "component", type: ChipMenuItemComponent, selector: "kendo-pivot-chipmenu-item", inputs: ["icon", "svgIcon", "text", "selected", "expanded", "disabled"], outputs: ["itemClick", "expand", "collapse"] }] });
|
|
154
|
-
}
|
|
155
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ChipMenuReorderComponent, decorators: [{
|
|
156
|
-
type: Component,
|
|
157
|
-
args: [{
|
|
158
|
-
selector: 'kendo-pivot-chipmenu-reorder',
|
|
159
|
-
template: `
|
|
160
|
-
@if (!isMeasureField) {
|
|
161
|
-
<kendo-pivot-chipmenu-item
|
|
162
|
-
[disabled]="isColumnsField"
|
|
163
|
-
[text]="messageFor('fieldMenuMoveToColumnsItem')"
|
|
164
|
-
icon="columns"
|
|
165
|
-
[svgIcon]="columnsIcon"
|
|
166
|
-
(itemClick)="move($event, 'columns')">
|
|
167
|
-
</kendo-pivot-chipmenu-item>
|
|
168
|
-
}
|
|
169
|
-
@if (!isMeasureField) {
|
|
170
|
-
<kendo-pivot-chipmenu-item
|
|
171
|
-
[disabled]="isRowsField"
|
|
172
|
-
[text]="messageFor('fieldMenuMoveToRowsItem')"
|
|
173
|
-
icon="rows"
|
|
174
|
-
[svgIcon]="rowsIcon"
|
|
175
|
-
(itemClick)="move($event, 'rows')">
|
|
176
|
-
</kendo-pivot-chipmenu-item>
|
|
177
|
-
}
|
|
178
|
-
<kendo-pivot-chipmenu-item
|
|
179
|
-
[disabled]="isFirst"
|
|
180
|
-
[text]="messageFor('fieldMenuMovePreviousItem')"
|
|
181
|
-
[icon]="rtl ? 'arrow-right' : 'arrow-left'"
|
|
182
|
-
[svgIcon]="rtl ? arrowRightIcon : arrowLeftIcon"
|
|
183
|
-
(itemClick)="move($event, 'prev')">
|
|
184
|
-
</kendo-pivot-chipmenu-item>
|
|
185
|
-
<kendo-pivot-chipmenu-item
|
|
186
|
-
[disabled]="isLast"
|
|
187
|
-
[text]="messageFor('fieldMenuMoveNextItem')"
|
|
188
|
-
[icon]="rtl ? 'arrow-left' : 'arrow-right'"
|
|
189
|
-
[svgIcon]="rtl ? arrowLeftIcon : arrowRightIcon"
|
|
190
|
-
(itemClick)="move($event, 'next')">
|
|
191
|
-
</kendo-pivot-chipmenu-item>
|
|
192
|
-
`,
|
|
193
|
-
standalone: true,
|
|
194
|
-
imports: [ChipMenuItemComponent]
|
|
195
|
-
}]
|
|
196
|
-
}], ctorParameters: () => [{ type: i1.PivotLocalizationService }, { type: i0.Renderer2 }, { type: i2.ConfiguratorService }, { type: i3.PivotGridDataService }, { type: i0.ChangeDetectorRef }, { type: i0.NgZone }], propDecorators: { chip: [{
|
|
197
|
-
type: Input
|
|
198
|
-
}] } });
|
|
@@ -1,104 +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 { Component, Input, Renderer2 } from '@angular/core';
|
|
6
|
-
import { ChipMenuItemBase } from './chip-menu-item-base';
|
|
7
|
-
import { ConfiguratorService } from '../configurator.service';
|
|
8
|
-
import { PIVOT_CONFIGURATOR_ACTION } from '@progress/kendo-pivotgrid-common';
|
|
9
|
-
import { PivotLocalizationService } from '../../localization/pivot-localization.service';
|
|
10
|
-
import { sortAscSmallIcon, sortDescSmallIcon } from '@progress/kendo-svg-icons';
|
|
11
|
-
import { ChipMenuItemComponent } from './chip-menu-item.component';
|
|
12
|
-
import * as i0 from "@angular/core";
|
|
13
|
-
import * as i1 from "../../localization/pivot-localization.service";
|
|
14
|
-
import * as i2 from "../configurator.service";
|
|
15
|
-
/**
|
|
16
|
-
* @hidden
|
|
17
|
-
*
|
|
18
|
-
* Represents a chip-menu item for sorting PivotGrid fields.
|
|
19
|
-
* Allows the user to sort the PivotGrid.
|
|
20
|
-
*/
|
|
21
|
-
export class ChipMenuSortComponent extends ChipMenuItemBase {
|
|
22
|
-
localization;
|
|
23
|
-
renderer;
|
|
24
|
-
configuratorService;
|
|
25
|
-
chip;
|
|
26
|
-
sortAscSVGIcon = sortAscSmallIcon;
|
|
27
|
-
sortDescSVGIcon = sortDescSmallIcon;
|
|
28
|
-
constructor(localization, renderer, configuratorService) {
|
|
29
|
-
super();
|
|
30
|
-
this.localization = localization;
|
|
31
|
-
this.renderer = renderer;
|
|
32
|
-
this.configuratorService = configuratorService;
|
|
33
|
-
}
|
|
34
|
-
get sortedAsc() {
|
|
35
|
-
const descriptor = this.descriptor;
|
|
36
|
-
return descriptor && (!descriptor.dir || descriptor.dir === 'asc');
|
|
37
|
-
}
|
|
38
|
-
get sortedDesc() {
|
|
39
|
-
const descriptor = this.descriptor;
|
|
40
|
-
return descriptor && descriptor.dir === 'desc';
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* Returns the localized message for a given token
|
|
44
|
-
*/
|
|
45
|
-
messageFor(localizationToken) {
|
|
46
|
-
return this.localization.get(localizationToken);
|
|
47
|
-
}
|
|
48
|
-
toggleSort(dir) {
|
|
49
|
-
const field = this.chip.name.toString();
|
|
50
|
-
const descriptor = this.descriptor;
|
|
51
|
-
const sort = this.configuratorService.state.sort.filter(s => s.field !== field);
|
|
52
|
-
if (!descriptor || descriptor.dir !== dir) {
|
|
53
|
-
sort.push({ field, dir });
|
|
54
|
-
}
|
|
55
|
-
this.configuratorService.parseConfiguratorState({ type: PIVOT_CONFIGURATOR_ACTION.setSort, payload: sort });
|
|
56
|
-
this.close();
|
|
57
|
-
}
|
|
58
|
-
get descriptor() {
|
|
59
|
-
return [].concat(this.configuratorService.state.sort || []).find(s => s.field === this.chip.name.toString());
|
|
60
|
-
}
|
|
61
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ChipMenuSortComponent, deps: [{ token: i1.PivotLocalizationService }, { token: i0.Renderer2 }, { token: i2.ConfiguratorService }], target: i0.ɵɵFactoryTarget.Component });
|
|
62
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: ChipMenuSortComponent, isStandalone: true, selector: "kendo-pivot-chipmenu-sort", inputs: { chip: "chip" }, usesInheritance: true, ngImport: i0, template: `
|
|
63
|
-
<kendo-pivot-chipmenu-item
|
|
64
|
-
[text]="messageFor('fieldMenuSortAscendingItemLabel')"
|
|
65
|
-
icon="sort-asc-small"
|
|
66
|
-
[svgIcon]="sortAscSVGIcon"
|
|
67
|
-
(itemClick)="toggleSort('asc')"
|
|
68
|
-
[selected]="sortedAsc">
|
|
69
|
-
</kendo-pivot-chipmenu-item>
|
|
70
|
-
<kendo-pivot-chipmenu-item
|
|
71
|
-
[text]="messageFor('fieldMenuSortDescendingItemLabel')"
|
|
72
|
-
icon="sort-desc-small"
|
|
73
|
-
[svgIcon]="sortDescSVGIcon"
|
|
74
|
-
(itemClick)="toggleSort('desc')"
|
|
75
|
-
[selected]="sortedDesc">
|
|
76
|
-
</kendo-pivot-chipmenu-item>
|
|
77
|
-
`, isInline: true, dependencies: [{ kind: "component", type: ChipMenuItemComponent, selector: "kendo-pivot-chipmenu-item", inputs: ["icon", "svgIcon", "text", "selected", "expanded", "disabled"], outputs: ["itemClick", "expand", "collapse"] }] });
|
|
78
|
-
}
|
|
79
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ChipMenuSortComponent, decorators: [{
|
|
80
|
-
type: Component,
|
|
81
|
-
args: [{
|
|
82
|
-
selector: 'kendo-pivot-chipmenu-sort',
|
|
83
|
-
template: `
|
|
84
|
-
<kendo-pivot-chipmenu-item
|
|
85
|
-
[text]="messageFor('fieldMenuSortAscendingItemLabel')"
|
|
86
|
-
icon="sort-asc-small"
|
|
87
|
-
[svgIcon]="sortAscSVGIcon"
|
|
88
|
-
(itemClick)="toggleSort('asc')"
|
|
89
|
-
[selected]="sortedAsc">
|
|
90
|
-
</kendo-pivot-chipmenu-item>
|
|
91
|
-
<kendo-pivot-chipmenu-item
|
|
92
|
-
[text]="messageFor('fieldMenuSortDescendingItemLabel')"
|
|
93
|
-
icon="sort-desc-small"
|
|
94
|
-
[svgIcon]="sortDescSVGIcon"
|
|
95
|
-
(itemClick)="toggleSort('desc')"
|
|
96
|
-
[selected]="sortedDesc">
|
|
97
|
-
</kendo-pivot-chipmenu-item>
|
|
98
|
-
`,
|
|
99
|
-
standalone: true,
|
|
100
|
-
imports: [ChipMenuItemComponent]
|
|
101
|
-
}]
|
|
102
|
-
}], ctorParameters: () => [{ type: i1.PivotLocalizationService }, { type: i0.Renderer2 }, { type: i2.ConfiguratorService }], propDecorators: { chip: [{
|
|
103
|
-
type: Input
|
|
104
|
-
}] } });
|
|
@@ -1,165 +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
|
-
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
6
|
-
import { MenuTabbingService } from './filtering/menu-tabbing.service';
|
|
7
|
-
import { Component, Input, ViewChild, Renderer2, TemplateRef } from '@angular/core';
|
|
8
|
-
import { SinglePopupService } from './single-popup.service';
|
|
9
|
-
import { ChipMenuService } from './chip-menu.service';
|
|
10
|
-
import { PivotLocalizationService } from '../../localization/pivot-localization.service';
|
|
11
|
-
import { moreVerticalIcon } from '@progress/kendo-svg-icons';
|
|
12
|
-
import { ChipMenuReorderComponent } from './chip-menu-reorder.component';
|
|
13
|
-
import { ChipMenuFilterComponent } from './chip-menu-filter.component';
|
|
14
|
-
import { ChipMenuItemDirective } from './chip-menu-item.directive';
|
|
15
|
-
import { ChipMenuSortComponent } from './chip-menu-sort.component';
|
|
16
|
-
import { ChipMenuContainerComponent } from './chip-menu-container.component';
|
|
17
|
-
import { ChipComponent } from '@progress/kendo-angular-buttons';
|
|
18
|
-
import { replaceMessagePlaceholder } from '@progress/kendo-angular-common';
|
|
19
|
-
import * as i0 from "@angular/core";
|
|
20
|
-
import * as i1 from "./single-popup.service";
|
|
21
|
-
import * as i2 from "../../localization/pivot-localization.service";
|
|
22
|
-
import * as i3 from "./chip-menu.service";
|
|
23
|
-
const POPUP_CLASS = 'k-column-menu';
|
|
24
|
-
/**
|
|
25
|
-
* @hidden
|
|
26
|
-
*
|
|
27
|
-
* Represents the field chip menu component.
|
|
28
|
-
*/
|
|
29
|
-
export class ChipMenuComponent {
|
|
30
|
-
popupService;
|
|
31
|
-
localization;
|
|
32
|
-
service;
|
|
33
|
-
renderer;
|
|
34
|
-
/**
|
|
35
|
-
* The Configurator field instance to control with the menu.
|
|
36
|
-
*/
|
|
37
|
-
chip;
|
|
38
|
-
tabIndex = '-1';
|
|
39
|
-
isMeasureField = false;
|
|
40
|
-
anchor;
|
|
41
|
-
template;
|
|
42
|
-
menuItemSVGIcon = moreVerticalIcon;
|
|
43
|
-
popupRef;
|
|
44
|
-
closeSubscription;
|
|
45
|
-
constructor(popupService, localization, service, renderer) {
|
|
46
|
-
this.popupService = popupService;
|
|
47
|
-
this.localization = localization;
|
|
48
|
-
this.service = service;
|
|
49
|
-
this.renderer = renderer;
|
|
50
|
-
this.closeSubscription = service.closeMenu.subscribe(this.close.bind(this));
|
|
51
|
-
}
|
|
52
|
-
ngOnDestroy() {
|
|
53
|
-
this.close();
|
|
54
|
-
this.closeSubscription.unsubscribe();
|
|
55
|
-
}
|
|
56
|
-
toggle(e) {
|
|
57
|
-
if (e?.originalEvent) {
|
|
58
|
-
e.originalEvent.preventDefault();
|
|
59
|
-
e.originalEvent.stopImmediatePropagation();
|
|
60
|
-
}
|
|
61
|
-
const anchorElement = this.anchor.element.nativeElement;
|
|
62
|
-
this.popupRef = this.popupService.open(anchorElement, this.template, this.popupRef, POPUP_CLASS);
|
|
63
|
-
this.popupRef && this.renderer.setAttribute(this.popupRef.popupElement, 'dir', this.localization.rtl ? 'rtl' : 'ltr');
|
|
64
|
-
if (!this.popupRef) {
|
|
65
|
-
anchorElement.focus();
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
close() {
|
|
69
|
-
this.popupService.destroy();
|
|
70
|
-
this.popupRef = null;
|
|
71
|
-
this.anchor.element.nativeElement.closest('.k-chip').focus();
|
|
72
|
-
}
|
|
73
|
-
get chipMenuTitle() {
|
|
74
|
-
const localizationMsg = this.localization.get('chipMenuIconTitle') || '';
|
|
75
|
-
const chipName = this.chip.name.toString();
|
|
76
|
-
return replaceMessagePlaceholder(localizationMsg, 'fieldName', chipName);
|
|
77
|
-
}
|
|
78
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ChipMenuComponent, deps: [{ token: i1.SinglePopupService }, { token: i2.PivotLocalizationService }, { token: i3.ChipMenuService }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
|
|
79
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: ChipMenuComponent, isStandalone: true, selector: "kendo-pivot-chip-menu", inputs: { chip: "chip", tabIndex: "tabIndex", isMeasureField: "isMeasureField", anchor: "anchor" }, providers: [
|
|
80
|
-
ChipMenuService,
|
|
81
|
-
MenuTabbingService
|
|
82
|
-
], viewQueries: [{ propertyName: "template", first: true, predicate: ["template"], descendants: true, static: true }], ngImport: i0, template: `
|
|
83
|
-
<ng-template #template>
|
|
84
|
-
<kendo-pivot-chipmenu-container
|
|
85
|
-
(keydown.escape)="close()"
|
|
86
|
-
(keydown.enter)="$event.stopImmediatePropagation()">
|
|
87
|
-
@if (!isMeasureField) {
|
|
88
|
-
<kendo-pivot-chipmenu-sort
|
|
89
|
-
#sortItem
|
|
90
|
-
[chip]="chip"
|
|
91
|
-
[kendoPivotChipMenuItem]="sortItem"
|
|
92
|
-
[service]="service">
|
|
93
|
-
</kendo-pivot-chipmenu-sort>
|
|
94
|
-
<span class="k-separator" [style.borderColor]="'rgba(0, 0, 0, 0.08)'"></span>
|
|
95
|
-
<kendo-pivot-chipmenu-filter
|
|
96
|
-
#filterItem
|
|
97
|
-
[chip]="chip"
|
|
98
|
-
[isLast]="true"
|
|
99
|
-
[kendoPivotChipMenuItem]="filterItem"
|
|
100
|
-
[service]="service">
|
|
101
|
-
</kendo-pivot-chipmenu-filter>
|
|
102
|
-
<span class="k-separator" [style.borderColor]="'rgba(0, 0, 0, 0.08)'"></span>
|
|
103
|
-
}
|
|
104
|
-
<kendo-pivot-chipmenu-reorder
|
|
105
|
-
#reorderItem
|
|
106
|
-
[chip]="chip"
|
|
107
|
-
[kendoPivotChipMenuItem]="reorderItem"
|
|
108
|
-
[service]="service"></kendo-pivot-chipmenu-reorder>
|
|
109
|
-
</kendo-pivot-chipmenu-container>
|
|
110
|
-
</ng-template>
|
|
111
|
-
`, isInline: true, dependencies: [{ kind: "component", type: ChipMenuContainerComponent, selector: "kendo-pivot-chipmenu-container" }, { kind: "component", type: ChipMenuSortComponent, selector: "kendo-pivot-chipmenu-sort", inputs: ["chip"] }, { kind: "directive", type: ChipMenuItemDirective, selector: "[kendoPivotChipMenuItem]", inputs: ["kendoPivotChipMenuItem"] }, { kind: "component", type: ChipMenuFilterComponent, selector: "kendo-pivot-chipmenu-filter", inputs: ["chip", "expanded", "isLast"], outputs: ["expand", "collapse"] }, { kind: "component", type: ChipMenuReorderComponent, selector: "kendo-pivot-chipmenu-reorder", inputs: ["chip"] }] });
|
|
112
|
-
}
|
|
113
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ChipMenuComponent, decorators: [{
|
|
114
|
-
type: Component,
|
|
115
|
-
args: [{
|
|
116
|
-
providers: [
|
|
117
|
-
ChipMenuService,
|
|
118
|
-
MenuTabbingService
|
|
119
|
-
],
|
|
120
|
-
selector: 'kendo-pivot-chip-menu',
|
|
121
|
-
template: `
|
|
122
|
-
<ng-template #template>
|
|
123
|
-
<kendo-pivot-chipmenu-container
|
|
124
|
-
(keydown.escape)="close()"
|
|
125
|
-
(keydown.enter)="$event.stopImmediatePropagation()">
|
|
126
|
-
@if (!isMeasureField) {
|
|
127
|
-
<kendo-pivot-chipmenu-sort
|
|
128
|
-
#sortItem
|
|
129
|
-
[chip]="chip"
|
|
130
|
-
[kendoPivotChipMenuItem]="sortItem"
|
|
131
|
-
[service]="service">
|
|
132
|
-
</kendo-pivot-chipmenu-sort>
|
|
133
|
-
<span class="k-separator" [style.borderColor]="'rgba(0, 0, 0, 0.08)'"></span>
|
|
134
|
-
<kendo-pivot-chipmenu-filter
|
|
135
|
-
#filterItem
|
|
136
|
-
[chip]="chip"
|
|
137
|
-
[isLast]="true"
|
|
138
|
-
[kendoPivotChipMenuItem]="filterItem"
|
|
139
|
-
[service]="service">
|
|
140
|
-
</kendo-pivot-chipmenu-filter>
|
|
141
|
-
<span class="k-separator" [style.borderColor]="'rgba(0, 0, 0, 0.08)'"></span>
|
|
142
|
-
}
|
|
143
|
-
<kendo-pivot-chipmenu-reorder
|
|
144
|
-
#reorderItem
|
|
145
|
-
[chip]="chip"
|
|
146
|
-
[kendoPivotChipMenuItem]="reorderItem"
|
|
147
|
-
[service]="service"></kendo-pivot-chipmenu-reorder>
|
|
148
|
-
</kendo-pivot-chipmenu-container>
|
|
149
|
-
</ng-template>
|
|
150
|
-
`,
|
|
151
|
-
standalone: true,
|
|
152
|
-
imports: [ChipMenuContainerComponent, ChipMenuSortComponent, ChipMenuItemDirective, ChipMenuFilterComponent, ChipMenuReorderComponent]
|
|
153
|
-
}]
|
|
154
|
-
}], ctorParameters: () => [{ type: i1.SinglePopupService }, { type: i2.PivotLocalizationService }, { type: i3.ChipMenuService }, { type: i0.Renderer2 }], propDecorators: { chip: [{
|
|
155
|
-
type: Input
|
|
156
|
-
}], tabIndex: [{
|
|
157
|
-
type: Input
|
|
158
|
-
}], isMeasureField: [{
|
|
159
|
-
type: Input
|
|
160
|
-
}], anchor: [{
|
|
161
|
-
type: Input
|
|
162
|
-
}], template: [{
|
|
163
|
-
type: ViewChild,
|
|
164
|
-
args: ['template', { static: true }]
|
|
165
|
-
}] } });
|
|
@@ -1,40 +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 { Subscription } from 'rxjs';
|
|
6
|
-
import { ConfiguratorService } from '../configurator.service';
|
|
7
|
-
import { MenuTabbingService } from './filtering/menu-tabbing.service';
|
|
8
|
-
import { Injectable, EventEmitter } from '@angular/core';
|
|
9
|
-
import * as i0 from "@angular/core";
|
|
10
|
-
import * as i1 from "./filtering/menu-tabbing.service";
|
|
11
|
-
import * as i2 from "../configurator.service";
|
|
12
|
-
/**
|
|
13
|
-
* @hidden
|
|
14
|
-
* Represents the service that is passed to the ChipMenuFilterComponent and ChipMenuSortComponent.
|
|
15
|
-
*/
|
|
16
|
-
export class ChipMenuService {
|
|
17
|
-
configuratorService;
|
|
18
|
-
menuTabbingService;
|
|
19
|
-
closeMenu = new EventEmitter();
|
|
20
|
-
sub = new Subscription();
|
|
21
|
-
/**
|
|
22
|
-
* Closes the chip menu.
|
|
23
|
-
*/
|
|
24
|
-
close() {
|
|
25
|
-
this.closeMenu.emit();
|
|
26
|
-
}
|
|
27
|
-
constructor(menuTabbingService, configuratorService) {
|
|
28
|
-
this.configuratorService = configuratorService;
|
|
29
|
-
this.menuTabbingService = menuTabbingService;
|
|
30
|
-
configuratorService && (this.sub = configuratorService.closeMenu.subscribe(() => this.close()));
|
|
31
|
-
}
|
|
32
|
-
ngOnDestroy() {
|
|
33
|
-
this.sub.unsubscribe();
|
|
34
|
-
}
|
|
35
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ChipMenuService, deps: [{ token: i1.MenuTabbingService }, { token: i2.ConfiguratorService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
36
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ChipMenuService });
|
|
37
|
-
}
|
|
38
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ChipMenuService, decorators: [{
|
|
39
|
-
type: Injectable
|
|
40
|
-
}], ctorParameters: () => [{ type: i1.MenuTabbingService }, { type: i2.ConfiguratorService }] });
|