devexpress-richedit 24.1.11-build-25058-0102 → 24.1.11

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.
@@ -25480,6 +25480,7 @@ class LineNumberingProperties {
25480
25480
 
25481
25481
 
25482
25482
 
25483
+
25483
25484
  class SectionProperties {
25484
25485
  constructor() {
25485
25486
  this.margins = new margins/* Margins */.m(1440, 1440, 1440, 1440);
@@ -25497,6 +25498,8 @@ class SectionProperties {
25497
25498
  this.firstPageNumber = -1;
25498
25499
  this.continueNumbering = true;
25499
25500
  this.lineNumbering = new LineNumberingProperties();
25501
+ this.footNote = NoteProperties.createDefault();
25502
+ this.endNote = NoteProperties.createDefault();
25500
25503
  }
25501
25504
  static createSimpleSectionProperties(width, height) {
25502
25505
  const simpleSectionProperties = new SectionProperties();
@@ -25539,6 +25542,8 @@ class SectionProperties {
25539
25542
  else
25540
25543
  this.columnsInfo = obj.columnsInfo;
25541
25544
  this.lineNumbering.copyFrom(obj.lineNumbering);
25545
+ this.footNote.copyFrom(obj.footNote);
25546
+ this.endNote.copyFrom(obj.endNote);
25542
25547
  this.equalWidthColumns = obj.equalWidthColumns;
25543
25548
  this.marginBottom = obj.marginBottom;
25544
25549
  this.marginLeft = obj.marginLeft;
@@ -101825,10 +101830,16 @@ class TableBasedAutoCorrectProviderBase extends AutoCorrectProviderBase {
101825
101830
  this.control.modelManager.modelManipulator.range.removeInterval(new SubDocumentInterval(this.subDocument, interval), true, false);
101826
101831
  let endOfInsertedInterval = interval.start;
101827
101832
  for (let i = 0; i < replaceWithStrings.length; i++) {
101828
- const result = this.control.modelManager.modelManipulator.text.insertTextViaHistory(new InsertTextManipulatorParams(new SubDocumentPosition(this.subDocument, endOfInsertedInterval), charPropsBundle, RunType.TextRun, replaceWithStrings[i]));
101829
- endOfInsertedInterval = result.insertedInterval.end;
101830
- if (replaceWithStrings[i + 1]) {
101831
- const result = this.control.modelManager.modelManipulator.paragraph.insertParagraphViaHistory(new InsertParagraphManipulatorParams(new SubDocumentPosition(this.subDocument, endOfInsertedInterval), charPropsBundle));
101833
+ if (replaceWithStrings[i]) {
101834
+ const subDocumentPosition = new SubDocumentPosition(this.subDocument, endOfInsertedInterval);
101835
+ const insertTextManipulatorParams = new InsertTextManipulatorParams(subDocumentPosition, charPropsBundle, RunType.TextRun, replaceWithStrings[i]);
101836
+ const result = this.control.modelManager.modelManipulator.text.insertTextViaHistory(insertTextManipulatorParams);
101837
+ endOfInsertedInterval = result.insertedInterval.end;
101838
+ }
101839
+ if (i < replaceWithStrings.length - 1) {
101840
+ const subDocumentPosition = new SubDocumentPosition(this.subDocument, endOfInsertedInterval);
101841
+ const insertTextManipulatorParams = new InsertParagraphManipulatorParams(subDocumentPosition, charPropsBundle);
101842
+ const result = this.control.modelManager.modelManipulator.paragraph.insertParagraphViaHistory(insertTextManipulatorParams);
101832
101843
  endOfInsertedInterval = result.end;
101833
101844
  }
101834
101845
  }
@@ -107628,19 +107639,33 @@ ResizeBoxListener.directionToSource = {
107628
107639
 
107629
107640
  ;// CONCATENATED MODULE: ./src/common/utils/size-utils.ts
107630
107641
  class SizeUtils {
107631
- static getClientWidth(element) {
107642
+ static getWidthInfo(element) {
107643
+ const offsetSize = SizeUtils.getOffsetWidth(element);
107632
107644
  const style = getComputedStyle(element);
107633
- const offset = parseFloat(style.borderLeftWidth) + parseFloat(style.borderRightWidth) + parseFloat(style.paddingLeft) + parseFloat(style.paddingRight);
107634
- const sizeWithScrollBar = SizeUtils.getOffsetWidth(element) - offset;
107645
+ const inset = parseCssValue(style.borderLeftWidth)
107646
+ + parseCssValue(style.borderRightWidth)
107647
+ + parseCssValue(style.paddingLeft)
107648
+ + parseCssValue(style.paddingRight);
107649
+ const sizeWithScrollBar = offsetSize - inset;
107635
107650
  const scrollBarSize = Math.round(sizeWithScrollBar) - element.clientWidth;
107636
- return sizeWithScrollBar - scrollBarSize;
107651
+ return new DimensionInfo(offsetSize, sizeWithScrollBar - scrollBarSize, scrollBarSize);
107637
107652
  }
107638
- static getClientHeight(element) {
107653
+ static getClientWidth(element) {
107654
+ return this.getWidthInfo(element).clientSize;
107655
+ }
107656
+ static getHeightInfo(element) {
107657
+ const offsetSize = SizeUtils.getOffsetHeight(element);
107639
107658
  const style = getComputedStyle(element);
107640
- const offset = parseFloat(style.borderTopWidth) + parseFloat(style.borderBottomWidth) + parseFloat(style.paddingTop) + parseFloat(style.paddingBottom);
107641
- const sizeWithScrollBar = SizeUtils.getOffsetHeight(element) - offset;
107659
+ const inset = parseCssValue(style.borderTopWidth)
107660
+ + parseCssValue(style.borderBottomWidth)
107661
+ + parseCssValue(style.paddingTop)
107662
+ + parseCssValue(style.paddingBottom);
107663
+ const sizeWithScrollBar = offsetSize - inset;
107642
107664
  const scrollBarSize = Math.round(sizeWithScrollBar) - element.clientHeight;
107643
- return sizeWithScrollBar - scrollBarSize;
107665
+ return new DimensionInfo(offsetSize, sizeWithScrollBar - scrollBarSize, scrollBarSize);
107666
+ }
107667
+ static getClientHeight(element) {
107668
+ return this.getHeightInfo(element).clientSize;
107644
107669
  }
107645
107670
  static getOffsetSize(element) {
107646
107671
  return element.getBoundingClientRect();
@@ -107652,6 +107677,16 @@ class SizeUtils {
107652
107677
  return SizeUtils.getOffsetSize(element).height;
107653
107678
  }
107654
107679
  }
107680
+ function parseCssValue(value) {
107681
+ return value ? parseFloat(value) : 0;
107682
+ }
107683
+ class DimensionInfo {
107684
+ constructor(offsetSize, clientSize, scrollbarSize) {
107685
+ this.offsetSize = offsetSize;
107686
+ this.clientSize = clientSize;
107687
+ this.scrollbarSize = scrollbarSize;
107688
+ }
107689
+ }
107655
107690
 
107656
107691
  ;// CONCATENATED MODULE: ./src/common/canvas/canvas-manager.ts
107657
107692
 
@@ -108129,18 +108164,8 @@ class CanvasScrollManager {
108129
108164
  this.updateScrollVisibility();
108130
108165
  }
108131
108166
  updateScrollVisibility() {
108132
- if (!this.scrollMeasurer) {
108133
- this.scrollMeasurer = document.createElement("div");
108134
- this.scrollMeasurer.style.position = "absolute";
108135
- this.scrollMeasurer.style.top = "0";
108136
- this.scrollMeasurer.style.bottom = "0";
108137
- this.scrollMeasurer.style.right = "0";
108138
- this.scrollMeasurer.style.left = "0";
108139
- }
108140
- this.canvas.appendChild(this.scrollMeasurer);
108141
108167
  const prevScrollYVisibility = this.sizes.scrollYVisible;
108142
- this.sizes.updateScrollVisibility(this.scrollMeasurer.offsetWidth, this.scrollMeasurer.offsetHeight);
108143
- this.canvas.removeChild(this.scrollMeasurer);
108168
+ this.sizes.updateScrollVisibility(this.canvas);
108144
108169
  if (prevScrollYVisibility !== this.sizes.scrollYVisible && this.horizontalRuler)
108145
108170
  this.horizontalRuler.adjust();
108146
108171
  }
@@ -108215,6 +108240,7 @@ class CanvasScrollManager {
108215
108240
 
108216
108241
 
108217
108242
 
108243
+
108218
108244
  class CanvasSizeInfo {
108219
108245
  constructor() {
108220
108246
  this.topSpacing = -1;
@@ -108231,7 +108257,7 @@ class CanvasSizeInfo {
108231
108257
  this.pageVerticalInfo.init(dom.DomUtils.getCurrentStyle(page));
108232
108258
  this.topSpacing = this.pageVerticalInfo.topPageBorderWidth + this.pageVerticalInfo.topMargin;
108233
108259
  this.betweenPageSpacing = this.pageVerticalInfo.betweenPageSpacing;
108234
- this.setVisibleAreaSize(canvas.offsetWidth, canvas.offsetHeight);
108260
+ this.setVisibleAreaSize(SizeUtils.getClientWidth(canvas), SizeUtils.getClientHeight(canvas));
108235
108261
  }
108236
108262
  findPageIndexByOffsetY(pages, offsetY) {
108237
108263
  return Math.max(0, search.SearchUtils.normedInterpolationIndexOf(pages, (p) => this.getPageOffsetY(p), offsetY));
@@ -108244,22 +108270,27 @@ class CanvasSizeInfo {
108244
108270
  this.visibleAreaSize.height = height;
108245
108271
  }
108246
108272
  getVisibleAreaWidth(includeScrollBars) {
108247
- if (includeScrollBars)
108273
+ if (!includeScrollBars)
108248
108274
  return this.visibleAreaSize.width;
108249
- return this.scrollYVisible ? this.visibleAreaSize.width - this.scrollWidth : this.visibleAreaSize.width;
108275
+ return this.scrollYVisible ? this.visibleAreaSize.width + this.scrollWidth : this.visibleAreaSize.width;
108250
108276
  }
108251
108277
  getVisibleAreaHeight(includeScrollBars) {
108252
- if (includeScrollBars)
108278
+ if (!includeScrollBars)
108253
108279
  return this.visibleAreaSize.height;
108254
- return this.scrollXVisible ? this.visibleAreaSize.height - this.scrollWidth : this.visibleAreaSize.height;
108280
+ return this.scrollXVisible ? this.visibleAreaSize.height + this.scrollWidth : this.visibleAreaSize.height;
108255
108281
  }
108256
- updateScrollVisibility(measurerWidth, measurerHeight) {
108257
- this.scrollXVisible = measurerHeight < this.visibleAreaSize.height;
108258
- this.scrollYVisible = measurerWidth < this.visibleAreaSize.width;
108282
+ updateScrollVisibility(canvas) {
108283
+ this.scrollXVisible = SizeUtils.getHeightInfo(canvas).scrollbarSize > 0;
108284
+ this.scrollYVisible = SizeUtils.getWidthInfo(canvas).scrollbarSize > 0;
108259
108285
  }
108260
- isChanged(canvas) {
108261
- return this.visibleAreaSize.width !== canvas.offsetWidth ||
108262
- this.visibleAreaSize.height !== canvas.offsetHeight;
108286
+ updateSize(canvas) {
108287
+ const width = SizeUtils.getClientWidth(canvas);
108288
+ const height = SizeUtils.getClientHeight(canvas);
108289
+ if (this.visibleAreaSize.width !== width || this.visibleAreaSize.height !== height) {
108290
+ this.setVisibleAreaSize(width, height);
108291
+ return true;
108292
+ }
108293
+ return false;
108263
108294
  }
108264
108295
  }
108265
108296
 
@@ -109523,7 +109554,6 @@ class SelectionRenderer extends SelectionRendererBase {
109523
109554
 
109524
109555
 
109525
109556
 
109526
-
109527
109557
 
109528
109558
 
109529
109559
  class ViewManager {
@@ -109583,11 +109613,8 @@ class ViewManager {
109583
109613
  this.canvasListener.onCanvasScroll();
109584
109614
  }
109585
109615
  }
109586
- else if (this.sizes.isChanged(this.canvas)) {
109587
- const size = SizeUtils.getOffsetSize(this.canvas);
109588
- this.sizes.setVisibleAreaSize(size.width, size.height);
109616
+ else if (this.sizes.updateSize(this.canvas))
109589
109617
  this.scroll.onCanvasSizeChanged();
109590
- }
109591
109618
  }
109592
109619
  NotifyPagesReady(pageChanges) {
109593
109620
  this.canvasListener.onPagesReady(pageChanges);
@@ -141561,7 +141588,7 @@ class ClientRichEdit {
141561
141588
  this.contextMenuSettings = settings.contextMenuSettings;
141562
141589
  this.fullScreenHelper = new FullScreenHelper(element);
141563
141590
  if (true)
141564
- external_DevExpress_config_default()(JSON.parse(atob('eyJsaWNlbnNlS2V5IjoiZXdvZ0lDSm1iM0p0WVhRaU9pQXhMQW9nSUNKcGJuUmxjbTVoYkZWellXZGxTV1FpT2lBaVZIWXphbFZEUnpoV1ZUSTRWMUZOYkVaUlJrVlRVU0lLZlE9PS5QMlRnaUloY2ZZcHl5Vi9KTjFoL3ptVWtUaGh5MW1Za0NpbUdzVHJ4alpTRlRGUENjQ3h6aS9nZXY0L3VhMU8wUDQyYlJKaGZFRnFPSTI1WE95YmZ1UW5FRTFMeGFrWDFuQkRMOVdPYTNTcVFDQ3dSQnJycnowcmZLTUtzS2Rma08xSlVWZz09In0=')));
141591
+ external_DevExpress_config_default()(JSON.parse(atob('eyJsaWNlbnNlS2V5IjoiZXdvZ0lDSm1iM0p0WVhRaU9pQXhMQW9nSUNKcGJuUmxjbTVoYkZWellXZGxTV1FpT2lBaVRXOVZka0ZEZWsxcVRsTmFiMjEyTmpsYVRGbHBlQ0lLZlE9PS5WN0NsMFNmUGxxMmpzWklzVVRDYSt3bUJ5VTRwazl1OFk1OVNMUEJWdWVRL2lrZWRHd3ljZDMrakpRejZ1cG9Sa3lPTGNuOEJJSitqa3MycGkyaHhyZjBRNkJoUW5zbjdZMDF5OXY5MWpWeDVVTW5XZWZaUlR6bWllK1M4TGl5OTVoUjJIQT09In0=')));
141565
141592
  this.prepareElement(element, settings);
141566
141593
  this.initDefaultFontsAndStyles();
141567
141594
  this.initBars(settings.ribbon, settings.fonts);