@progress/kendo-angular-pivotgrid 0.1.5 → 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.
Files changed (45) hide show
  1. package/bundles/kendo-angular-pivotgrid.umd.js +1 -1
  2. package/configurator/configurator.component.d.ts +96 -0
  3. package/configurator/configurator.service.d.ts +17 -0
  4. package/configurator/draggable.directive.d.ts +32 -0
  5. package/configurator/drop-cue.service.d.ts +22 -0
  6. package/configurator/drop-target.directive.d.ts +32 -0
  7. package/data-binding/base-binding-directive.d.ts +27 -5
  8. package/data-binding/local-binding.directive.d.ts +8 -1
  9. package/data-binding/olap-binding.directive.d.ts +13 -1
  10. package/data-binding/pivotgrid-data.service.d.ts +13 -4
  11. package/esm2015/configurator/configurator.component.js +512 -0
  12. package/esm2015/configurator/configurator.service.js +38 -0
  13. package/esm2015/configurator/draggable.directive.js +94 -0
  14. package/esm2015/configurator/drop-cue.service.js +64 -0
  15. package/esm2015/configurator/drop-target.directive.js +82 -0
  16. package/esm2015/data-binding/base-binding-directive.js +68 -9
  17. package/esm2015/data-binding/local-binding.directive.js +20 -8
  18. package/esm2015/data-binding/olap-binding.directive.js +131 -6
  19. package/esm2015/data-binding/pivotgrid-data.service.js +26 -3
  20. package/esm2015/localization/custom-messages.component.js +41 -0
  21. package/esm2015/localization/localized-messages.directive.js +36 -0
  22. package/esm2015/localization/messages.js +71 -0
  23. package/esm2015/main.js +8 -0
  24. package/esm2015/models/configuration-change-event.js +18 -0
  25. package/esm2015/models/configurator-settings.js +14 -0
  26. package/esm2015/models/expanded-change-event.js +18 -0
  27. package/esm2015/package-metadata.js +1 -1
  28. package/esm2015/pivotgrid.component.js +350 -59
  29. package/esm2015/pivotgrid.module.js +43 -16
  30. package/esm2015/rendering/pivotgrid-cell.directive.js +6 -3
  31. package/esm2015/rendering/pivotgrid-table.component.js +38 -13
  32. package/esm2015/util.js +86 -0
  33. package/fesm2015/kendo-angular-pivotgrid.js +1744 -198
  34. package/localization/custom-messages.component.d.ts +18 -0
  35. package/localization/localized-messages.directive.d.ts +16 -0
  36. package/localization/messages.d.ts +160 -0
  37. package/main.d.ts +6 -0
  38. package/models/configuration-change-event.d.ts +36 -0
  39. package/models/configurator-settings.d.ts +32 -0
  40. package/models/expanded-change-event.d.ts +27 -0
  41. package/package.json +12 -6
  42. package/pivotgrid.component.d.ts +34 -3
  43. package/pivotgrid.module.d.ts +15 -7
  44. package/rendering/pivotgrid-table.component.d.ts +5 -3
  45. package/util.d.ts +31 -0
@@ -11,35 +11,51 @@ 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-common";
17
- import * as i3 from "./rendering/pivotgrid-table.component";
18
- import * as i4 from "@progress/kendo-angular-indicators";
19
- import * as i5 from "@angular/common";
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';
43
+ /**
44
+ * Specify the width of the column header and data cells. Value is treated as pixels.
45
+ *
46
+ * @default 200
47
+ */
48
+ this.columnHeadersWidth = 200;
34
49
  this.resizeObservers = [];
35
50
  this._loaderSettings = DEFAULT_LOADER_SETTINGS;
36
51
  this.subs = new Subscription();
52
+ this.rtl = false;
37
53
  this.resizeContainer = (axis, element) => {
38
54
  const isRows = axis === 'Rows';
39
- const wrapper = this.hostEl.nativeElement;
55
+ const table = this.table.nativeElement;
40
56
  const size = isRows ? 'offsetHeight' : 'offsetWidth';
41
- wrapper.style[`gridTemplate${axis}`] = '';
42
- wrapper.style[`gridTemplate${axis}`] = `${element[size]}px 1fr`;
57
+ table.style[`gridTemplate${axis}`] = '';
58
+ table.style[`gridTemplate${axis}`] = `${element[size]}px 1fr`;
43
59
  };
