@progress/kendo-angular-pivotgrid 0.1.0

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 (38) hide show
  1. package/LICENSE.md +11 -0
  2. package/NOTICE.txt +654 -0
  3. package/README.md +31 -0
  4. package/bundles/kendo-angular-pivotgrid.umd.js +5 -0
  5. package/data-binding/base-binding-directive.d.ts +38 -0
  6. package/data-binding/local-binding.directive.d.ts +35 -0
  7. package/data-binding/olap-binding.directive.d.ts +30 -0
  8. package/data-binding/pivotgrid-data.service.d.ts +38 -0
  9. package/esm2015/data-binding/base-binding-directive.js +81 -0
  10. package/esm2015/data-binding/local-binding.directive.js +66 -0
  11. package/esm2015/data-binding/olap-binding.directive.js +57 -0
  12. package/esm2015/data-binding/pivotgrid-data.service.js +42 -0
  13. package/esm2015/kendo-angular-pivotgrid.js +8 -0
  14. package/esm2015/main.js +14 -0
  15. package/esm2015/models/expanded-state-action.js +5 -0
  16. package/esm2015/models/loader-settings.js +5 -0
  17. package/esm2015/package-metadata.js +15 -0
  18. package/esm2015/pivotgrid.component.js +152 -0
  19. package/esm2015/pivotgrid.module.js +60 -0
  20. package/esm2015/rendering/pivotgrid-cell.directive.js +90 -0
  21. package/esm2015/rendering/pivotgrid-table.component.js +89 -0
  22. package/esm2015/util.js +49 -0
  23. package/fesm2015/kendo-angular-pivotgrid.js +639 -0
  24. package/kendo-angular-pivotgrid.d.ts +9 -0
  25. package/main.d.ts +11 -0
  26. package/models/expanded-state-action.d.ts +16 -0
  27. package/models/loader-settings.d.ts +47 -0
  28. package/package-metadata.d.ts +9 -0
  29. package/package.json +86 -0
  30. package/pivotgrid.component.d.ts +39 -0
  31. package/pivotgrid.module.d.ts +21 -0
  32. package/rendering/pivotgrid-cell.directive.d.ts +26 -0
  33. package/rendering/pivotgrid-table.component.d.ts +22 -0
  34. package/schematics/collection.json +12 -0
  35. package/schematics/ngAdd/index.js +17 -0
  36. package/schematics/ngAdd/index.js.map +1 -0
  37. package/schematics/ngAdd/schema.json +28 -0
  38. package/util.d.ts +18 -0
