@progress/kendo-angular-pivotgrid 0.2.0-dev.202209020712 → 0.2.0-dev.202209070927
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/bundles/kendo-angular-pivotgrid.umd.js +1 -1
- package/configurator/chip-menu/chip-menu-container.component.d.ts +21 -0
- package/configurator/chip-menu/chip-menu-filter.component.d.ts +44 -0
- package/configurator/chip-menu/chip-menu-item-base.d.ts +22 -0
- package/configurator/chip-menu/chip-menu-item-content-template.directive.d.ts +18 -0
- package/configurator/chip-menu/chip-menu-item.component.d.ts +50 -0
- package/configurator/chip-menu/chip-menu-item.directive.d.ts +32 -0
- package/configurator/chip-menu/chip-menu-sort.component.d.ts +33 -0
- package/configurator/chip-menu/chip-menu.component.d.ts +35 -0
- package/configurator/chip-menu/chip-menu.module.d.ts +26 -0
- package/configurator/chip-menu/chip-menu.service.d.ts +22 -0
- package/configurator/chip-menu/filtering/filter-menu-container.component.d.ts +47 -0
- package/configurator/chip-menu/filtering/filter-menu-dropdownlist.directive.d.ts +19 -0
- package/configurator/chip-menu/filtering/menu-tabbing.service.d.ts +17 -0
- package/configurator/chip-menu/filtering/string-filter-menu.component.d.ts +53 -0
- package/configurator/chip-menu/single-popup.service.d.ts +50 -0
- package/configurator/configurator.component.d.ts +4 -1
- package/data-binding/base-binding-directive.d.ts +10 -1
- package/data-binding/pivotgrid-data.service.d.ts +2 -0
- package/esm2015/configurator/chip-menu/chip-menu-container.component.js +46 -0
- package/esm2015/configurator/chip-menu/chip-menu-filter.component.js +112 -0
- package/esm2015/configurator/chip-menu/chip-menu-item-base.js +36 -0
- package/esm2015/configurator/chip-menu/chip-menu-item-content-template.directive.js +27 -0
- package/esm2015/configurator/chip-menu/chip-menu-item.component.js +157 -0
- package/esm2015/configurator/chip-menu/chip-menu-item.directive.js +88 -0
- package/esm2015/configurator/chip-menu/chip-menu-sort.component.js +89 -0
- package/esm2015/configurator/chip-menu/chip-menu.component.js +130 -0
- package/esm2015/configurator/chip-menu/chip-menu.module.js +83 -0
- package/esm2015/configurator/chip-menu/chip-menu.service.js +28 -0
- package/esm2015/configurator/chip-menu/filtering/filter-menu-container.component.js +173 -0
- package/esm2015/configurator/chip-menu/filtering/filter-menu-dropdownlist.directive.js +38 -0
- package/esm2015/configurator/chip-menu/filtering/menu-tabbing.service.js +20 -0
- package/esm2015/configurator/chip-menu/filtering/string-filter-menu.component.js +133 -0
- package/esm2015/configurator/chip-menu/single-popup.service.js +121 -0
- package/esm2015/configurator/configurator.component.js +56 -33
- package/esm2015/configurator/configurator.service.js +2 -2
- package/esm2015/data-binding/base-binding-directive.js +17 -7
- package/esm2015/data-binding/local-binding.directive.js +3 -3
- package/esm2015/data-binding/olap-binding.directive.js +8 -5
- package/esm2015/localization/messages.js +3 -1
- package/esm2015/localization/pivot-localization.service.js +28 -0
- package/esm2015/models/configurator-settings.js +3 -1
- package/esm2015/package-metadata.js +1 -1
- package/esm2015/pivotgrid.component.js +26 -7
- package/esm2015/pivotgrid.module.js +9 -12
- package/esm2015/rendering/pivotgrid-table.component.js +8 -2
- package/esm2015/shared.module.js +40 -0
- package/esm2015/util.js +59 -28
- package/fesm2015/kendo-angular-pivotgrid.js +1397 -109
- package/localization/messages.d.ts +23 -1
- package/localization/pivot-localization.service.d.ts +19 -0
- package/main.d.ts +1 -0
- package/models/configurator-settings.d.ts +4 -1
- package/package.json +2 -2
- package/pivotgrid.component.d.ts +6 -1
- package/pivotgrid.module.d.ts +6 -7
- package/schematics/ngAdd/index.js +1 -1
- package/schematics/ngAdd/index.js.map +1 -1
- package/shared.module.d.ts +17 -0
- package/util.d.ts +32 -8
|
@@ -3,25 +3,31 @@
|
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
import * as i0 from '@angular/core';
|
|
6
|
-
import { EventEmitter, Injectable, Output, Component, HostBinding, Input, Directive, Optional,
|
|
6
|
+
import { EventEmitter, Injectable, Output, Component, HostBinding, Input, Directive, ContentChildren, isDevMode, Optional, ContentChild, forwardRef, ViewChild, ElementRef, NgModule } from '@angular/core';
|
|
7
7
|
import { validatePackage } from '@progress/kendo-licensing';
|
|
8
8
|
import * as i3 from '@progress/kendo-angular-common';
|
|
9
|
-
import { isDocumentAvailable,
|
|
9
|
+
import { isDocumentAvailable, PreventableEvent, Keys, isChanged, hasObservers, anyChanged, EventsModule, DraggableModule } from '@progress/kendo-angular-common';
|
|
10
10
|
import { toTree, toRows, toColumns, toData, configuratorReducer, PIVOT_CONFIGURATOR_ACTION, PivotGridNavigation, HEADERS_ACTION, headersReducer, createFlatSchemaDimensions, createDataTree, createLocalDataState, rootFields, fetchData, createDataState, fetchDiscover, addKPI, buildKPIMeasures } from '@progress/kendo-pivotgrid-common';
|
|
11
11
|
export { averageAggregate, maxAggregate, minAggregate, sumAggregate } from '@progress/kendo-pivotgrid-common';
|
|
12
|
-
import { BehaviorSubject, Subscription, from, of, fromEvent } from 'rxjs';
|
|
13
|
-
import { mergeMap, merge } from 'rxjs/operators';
|
|
14
|
-
import * as
|
|
12
|
+
import { BehaviorSubject, Subscription, Subject, from, of, fromEvent } from 'rxjs';
|
|
13
|
+
import { take, mergeMap, merge } from 'rxjs/operators';
|
|
14
|
+
import * as i1 from '@progress/kendo-angular-l10n';
|
|
15
15
|
import { ComponentMessages, LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
|
|
16
|
-
import * as
|
|
16
|
+
import * as i7 from '@angular/common';
|
|
17
17
|
import { CommonModule } from '@angular/common';
|
|
18
18
|
import * as i5$1 from '@progress/kendo-angular-indicators';
|
|
19
19
|
import { IndicatorsModule } from '@progress/kendo-angular-indicators';
|
|
20
|
+
import * as i1$1 from '@progress/kendo-angular-popup';
|
|
20
21
|
import * as i4 from '@progress/kendo-angular-treeview';
|
|
21
22
|
import { TreeViewModule } from '@progress/kendo-angular-treeview';
|
|
22
23
|
import * as i5 from '@progress/kendo-angular-buttons';
|
|
23
24
|
import { ButtonsModule } from '@progress/kendo-angular-buttons';
|
|
24
|
-
import
|
|
25
|
+
import { trigger, state, style, transition, animate } from '@angular/animations';
|
|
26
|
+
import * as i3$1 from '@angular/forms';
|
|
27
|
+
import { NG_VALUE_ACCESSOR, ReactiveFormsModule, FormsModule } from '@angular/forms';
|
|
28
|
+
import * as i1$2 from '@progress/kendo-angular-dropdowns';
|
|
29
|
+
import { DropDownsModule } from '@progress/kendo-angular-dropdowns';
|
|
30
|
+
import * as i6 from '@progress/kendo-angular-inputs';
|
|
25
31
|
import { InputsModule } from '@progress/kendo-angular-inputs';
|
|
26
32
|
import { __awaiter } from 'tslib';
|
|
27
33
|
|
|
@@ -32,15 +38,24 @@ const packageMetadata = {
|
|
|
32
38
|
name: '@progress/kendo-angular-pivotgrid',
|
|
33
39
|
productName: 'Kendo UI for Angular',
|
|
34
40
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
35
|
-
publishDate:
|
|
41
|
+
publishDate: 1662542827,
|
|
36
42
|
version: '',
|
|
37
43
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning'
|
|
38
44
|
};
|
|
39
45
|
|
|
46
|
+
const EMPTY_REGEX = /^\s*$/;
|
|
40
47
|
/**
|
|
41
48
|
* @hidden
|
|
42
49
|
*/
|
|
43
50
|
const isPresent = (value) => value !== null && value !== undefined;
|
|
51
|
+
/**
|
|
52
|
+
* @hidden
|
|
53
|
+
*/
|
|
54
|
+
const isBlank = (value) => value === null || value === undefined;
|
|
55
|
+
/**
|
|
56
|
+
* @hidden
|
|
57
|
+
*/
|
|
58
|
+
const isNullOrEmptyString = (value) => isBlank(value) || EMPTY_REGEX.test(value);
|
|
44
59
|
/**
|
|
45
60
|
* @hidden
|
|
46
61
|
* Returns whether two arrays contain the same values.
|
|
@@ -99,34 +114,6 @@ const syncWheel = (event, tables, prop, axis) => {
|
|
|
99
114
|
tables[1][prop] += delta;
|
|
100
115
|
}
|
|
101
116
|
};
|
|
102
|
-
/**
|
|
103
|
-
* @hidden
|
|
104
|
-
*/
|
|
105
|
-
function cloneTo(obj, result) {
|
|
106
|
-
for (let field in obj) {
|
|
107
|
-
if (obj.hasOwnProperty(field)) {
|
|
108
|
-
const value = obj[field];
|
|
109
|
-
if (Array.isArray(value)) {
|
|
110
|
-
result[field] = value.slice(0);
|
|
111
|
-
}
|
|
112
|
-
else if (value && typeof value === 'object' && !(value instanceof Date)) {
|
|
113
|
-
result[field] = result[field] || {};
|
|
114
|
-
cloneTo(value, result[field]);
|
|
115
|
-
}
|
|
116
|
-
else {
|
|
117
|
-
result[field] = value;
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
/**
|
|
123
|
-
* @hidden
|
|
124
|
-
*/
|
|
125
|
-
function clone(obj) {
|
|
126
|
-
const result = {};
|
|
127
|
-
cloneTo(obj, result);
|
|
128
|
-
return result;
|
|
129
|
-
}
|
|
130
117
|
/**
|
|
131
118
|
* @hidden
|
|
132
119
|
*/
|
|
@@ -185,6 +172,56 @@ const position = (target, before) => {
|
|
|
185
172
|
* @hidden
|
|
186
173
|
*/
|
|
187
174
|
const filterAndMap = (arr, predicate, mapper) => arr.reduce((acc, curr) => predicate(curr) ? [...acc, mapper(curr)] : acc, []);
|
|
175
|
+
/**
|
|
176
|
+
* @hidden
|
|
177
|
+
*/
|
|
178
|
+
const replaceMessagePlaceholder = (message, name, value) => message.replace(new RegExp(`\{\\s*${name}\\s*\}`, 'g'), value);
|
|
179
|
+
/**
|
|
180
|
+
* @hidden
|
|
181
|
+
*/
|
|
182
|
+
const cloneDate = (date) => date ? new Date(date.getTime()) : null;
|
|
183
|
+
/**
|
|
184
|
+
* @hidden
|
|
185
|
+
*/
|
|
186
|
+
function clone(obj) {
|
|
187
|
+
const result = {};
|
|
188
|
+
cloneObject(obj, result);
|
|
189
|
+
return result;
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
* @hidden
|
|
193
|
+
*/
|
|
194
|
+
function cloneObject(obj, result) {
|
|
195
|
+
for (let field in obj) {
|
|
196
|
+
if (obj.hasOwnProperty(field)) {
|
|
197
|
+
const value = obj[field];
|
|
198
|
+
result[field] = cloneValue(value, result[field]);
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
/**
|
|
203
|
+
* @hidden
|
|
204
|
+
*/
|
|
205
|
+
function cloneValue(value, nextValue) {
|
|
206
|
+
if (Array.isArray(value)) {
|
|
207
|
+
return cloneArray(value);
|
|
208
|
+
}
|
|
209
|
+
else if (value instanceof Date) {
|
|
210
|
+
return cloneDate(value);
|
|
211
|
+
}
|
|
212
|
+
else if (value && typeof value === 'object') {
|
|
213
|
+
const newNextValue = nextValue || {};
|
|
214
|
+
cloneObject(value, newNextValue);
|
|
215
|
+
return newNextValue;
|
|
216
|
+
}
|
|
217
|
+
return value;
|
|
218
|
+
}
|
|
219
|
+
/**
|
|
220
|
+
* @hidden
|
|
221
|
+
*/
|
|
222
|
+
function cloneArray(array) {
|
|
223
|
+
return array.map(value => cloneValue(value, undefined));
|
|
224
|
+
}
|
|
188
225
|
|
|
189
226
|
/**
|
|
190
227
|
* @hidden
|
|
@@ -242,6 +279,28 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
242
279
|
type: Output
|
|
243
280
|
}] } });
|
|
244
281
|
|
|
282
|
+
/**
|
|
283
|
+
* @hidden
|
|
284
|
+
*
|
|
285
|
+
* Needed to keep the Pivot's LocalizationService reference and be able to use it inside the ChipList component.
|
|
286
|
+
*/
|
|
287
|
+
class PivotLocalizationService {
|
|
288
|
+
constructor(localization) {
|
|
289
|
+
this.localization = localization;
|
|
290
|
+
}
|
|
291
|
+
get(token) {
|
|
292
|
+
return this.localization.get(token);
|
|
293
|
+
}
|
|
294
|
+
get rtl() {
|
|
295
|
+
return this.localization.rtl;
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
PivotLocalizationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PivotLocalizationService, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
299
|
+
PivotLocalizationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PivotLocalizationService });
|
|
300
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PivotLocalizationService, decorators: [{
|
|
301
|
+
type: Injectable
|
|
302
|
+
}], ctorParameters: function () { return [{ type: i1.LocalizationService }]; } });
|
|
303
|
+
|
|
245
304
|
/**
|
|
246
305
|
* @hidden
|
|
247
306
|
*/
|
|
@@ -295,7 +354,7 @@ PivotGridCellDirective.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0",
|
|
|
295
354
|
[ngClass]="{
|
|
296
355
|
'k-i-arrow-chevron-up': expanded,
|
|
297
356
|
'k-i-arrow-chevron-down': !expanded
|
|
298
|
-
}"></span>{{ kendoPivotGridCell.data ? kendoPivotGridCell.data.fmtValue : kendoPivotGridCell.caption }}`, isInline: true, directives: [{ type:
|
|
357
|
+
}"></span>{{ kendoPivotGridCell.data ? kendoPivotGridCell.data.fmtValue : kendoPivotGridCell.caption }}`, isInline: true, directives: [{ type: i7.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.EventsOutsideAngularDirective, selector: "[kendoEventsOutsideAngular]", inputs: ["kendoEventsOutsideAngular", "scope"] }, { type: i7.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
|
|
299
358
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PivotGridCellDirective, decorators: [{
|
|
300
359
|
type: Component,
|
|
301
360
|
args: [{
|
|
@@ -384,7 +443,7 @@ PivotGridTableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0"
|
|
|
384
443
|
</tr>
|
|
385
444
|
</tbody>
|
|
386
445
|
</table>
|
|
387
|
-
`, isInline: true, components: [{ type: PivotGridCellDirective, selector: "[kendoPivotGridCell]", inputs: ["kendoPivotGridCell", "tableType", "rowIndex", "colIndex"] }], directives: [{ type:
|
|
446
|
+
`, isInline: true, styles: ["\n /** TODO: Remove if added to themes */\n .k-pivotgrid-cell:focus {\n outline: none;\n }\n "], components: [{ type: PivotGridCellDirective, selector: "[kendoPivotGridCell]", inputs: ["kendoPivotGridCell", "tableType", "rowIndex", "colIndex"] }], directives: [{ type: i7.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i7.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
388
447
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PivotGridTableComponent, decorators: [{
|
|
389
448
|
type: Component,
|
|
390
449
|
args: [{
|
|
@@ -424,7 +483,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
424
483
|
</tr>
|
|
425
484
|
</tbody>
|
|
426
485
|
</table>
|
|
427
|
-
|
|
486
|
+
`,
|
|
487
|
+
styles: [`
|
|
488
|
+
/** TODO: Remove if added to themes */
|
|
489
|
+
.k-pivotgrid-cell:focus {
|
|
490
|
+
outline: none;
|
|
491
|
+
}
|
|
492
|
+
`]
|
|
428
493
|
}]
|
|
429
494
|
}], ctorParameters: function () { return [{ type: PivotGridDataService }]; }, propDecorators: { tableType: [{
|
|
430
495
|
type: Input
|
|
@@ -441,8 +506,8 @@ class ConfiguratorService {
|
|
|
441
506
|
}
|
|
442
507
|
parseConfiguratorState(action) {
|
|
443
508
|
const newState = configuratorReducer({
|
|
444
|
-
filter:
|
|
445
|
-
sort:
|
|
509
|
+
filter: this.state.filter,
|
|
510
|
+
sort: this.state.sort,
|
|
446
511
|
rowAxes: this.state.rowAxes,
|
|
447
512
|
columnAxes: this.state.columnAxes,
|
|
448
513
|
measureAxes: this.state.measureAxes,
|
|
@@ -523,6 +588,1079 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
523
588
|
type: Injectable
|
|
524
589
|
}] });
|
|
525
590
|
|
|
591
|
+
const contains = (node, predicate) => {
|
|
592
|
+
while (node) {
|
|
593
|
+
if (predicate(node)) {
|
|
594
|
+
return true;
|
|
595
|
+
}
|
|
596
|
+
node = node.parentNode;
|
|
597
|
+
}
|
|
598
|
+
return false;
|
|
599
|
+
};
|
|
600
|
+
/**
|
|
601
|
+
* @hidden
|
|
602
|
+
* Arguments for the `close` event of the chip-menu popup.
|
|
603
|
+
*/
|
|
604
|
+
class PopupCloseEvent extends PreventableEvent {
|
|
605
|
+
constructor(e) {
|
|
606
|
+
super();
|
|
607
|
+
this.originalEvent = e;
|
|
608
|
+
}
|
|
609
|
+
}
|
|
610
|
+
const DEFAULT_POPUP_CLASS = 'k-grid-filter-popup';
|
|
611
|
+
/**
|
|
612
|
+
* @hidden
|
|
613
|
+
* The service that is used for the popups of the chip menus.
|
|
614
|
+
*/
|
|
615
|
+
class SinglePopupService {
|
|
616
|
+
constructor(popupService, renderer, ngZone, localization) {
|
|
617
|
+
this.popupService = popupService;
|
|
618
|
+
this.renderer = renderer;
|
|
619
|
+
this.ngZone = ngZone;
|
|
620
|
+
this.localization = localization;
|
|
621
|
+
/**
|
|
622
|
+
* Fires when the chip menus are about to close because the user clicked outside their popups.
|
|
623
|
+
* Used to prevent the popup from closing.
|
|
624
|
+
*/
|
|
625
|
+
this.onClose = new Subject();
|
|
626
|
+
this.pointerEventsSub = new Subscription();
|
|
627
|
+
this.scrollSubscription = new Subscription();
|
|
628
|
+
}
|
|
629
|
+
open(anchor, template, popupRef, popupClass = DEFAULT_POPUP_CLASS) {
|
|
630
|
+
var _a;
|
|
631
|
+
const toggle = isPresent(popupRef) && this.popupRef === popupRef;
|
|
632
|
+
this.destroy();
|
|
633
|
+
if (!toggle) {
|
|
634
|
+
const direction = this.localization.rtl ? 'right' : 'left';
|
|
635
|
+
this.popupRef = this.popupService.open({
|
|
636
|
+
anchorAlign: { vertical: 'bottom', horizontal: direction },
|
|
637
|
+
popupAlign: { vertical: 'top', horizontal: direction },
|
|
638
|
+
anchor: anchor,
|
|
639
|
+
popupClass: popupClass,
|
|
640
|
+
content: template,
|
|
641
|
+
positionMode: "absolute"
|
|
642
|
+
});
|
|
643
|
+
this.renderer.setAttribute(this.popupRef.popupElement, 'dir', this.localization.rtl ? 'rtl' : 'ltr');
|
|
644
|
+
this.attachClose(anchor);
|
|
645
|
+
}
|
|
646
|
+
const popupEl = (_a = this.popupRef) === null || _a === void 0 ? void 0 : _a.popupElement;
|
|
647
|
+
if (popupEl) {
|
|
648
|
+
this.attachMouseListeners(popupEl);
|
|
649
|
+
}
|
|
650
|
+
return this.popupRef;
|
|
651
|
+
}
|
|
652
|
+
destroy() {
|
|
653
|
+
if (this.popupRef) {
|
|
654
|
+
this.detachClose();
|
|
655
|
+
this.pointerEventsSub.unsubscribe();
|
|
656
|
+
this.pointerEventsSub = null;
|
|
657
|
+
this.popupRef.close();
|
|
658
|
+
this.popupRef = null;
|
|
659
|
+
}
|
|
660
|
+
}
|
|
661
|
+
ngOnDestroy() {
|
|
662
|
+
this.destroy();
|
|
663
|
+
this.scrollSubscription.unsubscribe();
|
|
664
|
+
}
|
|
665
|
+
detachClose() {
|
|
666
|
+
if (this.removeClick) {
|
|
667
|
+
this.removeClick();
|
|
668
|
+
}
|
|
669
|
+
}
|
|
670
|
+
attachClose(skipElement) {
|
|
671
|
+
this.detachClose();
|
|
672
|
+
this.ngZone.runOutsideAngular(() => this.removeClick = this.renderer.listen('document', 'click', (e) => {
|
|
673
|
+
if (!contains(e.target, x => this.popupRef.popupElement === x || x === skipElement)) {
|
|
674
|
+
const args = new PopupCloseEvent(e);
|
|
675
|
+
this.onClose.next(args);
|
|
676
|
+
if (!args.isDefaultPrevented() && this.canClosePopup) {
|
|
677
|
+
this.destroy();
|
|
678
|
+
}
|
|
679
|
+
this.canClosePopup = true;
|
|
680
|
+
}
|
|
681
|
+
}));
|
|
682
|
+
}
|
|
683
|
+
attachMouseListeners(el) {
|
|
684
|
+
this.pointerEventsSub = new Subscription();
|
|
685
|
+
this.ngZone.runOutsideAngular(() => {
|
|
686
|
+
this.pointerEventsSub.add(this.renderer.listen(el, 'pointerdown', (e) => {
|
|
687
|
+
e.stopImmediatePropagation();
|
|
688
|
+
this.canClosePopup = false;
|
|
689
|
+
}));
|
|
690
|
+
this.pointerEventsSub.add(this.renderer.listen(el, 'pointerup', () => {
|
|
691
|
+
this.canClosePopup = true;
|
|
692
|
+
}));
|
|
693
|
+
});
|
|
694
|
+
}
|
|
695
|
+
}
|
|
696
|
+
SinglePopupService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SinglePopupService, deps: [{ token: i1$1.PopupService }, { token: i0.Renderer2 }, { token: i0.NgZone }, { token: PivotLocalizationService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
697
|
+
SinglePopupService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SinglePopupService });
|
|
698
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SinglePopupService, decorators: [{
|
|
699
|
+
type: Injectable
|
|
700
|
+
}], ctorParameters: function () { return [{ type: i1$1.PopupService }, { type: i0.Renderer2 }, { type: i0.NgZone }, { type: PivotLocalizationService }]; } });
|
|
701
|
+
|
|
702
|
+
/**
|
|
703
|
+
* @hidden
|
|
704
|
+
*/
|
|
705
|
+
class MenuTabbingService {
|
|
706
|
+
constructor() {
|
|
707
|
+
this.isColumnMenu = false;
|
|
708
|
+
this.isPopupOpen = false;
|
|
709
|
+
}
|
|
710
|
+
}
|
|
711
|
+
MenuTabbingService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: MenuTabbingService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
712
|
+
MenuTabbingService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: MenuTabbingService });
|
|
713
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: MenuTabbingService, decorators: [{
|
|
714
|
+
type: Injectable
|
|
715
|
+
}] });
|
|
716
|
+
|
|
717
|
+
/**
|
|
718
|
+
* @hidden
|
|
719
|
+
* Represents the service that is passed to the ChipMenuFilterComponent and ChipMenuSortComponent.
|
|
720
|
+
*/
|
|
721
|
+
class ChipMenuService {
|
|
722
|
+
constructor(menuTabbingService) {
|
|
723
|
+
this.closeMenu = new EventEmitter();
|
|
724
|
+
this.menuTabbingService = menuTabbingService;
|
|
725
|
+
}
|
|
726
|
+
/**
|
|
727
|
+
* Closes the chip menu.
|
|
728
|
+
*/
|
|
729
|
+
close() {
|
|
730
|
+
this.closeMenu.emit();
|
|
731
|
+
}
|
|
732
|
+
}
|
|
733
|
+
ChipMenuService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ChipMenuService, deps: [{ token: MenuTabbingService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
734
|
+
ChipMenuService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ChipMenuService });
|
|
735
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ChipMenuService, decorators: [{
|
|
736
|
+
type: Injectable
|
|
737
|
+
}], ctorParameters: function () { return [{ type: MenuTabbingService }]; } });
|
|
738
|
+
|
|
739
|
+
/**
|
|
740
|
+
* @hidden
|
|
741
|
+
*/
|
|
742
|
+
class ChipMenuItemDirective {
|
|
743
|
+
constructor(hostElement, renderer, ngZone) {
|
|
744
|
+
this.hostElement = hostElement;
|
|
745
|
+
this.renderer = renderer;
|
|
746
|
+
this.ngZone = ngZone;
|
|
747
|
+
this._isFirst = false;
|
|
748
|
+
this._isLast = false;
|
|
749
|
+
this.subs = new Subscription();
|
|
750
|
+
this.onTab = (e) => {
|
|
751
|
+
if (e.keyCode !== Keys.Tab) {
|
|
752
|
+
return;
|
|
753
|
+
}
|
|
754
|
+
if (this.isFirst && e.shiftKey && e.target === this.chipMenuItems[0]) {
|
|
755
|
+
e.preventDefault();
|
|
756
|
+
this.menuItemComponent.service.menuTabbingService.lastFocusable.focus();
|
|
757
|
+
}
|
|
758
|
+
if (this.isLast && !e.shiftKey) {
|
|
759
|
+
const lastColumnMenuItem = this.getLastColumnMenuItem();
|
|
760
|
+
const isExpanded = this.menuItemComponent.expanded;
|
|
761
|
+
if (lastColumnMenuItem === e.target && !isExpanded) {
|
|
762
|
+
e.preventDefault();
|
|
763
|
+
this.menuItemComponent.service.menuTabbingService.firstFocusable.focus();
|
|
764
|
+
}
|
|
765
|
+
}
|
|
766
|
+
};
|
|
767
|
+
}
|
|
768
|
+
set isFirst(value) {
|
|
769
|
+
if (value) {
|
|
770
|
+
const focusableElement = this.chipMenuItems[0];
|
|
771
|
+
this.menuItemComponent.service.menuTabbingService.firstFocusable = focusableElement;
|
|
772
|
+
this.ngZone.runOutsideAngular(() => {
|
|
773
|
+
const firstItemKeydownSub = this.renderer.listen(focusableElement, 'keydown', this.onTab);
|
|
774
|
+
this.subs.add(firstItemKeydownSub);
|
|
775
|
+
});
|
|
776
|
+
}
|
|
777
|
+
this._isFirst = value;
|
|
778
|
+
}
|
|
779
|
+
get isFirst() {
|
|
780
|
+
return this._isFirst;
|
|
781
|
+
}
|
|
782
|
+
set isLast(value) {
|
|
783
|
+
if (!this.chipMenuItems) {
|
|
784
|
+
return;
|
|
785
|
+
}
|
|
786
|
+
if (value) {
|
|
787
|
+
const lastFocusableElement = this.getLastColumnMenuItem();
|
|
788
|
+
this.menuItemComponent.service.menuTabbingService.lastFocusable = lastFocusableElement;
|
|
789
|
+
this.ngZone.runOutsideAngular(() => {
|
|
790
|
+
const lastItemKeydownSub = this.renderer.listen(lastFocusableElement, 'keydown', this.onTab);
|
|
791
|
+
this.subs.add(lastItemKeydownSub);
|
|
792
|
+
});
|
|
793
|
+
}
|
|
794
|
+
this._isLast = value;
|
|
795
|
+
}
|
|
796
|
+
get isLast() {
|
|
797
|
+
return this._isLast;
|
|
798
|
+
}
|
|
799
|
+
ngAfterViewInit() {
|
|
800
|
+
this.chipMenuItems = this.hostElement.nativeElement.querySelectorAll('.k-columnmenu-item');
|
|
801
|
+
this.chipMenuItems.forEach(el => this.renderer.setAttribute(el, 'tabindex', '0'));
|
|
802
|
+
}
|
|
803
|
+
ngOnDestroy() {
|
|
804
|
+
this.subs.unsubscribe();
|
|
805
|
+
}
|
|
806
|
+
getLastColumnMenuItem() {
|
|
807
|
+
return (this.chipMenuItems.length === 1 ? this.chipMenuItems[0] : this.chipMenuItems[1]);
|
|
808
|
+
}
|
|
809
|
+
}
|
|
810
|
+
ChipMenuItemDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ChipMenuItemDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Directive });
|
|
811
|
+
ChipMenuItemDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: ChipMenuItemDirective, selector: "[kendoPivotChipMenuItem]", inputs: { menuItemComponent: ["kendoPivotChipMenuItem", "menuItemComponent"] }, ngImport: i0 });
|
|
812
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ChipMenuItemDirective, decorators: [{
|
|
813
|
+
type: Directive,
|
|
814
|
+
args: [{ selector: '[kendoPivotChipMenuItem]' }]
|
|
815
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.NgZone }]; }, propDecorators: { menuItemComponent: [{
|
|
816
|
+
type: Input,
|
|
817
|
+
args: ['kendoPivotChipMenuItem']
|
|
818
|
+
}] } });
|
|
819
|
+
|
|
820
|
+
/**
|
|
821
|
+
* @hidden
|
|
822
|
+
*/
|
|
823
|
+
class ChipMenuContainerComponent {
|
|
824
|
+
constructor(service, ngZone) {
|
|
825
|
+
this.service = service;
|
|
826
|
+
this.ngZone = ngZone;
|
|
827
|
+
this.hostClass = true;
|
|
828
|
+
}
|
|
829
|
+
ngAfterViewInit() {
|
|
830
|
+
if (!this.chipMenuItems.length) {
|
|
831
|
+
return;
|
|
832
|
+
}
|
|
833
|
+
this.chipMenuItems.first.isFirst = true;
|
|
834
|
+
this.chipMenuItems.last.isLast = true;
|
|
835
|
+
this.ngZone.onStable.pipe(take(1)).subscribe(() => this.service.menuTabbingService.firstFocusable.focus());
|
|
836
|
+
}
|
|
837
|
+
}
|
|
838
|
+
ChipMenuContainerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ChipMenuContainerComponent, deps: [{ token: ChipMenuService }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
|
|
839
|
+
ChipMenuContainerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: ChipMenuContainerComponent, selector: "kendo-pivot-chipmenu-container", host: { properties: { "class.k-grid-columnmenu-popup": "this.hostClass" } }, queries: [{ propertyName: "chipMenuItems", predicate: ChipMenuItemDirective, descendants: true }], ngImport: i0, template: `
|
|
840
|
+
<ng-content></ng-content>
|
|
841
|
+
`, isInline: true });
|
|
842
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ChipMenuContainerComponent, decorators: [{
|
|
843
|
+
type: Component,
|
|
844
|
+
args: [{
|
|
845
|
+
selector: 'kendo-pivot-chipmenu-container',
|
|
846
|
+
template: `
|
|
847
|
+
<ng-content></ng-content>
|
|
848
|
+
`
|
|
849
|
+
}]
|
|
850
|
+
}], ctorParameters: function () { return [{ type: ChipMenuService }, { type: i0.NgZone }]; }, propDecorators: { chipMenuItems: [{
|
|
851
|
+
type: ContentChildren,
|
|
852
|
+
args: [ChipMenuItemDirective, { descendants: true }]
|
|
853
|
+
}], hostClass: [{
|
|
854
|
+
type: HostBinding,
|
|
855
|
+
args: ['class.k-grid-columnmenu-popup']
|
|
856
|
+
}] } });
|
|
857
|
+
|
|
858
|
+
/**
|
|
859
|
+
* @hidden
|
|
860
|
+
*/
|
|
861
|
+
class ChipMenuItemBase {
|
|
862
|
+
constructor() {
|
|
863
|
+
this.hostClass = true;
|
|
864
|
+
}
|
|
865
|
+
ngOnInit() {
|
|
866
|
+
if (isDevMode() && !this.service) {
|
|
867
|
+
throw new Error('The service input of the host chip menu components (e.g. ChipMenuSortComponent) is mandatory.');
|
|
868
|
+
}
|
|
869
|
+
}
|
|
870
|
+
close() {
|
|
871
|
+
this.service.close();
|
|
872
|
+
}
|
|
873
|
+
}
|
|
874
|
+
ChipMenuItemBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ChipMenuItemBase, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
875
|
+
ChipMenuItemBase.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: ChipMenuItemBase, selector: "kendo-pivot-chip-menu-item-base", inputs: { service: "service" }, host: { properties: { "class.k-columnmenu-item-wrapper": "this.hostClass" } }, ngImport: i0, template: ``, isInline: true });
|
|
876
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ChipMenuItemBase, decorators: [{
|
|
877
|
+
type: Component,
|
|
878
|
+
args: [{
|
|
879
|
+
selector: 'kendo-pivot-chip-menu-item-base',
|
|
880
|
+
template: ``
|
|
881
|
+
}]
|
|
882
|
+
}], propDecorators: { service: [{
|
|
883
|
+
type: Input
|
|
884
|
+
}], hostClass: [{
|
|
885
|
+
type: HostBinding,
|
|
886
|
+
args: ['class.k-columnmenu-item-wrapper']
|
|
887
|
+
}] } });
|
|
888
|
+
|
|
889
|
+
/**
|
|
890
|
+
* @hidden
|
|
891
|
+
*
|
|
892
|
+
* Represents the content template of the ChipMenuItemComponent.
|
|
893
|
+
* Provides an option for specifying the content of a chip menu item..
|
|
894
|
+
*/
|
|
895
|
+
class ChipMenuItemContentTemplateDirective {
|
|
896
|
+
constructor(templateRef) {
|
|
897
|
+
this.templateRef = templateRef;
|
|
898
|
+
}
|
|
899
|
+
}
|
|
900
|
+
ChipMenuItemContentTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ChipMenuItemContentTemplateDirective, deps: [{ token: i0.TemplateRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
901
|
+
ChipMenuItemContentTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: ChipMenuItemContentTemplateDirective, selector: "[kendoPivotChipMenuItemContentTemplate]", ngImport: i0 });
|
|
902
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ChipMenuItemContentTemplateDirective, decorators: [{
|
|
903
|
+
type: Directive,
|
|
904
|
+
args: [{
|
|
905
|
+
selector: '[kendoPivotChipMenuItemContentTemplate]'
|
|
906
|
+
}]
|
|
907
|
+
}], ctorParameters: function () { return [{ type: i0.TemplateRef, decorators: [{
|
|
908
|
+
type: Optional
|
|
909
|
+
}] }]; } });
|
|
910
|
+
|
|
911
|
+
/**
|
|
912
|
+
* @hidden
|
|
913
|
+
*
|
|
914
|
+
*/
|
|
915
|
+
class ChipMenuItemComponent {
|
|
916
|
+
constructor() {
|
|
917
|
+
/**
|
|
918
|
+
* Fires when the item is clicked.
|
|
919
|
+
*/
|
|
920
|
+
this.itemClick = new EventEmitter();
|
|
921
|
+
/**
|
|
922
|
+
* Fires when the content is expanded.
|
|
923
|
+
*/
|
|
924
|
+
this.expand = new EventEmitter();
|
|
925
|
+
/**
|
|
926
|
+
* Fires when the content is collapsed.
|
|
927
|
+
*/
|
|
928
|
+
this.collapse = new EventEmitter();
|
|
929
|
+
this.contentState = 'collapsed';
|
|
930
|
+
}
|
|
931
|
+
get iconClass() {
|
|
932
|
+
return `k-i-${this.icon}`;
|
|
933
|
+
}
|
|
934
|
+
ngOnChanges(changes) {
|
|
935
|
+
if (changes.expanded) {
|
|
936
|
+
this.updateContentState();
|
|
937
|
+
}
|
|
938
|
+
}
|
|
939
|
+
onClick(e) {
|
|
940
|
+
this.itemClick.emit(e);
|
|
941
|
+
if (this.contentTemplate) {
|
|
942
|
+
this.expanded = !this.expanded;
|
|
943
|
+
this.updateContentState();
|
|
944
|
+
if (this.expanded) {
|
|
945
|
+
this.expand.emit();
|
|
946
|
+
}
|
|
947
|
+
else {
|
|
948
|
+
this.collapse.emit();
|
|
949
|
+
}
|
|
950
|
+
}
|
|
951
|
+
}
|
|
952
|
+
updateContentState() {
|
|
953
|
+
this.contentState = this.expanded ? 'expanded' : 'collapsed';
|
|
954
|
+
}
|
|
955
|
+
}
|
|
956
|
+
ChipMenuItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ChipMenuItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
957
|
+
ChipMenuItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: ChipMenuItemComponent, selector: "kendo-pivot-chipmenu-item", inputs: { icon: "icon", text: "text", selected: "selected", expanded: "expanded" }, outputs: { itemClick: "itemClick", expand: "expand", collapse: "collapse" }, queries: [{ propertyName: "contentTemplate", first: true, predicate: ChipMenuItemContentTemplateDirective, descendants: true }], usesOnChanges: true, ngImport: i0, template: `
|
|
958
|
+
<div
|
|
959
|
+
class="k-columnmenu-item"
|
|
960
|
+
(click)="onClick($event)"
|
|
961
|
+
(keydown.enter)="onClick($event)"
|
|
962
|
+
[class.k-selected]="selected"
|
|
963
|
+
role="button"
|
|
964
|
+
[attr.aria-expanded]="expanded">
|
|
965
|
+
<span *ngIf="icon" class="k-icon" [ngClass]="iconClass">
|
|
966
|
+
</span>
|
|
967
|
+
{{ text }}
|
|
968
|
+
</div>
|
|
969
|
+
<div *ngIf="contentTemplate" [@state]="contentState" style="overflow:hidden;" class="k-columnmenu-item-content">
|
|
970
|
+
<ng-container [ngTemplateOutlet]="contentTemplate.templateRef">
|
|
971
|
+
</ng-container>
|
|
972
|
+
<div>
|
|
973
|
+
`, isInline: true, directives: [{ type: i7.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i7.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i7.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], animations: [
|
|
974
|
+
trigger('state', [
|
|
975
|
+
state('collapsed', style({ display: 'none' })),
|
|
976
|
+
state('expanded', style({ display: 'block' })),
|
|
977
|
+
transition('collapsed => expanded', [
|
|
978
|
+
style({
|
|
979
|
+
height: '0px',
|
|
980
|
+
display: 'block'
|
|
981
|
+
}),
|
|
982
|
+
animate('100ms ease-in', style({
|
|
983
|
+
height: '*'
|
|
984
|
+
}))
|
|
985
|
+
]),
|
|
986
|
+
transition('expanded => collapsed', [
|
|
987
|
+
style({
|
|
988
|
+
height: '*'
|
|
989
|
+
}),
|
|
990
|
+
animate('100ms ease-in', style({
|
|
991
|
+
height: '0px'
|
|
992
|
+
}))
|
|
993
|
+
])
|
|
994
|
+
])
|
|
995
|
+
] });
|
|
996
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ChipMenuItemComponent, decorators: [{
|
|
997
|
+
type: Component,
|
|
998
|
+
args: [{
|
|
999
|
+
animations: [
|
|
1000
|
+
trigger('state', [
|
|
1001
|
+
state('collapsed', style({ display: 'none' })),
|
|
1002
|
+
state('expanded', style({ display: 'block' })),
|
|
1003
|
+
transition('collapsed => expanded', [
|
|
1004
|
+
style({
|
|
1005
|
+
height: '0px',
|
|
1006
|
+
display: 'block'
|
|
1007
|
+
}),
|
|
1008
|
+
animate('100ms ease-in', style({
|
|
1009
|
+
height: '*'
|
|
1010
|
+
}))
|
|
1011
|
+
]),
|
|
1012
|
+
transition('expanded => collapsed', [
|
|
1013
|
+
style({
|
|
1014
|
+
height: '*'
|
|
1015
|
+
}),
|
|
1016
|
+
animate('100ms ease-in', style({
|
|
1017
|
+
height: '0px'
|
|
1018
|
+
}))
|
|
1019
|
+
])
|
|
1020
|
+
])
|
|
1021
|
+
],
|
|
1022
|
+
selector: 'kendo-pivot-chipmenu-item',
|
|
1023
|
+
template: `
|
|
1024
|
+
<div
|
|
1025
|
+
class="k-columnmenu-item"
|
|
1026
|
+
(click)="onClick($event)"
|
|
1027
|
+
(keydown.enter)="onClick($event)"
|
|
1028
|
+
[class.k-selected]="selected"
|
|
1029
|
+
role="button"
|
|
1030
|
+
[attr.aria-expanded]="expanded">
|
|
1031
|
+
<span *ngIf="icon" class="k-icon" [ngClass]="iconClass">
|
|
1032
|
+
</span>
|
|
1033
|
+
{{ text }}
|
|
1034
|
+
</div>
|
|
1035
|
+
<div *ngIf="contentTemplate" [@state]="contentState" style="overflow:hidden;" class="k-columnmenu-item-content">
|
|
1036
|
+
<ng-container [ngTemplateOutlet]="contentTemplate.templateRef">
|
|
1037
|
+
</ng-container>
|
|
1038
|
+
<div>
|
|
1039
|
+
`
|
|
1040
|
+
}]
|
|
1041
|
+
}], propDecorators: { itemClick: [{
|
|
1042
|
+
type: Output
|
|
1043
|
+
}], expand: [{
|
|
1044
|
+
type: Output
|
|
1045
|
+
}], collapse: [{
|
|
1046
|
+
type: Output
|
|
1047
|
+
}], icon: [{
|
|
1048
|
+
type: Input
|
|
1049
|
+
}], text: [{
|
|
1050
|
+
type: Input
|
|
1051
|
+
}], selected: [{
|
|
1052
|
+
type: Input
|
|
1053
|
+
}], expanded: [{
|
|
1054
|
+
type: Input
|
|
1055
|
+
}], contentTemplate: [{
|
|
1056
|
+
type: ContentChild,
|
|
1057
|
+
args: [ChipMenuItemContentTemplateDirective, { static: false }]
|
|
1058
|
+
}] } });
|
|
1059
|
+
|
|
1060
|
+
/**
|
|
1061
|
+
* @hidden
|
|
1062
|
+
*
|
|
1063
|
+
* Represents a chip-menu item for sorting PivotGrid fields.
|
|
1064
|
+
* Allows the user to sort the PivotGrid.
|
|
1065
|
+
*/
|
|
1066
|
+
class ChipMenuSortComponent extends ChipMenuItemBase {
|
|
1067
|
+
constructor(localization, renderer, configuratorService) {
|
|
1068
|
+
super();
|
|
1069
|
+
this.localization = localization;
|
|
1070
|
+
this.renderer = renderer;
|
|
1071
|
+
this.configuratorService = configuratorService;
|
|
1072
|
+
}
|
|
1073
|
+
get sortedAsc() {
|
|
1074
|
+
const descriptor = this.descriptor;
|
|
1075
|
+
return descriptor && (!descriptor.dir || descriptor.dir === 'asc');
|
|
1076
|
+
}
|
|
1077
|
+
get sortedDesc() {
|
|
1078
|
+
const descriptor = this.descriptor;
|
|
1079
|
+
return descriptor && descriptor.dir === 'desc';
|
|
1080
|
+
}
|
|
1081
|
+
/**
|
|
1082
|
+
* Returns the localized message for a given token
|
|
1083
|
+
*/
|
|
1084
|
+
messageFor(localizationToken) {
|
|
1085
|
+
return this.localization.get(localizationToken);
|
|
1086
|
+
}
|
|
1087
|
+
toggleSort(dir) {
|
|
1088
|
+
const field = this.chip.name.toString();
|
|
1089
|
+
const descriptor = this.descriptor;
|
|
1090
|
+
const sort = this.configuratorService.state.sort.filter(s => s.field !== field);
|
|
1091
|
+
if (!descriptor || descriptor.dir !== dir) {
|
|
1092
|
+
sort.push({ field, dir });
|
|
1093
|
+
}
|
|
1094
|
+
this.configuratorService.parseConfiguratorState({ type: PIVOT_CONFIGURATOR_ACTION.setSort, payload: sort });
|
|
1095
|
+
this.close();
|
|
1096
|
+
}
|
|
1097
|
+
get descriptor() {
|
|
1098
|
+
return [].concat(this.configuratorService.state.sort || []).find(s => s.field === this.chip.name.toString());
|
|
1099
|
+
}
|
|
1100
|
+
}
|
|
1101
|
+
ChipMenuSortComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ChipMenuSortComponent, deps: [{ token: PivotLocalizationService }, { token: i0.Renderer2 }, { token: ConfiguratorService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1102
|
+
ChipMenuSortComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: ChipMenuSortComponent, selector: "kendo-pivot-chipmenu-sort", inputs: { chip: "chip" }, usesInheritance: true, ngImport: i0, template: `
|
|
1103
|
+
<kendo-pivot-chipmenu-item
|
|
1104
|
+
[text]="messageFor('fieldMenuSortAscendingItemLabel')"
|
|
1105
|
+
icon="sort-asc-small"
|
|
1106
|
+
(itemClick)="toggleSort('asc')"
|
|
1107
|
+
[selected]="sortedAsc">
|
|
1108
|
+
</kendo-pivot-chipmenu-item>
|
|
1109
|
+
<kendo-pivot-chipmenu-item
|
|
1110
|
+
[text]="messageFor('fieldMenuSortDescendingItemLabel')"
|
|
1111
|
+
icon="sort-desc-small"
|
|
1112
|
+
(itemClick)="toggleSort('desc')"
|
|
1113
|
+
[selected]="sortedDesc">
|
|
1114
|
+
</kendo-pivot-chipmenu-item>
|
|
1115
|
+
`, isInline: true, components: [{ type: ChipMenuItemComponent, selector: "kendo-pivot-chipmenu-item", inputs: ["icon", "text", "selected", "expanded"], outputs: ["itemClick", "expand", "collapse"] }] });
|
|
1116
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ChipMenuSortComponent, decorators: [{
|
|
1117
|
+
type: Component,
|
|
1118
|
+
args: [{
|
|
1119
|
+
selector: 'kendo-pivot-chipmenu-sort',
|
|
1120
|
+
template: `
|
|
1121
|
+
<kendo-pivot-chipmenu-item
|
|
1122
|
+
[text]="messageFor('fieldMenuSortAscendingItemLabel')"
|
|
1123
|
+
icon="sort-asc-small"
|
|
1124
|
+
(itemClick)="toggleSort('asc')"
|
|
1125
|
+
[selected]="sortedAsc">
|
|
1126
|
+
</kendo-pivot-chipmenu-item>
|
|
1127
|
+
<kendo-pivot-chipmenu-item
|
|
1128
|
+
[text]="messageFor('fieldMenuSortDescendingItemLabel')"
|
|
1129
|
+
icon="sort-desc-small"
|
|
1130
|
+
(itemClick)="toggleSort('desc')"
|
|
1131
|
+
[selected]="sortedDesc">
|
|
1132
|
+
</kendo-pivot-chipmenu-item>
|
|
1133
|
+
`
|
|
1134
|
+
}]
|
|
1135
|
+
}], ctorParameters: function () { return [{ type: PivotLocalizationService }, { type: i0.Renderer2 }, { type: ConfiguratorService }]; }, propDecorators: { chip: [{
|
|
1136
|
+
type: Input
|
|
1137
|
+
}] } });
|
|
1138
|
+
|
|
1139
|
+
/**
|
|
1140
|
+
* @hidden
|
|
1141
|
+
*/
|
|
1142
|
+
class FilterMenuDropDownListDirective {
|
|
1143
|
+
constructor(host) {
|
|
1144
|
+
this.host = host;
|
|
1145
|
+
this.keydownHandler = (e) => {
|
|
1146
|
+
if (e.keyCode === Keys.Escape && this.host.isOpen) {
|
|
1147
|
+
e.stopPropagation();
|
|
1148
|
+
this.host.toggle(false);
|
|
1149
|
+
}
|
|
1150
|
+
};
|
|
1151
|
+
}
|
|
1152
|
+
ngAfterViewInit() {
|
|
1153
|
+
const wrapperElement = this.host.wrapper.nativeElement;
|
|
1154
|
+
wrapperElement.setAttribute('aria-label', this.filterMenuDropDownLabel);
|
|
1155
|
+
wrapperElement.addEventListener('keydown', this.keydownHandler, true);
|
|
1156
|
+
}
|
|
1157
|
+
ngOnDestroy() {
|
|
1158
|
+
this.host.wrapper.nativeElement.removeEventListener('keydown', this.keydownHandler);
|
|
1159
|
+
}
|
|
1160
|
+
}
|
|
1161
|
+
FilterMenuDropDownListDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FilterMenuDropDownListDirective, deps: [{ token: i1$2.DropDownListComponent }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1162
|
+
FilterMenuDropDownListDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: FilterMenuDropDownListDirective, selector: "[kendoFilterMenuDropDown]", inputs: { filterMenuDropDownLabel: "filterMenuDropDownLabel" }, ngImport: i0 });
|
|
1163
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FilterMenuDropDownListDirective, decorators: [{
|
|
1164
|
+
type: Directive,
|
|
1165
|
+
args: [{ selector: '[kendoFilterMenuDropDown]' }]
|
|
1166
|
+
}], ctorParameters: function () { return [{ type: i1$2.DropDownListComponent }]; }, propDecorators: { filterMenuDropDownLabel: [{
|
|
1167
|
+
type: Input
|
|
1168
|
+
}] } });
|
|
1169
|
+
|
|
1170
|
+
/**
|
|
1171
|
+
* @hidden
|
|
1172
|
+
*/
|
|
1173
|
+
const localizeOperators = operators => localization => Object.keys(operators).map(key => ({
|
|
1174
|
+
text: localization.get(key),
|
|
1175
|
+
value: operators[key]
|
|
1176
|
+
}));
|
|
1177
|
+
const stringOperators = localizeOperators({
|
|
1178
|
+
"filterEqOperator": "eq",
|
|
1179
|
+
"filterNotEqOperator": "neq",
|
|
1180
|
+
"filterContainsOperator": "contains",
|
|
1181
|
+
"filterNotContainsOperator": "doesnotcontain",
|
|
1182
|
+
"filterStartsWithOperator": "startswith",
|
|
1183
|
+
"filterEndsWithOperator": "endswith",
|
|
1184
|
+
"filterIsNullOperator": "isnull",
|
|
1185
|
+
"filterIsNotNullOperator": "isnotnull",
|
|
1186
|
+
"filterIsEmptyOperator": "isempty",
|
|
1187
|
+
"filterIsNotEmptyOperator": "isnotempty"
|
|
1188
|
+
});
|
|
1189
|
+
/**
|
|
1190
|
+
* @hidden
|
|
1191
|
+
*
|
|
1192
|
+
* Represents a string-filter menu component.
|
|
1193
|
+
*/
|
|
1194
|
+
class StringFilterMenuComponent {
|
|
1195
|
+
constructor(localization, configuratorService, fb) {
|
|
1196
|
+
this.localization = localization;
|
|
1197
|
+
this.configuratorService = configuratorService;
|
|
1198
|
+
this.fb = fb;
|
|
1199
|
+
this.subscription = new Subscription();
|
|
1200
|
+
this.onTouched = () => { };
|
|
1201
|
+
}
|
|
1202
|
+
get currentFilter() {
|
|
1203
|
+
var _a;
|
|
1204
|
+
const filterValue = (_a = this.configuratorService.state.filter) === null || _a === void 0 ? void 0 : _a.filter(x => x.field === this.chip.name.toString());
|
|
1205
|
+
return filterValue && filterValue[0];
|
|
1206
|
+
}
|
|
1207
|
+
registerOnChange(fn) {
|
|
1208
|
+
this.filterFormGroup.valueChanges.subscribe(fn);
|
|
1209
|
+
}
|
|
1210
|
+
registerOnTouched(fn) {
|
|
1211
|
+
this.onTouched = fn;
|
|
1212
|
+
}
|
|
1213
|
+
writeValue(val) {
|
|
1214
|
+
if (val) {
|
|
1215
|
+
this.filterFormGroup.setValue(val, { emitEvent: false });
|
|
1216
|
+
}
|
|
1217
|
+
}
|
|
1218
|
+
get filterMenuDropDownLabel() {
|
|
1219
|
+
const localizationMsg = this.localization.get('filterOperatorsDropDownLabel') || '';
|
|
1220
|
+
const chipName = this.chip.name.toString();
|
|
1221
|
+
return replaceMessagePlaceholder(localizationMsg, 'fields', chipName);
|
|
1222
|
+
}
|
|
1223
|
+
ngOnInit() {
|
|
1224
|
+
this.filterFormGroup = this.fb.group({
|
|
1225
|
+
operator: [this.currentFilter ? this.currentFilter.operator : ''],
|
|
1226
|
+
value: [this.currentFilter ? this.currentFilter.value : '']
|
|
1227
|
+
});
|
|
1228
|
+
this.operators = stringOperators(this.localization);
|
|
1229
|
+
}
|
|
1230
|
+
ngOnDestroy() {
|
|
1231
|
+
this.subscription.unsubscribe();
|
|
1232
|
+
}
|
|
1233
|
+
}
|
|
1234
|
+
StringFilterMenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: StringFilterMenuComponent, deps: [{ token: PivotLocalizationService }, { token: ConfiguratorService }, { token: i3$1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component });
|
|
1235
|
+
StringFilterMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: StringFilterMenuComponent, selector: "kendo-pivot-string-filter-menu", inputs: { chip: "chip", menuTabbingService: "menuTabbingService" }, providers: [{
|
|
1236
|
+
provide: NG_VALUE_ACCESSOR,
|
|
1237
|
+
useExisting: forwardRef(() => StringFilterMenuComponent),
|
|
1238
|
+
multi: true
|
|
1239
|
+
}], ngImport: i0, template: `
|
|
1240
|
+
<ng-container [formGroup]="filterFormGroup">
|
|
1241
|
+
<kendo-dropdownlist
|
|
1242
|
+
kendoFilterMenuDropDown
|
|
1243
|
+
[filterMenuDropDownLabel]="filterMenuDropDownLabel"
|
|
1244
|
+
[data]="operators"
|
|
1245
|
+
formControlName="operator"
|
|
1246
|
+
[valuePrimitive]="true"
|
|
1247
|
+
textField="text"
|
|
1248
|
+
valueField="value">
|
|
1249
|
+
</kendo-dropdownlist>
|
|
1250
|
+
<input
|
|
1251
|
+
kendoTextBox
|
|
1252
|
+
formControlName="value"
|
|
1253
|
+
/>
|
|
1254
|
+
</ng-container>
|
|
1255
|
+
`, isInline: true, components: [{ type: i1$2.DropDownListComponent, selector: "kendo-dropdownlist", inputs: ["iconClass", "loading", "data", "value", "textField", "valueField", "popupSettings", "listHeight", "defaultItem", "disabled", "itemDisabled", "readonly", "filterable", "virtual", "ignoreCase", "delay", "valuePrimitive", "tabindex", "tabIndex", "size", "rounded", "fillMode", "id"], outputs: ["valueChange", "filterChange", "selectionChange", "open", "opened", "close", "closed", "focus", "blur"], exportAs: ["kendoDropDownList"] }], directives: [{ type: i3$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i3$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: FilterMenuDropDownListDirective, selector: "[kendoFilterMenuDropDown]", inputs: ["filterMenuDropDownLabel"] }, { type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i3$1.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i6.TextBoxDirective, selector: "input[kendoTextBox]", inputs: ["value"] }, { type: i3$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }] });
|
|
1256
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: StringFilterMenuComponent, decorators: [{
|
|
1257
|
+
type: Component,
|
|
1258
|
+
args: [{
|
|
1259
|
+
selector: 'kendo-pivot-string-filter-menu',
|
|
1260
|
+
providers: [{
|
|
1261
|
+
provide: NG_VALUE_ACCESSOR,
|
|
1262
|
+
useExisting: forwardRef(() => StringFilterMenuComponent),
|
|
1263
|
+
multi: true
|
|
1264
|
+
}],
|
|
1265
|
+
template: `
|
|
1266
|
+
<ng-container [formGroup]="filterFormGroup">
|
|
1267
|
+
<kendo-dropdownlist
|
|
1268
|
+
kendoFilterMenuDropDown
|
|
1269
|
+
[filterMenuDropDownLabel]="filterMenuDropDownLabel"
|
|
1270
|
+
[data]="operators"
|
|
1271
|
+
formControlName="operator"
|
|
1272
|
+
[valuePrimitive]="true"
|
|
1273
|
+
textField="text"
|
|
1274
|
+
valueField="value">
|
|
1275
|
+
</kendo-dropdownlist>
|
|
1276
|
+
<input
|
|
1277
|
+
kendoTextBox
|
|
1278
|
+
formControlName="value"
|
|
1279
|
+
/>
|
|
1280
|
+
</ng-container>
|
|
1281
|
+
`
|
|
1282
|
+
}]
|
|
1283
|
+
}], ctorParameters: function () { return [{ type: PivotLocalizationService }, { type: ConfiguratorService }, { type: i3$1.FormBuilder }]; }, propDecorators: { chip: [{
|
|
1284
|
+
type: Input
|
|
1285
|
+
}], menuTabbingService: [{
|
|
1286
|
+
type: Input
|
|
1287
|
+
}] } });
|
|
1288
|
+
|
|
1289
|
+
const isNoValueOperator = operator => (operator === "isnull"
|
|
1290
|
+
|| operator === "isnotnull"
|
|
1291
|
+
|| operator === "isempty"
|
|
1292
|
+
|| operator === "isnotempty");
|
|
1293
|
+
const validFilter = ({ value, operator }) => !isNullOrEmptyString(value) || isNoValueOperator(operator);
|
|
1294
|
+
/**
|
|
1295
|
+
* @hidden
|
|
1296
|
+
*/
|
|
1297
|
+
class FilterMenuContainerComponent {
|
|
1298
|
+
constructor(localization, cd, menuTabbingService, configuratorService) {
|
|
1299
|
+
this.localization = localization;
|
|
1300
|
+
this.cd = cd;
|
|
1301
|
+
this.configuratorService = configuratorService;
|
|
1302
|
+
this.close = new EventEmitter();
|
|
1303
|
+
this.actionsClass = 'k-action-buttons k-button-group';
|
|
1304
|
+
this.menuTabbingService = menuTabbingService;
|
|
1305
|
+
}
|
|
1306
|
+
ngOnInit() {
|
|
1307
|
+
}
|
|
1308
|
+
ngAfterViewChecked() {
|
|
1309
|
+
if (!this.menuTabbingService.isColumnMenu || (this.isLast && this.isExpanded)) {
|
|
1310
|
+
this.menuTabbingService.lastFocusable = this.disabled ?
|
|
1311
|
+
this.resetButton.nativeElement : this.filterButton.nativeElement;
|
|
1312
|
+
}
|
|
1313
|
+
}
|
|
1314
|
+
ngOnDestroy() {
|
|
1315
|
+
this.menuTabbingService.lastFocusable = null;
|
|
1316
|
+
}
|
|
1317
|
+
get disabled() {
|
|
1318
|
+
return !(this.filterDescriptorValue && validFilter(this.filterDescriptorValue));
|
|
1319
|
+
}
|
|
1320
|
+
submit() {
|
|
1321
|
+
const filterDescriptor = Object.assign({ field: this.chip.name.toString() }, this.filterDescriptorValue);
|
|
1322
|
+
const payload = !this.configuratorService.state.filter ?
|
|
1323
|
+
[filterDescriptor] :
|
|
1324
|
+
[
|
|
1325
|
+
...this.configuratorService.state.filter.filter(descriptor => descriptor.field !== filterDescriptor.field),
|
|
1326
|
+
filterDescriptor
|
|
1327
|
+
];
|
|
1328
|
+
this.configuratorService.parseConfiguratorState({ type: PIVOT_CONFIGURATOR_ACTION.setFilter, payload: payload });
|
|
1329
|
+
this.close.emit();
|
|
1330
|
+
return false;
|
|
1331
|
+
}
|
|
1332
|
+
reset() {
|
|
1333
|
+
const filters = this.configuratorService.state.filter.filter(descriptor => descriptor.field !== this.chip.name.toString());
|
|
1334
|
+
this.configuratorService.parseConfiguratorState({ type: PIVOT_CONFIGURATOR_ACTION.setFilter, payload: filters });
|
|
1335
|
+
this.close.emit();
|
|
1336
|
+
}
|
|
1337
|
+
onTab(e, buttonType) {
|
|
1338
|
+
if (this.menuTabbingService.firstFocusable && (!this.menuTabbingService.isColumnMenu || this.isLast)) {
|
|
1339
|
+
e.preventDefault();
|
|
1340
|
+
if (buttonType === 'reset') {
|
|
1341
|
+
// eslint-disable-next-line no-unused-expressions
|
|
1342
|
+
this.disabled ? this.menuTabbingService.firstFocusable.focus() : this.filterButton.nativeElement.focus();
|
|
1343
|
+
}
|
|
1344
|
+
else {
|
|
1345
|
+
this.menuTabbingService.firstFocusable.focus();
|
|
1346
|
+
}
|
|
1347
|
+
}
|
|
1348
|
+
}
|
|
1349
|
+
/**
|
|
1350
|
+
* Returns the localized message for a given token
|
|
1351
|
+
*/
|
|
1352
|
+
messageFor(localizationToken) {
|
|
1353
|
+
return this.localization.get(localizationToken);
|
|
1354
|
+
}
|
|
1355
|
+
}
|
|
1356
|
+
FilterMenuContainerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FilterMenuContainerComponent, deps: [{ token: PivotLocalizationService }, { token: i0.ChangeDetectorRef }, { token: MenuTabbingService }, { token: ConfiguratorService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1357
|
+
FilterMenuContainerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FilterMenuContainerComponent, selector: "kendo-pivot-filter-menu-container", inputs: { chip: "chip", isLast: "isLast", isExpanded: "isExpanded", menuTabbingService: "menuTabbingService", actionsClass: "actionsClass" }, outputs: { close: "close" }, providers: [
|
|
1358
|
+
MenuTabbingService
|
|
1359
|
+
], viewQueries: [{ propertyName: "resetButton", first: true, predicate: ["resetButton"], descendants: true }, { propertyName: "filterButton", first: true, predicate: ["filterButton"], descendants: true }], ngImport: i0, template: `
|
|
1360
|
+
<form (submit)="submit()" (reset)="reset()"
|
|
1361
|
+
class="k-filter-menu k-group k-reset k-state-border-up">
|
|
1362
|
+
<div class="k-filter-menu-container">
|
|
1363
|
+
<kendo-pivot-string-filter-menu
|
|
1364
|
+
[(ngModel)]="filterDescriptorValue"
|
|
1365
|
+
name="'filterDescriptorValue'"
|
|
1366
|
+
[chip]="chip"
|
|
1367
|
+
[menuTabbingService]="menuTabbingService">
|
|
1368
|
+
</kendo-pivot-string-filter-menu>
|
|
1369
|
+
<div [ngClass]="actionsClass">
|
|
1370
|
+
<button
|
|
1371
|
+
#resetButton
|
|
1372
|
+
type="reset"
|
|
1373
|
+
kendoButton
|
|
1374
|
+
(keydown.tab)="onTab($event, 'reset')">{{messageFor('filterClearButton')}}</button>
|
|
1375
|
+
<button #filterButton
|
|
1376
|
+
type="submit"
|
|
1377
|
+
[disabled]="disabled"
|
|
1378
|
+
kendoButton
|
|
1379
|
+
themeColor="primary"
|
|
1380
|
+
(keydown.tab)="onTab($event, 'filter')">{{messageFor('filterFilterButton')}}</button>
|
|
1381
|
+
</div>
|
|
1382
|
+
</div>
|
|
1383
|
+
</form>
|
|
1384
|
+
`, isInline: true, styles: ["\n kendo-pivot-string-filter-menu {\n display: flex;\n flex-flow: column nowrap;\n align-items: stretch;\n gap: 8px;\n }\n "], components: [{ type: StringFilterMenuComponent, selector: "kendo-pivot-string-filter-menu", inputs: ["chip", "menuTabbingService"] }], directives: [{ type: i3$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i3$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i3$1.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i7.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i5.ButtonDirective, selector: "button[kendoButton], span[kendoButton]", inputs: ["toggleable", "togglable", "selected", "tabIndex", "icon", "iconClass", "imageUrl", "disabled", "size", "rounded", "fillMode", "themeColor", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }] });
|
|
1385
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FilterMenuContainerComponent, decorators: [{
|
|
1386
|
+
type: Component,
|
|
1387
|
+
args: [{
|
|
1388
|
+
providers: [
|
|
1389
|
+
MenuTabbingService
|
|
1390
|
+
],
|
|
1391
|
+
selector: 'kendo-pivot-filter-menu-container',
|
|
1392
|
+
template: `
|
|
1393
|
+
<form (submit)="submit()" (reset)="reset()"
|
|
1394
|
+
class="k-filter-menu k-group k-reset k-state-border-up">
|
|
1395
|
+
<div class="k-filter-menu-container">
|
|
1396
|
+
<kendo-pivot-string-filter-menu
|
|
1397
|
+
[(ngModel)]="filterDescriptorValue"
|
|
1398
|
+
name="'filterDescriptorValue'"
|
|
1399
|
+
[chip]="chip"
|
|
1400
|
+
[menuTabbingService]="menuTabbingService">
|
|
1401
|
+
</kendo-pivot-string-filter-menu>
|
|
1402
|
+
<div [ngClass]="actionsClass">
|
|
1403
|
+
<button
|
|
1404
|
+
#resetButton
|
|
1405
|
+
type="reset"
|
|
1406
|
+
kendoButton
|
|
1407
|
+
(keydown.tab)="onTab($event, 'reset')">{{messageFor('filterClearButton')}}</button>
|
|
1408
|
+
<button #filterButton
|
|
1409
|
+
type="submit"
|
|
1410
|
+
[disabled]="disabled"
|
|
1411
|
+
kendoButton
|
|
1412
|
+
themeColor="primary"
|
|
1413
|
+
(keydown.tab)="onTab($event, 'filter')">{{messageFor('filterFilterButton')}}</button>
|
|
1414
|
+
</div>
|
|
1415
|
+
</div>
|
|
1416
|
+
</form>
|
|
1417
|
+
`,
|
|
1418
|
+
styles: [`
|
|
1419
|
+
kendo-pivot-string-filter-menu {
|
|
1420
|
+
display: flex;
|
|
1421
|
+
flex-flow: column nowrap;
|
|
1422
|
+
align-items: stretch;
|
|
1423
|
+
gap: 8px;
|
|
1424
|
+
}
|
|
1425
|
+
`]
|
|
1426
|
+
}]
|
|
1427
|
+
}], ctorParameters: function () { return [{ type: PivotLocalizationService }, { type: i0.ChangeDetectorRef }, { type: MenuTabbingService }, { type: ConfiguratorService }]; }, propDecorators: { close: [{
|
|
1428
|
+
type: Output
|
|
1429
|
+
}], chip: [{
|
|
1430
|
+
type: Input
|
|
1431
|
+
}], isLast: [{
|
|
1432
|
+
type: Input
|
|
1433
|
+
}], isExpanded: [{
|
|
1434
|
+
type: Input
|
|
1435
|
+
}], menuTabbingService: [{
|
|
1436
|
+
type: Input
|
|
1437
|
+
}], actionsClass: [{
|
|
1438
|
+
type: Input
|
|
1439
|
+
}], resetButton: [{
|
|
1440
|
+
type: ViewChild,
|
|
1441
|
+
args: ['resetButton']
|
|
1442
|
+
}], filterButton: [{
|
|
1443
|
+
type: ViewChild,
|
|
1444
|
+
args: ['filterButton']
|
|
1445
|
+
}] } });
|
|
1446
|
+
|
|
1447
|
+
/**
|
|
1448
|
+
* @hidden
|
|
1449
|
+
* Represents the component for setting field filters in the PivotGrid.
|
|
1450
|
+
*/
|
|
1451
|
+
class ChipMenuFilterComponent extends ChipMenuItemBase {
|
|
1452
|
+
constructor(localization, hostElement) {
|
|
1453
|
+
super();
|
|
1454
|
+
this.localization = localization;
|
|
1455
|
+
this.hostElement = hostElement;
|
|
1456
|
+
/**
|
|
1457
|
+
* Fires when the content is expanded.
|
|
1458
|
+
*/
|
|
1459
|
+
this.expand = new EventEmitter();
|
|
1460
|
+
/**
|
|
1461
|
+
* Fires when the content is collapsed.
|
|
1462
|
+
*/
|
|
1463
|
+
this.collapse = new EventEmitter();
|
|
1464
|
+
/**
|
|
1465
|
+
* Specifies if the content is expanded.
|
|
1466
|
+
*/
|
|
1467
|
+
this.expanded = false;
|
|
1468
|
+
this.isLast = false;
|
|
1469
|
+
this.actionsClass = 'k-columnmenu-actions';
|
|
1470
|
+
}
|
|
1471
|
+
onCollapse() {
|
|
1472
|
+
this.expanded = false;
|
|
1473
|
+
if (this.isLast) {
|
|
1474
|
+
this.service.menuTabbingService.lastFocusable = this.hostElement.nativeElement.querySelector('.k-columnmenu-item');
|
|
1475
|
+
}
|
|
1476
|
+
this.collapse.emit();
|
|
1477
|
+
}
|
|
1478
|
+
onExpand() {
|
|
1479
|
+
this.expanded = true;
|
|
1480
|
+
this.expand.emit();
|
|
1481
|
+
}
|
|
1482
|
+
/**
|
|
1483
|
+
* Returns the localized message for a given token
|
|
1484
|
+
*/
|
|
1485
|
+
messageFor(localizationToken) {
|
|
1486
|
+
return this.localization.get(localizationToken);
|
|
1487
|
+
}
|
|
1488
|
+
}
|
|
1489
|
+
ChipMenuFilterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ChipMenuFilterComponent, deps: [{ token: PivotLocalizationService }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
1490
|
+
ChipMenuFilterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: ChipMenuFilterComponent, selector: "kendo-pivot-chipmenu-filter", inputs: { chip: "chip", expanded: "expanded", isLast: "isLast" }, outputs: { expand: "expand", collapse: "collapse" }, usesInheritance: true, ngImport: i0, template: `
|
|
1491
|
+
<kendo-pivot-chipmenu-item
|
|
1492
|
+
classs="k-widget k-expander"
|
|
1493
|
+
[text]="messageFor('fieldMenuFilterItemLabel')"
|
|
1494
|
+
icon="filter"
|
|
1495
|
+
[expanded]="expanded"
|
|
1496
|
+
(collapse)="onCollapse()"
|
|
1497
|
+
(expand)="onExpand()">
|
|
1498
|
+
<ng-template kendoPivotChipMenuItemContentTemplate>
|
|
1499
|
+
<kendo-pivot-filter-menu-container
|
|
1500
|
+
[chip]="chip"
|
|
1501
|
+
[menuTabbingService]="service.menuTabbingService"
|
|
1502
|
+
[actionsClass]="actionsClass"
|
|
1503
|
+
[isLast]="isLast"
|
|
1504
|
+
[isExpanded]="expanded"
|
|
1505
|
+
(keydown.shift.tab)="$event.stopImmediatePropagation()"
|
|
1506
|
+
(close)="close()">
|
|
1507
|
+
</kendo-pivot-filter-menu-container>
|
|
1508
|
+
</ng-template>
|
|
1509
|
+
</kendo-pivot-chipmenu-item>
|
|
1510
|
+
`, isInline: true, components: [{ type: ChipMenuItemComponent, selector: "kendo-pivot-chipmenu-item", inputs: ["icon", "text", "selected", "expanded"], outputs: ["itemClick", "expand", "collapse"] }, { type: FilterMenuContainerComponent, selector: "kendo-pivot-filter-menu-container", inputs: ["chip", "isLast", "isExpanded", "menuTabbingService", "actionsClass"], outputs: ["close"] }], directives: [{ type: ChipMenuItemContentTemplateDirective, selector: "[kendoPivotChipMenuItemContentTemplate]" }] });
|
|
1511
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ChipMenuFilterComponent, decorators: [{
|
|
1512
|
+
type: Component,
|
|
1513
|
+
args: [{
|
|
1514
|
+
selector: 'kendo-pivot-chipmenu-filter',
|
|
1515
|
+
template: `
|
|
1516
|
+
<kendo-pivot-chipmenu-item
|
|
1517
|
+
classs="k-widget k-expander"
|
|
1518
|
+
[text]="messageFor('fieldMenuFilterItemLabel')"
|
|
1519
|
+
icon="filter"
|
|
1520
|
+
[expanded]="expanded"
|
|
1521
|
+
(collapse)="onCollapse()"
|
|
1522
|
+
(expand)="onExpand()">
|
|
1523
|
+
<ng-template kendoPivotChipMenuItemContentTemplate>
|
|
1524
|
+
<kendo-pivot-filter-menu-container
|
|
1525
|
+
[chip]="chip"
|
|
1526
|
+
[menuTabbingService]="service.menuTabbingService"
|
|
1527
|
+
[actionsClass]="actionsClass"
|
|
1528
|
+
[isLast]="isLast"
|
|
1529
|
+
[isExpanded]="expanded"
|
|
1530
|
+
(keydown.shift.tab)="$event.stopImmediatePropagation()"
|
|
1531
|
+
(close)="close()">
|
|
1532
|
+
</kendo-pivot-filter-menu-container>
|
|
1533
|
+
</ng-template>
|
|
1534
|
+
</kendo-pivot-chipmenu-item>
|
|
1535
|
+
`
|
|
1536
|
+
}]
|
|
1537
|
+
}], ctorParameters: function () { return [{ type: PivotLocalizationService }, { type: i0.ElementRef }]; }, propDecorators: { expand: [{
|
|
1538
|
+
type: Output
|
|
1539
|
+
}], collapse: [{
|
|
1540
|
+
type: Output
|
|
1541
|
+
}], chip: [{
|
|
1542
|
+
type: Input
|
|
1543
|
+
}], expanded: [{
|
|
1544
|
+
type: Input
|
|
1545
|
+
}], isLast: [{
|
|
1546
|
+
type: Input
|
|
1547
|
+
}] } });
|
|
1548
|
+
|
|
1549
|
+
const POPUP_CLASS = 'k-column-menu';
|
|
1550
|
+
/**
|
|
1551
|
+
* @hidden
|
|
1552
|
+
*
|
|
1553
|
+
* Represents the field chip menu component.
|
|
1554
|
+
*/
|
|
1555
|
+
class ChipMenuComponent {
|
|
1556
|
+
constructor(popupService, localization, service) {
|
|
1557
|
+
this.popupService = popupService;
|
|
1558
|
+
this.localization = localization;
|
|
1559
|
+
this.service = service;
|
|
1560
|
+
this.tabIndex = '-1';
|
|
1561
|
+
this.closeSubscription = service.closeMenu.subscribe(this.close.bind(this));
|
|
1562
|
+
}
|
|
1563
|
+
ngOnDestroy() {
|
|
1564
|
+
this.close();
|
|
1565
|
+
this.closeSubscription.unsubscribe();
|
|
1566
|
+
}
|
|
1567
|
+
toggle(e, anchor, template) {
|
|
1568
|
+
if (e) {
|
|
1569
|
+
e.preventDefault();
|
|
1570
|
+
e.stopImmediatePropagation();
|
|
1571
|
+
}
|
|
1572
|
+
this.popupRef = this.popupService.open(anchor, template, this.popupRef, POPUP_CLASS);
|
|
1573
|
+
if (!this.popupRef) {
|
|
1574
|
+
this.anchor.nativeElement.focus();
|
|
1575
|
+
}
|
|
1576
|
+
}
|
|
1577
|
+
close() {
|
|
1578
|
+
this.popupService.destroy();
|
|
1579
|
+
this.popupRef = null;
|
|
1580
|
+
this.anchor.nativeElement.focus();
|
|
1581
|
+
}
|
|
1582
|
+
get chipMenuTitle() {
|
|
1583
|
+
const localizationMsg = this.localization.get('chipMenuIconTitle') || '';
|
|
1584
|
+
const chipName = this.chip.name.toString();
|
|
1585
|
+
return replaceMessagePlaceholder(localizationMsg, 'fieldName', chipName);
|
|
1586
|
+
}
|
|
1587
|
+
}
|
|
1588
|
+
ChipMenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ChipMenuComponent, deps: [{ token: SinglePopupService }, { token: PivotLocalizationService }, { token: ChipMenuService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1589
|
+
ChipMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: ChipMenuComponent, selector: "kendo-pivot-chip-menu", inputs: { chip: "chip", tabIndex: "tabIndex" }, providers: [
|
|
1590
|
+
ChipMenuService,
|
|
1591
|
+
MenuTabbingService
|
|
1592
|
+
], viewQueries: [{ propertyName: "anchor", first: true, predicate: ["anchor"], descendants: true, static: true }], ngImport: i0, template: `
|
|
1593
|
+
<span #anchor
|
|
1594
|
+
class="k-icon k-i-more-vertical"
|
|
1595
|
+
(click)="toggle($event, anchor, template)"
|
|
1596
|
+
[tabindex]="tabIndex"
|
|
1597
|
+
[attr.title]="chipMenuTitle">
|
|
1598
|
+
</span>
|
|
1599
|
+
<ng-template #template>
|
|
1600
|
+
<kendo-pivot-chipmenu-container
|
|
1601
|
+
(keydown.escape)="close()"
|
|
1602
|
+
(keydown.enter)="$event.stopImmediatePropagation()">
|
|
1603
|
+
<kendo-pivot-chipmenu-sort
|
|
1604
|
+
#sortItem
|
|
1605
|
+
[chip]="chip"
|
|
1606
|
+
[kendoPivotChipMenuItem]="sortItem"
|
|
1607
|
+
[service]="service">
|
|
1608
|
+
</kendo-pivot-chipmenu-sort>
|
|
1609
|
+
|
|
1610
|
+
<kendo-pivot-chipmenu-filter
|
|
1611
|
+
#filterItem
|
|
1612
|
+
[chip]="chip"
|
|
1613
|
+
[kendoPivotChipMenuItem]="filterItem"
|
|
1614
|
+
[service]="service">
|
|
1615
|
+
</kendo-pivot-chipmenu-filter>
|
|
1616
|
+
</kendo-pivot-chipmenu-container>
|
|
1617
|
+
</ng-template>
|
|
1618
|
+
`, isInline: true, components: [{ type: ChipMenuContainerComponent, selector: "kendo-pivot-chipmenu-container" }, { type: ChipMenuSortComponent, selector: "kendo-pivot-chipmenu-sort", inputs: ["chip"] }, { type: ChipMenuFilterComponent, selector: "kendo-pivot-chipmenu-filter", inputs: ["chip", "expanded", "isLast"], outputs: ["expand", "collapse"] }], directives: [{ type: ChipMenuItemDirective, selector: "[kendoPivotChipMenuItem]", inputs: ["kendoPivotChipMenuItem"] }] });
|
|
1619
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ChipMenuComponent, decorators: [{
|
|
1620
|
+
type: Component,
|
|
1621
|
+
args: [{
|
|
1622
|
+
providers: [
|
|
1623
|
+
ChipMenuService,
|
|
1624
|
+
MenuTabbingService
|
|
1625
|
+
],
|
|
1626
|
+
selector: 'kendo-pivot-chip-menu',
|
|
1627
|
+
template: `
|
|
1628
|
+
<span #anchor
|
|
1629
|
+
class="k-icon k-i-more-vertical"
|
|
1630
|
+
(click)="toggle($event, anchor, template)"
|
|
1631
|
+
[tabindex]="tabIndex"
|
|
1632
|
+
[attr.title]="chipMenuTitle">
|
|
1633
|
+
</span>
|
|
1634
|
+
<ng-template #template>
|
|
1635
|
+
<kendo-pivot-chipmenu-container
|
|
1636
|
+
(keydown.escape)="close()"
|
|
1637
|
+
(keydown.enter)="$event.stopImmediatePropagation()">
|
|
1638
|
+
<kendo-pivot-chipmenu-sort
|
|
1639
|
+
#sortItem
|
|
1640
|
+
[chip]="chip"
|
|
1641
|
+
[kendoPivotChipMenuItem]="sortItem"
|
|
1642
|
+
[service]="service">
|
|
1643
|
+
</kendo-pivot-chipmenu-sort>
|
|
1644
|
+
|
|
1645
|
+
<kendo-pivot-chipmenu-filter
|
|
1646
|
+
#filterItem
|
|
1647
|
+
[chip]="chip"
|
|
1648
|
+
[kendoPivotChipMenuItem]="filterItem"
|
|
1649
|
+
[service]="service">
|
|
1650
|
+
</kendo-pivot-chipmenu-filter>
|
|
1651
|
+
</kendo-pivot-chipmenu-container>
|
|
1652
|
+
</ng-template>
|
|
1653
|
+
`
|
|
1654
|
+
}]
|
|
1655
|
+
}], ctorParameters: function () { return [{ type: SinglePopupService }, { type: PivotLocalizationService }, { type: ChipMenuService }]; }, propDecorators: { chip: [{
|
|
1656
|
+
type: Input
|
|
1657
|
+
}], tabIndex: [{
|
|
1658
|
+
type: Input
|
|
1659
|
+
}], anchor: [{
|
|
1660
|
+
type: ViewChild,
|
|
1661
|
+
args: ['anchor', { static: true }]
|
|
1662
|
+
}] } });
|
|
1663
|
+
|
|
526
1664
|
/**
|
|
527
1665
|
* @hidden
|
|
528
1666
|
*/
|
|
@@ -690,6 +1828,7 @@ class PivotGridConfiguratorComponent {
|
|
|
690
1828
|
this.cdr = cdr;
|
|
691
1829
|
this.hostClass = true;
|
|
692
1830
|
this.horizontal = false;
|
|
1831
|
+
this.sort = new Array();
|
|
693
1832
|
this.checked = [];
|
|
694
1833
|
this.subs = new Subscription();
|
|
695
1834
|
/**
|
|
@@ -852,10 +1991,11 @@ class PivotGridConfiguratorComponent {
|
|
|
852
1991
|
}
|
|
853
1992
|
;
|
|
854
1993
|
}
|
|
855
|
-
PivotGridConfiguratorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PivotGridConfiguratorComponent, deps: [{ token: PivotGridDataService }, { token:
|
|
856
|
-
PivotGridConfiguratorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: PivotGridConfiguratorComponent, selector: "kendo-pivotgrid-configurator", inputs: { horizontal: "horizontal" }, host: { properties: { "class.k-pivotgrid-configurator": "this.hostClass" } }, providers: [
|
|
1994
|
+
PivotGridConfiguratorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PivotGridConfiguratorComponent, deps: [{ token: PivotGridDataService }, { token: i1.LocalizationService }, { token: ConfiguratorService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
1995
|
+
PivotGridConfiguratorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: PivotGridConfiguratorComponent, selector: "kendo-pivotgrid-configurator", inputs: { horizontal: "horizontal", sort: "sort", filter: "filter" }, host: { properties: { "class.k-pivotgrid-configurator": "this.hostClass" } }, providers: [
|
|
857
1996
|
ConfiguratorService,
|
|
858
|
-
DropCueService
|
|
1997
|
+
DropCueService,
|
|
1998
|
+
SinglePopupService
|
|
859
1999
|
], ngImport: i0, template: `
|
|
860
2000
|
<div
|
|
861
2001
|
class="k-pivotgrid-configurator-panel k-pivotgrid-configurator-push"
|
|
@@ -924,6 +2064,10 @@ PivotGridConfiguratorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
|
924
2064
|
[removable]="true"
|
|
925
2065
|
>
|
|
926
2066
|
{{ getName(item.name) }}
|
|
2067
|
+
|
|
2068
|
+
<kendo-pivot-chip-menu
|
|
2069
|
+
[chip]="item">
|
|
2070
|
+
</kendo-pivot-chip-menu>
|
|
927
2071
|
</kendo-chip>
|
|
928
2072
|
</kendo-chiplist>
|
|
929
2073
|
|
|
@@ -950,6 +2094,10 @@ PivotGridConfiguratorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
|
950
2094
|
[removable]="true"
|
|
951
2095
|
>
|
|
952
2096
|
{{ getName(item.name) }}
|
|
2097
|
+
|
|
2098
|
+
<kendo-pivot-chip-menu
|
|
2099
|
+
[chip]="item">
|
|
2100
|
+
</kendo-pivot-chip-menu>
|
|
953
2101
|
</kendo-chip>
|
|
954
2102
|
</kendo-chiplist>
|
|
955
2103
|
|
|
@@ -972,18 +2120,17 @@ PivotGridConfiguratorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
|
972
2120
|
kendoDropTarget
|
|
973
2121
|
axes="measureAxes"
|
|
974
2122
|
>
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
</kendo-chip>
|
|
2123
|
+
<kendo-chip *ngFor="let item of state.measureAxes"
|
|
2124
|
+
kendoChipDraggable
|
|
2125
|
+
kendoDraggable
|
|
2126
|
+
kendoDropTarget
|
|
2127
|
+
[item]="item"
|
|
2128
|
+
axes="measureAxes"
|
|
2129
|
+
rounded="full"
|
|
2130
|
+
[removable]="true"
|
|
2131
|
+
>
|
|
2132
|
+
{{ getName(item.name) }}
|
|
2133
|
+
</kendo-chip>
|
|
987
2134
|
</kendo-chiplist>
|
|
988
2135
|
|
|
989
2136
|
<ng-template #noMeasureAxes>
|
|
@@ -998,14 +2145,15 @@ PivotGridConfiguratorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
|
998
2145
|
<button kendoButton themeColor="primary" type="button" (click)="handleSubmit()">{{messageFor('configuratorApplyButtonText')}}</button>
|
|
999
2146
|
</div>
|
|
1000
2147
|
</div>
|
|
1001
|
-
`, isInline: true, components: [{ type: i4.TreeViewComponent, selector: "kendo-treeview", inputs: ["filterInputPlaceholder", "expandDisabledNodes", "animate", "nodeTemplate", "loadMoreButtonTemplate", "trackBy", "nodes", "textField", "hasChildren", "isChecked", "isDisabled", "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"] }, { type: i5.ChipListComponent, selector: "kendo-chiplist, kendo-chip-list", inputs: ["selection", "size"], outputs: ["selectedChange", "remove"] }, { type: i5.ChipComponent, selector: "kendo-chip", inputs: ["label", "icon", "iconClass", "avatarClass", "selected", "removable", "removeIcon", "disabled", "size", "rounded", "fillMode", "themeColor"], outputs: ["remove", "contentClick"] }], directives: [{ type:
|
|
2148
|
+
`, isInline: true, components: [{ type: i4.TreeViewComponent, selector: "kendo-treeview", inputs: ["filterInputPlaceholder", "expandDisabledNodes", "animate", "nodeTemplate", "loadMoreButtonTemplate", "trackBy", "nodes", "textField", "hasChildren", "isChecked", "isDisabled", "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"] }, { type: i5.ChipListComponent, selector: "kendo-chiplist, kendo-chip-list", inputs: ["selection", "size"], outputs: ["selectedChange", "remove"] }, { type: i5.ChipComponent, selector: "kendo-chip", inputs: ["label", "icon", "iconClass", "avatarClass", "selected", "removable", "removeIcon", "disabled", "size", "rounded", "fillMode", "themeColor"], outputs: ["remove", "contentClick"] }, { type: ChipMenuComponent, selector: "kendo-pivot-chip-menu", inputs: ["chip", "tabIndex"] }], directives: [{ type: i7.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i4.ExpandDirective, selector: "[kendoTreeViewExpandable]", inputs: ["isExpanded", "expandBy", "expandOnFilter", "expandedKeys"], outputs: ["expandedKeysChange"] }, { type: i4.NodeTemplateDirective, selector: "[kendoTreeViewNodeTemplate]" }, { type: i7.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6.CheckBoxDirective, selector: "input[kendoCheckBox]", inputs: ["size", "rounded"] }, { type: i7.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: DropTargetDirective, selector: "[kendoDropTarget]", inputs: ["item", "axes"] }, { type: i7.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: DraggableChipDirective, selector: "[kendoChipDraggable]", inputs: ["item"] }, { type: i3.DraggableDirective, selector: "[kendoDraggable]", inputs: ["enableDrag"], outputs: ["kendoPress", "kendoDrag", "kendoRelease"] }, { type: i5.ButtonDirective, selector: "button[kendoButton], span[kendoButton]", inputs: ["toggleable", "togglable", "selected", "tabIndex", "icon", "iconClass", "imageUrl", "disabled", "size", "rounded", "fillMode", "themeColor", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }] });
|
|
1002
2149
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PivotGridConfiguratorComponent, decorators: [{
|
|
1003
2150
|
type: Component,
|
|
1004
2151
|
args: [{
|
|
1005
2152
|
selector: 'kendo-pivotgrid-configurator',
|
|
1006
2153
|
providers: [
|
|
1007
2154
|
ConfiguratorService,
|
|
1008
|
-
DropCueService
|
|
2155
|
+
DropCueService,
|
|
2156
|
+
SinglePopupService
|
|
1009
2157
|
],
|
|
1010
2158
|
template: `
|
|
1011
2159
|
<div
|
|
@@ -1075,6 +2223,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
1075
2223
|
[removable]="true"
|
|
1076
2224
|
>
|
|
1077
2225
|
{{ getName(item.name) }}
|
|
2226
|
+
|
|
2227
|
+
<kendo-pivot-chip-menu
|
|
2228
|
+
[chip]="item">
|
|
2229
|
+
</kendo-pivot-chip-menu>
|
|
1078
2230
|
</kendo-chip>
|
|
1079
2231
|
</kendo-chiplist>
|
|
1080
2232
|
|
|
@@ -1101,6 +2253,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
1101
2253
|
[removable]="true"
|
|
1102
2254
|
>
|
|
1103
2255
|
{{ getName(item.name) }}
|
|
2256
|
+
|
|
2257
|
+
<kendo-pivot-chip-menu
|
|
2258
|
+
[chip]="item">
|
|
2259
|
+
</kendo-pivot-chip-menu>
|
|
1104
2260
|
</kendo-chip>
|
|
1105
2261
|
</kendo-chiplist>
|
|
1106
2262
|
|
|
@@ -1123,18 +2279,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
1123
2279
|
kendoDropTarget
|
|
1124
2280
|
axes="measureAxes"
|
|
1125
2281
|
>
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
</kendo-chip>
|
|
2282
|
+
<kendo-chip *ngFor="let item of state.measureAxes"
|
|
2283
|
+
kendoChipDraggable
|
|
2284
|
+
kendoDraggable
|
|
2285
|
+
kendoDropTarget
|
|
2286
|
+
[item]="item"
|
|
2287
|
+
axes="measureAxes"
|
|
2288
|
+
rounded="full"
|
|
2289
|
+
[removable]="true"
|
|
2290
|
+
>
|
|
2291
|
+
{{ getName(item.name) }}
|
|
2292
|
+
</kendo-chip>
|
|
1138
2293
|
</kendo-chiplist>
|
|
1139
2294
|
|
|
1140
2295
|
<ng-template #noMeasureAxes>
|
|
@@ -1151,11 +2306,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
1151
2306
|
</div>
|
|
1152
2307
|
`
|
|
1153
2308
|
}]
|
|
1154
|
-
}], ctorParameters: function () { return [{ type: PivotGridDataService }, { type:
|
|
2309
|
+
}], ctorParameters: function () { return [{ type: PivotGridDataService }, { type: i1.LocalizationService }, { type: ConfiguratorService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { hostClass: [{
|
|
1155
2310
|
type: HostBinding,
|
|
1156
2311
|
args: ['class.k-pivotgrid-configurator']
|
|
1157
2312
|
}], horizontal: [{
|
|
1158
2313
|
type: Input
|
|
2314
|
+
}], sort: [{
|
|
2315
|
+
type: Input
|
|
2316
|
+
}], filter: [{
|
|
2317
|
+
type: Input
|
|
1159
2318
|
}] } });
|
|
1160
2319
|
|
|
1161
2320
|
/**
|
|
@@ -1164,7 +2323,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
1164
2323
|
class PivotGridMessages extends ComponentMessages {
|
|
1165
2324
|
}
|
|
1166
2325
|
PivotGridMessages.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PivotGridMessages, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
1167
|
-
PivotGridMessages.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: PivotGridMessages, inputs: { fieldMenuFilterItemLabel: "fieldMenuFilterItemLabel", fieldMenuSortAscendingItemLabel: "fieldMenuSortAscendingItemLabel", fieldMenuSortDescendingItemLabel: "fieldMenuSortDescendingItemLabel", filterInputLabel: "filterInputLabel", filterOperatorsDropDownLabel: "filterOperatorsDropDownLabel", filterEqOperator: "filterEqOperator", filterNotEqOperator: "filterNotEqOperator", filterIsNullOperator: "filterIsNullOperator", filterIsNotNullOperator: "filterIsNotNullOperator", filterIsEmptyOperator: "filterIsEmptyOperator", filterIsNotEmptyOperator: "filterIsNotEmptyOperator", filterStartsWithOperator: "filterStartsWithOperator", filterContainsOperator: "filterContainsOperator", filterNotContainsOperator: "filterNotContainsOperator", filterEndsWithOperator: "filterEndsWithOperator", filterFilterButton: "filterFilterButton", filterClearButton: "filterClearButton", loading: "loading", emptyCellLabel: "emptyCellLabel", configuratorButtonText: "configuratorButtonText", configuratorHeaderText: "configuratorHeaderText", configuratorFieldsText: "configuratorFieldsText", configuratorColumnsText: "configuratorColumnsText", configuratorRowsText: "configuratorRowsText", configuratorValuesText: "configuratorValuesText", configuratorCancelButtonText: "configuratorCancelButtonText", configuratorApplyButtonText: "configuratorApplyButtonText", configuratorEmptyRowsText: "configuratorEmptyRowsText", configuratorEmptyColumnsText: "configuratorEmptyColumnsText", configuratorEmptyMeasuresText: "configuratorEmptyMeasuresText" }, usesInheritance: true, ngImport: i0 });
|
|
2326
|
+
PivotGridMessages.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: PivotGridMessages, inputs: { fieldMenuFilterItemLabel: "fieldMenuFilterItemLabel", fieldMenuSortAscendingItemLabel: "fieldMenuSortAscendingItemLabel", fieldMenuSortDescendingItemLabel: "fieldMenuSortDescendingItemLabel", filterInputLabel: "filterInputLabel", filterOperatorsDropDownLabel: "filterOperatorsDropDownLabel", filterEqOperator: "filterEqOperator", filterNotEqOperator: "filterNotEqOperator", filterIsNullOperator: "filterIsNullOperator", filterIsNotNullOperator: "filterIsNotNullOperator", filterIsEmptyOperator: "filterIsEmptyOperator", filterIsNotEmptyOperator: "filterIsNotEmptyOperator", filterStartsWithOperator: "filterStartsWithOperator", filterContainsOperator: "filterContainsOperator", filterNotContainsOperator: "filterNotContainsOperator", filterEndsWithOperator: "filterEndsWithOperator", filterFilterButton: "filterFilterButton", filterClearButton: "filterClearButton", loading: "loading", emptyCellLabel: "emptyCellLabel", configuratorButtonText: "configuratorButtonText", configuratorHeaderText: "configuratorHeaderText", configuratorFieldsText: "configuratorFieldsText", configuratorColumnsText: "configuratorColumnsText", configuratorRowsText: "configuratorRowsText", configuratorValuesText: "configuratorValuesText", configuratorCancelButtonText: "configuratorCancelButtonText", configuratorApplyButtonText: "configuratorApplyButtonText", configuratorEmptyRowsText: "configuratorEmptyRowsText", configuratorEmptyColumnsText: "configuratorEmptyColumnsText", configuratorEmptyMeasuresText: "configuratorEmptyMeasuresText", chipMenuIconTitle: "chipMenuIconTitle" }, usesInheritance: true, ngImport: i0 });
|
|
1168
2327
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PivotGridMessages, decorators: [{
|
|
1169
2328
|
type: Directive
|
|
1170
2329
|
}], propDecorators: { fieldMenuFilterItemLabel: [{
|
|
@@ -1227,6 +2386,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
1227
2386
|
type: Input
|
|
1228
2387
|
}], configuratorEmptyMeasuresText: [{
|
|
1229
2388
|
type: Input
|
|
2389
|
+
}], chipMenuIconTitle: [{
|
|
2390
|
+
type: Input
|
|
1230
2391
|
}] } });
|
|
1231
2392
|
|
|
1232
2393
|
/**
|
|
@@ -1238,7 +2399,7 @@ class LocalizedMessagesDirective extends PivotGridMessages {
|
|
|
1238
2399
|
this.service = service;
|
|
1239
2400
|
}
|
|
1240
2401
|
}
|
|
1241
|
-
LocalizedMessagesDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: LocalizedMessagesDirective, deps: [{ token:
|
|
2402
|
+
LocalizedMessagesDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: LocalizedMessagesDirective, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1242
2403
|
LocalizedMessagesDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: LocalizedMessagesDirective, selector: "[kendoPivotGridLocalizedMessages]", providers: [
|
|
1243
2404
|
{
|
|
1244
2405
|
provide: PivotGridMessages,
|
|
@@ -1256,7 +2417,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
1256
2417
|
],
|
|
1257
2418
|
selector: '[kendoPivotGridLocalizedMessages]'
|
|
1258
2419
|
}]
|
|
1259
|
-
}], ctorParameters: function () { return [{ type:
|
|
2420
|
+
}], ctorParameters: function () { return [{ type: i1.LocalizationService }]; } });
|
|
1260
2421
|
|
|
1261
2422
|
const DEFAULT_LOADER_SETTINGS = {
|
|
1262
2423
|
type: 'converging-spinner',
|
|
@@ -1280,7 +2441,7 @@ class PivotGridComponent {
|
|
|
1280
2441
|
this.hostClass = true;
|
|
1281
2442
|
this.ariaRole = 'grid';
|
|
1282
2443
|
/**
|
|
1283
|
-
* Specify the width of the column header and data cells. Value is treated as pixels.
|
|
2444
|
+
* Specify the width of the column header and data cells. Value is treated as pixels [(see example)]({% slug appearance_pivotgrid %}#toc-column-headers-width).
|
|
1284
2445
|
*
|
|
1285
2446
|
* @default 200
|
|
1286
2447
|
*/
|
|
@@ -1366,6 +2527,12 @@ class PivotGridComponent {
|
|
|
1366
2527
|
get configuratorSettings() {
|
|
1367
2528
|
return this.configurator && Object.assign({}, DEFAULT_CONFIGURATOR_SETTINGS, this.configurator);
|
|
1368
2529
|
}
|
|
2530
|
+
/**
|
|
2531
|
+
* Holds the displayed aggregated PivotGrid values.
|
|
2532
|
+
*/
|
|
2533
|
+
get aggregateData() {
|
|
2534
|
+
return cloneArray(this.dataService.aggregateData);
|
|
2535
|
+
}
|
|
1369
2536
|
ngAfterViewInit() {
|
|
1370
2537
|
if (isDocumentAvailable()) {
|
|
1371
2538
|
this.zone.runOutsideAngular(() => {
|
|
@@ -1430,10 +2597,11 @@ class PivotGridComponent {
|
|
|
1430
2597
|
}
|
|
1431
2598
|
}
|
|
1432
2599
|
}
|
|
1433
|
-
PivotGridComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PivotGridComponent, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }, { token: PivotGridDataService }, { token:
|
|
2600
|
+
PivotGridComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PivotGridComponent, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }, { token: PivotGridDataService }, { token: i1.LocalizationService }, { token: i0.Renderer2 }, { token: i3.ScrollbarWidthService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1434
2601
|
PivotGridComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: PivotGridComponent, selector: "kendo-pivotgrid", inputs: { loaderSettings: "loaderSettings", configurator: "configurator", columnHeadersWidth: "columnHeadersWidth", navigable: "navigable" }, host: { properties: { "class.k-d-flex": "this.hostClass", "class.k-pos-relative": "this.hostClass", "class.k-flex-row": "this.rightPositionClass", "class.k-flex-row-reverse": "this.leftPositionClass", "class.k-flex-column": "this.bottomPositionClass", "class.k-flex-column-reverse": "this.topPositionClass", "attr.dir": "this.dir", "attr.role": "this.ariaRole" } }, providers: [
|
|
1435
2602
|
PivotGridDataService,
|
|
1436
2603
|
LocalizationService,
|
|
2604
|
+
PivotLocalizationService,
|
|
1437
2605
|
{
|
|
1438
2606
|
provide: L10N_PREFIX,
|
|
1439
2607
|
useValue: 'kendo.pivotgrid'
|
|
@@ -1528,7 +2696,10 @@ PivotGridComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ver
|
|
|
1528
2696
|
configuratorEmptyColumnsText="Select some fields to begin setup"
|
|
1529
2697
|
|
|
1530
2698
|
i18n-configuratorEmptyMeasuresText="kendo.pivotgrid.configuratorEmptyMeasuresText|The text content of the PivotGrid configurator empty measures container"
|
|
1531
|
-
configuratorEmptyMeasuresText="Select some fields to begin setup"
|
|
2699
|
+
configuratorEmptyMeasuresText="Select some fields to begin setup"
|
|
2700
|
+
|
|
2701
|
+
i18n-chipMenuIconTitle="kendo.grid.chipMenuIconTitle|The title of the field menu icon"
|
|
2702
|
+
chipMenuIconTitle="{{ '{fieldName} Field Menu' }}"></ng-container>
|
|
1532
2703
|
|
|
1533
2704
|
<div #table class="k-pivotgrid">
|
|
1534
2705
|
<span class="k-pivotgrid-empty-cell">
|
|
@@ -1568,10 +2739,10 @@ PivotGridComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ver
|
|
|
1568
2739
|
<div *ngIf="configurator"
|
|
1569
2740
|
class="k-pivotgrid-configurator-button"
|
|
1570
2741
|
(click)="showConfigurator = !showConfigurator">
|
|
1571
|
-
<span>{{
|
|
2742
|
+
<span>{{messageFor('configuratorButtonText')}}<span class="k-icon k-i-gear k-color-inherit"></span>
|
|
1572
2743
|
</span>
|
|
1573
2744
|
</div>
|
|
1574
|
-
`, isInline: true, styles: ["\n /** TODO: Remove if added to themes */\n div.k-loader {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n }\n "], components: [{ type: PivotGridTableComponent, selector: "kendo-pivotgrid-table", inputs: ["tableType", "colWidth"] }, { type: i5$1.LoaderComponent, selector: "kendo-loader", inputs: ["type", "themeColor", "size"] }, { type: PivotGridConfiguratorComponent, selector: "kendo-pivotgrid-configurator", inputs: ["horizontal"] }], directives: [{ type: LocalizedMessagesDirective, selector: "[kendoPivotGridLocalizedMessages]" }, { type:
|
|
2745
|
+
`, isInline: true, styles: ["\n /** TODO: Remove if added to themes */\n div.k-loader {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n }\n\n .k-pivotgrid-empty-cell:focus {\n outline: none;\n }\n "], components: [{ type: PivotGridTableComponent, selector: "kendo-pivotgrid-table", inputs: ["tableType", "colWidth"] }, { type: i5$1.LoaderComponent, selector: "kendo-loader", inputs: ["type", "themeColor", "size"] }, { type: PivotGridConfiguratorComponent, selector: "kendo-pivotgrid-configurator", inputs: ["horizontal", "sort", "filter"] }], directives: [{ type: LocalizedMessagesDirective, selector: "[kendoPivotGridLocalizedMessages]" }, { type: i7.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
1575
2746
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PivotGridComponent, decorators: [{
|
|
1576
2747
|
type: Component,
|
|
1577
2748
|
args: [{
|
|
@@ -1579,6 +2750,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
1579
2750
|
providers: [
|
|
1580
2751
|
PivotGridDataService,
|
|
1581
2752
|
LocalizationService,
|
|
2753
|
+
PivotLocalizationService,
|
|
1582
2754
|
{
|
|
1583
2755
|
provide: L10N_PREFIX,
|
|
1584
2756
|
useValue: 'kendo.pivotgrid'
|
|
@@ -1674,7 +2846,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
1674
2846
|
configuratorEmptyColumnsText="Select some fields to begin setup"
|
|
1675
2847
|
|
|
1676
2848
|
i18n-configuratorEmptyMeasuresText="kendo.pivotgrid.configuratorEmptyMeasuresText|The text content of the PivotGrid configurator empty measures container"
|
|
1677
|
-
configuratorEmptyMeasuresText="Select some fields to begin setup"
|
|
2849
|
+
configuratorEmptyMeasuresText="Select some fields to begin setup"
|
|
2850
|
+
|
|
2851
|
+
i18n-chipMenuIconTitle="kendo.grid.chipMenuIconTitle|The title of the field menu icon"
|
|
2852
|
+
chipMenuIconTitle="{{ '{fieldName} Field Menu' }}"></ng-container>
|
|
1678
2853
|
|
|
1679
2854
|
<div #table class="k-pivotgrid">
|
|
1680
2855
|
<span class="k-pivotgrid-empty-cell">
|
|
@@ -1714,7 +2889,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
1714
2889
|
<div *ngIf="configurator"
|
|
1715
2890
|
class="k-pivotgrid-configurator-button"
|
|
1716
2891
|
(click)="showConfigurator = !showConfigurator">
|
|
1717
|
-
<span>{{
|
|
2892
|
+
<span>{{messageFor('configuratorButtonText')}}<span class="k-icon k-i-gear k-color-inherit"></span>
|
|
1718
2893
|
</span>
|
|
1719
2894
|
</div>
|
|
1720
2895
|
`,
|
|
@@ -1726,9 +2901,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
1726
2901
|
left: 50%;
|
|
1727
2902
|
transform: translate(-50%, -50%);
|
|
1728
2903
|
}
|
|
2904
|
+
|
|
2905
|
+
.k-pivotgrid-empty-cell:focus {
|
|
2906
|
+
outline: none;
|
|
2907
|
+
}
|
|
1729
2908
|
`]
|
|
1730
2909
|
}]
|
|
1731
|
-
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.NgZone }, { type: PivotGridDataService }, { type:
|
|
2910
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.NgZone }, { type: PivotGridDataService }, { type: i1.LocalizationService }, { type: i0.Renderer2 }, { type: i3.ScrollbarWidthService }]; }, propDecorators: { hostClass: [{
|
|
1732
2911
|
type: HostBinding,
|
|
1733
2912
|
args: ['class.k-d-flex']
|
|
1734
2913
|
}, {
|
|
@@ -1778,10 +2957,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
1778
2957
|
* @hidden
|
|
1779
2958
|
*/
|
|
1780
2959
|
class PivotGridState {
|
|
1781
|
-
constructor(columnAxes, rowAxes, measureAxes) {
|
|
2960
|
+
constructor(columnAxes, rowAxes, measureAxes, sort, filter) {
|
|
1782
2961
|
this.columnAxes = columnAxes;
|
|
1783
2962
|
this.rowAxes = rowAxes;
|
|
1784
2963
|
this.measureAxes = measureAxes;
|
|
2964
|
+
this.sort = sort;
|
|
2965
|
+
this.filter = filter;
|
|
1785
2966
|
}
|
|
1786
2967
|
}
|
|
1787
2968
|
|
|
@@ -1833,6 +3014,10 @@ class PivotBaseBindingDirective {
|
|
|
1833
3014
|
* Represents the measure axes configuration of the PivotGrid.
|
|
1834
3015
|
*/
|
|
1835
3016
|
this.measureAxes = [];
|
|
3017
|
+
/**
|
|
3018
|
+
* Represents the initial sorted state of the PivotGrid.
|
|
3019
|
+
*/
|
|
3020
|
+
this.sort = [];
|
|
1836
3021
|
/**
|
|
1837
3022
|
* Fires each time a row or column header gets expanded or collapsed by the end user. The event is preventable.
|
|
1838
3023
|
* If you prevent the event, the PivotGrid will not be rerendered with the new state, resulting from the end user interaction.
|
|
@@ -1854,7 +3039,7 @@ class PivotBaseBindingDirective {
|
|
|
1854
3039
|
* @hidden
|
|
1855
3040
|
*/
|
|
1856
3041
|
get state() {
|
|
1857
|
-
return new PivotGridState(this.columnAxes, this.rowAxes, this.measureAxes);
|
|
3042
|
+
return new PivotGridState(this.columnAxes, this.rowAxes, this.measureAxes, this.sort, this.filter);
|
|
1858
3043
|
}
|
|
1859
3044
|
ngOnInit() {
|
|
1860
3045
|
this.loadData(this.state);
|
|
@@ -1880,16 +3065,16 @@ class PivotBaseBindingDirective {
|
|
|
1880
3065
|
this.dataService.configuredFields.next({
|
|
1881
3066
|
columnAxes: state.columnAxes,
|
|
1882
3067
|
rowAxes: state.rowAxes,
|
|
1883
|
-
measureAxes: state.measureAxes
|
|
3068
|
+
measureAxes: state.measureAxes,
|
|
3069
|
+
sort: state.sort,
|
|
3070
|
+
filter: state.filter
|
|
1884
3071
|
});
|
|
1885
3072
|
this.loadData(state);
|
|
1886
3073
|
});
|
|
1887
3074
|
}));
|
|
1888
3075
|
this.subs.add(this.dataService.valuesRows.subscribe((data) => {
|
|
1889
3076
|
this.zone.run(() => {
|
|
1890
|
-
|
|
1891
|
-
this.dataLoaded.emit(data);
|
|
1892
|
-
}
|
|
3077
|
+
this.dataService.aggregateData = data;
|
|
1893
3078
|
});
|
|
1894
3079
|
}));
|
|
1895
3080
|
this.dataService.directive = this;
|
|
@@ -1908,7 +3093,9 @@ class PivotBaseBindingDirective {
|
|
|
1908
3093
|
this.dataService.configuredFields.next({
|
|
1909
3094
|
columnAxes: this.columnAxes,
|
|
1910
3095
|
rowAxes: this.rowAxes,
|
|
1911
|
-
measureAxes: this.measureAxes
|
|
3096
|
+
measureAxes: this.measureAxes,
|
|
3097
|
+
sort: this.sort,
|
|
3098
|
+
filter: this.filter
|
|
1912
3099
|
});
|
|
1913
3100
|
}
|
|
1914
3101
|
updateHeaders(axes, tree, path) {
|
|
@@ -1935,7 +3122,7 @@ class PivotBaseBindingDirective {
|
|
|
1935
3122
|
;
|
|
1936
3123
|
}
|
|
1937
3124
|
PivotBaseBindingDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PivotBaseBindingDirective, deps: [{ token: PivotGridDataService }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1938
|
-
PivotBaseBindingDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: PivotBaseBindingDirective, selector: "kendo-base-binding-directive", inputs: { columnAxes: "columnAxes", rowAxes: "rowAxes", measureAxes: "measureAxes" }, outputs: { expandChange: "expandChange", configurationChange: "configurationChange", dataLoaded: "dataLoaded" }, ngImport: i0 });
|
|
3125
|
+
PivotBaseBindingDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: PivotBaseBindingDirective, selector: "kendo-base-binding-directive", inputs: { columnAxes: "columnAxes", rowAxes: "rowAxes", measureAxes: "measureAxes", sort: "sort", filter: "filter" }, outputs: { expandChange: "expandChange", configurationChange: "configurationChange", dataLoaded: "dataLoaded" }, ngImport: i0 });
|
|
1939
3126
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PivotBaseBindingDirective, decorators: [{
|
|
1940
3127
|
type: Directive,
|
|
1941
3128
|
args: [{
|
|
@@ -1947,6 +3134,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
1947
3134
|
type: Input
|
|
1948
3135
|
}], measureAxes: [{
|
|
1949
3136
|
type: Input
|
|
3137
|
+
}], sort: [{
|
|
3138
|
+
type: Input
|
|
3139
|
+
}], filter: [{
|
|
3140
|
+
type: Input
|
|
1950
3141
|
}], expandChange: [{
|
|
1951
3142
|
type: Output
|
|
1952
3143
|
}], configurationChange: [{
|
|
@@ -1984,13 +3175,13 @@ class PivotLocalBindingDirective extends PivotBaseBindingDirective {
|
|
|
1984
3175
|
this.updateConfiguratorFields();
|
|
1985
3176
|
}
|
|
1986
3177
|
loadData(state) {
|
|
1987
|
-
const { columnAxes, rowAxes, measureAxes } = state;
|
|
3178
|
+
const { columnAxes, rowAxes, measureAxes, sort, filter } = state;
|
|
1988
3179
|
const rootColumnAxes = this.getRootAxes(columnAxes);
|
|
1989
3180
|
const rootRowAxes = this.getRootAxes(rowAxes);
|
|
1990
3181
|
const columnSettings = rootColumnAxes.split(stringSeparator).map(this.createAxisSettings);
|
|
1991
3182
|
const rowSettings = rootRowAxes.split(stringSeparator).map(this.createAxisSettings);
|
|
1992
3183
|
const measuresSettings = measureAxes.map(m => this.measures.find(meas => String(meas.name) === String(m.name))).filter(Boolean);
|
|
1993
|
-
const dataTree = createDataTree(this.data, rowSettings, columnSettings, measuresSettings, bindingFields);
|
|
3184
|
+
const dataTree = createDataTree(this.data, rowSettings, columnSettings, measuresSettings, bindingFields, filter);
|
|
1994
3185
|
this.dataState = createLocalDataState({
|
|
1995
3186
|
dataTree,
|
|
1996
3187
|
rowSettings,
|
|
@@ -1998,7 +3189,7 @@ class PivotLocalBindingDirective extends PivotBaseBindingDirective {
|
|
|
1998
3189
|
rowAxes: rowAxes,
|
|
1999
3190
|
columnAxes: columnAxes,
|
|
2000
3191
|
measures: measuresSettings,
|
|
2001
|
-
sort:
|
|
3192
|
+
sort: sort,
|
|
2002
3193
|
fields: bindingFields
|
|
2003
3194
|
});
|
|
2004
3195
|
this.updateDataServiceFields();
|
|
@@ -2039,18 +3230,20 @@ class PivotOLAPBindingDirective extends PivotBaseBindingDirective {
|
|
|
2039
3230
|
}
|
|
2040
3231
|
}
|
|
2041
3232
|
loadData(state) {
|
|
2042
|
-
const { columnAxes, rowAxes, measureAxes } = state;
|
|
3233
|
+
const { columnAxes, rowAxes, measureAxes, sort, filter } = state;
|
|
2043
3234
|
this.dataService.loading.next(true);
|
|
2044
3235
|
const options = {
|
|
2045
3236
|
connection: {
|
|
2046
3237
|
catalog: this.catalog,
|
|
2047
3238
|
cube: this.cube
|
|
2048
3239
|
},
|
|
2049
|
-
columnAxes
|
|
2050
|
-
rowAxes
|
|
2051
|
-
measureAxes
|
|
3240
|
+
columnAxes,
|
|
3241
|
+
rowAxes,
|
|
3242
|
+
measureAxes,
|
|
3243
|
+
sort,
|
|
3244
|
+
filter
|
|
2052
3245
|
};
|
|
2053
|
-
fetchData({ url: this.url },
|
|
3246
|
+
fetchData({ url: this.url }, clone(options))
|
|
2054
3247
|
.then(createDataState)
|
|
2055
3248
|
.then(newDataState => {
|
|
2056
3249
|
this.dataState = newDataState;
|
|
@@ -2209,7 +3402,7 @@ class CustomMessagesComponent extends PivotGridMessages {
|
|
|
2209
3402
|
return true;
|
|
2210
3403
|
}
|
|
2211
3404
|
}
|
|
2212
|
-
CustomMessagesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: CustomMessagesComponent, deps: [{ token:
|
|
3405
|
+
CustomMessagesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: CustomMessagesComponent, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
2213
3406
|
CustomMessagesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: CustomMessagesComponent, selector: "kendo-pivotgrid-messages", providers: [
|
|
2214
3407
|
{
|
|
2215
3408
|
provide: PivotGridMessages,
|
|
@@ -2228,16 +3421,112 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
2228
3421
|
selector: 'kendo-pivotgrid-messages',
|
|
2229
3422
|
template: ``
|
|
2230
3423
|
}]
|
|
2231
|
-
}], ctorParameters: function () { return [{ type:
|
|
3424
|
+
}], ctorParameters: function () { return [{ type: i1.LocalizationService }]; } });
|
|
2232
3425
|
|
|
2233
|
-
const
|
|
3426
|
+
const MODULES = [
|
|
2234
3427
|
CommonModule,
|
|
3428
|
+
DropDownsModule,
|
|
3429
|
+
InputsModule,
|
|
3430
|
+
ButtonsModule
|
|
3431
|
+
];
|
|
3432
|
+
/**
|
|
3433
|
+
* @hidden
|
|
3434
|
+
*/
|
|
3435
|
+
class SharedModule {
|
|
3436
|
+
}
|
|
3437
|
+
SharedModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SharedModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
3438
|
+
SharedModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SharedModule, imports: [CommonModule,
|
|
3439
|
+
DropDownsModule,
|
|
3440
|
+
InputsModule,
|
|
3441
|
+
ButtonsModule], exports: [CommonModule,
|
|
3442
|
+
DropDownsModule,
|
|
3443
|
+
InputsModule,
|
|
3444
|
+
ButtonsModule] });
|
|
3445
|
+
SharedModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SharedModule, imports: [[MODULES], CommonModule,
|
|
3446
|
+
DropDownsModule,
|
|
3447
|
+
InputsModule,
|
|
3448
|
+
ButtonsModule] });
|
|
3449
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SharedModule, decorators: [{
|
|
3450
|
+
type: NgModule,
|
|
3451
|
+
args: [{
|
|
3452
|
+
imports: [MODULES],
|
|
3453
|
+
exports: [MODULES]
|
|
3454
|
+
}]
|
|
3455
|
+
}] });
|
|
3456
|
+
|
|
3457
|
+
const COMPONENTS = [
|
|
3458
|
+
ChipMenuItemComponent,
|
|
3459
|
+
ChipMenuSortComponent,
|
|
3460
|
+
ChipMenuComponent,
|
|
3461
|
+
ChipMenuFilterComponent,
|
|
3462
|
+
ChipMenuItemContentTemplateDirective,
|
|
3463
|
+
FilterMenuContainerComponent,
|
|
3464
|
+
StringFilterMenuComponent,
|
|
3465
|
+
FilterMenuDropDownListDirective,
|
|
3466
|
+
ChipMenuContainerComponent,
|
|
3467
|
+
ChipMenuItemDirective
|
|
3468
|
+
];
|
|
3469
|
+
/**
|
|
3470
|
+
* @hidden
|
|
3471
|
+
*/
|
|
3472
|
+
class ChipMenuModule {
|
|
3473
|
+
static exports() {
|
|
3474
|
+
return [
|
|
3475
|
+
ChipMenuItemComponent,
|
|
3476
|
+
ChipMenuSortComponent,
|
|
3477
|
+
ChipMenuContainerComponent,
|
|
3478
|
+
ChipMenuItemDirective,
|
|
3479
|
+
ChipMenuComponent
|
|
3480
|
+
];
|
|
3481
|
+
}
|
|
3482
|
+
}
|
|
3483
|
+
ChipMenuModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ChipMenuModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
3484
|
+
ChipMenuModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ChipMenuModule, declarations: [ChipMenuItemComponent,
|
|
3485
|
+
ChipMenuSortComponent,
|
|
3486
|
+
ChipMenuComponent,
|
|
3487
|
+
ChipMenuFilterComponent,
|
|
3488
|
+
ChipMenuItemContentTemplateDirective,
|
|
3489
|
+
FilterMenuContainerComponent,
|
|
3490
|
+
StringFilterMenuComponent,
|
|
3491
|
+
FilterMenuDropDownListDirective,
|
|
3492
|
+
ChipMenuContainerComponent,
|
|
3493
|
+
ChipMenuItemDirective], imports: [SharedModule,
|
|
3494
|
+
ReactiveFormsModule,
|
|
3495
|
+
FormsModule], exports: [ChipMenuItemComponent,
|
|
3496
|
+
ChipMenuSortComponent,
|
|
3497
|
+
ChipMenuComponent,
|
|
3498
|
+
ChipMenuFilterComponent,
|
|
3499
|
+
ChipMenuItemContentTemplateDirective,
|
|
3500
|
+
FilterMenuContainerComponent,
|
|
3501
|
+
StringFilterMenuComponent,
|
|
3502
|
+
FilterMenuDropDownListDirective,
|
|
3503
|
+
ChipMenuContainerComponent,
|
|
3504
|
+
ChipMenuItemDirective] });
|
|
3505
|
+
ChipMenuModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ChipMenuModule, imports: [[
|
|
3506
|
+
SharedModule,
|
|
3507
|
+
ReactiveFormsModule,
|
|
3508
|
+
FormsModule
|
|
3509
|
+
]] });
|
|
3510
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ChipMenuModule, decorators: [{
|
|
3511
|
+
type: NgModule,
|
|
3512
|
+
args: [{
|
|
3513
|
+
declarations: [COMPONENTS],
|
|
3514
|
+
imports: [
|
|
3515
|
+
SharedModule,
|
|
3516
|
+
ReactiveFormsModule,
|
|
3517
|
+
FormsModule
|
|
3518
|
+
],
|
|
3519
|
+
exports: [COMPONENTS]
|
|
3520
|
+
}]
|
|
3521
|
+
}] });
|
|
3522
|
+
|
|
3523
|
+
const IMPORTED_MODULES = [
|
|
2235
3524
|
EventsModule,
|
|
2236
3525
|
IndicatorsModule,
|
|
2237
|
-
ButtonsModule,
|
|
2238
3526
|
TreeViewModule,
|
|
2239
|
-
|
|
2240
|
-
|
|
3527
|
+
DraggableModule,
|
|
3528
|
+
ChipMenuModule,
|
|
3529
|
+
SharedModule
|
|
2241
3530
|
];
|
|
2242
3531
|
const DECLARATIONS = [
|
|
2243
3532
|
PivotGridComponent,
|
|
@@ -2274,13 +3563,12 @@ PivotGridModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version
|
|
|
2274
3563
|
DraggableChipDirective,
|
|
2275
3564
|
DropTargetDirective,
|
|
2276
3565
|
LocalizedMessagesDirective,
|
|
2277
|
-
CustomMessagesComponent], imports: [
|
|
2278
|
-
EventsModule,
|
|
3566
|
+
CustomMessagesComponent], imports: [EventsModule,
|
|
2279
3567
|
IndicatorsModule,
|
|
2280
|
-
ButtonsModule,
|
|
2281
3568
|
TreeViewModule,
|
|
2282
|
-
|
|
2283
|
-
|
|
3569
|
+
DraggableModule,
|
|
3570
|
+
ChipMenuModule,
|
|
3571
|
+
SharedModule], exports: [PivotGridComponent,
|
|
2284
3572
|
PivotGridTableComponent,
|
|
2285
3573
|
PivotGridCellDirective,
|
|
2286
3574
|
PivotLocalBindingDirective,
|