@progress/kendo-angular-pivotgrid 0.2.0-dev.202208181233 → 0.2.0-dev.202208181339
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/configurator.component.d.ts +96 -0
- package/configurator/configurator.service.d.ts +17 -0
- package/configurator/draggable.directive.d.ts +32 -0
- package/configurator/drop-cue.service.d.ts +22 -0
- package/configurator/drop-target.directive.d.ts +32 -0
- package/data-binding/base-binding-directive.d.ts +27 -5
- package/data-binding/local-binding.directive.d.ts +8 -1
- package/data-binding/olap-binding.directive.d.ts +13 -1
- package/data-binding/pivotgrid-data.service.d.ts +8 -3
- package/esm2015/configurator/configurator.component.js +512 -0
- package/esm2015/configurator/configurator.service.js +38 -0
- package/esm2015/configurator/draggable.directive.js +94 -0
- package/esm2015/configurator/drop-cue.service.js +64 -0
- package/esm2015/configurator/drop-target.directive.js +82 -0
- package/esm2015/data-binding/base-binding-directive.js +68 -9
- package/esm2015/data-binding/local-binding.directive.js +20 -8
- package/esm2015/data-binding/olap-binding.directive.js +131 -6
- package/esm2015/data-binding/pivotgrid-data.service.js +9 -1
- package/esm2015/localization/custom-messages.component.js +41 -0
- package/esm2015/localization/localized-messages.directive.js +36 -0
- package/esm2015/localization/messages.js +71 -0
- package/esm2015/main.js +8 -0
- package/esm2015/models/configuration-change-event.js +18 -0
- package/esm2015/models/configurator-settings.js +14 -0
- package/esm2015/models/expanded-change-event.js +18 -0
- package/esm2015/package-metadata.js +1 -1
- package/esm2015/pivotgrid.component.js +337 -63
- package/esm2015/pivotgrid.module.js +43 -16
- package/esm2015/util.js +59 -0
- package/fesm2015/kendo-angular-pivotgrid.js +1567 -106
- package/localization/custom-messages.component.d.ts +18 -0
- package/localization/localized-messages.directive.d.ts +16 -0
- package/localization/messages.d.ts +160 -0
- package/main.d.ts +6 -0
- package/models/configuration-change-event.d.ts +36 -0
- package/models/configurator-settings.d.ts +32 -0
- package/models/expanded-change-event.d.ts +27 -0
- package/package.json +7 -1
- package/pivotgrid.component.d.ts +27 -3
- package/pivotgrid.module.d.ts +15 -7
- package/rendering/pivotgrid-table.component.d.ts +2 -2
- package/util.d.ts +23 -0
|
@@ -3,19 +3,27 @@
|
|
|
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, ElementRef, ViewChild,
|
|
6
|
+
import { EventEmitter, Injectable, Output, Component, HostBinding, Input, Directive, Optional, forwardRef, ElementRef, ViewChild, NgModule } from '@angular/core';
|
|
7
7
|
import { validatePackage } from '@progress/kendo-licensing';
|
|
8
|
-
import * as
|
|
9
|
-
import { isDocumentAvailable, anyChanged, EventsModule } from '@progress/kendo-angular-common';
|
|
10
|
-
import { toTree, toRows, toColumns, toData, HEADERS_ACTION, headersReducer, createDataTree, createLocalDataState, rootFields, fetchData, createDataState } from '@progress/kendo-pivotgrid-common';
|
|
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';
|
|
11
11
|
export { averageAggregate, maxAggregate, minAggregate, sumAggregate } from '@progress/kendo-pivotgrid-common';
|
|
12
|
-
import { BehaviorSubject, Subscription, fromEvent } from 'rxjs';
|
|
13
|
-
import { merge } from 'rxjs/operators';
|
|
14
|
-
import * as i2 from '@angular
|
|
12
|
+
import { BehaviorSubject, Subscription, from, of, fromEvent } from 'rxjs';
|
|
13
|
+
import { mergeMap, merge } from 'rxjs/operators';
|
|
14
|
+
import * as i2 from '@progress/kendo-angular-l10n';
|
|
15
|
+
import { ComponentMessages, LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
|
|
16
|
+
import * as i6 from '@angular/common';
|
|
15
17
|
import { CommonModule } from '@angular/common';
|
|
16
|
-
import * as
|
|
18
|
+
import * as i5$1 from '@progress/kendo-angular-indicators';
|
|
17
19
|
import { IndicatorsModule } from '@progress/kendo-angular-indicators';
|
|
18
|
-
import
|
|
20
|
+
import * as i4 from '@progress/kendo-angular-treeview';
|
|
21
|
+
import { TreeViewModule } from '@progress/kendo-angular-treeview';
|
|
22
|
+
import * as i5 from '@progress/kendo-angular-buttons';
|
|
23
|
+
import { ButtonsModule } from '@progress/kendo-angular-buttons';
|
|
24
|
+
import * as i7 from '@progress/kendo-angular-inputs';
|
|
25
|
+
import { InputsModule } from '@progress/kendo-angular-inputs';
|
|
26
|
+
import { __awaiter } from 'tslib';
|
|
19
27
|
|
|
20
28
|
/**
|
|
21
29
|
* @hidden
|
|
@@ -24,7 +32,7 @@ const packageMetadata = {
|
|
|
24
32
|
name: '@progress/kendo-angular-pivotgrid',
|
|
25
33
|
productName: 'Kendo UI for Angular',
|
|
26
34
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
27
|
-
publishDate:
|
|
35
|
+
publishDate: 1660829909,
|
|
28
36
|
version: '',
|
|
29
37
|
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'
|
|
30
38
|
};
|
|
@@ -91,6 +99,54 @@ const syncWheel = (event, tables, prop, axis) => {
|
|
|
91
99
|
tables[1][prop] += delta;
|
|
92
100
|
}
|
|
93
101
|
};
|
|
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
|
+
/**
|
|
131
|
+
* @hidden
|
|
132
|
+
*/
|
|
133
|
+
const getDocument = element => element.ownerDocument.documentElement;
|
|
134
|
+
/**
|
|
135
|
+
* @hidden
|
|
136
|
+
*/
|
|
137
|
+
const getWindow = element => element.ownerDocument.defaultView;
|
|
138
|
+
/**
|
|
139
|
+
* @hidden
|
|
140
|
+
*/
|
|
141
|
+
const offset = element => {
|
|
142
|
+
const { clientTop, clientLeft } = getDocument(element);
|
|
143
|
+
const { pageYOffset, pageXOffset } = getWindow(element);
|
|
144
|
+
const { top, left } = element.getBoundingClientRect();
|
|
145
|
+
return {
|
|
146
|
+
top: top + pageYOffset - clientTop,
|
|
147
|
+
left: left + pageXOffset - clientLeft
|
|
148
|
+
};
|
|
149
|
+
};
|
|
94
150
|
/**
|
|
95
151
|
* @hidden
|
|
96
152
|
*/
|
|
@@ -114,6 +170,17 @@ const matchAriaAttributes = (wrapper) => {
|
|
|
114
170
|
cell.setAttribute('aria-describedby', colHeaderCellsIds.join(' '));
|
|
115
171
|
});
|
|
116
172
|
};
|
|
173
|
+
/**
|
|
174
|
+
* @hidden
|
|
175
|
+
*/
|
|
176
|
+
const position = (target, before) => {
|
|
177
|
+
const targetRect = offset(target);
|
|
178
|
+
const { offsetWidth, offsetHeight } = target;
|
|
179
|
+
const left = targetRect.left + (before ? 0 : offsetWidth);
|
|
180
|
+
const top = targetRect.top + offsetHeight / 2;
|
|
181
|
+
const height = offsetHeight;
|
|
182
|
+
return { left, top, height };
|
|
183
|
+
};
|
|
117
184
|
/**
|
|
118
185
|
* @hidden
|
|
119
186
|
*/
|
|
@@ -130,12 +197,16 @@ class PivotGridDataService {
|
|
|
130
197
|
constructor(ngZone) {
|
|
131
198
|
this.ngZone = ngZone;
|
|
132
199
|
this.expandedStateChange = new EventEmitter();
|
|
200
|
+
this.configuratorFieldChange = new EventEmitter();
|
|
201
|
+
this.expandedFieldChange = new EventEmitter();
|
|
133
202
|
this.columnHeaderRows = new BehaviorSubject([]);
|
|
134
203
|
this.columnHeaderCols = new BehaviorSubject([]);
|
|
135
204
|
this.rowHeaderCols = new BehaviorSubject([]);
|
|
136
205
|
this.rowHeaderRows = new BehaviorSubject([]);
|
|
137
206
|
this.valuesRows = new BehaviorSubject([]);
|
|
138
207
|
this.loading = new BehaviorSubject(false);
|
|
208
|
+
this.fields = new BehaviorSubject([]);
|
|
209
|
+
this.configuredFields = new BehaviorSubject([]);
|
|
139
210
|
this.pivotGridId = nextPivotGridId++;
|
|
140
211
|
}
|
|
141
212
|
updateRowsAndCols() {
|
|
@@ -165,6 +236,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
165
236
|
type: Injectable
|
|
166
237
|
}], ctorParameters: function () { return [{ type: i0.NgZone }]; }, propDecorators: { expandedStateChange: [{
|
|
167
238
|
type: Output
|
|
239
|
+
}], configuratorFieldChange: [{
|
|
240
|
+
type: Output
|
|
241
|
+
}], expandedFieldChange: [{
|
|
242
|
+
type: Output
|
|
168
243
|
}] } });
|
|
169
244
|
|
|
170
245
|
/**
|
|
@@ -220,7 +295,7 @@ PivotGridCellDirective.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0",
|
|
|
220
295
|
[ngClass]="{
|
|
221
296
|
'k-i-arrow-chevron-up': expanded,
|
|
222
297
|
'k-i-arrow-chevron-down': !expanded
|
|
223
|
-
}"></span>{{ kendoPivotGridCell.data ? kendoPivotGridCell.data.fmtValue : kendoPivotGridCell.caption }}`, isInline: true, directives: [{ type:
|
|
298
|
+
}"></span>{{ kendoPivotGridCell.data ? kendoPivotGridCell.data.fmtValue : kendoPivotGridCell.caption }}`, isInline: true, directives: [{ type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.EventsOutsideAngularDirective, selector: "[kendoEventsOutsideAngular]", inputs: ["kendoEventsOutsideAngular", "scope"] }, { type: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
|
|
224
299
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PivotGridCellDirective, decorators: [{
|
|
225
300
|
type: Component,
|
|
226
301
|
args: [{
|
|
@@ -309,7 +384,7 @@ PivotGridTableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0"
|
|
|
309
384
|
</tr>
|
|
310
385
|
</tbody>
|
|
311
386
|
</table>
|
|
312
|
-
`, isInline: true, components: [{ type: PivotGridCellDirective, selector: "[kendoPivotGridCell]", inputs: ["kendoPivotGridCell", "tableType", "rowIndex", "colIndex"] }], directives: [{ type:
|
|
387
|
+
`, isInline: true, components: [{ type: PivotGridCellDirective, selector: "[kendoPivotGridCell]", inputs: ["kendoPivotGridCell", "tableType", "rowIndex", "colIndex"] }], directives: [{ type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
313
388
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PivotGridTableComponent, decorators: [{
|
|
314
389
|
type: Component,
|
|
315
390
|
args: [{
|
|
@@ -357,19 +432,855 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
357
432
|
type: Input
|
|
358
433
|
}] } });
|
|
359
434
|
|
|
435
|
+
/**
|
|
436
|
+
* @hidden
|
|
437
|
+
*/
|
|
438
|
+
class ConfiguratorService {
|
|
439
|
+
constructor() {
|
|
440
|
+
this.configuratorStateChange = new EventEmitter();
|
|
441
|
+
}
|
|
442
|
+
parseConfiguratorState(action) {
|
|
443
|
+
const newState = configuratorReducer({
|
|
444
|
+
filter: [],
|
|
445
|
+
sort: [],
|
|
446
|
+
rowAxes: this.state.rowAxes,
|
|
447
|
+
columnAxes: this.state.columnAxes,
|
|
448
|
+
measureAxes: this.state.measureAxes,
|
|
449
|
+
dragItem: this.state.dragItem,
|
|
450
|
+
dropDirection: this.state.dropDirection,
|
|
451
|
+
dropTarget: this.state.dropTarget,
|
|
452
|
+
dropZone: this.state.dropZone
|
|
453
|
+
}, action);
|
|
454
|
+
Object.keys(newState).forEach(key => newState[key] === undefined && delete newState[key]);
|
|
455
|
+
this.state = Object.assign(Object.assign({}, this.state), newState);
|
|
456
|
+
this.configuratorStateChange.emit(this.state);
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
ConfiguratorService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ConfiguratorService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
460
|
+
ConfiguratorService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ConfiguratorService });
|
|
461
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ConfiguratorService, decorators: [{
|
|
462
|
+
type: Injectable
|
|
463
|
+
}], propDecorators: { configuratorStateChange: [{
|
|
464
|
+
type: Output
|
|
465
|
+
}] } });
|
|
466
|
+
|
|
467
|
+
/**
|
|
468
|
+
* @hidden
|
|
469
|
+
*/
|
|
470
|
+
const append = (element) => {
|
|
471
|
+
let appended = false;
|
|
472
|
+
return () => {
|
|
473
|
+
if (!appended) {
|
|
474
|
+
document.body.appendChild(element);
|
|
475
|
+
appended = true;
|
|
476
|
+
}
|
|
477
|
+
return element;
|
|
478
|
+
};
|
|
479
|
+
};
|
|
480
|
+
/**
|
|
481
|
+
* @hidden
|
|
482
|
+
*/
|
|
483
|
+
class DropCueService {
|
|
484
|
+
create() {
|
|
485
|
+
this.dom = document.createElement('span');
|
|
486
|
+
this.dom.style.position = 'absolute';
|
|
487
|
+
const wrapper = document.createElement('div');
|
|
488
|
+
wrapper.classList.add('k-drop-hint', 'k-drop-hint-v');
|
|
489
|
+
const hintStart = document.createElement('div');
|
|
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();
|
|
498
|
+
}
|
|
499
|
+
attach() {
|
|
500
|
+
return append(this.dom)();
|
|
501
|
+
}
|
|
502
|
+
remove() {
|
|
503
|
+
if (this.dom && this.dom.parentElement) {
|
|
504
|
+
document.body.removeChild(this.dom);
|
|
505
|
+
this.dom = null;
|
|
506
|
+
}
|
|
507
|
+
}
|
|
508
|
+
hide() {
|
|
509
|
+
this.dom.style.display = "none";
|
|
510
|
+
}
|
|
511
|
+
position({ left, top, height }) {
|
|
512
|
+
this.dom.style.display = 'block';
|
|
513
|
+
this.dom.style.height = height + 'px';
|
|
514
|
+
this.dom.style.top = top + 'px';
|
|
515
|
+
this.dom.style.zIndex = '1000';
|
|
516
|
+
const width = this.dom.offsetWidth / 2;
|
|
517
|
+
this.dom.style.left = left - width + 'px';
|
|
518
|
+
}
|
|
519
|
+
}
|
|
520
|
+
DropCueService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DropCueService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
521
|
+
DropCueService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DropCueService });
|
|
522
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DropCueService, decorators: [{
|
|
523
|
+
type: Injectable
|
|
524
|
+
}] });
|
|
525
|
+
|
|
526
|
+
/**
|
|
527
|
+
* @hidden
|
|
528
|
+
*/
|
|
529
|
+
class DropTargetDirective {
|
|
530
|
+
constructor(element, configuratorService, cue, renderer, zone) {
|
|
531
|
+
this.element = element;
|
|
532
|
+
this.configuratorService = configuratorService;
|
|
533
|
+
this.cue = cue;
|
|
534
|
+
this.renderer = renderer;
|
|
535
|
+
this.zone = zone;
|
|
536
|
+
this.subs = new Subscription();
|
|
537
|
+
}
|
|
538
|
+
ngOnInit() {
|
|
539
|
+
const element = this.element.nativeElement;
|
|
540
|
+
this.elementType = element.nodeName === 'KENDO-CHIP' ? 'chip' : 'container';
|
|
541
|
+
this.zone.runOutsideAngular(() => {
|
|
542
|
+
this.subs.add(this.renderer.listen(element, 'mouseenter', this.handleMouseEnter.bind(this)));
|
|
543
|
+
this.subs.add(this.renderer.listen(element, 'mousemove', this.handleMouseMove.bind(this)));
|
|
544
|
+
this.subs.add(this.renderer.listen(element, 'mouseleave', this.handleMouseLeave.bind(this)));
|
|
545
|
+
});
|
|
546
|
+
}
|
|
547
|
+
ngOnDestroy() {
|
|
548
|
+
this.subs.unsubscribe();
|
|
549
|
+
}
|
|
550
|
+
handleMouseEnter(event) {
|
|
551
|
+
if (this.configuratorService.state.dragItem) {
|
|
552
|
+
if (this.elementType === 'chip') {
|
|
553
|
+
this.configuratorService.parseConfiguratorState({ type: PIVOT_CONFIGURATOR_ACTION.setDropTarget, payload: this.item });
|
|
554
|
+
this.targetElement = event.target;
|
|
555
|
+
this.cue.position(position(event.target, this.configuratorService.state.dropDirection === 'before'));
|
|
556
|
+
}
|
|
557
|
+
this.configuratorService.parseConfiguratorState({ type: PIVOT_CONFIGURATOR_ACTION.setDropZone, payload: this.axes });
|
|
558
|
+
}
|
|
559
|
+
}
|
|
560
|
+
handleMouseMove($event) {
|
|
561
|
+
if (this.configuratorService.state.dragItem) {
|
|
562
|
+
if (this.elementType !== 'chip') {
|
|
563
|
+
return;
|
|
564
|
+
}
|
|
565
|
+
if (this.element.nativeElement) {
|
|
566
|
+
const rect = this.element.nativeElement.getBoundingClientRect();
|
|
567
|
+
const x = $event.clientX - rect.left;
|
|
568
|
+
const direction = x < rect.width / 2 ? 'before' : 'after';
|
|
569
|
+
if ((direction !== this.configuratorService.state.dropDirection) && this.targetElement) {
|
|
570
|
+
this.cue.position(position(this.targetElement, direction === 'before'));
|
|
571
|
+
}
|
|
572
|
+
this.configuratorService.parseConfiguratorState({ type: PIVOT_CONFIGURATOR_ACTION.setDropDirection, payload: direction });
|
|
573
|
+
}
|
|
574
|
+
}
|
|
575
|
+
}
|
|
576
|
+
handleMouseLeave() {
|
|
577
|
+
if (this.elementType === 'chip') {
|
|
578
|
+
return;
|
|
579
|
+
}
|
|
580
|
+
if (this.configuratorService.state.dragItem) {
|
|
581
|
+
this.configuratorService.parseConfiguratorState({ type: PIVOT_CONFIGURATOR_ACTION.setDropZone, payload: null });
|
|
582
|
+
}
|
|
583
|
+
}
|
|
584
|
+
}
|
|
585
|
+
DropTargetDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DropTargetDirective, deps: [{ token: i0.ElementRef }, { token: ConfiguratorService }, { token: DropCueService }, { token: i0.Renderer2 }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Directive });
|
|
586
|
+
DropTargetDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: DropTargetDirective, selector: "[kendoDropTarget]", inputs: { item: "item", axes: "axes" }, ngImport: i0 });
|
|
587
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DropTargetDirective, decorators: [{
|
|
588
|
+
type: Directive,
|
|
589
|
+
args: [{
|
|
590
|
+
selector: '[kendoDropTarget]'
|
|
591
|
+
}]
|
|
592
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: ConfiguratorService }, { type: DropCueService }, { type: i0.Renderer2 }, { type: i0.NgZone }]; }, propDecorators: { item: [{
|
|
593
|
+
type: Input
|
|
594
|
+
}], axes: [{
|
|
595
|
+
type: Input
|
|
596
|
+
}] } });
|
|
597
|
+
|
|
598
|
+
/**
|
|
599
|
+
* @hidden
|
|
600
|
+
*/
|
|
601
|
+
class DraggableChipDirective {
|
|
602
|
+
constructor(draggable, element, zone, service, cue) {
|
|
603
|
+
this.draggable = draggable;
|
|
604
|
+
this.element = element;
|
|
605
|
+
this.zone = zone;
|
|
606
|
+
this.service = service;
|
|
607
|
+
this.cue = cue;
|
|
608
|
+
this.touchActions = 'none';
|
|
609
|
+
this.initialX = {};
|
|
610
|
+
this.initialY = {};
|
|
611
|
+
this.subs = new Subscription();
|
|
612
|
+
}
|
|
613
|
+
get pointerEvents() {
|
|
614
|
+
return this.drag ? 'none' : undefined;
|
|
615
|
+
}
|
|
616
|
+
ngOnInit() {
|
|
617
|
+
this.zone.runOutsideAngular(() => this.subs.add(this.draggable.kendoPress
|
|
618
|
+
.subscribe((event) => {
|
|
619
|
+
if (isDocumentAvailable()) {
|
|
620
|
+
this.cue.create();
|
|
621
|
+
this.cue.attach();
|
|
622
|
+
this.initialX.current = event.clientX;
|
|
623
|
+
this.initialY.current = event.clientY;
|
|
624
|
+
}
|
|
625
|
+
})));
|
|
626
|
+
this.zone.runOutsideAngular(() => this.subs.add(this.draggable.kendoDrag
|
|
627
|
+
.subscribe((event) => {
|
|
628
|
+
if (isDocumentAvailable()) {
|
|
629
|
+
if (Math.abs(this.initialX.current - event.clientX) < 10 &&
|
|
630
|
+
Math.abs(this.initialY.current - event.clientY) < 10) {
|
|
631
|
+
return;
|
|
632
|
+
}
|
|
633
|
+
if (this.element.nativeElement) {
|
|
634
|
+
this.element.nativeElement.style.transform = `translate(${event.clientX - this.initialX.current}px, ${event.clientY - this.initialY.current}px)`;
|
|
635
|
+
}
|
|
636
|
+
}
|
|
637
|
+
this.drag = true;
|
|
638
|
+
this.service.parseConfiguratorState({ type: PIVOT_CONFIGURATOR_ACTION.setDragItem, payload: this.item });
|
|
639
|
+
})));
|
|
640
|
+
this.zone.runOutsideAngular(() => this.subs.add(this.draggable.kendoRelease
|
|
641
|
+
.subscribe(() => {
|
|
642
|
+
this.drag = false;
|
|
643
|
+
if (this.service.state.dragItem) {
|
|
644
|
+
if (isDocumentAvailable()) {
|
|
645
|
+
if (this.element.nativeElement) {
|
|
646
|
+
this.element.nativeElement.style.transform = '';
|
|
647
|
+
}
|
|
648
|
+
this.cue.remove();
|
|
649
|
+
}
|
|
650
|
+
this.service.parseConfiguratorState({ type: PIVOT_CONFIGURATOR_ACTION.drop, payload: this.item });
|
|
651
|
+
this.service.state.dragItem = null;
|
|
652
|
+
this.service.state.dropDirection = null;
|
|
653
|
+
this.service.state.dropTarget = null;
|
|
654
|
+
this.service.state.dropZone = null;
|
|
655
|
+
}
|
|
656
|
+
})));
|
|
657
|
+
}
|
|
658
|
+
ngOnDestroy() {
|
|
659
|
+
this.subs.unsubscribe();
|
|
660
|
+
}
|
|
661
|
+
}
|
|
662
|
+
DraggableChipDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DraggableChipDirective, deps: [{ token: i3.DraggableDirective, optional: true }, { token: i0.ElementRef }, { token: i0.NgZone }, { token: ConfiguratorService }, { token: DropCueService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
663
|
+
DraggableChipDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: DraggableChipDirective, selector: "[kendoChipDraggable]", inputs: { item: "item" }, host: { properties: { "style.pointerEvents": "this.pointerEvents", "style.touch-action": "this.touchActions" } }, ngImport: i0 });
|
|
664
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DraggableChipDirective, decorators: [{
|
|
665
|
+
type: Directive,
|
|
666
|
+
args: [{
|
|
667
|
+
selector: '[kendoChipDraggable]'
|
|
668
|
+
}]
|
|
669
|
+
}], ctorParameters: function () { return [{ type: i3.DraggableDirective, decorators: [{
|
|
670
|
+
type: Optional
|
|
671
|
+
}] }, { type: i0.ElementRef }, { type: i0.NgZone }, { type: ConfiguratorService }, { type: DropCueService }]; }, propDecorators: { pointerEvents: [{
|
|
672
|
+
type: HostBinding,
|
|
673
|
+
args: ['style.pointerEvents']
|
|
674
|
+
}], touchActions: [{
|
|
675
|
+
type: HostBinding,
|
|
676
|
+
args: ['style.touch-action']
|
|
677
|
+
}], item: [{
|
|
678
|
+
type: Input
|
|
679
|
+
}] } });
|
|
680
|
+
|
|
681
|
+
/**
|
|
682
|
+
* @hidden
|
|
683
|
+
* Represents the Kendo UI PivotGrid Configurator component for Angular.
|
|
684
|
+
*/
|
|
685
|
+
class PivotGridConfiguratorComponent {
|
|
686
|
+
constructor(dataService, localization, configuratorService, cdr) {
|
|
687
|
+
this.dataService = dataService;
|
|
688
|
+
this.localization = localization;
|
|
689
|
+
this.configuratorService = configuratorService;
|
|
690
|
+
this.cdr = cdr;
|
|
691
|
+
this.hostClass = true;
|
|
692
|
+
this.horizontal = false;
|
|
693
|
+
this.checked = [];
|
|
694
|
+
this.subs = new Subscription();
|
|
695
|
+
/**
|
|
696
|
+
* A function which determines if a specific node has child nodes.
|
|
697
|
+
*/
|
|
698
|
+
this.hasChildren = (node) => !('hierarchyUniqueName' in node) && !('aggregator' in node);
|
|
699
|
+
/**
|
|
700
|
+
* A function which provides the child nodes for a given parent node.
|
|
701
|
+
*/
|
|
702
|
+
this.children = (node) => {
|
|
703
|
+
if (this.dataService.directive.type === 'olap') {
|
|
704
|
+
const observable = from(this.dataService.directive.fetchChildren(node, this.fields));
|
|
705
|
+
return observable.pipe(mergeMap(value => of(value)));
|
|
706
|
+
}
|
|
707
|
+
return of(node.children);
|
|
708
|
+
};
|
|
709
|
+
}
|
|
710
|
+
ngOnInit() {
|
|
711
|
+
this.subs.add(this.dataService.fields
|
|
712
|
+
.subscribe(res => {
|
|
713
|
+
this.fields = res;
|
|
714
|
+
}));
|
|
715
|
+
this.subs.add(this.dataService.configuredFields
|
|
716
|
+
.subscribe(res => {
|
|
717
|
+
this.originalState = clone(res);
|
|
718
|
+
this.setState(clone(res));
|
|
719
|
+
this.setChecked();
|
|
720
|
+
}));
|
|
721
|
+
this.subs.add(this.configuratorService.configuratorStateChange
|
|
722
|
+
.subscribe(res => {
|
|
723
|
+
this.state = res;
|
|
724
|
+
this.cdr.detectChanges();
|
|
725
|
+
}));
|
|
726
|
+
}
|
|
727
|
+
ngOnDestroy() {
|
|
728
|
+
this.subs.unsubscribe();
|
|
729
|
+
}
|
|
730
|
+
getName(name) {
|
|
731
|
+
return name.toString();
|
|
732
|
+
}
|
|
733
|
+
setState(state) {
|
|
734
|
+
this.state = state;
|
|
735
|
+
this.configuratorService.state = state;
|
|
736
|
+
}
|
|
737
|
+
/**
|
|
738
|
+
* Returns the localized message for a given token
|
|
739
|
+
*/
|
|
740
|
+
messageFor(localizationToken) {
|
|
741
|
+
return this.localization.get(localizationToken);
|
|
742
|
+
}
|
|
743
|
+
/**
|
|
744
|
+
* Retrieves the 'Columns' section item names
|
|
745
|
+
*/
|
|
746
|
+
get columnHierarchies() {
|
|
747
|
+
return this.extractDefaultFields(this.state.columnAxes);
|
|
748
|
+
}
|
|
749
|
+
;
|
|
750
|
+
/**
|
|
751
|
+
* Retrieves the 'Rows' section item names
|
|
752
|
+
*/
|
|
753
|
+
get rowHierarchies() {
|
|
754
|
+
return this.extractDefaultFields(this.state.rowAxes);
|
|
755
|
+
}
|
|
756
|
+
;
|
|
757
|
+
/**
|
|
758
|
+
* Retrieves the 'Value' section item names
|
|
759
|
+
*/
|
|
760
|
+
get measureHierarchies() {
|
|
761
|
+
return this.extractDefaultFields(this.state.measureAxes);
|
|
762
|
+
}
|
|
763
|
+
;
|
|
764
|
+
/**
|
|
765
|
+
* Constructs an array with all selected fields.
|
|
766
|
+
* @param fields - used for when child nodes are loaded on demand.
|
|
767
|
+
* Child nodes are concatinated to the root level nodes.
|
|
768
|
+
*/
|
|
769
|
+
setChecked(fields = []) {
|
|
770
|
+
const allFields = [...this.fields, ...fields];
|
|
771
|
+
const checked = this.getFieldsFlatMap(allFields).filter((f) => [
|
|
772
|
+
...this.columnHierarchies,
|
|
773
|
+
...this.rowHierarchies,
|
|
774
|
+
...this.measureHierarchies
|
|
775
|
+
].some((h) => (h === f.uniqueName || h === f.defaultHierarchy)));
|
|
776
|
+
this.checked = checked;
|
|
777
|
+
}
|
|
778
|
+
/**
|
|
779
|
+
* A function which determines if a specific node is checked/
|
|
780
|
+
*/
|
|
781
|
+
isItemChecked(node) {
|
|
782
|
+
var _a, _b;
|
|
783
|
+
const res = this.checked.some(s => node.defaultHierarchy
|
|
784
|
+
? s.defaultHierarchy === node.defaultHierarchy
|
|
785
|
+
: s.uniqueName === node.uniqueName)
|
|
786
|
+
|| (((_a = node.children) === null || _a === void 0 ? void 0 : _a.length) && ((_b = node.children) === null || _b === void 0 ? void 0 : _b.every((c) => c.checked)));
|
|
787
|
+
return res || null;
|
|
788
|
+
}
|
|
789
|
+
/**
|
|
790
|
+
* Determines if a checkbox should be rendered.
|
|
791
|
+
*/
|
|
792
|
+
isSelectable(node) {
|
|
793
|
+
const hasChildren = !('hierarchyUniqueName' in node) && !('aggregator' in node);
|
|
794
|
+
return !Boolean((!hasChildren && !node.aggregator && !node.measure)
|
|
795
|
+
|| (node.type === 2)
|
|
796
|
+
|| node.uniqueName === '[KPIs]');
|
|
797
|
+
}
|
|
798
|
+
/**
|
|
799
|
+
* Check if the newly loaded child nodes have checked items.
|
|
800
|
+
* (Only for OLAP data-binding directive)
|
|
801
|
+
*/
|
|
802
|
+
handleChildrenLoaded(event) {
|
|
803
|
+
if (this.dataService.directive.type === 'local') {
|
|
804
|
+
return;
|
|
805
|
+
}
|
|
806
|
+
const fields = event.children.map(item => item.dataItem);
|
|
807
|
+
this.setChecked(fields);
|
|
808
|
+
}
|
|
809
|
+
handleCheckedChange(event, item) {
|
|
810
|
+
if (event.target.checked) {
|
|
811
|
+
this.checked = [...this.checked, item];
|
|
812
|
+
}
|
|
813
|
+
else {
|
|
814
|
+
const itemIndex = this.checked.findIndex(checkedItem => checkedItem.uniqueName === item.uniqueName);
|
|
815
|
+
this.checked.splice(itemIndex, 1);
|
|
816
|
+
}
|
|
817
|
+
const action = {
|
|
818
|
+
type: 'PIVOT_CONFIGURATOR_ACTION_TOGGLE_SELECTION',
|
|
819
|
+
payload: item
|
|
820
|
+
};
|
|
821
|
+
this.configuratorService.parseConfiguratorState(action);
|
|
822
|
+
}
|
|
823
|
+
handleSubmit() {
|
|
824
|
+
this.dataService.configuratorFieldChange.emit(this.state);
|
|
825
|
+
}
|
|
826
|
+
/**
|
|
827
|
+
* Reset the configurator to the last saved state
|
|
828
|
+
*/
|
|
829
|
+
handleReset() {
|
|
830
|
+
this.setState(clone(this.originalState));
|
|
831
|
+
this.setChecked();
|
|
832
|
+
}
|
|
833
|
+
/**
|
|
834
|
+
* Flattens all available fields.
|
|
835
|
+
*/
|
|
836
|
+
getFieldsFlatMap(nodes = []) {
|
|
837
|
+
let result = [...nodes];
|
|
838
|
+
(nodes || []).forEach((child) => {
|
|
839
|
+
result = result.concat(this.getFieldsFlatMap(child.children));
|
|
840
|
+
});
|
|
841
|
+
return result;
|
|
842
|
+
}
|
|
843
|
+
/**
|
|
844
|
+
* Creates an array containing only the field names, e.g. '[Date].[Calendar]' or 'Product'
|
|
845
|
+
*/
|
|
846
|
+
extractDefaultFields(columns = []) {
|
|
847
|
+
const result = new Set();
|
|
848
|
+
columns.forEach((column) => {
|
|
849
|
+
result.add(String(column.name));
|
|
850
|
+
});
|
|
851
|
+
return Array.from(result);
|
|
852
|
+
}
|
|
853
|
+
;
|
|
854
|
+
}
|
|
855
|
+
PivotGridConfiguratorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PivotGridConfiguratorComponent, deps: [{ token: PivotGridDataService }, { token: i2.LocalizationService }, { token: ConfiguratorService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
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: [
|
|
857
|
+
ConfiguratorService,
|
|
858
|
+
DropCueService
|
|
859
|
+
], ngImport: i0, template: `
|
|
860
|
+
<div
|
|
861
|
+
class="k-pivotgrid-configurator-panel k-pivotgrid-configurator-push"
|
|
862
|
+
[ngClass]="{
|
|
863
|
+
'k-pivotgrid-configurator-horizontal': horizontal,
|
|
864
|
+
'k-pivotgrid-configurator-vertical': !horizontal
|
|
865
|
+
}"
|
|
866
|
+
>
|
|
867
|
+
<div class="k-pivotgrid-configurator-header">
|
|
868
|
+
<div class="k-pivotgrid-configurator-header-text">{{messageFor('configuratorHeaderText')}}</div>
|
|
869
|
+
</div>
|
|
870
|
+
|
|
871
|
+
<div class="k-pivotgrid-configurator-content">
|
|
872
|
+
<div class="k-form" [class.k-form-horizontal]="horizontal">
|
|
873
|
+
<div class="k-form-field-wrapper">
|
|
874
|
+
<div class="k-form-field">
|
|
875
|
+
<span class="k-label">{{messageFor('configuratorFieldsText')}}</span>
|
|
876
|
+
</div>
|
|
877
|
+
|
|
878
|
+
<div class="k-form-field">
|
|
879
|
+
<div class="k-fields-list-wrapper">
|
|
880
|
+
<kendo-treeview
|
|
881
|
+
[nodes]="fields"
|
|
882
|
+
textField="caption"
|
|
883
|
+
[children]="children"
|
|
884
|
+
[hasChildren]="hasChildren"
|
|
885
|
+
kendoTreeViewExpandable
|
|
886
|
+
(childrenLoaded)="handleChildrenLoaded($event)"
|
|
887
|
+
>
|
|
888
|
+
<ng-template kendoTreeViewNodeTemplate let-dataItem>
|
|
889
|
+
<input kendoCheckBox
|
|
890
|
+
*ngIf="isSelectable(dataItem)"
|
|
891
|
+
type="checkbox"
|
|
892
|
+
kendoCheckBox
|
|
893
|
+
[checked]="isItemChecked(dataItem)"
|
|
894
|
+
(change)="handleCheckedChange($event, dataItem)"/>
|
|
895
|
+
{{ dataItem.caption }}
|
|
896
|
+
</ng-template>
|
|
897
|
+
</kendo-treeview>
|
|
898
|
+
|
|
899
|
+
</div>
|
|
900
|
+
</div>
|
|
901
|
+
</div>
|
|
902
|
+
|
|
903
|
+
<div *ngIf="horizontal; else verticalTemplate" class="k-form-field-wrapper">
|
|
904
|
+
<ng-container *ngTemplateOutlet="verticalTemplate"></ng-container>
|
|
905
|
+
</div>
|
|
906
|
+
|
|
907
|
+
<ng-template #verticalTemplate>
|
|
908
|
+
<div class="k-form-field" kendoDropTarget axes="columnAxes">
|
|
909
|
+
<span class="k-label">{{messageFor('configuratorColumnsText')}}</span>
|
|
910
|
+
</div>
|
|
911
|
+
|
|
912
|
+
<kendo-chiplist
|
|
913
|
+
*ngIf="state.columnAxes && state.columnAxes.length; else noColumnAxes"
|
|
914
|
+
kendoDropTarget
|
|
915
|
+
axes="columnAxes"
|
|
916
|
+
>
|
|
917
|
+
<kendo-chip *ngFor="let item of state.columnAxes"
|
|
918
|
+
kendoChipDraggable
|
|
919
|
+
kendoDraggable
|
|
920
|
+
kendoDropTarget
|
|
921
|
+
[item]="item"
|
|
922
|
+
axes="columnAxes"
|
|
923
|
+
rounded="full"
|
|
924
|
+
[removable]="true"
|
|
925
|
+
>
|
|
926
|
+
{{ getName(item.name) }}
|
|
927
|
+
</kendo-chip>
|
|
928
|
+
</kendo-chiplist>
|
|
929
|
+
|
|
930
|
+
<ng-template #noColumnAxes>
|
|
931
|
+
<div class="k-settings-description" kendoDropTarget axes="columnAxes">
|
|
932
|
+
Select some fields to begin setup
|
|
933
|
+
</div>
|
|
934
|
+
</ng-template>
|
|
935
|
+
|
|
936
|
+
<div class="k-form-field" kendoDropTarget axes="rowAxes">
|
|
937
|
+
<span class="k-label">{{messageFor('configuratorRowsText')}}</span>
|
|
938
|
+
</div>
|
|
939
|
+
|
|
940
|
+
<kendo-chiplist
|
|
941
|
+
*ngIf="state.rowAxes && state.rowAxes.length; else noRowAxes"
|
|
942
|
+
kendoDropTarget
|
|
943
|
+
axes="rowAxes"
|
|
944
|
+
>
|
|
945
|
+
<kendo-chip *ngFor="let item of state.rowAxes"
|
|
946
|
+
kendoChipDraggable
|
|
947
|
+
kendoDraggable
|
|
948
|
+
kendoDropTarget
|
|
949
|
+
[item]="item"
|
|
950
|
+
axes="rowAxes"
|
|
951
|
+
rounded="full"
|
|
952
|
+
[removable]="true"
|
|
953
|
+
>
|
|
954
|
+
{{ getName(item.name) }}
|
|
955
|
+
</kendo-chip>
|
|
956
|
+
</kendo-chiplist>
|
|
957
|
+
|
|
958
|
+
<ng-template #noRowAxes>
|
|
959
|
+
<div class="k-settings-description" kendoDropTarget axes="rowAxes">
|
|
960
|
+
Select some fields to begin setup
|
|
961
|
+
</div>
|
|
962
|
+
</ng-template>
|
|
963
|
+
</ng-template>
|
|
964
|
+
|
|
965
|
+
<div *ngIf="horizontal; else elseTpl2" class="k-form-field-wrapper">
|
|
966
|
+
<ng-container *ngTemplateOutlet="elseTpl2"></ng-container>
|
|
967
|
+
</div>
|
|
968
|
+
|
|
969
|
+
<ng-template #elseTpl2>
|
|
970
|
+
<div class="k-form-field" kendoDropTarget axes="measureAxes">
|
|
971
|
+
<span class="k-label">{{messageFor('configuratorValuesText')}}</span>
|
|
972
|
+
</div>
|
|
973
|
+
|
|
974
|
+
<kendo-chiplist
|
|
975
|
+
*ngIf="state.measureAxes && state.measureAxes.length; else noMeasureAxes"
|
|
976
|
+
kendoDropTarget
|
|
977
|
+
axes="measureAxes"
|
|
978
|
+
>
|
|
979
|
+
<kendo-chip *ngFor="let item of state.measureAxes"
|
|
980
|
+
kendoChipDraggable
|
|
981
|
+
kendoDraggable
|
|
982
|
+
kendoDropTarget
|
|
983
|
+
[item]="item"
|
|
984
|
+
axes="measureAxes"
|
|
985
|
+
|
|
986
|
+
rounded="full"
|
|
987
|
+
[removable]="true"
|
|
988
|
+
>
|
|
989
|
+
{{ getName(item.name) }}
|
|
990
|
+
</kendo-chip>
|
|
991
|
+
</kendo-chiplist>
|
|
992
|
+
|
|
993
|
+
<ng-template #noMeasureAxes>
|
|
994
|
+
<div class="k-settings-description" kendoDropTarget axes="measureAxes">
|
|
995
|
+
Select some fields to begin setup
|
|
996
|
+
</div>
|
|
997
|
+
</ng-template>
|
|
998
|
+
</ng-template>
|
|
999
|
+
|
|
1000
|
+
</div>
|
|
1001
|
+
</div>
|
|
1002
|
+
<div class="k-pivotgrid-configurator-actions k-actions k-hstack k-justify-content-end">
|
|
1003
|
+
<button kendoButton type="button" (click)="handleReset()">{{messageFor('configuratorCancelButtonText')}}</button>
|
|
1004
|
+
<button kendoButton themeColor="primary" type="button" (click)="handleSubmit()">{{messageFor('configuratorApplyButtonText')}}</button>
|
|
1005
|
+
</div>
|
|
1006
|
+
</div>
|
|
1007
|
+
`, 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: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i4.ExpandDirective, selector: "[kendoTreeViewExpandable]", inputs: ["isExpanded", "expandBy", "expandOnFilter", "expandedKeys"], outputs: ["expandedKeysChange"] }, { type: i4.NodeTemplateDirective, selector: "[kendoTreeViewNodeTemplate]" }, { type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i7.CheckBoxDirective, selector: "input[kendoCheckBox]", inputs: ["size", "rounded"] }, { type: i6.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: DropTargetDirective, selector: "[kendoDropTarget]", inputs: ["item", "axes"] }, { type: i6.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"] }] });
|
|
1008
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PivotGridConfiguratorComponent, decorators: [{
|
|
1009
|
+
type: Component,
|
|
1010
|
+
args: [{
|
|
1011
|
+
selector: 'kendo-pivotgrid-configurator',
|
|
1012
|
+
providers: [
|
|
1013
|
+
ConfiguratorService,
|
|
1014
|
+
DropCueService
|
|
1015
|
+
],
|
|
1016
|
+
template: `
|
|
1017
|
+
<div
|
|
1018
|
+
class="k-pivotgrid-configurator-panel k-pivotgrid-configurator-push"
|
|
1019
|
+
[ngClass]="{
|
|
1020
|
+
'k-pivotgrid-configurator-horizontal': horizontal,
|
|
1021
|
+
'k-pivotgrid-configurator-vertical': !horizontal
|
|
1022
|
+
}"
|
|
1023
|
+
>
|
|
1024
|
+
<div class="k-pivotgrid-configurator-header">
|
|
1025
|
+
<div class="k-pivotgrid-configurator-header-text">{{messageFor('configuratorHeaderText')}}</div>
|
|
1026
|
+
</div>
|
|
1027
|
+
|
|
1028
|
+
<div class="k-pivotgrid-configurator-content">
|
|
1029
|
+
<div class="k-form" [class.k-form-horizontal]="horizontal">
|
|
1030
|
+
<div class="k-form-field-wrapper">
|
|
1031
|
+
<div class="k-form-field">
|
|
1032
|
+
<span class="k-label">{{messageFor('configuratorFieldsText')}}</span>
|
|
1033
|
+
</div>
|
|
1034
|
+
|
|
1035
|
+
<div class="k-form-field">
|
|
1036
|
+
<div class="k-fields-list-wrapper">
|
|
1037
|
+
<kendo-treeview
|
|
1038
|
+
[nodes]="fields"
|
|
1039
|
+
textField="caption"
|
|
1040
|
+
[children]="children"
|
|
1041
|
+
[hasChildren]="hasChildren"
|
|
1042
|
+
kendoTreeViewExpandable
|
|
1043
|
+
(childrenLoaded)="handleChildrenLoaded($event)"
|
|
1044
|
+
>
|
|
1045
|
+
<ng-template kendoTreeViewNodeTemplate let-dataItem>
|
|
1046
|
+
<input kendoCheckBox
|
|
1047
|
+
*ngIf="isSelectable(dataItem)"
|
|
1048
|
+
type="checkbox"
|
|
1049
|
+
kendoCheckBox
|
|
1050
|
+
[checked]="isItemChecked(dataItem)"
|
|
1051
|
+
(change)="handleCheckedChange($event, dataItem)"/>
|
|
1052
|
+
{{ dataItem.caption }}
|
|
1053
|
+
</ng-template>
|
|
1054
|
+
</kendo-treeview>
|
|
1055
|
+
|
|
1056
|
+
</div>
|
|
1057
|
+
</div>
|
|
1058
|
+
</div>
|
|
1059
|
+
|
|
1060
|
+
<div *ngIf="horizontal; else verticalTemplate" class="k-form-field-wrapper">
|
|
1061
|
+
<ng-container *ngTemplateOutlet="verticalTemplate"></ng-container>
|
|
1062
|
+
</div>
|
|
1063
|
+
|
|
1064
|
+
<ng-template #verticalTemplate>
|
|
1065
|
+
<div class="k-form-field" kendoDropTarget axes="columnAxes">
|
|
1066
|
+
<span class="k-label">{{messageFor('configuratorColumnsText')}}</span>
|
|
1067
|
+
</div>
|
|
1068
|
+
|
|
1069
|
+
<kendo-chiplist
|
|
1070
|
+
*ngIf="state.columnAxes && state.columnAxes.length; else noColumnAxes"
|
|
1071
|
+
kendoDropTarget
|
|
1072
|
+
axes="columnAxes"
|
|
1073
|
+
>
|
|
1074
|
+
<kendo-chip *ngFor="let item of state.columnAxes"
|
|
1075
|
+
kendoChipDraggable
|
|
1076
|
+
kendoDraggable
|
|
1077
|
+
kendoDropTarget
|
|
1078
|
+
[item]="item"
|
|
1079
|
+
axes="columnAxes"
|
|
1080
|
+
rounded="full"
|
|
1081
|
+
[removable]="true"
|
|
1082
|
+
>
|
|
1083
|
+
{{ getName(item.name) }}
|
|
1084
|
+
</kendo-chip>
|
|
1085
|
+
</kendo-chiplist>
|
|
1086
|
+
|
|
1087
|
+
<ng-template #noColumnAxes>
|
|
1088
|
+
<div class="k-settings-description" kendoDropTarget axes="columnAxes">
|
|
1089
|
+
Select some fields to begin setup
|
|
1090
|
+
</div>
|
|
1091
|
+
</ng-template>
|
|
1092
|
+
|
|
1093
|
+
<div class="k-form-field" kendoDropTarget axes="rowAxes">
|
|
1094
|
+
<span class="k-label">{{messageFor('configuratorRowsText')}}</span>
|
|
1095
|
+
</div>
|
|
1096
|
+
|
|
1097
|
+
<kendo-chiplist
|
|
1098
|
+
*ngIf="state.rowAxes && state.rowAxes.length; else noRowAxes"
|
|
1099
|
+
kendoDropTarget
|
|
1100
|
+
axes="rowAxes"
|
|
1101
|
+
>
|
|
1102
|
+
<kendo-chip *ngFor="let item of state.rowAxes"
|
|
1103
|
+
kendoChipDraggable
|
|
1104
|
+
kendoDraggable
|
|
1105
|
+
kendoDropTarget
|
|
1106
|
+
[item]="item"
|
|
1107
|
+
axes="rowAxes"
|
|
1108
|
+
rounded="full"
|
|
1109
|
+
[removable]="true"
|
|
1110
|
+
>
|
|
1111
|
+
{{ getName(item.name) }}
|
|
1112
|
+
</kendo-chip>
|
|
1113
|
+
</kendo-chiplist>
|
|
1114
|
+
|
|
1115
|
+
<ng-template #noRowAxes>
|
|
1116
|
+
<div class="k-settings-description" kendoDropTarget axes="rowAxes">
|
|
1117
|
+
Select some fields to begin setup
|
|
1118
|
+
</div>
|
|
1119
|
+
</ng-template>
|
|
1120
|
+
</ng-template>
|
|
1121
|
+
|
|
1122
|
+
<div *ngIf="horizontal; else elseTpl2" class="k-form-field-wrapper">
|
|
1123
|
+
<ng-container *ngTemplateOutlet="elseTpl2"></ng-container>
|
|
1124
|
+
</div>
|
|
1125
|
+
|
|
1126
|
+
<ng-template #elseTpl2>
|
|
1127
|
+
<div class="k-form-field" kendoDropTarget axes="measureAxes">
|
|
1128
|
+
<span class="k-label">{{messageFor('configuratorValuesText')}}</span>
|
|
1129
|
+
</div>
|
|
1130
|
+
|
|
1131
|
+
<kendo-chiplist
|
|
1132
|
+
*ngIf="state.measureAxes && state.measureAxes.length; else noMeasureAxes"
|
|
1133
|
+
kendoDropTarget
|
|
1134
|
+
axes="measureAxes"
|
|
1135
|
+
>
|
|
1136
|
+
<kendo-chip *ngFor="let item of state.measureAxes"
|
|
1137
|
+
kendoChipDraggable
|
|
1138
|
+
kendoDraggable
|
|
1139
|
+
kendoDropTarget
|
|
1140
|
+
[item]="item"
|
|
1141
|
+
axes="measureAxes"
|
|
1142
|
+
|
|
1143
|
+
rounded="full"
|
|
1144
|
+
[removable]="true"
|
|
1145
|
+
>
|
|
1146
|
+
{{ getName(item.name) }}
|
|
1147
|
+
</kendo-chip>
|
|
1148
|
+
</kendo-chiplist>
|
|
1149
|
+
|
|
1150
|
+
<ng-template #noMeasureAxes>
|
|
1151
|
+
<div class="k-settings-description" kendoDropTarget axes="measureAxes">
|
|
1152
|
+
Select some fields to begin setup
|
|
1153
|
+
</div>
|
|
1154
|
+
</ng-template>
|
|
1155
|
+
</ng-template>
|
|
1156
|
+
|
|
1157
|
+
</div>
|
|
1158
|
+
</div>
|
|
1159
|
+
<div class="k-pivotgrid-configurator-actions k-actions k-hstack k-justify-content-end">
|
|
1160
|
+
<button kendoButton type="button" (click)="handleReset()">{{messageFor('configuratorCancelButtonText')}}</button>
|
|
1161
|
+
<button kendoButton themeColor="primary" type="button" (click)="handleSubmit()">{{messageFor('configuratorApplyButtonText')}}</button>
|
|
1162
|
+
</div>
|
|
1163
|
+
</div>
|
|
1164
|
+
`
|
|
1165
|
+
}]
|
|
1166
|
+
}], ctorParameters: function () { return [{ type: PivotGridDataService }, { type: i2.LocalizationService }, { type: ConfiguratorService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { hostClass: [{
|
|
1167
|
+
type: HostBinding,
|
|
1168
|
+
args: ['class.k-pivotgrid-configurator']
|
|
1169
|
+
}], horizontal: [{
|
|
1170
|
+
type: Input
|
|
1171
|
+
}] } });
|
|
1172
|
+
|
|
1173
|
+
/**
|
|
1174
|
+
* @hidden
|
|
1175
|
+
*/
|
|
1176
|
+
class PivotGridMessages extends ComponentMessages {
|
|
1177
|
+
}
|
|
1178
|
+
PivotGridMessages.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PivotGridMessages, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
1179
|
+
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" }, usesInheritance: true, ngImport: i0 });
|
|
1180
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PivotGridMessages, decorators: [{
|
|
1181
|
+
type: Directive
|
|
1182
|
+
}], propDecorators: { fieldMenuFilterItemLabel: [{
|
|
1183
|
+
type: Input
|
|
1184
|
+
}], fieldMenuSortAscendingItemLabel: [{
|
|
1185
|
+
type: Input
|
|
1186
|
+
}], fieldMenuSortDescendingItemLabel: [{
|
|
1187
|
+
type: Input
|
|
1188
|
+
}], filterInputLabel: [{
|
|
1189
|
+
type: Input
|
|
1190
|
+
}], filterOperatorsDropDownLabel: [{
|
|
1191
|
+
type: Input
|
|
1192
|
+
}], filterEqOperator: [{
|
|
1193
|
+
type: Input
|
|
1194
|
+
}], filterNotEqOperator: [{
|
|
1195
|
+
type: Input
|
|
1196
|
+
}], filterIsNullOperator: [{
|
|
1197
|
+
type: Input
|
|
1198
|
+
}], filterIsNotNullOperator: [{
|
|
1199
|
+
type: Input
|
|
1200
|
+
}], filterIsEmptyOperator: [{
|
|
1201
|
+
type: Input
|
|
1202
|
+
}], filterIsNotEmptyOperator: [{
|
|
1203
|
+
type: Input
|
|
1204
|
+
}], filterStartsWithOperator: [{
|
|
1205
|
+
type: Input
|
|
1206
|
+
}], filterContainsOperator: [{
|
|
1207
|
+
type: Input
|
|
1208
|
+
}], filterNotContainsOperator: [{
|
|
1209
|
+
type: Input
|
|
1210
|
+
}], filterEndsWithOperator: [{
|
|
1211
|
+
type: Input
|
|
1212
|
+
}], filterFilterButton: [{
|
|
1213
|
+
type: Input
|
|
1214
|
+
}], filterClearButton: [{
|
|
1215
|
+
type: Input
|
|
1216
|
+
}], loading: [{
|
|
1217
|
+
type: Input
|
|
1218
|
+
}], emptyCellLabel: [{
|
|
1219
|
+
type: Input
|
|
1220
|
+
}], configuratorButtonText: [{
|
|
1221
|
+
type: Input
|
|
1222
|
+
}], configuratorHeaderText: [{
|
|
1223
|
+
type: Input
|
|
1224
|
+
}], configuratorFieldsText: [{
|
|
1225
|
+
type: Input
|
|
1226
|
+
}], configuratorColumnsText: [{
|
|
1227
|
+
type: Input
|
|
1228
|
+
}], configuratorRowsText: [{
|
|
1229
|
+
type: Input
|
|
1230
|
+
}], configuratorValuesText: [{
|
|
1231
|
+
type: Input
|
|
1232
|
+
}], configuratorCancelButtonText: [{
|
|
1233
|
+
type: Input
|
|
1234
|
+
}], configuratorApplyButtonText: [{
|
|
1235
|
+
type: Input
|
|
1236
|
+
}] } });
|
|
1237
|
+
|
|
1238
|
+
/**
|
|
1239
|
+
* @hidden
|
|
1240
|
+
*/
|
|
1241
|
+
class LocalizedMessagesDirective extends PivotGridMessages {
|
|
1242
|
+
constructor(service) {
|
|
1243
|
+
super();
|
|
1244
|
+
this.service = service;
|
|
1245
|
+
}
|
|
1246
|
+
}
|
|
1247
|
+
LocalizedMessagesDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: LocalizedMessagesDirective, deps: [{ token: i2.LocalizationService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1248
|
+
LocalizedMessagesDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: LocalizedMessagesDirective, selector: "[kendoPivotGridLocalizedMessages]", providers: [
|
|
1249
|
+
{
|
|
1250
|
+
provide: PivotGridMessages,
|
|
1251
|
+
useExisting: forwardRef(() => LocalizedMessagesDirective)
|
|
1252
|
+
}
|
|
1253
|
+
], usesInheritance: true, ngImport: i0 });
|
|
1254
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: LocalizedMessagesDirective, decorators: [{
|
|
1255
|
+
type: Directive,
|
|
1256
|
+
args: [{
|
|
1257
|
+
providers: [
|
|
1258
|
+
{
|
|
1259
|
+
provide: PivotGridMessages,
|
|
1260
|
+
useExisting: forwardRef(() => LocalizedMessagesDirective)
|
|
1261
|
+
}
|
|
1262
|
+
],
|
|
1263
|
+
selector: '[kendoPivotGridLocalizedMessages]'
|
|
1264
|
+
}]
|
|
1265
|
+
}], ctorParameters: function () { return [{ type: i2.LocalizationService }]; } });
|
|
1266
|
+
|
|
360
1267
|
const DEFAULT_LOADER_SETTINGS = {
|
|
361
1268
|
type: 'converging-spinner',
|
|
362
1269
|
themeColor: 'primary',
|
|
363
1270
|
size: 'large'
|
|
364
1271
|
};
|
|
1272
|
+
const DEFAULT_CONFIGURATOR_SETTINGS = {
|
|
1273
|
+
position: 'right',
|
|
1274
|
+
horizontal: false
|
|
1275
|
+
};
|
|
365
1276
|
/**
|
|
366
1277
|
* Represents the Kendo UI PivotGrid component for Angular.
|
|
367
1278
|
*/
|
|
368
1279
|
class PivotGridComponent {
|
|
369
|
-
constructor(hostEl, zone, dataService, _scrollbarWidthService) {
|
|
370
|
-
this.hostEl = hostEl;
|
|
1280
|
+
constructor(hostEl, zone, dataService, localization, _scrollbarWidthService) {
|
|
371
1281
|
this.zone = zone;
|
|
372
1282
|
this.dataService = dataService;
|
|
1283
|
+
this.localization = localization;
|
|
373
1284
|
this.hostClass = true;
|
|
374
1285
|
this.ariaRole = 'grid';
|
|
375
1286
|
/**
|
|
@@ -381,12 +1292,13 @@ class PivotGridComponent {
|
|
|
381
1292
|
this.resizeObservers = [];
|
|
382
1293
|
this._loaderSettings = DEFAULT_LOADER_SETTINGS;
|
|
383
1294
|
this.subs = new Subscription();
|
|
1295
|
+
this.rtl = false;
|
|
384
1296
|
this.resizeContainer = (axis, element) => {
|
|
385
1297
|
const isRows = axis === 'Rows';
|
|
386
|
-
const
|
|
1298
|
+
const table = this.table.nativeElement;
|
|
387
1299
|
const size = isRows ? 'offsetHeight' : 'offsetWidth';
|
|
388
|
-
|
|
389
|
-
|
|
1300
|
+
table.style[`gridTemplate${axis}`] = '';
|
|
1301
|
+
table.style[`gridTemplate${axis}`] = `${element[size]}px 1fr`;
|
|
390
1302
|
};
|
|
391
1303
|
this.handleScroll = (event) => {
|
|
392
1304
|
if (event.target === this.valuesTable.nativeElement) {
|
|
@@ -403,8 +1315,31 @@ class PivotGridComponent {
|
|
|
403
1315
|
}
|
|
404
1316
|
};
|
|
405
1317
|
validatePackage(packageMetadata);
|
|
1318
|
+
this.subs.add(this.localization.changes.subscribe(({ rtl }) => {
|
|
1319
|
+
this.rtl = rtl;
|
|
1320
|
+
this.direction = this.rtl ? 'rtl' : 'ltr';
|
|
1321
|
+
}));
|
|
406
1322
|
dataService.wrapper = hostEl.nativeElement;
|
|
407
1323
|
}
|
|
1324
|
+
get rightPositionClass() {
|
|
1325
|
+
var _a;
|
|
1326
|
+
return ((_a = this.configuratorSettings) === null || _a === void 0 ? void 0 : _a.position) === 'right';
|
|
1327
|
+
}
|
|
1328
|
+
get leftPositionClass() {
|
|
1329
|
+
var _a;
|
|
1330
|
+
return ((_a = this.configuratorSettings) === null || _a === void 0 ? void 0 : _a.position) === 'left';
|
|
1331
|
+
}
|
|
1332
|
+
get bottomPositionClass() {
|
|
1333
|
+
var _a;
|
|
1334
|
+
return ((_a = this.configuratorSettings) === null || _a === void 0 ? void 0 : _a.position) === 'bottom';
|
|
1335
|
+
}
|
|
1336
|
+
get topPositionClass() {
|
|
1337
|
+
var _a;
|
|
1338
|
+
return ((_a = this.configuratorSettings) === null || _a === void 0 ? void 0 : _a.position) === 'top';
|
|
1339
|
+
}
|
|
1340
|
+
get dir() {
|
|
1341
|
+
return this.direction;
|
|
1342
|
+
}
|
|
408
1343
|
/**
|
|
409
1344
|
* Specify the type, size and color of the PivotGrid's loader.
|
|
410
1345
|
*
|
|
@@ -420,6 +1355,15 @@ class PivotGridComponent {
|
|
|
420
1355
|
get loaderSettings() {
|
|
421
1356
|
return this._loaderSettings;
|
|
422
1357
|
}
|
|
1358
|
+
/**
|
|
1359
|
+
* @hidden
|
|
1360
|
+
*/
|
|
1361
|
+
get loadingText() {
|
|
1362
|
+
return this.localization.get('loading');
|
|
1363
|
+
}
|
|
1364
|
+
get configuratorSettings() {
|
|
1365
|
+
return this.configurator && Object.assign({}, DEFAULT_CONFIGURATOR_SETTINGS, this.configurator);
|
|
1366
|
+
}
|
|
423
1367
|
ngAfterViewInit() {
|
|
424
1368
|
if (isDocumentAvailable()) {
|
|
425
1369
|
this.zone.runOutsideAngular(() => {
|
|
@@ -442,67 +1386,277 @@ class PivotGridComponent {
|
|
|
442
1386
|
this.resizeObservers.forEach(o => o.disconnect());
|
|
443
1387
|
this.subs.unsubscribe();
|
|
444
1388
|
}
|
|
1389
|
+
/**
|
|
1390
|
+
* @hidden
|
|
1391
|
+
*/
|
|
1392
|
+
messageFor(localizationToken) {
|
|
1393
|
+
return this.localization.get(localizationToken);
|
|
1394
|
+
}
|
|
445
1395
|
}
|
|
446
|
-
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: i2
|
|
447
|
-
PivotGridComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: PivotGridComponent, selector: "kendo-pivotgrid", inputs: { loaderSettings: "loaderSettings", columnHeadersWidth: "columnHeadersWidth" }, host: { properties: { "class.k-
|
|
448
|
-
PivotGridDataService
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
1396
|
+
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: i2.LocalizationService }, { token: i3.ScrollbarWidthService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1397
|
+
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: [
|
|
1398
|
+
PivotGridDataService,
|
|
1399
|
+
LocalizationService,
|
|
1400
|
+
{
|
|
1401
|
+
provide: L10N_PREFIX,
|
|
1402
|
+
useValue: 'kendo.pivotgrid'
|
|
1403
|
+
}
|
|
1404
|
+
], 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: `
|
|
1405
|
+
<ng-container kendoPivotGridLocalizedMessages
|
|
1406
|
+
i18n-loading="kendo.pivotgrid.loading|The loading text"
|
|
1407
|
+
loading="Loading"
|
|
1408
|
+
|
|
1409
|
+
i18n-emptyCellLabel="kendo.pivotgrid.emptyCellLabel|The value of the aria-label attribute placed on the focusable empty cell element"
|
|
1410
|
+
emptyCellLabel="PivotGrid Empty Cell"
|
|
1411
|
+
|
|
1412
|
+
i18n-fieldMenuFilterItemLabel="kendo.pivotgrid.fieldMenuFilterItemLabel|The text content of the filter item in the column and row fields menu"
|
|
1413
|
+
fieldMenuFilterItemLabel="Filter"
|
|
1414
|
+
|
|
1415
|
+
i18n-fieldMenuSortAscendingItemLabel="kendo.pivotgrid.fieldMenuSortAscendingItemLabel|The text content of the sort ascending item in the column and row fields menu"
|
|
1416
|
+
fieldMenuSortAscendingItemLabel="Sort ascending"
|
|
1417
|
+
|
|
1418
|
+
i18n-fieldMenuSortDescendingItemLabel="kendo.pivotgrid.fieldMenuSortDescendingItemLabel|The text content of the sort descending item in the column and row fields menu"
|
|
1419
|
+
fieldMenuSortDescendingItemLabel="Sort descending"
|
|
1420
|
+
|
|
1421
|
+
i18n-filterInputLabel="kendo.pivotgrid.filterInputLabel|The label of the filter input"
|
|
1422
|
+
filterInputLabel="{{ '{fields} Filter' }}"
|
|
1423
|
+
|
|
1424
|
+
i18n-filterOperatorsDropDownLabel="kendo.pivotgrid.filterOperatorsDropDownLabel|The label of the filter operators DropDownList"
|
|
1425
|
+
filterOperatorsDropDownLabel="{{ '{fields} Filter Operators' }}"
|
|
1426
|
+
|
|
1427
|
+
i18n-filterEqOperator="kendo.pivotgrid.filterEqOperator|The text of the equal filter operator"
|
|
1428
|
+
filterEqOperator="Is equal to"
|
|
1429
|
+
|
|
1430
|
+
i18n-filterNotEqOperator="kendo.pivotgrid.filterNotEqOperator|The text of the not equal filter operator"
|
|
1431
|
+
filterNotEqOperator="Is not equal to"
|
|
1432
|
+
|
|
1433
|
+
i18n-filterIsNullOperator="kendo.pivotgrid.filterIsNullOperator|The text of the is null filter operator"
|
|
1434
|
+
filterIsNullOperator="Is null"
|
|
1435
|
+
|
|
1436
|
+
i18n-filterIsNotNullOperator="kendo.pivotgrid.filterIsNotNullOperator|The text of the is not null filter operator"
|
|
1437
|
+
filterIsNotNullOperator="Is not null"
|
|
1438
|
+
|
|
1439
|
+
i18n-filterIsEmptyOperator="kendo.pivotgrid.filterIsEmptyOperator|The text of the is empty filter operator"
|
|
1440
|
+
filterIsEmptyOperator="Is empty"
|
|
1441
|
+
|
|
1442
|
+
i18n-filterIsNotEmptyOperator="kendo.pivotgrid.filterIsNotEmptyOperator|The text of the is not empty filter operator"
|
|
1443
|
+
filterIsNotEmptyOperator="Is not empty"
|
|
1444
|
+
|
|
1445
|
+
i18n-filterStartsWithOperator="kendo.pivotgrid.filterStartsWithOperator|The text of the starts with filter operator"
|
|
1446
|
+
filterStartsWithOperator="Starts with"
|
|
1447
|
+
|
|
1448
|
+
i18n-filterContainsOperator="kendo.pivotgrid.filterContainsOperator|The text of the contains filter operator"
|
|
1449
|
+
filterContainsOperator="Contains"
|
|
1450
|
+
|
|
1451
|
+
i18n-filterNotContainsOperator="kendo.pivotgrid.filterNotContainsOperator|The text of the does not contain filter operator"
|
|
1452
|
+
filterNotContainsOperator="Does not contain"
|
|
1453
|
+
|
|
1454
|
+
i18n-filterEndsWithOperator="kendo.pivotgrid.filterEndsWithOperator|The text of the ends with filter operator"
|
|
1455
|
+
filterEndsWithOperator="Ends with"
|
|
1456
|
+
|
|
1457
|
+
i18n-filterFilterButton="kendo.pivotgrid.filterFilterButton|The text of the filter button"
|
|
1458
|
+
filterFilterButton="Filter"
|
|
1459
|
+
|
|
1460
|
+
i18n-filterClearButton="kendo.pivotgrid.filterClearButton|The text of the clear filter button"
|
|
1461
|
+
filterClearButton="Clear"
|
|
1462
|
+
|
|
1463
|
+
i18n-configuratorButtonText="kendo.pivotgrid.configuratorButtonText|The text content of the button that opens and closes the PivotGrid configurator"
|
|
1464
|
+
configuratorButtonText="Change Settings"
|
|
1465
|
+
|
|
1466
|
+
i18n-configuratorHeaderText="kendo.pivotgrid.configuratorHeaderText|The text content of the PivotGrid configurator title element"
|
|
1467
|
+
configuratorHeaderText="Settings"
|
|
1468
|
+
|
|
1469
|
+
i18n-configuratorFieldsText="kendo.pivotgrid.configuratorFieldsText|The text content of the PivotGrid configurator fields section title element"
|
|
1470
|
+
configuratorFieldsText="Fields"
|
|
1471
|
+
|
|
1472
|
+
i18n-configuratorColumnsText="kendo.pivotgrid.configuratorColumnsText|The text content of the PivotGrid configurator columns section title element"
|
|
1473
|
+
configuratorColumnsText="Columns"
|
|
1474
|
+
|
|
1475
|
+
i18n-configuratorRowsText="kendo.pivotgrid.configuratorRowsText|The text content of the PivotGrid configurator rows section title element"
|
|
1476
|
+
configuratorRowsText="Rows"
|
|
1477
|
+
|
|
1478
|
+
i18n-configuratorValuesText="kendo.pivotgrid.configuratorValuesText|The text content of the PivotGrid configurator values section title element"
|
|
1479
|
+
configuratorValuesText="Values"
|
|
1480
|
+
|
|
1481
|
+
i18n-configuratorCancelButtonText="kendo.pivotgrid.configuratorCancelButtonText|The text content of the PivotGrid configurator configurator Cancel button"
|
|
1482
|
+
configuratorCancelButtonText="Cancel"
|
|
1483
|
+
|
|
1484
|
+
i18n-configuratorApplyButtonText="kendo.pivotgrid.configuratorApplyButtonText|The text content of the PivotGrid configurator configurator Apply button"
|
|
1485
|
+
configuratorApplyButtonText="Apply"></ng-container>
|
|
1486
|
+
|
|
1487
|
+
<div #table class="k-pivotgrid">
|
|
1488
|
+
<span class="k-pivotgrid-empty-cell" [attr.aria-label]="messageFor('emptyCellLabel')"></span>
|
|
1489
|
+
<kendo-pivotgrid-table
|
|
1490
|
+
#colHeadersTable
|
|
1491
|
+
[colWidth]="columnHeadersWidth"
|
|
1492
|
+
class="k-pivotgrid-column-headers"
|
|
1493
|
+
tableType="columnHeader"></kendo-pivotgrid-table>
|
|
1494
|
+
<kendo-pivotgrid-table
|
|
1495
|
+
#rowHeadersTable
|
|
1496
|
+
class="k-pivotgrid-row-headers"
|
|
1497
|
+
tableType="rowHeader"></kendo-pivotgrid-table>
|
|
1498
|
+
<kendo-pivotgrid-table
|
|
1499
|
+
#valuesTable
|
|
1500
|
+
[colWidth]="columnHeadersWidth"
|
|
1501
|
+
class="k-pivotgrid-values"
|
|
1502
|
+
tableType="values"></kendo-pivotgrid-table>
|
|
1503
|
+
|
|
1504
|
+
<div *ngIf="loading" class="k-loader">
|
|
1505
|
+
<kendo-loader
|
|
1506
|
+
[type]="loaderSettings?.type"
|
|
1507
|
+
[themeColor]="loaderSettings?.themeColor"
|
|
1508
|
+
[size]="loaderSettings?.size"
|
|
1509
|
+
>
|
|
1510
|
+
</kendo-loader>
|
|
1511
|
+
<span class="k-loading-text">{{ loadingText }}</span>
|
|
1512
|
+
</div>
|
|
473
1513
|
</div>
|
|
474
|
-
|
|
1514
|
+
|
|
1515
|
+
<kendo-pivotgrid-configurator
|
|
1516
|
+
*ngIf="showConfigurator"
|
|
1517
|
+
[horizontal]="configuratorSettings.horizontal">
|
|
1518
|
+
</kendo-pivotgrid-configurator>
|
|
1519
|
+
|
|
1520
|
+
<div *ngIf="configurator"
|
|
1521
|
+
class="k-pivotgrid-configurator-button"
|
|
1522
|
+
(click)="showConfigurator = !showConfigurator">
|
|
1523
|
+
<span>{{ messageFor('configuratorButtonText') }}<span class="k-icon k-i-gear k-color-inherit"></span>
|
|
1524
|
+
</span>
|
|
1525
|
+
</div>
|
|
1526
|
+
`, 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: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
475
1527
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PivotGridComponent, decorators: [{
|
|
476
1528
|
type: Component,
|
|
477
1529
|
args: [{
|
|
478
1530
|
selector: 'kendo-pivotgrid',
|
|
479
1531
|
providers: [
|
|
480
|
-
PivotGridDataService
|
|
1532
|
+
PivotGridDataService,
|
|
1533
|
+
LocalizationService,
|
|
1534
|
+
{
|
|
1535
|
+
provide: L10N_PREFIX,
|
|
1536
|
+
useValue: 'kendo.pivotgrid'
|
|
1537
|
+
}
|
|
481
1538
|
],
|
|
482
1539
|
template: `
|
|
483
|
-
<
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
1540
|
+
<ng-container kendoPivotGridLocalizedMessages
|
|
1541
|
+
i18n-loading="kendo.pivotgrid.loading|The loading text"
|
|
1542
|
+
loading="Loading"
|
|
1543
|
+
|
|
1544
|
+
i18n-emptyCellLabel="kendo.pivotgrid.emptyCellLabel|The value of the aria-label attribute placed on the focusable empty cell element"
|
|
1545
|
+
emptyCellLabel="PivotGrid Empty Cell"
|
|
1546
|
+
|
|
1547
|
+
i18n-fieldMenuFilterItemLabel="kendo.pivotgrid.fieldMenuFilterItemLabel|The text content of the filter item in the column and row fields menu"
|
|
1548
|
+
fieldMenuFilterItemLabel="Filter"
|
|
1549
|
+
|
|
1550
|
+
i18n-fieldMenuSortAscendingItemLabel="kendo.pivotgrid.fieldMenuSortAscendingItemLabel|The text content of the sort ascending item in the column and row fields menu"
|
|
1551
|
+
fieldMenuSortAscendingItemLabel="Sort ascending"
|
|
1552
|
+
|
|
1553
|
+
i18n-fieldMenuSortDescendingItemLabel="kendo.pivotgrid.fieldMenuSortDescendingItemLabel|The text content of the sort descending item in the column and row fields menu"
|
|
1554
|
+
fieldMenuSortDescendingItemLabel="Sort descending"
|
|
1555
|
+
|
|
1556
|
+
i18n-filterInputLabel="kendo.pivotgrid.filterInputLabel|The label of the filter input"
|
|
1557
|
+
filterInputLabel="{{ '{fields} Filter' }}"
|
|
1558
|
+
|
|
1559
|
+
i18n-filterOperatorsDropDownLabel="kendo.pivotgrid.filterOperatorsDropDownLabel|The label of the filter operators DropDownList"
|
|
1560
|
+
filterOperatorsDropDownLabel="{{ '{fields} Filter Operators' }}"
|
|
1561
|
+
|
|
1562
|
+
i18n-filterEqOperator="kendo.pivotgrid.filterEqOperator|The text of the equal filter operator"
|
|
1563
|
+
filterEqOperator="Is equal to"
|
|
1564
|
+
|
|
1565
|
+
i18n-filterNotEqOperator="kendo.pivotgrid.filterNotEqOperator|The text of the not equal filter operator"
|
|
1566
|
+
filterNotEqOperator="Is not equal to"
|
|
1567
|
+
|
|
1568
|
+
i18n-filterIsNullOperator="kendo.pivotgrid.filterIsNullOperator|The text of the is null filter operator"
|
|
1569
|
+
filterIsNullOperator="Is null"
|
|
1570
|
+
|
|
1571
|
+
i18n-filterIsNotNullOperator="kendo.pivotgrid.filterIsNotNullOperator|The text of the is not null filter operator"
|
|
1572
|
+
filterIsNotNullOperator="Is not null"
|
|
1573
|
+
|
|
1574
|
+
i18n-filterIsEmptyOperator="kendo.pivotgrid.filterIsEmptyOperator|The text of the is empty filter operator"
|
|
1575
|
+
filterIsEmptyOperator="Is empty"
|
|
1576
|
+
|
|
1577
|
+
i18n-filterIsNotEmptyOperator="kendo.pivotgrid.filterIsNotEmptyOperator|The text of the is not empty filter operator"
|
|
1578
|
+
filterIsNotEmptyOperator="Is not empty"
|
|
1579
|
+
|
|
1580
|
+
i18n-filterStartsWithOperator="kendo.pivotgrid.filterStartsWithOperator|The text of the starts with filter operator"
|
|
1581
|
+
filterStartsWithOperator="Starts with"
|
|
1582
|
+
|
|
1583
|
+
i18n-filterContainsOperator="kendo.pivotgrid.filterContainsOperator|The text of the contains filter operator"
|
|
1584
|
+
filterContainsOperator="Contains"
|
|
1585
|
+
|
|
1586
|
+
i18n-filterNotContainsOperator="kendo.pivotgrid.filterNotContainsOperator|The text of the does not contain filter operator"
|
|
1587
|
+
filterNotContainsOperator="Does not contain"
|
|
1588
|
+
|
|
1589
|
+
i18n-filterEndsWithOperator="kendo.pivotgrid.filterEndsWithOperator|The text of the ends with filter operator"
|
|
1590
|
+
filterEndsWithOperator="Ends with"
|
|
1591
|
+
|
|
1592
|
+
i18n-filterFilterButton="kendo.pivotgrid.filterFilterButton|The text of the filter button"
|
|
1593
|
+
filterFilterButton="Filter"
|
|
1594
|
+
|
|
1595
|
+
i18n-filterClearButton="kendo.pivotgrid.filterClearButton|The text of the clear filter button"
|
|
1596
|
+
filterClearButton="Clear"
|
|
1597
|
+
|
|
1598
|
+
i18n-configuratorButtonText="kendo.pivotgrid.configuratorButtonText|The text content of the button that opens and closes the PivotGrid configurator"
|
|
1599
|
+
configuratorButtonText="Change Settings"
|
|
1600
|
+
|
|
1601
|
+
i18n-configuratorHeaderText="kendo.pivotgrid.configuratorHeaderText|The text content of the PivotGrid configurator title element"
|
|
1602
|
+
configuratorHeaderText="Settings"
|
|
1603
|
+
|
|
1604
|
+
i18n-configuratorFieldsText="kendo.pivotgrid.configuratorFieldsText|The text content of the PivotGrid configurator fields section title element"
|
|
1605
|
+
configuratorFieldsText="Fields"
|
|
1606
|
+
|
|
1607
|
+
i18n-configuratorColumnsText="kendo.pivotgrid.configuratorColumnsText|The text content of the PivotGrid configurator columns section title element"
|
|
1608
|
+
configuratorColumnsText="Columns"
|
|
1609
|
+
|
|
1610
|
+
i18n-configuratorRowsText="kendo.pivotgrid.configuratorRowsText|The text content of the PivotGrid configurator rows section title element"
|
|
1611
|
+
configuratorRowsText="Rows"
|
|
1612
|
+
|
|
1613
|
+
i18n-configuratorValuesText="kendo.pivotgrid.configuratorValuesText|The text content of the PivotGrid configurator values section title element"
|
|
1614
|
+
configuratorValuesText="Values"
|
|
1615
|
+
|
|
1616
|
+
i18n-configuratorCancelButtonText="kendo.pivotgrid.configuratorCancelButtonText|The text content of the PivotGrid configurator configurator Cancel button"
|
|
1617
|
+
configuratorCancelButtonText="Cancel"
|
|
1618
|
+
|
|
1619
|
+
i18n-configuratorApplyButtonText="kendo.pivotgrid.configuratorApplyButtonText|The text content of the PivotGrid configurator configurator Apply button"
|
|
1620
|
+
configuratorApplyButtonText="Apply"></ng-container>
|
|
1621
|
+
|
|
1622
|
+
<div #table class="k-pivotgrid">
|
|
1623
|
+
<span class="k-pivotgrid-empty-cell" [attr.aria-label]="messageFor('emptyCellLabel')"></span>
|
|
1624
|
+
<kendo-pivotgrid-table
|
|
1625
|
+
#colHeadersTable
|
|
1626
|
+
[colWidth]="columnHeadersWidth"
|
|
1627
|
+
class="k-pivotgrid-column-headers"
|
|
1628
|
+
tableType="columnHeader"></kendo-pivotgrid-table>
|
|
1629
|
+
<kendo-pivotgrid-table
|
|
1630
|
+
#rowHeadersTable
|
|
1631
|
+
class="k-pivotgrid-row-headers"
|
|
1632
|
+
tableType="rowHeader"></kendo-pivotgrid-table>
|
|
1633
|
+
<kendo-pivotgrid-table
|
|
1634
|
+
#valuesTable
|
|
1635
|
+
[colWidth]="columnHeadersWidth"
|
|
1636
|
+
class="k-pivotgrid-values"
|
|
1637
|
+
tableType="values"></kendo-pivotgrid-table>
|
|
1638
|
+
|
|
1639
|
+
<div *ngIf="loading" class="k-loader">
|
|
1640
|
+
<kendo-loader
|
|
1641
|
+
[type]="loaderSettings?.type"
|
|
1642
|
+
[themeColor]="loaderSettings?.themeColor"
|
|
1643
|
+
[size]="loaderSettings?.size"
|
|
1644
|
+
>
|
|
1645
|
+
</kendo-loader>
|
|
1646
|
+
<span class="k-loading-text">{{ loadingText }}</span>
|
|
1647
|
+
</div>
|
|
1648
|
+
</div>
|
|
1649
|
+
|
|
1650
|
+
<kendo-pivotgrid-configurator
|
|
1651
|
+
*ngIf="showConfigurator"
|
|
1652
|
+
[horizontal]="configuratorSettings.horizontal">
|
|
1653
|
+
</kendo-pivotgrid-configurator>
|
|
1654
|
+
|
|
1655
|
+
<div *ngIf="configurator"
|
|
1656
|
+
class="k-pivotgrid-configurator-button"
|
|
1657
|
+
(click)="showConfigurator = !showConfigurator">
|
|
1658
|
+
<span>{{ messageFor('configuratorButtonText') }}<span class="k-icon k-i-gear k-color-inherit"></span>
|
|
1659
|
+
</span>
|
|
506
1660
|
</div>
|
|
507
1661
|
`,
|
|
508
1662
|
styles: [`
|
|
@@ -515,9 +1669,27 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
515
1669
|
}
|
|
516
1670
|
`]
|
|
517
1671
|
}]
|
|
518
|
-
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.NgZone }, { type: PivotGridDataService }, { type: i2
|
|
1672
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.NgZone }, { type: PivotGridDataService }, { type: i2.LocalizationService }, { type: i3.ScrollbarWidthService }]; }, propDecorators: { hostClass: [{
|
|
519
1673
|
type: HostBinding,
|
|
520
|
-
args: ['class.k-
|
|
1674
|
+
args: ['class.k-d-flex']
|
|
1675
|
+
}, {
|
|
1676
|
+
type: HostBinding,
|
|
1677
|
+
args: ['class.k-pos-relative']
|
|
1678
|
+
}], rightPositionClass: [{
|
|
1679
|
+
type: HostBinding,
|
|
1680
|
+
args: ['class.k-flex-row']
|
|
1681
|
+
}], leftPositionClass: [{
|
|
1682
|
+
type: HostBinding,
|
|
1683
|
+
args: ['class.k-flex-row-reverse']
|
|
1684
|
+
}], bottomPositionClass: [{
|
|
1685
|
+
type: HostBinding,
|
|
1686
|
+
args: ['class.k-flex-column']
|
|
1687
|
+
}], topPositionClass: [{
|
|
1688
|
+
type: HostBinding,
|
|
1689
|
+
args: ['class.k-flex-column-reverse']
|
|
1690
|
+
}], dir: [{
|
|
1691
|
+
type: HostBinding,
|
|
1692
|
+
args: ['attr.dir']
|
|
521
1693
|
}], ariaRole: [{
|
|
522
1694
|
type: HostBinding,
|
|
523
1695
|
args: ['attr.role']
|
|
@@ -530,12 +1702,56 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
530
1702
|
}], valuesTable: [{
|
|
531
1703
|
type: ViewChild,
|
|
532
1704
|
args: ['valuesTable', { read: ElementRef }]
|
|
1705
|
+
}], table: [{
|
|
1706
|
+
type: ViewChild,
|
|
1707
|
+
args: ['table', { read: ElementRef }]
|
|
533
1708
|
}], loaderSettings: [{
|
|
534
1709
|
type: Input
|
|
1710
|
+
}], configurator: [{
|
|
1711
|
+
type: Input
|
|
535
1712
|
}], columnHeadersWidth: [{
|
|
536
1713
|
type: Input
|
|
537
1714
|
}] } });
|
|
538
1715
|
|
|
1716
|
+
/**
|
|
1717
|
+
* @hidden
|
|
1718
|
+
*/
|
|
1719
|
+
class PivotGridState {
|
|
1720
|
+
constructor(columnAxes, rowAxes, measureAxes) {
|
|
1721
|
+
this.columnAxes = columnAxes;
|
|
1722
|
+
this.rowAxes = rowAxes;
|
|
1723
|
+
this.measureAxes = measureAxes;
|
|
1724
|
+
}
|
|
1725
|
+
}
|
|
1726
|
+
|
|
1727
|
+
/**
|
|
1728
|
+
* The event data for the ExpandChangeEvent
|
|
1729
|
+
*/
|
|
1730
|
+
class ExpandChangeEvent extends PreventableEvent {
|
|
1731
|
+
/**
|
|
1732
|
+
* @hidden
|
|
1733
|
+
*/
|
|
1734
|
+
constructor(args) {
|
|
1735
|
+
super();
|
|
1736
|
+
Object.assign(this, args);
|
|
1737
|
+
}
|
|
1738
|
+
}
|
|
1739
|
+
;
|
|
1740
|
+
|
|
1741
|
+
/**
|
|
1742
|
+
* The event data for the ConfigurationChangeEvent
|
|
1743
|
+
*/
|
|
1744
|
+
class ConfigurationChangeEvent extends PreventableEvent {
|
|
1745
|
+
/**
|
|
1746
|
+
* @hidden
|
|
1747
|
+
*/
|
|
1748
|
+
constructor(args) {
|
|
1749
|
+
super();
|
|
1750
|
+
Object.assign(this, args);
|
|
1751
|
+
}
|
|
1752
|
+
}
|
|
1753
|
+
;
|
|
1754
|
+
|
|
539
1755
|
/**
|
|
540
1756
|
* @hidden
|
|
541
1757
|
* A directive which binds the PivotGrid to an array of objects.
|
|
@@ -556,11 +1772,28 @@ class PivotBaseBindingDirective {
|
|
|
556
1772
|
* Represents the measure axes configuration of the PivotGrid.
|
|
557
1773
|
*/
|
|
558
1774
|
this.measureAxes = [];
|
|
559
|
-
|
|
1775
|
+
/**
|
|
1776
|
+
* Fires each time a row or column header gets expanded or collapsed by the end user. The event is preventable.
|
|
1777
|
+
* If you prevent the event, the PivotGrid will not be rerendered with the new state, resulting from the end user interaction.
|
|
1778
|
+
*/
|
|
1779
|
+
this.expandChange = new EventEmitter();
|
|
1780
|
+
/**
|
|
1781
|
+
* Fires when the Configurator Apply button is pressed. The event is preventable.
|
|
1782
|
+
* If you prevent the event, the PivotGrid will not be rerendered with the new state, resulting from the configuration changes, applied through the configurator interface.
|
|
1783
|
+
*/
|
|
1784
|
+
this.configurationChange = new EventEmitter();
|
|
1785
|
+
this.subs = new Subscription();
|
|
1786
|
+
}
|
|
1787
|
+
/**
|
|
1788
|
+
* @hidden
|
|
1789
|
+
*/
|
|
1790
|
+
get state() {
|
|
1791
|
+
return new PivotGridState(this.columnAxes, this.rowAxes, this.measureAxes);
|
|
560
1792
|
}
|
|
561
1793
|
ngOnInit() {
|
|
562
|
-
this.loadData();
|
|
563
|
-
this.
|
|
1794
|
+
this.loadData(this.state);
|
|
1795
|
+
this.loadFields();
|
|
1796
|
+
this.subs.add(this.dataService.expandedStateChange.subscribe((state) => {
|
|
564
1797
|
this.zone.run(() => {
|
|
565
1798
|
const isCol = state.tableType === 'columnHeader';
|
|
566
1799
|
const axes = isCol ? 'columnAxes' : 'rowAxes';
|
|
@@ -568,10 +1801,28 @@ class PivotBaseBindingDirective {
|
|
|
568
1801
|
const tree = toTree((isCol ? this.dataService.columns : this.dataService.rows || []).slice());
|
|
569
1802
|
this.updateHeaders(axes, tree, state.cell.path);
|
|
570
1803
|
});
|
|
571
|
-
});
|
|
1804
|
+
}));
|
|
1805
|
+
this.subs.add(this.dataService.configuratorFieldChange.subscribe((state) => {
|
|
1806
|
+
this.zone.run(() => {
|
|
1807
|
+
if (hasObservers(this.configurationChange)) {
|
|
1808
|
+
const event = new ConfigurationChangeEvent(state);
|
|
1809
|
+
this.configurationChange.emit(event);
|
|
1810
|
+
if (event.isDefaultPrevented()) {
|
|
1811
|
+
return;
|
|
1812
|
+
}
|
|
1813
|
+
}
|
|
1814
|
+
this.dataService.configuredFields.next({
|
|
1815
|
+
columnAxes: state.columnAxes,
|
|
1816
|
+
rowAxes: state.rowAxes,
|
|
1817
|
+
measureAxes: state.measureAxes
|
|
1818
|
+
});
|
|
1819
|
+
this.loadData(state);
|
|
1820
|
+
});
|
|
1821
|
+
}));
|
|
1822
|
+
this.dataService.directive = this;
|
|
572
1823
|
}
|
|
573
1824
|
ngOnDestroy() {
|
|
574
|
-
this.
|
|
1825
|
+
this.subs.unsubscribe();
|
|
575
1826
|
}
|
|
576
1827
|
updateDataServiceFields() {
|
|
577
1828
|
this.dataService.normalizedData = this.dataState.data;
|
|
@@ -579,6 +1830,14 @@ class PivotBaseBindingDirective {
|
|
|
579
1830
|
this.dataService.columns = this.dataState.columns;
|
|
580
1831
|
this.dataService.updateRowsAndCols();
|
|
581
1832
|
}
|
|
1833
|
+
updateConfiguratorFields() {
|
|
1834
|
+
this.dataService.fields.next(this.configuratorFields);
|
|
1835
|
+
this.dataService.configuredFields.next({
|
|
1836
|
+
columnAxes: this.columnAxes,
|
|
1837
|
+
rowAxes: this.rowAxes,
|
|
1838
|
+
measureAxes: this.measureAxes
|
|
1839
|
+
});
|
|
1840
|
+
}
|
|
582
1841
|
updateHeaders(axes, tree, path) {
|
|
583
1842
|
// Action to determine expand/collapse state
|
|
584
1843
|
const action = {
|
|
@@ -587,15 +1846,23 @@ class PivotBaseBindingDirective {
|
|
|
587
1846
|
};
|
|
588
1847
|
// The `headersReducer` method is responsible for udpating
|
|
589
1848
|
// the expanded state based on the toggle action (expand/collapse)
|
|
590
|
-
const newHeaders = headersReducer(this[axes].slice(), Object.assign(Object.assign({}, action), { tree }));
|
|
591
1849
|
// Update axes and reload data
|
|
1850
|
+
const newHeaders = headersReducer(this[axes].slice(), Object.assign(Object.assign({}, action), { tree }));
|
|
1851
|
+
if (hasObservers(this.expandChange)) {
|
|
1852
|
+
const newState = Object.assign(Object.assign({}, this.state), { [axes]: newHeaders });
|
|
1853
|
+
const event = new ExpandChangeEvent(newState);
|
|
1854
|
+
this.expandChange.emit(event);
|
|
1855
|
+
if (event.isDefaultPrevented()) {
|
|
1856
|
+
return;
|
|
1857
|
+
}
|
|
1858
|
+
}
|
|
592
1859
|
this[axes] = newHeaders;
|
|
593
|
-
this.loadData();
|
|
1860
|
+
this.loadData(this.state);
|
|
594
1861
|
}
|
|
595
1862
|
;
|
|
596
1863
|
}
|
|
597
1864
|
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 });
|
|
598
|
-
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" }, ngImport: i0 });
|
|
1865
|
+
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" }, ngImport: i0 });
|
|
599
1866
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PivotBaseBindingDirective, decorators: [{
|
|
600
1867
|
type: Directive,
|
|
601
1868
|
args: [{
|
|
@@ -607,6 +1874,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
607
1874
|
type: Input
|
|
608
1875
|
}], measureAxes: [{
|
|
609
1876
|
type: Input
|
|
1877
|
+
}], expandChange: [{
|
|
1878
|
+
type: Output
|
|
1879
|
+
}], configurationChange: [{
|
|
1880
|
+
type: Output
|
|
610
1881
|
}] } });
|
|
611
1882
|
|
|
612
1883
|
const dataField = 'aggregate';
|
|
@@ -619,26 +1890,38 @@ const stringSeparator = '&';
|
|
|
619
1890
|
class PivotLocalBindingDirective extends PivotBaseBindingDirective {
|
|
620
1891
|
constructor(dataService, zone) {
|
|
621
1892
|
super(dataService, zone);
|
|
1893
|
+
this.type = 'local';
|
|
622
1894
|
this.createAxisSettings = (key) => (Object.assign({ key }, this.dimensions[key]));
|
|
623
1895
|
}
|
|
624
1896
|
ngOnChanges(changes) {
|
|
625
1897
|
if (anyChanged(['data', 'dimensions', 'columnAxes', 'rowAxes', 'measureAxes', 'measures'], changes)) {
|
|
626
|
-
this.loadData();
|
|
1898
|
+
this.loadData(this.state);
|
|
627
1899
|
}
|
|
628
1900
|
}
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
1901
|
+
/**
|
|
1902
|
+
* @hidden
|
|
1903
|
+
*/
|
|
1904
|
+
fetchChildren(node) {
|
|
1905
|
+
return node.children;
|
|
1906
|
+
}
|
|
1907
|
+
loadFields() {
|
|
1908
|
+
this.configuratorFields = createFlatSchemaDimensions(this.dimensions, this.measures);
|
|
1909
|
+
this.updateConfiguratorFields();
|
|
1910
|
+
}
|
|
1911
|
+
loadData(state) {
|
|
1912
|
+
const { columnAxes, rowAxes, measureAxes } = state;
|
|
1913
|
+
const rootColumnAxes = this.getRootAxes(columnAxes);
|
|
1914
|
+
const rootRowAxes = this.getRootAxes(rowAxes);
|
|
632
1915
|
const columnSettings = rootColumnAxes.split(stringSeparator).map(this.createAxisSettings);
|
|
633
1916
|
const rowSettings = rootRowAxes.split(stringSeparator).map(this.createAxisSettings);
|
|
634
|
-
const measuresSettings =
|
|
1917
|
+
const measuresSettings = measureAxes.map(m => this.measures.find(meas => String(meas.name) === String(m.name))).filter(Boolean);
|
|
635
1918
|
const dataTree = createDataTree(this.data, rowSettings, columnSettings, measuresSettings, bindingFields);
|
|
636
1919
|
this.dataState = createLocalDataState({
|
|
637
1920
|
dataTree,
|
|
638
1921
|
rowSettings,
|
|
639
1922
|
columnSettings,
|
|
640
|
-
rowAxes:
|
|
641
|
-
columnAxes:
|
|
1923
|
+
rowAxes: rowAxes,
|
|
1924
|
+
columnAxes: columnAxes,
|
|
642
1925
|
measures: measuresSettings,
|
|
643
1926
|
sort: [],
|
|
644
1927
|
fields: bindingFields
|
|
@@ -672,22 +1955,25 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
672
1955
|
class PivotOLAPBindingDirective extends PivotBaseBindingDirective {
|
|
673
1956
|
constructor(dataService, zone) {
|
|
674
1957
|
super(dataService, zone);
|
|
1958
|
+
this.type = 'olap';
|
|
675
1959
|
}
|
|
676
1960
|
ngOnChanges(changes) {
|
|
677
1961
|
if (anyChanged(['url', 'cube', 'catalog', 'columnAxes', 'rowAxes', 'measureAxes'], changes)) {
|
|
678
|
-
this.loadData();
|
|
1962
|
+
this.loadData(this.state);
|
|
1963
|
+
this.loadFields();
|
|
679
1964
|
}
|
|
680
1965
|
}
|
|
681
|
-
loadData() {
|
|
1966
|
+
loadData(state) {
|
|
1967
|
+
const { columnAxes, rowAxes, measureAxes } = state;
|
|
682
1968
|
this.dataService.loading.next(true);
|
|
683
1969
|
const options = {
|
|
684
1970
|
connection: {
|
|
685
1971
|
catalog: this.catalog,
|
|
686
1972
|
cube: this.cube
|
|
687
1973
|
},
|
|
688
|
-
columnAxes:
|
|
689
|
-
rowAxes:
|
|
690
|
-
measureAxes:
|
|
1974
|
+
columnAxes: columnAxes,
|
|
1975
|
+
rowAxes: rowAxes,
|
|
1976
|
+
measureAxes: measureAxes
|
|
691
1977
|
};
|
|
692
1978
|
fetchData({ url: this.url }, JSON.parse(JSON.stringify(options)))
|
|
693
1979
|
.then(createDataState)
|
|
@@ -697,6 +1983,127 @@ class PivotOLAPBindingDirective extends PivotBaseBindingDirective {
|
|
|
697
1983
|
this.dataService.loading.next(false);
|
|
698
1984
|
});
|
|
699
1985
|
}
|
|
1986
|
+
loadFields() {
|
|
1987
|
+
const options = {
|
|
1988
|
+
connection: {
|
|
1989
|
+
catalog: this.catalog,
|
|
1990
|
+
cube: this.cube
|
|
1991
|
+
},
|
|
1992
|
+
restrictions: {
|
|
1993
|
+
catalogName: this.catalog,
|
|
1994
|
+
cubeName: this.cube
|
|
1995
|
+
},
|
|
1996
|
+
command: 'schemaDimensions'
|
|
1997
|
+
};
|
|
1998
|
+
fetchDiscover({ url: this.url }, options)
|
|
1999
|
+
.then((newFields) => {
|
|
2000
|
+
addKPI(newFields);
|
|
2001
|
+
this.configuratorFields = newFields;
|
|
2002
|
+
this.updateConfiguratorFields();
|
|
2003
|
+
});
|
|
2004
|
+
}
|
|
2005
|
+
updateFields(event, fields) {
|
|
2006
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2007
|
+
const newFields = fields.slice();
|
|
2008
|
+
const field = this.getField(newFields, event);
|
|
2009
|
+
if (field && field.uniqueName === '[KPIs]') {
|
|
2010
|
+
const KPIs = this.normalizeKPIs(yield this.loadKPIs());
|
|
2011
|
+
field.children = KPIs;
|
|
2012
|
+
}
|
|
2013
|
+
else if (field && field.type === 'kpi') {
|
|
2014
|
+
field.children = buildKPIMeasures(field);
|
|
2015
|
+
}
|
|
2016
|
+
else if (field && !field.children) {
|
|
2017
|
+
const additionalFields = yield this.loadAvailableFields(field);
|
|
2018
|
+
field.children = additionalFields;
|
|
2019
|
+
}
|
|
2020
|
+
return field === null || field === void 0 ? void 0 : field.children;
|
|
2021
|
+
});
|
|
2022
|
+
}
|
|
2023
|
+
/**
|
|
2024
|
+
* @hidden
|
|
2025
|
+
*/
|
|
2026
|
+
fetchChildren(event, fields) {
|
|
2027
|
+
return this.updateFields(event, fields);
|
|
2028
|
+
}
|
|
2029
|
+
normalizeKPIs(data) {
|
|
2030
|
+
for (let idx = 0, length = data.length; idx < length; idx++) {
|
|
2031
|
+
data[idx].uniqueName = data[idx].name;
|
|
2032
|
+
data[idx].type = 'kpi';
|
|
2033
|
+
}
|
|
2034
|
+
return data;
|
|
2035
|
+
}
|
|
2036
|
+
;
|
|
2037
|
+
getField(nodes = [], target) {
|
|
2038
|
+
for (let i = 0; i < nodes.length; i++) {
|
|
2039
|
+
const node = nodes[i];
|
|
2040
|
+
if (node.uniqueName === target.uniqueName) {
|
|
2041
|
+
return node;
|
|
2042
|
+
}
|
|
2043
|
+
let result = this.getField(node.children, target);
|
|
2044
|
+
if (result !== null) {
|
|
2045
|
+
return result;
|
|
2046
|
+
}
|
|
2047
|
+
}
|
|
2048
|
+
return null;
|
|
2049
|
+
}
|
|
2050
|
+
;
|
|
2051
|
+
loadKPIs() {
|
|
2052
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2053
|
+
const options = {
|
|
2054
|
+
connection: {
|
|
2055
|
+
catalog: this.catalog,
|
|
2056
|
+
cube: this.cube
|
|
2057
|
+
},
|
|
2058
|
+
restrictions: {
|
|
2059
|
+
catalogName: this.catalog,
|
|
2060
|
+
cubeName: this.cube
|
|
2061
|
+
},
|
|
2062
|
+
command: 'schemaKPIs'
|
|
2063
|
+
};
|
|
2064
|
+
return fetchDiscover({ url: this.url }, options);
|
|
2065
|
+
});
|
|
2066
|
+
}
|
|
2067
|
+
;
|
|
2068
|
+
loadAvailableFields(field) {
|
|
2069
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2070
|
+
let command;
|
|
2071
|
+
let dimensionUniqueName;
|
|
2072
|
+
let hierarchyUniqueName;
|
|
2073
|
+
let levelUniqueName;
|
|
2074
|
+
let memberUniqueName;
|
|
2075
|
+
let treeOp;
|
|
2076
|
+
if (field.type === 2) {
|
|
2077
|
+
command = 'schemaMeasures';
|
|
2078
|
+
}
|
|
2079
|
+
else if (field.dimensionUniqueName) {
|
|
2080
|
+
command = 'schemaLevels';
|
|
2081
|
+
hierarchyUniqueName = field.uniqueName;
|
|
2082
|
+
}
|
|
2083
|
+
else {
|
|
2084
|
+
command = 'schemaHierarchies';
|
|
2085
|
+
dimensionUniqueName = field.uniqueName;
|
|
2086
|
+
}
|
|
2087
|
+
const options = {
|
|
2088
|
+
connection: {
|
|
2089
|
+
catalog: this.catalog,
|
|
2090
|
+
cube: this.cube
|
|
2091
|
+
},
|
|
2092
|
+
restrictions: {
|
|
2093
|
+
catalogName: this.catalog,
|
|
2094
|
+
cubeName: this.cube,
|
|
2095
|
+
hierarchyUniqueName,
|
|
2096
|
+
dimensionUniqueName,
|
|
2097
|
+
levelUniqueName,
|
|
2098
|
+
memberUniqueName,
|
|
2099
|
+
treeOp
|
|
2100
|
+
},
|
|
2101
|
+
command
|
|
2102
|
+
};
|
|
2103
|
+
return fetchDiscover({ url: this.url }, options);
|
|
2104
|
+
});
|
|
2105
|
+
}
|
|
2106
|
+
;
|
|
700
2107
|
}
|
|
701
2108
|
PivotOLAPBindingDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PivotOLAPBindingDirective, deps: [{ token: PivotGridDataService }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Directive });
|
|
702
2109
|
PivotOLAPBindingDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: PivotOLAPBindingDirective, selector: "[kendoPivotOLAPBinding]", inputs: { url: "url", cube: "cube", catalog: "catalog" }, exportAs: ["kendoPivotOLAPBinding"], usesInheritance: true, usesOnChanges: true, ngImport: i0 });
|
|
@@ -714,17 +2121,68 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
714
2121
|
type: Input
|
|
715
2122
|
}] } });
|
|
716
2123
|
|
|
2124
|
+
/**
|
|
2125
|
+
* Custom component messages override default component messages
|
|
2126
|
+
* ([see example]({% slug globalization_pivotgrid %}#toc-localization)).
|
|
2127
|
+
*/
|
|
2128
|
+
class CustomMessagesComponent extends PivotGridMessages {
|
|
2129
|
+
constructor(service) {
|
|
2130
|
+
super();
|
|
2131
|
+
this.service = service;
|
|
2132
|
+
}
|
|
2133
|
+
get override() {
|
|
2134
|
+
return true;
|
|
2135
|
+
}
|
|
2136
|
+
}
|
|
2137
|
+
CustomMessagesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: CustomMessagesComponent, deps: [{ token: i2.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
2138
|
+
CustomMessagesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: CustomMessagesComponent, selector: "kendo-pivotgrid-messages", providers: [
|
|
2139
|
+
{
|
|
2140
|
+
provide: PivotGridMessages,
|
|
2141
|
+
useExisting: forwardRef(() => CustomMessagesComponent)
|
|
2142
|
+
}
|
|
2143
|
+
], usesInheritance: true, ngImport: i0, template: ``, isInline: true });
|
|
2144
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: CustomMessagesComponent, decorators: [{
|
|
2145
|
+
type: Component,
|
|
2146
|
+
args: [{
|
|
2147
|
+
providers: [
|
|
2148
|
+
{
|
|
2149
|
+
provide: PivotGridMessages,
|
|
2150
|
+
useExisting: forwardRef(() => CustomMessagesComponent)
|
|
2151
|
+
}
|
|
2152
|
+
],
|
|
2153
|
+
selector: 'kendo-pivotgrid-messages',
|
|
2154
|
+
template: ``
|
|
2155
|
+
}]
|
|
2156
|
+
}], ctorParameters: function () { return [{ type: i2.LocalizationService }]; } });
|
|
2157
|
+
|
|
717
2158
|
const IMPORTED_MODULES = [
|
|
718
2159
|
CommonModule,
|
|
719
2160
|
EventsModule,
|
|
720
|
-
IndicatorsModule
|
|
2161
|
+
IndicatorsModule,
|
|
2162
|
+
ButtonsModule,
|
|
2163
|
+
TreeViewModule,
|
|
2164
|
+
InputsModule,
|
|
2165
|
+
DraggableModule
|
|
721
2166
|
];
|
|
722
2167
|
const DECLARATIONS = [
|
|
2168
|
+
PivotGridComponent,
|
|
2169
|
+
PivotGridTableComponent,
|
|
2170
|
+
PivotGridConfiguratorComponent,
|
|
2171
|
+
PivotGridCellDirective,
|
|
2172
|
+
PivotLocalBindingDirective,
|
|
2173
|
+
PivotOLAPBindingDirective,
|
|
2174
|
+
DraggableChipDirective,
|
|
2175
|
+
DropTargetDirective,
|
|
2176
|
+
LocalizedMessagesDirective,
|
|
2177
|
+
CustomMessagesComponent
|
|
2178
|
+
];
|
|
2179
|
+
const EXPORTS = [
|
|
723
2180
|
PivotGridComponent,
|
|
724
2181
|
PivotGridTableComponent,
|
|
725
2182
|
PivotGridCellDirective,
|
|
726
2183
|
PivotLocalBindingDirective,
|
|
727
|
-
PivotOLAPBindingDirective
|
|
2184
|
+
PivotOLAPBindingDirective,
|
|
2185
|
+
CustomMessagesComponent
|
|
728
2186
|
];
|
|
729
2187
|
/**
|
|
730
2188
|
* Sample module
|
|
@@ -734,29 +2192,32 @@ class PivotGridModule {
|
|
|
734
2192
|
PivotGridModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PivotGridModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
735
2193
|
PivotGridModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PivotGridModule, declarations: [PivotGridComponent,
|
|
736
2194
|
PivotGridTableComponent,
|
|
2195
|
+
PivotGridConfiguratorComponent,
|
|
737
2196
|
PivotGridCellDirective,
|
|
738
2197
|
PivotLocalBindingDirective,
|
|
739
|
-
PivotOLAPBindingDirective
|
|
2198
|
+
PivotOLAPBindingDirective,
|
|
2199
|
+
DraggableChipDirective,
|
|
2200
|
+
DropTargetDirective,
|
|
2201
|
+
LocalizedMessagesDirective,
|
|
2202
|
+
CustomMessagesComponent], imports: [CommonModule,
|
|
740
2203
|
EventsModule,
|
|
741
|
-
IndicatorsModule
|
|
2204
|
+
IndicatorsModule,
|
|
2205
|
+
ButtonsModule,
|
|
2206
|
+
TreeViewModule,
|
|
2207
|
+
InputsModule,
|
|
2208
|
+
DraggableModule], exports: [PivotGridComponent,
|
|
742
2209
|
PivotGridTableComponent,
|
|
743
2210
|
PivotGridCellDirective,
|
|
744
2211
|
PivotLocalBindingDirective,
|
|
745
|
-
PivotOLAPBindingDirective
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
useValue: 'kendo.pivotgrid'
|
|
749
|
-
}], imports: [[...IMPORTED_MODULES]] });
|
|
2212
|
+
PivotOLAPBindingDirective,
|
|
2213
|
+
CustomMessagesComponent] });
|
|
2214
|
+
PivotGridModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PivotGridModule, imports: [[...IMPORTED_MODULES]] });
|
|
750
2215
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PivotGridModule, decorators: [{
|
|
751
2216
|
type: NgModule,
|
|
752
2217
|
args: [{
|
|
753
2218
|
imports: [...IMPORTED_MODULES],
|
|
754
2219
|
declarations: [...DECLARATIONS],
|
|
755
|
-
exports: [...
|
|
756
|
-
providers: [{
|
|
757
|
-
provide: L10N_PREFIX,
|
|
758
|
-
useValue: 'kendo.pivotgrid'
|
|
759
|
-
}]
|
|
2220
|
+
exports: [...EXPORTS]
|
|
760
2221
|
}]
|
|
761
2222
|
}] });
|
|
762
2223
|
|
|
@@ -764,5 +2225,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
764
2225
|
* Generated bundle index. Do not edit.
|
|
765
2226
|
*/
|
|
766
2227
|
|
|
767
|
-
export { PivotGridCellDirective, PivotGridComponent, PivotGridModule, PivotGridTableComponent, PivotLocalBindingDirective, PivotOLAPBindingDirective };
|
|
2228
|
+
export { ConfigurationChangeEvent, CustomMessagesComponent, DraggableChipDirective, DropTargetDirective, ExpandChangeEvent, PivotGridCellDirective, PivotGridComponent, PivotGridConfiguratorComponent, PivotGridModule, PivotGridTableComponent, PivotLocalBindingDirective, PivotOLAPBindingDirective };
|
|
768
2229
|
|