devexpress-richedit 24.1.5-build-24221-1027 → 24.1.5

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.
@@ -30979,7 +30979,7 @@ function hexToBase64(hexStr) {
30979
30979
  return hexadecimal_converter_btoa(result.join(""));
30980
30980
  }
30981
30981
  function base64ToHex(base64Str) {
30982
- for (var i = 0, bin = atob(base64Str.replace(/[ \r\n]+$/, "")), hex = []; i < bin.length; ++i) {
30982
+ for (var i = 0, bin = hexadecimal_converter_atob(base64Str.replace(/[ \r\n]+$/, "")), hex = []; i < bin.length; ++i) {
30983
30983
  var tmp = bin.charCodeAt(i).toString(16);
30984
30984
  if (tmp.length === 1)
30985
30985
  tmp = "0" + tmp;
@@ -31002,7 +31002,7 @@ function hexadecimal_converter_btoa(bin) {
31002
31002
  }
31003
31003
  return base64.join("");
31004
31004
  }
31005
- function atob(base64) {
31005
+ function hexadecimal_converter_atob(base64) {
31006
31006
  if (/(=[^=]+|={3,})$/.test(base64))
31007
31007
  throw new Error("String contains an invalid character");
31008
31008
  base64 = base64.replace(/=/g, "");
@@ -109657,6 +109657,7 @@ class EventManager {
109657
109657
  this.control = control;
109658
109658
  this.mouseHandler = new MouseHandler(control, boxVisualizerManager);
109659
109659
  this.touchHandler = new TouchHandler(control, boxVisualizerManager);
109660
+ this.inputTypeHandlers = this.createInputTypeHandlers();
109660
109661
  }
109661
109662
  set mouseWheelEvent(val) {
109662
109663
  this.mouseHandler.mouseWheelEvent = val;
@@ -109829,6 +109830,19 @@ class EventManager {
109829
109830
  this.moveLocked = true;
109830
109831
  this.lockMouseMoveTimerId = setTimeout(() => this.moveLocked = false, 0);
109831
109832
  }
109833
+ onInput(inputType) {
109834
+ const commandId = this.inputTypeHandlers[inputType];
109835
+ if (!commandId)
109836
+ return false;
109837
+ const command = this.control.commandManager.getCommand(commandId);
109838
+ command.execute(false);
109839
+ return true;
109840
+ }
109841
+ createInputTypeHandlers() {
109842
+ const result = {};
109843
+ result["insertParagraph"] = RichEditClientCommand.InsertParagraph;
109844
+ return result;
109845
+ }
109832
109846
  }
109833
109847
  class RichMouseEvent {
109834
109848
  constructor(evt, layoutPoint, source, scrollTop, scrollLeft) {
@@ -111820,7 +111834,6 @@ class SelectionRenderer extends SelectionRendererBase {
111820
111834
 
111821
111835
 
111822
111836
 
111823
-
111824
111837
 
111825
111838
 
111826
111839
  class ViewManager {
@@ -111899,14 +111912,12 @@ class ViewManager {
111899
111912
  this.selection.renderAllPageSelection(this.layout, 0, true);
111900
111913
  else
111901
111914
  this.selection.applySelectionChanges(this.layout);
111902
- if (browser.Browser.WebKitTouchUI || (browser.Browser.MacOSPlatform && browser.Browser.MajorVersion >= 13) || browser.Browser.Chrome) {
111903
- const pageIndex = utils_list.ListUtils.reverseIndexBy(layoutSelection.selectionInfo.pageInfos, pageInfo => pageInfo.oldItems.length > 0);
111904
- if (pageIndex > -1) {
111905
- const pageInfo = layoutSelection.selectionInfo.pageInfos[pageIndex];
111906
- const item = pageInfo.oldItems[0];
111907
- const layoutPage = this.layout.pages[pageIndex];
111908
- this.inputController.setPosition(layoutPage.x + this.cache[pageIndex].page.offsetLeft + item.x, this.sizes.getPageOffsetY(layoutPage) + item.y);
111909
- }
111915
+ const pageIndex = utils_list.ListUtils.reverseIndexBy(layoutSelection.selectionInfo.pageInfos, pageInfo => pageInfo.oldItems.length > 0);
111916
+ if (pageIndex > -1) {
111917
+ const pageInfo = layoutSelection.selectionInfo.pageInfos[pageIndex];
111918
+ const item = pageInfo.oldItems[0];
111919
+ const layoutPage = this.layout.pages[pageIndex];
111920
+ this.inputController.setPosition(layoutPage.x + this.cache[pageIndex].page.offsetLeft + item.x, this.sizes.getPageOffsetY(layoutPage) + item.y);
111910
111921
  }
111911
111922
  }
111912
111923
  NotifySearchSelectionLayoutChanged() {
@@ -112558,6 +112569,7 @@ const TAB_KEYCODE = 9;
112558
112569
  const IDEOGRAPHIC_SPACE_CHARCODE = 12288;
112559
112570
  class InputEditorBase {
112560
112571
  constructor(control, eventManager, parent) {
112572
+ this.newLineRegexp = /(\r\n|\n|\r)/gm;
112561
112573
  this.processTextOnKeyPress = false;
112562
112574
  this.evtHandlersHolder = new event_handlers_holder/* DomEventHandlersHolder */.$();
112563
112575
  this.control = control;
@@ -112596,8 +112608,7 @@ class InputEditorBase {
112596
112608
  this.evtHandlersHolder.addListener(this.getEditableDocument(), "focus", this.onFocus.bind(this));
112597
112609
  this.evtHandlersHolder.addListener(this.getEditableDocument(), "blur", (evt) => this.onBlurTimerId = setTimeout(() => this.onBlur(evt), 10));
112598
112610
  this.evtHandlersHolder.addListener(this.getEditableDocument(), "contextmenu", this.onContextMenu.bind(this));
112599
- if (this.canInsertTextOnInputEvent)
112600
- this.evtHandlersHolder.addListener(this.getEditableDocument(), "input", (evt) => this.onInput(evt));
112611
+ this.evtHandlersHolder.addListener(this.getEditableDocument(), "input", (evt) => this.onInput(evt));
112601
112612
  }
112602
112613
  createHierarchy(parent) {
112603
112614
  this.inputElement = this.createInputElement();
@@ -112611,8 +112622,21 @@ class InputEditorBase {
112611
112622
  return null;
112612
112623
  }
112613
112624
  onInput(evt) {
112614
- if (this.canInsertTextOnInputEvent)
112615
- this.onInputTimerId = setTimeout(() => this.onTextInput(evt.data), 0);
112625
+ if (!this.processTextOnKeyPress) {
112626
+ if (evt.inputType === "insertText") {
112627
+ const text = this.getEditableTextOwner().innerText;
112628
+ if (utils_string.StringUtils.isNullOrEmpty(text))
112629
+ return;
112630
+ if (this.newLineRegexp.test(text)) {
112631
+ this.eventManager.onInput("insertParagraph");
112632
+ this.clearInputElement();
112633
+ }
112634
+ else
112635
+ this.onInputTimerId = setTimeout(() => this.onTextInput(evt.data), 0);
112636
+ }
112637
+ else if (this.eventManager.onInput(evt.inputType))
112638
+ this.clearInputElement();
112639
+ }
112616
112640
  }
112617
112641
  onBlur(_evt) {
112618
112642
  const targetElement = document.activeElement;
@@ -112668,11 +112692,10 @@ class InputEditorBase {
112668
112692
  this.keyPressTimerId = setTimeout(() => this.onTextInput(undefined), 0);
112669
112693
  else if (this.processTextOnKeyPress) {
112670
112694
  this.imeTimerId = setTimeout(() => {
112671
- if (!this.isIME)
112672
- this.onTextInput(undefined);
112695
+ this.onTextInput(undefined);
112696
+ this.processTextOnKeyPress = false;
112673
112697
  }, 0);
112674
112698
  }
112675
- this.processTextOnKeyPress = false;
112676
112699
  this.inputWithAlt = false;
112677
112700
  }
112678
112701
  }
@@ -112733,8 +112756,9 @@ class InputEditorBase {
112733
112756
  canUseInputEvent() {
112734
112757
  return browser.Browser.Firefox && browser.Browser.MajorVersion >= 14 || browser.Browser.WebKitTouchUI;
112735
112758
  }
112736
- getEditableDocumentText() {
112737
- return dom.DomUtils.getInnerText(this.getEditableTextOwner()).replace(/(\r\n|\n|\r)/gm, "");
112759
+ getEditableDocumentText(keepLineBreakes = false) {
112760
+ const text = dom.DomUtils.getInnerText(this.getEditableTextOwner());
112761
+ return keepLineBreakes ? text : text.replace(this.newLineRegexp, "");
112738
112762
  }
112739
112763
  getEditableTextOwner() {
112740
112764
  return null;
@@ -143717,6 +143741,7 @@ class FullScreenHelper {
143717
143741
 
143718
143742
  ;// CONCATENATED MODULE: external "DevExpress.config"
143719
143743
  var external_DevExpress_config_namespaceObject = DevExpress.config;
143744
+ var external_DevExpress_config_default = /*#__PURE__*/__webpack_require__.n(external_DevExpress_config_namespaceObject);
143720
143745
  ;// CONCATENATED MODULE: ./src/client/client-rich-edit.ts
143721
143746
 
143722
143747
 
@@ -143773,8 +143798,8 @@ class ClientRichEdit {
143773
143798
  this.rawDataSource = settings.rawDataSource;
143774
143799
  this.contextMenuSettings = settings.contextMenuSettings;
143775
143800
  this.fullScreenHelper = new FullScreenHelper(element);
143776
- if (false)
143777
- {}
143801
+ if (true)
143802
+ external_DevExpress_config_default()(JSON.parse(atob('eyJsaWNlbnNlS2V5IjoiZXdvZ0lDSm1iM0p0WVhRaU9pQXhMQW9nSUNKcGJuUmxjbTVoYkZWellXZGxTV1FpT2lBaWExcHBaR1pSWjA1WGEyVkxaVmx6U2tJNFdHcFhaeUlLZlE9PS5mL01XY3Z5bDUyTFJMRWlMaEVyYnF1eW5yQ3FEQjdvZ0U1QVgxcGdpMXduSW9sT1MySFluNjBWeDBTb0VJVVpEUGhIRlBSQkdpSzg2cFA1K0xjMG56dUd6RFpEZkVUUS9CeklldjJoNTYzdWc2SzlKMCswMER0eTlvVW1GU2xvRTl6WTdQZz09In0=')));
143778
143803
  this.prepareElement(element, settings);
143779
143804
  this.initDefaultFontsAndStyles();
143780
143805
  this.initBars(settings.ribbon, settings.fonts);