@progress/kendo-angular-pivotgrid 0.2.1-dev.202209131242 → 1.0.0-dev.202209131611
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/kendo-angular-pivotgrid.umd.js +1 -1
- package/configurator/configurator.component.d.ts +10 -3
- package/configurator/configurator.service.d.ts +3 -0
- package/data-binding/base-binding-directive.d.ts +0 -4
- package/data-binding/pivotgrid-data.service.d.ts +2 -0
- package/esm2015/configurator/configurator.component.js +130 -87
- package/esm2015/configurator/configurator.service.js +12 -8
- package/esm2015/data-binding/base-binding-directive.js +9 -23
- package/esm2015/data-binding/local-binding.directive.js +1 -1
- package/esm2015/data-binding/olap-binding.directive.js +1 -1
- package/esm2015/models/configurator-orientation.js +5 -0
- package/esm2015/package-metadata.js +1 -1
- package/esm2015/pivotgrid.component.js +10 -7
- package/fesm2015/kendo-angular-pivotgrid.js +175 -141
- package/models/configurator-orientation.d.ts +10 -0
- package/models/configurator-settings.d.ts +8 -7
- package/package.json +3 -2
- package/pivotgrid.component.d.ts +2 -1
|
@@ -38,7 +38,7 @@ const packageMetadata = {
|
|
|
38
38
|
name: '@progress/kendo-angular-pivotgrid',
|
|
39
39
|
productName: 'Kendo UI for Angular',
|
|
40
40
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
41
|
-
publishDate:
|
|
41
|
+
publishDate: 1663085465,
|
|
42
42
|
version: '',
|
|
43
43
|
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'
|
|
44
44
|
};
|
|
@@ -491,20 +491,34 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
491
491
|
type: Input
|
|
492
492
|
}] } });
|
|
493
493
|
|
|
494
|
+
/**
|
|
495
|
+
* @hidden
|
|
496
|
+
*/
|
|
497
|
+
class PivotGridState {
|
|
498
|
+
constructor(columnAxes, rowAxes, measureAxes, sort, filter) {
|
|
499
|
+
this.columnAxes = columnAxes;
|
|
500
|
+
this.rowAxes = rowAxes;
|
|
501
|
+
this.measureAxes = measureAxes;
|
|
502
|
+
this.sort = sort;
|
|
503
|
+
this.filter = filter;
|
|
504
|
+
}
|
|
505
|
+
}
|
|
506
|
+
|
|
494
507
|
/**
|
|
495
508
|
* @hidden
|
|
496
509
|
*/
|
|
497
510
|
class ConfiguratorService {
|
|
498
|
-
constructor() {
|
|
511
|
+
constructor(dataService) {
|
|
512
|
+
this.dataService = dataService;
|
|
499
513
|
this.configuratorStateChange = new EventEmitter();
|
|
500
514
|
}
|
|
501
515
|
parseConfiguratorState(action) {
|
|
502
516
|
const newState = configuratorReducer({
|
|
503
|
-
filter: this.state.filter,
|
|
504
|
-
sort: this.state.sort,
|
|
505
|
-
rowAxes: this.state.rowAxes,
|
|
506
|
-
columnAxes: this.state.columnAxes,
|
|
507
|
-
measureAxes: this.state.measureAxes,
|
|
517
|
+
filter: this.dataService.state.filter,
|
|
518
|
+
sort: this.dataService.state.sort,
|
|
519
|
+
rowAxes: this.dataService.state.rowAxes,
|
|
520
|
+
columnAxes: this.dataService.state.columnAxes,
|
|
521
|
+
measureAxes: this.dataService.state.measureAxes,
|
|
508
522
|
dragItem: this.state.dragItem,
|
|
509
523
|
dropDirection: this.state.dropDirection,
|
|
510
524
|
dropTarget: this.state.dropTarget,
|
|
@@ -512,14 +526,15 @@ class ConfiguratorService {
|
|
|
512
526
|
}, action);
|
|
513
527
|
Object.keys(newState).forEach(key => newState[key] === undefined && delete newState[key]);
|
|
514
528
|
this.state = Object.assign(Object.assign({}, this.state), newState);
|
|
529
|
+
this.dataService.state = new PivotGridState(this.state.columnAxes, this.state.rowAxes, this.state.measureAxes, this.state.sort, this.state.filter);
|
|
515
530
|
this.configuratorStateChange.emit(this.state);
|
|
516
531
|
}
|
|
517
532
|
}
|
|
518
|
-
ConfiguratorService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ConfiguratorService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
533
|
+
ConfiguratorService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ConfiguratorService, deps: [{ token: PivotGridDataService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
519
534
|
ConfiguratorService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ConfiguratorService });
|
|
520
535
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ConfiguratorService, decorators: [{
|
|
521
536
|
type: Injectable
|
|
522
|
-
}], propDecorators: { configuratorStateChange: [{
|
|
537
|
+
}], ctorParameters: function () { return [{ type: PivotGridDataService }]; }, propDecorators: { configuratorStateChange: [{
|
|
523
538
|
type: Output
|
|
524
539
|
}] } });
|
|
525
540
|
|
|
@@ -1821,7 +1836,7 @@ class PivotGridConfiguratorComponent {
|
|
|
1821
1836
|
this.configuratorService = configuratorService;
|
|
1822
1837
|
this.cdr = cdr;
|
|
1823
1838
|
this.hostClass = true;
|
|
1824
|
-
this.
|
|
1839
|
+
this.orientation = 'vertical';
|
|
1825
1840
|
this.sort = new Array();
|
|
1826
1841
|
this.checked = [];
|
|
1827
1842
|
this.subs = new Subscription();
|
|
@@ -1840,6 +1855,9 @@ class PivotGridConfiguratorComponent {
|
|
|
1840
1855
|
return of(node.children);
|
|
1841
1856
|
};
|
|
1842
1857
|
}
|
|
1858
|
+
get isHorizontal() {
|
|
1859
|
+
return this.orientation === 'horizontal';
|
|
1860
|
+
}
|
|
1843
1861
|
ngOnInit() {
|
|
1844
1862
|
this.subs.add(this.dataService.fields
|
|
1845
1863
|
.subscribe(res => {
|
|
@@ -1847,13 +1865,21 @@ class PivotGridConfiguratorComponent {
|
|
|
1847
1865
|
}));
|
|
1848
1866
|
this.subs.add(this.dataService.configuredFields
|
|
1849
1867
|
.subscribe(res => {
|
|
1850
|
-
|
|
1851
|
-
this.
|
|
1868
|
+
const normalizedState = clone(Object.assign(Object.assign({}, this.dataService.state), { dragItem: res.dragItem, dropTarget: res.dropTarget, dropZone: res.dropZone, dropDirection: res.dropDirection }));
|
|
1869
|
+
this.originalState = normalizedState;
|
|
1870
|
+
this.setState(normalizedState);
|
|
1852
1871
|
this.setChecked();
|
|
1853
1872
|
}));
|
|
1854
1873
|
this.subs.add(this.configuratorService.configuratorStateChange
|
|
1855
1874
|
.subscribe(res => {
|
|
1856
1875
|
this.state = res;
|
|
1876
|
+
this.dataService.state = this.dataService.state = {
|
|
1877
|
+
columnAxes: res.columnAxes,
|
|
1878
|
+
rowAxes: res.rowAxes,
|
|
1879
|
+
measureAxes: res.measureAxes,
|
|
1880
|
+
sort: res.sort,
|
|
1881
|
+
filter: res.filter
|
|
1882
|
+
};
|
|
1857
1883
|
this.cdr.detectChanges();
|
|
1858
1884
|
}));
|
|
1859
1885
|
}
|
|
@@ -1864,8 +1890,14 @@ class PivotGridConfiguratorComponent {
|
|
|
1864
1890
|
return name.toString();
|
|
1865
1891
|
}
|
|
1866
1892
|
setState(state) {
|
|
1867
|
-
this.state =
|
|
1868
|
-
|
|
1893
|
+
this.dataService.state = {
|
|
1894
|
+
columnAxes: state.columnAxes,
|
|
1895
|
+
rowAxes: state.rowAxes,
|
|
1896
|
+
measureAxes: state.measureAxes,
|
|
1897
|
+
sort: state.sort,
|
|
1898
|
+
filter: state.filter
|
|
1899
|
+
};
|
|
1900
|
+
this.state = this.configuratorService.state = state;
|
|
1869
1901
|
}
|
|
1870
1902
|
/**
|
|
1871
1903
|
* Returns the localized message for a given token
|
|
@@ -1877,23 +1909,34 @@ class PivotGridConfiguratorComponent {
|
|
|
1877
1909
|
* Retrieves the 'Columns' section item names
|
|
1878
1910
|
*/
|
|
1879
1911
|
get columnHierarchies() {
|
|
1880
|
-
return this.extractDefaultFields(this.state.columnAxes);
|
|
1912
|
+
return this.extractDefaultFields(this.dataService.state.columnAxes);
|
|
1881
1913
|
}
|
|
1882
1914
|
;
|
|
1883
1915
|
/**
|
|
1884
1916
|
* Retrieves the 'Rows' section item names
|
|
1885
1917
|
*/
|
|
1886
1918
|
get rowHierarchies() {
|
|
1887
|
-
return this.extractDefaultFields(this.state.rowAxes);
|
|
1919
|
+
return this.extractDefaultFields(this.dataService.state.rowAxes);
|
|
1888
1920
|
}
|
|
1889
1921
|
;
|
|
1890
1922
|
/**
|
|
1891
1923
|
* Retrieves the 'Value' section item names
|
|
1892
1924
|
*/
|
|
1893
1925
|
get measureHierarchies() {
|
|
1894
|
-
return this.extractDefaultFields(this.state.measureAxes);
|
|
1926
|
+
return this.extractDefaultFields(this.dataService.state.measureAxes);
|
|
1895
1927
|
}
|
|
1896
1928
|
;
|
|
1929
|
+
/**
|
|
1930
|
+
* Updates the respective axis configuration of the current state
|
|
1931
|
+
* when a chip is deleted from the UI
|
|
1932
|
+
*/
|
|
1933
|
+
onChipRemove(item, section) {
|
|
1934
|
+
const filteredItems = this.dataService.state[`${section}Axes`].filter(descriptor => descriptor !== item);
|
|
1935
|
+
this.dataService.state[`${section}Axes`] = filteredItems;
|
|
1936
|
+
const newState = Object.assign(Object.assign({}, this.state), this.dataService.state);
|
|
1937
|
+
this.checked = this.checked.filter(checkedItem => checkedItem.uniqueName !== item.name[0]);
|
|
1938
|
+
this.setState(newState);
|
|
1939
|
+
}
|
|
1897
1940
|
/**
|
|
1898
1941
|
* Constructs an array with all selected fields.
|
|
1899
1942
|
* @param fields - used for when child nodes are loaded on demand.
|
|
@@ -1954,7 +1997,7 @@ class PivotGridConfiguratorComponent {
|
|
|
1954
1997
|
this.configuratorService.parseConfiguratorState(action);
|
|
1955
1998
|
}
|
|
1956
1999
|
handleSubmit() {
|
|
1957
|
-
this.dataService.configuratorFieldChange.emit(this.state);
|
|
2000
|
+
this.dataService.configuratorFieldChange.emit(this.dataService.state);
|
|
1958
2001
|
}
|
|
1959
2002
|
/**
|
|
1960
2003
|
* Reset the configurator to the last saved state
|
|
@@ -1986,7 +2029,7 @@ class PivotGridConfiguratorComponent {
|
|
|
1986
2029
|
;
|
|
1987
2030
|
}
|
|
1988
2031
|
PivotGridConfiguratorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PivotGridConfiguratorComponent, deps: [{ token: PivotGridDataService }, { token: i1.LocalizationService }, { token: ConfiguratorService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
1989
|
-
PivotGridConfiguratorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: PivotGridConfiguratorComponent, selector: "kendo-pivotgrid-configurator", inputs: {
|
|
2032
|
+
PivotGridConfiguratorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: PivotGridConfiguratorComponent, selector: "kendo-pivotgrid-configurator", inputs: { orientation: "orientation", sort: "sort", filter: "filter" }, host: { properties: { "class.k-pivotgrid-configurator": "this.hostClass" } }, providers: [
|
|
1990
2033
|
ConfiguratorService,
|
|
1991
2034
|
DropCueService,
|
|
1992
2035
|
SinglePopupService
|
|
@@ -1994,8 +2037,8 @@ PivotGridConfiguratorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
|
1994
2037
|
<div
|
|
1995
2038
|
class="k-pivotgrid-configurator-panel k-pivotgrid-configurator-push"
|
|
1996
2039
|
[ngClass]="{
|
|
1997
|
-
'k-pivotgrid-configurator-horizontal':
|
|
1998
|
-
'k-pivotgrid-configurator-vertical': !
|
|
2040
|
+
'k-pivotgrid-configurator-horizontal': isHorizontal,
|
|
2041
|
+
'k-pivotgrid-configurator-vertical': !isHorizontal
|
|
1999
2042
|
}"
|
|
2000
2043
|
>
|
|
2001
2044
|
<div class="k-pivotgrid-configurator-header">
|
|
@@ -2003,7 +2046,7 @@ PivotGridConfiguratorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
|
2003
2046
|
</div>
|
|
2004
2047
|
|
|
2005
2048
|
<div class="k-pivotgrid-configurator-content">
|
|
2006
|
-
<div class="k-form" [class.k-form-horizontal]="
|
|
2049
|
+
<div class="k-form" [class.k-form-horizontal]="isHorizontal">
|
|
2007
2050
|
<div class="k-form-field-wrapper">
|
|
2008
2051
|
<div class="k-form-field">
|
|
2009
2052
|
<span class="k-label">{{messageFor('configuratorFieldsText')}}</span>
|
|
@@ -2034,7 +2077,7 @@ PivotGridConfiguratorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
|
2034
2077
|
</div>
|
|
2035
2078
|
</div>
|
|
2036
2079
|
|
|
2037
|
-
<div *ngIf="
|
|
2080
|
+
<div *ngIf="isHorizontal; else verticalTemplate" class="k-form-field-wrapper">
|
|
2038
2081
|
<ng-container *ngTemplateOutlet="verticalTemplate"></ng-container>
|
|
2039
2082
|
</div>
|
|
2040
2083
|
|
|
@@ -2048,21 +2091,22 @@ PivotGridConfiguratorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
|
2048
2091
|
kendoDropTarget
|
|
2049
2092
|
axes="columnAxes"
|
|
2050
2093
|
>
|
|
2051
|
-
<
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2094
|
+
<ng-container *ngFor="let item of state.columnAxes">
|
|
2095
|
+
<kendo-chip *ngIf="item.name.length === 1"
|
|
2096
|
+
kendoChipDraggable
|
|
2097
|
+
kendoDraggable
|
|
2098
|
+
kendoDropTarget
|
|
2099
|
+
[item]="item"
|
|
2100
|
+
axes="columnAxes"
|
|
2101
|
+
rounded="full"
|
|
2102
|
+
[removable]="true"
|
|
2103
|
+
(remove)="onChipRemove(item, 'column')"
|
|
2104
|
+
>{{ getName(item.name) }}
|
|
2105
|
+
<kendo-pivot-chip-menu
|
|
2106
|
+
[chip]="item">
|
|
2107
|
+
</kendo-pivot-chip-menu>
|
|
2108
|
+
</kendo-chip>
|
|
2109
|
+
</ng-container>
|
|
2066
2110
|
</kendo-chiplist>
|
|
2067
2111
|
|
|
2068
2112
|
<ng-template #noColumnAxes>
|
|
@@ -2078,21 +2122,24 @@ PivotGridConfiguratorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
|
2078
2122
|
kendoDropTarget
|
|
2079
2123
|
axes="rowAxes"
|
|
2080
2124
|
>
|
|
2081
|
-
<
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2125
|
+
<ng-container *ngFor="let item of state.rowAxes">
|
|
2126
|
+
<kendo-chip *ngIf="item.name.length === 1"
|
|
2127
|
+
kendoChipDraggable
|
|
2128
|
+
kendoDraggable
|
|
2129
|
+
kendoDropTarget
|
|
2130
|
+
[item]="item"
|
|
2131
|
+
axes="rowAxes"
|
|
2132
|
+
rounded="full"
|
|
2133
|
+
[removable]="true"
|
|
2134
|
+
(remove)="onChipRemove(item, 'row')"
|
|
2135
|
+
>
|
|
2136
|
+
{{ getName(item.name) }}
|
|
2137
|
+
|
|
2138
|
+
<kendo-pivot-chip-menu
|
|
2139
|
+
[chip]="item">
|
|
2140
|
+
</kendo-pivot-chip-menu>
|
|
2141
|
+
</kendo-chip>
|
|
2142
|
+
</ng-container>
|
|
2096
2143
|
</kendo-chiplist>
|
|
2097
2144
|
|
|
2098
2145
|
<ng-template #noRowAxes>
|
|
@@ -2100,11 +2147,11 @@ PivotGridConfiguratorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
|
2100
2147
|
</ng-template>
|
|
2101
2148
|
</ng-template>
|
|
2102
2149
|
|
|
2103
|
-
<div *ngIf="
|
|
2104
|
-
<ng-container *ngTemplateOutlet="
|
|
2150
|
+
<div *ngIf="isHorizontal; else verticalMeasuresTemplate" class="k-form-field-wrapper">
|
|
2151
|
+
<ng-container *ngTemplateOutlet="verticalMeasuresTemplate"></ng-container>
|
|
2105
2152
|
</div>
|
|
2106
2153
|
|
|
2107
|
-
<ng-template #
|
|
2154
|
+
<ng-template #verticalMeasuresTemplate>
|
|
2108
2155
|
<div class="k-form-field" kendoDropTarget axes="measureAxes">
|
|
2109
2156
|
<span class="k-label">{{messageFor('configuratorValuesText')}}</span>
|
|
2110
2157
|
</div>
|
|
@@ -2122,6 +2169,7 @@ PivotGridConfiguratorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
|
2122
2169
|
axes="measureAxes"
|
|
2123
2170
|
rounded="full"
|
|
2124
2171
|
[removable]="true"
|
|
2172
|
+
(remove)="onChipRemove(item, 'measure')"
|
|
2125
2173
|
>
|
|
2126
2174
|
{{ getName(item.name) }}
|
|
2127
2175
|
</kendo-chip>
|
|
@@ -2139,7 +2187,7 @@ PivotGridConfiguratorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
|
2139
2187
|
<button kendoButton themeColor="primary" type="button" (click)="handleSubmit()">{{messageFor('configuratorApplyButtonText')}}</button>
|
|
2140
2188
|
</div>
|
|
2141
2189
|
</div>
|
|
2142
|
-
`, isInline: true, components: [{ type: i4.TreeViewComponent, selector: "kendo-treeview", inputs: ["filterInputPlaceholder", "expandDisabledNodes", "animate", "nodeTemplate", "loadMoreButtonTemplate", "trackBy", "nodes", "textField", "hasChildren", "isChecked", "isDisabled", "isExpanded", "isSelected", "isVisible", "navigable", "children", "loadOnDemand", "filterable", "filter", "size", "disableParentNodesOnly"], outputs: ["childrenLoaded", "blur", "focus", "expand", "collapse", "nodeDragStart", "nodeDrag", "filterStateChange", "nodeDrop", "nodeDragEnd", "addItem", "removeItem", "checkedChange", "selectionChange", "filterChange", "nodeClick", "nodeDblClick"], exportAs: ["kendoTreeView"] }, { type: i5.ChipListComponent, selector: "kendo-chiplist, kendo-chip-list", inputs: ["selection", "size"], outputs: ["selectedChange", "remove"] }, { type: i5.ChipComponent, selector: "kendo-chip", inputs: ["label", "icon", "iconClass", "avatarClass", "selected", "removable", "removeIcon", "disabled", "size", "rounded", "fillMode", "themeColor"], outputs: ["remove", "contentClick"] }, { type: ChipMenuComponent, selector: "kendo-pivot-chip-menu", inputs: ["chip", "tabIndex"] }], directives: [{ type: i7.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { 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: i5.ButtonDirective, selector: "button[kendoButton], span[kendoButton]", inputs: ["toggleable", "togglable", "selected", "tabIndex", "icon", "iconClass", "imageUrl", "disabled", "size", "rounded", "fillMode", "themeColor", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }] });
|
|
2190
|
+
`, isInline: true, styles: ["\n .k-form .k-chip-list {\n width: 100%;\n }\n "], components: [{ type: i4.TreeViewComponent, selector: "kendo-treeview", inputs: ["filterInputPlaceholder", "expandDisabledNodes", "animate", "nodeTemplate", "loadMoreButtonTemplate", "trackBy", "nodes", "textField", "hasChildren", "isChecked", "isDisabled", "isExpanded", "isSelected", "isVisible", "navigable", "children", "loadOnDemand", "filterable", "filter", "size", "disableParentNodesOnly"], outputs: ["childrenLoaded", "blur", "focus", "expand", "collapse", "nodeDragStart", "nodeDrag", "filterStateChange", "nodeDrop", "nodeDragEnd", "addItem", "removeItem", "checkedChange", "selectionChange", "filterChange", "nodeClick", "nodeDblClick"], exportAs: ["kendoTreeView"] }, { type: i5.ChipListComponent, selector: "kendo-chiplist, kendo-chip-list", inputs: ["selection", "size"], outputs: ["selectedChange", "remove"] }, { type: i5.ChipComponent, selector: "kendo-chip", inputs: ["label", "icon", "iconClass", "avatarClass", "selected", "removable", "removeIcon", "disabled", "size", "rounded", "fillMode", "themeColor"], outputs: ["remove", "contentClick"] }, { type: ChipMenuComponent, selector: "kendo-pivot-chip-menu", inputs: ["chip", "tabIndex"] }], directives: [{ type: i7.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { 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: i5.ButtonDirective, selector: "button[kendoButton], span[kendoButton]", inputs: ["toggleable", "togglable", "selected", "tabIndex", "icon", "iconClass", "imageUrl", "disabled", "size", "rounded", "fillMode", "themeColor", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }] });
|
|
2143
2191
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PivotGridConfiguratorComponent, decorators: [{
|
|
2144
2192
|
type: Component,
|
|
2145
2193
|
args: [{
|
|
@@ -2153,8 +2201,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
2153
2201
|
<div
|
|
2154
2202
|
class="k-pivotgrid-configurator-panel k-pivotgrid-configurator-push"
|
|
2155
2203
|
[ngClass]="{
|
|
2156
|
-
'k-pivotgrid-configurator-horizontal':
|
|
2157
|
-
'k-pivotgrid-configurator-vertical': !
|
|
2204
|
+
'k-pivotgrid-configurator-horizontal': isHorizontal,
|
|
2205
|
+
'k-pivotgrid-configurator-vertical': !isHorizontal
|
|
2158
2206
|
}"
|
|
2159
2207
|
>
|
|
2160
2208
|
<div class="k-pivotgrid-configurator-header">
|
|
@@ -2162,7 +2210,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
2162
2210
|
</div>
|
|
2163
2211
|
|
|
2164
2212
|
<div class="k-pivotgrid-configurator-content">
|
|
2165
|
-
<div class="k-form" [class.k-form-horizontal]="
|
|
2213
|
+
<div class="k-form" [class.k-form-horizontal]="isHorizontal">
|
|
2166
2214
|
<div class="k-form-field-wrapper">
|
|
2167
2215
|
<div class="k-form-field">
|
|
2168
2216
|
<span class="k-label">{{messageFor('configuratorFieldsText')}}</span>
|
|
@@ -2193,7 +2241,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
2193
2241
|
</div>
|
|
2194
2242
|
</div>
|
|
2195
2243
|
|
|
2196
|
-
<div *ngIf="
|
|
2244
|
+
<div *ngIf="isHorizontal; else verticalTemplate" class="k-form-field-wrapper">
|
|
2197
2245
|
<ng-container *ngTemplateOutlet="verticalTemplate"></ng-container>
|
|
2198
2246
|
</div>
|
|
2199
2247
|
|
|
@@ -2207,21 +2255,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
2207
2255
|
kendoDropTarget
|
|
2208
2256
|
axes="columnAxes"
|
|
2209
2257
|
>
|
|
2210
|
-
<
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2258
|
+
<ng-container *ngFor="let item of state.columnAxes">
|
|
2259
|
+
<kendo-chip *ngIf="item.name.length === 1"
|
|
2260
|
+
kendoChipDraggable
|
|
2261
|
+
kendoDraggable
|
|
2262
|
+
kendoDropTarget
|
|
2263
|
+
[item]="item"
|
|
2264
|
+
axes="columnAxes"
|
|
2265
|
+
rounded="full"
|
|
2266
|
+
[removable]="true"
|
|
2267
|
+
(remove)="onChipRemove(item, 'column')"
|
|
2268
|
+
>{{ getName(item.name) }}
|
|
2269
|
+
<kendo-pivot-chip-menu
|
|
2270
|
+
[chip]="item">
|
|
2271
|
+
</kendo-pivot-chip-menu>
|
|
2272
|
+
</kendo-chip>
|
|
2273
|
+
</ng-container>
|
|
2225
2274
|
</kendo-chiplist>
|
|
2226
2275
|
|
|
2227
2276
|
<ng-template #noColumnAxes>
|
|
@@ -2237,21 +2286,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
2237
2286
|
kendoDropTarget
|
|
2238
2287
|
axes="rowAxes"
|
|
2239
2288
|
>
|
|
2240
|
-
<
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2289
|
+
<ng-container *ngFor="let item of state.rowAxes">
|
|
2290
|
+
<kendo-chip *ngIf="item.name.length === 1"
|
|
2291
|
+
kendoChipDraggable
|
|
2292
|
+
kendoDraggable
|
|
2293
|
+
kendoDropTarget
|
|
2294
|
+
[item]="item"
|
|
2295
|
+
axes="rowAxes"
|
|
2296
|
+
rounded="full"
|
|
2297
|
+
[removable]="true"
|
|
2298
|
+
(remove)="onChipRemove(item, 'row')"
|
|
2299
|
+
>
|
|
2300
|
+
{{ getName(item.name) }}
|
|
2301
|
+
|
|
2302
|
+
<kendo-pivot-chip-menu
|
|
2303
|
+
[chip]="item">
|
|
2304
|
+
</kendo-pivot-chip-menu>
|
|
2305
|
+
</kendo-chip>
|
|
2306
|
+
</ng-container>
|
|
2255
2307
|
</kendo-chiplist>
|
|
2256
2308
|
|
|
2257
2309
|
<ng-template #noRowAxes>
|
|
@@ -2259,11 +2311,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
2259
2311
|
</ng-template>
|
|
2260
2312
|
</ng-template>
|
|
2261
2313
|
|
|
2262
|
-
<div *ngIf="
|
|
2263
|
-
<ng-container *ngTemplateOutlet="
|
|
2314
|
+
<div *ngIf="isHorizontal; else verticalMeasuresTemplate" class="k-form-field-wrapper">
|
|
2315
|
+
<ng-container *ngTemplateOutlet="verticalMeasuresTemplate"></ng-container>
|
|
2264
2316
|
</div>
|
|
2265
2317
|
|
|
2266
|
-
<ng-template #
|
|
2318
|
+
<ng-template #verticalMeasuresTemplate>
|
|
2267
2319
|
<div class="k-form-field" kendoDropTarget axes="measureAxes">
|
|
2268
2320
|
<span class="k-label">{{messageFor('configuratorValuesText')}}</span>
|
|
2269
2321
|
</div>
|
|
@@ -2281,6 +2333,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
2281
2333
|
axes="measureAxes"
|
|
2282
2334
|
rounded="full"
|
|
2283
2335
|
[removable]="true"
|
|
2336
|
+
(remove)="onChipRemove(item, 'measure')"
|
|
2284
2337
|
>
|
|
2285
2338
|
{{ getName(item.name) }}
|
|
2286
2339
|
</kendo-chip>
|
|
@@ -2298,12 +2351,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
2298
2351
|
<button kendoButton themeColor="primary" type="button" (click)="handleSubmit()">{{messageFor('configuratorApplyButtonText')}}</button>
|
|
2299
2352
|
</div>
|
|
2300
2353
|
</div>
|
|
2301
|
-
|
|
2354
|
+
`,
|
|
2355
|
+
styles: [`
|
|
2356
|
+
.k-form .k-chip-list {
|
|
2357
|
+
width: 100%;
|
|
2358
|
+
}
|
|
2359
|
+
`]
|
|
2302
2360
|
}]
|
|
2303
2361
|
}], ctorParameters: function () { return [{ type: PivotGridDataService }, { type: i1.LocalizationService }, { type: ConfiguratorService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { hostClass: [{
|
|
2304
2362
|
type: HostBinding,
|
|
2305
2363
|
args: ['class.k-pivotgrid-configurator']
|
|
2306
|
-
}],
|
|
2364
|
+
}], orientation: [{
|
|
2307
2365
|
type: Input
|
|
2308
2366
|
}], sort: [{
|
|
2309
2367
|
type: Input
|
|
@@ -2420,7 +2478,7 @@ const DEFAULT_LOADER_SETTINGS = {
|
|
|
2420
2478
|
};
|
|
2421
2479
|
const DEFAULT_CONFIGURATOR_SETTINGS = {
|
|
2422
2480
|
position: 'right',
|
|
2423
|
-
|
|
2481
|
+
orientation: 'vertical'
|
|
2424
2482
|
};
|
|
2425
2483
|
/**
|
|
2426
2484
|
* Represents the Kendo UI PivotGrid component for Angular.
|
|
@@ -2577,9 +2635,12 @@ class PivotGridComponent {
|
|
|
2577
2635
|
if (firstCell) {
|
|
2578
2636
|
firstCell.setAttribute('tabindex', '0');
|
|
2579
2637
|
}
|
|
2580
|
-
|
|
2581
|
-
|
|
2582
|
-
|
|
2638
|
+
if (!this.navigationSubs) {
|
|
2639
|
+
this.navigationSubs = this.dataService.directive.expandChange.pipe(merge(this.dataService.directive.configurationChange)).subscribe(() => this.zone.runOutsideAngular(() => {
|
|
2640
|
+
setTimeout(() => this.navigation.update());
|
|
2641
|
+
}));
|
|
2642
|
+
this.subs.add(this.navigationSubs);
|
|
2643
|
+
}
|
|
2583
2644
|
}
|
|
2584
2645
|
stopNavigation() {
|
|
2585
2646
|
if (this.navigation) {
|
|
@@ -2727,7 +2788,7 @@ PivotGridComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ver
|
|
|
2727
2788
|
|
|
2728
2789
|
<kendo-pivotgrid-configurator
|
|
2729
2790
|
*ngIf="showConfigurator"
|
|
2730
|
-
[
|
|
2791
|
+
[orientation]="configuratorSettings.orientation">
|
|
2731
2792
|
</kendo-pivotgrid-configurator>
|
|
2732
2793
|
|
|
2733
2794
|
<div *ngIf="configurator"
|
|
@@ -2736,7 +2797,7 @@ PivotGridComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ver
|
|
|
2736
2797
|
<span>{{messageFor('configuratorButtonText')}}<span class="k-icon k-i-gear k-color-inherit"></span>
|
|
2737
2798
|
</span>
|
|
2738
2799
|
</div>
|
|
2739
|
-
`, isInline: true, styles: ["\n /** TODO: Remove if added to themes */\n div.k-loader {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n }\n "], components: [{ type: PivotGridTableComponent, selector: "kendo-pivotgrid-table", inputs: ["tableType", "colWidth"] }, { type: i5$1.LoaderComponent, selector: "kendo-loader", inputs: ["type", "themeColor", "size"] }, { type: PivotGridConfiguratorComponent, selector: "kendo-pivotgrid-configurator", inputs: ["
|
|
2800
|
+
`, isInline: true, styles: ["\n /** TODO: Remove if added to themes */\n div.k-loader {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n }\n "], components: [{ type: PivotGridTableComponent, selector: "kendo-pivotgrid-table", inputs: ["tableType", "colWidth"] }, { type: i5$1.LoaderComponent, selector: "kendo-loader", inputs: ["type", "themeColor", "size"] }, { type: PivotGridConfiguratorComponent, selector: "kendo-pivotgrid-configurator", inputs: ["orientation", "sort", "filter"] }], directives: [{ type: LocalizedMessagesDirective, selector: "[kendoPivotGridLocalizedMessages]" }, { type: i7.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
2740
2801
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PivotGridComponent, decorators: [{
|
|
2741
2802
|
type: Component,
|
|
2742
2803
|
args: [{
|
|
@@ -2877,7 +2938,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
2877
2938
|
|
|
2878
2939
|
<kendo-pivotgrid-configurator
|
|
2879
2940
|
*ngIf="showConfigurator"
|
|
2880
|
-
[
|
|
2941
|
+
[orientation]="configuratorSettings.orientation">
|
|
2881
2942
|
</kendo-pivotgrid-configurator>
|
|
2882
2943
|
|
|
2883
2944
|
<div *ngIf="configurator"
|
|
@@ -2943,19 +3004,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
2943
3004
|
type: Input
|
|
2944
3005
|
}] } });
|
|
2945
3006
|
|
|
2946
|
-
/**
|
|
2947
|
-
* @hidden
|
|
2948
|
-
*/
|
|
2949
|
-
class PivotGridState {
|
|
2950
|
-
constructor(columnAxes, rowAxes, measureAxes, sort, filter) {
|
|
2951
|
-
this.columnAxes = columnAxes;
|
|
2952
|
-
this.rowAxes = rowAxes;
|
|
2953
|
-
this.measureAxes = measureAxes;
|
|
2954
|
-
this.sort = sort;
|
|
2955
|
-
this.filter = filter;
|
|
2956
|
-
}
|
|
2957
|
-
}
|
|
2958
|
-
|
|
2959
3007
|
/**
|
|
2960
3008
|
* The event data for the ExpandChangeEvent
|
|
2961
3009
|
*/
|
|
@@ -3025,14 +3073,9 @@ class PivotBaseBindingDirective {
|
|
|
3025
3073
|
this.dataLoaded = new EventEmitter();
|
|
3026
3074
|
this.subs = new Subscription();
|
|
3027
3075
|
}
|
|
3028
|
-
/**
|
|
3029
|
-
* @hidden
|
|
3030
|
-
*/
|
|
3031
|
-
get state() {
|
|
3032
|
-
return new PivotGridState(this.columnAxes, this.rowAxes, this.measureAxes, this.sort, this.filter);
|
|
3033
|
-
}
|
|
3034
3076
|
ngOnInit() {
|
|
3035
|
-
this.
|
|
3077
|
+
this.dataService.state = new PivotGridState(this.columnAxes, this.rowAxes, this.measureAxes, this.sort, this.filter);
|
|
3078
|
+
this.loadData(this.dataService.state);
|
|
3036
3079
|
this.loadFields();
|
|
3037
3080
|
this.subs.add(this.dataService.expandedStateChange.subscribe((state) => {
|
|
3038
3081
|
this.zone.run(() => {
|
|
@@ -3052,14 +3095,9 @@ class PivotBaseBindingDirective {
|
|
|
3052
3095
|
return;
|
|
3053
3096
|
}
|
|
3054
3097
|
}
|
|
3055
|
-
this.dataService.configuredFields.next(
|
|
3056
|
-
columnAxes: state.columnAxes,
|
|
3057
|
-
rowAxes: state.rowAxes,
|
|
3058
|
-
measureAxes: state.measureAxes,
|
|
3059
|
-
sort: state.sort,
|
|
3060
|
-
filter: state.filter
|
|
3061
|
-
});
|
|
3098
|
+
this.dataService.configuredFields.next(this.dataService.state);
|
|
3062
3099
|
this.loadData(state);
|
|
3100
|
+
this.dataService.state = state;
|
|
3063
3101
|
});
|
|
3064
3102
|
}));
|
|
3065
3103
|
this.subs.add(this.dataService.valuesRows.subscribe((data) => {
|
|
@@ -3080,13 +3118,7 @@ class PivotBaseBindingDirective {
|
|
|
3080
3118
|
}
|
|
3081
3119
|
updateConfiguratorFields() {
|
|
3082
3120
|
this.dataService.fields.next(this.configuratorFields);
|
|
3083
|
-
this.dataService.configuredFields.next(
|
|
3084
|
-
columnAxes: this.columnAxes,
|
|
3085
|
-
rowAxes: this.rowAxes,
|
|
3086
|
-
measureAxes: this.measureAxes,
|
|
3087
|
-
sort: this.sort,
|
|
3088
|
-
filter: this.filter
|
|
3089
|
-
});
|
|
3121
|
+
this.dataService.configuredFields.next(this.dataService.state);
|
|
3090
3122
|
}
|
|
3091
3123
|
updateHeaders(axes, tree, path) {
|
|
3092
3124
|
// Action to determine expand/collapse state
|
|
@@ -3098,16 +3130,18 @@ class PivotBaseBindingDirective {
|
|
|
3098
3130
|
// the expanded state based on the toggle action (expand/collapse)
|
|
3099
3131
|
// Update axes and reload data
|
|
3100
3132
|
const newHeaders = headersReducer(this[axes].slice(), Object.assign(Object.assign({}, action), { tree }));
|
|
3133
|
+
const newState = Object.assign(Object.assign({}, this.dataService.state), { [axes]: newHeaders });
|
|
3134
|
+
this.dataService.state = newState;
|
|
3101
3135
|
if (hasObservers(this.expandChange)) {
|
|
3102
|
-
const newState = Object.assign(Object.assign({}, this.state), { [axes]: newHeaders });
|
|
3103
3136
|
const event = new ExpandChangeEvent(newState);
|
|
3104
3137
|
this.expandChange.emit(event);
|
|
3105
3138
|
if (event.isDefaultPrevented()) {
|
|
3106
3139
|
return;
|
|
3107
3140
|
}
|
|
3108
3141
|
}
|
|
3142
|
+
this.dataService.configuredFields.next(this.dataService.state);
|
|
3109
3143
|
this[axes] = newHeaders;
|
|
3110
|
-
this.loadData(this.state);
|
|
3144
|
+
this.loadData(this.dataService.state);
|
|
3111
3145
|
}
|
|
3112
3146
|
;
|
|
3113
3147
|
}
|
|
@@ -3151,7 +3185,7 @@ class PivotLocalBindingDirective extends PivotBaseBindingDirective {
|
|
|
3151
3185
|
}
|
|
3152
3186
|
ngOnChanges(changes) {
|
|
3153
3187
|
if (anyChanged(['data', 'dimensions', 'columnAxes', 'rowAxes', 'measureAxes', 'measures'], changes)) {
|
|
3154
|
-
this.loadData(this.state);
|
|
3188
|
+
this.loadData(this.dataService.state);
|
|
3155
3189
|
}
|
|
3156
3190
|
}
|
|
3157
3191
|
/**
|
|
@@ -3215,7 +3249,7 @@ class PivotOLAPBindingDirective extends PivotBaseBindingDirective {
|
|
|
3215
3249
|
}
|
|
3216
3250
|
ngOnChanges(changes) {
|
|
3217
3251
|
if (anyChanged(['url', 'cube', 'catalog', 'columnAxes', 'rowAxes', 'measureAxes'], changes)) {
|
|
3218
|
-
this.loadData(this.state);
|
|
3252
|
+
this.loadData(this.dataService.state);
|
|
3219
3253
|
this.loadFields();
|
|
3220
3254
|
}
|
|
3221
3255
|
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**-----------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
|
+
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
+
*-------------------------------------------------------------------------------------------*/
|
|
5
|
+
/**
|
|
6
|
+
* Defines the layout orientation of the Configurator.
|
|
7
|
+
*
|
|
8
|
+
* @default 'vertical'
|
|
9
|
+
*/
|
|
10
|
+
export declare type PivotGridConfiguratorOrientation = 'horizontal' | 'vertical';
|