@mescius/wijmo.react.grid 5.20232.939
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/COMMERCIAL-LICENSE.html +485 -0
- package/README.md +363 -0
- package/es2015-commonjs.js +14 -0
- package/es2015-esm.js +14 -0
- package/es5-esm.js +14 -0
- package/index.d.ts +695 -0
- package/index.js +14 -0
- package/package.json +49 -0
package/index.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
*
|
|
3
|
+
* Wijmo Library 5.20232.939
|
|
4
|
+
* https://developer.mescius.com/wijmo
|
|
5
|
+
*
|
|
6
|
+
* Copyright(c) MESCIUS inc. All rights reserved.
|
|
7
|
+
*
|
|
8
|
+
* Licensed under the End-User License Agreement For MESCIUS Wijmo Software.
|
|
9
|
+
* us.sales@mescius.com
|
|
10
|
+
* https://developer.mescius.com/wijmo/licensing
|
|
11
|
+
*
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
"use strict";var __extends=this&&this.__extends||function(){var extendStatics=function(e,t){return(extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)};return function(e,t){extendStatics(e,t);function __(){this.constructor=e}e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}}(),__importStar=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);t.default=e;return t};Object.defineProperty(exports,"__esModule",{value:!0});var wijmo_react_base_1=require("@mescius/wijmo.react.base"),React=__importStar(require("react")),wjcCore=__importStar(require("@mescius/wijmo")),wjcGrid=__importStar(require("@mescius/wijmo.grid")),wjcInteropGrid=__importStar(require("@mescius/wijmo.interop.grid"));exports.CellTemplateType=wjcInteropGrid.GridCellTemplateType;var FlexGrid=function(e){__extends(FlexGrid,e);function FlexGrid(t){return e.call(this,t,wjcGrid.FlexGrid,{objectProps:["childItemsPath","mergeManager","itemsSource","virtualizationThreshold","columnGroups"]})||this}FlexGrid.prototype._createControl=function(){var t=e.prototype._createControl.call(this);new DirectiveCellFactory(this,t);return t};return FlexGrid}(wijmo_react_base_1.ComponentBase);exports.FlexGrid=FlexGrid;var FlexGridColumn=function(e){__extends(FlexGridColumn,e);function FlexGridColumn(t){var r=e.call(this,t,wjcGrid.Column,{objectProps:["dataMap","cellTemplate","editor"]})||this;r._parentProp="columns";return r}FlexGridColumn.prototype._initParent=function(){var t=this.parent.control;if(t.autoGenerateColumns){t.autoGenerateColumns=!1;t.columns.clear()}e.prototype._initParent.call(this)};return FlexGridColumn}(wijmo_react_base_1.ComponentBase);exports.FlexGridColumn=FlexGridColumn;var FlexGridColumnGroup=function(e){__extends(FlexGridColumnGroup,e);function FlexGridColumnGroup(t){var r=e.call(this,t,wjcGrid.ColumnGroup,{objectProps:["dataMap","cellTemplate","editor"]})||this;r._parentProp="columnGroups";return r}return FlexGridColumnGroup}(wijmo_react_base_1.ComponentBase);exports.FlexGridColumnGroup=FlexGridColumnGroup;var DirectiveCellFactory=function(e){__extends(DirectiveCellFactory,e);function DirectiveCellFactory(t,r){var l=e.call(this,r)||this;l._renderedCells=[];l._isViewUpdated=!1;r.updatedView.addHandler(l._gridViewUpdated,l);t._beforeDidUpdate.addHandler(l._gridCmpBeforeDidUpdate,l);t._afterDidUpdate.addHandler(l._gridCmpAfterDidUpdate,l);return l}DirectiveCellFactory.prototype.shouldInstantiate=function(e){var t=e.templateCache;return null==t||t.column!==e.column||t.templateContextProperty!==e.templateContextProperty||e.cell.firstChild!=t.rootElement};DirectiveCellFactory.prototype.renderTemplate=function(e,t){var r=e.row,l=e.templateContext,o=e.cell;e.cellBindingsData=this.setBindingsData({},r,e.column,r.dataItem,e.cellValue,l.valuePaths);this._renderCell(o,e);if(t){this._addRenderedCell(o);var i=e.templateCache={column:e.column,rootElement:o.firstElementChild,templateContextProperty:e.templateContextProperty};o[e.templateContextProperty]=i}};DirectiveCellFactory.prototype.disposeTemplate=function(t,r,l){if(r){wijmo_react_base_1.ComponentBase.selectiveDomUnmount(t);this._removeRenderedCell(t);e.prototype.disposeTemplate.call(this,t,r,l)}};DirectiveCellFactory.prototype.clearCell=function(e){wijmo_react_base_1.ComponentBase.selectiveDomUnmount(e)};DirectiveCellFactory.prototype.applyImmediately=function(e){};DirectiveCellFactory.prototype.flushPendingEvents=function(e){};DirectiveCellFactory.prototype.getEditorFocusFlag=function(){return!0};DirectiveCellFactory.prototype.setEditorFocusFlag=function(e){};DirectiveCellFactory.prototype._renderCell=function(e,t){var r=t||e.__wjCellLastRenderedProp;if(r){var l=r&&r.templateContext.template,o=r.cellBindingsData.localVars;wijmo_react_base_1.ComponentBase.selectiveDomRender(React.createElement("div",{},l&&l(o)),e);e.__wjCellLastRenderedProp=r}};DirectiveCellFactory.prototype._addRenderedCell=function(e){var t=this._renderedCells;t.indexOf(e)<0&&t.push(e)};DirectiveCellFactory.prototype._removeRenderedCell=function(e){var t=this._renderedCells,r=t.indexOf(e);r>-1&&t.splice(r,1)};DirectiveCellFactory.prototype._reRenderCells=function(){var e=this;this._renderedCells.forEach((function(t){return e._renderCell(t)}))};DirectiveCellFactory.prototype._gridCmpBeforeDidUpdate=function(){this._isViewUpdated=!1};DirectiveCellFactory.prototype._gridCmpAfterDidUpdate=function(){this._gridCmpRendered()};DirectiveCellFactory.prototype._gridCmpRendered=function(){var e=this;setTimeout((function(){e._isViewUpdated?e._isViewUpdated=!1:e._reRenderCells()}),wjcCore.Control._REFRESH_INTERVAL)};DirectiveCellFactory.prototype._gridViewUpdated=function(){this._isViewUpdated=!0};DirectiveCellFactory.prototype.checkHeight=function(e){var t=this;"$__cellTemplGroupHeader"!==e.templateContextProperty&&(this._isCheckingHeight||setTimeout((function(){if(!t._isCheckingHeight){var r=e.panel.rows,l=e.row.index,o=e.cell,i=o.style.height;o.style.height="0";var n=o.scrollHeight>7?o.scrollHeight:r[l].renderHeight;o.style.height=i;if(e.cellStamp===o[wjcInteropGrid.DirectiveCellFactoryBase._cellStampProp]){var a=e.rng,p=a&&a.rowSpan||1,c=e.isEdit;null!=r.maxSize&&(n=Math.min(n,r.maxSize));if(l<r.length&&r[l].renderHeight<n-1||r[l].renderHeight>n+1&&!c&&e.panel.cellType===wjcGrid.CellType.Cell){var d=n/p;e.row.resizedManually||(e.row.height=d);if(c){var s=t._isFullEdit(),u=t.grid;t._backupHeight=e.row.height;e.row.height=d;t._cacheRow=e.row;t._isCheckingHeight=!0;u.refresh();u.startEditing(s);t._isCheckingHeight=!1;e.isImeInput?t._initImeEditInput(e.cell,e.templateContext):t._initEditInput(e.cell,e.templateContext,null);return}}else c&&(e.isImeInput?t._initImeEditInput(e.cell,e.templateContext):t._initEditInput(e.cell,e.templateContext,null))}}}),2))};return DirectiveCellFactory}(wjcInteropGrid.DirectiveCellFactoryBase);exports.DirectiveCellFactory=DirectiveCellFactory;var FlexGridCellTemplate=function(e){__extends(FlexGridCellTemplate,e);function FlexGridCellTemplate(){return null!==e&&e.apply(this,arguments)||this}Object.defineProperty(FlexGridCellTemplate.prototype,"cellOverflow",{get:function(){return this.props.cellOverflow},enumerable:!0,configurable:!0});Object.defineProperty(FlexGridCellTemplate.prototype,"autoSizeRows",{get:function(){var e=this.props.autoSizeRows;return null==e||e},enumerable:!0,configurable:!0});Object.defineProperty(FlexGridCellTemplate.prototype,"forceFullEdit",{get:function(){var e=this.props.forceFullEdit;return null==e||e},enumerable:!0,configurable:!0});Object.defineProperty(FlexGridCellTemplate.prototype,"valuePaths",{get:function(){return this.props.valuePaths},enumerable:!0,configurable:!0});Object.defineProperty(FlexGridCellTemplate.prototype,"template",{get:function(){return this.props[FlexGridCellTemplate._CellRenderFuncProp]},enumerable:!0,configurable:!0});FlexGridCellTemplate.prototype.componentDidMount=function(){var e=this,t=this.props[wijmo_react_base_1.ComponentBase._propsParent];t&&t._mountedCB((function(){var r=e.ownerControl=t.control;if(r instanceof wjcGrid.FlexGrid)e.grid=r;else if(r instanceof wjcGrid.Column){e.column=r;var l=t,o=void 0;do{o=(l=l.props[wijmo_react_base_1.ComponentBase._propsParent])&&l.control}while(o&&!(o instanceof wjcGrid.FlexGrid));e.grid=o}e.template&&e._attachToControl()}))};FlexGridCellTemplate.prototype.componentWillUnmount=function(){this._detachFromControl()};FlexGridCellTemplate.prototype.componentDidUpdate=function(e){var t=e[FlexGridCellTemplate._CellRenderFuncProp],r=this.template;t!=r&&(null==t?this._attachToControl():null==r&&this._detachFromControl())};FlexGridCellTemplate.prototype.render=function(){return null};FlexGridCellTemplate.prototype._attachToControl=function(){var e=this.cellType=wjcCore.asEnum(this.props.cellType,exports.CellTemplateType),t=this.ownerControl;t[DirectiveCellFactory.getTemplContextProp(e)]=this;t instanceof wjcGrid.Column&&(e===exports.CellTemplateType.Cell||e===exports.CellTemplateType.ColumnHeader||e===exports.CellTemplateType.ColumnFooter)&&t._setFlag(wjcGrid.RowColFlags.HasTemplate,!0);this.grid.invalidate()};FlexGridCellTemplate.prototype._detachFromControl=function(){if(null!=this.cellType){this.ownerControl[DirectiveCellFactory.getTemplContextProp(this.cellType)]=null;this.grid.invalidate()}};FlexGridCellTemplate._CellRenderFuncProp="template";return FlexGridCellTemplate}(React.Component);exports.FlexGridCellTemplate=FlexGridCellTemplate;
|
package/package.json
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@mescius/wijmo.react.grid",
|
|
3
|
+
"version": "5.20232.939",
|
|
4
|
+
"description": "UI library for pure JS, Angular, React, Vue and more...",
|
|
5
|
+
"author": "MESCIUS inc",
|
|
6
|
+
"license": "Commercial",
|
|
7
|
+
"main": "./index.js",
|
|
8
|
+
"types": "./index.d.ts",
|
|
9
|
+
"dependencies": {
|
|
10
|
+
"@mescius/wijmo": "5.20232.939",
|
|
11
|
+
"@mescius/wijmo.grid": "5.20232.939",
|
|
12
|
+
"@mescius/wijmo.input": "5.20232.939",
|
|
13
|
+
"@mescius/wijmo.grid.detail": "5.20232.939",
|
|
14
|
+
"@mescius/wijmo.interop.grid": "5.20232.939",
|
|
15
|
+
"@mescius/wijmo.react.base": "5.20232.939"
|
|
16
|
+
},
|
|
17
|
+
"homepage": "https://developer.mescius.com/wijmo",
|
|
18
|
+
"bugs": {
|
|
19
|
+
"url": "https://developer.mescius.com/forums/wijmo"
|
|
20
|
+
},
|
|
21
|
+
"keywords": [
|
|
22
|
+
"control",
|
|
23
|
+
"component",
|
|
24
|
+
"ui",
|
|
25
|
+
"control library",
|
|
26
|
+
"component library",
|
|
27
|
+
"ui library",
|
|
28
|
+
"control-library",
|
|
29
|
+
"component-library",
|
|
30
|
+
"ui-library",
|
|
31
|
+
"grid",
|
|
32
|
+
"data grid",
|
|
33
|
+
"data-grid",
|
|
34
|
+
"datagrid",
|
|
35
|
+
"angular grid",
|
|
36
|
+
"react grid",
|
|
37
|
+
"vue grid",
|
|
38
|
+
"angular-grid",
|
|
39
|
+
"react-grid",
|
|
40
|
+
"vue-grid"
|
|
41
|
+
],
|
|
42
|
+
"module": "./es5-esm.js",
|
|
43
|
+
"esm5": "./es5-esm.js",
|
|
44
|
+
"wj-esm5": "./es5-esm.js",
|
|
45
|
+
"es2015Cjs": "./es2015-commonjs.js",
|
|
46
|
+
"wj-es2015Cjs": "./es2015-commonjs.js",
|
|
47
|
+
"esm2015": "./es2015-esm.js",
|
|
48
|
+
"wj-esm2015": "./es2015-esm.js"
|
|
49
|
+
}
|