@leankylin-sheet/core 4.0.56 → 4.0.58

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/README.md CHANGED
@@ -1,19 +1,19 @@
1
- # @leankylin-sheet/core
2
-
3
- LeankylinSheet is a drop-in javascript spreadsheet library that provides rich features like Excel and Google Sheets
4
-
5
- See our repo [leankylin-sheet](http://114.55.85.79:19999/leankylin-front/leankylin-sheet) for more information.
6
-
7
- ## Install
8
-
9
- Using npm:
10
-
11
- ```bash
12
- $ npm install --save @leankylin-sheet/core
13
- ```
14
-
15
- or using yarn:
16
-
17
- ```bash
18
- $ yarn add @leankylin-sheet/core
19
- ```
1
+ # @leankylin-sheet/core
2
+
3
+ LeankylinSheet is a drop-in javascript spreadsheet library that provides rich features like Excel and Google Sheets
4
+
5
+ See our repo [leankylin-sheet](http://114.55.85.79:19999/leankylin-front/leankylin-sheet) for more information.
6
+
7
+ ## Install
8
+
9
+ Using npm:
10
+
11
+ ```bash
12
+ $ npm install --save @leankylin-sheet/core
13
+ ```
14
+
15
+ or using yarn:
16
+
17
+ ```bash
18
+ $ yarn add @leankylin-sheet/core
19
+ ```
package/dist/index.esm.js CHANGED
@@ -33798,13 +33798,13 @@ var make_ssf = function make_ssf(SSF) {
33798
33798
  return general_fmt_num_base;
33799
33799
  }();
33800
33800
  SSF._general_num = general_fmt_num;
33801
- /*
33802
- "General" rules:
33803
- - text is passed through ("@")
33804
- - booleans are rendered as TRUE/FALSE
33805
- - "up to 11 characters" displayed for numbers
33806
- - Default date format (code 14) used for Dates
33807
- TODO: technically the display depends on the width of the cell
33801
+ /*
33802
+ "General" rules:
33803
+ - text is passed through ("@")
33804
+ - booleans are rendered as TRUE/FALSE
33805
+ - "up to 11 characters" displayed for numbers
33806
+ - Default date format (code 14) used for Dates
33807
+ TODO: technically the display depends on the width of the cell
33808
33808
  */
33809
33809
  function general_fmt(v, opts) {
33810
33810
  switch (_typeof(v)) {
@@ -55629,6 +55629,14 @@ function setCellValue$1(ctx, row, column, value, cellInput) {
55629
55629
  } else if (value instanceof Object) {
55630
55630
  var _data$row;
55631
55631
  var curv = {};
55632
+ if (!(data === null || data === void 0 ? void 0 : data[row])) {
55633
+ var needAddRow = row - ((data === null || data === void 0 ? void 0 : data.length) || 0) + 1;
55634
+ data === null || data === void 0 ? void 0 : data.push.apply(data, _toConsumableArray(Array.from({
55635
+ length: needAddRow
55636
+ }).map(function () {
55637
+ return [];
55638
+ })));
55639
+ }
55632
55640
  if ((data === null || data === void 0 ? void 0 : (_data$row = data[row]) === null || _data$row === void 0 ? void 0 : _data$row[column]) == null) {
55633
55641
  data[row][column] = {};
55634
55642
  }
@@ -56214,6 +56222,7 @@ var index = /*#__PURE__*/Object.freeze({
56214
56222
  });
56215
56223
 
56216
56224
  var defaultSettings = {
56225
+ renderSubToolbar: undefined,
56217
56226
  headerBgColor: "#fff",
56218
56227
  toolbarRightRender: undefined,
56219
56228
  onClickContentEditable: undefined,
package/dist/index.js CHANGED
@@ -33808,13 +33808,13 @@ var make_ssf = function make_ssf(SSF) {
33808
33808
  return general_fmt_num_base;
33809
33809
  }();
33810
33810
  SSF._general_num = general_fmt_num;
33811
- /*
33812
- "General" rules:
33813
- - text is passed through ("@")
33814
- - booleans are rendered as TRUE/FALSE
33815
- - "up to 11 characters" displayed for numbers
33816
- - Default date format (code 14) used for Dates
33817
- TODO: technically the display depends on the width of the cell
33811
+ /*
33812
+ "General" rules:
33813
+ - text is passed through ("@")
33814
+ - booleans are rendered as TRUE/FALSE
33815
+ - "up to 11 characters" displayed for numbers
33816
+ - Default date format (code 14) used for Dates
33817
+ TODO: technically the display depends on the width of the cell
33818
33818
  */
33819
33819
  function general_fmt(v, opts) {
33820
33820
  switch (_typeof(v)) {
@@ -55639,6 +55639,14 @@ function setCellValue$1(ctx, row, column, value, cellInput) {
55639
55639
  } else if (value instanceof Object) {
55640
55640
  var _data$row;
55641
55641
  var curv = {};
55642
+ if (!(data === null || data === void 0 ? void 0 : data[row])) {
55643
+ var needAddRow = row - ((data === null || data === void 0 ? void 0 : data.length) || 0) + 1;
55644
+ data === null || data === void 0 ? void 0 : data.push.apply(data, _toConsumableArray(Array.from({
55645
+ length: needAddRow
55646
+ }).map(function () {
55647
+ return [];
55648
+ })));
55649
+ }
55642
55650
  if ((data === null || data === void 0 ? void 0 : (_data$row = data[row]) === null || _data$row === void 0 ? void 0 : _data$row[column]) == null) {
55643
55651
  data[row][column] = {};
55644
55652
  }
@@ -56224,6 +56232,7 @@ var index = /*#__PURE__*/Object.freeze({
56224
56232
  });
56225
56233
 
56226
56234
  var defaultSettings = {
56235
+ renderSubToolbar: undefined,
56227
56236
  headerBgColor: "#fff",
56228
56237
  toolbarRightRender: undefined,
56229
56238
  onClickContentEditable: undefined,
@@ -89,6 +89,7 @@ export type Hooks = {
89
89
  export type Settings = {
90
90
  headerBgColor?: string;
91
91
  toolbarRightRender?: any;
92
+ renderSubToolbar?: any;
92
93
  onClickContentEditable?: any;
93
94
  renderCustomColor?: any;
94
95
  renderFormulaHint?: any;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leankylin-sheet/core",
3
- "version": "4.0.56",
3
+ "version": "4.0.58",
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": "4.0.56",
16
+ "@leankylin-sheet/formula-parser": "4.0.58",
17
17
  "dayjs": "^1.11.0",
18
18
  "immer": "^9.0.12",
19
19
  "lodash": "^4.17.21",