@progress/kendo-spreadsheet-common 1.2.6-develop.1 → 1.2.6-develop.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-esm.js +119 -340
- package/dist/index.js +119 -340
- package/package.json +6 -4
package/dist/index-esm.js
CHANGED
|
@@ -3,14 +3,12 @@ import { dayOfWeek, getDate, addDays, firstDayOfMonth } from '@progress/kendo-da
|
|
|
3
3
|
import { browser } from '@progress/kendo-common';
|
|
4
4
|
import JSZip from '@progress/jszip-esm';
|
|
5
5
|
|
|
6
|
-
/* eslint-disable camelcase */
|
|
7
|
-
/* eslint-disable no-nested-ternary */
|
|
8
6
|
/* eslint-disable max-params */
|
|
9
7
|
/* eslint-disable no-unused-vars */
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
14
12
|
|
|
15
13
|
// WARNING
|
|
16
14
|
// == into === to make JSHint happy will break functionality.
|
|
@@ -791,7 +789,7 @@ class UnionRef extends Ref {
|
|
|
791
789
|
return NULLREF;
|
|
792
790
|
}
|
|
793
791
|
simplify() {
|
|
794
|
-
|
|
792
|
+
|
|
795
793
|
let u = new UnionRef(this.refs.reduce(function(a, ref) {
|
|
796
794
|
ref = ref.simplify();
|
|
797
795
|
if (ref !== NULLREF) {
|
|
@@ -944,7 +942,6 @@ SHEETREF.print = function() {
|
|
|
944
942
|
return "#SHEET";
|
|
945
943
|
};
|
|
946
944
|
|
|
947
|
-
/* eslint-disable key-spacing */
|
|
948
945
|
const messages = {};
|
|
949
946
|
messages.view = {
|
|
950
947
|
nameBox: "Name Box",
|
|
@@ -1002,6 +999,7 @@ const options = {
|
|
|
1002
999
|
fileName: "Workbook.xlsx",
|
|
1003
1000
|
forceProxy: false,
|
|
1004
1001
|
proxyURL: "",
|
|
1002
|
+
applyProtection: false,
|
|
1005
1003
|
},
|
|
1006
1004
|
messages: messages,
|
|
1007
1005
|
pdf: {
|
|
@@ -1078,8 +1076,6 @@ const keys = {
|
|
|
1078
1076
|
R: 82
|
|
1079
1077
|
};
|
|
1080
1078
|
|
|
1081
|
-
/* eslint-disable no-nested-ternary */
|
|
1082
|
-
/* eslint-disable no-param-reassign */
|
|
1083
1079
|
/* eslint-disable no-prototype-builtins */
|
|
1084
1080
|
|
|
1085
1081
|
const RX_UNICODE_LETTER = new RegExp("[\\u0041-\\u005A\\u0061-\\u007A\\u00AA\\u00B5\\u00BA\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u08A0-\\u08B2\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0980\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C\\u0B5D\\u0B5F-\\u0B61\\u0B71\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D\\u0C58\\u0C59\\u0C60\\u0C61\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD\\u0CDE\\u0CE0\\u0CE1\\u0CF1\\u0CF2\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D\\u0D4E\\u0D60\\u0D61\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E46\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EDC-\\u0EDF\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u1820-\\u1877\\u1880-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19C1-\\u19C7\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1CE9-\\u1CEC\\u1CEE-\\u1CF1\\u1CF5\\u1CF6\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2E2F\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B\\uA640-\\uA66E\\uA67F-\\uA69D\\uA6A0-\\uA6EF\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA78E\\uA790-\\uA7AD\\uA7B0\\uA7B1\\uA7F7-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uA9E0-\\uA9E4\\uA9E6-\\uA9EF\\uA9FA-\\uA9FE\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA76\\uAA7A\\uAA7E-\\uAAAF\\uAAB1\\uAAB5\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-\\uAAF4\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB5F\\uAB64\\uAB65\\uABC0-\\uABE2\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]");
|
|
@@ -1343,7 +1339,7 @@ const insertAfter = function(newElement, after) {
|
|
|
1343
1339
|
const _activeElement$1 = function() {
|
|
1344
1340
|
try {
|
|
1345
1341
|
return document.activeElement;
|
|
1346
|
-
} catch
|
|
1342
|
+
} catch {
|
|
1347
1343
|
return document.documentElement.activeElement;
|
|
1348
1344
|
}
|
|
1349
1345
|
};
|
|
@@ -1408,9 +1404,7 @@ function createKendoObj(calc, CalcError, Ref, CellRef, RangeRef) {
|
|
|
1408
1404
|
}
|
|
1409
1405
|
|
|
1410
1406
|
/* eslint-disable max-params */
|
|
1411
|
-
|
|
1412
|
-
/* eslint-disable no-unused-vars */
|
|
1413
|
-
|
|
1407
|
+
|
|
1414
1408
|
|
|
1415
1409
|
let calc = {
|
|
1416
1410
|
runtime: {
|
|
@@ -2916,8 +2910,6 @@ calc.runtime.defineAlias = defineAlias$1;
|
|
|
2916
2910
|
calc.runtime.InputStream = InputStream;
|
|
2917
2911
|
calc.runtime.ParseError = ParseError;
|
|
2918
2912
|
|
|
2919
|
-
/* eslint-disable indent */
|
|
2920
|
-
|
|
2921
2913
|
function Node() {
|
|
2922
2914
|
this.node = null;
|
|
2923
2915
|
}
|
|
@@ -4136,30 +4128,6 @@ const formatting = {
|
|
|
4136
4128
|
makeDateFormat: makeDateFormat
|
|
4137
4129
|
};
|
|
4138
4130
|
|
|
4139
|
-
/* eslint-disable no-nested-ternary */
|
|
4140
|
-
/* eslint-disable space-infix-ops */
|
|
4141
|
-
/* eslint-disable indent */
|
|
4142
|
-
/* eslint-disable no-empty */
|
|
4143
|
-
/* eslint-disable no-loop-func */
|
|
4144
|
-
/* eslint-disable consistent-return */
|
|
4145
|
-
/* eslint-disable block-scoped-var */
|
|
4146
|
-
/* eslint-disable no-redeclare */
|
|
4147
|
-
/* eslint-disable no-var */
|
|
4148
|
-
/* eslint-disable eqeqeq */
|
|
4149
|
-
/* eslint-disable complexity */
|
|
4150
|
-
/* eslint-disable max-params */
|
|
4151
|
-
/* eslint-disable no-implicit-coercion */
|
|
4152
|
-
/* eslint-disable key-spacing */
|
|
4153
|
-
/* eslint-disable default-case */
|
|
4154
|
-
/* eslint-disable camelcase */
|
|
4155
|
-
/* eslint-disable brace-style */
|
|
4156
|
-
/* eslint-disable no-else-return */
|
|
4157
|
-
/* eslint-disable no-constant-condition */
|
|
4158
|
-
/* eslint-disable no-param-reassign */
|
|
4159
|
-
/* eslint-disable space-before-blocks */
|
|
4160
|
-
/* eslint-disable no-unused-labels */
|
|
4161
|
-
|
|
4162
|
-
|
|
4163
4131
|
const kendo = createKendoObj(calc, CalcError, Ref, CellRef, RangeRef);
|
|
4164
4132
|
calc.kendo = kendo; // XXX
|
|
4165
4133
|
calc.formatting = formatting;
|
|
@@ -5765,8 +5733,6 @@ class ValidationFormulaContext extends FormulaContext {
|
|
|
5765
5733
|
|
|
5766
5734
|
calc.ValidationFormulaContext = ValidationFormulaContext;
|
|
5767
5735
|
|
|
5768
|
-
/* eslint-disable no-param-reassign */
|
|
5769
|
-
|
|
5770
5736
|
let KEY_NAMES$1 = {
|
|
5771
5737
|
8: 'backspace',
|
|
5772
5738
|
9: 'tab',
|
|
@@ -5963,14 +5929,6 @@ class EventListener {
|
|
|
5963
5929
|
}
|
|
5964
5930
|
}
|
|
5965
5931
|
|
|
5966
|
-
/* eslint-disable default-case */
|
|
5967
|
-
/* eslint-disable no-else-return */
|
|
5968
|
-
/* eslint-disable key-spacing */
|
|
5969
|
-
/* eslint-disable eqeqeq */
|
|
5970
|
-
/* eslint-disable brace-style */
|
|
5971
|
-
/* eslint-disable consistent-return */
|
|
5972
|
-
|
|
5973
|
-
|
|
5974
5932
|
let alphaNumRegExp = /:alphanum$/;
|
|
5975
5933
|
|
|
5976
5934
|
let ACTIONS = {
|
|
@@ -7812,11 +7770,6 @@ class SparseRangeList extends RangeList {
|
|
|
7812
7770
|
}
|
|
7813
7771
|
}
|
|
7814
7772
|
|
|
7815
|
-
/* eslint-disable default-case */
|
|
7816
|
-
/* eslint-disable camelcase */
|
|
7817
|
-
/* eslint-disable no-param-reassign */
|
|
7818
|
-
|
|
7819
|
-
|
|
7820
7773
|
class Property {
|
|
7821
7774
|
constructor(list) {
|
|
7822
7775
|
this.list = list;
|
|
@@ -7884,8 +7837,10 @@ const propertyBagSpec = [
|
|
|
7884
7837
|
{ property: ValueProperty, name: "value", value: null, sortable: true, serializable: true, depends: "format" },
|
|
7885
7838
|
{ property: Property, name: "formula", value: null, sortable: true, serializable: true },
|
|
7886
7839
|
{ property: Property, name: "background", value: null, sortable: true, serializable: true },
|
|
7887
|
-
{ property: JsonProperty, name: "
|
|
7888
|
-
{ property: JsonProperty, name: "
|
|
7840
|
+
{ property: JsonProperty, name: "borderLeft", value: null, sortable: false, serializable: true },
|
|
7841
|
+
{ property: JsonProperty, name: "borderRight", value: null, sortable: false, serializable: true },
|
|
7842
|
+
{ property: JsonProperty, name: "borderTop", value: null, sortable: false, serializable: true },
|
|
7843
|
+
{ property: JsonProperty, name: "borderBottom", value: null, sortable: false, serializable: true },
|
|
7889
7844
|
{ property: JsonProperty, name: "dBorders", value: null, sortable: false, serializable: true },
|
|
7890
7845
|
{ property: Property, name: "color", value: null, sortable: true, serializable: true },
|
|
7891
7846
|
{ property: Property, name: "fontFamily", value: null, sortable: true, serializable: true },
|
|
@@ -7984,44 +7939,41 @@ class PropertyBag {
|
|
|
7984
7939
|
if (index === undefined) {
|
|
7985
7940
|
return this.lists[name];
|
|
7986
7941
|
}
|
|
7987
|
-
|
|
7988
|
-
switch (name) {
|
|
7989
|
-
case "borderRight":
|
|
7990
|
-
index += this.rowCount;
|
|
7991
|
-
/* falls through */
|
|
7992
|
-
case "borderLeft":
|
|
7993
|
-
name = "vBorders";
|
|
7994
|
-
break;
|
|
7995
|
-
|
|
7996
|
-
case "borderBottom":
|
|
7997
|
-
index++;
|
|
7998
|
-
/* falls through */
|
|
7999
|
-
case "borderTop":
|
|
8000
|
-
name = "hBorders";
|
|
8001
|
-
break;
|
|
8002
|
-
}
|
|
8003
7942
|
return index > this.cellCount ? null : this.properties[name].get(index);
|
|
8004
7943
|
}
|
|
8005
7944
|
|
|
8006
7945
|
set(name, start, end, value) {
|
|
7946
|
+
this._set(name, start, end, value);
|
|
8007
7947
|
switch (name) {
|
|
8008
|
-
|
|
8009
|
-
start
|
|
8010
|
-
end += this.rowCount;
|
|
8011
|
-
/* falls through */
|
|
8012
|
-
case "borderLeft":
|
|
8013
|
-
name = "vBorders";
|
|
7948
|
+
case "borderLeft":
|
|
7949
|
+
this._set("borderRight", start - this.rowCount, end - this.rowCount, value);
|
|
8014
7950
|
break;
|
|
8015
|
-
|
|
8016
|
-
|
|
8017
|
-
|
|
8018
|
-
|
|
8019
|
-
|
|
8020
|
-
|
|
8021
|
-
|
|
7951
|
+
case "borderRight":
|
|
7952
|
+
this._set("borderLeft", start + this.rowCount, end + this.rowCount, value);
|
|
7953
|
+
break;
|
|
7954
|
+
case "borderTop":
|
|
7955
|
+
intervals(start, end, this.rowCount).forEach((a) => {
|
|
7956
|
+
var start = a[0] - 1, end = a[1] - 1;
|
|
7957
|
+
if ((start + 1) % this.rowCount == 0) {
|
|
7958
|
+
start++;
|
|
7959
|
+
}
|
|
7960
|
+
this._set("borderBottom", start, end, value);
|
|
7961
|
+
});
|
|
7962
|
+
break;
|
|
7963
|
+
case "borderBottom":
|
|
7964
|
+
intervals(start, end, this.rowCount).forEach((a) => {
|
|
7965
|
+
var start = a[0] + 1, end = a[1] + 1;
|
|
7966
|
+
if (end % this.rowCount == 0) {
|
|
7967
|
+
end--;
|
|
7968
|
+
}
|
|
7969
|
+
this._set("borderTop", start, end, value);
|
|
7970
|
+
});
|
|
8022
7971
|
break;
|
|
8023
7972
|
}
|
|
8024
|
-
|
|
7973
|
+
}
|
|
7974
|
+
|
|
7975
|
+
_set(name, start, end, value) {
|
|
7976
|
+
if (start >= 0 && start <= end && end <= this.cellCount) {
|
|
8025
7977
|
this.properties[name].set(start, end, value);
|
|
8026
7978
|
}
|
|
8027
7979
|
}
|
|
@@ -8029,19 +7981,12 @@ class PropertyBag {
|
|
|
8029
7981
|
fromJSON(index, value) {
|
|
8030
7982
|
for (let si = 0; si < this.specs.length; si++) {
|
|
8031
7983
|
let spec = this.specs[si];
|
|
8032
|
-
|
|
8033
7984
|
if (spec.serializable) {
|
|
8034
7985
|
if (value[spec.name] !== undefined) {
|
|
8035
7986
|
this.set(spec.name, index, index, value[spec.name], false);
|
|
8036
7987
|
}
|
|
8037
7988
|
}
|
|
8038
7989
|
}
|
|
8039
|
-
|
|
8040
|
-
[ "borderLeft", "borderRight", "borderTop", "borderBottom" ].forEach(function(b) {
|
|
8041
|
-
if (value[b] !== undefined) {
|
|
8042
|
-
this.set(b, index, index, value[b]);
|
|
8043
|
-
}
|
|
8044
|
-
}, this);
|
|
8045
7990
|
}
|
|
8046
7991
|
|
|
8047
7992
|
copy(sourceStart, sourceEnd, targetStart) {
|
|
@@ -8080,18 +8025,8 @@ class PropertyBag {
|
|
|
8080
8025
|
|
|
8081
8026
|
forEach(start, end, callback) {
|
|
8082
8027
|
let iterators = this.iterators(start, end);
|
|
8083
|
-
let hBorders = this.iterator("hBorders", start, end + 1);
|
|
8084
|
-
let leftBorders = this.iterator("vBorders", start, end);
|
|
8085
|
-
let rightBorders = this.iterator("vBorders", start + this.rowCount, end + this.rowCount);
|
|
8086
8028
|
let values, index;
|
|
8087
8029
|
|
|
8088
|
-
function addBorder(name, iterator, index) {
|
|
8089
|
-
let val = iterator.at(index);
|
|
8090
|
-
if (val !== iterator.value) {
|
|
8091
|
-
values[name] = val;
|
|
8092
|
-
}
|
|
8093
|
-
}
|
|
8094
|
-
|
|
8095
8030
|
for (index = start; index <= end; index++) {
|
|
8096
8031
|
values = {};
|
|
8097
8032
|
|
|
@@ -8104,13 +8039,6 @@ class PropertyBag {
|
|
|
8104
8039
|
}
|
|
8105
8040
|
}
|
|
8106
8041
|
|
|
8107
|
-
addBorder("borderLeft", leftBorders, index);
|
|
8108
|
-
addBorder("borderRight", rightBorders, index + this.rowCount);
|
|
8109
|
-
addBorder("borderTop", hBorders, index);
|
|
8110
|
-
if ((index + 1) % this.rowCount) {
|
|
8111
|
-
addBorder("borderBottom", hBorders, index + 1);
|
|
8112
|
-
}
|
|
8113
|
-
|
|
8114
8042
|
callback(values);
|
|
8115
8043
|
}
|
|
8116
8044
|
}
|
|
@@ -8121,6 +8049,15 @@ class PropertyBag {
|
|
|
8121
8049
|
}
|
|
8122
8050
|
}
|
|
8123
8051
|
}
|
|
8052
|
+
function intervals(start, end, rows) {
|
|
8053
|
+
var a = [];
|
|
8054
|
+
while (start <= end) {
|
|
8055
|
+
var lastrow = Math.min(end, rows * (1 + Math.floor(start / rows)) - 1);
|
|
8056
|
+
a.push([ start, lastrow ]);
|
|
8057
|
+
start = lastrow + 1;
|
|
8058
|
+
}
|
|
8059
|
+
return a;
|
|
8060
|
+
}
|
|
8124
8061
|
function cloneFormulaValue(x) {
|
|
8125
8062
|
x = x.clone();
|
|
8126
8063
|
x.value = x.value.deepClone(); // x.value is Formula or Validation
|
|
@@ -8138,12 +8075,6 @@ const ALL_PROPERTIES = propertyBagSpec.reduce(function(a, spec) {
|
|
|
8138
8075
|
return a;
|
|
8139
8076
|
}, [ "borderTop", "borderRight", "borderBottom", "borderLeft" ]);
|
|
8140
8077
|
|
|
8141
|
-
/* eslint-disable no-param-reassign */
|
|
8142
|
-
/* eslint-disable no-useless-call */
|
|
8143
|
-
/* eslint-disable camelcase */
|
|
8144
|
-
/* eslint-disable default-case */
|
|
8145
|
-
|
|
8146
|
-
|
|
8147
8078
|
function compileValidation(sheet, row, col, validation) {
|
|
8148
8079
|
let validationHandler;
|
|
8149
8080
|
let comparer;
|
|
@@ -8476,29 +8407,6 @@ validationExport.validationComparers = {
|
|
|
8476
8407
|
};
|
|
8477
8408
|
validationExport.Validation = Validation;
|
|
8478
8409
|
|
|
8479
|
-
/* eslint-disable no-nested-ternary */
|
|
8480
|
-
/* eslint-disable curly */
|
|
8481
|
-
/* eslint-disable space-infix-ops */
|
|
8482
|
-
/* eslint-disable indent */
|
|
8483
|
-
/* eslint-disable no-empty */
|
|
8484
|
-
/* eslint-disable no-loop-func */
|
|
8485
|
-
/* eslint-disable consistent-return */
|
|
8486
|
-
/* eslint-disable block-scoped-var */
|
|
8487
|
-
/* eslint-disable no-redeclare */
|
|
8488
|
-
/* eslint-disable no-var */
|
|
8489
|
-
/* eslint-disable eqeqeq */
|
|
8490
|
-
/* eslint-disable complexity */
|
|
8491
|
-
/* eslint-disable max-params */
|
|
8492
|
-
/* eslint-disable no-implicit-coercion */
|
|
8493
|
-
/* eslint-disable key-spacing */
|
|
8494
|
-
/* eslint-disable default-case */
|
|
8495
|
-
/* eslint-disable camelcase */
|
|
8496
|
-
/* eslint-disable brace-style */
|
|
8497
|
-
/* eslint-disable no-else-return */
|
|
8498
|
-
/* eslint-disable no-constant-condition */
|
|
8499
|
-
/* eslint-disable no-param-reassign */
|
|
8500
|
-
/* eslint-disable space-before-blocks */
|
|
8501
|
-
|
|
8502
8410
|
const { measureText } = drawing.util;
|
|
8503
8411
|
|
|
8504
8412
|
let PROPERTIES = [
|
|
@@ -9284,7 +9192,7 @@ let Range$1 = class Range {
|
|
|
9284
9192
|
} else {
|
|
9285
9193
|
range.input(cellState.value);
|
|
9286
9194
|
}
|
|
9287
|
-
} catch
|
|
9195
|
+
} catch {
|
|
9288
9196
|
range._set("value", cellState.value);
|
|
9289
9197
|
}
|
|
9290
9198
|
} else {
|
|
@@ -9407,7 +9315,7 @@ let Range$1 = class Range {
|
|
|
9407
9315
|
if (ref instanceof RangeRef && ref.width() > 1) {
|
|
9408
9316
|
ref = ref.clone();
|
|
9409
9317
|
ref.topLeft.col++;
|
|
9410
|
-
this._sheet.range(ref).
|
|
9318
|
+
this._sheet.range(ref).borderLeft(value);
|
|
9411
9319
|
}
|
|
9412
9320
|
}, this);
|
|
9413
9321
|
return this;
|
|
@@ -9418,7 +9326,7 @@ let Range$1 = class Range {
|
|
|
9418
9326
|
if (ref instanceof RangeRef && ref.height() > 1) {
|
|
9419
9327
|
ref = ref.clone();
|
|
9420
9328
|
ref.topLeft.row++;
|
|
9421
|
-
this._sheet.range(ref).
|
|
9329
|
+
this._sheet.range(ref).borderTop(value);
|
|
9422
9330
|
}
|
|
9423
9331
|
}, this);
|
|
9424
9332
|
return this;
|
|
@@ -9792,8 +9700,6 @@ function transpose(a) {
|
|
|
9792
9700
|
return t;
|
|
9793
9701
|
}
|
|
9794
9702
|
|
|
9795
|
-
/* eslint-disable no-loop-func */
|
|
9796
|
-
/* eslint-disable no-param-reassign */
|
|
9797
9703
|
const STRING$1 = 'string';
|
|
9798
9704
|
const FUNCTION = 'function';
|
|
9799
9705
|
|
|
@@ -9983,12 +9889,10 @@ class Widget extends Observable {
|
|
|
9983
9889
|
}
|
|
9984
9890
|
}
|
|
9985
9891
|
|
|
9986
|
-
/* eslint-disable no-param-reassign */
|
|
9987
|
-
|
|
9988
9892
|
const _activeElement = function() {
|
|
9989
9893
|
try {
|
|
9990
9894
|
return document.activeElement;
|
|
9991
|
-
} catch
|
|
9895
|
+
} catch {
|
|
9992
9896
|
return document.documentElement.activeElement;
|
|
9993
9897
|
}
|
|
9994
9898
|
};
|
|
@@ -10406,11 +10310,11 @@ class Axis {
|
|
|
10406
10310
|
return { values: this.values.iterator(0, 0), offset: 0 };
|
|
10407
10311
|
}
|
|
10408
10312
|
let startOffset = start - startSegment.start;
|
|
10409
|
-
|
|
10313
|
+
|
|
10410
10314
|
let startIndex = ((startOffset / startSegment.value.value) >> 0) + startSegment.value.start;
|
|
10411
10315
|
let offset = startOffset - (startIndex - startSegment.value.start) * startSegment.value.value;
|
|
10412
10316
|
let endOffset = end - endSegment.start;
|
|
10413
|
-
|
|
10317
|
+
|
|
10414
10318
|
let endIndex = ((endOffset / endSegment.value.value) >> 0) + endSegment.value.start;
|
|
10415
10319
|
if (endIndex > endSegment.value.end) {
|
|
10416
10320
|
endIndex = endSegment.value.end;
|
|
@@ -10557,9 +10461,6 @@ class PaneAxis {
|
|
|
10557
10461
|
}
|
|
10558
10462
|
}
|
|
10559
10463
|
|
|
10560
|
-
/* eslint-disable no-param-reassign */
|
|
10561
|
-
/* eslint-disable camelcase */
|
|
10562
|
-
|
|
10563
10464
|
class Rectangle {
|
|
10564
10465
|
constructor(left, top, width, height) {
|
|
10565
10466
|
this.left = left;
|
|
@@ -10945,11 +10846,6 @@ Sorter.descendingComparer = function(a, b) {
|
|
|
10945
10846
|
return Sorter.ascendingComparer(b, a);
|
|
10946
10847
|
};
|
|
10947
10848
|
|
|
10948
|
-
/* eslint-disable no-constant-condition */
|
|
10949
|
-
/* eslint-disable key-spacing */
|
|
10950
|
-
/* eslint-disable no-param-reassign */
|
|
10951
|
-
|
|
10952
|
-
|
|
10953
10849
|
class AxisManager {
|
|
10954
10850
|
constructor(sheet) {
|
|
10955
10851
|
this._sheet = sheet;
|
|
@@ -11181,8 +11077,6 @@ class AxisManager {
|
|
|
11181
11077
|
}
|
|
11182
11078
|
}
|
|
11183
11079
|
|
|
11184
|
-
/* eslint-disable no-param-reassign */
|
|
11185
|
-
|
|
11186
11080
|
class AutoFillCalculator {
|
|
11187
11081
|
constructor(grid) {
|
|
11188
11082
|
this._grid = grid;
|
|
@@ -11258,23 +11152,6 @@ class AutoFillCalculator {
|
|
|
11258
11152
|
}
|
|
11259
11153
|
}
|
|
11260
11154
|
|
|
11261
|
-
/* eslint-disable max-params */
|
|
11262
|
-
/* eslint-disable no-empty */
|
|
11263
|
-
/* eslint-disable no-loop-func */
|
|
11264
|
-
/* eslint-disable consistent-return */
|
|
11265
|
-
/* eslint-disable block-scoped-var */
|
|
11266
|
-
/* eslint-disable no-redeclare */
|
|
11267
|
-
/* eslint-disable no-var */
|
|
11268
|
-
/* eslint-disable eqeqeq */
|
|
11269
|
-
/* eslint-disable complexity */
|
|
11270
|
-
/* eslint-disable no-implicit-coercion */
|
|
11271
|
-
/* eslint-disable brace-style */
|
|
11272
|
-
/* eslint-disable key-spacing */
|
|
11273
|
-
/* eslint-disable no-else-return */
|
|
11274
|
-
/* eslint-disable default-case */
|
|
11275
|
-
/* eslint-disable no-param-reassign */
|
|
11276
|
-
|
|
11277
|
-
|
|
11278
11155
|
class EdgeNavigator {
|
|
11279
11156
|
constructor(field, axis, rangeGetter, union) {
|
|
11280
11157
|
this.rangeGetter = rangeGetter;
|
|
@@ -11947,23 +11824,6 @@ function makeWordMovement(sheet, pivot, isCol) {
|
|
|
11947
11824
|
};
|
|
11948
11825
|
}
|
|
11949
11826
|
|
|
11950
|
-
/* eslint-disable max-params */
|
|
11951
|
-
/* eslint-disable no-empty */
|
|
11952
|
-
/* eslint-disable no-loop-func */
|
|
11953
|
-
/* eslint-disable consistent-return */
|
|
11954
|
-
/* eslint-disable block-scoped-var */
|
|
11955
|
-
/* eslint-disable no-redeclare */
|
|
11956
|
-
/* eslint-disable no-var */
|
|
11957
|
-
/* eslint-disable eqeqeq */
|
|
11958
|
-
/* eslint-disable complexity */
|
|
11959
|
-
/* eslint-disable no-implicit-coercion */
|
|
11960
|
-
/* eslint-disable brace-style */
|
|
11961
|
-
/* eslint-disable key-spacing */
|
|
11962
|
-
/* eslint-disable no-else-return */
|
|
11963
|
-
/* eslint-disable default-case */
|
|
11964
|
-
/* eslint-disable no-param-reassign */
|
|
11965
|
-
|
|
11966
|
-
|
|
11967
11827
|
function numberToDate(val) {
|
|
11968
11828
|
return val == null ? null : calc.runtime.serialToDate(val);
|
|
11969
11829
|
}
|
|
@@ -12223,12 +12083,6 @@ const kendoDate = (function() {
|
|
|
12223
12083
|
};
|
|
12224
12084
|
})();
|
|
12225
12085
|
|
|
12226
|
-
/* eslint-disable no-var */
|
|
12227
|
-
/* eslint-disable no-implicit-coercion */
|
|
12228
|
-
/* eslint-disable no-param-reassign */
|
|
12229
|
-
/* eslint-disable no-loop-func */
|
|
12230
|
-
|
|
12231
|
-
|
|
12232
12086
|
const logic = {
|
|
12233
12087
|
or: {
|
|
12234
12088
|
concat: (acc, fn) => (a) => acc(a) || fn(a),
|
|
@@ -12356,23 +12210,6 @@ const transformCompositeFilter = function (filter) {
|
|
|
12356
12210
|
.reduce(combiner.concat, combiner.identity);
|
|
12357
12211
|
};
|
|
12358
12212
|
|
|
12359
|
-
/* eslint-disable max-params */
|
|
12360
|
-
/* eslint-disable no-empty */
|
|
12361
|
-
/* eslint-disable no-loop-func */
|
|
12362
|
-
/* eslint-disable consistent-return */
|
|
12363
|
-
/* eslint-disable block-scoped-var */
|
|
12364
|
-
/* eslint-disable no-redeclare */
|
|
12365
|
-
/* eslint-disable no-var */
|
|
12366
|
-
/* eslint-disable eqeqeq */
|
|
12367
|
-
/* eslint-disable complexity */
|
|
12368
|
-
/* eslint-disable no-implicit-coercion */
|
|
12369
|
-
/* eslint-disable brace-style */
|
|
12370
|
-
/* eslint-disable key-spacing */
|
|
12371
|
-
/* eslint-disable no-else-return */
|
|
12372
|
-
/* eslint-disable default-case */
|
|
12373
|
-
/* eslint-disable no-param-reassign */
|
|
12374
|
-
|
|
12375
|
-
|
|
12376
12213
|
let filtersObj = {};
|
|
12377
12214
|
const dateToSerial$1 = calc.runtime.dateToSerial;
|
|
12378
12215
|
const serialToDate$1 = calc.runtime.serialToDate;
|
|
@@ -12822,20 +12659,6 @@ function sameWeek(a, b) {
|
|
|
12822
12659
|
}
|
|
12823
12660
|
|
|
12824
12661
|
/* eslint-disable max-params */
|
|
12825
|
-
/* eslint-disable no-empty */
|
|
12826
|
-
/* eslint-disable no-loop-func */
|
|
12827
|
-
/* eslint-disable consistent-return */
|
|
12828
|
-
/* eslint-disable block-scoped-var */
|
|
12829
|
-
/* eslint-disable no-redeclare */
|
|
12830
|
-
/* eslint-disable no-var */
|
|
12831
|
-
/* eslint-disable eqeqeq */
|
|
12832
|
-
/* eslint-disable complexity */
|
|
12833
|
-
/* eslint-disable no-implicit-coercion */
|
|
12834
|
-
/* eslint-disable brace-style */
|
|
12835
|
-
/* eslint-disable key-spacing */
|
|
12836
|
-
/* eslint-disable no-else-return */
|
|
12837
|
-
/* eslint-disable default-case */
|
|
12838
|
-
/* eslint-disable no-param-reassign */
|
|
12839
12662
|
|
|
12840
12663
|
|
|
12841
12664
|
// This is a “dynamic variable” (see Greenspun's 10th rule). It's
|
|
@@ -13091,11 +12914,32 @@ class Sheet extends Observable {
|
|
|
13091
12914
|
this._properties._resize(newRows, newCols);
|
|
13092
12915
|
this._sheetRef = this._grid.normalize(SHEETREF);
|
|
13093
12916
|
if (newRows > oldRows) {
|
|
13094
|
-
this.range(oldRows, 0, newRows - oldRows, newCols)
|
|
12917
|
+
this.range(oldRows, 0, newRows - oldRows, newCols)
|
|
12918
|
+
.clear({ clearAll: true, keepBorders: true })
|
|
12919
|
+
.borderLeft(null)
|
|
12920
|
+
.borderBottom(null)
|
|
12921
|
+
.borderRight(null);
|
|
12922
|
+
// The apparent nonsense with the borders is necessary so that we correctly sync the
|
|
12923
|
+
// borderTop of the first newly added row with the borderBottom of the row above
|
|
12924
|
+
// it. Borders are a PITA.
|
|
12925
|
+
for (let i = 0; i < newCols; ++i) {
|
|
12926
|
+
let r = this.range(oldRows - 1, i, 1, 1);
|
|
12927
|
+
r.borderBottom(r.borderBottom());
|
|
12928
|
+
}
|
|
13095
12929
|
this._filteredRows.value(oldRows, newRows - 1, false);
|
|
13096
12930
|
}
|
|
13097
12931
|
if (newCols > oldCols) {
|
|
13098
|
-
this.range(0, oldCols, newRows, newCols - oldCols)
|
|
12932
|
+
this.range(0, oldCols, newRows, newCols - oldCols)
|
|
12933
|
+
.clear({ clearAll: true, keepBorders: true })
|
|
12934
|
+
.borderTop(null)
|
|
12935
|
+
.borderRight(null)
|
|
12936
|
+
.borderBottom(null);
|
|
12937
|
+
// See comment above; this is about syncing borderLeft of the newly added column
|
|
12938
|
+
// with the borderRight of the last existing column.
|
|
12939
|
+
for (let i = 0; i < newRows; ++i) {
|
|
12940
|
+
let r = this.range(i, oldCols - 1, 1, 1);
|
|
12941
|
+
r.borderRight(r.borderRight());
|
|
12942
|
+
}
|
|
13099
12943
|
}
|
|
13100
12944
|
this.triggerChange({ layout: true });
|
|
13101
12945
|
}
|
|
@@ -14909,8 +14753,6 @@ Drawing.fromJSON = function(args) {
|
|
|
14909
14753
|
return new Drawing(args);
|
|
14910
14754
|
};
|
|
14911
14755
|
|
|
14912
|
-
/* eslint-disable no-param-reassign */
|
|
14913
|
-
/* eslint-disable key-spacing */
|
|
14914
14756
|
let PAPER_SIZE = {
|
|
14915
14757
|
a0 : [ 2383.94 , 3370.39 ],
|
|
14916
14758
|
a1 : [ 1683.78 , 2383.94 ],
|
|
@@ -15040,15 +14882,6 @@ function getPaperOptions(getOption) {
|
|
|
15040
14882
|
return { paperSize: paperSize, margin: margin };
|
|
15041
14883
|
}
|
|
15042
14884
|
|
|
15043
|
-
/* eslint-disable no-nested-ternary */
|
|
15044
|
-
/* eslint-disable default-case */
|
|
15045
|
-
/* eslint-disable no-implicit-coercion */
|
|
15046
|
-
/* eslint-disable no-else-return */
|
|
15047
|
-
/* eslint-disable key-spacing */
|
|
15048
|
-
/* eslint-disable eqeqeq */
|
|
15049
|
-
/* eslint-disable no-param-reassign */
|
|
15050
|
-
|
|
15051
|
-
|
|
15052
14885
|
let GUIDELINE_WIDTH = 0.8;
|
|
15053
14886
|
|
|
15054
14887
|
// This takes a list of row heights and the page height, and
|
|
@@ -15792,16 +15625,6 @@ function Borders() {
|
|
|
15792
15625
|
let horiz = new Container();
|
|
15793
15626
|
let vert = new Container();
|
|
15794
15627
|
function add(cell, sheet) {
|
|
15795
|
-
if (sheet) {
|
|
15796
|
-
// reset borders here; the propertybag doesn't keep track of merged cells :-/ this
|
|
15797
|
-
// is ugly, but the inner details of data storage have leaked everywhere anyway.
|
|
15798
|
-
let pb = sheet._properties;
|
|
15799
|
-
let grid = sheet._grid;
|
|
15800
|
-
cell.borderLeft = pb.get("vBorders", grid.index(cell.row, cell.col));
|
|
15801
|
-
cell.borderRight = pb.get("vBorders", grid.index(cell.row, cell.col + cell.colspan));
|
|
15802
|
-
cell.borderTop = pb.get("hBorders", grid.index(cell.row, cell.col));
|
|
15803
|
-
cell.borderBottom = pb.get("hBorders", grid.index(cell.row + cell.rowspan, cell.col));
|
|
15804
|
-
}
|
|
15805
15628
|
if (cell.borderLeft) {
|
|
15806
15629
|
addVert(cell.row, cell.col, cell.borderLeft,
|
|
15807
15630
|
cell.left, cell.top, cell.bottom);
|
|
@@ -15821,7 +15644,7 @@ function Borders() {
|
|
|
15821
15644
|
}
|
|
15822
15645
|
|
|
15823
15646
|
function isUnwantedProp(propName){
|
|
15824
|
-
return propName === '__proto__' || propName === 'constructor' || propName === 'prototype'
|
|
15647
|
+
return propName === '__proto__' || propName === 'constructor' || propName === 'prototype';
|
|
15825
15648
|
}
|
|
15826
15649
|
|
|
15827
15650
|
function addVert(row, col, border, x, top, bottom) {
|
|
@@ -16084,6 +15907,7 @@ const draw = { Borders, doLayout, applyIndent };
|
|
|
16084
15907
|
|
|
16085
15908
|
const RESIZE_HANDLE_WIDTH = 7;
|
|
16086
15909
|
const EDIT_BUTTON_WIDTH = 20;
|
|
15910
|
+
const CELL_PADDING_RIGHT = 3;
|
|
16087
15911
|
const DOT = ".";
|
|
16088
15912
|
|
|
16089
15913
|
const viewClassNames = {
|
|
@@ -16406,7 +16230,7 @@ class Pane {
|
|
|
16406
16230
|
children.push(this.renderData(args));
|
|
16407
16231
|
|
|
16408
16232
|
if (!sheet._activeDrawing) {
|
|
16409
|
-
children.push(this.renderSelection(
|
|
16233
|
+
children.push(this.renderSelection());
|
|
16410
16234
|
}
|
|
16411
16235
|
|
|
16412
16236
|
children.push(this.renderAutoFill());
|
|
@@ -16571,6 +16395,7 @@ class Pane {
|
|
|
16571
16395
|
let cls = null;
|
|
16572
16396
|
let absRow = cell.row + view.ref.topLeft.row;
|
|
16573
16397
|
let absCol = cell.col + view.ref.topLeft.col;
|
|
16398
|
+
let hasButton = false;
|
|
16574
16399
|
if (sheet._activeDrawing) {
|
|
16575
16400
|
let ref = sheet._activeDrawing.topLeftCell;
|
|
16576
16401
|
if (ref && ref.row === absRow && ref.col === absCol) {
|
|
@@ -16585,10 +16410,16 @@ class Pane {
|
|
|
16585
16410
|
if (sheet.singleCellSelection()) {
|
|
16586
16411
|
cls.push(Pane.classNames.single);
|
|
16587
16412
|
}
|
|
16413
|
+
if (this._renderCustomEditorButton(cont.children, cell)) {
|
|
16414
|
+
hasButton = true;
|
|
16415
|
+
}
|
|
16588
16416
|
cls = cls.join(" ");
|
|
16589
16417
|
}
|
|
16590
16418
|
borders.add(cell);
|
|
16591
|
-
drawCell(cont.children, cell, cls, showGridLines);
|
|
16419
|
+
var cellDiv = drawCell(cont.children, cell, cls, showGridLines);
|
|
16420
|
+
if (hasButton) {
|
|
16421
|
+
cellDiv.attr.style.paddingRight = (EDIT_BUTTON_WIDTH + CELL_PADDING_RIGHT) + "px";
|
|
16422
|
+
}
|
|
16592
16423
|
if (cell.comment && sheet._commentRef &&
|
|
16593
16424
|
absRow === sheet._commentRef.row && absCol === sheet._commentRef.col) {
|
|
16594
16425
|
let ttOffset = 4;
|
|
@@ -16803,12 +16634,11 @@ class Pane {
|
|
|
16803
16634
|
|
|
16804
16635
|
}
|
|
16805
16636
|
|
|
16806
|
-
renderSelection(
|
|
16637
|
+
renderSelection() {
|
|
16807
16638
|
let classNames = Pane.classNames;
|
|
16808
16639
|
let selections = [];
|
|
16809
16640
|
let selectionClasses = [classNames.selection];
|
|
16810
16641
|
let sheet = this._sheet;
|
|
16811
|
-
let activeCell = sheet.activeCell().toRangeRef();
|
|
16812
16642
|
let selection = sheet.select();
|
|
16813
16643
|
|
|
16814
16644
|
selectionClasses = selectionClasses.concat(this._activeFormulaColor());
|
|
@@ -16827,8 +16657,6 @@ class Pane {
|
|
|
16827
16657
|
}
|
|
16828
16658
|
}.bind(this));
|
|
16829
16659
|
|
|
16830
|
-
this._renderCustomEditorButton(selections, activeCell, scroller);
|
|
16831
|
-
|
|
16832
16660
|
return dom.element("div", { className: classNames.selectionWrapper }, selections);
|
|
16833
16661
|
}
|
|
16834
16662
|
|
|
@@ -16887,42 +16715,26 @@ class Pane {
|
|
|
16887
16715
|
return div;
|
|
16888
16716
|
}
|
|
16889
16717
|
|
|
16890
|
-
_renderCustomEditorButton(collection,
|
|
16718
|
+
_renderCustomEditorButton(collection, cell) {
|
|
16891
16719
|
let self = this;
|
|
16892
|
-
let sheet =
|
|
16893
|
-
let view = self._currentView;
|
|
16894
|
-
let columnCount = self._grid.columns._axis._count;
|
|
16720
|
+
let sheet = this._sheet;
|
|
16895
16721
|
let ed = sheet.activeCellCustomEditor();
|
|
16896
|
-
|
|
16897
|
-
|
|
16898
|
-
let
|
|
16899
|
-
|
|
16900
|
-
|
|
16901
|
-
|
|
16902
|
-
|
|
16903
|
-
|
|
16904
|
-
|
|
16905
|
-
let btnClass = "k-button k-button-md k-rounded-md k-button-solid k-button-solid-base k-spreadsheet-editor-button";
|
|
16906
|
-
let isLastColumn = col === columnCount - 1 || self._buttonOutOfVisiblePane(row, col, scroller);
|
|
16907
|
-
if (isLastColumn) {
|
|
16908
|
-
btnClass += " k-spreadsheet-last-column";
|
|
16909
|
-
}
|
|
16910
|
-
self._editorInLastColumn = isLastColumn;
|
|
16911
|
-
let btn = dom.element("div", {
|
|
16912
|
-
className: btnClass,
|
|
16913
|
-
style: {
|
|
16914
|
-
left : (cell.left + (isLastColumn ? 0 : cell.width)) + "px",
|
|
16915
|
-
top : cell.top + "px",
|
|
16916
|
-
height : cell.height + "px"
|
|
16917
|
-
}
|
|
16918
|
-
});
|
|
16919
|
-
|
|
16920
|
-
if (ed.icon) {
|
|
16921
|
-
btn.children.push(self.icon(ed.icon));
|
|
16722
|
+
if (ed) {
|
|
16723
|
+
let btnClass = "k-button k-button-md k-rounded-md k-button-solid k-button-solid-base k-spreadsheet-editor-button";
|
|
16724
|
+
let btn = dom.element("div", {
|
|
16725
|
+
className: btnClass,
|
|
16726
|
+
style: {
|
|
16727
|
+
left : (cell.left + cell.width - EDIT_BUTTON_WIDTH) + "px",
|
|
16728
|
+
top : (cell.top + 1) + "px",
|
|
16729
|
+
height : (cell.height - 2) + "px",
|
|
16730
|
+
width : EDIT_BUTTON_WIDTH + "px",
|
|
16922
16731
|
}
|
|
16923
|
-
|
|
16924
|
-
collection.push(btn);
|
|
16925
16732
|
});
|
|
16733
|
+
if (ed.icon) {
|
|
16734
|
+
btn.children.push(self.icon(ed.icon));
|
|
16735
|
+
}
|
|
16736
|
+
collection.push(btn);
|
|
16737
|
+
return true;
|
|
16926
16738
|
}
|
|
16927
16739
|
}
|
|
16928
16740
|
|
|
@@ -16994,13 +16806,6 @@ function drawingResizeHandles(container) {
|
|
|
16994
16806
|
});
|
|
16995
16807
|
}
|
|
16996
16808
|
|
|
16997
|
-
/* eslint-disable no-unused-vars */
|
|
16998
|
-
/* eslint-disable no-param-reassign */
|
|
16999
|
-
/* eslint-disable no-else-return */
|
|
17000
|
-
/* eslint-disable no-multi-spaces */
|
|
17001
|
-
/* eslint-disable no-nested-ternary */
|
|
17002
|
-
|
|
17003
|
-
|
|
17004
16809
|
let styles = [
|
|
17005
16810
|
"font-family",
|
|
17006
16811
|
"font-size",
|
|
@@ -17860,15 +17665,6 @@ class SheetsBar extends Widget {
|
|
|
17860
17665
|
}
|
|
17861
17666
|
}
|
|
17862
17667
|
|
|
17863
|
-
/* eslint-disable complexity */
|
|
17864
|
-
/* eslint-disable consistent-return */
|
|
17865
|
-
/* eslint-disable default-case */
|
|
17866
|
-
/* eslint-disable no-implicit-coercion */
|
|
17867
|
-
/* eslint-disable no-nested-ternary */
|
|
17868
|
-
/* eslint-disable key-spacing */
|
|
17869
|
-
/* eslint-disable no-param-reassign */
|
|
17870
|
-
|
|
17871
|
-
|
|
17872
17668
|
function selectElementContents(el) {
|
|
17873
17669
|
let sel = window.getSelection();
|
|
17874
17670
|
sel.removeAllRanges();
|
|
@@ -18340,15 +18136,12 @@ class View extends Observable {
|
|
|
18340
18136
|
return Math.abs(rectangle.right - x) < 8 && Math.abs(rectangle.bottom - y) < 8;
|
|
18341
18137
|
}
|
|
18342
18138
|
|
|
18343
|
-
isEditButton(x, y
|
|
18139
|
+
isEditButton(x, y) {
|
|
18344
18140
|
let ed = this._sheet.activeCellCustomEditor();
|
|
18345
18141
|
if (ed) {
|
|
18346
18142
|
let r = this.activeCellRectangle();
|
|
18347
|
-
// XXX: hard-coded button width (20)
|
|
18348
|
-
|
|
18349
18143
|
if (y >= r.top && y <= r.bottom) {
|
|
18350
|
-
return
|
|
18351
|
-
: x > r.right && x <= r.right + EDIT_BUTTON_WIDTH;
|
|
18144
|
+
return x < r.right && x >= r.right - EDIT_BUTTON_WIDTH;
|
|
18352
18145
|
}
|
|
18353
18146
|
}
|
|
18354
18147
|
}
|
|
@@ -18436,7 +18229,7 @@ class View extends Observable {
|
|
|
18436
18229
|
ref = new CellRef(-Infinity, column);
|
|
18437
18230
|
type = "columnresizehandle";
|
|
18438
18231
|
}
|
|
18439
|
-
} else if (this.isEditButton(x, y
|
|
18232
|
+
} else if (this.isEditButton(x, y)) {
|
|
18440
18233
|
type = "editor";
|
|
18441
18234
|
}
|
|
18442
18235
|
|
|
@@ -19255,12 +19048,6 @@ function parseTSV(data) {
|
|
|
19255
19048
|
return state;
|
|
19256
19049
|
}
|
|
19257
19050
|
|
|
19258
|
-
/* eslint-disable no-else-return */
|
|
19259
|
-
/* eslint-disable consistent-return */
|
|
19260
|
-
/* eslint-disable space-before-blocks */
|
|
19261
|
-
/* eslint-disable no-implicit-coercion */
|
|
19262
|
-
|
|
19263
|
-
|
|
19264
19051
|
let COMMAND_TYPES = {
|
|
19265
19052
|
AUTO_FILL: "autoFill",
|
|
19266
19053
|
CLEAR: "clear",
|
|
@@ -20710,7 +20497,6 @@ class UndoRedoStack extends Observable {
|
|
|
20710
20497
|
}
|
|
20711
20498
|
}
|
|
20712
20499
|
|
|
20713
|
-
/* eslint-disable no-param-reassign */
|
|
20714
20500
|
// SAX-style XML parser ====================================================
|
|
20715
20501
|
let STRING = String.fromCharCode;
|
|
20716
20502
|
|
|
@@ -21080,13 +20866,7 @@ class Deferred {
|
|
|
21080
20866
|
}
|
|
21081
20867
|
|
|
21082
20868
|
/* eslint-disable complexity */
|
|
21083
|
-
|
|
21084
|
-
/* eslint-disable key-spacing */
|
|
21085
|
-
/* eslint-disable no-nested-ternary */
|
|
21086
|
-
/* eslint-disable brace-style */
|
|
21087
|
-
/* eslint-disable no-implicit-coercion */
|
|
21088
|
-
/* eslint-disable no-loop-func */
|
|
21089
|
-
/* eslint-disable no-param-reassign */
|
|
20869
|
+
|
|
21090
20870
|
|
|
21091
20871
|
// WARNING: removing the following jshint declaration and turning
|
|
21092
20872
|
// == into === to make JSHint happy will break functionality.
|
|
@@ -21384,6 +21164,7 @@ async function readSheet(zip, file, sheet, strings, styles) {
|
|
|
21384
21164
|
let valueFilterValues;
|
|
21385
21165
|
let filters = [];
|
|
21386
21166
|
let deferredStyles = [];
|
|
21167
|
+
let applyProtection = Boolean(sheet._workbook?.options?.excel?.applyProtection);
|
|
21387
21168
|
|
|
21388
21169
|
ERROR_LOG = sheet._workbook.excelImportErrors;
|
|
21389
21170
|
|
|
@@ -21492,7 +21273,7 @@ async function readSheet(zip, file, sheet, strings, styles) {
|
|
|
21492
21273
|
if (target) {
|
|
21493
21274
|
sheet.range(attrs.ref).link(target);
|
|
21494
21275
|
}
|
|
21495
|
-
} else if (this.is(SEL_PROTECTION)) {
|
|
21276
|
+
} else if (applyProtection && this.is(SEL_PROTECTION)) {
|
|
21496
21277
|
if (attrs.sheet) {
|
|
21497
21278
|
sheet.range(SHEETREF).enable(false);
|
|
21498
21279
|
}
|
|
@@ -21970,6 +21751,7 @@ let DEFAULT_FORMATS = {
|
|
|
21970
21751
|
|
|
21971
21752
|
function applyStyle(sheet, ref, styles, styleIndex) {
|
|
21972
21753
|
let range = sheet.range(ref);
|
|
21754
|
+
let applyProtection = Boolean(sheet._workbook?.options?.excel?.applyProtection);
|
|
21973
21755
|
let xf = styles.inlineStyles[styleIndex], base, value;
|
|
21974
21756
|
if (xf.xfId) {
|
|
21975
21757
|
base = styles.namedStyles[xf.xfId];
|
|
@@ -21999,7 +21781,7 @@ function applyStyle(sheet, ref, styles, styleIndex) {
|
|
|
21999
21781
|
if (shouldSet("applyNumberFormat", "numFmtId")) {
|
|
22000
21782
|
setFormat(styles.numFmts[value] || DEFAULT_FORMATS[value]);
|
|
22001
21783
|
}
|
|
22002
|
-
if (shouldSet("applyProtection", "protection")) {
|
|
21784
|
+
if (applyProtection && shouldSet("applyProtection", "protection")) {
|
|
22003
21785
|
range.enable(!xf.protection.locked);
|
|
22004
21786
|
}
|
|
22005
21787
|
|
|
@@ -22455,13 +22237,6 @@ function excelToPixels(val) {
|
|
|
22455
22237
|
return val / 9525;
|
|
22456
22238
|
}
|
|
22457
22239
|
|
|
22458
|
-
/* eslint-disable no-undef */
|
|
22459
|
-
/* eslint-disable no-nested-ternary */
|
|
22460
|
-
/* eslint-disable key-spacing */
|
|
22461
|
-
/* eslint-disable consistent-return */
|
|
22462
|
-
/* eslint-disable no-param-reassign */
|
|
22463
|
-
|
|
22464
|
-
|
|
22465
22240
|
const events$1 = [
|
|
22466
22241
|
"cut",
|
|
22467
22242
|
"copy",
|
|
@@ -23144,6 +22919,12 @@ class Workbook extends Observable {
|
|
|
23144
22919
|
options = deepExtend({}, self.options.excel, options);
|
|
23145
22920
|
let data = self.toJSON();
|
|
23146
22921
|
|
|
22922
|
+
if (!options.applyProtection) {
|
|
22923
|
+
data.sheets.forEach(({ rows }) =>
|
|
22924
|
+
rows.forEach(({ cells }) =>
|
|
22925
|
+
cells.forEach(cell => delete cell.enable)));
|
|
22926
|
+
}
|
|
22927
|
+
|
|
23147
22928
|
if (self.trigger("excelExport", { workbook: data })) {
|
|
23148
22929
|
return;
|
|
23149
22930
|
}
|
|
@@ -23457,8 +23238,6 @@ function sheetParamsFromJSON(data, options) {
|
|
|
23457
23238
|
// };
|
|
23458
23239
|
// }
|
|
23459
23240
|
|
|
23460
|
-
/* eslint-disable no-param-reassign */
|
|
23461
|
-
|
|
23462
23241
|
const events = [
|
|
23463
23242
|
"cut",
|
|
23464
23243
|
"copy",
|