@progress/kendo-angular-pivotgrid 0.1.5-dev.202205170847 → 0.2.0-dev.202208181233

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.
@@ -2,4 +2,4 @@
2
2
  * Copyright © 2021 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
- !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("rxjs/operators"),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","rxjs/operators","@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.rxjs.operators,e.ng.common,e.KendoAngularIndicators,e.KendoAngularL10N)}(this,function(e,t,G,n,s,a,V,r,o,i){"use strict";function l(n){if(n&&n.__esModule)return n;var r=Object.create(null);return n&&Object.keys(n).forEach(function(e){var t;"default"!==e&&(t=Object.getOwnPropertyDescriptor(n,e),Object.defineProperty(r,e,t.get?t:{enumerable:!0,get:function(){return n[e]}}))}),r.default=n,Object.freeze(r)}var d=l(t),c=l(n),p=l(r),u=l(o),N={name:"@progress/kendo-angular-pivotgrid",productName:"Kendo UI for Angular",productCodes:["KENDOUIANGULAR","KENDOUICOMPLETE"],publishDate:1652777244,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"},g=function(e,t){return(g=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 v(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}g(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}Object.create;function m(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,a=n.call(e),i=[];try{for(;(void 0===t||0<t--)&&!(r=a.next()).done;)i.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(o)throw o.error}}return i}function h(e,t,n){if(n||2===arguments.length)for(var r,o=0,a=t.length;o<a;o++)!r&&o in t||((r=r||Array.prototype.slice.call(t,0,o))[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}Object.create;f.prototype.updateRowsAndCols=function(){var e=s.toTree((this.rows||[]).slice()),e=m(s.toRows(e),4),t=e[0],n=e[1],r=e[2],e=e[3],o=s.toTree((this.columns||[]).slice()),o=m(s.toColumns(o),3),a=o[0],i=o[1],o=o[2];this.columnHeaderLeaves=i,this.columnHeaderCols.next(i),this.columnHeaderRows.next(a),this.rowHeaderLeaves=n,this.rowHeaderCols.next(new Array(e).fill({})),this.rowHeaderRows.next(t),this.valuesRows.next(s.toData((this.normalizedData||[]).slice(),i,n,o,r))};var y=f;function f(){this.expandedStateChange=new t.EventEmitter,this.columnHeaderRows=new a.BehaviorSubject([]),this.columnHeaderCols=new a.BehaviorSubject([]),this.rowHeaderCols=new a.BehaviorSubject([]),this.rowHeaderRows=new a.BehaviorSubject([]),this.valuesRows=new a.BehaviorSubject([]),this.loading=new a.BehaviorSubject(!1)}y.ɵfac=d.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:d,type:y,deps:[],target:d.ɵɵFactoryTarget.Injectable}),y.ɵprov=d.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"12.2.16",ngImport:d,type:y}),d.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:d,type:y,decorators:[{type:t.Injectable}],propDecorators:{expandedStateChange:[{type:t.Output}]}});function b(e,t,n,r){(e="Y"===r?-k(e,r):k(e,r))&&(t[0][n]=t[1][n]+=e)}var k=function(e,t){var n=e["wheelDelta"+t];return e.wheelDelta&&(void 0===n||n)?e.wheelDelta:e.detail&&e.axis===e["X"===t?"HORIZONTAL_AXIS":"VERTICAL_AXIS"]?10*-e.detail:0},I=(Object.defineProperty(C.prototype,"expanded",{get:function(){var e;return(null==(e=this.kendoPivotGridCell)?void 0:e.hasChildren)&&this.kendoPivotGridCell.children.length},enumerable:!1,configurable:!0}),C.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":0<this.colIndex});for(e in n)n[e]&&this.renderer.addClass(t,e)},C);function C(e,t,n){var r=this;this.hostEl=e,this.renderer=t,this.dataService=n,this.cellClass=!0,this.handleClick=function(){r.dataService.expandedStateChange.emit({action:r.expanded?"collapse":"expand",cell:r.kendoPivotGridCell,tableType:r.tableType})}}I.ɵfac=d.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:d,type:I,deps:[{token:d.ElementRef},{token:d.Renderer2},{token:y}],target:d.ɵɵFactoryTarget.Component}),I.ɵcmp=d.ɵɵ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:d,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:p.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]},{type:c.EventsOutsideAngularDirective,selector:"[kendoEventsOutsideAngular]",inputs:["kendoEventsOutsideAngular","scope"]},{type:p.NgClass,selector:"[ngClass]",inputs:["class","ngClass"]}]}),d.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:d,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:d.ElementRef},{type:d.Renderer2},{type:y}]},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}]}});w.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}))},w.prototype.ngOnDestroy=function(){this.dataChangeSubs.unsubscribe()};var x=w;function w(e){this.dataService=e,this.dataChangeSubs=new a.Subscription}x.ɵfac=d.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:d,type:x,deps:[{token:y}],target:d.ɵɵFactoryTarget.Component}),x.ɵcmp=d.ɵɵngDeclareComponent({minVersion:"12.0.0",version:"12.2.16",type:x,selector:"kendo-pivotgrid-table",inputs:{tableType:"tableType"},ngImport:d,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:p.NgForOf,selector:"[ngFor][ngForOf]",inputs:["ngForOf","ngForTrackBy","ngForTemplate"]},{type:p.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]}]}),d.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:d,type:x,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:y}]},propDecorators:{tableType:[{type:t.Input}]}});var T={type:"converging-spinner",themeColor:"primary",size:"large"},S=(Object.defineProperty(A.prototype,"loaderSettings",{get:function(){return this._loaderSettings},set:function(e){this._loaderSettings=Object.assign({},T,e)},enumerable:!1,configurable:!0}),A.prototype.ngAfterViewInit=function(){var o=this;n.isDocumentAvailable()&&this.zone.runOutsideAngular(function(){var e=o.rowHeadersTable.nativeElement.firstElementChild,t=new ResizeObserver(function(){return o.resizeContainer("Columns",e)}),n=(t.observe(e),o.colHeadersTable.nativeElement.firstElementChild),r=new ResizeObserver(function(){return o.resizeContainer("Rows",n)});r.observe(n),o.resizeObservers=[t,r],o.subs.add(a.fromEvent(e,"wheel").pipe(V.merge(a.fromEvent(n,"wheel"),a.fromEvent(o.valuesTable.nativeElement,"scroll"))).subscribe(function(e){return o.handleScroll(e)}))})},A.prototype.ngAfterContentInit=function(){var t=this;this.subs.add(this.dataService.loading.subscribe(function(e){return t.loading=e}))},A.prototype.ngOnDestroy=function(){this.resizeObservers.forEach(function(e){return e.disconnect()}),this.subs.unsubscribe()},A);function A(e,t,n,r){var i=this;this.hostEl=e,this.zone=t,this.dataService=n,this.hostClass=!0,this.resizeObservers=[],this._loaderSettings=T,this.subs=new a.Subscription,this.resizeContainer=function(e,t){var n=i.hostEl.nativeElement,r="Rows"===e?"offsetHeight":"offsetWidth";n.style["gridTemplate"+e]="",n.style["gridTemplate"+e]=t[r]+"px 1fr"},this.handleScroll=function(e){var t,n,r,o,a;e.target===i.valuesTable.nativeElement?(t=e.target,n=[i.rowHeadersTable.nativeElement,i.colHeadersTable.nativeElement],r=t.scrollTop,t=t.scrollLeft,o=n[0].scrollTop,a=t!==n[1].scrollLeft,r!==o?n[0].scrollTop=r:a&&(n[1].scrollLeft=t)):e.target.closest(".k-pivotgrid-row-headers")?b(e,[i.valuesTable.nativeElement,i.rowHeadersTable.nativeElement],"scrollTop","Y"):e.target.closest(".k-pivotgrid-column-headers")&&b(e,[i.valuesTable.nativeElement,i.colHeadersTable.nativeElement],"scrollLeft","X")},G.validatePackage(N)}S.ɵfac=d.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:d,type:S,deps:[{token:d.ElementRef},{token:d.NgZone},{token:y},{token:c.ScrollbarWidthService}],target:d.ɵɵFactoryTarget.Component}),S.ɵcmp=d.ɵɵngDeclareComponent({minVersion:"12.0.0",version:"12.2.16",type:S,selector:"kendo-pivotgrid",inputs:{loaderSettings:"loaderSettings"},host:{properties:{"class.k-pivotgrid":"this.hostClass"}},providers:[y],viewQueries:[{propertyName:"colHeadersTable",first:!0,predicate:["colHeadersTable"],descendants:!0,read:t.ElementRef},{propertyName:"rowHeadersTable",first:!0,predicate:["rowHeadersTable"],descendants:!0,read:t.ElementRef},{propertyName:"valuesTable",first:!0,predicate:["valuesTable"],descendants:!0,read:t.ElementRef}],ngImport:d,template:'\n <span class="k-pivotgrid-empty-cell"></span>\n <kendo-pivotgrid-table\n #colHeadersTable\n class="k-pivotgrid-column-headers"\n tableType="columnHeader"></kendo-pivotgrid-table>\n <kendo-pivotgrid-table\n #rowHeadersTable\n class="k-pivotgrid-row-headers"\n tableType="rowHeader"></kendo-pivotgrid-table>\n <kendo-pivotgrid-table\n #valuesTable\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:x,selector:"kendo-pivotgrid-table",inputs:["tableType"]},{type:u.LoaderComponent,selector:"kendo-loader",inputs:["type","themeColor","size"]}],directives:[{type:p.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]}]}),d.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:d,type:S,decorators:[{type:t.Component,args:[{selector:"kendo-pivotgrid",providers:[y],template:'\n <span class="k-pivotgrid-empty-cell"></span>\n <kendo-pivotgrid-table\n #colHeadersTable\n class="k-pivotgrid-column-headers"\n tableType="columnHeader"></kendo-pivotgrid-table>\n <kendo-pivotgrid-table\n #rowHeadersTable\n class="k-pivotgrid-row-headers"\n tableType="rowHeader"></kendo-pivotgrid-table>\n <kendo-pivotgrid-table\n #valuesTable\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:d.ElementRef},{type:d.NgZone},{type:y},{type:c.ScrollbarWidthService}]},propDecorators:{hostClass:[{type:t.HostBinding,args:["class.k-pivotgrid"]}],colHeadersTable:[{type:t.ViewChild,args:["colHeadersTable",{read:t.ElementRef}]}],rowHeadersTable:[{type:t.ViewChild,args:["rowHeadersTable",{read:t.ElementRef}]}],valuesTable:[{type:t.ViewChild,args:["valuesTable",{read:t.ElementRef}]}],loaderSettings:[{type:t.Input}]}});D.prototype.ngOnInit=function(){var r=this;this.loadData(),this.expandedStateSub=this.dataService.expandedStateChange.subscribe(function(n){r.zone.run(function(){var e="columnHeader"===n.tableType,t=e?"columnAxes":"rowAxes",e=s.toTree((e?r.dataService.columns:r.dataService.rows||[]).slice());r.updateHeaders(t,e,n.cell.path)})})},D.prototype.ngOnDestroy=function(){this.expandedStateSub.unsubscribe()},D.prototype.updateDataServiceFields=function(){this.dataService.normalizedData=this.dataState.data,this.dataService.rows=this.dataState.rows,this.dataService.columns=this.dataState.columns,this.dataService.updateRowsAndCols()},D.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()};u=D;function D(e,t){this.dataService=e,this.zone=t,this.columnAxes=[],this.rowAxes=[],this.measureAxes=[],this.expandedStateSub=new a.Subscription}u.ɵfac=d.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:d,type:u,deps:[{token:y},{token:d.NgZone}],target:d.ɵɵFactoryTarget.Directive}),u.ɵdir=d.ɵɵngDeclareDirective({minVersion:"12.0.0",version:"12.2.16",type:u,selector:"kendo-base-binding-directive",inputs:{columnAxes:"columnAxes",rowAxes:"rowAxes",measureAxes:"measureAxes"},ngImport:d}),d.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:d,type:u,decorators:[{type:t.Directive,args:[{selector:"kendo-base-binding-directive"}]}],ctorParameters:function(){return[{type:y},{type:d.NgZone}]},propDecorators:{columnAxes:[{type:t.Input}],rowAxes:[{type:t.Input}],measureAxes:[{type:t.Input}]}});var P,O={dataField:"aggregate",columnsData:"columns"},p=(v(E,P=u),E.prototype.ngOnChanges=function(e){n.anyChanged(["data","dimensions","columnAxes","rowAxes","measureAxes","measures"],e)&&this.loadData()},E.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),r=this.measureAxes.map(function(t){return e.measures.find(function(e){return String(e.name)===String(t.name)})}).filter(Boolean),o=s.createDataTree(this.data,n,t,r,O);this.dataState=s.createLocalDataState({dataTree:o,rowSettings:n,columnSettings:t,rowAxes:this.rowAxes,columnAxes:this.columnAxes,measures:r,sort:[],fields:O}),this.updateDataServiceFields()},E.prototype.getRootAxes=function(e){return Array.from(s.rootFields(e).keys()).join("&")},E);function E(e,t){var n=P.call(this,e,t)||this;return n.createAxisSettings=function(e){return Object.assign({key:e},n.dimensions[e])},n}p.ɵfac=d.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:d,type:p,deps:[{token:y},{token:d.NgZone}],target:d.ɵɵFactoryTarget.Directive}),p.ɵdir=d.ɵɵngDeclareDirective({minVersion:"12.0.0",version:"12.2.16",type:p,selector:"[kendoPivotLocalBinding]",inputs:{data:["kendoPivotLocalBinding","data"],dimensions:"dimensions",measures:"measures"},exportAs:["kendoPivotLocalBinding"],usesInheritance:!0,usesOnChanges:!0,ngImport:d}),d.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:d,type:p,decorators:[{type:t.Directive,args:[{selector:"[kendoPivotLocalBinding]",exportAs:"kendoPivotLocalBinding"}]}],ctorParameters:function(){return[{type:y},{type:d.NgZone}]},propDecorators:{data:[{type:t.Input,args:["kendoPivotLocalBinding"]}],dimensions:[{type:t.Input}],measures:[{type:t.Input}]}});v(j,H=u),j.prototype.ngOnChanges=function(e){n.anyChanged(["url","cube","catalog","columnAxes","rowAxes","measureAxes"],e)&&this.loadData()},j.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 H,u=j;function j(e,t){return H.call(this,e,t)||this}u.ɵfac=d.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:d,type:u,deps:[{token:y},{token:d.NgZone}],target:d.ɵɵFactoryTarget.Directive}),u.ɵdir=d.ɵɵngDeclareDirective({minVersion:"12.0.0",version:"12.2.16",type:u,selector:"[kendoPivotOLAPBinding]",inputs:{url:"url",cube:"cube",catalog:"catalog"},exportAs:["kendoPivotOLAPBinding"],usesInheritance:!0,usesOnChanges:!0,ngImport:d}),d.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:d,type:u,decorators:[{type:t.Directive,args:[{selector:"[kendoPivotOLAPBinding]",exportAs:"kendoPivotOLAPBinding"}]}],ctorParameters:function(){return[{type:y},{type:d.NgZone}]},propDecorators:{url:[{type:t.Input}],cube:[{type:t.Input}],catalog:[{type:t.Input}]}});var R=[r.CommonModule,n.EventsModule,o.IndicatorsModule],L=[S,x,I,p,u],F=function(){};F.ɵfac=d.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:d,type:F,deps:[],target:d.ɵɵFactoryTarget.NgModule}),F.ɵmod=d.ɵɵngDeclareNgModule({minVersion:"12.0.0",version:"12.2.16",ngImport:d,type:F,declarations:[S,x,I,p,u],imports:[r.CommonModule,n.EventsModule,o.IndicatorsModule],exports:[S,x,I,p,u]}),F.ɵinj=d.ɵɵngDeclareInjector({minVersion:"12.0.0",version:"12.2.16",ngImport:d,type:F,providers:[{provide:i.L10N_PREFIX,useValue:"kendo.pivotgrid"}],imports:[h([],m(R))]}),d.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:d,type:F,decorators:[{type:t.NgModule,args:[{imports:h([],m(R)),declarations:h([],m(L)),exports:h([],m(L)),providers:[{provide:i.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=S,e.PivotGridModule=F,e.PivotGridTableComponent=x,e.PivotLocalBindingDirective=p,e.PivotOLAPBindingDirective=u,Object.defineProperty(e,"__esModule",{value:!0})});
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("rxjs/operators"),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","rxjs/operators","@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.rxjs.operators,e.ng.common,e.KendoAngularIndicators,e.KendoAngularL10N)}(this,function(e,t,F,l,d,i,V,n,r,o){"use strict";function a(n){var r;return n&&n.__esModule?n:(r=Object.create(null),n&&Object.keys(n).forEach(function(e){var t;"default"!==e&&(t=Object.getOwnPropertyDescriptor(n,e),Object.defineProperty(r,e,t.get?t:{enumerable:!0,get:function(){return n[e]}}))}),r.default=n,Object.freeze(r))}var s=a(t),c=a(l),p=a(n),u=a(r),N={name:"@progress/kendo-angular-pivotgrid",productName:"Kendo UI for Angular",productCodes:["KENDOUIANGULAR","KENDOUICOMPLETE"],publishDate:1660825955,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"},g=function(e,t){return(g=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 v(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}g(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}Object.create;function h(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||0<t--)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function m(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||((r=r||Array.prototype.slice.call(t,0,o))[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}Object.create;function y(e,t,n,r){(e="Y"===r?-b(e,r):b(e,r))&&(t[0][n]=t[1][n]+=e)}function f(e,n,r){return e.reduce(function(e,t){return n(t)?m(m([],h(e)),[r(t)]):e},[])}var b=function(e,t){var n=e["wheelDelta"+t];return e.wheelDelta&&(void 0===n||n)?e.wheelDelta:e.detail&&e.axis===e["X"===t?"HORIZONTAL_AXIS":"VERTICAL_AXIS"]?10*-e.detail:0},L=0,k=(I.prototype.updateRowsAndCols=function(){var n=this,e=d.toTree((this.rows||[]).slice()),e=h(d.toRows(e),4),t=e[0],r=e[1],o=e[2],e=e[3],i=d.toTree((this.columns||[]).slice()),i=h(d.toColumns(i),3),a=i[0],s=i[1],i=i[2];this.columnHeaderLeaves=s,this.columnHeaderCols.next(s),this.columnHeaderRows.next(a),this.rowHeaderLeaves=r,this.rowHeaderCols.next(new Array(e).fill({})),this.rowHeaderRows.next(t),this.valuesRows.next(d.toData((this.normalizedData||[]).slice(),s,r,i,o)),l.isDocumentAvailable()&&this.ngZone.runOutsideAngular(function(){setTimeout(function(){return e=n.wrapper,t=e.querySelectorAll(".k-pivotgrid-row-headers .k-pivotgrid-row"),r=e.querySelectorAll(".k-pivotgrid-column-headers th"),o=e.querySelectorAll(".k-pivotgrid-values td"),t.forEach(function(e,t){var n=f(Array.from(o),function(e){return e.getAttribute("id").split("-")[4]===(t+1).toString()},function(e){return e.getAttribute("id")});e.setAttribute("aria-owns",n.join(" "))}),void o.forEach(function(e){var n=+e.getAttribute("id").split("-")[5],t=f(Array.from(r),function(e){var t=+e.getAttribute("id").split("-")[5],e=+e.getAttribute("colspan");return n==t||1<e&&n<=t+e-1},function(e){return e.getAttribute("id")});e.setAttribute("aria-describedby",t.join(" "))});var e,t,r,o})})},I);function I(e){this.ngZone=e,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),this.pivotGridId=L++}k.ɵfac=s.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:s,type:k,deps:[{token:s.NgZone}],target:s.ɵɵFactoryTarget.Injectable}),k.ɵprov=s.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"12.2.16",ngImport:s,type:k}),s.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:s,type:k,decorators:[{type:t.Injectable}],ctorParameters:function(){return[{type:s.NgZone}]},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,n=this.hostEl.nativeElement,r=(this.renderer.setAttribute(n,"rowspan",this.kendoPivotGridCell.rowSpan||1),this.renderer.setAttribute(n,"colspan",this.kendoPivotGridCell.colSpan||1),{"k-pivotgrid-header-total":(null==(e=this.kendoPivotGridCell)?void 0:e.total)||"values"===this.tableType&&(this.dataService.rowHeaderLeaves[this.rowIndex].total||this.dataService.columnHeaderLeaves[this.colIndex].total),"k-pivotgrid-header-root":0===(null==(e=this.kendoPivotGridCell)?void 0:e.levelNum),"k-pivotgrid-expanded":(null==(e=this.kendoPivotGridCell)?void 0:e.hasChildren)&&this.kendoPivotGridCell.children.length,"k-first":0<this.colIndex});for(t in r)r[t]&&this.renderer.addClass(n,t)};var w=x;function x(e,t,n){var r=this;this.hostEl=e,this.renderer=t,this.dataService=n,this.cellClass=!0,this.handleClick=function(){r.dataService.expandedStateChange.emit({action:r.expanded?"collapse":"expand",cell:r.kendoPivotGridCell,tableType:r.tableType})}}w.ɵfac=s.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:s,type:w,deps:[{token:s.ElementRef},{token:s.Renderer2},{token:k}],target:s.ɵɵFactoryTarget.Component}),w.ɵcmp=s.ɵɵngDeclareComponent({minVersion:"12.0.0",version:"12.2.16",type:w,selector:"[kendoPivotGridCell]",inputs:{kendoPivotGridCell:"kendoPivotGridCell",tableType:"tableType",rowIndex:"rowIndex",colIndex:"colIndex"},host:{properties:{"class.k-pivotgrid-cell":"this.cellClass"}},ngImport:s,template:'\n <span \n *ngIf="kendoPivotGridCell.hasChildren && !kendoPivotGridCell.total"\n class="k-icon"\n aria-hidden="true"\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:p.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]},{type:c.EventsOutsideAngularDirective,selector:"[kendoEventsOutsideAngular]",inputs:["kendoEventsOutsideAngular","scope"]},{type:p.NgClass,selector:"[ngClass]",inputs:["class","ngClass"]}]}),s.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:s,type:w,decorators:[{type:t.Component,args:[{selector:"[kendoPivotGridCell]",template:'\n <span \n *ngIf="kendoPivotGridCell.hasChildren && !kendoPivotGridCell.total"\n class="k-icon"\n aria-hidden="true"\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:s.ElementRef},{type:s.Renderer2},{type:k}]},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}]}});Object.defineProperty(A.prototype,"pivotGridId",{get:function(){return"kendo-pivotgrid-"+this.dataService.pivotGridId+"-"},enumerable:!1,configurable:!0}),A.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}))},A.prototype.ngOnDestroy=function(){this.dataChangeSubs.unsubscribe()};var C=A;function A(e){this.dataService=e,this.dataChangeSubs=new i.Subscription}C.ɵfac=s.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:s,type:C,deps:[{token:k}],target:s.ɵɵFactoryTarget.Component}),C.ɵcmp=s.ɵɵngDeclareComponent({minVersion:"12.0.0",version:"12.2.16",type:C,selector:"kendo-pivotgrid-table",inputs:{tableType:"tableType",colWidth:"colWidth"},ngImport:s,template:'\n <table\n class="k-pivotgrid-table"\n role="presentation">\n <colgroup>\n <col \n *ngFor="let item of headerItems;"\n [style.width]="tableType !== \'rowHeader\' ? colWidth >= 0 ? colWidth + \'px\' : \'200px\' : undefined" />\n </colgroup>\n <tbody class="k-pivotgrid-tbody" role="rowgroup">\n <tr *ngFor="let row of rows; index as rowIndex"\n class="k-pivotgrid-row"\n role="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"\n [attr.aria-expanded]="cell.hasChildren && cell.children.length ? \'true\' : \'false\'"\n [attr.role]="tableType === \'columnHeader\' ? \'columnheader\' : \'rowheader\'"\n [attr.id]="pivotGridId + (tableType === \'columnHeader\' ? \'ch-\' : \'rh-\') + (rowIndex + 1) + \'-\' + (colIndex + 1)"></th>\n <td\n *ngIf="cell && tableType === \'values\'"\n [kendoPivotGridCell]="cell"\n tableType="values"\n [colIndex]="colIndex"\n [rowIndex]="rowIndex"\n role="gridcell"\n [attr.id]="pivotGridId + \'cell-\' + (rowIndex + 1) + \'-\' + (colIndex + 1)"></td>\n </ng-container>\n </tr>\n </tbody>\n </table>\n ',isInline:!0,components:[{type:w,selector:"[kendoPivotGridCell]",inputs:["kendoPivotGridCell","tableType","rowIndex","colIndex"]}],directives:[{type:p.NgForOf,selector:"[ngFor][ngForOf]",inputs:["ngForOf","ngForTrackBy","ngForTemplate"]},{type:p.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]}]}),s.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:s,type:C,decorators:[{type:t.Component,args:[{selector:"kendo-pivotgrid-table",template:'\n <table\n class="k-pivotgrid-table"\n role="presentation">\n <colgroup>\n <col \n *ngFor="let item of headerItems;"\n [style.width]="tableType !== \'rowHeader\' ? colWidth >= 0 ? colWidth + \'px\' : \'200px\' : undefined" />\n </colgroup>\n <tbody class="k-pivotgrid-tbody" role="rowgroup">\n <tr *ngFor="let row of rows; index as rowIndex"\n class="k-pivotgrid-row"\n role="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"\n [attr.aria-expanded]="cell.hasChildren && cell.children.length ? \'true\' : \'false\'"\n [attr.role]="tableType === \'columnHeader\' ? \'columnheader\' : \'rowheader\'"\n [attr.id]="pivotGridId + (tableType === \'columnHeader\' ? \'ch-\' : \'rh-\') + (rowIndex + 1) + \'-\' + (colIndex + 1)"></th>\n <td\n *ngIf="cell && tableType === \'values\'"\n [kendoPivotGridCell]="cell"\n tableType="values"\n [colIndex]="colIndex"\n [rowIndex]="rowIndex"\n role="gridcell"\n [attr.id]="pivotGridId + \'cell-\' + (rowIndex + 1) + \'-\' + (colIndex + 1)"></td>\n </ng-container>\n </tr>\n </tbody>\n </table>\n '}]}],ctorParameters:function(){return[{type:k}]},propDecorators:{tableType:[{type:t.Input}],colWidth:[{type:t.Input}]}});var T={type:"converging-spinner",themeColor:"primary",size:"large"},S=(Object.defineProperty(D.prototype,"loaderSettings",{get:function(){return this._loaderSettings},set:function(e){this._loaderSettings=Object.assign({},T,e)},enumerable:!1,configurable:!0}),D.prototype.ngAfterViewInit=function(){var o=this;l.isDocumentAvailable()&&this.zone.runOutsideAngular(function(){var e=o.rowHeadersTable.nativeElement.firstElementChild,t=new ResizeObserver(function(){return o.resizeContainer("Columns",e)}),n=(t.observe(e),o.colHeadersTable.nativeElement.firstElementChild),r=new ResizeObserver(function(){return o.resizeContainer("Rows",n)});r.observe(n),o.resizeObservers=[t,r],o.subs.add(i.fromEvent(e,"wheel").pipe(V.merge(i.fromEvent(n,"wheel"),i.fromEvent(o.valuesTable.nativeElement,"scroll"))).subscribe(function(e){return o.handleScroll(e)}))})},D.prototype.ngAfterContentInit=function(){var t=this;this.subs.add(this.dataService.loading.subscribe(function(e){return t.loading=e}))},D.prototype.ngOnDestroy=function(){this.resizeObservers.forEach(function(e){return e.disconnect()}),this.subs.unsubscribe()},D);function D(e,t,n,r){var a=this;this.hostEl=e,this.zone=t,this.dataService=n,this.hostClass=!0,this.ariaRole="grid",this.columnHeadersWidth=200,this.resizeObservers=[],this._loaderSettings=T,this.subs=new i.Subscription,this.resizeContainer=function(e,t){var n=a.hostEl.nativeElement,r="Rows"===e?"offsetHeight":"offsetWidth";n.style["gridTemplate"+e]="",n.style["gridTemplate"+e]=t[r]+"px 1fr"},this.handleScroll=function(e){var t,n,r,o,i;e.target===a.valuesTable.nativeElement?(t=e.target,n=[a.rowHeadersTable.nativeElement,a.colHeadersTable.nativeElement],r=t.scrollTop,t=t.scrollLeft,o=n[0].scrollTop,i=t!==n[1].scrollLeft,r!==o?n[0].scrollTop=r:i&&(n[1].scrollLeft=t)):e.target.closest(".k-pivotgrid-row-headers")?y(e,[a.valuesTable.nativeElement,a.rowHeadersTable.nativeElement],"scrollTop","Y"):e.target.closest(".k-pivotgrid-column-headers")&&y(e,[a.valuesTable.nativeElement,a.colHeadersTable.nativeElement],"scrollLeft","X")},F.validatePackage(N),n.wrapper=e.nativeElement}S.ɵfac=s.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:s,type:S,deps:[{token:s.ElementRef},{token:s.NgZone},{token:k},{token:c.ScrollbarWidthService}],target:s.ɵɵFactoryTarget.Component}),S.ɵcmp=s.ɵɵngDeclareComponent({minVersion:"12.0.0",version:"12.2.16",type:S,selector:"kendo-pivotgrid",inputs:{loaderSettings:"loaderSettings",columnHeadersWidth:"columnHeadersWidth"},host:{properties:{"class.k-pivotgrid":"this.hostClass","attr.role":"this.ariaRole"}},providers:[k],viewQueries:[{propertyName:"colHeadersTable",first:!0,predicate:["colHeadersTable"],descendants:!0,read:t.ElementRef},{propertyName:"rowHeadersTable",first:!0,predicate:["rowHeadersTable"],descendants:!0,read:t.ElementRef},{propertyName:"valuesTable",first:!0,predicate:["valuesTable"],descendants:!0,read:t.ElementRef}],ngImport:s,template:'\n <span class="k-pivotgrid-empty-cell"></span>\n <kendo-pivotgrid-table\n #colHeadersTable\n [colWidth]="columnHeadersWidth"\n class="k-pivotgrid-column-headers"\n tableType="columnHeader"></kendo-pivotgrid-table>\n <kendo-pivotgrid-table\n #rowHeadersTable\n class="k-pivotgrid-row-headers"\n tableType="rowHeader"></kendo-pivotgrid-table>\n <kendo-pivotgrid-table\n #valuesTable\n [colWidth]="columnHeadersWidth"\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:C,selector:"kendo-pivotgrid-table",inputs:["tableType","colWidth"]},{type:u.LoaderComponent,selector:"kendo-loader",inputs:["type","themeColor","size"]}],directives:[{type:p.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]}]}),s.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:s,type:S,decorators:[{type:t.Component,args:[{selector:"kendo-pivotgrid",providers:[k],template:'\n <span class="k-pivotgrid-empty-cell"></span>\n <kendo-pivotgrid-table\n #colHeadersTable\n [colWidth]="columnHeadersWidth"\n class="k-pivotgrid-column-headers"\n tableType="columnHeader"></kendo-pivotgrid-table>\n <kendo-pivotgrid-table\n #rowHeadersTable\n class="k-pivotgrid-row-headers"\n tableType="rowHeader"></kendo-pivotgrid-table>\n <kendo-pivotgrid-table\n #valuesTable\n [colWidth]="columnHeadersWidth"\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:s.ElementRef},{type:s.NgZone},{type:k},{type:c.ScrollbarWidthService}]},propDecorators:{hostClass:[{type:t.HostBinding,args:["class.k-pivotgrid"]}],ariaRole:[{type:t.HostBinding,args:["attr.role"]}],colHeadersTable:[{type:t.ViewChild,args:["colHeadersTable",{read:t.ElementRef}]}],rowHeadersTable:[{type:t.ViewChild,args:["rowHeadersTable",{read:t.ElementRef}]}],valuesTable:[{type:t.ViewChild,args:["valuesTable",{read:t.ElementRef}]}],loaderSettings:[{type:t.Input}],columnHeadersWidth:[{type:t.Input}]}});P.prototype.ngOnInit=function(){var r=this;this.loadData(),this.expandedStateSub=this.dataService.expandedStateChange.subscribe(function(n){r.zone.run(function(){var e="columnHeader"===n.tableType,t=e?"columnAxes":"rowAxes",e=d.toTree((e?r.dataService.columns:r.dataService.rows||[]).slice());r.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:d.HEADERS_ACTION.toggle,payload:n},n=d.headersReducer(this[e].slice(),Object.assign(Object.assign({},n),{tree:t}));this[e]=n,this.loadData()};u=P;function P(e,t){this.dataService=e,this.zone=t,this.columnAxes=[],this.rowAxes=[],this.measureAxes=[],this.expandedStateSub=new i.Subscription}u.ɵfac=s.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:s,type:u,deps:[{token:k},{token:s.NgZone}],target:s.ɵɵFactoryTarget.Directive}),u.ɵdir=s.ɵɵngDeclareDirective({minVersion:"12.0.0",version:"12.2.16",type:u,selector:"kendo-base-binding-directive",inputs:{columnAxes:"columnAxes",rowAxes:"rowAxes",measureAxes:"measureAxes"},ngImport:s}),s.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:s,type:u,decorators:[{type:t.Directive,args:[{selector:"kendo-base-binding-directive"}]}],ctorParameters:function(){return[{type:k},{type:s.NgZone}]},propDecorators:{columnAxes:[{type:t.Input}],rowAxes:[{type:t.Input}],measureAxes:[{type:t.Input}]}});var O,E={dataField:"aggregate",columnsData:"columns"},p=(v(H,O=u),H.prototype.ngOnChanges=function(e){l.anyChanged(["data","dimensions","columnAxes","rowAxes","measureAxes","measures"],e)&&this.loadData()},H.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),r=this.measureAxes.map(function(t){return e.measures.find(function(e){return String(e.name)===String(t.name)})}).filter(Boolean),o=d.createDataTree(this.data,n,t,r,E);this.dataState=d.createLocalDataState({dataTree:o,rowSettings:n,columnSettings:t,rowAxes:this.rowAxes,columnAxes:this.columnAxes,measures:r,sort:[],fields:E}),this.updateDataServiceFields()},H.prototype.getRootAxes=function(e){return Array.from(d.rootFields(e).keys()).join("&")},H);function H(e,t){var n=O.call(this,e,t)||this;return n.createAxisSettings=function(e){return Object.assign({key:e},n.dimensions[e])},n}p.ɵfac=s.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:s,type:p,deps:[{token:k},{token:s.NgZone}],target:s.ɵɵFactoryTarget.Directive}),p.ɵdir=s.ɵɵngDeclareDirective({minVersion:"12.0.0",version:"12.2.16",type:p,selector:"[kendoPivotLocalBinding]",inputs:{data:["kendoPivotLocalBinding","data"],dimensions:"dimensions",measures:"measures"},exportAs:["kendoPivotLocalBinding"],usesInheritance:!0,usesOnChanges:!0,ngImport:s}),s.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:s,type:p,decorators:[{type:t.Directive,args:[{selector:"[kendoPivotLocalBinding]",exportAs:"kendoPivotLocalBinding"}]}],ctorParameters:function(){return[{type:k},{type:s.NgZone}]},propDecorators:{data:[{type:t.Input,args:["kendoPivotLocalBinding"]}],dimensions:[{type:t.Input}],measures:[{type:t.Input}]}});v(G,j=u),G.prototype.ngOnChanges=function(e){l.anyChanged(["url","cube","catalog","columnAxes","rowAxes","measureAxes"],e)&&this.loadData()},G.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});d.fetchData({url:this.url},JSON.parse(JSON.stringify(e))).then(d.createDataState).then(function(e){t.dataState=e,t.updateDataServiceFields(),t.dataService.loading.next(!1)})};var j,u=G;function G(e,t){return j.call(this,e,t)||this}u.ɵfac=s.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:s,type:u,deps:[{token:k},{token:s.NgZone}],target:s.ɵɵFactoryTarget.Directive}),u.ɵdir=s.ɵɵngDeclareDirective({minVersion:"12.0.0",version:"12.2.16",type:u,selector:"[kendoPivotOLAPBinding]",inputs:{url:"url",cube:"cube",catalog:"catalog"},exportAs:["kendoPivotOLAPBinding"],usesInheritance:!0,usesOnChanges:!0,ngImport:s}),s.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:s,type:u,decorators:[{type:t.Directive,args:[{selector:"[kendoPivotOLAPBinding]",exportAs:"kendoPivotOLAPBinding"}]}],ctorParameters:function(){return[{type:k},{type:s.NgZone}]},propDecorators:{url:[{type:t.Input}],cube:[{type:t.Input}],catalog:[{type:t.Input}]}});var B=[n.CommonModule,l.EventsModule,r.IndicatorsModule],W=[S,C,w,p,u],R=function(){};R.ɵfac=s.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:s,type:R,deps:[],target:s.ɵɵFactoryTarget.NgModule}),R.ɵmod=s.ɵɵngDeclareNgModule({minVersion:"12.0.0",version:"12.2.16",ngImport:s,type:R,declarations:[S,C,w,p,u],imports:[n.CommonModule,l.EventsModule,r.IndicatorsModule],exports:[S,C,w,p,u]}),R.ɵinj=s.ɵɵngDeclareInjector({minVersion:"12.0.0",version:"12.2.16",ngImport:s,type:R,providers:[{provide:o.L10N_PREFIX,useValue:"kendo.pivotgrid"}],imports:[m([],h(B))]}),s.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:s,type:R,decorators:[{type:t.NgModule,args:[{imports:m([],h(B)),declarations:m([],h(W)),exports:m([],h(W)),providers:[{provide:o.L10N_PREFIX,useValue:"kendo.pivotgrid"}]}]}]}),Object.defineProperty(e,"averageAggregate",{enumerable:!0,get:function(){return d.averageAggregate}}),Object.defineProperty(e,"maxAggregate",{enumerable:!0,get:function(){return d.maxAggregate}}),Object.defineProperty(e,"minAggregate",{enumerable:!0,get:function(){return d.minAggregate}}),Object.defineProperty(e,"sumAggregate",{enumerable:!0,get:function(){return d.sumAggregate}}),e.PivotGridCellDirective=w,e.PivotGridComponent=S,e.PivotGridModule=R,e.PivotGridTableComponent=C,e.PivotLocalBindingDirective=p,e.PivotOLAPBindingDirective=u,Object.defineProperty(e,"__esModule",{value:!0})});
@@ -2,7 +2,7 @@
2
2
  * Copyright © 2021 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 { EventEmitter } from '@angular/core';
5
+ import { EventEmitter, NgZone } from '@angular/core';
6
6
  import { PivotDataItem, Tuple } from '@progress/kendo-pivotgrid-common';
7
7
  import { BehaviorSubject } from 'rxjs';
8
8
  import { ExpandedStateChangeEvent } from '../models/expanded-state-action';
@@ -11,10 +11,12 @@ import * as i0 from "@angular/core";
11
11
  * @hidden
12
12
  */
13
13
  export declare class PivotGridDataService {
14
+ private ngZone;
14
15
  expandedStateChange: EventEmitter<ExpandedStateChangeEvent>;
15
16
  normalizedData: any[];
16
17
  rows: Tuple[];
17
18
  columns: Tuple[];
19
+ wrapper: Element;
18
20
  columnHeaderLeaves: {
19
21
  total: boolean;
20
22
  path: string[];
@@ -32,6 +34,8 @@ export declare class PivotGridDataService {
32
34
  cells: PivotDataItem[];
33
35
  }[]>;
34
36
  loading: BehaviorSubject<boolean>;
37
+ pivotGridId: number;
38
+ constructor(ngZone: NgZone);
35
39
  updateRowsAndCols(): void;
36
40
  static ɵfac: i0.ɵɵFactoryDeclaration<PivotGridDataService, never>;
37
41
  static ɵprov: i0.ɵɵInjectableDeclaration<PivotGridDataService>;
@@ -3,14 +3,21 @@
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
+ import { isDocumentAvailable } from '@progress/kendo-angular-common';
6
7
  import { toColumns, toData, toRows, toTree } from '@progress/kendo-pivotgrid-common';
7
8
  import { BehaviorSubject } from 'rxjs';
9
+ import { matchAriaAttributes } from '../util';
8
10
  import * as i0 from "@angular/core";
11
+ /**
12
+ * @hidden
13
+ */
14
+ let nextPivotGridId = 0;
9
15
  /**
10
16
  * @hidden
11
17
  */
12
18
  export class PivotGridDataService {
13
- constructor() {
19
+ constructor(ngZone) {
20
+ this.ngZone = ngZone;
14
21
  this.expandedStateChange = new EventEmitter();
15
22
  this.columnHeaderRows = new BehaviorSubject([]);
16
23
  this.columnHeaderCols = new BehaviorSubject([]);
@@ -18,6 +25,7 @@ export class PivotGridDataService {
18
25
  this.rowHeaderRows = new BehaviorSubject([]);
19
26
  this.valuesRows = new BehaviorSubject([]);
20
27
  this.loading = new BehaviorSubject(false);
28
+ this.pivotGridId = nextPivotGridId++;
21
29
  }
22
30
  updateRowsAndCols() {
23
31
  const rowsTree = toTree((this.rows || []).slice());
@@ -31,12 +39,19 @@ export class PivotGridDataService {
31
39
  this.rowHeaderCols.next(new Array(rowHeaderBreadth).fill({}));
32
40
  this.rowHeaderRows.next(rowHeaderRows);
33
41
  this.valuesRows.next(toData((this.normalizedData || []).slice(), columnHeaderLeaves, rowHeaderLeaves, columnHeaderBreadth, rowHeaderDepth));
42
+ if (isDocumentAvailable()) {
43
+ this.ngZone.runOutsideAngular(() => {
44
+ // needed because all tables need to be rendered in accordance with the new settings
45
+ // before applying the required DOM attributes
46
+ setTimeout(() => matchAriaAttributes(this.wrapper));
47
+ });
48
+ }
34
49
  }
35
50
  }
36
- PivotGridDataService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PivotGridDataService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
51
+ PivotGridDataService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PivotGridDataService, deps: [{ token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable });
37
52
  PivotGridDataService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PivotGridDataService });
38
53
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PivotGridDataService, decorators: [{
39
54
  type: Injectable
40
- }], propDecorators: { expandedStateChange: [{
55
+ }], ctorParameters: function () { return [{ type: i0.NgZone }]; }, propDecorators: { expandedStateChange: [{
41
56
  type: Output
42
57
  }] } });
@@ -9,7 +9,7 @@ export const packageMetadata = {
9
9
  name: '@progress/kendo-angular-pivotgrid',
10
10
  productName: 'Kendo UI for Angular',
11
11
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
12
- publishDate: 1652777244,
12
+ publishDate: 1660825955,
13
13
  version: '',
14
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
15
  };
@@ -31,6 +31,13 @@ export class PivotGridComponent {
31
31
  this.zone = zone;
32
32
  this.dataService = dataService;
33
33
  this.hostClass = true;
34
+ this.ariaRole = 'grid';
35
+ /**
36
+ * Specify the width of the column header and data cells. Value is treated as pixels.
37
+ *
38
+ * @default 200
39
+ */
40
+ this.columnHeadersWidth = 200;
34
41
  this.resizeObservers = [];
35
42
  this._loaderSettings = DEFAULT_LOADER_SETTINGS;
36
43
  this.subs = new Subscription();
@@ -56,6 +63,7 @@ export class PivotGridComponent {
56
63
  }
57
64
  };
58
65
  validatePackage(packageMetadata);
66
+ dataService.wrapper = hostEl.nativeElement;
59
67
  }
60
68
  /**
61
69
  * Specify the type, size and color of the PivotGrid's loader.
@@ -96,12 +104,13 @@ export class PivotGridComponent {
96
104
  }
97
105
  }
98
106
  PivotGridComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PivotGridComponent, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }, { token: i1.PivotGridDataService }, { token: i2.ScrollbarWidthService }], target: i0.ɵɵFactoryTarget.Component });
99
- PivotGridComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: PivotGridComponent, selector: "kendo-pivotgrid", inputs: { loaderSettings: "loaderSettings" }, host: { properties: { "class.k-pivotgrid": "this.hostClass" } }, providers: [
107
+ PivotGridComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: PivotGridComponent, selector: "kendo-pivotgrid", inputs: { loaderSettings: "loaderSettings", columnHeadersWidth: "columnHeadersWidth" }, host: { properties: { "class.k-pivotgrid": "this.hostClass", "attr.role": "this.ariaRole" } }, providers: [
100
108
  PivotGridDataService
101
109
  ], viewQueries: [{ propertyName: "colHeadersTable", first: true, predicate: ["colHeadersTable"], descendants: true, read: ElementRef }, { propertyName: "rowHeadersTable", first: true, predicate: ["rowHeadersTable"], descendants: true, read: ElementRef }, { propertyName: "valuesTable", first: true, predicate: ["valuesTable"], descendants: true, read: ElementRef }], ngImport: i0, template: `
102
110
  <span class="k-pivotgrid-empty-cell"></span>
103
111
  <kendo-pivotgrid-table
104
112
  #colHeadersTable
113
+ [colWidth]="columnHeadersWidth"
105
114
  class="k-pivotgrid-column-headers"
106
115
  tableType="columnHeader"></kendo-pivotgrid-table>
107
116
  <kendo-pivotgrid-table
@@ -110,6 +119,7 @@ PivotGridComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ver
110
119
  tableType="rowHeader"></kendo-pivotgrid-table>
111
120
  <kendo-pivotgrid-table
112
121
  #valuesTable
122
+ [colWidth]="columnHeadersWidth"
113
123
  class="k-pivotgrid-values"
114
124
  tableType="values"></kendo-pivotgrid-table>
115
125
 
@@ -121,7 +131,7 @@ PivotGridComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ver
121
131
  >
122
132
  </kendo-loader>
123
133
  </div>
124
- `, isInline: true, styles: ["\n /** TODO: Remove if added to themes */\n div.k-loader {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n }\n "], components: [{ type: i3.PivotGridTableComponent, selector: "kendo-pivotgrid-table", inputs: ["tableType"] }, { type: i4.LoaderComponent, selector: "kendo-loader", inputs: ["type", "themeColor", "size"] }], directives: [{ type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
134
+ `, isInline: true, styles: ["\n /** TODO: Remove if added to themes */\n div.k-loader {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n }\n "], components: [{ type: i3.PivotGridTableComponent, selector: "kendo-pivotgrid-table", inputs: ["tableType", "colWidth"] }, { type: i4.LoaderComponent, selector: "kendo-loader", inputs: ["type", "themeColor", "size"] }], directives: [{ type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
125
135
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PivotGridComponent, decorators: [{
126
136
  type: Component,
127
137
  args: [{
@@ -133,6 +143,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
133
143
  <span class="k-pivotgrid-empty-cell"></span>
134
144
  <kendo-pivotgrid-table
135
145
  #colHeadersTable
146
+ [colWidth]="columnHeadersWidth"
136
147
  class="k-pivotgrid-column-headers"
137
148
  tableType="columnHeader"></kendo-pivotgrid-table>
138
149
  <kendo-pivotgrid-table
@@ -141,6 +152,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
141
152
  tableType="rowHeader"></kendo-pivotgrid-table>
142
153
  <kendo-pivotgrid-table
143
154
  #valuesTable
155
+ [colWidth]="columnHeadersWidth"
144
156
  class="k-pivotgrid-values"
145
157
  tableType="values"></kendo-pivotgrid-table>
146
158
 
@@ -166,6 +178,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
166
178
  }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.NgZone }, { type: i1.PivotGridDataService }, { type: i2.ScrollbarWidthService }]; }, propDecorators: { hostClass: [{
167
179
  type: HostBinding,
168
180
  args: ['class.k-pivotgrid']
181
+ }], ariaRole: [{
182
+ type: HostBinding,
183
+ args: ['attr.role']
169
184
  }], colHeadersTable: [{
170
185
  type: ViewChild,
171
186
  args: ['colHeadersTable', { read: ElementRef }]
@@ -177,4 +192,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
177
192
  args: ['valuesTable', { read: ElementRef }]
178
193
  }], loaderSettings: [{
179
194
  type: Input
195
+ }], columnHeadersWidth: [{
196
+ type: Input
180
197
  }] } });
@@ -29,15 +29,16 @@ export class PivotGridCellDirective {
29
29
  return ((_a = this.kendoPivotGridCell) === null || _a === void 0 ? void 0 : _a.hasChildren) && this.kendoPivotGridCell.children.length;
30
30
  }
31
31
  ngOnInit() {
32
+ var _a, _b, _c;
32
33
  const nativeElement = this.hostEl.nativeElement;
33
34
  this.renderer.setAttribute(nativeElement, 'rowspan', this.kendoPivotGridCell.rowSpan || 1);
34
35
  this.renderer.setAttribute(nativeElement, 'colspan', this.kendoPivotGridCell.colSpan || 1);
35
36
  const classesToAdd = {
36
- 'k-pivotgrid-header-total': this.kendoPivotGridCell.total || (this.tableType === 'values'
37
+ 'k-pivotgrid-header-total': ((_a = this.kendoPivotGridCell) === null || _a === void 0 ? void 0 : _a.total) || (this.tableType === 'values'
37
38
  && (this.dataService.rowHeaderLeaves[this.rowIndex].total ||
38
39
  this.dataService.columnHeaderLeaves[this.colIndex].total)),
39
- 'k-pivotgrid-header-root': this.kendoPivotGridCell.levelNum === 0,
40
- 'k-pivotgrid-expanded': this.kendoPivotGridCell.hasChildren && this.kendoPivotGridCell.children.length,
40
+ 'k-pivotgrid-header-root': ((_b = this.kendoPivotGridCell) === null || _b === void 0 ? void 0 : _b.levelNum) === 0,
41
+ 'k-pivotgrid-expanded': ((_c = this.kendoPivotGridCell) === null || _c === void 0 ? void 0 : _c.hasChildren) && this.kendoPivotGridCell.children.length,
41
42
  'k-first': this.colIndex > 0
42
43
  };
43
44
  for (let prop in classesToAdd) {
@@ -52,6 +53,7 @@ PivotGridCellDirective.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0",
52
53
  <span
53
54
  *ngIf="kendoPivotGridCell.hasChildren && !kendoPivotGridCell.total"
54
55
  class="k-icon"
56
+ aria-hidden="true"
55
57
  [kendoEventsOutsideAngular]="{
56
58
  click: handleClick
57
59
  }"
@@ -68,6 +70,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
68
70
  <span
69
71
  *ngIf="kendoPivotGridCell.hasChildren && !kendoPivotGridCell.total"
70
72
  class="k-icon"
73
+ aria-hidden="true"
71
74
  [kendoEventsOutsideAngular]="{
72
75
  click: handleClick
73
76
  }"
@@ -16,6 +16,9 @@ export class PivotGridTableComponent {
16
16
  this.dataService = dataService;
17
17
  this.dataChangeSubs = new Subscription();
18
18
  }
19
+ get pivotGridId() {
20
+ return `kendo-pivotgrid-${this.dataService.pivotGridId}-`;
21
+ }
19
22
  ngOnInit() {
20
23
  this.dataChangeSubs.add(this.dataService[`${this.tableType}Rows`].subscribe(rows => this.rows = rows));
21
24
  this.dataChangeSubs.add(this.tableType === 'values' ?
@@ -27,27 +30,37 @@ export class PivotGridTableComponent {
27
30
  }
28
31
  }
29
32
  PivotGridTableComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PivotGridTableComponent, deps: [{ token: i1.PivotGridDataService }], target: i0.ɵɵFactoryTarget.Component });
30
- PivotGridTableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: PivotGridTableComponent, selector: "kendo-pivotgrid-table", inputs: { tableType: "tableType" }, ngImport: i0, template: `
31
- <table class="k-pivotgrid-table">
33
+ PivotGridTableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: PivotGridTableComponent, selector: "kendo-pivotgrid-table", inputs: { tableType: "tableType", colWidth: "colWidth" }, ngImport: i0, template: `
34
+ <table
35
+ class="k-pivotgrid-table"
36
+ role="presentation">
32
37
  <colgroup>
33
- <col *ngFor="let item of headerItems;" />
38
+ <col
39
+ *ngFor="let item of headerItems;"
40
+ [style.width]="tableType !== 'rowHeader' ? colWidth >= 0 ? colWidth + 'px' : '200px' : undefined" />
34
41
  </colgroup>
35
- <tbody class="k-pivotgrid-tbody">
42
+ <tbody class="k-pivotgrid-tbody" role="rowgroup">
36
43
  <tr *ngFor="let row of rows; index as rowIndex"
37
- class="k-pivotgrid-row">
44
+ class="k-pivotgrid-row"
45
+ role="row">
38
46
  <ng-container *ngFor="let cell of row.cells; index as colIndex">
39
47
  <th
40
48
  *ngIf="cell && tableType !== 'values'"
41
49
  [kendoPivotGridCell]="cell"
42
50
  [tableType]="tableType"
43
51
  [colIndex]="colIndex"
44
- [rowIndex]="rowIndex"></th>
52
+ [rowIndex]="rowIndex"
53
+ [attr.aria-expanded]="cell.hasChildren && cell.children.length ? 'true' : 'false'"
54
+ [attr.role]="tableType === 'columnHeader' ? 'columnheader' : 'rowheader'"
55
+ [attr.id]="pivotGridId + (tableType === 'columnHeader' ? 'ch-' : 'rh-') + (rowIndex + 1) + '-' + (colIndex + 1)"></th>
45
56
  <td
46
57
  *ngIf="cell && tableType === 'values'"
47
58
  [kendoPivotGridCell]="cell"
48
59
  tableType="values"
49
60
  [colIndex]="colIndex"
50
- [rowIndex]="rowIndex"></td>
61
+ [rowIndex]="rowIndex"
62
+ role="gridcell"
63
+ [attr.id]="pivotGridId + 'cell-' + (rowIndex + 1) + '-' + (colIndex + 1)"></td>
51
64
  </ng-container>
52
65
  </tr>
53
66
  </tbody>
@@ -58,26 +71,36 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
58
71
  args: [{
59
72
  selector: 'kendo-pivotgrid-table',
60
73
  template: `
61
- <table class="k-pivotgrid-table">
74
+ <table
75
+ class="k-pivotgrid-table"
76
+ role="presentation">
62
77
  <colgroup>
63
- <col *ngFor="let item of headerItems;" />
78
+ <col
79
+ *ngFor="let item of headerItems;"
80
+ [style.width]="tableType !== 'rowHeader' ? colWidth >= 0 ? colWidth + 'px' : '200px' : undefined" />
64
81
  </colgroup>
65
- <tbody class="k-pivotgrid-tbody">
82
+ <tbody class="k-pivotgrid-tbody" role="rowgroup">
66
83
  <tr *ngFor="let row of rows; index as rowIndex"
67
- class="k-pivotgrid-row">
84
+ class="k-pivotgrid-row"
85
+ role="row">
68
86
  <ng-container *ngFor="let cell of row.cells; index as colIndex">
69
87
  <th
70
88
  *ngIf="cell && tableType !== 'values'"
71
89
  [kendoPivotGridCell]="cell"
72
90
  [tableType]="tableType"
73
91
  [colIndex]="colIndex"
74
- [rowIndex]="rowIndex"></th>
92
+ [rowIndex]="rowIndex"
93
+ [attr.aria-expanded]="cell.hasChildren && cell.children.length ? 'true' : 'false'"
94
+ [attr.role]="tableType === 'columnHeader' ? 'columnheader' : 'rowheader'"
95
+ [attr.id]="pivotGridId + (tableType === 'columnHeader' ? 'ch-' : 'rh-') + (rowIndex + 1) + '-' + (colIndex + 1)"></th>
75
96
  <td
76
97
  *ngIf="cell && tableType === 'values'"
77
98
  [kendoPivotGridCell]="cell"
78
99
  tableType="values"
79
100
  [colIndex]="colIndex"
80
- [rowIndex]="rowIndex"></td>
101
+ [rowIndex]="rowIndex"
102
+ role="gridcell"
103
+ [attr.id]="pivotGridId + 'cell-' + (rowIndex + 1) + '-' + (colIndex + 1)"></td>
81
104
  </ng-container>
82
105
  </tr>
83
106
  </tbody>
@@ -86,4 +109,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
86
109
  }]
87
110
  }], ctorParameters: function () { return [{ type: i1.PivotGridDataService }]; }, propDecorators: { tableType: [{
88
111
  type: Input
112
+ }], colWidth: [{
113
+ type: Input
89
114
  }] } });
