@progress/kendo-angular-pivotgrid 0.2.0-dev.202208250747 → 0.2.0-dev.202209021834
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 +79 -14
- package/esm2015/pivotgrid.module.js +9 -12
- package/esm2015/shared.module.js +40 -0
- package/esm2015/util.js +59 -28
- package/fesm2015/kendo-angular-pivotgrid.js +1507 -180
- package/localization/messages.d.ts +23 -1
- package/localization/pivot-localization.service.d.ts +19 -0
- package/models/configurator-settings.d.ts +4 -1
- package/package.json +3 -3
- package/pivotgrid.component.d.ts +20 -3
- 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, PreventableEvent, hasObservers, anyChanged, EventsModule, DraggableModule } from '@progress/kendo-angular-common';
|
|
10
|
-
import { toTree, toRows, toColumns, toData, configuratorReducer, PIVOT_CONFIGURATOR_ACTION, HEADERS_ACTION, headersReducer, createFlatSchemaDimensions, createDataTree, createLocalDataState, rootFields, fetchData, createDataState, fetchDiscover, addKPI, buildKPIMeasures } from '@progress/kendo-pivotgrid-common';
|
|
9
|
+
import { isDocumentAvailable, PreventableEvent, Keys, isChanged, hasObservers, anyChanged, EventsModule, DraggableModule } from '@progress/kendo-angular-common';
|
|
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: 1662143617,
|
|
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, 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: [{
|
|
@@ -426,102 +485,1175 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
426
485
|
</table>
|
|
427
486
|
`
|
|
428
487
|
}]
|
|
429
|
-
}], ctorParameters: function () { return [{ type: PivotGridDataService }]; }, propDecorators: { tableType: [{
|
|
488
|
+
}], ctorParameters: function () { return [{ type: PivotGridDataService }]; }, propDecorators: { tableType: [{
|
|
489
|
+
type: Input
|
|
490
|
+
}], colWidth: [{
|
|
491
|
+
type: Input
|
|
492
|
+
}] } });
|
|
493
|
+
|
|
494
|
+
/**
|
|
495
|
+
* @hidden
|
|
496
|
+
*/
|
|
497
|
+
class ConfiguratorService {
|
|
498
|
+
constructor() {
|
|
499
|
+
this.configuratorStateChange = new EventEmitter();
|
|
500
|
+
}
|
|
501
|
+
parseConfiguratorState(action) {
|
|
502
|
+
const newState = configuratorReducer({
|
|
503
|
+
filter: this.state.filter,
|
|
504
|
+
sort: this.state.sort,
|
|
505
|
+
rowAxes: this.state.rowAxes,
|
|
506
|
+
columnAxes: this.state.columnAxes,
|
|
507
|
+
measureAxes: this.state.measureAxes,
|
|
508
|
+
dragItem: this.state.dragItem,
|
|
509
|
+
dropDirection: this.state.dropDirection,
|
|
510
|
+
dropTarget: this.state.dropTarget,
|
|
511
|
+
dropZone: this.state.dropZone
|
|
512
|
+
}, action);
|
|
513
|
+
Object.keys(newState).forEach(key => newState[key] === undefined && delete newState[key]);
|
|
514
|
+
this.state = Object.assign(Object.assign({}, this.state), newState);
|
|
515
|
+
this.configuratorStateChange.emit(this.state);
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
ConfiguratorService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ConfiguratorService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
519
|
+
ConfiguratorService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ConfiguratorService });
|
|
520
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ConfiguratorService, decorators: [{
|
|
521
|
+
type: Injectable
|
|
522
|
+
}], propDecorators: { configuratorStateChange: [{
|
|
523
|
+
type: Output
|
|
524
|
+
}] } });
|
|
525
|
+
|
|
526
|
+
/**
|
|
527
|
+
* @hidden
|
|
528
|
+
*/
|
|
529
|
+
const append = (element) => {
|
|
530
|
+
let appended = false;
|
|
531
|
+
return () => {
|
|
532
|
+
if (!appended) {
|
|
533
|
+
document.body.appendChild(element);
|
|
534
|
+
appended = true;
|
|
535
|
+
}
|
|
536
|
+
return element;
|
|
537
|
+
};
|
|
538
|
+
};
|
|
539
|
+
/**
|
|
540
|
+
* @hidden
|
|
541
|
+
*/
|
|
542
|
+
class DropCueService {
|
|
543
|
+
create() {
|
|
544
|
+
this.dom = document.createElement('span');
|
|
545
|
+
this.dom.style.position = 'absolute';
|
|
546
|
+
const wrapper = document.createElement('div');
|
|
547
|
+
wrapper.classList.add('k-drop-hint', 'k-drop-hint-v');
|
|
548
|
+
const hintStart = document.createElement('div');
|
|
549
|
+
hintStart.classList.add('k-drop-hint-start');
|
|
550
|
+
const hintLine = document.createElement('div');
|
|
551
|
+
hintLine.classList.add('k-drop-hint-line');
|
|
552
|
+
const hintEnd = document.createElement('div');
|
|
553
|
+
hintEnd.classList.add('k-drop-hint-end');
|
|
554
|
+
wrapper.append(hintStart, hintLine, hintEnd);
|
|
555
|
+
this.dom.append(wrapper);
|
|
556
|
+
this.hide();
|
|
557
|
+
}
|
|
558
|
+
attach() {
|
|
559
|
+
return append(this.dom)();
|
|
560
|
+
}
|
|
561
|
+
remove() {
|
|
562
|
+
if (this.dom && this.dom.parentElement) {
|
|
563
|
+
document.body.removeChild(this.dom);
|
|
564
|
+
this.dom = null;
|
|
565
|
+
}
|
|
566
|
+
}
|
|
567
|
+
hide() {
|
|
568
|
+
this.dom.style.display = "none";
|
|
569
|
+
}
|
|
570
|
+
position({ left, top, height }) {
|
|
571
|
+
this.dom.style.display = 'block';
|
|
572
|
+
this.dom.style.height = height + 'px';
|
|
573
|
+
this.dom.style.top = top + 'px';
|
|
574
|
+
this.dom.style.zIndex = '1000';
|
|
575
|
+
const width = this.dom.offsetWidth / 2;
|
|
576
|
+
this.dom.style.left = left - width + 'px';
|
|
577
|
+
}
|
|
578
|
+
}
|
|
579
|
+
DropCueService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DropCueService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
580
|
+
DropCueService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DropCueService });
|
|
581
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DropCueService, decorators: [{
|
|
582
|
+
type: Injectable
|
|
583
|
+
}] });
|
|
584
|
+
|
|
585
|
+
const contains = (node, predicate) => {
|
|
586
|
+
while (node) {
|
|
587
|
+
if (predicate(node)) {
|
|
588
|
+
return true;
|
|
589
|
+
}
|
|
590
|
+
node = node.parentNode;
|
|
591
|
+
}
|
|
592
|
+
return false;
|
|
593
|
+
};
|
|
594
|
+
/**
|
|
595
|
+
* @hidden
|
|
596
|
+
* Arguments for the `close` event of the chip-menu popup.
|
|
597
|
+
*/
|
|
598
|
+
class PopupCloseEvent extends PreventableEvent {
|
|
599
|
+
constructor(e) {
|
|
600
|
+
super();
|
|
601
|
+
this.originalEvent = e;
|
|
602
|
+
}
|
|
603
|
+
}
|
|
604
|
+
const DEFAULT_POPUP_CLASS = 'k-grid-filter-popup';
|
|
605
|
+
/**
|
|
606
|
+
* @hidden
|
|
607
|
+
* The service that is used for the popups of the chip menus.
|
|
608
|
+
*/
|
|
609
|
+
class SinglePopupService {
|
|
610
|
+
constructor(popupService, renderer, ngZone, localization) {
|
|
611
|
+
this.popupService = popupService;
|
|
612
|
+
this.renderer = renderer;
|
|
613
|
+
this.ngZone = ngZone;
|
|
614
|
+
this.localization = localization;
|
|
615
|
+
/**
|
|
616
|
+
* Fires when the chip menus are about to close because the user clicked outside their popups.
|
|
617
|
+
* Used to prevent the popup from closing.
|
|
618
|
+
*/
|
|
619
|
+
this.onClose = new Subject();
|
|
620
|
+
this.pointerEventsSub = new Subscription();
|
|
621
|
+
this.scrollSubscription = new Subscription();
|
|
622
|
+
}
|
|
623
|
+
open(anchor, template, popupRef, popupClass = DEFAULT_POPUP_CLASS) {
|
|
624
|
+
var _a;
|
|
625
|
+
const toggle = isPresent(popupRef) && this.popupRef === popupRef;
|
|
626
|
+
this.destroy();
|
|
627
|
+
if (!toggle) {
|
|
628
|
+
const direction = this.localization.rtl ? 'right' : 'left';
|
|
629
|
+
this.popupRef = this.popupService.open({
|
|
630
|
+
anchorAlign: { vertical: 'bottom', horizontal: direction },
|
|
631
|
+
popupAlign: { vertical: 'top', horizontal: direction },
|
|
632
|
+
anchor: anchor,
|
|
633
|
+
popupClass: popupClass,
|
|
634
|
+
content: template,
|
|
635
|
+
positionMode: "absolute"
|
|
636
|
+
});
|
|
637
|
+
this.renderer.setAttribute(this.popupRef.popupElement, 'dir', this.localization.rtl ? 'rtl' : 'ltr');
|
|
638
|
+
this.attachClose(anchor);
|
|
639
|
+
}
|
|
640
|
+
const popupEl = (_a = this.popupRef) === null || _a === void 0 ? void 0 : _a.popupElement;
|
|
641
|
+
if (popupEl) {
|
|
642
|
+
this.attachMouseListeners(popupEl);
|
|
643
|
+
}
|
|
644
|
+
return this.popupRef;
|
|
645
|
+
}
|
|
646
|
+
destroy() {
|
|
647
|
+
if (this.popupRef) {
|
|
648
|
+
this.detachClose();
|
|
649
|
+
this.pointerEventsSub.unsubscribe();
|
|
650
|
+
this.pointerEventsSub = null;
|
|
651
|
+
this.popupRef.close();
|
|
652
|
+
this.popupRef = null;
|
|
653
|
+
}
|
|
654
|
+
}
|
|
655
|
+
ngOnDestroy() {
|
|
656
|
+
this.destroy();
|
|
657
|
+
this.scrollSubscription.unsubscribe();
|
|
658
|
+
}
|
|
659
|
+
detachClose() {
|
|
660
|
+
if (this.removeClick) {
|
|
661
|
+
this.removeClick();
|
|
662
|
+
}
|
|
663
|
+
}
|
|
664
|
+
attachClose(skipElement) {
|
|
665
|
+
this.detachClose();
|
|
666
|
+
this.ngZone.runOutsideAngular(() => this.removeClick = this.renderer.listen('document', 'click', (e) => {
|
|
667
|
+
if (!contains(e.target, x => this.popupRef.popupElement === x || x === skipElement)) {
|
|
668
|
+
const args = new PopupCloseEvent(e);
|
|
669
|
+
this.onClose.next(args);
|
|
670
|
+
if (!args.isDefaultPrevented() && this.canClosePopup) {
|
|
671
|
+
this.destroy();
|
|
672
|
+
}
|
|
673
|
+
this.canClosePopup = true;
|
|
674
|
+
}
|
|
675
|
+
}));
|
|
676
|
+
}
|
|
677
|
+
attachMouseListeners(el) {
|
|
678
|
+
this.pointerEventsSub = new Subscription();
|
|
679
|
+
this.ngZone.runOutsideAngular(() => {
|
|
680
|
+
this.pointerEventsSub.add(this.renderer.listen(el, 'pointerdown', (e) => {
|
|
681
|
+
e.stopImmediatePropagation();
|
|
682
|
+
this.canClosePopup = false;
|
|
683
|
+
}));
|
|
684
|
+
this.pointerEventsSub.add(this.renderer.listen(el, 'pointerup', () => {
|
|
685
|
+
this.canClosePopup = true;
|
|
686
|
+
}));
|
|
687
|
+
});
|
|
688
|
+
}
|
|
689
|
+
}
|
|
690
|
+
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 });
|
|
691
|
+
SinglePopupService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SinglePopupService });
|
|
692
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SinglePopupService, decorators: [{
|
|
693
|
+
type: Injectable
|
|
694
|
+
}], ctorParameters: function () { return [{ type: i1$1.PopupService }, { type: i0.Renderer2 }, { type: i0.NgZone }, { type: PivotLocalizationService }]; } });
|
|
695
|
+
|
|
696
|
+
/**
|
|
697
|
+
* @hidden
|
|
698
|
+
*/
|
|
699
|
+
class MenuTabbingService {
|
|
700
|
+
constructor() {
|
|
701
|
+
this.isColumnMenu = false;
|
|
702
|
+
this.isPopupOpen = false;
|
|
703
|
+
}
|
|
704
|
+
}
|
|
705
|
+
MenuTabbingService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: MenuTabbingService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
706
|
+
MenuTabbingService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: MenuTabbingService });
|
|
707
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: MenuTabbingService, decorators: [{
|
|
708
|
+
type: Injectable
|
|
709
|
+
}] });
|
|
710
|
+
|
|
711
|
+
/**
|
|
712
|
+
* @hidden
|
|
713
|
+
* Represents the service that is passed to the ChipMenuFilterComponent and ChipMenuSortComponent.
|
|
714
|
+
*/
|
|
715
|
+
class ChipMenuService {
|
|
716
|
+
constructor(menuTabbingService) {
|
|
717
|
+
this.closeMenu = new EventEmitter();
|
|
718
|
+
this.menuTabbingService = menuTabbingService;
|
|
719
|
+
}
|
|
720
|
+
/**
|
|
721
|
+
* Closes the chip menu.
|
|
722
|
+
*/
|
|
723
|
+
close() {
|
|
724
|
+
this.closeMenu.emit();
|
|
725
|
+
}
|
|
726
|
+
}
|
|
727
|
+
ChipMenuService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ChipMenuService, deps: [{ token: MenuTabbingService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
728
|
+
ChipMenuService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ChipMenuService });
|
|
729
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ChipMenuService, decorators: [{
|
|
730
|
+
type: Injectable
|
|
731
|
+
}], ctorParameters: function () { return [{ type: MenuTabbingService }]; } });
|
|
732
|
+
|
|
733
|
+
/**
|
|
734
|
+
* @hidden
|
|
735
|
+
*/
|
|
736
|
+
class ChipMenuItemDirective {
|
|
737
|
+
constructor(hostElement, renderer, ngZone) {
|
|
738
|
+
this.hostElement = hostElement;
|
|
739
|
+
this.renderer = renderer;
|
|
740
|
+
this.ngZone = ngZone;
|
|
741
|
+
this._isFirst = false;
|
|
742
|
+
this._isLast = false;
|
|
743
|
+
this.subs = new Subscription();
|
|
744
|
+
this.onTab = (e) => {
|
|
745
|
+
if (e.keyCode !== Keys.Tab) {
|
|
746
|
+
return;
|
|
747
|
+
}
|
|
748
|
+
if (this.isFirst && e.shiftKey && e.target === this.chipMenuItems[0]) {
|
|
749
|
+
e.preventDefault();
|
|
750
|
+
this.menuItemComponent.service.menuTabbingService.lastFocusable.focus();
|
|
751
|
+
}
|
|
752
|
+
if (this.isLast && !e.shiftKey) {
|
|
753
|
+
const lastColumnMenuItem = this.getLastColumnMenuItem();
|
|
754
|
+
const isExpanded = this.menuItemComponent.expanded;
|
|
755
|
+
if (lastColumnMenuItem === e.target && !isExpanded) {
|
|
756
|
+
e.preventDefault();
|
|
757
|
+
this.menuItemComponent.service.menuTabbingService.firstFocusable.focus();
|
|
758
|
+
}
|
|
759
|
+
}
|
|
760
|
+
};
|
|
761
|
+
}
|
|
762
|
+
set isFirst(value) {
|
|
763
|
+
if (value) {
|
|
764
|
+
const focusableElement = this.chipMenuItems[0];
|
|
765
|
+
this.menuItemComponent.service.menuTabbingService.firstFocusable = focusableElement;
|
|
766
|
+
this.ngZone.runOutsideAngular(() => {
|
|
767
|
+
const firstItemKeydownSub = this.renderer.listen(focusableElement, 'keydown', this.onTab);
|
|
768
|
+
this.subs.add(firstItemKeydownSub);
|
|
769
|
+
});
|
|
770
|
+
}
|
|
771
|
+
this._isFirst = value;
|
|
772
|
+
}
|
|
773
|
+
get isFirst() {
|
|
774
|
+
return this._isFirst;
|
|
775
|
+
}
|
|
776
|
+
set isLast(value) {
|
|
777
|
+
if (!this.chipMenuItems) {
|
|
778
|
+
return;
|
|
779
|
+
}
|
|
780
|
+
if (value) {
|
|
781
|
+
const lastFocusableElement = this.getLastColumnMenuItem();
|
|
782
|
+
this.menuItemComponent.service.menuTabbingService.lastFocusable = lastFocusableElement;
|
|
783
|
+
this.ngZone.runOutsideAngular(() => {
|
|
784
|
+
const lastItemKeydownSub = this.renderer.listen(lastFocusableElement, 'keydown', this.onTab);
|
|
785
|
+
this.subs.add(lastItemKeydownSub);
|
|
786
|
+
});
|
|
787
|
+
}
|
|
788
|
+
this._isLast = value;
|
|
789
|
+
}
|
|
790
|
+
get isLast() {
|
|
791
|
+
return this._isLast;
|
|
792
|
+
}
|
|
793
|
+
ngAfterViewInit() {
|
|
794
|
+
this.chipMenuItems = this.hostElement.nativeElement.querySelectorAll('.k-columnmenu-item');
|
|
795
|
+
this.chipMenuItems.forEach(el => this.renderer.setAttribute(el, 'tabindex', '0'));
|
|
796
|
+
}
|
|
797
|
+
ngOnDestroy() {
|
|
798
|
+
this.subs.unsubscribe();
|
|
799
|
+
}
|
|
800
|
+
getLastColumnMenuItem() {
|
|
801
|
+
return (this.chipMenuItems.length === 1 ? this.chipMenuItems[0] : this.chipMenuItems[1]);
|
|
802
|
+
}
|
|
803
|
+
}
|
|
804
|
+
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 });
|
|
805
|
+
ChipMenuItemDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: ChipMenuItemDirective, selector: "[kendoPivotChipMenuItem]", inputs: { menuItemComponent: ["kendoPivotChipMenuItem", "menuItemComponent"] }, ngImport: i0 });
|
|
806
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ChipMenuItemDirective, decorators: [{
|
|
807
|
+
type: Directive,
|
|
808
|
+
args: [{ selector: '[kendoPivotChipMenuItem]' }]
|
|
809
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.NgZone }]; }, propDecorators: { menuItemComponent: [{
|
|
810
|
+
type: Input,
|
|
811
|
+
args: ['kendoPivotChipMenuItem']
|
|
812
|
+
}] } });
|
|
813
|
+
|
|
814
|
+
/**
|
|
815
|
+
* @hidden
|
|
816
|
+
*/
|
|
817
|
+
class ChipMenuContainerComponent {
|
|
818
|
+
constructor(service, ngZone) {
|
|
819
|
+
this.service = service;
|
|
820
|
+
this.ngZone = ngZone;
|
|
821
|
+
this.hostClass = true;
|
|
822
|
+
}
|
|
823
|
+
ngAfterViewInit() {
|
|
824
|
+
if (!this.chipMenuItems.length) {
|
|
825
|
+
return;
|
|
826
|
+
}
|
|
827
|
+
this.chipMenuItems.first.isFirst = true;
|
|
828
|
+
this.chipMenuItems.last.isLast = true;
|
|
829
|
+
this.ngZone.onStable.pipe(take(1)).subscribe(() => this.service.menuTabbingService.firstFocusable.focus());
|
|
830
|
+
}
|
|
831
|
+
}
|
|
832
|
+
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 });
|
|
833
|
+
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: `
|
|
834
|
+
<ng-content></ng-content>
|
|
835
|
+
`, isInline: true });
|
|
836
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ChipMenuContainerComponent, decorators: [{
|
|
837
|
+
type: Component,
|
|
838
|
+
args: [{
|
|
839
|
+
selector: 'kendo-pivot-chipmenu-container',
|
|
840
|
+
template: `
|
|
841
|
+
<ng-content></ng-content>
|
|
842
|
+
`
|
|
843
|
+
}]
|
|
844
|
+
}], ctorParameters: function () { return [{ type: ChipMenuService }, { type: i0.NgZone }]; }, propDecorators: { chipMenuItems: [{
|
|
845
|
+
type: ContentChildren,
|
|
846
|
+
args: [ChipMenuItemDirective, { descendants: true }]
|
|
847
|
+
}], hostClass: [{
|
|
848
|
+
type: HostBinding,
|
|
849
|
+
args: ['class.k-grid-columnmenu-popup']
|
|
850
|
+
}] } });
|
|
851
|
+
|
|
852
|
+
/**
|
|
853
|
+
* @hidden
|
|
854
|
+
*/
|
|
855
|
+
class ChipMenuItemBase {
|
|
856
|
+
constructor() {
|
|
857
|
+
this.hostClass = true;
|
|
858
|
+
}
|
|
859
|
+
ngOnInit() {
|
|
860
|
+
if (isDevMode() && !this.service) {
|
|
861
|
+
throw new Error('The service input of the host chip menu components (e.g. ChipMenuSortComponent) is mandatory.');
|
|
862
|
+
}
|
|
863
|
+
}
|
|
864
|
+
close() {
|
|
865
|
+
this.service.close();
|
|
866
|
+
}
|
|
867
|
+
}
|
|
868
|
+
ChipMenuItemBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ChipMenuItemBase, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
869
|
+
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 });
|
|
870
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ChipMenuItemBase, decorators: [{
|
|
871
|
+
type: Component,
|
|
872
|
+
args: [{
|
|
873
|
+
selector: 'kendo-pivot-chip-menu-item-base',
|
|
874
|
+
template: ``
|
|
875
|
+
}]
|
|
876
|
+
}], propDecorators: { service: [{
|
|
877
|
+
type: Input
|
|
878
|
+
}], hostClass: [{
|
|
879
|
+
type: HostBinding,
|
|
880
|
+
args: ['class.k-columnmenu-item-wrapper']
|
|
881
|
+
}] } });
|
|
882
|
+
|
|
883
|
+
/**
|
|
884
|
+
* @hidden
|
|
885
|
+
*
|
|
886
|
+
* Represents the content template of the ChipMenuItemComponent.
|
|
887
|
+
* Provides an option for specifying the content of a chip menu item..
|
|
888
|
+
*/
|
|
889
|
+
class ChipMenuItemContentTemplateDirective {
|
|
890
|
+
constructor(templateRef) {
|
|
891
|
+
this.templateRef = templateRef;
|
|
892
|
+
}
|
|
893
|
+
}
|
|
894
|
+
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 });
|
|
895
|
+
ChipMenuItemContentTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: ChipMenuItemContentTemplateDirective, selector: "[kendoPivotChipMenuItemContentTemplate]", ngImport: i0 });
|
|
896
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ChipMenuItemContentTemplateDirective, decorators: [{
|
|
897
|
+
type: Directive,
|
|
898
|
+
args: [{
|
|
899
|
+
selector: '[kendoPivotChipMenuItemContentTemplate]'
|
|
900
|
+
}]
|
|
901
|
+
}], ctorParameters: function () { return [{ type: i0.TemplateRef, decorators: [{
|
|
902
|
+
type: Optional
|
|
903
|
+
}] }]; } });
|
|
904
|
+
|
|
905
|
+
/**
|
|
906
|
+
* @hidden
|
|
907
|
+
*
|
|
908
|
+
*/
|
|
909
|
+
class ChipMenuItemComponent {
|
|
910
|
+
constructor() {
|
|
911
|
+
/**
|
|
912
|
+
* Fires when the item is clicked.
|
|
913
|
+
*/
|
|
914
|
+
this.itemClick = new EventEmitter();
|
|
915
|
+
/**
|
|
916
|
+
* Fires when the content is expanded.
|
|
917
|
+
*/
|
|
918
|
+
this.expand = new EventEmitter();
|
|
919
|
+
/**
|
|
920
|
+
* Fires when the content is collapsed.
|
|
921
|
+
*/
|
|
922
|
+
this.collapse = new EventEmitter();
|
|
923
|
+
this.contentState = 'collapsed';
|
|
924
|
+
}
|
|
925
|
+
get iconClass() {
|
|
926
|
+
return `k-i-${this.icon}`;
|
|
927
|
+
}
|
|
928
|
+
ngOnChanges(changes) {
|
|
929
|
+
if (changes.expanded) {
|
|
930
|
+
this.updateContentState();
|
|
931
|
+
}
|
|
932
|
+
}
|
|
933
|
+
onClick(e) {
|
|
934
|
+
this.itemClick.emit(e);
|
|
935
|
+
if (this.contentTemplate) {
|
|
936
|
+
this.expanded = !this.expanded;
|
|
937
|
+
this.updateContentState();
|
|
938
|
+
if (this.expanded) {
|
|
939
|
+
this.expand.emit();
|
|
940
|
+
}
|
|
941
|
+
else {
|
|
942
|
+
this.collapse.emit();
|
|
943
|
+
}
|
|
944
|
+
}
|
|
945
|
+
}
|
|
946
|
+
updateContentState() {
|
|
947
|
+
this.contentState = this.expanded ? 'expanded' : 'collapsed';
|
|
948
|
+
}
|
|
949
|
+
}
|
|
950
|
+
ChipMenuItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ChipMenuItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
951
|
+
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: `
|
|
952
|
+
<div
|
|
953
|
+
class="k-columnmenu-item"
|
|
954
|
+
(click)="onClick($event)"
|
|
955
|
+
(keydown.enter)="onClick($event)"
|
|
956
|
+
[class.k-selected]="selected"
|
|
957
|
+
role="button"
|
|
958
|
+
[attr.aria-expanded]="expanded">
|
|
959
|
+
<span *ngIf="icon" class="k-icon" [ngClass]="iconClass">
|
|
960
|
+
</span>
|
|
961
|
+
{{ text }}
|
|
962
|
+
</div>
|
|
963
|
+
<div *ngIf="contentTemplate" [@state]="contentState" style="overflow:hidden;" class="k-columnmenu-item-content">
|
|
964
|
+
<ng-container [ngTemplateOutlet]="contentTemplate.templateRef">
|
|
965
|
+
</ng-container>
|
|
966
|
+
<div>
|
|
967
|
+
`, 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: [
|
|
968
|
+
trigger('state', [
|
|
969
|
+
state('collapsed', style({ display: 'none' })),
|
|
970
|
+
state('expanded', style({ display: 'block' })),
|
|
971
|
+
transition('collapsed => expanded', [
|
|
972
|
+
style({
|
|
973
|
+
height: '0px',
|
|
974
|
+
display: 'block'
|
|
975
|
+
}),
|
|
976
|
+
animate('100ms ease-in', style({
|
|
977
|
+
height: '*'
|
|
978
|
+
}))
|
|
979
|
+
]),
|
|
980
|
+
transition('expanded => collapsed', [
|
|
981
|
+
style({
|
|
982
|
+
height: '*'
|
|
983
|
+
}),
|
|
984
|
+
animate('100ms ease-in', style({
|
|
985
|
+
height: '0px'
|
|
986
|
+
}))
|
|
987
|
+
])
|
|
988
|
+
])
|
|
989
|
+
] });
|
|
990
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ChipMenuItemComponent, decorators: [{
|
|
991
|
+
type: Component,
|
|
992
|
+
args: [{
|
|
993
|
+
animations: [
|
|
994
|
+
trigger('state', [
|
|
995
|
+
state('collapsed', style({ display: 'none' })),
|
|
996
|
+
state('expanded', style({ display: 'block' })),
|
|
997
|
+
transition('collapsed => expanded', [
|
|
998
|
+
style({
|
|
999
|
+
height: '0px',
|
|
1000
|
+
display: 'block'
|
|
1001
|
+
}),
|
|
1002
|
+
animate('100ms ease-in', style({
|
|
1003
|
+
height: '*'
|
|
1004
|
+
}))
|
|
1005
|
+
]),
|
|
1006
|
+
transition('expanded => collapsed', [
|
|
1007
|
+
style({
|
|
1008
|
+
height: '*'
|
|
1009
|
+
}),
|
|
1010
|
+
animate('100ms ease-in', style({
|
|
1011
|
+
height: '0px'
|
|
1012
|
+
}))
|
|
1013
|
+
])
|
|
1014
|
+
])
|
|
1015
|
+
],
|
|
1016
|
+
selector: 'kendo-pivot-chipmenu-item',
|
|
1017
|
+
template: `
|
|
1018
|
+
<div
|
|
1019
|
+
class="k-columnmenu-item"
|
|
1020
|
+
(click)="onClick($event)"
|
|
1021
|
+
(keydown.enter)="onClick($event)"
|
|
1022
|
+
[class.k-selected]="selected"
|
|
1023
|
+
role="button"
|
|
1024
|
+
[attr.aria-expanded]="expanded">
|
|
1025
|
+
<span *ngIf="icon" class="k-icon" [ngClass]="iconClass">
|
|
1026
|
+
</span>
|
|
1027
|
+
{{ text }}
|
|
1028
|
+
</div>
|
|
1029
|
+
<div *ngIf="contentTemplate" [@state]="contentState" style="overflow:hidden;" class="k-columnmenu-item-content">
|
|
1030
|
+
<ng-container [ngTemplateOutlet]="contentTemplate.templateRef">
|
|
1031
|
+
</ng-container>
|
|
1032
|
+
<div>
|
|
1033
|
+
`
|
|
1034
|
+
}]
|
|
1035
|
+
}], propDecorators: { itemClick: [{
|
|
1036
|
+
type: Output
|
|
1037
|
+
}], expand: [{
|
|
1038
|
+
type: Output
|
|
1039
|
+
}], collapse: [{
|
|
1040
|
+
type: Output
|
|
1041
|
+
}], icon: [{
|
|
1042
|
+
type: Input
|
|
1043
|
+
}], text: [{
|
|
1044
|
+
type: Input
|
|
1045
|
+
}], selected: [{
|
|
1046
|
+
type: Input
|
|
1047
|
+
}], expanded: [{
|
|
1048
|
+
type: Input
|
|
1049
|
+
}], contentTemplate: [{
|
|
1050
|
+
type: ContentChild,
|
|
1051
|
+
args: [ChipMenuItemContentTemplateDirective, { static: false }]
|
|
1052
|
+
}] } });
|
|
1053
|
+
|
|
1054
|
+
/**
|
|
1055
|
+
* @hidden
|
|
1056
|
+
*
|
|
1057
|
+
* Represents a chip-menu item for sorting PivotGrid fields.
|
|
1058
|
+
* Allows the user to sort the PivotGrid.
|
|
1059
|
+
*/
|
|
1060
|
+
class ChipMenuSortComponent extends ChipMenuItemBase {
|
|
1061
|
+
constructor(localization, renderer, configuratorService) {
|
|
1062
|
+
super();
|
|
1063
|
+
this.localization = localization;
|
|
1064
|
+
this.renderer = renderer;
|
|
1065
|
+
this.configuratorService = configuratorService;
|
|
1066
|
+
}
|
|
1067
|
+
get sortedAsc() {
|
|
1068
|
+
const descriptor = this.descriptor;
|
|
1069
|
+
return descriptor && (!descriptor.dir || descriptor.dir === 'asc');
|
|
1070
|
+
}
|
|
1071
|
+
get sortedDesc() {
|
|
1072
|
+
const descriptor = this.descriptor;
|
|
1073
|
+
return descriptor && descriptor.dir === 'desc';
|
|
1074
|
+
}
|
|
1075
|
+
/**
|
|
1076
|
+
* Returns the localized message for a given token
|
|
1077
|
+
*/
|
|
1078
|
+
messageFor(localizationToken) {
|
|
1079
|
+
return this.localization.get(localizationToken);
|
|
1080
|
+
}
|
|
1081
|
+
toggleSort(dir) {
|
|
1082
|
+
const field = this.chip.name.toString();
|
|
1083
|
+
const descriptor = this.descriptor;
|
|
1084
|
+
const sort = this.configuratorService.state.sort.filter(s => s.field !== field);
|
|
1085
|
+
if (!descriptor || descriptor.dir !== dir) {
|
|
1086
|
+
sort.push({ field, dir });
|
|
1087
|
+
}
|
|
1088
|
+
this.configuratorService.parseConfiguratorState({ type: PIVOT_CONFIGURATOR_ACTION.setSort, payload: sort });
|
|
1089
|
+
this.close();
|
|
1090
|
+
}
|
|
1091
|
+
get descriptor() {
|
|
1092
|
+
return [].concat(this.configuratorService.state.sort || []).find(s => s.field === this.chip.name.toString());
|
|
1093
|
+
}
|
|
1094
|
+
}
|
|
1095
|
+
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 });
|
|
1096
|
+
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: `
|
|
1097
|
+
<kendo-pivot-chipmenu-item
|
|
1098
|
+
[text]="messageFor('fieldMenuSortAscendingItemLabel')"
|
|
1099
|
+
icon="sort-asc-small"
|
|
1100
|
+
(itemClick)="toggleSort('asc')"
|
|
1101
|
+
[selected]="sortedAsc">
|
|
1102
|
+
</kendo-pivot-chipmenu-item>
|
|
1103
|
+
<kendo-pivot-chipmenu-item
|
|
1104
|
+
[text]="messageFor('fieldMenuSortDescendingItemLabel')"
|
|
1105
|
+
icon="sort-desc-small"
|
|
1106
|
+
(itemClick)="toggleSort('desc')"
|
|
1107
|
+
[selected]="sortedDesc">
|
|
1108
|
+
</kendo-pivot-chipmenu-item>
|
|
1109
|
+
`, isInline: true, components: [{ type: ChipMenuItemComponent, selector: "kendo-pivot-chipmenu-item", inputs: ["icon", "text", "selected", "expanded"], outputs: ["itemClick", "expand", "collapse"] }] });
|
|
1110
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ChipMenuSortComponent, decorators: [{
|
|
1111
|
+
type: Component,
|
|
1112
|
+
args: [{
|
|
1113
|
+
selector: 'kendo-pivot-chipmenu-sort',
|
|
1114
|
+
template: `
|
|
1115
|
+
<kendo-pivot-chipmenu-item
|
|
1116
|
+
[text]="messageFor('fieldMenuSortAscendingItemLabel')"
|
|
1117
|
+
icon="sort-asc-small"
|
|
1118
|
+
(itemClick)="toggleSort('asc')"
|
|
1119
|
+
[selected]="sortedAsc">
|
|
1120
|
+
</kendo-pivot-chipmenu-item>
|
|
1121
|
+
<kendo-pivot-chipmenu-item
|
|
1122
|
+
[text]="messageFor('fieldMenuSortDescendingItemLabel')"
|
|
1123
|
+
icon="sort-desc-small"
|
|
1124
|
+
(itemClick)="toggleSort('desc')"
|
|
1125
|
+
[selected]="sortedDesc">
|
|
1126
|
+
</kendo-pivot-chipmenu-item>
|
|
1127
|
+
`
|
|
1128
|
+
}]
|
|
1129
|
+
}], ctorParameters: function () { return [{ type: PivotLocalizationService }, { type: i0.Renderer2 }, { type: ConfiguratorService }]; }, propDecorators: { chip: [{
|
|
1130
|
+
type: Input
|
|
1131
|
+
}] } });
|
|
1132
|
+
|
|
1133
|
+
/**
|
|
1134
|
+
* @hidden
|
|
1135
|
+
*/
|
|
1136
|
+
class FilterMenuDropDownListDirective {
|
|
1137
|
+
constructor(host) {
|
|
1138
|
+
this.host = host;
|
|
1139
|
+
this.keydownHandler = (e) => {
|
|
1140
|
+
if (e.keyCode === Keys.Escape && this.host.isOpen) {
|
|
1141
|
+
e.stopPropagation();
|
|
1142
|
+
this.host.toggle(false);
|
|
1143
|
+
}
|
|
1144
|
+
};
|
|
1145
|
+
}
|
|
1146
|
+
ngAfterViewInit() {
|
|
1147
|
+
const wrapperElement = this.host.wrapper.nativeElement;
|
|
1148
|
+
wrapperElement.setAttribute('aria-label', this.filterMenuDropDownLabel);
|
|
1149
|
+
wrapperElement.addEventListener('keydown', this.keydownHandler, true);
|
|
1150
|
+
}
|
|
1151
|
+
ngOnDestroy() {
|
|
1152
|
+
this.host.wrapper.nativeElement.removeEventListener('keydown', this.keydownHandler);
|
|
1153
|
+
}
|
|
1154
|
+
}
|
|
1155
|
+
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 });
|
|
1156
|
+
FilterMenuDropDownListDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: FilterMenuDropDownListDirective, selector: "[kendoFilterMenuDropDown]", inputs: { filterMenuDropDownLabel: "filterMenuDropDownLabel" }, ngImport: i0 });
|
|
1157
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FilterMenuDropDownListDirective, decorators: [{
|
|
1158
|
+
type: Directive,
|
|
1159
|
+
args: [{ selector: '[kendoFilterMenuDropDown]' }]
|
|
1160
|
+
}], ctorParameters: function () { return [{ type: i1$2.DropDownListComponent }]; }, propDecorators: { filterMenuDropDownLabel: [{
|
|
1161
|
+
type: Input
|
|
1162
|
+
}] } });
|
|
1163
|
+
|
|
1164
|
+
/**
|
|
1165
|
+
* @hidden
|
|
1166
|
+
*/
|
|
1167
|
+
const localizeOperators = operators => localization => Object.keys(operators).map(key => ({
|
|
1168
|
+
text: localization.get(key),
|
|
1169
|
+
value: operators[key]
|
|
1170
|
+
}));
|
|
1171
|
+
const stringOperators = localizeOperators({
|
|
1172
|
+
"filterEqOperator": "eq",
|
|
1173
|
+
"filterNotEqOperator": "neq",
|
|
1174
|
+
"filterContainsOperator": "contains",
|
|
1175
|
+
"filterNotContainsOperator": "doesnotcontain",
|
|
1176
|
+
"filterStartsWithOperator": "startswith",
|
|
1177
|
+
"filterEndsWithOperator": "endswith",
|
|
1178
|
+
"filterIsNullOperator": "isnull",
|
|
1179
|
+
"filterIsNotNullOperator": "isnotnull",
|
|
1180
|
+
"filterIsEmptyOperator": "isempty",
|
|
1181
|
+
"filterIsNotEmptyOperator": "isnotempty"
|
|
1182
|
+
});
|
|
1183
|
+
/**
|
|
1184
|
+
* @hidden
|
|
1185
|
+
*
|
|
1186
|
+
* Represents a string-filter menu component.
|
|
1187
|
+
*/
|
|
1188
|
+
class StringFilterMenuComponent {
|
|
1189
|
+
constructor(localization, configuratorService, fb) {
|
|
1190
|
+
this.localization = localization;
|
|
1191
|
+
this.configuratorService = configuratorService;
|
|
1192
|
+
this.fb = fb;
|
|
1193
|
+
this.subscription = new Subscription();
|
|
1194
|
+
this.onTouched = () => { };
|
|
1195
|
+
}
|
|
1196
|
+
get currentFilter() {
|
|
1197
|
+
var _a;
|
|
1198
|
+
const filterValue = (_a = this.configuratorService.state.filter) === null || _a === void 0 ? void 0 : _a.filter(x => x.field === this.chip.name.toString());
|
|
1199
|
+
return filterValue && filterValue[0];
|
|
1200
|
+
}
|
|
1201
|
+
registerOnChange(fn) {
|
|
1202
|
+
this.filterFormGroup.valueChanges.subscribe(fn);
|
|
1203
|
+
}
|
|
1204
|
+
registerOnTouched(fn) {
|
|
1205
|
+
this.onTouched = fn;
|
|
1206
|
+
}
|
|
1207
|
+
writeValue(val) {
|
|
1208
|
+
if (val) {
|
|
1209
|
+
this.filterFormGroup.setValue(val, { emitEvent: false });
|
|
1210
|
+
}
|
|
1211
|
+
}
|
|
1212
|
+
get filterMenuDropDownLabel() {
|
|
1213
|
+
const localizationMsg = this.localization.get('filterOperatorsDropDownLabel') || '';
|
|
1214
|
+
const chipName = this.chip.name.toString();
|
|
1215
|
+
return replaceMessagePlaceholder(localizationMsg, 'fields', chipName);
|
|
1216
|
+
}
|
|
1217
|
+
ngOnInit() {
|
|
1218
|
+
this.filterFormGroup = this.fb.group({
|
|
1219
|
+
operator: [this.currentFilter ? this.currentFilter.operator : ''],
|
|
1220
|
+
value: [this.currentFilter ? this.currentFilter.value : '']
|
|
1221
|
+
});
|
|
1222
|
+
this.operators = stringOperators(this.localization);
|
|
1223
|
+
}
|
|
1224
|
+
ngOnDestroy() {
|
|
1225
|
+
this.subscription.unsubscribe();
|
|
1226
|
+
}
|
|
1227
|
+
}
|
|
1228
|
+
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 });
|
|
1229
|
+
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: [{
|
|
1230
|
+
provide: NG_VALUE_ACCESSOR,
|
|
1231
|
+
useExisting: forwardRef(() => StringFilterMenuComponent),
|
|
1232
|
+
multi: true
|
|
1233
|
+
}], ngImport: i0, template: `
|
|
1234
|
+
<ng-container [formGroup]="filterFormGroup">
|
|
1235
|
+
<kendo-dropdownlist
|
|
1236
|
+
kendoFilterMenuDropDown
|
|
1237
|
+
[filterMenuDropDownLabel]="filterMenuDropDownLabel"
|
|
1238
|
+
[data]="operators"
|
|
1239
|
+
formControlName="operator"
|
|
1240
|
+
[valuePrimitive]="true"
|
|
1241
|
+
textField="text"
|
|
1242
|
+
valueField="value">
|
|
1243
|
+
</kendo-dropdownlist>
|
|
1244
|
+
<input
|
|
1245
|
+
kendoTextBox
|
|
1246
|
+
formControlName="value"
|
|
1247
|
+
/>
|
|
1248
|
+
</ng-container>
|
|
1249
|
+
`, 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]" }] });
|
|
1250
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: StringFilterMenuComponent, decorators: [{
|
|
1251
|
+
type: Component,
|
|
1252
|
+
args: [{
|
|
1253
|
+
selector: 'kendo-pivot-string-filter-menu',
|
|
1254
|
+
providers: [{
|
|
1255
|
+
provide: NG_VALUE_ACCESSOR,
|
|
1256
|
+
useExisting: forwardRef(() => StringFilterMenuComponent),
|
|
1257
|
+
multi: true
|
|
1258
|
+
}],
|
|
1259
|
+
template: `
|
|
1260
|
+
<ng-container [formGroup]="filterFormGroup">
|
|
1261
|
+
<kendo-dropdownlist
|
|
1262
|
+
kendoFilterMenuDropDown
|
|
1263
|
+
[filterMenuDropDownLabel]="filterMenuDropDownLabel"
|
|
1264
|
+
[data]="operators"
|
|
1265
|
+
formControlName="operator"
|
|
1266
|
+
[valuePrimitive]="true"
|
|
1267
|
+
textField="text"
|
|
1268
|
+
valueField="value">
|
|
1269
|
+
</kendo-dropdownlist>
|
|
1270
|
+
<input
|
|
1271
|
+
kendoTextBox
|
|
1272
|
+
formControlName="value"
|
|
1273
|
+
/>
|
|
1274
|
+
</ng-container>
|
|
1275
|
+
`
|
|
1276
|
+
}]
|
|
1277
|
+
}], ctorParameters: function () { return [{ type: PivotLocalizationService }, { type: ConfiguratorService }, { type: i3$1.FormBuilder }]; }, propDecorators: { chip: [{
|
|
430
1278
|
type: Input
|
|
431
|
-
}],
|
|
1279
|
+
}], menuTabbingService: [{
|
|
432
1280
|
type: Input
|
|
433
1281
|
}] } });
|
|
434
1282
|
|
|
1283
|
+
const isNoValueOperator = operator => (operator === "isnull"
|
|
1284
|
+
|| operator === "isnotnull"
|
|
1285
|
+
|| operator === "isempty"
|
|
1286
|
+
|| operator === "isnotempty");
|
|
1287
|
+
const validFilter = ({ value, operator }) => !isNullOrEmptyString(value) || isNoValueOperator(operator);
|
|
435
1288
|
/**
|
|
436
1289
|
* @hidden
|
|
437
1290
|
*/
|
|
438
|
-
class
|
|
439
|
-
constructor() {
|
|
440
|
-
this.
|
|
1291
|
+
class FilterMenuContainerComponent {
|
|
1292
|
+
constructor(localization, cd, menuTabbingService, configuratorService) {
|
|
1293
|
+
this.localization = localization;
|
|
1294
|
+
this.cd = cd;
|
|
1295
|
+
this.configuratorService = configuratorService;
|
|
1296
|
+
this.close = new EventEmitter();
|
|
1297
|
+
this.actionsClass = 'k-action-buttons k-button-group';
|
|
1298
|
+
this.menuTabbingService = menuTabbingService;
|
|
441
1299
|
}
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
1300
|
+
ngOnInit() {
|
|
1301
|
+
}
|
|
1302
|
+
ngAfterViewChecked() {
|
|
1303
|
+
if (!this.menuTabbingService.isColumnMenu || (this.isLast && this.isExpanded)) {
|
|
1304
|
+
this.menuTabbingService.lastFocusable = this.disabled ?
|
|
1305
|
+
this.resetButton.nativeElement : this.filterButton.nativeElement;
|
|
1306
|
+
}
|
|
1307
|
+
}
|
|
1308
|
+
ngOnDestroy() {
|
|
1309
|
+
this.menuTabbingService.lastFocusable = null;
|
|
1310
|
+
}
|
|
1311
|
+
get disabled() {
|
|
1312
|
+
return !(this.filterDescriptorValue && validFilter(this.filterDescriptorValue));
|
|
1313
|
+
}
|
|
1314
|
+
submit() {
|
|
1315
|
+
const filterDescriptor = Object.assign({ field: this.chip.name.toString() }, this.filterDescriptorValue);
|
|
1316
|
+
const payload = !this.configuratorService.state.filter ?
|
|
1317
|
+
[filterDescriptor] :
|
|
1318
|
+
[
|
|
1319
|
+
...this.configuratorService.state.filter.filter(descriptor => descriptor.field !== filterDescriptor.field),
|
|
1320
|
+
filterDescriptor
|
|
1321
|
+
];
|
|
1322
|
+
this.configuratorService.parseConfiguratorState({ type: PIVOT_CONFIGURATOR_ACTION.setFilter, payload: payload });
|
|
1323
|
+
this.close.emit();
|
|
1324
|
+
return false;
|
|
1325
|
+
}
|
|
1326
|
+
reset() {
|
|
1327
|
+
const filters = this.configuratorService.state.filter.filter(descriptor => descriptor.field !== this.chip.name.toString());
|
|
1328
|
+
this.configuratorService.parseConfiguratorState({ type: PIVOT_CONFIGURATOR_ACTION.setFilter, payload: filters });
|
|
1329
|
+
this.close.emit();
|
|
1330
|
+
}
|
|
1331
|
+
onTab(e, buttonType) {
|
|
1332
|
+
if (this.menuTabbingService.firstFocusable && (!this.menuTabbingService.isColumnMenu || this.isLast)) {
|
|
1333
|
+
e.preventDefault();
|
|
1334
|
+
if (buttonType === 'reset') {
|
|
1335
|
+
// eslint-disable-next-line no-unused-expressions
|
|
1336
|
+
this.disabled ? this.menuTabbingService.firstFocusable.focus() : this.filterButton.nativeElement.focus();
|
|
1337
|
+
}
|
|
1338
|
+
else {
|
|
1339
|
+
this.menuTabbingService.firstFocusable.focus();
|
|
1340
|
+
}
|
|
1341
|
+
}
|
|
1342
|
+
}
|
|
1343
|
+
/**
|
|
1344
|
+
* Returns the localized message for a given token
|
|
1345
|
+
*/
|
|
1346
|
+
messageFor(localizationToken) {
|
|
1347
|
+
return this.localization.get(localizationToken);
|
|
457
1348
|
}
|
|
458
1349
|
}
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
1350
|
+
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 });
|
|
1351
|
+
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: [
|
|
1352
|
+
MenuTabbingService
|
|
1353
|
+
], viewQueries: [{ propertyName: "resetButton", first: true, predicate: ["resetButton"], descendants: true }, { propertyName: "filterButton", first: true, predicate: ["filterButton"], descendants: true }], ngImport: i0, template: `
|
|
1354
|
+
<form (submit)="submit()" (reset)="reset()"
|
|
1355
|
+
class="k-filter-menu k-group k-reset k-state-border-up">
|
|
1356
|
+
<div class="k-filter-menu-container">
|
|
1357
|
+
<kendo-pivot-string-filter-menu
|
|
1358
|
+
[(ngModel)]="filterDescriptorValue"
|
|
1359
|
+
name="'filterDescriptorValue'"
|
|
1360
|
+
[chip]="chip"
|
|
1361
|
+
[menuTabbingService]="menuTabbingService">
|
|
1362
|
+
</kendo-pivot-string-filter-menu>
|
|
1363
|
+
<div [ngClass]="actionsClass">
|
|
1364
|
+
<button
|
|
1365
|
+
#resetButton
|
|
1366
|
+
type="reset"
|
|
1367
|
+
kendoButton
|
|
1368
|
+
(keydown.tab)="onTab($event, 'reset')">{{messageFor('filterClearButton')}}</button>
|
|
1369
|
+
<button #filterButton
|
|
1370
|
+
type="submit"
|
|
1371
|
+
[disabled]="disabled"
|
|
1372
|
+
kendoButton
|
|
1373
|
+
themeColor="primary"
|
|
1374
|
+
(keydown.tab)="onTab($event, 'filter')">{{messageFor('filterFilterButton')}}</button>
|
|
1375
|
+
</div>
|
|
1376
|
+
</div>
|
|
1377
|
+
</form>
|
|
1378
|
+
`, 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"] }] });
|
|
1379
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FilterMenuContainerComponent, decorators: [{
|
|
1380
|
+
type: Component,
|
|
1381
|
+
args: [{
|
|
1382
|
+
providers: [
|
|
1383
|
+
MenuTabbingService
|
|
1384
|
+
],
|
|
1385
|
+
selector: 'kendo-pivot-filter-menu-container',
|
|
1386
|
+
template: `
|
|
1387
|
+
<form (submit)="submit()" (reset)="reset()"
|
|
1388
|
+
class="k-filter-menu k-group k-reset k-state-border-up">
|
|
1389
|
+
<div class="k-filter-menu-container">
|
|
1390
|
+
<kendo-pivot-string-filter-menu
|
|
1391
|
+
[(ngModel)]="filterDescriptorValue"
|
|
1392
|
+
name="'filterDescriptorValue'"
|
|
1393
|
+
[chip]="chip"
|
|
1394
|
+
[menuTabbingService]="menuTabbingService">
|
|
1395
|
+
</kendo-pivot-string-filter-menu>
|
|
1396
|
+
<div [ngClass]="actionsClass">
|
|
1397
|
+
<button
|
|
1398
|
+
#resetButton
|
|
1399
|
+
type="reset"
|
|
1400
|
+
kendoButton
|
|
1401
|
+
(keydown.tab)="onTab($event, 'reset')">{{messageFor('filterClearButton')}}</button>
|
|
1402
|
+
<button #filterButton
|
|
1403
|
+
type="submit"
|
|
1404
|
+
[disabled]="disabled"
|
|
1405
|
+
kendoButton
|
|
1406
|
+
themeColor="primary"
|
|
1407
|
+
(keydown.tab)="onTab($event, 'filter')">{{messageFor('filterFilterButton')}}</button>
|
|
1408
|
+
</div>
|
|
1409
|
+
</div>
|
|
1410
|
+
</form>
|
|
1411
|
+
`,
|
|
1412
|
+
styles: [`
|
|
1413
|
+
kendo-pivot-string-filter-menu {
|
|
1414
|
+
display: flex;
|
|
1415
|
+
flex-flow: column nowrap;
|
|
1416
|
+
align-items: stretch;
|
|
1417
|
+
gap: 8px;
|
|
1418
|
+
}
|
|
1419
|
+
`]
|
|
1420
|
+
}]
|
|
1421
|
+
}], ctorParameters: function () { return [{ type: PivotLocalizationService }, { type: i0.ChangeDetectorRef }, { type: MenuTabbingService }, { type: ConfiguratorService }]; }, propDecorators: { close: [{
|
|
464
1422
|
type: Output
|
|
1423
|
+
}], chip: [{
|
|
1424
|
+
type: Input
|
|
1425
|
+
}], isLast: [{
|
|
1426
|
+
type: Input
|
|
1427
|
+
}], isExpanded: [{
|
|
1428
|
+
type: Input
|
|
1429
|
+
}], menuTabbingService: [{
|
|
1430
|
+
type: Input
|
|
1431
|
+
}], actionsClass: [{
|
|
1432
|
+
type: Input
|
|
1433
|
+
}], resetButton: [{
|
|
1434
|
+
type: ViewChild,
|
|
1435
|
+
args: ['resetButton']
|
|
1436
|
+
}], filterButton: [{
|
|
1437
|
+
type: ViewChild,
|
|
1438
|
+
args: ['filterButton']
|
|
465
1439
|
}] } });
|
|
466
1440
|
|
|
467
1441
|
/**
|
|
468
1442
|
* @hidden
|
|
1443
|
+
* Represents the component for setting field filters in the PivotGrid.
|
|
469
1444
|
*/
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
1445
|
+
class ChipMenuFilterComponent extends ChipMenuItemBase {
|
|
1446
|
+
constructor(localization, hostElement) {
|
|
1447
|
+
super();
|
|
1448
|
+
this.localization = localization;
|
|
1449
|
+
this.hostElement = hostElement;
|
|
1450
|
+
/**
|
|
1451
|
+
* Fires when the content is expanded.
|
|
1452
|
+
*/
|
|
1453
|
+
this.expand = new EventEmitter();
|
|
1454
|
+
/**
|
|
1455
|
+
* Fires when the content is collapsed.
|
|
1456
|
+
*/
|
|
1457
|
+
this.collapse = new EventEmitter();
|
|
1458
|
+
/**
|
|
1459
|
+
* Specifies if the content is expanded.
|
|
1460
|
+
*/
|
|
1461
|
+
this.expanded = false;
|
|
1462
|
+
this.isLast = false;
|
|
1463
|
+
this.actionsClass = 'k-columnmenu-actions';
|
|
1464
|
+
}
|
|
1465
|
+
onCollapse() {
|
|
1466
|
+
this.expanded = false;
|
|
1467
|
+
if (this.isLast) {
|
|
1468
|
+
this.service.menuTabbingService.lastFocusable = this.hostElement.nativeElement.querySelector('.k-columnmenu-item');
|
|
476
1469
|
}
|
|
477
|
-
|
|
478
|
-
}
|
|
479
|
-
|
|
1470
|
+
this.collapse.emit();
|
|
1471
|
+
}
|
|
1472
|
+
onExpand() {
|
|
1473
|
+
this.expanded = true;
|
|
1474
|
+
this.expand.emit();
|
|
1475
|
+
}
|
|
1476
|
+
/**
|
|
1477
|
+
* Returns the localized message for a given token
|
|
1478
|
+
*/
|
|
1479
|
+
messageFor(localizationToken) {
|
|
1480
|
+
return this.localization.get(localizationToken);
|
|
1481
|
+
}
|
|
1482
|
+
}
|
|
1483
|
+
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 });
|
|
1484
|
+
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: `
|
|
1485
|
+
<kendo-pivot-chipmenu-item
|
|
1486
|
+
classs="k-widget k-expander"
|
|
1487
|
+
[text]="messageFor('fieldMenuFilterItemLabel')"
|
|
1488
|
+
icon="filter"
|
|
1489
|
+
[expanded]="expanded"
|
|
1490
|
+
(collapse)="onCollapse()"
|
|
1491
|
+
(expand)="onExpand()">
|
|
1492
|
+
<ng-template kendoPivotChipMenuItemContentTemplate>
|
|
1493
|
+
<kendo-pivot-filter-menu-container
|
|
1494
|
+
[chip]="chip"
|
|
1495
|
+
[menuTabbingService]="service.menuTabbingService"
|
|
1496
|
+
[actionsClass]="actionsClass"
|
|
1497
|
+
[isLast]="isLast"
|
|
1498
|
+
[isExpanded]="expanded"
|
|
1499
|
+
(keydown.shift.tab)="$event.stopImmediatePropagation()"
|
|
1500
|
+
(close)="close()">
|
|
1501
|
+
</kendo-pivot-filter-menu-container>
|
|
1502
|
+
</ng-template>
|
|
1503
|
+
</kendo-pivot-chipmenu-item>
|
|
1504
|
+
`, 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]" }] });
|
|
1505
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ChipMenuFilterComponent, decorators: [{
|
|
1506
|
+
type: Component,
|
|
1507
|
+
args: [{
|
|
1508
|
+
selector: 'kendo-pivot-chipmenu-filter',
|
|
1509
|
+
template: `
|
|
1510
|
+
<kendo-pivot-chipmenu-item
|
|
1511
|
+
classs="k-widget k-expander"
|
|
1512
|
+
[text]="messageFor('fieldMenuFilterItemLabel')"
|
|
1513
|
+
icon="filter"
|
|
1514
|
+
[expanded]="expanded"
|
|
1515
|
+
(collapse)="onCollapse()"
|
|
1516
|
+
(expand)="onExpand()">
|
|
1517
|
+
<ng-template kendoPivotChipMenuItemContentTemplate>
|
|
1518
|
+
<kendo-pivot-filter-menu-container
|
|
1519
|
+
[chip]="chip"
|
|
1520
|
+
[menuTabbingService]="service.menuTabbingService"
|
|
1521
|
+
[actionsClass]="actionsClass"
|
|
1522
|
+
[isLast]="isLast"
|
|
1523
|
+
[isExpanded]="expanded"
|
|
1524
|
+
(keydown.shift.tab)="$event.stopImmediatePropagation()"
|
|
1525
|
+
(close)="close()">
|
|
1526
|
+
</kendo-pivot-filter-menu-container>
|
|
1527
|
+
</ng-template>
|
|
1528
|
+
</kendo-pivot-chipmenu-item>
|
|
1529
|
+
`
|
|
1530
|
+
}]
|
|
1531
|
+
}], ctorParameters: function () { return [{ type: PivotLocalizationService }, { type: i0.ElementRef }]; }, propDecorators: { expand: [{
|
|
1532
|
+
type: Output
|
|
1533
|
+
}], collapse: [{
|
|
1534
|
+
type: Output
|
|
1535
|
+
}], chip: [{
|
|
1536
|
+
type: Input
|
|
1537
|
+
}], expanded: [{
|
|
1538
|
+
type: Input
|
|
1539
|
+
}], isLast: [{
|
|
1540
|
+
type: Input
|
|
1541
|
+
}] } });
|
|
1542
|
+
|
|
1543
|
+
const POPUP_CLASS = 'k-column-menu';
|
|
480
1544
|
/**
|
|
481
1545
|
* @hidden
|
|
1546
|
+
*
|
|
1547
|
+
* Represents the field chip menu component.
|
|
482
1548
|
*/
|
|
483
|
-
class
|
|
484
|
-
|
|
485
|
-
this.
|
|
486
|
-
this.
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
hintStart.classList.add('k-drop-hint-start');
|
|
491
|
-
const hintLine = document.createElement('div');
|
|
492
|
-
hintLine.classList.add('k-drop-hint-line');
|
|
493
|
-
const hintEnd = document.createElement('div');
|
|
494
|
-
hintEnd.classList.add('k-drop-hint-end');
|
|
495
|
-
wrapper.append(hintStart, hintLine, hintEnd);
|
|
496
|
-
this.dom.append(wrapper);
|
|
497
|
-
this.hide();
|
|
1549
|
+
class ChipMenuComponent {
|
|
1550
|
+
constructor(popupService, localization, service) {
|
|
1551
|
+
this.popupService = popupService;
|
|
1552
|
+
this.localization = localization;
|
|
1553
|
+
this.service = service;
|
|
1554
|
+
this.tabIndex = '-1';
|
|
1555
|
+
this.closeSubscription = service.closeMenu.subscribe(this.close.bind(this));
|
|
498
1556
|
}
|
|
499
|
-
|
|
500
|
-
|
|
1557
|
+
ngOnDestroy() {
|
|
1558
|
+
this.close();
|
|
1559
|
+
this.closeSubscription.unsubscribe();
|
|
501
1560
|
}
|
|
502
|
-
|
|
503
|
-
if (
|
|
504
|
-
|
|
505
|
-
|
|
1561
|
+
toggle(e, anchor, template) {
|
|
1562
|
+
if (e) {
|
|
1563
|
+
e.preventDefault();
|
|
1564
|
+
e.stopImmediatePropagation();
|
|
1565
|
+
}
|
|
1566
|
+
this.popupRef = this.popupService.open(anchor, template, this.popupRef, POPUP_CLASS);
|
|
1567
|
+
if (!this.popupRef) {
|
|
1568
|
+
this.anchor.nativeElement.focus();
|
|
506
1569
|
}
|
|
507
1570
|
}
|
|
508
|
-
|
|
509
|
-
this.
|
|
1571
|
+
close() {
|
|
1572
|
+
this.popupService.destroy();
|
|
1573
|
+
this.popupRef = null;
|
|
1574
|
+
this.anchor.nativeElement.focus();
|
|
510
1575
|
}
|
|
511
|
-
|
|
512
|
-
this.
|
|
513
|
-
this.
|
|
514
|
-
|
|
515
|
-
this.dom.style.zIndex = '1000';
|
|
516
|
-
const width = this.dom.offsetWidth / 2;
|
|
517
|
-
this.dom.style.left = left - width + 'px';
|
|
1576
|
+
get chipMenuTitle() {
|
|
1577
|
+
const localizationMsg = this.localization.get('chipMenuIconTitle') || '';
|
|
1578
|
+
const chipName = this.chip.name.toString();
|
|
1579
|
+
return replaceMessagePlaceholder(localizationMsg, 'fieldName', chipName);
|
|
518
1580
|
}
|
|
519
1581
|
}
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
1582
|
+
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 });
|
|
1583
|
+
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: [
|
|
1584
|
+
ChipMenuService,
|
|
1585
|
+
MenuTabbingService
|
|
1586
|
+
], viewQueries: [{ propertyName: "anchor", first: true, predicate: ["anchor"], descendants: true, static: true }], ngImport: i0, template: `
|
|
1587
|
+
<span #anchor
|
|
1588
|
+
class="k-icon k-i-more-vertical"
|
|
1589
|
+
(click)="toggle($event, anchor, template)"
|
|
1590
|
+
[tabindex]="tabIndex"
|
|
1591
|
+
[attr.title]="chipMenuTitle">
|
|
1592
|
+
</span>
|
|
1593
|
+
<ng-template #template>
|
|
1594
|
+
<kendo-pivot-chipmenu-container
|
|
1595
|
+
(keydown.escape)="close()"
|
|
1596
|
+
(keydown.enter)="$event.stopImmediatePropagation()">
|
|
1597
|
+
<kendo-pivot-chipmenu-sort
|
|
1598
|
+
#sortItem
|
|
1599
|
+
[chip]="chip"
|
|
1600
|
+
[kendoPivotChipMenuItem]="sortItem"
|
|
1601
|
+
[service]="service">
|
|
1602
|
+
</kendo-pivot-chipmenu-sort>
|
|
1603
|
+
|
|
1604
|
+
<kendo-pivot-chipmenu-filter
|
|
1605
|
+
#filterItem
|
|
1606
|
+
[chip]="chip"
|
|
1607
|
+
[kendoPivotChipMenuItem]="filterItem"
|
|
1608
|
+
[service]="service">
|
|
1609
|
+
</kendo-pivot-chipmenu-filter>
|
|
1610
|
+
</kendo-pivot-chipmenu-container>
|
|
1611
|
+
</ng-template>
|
|
1612
|
+
`, 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"] }] });
|
|
1613
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ChipMenuComponent, decorators: [{
|
|
1614
|
+
type: Component,
|
|
1615
|
+
args: [{
|
|
1616
|
+
providers: [
|
|
1617
|
+
ChipMenuService,
|
|
1618
|
+
MenuTabbingService
|
|
1619
|
+
],
|
|
1620
|
+
selector: 'kendo-pivot-chip-menu',
|
|
1621
|
+
template: `
|
|
1622
|
+
<span #anchor
|
|
1623
|
+
class="k-icon k-i-more-vertical"
|
|
1624
|
+
(click)="toggle($event, anchor, template)"
|
|
1625
|
+
[tabindex]="tabIndex"
|
|
1626
|
+
[attr.title]="chipMenuTitle">
|
|
1627
|
+
</span>
|
|
1628
|
+
<ng-template #template>
|
|
1629
|
+
<kendo-pivot-chipmenu-container
|
|
1630
|
+
(keydown.escape)="close()"
|
|
1631
|
+
(keydown.enter)="$event.stopImmediatePropagation()">
|
|
1632
|
+
<kendo-pivot-chipmenu-sort
|
|
1633
|
+
#sortItem
|
|
1634
|
+
[chip]="chip"
|
|
1635
|
+
[kendoPivotChipMenuItem]="sortItem"
|
|
1636
|
+
[service]="service">
|
|
1637
|
+
</kendo-pivot-chipmenu-sort>
|
|
1638
|
+
|
|
1639
|
+
<kendo-pivot-chipmenu-filter
|
|
1640
|
+
#filterItem
|
|
1641
|
+
[chip]="chip"
|
|
1642
|
+
[kendoPivotChipMenuItem]="filterItem"
|
|
1643
|
+
[service]="service">
|
|
1644
|
+
</kendo-pivot-chipmenu-filter>
|
|
1645
|
+
</kendo-pivot-chipmenu-container>
|
|
1646
|
+
</ng-template>
|
|
1647
|
+
`
|
|
1648
|
+
}]
|
|
1649
|
+
}], ctorParameters: function () { return [{ type: SinglePopupService }, { type: PivotLocalizationService }, { type: ChipMenuService }]; }, propDecorators: { chip: [{
|
|
1650
|
+
type: Input
|
|
1651
|
+
}], tabIndex: [{
|
|
1652
|
+
type: Input
|
|
1653
|
+
}], anchor: [{
|
|
1654
|
+
type: ViewChild,
|
|
1655
|
+
args: ['anchor', { static: true }]
|
|
1656
|
+
}] } });
|
|
525
1657
|
|
|
526
1658
|
/**
|
|
527
1659
|
* @hidden
|
|
@@ -690,6 +1822,7 @@ class PivotGridConfiguratorComponent {
|
|
|
690
1822
|
this.cdr = cdr;
|
|
691
1823
|
this.hostClass = true;
|
|
692
1824
|
this.horizontal = false;
|
|
1825
|
+
this.sort = new Array();
|
|
693
1826
|
this.checked = [];
|
|
694
1827
|
this.subs = new Subscription();
|
|
695
1828
|
/**
|
|
@@ -852,10 +1985,11 @@ class PivotGridConfiguratorComponent {
|
|
|
852
1985
|
}
|
|
853
1986
|
;
|
|
854
1987
|
}
|
|
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: [
|
|
1988
|
+
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 });
|
|
1989
|
+
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
1990
|
ConfiguratorService,
|
|
858
|
-
DropCueService
|
|
1991
|
+
DropCueService,
|
|
1992
|
+
SinglePopupService
|
|
859
1993
|
], ngImport: i0, template: `
|
|
860
1994
|
<div
|
|
861
1995
|
class="k-pivotgrid-configurator-panel k-pivotgrid-configurator-push"
|
|
@@ -924,6 +2058,10 @@ PivotGridConfiguratorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
|
924
2058
|
[removable]="true"
|
|
925
2059
|
>
|
|
926
2060
|
{{ getName(item.name) }}
|
|
2061
|
+
|
|
2062
|
+
<kendo-pivot-chip-menu
|
|
2063
|
+
[chip]="item">
|
|
2064
|
+
</kendo-pivot-chip-menu>
|
|
927
2065
|
</kendo-chip>
|
|
928
2066
|
</kendo-chiplist>
|
|
929
2067
|
|
|
@@ -950,6 +2088,10 @@ PivotGridConfiguratorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
|
950
2088
|
[removable]="true"
|
|
951
2089
|
>
|
|
952
2090
|
{{ getName(item.name) }}
|
|
2091
|
+
|
|
2092
|
+
<kendo-pivot-chip-menu
|
|
2093
|
+
[chip]="item">
|
|
2094
|
+
</kendo-pivot-chip-menu>
|
|
953
2095
|
</kendo-chip>
|
|
954
2096
|
</kendo-chiplist>
|
|
955
2097
|
|
|
@@ -972,18 +2114,17 @@ PivotGridConfiguratorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
|
972
2114
|
kendoDropTarget
|
|
973
2115
|
axes="measureAxes"
|
|
974
2116
|
>
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
</kendo-chip>
|
|
2117
|
+
<kendo-chip *ngFor="let item of state.measureAxes"
|
|
2118
|
+
kendoChipDraggable
|
|
2119
|
+
kendoDraggable
|
|
2120
|
+
kendoDropTarget
|
|
2121
|
+
[item]="item"
|
|
2122
|
+
axes="measureAxes"
|
|
2123
|
+
rounded="full"
|
|
2124
|
+
[removable]="true"
|
|
2125
|
+
>
|
|
2126
|
+
{{ getName(item.name) }}
|
|
2127
|
+
</kendo-chip>
|
|
987
2128
|
</kendo-chiplist>
|
|
988
2129
|
|
|
989
2130
|
<ng-template #noMeasureAxes>
|
|
@@ -998,14 +2139,15 @@ PivotGridConfiguratorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
|
998
2139
|
<button kendoButton themeColor="primary" type="button" (click)="handleSubmit()">{{messageFor('configuratorApplyButtonText')}}</button>
|
|
999
2140
|
</div>
|
|
1000
2141
|
</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:
|
|
2142
|
+
`, 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
2143
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PivotGridConfiguratorComponent, decorators: [{
|
|
1003
2144
|
type: Component,
|
|
1004
2145
|
args: [{
|
|
1005
2146
|
selector: 'kendo-pivotgrid-configurator',
|
|
1006
2147
|
providers: [
|
|
1007
2148
|
ConfiguratorService,
|
|
1008
|
-
DropCueService
|
|
2149
|
+
DropCueService,
|
|
2150
|
+
SinglePopupService
|
|
1009
2151
|
],
|
|
1010
2152
|
template: `
|
|
1011
2153
|
<div
|
|
@@ -1075,6 +2217,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
1075
2217
|
[removable]="true"
|
|
1076
2218
|
>
|
|
1077
2219
|
{{ getName(item.name) }}
|
|
2220
|
+
|
|
2221
|
+
<kendo-pivot-chip-menu
|
|
2222
|
+
[chip]="item">
|
|
2223
|
+
</kendo-pivot-chip-menu>
|
|
1078
2224
|
</kendo-chip>
|
|
1079
2225
|
</kendo-chiplist>
|
|
1080
2226
|
|
|
@@ -1101,6 +2247,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
1101
2247
|
[removable]="true"
|
|
1102
2248
|
>
|
|
1103
2249
|
{{ getName(item.name) }}
|
|
2250
|
+
|
|
2251
|
+
<kendo-pivot-chip-menu
|
|
2252
|
+
[chip]="item">
|
|
2253
|
+
</kendo-pivot-chip-menu>
|
|
1104
2254
|
</kendo-chip>
|
|
1105
2255
|
</kendo-chiplist>
|
|
1106
2256
|
|
|
@@ -1123,18 +2273,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
1123
2273
|
kendoDropTarget
|
|
1124
2274
|
axes="measureAxes"
|
|
1125
2275
|
>
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
</kendo-chip>
|
|
2276
|
+
<kendo-chip *ngFor="let item of state.measureAxes"
|
|
2277
|
+
kendoChipDraggable
|
|
2278
|
+
kendoDraggable
|
|
2279
|
+
kendoDropTarget
|
|
2280
|
+
[item]="item"
|
|
2281
|
+
axes="measureAxes"
|
|
2282
|
+
rounded="full"
|
|
2283
|
+
[removable]="true"
|
|
2284
|
+
>
|
|
2285
|
+
{{ getName(item.name) }}
|
|
2286
|
+
</kendo-chip>
|
|
1138
2287
|
</kendo-chiplist>
|
|
1139
2288
|
|
|
1140
2289
|
<ng-template #noMeasureAxes>
|
|
@@ -1151,11 +2300,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
1151
2300
|
</div>
|
|
1152
2301
|
`
|
|
1153
2302
|
}]
|
|
1154
|
-
}], ctorParameters: function () { return [{ type: PivotGridDataService }, { type:
|
|
2303
|
+
}], ctorParameters: function () { return [{ type: PivotGridDataService }, { type: i1.LocalizationService }, { type: ConfiguratorService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { hostClass: [{
|
|
1155
2304
|
type: HostBinding,
|
|
1156
2305
|
args: ['class.k-pivotgrid-configurator']
|
|
1157
2306
|
}], horizontal: [{
|
|
1158
2307
|
type: Input
|
|
2308
|
+
}], sort: [{
|
|
2309
|
+
type: Input
|
|
2310
|
+
}], filter: [{
|
|
2311
|
+
type: Input
|
|
1159
2312
|
}] } });
|
|
1160
2313
|
|
|
1161
2314
|
/**
|
|
@@ -1164,7 +2317,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
1164
2317
|
class PivotGridMessages extends ComponentMessages {
|
|
1165
2318
|
}
|
|
1166
2319
|
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 });
|
|
2320
|
+
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
2321
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PivotGridMessages, decorators: [{
|
|
1169
2322
|
type: Directive
|
|
1170
2323
|
}], propDecorators: { fieldMenuFilterItemLabel: [{
|
|
@@ -1227,6 +2380,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
1227
2380
|
type: Input
|
|
1228
2381
|
}], configuratorEmptyMeasuresText: [{
|
|
1229
2382
|
type: Input
|
|
2383
|
+
}], chipMenuIconTitle: [{
|
|
2384
|
+
type: Input
|
|
1230
2385
|
}] } });
|
|
1231
2386
|
|
|
1232
2387
|
/**
|
|
@@ -1238,7 +2393,7 @@ class LocalizedMessagesDirective extends PivotGridMessages {
|
|
|
1238
2393
|
this.service = service;
|
|
1239
2394
|
}
|
|
1240
2395
|
}
|
|
1241
|
-
LocalizedMessagesDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: LocalizedMessagesDirective, deps: [{ token:
|
|
2396
|
+
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
2397
|
LocalizedMessagesDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: LocalizedMessagesDirective, selector: "[kendoPivotGridLocalizedMessages]", providers: [
|
|
1243
2398
|
{
|
|
1244
2399
|
provide: PivotGridMessages,
|
|
@@ -1256,7 +2411,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
1256
2411
|
],
|
|
1257
2412
|
selector: '[kendoPivotGridLocalizedMessages]'
|
|
1258
2413
|
}]
|
|
1259
|
-
}], ctorParameters: function () { return [{ type:
|
|
2414
|
+
}], ctorParameters: function () { return [{ type: i1.LocalizationService }]; } });
|
|
1260
2415
|
|
|
1261
2416
|
const DEFAULT_LOADER_SETTINGS = {
|
|
1262
2417
|
type: 'converging-spinner',
|
|
@@ -1271,10 +2426,12 @@ const DEFAULT_CONFIGURATOR_SETTINGS = {
|
|
|
1271
2426
|
* Represents the Kendo UI PivotGrid component for Angular.
|
|
1272
2427
|
*/
|
|
1273
2428
|
class PivotGridComponent {
|
|
1274
|
-
constructor(hostEl, zone, dataService, localization, _scrollbarWidthService) {
|
|
2429
|
+
constructor(hostEl, zone, dataService, localization, renderer, _scrollbarWidthService) {
|
|
2430
|
+
this.hostEl = hostEl;
|
|
1275
2431
|
this.zone = zone;
|
|
1276
2432
|
this.dataService = dataService;
|
|
1277
2433
|
this.localization = localization;
|
|
2434
|
+
this.renderer = renderer;
|
|
1278
2435
|
this.hostClass = true;
|
|
1279
2436
|
this.ariaRole = 'grid';
|
|
1280
2437
|
/**
|
|
@@ -1283,6 +2440,12 @@ class PivotGridComponent {
|
|
|
1283
2440
|
* @default 200
|
|
1284
2441
|
*/
|
|
1285
2442
|
this.columnHeadersWidth = 200;
|
|
2443
|
+
/**
|
|
2444
|
+
* If set to true, the user can use dedicated shortcuts to interact with the PivotGrid. By default, navigation is disabled.
|
|
2445
|
+
*
|
|
2446
|
+
* @default false
|
|
2447
|
+
*/
|
|
2448
|
+
this.navigable = false;
|
|
1286
2449
|
this.resizeObservers = [];
|
|
1287
2450
|
this._loaderSettings = DEFAULT_LOADER_SETTINGS;
|
|
1288
2451
|
this.subs = new Subscription();
|
|
@@ -1358,6 +2521,12 @@ class PivotGridComponent {
|
|
|
1358
2521
|
get configuratorSettings() {
|
|
1359
2522
|
return this.configurator && Object.assign({}, DEFAULT_CONFIGURATOR_SETTINGS, this.configurator);
|
|
1360
2523
|
}
|
|
2524
|
+
/**
|
|
2525
|
+
* Holds the displayed aggregated PivotGrid values.
|
|
2526
|
+
*/
|
|
2527
|
+
get aggregateData() {
|
|
2528
|
+
return cloneArray(this.dataService.aggregateData);
|
|
2529
|
+
}
|
|
1361
2530
|
ngAfterViewInit() {
|
|
1362
2531
|
if (isDocumentAvailable()) {
|
|
1363
2532
|
this.zone.runOutsideAngular(() => {
|
|
@@ -1370,15 +2539,29 @@ class PivotGridComponent {
|
|
|
1370
2539
|
this.resizeObservers = [headerColsResizeObserver, headerRowsResizeObserver];
|
|
1371
2540
|
this.subs.add(fromEvent(rowHeadersTable, 'wheel')
|
|
1372
2541
|
.pipe(merge(fromEvent(colHeadersTable, 'wheel'), fromEvent(this.valuesTable.nativeElement, 'scroll'))).subscribe((ev) => this.handleScroll(ev)));
|
|
2542
|
+
if (this.navigable) {
|
|
2543
|
+
this.initNavigation();
|
|
2544
|
+
}
|
|
1373
2545
|
});
|
|
1374
2546
|
}
|
|
1375
2547
|
}
|
|
1376
2548
|
ngAfterContentInit() {
|
|
1377
2549
|
this.subs.add(this.dataService.loading.subscribe(state => this.loading = state));
|
|
1378
2550
|
}
|
|
2551
|
+
ngOnChanges(changes) {
|
|
2552
|
+
if (isChanged('navigable', changes)) {
|
|
2553
|
+
if (this.navigable) {
|
|
2554
|
+
this.initNavigation();
|
|
2555
|
+
}
|
|
2556
|
+
else {
|
|
2557
|
+
this.stopNavigation();
|
|
2558
|
+
}
|
|
2559
|
+
}
|
|
2560
|
+
}
|
|
1379
2561
|
ngOnDestroy() {
|
|
1380
2562
|
this.resizeObservers.forEach(o => o.disconnect());
|
|
1381
2563
|
this.subs.unsubscribe();
|
|
2564
|
+
this.stopNavigation();
|
|
1382
2565
|
}
|
|
1383
2566
|
/**
|
|
1384
2567
|
* @hidden
|
|
@@ -1386,16 +2569,38 @@ class PivotGridComponent {
|
|
|
1386
2569
|
messageFor(localizationToken) {
|
|
1387
2570
|
return this.localization.get(localizationToken);
|
|
1388
2571
|
}
|
|
2572
|
+
initNavigation() {
|
|
2573
|
+
this.stopNavigation();
|
|
2574
|
+
this.navigation = new PivotGridNavigation({ tabIndex: 0 });
|
|
2575
|
+
this.navigation.start(this.hostEl.nativeElement);
|
|
2576
|
+
const firstCell = this.navigation.first;
|
|
2577
|
+
if (firstCell) {
|
|
2578
|
+
firstCell.setAttribute('tabindex', '0');
|
|
2579
|
+
}
|
|
2580
|
+
this.subs.add(this.dataService.directive.expandChange.pipe(merge(this.dataService.directive.configurationChange)).subscribe(() => this.zone.runOutsideAngular(() => {
|
|
2581
|
+
setTimeout(() => this.navigation.update());
|
|
2582
|
+
})));
|
|
2583
|
+
}
|
|
2584
|
+
stopNavigation() {
|
|
2585
|
+
if (this.navigation) {
|
|
2586
|
+
const lastFocusedEl = this.navigation.elements.find(el => el.hasAttribute('tabindex'));
|
|
2587
|
+
if (lastFocusedEl) {
|
|
2588
|
+
this.renderer.removeAttribute(lastFocusedEl, 'tabindex');
|
|
2589
|
+
}
|
|
2590
|
+
this.navigation.stop();
|
|
2591
|
+
}
|
|
2592
|
+
}
|
|
1389
2593
|
}
|
|
1390
|
-
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:
|
|
1391
|
-
PivotGridComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: PivotGridComponent, selector: "kendo-pivotgrid", inputs: { loaderSettings: "loaderSettings", configurator: "configurator", columnHeadersWidth: "columnHeadersWidth" }, 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: [
|
|
2594
|
+
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 });
|
|
2595
|
+
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: [
|
|
1392
2596
|
PivotGridDataService,
|
|
1393
2597
|
LocalizationService,
|
|
2598
|
+
PivotLocalizationService,
|
|
1394
2599
|
{
|
|
1395
2600
|
provide: L10N_PREFIX,
|
|
1396
2601
|
useValue: 'kendo.pivotgrid'
|
|
1397
2602
|
}
|
|
1398
|
-
], viewQueries: [{ propertyName: "colHeadersTable", first: true, predicate: ["colHeadersTable"], descendants: true, read: ElementRef }, { propertyName: "rowHeadersTable", first: true, predicate: ["rowHeadersTable"], descendants: true, read: ElementRef }, { propertyName: "valuesTable", first: true, predicate: ["valuesTable"], descendants: true, read: ElementRef }, { propertyName: "table", first: true, predicate: ["table"], descendants: true, read: ElementRef }], ngImport: i0, template: `
|
|
2603
|
+
], viewQueries: [{ propertyName: "colHeadersTable", first: true, predicate: ["colHeadersTable"], descendants: true, read: ElementRef }, { propertyName: "rowHeadersTable", first: true, predicate: ["rowHeadersTable"], descendants: true, read: ElementRef }, { propertyName: "valuesTable", first: true, predicate: ["valuesTable"], descendants: true, read: ElementRef }, { propertyName: "table", first: true, predicate: ["table"], descendants: true, read: ElementRef }], usesOnChanges: true, ngImport: i0, template: `
|
|
1399
2604
|
<ng-container kendoPivotGridLocalizedMessages
|
|
1400
2605
|
i18n-loading="kendo.pivotgrid.loading|The loading text"
|
|
1401
2606
|
loading="Loading"
|
|
@@ -1485,10 +2690,15 @@ PivotGridComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ver
|
|
|
1485
2690
|
configuratorEmptyColumnsText="Select some fields to begin setup"
|
|
1486
2691
|
|
|
1487
2692
|
i18n-configuratorEmptyMeasuresText="kendo.pivotgrid.configuratorEmptyMeasuresText|The text content of the PivotGrid configurator empty measures container"
|
|
1488
|
-
configuratorEmptyMeasuresText="Select some fields to begin setup"
|
|
2693
|
+
configuratorEmptyMeasuresText="Select some fields to begin setup"
|
|
2694
|
+
|
|
2695
|
+
i18n-chipMenuIconTitle="kendo.grid.chipMenuIconTitle|The title of the field menu icon"
|
|
2696
|
+
chipMenuIconTitle="{{ '{fieldName} Field Menu' }}"></ng-container>
|
|
1489
2697
|
|
|
1490
2698
|
<div #table class="k-pivotgrid">
|
|
1491
|
-
<span class="k-pivotgrid-empty-cell"
|
|
2699
|
+
<span class="k-pivotgrid-empty-cell">
|
|
2700
|
+
<span class="k-sr-only">{{messageFor('emptyCellLabel')}}</span>
|
|
2701
|
+
</span>
|
|
1492
2702
|
<kendo-pivotgrid-table
|
|
1493
2703
|
#colHeadersTable
|
|
1494
2704
|
[colWidth]="columnHeadersWidth"
|
|
@@ -1523,10 +2733,10 @@ PivotGridComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ver
|
|
|
1523
2733
|
<div *ngIf="configurator"
|
|
1524
2734
|
class="k-pivotgrid-configurator-button"
|
|
1525
2735
|
(click)="showConfigurator = !showConfigurator">
|
|
1526
|
-
<span>{{
|
|
2736
|
+
<span>{{messageFor('configuratorButtonText')}}<span class="k-icon k-i-gear k-color-inherit"></span>
|
|
1527
2737
|
</span>
|
|
1528
2738
|
</div>
|
|
1529
|
-
`, 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:
|
|
2739
|
+
`, 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", "sort", "filter"] }], directives: [{ type: LocalizedMessagesDirective, selector: "[kendoPivotGridLocalizedMessages]" }, { type: i7.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
1530
2740
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PivotGridComponent, decorators: [{
|
|
1531
2741
|
type: Component,
|
|
1532
2742
|
args: [{
|
|
@@ -1534,6 +2744,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
1534
2744
|
providers: [
|
|
1535
2745
|
PivotGridDataService,
|
|
1536
2746
|
LocalizationService,
|
|
2747
|
+
PivotLocalizationService,
|
|
1537
2748
|
{
|
|
1538
2749
|
provide: L10N_PREFIX,
|
|
1539
2750
|
useValue: 'kendo.pivotgrid'
|
|
@@ -1629,10 +2840,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
1629
2840
|
configuratorEmptyColumnsText="Select some fields to begin setup"
|
|
1630
2841
|
|
|
1631
2842
|
i18n-configuratorEmptyMeasuresText="kendo.pivotgrid.configuratorEmptyMeasuresText|The text content of the PivotGrid configurator empty measures container"
|
|
1632
|
-
configuratorEmptyMeasuresText="Select some fields to begin setup"
|
|
2843
|
+
configuratorEmptyMeasuresText="Select some fields to begin setup"
|
|
2844
|
+
|
|
2845
|
+
i18n-chipMenuIconTitle="kendo.grid.chipMenuIconTitle|The title of the field menu icon"
|
|
2846
|
+
chipMenuIconTitle="{{ '{fieldName} Field Menu' }}"></ng-container>
|
|
1633
2847
|
|
|
1634
2848
|
<div #table class="k-pivotgrid">
|
|
1635
|
-
<span class="k-pivotgrid-empty-cell"
|
|
2849
|
+
<span class="k-pivotgrid-empty-cell">
|
|
2850
|
+
<span class="k-sr-only">{{messageFor('emptyCellLabel')}}</span>
|
|
2851
|
+
</span>
|
|
1636
2852
|
<kendo-pivotgrid-table
|
|
1637
2853
|
#colHeadersTable
|
|
1638
2854
|
[colWidth]="columnHeadersWidth"
|
|
@@ -1667,7 +2883,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
1667
2883
|
<div *ngIf="configurator"
|
|
1668
2884
|
class="k-pivotgrid-configurator-button"
|
|
1669
2885
|
(click)="showConfigurator = !showConfigurator">
|
|
1670
|
-
<span>{{
|
|
2886
|
+
<span>{{messageFor('configuratorButtonText')}}<span class="k-icon k-i-gear k-color-inherit"></span>
|
|
1671
2887
|
</span>
|
|
1672
2888
|
</div>
|
|
1673
2889
|
`,
|
|
@@ -1681,7 +2897,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
1681
2897
|
}
|
|
1682
2898
|
`]
|
|
1683
2899
|
}]
|
|
1684
|
-
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.NgZone }, { type: PivotGridDataService }, { type:
|
|
2900
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.NgZone }, { type: PivotGridDataService }, { type: i1.LocalizationService }, { type: i0.Renderer2 }, { type: i3.ScrollbarWidthService }]; }, propDecorators: { hostClass: [{
|
|
1685
2901
|
type: HostBinding,
|
|
1686
2902
|
args: ['class.k-d-flex']
|
|
1687
2903
|
}, {
|
|
@@ -1723,16 +2939,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
1723
2939
|
type: Input
|
|
1724
2940
|
}], columnHeadersWidth: [{
|
|
1725
2941
|
type: Input
|
|
2942
|
+
}], navigable: [{
|
|
2943
|
+
type: Input
|
|
1726
2944
|
}] } });
|
|
1727
2945
|
|
|
1728
2946
|
/**
|
|
1729
2947
|
* @hidden
|
|
1730
2948
|
*/
|
|
1731
2949
|
class PivotGridState {
|
|
1732
|
-
constructor(columnAxes, rowAxes, measureAxes) {
|
|
2950
|
+
constructor(columnAxes, rowAxes, measureAxes, sort, filter) {
|
|
1733
2951
|
this.columnAxes = columnAxes;
|
|
1734
2952
|
this.rowAxes = rowAxes;
|
|
1735
2953
|
this.measureAxes = measureAxes;
|
|
2954
|
+
this.sort = sort;
|
|
2955
|
+
this.filter = filter;
|
|
1736
2956
|
}
|
|
1737
2957
|
}
|
|
1738
2958
|
|
|
@@ -1784,6 +3004,10 @@ class PivotBaseBindingDirective {
|
|
|
1784
3004
|
* Represents the measure axes configuration of the PivotGrid.
|
|
1785
3005
|
*/
|
|
1786
3006
|
this.measureAxes = [];
|
|
3007
|
+
/**
|
|
3008
|
+
* Represents the initial sorted state of the PivotGrid.
|
|
3009
|
+
*/
|
|
3010
|
+
this.sort = [];
|
|
1787
3011
|
/**
|
|
1788
3012
|
* Fires each time a row or column header gets expanded or collapsed by the end user. The event is preventable.
|
|
1789
3013
|
* If you prevent the event, the PivotGrid will not be rerendered with the new state, resulting from the end user interaction.
|
|
@@ -1805,7 +3029,7 @@ class PivotBaseBindingDirective {
|
|
|
1805
3029
|
* @hidden
|
|
1806
3030
|
*/
|
|
1807
3031
|
get state() {
|
|
1808
|
-
return new PivotGridState(this.columnAxes, this.rowAxes, this.measureAxes);
|
|
3032
|
+
return new PivotGridState(this.columnAxes, this.rowAxes, this.measureAxes, this.sort, this.filter);
|
|
1809
3033
|
}
|
|
1810
3034
|
ngOnInit() {
|
|
1811
3035
|
this.loadData(this.state);
|
|
@@ -1831,16 +3055,16 @@ class PivotBaseBindingDirective {
|
|
|
1831
3055
|
this.dataService.configuredFields.next({
|
|
1832
3056
|
columnAxes: state.columnAxes,
|
|
1833
3057
|
rowAxes: state.rowAxes,
|
|
1834
|
-
measureAxes: state.measureAxes
|
|
3058
|
+
measureAxes: state.measureAxes,
|
|
3059
|
+
sort: state.sort,
|
|
3060
|
+
filter: state.filter
|
|
1835
3061
|
});
|
|
1836
3062
|
this.loadData(state);
|
|
1837
3063
|
});
|
|
1838
3064
|
}));
|
|
1839
3065
|
this.subs.add(this.dataService.valuesRows.subscribe((data) => {
|
|
1840
3066
|
this.zone.run(() => {
|
|
1841
|
-
|
|
1842
|
-
this.dataLoaded.emit(data);
|
|
1843
|
-
}
|
|
3067
|
+
this.dataService.aggregateData = data;
|
|
1844
3068
|
});
|
|
1845
3069
|
}));
|
|
1846
3070
|
this.dataService.directive = this;
|
|
@@ -1859,7 +3083,9 @@ class PivotBaseBindingDirective {
|
|
|
1859
3083
|
this.dataService.configuredFields.next({
|
|
1860
3084
|
columnAxes: this.columnAxes,
|
|
1861
3085
|
rowAxes: this.rowAxes,
|
|
1862
|
-
measureAxes: this.measureAxes
|
|
3086
|
+
measureAxes: this.measureAxes,
|
|
3087
|
+
sort: this.sort,
|
|
3088
|
+
filter: this.filter
|
|
1863
3089
|
});
|
|
1864
3090
|
}
|
|
1865
3091
|
updateHeaders(axes, tree, path) {
|
|
@@ -1886,7 +3112,7 @@ class PivotBaseBindingDirective {
|
|
|
1886
3112
|
;
|
|
1887
3113
|
}
|
|
1888
3114
|
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 });
|
|
1889
|
-
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 });
|
|
3115
|
+
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 });
|
|
1890
3116
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PivotBaseBindingDirective, decorators: [{
|
|
1891
3117
|
type: Directive,
|
|
1892
3118
|
args: [{
|
|
@@ -1898,6 +3124,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
1898
3124
|
type: Input
|
|
1899
3125
|
}], measureAxes: [{
|
|
1900
3126
|
type: Input
|
|
3127
|
+
}], sort: [{
|
|
3128
|
+
type: Input
|
|
3129
|
+
}], filter: [{
|
|
3130
|
+
type: Input
|
|
1901
3131
|
}], expandChange: [{
|
|
1902
3132
|
type: Output
|
|
1903
3133
|
}], configurationChange: [{
|
|
@@ -1935,13 +3165,13 @@ class PivotLocalBindingDirective extends PivotBaseBindingDirective {
|
|
|
1935
3165
|
this.updateConfiguratorFields();
|
|
1936
3166
|
}
|
|
1937
3167
|
loadData(state) {
|
|
1938
|
-
const { columnAxes, rowAxes, measureAxes } = state;
|
|
3168
|
+
const { columnAxes, rowAxes, measureAxes, sort, filter } = state;
|
|
1939
3169
|
const rootColumnAxes = this.getRootAxes(columnAxes);
|
|
1940
3170
|
const rootRowAxes = this.getRootAxes(rowAxes);
|
|
1941
3171
|
const columnSettings = rootColumnAxes.split(stringSeparator).map(this.createAxisSettings);
|
|
1942
3172
|
const rowSettings = rootRowAxes.split(stringSeparator).map(this.createAxisSettings);
|
|
1943
3173
|
const measuresSettings = measureAxes.map(m => this.measures.find(meas => String(meas.name) === String(m.name))).filter(Boolean);
|
|
1944
|
-
const dataTree = createDataTree(this.data, rowSettings, columnSettings, measuresSettings, bindingFields);
|
|
3174
|
+
const dataTree = createDataTree(this.data, rowSettings, columnSettings, measuresSettings, bindingFields, filter);
|
|
1945
3175
|
this.dataState = createLocalDataState({
|
|
1946
3176
|
dataTree,
|
|
1947
3177
|
rowSettings,
|
|
@@ -1949,7 +3179,7 @@ class PivotLocalBindingDirective extends PivotBaseBindingDirective {
|
|
|
1949
3179
|
rowAxes: rowAxes,
|
|
1950
3180
|
columnAxes: columnAxes,
|
|
1951
3181
|
measures: measuresSettings,
|
|
1952
|
-
sort:
|
|
3182
|
+
sort: sort,
|
|
1953
3183
|
fields: bindingFields
|
|
1954
3184
|
});
|
|
1955
3185
|
this.updateDataServiceFields();
|
|
@@ -1990,18 +3220,20 @@ class PivotOLAPBindingDirective extends PivotBaseBindingDirective {
|
|
|
1990
3220
|
}
|
|
1991
3221
|
}
|
|
1992
3222
|
loadData(state) {
|
|
1993
|
-
const { columnAxes, rowAxes, measureAxes } = state;
|
|
3223
|
+
const { columnAxes, rowAxes, measureAxes, sort, filter } = state;
|
|
1994
3224
|
this.dataService.loading.next(true);
|
|
1995
3225
|
const options = {
|
|
1996
3226
|
connection: {
|
|
1997
3227
|
catalog: this.catalog,
|
|
1998
3228
|
cube: this.cube
|
|
1999
3229
|
},
|
|
2000
|
-
columnAxes
|
|
2001
|
-
rowAxes
|
|
2002
|
-
measureAxes
|
|
3230
|
+
columnAxes,
|
|
3231
|
+
rowAxes,
|
|
3232
|
+
measureAxes,
|
|
3233
|
+
sort,
|
|
3234
|
+
filter
|
|
2003
3235
|
};
|
|
2004
|
-
fetchData({ url: this.url },
|
|
3236
|
+
fetchData({ url: this.url }, clone(options))
|
|
2005
3237
|
.then(createDataState)
|
|
2006
3238
|
.then(newDataState => {
|
|
2007
3239
|
this.dataState = newDataState;
|
|
@@ -2160,7 +3392,7 @@ class CustomMessagesComponent extends PivotGridMessages {
|
|
|
2160
3392
|
return true;
|
|
2161
3393
|
}
|
|
2162
3394
|
}
|
|
2163
|
-
CustomMessagesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: CustomMessagesComponent, deps: [{ token:
|
|
3395
|
+
CustomMessagesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: CustomMessagesComponent, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
2164
3396
|
CustomMessagesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: CustomMessagesComponent, selector: "kendo-pivotgrid-messages", providers: [
|
|
2165
3397
|
{
|
|
2166
3398
|
provide: PivotGridMessages,
|
|
@@ -2179,16 +3411,112 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
2179
3411
|
selector: 'kendo-pivotgrid-messages',
|
|
2180
3412
|
template: ``
|
|
2181
3413
|
}]
|
|
2182
|
-
}], ctorParameters: function () { return [{ type:
|
|
3414
|
+
}], ctorParameters: function () { return [{ type: i1.LocalizationService }]; } });
|
|
2183
3415
|
|
|
2184
|
-
const
|
|
3416
|
+
const MODULES = [
|
|
2185
3417
|
CommonModule,
|
|
3418
|
+
DropDownsModule,
|
|
3419
|
+
InputsModule,
|
|
3420
|
+
ButtonsModule
|
|
3421
|
+
];
|
|
3422
|
+
/**
|
|
3423
|
+
* @hidden
|
|
3424
|
+
*/
|
|
3425
|
+
class SharedModule {
|
|
3426
|
+
}
|
|
3427
|
+
SharedModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SharedModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
3428
|
+
SharedModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SharedModule, imports: [CommonModule,
|
|
3429
|
+
DropDownsModule,
|
|
3430
|
+
InputsModule,
|
|
3431
|
+
ButtonsModule], exports: [CommonModule,
|
|
3432
|
+
DropDownsModule,
|
|
3433
|
+
InputsModule,
|
|
3434
|
+
ButtonsModule] });
|
|
3435
|
+
SharedModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SharedModule, imports: [[MODULES], CommonModule,
|
|
3436
|
+
DropDownsModule,
|
|
3437
|
+
InputsModule,
|
|
3438
|
+
ButtonsModule] });
|
|
3439
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SharedModule, decorators: [{
|
|
3440
|
+
type: NgModule,
|
|
3441
|
+
args: [{
|
|
3442
|
+
imports: [MODULES],
|
|
3443
|
+
exports: [MODULES]
|
|
3444
|
+
}]
|
|
3445
|
+
}] });
|
|
3446
|
+
|
|
3447
|
+
const COMPONENTS = [
|
|
3448
|
+
ChipMenuItemComponent,
|
|
3449
|
+
ChipMenuSortComponent,
|
|
3450
|
+
ChipMenuComponent,
|
|
3451
|
+
ChipMenuFilterComponent,
|
|
3452
|
+
ChipMenuItemContentTemplateDirective,
|
|
3453
|
+
FilterMenuContainerComponent,
|
|
3454
|
+
StringFilterMenuComponent,
|
|
3455
|
+
FilterMenuDropDownListDirective,
|
|
3456
|
+
ChipMenuContainerComponent,
|
|
3457
|
+
ChipMenuItemDirective
|
|
3458
|
+
];
|
|
3459
|
+
/**
|
|
3460
|
+
* @hidden
|
|
3461
|
+
*/
|
|
3462
|
+
class ChipMenuModule {
|
|
3463
|
+
static exports() {
|
|
3464
|
+
return [
|
|
3465
|
+
ChipMenuItemComponent,
|
|
3466
|
+
ChipMenuSortComponent,
|
|
3467
|
+
ChipMenuContainerComponent,
|
|
3468
|
+
ChipMenuItemDirective,
|
|
3469
|
+
ChipMenuComponent
|
|
3470
|
+
];
|
|
3471
|
+
}
|
|
3472
|
+
}
|
|
3473
|
+
ChipMenuModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ChipMenuModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
3474
|
+
ChipMenuModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ChipMenuModule, declarations: [ChipMenuItemComponent,
|
|
3475
|
+
ChipMenuSortComponent,
|
|
3476
|
+
ChipMenuComponent,
|
|
3477
|
+
ChipMenuFilterComponent,
|
|
3478
|
+
ChipMenuItemContentTemplateDirective,
|
|
3479
|
+
FilterMenuContainerComponent,
|
|
3480
|
+
StringFilterMenuComponent,
|
|
3481
|
+
FilterMenuDropDownListDirective,
|
|
3482
|
+
ChipMenuContainerComponent,
|
|
3483
|
+
ChipMenuItemDirective], imports: [SharedModule,
|
|
3484
|
+
ReactiveFormsModule,
|
|
3485
|
+
FormsModule], exports: [ChipMenuItemComponent,
|
|
3486
|
+
ChipMenuSortComponent,
|
|
3487
|
+
ChipMenuComponent,
|
|
3488
|
+
ChipMenuFilterComponent,
|
|
3489
|
+
ChipMenuItemContentTemplateDirective,
|
|
3490
|
+
FilterMenuContainerComponent,
|
|
3491
|
+
StringFilterMenuComponent,
|
|
3492
|
+
FilterMenuDropDownListDirective,
|
|
3493
|
+
ChipMenuContainerComponent,
|
|
3494
|
+
ChipMenuItemDirective] });
|
|
3495
|
+
ChipMenuModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ChipMenuModule, imports: [[
|
|
3496
|
+
SharedModule,
|
|
3497
|
+
ReactiveFormsModule,
|
|
3498
|
+
FormsModule
|
|
3499
|
+
]] });
|
|
3500
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ChipMenuModule, decorators: [{
|
|
3501
|
+
type: NgModule,
|
|
3502
|
+
args: [{
|
|
3503
|
+
declarations: [COMPONENTS],
|
|
3504
|
+
imports: [
|
|
3505
|
+
SharedModule,
|
|
3506
|
+
ReactiveFormsModule,
|
|
3507
|
+
FormsModule
|
|
3508
|
+
],
|
|
3509
|
+
exports: [COMPONENTS]
|
|
3510
|
+
}]
|
|
3511
|
+
}] });
|
|
3512
|
+
|
|
3513
|
+
const IMPORTED_MODULES = [
|
|
2186
3514
|
EventsModule,
|
|
2187
3515
|
IndicatorsModule,
|
|
2188
|
-
ButtonsModule,
|
|
2189
3516
|
TreeViewModule,
|
|
2190
|
-
|
|
2191
|
-
|
|
3517
|
+
DraggableModule,
|
|
3518
|
+
ChipMenuModule,
|
|
3519
|
+
SharedModule
|
|
2192
3520
|
];
|
|
2193
3521
|
const DECLARATIONS = [
|
|
2194
3522
|
PivotGridComponent,
|
|
@@ -2225,13 +3553,12 @@ PivotGridModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version
|
|
|
2225
3553
|
DraggableChipDirective,
|
|
2226
3554
|
DropTargetDirective,
|
|
2227
3555
|
LocalizedMessagesDirective,
|
|
2228
|
-
CustomMessagesComponent], imports: [
|
|
2229
|
-
EventsModule,
|
|
3556
|
+
CustomMessagesComponent], imports: [EventsModule,
|
|
2230
3557
|
IndicatorsModule,
|
|
2231
|
-
ButtonsModule,
|
|
2232
3558
|
TreeViewModule,
|
|
2233
|
-
|
|
2234
|
-
|
|
3559
|
+
DraggableModule,
|
|
3560
|
+
ChipMenuModule,
|
|
3561
|
+
SharedModule], exports: [PivotGridComponent,
|
|
2235
3562
|
PivotGridTableComponent,
|
|
2236
3563
|
PivotGridCellDirective,
|
|
2237
3564
|
PivotLocalBindingDirective,
|