@leankylin-sheet/core 3.1.34 → 3.1.36

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.
@@ -19,4 +19,5 @@ export declare function getCellsByRange(ctx: Context, range: Selection, options?
19
19
  export declare function getHtmlByRange(ctx: Context, range: Range, options?: CommonOptions): string | null;
20
20
  export declare function setSelection(ctx: Context, range: Range, options: CommonOptions): void;
21
21
  export declare function setCellValuesByRange(ctx: Context, data: any[][], range: SingleRange, cellInput: HTMLDivElement | null, options?: CommonOptions): void;
22
+ export declare function setCellValues(ctx: Context, data: any[], cellInput: HTMLDivElement | null, options?: CommonOptions): void;
22
23
  export declare function setCellFormatByRange(ctx: Context, attr: keyof Cell, value: any, range: Range | SingleRange, options?: CommonOptions): void;
package/dist/index.esm.js CHANGED
@@ -55886,6 +55886,19 @@ function setCellValuesByRange(ctx, data, range, cellInput) {
55886
55886
  }
55887
55887
  }
55888
55888
  }
55889
+ function setCellValues(ctx, data, cellInput) {
55890
+ var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
55891
+ if (data == null) {
55892
+ throw INVALID_PARAMS;
55893
+ }
55894
+ for (var j = 0; j < data.length; j += 1) {
55895
+ var _data$j = data[j],
55896
+ r = _data$j.r,
55897
+ c = _data$j.c,
55898
+ v = _data$j.v;
55899
+ setCellValue$1(ctx, r, c, v, cellInput, options);
55900
+ }
55901
+ }
55889
55902
  function setCellFormatByRange(ctx, attr, value, range) {
55890
55903
  var options = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {};
55891
55904
  if (_.isPlainObject(range)) {
@@ -56010,6 +56023,7 @@ var index = /*#__PURE__*/Object.freeze({
56010
56023
  getHtmlByRange: getHtmlByRange,
56011
56024
  setSelection: setSelection,
56012
56025
  setCellValuesByRange: setCellValuesByRange,
56026
+ setCellValues: setCellValues,
56013
56027
  setCellFormatByRange: setCellFormatByRange,
56014
56028
  mergeCells: mergeCells$1,
56015
56029
  cancelMerge: cancelMerge,
package/dist/index.js CHANGED
@@ -55896,6 +55896,19 @@ function setCellValuesByRange(ctx, data, range, cellInput) {
55896
55896
  }
55897
55897
  }
55898
55898
  }
55899
+ function setCellValues(ctx, data, cellInput) {
55900
+ var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
55901
+ if (data == null) {
55902
+ throw INVALID_PARAMS;
55903
+ }
55904
+ for (var j = 0; j < data.length; j += 1) {
55905
+ var _data$j = data[j],
55906
+ r = _data$j.r,
55907
+ c = _data$j.c,
55908
+ v = _data$j.v;
55909
+ setCellValue$1(ctx, r, c, v, cellInput, options);
55910
+ }
55911
+ }
55899
55912
  function setCellFormatByRange(ctx, attr, value, range) {
55900
55913
  var options = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {};
55901
55914
  if (___default['default'].isPlainObject(range)) {
@@ -56020,6 +56033,7 @@ var index = /*#__PURE__*/Object.freeze({
56020
56033
  getHtmlByRange: getHtmlByRange,
56021
56034
  setSelection: setSelection,
56022
56035
  setCellValuesByRange: setCellValuesByRange,
56036
+ setCellValues: setCellValues,
56023
56037
  setCellFormatByRange: setCellFormatByRange,
56024
56038
  mergeCells: mergeCells$1,
56025
56039
  cancelMerge: cancelMerge,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leankylin-sheet/core",
3
- "version": "3.1.34",
3
+ "version": "3.1.36",
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": "3.1.34",
16
+ "@leankylin-sheet/formula-parser": "3.1.36",
17
17
  "dayjs": "^1.11.0",
18
18
  "immer": "^9.0.12",
19
19
  "lodash": "^4.17.21",