/*! * * SpreadJS Library 13.1.0 * * Copyright(c) GrapeCity, Inc. All rights reserved. * * Licensed under the SpreadJS Commercial License. * us.sales@grapecity.com * http://www.grapecity.com/en/licensing/grapecity/ * * */ var GC="object"==typeof GC?GC:{};GC.Spread=GC.Spread||{},GC.Spread.Sheets=GC.Spread.Sheets||{},GC.Spread.Sheets.OutlineColumn=function(a){var b={};function c(d){if(b[d])return b[d].exports;var e=b[d]={i:d,l:!1,exports:{}};return a[d].call(e.exports,e,e.exports,c),e.l=!0,e.exports}return c.m=a,c.c=b,c.d=function(a,b,d){c.o(a,b)||Object.defineProperty(a,b,{enumerable:!0,get:d})},c.r=function(a){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(a,"__esModule",{value:!0})},c.t=function(a,b){var d,e;if(1&b&&(a=c(a)),8&b)return a;if(4&b&&"object"==typeof a&&a&&a.__esModule)return a;if(d=Object.create(null),c.r(d),Object.defineProperty(d,"default",{enumerable:!0,value:a}),2&b&&"string"!=typeof a)for(e in a)c.d(d,e,function(b){return a[b]}.bind(null,e));return d},c.n=function(a){var b=a&&a.__esModule?function b(){return a.default}:function b(){return a};return c.d(b,"a",b),b},c.o=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)},c.p="/assets/",c(c.s="./dist/plugins/outlineColumn/outlineColumn.entry.js")}({"./dist/plugins/outlineColumn/outlineColumn-actions.js":function(a,b,c){"use strict";var d,e,f,g,h,i,j,k,l,m,n,o,p=this&&this.__extends||function(){var a=function(b,c){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,b){a.__proto__=b}||function(a,b){for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c])})(b,c)};return function(b,c){a(b,c);function d(){this.constructor=b}b.prototype=null===c?Object.create(c):(d.prototype=c.prototype,new d)}}();Object.defineProperty(b,"__esModule",{value:!0}),d=c("Common"),e=c("Core"),b.commands=e.Commands,f=e.Commands.ActionBase,g=d.Common.j.Fa,h="increaseCellIndent",i="decreaseCellIndent",j="updateOutlineColumnCheckStatus",k="outlineColumnCheckStatus",b.outlineColumnCheckStatus=k,l=e.Commands.h4;function q(a,b,c,d){return s(a,b,c,d)}function r(a,b,c,d){a.Wq(e.Events.OutlineColumnCheckStatusChanged,{sheet:a,sheetName:a.name(),row:b,col:c,status:d})}function s(a,b,c,d){var e,f,h,i,j,k,l,m,n,o,p=g(d)?a.getActiveColumnIndex():d;if(!a.outlineColumn.XQa(p))return null;if(e=b?1:-1,f=a.getActiveRowIndex(),h=a.getSelections()[0].rowCount,j=!0,g(c))for(c={},j=!1,i=f;il&&!c[i-1])||(m=k+e,n=a.outlineColumn.options(),o=g(n.maxLevel)?a.outlineColumn.Oia().maxLevel:n.maxLevel,o&&m+1>o||m+1<0||(c[i]={row:i,original:k+1,current:m+1},j=!0)));return j?c:null}function t(a,b,c,d){var e,f,h,i=s(a,b,c,d);if(!i)return null;e=g(d)?a.getActiveColumnIndex():d,a.outlineColumn.Lia(),a.suspendPaint();for(f in i)Object.prototype.hasOwnProperty.call(i,f)&&(h=i[f],a.getCell(h.row,e).textIndent(h.current));a.resumePaint(),a.outlineColumn.Mia()}function u(a,b,c,d){var e,f,g,h,i,j=0,k=0,l=a.rowOutlines.getLevel(b);if(a.outlineColumn.Kia.updateCheckStatus(b,d),f=b<=a.getRowCount()-2?a.rowOutlines.find(b+1,l+1):null,null!==f&&null!==d)for(g=f.start;g0){for(j=f.start-1,k=a.rowOutlines.getLevel(j),a.outlineColumn.Kia.updateCheckStatus(j,d),e=a.rowOutlines.find(j+1,k+1),g=e.start;g0?a.group(b,1):a.ungroupRange(b,1)}function K(a,b,c,d,e,f,g){var h,i,j,k,n,p,q,t,u=L(c,"showIndicator");u?(h=a.zoom(),i=a.getRowCount(),j=!!a.rowOutlines.isCollapsed(b+1),k=l*h,n=m*h,p=null,q=null,c.expandIndicator&&(p=c.expandIndicator,j&&(k=r*h,n=s*h)),c.collapseIndicator&&(q=c.collapseIndicator,j||(k=r*h,n=s*h)),be?g.indicator={x:f.value+o*h,y:-n/2,width:k,height:n,collapsed:j,collapseIndicator:q,expandIndicator:p}:delete g.indicator),f.value+=2*o*h+k):delete g.indicator}function L(a,b){return k(a[b])?w[b]:a[b]}function M(a,b){for(var c,d,e,f,g,h,i,j=a.rowOutlines,k=a.outlineColumn.Kia,l=j.getLevel(b),m=j.find(b,l),n=0,o=0,p=!1;null!==m&&null!==m.parent;){if(d=m.start,d>0)for(n=d-1,o=j.getLevel(n),k.updateCheckStatus(n,p),c=j.find(n+1,o+1),e=c.start;ef.length-1?f[f.length-1]:f[b],i=d.value+o*g,j=0,e.images={image:h,x:i,y:j,width:p*g,height:q*g},d.value+=2*o*g+p*g)):delete e.images}function P(a,b,c){var d,e,f,g,h=a.outlineColumn.options(),i=h&&h.columnIndex;if(!k(i))return d={value:0},e=0,f=a.getActualStyle(b,i),f&&f.textIndent&&(e=f.textIndent),0!==b&&(g=a.rowOutlines.getLevel(b-1),e-g>=3&&(e=g+2)),d.value+=8*e,J(a.rowOutlines,b,e),K(a,b,h,i,e,d,c),N(a,b,h,i,d,c),O(a,e,h,d,c),c.cellContent={left:d.value,x:d.value,y:0,width:-d.value,height:0},c}x=function(){function a(a){this.kj=a,this.YQa={},this.$e=0}return a.prototype.no=function(){this.kj=v,this.Kia=v},a.prototype.LRa=function(a,b){return this.ZQa()?this.Kia.QR[a].cellContent.left:null},a.prototype.options=function(a){var b=this,c=b.YQa;return h(arguments)?(b.YQa=a,b.refresh(),b):c},a.prototype.refresh=function(){var a=this.kj;k(this.YQa)||k(this.YQa.columnIndex)||0===this.$e&&(a.suspendPaint(),a.outlineColumn.Kia.updateModel(),a.resumePaint())},a.prototype.setCheckStatus=function(a,b){var c=this.YQa.columnIndex;k(c)||I(this.kj,a,c,b)},a.prototype.Wlb=function(a){this.kj.outlineColumn.Kia.setAllTiemCheckStatus(a),this.refresh()},a.prototype.getCheckStatus=function(a){var b,c;if(h(arguments))return this.kj.outlineColumn.Kia.getCheckStatus(a);for(b=[],c=this.kj.getRowCount(),a=0;a0&&this.$e--,0===this.$e&&this.refresh()},a.prototype.Nia=function(a,b){this.kj.outlineColumn.Kia.insertRows(a,b)},a.prototype.Oia=function(){return w},a.prototype.Pia=function(){return{TRIANGLE_HEIGHT:l,TRIANGLE_BASE:m,CHECKBOX_RADIUS:n,GAP:o,IMAGE_WIDTH:p,IMAGE_HEIGHT:q,INDICATOR_IMAGE_WIDTH:r,INDICATOR_IMAGE_HEIGHT:s}},a.prototype.Gka=function(a){var b,c,d=this;for(b in a)a.hasOwnProperty(b)&&(c=d.Kia.QR[b]=d.Kia.QR[b]||{},c.checkBox={checkStatus:a[b].checked})},a.prototype.CXa=function(a,b){var c=this.YQa.columnIndex;k(c)||f.setCheckStatus(this.kj,a,c,b)},a.prototype.WZa=function(){return this.Kia.QR},a}(),b.OutlineColumn=x,y=function(){function a(a){var b=this;b.kj=a,b.QR={}}return a.prototype.no=function(){this.kj=v},a.prototype.updateIndicatorCollapsed=function(a,b){var c=this;k(c.QR[a])||k(c.QR[a].indicator)||(c.QR[a].indicator.collapsed=b)},a.prototype.updateCheckStatus=function(a,b){var c=this;c.JVa(a),k(c.QR[a])||(c.QR[a].checkBox.checkStatus=b)},a.prototype.setAllTiemCheckStatus=function(a){var b,c=this,d=c.QR;for(b in d)d.hasOwnProperty(b)&&(d[b].checkBox.checkStatus=a)},a.prototype.getCheckStatus=function(a){var b=this;return k(b.QR[a])||k(b.QR[a].checkBox)?null:b.QR[a].checkBox.checkStatus},a.prototype.getCollapsed=function(a){var b=this;return!k(b.QR[a])&&!k(b.QR[a].indicator)&&b.QR[a].indicator.collapsed},a.prototype.updateModel=function(){var a,b=this,c=b.kj,d=c.getRowCount();for(c.rowOutlines.direction(0),a=0;a0&&c.height>0&&(b=d.outlineColumn.Kia.QR[f],b&&(h.save(),b.indicator&&F(h,b.indicator,c,e.imageLoader),b.checkBox&&E(h,b.checkBox,c),b.images&&G(h,b.images.image,b.images,c,e.imageLoader),h.restore(),b.cellContent&&(c.x+=b.cellContent.left,c.width-=b.cellContent.left)))},getCellPaddingRect:function(a){var b,c=a.options.rect,d=a.options.context.sheet,e=a.options.context,f=e.row,g=e.col;D(d,g)&&c.width>0&&c.height>0&&(b=d.outlineColumn.Kia.QR[f],b&&b.cellContent&&(c.x+=b.cellContent.left,c.width-=b.cellContent.left))},getCellPaddingHitInfo:function(a){var b,c,d,e,f=a.context.sheet,g=a.context.col,h=a.context.row,i=a.x,j=a.y,k=a.cellRect,l=f.outlineColumn;if(a.paddingHitInfo=null,l&&l.YQa){for(b=l.Kia.QR[h],c=l.YQa.columnIndex,k=k.clone();g>c;)g--,k.x-=f.getColumnWidth(g);b&&g===c&&(d=void 0,e=void 0,b.indicator&&(d=b.indicator.x,e=b.indicator.x+k.x,i>=e&&i=e&&i=e&&i=k.x&&i