@jspreadsheet/pivot 8.0.0 → 8.0.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/dist/index.js +113 -113
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -26,20 +26,19 @@ if (! jSuites) {
|
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
(function(a,B){const
|
|
30
|
-
function
|
|
31
|
-
function(){return a};return
|
|
32
|
-
(function(a,B){const
|
|
33
|
-
b
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
x(b(
|
|
37
|
-
<lm-modal icon="pivot_table_chart" title="${x(b(489))}" :ref="self.modal" :closable="true" :minimizable="true" :draggable="true" :width="420" :height="370" :closed="true" :onclose="self.cancel">
|
|
29
|
+
(function(a,B){const x=a0_0x38ed;for(a=a();;)try{if(parseInt(x(443))/1*(-parseInt(x(496))/2)+parseInt(x(312))/3+-parseInt(x(635))/4+parseInt(x(575))/5*(-parseInt(x(525))/6)+-parseInt(x(332))/7+-parseInt(x(415))/8*(-parseInt(x(660))/9)+-parseInt(x(408))/10*(-parseInt(x(624))/11)===B)break;else a.push(a.shift())}catch(G){a.push(a.shift())}})(a0_0x2675,232857);
|
|
30
|
+
function a0_0x2675(){const a='6ujxnqc;allowEmptyCriteria;100.00%;sourcePicker;modal;name;object;Delete;reverse;reset;oldSource;oninit;length;cascade;data-control;columns;sourceAnchor;Column ;append;positionMarkerCard;begins with;COUNTA;valid url;SUM;unshift;Value;License required; Total;COUNT;different to;onclick;destinationAnchor;VAR.S;conditionDropdownOptions;moveRow;validation;delete;cols;refresh;MIN; of ;onchange;ascendingOrder;removeThisItem;highlightedRows;moveFilter;Pivot table;isArray;loadModalLists;contains;183790OsKDMg;Edit pivot table;Method;has;visible;updateColumns;is-highlighted-column;getColumnName;showAs;mousemove;message;highlighted;jtoolbar-disabled;valid email;getCellObject;ignoreEvents;Cell where the table should be inserted;parse;Order by;tools;internal properties;is a valid date;removeColumn;cell;onevent;clientY;createElement;% of the column total;possibleValues;pivot-table-config-list;#SPILL;after;autoOpenEnabled;Default;createWorksheet;render;concat;insertedColumns;insertRow;dispatch;open;setPivotTable;amd;bigger than or equal to;type;updateSortableField;querySelectorAll;history;startDate;4843289pyszzu;nextElementSibling;existing;contextMenu;current;toolbar;dictionary;height;closed;total-%;find;1841072JMwWPs;pivot-table-position-marker-card;updateCells;time;coords;difference;key;Text;getBoundingClientRect;includes;moveItem;onload;createRowPicker;before;SPILL;oldValue;textLength;is not between;update;coordinate of the cell that prevented the table from being drawn;formula;clipboard;getSortingOptions;boolean;date;333JsJbTM;value;collapsed;findIndex;stopPropagation;parent;source;createCellPicker;pivot-table-movement-card;createPicker;equal to;For the table to be displayed, the range ;records;getDataFromRange;The anchor must be a reference to a cell;userSelect;columnIndex;isSelected;table;tableIndex;init;Where to create the table;openEditModal;getRange;removeEventListener;applyValidation;filterByValue;edit;controls;moveCell;license;filter1;COUNTUNIQUE;none;isLoaded;innerText;push;notification;710652bLkxQl;Filter by value;data-visible;criteria;STDEV;Something went wrong;createSourcePicker;worksheet;entries; must contain no content other than the table itself.;cells;Cell is not empty;getCellNameFromCoords;line;% of the row total;Total ;classList;column;showOptions;get;2526846mMYyBQ;splice;getAttribute;STDEVP;Date;setComponents;new;Rows;is-highlighted-row;validations;values;Values;VAR.P;setProperty;notEmpty;base;pivot;trunc;is a valid url;add;oncreatepivot;sort;Grand Total;on or after;locationOption;exports;selection;insert;<div>\n <div><Create :ref="self.create" /></div>\n <div><Edit :ref="self.edit" /></div>\n </div>;rows;close;tokenIdentifier;updateModal;movedColumns;Order;start;top;valid date;number;endDate;getCell;text;MAX;div;setChain;updateRows;options;validationElement;insertColumn;updateField;every;undefined;forEach;insertBefore;is-last-row;valid;editButtons;Create;setValue;cursor;pivot-table-group-cell;toFixed;startTime;less than or equal to;indexOf;lastIndexOf;createColumnPicker;calendar;set;AVERAGE;getCoordsFromRange;setAttribute;internalOperations;setPlugins;yCoordOfTheCenter;error;20mbWjiE;MEDIAN;tables;instance;helpers;defineProperty;some;36992WjRuML;status;</h3></div>;Source;ends with;fields;deletePivotTable;Columns;hidden;filter;isEditable;size;all;fill;symbol;max;destinationWorksheet;criterias;updateCell;endTime;Existing worksheet;not contains;anchor;persistence;The source must be a range;Descending;updateFilters;bigger than;59mhjglz;guid;range;title;picker;Create pivot table;The source must be a range, not a single cell;getRangeFromCoords;<h3>;pivot_table_chart;addEventListener;blur;columnName;card;% of the total;<div><h3>;documentElement;empty;from;is-header;end;1899-12-31 ;call;Type;exists;remove;mouseup;Total;sortBy;removeFilter;The pivot tables extension is not included on the scope of this license;cardThatFollowsTheMouse;map;Ascending;default;setCellProperties;mousedown;not between;last row;pivotTable;left;deletedColumns;dateToNum;Text length;sourceWorksheet;sortingOptions;display;stringify;removeField;target;slice;pivotTables;less than;6702MVcvKO;function;jss_pivot_table;isCollapsed;move;setOptions;newValue;pivot-table-card-background;method;PRODUCT;getWorksheetInstanceByName;The destination is inside a table;create;undoChanges;between;children;moveColumn;marginTop;appendChild;New worksheet;style;getCoordsFromCellName;parentElement;pivotTableId;updateRow;column-%;innerHTML;VARP;filters'.split(";");a0_0x2675=
|
|
31
|
+
function(){return a};return a0_0x2675()}function a0_0x38ed(a,B){const x=a0_0x2675();return a0_0x38ed=function(G,J){return x[G-286]},a0_0x38ed(a,B)}
|
|
32
|
+
(function(a,B){const x=a0_0x38ed;typeof exports===x(531)&&typeof module!==x(383)?module[x(357)]=B():typeof define===x(497)&&define[x(617)]?define(B):a[x(348)]=B()})(this,function(){const a=a0_0x38ed;let B=null;const x=function(b){const c=a0_0x38ed;return typeof document!==c(383)&&document[c(630)]?document.dictionary[b]||b:b},G=function(b){const c=a0_0x38ed;return JSON[c(592)](JSON[c(490)](b))},J=b=>{const c=a0_0x38ed,e=b[c(397)]("!");return[b[c(493)](0,e),b[c(493)](e+1)]};class K extends Error{}const oa=
|
|
33
|
+
b=>{const c=a0_0x38ed;try{if(!B[c(412)][c(363)](b))throw new K(c(439));let e=b.lastIndexOf("!");0>e&&(e=void 0);if(0>b[c(396)](":",e))throw new K(c(449));const f=B[c(412)][c(402)](b);if(f[0]===f[2]&&f[1]===f[3])throw new K(c(449));}catch(e){if(e instanceof K)throw e;throw new K("Something went wrong");}},Ca=function(){const b=a0_0x38ed;let c=this;c[b(318)]=function(f){B[b(447)](f,{worksheetName:!0,onchange:function(d){c[b(666)]=d}})};c.createAnchorPicker=function(f){B[b(447)](f,{worksheetName:!0,
|
|
34
|
+
onchange:function(d){c.anchor=d}})};c[b(615)]=function(){c.locationOption="new";c.anchor="";c.sourcePicker[b(309)]=c.source;c[b(529)][b(615)]()};c.cancel=function(){c.modal[b(362)]()};c[b(359)]=function(){var f=c.source;try{oa(f)}catch(k){jSuites.notification({error:1,message:x(k.message)});return}f={id:jSuites[b(444)](),source:f};if(c[b(356)]===b(626)){var d=c[b(437)];try{var g=a0_0x38ed;try{if(!B[g(412)][g(363)](d))throw new K(g(288));var l=d[g(397)]("!");0>l&&(l=void 0);if(-1<d[g(396)](":",l))throw new K("The anchor must be a single cell, not a range");
|
|
35
|
+
}catch(k){if(k instanceof K)throw k;throw new K(g(317));}}catch(k){jSuites.notification({error:1,message:x(k[b(585)])});return}l=J(d);d=c[b(411)][b(506)](l[0]);if(g=Ba(d,l[1])){jSuites[b(311)]({error:1,message:g===b(292)?x(b(507)):x("The destination is inside another pivot table")});return}f[b(437)]=l[1];H.call(d,f)}else f[b(437)]="A1",c[b(411)][b(609)]({minDimensions:[20,20],pivotTables:[f]});c[b(529)][b(362)]()};const e=[{text:x(b(515)),value:b(338)},{text:x(b(435)),value:b(626)}];return f=>f`
|
|
36
|
+
<lm-modal icon="pivot_table_chart" title="${x(b(448))}" :ref="self.modal" :closable="true" :minimizable="true" :draggable="true" :width="420" :height="370" :closed="true" :onclose="self.cancel">
|
|
38
37
|
<div class="jss_object jss_style_p20">
|
|
39
38
|
<div class='jss_style_row jss_style_p2'>
|
|
40
39
|
<div class='jss_style_column jss_style_f1'>
|
|
41
40
|
<div class="jss_style_form_group">
|
|
42
|
-
<label>${x(
|
|
41
|
+
<label>${x("Table data")}</label>
|
|
43
42
|
<div :ready="self.createSourcePicker" :ref="self.sourcePicker"></div>
|
|
44
43
|
</div>
|
|
45
44
|
</div>
|
|
@@ -47,15 +46,15 @@ x(b(591))});return}g.anchor=k[1];I[b(426)](e,g)}else g.anchor="A1",c[b(695)].cre
|
|
|
47
46
|
<div class='jss_style_row jss_style_p2'>
|
|
48
47
|
<div class='jss_style_column jss_style_f1'>
|
|
49
48
|
<div class="jss_style_form_group">
|
|
50
|
-
<label>${x(b(
|
|
51
|
-
<Dropdown :data="${
|
|
49
|
+
<label>${x(b(295))}</label>
|
|
50
|
+
<Dropdown :data="${e}" :bind="self.locationOption" :allowEmpty="false" width="230" />
|
|
52
51
|
</div>
|
|
53
52
|
</div>
|
|
54
53
|
</div>
|
|
55
|
-
<div class='jss_style_row jss_style_p2 lm-row' lm-render="${this
|
|
54
|
+
<div class='jss_style_row jss_style_p2 lm-row' lm-render="${this.locationOption===b(626)}">
|
|
56
55
|
<div class='jss_style_column jss_style_f1'>
|
|
57
56
|
<div class="jss_style_form_group">
|
|
58
|
-
<label>${x(b(
|
|
57
|
+
<label>${x(b(591))}</label>
|
|
59
58
|
<div :ready="self.createAnchorPicker" data-single="true"></div>
|
|
60
59
|
</div>
|
|
61
60
|
</div>
|
|
@@ -63,98 +62,98 @@ x(b(591))});return}g.anchor=k[1];I[b(426)](e,g)}else g.anchor="A1",c[b(695)].cre
|
|
|
63
62
|
<div class='jss_style_row jss_style_p2'>
|
|
64
63
|
<div class='jss_style_column jss_style_f1'>
|
|
65
64
|
<div class="jss_style_form_group">
|
|
66
|
-
<button type="button" class="jss_style_button" onclick="self.insert">${x(b(
|
|
67
|
-
<button type="button" class="jss_style_button" onclick="self.cancel">${x(
|
|
65
|
+
<button type="button" class="jss_style_button" onclick="self.insert">${x(b(389))}</button>
|
|
66
|
+
<button type="button" class="jss_style_button" onclick="self.cancel">${x("Cancel")}</button>
|
|
68
67
|
</div>
|
|
69
68
|
</div>
|
|
70
69
|
</div>
|
|
71
70
|
</div>
|
|
72
71
|
</lm-modal>
|
|
73
|
-
`},
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
b
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
e[a(
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
value:a(
|
|
87
|
-
value:"
|
|
88
|
-
{text:x("
|
|
89
|
-
value:">="},{text:x(a(
|
|
72
|
+
`},Da=[{text:x(a(476)),value:!0},{text:x(a(440)),value:!1}],pa=(b,c,e)=>{b[a(516)][a(483)]=c[a(483)]+"px";b[a(516)][a(368)]=Math[a(349)](e[a(600)]-c[a(406)])+"px"},Ba=(b,c)=>{const [e,f]=B[a(412)][a(517)](c);c=([l,k,n,h])=>e>=l&&e<=n&&f>=k&&f<=h;var d=b.options[a(410)]||[];for(var g=0;g<d.length;g++){const l=B[a(412)][a(402)](d[g][a(445)]);if(l&&c(l))return"table"}b=b[a(378)][a(494)]||[];for(d=0;d<b[a(537)];d++){g=b[d];if(!g[a(437)])continue;const [l,k]=B.helpers[a(517)](g[a(437)]);g=g[a(426)]||
|
|
73
|
+
[1,1];if(c([l,k,l+g[0]-1,k+g[1]-1]))return"pivot table"}return null},qa=(b,c)=>{b=b.parent;const e=b.internalOperations;b[a(404)]=!0;try{c()}finally{b[a(404)]=e}},N=(b,c,e,f,d)=>{b.getCellObject(c,e);if(b=b[a(372)](c,e))b[a(328)][a(468)](...f),d&&b[a(328)][a(351)](...d)},ra=(b,c,e)=>{B[a(622)].ignore=!0;e[a(665)][a(590)]=!0;e[a(478)]?e[a(478)](c):e[a(345)](c);e[a(390)](b,null,!0);e[a(665)][a(590)]=!1;B[a(622)].ignore=!1},O=b=>{const c=new Set(["jss_pivot_table",a(462),"is-highlighted-column",a(340),
|
|
74
|
+
a(386)]);return b&&b.forEach(e=>{c[a(561)](e)}),{base:b,difference:[...c]}},ca=([b,c],e,f)=>{e=B[a(412)][a(517)](e.anchor);const [d,g]=e;e=O().difference;for(let l=0;l<c;l++){const k=l+g;for(let n=0;n<b;n++)N(f,n+d,k,e)}},Ea=(b,[c,e],[f,d],g,l)=>{var k=B.helpers[a(517)](g[a(437)]);const [n,h]=k;g&&g[a(426)]&&(g=f-l[a(562)][a(537)],k=d-l[a(361)][a(537)],0<g&&l[a(380)](g),0<k&&l[a(613)](k),l[a(665)][a(404)]=!0);const {headerHeight:u,hasHighlightedColumn:q,highlightedRows:r=new Set}=b;b=O([a(498),a(462)]);
|
|
75
|
+
for(g=0;g<u;g++){k=g+h;for(var m=0;m<f;m++)N(l,m+n,k,b[a(640)],b[a(347)])}b=O(["jss_pivot_table","is-highlighted-row"]);if(q)for(g=O([a(498),a(581)]),k=u;k<d-1;k++){m=k+h;var p=r[a(578)](k)?b:g;N(l,n,m,p[a(640)],p[a(347)])}g=q?1:0;k=O(["jss_pivot_table"]);for(m=u;m<d-1;m++){p=m+h;const v=r[a(578)](m)?b:k;for(let w=g;w<f;w++)N(l,w+n,p,v[a(640)],v.base)}b=d-1+h;g=O(["jss_pivot_table",a(386)]);for(k=0;k<f;k++)N(l,k+n,b,g[a(640)],g[a(347)]);b=O()[a(640)];for(g=0;g<d;g++)for(k=g+h,m=f;m<c;m++)N(l,m+n,
|
|
76
|
+
k,b);for(f=d;f<e;f++)for(d=f+h,g=0;g<c;g++)N(l,g+n,d,b)},X=function(b){b=G(b);delete b[a(426)];!this[a(378)][a(494)]&&(this.options[a(494)]=[]);var c=this[a(378)][a(494)];const e=W(b.id,c),f={newValue:G(b)},d=0>e;if(d)c.push(b);else{const g=G(c[e]);b.size=g.size;delete g[a(426)];f[a(650)]=g;c[e]=b}L(b,this);c=this[a(665)].plugins[a(348)];return c&&c[a(301)]&&!c.edit.modal[a(632)]&&c[a(301)].updateModal(),d?this[a(665)][a(614)][a(465)](this,a(352),b):this.parent[a(614)][a(465)](this,"onchangepivot",
|
|
77
|
+
b,f[a(650)]),this.parent.persistence.call(this,a(616),[b]),f},da=function(b,c){const {anchor:e,size:f}=b;var d=B[a(412)].getCoordsFromCellName(e);const [g,l]=d,k=[],n=[],[h,u]=f;({records:d}=c);for(let r=0;r<u;r++){const m=l+r,p=d[m];for(let v=0;v<h;v++){var q=g+v;k[a(310)]({x:q,y:m,value:null});n[a(310)]({x:q,y:m,value:null});(q=p&&p[q])&&delete q[a(348)]}}qa(c,()=>{ra(k,n,c);ca(f,b,c)})},ea=function(b){var c=this.options[a(494)],e=W(b,c);if(0>e)return null;c=c.splice(e,1)[0];e=G(c);return da(c,
|
|
78
|
+
this),this[a(665)][a(614)][a(465)](this,"ondeletepivot",e),this[a(665)].persistence[a(465)](this,a(421),[b]),e},sa=(b,c)=>{b=B[a(412)].getCoordsFromCellName(b[a(437)]);c.updateSelectionFromCoords(...b)},fa=(b,c)=>{const e=B[a(412)].getCoordsFromCellName(b.anchor);e[a(310)](e[0]+b[a(426)][0]-1,e[1]+b[a(426)][1]-1);c.updateSelectionFromCoords(...e)},W=(b,c)=>{if(!c)return-1;const e=c[a(537)];for(let f=0;f<e;f++)if(c[f].id===b)return f;return-1},Y=(b,c)=>{c=c[a(378)][a(494)];b=W(b,c);return-1<b?c[b]:
|
|
79
|
+
null},H=function(b){const c=X[a(465)](this,b);B[a(622)][a(465)](this[a(665)],{worksheet:this,undo:()=>{c[a(650)]?X[a(465)](this,c.oldValue):ea.call(this,c[a(502)].id);sa(c[a(502)],this)},redo:()=>{X[a(465)](this,c.newValue);sa(c.newValue,this)}})},ta=function(b){const c=ea[a(465)](this,b);if(c)B[a(622)][a(465)](this[a(665)],{worksheet:this,undo:()=>{X[a(465)](this,c);fa(c,this)},redo:()=>{ea[a(465)](this,c.id);fa(c,this)}})},ha=function(b,c,e,f){{var d=b[a(378)][a(494)];const k=W(e,d);if(0>k)b=void 0;
|
|
80
|
+
else{var g=G(d[k]),l=g.anchor;b===c&&l===f?b=void 0:(da(g,b),d[a(333)](k,1),g[a(437)]=f,g[a(426)]=[0,0],!c[a(378)][a(494)]&&(c.options.pivotTables=[]),c[a(378)].pivotTables[a(310)](g),L(g,c),d=b[a(665)].plugins[a(348)],b=(d&&d.edit&&!d[a(301)].modal[a(632)]&&d[a(301)][a(364)](),b[a(665)][a(438)][a(465)](b,a(421),[e]),c[a(665)].persistence.call(c,"setPivotTable",[G(g)]),{sourceWorksheet:b,destinationWorksheet:c,sourceAnchor:l,destinationAnchor:f,pivotTableId:e}))}}(e=Y(e,c))&&fa(e,c);return b},Fa=
|
|
81
|
+
function(b,c,e,f){const d=ha(b,c,e,f);B[a(622)][a(465)](b[a(665)],{worksheet:b,undo:()=>{ha(d[a(431)],d[a(487)],d[a(519)],d[a(541)])},redo:()=>{ha(d[a(487)],d[a(431)],d[a(519)],d[a(556)])}})},ia=b=>{b.onDragStart=function(f){const d=a0_0x38ed;var g=f[d(492)];if(g===b[d(456)]){document[d(459)].style[d(289)]=d(307);document[d(459)][d(516)][d(391)]="grab";var l=b.columnName;var k=document.createElement(a(375));l=(k[a(328)][a(351)](a(503),a(636)),k[a(522)]=a(458)+l+a(417),k);b[d(544)]=l;g.parentElement.replaceWith(l);
|
|
82
|
+
g=b[d(455)];k=document.createElement(a(375));g=(k.classList[a(351)](a(668)),k[a(522)]=a(451)+g+"</h3>",k);k=l[d(643)]();const n=getComputedStyle(l);l=l[d(511)][0];l=getComputedStyle(l);g[d(516)].width=l.width;b.cardThatFollowsTheMouse=g;document.body[d(514)](g);l={yCoordOfTheCenter:parseInt(n[d(513)])+k.height/2,left:k[d(483)]};b.coords=l;pa(g,l,f);document[d(453)]("mousemove",c);document[d(453)](d(469),e,{once:!0})}};const c=function(f){const d=a0_0x38ed;let g=f[d(492)];for(pa(b[d(474)],b[d(639)],
|
|
83
|
+
f);g!==document[d(459)]&&!g[d(328)][d(574)](d(503))&&!g[d(328)].contains(d(604));)g=g.parentElement;if(g.classList[d(574)](d(604)))g.appendChild(b[d(544)]);else if(g[d(328)][d(574)](d(503))&&!g[d(328)][d(574)](d(636))){f=f.clientY;var l=g[d(643)]();l=l.y+l[d(631)]/2;f<l?g[d(518)].insertBefore(b[d(544)],g):(f=g[d(625)])?f.parentElement[d(385)](b[d(544)],f):g[d(518)][d(514)](b[d(544)])}},e=function(){const f=a0_0x38ed;document[f(298)](f(584),c);document.documentElement[f(516)].userSelect="";document[f(459)][f(516)].cursor=
|
|
84
|
+
"";b[f(474)][f(468)]();var d=b[f(544)][f(518)];const g=d.id[f(493)](12,-5);d=Array[f(461)](d[f(511)])[f(396)](b[f(544)]);b[f(500)](b.id||b[f(290)],g,d)}},Ga=[{text:x(a(548)),value:a(548)},{text:x(a(546)),value:a(546)},{text:x(a(553)),value:"COUNT"},{text:x("COUNTUNIQUE"),value:a(306)},{text:x(a(401)),value:a(401)},{text:x("MAX"),value:a(374)},{text:x("MIN"),value:a(564)},{text:x("MEDIAN"),value:a(409)},{text:x("PRODUCT"),value:a(505)},{text:x(a(316)),value:a(316)},{text:x(a(335)),value:a(335)},{text:x("VAR"),
|
|
85
|
+
value:a(557)},{text:x(a(523)),value:a(344)}],ua=[{text:x(a(608)),value:a(477)},{text:x(a(326)),value:"row-%"},{text:x(a(602)),value:"column-%"},{text:x(a(457)),value:a(633)}],Ha=[{value:"number",text:x("Number")},{value:a(373),text:x(a(642))},{value:a(659),text:x(a(336))},{value:a(638),text:x("Time")},{value:a(651),text:x(a(486))},{value:a(460),text:x("Cell is empty")},{value:a(346),text:x(a(323))}],Ia={number:[{text:x("between"),value:a(510)},{text:x(a(652)),value:a(480)},{text:x("less than"),value:"<"},
|
|
86
|
+
{text:x("less than or equal to"),value:"<="},{text:x("bigger than"),value:">"},{text:x(a(618)),value:">="},{text:x(a(670)),value:"="},{text:x(a(554)),value:"!="}],text:[{text:x(a(574)),value:a(574)},{text:x(a(436)),value:a(436)},{text:x(a(545)),value:a(545)},{text:x(a(419)),value:a(419)},{text:x("equal to"),value:"="},{text:x("is a valid email"),value:a(588)},{text:x(a(350)),value:a(547)}],date:[{text:x(a(596)),value:a(369)},{text:x(a(670)),value:"="},{text:x(a(648)),value:"<"},{text:x("on or before"),
|
|
87
|
+
value:"<="},{text:x(a(606)),value:">"},{text:x(a(355)),value:">="},{text:x("between"),value:"between"},{text:x(a(480)),value:a(480)}],time:[{text:x(a(510)),value:a(510)},{text:x(a(652)),value:"not between"},{text:x("less than"),value:"<"},{text:x(a(395)),value:"<="},{text:x(a(442)),value:">"},{text:x(a(618)),value:">="},{text:x(a(670)),value:"="},{text:x("different to"),value:"!="}],textLength:[{text:x("between"),value:a(510)},{text:x(a(652)),value:a(480)},{text:x(a(495)),value:"<"},{text:x(a(395)),
|
|
88
|
+
value:"<="},{text:x(a(442)),value:">"},{text:x(a(618)),value:">="},{text:x(a(670)),value:"="},{text:x(a(554)),value:"!="}]};lemonade[a(337)]({FieldCard:function(){const b=this;return ia(b),b[a(566)]=function(c){if("sortBy"===c||c===a(567))c={[c]:b[c]},b[a(653)](b.columnIndex,c)},c=>c`
|
|
90
89
|
<div class="pivot-table-card-background">
|
|
91
90
|
<div :ref="self.card" class="pivot-table-card" onmousedown="self.onDragStart">
|
|
92
91
|
<h3>{{self.columnName}}</h3>
|
|
93
92
|
<div class="lm-row">
|
|
94
93
|
<div class="lm-column lm-f1">
|
|
95
|
-
<label>${x(
|
|
94
|
+
<label>${x(a(593))}</label>
|
|
96
95
|
<Dropdown :data="self.sortingOptions" :bind="self.sortBy" :allowEmpty="false" width="230" />
|
|
97
96
|
</div>
|
|
98
97
|
<div class="lm-column lm-f1">
|
|
99
|
-
<label>${x(a(
|
|
100
|
-
<Dropdown :data="${
|
|
98
|
+
<label>${x(a(366))}</label>
|
|
99
|
+
<Dropdown :data="${Da}" :bind="self.ascendingOrder" :allowEmpty="false" width="230" />
|
|
101
100
|
</div>
|
|
102
101
|
</div>
|
|
103
102
|
<i class="material-icons pivot-table-card-close-button" onclick="self.remove(self.columnIndex)">close</div>
|
|
104
103
|
</div>
|
|
105
104
|
</div>
|
|
106
|
-
`},ValueCard:function(){const b=this;return ia(b),b
|
|
105
|
+
`},ValueCard:function(){const b=this;return ia(b),b.isLoaded=!1,b[a(646)]=function(){!b[a(583)]&&(b[a(583)]=ua[0][a(661)]);b[a(308)]=!0},b[a(566)]=function(c){"method"!==c&&c!==a(583)||!b[a(308)]||(c={[c]:b[c]},b[a(653)](b.id,c))},b[a(568)]=function(){b[a(468)](b.id)},c=>c`
|
|
107
106
|
<div class="pivot-table-card-background">
|
|
108
107
|
<div :ref="self.card" class="pivot-table-card" onmousedown="self.onDragStart">
|
|
109
108
|
<h3>{{self.columnName}}</h3>
|
|
110
109
|
<div class="lm-row">
|
|
111
110
|
<div class="lm-column lm-f1">
|
|
112
|
-
<label>${x(
|
|
113
|
-
<Dropdown :data="${
|
|
111
|
+
<label>${x(a(577))}</label>
|
|
112
|
+
<Dropdown :data="${Ga}" :bind="self.method" :allowEmpty="false" width="230" />
|
|
114
113
|
</div>
|
|
115
114
|
<div class="lm-column lm-f1">
|
|
116
|
-
<label>${x(
|
|
117
|
-
<Dropdown :data="${
|
|
115
|
+
<label>${x("Show as")}</label>
|
|
116
|
+
<Dropdown :data="${ua}" :bind="self.showAs" :allowEmpty="false" width="230" />
|
|
118
117
|
</div>
|
|
119
118
|
</div>
|
|
120
119
|
<i class="material-icons pivot-table-card-close-button" onclick="self.removeThisItem">close</div>
|
|
121
120
|
</div>
|
|
122
121
|
</div>
|
|
123
|
-
`},FilterCard:function(b,{track:c}){const
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
[
|
|
128
|
-
h
|
|
122
|
+
`},FilterCard:function(b,{track:c}){const e=this;c("filter1");ia(e);e[a(603)]=[];e[a(558)]=[{value:a(460),text:x("Cell is empty")},{value:a(346),text:x("Cell is not empty")}];const f=function(){var n=J(e[a(666)]),h=B.helpers.getCoordsFromRange(n[1]);h[0]+=e[a(290)];h[2]=h[0];h[1]++;h=J(B[a(412)][a(450)](h))[1];n=e[a(319)][a(287)](n[0]+"!"+h);h=n[a(537)];const u=new Set;for(let q=1;q<h;q++)u.add(n[q][0]);return[...u].sort()};e[a(579)]=function(){e.el[a(621)]("[data-control]")[a(384)](function(n){let h=
|
|
123
|
+
n[a(334)](a(539)),u;h===a(463)?u=e[a(315)]?.includes("between"):h===a(387)&&(u=!e[a(315)]?.[a(644)](a(387)));n.setAttribute(a(314),u)});e.criteriaInput.style.visibility=e.criterias?"":a(423)};e[a(330)]=function(){e[a(367)]="";e.end="";e.criterias=Ia[e[a(619)]]||null;let n=e[a(379)][a(511)];for(let h=0;h<n[a(537)];h++)n[h][a(328)].contains(a(427))||n[h].classList[a(574)](e.type)?n[h][a(516)].display="":n[h][a(516)][a(489)]=a(307);e[a(526)]=!e.criterias;e[a(315)]=e[a(432)]?e[a(432)][0].value:"";e[a(579)]()};
|
|
124
|
+
e[a(509)]=function(){const n=f();e[a(603)]=n[a(475)](h=>({value:h,text:h}));e[a(305)]?e[a(300)]=e[a(305)]:e[a(300)]=n;e.type=e[a(560)].type;e.criteria=e[a(560)][a(315)];e[a(560)][a(661)]&&(e[a(619)]===a(659)?(e[a(623)]=e[a(560)][a(661)][0],e[a(371)]=e[a(560)][a(661)][1]):"time"===e[a(619)]?(e[a(394)]=e.validation[a(661)][0],e[a(434)]=e[a(560)][a(661)][1]):(e[a(367)]=e[a(560)][a(661)][0],e.end=e.validation[a(661)][1]))};e.onload=function(){e[a(509)]()};const d=()=>{if(!e[a(300)])return[];const n=f();
|
|
125
|
+
return e[a(300)][a(537)]===n.length?e[a(300)][a(382)](h=>n[a(644)](h))?void 0:[...e[a(300)]]:[...e[a(300)]]},g=()=>{const n=d();if(!e[a(619)])return{validation:void 0,filter:n};const h={type:e[a(619)],criteria:e[a(315)]};e.type===a(659)?h.criteria?.[a(644)](a(510))?h[a(661)]=[e[a(623)],e[a(371)]]:h.value=[e.startDate]:e[a(619)]===a(638)?h[a(315)]&&h[a(315)][a(644)](a(510))?h[a(661)]=[jSuites.calendar.dateToNum(a(464)+e.startTime),jSuites[a(399)][a(485)](a(464)+e.endTime)]:h.value=[jSuites[a(399)][a(485)](a(464)+
|
|
126
|
+
e[a(394)])]:h[a(315)]?.[a(644)](a(510))?h.value=[e[a(367)],e[a(463)]]:h[a(661)]=[e[a(367)]];return{validation:h,filter:n}};e[a(299)]=function(){e.update(e.columnIndex,g())};const l=[a(300),"type",a(315),"startDate","endDate","startTime",a(434),a(367),a(463)],k=()=>{const {filter:n,validation:h}=g();if(Array[a(572)](n)&&Array.isArray(e[a(305)])){if(n[a(414)]((u,q)=>q>=e[a(305)].length||u!==e.filter1[q]))return!1}else if(n||e[a(305)])return!1;if(!h)return!e[a(560)];if(!e.validation||h.type!==e[a(560)][a(619)]||
|
|
127
|
+
h.criteria!==e[a(560)][a(315)])return!1;if(h[a(661)]&&e[a(560)].value){if(h[a(661)][0]!=e[a(560)][a(661)][0]||h[a(661)][1]!=e[a(560)][a(661)][1])return!1}else if(h[a(661)]||e[a(560)][a(661)])return!1;return!0};return e.onchange=function(n){if(n===a(619))e[a(330)]();else n===a(315)&&e[a(579)]();l[a(644)](n)&&(n=!k(),e[a(388)].style.display=n?"":a(307))},n=>n`
|
|
129
128
|
<div class="pivot-table-card-background">
|
|
130
129
|
<div :ref="self.card" class="pivot-table-card" onmousedown="self.onDragStart">
|
|
131
130
|
<h3>{{self.columnName}}</h3>
|
|
132
131
|
|
|
133
|
-
<h4>${x(a(
|
|
132
|
+
<h4>${x(a(313))}</h4>
|
|
134
133
|
|
|
135
134
|
<div class="lm-row">
|
|
136
135
|
<div class="lm-column lm-f1">
|
|
137
|
-
<label>${x(
|
|
136
|
+
<label>${x(a(343))}</label>
|
|
138
137
|
<Dropdown :data="self.possibleValues" :bind="self.filterByValue" :multiple="true" :width="512" />
|
|
139
138
|
</div>
|
|
140
139
|
</div>
|
|
141
140
|
|
|
142
141
|
<br>
|
|
143
142
|
|
|
144
|
-
<h4>${x(
|
|
143
|
+
<h4>${x("Filter by condition")}</h4>
|
|
145
144
|
|
|
146
145
|
<div :ref="self.validationElement">
|
|
147
146
|
<div class="all">
|
|
148
147
|
<div class="lm-row">
|
|
149
148
|
<div class="lm-column lm-f1">
|
|
150
149
|
<div class="lm-form-group">
|
|
151
|
-
<label class="label">${x(a(
|
|
152
|
-
<Dropdown :data="${
|
|
150
|
+
<label class="label">${x(a(466))}</label>
|
|
151
|
+
<Dropdown :data="${Ha}" :bind="self.type" />
|
|
153
152
|
</div>
|
|
154
153
|
</div>
|
|
155
154
|
<div class="lm-column lm-f1">
|
|
156
155
|
<div class="lm-form-group" :ref="self.criteriaInput">
|
|
157
|
-
<label class="label">${x(
|
|
156
|
+
<label class="label">${x("Criteria")}</label>
|
|
158
157
|
<Dropdown :data="self.criterias" :bind="self.criteria" :allowEmpty="self.allowEmptyCriteria" />
|
|
159
158
|
</div>
|
|
160
159
|
</div>
|
|
@@ -166,7 +165,7 @@ h[a(717)]!==d.validation[a(717)]||h[a(747)]!==d.validation.criteria)return!1;if(
|
|
|
166
165
|
<div class="lm-row jss_style_middle">
|
|
167
166
|
<div class="lm-column lm-f1" data-control="valid">
|
|
168
167
|
<div class="lm-form-group">
|
|
169
|
-
<label class="label">${x(
|
|
168
|
+
<label class="label">${x("Value")}</label>
|
|
170
169
|
<input type="text" :bind="self.start" class="lm-input" />
|
|
171
170
|
</div>
|
|
172
171
|
</div>
|
|
@@ -184,7 +183,7 @@ h[a(717)]!==d.validation[a(717)]||h[a(747)]!==d.validation.criteria)return!1;if(
|
|
|
184
183
|
<div class="lm-row">
|
|
185
184
|
<div class="lm-column lm-f1">
|
|
186
185
|
<div class="lm-form-group">
|
|
187
|
-
<label class="label">${x(a(
|
|
186
|
+
<label class="label">${x(a(550))}</label>
|
|
188
187
|
<input type="text" :bind="self.start" class="lm-input" />
|
|
189
188
|
</div>
|
|
190
189
|
</div>
|
|
@@ -212,7 +211,7 @@ h[a(717)]!==d.validation[a(717)]||h[a(747)]!==d.validation.criteria)return!1;if(
|
|
|
212
211
|
<div class="lm-row jss_style_middle">
|
|
213
212
|
<div class="lm-column lm-f1" data-control="valid">
|
|
214
213
|
<div class="lm-form-group">
|
|
215
|
-
<label class="label">${x(a(
|
|
214
|
+
<label class="label">${x(a(550))}</label>
|
|
216
215
|
<input type="text" :bind="self.startTime" data-mask='hh:mm:ss' class="lm-input" />
|
|
217
216
|
</div>
|
|
218
217
|
</div>
|
|
@@ -234,43 +233,43 @@ h[a(717)]!==d.validation[a(717)]||h[a(747)]!==d.validation.criteria)return!1;if(
|
|
|
234
233
|
<i class="material-icons pivot-table-card-close-button" onclick="self.remove(self.columnIndex)">close</div>
|
|
235
234
|
</div>
|
|
236
235
|
</div>
|
|
237
|
-
`}});const P=Symbol(a(
|
|
238
|
-
return m[a(
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
w
|
|
242
|
-
new Map;
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
y
|
|
246
|
-
|
|
247
|
-
m
|
|
248
|
-
S(
|
|
249
|
-
(
|
|
250
|
-
S(
|
|
251
|
-
(0!==
|
|
252
|
-
(
|
|
253
|
-
a(
|
|
254
|
-
0;C<h.length;C++)D=h[C],F="",typeof y
|
|
255
|
-
this
|
|
256
|
-
u.v&&typeof
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
k
|
|
261
|
-
|
|
262
|
-
b[a(
|
|
263
|
-
b
|
|
264
|
-
b
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
message:x(
|
|
269
|
-
k)}},b[a(
|
|
270
|
-
f,
|
|
271
|
-
b[a(
|
|
236
|
+
`}});const P=Symbol(a(481)),Z=Symbol("last column"),E=Symbol(a(595)),M=Symbol("total symbol"),ja=Symbol("exists symbol"),Q=(b,c)=>{b=B[a(655)][b]([c]);return b instanceof Error?b[a(585)]:b},Ja=function(b,c,e){const f=b[a(361)]||[],d=b[a(540)]||[],g=b[a(322)]||[],l=function(m,p){if(typeof m===a(383))return{exists:!1,values:[]};if(m[a(331)](Z)||0===d[a(537)]&&(0===f[a(537)]||m[a(331)](P)))return m=m[a(331)](E)[a(331)](p.columnIndex),{exists:!0,values:Array[a(572)](m)?m:[]};const v={exists:!1,
|
|
237
|
+
values:[]};return m[a(384)]((w,t)=>{typeof t!==a(429)&&(w=l(w,p),v[a(467)]=v[a(467)]||w[a(467)],v[a(342)][a(310)](...w[a(342)]))}),v},k=function(m,p){const v=c[f[m][a(290)]],w=m===f[a(537)]-1;for(let y=0;y<v[a(537)];y++){var t=v[y];if(t=p[a(331)](t)){if(w)n(0,t);else{k(m+1,t);var z=new Map;t[a(400)](M,z);u(t,z)}if(0!==g[a(537)])for(z=0;z<g.length;z++){const C=g[z];var {values:A}=l(t,C);0<A[a(537)]&&(A=Q(C[a(504)],A),!t.has(E)&&t[a(400)](E,new Map),t[a(331)](E)[a(400)](C.method+"-"+C.columnIndex,A))}else({exists:z}=
|
|
238
|
+
l(t,{columnIndex:void 0})),z&&(!t[a(578)](E)&&t.set(E,new Map),t[a(331)](E).set(ja,!0))}}},n=function(m,p){if(0!==d[a(537)]){var v=c[d[m].columnIndex],w=m===d[a(537)]-1;for(let C=0;C<v[a(537)];C++){var t=v[C];t=p?p[a(331)](t):void 0;if(w)for(var z=0;z<g[a(537)];z++){var A=g[z],y=t?t[a(331)](E).get(A[a(290)]):void 0;typeof y!==a(383)&&(y=Q(A[a(504)],y),t[a(331)](E)[a(400)](A.method+"-"+A[a(290)],y))}else for(n(m+1,t),z=0;z<g[a(537)];z++)A=g[z],{values:y}=l(t,A),0<y[a(537)]&&(y=Q(A.method,y),!t[a(578)](E)&&
|
|
239
|
+
t[a(400)](E,new Map),t[a(331)](E).set(A.method+"-"+A[a(290)],y))}}},h=function(m,p,v){if(typeof m===a(383))return{exists:!1,values:[]};if(0===f.length||m[a(331)](P)){for(let t=0;t<v[a(537)];t++)if(m=m[a(331)](v[t]),typeof m===a(383))return{exists:!1,values:[]};return l(m,p)}const w={exists:!1,values:[]};return m.forEach((t,z)=>{typeof z!==a(429)&&(t=h(t,p,v),w[a(467)]=w[a(467)]||t[a(467)],w[a(342)][a(310)](...t.values))}),w},u=function(m,p,v=[]){if(0!==d.length){var w=v.length,t=c[d[w][a(290)]];w=
|
|
240
|
+
w===d[a(537)]-1;for(let y=0;y<t[a(537)];y++){const C=t[y];var z=[...v,C];const D=new Map;p[a(400)](C,D);!w&&u(m,D,z);if(0!==g[a(537)]){const F=new Map;for(let I=0;I<g[a(537)];I++){const aa=g[I];var {values:A}=h(m,aa,z);0<A[a(537)]&&(A=Q(aa[a(504)],A),F[a(400)](aa[a(504)]+"-"+aa[a(290)],A))}0!==F[a(426)]&&D.set(E,F)}else({exists:z}=h(m,{columnIndex:void 0},z)),z&&D[a(400)](ja,!0);if(0===D[a(426)])p["delete"](C);else w&&D[a(400)](Z,!0)}}};0!==f.length&&k(0,e);!e[a(578)](E)&&e.set(E,new Map);b=e[a(331)](E);
|
|
241
|
+
var q=new Map;e[a(400)](M,q);u(e,q);for(q=0;q<g.length;q++){const m=g[q];var {values:r}=l(e,m);0<r.length&&(r=Q(m.method,r),b[a(400)](m[a(504)]+"-"+m[a(290)],r))}},R=function(b,c,e){const f=b[a(504)]+"-"+b[a(290)],d=f+"-"+b.showAs;c instanceof Map?c[a(384)]((g,l)=>{l===f?(g=(g/e*100)[a(393)](2)+"%",c[a(400)](d,g)):"object"===typeof g&&R(b,g,e)}):Object[a(320)](c).forEach(([g,l])=>{g===f?(g=(l/e*100).toFixed(2)+"%",c[d]=g):typeof l===a(531)&&R(b,l,e)})},va=(b,c,e)=>{const f=c[a(331)](P);var d=b[a(504)]+
|
|
242
|
+
"-"+b[a(290)];const g=d+"-"+b.showAs;if(f||!1===e){e=c[a(331)](E);const l=e.get(d);e[a(400)](g,"100.00%");c.forEach((k,n)=>{"symbol"!==typeof n&&R(b,k,l)})}else c[a(384)]((l,k)=>{typeof k!==a(429)&&va(b,l)});if(e=c[a(331)](M))c=c[a(331)](E),d=c[a(331)](d),c[a(400)](g,a(527)),R(b,e,d)},ka=(b,c,e)=>{if(c[a(578)](E)){var f=b[a(504)]+"-"+b.columnIndex;const g=f+"-"+b[a(583)];var d=c[a(331)](E)[a(331)](f);f=e[a(331)](E)[a(331)](f);d=(d/f*100)[a(393)](2)+"%";c[a(331)](E)[a(400)](g,d)}c[a(384)]((g,l)=>{typeof l!==
|
|
243
|
+
a(429)&&ka(b,g,e[a(331)](l))})},wa=(b,c,e,f)=>{if(c[a(331)](P))c[a(384)]((k,n)=>{"symbol"!==typeof n&&ka(b,k,e[a(331)](n))});else{c[a(384)]((k,n)=>{typeof n!==a(429)&&wa(b,k,e,f)});var d=c[a(331)](M);d&&ka(b,d,e)}if(c=c[a(331)](E)){var g=b[a(504)]+"-"+b[a(290)];d=g+"-"+b[a(583)];var l=c[a(331)](g);g=f.get(g);l=(l/g*100).toFixed(2)+"%";c.set(d,l)}},Ka=function(b,c){var e=c.length;const f=b[a(361)]||[];var d=b[a(540)]||[],g=f[a(611)](d);const l=g[a(475)](y=>y[a(290)]);var k=l[a(537)];const n=b[a(322)]||
|
|
244
|
+
[],h=[...(new Set(n.map(y=>y[a(290)])))],u=h.length,q=b[a(524)]||[],r=q[a(537)],m=new Map,p={};for(let y=1;y<e;y++){const C=c[y];if(0!==r){var v=void 0;for(v=0;v<r;v++){var w=q[v],t=C[w[a(290)]],z=w[a(424)];if(z){var A=z.length;let D;for(D=0;D<A&&t!==z[D];D++);if(D===A)break}if((w=w[a(560)])&&!jSuites[a(341)](t,w))break}if(v!==r)continue}v=m;for(t=0;t<k;t++)w=l[t],z=C[w],v.has(z)||(A=new Map,t===f[a(537)]-1&&A[a(400)](P,!0),v[a(400)](z,A)),v=v.get(z),!p[w]&&(p[w]=new Set),p[w].add(z);0!==d[a(537)]&&
|
|
245
|
+
!v[a(578)](Z)&&v[a(400)](Z,!0);!v.has(E)&&v[a(400)](E,new Map);v=v[a(331)](E);for(t=0;t<u;t++)w=h[t],z=C[w],!v[a(578)](w)&&v.set(w,[]),v[a(331)](w)[a(310)](z)}for(c=0;c<k;c++)e=g[c],d=p[e[a(290)]]?[...p[e[a(290)]]]:[],d[a(353)](),!e.ascendingOrder&&d[a(533)](),p[e[a(290)]]=d;Ja(b,p,m);if(0!==n.length)for(b=0;b<n[a(537)];b++)g=n[b],g[a(583)]&&g[a(583)]!==a(477)&&(g.showAs===a(633)?(k=m[a(331)](E)[a(331)](g[a(504)]+"-"+g[a(290)]),R(g,m,k)):"row-%"===g[a(583)]?va(g,m,0!==f.length):g[a(583)]===a(521)&&
|
|
246
|
+
(k=m[a(331)](M),wa(g,m,k,m[a(331)](E))));return{obj:m,fieldsPossibleValues:p}},S=b=>{const c=b[a(504)]+"-"+b[a(290)];return b[a(583)]&&b[a(583)]!==a(477)?c+"-"+b[a(583)]:c},La=function(b,c,e,f,d,g){const l=e.rows||[],k=e[a(540)]||[],n=e[a(322)]||[],h=function(m,p,v,w){var t=l[p];var z=f[t[a(290)]];z=T(z,t,v,n,!0);({collapsed:t}=t);const A=p===l[a(537)]-1;for(let F=0;F<z[a(537)];F++){var y=z[F],C=v[a(331)](y);let I;A?I=u(m,0,C,w):((!t||!t[a(644)](y))&&h(m,p+1,C,w),I=q(m,C[a(331)](M),w));y=C[a(331)](E);
|
|
247
|
+
for(C=0;C<n[a(537)];C++){var D=S(n[C]);D=y?.[a(331)](D);typeof D!==a(383)&&(d[c][I]=D);I++}c++}},u=function(m,p,v,w){if(0===k[a(537)])return m;var t=k[p];var z=f[t[a(290)]];z=T(z,t,w,n,!1);({collapsed:t}=t);const A=p===k[a(537)]-1;for(let F=0;F<z[a(537)];F++){var y=z[F],C=v?v[a(331)](y):void 0;if(A)for(y=0;y<n[a(537)];y++){var D=S(n[y]);D=C?.[a(331)](E)?.[a(331)](D);typeof D!==a(383)&&(d[c][m]=D);m++}else for(t&&t.includes(y)||(m=u(m,p+1,C,w[a(331)](y))),C=C?.get(E),y=0;y<n[a(537)];y++)D=S(n[y]),
|
|
248
|
+
D=C?.[a(331)](D),typeof D!==a(383)&&(d[c][m]=D),m++}return m},q=function(m,p,v,w=[]){if(0===k[a(537)])return m;var t=w[a(537)],z=k[t];var A=f[z[a(290)]];A=T(A,z,v,n,!1);t=t===k.length-1;({collapsed:z}=z);typeof d[c]===a(383)&&(d[c]=[]);for(let D=0;D<A[a(537)];D++){var y=A[D],C=[...w,y];const F=p?.[a(331)](y);t||z&&z[a(644)](y)||(m=q(m,F,v[a(331)](y),C));for(y=0;y<n[a(537)];y++)C=S(n[y]),C=F?.get(E)?.[a(331)](C),"undefined"!==typeof C&&(d[c][m]=C),m++}return m};e=g.get(M);0!==l[a(537)]&&h(b,0,g,e);
|
|
249
|
+
b=q(b,e,e);for(e=0;e<n.length;e++){var r=S(n[e]);r=g[a(331)](E)[a(331)](r);typeof r!==a(383)&&(d[a(537)]<=c&&(d[c]=[]),d[c][b]=r);b++}},T=(b,{sortBy:c,ascendingOrder:e},f,d,g)=>{if(c&&c!==a(530)){d=d.find(k=>k.id===c);if(!d)throw Error("Invalid sorting option");const l=d[a(504)]+"-"+d[a(290)];b=b[a(475)](k=>{const n=f[a(331)](k)?.[a(331)](E);return[k,n?n[a(331)](l):void 0]});b=b[a(424)](k=>typeof k[1]!==a(383));b[a(353)]((k,n)=>k[1]-n[1]);b=b[a(475)](k=>k[0])}else b=b.filter(l=>{l=f[a(331)](l);return g&&
|
|
250
|
+
(l=l?.[a(331)](E)),l&&(0!==l[a(426)]||l[a(331)](ja))})[a(353)]();return!e&&b[a(533)](),b},Ma=function(b,c,e,f,d,g){const l=c[a(361)]||[],k=c[a(322)]||[],n=new Set,h=function(u,q,r,m){const p=l[r];var v=e[p[a(290)]];v=T(v,p,m,k,!0);const w=r===l.length-1,{collapsed:t}=p;for(let A=0;A<v[a(537)];A++){const y=v[A];f[a(537)]<=q&&(f[q]=[]);f[q][u]=y;if(!w){typeof g[q]!==a(531)&&(g[q]={});var z=t&&t.includes(y);g[q][u]={columnIndex:p[a(290)],value:typeof y!==a(383)?y:"",isCollapsed:z};z||(q=h(u+1,q,r+1,
|
|
251
|
+
m.get(y)),f[a(537)]<=q&&(f[q]=[]),z="",typeof y!==a(383)&&null!==y&&(z=y+" "),z+=a(470),f[q][u]=z,n[a(351)](q))}q++}return q};b=h(0,b,0,d);return f[a(537)]<=b&&f.push([]),f[b][0]=a(354),n},Na=function(b,c,e,f,d,g,l,k){const n=e[a(540)]||[],h=e[a(322)]||[],u=b[1]-1,q=function(r,m,p,v){const w=n[p];var t=f[w[a(290)]];t=T(t,w,v,h,!1);const z=p===n[a(537)]-1,{collapsed:A}=w;for(let I=0;I<t[a(537)];I++){var y=t[I];d[a(537)]<=m&&(d[m]=[]);d[m][r]=y;if(z)if(1<h[a(537)])for(y=0;y<h[a(537)];y++){var C=h[y];
|
|
252
|
+
d[a(537)]<=m+1&&(d[m+1]=[]);var D=C.method+" of";typeof g[0][C[a(290)]]!==a(383)&&(D+=" "+g[0][C[a(290)]]);d[m+1][r]=D;r++}else r++;else if(typeof k[m]!==a(531)&&(k[m]={}),C=A&&A[a(644)](y),k[m][r]={columnIndex:w[a(290)],value:typeof y!==a(383)?y:"",isCollapsed:C},C)if(0!==h.length){for(;u>=d[a(537)];)d[a(310)]([]);for(C=0;C<h.length;C++){D=h[C];var F="";"undefined"!==typeof y&&(F=y+" ");F+=D[a(504)];typeof g[0][D[a(290)]]!==a(383)&&(F+=a(565)+g[0][D.columnIndex]);d[u][r]=F;r++}}else r++;else if(C=
|
|
253
|
+
r,r=q(r,m+1,p+1,v[a(331)](y)),C!==r)if(0!==h[a(537)])for(C=0;C<h.length;C++)D=h[C],F="","undefined"!==typeof y&&(F=y+" "),F+=D.method,typeof g[0][D[a(290)]]!==a(383)&&(F+=a(565)+g[0][D[a(290)]]),d[m][r]=F,r++;else d[m][r]=y+a(552),r++}return r};b=0!==n[a(537)]?q(b[0],1,0,l[a(331)](M)):b[0];if(1>h[a(537)])d.length<=c&&(d[c]=[]),d[c][b]="Total";else for(d[a(537)]<=c&&(d[c]=[]),e=0;e<h[a(537)];e++){l=h[e];let r=a(327)+l.method;typeof g[0][l.columnIndex]!==a(383)&&(r+=a(565)+g[0][l[a(290)]]);d[c][b]=
|
|
254
|
+
r;b++}};class U extends Error{constructor(b){super(a(649));this[a(639)]=b}}const Pa=function({data:b,groups:c},[e,f],d,g){const [l,k]=g.size||[0,0],{records:n,options:{data:h}}=d;d=b[a(537)];const u=Math.max(...b[a(475)](A=>A[a(537)]));if(u>l)for(var q=0;q<k;q++){var r=f+q,m=n[r],p=h[r];for(var v=l;v<u;v++){var w=e+v;if(m){var t=m[w];if(t&&null!==t.v&&typeof t.v!==a(383))throw new U({x:w,y:r});}if(p&&(t=p[w],null!==t&&""!==t&&typeof t!==a(383)))throw new U({x:w,y:r});}}for(q=k;q<d;q++)for(r=f+q,m=
|
|
255
|
+
n[r],p=h[r],v=0;v<u;v++){w=e+v;if(m&&(t=m[w])&&null!==t.v&&typeof t.v!==a(383))throw new U({x:w,y:r});if(p&&(t=p[w],null!==t&&""!==t&&typeof t!==a(383)))throw new U({x:w,y:r});}q=[];r=[];for(m=0;m<d;m++){w=b[m];t=c[m];p=f+m;for(v=0;v<u;){const A=e+v;var z=w[v];q[a(310)]({x:A,y:p,value:typeof z!==a(383)?z:null});if(t&&t[v])z=t[v],r[a(310)]({x:A,y:p,value:{type:Oa,readOnly:!0,options:{...z,pivotTableId:g.id}}});else r[a(310)]({x:A,y:p,value:{type:a(373),readOnly:!0}});v++}for(;v<l;)w=e+v,q[a(310)]({x:w,
|
|
256
|
+
y:p,value:null}),r.push({x:w,y:p,value:null}),v++}return{dataRecords:q,propertyRecords:r,size:[u,d]}},xa=function(b,[c,e],[f],d){b=[{x:c,y:e,value:d?a(605):null}];d=[{x:c,y:e,value:d?a(373):{type:Qa}}];for(let g=1;g<f;g++){const l=c+g;b.push({x:l,y:e,value:null});d.push({x:l,y:e,value:null})}return{dataRecords:b,propertyRecords:d,size:[1,1]}},la=Symbol(a(654)),Ra=function(b,c,e){var f=B[a(412)][a(517)](c[a(437)]);const [d,g]=f;var l=c[a(426)]||[0,0];const [k,n]=l;var h=[];let u=[];var q;let r=!1;
|
|
257
|
+
try{b?(q=Pa(b,f,e,c),Ea(b.styleInfo,l,q.size,c,e)):(q=xa(c,f,l),ca(l,c,e)),delete c[la]}catch(t){if(!(t instanceof U))throw t;c[la]=t[a(639)];r=!0;q=xa(c,f,l,!0);ca(l,c,e)}({dataRecords:h,propertyRecords:u}=q);[l,f]=q.size;({records:q}=e);for(var m=0;m<f;m++){var p=g+m,v=q[p];for(var w=0;w<l;w++)e.getCellObject(d+w,p)[a(348)]=!0;for(p=l;p<k;p++)w=d+p,(w=v&&v[w])&&delete w.pivot}for(m=f;m<n;m++)for(v=g+m,p=q[v],w=0;w<k;w++){const t=d+w;p&&p[t]&&delete p[t].pivot;h[a(310)]({x:t,y:v,value:null});u[a(310)]({x:t,
|
|
258
|
+
y:v,value:null})}ra(h,u,e);if(e=r&&e[a(372)](d,g))({data:h}=b),b=h[a(537)],h=Math[a(430)](...h[a(475)](t=>t[a(537)])),b=c[a(437)]+":"+B[a(412)].getCellNameFromCoords(h-1,b-1),e[a(403)](a(446),a(671)+b+a(321));c.size=[l,f]},Sa=function(b,c){var e=b[a(361)]||[],f=b.columns||[];const d=b[a(322)]||[];if(0===e[a(537)]&&0===f[a(537)]&&0===d.length)return null;var g=b[a(666)];g=J(g);c=c[a(506)](g[0]);var l=c[a(286)],k=B.helpers[a(402)](g[1]);g=[];for(var n=k[1];n<=k[3];n++){var h=l[n],u=[];for(let m=k[0];m<=
|
|
259
|
+
k[2];m++){c[a(372)](m,n);const p=h&&h[m]||c[a(589)](m,n);u[a(310)](p?p.v:null)}g[a(310)](u)}const {obj:q,fieldsPossibleValues:r}=Ka(b,g);l=e[a(537)];n=f.length;h=Array(l)[a(428)](null);k=g[0];c=[];if(0<n){for(u=0;u<n;u++)h.push(k[f[u][a(290)]]);1<d.length&&h[a(310)](a(343));c[a(310)](h)}f=[l,0<n?n+1+(0===n||1<d[a(537)]?1:0):1];n={};Na(f,c[a(537)],b,r,c,g,q,n);for(g=f[1]-1;c[a(537)]<=g;)c.push([]);g=c[g];for(h=0;h<l;h++)g[h]=k[e[h][a(290)]];g={headerHeight:f[1]-1,hasHighlightedColumn:1<l};e[a(537)]&&
|
|
260
|
+
(e=Ma(f[1],b,r,c,q,n),g[a(569)]=e);return 0!==d[a(537)]&&La(f[0],f[1],b,r,c,q),{data:c,groups:n,styleInfo:g}},L=function(b,c){const e=Sa(b,c);qa(c,()=>{Ra(e,b,c)})},ba=[a(361),a(540)],V=[a(322),a(361),a(540),"filters"],ma=V.length,ya=(b,c)=>{const e={columnIndex:b[a(290)]};c===a(322)?(e.id=jSuites.guid(),e[a(504)]=a(548)):"rows"!==c&&"columns"!==c||(e[a(471)]=b[a(471)]||"name",e.ascendingOrder=typeof b[a(567)]===a(658)?b[a(567)]:!0,typeof b[a(662)]!==a(658)||(e.collapsed=b[a(662)]));return e},Ta=
|
|
261
|
+
function(){let b=this;b[a(361)]=[];b[a(540)]=[];b[a(322)]=[];b.filters=[];b.fields=[];b[a(607)]=!0;const c=f=>f?f[a(475)](d=>({...d,columnName:b[a(420)][d[a(290)]]})):[];b[a(657)]=function(){const f={text:x("Name"),value:a(530)};if(!b[a(482)].cells)return[f];const d=b[a(482)][a(322)][a(475)](g=>({text:g[a(504)]+a(565)+b[a(420)][g[a(290)]],value:g.id}));return d[a(549)](f),d};b[a(620)]=function(f){return function(){const d=a0_0x38ed,g=b[d(657)]();b[f]=c(b[d(482)][f])[d(475)](l=>(l[d(488)]=G(g),l));
|
|
262
|
+
b[d(563)](f)}};b[a(377)]=b[a(620)](a(361));b[a(580)]=b[a(620)]("columns");b.updateCells=function(){b[a(322)]=c(b[a(482)][a(322)]);b[a(563)](a(322))};b[a(441)]=function(){b.filters=c(b[a(482)][a(524)])[a(475)](({filter:f,...d})=>(d[a(305)]=f,d));b.refresh(a(524))};b[a(573)]=function(){var f=J(b.pivotTable[a(666)]);const d=B[a(412)][a(402)](f[1]);d[3]=d[1];const g=J(B[a(412)][a(450)](d))[1];f=b[a(411)][a(287)](f[0]+"!"+g);b[a(420)]=f[0][a(475)]((l,k)=>typeof l!==a(383)&&null!==l&&""!==l?l:a(542)+B[a(412)][a(582)](k+
|
|
263
|
+
d[0]));b[a(637)]();b[a(377)]();b[a(580)]();b[a(441)]()};b[a(364)]=function(){b[a(482)]=b[a(411)].options.pivotTables[b[a(293)]];b[a(666)]=b[a(482)][a(666)];b[a(528)][a(309)]=b.source;b[a(573)]()};b[a(615)]=function(){b[a(364)]();b.oldSource=b.pivotTable[a(666)];b.modal[a(615)]()};b.createPicker=f=>function(d){const g=jSuites[a(447)](d,{data:[],content:a(351),onchange:function(l,k,n,h,u){l={columnIndex:b[a(420)][a(396)](n),sortBy:a(530),ascendingOrder:!0};k=G(b[a(482)]);!k[f]&&(k[f]=[]);k[f][a(310)](l);
|
|
264
|
+
H.call(b[a(411)],k)}});d.children[0].addEventListener("mousedown",function(){const l=[...b[a(361)],...b[a(540)]][a(475)](n=>n[a(290)]),k=b[a(420)][a(424)]((n,h)=>!l[a(644)](h));g[a(501)]({data:k});g[a(615)]()})};b[a(647)]=b[a(669)](a(361));b[a(398)]=b.createPicker(a(540));b[a(667)]=function(f){const d=jSuites[a(447)](f,{data:[],content:"add",onchange:function(g,l,k,n,h){g={id:jSuites[a(444)](),columnIndex:b[a(420)].indexOf(k),method:a(548)};l=G(b[a(482)]);!l[a(322)]&&(l[a(322)]=[]);l[a(322)][a(310)](g);
|
|
265
|
+
H[a(465)](b.instance,l)}});f[a(511)][0][a(453)]("mousedown",function(){d[a(501)]({data:b[a(420)]});d.open()})};b.createFilterPicker=function(f){const d=jSuites[a(447)](f,{data:[],content:"add",onchange:function(g,l,k,n,h){g={columnIndex:b[a(420)].indexOf(k)};l=G(b[a(482)]);!l[a(524)]&&(l[a(524)]=[]);l[a(524)][a(310)](g);H[a(465)](b[a(411)],l)}});f[a(511)][0][a(453)](a(479),function(){const g=b[a(524)].map(k=>k[a(290)]),l=b[a(420)][a(424)]((k,n)=>!g[a(644)](n));d.setOptions({data:l});d[a(615)]()})};
|
|
266
|
+
const e=function(){var f=b.source;const d=G(b[a(482)]),g=d[a(666)];d[a(666)]=f;f=J(f);f=B[a(412)].getCoordsFromRange(f[1]);const l=f[2]-f[0]+1;V.forEach(k=>{var n=d[k];n&&(n=n[a(424)](h=>h.columnIndex<l),ba[a(644)](k)&&n[a(384)](h=>{h[a(471)]!==a(530)&&0>d[a(322)][a(663)](u=>u.id===h.sortBy)&&(h[a(471)]=a(530),h[a(567)]=!0)}),d[k]=n)});H.call(b[a(411)],d);za(d,b.instance,g)};return b[a(318)]=function(){B[a(447)](b[a(528)],{worksheetName:!0,onchange:function(f){b[a(666)]=f}});b[a(528)].addEventListener(a(454),
|
|
267
|
+
function(f){try{oa(b[a(666)])}catch(d){jSuites.notification({error:1,message:x(d.message)});b[a(528)].innerText=b[a(535)];return}b[a(535)]=b.source;e()})},b.updateField=function(f){return function(d,g){const l=a0_0x38ed,k=G(b.pivotTable),n=k[f][l(634)](h=>h[l(290)]===d);Object.entries(g)[l(384)](([h,u])=>{n[h]=u});H.call(b[l(411)],k)}},b[a(520)]=b[a(381)](a(361)),b.updateColumn=b[a(381)](a(540)),b.updateFilter=b[a(381)](a(524)),b[a(491)]=function(f){return function(d){const g=a0_0x38ed,l=G(b[g(482)]),
|
|
268
|
+
k=l[f],n=k[g(663)](h=>h.columnIndex===d);k[g(333)](n,1);H[g(465)](b[g(411)],l)}},b.removeRow=b[a(491)](a(361)),b[a(597)]=b[a(491)](a(540)),b[a(472)]=b.removeField(a(524)),b[a(433)]=function(f,d){const g=G(b.pivotTable),l=g[a(322)][a(634)](k=>k.id===f);Object.entries(d)[a(384)](([k,n])=>{l[k]=n});H[a(465)](b[a(411)],g)},b.removeCell=function(f){const d=G(b.pivotTable),g=d[a(322)][a(663)](l=>l.id===f);d[a(322)][a(333)](g,1);[...(d[a(361)]||[]),...(d[a(540)]||[])][a(384)](l=>{l[a(471)]===f&&(l.sortBy=
|
|
269
|
+
"name",l[a(567)]=!0)});H[a(465)](b[a(411)],d)},b.moveItem=function(f){return function(d,g,l){const k=a0_0x38ed,n=G(b[k(482)]);!n[g]&&(n[g]=[]);var h=n[f];const u=typeof d===k(370)?h[k(663)](r=>r.columnIndex===d):h[k(663)](r=>r.id===d),q=h[k(333)](u,1)[0];h=n[g];if(f===g)h.splice(l,0,q);else if("cells"===g)g=ya(q,g),h[k(333)](l,0,g);else{f===k(322)&&ba[k(384)](m=>{(n[m]||[])[k(384)](p=>{p.sortBy===q.id&&(p.sortBy="name",p[k(567)]=!0)})});const r=q[k(290)];("filters"===g?h:[...(n[k(361)]||[]),...(n[k(540)]||
|
|
270
|
+
[])]).some(m=>m[k(290)]===r)||(g=ya(q,g),h[k(333)](l,0,g))}H[k(465)](b.instance,n)}},b[a(559)]=b[a(645)](a(361)),b[a(512)]=b[a(645)](a(540)),b[a(303)]=b.moveItem("cells"),b[a(570)]=b[a(645)](a(524)),b[a(566)]=function(f){f===a(322)&&(b[a(377)](),b[a(580)]())},f=>f`
|
|
272
271
|
<div class="jss_object">
|
|
273
|
-
<lm-modal icon="pivot_table_chart" title="${x(a(
|
|
272
|
+
<lm-modal icon="pivot_table_chart" title="${x(a(571))}" position="right" overflow="true" :ref="self.modal" :closable="true" :width="600" :height="600" :closed="true" :onclose="self.cancel" :focus="false">
|
|
274
273
|
<div>
|
|
275
274
|
<div class="pivot-table-config lm-p10">
|
|
276
275
|
<div>
|
|
@@ -281,7 +280,7 @@ b[a(765)]=b[a(634)]("columns"),b.moveCell=b[a(634)](a(646)),b[a(443)]=b[a(634)](
|
|
|
281
280
|
</div>
|
|
282
281
|
<div>
|
|
283
282
|
<div class="pivot-table-title">
|
|
284
|
-
<h3>${x(
|
|
283
|
+
<h3>${x(a(418))}</h3>
|
|
285
284
|
</div>
|
|
286
285
|
<div class="pivot-table-title">
|
|
287
286
|
<div class="lm-form-group">
|
|
@@ -291,7 +290,7 @@ b[a(765)]=b[a(634)]("columns"),b.moveCell=b[a(634)](a(646)),b[a(443)]=b[a(634)](
|
|
|
291
290
|
</div>
|
|
292
291
|
<div>
|
|
293
292
|
<div class="pivot-table-title">
|
|
294
|
-
<h3>${x(a(
|
|
293
|
+
<h3>${x(a(339))}</h3>
|
|
295
294
|
<div :ready="self.createRowPicker"></div>
|
|
296
295
|
</div>
|
|
297
296
|
<div :loop="self.rows" class="pivot-table-config-list" id="pivot-table-rows-list">
|
|
@@ -309,7 +308,7 @@ b[a(765)]=b[a(634)]("columns"),b.moveCell=b[a(634)](a(646)),b[a(443)]=b[a(634)](
|
|
|
309
308
|
</div>
|
|
310
309
|
<div>
|
|
311
310
|
<div class="pivot-table-title">
|
|
312
|
-
<h3>${x(
|
|
311
|
+
<h3>${x(a(422))}</h3>
|
|
313
312
|
<div :ready="self.createColumnPicker"></div>
|
|
314
313
|
</div>
|
|
315
314
|
<div :loop="self.columns" class="pivot-table-config-list" id="pivot-table-columns-list">
|
|
@@ -327,7 +326,7 @@ b[a(765)]=b[a(634)]("columns"),b.moveCell=b[a(634)](a(646)),b[a(443)]=b[a(634)](
|
|
|
327
326
|
</div>
|
|
328
327
|
<div>
|
|
329
328
|
<div class="pivot-table-title">
|
|
330
|
-
<h3>${x(a(
|
|
329
|
+
<h3>${x(a(343))}</h3>
|
|
331
330
|
<div :ready="self.createCellPicker"></div>
|
|
332
331
|
</div>
|
|
333
332
|
<div :loop="self.cells" class="pivot-table-config-list" id="pivot-table-cells-list">
|
|
@@ -344,7 +343,7 @@ b[a(765)]=b[a(634)]("columns"),b.moveCell=b[a(634)](a(646)),b[a(443)]=b[a(634)](
|
|
|
344
343
|
</div>
|
|
345
344
|
<div>
|
|
346
345
|
<div class="pivot-table-title">
|
|
347
|
-
<h3>${x(
|
|
346
|
+
<h3>${x("Filters")}</h3>
|
|
348
347
|
<div :ready="self.createFilterPicker"></div>
|
|
349
348
|
</div>
|
|
350
349
|
<div :loop="self.filters" class="pivot-table-config-list" id="pivot-table-filters-list">
|
|
@@ -365,19 +364,20 @@ b[a(765)]=b[a(634)]("columns"),b.moveCell=b[a(634)](a(646)),b[a(443)]=b[a(634)](
|
|
|
365
364
|
</div>
|
|
366
365
|
</lm-modal>
|
|
367
366
|
</div>
|
|
368
|
-
`},
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
u.
|
|
373
|
-
|
|
374
|
-
!
|
|
375
|
-
h[
|
|
376
|
-
|
|
377
|
-
v[a(
|
|
378
|
-
q<m&&m++;if(m>A&&m<A+y)return!1;
|
|
379
|
-
h[a(
|
|
380
|
-
w[a(
|
|
381
|
-
v);break}}}}},onbeforeinsertcolumn:
|
|
382
|
-
|
|
383
|
-
c,{Create:
|
|
367
|
+
`},Qa={createCell:(b,c,e,f,d,g)=>{b[a(522)]='<i class="material-icons">pivot_table_chart</i>'},updateCell:(b,c)=>!1,openEditor:(b,c,e,f,d)=>!1,closeEditor:()=>!1},Oa={createCell:(b,c,e,f,d,{options:g})=>{const l=()=>{const k=a0_0x38ed,{columnIndex:n,pivotTableId:h}=g,u=G(d[k(378)][k(494)].find(r=>h===r.id)),q=(u[k(361)]||[]).concat(u[k(540)]||[]).find(r=>r.columnIndex===n);if(g[k(499)]){if(q[k(662)]){const r=q[k(662)][k(396)](g[k(661)]);q[k(662)][k(333)](r,1)}}else!q[k(662)]&&(q[k(662)]=[]),
|
|
368
|
+
0>q.collapsed[k(396)](g.value)&&q[k(662)][k(310)](g[k(661)]);H[k(465)](d,u)};e=document.createElement(a(375));e.classList[a(351)](a(392));f=document[a(601)]("i");f[a(309)]=g[a(499)]?"add":a(468);f[a(328)][a(351)]("material-icons");f.onmousedown=k=>{k[a(664)]()};f[a(555)]=k=>{k[a(664)]();l()};e[a(514)](f);f=document[a(601)](a(375));f[a(309)]=c||"";e[a(514)](f);b.innerHTML="";b[a(514)](e)},updateCell:(b,c)=>{(b=b&&b[a(511)][0]&&b.children[0].children[1])&&(b.innerText=c||"")},openEditor:(b,c,e,f,d)=>
|
|
369
|
+
!1,closeEditor:()=>!1},Ua=function(b,c){Object[a(413)](this,b,{get:c,configurable:!1,enumerable:!1,extensible:!1})},Va=(b,c)=>{const e=c.w[a(378)].pivotTables,f=e[a(663)](d=>c.id===d.id);e[f]=G(b);L(e[f],c.w)},Wa=function(b,{from:c,to:e,quantity:f},d){if(b<c)return b>=e?b+f:b;if(b>c+f-1)return b<=e?b-f:b;b=e+b-c;return b<d[0]||b>d[2]?void 0:b},Xa=function(b,c){const e=c[a(537)];for(let f=0;f<e;f++)b>=c[f]&&b++;return b},Ya=function(b,c){const e=c[a(537)];let f=0;for(;f<e;){const d=c[f];if(b<d)break;
|
|
370
|
+
else if(b===d)return;f++}return b-f},Aa=(b,c)=>{const {value:e,updates:f}=b;b=c.w.options[a(494)][a(634)](p=>c.id===p.id);e&&(b[a(666)]=e,c[a(445)]=e);var d=J(b[a(666)]);const g=B.helpers.getCoordsFromRange(d[1]);if(f.movedColumns){let p,v;d=Object[a(320)](f[a(365)]);d.forEach(w=>{w[0]=parseInt(w[0]);("undefined"===typeof p||w[0]<p)&&(p=w[0],v=w[1])});d=d[a(537)];d={from:p,to:v,quantity:d};var l=b[a(322)];for(var k=0;k<ma;k++){var n=V[k],h=b[n];if(h){var u=[],q=h.length;for(var r=0;r<q;r++){const w=
|
|
371
|
+
h[r];var m=Wa(w[a(290)]+g[0],d,g);typeof m!==a(383)?w[a(290)]=m-g[0]:u[a(310)](r);ba.includes(n)&&w[a(471)]!==a(530)&&!l.find(t=>t.id===w.sortBy)&&(w[a(471)]=a(530),w[a(567)]=!0)}u[a(353)]((w,t)=>t-w);n=u[a(537)];for(q=0;q<n;q++)h[a(333)](u[q],1)}}}else if(f[a(612)])for(d=f.insertedColumns.map(p=>p-g[0]),l=0;l<ma;l++){if(k=b[V[l]])for(h=k.length,u=0;u<h;u++)n=k[u],n[a(290)]=Xa(n[a(290)],d)}else if(f[a(484)])for(d=[...(new Set(f.deletedColumns))][a(353)]((p,v)=>p-v).map(p=>p-g[0]),l=b[a(322)],k=0;k<
|
|
372
|
+
ma;k++)if(n=V[k],h=b[n]){u=[];q=h[a(537)];for(r=0;r<q;r++){const p=h[r];m=Ya(p[a(290)],d);typeof m!==a(383)?p[a(290)]=m:u[a(310)](r);ba[a(644)](n)&&p[a(471)]!==a(530)&&!l[a(634)](v=>v.id===p[a(471)])&&(p[a(471)]=a(530),p.ascendingOrder=!0)}u.sort((p,v)=>v-p);n=u.length;for(q=0;q<n;q++)h[a(333)](u[q],1)}L(b,c.w)},za=(b,c,e)=>{!c[a(302)][a(348)]&&(c[a(302)].pivot=[]);const {id:f}=b;if(e){var d=c[a(302)].pivot[a(663)](g=>g.id===f);-1<d&&(d=c[a(302)][a(348)][a(333)](d,1)[0],c[a(376)](d,e))}e={type:a(348),
|
|
373
|
+
id:f,range:b.source,handler:function(g,l){if(l){if(B.history.progress)return!1;var k=Y(f,c);const n=G(k);B[a(622)][a(538)]=!0;B.history[a(465)](c[a(665)],{worksheet:c,undo:()=>{Va(n,g)},redo:()=>{Aa(l,g)}});B.history[a(538)]=!1;Aa(l,g)}else k=Y(f,c),L(k,c)}};Ua[a(465)](e,"w",()=>c);c[a(302)][a(348)].push(e);c[a(376)](e,b[a(666)],!0)},Za=function(b){let c={openCreateModal:function(h){const u=a0_0x38ed;c[u(508)][u(411)]=h;c.create.source=h[u(297)]();c[u(508)].open()}};c[a(296)]=function(h,u){c[a(301)][a(411)]=
|
|
374
|
+
h;c[a(301)][a(293)]=u;c.edit[a(615)]()};const e=function(h,u,q){h=h[a(378)][a(494)];if(!h)return-1;for(let m=0;m<h.length;m++){var r=h[m];if(!r[a(426)])continue;const p=B.helpers[a(517)](r[a(437)]),v=p[0]+r[a(426)][0]-1;r=p[1]+r[a(426)][1]-1;if(u>=p[0]&&u<=v&&q>=p[1]&&q<=r)return m}return-1};c[a(627)]=function(h,u,q,r,m,p){if(p!==a(598)||!c[a(301)]||c.edit[a(607)])return m;const v=e(h,u,q);return-1===v?m:(m.unshift({title:x(a(576)),icon:"pivot_table_chart",onclick:function(){c[a(296)](h,v)}},{type:a(325)}),
|
|
375
|
+
m)};c[a(629)]=function(h){return h.items[a(310)]({content:a(452),type:"i",tooltip:x("Insert pivot table"),onclick:function(){c.openCreateModal(B[a(628)])},updateState:function(u,q,r,m){m[a(425)]()?r[a(328)].remove(a(587)):r[a(328)].add("jtoolbar-disabled")}}),h};var f=h=>function(u,q,r){if(u=q.options.pivotTables){q=u[a(537)];r=r[a(475)](p=>p[h?"row":a(329)]);const m=h?1:0;for(let p=0;p<q;p++){const v=u[p],w=B[a(412)][a(517)](v[a(437)]);let t=w[m];const z=v[a(426)][m];for(let A=0;A<r[a(537)];A++){const y=
|
|
376
|
+
r[A];if(y<=t)t++;else if(y<t+z)return!1}h?v[a(437)]=B.helpers[a(324)](w[0],t):v[a(437)]=B[a(412)][a(324)](t,w[1])}}},d=h=>function(u,q,r){if(u=q[a(378)][a(494)]){q=u.length;const m=h?1:0;for(let p=0;p<q;p++){const v=u[p],w=B[a(412)][a(517)](v.anchor);let t=w[m];const z=v[a(426)][m];for(let A=r[a(537)]-1;-1<A;A--){const y=r[A];if(y<t)t--;else if(y<t+z)return!1}h?v[a(437)]=B[a(412)].getCellNameFromCoords(w[0],t):v[a(437)]=B[a(412)].getCellNameFromCoords(t,w[1])}}};const g=h=>function(u,q,r,m,p){if(u=
|
|
377
|
+
q.options[a(494)]){q=h?1:0;const v=u[a(537)];for(let w=0;w<v;w++){const t=u[w],z=B[a(412)].getCoordsFromCellName(t.anchor);let A=z[q];const y=t[a(426)][q];if(r<A+y&&r+p-1>=A)return!1;r<m&&m++;if(m>A&&m<A+y)return!1;r>m?r>A&&m<=A&&(A+=p):r<A&&m>A&&(A-=p);h?t[a(437)]=B.helpers[a(324)](z[0],A):t.anchor=B[a(412)][a(324)](A,z[1])}}},l=(h,u)=>{if(h=h[a(378)][a(494)]){const q=h.length;for(let r=0;r<q;r++){const m=h[r];if(u[3]-u[1]+1!==m.size[1]||u[2]-u[0]+1!==m[a(426)][0])continue;const p=B[a(412)][a(517)](m[a(437)]);
|
|
378
|
+
if(u[0]===p[0]&&u[1]===p[1])return m}}return null},k=new Set,n={onselection:function(h,u,q,r,m,p){if(c[a(301)]&&c[a(301)][a(607)])if(q===m&&r===p)if(h=u[a(378)][a(494)])if(m=h[a(537)],0!==m)for(let v=0;v<m;v++){p=h[v];const w=B[a(412)][a(517)](p[a(437)]);w[a(310)](w[0]+p.size[0]-1,w[1]+p.size[1]-1);if(q>=w[0]&&q<=w[2]&&r>=w[1]&&r<=w[3]){setTimeout(()=>{c[a(296)](u,v)},100);break}else!c[a(301)].modal[a(632)]&&c[a(301)][a(529)].close()}else c[a(301)][a(529)][a(362)]();else c.edit[a(529)][a(362)]();
|
|
379
|
+
else c.edit.modal[a(362)]()},onbeforechanges:function(h,u,q){if(h=u.options[a(494)]){const r=h[a(537)],m=q.length;for(let p=0;p<r;p++){const v=h[p],w=B[a(412)].getCoordsFromCellName(v.anchor);w[a(310)](w[0]+v[a(426)][0]-1,w[1]+v[a(426)][1]-1);for(let t=0;t<m;t++){const z=q[t];if(u[a(291)](z.x,z.y,w)){da(v,u);v.size=void 0;k.add(v);break}}}}},onafterchanges:function(h,u,q){if(h=u[a(378)][a(494)]){const m=h[a(537)];for(let p=0;p<m;p++){const v=h[p];if(k[a(578)](v)){L(v,u);k[a(561)](v);continue}var r=
|
|
380
|
+
v[la];if(!r)continue;const {x:w,y:t}=r;r=q;const z=r.length;for(let A=0;A<z;A++){const y=r[A];if(y.y===t&&y.x===w){typeof y[a(661)]!==a(383)&&null!==y[a(661)]&&""!==y[a(661)]||L(v,u);break}}}}},onbeforeinsertcolumn:f(!1),onbeforedeletecolumn:d(!1),onbeforemovecolumn:g(!1),onbeforeinsertrow:f(!0),onbeforedeleterow:d(!0),onbeforemoverow:g(!0),onbeforepaste:function(h,u,q,r,m,p){if(p[a(586)]&&1===p[a(586)][a(537)]&&(h=p.worksheet,q=l(h,[p[a(358)][0],p[a(358)][1],p.selection[0]+q[0][a(537)]-1,p.selection[1]+
|
|
381
|
+
q[a(537)]-1])))return r=B[a(412)][a(324)](r,m),p.cut?(Fa(h,u,q.id,r),B[a(656)][a(534)][a(465)](h,!0)):(u=G(q),u.id=jSuites[a(444)](),u[a(437)]=r,H[a(465)](h,u)),!1},onkeydown:function(h,u,q){q[a(641)]===a(532)&&(h=u.getHighlighted(),1===h.length&&(h=l(u,h[0]))&&ta[a(465)](u,h.id))}};c[a(599)]=function(h){const u=n[h];if(u)return u.apply(this,arguments)};c[a(294)]=function(h){h.setPivotTable=function(q){const r=a0_0x38ed;return!q.id&&(q.id=jSuites[r(444)]()),H[r(465)](this,q),Y(q.id,this)};h[a(421)]=
|
|
382
|
+
function(q){ta.call(this,q)};const u=h.options[a(494)];if(u){const q=u[a(537)];for(let r=0;r<q;r++){const m=u[r];L(m,h);za(m,h)}}};f=function(){let h=a(360);return lemonade.element(h,c,{Create:Ca,Edit:Ta})};"undefined"!==typeof document&&b[a(594)]&&(d=document[a(601)](a(375)),b.tools[a(543)](d),lemonade[a(610)](f,d));return c},na=function(b){return!0};return na[a(536)]=function(b){var c;const e=a0_0x38ed;var f="";(c=(8==b[e(416)]?(!b.scope||-1==b.scope[e(396)]("pivot"))&&(f=e(473)):f=e(551),f))?console[a(407)](c):
|
|
383
|
+
b[a(405)]({pivot:Za})},na[a(304)]=function(){null===B&&(B=this)},na});
|
package/package.json
CHANGED
|
@@ -27,11 +27,11 @@
|
|
|
27
27
|
],
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"lemonadejs": "^5.3.6",
|
|
30
|
-
"jsuites": "^6.
|
|
30
|
+
"jsuites": "^6.5.0"
|
|
31
31
|
},
|
|
32
32
|
"main": "dist/index.js",
|
|
33
33
|
"types": "dist/index.d.ts",
|
|
34
|
-
"version": "8.0.
|
|
34
|
+
"version": "8.0.1",
|
|
35
35
|
"bugs": "https://github.com/jspreadsheet/pro/issues",
|
|
36
36
|
"homepage": "https://github.com/jspreadsheet/pro",
|
|
37
37
|
"download": "https://github.com/jspreadsheet/pro/archive/master.zip"
|