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