roosterjs 9.54.0 → 9.56.0

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.
@@ -1904,7 +1904,7 @@ exports.OldEventTypeToNewEventType = (_d = {},
1904
1904
  * @internal Convert legacy event object to new event object
1905
1905
  */
1906
1906
  function oldEventToNewEvent(input, refEvent, domToModelSettings) {
1907
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
1907
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
1908
1908
  switch (input.eventType) {
1909
1909
  case 9 /* BeforeCutCopy */:
1910
1910
  return {
@@ -1948,7 +1948,7 @@ function oldEventToNewEvent(input, refEvent, domToModelSettings) {
1948
1948
  htmlAfter: input.htmlAfter,
1949
1949
  htmlAttributes: input.htmlAttributes,
1950
1950
  htmlBefore: input.htmlBefore,
1951
- pasteType: PasteTypeOldToNew[input.pasteType],
1951
+ pasteType: (_d = refBeforePasteEvent === null || refBeforePasteEvent === void 0 ? void 0 : refBeforePasteEvent.pasteType) !== null && _d !== void 0 ? _d : PasteTypeOldToNew[input.pasteType],
1952
1952
  };
1953
1953
  case 20 /* BeforeSetContent */:
1954
1954
  return {
@@ -1970,11 +1970,11 @@ function oldEventToNewEvent(input, refEvent, domToModelSettings) {
1970
1970
  changedEntities: refContentChangedEvent === null || refContentChangedEvent === void 0 ? void 0 : refContentChangedEvent.changedEntities,
1971
1971
  contentModel: refContentChangedEvent === null || refContentChangedEvent === void 0 ? void 0 : refContentChangedEvent.contentModel,
1972
1972
  data: input.data,
1973
- entityStates: (_f = (_e = (_d = input.additionalData) === null || _d === void 0 ? void 0 : _d.getEntityState) === null || _e === void 0 ? void 0 : _e.call(_d)) !== null && _f !== void 0 ? _f : refContentChangedEvent === null || refContentChangedEvent === void 0 ? void 0 : refContentChangedEvent.entityStates,
1973
+ entityStates: (_g = (_f = (_e = input.additionalData) === null || _e === void 0 ? void 0 : _e.getEntityState) === null || _f === void 0 ? void 0 : _f.call(_e)) !== null && _g !== void 0 ? _g : refContentChangedEvent === null || refContentChangedEvent === void 0 ? void 0 : refContentChangedEvent.entityStates,
1974
1974
  selection: refContentChangedEvent === null || refContentChangedEvent === void 0 ? void 0 : refContentChangedEvent.selection,
1975
1975
  source: input.source,
1976
- formatApiName: (_h = (_g = input.additionalData) === null || _g === void 0 ? void 0 : _g.formatApiName) !== null && _h !== void 0 ? _h : refContentChangedEvent === null || refContentChangedEvent === void 0 ? void 0 : refContentChangedEvent.formatApiName,
1977
- announceData: (_l = announceDataOldToNew((_k = (_j = input.additionalData) === null || _j === void 0 ? void 0 : _j.getAnnounceData) === null || _k === void 0 ? void 0 : _k.call(_j))) !== null && _l !== void 0 ? _l : refContentChangedEvent === null || refContentChangedEvent === void 0 ? void 0 : refContentChangedEvent.announceData,
1976
+ formatApiName: (_j = (_h = input.additionalData) === null || _h === void 0 ? void 0 : _h.formatApiName) !== null && _j !== void 0 ? _j : refContentChangedEvent === null || refContentChangedEvent === void 0 ? void 0 : refContentChangedEvent.formatApiName,
1977
+ announceData: (_m = announceDataOldToNew((_l = (_k = input.additionalData) === null || _k === void 0 ? void 0 : _k.getAnnounceData) === null || _l === void 0 ? void 0 : _l.call(_k))) !== null && _m !== void 0 ? _m : refContentChangedEvent === null || refContentChangedEvent === void 0 ? void 0 : refContentChangedEvent.announceData,
1978
1978
  };
1979
1979
  case 16 /* ContextMenu */:
1980
1980
  return {
@@ -1997,8 +1997,8 @@ function oldEventToNewEvent(input, refEvent, domToModelSettings) {
1997
1997
  return {
1998
1998
  eventType: 'editorReady',
1999
1999
  eventDataCache: input.eventDataCache,
2000
- addedBlockElements: (_m = refEditorReadyEvent === null || refEditorReadyEvent === void 0 ? void 0 : refEditorReadyEvent.addedBlockElements) !== null && _m !== void 0 ? _m : [],
2001
- removedBlockElements: (_o = refEditorReadyEvent === null || refEditorReadyEvent === void 0 ? void 0 : refEditorReadyEvent.removedBlockElements) !== null && _o !== void 0 ? _o : [],
2000
+ addedBlockElements: (_o = refEditorReadyEvent === null || refEditorReadyEvent === void 0 ? void 0 : refEditorReadyEvent.addedBlockElements) !== null && _o !== void 0 ? _o : [],
2001
+ removedBlockElements: (_p = refEditorReadyEvent === null || refEditorReadyEvent === void 0 ? void 0 : refEditorReadyEvent.removedBlockElements) !== null && _p !== void 0 ? _p : [],
2002
2002
  };
2003
2003
  case 17 /* EnteredShadowEdit */:
2004
2004
  return {
@@ -2072,7 +2072,7 @@ function oldEventToNewEvent(input, refEvent, domToModelSettings) {
2072
2072
  return {
2073
2073
  eventType: 'selectionChanged',
2074
2074
  eventDataCache: input.eventDataCache,
2075
- newSelection: (_p = refSelectionChangedEvent === null || refSelectionChangedEvent === void 0 ? void 0 : refSelectionChangedEvent.newSelection) !== null && _p !== void 0 ? _p : (0, selectionConverter_1.convertRangeExToDomSelection)(input.selectionRangeEx),
2075
+ newSelection: (_q = refSelectionChangedEvent === null || refSelectionChangedEvent === void 0 ? void 0 : refSelectionChangedEvent.newSelection) !== null && _q !== void 0 ? _q : (0, selectionConverter_1.convertRangeExToDomSelection)(input.selectionRangeEx),
2076
2076
  };
2077
2077
  case 21 /* ZoomChanged */:
2078
2078
  return {