@fileverse-dev/fortune-core 1.2.41 → 1.2.43-circles-patch-2

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.
@@ -2,6 +2,7 @@ import _ from "lodash";
2
2
  import { getSheetIndex } from "../utils";
3
3
  import { isInlineStringCT } from "./inline-string";
4
4
  export function mergeCells(ctx, sheetId, ranges, type) {
5
+ var _a, _b, _c;
5
6
  var idx = getSheetIndex(ctx, sheetId);
6
7
  if (idx == null) return;
7
8
  var sheet = ctx.luckysheetfile[idx];
@@ -112,8 +113,8 @@ export function mergeCells(ctx, sheetId, ranges, type) {
112
113
  for (var r = r1; r <= r2; r += 1) {
113
114
  for (var c = c1; c <= c2; c += 1) {
114
115
  var cell = d[r][c];
115
- if (cell != null && (isInlineStringCT(cell.ct) || !_.isEmpty(cell.v) || cell.f != null) && !isfirst) {
116
- fv = _.cloneDeep(cell) || {};
116
+ if (cell != null && (isInlineStringCT(cell.ct) || !_.isEmpty(cell.v) || cell.f != null || cell.s != null || cell.ct && ((_a = cell.ct.s) === null || _a === void 0 ? void 0 : _a.length)) && !isfirst) {
117
+ fv = _.cloneDeep(cell);
117
118
  isfirst = true;
118
119
  }
119
120
  d[r][c] = {
@@ -145,8 +146,8 @@ export function mergeCells(ctx, sheetId, ranges, type) {
145
146
  var isfirst = false;
146
147
  for (var r = r1; r <= r2; r += 1) {
147
148
  var cell = d[r][c];
148
- if (cell != null && (!_.isEmpty(cell.v) || cell.f != null) && !isfirst) {
149
- fv = _.cloneDeep(cell) || {};
149
+ if (cell != null && (isInlineStringCT(cell.ct) || !_.isEmpty(cell.v) || cell.f != null || cell.s != null || cell.ct && ((_b = cell.ct.s) === null || _b === void 0 ? void 0 : _b.length)) && !isfirst) {
150
+ fv = _.cloneDeep(cell);
150
151
  isfirst = true;
151
152
  }
152
153
  d[r][c] = {
@@ -178,8 +179,8 @@ export function mergeCells(ctx, sheetId, ranges, type) {
178
179
  var isfirst = false;
179
180
  for (var c = c1; c <= c2; c += 1) {
180
181
  var cell = d[r][c];
181
- if (cell != null && (!_.isEmpty(cell.v) || cell.f != null) && !isfirst) {
182
- fv = _.cloneDeep(cell) || {};
182
+ if (cell != null && (isInlineStringCT(cell.ct) || !_.isEmpty(cell.v) || cell.f != null || cell.s != null || cell.ct && ((_c = cell.ct.s) === null || _c === void 0 ? void 0 : _c.length)) && !isfirst) {
183
+ fv = _.cloneDeep(cell);
183
184
  isfirst = true;
184
185
  }
185
186
  d[r][c] = {
@@ -9,6 +9,7 @@ var _utils = require("../utils");
9
9
  var _inlineString = require("./inline-string");
10
10
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
11
11
  function mergeCells(ctx, sheetId, ranges, type) {
12
+ var _a, _b, _c;
12
13
  var idx = (0, _utils.getSheetIndex)(ctx, sheetId);
13
14
  if (idx == null) return;
14
15
  var sheet = ctx.luckysheetfile[idx];
@@ -119,8 +120,8 @@ function mergeCells(ctx, sheetId, ranges, type) {
119
120
  for (var r = r1; r <= r2; r += 1) {
120
121
  for (var c = c1; c <= c2; c += 1) {
121
122
  var cell = d[r][c];
122
- if (cell != null && ((0, _inlineString.isInlineStringCT)(cell.ct) || !_lodash.default.isEmpty(cell.v) || cell.f != null) && !isfirst) {
123
- fv = _lodash.default.cloneDeep(cell) || {};
123
+ if (cell != null && ((0, _inlineString.isInlineStringCT)(cell.ct) || !_lodash.default.isEmpty(cell.v) || cell.f != null || cell.s != null || cell.ct && ((_a = cell.ct.s) === null || _a === void 0 ? void 0 : _a.length)) && !isfirst) {
124
+ fv = _lodash.default.cloneDeep(cell);
124
125
  isfirst = true;
125
126
  }
126
127
  d[r][c] = {
@@ -152,8 +153,8 @@ function mergeCells(ctx, sheetId, ranges, type) {
152
153
  var isfirst = false;
153
154
  for (var r = r1; r <= r2; r += 1) {
154
155
  var cell = d[r][c];
155
- if (cell != null && (!_lodash.default.isEmpty(cell.v) || cell.f != null) && !isfirst) {
156
- fv = _lodash.default.cloneDeep(cell) || {};
156
+ if (cell != null && ((0, _inlineString.isInlineStringCT)(cell.ct) || !_lodash.default.isEmpty(cell.v) || cell.f != null || cell.s != null || cell.ct && ((_b = cell.ct.s) === null || _b === void 0 ? void 0 : _b.length)) && !isfirst) {
157
+ fv = _lodash.default.cloneDeep(cell);
157
158
  isfirst = true;
158
159
  }
159
160
  d[r][c] = {
@@ -185,8 +186,8 @@ function mergeCells(ctx, sheetId, ranges, type) {
185
186
  var isfirst = false;
186
187
  for (var c = c1; c <= c2; c += 1) {
187
188
  var cell = d[r][c];
188
- if (cell != null && (!_lodash.default.isEmpty(cell.v) || cell.f != null) && !isfirst) {
189
- fv = _lodash.default.cloneDeep(cell) || {};
189
+ if (cell != null && ((0, _inlineString.isInlineStringCT)(cell.ct) || !_lodash.default.isEmpty(cell.v) || cell.f != null || cell.s != null || cell.ct && ((_c = cell.ct.s) === null || _c === void 0 ? void 0 : _c.length)) && !isfirst) {
190
+ fv = _lodash.default.cloneDeep(cell);
190
191
  isfirst = true;
191
192
  }
192
193
  d[r][c] = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fileverse-dev/fortune-core",
3
- "version": "1.2.41",
3
+ "version": "1.2.43-circles-patch-2",
4
4
  "main": "lib/index.js",
5
5
  "module": "es/index.js",
6
6
  "typings": "lib/index.d.ts",
@@ -15,7 +15,7 @@
15
15
  "dev": "father-build --watch"
16
16
  },
17
17
  "dependencies": {
18
- "@fileverse-dev/formula-parser": "0.2.83",
18
+ "@fileverse-dev/formula-parser": "0.2.83-circles-patch-2",
19
19
  "dayjs": "^1.11.0",
20
20
  "immer": "^9.0.12",
21
21
  "lodash": "^4.17.21",