package/esm2015/util.js CHANGED
@@ -64,3 +64,30 @@ export const syncWheel = (event, tables, prop, axis) => {
64
64
  tables[1][prop] += delta;
65
65
  }
66
66
  };
67
+ /**
68
+ * @hidden
69
+ */
70
+ export const matchAriaAttributes = (wrapper) => {
71
+ const rowHeaderRows = wrapper.querySelectorAll('.k-pivotgrid-row-headers .k-pivotgrid-row');
72
+ const colHeaderCells = wrapper.querySelectorAll('.k-pivotgrid-column-headers th');
73
+ const valueTableCells = wrapper.querySelectorAll('.k-pivotgrid-values td');
74
+ rowHeaderRows.forEach((row, index) => {
75
+ const valueCellsIds = filterAndMap(Array.from(valueTableCells), c => c.getAttribute('id').split('-')[4] === (index + 1).toString(), c => c.getAttribute('id'));
76
+ row.setAttribute('aria-owns', valueCellsIds.join(' '));
77
+ });
78
+ valueTableCells.forEach(cell => {
79
+ const cellColIndex = +cell.getAttribute('id').split('-')[5];
80
+ const colHeaderCellsIds = filterAndMap(Array.from(colHeaderCells), c => {
81
+ const headerCellColIndex = +c.getAttribute('id').split('-')[5];
82
+ const headerCellColspan = +c.getAttribute('colspan');
83
+ const colIndexIsEqual = cellColIndex === headerCellColIndex;
84
+ const cellColIndexIsWithinHeaderCellRange = headerCellColspan > 1 && (headerCellColIndex + headerCellColspan - 1 >= cellColIndex);
85
+ return colIndexIsEqual || cellColIndexIsWithinHeaderCellRange;
86
+ }, c => c.getAttribute('id'));
87
+ cell.setAttribute('aria-describedby', colHeaderCellsIds.join(' '));
88
+ });
89
+ };
90
+ /**
91
+ * @hidden
92
+ */
93
+ export const filterAndMap = (arr, predicate, mapper) => arr.reduce((acc, curr) => predicate(curr) ? [...acc, mapper(curr)] : acc, []);
@@ -24,46 +24,11 @@ const packageMetadata = {
24
24
  name: '@progress/kendo-angular-pivotgrid',
25
25
  productName: 'Kendo UI for Angular',
26
26
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
27
- publishDate: 1652777244,
27
+ publishDate: 1660825955,
28
28
  version: '',
29
29
  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'
30
30
  };
