devexpress-richedit 24.1.3 → 24.1.4-build-24186-1015

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * DevExpress WebRichEdit (gulpfile.js)
3
- * Version: 24.1.3
3
+ * Version: 24.1.4
4
4
  * Copyright (c) 2012 - 2024 Developer Express Inc. ALL RIGHTS RESERVED
5
5
  * License: https://www.devexpress.com/Support/EULAs
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * DevExpress WebRichEdit (index-custom.js)
3
- * Version: 24.1.3
3
+ * Version: 24.1.4
4
4
  * Copyright (c) 2012 - 2024 Developer Express Inc. ALL RIGHTS RESERVED
5
5
  * License: https://www.devexpress.com/Support/EULAs
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * DevExpress WebRichEdit (localization-builder.js)
3
- * Version: 24.1.3
3
+ * Version: 24.1.4
4
4
  * Copyright (c) 2012 - 2024 Developer Express Inc. ALL RIGHTS RESERVED
5
5
  * License: https://www.devexpress.com/Support/EULAs
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * DevExpress WebRichEdit (nspell-index.js)
3
- * Version: 24.1.3
3
+ * Version: 24.1.4
4
4
  * Copyright (c) 2012 - 2024 Developer Express Inc. ALL RIGHTS RESERVED
5
5
  * License: https://www.devexpress.com/Support/EULAs
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * DevExpress WebRichEdit (nspell.webpack.config.js)
3
- * Version: 24.1.3
3
+ * Version: 24.1.4
4
4
  * Copyright (c) 2012 - 2024 Developer Express Inc. ALL RIGHTS RESERVED
5
5
  * License: https://www.devexpress.com/Support/EULAs
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * DevExpress WebRichEdit (webpack-externals.js)
3
- * Version: 24.1.3
3
+ * Version: 24.1.4
4
4
  * Copyright (c) 2012 - 2024 Developer Express Inc. ALL RIGHTS RESERVED
5
5
  * License: https://www.devexpress.com/Support/EULAs
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * DevExpress WebRichEdit (webpack.config.js)
3
- * Version: 24.1.3
3
+ * Version: 24.1.4
4
4
  * Copyright (c) 2012 - 2024 Developer Express Inc. ALL RIGHTS RESERVED
5
5
  * License: https://www.devexpress.com/Support/EULAs
6
6
  */
@@ -1933,7 +1933,7 @@
1933
1933
  }
1934
1934
 