44
60
  this.handleScroll = (event) => {
45
61
  if (event.target === this.valuesTable.nativeElement) {
@@ -56,6 +72,30 @@ export class PivotGridComponent {
56
72
  }
57
73
  };
58
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;
59
99
  }
60
100
  /**
61
101
  * Specify the type, size and color of the PivotGrid's loader.
@@ -72,6 +112,15 @@ export class PivotGridComponent {
72
112
  get loaderSettings() {
73
113
  return this._loaderSettings;
74
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
+ }
75
124
  ngAfterViewInit() {
76
125
  if (isDocumentAvailable()) {
77
126
  this.zone.runOutsideAngular(() => {
@@ -94,63 +143,277 @@ export class PivotGridComponent {
94
143
  this.resizeObservers.forEach(o => o.disconnect());
95
144
  this.subs.unsubscribe();
96
145
  }
146
+ /**
147
+ * @hidden
148
+ */
149
+ messageFor(localizationToken) {
150
+ return this.localization.get(localizationToken);
151
+ }
97
152
  }
98
- 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 });
99
- PivotGridComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: PivotGridComponent, selector: "kendo-pivotgrid", inputs: { loaderSettings: "loaderSettings" }, host: { properties: { "class.k-pivotgrid": "this.hostClass" } }, providers: [
100
- PivotGridDataService
101
- ], 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 }], ngImport: i0, template: `
102
- <span class="k-pivotgrid-empty-cell"></span>
103
- <kendo-pivotgrid-table
104
- #colHeadersTable
105
- class="k-pivotgrid-column-headers"
106
- tableType="columnHeader"></kendo-pivotgrid-table>
107
- <kendo-pivotgrid-table
108
- #rowHeadersTable
109
- class="k-pivotgrid-row-headers"
110
- tableType="rowHeader"></kendo-pivotgrid-table>
111
- <kendo-pivotgrid-table
112
- #valuesTable
113
- class="k-pivotgrid-values"
114
- tableType="values"></kendo-pivotgrid-table>
115
-
116
- <div *ngIf="loading" class="k-loader">
117
- <kendo-loader
118
- [type]="loaderSettings?.type"
119
- [themeColor]="loaderSettings?.themeColor"
120
- [size]="loaderSettings?.size"
121
- >
122
- </kendo-loader>
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"></ng-container>
243
+
244
+ <div #table class="k-pivotgrid">
245
+ <span class="k-pivotgrid-empty-cell" [attr.aria-label]="messageFor('emptyCellLabel')"></span>
246
+ <kendo-pivotgrid-table
247
+ #colHeadersTable
248
+ [colWidth]="columnHeadersWidth"
249
+ class="k-pivotgrid-column-headers"
250
+ tableType="columnHeader"></kendo-pivotgrid-table>
251
+ <kendo-pivotgrid-table
252
+ #rowHeadersTable
253
+ class="k-pivotgrid-row-headers"
254
+ tableType="rowHeader"></kendo-pivotgrid-table>
255
+ <kendo-pivotgrid-table
256
+ #valuesTable
257
+ [colWidth]="columnHeadersWidth"
258
+ class="k-pivotgrid-values"
259
+ tableType="values"></kendo-pivotgrid-table>
260
+
261
+ <div *ngIf="loading" class="k-loader">
262
+ <kendo-loader
263
+ [type]="loaderSettings?.type"
264
+ [themeColor]="loaderSettings?.themeColor"
265
+ [size]="loaderSettings?.size"
266
+ >
267
+ </kendo-loader>
268
+ <span class="k-loading-text">{{ loadingText }}</span>
269
+ </div>
270
+ </div>
271
+
272
+ <kendo-pivotgrid-configurator
273
+ *ngIf="showConfigurator"
274
+ [horizontal]="configuratorSettings.horizontal">
275
+ </kendo-pivotgrid-configurator>
276
+
277
+ <div *ngIf="configurator"
278
+ class="k-pivotgrid-configurator-button"
279
+ (click)="showConfigurator = !showConfigurator">
280
+ <span>{{ messageFor('configuratorButtonText') }}<span class="k-icon k-i-gear k-color-inherit"></span>
281
+ </span>
123
282
  </div>
124
- `, 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: i3.PivotGridTableComponent, selector: "kendo-pivotgrid-table", inputs: ["tableType"] }, { type: i4.LoaderComponent, selector: "kendo-loader", inputs: ["type", "themeColor", "size"] }], directives: [{ type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
283
+ `, 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"] }] });
125
284
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PivotGridComponent, decorators: [{
126
285
  type: Component,
127
286
  args: [{
128
287
  selector: 'kendo-pivotgrid',
129
288
  providers: [
130
- PivotGridDataService
289
+ PivotGridDataService,
290
+ LocalizationService,
291
+ {
292
+ provide: L10N_PREFIX,
293
+ useValue: 'kendo.pivotgrid'
294
+ }
131
295
  ],
132
296
  template: `
133
- <span class="k-pivotgrid-empty-cell"></span>
134
- <kendo-pivotgrid-table
135
- #colHeadersTable
136
- class="k-pivotgrid-column-headers"
137
- tableType="columnHeader"></kendo-pivotgrid-table>
138
- <kendo-pivotgrid-table
139
- #rowHeadersTable
140
- class="k-pivotgrid-row-headers"
141
- tableType="rowHeader"></kendo-pivotgrid-table>
142
- <kendo-pivotgrid-table
143
- #valuesTable
144
- class="k-pivotgrid-values"
145
- tableType="values"></kendo-pivotgrid-table>
146
-
147
- <div *ngIf="loading" class="k-loader">
148
- <kendo-loader
149
- [type]="loaderSettings?.type"
150
- [themeColor]="loaderSettings?.themeColor"
151
- [size]="loaderSettings?.size"
152
- >
153
- </kendo-loader>
297
+ <ng-container kendoPivotGridLocalizedMessages
298
+ i18n-loading="kendo.pivotgrid.loading|The loading text"
299
+ loading="Loading"
300
+
301
+ i18n-emptyCellLabel="kendo.pivotgrid.emptyCellLabel|The value of the aria-label attribute placed on the focusable empty cell element"
302
+ emptyCellLabel="PivotGrid Empty Cell"
303
+
304
+ i18n-fieldMenuFilterItemLabel="kendo.pivotgrid.fieldMenuFilterItemLabel|The text content of the filter item in the column and row fields menu"
305
+ fieldMenuFilterItemLabel="Filter"
306
+
307
+ i18n-fieldMenuSortAscendingItemLabel="kendo.pivotgrid.fieldMenuSortAscendingItemLabel|The text content of the sort ascending item in the column and row fields menu"
308
+ fieldMenuSortAscendingItemLabel="Sort ascending"
309
+
310
+ i18n-fieldMenuSortDescendingItemLabel="kendo.pivotgrid.fieldMenuSortDescendingItemLabel|The text content of the sort descending item in the column and row fields menu"
311
+ fieldMenuSortDescendingItemLabel="Sort descending"
312
+
313
+ i18n-filterInputLabel="kendo.pivotgrid.filterInputLabel|The label of the filter input"
314
+ filterInputLabel="{{ '{fields} Filter' }}"
315
+
316
+ i18n-filterOperatorsDropDownLabel="kendo.pivotgrid.filterOperatorsDropDownLabel|The label of the filter operators DropDownList"
317
+ filterOperatorsDropDownLabel="{{ '{fields} Filter Operators' }}"
318
+
319
+ i18n-filterEqOperator="kendo.pivotgrid.filterEqOperator|The text of the equal filter operator"
320
+ filterEqOperator="Is equal to"
321
+
322
+ i18n-filterNotEqOperator="kendo.pivotgrid.filterNotEqOperator|The text of the not equal filter operator"
323
+ filterNotEqOperator="Is not equal to"
324
+
325
+ i18n-filterIsNullOperator="kendo.pivotgrid.filterIsNullOperator|The text of the is null filter operator"
326
+ filterIsNullOperator="Is null"
327
+
328
+ i18n-filterIsNotNullOperator="kendo.pivotgrid.filterIsNotNullOperator|The text of the is not null filter operator"
329
+ filterIsNotNullOperator="Is not null"
330
+
331
+ i18n-filterIsEmptyOperator="kendo.pivotgrid.filterIsEmptyOperator|The text of the is empty filter operator"
332
+ filterIsEmptyOperator="Is empty"
333
+
334
+ i18n-filterIsNotEmptyOperator="kendo.pivotgrid.filterIsNotEmptyOperator|The text of the is not empty filter operator"
335
+ filterIsNotEmptyOperator="Is not empty"
336
+
337
+ i18n-filterStartsWithOperator="kendo.pivotgrid.filterStartsWithOperator|The text of the starts with filter operator"
338
+ filterStartsWithOperator="Starts with"
339
+
340
+ i18n-filterContainsOperator="kendo.pivotgrid.filterContainsOperator|The text of the contains filter operator"
341
+ filterContainsOperator="Contains"
342
+
343
+ i18n-filterNotContainsOperator="kendo.pivotgrid.filterNotContainsOperator|The text of the does not contain filter operator"
344
+ filterNotContainsOperator="Does not contain"
345
+
346
+ i18n-filterEndsWithOperator="kendo.pivotgrid.filterEndsWithOperator|The text of the ends with filter operator"
347
+ filterEndsWithOperator="Ends with"
348
+
349
+ i18n-filterFilterButton="kendo.pivotgrid.filterFilterButton|The text of the filter button"
350
+ filterFilterButton="Filter"
351
+
352
+ i18n-filterClearButton="kendo.pivotgrid.filterClearButton|The text of the clear filter button"
353
+ filterClearButton="Clear"
354
+
355
+ i18n-configuratorButtonText="kendo.pivotgrid.configuratorButtonText|The text content of the button that opens and closes the PivotGrid configurator"
356
+ configuratorButtonText="Change Settings"
357
+
358
+ i18n-configuratorHeaderText="kendo.pivotgrid.configuratorHeaderText|The text content of the PivotGrid configurator title element"
359
+ configuratorHeaderText="Settings"
360
+
361
+ i18n-configuratorFieldsText="kendo.pivotgrid.configuratorFieldsText|The text content of the PivotGrid configurator fields section title element"
362
+ configuratorFieldsText="Fields"
363
+
364
+ i18n-configuratorColumnsText="kendo.pivotgrid.configuratorColumnsText|The text content of the PivotGrid configurator columns section title element"
365
+ configuratorColumnsText="Columns"
366
+
367
+ i18n-configuratorRowsText="kendo.pivotgrid.configuratorRowsText|The text content of the PivotGrid configurator rows section title element"
368
+ configuratorRowsText="Rows"
369
+
370
+ i18n-configuratorValuesText="kendo.pivotgrid.configuratorValuesText|The text content of the PivotGrid configurator values section title element"
371
+ configuratorValuesText="Values"
372
+
373
+ i18n-configuratorCancelButtonText="kendo.pivotgrid.configuratorCancelButtonText|The text content of the PivotGrid configurator configurator Cancel button"
374
+ configuratorCancelButtonText="Cancel"
375
+
376
+ i18n-configuratorApplyButtonText="kendo.pivotgrid.configuratorApplyButtonText|The text content of the PivotGrid configurator configurator Apply button"
377
+ configuratorApplyButtonText="Apply"></ng-container>
378
+
379
+ <div #table class="k-pivotgrid">
380
+ <span class="k-pivotgrid-empty-cell" [attr.aria-label]="messageFor('emptyCellLabel')"></span>
381
+ <kendo-pivotgrid-table
382
+ #colHeadersTable
383
+ [colWidth]="columnHeadersWidth"
384
+ class="k-pivotgrid-column-headers"
385
+ tableType="columnHeader"></kendo-pivotgrid-table>
386
+ <kendo-pivotgrid-table
387
+ #rowHeadersTable
388
+ class="k-pivotgrid-row-headers"
389
+ tableType="rowHeader"></kendo-pivotgrid-table>
390
+ <kendo-pivotgrid-table
391
+ #valuesTable
392
+ [colWidth]="columnHeadersWidth"
393
+ class="k-pivotgrid-values"
394
+ tableType="values"></kendo-pivotgrid-table>
395
+
396
+ <div *ngIf="loading" class="k-loader">
397
+ <kendo-loader
398
+ [type]="loaderSettings?.type"
399
+ [themeColor]="loaderSettings?.themeColor"
400
+ [size]="loaderSettings?.size"
401
+ >
402
+ </kendo-loader>
403
+ <span class="k-loading-text">{{ loadingText }}</span>
404
+ </div>
405
+ </div>
406
+
407
+ <kendo-pivotgrid-configurator
408
+ *ngIf="showConfigurator"
409
+ [horizontal]="configuratorSettings.horizontal">
410
+ </kendo-pivotgrid-configurator>
411
+
412
+ <div *ngIf="configurator"
413
+ class="k-pivotgrid-configurator-button"
414
+ (click)="showConfigurator = !showConfigurator">
415
+ <span>{{ messageFor('configuratorButtonText') }}<span class="k-icon k-i-gear k-color-inherit"></span>
416
+ </span>
154
417
  </div>
155
418
  `,
156
419
  styles: [`
@@ -163,9 +426,30 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
163
426
  }
164
427
  `]
165
428
  }]
166
- }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.NgZone }, { type: i1.PivotGridDataService }, { type: i2.ScrollbarWidthService }]; }, propDecorators: { hostClass: [{
429
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.NgZone }, { type: i1.PivotGridDataService }, { type: i2.LocalizationService }, { type: i3.ScrollbarWidthService }]; }, propDecorators: { hostClass: [{
167
430
  type: HostBinding,
168
- args: ['class.k-pivotgrid']
431
+ args: ['class.k-d-flex']
432
+ }, {
433
+ type: HostBinding,
434
+ args: ['class.k-pos-relative']
435
+ }], rightPositionClass: [{
436
+ type: HostBinding,
437
+ args: ['class.k-flex-row']
438
+ }], leftPositionClass: [{
439
+ type: HostBinding,
440
+ args: ['class.k-flex-row-reverse']
441
+ }], bottomPositionClass: [{
442
+ type: HostBinding,
443
+ args: ['class.k-flex-column']
444
+ }], topPositionClass: [{
445
+ type: HostBinding,
446
+ args: ['class.k-flex-column-reverse']
447
+ }], dir: [{
448
+ type: HostBinding,
449
+ args: ['attr.dir']
450
+ }], ariaRole: [{
451
+ type: HostBinding,
452
+ args: ['attr.role']
169
453
  }], colHeadersTable: [{
170
454
  type: ViewChild,
171
455
  args: ['colHeadersTable', { read: ElementRef }]
@@ -175,6 +459,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
175
459
  }], valuesTable: [{
176
460
  type: ViewChild,
177
461
  args: ['valuesTable', { read: ElementRef }]
462
+ }], table: [{
463
+ type: ViewChild,
464
+ args: ['table', { read: ElementRef }]
178
465
  }], loaderSettings: [{
179
466
  type: Input
467
+ }], configurator: [{
468
+ type: Input
469
+ }], columnHeadersWidth: [{
470
+ type: Input
180
471
  }] } });
@@ -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], imports: [CommonModule,
63
+ PivotOLAPBindingDirective,
64
+ DraggableChipDirective,
65
+ DropTargetDirective,
66
+ LocalizedMessagesDirective,
67
+ CustomMessagesComponent], imports: [CommonModule,
39
68
  EventsModule,
40
- IndicatorsModule], exports: [PivotGridComponent,
69
+ IndicatorsModule,
70
+ ButtonsModule,
71
+ TreeViewModule,
72
+ InputsModule,
73
+ DraggableModule], exports: [PivotGridComponent,
41
74
  PivotGridTableComponent,
42
75
  PivotGridCellDirective,
43
76
  PivotLocalBindingDirective,
44
- PivotOLAPBindingDirective] });
45
- PivotGridModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PivotGridModule, providers: [{
46
- provide: L10N_PREFIX,
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: [...DECLARATIONS],
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
  }"