31
31
 
32
- /**
33
- * @hidden
34
- */
35
- class PivotGridDataService {
36
- constructor() {
37
- this.expandedStateChange = new EventEmitter();
38
- this.columnHeaderRows = new BehaviorSubject([]);
39
- this.columnHeaderCols = new BehaviorSubject([]);
40
- this.rowHeaderCols = new BehaviorSubject([]);
41
- this.rowHeaderRows = new BehaviorSubject([]);
42
- this.valuesRows = new BehaviorSubject([]);
43
- this.loading = new BehaviorSubject(false);
44
- }
45
- updateRowsAndCols() {
46
- const rowsTree = toTree((this.rows || []).slice());
47
- const [rowHeaderRows, rowHeaderLeaves, rowHeaderDepth, rowHeaderBreadth] = toRows(rowsTree);
48
- const columnsTree = toTree((this.columns || []).slice());
49
- const [columnHeaderRows, columnHeaderLeaves, columnHeaderBreadth] = toColumns(columnsTree);
50
- this.columnHeaderLeaves = columnHeaderLeaves;
51
- this.columnHeaderCols.next(columnHeaderLeaves);
52
- this.columnHeaderRows.next(columnHeaderRows);
53
- this.rowHeaderLeaves = rowHeaderLeaves;
54
- this.rowHeaderCols.next(new Array(rowHeaderBreadth).fill({}));
55
- this.rowHeaderRows.next(rowHeaderRows);
56
- this.valuesRows.next(toData((this.normalizedData || []).slice(), columnHeaderLeaves, rowHeaderLeaves, columnHeaderBreadth, rowHeaderDepth));
57
- }
58
- }
59
- PivotGridDataService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PivotGridDataService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
60
- PivotGridDataService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PivotGridDataService });
61
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PivotGridDataService, decorators: [{
62
- type: Injectable
63
- }], propDecorators: { expandedStateChange: [{
64
- type: Output
65
- }] } });
66
-
67
32
  /**
68
33
  * @hidden
69
34
  */
