@leankylin-sheet/excel 4.1.4 → 5.1.0

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 CHANGED
@@ -482,9 +482,18 @@ function _possibleConstructorReturn(self, call) {
482
482
  function _slicedToArray(arr, i) {
483
483
  return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
484
484
  }
485
+ function _toConsumableArray(arr) {
486
+ return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
487
+ }
488
+ function _arrayWithoutHoles(arr) {
489
+ if (Array.isArray(arr)) return _arrayLikeToArray(arr);
490
+ }
485
491
  function _arrayWithHoles(arr) {
486
492
  if (Array.isArray(arr)) return arr;
487
493
  }
494
+ function _iterableToArray(iter) {
495
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
496
+ }
488
497
  function _unsupportedIterableToArray(o, minLen) {
489
498
  if (!o) return;
490
499
  if (typeof o === "string") return _arrayLikeToArray(o, minLen);
@@ -498,6 +507,9 @@ function _arrayLikeToArray(arr, len) {
498
507
  for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
499
508
  return arr2;
500
509
  }
510
+ function _nonIterableSpread() {
511
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
512
+ }
501
513
  function _nonIterableRest() {
502
514
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
503
515
  }
@@ -6370,7 +6382,9 @@ function _exportSheetExcel() {
6370
6382
  return _regeneratorRuntime().wrap(function _callee$(_context) {
6371
6383
  while (1) switch (_context.prev = _context.next) {
6372
6384
  case 0:
6373
- luckysheet = luckysheetRef.getAllSheets();
6385
+ luckysheet = _toConsumableArray(luckysheetRef.getAllSheets()).sort(function (a, b) {
6386
+ return a.order - b.order;
6387
+ });
6374
6388
  workbook = new ExcelJS.Workbook();
6375
6389
  luckysheet.every(function (table) {
6376
6390
  var _table$data, _table$config;
package/dist/index.js CHANGED
@@ -494,9 +494,18 @@ function _possibleConstructorReturn(self, call) {
494
494
  function _slicedToArray(arr, i) {
495
495
  return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
496
496
  }
497
+ function _toConsumableArray(arr) {
498
+ return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
499
+ }
500
+ function _arrayWithoutHoles(arr) {
501
+ if (Array.isArray(arr)) return _arrayLikeToArray(arr);
502
+ }
497
503
  function _arrayWithHoles(arr) {
498
504
  if (Array.isArray(arr)) return arr;
499
505
  }
506
+ function _iterableToArray(iter) {
507
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
508
+ }
500
509
  function _unsupportedIterableToArray(o, minLen) {
501
510
  if (!o) return;
502
511
  if (typeof o === "string") return _arrayLikeToArray(o, minLen);
@@ -510,6 +519,9 @@ function _arrayLikeToArray(arr, len) {
510
519
  for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
511
520
  return arr2;
512
521
  }
522
+ function _nonIterableSpread() {
523
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
524
+ }
513
525
  function _nonIterableRest() {
514
526
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
515
527
  }
@@ -6382,7 +6394,9 @@ function _exportSheetExcel() {
6382
6394
  return _regeneratorRuntime().wrap(function _callee$(_context) {
6383
6395
  while (1) switch (_context.prev = _context.next) {
6384
6396
  case 0:
6385
- luckysheet = luckysheetRef.getAllSheets();
6397
+ luckysheet = _toConsumableArray(luckysheetRef.getAllSheets()).sort(function (a, b) {
6398
+ return a.order - b.order;
6399
+ });
6386
6400
  workbook = new ExcelJS__default['default'].Workbook();
6387
6401
  luckysheet.every(function (table) {
6388
6402
  var _table$data, _table$config;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leankylin-sheet/excel",
3
- "version": "4.1.4",
3
+ "version": "5.1.0",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "module": "dist/index.esm.js",