devexpress-richedit 24.1.11-build-25065-0103 → 24.1.12-build-25093-0104

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.
Files changed (35) hide show
  1. package/bin/gulpfile.js +1 -1
  2. package/bin/index-custom.js +1 -1
  3. package/bin/localization-builder.js +1 -1
  4. package/bin/nspell-index.js +1 -1
  5. package/bin/nspell.webpack.config.js +1 -1
  6. package/bin/webpack-externals.js +1 -1
  7. package/bin/webpack.config.js +1 -1
  8. package/dist/dx.richedit.d.ts +1 -1
  9. package/dist/dx.richedit.js +165 -85
  10. package/dist/dx.richedit.min.js +2 -2
  11. package/index.d.ts +1 -1
  12. package/index.js +1 -1
  13. package/lib/client/bars/ribbon.d.ts +1 -0
  14. package/lib/client/bars/ribbon.js +3 -1
  15. package/lib/client/client-rich-edit.js +2 -2
  16. package/lib/client/utils/focus-helper.d.ts +4 -0
  17. package/lib/client/utils/focus-helper.js +36 -0
  18. package/lib/common/canvas/canvas-scroll-manager.d.ts +0 -1
  19. package/lib/common/canvas/canvas-scroll-manager.js +1 -11
  20. package/lib/common/canvas/canvas-size-info.d.ts +3 -3
  21. package/lib/common/canvas/canvas-size-info.js +19 -13
  22. package/lib/common/canvas/renderes/view-manager.js +1 -5
  23. package/lib/common/commands/layout/apply-style-command.d.ts +12 -7
  24. package/lib/common/commands/layout/apply-style-command.js +44 -36
  25. package/lib/common/commands/toc/set-paragraph-level-command.d.ts +2 -0
  26. package/lib/common/commands/toc/set-paragraph-level-command.js +13 -7
  27. package/lib/common/layout/main-structures/layout-row.d.ts +2 -1
  28. package/lib/common/layout/main-structures/layout-row.js +3 -1
  29. package/lib/common/layout-formatter/row/result.js +2 -1
  30. package/lib/common/layout-formatter/row/tab-info.js +3 -1
  31. package/lib/common/model/paragraph/paragraph-style.js +1 -1
  32. package/lib/common/model/section/section-properties.js +5 -0
  33. package/lib/common/utils/size-utils.d.ts +8 -0
  34. package/lib/common/utils/size-utils.js +32 -8
  35. package/package.json +3 -3
@@ -1,17 +1,31 @@
1
1
  export class SizeUtils {
2
- static getClientWidth(element) {
2
+ static getWidthInfo(element) {
3
+ const offsetSize = SizeUtils.getOffsetWidth(element);
3
4
  const style = getComputedStyle(element);
4
- const offset = parseFloat(style.borderLeftWidth) + parseFloat(style.borderRightWidth) + parseFloat(style.paddingLeft) + parseFloat(style.paddingRight);
5
- const sizeWithScrollBar = SizeUtils.getOffsetWidth(element) - offset;
5
+ const inset = parseCssValue(style.borderLeftWidth)
6
+ + parseCssValue(style.borderRightWidth)
7
+ + parseCssValue(style.paddingLeft)
8
+ + parseCssValue(style.paddingRight);
9
+ const sizeWithScrollBar = offsetSize - inset;
6
10
  const scrollBarSize = Math.round(sizeWithScrollBar) - element.clientWidth;
7
- return sizeWithScrollBar - scrollBarSize;
11
+ return new DimensionInfo(offsetSize, sizeWithScrollBar - scrollBarSize, scrollBarSize);
8
12
  }
9
- static getClientHeight(element) {
13
+ static getClientWidth(element) {
14
+ return this.getWidthInfo(element).clientSize;
15
+ }
16
+ static getHeightInfo(element) {
17
+ const offsetSize = SizeUtils.getOffsetHeight(element);
10
18
  const style = getComputedStyle(element);
11
- const offset = parseFloat(style.borderTopWidth) + parseFloat(style.borderBottomWidth) + parseFloat(style.paddingTop) + parseFloat(style.paddingBottom);
12
- const sizeWithScrollBar = SizeUtils.getOffsetHeight(element) - offset;
19
+ const inset = parseCssValue(style.borderTopWidth)
20
+ + parseCssValue(style.borderBottomWidth)
21
+ + parseCssValue(style.paddingTop)
22
+ + parseCssValue(style.paddingBottom);
23
+ const sizeWithScrollBar = offsetSize - inset;
13
24
  const scrollBarSize = Math.round(sizeWithScrollBar) - element.clientHeight;
14
- return sizeWithScrollBar - scrollBarSize;
25
+ return new DimensionInfo(offsetSize, sizeWithScrollBar - scrollBarSize, scrollBarSize);
26
+ }
27
+ static getClientHeight(element) {
28
+ return this.getHeightInfo(element).clientSize;
15
29
  }
16
30
  static getOffsetSize(element) {
17
31
  return element.getBoundingClientRect();
@@ -23,3 +37,13 @@ export class SizeUtils {
23
37
  return SizeUtils.getOffsetSize(element).height;
24
38
  }
25
39
  }
40
+ function parseCssValue(value) {
41
+ return value ? parseFloat(value) : 0;
42
+ }
43
+ export class DimensionInfo {
44
+ constructor(offsetSize, clientSize, scrollbarSize) {
45
+ this.offsetSize = offsetSize;
46
+ this.clientSize = clientSize;
47
+ this.scrollbarSize = scrollbarSize;
48
+ }
49
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "devexpress-richedit",
3
- "version": "24.1.11-build-25065-0103",
3
+ "version": "24.1.12-build-25093-0104",
4
4
  "homepage": "https://www.devexpress.com/",
5
5
  "bugs": "https://www.devexpress.com/support/",
6
6
  "author": "Developer Express Inc.",
@@ -14,8 +14,8 @@
14
14
  "build-nspell": "webpack --mode production --config=bin/nspell.webpack.config.js"
15
15
  },
16
16
  "peerDependencies": {
17
- "devextreme": "24.1.11-build-25063-1936",
18
- "devextreme-dist": "24.1.11-build-25063-1936"
17
+ "devextreme": "24.1.12-build-25091-1936",
18
+ "devextreme-dist": "24.1.12-build-25091-1936"
19
19
  },
20
20
  "dependencies": {
21
21
  "jszip": "~3.10.1",