@@ -126,6 +91,81 @@ const syncWheel = (event, tables, prop, axis) => {
126
91
  tables[1][prop] += delta;
127
92
  }
128
93
  };
94
+ /**
95
+ * @hidden
96
+ */
97
+ const matchAriaAttributes = (wrapper) => {
98
+ const rowHeaderRows = wrapper.querySelectorAll('.k-pivotgrid-row-headers .k-pivotgrid-row');
99
+ const colHeaderCells = wrapper.querySelectorAll('.k-pivotgrid-column-headers th');
100
+ const valueTableCells = wrapper.querySelectorAll('.k-pivotgrid-values td');
101
+ rowHeaderRows.forEach((row, index) => {
102
+ const valueCellsIds = filterAndMap(Array.from(valueTableCells), c => c.getAttribute('id').split('-')[4] === (index + 1).toString(), c => c.getAttribute('id'));
103
+ row.setAttribute('aria-owns', valueCellsIds.join(' '));
104
+ });
105
+ valueTableCells.forEach(cell => {
106
+ const cellColIndex = +cell.getAttribute('id').split('-')[5];
107
+ const colHeaderCellsIds = filterAndMap(Array.from(colHeaderCells), c => {
108
+ const headerCellColIndex = +c.getAttribute('id').split('-')[5];
109
+ const headerCellColspan = +c.getAttribute('colspan');
110
+ const colIndexIsEqual = cellColIndex === headerCellColIndex;
111
+ const cellColIndexIsWithinHeaderCellRange = headerCellColspan > 1 && (headerCellColIndex + headerCellColspan - 1 >= cellColIndex);
112
+ return colIndexIsEqual || cellColIndexIsWithinHeaderCellRange;
113
+ }, c => c.getAttribute('id'));
114
+ cell.setAttribute('aria-describedby', colHeaderCellsIds.join(' '));
115
+ });
116
+ };
117
+ /**
118
+ * @hidden
119
+ */
120
+ const filterAndMap = (arr, predicate, mapper) => arr.reduce((acc, curr) => predicate(curr) ? [...acc, mapper(curr)] : acc, []);
121
+
122
+ /**
123
+ * @hidden
124
+ */
125
+ let nextPivotGridId = 0;
126
+ /**
127
+ * @hidden
128
+ */
129
+ class PivotGridDataService {
130
+ constructor(ngZone) {
131
+ this.ngZone = ngZone;
132
+ this.expandedStateChange = new EventEmitter();
133
+ this.columnHeaderRows = new BehaviorSubject([]);
134
+ this.columnHeaderCols = new BehaviorSubject([]);
135
+ this.rowHeaderCols = new BehaviorSubject([]);
136
+ this.rowHeaderRows = new BehaviorSubject([]);
137
+ this.valuesRows = new BehaviorSubject([]);
138
+ this.loading = new BehaviorSubject(false);
139
+ this.pivotGridId = nextPivotGridId++;
140
+ }
141
+ updateRowsAndCols() {
142
+ const rowsTree = toTree((this.rows || []).slice());
143
+ const [rowHeaderRows, rowHeaderLeaves, rowHeaderDepth, rowHeaderBreadth] = toRows(rowsTree);
144
+ const columnsTree = toTree((this.columns || []).slice());
145
+ const [columnHeaderRows, columnHeaderLeaves, columnHeaderBreadth] = toColumns(columnsTree);
146
+ this.columnHeaderLeaves = columnHeaderLeaves;
147
+ this.columnHeaderCols.next(columnHeaderLeaves);
148
+ this.columnHeaderRows.next(columnHeaderRows);
149
+ this.rowHeaderLeaves = rowHeaderLeaves;
150
+ this.rowHeaderCols.next(new Array(rowHeaderBreadth).fill({}));
151
+ this.rowHeaderRows.next(rowHeaderRows);
152
+ this.valuesRows.next(toData((this.normalizedData || []).slice(), columnHeaderLeaves, rowHeaderLeaves, columnHeaderBreadth, rowHeaderDepth));
153
+ if (isDocumentAvailable()) {
154
+ this.ngZone.runOutsideAngular(() => {
155
+ // needed because all tables need to be rendered in accordance with the new settings
156
+ // before applying the required DOM attributes
157
+ setTimeout(() => matchAriaAttributes(this.wrapper));
158
+ });
159
+ }
160
+ }
161
+ }
162
+ PivotGridDataService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PivotGridDataService, deps: [{ token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable });
163
+ PivotGridDataService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PivotGridDataService });
164
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PivotGridDataService, decorators: [{
165
+ type: Injectable
166
+ }], ctorParameters: function () { return [{ type: i0.NgZone }]; }, propDecorators: { expandedStateChange: [{
167
+ type: Output
168
+ }] } });
129
169
 
