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