@progress/kendo-angular-pivotgrid 1.1.2-dev.202211281013 → 11.0.0-develop.79

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 (105) hide show
  1. package/NOTICE.txt +3 -3
  2. package/configurator/chip-kb-nav.directive.d.ts +1 -1
  3. package/configurator/chip-menu/chip-menu-container.component.d.ts +1 -1
  4. package/configurator/chip-menu/chip-menu-filter.component.d.ts +1 -1
  5. package/configurator/chip-menu/chip-menu-item-base.d.ts +1 -1
  6. package/configurator/chip-menu/chip-menu-item-content-template.directive.d.ts +1 -1
  7. package/configurator/chip-menu/chip-menu-item.component.d.ts +1 -1
  8. package/configurator/chip-menu/chip-menu-item.directive.d.ts +1 -1
  9. package/configurator/chip-menu/chip-menu-sort.component.d.ts +1 -1
  10. package/configurator/chip-menu/chip-menu.component.d.ts +1 -1
  11. package/configurator/chip-menu/chip-menu.module.d.ts +1 -1
  12. package/configurator/chip-menu/chip-menu.service.d.ts +1 -1
  13. package/configurator/chip-menu/filtering/filter-menu-container.component.d.ts +4 -5
  14. package/configurator/chip-menu/filtering/filter-menu-dropdownlist.directive.d.ts +1 -1
  15. package/configurator/chip-menu/filtering/menu-tabbing.service.d.ts +1 -1
  16. package/configurator/chip-menu/filtering/string-filter-menu.component.d.ts +1 -1
  17. package/configurator/chip-menu/single-popup.service.d.ts +1 -1
  18. package/configurator/configurator.component.d.ts +1 -1
  19. package/configurator/configurator.service.d.ts +1 -1
  20. package/configurator/draggable.directive.d.ts +1 -1
  21. package/configurator/drop-cue.service.d.ts +1 -1
  22. package/configurator/drop-target.directive.d.ts +1 -1
  23. package/data-binding/base-binding-directive.d.ts +1 -1
  24. package/data-binding/local-binding.directive.d.ts +1 -1
  25. package/data-binding/olap-binding.directive.d.ts +1 -1
  26. package/data-binding/pivotgrid-data.service.d.ts +1 -1
  27. package/{esm2015/configurator/chip-kb-nav.directive.js → esm2020/configurator/chip-kb-nav.directive.mjs} +6 -5
  28. package/{esm2015/configurator/chip-menu/chip-menu-container.component.js → esm2020/configurator/chip-menu/chip-menu-container.component.mjs} +6 -5
  29. package/{esm2015/configurator/chip-menu/chip-menu-filter.component.js → esm2020/configurator/chip-menu/chip-menu-filter.component.mjs} +6 -5
  30. package/{esm2015/configurator/chip-menu/chip-menu-item-base.js → esm2020/configurator/chip-menu/chip-menu-item-base.mjs} +5 -4
  31. package/{esm2015/configurator/chip-menu/chip-menu-item-content-template.directive.js → esm2020/configurator/chip-menu/chip-menu-item-content-template.directive.mjs} +5 -5
  32. package/{esm2015/configurator/chip-menu/chip-menu-item.component.js → esm2020/configurator/chip-menu/chip-menu-item.component.mjs} +6 -6
  33. package/{esm2015/configurator/chip-menu/chip-menu-item.directive.js → esm2020/configurator/chip-menu/chip-menu-item.directive.mjs} +5 -5
  34. package/{esm2015/configurator/chip-menu/chip-menu-sort.component.js → esm2020/configurator/chip-menu/chip-menu-sort.component.mjs} +7 -5
  35. package/{esm2015/configurator/chip-menu/chip-menu.component.js → esm2020/configurator/chip-menu/chip-menu.component.mjs} +7 -5
  36. package/{esm2015/configurator/chip-menu/chip-menu.module.js → esm2020/configurator/chip-menu/chip-menu.module.mjs} +5 -5
  37. package/{esm2015/configurator/chip-menu/chip-menu.service.js → esm2020/configurator/chip-menu/chip-menu.service.mjs} +5 -4
  38. package/{esm2015/configurator/chip-menu/filtering/filter-menu-container.component.js → esm2020/configurator/chip-menu/filtering/filter-menu-container.component.mjs} +18 -21
  39. package/{esm2015/configurator/chip-menu/filtering/filter-menu-dropdownlist.directive.js → esm2020/configurator/chip-menu/filtering/filter-menu-dropdownlist.directive.mjs} +5 -4
  40. package/{esm2015/configurator/chip-menu/filtering/menu-tabbing.service.js → esm2020/configurator/chip-menu/filtering/menu-tabbing.service.mjs} +4 -4
  41. package/{esm2015/configurator/chip-menu/filtering/string-filter-menu.component.js → esm2020/configurator/chip-menu/filtering/string-filter-menu.component.mjs} +11 -8
  42. package/{esm2015/configurator/chip-menu/single-popup.service.js → esm2020/configurator/chip-menu/single-popup.service.mjs} +8 -7
  43. package/{esm2015/configurator/configurator.component.js → esm2020/configurator/configurator.component.mjs} +42 -56
  44. package/{esm2015/configurator/configurator.service.js → esm2020/configurator/configurator.service.mjs} +6 -5
  45. package/{esm2015/configurator/draggable.directive.js → esm2020/configurator/draggable.directive.mjs} +9 -8
  46. package/{esm2015/configurator/drop-cue.service.js → esm2020/configurator/drop-cue.service.mjs} +4 -4
  47. package/{esm2015/configurator/drop-target.directive.js → esm2020/configurator/drop-target.directive.mjs} +11 -10
  48. package/{esm2015/data-binding/base-binding-directive.js → esm2020/data-binding/base-binding-directive.mjs} +8 -7
  49. package/{esm2015/data-binding/local-binding.directive.js → esm2020/data-binding/local-binding.directive.mjs} +7 -6
  50. package/{esm2015/data-binding/olap-binding.directive.js → esm2020/data-binding/olap-binding.directive.mjs} +70 -76
  51. package/{esm2015/data-binding/pivotgrid-data.service.js → esm2020/data-binding/pivotgrid-data.service.mjs} +5 -5
  52. package/{esm2015/main.js → esm2020/index.mjs} +1 -1
  53. package/{esm2015/localization/custom-messages.component.js → esm2020/localization/custom-messages.component.mjs} +5 -4
  54. package/{esm2015/localization/localized-messages.directive.js → esm2020/localization/localized-messages.directive.mjs} +5 -4
  55. package/{esm2015/localization/messages.js → esm2020/localization/messages.mjs} +4 -4
  56. package/{esm2015/localization/pivot-localization.service.js → esm2020/localization/pivot-localization.service.mjs} +5 -4
  57. package/{esm2015/models/configuration-change-event.js → esm2020/models/configuration-change-event.mjs} +1 -1
  58. package/{esm2015/models/drop-section.js → esm2020/models/configurator-orientation.mjs} +1 -1
  59. package/{esm2015/models/drop-target.js → esm2020/models/configurator-position.mjs} +1 -1
  60. package/{esm2015/models/configurator-settings.js → esm2020/models/configurator-settings.mjs} +1 -1
  61. package/{esm2015/models/data-row-item.js → esm2020/models/data-row-item.mjs} +1 -1
  62. package/{esm2015/models/configurator-orientation.js → esm2020/models/drop-section.mjs} +1 -1
  63. package/{esm2015/models/configurator-position.js → esm2020/models/drop-target.mjs} +1 -1
  64. package/{esm2015/models/expanded-change-event.js → esm2020/models/expanded-change-event.mjs} +1 -1
  65. package/esm2020/models/expanded-state-action.mjs +5 -0
  66. package/esm2020/models/loader-settings.mjs +5 -0
  67. package/{esm2015/package-metadata.js → esm2020/package-metadata.mjs} +2 -2
  68. package/{esm2015/pivotgrid.component.js → esm2020/pivotgrid.component.mjs} +16 -34
  69. package/{esm2015/pivotgrid.module.js → esm2020/pivotgrid.module.mjs} +5 -5
  70. package/{esm2015/kendo-angular-pivotgrid.js → esm2020/progress-kendo-angular-pivotgrid.mjs} +2 -2
  71. package/{esm2015/rendering/pivotgrid-cell.directive.js → esm2020/rendering/pivotgrid-cell.directive.mjs} +11 -12
  72. package/{esm2015/rendering/pivotgrid-table.component.js → esm2020/rendering/pivotgrid-table.component.mjs} +11 -10
  73. package/{esm2015/shared.module.js → esm2020/shared.module.mjs} +5 -5
  74. package/{esm2015/util.js → esm2020/util.mjs} +3 -3
  75. package/fesm2015/{kendo-angular-pivotgrid.js → progress-kendo-angular-pivotgrid.mjs} +169 -199
  76. package/fesm2020/progress-kendo-angular-pivotgrid.mjs +3952 -0
  77. package/{main.d.ts → index.d.ts} +1 -1
  78. package/localization/custom-messages.component.d.ts +1 -1
  79. package/localization/localized-messages.directive.d.ts +1 -1
  80. package/localization/messages.d.ts +1 -1
  81. package/localization/pivot-localization.service.d.ts +1 -1
  82. package/models/configuration-change-event.d.ts +1 -1
  83. package/models/configurator-orientation.d.ts +1 -1
  84. package/models/configurator-position.d.ts +1 -1
  85. package/models/configurator-settings.d.ts +1 -1
  86. package/models/data-row-item.d.ts +1 -1
  87. package/models/drop-section.d.ts +1 -1
  88. package/models/drop-target.d.ts +1 -1
  89. package/models/expanded-change-event.d.ts +1 -1
  90. package/models/expanded-state-action.d.ts +1 -1
  91. package/models/loader-settings.d.ts +1 -1
  92. package/package-metadata.d.ts +1 -1
  93. package/package.json +36 -65
  94. package/pivotgrid.component.d.ts +1 -2
  95. package/pivotgrid.module.d.ts +1 -1
  96. package/{kendo-angular-pivotgrid.d.ts → progress-kendo-angular-pivotgrid.d.ts} +2 -2
  97. package/rendering/pivotgrid-cell.directive.d.ts +1 -1
  98. package/rendering/pivotgrid-table.component.d.ts +1 -1
  99. package/schematics/ngAdd/index.js +1 -5
  100. package/shared.module.d.ts +1 -1
  101. package/util.d.ts +1 -1
  102. package/bundles/kendo-angular-pivotgrid.umd.js +0 -5
  103. package/esm2015/models/expanded-state-action.js +0 -5
  104. package/esm2015/models/loader-settings.js +0 -5
  105. package/schematics/ngAdd/index.js.map +0 -1