130
170
  /**
131
171
  * @hidden
@@ -149,15 +189,16 @@ class PivotGridCellDirective {
149
189
  return ((_a = this.kendoPivotGridCell) === null || _a === void 0 ? void 0 : _a.hasChildren) && this.kendoPivotGridCell.children.length;
150
190
  }
151
191
  ngOnInit() {
192
+ var _a, _b, _c;
152
193
  const nativeElement = this.hostEl.nativeElement;
153
194
  this.renderer.setAttribute(nativeElement, 'rowspan', this.kendoPivotGridCell.rowSpan || 1);
154
195
  this.renderer.setAttribute(nativeElement, 'colspan', this.kendoPivotGridCell.colSpan || 1);
155
196
  const classesToAdd = {
156
- 'k-pivotgrid-header-total': this.kendoPivotGridCell.total || (this.tableType === 'values'
197
+ 'k-pivotgrid-header-total': ((_a = this.kendoPivotGridCell) === null || _a === void 0 ? void 0 : _a.total) || (this.tableType === 'values'
157
198
  && (this.dataService.rowHeaderLeaves[this.rowIndex].total ||
158
199
  this.dataService.columnHeaderLeaves[this.colIndex].total)),
159
- 'k-pivotgrid-header-root': this.kendoPivotGridCell.levelNum === 0,
160
- 'k-pivotgrid-expanded': this.kendoPivotGridCell.hasChildren && this.kendoPivotGridCell.children.length,
200
+ 'k-pivotgrid-header-root': ((_b = this.kendoPivotGridCell) === null || _b === void 0 ? void 0 : _b.levelNum) === 0,
201
+ 'k-pivotgrid-expanded': ((_c = this.kendoPivotGridCell) === null || _c === void 0 ? void 0 : _c.hasChildren) && this.kendoPivotGridCell.children.length,
161
202
  'k-first': this.colIndex > 0
162
203
  };
163
204
  for (let prop in classesToAdd) {
@@ -172,6 +213,7 @@ PivotGridCellDirective.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0",
172
213
  <span
173
214
  *ngIf="kendoPivotGridCell.hasChildren && !kendoPivotGridCell.total"
174
215
  class="k-icon"
216
+ aria-hidden="true"
175
217
  [kendoEventsOutsideAngular]="{
176
218
  click: handleClick
177
219
  }"
@@ -188,6 +230,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
188
230
  <span
189
231
  *ngIf="kendoPivotGridCell.hasChildren && !kendoPivotGridCell.total"
190
232
  class="k-icon"
233
+ aria-hidden="true"
191
234
  [kendoEventsOutsideAngular]="{
192
235
  click: handleClick
193
236
  }"
@@ -217,6 +260,9 @@ class PivotGridTableComponent {
217
260
  this.dataService = dataService;
218
261
  this.dataChangeSubs = new Subscription();
219
262
  }
263
+ get pivotGridId() {
264
+ return `kendo-pivotgrid-${this.dataService.pivotGridId}-`;
265
+ }
220
266
  ngOnInit() {
221
267
  this.dataChangeSubs.add(this.dataService[`${this.tableType}Rows`].subscribe(rows => this.rows = rows));
222
268
  this.dataChangeSubs.add(this.tableType === 'values' ?
@@ -228,27 +274,37 @@ class PivotGridTableComponent {
228
274
  }
229
275
  }
230
276
  PivotGridTableComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PivotGridTableComponent, deps: [{ token: PivotGridDataService }], target: i0.ɵɵFactoryTarget.Component });
231
- PivotGridTableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: PivotGridTableComponent, selector: "kendo-pivotgrid-table", inputs: { tableType: "tableType" }, ngImport: i0, template: `
232
- <table class="k-pivotgrid-table">
277
+ PivotGridTableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: PivotGridTableComponent, selector: "kendo-pivotgrid-table", inputs: { tableType: "tableType", colWidth: "colWidth" }, ngImport: i0, template: `
278
+ <table
279
+ class="k-pivotgrid-table"
280
+ role="presentation">
233
281
  <colgroup>
234
- <col *ngFor="let item of headerItems;" />
282
+ <col
283
+ *ngFor="let item of headerItems;"
284
+ [style.width]="tableType !== 'rowHeader' ? colWidth >= 0 ? colWidth + 'px' : '200px' : undefined" />
235
285
  </colgroup>
236
- <tbody class="k-pivotgrid-tbody">
286
+ <tbody class="k-pivotgrid-tbody" role="rowgroup">
237
287
  <tr *ngFor="let row of rows; index as rowIndex"
238
- class="k-pivotgrid-row">
288
+ class="k-pivotgrid-row"
289
+ role="row">
239
290
  <ng-container *ngFor="let cell of row.cells; index as colIndex">
240
291
  <th
241
292
  *ngIf="cell && tableType !== 'values'"
242
293
  [kendoPivotGridCell]="cell"
243
294
  [tableType]="tableType"
244
295
  [colIndex]="colIndex"
245
- [rowIndex]="rowIndex"></th>
296
+ [rowIndex]="rowIndex"
297
+ [attr.aria-expanded]="cell.hasChildren && cell.children.length ? 'true' : 'false'"
298
+ [attr.role]="tableType === 'columnHeader' ? 'columnheader' : 'rowheader'"
299
+ [attr.id]="pivotGridId + (tableType === 'columnHeader' ? 'ch-' : 'rh-') + (rowIndex + 1) + '-' + (colIndex + 1)"></th>
246
300
  <td
247
301
  *ngIf="cell && tableType === 'values'"
248
302
  [kendoPivotGridCell]="cell"
249
303
  tableType="values"
250
304
  [colIndex]="colIndex"
251
- [rowIndex]="rowIndex"></td>
305
+ [rowIndex]="rowIndex"
306
+ role="gridcell"
307
+ [attr.id]="pivotGridId + 'cell-' + (rowIndex + 1) + '-' + (colIndex + 1)"></td>
252
308
  </ng-container>
253
309
  </tr>
254
310
  </tbody>
@@ -259,26 +315,36 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
259
315
  args: [{
260
316
  selector: 'kendo-pivotgrid-table',
261
317
  template: `
262
- <table class="k-pivotgrid-table">
318
+ <table
319
+ class="k-pivotgrid-table"
320
+ role="presentation">
263
321
  <colgroup>
264
- <col *ngFor="let item of headerItems;" />
322
+ <col
323
+ *ngFor="let item of headerItems;"
324
+ [style.width]="tableType !== 'rowHeader' ? colWidth >= 0 ? colWidth + 'px' : '200px' : undefined" />
265
325
  </colgroup>
266
- <tbody class="k-pivotgrid-tbody">
326
+ <tbody class="k-pivotgrid-tbody" role="rowgroup">
267
327
  <tr *ngFor="let row of rows; index as rowIndex"
268
- class="k-pivotgrid-row">
328
+ class="k-pivotgrid-row"
329
+ role="row">
269
330
  <ng-container *ngFor="let cell of row.cells; index as colIndex">
270
331
  <th
271
332
  *ngIf="cell && tableType !== 'values'"
272
333
  [kendoPivotGridCell]="cell"
273
334
  [tableType]="tableType"
274
335
  [colIndex]="colIndex"
275
- [rowIndex]="rowIndex"></th>
336
+ [rowIndex]="rowIndex"
337
+ [attr.aria-expanded]="cell.hasChildren && cell.children.length ? 'true' : 'false'"
338
+ [attr.role]="tableType === 'columnHeader' ? 'columnheader' : 'rowheader'"
339
+ [attr.id]="pivotGridId + (tableType === 'columnHeader' ? 'ch-' : 'rh-') + (rowIndex + 1) + '-' + (colIndex + 1)"></th>
276
340
  <td
277
341
  *ngIf="cell && tableType === 'values'"
278
342
  [kendoPivotGridCell]="cell"
279
343
  tableType="values"
280
344
  [colIndex]="colIndex"
281
- [rowIndex]="rowIndex"></td>
345
+ [rowIndex]="rowIndex"
346
+ role="gridcell"
347
+ [attr.id]="pivotGridId + 'cell-' + (rowIndex + 1) + '-' + (colIndex + 1)"></td>
282
348
  </ng-container>
283
349
  </tr>
284
350
  </tbody>
@@ -287,6 +353,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
287
353
  }]
288
354
  }], ctorParameters: function () { return [{ type: PivotGridDataService }]; }, propDecorators: { tableType: [{
289
355
  type: Input
356
+ }], colWidth: [{
357
+ type: Input
290
358
  }] } });
291
359
 
292
360
  const DEFAULT_LOADER_SETTINGS = {
@@ -303,6 +371,13 @@ class PivotGridComponent {
303
371
  this.zone = zone;
304
372
  this.dataService = dataService;
305
373
  this.hostClass = true;
374
+ this.ariaRole = 'grid';
375
+ /**
376
+ * Specify the width of the column header and data cells. Value is treated as pixels.
377
+ *
378
+ * @default 200
379
+ */
380
+ this.columnHeadersWidth = 200;
306
381
  this.resizeObservers = [];
