New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@grapecity/wijmo.interop.grid

Package Overview
Dependencies
Maintainers
2
Versions
1109
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@grapecity/wijmo.interop.grid - npm Package Compare versions

Comparing version

to
5.20241.1-nightly.d20240221.t020535

4

es2015-commonjs.js
/*!
*
* Wijmo Library 5.20241.001-nightly.d20240215.t020127
* Wijmo Library 5.20241.001-nightly.d20240221.t020535
* https://developer.mescius.com/wijmo

@@ -14,2 +14,2 @@ *

"use strict";var __importStar=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var l in e)Object.hasOwnProperty.call(e,l)&&(t[l]=e[l]);t.default=e;return t};Object.defineProperty(exports,"__esModule",{value:!0});const wijmo_1=require("@grapecity/wijmo"),wjcCore=__importStar(require("@grapecity/wijmo")),wjcGrid=__importStar(require("@grapecity/wijmo.grid")),selfModule=__importStar(require("@grapecity/wijmo.interop.grid"));function softInput(){return wijmo_1._getModule("wijmo.input")}exports.softInput=softInput;function softGridDetail(){return wijmo_1._getModule("wijmo.grid.detail")}exports.softGridDetail=softGridDetail;var GridCellTemplateType,__gridCFRef=wjcGrid&&wjcGrid.CellFactory;if(!__gridCFRef){window.wijmo.grid={};window.wijmo.grid.CellFactory=function(){}}class DirectiveCellFactoryBase extends wjcGrid.CellFactory{constructor(e){super();this._lastApplyTimeStamp=0;this._noApplyLag=!1;this._startingEditing=!1;this._cellStampCounter=0;this._composing=!1;this._isCheckingHeight=!1;this._backupHeight=-1;this._cacheRow=null;this.grid=e;if(!DirectiveCellFactoryBase._templateTypes){DirectiveCellFactoryBase._templateTypes=[];for(var t in GridCellTemplateType)isNaN(t)&&DirectiveCellFactoryBase._templateTypes.push(t)}var l=this;this._baseCf=e.cellFactory;e.cellFactory=this;this._evtInput=document.createEvent("HTMLEvents");this._evtInput.initEvent("input",!0,!1);this._evtBlur=document.createEvent("HTMLEvents");this._evtBlur.initEvent("blur",!1,!1);e.prepareCellForEdit.addHandler((function(e,t){l._noApplyLag=!0}));e.cellEditEnded.addHandler((function(t,i){let r=i.range,o=r.col;(o<0||o<e.columns.length&&!e._getBindingColumn(e.cells,r.row,e.columns[o])[DirectiveCellFactoryBase.getTemplContextProp(GridCellTemplateType.CellEdit)])&&(l._editChar=null);setTimeout((function(){l._noApplyLag=!1}),300)}));e.beginningEdit.addHandler((function(e,t){l._startingEditing=!0}));e.hostElement.addEventListener("keydown",(function(e){l._startingEditing=!1}),!0);e.hostElement.addEventListener("keypress",(function(t){var i=t.charCode>32?String.fromCharCode(t.charCode):null;if(i&&wjcCore.closest(t.target,".wj-flexgrid")===e.hostElement)if(!e.activeEditor||l._startingEditing){l._editChar=i;setTimeout(()=>{e.activeEditor||(l._editChar=null)},0)}else l._editChar&&(l._editChar+=i)}),!0);e.hostElement.addEventListener("compositionstart",(function(e){l._composing=!0}),!0);e.hostElement.addEventListener("compositionend",(function(e){l._composing=!1}),!0)}updateCell(e,t,l,i,r){this._cellStampCounter=(this._cellStampCounter+1)%1e7;let o=i[DirectiveCellFactoryBase._cellStampProp]=this._cellStampCounter;i.style.overflow&&(i.style.overflow="");let n=t,a=l;if(r&&!r.isSingleCell){t=r.row;l=r.col}let s,d=this,c=e.grid,p=c.editRange,u=e.rows[t],m=u.dataItem,C=!1,h=!1,g=!1,_=!1;switch(e.cellType){case wjcGrid.CellType.Cell:if(p&&p.row===t&&p.col===l){s=GridCellTemplateType.CellEdit;h=g=!0}else if(u instanceof wjcGrid.GroupRow){var f=!((_=m instanceof wjcCore.CollectionViewGroup)||u.hasChildren);if(l==e.columns.firstVisibleIndex)s=f?GridCellTemplateType.Cell:GridCellTemplateType.GroupHeader;else{s=f?GridCellTemplateType.Cell:GridCellTemplateType.Group;h=!0}}else u instanceof wjcGrid._NewRowTemplate?s=GridCellTemplateType.NewCellTemplate:softGridDetail()&&softGridDetail().DetailRow&&u instanceof softGridDetail().DetailRow||(s=GridCellTemplateType.Cell);break;case wjcGrid.CellType.ColumnHeader:s=GridCellTemplateType.ColumnHeader;break;case wjcGrid.CellType.RowHeader:s=c.collectionView&&c.collectionView.currentEditItem===m?GridCellTemplateType.RowHeaderEdit:GridCellTemplateType.RowHeader;C=!0;break;case wjcGrid.CellType.TopLeft:s=GridCellTemplateType.TopLeft;C=!0;break;case wjcGrid.CellType.ColumnFooter:s=GridCellTemplateType.ColumnFooter;h=!0;break;case wjcGrid.CellType.BottomLeft:s=GridCellTemplateType.BottomLeft;C=!0}const w=!!_&&u.isSummary,y=_&&(c.groupSummary===wjcGrid.GroupSummary.Bottom||c.groupSummary===wjcGrid.GroupSummary.BottomCollapsedHidden&&!u.isCollapsed);var T=!1;if(null!=s){let p=null;_&&s==GridCellTemplateType.GroupHeader?p=c.getColumn(m.groupDescription.propertyName):l>=0&&l<e.columns.length&&(p=e.cellType===wjcGrid.CellType.ColumnHeader&&c._hasColumnGroups()?c._getColumnGroup(t,l):c._getBindingColumn(e,t,e.columns[l]));if(p){var E=DirectiveCellFactoryBase.getTemplContextProp,v=E(s),G=(C?c:p)[v];if(!G)if(s===GridCellTemplateType.RowHeaderEdit){v=E(s=GridCellTemplateType.RowHeader);G=c[v]}else if((s===GridCellTemplateType.Group||s===GridCellTemplateType.GroupHeader)&&!_){v=E(s=GridCellTemplateType.Cell);G=p[v]}if(G){var j,F;if(h){j=e.getCellData(t,l,!1);F=e.getCellData(t,l,!0)}{T=!0;let t=i.getAttribute(wjcGrid.FlexGrid._WJS_MEASURE),s=t&&"true"===t.toLowerCase();if(g){this.clearCell(i);this._baseCf.updateCell(e,n,a,i,r,!0)}let m,C=g&&c.imeEnabled,h=C&&this._composing,f=i[v],E={cell:i,column:p,row:u,panel:e,rng:r,isEdit:g,isImeInput:C,isTrueImeInput:h,templateContext:G,templateCache:f,templateContextProperty:v,cellStamp:o,cellValue:j,cellValueFormatted:F},I=this.shouldInstantiate(E),D=!0;_&&!w&&l!=e.columns.firstVisibleIndex&&y&&(D=!1);if(I){if(g){var H=i.firstElementChild;if(H){C||i.focus();H.style.display="none"}}else this.clearCell(i);this._doDisposeCell(i);if(D){this.renderTemplate(E,!0);E.templateCache=f=i[v]}else this._doDisposeCell(i);m=E.cellBindingsData}else{D?this.renderTemplate(E,!1):this._doDisposeCell(i);m=E.cellBindingsData}G.cellOverflow&&(i.style.overflow=G.cellOverflow);s?this.applyImmediately(E):G.autoSizeRows&&!C?this.checkHeight(E):g&&setTimeout(()=>{C?this._initImeEditInput(E.cell,G):this._initEditInput(E.cell,G,null)},0);if(g){d._cellEditorVars=m.localVars;var editEndingEH=function(e,t){c.cellEditEnding.removeHandler(editEndingEH);if(!t.stayInEditMode){let e=wjcCore.getActiveElement();e&&e.dispatchEvent(d._evtBlur);wjcCore.contains(i,wjcCore.getActiveElement())&&i.focus()}d._triggerEditorEvents(i);if(!t.cancel&&!t.stayInEditMode){let e=m.localVars,t=Object.getOwnPropertyNames(m.bindings);for(let l of t)m.bindings[l].setValue(e,m.localVars.values[l])}var l=i.querySelectorAll(".wj-dropdown");[].forEach.call(l,(function(e){var t=wjcCore.Control.getControl(e);t&&softInput()&&t instanceof softInput().DropDown&&(t.isDroppedDown=!1)}))};let editEndedEH=function(e,t){c.cellEditEnded.removeHandler(editEndedEH);d._cellEditorVars=null};c.cellEditEnding.addHandler(editEndingEH);c.cellEditEnded.addHandler(editEndedEH)}else this._baseCf.updateCell(e,n,a,i,r,!1)}}}}if(!T){this._doDisposeCell(i);this._baseCf.updateCell(e,n,a,i,r)}}getEditorValue(e){if(this._cellEditorVars){let t=e.editRange;t&&t.isValid&&this._triggerEditorEvents(e.cells.getCellElement(t.row,t.col));return this._cellEditorVars.value}return super.getEditorValue(e)}disposeCell(e){this._doDisposeCell(e)}disposeTemplate(e,t,l){if(t){t.rootElement=null;t.column=null;e[t.templateContextProperty]=null;t.templateContextProperty=null}}setBindingsData(e,t,l,i,r,o){e.row=t;e.col=l;e.item=i;let n={},a=e.cell||{},s={},d={localVars:a,bindings:s};a.row=t;a.col=l;a.item=i;a.value=r;a.valueFormatted=e.cellValueFormatted;a.values=n;if(o){let e=Object.getOwnPropertyNames(o);for(let t of e){let e=new wjcCore.Binding(o[t]);s[t]=e;n[t]=e.getValue(a)}}e.cell!==a&&(e.cell=a);return d}checkHeight(e){this._isCheckingHeight||setTimeout(()=>{let t=e.cell;if(e.cellStamp===t[DirectiveCellFactoryBase._cellStampProp]){var l=t.scrollHeight,i=e.panel.rows,r=e.row.index,o=e.rng,n=o&&o.rowSpan||1,a=e.isEdit;null!=i.maxSize&&(l=Math.min(l,i.maxSize));if(r<i.length&&i[r].renderHeight*n<l-1){const t=l/n;if(a){let l=this._isFullEdit(),i=this.grid;this._backupHeight=e.row.height;e.row.height=t;this._cacheRow=e.row;this._isCheckingHeight=!0;i.refresh();i.startEditing(l);this._isCheckingHeight=!1}}a&&(e.isImeInput?this._initImeEditInput(e.cell,e.templateContext):this._initEditInput(e.cell,e.templateContext,null))}},0)}_restoreRowHeight(){if(!this._isCheckingHeight&&this._cacheRow){this._cacheRow.height=this._backupHeight;this._backupHeight=-1;this._cacheRow=null}}doDisposeCell(e){for(var t=DirectiveCellFactoryBase._templateTypes,l=0;l<t.length;l++){var i=DirectiveCellFactoryBase.getTemplContextProp(GridCellTemplateType[t[l]]),r=e[i];if(r){let o=(r.column||this.grid)[i];this.disposeTemplate(e,r,o);t[l]==GridCellTemplateType[GridCellTemplateType.CellEdit]&&this._restoreRowHeight()}}}static getTemplContextProp(e){return"$__cellTempl"+GridCellTemplateType[e]}_doDisposeCell(e){this.doDisposeCell(e)}_initEditInput(e,t,l){this.setEditorFocusFlag(!0);let i=!1!==this.getEditorFocusFlag();this.setEditorFocusFlag(null);this._setFullEdit(t);i&&setTimeout(()=>{let t=this._findInitialInput(e);if(t){var inpFocusEh=()=>{t.removeEventListener("focus",inpFocusEh);setTimeout(()=>{setTimeout(()=>{let e=null!=l?l:this._editChar;if(e){t.value=e;this._editChar=null;DirectiveCellFactoryBase._setSelectionRange(t,e.length,e.length);t.dispatchEvent(this._evtInput)}},0)},DirectiveCellFactoryBase._FOCUS_INTERVAL)};t.addEventListener("focus",inpFocusEh);t.focus()}},100)}_initImeEditInput(e,t){let l=wjcCore.getActiveElement();if(l&&(l instanceof HTMLInputElement||l instanceof HTMLTextAreaElement)&&wjcCore.hasClass(l,"wj-grid-ime")){let i=this._findInitialInput(e),r=i&&i.style.color,o=this._composing,compEndEh=()=>{l.removeEventListener("compositionend",compEndEh);wjcCore.setCss(l,wjcGrid._ImeHandler._cssHidden);this.setEditorFocusFlag(!0);i&&(i.style.color=r);this._initEditInput(e,t,o?l.value:null)};if(o){l.addEventListener("compositionend",compEndEh);if(i){let e=i.getBoundingClientRect(),t=l.getBoundingClientRect(),r=window.getComputedStyle(l),o=parseFloat(r.left),n=parseFloat(r.top);wjcCore.setCss(l,{left:o+e.left-t.left+"px",top:n+e.top-t.top+"px",width:e.width+"px",height:e.height+"px"});i.style.color="transparent"}}else setTimeout(()=>compEndEh(),DirectiveCellFactoryBase._FOCUS_INTERVAL)}}_findInitialInput(e){let t=e&&e.rootElement&&e.rootElement.querySelectorAll("input,textarea")||e&&e.querySelectorAll("input,textarea");if(t)for(var l=0;l<t.length;l++){var i=t[l],r=window.getComputedStyle(i);if("none"!==r.display&&"visible"===r.visibility)return i}return null}static _setSelectionRange(e,t,l=t){if(wjcCore.contains(document.body,e)&&!e.disabled&&"none"!=e.style.display)try{e.setSelectionRange(wjcCore.asNumber(t),wjcCore.asNumber(l),wjcCore.isIE()?null:"backward");e.focus()}catch(e){}}_triggerEditorEvents(e){if(e){let t=e.querySelectorAll(".wj-control");for(let e=0;e<t.length;e++){let l=t[e],i=wjcCore.Control.getControl(l);i&&this.flushPendingEvents(i)}}}_isFullEdit(){let e=this.grid;return!e.activeEditor||e._edtHdl._fullEdit}_setFullEdit(e){let t=this.grid;e.forceFullEdit&&t.activeEditor&&(t._edtHdl._fullEdit=!0)}}DirectiveCellFactoryBase._cellStampProp="__wjCellStamp";DirectiveCellFactoryBase._FOCUS_INTERVAL=wjcCore.Control._FOCUS_INTERVAL+20;exports.DirectiveCellFactoryBase=DirectiveCellFactoryBase;__gridCFRef||(window.wijmo.grid=null);!function(e){e[e.Cell=0]="Cell";e[e.CellEdit=1]="CellEdit";e[e.ColumnHeader=2]="ColumnHeader";e[e.RowHeader=3]="RowHeader";e[e.RowHeaderEdit=4]="RowHeaderEdit";e[e.TopLeft=5]="TopLeft";e[e.GroupHeader=6]="GroupHeader";e[e.Group=7]="Group";e[e.NewCellTemplate=8]="NewCellTemplate";e[e.ColumnFooter=9]="ColumnFooter";e[e.BottomLeft=10]="BottomLeft"}(GridCellTemplateType=exports.GridCellTemplateType||(exports.GridCellTemplateType={}));wijmo_1._registerModule("wijmo.interop.grid",selfModule);
"use strict";var __importStar=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var l in e)Object.hasOwnProperty.call(e,l)&&(t[l]=e[l]);t.default=e;return t};Object.defineProperty(exports,"__esModule",{value:!0});const wijmo_1=require("@grapecity/wijmo"),wjcCore=__importStar(require("@grapecity/wijmo")),wjcGrid=__importStar(require("@grapecity/wijmo.grid")),selfModule=__importStar(require("@grapecity/wijmo.interop.grid"));function softInput(){return wijmo_1._getModule("wijmo.input")}exports.softInput=softInput;function softGridDetail(){return wijmo_1._getModule("wijmo.grid.detail")}exports.softGridDetail=softGridDetail;var GridCellTemplateType,__gridCFRef=wjcGrid&&wjcGrid.CellFactory;if(!__gridCFRef){window.wijmo.grid={};window.wijmo.grid.CellFactory=function(){}}class DirectiveCellFactoryBase extends wjcGrid.CellFactory{constructor(e){super();this._lastApplyTimeStamp=0;this._noApplyLag=!1;this._startingEditing=!1;this._cellStampCounter=0;this._composing=!1;this._isCheckingHeight=!1;this._backupHeight=-1;this._cacheRow=null;this.grid=e;if(!DirectiveCellFactoryBase._templateTypes){DirectiveCellFactoryBase._templateTypes=[];for(var t in GridCellTemplateType)isNaN(t)&&DirectiveCellFactoryBase._templateTypes.push(t)}var l=this;this._baseCf=e.cellFactory;e.cellFactory=this;this._evtInput=document.createEvent("HTMLEvents");this._evtInput.initEvent("input",!0,!1);this._evtBlur=document.createEvent("HTMLEvents");this._evtBlur.initEvent("blur",!1,!1);e.prepareCellForEdit.addHandler((function(e,t){l._noApplyLag=!0}));e.cellEditEnded.addHandler((function(t,i){let r=i.range,o=r.col;(o<0||o<e.columns.length&&!e._getBindingColumn(e.cells,r.row,e.columns[o])[DirectiveCellFactoryBase.getTemplContextProp(GridCellTemplateType.CellEdit)])&&(l._editChar=null);setTimeout((function(){l._noApplyLag=!1}),300)}));e.beginningEdit.addHandler((function(e,t){l._startingEditing=!0}));e.hostElement.addEventListener("keydown",(function(e){l._startingEditing=!1}),!0);e.hostElement.addEventListener("keypress",(function(t){var i=t.charCode>32?String.fromCharCode(t.charCode):null;if(i&&wjcCore.closest(t.target,".wj-flexgrid")===e.hostElement)if(!e.activeEditor||l._startingEditing){l._editChar=i;setTimeout(()=>{e.activeEditor||(l._editChar=null)},0)}else l._editChar&&(l._editChar+=i)}),!0);e.hostElement.addEventListener("compositionstart",(function(e){l._composing=!0}),!0);e.hostElement.addEventListener("compositionend",(function(e){l._composing=!1}),!0)}updateCell(e,t,l,i,r){this._cellStampCounter=(this._cellStampCounter+1)%1e7;let o=i[DirectiveCellFactoryBase._cellStampProp]=this._cellStampCounter;i.style.overflow&&(i.style.overflow="");let n=t,a=l;if(r&&!r.isSingleCell){t=r.row;l=r.col}let s,d=this,c=e.grid,p=c.editRange,u=e.rows[t],m=u.dataItem,C=!1,h=!1,g=!1,_=!1;switch(e.cellType){case wjcGrid.CellType.Cell:if(p&&p.row===t&&p.col===l){s=GridCellTemplateType.CellEdit;h=g=!0}else if(u instanceof wjcGrid.GroupRow){var f=!((_=m instanceof wjcCore.CollectionViewGroup)||u.hasChildren);if(l==e.columns.firstVisibleIndex)s=f?GridCellTemplateType.Cell:GridCellTemplateType.GroupHeader;else{s=f?GridCellTemplateType.Cell:GridCellTemplateType.Group;h=!0}}else u instanceof wjcGrid._NewRowTemplate?s=GridCellTemplateType.NewCellTemplate:softGridDetail()&&softGridDetail().DetailRow&&u instanceof softGridDetail().DetailRow||(s=GridCellTemplateType.Cell);break;case wjcGrid.CellType.ColumnHeader:s=GridCellTemplateType.ColumnHeader;break;case wjcGrid.CellType.RowHeader:s=c.collectionView&&c.collectionView.currentEditItem===m?GridCellTemplateType.RowHeaderEdit:GridCellTemplateType.RowHeader;C=!0;break;case wjcGrid.CellType.TopLeft:s=GridCellTemplateType.TopLeft;C=!0;break;case wjcGrid.CellType.ColumnFooter:s=GridCellTemplateType.ColumnFooter;h=!0;break;case wjcGrid.CellType.BottomLeft:s=GridCellTemplateType.BottomLeft;C=!0}const w=!!_&&u.isSummary,y=_&&(c.groupSummaryPosition===wjcGrid.GroupSummaryPosition.Bottom||c.groupSummaryPosition===wjcGrid.GroupSummaryPosition.Auto&&!u.isCollapsed);var T=!1;if(null!=s){let p=null;_&&s==GridCellTemplateType.GroupHeader?p=c.getColumn(m.groupDescription.propertyName):l>=0&&l<e.columns.length&&(p=e.cellType===wjcGrid.CellType.ColumnHeader&&c._hasColumnGroups()?c._getColumnGroup(t,l):c._getBindingColumn(e,t,e.columns[l]));if(p){var E=DirectiveCellFactoryBase.getTemplContextProp,v=E(s),G=(C?c:p)[v];if(!G)if(s===GridCellTemplateType.RowHeaderEdit){v=E(s=GridCellTemplateType.RowHeader);G=c[v]}else if((s===GridCellTemplateType.Group||s===GridCellTemplateType.GroupHeader)&&!_){v=E(s=GridCellTemplateType.Cell);G=p[v]}if(G){var j,F;if(h){j=e.getCellData(t,l,!1);F=e.getCellData(t,l,!0)}{T=!0;let t=i.getAttribute(wjcGrid.FlexGrid._WJS_MEASURE),s=t&&"true"===t.toLowerCase();if(g){this.clearCell(i);this._baseCf.updateCell(e,n,a,i,r,!0)}let m,C=g&&c.imeEnabled,h=C&&this._composing,f=i[v],E={cell:i,column:p,row:u,panel:e,rng:r,isEdit:g,isImeInput:C,isTrueImeInput:h,templateContext:G,templateCache:f,templateContextProperty:v,cellStamp:o,cellValue:j,cellValueFormatted:F},I=this.shouldInstantiate(E),D=!0;_&&!w&&l!=e.columns.firstVisibleIndex&&y&&(D=!1);if(I){if(g){var H=i.firstElementChild;if(H){C||i.focus();H.style.display="none"}}else this.clearCell(i);this._doDisposeCell(i);if(D){this.renderTemplate(E,!0);E.templateCache=f=i[v]}else this._doDisposeCell(i);m=E.cellBindingsData}else{D?this.renderTemplate(E,!1):this._doDisposeCell(i);m=E.cellBindingsData}G.cellOverflow&&(i.style.overflow=G.cellOverflow);s?this.applyImmediately(E):G.autoSizeRows&&!C?this.checkHeight(E):g&&setTimeout(()=>{C?this._initImeEditInput(E.cell,G):this._initEditInput(E.cell,G,null)},0);if(g){d._cellEditorVars=m.localVars;var editEndingEH=function(e,t){c.cellEditEnding.removeHandler(editEndingEH);if(!t.stayInEditMode){let e=wjcCore.getActiveElement();e&&e.dispatchEvent(d._evtBlur);wjcCore.contains(i,wjcCore.getActiveElement())&&i.focus()}d._triggerEditorEvents(i);if(!t.cancel&&!t.stayInEditMode){let e=m.localVars,t=Object.getOwnPropertyNames(m.bindings);for(let l of t)m.bindings[l].setValue(e,m.localVars.values[l])}var l=i.querySelectorAll(".wj-dropdown");[].forEach.call(l,(function(e){var t=wjcCore.Control.getControl(e);t&&softInput()&&t instanceof softInput().DropDown&&(t.isDroppedDown=!1)}))};let editEndedEH=function(e,t){c.cellEditEnded.removeHandler(editEndedEH);d._cellEditorVars=null};c.cellEditEnding.addHandler(editEndingEH);c.cellEditEnded.addHandler(editEndedEH)}else this._baseCf.updateCell(e,n,a,i,r,!1)}}}}if(!T){this._doDisposeCell(i);this._baseCf.updateCell(e,n,a,i,r)}}getEditorValue(e){if(this._cellEditorVars){let t=e.editRange;t&&t.isValid&&this._triggerEditorEvents(e.cells.getCellElement(t.row,t.col));return this._cellEditorVars.value}return super.getEditorValue(e)}disposeCell(e){this._doDisposeCell(e)}disposeTemplate(e,t,l){if(t){t.rootElement=null;t.column=null;e[t.templateContextProperty]=null;t.templateContextProperty=null}}setBindingsData(e,t,l,i,r,o){e.row=t;e.col=l;e.item=i;let n={},a=e.cell||{},s={},d={localVars:a,bindings:s};a.row=t;a.col=l;a.item=i;a.value=r;a.valueFormatted=e.cellValueFormatted;a.values=n;if(o){let e=Object.getOwnPropertyNames(o);for(let t of e){let e=new wjcCore.Binding(o[t]);s[t]=e;n[t]=e.getValue(a)}}e.cell!==a&&(e.cell=a);return d}checkHeight(e){this._isCheckingHeight||setTimeout(()=>{let t=e.cell;if(e.cellStamp===t[DirectiveCellFactoryBase._cellStampProp]){var l=t.scrollHeight,i=e.panel.rows,r=e.row.index,o=e.rng,n=o&&o.rowSpan||1,a=e.isEdit;null!=i.maxSize&&(l=Math.min(l,i.maxSize));if(r<i.length&&i[r].renderHeight*n<l-1){const t=l/n;if(a){let l=this._isFullEdit(),i=this.grid;this._backupHeight=e.row.height;e.row.height=t;this._cacheRow=e.row;this._isCheckingHeight=!0;i.refresh();i.startEditing(l);this._isCheckingHeight=!1}}a&&(e.isImeInput?this._initImeEditInput(e.cell,e.templateContext):this._initEditInput(e.cell,e.templateContext,null))}},0)}_restoreRowHeight(){if(!this._isCheckingHeight&&this._cacheRow){this._cacheRow.height=this._backupHeight;this._backupHeight=-1;this._cacheRow=null}}doDisposeCell(e){for(var t=DirectiveCellFactoryBase._templateTypes,l=0;l<t.length;l++){var i=DirectiveCellFactoryBase.getTemplContextProp(GridCellTemplateType[t[l]]),r=e[i];if(r){let o=(r.column||this.grid)[i];this.disposeTemplate(e,r,o);t[l]==GridCellTemplateType[GridCellTemplateType.CellEdit]&&this._restoreRowHeight()}}}static getTemplContextProp(e){return"$__cellTempl"+GridCellTemplateType[e]}_doDisposeCell(e){this.doDisposeCell(e)}_initEditInput(e,t,l){this.setEditorFocusFlag(!0);let i=!1!==this.getEditorFocusFlag();this.setEditorFocusFlag(null);this._setFullEdit(t);i&&setTimeout(()=>{let t=this._findInitialInput(e);if(t){var inpFocusEh=()=>{t.removeEventListener("focus",inpFocusEh);setTimeout(()=>{setTimeout(()=>{let e=null!=l?l:this._editChar;if(e){t.value=e;this._editChar=null;DirectiveCellFactoryBase._setSelectionRange(t,e.length,e.length);t.dispatchEvent(this._evtInput)}},0)},DirectiveCellFactoryBase._FOCUS_INTERVAL)};t.addEventListener("focus",inpFocusEh);t.focus()}},100)}_initImeEditInput(e,t){let l=wjcCore.getActiveElement();if(l&&(l instanceof HTMLInputElement||l instanceof HTMLTextAreaElement)&&wjcCore.hasClass(l,"wj-grid-ime")){let i=this._findInitialInput(e),r=i&&i.style.color,o=this._composing,compEndEh=()=>{l.removeEventListener("compositionend",compEndEh);wjcCore.setCss(l,wjcGrid._ImeHandler._cssHidden);this.setEditorFocusFlag(!0);i&&(i.style.color=r);this._initEditInput(e,t,o?l.value:null)};if(o){l.addEventListener("compositionend",compEndEh);if(i){let e=i.getBoundingClientRect(),t=l.getBoundingClientRect(),r=window.getComputedStyle(l),o=parseFloat(r.left),n=parseFloat(r.top);wjcCore.setCss(l,{left:o+e.left-t.left+"px",top:n+e.top-t.top+"px",width:e.width+"px",height:e.height+"px"});i.style.color="transparent"}}else setTimeout(()=>compEndEh(),DirectiveCellFactoryBase._FOCUS_INTERVAL)}}_findInitialInput(e){let t=e&&e.rootElement&&e.rootElement.querySelectorAll("input,textarea")||e&&e.querySelectorAll("input,textarea");if(t)for(var l=0;l<t.length;l++){var i=t[l],r=window.getComputedStyle(i);if("none"!==r.display&&"visible"===r.visibility)return i}return null}static _setSelectionRange(e,t,l=t){if(wjcCore.contains(document.body,e)&&!e.disabled&&"none"!=e.style.display)try{e.setSelectionRange(wjcCore.asNumber(t),wjcCore.asNumber(l),wjcCore.isIE()?null:"backward");e.focus()}catch(e){}}_triggerEditorEvents(e){if(e){let t=e.querySelectorAll(".wj-control");for(let e=0;e<t.length;e++){let l=t[e],i=wjcCore.Control.getControl(l);i&&this.flushPendingEvents(i)}}}_isFullEdit(){let e=this.grid;return!e.activeEditor||e._edtHdl._fullEdit}_setFullEdit(e){let t=this.grid;e.forceFullEdit&&t.activeEditor&&(t._edtHdl._fullEdit=!0)}}DirectiveCellFactoryBase._cellStampProp="__wjCellStamp";DirectiveCellFactoryBase._FOCUS_INTERVAL=wjcCore.Control._FOCUS_INTERVAL+20;exports.DirectiveCellFactoryBase=DirectiveCellFactoryBase;__gridCFRef||(window.wijmo.grid=null);!function(e){e[e.Cell=0]="Cell";e[e.CellEdit=1]="CellEdit";e[e.ColumnHeader=2]="ColumnHeader";e[e.RowHeader=3]="RowHeader";e[e.RowHeaderEdit=4]="RowHeaderEdit";e[e.TopLeft=5]="TopLeft";e[e.GroupHeader=6]="GroupHeader";e[e.Group=7]="Group";e[e.NewCellTemplate=8]="NewCellTemplate";e[e.ColumnFooter=9]="ColumnFooter";e[e.BottomLeft=10]="BottomLeft"}(GridCellTemplateType=exports.GridCellTemplateType||(exports.GridCellTemplateType={}));wijmo_1._registerModule("wijmo.interop.grid",selfModule);
/*!
*
* Wijmo Library 5.20241.001-nightly.d20240215.t020127
* Wijmo Library 5.20241.001-nightly.d20240221.t020535
* https://developer.mescius.com/wijmo

@@ -14,2 +14,2 @@ *

import{_getModule,_registerModule}from"@grapecity/wijmo";import*as wjcCore from"@grapecity/wijmo";import*as wjcGrid from"@grapecity/wijmo.grid";import*as selfModule from"@grapecity/wijmo.interop.grid";export function softInput(){return _getModule("wijmo.input")}export function softGridDetail(){return _getModule("wijmo.grid.detail")}var __gridCFRef=wjcGrid&&wjcGrid.CellFactory;if(!__gridCFRef){window.wijmo.grid={};window.wijmo.grid.CellFactory=function(){}}export class DirectiveCellFactoryBase extends wjcGrid.CellFactory{constructor(e){super();this._lastApplyTimeStamp=0;this._noApplyLag=!1;this._startingEditing=!1;this._cellStampCounter=0;this._composing=!1;this._isCheckingHeight=!1;this._backupHeight=-1;this._cacheRow=null;this.grid=e;if(!DirectiveCellFactoryBase._templateTypes){DirectiveCellFactoryBase._templateTypes=[];for(var t in GridCellTemplateType)isNaN(t)&&DirectiveCellFactoryBase._templateTypes.push(t)}var l=this;this._baseCf=e.cellFactory;e.cellFactory=this;this._evtInput=document.createEvent("HTMLEvents");this._evtInput.initEvent("input",!0,!1);this._evtBlur=document.createEvent("HTMLEvents");this._evtBlur.initEvent("blur",!1,!1);e.prepareCellForEdit.addHandler((function(e,t){l._noApplyLag=!0}));e.cellEditEnded.addHandler((function(t,i){let o=i.range,r=o.col;(r<0||r<e.columns.length&&!e._getBindingColumn(e.cells,o.row,e.columns[r])[DirectiveCellFactoryBase.getTemplContextProp(GridCellTemplateType.CellEdit)])&&(l._editChar=null);setTimeout((function(){l._noApplyLag=!1}),300)}));e.beginningEdit.addHandler((function(e,t){l._startingEditing=!0}));e.hostElement.addEventListener("keydown",(function(e){l._startingEditing=!1}),!0);e.hostElement.addEventListener("keypress",(function(t){var i=t.charCode>32?String.fromCharCode(t.charCode):null;if(i&&wjcCore.closest(t.target,".wj-flexgrid")===e.hostElement)if(!e.activeEditor||l._startingEditing){l._editChar=i;setTimeout(()=>{e.activeEditor||(l._editChar=null)},0)}else l._editChar&&(l._editChar+=i)}),!0);e.hostElement.addEventListener("compositionstart",(function(e){l._composing=!0}),!0);e.hostElement.addEventListener("compositionend",(function(e){l._composing=!1}),!0)}updateCell(e,t,l,i,o){this._cellStampCounter=(this._cellStampCounter+1)%1e7;let r=i[DirectiveCellFactoryBase._cellStampProp]=this._cellStampCounter;i.style.overflow&&(i.style.overflow="");let n=t,a=l;if(o&&!o.isSingleCell){t=o.row;l=o.col}let s,d=this,c=e.grid,p=c.editRange,u=e.rows[t],m=u.dataItem,C=!1,h=!1,g=!1,f=!1;switch(e.cellType){case wjcGrid.CellType.Cell:if(p&&p.row===t&&p.col===l){s=GridCellTemplateType.CellEdit;h=g=!0}else if(u instanceof wjcGrid.GroupRow){var _=!((f=m instanceof wjcCore.CollectionViewGroup)||u.hasChildren);if(l==e.columns.firstVisibleIndex)s=_?GridCellTemplateType.Cell:GridCellTemplateType.GroupHeader;else{s=_?GridCellTemplateType.Cell:GridCellTemplateType.Group;h=!0}}else u instanceof wjcGrid._NewRowTemplate?s=GridCellTemplateType.NewCellTemplate:softGridDetail()&&softGridDetail().DetailRow&&u instanceof softGridDetail().DetailRow||(s=GridCellTemplateType.Cell);break;case wjcGrid.CellType.ColumnHeader:s=GridCellTemplateType.ColumnHeader;break;case wjcGrid.CellType.RowHeader:s=c.collectionView&&c.collectionView.currentEditItem===m?GridCellTemplateType.RowHeaderEdit:GridCellTemplateType.RowHeader;C=!0;break;case wjcGrid.CellType.TopLeft:s=GridCellTemplateType.TopLeft;C=!0;break;case wjcGrid.CellType.ColumnFooter:s=GridCellTemplateType.ColumnFooter;h=!0;break;case wjcGrid.CellType.BottomLeft:s=GridCellTemplateType.BottomLeft;C=!0}const w=!!f&&u.isSummary,y=f&&(c.groupSummary===wjcGrid.GroupSummary.Bottom||c.groupSummary===wjcGrid.GroupSummary.BottomCollapsedHidden&&!u.isCollapsed);var E=!1;if(null!=s){let p=null;f&&s==GridCellTemplateType.GroupHeader?p=c.getColumn(m.groupDescription.propertyName):l>=0&&l<e.columns.length&&(p=e.cellType===wjcGrid.CellType.ColumnHeader&&c._hasColumnGroups()?c._getColumnGroup(t,l):c._getBindingColumn(e,t,e.columns[l]));if(p){var T=DirectiveCellFactoryBase.getTemplContextProp,v=T(s),G=(C?c:p)[v];if(!G)if(s===GridCellTemplateType.RowHeaderEdit){v=T(s=GridCellTemplateType.RowHeader);G=c[v]}else if((s===GridCellTemplateType.Group||s===GridCellTemplateType.GroupHeader)&&!f){v=T(s=GridCellTemplateType.Cell);G=p[v]}if(G){var j,F;if(h){j=e.getCellData(t,l,!1);F=e.getCellData(t,l,!0)}{E=!0;let t=i.getAttribute(wjcGrid.FlexGrid._WJS_MEASURE),s=t&&"true"===t.toLowerCase();if(g){this.clearCell(i);this._baseCf.updateCell(e,n,a,i,o,!0)}let m,C=g&&c.imeEnabled,h=C&&this._composing,_=i[v],T={cell:i,column:p,row:u,panel:e,rng:o,isEdit:g,isImeInput:C,isTrueImeInput:h,templateContext:G,templateCache:_,templateContextProperty:v,cellStamp:r,cellValue:j,cellValueFormatted:F},I=this.shouldInstantiate(T),D=!0;f&&!w&&l!=e.columns.firstVisibleIndex&&y&&(D=!1);if(I){if(g){var H=i.firstElementChild;if(H){C||i.focus();H.style.display="none"}}else this.clearCell(i);this._doDisposeCell(i);if(D){this.renderTemplate(T,!0);T.templateCache=_=i[v]}else this._doDisposeCell(i);m=T.cellBindingsData}else{D?this.renderTemplate(T,!1):this._doDisposeCell(i);m=T.cellBindingsData}G.cellOverflow&&(i.style.overflow=G.cellOverflow);s?this.applyImmediately(T):G.autoSizeRows&&!C?this.checkHeight(T):g&&setTimeout(()=>{C?this._initImeEditInput(T.cell,G):this._initEditInput(T.cell,G,null)},0);if(g){d._cellEditorVars=m.localVars;var editEndingEH=function(e,t){c.cellEditEnding.removeHandler(editEndingEH);if(!t.stayInEditMode){let e=wjcCore.getActiveElement();e&&e.dispatchEvent(d._evtBlur);wjcCore.contains(i,wjcCore.getActiveElement())&&i.focus()}d._triggerEditorEvents(i);if(!t.cancel&&!t.stayInEditMode){let e=m.localVars,t=Object.getOwnPropertyNames(m.bindings);for(let l of t)m.bindings[l].setValue(e,m.localVars.values[l])}var l=i.querySelectorAll(".wj-dropdown");[].forEach.call(l,(function(e){var t=wjcCore.Control.getControl(e);t&&softInput()&&t instanceof softInput().DropDown&&(t.isDroppedDown=!1)}))};let editEndedEH=function(e,t){c.cellEditEnded.removeHandler(editEndedEH);d._cellEditorVars=null};c.cellEditEnding.addHandler(editEndingEH);c.cellEditEnded.addHandler(editEndedEH)}else this._baseCf.updateCell(e,n,a,i,o,!1)}}}}if(!E){this._doDisposeCell(i);this._baseCf.updateCell(e,n,a,i,o)}}getEditorValue(e){if(this._cellEditorVars){let t=e.editRange;t&&t.isValid&&this._triggerEditorEvents(e.cells.getCellElement(t.row,t.col));return this._cellEditorVars.value}return super.getEditorValue(e)}disposeCell(e){this._doDisposeCell(e)}disposeTemplate(e,t,l){if(t){t.rootElement=null;t.column=null;e[t.templateContextProperty]=null;t.templateContextProperty=null}}setBindingsData(e,t,l,i,o,r){e.row=t;e.col=l;e.item=i;let n={},a=e.cell||{},s={},d={localVars:a,bindings:s};a.row=t;a.col=l;a.item=i;a.value=o;a.valueFormatted=e.cellValueFormatted;a.values=n;if(r){let e=Object.getOwnPropertyNames(r);for(let t of e){let e=new wjcCore.Binding(r[t]);s[t]=e;n[t]=e.getValue(a)}}e.cell!==a&&(e.cell=a);return d}checkHeight(e){this._isCheckingHeight||setTimeout(()=>{let t=e.cell;if(e.cellStamp===t[DirectiveCellFactoryBase._cellStampProp]){var l=t.scrollHeight,i=e.panel.rows,o=e.row.index,r=e.rng,n=r&&r.rowSpan||1,a=e.isEdit;null!=i.maxSize&&(l=Math.min(l,i.maxSize));if(o<i.length&&i[o].renderHeight*n<l-1){const t=l/n;if(a){let l=this._isFullEdit(),i=this.grid;this._backupHeight=e.row.height;e.row.height=t;this._cacheRow=e.row;this._isCheckingHeight=!0;i.refresh();i.startEditing(l);this._isCheckingHeight=!1}}a&&(e.isImeInput?this._initImeEditInput(e.cell,e.templateContext):this._initEditInput(e.cell,e.templateContext,null))}},0)}_restoreRowHeight(){if(!this._isCheckingHeight&&this._cacheRow){this._cacheRow.height=this._backupHeight;this._backupHeight=-1;this._cacheRow=null}}doDisposeCell(e){for(var t=DirectiveCellFactoryBase._templateTypes,l=0;l<t.length;l++){var i=DirectiveCellFactoryBase.getTemplContextProp(GridCellTemplateType[t[l]]),o=e[i];if(o){let r=(o.column||this.grid)[i];this.disposeTemplate(e,o,r);t[l]==GridCellTemplateType[GridCellTemplateType.CellEdit]&&this._restoreRowHeight()}}}static getTemplContextProp(e){return"$__cellTempl"+GridCellTemplateType[e]}_doDisposeCell(e){this.doDisposeCell(e)}_initEditInput(e,t,l){this.setEditorFocusFlag(!0);let i=!1!==this.getEditorFocusFlag();this.setEditorFocusFlag(null);this._setFullEdit(t);i&&setTimeout(()=>{let t=this._findInitialInput(e);if(t){var inpFocusEh=()=>{t.removeEventListener("focus",inpFocusEh);setTimeout(()=>{setTimeout(()=>{let e=null!=l?l:this._editChar;if(e){t.value=e;this._editChar=null;DirectiveCellFactoryBase._setSelectionRange(t,e.length,e.length);t.dispatchEvent(this._evtInput)}},0)},DirectiveCellFactoryBase._FOCUS_INTERVAL)};t.addEventListener("focus",inpFocusEh);t.focus()}},100)}_initImeEditInput(e,t){let l=wjcCore.getActiveElement();if(l&&(l instanceof HTMLInputElement||l instanceof HTMLTextAreaElement)&&wjcCore.hasClass(l,"wj-grid-ime")){let i=this._findInitialInput(e),o=i&&i.style.color,r=this._composing,compEndEh=()=>{l.removeEventListener("compositionend",compEndEh);wjcCore.setCss(l,wjcGrid._ImeHandler._cssHidden);this.setEditorFocusFlag(!0);i&&(i.style.color=o);this._initEditInput(e,t,r?l.value:null)};if(r){l.addEventListener("compositionend",compEndEh);if(i){let e=i.getBoundingClientRect(),t=l.getBoundingClientRect(),o=window.getComputedStyle(l),r=parseFloat(o.left),n=parseFloat(o.top);wjcCore.setCss(l,{left:r+e.left-t.left+"px",top:n+e.top-t.top+"px",width:e.width+"px",height:e.height+"px"});i.style.color="transparent"}}else setTimeout(()=>compEndEh(),DirectiveCellFactoryBase._FOCUS_INTERVAL)}}_findInitialInput(e){let t=e&&e.rootElement&&e.rootElement.querySelectorAll("input,textarea")||e&&e.querySelectorAll("input,textarea");if(t)for(var l=0;l<t.length;l++){var i=t[l],o=window.getComputedStyle(i);if("none"!==o.display&&"visible"===o.visibility)return i}return null}static _setSelectionRange(e,t,l=t){if(wjcCore.contains(document.body,e)&&!e.disabled&&"none"!=e.style.display)try{e.setSelectionRange(wjcCore.asNumber(t),wjcCore.asNumber(l),wjcCore.isIE()?null:"backward");e.focus()}catch(e){}}_triggerEditorEvents(e){if(e){let t=e.querySelectorAll(".wj-control");for(let e=0;e<t.length;e++){let l=t[e],i=wjcCore.Control.getControl(l);i&&this.flushPendingEvents(i)}}}_isFullEdit(){let e=this.grid;return!e.activeEditor||e._edtHdl._fullEdit}_setFullEdit(e){let t=this.grid;e.forceFullEdit&&t.activeEditor&&(t._edtHdl._fullEdit=!0)}}DirectiveCellFactoryBase._cellStampProp="__wjCellStamp";DirectiveCellFactoryBase._FOCUS_INTERVAL=wjcCore.Control._FOCUS_INTERVAL+20;__gridCFRef||(window.wijmo.grid=null);export var GridCellTemplateType;!function(e){e[e.Cell=0]="Cell";e[e.CellEdit=1]="CellEdit";e[e.ColumnHeader=2]="ColumnHeader";e[e.RowHeader=3]="RowHeader";e[e.RowHeaderEdit=4]="RowHeaderEdit";e[e.TopLeft=5]="TopLeft";e[e.GroupHeader=6]="GroupHeader";e[e.Group=7]="Group";e[e.NewCellTemplate=8]="NewCellTemplate";e[e.ColumnFooter=9]="ColumnFooter";e[e.BottomLeft=10]="BottomLeft"}(GridCellTemplateType||(GridCellTemplateType={}));_registerModule("wijmo.interop.grid",selfModule);
import{_getModule,_registerModule}from"@grapecity/wijmo";import*as wjcCore from"@grapecity/wijmo";import*as wjcGrid from"@grapecity/wijmo.grid";import*as selfModule from"@grapecity/wijmo.interop.grid";export function softInput(){return _getModule("wijmo.input")}export function softGridDetail(){return _getModule("wijmo.grid.detail")}var __gridCFRef=wjcGrid&&wjcGrid.CellFactory;if(!__gridCFRef){window.wijmo.grid={};window.wijmo.grid.CellFactory=function(){}}export class DirectiveCellFactoryBase extends wjcGrid.CellFactory{constructor(e){super();this._lastApplyTimeStamp=0;this._noApplyLag=!1;this._startingEditing=!1;this._cellStampCounter=0;this._composing=!1;this._isCheckingHeight=!1;this._backupHeight=-1;this._cacheRow=null;this.grid=e;if(!DirectiveCellFactoryBase._templateTypes){DirectiveCellFactoryBase._templateTypes=[];for(var t in GridCellTemplateType)isNaN(t)&&DirectiveCellFactoryBase._templateTypes.push(t)}var l=this;this._baseCf=e.cellFactory;e.cellFactory=this;this._evtInput=document.createEvent("HTMLEvents");this._evtInput.initEvent("input",!0,!1);this._evtBlur=document.createEvent("HTMLEvents");this._evtBlur.initEvent("blur",!1,!1);e.prepareCellForEdit.addHandler((function(e,t){l._noApplyLag=!0}));e.cellEditEnded.addHandler((function(t,i){let o=i.range,r=o.col;(r<0||r<e.columns.length&&!e._getBindingColumn(e.cells,o.row,e.columns[r])[DirectiveCellFactoryBase.getTemplContextProp(GridCellTemplateType.CellEdit)])&&(l._editChar=null);setTimeout((function(){l._noApplyLag=!1}),300)}));e.beginningEdit.addHandler((function(e,t){l._startingEditing=!0}));e.hostElement.addEventListener("keydown",(function(e){l._startingEditing=!1}),!0);e.hostElement.addEventListener("keypress",(function(t){var i=t.charCode>32?String.fromCharCode(t.charCode):null;if(i&&wjcCore.closest(t.target,".wj-flexgrid")===e.hostElement)if(!e.activeEditor||l._startingEditing){l._editChar=i;setTimeout(()=>{e.activeEditor||(l._editChar=null)},0)}else l._editChar&&(l._editChar+=i)}),!0);e.hostElement.addEventListener("compositionstart",(function(e){l._composing=!0}),!0);e.hostElement.addEventListener("compositionend",(function(e){l._composing=!1}),!0)}updateCell(e,t,l,i,o){this._cellStampCounter=(this._cellStampCounter+1)%1e7;let r=i[DirectiveCellFactoryBase._cellStampProp]=this._cellStampCounter;i.style.overflow&&(i.style.overflow="");let n=t,a=l;if(o&&!o.isSingleCell){t=o.row;l=o.col}let s,d=this,c=e.grid,p=c.editRange,u=e.rows[t],m=u.dataItem,C=!1,h=!1,g=!1,f=!1;switch(e.cellType){case wjcGrid.CellType.Cell:if(p&&p.row===t&&p.col===l){s=GridCellTemplateType.CellEdit;h=g=!0}else if(u instanceof wjcGrid.GroupRow){var _=!((f=m instanceof wjcCore.CollectionViewGroup)||u.hasChildren);if(l==e.columns.firstVisibleIndex)s=_?GridCellTemplateType.Cell:GridCellTemplateType.GroupHeader;else{s=_?GridCellTemplateType.Cell:GridCellTemplateType.Group;h=!0}}else u instanceof wjcGrid._NewRowTemplate?s=GridCellTemplateType.NewCellTemplate:softGridDetail()&&softGridDetail().DetailRow&&u instanceof softGridDetail().DetailRow||(s=GridCellTemplateType.Cell);break;case wjcGrid.CellType.ColumnHeader:s=GridCellTemplateType.ColumnHeader;break;case wjcGrid.CellType.RowHeader:s=c.collectionView&&c.collectionView.currentEditItem===m?GridCellTemplateType.RowHeaderEdit:GridCellTemplateType.RowHeader;C=!0;break;case wjcGrid.CellType.TopLeft:s=GridCellTemplateType.TopLeft;C=!0;break;case wjcGrid.CellType.ColumnFooter:s=GridCellTemplateType.ColumnFooter;h=!0;break;case wjcGrid.CellType.BottomLeft:s=GridCellTemplateType.BottomLeft;C=!0}const w=!!f&&u.isSummary,y=f&&(c.groupSummaryPosition===wjcGrid.GroupSummaryPosition.Bottom||c.groupSummaryPosition===wjcGrid.GroupSummaryPosition.Auto&&!u.isCollapsed);var E=!1;if(null!=s){let p=null;f&&s==GridCellTemplateType.GroupHeader?p=c.getColumn(m.groupDescription.propertyName):l>=0&&l<e.columns.length&&(p=e.cellType===wjcGrid.CellType.ColumnHeader&&c._hasColumnGroups()?c._getColumnGroup(t,l):c._getBindingColumn(e,t,e.columns[l]));if(p){var T=DirectiveCellFactoryBase.getTemplContextProp,v=T(s),G=(C?c:p)[v];if(!G)if(s===GridCellTemplateType.RowHeaderEdit){v=T(s=GridCellTemplateType.RowHeader);G=c[v]}else if((s===GridCellTemplateType.Group||s===GridCellTemplateType.GroupHeader)&&!f){v=T(s=GridCellTemplateType.Cell);G=p[v]}if(G){var j,F;if(h){j=e.getCellData(t,l,!1);F=e.getCellData(t,l,!0)}{E=!0;let t=i.getAttribute(wjcGrid.FlexGrid._WJS_MEASURE),s=t&&"true"===t.toLowerCase();if(g){this.clearCell(i);this._baseCf.updateCell(e,n,a,i,o,!0)}let m,C=g&&c.imeEnabled,h=C&&this._composing,_=i[v],T={cell:i,column:p,row:u,panel:e,rng:o,isEdit:g,isImeInput:C,isTrueImeInput:h,templateContext:G,templateCache:_,templateContextProperty:v,cellStamp:r,cellValue:j,cellValueFormatted:F},I=this.shouldInstantiate(T),D=!0;f&&!w&&l!=e.columns.firstVisibleIndex&&y&&(D=!1);if(I){if(g){var H=i.firstElementChild;if(H){C||i.focus();H.style.display="none"}}else this.clearCell(i);this._doDisposeCell(i);if(D){this.renderTemplate(T,!0);T.templateCache=_=i[v]}else this._doDisposeCell(i);m=T.cellBindingsData}else{D?this.renderTemplate(T,!1):this._doDisposeCell(i);m=T.cellBindingsData}G.cellOverflow&&(i.style.overflow=G.cellOverflow);s?this.applyImmediately(T):G.autoSizeRows&&!C?this.checkHeight(T):g&&setTimeout(()=>{C?this._initImeEditInput(T.cell,G):this._initEditInput(T.cell,G,null)},0);if(g){d._cellEditorVars=m.localVars;var editEndingEH=function(e,t){c.cellEditEnding.removeHandler(editEndingEH);if(!t.stayInEditMode){let e=wjcCore.getActiveElement();e&&e.dispatchEvent(d._evtBlur);wjcCore.contains(i,wjcCore.getActiveElement())&&i.focus()}d._triggerEditorEvents(i);if(!t.cancel&&!t.stayInEditMode){let e=m.localVars,t=Object.getOwnPropertyNames(m.bindings);for(let l of t)m.bindings[l].setValue(e,m.localVars.values[l])}var l=i.querySelectorAll(".wj-dropdown");[].forEach.call(l,(function(e){var t=wjcCore.Control.getControl(e);t&&softInput()&&t instanceof softInput().DropDown&&(t.isDroppedDown=!1)}))};let editEndedEH=function(e,t){c.cellEditEnded.removeHandler(editEndedEH);d._cellEditorVars=null};c.cellEditEnding.addHandler(editEndingEH);c.cellEditEnded.addHandler(editEndedEH)}else this._baseCf.updateCell(e,n,a,i,o,!1)}}}}if(!E){this._doDisposeCell(i);this._baseCf.updateCell(e,n,a,i,o)}}getEditorValue(e){if(this._cellEditorVars){let t=e.editRange;t&&t.isValid&&this._triggerEditorEvents(e.cells.getCellElement(t.row,t.col));return this._cellEditorVars.value}return super.getEditorValue(e)}disposeCell(e){this._doDisposeCell(e)}disposeTemplate(e,t,l){if(t){t.rootElement=null;t.column=null;e[t.templateContextProperty]=null;t.templateContextProperty=null}}setBindingsData(e,t,l,i,o,r){e.row=t;e.col=l;e.item=i;let n={},a=e.cell||{},s={},d={localVars:a,bindings:s};a.row=t;a.col=l;a.item=i;a.value=o;a.valueFormatted=e.cellValueFormatted;a.values=n;if(r){let e=Object.getOwnPropertyNames(r);for(let t of e){let e=new wjcCore.Binding(r[t]);s[t]=e;n[t]=e.getValue(a)}}e.cell!==a&&(e.cell=a);return d}checkHeight(e){this._isCheckingHeight||setTimeout(()=>{let t=e.cell;if(e.cellStamp===t[DirectiveCellFactoryBase._cellStampProp]){var l=t.scrollHeight,i=e.panel.rows,o=e.row.index,r=e.rng,n=r&&r.rowSpan||1,a=e.isEdit;null!=i.maxSize&&(l=Math.min(l,i.maxSize));if(o<i.length&&i[o].renderHeight*n<l-1){const t=l/n;if(a){let l=this._isFullEdit(),i=this.grid;this._backupHeight=e.row.height;e.row.height=t;this._cacheRow=e.row;this._isCheckingHeight=!0;i.refresh();i.startEditing(l);this._isCheckingHeight=!1}}a&&(e.isImeInput?this._initImeEditInput(e.cell,e.templateContext):this._initEditInput(e.cell,e.templateContext,null))}},0)}_restoreRowHeight(){if(!this._isCheckingHeight&&this._cacheRow){this._cacheRow.height=this._backupHeight;this._backupHeight=-1;this._cacheRow=null}}doDisposeCell(e){for(var t=DirectiveCellFactoryBase._templateTypes,l=0;l<t.length;l++){var i=DirectiveCellFactoryBase.getTemplContextProp(GridCellTemplateType[t[l]]),o=e[i];if(o){let r=(o.column||this.grid)[i];this.disposeTemplate(e,o,r);t[l]==GridCellTemplateType[GridCellTemplateType.CellEdit]&&this._restoreRowHeight()}}}static getTemplContextProp(e){return"$__cellTempl"+GridCellTemplateType[e]}_doDisposeCell(e){this.doDisposeCell(e)}_initEditInput(e,t,l){this.setEditorFocusFlag(!0);let i=!1!==this.getEditorFocusFlag();this.setEditorFocusFlag(null);this._setFullEdit(t);i&&setTimeout(()=>{let t=this._findInitialInput(e);if(t){var inpFocusEh=()=>{t.removeEventListener("focus",inpFocusEh);setTimeout(()=>{setTimeout(()=>{let e=null!=l?l:this._editChar;if(e){t.value=e;this._editChar=null;DirectiveCellFactoryBase._setSelectionRange(t,e.length,e.length);t.dispatchEvent(this._evtInput)}},0)},DirectiveCellFactoryBase._FOCUS_INTERVAL)};t.addEventListener("focus",inpFocusEh);t.focus()}},100)}_initImeEditInput(e,t){let l=wjcCore.getActiveElement();if(l&&(l instanceof HTMLInputElement||l instanceof HTMLTextAreaElement)&&wjcCore.hasClass(l,"wj-grid-ime")){let i=this._findInitialInput(e),o=i&&i.style.color,r=this._composing,compEndEh=()=>{l.removeEventListener("compositionend",compEndEh);wjcCore.setCss(l,wjcGrid._ImeHandler._cssHidden);this.setEditorFocusFlag(!0);i&&(i.style.color=o);this._initEditInput(e,t,r?l.value:null)};if(r){l.addEventListener("compositionend",compEndEh);if(i){let e=i.getBoundingClientRect(),t=l.getBoundingClientRect(),o=window.getComputedStyle(l),r=parseFloat(o.left),n=parseFloat(o.top);wjcCore.setCss(l,{left:r+e.left-t.left+"px",top:n+e.top-t.top+"px",width:e.width+"px",height:e.height+"px"});i.style.color="transparent"}}else setTimeout(()=>compEndEh(),DirectiveCellFactoryBase._FOCUS_INTERVAL)}}_findInitialInput(e){let t=e&&e.rootElement&&e.rootElement.querySelectorAll("input,textarea")||e&&e.querySelectorAll("input,textarea");if(t)for(var l=0;l<t.length;l++){var i=t[l],o=window.getComputedStyle(i);if("none"!==o.display&&"visible"===o.visibility)return i}return null}static _setSelectionRange(e,t,l=t){if(wjcCore.contains(document.body,e)&&!e.disabled&&"none"!=e.style.display)try{e.setSelectionRange(wjcCore.asNumber(t),wjcCore.asNumber(l),wjcCore.isIE()?null:"backward");e.focus()}catch(e){}}_triggerEditorEvents(e){if(e){let t=e.querySelectorAll(".wj-control");for(let e=0;e<t.length;e++){let l=t[e],i=wjcCore.Control.getControl(l);i&&this.flushPendingEvents(i)}}}_isFullEdit(){let e=this.grid;return!e.activeEditor||e._edtHdl._fullEdit}_setFullEdit(e){let t=this.grid;e.forceFullEdit&&t.activeEditor&&(t._edtHdl._fullEdit=!0)}}DirectiveCellFactoryBase._cellStampProp="__wjCellStamp";DirectiveCellFactoryBase._FOCUS_INTERVAL=wjcCore.Control._FOCUS_INTERVAL+20;__gridCFRef||(window.wijmo.grid=null);export var GridCellTemplateType;!function(e){e[e.Cell=0]="Cell";e[e.CellEdit=1]="CellEdit";e[e.ColumnHeader=2]="ColumnHeader";e[e.RowHeader=3]="RowHeader";e[e.RowHeaderEdit=4]="RowHeaderEdit";e[e.TopLeft=5]="TopLeft";e[e.GroupHeader=6]="GroupHeader";e[e.Group=7]="Group";e[e.NewCellTemplate=8]="NewCellTemplate";e[e.ColumnFooter=9]="ColumnFooter";e[e.BottomLeft=10]="BottomLeft"}(GridCellTemplateType||(GridCellTemplateType={}));_registerModule("wijmo.interop.grid",selfModule);
/*!
*
* Wijmo Library 5.20241.001-nightly.d20240215.t020127
* Wijmo Library 5.20241.001-nightly.d20240221.t020535
* https://developer.mescius.com/wijmo

@@ -14,2 +14,2 @@ *

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 l in t)t.hasOwnProperty(l)&&(e[l]=t[l])})(e,t)};return function(e,t){extendStatics(e,t);function __(){this.constructor=e}e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}}();import{_getModule,_registerModule}from"@grapecity/wijmo";import*as wjcCore from"@grapecity/wijmo";import*as wjcGrid from"@grapecity/wijmo.grid";import*as selfModule from"@grapecity/wijmo.interop.grid";export function softInput(){return _getModule("wijmo.input")}export function softGridDetail(){return _getModule("wijmo.grid.detail")}var __gridCFRef=wjcGrid&&wjcGrid.CellFactory;if(!__gridCFRef){window.wijmo.grid={};window.wijmo.grid.CellFactory=function(){}}var DirectiveCellFactoryBase=function(e){__extends(DirectiveCellFactoryBase,e);function DirectiveCellFactoryBase(t){var l=e.call(this)||this;l._lastApplyTimeStamp=0;l._noApplyLag=!1;l._startingEditing=!1;l._cellStampCounter=0;l._composing=!1;l._isCheckingHeight=!1;l._backupHeight=-1;l._cacheRow=null;l.grid=t;if(!DirectiveCellFactoryBase._templateTypes){DirectiveCellFactoryBase._templateTypes=[];for(var i in GridCellTemplateType)isNaN(i)&&DirectiveCellFactoryBase._templateTypes.push(i)}var r=l;l._baseCf=t.cellFactory;t.cellFactory=l;l._evtInput=document.createEvent("HTMLEvents");l._evtInput.initEvent("input",!0,!1);l._evtBlur=document.createEvent("HTMLEvents");l._evtBlur.initEvent("blur",!1,!1);t.prepareCellForEdit.addHandler((function(e,t){r._noApplyLag=!0}));t.cellEditEnded.addHandler((function(e,l){var i=l.range,o=i.col;(o<0||o<t.columns.length&&!t._getBindingColumn(t.cells,i.row,t.columns[o])[DirectiveCellFactoryBase.getTemplContextProp(GridCellTemplateType.CellEdit)])&&(r._editChar=null);setTimeout((function(){r._noApplyLag=!1}),300)}));t.beginningEdit.addHandler((function(e,t){r._startingEditing=!0}));t.hostElement.addEventListener("keydown",(function(e){r._startingEditing=!1}),!0);t.hostElement.addEventListener("keypress",(function(e){var l=e.charCode>32?String.fromCharCode(e.charCode):null;if(l&&wjcCore.closest(e.target,".wj-flexgrid")===t.hostElement)if(!t.activeEditor||r._startingEditing){r._editChar=l;setTimeout((function(){t.activeEditor||(r._editChar=null)}),0)}else r._editChar&&(r._editChar+=l)}),!0);t.hostElement.addEventListener("compositionstart",(function(e){r._composing=!0}),!0);t.hostElement.addEventListener("compositionend",(function(e){r._composing=!1}),!0);return l}DirectiveCellFactoryBase.prototype.updateCell=function(e,t,l,i,r){var o=this;this._cellStampCounter=(this._cellStampCounter+1)%1e7;var n=i[DirectiveCellFactoryBase._cellStampProp]=this._cellStampCounter;i.style.overflow&&(i.style.overflow="");var a=t,c=l;if(r&&!r.isSingleCell){t=r.row;l=r.col}var s,d=this,p=e.grid,u=p.editRange,C=e.rows[t],m=C.dataItem,f=!1,y=!1,g=!1,v=!1;switch(e.cellType){case wjcGrid.CellType.Cell:if(u&&u.row===t&&u.col===l){s=GridCellTemplateType.CellEdit;y=g=!0}else if(C instanceof wjcGrid.GroupRow){var _=!((v=m instanceof wjcCore.CollectionViewGroup)||C.hasChildren);if(l==e.columns.firstVisibleIndex)s=_?GridCellTemplateType.Cell:GridCellTemplateType.GroupHeader;else{s=_?GridCellTemplateType.Cell:GridCellTemplateType.Group;y=!0}}else C instanceof wjcGrid._NewRowTemplate?s=GridCellTemplateType.NewCellTemplate:softGridDetail()&&softGridDetail().DetailRow&&C instanceof softGridDetail().DetailRow||(s=GridCellTemplateType.Cell);break;case wjcGrid.CellType.ColumnHeader:s=GridCellTemplateType.ColumnHeader;break;case wjcGrid.CellType.RowHeader:s=p.collectionView&&p.collectionView.currentEditItem===m?GridCellTemplateType.RowHeaderEdit:GridCellTemplateType.RowHeader;f=!0;break;case wjcGrid.CellType.TopLeft:s=GridCellTemplateType.TopLeft;f=!0;break;case wjcGrid.CellType.ColumnFooter:s=GridCellTemplateType.ColumnFooter;y=!0;break;case wjcGrid.CellType.BottomLeft:s=GridCellTemplateType.BottomLeft;f=!0}var h=!!v&&C.isSummary,w=v&&(p.groupSummary===wjcGrid.GroupSummary.Bottom||p.groupSummary===wjcGrid.GroupSummary.BottomCollapsedHidden&&!C.isCollapsed),E=!1;if(null!=s){var T=null;v&&s==GridCellTemplateType.GroupHeader?T=p.getColumn(m.groupDescription.propertyName):l>=0&&l<e.columns.length&&(T=e.cellType===wjcGrid.CellType.ColumnHeader&&p._hasColumnGroups()?p._getColumnGroup(t,l):p._getBindingColumn(e,t,e.columns[l]));if(T){var F=DirectiveCellFactoryBase.getTemplContextProp,G=F(s),D=(f?p:T)[G];if(!D)if(s===GridCellTemplateType.RowHeaderEdit){G=F(s=GridCellTemplateType.RowHeader);D=p[G]}else if((s===GridCellTemplateType.Group||s===GridCellTemplateType.GroupHeader)&&!v){G=F(s=GridCellTemplateType.Cell);D=T[G]}if(D){var j,B;if(y){j=e.getCellData(t,l,!1);B=e.getCellData(t,l,!0)}E=!0;var H=i.getAttribute(wjcGrid.FlexGrid._WJS_MEASURE),I=H&&"true"===H.toLowerCase();if(g){this.clearCell(i);this._baseCf.updateCell(e,a,c,i,r,!0)}var S,R=g&&p.imeEnabled,b=R&&this._composing,x=i[G],L={cell:i,column:T,row:C,panel:e,rng:r,isEdit:g,isImeInput:R,isTrueImeInput:b,templateContext:D,templateCache:x,templateContextProperty:G,cellStamp:n,cellValue:j,cellValueFormatted:B},V=this.shouldInstantiate(L),k=!0;v&&!h&&l!=e.columns.firstVisibleIndex&&w&&(k=!1);if(V){if(g){var A=i.firstElementChild;if(A){R||i.focus();A.style.display="none"}}else this.clearCell(i);this._doDisposeCell(i);if(k){this.renderTemplate(L,!0);L.templateCache=x=i[G]}else this._doDisposeCell(i);S=L.cellBindingsData}else{k?this.renderTemplate(L,!1):this._doDisposeCell(i);S=L.cellBindingsData}D.cellOverflow&&(i.style.overflow=D.cellOverflow);I?this.applyImmediately(L):D.autoSizeRows&&!R?this.checkHeight(L):g&&setTimeout((function(){R?o._initImeEditInput(L.cell,D):o._initEditInput(L.cell,D,null)}),0);if(g){d._cellEditorVars=S.localVars;var editEndingEH=function(e,t){p.cellEditEnding.removeHandler(editEndingEH);if(!t.stayInEditMode){var l=wjcCore.getActiveElement();l&&l.dispatchEvent(d._evtBlur);wjcCore.contains(i,wjcCore.getActiveElement())&&i.focus()}d._triggerEditorEvents(i);if(!t.cancel&&!t.stayInEditMode)for(var r=S.localVars,o=0,n=Object.getOwnPropertyNames(S.bindings);o<n.length;o++){var a=n[o];S.bindings[a].setValue(r,S.localVars.values[a])}var c=i.querySelectorAll(".wj-dropdown");[].forEach.call(c,(function(e){var t=wjcCore.Control.getControl(e);t&&softInput()&&t instanceof softInput().DropDown&&(t.isDroppedDown=!1)}))},editEndedEH_1=function(e,t){p.cellEditEnded.removeHandler(editEndedEH_1);d._cellEditorVars=null};p.cellEditEnding.addHandler(editEndingEH);p.cellEditEnded.addHandler(editEndedEH_1)}else this._baseCf.updateCell(e,a,c,i,r,!1)}}}if(!E){this._doDisposeCell(i);this._baseCf.updateCell(e,a,c,i,r)}};DirectiveCellFactoryBase.prototype.getEditorValue=function(t){if(this._cellEditorVars){var l=t.editRange;l&&l.isValid&&this._triggerEditorEvents(t.cells.getCellElement(l.row,l.col));return this._cellEditorVars.value}return e.prototype.getEditorValue.call(this,t)};DirectiveCellFactoryBase.prototype.disposeCell=function(e){this._doDisposeCell(e)};DirectiveCellFactoryBase.prototype.disposeTemplate=function(e,t,l){if(t){t.rootElement=null;t.column=null;e[t.templateContextProperty]=null;t.templateContextProperty=null}};DirectiveCellFactoryBase.prototype.setBindingsData=function(e,t,l,i,r,o){e.row=t;e.col=l;e.item=i;var n={},a=e.cell||{},c={},s={localVars:a,bindings:c};a.row=t;a.col=l;a.item=i;a.value=r;a.valueFormatted=e.cellValueFormatted;a.values=n;if(o)for(var d=0,p=Object.getOwnPropertyNames(o);d<p.length;d++){var u=p[d],C=new wjcCore.Binding(o[u]);c[u]=C;n[u]=C.getValue(a)}e.cell!==a&&(e.cell=a);return s};DirectiveCellFactoryBase.prototype.checkHeight=function(e){var t=this;this._isCheckingHeight||setTimeout((function(){var l=e.cell;if(e.cellStamp===l[DirectiveCellFactoryBase._cellStampProp]){var i=l.scrollHeight,r=e.panel.rows,o=e.row.index,n=e.rng,a=n&&n.rowSpan||1,c=e.isEdit;null!=r.maxSize&&(i=Math.min(i,r.maxSize));if(o<r.length&&r[o].renderHeight*a<i-1){var s=i/a;if(c){var d=t._isFullEdit(),p=t.grid;t._backupHeight=e.row.height;e.row.height=s;t._cacheRow=e.row;t._isCheckingHeight=!0;p.refresh();p.startEditing(d);t._isCheckingHeight=!1}}c&&(e.isImeInput?t._initImeEditInput(e.cell,e.templateContext):t._initEditInput(e.cell,e.templateContext,null))}}),0)};DirectiveCellFactoryBase.prototype._restoreRowHeight=function(){if(!this._isCheckingHeight&&this._cacheRow){this._cacheRow.height=this._backupHeight;this._backupHeight=-1;this._cacheRow=null}};DirectiveCellFactoryBase.prototype.doDisposeCell=function(e){for(var t=DirectiveCellFactoryBase._templateTypes,l=0;l<t.length;l++){var i=DirectiveCellFactoryBase.getTemplContextProp(GridCellTemplateType[t[l]]),r=e[i];if(r){var o=(r.column||this.grid)[i];this.disposeTemplate(e,r,o);t[l]==GridCellTemplateType[GridCellTemplateType.CellEdit]&&this._restoreRowHeight()}}};DirectiveCellFactoryBase.getTemplContextProp=function(e){return"$__cellTempl"+GridCellTemplateType[e]};DirectiveCellFactoryBase.prototype._doDisposeCell=function(e){this.doDisposeCell(e)};DirectiveCellFactoryBase.prototype._initEditInput=function(e,t,l){var i=this;this.setEditorFocusFlag(!0);var r=!1!==this.getEditorFocusFlag();this.setEditorFocusFlag(null);this._setFullEdit(t);r&&setTimeout((function(){var t=i._findInitialInput(e);if(t){var inpFocusEh=function(){t.removeEventListener("focus",inpFocusEh);setTimeout((function(){setTimeout((function(){var e=null!=l?l:i._editChar;if(e){t.value=e;i._editChar=null;DirectiveCellFactoryBase._setSelectionRange(t,e.length,e.length);t.dispatchEvent(i._evtInput)}}),0)}),DirectiveCellFactoryBase._FOCUS_INTERVAL)};t.addEventListener("focus",inpFocusEh);t.focus()}}),100)};DirectiveCellFactoryBase.prototype._initImeEditInput=function(e,t){var l=this,i=wjcCore.getActiveElement();if(i&&(i instanceof HTMLInputElement||i instanceof HTMLTextAreaElement)&&wjcCore.hasClass(i,"wj-grid-ime")){var r=this._findInitialInput(e),o=r&&r.style.color,n=this._composing,compEndEh_1=function(){i.removeEventListener("compositionend",compEndEh_1);wjcCore.setCss(i,wjcGrid._ImeHandler._cssHidden);l.setEditorFocusFlag(!0);r&&(r.style.color=o);l._initEditInput(e,t,n?i.value:null)};if(n){i.addEventListener("compositionend",compEndEh_1);if(r){var a=r.getBoundingClientRect(),c=i.getBoundingClientRect(),s=window.getComputedStyle(i),d=parseFloat(s.left),p=parseFloat(s.top);wjcCore.setCss(i,{left:d+a.left-c.left+"px",top:p+a.top-c.top+"px",width:a.width+"px",height:a.height+"px"});r.style.color="transparent"}}else setTimeout((function(){return compEndEh_1()}),DirectiveCellFactoryBase._FOCUS_INTERVAL)}};DirectiveCellFactoryBase.prototype._findInitialInput=function(e){var t=e&&e.rootElement&&e.rootElement.querySelectorAll("input,textarea")||e&&e.querySelectorAll("input,textarea");if(t)for(var l=0;l<t.length;l++){var i=t[l],r=window.getComputedStyle(i);if("none"!==r.display&&"visible"===r.visibility)return i}return null};DirectiveCellFactoryBase._setSelectionRange=function(e,t,l){void 0===l&&(l=t);if(wjcCore.contains(document.body,e)&&!e.disabled&&"none"!=e.style.display)try{e.setSelectionRange(wjcCore.asNumber(t),wjcCore.asNumber(l),wjcCore.isIE()?null:"backward");e.focus()}catch(e){}};DirectiveCellFactoryBase.prototype._triggerEditorEvents=function(e){if(e)for(var t=e.querySelectorAll(".wj-control"),l=0;l<t.length;l++){var i=t[l],r=wjcCore.Control.getControl(i);r&&this.flushPendingEvents(r)}};DirectiveCellFactoryBase.prototype._isFullEdit=function(){var e=this.grid;return!e.activeEditor||e._edtHdl._fullEdit};DirectiveCellFactoryBase.prototype._setFullEdit=function(e){var t=this.grid;e.forceFullEdit&&t.activeEditor&&(t._edtHdl._fullEdit=!0)};DirectiveCellFactoryBase._cellStampProp="__wjCellStamp";DirectiveCellFactoryBase._FOCUS_INTERVAL=wjcCore.Control._FOCUS_INTERVAL+20;return DirectiveCellFactoryBase}(wjcGrid.CellFactory);export{DirectiveCellFactoryBase};__gridCFRef||(window.wijmo.grid=null);export var GridCellTemplateType;!function(e){e[e.Cell=0]="Cell";e[e.CellEdit=1]="CellEdit";e[e.ColumnHeader=2]="ColumnHeader";e[e.RowHeader=3]="RowHeader";e[e.RowHeaderEdit=4]="RowHeaderEdit";e[e.TopLeft=5]="TopLeft";e[e.GroupHeader=6]="GroupHeader";e[e.Group=7]="Group";e[e.NewCellTemplate=8]="NewCellTemplate";e[e.ColumnFooter=9]="ColumnFooter";e[e.BottomLeft=10]="BottomLeft"}(GridCellTemplateType||(GridCellTemplateType={}));_registerModule("wijmo.interop.grid",selfModule);
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 l in t)t.hasOwnProperty(l)&&(e[l]=t[l])})(e,t)};return function(e,t){extendStatics(e,t);function __(){this.constructor=e}e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}}();import{_getModule,_registerModule}from"@grapecity/wijmo";import*as wjcCore from"@grapecity/wijmo";import*as wjcGrid from"@grapecity/wijmo.grid";import*as selfModule from"@grapecity/wijmo.interop.grid";export function softInput(){return _getModule("wijmo.input")}export function softGridDetail(){return _getModule("wijmo.grid.detail")}var __gridCFRef=wjcGrid&&wjcGrid.CellFactory;if(!__gridCFRef){window.wijmo.grid={};window.wijmo.grid.CellFactory=function(){}}var DirectiveCellFactoryBase=function(e){__extends(DirectiveCellFactoryBase,e);function DirectiveCellFactoryBase(t){var l=e.call(this)||this;l._lastApplyTimeStamp=0;l._noApplyLag=!1;l._startingEditing=!1;l._cellStampCounter=0;l._composing=!1;l._isCheckingHeight=!1;l._backupHeight=-1;l._cacheRow=null;l.grid=t;if(!DirectiveCellFactoryBase._templateTypes){DirectiveCellFactoryBase._templateTypes=[];for(var i in GridCellTemplateType)isNaN(i)&&DirectiveCellFactoryBase._templateTypes.push(i)}var r=l;l._baseCf=t.cellFactory;t.cellFactory=l;l._evtInput=document.createEvent("HTMLEvents");l._evtInput.initEvent("input",!0,!1);l._evtBlur=document.createEvent("HTMLEvents");l._evtBlur.initEvent("blur",!1,!1);t.prepareCellForEdit.addHandler((function(e,t){r._noApplyLag=!0}));t.cellEditEnded.addHandler((function(e,l){var i=l.range,o=i.col;(o<0||o<t.columns.length&&!t._getBindingColumn(t.cells,i.row,t.columns[o])[DirectiveCellFactoryBase.getTemplContextProp(GridCellTemplateType.CellEdit)])&&(r._editChar=null);setTimeout((function(){r._noApplyLag=!1}),300)}));t.beginningEdit.addHandler((function(e,t){r._startingEditing=!0}));t.hostElement.addEventListener("keydown",(function(e){r._startingEditing=!1}),!0);t.hostElement.addEventListener("keypress",(function(e){var l=e.charCode>32?String.fromCharCode(e.charCode):null;if(l&&wjcCore.closest(e.target,".wj-flexgrid")===t.hostElement)if(!t.activeEditor||r._startingEditing){r._editChar=l;setTimeout((function(){t.activeEditor||(r._editChar=null)}),0)}else r._editChar&&(r._editChar+=l)}),!0);t.hostElement.addEventListener("compositionstart",(function(e){r._composing=!0}),!0);t.hostElement.addEventListener("compositionend",(function(e){r._composing=!1}),!0);return l}DirectiveCellFactoryBase.prototype.updateCell=function(e,t,l,i,r){var o=this;this._cellStampCounter=(this._cellStampCounter+1)%1e7;var n=i[DirectiveCellFactoryBase._cellStampProp]=this._cellStampCounter;i.style.overflow&&(i.style.overflow="");var a=t,c=l;if(r&&!r.isSingleCell){t=r.row;l=r.col}var s,p=this,d=e.grid,u=d.editRange,C=e.rows[t],m=C.dataItem,f=!1,y=!1,g=!1,v=!1;switch(e.cellType){case wjcGrid.CellType.Cell:if(u&&u.row===t&&u.col===l){s=GridCellTemplateType.CellEdit;y=g=!0}else if(C instanceof wjcGrid.GroupRow){var _=!((v=m instanceof wjcCore.CollectionViewGroup)||C.hasChildren);if(l==e.columns.firstVisibleIndex)s=_?GridCellTemplateType.Cell:GridCellTemplateType.GroupHeader;else{s=_?GridCellTemplateType.Cell:GridCellTemplateType.Group;y=!0}}else C instanceof wjcGrid._NewRowTemplate?s=GridCellTemplateType.NewCellTemplate:softGridDetail()&&softGridDetail().DetailRow&&C instanceof softGridDetail().DetailRow||(s=GridCellTemplateType.Cell);break;case wjcGrid.CellType.ColumnHeader:s=GridCellTemplateType.ColumnHeader;break;case wjcGrid.CellType.RowHeader:s=d.collectionView&&d.collectionView.currentEditItem===m?GridCellTemplateType.RowHeaderEdit:GridCellTemplateType.RowHeader;f=!0;break;case wjcGrid.CellType.TopLeft:s=GridCellTemplateType.TopLeft;f=!0;break;case wjcGrid.CellType.ColumnFooter:s=GridCellTemplateType.ColumnFooter;y=!0;break;case wjcGrid.CellType.BottomLeft:s=GridCellTemplateType.BottomLeft;f=!0}var h=!!v&&C.isSummary,w=v&&(d.groupSummaryPosition===wjcGrid.GroupSummaryPosition.Bottom||d.groupSummaryPosition===wjcGrid.GroupSummaryPosition.Auto&&!C.isCollapsed),E=!1;if(null!=s){var T=null;v&&s==GridCellTemplateType.GroupHeader?T=d.getColumn(m.groupDescription.propertyName):l>=0&&l<e.columns.length&&(T=e.cellType===wjcGrid.CellType.ColumnHeader&&d._hasColumnGroups()?d._getColumnGroup(t,l):d._getBindingColumn(e,t,e.columns[l]));if(T){var F=DirectiveCellFactoryBase.getTemplContextProp,G=F(s),D=(f?d:T)[G];if(!D)if(s===GridCellTemplateType.RowHeaderEdit){G=F(s=GridCellTemplateType.RowHeader);D=d[G]}else if((s===GridCellTemplateType.Group||s===GridCellTemplateType.GroupHeader)&&!v){G=F(s=GridCellTemplateType.Cell);D=T[G]}if(D){var j,B;if(y){j=e.getCellData(t,l,!1);B=e.getCellData(t,l,!0)}E=!0;var H=i.getAttribute(wjcGrid.FlexGrid._WJS_MEASURE),I=H&&"true"===H.toLowerCase();if(g){this.clearCell(i);this._baseCf.updateCell(e,a,c,i,r,!0)}var S,R=g&&d.imeEnabled,b=R&&this._composing,x=i[G],L={cell:i,column:T,row:C,panel:e,rng:r,isEdit:g,isImeInput:R,isTrueImeInput:b,templateContext:D,templateCache:x,templateContextProperty:G,cellStamp:n,cellValue:j,cellValueFormatted:B},V=this.shouldInstantiate(L),A=!0;v&&!h&&l!=e.columns.firstVisibleIndex&&w&&(A=!1);if(V){if(g){var k=i.firstElementChild;if(k){R||i.focus();k.style.display="none"}}else this.clearCell(i);this._doDisposeCell(i);if(A){this.renderTemplate(L,!0);L.templateCache=x=i[G]}else this._doDisposeCell(i);S=L.cellBindingsData}else{A?this.renderTemplate(L,!1):this._doDisposeCell(i);S=L.cellBindingsData}D.cellOverflow&&(i.style.overflow=D.cellOverflow);I?this.applyImmediately(L):D.autoSizeRows&&!R?this.checkHeight(L):g&&setTimeout((function(){R?o._initImeEditInput(L.cell,D):o._initEditInput(L.cell,D,null)}),0);if(g){p._cellEditorVars=S.localVars;var editEndingEH=function(e,t){d.cellEditEnding.removeHandler(editEndingEH);if(!t.stayInEditMode){var l=wjcCore.getActiveElement();l&&l.dispatchEvent(p._evtBlur);wjcCore.contains(i,wjcCore.getActiveElement())&&i.focus()}p._triggerEditorEvents(i);if(!t.cancel&&!t.stayInEditMode)for(var r=S.localVars,o=0,n=Object.getOwnPropertyNames(S.bindings);o<n.length;o++){var a=n[o];S.bindings[a].setValue(r,S.localVars.values[a])}var c=i.querySelectorAll(".wj-dropdown");[].forEach.call(c,(function(e){var t=wjcCore.Control.getControl(e);t&&softInput()&&t instanceof softInput().DropDown&&(t.isDroppedDown=!1)}))},editEndedEH_1=function(e,t){d.cellEditEnded.removeHandler(editEndedEH_1);p._cellEditorVars=null};d.cellEditEnding.addHandler(editEndingEH);d.cellEditEnded.addHandler(editEndedEH_1)}else this._baseCf.updateCell(e,a,c,i,r,!1)}}}if(!E){this._doDisposeCell(i);this._baseCf.updateCell(e,a,c,i,r)}};DirectiveCellFactoryBase.prototype.getEditorValue=function(t){if(this._cellEditorVars){var l=t.editRange;l&&l.isValid&&this._triggerEditorEvents(t.cells.getCellElement(l.row,l.col));return this._cellEditorVars.value}return e.prototype.getEditorValue.call(this,t)};DirectiveCellFactoryBase.prototype.disposeCell=function(e){this._doDisposeCell(e)};DirectiveCellFactoryBase.prototype.disposeTemplate=function(e,t,l){if(t){t.rootElement=null;t.column=null;e[t.templateContextProperty]=null;t.templateContextProperty=null}};DirectiveCellFactoryBase.prototype.setBindingsData=function(e,t,l,i,r,o){e.row=t;e.col=l;e.item=i;var n={},a=e.cell||{},c={},s={localVars:a,bindings:c};a.row=t;a.col=l;a.item=i;a.value=r;a.valueFormatted=e.cellValueFormatted;a.values=n;if(o)for(var p=0,d=Object.getOwnPropertyNames(o);p<d.length;p++){var u=d[p],C=new wjcCore.Binding(o[u]);c[u]=C;n[u]=C.getValue(a)}e.cell!==a&&(e.cell=a);return s};DirectiveCellFactoryBase.prototype.checkHeight=function(e){var t=this;this._isCheckingHeight||setTimeout((function(){var l=e.cell;if(e.cellStamp===l[DirectiveCellFactoryBase._cellStampProp]){var i=l.scrollHeight,r=e.panel.rows,o=e.row.index,n=e.rng,a=n&&n.rowSpan||1,c=e.isEdit;null!=r.maxSize&&(i=Math.min(i,r.maxSize));if(o<r.length&&r[o].renderHeight*a<i-1){var s=i/a;if(c){var p=t._isFullEdit(),d=t.grid;t._backupHeight=e.row.height;e.row.height=s;t._cacheRow=e.row;t._isCheckingHeight=!0;d.refresh();d.startEditing(p);t._isCheckingHeight=!1}}c&&(e.isImeInput?t._initImeEditInput(e.cell,e.templateContext):t._initEditInput(e.cell,e.templateContext,null))}}),0)};DirectiveCellFactoryBase.prototype._restoreRowHeight=function(){if(!this._isCheckingHeight&&this._cacheRow){this._cacheRow.height=this._backupHeight;this._backupHeight=-1;this._cacheRow=null}};DirectiveCellFactoryBase.prototype.doDisposeCell=function(e){for(var t=DirectiveCellFactoryBase._templateTypes,l=0;l<t.length;l++){var i=DirectiveCellFactoryBase.getTemplContextProp(GridCellTemplateType[t[l]]),r=e[i];if(r){var o=(r.column||this.grid)[i];this.disposeTemplate(e,r,o);t[l]==GridCellTemplateType[GridCellTemplateType.CellEdit]&&this._restoreRowHeight()}}};DirectiveCellFactoryBase.getTemplContextProp=function(e){return"$__cellTempl"+GridCellTemplateType[e]};DirectiveCellFactoryBase.prototype._doDisposeCell=function(e){this.doDisposeCell(e)};DirectiveCellFactoryBase.prototype._initEditInput=function(e,t,l){var i=this;this.setEditorFocusFlag(!0);var r=!1!==this.getEditorFocusFlag();this.setEditorFocusFlag(null);this._setFullEdit(t);r&&setTimeout((function(){var t=i._findInitialInput(e);if(t){var inpFocusEh=function(){t.removeEventListener("focus",inpFocusEh);setTimeout((function(){setTimeout((function(){var e=null!=l?l:i._editChar;if(e){t.value=e;i._editChar=null;DirectiveCellFactoryBase._setSelectionRange(t,e.length,e.length);t.dispatchEvent(i._evtInput)}}),0)}),DirectiveCellFactoryBase._FOCUS_INTERVAL)};t.addEventListener("focus",inpFocusEh);t.focus()}}),100)};DirectiveCellFactoryBase.prototype._initImeEditInput=function(e,t){var l=this,i=wjcCore.getActiveElement();if(i&&(i instanceof HTMLInputElement||i instanceof HTMLTextAreaElement)&&wjcCore.hasClass(i,"wj-grid-ime")){var r=this._findInitialInput(e),o=r&&r.style.color,n=this._composing,compEndEh_1=function(){i.removeEventListener("compositionend",compEndEh_1);wjcCore.setCss(i,wjcGrid._ImeHandler._cssHidden);l.setEditorFocusFlag(!0);r&&(r.style.color=o);l._initEditInput(e,t,n?i.value:null)};if(n){i.addEventListener("compositionend",compEndEh_1);if(r){var a=r.getBoundingClientRect(),c=i.getBoundingClientRect(),s=window.getComputedStyle(i),p=parseFloat(s.left),d=parseFloat(s.top);wjcCore.setCss(i,{left:p+a.left-c.left+"px",top:d+a.top-c.top+"px",width:a.width+"px",height:a.height+"px"});r.style.color="transparent"}}else setTimeout((function(){return compEndEh_1()}),DirectiveCellFactoryBase._FOCUS_INTERVAL)}};DirectiveCellFactoryBase.prototype._findInitialInput=function(e){var t=e&&e.rootElement&&e.rootElement.querySelectorAll("input,textarea")||e&&e.querySelectorAll("input,textarea");if(t)for(var l=0;l<t.length;l++){var i=t[l],r=window.getComputedStyle(i);if("none"!==r.display&&"visible"===r.visibility)return i}return null};DirectiveCellFactoryBase._setSelectionRange=function(e,t,l){void 0===l&&(l=t);if(wjcCore.contains(document.body,e)&&!e.disabled&&"none"!=e.style.display)try{e.setSelectionRange(wjcCore.asNumber(t),wjcCore.asNumber(l),wjcCore.isIE()?null:"backward");e.focus()}catch(e){}};DirectiveCellFactoryBase.prototype._triggerEditorEvents=function(e){if(e)for(var t=e.querySelectorAll(".wj-control"),l=0;l<t.length;l++){var i=t[l],r=wjcCore.Control.getControl(i);r&&this.flushPendingEvents(r)}};DirectiveCellFactoryBase.prototype._isFullEdit=function(){var e=this.grid;return!e.activeEditor||e._edtHdl._fullEdit};DirectiveCellFactoryBase.prototype._setFullEdit=function(e){var t=this.grid;e.forceFullEdit&&t.activeEditor&&(t._edtHdl._fullEdit=!0)};DirectiveCellFactoryBase._cellStampProp="__wjCellStamp";DirectiveCellFactoryBase._FOCUS_INTERVAL=wjcCore.Control._FOCUS_INTERVAL+20;return DirectiveCellFactoryBase}(wjcGrid.CellFactory);export{DirectiveCellFactoryBase};__gridCFRef||(window.wijmo.grid=null);export var GridCellTemplateType;!function(e){e[e.Cell=0]="Cell";e[e.CellEdit=1]="CellEdit";e[e.ColumnHeader=2]="ColumnHeader";e[e.RowHeader=3]="RowHeader";e[e.RowHeaderEdit=4]="RowHeaderEdit";e[e.TopLeft=5]="TopLeft";e[e.GroupHeader=6]="GroupHeader";e[e.Group=7]="Group";e[e.NewCellTemplate=8]="NewCellTemplate";e[e.ColumnFooter=9]="ColumnFooter";e[e.BottomLeft=10]="BottomLeft"}(GridCellTemplateType||(GridCellTemplateType={}));_registerModule("wijmo.interop.grid",selfModule);
/*!
*
* Wijmo Library 5.20241.001-nightly.d20240215.t020127
* Wijmo Library 5.20241.001-nightly.d20240221.t020535
* https://developer.mescius.com/wijmo

@@ -5,0 +5,0 @@ *

/*!
*
* Wijmo Library 5.20241.001-nightly.d20240215.t020127
* Wijmo Library 5.20241.001-nightly.d20240221.t020535
* https://developer.mescius.com/wijmo

@@ -14,2 +14,2 @@ *

"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 l in t)t.hasOwnProperty(l)&&(e[l]=t[l])})(e,t)};return function(e,t){extendStatics(e,t);function __(){this.constructor=e}e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}}(),__importStar=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var l in e)Object.hasOwnProperty.call(e,l)&&(t[l]=e[l]);t.default=e;return t};Object.defineProperty(exports,"__esModule",{value:!0});var wijmo_1=require("@grapecity/wijmo"),wjcCore=__importStar(require("@grapecity/wijmo")),wjcGrid=__importStar(require("@grapecity/wijmo.grid")),selfModule=__importStar(require("@grapecity/wijmo.interop.grid"));function softInput(){return wijmo_1._getModule("wijmo.input")}exports.softInput=softInput;function softGridDetail(){return wijmo_1._getModule("wijmo.grid.detail")}exports.softGridDetail=softGridDetail;var __gridCFRef=wjcGrid&&wjcGrid.CellFactory;if(!__gridCFRef){window.wijmo.grid={};window.wijmo.grid.CellFactory=function(){}}var GridCellTemplateType,DirectiveCellFactoryBase=function(e){__extends(DirectiveCellFactoryBase,e);function DirectiveCellFactoryBase(t){var l=e.call(this)||this;l._lastApplyTimeStamp=0;l._noApplyLag=!1;l._startingEditing=!1;l._cellStampCounter=0;l._composing=!1;l._isCheckingHeight=!1;l._backupHeight=-1;l._cacheRow=null;l.grid=t;if(!DirectiveCellFactoryBase._templateTypes){DirectiveCellFactoryBase._templateTypes=[];for(var i in GridCellTemplateType)isNaN(i)&&DirectiveCellFactoryBase._templateTypes.push(i)}var r=l;l._baseCf=t.cellFactory;t.cellFactory=l;l._evtInput=document.createEvent("HTMLEvents");l._evtInput.initEvent("input",!0,!1);l._evtBlur=document.createEvent("HTMLEvents");l._evtBlur.initEvent("blur",!1,!1);t.prepareCellForEdit.addHandler((function(e,t){r._noApplyLag=!0}));t.cellEditEnded.addHandler((function(e,l){var i=l.range,o=i.col;(o<0||o<t.columns.length&&!t._getBindingColumn(t.cells,i.row,t.columns[o])[DirectiveCellFactoryBase.getTemplContextProp(GridCellTemplateType.CellEdit)])&&(r._editChar=null);setTimeout((function(){r._noApplyLag=!1}),300)}));t.beginningEdit.addHandler((function(e,t){r._startingEditing=!0}));t.hostElement.addEventListener("keydown",(function(e){r._startingEditing=!1}),!0);t.hostElement.addEventListener("keypress",(function(e){var l=e.charCode>32?String.fromCharCode(e.charCode):null;if(l&&wjcCore.closest(e.target,".wj-flexgrid")===t.hostElement)if(!t.activeEditor||r._startingEditing){r._editChar=l;setTimeout((function(){t.activeEditor||(r._editChar=null)}),0)}else r._editChar&&(r._editChar+=l)}),!0);t.hostElement.addEventListener("compositionstart",(function(e){r._composing=!0}),!0);t.hostElement.addEventListener("compositionend",(function(e){r._composing=!1}),!0);return l}DirectiveCellFactoryBase.prototype.updateCell=function(e,t,l,i,r){var o=this;this._cellStampCounter=(this._cellStampCounter+1)%1e7;var n=i[DirectiveCellFactoryBase._cellStampProp]=this._cellStampCounter;i.style.overflow&&(i.style.overflow="");var a=t,c=l;if(r&&!r.isSingleCell){t=r.row;l=r.col}var s,p=this,d=e.grid,u=d.editRange,C=e.rows[t],m=C.dataItem,f=!1,_=!1,y=!1,v=!1;switch(e.cellType){case wjcGrid.CellType.Cell:if(u&&u.row===t&&u.col===l){s=GridCellTemplateType.CellEdit;_=y=!0}else if(C instanceof wjcGrid.GroupRow){var g=!((v=m instanceof wjcCore.CollectionViewGroup)||C.hasChildren);if(l==e.columns.firstVisibleIndex)s=g?GridCellTemplateType.Cell:GridCellTemplateType.GroupHeader;else{s=g?GridCellTemplateType.Cell:GridCellTemplateType.Group;_=!0}}else C instanceof wjcGrid._NewRowTemplate?s=GridCellTemplateType.NewCellTemplate:softGridDetail()&&softGridDetail().DetailRow&&C instanceof softGridDetail().DetailRow||(s=GridCellTemplateType.Cell);break;case wjcGrid.CellType.ColumnHeader:s=GridCellTemplateType.ColumnHeader;break;case wjcGrid.CellType.RowHeader:s=d.collectionView&&d.collectionView.currentEditItem===m?GridCellTemplateType.RowHeaderEdit:GridCellTemplateType.RowHeader;f=!0;break;case wjcGrid.CellType.TopLeft:s=GridCellTemplateType.TopLeft;f=!0;break;case wjcGrid.CellType.ColumnFooter:s=GridCellTemplateType.ColumnFooter;_=!0;break;case wjcGrid.CellType.BottomLeft:s=GridCellTemplateType.BottomLeft;f=!0}var h=!!v&&C.isSummary,w=v&&(d.groupSummary===wjcGrid.GroupSummary.Bottom||d.groupSummary===wjcGrid.GroupSummary.BottomCollapsedHidden&&!C.isCollapsed),T=!1;if(null!=s){var E=null;v&&s==GridCellTemplateType.GroupHeader?E=d.getColumn(m.groupDescription.propertyName):l>=0&&l<e.columns.length&&(E=e.cellType===wjcGrid.CellType.ColumnHeader&&d._hasColumnGroups()?d._getColumnGroup(t,l):d._getBindingColumn(e,t,e.columns[l]));if(E){var F=DirectiveCellFactoryBase.getTemplContextProp,G=F(s),D=(f?d:E)[G];if(!D)if(s===GridCellTemplateType.RowHeaderEdit){G=F(s=GridCellTemplateType.RowHeader);D=d[G]}else if((s===GridCellTemplateType.Group||s===GridCellTemplateType.GroupHeader)&&!v){G=F(s=GridCellTemplateType.Cell);D=E[G]}if(D){var j,B;if(_){j=e.getCellData(t,l,!1);B=e.getCellData(t,l,!0)}T=!0;var H=i.getAttribute(wjcGrid.FlexGrid._WJS_MEASURE),I=H&&"true"===H.toLowerCase();if(y){this.clearCell(i);this._baseCf.updateCell(e,a,c,i,r,!0)}var S,R=y&&d.imeEnabled,b=R&&this._composing,x=i[G],L={cell:i,column:E,row:C,panel:e,rng:r,isEdit:y,isImeInput:R,isTrueImeInput:b,templateContext:D,templateCache:x,templateContextProperty:G,cellStamp:n,cellValue:j,cellValueFormatted:B},V=this.shouldInstantiate(L),k=!0;v&&!h&&l!=e.columns.firstVisibleIndex&&w&&(k=!1);if(V){if(y){var A=i.firstElementChild;if(A){R||i.focus();A.style.display="none"}}else this.clearCell(i);this._doDisposeCell(i);if(k){this.renderTemplate(L,!0);L.templateCache=x=i[G]}else this._doDisposeCell(i);S=L.cellBindingsData}else{k?this.renderTemplate(L,!1):this._doDisposeCell(i);S=L.cellBindingsData}D.cellOverflow&&(i.style.overflow=D.cellOverflow);I?this.applyImmediately(L):D.autoSizeRows&&!R?this.checkHeight(L):y&&setTimeout((function(){R?o._initImeEditInput(L.cell,D):o._initEditInput(L.cell,D,null)}),0);if(y){p._cellEditorVars=S.localVars;var editEndingEH=function(e,t){d.cellEditEnding.removeHandler(editEndingEH);if(!t.stayInEditMode){var l=wjcCore.getActiveElement();l&&l.dispatchEvent(p._evtBlur);wjcCore.contains(i,wjcCore.getActiveElement())&&i.focus()}p._triggerEditorEvents(i);if(!t.cancel&&!t.stayInEditMode)for(var r=S.localVars,o=0,n=Object.getOwnPropertyNames(S.bindings);o<n.length;o++){var a=n[o];S.bindings[a].setValue(r,S.localVars.values[a])}var c=i.querySelectorAll(".wj-dropdown");[].forEach.call(c,(function(e){var t=wjcCore.Control.getControl(e);t&&softInput()&&t instanceof softInput().DropDown&&(t.isDroppedDown=!1)}))},editEndedEH_1=function(e,t){d.cellEditEnded.removeHandler(editEndedEH_1);p._cellEditorVars=null};d.cellEditEnding.addHandler(editEndingEH);d.cellEditEnded.addHandler(editEndedEH_1)}else this._baseCf.updateCell(e,a,c,i,r,!1)}}}if(!T){this._doDisposeCell(i);this._baseCf.updateCell(e,a,c,i,r)}};DirectiveCellFactoryBase.prototype.getEditorValue=function(t){if(this._cellEditorVars){var l=t.editRange;l&&l.isValid&&this._triggerEditorEvents(t.cells.getCellElement(l.row,l.col));return this._cellEditorVars.value}return e.prototype.getEditorValue.call(this,t)};DirectiveCellFactoryBase.prototype.disposeCell=function(e){this._doDisposeCell(e)};DirectiveCellFactoryBase.prototype.disposeTemplate=function(e,t,l){if(t){t.rootElement=null;t.column=null;e[t.templateContextProperty]=null;t.templateContextProperty=null}};DirectiveCellFactoryBase.prototype.setBindingsData=function(e,t,l,i,r,o){e.row=t;e.col=l;e.item=i;var n={},a=e.cell||{},c={},s={localVars:a,bindings:c};a.row=t;a.col=l;a.item=i;a.value=r;a.valueFormatted=e.cellValueFormatted;a.values=n;if(o)for(var p=0,d=Object.getOwnPropertyNames(o);p<d.length;p++){var u=d[p],C=new wjcCore.Binding(o[u]);c[u]=C;n[u]=C.getValue(a)}e.cell!==a&&(e.cell=a);return s};DirectiveCellFactoryBase.prototype.checkHeight=function(e){var t=this;this._isCheckingHeight||setTimeout((function(){var l=e.cell;if(e.cellStamp===l[DirectiveCellFactoryBase._cellStampProp]){var i=l.scrollHeight,r=e.panel.rows,o=e.row.index,n=e.rng,a=n&&n.rowSpan||1,c=e.isEdit;null!=r.maxSize&&(i=Math.min(i,r.maxSize));if(o<r.length&&r[o].renderHeight*a<i-1){var s=i/a;if(c){var p=t._isFullEdit(),d=t.grid;t._backupHeight=e.row.height;e.row.height=s;t._cacheRow=e.row;t._isCheckingHeight=!0;d.refresh();d.startEditing(p);t._isCheckingHeight=!1}}c&&(e.isImeInput?t._initImeEditInput(e.cell,e.templateContext):t._initEditInput(e.cell,e.templateContext,null))}}),0)};DirectiveCellFactoryBase.prototype._restoreRowHeight=function(){if(!this._isCheckingHeight&&this._cacheRow){this._cacheRow.height=this._backupHeight;this._backupHeight=-1;this._cacheRow=null}};DirectiveCellFactoryBase.prototype.doDisposeCell=function(e){for(var t=DirectiveCellFactoryBase._templateTypes,l=0;l<t.length;l++){var i=DirectiveCellFactoryBase.getTemplContextProp(GridCellTemplateType[t[l]]),r=e[i];if(r){var o=(r.column||this.grid)[i];this.disposeTemplate(e,r,o);t[l]==GridCellTemplateType[GridCellTemplateType.CellEdit]&&this._restoreRowHeight()}}};DirectiveCellFactoryBase.getTemplContextProp=function(e){return"$__cellTempl"+GridCellTemplateType[e]};DirectiveCellFactoryBase.prototype._doDisposeCell=function(e){this.doDisposeCell(e)};DirectiveCellFactoryBase.prototype._initEditInput=function(e,t,l){var i=this;this.setEditorFocusFlag(!0);var r=!1!==this.getEditorFocusFlag();this.setEditorFocusFlag(null);this._setFullEdit(t);r&&setTimeout((function(){var t=i._findInitialInput(e);if(t){var inpFocusEh=function(){t.removeEventListener("focus",inpFocusEh);setTimeout((function(){setTimeout((function(){var e=null!=l?l:i._editChar;if(e){t.value=e;i._editChar=null;DirectiveCellFactoryBase._setSelectionRange(t,e.length,e.length);t.dispatchEvent(i._evtInput)}}),0)}),DirectiveCellFactoryBase._FOCUS_INTERVAL)};t.addEventListener("focus",inpFocusEh);t.focus()}}),100)};DirectiveCellFactoryBase.prototype._initImeEditInput=function(e,t){var l=this,i=wjcCore.getActiveElement();if(i&&(i instanceof HTMLInputElement||i instanceof HTMLTextAreaElement)&&wjcCore.hasClass(i,"wj-grid-ime")){var r=this._findInitialInput(e),o=r&&r.style.color,n=this._composing,compEndEh_1=function(){i.removeEventListener("compositionend",compEndEh_1);wjcCore.setCss(i,wjcGrid._ImeHandler._cssHidden);l.setEditorFocusFlag(!0);r&&(r.style.color=o);l._initEditInput(e,t,n?i.value:null)};if(n){i.addEventListener("compositionend",compEndEh_1);if(r){var a=r.getBoundingClientRect(),c=i.getBoundingClientRect(),s=window.getComputedStyle(i),p=parseFloat(s.left),d=parseFloat(s.top);wjcCore.setCss(i,{left:p+a.left-c.left+"px",top:d+a.top-c.top+"px",width:a.width+"px",height:a.height+"px"});r.style.color="transparent"}}else setTimeout((function(){return compEndEh_1()}),DirectiveCellFactoryBase._FOCUS_INTERVAL)}};DirectiveCellFactoryBase.prototype._findInitialInput=function(e){var t=e&&e.rootElement&&e.rootElement.querySelectorAll("input,textarea")||e&&e.querySelectorAll("input,textarea");if(t)for(var l=0;l<t.length;l++){var i=t[l],r=window.getComputedStyle(i);if("none"!==r.display&&"visible"===r.visibility)return i}return null};DirectiveCellFactoryBase._setSelectionRange=function(e,t,l){void 0===l&&(l=t);if(wjcCore.contains(document.body,e)&&!e.disabled&&"none"!=e.style.display)try{e.setSelectionRange(wjcCore.asNumber(t),wjcCore.asNumber(l),wjcCore.isIE()?null:"backward");e.focus()}catch(e){}};DirectiveCellFactoryBase.prototype._triggerEditorEvents=function(e){if(e)for(var t=e.querySelectorAll(".wj-control"),l=0;l<t.length;l++){var i=t[l],r=wjcCore.Control.getControl(i);r&&this.flushPendingEvents(r)}};DirectiveCellFactoryBase.prototype._isFullEdit=function(){var e=this.grid;return!e.activeEditor||e._edtHdl._fullEdit};DirectiveCellFactoryBase.prototype._setFullEdit=function(e){var t=this.grid;e.forceFullEdit&&t.activeEditor&&(t._edtHdl._fullEdit=!0)};DirectiveCellFactoryBase._cellStampProp="__wjCellStamp";DirectiveCellFactoryBase._FOCUS_INTERVAL=wjcCore.Control._FOCUS_INTERVAL+20;return DirectiveCellFactoryBase}(wjcGrid.CellFactory);exports.DirectiveCellFactoryBase=DirectiveCellFactoryBase;__gridCFRef||(window.wijmo.grid=null);!function(e){e[e.Cell=0]="Cell";e[e.CellEdit=1]="CellEdit";e[e.ColumnHeader=2]="ColumnHeader";e[e.RowHeader=3]="RowHeader";e[e.RowHeaderEdit=4]="RowHeaderEdit";e[e.TopLeft=5]="TopLeft";e[e.GroupHeader=6]="GroupHeader";e[e.Group=7]="Group";e[e.NewCellTemplate=8]="NewCellTemplate";e[e.ColumnFooter=9]="ColumnFooter";e[e.BottomLeft=10]="BottomLeft"}(GridCellTemplateType=exports.GridCellTemplateType||(exports.GridCellTemplateType={}));wijmo_1._registerModule("wijmo.interop.grid",selfModule);
"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 l in t)t.hasOwnProperty(l)&&(e[l]=t[l])})(e,t)};return function(e,t){extendStatics(e,t);function __(){this.constructor=e}e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}}(),__importStar=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var l in e)Object.hasOwnProperty.call(e,l)&&(t[l]=e[l]);t.default=e;return t};Object.defineProperty(exports,"__esModule",{value:!0});var wijmo_1=require("@grapecity/wijmo"),wjcCore=__importStar(require("@grapecity/wijmo")),wjcGrid=__importStar(require("@grapecity/wijmo.grid")),selfModule=__importStar(require("@grapecity/wijmo.interop.grid"));function softInput(){return wijmo_1._getModule("wijmo.input")}exports.softInput=softInput;function softGridDetail(){return wijmo_1._getModule("wijmo.grid.detail")}exports.softGridDetail=softGridDetail;var __gridCFRef=wjcGrid&&wjcGrid.CellFactory;if(!__gridCFRef){window.wijmo.grid={};window.wijmo.grid.CellFactory=function(){}}var GridCellTemplateType,DirectiveCellFactoryBase=function(e){__extends(DirectiveCellFactoryBase,e);function DirectiveCellFactoryBase(t){var l=e.call(this)||this;l._lastApplyTimeStamp=0;l._noApplyLag=!1;l._startingEditing=!1;l._cellStampCounter=0;l._composing=!1;l._isCheckingHeight=!1;l._backupHeight=-1;l._cacheRow=null;l.grid=t;if(!DirectiveCellFactoryBase._templateTypes){DirectiveCellFactoryBase._templateTypes=[];for(var i in GridCellTemplateType)isNaN(i)&&DirectiveCellFactoryBase._templateTypes.push(i)}var r=l;l._baseCf=t.cellFactory;t.cellFactory=l;l._evtInput=document.createEvent("HTMLEvents");l._evtInput.initEvent("input",!0,!1);l._evtBlur=document.createEvent("HTMLEvents");l._evtBlur.initEvent("blur",!1,!1);t.prepareCellForEdit.addHandler((function(e,t){r._noApplyLag=!0}));t.cellEditEnded.addHandler((function(e,l){var i=l.range,o=i.col;(o<0||o<t.columns.length&&!t._getBindingColumn(t.cells,i.row,t.columns[o])[DirectiveCellFactoryBase.getTemplContextProp(GridCellTemplateType.CellEdit)])&&(r._editChar=null);setTimeout((function(){r._noApplyLag=!1}),300)}));t.beginningEdit.addHandler((function(e,t){r._startingEditing=!0}));t.hostElement.addEventListener("keydown",(function(e){r._startingEditing=!1}),!0);t.hostElement.addEventListener("keypress",(function(e){var l=e.charCode>32?String.fromCharCode(e.charCode):null;if(l&&wjcCore.closest(e.target,".wj-flexgrid")===t.hostElement)if(!t.activeEditor||r._startingEditing){r._editChar=l;setTimeout((function(){t.activeEditor||(r._editChar=null)}),0)}else r._editChar&&(r._editChar+=l)}),!0);t.hostElement.addEventListener("compositionstart",(function(e){r._composing=!0}),!0);t.hostElement.addEventListener("compositionend",(function(e){r._composing=!1}),!0);return l}DirectiveCellFactoryBase.prototype.updateCell=function(e,t,l,i,r){var o=this;this._cellStampCounter=(this._cellStampCounter+1)%1e7;var n=i[DirectiveCellFactoryBase._cellStampProp]=this._cellStampCounter;i.style.overflow&&(i.style.overflow="");var a=t,s=l;if(r&&!r.isSingleCell){t=r.row;l=r.col}var c,p=this,d=e.grid,u=d.editRange,C=e.rows[t],m=C.dataItem,f=!1,_=!1,y=!1,v=!1;switch(e.cellType){case wjcGrid.CellType.Cell:if(u&&u.row===t&&u.col===l){c=GridCellTemplateType.CellEdit;_=y=!0}else if(C instanceof wjcGrid.GroupRow){var g=!((v=m instanceof wjcCore.CollectionViewGroup)||C.hasChildren);if(l==e.columns.firstVisibleIndex)c=g?GridCellTemplateType.Cell:GridCellTemplateType.GroupHeader;else{c=g?GridCellTemplateType.Cell:GridCellTemplateType.Group;_=!0}}else C instanceof wjcGrid._NewRowTemplate?c=GridCellTemplateType.NewCellTemplate:softGridDetail()&&softGridDetail().DetailRow&&C instanceof softGridDetail().DetailRow||(c=GridCellTemplateType.Cell);break;case wjcGrid.CellType.ColumnHeader:c=GridCellTemplateType.ColumnHeader;break;case wjcGrid.CellType.RowHeader:c=d.collectionView&&d.collectionView.currentEditItem===m?GridCellTemplateType.RowHeaderEdit:GridCellTemplateType.RowHeader;f=!0;break;case wjcGrid.CellType.TopLeft:c=GridCellTemplateType.TopLeft;f=!0;break;case wjcGrid.CellType.ColumnFooter:c=GridCellTemplateType.ColumnFooter;_=!0;break;case wjcGrid.CellType.BottomLeft:c=GridCellTemplateType.BottomLeft;f=!0}var h=!!v&&C.isSummary,w=v&&(d.groupSummaryPosition===wjcGrid.GroupSummaryPosition.Bottom||d.groupSummaryPosition===wjcGrid.GroupSummaryPosition.Auto&&!C.isCollapsed),T=!1;if(null!=c){var E=null;v&&c==GridCellTemplateType.GroupHeader?E=d.getColumn(m.groupDescription.propertyName):l>=0&&l<e.columns.length&&(E=e.cellType===wjcGrid.CellType.ColumnHeader&&d._hasColumnGroups()?d._getColumnGroup(t,l):d._getBindingColumn(e,t,e.columns[l]));if(E){var F=DirectiveCellFactoryBase.getTemplContextProp,G=F(c),D=(f?d:E)[G];if(!D)if(c===GridCellTemplateType.RowHeaderEdit){G=F(c=GridCellTemplateType.RowHeader);D=d[G]}else if((c===GridCellTemplateType.Group||c===GridCellTemplateType.GroupHeader)&&!v){G=F(c=GridCellTemplateType.Cell);D=E[G]}if(D){var j,B;if(_){j=e.getCellData(t,l,!1);B=e.getCellData(t,l,!0)}T=!0;var H=i.getAttribute(wjcGrid.FlexGrid._WJS_MEASURE),I=H&&"true"===H.toLowerCase();if(y){this.clearCell(i);this._baseCf.updateCell(e,a,s,i,r,!0)}var S,R=y&&d.imeEnabled,b=R&&this._composing,x=i[G],L={cell:i,column:E,row:C,panel:e,rng:r,isEdit:y,isImeInput:R,isTrueImeInput:b,templateContext:D,templateCache:x,templateContextProperty:G,cellStamp:n,cellValue:j,cellValueFormatted:B},V=this.shouldInstantiate(L),P=!0;v&&!h&&l!=e.columns.firstVisibleIndex&&w&&(P=!1);if(V){if(y){var A=i.firstElementChild;if(A){R||i.focus();A.style.display="none"}}else this.clearCell(i);this._doDisposeCell(i);if(P){this.renderTemplate(L,!0);L.templateCache=x=i[G]}else this._doDisposeCell(i);S=L.cellBindingsData}else{P?this.renderTemplate(L,!1):this._doDisposeCell(i);S=L.cellBindingsData}D.cellOverflow&&(i.style.overflow=D.cellOverflow);I?this.applyImmediately(L):D.autoSizeRows&&!R?this.checkHeight(L):y&&setTimeout((function(){R?o._initImeEditInput(L.cell,D):o._initEditInput(L.cell,D,null)}),0);if(y){p._cellEditorVars=S.localVars;var editEndingEH=function(e,t){d.cellEditEnding.removeHandler(editEndingEH);if(!t.stayInEditMode){var l=wjcCore.getActiveElement();l&&l.dispatchEvent(p._evtBlur);wjcCore.contains(i,wjcCore.getActiveElement())&&i.focus()}p._triggerEditorEvents(i);if(!t.cancel&&!t.stayInEditMode)for(var r=S.localVars,o=0,n=Object.getOwnPropertyNames(S.bindings);o<n.length;o++){var a=n[o];S.bindings[a].setValue(r,S.localVars.values[a])}var s=i.querySelectorAll(".wj-dropdown");[].forEach.call(s,(function(e){var t=wjcCore.Control.getControl(e);t&&softInput()&&t instanceof softInput().DropDown&&(t.isDroppedDown=!1)}))},editEndedEH_1=function(e,t){d.cellEditEnded.removeHandler(editEndedEH_1);p._cellEditorVars=null};d.cellEditEnding.addHandler(editEndingEH);d.cellEditEnded.addHandler(editEndedEH_1)}else this._baseCf.updateCell(e,a,s,i,r,!1)}}}if(!T){this._doDisposeCell(i);this._baseCf.updateCell(e,a,s,i,r)}};DirectiveCellFactoryBase.prototype.getEditorValue=function(t){if(this._cellEditorVars){var l=t.editRange;l&&l.isValid&&this._triggerEditorEvents(t.cells.getCellElement(l.row,l.col));return this._cellEditorVars.value}return e.prototype.getEditorValue.call(this,t)};DirectiveCellFactoryBase.prototype.disposeCell=function(e){this._doDisposeCell(e)};DirectiveCellFactoryBase.prototype.disposeTemplate=function(e,t,l){if(t){t.rootElement=null;t.column=null;e[t.templateContextProperty]=null;t.templateContextProperty=null}};DirectiveCellFactoryBase.prototype.setBindingsData=function(e,t,l,i,r,o){e.row=t;e.col=l;e.item=i;var n={},a=e.cell||{},s={},c={localVars:a,bindings:s};a.row=t;a.col=l;a.item=i;a.value=r;a.valueFormatted=e.cellValueFormatted;a.values=n;if(o)for(var p=0,d=Object.getOwnPropertyNames(o);p<d.length;p++){var u=d[p],C=new wjcCore.Binding(o[u]);s[u]=C;n[u]=C.getValue(a)}e.cell!==a&&(e.cell=a);return c};DirectiveCellFactoryBase.prototype.checkHeight=function(e){var t=this;this._isCheckingHeight||setTimeout((function(){var l=e.cell;if(e.cellStamp===l[DirectiveCellFactoryBase._cellStampProp]){var i=l.scrollHeight,r=e.panel.rows,o=e.row.index,n=e.rng,a=n&&n.rowSpan||1,s=e.isEdit;null!=r.maxSize&&(i=Math.min(i,r.maxSize));if(o<r.length&&r[o].renderHeight*a<i-1){var c=i/a;if(s){var p=t._isFullEdit(),d=t.grid;t._backupHeight=e.row.height;e.row.height=c;t._cacheRow=e.row;t._isCheckingHeight=!0;d.refresh();d.startEditing(p);t._isCheckingHeight=!1}}s&&(e.isImeInput?t._initImeEditInput(e.cell,e.templateContext):t._initEditInput(e.cell,e.templateContext,null))}}),0)};DirectiveCellFactoryBase.prototype._restoreRowHeight=function(){if(!this._isCheckingHeight&&this._cacheRow){this._cacheRow.height=this._backupHeight;this._backupHeight=-1;this._cacheRow=null}};DirectiveCellFactoryBase.prototype.doDisposeCell=function(e){for(var t=DirectiveCellFactoryBase._templateTypes,l=0;l<t.length;l++){var i=DirectiveCellFactoryBase.getTemplContextProp(GridCellTemplateType[t[l]]),r=e[i];if(r){var o=(r.column||this.grid)[i];this.disposeTemplate(e,r,o);t[l]==GridCellTemplateType[GridCellTemplateType.CellEdit]&&this._restoreRowHeight()}}};DirectiveCellFactoryBase.getTemplContextProp=function(e){return"$__cellTempl"+GridCellTemplateType[e]};DirectiveCellFactoryBase.prototype._doDisposeCell=function(e){this.doDisposeCell(e)};DirectiveCellFactoryBase.prototype._initEditInput=function(e,t,l){var i=this;this.setEditorFocusFlag(!0);var r=!1!==this.getEditorFocusFlag();this.setEditorFocusFlag(null);this._setFullEdit(t);r&&setTimeout((function(){var t=i._findInitialInput(e);if(t){var inpFocusEh=function(){t.removeEventListener("focus",inpFocusEh);setTimeout((function(){setTimeout((function(){var e=null!=l?l:i._editChar;if(e){t.value=e;i._editChar=null;DirectiveCellFactoryBase._setSelectionRange(t,e.length,e.length);t.dispatchEvent(i._evtInput)}}),0)}),DirectiveCellFactoryBase._FOCUS_INTERVAL)};t.addEventListener("focus",inpFocusEh);t.focus()}}),100)};DirectiveCellFactoryBase.prototype._initImeEditInput=function(e,t){var l=this,i=wjcCore.getActiveElement();if(i&&(i instanceof HTMLInputElement||i instanceof HTMLTextAreaElement)&&wjcCore.hasClass(i,"wj-grid-ime")){var r=this._findInitialInput(e),o=r&&r.style.color,n=this._composing,compEndEh_1=function(){i.removeEventListener("compositionend",compEndEh_1);wjcCore.setCss(i,wjcGrid._ImeHandler._cssHidden);l.setEditorFocusFlag(!0);r&&(r.style.color=o);l._initEditInput(e,t,n?i.value:null)};if(n){i.addEventListener("compositionend",compEndEh_1);if(r){var a=r.getBoundingClientRect(),s=i.getBoundingClientRect(),c=window.getComputedStyle(i),p=parseFloat(c.left),d=parseFloat(c.top);wjcCore.setCss(i,{left:p+a.left-s.left+"px",top:d+a.top-s.top+"px",width:a.width+"px",height:a.height+"px"});r.style.color="transparent"}}else setTimeout((function(){return compEndEh_1()}),DirectiveCellFactoryBase._FOCUS_INTERVAL)}};DirectiveCellFactoryBase.prototype._findInitialInput=function(e){var t=e&&e.rootElement&&e.rootElement.querySelectorAll("input,textarea")||e&&e.querySelectorAll("input,textarea");if(t)for(var l=0;l<t.length;l++){var i=t[l],r=window.getComputedStyle(i);if("none"!==r.display&&"visible"===r.visibility)return i}return null};DirectiveCellFactoryBase._setSelectionRange=function(e,t,l){void 0===l&&(l=t);if(wjcCore.contains(document.body,e)&&!e.disabled&&"none"!=e.style.display)try{e.setSelectionRange(wjcCore.asNumber(t),wjcCore.asNumber(l),wjcCore.isIE()?null:"backward");e.focus()}catch(e){}};DirectiveCellFactoryBase.prototype._triggerEditorEvents=function(e){if(e)for(var t=e.querySelectorAll(".wj-control"),l=0;l<t.length;l++){var i=t[l],r=wjcCore.Control.getControl(i);r&&this.flushPendingEvents(r)}};DirectiveCellFactoryBase.prototype._isFullEdit=function(){var e=this.grid;return!e.activeEditor||e._edtHdl._fullEdit};DirectiveCellFactoryBase.prototype._setFullEdit=function(e){var t=this.grid;e.forceFullEdit&&t.activeEditor&&(t._edtHdl._fullEdit=!0)};DirectiveCellFactoryBase._cellStampProp="__wjCellStamp";DirectiveCellFactoryBase._FOCUS_INTERVAL=wjcCore.Control._FOCUS_INTERVAL+20;return DirectiveCellFactoryBase}(wjcGrid.CellFactory);exports.DirectiveCellFactoryBase=DirectiveCellFactoryBase;__gridCFRef||(window.wijmo.grid=null);!function(e){e[e.Cell=0]="Cell";e[e.CellEdit=1]="CellEdit";e[e.ColumnHeader=2]="ColumnHeader";e[e.RowHeader=3]="RowHeader";e[e.RowHeaderEdit=4]="RowHeaderEdit";e[e.TopLeft=5]="TopLeft";e[e.GroupHeader=6]="GroupHeader";e[e.Group=7]="Group";e[e.NewCellTemplate=8]="NewCellTemplate";e[e.ColumnFooter=9]="ColumnFooter";e[e.BottomLeft=10]="BottomLeft"}(GridCellTemplateType=exports.GridCellTemplateType||(exports.GridCellTemplateType={}));wijmo_1._registerModule("wijmo.interop.grid",selfModule);
{
"name": "@grapecity/wijmo.interop.grid",
"version": "5.20241.001-nightly.d20240215.t020127",
"version": "5.20241.001-nightly.d20240221.t020535",
"description": "UI library for pure JS, Angular, React, Vue and more...",

@@ -10,6 +10,6 @@ "author": "MESCIUS inc",

"dependencies": {
"@grapecity/wijmo": "5.20241.001-nightly.d20240215.t020127",
"@grapecity/wijmo.input": "5.20241.001-nightly.d20240215.t020127",
"@grapecity/wijmo.grid": "5.20241.001-nightly.d20240215.t020127",
"@grapecity/wijmo.grid.detail": "5.20241.001-nightly.d20240215.t020127"
"@grapecity/wijmo": "5.20241.001-nightly.d20240221.t020535",
"@grapecity/wijmo.input": "5.20241.001-nightly.d20240221.t020535",
"@grapecity/wijmo.grid": "5.20241.001-nightly.d20240221.t020535",
"@grapecity/wijmo.grid.detail": "5.20241.001-nightly.d20240221.t020535"
},

@@ -16,0 +16,0 @@ "homepage": "https://developer.mescius.com/wijmo",