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