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.
- package/bin/gulpfile.js +1 -1
- package/bin/index-custom.js +1 -1
- package/bin/localization-builder.js +1 -1
- package/bin/nspell-index.js +1 -1
- package/bin/nspell.webpack.config.js +1 -1
- package/bin/webpack-externals.js +1 -1
- package/bin/webpack.config.js +1 -1
- package/dist/dx.richedit.d.ts +1 -1
- package/dist/dx.richedit.js +165 -85
- package/dist/dx.richedit.min.js +2 -2
- package/index.d.ts +1 -1
- package/index.js +1 -1
- package/lib/client/bars/ribbon.d.ts +1 -0
- package/lib/client/bars/ribbon.js +3 -1
- package/lib/client/client-rich-edit.js +2 -2
- package/lib/client/utils/focus-helper.d.ts +4 -0
- package/lib/client/utils/focus-helper.js +36 -0
- package/lib/common/canvas/canvas-scroll-manager.d.ts +0 -1
- package/lib/common/canvas/canvas-scroll-manager.js +1 -11
- package/lib/common/canvas/canvas-size-info.d.ts +3 -3
- package/lib/common/canvas/canvas-size-info.js +19 -13
- package/lib/common/canvas/renderes/view-manager.js +1 -5
- package/lib/common/commands/layout/apply-style-command.d.ts +12 -7
- package/lib/common/commands/layout/apply-style-command.js +44 -36
- package/lib/common/commands/toc/set-paragraph-level-command.d.ts +2 -0
- package/lib/common/commands/toc/set-paragraph-level-command.js +13 -7
- package/lib/common/layout/main-structures/layout-row.d.ts +2 -1
- package/lib/common/layout/main-structures/layout-row.js +3 -1
- package/lib/common/layout-formatter/row/result.js +2 -1
- package/lib/common/layout-formatter/row/tab-info.js +3 -1
- package/lib/common/model/paragraph/paragraph-style.js +1 -1
- package/lib/common/model/section/section-properties.js +5 -0
- package/lib/common/utils/size-utils.d.ts +8 -0
- package/lib/common/utils/size-utils.js +32 -8
- package/package.json +3 -3
@@ -1,17 +1,31 @@
|
|
1
1
|
export class SizeUtils {
|
2
|
-
static
|
2
|
+
static getWidthInfo(element) {
|
3
|
+
const offsetSize = SizeUtils.getOffsetWidth(element);
|
3
4
|
const style = getComputedStyle(element);
|
4
|
-
const
|
5
|
-
|
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
|
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
|
12
|
-
|
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.
|
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.
|
18
|
-
"devextreme-dist": "24.1.
|
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",
|