1935
1935
  .dxreInputTarget {
1936
- position: fixed;
1936
+ position: absolute;
1937
1937
  overflow: hidden;
1938
1938
  left: -1px;
1939
1939
  top: -1px;
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * DevExpress WebRichEdit (dx.richedit.d.ts)
3
- * Version: 24.1.3
3
+ * Version: 24.1.4
4
4
  * Copyright (c) 2012 - 2024 Developer Express Inc. ALL RIGHTS RESERVED
5
5
  * License: https://www.devexpress.com/Support/EULAs
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * DevExpress WebRichEdit (dx.richedit.js)
3
- * Version: 24.1.3
3
+ * Version: 24.1.4
4
4
  * Copyright (c) 2012 - 2024 Developer Express Inc. ALL RIGHTS RESERVED
5
5
  * License: https://www.devexpress.com/Support/EULAs
6
6
  */
@@ -68206,7 +68206,8 @@ class HtmlImgTagImporter extends HtmlTagImporterBase {
68206
68206
  importBefore() {
68207
68207
  const imageElement = this.importer.currElement;
68208
68208
  const originalSize = new geometry_size.Size(imageElement.naturalWidth, imageElement.naturalHeight);
68209
- const actualSize = new geometry_size.Size(imageElement.width, imageElement.height);
68209
+ const styleSize = new geometry_size.Size(parseFloat(imageElement.style.width), parseFloat(imageElement.style.height));
68210
+ const actualSize = new geometry_size.Size(imageElement.width || styleSize.width, imageElement.height || styleSize.height);
68210
68211
  if (originalSize.width !== undefined && originalSize.height !== undefined)
68211
68212
  originalSize.applyConverter(unit_converter/* UnitConverter */.u.pixelsToTwips);
68212
68213
  if (actualSize.width !== undefined && actualSize.height !== undefined)
@@ -69599,6 +69600,10 @@ class HtmlImporterTabStops {
69599
69600
 
69600
69601
 
69601
69602
 
69603
+
69604
+
69605
+
69606
+
69602
69607
 
69603
69608
 
69604
69609
 
@@ -69631,7 +69636,7 @@ class HtmlImportData {
69631
69636
  }
69632
69637
  }
69633
69638
  class HtmlImporter {
69634
- constructor(modelManager, measurer, subDocPosition, initElements, charPropsBundle) {
69639
+ constructor(modelManager, measurer, subDocPosition, initElements, charPropsBundle, formatImagesImporter) {
69635
69640
  this.fieldsId = 0;
69636
69641
  this.listIndex = 0;
69637
69642
  this.listInfos = [];
@@ -69672,6 +69677,7 @@ class HtmlImporter {
69672
69677
  this.measurer = measurer;
69673
69678
  this.currPosition = this.subDocPosition.position;
69674
69679
  this.levelInfo = [new LevelInfo(null, initElements, true)];
69680
+ this.formatImagesImporter = formatImagesImporter;
69675
69681
  this.loadFontInfos = [];
69676
69682
  this.tempFontInfoCache = new FontInfoCache(this.modelManager.model.cache.fontInfoCache.fontMeasurer);
69677
69683
  this.htmlImporterMaskedCharacterProperties =
@@ -69705,6 +69711,8 @@ class HtmlImporter {
69705
69711
  insertedInterval = new fixed.FixedInterval(this.subDocPosition.position, 0);
69706
69712
  for (let info of this.loadFontInfos)
69707
69713
  this.modelManager.modelManipulator.font.loadFontInfo(info.fontInfo, info.subDocument, [info.applyNewFontOnIntervalsAfterLoad], this.measurer);
69714
+ if (this.formatImagesImporter)
69715
+ this.registerImageRuns();
69708
69716
  });
69709
69717
  return insertedInterval;
69710
69718
  }
@@ -69811,6 +69819,28 @@ class HtmlImporter {
69811
69819
  return ColumnCalculator.findMinimalColumnSize(section.sectionProperties)
69812
69820
  .applyConverter(unit_converter/* UnitConverter */.u.pixelsToTwips);
69813
69821
  }
69822
+ registerImageRuns() {
69823
+ let importedRunsInfoIndex = -1;
69824
+ this.subDocument.chunks.forEach((chunk) => {
69825
+ chunk.textRuns.forEach((run) => {
69826
+ if (run instanceof InlinePictureRun) {
69827
+ importedRunsInfoIndex = this.findIndexImportedInlinePictureRunInfo(run.info.publicAPIID, ++importedRunsInfoIndex);
69828
+ const subDocPos = new SubDocumentPosition(this.subDocument, run.startOffset);
69829
+ const importedRunsInfo = this.importedRunsInfo[importedRunsInfoIndex];
69830
+ const options = ImageLoadingOptions.initByActualSize(importedRunsInfo.actualSize);
69831
+ const importerData = new FormatImagesImporterData(subDocPos, options, run);
69832
+ this.formatImagesImporter.registerImageRun(importerData);
69833
+ }
69834
+ });
69835
+ });
69836
+ }
69837
+ findIndexImportedInlinePictureRunInfo(publicAPIID, startIndex = 0) {
69838
+ for (let i = startIndex, runInfo; runInfo = this.importedRunsInfo[i]; i++) {
69839
+ if (runInfo instanceof ImportedInlinePictureRunInfo && runInfo.picInfo.publicAPIID === publicAPIID)
69840
+ return i;
69841
+ }
69842
+ return -1;
69843
+ }
69814
69844
  static convertHtml(html) {
69815
69845
  Log.print(LogSource.HtmlImporter, "convertHtml", () => html);
69816
69846
  html = html.replace(/<(\w[^>]*) lang=([^ |>]*)([^>]*)/gi, "<$1$3");
@@ -69977,7 +70007,7 @@ class HtmlDocumentImporter {
69977
70007
  const measurer = new Measurer('');
69978
70008
  const position = new SubDocumentPosition(this.documentModel.mainSubDocument, 0);
69979
70009
  const initElements = container.childNodes;
69980
- new HtmlImporter(this.modelManager, measurer, position, initElements, charPropsBundle).import();
70010
+ new HtmlImporter(this.modelManager, measurer, position, initElements, charPropsBundle, this.formatImagesImporter).import();
69981
70011
  this.removeLastParagraph();
69982
70012
  }
69983
70013
  finally {
@@ -89413,15 +89443,20 @@ class ControlFontsLoader {
89413
89443
  };
89414
89444
  const xhr = new XMLHttpRequest();
89415
89445
  xhr.onload = (_e) => {
89416
- const fontSource = xhr.response;
89417
- if (xhr.status >= 400 || !fontSource) {
89418
- if (fontInfo.next())
89419
- this.makeRequest(fontInfo, afterLoading);
89446
+ const contentType = xhr.getResponseHeader("Content-Type");
89447
+ if (contentType !== 'text/html') {
89448
+ const fontSource = xhr.response;
89449
+ if (xhr.status >= 400 || !fontSource) {
89450
+ if (fontInfo.next())
89451
+ this.makeRequest(fontInfo, afterLoading);
89452
+ else
89453
+ notLoaded();
89454
+ }
89420
89455
  else
89421
- notLoaded();
89456
+ afterLoading(fontSource);
89422
89457
  }
89423
89458
  else
89424
- afterLoading(fontSource);
89459
+ notLoaded();
89425
89460
  };
89426
89461
  xhr.onerror = () => notLoaded();
89427
89462
  xhr.open("GET", fontInfo.currentPath, true);
@@ -94359,6 +94394,7 @@ class AnchorObjectPositionCalculatorBase {
94359
94394
  this.obj = obj;
94360
94395
  this.isRelativeCell = !!this.manager.activeFormatter.tableFormatter &&
94361
94396
  (obj.anchorInfo.layoutTableCell || this.manager.model.compatibilitySettings.layoutInTableCell);
94397
+ this.isSimpleView = this.manager.innerClientProperties.viewsSettings.isSimpleView;
94362
94398
  }
94363
94399
  }
94364
94400
 
@@ -94569,13 +94605,15 @@ class AnchorObjectVerticalPositionCalculator extends AnchorObjectPositionCalcula
94569
94605
  switch (this.anchorInfo.verticalPositionType) {
94570
94606
  case AnchorObjectVerticalPositionType.Page:
94571
94607
  return this.isRelativeCell ? this.relativeColumnPos() + this.lp.row.tableCellInfo.y + this.topCellMargin : 0;
94572
- case AnchorObjectVerticalPositionType.Paragraph:
94573
- return this.relativeColumnPos() + this.getRowWhatStartParagraphY();
94574
94608
  case AnchorObjectVerticalPositionType.Line:
94575
94609
  return this.relativeColumnPos() + this.lp.row.y;
94576
94610
  case AnchorObjectVerticalPositionType.Margin:
94577
- return this.isRelativeCell ? this.relativeColumnPos() + this.lp.row.tableCellInfo.y + this.topCellMargin :
94578
- this.manager.boundsCalculator.marginTop;
94611
+ if (!this.isSimpleView) {
94612
+ return this.isRelativeCell ? this.relativeColumnPos() + this.lp.row.tableCellInfo.y + this.topCellMargin :
94613
+ this.manager.boundsCalculator.marginTop;
94614
+ }
94615
+ case AnchorObjectVerticalPositionType.Paragraph:
94616
+ return this.relativeColumnPos() + this.getRowWhatStartParagraphY();
94579
94617
  case AnchorObjectVerticalPositionType.TopMargin:
94580
94618
  case AnchorObjectVerticalPositionType.InsideMargin:
94581
94619
  return this.isRelativeCell ? this.relativeColumnPos() + this.lp.row.tableCellInfo.y + this.topCellMargin : 0;