307
382
  this._loaderSettings = DEFAULT_LOADER_SETTINGS;
308
383
  this.subs = new Subscription();
@@ -328,6 +403,7 @@ class PivotGridComponent {
328
403
  }
329
404
  };
330
405
  validatePackage(packageMetadata);
406
+ dataService.wrapper = hostEl.nativeElement;
331
407
  }
332
408
  /**
333
409
  * Specify the type, size and color of the PivotGrid's loader.
@@ -368,12 +444,13 @@ class PivotGridComponent {
368
444
  }
369
445
  }
370
446
  PivotGridComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PivotGridComponent, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }, { token: PivotGridDataService }, { token: i2$1.ScrollbarWidthService }], target: i0.ɵɵFactoryTarget.Component });
371
- PivotGridComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: PivotGridComponent, selector: "kendo-pivotgrid", inputs: { loaderSettings: "loaderSettings" }, host: { properties: { "class.k-pivotgrid": "this.hostClass" } }, providers: [
447
+ PivotGridComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: PivotGridComponent, selector: "kendo-pivotgrid", inputs: { loaderSettings: "loaderSettings", columnHeadersWidth: "columnHeadersWidth" }, host: { properties: { "class.k-pivotgrid": "this.hostClass", "attr.role": "this.ariaRole" } }, providers: [
372
448
  PivotGridDataService
373
449
  ], viewQueries: [{ propertyName: "colHeadersTable", first: true, predicate: ["colHeadersTable"], descendants: true, read: ElementRef }, { propertyName: "rowHeadersTable", first: true, predicate: ["rowHeadersTable"], descendants: true, read: ElementRef }, { propertyName: "valuesTable", first: true, predicate: ["valuesTable"], descendants: true, read: ElementRef }], ngImport: i0, template: `
374
450
  <span class="k-pivotgrid-empty-cell"></span>
375
451
  <kendo-pivotgrid-table
376
452
  #colHeadersTable
453
+ [colWidth]="columnHeadersWidth"
377
454
  class="k-pivotgrid-column-headers"
378
455
  tableType="columnHeader"></kendo-pivotgrid-table>
379
456
  <kendo-pivotgrid-table
@@ -382,6 +459,7 @@ PivotGridComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ver
382
459
  tableType="rowHeader"></kendo-pivotgrid-table>
383
460
  <kendo-pivotgrid-table
384
461
  #valuesTable
462
+ [colWidth]="columnHeadersWidth"
385
463
  class="k-pivotgrid-values"
386
464
  tableType="values"></kendo-pivotgrid-table>
387
465
 
@@ -393,7 +471,7 @@ PivotGridComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ver
393
471
  >
394
472
  </kendo-loader>
395
473
  </div>
396
- `, 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"] }, { type: i4.LoaderComponent, selector: "kendo-loader", inputs: ["type", "themeColor", "size"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
474
+ `, 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: i4.LoaderComponent, selector: "kendo-loader", inputs: ["type", "themeColor", "size"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
397
475
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PivotGridComponent, decorators: [{
398
476
  type: Component,
399
477
  args: [{
@@ -405,6 +483,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
405
483
  <span class="k-pivotgrid-empty-cell"></span>
406
484
  <kendo-pivotgrid-table
407
485
  #colHeadersTable
486
+ [colWidth]="columnHeadersWidth"
408
487
  class="k-pivotgrid-column-headers"
409
488
  tableType="columnHeader"></kendo-pivotgrid-table>
410
489
  <kendo-pivotgrid-table
@@ -413,6 +492,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
413
492
  tableType="rowHeader"></kendo-pivotgrid-table>
414
493
  <kendo-pivotgrid-table
415
494
  #valuesTable
495
+ [colWidth]="columnHeadersWidth"
416
496
  class="k-pivotgrid-values"
417
497
  tableType="values"></kendo-pivotgrid-table>
418
498
 
@@ -438,6 +518,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
438
518
  }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.NgZone }, { type: PivotGridDataService }, { type: i2$1.ScrollbarWidthService }]; }, propDecorators: { hostClass: [{
439
519
  type: HostBinding,
440
520
  args: ['class.k-pivotgrid']
521
+ }], ariaRole: [{
522
+ type: HostBinding,
523
+ args: ['attr.role']
441
524
  }], colHeadersTable: [{
442
525
  type: ViewChild,
443
526
  args: ['colHeadersTable', { read: ElementRef }]
@@ -449,6 +532,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
449
532
  args: ['valuesTable', { read: ElementRef }]
450
533
  }], loaderSettings: [{
451
534
  type: Input
535
+ }], columnHeadersWidth: [{
536
+ type: Input
452
537
  }] } });
453
538
 
454
539
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@progress/kendo-angular-pivotgrid",
3
- "version": "0.1.5-dev.202205170847",
3
+ "version": "0.2.0-dev.202208181233",
4
4
  "description": "PivotGrid package for Angular",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "author": "Progress",
@@ -31,10 +31,10 @@
31
31
  "@angular/core": "12 - 14",
32
32
  "@angular/forms": "12 - 14",
33
33
  "@progress/kendo-angular-common": "^3.0.0",
34
- "@progress/kendo-data-query": "^1.5.5",
35
34
  "@progress/kendo-angular-indicators": "^2.0.0",
36
35
  "@progress/kendo-angular-intl": "^4.0.0",
37
36
  "@progress/kendo-angular-l10n": "^4.0.0",
37
+ "@progress/kendo-data-query": "^1.5.5",
38
38
  "@progress/kendo-licensing": "^1.0.0",
39
39
  "rxjs": "^6.5.3 || ^7.0.0"
40
40
  },
@@ -70,11 +70,11 @@
70
70
  "fallbackTags": {
71
71
  "dev": "latest"
72
72
  },
73
- "analyzeCommits": "@telerik/semantic-prerelease/analyzeCommits",
73
+ "analyzeCommits": "@progress/semantic-prerelease/analyzeCommits",
74
74
  "generateNotes": "@progress/kendo-angular-tasks/lib/generateNotes",
75
- "getLastRelease": "@telerik/semantic-prerelease/getLastRelease",
76
- "verifyConditions": "@telerik/semantic-prerelease/verifyConditions",
77
- "verifyRelease": "@telerik/semantic-prerelease/verifyRelease"
75
+ "getLastRelease": "@progress/semantic-prerelease/getLastRelease",
76
+ "verifyConditions": "@progress/semantic-prerelease/verifyConditions",
77
+ "verifyRelease": "@progress/semantic-prerelease/verifyRelease"
78
78
  },
79
79
  "main": "bundles/kendo-angular-pivotgrid.umd.js",
80
80
  "module": "fesm2015/kendo-angular-pivotgrid.js",
@@ -15,6 +15,7 @@ export declare class PivotGridComponent implements AfterViewInit, AfterContentIn
15
15
  private zone;
16
16
  private dataService;
17
17
  hostClass: boolean;
18
+ ariaRole: string;
18
19
  private colHeadersTable;
19
20
  private rowHeadersTable;
20
21
  private valuesTable;
@@ -28,6 +29,12 @@ export declare class PivotGridComponent implements AfterViewInit, AfterContentIn
28
29
  */
