@progress/kendo-angular-pivotgrid 0.2.0-dev.202208181226 → 0.2.0-dev.202208190706
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 +13 -4
- package/esm2015/configurator/configurator.component.js +500 -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 +26 -3
- package/esm2015/localization/custom-messages.component.js +41 -0
- package/esm2015/localization/localized-messages.directive.js +36 -0
- package/esm2015/localization/messages.js +77 -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 +360 -63
- package/esm2015/pivotgrid.module.js +43 -16
- package/esm2015/rendering/pivotgrid-cell.directive.js +6 -3
- package/esm2015/rendering/pivotgrid-table.component.js +29 -10
- package/esm2015/util.js +86 -0
- package/fesm2015/kendo-angular-pivotgrid.js +1696 -156
- package/localization/custom-messages.component.d.ts +18 -0
- package/localization/localized-messages.directive.d.ts +16 -0
- package/localization/messages.d.ts +172 -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 +28 -3
- package/pivotgrid.module.d.ts +15 -7
- package/rendering/pivotgrid-table.component.d.ts +3 -2
- package/util.d.ts +31 -0
|
@@ -11,26 +11,35 @@ import { fromEvent, Subscription } from 'rxjs';
|
|
|
11
11
|
import { syncScroll, syncWheel } from './util';
|
|
12
12
|
// eslint-disable-next-line rxjs/ban-operators
|
|
13
13
|
import { merge } from 'rxjs/operators';
|
|
14
|
+
import { L10N_PREFIX, LocalizationService } from '@progress/kendo-angular-l10n';
|
|
14
15
|
import * as i0 from "@angular/core";
|
|
15
16
|
import * as i1 from "./data-binding/pivotgrid-data.service";
|
|
16
|
-
import * as i2 from "@progress/kendo-angular-
|
|
17
|
-
import * as i3 from "
|
|
18
|
-
import * as i4 from "
|
|
19
|
-
import * as i5 from "@angular
|
|
17
|
+
import * as i2 from "@progress/kendo-angular-l10n";
|
|
18
|
+
import * as i3 from "@progress/kendo-angular-common";
|
|
19
|
+
import * as i4 from "./rendering/pivotgrid-table.component";
|
|
20
|
+
import * as i5 from "@progress/kendo-angular-indicators";
|
|
21
|
+
import * as i6 from "./configurator/configurator.component";
|
|
22
|
+
import * as i7 from "./localization/localized-messages.directive";
|
|
23
|
+
import * as i8 from "@angular/common";
|
|
20
24
|
const DEFAULT_LOADER_SETTINGS = {
|
|
21
25
|
type: 'converging-spinner',
|
|
22
26
|
themeColor: 'primary',
|
|
23
27
|
size: 'large'
|
|
24
28
|
};
|
|
29
|
+
const DEFAULT_CONFIGURATOR_SETTINGS = {
|
|
30
|
+
position: 'right',
|
|
31
|
+
horizontal: false
|
|
32
|
+
};
|
|
25
33
|
/**
|
|
26
34
|
* Represents the Kendo UI PivotGrid component for Angular.
|
|
27
35
|
*/
|
|
28
36
|
export class PivotGridComponent {
|
|
29
|
-
constructor(hostEl, zone, dataService, _scrollbarWidthService) {
|
|
30
|
-
this.hostEl = hostEl;
|
|
37
|
+
constructor(hostEl, zone, dataService, localization, _scrollbarWidthService) {
|
|
31
38
|
this.zone = zone;
|
|
32
39
|
this.dataService = dataService;
|
|
40
|
+
this.localization = localization;
|
|
33
41
|
this.hostClass = true;
|
|
42
|
+
this.ariaRole = 'grid';
|
|
34
43
|
/**
|
|
35
44
|
* Specify the width of the column header and data cells. Value is treated as pixels.
|
|
36
45
|
*
|
|
@@ -40,12 +49,13 @@ export class PivotGridComponent {
|
|
|
40
49
|
this.resizeObservers = [];
|
|
41
50
|
this._loaderSettings = DEFAULT_LOADER_SETTINGS;
|
|
42
51
|
this.subs = new Subscription();
|
|
52
|
+
this.rtl = false;
|
|
43
53
|
this.resizeContainer = (axis, element) => {
|
|
44
54
|
const isRows = axis === 'Rows';
|
|
45
|
-
const
|
|
55
|
+
const table = this.table.nativeElement;
|
|
46
56
|
const size = isRows ? 'offsetHeight' : 'offsetWidth';
|
|
47
|
-
|
|
48
|
-
|
|
57
|
+
table.style[`gridTemplate${axis}`] = '';
|
|
58
|
+
table.style[`gridTemplate${axis}`] = `${element[size]}px 1fr`;
|
|
49
59
|
};
|
|
50
60
|
this.handleScroll = (event) => {
|
|
51
61
|
if (event.target === this.valuesTable.nativeElement) {
|
|
@@ -62,6 +72,30 @@ export class PivotGridComponent {
|
|
|
62
72
|
}
|
|
63
73
|
};
|
|
64
74
|
validatePackage(packageMetadata);
|
|
75
|
+
this.subs.add(this.localization.changes.subscribe(({ rtl }) => {
|
|
76
|
+
this.rtl = rtl;
|
|
77
|
+
this.direction = this.rtl ? 'rtl' : 'ltr';
|
|
78
|
+
}));
|
|
79
|
+
dataService.wrapper = hostEl.nativeElement;
|
|
80
|
+
}
|
|
81
|
+
get rightPositionClass() {
|
|
82
|
+
var _a;
|
|
83
|
+
return ((_a = this.configuratorSettings) === null || _a === void 0 ? void 0 : _a.position) === 'right';
|
|
84
|
+
}
|
|
85
|
+
get leftPositionClass() {
|
|
86
|
+
var _a;
|
|
87
|
+
return ((_a = this.configuratorSettings) === null || _a === void 0 ? void 0 : _a.position) === 'left';
|
|
88
|
+
}
|
|
89
|
+
get bottomPositionClass() {
|
|
90
|
+
var _a;
|
|
91
|
+
return ((_a = this.configuratorSettings) === null || _a === void 0 ? void 0 : _a.position) === 'bottom';
|
|
92
|
+
}
|
|
93
|
+
get topPositionClass() {
|
|
94
|
+
var _a;
|
|
95
|
+
return ((_a = this.configuratorSettings) === null || _a === void 0 ? void 0 : _a.position) === 'top';
|
|
96
|
+
}
|
|
97
|
+
get dir() {
|
|
98
|
+
return this.direction;
|
|
65
99
|
}
|
|
66
100
|
/**
|
|
67
101
|
* Specify the type, size and color of the PivotGrid's loader.
|
|
@@ -78,6 +112,15 @@ export class PivotGridComponent {
|
|
|
78
112
|
get loaderSettings() {
|
|
79
113
|
return this._loaderSettings;
|
|
80
114
|
}
|
|
115
|
+
/**
|
|
116
|
+
* @hidden
|
|
117
|
+
*/
|
|
118
|
+
get loadingText() {
|
|
119
|
+
return this.localization.get('loading');
|
|
120
|
+
}
|
|
121
|
+
get configuratorSettings() {
|
|
122
|
+
return this.configurator && Object.assign({}, DEFAULT_CONFIGURATOR_SETTINGS, this.configurator);
|
|
123
|
+
}
|
|
81
124
|
ngAfterViewInit() {
|
|
82
125
|
if (isDocumentAvailable()) {
|
|
83
126
|
this.zone.runOutsideAngular(() => {
|
|
@@ -100,67 +143,295 @@ export class PivotGridComponent {
|
|
|
100
143
|
this.resizeObservers.forEach(o => o.disconnect());
|
|
101
144
|
this.subs.unsubscribe();
|
|
102
145
|
}
|
|
146
|
+
/**
|
|
147
|
+
* @hidden
|
|
148
|
+
*/
|
|
149
|
+
messageFor(localizationToken) {
|
|
150
|
+
return this.localization.get(localizationToken);
|
|
151
|
+
}
|
|
103
152
|
}
|
|
104
|
-
PivotGridComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PivotGridComponent, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }, { token: i1.PivotGridDataService }, { token: i2.ScrollbarWidthService }], target: i0.ɵɵFactoryTarget.Component });
|
|
105
|
-
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-
|
|
106
|
-
PivotGridDataService
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
153
|
+
PivotGridComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PivotGridComponent, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }, { token: i1.PivotGridDataService }, { token: i2.LocalizationService }, { token: i3.ScrollbarWidthService }], target: i0.ɵɵFactoryTarget.Component });
|
|
154
|
+
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: [
|
|
155
|
+
PivotGridDataService,
|
|
156
|
+
LocalizationService,
|
|
157
|
+
{
|
|
158
|
+
provide: L10N_PREFIX,
|
|
159
|
+
useValue: 'kendo.pivotgrid'
|
|
160
|
+
}
|
|
161
|
+
], 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: `
|
|
162
|
+
<ng-container kendoPivotGridLocalizedMessages
|
|
163
|
+
i18n-loading="kendo.pivotgrid.loading|The loading text"
|
|
164
|
+
loading="Loading"
|
|
165
|
+
|
|
166
|
+
i18n-emptyCellLabel="kendo.pivotgrid.emptyCellLabel|The value of the aria-label attribute placed on the focusable empty cell element"
|
|
167
|
+
emptyCellLabel="PivotGrid Empty Cell"
|
|
168
|
+
|
|
169
|
+
i18n-fieldMenuFilterItemLabel="kendo.pivotgrid.fieldMenuFilterItemLabel|The text content of the filter item in the column and row fields menu"
|
|
170
|
+
fieldMenuFilterItemLabel="Filter"
|
|
171
|
+
|
|
172
|
+
i18n-fieldMenuSortAscendingItemLabel="kendo.pivotgrid.fieldMenuSortAscendingItemLabel|The text content of the sort ascending item in the column and row fields menu"
|
|
173
|
+
fieldMenuSortAscendingItemLabel="Sort ascending"
|
|
174
|
+
|
|
175
|
+
i18n-fieldMenuSortDescendingItemLabel="kendo.pivotgrid.fieldMenuSortDescendingItemLabel|The text content of the sort descending item in the column and row fields menu"
|
|
176
|
+
fieldMenuSortDescendingItemLabel="Sort descending"
|
|
177
|
+
|
|
178
|
+
i18n-filterInputLabel="kendo.pivotgrid.filterInputLabel|The label of the filter input"
|
|
179
|
+
filterInputLabel="{{ '{fields} Filter' }}"
|
|
180
|
+
|
|
181
|
+
i18n-filterOperatorsDropDownLabel="kendo.pivotgrid.filterOperatorsDropDownLabel|The label of the filter operators DropDownList"
|
|
182
|
+
filterOperatorsDropDownLabel="{{ '{fields} Filter Operators' }}"
|
|
183
|
+
|
|
184
|
+
i18n-filterEqOperator="kendo.pivotgrid.filterEqOperator|The text of the equal filter operator"
|
|
185
|
+
filterEqOperator="Is equal to"
|
|
186
|
+
|
|
187
|
+
i18n-filterNotEqOperator="kendo.pivotgrid.filterNotEqOperator|The text of the not equal filter operator"
|
|
188
|
+
filterNotEqOperator="Is not equal to"
|
|
189
|
+
|
|
190
|
+
i18n-filterIsNullOperator="kendo.pivotgrid.filterIsNullOperator|The text of the is null filter operator"
|
|
191
|
+
filterIsNullOperator="Is null"
|
|
192
|
+
|
|
193
|
+
i18n-filterIsNotNullOperator="kendo.pivotgrid.filterIsNotNullOperator|The text of the is not null filter operator"
|
|
194
|
+
filterIsNotNullOperator="Is not null"
|
|
195
|
+
|
|
196
|
+
i18n-filterIsEmptyOperator="kendo.pivotgrid.filterIsEmptyOperator|The text of the is empty filter operator"
|
|
197
|
+
filterIsEmptyOperator="Is empty"
|
|
198
|
+
|
|
199
|
+
i18n-filterIsNotEmptyOperator="kendo.pivotgrid.filterIsNotEmptyOperator|The text of the is not empty filter operator"
|
|
200
|
+
filterIsNotEmptyOperator="Is not empty"
|
|
201
|
+
|
|
202
|
+
i18n-filterStartsWithOperator="kendo.pivotgrid.filterStartsWithOperator|The text of the starts with filter operator"
|
|
203
|
+
filterStartsWithOperator="Starts with"
|
|
204
|
+
|
|
205
|
+
i18n-filterContainsOperator="kendo.pivotgrid.filterContainsOperator|The text of the contains filter operator"
|
|
206
|
+
filterContainsOperator="Contains"
|
|
207
|
+
|
|
208
|
+
i18n-filterNotContainsOperator="kendo.pivotgrid.filterNotContainsOperator|The text of the does not contain filter operator"
|
|
209
|
+
filterNotContainsOperator="Does not contain"
|
|
210
|
+
|
|
211
|
+
i18n-filterEndsWithOperator="kendo.pivotgrid.filterEndsWithOperator|The text of the ends with filter operator"
|
|
212
|
+
filterEndsWithOperator="Ends with"
|
|
213
|
+
|
|
214
|
+
i18n-filterFilterButton="kendo.pivotgrid.filterFilterButton|The text of the filter button"
|
|
215
|
+
filterFilterButton="Filter"
|
|
216
|
+
|
|
217
|
+
i18n-filterClearButton="kendo.pivotgrid.filterClearButton|The text of the clear filter button"
|
|
218
|
+
filterClearButton="Clear"
|
|
219
|
+
|
|
220
|
+
i18n-configuratorButtonText="kendo.pivotgrid.configuratorButtonText|The text content of the button that opens and closes the PivotGrid configurator"
|
|
221
|
+
configuratorButtonText="Change Settings"
|
|
222
|
+
|
|
223
|
+
i18n-configuratorHeaderText="kendo.pivotgrid.configuratorHeaderText|The text content of the PivotGrid configurator title element"
|
|
224
|
+
configuratorHeaderText="Settings"
|
|
225
|
+
|
|
226
|
+
i18n-configuratorFieldsText="kendo.pivotgrid.configuratorFieldsText|The text content of the PivotGrid configurator fields section title element"
|
|
227
|
+
configuratorFieldsText="Fields"
|
|
228
|
+
|
|
229
|
+
i18n-configuratorColumnsText="kendo.pivotgrid.configuratorColumnsText|The text content of the PivotGrid configurator columns section title element"
|
|
230
|
+
configuratorColumnsText="Columns"
|
|
231
|
+
|
|
232
|
+
i18n-configuratorRowsText="kendo.pivotgrid.configuratorRowsText|The text content of the PivotGrid configurator rows section title element"
|
|
233
|
+
configuratorRowsText="Rows"
|
|
234
|
+
|
|
235
|
+
i18n-configuratorValuesText="kendo.pivotgrid.configuratorValuesText|The text content of the PivotGrid configurator values section title element"
|
|
236
|
+
configuratorValuesText="Values"
|
|
237
|
+
|
|
238
|
+
i18n-configuratorCancelButtonText="kendo.pivotgrid.configuratorCancelButtonText|The text content of the PivotGrid configurator configurator Cancel button"
|
|
239
|
+
configuratorCancelButtonText="Cancel"
|
|
240
|
+
|
|
241
|
+
i18n-configuratorApplyButtonText="kendo.pivotgrid.configuratorApplyButtonText|The text content of the PivotGrid configurator configurator Apply button"
|
|
242
|
+
configuratorApplyButtonText="Apply"
|
|
243
|
+
|
|
244
|
+
i18n-configuratorEmptyRowsText="kendo.pivotgrid.configuratorEmptyRowsText|The text content of the PivotGrid configurator empty rows container"
|
|
245
|
+
configuratorEmptyRowsText="Select some fields to begin setup"
|
|
246
|
+
|
|
247
|
+
i18n-configuratorEmptyColumnsText="kendo.pivotgrid.configuratorEmptyColumnsText|The text content of the PivotGrid configurator empty columns container"
|
|
248
|
+
configuratorEmptyColumnsText="Select some fields to begin setup"
|
|
249
|
+
|
|
250
|
+
i18n-configuratorEmptyMeasuresText="kendo.pivotgrid.configuratorEmptyMeasuresText|The text content of the PivotGrid configurator empty measures container"
|
|
251
|
+
configuratorEmptyMeasuresText="Select some fields to begin setup"></ng-container>
|
|
252
|
+
|
|
253
|
+
<div #table class="k-pivotgrid">
|
|
254
|
+
<span class="k-pivotgrid-empty-cell" [attr.aria-label]="messageFor('emptyCellLabel')"></span>
|
|
255
|
+
<kendo-pivotgrid-table
|
|
256
|
+
#colHeadersTable
|
|
257
|
+
[colWidth]="columnHeadersWidth"
|
|
258
|
+
class="k-pivotgrid-column-headers"
|
|
259
|
+
tableType="columnHeader"></kendo-pivotgrid-table>
|
|
260
|
+
<kendo-pivotgrid-table
|
|
261
|
+
#rowHeadersTable
|
|
262
|
+
class="k-pivotgrid-row-headers"
|
|
263
|
+
tableType="rowHeader"></kendo-pivotgrid-table>
|
|
264
|
+
<kendo-pivotgrid-table
|
|
265
|
+
#valuesTable
|
|
266
|
+
[colWidth]="columnHeadersWidth"
|
|
267
|
+
class="k-pivotgrid-values"
|
|
268
|
+
tableType="values"></kendo-pivotgrid-table>
|
|
269
|
+
|
|
270
|
+
<div *ngIf="loading" class="k-loader">
|
|
271
|
+
<kendo-loader
|
|
272
|
+
[type]="loaderSettings?.type"
|
|
273
|
+
[themeColor]="loaderSettings?.themeColor"
|
|
274
|
+
[size]="loaderSettings?.size"
|
|
275
|
+
>
|
|
276
|
+
</kendo-loader>
|
|
277
|
+
<span class="k-loading-text">{{ loadingText }}</span>
|
|
278
|
+
</div>
|
|
131
279
|
</div>
|
|
132
|
-
|
|
280
|
+
|
|
281
|
+
<kendo-pivotgrid-configurator
|
|
282
|
+
*ngIf="showConfigurator"
|
|
283
|
+
[horizontal]="configuratorSettings.horizontal">
|
|
284
|
+
</kendo-pivotgrid-configurator>
|
|
285
|
+
|
|
286
|
+
<div *ngIf="configurator"
|
|
287
|
+
class="k-pivotgrid-configurator-button"
|
|
288
|
+
(click)="showConfigurator = !showConfigurator">
|
|
289
|
+
<span>{{ messageFor('configuratorButtonText') }}<span class="k-icon k-i-gear k-color-inherit"></span>
|
|
290
|
+
</span>
|
|
291
|
+
</div>
|
|
292
|
+
`, 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: i4.PivotGridTableComponent, selector: "kendo-pivotgrid-table", inputs: ["tableType", "colWidth"] }, { type: i5.LoaderComponent, selector: "kendo-loader", inputs: ["type", "themeColor", "size"] }, { type: i6.PivotGridConfiguratorComponent, selector: "kendo-pivotgrid-configurator", inputs: ["horizontal"] }], directives: [{ type: i7.LocalizedMessagesDirective, selector: "[kendoPivotGridLocalizedMessages]" }, { type: i8.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
133
293
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PivotGridComponent, decorators: [{
|
|
134
294
|
type: Component,
|
|
135
295
|
args: [{
|
|
136
296
|
selector: 'kendo-pivotgrid',
|
|
137
297
|
providers: [
|
|
138
|
-
PivotGridDataService
|
|
298
|
+
PivotGridDataService,
|
|
299
|
+
LocalizationService,
|
|
300
|
+
{
|
|
301
|
+
provide: L10N_PREFIX,
|
|
302
|
+
useValue: 'kendo.pivotgrid'
|
|
303
|
+
}
|
|
139
304
|
],
|
|
140
305
|
template: `
|
|
141
|
-
<
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
306
|
+
<ng-container kendoPivotGridLocalizedMessages
|
|
307
|
+
i18n-loading="kendo.pivotgrid.loading|The loading text"
|
|
308
|
+
loading="Loading"
|
|
309
|
+
|
|
310
|
+
i18n-emptyCellLabel="kendo.pivotgrid.emptyCellLabel|The value of the aria-label attribute placed on the focusable empty cell element"
|
|
311
|
+
emptyCellLabel="PivotGrid Empty Cell"
|
|
312
|
+
|
|
313
|
+
i18n-fieldMenuFilterItemLabel="kendo.pivotgrid.fieldMenuFilterItemLabel|The text content of the filter item in the column and row fields menu"
|
|
314
|
+
fieldMenuFilterItemLabel="Filter"
|
|
315
|
+
|
|
316
|
+
i18n-fieldMenuSortAscendingItemLabel="kendo.pivotgrid.fieldMenuSortAscendingItemLabel|The text content of the sort ascending item in the column and row fields menu"
|
|
317
|
+
fieldMenuSortAscendingItemLabel="Sort ascending"
|
|
318
|
+
|
|
319
|
+
i18n-fieldMenuSortDescendingItemLabel="kendo.pivotgrid.fieldMenuSortDescendingItemLabel|The text content of the sort descending item in the column and row fields menu"
|
|
320
|
+
fieldMenuSortDescendingItemLabel="Sort descending"
|
|
321
|
+
|
|
322
|
+
i18n-filterInputLabel="kendo.pivotgrid.filterInputLabel|The label of the filter input"
|
|
323
|
+
filterInputLabel="{{ '{fields} Filter' }}"
|
|
324
|
+
|
|
325
|
+
i18n-filterOperatorsDropDownLabel="kendo.pivotgrid.filterOperatorsDropDownLabel|The label of the filter operators DropDownList"
|
|
326
|
+
filterOperatorsDropDownLabel="{{ '{fields} Filter Operators' }}"
|
|
327
|
+
|
|
328
|
+
i18n-filterEqOperator="kendo.pivotgrid.filterEqOperator|The text of the equal filter operator"
|
|
329
|
+
filterEqOperator="Is equal to"
|
|
330
|
+
|
|
331
|
+
i18n-filterNotEqOperator="kendo.pivotgrid.filterNotEqOperator|The text of the not equal filter operator"
|
|
332
|
+
filterNotEqOperator="Is not equal to"
|
|
333
|
+
|
|
334
|
+
i18n-filterIsNullOperator="kendo.pivotgrid.filterIsNullOperator|The text of the is null filter operator"
|
|
335
|
+
filterIsNullOperator="Is null"
|
|
336
|
+
|
|
337
|
+
i18n-filterIsNotNullOperator="kendo.pivotgrid.filterIsNotNullOperator|The text of the is not null filter operator"
|
|
338
|
+
filterIsNotNullOperator="Is not null"
|
|
339
|
+
|
|
340
|
+
i18n-filterIsEmptyOperator="kendo.pivotgrid.filterIsEmptyOperator|The text of the is empty filter operator"
|
|
341
|
+
filterIsEmptyOperator="Is empty"
|
|
342
|
+
|
|
343
|
+
i18n-filterIsNotEmptyOperator="kendo.pivotgrid.filterIsNotEmptyOperator|The text of the is not empty filter operator"
|
|
344
|
+
filterIsNotEmptyOperator="Is not empty"
|
|
345
|
+
|
|
346
|
+
i18n-filterStartsWithOperator="kendo.pivotgrid.filterStartsWithOperator|The text of the starts with filter operator"
|
|
347
|
+
filterStartsWithOperator="Starts with"
|
|
348
|
+
|
|
349
|
+
i18n-filterContainsOperator="kendo.pivotgrid.filterContainsOperator|The text of the contains filter operator"
|
|
350
|
+
filterContainsOperator="Contains"
|
|
351
|
+
|
|
352
|
+
i18n-filterNotContainsOperator="kendo.pivotgrid.filterNotContainsOperator|The text of the does not contain filter operator"
|
|
353
|
+
filterNotContainsOperator="Does not contain"
|
|
354
|
+
|
|
355
|
+
i18n-filterEndsWithOperator="kendo.pivotgrid.filterEndsWithOperator|The text of the ends with filter operator"
|
|
356
|
+
filterEndsWithOperator="Ends with"
|
|
357
|
+
|
|
358
|
+
i18n-filterFilterButton="kendo.pivotgrid.filterFilterButton|The text of the filter button"
|
|
359
|
+
filterFilterButton="Filter"
|
|
360
|
+
|
|
361
|
+
i18n-filterClearButton="kendo.pivotgrid.filterClearButton|The text of the clear filter button"
|
|
362
|
+
filterClearButton="Clear"
|
|
363
|
+
|
|
364
|
+
i18n-configuratorButtonText="kendo.pivotgrid.configuratorButtonText|The text content of the button that opens and closes the PivotGrid configurator"
|
|
365
|
+
configuratorButtonText="Change Settings"
|
|
366
|
+
|
|
367
|
+
i18n-configuratorHeaderText="kendo.pivotgrid.configuratorHeaderText|The text content of the PivotGrid configurator title element"
|
|
368
|
+
configuratorHeaderText="Settings"
|
|
369
|
+
|
|
370
|
+
i18n-configuratorFieldsText="kendo.pivotgrid.configuratorFieldsText|The text content of the PivotGrid configurator fields section title element"
|
|
371
|
+
configuratorFieldsText="Fields"
|
|
372
|
+
|
|
373
|
+
i18n-configuratorColumnsText="kendo.pivotgrid.configuratorColumnsText|The text content of the PivotGrid configurator columns section title element"
|
|
374
|
+
configuratorColumnsText="Columns"
|
|
375
|
+
|
|
376
|
+
i18n-configuratorRowsText="kendo.pivotgrid.configuratorRowsText|The text content of the PivotGrid configurator rows section title element"
|
|
377
|
+
configuratorRowsText="Rows"
|
|
378
|
+
|
|
379
|
+
i18n-configuratorValuesText="kendo.pivotgrid.configuratorValuesText|The text content of the PivotGrid configurator values section title element"
|
|
380
|
+
configuratorValuesText="Values"
|
|
381
|
+
|
|
382
|
+
i18n-configuratorCancelButtonText="kendo.pivotgrid.configuratorCancelButtonText|The text content of the PivotGrid configurator configurator Cancel button"
|
|
383
|
+
configuratorCancelButtonText="Cancel"
|
|
384
|
+
|
|
385
|
+
i18n-configuratorApplyButtonText="kendo.pivotgrid.configuratorApplyButtonText|The text content of the PivotGrid configurator configurator Apply button"
|
|
386
|
+
configuratorApplyButtonText="Apply"
|
|
387
|
+
|
|
388
|
+
i18n-configuratorEmptyRowsText="kendo.pivotgrid.configuratorEmptyRowsText|The text content of the PivotGrid configurator empty rows container"
|
|
389
|
+
configuratorEmptyRowsText="Select some fields to begin setup"
|
|
390
|
+
|
|
391
|
+
i18n-configuratorEmptyColumnsText="kendo.pivotgrid.configuratorEmptyColumnsText|The text content of the PivotGrid configurator empty columns container"
|
|
392
|
+
configuratorEmptyColumnsText="Select some fields to begin setup"
|
|
393
|
+
|
|
394
|
+
i18n-configuratorEmptyMeasuresText="kendo.pivotgrid.configuratorEmptyMeasuresText|The text content of the PivotGrid configurator empty measures container"
|
|
395
|
+
configuratorEmptyMeasuresText="Select some fields to begin setup"></ng-container>
|
|
396
|
+
|
|
397
|
+
<div #table class="k-pivotgrid">
|
|
398
|
+
<span class="k-pivotgrid-empty-cell" [attr.aria-label]="messageFor('emptyCellLabel')"></span>
|
|
399
|
+
<kendo-pivotgrid-table
|
|
400
|
+
#colHeadersTable
|
|
401
|
+
[colWidth]="columnHeadersWidth"
|
|
402
|
+
class="k-pivotgrid-column-headers"
|
|
403
|
+
tableType="columnHeader"></kendo-pivotgrid-table>
|
|
404
|
+
<kendo-pivotgrid-table
|
|
405
|
+
#rowHeadersTable
|
|
406
|
+
class="k-pivotgrid-row-headers"
|
|
407
|
+
tableType="rowHeader"></kendo-pivotgrid-table>
|
|
408
|
+
<kendo-pivotgrid-table
|
|
409
|
+
#valuesTable
|
|
410
|
+
[colWidth]="columnHeadersWidth"
|
|
411
|
+
class="k-pivotgrid-values"
|
|
412
|
+
tableType="values"></kendo-pivotgrid-table>
|
|
413
|
+
|
|
414
|
+
<div *ngIf="loading" class="k-loader">
|
|
415
|
+
<kendo-loader
|
|
416
|
+
[type]="loaderSettings?.type"
|
|
417
|
+
[themeColor]="loaderSettings?.themeColor"
|
|
418
|
+
[size]="loaderSettings?.size"
|
|
419
|
+
>
|
|
420
|
+
</kendo-loader>
|
|
421
|
+
<span class="k-loading-text">{{ loadingText }}</span>
|
|
422
|
+
</div>
|
|
423
|
+
</div>
|
|
424
|
+
|
|
425
|
+
<kendo-pivotgrid-configurator
|
|
426
|
+
*ngIf="showConfigurator"
|
|
427
|
+
[horizontal]="configuratorSettings.horizontal">
|
|
428
|
+
</kendo-pivotgrid-configurator>
|
|
429
|
+
|
|
430
|
+
<div *ngIf="configurator"
|
|
431
|
+
class="k-pivotgrid-configurator-button"
|
|
432
|
+
(click)="showConfigurator = !showConfigurator">
|
|
433
|
+
<span>{{ messageFor('configuratorButtonText') }}<span class="k-icon k-i-gear k-color-inherit"></span>
|
|
434
|
+
</span>
|
|
164
435
|
</div>
|
|
165
436
|
`,
|
|
166
437
|
styles: [`
|
|
@@ -173,9 +444,30 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
173
444
|
}
|
|
174
445
|
`]
|
|
175
446
|
}]
|
|
176
|
-
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.NgZone }, { type: i1.PivotGridDataService }, { type: i2.ScrollbarWidthService }]; }, propDecorators: { hostClass: [{
|
|
447
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.NgZone }, { type: i1.PivotGridDataService }, { type: i2.LocalizationService }, { type: i3.ScrollbarWidthService }]; }, propDecorators: { hostClass: [{
|
|
177
448
|
type: HostBinding,
|
|
178
|
-
args: ['class.k-
|
|
449
|
+
args: ['class.k-d-flex']
|
|
450
|
+
}, {
|
|
451
|
+
type: HostBinding,
|
|
452
|
+
args: ['class.k-pos-relative']
|
|
453
|
+
}], rightPositionClass: [{
|
|
454
|
+
type: HostBinding,
|
|
455
|
+
args: ['class.k-flex-row']
|
|
456
|
+
}], leftPositionClass: [{
|
|
457
|
+
type: HostBinding,
|
|
458
|
+
args: ['class.k-flex-row-reverse']
|
|
459
|
+
}], bottomPositionClass: [{
|
|
460
|
+
type: HostBinding,
|
|
461
|
+
args: ['class.k-flex-column']
|
|
462
|
+
}], topPositionClass: [{
|
|
463
|
+
type: HostBinding,
|
|
464
|
+
args: ['class.k-flex-column-reverse']
|
|
465
|
+
}], dir: [{
|
|
466
|
+
type: HostBinding,
|
|
467
|
+
args: ['attr.dir']
|
|
468
|
+
}], ariaRole: [{
|
|
469
|
+
type: HostBinding,
|
|
470
|
+
args: ['attr.role']
|
|
179
471
|
}], colHeadersTable: [{
|
|
180
472
|
type: ViewChild,
|
|
181
473
|
args: ['colHeadersTable', { read: ElementRef }]
|
|
@@ -185,8 +477,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
185
477
|
}], valuesTable: [{
|
|
186
478
|
type: ViewChild,
|
|
187
479
|
args: ['valuesTable', { read: ElementRef }]
|
|
480
|
+
}], table: [{
|
|
481
|
+
type: ViewChild,
|
|
482
|
+
args: ['table', { read: ElementRef }]
|
|
188
483
|
}], loaderSettings: [{
|
|
189
484
|
type: Input
|
|
485
|
+
}], configurator: [{
|
|
486
|
+
type: Input
|
|
190
487
|
}], columnHeadersWidth: [{
|
|
191
488
|
type: Input
|
|
192
489
|
}] } });
|
|
@@ -4,26 +4,50 @@
|
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
import { CommonModule } from '@angular/common';
|
|
6
6
|
import { NgModule } from '@angular/core';
|
|
7
|
-
import { L10N_PREFIX } from '@progress/kendo-angular-l10n';
|
|
8
7
|
import { IndicatorsModule } from "@progress/kendo-angular-indicators";
|
|
8
|
+
import { ButtonsModule } from "@progress/kendo-angular-buttons";
|
|
9
|
+
import { TreeViewModule } from "@progress/kendo-angular-treeview";
|
|
9
10
|
import { PivotGridComponent } from './pivotgrid.component';
|
|
10
11
|
import { PivotGridCellDirective } from './rendering/pivotgrid-cell.directive';
|
|
11
12
|
import { PivotGridTableComponent } from './rendering/pivotgrid-table.component';
|
|
12
|
-
import { EventsModule } from '@progress/kendo-angular-common';
|
|
13
|
+
import { DraggableModule, EventsModule } from '@progress/kendo-angular-common';
|
|
13
14
|
import { PivotLocalBindingDirective } from './data-binding/local-binding.directive';
|
|
14
15
|
import { PivotOLAPBindingDirective } from './data-binding/olap-binding.directive';
|
|
16
|
+
import { LocalizedMessagesDirective } from './localization/localized-messages.directive';
|
|
17
|
+
import { CustomMessagesComponent } from './localization/custom-messages.component';
|
|
18
|
+
import { PivotGridConfiguratorComponent } from './configurator/configurator.component';
|
|
19
|
+
import { InputsModule } from '@progress/kendo-angular-inputs';
|
|
20
|
+
import { DraggableChipDirective } from './configurator/draggable.directive';
|
|
21
|
+
import { DropTargetDirective } from './configurator/drop-target.directive';
|
|
15
22
|
import * as i0 from "@angular/core";
|
|
16
23
|
const IMPORTED_MODULES = [
|
|
17
24
|
CommonModule,
|
|
18
25
|
EventsModule,
|
|
19
|
-
IndicatorsModule
|
|
26
|
+
IndicatorsModule,
|
|
27
|
+
ButtonsModule,
|
|
28
|
+
TreeViewModule,
|
|
29
|
+
InputsModule,
|
|
30
|
+
DraggableModule
|
|
20
31
|
];
|
|
21
32
|
const DECLARATIONS = [
|
|
22
33
|
PivotGridComponent,
|
|
23
34
|
PivotGridTableComponent,
|
|
35
|
+
PivotGridConfiguratorComponent,
|
|
24
36
|
PivotGridCellDirective,
|
|
25
37
|
PivotLocalBindingDirective,
|
|
26
|
-
PivotOLAPBindingDirective
|
|
38
|
+
PivotOLAPBindingDirective,
|
|
39
|
+
DraggableChipDirective,
|
|
40
|
+
DropTargetDirective,
|
|
41
|
+
LocalizedMessagesDirective,
|
|
42
|
+
CustomMessagesComponent
|
|
43
|
+
];
|
|
44
|
+
const EXPORTS = [
|
|
45
|
+
PivotGridComponent,
|
|
46
|
+
PivotGridTableComponent,
|
|
47
|
+
PivotGridCellDirective,
|
|
48
|
+
PivotLocalBindingDirective,
|
|
49
|
+
PivotOLAPBindingDirective,
|
|
50
|
+
CustomMessagesComponent
|
|
27
51
|
];
|
|
28
52
|
/**
|
|
29
53
|
* Sample module
|
|
@@ -33,28 +57,31 @@ export class PivotGridModule {
|
|
|
33
57
|
PivotGridModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PivotGridModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
34
58
|
PivotGridModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PivotGridModule, declarations: [PivotGridComponent,
|
|
35
59
|
PivotGridTableComponent,
|
|
60
|
+
PivotGridConfiguratorComponent,
|
|
36
61
|
PivotGridCellDirective,
|
|
37
62
|
PivotLocalBindingDirective,
|
|
38
|
-
PivotOLAPBindingDirective
|
|
63
|
+
PivotOLAPBindingDirective,
|
|
64
|
+
DraggableChipDirective,
|
|
65
|
+
DropTargetDirective,
|
|
66
|
+
LocalizedMessagesDirective,
|
|
67
|
+
CustomMessagesComponent], imports: [CommonModule,
|
|
39
68
|
EventsModule,
|
|
40
|
-
IndicatorsModule
|
|
69
|
+
IndicatorsModule,
|
|
70
|
+
ButtonsModule,
|
|
71
|
+
TreeViewModule,
|
|
72
|
+
InputsModule,
|
|
73
|
+
DraggableModule], exports: [PivotGridComponent,
|
|
41
74
|
PivotGridTableComponent,
|
|
42
75
|
PivotGridCellDirective,
|
|
43
76
|
PivotLocalBindingDirective,
|
|
44
|
-
PivotOLAPBindingDirective
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
useValue: 'kendo.pivotgrid'
|
|
48
|
-
}], imports: [[...IMPORTED_MODULES]] });
|
|
77
|
+
PivotOLAPBindingDirective,
|
|
78
|
+
CustomMessagesComponent] });
|
|
79
|
+
PivotGridModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PivotGridModule, imports: [[...IMPORTED_MODULES]] });
|
|
49
80
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PivotGridModule, decorators: [{
|
|
50
81
|
type: NgModule,
|
|
51
82
|
args: [{
|
|
52
83
|
imports: [...IMPORTED_MODULES],
|
|
53
84
|
declarations: [...DECLARATIONS],
|
|
54
|
-
exports: [...
|
|
55
|
-
providers: [{
|
|
56
|
-
provide: L10N_PREFIX,
|
|
57
|
-
useValue: 'kendo.pivotgrid'
|
|
58
|
-
}]
|
|
85
|
+
exports: [...EXPORTS]
|
|
59
86
|
}]
|
|
60
87
|
}] });
|
|
@@ -29,15 +29,16 @@ export class PivotGridCellDirective {
|
|
|
29
29
|
return ((_a = this.kendoPivotGridCell) === null || _a === void 0 ? void 0 : _a.hasChildren) && this.kendoPivotGridCell.children.length;
|
|
30
30
|
}
|
|
31
31
|
ngOnInit() {
|
|
32
|
+
var _a, _b, _c;
|
|
32
33
|
const nativeElement = this.hostEl.nativeElement;
|
|
33
34
|
this.renderer.setAttribute(nativeElement, 'rowspan', this.kendoPivotGridCell.rowSpan || 1);
|
|
34
35
|
this.renderer.setAttribute(nativeElement, 'colspan', this.kendoPivotGridCell.colSpan || 1);
|
|
35
36
|
const classesToAdd = {
|
|
36
|
-
'k-pivotgrid-header-total': this.kendoPivotGridCell.total || (this.tableType === 'values'
|
|
37
|
+
'k-pivotgrid-header-total': ((_a = this.kendoPivotGridCell) === null || _a === void 0 ? void 0 : _a.total) || (this.tableType === 'values'
|
|
37
38
|
&& (this.dataService.rowHeaderLeaves[this.rowIndex].total ||
|
|
38
39
|
this.dataService.columnHeaderLeaves[this.colIndex].total)),
|
|
39
|
-
'k-pivotgrid-header-root': this.kendoPivotGridCell.levelNum === 0,
|
|
40
|
-
'k-pivotgrid-expanded': this.kendoPivotGridCell.hasChildren && this.kendoPivotGridCell.children.length,
|
|
40
|
+
'k-pivotgrid-header-root': ((_b = this.kendoPivotGridCell) === null || _b === void 0 ? void 0 : _b.levelNum) === 0,
|
|
41
|
+
'k-pivotgrid-expanded': ((_c = this.kendoPivotGridCell) === null || _c === void 0 ? void 0 : _c.hasChildren) && this.kendoPivotGridCell.children.length,
|
|
41
42
|
'k-first': this.colIndex > 0
|
|
42
43
|
};
|
|
43
44
|
for (let prop in classesToAdd) {
|
|
@@ -52,6 +53,7 @@ PivotGridCellDirective.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0",
|
|
|
52
53
|
<span
|
|
53
54
|
*ngIf="kendoPivotGridCell.hasChildren && !kendoPivotGridCell.total"
|
|
54
55
|
class="k-icon"
|
|
56
|
+
aria-hidden="true"
|
|
55
57
|
[kendoEventsOutsideAngular]="{
|
|
56
58
|
click: handleClick
|
|
57
59
|
}"
|
|
@@ -68,6 +70,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
68
70
|
<span
|
|
69
71
|
*ngIf="kendoPivotGridCell.hasChildren && !kendoPivotGridCell.total"
|
|
70
72
|
class="k-icon"
|
|
73
|
+
aria-hidden="true"
|
|
71
74
|
[kendoEventsOutsideAngular]="{
|
|
72
75
|
click: handleClick
|
|
73
76
|
}"
|