@grapecity-software/spread-sheets-spacing 17.1.0
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/README.md +15 -0
- package/dist/gc.spread.sheets.spacing.min.js +12 -0
- package/index.js +1 -0
- package/package.json +27 -0
package/README.md
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# SpreadJS Spacing Module
|
|
2
|
+
|
|
3
|
+
Spacing 是 [SpreadJS](https://www.grapecity.com.cn/developer/spreadjs) 的模块之一
|
|
4
|
+
|
|
5
|
+
有关 SpreadJS 模块和插件的详细列表,请参见 [SpreadJS 组件库](https://demo.grapecity.com.cn/spreadjs/help/docs/getstarted/modules)
|
|
6
|
+
|
|
7
|
+
## 安装模块/插件
|
|
8
|
+
```sh
|
|
9
|
+
npm install @grapecity-software/spread-sheets-spacing
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## 获取更多帮助
|
|
13
|
+
想需要获取更多产品信息,请浏览 [SpreadJS 主页](https://www.grapecity.com.cn/developer/spreadjs)
|
|
14
|
+
|
|
15
|
+
您可以在论坛中提出任何您使用产品过程中遇到的问题: [技术支持论坛](https://gcdn.grapecity.com.cn/showforum-232-1.html)
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
*
|
|
3
|
+
* SpreadJS Library 17.1.0
|
|
4
|
+
*
|
|
5
|
+
* Copyright(c) GrapeCity Software inc. All rights reserved.
|
|
6
|
+
*
|
|
7
|
+
* Licensed under the SpreadJS Commercial License.
|
|
8
|
+
* info.xa@grapecity.com
|
|
9
|
+
* https://www.grapecity.com.cn/developer/spreadjs
|
|
10
|
+
*
|
|
11
|
+
*/
|
|
12
|
+
!function(i){var t;"object"==typeof module&&"object"==typeof module.exports?(t=require("@grapecity-software/spread-common"),require("@grapecity-software/spread-sheets-core"),module.exports=i(t)):"function"==typeof define&&define.amd?define(["@grapecity-software/spread-common","@grapecity-software/spread-sheets-core"],i):"object"==typeof exports?(t=require("@grapecity-software/spread-common"),require("@grapecity-software/spread-sheets-core"),exports.Spread=i(t)):i(GC)}(function(t){!function(){"use strict";var n,r,i;function o(i){var t,t,t=r[i];return void 0!==t||(t=r[i]={exports:{}},n[i](t,t.exports,o)),t.exports}n={"./dist/plugins/spacing/rowSpacing.js":function(i,t,n){var e,u,o,s,r;function f(i,t,n){this.CMi=[],this.CMi[e.SheetArea.rowHeader]=this.CMi[e.SheetArea.viewport]=new e.YTe,this.HWt=[o,o,new e.ZTe(i,t),new e.ZTe(i,n)]}Object.defineProperty(t,"__esModule",{value:!0}),t.RowSpacingModel=void 0,e=n("Core"),u=n("./dist/plugins/spacing/spacing.js"),o=void 0,s=function(i){return i===e.SheetArea.corner||i===e.SheetArea.colHeader},f.prototype.add=function(i,t){this.HWt[e.SheetArea.rowHeader].rE(i,t),this.HWt[e.SheetArea.viewport].rE(i,t),this.CMi[e.SheetArea.viewport].kE(i,t)},f.prototype.getSpacingSize=function(i,t){var n;if(void 0===t&&(t=e.SheetArea.viewport),!s(t))return this.CMi[t].getSize(i)},f.prototype.setSpacingSize=function(i,t,n){var r;void 0===n&&(n=e.SheetArea.viewport),s(n)||this.CMi[n].setSize(i,t)},f.prototype.getSpacingVisible=function(i,t){var t;if(void 0===t&&(t=e.SheetArea.viewport),!s(t))return!(t=this.CMi[t])||t.getVisible(i)},f.prototype.getCount=function(i){if(void 0===i&&(i=e.SheetArea.viewport),!s(i))return this.HWt[i].getRowCount()},f.prototype.setCount=function(i){this.HWt[e.SheetArea.viewport].setRowCount(i),this.HWt[e.SheetArea.rowHeader].setRowCount(i)},f.prototype.getValue=function(i,t,n){if(void 0===n&&(n=e.SheetArea.viewport),!s(n))return this.HWt[n].getValue(i,t)},f.prototype.setValue=function(i,t,n,r){void 0===r&&(r=e.SheetArea.viewport),s(r)||this.HWt[r].setValue(i,t,n,o,o)},f.prototype.getValueForKey=function(i,t,n,r){if(void 0===n&&(n=e.SheetArea.viewport),!s(n))return this.HWt[n].getValueForKey(i,t,r)},f.prototype.setValueForKey=function(i,t,n,r,o){void 0===r&&(r=e.SheetArea.viewport),s(r)||this.HWt[r].setValueForKey(i,t,o,n)},f.prototype.getStyle=function(i,t,n){if(void 0===n&&(n=e.SheetArea.viewport),!s(n))return this.HWt[n].getStyle(i,t,o)},f.prototype.setStyle=function(i,t,n,r){void 0===r&&(r=e.SheetArea.viewport),s(r)||this.HWt[r].setStyle(i,t,n,o,o,o)},f.prototype.toJSON=function(i,t){var n,r,r;return 0<this.HWt[e.SheetArea.viewport].getRowCount()&&((n=n||{}).data=this.HWt[e.SheetArea.viewport].toJSON(e.SheetArea.viewport,i,t),n.rowHeaderData=this.HWt[e.SheetArea.rowHeader].toJSON(e.SheetArea.rowHeader,i),n.rows=this.CMi[e.SheetArea.viewport].toJSON(i),n.count=this.getCount()),n},f.prototype.fromJSON=function(i,t,n){var r,o,s,i;i&&(r=i.data,o=i.rowHeaderData,s=i.rows,i=i.count,(0,u.q8)(i)&&this.setCount(i),r&&this.HWt[e.SheetArea.viewport].fromJSON(r,t,n),o&&this.HWt[e.SheetArea.rowHeader].fromJSON(o,t,n),s)&&this.CMi[e.SheetArea.viewport].fromJSON(s)},t.RowSpacingModel=f},"./dist/plugins/spacing/spacing.js":function(i,f,t){var a,n,u,c,h,e,v,g,r,p,o;function s(i){this.ayt=i,this.Hc()}Object.defineProperty(f,"__esModule",{value:!0}),f.SpacingManager=f.q8=void 0,a=t("Core"),n=t("./dist/plugins/spacing/rowSpacing.js"),u=null,c="before",h="after",e=a.mt.V0,v=a.mt.Z0,g=function(i){return null==i},f.q8=r=function(i){return"number"==typeof i},p=function(i){return i.Ut.vFe},s.prototype.Hc=function(){this.clearRowSpacing()},s.prototype.gFe=function(i){return this.mFe[i]},s.prototype.pFe=function(i){return this.mFe[i]={},this.mFe[i]},s.prototype.bFe=function(){var i=0;return new n.RowSpacingModel(0,this.ayt.getColumnCount(a.SheetArea.rowHeader),this.ayt.getColumnCount(a.SheetArea.viewport))},s.prototype.wFe=function(i,t){var t,t=t?this.mFe[i][h]=this.bFe():this.mFe[i][c]=this.bFe();return t},s.prototype.yFe=function(i,t){var n,r,n;return this.gFe(i)||this.pFe(i),r=(r=this.getRowSpacingModel(i,t))||this.wFe(i,t)},s.prototype.getRowSpacingCount=function(i,t){var i;return this.hasRowSpacing(i,t)&&(i=this.getRowSpacingModel(i,t))?i.getCount():0},s.prototype.getRowSpacingModel=function(i,t,n){var n;return(n=void 0===n?a.SheetArea.viewport:n)===a.SheetArea.corner||n===a.SheetArea.colHeader?u:(n=this.mFe[i])?t?n[h]:n[c]:void 0},s.prototype.hasRowSpacing=function(i,t,n){return void 0===n&&(n=a.SheetArea.viewport),!!this.getRowSpacingModel(i,t,n)},s.prototype.addRowSpacing=function(i,t,n,r){var o;this.yFe(i,r).add(t,n)},s.prototype.getRowSpacingHeight=function(i,t,n,r){void 0===r&&(r=a.SheetArea.viewport);var i=this.getRowSpacingModel(i,n,r);if(i)return i.getSpacingSize(t,r)},s.prototype.setRowSpacingHeight=function(i,t,n,r){var i=this.getRowSpacingModel(i,r);i&&i.setSpacingSize(t,n)},s.prototype.getRowSpacingVisible=function(i,t,n,r){void 0===r&&(r=a.SheetArea.viewport);var i=this.getRowSpacingModel(i,n);if(i)return i.getSpacingVisible(t,r)},s.prototype.getRowSpacingValue=function(i,t,n,r,o){var i=this.getRowSpacingModel(i,r);return i?i.getValue(t,n,o):u},s.prototype.setRowSpacingValue=function(i,t,n,r,o,s){var i=this.getRowSpacingModel(i,o);i&&i.setValue(t,n,r,s)},s.prototype.getRowSpacingValueForKey=function(i,t,n,r,o,s){var i,r,i=this.getRowSpacingModel(i,r);return i?(r=i.getValueForKey(t,n,o,s),e(r)):u},s.prototype.setRowSpacingValueForKey=function(i,t,n,r,o,s,e){var i,o,i=this.getRowSpacingModel(i,o);i&&(o=v(r),i.setValueForKey(t,n,o,s,e))},s.prototype.getRowSpacingStyle=function(i,t,n,r,o){var i=this.getRowSpacingModel(i,r);return i?i.getStyle(t,n,o):u},s.prototype.setRowSpacingStyle=function(i,t,n,r,o,s){var i=this.getRowSpacingModel(i,o);i&&i.setStyle(t,n,r,s)},s.prototype.clearRowSpacing=function(){this.mFe={}},s.prototype.toJSON=function(i,t){var n,r,o,s,o,s,s;for(r in this.mFe)this.mFe[r]&&(s=(o=this.mFe[r]).before,o=o.after,s&&(s=s.toJSON(i,t))&&((n=n||{})[r]||(n[r]={}),n[r].before=s),o)&&(s=o.toJSON(i,t))&&((n=n||{})[r]||(n[r]={}),n[r].after=s);return n},s.prototype.fromJSON=function(i,t,n){var r,o,s,o,e,u;for(r in i)i[r]&&(s=(o=i[r]).before,o=o.after,s&&(e=this.yFe(Number(r))).fromJSON(s,t,n),o)&&(u=this.yFe(Number(r),!0)).fromJSON(o,t,n)},o=s,f.SpacingManager=o,a.Worksheet.ch("spacing",{toJson:function(i,t){var n,t;t&&t.gp&&(t=(n=p(this)).toJSON(t,this))&&(i.spacing=t)},fromJson:function(i,t,n){var i,r;n&&n.gp&&(i=i.spacing)&&(n.sheet||(n.sheet=this),(r=p(this)).fromJSON(i,t,n))},preProcessMouseDbClick:function(i){!i.target||g(i.target.rowSpacingIndex)||(i.r=!0)}}),a.Y8.ch("spacing",{priority:9e3,init:function(){this.vFe=new o(this)},getValue:function(i){var t,n,r,o,s,e,u,t=i.rowSpacingIndex,n;(0,f.q8)(t)&&(r=i.row,o=i.col,s=i.isAfterRowSpacing,e=i.sheetArea,u=this.vFe,i.isValueGet=!0,i.value=u.getRowSpacingValue(r,t,o,s,e))},getStyle:function(i){var t,n,r,o,s,e,u,t=i.rowSpacingIndex,n;(0,f.q8)(t)&&(r=i.row,o=i.col,s=i.isAfterRowSpacing,e=i.sheetArea,u=this.vFe,i.isStyleGet=!0,i.style=u.getRowSpacingStyle(r,t,o,s,e))}}),a.GC$.extend(a.Worksheet.prototype,{FCn:function(i,t,n){var r;return void 0===n&&(n=a.SheetArea.viewport),p(this).hasRowSpacing(i,t,n)},CFe:function(i,t,n,r){var o;this.suspendPaint(),p(this).addRowSpacing(i,t,n,r),this.Ww=!0,this.resumePaint()},MFe:function(i,t,n,r){var o,s,e,u,f,c,r;for(void 0===r&&(r=a.SheetArea.viewport),s=0,e=o=this.$L;s<e.length;s++)if(!(u=e[s]).tF(i,f={spacingIndex:t,isAfter:n}))return 0;return r=(c=p(this)).getRowSpacingHeight(i,t,n,r),r=g(r)?this.defaults.rowHeight:r},SFe:function(i,t,n,r){var o;this.suspendPaint(),p(this).setRowSpacingHeight(i,t,n,r),this.Ww=!0,this.resumePaint()},ZAe:function(i,t,n,r){var o,s,e,u,f,c,r;for(void 0===r&&(r=a.SheetArea.viewport),s=0,e=o=this.$L;s<e.length;s++)if(!(u=e[s]).tF(i,f={spacingIndex:t,isAfter:n}))return 0;return c=this.zoom(),r=this.MFe(i,t,n,r),1!==c&&(r*=c),Math.ceil(r)},PCn:function(i,t){var n,r,o,s,e,n,r=p(this).getRowSpacingModel(i,t),o=0;if(r&&0<(s=r.getCount()))for(e=0;e<s;e++)o+=this.ZAe(i,e,t);return o},C9e:function(i,t,n){var r,o,i;return void 0===n&&(n=a.SheetArea.viewport),o=0,o=(i=(r=p(this)).getRowSpacingModel(i,t,n))?i.getCount():o},AFe:function(i,t,n,r,o,s){var e,u,f,c,e;void 0===s&&(s=a.SheetArea.viewport),e=this.Ut,f=(u=p(this)).getRowSpacingCount(i,o),c=e.getRowCount(s),e=e.getColumnCount(s),i<0||c<=i||n<0||e<=n||t<0||f<=t||u.setRowSpacingValue(i,t,n,r,o,s)},xFe:function(i,t,n,r,o,s){var e,u,f,c,e;void 0===s&&(s=a.SheetArea.viewport),e=this.Ut,f=(u=p(this)).getRowSpacingCount(i,o),c=e.getRowCount(s),e=e.getColumnCount(s),i<0||c<=i||e<=n||f<=t||u.setRowSpacingStyle(i,t,n,r,o,s)},m9e:function(i){var t,n,r,o,r,t=this._y(3);if(t&&0<t.length)for(n=0;n<t.length;n++)if(r=t[n]){if(o=r.y,r=r.height,i<o)break;if(o<i&&i<o+r)return!0}return!1},l9e:function(i,t){var i=this.p9e(i,t);if(i)return i.spacingIndex},h9e:function(i,t){var i=this.p9e(i,t);if(i)return i.isAfterSpacing},QAe:function(i,t,n){var r,o,r,o;return t===p(this).getRowSpacingCount(i,n)-1},TFe:function(i,t,n,r,o,s){var e;return void 0===o&&(o=a.SheetArea.viewport),p(this).getRowSpacingValueForKey(i,t,n,r,o,s=void 0===s?"tag":s)},IFe:function(i,t,n,r,o,s,e){var u;void 0===s&&(s=a.SheetArea.viewport),p(this).setRowSpacingValueForKey(i,t,n,r,o,s,e=void 0===e?"tag":e)},kFe:function(){var i;p(this).clearRowSpacing()},NFe:function(i,t,n,r){var o,s,e,u,f,c;for(void 0===r&&(r=a.SheetArea.viewport),o=p(this),e=0,u=s=this.$L;e<u.length;e++)if(!(f=u[e]).tF(i,c={spacingIndex:t,isAfter:n}))return!1;return o.getRowSpacingVisible(i,t,n,r)},S9e:function(i,t,n){var r,o,s,e;if((n=void 0===n?a.SheetArea.viewport:n)===a.SheetArea.colHeader||n===a.SheetArea.corner)return!0;if(o=(r=p(this)).getRowSpacingModel(i,t)){for(s=o.getCount(),e=0;e<s;e++)if(this.NFe(i,e,t,n)&&this.ZAe(i,e,t,n))return!0;return!1}}}),a.GC$.extend(a.Yx.prototype,{WAe:function(i,t,n,r){var o,s,r,e,n,i,s,e,o=(r=void 0===r?{}:r).rowSpacingIndex,s=r.isAfterRowSpacing,r=r.noCreate;if(!(e=n[i])){if(r)return u;n[i]=e={}}if(!(i=e[n=s?h:c])){if(r)return u;e[n]=i={}}if(!(s=i[o])){if(r)return u;i[o]=s={}}if(!(e=s[t])){if(r)return u;s[t]=e={}}return e},JAe:function(i,t){var n,r,o,s,e,u,f,c,a,h,v;for(n in t)if(t[n])for(o in r=t[n])if(r[o])for(e in s=r[o])if(s[e])for(f in u=s[e])if(u[f])if(a=(c=u[f]).line,(h=c.splitLines)&&0<h.length)for(v=0;v<h.length;v++)h[v]&&h[v]._e(i);else a&&a._e(i)}})},Core:function(i){i.exports=t.Spread.Sheets}},r={},i=o("./dist/plugins/spacing/spacing.js"),(((t=void 0===t?{}:t).Spread=t.Spread||{}).Sheets=t.Spread.Sheets||{}).Spacing=i}()});
|
package/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('./dist/gc.spread.sheets.spacing.min.js');
|
package/package.json
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@grapecity-software/spread-sheets-spacing",
|
|
3
|
+
"version": "17.1.0",
|
|
4
|
+
"main": "index.js",
|
|
5
|
+
"description":"SpreadJS spacing module",
|
|
6
|
+
"scripts": {},
|
|
7
|
+
"keywords": [
|
|
8
|
+
"spread-sheets-spacing",
|
|
9
|
+
"spreadjs-sheets-spacing",
|
|
10
|
+
"spacing",
|
|
11
|
+
"spread",
|
|
12
|
+
"sheet",
|
|
13
|
+
"javascript",
|
|
14
|
+
"excel",
|
|
15
|
+
"grapecity software",
|
|
16
|
+
"spreadjs"
|
|
17
|
+
],
|
|
18
|
+
"dependencies": {
|
|
19
|
+
"@grapecity-software/spread-sheets-core": "17.1.0"
|
|
20
|
+
},
|
|
21
|
+
"author": {
|
|
22
|
+
"email": "info.xa@grapecity.com",
|
|
23
|
+
"name": "GrapeCity Software inc"
|
|
24
|
+
},
|
|
25
|
+
"homepage": "http://www.grapecity.com.cn/",
|
|
26
|
+
"license": "Commercial"
|
|
27
|
+
}
|