29
30
  set loaderSettings(settings: LoaderSettings);
30
31
  get loaderSettings(): LoaderSettings;
32
+ /**
33
+ * Specify the width of the column header and data cells. Value is treated as pixels.
34
+ *
35
+ * @default 200
36
+ */
37
+ columnHeadersWidth: number;
31
38
  loading: boolean;
32
39
  private resizeObservers;
33
40
  private _loaderSettings;
@@ -39,5 +46,5 @@ export declare class PivotGridComponent implements AfterViewInit, AfterContentIn
39
46
  private resizeContainer;
40
47
  private handleScroll;
41
48
  static ɵfac: i0.ɵɵFactoryDeclaration<PivotGridComponent, never>;
42
- static ɵcmp: i0.ɵɵComponentDeclaration<PivotGridComponent, "kendo-pivotgrid", never, { "loaderSettings": "loaderSettings"; }, {}, never, never>;
49
+ static ɵcmp: i0.ɵɵComponentDeclaration<PivotGridComponent, "kendo-pivotgrid", never, { "loaderSettings": "loaderSettings"; "columnHeadersWidth": "columnHeadersWidth"; }, {}, never, never>;
43
50
  }
@@ -13,10 +13,12 @@ export declare class PivotGridTableComponent implements OnInit {
13
13
  headerItems: any;
14
14
  rows: any;
15
15
  tableType: string;
16
+ colWidth: number;
17
+ get pivotGridId(): string;
16
18
  private dataChangeSubs;
17
19
  constructor(dataService: PivotGridDataService);
18
20
  ngOnInit(): void;
19
21
  ngOnDestroy(): void;
20
22
  static ɵfac: i0.ɵɵFactoryDeclaration<PivotGridTableComponent, never>;
21
- static ɵcmp: i0.ɵɵComponentDeclaration<PivotGridTableComponent, "kendo-pivotgrid-table", never, { "tableType": "tableType"; }, {}, never, never>;
23
+ static ɵcmp: i0.ɵɵComponentDeclaration<PivotGridTableComponent, "kendo-pivotgrid-table", never, { "tableType": "tableType"; "colWidth": "colWidth"; }, {}, never, never>;
22
24
  }
package/util.d.ts CHANGED
@@ -24,3 +24,11 @@ export declare const syncScroll: (source: HTMLTableElement, targets: HTMLTableEl
24
24
  * @hidden
25
25
  */
26
26
  export declare const syncWheel: (event: Event, tables: Element[], prop: 'scrollTop' | 'scrollLeft', axis: 'X' | 'Y') => void;
27
+ /**
28
+ * @hidden
29
+ */
30
+ export declare const matchAriaAttributes: (wrapper: Element) => void;
31
+ /**
32
+ * @hidden
33
+ */
34
+ export declare const filterAndMap: (arr: any[], predicate: (item: any) => boolean, mapper: (item: any) => any) => any[];