@fileverse-dev/fortune-core 1.3.13-create-2 → 1.3.13-create-4

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.
@@ -27,7 +27,7 @@ export declare function getFontStyleByCell(cell: Cell | null | undefined, checks
27
27
  export declare function getStyleByCell(ctx: Context, d: CellMatrix, r: number, c: number): any;
28
28
  export declare function getInlineStringHTML(r: number, c: number, data: CellMatrix, options?: {
29
29
  useSemanticMarkup?: boolean;
30
- isRangeCopy?: boolean;
30
+ isRichTextCopy?: boolean;
31
31
  inheritedStyle?: Record<string, string>;
32
32
  }): string;
33
33
  export declare function getQKBorder(width: string, type: string, color: string): (string | number)[];
@@ -1265,7 +1265,7 @@ export function getInlineStringHTML(r, c, data, options) {
1265
1265
  return "".concat(_.kebabCase(key), ":").concat(_.isNumber(v) ? "".concat(v, "px") : v, ";");
1266
1266
  }).join(" ");
1267
1267
  var dataAttrs = !(options === null || options === void 0 ? void 0 : options.useSemanticMarkup) && (link === null || link === void 0 ? void 0 : link.linkType) && (link === null || link === void 0 ? void 0 : link.linkAddress) ? " data-link-type='".concat(String(link.linkType).replace(/'/g, "&#39;"), "' data-link-address='").concat(String(link.linkAddress).replace(/'/g, "&#39;"), "'") : "";
1268
- if (options === null || options === void 0 ? void 0 : options.isRangeCopy) {
1268
+ if (options === null || options === void 0 ? void 0 : options.isRichTextCopy) {
1269
1269
  if (options === null || options === void 0 ? void 0 : options.useSemanticMarkup) {
1270
1270
  value += buildClipboardCompatibleInlineRuns(strObj.v, styleStr);
1271
1271
  } else {
@@ -1426,7 +1426,8 @@ export function rangeValueToHtml(ctx, sheetId, ranges) {
1426
1426
  if (cell && isInlineStringCell(cell)) {
1427
1427
  cellHtml = getInlineStringHTML(r, c, d, {
1428
1428
  useSemanticMarkup: true,
1429
- inheritedStyle: styleObj
1429
+ inheritedStyle: styleObj,
1430
+ isRichTextCopy: true
1430
1431
  });
1431
1432
  } else {
1432
1433
  if (_.isNil(c_value)) {
@@ -1581,7 +1582,8 @@ export function copy(ctx) {
1581
1582
  if (isRichText_1) {
1582
1583
  innerContent = getInlineStringHTML(r, c, flowdata, {
1583
1584
  useSemanticMarkup: true,
1584
- inheritedStyle: mergedStyle
1585
+ inheritedStyle: mergedStyle,
1586
+ isRichTextCopy: true
1585
1587
  });
1586
1588
  } else {
1587
1589
  var displayValue = (_h = (_g = getCellValue(r, c, flowdata, "m")) !== null && _g !== void 0 ? _g : getCellValue(r, c, flowdata)) !== null && _h !== void 0 ? _h : "";
@@ -27,7 +27,7 @@ export declare function getFontStyleByCell(cell: Cell | null | undefined, checks
27
27
  export declare function getStyleByCell(ctx: Context, d: CellMatrix, r: number, c: number): any;
28
28
  export declare function getInlineStringHTML(r: number, c: number, data: CellMatrix, options?: {
29
29
  useSemanticMarkup?: boolean;
30
- isRangeCopy?: boolean;
30
+ isRichTextCopy?: boolean;
31
31
  inheritedStyle?: Record<string, string>;
32
32
  }): string;
33
33
  export declare function getQKBorder(width: string, type: string, color: string): (string | number)[];
@@ -1298,7 +1298,7 @@ function getInlineStringHTML(r, c, data, options) {
1298
1298
  return "".concat(_lodash.default.kebabCase(key), ":").concat(_lodash.default.isNumber(v) ? "".concat(v, "px") : v, ";");
1299
1299
  }).join(" ");
1300
1300
  var dataAttrs = !(options === null || options === void 0 ? void 0 : options.useSemanticMarkup) && (link === null || link === void 0 ? void 0 : link.linkType) && (link === null || link === void 0 ? void 0 : link.linkAddress) ? " data-link-type='".concat(String(link.linkType).replace(/'/g, "&#39;"), "' data-link-address='").concat(String(link.linkAddress).replace(/'/g, "&#39;"), "'") : "";
1301
- if (options === null || options === void 0 ? void 0 : options.isRangeCopy) {
1301
+ if (options === null || options === void 0 ? void 0 : options.isRichTextCopy) {
1302
1302
  if (options === null || options === void 0 ? void 0 : options.useSemanticMarkup) {
1303
1303
  value += buildClipboardCompatibleInlineRuns(strObj.v, styleStr);
1304
1304
  } else {
@@ -1461,7 +1461,8 @@ function rangeValueToHtml(ctx, sheetId, ranges) {
1461
1461
  if (cell && (0, _inlineString.isInlineStringCell)(cell)) {
1462
1462
  cellHtml = (0, _cell.getInlineStringHTML)(r, c, d, {
1463
1463
  useSemanticMarkup: true,
1464
- inheritedStyle: styleObj
1464
+ inheritedStyle: styleObj,
1465
+ isRichTextCopy: true
1465
1466
  });
1466
1467
  } else {
1467
1468
  if (_lodash.default.isNil(c_value)) {
@@ -1616,7 +1617,8 @@ function copy(ctx) {
1616
1617
  if (isRichText_1) {
1617
1618
  innerContent = (0, _cell.getInlineStringHTML)(r, c, flowdata, {
1618
1619
  useSemanticMarkup: true,
1619
- inheritedStyle: mergedStyle
1620
+ inheritedStyle: mergedStyle,
1621
+ isRichTextCopy: true
1620
1622
  });
1621
1623
  } else {
1622
1624
  var displayValue = (_h = (_g = (0, _cell.getCellValue)(r, c, flowdata, "m")) !== null && _g !== void 0 ? _g : (0, _cell.getCellValue)(r, c, flowdata)) !== null && _h !== void 0 ? _h : "";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fileverse-dev/fortune-core",
3
- "version": "1.3.13-create-2",
3
+ "version": "1.3.13-create-4",
4
4
  "main": "lib/index.js",
5
5
  "module": "es/index.js",
6
6
  "typings": "lib/index.d.ts",