package/README.md ADDED
@@ -0,0 +1,31 @@
1
+ <a href="https://www.telerik.com/kendo-angular-ui/" target="_blank">
2
+ <img width="631" src="https://www.telerik.com/kendo-angular-ui/npm-banner.svg">
3
+ </a>
4
+
5
+ ## Native UI and Data Visualization Components for Angular
6
+
7
+ Kendo UI for Angular is a commercial UI library designed and built for developing business applications with Angular. Every UI component in the Kendo UI for Angular suite has been built from the ground-up specifically for Angular.
8
+
9
+ > **Important**
10
+ > * This package is part of the [Kendo UI for Angular](https://www.telerik.com/kendo-angular-ui/)&mdash;a commercial UI library.
11
+ > * You will need to install a license key when adding the package to your project. For more information, please refer to the [My License page](https://www.telerik.com/kendo-angular-ui/my-license/).
12
+ > * To receive a license key, you need to either [purchase a license](https://www.telerik.com/purchase/kendo-ui/) or register for a [free trial](https://www.telerik.com/download-login-v2-kendo-angular-ui). Doing so indicates that you [Kendo UI for Angular License Agreement](https://www.telerik.com/purchase/license-agreement/kendo-ui).
13
+ > * The 30-day free trial gives you access to all the Kendo UI for Angular components and their full functionality. Additionally, for the period of your license, you get access to our legendary technical support provided directly by the Kendo UI dev team!
14
+
15
+ ## Resources
16
+
17
+ * [Get Started with Kendo UI for Angular (requires trial registration)](https://www.telerik.com/kendo-angular-ui/getting-started)
18
+ * [Demos, documentation, and component reference](https://www.telerik.com/kendo-angular-ui/components)
19
+ * [Blogs](http://www.telerik.com/blogs/kendo-ui)
20
+ * [Kendo UI for Angular pricing and licensing](https://www.telerik.com/purchase/kendo-ui)
21
+
22
+ ## Questions and Feedback
23
+
24
+ * [Official Forums](https://www.telerik.com/forums/kendo-angular-ui)
25
+ * [GitHub Issues](https://github.com/telerik/kendo-angular/issues)
26
+ * [Feedback Portal](https://feedback.telerik.com/kendo-angular-ui)
27
+ * [StackOverflow](https://stackoverflow.com/questions/tagged/kendo-ui-angular2)
28
+
29
+ *Copyright © 2022 Progress Software Corporation and/or one of its subsidiaries or affiliates. All rights reserved.*
30
+
31
+ *Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries.*
@@ -0,0 +1,5 @@
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
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@progress/kendo-licensing"),require("@progress/kendo-angular-common"),require("@progress/kendo-pivotgrid-common"),require("rxjs"),require("@angular/common"),require("@progress/kendo-angular-indicators"),require("@progress/kendo-angular-l10n")):"function"==typeof define&&define.amd?define("KendoAngularPivotgrid",["exports","@angular/core","@progress/kendo-licensing","@progress/kendo-angular-common","@progress/kendo-pivotgrid-common","rxjs","@angular/common","@progress/kendo-angular-indicators","@progress/kendo-angular-l10n"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).KendoAngularPivotgrid={},e.ng.core,e.KendoLicensing,e.KendoAngularCommon,e.KendoPivotgridCommon,e.rxjs,e.ng.common,e.KendoAngularIndicators,e.KendoAngularL10N)}(this,function(e,t,o,n,s,i,r,a,l){"use strict";function d(n){if(n&&n.__esModule)return n;var o=Object.create(null);return n&&Object.keys(n).forEach(function(e){var t;"default"!==e&&(t=Object.getOwnPropertyDescriptor(n,e),Object.defineProperty(o,e,t.get?t:{enumerable:!0,get:function(){return n[e]}}))}),o.default=n,Object.freeze(o)}function V(){var e;return null===v&&n.isDocumentAvailable()&&document.createElement&&((e=document.createElement("div")).style.cssText="overflow:scroll;overflow-x:hidden;zoom:1;clear:both;display:block",e.innerHTML="&nbsp;",document.body.appendChild(e),v=e.offsetWidth-e.scrollWidth,document.body.removeChild(e)),v}var c=d(t),p=d(n),u=d(r),g=d(a),N={name:"@progress/kendo-angular-pivotgrid",productName:"Kendo UI for Angular",productCodes:["KENDOUIANGULAR","KENDOUICOMPLETE"],publishDate:1652189168,version:"",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"},v=null,m=function(e,t){return(m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function h(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}m(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}Object.create;function y(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var o,r,i=n.call(e),a=[];try{for(;(void 0===t||0<t--)&&!(o=i.next()).done;)a.push(o.value)}catch(e){r={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return a}function f(e,t,n){if(n||2===arguments.length)for(var o,r=0,i=t.length;r<i;r++)!o&&r in t||((o=o||Array.prototype.slice.call(t,0,r))[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}Object.create;k.prototype.updateRowsAndCols=function(){var e=s.toTree((this.rows||[]).slice()),e=y(s.toRows(e),4),t=e[0],n=e[1],o=e[2],e=e[3],r=s.toTree((this.columns||[]).slice()),r=y(s.toColumns(r),3),i=r[0],a=r[1],r=r[2];this.columnHeaderLeaves=a,this.columnHeaderCols.next(new Array(r).fill({})),this.columnHeaderRows.next(i),this.rowHeaderLeaves=n,this.rowHeaderCols.next(new Array(e).fill({})),this.rowHeaderRows.next(t),this.valuesRows.next(s.toData((this.normalizedData||[]).slice(),a,n,r,o))};var b=k;function k(){this.expandedStateChange=new t.EventEmitter,this.columnHeaderRows=new i.BehaviorSubject([]),this.columnHeaderCols=new i.BehaviorSubject([]),this.rowHeaderCols=new i.BehaviorSubject([]),this.rowHeaderRows=new i.BehaviorSubject([]),this.valuesRows=new i.BehaviorSubject([]),this.loading=new i.BehaviorSubject(!1)}b.ɵfac=c.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:c,type:b,deps:[],target:c.ɵɵFactoryTarget.Injectable}),b.ɵprov=c.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"12.2.16",ngImport:c,type:b}),c.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:c,type:b,decorators:[{type:t.Injectable}],propDecorators:{expandedStateChange:[{type:t.Output}]}});Object.defineProperty(x.prototype,"expanded",{get:function(){var e;return(null==(e=this.kendoPivotGridCell)?void 0:e.hasChildren)&&this.kendoPivotGridCell.children.length},enumerable:!1,configurable:!0}),x.prototype.ngOnInit=function(){var e,t=this.hostEl.nativeElement,n=(this.renderer.setAttribute(t,"rowspan",this.kendoPivotGridCell.rowSpan||1),this.renderer.setAttribute(t,"colspan",this.kendoPivotGridCell.colSpan||1),{"k-pivotgrid-header-total":this.kendoPivotGridCell.total||"values"===this.tableType&&(this.dataService.rowHeaderLeaves[this.rowIndex].total||this.dataService.columnHeaderLeaves[this.colIndex].total),"k-pivotgrid-header-root":0===this.kendoPivotGridCell.levelNum,"k-pivotgrid-expanded":this.kendoPivotGridCell.hasChildren&&this.kendoPivotGridCell.children.length,"k-first":1===this.colIndex});for(e in n)n[e]&&this.renderer.addClass(t,e)};var I=x;function x(e,t,n){var o=this;this.hostEl=e,this.renderer=t,this.dataService=n,this.cellClass=!0,this.handleClick=function(){o.dataService.expandedStateChange.emit({action:o.expanded?"collapse":"expand",cell:o.kendoPivotGridCell,tableType:o.tableType})}}I.ɵfac=c.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:c,type:I,deps:[{token:c.ElementRef},{token:c.Renderer2},{token:b}],target:c.ɵɵFactoryTarget.Component}),I.ɵcmp=c.ɵɵngDeclareComponent({minVersion:"12.0.0",version:"12.2.16",type:I,selector:"[kendoPivotGridCell]",inputs:{kendoPivotGridCell:"kendoPivotGridCell",tableType:"tableType",rowIndex:"rowIndex",colIndex:"colIndex"},host:{properties:{"class.k-pivotgrid-cell":"this.cellClass"}},ngImport:c,template:'\n <span \n *ngIf="kendoPivotGridCell.hasChildren && !kendoPivotGridCell.total"\n class="k-icon"\n [kendoEventsOutsideAngular]="{\n click: handleClick\n }"\n [ngClass]="{\n \'k-i-arrow-chevron-up\': expanded,\n \'k-i-arrow-chevron-down\': !expanded\n }"></span>{{ kendoPivotGridCell.data ? kendoPivotGridCell.data.fmtValue : kendoPivotGridCell.caption }}',isInline:!0,directives:[{type:u.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]},{type:p.EventsOutsideAngularDirective,selector:"[kendoEventsOutsideAngular]",inputs:["kendoEventsOutsideAngular","scope"]},{type:u.NgClass,selector:"[ngClass]",inputs:["class","ngClass"]}]}),c.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:c,type:I,decorators:[{type:t.Component,args:[{selector:"[kendoPivotGridCell]",template:'\n <span \n *ngIf="kendoPivotGridCell.hasChildren && !kendoPivotGridCell.total"\n class="k-icon"\n [kendoEventsOutsideAngular]="{\n click: handleClick\n }"\n [ngClass]="{\n \'k-i-arrow-chevron-up\': expanded,\n \'k-i-arrow-chevron-down\': !expanded\n }"></span>{{ kendoPivotGridCell.data ? kendoPivotGridCell.data.fmtValue : kendoPivotGridCell.caption }}'}]}],ctorParameters:function(){return[{type:c.ElementRef},{type:c.Renderer2},{type:b}]},propDecorators:{cellClass:[{type:t.HostBinding,args:["class.k-pivotgrid-cell"]}],kendoPivotGridCell:[{type:t.Input}],tableType:[{type:t.Input}],rowIndex:[{type:t.Input}],colIndex:[{type:t.Input}]}});C.prototype.ngOnInit=function(){var t=this;this.dataChangeSubs.add(this.dataService[this.tableType+"Rows"].subscribe(function(e){return t.rows=e})),this.dataChangeSubs.add("values"===this.tableType?this.dataService.columnHeaderCols.subscribe(function(e){return t.headerItems=e}):this.dataService[this.tableType+"Cols"].subscribe(function(e){return t.headerItems=e}))},C.prototype.ngOnDestroy=function(){this.dataChangeSubs.unsubscribe()};p=C;function C(e){this.dataService=e,this.dataChangeSubs=new i.Subscription}p.ɵfac=c.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:c,type:p,deps:[{token:b}],target:c.ɵɵFactoryTarget.Component}),p.ɵcmp=c.ɵɵngDeclareComponent({minVersion:"12.0.0",version:"12.2.16",type:p,selector:"kendo-pivotgrid-table",inputs:{tableType:"tableType"},ngImport:c,template:'\n <table class="k-pivotgrid-table">\n <colgroup>\n <col *ngFor="let item of headerItems;" />\n </colgroup>\n <tbody class="k-pivotgrid-tbody">\n <tr *ngFor="let row of rows; index as rowIndex"\n class="k-pivotgrid-row">\n <ng-container *ngFor="let cell of row.cells; index as colIndex">\n <th\n *ngIf="cell && tableType !== \'values\'" \n [kendoPivotGridCell]="cell"\n [tableType]="tableType"\n [colIndex]="colIndex"\n [rowIndex]="rowIndex"></th>\n <td\n *ngIf="cell && tableType === \'values\'"\n [kendoPivotGridCell]="cell"\n tableType="values"\n [colIndex]="colIndex"\n [rowIndex]="rowIndex"></td>\n </ng-container>\n </tr>\n </tbody>\n </table>\n ',isInline:!0,components:[{type:I,selector:"[kendoPivotGridCell]",inputs:["kendoPivotGridCell","tableType","rowIndex","colIndex"]}],directives:[{type:u.NgForOf,selector:"[ngFor][ngForOf]",inputs:["ngForOf","ngForTrackBy","ngForTemplate"]},{type:u.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]}]}),c.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:c,type:p,decorators:[{type:t.Component,args:[{selector:"kendo-pivotgrid-table",template:'\n <table class="k-pivotgrid-table">\n <colgroup>\n <col *ngFor="let item of headerItems;" />\n </colgroup>\n <tbody class="k-pivotgrid-tbody">\n <tr *ngFor="let row of rows; index as rowIndex"\n class="k-pivotgrid-row">\n <ng-container *ngFor="let cell of row.cells; index as colIndex">\n <th\n *ngIf="cell && tableType !== \'values\'" \n [kendoPivotGridCell]="cell"\n [tableType]="tableType"\n [colIndex]="colIndex"\n [rowIndex]="rowIndex"></th>\n <td\n *ngIf="cell && tableType === \'values\'"\n [kendoPivotGridCell]="cell"\n tableType="values"\n [colIndex]="colIndex"\n [rowIndex]="rowIndex"></td>\n </ng-container>\n </tr>\n </tbody>\n </table>\n '}]}],ctorParameters:function(){return[{type:b}]},propDecorators:{tableType:[{type:t.Input}]}});var w={type:"converging-spinner",themeColor:"primary",size:"large"},A=(Object.defineProperty(S.prototype,"scrollbarWidth",{get:function(){return V()+"px"},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"loaderSettings",{get:function(){return this._loaderSettings},set:function(e){this._loaderSettings=Object.assign({},w,e)},enumerable:!1,configurable:!0}),S.prototype.ngAfterViewInit=function(){var r=this;n.isDocumentAvailable()&&this.zone.runOutsideAngular(function(){var e=document.querySelector(".k-pivotgrid-row-headers .k-pivotgrid-table"),t=new ResizeObserver(function(){return r.resizeContainer("Columns",e)}),n=(t.observe(e),document.querySelector(".k-pivotgrid-column-headers .k-pivotgrid-table")),o=new ResizeObserver(function(){return r.resizeContainer("Rows",n)});o.observe(n),r.resizeObservers=[t,o]})},S.prototype.ngAfterContentInit=function(){var t=this;this.loadingSubscription.add(this.dataService.loading.subscribe(function(e){return t.loading=e}))},S.prototype.ngOnDestroy=function(){this.resizeObservers.forEach(function(e){return e.disconnect()}),this.loadingSubscription.unsubscribe()},S);function S(e,t,n){var r=this;this.hostEl=e,this.zone=t,this.dataService=n,this.hostClass=!0,this.resizeObservers=[],this._loaderSettings=w,this.loadingSubscription=new i.Subscription,this.resizeContainer=function(e,t){var n=r.hostEl.nativeElement,o="Rows"===e?"offsetHeight":"offsetWidth";n.style["gridTemplate"+e]="",n.style["gridTemplate"+e]=t[o]+"px 1fr"},o.validatePackage(N)}A.ɵfac=c.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:c,type:A,deps:[{token:c.ElementRef},{token:c.NgZone},{token:b}],target:c.ɵɵFactoryTarget.Component}),A.ɵcmp=c.ɵɵngDeclareComponent({minVersion:"12.0.0",version:"12.2.16",type:A,selector:"kendo-pivotgrid",inputs:{loaderSettings:"loaderSettings"},host:{properties:{"class.k-pivotgrid":"this.hostClass","style.--kendo-scrollbar-width":"this.scrollbarWidth"}},providers:[b],ngImport:c,template:'\n <span class="k-pivotgrid-empty-cell"></span>\n <kendo-pivotgrid-table\n class="k-pivotgrid-column-headers"\n tableType="columnHeader"></kendo-pivotgrid-table>\n <kendo-pivotgrid-table\n class="k-pivotgrid-row-headers"\n tableType="rowHeader"></kendo-pivotgrid-table>\n <kendo-pivotgrid-table\n class="k-pivotgrid-values"\n tableType="values"></kendo-pivotgrid-table>\n\n <div *ngIf="loading" class="k-loader">\n <kendo-loader\n [type]="loaderSettings?.type"\n [themeColor]="loaderSettings?.themeColor"\n [size]="loaderSettings?.size"\n >\n </kendo-loader>\n </div>\n ',isInline:!0,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:p,selector:"kendo-pivotgrid-table",inputs:["tableType"]},{type:g.LoaderComponent,selector:"kendo-loader",inputs:["type","themeColor","size"]}],directives:[{type:u.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]}]}),c.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:c,type:A,decorators:[{type:t.Component,args:[{selector:"kendo-pivotgrid",providers:[b],template:'\n <span class="k-pivotgrid-empty-cell"></span>\n <kendo-pivotgrid-table\n class="k-pivotgrid-column-headers"\n tableType="columnHeader"></kendo-pivotgrid-table>\n <kendo-pivotgrid-table\n class="k-pivotgrid-row-headers"\n tableType="rowHeader"></kendo-pivotgrid-table>\n <kendo-pivotgrid-table\n class="k-pivotgrid-values"\n tableType="values"></kendo-pivotgrid-table>\n\n <div *ngIf="loading" class="k-loader">\n <kendo-loader\n [type]="loaderSettings?.type"\n [themeColor]="loaderSettings?.themeColor"\n [size]="loaderSettings?.size"\n >\n </kendo-loader>\n </div>\n ',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 "]}]}],ctorParameters:function(){return[{type:c.ElementRef},{type:c.NgZone},{type:b}]},propDecorators:{hostClass:[{type:t.HostBinding,args:["class.k-pivotgrid"]}],scrollbarWidth:[{type:t.HostBinding,args:["style.--kendo-scrollbar-width"]}],loaderSettings:[{type:t.Input}]}});P.prototype.ngOnInit=function(){var o=this;this.loadData(),this.expandedStateSub=this.dataService.expandedStateChange.subscribe(function(n){o.zone.run(function(){var e="columnHeader"===n.tableType,t=e?"columnAxes":"rowAxes",e=s.toTree((e?o.dataService.columns:o.dataService.rows||[]).slice());o.updateHeaders(t,e,n.cell.path)})})},P.prototype.ngOnDestroy=function(){this.expandedStateSub.unsubscribe()},P.prototype.updateDataServiceFields=function(){this.dataService.normalizedData=this.dataState.data,this.dataService.rows=this.dataState.rows,this.dataService.columns=this.dataState.columns,this.dataService.updateRowsAndCols()},P.prototype.updateHeaders=function(e,t,n){n={type:s.HEADERS_ACTION.toggle,payload:n},n=s.headersReducer(this[e].slice(),Object.assign(Object.assign({},n),{tree:t}));this[e]=n,this.loadData()};g=P;function P(e,t){this.dataService=e,this.zone=t,this.columnAxes=[],this.rowAxes=[],this.measureAxes=[],this.expandedStateSub=new i.Subscription}g.ɵfac=c.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:c,type:g,deps:[{token:b},{token:c.NgZone}],target:c.ɵɵFactoryTarget.Directive}),g.ɵdir=c.ɵɵngDeclareDirective({minVersion:"12.0.0",version:"12.2.16",type:g,selector:"kendo-base-binding-directive",inputs:{columnAxes:"columnAxes",rowAxes:"rowAxes",measureAxes:"measureAxes"},ngImport:c}),c.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:c,type:g,decorators:[{type:t.Directive,args:[{selector:"kendo-base-binding-directive"}]}],ctorParameters:function(){return[{type:b},{type:c.NgZone}]},propDecorators:{columnAxes:[{type:t.Input}],rowAxes:[{type:t.Input}],measureAxes:[{type:t.Input}]}});var D,O={dataField:"aggregate",columnsData:"columns"},u=(h(T,D=g),T.prototype.ngOnChanges=function(e){n.anyChanged(["data","dimensions","columnAxes","rowAxes","measureAxes","measures"],e)&&this.loadData()},T.prototype.loadData=function(){var e=this,t=this.getRootAxes(this.columnAxes),n=this.getRootAxes(this.rowAxes),t=t.split("&").map(this.createAxisSettings),n=n.split("&").map(this.createAxisSettings),o=this.measureAxes.map(function(t){return e.measures.find(function(e){return String(e.name)===String(t.name)})}).filter(Boolean),r=s.createDataTree(this.data,n,t,o,O);this.dataState=s.createLocalDataState({dataTree:r,rowSettings:n,columnSettings:t,rowAxes:this.rowAxes,columnAxes:this.columnAxes,measures:o,sort:[],fields:O}),this.updateDataServiceFields()},T.prototype.getRootAxes=function(e){return Array.from(s.rootFields(e).keys()).join("&")},T);function T(e,t){var n=D.call(this,e,t)||this;return n.createAxisSettings=function(e){return Object.assign({key:e},n.dimensions[e])},n}u.ɵfac=c.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:c,type:u,deps:[{token:b},{token:c.NgZone}],target:c.ɵɵFactoryTarget.Directive}),u.ɵdir=c.ɵɵngDeclareDirective({minVersion:"12.0.0",version:"12.2.16",type:u,selector:"[kendoPivotLocalBinding]",inputs:{data:["kendoPivotLocalBinding","data"],dimensions:"dimensions",measures:"measures"},exportAs:["kendoPivotLocalBinding"],usesInheritance:!0,usesOnChanges:!0,ngImport:c}),c.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:c,type:u,decorators:[{type:t.Directive,args:[{selector:"[kendoPivotLocalBinding]",exportAs:"kendoPivotLocalBinding"}]}],ctorParameters:function(){return[{type:b},{type:c.NgZone}]},propDecorators:{data:[{type:t.Input,args:["kendoPivotLocalBinding"]}],dimensions:[{type:t.Input}],measures:[{type:t.Input}]}});h(E,j=g),E.prototype.ngOnChanges=function(e){n.anyChanged(["url","cube","catalog","columnAxes","rowAxes","measureAxes"],e)&&this.loadData()},E.prototype.loadData=function(){var t=this,e=(this.dataService.loading.next(!0),{connection:{catalog:this.catalog,cube:this.cube},columnAxes:this.columnAxes,rowAxes:this.rowAxes,measureAxes:this.measureAxes});s.fetchData({url:this.url},JSON.parse(JSON.stringify(e))).then(s.createDataState).then(function(e){t.dataState=e,t.updateDataServiceFields(),t.dataService.loading.next(!1)})};var j,g=E;function E(e,t){return j.call(this,e,t)||this}g.ɵfac=c.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:c,type:g,deps:[{token:b},{token:c.NgZone}],target:c.ɵɵFactoryTarget.Directive}),g.ɵdir=c.ɵɵngDeclareDirective({minVersion:"12.0.0",version:"12.2.16",type:g,selector:"[kendoPivotOLAPBinding]",inputs:{url:"url",cube:"cube",catalog:"catalog"},exportAs:["kendoPivotOLAPBinding"],usesInheritance:!0,usesOnChanges:!0,ngImport:c}),c.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:c,type:g,decorators:[{type:t.Directive,args:[{selector:"[kendoPivotOLAPBinding]",exportAs:"kendoPivotOLAPBinding"}]}],ctorParameters:function(){return[{type:b},{type:c.NgZone}]},propDecorators:{url:[{type:t.Input}],cube:[{type:t.Input}],catalog:[{type:t.Input}]}});var F=[r.CommonModule,n.EventsModule,a.IndicatorsModule],G=[A,p,I,u,g],R=function(){};R.ɵfac=c.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:c,type:R,deps:[],target:c.ɵɵFactoryTarget.NgModule}),R.ɵmod=c.ɵɵngDeclareNgModule({minVersion:"12.0.0",version:"12.2.16",ngImport:c,type:R,declarations:[A,p,I,u,g],imports:[r.CommonModule,n.EventsModule,a.IndicatorsModule],exports:[A,p,I,u,g]}),R.ɵinj=c.ɵɵngDeclareInjector({minVersion:"12.0.0",version:"12.2.16",ngImport:c,type:R,providers:[{provide:l.L10N_PREFIX,useValue:"kendo.pivotgrid"}],imports:[f([],y(F))]}),c.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:c,type:R,decorators:[{type:t.NgModule,args:[{imports:f([],y(F)),declarations:f([],y(G)),exports:f([],y(G)),providers:[{provide:l.L10N_PREFIX,useValue:"kendo.pivotgrid"}]}]}]}),Object.defineProperty(e,"averageAggregate",{enumerable:!0,get:function(){return s.averageAggregate}}),Object.defineProperty(e,"maxAggregate",{enumerable:!0,get:function(){return s.maxAggregate}}),Object.defineProperty(e,"minAggregate",{enumerable:!0,get:function(){return s.minAggregate}}),Object.defineProperty(e,"sumAggregate",{enumerable:!0,get:function(){return s.sumAggregate}}),e.PivotGridCellDirective=I,e.PivotGridComponent=A,e.PivotGridModule=R,e.PivotGridTableComponent=p,e.PivotLocalBindingDirective=u,e.PivotOLAPBindingDirective=g,Object.defineProperty(e,"__esModule",{value:!0})});
@@ -0,0 +1,38 @@
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
+ import { NgZone } from '@angular/core';
6
+ import { PivotGridDataService } from './pivotgrid-data.service';
7
+ import { DataState, PivotGridAxis } from '@progress/kendo-pivotgrid-common';
8
+ import * as i0 from "@angular/core";
9
+ /**
10
+ * @hidden
11
+ * A directive which binds the PivotGrid to an array of objects.
12
+ */
13
+ export declare abstract class PivotBaseBindingDirective {
14
+ protected dataService: PivotGridDataService;
15
+ private zone;
16
+ protected abstract loadData(): void;
17
+ /**
18
+ * Represents the column axes configuration of the PivotGrid.
19
+ */
20
+ columnAxes: PivotGridAxis[];
21
+ /**
22
+ * Represents the row axes configuration of the PivotGrid.
23
+ */
24
+ rowAxes: PivotGridAxis[];
25
+ /**
26
+ * Represents the measure axes configuration of the PivotGrid.
27
+ */
28
+ measureAxes: PivotGridAxis[];
29
+ protected dataState: DataState;
30
+ private expandedStateSub;
31
+ constructor(dataService: PivotGridDataService, zone: NgZone);
32
+ ngOnInit(): void;
33
+ ngOnDestroy(): void;
34
+ protected updateDataServiceFields(): void;
35
+ private updateHeaders;
36
+ static ɵfac: i0.ɵɵFactoryDeclaration<PivotBaseBindingDirective, never>;
37
+ static ɵdir: i0.ɵɵDirectiveDeclaration<PivotBaseBindingDirective, "kendo-base-binding-directive", never, { "columnAxes": "columnAxes"; "rowAxes": "rowAxes"; "measureAxes": "measureAxes"; }, {}, never>;
38
+ }
@@ -0,0 +1,35 @@
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
+ import { NgZone, SimpleChanges } from '@angular/core';
6
+ import { PivotGridDataService } from './pivotgrid-data.service';
7
+ import { Dimension, Measure } from '@progress/kendo-pivotgrid-common';
8
+ import { PivotBaseBindingDirective } from './base-binding-directive';
9
+ import * as i0 from "@angular/core";
10
+ /**
11
+ * A directive which binds the PivotGrid to local data ([see example]({% slug directives_databinding_local_pivotgrid %})).
12
+ */
13
+ export declare class PivotLocalBindingDirective extends PivotBaseBindingDirective {
14
+ /**
15
+ * The array of data which will be used to populate the PivotGrid.
16
+ */
17
+ data: any[];
18
+ /**
19
+ * Represents the dimensions object of the PivotGrid.
20
+ */
21
+ dimensions: {
22
+ [key: string]: Dimension;
23
+ };
24
+ /**
25
+ * Represents the measures collection of the PivotGrid.
26
+ */
27
+ measures: Measure[];
28
+ constructor(dataService: PivotGridDataService, zone: NgZone);
29
+ ngOnChanges(changes: SimpleChanges): void;
30
+ protected loadData(): void;
31
+ private createAxisSettings;
32
+ private getRootAxes;
33
+ static ɵfac: i0.ɵɵFactoryDeclaration<PivotLocalBindingDirective, never>;
34
+ static ɵdir: i0.ɵɵDirectiveDeclaration<PivotLocalBindingDirective, "[kendoPivotLocalBinding]", ["kendoPivotLocalBinding"], { "data": "kendoPivotLocalBinding"; "dimensions": "dimensions"; "measures": "measures"; }, {}, never>;
35
+ }
@@ -0,0 +1,30 @@
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
+ import { NgZone, SimpleChanges } from '@angular/core';
6
+ import { PivotGridDataService } from './pivotgrid-data.service';
7
+ import { PivotBaseBindingDirective } from './base-binding-directive';
8
+ import * as i0 from "@angular/core";
9
+ /**
10
+ * A directive which binds the PivotGrid to data using an Online Analytical Processing (OLAP) service ([see example]({% slug directives_databinding_remote_pivotgrid %})).
11
+ */
12
+ export declare class PivotOLAPBindingDirective extends PivotBaseBindingDirective {
13
+ /**
14
+ * The OLAP service endpoint where the data is processed and retrieved to render the pivot table.
15
+ */
16
+ url: string;
17
+ /**
18
+ * The cube name that is used to retrieve data for the pivot table rendering.
19
+ */
20
+ cube: string;
21
+ /**
22
+ * The database name that is used to retrieve the data from the specified connection string.
23
+ */
24
+ catalog: string;
25
+ constructor(dataService: PivotGridDataService, zone: NgZone);
26
+ ngOnChanges(changes: SimpleChanges): void;
27
+ protected loadData(): void;
28
+ static ɵfac: i0.ɵɵFactoryDeclaration<PivotOLAPBindingDirective, never>;
29
+ static ɵdir: i0.ɵɵDirectiveDeclaration<PivotOLAPBindingDirective, "[kendoPivotOLAPBinding]", ["kendoPivotOLAPBinding"], { "url": "url"; "cube": "cube"; "catalog": "catalog"; }, {}, never>;
30
+ }
@@ -0,0 +1,38 @@
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
+ import { EventEmitter } from '@angular/core';
6
+ import { PivotDataItem, Tuple } from '@progress/kendo-pivotgrid-common';
7
+ import { BehaviorSubject } from 'rxjs';
8
+ import { ExpandedStateChangeEvent } from '../models/expanded-state-action';
9
+ import * as i0 from "@angular/core";
10
+ /**
11
+ * @hidden
12
+ */
13
+ export declare class PivotGridDataService {
14
+ expandedStateChange: EventEmitter<ExpandedStateChangeEvent>;
15
+ normalizedData: any[];
16
+ rows: Tuple[];
17
+ columns: Tuple[];
18
+ columnHeaderLeaves: {
19
+ total: boolean;
20
+ path: string[];
21
+ }[];
22
+ columnHeaderRows: BehaviorSubject<any[]>;
23
+ columnHeaderCols: BehaviorSubject<any[]>;
24
+ rowHeaderLeaves: {
25
+ total: boolean;
26
+ path: string[];
27
+ }[];
28
+ rowHeaderCols: BehaviorSubject<any[]>;
29
+ rowHeaderRows: BehaviorSubject<any[]>;
30
+ valuesRows: BehaviorSubject<{
31
+ row: string[];
32
+ cells: PivotDataItem[];
33
+ }[]>;
34
+ loading: BehaviorSubject<boolean>;
35
+ updateRowsAndCols(): void;
36
+ static ɵfac: i0.ɵɵFactoryDeclaration<PivotGridDataService, never>;
37
+ static ɵprov: i0.ɵɵInjectableDeclaration<PivotGridDataService>;
38
+ }
@@ -0,0 +1,81 @@
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
+ import { Directive, Input } from '@angular/core';
6
+ import { headersReducer, HEADERS_ACTION, toTree } from '@progress/kendo-pivotgrid-common';
7
+ import { Subscription } from 'rxjs';
8
+ import * as i0 from "@angular/core";
9
+ import * as i1 from "./pivotgrid-data.service";
10
+ /**
11
+ * @hidden
12
+ * A directive which binds the PivotGrid to an array of objects.
13
+ */
14
+ export class PivotBaseBindingDirective {
15
+ constructor(dataService, zone) {
16
+ this.dataService = dataService;
17
+ this.zone = zone;
18
+ /**
19
+ * Represents the column axes configuration of the PivotGrid.
20
+ */
21
+ this.columnAxes = [];
22
+ /**
23
+ * Represents the row axes configuration of the PivotGrid.
24
+ */
25
+ this.rowAxes = [];
26
+ /**
27
+ * Represents the measure axes configuration of the PivotGrid.
28
+ */
29
+ this.measureAxes = [];
30
+ this.expandedStateSub = new Subscription();
31
+ }
32
+ ngOnInit() {
33
+ this.loadData();
34
+ this.expandedStateSub = this.dataService.expandedStateChange.subscribe((state) => {
35
+ this.zone.run(() => {
36
+ const isCol = state.tableType === 'columnHeader';
37
+ const axes = isCol ? 'columnAxes' : 'rowAxes';
38
+ // Converts current rows state to a tree-like structure (using the PivotGrid Common pkg)
39
+ const tree = toTree((isCol ? this.dataService.columns : this.dataService.rows || []).slice());
40
+ this.updateHeaders(axes, tree, state.cell.path);
41
+ });
42
+ });
43
+ }
44
+ ngOnDestroy() {
45
+ this.expandedStateSub.unsubscribe();
46
+ }
47
+ updateDataServiceFields() {
48
+ this.dataService.normalizedData = this.dataState.data;
49
+ this.dataService.rows = this.dataState.rows;
50
+ this.dataService.columns = this.dataState.columns;
51
+ this.dataService.updateRowsAndCols();
52
+ }
53
+ updateHeaders(axes, tree, path) {
54
+ // Action to determine expand/collapse state
55
+ const action = {
56
+ type: HEADERS_ACTION.toggle,
57
+ payload: path
58
+ };
59
+ // The `headersReducer` method is responsible for udpating
60
+ // the expanded state based on the toggle action (expand/collapse)
61
+ const newHeaders = headersReducer(this[axes].slice(), Object.assign(Object.assign({}, action), { tree }));
62
+ // Update axes and reload data
63
+ this[axes] = newHeaders;
64
+ this.loadData();
65
+ }
66
+ ;
67
+ }
68
+ PivotBaseBindingDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PivotBaseBindingDirective, deps: [{ token: i1.PivotGridDataService }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Directive });
69
+ PivotBaseBindingDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: PivotBaseBindingDirective, selector: "kendo-base-binding-directive", inputs: { columnAxes: "columnAxes", rowAxes: "rowAxes", measureAxes: "measureAxes" }, ngImport: i0 });
70
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PivotBaseBindingDirective, decorators: [{
71
+ type: Directive,
72
+ args: [{
73
+ selector: 'kendo-base-binding-directive'
74
+ }]
75
+ }], ctorParameters: function () { return [{ type: i1.PivotGridDataService }, { type: i0.NgZone }]; }, propDecorators: { columnAxes: [{
76
+ type: Input
77
+ }], rowAxes: [{
78
+ type: Input
79
+ }], measureAxes: [{
80
+ type: Input
81
+ }] } });
@@ -0,0 +1,66 @@
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
+ import { Directive, Input } from '@angular/core';
6
+ import { createDataTree, createLocalDataState, rootFields } from '@progress/kendo-pivotgrid-common';
7
+ import { anyChanged } from '@progress/kendo-angular-common';
8
+ import { PivotBaseBindingDirective } from './base-binding-directive';
9
+ import * as i0 from "@angular/core";
10
+ import * as i1 from "./pivotgrid-data.service";
11
+ const dataField = 'aggregate';
12
+ const columnsData = 'columns';
13
+ const bindingFields = { dataField, columnsData };
14
+ const stringSeparator = '&';
15
+ /**
16
+ * A directive which binds the PivotGrid to local data ([see example]({% slug directives_databinding_local_pivotgrid %})).
17
+ */
18
+ export class PivotLocalBindingDirective extends PivotBaseBindingDirective {
19
+ constructor(dataService, zone) {
20
+ super(dataService, zone);
21
+ this.createAxisSettings = (key) => (Object.assign({ key }, this.dimensions[key]));
22
+ }
23
+ ngOnChanges(changes) {
24
+ if (anyChanged(['data', 'dimensions', 'columnAxes', 'rowAxes', 'measureAxes', 'measures'], changes)) {
25
+ this.loadData();
26
+ }
27
+ }
28
+ loadData() {
29
+ const rootColumnAxes = this.getRootAxes(this.columnAxes);
30
+ const rootRowAxes = this.getRootAxes(this.rowAxes);
31
+ const columnSettings = rootColumnAxes.split(stringSeparator).map(this.createAxisSettings);
32
+ const rowSettings = rootRowAxes.split(stringSeparator).map(this.createAxisSettings);
33
+ const measuresSettings = this.measureAxes.map(m => this.measures.find(meas => String(meas.name) === String(m.name))).filter(Boolean);
34
+ const dataTree = createDataTree(this.data, rowSettings, columnSettings, measuresSettings, bindingFields);
35
+ this.dataState = createLocalDataState({
36
+ dataTree,
37
+ rowSettings,
38
+ columnSettings,
39
+ rowAxes: this.rowAxes,
40
+ columnAxes: this.columnAxes,
41
+ measures: measuresSettings,
42
+ sort: [],
43
+ fields: bindingFields
44
+ });
45
+ this.updateDataServiceFields();
46
+ }
47
+ getRootAxes(axes) {
48
+ return Array.from(rootFields(axes).keys()).join(stringSeparator);
49
+ }
50
+ }
51
+ PivotLocalBindingDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PivotLocalBindingDirective, deps: [{ token: i1.PivotGridDataService }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Directive });
52
+ PivotLocalBindingDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: PivotLocalBindingDirective, selector: "[kendoPivotLocalBinding]", inputs: { data: ["kendoPivotLocalBinding", "data"], dimensions: "dimensions", measures: "measures" }, exportAs: ["kendoPivotLocalBinding"], usesInheritance: true, usesOnChanges: true, ngImport: i0 });
53
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PivotLocalBindingDirective, decorators: [{
54
+ type: Directive,
55
+ args: [{
56
+ selector: '[kendoPivotLocalBinding]',
57
+ exportAs: 'kendoPivotLocalBinding'
58
+ }]
59
+ }], ctorParameters: function () { return [{ type: i1.PivotGridDataService }, { type: i0.NgZone }]; }, propDecorators: { data: [{
60
+ type: Input,
61
+ args: ['kendoPivotLocalBinding']
62
+ }], dimensions: [{
63
+ type: Input
64
+ }], measures: [{
65
+ type: Input
66
+ }] } });
@@ -0,0 +1,57 @@
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
+ import { Directive, Input } from '@angular/core';
6
+ import { createDataState, fetchData } from '@progress/kendo-pivotgrid-common';
7
+ import { anyChanged } from '@progress/kendo-angular-common';
8
+ import { PivotBaseBindingDirective } from './base-binding-directive';
9
+ import * as i0 from "@angular/core";
10
+ import * as i1 from "./pivotgrid-data.service";
11
+ /**
12
+ * A directive which binds the PivotGrid to data using an Online Analytical Processing (OLAP) service ([see example]({% slug directives_databinding_remote_pivotgrid %})).
13
+ */
14
+ export class PivotOLAPBindingDirective extends PivotBaseBindingDirective {
15
+ constructor(dataService, zone) {
16
+ super(dataService, zone);
17
+ }
18
+ ngOnChanges(changes) {
19
+ if (anyChanged(['url', 'cube', 'catalog', 'columnAxes', 'rowAxes', 'measureAxes'], changes)) {
20
+ this.loadData();
21
+ }
22
+ }
23
+ loadData() {
24
+ this.dataService.loading.next(true);
25
+ const options = {
26
+ connection: {
27
+ catalog: this.catalog,
28
+ cube: this.cube
29
+ },
30
+ columnAxes: this.columnAxes,
31
+ rowAxes: this.rowAxes,
32
+ measureAxes: this.measureAxes
33
+ };
34
+ fetchData({ url: this.url }, JSON.parse(JSON.stringify(options)))
35
+ .then(createDataState)
36
+ .then(newDataState => {
37
+ this.dataState = newDataState;
38
+ this.updateDataServiceFields();
39
+ this.dataService.loading.next(false);
40
+ });
41
+ }
42
+ }
43
+ PivotOLAPBindingDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PivotOLAPBindingDirective, deps: [{ token: i1.PivotGridDataService }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Directive });
44
+ PivotOLAPBindingDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: PivotOLAPBindingDirective, selector: "[kendoPivotOLAPBinding]", inputs: { url: "url", cube: "cube", catalog: "catalog" }, exportAs: ["kendoPivotOLAPBinding"], usesInheritance: true, usesOnChanges: true, ngImport: i0 });
45
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PivotOLAPBindingDirective, decorators: [{
46
+ type: Directive,
47
+ args: [{
48
+ selector: '[kendoPivotOLAPBinding]',
49
+ exportAs: 'kendoPivotOLAPBinding'
50
+ }]
51
+ }], ctorParameters: function () { return [{ type: i1.PivotGridDataService }, { type: i0.NgZone }]; }, propDecorators: { url: [{
52
+ type: Input
53
+ }], cube: [{
54
+ type: Input
55
+ }], catalog: [{
56
+ type: Input
57
+ }] } });
@@ -0,0 +1,42 @@
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
+ import { EventEmitter, Injectable, Output } from '@angular/core';
6
+ import { toColumns, toData, toRows, toTree } from '@progress/kendo-pivotgrid-common';
7
+ import { BehaviorSubject } from 'rxjs';
8
+ import * as i0 from "@angular/core";
9
+ /**
10
+ * @hidden
11
+ */
12
+ export class PivotGridDataService {
13
+ constructor() {
14
+ this.expandedStateChange = new EventEmitter();
15
+ this.columnHeaderRows = new BehaviorSubject([]);
16
+ this.columnHeaderCols = new BehaviorSubject([]);
17
+ this.rowHeaderCols = new BehaviorSubject([]);
18
+ this.rowHeaderRows = new BehaviorSubject([]);
19
+ this.valuesRows = new BehaviorSubject([]);
20
+ this.loading = new BehaviorSubject(false);
21
+ }
22
+ updateRowsAndCols() {
23
+ const rowsTree = toTree((this.rows || []).slice());
24
+ const [rowHeaderRows, rowHeaderLeaves, rowHeaderDepth, rowHeaderBreadth] = toRows(rowsTree);
25
+ const columnsTree = toTree((this.columns || []).slice());
26
+ const [columnHeaderRows, columnHeaderLeaves, columnHeaderBreadth] = toColumns(columnsTree);
27
+ this.columnHeaderLeaves = columnHeaderLeaves;
28
+ this.columnHeaderCols.next(new Array(columnHeaderBreadth).fill({}));
29
+ this.columnHeaderRows.next(columnHeaderRows);
30
+ this.rowHeaderLeaves = rowHeaderLeaves;
31
+ this.rowHeaderCols.next(new Array(rowHeaderBreadth).fill({}));
32
+ this.rowHeaderRows.next(rowHeaderRows);
33
+ this.valuesRows.next(toData((this.normalizedData || []).slice(), columnHeaderLeaves, rowHeaderLeaves, columnHeaderBreadth, rowHeaderDepth));
34
+ }
35
+ }
36
+ PivotGridDataService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PivotGridDataService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
37
+ PivotGridDataService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PivotGridDataService });
38
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PivotGridDataService, decorators: [{
39
+ type: Injectable
40
+ }], propDecorators: { expandedStateChange: [{
41
+ type: Output
42
+ }] } });
@@ -0,0 +1,8 @@
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
+ * Generated bundle index. Do not edit.
7
+ */
8
+ export * from './main';
@@ -0,0 +1,14 @@
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
+ export { PivotGridComponent } from './pivotgrid.component';
6
+ export { PivotGridModule } from './pivotgrid.module';
7
+ // Unsupported private class
8
+ export { PivotGridCellDirective } from './rendering/pivotgrid-cell.directive';
9
+ export { PivotGridTableComponent } from './rendering/pivotgrid-table.component';
10
+ // Data-binding directives
11
+ export { PivotLocalBindingDirective } from './data-binding/local-binding.directive';
12
+ export { PivotOLAPBindingDirective } from './data-binding/olap-binding.directive';
13
+ // Export types from PivotGrid common package
14
+ export { averageAggregate, maxAggregate, minAggregate, sumAggregate } from '@progress/kendo-pivotgrid-common';
@@ -0,0 +1,5 @@
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
+ export {};
@@ -0,0 +1,5 @@
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
+ export {};
@@ -0,0 +1,15 @@
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
+ * @hidden
7
+ */
8
+ export const packageMetadata = {
9
+ name: '@progress/kendo-angular-pivotgrid',
10
+ productName: 'Kendo UI for Angular',
11
+ productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
12
+ publishDate: 1652189168,
13
+ version: '',
14
+ 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'
15
+ };