@mescius/wijmo.angular2legacy.grid 5.20252.44 → 5.20261.45-nightly.d20260105.t014601
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es2015-commonjs.js +2 -2
- package/es2015-esm.js +2 -2
- package/es5-esm.js +2 -2
- package/index.d.ts +45 -45
- package/index.js +2 -2
- package/package.json +7 -7
package/es2015-commonjs.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
*
|
|
3
|
-
* Wijmo Library 5.
|
|
3
|
+
* Wijmo Library 5.20261.45-nightly.d20260105.t014601
|
|
4
4
|
* https://developer.mescius.com/wijmo
|
|
5
5
|
*
|
|
6
6
|
* Copyright(c) MESCIUS inc. All rights reserved.
|
|
@@ -11,4 +11,4 @@
|
|
|
11
11
|
*
|
|
12
12
|
*/
|
|
13
13
|
|
|
14
|
-
"use strict";var WjFlexGrid_1,WjFlexGridColumn_1,WjFlexGridColumnGroup_1,WjFlexGridCellTemplate_1,__decorate=this&&this.__decorate||function(e,t,r,i){var o,l=arguments.length,n=l<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(n=(l<3?o(n):l>3?o(t,r,n):o(t,r))||n);return l>3&&n&&Object.defineProperty(t,r,n),n},__param=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}},__importStar=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);t.default=e;return t};Object.defineProperty(exports,"__esModule",{value:!0});const core_1=require("@angular/core"),common_1=require("@angular/common"),forms_1=require("@angular/forms"),wijmo.angular2legacy_directivebase_1=require("@mescius/wijmo.angular2legacy.directivebase"),wijmo_interop_grid_1=require("@mescius/wijmo.interop.grid"),wjcCore=__importStar(require("@mescius/wijmo")),wjcGrid=__importStar(require("@mescius/wijmo.grid")),wjcInteropGrid=__importStar(require("@mescius/wijmo.interop.grid"));exports.CellTemplateType=wjcInteropGrid.GridCellTemplateType;var wjFlexGridMeta={selector:"wj-flex-grid",template:"<div><ng-content></ng-content></div>",inputs:["wjModelProperty","isDisabled","tabOrder","newRowAtTop","allowAddNew","allowDelete","allowDragging","allowMerging","allowResizing","allowSorting","allowPinning","autoScroll","autoRowHeights","autoSizeMode","autoGenerateColumns","autoSearch","caseSensitiveSearch","quickAutoSize","bigCheckboxes","childItemsPath","groupHeaderFormat","headersVisibility","showSelectedHeaders","showMarquee","showPlaceholders","itemFormatter","isReadOnly","imeEnabled","mergeManager","selectionMode","showGroups","showSort","showDropDown","showAlternatingRows","showErrors","alternatingRowStep","itemValidator","validateEdits","treeIndent","itemsSource","autoClipboard","expandSelectionOnCopyPaste","frozenCells","frozenRows","frozenColumns","cloneFrozenCells","deferResizing","sortRowIndex","editColumnIndex","stickyHeaders","preserveSelectedState","preserveOutlineState","preserveWhiteSpace","keyActionTab","keyActionEnter","rowHeaderPath","virtualizationThreshold","anchorCursor","lazyRender","refreshOnEdit","copyHeaders","columnGroups","commitEmptyEdits","headersFocusability","ariaLabel","skipMerged","pasteEmptyCells","groupSummaryPosition","sortOrder","noDataOverlayContent"],outputs:["initialized","gotFocusNg: gotFocus","lostFocusNg: lostFocus","refreshingNg: refreshing","refreshedNg: refreshed","invalidInputNg: invalidInput","beginningEditNg: beginningEdit","cellEditEndedNg: cellEditEnded","cellEditEndingNg: cellEditEnding","prepareCellForEditNg: prepareCellForEdit","formatItemNg: formatItem","resizingColumnNg: resizingColumn","resizedColumnNg: resizedColumn","autoSizingColumnNg: autoSizingColumn","autoSizedColumnNg: autoSizedColumn","draggingColumnNg: draggingColumn","draggingColumnOverNg: draggingColumnOver","draggedColumnNg: draggedColumn","sortingColumnNg: sortingColumn","sortedColumnNg: sortedColumn","pinningColumnNg: pinningColumn","pinnedColumnNg: pinnedColumn","resizingRowNg: resizingRow","resizedRowNg: resizedRow","autoSizingRowNg: autoSizingRow","autoSizedRowNg: autoSizedRow","draggingRowNg: draggingRow","draggingRowOverNg: draggingRowOver","draggedRowNg: draggedRow","deletingRowNg: deletingRow","deletedRowNg: deletedRow","loadingRowsNg: loadingRows","loadedRowsNg: loadedRows","rowEditStartingNg: rowEditStarting","rowEditStartedNg: rowEditStarted","rowEditEndingNg: rowEditEnding","rowEditEndedNg: rowEditEnded","rowAddedNg: rowAdded","groupCollapsedChangingNg: groupCollapsedChanging","groupCollapsedChangedNg: groupCollapsedChanged","columnGroupCollapsedChangingNg: columnGroupCollapsedChanging","columnGroupCollapsedChangedNg: columnGroupCollapsedChanged","itemsSourceChangingNg: itemsSourceChanging","itemsSourceChangedNg: itemsSourceChanged","selectionChangingNg: selectionChanging","selectionChangedNg: selectionChanged","scrollPositionChangedNg: scrollPositionChanged","updatingViewNg: updatingView","updatedViewNg: updatedView","updatingLayoutNg: updatingLayout","updatedLayoutNg: updatedLayout","pastingNg: pasting","pastedNg: pasted","pastingCellNg: pastingCell","pastedCellNg: pastedCell","copyingNg: copying","copiedNg: copied","gettingCellClipStringNg: gettingCellClipString"],providers:[{provide:forms_1.NG_VALUE_ACCESSOR,useFactory:wijmo.angular2legacy_directivebase_1.WjValueAccessorFactory,multi:!0,deps:["WjComponent"]}]};exports.wjFlexGridMeta=wjFlexGridMeta;let WjFlexGrid=WjFlexGrid_1=class WjFlexGrid extends wjcGrid.FlexGrid{constructor(e,t,r,i){super(wijmo.angular2legacy_directivebase_1.WjDirectiveBehavior.getHostElement(e,t));this.cdRef=i;this.isInitialized=!1;this._wjBehaviour=wijmo.angular2legacy_directivebase_1.WjDirectiveBehavior.attach(this,e,t,r);new DirectiveCellFactory(this,i);this.deferUpdate(()=>{if(this.rows.defaultSize<10){let e=this.hostElement,t=getComputedStyle(e),r=getComputedStyle(document.body),i=2*parseInt(t.fontSize&&wjcCore.contains(document.body,e)?t.fontSize:r.fontSize);this.rows.defaultSize=i;this.columns.defaultSize=4*i;this.columnHeaders.rows.defaultSize=i;this.rowHeaders.columns.defaultSize=Math.round(1.25*i)}});this.created()}created(){}ngOnInit(){this._wjBehaviour.ngOnInit()}ngAfterViewInit(){this._wjBehaviour.ngAfterViewInit()}ngOnDestroy(){this._wjBehaviour.ngOnDestroy()}addEventListener(e,t,r,i=!1){let o=wijmo.angular2legacy_directivebase_1.WjDirectiveBehavior,l=o.getZone(this);l&&o.outsideZoneEvents[t]?l.runOutsideAngular(()=>{super.addEventListener(e,t,r,i)}):super.addEventListener(e,t,r,i)}startEditing(e=!0,t,r,i,o){this._edtFocus=null;let l=super.startEditing(e,t,r,i,o);l&&(this._edtFocus=i||null==i);return l}onCellEditEnding(e){this._edtFocus=null;return super.onCellEditEnding(e)}};WjFlexGrid.meta={outputs:wjFlexGridMeta.outputs};WjFlexGrid=WjFlexGrid_1=__decorate([core_1.Component({selector:wjFlexGridMeta.selector,template:wjFlexGridMeta.template,inputs:wjFlexGridMeta.inputs,outputs:wjFlexGridMeta.outputs,providers:[{provide:"WjComponent",useExisting:core_1.forwardRef(()=>WjFlexGrid_1)},...wjFlexGridMeta.providers]}),__param(0,core_1.Inject(core_1.ElementRef)),__param(1,core_1.Inject(core_1.Injector)),__param(2,core_1.Inject("WjComponent")),__param(2,core_1.SkipSelf()),__param(2,core_1.Optional()),__param(3,core_1.Inject(core_1.ChangeDetectorRef))],WjFlexGrid);exports.WjFlexGrid=WjFlexGrid;var wjFlexGridColumnMeta={selector:"wj-flex-grid-column",template:"<div><ng-content></ng-content></div>",inputs:["asyncBindings","wjProperty","name","dataMap","dataType","binding","sortMemberPath","format","cellTemplate","header","width","maxLength","minWidth","maxWidth","align","allowDragging","allowSorting","allowResizing","allowMerging","aggregate","isReadOnly","cssClass","cssClassAll","isContentHtml","isSelected","visible","wordWrap","multiLine","mask","inputType","isRequired","showDropDown","dataMapEditor","dropDownCssClass","quickAutoSize","editor","placeholder","sortOrder"],outputs:["initialized","isSelectedChangePC: isSelectedChange"],providers:[]};exports.wjFlexGridColumnMeta=wjFlexGridColumnMeta;let WjFlexGridColumn=WjFlexGridColumn_1=class WjFlexGridColumn extends wjcGrid.Column{constructor(e,t,r,i){super();this.cdRef=i;this.isInitialized=!1;this.wjProperty="columns";let o=(this._wjBehaviour=wijmo.angular2legacy_directivebase_1.WjDirectiveBehavior.attach(this,e,t,r)).parentBehavior.directive;if(o.autoGenerateColumns){o.autoGenerateColumns=!1;o.columns.clear()}this.created()}created(){}ngOnInit(){this._wjBehaviour.ngOnInit()}ngAfterViewInit(){this._wjBehaviour.ngAfterViewInit()}ngOnDestroy(){this._wjBehaviour.ngOnDestroy()}};WjFlexGridColumn.meta={outputs:wjFlexGridColumnMeta.outputs,changeEvents:{"grid.selectionChanged":["isSelected"]}};WjFlexGridColumn=WjFlexGridColumn_1=__decorate([core_1.Component({selector:wjFlexGridColumnMeta.selector,template:wjFlexGridColumnMeta.template,inputs:wjFlexGridColumnMeta.inputs,outputs:wjFlexGridColumnMeta.outputs,providers:[{provide:"WjComponent",useExisting:core_1.forwardRef(()=>WjFlexGridColumn_1)},...wjFlexGridColumnMeta.providers]}),__param(0,core_1.Inject(core_1.ElementRef)),__param(1,core_1.Inject(core_1.Injector)),__param(2,core_1.Inject("WjComponent")),__param(2,core_1.SkipSelf()),__param(2,core_1.Optional()),__param(3,core_1.Inject(core_1.ChangeDetectorRef))],WjFlexGridColumn);exports.WjFlexGridColumn=WjFlexGridColumn;var wjFlexGridColumnGroupMeta={selector:"wj-flex-grid-column-group",template:"<div><ng-content></ng-content></div>",inputs:["asyncBindings","wjProperty","name","dataMap","dataType","binding","sortMemberPath","format","cellTemplate","header","width","maxLength","minWidth","maxWidth","align","allowDragging","allowSorting","allowResizing","allowMerging","aggregate","isReadOnly","cssClass","cssClassAll","isContentHtml","isSelected","visible","wordWrap","multiLine","mask","inputType","isRequired","showDropDown","dataMapEditor","dropDownCssClass","quickAutoSize","editor","placeholder","collapseTo","isCollapsed","height","sortOrder"],outputs:["initialized","isSelectedChangePC: isSelectedChange"],providers:[]};exports.wjFlexGridColumnGroupMeta=wjFlexGridColumnGroupMeta;let WjFlexGridColumnGroup=WjFlexGridColumnGroup_1=class WjFlexGridColumnGroup extends wjcGrid.ColumnGroup{constructor(e,t,r){super();this.isInitialized=!1;this.wjProperty="columnGroups";this._wjBehaviour=wijmo.angular2legacy_directivebase_1.WjDirectiveBehavior.attach(this,e,t,r);this.created()}created(){}ngOnInit(){this._wjBehaviour.ngOnInit()}ngAfterViewInit(){this._wjBehaviour.ngAfterViewInit()}ngOnDestroy(){this._wjBehaviour.ngOnDestroy()}};WjFlexGridColumnGroup.meta={outputs:wjFlexGridColumnGroupMeta.outputs,changeEvents:{"grid.selectionChanged":["isSelected"]}};WjFlexGridColumnGroup=WjFlexGridColumnGroup_1=__decorate([core_1.Component({selector:wjFlexGridColumnGroupMeta.selector,template:wjFlexGridColumnGroupMeta.template,inputs:wjFlexGridColumnGroupMeta.inputs,outputs:wjFlexGridColumnGroupMeta.outputs,providers:[{provide:"WjComponent",useExisting:core_1.forwardRef(()=>WjFlexGridColumnGroup_1)},...wjFlexGridColumnGroupMeta.providers]}),__param(0,core_1.Inject(core_1.ElementRef)),__param(1,core_1.Inject(core_1.Injector)),__param(2,core_1.Inject("WjComponent")),__param(2,core_1.SkipSelf()),__param(2,core_1.Optional())],WjFlexGridColumnGroup);exports.WjFlexGridColumnGroup=WjFlexGridColumnGroup;let WjFlexGridCellTemplate=WjFlexGridCellTemplate_1=class WjFlexGridCellTemplate{constructor(e,t,r,i,o,l){this.viewContainerRef=e;this.templateRef=t;this.elRef=r;this.cdRef=l;this.autoSizeRows=!0;this.forceFullEdit=!0;if(i instanceof wjcGrid.FlexGrid)this.grid=i;else if(i instanceof wjcGrid.Column){this.column=i;let e,t=wijmo.angular2legacy_directivebase_1.WjDirectiveBehavior.getBehavior(i);do{t=t.parentBehavior;e=t&&t.directive}while(e&&!(e instanceof wjcGrid.FlexGrid));this.grid=e}}set cellType(e){this.cellTypeStr=wjcCore.asEnum(e,exports.CellTemplateType)}get cellType(){return this.cellTypeStr}ngOnInit(){this.ownerControl=this.column&&this.column.grid===this.grid?this.column:this.grid;this._attachToControl()}ngOnDestroy(){if(exports.CellTemplateType[this.cellType]){this.viewContainerRef.clear();this.ownerControl[DirectiveCellFactory.getTemplContextProp(this.cellTypeStr)]=null;this.grid.invalidate()}}_instantiateTemplate(e,t){return wijmo.angular2legacy_directivebase_1.WjDirectiveBehavior.instantiateTemplate(e,this.viewContainerRef,this.templateRef,!1,t)}_attachToControl(){if(!exports.CellTemplateType[this.cellType])return;let e=this.cellTypeStr,t=this.ownerControl;t[DirectiveCellFactory.getTemplContextProp(e)]=this;t instanceof wjcGrid.Column&&(e===exports.CellTemplateType.Cell||e===exports.CellTemplateType.ColumnHeader||e===exports.CellTemplateType.ColumnFooter)&&t._setFlag(wjcGrid.RowColFlags.HasTemplate,!0);this.grid.invalidate()}};__decorate([core_1.Input()],WjFlexGridCellTemplate.prototype,"cellType",null);WjFlexGridCellTemplate=WjFlexGridCellTemplate_1=__decorate([core_1.Directive({selector:"[wjFlexGridCellTemplate]",inputs:["wjFlexGridCellTemplate","cellOverflow","valuePaths","autoSizeRows","forceFullEdit"],exportAs:"wjFlexGridCellTemplate",providers:[{provide:"WjComponent",useExisting:core_1.forwardRef(()=>WjFlexGridCellTemplate_1)}]}),__param(0,core_1.Inject(core_1.ViewContainerRef)),__param(1,core_1.Inject(core_1.TemplateRef)),__param(1,core_1.Optional()),__param(2,core_1.Inject(core_1.ElementRef)),__param(3,core_1.Inject("WjComponent")),__param(3,core_1.SkipSelf()),__param(3,core_1.Optional()),__param(4,core_1.Inject(core_1.Injector)),__param(5,core_1.Inject(core_1.ChangeDetectorRef))],WjFlexGridCellTemplate);exports.WjFlexGridCellTemplate=WjFlexGridCellTemplate;class DirectiveCellFactory extends wijmo_interop_grid_1.DirectiveCellFactoryBase{constructor(e,t){super(e);this._needsCdCheck=!1;this._gridCdRef=t;e.updatedView.addHandler(()=>{if(this._needsCdCheck){this._needsCdCheck=!1;this._gridCdRef.markForCheck()}},this)}_updatedViewHandler(){setTimeout(()=>{this._autoSizeIfRequired()})}shouldInstantiate(e){let t=e.templateCache;return null==t||t.column!==e.column||!t.viewRef||t.templateContextProperty!==e.templateContextProperty||e.cell.firstChild!=t.rootElement}renderTemplate(e,t){let r=e.row,i=t?{}:e.templateCache.viewRef.context,o=e.templateContext;e.cellBindingsData=this.setBindingsData(i,r,e.column,r.dataItem,e.cellValue,o.valuePaths);e.cellBindingsData.localVars.valueFormatted=e.cellValueFormatted;if(t){let t=e.cell,r=o._instantiateTemplate(t,i),l=e.templateCache={column:e.column,viewRef:r.viewRef,rootElement:r.rootElement,templateContextProperty:e.templateContextProperty};t[e.templateContextProperty]=l}}setBindingsData(e,t,r,i,o,l){this._needsCdCheck=!0;return super.setBindingsData(e,t,r,i,o,l)}disposeTemplate(e,t,r){if(t&&t.viewRef){if(r){let e=r.viewContainerRef.indexOf(t.viewRef);e>-1&&r.viewContainerRef.remove(e)}t.viewRef=null;super.disposeTemplate(e,t,r)}}clearCell(e){e.textContent=""}applyImmediately(e){e.templateContext.cdRef.detectChanges()}flushPendingEvents(e){if(e){let t=wijmo.angular2legacy_directivebase_1.WjDirectiveBehavior.getBehavior(e);t&&t.flushPendingEvents()}}getEditorFocusFlag(){return this.grid._edtFocus}setEditorFocusFlag(e){this.grid._edtFocus=e}checkHeight(e){wijmo.angular2legacy_directivebase_1.WjDirectiveBehavior.getZone(this.grid).runOutsideAngular(()=>{super.checkHeight(e)})}}exports.DirectiveCellFactory=DirectiveCellFactory;let moduleExports=[WjFlexGrid,WjFlexGridColumn,WjFlexGridColumnGroup,WjFlexGridCellTemplate],WjGridModule=class WjGridModule{};WjGridModule=__decorate([core_1.NgModule({imports:[common_1.CommonModule],declarations:[...moduleExports],exports:[...moduleExports]})],WjGridModule);exports.WjGridModule=WjGridModule;
|
|
14
|
+
"use strict";var WjFlexGrid_1,WjFlexGridColumn_1,WjFlexGridColumnGroup_1,WjFlexGridCellTemplate_1,__decorate=this&&this.__decorate||function(e,t,r,i){var o,l=arguments.length,n=l<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(n=(l<3?o(n):l>3?o(t,r,n):o(t,r))||n);return l>3&&n&&Object.defineProperty(t,r,n),n},__param=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}},__importStar=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);t.default=e;return t};Object.defineProperty(exports,"__esModule",{value:!0});const core_1=require("@angular/core"),common_1=require("@angular/common"),forms_1=require("@angular/forms"),wijmo.angular2legacy_directivebase_1=require("@mescius/wijmo.angular2legacy.directivebase"),wijmo_interop_grid_1=require("@mescius/wijmo.interop.grid"),wjcCore=__importStar(require("@mescius/wijmo")),wjcGrid=__importStar(require("@mescius/wijmo.grid")),wjcInteropGrid=__importStar(require("@mescius/wijmo.interop.grid"));exports.CellTemplateType=wjcInteropGrid.GridCellTemplateType;var wjFlexGridMeta={selector:"wj-flex-grid",template:"<div><ng-content></ng-content></div>",inputs:["wjModelProperty","isDisabled","tabOrder","newRowAtTop","allowAddNew","allowDelete","allowDragging","allowMerging","allowResizing","allowSorting","allowPinning","autoScroll","autoRowHeights","autoSizeMode","autoGenerateColumns","autoSearch","caseSensitiveSearch","quickAutoSize","bigCheckboxes","childItemsPath","groupHeaderFormat","headersVisibility","showSelectedHeaders","showMarquee","showPlaceholders","itemFormatter","isReadOnly","imeEnabled","mergeManager","selectionMode","showGroups","showSort","showDropDown","showAlternatingRows","showErrors","alternatingRowStep","itemValidator","validateEdits","treeIndent","itemsSource","autoClipboard","expandSelectionOnCopyPaste","frozenCells","frozenRows","frozenColumns","cloneFrozenCells","deferResizing","sortRowIndex","editColumnIndex","stickyHeaders","preserveSelectedState","preserveOutlineState","preserveWhiteSpace","keyActionTab","keyActionEnter","rowHeaderPath","virtualizationThreshold","anchorCursor","lazyRender","refreshOnEdit","copyHeaders","columnGroups","commitEmptyEdits","headersFocusability","ariaLabel","skipMerged","pasteEmptyCells","groupSummaryPosition","sortOrder","noDataOverlayContent"],outputs:["initialized","gotFocusNg: gotFocus","lostFocusNg: lostFocus","refreshingNg: refreshing","refreshedNg: refreshed","invalidInputNg: invalidInput","beginningEditNg: beginningEdit","cellEditEndedNg: cellEditEnded","cellEditEndingNg: cellEditEnding","prepareCellForEditNg: prepareCellForEdit","formatItemNg: formatItem","resizingColumnNg: resizingColumn","resizedColumnNg: resizedColumn","autoSizingColumnNg: autoSizingColumn","autoSizedColumnNg: autoSizedColumn","draggingColumnNg: draggingColumn","draggingColumnOverNg: draggingColumnOver","draggedColumnNg: draggedColumn","sortingColumnNg: sortingColumn","sortedColumnNg: sortedColumn","pinningColumnNg: pinningColumn","pinnedColumnNg: pinnedColumn","resizingRowNg: resizingRow","resizedRowNg: resizedRow","autoSizingRowNg: autoSizingRow","autoSizedRowNg: autoSizedRow","draggingRowNg: draggingRow","draggingRowOverNg: draggingRowOver","draggedRowNg: draggedRow","deletingRowNg: deletingRow","deletedRowNg: deletedRow","loadingRowsNg: loadingRows","loadedRowsNg: loadedRows","rowEditStartingNg: rowEditStarting","rowEditStartedNg: rowEditStarted","rowEditEndingNg: rowEditEnding","rowEditEndedNg: rowEditEnded","rowAddedNg: rowAdded","groupCollapsedChangingNg: groupCollapsedChanging","groupCollapsedChangedNg: groupCollapsedChanged","columnGroupCollapsedChangingNg: columnGroupCollapsedChanging","columnGroupCollapsedChangedNg: columnGroupCollapsedChanged","itemsSourceChangingNg: itemsSourceChanging","itemsSourceChangedNg: itemsSourceChanged","selectionChangingNg: selectionChanging","selectionChangedNg: selectionChanged","scrollPositionChangedNg: scrollPositionChanged","updatingViewNg: updatingView","updatedViewNg: updatedView","updatingLayoutNg: updatingLayout","updatedLayoutNg: updatedLayout","pastingNg: pasting","pastedNg: pasted","pastingCellNg: pastingCell","pastedCellNg: pastedCell","copyingNg: copying","copiedNg: copied","gettingCellClipStringNg: gettingCellClipString"],providers:[{provide:forms_1.NG_VALUE_ACCESSOR,useFactory:wijmo.angular2legacy_directivebase_1.WjValueAccessorFactory,multi:!0,deps:["WjComponent"]}]};exports.wjFlexGridMeta=wjFlexGridMeta;let WjFlexGrid=WjFlexGrid_1=class WjFlexGrid extends wjcGrid.FlexGrid{constructor(e,t,r,i){super(wijmo.angular2legacy_directivebase_1.WjDirectiveBehavior.getHostElement(e,t));this.cdRef=i;this.isInitialized=!1;this._wjBehaviour=wijmo.angular2legacy_directivebase_1.WjDirectiveBehavior.attach(this,e,t,r);new DirectiveCellFactory(this,i);this.deferUpdate(()=>{if(this.rows.defaultSize<10){const e=this.hostElement,t=getComputedStyle(e),r=getComputedStyle(document.body),i=2*parseInt(t.fontSize&&wjcCore.contains(document.body,e)?t.fontSize:r.fontSize);this.rows.defaultSize=i;this.columns.defaultSize=4*i;this.columnHeaders.rows.defaultSize=i;this.rowHeaders.columns.defaultSize=Math.round(1.25*i)}});this.created()}created(){}ngOnInit(){this._wjBehaviour.ngOnInit()}ngAfterViewInit(){this._wjBehaviour.ngAfterViewInit()}ngOnDestroy(){this._wjBehaviour.ngOnDestroy()}addEventListener(e,t,r,i=!1){const o=wijmo.angular2legacy_directivebase_1.WjDirectiveBehavior,l=o.getZone(this);l&&o.outsideZoneEvents[t]?l.runOutsideAngular(()=>{super.addEventListener(e,t,r,i)}):super.addEventListener(e,t,r,i)}startEditing(e=!0,t,r,i,o){this._edtFocus=null;const l=super.startEditing(e,t,r,i,o);l&&(this._edtFocus=i||null==i);return l}onCellEditEnding(e){this._edtFocus=null;return super.onCellEditEnding(e)}};WjFlexGrid.meta={outputs:wjFlexGridMeta.outputs};WjFlexGrid=WjFlexGrid_1=__decorate([core_1.Component({selector:wjFlexGridMeta.selector,template:wjFlexGridMeta.template,inputs:wjFlexGridMeta.inputs,outputs:wjFlexGridMeta.outputs,providers:[{provide:"WjComponent",useExisting:core_1.forwardRef(()=>WjFlexGrid_1)},...wjFlexGridMeta.providers]}),__param(0,core_1.Inject(core_1.ElementRef)),__param(1,core_1.Inject(core_1.Injector)),__param(2,core_1.Inject("WjComponent")),__param(2,core_1.SkipSelf()),__param(2,core_1.Optional()),__param(3,core_1.Inject(core_1.ChangeDetectorRef))],WjFlexGrid);exports.WjFlexGrid=WjFlexGrid;var wjFlexGridColumnMeta={selector:"wj-flex-grid-column",template:"<div><ng-content></ng-content></div>",inputs:["asyncBindings","wjProperty","name","dataMap","dataType","binding","sortMemberPath","format","cellTemplate","header","width","maxLength","minWidth","maxWidth","align","allowDragging","allowSorting","allowResizing","allowMerging","aggregate","isReadOnly","cssClass","cssClassAll","isContentHtml","isSelected","visible","wordWrap","multiLine","mask","inputType","isRequired","showDropDown","dataMapEditor","dropDownCssClass","quickAutoSize","editor","placeholder","sortOrder"],outputs:["initialized","isSelectedChangePC: isSelectedChange"],providers:[]};exports.wjFlexGridColumnMeta=wjFlexGridColumnMeta;let WjFlexGridColumn=WjFlexGridColumn_1=class WjFlexGridColumn extends wjcGrid.Column{constructor(e,t,r,i){super();this.cdRef=i;this.isInitialized=!1;this.wjProperty="columns";this._wjBehaviour=wijmo.angular2legacy_directivebase_1.WjDirectiveBehavior.attach(this,e,t,r);const o=this._wjBehaviour.parentBehavior.directive;if(o.autoGenerateColumns){o.autoGenerateColumns=!1;o.columns.clear()}this.created()}created(){}ngOnInit(){this._wjBehaviour.ngOnInit()}ngAfterViewInit(){this._wjBehaviour.ngAfterViewInit()}ngOnDestroy(){this._wjBehaviour.ngOnDestroy()}};WjFlexGridColumn.meta={outputs:wjFlexGridColumnMeta.outputs,changeEvents:{"grid.selectionChanged":["isSelected"]}};WjFlexGridColumn=WjFlexGridColumn_1=__decorate([core_1.Component({selector:wjFlexGridColumnMeta.selector,template:wjFlexGridColumnMeta.template,inputs:wjFlexGridColumnMeta.inputs,outputs:wjFlexGridColumnMeta.outputs,providers:[{provide:"WjComponent",useExisting:core_1.forwardRef(()=>WjFlexGridColumn_1)},...wjFlexGridColumnMeta.providers]}),__param(0,core_1.Inject(core_1.ElementRef)),__param(1,core_1.Inject(core_1.Injector)),__param(2,core_1.Inject("WjComponent")),__param(2,core_1.SkipSelf()),__param(2,core_1.Optional()),__param(3,core_1.Inject(core_1.ChangeDetectorRef))],WjFlexGridColumn);exports.WjFlexGridColumn=WjFlexGridColumn;var wjFlexGridColumnGroupMeta={selector:"wj-flex-grid-column-group",template:"<div><ng-content></ng-content></div>",inputs:["asyncBindings","wjProperty","name","dataMap","dataType","binding","sortMemberPath","format","cellTemplate","header","width","maxLength","minWidth","maxWidth","align","allowDragging","allowSorting","allowResizing","allowMerging","aggregate","isReadOnly","cssClass","cssClassAll","isContentHtml","isSelected","visible","wordWrap","multiLine","mask","inputType","isRequired","showDropDown","dataMapEditor","dropDownCssClass","quickAutoSize","editor","placeholder","collapseTo","isCollapsed","height","sortOrder"],outputs:["initialized","isSelectedChangePC: isSelectedChange"],providers:[]};exports.wjFlexGridColumnGroupMeta=wjFlexGridColumnGroupMeta;let WjFlexGridColumnGroup=WjFlexGridColumnGroup_1=class WjFlexGridColumnGroup extends wjcGrid.ColumnGroup{constructor(e,t,r){super();this.isInitialized=!1;this.wjProperty="columnGroups";this._wjBehaviour=wijmo.angular2legacy_directivebase_1.WjDirectiveBehavior.attach(this,e,t,r);this.created()}created(){}ngOnInit(){this._wjBehaviour.ngOnInit()}ngAfterViewInit(){this._wjBehaviour.ngAfterViewInit()}ngOnDestroy(){this._wjBehaviour.ngOnDestroy()}};WjFlexGridColumnGroup.meta={outputs:wjFlexGridColumnGroupMeta.outputs,changeEvents:{"grid.selectionChanged":["isSelected"]}};WjFlexGridColumnGroup=WjFlexGridColumnGroup_1=__decorate([core_1.Component({selector:wjFlexGridColumnGroupMeta.selector,template:wjFlexGridColumnGroupMeta.template,inputs:wjFlexGridColumnGroupMeta.inputs,outputs:wjFlexGridColumnGroupMeta.outputs,providers:[{provide:"WjComponent",useExisting:core_1.forwardRef(()=>WjFlexGridColumnGroup_1)},...wjFlexGridColumnGroupMeta.providers]}),__param(0,core_1.Inject(core_1.ElementRef)),__param(1,core_1.Inject(core_1.Injector)),__param(2,core_1.Inject("WjComponent")),__param(2,core_1.SkipSelf()),__param(2,core_1.Optional())],WjFlexGridColumnGroup);exports.WjFlexGridColumnGroup=WjFlexGridColumnGroup;let WjFlexGridCellTemplate=WjFlexGridCellTemplate_1=class WjFlexGridCellTemplate{constructor(e,t,r,i,o,l){this.viewContainerRef=e;this.templateRef=t;this.elRef=r;this.cdRef=l;this.autoSizeRows=!0;this.forceFullEdit=!0;if(i instanceof wjcGrid.FlexGrid)this.grid=i;else if(i instanceof wjcGrid.Column){this.column=i;let e=null,t=wijmo.angular2legacy_directivebase_1.WjDirectiveBehavior.getBehavior(i);do{t=t.parentBehavior;e=t?t.directive:null}while(e&&!(e instanceof wjcGrid.FlexGrid));this.grid=e}}set cellType(e){this.cellTypeStr=wjcCore.asEnum(e,exports.CellTemplateType)}get cellType(){return this.cellTypeStr}ngOnInit(){this.ownerControl=this.column&&this.column.grid===this.grid?this.column:this.grid;this._attachToControl()}ngOnDestroy(){if(exports.CellTemplateType[this.cellType]){this.viewContainerRef.clear();this.ownerControl[DirectiveCellFactory.getTemplContextProp(this.cellTypeStr)]=null;this.grid.invalidate()}}_instantiateTemplate(e,t){return wijmo.angular2legacy_directivebase_1.WjDirectiveBehavior.instantiateTemplate(e,this.viewContainerRef,this.templateRef,!1,t)}_attachToControl(){if(!exports.CellTemplateType[this.cellType])return;const e=this.cellTypeStr,t=this.ownerControl;t[DirectiveCellFactory.getTemplContextProp(e)]=this;t instanceof wjcGrid.Column&&(e===exports.CellTemplateType.Cell||e===exports.CellTemplateType.ColumnHeader||e===exports.CellTemplateType.ColumnFooter)&&t._setFlag(wjcGrid.RowColFlags.HasTemplate,!0);this.grid.invalidate()}};__decorate([core_1.Input()],WjFlexGridCellTemplate.prototype,"cellType",null);WjFlexGridCellTemplate=WjFlexGridCellTemplate_1=__decorate([core_1.Directive({selector:"[wjFlexGridCellTemplate]",inputs:["wjFlexGridCellTemplate","cellOverflow","valuePaths","autoSizeRows","forceFullEdit"],exportAs:"wjFlexGridCellTemplate",providers:[{provide:"WjComponent",useExisting:core_1.forwardRef(()=>WjFlexGridCellTemplate_1)}]}),__param(0,core_1.Inject(core_1.ViewContainerRef)),__param(1,core_1.Inject(core_1.TemplateRef)),__param(1,core_1.Optional()),__param(2,core_1.Inject(core_1.ElementRef)),__param(3,core_1.Inject("WjComponent")),__param(3,core_1.SkipSelf()),__param(3,core_1.Optional()),__param(4,core_1.Inject(core_1.Injector)),__param(5,core_1.Inject(core_1.ChangeDetectorRef))],WjFlexGridCellTemplate);exports.WjFlexGridCellTemplate=WjFlexGridCellTemplate;class DirectiveCellFactory extends wijmo_interop_grid_1.DirectiveCellFactoryBase{constructor(e,t){super(e);this._needsCdCheck=!1;this._gridCdRef=t;e.updatedView.addHandler(()=>{if(this._needsCdCheck){this._needsCdCheck=!1;this._gridCdRef.markForCheck()}},this)}_updatedViewHandler(){setTimeout(()=>{this._autoSizeIfRequired()})}shouldInstantiate(e){const t=e.templateCache;return null==t||t.column!==e.column||!t.viewRef||t.templateContextProperty!==e.templateContextProperty||e.cell.firstChild!=t.rootElement}renderTemplate(e,t){const r=e.row,i=t?{}:e.templateCache.viewRef.context,o=e.templateContext;e.cellBindingsData=this.setBindingsData(i,r,e.column,r.dataItem,e.cellValue,o.valuePaths);e.cellBindingsData.localVars.valueFormatted=e.cellValueFormatted;if(t){const t=e.cell,r=o._instantiateTemplate(t,i),l={column:e.column,viewRef:r.viewRef,rootElement:r.rootElement,templateContextProperty:e.templateContextProperty};e.templateCache=l;t[e.templateContextProperty]=l}}setBindingsData(e,t,r,i,o,l){this._needsCdCheck=!0;return super.setBindingsData(e,t,r,i,o,l)}disposeTemplate(e,t,r){if(t&&t.viewRef){if(r){const e=r.viewContainerRef.indexOf(t.viewRef);e>-1&&r.viewContainerRef.remove(e)}t.viewRef=null;super.disposeTemplate(e,t,r)}}clearCell(e){e.textContent=""}applyImmediately(e){e.templateContext.cdRef.detectChanges()}flushPendingEvents(e){if(e){const t=wijmo.angular2legacy_directivebase_1.WjDirectiveBehavior.getBehavior(e);t&&t.flushPendingEvents()}}getEditorFocusFlag(){return this.grid._edtFocus}setEditorFocusFlag(e){this.grid._edtFocus=e}checkHeight(e){wijmo.angular2legacy_directivebase_1.WjDirectiveBehavior.getZone(this.grid).runOutsideAngular(()=>{super.checkHeight(e)})}}exports.DirectiveCellFactory=DirectiveCellFactory;const moduleExports=[WjFlexGrid,WjFlexGridColumn,WjFlexGridColumnGroup,WjFlexGridCellTemplate];let WjGridModule=class WjGridModule{};WjGridModule=__decorate([core_1.NgModule({imports:[common_1.CommonModule],declarations:[...moduleExports],exports:[...moduleExports]})],WjGridModule);exports.WjGridModule=WjGridModule;
|
package/es2015-esm.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
*
|
|
3
|
-
* Wijmo Library 5.
|
|
3
|
+
* Wijmo Library 5.20261.45-nightly.d20260105.t014601
|
|
4
4
|
* https://developer.mescius.com/wijmo
|
|
5
5
|
*
|
|
6
6
|
* Copyright(c) MESCIUS inc. All rights reserved.
|
|
@@ -11,4 +11,4 @@
|
|
|
11
11
|
*
|
|
12
12
|
*/
|
|
13
13
|
|
|
14
|
-
var WjFlexGrid_1,WjFlexGridColumn_1,WjFlexGridColumnGroup_1,WjFlexGridCellTemplate_1,__decorate=this&&this.__decorate||function(e,t,i,o){var r,l=arguments.length,n=l<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(n=(l<3?r(n):l>3?r(t,i,n):r(t,i))||n);return l>3&&n&&Object.defineProperty(t,i,n),n},__param=this&&this.__param||function(e,t){return function(i,o){t(i,o,e)}};import{Component,NgModule,ElementRef,Injector,Directive,ViewContainerRef,TemplateRef,Optional,forwardRef,Input,Inject,ChangeDetectorRef,SkipSelf}from"@angular/core";import{CommonModule}from"@angular/common";import{NG_VALUE_ACCESSOR}from"@angular/forms";import{WjDirectiveBehavior,WjValueAccessorFactory}from"@mescius/wijmo.angular2legacy.directivebase";import{DirectiveCellFactoryBase}from"@mescius/wijmo.interop.grid";import*as wjcCore from"@mescius/wijmo";import*as wjcGrid from"@mescius/wijmo.grid";import*as wjcInteropGrid from"@mescius/wijmo.interop.grid";export var CellTemplateType=wjcInteropGrid.GridCellTemplateType;var wjFlexGridMeta={selector:"wj-flex-grid",template:"<div><ng-content></ng-content></div>",inputs:["wjModelProperty","isDisabled","tabOrder","newRowAtTop","allowAddNew","allowDelete","allowDragging","allowMerging","allowResizing","allowSorting","allowPinning","autoScroll","autoRowHeights","autoSizeMode","autoGenerateColumns","autoSearch","caseSensitiveSearch","quickAutoSize","bigCheckboxes","childItemsPath","groupHeaderFormat","headersVisibility","showSelectedHeaders","showMarquee","showPlaceholders","itemFormatter","isReadOnly","imeEnabled","mergeManager","selectionMode","showGroups","showSort","showDropDown","showAlternatingRows","showErrors","alternatingRowStep","itemValidator","validateEdits","treeIndent","itemsSource","autoClipboard","expandSelectionOnCopyPaste","frozenCells","frozenRows","frozenColumns","cloneFrozenCells","deferResizing","sortRowIndex","editColumnIndex","stickyHeaders","preserveSelectedState","preserveOutlineState","preserveWhiteSpace","keyActionTab","keyActionEnter","rowHeaderPath","virtualizationThreshold","anchorCursor","lazyRender","refreshOnEdit","copyHeaders","columnGroups","commitEmptyEdits","headersFocusability","ariaLabel","skipMerged","pasteEmptyCells","groupSummaryPosition","sortOrder","noDataOverlayContent"],outputs:["initialized","gotFocusNg: gotFocus","lostFocusNg: lostFocus","refreshingNg: refreshing","refreshedNg: refreshed","invalidInputNg: invalidInput","beginningEditNg: beginningEdit","cellEditEndedNg: cellEditEnded","cellEditEndingNg: cellEditEnding","prepareCellForEditNg: prepareCellForEdit","formatItemNg: formatItem","resizingColumnNg: resizingColumn","resizedColumnNg: resizedColumn","autoSizingColumnNg: autoSizingColumn","autoSizedColumnNg: autoSizedColumn","draggingColumnNg: draggingColumn","draggingColumnOverNg: draggingColumnOver","draggedColumnNg: draggedColumn","sortingColumnNg: sortingColumn","sortedColumnNg: sortedColumn","pinningColumnNg: pinningColumn","pinnedColumnNg: pinnedColumn","resizingRowNg: resizingRow","resizedRowNg: resizedRow","autoSizingRowNg: autoSizingRow","autoSizedRowNg: autoSizedRow","draggingRowNg: draggingRow","draggingRowOverNg: draggingRowOver","draggedRowNg: draggedRow","deletingRowNg: deletingRow","deletedRowNg: deletedRow","loadingRowsNg: loadingRows","loadedRowsNg: loadedRows","rowEditStartingNg: rowEditStarting","rowEditStartedNg: rowEditStarted","rowEditEndingNg: rowEditEnding","rowEditEndedNg: rowEditEnded","rowAddedNg: rowAdded","groupCollapsedChangingNg: groupCollapsedChanging","groupCollapsedChangedNg: groupCollapsedChanged","columnGroupCollapsedChangingNg: columnGroupCollapsedChanging","columnGroupCollapsedChangedNg: columnGroupCollapsedChanged","itemsSourceChangingNg: itemsSourceChanging","itemsSourceChangedNg: itemsSourceChanged","selectionChangingNg: selectionChanging","selectionChangedNg: selectionChanged","scrollPositionChangedNg: scrollPositionChanged","updatingViewNg: updatingView","updatedViewNg: updatedView","updatingLayoutNg: updatingLayout","updatedLayoutNg: updatedLayout","pastingNg: pasting","pastedNg: pasted","pastingCellNg: pastingCell","pastedCellNg: pastedCell","copyingNg: copying","copiedNg: copied","gettingCellClipStringNg: gettingCellClipString"],providers:[{provide:NG_VALUE_ACCESSOR,useFactory:WjValueAccessorFactory,multi:!0,deps:["WjComponent"]}]};export{wjFlexGridMeta};let WjFlexGrid=WjFlexGrid_1=class WjFlexGrid extends wjcGrid.FlexGrid{constructor(e,t,i,o){super(WjDirectiveBehavior.getHostElement(e,t));this.cdRef=o;this.isInitialized=!1;this._wjBehaviour=WjDirectiveBehavior.attach(this,e,t,i);new DirectiveCellFactory(this,o);this.deferUpdate(()=>{if(this.rows.defaultSize<10){let e=this.hostElement,t=getComputedStyle(e),i=getComputedStyle(document.body),o=2*parseInt(t.fontSize&&wjcCore.contains(document.body,e)?t.fontSize:i.fontSize);this.rows.defaultSize=o;this.columns.defaultSize=4*o;this.columnHeaders.rows.defaultSize=o;this.rowHeaders.columns.defaultSize=Math.round(1.25*o)}});this.created()}created(){}ngOnInit(){this._wjBehaviour.ngOnInit()}ngAfterViewInit(){this._wjBehaviour.ngAfterViewInit()}ngOnDestroy(){this._wjBehaviour.ngOnDestroy()}addEventListener(e,t,i,o=!1){let r=WjDirectiveBehavior,l=r.getZone(this);l&&r.outsideZoneEvents[t]?l.runOutsideAngular(()=>{super.addEventListener(e,t,i,o)}):super.addEventListener(e,t,i,o)}startEditing(e=!0,t,i,o,r){this._edtFocus=null;let l=super.startEditing(e,t,i,o,r);l&&(this._edtFocus=o||null==o);return l}onCellEditEnding(e){this._edtFocus=null;return super.onCellEditEnding(e)}};WjFlexGrid.meta={outputs:wjFlexGridMeta.outputs};WjFlexGrid=WjFlexGrid_1=__decorate([Component({selector:wjFlexGridMeta.selector,template:wjFlexGridMeta.template,inputs:wjFlexGridMeta.inputs,outputs:wjFlexGridMeta.outputs,providers:[{provide:"WjComponent",useExisting:forwardRef(()=>WjFlexGrid_1)},...wjFlexGridMeta.providers]}),__param(0,Inject(ElementRef)),__param(1,Inject(Injector)),__param(2,Inject("WjComponent")),__param(2,SkipSelf()),__param(2,Optional()),__param(3,Inject(ChangeDetectorRef))],WjFlexGrid);export{WjFlexGrid};var wjFlexGridColumnMeta={selector:"wj-flex-grid-column",template:"<div><ng-content></ng-content></div>",inputs:["asyncBindings","wjProperty","name","dataMap","dataType","binding","sortMemberPath","format","cellTemplate","header","width","maxLength","minWidth","maxWidth","align","allowDragging","allowSorting","allowResizing","allowMerging","aggregate","isReadOnly","cssClass","cssClassAll","isContentHtml","isSelected","visible","wordWrap","multiLine","mask","inputType","isRequired","showDropDown","dataMapEditor","dropDownCssClass","quickAutoSize","editor","placeholder","sortOrder"],outputs:["initialized","isSelectedChangePC: isSelectedChange"],providers:[]};export{wjFlexGridColumnMeta};let WjFlexGridColumn=WjFlexGridColumn_1=class WjFlexGridColumn extends wjcGrid.Column{constructor(e,t,i,o){super();this.cdRef=o;this.isInitialized=!1;this.wjProperty="columns";let r=(this._wjBehaviour=WjDirectiveBehavior.attach(this,e,t,i)).parentBehavior.directive;if(r.autoGenerateColumns){r.autoGenerateColumns=!1;r.columns.clear()}this.created()}created(){}ngOnInit(){this._wjBehaviour.ngOnInit()}ngAfterViewInit(){this._wjBehaviour.ngAfterViewInit()}ngOnDestroy(){this._wjBehaviour.ngOnDestroy()}};WjFlexGridColumn.meta={outputs:wjFlexGridColumnMeta.outputs,changeEvents:{"grid.selectionChanged":["isSelected"]}};WjFlexGridColumn=WjFlexGridColumn_1=__decorate([Component({selector:wjFlexGridColumnMeta.selector,template:wjFlexGridColumnMeta.template,inputs:wjFlexGridColumnMeta.inputs,outputs:wjFlexGridColumnMeta.outputs,providers:[{provide:"WjComponent",useExisting:forwardRef(()=>WjFlexGridColumn_1)},...wjFlexGridColumnMeta.providers]}),__param(0,Inject(ElementRef)),__param(1,Inject(Injector)),__param(2,Inject("WjComponent")),__param(2,SkipSelf()),__param(2,Optional()),__param(3,Inject(ChangeDetectorRef))],WjFlexGridColumn);export{WjFlexGridColumn};var wjFlexGridColumnGroupMeta={selector:"wj-flex-grid-column-group",template:"<div><ng-content></ng-content></div>",inputs:["asyncBindings","wjProperty","name","dataMap","dataType","binding","sortMemberPath","format","cellTemplate","header","width","maxLength","minWidth","maxWidth","align","allowDragging","allowSorting","allowResizing","allowMerging","aggregate","isReadOnly","cssClass","cssClassAll","isContentHtml","isSelected","visible","wordWrap","multiLine","mask","inputType","isRequired","showDropDown","dataMapEditor","dropDownCssClass","quickAutoSize","editor","placeholder","collapseTo","isCollapsed","height","sortOrder"],outputs:["initialized","isSelectedChangePC: isSelectedChange"],providers:[]};export{wjFlexGridColumnGroupMeta};let WjFlexGridColumnGroup=WjFlexGridColumnGroup_1=class WjFlexGridColumnGroup extends wjcGrid.ColumnGroup{constructor(e,t,i){super();this.isInitialized=!1;this.wjProperty="columnGroups";this._wjBehaviour=WjDirectiveBehavior.attach(this,e,t,i);this.created()}created(){}ngOnInit(){this._wjBehaviour.ngOnInit()}ngAfterViewInit(){this._wjBehaviour.ngAfterViewInit()}ngOnDestroy(){this._wjBehaviour.ngOnDestroy()}};WjFlexGridColumnGroup.meta={outputs:wjFlexGridColumnGroupMeta.outputs,changeEvents:{"grid.selectionChanged":["isSelected"]}};WjFlexGridColumnGroup=WjFlexGridColumnGroup_1=__decorate([Component({selector:wjFlexGridColumnGroupMeta.selector,template:wjFlexGridColumnGroupMeta.template,inputs:wjFlexGridColumnGroupMeta.inputs,outputs:wjFlexGridColumnGroupMeta.outputs,providers:[{provide:"WjComponent",useExisting:forwardRef(()=>WjFlexGridColumnGroup_1)},...wjFlexGridColumnGroupMeta.providers]}),__param(0,Inject(ElementRef)),__param(1,Inject(Injector)),__param(2,Inject("WjComponent")),__param(2,SkipSelf()),__param(2,Optional())],WjFlexGridColumnGroup);export{WjFlexGridColumnGroup};let WjFlexGridCellTemplate=WjFlexGridCellTemplate_1=class WjFlexGridCellTemplate{constructor(e,t,i,o,r,l){this.viewContainerRef=e;this.templateRef=t;this.elRef=i;this.cdRef=l;this.autoSizeRows=!0;this.forceFullEdit=!0;if(o instanceof wjcGrid.FlexGrid)this.grid=o;else if(o instanceof wjcGrid.Column){this.column=o;let e,t=WjDirectiveBehavior.getBehavior(o);do{t=t.parentBehavior;e=t&&t.directive}while(e&&!(e instanceof wjcGrid.FlexGrid));this.grid=e}}set cellType(e){this.cellTypeStr=wjcCore.asEnum(e,CellTemplateType)}get cellType(){return this.cellTypeStr}ngOnInit(){this.ownerControl=this.column&&this.column.grid===this.grid?this.column:this.grid;this._attachToControl()}ngOnDestroy(){if(CellTemplateType[this.cellType]){this.viewContainerRef.clear();this.ownerControl[DirectiveCellFactory.getTemplContextProp(this.cellTypeStr)]=null;this.grid.invalidate()}}_instantiateTemplate(e,t){return WjDirectiveBehavior.instantiateTemplate(e,this.viewContainerRef,this.templateRef,!1,t)}_attachToControl(){if(!CellTemplateType[this.cellType])return;let e=this.cellTypeStr,t=this.ownerControl;t[DirectiveCellFactory.getTemplContextProp(e)]=this;t instanceof wjcGrid.Column&&(e===CellTemplateType.Cell||e===CellTemplateType.ColumnHeader||e===CellTemplateType.ColumnFooter)&&t._setFlag(wjcGrid.RowColFlags.HasTemplate,!0);this.grid.invalidate()}};__decorate([Input()],WjFlexGridCellTemplate.prototype,"cellType",null);WjFlexGridCellTemplate=WjFlexGridCellTemplate_1=__decorate([Directive({selector:"[wjFlexGridCellTemplate]",inputs:["wjFlexGridCellTemplate","cellOverflow","valuePaths","autoSizeRows","forceFullEdit"],exportAs:"wjFlexGridCellTemplate",providers:[{provide:"WjComponent",useExisting:forwardRef(()=>WjFlexGridCellTemplate_1)}]}),__param(0,Inject(ViewContainerRef)),__param(1,Inject(TemplateRef)),__param(1,Optional()),__param(2,Inject(ElementRef)),__param(3,Inject("WjComponent")),__param(3,SkipSelf()),__param(3,Optional()),__param(4,Inject(Injector)),__param(5,Inject(ChangeDetectorRef))],WjFlexGridCellTemplate);export{WjFlexGridCellTemplate};export class DirectiveCellFactory extends DirectiveCellFactoryBase{constructor(e,t){super(e);this._needsCdCheck=!1;this._gridCdRef=t;e.updatedView.addHandler(()=>{if(this._needsCdCheck){this._needsCdCheck=!1;this._gridCdRef.markForCheck()}},this)}_updatedViewHandler(){setTimeout(()=>{this._autoSizeIfRequired()})}shouldInstantiate(e){let t=e.templateCache;return null==t||t.column!==e.column||!t.viewRef||t.templateContextProperty!==e.templateContextProperty||e.cell.firstChild!=t.rootElement}renderTemplate(e,t){let i=e.row,o=t?{}:e.templateCache.viewRef.context,r=e.templateContext;e.cellBindingsData=this.setBindingsData(o,i,e.column,i.dataItem,e.cellValue,r.valuePaths);e.cellBindingsData.localVars.valueFormatted=e.cellValueFormatted;if(t){let t=e.cell,i=r._instantiateTemplate(t,o),l=e.templateCache={column:e.column,viewRef:i.viewRef,rootElement:i.rootElement,templateContextProperty:e.templateContextProperty};t[e.templateContextProperty]=l}}setBindingsData(e,t,i,o,r,l){this._needsCdCheck=!0;return super.setBindingsData(e,t,i,o,r,l)}disposeTemplate(e,t,i){if(t&&t.viewRef){if(i){let e=i.viewContainerRef.indexOf(t.viewRef);e>-1&&i.viewContainerRef.remove(e)}t.viewRef=null;super.disposeTemplate(e,t,i)}}clearCell(e){e.textContent=""}applyImmediately(e){e.templateContext.cdRef.detectChanges()}flushPendingEvents(e){if(e){let t=WjDirectiveBehavior.getBehavior(e);t&&t.flushPendingEvents()}}getEditorFocusFlag(){return this.grid._edtFocus}setEditorFocusFlag(e){this.grid._edtFocus=e}checkHeight(e){WjDirectiveBehavior.getZone(this.grid).runOutsideAngular(()=>{super.checkHeight(e)})}}let moduleExports=[WjFlexGrid,WjFlexGridColumn,WjFlexGridColumnGroup,WjFlexGridCellTemplate],WjGridModule=class WjGridModule{};WjGridModule=__decorate([NgModule({imports:[CommonModule],declarations:[...moduleExports],exports:[...moduleExports]})],WjGridModule);export{WjGridModule};
|
|
14
|
+
var WjFlexGrid_1,WjFlexGridColumn_1,WjFlexGridColumnGroup_1,WjFlexGridCellTemplate_1,__decorate=this&&this.__decorate||function(e,t,i,o){var r,l=arguments.length,n=l<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(n=(l<3?r(n):l>3?r(t,i,n):r(t,i))||n);return l>3&&n&&Object.defineProperty(t,i,n),n},__param=this&&this.__param||function(e,t){return function(i,o){t(i,o,e)}};import{Component,NgModule,ElementRef,Injector,Directive,ViewContainerRef,TemplateRef,Optional,forwardRef,Input,Inject,ChangeDetectorRef,SkipSelf}from"@angular/core";import{CommonModule}from"@angular/common";import{NG_VALUE_ACCESSOR}from"@angular/forms";import{WjDirectiveBehavior,WjValueAccessorFactory}from"@mescius/wijmo.angular2legacy.directivebase";import{DirectiveCellFactoryBase}from"@mescius/wijmo.interop.grid";import*as wjcCore from"@mescius/wijmo";import*as wjcGrid from"@mescius/wijmo.grid";import*as wjcInteropGrid from"@mescius/wijmo.interop.grid";export var CellTemplateType=wjcInteropGrid.GridCellTemplateType;var wjFlexGridMeta={selector:"wj-flex-grid",template:"<div><ng-content></ng-content></div>",inputs:["wjModelProperty","isDisabled","tabOrder","newRowAtTop","allowAddNew","allowDelete","allowDragging","allowMerging","allowResizing","allowSorting","allowPinning","autoScroll","autoRowHeights","autoSizeMode","autoGenerateColumns","autoSearch","caseSensitiveSearch","quickAutoSize","bigCheckboxes","childItemsPath","groupHeaderFormat","headersVisibility","showSelectedHeaders","showMarquee","showPlaceholders","itemFormatter","isReadOnly","imeEnabled","mergeManager","selectionMode","showGroups","showSort","showDropDown","showAlternatingRows","showErrors","alternatingRowStep","itemValidator","validateEdits","treeIndent","itemsSource","autoClipboard","expandSelectionOnCopyPaste","frozenCells","frozenRows","frozenColumns","cloneFrozenCells","deferResizing","sortRowIndex","editColumnIndex","stickyHeaders","preserveSelectedState","preserveOutlineState","preserveWhiteSpace","keyActionTab","keyActionEnter","rowHeaderPath","virtualizationThreshold","anchorCursor","lazyRender","refreshOnEdit","copyHeaders","columnGroups","commitEmptyEdits","headersFocusability","ariaLabel","skipMerged","pasteEmptyCells","groupSummaryPosition","sortOrder","noDataOverlayContent"],outputs:["initialized","gotFocusNg: gotFocus","lostFocusNg: lostFocus","refreshingNg: refreshing","refreshedNg: refreshed","invalidInputNg: invalidInput","beginningEditNg: beginningEdit","cellEditEndedNg: cellEditEnded","cellEditEndingNg: cellEditEnding","prepareCellForEditNg: prepareCellForEdit","formatItemNg: formatItem","resizingColumnNg: resizingColumn","resizedColumnNg: resizedColumn","autoSizingColumnNg: autoSizingColumn","autoSizedColumnNg: autoSizedColumn","draggingColumnNg: draggingColumn","draggingColumnOverNg: draggingColumnOver","draggedColumnNg: draggedColumn","sortingColumnNg: sortingColumn","sortedColumnNg: sortedColumn","pinningColumnNg: pinningColumn","pinnedColumnNg: pinnedColumn","resizingRowNg: resizingRow","resizedRowNg: resizedRow","autoSizingRowNg: autoSizingRow","autoSizedRowNg: autoSizedRow","draggingRowNg: draggingRow","draggingRowOverNg: draggingRowOver","draggedRowNg: draggedRow","deletingRowNg: deletingRow","deletedRowNg: deletedRow","loadingRowsNg: loadingRows","loadedRowsNg: loadedRows","rowEditStartingNg: rowEditStarting","rowEditStartedNg: rowEditStarted","rowEditEndingNg: rowEditEnding","rowEditEndedNg: rowEditEnded","rowAddedNg: rowAdded","groupCollapsedChangingNg: groupCollapsedChanging","groupCollapsedChangedNg: groupCollapsedChanged","columnGroupCollapsedChangingNg: columnGroupCollapsedChanging","columnGroupCollapsedChangedNg: columnGroupCollapsedChanged","itemsSourceChangingNg: itemsSourceChanging","itemsSourceChangedNg: itemsSourceChanged","selectionChangingNg: selectionChanging","selectionChangedNg: selectionChanged","scrollPositionChangedNg: scrollPositionChanged","updatingViewNg: updatingView","updatedViewNg: updatedView","updatingLayoutNg: updatingLayout","updatedLayoutNg: updatedLayout","pastingNg: pasting","pastedNg: pasted","pastingCellNg: pastingCell","pastedCellNg: pastedCell","copyingNg: copying","copiedNg: copied","gettingCellClipStringNg: gettingCellClipString"],providers:[{provide:NG_VALUE_ACCESSOR,useFactory:WjValueAccessorFactory,multi:!0,deps:["WjComponent"]}]};export{wjFlexGridMeta};let WjFlexGrid=WjFlexGrid_1=class WjFlexGrid extends wjcGrid.FlexGrid{constructor(e,t,i,o){super(WjDirectiveBehavior.getHostElement(e,t));this.cdRef=o;this.isInitialized=!1;this._wjBehaviour=WjDirectiveBehavior.attach(this,e,t,i);new DirectiveCellFactory(this,o);this.deferUpdate(()=>{if(this.rows.defaultSize<10){const e=this.hostElement,t=getComputedStyle(e),i=getComputedStyle(document.body),o=2*parseInt(t.fontSize&&wjcCore.contains(document.body,e)?t.fontSize:i.fontSize);this.rows.defaultSize=o;this.columns.defaultSize=4*o;this.columnHeaders.rows.defaultSize=o;this.rowHeaders.columns.defaultSize=Math.round(1.25*o)}});this.created()}created(){}ngOnInit(){this._wjBehaviour.ngOnInit()}ngAfterViewInit(){this._wjBehaviour.ngAfterViewInit()}ngOnDestroy(){this._wjBehaviour.ngOnDestroy()}addEventListener(e,t,i,o=!1){const r=WjDirectiveBehavior,l=r.getZone(this);l&&r.outsideZoneEvents[t]?l.runOutsideAngular(()=>{super.addEventListener(e,t,i,o)}):super.addEventListener(e,t,i,o)}startEditing(e=!0,t,i,o,r){this._edtFocus=null;const l=super.startEditing(e,t,i,o,r);l&&(this._edtFocus=o||null==o);return l}onCellEditEnding(e){this._edtFocus=null;return super.onCellEditEnding(e)}};WjFlexGrid.meta={outputs:wjFlexGridMeta.outputs};WjFlexGrid=WjFlexGrid_1=__decorate([Component({selector:wjFlexGridMeta.selector,template:wjFlexGridMeta.template,inputs:wjFlexGridMeta.inputs,outputs:wjFlexGridMeta.outputs,providers:[{provide:"WjComponent",useExisting:forwardRef(()=>WjFlexGrid_1)},...wjFlexGridMeta.providers]}),__param(0,Inject(ElementRef)),__param(1,Inject(Injector)),__param(2,Inject("WjComponent")),__param(2,SkipSelf()),__param(2,Optional()),__param(3,Inject(ChangeDetectorRef))],WjFlexGrid);export{WjFlexGrid};var wjFlexGridColumnMeta={selector:"wj-flex-grid-column",template:"<div><ng-content></ng-content></div>",inputs:["asyncBindings","wjProperty","name","dataMap","dataType","binding","sortMemberPath","format","cellTemplate","header","width","maxLength","minWidth","maxWidth","align","allowDragging","allowSorting","allowResizing","allowMerging","aggregate","isReadOnly","cssClass","cssClassAll","isContentHtml","isSelected","visible","wordWrap","multiLine","mask","inputType","isRequired","showDropDown","dataMapEditor","dropDownCssClass","quickAutoSize","editor","placeholder","sortOrder"],outputs:["initialized","isSelectedChangePC: isSelectedChange"],providers:[]};export{wjFlexGridColumnMeta};let WjFlexGridColumn=WjFlexGridColumn_1=class WjFlexGridColumn extends wjcGrid.Column{constructor(e,t,i,o){super();this.cdRef=o;this.isInitialized=!1;this.wjProperty="columns";this._wjBehaviour=WjDirectiveBehavior.attach(this,e,t,i);const r=this._wjBehaviour.parentBehavior.directive;if(r.autoGenerateColumns){r.autoGenerateColumns=!1;r.columns.clear()}this.created()}created(){}ngOnInit(){this._wjBehaviour.ngOnInit()}ngAfterViewInit(){this._wjBehaviour.ngAfterViewInit()}ngOnDestroy(){this._wjBehaviour.ngOnDestroy()}};WjFlexGridColumn.meta={outputs:wjFlexGridColumnMeta.outputs,changeEvents:{"grid.selectionChanged":["isSelected"]}};WjFlexGridColumn=WjFlexGridColumn_1=__decorate([Component({selector:wjFlexGridColumnMeta.selector,template:wjFlexGridColumnMeta.template,inputs:wjFlexGridColumnMeta.inputs,outputs:wjFlexGridColumnMeta.outputs,providers:[{provide:"WjComponent",useExisting:forwardRef(()=>WjFlexGridColumn_1)},...wjFlexGridColumnMeta.providers]}),__param(0,Inject(ElementRef)),__param(1,Inject(Injector)),__param(2,Inject("WjComponent")),__param(2,SkipSelf()),__param(2,Optional()),__param(3,Inject(ChangeDetectorRef))],WjFlexGridColumn);export{WjFlexGridColumn};var wjFlexGridColumnGroupMeta={selector:"wj-flex-grid-column-group",template:"<div><ng-content></ng-content></div>",inputs:["asyncBindings","wjProperty","name","dataMap","dataType","binding","sortMemberPath","format","cellTemplate","header","width","maxLength","minWidth","maxWidth","align","allowDragging","allowSorting","allowResizing","allowMerging","aggregate","isReadOnly","cssClass","cssClassAll","isContentHtml","isSelected","visible","wordWrap","multiLine","mask","inputType","isRequired","showDropDown","dataMapEditor","dropDownCssClass","quickAutoSize","editor","placeholder","collapseTo","isCollapsed","height","sortOrder"],outputs:["initialized","isSelectedChangePC: isSelectedChange"],providers:[]};export{wjFlexGridColumnGroupMeta};let WjFlexGridColumnGroup=WjFlexGridColumnGroup_1=class WjFlexGridColumnGroup extends wjcGrid.ColumnGroup{constructor(e,t,i){super();this.isInitialized=!1;this.wjProperty="columnGroups";this._wjBehaviour=WjDirectiveBehavior.attach(this,e,t,i);this.created()}created(){}ngOnInit(){this._wjBehaviour.ngOnInit()}ngAfterViewInit(){this._wjBehaviour.ngAfterViewInit()}ngOnDestroy(){this._wjBehaviour.ngOnDestroy()}};WjFlexGridColumnGroup.meta={outputs:wjFlexGridColumnGroupMeta.outputs,changeEvents:{"grid.selectionChanged":["isSelected"]}};WjFlexGridColumnGroup=WjFlexGridColumnGroup_1=__decorate([Component({selector:wjFlexGridColumnGroupMeta.selector,template:wjFlexGridColumnGroupMeta.template,inputs:wjFlexGridColumnGroupMeta.inputs,outputs:wjFlexGridColumnGroupMeta.outputs,providers:[{provide:"WjComponent",useExisting:forwardRef(()=>WjFlexGridColumnGroup_1)},...wjFlexGridColumnGroupMeta.providers]}),__param(0,Inject(ElementRef)),__param(1,Inject(Injector)),__param(2,Inject("WjComponent")),__param(2,SkipSelf()),__param(2,Optional())],WjFlexGridColumnGroup);export{WjFlexGridColumnGroup};let WjFlexGridCellTemplate=WjFlexGridCellTemplate_1=class WjFlexGridCellTemplate{constructor(e,t,i,o,r,l){this.viewContainerRef=e;this.templateRef=t;this.elRef=i;this.cdRef=l;this.autoSizeRows=!0;this.forceFullEdit=!0;if(o instanceof wjcGrid.FlexGrid)this.grid=o;else if(o instanceof wjcGrid.Column){this.column=o;let e=null,t=WjDirectiveBehavior.getBehavior(o);do{t=t.parentBehavior;e=t?t.directive:null}while(e&&!(e instanceof wjcGrid.FlexGrid));this.grid=e}}set cellType(e){this.cellTypeStr=wjcCore.asEnum(e,CellTemplateType)}get cellType(){return this.cellTypeStr}ngOnInit(){this.ownerControl=this.column&&this.column.grid===this.grid?this.column:this.grid;this._attachToControl()}ngOnDestroy(){if(CellTemplateType[this.cellType]){this.viewContainerRef.clear();this.ownerControl[DirectiveCellFactory.getTemplContextProp(this.cellTypeStr)]=null;this.grid.invalidate()}}_instantiateTemplate(e,t){return WjDirectiveBehavior.instantiateTemplate(e,this.viewContainerRef,this.templateRef,!1,t)}_attachToControl(){if(!CellTemplateType[this.cellType])return;const e=this.cellTypeStr,t=this.ownerControl;t[DirectiveCellFactory.getTemplContextProp(e)]=this;t instanceof wjcGrid.Column&&(e===CellTemplateType.Cell||e===CellTemplateType.ColumnHeader||e===CellTemplateType.ColumnFooter)&&t._setFlag(wjcGrid.RowColFlags.HasTemplate,!0);this.grid.invalidate()}};__decorate([Input()],WjFlexGridCellTemplate.prototype,"cellType",null);WjFlexGridCellTemplate=WjFlexGridCellTemplate_1=__decorate([Directive({selector:"[wjFlexGridCellTemplate]",inputs:["wjFlexGridCellTemplate","cellOverflow","valuePaths","autoSizeRows","forceFullEdit"],exportAs:"wjFlexGridCellTemplate",providers:[{provide:"WjComponent",useExisting:forwardRef(()=>WjFlexGridCellTemplate_1)}]}),__param(0,Inject(ViewContainerRef)),__param(1,Inject(TemplateRef)),__param(1,Optional()),__param(2,Inject(ElementRef)),__param(3,Inject("WjComponent")),__param(3,SkipSelf()),__param(3,Optional()),__param(4,Inject(Injector)),__param(5,Inject(ChangeDetectorRef))],WjFlexGridCellTemplate);export{WjFlexGridCellTemplate};export class DirectiveCellFactory extends DirectiveCellFactoryBase{constructor(e,t){super(e);this._needsCdCheck=!1;this._gridCdRef=t;e.updatedView.addHandler(()=>{if(this._needsCdCheck){this._needsCdCheck=!1;this._gridCdRef.markForCheck()}},this)}_updatedViewHandler(){setTimeout(()=>{this._autoSizeIfRequired()})}shouldInstantiate(e){const t=e.templateCache;return null==t||t.column!==e.column||!t.viewRef||t.templateContextProperty!==e.templateContextProperty||e.cell.firstChild!=t.rootElement}renderTemplate(e,t){const i=e.row,o=t?{}:e.templateCache.viewRef.context,r=e.templateContext;e.cellBindingsData=this.setBindingsData(o,i,e.column,i.dataItem,e.cellValue,r.valuePaths);e.cellBindingsData.localVars.valueFormatted=e.cellValueFormatted;if(t){const t=e.cell,i=r._instantiateTemplate(t,o),l={column:e.column,viewRef:i.viewRef,rootElement:i.rootElement,templateContextProperty:e.templateContextProperty};e.templateCache=l;t[e.templateContextProperty]=l}}setBindingsData(e,t,i,o,r,l){this._needsCdCheck=!0;return super.setBindingsData(e,t,i,o,r,l)}disposeTemplate(e,t,i){if(t&&t.viewRef){if(i){const e=i.viewContainerRef.indexOf(t.viewRef);e>-1&&i.viewContainerRef.remove(e)}t.viewRef=null;super.disposeTemplate(e,t,i)}}clearCell(e){e.textContent=""}applyImmediately(e){e.templateContext.cdRef.detectChanges()}flushPendingEvents(e){if(e){const t=WjDirectiveBehavior.getBehavior(e);t&&t.flushPendingEvents()}}getEditorFocusFlag(){return this.grid._edtFocus}setEditorFocusFlag(e){this.grid._edtFocus=e}checkHeight(e){WjDirectiveBehavior.getZone(this.grid).runOutsideAngular(()=>{super.checkHeight(e)})}}const moduleExports=[WjFlexGrid,WjFlexGridColumn,WjFlexGridColumnGroup,WjFlexGridCellTemplate];let WjGridModule=class WjGridModule{};WjGridModule=__decorate([NgModule({imports:[CommonModule],declarations:[...moduleExports],exports:[...moduleExports]})],WjGridModule);export{WjGridModule};
|
package/es5-esm.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
*
|
|
3
|
-
* Wijmo Library 5.
|
|
3
|
+
* Wijmo Library 5.20261.45-nightly.d20260105.t014601
|
|
4
4
|
* https://developer.mescius.com/wijmo
|
|
5
5
|
*
|
|
6
6
|
* Copyright(c) MESCIUS inc. All rights reserved.
|
|
@@ -11,4 +11,4 @@
|
|
|
11
11
|
*
|
|
12
12
|
*/
|
|
13
13
|
|
|
14
|
-
var __extends=this&&this.__extends||function(){var extendStatics=function(e,t){return(extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])})(e,t)};return function(e,t){extendStatics(e,t);function __(){this.constructor=e}e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}}(),__decorate=this&&this.__decorate||function(e,t,o,i){var r,n=arguments.length,l=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,o,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(l=(n<3?r(l):n>3?r(t,o,l):r(t,o))||l);return n>3&&l&&Object.defineProperty(t,o,l),l},__param=this&&this.__param||function(e,t){return function(o,i){t(o,i,e)}};import{Component,NgModule,ElementRef,Injector,Directive,ViewContainerRef,TemplateRef,Optional,forwardRef,Input,Inject,ChangeDetectorRef,SkipSelf}from"@angular/core";import{CommonModule}from"@angular/common";import{NG_VALUE_ACCESSOR}from"@angular/forms";import{WjDirectiveBehavior,WjValueAccessorFactory}from"@mescius/wijmo.angular2legacy.directivebase";import{DirectiveCellFactoryBase}from"@mescius/wijmo.interop.grid";import*as wjcCore from"@mescius/wijmo";import*as wjcGrid from"@mescius/wijmo.grid";import*as wjcInteropGrid from"@mescius/wijmo.interop.grid";export var CellTemplateType=wjcInteropGrid.GridCellTemplateType;var wjFlexGridMeta={selector:"wj-flex-grid",template:"<div><ng-content></ng-content></div>",inputs:["wjModelProperty","isDisabled","tabOrder","newRowAtTop","allowAddNew","allowDelete","allowDragging","allowMerging","allowResizing","allowSorting","allowPinning","autoScroll","autoRowHeights","autoSizeMode","autoGenerateColumns","autoSearch","caseSensitiveSearch","quickAutoSize","bigCheckboxes","childItemsPath","groupHeaderFormat","headersVisibility","showSelectedHeaders","showMarquee","showPlaceholders","itemFormatter","isReadOnly","imeEnabled","mergeManager","selectionMode","showGroups","showSort","showDropDown","showAlternatingRows","showErrors","alternatingRowStep","itemValidator","validateEdits","treeIndent","itemsSource","autoClipboard","expandSelectionOnCopyPaste","frozenCells","frozenRows","frozenColumns","cloneFrozenCells","deferResizing","sortRowIndex","editColumnIndex","stickyHeaders","preserveSelectedState","preserveOutlineState","preserveWhiteSpace","keyActionTab","keyActionEnter","rowHeaderPath","virtualizationThreshold","anchorCursor","lazyRender","refreshOnEdit","copyHeaders","columnGroups","commitEmptyEdits","headersFocusability","ariaLabel","skipMerged","pasteEmptyCells","groupSummaryPosition","sortOrder","noDataOverlayContent"],outputs:["initialized","gotFocusNg: gotFocus","lostFocusNg: lostFocus","refreshingNg: refreshing","refreshedNg: refreshed","invalidInputNg: invalidInput","beginningEditNg: beginningEdit","cellEditEndedNg: cellEditEnded","cellEditEndingNg: cellEditEnding","prepareCellForEditNg: prepareCellForEdit","formatItemNg: formatItem","resizingColumnNg: resizingColumn","resizedColumnNg: resizedColumn","autoSizingColumnNg: autoSizingColumn","autoSizedColumnNg: autoSizedColumn","draggingColumnNg: draggingColumn","draggingColumnOverNg: draggingColumnOver","draggedColumnNg: draggedColumn","sortingColumnNg: sortingColumn","sortedColumnNg: sortedColumn","pinningColumnNg: pinningColumn","pinnedColumnNg: pinnedColumn","resizingRowNg: resizingRow","resizedRowNg: resizedRow","autoSizingRowNg: autoSizingRow","autoSizedRowNg: autoSizedRow","draggingRowNg: draggingRow","draggingRowOverNg: draggingRowOver","draggedRowNg: draggedRow","deletingRowNg: deletingRow","deletedRowNg: deletedRow","loadingRowsNg: loadingRows","loadedRowsNg: loadedRows","rowEditStartingNg: rowEditStarting","rowEditStartedNg: rowEditStarted","rowEditEndingNg: rowEditEnding","rowEditEndedNg: rowEditEnded","rowAddedNg: rowAdded","groupCollapsedChangingNg: groupCollapsedChanging","groupCollapsedChangedNg: groupCollapsedChanged","columnGroupCollapsedChangingNg: columnGroupCollapsedChanging","columnGroupCollapsedChangedNg: columnGroupCollapsedChanged","itemsSourceChangingNg: itemsSourceChanging","itemsSourceChangedNg: itemsSourceChanged","selectionChangingNg: selectionChanging","selectionChangedNg: selectionChanged","scrollPositionChangedNg: scrollPositionChanged","updatingViewNg: updatingView","updatedViewNg: updatedView","updatingLayoutNg: updatingLayout","updatedLayoutNg: updatedLayout","pastingNg: pasting","pastedNg: pasted","pastingCellNg: pastingCell","pastedCellNg: pastedCell","copyingNg: copying","copiedNg: copied","gettingCellClipStringNg: gettingCellClipString"],providers:[{provide:NG_VALUE_ACCESSOR,useFactory:WjValueAccessorFactory,multi:!0,deps:["WjComponent"]}]};export{wjFlexGridMeta};var WjFlexGrid=function(e){__extends(WjFlexGrid,e);function WjFlexGrid(t,o,i,r){var n=e.call(this,WjDirectiveBehavior.getHostElement(t,o))||this;n.cdRef=r;n.isInitialized=!1;n._wjBehaviour=WjDirectiveBehavior.attach(n,t,o,i);new DirectiveCellFactory(n,r);n.deferUpdate((function(){if(n.rows.defaultSize<10){var e=n.hostElement,t=getComputedStyle(e),o=getComputedStyle(document.body),i=2*parseInt(t.fontSize&&wjcCore.contains(document.body,e)?t.fontSize:o.fontSize);n.rows.defaultSize=i;n.columns.defaultSize=4*i;n.columnHeaders.rows.defaultSize=i;n.rowHeaders.columns.defaultSize=Math.round(1.25*i)}}));n.created();return n}t=WjFlexGrid;WjFlexGrid.prototype.created=function(){};WjFlexGrid.prototype.ngOnInit=function(){this._wjBehaviour.ngOnInit()};WjFlexGrid.prototype.ngAfterViewInit=function(){this._wjBehaviour.ngAfterViewInit()};WjFlexGrid.prototype.ngOnDestroy=function(){this._wjBehaviour.ngOnDestroy()};WjFlexGrid.prototype.addEventListener=function(t,o,i,r){var n=this;void 0===r&&(r=!1);var l=WjDirectiveBehavior,a=l.getZone(this);a&&l.outsideZoneEvents[o]?a.runOutsideAngular((function(){e.prototype.addEventListener.call(n,t,o,i,r)})):e.prototype.addEventListener.call(this,t,o,i,r)};WjFlexGrid.prototype.startEditing=function(t,o,i,r,n){void 0===t&&(t=!0);this._edtFocus=null;var l=e.prototype.startEditing.call(this,t,o,i,r,n);l&&(this._edtFocus=r||null==r);return l};WjFlexGrid.prototype.onCellEditEnding=function(t){this._edtFocus=null;return e.prototype.onCellEditEnding.call(this,t)};var t;WjFlexGrid.meta={outputs:wjFlexGridMeta.outputs};return WjFlexGrid=t=__decorate([Component({selector:wjFlexGridMeta.selector,template:wjFlexGridMeta.template,inputs:wjFlexGridMeta.inputs,outputs:wjFlexGridMeta.outputs,providers:[{provide:"WjComponent",useExisting:forwardRef((function(){return t}))}].concat(wjFlexGridMeta.providers)}),__param(0,Inject(ElementRef)),__param(1,Inject(Injector)),__param(2,Inject("WjComponent")),__param(2,SkipSelf()),__param(2,Optional()),__param(3,Inject(ChangeDetectorRef))],WjFlexGrid)}(wjcGrid.FlexGrid);export{WjFlexGrid};var wjFlexGridColumnMeta={selector:"wj-flex-grid-column",template:"<div><ng-content></ng-content></div>",inputs:["asyncBindings","wjProperty","name","dataMap","dataType","binding","sortMemberPath","format","cellTemplate","header","width","maxLength","minWidth","maxWidth","align","allowDragging","allowSorting","allowResizing","allowMerging","aggregate","isReadOnly","cssClass","cssClassAll","isContentHtml","isSelected","visible","wordWrap","multiLine","mask","inputType","isRequired","showDropDown","dataMapEditor","dropDownCssClass","quickAutoSize","editor","placeholder","sortOrder"],outputs:["initialized","isSelectedChangePC: isSelectedChange"],providers:[]};export{wjFlexGridColumnMeta};var WjFlexGridColumn=function(e){__extends(WjFlexGridColumn,e);function WjFlexGridColumn(t,o,i,r){var n=e.call(this)||this;n.cdRef=r;n.isInitialized=!1;n.wjProperty="columns";var l=(n._wjBehaviour=WjDirectiveBehavior.attach(n,t,o,i)).parentBehavior.directive;if(l.autoGenerateColumns){l.autoGenerateColumns=!1;l.columns.clear()}n.created();return n}t=WjFlexGridColumn;WjFlexGridColumn.prototype.created=function(){};WjFlexGridColumn.prototype.ngOnInit=function(){this._wjBehaviour.ngOnInit()};WjFlexGridColumn.prototype.ngAfterViewInit=function(){this._wjBehaviour.ngAfterViewInit()};WjFlexGridColumn.prototype.ngOnDestroy=function(){this._wjBehaviour.ngOnDestroy()};var t;WjFlexGridColumn.meta={outputs:wjFlexGridColumnMeta.outputs,changeEvents:{"grid.selectionChanged":["isSelected"]}};return WjFlexGridColumn=t=__decorate([Component({selector:wjFlexGridColumnMeta.selector,template:wjFlexGridColumnMeta.template,inputs:wjFlexGridColumnMeta.inputs,outputs:wjFlexGridColumnMeta.outputs,providers:[{provide:"WjComponent",useExisting:forwardRef((function(){return t}))}].concat(wjFlexGridColumnMeta.providers)}),__param(0,Inject(ElementRef)),__param(1,Inject(Injector)),__param(2,Inject("WjComponent")),__param(2,SkipSelf()),__param(2,Optional()),__param(3,Inject(ChangeDetectorRef))],WjFlexGridColumn)}(wjcGrid.Column);export{WjFlexGridColumn};var wjFlexGridColumnGroupMeta={selector:"wj-flex-grid-column-group",template:"<div><ng-content></ng-content></div>",inputs:["asyncBindings","wjProperty","name","dataMap","dataType","binding","sortMemberPath","format","cellTemplate","header","width","maxLength","minWidth","maxWidth","align","allowDragging","allowSorting","allowResizing","allowMerging","aggregate","isReadOnly","cssClass","cssClassAll","isContentHtml","isSelected","visible","wordWrap","multiLine","mask","inputType","isRequired","showDropDown","dataMapEditor","dropDownCssClass","quickAutoSize","editor","placeholder","collapseTo","isCollapsed","height","sortOrder"],outputs:["initialized","isSelectedChangePC: isSelectedChange"],providers:[]};export{wjFlexGridColumnGroupMeta};var WjFlexGridColumnGroup=function(e){__extends(WjFlexGridColumnGroup,e);function WjFlexGridColumnGroup(t,o,i){var r=e.call(this)||this;r.isInitialized=!1;r.wjProperty="columnGroups";r._wjBehaviour=WjDirectiveBehavior.attach(r,t,o,i);r.created();return r}t=WjFlexGridColumnGroup;WjFlexGridColumnGroup.prototype.created=function(){};WjFlexGridColumnGroup.prototype.ngOnInit=function(){this._wjBehaviour.ngOnInit()};WjFlexGridColumnGroup.prototype.ngAfterViewInit=function(){this._wjBehaviour.ngAfterViewInit()};WjFlexGridColumnGroup.prototype.ngOnDestroy=function(){this._wjBehaviour.ngOnDestroy()};var t;WjFlexGridColumnGroup.meta={outputs:wjFlexGridColumnGroupMeta.outputs,changeEvents:{"grid.selectionChanged":["isSelected"]}};return WjFlexGridColumnGroup=t=__decorate([Component({selector:wjFlexGridColumnGroupMeta.selector,template:wjFlexGridColumnGroupMeta.template,inputs:wjFlexGridColumnGroupMeta.inputs,outputs:wjFlexGridColumnGroupMeta.outputs,providers:[{provide:"WjComponent",useExisting:forwardRef((function(){return t}))}].concat(wjFlexGridColumnGroupMeta.providers)}),__param(0,Inject(ElementRef)),__param(1,Inject(Injector)),__param(2,Inject("WjComponent")),__param(2,SkipSelf()),__param(2,Optional())],WjFlexGridColumnGroup)}(wjcGrid.ColumnGroup);export{WjFlexGridColumnGroup};var WjFlexGridCellTemplate=function(){function WjFlexGridCellTemplate(e,t,o,i,r,n){this.viewContainerRef=e;this.templateRef=t;this.elRef=o;this.cdRef=n;this.autoSizeRows=!0;this.forceFullEdit=!0;if(i instanceof wjcGrid.FlexGrid)this.grid=i;else if(i instanceof wjcGrid.Column){this.column=i;var l=void 0,a=WjDirectiveBehavior.getBehavior(i);do{l=(a=a.parentBehavior)&&a.directive}while(l&&!(l instanceof wjcGrid.FlexGrid));this.grid=l}}e=WjFlexGridCellTemplate;Object.defineProperty(WjFlexGridCellTemplate.prototype,"cellType",{get:function(){return this.cellTypeStr},set:function(e){this.cellTypeStr=wjcCore.asEnum(e,CellTemplateType)},enumerable:!0,configurable:!0});WjFlexGridCellTemplate.prototype.ngOnInit=function(){this.ownerControl=this.column&&this.column.grid===this.grid?this.column:this.grid;this._attachToControl()};WjFlexGridCellTemplate.prototype.ngOnDestroy=function(){if(CellTemplateType[this.cellType]){this.viewContainerRef.clear();this.ownerControl[DirectiveCellFactory.getTemplContextProp(this.cellTypeStr)]=null;this.grid.invalidate()}};WjFlexGridCellTemplate.prototype._instantiateTemplate=function(e,t){return WjDirectiveBehavior.instantiateTemplate(e,this.viewContainerRef,this.templateRef,!1,t)};WjFlexGridCellTemplate.prototype._attachToControl=function(){if(CellTemplateType[this.cellType]){var e=this.cellTypeStr,t=this.ownerControl;t[DirectiveCellFactory.getTemplContextProp(e)]=this;t instanceof wjcGrid.Column&&(e===CellTemplateType.Cell||e===CellTemplateType.ColumnHeader||e===CellTemplateType.ColumnFooter)&&t._setFlag(wjcGrid.RowColFlags.HasTemplate,!0);this.grid.invalidate()}};var e;__decorate([Input()],WjFlexGridCellTemplate.prototype,"cellType",null);return WjFlexGridCellTemplate=e=__decorate([Directive({selector:"[wjFlexGridCellTemplate]",inputs:["wjFlexGridCellTemplate","cellOverflow","valuePaths","autoSizeRows","forceFullEdit"],exportAs:"wjFlexGridCellTemplate",providers:[{provide:"WjComponent",useExisting:forwardRef((function(){return e}))}]}),__param(0,Inject(ViewContainerRef)),__param(1,Inject(TemplateRef)),__param(1,Optional()),__param(2,Inject(ElementRef)),__param(3,Inject("WjComponent")),__param(3,SkipSelf()),__param(3,Optional()),__param(4,Inject(Injector)),__param(5,Inject(ChangeDetectorRef))],WjFlexGridCellTemplate)}();export{WjFlexGridCellTemplate};var DirectiveCellFactory=function(e){__extends(DirectiveCellFactory,e);function DirectiveCellFactory(t,o){var i=e.call(this,t)||this;i._needsCdCheck=!1;i._gridCdRef=o;t.updatedView.addHandler((function(){if(i._needsCdCheck){i._needsCdCheck=!1;i._gridCdRef.markForCheck()}}),i);return i}DirectiveCellFactory.prototype._updatedViewHandler=function(){var e=this;setTimeout((function(){e._autoSizeIfRequired()}))};DirectiveCellFactory.prototype.shouldInstantiate=function(e){var t=e.templateCache;return null==t||t.column!==e.column||!t.viewRef||t.templateContextProperty!==e.templateContextProperty||e.cell.firstChild!=t.rootElement};DirectiveCellFactory.prototype.renderTemplate=function(e,t){var o=e.row,i=t?{}:e.templateCache.viewRef.context,r=e.templateContext;e.cellBindingsData=this.setBindingsData(i,o,e.column,o.dataItem,e.cellValue,r.valuePaths);e.cellBindingsData.localVars.valueFormatted=e.cellValueFormatted;if(t){var n=e.cell,l=r._instantiateTemplate(n,i),a=e.templateCache={column:e.column,viewRef:l.viewRef,rootElement:l.rootElement,templateContextProperty:e.templateContextProperty};n[e.templateContextProperty]=a}};DirectiveCellFactory.prototype.setBindingsData=function(t,o,i,r,n,l){this._needsCdCheck=!0;return e.prototype.setBindingsData.call(this,t,o,i,r,n,l)};DirectiveCellFactory.prototype.disposeTemplate=function(t,o,i){if(o&&o.viewRef){if(i){var r=i.viewContainerRef.indexOf(o.viewRef);r>-1&&i.viewContainerRef.remove(r)}o.viewRef=null;e.prototype.disposeTemplate.call(this,t,o,i)}};DirectiveCellFactory.prototype.clearCell=function(e){e.textContent=""};DirectiveCellFactory.prototype.applyImmediately=function(e){e.templateContext.cdRef.detectChanges()};DirectiveCellFactory.prototype.flushPendingEvents=function(e){if(e){var t=WjDirectiveBehavior.getBehavior(e);t&&t.flushPendingEvents()}};DirectiveCellFactory.prototype.getEditorFocusFlag=function(){return this.grid._edtFocus};DirectiveCellFactory.prototype.setEditorFocusFlag=function(e){this.grid._edtFocus=e};DirectiveCellFactory.prototype.checkHeight=function(t){var o=this;WjDirectiveBehavior.getZone(this.grid).runOutsideAngular((function(){e.prototype.checkHeight.call(o,t)}))};return DirectiveCellFactory}(DirectiveCellFactoryBase);export{DirectiveCellFactory};var moduleExports=[WjFlexGrid,WjFlexGridColumn,WjFlexGridColumnGroup,WjFlexGridCellTemplate],WjGridModule=function(){function WjGridModule(){}return WjGridModule=__decorate([NgModule({imports:[CommonModule],declarations:moduleExports.slice(),exports:moduleExports.slice()})],WjGridModule)}();export{WjGridModule};
|
|
14
|
+
var __extends=this&&this.__extends||function(){var extendStatics=function(e,t){return(extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])})(e,t)};return function(e,t){extendStatics(e,t);function __(){this.constructor=e}e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}}(),__decorate=this&&this.__decorate||function(e,t,o,i){var r,n=arguments.length,l=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,o,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(l=(n<3?r(l):n>3?r(t,o,l):r(t,o))||l);return n>3&&l&&Object.defineProperty(t,o,l),l},__param=this&&this.__param||function(e,t){return function(o,i){t(o,i,e)}};import{Component,NgModule,ElementRef,Injector,Directive,ViewContainerRef,TemplateRef,Optional,forwardRef,Input,Inject,ChangeDetectorRef,SkipSelf}from"@angular/core";import{CommonModule}from"@angular/common";import{NG_VALUE_ACCESSOR}from"@angular/forms";import{WjDirectiveBehavior,WjValueAccessorFactory}from"@mescius/wijmo.angular2legacy.directivebase";import{DirectiveCellFactoryBase}from"@mescius/wijmo.interop.grid";import*as wjcCore from"@mescius/wijmo";import*as wjcGrid from"@mescius/wijmo.grid";import*as wjcInteropGrid from"@mescius/wijmo.interop.grid";export var CellTemplateType=wjcInteropGrid.GridCellTemplateType;var wjFlexGridMeta={selector:"wj-flex-grid",template:"<div><ng-content></ng-content></div>",inputs:["wjModelProperty","isDisabled","tabOrder","newRowAtTop","allowAddNew","allowDelete","allowDragging","allowMerging","allowResizing","allowSorting","allowPinning","autoScroll","autoRowHeights","autoSizeMode","autoGenerateColumns","autoSearch","caseSensitiveSearch","quickAutoSize","bigCheckboxes","childItemsPath","groupHeaderFormat","headersVisibility","showSelectedHeaders","showMarquee","showPlaceholders","itemFormatter","isReadOnly","imeEnabled","mergeManager","selectionMode","showGroups","showSort","showDropDown","showAlternatingRows","showErrors","alternatingRowStep","itemValidator","validateEdits","treeIndent","itemsSource","autoClipboard","expandSelectionOnCopyPaste","frozenCells","frozenRows","frozenColumns","cloneFrozenCells","deferResizing","sortRowIndex","editColumnIndex","stickyHeaders","preserveSelectedState","preserveOutlineState","preserveWhiteSpace","keyActionTab","keyActionEnter","rowHeaderPath","virtualizationThreshold","anchorCursor","lazyRender","refreshOnEdit","copyHeaders","columnGroups","commitEmptyEdits","headersFocusability","ariaLabel","skipMerged","pasteEmptyCells","groupSummaryPosition","sortOrder","noDataOverlayContent"],outputs:["initialized","gotFocusNg: gotFocus","lostFocusNg: lostFocus","refreshingNg: refreshing","refreshedNg: refreshed","invalidInputNg: invalidInput","beginningEditNg: beginningEdit","cellEditEndedNg: cellEditEnded","cellEditEndingNg: cellEditEnding","prepareCellForEditNg: prepareCellForEdit","formatItemNg: formatItem","resizingColumnNg: resizingColumn","resizedColumnNg: resizedColumn","autoSizingColumnNg: autoSizingColumn","autoSizedColumnNg: autoSizedColumn","draggingColumnNg: draggingColumn","draggingColumnOverNg: draggingColumnOver","draggedColumnNg: draggedColumn","sortingColumnNg: sortingColumn","sortedColumnNg: sortedColumn","pinningColumnNg: pinningColumn","pinnedColumnNg: pinnedColumn","resizingRowNg: resizingRow","resizedRowNg: resizedRow","autoSizingRowNg: autoSizingRow","autoSizedRowNg: autoSizedRow","draggingRowNg: draggingRow","draggingRowOverNg: draggingRowOver","draggedRowNg: draggedRow","deletingRowNg: deletingRow","deletedRowNg: deletedRow","loadingRowsNg: loadingRows","loadedRowsNg: loadedRows","rowEditStartingNg: rowEditStarting","rowEditStartedNg: rowEditStarted","rowEditEndingNg: rowEditEnding","rowEditEndedNg: rowEditEnded","rowAddedNg: rowAdded","groupCollapsedChangingNg: groupCollapsedChanging","groupCollapsedChangedNg: groupCollapsedChanged","columnGroupCollapsedChangingNg: columnGroupCollapsedChanging","columnGroupCollapsedChangedNg: columnGroupCollapsedChanged","itemsSourceChangingNg: itemsSourceChanging","itemsSourceChangedNg: itemsSourceChanged","selectionChangingNg: selectionChanging","selectionChangedNg: selectionChanged","scrollPositionChangedNg: scrollPositionChanged","updatingViewNg: updatingView","updatedViewNg: updatedView","updatingLayoutNg: updatingLayout","updatedLayoutNg: updatedLayout","pastingNg: pasting","pastedNg: pasted","pastingCellNg: pastingCell","pastedCellNg: pastedCell","copyingNg: copying","copiedNg: copied","gettingCellClipStringNg: gettingCellClipString"],providers:[{provide:NG_VALUE_ACCESSOR,useFactory:WjValueAccessorFactory,multi:!0,deps:["WjComponent"]}]};export{wjFlexGridMeta};var WjFlexGrid=function(e){__extends(WjFlexGrid,e);function WjFlexGrid(t,o,i,r){var n=e.call(this,WjDirectiveBehavior.getHostElement(t,o))||this;n.cdRef=r;n.isInitialized=!1;n._wjBehaviour=WjDirectiveBehavior.attach(n,t,o,i);new DirectiveCellFactory(n,r);n.deferUpdate((function(){if(n.rows.defaultSize<10){var e=n.hostElement,t=getComputedStyle(e),o=getComputedStyle(document.body),i=2*parseInt(t.fontSize&&wjcCore.contains(document.body,e)?t.fontSize:o.fontSize);n.rows.defaultSize=i;n.columns.defaultSize=4*i;n.columnHeaders.rows.defaultSize=i;n.rowHeaders.columns.defaultSize=Math.round(1.25*i)}}));n.created();return n}t=WjFlexGrid;WjFlexGrid.prototype.created=function(){};WjFlexGrid.prototype.ngOnInit=function(){this._wjBehaviour.ngOnInit()};WjFlexGrid.prototype.ngAfterViewInit=function(){this._wjBehaviour.ngAfterViewInit()};WjFlexGrid.prototype.ngOnDestroy=function(){this._wjBehaviour.ngOnDestroy()};WjFlexGrid.prototype.addEventListener=function(t,o,i,r){var n=this;void 0===r&&(r=!1);var l=WjDirectiveBehavior,a=l.getZone(this);a&&l.outsideZoneEvents[o]?a.runOutsideAngular((function(){e.prototype.addEventListener.call(n,t,o,i,r)})):e.prototype.addEventListener.call(this,t,o,i,r)};WjFlexGrid.prototype.startEditing=function(t,o,i,r,n){void 0===t&&(t=!0);this._edtFocus=null;var l=e.prototype.startEditing.call(this,t,o,i,r,n);l&&(this._edtFocus=r||null==r);return l};WjFlexGrid.prototype.onCellEditEnding=function(t){this._edtFocus=null;return e.prototype.onCellEditEnding.call(this,t)};var t;WjFlexGrid.meta={outputs:wjFlexGridMeta.outputs};return WjFlexGrid=t=__decorate([Component({selector:wjFlexGridMeta.selector,template:wjFlexGridMeta.template,inputs:wjFlexGridMeta.inputs,outputs:wjFlexGridMeta.outputs,providers:[{provide:"WjComponent",useExisting:forwardRef((function(){return t}))}].concat(wjFlexGridMeta.providers)}),__param(0,Inject(ElementRef)),__param(1,Inject(Injector)),__param(2,Inject("WjComponent")),__param(2,SkipSelf()),__param(2,Optional()),__param(3,Inject(ChangeDetectorRef))],WjFlexGrid)}(wjcGrid.FlexGrid);export{WjFlexGrid};var wjFlexGridColumnMeta={selector:"wj-flex-grid-column",template:"<div><ng-content></ng-content></div>",inputs:["asyncBindings","wjProperty","name","dataMap","dataType","binding","sortMemberPath","format","cellTemplate","header","width","maxLength","minWidth","maxWidth","align","allowDragging","allowSorting","allowResizing","allowMerging","aggregate","isReadOnly","cssClass","cssClassAll","isContentHtml","isSelected","visible","wordWrap","multiLine","mask","inputType","isRequired","showDropDown","dataMapEditor","dropDownCssClass","quickAutoSize","editor","placeholder","sortOrder"],outputs:["initialized","isSelectedChangePC: isSelectedChange"],providers:[]};export{wjFlexGridColumnMeta};var WjFlexGridColumn=function(e){__extends(WjFlexGridColumn,e);function WjFlexGridColumn(t,o,i,r){var n=e.call(this)||this;n.cdRef=r;n.isInitialized=!1;n.wjProperty="columns";n._wjBehaviour=WjDirectiveBehavior.attach(n,t,o,i);var l=n._wjBehaviour.parentBehavior.directive;if(l.autoGenerateColumns){l.autoGenerateColumns=!1;l.columns.clear()}n.created();return n}t=WjFlexGridColumn;WjFlexGridColumn.prototype.created=function(){};WjFlexGridColumn.prototype.ngOnInit=function(){this._wjBehaviour.ngOnInit()};WjFlexGridColumn.prototype.ngAfterViewInit=function(){this._wjBehaviour.ngAfterViewInit()};WjFlexGridColumn.prototype.ngOnDestroy=function(){this._wjBehaviour.ngOnDestroy()};var t;WjFlexGridColumn.meta={outputs:wjFlexGridColumnMeta.outputs,changeEvents:{"grid.selectionChanged":["isSelected"]}};return WjFlexGridColumn=t=__decorate([Component({selector:wjFlexGridColumnMeta.selector,template:wjFlexGridColumnMeta.template,inputs:wjFlexGridColumnMeta.inputs,outputs:wjFlexGridColumnMeta.outputs,providers:[{provide:"WjComponent",useExisting:forwardRef((function(){return t}))}].concat(wjFlexGridColumnMeta.providers)}),__param(0,Inject(ElementRef)),__param(1,Inject(Injector)),__param(2,Inject("WjComponent")),__param(2,SkipSelf()),__param(2,Optional()),__param(3,Inject(ChangeDetectorRef))],WjFlexGridColumn)}(wjcGrid.Column);export{WjFlexGridColumn};var wjFlexGridColumnGroupMeta={selector:"wj-flex-grid-column-group",template:"<div><ng-content></ng-content></div>",inputs:["asyncBindings","wjProperty","name","dataMap","dataType","binding","sortMemberPath","format","cellTemplate","header","width","maxLength","minWidth","maxWidth","align","allowDragging","allowSorting","allowResizing","allowMerging","aggregate","isReadOnly","cssClass","cssClassAll","isContentHtml","isSelected","visible","wordWrap","multiLine","mask","inputType","isRequired","showDropDown","dataMapEditor","dropDownCssClass","quickAutoSize","editor","placeholder","collapseTo","isCollapsed","height","sortOrder"],outputs:["initialized","isSelectedChangePC: isSelectedChange"],providers:[]};export{wjFlexGridColumnGroupMeta};var WjFlexGridColumnGroup=function(e){__extends(WjFlexGridColumnGroup,e);function WjFlexGridColumnGroup(t,o,i){var r=e.call(this)||this;r.isInitialized=!1;r.wjProperty="columnGroups";r._wjBehaviour=WjDirectiveBehavior.attach(r,t,o,i);r.created();return r}t=WjFlexGridColumnGroup;WjFlexGridColumnGroup.prototype.created=function(){};WjFlexGridColumnGroup.prototype.ngOnInit=function(){this._wjBehaviour.ngOnInit()};WjFlexGridColumnGroup.prototype.ngAfterViewInit=function(){this._wjBehaviour.ngAfterViewInit()};WjFlexGridColumnGroup.prototype.ngOnDestroy=function(){this._wjBehaviour.ngOnDestroy()};var t;WjFlexGridColumnGroup.meta={outputs:wjFlexGridColumnGroupMeta.outputs,changeEvents:{"grid.selectionChanged":["isSelected"]}};return WjFlexGridColumnGroup=t=__decorate([Component({selector:wjFlexGridColumnGroupMeta.selector,template:wjFlexGridColumnGroupMeta.template,inputs:wjFlexGridColumnGroupMeta.inputs,outputs:wjFlexGridColumnGroupMeta.outputs,providers:[{provide:"WjComponent",useExisting:forwardRef((function(){return t}))}].concat(wjFlexGridColumnGroupMeta.providers)}),__param(0,Inject(ElementRef)),__param(1,Inject(Injector)),__param(2,Inject("WjComponent")),__param(2,SkipSelf()),__param(2,Optional())],WjFlexGridColumnGroup)}(wjcGrid.ColumnGroup);export{WjFlexGridColumnGroup};var WjFlexGridCellTemplate=function(){function WjFlexGridCellTemplate(e,t,o,i,r,n){this.viewContainerRef=e;this.templateRef=t;this.elRef=o;this.cdRef=n;this.autoSizeRows=!0;this.forceFullEdit=!0;if(i instanceof wjcGrid.FlexGrid)this.grid=i;else if(i instanceof wjcGrid.Column){this.column=i;var l=null,a=WjDirectiveBehavior.getBehavior(i);do{l=(a=a.parentBehavior)?a.directive:null}while(l&&!(l instanceof wjcGrid.FlexGrid));this.grid=l}}e=WjFlexGridCellTemplate;Object.defineProperty(WjFlexGridCellTemplate.prototype,"cellType",{get:function(){return this.cellTypeStr},set:function(e){this.cellTypeStr=wjcCore.asEnum(e,CellTemplateType)},enumerable:!0,configurable:!0});WjFlexGridCellTemplate.prototype.ngOnInit=function(){this.ownerControl=this.column&&this.column.grid===this.grid?this.column:this.grid;this._attachToControl()};WjFlexGridCellTemplate.prototype.ngOnDestroy=function(){if(CellTemplateType[this.cellType]){this.viewContainerRef.clear();this.ownerControl[DirectiveCellFactory.getTemplContextProp(this.cellTypeStr)]=null;this.grid.invalidate()}};WjFlexGridCellTemplate.prototype._instantiateTemplate=function(e,t){return WjDirectiveBehavior.instantiateTemplate(e,this.viewContainerRef,this.templateRef,!1,t)};WjFlexGridCellTemplate.prototype._attachToControl=function(){if(CellTemplateType[this.cellType]){var e=this.cellTypeStr,t=this.ownerControl;t[DirectiveCellFactory.getTemplContextProp(e)]=this;t instanceof wjcGrid.Column&&(e===CellTemplateType.Cell||e===CellTemplateType.ColumnHeader||e===CellTemplateType.ColumnFooter)&&t._setFlag(wjcGrid.RowColFlags.HasTemplate,!0);this.grid.invalidate()}};var e;__decorate([Input()],WjFlexGridCellTemplate.prototype,"cellType",null);return WjFlexGridCellTemplate=e=__decorate([Directive({selector:"[wjFlexGridCellTemplate]",inputs:["wjFlexGridCellTemplate","cellOverflow","valuePaths","autoSizeRows","forceFullEdit"],exportAs:"wjFlexGridCellTemplate",providers:[{provide:"WjComponent",useExisting:forwardRef((function(){return e}))}]}),__param(0,Inject(ViewContainerRef)),__param(1,Inject(TemplateRef)),__param(1,Optional()),__param(2,Inject(ElementRef)),__param(3,Inject("WjComponent")),__param(3,SkipSelf()),__param(3,Optional()),__param(4,Inject(Injector)),__param(5,Inject(ChangeDetectorRef))],WjFlexGridCellTemplate)}();export{WjFlexGridCellTemplate};var DirectiveCellFactory=function(e){__extends(DirectiveCellFactory,e);function DirectiveCellFactory(t,o){var i=e.call(this,t)||this;i._needsCdCheck=!1;i._gridCdRef=o;t.updatedView.addHandler((function(){if(i._needsCdCheck){i._needsCdCheck=!1;i._gridCdRef.markForCheck()}}),i);return i}DirectiveCellFactory.prototype._updatedViewHandler=function(){var e=this;setTimeout((function(){e._autoSizeIfRequired()}))};DirectiveCellFactory.prototype.shouldInstantiate=function(e){var t=e.templateCache;return null==t||t.column!==e.column||!t.viewRef||t.templateContextProperty!==e.templateContextProperty||e.cell.firstChild!=t.rootElement};DirectiveCellFactory.prototype.renderTemplate=function(e,t){var o=e.row,i=t?{}:e.templateCache.viewRef.context,r=e.templateContext;e.cellBindingsData=this.setBindingsData(i,o,e.column,o.dataItem,e.cellValue,r.valuePaths);e.cellBindingsData.localVars.valueFormatted=e.cellValueFormatted;if(t){var n=e.cell,l=r._instantiateTemplate(n,i),a={column:e.column,viewRef:l.viewRef,rootElement:l.rootElement,templateContextProperty:e.templateContextProperty};e.templateCache=a;n[e.templateContextProperty]=a}};DirectiveCellFactory.prototype.setBindingsData=function(t,o,i,r,n,l){this._needsCdCheck=!0;return e.prototype.setBindingsData.call(this,t,o,i,r,n,l)};DirectiveCellFactory.prototype.disposeTemplate=function(t,o,i){if(o&&o.viewRef){if(i){var r=i.viewContainerRef.indexOf(o.viewRef);r>-1&&i.viewContainerRef.remove(r)}o.viewRef=null;e.prototype.disposeTemplate.call(this,t,o,i)}};DirectiveCellFactory.prototype.clearCell=function(e){e.textContent=""};DirectiveCellFactory.prototype.applyImmediately=function(e){e.templateContext.cdRef.detectChanges()};DirectiveCellFactory.prototype.flushPendingEvents=function(e){if(e){var t=WjDirectiveBehavior.getBehavior(e);t&&t.flushPendingEvents()}};DirectiveCellFactory.prototype.getEditorFocusFlag=function(){return this.grid._edtFocus};DirectiveCellFactory.prototype.setEditorFocusFlag=function(e){this.grid._edtFocus=e};DirectiveCellFactory.prototype.checkHeight=function(t){var o=this;WjDirectiveBehavior.getZone(this.grid).runOutsideAngular((function(){e.prototype.checkHeight.call(o,t)}))};return DirectiveCellFactory}(DirectiveCellFactoryBase);export{DirectiveCellFactory};var moduleExports=[WjFlexGrid,WjFlexGridColumn,WjFlexGridColumnGroup,WjFlexGridCellTemplate],WjGridModule=function(){function WjGridModule(){}return WjGridModule=__decorate([NgModule({imports:[CommonModule],declarations:moduleExports.slice(),exports:moduleExports.slice()})],WjGridModule)}();export{WjGridModule};
|
package/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
*
|
|
3
|
-
* Wijmo Library 5.
|
|
3
|
+
* Wijmo Library 5.20261.45-nightly.d20260105.t014601
|
|
4
4
|
* https://developer.mescius.com/wijmo
|
|
5
5
|
*
|
|
6
6
|
* Copyright(c) MESCIUS inc. All rights reserved.
|
|
@@ -11,33 +11,33 @@
|
|
|
11
11
|
*
|
|
12
12
|
*/
|
|
13
13
|
/**
|
|
14
|
-
* {@module wijmo.angular2legacy.grid}
|
|
15
|
-
* Contains Angular 2 components for the <b>wijmo.grid</b> module.
|
|
16
|
-
*
|
|
17
|
-
* <b>wijmo.angular2legacy.grid</b> is an external TypeScript module that can be imported to your code
|
|
18
|
-
* using its ambient module name. For example:
|
|
19
|
-
*
|
|
20
|
-
* <pre><p>Here is a data bound FlexGrid control with four columns:</p>
|
|
21
|
-
* <wj-flex-grid [itemsSource]="data">
|
|
22
|
-
* <wj-flex-grid-column
|
|
23
|
-
* [header]="'Country'"
|
|
24
|
-
* [binding]="'country'">
|
|
25
|
-
* </wj-flex-grid-column>
|
|
26
|
-
* <wj-flex-grid-column
|
|
27
|
-
* [header]="'Sales'"
|
|
28
|
-
* [binding]="'sales'">
|
|
29
|
-
* </wj-flex-grid-column>
|
|
30
|
-
* <wj-flex-grid-column
|
|
31
|
-
* [header]="'Expenses'"
|
|
32
|
-
* [binding]="'expenses'">
|
|
33
|
-
* </wj-flex-grid-column>
|
|
34
|
-
* <wj-flex-grid-column
|
|
35
|
-
* [header]="'Downloads'"
|
|
36
|
-
* [binding]="'downloads'">
|
|
37
|
-
* </wj-flex-grid-column>
|
|
38
|
-
* </wj-flex-grid></pre>
|
|
39
|
-
*
|
|
40
|
-
*/
|
|
14
|
+
* {@module wijmo.angular2legacy.grid}
|
|
15
|
+
* Contains Angular 2 components for the <b>wijmo.grid</b> module.
|
|
16
|
+
*
|
|
17
|
+
* <b>wijmo.angular2legacy.grid</b> is an external TypeScript module that can be imported to your code
|
|
18
|
+
* using its ambient module name. For example:
|
|
19
|
+
*
|
|
20
|
+
* <pre><p>Here is a data bound FlexGrid control with four columns:</p>
|
|
21
|
+
* <wj-flex-grid [itemsSource]="data">
|
|
22
|
+
* <wj-flex-grid-column
|
|
23
|
+
* [header]="'Country'"
|
|
24
|
+
* [binding]="'country'">
|
|
25
|
+
* </wj-flex-grid-column>
|
|
26
|
+
* <wj-flex-grid-column
|
|
27
|
+
* [header]="'Sales'"
|
|
28
|
+
* [binding]="'sales'">
|
|
29
|
+
* </wj-flex-grid-column>
|
|
30
|
+
* <wj-flex-grid-column
|
|
31
|
+
* [header]="'Expenses'"
|
|
32
|
+
* [binding]="'expenses'">
|
|
33
|
+
* </wj-flex-grid-column>
|
|
34
|
+
* <wj-flex-grid-column
|
|
35
|
+
* [header]="'Downloads'"
|
|
36
|
+
* [binding]="'downloads'">
|
|
37
|
+
* </wj-flex-grid-column>
|
|
38
|
+
* </wj-flex-grid></pre>
|
|
39
|
+
*
|
|
40
|
+
*/
|
|
41
41
|
/**
|
|
42
42
|
*
|
|
43
43
|
*/
|
|
@@ -485,11 +485,11 @@ export { wjFlexGridColumnMeta };
|
|
|
485
485
|
* Angular 2 applications. For details about Angular 2 markup syntax, see
|
|
486
486
|
* <a href="/wijmo/docs/GettingStarted/Angular-Components">Angular 2 Markup</a>.
|
|
487
487
|
*
|
|
488
|
-
* The <b>WjFlexGridColumn</b> component is derived from the <b>Column</b> class and
|
|
488
|
+
* The <b>WjFlexGridColumn</b> component is derived from the <b>Column</b> class and
|
|
489
489
|
* inherits all its properties, events and methods.
|
|
490
490
|
*
|
|
491
491
|
* The <b>wj-flex-grid-column</b> component may contain a {@link wijmo.angular2legacy.grid.WjFlexGridCellTemplate} child directive.
|
|
492
|
-
*/
|
|
492
|
+
*/
|
|
493
493
|
export declare class WjFlexGridColumn extends wjcGrid.Column implements OnInit, OnDestroy, AfterViewInit {
|
|
494
494
|
cdRef: ChangeDetectorRef;
|
|
495
495
|
static readonly meta: IWjComponentMetadata;
|
|
@@ -547,13 +547,13 @@ export { wjFlexGridColumnGroupMeta };
|
|
|
547
547
|
* Angular 2 applications. For details about Angular 2 markup syntax, see
|
|
548
548
|
* <a href="/wijmo/docs/GettingStarted/Angular-Components">Angular 2 Markup</a>.
|
|
549
549
|
*
|
|
550
|
-
* The <b>WjFlexGridColumnGroup</b> component is derived from the <b>ColumnGroup</b> class and
|
|
550
|
+
* The <b>WjFlexGridColumnGroup</b> component is derived from the <b>ColumnGroup</b> class and
|
|
551
551
|
* inherits all its properties, events and methods.
|
|
552
552
|
*
|
|
553
553
|
* The <b>wj-flex-grid-column-group</b> component may contain the following child components:
|
|
554
554
|
* {@link wijmo.angular2legacy.grid.WjFlexGridColumnGroup}
|
|
555
555
|
* and {@link wijmo.angular2legacy.grid.WjFlexGridCellTemplate}.
|
|
556
|
-
*/
|
|
556
|
+
*/
|
|
557
557
|
export declare class WjFlexGridColumnGroup extends wjcGrid.ColumnGroup implements OnInit, OnDestroy, AfterViewInit {
|
|
558
558
|
static readonly meta: IWjComponentMetadata;
|
|
559
559
|
private _wjBehaviour;
|
|
@@ -855,30 +855,30 @@ export declare class WjFlexGridCellTemplate implements ngCore.OnInit, ngCore.OnD
|
|
|
855
855
|
wjFlexGridCellTemplate: any;
|
|
856
856
|
cellTypeStr: CellTemplateType;
|
|
857
857
|
/**
|
|
858
|
-
|
|
859
|
-
|
|
858
|
+
* Defines the <b>style.overflow</b> property value for cells.
|
|
859
|
+
*/
|
|
860
860
|
cellOverflow: string;
|
|
861
861
|
/**
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
862
|
+
* Defines the type of cell to which the template is applied. String enum member
|
|
863
|
+
* names can be used to specify the property value as well.
|
|
864
|
+
*/
|
|
865
865
|
cellType: any;
|
|
866
866
|
valuePaths: Object;
|
|
867
867
|
/**
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
868
|
+
* Gets or sets a value indicating whether the cell template will increase grid's default row height
|
|
869
|
+
* to accomodate cells content. Defaults to true.
|
|
870
|
+
*/
|
|
871
871
|
autoSizeRows: boolean;
|
|
872
872
|
/**
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
873
|
+
* For cell edit templates, indicates whether cell editing forcibly starts in full edit mode,
|
|
874
|
+
* regardless of how the editing was initiated. In full edit mode pressing cursor keys don't finish editing.
|
|
875
|
+
* Defaults to true.
|
|
876
|
+
*/
|
|
877
877
|
forceFullEdit: boolean;
|
|
878
878
|
grid: wjcGrid.FlexGrid;
|
|
879
879
|
column: wjcGrid.Column;
|
|
880
880
|
ownerControl: any;
|
|
881
|
-
constructor(viewContainerRef: ViewContainerRef, templateRef: TemplateRef<any>, elRef: ElementRef, parentCmp: any,
|
|
881
|
+
constructor(viewContainerRef: ViewContainerRef, templateRef: TemplateRef<any>, elRef: ElementRef, parentCmp: any, _injector: Injector, cdRef: ChangeDetectorRef);
|
|
882
882
|
ngOnInit(): void;
|
|
883
883
|
ngOnDestroy(): void;
|
|
884
884
|
_instantiateTemplate(parent: HTMLElement, dataContext: any): {
|
package/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
*
|
|
3
|
-
* Wijmo Library 5.
|
|
3
|
+
* Wijmo Library 5.20261.45-nightly.d20260105.t014601
|
|
4
4
|
* https://developer.mescius.com/wijmo
|
|
5
5
|
*
|
|
6
6
|
* Copyright(c) MESCIUS inc. All rights reserved.
|
|
@@ -11,4 +11,4 @@
|
|
|
11
11
|
*
|
|
12
12
|
*/
|
|
13
13
|
|
|
14
|
-
"use strict";var __extends=this&&this.__extends||function(){var extendStatics=function(e,t){return(extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)};return function(e,t){extendStatics(e,t);function __(){this.constructor=e}e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}}(),__decorate=this&&this.__decorate||function(e,t,r,o){var i,n=arguments.length,l=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,r,o);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(l=(n<3?i(l):n>3?i(t,r,l):i(t,r))||l);return n>3&&l&&Object.defineProperty(t,r,l),l},__param=this&&this.__param||function(e,t){return function(r,o){t(r,o,e)}},__importStar=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);t.default=e;return t};Object.defineProperty(exports,"__esModule",{value:!0});var core_1=require("@angular/core"),common_1=require("@angular/common"),forms_1=require("@angular/forms"),wijmo.angular2legacy_directivebase_1=require("@mescius/wijmo.angular2legacy.directivebase"),wijmo_interop_grid_1=require("@mescius/wijmo.interop.grid"),wjcCore=__importStar(require("@mescius/wijmo")),wjcGrid=__importStar(require("@mescius/wijmo.grid")),wjcInteropGrid=__importStar(require("@mescius/wijmo.interop.grid"));exports.CellTemplateType=wjcInteropGrid.GridCellTemplateType;var wjFlexGridMeta={selector:"wj-flex-grid",template:"<div><ng-content></ng-content></div>",inputs:["wjModelProperty","isDisabled","tabOrder","newRowAtTop","allowAddNew","allowDelete","allowDragging","allowMerging","allowResizing","allowSorting","allowPinning","autoScroll","autoRowHeights","autoSizeMode","autoGenerateColumns","autoSearch","caseSensitiveSearch","quickAutoSize","bigCheckboxes","childItemsPath","groupHeaderFormat","headersVisibility","showSelectedHeaders","showMarquee","showPlaceholders","itemFormatter","isReadOnly","imeEnabled","mergeManager","selectionMode","showGroups","showSort","showDropDown","showAlternatingRows","showErrors","alternatingRowStep","itemValidator","validateEdits","treeIndent","itemsSource","autoClipboard","expandSelectionOnCopyPaste","frozenCells","frozenRows","frozenColumns","cloneFrozenCells","deferResizing","sortRowIndex","editColumnIndex","stickyHeaders","preserveSelectedState","preserveOutlineState","preserveWhiteSpace","keyActionTab","keyActionEnter","rowHeaderPath","virtualizationThreshold","anchorCursor","lazyRender","refreshOnEdit","copyHeaders","columnGroups","commitEmptyEdits","headersFocusability","ariaLabel","skipMerged","pasteEmptyCells","groupSummaryPosition","sortOrder","noDataOverlayContent"],outputs:["initialized","gotFocusNg: gotFocus","lostFocusNg: lostFocus","refreshingNg: refreshing","refreshedNg: refreshed","invalidInputNg: invalidInput","beginningEditNg: beginningEdit","cellEditEndedNg: cellEditEnded","cellEditEndingNg: cellEditEnding","prepareCellForEditNg: prepareCellForEdit","formatItemNg: formatItem","resizingColumnNg: resizingColumn","resizedColumnNg: resizedColumn","autoSizingColumnNg: autoSizingColumn","autoSizedColumnNg: autoSizedColumn","draggingColumnNg: draggingColumn","draggingColumnOverNg: draggingColumnOver","draggedColumnNg: draggedColumn","sortingColumnNg: sortingColumn","sortedColumnNg: sortedColumn","pinningColumnNg: pinningColumn","pinnedColumnNg: pinnedColumn","resizingRowNg: resizingRow","resizedRowNg: resizedRow","autoSizingRowNg: autoSizingRow","autoSizedRowNg: autoSizedRow","draggingRowNg: draggingRow","draggingRowOverNg: draggingRowOver","draggedRowNg: draggedRow","deletingRowNg: deletingRow","deletedRowNg: deletedRow","loadingRowsNg: loadingRows","loadedRowsNg: loadedRows","rowEditStartingNg: rowEditStarting","rowEditStartedNg: rowEditStarted","rowEditEndingNg: rowEditEnding","rowEditEndedNg: rowEditEnded","rowAddedNg: rowAdded","groupCollapsedChangingNg: groupCollapsedChanging","groupCollapsedChangedNg: groupCollapsedChanged","columnGroupCollapsedChangingNg: columnGroupCollapsedChanging","columnGroupCollapsedChangedNg: columnGroupCollapsedChanged","itemsSourceChangingNg: itemsSourceChanging","itemsSourceChangedNg: itemsSourceChanged","selectionChangingNg: selectionChanging","selectionChangedNg: selectionChanged","scrollPositionChangedNg: scrollPositionChanged","updatingViewNg: updatingView","updatedViewNg: updatedView","updatingLayoutNg: updatingLayout","updatedLayoutNg: updatedLayout","pastingNg: pasting","pastedNg: pasted","pastingCellNg: pastingCell","pastedCellNg: pastedCell","copyingNg: copying","copiedNg: copied","gettingCellClipStringNg: gettingCellClipString"],providers:[{provide:forms_1.NG_VALUE_ACCESSOR,useFactory:wijmo.angular2legacy_directivebase_1.WjValueAccessorFactory,multi:!0,deps:["WjComponent"]}]};exports.wjFlexGridMeta=wjFlexGridMeta;var WjFlexGrid=function(e){__extends(WjFlexGrid,e);function WjFlexGrid(t,r,o,i){var n=e.call(this,wijmo.angular2legacy_directivebase_1.WjDirectiveBehavior.getHostElement(t,r))||this;n.cdRef=i;n.isInitialized=!1;n._wjBehaviour=wijmo.angular2legacy_directivebase_1.WjDirectiveBehavior.attach(n,t,r,o);new DirectiveCellFactory(n,i);n.deferUpdate((function(){if(n.rows.defaultSize<10){var e=n.hostElement,t=getComputedStyle(e),r=getComputedStyle(document.body),o=2*parseInt(t.fontSize&&wjcCore.contains(document.body,e)?t.fontSize:r.fontSize);n.rows.defaultSize=o;n.columns.defaultSize=4*o;n.columnHeaders.rows.defaultSize=o;n.rowHeaders.columns.defaultSize=Math.round(1.25*o)}}));n.created();return n}t=WjFlexGrid;WjFlexGrid.prototype.created=function(){};WjFlexGrid.prototype.ngOnInit=function(){this._wjBehaviour.ngOnInit()};WjFlexGrid.prototype.ngAfterViewInit=function(){this._wjBehaviour.ngAfterViewInit()};WjFlexGrid.prototype.ngOnDestroy=function(){this._wjBehaviour.ngOnDestroy()};WjFlexGrid.prototype.addEventListener=function(t,r,o,i){var n=this;void 0===i&&(i=!1);var l=wijmo.angular2legacy_directivebase_1.WjDirectiveBehavior,a=l.getZone(this);a&&l.outsideZoneEvents[r]?a.runOutsideAngular((function(){e.prototype.addEventListener.call(n,t,r,o,i)})):e.prototype.addEventListener.call(this,t,r,o,i)};WjFlexGrid.prototype.startEditing=function(t,r,o,i,n){void 0===t&&(t=!0);this._edtFocus=null;var l=e.prototype.startEditing.call(this,t,r,o,i,n);l&&(this._edtFocus=i||null==i);return l};WjFlexGrid.prototype.onCellEditEnding=function(t){this._edtFocus=null;return e.prototype.onCellEditEnding.call(this,t)};var t;WjFlexGrid.meta={outputs:wjFlexGridMeta.outputs};return WjFlexGrid=t=__decorate([core_1.Component({selector:wjFlexGridMeta.selector,template:wjFlexGridMeta.template,inputs:wjFlexGridMeta.inputs,outputs:wjFlexGridMeta.outputs,providers:[{provide:"WjComponent",useExisting:core_1.forwardRef((function(){return t}))}].concat(wjFlexGridMeta.providers)}),__param(0,core_1.Inject(core_1.ElementRef)),__param(1,core_1.Inject(core_1.Injector)),__param(2,core_1.Inject("WjComponent")),__param(2,core_1.SkipSelf()),__param(2,core_1.Optional()),__param(3,core_1.Inject(core_1.ChangeDetectorRef))],WjFlexGrid)}(wjcGrid.FlexGrid);exports.WjFlexGrid=WjFlexGrid;var wjFlexGridColumnMeta={selector:"wj-flex-grid-column",template:"<div><ng-content></ng-content></div>",inputs:["asyncBindings","wjProperty","name","dataMap","dataType","binding","sortMemberPath","format","cellTemplate","header","width","maxLength","minWidth","maxWidth","align","allowDragging","allowSorting","allowResizing","allowMerging","aggregate","isReadOnly","cssClass","cssClassAll","isContentHtml","isSelected","visible","wordWrap","multiLine","mask","inputType","isRequired","showDropDown","dataMapEditor","dropDownCssClass","quickAutoSize","editor","placeholder","sortOrder"],outputs:["initialized","isSelectedChangePC: isSelectedChange"],providers:[]};exports.wjFlexGridColumnMeta=wjFlexGridColumnMeta;var WjFlexGridColumn=function(e){__extends(WjFlexGridColumn,e);function WjFlexGridColumn(t,r,o,i){var n=e.call(this)||this;n.cdRef=i;n.isInitialized=!1;n.wjProperty="columns";var l=(n._wjBehaviour=wijmo.angular2legacy_directivebase_1.WjDirectiveBehavior.attach(n,t,r,o)).parentBehavior.directive;if(l.autoGenerateColumns){l.autoGenerateColumns=!1;l.columns.clear()}n.created();return n}t=WjFlexGridColumn;WjFlexGridColumn.prototype.created=function(){};WjFlexGridColumn.prototype.ngOnInit=function(){this._wjBehaviour.ngOnInit()};WjFlexGridColumn.prototype.ngAfterViewInit=function(){this._wjBehaviour.ngAfterViewInit()};WjFlexGridColumn.prototype.ngOnDestroy=function(){this._wjBehaviour.ngOnDestroy()};var t;WjFlexGridColumn.meta={outputs:wjFlexGridColumnMeta.outputs,changeEvents:{"grid.selectionChanged":["isSelected"]}};return WjFlexGridColumn=t=__decorate([core_1.Component({selector:wjFlexGridColumnMeta.selector,template:wjFlexGridColumnMeta.template,inputs:wjFlexGridColumnMeta.inputs,outputs:wjFlexGridColumnMeta.outputs,providers:[{provide:"WjComponent",useExisting:core_1.forwardRef((function(){return t}))}].concat(wjFlexGridColumnMeta.providers)}),__param(0,core_1.Inject(core_1.ElementRef)),__param(1,core_1.Inject(core_1.Injector)),__param(2,core_1.Inject("WjComponent")),__param(2,core_1.SkipSelf()),__param(2,core_1.Optional()),__param(3,core_1.Inject(core_1.ChangeDetectorRef))],WjFlexGridColumn)}(wjcGrid.Column);exports.WjFlexGridColumn=WjFlexGridColumn;var wjFlexGridColumnGroupMeta={selector:"wj-flex-grid-column-group",template:"<div><ng-content></ng-content></div>",inputs:["asyncBindings","wjProperty","name","dataMap","dataType","binding","sortMemberPath","format","cellTemplate","header","width","maxLength","minWidth","maxWidth","align","allowDragging","allowSorting","allowResizing","allowMerging","aggregate","isReadOnly","cssClass","cssClassAll","isContentHtml","isSelected","visible","wordWrap","multiLine","mask","inputType","isRequired","showDropDown","dataMapEditor","dropDownCssClass","quickAutoSize","editor","placeholder","collapseTo","isCollapsed","height","sortOrder"],outputs:["initialized","isSelectedChangePC: isSelectedChange"],providers:[]};exports.wjFlexGridColumnGroupMeta=wjFlexGridColumnGroupMeta;var WjFlexGridColumnGroup=function(e){__extends(WjFlexGridColumnGroup,e);function WjFlexGridColumnGroup(t,r,o){var i=e.call(this)||this;i.isInitialized=!1;i.wjProperty="columnGroups";i._wjBehaviour=wijmo.angular2legacy_directivebase_1.WjDirectiveBehavior.attach(i,t,r,o);i.created();return i}t=WjFlexGridColumnGroup;WjFlexGridColumnGroup.prototype.created=function(){};WjFlexGridColumnGroup.prototype.ngOnInit=function(){this._wjBehaviour.ngOnInit()};WjFlexGridColumnGroup.prototype.ngAfterViewInit=function(){this._wjBehaviour.ngAfterViewInit()};WjFlexGridColumnGroup.prototype.ngOnDestroy=function(){this._wjBehaviour.ngOnDestroy()};var t;WjFlexGridColumnGroup.meta={outputs:wjFlexGridColumnGroupMeta.outputs,changeEvents:{"grid.selectionChanged":["isSelected"]}};return WjFlexGridColumnGroup=t=__decorate([core_1.Component({selector:wjFlexGridColumnGroupMeta.selector,template:wjFlexGridColumnGroupMeta.template,inputs:wjFlexGridColumnGroupMeta.inputs,outputs:wjFlexGridColumnGroupMeta.outputs,providers:[{provide:"WjComponent",useExisting:core_1.forwardRef((function(){return t}))}].concat(wjFlexGridColumnGroupMeta.providers)}),__param(0,core_1.Inject(core_1.ElementRef)),__param(1,core_1.Inject(core_1.Injector)),__param(2,core_1.Inject("WjComponent")),__param(2,core_1.SkipSelf()),__param(2,core_1.Optional())],WjFlexGridColumnGroup)}(wjcGrid.ColumnGroup);exports.WjFlexGridColumnGroup=WjFlexGridColumnGroup;var WjFlexGridCellTemplate=function(){function WjFlexGridCellTemplate(e,t,r,o,i,n){this.viewContainerRef=e;this.templateRef=t;this.elRef=r;this.cdRef=n;this.autoSizeRows=!0;this.forceFullEdit=!0;if(o instanceof wjcGrid.FlexGrid)this.grid=o;else if(o instanceof wjcGrid.Column){this.column=o;var l=void 0,a=wijmo.angular2legacy_directivebase_1.WjDirectiveBehavior.getBehavior(o);do{l=(a=a.parentBehavior)&&a.directive}while(l&&!(l instanceof wjcGrid.FlexGrid));this.grid=l}}e=WjFlexGridCellTemplate;Object.defineProperty(WjFlexGridCellTemplate.prototype,"cellType",{get:function(){return this.cellTypeStr},set:function(e){this.cellTypeStr=wjcCore.asEnum(e,exports.CellTemplateType)},enumerable:!0,configurable:!0});WjFlexGridCellTemplate.prototype.ngOnInit=function(){this.ownerControl=this.column&&this.column.grid===this.grid?this.column:this.grid;this._attachToControl()};WjFlexGridCellTemplate.prototype.ngOnDestroy=function(){if(exports.CellTemplateType[this.cellType]){this.viewContainerRef.clear();this.ownerControl[DirectiveCellFactory.getTemplContextProp(this.cellTypeStr)]=null;this.grid.invalidate()}};WjFlexGridCellTemplate.prototype._instantiateTemplate=function(e,t){return wijmo.angular2legacy_directivebase_1.WjDirectiveBehavior.instantiateTemplate(e,this.viewContainerRef,this.templateRef,!1,t)};WjFlexGridCellTemplate.prototype._attachToControl=function(){if(exports.CellTemplateType[this.cellType]){var e=this.cellTypeStr,t=this.ownerControl;t[DirectiveCellFactory.getTemplContextProp(e)]=this;t instanceof wjcGrid.Column&&(e===exports.CellTemplateType.Cell||e===exports.CellTemplateType.ColumnHeader||e===exports.CellTemplateType.ColumnFooter)&&t._setFlag(wjcGrid.RowColFlags.HasTemplate,!0);this.grid.invalidate()}};var e;__decorate([core_1.Input()],WjFlexGridCellTemplate.prototype,"cellType",null);return WjFlexGridCellTemplate=e=__decorate([core_1.Directive({selector:"[wjFlexGridCellTemplate]",inputs:["wjFlexGridCellTemplate","cellOverflow","valuePaths","autoSizeRows","forceFullEdit"],exportAs:"wjFlexGridCellTemplate",providers:[{provide:"WjComponent",useExisting:core_1.forwardRef((function(){return e}))}]}),__param(0,core_1.Inject(core_1.ViewContainerRef)),__param(1,core_1.Inject(core_1.TemplateRef)),__param(1,core_1.Optional()),__param(2,core_1.Inject(core_1.ElementRef)),__param(3,core_1.Inject("WjComponent")),__param(3,core_1.SkipSelf()),__param(3,core_1.Optional()),__param(4,core_1.Inject(core_1.Injector)),__param(5,core_1.Inject(core_1.ChangeDetectorRef))],WjFlexGridCellTemplate)}();exports.WjFlexGridCellTemplate=WjFlexGridCellTemplate;var DirectiveCellFactory=function(e){__extends(DirectiveCellFactory,e);function DirectiveCellFactory(t,r){var o=e.call(this,t)||this;o._needsCdCheck=!1;o._gridCdRef=r;t.updatedView.addHandler((function(){if(o._needsCdCheck){o._needsCdCheck=!1;o._gridCdRef.markForCheck()}}),o);return o}DirectiveCellFactory.prototype._updatedViewHandler=function(){var e=this;setTimeout((function(){e._autoSizeIfRequired()}))};DirectiveCellFactory.prototype.shouldInstantiate=function(e){var t=e.templateCache;return null==t||t.column!==e.column||!t.viewRef||t.templateContextProperty!==e.templateContextProperty||e.cell.firstChild!=t.rootElement};DirectiveCellFactory.prototype.renderTemplate=function(e,t){var r=e.row,o=t?{}:e.templateCache.viewRef.context,i=e.templateContext;e.cellBindingsData=this.setBindingsData(o,r,e.column,r.dataItem,e.cellValue,i.valuePaths);e.cellBindingsData.localVars.valueFormatted=e.cellValueFormatted;if(t){var n=e.cell,l=i._instantiateTemplate(n,o),a=e.templateCache={column:e.column,viewRef:l.viewRef,rootElement:l.rootElement,templateContextProperty:e.templateContextProperty};n[e.templateContextProperty]=a}};DirectiveCellFactory.prototype.setBindingsData=function(t,r,o,i,n,l){this._needsCdCheck=!0;return e.prototype.setBindingsData.call(this,t,r,o,i,n,l)};DirectiveCellFactory.prototype.disposeTemplate=function(t,r,o){if(r&&r.viewRef){if(o){var i=o.viewContainerRef.indexOf(r.viewRef);i>-1&&o.viewContainerRef.remove(i)}r.viewRef=null;e.prototype.disposeTemplate.call(this,t,r,o)}};DirectiveCellFactory.prototype.clearCell=function(e){e.textContent=""};DirectiveCellFactory.prototype.applyImmediately=function(e){e.templateContext.cdRef.detectChanges()};DirectiveCellFactory.prototype.flushPendingEvents=function(e){if(e){var t=wijmo.angular2legacy_directivebase_1.WjDirectiveBehavior.getBehavior(e);t&&t.flushPendingEvents()}};DirectiveCellFactory.prototype.getEditorFocusFlag=function(){return this.grid._edtFocus};DirectiveCellFactory.prototype.setEditorFocusFlag=function(e){this.grid._edtFocus=e};DirectiveCellFactory.prototype.checkHeight=function(t){var r=this;wijmo.angular2legacy_directivebase_1.WjDirectiveBehavior.getZone(this.grid).runOutsideAngular((function(){e.prototype.checkHeight.call(r,t)}))};return DirectiveCellFactory}(wijmo_interop_grid_1.DirectiveCellFactoryBase);exports.DirectiveCellFactory=DirectiveCellFactory;var moduleExports=[WjFlexGrid,WjFlexGridColumn,WjFlexGridColumnGroup,WjFlexGridCellTemplate],WjGridModule=function(){function WjGridModule(){}return WjGridModule=__decorate([core_1.NgModule({imports:[common_1.CommonModule],declarations:moduleExports.slice(),exports:moduleExports.slice()})],WjGridModule)}();exports.WjGridModule=WjGridModule;
|
|
14
|
+
"use strict";var __extends=this&&this.__extends||function(){var extendStatics=function(e,t){return(extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)};return function(e,t){extendStatics(e,t);function __(){this.constructor=e}e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}}(),__decorate=this&&this.__decorate||function(e,t,r,o){var i,n=arguments.length,l=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,r,o);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(l=(n<3?i(l):n>3?i(t,r,l):i(t,r))||l);return n>3&&l&&Object.defineProperty(t,r,l),l},__param=this&&this.__param||function(e,t){return function(r,o){t(r,o,e)}},__importStar=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);t.default=e;return t};Object.defineProperty(exports,"__esModule",{value:!0});var core_1=require("@angular/core"),common_1=require("@angular/common"),forms_1=require("@angular/forms"),wijmo.angular2legacy_directivebase_1=require("@mescius/wijmo.angular2legacy.directivebase"),wijmo_interop_grid_1=require("@mescius/wijmo.interop.grid"),wjcCore=__importStar(require("@mescius/wijmo")),wjcGrid=__importStar(require("@mescius/wijmo.grid")),wjcInteropGrid=__importStar(require("@mescius/wijmo.interop.grid"));exports.CellTemplateType=wjcInteropGrid.GridCellTemplateType;var wjFlexGridMeta={selector:"wj-flex-grid",template:"<div><ng-content></ng-content></div>",inputs:["wjModelProperty","isDisabled","tabOrder","newRowAtTop","allowAddNew","allowDelete","allowDragging","allowMerging","allowResizing","allowSorting","allowPinning","autoScroll","autoRowHeights","autoSizeMode","autoGenerateColumns","autoSearch","caseSensitiveSearch","quickAutoSize","bigCheckboxes","childItemsPath","groupHeaderFormat","headersVisibility","showSelectedHeaders","showMarquee","showPlaceholders","itemFormatter","isReadOnly","imeEnabled","mergeManager","selectionMode","showGroups","showSort","showDropDown","showAlternatingRows","showErrors","alternatingRowStep","itemValidator","validateEdits","treeIndent","itemsSource","autoClipboard","expandSelectionOnCopyPaste","frozenCells","frozenRows","frozenColumns","cloneFrozenCells","deferResizing","sortRowIndex","editColumnIndex","stickyHeaders","preserveSelectedState","preserveOutlineState","preserveWhiteSpace","keyActionTab","keyActionEnter","rowHeaderPath","virtualizationThreshold","anchorCursor","lazyRender","refreshOnEdit","copyHeaders","columnGroups","commitEmptyEdits","headersFocusability","ariaLabel","skipMerged","pasteEmptyCells","groupSummaryPosition","sortOrder","noDataOverlayContent"],outputs:["initialized","gotFocusNg: gotFocus","lostFocusNg: lostFocus","refreshingNg: refreshing","refreshedNg: refreshed","invalidInputNg: invalidInput","beginningEditNg: beginningEdit","cellEditEndedNg: cellEditEnded","cellEditEndingNg: cellEditEnding","prepareCellForEditNg: prepareCellForEdit","formatItemNg: formatItem","resizingColumnNg: resizingColumn","resizedColumnNg: resizedColumn","autoSizingColumnNg: autoSizingColumn","autoSizedColumnNg: autoSizedColumn","draggingColumnNg: draggingColumn","draggingColumnOverNg: draggingColumnOver","draggedColumnNg: draggedColumn","sortingColumnNg: sortingColumn","sortedColumnNg: sortedColumn","pinningColumnNg: pinningColumn","pinnedColumnNg: pinnedColumn","resizingRowNg: resizingRow","resizedRowNg: resizedRow","autoSizingRowNg: autoSizingRow","autoSizedRowNg: autoSizedRow","draggingRowNg: draggingRow","draggingRowOverNg: draggingRowOver","draggedRowNg: draggedRow","deletingRowNg: deletingRow","deletedRowNg: deletedRow","loadingRowsNg: loadingRows","loadedRowsNg: loadedRows","rowEditStartingNg: rowEditStarting","rowEditStartedNg: rowEditStarted","rowEditEndingNg: rowEditEnding","rowEditEndedNg: rowEditEnded","rowAddedNg: rowAdded","groupCollapsedChangingNg: groupCollapsedChanging","groupCollapsedChangedNg: groupCollapsedChanged","columnGroupCollapsedChangingNg: columnGroupCollapsedChanging","columnGroupCollapsedChangedNg: columnGroupCollapsedChanged","itemsSourceChangingNg: itemsSourceChanging","itemsSourceChangedNg: itemsSourceChanged","selectionChangingNg: selectionChanging","selectionChangedNg: selectionChanged","scrollPositionChangedNg: scrollPositionChanged","updatingViewNg: updatingView","updatedViewNg: updatedView","updatingLayoutNg: updatingLayout","updatedLayoutNg: updatedLayout","pastingNg: pasting","pastedNg: pasted","pastingCellNg: pastingCell","pastedCellNg: pastedCell","copyingNg: copying","copiedNg: copied","gettingCellClipStringNg: gettingCellClipString"],providers:[{provide:forms_1.NG_VALUE_ACCESSOR,useFactory:wijmo.angular2legacy_directivebase_1.WjValueAccessorFactory,multi:!0,deps:["WjComponent"]}]};exports.wjFlexGridMeta=wjFlexGridMeta;var WjFlexGrid=function(e){__extends(WjFlexGrid,e);function WjFlexGrid(t,r,o,i){var n=e.call(this,wijmo.angular2legacy_directivebase_1.WjDirectiveBehavior.getHostElement(t,r))||this;n.cdRef=i;n.isInitialized=!1;n._wjBehaviour=wijmo.angular2legacy_directivebase_1.WjDirectiveBehavior.attach(n,t,r,o);new DirectiveCellFactory(n,i);n.deferUpdate((function(){if(n.rows.defaultSize<10){var e=n.hostElement,t=getComputedStyle(e),r=getComputedStyle(document.body),o=2*parseInt(t.fontSize&&wjcCore.contains(document.body,e)?t.fontSize:r.fontSize);n.rows.defaultSize=o;n.columns.defaultSize=4*o;n.columnHeaders.rows.defaultSize=o;n.rowHeaders.columns.defaultSize=Math.round(1.25*o)}}));n.created();return n}t=WjFlexGrid;WjFlexGrid.prototype.created=function(){};WjFlexGrid.prototype.ngOnInit=function(){this._wjBehaviour.ngOnInit()};WjFlexGrid.prototype.ngAfterViewInit=function(){this._wjBehaviour.ngAfterViewInit()};WjFlexGrid.prototype.ngOnDestroy=function(){this._wjBehaviour.ngOnDestroy()};WjFlexGrid.prototype.addEventListener=function(t,r,o,i){var n=this;void 0===i&&(i=!1);var l=wijmo.angular2legacy_directivebase_1.WjDirectiveBehavior,a=l.getZone(this);a&&l.outsideZoneEvents[r]?a.runOutsideAngular((function(){e.prototype.addEventListener.call(n,t,r,o,i)})):e.prototype.addEventListener.call(this,t,r,o,i)};WjFlexGrid.prototype.startEditing=function(t,r,o,i,n){void 0===t&&(t=!0);this._edtFocus=null;var l=e.prototype.startEditing.call(this,t,r,o,i,n);l&&(this._edtFocus=i||null==i);return l};WjFlexGrid.prototype.onCellEditEnding=function(t){this._edtFocus=null;return e.prototype.onCellEditEnding.call(this,t)};var t;WjFlexGrid.meta={outputs:wjFlexGridMeta.outputs};return WjFlexGrid=t=__decorate([core_1.Component({selector:wjFlexGridMeta.selector,template:wjFlexGridMeta.template,inputs:wjFlexGridMeta.inputs,outputs:wjFlexGridMeta.outputs,providers:[{provide:"WjComponent",useExisting:core_1.forwardRef((function(){return t}))}].concat(wjFlexGridMeta.providers)}),__param(0,core_1.Inject(core_1.ElementRef)),__param(1,core_1.Inject(core_1.Injector)),__param(2,core_1.Inject("WjComponent")),__param(2,core_1.SkipSelf()),__param(2,core_1.Optional()),__param(3,core_1.Inject(core_1.ChangeDetectorRef))],WjFlexGrid)}(wjcGrid.FlexGrid);exports.WjFlexGrid=WjFlexGrid;var wjFlexGridColumnMeta={selector:"wj-flex-grid-column",template:"<div><ng-content></ng-content></div>",inputs:["asyncBindings","wjProperty","name","dataMap","dataType","binding","sortMemberPath","format","cellTemplate","header","width","maxLength","minWidth","maxWidth","align","allowDragging","allowSorting","allowResizing","allowMerging","aggregate","isReadOnly","cssClass","cssClassAll","isContentHtml","isSelected","visible","wordWrap","multiLine","mask","inputType","isRequired","showDropDown","dataMapEditor","dropDownCssClass","quickAutoSize","editor","placeholder","sortOrder"],outputs:["initialized","isSelectedChangePC: isSelectedChange"],providers:[]};exports.wjFlexGridColumnMeta=wjFlexGridColumnMeta;var WjFlexGridColumn=function(e){__extends(WjFlexGridColumn,e);function WjFlexGridColumn(t,r,o,i){var n=e.call(this)||this;n.cdRef=i;n.isInitialized=!1;n.wjProperty="columns";n._wjBehaviour=wijmo.angular2legacy_directivebase_1.WjDirectiveBehavior.attach(n,t,r,o);var l=n._wjBehaviour.parentBehavior.directive;if(l.autoGenerateColumns){l.autoGenerateColumns=!1;l.columns.clear()}n.created();return n}t=WjFlexGridColumn;WjFlexGridColumn.prototype.created=function(){};WjFlexGridColumn.prototype.ngOnInit=function(){this._wjBehaviour.ngOnInit()};WjFlexGridColumn.prototype.ngAfterViewInit=function(){this._wjBehaviour.ngAfterViewInit()};WjFlexGridColumn.prototype.ngOnDestroy=function(){this._wjBehaviour.ngOnDestroy()};var t;WjFlexGridColumn.meta={outputs:wjFlexGridColumnMeta.outputs,changeEvents:{"grid.selectionChanged":["isSelected"]}};return WjFlexGridColumn=t=__decorate([core_1.Component({selector:wjFlexGridColumnMeta.selector,template:wjFlexGridColumnMeta.template,inputs:wjFlexGridColumnMeta.inputs,outputs:wjFlexGridColumnMeta.outputs,providers:[{provide:"WjComponent",useExisting:core_1.forwardRef((function(){return t}))}].concat(wjFlexGridColumnMeta.providers)}),__param(0,core_1.Inject(core_1.ElementRef)),__param(1,core_1.Inject(core_1.Injector)),__param(2,core_1.Inject("WjComponent")),__param(2,core_1.SkipSelf()),__param(2,core_1.Optional()),__param(3,core_1.Inject(core_1.ChangeDetectorRef))],WjFlexGridColumn)}(wjcGrid.Column);exports.WjFlexGridColumn=WjFlexGridColumn;var wjFlexGridColumnGroupMeta={selector:"wj-flex-grid-column-group",template:"<div><ng-content></ng-content></div>",inputs:["asyncBindings","wjProperty","name","dataMap","dataType","binding","sortMemberPath","format","cellTemplate","header","width","maxLength","minWidth","maxWidth","align","allowDragging","allowSorting","allowResizing","allowMerging","aggregate","isReadOnly","cssClass","cssClassAll","isContentHtml","isSelected","visible","wordWrap","multiLine","mask","inputType","isRequired","showDropDown","dataMapEditor","dropDownCssClass","quickAutoSize","editor","placeholder","collapseTo","isCollapsed","height","sortOrder"],outputs:["initialized","isSelectedChangePC: isSelectedChange"],providers:[]};exports.wjFlexGridColumnGroupMeta=wjFlexGridColumnGroupMeta;var WjFlexGridColumnGroup=function(e){__extends(WjFlexGridColumnGroup,e);function WjFlexGridColumnGroup(t,r,o){var i=e.call(this)||this;i.isInitialized=!1;i.wjProperty="columnGroups";i._wjBehaviour=wijmo.angular2legacy_directivebase_1.WjDirectiveBehavior.attach(i,t,r,o);i.created();return i}t=WjFlexGridColumnGroup;WjFlexGridColumnGroup.prototype.created=function(){};WjFlexGridColumnGroup.prototype.ngOnInit=function(){this._wjBehaviour.ngOnInit()};WjFlexGridColumnGroup.prototype.ngAfterViewInit=function(){this._wjBehaviour.ngAfterViewInit()};WjFlexGridColumnGroup.prototype.ngOnDestroy=function(){this._wjBehaviour.ngOnDestroy()};var t;WjFlexGridColumnGroup.meta={outputs:wjFlexGridColumnGroupMeta.outputs,changeEvents:{"grid.selectionChanged":["isSelected"]}};return WjFlexGridColumnGroup=t=__decorate([core_1.Component({selector:wjFlexGridColumnGroupMeta.selector,template:wjFlexGridColumnGroupMeta.template,inputs:wjFlexGridColumnGroupMeta.inputs,outputs:wjFlexGridColumnGroupMeta.outputs,providers:[{provide:"WjComponent",useExisting:core_1.forwardRef((function(){return t}))}].concat(wjFlexGridColumnGroupMeta.providers)}),__param(0,core_1.Inject(core_1.ElementRef)),__param(1,core_1.Inject(core_1.Injector)),__param(2,core_1.Inject("WjComponent")),__param(2,core_1.SkipSelf()),__param(2,core_1.Optional())],WjFlexGridColumnGroup)}(wjcGrid.ColumnGroup);exports.WjFlexGridColumnGroup=WjFlexGridColumnGroup;var WjFlexGridCellTemplate=function(){function WjFlexGridCellTemplate(e,t,r,o,i,n){this.viewContainerRef=e;this.templateRef=t;this.elRef=r;this.cdRef=n;this.autoSizeRows=!0;this.forceFullEdit=!0;if(o instanceof wjcGrid.FlexGrid)this.grid=o;else if(o instanceof wjcGrid.Column){this.column=o;var l=null,a=wijmo.angular2legacy_directivebase_1.WjDirectiveBehavior.getBehavior(o);do{l=(a=a.parentBehavior)?a.directive:null}while(l&&!(l instanceof wjcGrid.FlexGrid));this.grid=l}}e=WjFlexGridCellTemplate;Object.defineProperty(WjFlexGridCellTemplate.prototype,"cellType",{get:function(){return this.cellTypeStr},set:function(e){this.cellTypeStr=wjcCore.asEnum(e,exports.CellTemplateType)},enumerable:!0,configurable:!0});WjFlexGridCellTemplate.prototype.ngOnInit=function(){this.ownerControl=this.column&&this.column.grid===this.grid?this.column:this.grid;this._attachToControl()};WjFlexGridCellTemplate.prototype.ngOnDestroy=function(){if(exports.CellTemplateType[this.cellType]){this.viewContainerRef.clear();this.ownerControl[DirectiveCellFactory.getTemplContextProp(this.cellTypeStr)]=null;this.grid.invalidate()}};WjFlexGridCellTemplate.prototype._instantiateTemplate=function(e,t){return wijmo.angular2legacy_directivebase_1.WjDirectiveBehavior.instantiateTemplate(e,this.viewContainerRef,this.templateRef,!1,t)};WjFlexGridCellTemplate.prototype._attachToControl=function(){if(exports.CellTemplateType[this.cellType]){var e=this.cellTypeStr,t=this.ownerControl;t[DirectiveCellFactory.getTemplContextProp(e)]=this;t instanceof wjcGrid.Column&&(e===exports.CellTemplateType.Cell||e===exports.CellTemplateType.ColumnHeader||e===exports.CellTemplateType.ColumnFooter)&&t._setFlag(wjcGrid.RowColFlags.HasTemplate,!0);this.grid.invalidate()}};var e;__decorate([core_1.Input()],WjFlexGridCellTemplate.prototype,"cellType",null);return WjFlexGridCellTemplate=e=__decorate([core_1.Directive({selector:"[wjFlexGridCellTemplate]",inputs:["wjFlexGridCellTemplate","cellOverflow","valuePaths","autoSizeRows","forceFullEdit"],exportAs:"wjFlexGridCellTemplate",providers:[{provide:"WjComponent",useExisting:core_1.forwardRef((function(){return e}))}]}),__param(0,core_1.Inject(core_1.ViewContainerRef)),__param(1,core_1.Inject(core_1.TemplateRef)),__param(1,core_1.Optional()),__param(2,core_1.Inject(core_1.ElementRef)),__param(3,core_1.Inject("WjComponent")),__param(3,core_1.SkipSelf()),__param(3,core_1.Optional()),__param(4,core_1.Inject(core_1.Injector)),__param(5,core_1.Inject(core_1.ChangeDetectorRef))],WjFlexGridCellTemplate)}();exports.WjFlexGridCellTemplate=WjFlexGridCellTemplate;var DirectiveCellFactory=function(e){__extends(DirectiveCellFactory,e);function DirectiveCellFactory(t,r){var o=e.call(this,t)||this;o._needsCdCheck=!1;o._gridCdRef=r;t.updatedView.addHandler((function(){if(o._needsCdCheck){o._needsCdCheck=!1;o._gridCdRef.markForCheck()}}),o);return o}DirectiveCellFactory.prototype._updatedViewHandler=function(){var e=this;setTimeout((function(){e._autoSizeIfRequired()}))};DirectiveCellFactory.prototype.shouldInstantiate=function(e){var t=e.templateCache;return null==t||t.column!==e.column||!t.viewRef||t.templateContextProperty!==e.templateContextProperty||e.cell.firstChild!=t.rootElement};DirectiveCellFactory.prototype.renderTemplate=function(e,t){var r=e.row,o=t?{}:e.templateCache.viewRef.context,i=e.templateContext;e.cellBindingsData=this.setBindingsData(o,r,e.column,r.dataItem,e.cellValue,i.valuePaths);e.cellBindingsData.localVars.valueFormatted=e.cellValueFormatted;if(t){var n=e.cell,l=i._instantiateTemplate(n,o),a={column:e.column,viewRef:l.viewRef,rootElement:l.rootElement,templateContextProperty:e.templateContextProperty};e.templateCache=a;n[e.templateContextProperty]=a}};DirectiveCellFactory.prototype.setBindingsData=function(t,r,o,i,n,l){this._needsCdCheck=!0;return e.prototype.setBindingsData.call(this,t,r,o,i,n,l)};DirectiveCellFactory.prototype.disposeTemplate=function(t,r,o){if(r&&r.viewRef){if(o){var i=o.viewContainerRef.indexOf(r.viewRef);i>-1&&o.viewContainerRef.remove(i)}r.viewRef=null;e.prototype.disposeTemplate.call(this,t,r,o)}};DirectiveCellFactory.prototype.clearCell=function(e){e.textContent=""};DirectiveCellFactory.prototype.applyImmediately=function(e){e.templateContext.cdRef.detectChanges()};DirectiveCellFactory.prototype.flushPendingEvents=function(e){if(e){var t=wijmo.angular2legacy_directivebase_1.WjDirectiveBehavior.getBehavior(e);t&&t.flushPendingEvents()}};DirectiveCellFactory.prototype.getEditorFocusFlag=function(){return this.grid._edtFocus};DirectiveCellFactory.prototype.setEditorFocusFlag=function(e){this.grid._edtFocus=e};DirectiveCellFactory.prototype.checkHeight=function(t){var r=this;wijmo.angular2legacy_directivebase_1.WjDirectiveBehavior.getZone(this.grid).runOutsideAngular((function(){e.prototype.checkHeight.call(r,t)}))};return DirectiveCellFactory}(wijmo_interop_grid_1.DirectiveCellFactoryBase);exports.DirectiveCellFactory=DirectiveCellFactory;var moduleExports=[WjFlexGrid,WjFlexGridColumn,WjFlexGridColumnGroup,WjFlexGridCellTemplate],WjGridModule=function(){function WjGridModule(){}return WjGridModule=__decorate([core_1.NgModule({imports:[common_1.CommonModule],declarations:moduleExports.slice(),exports:moduleExports.slice()})],WjGridModule)}();exports.WjGridModule=WjGridModule;
|
package/package.json
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mescius/wijmo.angular2legacy.grid",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.20261.45-nightly.d20260105.t014601",
|
|
4
4
|
"description": "UI library for pure JS, Angular, React, Vue and more...",
|
|
5
5
|
"author": "MESCIUS inc",
|
|
6
6
|
"license": "Commercial",
|
|
7
7
|
"main": "./index.js",
|
|
8
8
|
"types": "./index.d.ts",
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@mescius/wijmo": "5.
|
|
11
|
-
"@mescius/wijmo.grid": "5.
|
|
12
|
-
"@mescius/wijmo.input": "5.
|
|
13
|
-
"@mescius/wijmo.grid.detail": "5.
|
|
14
|
-
"@mescius/wijmo.interop.grid": "5.
|
|
15
|
-
"@mescius/wijmo.angular2legacy.directivebase": "5.
|
|
10
|
+
"@mescius/wijmo": "5.20261.45-nightly.d20260105.t014601",
|
|
11
|
+
"@mescius/wijmo.grid": "5.20261.45-nightly.d20260105.t014601",
|
|
12
|
+
"@mescius/wijmo.input": "5.20261.45-nightly.d20260105.t014601",
|
|
13
|
+
"@mescius/wijmo.grid.detail": "5.20261.45-nightly.d20260105.t014601",
|
|
14
|
+
"@mescius/wijmo.interop.grid": "5.20261.45-nightly.d20260105.t014601",
|
|
15
|
+
"@mescius/wijmo.angular2legacy.directivebase": "5.20261.45-nightly.d20260105.t014601"
|
|
16
16
|
},
|
|
17
17
|
"homepage": "https://developer.mescius.com/wijmo",
|
|
18
18
|
"bugs": {
|