@leankylin-sheet/core 2.0.14 → 2.0.16
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 +104 -82
- package/dist/index.js +104 -82
- package/dist/settings.d.ts +3 -1
- package/package.json +2 -2
package/dist/index.esm.js
CHANGED
|
@@ -4,67 +4,6 @@ import dayjs from 'dayjs';
|
|
|
4
4
|
import { Parser, ERROR_REF } from '@leankylin-sheet/formula-parser';
|
|
5
5
|
import { v4 } from 'uuid';
|
|
6
6
|
|
|
7
|
-
function _arrayLikeToArray(r, a) {
|
|
8
|
-
(null == a || a > r.length) && (a = r.length);
|
|
9
|
-
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
|
|
10
|
-
return n;
|
|
11
|
-
}
|
|
12
|
-
function _arrayWithHoles(r) {
|
|
13
|
-
if (Array.isArray(r)) return r;
|
|
14
|
-
}
|
|
15
|
-
function _arrayWithoutHoles(r) {
|
|
16
|
-
if (Array.isArray(r)) return _arrayLikeToArray(r);
|
|
17
|
-
}
|
|
18
|
-
function asyncGeneratorStep(n, t, e, r, o, a, c) {
|
|
19
|
-
try {
|
|
20
|
-
var i = n[a](c),
|
|
21
|
-
u = i.value;
|
|
22
|
-
} catch (n) {
|
|
23
|
-
return void e(n);
|
|
24
|
-
}
|
|
25
|
-
i.done ? t(u) : Promise.resolve(u).then(r, o);
|
|
26
|
-
}
|
|
27
|
-
function _asyncToGenerator(n) {
|
|
28
|
-
return function () {
|
|
29
|
-
var t = this,
|
|
30
|
-
e = arguments;
|
|
31
|
-
return new Promise(function (r, o) {
|
|
32
|
-
var a = n.apply(t, e);
|
|
33
|
-
function _next(n) {
|
|
34
|
-
asyncGeneratorStep(a, r, o, _next, _throw, "next", n);
|
|
35
|
-
}
|
|
36
|
-
function _throw(n) {
|
|
37
|
-
asyncGeneratorStep(a, r, o, _next, _throw, "throw", n);
|
|
38
|
-
}
|
|
39
|
-
_next(void 0);
|
|
40
|
-
});
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
function _classCallCheck(a, n) {
|
|
44
|
-
if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
|
|
45
|
-
}
|
|
46
|
-
function _defineProperties(e, r) {
|
|
47
|
-
for (var t = 0; t < r.length; t++) {
|
|
48
|
-
var o = r[t];
|
|
49
|
-
o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o);
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
function _createClass(e, r, t) {
|
|
53
|
-
return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", {
|
|
54
|
-
writable: !1
|
|
55
|
-
}), e;
|
|
56
|
-
}
|
|
57
|
-
function _defineProperty(e, r, t) {
|
|
58
|
-
return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
59
|
-
value: t,
|
|
60
|
-
enumerable: !0,
|
|
61
|
-
configurable: !0,
|
|
62
|
-
writable: !0
|
|
63
|
-
}) : e[r] = t, e;
|
|
64
|
-
}
|
|
65
|
-
function _iterableToArray(r) {
|
|
66
|
-
if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r);
|
|
67
|
-
}
|
|
68
7
|
function _iterableToArrayLimit(r, l) {
|
|
69
8
|
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
70
9
|
if (null != t) {
|
|
@@ -92,12 +31,6 @@ function _iterableToArrayLimit(r, l) {
|
|
|
92
31
|
return a;
|
|
93
32
|
}
|
|
94
33
|
}
|
|
95
|
-
function _nonIterableRest() {
|
|
96
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
97
|
-
}
|
|
98
|
-
function _nonIterableSpread() {
|
|
99
|
-
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
100
|
-
}
|
|
101
34
|
function ownKeys(e, r) {
|
|
102
35
|
var t = Object.keys(e);
|
|
103
36
|
if (Object.getOwnPropertySymbols) {
|
|
@@ -420,12 +353,6 @@ function _regeneratorRuntime() {
|
|
|
420
353
|
}
|
|
421
354
|
}, e;
|
|
422
355
|
}
|
|
423
|
-
function _slicedToArray(r, e) {
|
|
424
|
-
return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
|
|
425
|
-
}
|
|
426
|
-
function _toConsumableArray(r) {
|
|
427
|
-
return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread();
|
|
428
|
-
}
|
|
429
356
|
function _toPrimitive(t, r) {
|
|
430
357
|
if ("object" != typeof t || !t) return t;
|
|
431
358
|
var e = t[Symbol.toPrimitive];
|
|
@@ -449,12 +376,105 @@ function _typeof(o) {
|
|
|
449
376
|
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
450
377
|
}, _typeof(o);
|
|
451
378
|
}
|
|
452
|
-
function
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
var
|
|
456
|
-
|
|
379
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
380
|
+
try {
|
|
381
|
+
var info = gen[key](arg);
|
|
382
|
+
var value = info.value;
|
|
383
|
+
} catch (error) {
|
|
384
|
+
reject(error);
|
|
385
|
+
return;
|
|
386
|
+
}
|
|
387
|
+
if (info.done) {
|
|
388
|
+
resolve(value);
|
|
389
|
+
} else {
|
|
390
|
+
Promise.resolve(value).then(_next, _throw);
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
function _asyncToGenerator(fn) {
|
|
394
|
+
return function () {
|
|
395
|
+
var self = this,
|
|
396
|
+
args = arguments;
|
|
397
|
+
return new Promise(function (resolve, reject) {
|
|
398
|
+
var gen = fn.apply(self, args);
|
|
399
|
+
function _next(value) {
|
|
400
|
+
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
|
|
401
|
+
}
|
|
402
|
+
function _throw(err) {
|
|
403
|
+
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
|
|
404
|
+
}
|
|
405
|
+
_next(undefined);
|
|
406
|
+
});
|
|
407
|
+
};
|
|
408
|
+
}
|
|
409
|
+
function _classCallCheck(instance, Constructor) {
|
|
410
|
+
if (!(instance instanceof Constructor)) {
|
|
411
|
+
throw new TypeError("Cannot call a class as a function");
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
function _defineProperties(target, props) {
|
|
415
|
+
for (var i = 0; i < props.length; i++) {
|
|
416
|
+
var descriptor = props[i];
|
|
417
|
+
descriptor.enumerable = descriptor.enumerable || false;
|
|
418
|
+
descriptor.configurable = true;
|
|
419
|
+
if ("value" in descriptor) descriptor.writable = true;
|
|
420
|
+
Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
function _createClass(Constructor, protoProps, staticProps) {
|
|
424
|
+
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
425
|
+
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
426
|
+
Object.defineProperty(Constructor, "prototype", {
|
|
427
|
+
writable: false
|
|
428
|
+
});
|
|
429
|
+
return Constructor;
|
|
430
|
+
}
|
|
431
|
+
function _defineProperty(obj, key, value) {
|
|
432
|
+
key = _toPropertyKey(key);
|
|
433
|
+
if (key in obj) {
|
|
434
|
+
Object.defineProperty(obj, key, {
|
|
435
|
+
value: value,
|
|
436
|
+
enumerable: true,
|
|
437
|
+
configurable: true,
|
|
438
|
+
writable: true
|
|
439
|
+
});
|
|
440
|
+
} else {
|
|
441
|
+
obj[key] = value;
|
|
457
442
|
}
|
|
443
|
+
return obj;
|
|
444
|
+
}
|
|
445
|
+
function _slicedToArray(arr, i) {
|
|
446
|
+
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
447
|
+
}
|
|
448
|
+
function _toConsumableArray(arr) {
|
|
449
|
+
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
|
|
450
|
+
}
|
|
451
|
+
function _arrayWithoutHoles(arr) {
|
|
452
|
+
if (Array.isArray(arr)) return _arrayLikeToArray(arr);
|
|
453
|
+
}
|
|
454
|
+
function _arrayWithHoles(arr) {
|
|
455
|
+
if (Array.isArray(arr)) return arr;
|
|
456
|
+
}
|
|
457
|
+
function _iterableToArray(iter) {
|
|
458
|
+
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
459
|
+
}
|
|
460
|
+
function _unsupportedIterableToArray(o, minLen) {
|
|
461
|
+
if (!o) return;
|
|
462
|
+
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
463
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
464
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
465
|
+
if (n === "Map" || n === "Set") return Array.from(o);
|
|
466
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
467
|
+
}
|
|
468
|
+
function _arrayLikeToArray(arr, len) {
|
|
469
|
+
if (len == null || len > arr.length) len = arr.length;
|
|
470
|
+
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
471
|
+
return arr2;
|
|
472
|
+
}
|
|
473
|
+
function _nonIterableSpread() {
|
|
474
|
+
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
475
|
+
}
|
|
476
|
+
function _nonIterableRest() {
|
|
477
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
458
478
|
}
|
|
459
479
|
|
|
460
480
|
var en = {
|
|
@@ -44314,7 +44334,7 @@ var make_ssf = function make_ssf(SSF) {
|
|
|
44314
44334
|
function split_fmt(fmt) {
|
|
44315
44335
|
var out = [];
|
|
44316
44336
|
var in_str = false; /*, cc*/
|
|
44317
|
-
for (var i = 0, j = 0; i < fmt.length; ++i) switch (/*cc=*/fmt.charCodeAt(i)) {
|
|
44337
|
+
for (var i = 0, j = 0; i < fmt.length; ++i) switch ( /*cc=*/fmt.charCodeAt(i)) {
|
|
44318
44338
|
case 34:
|
|
44319
44339
|
/* '"' */in_str = !in_str;
|
|
44320
44340
|
break;
|
|
@@ -64072,7 +64092,7 @@ function getFilterColumnColors(ctx, col, startRow, endRow) {
|
|
|
64072
64092
|
fc = fc.substr(0, 1) + fc.substr(1, 1).repeat(2) + fc.substr(2, 1).repeat(2) + fc.substr(3, 1).repeat(2);
|
|
64073
64093
|
}
|
|
64074
64094
|
}
|
|
64075
|
-
var isRowHidden = r in (((_ctx$config = ctx.config) === null || _ctx$config === void 0 ? void 0 : _ctx$config.rowhidden) || {});
|
|
64095
|
+
var isRowHidden = (r in (((_ctx$config = ctx.config) === null || _ctx$config === void 0 ? void 0 : _ctx$config.rowhidden) || {}));
|
|
64076
64096
|
var bgData = bgMap.get(bg);
|
|
64077
64097
|
if (bgData != null) {
|
|
64078
64098
|
bgData.rows.push(r);
|
|
@@ -65998,6 +66018,8 @@ var index = /*#__PURE__*/Object.freeze({
|
|
|
65998
66018
|
});
|
|
65999
66019
|
|
|
66000
66020
|
var defaultSettings = {
|
|
66021
|
+
renderFormulaHint: undefined,
|
|
66022
|
+
renderFormulaSearch: undefined,
|
|
66001
66023
|
renderCalcInfo: undefined,
|
|
66002
66024
|
renderFreezeCol: undefined,
|
|
66003
66025
|
renderFreezeRow: undefined,
|
|
@@ -69392,7 +69414,7 @@ function getClipboardContent() {
|
|
|
69392
69414
|
return _getClipboardContent.apply(this, arguments);
|
|
69393
69415
|
}
|
|
69394
69416
|
function _getClipboardContent() {
|
|
69395
|
-
_getClipboardContent = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
69417
|
+
_getClipboardContent = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
69396
69418
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
69397
69419
|
while (1) switch (_context.prev = _context.next) {
|
|
69398
69420
|
case 0:
|
|
@@ -69443,7 +69465,7 @@ function handlePasteByLeanklin(_x2, _x3) {
|
|
|
69443
69465
|
return _handlePasteByLeanklin.apply(this, arguments);
|
|
69444
69466
|
}
|
|
69445
69467
|
function _handlePasteByLeanklin() {
|
|
69446
|
-
_handlePasteByLeanklin = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(ctx, e) {
|
|
69468
|
+
_handlePasteByLeanklin = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(ctx, e) {
|
|
69447
69469
|
var _ctx$luckysheet_selec8;
|
|
69448
69470
|
var data, allowEdit, selectRange, rows, columns, copyOne, newData, r, rIndex, c, row, column, range;
|
|
69449
69471
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
package/dist/index.js
CHANGED
|
@@ -14,67 +14,6 @@ var ___default = /*#__PURE__*/_interopDefaultLegacy(_);
|
|
|
14
14
|
var numeral__default = /*#__PURE__*/_interopDefaultLegacy(numeral);
|
|
15
15
|
var dayjs__default = /*#__PURE__*/_interopDefaultLegacy(dayjs);
|
|
16
16
|
|
|
17
|
-
function _arrayLikeToArray(r, a) {
|
|
18
|
-
(null == a || a > r.length) && (a = r.length);
|
|
19
|
-
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
|
|
20
|
-
return n;
|
|
21
|
-
}
|
|
22
|
-
function _arrayWithHoles(r) {
|
|
23
|
-
if (Array.isArray(r)) return r;
|
|
24
|
-
}
|
|
25
|
-
function _arrayWithoutHoles(r) {
|
|
26
|
-
if (Array.isArray(r)) return _arrayLikeToArray(r);
|
|
27
|
-
}
|
|
28
|
-
function asyncGeneratorStep(n, t, e, r, o, a, c) {
|
|
29
|
-
try {
|
|
30
|
-
var i = n[a](c),
|
|
31
|
-
u = i.value;
|
|
32
|
-
} catch (n) {
|
|
33
|
-
return void e(n);
|
|
34
|
-
}
|
|
35
|
-
i.done ? t(u) : Promise.resolve(u).then(r, o);
|
|
36
|
-
}
|
|
37
|
-
function _asyncToGenerator(n) {
|
|
38
|
-
return function () {
|
|
39
|
-
var t = this,
|
|
40
|
-
e = arguments;
|
|
41
|
-
return new Promise(function (r, o) {
|
|
42
|
-
var a = n.apply(t, e);
|
|
43
|
-
function _next(n) {
|
|
44
|
-
asyncGeneratorStep(a, r, o, _next, _throw, "next", n);
|
|
45
|
-
}
|
|
46
|
-
function _throw(n) {
|
|
47
|
-
asyncGeneratorStep(a, r, o, _next, _throw, "throw", n);
|
|
48
|
-
}
|
|
49
|
-
_next(void 0);
|
|
50
|
-
});
|
|
51
|
-
};
|
|
52
|
-
}
|
|
53
|
-
function _classCallCheck(a, n) {
|
|
54
|
-
if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
|
|
55
|
-
}
|
|
56
|
-
function _defineProperties(e, r) {
|
|
57
|
-
for (var t = 0; t < r.length; t++) {
|
|
58
|
-
var o = r[t];
|
|
59
|
-
o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o);
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
function _createClass(e, r, t) {
|
|
63
|
-
return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", {
|
|
64
|
-
writable: !1
|
|
65
|
-
}), e;
|
|
66
|
-
}
|
|
67
|
-
function _defineProperty(e, r, t) {
|
|
68
|
-
return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
69
|
-
value: t,
|
|
70
|
-
enumerable: !0,
|
|
71
|
-
configurable: !0,
|
|
72
|
-
writable: !0
|
|
73
|
-
}) : e[r] = t, e;
|
|
74
|
-
}
|
|
75
|
-
function _iterableToArray(r) {
|
|
76
|
-
if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r);
|
|
77
|
-
}
|
|
78
17
|
function _iterableToArrayLimit(r, l) {
|
|
79
18
|
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
80
19
|
if (null != t) {
|
|
@@ -102,12 +41,6 @@ function _iterableToArrayLimit(r, l) {
|
|
|
102
41
|
return a;
|
|
103
42
|
}
|
|
104
43
|
}
|
|
105
|
-
function _nonIterableRest() {
|
|
106
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
107
|
-
}
|
|
108
|
-
function _nonIterableSpread() {
|
|
109
|
-
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
110
|
-
}
|
|
111
44
|
function ownKeys(e, r) {
|
|
112
45
|
var t = Object.keys(e);
|
|
113
46
|
if (Object.getOwnPropertySymbols) {
|
|
@@ -430,12 +363,6 @@ function _regeneratorRuntime() {
|
|
|
430
363
|
}
|
|
431
364
|
}, e;
|
|
432
365
|
}
|
|
433
|
-
function _slicedToArray(r, e) {
|
|
434
|
-
return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
|
|
435
|
-
}
|
|
436
|
-
function _toConsumableArray(r) {
|
|
437
|
-
return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread();
|
|
438
|
-
}
|
|
439
366
|
function _toPrimitive(t, r) {
|
|
440
367
|
if ("object" != typeof t || !t) return t;
|
|
441
368
|
var e = t[Symbol.toPrimitive];
|
|
@@ -459,12 +386,105 @@ function _typeof(o) {
|
|
|
459
386
|
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
460
387
|
}, _typeof(o);
|
|
461
388
|
}
|
|
462
|
-
function
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
var
|
|
466
|
-
|
|
389
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
390
|
+
try {
|
|
391
|
+
var info = gen[key](arg);
|
|
392
|
+
var value = info.value;
|
|
393
|
+
} catch (error) {
|
|
394
|
+
reject(error);
|
|
395
|
+
return;
|
|
396
|
+
}
|
|
397
|
+
if (info.done) {
|
|
398
|
+
resolve(value);
|
|
399
|
+
} else {
|
|
400
|
+
Promise.resolve(value).then(_next, _throw);
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
function _asyncToGenerator(fn) {
|
|
404
|
+
return function () {
|
|
405
|
+
var self = this,
|
|
406
|
+
args = arguments;
|
|
407
|
+
return new Promise(function (resolve, reject) {
|
|
408
|
+
var gen = fn.apply(self, args);
|
|
409
|
+
function _next(value) {
|
|
410
|
+
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
|
|
411
|
+
}
|
|
412
|
+
function _throw(err) {
|
|
413
|
+
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
|
|
414
|
+
}
|
|
415
|
+
_next(undefined);
|
|
416
|
+
});
|
|
417
|
+
};
|
|
418
|
+
}
|
|
419
|
+
function _classCallCheck(instance, Constructor) {
|
|
420
|
+
if (!(instance instanceof Constructor)) {
|
|
421
|
+
throw new TypeError("Cannot call a class as a function");
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
function _defineProperties(target, props) {
|
|
425
|
+
for (var i = 0; i < props.length; i++) {
|
|
426
|
+
var descriptor = props[i];
|
|
427
|
+
descriptor.enumerable = descriptor.enumerable || false;
|
|
428
|
+
descriptor.configurable = true;
|
|
429
|
+
if ("value" in descriptor) descriptor.writable = true;
|
|
430
|
+
Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
function _createClass(Constructor, protoProps, staticProps) {
|
|
434
|
+
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
435
|
+
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
436
|
+
Object.defineProperty(Constructor, "prototype", {
|
|
437
|
+
writable: false
|
|
438
|
+
});
|
|
439
|
+
return Constructor;
|
|
440
|
+
}
|
|
441
|
+
function _defineProperty(obj, key, value) {
|
|
442
|
+
key = _toPropertyKey(key);
|
|
443
|
+
if (key in obj) {
|
|
444
|
+
Object.defineProperty(obj, key, {
|
|
445
|
+
value: value,
|
|
446
|
+
enumerable: true,
|
|
447
|
+
configurable: true,
|
|
448
|
+
writable: true
|
|
449
|
+
});
|
|
450
|
+
} else {
|
|
451
|
+
obj[key] = value;
|
|
467
452
|
}
|
|
453
|
+
return obj;
|
|
454
|
+
}
|
|
455
|
+
function _slicedToArray(arr, i) {
|
|
456
|
+
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
457
|
+
}
|
|
458
|
+
function _toConsumableArray(arr) {
|
|
459
|
+
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
|
|
460
|
+
}
|
|
461
|
+
function _arrayWithoutHoles(arr) {
|
|
462
|
+
if (Array.isArray(arr)) return _arrayLikeToArray(arr);
|
|
463
|
+
}
|
|
464
|
+
function _arrayWithHoles(arr) {
|
|
465
|
+
if (Array.isArray(arr)) return arr;
|
|
466
|
+
}
|
|
467
|
+
function _iterableToArray(iter) {
|
|
468
|
+
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
469
|
+
}
|
|
470
|
+
function _unsupportedIterableToArray(o, minLen) {
|
|
471
|
+
if (!o) return;
|
|
472
|
+
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
473
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
474
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
475
|
+
if (n === "Map" || n === "Set") return Array.from(o);
|
|
476
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
477
|
+
}
|
|
478
|
+
function _arrayLikeToArray(arr, len) {
|
|
479
|
+
if (len == null || len > arr.length) len = arr.length;
|
|
480
|
+
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
481
|
+
return arr2;
|
|
482
|
+
}
|
|
483
|
+
function _nonIterableSpread() {
|
|
484
|
+
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
485
|
+
}
|
|
486
|
+
function _nonIterableRest() {
|
|
487
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
468
488
|
}
|
|
469
489
|
|
|
470
490
|
var en = {
|
|
@@ -44324,7 +44344,7 @@ var make_ssf = function make_ssf(SSF) {
|
|
|
44324
44344
|
function split_fmt(fmt) {
|
|
44325
44345
|
var out = [];
|
|
44326
44346
|
var in_str = false; /*, cc*/
|
|
44327
|
-
for (var i = 0, j = 0; i < fmt.length; ++i) switch (/*cc=*/fmt.charCodeAt(i)) {
|
|
44347
|
+
for (var i = 0, j = 0; i < fmt.length; ++i) switch ( /*cc=*/fmt.charCodeAt(i)) {
|
|
44328
44348
|
case 34:
|
|
44329
44349
|
/* '"' */in_str = !in_str;
|
|
44330
44350
|
break;
|
|
@@ -64082,7 +64102,7 @@ function getFilterColumnColors(ctx, col, startRow, endRow) {
|
|
|
64082
64102
|
fc = fc.substr(0, 1) + fc.substr(1, 1).repeat(2) + fc.substr(2, 1).repeat(2) + fc.substr(3, 1).repeat(2);
|
|
64083
64103
|
}
|
|
64084
64104
|
}
|
|
64085
|
-
var isRowHidden = r in (((_ctx$config = ctx.config) === null || _ctx$config === void 0 ? void 0 : _ctx$config.rowhidden) || {});
|
|
64105
|
+
var isRowHidden = (r in (((_ctx$config = ctx.config) === null || _ctx$config === void 0 ? void 0 : _ctx$config.rowhidden) || {}));
|
|
64086
64106
|
var bgData = bgMap.get(bg);
|
|
64087
64107
|
if (bgData != null) {
|
|
64088
64108
|
bgData.rows.push(r);
|
|
@@ -66008,6 +66028,8 @@ var index = /*#__PURE__*/Object.freeze({
|
|
|
66008
66028
|
});
|
|
66009
66029
|
|
|
66010
66030
|
var defaultSettings = {
|
|
66031
|
+
renderFormulaHint: undefined,
|
|
66032
|
+
renderFormulaSearch: undefined,
|
|
66011
66033
|
renderCalcInfo: undefined,
|
|
66012
66034
|
renderFreezeCol: undefined,
|
|
66013
66035
|
renderFreezeRow: undefined,
|
|
@@ -69402,7 +69424,7 @@ function getClipboardContent() {
|
|
|
69402
69424
|
return _getClipboardContent.apply(this, arguments);
|
|
69403
69425
|
}
|
|
69404
69426
|
function _getClipboardContent() {
|
|
69405
|
-
_getClipboardContent = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
69427
|
+
_getClipboardContent = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
69406
69428
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
69407
69429
|
while (1) switch (_context.prev = _context.next) {
|
|
69408
69430
|
case 0:
|
|
@@ -69453,7 +69475,7 @@ function handlePasteByLeanklin(_x2, _x3) {
|
|
|
69453
69475
|
return _handlePasteByLeanklin.apply(this, arguments);
|
|
69454
69476
|
}
|
|
69455
69477
|
function _handlePasteByLeanklin() {
|
|
69456
|
-
_handlePasteByLeanklin = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(ctx, e) {
|
|
69478
|
+
_handlePasteByLeanklin = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(ctx, e) {
|
|
69457
69479
|
var _ctx$luckysheet_selec8;
|
|
69458
69480
|
var data, allowEdit, selectRange, rows, columns, copyOne, newData, r, rIndex, c, row, column, range;
|
|
69459
69481
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
package/dist/settings.d.ts
CHANGED
|
@@ -58,6 +58,8 @@ export type Hooks = {
|
|
|
58
58
|
afterUpdateSheetName?: (id: string, oldName: string, newName: string) => void;
|
|
59
59
|
};
|
|
60
60
|
export type Settings = {
|
|
61
|
+
renderFormulaHint?: any;
|
|
62
|
+
renderFormulaSearch?: any;
|
|
61
63
|
renderCalcInfo?: any;
|
|
62
64
|
renderFreezeCol?: any;
|
|
63
65
|
renderFreezeRow?: any;
|
|
@@ -89,7 +91,7 @@ export type Settings = {
|
|
|
89
91
|
toolbarItems?: string[];
|
|
90
92
|
cellContextMenu?: () => string[];
|
|
91
93
|
headerContextMenu?: string[];
|
|
92
|
-
cellCustomContextMenu?: () => {
|
|
94
|
+
cellCustomContextMenu?: (selectSave?: any) => {
|
|
93
95
|
key: string;
|
|
94
96
|
element: any;
|
|
95
97
|
onClick: any;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leankylin-sheet/core",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.16",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"module": "dist/index.esm.js",
|
|
6
6
|
"typings": "dist/index.d.ts",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"build": "father-build"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@leankylin-sheet/formula-parser": "^2.0.
|
|
16
|
+
"@leankylin-sheet/formula-parser": "^2.0.16",
|
|
17
17
|
"dayjs": "^1.11.0",
|
|
18
18
|
"immer": "^9.0.12",
|
|
19
19
|
"lodash": "^4.17.21",
|