@visactor/react-vtable 1.9.2-alpha.6 → 1.9.2-alpha.7

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/cjs/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  export * from './tables';
2
2
  export * from './table-components';
3
3
  export * from './components';
4
- export declare const version = "1.9.2-alpha.6";
4
+ export declare const version = "1.9.2-alpha.7";
package/cjs/index.js CHANGED
@@ -18,5 +18,5 @@ var __createBinding = this && this.__createBinding || (Object.create ? function(
18
18
  Object.defineProperty(exports, "__esModule", {
19
19
  value: !0
20
20
  }), exports.version = void 0, __exportStar(require("./tables"), exports), __exportStar(require("./table-components"), exports),
21
- __exportStar(require("./components"), exports), exports.version = "1.9.2-alpha.6";
21
+ __exportStar(require("./components"), exports), exports.version = "1.9.2-alpha.7";
22
22
  //# sourceMappingURL=index.js.map
package/cjs/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,qDAAmC;AACnC,+CAA6B;AAEhB,QAAA,OAAO,GAAG,eAAe,CAAC","file":"index.js","sourcesContent":["export * from './tables';\nexport * from './table-components';\nexport * from './components';\n\nexport const version = \"1.9.2-alpha.6\";\n"]}
1
+ {"version":3,"sources":["index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,qDAAmC;AACnC,+CAA6B;AAEhB,QAAA,OAAO,GAAG,eAAe,CAAC","file":"index.js","sourcesContent":["export * from './tables';\nexport * from './table-components';\nexport * from './components';\n\nexport const version = \"1.9.2-alpha.7\";\n"]}
@@ -4485,8 +4485,14 @@
4485
4485
  return needTestLetter && (index = testLetter(desc, index)), index;
4486
4486
  }
4487
4487
  function testLetter(string, index) {
4488
+ let negativeWrongMatch = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !1;
4488
4489
  let i = index;
4489
- for (; regLetter.test(string[i - 1]) && regLetter.test(string[i]) || regPunctuation.test(string[i]);) if (i--, i <= 0) return index;
4490
+ for (; regLetter.test(string[i - 1]) && regLetter.test(string[i]) || regPunctuation.test(string[i]);) if (i--, i <= 0) return negativeWrongMatch ? testLetter2(string, index) : index;
4491
+ return i;
4492
+ }
4493
+ function testLetter2(string, index) {
4494
+ let i = index;
4495
+ for (; regLetter.test(string[i - 1]) && regLetter.test(string[i]) || regPunctuation.test(string[i]);) if (i++, i >= string.length) return i;
4490
4496
  return i;
4491
4497
  }
4492
4498
  function measureTextCanvas(text, character) {
@@ -7465,7 +7471,7 @@
7465
7471
  validCheck(attribute, theme, aabbBounds, graphic) {
7466
7472
  if (!graphic) return !0;
7467
7473
  if (null != attribute.forceBoundsHeight || null != attribute.forceBoundsWidth) return !0;
7468
- if (graphic.shadowRoot) return !0;
7474
+ if (graphic.shadowRoot || graphic.isContainer) return !0;
7469
7475
  const {
7470
7476
  visible = theme.visible
7471
7477
  } = attribute;
@@ -8870,20 +8876,22 @@
8870
8876
  });
8871
8877
  break;
8872
8878
  }
8873
- const clip = layoutObj.textMeasure.clipText(str, layoutObj.textOptions, maxLineWidth, "break-word" === wordBreak);
8874
- if ("" !== str && "" === clip.str) {
8879
+ const clip = layoutObj.textMeasure.clipText(str, layoutObj.textOptions, maxLineWidth, "break-all" !== wordBreak, "keep-all" === wordBreak);
8880
+ if ("" !== str && "" === clip.str || clip.wordBreaked) {
8875
8881
  if (ellipsis) {
8876
8882
  const clipEllipsis = layoutObj.textMeasure.clipTextWithSuffix(str, layoutObj.textOptions, maxLineWidth, ellipsis, !1, suffixPosition);
8877
8883
  clip.str = null !== (_c = clipEllipsis.str) && void 0 !== _c ? _c : "", clip.width = null !== (_d = clipEllipsis.width) && void 0 !== _d ? _d : 0;
8878
8884
  } else clip.str = "", clip.width = 0;
8879
8885
  needCut = !1;
8880
8886
  }
8881
- if (linesLayout.push({
8887
+ linesLayout.push({
8882
8888
  str: clip.str,
8883
8889
  width: clip.width
8884
- }), clip.str.length === str.length) ;else if (needCut) {
8885
- const newStr = str.substring(clip.str.length);
8886
- lines.splice(i + 1, 0, newStr);
8890
+ });
8891
+ let cutLength = clip.str.length;
8892
+ if (!clip.wordBreaked || "" !== str && "" === clip.str || (needCut = !0, cutLength = clip.wordBreaked), clip.str.length === str.length) ;else if (needCut) {
8893
+ let newStr = str.substring(cutLength);
8894
+ "keep-all" === wordBreak && (newStr = newStr.replace(/^\s+/g, "")), lines.splice(i + 1, 0, newStr);
8887
8895
  }
8888
8896
  }
8889
8897
  let maxWidth = 0;
@@ -19688,7 +19696,7 @@
19688
19696
  const Checkbox = React.forwardRef(CheckboxComponent);
19689
19697
  Checkbox.displayName = 'Checkbox';
19690
19698
 
19691
- const version = "1.9.2-alpha.6";
19699
+ const version = "1.9.2-alpha.7";
19692
19700
 
19693
19701
  Object.defineProperty(exports, 'register', {
19694
19702
  enumerable: true,