@univerjs-pro/sheets-pivot 0.6.0 → 0.6.1
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/lib/cjs/facade.js +1 -1
- package/lib/cjs/index.js +1 -1
- package/lib/cjs/locale/en-US.js +1 -1
- package/lib/cjs/locale/fa-IR.js +1 -1
- package/lib/cjs/locale/fr-FR.js +1 -1
- package/lib/cjs/locale/ru-RU.js +1 -1
- package/lib/cjs/locale/vi-VN.js +1 -1
- package/lib/cjs/locale/zh-CN.js +1 -1
- package/lib/cjs/locale/zh-TW.js +1 -1
- package/lib/es/facade.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/es/locale/en-US.js +1 -1
- package/lib/es/locale/fa-IR.js +1 -1
- package/lib/es/locale/fr-FR.js +1 -1
- package/lib/es/locale/ru-RU.js +1 -1
- package/lib/es/locale/vi-VN.js +1 -1
- package/lib/es/locale/zh-CN.js +1 -1
- package/lib/es/locale/zh-TW.js +1 -1
- package/lib/types/common/const.d.ts +40 -40
- package/lib/types/const/type.d.ts +2 -0
- package/lib/types/controllers/const.d.ts +1 -1
- package/lib/types/controllers/sheets-pivot-caculate.controller.d.ts +7 -2
- package/lib/types/facade/f-generic-pivot-table.d.ts +270 -0
- package/lib/types/facade/f-pivot-table.d.ts +1 -1
- package/lib/types/facade/f-univer.d.ts +33 -1
- package/lib/types/facade/type.d.ts +114 -0
- package/lib/types/facade/util.d.ts +8 -0
- package/lib/types/models/sheets-pivot-config-model.d.ts +6 -2
- package/lib/umd/facade.js +1 -1
- package/lib/umd/index.js +1 -1
- package/lib/umd/locale/en-US.js +1 -1
- package/lib/umd/locale/fa-IR.js +1 -1
- package/lib/umd/locale/fr-FR.js +1 -1
- package/lib/umd/locale/ru-RU.js +1 -1
- package/lib/umd/locale/vi-VN.js +1 -1
- package/lib/umd/locale/zh-CN.js +1 -1
- package/lib/umd/locale/zh-TW.js +1 -1
- package/package.json +12 -12
package/lib/es/locale/en-US.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x49daa8=_0x2b06;function _0x3d89(){const _0x3a5fb6=['4817772lbttov','StdDevp\x20of\x20','1979650bCNjhn','StdDev\x20of\x20','5851041UTPVtQ','15PhvMDr','Min\x20of\x20','Var\x20of\x20','Value','16pKtNFr','Grand\x20Total','Filter','1535304bfkoXm','Column','(Blank)','Values','blank','Row','value','6857994EXslZO','1512691vAiZdx','Count\x20of\x20','Product\x20of\x20','Varp\x20of\x20','Column\x20','Total','997320nTVVvV'];_0x3d89=function(){return _0x3a5fb6;};return _0x3d89();}function _0x2b06(_0x4a07d0,_0x2a90a5){const _0x3d8913=_0x3d89();return _0x2b06=function(_0x2b060f,_0x3f17c8){_0x2b060f=_0x2b060f-0x12b;let _0x5a2f75=_0x3d8913[_0x2b060f];return _0x5a2f75;},_0x2b06(_0x4a07d0,_0x2a90a5);}(function(_0x93920,_0x1b204f){const _0x591b01=_0x2b06,_0x1b6b1c=_0x93920();while(!![]){try{const _0x4e960c=parseInt(_0x591b01(0x13f))/0x1+parseInt(_0x591b01(0x12d))/0x2+parseInt(_0x591b01(0x137))/0x3+parseInt(_0x591b01(0x145))/0x4*(-parseInt(_0x591b01(0x130))/0x5)+-parseInt(_0x591b01(0x13e))/0x6+parseInt(_0x591b01(0x12f))/0x7+parseInt(_0x591b01(0x134))/0x8*(-parseInt(_0x591b01(0x12b))/0x9);if(_0x4e960c===_0x1b204f)break;else _0x1b6b1c['push'](_0x1b6b1c['shift']());}catch(_0x426a14){_0x1b6b1c['push'](_0x1b6b1c['shift']());}}}(_0x3d89,0xd8ede));const a={'sheets-pivot':{'blankValue':_0x49daa8(0x139),'columnName':_0x49daa8(0x143),'subTotalText':_0x49daa8(0x144),'grandTotalText':_0x49daa8(0x135),'valueText':_0x49daa8(0x133),'averageName':'Average\x20of\x20','countName':_0x49daa8(0x140),'countNumsName':_0x49daa8(0x140),'maxName':'Max\x20of\x20','minName':_0x49daa8(0x131),'productName':_0x49daa8(0x141),'stdDevName':_0x49daa8(0x12e),'stdDevpName':_0x49daa8(0x12c),'sumName':'Sum\x20of\x20','varName':_0x49daa8(0x132),'varpName':_0x49daa8(0x142),'subTotal':'Subtotal','grandTotal':'Grand\x20Total','value':_0x49daa8(0x13d),'blank':_0x49daa8(0x13b),'emptyPivot':{'filter':_0x49daa8(0x136),'row':_0x49daa8(0x13c),'column':_0x49daa8(0x138),'values':_0x49daa8(0x13a)}}};export{a as default};
|
package/lib/es/locale/fa-IR.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x535ca7=_0x4dea;(function(_0x166352,_0x304222){const _0x2ba928=_0x4dea,_0x1ccf5d=_0x166352();while(!![]){try{const _0x515964=-parseInt(_0x2ba928(0x169))/0x1*(parseInt(_0x2ba928(0x162))/0x2)+-parseInt(_0x2ba928(0x172))/0x3+-parseInt(_0x2ba928(0x176))/0x4*(-parseInt(_0x2ba928(0x16e))/0x5)+-parseInt(_0x2ba928(0x164))/0x6+parseInt(_0x2ba928(0x16f))/0x7+-parseInt(_0x2ba928(0x177))/0x8*(-parseInt(_0x2ba928(0x16a))/0x9)+parseInt(_0x2ba928(0x168))/0xa;if(_0x515964===_0x304222)break;else _0x1ccf5d['push'](_0x1ccf5d['shift']());}catch(_0x14530c){_0x1ccf5d['push'](_0x1ccf5d['shift']());}}}(_0x5660,0x914fc));const a={'sheets-pivot':{'blankValue':_0x535ca7(0x16d),'columnName':_0x535ca7(0x165),'subTotalText':_0x535ca7(0x174),'grandTotalText':'کل','valueText':_0x535ca7(0x173),'averageName':_0x535ca7(0x16b),'countName':_0x535ca7(0x161),'countNumsName':_0x535ca7(0x170),'maxName':_0x535ca7(0x166),'minName':_0x535ca7(0x163),'productName':'ضرب\x20از\x20','stdDevName':_0x535ca7(0x167),'stdDevpName':_0x535ca7(0x16c),'sumName':_0x535ca7(0x17a),'varName':_0x535ca7(0x178),'varpName':'واریانس\x20کلی\x20از\x20','subTotal':_0x535ca7(0x174),'grandTotal':'کل','value':_0x535ca7(0x173),'blank':'خالی','emptyPivot':{'filter':_0x535ca7(0x179),'row':'سطر','column':_0x535ca7(0x175),'values':_0x535ca7(0x171)}}};function _0x5660(){const _0x413ac3=['مقدار','جمع','ستون','40vuDTxZ','232EAtsUX','واریانس\x20از\x20','فیلتر','جمع\x20از\x20','تعداد\x20از\x20','2VipNhf','کمترین\x20از\x20','5571828dQtBMX','ستون\x20','بیشترین\x20از\x20','انحراف\x20معیار\x20از\x20','4397770JjWckP','460637fUeLLa','53208LabNIT','میانگین\x20از\x20','انحراف\x20معیار\x20کلی\x20از\x20','(خالی)','129785vtKcnE','8033445xFgAHX','تعداد\x20اعداد\x20از\x20','مقادیر','101877iXwdby'];_0x5660=function(){return _0x413ac3;};return _0x5660();}function _0x4dea(_0x12a7a2,_0x3ad385){const _0x5660a4=_0x5660();return _0x4dea=function(_0x4dea40,_0x199e70){_0x4dea40=_0x4dea40-0x161;let _0x1fa929=_0x5660a4[_0x4dea40];return _0x1fa929;},_0x4dea(_0x12a7a2,_0x3ad385);}export{a as default};
|
package/lib/es/locale/fr-FR.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function _0x38a3(){const _0x203670=['Count\x20of\x20','24gpdeXD','1491156jFVxoZ','Value','Varp\x20of\x20','149615DnsswJ','24TdNCaU','Subtotal','Filter','StdDev\x20of\x20','Average\x20of\x20','24hnxZHz','12048993dCJcVM','2hBpnWC','Sum\x20of\x20','76527TAwmHf','(Blank)','Max\x20of\x20','value','StdDevp\x20of\x20','130039yhktXW','Values','Min\x20of\x20','Product\x20of\x20','4719130GtdzLW','Row','776214FaEkcd','Column','Grand\x20Total'];_0x38a3=function(){return _0x203670;};return _0x38a3();}function _0x7fe2(_0x11050a,_0x399533){const _0x38a3f2=_0x38a3();return _0x7fe2=function(_0x7fe2c3,_0x28313a){_0x7fe2c3=_0x7fe2c3-0x194;let _0x5b639a=_0x38a3f2[_0x7fe2c3];return _0x5b639a;},_0x7fe2(_0x11050a,_0x399533);}const _0x391ab0=_0x7fe2;(function(_0x106da0,_0x3c5c92){const _0x523ce0=_0x7fe2,_0x1609b2=_0x106da0();while(!![]){try{const _0x5387dd=-parseInt(_0x523ce0(0x197))/0x1+-parseInt(_0x523ce0(0x195))/0x2*(-parseInt(_0x523ce0(0x1a2))/0x3)+parseInt(_0x523ce0(0x1ab))/0x4*(parseInt(_0x523ce0(0x1aa))/0x5)+parseInt(_0x523ce0(0x1b0))/0x6*(parseInt(_0x523ce0(0x19c))/0x7)+parseInt(_0x523ce0(0x1a6))/0x8*(parseInt(_0x523ce0(0x1a7))/0x9)+parseInt(_0x523ce0(0x1a0))/0xa+-parseInt(_0x523ce0(0x194))/0xb;if(_0x5387dd===_0x3c5c92)break;else _0x1609b2['push'](_0x1609b2['shift']());}catch(_0x3c7b8b){_0x1609b2['push'](_0x1609b2['shift']());}}}(_0x38a3,0x4b99b));const a={'sheets-pivot':{'blankValue':_0x391ab0(0x198),'columnName':'Column\x20','subTotalText':'Total','grandTotalText':_0x391ab0(0x1a4),'valueText':_0x391ab0(0x1a8),'averageName':_0x391ab0(0x1af),'countName':_0x391ab0(0x1a5),'countNumsName':_0x391ab0(0x1a5),'maxName':_0x391ab0(0x199),'minName':_0x391ab0(0x19e),'productName':_0x391ab0(0x19f),'stdDevName':_0x391ab0(0x1ae),'stdDevpName':_0x391ab0(0x19b),'sumName':_0x391ab0(0x196),'varName':'Var\x20of\x20','varpName':_0x391ab0(0x1a9),'subTotal':_0x391ab0(0x1ac),'grandTotal':_0x391ab0(0x1a4),'value':_0x391ab0(0x19a),'blank':'blank','emptyPivot':{'filter':_0x391ab0(0x1ad),'row':_0x391ab0(0x1a1),'column':_0x391ab0(0x1a3),'values':_0x391ab0(0x19d)}}},e=a;export{e as default};
|
package/lib/es/locale/ru-RU.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function _0x3517(){const _0x4a45c3=['20nBPrss','Сумма\x20по\x20','Стандартное\x20отклонение\x20по\x20','10rzbfnN','(Пусто)','Промежуточный\x20итог','5979908VIKniK','Строка','2528082Alxtzc','Число\x20по\x20','19576XyCQhO','Столбец\x20','Минимум\x20по\x20','Общий\x20итог','52313RWqmTZ','Среднее\x20по\x20','226683bBLzQn','Пусто','Столбец','Дисперсия\x20по\x20','Фильтр','718224RNOPST','Произведение\x20по\x20','310MNQkkl','Значение','1553144nvszSK','14BwcTgY'];_0x3517=function(){return _0x4a45c3;};return _0x3517();}const _0x57c4e1=_0x1bcf;(function(_0x56c18c,_0x3b4efb){const _0x1ec187=_0x1bcf,_0x404dec=_0x56c18c();while(!![]){try{const _0x39e947=parseInt(_0x1ec187(0x17c))/0x1*(parseInt(_0x1ec187(0x171))/0x2)+-parseInt(_0x1ec187(0x183))/0x3+parseInt(_0x1ec187(0x178))/0x4*(-parseInt(_0x1ec187(0x185))/0x5)+parseInt(_0x1ec187(0x176))/0x6+parseInt(_0x1ec187(0x188))/0x7*(-parseInt(_0x1ec187(0x187))/0x8)+-parseInt(_0x1ec187(0x17e))/0x9*(-parseInt(_0x1ec187(0x189))/0xa)+parseInt(_0x1ec187(0x174))/0xb;if(_0x39e947===_0x3b4efb)break;else _0x404dec['push'](_0x404dec['shift']());}catch(_0x22bfbd){_0x404dec['push'](_0x404dec['shift']());}}}(_0x3517,0x546c0));function _0x1bcf(_0xa11ee0,_0xecf130){const _0x35172e=_0x3517();return _0x1bcf=function(_0x1bcf58,_0x584ffa){_0x1bcf58=_0x1bcf58-0x16f;let _0x20bad4=_0x35172e[_0x1bcf58];return _0x20bad4;},_0x1bcf(_0xa11ee0,_0xecf130);}const a={'sheets-pivot':{'blankValue':_0x57c4e1(0x172),'columnName':_0x57c4e1(0x179),'subTotalText':'Промежуточный\x20итог','grandTotalText':_0x57c4e1(0x17b),'valueText':_0x57c4e1(0x186),'averageName':_0x57c4e1(0x17d),'countName':'Количество\x20по\x20','countNumsName':_0x57c4e1(0x177),'maxName':'Максимум\x20по\x20','minName':_0x57c4e1(0x17a),'productName':_0x57c4e1(0x184),'stdDevName':_0x57c4e1(0x170),'stdDevpName':'Общее\x20стандартное\x20отклонение\x20по\x20','sumName':_0x57c4e1(0x16f),'varName':_0x57c4e1(0x181),'varpName':'Общая\x20дисперсия\x20по\x20','subTotal':_0x57c4e1(0x173),'grandTotal':'Общий\x20итог','value':_0x57c4e1(0x186),'blank':_0x57c4e1(0x17f),'emptyPivot':{'filter':_0x57c4e1(0x182),'row':_0x57c4e1(0x175),'column':_0x57c4e1(0x180),'values':'Значение'}}};export{a as default};
|
package/lib/es/locale/vi-VN.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function _0x607d(_0xa84076,_0x3d4034){const _0x5f0abb=_0x5f0a();return _0x607d=function(_0x607d70,_0x15cb13){_0x607d70=_0x607d70-0xac;let _0x4ba938=_0x5f0abb[_0x607d70];return _0x4ba938;},_0x607d(_0xa84076,_0x3d4034);}const _0x521a96=_0x607d;(function(_0x3ee90f,_0x5809c2){const _0x20bef4=_0x607d,_0xc2462=_0x3ee90f();while(!![]){try{const _0x48cfbf=-parseInt(_0x20bef4(0xb4))/0x1+parseInt(_0x20bef4(0xc0))/0x2+parseInt(_0x20bef4(0xad))/0x3+parseInt(_0x20bef4(0xaf))/0x4*(-parseInt(_0x20bef4(0xbe))/0x5)+parseInt(_0x20bef4(0xb5))/0x6+parseInt(_0x20bef4(0xba))/0x7*(parseInt(_0x20bef4(0xb0))/0x8)+parseInt(_0x20bef4(0xb6))/0x9*(-parseInt(_0x20bef4(0xbc))/0xa);if(_0x48cfbf===_0x5809c2)break;else _0xc2462['push'](_0xc2462['shift']());}catch(_0x3a8d0a){_0xc2462['push'](_0xc2462['shift']());}}}(_0x5f0a,0x33c80));const a={'sheets-pivot':{'blankValue':_0x521a96(0xbb),'columnName':'Cột\x20','subTotalText':_0x521a96(0xc1),'grandTotalText':_0x521a96(0xb7),'valueText':'Giá\x20trị','averageName':_0x521a96(0xc2),'countName':_0x521a96(0xb8),'countNumsName':'Số\x20lượng\x20số:','maxName':_0x521a96(0xae),'minName':_0x521a96(0xc4),'productName':_0x521a96(0xbd),'stdDevName':'Độ\x20lệch\x20chuẩn:','stdDevpName':'Độ\x20lệch\x20chuẩn\x20toàn\x20phần:','sumName':_0x521a96(0xc3),'varName':_0x521a96(0xb3),'varpName':_0x521a96(0xb1),'subTotal':'Tổng\x20phụ','grandTotal':'Tổng\x20cộng','value':'Giá\x20trị','blank':_0x521a96(0xac),'emptyPivot':{'filter':_0x521a96(0xb9),'row':'Hàng','column':_0x521a96(0xb2),'values':_0x521a96(0xbf)}}};export{a as default};function _0x5f0a(){const _0x13fbb9=['Trống','1111482swHqGr','Giá\x20trị\x20tối\x20đa:','311964wdVbXT','32dORuZa','Phương\x20sai\x20toàn\x20phần:','Cột','Phương\x20sai:','9271jZkSAm','548520PdXnrm','12753jXlWKN','Tổng\x20cộng','Số\x20lượng:','Lọc','212303IVRGIq','(Trống)','4170hGhYPi','Tích:','5lGUHau','Giá\x20trị','614034XKbLoi','Tổng\x20phụ','Giá\x20trị\x20trung\x20bình:','Tổng:','Giá\x20trị\x20tối\x20thiểu:'];_0x5f0a=function(){return _0x13fbb9;};return _0x5f0a();}
|
package/lib/es/locale/zh-CN.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function _0x2975(){const _0x366985=['24878XnoIQD','582432mFTNvh','平均值项:','最小值项:','132ddPEmb','标准偏差项:','81QlpMnw','2170784OShuNp','(空白)','数值计数项:','4259240OXLuqP','1375730HuTFJa','总体方差项:','乘积项:','计数项:','2158864RNvCss','2010588FhjVhD','求和项:'];_0x2975=function(){return _0x366985;};return _0x2975();}const _0x5d3a52=_0x3b40;function _0x3b40(_0x23dd30,_0x18d029){const _0x29752b=_0x2975();return _0x3b40=function(_0x3b40f7,_0x2e1e62){_0x3b40f7=_0x3b40f7-0x10f;let _0x2d1d60=_0x29752b[_0x3b40f7];return _0x2d1d60;},_0x3b40(_0x23dd30,_0x18d029);}(function(_0x43e615,_0x284392){const _0x25cd51=_0x3b40,_0x2ce2fd=_0x43e615();while(!![]){try{const _0x5609b1=-parseInt(_0x25cd51(0x11a))/0x1+-parseInt(_0x25cd51(0x112))/0x2+parseInt(_0x25cd51(0x117))/0x3+-parseInt(_0x25cd51(0x120))/0x4+-parseInt(_0x25cd51(0x111))/0x5+-parseInt(_0x25cd51(0x11d))/0x6*(-parseInt(_0x25cd51(0x119))/0x7)+-parseInt(_0x25cd51(0x116))/0x8*(-parseInt(_0x25cd51(0x11f))/0x9);if(_0x5609b1===_0x284392)break;else _0x2ce2fd['push'](_0x2ce2fd['shift']());}catch(_0x193334){_0x2ce2fd['push'](_0x2ce2fd['shift']());}}}(_0x2975,0x7d109));const a={'sheets-pivot':{'blankValue':_0x5d3a52(0x10f),'columnName':'列\x20','subTotalText':'汇总','grandTotalText':'总计','valueText':'值','averageName':_0x5d3a52(0x11b),'countName':_0x5d3a52(0x115),'countNumsName':_0x5d3a52(0x110),'maxName':'最大值项:','minName':_0x5d3a52(0x11c),'productName':_0x5d3a52(0x114),'stdDevName':_0x5d3a52(0x11e),'stdDevpName':'总体标准偏差项:','sumName':_0x5d3a52(0x118),'varName':'方差项:','varpName':_0x5d3a52(0x113),'subTotal':'汇总','grandTotal':'总计','value':'值','blank':'空白','emptyPivot':{'filter':'筛选','row':'行','column':'列','values':'值'}}};export{a as default};
|
package/lib/es/locale/zh-TW.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x443071=_0x1246;(function(_0x53d46d,_0x3854b2){const _0xc93b81=_0x1246,_0x58b7af=_0x53d46d();while(!![]){try{const _0x4fba53=-parseInt(_0xc93b81(0x16a))/0x1+-parseInt(_0xc93b81(0x169))/0x2+-parseInt(_0xc93b81(0x15d))/0x3+parseInt(_0xc93b81(0x16b))/0x4*(parseInt(_0xc93b81(0x15f))/0x5)+parseInt(_0xc93b81(0x16c))/0x6*(parseInt(_0xc93b81(0x161))/0x7)+parseInt(_0xc93b81(0x162))/0x8*(-parseInt(_0xc93b81(0x16e))/0x9)+parseInt(_0xc93b81(0x16d))/0xa*(parseInt(_0xc93b81(0x16f))/0xb);if(_0x4fba53===_0x3854b2)break;else _0x58b7af['push'](_0x58b7af['shift']());}catch(_0x5173ae){_0x58b7af['push'](_0x58b7af['shift']());}}}(_0x1f8d,0x81991));function _0x1246(_0x2dd109,_0x2debe9){const _0x1f8da3=_0x1f8d();return _0x1246=function(_0x12463b,_0x2a6022){_0x12463b=_0x12463b-0x15d;let _0x2b5452=_0x1f8da3[_0x12463b];return _0x2b5452;},_0x1246(_0x2dd109,_0x2debe9);}function _0x1f8d(){const _0x77fdb=['總體標準差項:','2450CvFAOt','方差項:','5453zrPnPP','21728ITDpwu','最小值項:','計數項:','求和項:','最大值項:','平均值項:','(空白)','333372tzmARw','27285CNVFco','3896ekeACq','318xhAWUL','1790wprnJK','441UIIImE','59609bIZlFo','總體方差項:','1891980dqyqFR'];_0x1f8d=function(){return _0x77fdb;};return _0x1f8d();}const a={'sheets-pivot':{'blankValue':_0x443071(0x168),'columnName':'欄\x20','subTotalText':'小計','grandTotalText':'總計','valueText':'值','averageName':_0x443071(0x167),'countName':_0x443071(0x164),'countNumsName':'數值計數項:','maxName':_0x443071(0x166),'minName':_0x443071(0x163),'productName':'乘積項:','stdDevName':'標準差項:','stdDevpName':_0x443071(0x15e),'sumName':_0x443071(0x165),'varName':_0x443071(0x160),'varpName':_0x443071(0x170),'subTotal':'小計','grandTotal':'總計','value':'值','blank':'空白','emptyPivot':{'filter':'篩選','row':'行','column':'欄','values':'值'}}};export{a as default};
|
|
@@ -9,56 +9,56 @@ export declare const ReverseMap: {
|
|
|
9
9
|
"7": string;
|
|
10
10
|
"8": string;
|
|
11
11
|
"9": string;
|
|
12
|
-
q: string;
|
|
13
|
-
J: string;
|
|
14
|
-
D: string;
|
|
15
|
-
G: string;
|
|
16
|
-
h: string;
|
|
17
|
-
k: string;
|
|
18
|
-
d: string;
|
|
19
|
-
A: string;
|
|
20
|
-
X: string;
|
|
21
|
-
c: string;
|
|
22
12
|
y: string;
|
|
13
|
+
p: string;
|
|
14
|
+
N: string;
|
|
15
|
+
B: string;
|
|
16
|
+
X: string;
|
|
17
|
+
E: string;
|
|
23
18
|
w: string;
|
|
24
19
|
m: string;
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
r: string;
|
|
20
|
+
J: string;
|
|
21
|
+
q: string;
|
|
22
|
+
c: string;
|
|
29
23
|
g: string;
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
24
|
+
K: string;
|
|
25
|
+
W: string;
|
|
26
|
+
r: string;
|
|
27
|
+
o: string;
|
|
34
28
|
L: string;
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
u: string;
|
|
38
|
-
R: string;
|
|
39
|
-
H: string;
|
|
40
|
-
t: string;
|
|
41
|
-
E: string;
|
|
42
|
-
P: string;
|
|
29
|
+
F: string;
|
|
30
|
+
l: string;
|
|
43
31
|
j: string;
|
|
44
|
-
K: string;
|
|
45
|
-
n: string;
|
|
46
32
|
I: string;
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
33
|
+
Y: string;
|
|
34
|
+
b: string;
|
|
35
|
+
u: string;
|
|
36
|
+
O: string;
|
|
51
37
|
V: string;
|
|
52
|
-
|
|
53
|
-
|
|
38
|
+
v: string;
|
|
39
|
+
t: string;
|
|
40
|
+
d: string;
|
|
41
|
+
U: string;
|
|
42
|
+
H: string;
|
|
43
|
+
e: string;
|
|
44
|
+
i: string;
|
|
45
|
+
R: string;
|
|
46
|
+
G: string;
|
|
54
47
|
Q: string;
|
|
55
48
|
Z: string;
|
|
56
|
-
z: string;
|
|
57
49
|
T: string;
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
o: string;
|
|
50
|
+
D: string;
|
|
51
|
+
a: string;
|
|
61
52
|
s: string;
|
|
62
|
-
|
|
63
|
-
|
|
53
|
+
h: string;
|
|
54
|
+
f: string;
|
|
55
|
+
A: string;
|
|
56
|
+
C: string;
|
|
57
|
+
P: string;
|
|
58
|
+
k: string;
|
|
59
|
+
n: string;
|
|
60
|
+
z: string;
|
|
61
|
+
S: string;
|
|
62
|
+
x: string;
|
|
63
|
+
M: string;
|
|
64
64
|
};
|
|
@@ -318,11 +318,13 @@ export interface IGetAddPivotTableDataParams {
|
|
|
318
318
|
sourceRangeInfo: IUnitRangeName & {
|
|
319
319
|
subUnitId: string;
|
|
320
320
|
};
|
|
321
|
+
pivotTableId: string;
|
|
321
322
|
}
|
|
322
323
|
export interface IGetAddPivotTableWithConfigDataParams {
|
|
323
324
|
sourceRangeInfo: IUnitRangeName & {
|
|
324
325
|
subUnitId: string;
|
|
325
326
|
};
|
|
327
|
+
pivotTableId: string;
|
|
326
328
|
pivotTableIndexConfig: {
|
|
327
329
|
filters?: IPivotFieldConfig[];
|
|
328
330
|
rows?: IPivotFieldConfig[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const getLsInfoFuncStr = "
|
|
1
|
+
export declare const getLsInfoFuncStr = "W7Yc0L4Y gKcuV50L4Y(jLcKY6K, 57qjLcTKV) { 0uV { c4Y60 jLcKY6KQYW4hJu0tuuJV = jLcKY6K.65jL0('-'); c4Y60 4uLrLYaK66JrK = ZCs3.5Ju6K(J04q(jLcKY6KQYW4hJu0tuuJV[N])); LW (!4uLrLYaK66JrK.7g) { 4uLrLYaK66JrK.7g = 37IqKu(jLcKY6KQYW4hJu0tuuJV[B]); } c4Y60 L6z4ulKu = 0V5K4W z4ulKuRj4qJjCc45K !== '7YgKWLYKg' && 6KjW LY60JYcK4W z4ulKuRj4qJjCc45K; c4Y60 c4Y0K10 = L6z4ulKu ? 6KjW : 8LYg48; c4Y60 IK66JrKz4ug = c4Y0K10.__dJ6KEB__.5Ju6K(jLcKY6KQYW4hJu0tuuJV[N]); c4Y60 IK66JrK = c4Y0K10.__GK1__.60uLYrLWV(IK66JrKz4ug); c4Y60 6LrYJ07uKz4ug = c4Y0K10.__dJ6KEB__.5Ju6K(jLcKY6KQYW4hJu0tuuJV[9]); c4Y60 6LrYJ07uK = c4Y0K10.__GK1__.60uLYrLWV(6LrYJ07uKz4ug); c4Y60 6LrYnJjLg = c4Y0K10.__OKuLWV__(6LrYJ07uK, IK66JrK, 57qjLcTKV); c4Y60 g4IJLY = 4uLrLYaK66JrK.gI; W7Yc0L4Y L6H4IJLYaJ0coLYr(4hJ00KuY, 4G460) { c4Y60 5J00KuY = 4hJ00KuY.uK5jJcK(/^.+/, ''); c4Y60 o460 = 4G460.uK5jJcK(/^.+/, ''); c4Y60 5J00KuYhJu06 = 5J00KuY.65jL0('.'); c4Y60 o460hJu06 = o460.65jL0('.'); LW (!5J00KuY.LYcj7gK6('*')) { uK07uY 5J00KuY === o460; } LW (5J00KuYhJu06.jKYr0o < N || 5J00KuYhJu06[y] !== '*') { uK07uY WJj6K; } c4Y60 5J00KuYC7WWL1 = 5J00KuYhJu06.6jLcK(p).F4LY('.'); c4Y60 o460C7WWL1 = o460hJu06.6jLcK(-5J00KuYhJu06.jKYr0o + p).F4LY('.'); uK07uY 5J00KuYC7WWL1 === o460C7WWL1; } jK0 g4IJLYnJjLg = (g4IJLY && g4IJLY.jKYr0o) ? g4IJLY.64IK((gIQ0KI) => L6H4IJLYaJ0coLYr(gIQ0KI, j4cJ0L4Y.o460YJIK)) : 0u7K; LW (j4cJ0L4Y.o460YJIK === 'j4cJjo460') { g4IJLYnJjLg = 0u7K; } c4Y60 OJjLg = 6LrYnJjLg && g4IJLYnJjLg; uK07uY { OJjLg, IK66JrK: 4uLrLYaK66JrK, }; } cJ0co (Kuu4u) { uK07uY { OJjLg: WJj6K, IK66JrK: {}, }; }}";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IAllRuntimeData, IFeatureDirtyRangeType, IRuntimeUnitDataType, IFeatureCalculationManagerService } from '@univerjs/engine-formula';
|
|
1
|
+
import { IAllRuntimeData, IFeatureDirtyRangeType, IRuntimeUnitDataType, GlobalComputingStatusService, IFeatureCalculationManagerService } from '@univerjs/engine-formula';
|
|
2
2
|
import { ICurrentDataMatrix, IPivotCellPositionInfo, IUnitRangeNameWithSubUnitId } from '../const/type';
|
|
3
3
|
import { Disposable, ICommandService, IConfigService, Injector } from '@univerjs/core';
|
|
4
4
|
import { SheetsPivotDataSourceModel } from '../models/sheets-pivot-data-source-model';
|
|
@@ -12,9 +12,14 @@ export declare class PivotCalculatorController extends Disposable {
|
|
|
12
12
|
private readonly _configService;
|
|
13
13
|
readonly _featureCalculationManagerService: IFeatureCalculationManagerService;
|
|
14
14
|
private readonly _commandService;
|
|
15
|
+
private readonly _globalComputingSrv;
|
|
15
16
|
private readonly _injector;
|
|
16
|
-
constructor(_sheetsPivotDataSourceModel: SheetsPivotDataSourceModel, _configService: IConfigService, _featureCalculationManagerService: IFeatureCalculationManagerService, _commandService: ICommandService, _injector: Injector);
|
|
17
|
+
constructor(_sheetsPivotDataSourceModel: SheetsPivotDataSourceModel, _configService: IConfigService, _featureCalculationManagerService: IFeatureCalculationManagerService, _commandService: ICommandService, _globalComputingSrv: GlobalComputingStatusService, _injector: Injector);
|
|
17
18
|
_init(): void;
|
|
19
|
+
private _globalSubject;
|
|
20
|
+
private _globalComputedStartHelpFunc;
|
|
21
|
+
private _globalComputedEndHelpFunc;
|
|
22
|
+
private _initGlobalComputed;
|
|
18
23
|
private _initPivotDataGetListener;
|
|
19
24
|
private _initPivotTextInfo;
|
|
20
25
|
_subjectCollectionChange(): void;
|
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
import { IDataFieldValue, IPivotTableOptions, IPivotViewValueType, PivotTable, PivotTableLabelField, PivotTableValueField, DataFieldManager, PivotDataFieldDataTypeEnum, PivotTableFiledAreaEnum } from '@univerjs-pro/engine-pivot';
|
|
2
|
+
import { Injector } from '@univerjs/core';
|
|
3
|
+
import { IDataFieldDataArray, IDimensionInfo, IFGenericPivotFilterOptions, IPivotTableCubeConfig, IPivotTableValueOptions } from './type';
|
|
4
|
+
/**
|
|
5
|
+
* Pivot table class (not dependent on workbook)
|
|
6
|
+
* @hideconstructor
|
|
7
|
+
*/
|
|
8
|
+
export declare class FGenericPivotTable {
|
|
9
|
+
private _pivot;
|
|
10
|
+
private _sourceData;
|
|
11
|
+
private _injector;
|
|
12
|
+
private _isZhCN;
|
|
13
|
+
private _id;
|
|
14
|
+
constructor(injector: Injector, pivot: PivotTable, sourceData: IDataFieldDataArray, id: string);
|
|
15
|
+
private _getSourceIdByName;
|
|
16
|
+
/**
|
|
17
|
+
* Adds a field to the pivot table by its name and assigns it to the specified area.
|
|
18
|
+
* @param {string} name - The display name of the field to be added to the pivot table.
|
|
19
|
+
* @param {PivotTableFiledAreaEnum} area - The target area in the pivot table where the field should be added.
|
|
20
|
+
* @returns {PivotTableLabelField | PivotTableValueField} The field instance that has been added to the pivot table.
|
|
21
|
+
* @example
|
|
22
|
+
* ```typescript
|
|
23
|
+
* const sourceData = [
|
|
24
|
+
* ["区域", "省份", "城市", "类别", "商品", "数量", "销售日期"],
|
|
25
|
+
* ["西部", "河南", "洛阳", "fruit", "葡萄", 38, "2021-06-30"],
|
|
26
|
+
* ["北部", "辽宁", "沈阳", "fruit", "葡萄", 45, "2023-08-31"]
|
|
27
|
+
* ]
|
|
28
|
+
* const pivot = univerAPI.generatePivotTable(sourceData);
|
|
29
|
+
* // The returned labelField can be used to call settings for filtering, sorting, etc.
|
|
30
|
+
* const labelField = pivot.addFieldWithName('区域', PivotTableFiledAreaEnum.Row);
|
|
31
|
+
* // The returned valueField can be used to set the summary mode, display mode, etc.
|
|
32
|
+
* const valueField = pivot.addFieldWithName('数量', PivotTableFiledAreaEnum.Value);
|
|
33
|
+
* ```
|
|
34
|
+
*/
|
|
35
|
+
addFieldWithName(name: string, area: PivotTableFiledAreaEnum): PivotTableLabelField | PivotTableValueField;
|
|
36
|
+
/**
|
|
37
|
+
* Adds a field to the pivot table by its name and assigns it to the filter dimension.
|
|
38
|
+
* @param {string} name - The display name of the field to be added to the pivot table.
|
|
39
|
+
* @param {IFGenericPivotFilterOptions} options The filter configuration
|
|
40
|
+
* @returns {PivotTableLabelField} The field instance that has been added to the pivot table.
|
|
41
|
+
* @example
|
|
42
|
+
* ```typescript
|
|
43
|
+
* const sourceData = [
|
|
44
|
+
* ["区域", "省份", "城市", "类别", "商品", "数量", "销售日期"],
|
|
45
|
+
* ["西部", "河南", "洛阳", "fruit", "葡萄", 38, "2021-06-30"],
|
|
46
|
+
* ["北部", "辽宁", "沈阳", "fruit", "葡萄", 45, "2023-08-31"]
|
|
47
|
+
* ]
|
|
48
|
+
* const pivot = univerAPI.generatePivotTable(sourceData);
|
|
49
|
+
* pivot.addFilterFieldWithName('数量',{
|
|
50
|
+
* type: PivotFilterTypeEnum.CustomFilter,
|
|
51
|
+
* operator: NumberFilterEnum.valueEqual,
|
|
52
|
+
* expected: 38,
|
|
53
|
+
* });
|
|
54
|
+
* pivot.addFieldWithName('区域',PivotTableFiledAreaEnum.Row);
|
|
55
|
+
* pivot.addFieldWithName('数量',PivotTableFiledAreaEnum.Value);
|
|
56
|
+
* // At this time, there will only be one data with a value equal to 38
|
|
57
|
+
* const res = pivot.getResultByCalculate().dataArr;
|
|
58
|
+
* console.log('debugger res',res);
|
|
59
|
+
*
|
|
60
|
+
* pivot.reset();
|
|
61
|
+
* pivot.addFieldWithName('区域',PivotTableFiledAreaEnum.Row);
|
|
62
|
+
* pivot.addFieldWithName('数量',PivotTableFiledAreaEnum.Value);
|
|
63
|
+
* // There will only be two pieces of data at this time
|
|
64
|
+
* const resNew = pivot.getResultByCalculate().dataArr;
|
|
65
|
+
* console.log('debugger res new',resNew);
|
|
66
|
+
* ```
|
|
67
|
+
*/
|
|
68
|
+
addFilterFieldWithName(name: string, options: IFGenericPivotFilterOptions): PivotTableLabelField;
|
|
69
|
+
/**
|
|
70
|
+
* Adds a field to the pivot table by its name and assigns it to the value measure.
|
|
71
|
+
* @param {string} name - The display name of the field to be added to the pivot table.
|
|
72
|
+
* @param {IPivotTableValueOptions} options The value configuration
|
|
73
|
+
* @returns {PivotTableValueField} The field instance that has been added to the pivot table.
|
|
74
|
+
* @example
|
|
75
|
+
* ```typescript
|
|
76
|
+
* const sourceData = [
|
|
77
|
+
* ["区域", "省份", "城市", "类别", "商品", "数量", "销售日期"],
|
|
78
|
+
* ["西部", "河南", "洛阳", "fruit", "葡萄", 38, "2021-06-30"],
|
|
79
|
+
* ["北部", "辽宁", "沈阳", "fruit", "葡萄", 45, "2023-08-31"]
|
|
80
|
+
* ]
|
|
81
|
+
* const pivot = univerAPI.generatePivotTable(sourceData);
|
|
82
|
+
* pivot.addFieldWithName('区域',PivotTableFiledAreaEnum.Row);
|
|
83
|
+
* pivot.addValueFieldWithName('数量',{subtotal: PivotSubtotalTypeEnum.average});
|
|
84
|
+
* const res = pivot.getResultByCalculate().dataArr;
|
|
85
|
+
* console.log('debugger res',res);
|
|
86
|
+
* ```
|
|
87
|
+
*/
|
|
88
|
+
addValueFieldWithName(name: string, options?: IPivotTableValueOptions): PivotTableValueField;
|
|
89
|
+
/**
|
|
90
|
+
* Removes the field from the pivot table by its name.
|
|
91
|
+
* @param {string} name - The display name of the field to be removed from the pivot table.
|
|
92
|
+
* @returns {void}
|
|
93
|
+
* @example
|
|
94
|
+
* ```typescript
|
|
95
|
+
* const sourceData = [
|
|
96
|
+
* ["区域", "省份", "城市", "类别", "商品", "数量", "销售日期"],
|
|
97
|
+
* ["西部", "河南", "洛阳", "fruit", "葡萄", 38, "2021-06-30"],
|
|
98
|
+
* ["北部", "辽宁", "沈阳", "fruit", "葡萄", 45, "2023-08-31"]
|
|
99
|
+
* ]
|
|
100
|
+
* const pivot = univerAPI.generatePivotTable(sourceData);
|
|
101
|
+
* const labelField = pivot.addFieldWithName('区域', PivotTableFiledAreaEnum.Row);
|
|
102
|
+
* // There is a `区域` in the row dimension of the pivot table
|
|
103
|
+
* const dimensionInfo = pivot.getDimensionInfo();
|
|
104
|
+
* pivot.removeFieldWithName('区域');
|
|
105
|
+
* // The new dimension information is returned as undefined.
|
|
106
|
+
* const newDimensionInfo = pivot.getDimensionInfo();
|
|
107
|
+
* ```
|
|
108
|
+
*/
|
|
109
|
+
removeFieldWithName(name: string): void;
|
|
110
|
+
/**
|
|
111
|
+
* Gets the result of the pivot table calculation.
|
|
112
|
+
* The return value is a two-dimensional array after the pivot table calculation.
|
|
113
|
+
* You can configure whether to display subTotal, grandTotal, etc. according to the input config.
|
|
114
|
+
* @param {IPivotTableCubeConfig} config - The configuration of the pivot table cube.
|
|
115
|
+
* @returns {IPivotViewValueType[][]} The result of the pivot table calculation.
|
|
116
|
+
* @example
|
|
117
|
+
* ```typescript
|
|
118
|
+
* const sourceData = [
|
|
119
|
+
* ["区域", "省份", "城市", "类别", "商品", "数量", "销售日期"],
|
|
120
|
+
* ["西部", "河南", "洛阳", "fruit", "葡萄", 38, "2021-06-30"],
|
|
121
|
+
* ["北部", "辽宁", "沈阳", "fruit", "葡萄", 45, "2023-08-31"]
|
|
122
|
+
* ]
|
|
123
|
+
* const pivot = univerAPI.generatePivotTable(sourceData);
|
|
124
|
+
* const rowField = pivot.addFieldWithName('区域', PivotTableFiledAreaEnum.Row);
|
|
125
|
+
* const columnField = pivot.addFieldWithName('省份', PivotTableFiledAreaEnum.Row);
|
|
126
|
+
* const valueField = pivot.addFieldWithName('数量', PivotTableFiledAreaEnum.Value);
|
|
127
|
+
* const result = pivot.getResultByCalculate({showRowGrandTotal: true, showRowSubTotal: true}).dataArr;
|
|
128
|
+
* console.log('debugger', result);
|
|
129
|
+
* ```
|
|
130
|
+
*/
|
|
131
|
+
getResultByCalculate(config?: IPivotTableCubeConfig): {
|
|
132
|
+
dataArr: IPivotViewValueType[][];
|
|
133
|
+
dataArrWithSplit: IPivotViewValueType[][][];
|
|
134
|
+
};
|
|
135
|
+
/**
|
|
136
|
+
* Returns the table header name corresponding to the column number
|
|
137
|
+
* @param {number} index - The column number
|
|
138
|
+
* @returns {string} The table header name corresponding to the column number
|
|
139
|
+
*/
|
|
140
|
+
getNameWithColumnIndex(index: number): string;
|
|
141
|
+
/**
|
|
142
|
+
* Reset all configurations of the pivot table
|
|
143
|
+
* @example
|
|
144
|
+
* ```typescript
|
|
145
|
+
* const sourceData = [
|
|
146
|
+
* ["区域", "省份", "城市", "类别", "商品", "数量", "销售日期"],
|
|
147
|
+
* ["西部", "河南", "洛阳", "fruit", "葡萄", 38, "2021-06-30"],
|
|
148
|
+
* ["北部", "辽宁", "沈阳", "fruit", "葡萄", 45, "2023-08-31"]
|
|
149
|
+
* ]
|
|
150
|
+
* const pivot = univerAPI.generatePivotTable(sourceData);
|
|
151
|
+
* const rowField = pivot.addFieldWithName('区域', PivotTableFiledAreaEnum.Row);
|
|
152
|
+
* pivot.reset();
|
|
153
|
+
* // The dimension information returns empty because it is reset.
|
|
154
|
+
* const newDimensionInfo = pivot.getDimensionInfo();
|
|
155
|
+
* console.log('debugger', newDimensionInfo);
|
|
156
|
+
* ```
|
|
157
|
+
*/
|
|
158
|
+
reset(): void;
|
|
159
|
+
/**
|
|
160
|
+
* Reset the pivot table configuration for a dimension
|
|
161
|
+
* @param {PivotTableFiledAreaEnum} area - The target area in the pivot table where be reset
|
|
162
|
+
* @example
|
|
163
|
+
* ```typescript
|
|
164
|
+
* const sourceData = [
|
|
165
|
+
* ["区域", "省份", "城市", "类别", "商品", "数量", "销售日期"],
|
|
166
|
+
* ["西部", "河南", "洛阳", "fruit", "葡萄", 38, "2021-06-30"],
|
|
167
|
+
* ["北部", "辽宁", "沈阳", "fruit", "葡萄", 45, "2023-08-31"]
|
|
168
|
+
* ]
|
|
169
|
+
* const pivot = univerAPI.generatePivotTable(sourceData);
|
|
170
|
+
* const rowField = pivot.addFieldWithName('区域', PivotTableFiledAreaEnum.Row);
|
|
171
|
+
* const valueField = pivot.addFieldWithName('数量', PivotTableFiledAreaEnum.Value);
|
|
172
|
+
* pivot.reset(PivotTableFiledAreaEnum.Row);
|
|
173
|
+
* // The returned dimension information only contains the value dimension because the row dimension is reset.
|
|
174
|
+
* const newDimensionInfo = pivot.getDimensionInfo();
|
|
175
|
+
* console.log('debugger', newDimensionInfo)
|
|
176
|
+
* ```
|
|
177
|
+
*/
|
|
178
|
+
resetDimension(area: PivotTableFiledAreaEnum): void;
|
|
179
|
+
/**
|
|
180
|
+
* Get the data type of the field corresponding to the column number
|
|
181
|
+
* @param {number} index The column number
|
|
182
|
+
* @returns {PivotDataFieldDataTypeEnum | undefined} The data type of the field corresponding to the column number
|
|
183
|
+
*
|
|
184
|
+
* @example
|
|
185
|
+
* ```typescript
|
|
186
|
+
* const sourceData = [
|
|
187
|
+
* ["区域", "省份", "城市", "类别", "商品", "数量", "销售日期"],
|
|
188
|
+
* ["西部", "河南", "洛阳", "fruit", "葡萄", 38, "2021-06-30"],
|
|
189
|
+
* ["北部", "辽宁", "沈阳", "fruit", "葡萄", 45, "2023-08-31"]
|
|
190
|
+
* ]
|
|
191
|
+
* const pivot = univerAPI.generatePivotTable(sourceData);
|
|
192
|
+
* const dataType = pivot.getFieldDataTypeByColumnIndex(4);
|
|
193
|
+
* console.log('debugger', dataType); // PivotDataFieldDataTypeEnum.number
|
|
194
|
+
* ```
|
|
195
|
+
*/
|
|
196
|
+
getFieldDataTypeByColumnIndex(index: number): PivotDataFieldDataTypeEnum | undefined;
|
|
197
|
+
/**
|
|
198
|
+
* Get the data type of the field corresponding to the field name.
|
|
199
|
+
* @param {string} name - The display name of the field.
|
|
200
|
+
* @returns {PivotDataFieldDataTypeEnum | undefined} The data type of the field corresponding to the field name.
|
|
201
|
+
*
|
|
202
|
+
* @example
|
|
203
|
+
* ```typescript
|
|
204
|
+
* const sourceData = [
|
|
205
|
+
* ["区域", "省份", "城市", "类别", "商品", "数量", "销售日期"],
|
|
206
|
+
* ["西部", "河南", "洛阳", "fruit", "葡萄", 38, "2021-06-30"],
|
|
207
|
+
* ["北部", "辽宁", "沈阳", "fruit", "葡萄", 45, "2023-08-31"]
|
|
208
|
+
* ]
|
|
209
|
+
* const pivot = univerAPI.generatePivotTable(sourceData);
|
|
210
|
+
* const dataType = pivot.getFieldDataTypeByFieldName('数量');
|
|
211
|
+
* console.log('debugger', dataType); // PivotDataFieldDataTypeEnum.number
|
|
212
|
+
* ```
|
|
213
|
+
*/
|
|
214
|
+
getFieldDataTypeByFieldName(name: string): PivotDataFieldDataTypeEnum | undefined;
|
|
215
|
+
/**
|
|
216
|
+
* Get the dimension information of the current pivot table
|
|
217
|
+
* @returns {IDimensionInfo | undefined} The dimension information of the pivot table.
|
|
218
|
+
* @example
|
|
219
|
+
* ```typescript
|
|
220
|
+
* const sourceData = [
|
|
221
|
+
* ["区域", "省份", "城市", "类别", "商品", "数量", "销售日期"],
|
|
222
|
+
* ["西部", "河南", "洛阳", "fruit", "葡萄", 38, "2021-06-30"],
|
|
223
|
+
* ["北部", "辽宁", "沈阳", "fruit", "葡萄", 45, "2023-08-31"]
|
|
224
|
+
* ]
|
|
225
|
+
* const pivot = univerAPI.generatePivotTable(sourceData);
|
|
226
|
+
* pivot.addFieldWithName('商品', PivotTableFiledAreaEnum.Column);
|
|
227
|
+
* pivot.addFieldWithName('区域', PivotTableFiledAreaEnum.Row);
|
|
228
|
+
* const newDimensionInfo = pivot.getDimensionInfo();
|
|
229
|
+
* console.log('debugger', newDimensionInfo);
|
|
230
|
+
* ```
|
|
231
|
+
*/
|
|
232
|
+
getDimensionInfo(): IDimensionInfo | undefined;
|
|
233
|
+
/**
|
|
234
|
+
* Returns the source data used to generate the pivot table
|
|
235
|
+
* @returns {IDataFieldDataArray} The source data used to generate the pivot table.
|
|
236
|
+
* ```typescript
|
|
237
|
+
* const sourceData = [
|
|
238
|
+
* ["区域", "省份", "城市", "类别", "商品", "数量", "销售日期"],
|
|
239
|
+
* ["西部", "河南", "洛阳", "fruit", "葡萄", 38, "2021-06-30"],
|
|
240
|
+
* ["北部", "辽宁", "沈阳", "fruit", "葡萄", 45, "2023-08-31"]
|
|
241
|
+
* ]
|
|
242
|
+
* const pivot = univerAPI.generatePivotTable(sourceData);
|
|
243
|
+
* const originData = pivot.getPivotSourceData();
|
|
244
|
+
* console.log('debugger', originData === sourceData);
|
|
245
|
+
* ```
|
|
246
|
+
*/
|
|
247
|
+
getPivotSourceData(): IDataFieldDataArray;
|
|
248
|
+
/**
|
|
249
|
+
* Set the options of the pivot table.
|
|
250
|
+
* @param {IPivotTableOptions} options - The options to be set.
|
|
251
|
+
* @returns {void}
|
|
252
|
+
* @example
|
|
253
|
+
* ```typescript
|
|
254
|
+
* const pivot = univerAPI.generatePivotTable(sourceData);
|
|
255
|
+
* // With this setting, the pivot table will fill in the cell values of the row dimension
|
|
256
|
+
* pivot.setOptions({repeatRowLabels: true});
|
|
257
|
+
* ```
|
|
258
|
+
*/
|
|
259
|
+
setOptions(options: IPivotTableOptions): void;
|
|
260
|
+
/**
|
|
261
|
+
* Dispose the pivot table
|
|
262
|
+
*/
|
|
263
|
+
remove(): void;
|
|
264
|
+
}
|
|
265
|
+
export declare class DefaultDataFieldManager extends DataFieldManager {
|
|
266
|
+
getRangeData(data: IDataFieldDataArray): {
|
|
267
|
+
header: string[];
|
|
268
|
+
data: IDataFieldValue[][];
|
|
269
|
+
};
|
|
270
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { IPivotTableLabelFieldJSON, IPivotTableSortInfo, IPivotTableValueFieldJSON, PivotSubtotalTypeEnum, PivotTableValuePositionEnum, PivotTableFiledAreaEnum } from '@univerjs-pro/engine-pivot';
|
|
1
2
|
import { IPivotTableConfig } from '@univerjs-pro/sheets-pivot';
|
|
2
3
|
import { Injector, IRange, Nullable } from '@univerjs/core';
|
|
3
|
-
import { IPivotTableLabelFieldJSON, IPivotTableSortInfo, IPivotTableValueFieldJSON, PivotSubtotalTypeEnum, PivotTableFiledAreaEnum, PivotTableValuePositionEnum } from '@univerjs-pro/engine-pivot';
|
|
4
4
|
/**
|
|
5
5
|
* The facade class for the pivot table.Which uses to setting the pivot table fields configs.
|
|
6
6
|
* @hideconstructor
|
|
@@ -1,6 +1,33 @@
|
|
|
1
|
+
import { DataFieldManager } from '@univerjs-pro/engine-pivot';
|
|
1
2
|
import { Injector } from '@univerjs/core';
|
|
3
|
+
import { IDataFieldDataArray } from './type';
|
|
2
4
|
import { FUniver } from '@univerjs/core/facade';
|
|
3
|
-
|
|
5
|
+
import { FGenericPivotTable } from './f-generic-pivot-table';
|
|
6
|
+
/**
|
|
7
|
+
* @ignore
|
|
8
|
+
*/
|
|
9
|
+
export interface IFUniverPivotTableEventMixin {
|
|
10
|
+
/**
|
|
11
|
+
* Create a pivot table instance that does not depend on a workbook
|
|
12
|
+
* @param {IDataFieldDataArray} data - The data used to create the pivot table
|
|
13
|
+
* @param {new (...args: unknown[]) => DataFieldManager} [CustomDataFieldManager] - The custom data field manager class. If not passed, the default DataFieldManager will be used
|
|
14
|
+
* @returns {FGenericPivotTable} The generated pivot table instance.
|
|
15
|
+
* @example
|
|
16
|
+
* ```typescript
|
|
17
|
+
* const sourceData = [
|
|
18
|
+
* ["区域", "省份", "城市", "类别", "商品", "数量", "销售日期"],
|
|
19
|
+
* ["西部", "河南", "洛阳", "fruit", "葡萄", 38, "2021-06-30"],
|
|
20
|
+
* ["北部", "辽宁", "沈阳", "fruit", "葡萄", 45, "2023-08-31"]
|
|
21
|
+
* ]
|
|
22
|
+
* const pivot = univerAPI.generatePivotTable(sourceData);
|
|
23
|
+
* pivot.addFieldWithName('数量', 3);
|
|
24
|
+
* const res = pivot.getResultByCalculate();
|
|
25
|
+
* console.log('debugger', pivot, res);
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
generatePivotTable<T extends DataFieldManager>(data: IDataFieldDataArray, CustomDataFieldManager?: new (...args: unknown[]) => T): FGenericPivotTable;
|
|
29
|
+
}
|
|
30
|
+
export declare class FUniverPivotTableEventMixin extends FUniver implements IFUniverPivotTableEventMixin {
|
|
4
31
|
_initialize(injector: Injector): void;
|
|
5
32
|
private _firePivotTableFieldAddedEvent;
|
|
6
33
|
private _firePivotTableFieldRemovedEvent;
|
|
@@ -16,4 +43,9 @@ export declare class FUniverPivotTableEventMixin extends FUniver {
|
|
|
16
43
|
private _fireBeforeMovePivotTableEvent;
|
|
17
44
|
private _fireMovedPivotTableEvent;
|
|
18
45
|
private _fireRenderPivotTableEvent;
|
|
46
|
+
generatePivotTable<T extends DataFieldManager>(data: IDataFieldDataArray, CustomDataFieldManager?: new (...args: unknown[]) => T): FGenericPivotTable;
|
|
47
|
+
}
|
|
48
|
+
declare module '@univerjs/core/facade' {
|
|
49
|
+
interface FUniver extends IFUniverPivotTableEventMixin {
|
|
50
|
+
}
|
|
19
51
|
}
|