@progress/kendo-angular-pivotgrid 1.1.2 → 11.0.0-develop.100
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +1 -1
- package/NOTICE.txt +4 -4
- package/README.md +1 -1
- package/configurator/chip-kb-nav.directive.d.ts +1 -1
- package/configurator/chip-menu/chip-menu-container.component.d.ts +1 -1
- package/configurator/chip-menu/chip-menu-filter.component.d.ts +1 -1
- package/configurator/chip-menu/chip-menu-item-base.d.ts +1 -1
- package/configurator/chip-menu/chip-menu-item-content-template.directive.d.ts +1 -1
- package/configurator/chip-menu/chip-menu-item.component.d.ts +1 -1
- package/configurator/chip-menu/chip-menu-item.directive.d.ts +1 -1
- package/configurator/chip-menu/chip-menu-sort.component.d.ts +1 -1
- package/configurator/chip-menu/chip-menu.component.d.ts +1 -1
- package/configurator/chip-menu/chip-menu.module.d.ts +1 -1
- package/configurator/chip-menu/chip-menu.service.d.ts +1 -1
- package/configurator/chip-menu/filtering/filter-menu-container.component.d.ts +4 -5
- package/configurator/chip-menu/filtering/filter-menu-dropdownlist.directive.d.ts +1 -1
- package/configurator/chip-menu/filtering/menu-tabbing.service.d.ts +1 -1
- package/configurator/chip-menu/filtering/string-filter-menu.component.d.ts +1 -1
- package/configurator/chip-menu/single-popup.service.d.ts +1 -1
- package/configurator/configurator.component.d.ts +1 -1
- package/configurator/configurator.service.d.ts +1 -1
- package/configurator/draggable.directive.d.ts +1 -1
- package/configurator/drop-cue.service.d.ts +1 -1
- package/configurator/drop-target.directive.d.ts +1 -1
- package/data-binding/base-binding-directive.d.ts +1 -1
- package/data-binding/local-binding.directive.d.ts +1 -1
- package/data-binding/olap-binding.directive.d.ts +1 -1
- package/data-binding/pivotgrid-data.service.d.ts +1 -1
- package/{esm2015/configurator/chip-kb-nav.directive.js → esm2020/configurator/chip-kb-nav.directive.mjs} +6 -5
- package/{esm2015/configurator/chip-menu/chip-menu-container.component.js → esm2020/configurator/chip-menu/chip-menu-container.component.mjs} +6 -5
- package/{esm2015/configurator/chip-menu/chip-menu-filter.component.js → esm2020/configurator/chip-menu/chip-menu-filter.component.mjs} +6 -5
- package/{esm2015/configurator/chip-menu/chip-menu-item-base.js → esm2020/configurator/chip-menu/chip-menu-item-base.mjs} +5 -4
- 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
- package/{esm2015/configurator/chip-menu/chip-menu-item.component.js → esm2020/configurator/chip-menu/chip-menu-item.component.mjs} +6 -6
- package/{esm2015/configurator/chip-menu/chip-menu-item.directive.js → esm2020/configurator/chip-menu/chip-menu-item.directive.mjs} +5 -5
- package/{esm2015/configurator/chip-menu/chip-menu-sort.component.js → esm2020/configurator/chip-menu/chip-menu-sort.component.mjs} +7 -5
- package/{esm2015/configurator/chip-menu/chip-menu.component.js → esm2020/configurator/chip-menu/chip-menu.component.mjs} +7 -5
- package/{esm2015/configurator/chip-menu/chip-menu.module.js → esm2020/configurator/chip-menu/chip-menu.module.mjs} +5 -5
- package/{esm2015/configurator/chip-menu/chip-menu.service.js → esm2020/configurator/chip-menu/chip-menu.service.mjs} +5 -4
- package/{esm2015/configurator/chip-menu/filtering/filter-menu-container.component.js → esm2020/configurator/chip-menu/filtering/filter-menu-container.component.mjs} +18 -21
- package/{esm2015/configurator/chip-menu/filtering/filter-menu-dropdownlist.directive.js → esm2020/configurator/chip-menu/filtering/filter-menu-dropdownlist.directive.mjs} +5 -4
- package/{esm2015/configurator/chip-menu/filtering/menu-tabbing.service.js → esm2020/configurator/chip-menu/filtering/menu-tabbing.service.mjs} +4 -4
- package/{esm2015/configurator/chip-menu/filtering/string-filter-menu.component.js → esm2020/configurator/chip-menu/filtering/string-filter-menu.component.mjs} +11 -8
- package/{esm2015/configurator/chip-menu/single-popup.service.js → esm2020/configurator/chip-menu/single-popup.service.mjs} +8 -7
- package/{esm2015/configurator/configurator.component.js → esm2020/configurator/configurator.component.mjs} +42 -56
- package/{esm2015/configurator/configurator.service.js → esm2020/configurator/configurator.service.mjs} +6 -5
- package/{esm2015/configurator/draggable.directive.js → esm2020/configurator/draggable.directive.mjs} +9 -8
- package/{esm2015/configurator/drop-cue.service.js → esm2020/configurator/drop-cue.service.mjs} +4 -4
- package/{esm2015/configurator/drop-target.directive.js → esm2020/configurator/drop-target.directive.mjs} +11 -10
- package/{esm2015/data-binding/base-binding-directive.js → esm2020/data-binding/base-binding-directive.mjs} +8 -7
- package/{esm2015/data-binding/local-binding.directive.js → esm2020/data-binding/local-binding.directive.mjs} +7 -6
- package/{esm2015/data-binding/olap-binding.directive.js → esm2020/data-binding/olap-binding.directive.mjs} +70 -76
- package/{esm2015/data-binding/pivotgrid-data.service.js → esm2020/data-binding/pivotgrid-data.service.mjs} +5 -5
- package/{esm2015/main.js → esm2020/index.mjs} +1 -1
- package/{esm2015/localization/custom-messages.component.js → esm2020/localization/custom-messages.component.mjs} +5 -4
- package/{esm2015/localization/localized-messages.directive.js → esm2020/localization/localized-messages.directive.mjs} +5 -4
- package/{esm2015/localization/messages.js → esm2020/localization/messages.mjs} +4 -4
- package/{esm2015/localization/pivot-localization.service.js → esm2020/localization/pivot-localization.service.mjs} +5 -4
- package/{esm2015/models/configuration-change-event.js → esm2020/models/configuration-change-event.mjs} +1 -1
- package/{esm2015/models/drop-section.js → esm2020/models/configurator-orientation.mjs} +1 -1
- package/{esm2015/models/drop-target.js → esm2020/models/configurator-position.mjs} +1 -1
- package/{esm2015/models/configurator-settings.js → esm2020/models/configurator-settings.mjs} +1 -1
- package/{esm2015/models/data-row-item.js → esm2020/models/data-row-item.mjs} +1 -1
- package/{esm2015/models/configurator-orientation.js → esm2020/models/drop-section.mjs} +1 -1
- package/{esm2015/models/configurator-position.js → esm2020/models/drop-target.mjs} +1 -1
- package/{esm2015/models/expanded-change-event.js → esm2020/models/expanded-change-event.mjs} +1 -1
- package/esm2020/models/expanded-state-action.mjs +5 -0
- package/esm2020/models/loader-settings.mjs +5 -0
- package/{esm2015/package-metadata.js → esm2020/package-metadata.mjs} +2 -2
- package/{esm2015/pivotgrid.component.js → esm2020/pivotgrid.component.mjs} +16 -34
- package/{esm2015/pivotgrid.module.js → esm2020/pivotgrid.module.mjs} +5 -5
- package/{esm2015/kendo-angular-pivotgrid.js → esm2020/progress-kendo-angular-pivotgrid.mjs} +2 -2
- package/{esm2015/rendering/pivotgrid-cell.directive.js → esm2020/rendering/pivotgrid-cell.directive.mjs} +11 -12
- package/{esm2015/rendering/pivotgrid-table.component.js → esm2020/rendering/pivotgrid-table.component.mjs} +11 -10
- package/{esm2015/shared.module.js → esm2020/shared.module.mjs} +5 -5
- package/{esm2015/util.js → esm2020/util.mjs} +3 -3
- package/fesm2015/{kendo-angular-pivotgrid.js → progress-kendo-angular-pivotgrid.mjs} +169 -199
- package/fesm2020/progress-kendo-angular-pivotgrid.mjs +3952 -0
- package/{main.d.ts → index.d.ts} +1 -1
- package/localization/custom-messages.component.d.ts +1 -1
- package/localization/localized-messages.directive.d.ts +1 -1
- package/localization/messages.d.ts +1 -1
- package/localization/pivot-localization.service.d.ts +1 -1
- package/models/configuration-change-event.d.ts +1 -1
- package/models/configurator-orientation.d.ts +1 -1
- package/models/configurator-position.d.ts +1 -1
- package/models/configurator-settings.d.ts +1 -1
- package/models/data-row-item.d.ts +1 -1
- package/models/drop-section.d.ts +1 -1
- package/models/drop-target.d.ts +1 -1
- package/models/expanded-change-event.d.ts +1 -1
- package/models/expanded-state-action.d.ts +1 -1
- package/models/loader-settings.d.ts +1 -1
- package/package-metadata.d.ts +1 -1
- package/package.json +36 -65
- package/pivotgrid.component.d.ts +1 -2
- package/pivotgrid.module.d.ts +1 -1
- package/{kendo-angular-pivotgrid.d.ts → progress-kendo-angular-pivotgrid.d.ts} +2 -2
- package/rendering/pivotgrid-cell.directive.d.ts +1 -1
- package/rendering/pivotgrid-table.component.d.ts +1 -1
- package/schematics/ngAdd/index.js +1 -5
- package/shared.module.d.ts +1 -1
- package/util.d.ts +1 -1
- package/bundles/kendo-angular-pivotgrid.umd.js +0 -5
- package/esm2015/models/expanded-state-action.js +0 -5
- package/esm2015/models/loader-settings.js +0 -5
- package/schematics/ngAdd/index.js.map +0 -1
|
@@ -1,15 +1,19 @@
|
|
|
1
1
|
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright ©
|
|
2
|
+
* Copyright © 2023 Progress Software Corporation. All rights reserved.
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { Component, EventEmitter, HostBinding, Input, Output, ViewChild } from '@angular/core';
|
|
5
|
+
import { ChangeDetectorRef, Component, EventEmitter, HostBinding, Input, NgZone, Output, ViewChild } from '@angular/core';
|
|
6
|
+
import { ConfiguratorNavigation } from '@progress/kendo-pivotgrid-common';
|
|
6
7
|
import { TreeViewComponent } from '@progress/kendo-angular-treeview';
|
|
8
|
+
import { PivotGridDataService } from '../data-binding/pivotgrid-data.service';
|
|
7
9
|
import { ConfiguratorService } from './configurator.service';
|
|
8
10
|
import { DropCueService } from './drop-cue.service';
|
|
9
11
|
import { from, of, Subscription } from 'rxjs';
|
|
10
12
|
import { mergeMap } from 'rxjs/operators';
|
|
11
13
|
import { clone, swapItems } from '../util';
|
|
14
|
+
import { LocalizationService } from '@progress/kendo-angular-l10n';
|
|
12
15
|
import { SinglePopupService } from './chip-menu/single-popup.service';
|
|
16
|
+
import { ChipListComponent } from '@progress/kendo-angular-buttons';
|
|
13
17
|
import * as i0 from "@angular/core";
|
|
14
18
|
import * as i1 from "../data-binding/pivotgrid-data.service";
|
|
15
19
|
import * as i2 from "@progress/kendo-angular-l10n";
|
|
@@ -69,7 +73,7 @@ export class PivotGridConfiguratorComponent {
|
|
|
69
73
|
}));
|
|
70
74
|
this.subs.add(this.dataService.configuredFields
|
|
71
75
|
.subscribe(res => {
|
|
72
|
-
const normalizedState = clone(
|
|
76
|
+
const normalizedState = clone({ ...this.dataService.state, dragItem: res.dragItem, dropTarget: res.dropTarget, dropZone: res.dropZone, dropDirection: res.dropDirection });
|
|
73
77
|
this.originalState = normalizedState;
|
|
74
78
|
this.setState(normalizedState);
|
|
75
79
|
this.setChecked();
|
|
@@ -94,7 +98,7 @@ export class PivotGridConfiguratorComponent {
|
|
|
94
98
|
this.subs.unsubscribe();
|
|
95
99
|
}
|
|
96
100
|
ngOnChanges(changes) {
|
|
97
|
-
if (changes
|
|
101
|
+
if (changes['orientation']) {
|
|
98
102
|
this.configuratorService.orientation = this.orientation;
|
|
99
103
|
}
|
|
100
104
|
}
|
|
@@ -177,7 +181,7 @@ export class PivotGridConfiguratorComponent {
|
|
|
177
181
|
onChipRemove(ev, item, section) {
|
|
178
182
|
const filteredItems = this.dataService.state[`${section}Axes`].filter(descriptor => descriptor !== item);
|
|
179
183
|
this.dataService.state[`${section}Axes`] = filteredItems;
|
|
180
|
-
const newState =
|
|
184
|
+
const newState = { ...this.state, ...this.dataService.state };
|
|
181
185
|
this.checked = this.checked.filter(checkedItem => checkedItem.uniqueName !== item.name[0]);
|
|
182
186
|
this.setState(newState);
|
|
183
187
|
if (!this.navigation) {
|
|
@@ -205,11 +209,10 @@ export class PivotGridConfiguratorComponent {
|
|
|
205
209
|
* A function which determines if a specific node is checked/
|
|
206
210
|
*/
|
|
207
211
|
isItemChecked(node) {
|
|
208
|
-
var _a, _b;
|
|
209
212
|
const res = this.checked.some(s => node.defaultHierarchy
|
|
210
213
|
? s.defaultHierarchy === node.defaultHierarchy
|
|
211
214
|
: s.uniqueName === node.uniqueName)
|
|
212
|
-
|| (
|
|
215
|
+
|| (node.children?.length && node.children?.every((c) => c.checked));
|
|
213
216
|
return res || null;
|
|
214
217
|
}
|
|
215
218
|
/**
|
|
@@ -217,7 +220,7 @@ export class PivotGridConfiguratorComponent {
|
|
|
217
220
|
*/
|
|
218
221
|
isSelectable(node) {
|
|
219
222
|
const hasChildren = !('hierarchyUniqueName' in node) && !('aggregator' in node);
|
|
220
|
-
return !
|
|
223
|
+
return !((!hasChildren && !node.aggregator && !node.measure)
|
|
221
224
|
|| (node.type === 2)
|
|
222
225
|
|| node.uniqueName === '[KPIs]');
|
|
223
226
|
}
|
|
@@ -249,10 +252,9 @@ export class PivotGridConfiguratorComponent {
|
|
|
249
252
|
this.zone.runOutsideAngular(() => setTimeout(() => closestItem.focus()));
|
|
250
253
|
}
|
|
251
254
|
onTreeViewSelect(ev) {
|
|
252
|
-
var _a;
|
|
253
255
|
const closestItem = ev.target.closest('.k-treeview-item');
|
|
254
256
|
if (closestItem) {
|
|
255
|
-
|
|
257
|
+
closestItem.querySelector('.k-checkbox')?.click();
|
|
256
258
|
}
|
|
257
259
|
}
|
|
258
260
|
onTreeViewEscape(ev) {
|
|
@@ -297,7 +299,7 @@ export class PivotGridConfiguratorComponent {
|
|
|
297
299
|
const targetIndex = itemIndex + (direction === 'right' ? 1 : -1);
|
|
298
300
|
swapItems(collection, itemIndex, targetIndex);
|
|
299
301
|
this.dataService.state[`${name}Axes`] = collection;
|
|
300
|
-
const newState =
|
|
302
|
+
const newState = { ...this.state, ...this.dataService.state };
|
|
301
303
|
this.setState(newState);
|
|
302
304
|
this.cdr.detectChanges();
|
|
303
305
|
}
|
|
@@ -305,21 +307,20 @@ export class PivotGridConfiguratorComponent {
|
|
|
305
307
|
* Moves a chip from one ChipList to another
|
|
306
308
|
*/
|
|
307
309
|
moveChip(collection, item, itemIndex, name) {
|
|
308
|
-
var _a;
|
|
309
310
|
collection.splice(itemIndex, 1);
|
|
310
311
|
const targetCollectionName = name === 'row' ? 'column' : 'row';
|
|
311
312
|
const axes = this.state[`${targetCollectionName}Axes`];
|
|
312
313
|
axes.push(item);
|
|
313
314
|
this.dataService.state[`${name}Axes`] = collection;
|
|
314
315
|
this.dataService.state[targetCollectionName] = axes;
|
|
315
|
-
const newState =
|
|
316
|
+
const newState = { ...this.state, ...this.dataService.state };
|
|
316
317
|
this.setState(newState);
|
|
317
318
|
this.cdr.detectChanges();
|
|
318
|
-
|
|
319
|
+
this[`${targetCollectionName}sList`]?.chips.last.focus();
|
|
319
320
|
}
|
|
320
321
|
}
|
|
321
|
-
PivotGridConfiguratorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
322
|
-
PivotGridConfiguratorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "
|
|
322
|
+
PivotGridConfiguratorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PivotGridConfiguratorComponent, deps: [{ token: i1.PivotGridDataService }, { token: i2.LocalizationService }, { token: i3.ConfiguratorService }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
|
|
323
|
+
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: [
|
|
323
324
|
ConfiguratorService,
|
|
324
325
|
DropCueService,
|
|
325
326
|
SinglePopupService
|
|
@@ -339,11 +340,11 @@ PivotGridConfiguratorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
|
339
340
|
|
|
340
341
|
<div class="k-pivotgrid-configurator-content">
|
|
341
342
|
<div class="k-form" [class.k-form-horizontal]="isHorizontal">
|
|
342
|
-
<div class="k-form-field-wrapper">
|
|
343
|
-
<div class="k-form-field">
|
|
343
|
+
<div class="k-form-field-wrapper" [ngStyle]="isHorizontal ? {'padding-left': 0 } : null">
|
|
344
|
+
<div class="k-form-field" [style]="'padding-top: 1em; margin-top: 0;'" [ngStyle]="isHorizontal ? {'padding-top': 0, 'padding-left': '16px' } : null">
|
|
344
345
|
<span [id]="contentLabelId('fields')" class="k-label">{{messageFor('configuratorFieldsText')}}</span>
|
|
345
346
|
</div>
|
|
346
|
-
<div class="k-form-field">
|
|
347
|
+
<div class="k-form-field" [style]="'padding-top: 1em; margin-top: 0;'" [ngStyle]="isHorizontal ? {'padding-top': 0, 'padding-left': '16px' } : null">
|
|
347
348
|
<div class="k-fields-list-wrapper">
|
|
348
349
|
<kendo-treeview
|
|
349
350
|
#treeview
|
|
@@ -372,12 +373,12 @@ PivotGridConfiguratorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
|
372
373
|
</div>
|
|
373
374
|
</div>
|
|
374
375
|
|
|
375
|
-
<div *ngIf="isHorizontal; else verticalTemplate" class="k-form-field-wrapper">
|
|
376
|
+
<div *ngIf="isHorizontal; else verticalTemplate" class="k-form-field-wrapper" [ngStyle]="isHorizontal ? {'padding-left': 0 } : null">
|
|
376
377
|
<ng-container *ngTemplateOutlet="verticalTemplate"></ng-container>
|
|
377
378
|
</div>
|
|
378
379
|
|
|
379
380
|
<ng-template #verticalTemplate>
|
|
380
|
-
<div class="k-form-field" kendoDropTarget axes="columnAxes">
|
|
381
|
+
<div class="k-form-field" kendoDropTarget axes="columnAxes" [style]="'padding-top: 1em; margin-top: 0;'" [ngStyle]="isHorizontal ? {'padding-top': 0, 'padding-left': '16px' } : null">
|
|
381
382
|
<span [id]="contentLabelId('columns')" class="k-label">{{messageFor('configuratorColumnsText')}}</span>
|
|
382
383
|
</div>
|
|
383
384
|
|
|
@@ -387,6 +388,7 @@ PivotGridConfiguratorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
|
387
388
|
kendoDropTarget
|
|
388
389
|
axes="columnAxes"
|
|
389
390
|
[attr.aria-labelledby]="headerTextId + ' ' + contentLabelId('columns')"
|
|
391
|
+
[ngStyle]="isHorizontal ? {'padding-top': 0, 'padding-left': '16px' } : null"
|
|
390
392
|
>
|
|
391
393
|
<ng-container *ngFor="let item of state.columnAxes">
|
|
392
394
|
<kendo-chip *ngIf="item.name.length === 1"
|
|
@@ -412,7 +414,7 @@ PivotGridConfiguratorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
|
412
414
|
<div class="k-settings-description" kendoDropTarget axes="columnAxes">{{messageFor('configuratorEmptyColumnsText')}}</div>
|
|
413
415
|
</ng-template>
|
|
414
416
|
|
|
415
|
-
<div class="k-form-field" kendoDropTarget axes="rowAxes">
|
|
417
|
+
<div class="k-form-field" kendoDropTarget axes="rowAxes" [style]="'padding-top: 1em; margin-top: 0;'" [ngStyle]="isHorizontal ? {'padding-top': 0, 'padding-left': '16px' } : null">
|
|
416
418
|
<span [id]="contentLabelId('rows')" class="k-label">{{messageFor('configuratorRowsText')}}</span>
|
|
417
419
|
</div>
|
|
418
420
|
|
|
@@ -422,6 +424,7 @@ PivotGridConfiguratorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
|
422
424
|
kendoDropTarget
|
|
423
425
|
axes="rowAxes"
|
|
424
426
|
[attr.aria-labelledby]="headerTextId + ' ' + contentLabelId('rows')"
|
|
427
|
+
[ngStyle]="isHorizontal ? {'padding-top': 0, 'padding-left': '16px' } : null"
|
|
425
428
|
>
|
|
426
429
|
<ng-container *ngFor="let item of state.rowAxes">
|
|
427
430
|
<kendo-chip *ngIf="item.name.length === 1"
|
|
@@ -450,12 +453,12 @@ PivotGridConfiguratorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
|
450
453
|
</ng-template>
|
|
451
454
|
</ng-template>
|
|
452
455
|
|
|
453
|
-
<div *ngIf="isHorizontal; else verticalMeasuresTemplate" class="k-form-field-wrapper">
|
|
456
|
+
<div *ngIf="isHorizontal; else verticalMeasuresTemplate" class="k-form-field-wrapper" [ngStyle]="isHorizontal ? {'padding-left': 0 } : null" >
|
|
454
457
|
<ng-container *ngTemplateOutlet="verticalMeasuresTemplate"></ng-container>
|
|
455
458
|
</div>
|
|
456
459
|
|
|
457
460
|
<ng-template #verticalMeasuresTemplate>
|
|
458
|
-
<div class="k-form-field" kendoDropTarget axes="measureAxes">
|
|
461
|
+
<div class="k-form-field" kendoDropTarget axes="measureAxes" [style]="'padding-top: 1em; margin-top: 0;'" [ngStyle]="isHorizontal ? {'padding-top': 0, 'padding-left': '16px' } : null">
|
|
459
462
|
<span [id]="contentLabelId('values')" class="k-label">{{messageFor('configuratorValuesText')}}</span>
|
|
460
463
|
</div>
|
|
461
464
|
|
|
@@ -464,6 +467,7 @@ PivotGridConfiguratorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
|
464
467
|
kendoDropTarget
|
|
465
468
|
axes="measureAxes"
|
|
466
469
|
[attr.aria-labelledby]="headerTextId + ' ' + contentLabelId('values')"
|
|
470
|
+
[ngStyle]="isHorizontal ? {'padding-top': 0, 'padding-left': '16px' } : null"
|
|
467
471
|
>
|
|
468
472
|
<kendo-chip *ngFor="let item of state.measureAxes"
|
|
469
473
|
kendoChipDraggable
|
|
@@ -493,8 +497,8 @@ PivotGridConfiguratorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
|
493
497
|
<button kendoButton themeColor="primary" type="button" (click)="handleSubmit()">{{messageFor('configuratorApplyButtonText')}}</button>
|
|
494
498
|
</div>
|
|
495
499
|
</div>
|
|
496
|
-
`, isInline: true,
|
|
497
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
500
|
+
`, 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: i6.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: i8.CheckBoxDirective, selector: "input[kendoCheckBox]", inputs: ["size", "rounded"] }, { type: i7.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i9.DropTargetDirective, selector: "[kendoDropTarget]", inputs: ["item", "axes"] }, { type: i7.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i10.DraggableChipDirective, selector: "[kendoChipDraggable]", inputs: ["item"] }, { type: i11.DraggableDirective, selector: "[kendoDraggable]", inputs: ["enableDrag"], outputs: ["kendoPress", "kendoDrag", "kendoRelease"] }, { type: i12.ChipKeyboardNavigationDirective, selector: "[kendoChipKeyboardNavigation]", outputs: ["reorder"] }] });
|
|
501
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PivotGridConfiguratorComponent, decorators: [{
|
|
498
502
|
type: Component,
|
|
499
503
|
args: [{
|
|
500
504
|
selector: 'kendo-pivotgrid-configurator',
|
|
@@ -519,11 +523,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
|
|
|
519
523
|
|
|
520
524
|
<div class="k-pivotgrid-configurator-content">
|
|
521
525
|
<div class="k-form" [class.k-form-horizontal]="isHorizontal">
|
|
522
|
-
<div class="k-form-field-wrapper">
|
|
523
|
-
<div class="k-form-field">
|
|
526
|
+
<div class="k-form-field-wrapper" [ngStyle]="isHorizontal ? {'padding-left': 0 } : null">
|
|
527
|
+
<div class="k-form-field" [style]="'padding-top: 1em; margin-top: 0;'" [ngStyle]="isHorizontal ? {'padding-top': 0, 'padding-left': '16px' } : null">
|
|
524
528
|
<span [id]="contentLabelId('fields')" class="k-label">{{messageFor('configuratorFieldsText')}}</span>
|
|
525
529
|
</div>
|
|
526
|
-
<div class="k-form-field">
|
|
530
|
+
<div class="k-form-field" [style]="'padding-top: 1em; margin-top: 0;'" [ngStyle]="isHorizontal ? {'padding-top': 0, 'padding-left': '16px' } : null">
|
|
527
531
|
<div class="k-fields-list-wrapper">
|
|
528
532
|
<kendo-treeview
|
|
529
533
|
#treeview
|
|
@@ -552,12 +556,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
|
|
|
552
556
|
</div>
|
|
553
557
|
</div>
|
|
554
558
|
|
|
555
|
-
<div *ngIf="isHorizontal; else verticalTemplate" class="k-form-field-wrapper">
|
|
559
|
+
<div *ngIf="isHorizontal; else verticalTemplate" class="k-form-field-wrapper" [ngStyle]="isHorizontal ? {'padding-left': 0 } : null">
|
|
556
560
|
<ng-container *ngTemplateOutlet="verticalTemplate"></ng-container>
|
|
557
561
|
</div>
|
|
558
562
|
|
|
559
563
|
<ng-template #verticalTemplate>
|
|
560
|
-
<div class="k-form-field" kendoDropTarget axes="columnAxes">
|
|
564
|
+
<div class="k-form-field" kendoDropTarget axes="columnAxes" [style]="'padding-top: 1em; margin-top: 0;'" [ngStyle]="isHorizontal ? {'padding-top': 0, 'padding-left': '16px' } : null">
|
|
561
565
|
<span [id]="contentLabelId('columns')" class="k-label">{{messageFor('configuratorColumnsText')}}</span>
|
|
562
566
|
</div>
|
|
563
567
|
|
|
@@ -567,6 +571,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
|
|
|
567
571
|
kendoDropTarget
|
|
568
572
|
axes="columnAxes"
|
|
569
573
|
[attr.aria-labelledby]="headerTextId + ' ' + contentLabelId('columns')"
|
|
574
|
+
[ngStyle]="isHorizontal ? {'padding-top': 0, 'padding-left': '16px' } : null"
|
|
570
575
|
>
|
|
571
576
|
<ng-container *ngFor="let item of state.columnAxes">
|
|
572
577
|
<kendo-chip *ngIf="item.name.length === 1"
|
|
@@ -592,7 +597,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
|
|
|
592
597
|
<div class="k-settings-description" kendoDropTarget axes="columnAxes">{{messageFor('configuratorEmptyColumnsText')}}</div>
|
|
593
598
|
</ng-template>
|
|
594
599
|
|
|
595
|
-
<div class="k-form-field" kendoDropTarget axes="rowAxes">
|
|
600
|
+
<div class="k-form-field" kendoDropTarget axes="rowAxes" [style]="'padding-top: 1em; margin-top: 0;'" [ngStyle]="isHorizontal ? {'padding-top': 0, 'padding-left': '16px' } : null">
|
|
596
601
|
<span [id]="contentLabelId('rows')" class="k-label">{{messageFor('configuratorRowsText')}}</span>
|
|
597
602
|
</div>
|
|
598
603
|
|
|
@@ -602,6 +607,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
|
|
|
602
607
|
kendoDropTarget
|
|
603
608
|
axes="rowAxes"
|
|
604
609
|
[attr.aria-labelledby]="headerTextId + ' ' + contentLabelId('rows')"
|
|
610
|
+
[ngStyle]="isHorizontal ? {'padding-top': 0, 'padding-left': '16px' } : null"
|
|
605
611
|
>
|
|
606
612
|
<ng-container *ngFor="let item of state.rowAxes">
|
|
607
613
|
<kendo-chip *ngIf="item.name.length === 1"
|
|
@@ -630,12 +636,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
|
|
|
630
636
|
</ng-template>
|
|
631
637
|
</ng-template>
|
|
632
638
|
|
|
633
|
-
<div *ngIf="isHorizontal; else verticalMeasuresTemplate" class="k-form-field-wrapper">
|
|
639
|
+
<div *ngIf="isHorizontal; else verticalMeasuresTemplate" class="k-form-field-wrapper" [ngStyle]="isHorizontal ? {'padding-left': 0 } : null" >
|
|
634
640
|
<ng-container *ngTemplateOutlet="verticalMeasuresTemplate"></ng-container>
|
|
635
641
|
</div>
|
|
636
642
|
|
|
637
643
|
<ng-template #verticalMeasuresTemplate>
|
|
638
|
-
<div class="k-form-field" kendoDropTarget axes="measureAxes">
|
|
644
|
+
<div class="k-form-field" kendoDropTarget axes="measureAxes" [style]="'padding-top: 1em; margin-top: 0;'" [ngStyle]="isHorizontal ? {'padding-top': 0, 'padding-left': '16px' } : null">
|
|
639
645
|
<span [id]="contentLabelId('values')" class="k-label">{{messageFor('configuratorValuesText')}}</span>
|
|
640
646
|
</div>
|
|
641
647
|
|
|
@@ -644,6 +650,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
|
|
|
644
650
|
kendoDropTarget
|
|
645
651
|
axes="measureAxes"
|
|
646
652
|
[attr.aria-labelledby]="headerTextId + ' ' + contentLabelId('values')"
|
|
653
|
+
[ngStyle]="isHorizontal ? {'padding-top': 0, 'padding-left': '16px' } : null"
|
|
647
654
|
>
|
|
648
655
|
<kendo-chip *ngFor="let item of state.measureAxes"
|
|
649
656
|
kendoChipDraggable
|
|
@@ -673,28 +680,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
|
|
|
673
680
|
<button kendoButton themeColor="primary" type="button" (click)="handleSubmit()">{{messageFor('configuratorApplyButtonText')}}</button>
|
|
674
681
|
</div>
|
|
675
682
|
</div>
|
|
676
|
-
|
|
677
|
-
styles: [`
|
|
678
|
-
.k-form .k-chip-list {
|
|
679
|
-
width: 100%;
|
|
680
|
-
}
|
|
681
|
-
|
|
682
|
-
.k-form .k-form-field,
|
|
683
|
-
.k-form .k-settings-description {
|
|
684
|
-
padding-top: 1em;
|
|
685
|
-
margin-top: 0;
|
|
686
|
-
}
|
|
687
|
-
|
|
688
|
-
.k-form.k-form-horizontal .k-form-field,
|
|
689
|
-
.k-form.k-form-horizontal .k-chip-list {
|
|
690
|
-
padding-top: 0;
|
|
691
|
-
padding-left: 16px;
|
|
692
|
-
}
|
|
693
|
-
|
|
694
|
-
.k-form.k-form-horizontal .k-form-field-wrapper {
|
|
695
|
-
padding-left: 0;
|
|
696
|
-
}
|
|
697
|
-
`]
|
|
683
|
+
`
|
|
698
684
|
}]
|
|
699
685
|
}], ctorParameters: function () { return [{ type: i1.PivotGridDataService }, { type: i2.LocalizationService }, { type: i3.ConfiguratorService }, { type: i0.ChangeDetectorRef }, { type: i0.NgZone }]; }, propDecorators: { hostClass: [{
|
|
700
686
|
type: HostBinding,
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright ©
|
|
2
|
+
* Copyright © 2023 Progress Software Corporation. All rights reserved.
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
import { EventEmitter, Injectable, Output } from '@angular/core';
|
|
6
6
|
import { configuratorReducer } from '@progress/kendo-pivotgrid-common';
|
|
7
|
+
import { PivotGridDataService } from '../data-binding/pivotgrid-data.service';
|
|
7
8
|
import { PivotGridState } from './../models/configurator-settings';
|
|
8
9
|
import * as i0 from "@angular/core";
|
|
9
10
|
import * as i1 from "../data-binding/pivotgrid-data.service";
|
|
@@ -28,14 +29,14 @@ export class ConfiguratorService {
|
|
|
28
29
|
dropZone: this.state.dropZone
|
|
29
30
|
}, action);
|
|
30
31
|
Object.keys(newState).forEach(key => newState[key] === undefined && delete newState[key]);
|
|
31
|
-
this.state =
|
|
32
|
+
this.state = { ...this.state, ...newState };
|
|
32
33
|
this.dataService.state = new PivotGridState(this.state.columnAxes, this.state.rowAxes, this.state.measureAxes, this.state.sort, this.state.filter);
|
|
33
34
|
this.configuratorStateChange.emit(this.state);
|
|
34
35
|
}
|
|
35
36
|
}
|
|
36
|
-
ConfiguratorService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
37
|
-
ConfiguratorService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
38
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
37
|
+
ConfiguratorService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ConfiguratorService, deps: [{ token: i1.PivotGridDataService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
38
|
+
ConfiguratorService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ConfiguratorService });
|
|
39
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ConfiguratorService, decorators: [{
|
|
39
40
|
type: Injectable
|
|
40
41
|
}], ctorParameters: function () { return [{ type: i1.PivotGridDataService }]; }, propDecorators: { configuratorStateChange: [{
|
|
41
42
|
type: Output
|
package/{esm2015/configurator/draggable.directive.js → esm2020/configurator/draggable.directive.mjs}
RENAMED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright ©
|
|
2
|
+
* Copyright © 2023 Progress Software Corporation. All rights reserved.
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { Directive, Input, Optional, HostBinding } from '@angular/core';
|
|
6
|
-
import { isDocumentAvailable } from '@progress/kendo-angular-common';
|
|
5
|
+
import { Directive, Input, ElementRef, NgZone, Optional, HostBinding, Renderer2 } from '@angular/core';
|
|
6
|
+
import { DraggableDirective, isDocumentAvailable } from '@progress/kendo-angular-common';
|
|
7
7
|
import { PIVOT_CONFIGURATOR_ACTION } from '@progress/kendo-pivotgrid-common';
|
|
8
|
+
import { ConfiguratorService } from './configurator.service';
|
|
9
|
+
import { DropCueService } from './drop-cue.service';
|
|
8
10
|
import { Subscription } from 'rxjs';
|
|
9
11
|
import * as i0 from "@angular/core";
|
|
10
12
|
import * as i1 from "@progress/kendo-angular-common";
|
|
@@ -49,7 +51,6 @@ export class DraggableChipDirective {
|
|
|
49
51
|
this.subs.add(this.draggable.kendoDrag
|
|
50
52
|
.subscribe((event) => {
|
|
51
53
|
this.zone.runOutsideAngular(() => {
|
|
52
|
-
var _a;
|
|
53
54
|
if (isDocumentAvailable()) {
|
|
54
55
|
const isDragging = Math.abs(this.initialX.current - event.clientX) > 5 ||
|
|
55
56
|
Math.abs(this.initialY.current - event.clientY) > 5;
|
|
@@ -57,7 +58,7 @@ export class DraggableChipDirective {
|
|
|
57
58
|
return;
|
|
58
59
|
}
|
|
59
60
|
this.drag = true;
|
|
60
|
-
if (!
|
|
61
|
+
if (!document.elementFromPoint(event.clientX, event.clientY)?.closest('.k-pivotgrid-configurator [kendodroptarget]')) {
|
|
61
62
|
return;
|
|
62
63
|
}
|
|
63
64
|
this.renderer.setStyle(this.element.nativeElement, 'transform', `translate(${event.clientX - this.initialX.current}px, ${event.clientY - this.initialY.current}px)`);
|
|
@@ -93,9 +94,9 @@ export class DraggableChipDirective {
|
|
|
93
94
|
this.subs.unsubscribe();
|
|
94
95
|
}
|
|
95
96
|
}
|
|
96
|
-
DraggableChipDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
97
|
-
DraggableChipDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "
|
|
98
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
97
|
+
DraggableChipDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: DraggableChipDirective, deps: [{ token: i1.DraggableDirective, optional: true }, { token: i0.ElementRef }, { token: i0.NgZone }, { token: i2.ConfiguratorService }, { token: i3.DropCueService }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
|
|
98
|
+
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 });
|
|
99
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: DraggableChipDirective, decorators: [{
|
|
99
100
|
type: Directive,
|
|
100
101
|
args: [{
|
|
101
102
|
selector: '[kendoChipDraggable]'
|
package/{esm2015/configurator/drop-cue.service.js → esm2020/configurator/drop-cue.service.mjs}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright ©
|
|
2
|
+
* Copyright © 2023 Progress Software Corporation. All rights reserved.
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
import { Injectable } from '@angular/core';
|
|
@@ -65,8 +65,8 @@ export class DropCueService {
|
|
|
65
65
|
this.dom.style.display = '';
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
|
-
DropCueService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
69
|
-
DropCueService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
70
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
68
|
+
DropCueService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: DropCueService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
69
|
+
DropCueService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: DropCueService });
|
|
70
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: DropCueService, decorators: [{
|
|
71
71
|
type: Injectable
|
|
72
72
|
}] });
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright ©
|
|
2
|
+
* Copyright © 2023 Progress Software Corporation. All rights reserved.
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { Directive, Input } from "@angular/core";
|
|
5
|
+
import { Directive, ElementRef, Input, NgZone, Renderer2 } from "@angular/core";
|
|
6
6
|
import { PIVOT_CONFIGURATOR_ACTION } from "@progress/kendo-pivotgrid-common";
|
|
7
7
|
import { Subscription } from "rxjs";
|
|
8
|
+
import { ConfiguratorService } from "./configurator.service";
|
|
9
|
+
import { DropCueService } from "./drop-cue.service";
|
|
8
10
|
import { isPresent } from "../util";
|
|
9
11
|
import * as i0 from "@angular/core";
|
|
10
12
|
import * as i1 from "./configurator.service";
|
|
@@ -22,10 +24,9 @@ export class DropTargetDirective {
|
|
|
22
24
|
this.subs = new Subscription();
|
|
23
25
|
}
|
|
24
26
|
ngOnInit() {
|
|
25
|
-
var _a;
|
|
26
27
|
const element = this.element.nativeElement;
|
|
27
28
|
this.elementType = this.getElementType(element);
|
|
28
|
-
this.elementSectionType =
|
|
29
|
+
this.elementSectionType = element.getAttribute('axes')?.split('Axes')[0];
|
|
29
30
|
this.subs.add(this.renderer.listen(element, 'mouseenter', this.handleMouseEnter.bind(this)));
|
|
30
31
|
this.subs.add(this.renderer.listen(element, 'mousemove', this.handleMouseMove.bind(this)));
|
|
31
32
|
this.subs.add(this.renderer.listen(element, 'mouseleave', this.handleMouseLeave.bind(this)));
|
|
@@ -52,7 +53,6 @@ export class DropTargetDirective {
|
|
|
52
53
|
}
|
|
53
54
|
handleMouseMove(event) {
|
|
54
55
|
this.zone.runOutsideAngular(() => {
|
|
55
|
-
var _a;
|
|
56
56
|
event.stopImmediatePropagation();
|
|
57
57
|
if (this.configuratorService.state.dragItem) {
|
|
58
58
|
if (this.configuratorService.draggedElement && !this.isDropAllowed(this.configuratorService.draggedElement.fromSection)) {
|
|
@@ -60,13 +60,13 @@ export class DropTargetDirective {
|
|
|
60
60
|
return;
|
|
61
61
|
}
|
|
62
62
|
this.renderer.setStyle(this.element.nativeElement, 'cursor', 'pointer');
|
|
63
|
-
const singleOrNoChip =
|
|
63
|
+
const singleOrNoChip = this.targetElement?.querySelectorAll('.k-chip').length < 2;
|
|
64
64
|
const isInOwnContainer = this.elementSectionType === this.configuratorService.draggedElement.fromSection;
|
|
65
65
|
if (!this.targetElement) {
|
|
66
66
|
return;
|
|
67
67
|
}
|
|
68
68
|
switch (this.elementType) {
|
|
69
|
-
case 'chip':
|
|
69
|
+
case 'chip': {
|
|
70
70
|
const rect = this.element.nativeElement.getBoundingClientRect();
|
|
71
71
|
const x = event.clientX - rect.left;
|
|
72
72
|
const direction = x < rect.width / 2 ? 'before' : 'after';
|
|
@@ -75,6 +75,7 @@ export class DropTargetDirective {
|
|
|
75
75
|
this.configuratorService.parseConfiguratorState({ type: PIVOT_CONFIGURATOR_ACTION.setDropDirection, payload: direction });
|
|
76
76
|
}
|
|
77
77
|
break;
|
|
78
|
+
}
|
|
78
79
|
case 'container':
|
|
79
80
|
case 'header':
|
|
80
81
|
if (singleOrNoChip && isInOwnContainer) {
|
|
@@ -163,9 +164,9 @@ export class DropTargetDirective {
|
|
|
163
164
|
}
|
|
164
165
|
}
|
|
165
166
|
}
|
|
166
|
-
DropTargetDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
167
|
-
DropTargetDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "
|
|
168
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
167
|
+
DropTargetDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: DropTargetDirective, deps: [{ token: i0.ElementRef }, { token: i1.ConfiguratorService }, { token: i2.DropCueService }, { token: i0.Renderer2 }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Directive });
|
|
168
|
+
DropTargetDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: DropTargetDirective, selector: "[kendoDropTarget]", inputs: { item: "item", axes: "axes" }, ngImport: i0 });
|
|
169
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: DropTargetDirective, decorators: [{
|
|
169
170
|
type: Directive,
|
|
170
171
|
args: [{
|
|
171
172
|
selector: '[kendoDropTarget]'
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright ©
|
|
2
|
+
* Copyright © 2023 Progress Software Corporation. All rights reserved.
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { Directive, EventEmitter, Input, Output } from '@angular/core';
|
|
5
|
+
import { Directive, EventEmitter, Input, NgZone, Output } from '@angular/core';
|
|
6
|
+
import { PivotGridDataService } from './pivotgrid-data.service';
|
|
6
7
|
import { headersReducer, HEADERS_ACTION, toTree } from '@progress/kendo-pivotgrid-common';
|
|
7
8
|
import { Subscription } from 'rxjs';
|
|
8
9
|
import { PivotGridState } from '../models/configurator-settings';
|
|
@@ -109,8 +110,8 @@ export class PivotBaseBindingDirective {
|
|
|
109
110
|
// The `headersReducer` method is responsible for udpating
|
|
110
111
|
// the expanded state based on the toggle action (expand/collapse)
|
|
111
112
|
// Update axes and reload data
|
|
112
|
-
const newHeaders = headersReducer(this[axes].slice(),
|
|
113
|
-
const newState =
|
|
113
|
+
const newHeaders = headersReducer(this[axes].slice(), { ...action, tree });
|
|
114
|
+
const newState = { ...this.dataService.state, ...{ [axes]: newHeaders } };
|
|
114
115
|
this.dataService.state = newState;
|
|
115
116
|
if (hasObservers(this.expandChange)) {
|
|
116
117
|
const event = new ExpandChangeEvent(newState);
|
|
@@ -125,9 +126,9 @@ export class PivotBaseBindingDirective {
|
|
|
125
126
|
}
|
|
126
127
|
;
|
|
127
128
|
}
|
|
128
|
-
PivotBaseBindingDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
129
|
-
PivotBaseBindingDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "
|
|
130
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
129
|
+
PivotBaseBindingDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PivotBaseBindingDirective, deps: [{ token: i1.PivotGridDataService }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Directive });
|
|
130
|
+
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 });
|
|
131
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PivotBaseBindingDirective, decorators: [{
|
|
131
132
|
type: Directive,
|
|
132
133
|
args: [{
|
|
133
134
|
selector: 'kendo-base-binding-directive'
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright ©
|
|
2
|
+
* Copyright © 2023 Progress Software Corporation. All rights reserved.
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { Directive, Input } from '@angular/core';
|
|
5
|
+
import { Directive, Input, NgZone } from '@angular/core';
|
|
6
|
+
import { PivotGridDataService } from './pivotgrid-data.service';
|
|
6
7
|
import { createDataTree, createFlatSchemaDimensions, createLocalDataState, rootFields } from '@progress/kendo-pivotgrid-common';
|
|
7
8
|
import { anyChanged } from '@progress/kendo-angular-common';
|
|
8
9
|
import { PivotBaseBindingDirective } from './base-binding-directive';
|
|
@@ -19,7 +20,7 @@ export class PivotLocalBindingDirective extends PivotBaseBindingDirective {
|
|
|
19
20
|
constructor(dataService, zone) {
|
|
20
21
|
super(dataService, zone);
|
|
21
22
|
this.type = 'local';
|
|
22
|
-
this.createAxisSettings = (key) => (
|
|
23
|
+
this.createAxisSettings = (key) => ({ key, ...this.dimensions[key] });
|
|
23
24
|
}
|
|
24
25
|
ngOnChanges(changes) {
|
|
25
26
|
if (anyChanged(['data', 'dimensions', 'columnAxes', 'rowAxes', 'measureAxes', 'measures'], changes)) {
|
|
@@ -60,9 +61,9 @@ export class PivotLocalBindingDirective extends PivotBaseBindingDirective {
|
|
|
60
61
|
return Array.from(rootFields(axes).keys()).join(stringSeparator);
|
|
61
62
|
}
|
|
62
63
|
}
|
|
63
|
-
PivotLocalBindingDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
64
|
-
PivotLocalBindingDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "
|
|
65
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
64
|
+
PivotLocalBindingDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PivotLocalBindingDirective, deps: [{ token: i1.PivotGridDataService }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Directive });
|
|
65
|
+
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 });
|
|
66
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PivotLocalBindingDirective, decorators: [{
|
|
66
67
|
type: Directive,
|
|
67
68
|
args: [{
|
|
68
69
|
selector: '[kendoPivotLocalBinding]',
|