@@ -0,0 +1,3952 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2022 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the project root for more information
4
+ *-------------------------------------------------------------------------------------------*/
5
+ import * as i0 from '@angular/core';
6
+ import { EventEmitter, Injectable, Output, Component, HostBinding, Input, Directive, ContentChildren, isDevMode, Optional, ContentChild, forwardRef, ViewChild, ElementRef, NgModule } from '@angular/core';
7
+ import { validatePackage } from '@progress/kendo-licensing';
8
+ import * as i3 from '@progress/kendo-angular-common';
9
+ import { isDocumentAvailable, PreventableEvent, Keys, isChanged, hasObservers, anyChanged, EventsModule, DraggableModule } from '@progress/kendo-angular-common';
10
+ import { toTree, toRows, toColumns, toData, configuratorReducer, PIVOT_CONFIGURATOR_ACTION, PivotGridNavigation, ConfiguratorNavigation, HEADERS_ACTION, headersReducer, createFlatSchemaDimensions, createDataTree, createLocalDataState, rootFields, fetchData, createDataState, fetchDiscover, addKPI, buildKPIMeasures } from '@progress/kendo-pivotgrid-common';
11
+ export { averageAggregate, maxAggregate, minAggregate, sumAggregate } from '@progress/kendo-pivotgrid-common';
12
+ import { BehaviorSubject, Subscription, Subject, from, of, fromEvent } from 'rxjs';
13
+ import { take, mergeMap, merge } from 'rxjs/operators';
14
+ import * as i1 from '@progress/kendo-angular-l10n';
15
+ import { ComponentMessages, LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
16
+ import * as i7 from '@angular/common';
17
+ import { CommonModule } from '@angular/common';
18
+ import * as i5$1 from '@progress/kendo-angular-indicators';
19
+ import { IndicatorsModule } from '@progress/kendo-angular-indicators';
20
+ import * as i4 from '@progress/kendo-angular-treeview';
21
+ import { TreeViewComponent, TreeViewModule } from '@progress/kendo-angular-treeview';
22
+ import * as i1$1 from '@progress/kendo-angular-popup';
23
+ import * as i5 from '@progress/kendo-angular-buttons';
24
+ import { ButtonsModule } from '@progress/kendo-angular-buttons';
25
+ import { trigger, state, style, transition, animate } from '@angular/animations';
26
+ import * as i3$1 from '@angular/forms';
27
+ import { NG_VALUE_ACCESSOR, ReactiveFormsModule, FormsModule } from '@angular/forms';
28
+ import * as i1$2 from '@progress/kendo-angular-dropdowns';
29
+ import { DropDownsModule } from '@progress/kendo-angular-dropdowns';
30
+ import * as i6 from '@progress/kendo-angular-inputs';
31
+ import { InputsModule } from '@progress/kendo-angular-inputs';
32
+
33
+ /**
34
+ * @hidden
35
+ */
36
+ const packageMetadata = {
37
+ name: '@progress/kendo-angular-pivotgrid',
38
+ productName: 'Kendo UI for Angular',
39
+ productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
40
+ publishDate: 1672320916,
41
+ version: '',
42
+ 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'
43
+ };
44
+
45
+ const EMPTY_REGEX = /^\s*$/;
46
+ /**
47
+ * @hidden
48
+ */
49
+ const isPresent = (value) => value !== null && value !== undefined;
50
+ /**
51
+ * @hidden
52
+ */
53
+ const isBlank = (value) => value === null || value === undefined;
54
+ /**
55
+ * @hidden
56
+ */
57
+ const isNullOrEmptyString = (value) => isBlank(value) || EMPTY_REGEX.test(value);
58
+ /**
59
+ * @hidden
60
+ * Returns whether two arrays contain the same values.
61
+ * Assumes array elements are primitive types
62
+ */
63
+ const areSameArrays = (a1, a2) => {
64
+ const areArrays = (isPresent(a1) && Array.isArray(a1) && isPresent(a2) && Array.isArray(a2));
65
+ const areOfEqualLength = a1.length === a2.length;
66
+ if (!areArrays || !areOfEqualLength) {
67
+ return false;
68
+ }
69
+ for (let i = 0; i < a1.length; i++) {
70
+ if (a1[i] !== a2[i]) {
71
+ return false;
72
+ }
73
+ }
74
+ return true;
75
+ };
76
+ /**
77
+ * @hidden
78
+ */
79
+ const wheelDelta = (e, axis) => {
80
+ const delta = e[`wheelDelta${axis}`];
81
+ if (e.wheelDelta && (delta === undefined || delta)) {
82
+ return e.wheelDelta;
83
+ }
84
+ if (e.detail && e.axis === e[axis === 'X' ? 'HORIZONTAL_AXIS' : 'VERTICAL_AXIS']) {
85
+ return (-e.detail) * 10;
86
+ }
87
+ return 0;
88
+ };
89
+ /**
90
+ * @hidden
91
+ */
92
+ const syncScroll = (source, targets) => {
93
+ const sourceScrollTop = source.scrollTop;
94
+ const sourceScrollLeft = source.scrollLeft;
95
+ const targetScrollTop = targets[0].scrollTop;
96
+ const targetScrollLeft = targets[1].scrollLeft;
97
+ const syncVertically = sourceScrollTop !== targetScrollTop;
98
+ const syncHorizontally = sourceScrollLeft !== targetScrollLeft;
99
+ if (syncVertically) {
100
+ targets[0].scrollTop = sourceScrollTop;
101
+ }
102
+ else if (syncHorizontally) {
103
+ targets[1].scrollLeft = sourceScrollLeft;
104
+ }
105
+ };
106
+ /**
107
+ * @hidden
108
+ */
109
+ const syncWheel = (event, tables, prop, axis) => {
110
+ const delta = axis === 'Y' ? -(wheelDelta(event, axis)) : wheelDelta(event, axis);
111
+ if (delta) {
112
+ tables[0][prop] =
113
+ tables[1][prop] += delta;
114
+ }
115
+ };
116
+ /**
117
+ * @hidden
118
+ */
119
+ const getDocument = element => element.ownerDocument.documentElement;
120
+ /**
121
+ * @hidden
122
+ */
123
+ const getWindow = element => element.ownerDocument.defaultView;
124
+ /**
125
+ * @hidden
126
+ */
127
+ const offset = element => {
128
+ const { clientTop, clientLeft } = getDocument(element);
129
+ const { pageYOffset, pageXOffset } = getWindow(element);
130
+ const { top, left } = element.getBoundingClientRect();
131
+ return {
132
+ top: top + pageYOffset - clientTop,
133
+ left: left + pageXOffset - clientLeft
134
+ };
135
+ };
136
+ /**
137
+ * @hidden
138
+ */
139
+ const matchAriaAttributes = (wrapper) => {
140
+ const rowHeaderRows = wrapper.querySelectorAll('.k-pivotgrid-row-headers .k-pivotgrid-row');
141
+ const colHeaderCells = wrapper.querySelectorAll('.k-pivotgrid-column-headers th');
142
+ const valueTableCells = wrapper.querySelectorAll('.k-pivotgrid-values td');
143
+ rowHeaderRows.forEach((row, index) => {
144
+ const valueCellsIds = filterAndMap(Array.from(valueTableCells), c => c.getAttribute('id').split('-')[4] === (index + 1).toString(), c => c.getAttribute('id'));
145
+ row.setAttribute('aria-owns', valueCellsIds.join(' '));
146
+ });
147
+ valueTableCells.forEach(cell => {
148
+ const cellColIndex = +cell.getAttribute('id').split('-')[5];
149
+ const colHeaderCellsIds = filterAndMap(Array.from(colHeaderCells), c => {
150
+ const headerCellColIndex = +c.getAttribute('id').split('-')[5];
151
+ const headerCellColspan = +c.getAttribute('colspan');
152
+ const colIndexIsEqual = cellColIndex === headerCellColIndex;
153
+ const cellColIndexIsWithinHeaderCellRange = headerCellColspan > 1 && (headerCellColIndex + headerCellColspan - 1 >= cellColIndex);
154
+ return colIndexIsEqual || cellColIndexIsWithinHeaderCellRange;
155
+ }, c => c.getAttribute('id'));
156
+ cell.setAttribute('aria-describedby', colHeaderCellsIds.join(' '));
157
+ });
158
+ };
159
+ /**
160
+ * @hidden
161
+ */
162
+ const position = (target, before) => {
163
+ const targetRect = offset(target);
164
+ const { offsetWidth, offsetHeight } = target;
165
+ const left = targetRect.left + (before ? 0 : offsetWidth);
166
+ const top = targetRect.top + offsetHeight / 2;
167
+ return { left, top };
168
+ };
169
+ /**
170
+ * @hidden
171
+ */
172
+ const filterAndMap = (arr, predicate, mapper) => arr.reduce((acc, curr) => predicate(curr) ? [...acc, mapper(curr)] : acc, []);
173
+ /**
174
+ * @hidden
175
+ */
176
+ const replaceMessagePlaceholder = (message, name, value) => message.replace(new RegExp(`\{\\s*${name}\\s*\}`, 'g'), value);
177
+ /**
178
+ * @hidden
179
+ */
180
+ const cloneDate = (date) => date ? new Date(date.getTime()) : null;
181
+ /**
182
+ * @hidden
183
+ */
184
+ function clone(obj) {
185
+ const result = {};
186
+ cloneObject(obj, result);
187
+ return result;
188
+ }
189
+ /**
190
+ * @hidden
191
+ */
192
+ function cloneObject(obj, result) {
193
+ for (const field in obj) {
194
+ if (obj.hasOwnProperty(field)) {
195
+ const value = obj[field];
196
+ result[field] = cloneValue(value, result[field]);
197
+ }
198
+ }
199
+ }
200
+ /**
201
+ * @hidden
202
+ */
203
+ function cloneValue(value, nextValue) {
204
+ if (Array.isArray(value)) {
205
+ return cloneArray(value);
206
+ }
207
+ else if (value instanceof Date) {
208
+ return cloneDate(value);
209
+ }
210
+ else if (value && typeof value === 'object') {
211
+ const newNextValue = nextValue || {};
212
+ cloneObject(value, newNextValue);
213
+ return newNextValue;
214
+ }
215
+ return value;
216
+ }
217
+ /**
218
+ * @hidden
219
+ */
220
+ function cloneArray(array) {
221
+ return array.map(value => cloneValue(value, undefined));
222
+ }
223
+ /**
224
+ * @hidden
225
+ */
226
+ const swapItems = (arr, i1, i2) => {
227
+ const temp = arr[i1];
228
+ arr[i1] = arr[i2];
229
+ arr[i2] = temp;
230
+ };
231
+
232
+ /**
233
+ * @hidden
234
+ */
235
+ let nextPivotGridId = 0;
236
+ /**
237
+ * @hidden
238
+ */
239
+ class PivotGridDataService {
240
+ constructor(ngZone) {
241
+ this.ngZone = ngZone;
242
+ this.expandedStateChange = new EventEmitter();
243
+ this.configuratorFieldChange = new EventEmitter();
244
+ this.expandedFieldChange = new EventEmitter();
245
+ this.columnHeaderRows = new BehaviorSubject([]);
246
+ this.columnHeaderCols = new BehaviorSubject([]);
247
+ this.rowHeaderCols = new BehaviorSubject([]);
248
+ this.rowHeaderRows = new BehaviorSubject([]);
249
+ this.valuesRows = new BehaviorSubject([]);
250
+ this.loading = new BehaviorSubject(false);
251
+ this.fields = new BehaviorSubject([]);
252
+ this.configuredFields = new BehaviorSubject([]);
253
+ this.pivotGridId = nextPivotGridId++;
254
+ }
255
+ updateRowsAndCols() {
256
+ const rowsTree = toTree((this.rows || []).slice());
257
+ const [rowHeaderRows, rowHeaderLeaves, rowHeaderDepth, rowHeaderBreadth] = toRows(rowsTree);
258
+ const columnsTree = toTree((this.columns || []).slice());
259
+ const [columnHeaderRows, columnHeaderLeaves, columnHeaderBreadth] = toColumns(columnsTree);
260
+ this.columnHeaderLeaves = columnHeaderLeaves;
261
+ this.columnHeaderCols.next(columnHeaderLeaves);
262
+ this.columnHeaderRows.next(columnHeaderRows);
263
+ this.rowHeaderLeaves = rowHeaderLeaves;
264
+ this.rowHeaderCols.next(new Array(rowHeaderBreadth).fill({}));
265
+ this.rowHeaderRows.next(rowHeaderRows);
266
+ this.valuesRows.next(toData((this.normalizedData || []).slice(), columnHeaderLeaves, rowHeaderLeaves, columnHeaderBreadth, rowHeaderDepth));
267
+ if (isDocumentAvailable()) {
268
+ this.ngZone.runOutsideAngular(() => {
269
+ // needed because all tables need to be rendered in accordance with the new settings
270
+ // before applying the required DOM attributes
271
+ setTimeout(() => matchAriaAttributes(this.wrapper));
272
+ });
273
+ }
274
+ }
275
+ }
276
+ PivotGridDataService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PivotGridDataService, deps: [{ token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable });
277
+ PivotGridDataService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PivotGridDataService });
278
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PivotGridDataService, decorators: [{
279
+ type: Injectable
280
+ }], ctorParameters: function () { return [{ type: i0.NgZone }]; }, propDecorators: { expandedStateChange: [{
281
+ type: Output
282
+ }], configuratorFieldChange: [{
283
+ type: Output
284
+ }], expandedFieldChange: [{
285
+ type: Output
286
+ }] } });
287
+
288
+ /**
289
+ * @hidden
290
+ *
291
+ * Needed to keep the Pivot's LocalizationService reference and be able to use it inside the ChipList component.
292
+ */
293
+ class PivotLocalizationService {
294
+ constructor(localization) {
295
+ this.localization = localization;
296
+ }
297
+ get(token) {
298
+ return this.localization.get(token);
299
+ }
300
+ get rtl() {
301
+ return this.localization.rtl;
302
+ }
303
+ }
304
+ PivotLocalizationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PivotLocalizationService, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Injectable });
305
+ PivotLocalizationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PivotLocalizationService });
306
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PivotLocalizationService, decorators: [{
307
+ type: Injectable
308
+ }], ctorParameters: function () { return [{ type: i1.LocalizationService }]; } });
309
+
310
+ /**
311
+ * @hidden
312
+ */
313
+ class PivotGridCellDirective {
314
+ constructor(hostEl, renderer, dataService) {
315
+ this.hostEl = hostEl;
316
+ this.renderer = renderer;
317
+ this.dataService = dataService;
318
+ this.cellClass = true;
319
+ this.handleClick = () => {
320
+ this.dataService.expandedStateChange.emit({
321
+ action: this.expanded ? 'collapse' : 'expand',
322
+ cell: this.kendoPivotGridCell,
323
+ tableType: this.tableType
324
+ });
325
+ };
326
+ }
327
+ get expanded() {
328
+ return this.kendoPivotGridCell?.hasChildren && this.kendoPivotGridCell.children.length;
329
+ }
330
+ ngOnInit() {
331
+ const nativeElement = this.hostEl.nativeElement;
332
+ this.renderer.setAttribute(nativeElement, 'rowspan', this.kendoPivotGridCell.rowSpan || 1);
333
+ this.renderer.setAttribute(nativeElement, 'colspan', this.kendoPivotGridCell.colSpan || 1);
334
+ const classesToAdd = {
335
+ 'k-pivotgrid-header-total': this.kendoPivotGridCell?.total || (this.tableType === 'values'
336
+ && (this.dataService.rowHeaderLeaves[this.rowIndex].total ||
337
+ this.dataService.columnHeaderLeaves[this.colIndex].total)),
338
+ 'k-pivotgrid-header-root': this.kendoPivotGridCell?.levelNum === 0,
339
+ 'k-pivotgrid-expanded': this.kendoPivotGridCell?.hasChildren && this.kendoPivotGridCell.children.length,
340
+ 'k-first': this.colIndex > 0
341
+ };
342
+ for (const prop in classesToAdd) {
343
+ if (classesToAdd[prop]) {
344
+ this.renderer.addClass(nativeElement, prop);
345
+ }
346
+ }
347
+ }
348
+ }
349
+ PivotGridCellDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PivotGridCellDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: PivotGridDataService }], target: i0.ɵɵFactoryTarget.Component });
350
+ PivotGridCellDirective.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: PivotGridCellDirective, selector: "[kendoPivotGridCell]", inputs: { kendoPivotGridCell: "kendoPivotGridCell", tableType: "tableType", rowIndex: "rowIndex", colIndex: "colIndex" }, host: { properties: { "class.k-pivotgrid-cell": "this.cellClass" } }, ngImport: i0, template: `
351
+ <span
352
+ *ngIf="kendoPivotGridCell.hasChildren && !kendoPivotGridCell.total"
353
+ class="k-icon"
354
+ aria-hidden="true"
355
+ [kendoEventsOutsideAngular]="{
356
+ click: handleClick
357
+ }"
358
+ [ngClass]="{
359
+ 'k-i-arrow-chevron-up': expanded,
360
+ 'k-i-arrow-chevron-down': !expanded
361
+ }"></span>{{ kendoPivotGridCell.data ? kendoPivotGridCell.data.fmtValue : kendoPivotGridCell.caption }}`, isInline: true, directives: [{ type: i7.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.EventsOutsideAngularDirective, selector: "[kendoEventsOutsideAngular]", inputs: ["kendoEventsOutsideAngular", "scope"] }, { type: i7.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
362
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PivotGridCellDirective, decorators: [{
363
+ type: Component,
364
+ args: [{
365
+ // eslint-disable-next-line @angular-eslint/component-selector
366
+ selector: '[kendoPivotGridCell]',
367
+ template: `
368
+ <span
369
+ *ngIf="kendoPivotGridCell.hasChildren && !kendoPivotGridCell.total"
370
+ class="k-icon"
371
+ aria-hidden="true"
372
+ [kendoEventsOutsideAngular]="{
373
+ click: handleClick
374
+ }"
375
+ [ngClass]="{
376
+ 'k-i-arrow-chevron-up': expanded,
377
+ 'k-i-arrow-chevron-down': !expanded
378
+ }"></span>{{ kendoPivotGridCell.data ? kendoPivotGridCell.data.fmtValue : kendoPivotGridCell.caption }}`
379
+ }]
380
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: PivotGridDataService }]; }, propDecorators: { cellClass: [{
381
+ type: HostBinding,
382
+ args: ['class.k-pivotgrid-cell']
383
+ }], kendoPivotGridCell: [{
384
+ type: Input
385
+ }], tableType: [{
386
+ type: Input
387
+ }], rowIndex: [{
388
+ type: Input
389
+ }], colIndex: [{
390
+ type: Input
391
+ }] } });
392
+
393
+ /**
394
+ * @hidden
395
+ */
396
+ class PivotGridTableComponent {
397
+ constructor(dataService) {
398
+ this.dataService = dataService;
399
+ this.dataChangeSubs = new Subscription();
400
+ }
401
+ get pivotGridId() {
402
+ return `kendo-pivotgrid-${this.dataService.pivotGridId}-`;
403
+ }
404
+ ngOnInit() {
405
+ this.dataChangeSubs.add(this.dataService[`${this.tableType}Rows`].subscribe(rows => this.rows = rows));
406
+ this.dataChangeSubs.add(this.tableType === 'values' ?
407
+ this.dataService.columnHeaderCols.subscribe(cols => this.headerItems = cols) :
408
+ this.dataService[`${this.tableType}Cols`].subscribe(cols => this.headerItems = cols));
409
+ }
410
+ ngOnDestroy() {
411
+ this.dataChangeSubs.unsubscribe();
412
+ }
413
+ }
414
+ PivotGridTableComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PivotGridTableComponent, deps: [{ token: PivotGridDataService }], target: i0.ɵɵFactoryTarget.Component });
415
+ PivotGridTableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: PivotGridTableComponent, selector: "kendo-pivotgrid-table", inputs: { tableType: "tableType", colWidth: "colWidth" }, ngImport: i0, template: `
416
+ <table
417
+ class="k-pivotgrid-table"
418
+ role="presentation">
419
+ <colgroup>
420
+ <col
421
+ *ngFor="let item of headerItems;"
422
+ [style.width]="tableType !== 'rowHeader' ? colWidth >= 0 ? colWidth + 'px' : '200px' : undefined" />
423
+ </colgroup>
424
+ <tbody class="k-pivotgrid-tbody" [attr.role]="tableType === 'values' ? 'none' : 'rowgroup'">
425
+ <tr *ngFor="let row of rows; index as rowIndex"
426
+ class="k-pivotgrid-row"
427
+ [attr.role]="tableType === 'values' ? 'none' : 'row'">
428
+ <ng-container *ngFor="let cell of row.cells; index as colIndex">
429
+ <th
430
+ *ngIf="cell && tableType !== 'values'"
431
+ [kendoPivotGridCell]="cell"
432
+ [tableType]="tableType"
433
+ [colIndex]="colIndex"
434
+ [rowIndex]="rowIndex"
435
+ [attr.aria-expanded]="cell.hasChildren && cell.children.length ? 'true' : 'false'"
436
+ [attr.role]="tableType === 'columnHeader' ? 'columnheader' : tableType === 'rowHeader' ? 'rowheader' : 'none'"
437
+ [attr.id]="pivotGridId + (tableType === 'columnHeader' ? 'ch-' : 'rh-') + (rowIndex + 1) + '-' + (colIndex + 1)"></th>
438
+ <td
439
+ *ngIf="cell && tableType === 'values'"
440
+ [kendoPivotGridCell]="cell"
441
+ tableType="values"
442
+ [colIndex]="colIndex"
443
+ [rowIndex]="rowIndex"
444
+ role="gridcell"
445
+ [attr.id]="pivotGridId + 'cell-' + (rowIndex + 1) + '-' + (colIndex + 1)"></td>
446
+ </ng-container>
447
+ </tr>
448
+ </tbody>
449
+ </table>
450
+ `, isInline: true, components: [{ type: PivotGridCellDirective, selector: "[kendoPivotGridCell]", inputs: ["kendoPivotGridCell", "tableType", "rowIndex", "colIndex"] }], directives: [{ type: i7.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i7.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
451
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PivotGridTableComponent, decorators: [{
452
+ type: Component,
453
+ args: [{
454
+ selector: 'kendo-pivotgrid-table',
455
+ template: `
456
+ <table
457
+ class="k-pivotgrid-table"
458
+ role="presentation">
459
+ <colgroup>
460
+ <col
461
+ *ngFor="let item of headerItems;"
462
+ [style.width]="tableType !== 'rowHeader' ? colWidth >= 0 ? colWidth + 'px' : '200px' : undefined" />
463
+ </colgroup>
464
+ <tbody class="k-pivotgrid-tbody" [attr.role]="tableType === 'values' ? 'none' : 'rowgroup'">
465
+ <tr *ngFor="let row of rows; index as rowIndex"
466
+ class="k-pivotgrid-row"
467
+ [attr.role]="tableType === 'values' ? 'none' : 'row'">
468
+ <ng-container *ngFor="let cell of row.cells; index as colIndex">
469
+ <th
470
+ *ngIf="cell && tableType !== 'values'"
471
+ [kendoPivotGridCell]="cell"
472
+ [tableType]="tableType"
473
+ [colIndex]="colIndex"
474
+ [rowIndex]="rowIndex"
475
+ [attr.aria-expanded]="cell.hasChildren && cell.children.length ? 'true' : 'false'"
476
+ [attr.role]="tableType === 'columnHeader' ? 'columnheader' : tableType === 'rowHeader' ? 'rowheader' : 'none'"
477
+ [attr.id]="pivotGridId + (tableType === 'columnHeader' ? 'ch-' : 'rh-') + (rowIndex + 1) + '-' + (colIndex + 1)"></th>
478
+ <td
479
+ *ngIf="cell && tableType === 'values'"
480
+ [kendoPivotGridCell]="cell"
481
+ tableType="values"
482
+ [colIndex]="colIndex"
483
+ [rowIndex]="rowIndex"
484
+ role="gridcell"
485
+ [attr.id]="pivotGridId + 'cell-' + (rowIndex + 1) + '-' + (colIndex + 1)"></td>
486
+ </ng-container>
487
+ </tr>
488
+ </tbody>
489
+ </table>
490
+ `
491
+ }]
492
+ }], ctorParameters: function () { return [{ type: PivotGridDataService }]; }, propDecorators: { tableType: [{
493
+ type: Input
494
+ }], colWidth: [{
495
+ type: Input
496
+ }] } });
497
+
498
+ /**
499
+ * @hidden
500
+ */
501
+ class PivotGridState {
502
+ constructor(columnAxes, rowAxes, measureAxes, sort, filter) {
503
+ this.columnAxes = columnAxes;
504
+ this.rowAxes = rowAxes;
505
+ this.measureAxes = measureAxes;
506
+ this.sort = sort;
507
+ this.filter = filter;
508
+ }
509
+ }
510
+
511
+ /**
512
+ * @hidden
513
+ */
514
+ class ConfiguratorService {
515
+ constructor(dataService) {
516
+ this.dataService = dataService;
517
+ this.configuratorStateChange = new EventEmitter();
518
+ }
519
+ parseConfiguratorState(action) {
520
+ const newState = configuratorReducer({
521
+ filter: this.dataService.state.filter,
522
+ sort: this.dataService.state.sort,
523
+ rowAxes: this.dataService.state.rowAxes,
524
+ columnAxes: this.dataService.state.columnAxes,
525
+ measureAxes: this.dataService.state.measureAxes,
526
+ dragItem: this.state.dragItem,
527
+ dropDirection: this.state.dropDirection,
528
+ dropTarget: this.state.dropTarget,
529
+ dropZone: this.state.dropZone
530
+ }, action);
531
+ Object.keys(newState).forEach(key => newState[key] === undefined && delete newState[key]);
532
+ this.state = { ...this.state, ...newState };
533
+ this.dataService.state = new PivotGridState(this.state.columnAxes, this.state.rowAxes, this.state.measureAxes, this.state.sort, this.state.filter);
534
+ this.configuratorStateChange.emit(this.state);
535
+ }
536
+ }
537
+ ConfiguratorService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ConfiguratorService, deps: [{ token: PivotGridDataService }], target: i0.ɵɵFactoryTarget.Injectable });
538
+ ConfiguratorService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ConfiguratorService });
539
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ConfiguratorService, decorators: [{
540
+ type: Injectable
541
+ }], ctorParameters: function () { return [{ type: PivotGridDataService }]; }, propDecorators: { configuratorStateChange: [{
542
+ type: Output
543
+ }] } });
544
+
545
+ /**
546
+ * @hidden
547
+ */
548
+ const append = (element, container) => {
549
+ let appended = false;
550
+ return () => {
551
+ if (!appended) {
552
+ container.appendChild(element);
553
+ appended = true;
554
+ }
555
+ return element;
556
+ };
557
+ };
558
+ /**
559
+ * @hidden
560
+ */
561
+ class DropCueService {
562
+ create() {
563
+ this.dom = document.createElement('span');
564
+ const wrapper = document.createElement('div');
565
+ wrapper.classList.add('k-drop-hint', 'k-drop-hint-v');
566
+ const hintStart = document.createElement('div');
567
+ hintStart.classList.add('k-drop-hint-start');
568
+ const hintLine = document.createElement('div');
569
+ hintLine.classList.add('k-drop-hint-line');
570
+ const hintEnd = document.createElement('div');
571
+ hintEnd.classList.add('k-drop-hint-end');
572
+ wrapper.append(hintStart, hintLine, hintEnd);
573
+ this.dom.append(wrapper);
574
+ this.hide();
575
+ }
576
+ attach(container) {
577
+ return append(this.dom, container)();
578
+ }
579
+ remove(container) {
580
+ if (this.dom && this.dom.parentElement && container.contains(this.dom)) {
581
+ container.removeChild(this.dom);
582
+ this.dom = null;
583
+ }
584
+ }
585
+ hide() {
586
+ this.dom.style.display = 'none';
587
+ }
588
+ show(direction, container, target) {
589
+ if (!this.dom) {
590
+ this.create();
591
+ }
592
+ if (direction === 'before') {
593
+ container.insertBefore(this.dom, target);
594
+ }
595
+ else {
596
+ if (target.classList.contains('k-chip') && target.matches(':last-child')) {
597
+ container.insertBefore(this.dom, target);
598
+ return;
599
+ }
600
+ // eslint-disable-next-line no-unused-expressions
601
+ target.classList.contains('k-chip') ? target.after(this.dom) : container.appendChild(this.dom);
602
+ }
603
+ this.dom.style.display = '';
604
+ }
605
+ }
606
+ DropCueService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: DropCueService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
607
+ DropCueService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: DropCueService });
608
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: DropCueService, decorators: [{
609
+ type: Injectable
610
+ }] });
611
+
612
+ const contains = (node, predicate) => {
613
+ while (node) {
614
+ if (predicate(node)) {
615
+ return true;
616
+ }
617
+ node = node.parentNode;
618
+ }
619
+ return false;
620
+ };
621
+ /**
622
+ * @hidden
623
+ * Arguments for the `close` event of the chip-menu popup.
624
+ */
625
+ class PopupCloseEvent extends PreventableEvent {
626
+ constructor(e) {
627
+ super();
628
+ this.originalEvent = e;
629
+ }
630
+ }
631
+ const DEFAULT_POPUP_CLASS = 'k-grid-filter-popup';
632
+ /**
633
+ * @hidden
634
+ * The service that is used for the popups of the chip menus.
635
+ */
636
+ class SinglePopupService {
637
+ constructor(popupService, renderer, ngZone, localization) {
638
+ this.popupService = popupService;
639
+ this.renderer = renderer;
640
+ this.ngZone = ngZone;
641
+ this.localization = localization;
642
+ /**
643
+ * Fires when the chip menus are about to close because the user clicked outside their popups.
644
+ * Used to prevent the popup from closing.
645
+ */
646
+ this.onClose = new Subject();
647
+ this.pointerEventsSub = new Subscription();
648
+ this.scrollSubscription = new Subscription();
649
+ }
650
+ open(anchor, template, popupRef, popupClass = DEFAULT_POPUP_CLASS) {
651
+ const toggle = isPresent(popupRef) && this.popupRef === popupRef;
652
+ this.destroy();
653
+ if (!toggle) {
654
+ const direction = this.localization.rtl ? 'right' : 'left';
655
+ this.popupRef = this.popupService.open({
656
+ anchorAlign: { vertical: 'bottom', horizontal: direction },
657
+ popupAlign: { vertical: 'top', horizontal: direction },
658
+ anchor: anchor,
659
+ popupClass: popupClass,
660
+ content: template,
661
+ positionMode: "absolute"
662
+ });
663
+ this.renderer.setAttribute(this.popupRef.popupElement, 'dir', this.localization.rtl ? 'rtl' : 'ltr');
664
+ this.attachClose(anchor);
665
+ }
666
+ const popupEl = this.popupRef?.popupElement;
667
+ if (popupEl) {
668
+ this.attachMouseListeners(popupEl);
669
+ }
670
+ return this.popupRef;
671
+ }
672
+ destroy() {
673
+ if (this.popupRef) {
674
+ this.detachClose();
675
+ this.pointerEventsSub.unsubscribe();
676
+ this.pointerEventsSub = null;
677
+ this.popupRef.close();
678
+ this.popupRef = null;
679
+ }
680
+ }
681
+ ngOnDestroy() {
682
+ this.destroy();
683
+ this.scrollSubscription.unsubscribe();
684
+ }
685
+ detachClose() {
686
+ if (this.removeClick) {
687
+ this.removeClick();
688
+ }
689
+ }
690
+ attachClose(skipElement) {
691
+ this.detachClose();
692
+ this.ngZone.runOutsideAngular(() => this.removeClick = this.renderer.listen('document', 'click', (e) => {
693
+ if (!contains(e.target, x => this.popupRef.popupElement === x || x === skipElement)) {
694
+ const args = new PopupCloseEvent(e);
695
+ this.onClose.next(args);
696
+ if (!args.isDefaultPrevented() && this.canClosePopup) {
697
+ this.destroy();
698
+ }
699
+ this.canClosePopup = true;
700
+ }
701
+ }));
702
+ }
703
+ attachMouseListeners(el) {
704
+ this.pointerEventsSub = new Subscription();
705
+ this.ngZone.runOutsideAngular(() => {
706
+ this.pointerEventsSub.add(this.renderer.listen(el, 'pointerdown', (e) => {
707
+ e.stopImmediatePropagation();
708
+ this.canClosePopup = false;
709
+ }));
710
+ this.pointerEventsSub.add(this.renderer.listen(el, 'pointerup', () => {
711
+ this.canClosePopup = true;
712
+ }));
713
+ });
714
+ }
715
+ }
716
+ SinglePopupService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: SinglePopupService, deps: [{ token: i1$1.PopupService }, { token: i0.Renderer2 }, { token: i0.NgZone }, { token: PivotLocalizationService }], target: i0.ɵɵFactoryTarget.Injectable });
717
+ SinglePopupService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: SinglePopupService });
718
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: SinglePopupService, decorators: [{
719
+ type: Injectable
720
+ }], ctorParameters: function () { return [{ type: i1$1.PopupService }, { type: i0.Renderer2 }, { type: i0.NgZone }, { type: PivotLocalizationService }]; } });
721
+
722
+ /**
723
+ * @hidden
724
+ */
725
+ class MenuTabbingService {
726
+ constructor() {
727
+ this.isColumnMenu = false;
728
+ this.isPopupOpen = false;
729
+ }
730
+ }
731
+ MenuTabbingService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: MenuTabbingService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
732
+ MenuTabbingService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: MenuTabbingService });
733
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: MenuTabbingService, decorators: [{
734
+ type: Injectable
735
+ }] });
736
+
737
+ /**
738
+ * @hidden
739
+ * Represents the service that is passed to the ChipMenuFilterComponent and ChipMenuSortComponent.
740
+ */
741
+ class ChipMenuService {
742
+ constructor(menuTabbingService) {
743
+ this.closeMenu = new EventEmitter();
744
+ this.menuTabbingService = menuTabbingService;
745
+ }
746
+ /**
747
+ * Closes the chip menu.
748
+ */
749
+ close() {
750
+ this.closeMenu.emit();
751
+ }
752
+ }
753
+ ChipMenuService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ChipMenuService, deps: [{ token: MenuTabbingService }], target: i0.ɵɵFactoryTarget.Injectable });
754
+ ChipMenuService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ChipMenuService });
755
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ChipMenuService, decorators: [{
756
+ type: Injectable
757
+ }], ctorParameters: function () { return [{ type: MenuTabbingService }]; } });
758
+
759
+ /**
760
+ * @hidden
761
+ */
762
+ class ChipMenuItemDirective {
763
+ constructor(hostElement, renderer, ngZone) {
764
+ this.hostElement = hostElement;
765
+ this.renderer = renderer;
766
+ this.ngZone = ngZone;
767
+ this._isFirst = false;
768
+ this._isLast = false;
769
+ this.subs = new Subscription();
770
+ this.onTab = (e) => {
771
+ if (e.keyCode !== Keys.Tab) {
772
+ return;
773
+ }
774
+ if (this.isFirst && e.shiftKey && e.target === this.chipMenuItems[0]) {
775
+ e.preventDefault();
776
+ this.menuItemComponent.service.menuTabbingService.lastFocusable.focus();
777
+ }
778
+ if (this.isLast && !e.shiftKey) {
779
+ const lastColumnMenuItem = this.getLastColumnMenuItem();
780
+ const isExpanded = this.menuItemComponent.expanded;
781
+ if (lastColumnMenuItem === e.target && !isExpanded) {
782
+ e.preventDefault();
783
+ this.menuItemComponent.service.menuTabbingService.firstFocusable.focus();
784
+ }
785
+ }
786
+ };
787
+ }
788
+ set isFirst(value) {
789
+ if (value) {
790
+ const focusableElement = this.chipMenuItems[0];
791
+ this.menuItemComponent.service.menuTabbingService.firstFocusable = focusableElement;
792
+ this.ngZone.runOutsideAngular(() => {
793
+ const firstItemKeydownSub = this.renderer.listen(focusableElement, 'keydown', this.onTab);
794
+ this.subs.add(firstItemKeydownSub);
795
+ });
796
+ }
797
+ this._isFirst = value;
798
+ }
799
+ get isFirst() {
800
+ return this._isFirst;
801
+ }
802
+ set isLast(value) {
803
+ if (!this.chipMenuItems) {
804
+ return;
805
+ }
806
+ if (value) {
807
+ const lastFocusableElement = this.getLastColumnMenuItem();
808
+ this.menuItemComponent.service.menuTabbingService.lastFocusable = lastFocusableElement;
809
+ this.ngZone.runOutsideAngular(() => {
810
+ const lastItemKeydownSub = this.renderer.listen(lastFocusableElement, 'keydown', this.onTab);
811
+ this.subs.add(lastItemKeydownSub);
812
+ });
813
+ }
814
+ this._isLast = value;
815
+ }
816
+ get isLast() {
817
+ return this._isLast;
818
+ }
819
+ ngAfterViewInit() {
820
+ this.chipMenuItems = this.hostElement.nativeElement.querySelectorAll('.k-columnmenu-item');
821
+ this.chipMenuItems.forEach(el => this.renderer.setAttribute(el, 'tabindex', '0'));
822
+ }
823
+ ngOnDestroy() {
824
+ this.subs.unsubscribe();
825
+ }
826
+ getLastColumnMenuItem() {
827
+ return (this.chipMenuItems.length === 1 ? this.chipMenuItems[0] : this.chipMenuItems[1]);
828
+ }
829
+ }
830
+ ChipMenuItemDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ChipMenuItemDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Directive });
831
+ ChipMenuItemDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: ChipMenuItemDirective, selector: "[kendoPivotChipMenuItem]", inputs: { menuItemComponent: ["kendoPivotChipMenuItem", "menuItemComponent"] }, ngImport: i0 });
832
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ChipMenuItemDirective, decorators: [{
833
+ type: Directive,
834
+ args: [{ selector: '[kendoPivotChipMenuItem]' }]
835
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.NgZone }]; }, propDecorators: { menuItemComponent: [{
836
+ type: Input,
837
+ args: ['kendoPivotChipMenuItem']
838
+ }] } });
839
+
840
+ /**
841
+ * @hidden
842
+ */
843
+ class ChipMenuContainerComponent {
844
+ constructor(service, ngZone) {
845
+ this.service = service;
846
+ this.ngZone = ngZone;
847
+ this.hostClass = true;
848
+ }
849
+ ngAfterViewInit() {
850
+ if (!this.chipMenuItems.length) {
851
+ return;
852
+ }
853
+ this.chipMenuItems.first.isFirst = true;
854
+ this.chipMenuItems.last.isLast = true;
855
+ this.ngZone.onStable.pipe(take(1)).subscribe(() => this.service.menuTabbingService.firstFocusable.focus());
856
+ }
857
+ }
858
+ ChipMenuContainerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ChipMenuContainerComponent, deps: [{ token: ChipMenuService }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
859
+ ChipMenuContainerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: ChipMenuContainerComponent, selector: "kendo-pivot-chipmenu-container", host: { properties: { "class.k-grid-columnmenu-popup": "this.hostClass" } }, queries: [{ propertyName: "chipMenuItems", predicate: ChipMenuItemDirective, descendants: true }], ngImport: i0, template: `
860
+ <ng-content></ng-content>
861
+ `, isInline: true });
862
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ChipMenuContainerComponent, decorators: [{
863
+ type: Component,
864
+ args: [{
865
+ selector: 'kendo-pivot-chipmenu-container',
866
+ template: `
867
+ <ng-content></ng-content>
868
+ `
869
+ }]
870
+ }], ctorParameters: function () { return [{ type: ChipMenuService }, { type: i0.NgZone }]; }, propDecorators: { chipMenuItems: [{
871
+ type: ContentChildren,
872
+ args: [ChipMenuItemDirective, { descendants: true }]
873
+ }], hostClass: [{
874
+ type: HostBinding,
875
+ args: ['class.k-grid-columnmenu-popup']
876
+ }] } });
877
+
878
+ /**
879
+ * @hidden
880
+ */
881
+ class ChipMenuItemBase {
882
+ constructor() {
883
+ this.hostClass = true;
884
+ }
885
+ ngOnInit() {
886
+ if (isDevMode() && !this.service) {
887
+ throw new Error('The service input of the host chip menu components (e.g. ChipMenuSortComponent) is mandatory.');
888
+ }
889
+ }
890
+ close() {
891
+ this.service.close();
892
+ }
893
+ }
894
+ ChipMenuItemBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ChipMenuItemBase, deps: [], target: i0.ɵɵFactoryTarget.Component });
895
+ ChipMenuItemBase.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: ChipMenuItemBase, selector: "kendo-pivot-chip-menu-item-base", inputs: { service: "service" }, host: { properties: { "class.k-columnmenu-item-wrapper": "this.hostClass" } }, ngImport: i0, template: ``, isInline: true });
896
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ChipMenuItemBase, decorators: [{
897
+ type: Component,
898
+ args: [{
899
+ selector: 'kendo-pivot-chip-menu-item-base',
900
+ template: ``
901
+ }]
902
+ }], propDecorators: { service: [{
903
+ type: Input
904
+ }], hostClass: [{
905
+ type: HostBinding,
906
+ args: ['class.k-columnmenu-item-wrapper']
907
+ }] } });
908
+
909
+ /**
910
+ * @hidden
911
+ *
912
+ * Represents the content template of the ChipMenuItemComponent.
913
+ * Provides an option for specifying the content of a chip menu item..
914
+ */
915
+ class ChipMenuItemContentTemplateDirective {
916
+ constructor(templateRef) {
917
+ this.templateRef = templateRef;
918
+ }
919
+ }
920
+ ChipMenuItemContentTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ChipMenuItemContentTemplateDirective, deps: [{ token: i0.TemplateRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
921
+ ChipMenuItemContentTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: ChipMenuItemContentTemplateDirective, selector: "[kendoPivotChipMenuItemContentTemplate]", ngImport: i0 });
922
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ChipMenuItemContentTemplateDirective, decorators: [{
923
+ type: Directive,
924
+ args: [{
925
+ selector: '[kendoPivotChipMenuItemContentTemplate]'
926
+ }]
927
+ }], ctorParameters: function () { return [{ type: i0.TemplateRef, decorators: [{
928
+ type: Optional
929
+ }] }]; } });
930
+
931
+ /**
932
+ * @hidden
933
+ *
934
+ */
935
+ class ChipMenuItemComponent {
936
+ constructor() {
937
+ /**
938
+ * Fires when the item is clicked.
939
+ */
940
+ this.itemClick = new EventEmitter();
941
+ /**
942
+ * Fires when the content is expanded.
943
+ */
944
+ this.expand = new EventEmitter();
945
+ /**
946
+ * Fires when the content is collapsed.
947
+ */
948
+ this.collapse = new EventEmitter();
949
+ this.contentState = 'collapsed';
950
+ }
951
+ get iconClass() {
952
+ return `k-i-${this.icon}`;
953
+ }
954
+ ngOnChanges(changes) {
955
+ if (changes.expanded) {
956
+ this.updateContentState();
957
+ }
958
+ }
959
+ onClick(e) {
960
+ this.itemClick.emit(e);
961
+ if (this.contentTemplate) {
962
+ this.expanded = !this.expanded;
963
+ this.updateContentState();
964
+ if (this.expanded) {
965
+ this.expand.emit();
966
+ }
967
+ else {
968
+ this.collapse.emit();
969
+ }
970
+ }
971
+ }
972
+ updateContentState() {
973
+ this.contentState = this.expanded ? 'expanded' : 'collapsed';
974
+ }
975
+ }
976
+ ChipMenuItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ChipMenuItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
977
+ ChipMenuItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: ChipMenuItemComponent, selector: "kendo-pivot-chipmenu-item", inputs: { icon: "icon", text: "text", selected: "selected", expanded: "expanded" }, outputs: { itemClick: "itemClick", expand: "expand", collapse: "collapse" }, queries: [{ propertyName: "contentTemplate", first: true, predicate: ChipMenuItemContentTemplateDirective, descendants: true }], usesOnChanges: true, ngImport: i0, template: `
978
+ <div
979
+ class="k-columnmenu-item"
980
+ (click)="onClick($event)"
981
+ (keydown.enter)="onClick($event)"
982
+ [class.k-selected]="selected"
983
+ role="button"
984
+ [attr.aria-expanded]="expanded">
985
+ <span *ngIf="icon" class="k-icon" [ngClass]="iconClass">
986
+ </span>
987
+ {{ text }}
988
+ </div>
989
+ <div *ngIf="contentTemplate" [@state]="contentState" [style.overflow]="'hidden'" class="k-columnmenu-item-content">
990
+ <ng-container [ngTemplateOutlet]="contentTemplate.templateRef">
991
+ </ng-container>
992
+ <div>
993
+ `, isInline: true, directives: [{ type: i7.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i7.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i7.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], animations: [
994
+ trigger('state', [
995
+ state('collapsed', style({ display: 'none' })),
996
+ state('expanded', style({ display: 'block' })),
997
+ transition('collapsed => expanded', [
998
+ style({
999
+ height: '0px',
1000
+ display: 'block'
1001
+ }),
1002
+ animate('100ms ease-in', style({
1003
+ height: '*'
1004
+ }))
1005
+ ]),
1006
+ transition('expanded => collapsed', [
1007
+ style({
1008
+ height: '*'
1009
+ }),
1010
+ animate('100ms ease-in', style({
1011
+ height: '0px'
1012
+ }))
1013
+ ])
1014
+ ])
1015
+ ] });
1016
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ChipMenuItemComponent, decorators: [{
1017
+ type: Component,
1018
+ args: [{
1019
+ animations: [
1020
+ trigger('state', [
1021
+ state('collapsed', style({ display: 'none' })),
1022
+ state('expanded', style({ display: 'block' })),
1023
+ transition('collapsed => expanded', [
1024
+ style({
1025
+ height: '0px',
1026
+ display: 'block'
1027
+ }),
1028
+ animate('100ms ease-in', style({
1029
+ height: '*'
1030
+ }))
1031
+ ]),
1032
+ transition('expanded => collapsed', [
1033
+ style({
1034
+ height: '*'
1035
+ }),
1036
+ animate('100ms ease-in', style({
1037
+ height: '0px'
1038
+ }))
1039
+ ])
1040
+ ])
1041
+ ],
1042
+ selector: 'kendo-pivot-chipmenu-item',
1043
+ template: `
1044
+ <div
1045
+ class="k-columnmenu-item"
1046
+ (click)="onClick($event)"
1047
+ (keydown.enter)="onClick($event)"
1048
+ [class.k-selected]="selected"
1049
+ role="button"
1050
+ [attr.aria-expanded]="expanded">
1051
+ <span *ngIf="icon" class="k-icon" [ngClass]="iconClass">
1052
+ </span>
1053
+ {{ text }}
1054
+ </div>
1055
+ <div *ngIf="contentTemplate" [@state]="contentState" [style.overflow]="'hidden'" class="k-columnmenu-item-content">
1056
+ <ng-container [ngTemplateOutlet]="contentTemplate.templateRef">
1057
+ </ng-container>
1058
+ <div>
1059
+ `
1060
+ }]
1061
+ }], propDecorators: { itemClick: [{
1062
+ type: Output
1063
+ }], expand: [{
1064
+ type: Output
1065
+ }], collapse: [{
1066
+ type: Output
1067
+ }], icon: [{
1068
+ type: Input
1069
+ }], text: [{
1070
+ type: Input
1071
+ }], selected: [{
1072
+ type: Input
1073
+ }], expanded: [{
1074
+ type: Input
1075
+ }], contentTemplate: [{
1076
+ type: ContentChild,
1077
+ args: [ChipMenuItemContentTemplateDirective, { static: false }]
1078
+ }] } });
1079
+
1080
+ /**
1081
+ * @hidden
1082
+ *
1083
+ * Represents a chip-menu item for sorting PivotGrid fields.
1084
+ * Allows the user to sort the PivotGrid.
1085
+ */
1086
+ class ChipMenuSortComponent extends ChipMenuItemBase {
1087
+ constructor(localization, renderer, configuratorService) {
1088
+ super();
1089
+ this.localization = localization;
1090
+ this.renderer = renderer;
1091
+ this.configuratorService = configuratorService;
1092
+ }
1093
+ get sortedAsc() {
1094
+ const descriptor = this.descriptor;
1095
+ return descriptor && (!descriptor.dir || descriptor.dir === 'asc');
1096
+ }
1097
+ get sortedDesc() {
1098
+ const descriptor = this.descriptor;
1099
+ return descriptor && descriptor.dir === 'desc';
1100
+ }
1101
+ /**
1102
+ * Returns the localized message for a given token
1103
+ */
1104
+ messageFor(localizationToken) {
1105
+ return this.localization.get(localizationToken);
1106
+ }
1107
+ toggleSort(dir) {
1108
+ const field = this.chip.name.toString();
1109
+ const descriptor = this.descriptor;
1110
+ const sort = this.configuratorService.state.sort.filter(s => s.field !== field);
1111
+ if (!descriptor || descriptor.dir !== dir) {
1112
+ sort.push({ field, dir });
1113
+ }
1114
+ this.configuratorService.parseConfiguratorState({ type: PIVOT_CONFIGURATOR_ACTION.setSort, payload: sort });
1115
+ this.close();
1116
+ }
1117
+ get descriptor() {
1118
+ return [].concat(this.configuratorService.state.sort || []).find(s => s.field === this.chip.name.toString());
1119
+ }
1120
+ }
1121
+ ChipMenuSortComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ChipMenuSortComponent, deps: [{ token: PivotLocalizationService }, { token: i0.Renderer2 }, { token: ConfiguratorService }], target: i0.ɵɵFactoryTarget.Component });
1122
+ ChipMenuSortComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: ChipMenuSortComponent, selector: "kendo-pivot-chipmenu-sort", inputs: { chip: "chip" }, usesInheritance: true, ngImport: i0, template: `
1123
+ <kendo-pivot-chipmenu-item
1124
+ [text]="messageFor('fieldMenuSortAscendingItemLabel')"
1125
+ icon="sort-asc-small"
1126
+ (itemClick)="toggleSort('asc')"
1127
+ [selected]="sortedAsc">
1128
+ </kendo-pivot-chipmenu-item>
1129
+ <kendo-pivot-chipmenu-item
1130
+ [text]="messageFor('fieldMenuSortDescendingItemLabel')"
1131
+ icon="sort-desc-small"
1132
+ (itemClick)="toggleSort('desc')"
1133
+ [selected]="sortedDesc">
1134
+ </kendo-pivot-chipmenu-item>
1135
+ `, isInline: true, components: [{ type: ChipMenuItemComponent, selector: "kendo-pivot-chipmenu-item", inputs: ["icon", "text", "selected", "expanded"], outputs: ["itemClick", "expand", "collapse"] }] });
1136
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ChipMenuSortComponent, decorators: [{
1137
+ type: Component,
1138
+ args: [{
1139
+ selector: 'kendo-pivot-chipmenu-sort',
1140
+ template: `
1141
+ <kendo-pivot-chipmenu-item
1142
+ [text]="messageFor('fieldMenuSortAscendingItemLabel')"
1143
+ icon="sort-asc-small"
1144
+ (itemClick)="toggleSort('asc')"
1145
+ [selected]="sortedAsc">
1146
+ </kendo-pivot-chipmenu-item>
1147
+ <kendo-pivot-chipmenu-item
1148
+ [text]="messageFor('fieldMenuSortDescendingItemLabel')"
1149
+ icon="sort-desc-small"
1150
+ (itemClick)="toggleSort('desc')"
1151
+ [selected]="sortedDesc">
1152
+ </kendo-pivot-chipmenu-item>
1153
+ `
1154
+ }]
1155
+ }], ctorParameters: function () { return [{ type: PivotLocalizationService }, { type: i0.Renderer2 }, { type: ConfiguratorService }]; }, propDecorators: { chip: [{
1156
+ type: Input
1157
+ }] } });
1158
+
1159
+ /**
1160
+ * @hidden
1161
+ */
1162
+ class FilterMenuDropDownListDirective {
1163
+ constructor(host) {
1164
+ this.host = host;
1165
+ this.keydownHandler = (e) => {
1166
+ if (e.keyCode === Keys.Escape && this.host.isOpen) {
1167
+ e.stopPropagation();
1168
+ this.host.toggle(false);
1169
+ }
1170
+ };
1171
+ }
1172
+ ngAfterViewInit() {
1173
+ const wrapperElement = this.host.wrapper.nativeElement;
1174
+ wrapperElement.setAttribute('aria-label', this.filterMenuDropDownLabel);
1175
+ wrapperElement.addEventListener('keydown', this.keydownHandler, true);
1176
+ }
1177
+ ngOnDestroy() {
1178
+ this.host.wrapper.nativeElement.removeEventListener('keydown', this.keydownHandler);
1179
+ }
1180
+ }
1181
+ FilterMenuDropDownListDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FilterMenuDropDownListDirective, deps: [{ token: i1$2.DropDownListComponent }], target: i0.ɵɵFactoryTarget.Directive });
1182
+ FilterMenuDropDownListDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: FilterMenuDropDownListDirective, selector: "[kendoFilterMenuDropDown]", inputs: { filterMenuDropDownLabel: "filterMenuDropDownLabel" }, ngImport: i0 });
1183
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FilterMenuDropDownListDirective, decorators: [{
1184
+ type: Directive,
1185
+ args: [{ selector: '[kendoFilterMenuDropDown]' }]
1186
+ }], ctorParameters: function () { return [{ type: i1$2.DropDownListComponent }]; }, propDecorators: { filterMenuDropDownLabel: [{
1187
+ type: Input
1188
+ }] } });
1189
+
1190
+ /**
1191
+ * @hidden
1192
+ */
1193
+ const localizeOperators = operators => localization => Object.keys(operators).map(key => ({
1194
+ text: localization.get(key),
1195
+ value: operators[key]
1196
+ }));
1197
+ const stringOperators = localizeOperators({
1198
+ "filterEqOperator": "eq",
1199
+ "filterNotEqOperator": "neq",
1200
+ "filterContainsOperator": "contains",
1201
+ "filterNotContainsOperator": "doesnotcontain",
1202
+ "filterStartsWithOperator": "startswith",
1203
+ "filterEndsWithOperator": "endswith",
1204
+ "filterIsNullOperator": "isnull",
1205
+ "filterIsNotNullOperator": "isnotnull",
1206
+ "filterIsEmptyOperator": "isempty",
1207
+ "filterIsNotEmptyOperator": "isnotempty"
1208
+ });
1209
+ /**
1210
+ * @hidden
1211
+ *
1212
+ * Represents a string-filter menu component.
1213
+ */
1214
+ class StringFilterMenuComponent {
1215
+ constructor(localization, configuratorService, fb) {
1216
+ this.localization = localization;
1217
+ this.configuratorService = configuratorService;
1218
+ this.fb = fb;
1219
+ this.subscription = new Subscription();
1220
+ // eslint-disable-next-line @typescript-eslint/no-empty-function
1221
+ this.onTouched = () => { };
1222
+ }
1223
+ get currentFilter() {
1224
+ const filterValue = this.configuratorService.state.filter?.filter(x => x.field === this.chip.name.toString());
1225
+ return filterValue && filterValue[0];
1226
+ }
1227
+ registerOnChange(fn) {
1228
+ this.filterFormGroup.valueChanges.subscribe(fn);
1229
+ }
1230
+ registerOnTouched(fn) {
1231
+ this.onTouched = fn;
1232
+ }
1233
+ writeValue(val) {
1234
+ if (val) {
1235
+ this.filterFormGroup.setValue(val, { emitEvent: false });
1236
+ }
1237
+ }
1238
+ get filterMenuDropDownLabel() {
1239
+ const localizationMsg = this.localization.get('filterOperatorsDropDownLabel') || '';
1240
+ const chipName = this.chip.name.toString();
1241
+ return replaceMessagePlaceholder(localizationMsg, 'fields', chipName);
1242
+ }
1243
+ ngOnInit() {
1244
+ this.filterFormGroup = this.fb.group({
1245
+ operator: [this.currentFilter ? this.currentFilter.operator : ''],
1246
+ value: [this.currentFilter ? this.currentFilter.value : '']
1247
+ });
1248
+ this.operators = stringOperators(this.localization);
1249
+ }
1250
+ ngOnDestroy() {
1251
+ this.subscription.unsubscribe();
1252
+ }
1253
+ }
1254
+ StringFilterMenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: StringFilterMenuComponent, deps: [{ token: PivotLocalizationService }, { token: ConfiguratorService }, { token: i3$1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component });
1255
+ StringFilterMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: StringFilterMenuComponent, selector: "kendo-pivot-string-filter-menu", inputs: { chip: "chip", menuTabbingService: "menuTabbingService" }, providers: [{
1256
+ provide: NG_VALUE_ACCESSOR,
1257
+ useExisting: forwardRef(() => StringFilterMenuComponent),
1258
+ multi: true
1259
+ }], ngImport: i0, template: `
1260
+ <ng-container [formGroup]="filterFormGroup">
1261
+ <kendo-dropdownlist
1262
+ kendoFilterMenuDropDown
1263
+ [filterMenuDropDownLabel]="filterMenuDropDownLabel"
1264
+ [data]="operators"
1265
+ formControlName="operator"
1266
+ [valuePrimitive]="true"
1267
+ textField="text"
1268
+ valueField="value">
1269
+ </kendo-dropdownlist>
1270
+ <input
1271
+ kendoTextBox
1272
+ formControlName="value"
1273
+ />
1274
+ </ng-container>
1275
+ `, isInline: true, components: [{ type: i1$2.DropDownListComponent, selector: "kendo-dropdownlist", inputs: ["iconClass", "loading", "data", "value", "textField", "valueField", "popupSettings", "listHeight", "defaultItem", "disabled", "itemDisabled", "readonly", "filterable", "virtual", "ignoreCase", "delay", "valuePrimitive", "tabindex", "tabIndex", "size", "rounded", "fillMode", "id"], outputs: ["valueChange", "filterChange", "selectionChange", "open", "opened", "close", "closed", "focus", "blur"], exportAs: ["kendoDropDownList"] }], directives: [{ type: i3$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i3$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: FilterMenuDropDownListDirective, selector: "[kendoFilterMenuDropDown]", inputs: ["filterMenuDropDownLabel"] }, { type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i3$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { type: i6.TextBoxDirective, selector: "input[kendoTextBox]", inputs: ["value"] }, { type: i3$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }] });
1276
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: StringFilterMenuComponent, decorators: [{
1277
+ type: Component,
1278
+ args: [{
1279
+ selector: 'kendo-pivot-string-filter-menu',
1280
+ providers: [{
1281
+ provide: NG_VALUE_ACCESSOR,
1282
+ useExisting: forwardRef(() => StringFilterMenuComponent),
1283
+ multi: true
1284
+ }],
1285
+ template: `
1286
+ <ng-container [formGroup]="filterFormGroup">
1287
+ <kendo-dropdownlist
1288
+ kendoFilterMenuDropDown
1289
+ [filterMenuDropDownLabel]="filterMenuDropDownLabel"
1290
+ [data]="operators"
1291
+ formControlName="operator"
1292
+ [valuePrimitive]="true"
1293
+ textField="text"
1294
+ valueField="value">
1295
+ </kendo-dropdownlist>
1296
+ <input
1297
+ kendoTextBox
1298
+ formControlName="value"
1299
+ />
1300
+ </ng-container>
1301
+ `
1302
+ }]
1303
+ }], ctorParameters: function () { return [{ type: PivotLocalizationService }, { type: ConfiguratorService }, { type: i3$1.FormBuilder }]; }, propDecorators: { chip: [{
1304
+ type: Input
1305
+ }], menuTabbingService: [{
1306
+ type: Input
1307
+ }] } });
1308
+
1309
+ const isNoValueOperator = operator => (operator === "isnull"
1310
+ || operator === "isnotnull"
1311
+ || operator === "isempty"
1312
+ || operator === "isnotempty");
1313
+ const validFilter = ({ value, operator }) => !isNullOrEmptyString(value) || isNoValueOperator(operator);
1314
+ /**
1315
+ * @hidden
1316
+ */
1317
+ class FilterMenuContainerComponent {
1318
+ constructor(localization, cd, menuTabbingService, configuratorService) {
1319
+ this.localization = localization;
1320
+ this.cd = cd;
1321
+ this.configuratorService = configuratorService;
1322
+ this.close = new EventEmitter();
1323
+ this.actionsClass = 'k-action-buttons k-button-group';
1324
+ this.menuTabbingService = menuTabbingService;
1325
+ }
1326
+ ngAfterViewChecked() {
1327
+ if (!this.menuTabbingService.isColumnMenu || (this.isLast && this.isExpanded)) {
1328
+ this.menuTabbingService.lastFocusable = this.disabled ?
1329
+ this.resetButton.nativeElement : this.filterButton.nativeElement;
1330
+ }
1331
+ }
1332
+ ngOnDestroy() {
1333
+ this.menuTabbingService.lastFocusable = null;
1334
+ }
1335
+ get disabled() {
1336
+ return !(this.filterDescriptorValue && validFilter(this.filterDescriptorValue));
1337
+ }
1338
+ submit() {
1339
+ const filterDescriptor = {
1340
+ field: this.chip.name.toString(),
1341
+ ...this.filterDescriptorValue
1342
+ };
1343
+ const payload = !this.configuratorService.state.filter ?
1344
+ [filterDescriptor] :
1345
+ [
1346
+ ...this.configuratorService.state.filter.filter(descriptor => descriptor.field !== filterDescriptor.field),
1347
+ filterDescriptor
1348
+ ];
1349
+ this.configuratorService.parseConfiguratorState({ type: PIVOT_CONFIGURATOR_ACTION.setFilter, payload: payload });
1350
+ this.close.emit();
1351
+ return false;
1352
+ }
1353
+ reset() {
1354
+ const filters = this.configuratorService.state.filter.filter(descriptor => descriptor.field !== this.chip.name.toString());
1355
+ this.configuratorService.parseConfiguratorState({ type: PIVOT_CONFIGURATOR_ACTION.setFilter, payload: filters });
1356
+ this.close.emit();
1357
+ }
1358
+ onTab(e, buttonType) {
1359
+ if (this.menuTabbingService.firstFocusable && (!this.menuTabbingService.isColumnMenu || this.isLast)) {
1360
+ e.preventDefault();
1361
+ if (buttonType === 'reset') {
1362
+ // eslint-disable-next-line no-unused-expressions
1363
+ this.disabled ? this.menuTabbingService.firstFocusable.focus() : this.filterButton.nativeElement.focus();
1364
+ }
1365
+ else {
1366
+ this.menuTabbingService.firstFocusable.focus();
1367
+ }
1368
+ }
1369
+ }
1370
+ /**
1371
+ * Returns the localized message for a given token
1372
+ */
1373
+ messageFor(localizationToken) {
1374
+ return this.localization.get(localizationToken);
1375
+ }
1376
+ }
1377
+ FilterMenuContainerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FilterMenuContainerComponent, deps: [{ token: PivotLocalizationService }, { token: i0.ChangeDetectorRef }, { token: MenuTabbingService }, { token: ConfiguratorService }], target: i0.ɵɵFactoryTarget.Component });
1378
+ FilterMenuContainerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: FilterMenuContainerComponent, selector: "kendo-pivot-filter-menu-container", inputs: { chip: "chip", isLast: "isLast", isExpanded: "isExpanded", menuTabbingService: "menuTabbingService", actionsClass: "actionsClass" }, outputs: { close: "close" }, providers: [
1379
+ MenuTabbingService
1380
+ ], viewQueries: [{ propertyName: "resetButton", first: true, predicate: ["resetButton"], descendants: true }, { propertyName: "filterButton", first: true, predicate: ["filterButton"], descendants: true }], ngImport: i0, template: `
1381
+ <form (submit)="submit()" (reset)="reset()"
1382
+ class="k-filter-menu k-group k-reset k-state-border-up">
1383
+ <div class="k-filter-menu-container">
1384
+ <kendo-pivot-string-filter-menu
1385
+ [style]="'display: flex; flex-flow: column nowrap; align-items: stretch; gap: 8px;'"
1386
+ [(ngModel)]="filterDescriptorValue"
1387
+ name="'filterDescriptorValue'"
1388
+ [chip]="chip"
1389
+ [menuTabbingService]="menuTabbingService">
1390
+ </kendo-pivot-string-filter-menu>
1391
+ <div [ngClass]="actionsClass">
1392
+ <button
1393
+ #resetButton
1394
+ type="reset"
1395
+ kendoButton
1396
+ (keydown.tab)="onTab($event, 'reset')">{{messageFor('filterClearButton')}}</button>
1397
+ <button #filterButton
1398
+ type="submit"
1399
+ [disabled]="disabled"
1400
+ kendoButton
1401
+ themeColor="primary"
1402
+ (keydown.tab)="onTab($event, 'filter')">{{messageFor('filterFilterButton')}}</button>
1403
+ </div>
1404
+ </div>
1405
+ </form>
1406
+ `, isInline: true, components: [{ type: StringFilterMenuComponent, selector: "kendo-pivot-string-filter-menu", inputs: ["chip", "menuTabbingService"] }, { type: i5.Button, selector: "button[kendoButton], span[kendoButton], kendo-button", inputs: ["toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }], directives: [{ type: i3$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i3$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i3$1.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i7.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
1407
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FilterMenuContainerComponent, decorators: [{
1408
+ type: Component,
1409
+ args: [{
1410
+ providers: [
1411
+ MenuTabbingService
1412
+ ],
1413
+ selector: 'kendo-pivot-filter-menu-container',
1414
+ template: `
1415
+ <form (submit)="submit()" (reset)="reset()"
1416
+ class="k-filter-menu k-group k-reset k-state-border-up">
1417
+ <div class="k-filter-menu-container">
1418
+ <kendo-pivot-string-filter-menu
1419
+ [style]="'display: flex; flex-flow: column nowrap; align-items: stretch; gap: 8px;'"
1420
+ [(ngModel)]="filterDescriptorValue"
1421
+ name="'filterDescriptorValue'"
1422
+ [chip]="chip"
1423
+ [menuTabbingService]="menuTabbingService">
1424
+ </kendo-pivot-string-filter-menu>
1425
+ <div [ngClass]="actionsClass">
1426
+ <button
1427
+ #resetButton
1428
+ type="reset"
1429
+ kendoButton
1430
+ (keydown.tab)="onTab($event, 'reset')">{{messageFor('filterClearButton')}}</button>
1431
+ <button #filterButton
1432
+ type="submit"
1433
+ [disabled]="disabled"
1434
+ kendoButton
1435
+ themeColor="primary"
1436
+ (keydown.tab)="onTab($event, 'filter')">{{messageFor('filterFilterButton')}}</button>
1437
+ </div>
1438
+ </div>
1439
+ </form>
1440
+ `
1441
+ }]
1442
+ }], ctorParameters: function () { return [{ type: PivotLocalizationService }, { type: i0.ChangeDetectorRef }, { type: MenuTabbingService }, { type: ConfiguratorService }]; }, propDecorators: { close: [{
1443
+ type: Output
1444
+ }], chip: [{
1445
+ type: Input
1446
+ }], isLast: [{
1447
+ type: Input
1448
+ }], isExpanded: [{
1449
+ type: Input
1450
+ }], menuTabbingService: [{
1451
+ type: Input
1452
+ }], actionsClass: [{
1453
+ type: Input
1454
+ }], resetButton: [{
1455
+ type: ViewChild,
1456
+ args: ['resetButton']
1457
+ }], filterButton: [{
1458
+ type: ViewChild,
1459
+ args: ['filterButton']
1460
+ }] } });
1461
+
1462
+ /**
1463
+ * @hidden
1464
+ * Represents the component for setting field filters in the PivotGrid.
1465
+ */
1466
+ class ChipMenuFilterComponent extends ChipMenuItemBase {
1467
+ constructor(localization, hostElement) {
1468
+ super();
1469
+ this.localization = localization;
1470
+ this.hostElement = hostElement;
1471
+ /**
1472
+ * Fires when the content is expanded.
1473
+ */
1474
+ this.expand = new EventEmitter();
1475
+ /**
1476
+ * Fires when the content is collapsed.
1477
+ */
1478
+ this.collapse = new EventEmitter();
1479
+ /**
1480
+ * Specifies if the content is expanded.
1481
+ */
1482
+ this.expanded = false;
1483
+ this.isLast = false;
1484
+ this.actionsClass = 'k-columnmenu-actions';
1485
+ }
1486
+ onCollapse() {
1487
+ this.expanded = false;
1488
+ if (this.isLast) {
1489
+ this.service.menuTabbingService.lastFocusable = this.hostElement.nativeElement.querySelector('.k-columnmenu-item');
1490
+ }
1491
+ this.collapse.emit();
1492
+ }
1493
+ onExpand() {
1494
+ this.expanded = true;
1495
+ this.expand.emit();
1496
+ }
1497
+ /**
1498
+ * Returns the localized message for a given token
1499
+ */
1500
+ messageFor(localizationToken) {
1501
+ return this.localization.get(localizationToken);
1502
+ }
1503
+ }
1504
+ ChipMenuFilterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ChipMenuFilterComponent, deps: [{ token: PivotLocalizationService }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
1505
+ ChipMenuFilterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: ChipMenuFilterComponent, selector: "kendo-pivot-chipmenu-filter", inputs: { chip: "chip", expanded: "expanded", isLast: "isLast" }, outputs: { expand: "expand", collapse: "collapse" }, usesInheritance: true, ngImport: i0, template: `
1506
+ <kendo-pivot-chipmenu-item
1507
+ classs="k-widget k-expander"
1508
+ [text]="messageFor('fieldMenuFilterItemLabel')"
1509
+ icon="filter"
1510
+ [expanded]="expanded"
1511
+ (collapse)="onCollapse()"
1512
+ (expand)="onExpand()">
1513
+ <ng-template kendoPivotChipMenuItemContentTemplate>
1514
+ <kendo-pivot-filter-menu-container
1515
+ [chip]="chip"
1516
+ [menuTabbingService]="service.menuTabbingService"
1517
+ [actionsClass]="actionsClass"
1518
+ [isLast]="isLast"
1519
+ [isExpanded]="expanded"
1520
+ (keydown.shift.tab)="$event.stopImmediatePropagation()"
1521
+ (close)="close()">
1522
+ </kendo-pivot-filter-menu-container>
1523
+ </ng-template>
1524
+ </kendo-pivot-chipmenu-item>
1525
+ `, isInline: true, components: [{ type: ChipMenuItemComponent, selector: "kendo-pivot-chipmenu-item", inputs: ["icon", "text", "selected", "expanded"], outputs: ["itemClick", "expand", "collapse"] }, { type: FilterMenuContainerComponent, selector: "kendo-pivot-filter-menu-container", inputs: ["chip", "isLast", "isExpanded", "menuTabbingService", "actionsClass"], outputs: ["close"] }], directives: [{ type: ChipMenuItemContentTemplateDirective, selector: "[kendoPivotChipMenuItemContentTemplate]" }] });
1526
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ChipMenuFilterComponent, decorators: [{
1527
+ type: Component,
1528
+ args: [{
1529
+ selector: 'kendo-pivot-chipmenu-filter',
1530
+ template: `
1531
+ <kendo-pivot-chipmenu-item
1532
+ classs="k-widget k-expander"
1533
+ [text]="messageFor('fieldMenuFilterItemLabel')"
1534
+ icon="filter"
1535
+ [expanded]="expanded"
1536
+ (collapse)="onCollapse()"
1537
+ (expand)="onExpand()">
1538
+ <ng-template kendoPivotChipMenuItemContentTemplate>
1539
+ <kendo-pivot-filter-menu-container
1540
+ [chip]="chip"
1541
+ [menuTabbingService]="service.menuTabbingService"
1542
+ [actionsClass]="actionsClass"
1543
+ [isLast]="isLast"
1544
+ [isExpanded]="expanded"
1545
+ (keydown.shift.tab)="$event.stopImmediatePropagation()"
1546
+ (close)="close()">
1547
+ </kendo-pivot-filter-menu-container>
1548
+ </ng-template>
1549
+ </kendo-pivot-chipmenu-item>
1550
+ `
1551
+ }]
1552
+ }], ctorParameters: function () { return [{ type: PivotLocalizationService }, { type: i0.ElementRef }]; }, propDecorators: { expand: [{
1553
+ type: Output
1554
+ }], collapse: [{
1555
+ type: Output
1556
+ }], chip: [{
1557
+ type: Input
1558
+ }], expanded: [{
1559
+ type: Input
1560
+ }], isLast: [{
1561
+ type: Input
1562
+ }] } });
1563
+
1564
+ const POPUP_CLASS = 'k-column-menu';
1565
+ /**
1566
+ * @hidden
1567
+ *
1568
+ * Represents the field chip menu component.
1569
+ */
1570
+ class ChipMenuComponent {
1571
+ constructor(popupService, localization, service) {
1572
+ this.popupService = popupService;
1573
+ this.localization = localization;
1574
+ this.service = service;
1575
+ this.tabIndex = '-1';
1576
+ this.closeSubscription = service.closeMenu.subscribe(this.close.bind(this));
1577
+ }
1578
+ ngOnDestroy() {
1579
+ this.close();
1580
+ this.closeSubscription.unsubscribe();
1581
+ }
1582
+ toggle(e, anchor, template) {
1583
+ if (e) {
1584
+ e.preventDefault();
1585
+ e.stopImmediatePropagation();
1586
+ }
1587
+ this.popupRef = this.popupService.open(anchor, template, this.popupRef, POPUP_CLASS);
1588
+ if (!this.popupRef) {
1589
+ this.anchor.nativeElement.focus();
1590
+ }
1591
+ }
1592
+ close() {
1593
+ this.popupService.destroy();
1594
+ this.popupRef = null;
1595
+ this.anchor.nativeElement.closest('.k-chip').focus();
1596
+ }
1597
+ get chipMenuTitle() {
1598
+ const localizationMsg = this.localization.get('chipMenuIconTitle') || '';
1599
+ const chipName = this.chip.name.toString();
1600
+ return replaceMessagePlaceholder(localizationMsg, 'fieldName', chipName);
1601
+ }
1602
+ }
1603
+ ChipMenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ChipMenuComponent, deps: [{ token: SinglePopupService }, { token: PivotLocalizationService }, { token: ChipMenuService }], target: i0.ɵɵFactoryTarget.Component });
1604
+ ChipMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: ChipMenuComponent, selector: "kendo-pivot-chip-menu", inputs: { chip: "chip", tabIndex: "tabIndex" }, providers: [
1605
+ ChipMenuService,
1606
+ MenuTabbingService
1607
+ ], viewQueries: [{ propertyName: "anchor", first: true, predicate: ["anchor"], descendants: true, static: true }], ngImport: i0, template: `
1608
+ <span #anchor
1609
+ class="k-icon k-i-more-vertical"
1610
+ (click)="toggle($event, anchor, template)"
1611
+ [tabindex]="tabIndex"
1612
+ [attr.title]="chipMenuTitle">
1613
+ </span>
1614
+ <ng-template #template>
1615
+ <kendo-pivot-chipmenu-container
1616
+ (keydown.escape)="close()"
1617
+ (keydown.enter)="$event.stopImmediatePropagation()">
1618
+ <kendo-pivot-chipmenu-sort
1619
+ #sortItem
1620
+ [chip]="chip"
1621
+ [kendoPivotChipMenuItem]="sortItem"
1622
+ [service]="service">
1623
+ </kendo-pivot-chipmenu-sort>
1624
+
1625
+ <kendo-pivot-chipmenu-filter
1626
+ #filterItem
1627
+ [chip]="chip"
1628
+ [kendoPivotChipMenuItem]="filterItem"
1629
+ [service]="service">
1630
+ </kendo-pivot-chipmenu-filter>
1631
+ </kendo-pivot-chipmenu-container>
1632
+ </ng-template>
1633
+ `, isInline: true, components: [{ type: ChipMenuContainerComponent, selector: "kendo-pivot-chipmenu-container" }, { type: ChipMenuSortComponent, selector: "kendo-pivot-chipmenu-sort", inputs: ["chip"] }, { type: ChipMenuFilterComponent, selector: "kendo-pivot-chipmenu-filter", inputs: ["chip", "expanded", "isLast"], outputs: ["expand", "collapse"] }], directives: [{ type: ChipMenuItemDirective, selector: "[kendoPivotChipMenuItem]", inputs: ["kendoPivotChipMenuItem"] }] });
1634
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ChipMenuComponent, decorators: [{
1635
+ type: Component,
1636
+ args: [{
1637
+ providers: [
1638
+ ChipMenuService,
1639
+ MenuTabbingService
1640
+ ],
1641
+ selector: 'kendo-pivot-chip-menu',
1642
+ template: `
1643
+ <span #anchor
1644
+ class="k-icon k-i-more-vertical"
1645
+ (click)="toggle($event, anchor, template)"
1646
+ [tabindex]="tabIndex"
1647
+ [attr.title]="chipMenuTitle">
1648
+ </span>
1649
+ <ng-template #template>
1650
+ <kendo-pivot-chipmenu-container
1651
+ (keydown.escape)="close()"
1652
+ (keydown.enter)="$event.stopImmediatePropagation()">
1653
+ <kendo-pivot-chipmenu-sort
1654
+ #sortItem
1655
+ [chip]="chip"
1656
+ [kendoPivotChipMenuItem]="sortItem"
1657
+ [service]="service">
1658
+ </kendo-pivot-chipmenu-sort>
1659
+
1660
+ <kendo-pivot-chipmenu-filter
1661
+ #filterItem
1662
+ [chip]="chip"
1663
+ [kendoPivotChipMenuItem]="filterItem"
1664
+ [service]="service">
1665
+ </kendo-pivot-chipmenu-filter>
1666
+ </kendo-pivot-chipmenu-container>
1667
+ </ng-template>
1668
+ `
1669
+ }]
1670
+ }], ctorParameters: function () { return [{ type: SinglePopupService }, { type: PivotLocalizationService }, { type: ChipMenuService }]; }, propDecorators: { chip: [{
1671
+ type: Input
1672
+ }], tabIndex: [{
1673
+ type: Input
1674
+ }], anchor: [{
1675
+ type: ViewChild,
1676
+ args: ['anchor', { static: true }]
1677
+ }] } });
1678
+
1679
+ /**
1680
+ * @hidden
1681
+ */
1682
+ class DropTargetDirective {
1683
+ constructor(element, configuratorService, cue, renderer, zone) {
1684
+ this.element = element;
1685
+ this.configuratorService = configuratorService;
1686
+ this.cue = cue;
1687
+ this.renderer = renderer;
1688
+ this.zone = zone;
1689
+ this.subs = new Subscription();
1690
+ }
1691
+ ngOnInit() {
1692
+ const element = this.element.nativeElement;
1693
+ this.elementType = this.getElementType(element);
1694
+ this.elementSectionType = element.getAttribute('axes')?.split('Axes')[0];
1695
+ this.subs.add(this.renderer.listen(element, 'mouseenter', this.handleMouseEnter.bind(this)));
1696
+ this.subs.add(this.renderer.listen(element, 'mousemove', this.handleMouseMove.bind(this)));
1697
+ this.subs.add(this.renderer.listen(element, 'mouseleave', this.handleMouseLeave.bind(this)));
1698
+ }
1699
+ ngOnDestroy() {
1700
+ this.subs.unsubscribe();
1701
+ }
1702
+ handleMouseEnter(event) {
1703
+ this.zone.runOutsideAngular(() => {
1704
+ if (this.configuratorService.state.dragItem) {
1705
+ this.configuratorService.dropTargetElement = this.element.nativeElement;
1706
+ if (this.configuratorService.draggedElement && !this.isDropAllowed(this.configuratorService.draggedElement.fromSection)) {
1707
+ return;
1708
+ }
1709
+ this.configuratorService.parseConfiguratorState({ type: PIVOT_CONFIGURATOR_ACTION.setDropTarget, payload: this.item });
1710
+ this.targetElement = this.elementType === 'header' ? event.target.nextElementSibling : event.target;
1711
+ // eslint-disable-next-line no-unused-expressions
1712
+ this.cue.dom && this.cue.remove(this.getCueContainer());
1713
+ this.cue.create();
1714
+ this.cue.attach(this.getCueContainer());
1715
+ this.configuratorService.parseConfiguratorState({ type: PIVOT_CONFIGURATOR_ACTION.setDropZone, payload: this.axes });
1716
+ }
1717
+ });
1718
+ }
1719
+ handleMouseMove(event) {
1720
+ this.zone.runOutsideAngular(() => {
1721
+ event.stopImmediatePropagation();
1722
+ if (this.configuratorService.state.dragItem) {
1723
+ if (this.configuratorService.draggedElement && !this.isDropAllowed(this.configuratorService.draggedElement.fromSection)) {
1724
+ this.renderer.setStyle(this.element.nativeElement, 'cursor', 'not-allowed');
1725
+ return;
1726
+ }
1727
+ this.renderer.setStyle(this.element.nativeElement, 'cursor', 'pointer');
1728
+ const singleOrNoChip = this.targetElement?.querySelectorAll('.k-chip').length < 2;
1729
+ const isInOwnContainer = this.elementSectionType === this.configuratorService.draggedElement.fromSection;
1730
+ if (!this.targetElement) {
1731
+ return;
1732
+ }
1733
+ switch (this.elementType) {
1734
+ case 'chip': {
1735
+ const rect = this.element.nativeElement.getBoundingClientRect();
1736
+ const x = event.clientX - rect.left;
1737
+ const direction = x < rect.width / 2 ? 'before' : 'after';
1738
+ this.cue.show(direction, this.configuratorService.cueContainer, this.targetElement);
1739
+ if (direction !== this.configuratorService.state.dropDirection) {
1740
+ this.configuratorService.parseConfiguratorState({ type: PIVOT_CONFIGURATOR_ACTION.setDropDirection, payload: direction });
1741
+ }
1742
+ break;
1743
+ }
1744
+ case 'container':
1745
+ case 'header':
1746
+ if (singleOrNoChip && isInOwnContainer) {
1747
+ return;
1748
+ }
1749
+ if (isInOwnContainer) {
1750
+ const draggedElement = this.configuratorService.draggedElement.element;
1751
+ const nextChip = this.getNextChip(draggedElement);
1752
+ if (!nextChip) {
1753
+ this.cue.show('before', this.configuratorService.cueContainer, draggedElement);
1754
+ if (this.configuratorService.state.dropDirection !== 'before') {
1755
+ this.configuratorService.parseConfiguratorState({ type: PIVOT_CONFIGURATOR_ACTION.setDropDirection, payload: 'before' });
1756
+ }
1757
+ return;
1758
+ }
1759
+ const isVertical = this.configuratorService.orientation === 'vertical';
1760
+ if (!isPresent(this.nextChipOffset)) {
1761
+ this.nextChipOffset = isVertical ? nextChip.getBoundingClientRect().left : nextChip.getBoundingClientRect().top;
1762
+ }
1763
+ const isBefore = isVertical ? event.clientX < this.nextChipOffset : event.clientY < this.nextChipOffset;
1764
+ if (isBefore) {
1765
+ this.cue.show('after', this.configuratorService.cueContainer, draggedElement);
1766
+ return;
1767
+ }
1768
+ }
1769
+ if (this.configuratorService.state.dropDirection !== 'after') {
1770
+ this.configuratorService.parseConfiguratorState({ type: PIVOT_CONFIGURATOR_ACTION.setDropDirection, payload: 'after' });
1771
+ }
1772
+ this.cue.show('after', this.configuratorService.cueContainer, this.targetElement);
1773
+ break;
1774
+ default:
1775
+ }
1776
+ }
1777
+ });
1778
+ }
1779
+ handleMouseLeave(event) {
1780
+ this.renderer.removeStyle(this.element.nativeElement, 'cursor');
1781
+ if (!this.configuratorService.draggedElement) {
1782
+ return;
1783
+ }
1784
+ this.zone.runOutsideAngular(() => {
1785
+ event.stopImmediatePropagation();
1786
+ this.configuratorService.dropTargetElement = null;
1787
+ this.cue.remove(this.getCueContainer());
1788
+ if (this.elementType === 'chip') {
1789
+ return;
1790
+ }
1791
+ if (this.configuratorService.state.dragItem) {
1792
+ this.configuratorService.parseConfiguratorState({ type: PIVOT_CONFIGURATOR_ACTION.setDropZone, payload: null });
1793
+ }
1794
+ });
1795
+ }
1796
+ isDropAllowed(fromSection) {
1797
+ const element = this.element.nativeElement;
1798
+ const fromRowsOrColsToMeasures = (fromSection === 'row' || fromSection === 'column') && element.closest('[axes=measureAxes]');
1799
+ const fromMeasuresToRowsOrCols = fromSection === 'measure' && (element.closest('[axes=rowAxes]') || element.closest('[axes=columnAxes]'));
1800
+ return !(fromRowsOrColsToMeasures || fromMeasuresToRowsOrCols);
1801
+ }
1802
+ getElementType(element) {
1803
+ return {
1804
+ 'KENDO-CHIP': 'chip',
1805
+ 'KENDO-CHIPLIST': 'container',
1806
+ 'DIV': 'header'
1807
+ }[element.tagName];
1808
+ }
1809
+ getCueContainer() {
1810
+ const element = this.element.nativeElement;
1811
+ const cueContainer = {
1812
+ chip: element.parentElement,
1813
+ container: element,
1814
+ header: element.classList.contains('k-settings-description') ? element : element.nextElementSibling
1815
+ }[this.elementType];
1816
+ this.configuratorService.cueContainer = cueContainer;
1817
+ return cueContainer;
1818
+ }
1819
+ getNextChip(draggedElement) {
1820
+ let nextChip = draggedElement.nextElementSibling;
1821
+ if (nextChip && nextChip.matches('.k-chip')) {
1822
+ return nextChip;
1823
+ }
1824
+ while (nextChip) {
1825
+ nextChip = nextChip.nextElementSibling;
1826
+ if (nextChip === null || nextChip.matches('.k-chip')) {
1827
+ return nextChip;
1828
+ }
1829
+ }
1830
+ }
1831
+ }
1832
+ DropTargetDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: DropTargetDirective, deps: [{ token: i0.ElementRef }, { token: ConfiguratorService }, { token: DropCueService }, { token: i0.Renderer2 }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Directive });
1833
+ DropTargetDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: DropTargetDirective, selector: "[kendoDropTarget]", inputs: { item: "item", axes: "axes" }, ngImport: i0 });
1834
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: DropTargetDirective, decorators: [{
1835
+ type: Directive,
1836
+ args: [{
1837
+ selector: '[kendoDropTarget]'
1838
+ }]
1839
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: ConfiguratorService }, { type: DropCueService }, { type: i0.Renderer2 }, { type: i0.NgZone }]; }, propDecorators: { item: [{
1840
+ type: Input
1841
+ }], axes: [{
1842
+ type: Input
1843
+ }] } });
1844
+
1845
+ /**
1846
+ * @hidden
1847
+ */
1848
+ class DraggableChipDirective {
1849
+ constructor(draggable, element, zone, service, cue, renderer) {
1850
+ this.draggable = draggable;
1851
+ this.element = element;
1852
+ this.zone = zone;
1853
+ this.service = service;
1854
+ this.cue = cue;
1855
+ this.renderer = renderer;
1856
+ this.touchActions = 'none';
1857
+ this.initialX = {};
1858
+ this.initialY = {};
1859
+ this.subs = new Subscription();
1860
+ }
1861
+ get pointerEvents() {
1862
+ return this.drag ? 'none' : undefined;
1863
+ }
1864
+ ngOnInit() {
1865
+ this.subs.add(this.draggable.kendoPress
1866
+ .subscribe((event) => {
1867
+ this.zone.runOutsideAngular(() => {
1868
+ if (isDocumentAvailable()) {
1869
+ this.initialX.current = event.clientX;
1870
+ this.initialY.current = event.clientY;
1871
+ const element = this.element.nativeElement;
1872
+ this.renderer.setStyle(element, 'z-index', 1);
1873
+ this.service.parseConfiguratorState({ type: PIVOT_CONFIGURATOR_ACTION.setDragItem, payload: this.item });
1874
+ this.service.draggedElement = {
1875
+ element,
1876
+ fromSection: element.closest('.k-chip-list').getAttribute('axes').split('Axes')[0]
1877
+ };
1878
+ }
1879
+ });
1880
+ }));
1881
+ this.subs.add(this.draggable.kendoDrag
1882
+ .subscribe((event) => {
1883
+ this.zone.runOutsideAngular(() => {
1884
+ if (isDocumentAvailable()) {
1885
+ const isDragging = Math.abs(this.initialX.current - event.clientX) > 5 ||
1886
+ Math.abs(this.initialY.current - event.clientY) > 5;
1887
+ if (!isDragging) {
1888
+ return;
1889
+ }
1890
+ this.drag = true;
1891
+ if (!document.elementFromPoint(event.clientX, event.clientY)?.closest('.k-pivotgrid-configurator [kendodroptarget]')) {
1892
+ return;
1893
+ }
1894
+ this.renderer.setStyle(this.element.nativeElement, 'transform', `translate(${event.clientX - this.initialX.current}px, ${event.clientY - this.initialY.current}px)`);
1895
+ }
1896
+ });
1897
+ }));
1898
+ this.subs.add(this.draggable.kendoRelease
1899
+ .subscribe(() => {
1900
+ this.zone.runOutsideAngular(() => {
1901
+ this.drag = false;
1902
+ if (this.service.state.dragItem) {
1903
+ const element = this.element.nativeElement;
1904
+ if (isDocumentAvailable()) {
1905
+ this.renderer.removeStyle(element, 'transform');
1906
+ this.cue.remove(this.service.cueContainer);
1907
+ }
1908
+ this.service.parseConfiguratorState({ type: PIVOT_CONFIGURATOR_ACTION.drop, payload: this.item });
1909
+ this.service.state.dragItem = null;
1910
+ this.service.state.dropDirection = null;
1911
+ this.service.state.dropTarget = null;
1912
+ this.service.state.dropZone = null;
1913
+ this.renderer.removeStyle(element, 'z-index');
1914
+ this.service.draggedElement = null;
1915
+ if (this.service.dropTargetElement) {
1916
+ this.renderer.removeStyle(this.service.dropTargetElement, 'cursor');
1917
+ this.service.dropTargetElement = null;
1918
+ }
1919
+ }
1920
+ });
1921
+ }));
1922
+ }
1923
+ ngOnDestroy() {
1924
+ this.subs.unsubscribe();
1925
+ }
1926
+ }
1927
+ DraggableChipDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: DraggableChipDirective, deps: [{ token: i3.DraggableDirective, optional: true }, { token: i0.ElementRef }, { token: i0.NgZone }, { token: ConfiguratorService }, { token: DropCueService }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
1928
+ DraggableChipDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: DraggableChipDirective, selector: "[kendoChipDraggable]", inputs: { item: "item" }, host: { properties: { "style.pointerEvents": "this.pointerEvents", "style.touch-action": "this.touchActions" } }, ngImport: i0 });
1929
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: DraggableChipDirective, decorators: [{
1930
+ type: Directive,
1931
+ args: [{
1932
+ selector: '[kendoChipDraggable]'
1933
+ }]
1934
+ }], ctorParameters: function () { return [{ type: i3.DraggableDirective, decorators: [{
1935
+ type: Optional
1936
+ }] }, { type: i0.ElementRef }, { type: i0.NgZone }, { type: ConfiguratorService }, { type: DropCueService }, { type: i0.Renderer2 }]; }, propDecorators: { pointerEvents: [{
1937
+ type: HostBinding,
1938
+ args: ['style.pointerEvents']
1939
+ }], touchActions: [{
1940
+ type: HostBinding,
1941
+ args: ['style.touch-action']
1942
+ }], item: [{
1943
+ type: Input
1944
+ }] } });
1945
+
1946
+ /**
1947
+ * @hidden
1948
+ */
1949
+ class ChipKeyboardNavigationDirective {
1950
+ constructor(host, renderer, ngZone) {
1951
+ this.host = host;
1952
+ this.renderer = renderer;
1953
+ this.ngZone = ngZone;
1954
+ this.keydownSub = new Subscription();
1955
+ this.reorder = new EventEmitter();
1956
+ }
1957
+ ngOnInit() {
1958
+ const chipElement = this.host.element.nativeElement;
1959
+ this.ngZone.runOutsideAngular(() => {
1960
+ this.keydownSub.add(this.renderer.listen(chipElement, 'keydown', (ev) => {
1961
+ const isAltDown = ev.keyCode === Keys.ArrowDown && ev.altKey;
1962
+ const menuIcon = this.host.element.nativeElement.querySelector('.k-i-more-vertical');
1963
+ const shiftAndMeta = ev.shiftKey && ev.metaKey;
1964
+ const isArrow = [Keys.ArrowLeft, Keys.ArrowRight, Keys.ArrowDown, Keys.ArrowUp].includes(ev.keyCode);
1965
+ const isReorderAction = shiftAndMeta && isArrow;
1966
+ if (isAltDown && menuIcon) {
1967
+ menuIcon.click();
1968
+ }
1969
+ else if (isReorderAction) {
1970
+ const direction = {
1971
+ [Keys.ArrowDown]: 'down',
1972
+ [Keys.ArrowUp]: 'up',
1973
+ [Keys.ArrowRight]: 'right',
1974
+ [Keys.ArrowLeft]: 'left'
1975
+ }[ev.keyCode];
1976
+ this.reorder.emit({
1977
+ direction,
1978
+ sender: this.host
1979
+ });
1980
+ }
1981
+ }));
1982
+ });
1983
+ }
1984
+ ngOnDestroy() {
1985
+ this.keydownSub.unsubscribe();
1986
+ }
1987
+ }
1988
+ ChipKeyboardNavigationDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ChipKeyboardNavigationDirective, deps: [{ token: i5.ChipComponent }, { token: i0.Renderer2 }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Directive });
1989
+ ChipKeyboardNavigationDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: ChipKeyboardNavigationDirective, selector: "[kendoChipKeyboardNavigation]", outputs: { reorder: "reorder" }, ngImport: i0 });
1990
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ChipKeyboardNavigationDirective, decorators: [{
1991
+ type: Directive,
1992
+ args: [{ selector: '[kendoChipKeyboardNavigation]' }]
1993
+ }], ctorParameters: function () { return [{ type: i5.ChipComponent }, { type: i0.Renderer2 }, { type: i0.NgZone }]; }, propDecorators: { reorder: [{
1994
+ type: Output
1995
+ }] } });
1996
+
1997
+ /**
1998
+ * @hidden
1999
+ * Represents the Kendo UI PivotGrid Configurator component for Angular.
2000
+ */
2001
+ class PivotGridConfiguratorComponent {
2002
+ constructor(dataService, localization, configuratorService, cdr, zone) {
2003
+ this.dataService = dataService;
2004
+ this.localization = localization;
2005
+ this.configuratorService = configuratorService;
2006
+ this.cdr = cdr;
2007
+ this.zone = zone;
2008
+ this.hostClass = true;
2009
+ this.hostAriaRole = 'dialog';
2010
+ this.orientation = 'vertical';
2011
+ this.sort = new Array();
2012
+ this.close = new EventEmitter();
2013
+ this.checked = [];
2014
+ this.subs = new Subscription();
2015
+ /**
2016
+ * A function which determines if a specific node has child nodes.
2017
+ */
2018
+ this.hasChildren = (node) => !('hierarchyUniqueName' in node) && !('aggregator' in node);
2019
+ /**
2020
+ * A function which provides the child nodes for a given parent node.
2021
+ */
2022
+ this.children = (node) => {
2023
+ if (this.dataService.directive.type === 'olap') {
2024
+ const observable = from(this.dataService.directive.fetchChildren(node, this.fields));
2025
+ return observable.pipe(mergeMap(value => of(value)));
2026
+ }
2027
+ return of(node.children);
2028
+ };
2029
+ }
2030
+ get headerTextId() {
2031
+ return `k-pivotgrid-${this.dataService.pivotGridId}-configurator-header`;
2032
+ }
2033
+ get isHorizontal() {
2034
+ return this.orientation === 'horizontal';
2035
+ }
2036
+ ngOnInit() {
2037
+ this.subs.add(this.dataService.fields
2038
+ .subscribe(res => {
2039
+ this.fields = res;
2040
+ }));
2041
+ this.subs.add(this.dataService.configuredFields
2042
+ .subscribe(res => {
2043
+ const normalizedState = clone({ ...this.dataService.state, dragItem: res.dragItem, dropTarget: res.dropTarget, dropZone: res.dropZone, dropDirection: res.dropDirection });
2044
+ this.originalState = normalizedState;
2045
+ this.setState(normalizedState);
2046
+ this.setChecked();
2047
+ }));
2048
+ this.subs.add(this.configuratorService.configuratorStateChange
2049
+ .subscribe(res => {
2050
+ this.state = res;
2051
+ this.dataService.state = {
2052
+ columnAxes: res.columnAxes,
2053
+ rowAxes: res.rowAxes,
2054
+ measureAxes: res.measureAxes,
2055
+ sort: res.sort,
2056
+ filter: res.filter
2057
+ };
2058
+ this.cdr.detectChanges();
2059
+ }));
2060
+ }
2061
+ ngAfterViewInit() {
2062
+ this.treeView.focus();
2063
+ }
2064
+ ngOnDestroy() {
2065
+ this.subs.unsubscribe();
2066
+ }
2067
+ ngOnChanges(changes) {
2068
+ if (changes['orientation']) {
2069
+ this.configuratorService.orientation = this.orientation;
2070
+ }
2071
+ }
2072
+ getName(name) {
2073
+ return name.toString();
2074
+ }
2075
+ contentLabelId(section) {
2076
+ return `k-pivotgrid-${this.dataService.pivotGridId}-configurator-${section}`;
2077
+ }
2078
+ setState(state) {
2079
+ this.dataService.state = {
2080
+ columnAxes: state.columnAxes,
2081
+ rowAxes: state.rowAxes,
2082
+ measureAxes: state.measureAxes,
2083
+ sort: state.sort,
2084
+ filter: state.filter
2085
+ };
2086
+ this.state = this.configuratorService.state = state;
2087
+ }
2088
+ onReorder(ev, name, item) {
2089
+ const currentCollection = this.state[`${name}Axes`];
2090
+ const itemIndex = currentCollection.indexOf(item);
2091
+ switch (ev.direction) {
2092
+ case 'right':
2093
+ if (itemIndex !== currentCollection.length - 1) {
2094
+ this.swapChips(currentCollection, itemIndex, ev.direction, name);
2095
+ }
2096
+ break;
2097
+ case 'left':
2098
+ if (itemIndex !== 0) {
2099
+ this.swapChips(currentCollection, itemIndex, ev.direction, name);
2100
+ ev.sender.focus();
2101
+ }
2102
+ break;
2103
+ case 'up':
2104
+ if (name === 'row') {
2105
+ this.moveChip(currentCollection, item, itemIndex, name);
2106
+ }
2107
+ break;
2108
+ case 'down':
2109
+ if (name === 'column') {
2110
+ this.moveChip(currentCollection, item, itemIndex, name);
2111
+ }
2112
+ break;
2113
+ default:
2114
+ break;
2115
+ }
2116
+ }
2117
+ /**
2118
+ * Returns the localized message for a given token
2119
+ */
2120
+ messageFor(localizationToken) {
2121
+ return this.localization.get(localizationToken);
2122
+ }
2123
+ /**
2124
+ * Retrieves the 'Columns' section item names
2125
+ */
2126
+ get columnHierarchies() {
2127
+ return this.extractDefaultFields(this.dataService.state.columnAxes);
2128
+ }
2129
+ ;
2130
+ /**
2131
+ * Retrieves the 'Rows' section item names
2132
+ */
2133
+ get rowHierarchies() {
2134
+ return this.extractDefaultFields(this.dataService.state.rowAxes);
2135
+ }
2136
+ ;
2137
+ /**
2138
+ * Retrieves the 'Value' section item names
2139
+ */
2140
+ get measureHierarchies() {
2141
+ return this.extractDefaultFields(this.dataService.state.measureAxes);
2142
+ }
2143
+ ;
2144
+ /**
2145
+ * Updates the respective axis configuration of the current state
2146
+ * when a chip is deleted from the UI
2147
+ */
2148
+ onChipRemove(ev, item, section) {
2149
+ const filteredItems = this.dataService.state[`${section}Axes`].filter(descriptor => descriptor !== item);
2150
+ this.dataService.state[`${section}Axes`] = filteredItems;
2151
+ const newState = { ...this.state, ...this.dataService.state };
2152
+ this.checked = this.checked.filter(checkedItem => checkedItem.uniqueName !== item.name[0]);
2153
+ this.setState(newState);
2154
+ if (!this.navigation) {
2155
+ return;
2156
+ }
2157
+ ;
2158
+ const targetIndex = this.navigation.elements.indexOf(ev.sender.element.nativeElement);
2159
+ this.zone.runOutsideAngular(() => setTimeout(() => this.navigation.focusElement(this.navigation.elements[targetIndex - 1], this.navigation.elements[targetIndex])));
2160
+ }
2161
+ /**
2162
+ * Constructs an array with all selected fields.
2163
+ * @param fields - used for when child nodes are loaded on demand.
2164
+ * Child nodes are concatinated to the root level nodes.
2165
+ */
2166
+ setChecked(fields = []) {
2167
+ const allFields = [...this.fields, ...fields];
2168
+ const checked = this.getFieldsFlatMap(allFields).filter((f) => [
2169
+ ...this.columnHierarchies,
2170
+ ...this.rowHierarchies,
2171
+ ...this.measureHierarchies
2172
+ ].some((h) => (h === f.uniqueName || h === f.defaultHierarchy)));
2173
+ this.checked = checked;
2174
+ }
2175
+ /**
2176
+ * A function which determines if a specific node is checked/
2177
+ */
2178
+ isItemChecked(node) {
2179
+ const res = this.checked.some(s => node.defaultHierarchy
2180
+ ? s.defaultHierarchy === node.defaultHierarchy
2181
+ : s.uniqueName === node.uniqueName)
2182
+ || (node.children?.length && node.children?.every((c) => c.checked));
2183
+ return res || null;
2184
+ }
2185
+ /**
2186
+ * Determines if a checkbox should be rendered.
2187
+ */
2188
+ isSelectable(node) {
2189
+ const hasChildren = !('hierarchyUniqueName' in node) && !('aggregator' in node);
2190
+ return !((!hasChildren && !node.aggregator && !node.measure)
2191
+ || (node.type === 2)
2192
+ || node.uniqueName === '[KPIs]');
2193
+ }
2194
+ /**
2195
+ * Check if the newly loaded child nodes have checked items.
2196
+ * (Only for OLAP data-binding directive)
2197
+ */
2198
+ handleChildrenLoaded(event) {
2199
+ if (this.dataService.directive.type === 'local') {
2200
+ return;
2201
+ }
2202
+ const fields = event.children.map(item => item.dataItem);
2203
+ this.setChecked(fields);
2204
+ }
2205
+ handleCheckedChange(event, item) {
2206
+ if (event.target.checked) {
2207
+ this.checked = [...this.checked, item];
2208
+ }
2209
+ else {
2210
+ const itemIndex = this.checked.findIndex(checkedItem => checkedItem.uniqueName === item.uniqueName);
2211
+ this.checked.splice(itemIndex, 1);
2212
+ }
2213
+ const action = {
2214
+ type: 'PIVOT_CONFIGURATOR_ACTION_TOGGLE_SELECTION',
2215
+ payload: item
2216
+ };
2217
+ this.configuratorService.parseConfiguratorState(action);
2218
+ const closestItem = event.target.closest('.k-treeview-item');
2219
+ this.zone.runOutsideAngular(() => setTimeout(() => closestItem.focus()));
2220
+ }
2221
+ onTreeViewSelect(ev) {
2222
+ const closestItem = ev.target.closest('.k-treeview-item');
2223
+ if (closestItem) {
2224
+ closestItem.querySelector('.k-checkbox')?.click();
2225
+ }
2226
+ }
2227
+ onTreeViewEscape(ev) {
2228
+ ev.stopImmediatePropagation();
2229
+ this.close.emit();
2230
+ }
2231
+ handleSubmit() {
2232
+ this.dataService.configuratorFieldChange.emit(this.dataService.state);
2233
+ }
2234
+ /**
2235
+ * Reset the configurator to the last saved state
2236
+ */
2237
+ handleReset() {
2238
+ this.setState(clone(this.originalState));
2239
+ this.setChecked();
2240
+ }
2241
+ /**
2242
+ * Flattens all available fields.
2243
+ */
2244
+ getFieldsFlatMap(nodes = []) {
2245
+ let result = [...nodes];
2246
+ (nodes || []).forEach((child) => {
2247
+ result = result.concat(this.getFieldsFlatMap(child.children));
2248
+ });
2249
+ return result;
2250
+ }
2251
+ /**
2252
+ * Creates an array containing only the field names, e.g. '[Date].[Calendar]' or 'Product'
2253
+ */
2254
+ extractDefaultFields(columns = []) {
2255
+ const result = new Set();
2256
+ columns.forEach((column) => {
2257
+ result.add(String(column.name));
2258
+ });
2259
+ return Array.from(result);
2260
+ }
2261
+ ;
2262
+ /**
2263
+ * Swaps chips within the same ChipList
2264
+ */
2265
+ swapChips(collection, itemIndex, direction, name) {
2266
+ const targetIndex = itemIndex + (direction === 'right' ? 1 : -1);
2267
+ swapItems(collection, itemIndex, targetIndex);
2268
+ this.dataService.state[`${name}Axes`] = collection;
2269
+ const newState = { ...this.state, ...this.dataService.state };
2270
+ this.setState(newState);
2271
+ this.cdr.detectChanges();
2272
+ }
2273
+ /**
2274
+ * Moves a chip from one ChipList to another
2275
+ */
2276
+ moveChip(collection, item, itemIndex, name) {
2277
+ collection.splice(itemIndex, 1);
2278
+ const targetCollectionName = name === 'row' ? 'column' : 'row';
2279
+ const axes = this.state[`${targetCollectionName}Axes`];
2280
+ axes.push(item);
2281
+ this.dataService.state[`${name}Axes`] = collection;
2282
+ this.dataService.state[targetCollectionName] = axes;
2283
+ const newState = { ...this.state, ...this.dataService.state };
2284
+ this.setState(newState);
2285
+ this.cdr.detectChanges();
2286
+ this[`${targetCollectionName}sList`]?.chips.last.focus();
2287
+ }
2288
+ }
2289
+ PivotGridConfiguratorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PivotGridConfiguratorComponent, deps: [{ token: PivotGridDataService }, { token: i1.LocalizationService }, { token: ConfiguratorService }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
2290
+ PivotGridConfiguratorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: PivotGridConfiguratorComponent, selector: "kendo-pivotgrid-configurator", inputs: { orientation: "orientation", sort: "sort", filter: "filter", navigation: "navigation" }, outputs: { close: "close" }, host: { properties: { "class.k-pivotgrid-configurator": "this.hostClass", "attr.role": "this.hostAriaRole", "attr.aria-labelledby": "this.headerTextId" } }, providers: [
2291
+ ConfiguratorService,
2292
+ DropCueService,
2293
+ SinglePopupService
2294
+ ], viewQueries: [{ propertyName: "treeView", first: true, predicate: TreeViewComponent, descendants: true }, { propertyName: "columnsList", first: true, predicate: ["columnsChiplist"], descendants: true }, { propertyName: "rowsList", first: true, predicate: ["rowsChiplist"], descendants: true }], usesOnChanges: true, ngImport: i0, template: `
2295
+ <div
2296
+ class="k-pivotgrid-configurator-panel k-pivotgrid-configurator-push"
2297
+ [ngClass]="{
2298
+ 'k-pivotgrid-configurator-horizontal': isHorizontal,
2299
+ 'k-pivotgrid-configurator-vertical': !isHorizontal
2300
+ }"
2301
+ >
2302
+ <div class="k-pivotgrid-configurator-header">
2303
+ <div
2304
+ [id]="headerTextId"
2305
+ class="k-pivotgrid-configurator-header-text">{{messageFor('configuratorHeaderText')}}</div>
2306
+ </div>
2307
+
2308
+ <div class="k-pivotgrid-configurator-content">
2309
+ <div class="k-form" [class.k-form-horizontal]="isHorizontal">
2310
+ <div class="k-form-field-wrapper" [ngStyle]="isHorizontal ? {'padding-left': 0 } : null">
2311
+ <div class="k-form-field" [style]="'padding-top: 1em; margin-top: 0;'" [ngStyle]="isHorizontal ? {'padding-top': 0, 'padding-left': '16px' } : null">
2312
+ <span [id]="contentLabelId('fields')" class="k-label">{{messageFor('configuratorFieldsText')}}</span>
2313
+ </div>
2314
+ <div class="k-form-field" [style]="'padding-top: 1em; margin-top: 0;'" [ngStyle]="isHorizontal ? {'padding-top': 0, 'padding-left': '16px' } : null">
2315
+ <div class="k-fields-list-wrapper">
2316
+ <kendo-treeview
2317
+ #treeview
2318
+ [attr.aria-labelledby]="headerTextId + ' ' + contentLabelId('fields')"
2319
+ (focus)="treeview.focus()"
2320
+ [nodes]="fields"
2321
+ textField="caption"
2322
+ [children]="children"
2323
+ [hasChildren]="hasChildren"
2324
+ kendoTreeViewExpandable
2325
+ (childrenLoaded)="handleChildrenLoaded($event)"
2326
+ (keydown.space)="onTreeViewSelect($event)">
2327
+ <ng-template kendoTreeViewNodeTemplate let-dataItem>
2328
+ <input kendoCheckBox
2329
+ *ngIf="isSelectable(dataItem)"
2330
+ type="checkbox"
2331
+ kendoCheckBox
2332
+ tabindex="-1"
2333
+ [checked]="isItemChecked(dataItem)"
2334
+ (change)="handleCheckedChange($event, dataItem)"/>
2335
+ {{ dataItem.caption }}
2336
+ </ng-template>
2337
+ </kendo-treeview>
2338
+
2339
+ </div>
2340
+ </div>
2341
+ </div>
2342
+
2343
+ <div *ngIf="isHorizontal; else verticalTemplate" class="k-form-field-wrapper" [ngStyle]="isHorizontal ? {'padding-left': 0 } : null">
2344
+ <ng-container *ngTemplateOutlet="verticalTemplate"></ng-container>
2345
+ </div>
2346
+
2347
+ <ng-template #verticalTemplate>
2348
+ <div class="k-form-field" kendoDropTarget axes="columnAxes" [style]="'padding-top: 1em; margin-top: 0;'" [ngStyle]="isHorizontal ? {'padding-top': 0, 'padding-left': '16px' } : null">
2349
+ <span [id]="contentLabelId('columns')" class="k-label">{{messageFor('configuratorColumnsText')}}</span>
2350
+ </div>
2351
+
2352
+ <kendo-chiplist
2353
+ *ngIf="state.columnAxes && state.columnAxes.length; else noColumnAxes"
2354
+ #columnsChiplist
2355
+ kendoDropTarget
2356
+ axes="columnAxes"
2357
+ [attr.aria-labelledby]="headerTextId + ' ' + contentLabelId('columns')"
2358
+ [ngStyle]="isHorizontal ? {'padding-top': 0, 'padding-left': '16px' } : null"
2359
+ >
2360
+ <ng-container *ngFor="let item of state.columnAxes">
2361
+ <kendo-chip *ngIf="item.name.length === 1"
2362
+ kendoChipDraggable
2363
+ kendoDraggable
2364
+ kendoDropTarget
2365
+ kendoChipKeyboardNavigation
2366
+ [item]="item"
2367
+ axes="columnAxes"
2368
+ rounded="full"
2369
+ [removable]="true"
2370
+ (remove)="onChipRemove($event, item, 'column')"
2371
+ (reorder)="onReorder($event, 'column', item)"
2372
+ >{{ getName(item.name) }}
2373
+ <kendo-pivot-chip-menu
2374
+ [chip]="item">
2375
+ </kendo-pivot-chip-menu>
2376
+ </kendo-chip>
2377
+ </ng-container>
2378
+ </kendo-chiplist>
2379
+
2380
+ <ng-template #noColumnAxes>
2381
+ <div class="k-settings-description" kendoDropTarget axes="columnAxes">{{messageFor('configuratorEmptyColumnsText')}}</div>
2382
+ </ng-template>
2383
+
2384
+ <div class="k-form-field" kendoDropTarget axes="rowAxes" [style]="'padding-top: 1em; margin-top: 0;'" [ngStyle]="isHorizontal ? {'padding-top': 0, 'padding-left': '16px' } : null">
2385
+ <span [id]="contentLabelId('rows')" class="k-label">{{messageFor('configuratorRowsText')}}</span>
2386
+ </div>
2387
+
2388
+ <kendo-chiplist
2389
+ *ngIf="state.rowAxes && state.rowAxes.length; else noRowAxes"
2390
+ #rowsChiplist
2391
+ kendoDropTarget
2392
+ axes="rowAxes"
2393
+ [attr.aria-labelledby]="headerTextId + ' ' + contentLabelId('rows')"
2394
+ [ngStyle]="isHorizontal ? {'padding-top': 0, 'padding-left': '16px' } : null"
2395
+ >
2396
+ <ng-container *ngFor="let item of state.rowAxes">
2397
+ <kendo-chip *ngIf="item.name.length === 1"
2398
+ kendoChipDraggable
2399
+ kendoDraggable
2400
+ kendoDropTarget
2401
+ kendoChipKeyboardNavigation
2402
+ [item]="item"
2403
+ axes="rowAxes"
2404
+ rounded="full"
2405
+ [removable]="true"
2406
+ (remove)="onChipRemove($event, item, 'row')"
2407
+ (reorder)="onReorder($event, 'row', item)"
2408
+ >
2409
+ {{ getName(item.name) }}
2410
+
2411
+ <kendo-pivot-chip-menu
2412
+ [chip]="item">
2413
+ </kendo-pivot-chip-menu>
2414
+ </kendo-chip>
2415
+ </ng-container>
2416
+ </kendo-chiplist>
2417
+
2418
+ <ng-template #noRowAxes>
2419
+ <div class="k-settings-description" kendoDropTarget axes="rowAxes">{{messageFor('configuratorEmptyRowsText')}}</div>
2420
+ </ng-template>
2421
+ </ng-template>
2422
+
2423
+ <div *ngIf="isHorizontal; else verticalMeasuresTemplate" class="k-form-field-wrapper" [ngStyle]="isHorizontal ? {'padding-left': 0 } : null" >
2424
+ <ng-container *ngTemplateOutlet="verticalMeasuresTemplate"></ng-container>
2425
+ </div>
2426
+
2427
+ <ng-template #verticalMeasuresTemplate>
2428
+ <div class="k-form-field" kendoDropTarget axes="measureAxes" [style]="'padding-top: 1em; margin-top: 0;'" [ngStyle]="isHorizontal ? {'padding-top': 0, 'padding-left': '16px' } : null">
2429
+ <span [id]="contentLabelId('values')" class="k-label">{{messageFor('configuratorValuesText')}}</span>
2430
+ </div>
2431
+
2432
+ <kendo-chiplist
2433
+ *ngIf="state.measureAxes && state.measureAxes.length; else noMeasureAxes"
2434
+ kendoDropTarget
2435
+ axes="measureAxes"
2436
+ [attr.aria-labelledby]="headerTextId + ' ' + contentLabelId('values')"
2437
+ [ngStyle]="isHorizontal ? {'padding-top': 0, 'padding-left': '16px' } : null"
2438
+ >
2439
+ <kendo-chip *ngFor="let item of state.measureAxes"
2440
+ kendoChipDraggable
2441
+ kendoDraggable
2442
+ kendoDropTarget
2443
+ kendoChipKeyboardNavigation
2444
+ [item]="item"
2445
+ axes="measureAxes"
2446
+ rounded="full"
2447
+ [removable]="true"
2448
+ (remove)="onChipRemove($event, item, 'measure')"
2449
+ (reorder)="onReorder($event, 'measure', item)"
2450
+ >
2451
+ {{ getName(item.name) }}
2452
+ </kendo-chip>
2453
+ </kendo-chiplist>
2454
+
2455
+ <ng-template #noMeasureAxes>
2456
+ <div class="k-settings-description" kendoDropTarget axes="measureAxes">{{messageFor('configuratorEmptyMeasuresText')}}</div>
2457
+ </ng-template>
2458
+ </ng-template>
2459
+
2460
+ </div>
2461
+ </div>
2462
+ <div class="k-pivotgrid-configurator-actions k-actions k-hstack k-justify-content-end">
2463
+ <button kendoButton type="button" (click)="handleReset()">{{messageFor('configuratorCancelButtonText')}}</button>
2464
+ <button kendoButton themeColor="primary" type="button" (click)="handleSubmit()">{{messageFor('configuratorApplyButtonText')}}</button>
2465
+ </div>
2466
+ </div>
2467
+ `, 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", "svgIcon", "iconClass", "avatarClass", "selected", "removable", "removeIcon", "removeSvgIcon", "disabled", "size", "rounded", "fillMode", "themeColor"], outputs: ["remove", "contentClick"] }, { type: ChipMenuComponent, selector: "kendo-pivot-chip-menu", inputs: ["chip", "tabIndex"] }, { type: i5.Button, selector: "button[kendoButton], span[kendoButton], kendo-button", inputs: ["toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }], directives: [{ type: i7.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i7.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i4.ExpandDirective, selector: "[kendoTreeViewExpandable]", inputs: ["isExpanded", "expandBy", "expandOnFilter", "expandedKeys"], outputs: ["expandedKeysChange"] }, { type: i4.NodeTemplateDirective, selector: "[kendoTreeViewNodeTemplate]" }, { type: i7.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6.CheckBoxDirective, selector: "input[kendoCheckBox]", inputs: ["size", "rounded"] }, { type: i7.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: DropTargetDirective, selector: "[kendoDropTarget]", inputs: ["item", "axes"] }, { type: i7.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: DraggableChipDirective, selector: "[kendoChipDraggable]", inputs: ["item"] }, { type: i3.DraggableDirective, selector: "[kendoDraggable]", inputs: ["enableDrag"], outputs: ["kendoPress", "kendoDrag", "kendoRelease"] }, { type: ChipKeyboardNavigationDirective, selector: "[kendoChipKeyboardNavigation]", outputs: ["reorder"] }] });
2468
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PivotGridConfiguratorComponent, decorators: [{
2469
+ type: Component,
2470
+ args: [{
2471
+ selector: 'kendo-pivotgrid-configurator',
2472
+ providers: [
2473
+ ConfiguratorService,
2474
+ DropCueService,
2475
+ SinglePopupService
2476
+ ],
2477
+ template: `
2478
+ <div
2479
+ class="k-pivotgrid-configurator-panel k-pivotgrid-configurator-push"
2480
+ [ngClass]="{
2481
+ 'k-pivotgrid-configurator-horizontal': isHorizontal,
2482
+ 'k-pivotgrid-configurator-vertical': !isHorizontal
2483
+ }"
2484
+ >
2485
+ <div class="k-pivotgrid-configurator-header">
2486
+ <div
2487
+ [id]="headerTextId"
2488
+ class="k-pivotgrid-configurator-header-text">{{messageFor('configuratorHeaderText')}}</div>
2489
+ </div>
2490
+
2491
+ <div class="k-pivotgrid-configurator-content">
2492
+ <div class="k-form" [class.k-form-horizontal]="isHorizontal">
2493
+ <div class="k-form-field-wrapper" [ngStyle]="isHorizontal ? {'padding-left': 0 } : null">
2494
+ <div class="k-form-field" [style]="'padding-top: 1em; margin-top: 0;'" [ngStyle]="isHorizontal ? {'padding-top': 0, 'padding-left': '16px' } : null">
2495
+ <span [id]="contentLabelId('fields')" class="k-label">{{messageFor('configuratorFieldsText')}}</span>
2496
+ </div>
2497
+ <div class="k-form-field" [style]="'padding-top: 1em; margin-top: 0;'" [ngStyle]="isHorizontal ? {'padding-top': 0, 'padding-left': '16px' } : null">
2498
+ <div class="k-fields-list-wrapper">
2499
+ <kendo-treeview
2500
+ #treeview
2501
+ [attr.aria-labelledby]="headerTextId + ' ' + contentLabelId('fields')"
2502
+ (focus)="treeview.focus()"
2503
+ [nodes]="fields"
2504
+ textField="caption"
2505
+ [children]="children"
2506
+ [hasChildren]="hasChildren"
2507
+ kendoTreeViewExpandable
2508
+ (childrenLoaded)="handleChildrenLoaded($event)"
2509
+ (keydown.space)="onTreeViewSelect($event)">
2510
+ <ng-template kendoTreeViewNodeTemplate let-dataItem>
2511
+ <input kendoCheckBox
2512
+ *ngIf="isSelectable(dataItem)"
2513
+ type="checkbox"
2514
+ kendoCheckBox
2515
+ tabindex="-1"
2516
+ [checked]="isItemChecked(dataItem)"
2517
+ (change)="handleCheckedChange($event, dataItem)"/>
2518
+ {{ dataItem.caption }}
2519
+ </ng-template>
2520
+ </kendo-treeview>
2521
+
2522
+ </div>
2523
+ </div>
2524
+ </div>
2525
+
2526
+ <div *ngIf="isHorizontal; else verticalTemplate" class="k-form-field-wrapper" [ngStyle]="isHorizontal ? {'padding-left': 0 } : null">
2527
+ <ng-container *ngTemplateOutlet="verticalTemplate"></ng-container>
2528
+ </div>
2529
+
2530
+ <ng-template #verticalTemplate>
2531
+ <div class="k-form-field" kendoDropTarget axes="columnAxes" [style]="'padding-top: 1em; margin-top: 0;'" [ngStyle]="isHorizontal ? {'padding-top': 0, 'padding-left': '16px' } : null">
2532
+ <span [id]="contentLabelId('columns')" class="k-label">{{messageFor('configuratorColumnsText')}}</span>
2533
+ </div>
2534
+
2535
+ <kendo-chiplist
2536
+ *ngIf="state.columnAxes && state.columnAxes.length; else noColumnAxes"
2537
+ #columnsChiplist
2538
+ kendoDropTarget
2539
+ axes="columnAxes"
2540
+ [attr.aria-labelledby]="headerTextId + ' ' + contentLabelId('columns')"
2541
+ [ngStyle]="isHorizontal ? {'padding-top': 0, 'padding-left': '16px' } : null"
2542
+ >
2543
+ <ng-container *ngFor="let item of state.columnAxes">
2544
+ <kendo-chip *ngIf="item.name.length === 1"
2545
+ kendoChipDraggable
2546
+ kendoDraggable
2547
+ kendoDropTarget
2548
+ kendoChipKeyboardNavigation
2549
+ [item]="item"
2550
+ axes="columnAxes"
2551
+ rounded="full"
2552
+ [removable]="true"
2553
+ (remove)="onChipRemove($event, item, 'column')"
2554
+ (reorder)="onReorder($event, 'column', item)"
2555
+ >{{ getName(item.name) }}
2556
+ <kendo-pivot-chip-menu
2557
+ [chip]="item">
2558
+ </kendo-pivot-chip-menu>
2559
+ </kendo-chip>
2560
+ </ng-container>
2561
+ </kendo-chiplist>
2562
+
2563
+ <ng-template #noColumnAxes>
2564
+ <div class="k-settings-description" kendoDropTarget axes="columnAxes">{{messageFor('configuratorEmptyColumnsText')}}</div>
2565
+ </ng-template>
2566
+
2567
+ <div class="k-form-field" kendoDropTarget axes="rowAxes" [style]="'padding-top: 1em; margin-top: 0;'" [ngStyle]="isHorizontal ? {'padding-top': 0, 'padding-left': '16px' } : null">
2568
+ <span [id]="contentLabelId('rows')" class="k-label">{{messageFor('configuratorRowsText')}}</span>
2569
+ </div>
2570
+
2571
+ <kendo-chiplist
2572
+ *ngIf="state.rowAxes && state.rowAxes.length; else noRowAxes"
2573
+ #rowsChiplist
2574
+ kendoDropTarget
2575
+ axes="rowAxes"
2576
+ [attr.aria-labelledby]="headerTextId + ' ' + contentLabelId('rows')"
2577
+ [ngStyle]="isHorizontal ? {'padding-top': 0, 'padding-left': '16px' } : null"
2578
+ >
2579
+ <ng-container *ngFor="let item of state.rowAxes">
2580
+ <kendo-chip *ngIf="item.name.length === 1"
2581
+ kendoChipDraggable
2582
+ kendoDraggable
2583
+ kendoDropTarget
2584
+ kendoChipKeyboardNavigation
2585
+ [item]="item"
2586
+ axes="rowAxes"
2587
+ rounded="full"
2588
+ [removable]="true"
2589
+ (remove)="onChipRemove($event, item, 'row')"
2590
+ (reorder)="onReorder($event, 'row', item)"
2591
+ >
2592
+ {{ getName(item.name) }}
2593
+
2594
+ <kendo-pivot-chip-menu
2595
+ [chip]="item">
2596
+ </kendo-pivot-chip-menu>
2597
+ </kendo-chip>
2598
+ </ng-container>
2599
+ </kendo-chiplist>
2600
+
2601
+ <ng-template #noRowAxes>
2602
+ <div class="k-settings-description" kendoDropTarget axes="rowAxes">{{messageFor('configuratorEmptyRowsText')}}</div>
2603
+ </ng-template>
2604
+ </ng-template>
2605
+
2606
+ <div *ngIf="isHorizontal; else verticalMeasuresTemplate" class="k-form-field-wrapper" [ngStyle]="isHorizontal ? {'padding-left': 0 } : null" >
2607
+ <ng-container *ngTemplateOutlet="verticalMeasuresTemplate"></ng-container>
2608
+ </div>
2609
+
2610
+ <ng-template #verticalMeasuresTemplate>
2611
+ <div class="k-form-field" kendoDropTarget axes="measureAxes" [style]="'padding-top: 1em; margin-top: 0;'" [ngStyle]="isHorizontal ? {'padding-top': 0, 'padding-left': '16px' } : null">
2612
+ <span [id]="contentLabelId('values')" class="k-label">{{messageFor('configuratorValuesText')}}</span>
2613
+ </div>
2614
+
2615
+ <kendo-chiplist
2616
+ *ngIf="state.measureAxes && state.measureAxes.length; else noMeasureAxes"
2617
+ kendoDropTarget
2618
+ axes="measureAxes"
2619
+ [attr.aria-labelledby]="headerTextId + ' ' + contentLabelId('values')"
2620
+ [ngStyle]="isHorizontal ? {'padding-top': 0, 'padding-left': '16px' } : null"
2621
+ >
2622
+ <kendo-chip *ngFor="let item of state.measureAxes"
2623
+ kendoChipDraggable
2624
+ kendoDraggable
2625
+ kendoDropTarget
2626
+ kendoChipKeyboardNavigation
2627
+ [item]="item"
2628
+ axes="measureAxes"
2629
+ rounded="full"
2630
+ [removable]="true"
2631
+ (remove)="onChipRemove($event, item, 'measure')"
2632
+ (reorder)="onReorder($event, 'measure', item)"
2633
+ >
2634
+ {{ getName(item.name) }}
2635
+ </kendo-chip>
2636
+ </kendo-chiplist>
2637
+
2638
+ <ng-template #noMeasureAxes>
2639
+ <div class="k-settings-description" kendoDropTarget axes="measureAxes">{{messageFor('configuratorEmptyMeasuresText')}}</div>
2640
+ </ng-template>
2641
+ </ng-template>
2642
+
2643
+ </div>
2644
+ </div>
2645
+ <div class="k-pivotgrid-configurator-actions k-actions k-hstack k-justify-content-end">
2646
+ <button kendoButton type="button" (click)="handleReset()">{{messageFor('configuratorCancelButtonText')}}</button>
2647
+ <button kendoButton themeColor="primary" type="button" (click)="handleSubmit()">{{messageFor('configuratorApplyButtonText')}}</button>
2648
+ </div>
2649
+ </div>
2650
+ `
2651
+ }]
2652
+ }], ctorParameters: function () { return [{ type: PivotGridDataService }, { type: i1.LocalizationService }, { type: ConfiguratorService }, { type: i0.ChangeDetectorRef }, { type: i0.NgZone }]; }, propDecorators: { hostClass: [{
2653
+ type: HostBinding,
2654
+ args: ['class.k-pivotgrid-configurator']
2655
+ }], hostAriaRole: [{
2656
+ type: HostBinding,
2657
+ args: ['attr.role']
2658
+ }], headerTextId: [{
2659
+ type: HostBinding,
2660
+ args: ['attr.aria-labelledby']
2661
+ }], orientation: [{
2662
+ type: Input
2663
+ }], sort: [{
2664
+ type: Input
2665
+ }], filter: [{
2666
+ type: Input
2667
+ }], navigation: [{
2668
+ type: Input
2669
+ }], close: [{
2670
+ type: Output
2671
+ }], treeView: [{
2672
+ type: ViewChild,
2673
+ args: [TreeViewComponent]
2674
+ }], columnsList: [{
2675
+ type: ViewChild,
2676
+ args: ['columnsChiplist']
2677
+ }], rowsList: [{
2678
+ type: ViewChild,
2679
+ args: ['rowsChiplist']
2680
+ }] } });
2681
+
2682
+ /**
2683
+ * @hidden
2684
+ */
2685
+ class PivotGridMessages extends ComponentMessages {
2686
+ }
2687
+ PivotGridMessages.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PivotGridMessages, deps: null, target: i0.ɵɵFactoryTarget.Directive });
2688
+ PivotGridMessages.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: PivotGridMessages, inputs: { fieldMenuFilterItemLabel: "fieldMenuFilterItemLabel", fieldMenuSortAscendingItemLabel: "fieldMenuSortAscendingItemLabel", fieldMenuSortDescendingItemLabel: "fieldMenuSortDescendingItemLabel", filterInputLabel: "filterInputLabel", filterOperatorsDropDownLabel: "filterOperatorsDropDownLabel", filterEqOperator: "filterEqOperator", filterNotEqOperator: "filterNotEqOperator", filterIsNullOperator: "filterIsNullOperator", filterIsNotNullOperator: "filterIsNotNullOperator", filterIsEmptyOperator: "filterIsEmptyOperator", filterIsNotEmptyOperator: "filterIsNotEmptyOperator", filterStartsWithOperator: "filterStartsWithOperator", filterContainsOperator: "filterContainsOperator", filterNotContainsOperator: "filterNotContainsOperator", filterEndsWithOperator: "filterEndsWithOperator", filterFilterButton: "filterFilterButton", filterClearButton: "filterClearButton", loading: "loading", emptyCellLabel: "emptyCellLabel", configuratorButtonText: "configuratorButtonText", configuratorHeaderText: "configuratorHeaderText", configuratorFieldsText: "configuratorFieldsText", configuratorColumnsText: "configuratorColumnsText", configuratorRowsText: "configuratorRowsText", configuratorValuesText: "configuratorValuesText", configuratorCancelButtonText: "configuratorCancelButtonText", configuratorApplyButtonText: "configuratorApplyButtonText", configuratorEmptyRowsText: "configuratorEmptyRowsText", configuratorEmptyColumnsText: "configuratorEmptyColumnsText", configuratorEmptyMeasuresText: "configuratorEmptyMeasuresText", chipMenuIconTitle: "chipMenuIconTitle" }, usesInheritance: true, ngImport: i0 });
2689
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PivotGridMessages, decorators: [{
2690
+ type: Directive
2691
+ }], propDecorators: { fieldMenuFilterItemLabel: [{
2692
+ type: Input
2693
+ }], fieldMenuSortAscendingItemLabel: [{
2694
+ type: Input
2695
+ }], fieldMenuSortDescendingItemLabel: [{
2696
+ type: Input
2697
+ }], filterInputLabel: [{
2698
+ type: Input
2699
+ }], filterOperatorsDropDownLabel: [{
2700
+ type: Input
2701
+ }], filterEqOperator: [{
2702
+ type: Input
2703
+ }], filterNotEqOperator: [{
2704
+ type: Input
2705
+ }], filterIsNullOperator: [{
2706
+ type: Input
2707
+ }], filterIsNotNullOperator: [{
2708
+ type: Input
2709
+ }], filterIsEmptyOperator: [{
2710
+ type: Input
2711
+ }], filterIsNotEmptyOperator: [{
2712
+ type: Input
2713
+ }], filterStartsWithOperator: [{
2714
+ type: Input
2715
+ }], filterContainsOperator: [{
2716
+ type: Input
2717
+ }], filterNotContainsOperator: [{
2718
+ type: Input
2719
+ }], filterEndsWithOperator: [{
2720
+ type: Input
2721
+ }], filterFilterButton: [{
2722
+ type: Input
2723
+ }], filterClearButton: [{
2724
+ type: Input
2725
+ }], loading: [{
2726
+ type: Input
2727
+ }], emptyCellLabel: [{
2728
+ type: Input
2729
+ }], configuratorButtonText: [{
2730
+ type: Input
2731
+ }], configuratorHeaderText: [{
2732
+ type: Input
2733
+ }], configuratorFieldsText: [{
2734
+ type: Input
2735
+ }], configuratorColumnsText: [{
2736
+ type: Input
2737
+ }], configuratorRowsText: [{
2738
+ type: Input
2739
+ }], configuratorValuesText: [{
2740
+ type: Input
2741
+ }], configuratorCancelButtonText: [{
2742
+ type: Input
2743
+ }], configuratorApplyButtonText: [{
2744
+ type: Input
2745
+ }], configuratorEmptyRowsText: [{
2746
+ type: Input
2747
+ }], configuratorEmptyColumnsText: [{
2748
+ type: Input
2749
+ }], configuratorEmptyMeasuresText: [{
2750
+ type: Input
2751
+ }], chipMenuIconTitle: [{
2752
+ type: Input
2753
+ }] } });
2754
+
2755
+ /**
2756
+ * @hidden
2757
+ */
2758
+ class LocalizedMessagesDirective extends PivotGridMessages {
2759
+ constructor(service) {
2760
+ super();
2761
+ this.service = service;
2762
+ }
2763
+ }
2764
+ LocalizedMessagesDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: LocalizedMessagesDirective, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Directive });
2765
+ LocalizedMessagesDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: LocalizedMessagesDirective, selector: "[kendoPivotGridLocalizedMessages]", providers: [
2766
+ {
2767
+ provide: PivotGridMessages,
2768
+ useExisting: forwardRef(() => LocalizedMessagesDirective)
2769
+ }
2770
+ ], usesInheritance: true, ngImport: i0 });
2771
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: LocalizedMessagesDirective, decorators: [{
2772
+ type: Directive,
2773
+ args: [{
2774
+ providers: [
2775
+ {
2776
+ provide: PivotGridMessages,
2777
+ useExisting: forwardRef(() => LocalizedMessagesDirective)
2778
+ }
2779
+ ],
2780
+ selector: '[kendoPivotGridLocalizedMessages]'
2781
+ }]
2782
+ }], ctorParameters: function () { return [{ type: i1.LocalizationService }]; } });
2783
+
2784
+ const DEFAULT_LOADER_SETTINGS = {
2785
+ type: 'converging-spinner',
2786
+ themeColor: 'primary',
2787
+ size: 'large'
2788
+ };
2789
+ const DEFAULT_CONFIGURATOR_SETTINGS = {
2790
+ position: 'right',
2791
+ orientation: 'vertical'
2792
+ };
2793
+ /**
2794
+ * Represents the Kendo UI PivotGrid component for Angular.
2795
+ */
2796
+ class PivotGridComponent {
2797
+ constructor(hostEl, zone, dataService, localization, renderer, _scrollbarWidthService) {
2798
+ this.hostEl = hostEl;
2799
+ this.zone = zone;
2800
+ this.dataService = dataService;
2801
+ this.localization = localization;
2802
+ this.renderer = renderer;
2803
+ this.hostClass = true;
2804
+ /**
2805
+ * Specify the width of the column header and data cells. Value is treated as pixels [(see example)]({% slug appearance_pivotgrid %}#toc-column-headers-width).
2806
+ *
2807
+ * @default 200
2808
+ */
2809
+ this.columnHeadersWidth = 200;
2810
+ /**
2811
+ * If set to true, the user can use dedicated shortcuts to interact with the PivotGrid. By default, navigation is disabled.
2812
+ *
2813
+ * @default false
2814
+ */
2815
+ this.navigable = false;
2816
+ this.resizeObservers = [];
2817
+ this._loaderSettings = DEFAULT_LOADER_SETTINGS;
2818
+ this.subs = new Subscription();
2819
+ this.rtl = false;
2820
+ this.resizeContainer = (axis, element) => {
2821
+ const isRows = axis === 'Rows';
2822
+ const table = this.table.nativeElement;
2823
+ const size = isRows ? 'offsetHeight' : 'offsetWidth';
2824
+ table.style[`gridTemplate${axis}`] = '';
2825
+ table.style[`gridTemplate${axis}`] = `${element[size]}px 1fr`;
2826
+ };
2827
+ this.handleScroll = (event) => {
2828
+ if (event.target === this.valuesTable.nativeElement) {
2829
+ syncScroll(event.target, [
2830
+ this.rowHeadersTable.nativeElement,
2831
+ this.colHeadersTable.nativeElement
2832
+ ]);
2833
+ }
2834
+ else if (event.target.closest('.k-pivotgrid-row-headers')) {
2835
+ syncWheel(event, [this.valuesTable.nativeElement, this.rowHeadersTable.nativeElement], 'scrollTop', 'Y');
2836
+ }
2837
+ else if (event.target.closest('.k-pivotgrid-column-headers')) {
2838
+ syncWheel(event, [this.valuesTable.nativeElement, this.colHeadersTable.nativeElement], 'scrollLeft', 'X');
2839
+ }
2840
+ };
2841
+ validatePackage(packageMetadata);
2842
+ this.subs.add(this.localization.changes.subscribe(({ rtl }) => {
2843
+ this.rtl = rtl;
2844
+ this.direction = this.rtl ? 'rtl' : 'ltr';
2845
+ }));
2846
+ dataService.wrapper = this.hostEl.nativeElement;
2847
+ }
2848
+ get rightPositionClass() {
2849
+ return this.configuratorSettings?.position === 'right';
2850
+ }
2851
+ get leftPositionClass() {
2852
+ return this.configuratorSettings?.position === 'left';
2853
+ }
2854
+ get bottomPositionClass() {
2855
+ return this.configuratorSettings?.position === 'bottom';
2856
+ }
2857
+ get topPositionClass() {
2858
+ return this.configuratorSettings?.position === 'top';
2859
+ }
2860
+ get dir() {
2861
+ return this.direction;
2862
+ }
2863
+ /**
2864
+ * Specify the type, size and color of the PivotGrid's loader.
2865
+ *
2866
+ * The default settings are:
2867
+ * * type: `converging-spinner`
2868
+ * * color: `primary`
2869
+ * * size: `large`
2870
+ */
2871
+ set loaderSettings(settings) {
2872
+ this._loaderSettings = Object.assign({}, DEFAULT_LOADER_SETTINGS, settings);
2873
+ }
2874
+ ;
2875
+ get loaderSettings() {
2876
+ return this._loaderSettings;
2877
+ }
2878
+ /**
2879
+ * @hidden
2880
+ */
2881
+ get loadingText() {
2882
+ return this.localization.get('loading');
2883
+ }
2884
+ get configuratorSettings() {
2885
+ return this.configurator && Object.assign({}, DEFAULT_CONFIGURATOR_SETTINGS, this.configurator);
2886
+ }
2887
+ /**
2888
+ * Holds the displayed aggregated PivotGrid values.
2889
+ */
2890
+ get aggregateData() {
2891
+ return cloneArray(this.dataService.aggregateData);
2892
+ }
2893
+ ngAfterViewInit() {
2894
+ if (isDocumentAvailable()) {
2895
+ this.zone.runOutsideAngular(() => {
2896
+ const rowHeadersTable = this.rowHeadersTable.nativeElement.firstElementChild;
2897
+ const headerColsResizeObserver = new ResizeObserver(() => this.resizeContainer('Columns', rowHeadersTable));
2898
+ headerColsResizeObserver.observe(rowHeadersTable);
2899
+ const colHeadersTable = this.colHeadersTable.nativeElement.firstElementChild;
2900
+ const headerRowsResizeObserver = new ResizeObserver(() => this.resizeContainer('Rows', colHeadersTable));
2901
+ headerRowsResizeObserver.observe(colHeadersTable);
2902
+ this.resizeObservers = [headerColsResizeObserver, headerRowsResizeObserver];
2903
+ this.subs.add(fromEvent(rowHeadersTable, 'wheel')
2904
+ .pipe(merge(fromEvent(colHeadersTable, 'wheel'), fromEvent(this.valuesTable.nativeElement, 'scroll'))).subscribe((ev) => this.handleScroll(ev)));
2905
+ if (this.navigable) {
2906
+ this.initNavigation();
2907
+ }
2908
+ });
2909
+ }
2910
+ }
2911
+ ngAfterContentInit() {
2912
+ this.subs.add(this.dataService.loading.subscribe(state => this.loading = state));
2913
+ }
2914
+ ngOnChanges(changes) {
2915
+ if (isChanged('navigable', changes)) {
2916
+ if (this.navigable) {
2917
+ this.initNavigation();
2918
+ }
2919
+ else {
2920
+ this.stopNavigation();
2921
+ }
2922
+ }
2923
+ }
2924
+ ngOnDestroy() {
2925
+ this.resizeObservers.forEach(o => o.disconnect());
2926
+ this.subs.unsubscribe();
2927
+ this.stopNavigation();
2928
+ }
2929
+ /**
2930
+ * @hidden
2931
+ */
2932
+ messageFor(localizationToken) {
2933
+ return this.localization.get(localizationToken);
2934
+ }
2935
+ /**
2936
+ * @hidden
2937
+ */
2938
+ toggleConfigurator() {
2939
+ this.showConfigurator = !this.showConfigurator;
2940
+ if (!this.navigable) {
2941
+ return;
2942
+ }
2943
+ if (this.showConfigurator) {
2944
+ this.zone.runOutsideAngular(() => setTimeout(() => this.initConfiguratorNavigation()));
2945
+ }
2946
+ else {
2947
+ this.stopConfiguratorNavigation();
2948
+ const el = this.navigation.current;
2949
+ if (el) {
2950
+ this.zone.runOutsideAngular(() => {
2951
+ setTimeout(() => this.navigation.focusElement(el, null));
2952
+ });
2953
+ }
2954
+ ;
2955
+ }
2956
+ }
2957
+ initNavigation() {
2958
+ this.stopNavigation();
2959
+ this.navigation = new PivotGridNavigation({ tabIndex: 0 });
2960
+ this.navigation.start(this.table.nativeElement);
2961
+ const firstCell = this.navigation.first;
2962
+ if (firstCell) {
2963
+ firstCell.setAttribute('tabindex', '0');
2964
+ }
2965
+ if (!this.navigationSubs) {
2966
+ this.navigationSubs = this.dataService.directive.expandChange.pipe(merge(this.dataService.directive.configurationChange)).subscribe(() => this.zone.runOutsideAngular(() => {
2967
+ setTimeout(() => this.navigation.update());
2968
+ }));
2969
+ this.subs.add(this.navigationSubs);
2970
+ }
2971
+ }
2972
+ stopNavigation() {
2973
+ if (this.navigation) {
2974
+ const lastFocusedEl = this.navigation.elements.find(el => el.hasAttribute('tabindex'));
2975
+ if (lastFocusedEl) {
2976
+ this.renderer.removeAttribute(lastFocusedEl, 'tabindex');
2977
+ }
2978
+ this.navigation.stop();
2979
+ }
2980
+ }
2981
+ initConfiguratorNavigation() {
2982
+ this.stopConfiguratorNavigation();
2983
+ this.configuratorNavigation = new ConfiguratorNavigation({ tabIndex: 0 });
2984
+ this.configuratorNavigation.start(this.configuratorWrapper.nativeElement);
2985
+ this.configuratorNavigation.first.setAttribute('tabindex', '0');
2986
+ }
2987
+ stopConfiguratorNavigation() {
2988
+ if (this.configuratorNavigation) {
2989
+ const lastFocusedEl = this.configuratorNavigation.elements.find(el => el.hasAttribute('tabindex'));
2990
+ if (lastFocusedEl) {
2991
+ this.renderer.removeAttribute(lastFocusedEl, 'tabindex');
2992
+ }
2993
+ this.configuratorNavigation.stop();
2994
+ }
2995
+ }
2996
+ }
2997
+ PivotGridComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PivotGridComponent, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }, { token: PivotGridDataService }, { token: i1.LocalizationService }, { token: i0.Renderer2 }, { token: i3.ScrollbarWidthService }], target: i0.ɵɵFactoryTarget.Component });
2998
+ PivotGridComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: PivotGridComponent, selector: "kendo-pivotgrid", inputs: { loaderSettings: "loaderSettings", configurator: "configurator", columnHeadersWidth: "columnHeadersWidth", navigable: "navigable" }, host: { properties: { "class.k-d-flex": "this.hostClass", "class.k-pos-relative": "this.hostClass", "class.k-flex-row": "this.rightPositionClass", "class.k-flex-row-reverse": "this.leftPositionClass", "class.k-flex-column": "this.bottomPositionClass", "class.k-flex-column-reverse": "this.topPositionClass", "attr.dir": "this.dir" } }, providers: [
2999
+ PivotGridDataService,
3000
+ LocalizationService,
3001
+ PivotLocalizationService,
3002
+ {
3003
+ provide: L10N_PREFIX,
3004
+ useValue: 'kendo.pivotgrid'
3005
+ }
3006
+ ], 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 }, { propertyName: "configuratorWrapper", first: true, predicate: ["configurator"], descendants: true, read: ElementRef }], usesOnChanges: true, ngImport: i0, template: `
3007
+ <ng-container kendoPivotGridLocalizedMessages
3008
+ i18n-loading="kendo.pivotgrid.loading|The loading text"
3009
+ loading="Loading"
3010
+
3011
+ i18n-emptyCellLabel="kendo.pivotgrid.emptyCellLabel|The value of the aria-label attribute placed on the focusable empty cell element"
3012
+ emptyCellLabel="PivotGrid Empty Cell"
3013
+
3014
+ i18n-fieldMenuFilterItemLabel="kendo.pivotgrid.fieldMenuFilterItemLabel|The text content of the filter item in the column and row fields menu"
3015
+ fieldMenuFilterItemLabel="Filter"
3016
+
3017
+ i18n-fieldMenuSortAscendingItemLabel="kendo.pivotgrid.fieldMenuSortAscendingItemLabel|The text content of the sort ascending item in the column and row fields menu"
3018
+ fieldMenuSortAscendingItemLabel="Sort ascending"
3019
+
3020
+ i18n-fieldMenuSortDescendingItemLabel="kendo.pivotgrid.fieldMenuSortDescendingItemLabel|The text content of the sort descending item in the column and row fields menu"
3021
+ fieldMenuSortDescendingItemLabel="Sort descending"
3022
+
3023
+ i18n-filterInputLabel="kendo.pivotgrid.filterInputLabel|The label of the filter input"
3024
+ filterInputLabel="{{ '{fields} Filter' }}"
3025
+
3026
+ i18n-filterOperatorsDropDownLabel="kendo.pivotgrid.filterOperatorsDropDownLabel|The label of the filter operators DropDownList"
3027
+ filterOperatorsDropDownLabel="{{ '{fields} Filter Operators' }}"
3028
+
3029
+ i18n-filterEqOperator="kendo.pivotgrid.filterEqOperator|The text of the equal filter operator"
3030
+ filterEqOperator="Is equal to"
3031
+
3032
+ i18n-filterNotEqOperator="kendo.pivotgrid.filterNotEqOperator|The text of the not equal filter operator"
3033
+ filterNotEqOperator="Is not equal to"
3034
+
3035
+ i18n-filterIsNullOperator="kendo.pivotgrid.filterIsNullOperator|The text of the is null filter operator"
3036
+ filterIsNullOperator="Is null"
3037
+
3038
+ i18n-filterIsNotNullOperator="kendo.pivotgrid.filterIsNotNullOperator|The text of the is not null filter operator"
3039
+ filterIsNotNullOperator="Is not null"
3040
+
3041
+ i18n-filterIsEmptyOperator="kendo.pivotgrid.filterIsEmptyOperator|The text of the is empty filter operator"
3042
+ filterIsEmptyOperator="Is empty"
3043
+
3044
+ i18n-filterIsNotEmptyOperator="kendo.pivotgrid.filterIsNotEmptyOperator|The text of the is not empty filter operator"
3045
+ filterIsNotEmptyOperator="Is not empty"
3046
+
3047
+ i18n-filterStartsWithOperator="kendo.pivotgrid.filterStartsWithOperator|The text of the starts with filter operator"
3048
+ filterStartsWithOperator="Starts with"
3049
+
3050
+ i18n-filterContainsOperator="kendo.pivotgrid.filterContainsOperator|The text of the contains filter operator"
3051
+ filterContainsOperator="Contains"
3052
+
3053
+ i18n-filterNotContainsOperator="kendo.pivotgrid.filterNotContainsOperator|The text of the does not contain filter operator"
3054
+ filterNotContainsOperator="Does not contain"
3055
+
3056
+ i18n-filterEndsWithOperator="kendo.pivotgrid.filterEndsWithOperator|The text of the ends with filter operator"
3057
+ filterEndsWithOperator="Ends with"
3058
+
3059
+ i18n-filterFilterButton="kendo.pivotgrid.filterFilterButton|The text of the filter button"
3060
+ filterFilterButton="Filter"
3061
+
3062
+ i18n-filterClearButton="kendo.pivotgrid.filterClearButton|The text of the clear filter button"
3063
+ filterClearButton="Clear"
3064
+
3065
+ i18n-configuratorButtonText="kendo.pivotgrid.configuratorButtonText|The text content of the button that opens and closes the PivotGrid configurator"
3066
+ configuratorButtonText="Change Settings"
3067
+
3068
+ i18n-configuratorHeaderText="kendo.pivotgrid.configuratorHeaderText|The text content of the PivotGrid configurator title element"
3069
+ configuratorHeaderText="Settings"
3070
+
3071
+ i18n-configuratorFieldsText="kendo.pivotgrid.configuratorFieldsText|The text content of the PivotGrid configurator fields section title element"
3072
+ configuratorFieldsText="Fields"
3073
+
3074
+ i18n-configuratorColumnsText="kendo.pivotgrid.configuratorColumnsText|The text content of the PivotGrid configurator columns section title element"
3075
+ configuratorColumnsText="Columns"
3076
+
3077
+ i18n-configuratorRowsText="kendo.pivotgrid.configuratorRowsText|The text content of the PivotGrid configurator rows section title element"
3078
+ configuratorRowsText="Rows"
3079
+
3080
+ i18n-configuratorValuesText="kendo.pivotgrid.configuratorValuesText|The text content of the PivotGrid configurator values section title element"
3081
+ configuratorValuesText="Values"
3082
+
3083
+ i18n-configuratorCancelButtonText="kendo.pivotgrid.configuratorCancelButtonText|The text content of the PivotGrid configurator configurator Cancel button"
3084
+ configuratorCancelButtonText="Cancel"
3085
+
3086
+ i18n-configuratorApplyButtonText="kendo.pivotgrid.configuratorApplyButtonText|The text content of the PivotGrid configurator configurator Apply button"
3087
+ configuratorApplyButtonText="Apply"
3088
+
3089
+ i18n-configuratorEmptyRowsText="kendo.pivotgrid.configuratorEmptyRowsText|The text content of the PivotGrid configurator empty rows container"
3090
+ configuratorEmptyRowsText="Select some fields to begin setup"
3091
+
3092
+ i18n-configuratorEmptyColumnsText="kendo.pivotgrid.configuratorEmptyColumnsText|The text content of the PivotGrid configurator empty columns container"
3093
+ configuratorEmptyColumnsText="Select some fields to begin setup"
3094
+
3095
+ i18n-configuratorEmptyMeasuresText="kendo.pivotgrid.configuratorEmptyMeasuresText|The text content of the PivotGrid configurator empty measures container"
3096
+ configuratorEmptyMeasuresText="Select some fields to begin setup"
3097
+
3098
+ i18n-chipMenuIconTitle="kendo.grid.chipMenuIconTitle|The title of the field menu icon"
3099
+ chipMenuIconTitle="{{ '{fieldName} Field Menu' }}"></ng-container>
3100
+
3101
+ <div #table class="k-pivotgrid" role="grid">
3102
+ <span class="k-pivotgrid-empty-cell">
3103
+ <span class="k-sr-only">{{messageFor('emptyCellLabel')}}</span>
3104
+ </span>
3105
+ <kendo-pivotgrid-table
3106
+ #colHeadersTable
3107
+ [colWidth]="columnHeadersWidth"
3108
+ class="k-pivotgrid-column-headers"
3109
+ tableType="columnHeader"></kendo-pivotgrid-table>
3110
+ <kendo-pivotgrid-table
3111
+ #rowHeadersTable
3112
+ class="k-pivotgrid-row-headers"
3113
+ tableType="rowHeader"></kendo-pivotgrid-table>
3114
+ <kendo-pivotgrid-table
3115
+ #valuesTable
3116
+ [colWidth]="columnHeadersWidth"
3117
+ class="k-pivotgrid-values"
3118
+ tableType="values"></kendo-pivotgrid-table>
3119
+
3120
+ <div *ngIf="loading" [style]="'position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);'">
3121
+ <kendo-loader
3122
+ [type]="loaderSettings?.type"
3123
+ [themeColor]="loaderSettings?.themeColor"
3124
+ [size]="loaderSettings?.size"
3125
+ >
3126
+ </kendo-loader>
3127
+ <span class="k-loading-text">{{ loadingText }}</span>
3128
+ </div>
3129
+ </div>
3130
+ <kendo-pivotgrid-configurator
3131
+ #configurator
3132
+ *ngIf="showConfigurator"
3133
+ [navigation]="configuratorNavigation"
3134
+ [orientation]="configuratorSettings.orientation"
3135
+ (close)="toggleConfigurator()">
3136
+ </kendo-pivotgrid-configurator>
3137
+ <div *ngIf="configurator"
3138
+ #configuratorButton
3139
+ class="k-pivotgrid-configurator-button"
3140
+ aria-hidden="true"
3141
+ (click)="toggleConfigurator()">
3142
+ <span>{{messageFor('configuratorButtonText')}}<span class="k-icon k-i-gear k-color-inherit"></span>
3143
+ </span>
3144
+ </div>
3145
+ `, isInline: true, 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: ["orientation", "sort", "filter", "navigation"], outputs: ["close"] }], directives: [{ type: LocalizedMessagesDirective, selector: "[kendoPivotGridLocalizedMessages]" }, { type: i7.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
3146
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PivotGridComponent, decorators: [{
3147
+ type: Component,
3148
+ args: [{
3149
+ selector: 'kendo-pivotgrid',
3150
+ providers: [
3151
+ PivotGridDataService,
3152
+ LocalizationService,
3153
+ PivotLocalizationService,
3154
+ {
3155
+ provide: L10N_PREFIX,
3156
+ useValue: 'kendo.pivotgrid'
3157
+ }
3158
+ ],
3159
+ template: `
3160
+ <ng-container kendoPivotGridLocalizedMessages
3161
+ i18n-loading="kendo.pivotgrid.loading|The loading text"
3162
+ loading="Loading"
3163
+
3164
+ i18n-emptyCellLabel="kendo.pivotgrid.emptyCellLabel|The value of the aria-label attribute placed on the focusable empty cell element"
3165
+ emptyCellLabel="PivotGrid Empty Cell"
3166
+
3167
+ i18n-fieldMenuFilterItemLabel="kendo.pivotgrid.fieldMenuFilterItemLabel|The text content of the filter item in the column and row fields menu"
3168
+ fieldMenuFilterItemLabel="Filter"
3169
+
3170
+ i18n-fieldMenuSortAscendingItemLabel="kendo.pivotgrid.fieldMenuSortAscendingItemLabel|The text content of the sort ascending item in the column and row fields menu"
3171
+ fieldMenuSortAscendingItemLabel="Sort ascending"
3172
+
3173
+ i18n-fieldMenuSortDescendingItemLabel="kendo.pivotgrid.fieldMenuSortDescendingItemLabel|The text content of the sort descending item in the column and row fields menu"
3174
+ fieldMenuSortDescendingItemLabel="Sort descending"
3175
+
3176
+ i18n-filterInputLabel="kendo.pivotgrid.filterInputLabel|The label of the filter input"
3177
+ filterInputLabel="{{ '{fields} Filter' }}"
3178
+
3179
+ i18n-filterOperatorsDropDownLabel="kendo.pivotgrid.filterOperatorsDropDownLabel|The label of the filter operators DropDownList"
3180
+ filterOperatorsDropDownLabel="{{ '{fields} Filter Operators' }}"
3181
+
3182
+ i18n-filterEqOperator="kendo.pivotgrid.filterEqOperator|The text of the equal filter operator"
3183
+ filterEqOperator="Is equal to"
3184
+
3185
+ i18n-filterNotEqOperator="kendo.pivotgrid.filterNotEqOperator|The text of the not equal filter operator"
3186
+ filterNotEqOperator="Is not equal to"
3187
+
3188
+ i18n-filterIsNullOperator="kendo.pivotgrid.filterIsNullOperator|The text of the is null filter operator"
3189
+ filterIsNullOperator="Is null"
3190
+
3191
+ i18n-filterIsNotNullOperator="kendo.pivotgrid.filterIsNotNullOperator|The text of the is not null filter operator"
3192
+ filterIsNotNullOperator="Is not null"
3193
+
3194
+ i18n-filterIsEmptyOperator="kendo.pivotgrid.filterIsEmptyOperator|The text of the is empty filter operator"
3195
+ filterIsEmptyOperator="Is empty"
3196
+
3197
+ i18n-filterIsNotEmptyOperator="kendo.pivotgrid.filterIsNotEmptyOperator|The text of the is not empty filter operator"
3198
+ filterIsNotEmptyOperator="Is not empty"
3199
+
3200
+ i18n-filterStartsWithOperator="kendo.pivotgrid.filterStartsWithOperator|The text of the starts with filter operator"
3201
+ filterStartsWithOperator="Starts with"
3202
+
3203
+ i18n-filterContainsOperator="kendo.pivotgrid.filterContainsOperator|The text of the contains filter operator"
3204
+ filterContainsOperator="Contains"
3205
+
3206
+ i18n-filterNotContainsOperator="kendo.pivotgrid.filterNotContainsOperator|The text of the does not contain filter operator"
3207
+ filterNotContainsOperator="Does not contain"
3208
+
3209
+ i18n-filterEndsWithOperator="kendo.pivotgrid.filterEndsWithOperator|The text of the ends with filter operator"
3210
+ filterEndsWithOperator="Ends with"
3211
+
3212
+ i18n-filterFilterButton="kendo.pivotgrid.filterFilterButton|The text of the filter button"
3213
+ filterFilterButton="Filter"
3214
+
3215
+ i18n-filterClearButton="kendo.pivotgrid.filterClearButton|The text of the clear filter button"
3216
+ filterClearButton="Clear"
3217
+
3218
+ i18n-configuratorButtonText="kendo.pivotgrid.configuratorButtonText|The text content of the button that opens and closes the PivotGrid configurator"
3219
+ configuratorButtonText="Change Settings"
3220
+
3221
+ i18n-configuratorHeaderText="kendo.pivotgrid.configuratorHeaderText|The text content of the PivotGrid configurator title element"
3222
+ configuratorHeaderText="Settings"
3223
+
3224
+ i18n-configuratorFieldsText="kendo.pivotgrid.configuratorFieldsText|The text content of the PivotGrid configurator fields section title element"
3225
+ configuratorFieldsText="Fields"
3226
+
3227
+ i18n-configuratorColumnsText="kendo.pivotgrid.configuratorColumnsText|The text content of the PivotGrid configurator columns section title element"
3228
+ configuratorColumnsText="Columns"
3229
+
3230
+ i18n-configuratorRowsText="kendo.pivotgrid.configuratorRowsText|The text content of the PivotGrid configurator rows section title element"
3231
+ configuratorRowsText="Rows"
3232
+
3233
+ i18n-configuratorValuesText="kendo.pivotgrid.configuratorValuesText|The text content of the PivotGrid configurator values section title element"
3234
+ configuratorValuesText="Values"
3235
+
3236
+ i18n-configuratorCancelButtonText="kendo.pivotgrid.configuratorCancelButtonText|The text content of the PivotGrid configurator configurator Cancel button"
3237
+ configuratorCancelButtonText="Cancel"
3238
+
3239
+ i18n-configuratorApplyButtonText="kendo.pivotgrid.configuratorApplyButtonText|The text content of the PivotGrid configurator configurator Apply button"
3240
+ configuratorApplyButtonText="Apply"
3241
+
3242
+ i18n-configuratorEmptyRowsText="kendo.pivotgrid.configuratorEmptyRowsText|The text content of the PivotGrid configurator empty rows container"
3243
+ configuratorEmptyRowsText="Select some fields to begin setup"
3244
+
3245
+ i18n-configuratorEmptyColumnsText="kendo.pivotgrid.configuratorEmptyColumnsText|The text content of the PivotGrid configurator empty columns container"
3246
+ configuratorEmptyColumnsText="Select some fields to begin setup"
3247
+
3248
+ i18n-configuratorEmptyMeasuresText="kendo.pivotgrid.configuratorEmptyMeasuresText|The text content of the PivotGrid configurator empty measures container"
3249
+ configuratorEmptyMeasuresText="Select some fields to begin setup"
3250
+
3251
+ i18n-chipMenuIconTitle="kendo.grid.chipMenuIconTitle|The title of the field menu icon"
3252
+ chipMenuIconTitle="{{ '{fieldName} Field Menu' }}"></ng-container>
3253
+
3254
+ <div #table class="k-pivotgrid" role="grid">
3255
+ <span class="k-pivotgrid-empty-cell">
3256
+ <span class="k-sr-only">{{messageFor('emptyCellLabel')}}</span>
3257
+ </span>
3258
+ <kendo-pivotgrid-table
3259
+ #colHeadersTable
3260
+ [colWidth]="columnHeadersWidth"
3261
+ class="k-pivotgrid-column-headers"
3262
+ tableType="columnHeader"></kendo-pivotgrid-table>
3263
+ <kendo-pivotgrid-table
3264
+ #rowHeadersTable
3265
+ class="k-pivotgrid-row-headers"
3266
+ tableType="rowHeader"></kendo-pivotgrid-table>
3267
+ <kendo-pivotgrid-table
3268
+ #valuesTable
3269
+ [colWidth]="columnHeadersWidth"
3270
+ class="k-pivotgrid-values"
3271
+ tableType="values"></kendo-pivotgrid-table>
3272
+
3273
+ <div *ngIf="loading" [style]="'position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);'">
3274
+ <kendo-loader
3275
+ [type]="loaderSettings?.type"
3276
+ [themeColor]="loaderSettings?.themeColor"
3277
+ [size]="loaderSettings?.size"
3278
+ >
3279
+ </kendo-loader>
3280
+ <span class="k-loading-text">{{ loadingText }}</span>
3281
+ </div>
3282
+ </div>
3283
+ <kendo-pivotgrid-configurator
3284
+ #configurator
3285
+ *ngIf="showConfigurator"
3286
+ [navigation]="configuratorNavigation"
3287
+ [orientation]="configuratorSettings.orientation"
3288
+ (close)="toggleConfigurator()">
3289
+ </kendo-pivotgrid-configurator>
3290
+ <div *ngIf="configurator"
3291
+ #configuratorButton
3292
+ class="k-pivotgrid-configurator-button"
3293
+ aria-hidden="true"
3294
+ (click)="toggleConfigurator()">
3295
+ <span>{{messageFor('configuratorButtonText')}}<span class="k-icon k-i-gear k-color-inherit"></span>
3296
+ </span>
3297
+ </div>
3298
+ `
3299
+ }]
3300
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.NgZone }, { type: PivotGridDataService }, { type: i1.LocalizationService }, { type: i0.Renderer2 }, { type: i3.ScrollbarWidthService }]; }, propDecorators: { hostClass: [{
3301
+ type: HostBinding,
3302
+ args: ['class.k-d-flex']
3303
+ }, {
3304
+ type: HostBinding,
3305
+ args: ['class.k-pos-relative']
3306
+ }], rightPositionClass: [{
3307
+ type: HostBinding,
3308
+ args: ['class.k-flex-row']
3309
+ }], leftPositionClass: [{
3310
+ type: HostBinding,
3311
+ args: ['class.k-flex-row-reverse']
3312
+ }], bottomPositionClass: [{
3313
+ type: HostBinding,
3314
+ args: ['class.k-flex-column']
3315
+ }], topPositionClass: [{
3316
+ type: HostBinding,
3317
+ args: ['class.k-flex-column-reverse']
3318
+ }], dir: [{
3319
+ type: HostBinding,
3320
+ args: ['attr.dir']
3321
+ }], colHeadersTable: [{
3322
+ type: ViewChild,
3323
+ args: ['colHeadersTable', { read: ElementRef }]
3324
+ }], rowHeadersTable: [{
3325
+ type: ViewChild,
3326
+ args: ['rowHeadersTable', { read: ElementRef }]
3327
+ }], valuesTable: [{
3328
+ type: ViewChild,
3329
+ args: ['valuesTable', { read: ElementRef }]
3330
+ }], table: [{
3331
+ type: ViewChild,
3332
+ args: ['table', { read: ElementRef }]
3333
+ }], configuratorWrapper: [{
3334
+ type: ViewChild,
3335
+ args: ['configurator', { read: ElementRef }]
3336
+ }], loaderSettings: [{
3337
+ type: Input
3338
+ }], configurator: [{
3339
+ type: Input
3340
+ }], columnHeadersWidth: [{
3341
+ type: Input
3342
+ }], navigable: [{
3343
+ type: Input
3344
+ }] } });
3345
+
3346
+ /**
3347
+ * The event data for the ExpandChangeEvent
3348
+ */
3349
+ class ExpandChangeEvent extends PreventableEvent {
3350
+ /**
3351
+ * @hidden
3352
+ */
3353
+ constructor(args) {
3354
+ super();
3355
+ Object.assign(this, args);
3356
+ }
3357
+ }
3358
+ ;
3359
+
3360
+ /**
3361
+ * The event data for the ConfigurationChangeEvent
3362
+ */
3363
+ class ConfigurationChangeEvent extends PreventableEvent {
3364
+ /**
3365
+ * @hidden
3366
+ */
3367
+ constructor(args) {
3368
+ super();
3369
+ Object.assign(this, args);
3370
+ }
3371
+ }
3372
+ ;
3373
+
3374
+ /**
3375
+ * @hidden
3376
+ * A directive which binds the PivotGrid to an array of objects.
3377
+ */
3378
+ class PivotBaseBindingDirective {
3379
+ constructor(dataService, zone) {
3380
+ this.dataService = dataService;
3381
+ this.zone = zone;
3382
+ /**
3383
+ * Represents the column axes configuration of the PivotGrid.
3384
+ */
3385
+ this.columnAxes = [];
3386
+ /**
3387
+ * Represents the row axes configuration of the PivotGrid.
3388
+ */
3389
+ this.rowAxes = [];
3390
+ /**
3391
+ * Represents the measure axes configuration of the PivotGrid.
3392
+ */
3393
+ this.measureAxes = [];
3394
+ /**
3395
+ * Represents the initial sorted state of the PivotGrid.
3396
+ */
3397
+ this.sort = [];
3398
+ /**
3399
+ * Fires each time a row or column header gets expanded or collapsed by the end user. The event is preventable.
3400
+ * If you prevent the event, the PivotGrid will not be rerendered with the new state, resulting from the end user interaction.
3401
+ */
3402
+ this.expandChange = new EventEmitter();
3403
+ /**
3404
+ * Fires when the Configurator Apply button is pressed. The event is preventable.
3405
+ * 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.
3406
+ */
3407
+ this.configurationChange = new EventEmitter();
3408
+ /**
3409
+ * Fires each time when new data is loaded and transformed to show aggregated values.
3410
+ * The event fires upon initialization and on user interaction that changes the state of the PivotGrid.
3411
+ */
3412
+ this.dataLoaded = new EventEmitter();
3413
+ this.subs = new Subscription();
3414
+ }
3415
+ ngOnInit() {
3416
+ this.dataService.state = new PivotGridState(this.columnAxes, this.rowAxes, this.measureAxes, this.sort, this.filter);
3417
+ this.loadData(this.dataService.state);
3418
+ this.loadFields();
3419
+ this.subs.add(this.dataService.expandedStateChange.subscribe((state) => {
3420
+ this.zone.run(() => {
3421
+ const isCol = state.tableType === 'columnHeader';
3422
+ const axes = isCol ? 'columnAxes' : 'rowAxes';
3423
+ // Converts current rows state to a tree-like structure (using the PivotGrid Common pkg)
3424
+ const tree = toTree((isCol ? this.dataService.columns : this.dataService.rows || []).slice());
3425
+ this.updateHeaders(axes, tree, state.cell.path);
3426
+ });
3427
+ }));
3428
+ this.subs.add(this.dataService.configuratorFieldChange.subscribe((state) => {
3429
+ this.zone.run(() => {
3430
+ if (hasObservers(this.configurationChange)) {
3431
+ const event = new ConfigurationChangeEvent(state);
3432
+ this.configurationChange.emit(event);
3433
+ if (event.isDefaultPrevented()) {
3434
+ return;
3435
+ }
3436
+ }
3437
+ this.dataService.configuredFields.next(this.dataService.state);
3438
+ this.loadData(state);
3439
+ this.dataService.state = state;
3440
+ });
3441
+ }));
3442
+ this.subs.add(this.dataService.valuesRows.subscribe((data) => {
3443
+ this.zone.run(() => {
3444
+ this.dataService.aggregateData = data;
3445
+ this.dataLoaded.emit(data);
3446
+ });
3447
+ }));
3448
+ this.dataService.directive = this;
3449
+ }
3450
+ ngOnDestroy() {
3451
+ this.subs.unsubscribe();
3452
+ }
3453
+ updateDataServiceFields() {
3454
+ this.dataService.normalizedData = this.dataState.data;
3455
+ this.dataService.rows = this.dataState.rows;
3456
+ this.dataService.columns = this.dataState.columns;
3457
+ this.dataService.updateRowsAndCols();
3458
+ }
3459
+ updateConfiguratorFields() {
3460
+ this.dataService.fields.next(this.configuratorFields);
3461
+ this.dataService.configuredFields.next(this.dataService.state);
3462
+ }
3463
+ updateHeaders(axes, tree, path) {
3464
+ // Action to determine expand/collapse state
3465
+ const action = {
3466
+ type: HEADERS_ACTION.toggle,
3467
+ payload: path
3468
+ };
3469
+ // The `headersReducer` method is responsible for udpating
3470
+ // the expanded state based on the toggle action (expand/collapse)
3471
+ // Update axes and reload data
3472
+ const newHeaders = headersReducer(this[axes].slice(), { ...action, tree });
3473
+ const newState = { ...this.dataService.state, ...{ [axes]: newHeaders } };
3474
+ this.dataService.state = newState;
3475
+ if (hasObservers(this.expandChange)) {
3476
+ const event = new ExpandChangeEvent(newState);
3477
+ this.expandChange.emit(event);
3478
+ if (event.isDefaultPrevented()) {
3479
+ return;
3480
+ }
3481
+ }
3482
+ this.dataService.configuredFields.next(this.dataService.state);
3483
+ this[axes] = newHeaders;
3484
+ this.loadData(this.dataService.state);
3485
+ }
3486
+ ;
3487
+ }
3488
+ PivotBaseBindingDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PivotBaseBindingDirective, deps: [{ token: PivotGridDataService }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Directive });
3489
+ PivotBaseBindingDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: PivotBaseBindingDirective, selector: "kendo-base-binding-directive", inputs: { columnAxes: "columnAxes", rowAxes: "rowAxes", measureAxes: "measureAxes", sort: "sort", filter: "filter" }, outputs: { expandChange: "expandChange", configurationChange: "configurationChange", dataLoaded: "dataLoaded" }, ngImport: i0 });
3490
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PivotBaseBindingDirective, decorators: [{
3491
+ type: Directive,
3492
+ args: [{
3493
+ selector: 'kendo-base-binding-directive'
3494
+ }]
3495
+ }], ctorParameters: function () { return [{ type: PivotGridDataService }, { type: i0.NgZone }]; }, propDecorators: { columnAxes: [{
3496
+ type: Input
3497
+ }], rowAxes: [{
3498
+ type: Input
3499
+ }], measureAxes: [{
3500
+ type: Input
3501
+ }], sort: [{
3502
+ type: Input
3503
+ }], filter: [{
3504
+ type: Input
3505
+ }], expandChange: [{
3506
+ type: Output
3507
+ }], configurationChange: [{
3508
+ type: Output
3509
+ }], dataLoaded: [{
3510
+ type: Output
3511
+ }] } });
3512
+
3513
+ const dataField = 'aggregate';
3514
+ const columnsData = 'columns';
3515
+ const bindingFields = { dataField, columnsData };
3516
+ const stringSeparator = '&';
3517
+ /**
3518
+ * A directive which binds the PivotGrid to local data ([see example]({% slug directives_databinding_local_pivotgrid %})).
3519
+ */
3520
+ class PivotLocalBindingDirective extends PivotBaseBindingDirective {
3521
+ constructor(dataService, zone) {
3522
+ super(dataService, zone);
3523
+ this.type = 'local';
3524
+ this.createAxisSettings = (key) => ({ key, ...this.dimensions[key] });
3525
+ }
3526
+ ngOnChanges(changes) {
3527
+ if (anyChanged(['data', 'dimensions', 'columnAxes', 'rowAxes', 'measureAxes', 'measures'], changes)) {
3528
+ this.loadData(this.dataService.state);
3529
+ }
3530
+ }
3531
+ /**
3532
+ * @hidden
3533
+ */
3534
+ fetchChildren(node) {
3535
+ return node.children;
3536
+ }
3537
+ loadFields() {
3538
+ this.configuratorFields = createFlatSchemaDimensions(this.dimensions, this.measures);
3539
+ this.updateConfiguratorFields();
3540
+ }
3541
+ loadData(state) {
3542
+ const { columnAxes, rowAxes, measureAxes, sort, filter } = state;
3543
+ const rootColumnAxes = this.getRootAxes(columnAxes);
3544
+ const rootRowAxes = this.getRootAxes(rowAxes);
3545
+ const columnSettings = rootColumnAxes.split(stringSeparator).map(this.createAxisSettings);
3546
+ const rowSettings = rootRowAxes.split(stringSeparator).map(this.createAxisSettings);
3547
+ const measuresSettings = measureAxes.map(m => this.measures.find(meas => String(meas.name) === String(m.name))).filter(Boolean);
3548
+ const dataTree = createDataTree(this.data, rowSettings, columnSettings, measuresSettings, bindingFields, filter);
3549
+ this.dataState = createLocalDataState({
3550
+ dataTree,
3551
+ rowSettings,
3552
+ columnSettings,
3553
+ rowAxes: rowAxes,
3554
+ columnAxes: columnAxes,
3555
+ measures: measuresSettings,
3556
+ sort: sort,
3557
+ fields: bindingFields
3558
+ });
3559
+ this.updateDataServiceFields();
3560
+ }
3561
+ getRootAxes(axes) {
3562
+ return Array.from(rootFields(axes).keys()).join(stringSeparator);
3563
+ }
3564
+ }
3565
+ PivotLocalBindingDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PivotLocalBindingDirective, deps: [{ token: PivotGridDataService }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Directive });
3566
+ PivotLocalBindingDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: PivotLocalBindingDirective, selector: "[kendoPivotLocalBinding]", inputs: { data: ["kendoPivotLocalBinding", "data"], dimensions: "dimensions", measures: "measures" }, exportAs: ["kendoPivotLocalBinding"], usesInheritance: true, usesOnChanges: true, ngImport: i0 });
3567
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PivotLocalBindingDirective, decorators: [{
3568
+ type: Directive,
3569
+ args: [{
3570
+ selector: '[kendoPivotLocalBinding]',
3571
+ exportAs: 'kendoPivotLocalBinding'
3572
+ }]
3573
+ }], ctorParameters: function () { return [{ type: PivotGridDataService }, { type: i0.NgZone }]; }, propDecorators: { data: [{
3574
+ type: Input,
3575
+ args: ['kendoPivotLocalBinding']
3576
+ }], dimensions: [{
3577
+ type: Input
3578
+ }], measures: [{
3579
+ type: Input
3580
+ }] } });
3581
+
3582
+ /**
3583
+ * A directive which binds the PivotGrid to data using an Online Analytical Processing (OLAP) service ([see example]({% slug directives_databinding_remote_pivotgrid %})).
3584
+ */
3585
+ class PivotOLAPBindingDirective extends PivotBaseBindingDirective {
3586
+ constructor(dataService, zone) {
3587
+ super(dataService, zone);
3588
+ this.type = 'olap';
3589
+ }
3590
+ ngOnChanges(changes) {
3591
+ if (anyChanged(['url', 'cube', 'catalog', 'columnAxes', 'rowAxes', 'measureAxes'], changes)) {
3592
+ this.loadData(this.dataService.state);
3593
+ this.loadFields();
3594
+ }
3595
+ }
3596
+ loadData(state) {
3597
+ const { columnAxes, rowAxes, measureAxes, sort, filter } = state;
3598
+ this.dataService.loading.next(true);
3599
+ const options = {
3600
+ connection: {
3601
+ catalog: this.catalog,
3602
+ cube: this.cube
3603
+ },
3604
+ columnAxes,
3605
+ rowAxes,
3606
+ measureAxes,
3607
+ sort,
3608
+ filter
3609
+ };
3610
+ fetchData({ url: this.url }, clone(options))
3611
+ .then(createDataState)
3612
+ .then(newDataState => {
3613
+ this.dataState = newDataState;
3614
+ this.updateDataServiceFields();
3615
+ this.dataService.loading.next(false);
3616
+ });
3617
+ }
3618
+ loadFields() {
3619
+ const options = {
3620
+ connection: {
3621
+ catalog: this.catalog,
3622
+ cube: this.cube
3623
+ },
3624
+ restrictions: {
3625
+ catalogName: this.catalog,
3626
+ cubeName: this.cube
3627
+ },
3628
+ command: 'schemaDimensions'
3629
+ };
3630
+ fetchDiscover({ url: this.url }, options)
3631
+ .then((newFields) => {
3632
+ addKPI(newFields);
3633
+ this.configuratorFields = newFields;
3634
+ this.updateConfiguratorFields();
3635
+ });
3636
+ }
3637
+ async updateFields(event, fields) {
3638
+ const newFields = fields.slice();
3639
+ const field = this.getField(newFields, event);
3640
+ if (field && field.uniqueName === '[KPIs]') {
3641
+ const KPIs = this.normalizeKPIs(await this.loadKPIs());
3642
+ field.children = KPIs;
3643
+ }
3644
+ else if (field && field.type === 'kpi') {
3645
+ field.children = buildKPIMeasures(field);
3646
+ }
3647
+ else if (field && !field.children) {
3648
+ const additionalFields = await this.loadAvailableFields(field);
3649
+ field.children = additionalFields;
3650
+ }
3651
+ return field?.children;
3652
+ }
3653
+ /**
3654
+ * @hidden
3655
+ */
3656
+ fetchChildren(event, fields) {
3657
+ return this.updateFields(event, fields);
3658
+ }
3659
+ normalizeKPIs(data) {
3660
+ for (let idx = 0, length = data.length; idx < length; idx++) {
3661
+ data[idx].uniqueName = data[idx].name;
3662
+ data[idx].type = 'kpi';
3663
+ }
3664
+ return data;
3665
+ }
3666
+ ;
3667
+ getField(nodes = [], target) {
3668
+ for (let i = 0; i < nodes.length; i++) {
3669
+ const node = nodes[i];
3670
+ if (node.uniqueName === target.uniqueName) {
3671
+ return node;
3672
+ }
3673
+ const result = this.getField(node.children, target);
3674
+ if (result !== null) {
3675
+ return result;
3676
+ }
3677
+ }
3678
+ return null;
3679
+ }
3680
+ ;
3681
+ async loadKPIs() {
3682
+ const options = {
3683
+ connection: {
3684
+ catalog: this.catalog,
3685
+ cube: this.cube
3686
+ },
3687
+ restrictions: {
3688
+ catalogName: this.catalog,
3689
+ cubeName: this.cube
3690
+ },
3691
+ command: 'schemaKPIs'
3692
+ };
3693
+ return fetchDiscover({ url: this.url }, options);
3694
+ }
3695
+ ;
3696
+ async loadAvailableFields(field) {
3697
+ let command;
3698
+ let dimensionUniqueName;
3699
+ let hierarchyUniqueName;
3700
+ let levelUniqueName;
3701
+ let memberUniqueName;
3702
+ let treeOp;
3703
+ if (field.type === 2) {
3704
+ command = 'schemaMeasures';
3705
+ }
3706
+ else if (field.dimensionUniqueName) {
3707
+ command = 'schemaLevels';
3708
+ hierarchyUniqueName = field.uniqueName;
3709
+ }
3710
+ else {
3711
+ command = 'schemaHierarchies';
3712
+ dimensionUniqueName = field.uniqueName;
3713
+ }
3714
+ const options = {
3715
+ connection: {
3716
+ catalog: this.catalog,
3717
+ cube: this.cube
3718
+ },
3719
+ restrictions: {
3720
+ catalogName: this.catalog,
3721
+ cubeName: this.cube,
3722
+ hierarchyUniqueName,
3723
+ dimensionUniqueName,
3724
+ levelUniqueName,
3725
+ memberUniqueName,
3726
+ treeOp
3727
+ },
3728
+ command
3729
+ };
3730
+ return fetchDiscover({ url: this.url }, options);
3731
+ }
3732
+ ;
3733
+ }
3734
+ PivotOLAPBindingDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PivotOLAPBindingDirective, deps: [{ token: PivotGridDataService }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Directive });
3735
+ PivotOLAPBindingDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: PivotOLAPBindingDirective, selector: "[kendoPivotOLAPBinding]", inputs: { url: "url", cube: "cube", catalog: "catalog" }, exportAs: ["kendoPivotOLAPBinding"], usesInheritance: true, usesOnChanges: true, ngImport: i0 });
3736
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PivotOLAPBindingDirective, decorators: [{
3737
+ type: Directive,
3738
+ args: [{
3739
+ selector: '[kendoPivotOLAPBinding]',
3740
+ exportAs: 'kendoPivotOLAPBinding'
3741
+ }]
3742
+ }], ctorParameters: function () { return [{ type: PivotGridDataService }, { type: i0.NgZone }]; }, propDecorators: { url: [{
3743
+ type: Input
3744
+ }], cube: [{
3745
+ type: Input
3746
+ }], catalog: [{
3747
+ type: Input
3748
+ }] } });
3749
+
3750
+ /**
3751
+ * Custom component messages override default component messages
3752
+ * ([see example]({% slug globalization_pivotgrid %}#toc-custom-messages)).
3753
+ */
3754
+ class CustomMessagesComponent extends PivotGridMessages {
3755
+ constructor(service) {
3756
+ super();
3757
+ this.service = service;
3758
+ }
3759
+ get override() {
3760
+ return true;
3761
+ }
3762
+ }
3763
+ CustomMessagesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CustomMessagesComponent, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
3764
+ CustomMessagesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: CustomMessagesComponent, selector: "kendo-pivotgrid-messages", providers: [
3765
+ {
3766
+ provide: PivotGridMessages,
3767
+ useExisting: forwardRef(() => CustomMessagesComponent)
3768
+ }
3769
+ ], usesInheritance: true, ngImport: i0, template: ``, isInline: true });
3770
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CustomMessagesComponent, decorators: [{
3771
+ type: Component,
3772
+ args: [{
3773
+ providers: [
3774
+ {
3775
+ provide: PivotGridMessages,
3776
+ useExisting: forwardRef(() => CustomMessagesComponent)
3777
+ }
3778
+ ],
3779
+ selector: 'kendo-pivotgrid-messages',
3780
+ template: ``
3781
+ }]
3782
+ }], ctorParameters: function () { return [{ type: i1.LocalizationService }]; } });
3783
+
3784
+ const MODULES = [
3785
+ CommonModule,
3786
+ DropDownsModule,
3787
+ InputsModule,
3788
+ ButtonsModule
3789
+ ];
3790
+ /**
3791
+ * @hidden
3792
+ */
3793
+ class SharedModule {
3794
+ }
3795
+ SharedModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: SharedModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
3796
+ SharedModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: SharedModule, imports: [CommonModule,
3797
+ DropDownsModule,
3798
+ InputsModule,
3799
+ ButtonsModule], exports: [CommonModule,
3800
+ DropDownsModule,
3801
+ InputsModule,
3802
+ ButtonsModule] });
3803
+ SharedModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: SharedModule, imports: [[MODULES], CommonModule,
3804
+ DropDownsModule,
3805
+ InputsModule,
3806
+ ButtonsModule] });
3807
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: SharedModule, decorators: [{
3808
+ type: NgModule,
3809
+ args: [{
3810
+ imports: [MODULES],
3811
+ exports: [MODULES]
3812
+ }]
3813
+ }] });
3814
+
3815
+ const COMPONENTS = [
3816
+ ChipMenuItemComponent,
3817
+ ChipMenuSortComponent,
3818
+ ChipMenuComponent,
3819
+ ChipMenuFilterComponent,
3820
+ ChipMenuItemContentTemplateDirective,
3821
+ FilterMenuContainerComponent,
3822
+ StringFilterMenuComponent,
3823
+ FilterMenuDropDownListDirective,
3824
+ ChipMenuContainerComponent,
3825
+ ChipMenuItemDirective
3826
+ ];
3827
+ /**
3828
+ * @hidden
3829
+ */
3830
+ class ChipMenuModule {
3831
+ static exports() {
3832
+ return [
3833
+ ChipMenuItemComponent,
3834
+ ChipMenuSortComponent,
3835
+ ChipMenuContainerComponent,
3836
+ ChipMenuItemDirective,
3837
+ ChipMenuComponent
3838
+ ];
3839
+ }
3840
+ }
3841
+ ChipMenuModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ChipMenuModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
3842
+ ChipMenuModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ChipMenuModule, declarations: [ChipMenuItemComponent,
3843
+ ChipMenuSortComponent,
3844
+ ChipMenuComponent,
3845
+ ChipMenuFilterComponent,
3846
+ ChipMenuItemContentTemplateDirective,
3847
+ FilterMenuContainerComponent,
3848
+ StringFilterMenuComponent,
3849
+ FilterMenuDropDownListDirective,
3850
+ ChipMenuContainerComponent,
3851
+ ChipMenuItemDirective], imports: [SharedModule,
3852
+ ReactiveFormsModule,
3853
+ FormsModule], exports: [ChipMenuItemComponent,
3854
+ ChipMenuSortComponent,
3855
+ ChipMenuComponent,
3856
+ ChipMenuFilterComponent,
3857
+ ChipMenuItemContentTemplateDirective,
3858
+ FilterMenuContainerComponent,
3859
+ StringFilterMenuComponent,
3860
+ FilterMenuDropDownListDirective,
3861
+ ChipMenuContainerComponent,
3862
+ ChipMenuItemDirective] });
3863
+ ChipMenuModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ChipMenuModule, imports: [[
3864
+ SharedModule,
3865
+ ReactiveFormsModule,
3866
+ FormsModule
3867
+ ]] });
3868
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ChipMenuModule, decorators: [{
3869
+ type: NgModule,
3870
+ args: [{
3871
+ declarations: [COMPONENTS],
3872
+ imports: [
3873
+ SharedModule,
3874
+ ReactiveFormsModule,
3875
+ FormsModule
3876
+ ],
3877
+ exports: [COMPONENTS]
3878
+ }]
3879
+ }] });
3880
+
3881
+ const IMPORTED_MODULES = [
3882
+ EventsModule,
3883
+ IndicatorsModule,
3884
+ TreeViewModule,
3885
+ DraggableModule,
3886
+ ChipMenuModule,
3887
+ SharedModule
3888
+ ];
3889
+ const DECLARATIONS = [
3890
+ PivotGridComponent,
3891
+ PivotGridTableComponent,
3892
+ PivotGridConfiguratorComponent,
3893
+ PivotGridCellDirective,
3894
+ PivotLocalBindingDirective,
3895
+ PivotOLAPBindingDirective,
3896
+ DraggableChipDirective,
3897
+ DropTargetDirective,
3898
+ LocalizedMessagesDirective,
3899
+ CustomMessagesComponent,
3900
+ ChipKeyboardNavigationDirective
3901
+ ];
3902
+ const EXPORTS = [
3903
+ PivotGridComponent,
3904
+ PivotGridTableComponent,
3905
+ PivotGridCellDirective,
3906
+ PivotLocalBindingDirective,
3907
+ PivotOLAPBindingDirective,
3908
+ CustomMessagesComponent
3909
+ ];
3910
+ /**
3911
+ * Sample module
3912
+ */
3913
+ class PivotGridModule {
3914
+ }
3915
+ PivotGridModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PivotGridModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
3916
+ PivotGridModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PivotGridModule, declarations: [PivotGridComponent,
3917
+ PivotGridTableComponent,
3918
+ PivotGridConfiguratorComponent,
3919
+ PivotGridCellDirective,
3920
+ PivotLocalBindingDirective,
3921
+ PivotOLAPBindingDirective,
3922
+ DraggableChipDirective,
3923
+ DropTargetDirective,
3924
+ LocalizedMessagesDirective,
3925
+ CustomMessagesComponent,
3926
+ ChipKeyboardNavigationDirective], imports: [EventsModule,
3927
+ IndicatorsModule,
3928
+ TreeViewModule,
3929
+ DraggableModule,
3930
+ ChipMenuModule,
3931
+ SharedModule], exports: [PivotGridComponent,
3932
+ PivotGridTableComponent,
3933
+ PivotGridCellDirective,
3934
+ PivotLocalBindingDirective,
3935
+ PivotOLAPBindingDirective,
3936
+ CustomMessagesComponent] });
3937
+ PivotGridModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PivotGridModule, imports: [[...IMPORTED_MODULES]] });
3938
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PivotGridModule, decorators: [{
3939
+ type: NgModule,
3940
+ args: [{
3941
+ imports: [...IMPORTED_MODULES],
3942
+ declarations: [...DECLARATIONS],
3943
+ exports: [...EXPORTS]
3944
+ }]
3945
+ }] });
3946
+
3947
+ /**
3948
+ * Generated bundle index. Do not edit.
3949
+ */
3950
+
3951
+ export { ConfigurationChangeEvent, CustomMessagesComponent, DraggableChipDirective, DropTargetDirective, ExpandChangeEvent, PivotGridCellDirective, PivotGridComponent, PivotGridConfiguratorComponent, PivotGridModule, PivotGridTableComponent, PivotLocalBindingDirective, PivotOLAPBindingDirective };
3952
+