!function a(b,c){"object"==typeof exports&&"object"==typeof module?module.exports=c():"function"==typeof define&&define.amd?define([],c):"object"==typeof exports?exports.SpreadSheetsComponents=c():b.SpreadSheetsComponents=c()}(this,function(){return function(a){var b={};function c(d){if(b[d])return b[d].exports;var e=b[d]={exports:{},id:d,loaded:!1};return a[d].call(e.exports,e,e.exports,c),e.loaded=!0,e.exports}return c.m=a,c.c=b,c.p="",c(0)}([function(a,b,c){"use strict";var d,e,f,g,h,i;Object.defineProperty(b,"__esModule",{value:!0}),b.Column=b.Worksheet=b.SpreadSheets=void 0,d=c(1),e=j(d),f=c(5),g=j(f),h=c(7),i=j(h);function j(a){return a&&a.__esModule?a:{default:a}}b.SpreadSheets=e.default,b.Worksheet=g.default,b.Column=i.default},function(a,b,c){"use strict";var d,e,f,g,h,i;Object.defineProperty(b,"__esModule",{value:!0}),d=function(){function a(a,b){var c,d;for(c=0;c0?h.default.removeAllSheet(this.spread):0===e&&d>0&&h.default.addSheet(this.spread,0),c=h.default.watchChanges(this.props,b),h.default.changeWorkBookByAPI(this.spread,c)}},{key:"renderChildren",value:function a(){var b=this.spread?{spread:this.spread}:{};return h.default.getNewReallyChildren(this.props.children,h.default.sheetTagName,b)}},{key:"componentWillUnmount",value:function a(){this.spread.destroy()}},{key:"render",value:function a(){return f.default.createElement("div",{ref:"spreadJs",className:"container"+(this.props.hostClass||""),style:h.default.assign({width:"100%",height:"100%"},this.props.hostStyle)},this.renderChildren(this.props.children))}}]),b}(f.default.Component),b.default=i},function(a,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0});var c=window.React;b.default=c},function(a,b,c){"use strict";var d,e,f,g,h;Object.defineProperty(b,"__esModule",{value:!0}),d=c(2),e=i(d),f=c(4),g=i(f);function i(a){return a&&a.__esModule?a:{default:a}}h={defaultRowCount:200,defaultColumnCount:20,workBookTagName:"SpreadSheets",sheetTagName:"Worksheet",columnTagName:"Column",createSpread:function a(b,c){return new g.default.Spread.Sheets.Workbook(b,{sheetCount:c})},addSheet:function a(b,c,d){var e=new g.default.Spread.Sheets.Worksheet;return 0===d&&e.setColumnCount(0),b.addSheet(c,e),e},removeAllSheet:function a(b){for(var c=0;c2&&void 0!==arguments[2]?arguments[2]:1;b.addColumns(c,d)},removeColumn:function a(b,c){var d=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;b.deleteColumns(c,d)},removeAllColumn:function a(b){b.setColumnCount(0)},bindEvent:function a(b,c){var d=".react",e=["ValidationError","CellClick","CellDoubleClick","EnterCell","LeaveCell","ValueChanged","TopRowChanged","LeftColumnChanged","InvalidOperation","RangeFiltering","RangeFiltered","TableFiltering","TableFiltered","RangeSorting","RangeSorted","ClipboardChanging","ClipboardChanged","ClipboardPasting","ClipboardPasted","ColumnWidthChanging","ColumnWidthChanged","RowHeightChanging","RowHeightChanged","DragDropBlock","DragDropBlockCompleted","DragFillBlock","DragFillBlockCompleted","EditStarting","EditChange","EditEnding","EditEnd","EditEnded","RangeGroupStateChanging","RangeGroupStateChanged","SelectionChanging","SelectionChanged","SheetTabClick","SheetTabDoubleClick","SheetNameChanging","SheetNameChanged","UserZooming","UserFormulaEntered","CellChanged","ColumnChanged","RowChanged","ActiveSheetChanging","ActiveSheetChanged","SparklineChanged","RangeChanged","ButtonClicked","EditorStatusChanged","FloatingObjectChanged","FloatingObjectSelectionChanged","PictureChanged","FloatingObjectRemoving","FloatingObjectRemoved","PictureSelectionChanged","FloatingObjectLoaded","TouchToolStripOpening","CommentChanged","CommentRemoving","CommentRemoved","SlicerChanged"];e.forEach(function(a){b.bind(a+d,function(a,b){var d=a.type,e=d[0].toLowerCase()+d.substr(1),f=c[e];f&&f(a,b)})})},watchChanges:function a(b,c){var d,e,f={};for(d in b)b.hasOwnProperty(d)&&b[d]!==c[d]&&(f[d]=c[d]);for(e in c)c.hasOwnProperty(e)&&b[e]!==c[e]&&(f[e]=c[e]);return f},changeWorkBookByAPI:function a(b,c){b.suspendEvent(),b.suspendPaint();for(var d in c)if(c.hasOwnProperty(d))switch(d){case"name":b.name=c[d];break;case"allowUserZoom":case"allowUserResize":case"tabStripVisible":case"tabEditable":case"newTabVisible":case"allowUserEditFormula":case"autoFitType":case"allowUserDragFill":case"allowUserDragDrop":case"highlightInvalidData":case"referenceStyle":case"backColor":case"grayAreaBackColor":case"backgroundImage":case"backgroundImageLayout":case"showVerticalScrollbar":case"showHorizontalScrollbar":case"showScrollTip":case"showResizeTip":case"showDragDropTip":case"showDragFillTip":b.options[d]=c[d]}b.resumePaint(),b.resumeEvent()},changeWorkSheetByAPI:function a(b,c){var d,e;if(b){b.suspendPaint(),b.suspendEvent();for(d in c)if(c.hasOwnProperty(d))switch(e=c[d],d){case"frozenColumnCount":case"frozenRowCount":case"frozenTrailingColumnCount":case"frozenTrailingRowCount":case"zoom":case"selectionPolicy":case"selectionUnit":b[d](parseInt(e));break;case"name":case"currentTheme":case"showRowOutline":case"showColumnOutline":b[d](e);break;case"autoGenerateColumns":b[d]=e;break;case"allowCellOverflow":case"frozenlineColor":case"sheetTabColor":case"clipBoardOptions":case"rowHeaderAutoText":case"rowHeaderVisible":case"isProtected":case"selectionBackColor":case"selectionBorderColor":b.options[d]=e;break;case"rowHeaderAutoTextIndex":b.options[d]=parseInt(e);break;case"dataSource":b.setDataSource(e);break;case"rowCount":b.setRowCount(parseInt(e));break;case"colCount":b.setColumnCount(parseInt(e));break;case"defaultStyle":b.setDefaultStyle(e);break;case"columnHeaderVisible":b.options.colHeaderVisible=e;break;case"columnHeaderAutoText":b.options.colHeaderAutoText=e;break;case"columnHeaderAutoTextIndex":b.options.colHeaderAutoTextIndex=parseInt(e)}b.resumeEvent(),b.resumePaint()}},changeWorkSheetAfterInitColumnByAPI:function a(b,c){var d,e;if(b){b.suspendPaint(),b.suspendEvent();for(d in c)if(c.hasOwnProperty(d))switch(e=c[d],d){case"rowOutlineInfo":b.rowOutlines.ungroup(),e.forEach(function(a){b.rowOutlines.group(a.index,a.count)});break;case"columnOutlineInfo":b.columnOutlines.ungroup(),e.forEach(function(a){b.getColumnCount()>a.index&&b.columnOutlines.group(a.index,a.count)})}b.resumeEvent(),b.resumePaint()}},changeColumnByAPI:function a(b,c,d){var e,f;if(b){b.suspendPaint(),b.suspendEvent();for(e in d)if(d.hasOwnProperty(e))switch(f=d[e],e){case"width":b.setColumnWidth(c,f);break;case"visible":b.setColumnVisible(c,f);break;case"resizable":b.setColumnResizable(c,f);break;case"autoFit":f&&b.autoFitColumn(c);break;case"style":b.setStyle(-1,c,f);break;case"headerStyle":b.setStyle(-1,c,f,g.default.Spread.Sheets.SheetArea.colHeader);break;case"cellType":b.setCellType(-1,c,f);break;case"formatter":b.setFormatter(-1,c,f,g.default.Spread.Sheets.SheetArea.viewport);break;case"dataField":b.bindColumn(c,{name:f,displayName:d.headerText}),void 0!==d.width&&b.setColumnWidth(c,d.width),void 0!==d.visible&&b.setColumnVisible(c,d.visible),void 0!==d.resizable&&b.setColumnResizable(c,d.resizable);break;case"headerText":d.dataField&&(b.bindColumn(c,{name:d.dataField,displayName:f}),void 0!==d.width&&b.setColumnWidth(c,d.width),void 0!==d.visible&&b.setColumnVisible(c,d.visible),void 0!==d.resizable&&b.setColumnResizable(c,d.resizable))}b.resumeEvent(),b.resumePaint()}},filterReallyChild:function a(){var b=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],c=arguments[1],d=e.default.Children.map(b,function(a){if(a.type&&a.type.displayName===c)return a});return d||[]},getNewReallyChildren:function a(b,c,d){var f=this.filterReallyChild(b,c);return e.default.Children.map(f,function(a,b){if(a)return e.default.cloneElement(a,h.assign({index:b},d))})},assign:function a(){var b,c,d=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},f={};for(b in d)d.hasOwnProperty(b)&&(f[b]=d[b]);for(c in e)e.hasOwnProperty(c)&&(f[c]=e[c]);return f}},b.default=h},function(a,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0});var c=window.GC;b.default=c},function(a,b,c){"use strict";var d,e,f,g,h,i,j,k,l,m;Object.defineProperty(b,"__esModule",{value:!0}),d=function(){function a(a,b){var c,d;for(c=0;c0?null===this.props.dataSource&&null!==b.dataSource?this.sheet.setColumnCount(d):null!==this.props.dataSource&&null===b.dataSource&&this.sheet.setRowCount(b.rowCount||l):null!==this.props.dataSource&&null===b.dataSource&&(this.sheet.setRowCount(b.rowCount||l),this.sheet.setColumnCount(b.colCount||k)),0===c&&d>0?this.removeAllColumn(b):c>0&&0===d&&(b.dataSource?this.needReSetDataSource=!0:h.default.addColumn(this.sheet,0,b.colCount||k))}},{key:"componentWillUnmount",value:function a(){this.sheet.name()&&(this.sheet=h.default.removeSheet(this.props.spread,this.sheet)),this.isFirst=!0}},{key:"removeAllColumn",value:function a(b){h.default.removeAllColumn(this.sheet);var c=b.frozenColumnCount;c&&this.sheet.frozenColumnCount(parseInt(c))}},{key:"renderChildren",value:function a(){var b=this.sheet?{sheet:this.sheet,columnIndexManager:this.columnIndexManager}:{},c=h.default.getNewReallyChildren(this.props.children,h.default.columnTagName,b);return this.reallyChildCount=c.length,c}},{key:"render",value:function a(){return f.default.createElement("div",null,this.renderChildren())}}]),b}(f.default.Component),m.displayName=h.default.sheetTagName,b.default=m},function(a,b){"use strict";var c,d;Object.defineProperty(b,"__esModule",{value:!0}),c=function(){function a(a,b){var c,d;for(c=0;c