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