roosterjs-content-model-plugins 0.25.0 → 0.26.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.
Files changed (463) hide show
  1. package/{lib-mjs/autoFormat/ContentModelAutoFormatPlugin.d.ts → lib/autoFormat/AutoFormatPlugin.d.ts} +53 -53
  2. package/lib/autoFormat/{ContentModelAutoFormatPlugin.js → AutoFormatPlugin.js} +81 -81
  3. package/lib/autoFormat/AutoFormatPlugin.js.map +1 -0
  4. package/lib/autoFormat/keyboardListTrigger.d.ts +5 -5
  5. package/lib/autoFormat/keyboardListTrigger.js +45 -45
  6. package/lib/autoFormat/keyboardListTrigger.js.map +1 -1
  7. package/lib/autoFormat/utils/convertAlphaToDecimals.d.ts +7 -7
  8. package/lib/autoFormat/utils/convertAlphaToDecimals.js +22 -22
  9. package/lib/autoFormat/utils/convertAlphaToDecimals.js.map +1 -1
  10. package/lib/autoFormat/utils/getIndex.d.ts +4 -4
  11. package/lib/autoFormat/utils/getIndex.js +13 -13
  12. package/lib/autoFormat/utils/getIndex.js.map +1 -1
  13. package/lib/autoFormat/utils/getListTypeStyle.d.ts +14 -14
  14. package/lib/autoFormat/utils/getListTypeStyle.js +87 -79
  15. package/lib/autoFormat/utils/getListTypeStyle.js.map +1 -1
  16. package/lib/autoFormat/utils/getNumberingListStyle.d.ts +4 -4
  17. package/lib/autoFormat/utils/getNumberingListStyle.js +153 -152
  18. package/lib/autoFormat/utils/getNumberingListStyle.js.map +1 -1
  19. package/{lib-amd/edit/ContentModelEditPlugin.d.ts → lib/edit/EditPlugin.d.ts} +39 -35
  20. package/lib/edit/EditPlugin.js +129 -0
  21. package/lib/edit/EditPlugin.js.map +1 -0
  22. package/lib/edit/deleteSteps/deleteAllSegmentBefore.d.ts +5 -5
  23. package/lib/edit/deleteSteps/deleteAllSegmentBefore.js +22 -22
  24. package/lib/edit/deleteSteps/deleteAllSegmentBefore.js.map +1 -1
  25. package/lib/edit/deleteSteps/deleteCollapsedSelection.d.ts +9 -9
  26. package/lib/edit/deleteSteps/deleteCollapsedSelection.js +93 -93
  27. package/lib/edit/deleteSteps/deleteCollapsedSelection.js.map +1 -1
  28. package/lib/edit/deleteSteps/deleteList.d.ts +5 -5
  29. package/lib/edit/deleteSteps/deleteList.js +23 -23
  30. package/lib/edit/deleteSteps/deleteList.js.map +1 -1
  31. package/lib/edit/deleteSteps/deleteWordSelection.d.ts +9 -9
  32. package/lib/edit/deleteSteps/deleteWordSelection.js +173 -173
  33. package/lib/edit/deleteSteps/deleteWordSelection.js.map +1 -1
  34. package/lib/edit/handleKeyboardEventCommon.d.ts +14 -14
  35. package/lib/edit/handleKeyboardEventCommon.js +54 -54
  36. package/lib/edit/handleKeyboardEventCommon.js.map +1 -1
  37. package/lib/edit/inputSteps/handleEnterOnList.d.ts +5 -0
  38. package/lib/edit/inputSteps/handleEnterOnList.js +68 -0
  39. package/lib/edit/inputSteps/handleEnterOnList.js.map +1 -0
  40. package/lib/edit/keyboardDelete.d.ts +9 -8
  41. package/lib/edit/keyboardDelete.js +71 -74
  42. package/lib/edit/keyboardDelete.js.map +1 -1
  43. package/lib/edit/keyboardInput.d.ts +5 -5
  44. package/lib/edit/keyboardInput.js +58 -50
  45. package/lib/edit/keyboardInput.js.map +1 -1
  46. package/lib/edit/keyboardTab.d.ts +5 -0
  47. package/lib/edit/keyboardTab.js +35 -0
  48. package/lib/edit/keyboardTab.js.map +1 -0
  49. package/lib/edit/utils/getLeafSiblingBlock.d.ts +23 -23
  50. package/lib/edit/utils/getLeafSiblingBlock.js +75 -75
  51. package/lib/edit/utils/getLeafSiblingBlock.js.map +1 -1
  52. package/lib/index.d.ts +3 -3
  53. package/lib/index.js +9 -9
  54. package/lib/index.js.map +1 -1
  55. package/lib/paste/Excel/processPastedContentFromExcel.d.ts +12 -12
  56. package/lib/paste/Excel/processPastedContentFromExcel.js +82 -82
  57. package/lib/paste/Excel/processPastedContentFromExcel.js.map +1 -1
  58. package/{lib-amd/paste/ContentModelPastePlugin.d.ts → lib/paste/PastePlugin.d.ts} +43 -43
  59. package/lib/paste/{ContentModelPastePlugin.js → PastePlugin.js} +131 -131
  60. package/lib/paste/PastePlugin.js.map +1 -0
  61. package/lib/paste/PowerPoint/processPastedContentFromPowerPoint.d.ts +7 -7
  62. package/lib/paste/PowerPoint/processPastedContentFromPowerPoint.js +19 -19
  63. package/lib/paste/PowerPoint/processPastedContentFromPowerPoint.js.map +1 -1
  64. package/lib/paste/WacComponents/constants.d.ts +48 -48
  65. package/lib/paste/WacComponents/constants.js +62 -62
  66. package/lib/paste/WacComponents/constants.js.map +1 -1
  67. package/lib/paste/WacComponents/processPastedContentWacComponents.d.ts +9 -9
  68. package/lib/paste/WacComponents/processPastedContentWacComponents.js +188 -188
  69. package/lib/paste/WacComponents/processPastedContentWacComponents.js.map +1 -1
  70. package/lib/paste/WordDesktop/WordMetadata.d.ts +9 -9
  71. package/lib/paste/WordDesktop/WordMetadata.js +2 -2
  72. package/lib/paste/WordDesktop/WordMetadata.js.map +1 -1
  73. package/lib/paste/WordDesktop/getStyleMetadata.d.ts +23 -23
  74. package/lib/paste/WordDesktop/getStyleMetadata.js +78 -78
  75. package/lib/paste/WordDesktop/getStyleMetadata.js.map +1 -1
  76. package/lib/paste/WordDesktop/processPastedContentFromWordDesktop.d.ts +7 -7
  77. package/lib/paste/WordDesktop/processPastedContentFromWordDesktop.js +58 -58
  78. package/lib/paste/WordDesktop/processPastedContentFromWordDesktop.js.map +1 -1
  79. package/lib/paste/WordDesktop/processWordComments.d.ts +7 -7
  80. package/lib/paste/WordDesktop/processWordComments.js +21 -21
  81. package/lib/paste/WordDesktop/processWordComments.js.map +1 -1
  82. package/lib/paste/WordDesktop/processWordLists.d.ts +11 -11
  83. package/lib/paste/WordDesktop/processWordLists.js +179 -179
  84. package/lib/paste/WordDesktop/processWordLists.js.map +1 -1
  85. package/lib/paste/WordDesktop/removeNegativeTextIndentParser.d.ts +5 -5
  86. package/lib/paste/WordDesktop/removeNegativeTextIndentParser.js +13 -13
  87. package/lib/paste/WordDesktop/removeNegativeTextIndentParser.js.map +1 -1
  88. package/lib/paste/pasteSourceValidations/constants.d.ts +17 -17
  89. package/lib/paste/pasteSourceValidations/constants.js +20 -20
  90. package/lib/paste/pasteSourceValidations/constants.js.map +1 -1
  91. package/lib/paste/pasteSourceValidations/documentContainWacElements.d.ts +8 -8
  92. package/lib/paste/pasteSourceValidations/documentContainWacElements.js +15 -15
  93. package/lib/paste/pasteSourceValidations/documentContainWacElements.js.map +1 -1
  94. package/lib/paste/pasteSourceValidations/getPasteSource.d.ts +27 -27
  95. package/lib/paste/pasteSourceValidations/getPasteSource.js +43 -43
  96. package/lib/paste/pasteSourceValidations/getPasteSource.js.map +1 -1
  97. package/lib/paste/pasteSourceValidations/isExcelDesktopDocument.d.ts +8 -8
  98. package/lib/paste/pasteSourceValidations/isExcelDesktopDocument.js +17 -17
  99. package/lib/paste/pasteSourceValidations/isExcelDesktopDocument.js.map +1 -1
  100. package/lib/paste/pasteSourceValidations/isExcelOnlineDocument.d.ts +8 -8
  101. package/lib/paste/pasteSourceValidations/isExcelOnlineDocument.js +19 -19
  102. package/lib/paste/pasteSourceValidations/isExcelOnlineDocument.js.map +1 -1
  103. package/lib/paste/pasteSourceValidations/isGoogleSheetDocument.d.ts +8 -8
  104. package/lib/paste/pasteSourceValidations/isGoogleSheetDocument.js +15 -15
  105. package/lib/paste/pasteSourceValidations/isGoogleSheetDocument.js.map +1 -1
  106. package/lib/paste/pasteSourceValidations/isPowerPointDesktopDocument.d.ts +8 -8
  107. package/lib/paste/pasteSourceValidations/isPowerPointDesktopDocument.js +15 -15
  108. package/lib/paste/pasteSourceValidations/isPowerPointDesktopDocument.js.map +1 -1
  109. package/lib/paste/pasteSourceValidations/isWordDesktopDocument.d.ts +8 -8
  110. package/lib/paste/pasteSourceValidations/isWordDesktopDocument.js +19 -19
  111. package/lib/paste/pasteSourceValidations/isWordDesktopDocument.js.map +1 -1
  112. package/lib/paste/pasteSourceValidations/shouldConvertToSingleImage.d.ts +9 -9
  113. package/lib/paste/pasteSourceValidations/shouldConvertToSingleImage.js +18 -18
  114. package/lib/paste/pasteSourceValidations/shouldConvertToSingleImage.js.map +1 -1
  115. package/lib/paste/utils/addParser.d.ts +5 -5
  116. package/lib/paste/utils/addParser.js +16 -16
  117. package/lib/paste/utils/addParser.js.map +1 -1
  118. package/lib/paste/utils/deprecatedColorParser.d.ts +5 -5
  119. package/lib/paste/utils/deprecatedColorParser.js +19 -19
  120. package/lib/paste/utils/deprecatedColorParser.js.map +1 -1
  121. package/lib/paste/utils/getStyles.d.ts +6 -6
  122. package/lib/paste/utils/getStyles.js +22 -22
  123. package/lib/paste/utils/getStyles.js.map +1 -1
  124. package/lib/paste/utils/linkParser.d.ts +5 -5
  125. package/lib/paste/utils/linkParser.js +27 -27
  126. package/lib/paste/utils/linkParser.js.map +1 -1
  127. package/lib/paste/utils/setProcessor.d.ts +5 -5
  128. package/lib/paste/utils/setProcessor.js +13 -13
  129. package/lib/paste/utils/setProcessor.js.map +1 -1
  130. package/lib/pluginUtils/CreateElement/CreateElementData.d.ts +35 -0
  131. package/lib/pluginUtils/CreateElement/CreateElementData.js +3 -0
  132. package/lib/pluginUtils/CreateElement/CreateElementData.js.map +1 -0
  133. package/lib/pluginUtils/CreateElement/createElement.d.ts +9 -0
  134. package/lib/pluginUtils/CreateElement/createElement.js +51 -0
  135. package/lib/pluginUtils/CreateElement/createElement.js.map +1 -0
  136. package/lib/pluginUtils/Disposable.d.ts +10 -0
  137. package/lib/pluginUtils/Disposable.js +3 -0
  138. package/lib/pluginUtils/Disposable.js.map +1 -0
  139. package/lib/pluginUtils/DragAndDrop/DragAndDropHandler.d.ts +45 -0
  140. package/lib/pluginUtils/DragAndDrop/DragAndDropHandler.js +3 -0
  141. package/lib/pluginUtils/DragAndDrop/DragAndDropHandler.js.map +1 -0
  142. package/lib/pluginUtils/DragAndDrop/DragAndDropHelper.d.ts +39 -0
  143. package/lib/pluginUtils/DragAndDrop/DragAndDropHelper.js +120 -0
  144. package/lib/pluginUtils/DragAndDrop/DragAndDropHelper.js.map +1 -0
  145. package/lib/pluginUtils/Rect/getIntersectedRect.d.ts +27 -0
  146. package/lib/pluginUtils/Rect/getIntersectedRect.js +45 -0
  147. package/lib/pluginUtils/Rect/getIntersectedRect.js.map +1 -0
  148. package/lib/pluginUtils/Rect/normalizeRect.d.ts +7 -0
  149. package/lib/pluginUtils/Rect/normalizeRect.js +20 -0
  150. package/lib/pluginUtils/Rect/normalizeRect.js.map +1 -0
  151. package/lib-amd/autoFormat/{ContentModelAutoFormatPlugin.d.ts → AutoFormatPlugin.d.ts} +53 -53
  152. package/lib-amd/autoFormat/{ContentModelAutoFormatPlugin.js → AutoFormatPlugin.js} +82 -82
  153. package/lib-amd/autoFormat/AutoFormatPlugin.js.map +1 -0
  154. package/lib-amd/autoFormat/keyboardListTrigger.d.ts +5 -5
  155. package/lib-amd/autoFormat/keyboardListTrigger.js +43 -43
  156. package/lib-amd/autoFormat/keyboardListTrigger.js.map +1 -1
  157. package/lib-amd/autoFormat/utils/convertAlphaToDecimals.d.ts +7 -7
  158. package/lib-amd/autoFormat/utils/convertAlphaToDecimals.js +24 -24
  159. package/lib-amd/autoFormat/utils/convertAlphaToDecimals.js.map +1 -1
  160. package/lib-amd/autoFormat/utils/getIndex.d.ts +4 -4
  161. package/lib-amd/autoFormat/utils/getIndex.js +14 -14
  162. package/lib-amd/autoFormat/utils/getIndex.js.map +1 -1
  163. package/lib-amd/autoFormat/utils/getListTypeStyle.d.ts +14 -14
  164. package/lib-amd/autoFormat/utils/getListTypeStyle.js +86 -78
  165. package/lib-amd/autoFormat/utils/getListTypeStyle.js.map +1 -1
  166. package/lib-amd/autoFormat/utils/getNumberingListStyle.d.ts +4 -4
  167. package/lib-amd/autoFormat/utils/getNumberingListStyle.js +153 -152
  168. package/lib-amd/autoFormat/utils/getNumberingListStyle.js.map +1 -1
  169. package/{lib-mjs/edit/ContentModelEditPlugin.d.ts → lib-amd/edit/EditPlugin.d.ts} +39 -35
  170. package/lib-amd/edit/EditPlugin.js +128 -0
  171. package/lib-amd/edit/EditPlugin.js.map +1 -0
  172. package/lib-amd/edit/deleteSteps/deleteAllSegmentBefore.d.ts +5 -5
  173. package/lib-amd/edit/deleteSteps/deleteAllSegmentBefore.js +23 -23
  174. package/lib-amd/edit/deleteSteps/deleteAllSegmentBefore.js.map +1 -1
  175. package/lib-amd/edit/deleteSteps/deleteCollapsedSelection.d.ts +9 -9
  176. package/lib-amd/edit/deleteSteps/deleteCollapsedSelection.js +92 -92
  177. package/lib-amd/edit/deleteSteps/deleteCollapsedSelection.js.map +1 -1
  178. package/lib-amd/edit/deleteSteps/deleteList.d.ts +5 -5
  179. package/lib-amd/edit/deleteSteps/deleteList.js +24 -24
  180. package/lib-amd/edit/deleteSteps/deleteList.js.map +1 -1
  181. package/lib-amd/edit/deleteSteps/deleteWordSelection.d.ts +9 -9
  182. package/lib-amd/edit/deleteSteps/deleteWordSelection.js +172 -172
  183. package/lib-amd/edit/deleteSteps/deleteWordSelection.js.map +1 -1
  184. package/lib-amd/edit/handleKeyboardEventCommon.d.ts +14 -14
  185. package/lib-amd/edit/handleKeyboardEventCommon.js +55 -55
  186. package/lib-amd/edit/handleKeyboardEventCommon.js.map +1 -1
  187. package/lib-amd/edit/inputSteps/handleEnterOnList.d.ts +5 -0
  188. package/lib-amd/edit/inputSteps/handleEnterOnList.js +67 -0
  189. package/lib-amd/edit/inputSteps/handleEnterOnList.js.map +1 -0
  190. package/lib-amd/edit/keyboardDelete.d.ts +9 -8
  191. package/lib-amd/edit/keyboardDelete.js +66 -69
  192. package/lib-amd/edit/keyboardDelete.js.map +1 -1
  193. package/lib-amd/edit/keyboardInput.d.ts +5 -5
  194. package/lib-amd/edit/keyboardInput.js +57 -50
  195. package/lib-amd/edit/keyboardInput.js.map +1 -1
  196. package/lib-amd/edit/keyboardTab.d.ts +5 -0
  197. package/lib-amd/edit/keyboardTab.js +35 -0
  198. package/lib-amd/edit/keyboardTab.js.map +1 -0
  199. package/lib-amd/edit/utils/getLeafSiblingBlock.d.ts +23 -23
  200. package/lib-amd/edit/utils/getLeafSiblingBlock.js +75 -75
  201. package/lib-amd/edit/utils/getLeafSiblingBlock.js.map +1 -1
  202. package/lib-amd/index.d.ts +3 -3
  203. package/lib-amd/index.js +8 -8
  204. package/lib-amd/index.js.map +1 -1
  205. package/lib-amd/paste/Excel/processPastedContentFromExcel.d.ts +12 -12
  206. package/lib-amd/paste/Excel/processPastedContentFromExcel.js +80 -80
  207. package/lib-amd/paste/Excel/processPastedContentFromExcel.js.map +1 -1
  208. package/{lib/paste/ContentModelPastePlugin.d.ts → lib-amd/paste/PastePlugin.d.ts} +43 -43
  209. package/lib-amd/paste/{ContentModelPastePlugin.js → PastePlugin.js} +123 -123
  210. package/lib-amd/paste/PastePlugin.js.map +1 -0
  211. package/lib-amd/paste/PowerPoint/processPastedContentFromPowerPoint.d.ts +7 -7
  212. package/lib-amd/paste/PowerPoint/processPastedContentFromPowerPoint.js +20 -20
  213. package/lib-amd/paste/PowerPoint/processPastedContentFromPowerPoint.js.map +1 -1
  214. package/lib-amd/paste/WacComponents/constants.d.ts +48 -48
  215. package/lib-amd/paste/WacComponents/constants.js +63 -63
  216. package/lib-amd/paste/WacComponents/constants.js.map +1 -1
  217. package/lib-amd/paste/WacComponents/processPastedContentWacComponents.d.ts +9 -9
  218. package/lib-amd/paste/WacComponents/processPastedContentWacComponents.js +185 -185
  219. package/lib-amd/paste/WacComponents/processPastedContentWacComponents.js.map +1 -1
  220. package/lib-amd/paste/WordDesktop/WordMetadata.d.ts +9 -9
  221. package/lib-amd/paste/WordDesktop/WordMetadata.js +4 -4
  222. package/lib-amd/paste/WordDesktop/WordMetadata.js.map +1 -1
  223. package/lib-amd/paste/WordDesktop/getStyleMetadata.d.ts +23 -23
  224. package/lib-amd/paste/WordDesktop/getStyleMetadata.js +78 -78
  225. package/lib-amd/paste/WordDesktop/getStyleMetadata.js.map +1 -1
  226. package/lib-amd/paste/WordDesktop/processPastedContentFromWordDesktop.d.ts +7 -7
  227. package/lib-amd/paste/WordDesktop/processPastedContentFromWordDesktop.js +53 -53
  228. package/lib-amd/paste/WordDesktop/processPastedContentFromWordDesktop.js.map +1 -1
  229. package/lib-amd/paste/WordDesktop/processWordComments.d.ts +7 -7
  230. package/lib-amd/paste/WordDesktop/processWordComments.js +22 -22
  231. package/lib-amd/paste/WordDesktop/processWordComments.js.map +1 -1
  232. package/lib-amd/paste/WordDesktop/processWordLists.d.ts +11 -11
  233. package/lib-amd/paste/WordDesktop/processWordLists.js +177 -177
  234. package/lib-amd/paste/WordDesktop/processWordLists.js.map +1 -1
  235. package/lib-amd/paste/WordDesktop/removeNegativeTextIndentParser.d.ts +5 -5
  236. package/lib-amd/paste/WordDesktop/removeNegativeTextIndentParser.js +15 -15
  237. package/lib-amd/paste/WordDesktop/removeNegativeTextIndentParser.js.map +1 -1
  238. package/lib-amd/paste/pasteSourceValidations/constants.d.ts +17 -17
  239. package/lib-amd/paste/pasteSourceValidations/constants.js +22 -22
  240. package/lib-amd/paste/pasteSourceValidations/constants.js.map +1 -1
  241. package/lib-amd/paste/pasteSourceValidations/documentContainWacElements.d.ts +8 -8
  242. package/lib-amd/paste/pasteSourceValidations/documentContainWacElements.js +16 -16
  243. package/lib-amd/paste/pasteSourceValidations/documentContainWacElements.js.map +1 -1
  244. package/lib-amd/paste/pasteSourceValidations/getPasteSource.d.ts +27 -27
  245. package/lib-amd/paste/pasteSourceValidations/getPasteSource.js +38 -38
  246. package/lib-amd/paste/pasteSourceValidations/getPasteSource.js.map +1 -1
  247. package/lib-amd/paste/pasteSourceValidations/isExcelDesktopDocument.d.ts +8 -8
  248. package/lib-amd/paste/pasteSourceValidations/isExcelDesktopDocument.js +18 -18
  249. package/lib-amd/paste/pasteSourceValidations/isExcelDesktopDocument.js.map +1 -1
  250. package/lib-amd/paste/pasteSourceValidations/isExcelOnlineDocument.d.ts +8 -8
  251. package/lib-amd/paste/pasteSourceValidations/isExcelOnlineDocument.js +20 -20
  252. package/lib-amd/paste/pasteSourceValidations/isExcelOnlineDocument.js.map +1 -1
  253. package/lib-amd/paste/pasteSourceValidations/isGoogleSheetDocument.d.ts +8 -8
  254. package/lib-amd/paste/pasteSourceValidations/isGoogleSheetDocument.js +16 -16
  255. package/lib-amd/paste/pasteSourceValidations/isGoogleSheetDocument.js.map +1 -1
  256. package/lib-amd/paste/pasteSourceValidations/isPowerPointDesktopDocument.d.ts +8 -8
  257. package/lib-amd/paste/pasteSourceValidations/isPowerPointDesktopDocument.js +16 -16
  258. package/lib-amd/paste/pasteSourceValidations/isPowerPointDesktopDocument.js.map +1 -1
  259. package/lib-amd/paste/pasteSourceValidations/isWordDesktopDocument.d.ts +8 -8
  260. package/lib-amd/paste/pasteSourceValidations/isWordDesktopDocument.js +20 -20
  261. package/lib-amd/paste/pasteSourceValidations/isWordDesktopDocument.js.map +1 -1
  262. package/lib-amd/paste/pasteSourceValidations/shouldConvertToSingleImage.d.ts +9 -9
  263. package/lib-amd/paste/pasteSourceValidations/shouldConvertToSingleImage.js +20 -20
  264. package/lib-amd/paste/pasteSourceValidations/shouldConvertToSingleImage.js.map +1 -1
  265. package/lib-amd/paste/utils/addParser.d.ts +5 -5
  266. package/lib-amd/paste/utils/addParser.js +18 -18
  267. package/lib-amd/paste/utils/addParser.js.map +1 -1
  268. package/lib-amd/paste/utils/deprecatedColorParser.d.ts +5 -5
  269. package/lib-amd/paste/utils/deprecatedColorParser.js +20 -20
  270. package/lib-amd/paste/utils/deprecatedColorParser.js.map +1 -1
  271. package/lib-amd/paste/utils/getStyles.d.ts +6 -6
  272. package/lib-amd/paste/utils/getStyles.js +24 -24
  273. package/lib-amd/paste/utils/getStyles.js.map +1 -1
  274. package/lib-amd/paste/utils/linkParser.d.ts +5 -5
  275. package/lib-amd/paste/utils/linkParser.js +28 -28
  276. package/lib-amd/paste/utils/linkParser.js.map +1 -1
  277. package/lib-amd/paste/utils/setProcessor.d.ts +5 -5
  278. package/lib-amd/paste/utils/setProcessor.js +15 -15
  279. package/lib-amd/paste/utils/setProcessor.js.map +1 -1
  280. package/lib-amd/pluginUtils/CreateElement/CreateElementData.d.ts +35 -0
  281. package/lib-amd/pluginUtils/CreateElement/CreateElementData.js +5 -0
  282. package/lib-amd/pluginUtils/CreateElement/CreateElementData.js.map +1 -0
  283. package/lib-amd/pluginUtils/CreateElement/createElement.d.ts +9 -0
  284. package/lib-amd/pluginUtils/CreateElement/createElement.js +52 -0
  285. package/lib-amd/pluginUtils/CreateElement/createElement.js.map +1 -0
  286. package/lib-amd/pluginUtils/Disposable.d.ts +10 -0
  287. package/lib-amd/pluginUtils/Disposable.js +5 -0
  288. package/lib-amd/pluginUtils/Disposable.js.map +1 -0
  289. package/lib-amd/pluginUtils/DragAndDrop/DragAndDropHandler.d.ts +45 -0
  290. package/lib-amd/pluginUtils/DragAndDrop/DragAndDropHandler.js +5 -0
  291. package/lib-amd/pluginUtils/DragAndDrop/DragAndDropHandler.js.map +1 -0
  292. package/lib-amd/pluginUtils/DragAndDrop/DragAndDropHelper.d.ts +39 -0
  293. package/lib-amd/pluginUtils/DragAndDrop/DragAndDropHelper.js +121 -0
  294. package/lib-amd/pluginUtils/DragAndDrop/DragAndDropHelper.js.map +1 -0
  295. package/lib-amd/pluginUtils/Rect/getIntersectedRect.d.ts +27 -0
  296. package/lib-amd/pluginUtils/Rect/getIntersectedRect.js +45 -0
  297. package/lib-amd/pluginUtils/Rect/getIntersectedRect.js.map +1 -0
  298. package/lib-amd/pluginUtils/Rect/normalizeRect.d.ts +7 -0
  299. package/lib-amd/pluginUtils/Rect/normalizeRect.js +22 -0
  300. package/lib-amd/pluginUtils/Rect/normalizeRect.js.map +1 -0
  301. package/{lib/autoFormat/ContentModelAutoFormatPlugin.d.ts → lib-mjs/autoFormat/AutoFormatPlugin.d.ts} +53 -53
  302. package/lib-mjs/autoFormat/{ContentModelAutoFormatPlugin.js → AutoFormatPlugin.js} +78 -78
  303. package/lib-mjs/autoFormat/AutoFormatPlugin.js.map +1 -0
  304. package/lib-mjs/autoFormat/keyboardListTrigger.d.ts +5 -5
  305. package/lib-mjs/autoFormat/keyboardListTrigger.js +41 -41
  306. package/lib-mjs/autoFormat/keyboardListTrigger.js.map +1 -1
  307. package/lib-mjs/autoFormat/utils/convertAlphaToDecimals.d.ts +7 -7
  308. package/lib-mjs/autoFormat/utils/convertAlphaToDecimals.js +18 -18
  309. package/lib-mjs/autoFormat/utils/convertAlphaToDecimals.js.map +1 -1
  310. package/lib-mjs/autoFormat/utils/getIndex.d.ts +4 -4
  311. package/lib-mjs/autoFormat/utils/getIndex.js +9 -9
  312. package/lib-mjs/autoFormat/utils/getIndex.js.map +1 -1
  313. package/lib-mjs/autoFormat/utils/getListTypeStyle.d.ts +14 -14
  314. package/lib-mjs/autoFormat/utils/getListTypeStyle.js +83 -75
  315. package/lib-mjs/autoFormat/utils/getListTypeStyle.js.map +1 -1
  316. package/lib-mjs/autoFormat/utils/getNumberingListStyle.d.ts +4 -4
  317. package/lib-mjs/autoFormat/utils/getNumberingListStyle.js +149 -148
  318. package/lib-mjs/autoFormat/utils/getNumberingListStyle.js.map +1 -1
  319. package/{lib/edit/ContentModelEditPlugin.d.ts → lib-mjs/edit/EditPlugin.d.ts} +39 -35
  320. package/lib-mjs/edit/EditPlugin.js +126 -0
  321. package/lib-mjs/edit/EditPlugin.js.map +1 -0
  322. package/lib-mjs/edit/deleteSteps/deleteAllSegmentBefore.d.ts +5 -5
  323. package/lib-mjs/edit/deleteSteps/deleteAllSegmentBefore.js +18 -18
  324. package/lib-mjs/edit/deleteSteps/deleteAllSegmentBefore.js.map +1 -1
  325. package/lib-mjs/edit/deleteSteps/deleteCollapsedSelection.d.ts +9 -9
  326. package/lib-mjs/edit/deleteSteps/deleteCollapsedSelection.js +90 -90
  327. package/lib-mjs/edit/deleteSteps/deleteCollapsedSelection.js.map +1 -1
  328. package/lib-mjs/edit/deleteSteps/deleteList.d.ts +5 -5
  329. package/lib-mjs/edit/deleteSteps/deleteList.js +19 -19
  330. package/lib-mjs/edit/deleteSteps/deleteList.js.map +1 -1
  331. package/lib-mjs/edit/deleteSteps/deleteWordSelection.d.ts +9 -9
  332. package/lib-mjs/edit/deleteSteps/deleteWordSelection.js +170 -170
  333. package/lib-mjs/edit/deleteSteps/deleteWordSelection.js.map +1 -1
  334. package/lib-mjs/edit/handleKeyboardEventCommon.d.ts +14 -14
  335. package/lib-mjs/edit/handleKeyboardEventCommon.js +48 -48
  336. package/lib-mjs/edit/handleKeyboardEventCommon.js.map +1 -1
  337. package/lib-mjs/edit/inputSteps/handleEnterOnList.d.ts +5 -0
  338. package/lib-mjs/edit/inputSteps/handleEnterOnList.js +64 -0
  339. package/lib-mjs/edit/inputSteps/handleEnterOnList.js.map +1 -0
  340. package/lib-mjs/edit/keyboardDelete.d.ts +9 -8
  341. package/lib-mjs/edit/keyboardDelete.js +67 -70
  342. package/lib-mjs/edit/keyboardDelete.js.map +1 -1
  343. package/lib-mjs/edit/keyboardInput.d.ts +5 -5
  344. package/lib-mjs/edit/keyboardInput.js +54 -46
  345. package/lib-mjs/edit/keyboardInput.js.map +1 -1
  346. package/lib-mjs/edit/keyboardTab.d.ts +5 -0
  347. package/lib-mjs/edit/keyboardTab.js +31 -0
  348. package/lib-mjs/edit/keyboardTab.js.map +1 -0
  349. package/lib-mjs/edit/utils/getLeafSiblingBlock.d.ts +23 -23
  350. package/lib-mjs/edit/utils/getLeafSiblingBlock.js +71 -71
  351. package/lib-mjs/edit/utils/getLeafSiblingBlock.js.map +1 -1
  352. package/lib-mjs/index.d.ts +3 -3
  353. package/lib-mjs/index.js +3 -3
  354. package/lib-mjs/index.js.map +1 -1
  355. package/lib-mjs/paste/Excel/processPastedContentFromExcel.d.ts +12 -12
  356. package/lib-mjs/paste/Excel/processPastedContentFromExcel.js +77 -77
  357. package/lib-mjs/paste/Excel/processPastedContentFromExcel.js.map +1 -1
  358. package/lib-mjs/paste/{ContentModelPastePlugin.d.ts → PastePlugin.d.ts} +43 -43
  359. package/lib-mjs/paste/{ContentModelPastePlugin.js → PastePlugin.js} +128 -128
  360. package/lib-mjs/paste/PastePlugin.js.map +1 -0
  361. package/lib-mjs/paste/PowerPoint/processPastedContentFromPowerPoint.d.ts +7 -7
  362. package/lib-mjs/paste/PowerPoint/processPastedContentFromPowerPoint.js +15 -15
  363. package/lib-mjs/paste/PowerPoint/processPastedContentFromPowerPoint.js.map +1 -1
  364. package/lib-mjs/paste/WacComponents/constants.d.ts +48 -48
  365. package/lib-mjs/paste/WacComponents/constants.js +59 -59
  366. package/lib-mjs/paste/WacComponents/constants.js.map +1 -1
  367. package/lib-mjs/paste/WacComponents/processPastedContentWacComponents.d.ts +9 -9
  368. package/lib-mjs/paste/WacComponents/processPastedContentWacComponents.js +184 -184
  369. package/lib-mjs/paste/WacComponents/processPastedContentWacComponents.js.map +1 -1
  370. package/lib-mjs/paste/WordDesktop/WordMetadata.d.ts +9 -9
  371. package/lib-mjs/paste/WordDesktop/WordMetadata.js +1 -1
  372. package/lib-mjs/paste/WordDesktop/WordMetadata.js.map +1 -1
  373. package/lib-mjs/paste/WordDesktop/getStyleMetadata.d.ts +23 -23
  374. package/lib-mjs/paste/WordDesktop/getStyleMetadata.js +75 -75
  375. package/lib-mjs/paste/WordDesktop/getStyleMetadata.js.map +1 -1
  376. package/lib-mjs/paste/WordDesktop/processPastedContentFromWordDesktop.d.ts +7 -7
  377. package/lib-mjs/paste/WordDesktop/processPastedContentFromWordDesktop.js +54 -54
  378. package/lib-mjs/paste/WordDesktop/processPastedContentFromWordDesktop.js.map +1 -1
  379. package/lib-mjs/paste/WordDesktop/processWordComments.d.ts +7 -7
  380. package/lib-mjs/paste/WordDesktop/processWordComments.js +17 -17
  381. package/lib-mjs/paste/WordDesktop/processWordComments.js.map +1 -1
  382. package/lib-mjs/paste/WordDesktop/processWordLists.d.ts +11 -11
  383. package/lib-mjs/paste/WordDesktop/processWordLists.js +175 -175
  384. package/lib-mjs/paste/WordDesktop/processWordLists.js.map +1 -1
  385. package/lib-mjs/paste/WordDesktop/removeNegativeTextIndentParser.d.ts +5 -5
  386. package/lib-mjs/paste/WordDesktop/removeNegativeTextIndentParser.js +9 -9
  387. package/lib-mjs/paste/WordDesktop/removeNegativeTextIndentParser.js.map +1 -1
  388. package/lib-mjs/paste/pasteSourceValidations/constants.d.ts +17 -17
  389. package/lib-mjs/paste/pasteSourceValidations/constants.js +17 -17
  390. package/lib-mjs/paste/pasteSourceValidations/constants.js.map +1 -1
  391. package/lib-mjs/paste/pasteSourceValidations/documentContainWacElements.d.ts +8 -8
  392. package/lib-mjs/paste/pasteSourceValidations/documentContainWacElements.js +11 -11
  393. package/lib-mjs/paste/pasteSourceValidations/documentContainWacElements.js.map +1 -1
  394. package/lib-mjs/paste/pasteSourceValidations/getPasteSource.d.ts +27 -27
  395. package/lib-mjs/paste/pasteSourceValidations/getPasteSource.js +39 -39
  396. package/lib-mjs/paste/pasteSourceValidations/getPasteSource.js.map +1 -1
  397. package/lib-mjs/paste/pasteSourceValidations/isExcelDesktopDocument.d.ts +8 -8
  398. package/lib-mjs/paste/pasteSourceValidations/isExcelDesktopDocument.js +13 -13
  399. package/lib-mjs/paste/pasteSourceValidations/isExcelDesktopDocument.js.map +1 -1
  400. package/lib-mjs/paste/pasteSourceValidations/isExcelOnlineDocument.d.ts +8 -8
  401. package/lib-mjs/paste/pasteSourceValidations/isExcelOnlineDocument.js +15 -15
  402. package/lib-mjs/paste/pasteSourceValidations/isExcelOnlineDocument.js.map +1 -1
  403. package/lib-mjs/paste/pasteSourceValidations/isGoogleSheetDocument.d.ts +8 -8
  404. package/lib-mjs/paste/pasteSourceValidations/isGoogleSheetDocument.js +11 -11
  405. package/lib-mjs/paste/pasteSourceValidations/isGoogleSheetDocument.js.map +1 -1
  406. package/lib-mjs/paste/pasteSourceValidations/isPowerPointDesktopDocument.d.ts +8 -8
  407. package/lib-mjs/paste/pasteSourceValidations/isPowerPointDesktopDocument.js +11 -11
  408. package/lib-mjs/paste/pasteSourceValidations/isPowerPointDesktopDocument.js.map +1 -1
  409. package/lib-mjs/paste/pasteSourceValidations/isWordDesktopDocument.d.ts +8 -8
  410. package/lib-mjs/paste/pasteSourceValidations/isWordDesktopDocument.js +15 -15
  411. package/lib-mjs/paste/pasteSourceValidations/isWordDesktopDocument.js.map +1 -1
  412. package/lib-mjs/paste/pasteSourceValidations/shouldConvertToSingleImage.d.ts +9 -9
  413. package/lib-mjs/paste/pasteSourceValidations/shouldConvertToSingleImage.js +14 -14
  414. package/lib-mjs/paste/pasteSourceValidations/shouldConvertToSingleImage.js.map +1 -1
  415. package/lib-mjs/paste/utils/addParser.d.ts +5 -5
  416. package/lib-mjs/paste/utils/addParser.js +13 -13
  417. package/lib-mjs/paste/utils/addParser.js.map +1 -1
  418. package/lib-mjs/paste/utils/deprecatedColorParser.d.ts +5 -5
  419. package/lib-mjs/paste/utils/deprecatedColorParser.js +15 -15
  420. package/lib-mjs/paste/utils/deprecatedColorParser.js.map +1 -1
  421. package/lib-mjs/paste/utils/getStyles.d.ts +6 -6
  422. package/lib-mjs/paste/utils/getStyles.js +18 -18
  423. package/lib-mjs/paste/utils/getStyles.js.map +1 -1
  424. package/lib-mjs/paste/utils/linkParser.d.ts +5 -5
  425. package/lib-mjs/paste/utils/linkParser.js +23 -23
  426. package/lib-mjs/paste/utils/linkParser.js.map +1 -1
  427. package/lib-mjs/paste/utils/setProcessor.d.ts +5 -5
  428. package/lib-mjs/paste/utils/setProcessor.js +9 -9
  429. package/lib-mjs/paste/utils/setProcessor.js.map +1 -1
  430. package/lib-mjs/pluginUtils/CreateElement/CreateElementData.d.ts +35 -0
  431. package/lib-mjs/pluginUtils/CreateElement/CreateElementData.js +2 -0
  432. package/lib-mjs/pluginUtils/CreateElement/CreateElementData.js.map +1 -0
  433. package/lib-mjs/pluginUtils/CreateElement/createElement.d.ts +9 -0
  434. package/lib-mjs/pluginUtils/CreateElement/createElement.js +48 -0
  435. package/lib-mjs/pluginUtils/CreateElement/createElement.js.map +1 -0
  436. package/lib-mjs/pluginUtils/Disposable.d.ts +10 -0
  437. package/lib-mjs/pluginUtils/Disposable.js +2 -0
  438. package/lib-mjs/pluginUtils/Disposable.js.map +1 -0
  439. package/lib-mjs/pluginUtils/DragAndDrop/DragAndDropHandler.d.ts +45 -0
  440. package/lib-mjs/pluginUtils/DragAndDrop/DragAndDropHandler.js +2 -0
  441. package/lib-mjs/pluginUtils/DragAndDrop/DragAndDropHandler.js.map +1 -0
  442. package/lib-mjs/pluginUtils/DragAndDrop/DragAndDropHelper.d.ts +39 -0
  443. package/lib-mjs/pluginUtils/DragAndDrop/DragAndDropHelper.js +118 -0
  444. package/lib-mjs/pluginUtils/DragAndDrop/DragAndDropHelper.js.map +1 -0
  445. package/lib-mjs/pluginUtils/Rect/getIntersectedRect.d.ts +27 -0
  446. package/lib-mjs/pluginUtils/Rect/getIntersectedRect.js +42 -0
  447. package/lib-mjs/pluginUtils/Rect/getIntersectedRect.js.map +1 -0
  448. package/lib-mjs/pluginUtils/Rect/normalizeRect.d.ts +7 -0
  449. package/lib-mjs/pluginUtils/Rect/normalizeRect.js +17 -0
  450. package/lib-mjs/pluginUtils/Rect/normalizeRect.js.map +1 -0
  451. package/package.json +5 -5
  452. package/lib/autoFormat/ContentModelAutoFormatPlugin.js.map +0 -1
  453. package/lib/edit/ContentModelEditPlugin.js +0 -74
  454. package/lib/edit/ContentModelEditPlugin.js.map +0 -1
  455. package/lib/paste/ContentModelPastePlugin.js.map +0 -1
  456. package/lib-amd/autoFormat/ContentModelAutoFormatPlugin.js.map +0 -1
  457. package/lib-amd/edit/ContentModelEditPlugin.js +0 -74
  458. package/lib-amd/edit/ContentModelEditPlugin.js.map +0 -1
  459. package/lib-amd/paste/ContentModelPastePlugin.js.map +0 -1
  460. package/lib-mjs/autoFormat/ContentModelAutoFormatPlugin.js.map +0 -1
  461. package/lib-mjs/edit/ContentModelEditPlugin.js +0 -71
  462. package/lib-mjs/edit/ContentModelEditPlugin.js.map +0 -1
  463. package/lib-mjs/paste/ContentModelPastePlugin.js.map +0 -1
@@ -1,27 +1,27 @@
1
- import type { BeforePasteEvent, ClipboardData } from 'roosterjs-content-model-types';
2
- /**
3
- * @internal
4
- */
5
- export declare type GetSourceInputParams = {
6
- htmlAttributes: Record<string, string>;
7
- fragment: DocumentFragment;
8
- shouldConvertSingleImage: boolean;
9
- clipboardData: ClipboardData;
10
- };
11
- /**
12
- * @internal
13
- * Represent the types of sources to handle in the Paste Plugin
14
- */
15
- export declare type KnownPasteSourceType = 'wordDesktop' | 'excelDesktop' | 'excelOnline' | 'powerPointDesktop' | 'googleSheets' | 'wacComponents' | 'default' | 'singleImage';
16
- /**
17
- * @internal
18
- */
19
- export declare type GetSourceFunction = (props: GetSourceInputParams) => boolean;
20
- /**
21
- * @internal
22
- * This function tries to get the source of the Pasted content
23
- * @param event the before paste event
24
- * @param shouldConvertSingleImage Whether convert single image is enabled.
25
- * @returns The Type of pasted content, if no type found will return {KnownSourceType.Default}
26
- */
27
- export declare function getPasteSource(event: BeforePasteEvent, shouldConvertSingleImage: boolean): KnownPasteSourceType;
1
+ import type { BeforePasteEvent, ClipboardData } from 'roosterjs-content-model-types';
2
+ /**
3
+ * @internal
4
+ */
5
+ export declare type GetSourceInputParams = {
6
+ htmlAttributes: Record<string, string>;
7
+ fragment: DocumentFragment;
8
+ shouldConvertSingleImage: boolean;
9
+ clipboardData: ClipboardData;
10
+ };
11
+ /**
12
+ * @internal
13
+ * Represent the types of sources to handle in the Paste Plugin
14
+ */
15
+ export declare type KnownPasteSourceType = 'wordDesktop' | 'excelDesktop' | 'excelOnline' | 'powerPointDesktop' | 'googleSheets' | 'wacComponents' | 'default' | 'singleImage';
16
+ /**
17
+ * @internal
18
+ */
19
+ export declare type GetSourceFunction = (props: GetSourceInputParams) => boolean;
20
+ /**
21
+ * @internal
22
+ * This function tries to get the source of the Pasted content
23
+ * @param event the before paste event
24
+ * @param shouldConvertSingleImage Whether convert single image is enabled.
25
+ * @returns The Type of pasted content, if no type found will return {KnownSourceType.Default}
26
+ */
27
+ export declare function getPasteSource(event: BeforePasteEvent, shouldConvertSingleImage: boolean): KnownPasteSourceType;
@@ -1,40 +1,40 @@
1
- import { documentContainWacElements } from './documentContainWacElements';
2
- import { isExcelDesktopDocument } from './isExcelDesktopDocument';
3
- import { isExcelOnlineDocument } from './isExcelOnlineDocument';
4
- import { isGoogleSheetDocument } from './isGoogleSheetDocument';
5
- import { isPowerPointDesktopDocument } from './isPowerPointDesktopDocument';
6
- import { isWordDesktopDocument } from './isWordDesktopDocument';
7
- import { shouldConvertToSingleImage } from './shouldConvertToSingleImage';
8
- var getSourceFunctions = new Map([
9
- ['wordDesktop', isWordDesktopDocument],
10
- ['excelDesktop', isExcelDesktopDocument],
11
- ['excelOnline', isExcelOnlineDocument],
12
- ['powerPointDesktop', isPowerPointDesktopDocument],
13
- ['wacComponents', documentContainWacElements],
14
- ['googleSheets', isGoogleSheetDocument],
15
- ['singleImage', shouldConvertToSingleImage],
16
- ]);
17
- /**
18
- * @internal
19
- * This function tries to get the source of the Pasted content
20
- * @param event the before paste event
21
- * @param shouldConvertSingleImage Whether convert single image is enabled.
22
- * @returns The Type of pasted content, if no type found will return {KnownSourceType.Default}
23
- */
24
- export function getPasteSource(event, shouldConvertSingleImage) {
25
- var htmlAttributes = event.htmlAttributes, clipboardData = event.clipboardData, fragment = event.fragment;
26
- var result = null;
27
- var param = {
28
- htmlAttributes: htmlAttributes,
29
- fragment: fragment,
30
- shouldConvertSingleImage: shouldConvertSingleImage,
31
- clipboardData: clipboardData,
32
- };
33
- getSourceFunctions.forEach(function (func, key) {
34
- if (!result && func(param)) {
35
- result = key;
36
- }
37
- });
38
- return result !== null && result !== void 0 ? result : 'default';
39
- }
1
+ import { documentContainWacElements } from './documentContainWacElements';
2
+ import { isExcelDesktopDocument } from './isExcelDesktopDocument';
3
+ import { isExcelOnlineDocument } from './isExcelOnlineDocument';
4
+ import { isGoogleSheetDocument } from './isGoogleSheetDocument';
5
+ import { isPowerPointDesktopDocument } from './isPowerPointDesktopDocument';
6
+ import { isWordDesktopDocument } from './isWordDesktopDocument';
7
+ import { shouldConvertToSingleImage } from './shouldConvertToSingleImage';
8
+ var getSourceFunctions = new Map([
9
+ ['wordDesktop', isWordDesktopDocument],
10
+ ['excelDesktop', isExcelDesktopDocument],
11
+ ['excelOnline', isExcelOnlineDocument],
12
+ ['powerPointDesktop', isPowerPointDesktopDocument],
13
+ ['wacComponents', documentContainWacElements],
14
+ ['googleSheets', isGoogleSheetDocument],
15
+ ['singleImage', shouldConvertToSingleImage],
16
+ ]);
17
+ /**
18
+ * @internal
19
+ * This function tries to get the source of the Pasted content
20
+ * @param event the before paste event
21
+ * @param shouldConvertSingleImage Whether convert single image is enabled.
22
+ * @returns The Type of pasted content, if no type found will return {KnownSourceType.Default}
23
+ */
24
+ export function getPasteSource(event, shouldConvertSingleImage) {
25
+ var htmlAttributes = event.htmlAttributes, clipboardData = event.clipboardData, fragment = event.fragment;
26
+ var result = null;
27
+ var param = {
28
+ htmlAttributes: htmlAttributes,
29
+ fragment: fragment,
30
+ shouldConvertSingleImage: shouldConvertSingleImage,
31
+ clipboardData: clipboardData,
32
+ };
33
+ getSourceFunctions.forEach(function (func, key) {
34
+ if (!result && func(param)) {
35
+ result = key;
36
+ }
37
+ });
38
+ return result !== null && result !== void 0 ? result : 'default';
39
+ }
40
40
  //# sourceMappingURL=getPasteSource.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"getPasteSource.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-plugins/lib/paste/pasteSourceValidations/getPasteSource.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAC1E,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAC5E,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAgC1E,IAAM,kBAAkB,GAAG,IAAI,GAAG,CAA0C;IACxE,CAAC,aAAa,EAAE,qBAAqB,CAAC;IACtC,CAAC,cAAc,EAAE,sBAAsB,CAAC;IACxC,CAAC,aAAa,EAAE,qBAAqB,CAAC;IACtC,CAAC,mBAAmB,EAAE,2BAA2B,CAAC;IAClD,CAAC,eAAe,EAAE,0BAA0B,CAAC;IAC7C,CAAC,cAAc,EAAE,qBAAqB,CAAC;IACvC,CAAC,aAAa,EAAE,0BAA0B,CAAC;CAC9C,CAAC,CAAC;AAEH;;;;;;GAMG;AACH,MAAM,UAAU,cAAc,CAC1B,KAAuB,EACvB,wBAAiC;IAEzB,IAAA,cAAc,GAA8B,KAAK,eAAnC,EAAE,aAAa,GAAe,KAAK,cAApB,EAAE,QAAQ,GAAK,KAAK,SAAV,CAAW;IAE1D,IAAI,MAAM,GAAgC,IAAI,CAAC;IAC/C,IAAM,KAAK,GAAyB;QAChC,cAAc,gBAAA;QACd,QAAQ,UAAA;QACR,wBAAwB,0BAAA;QACxB,aAAa,eAAA;KAChB,CAAC;IAEF,kBAAkB,CAAC,OAAO,CAAC,UAAC,IAAI,EAAE,GAAG;QACjC,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,KAAK,CAAC,EAAE;YACxB,MAAM,GAAG,GAAG,CAAC;SAChB;IACL,CAAC,CAAC,CAAC;IAEH,OAAO,MAAM,aAAN,MAAM,cAAN,MAAM,GAAI,SAAS,CAAC;AAC/B,CAAC","sourcesContent":["import { documentContainWacElements } from './documentContainWacElements';\nimport { isExcelDesktopDocument } from './isExcelDesktopDocument';\nimport { isExcelOnlineDocument } from './isExcelOnlineDocument';\nimport { isGoogleSheetDocument } from './isGoogleSheetDocument';\nimport { isPowerPointDesktopDocument } from './isPowerPointDesktopDocument';\nimport { isWordDesktopDocument } from './isWordDesktopDocument';\nimport { shouldConvertToSingleImage } from './shouldConvertToSingleImage';\nimport type { BeforePasteEvent, ClipboardData } from 'roosterjs-content-model-types';\n\n/**\n * @internal\n */\nexport type GetSourceInputParams = {\n htmlAttributes: Record<string, string>;\n fragment: DocumentFragment;\n shouldConvertSingleImage: boolean;\n clipboardData: ClipboardData;\n};\n\n/**\n * @internal\n * Represent the types of sources to handle in the Paste Plugin\n */\nexport type KnownPasteSourceType =\n | 'wordDesktop'\n | 'excelDesktop'\n | 'excelOnline'\n | 'powerPointDesktop'\n | 'googleSheets'\n | 'wacComponents'\n | 'default'\n | 'singleImage';\n\n/**\n * @internal\n */\nexport type GetSourceFunction = (props: GetSourceInputParams) => boolean;\n\nconst getSourceFunctions = new Map<KnownPasteSourceType, GetSourceFunction>([\n ['wordDesktop', isWordDesktopDocument],\n ['excelDesktop', isExcelDesktopDocument],\n ['excelOnline', isExcelOnlineDocument],\n ['powerPointDesktop', isPowerPointDesktopDocument],\n ['wacComponents', documentContainWacElements],\n ['googleSheets', isGoogleSheetDocument],\n ['singleImage', shouldConvertToSingleImage],\n]);\n\n/**\n * @internal\n * This function tries to get the source of the Pasted content\n * @param event the before paste event\n * @param shouldConvertSingleImage Whether convert single image is enabled.\n * @returns The Type of pasted content, if no type found will return {KnownSourceType.Default}\n */\nexport function getPasteSource(\n event: BeforePasteEvent,\n shouldConvertSingleImage: boolean\n): KnownPasteSourceType {\n const { htmlAttributes, clipboardData, fragment } = event;\n\n let result: KnownPasteSourceType | null = null;\n const param: GetSourceInputParams = {\n htmlAttributes,\n fragment,\n shouldConvertSingleImage,\n clipboardData,\n };\n\n getSourceFunctions.forEach((func, key) => {\n if (!result && func(param)) {\n result = key;\n }\n });\n\n return result ?? 'default';\n}\n"]}
1
+ {"version":3,"file":"getPasteSource.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-plugins/lib/paste/pasteSourceValidations/getPasteSource.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAC1E,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAC5E,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAgC1E,IAAM,kBAAkB,GAAG,IAAI,GAAG,CAA0C;IACxE,CAAC,aAAa,EAAE,qBAAqB,CAAC;IACtC,CAAC,cAAc,EAAE,sBAAsB,CAAC;IACxC,CAAC,aAAa,EAAE,qBAAqB,CAAC;IACtC,CAAC,mBAAmB,EAAE,2BAA2B,CAAC;IAClD,CAAC,eAAe,EAAE,0BAA0B,CAAC;IAC7C,CAAC,cAAc,EAAE,qBAAqB,CAAC;IACvC,CAAC,aAAa,EAAE,0BAA0B,CAAC;CAC9C,CAAC,CAAC;AAEH;;;;;;GAMG;AACH,MAAM,UAAU,cAAc,CAC1B,KAAuB,EACvB,wBAAiC;IAEzB,IAAA,cAAc,GAA8B,KAAK,eAAnC,EAAE,aAAa,GAAe,KAAK,cAApB,EAAE,QAAQ,GAAK,KAAK,SAAV,CAAW;IAE1D,IAAI,MAAM,GAAgC,IAAI,CAAC;IAC/C,IAAM,KAAK,GAAyB;QAChC,cAAc,gBAAA;QACd,QAAQ,UAAA;QACR,wBAAwB,0BAAA;QACxB,aAAa,eAAA;KAChB,CAAC;IAEF,kBAAkB,CAAC,OAAO,CAAC,UAAC,IAAI,EAAE,GAAG;QACjC,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,KAAK,CAAC,EAAE;YACxB,MAAM,GAAG,GAAG,CAAC;SAChB;IACL,CAAC,CAAC,CAAC;IAEH,OAAO,MAAM,aAAN,MAAM,cAAN,MAAM,GAAI,SAAS,CAAC;AAC/B,CAAC","sourcesContent":["import { documentContainWacElements } from './documentContainWacElements';\r\nimport { isExcelDesktopDocument } from './isExcelDesktopDocument';\r\nimport { isExcelOnlineDocument } from './isExcelOnlineDocument';\r\nimport { isGoogleSheetDocument } from './isGoogleSheetDocument';\r\nimport { isPowerPointDesktopDocument } from './isPowerPointDesktopDocument';\r\nimport { isWordDesktopDocument } from './isWordDesktopDocument';\r\nimport { shouldConvertToSingleImage } from './shouldConvertToSingleImage';\r\nimport type { BeforePasteEvent, ClipboardData } from 'roosterjs-content-model-types';\r\n\r\n/**\r\n * @internal\r\n */\r\nexport type GetSourceInputParams = {\r\n htmlAttributes: Record<string, string>;\r\n fragment: DocumentFragment;\r\n shouldConvertSingleImage: boolean;\r\n clipboardData: ClipboardData;\r\n};\r\n\r\n/**\r\n * @internal\r\n * Represent the types of sources to handle in the Paste Plugin\r\n */\r\nexport type KnownPasteSourceType =\r\n | 'wordDesktop'\r\n | 'excelDesktop'\r\n | 'excelOnline'\r\n | 'powerPointDesktop'\r\n | 'googleSheets'\r\n | 'wacComponents'\r\n | 'default'\r\n | 'singleImage';\r\n\r\n/**\r\n * @internal\r\n */\r\nexport type GetSourceFunction = (props: GetSourceInputParams) => boolean;\r\n\r\nconst getSourceFunctions = new Map<KnownPasteSourceType, GetSourceFunction>([\r\n ['wordDesktop', isWordDesktopDocument],\r\n ['excelDesktop', isExcelDesktopDocument],\r\n ['excelOnline', isExcelOnlineDocument],\r\n ['powerPointDesktop', isPowerPointDesktopDocument],\r\n ['wacComponents', documentContainWacElements],\r\n ['googleSheets', isGoogleSheetDocument],\r\n ['singleImage', shouldConvertToSingleImage],\r\n]);\r\n\r\n/**\r\n * @internal\r\n * This function tries to get the source of the Pasted content\r\n * @param event the before paste event\r\n * @param shouldConvertSingleImage Whether convert single image is enabled.\r\n * @returns The Type of pasted content, if no type found will return {KnownSourceType.Default}\r\n */\r\nexport function getPasteSource(\r\n event: BeforePasteEvent,\r\n shouldConvertSingleImage: boolean\r\n): KnownPasteSourceType {\r\n const { htmlAttributes, clipboardData, fragment } = event;\r\n\r\n let result: KnownPasteSourceType | null = null;\r\n const param: GetSourceInputParams = {\r\n htmlAttributes,\r\n fragment,\r\n shouldConvertSingleImage,\r\n clipboardData,\r\n };\r\n\r\n getSourceFunctions.forEach((func, key) => {\r\n if (!result && func(param)) {\r\n result = key;\r\n }\r\n });\r\n\r\n return result ?? 'default';\r\n}\r\n"]}
@@ -1,8 +1,8 @@
1
- import type { GetSourceFunction } from './getPasteSource';
2
- /**
3
- * @internal
4
- * Checks whether the Array provided contains strings that identify Excel Desktop documents
5
- * @param props Properties related to the PasteEvent
6
- * @returns
7
- */
8
- export declare const isExcelDesktopDocument: GetSourceFunction;
1
+ import type { GetSourceFunction } from './getPasteSource';
2
+ /**
3
+ * @internal
4
+ * Checks whether the Array provided contains strings that identify Excel Desktop documents
5
+ * @param props Properties related to the PasteEvent
6
+ * @returns
7
+ */
8
+ export declare const isExcelDesktopDocument: GetSourceFunction;
@@ -1,14 +1,14 @@
1
- import { PastePropertyNames } from './constants';
2
- var EXCEL_ATTRIBUTE_VALUE = 'urn:schemas-microsoft-com:office:excel';
3
- /**
4
- * @internal
5
- * Checks whether the Array provided contains strings that identify Excel Desktop documents
6
- * @param props Properties related to the PasteEvent
7
- * @returns
8
- */
9
- export var isExcelDesktopDocument = function (props) {
10
- var htmlAttributes = props.htmlAttributes;
11
- // The presence of this attribute confirms its origin from Excel Desktop
12
- return htmlAttributes[PastePropertyNames.EXCEL_DESKTOP_ATTRIBUTE_NAME] == EXCEL_ATTRIBUTE_VALUE;
13
- };
1
+ import { PastePropertyNames } from './constants';
2
+ var EXCEL_ATTRIBUTE_VALUE = 'urn:schemas-microsoft-com:office:excel';
3
+ /**
4
+ * @internal
5
+ * Checks whether the Array provided contains strings that identify Excel Desktop documents
6
+ * @param props Properties related to the PasteEvent
7
+ * @returns
8
+ */
9
+ export var isExcelDesktopDocument = function (props) {
10
+ var htmlAttributes = props.htmlAttributes;
11
+ // The presence of this attribute confirms its origin from Excel Desktop
12
+ return htmlAttributes[PastePropertyNames.EXCEL_DESKTOP_ATTRIBUTE_NAME] == EXCEL_ATTRIBUTE_VALUE;
13
+ };
14
14
  //# sourceMappingURL=isExcelDesktopDocument.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"isExcelDesktopDocument.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-plugins/lib/paste/pasteSourceValidations/isExcelDesktopDocument.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAGjD,IAAM,qBAAqB,GAAG,wCAAwC,CAAC;AAEvE;;;;;GAKG;AACH,MAAM,CAAC,IAAM,sBAAsB,GAAsB,UAAA,KAAK;IAClD,IAAA,cAAc,GAAK,KAAK,eAAV,CAAW;IACjC,wEAAwE;IACxE,OAAO,cAAc,CAAC,kBAAkB,CAAC,4BAA4B,CAAC,IAAI,qBAAqB,CAAC;AACpG,CAAC,CAAC","sourcesContent":["import { PastePropertyNames } from './constants';\nimport type { GetSourceFunction } from './getPasteSource';\n\nconst EXCEL_ATTRIBUTE_VALUE = 'urn:schemas-microsoft-com:office:excel';\n\n/**\n * @internal\n * Checks whether the Array provided contains strings that identify Excel Desktop documents\n * @param props Properties related to the PasteEvent\n * @returns\n */\nexport const isExcelDesktopDocument: GetSourceFunction = props => {\n const { htmlAttributes } = props;\n // The presence of this attribute confirms its origin from Excel Desktop\n return htmlAttributes[PastePropertyNames.EXCEL_DESKTOP_ATTRIBUTE_NAME] == EXCEL_ATTRIBUTE_VALUE;\n};\n"]}
1
+ {"version":3,"file":"isExcelDesktopDocument.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-plugins/lib/paste/pasteSourceValidations/isExcelDesktopDocument.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAGjD,IAAM,qBAAqB,GAAG,wCAAwC,CAAC;AAEvE;;;;;GAKG;AACH,MAAM,CAAC,IAAM,sBAAsB,GAAsB,UAAA,KAAK;IAClD,IAAA,cAAc,GAAK,KAAK,eAAV,CAAW;IACjC,wEAAwE;IACxE,OAAO,cAAc,CAAC,kBAAkB,CAAC,4BAA4B,CAAC,IAAI,qBAAqB,CAAC;AACpG,CAAC,CAAC","sourcesContent":["import { PastePropertyNames } from './constants';\r\nimport type { GetSourceFunction } from './getPasteSource';\r\n\r\nconst EXCEL_ATTRIBUTE_VALUE = 'urn:schemas-microsoft-com:office:excel';\r\n\r\n/**\r\n * @internal\r\n * Checks whether the Array provided contains strings that identify Excel Desktop documents\r\n * @param props Properties related to the PasteEvent\r\n * @returns\r\n */\r\nexport const isExcelDesktopDocument: GetSourceFunction = props => {\r\n const { htmlAttributes } = props;\r\n // The presence of this attribute confirms its origin from Excel Desktop\r\n return htmlAttributes[PastePropertyNames.EXCEL_DESKTOP_ATTRIBUTE_NAME] == EXCEL_ATTRIBUTE_VALUE;\r\n};\r\n"]}
@@ -1,8 +1,8 @@
1
- import type { GetSourceFunction } from './getPasteSource';
2
- /**
3
- * @internal
4
- * Checks whether the Array provided contains strings that identify Excel Online documents
5
- * @param props Properties related to the PasteEvent
6
- * @returns
7
- */
8
- export declare const isExcelOnlineDocument: GetSourceFunction;
1
+ import type { GetSourceFunction } from './getPasteSource';
2
+ /**
3
+ * @internal
4
+ * Checks whether the Array provided contains strings that identify Excel Online documents
5
+ * @param props Properties related to the PasteEvent
6
+ * @returns
7
+ */
8
+ export declare const isExcelOnlineDocument: GetSourceFunction;
@@ -1,16 +1,16 @@
1
- import { PastePropertyNames } from './constants';
2
- // Excel Desktop also has this attribute
3
- var EXCEL_ONLINE_ATTRIBUTE_VALUE = 'Excel.Sheet';
4
- /**
5
- * @internal
6
- * Checks whether the Array provided contains strings that identify Excel Online documents
7
- * @param props Properties related to the PasteEvent
8
- * @returns
9
- */
10
- export var isExcelOnlineDocument = function (props) {
11
- var htmlAttributes = props.htmlAttributes;
12
- // The presence of Excel.Sheet confirms its origin from Excel, the absence of EXCEL_DESKTOP_ATTRIBUTE_NAME confirms it is from the Online version
13
- return (htmlAttributes[PastePropertyNames.PROG_ID_NAME] == EXCEL_ONLINE_ATTRIBUTE_VALUE &&
14
- htmlAttributes[PastePropertyNames.EXCEL_DESKTOP_ATTRIBUTE_NAME] == undefined);
15
- };
1
+ import { PastePropertyNames } from './constants';
2
+ // Excel Desktop also has this attribute
3
+ var EXCEL_ONLINE_ATTRIBUTE_VALUE = 'Excel.Sheet';
4
+ /**
5
+ * @internal
6
+ * Checks whether the Array provided contains strings that identify Excel Online documents
7
+ * @param props Properties related to the PasteEvent
8
+ * @returns
9
+ */
10
+ export var isExcelOnlineDocument = function (props) {
11
+ var htmlAttributes = props.htmlAttributes;
12
+ // The presence of Excel.Sheet confirms its origin from Excel, the absence of EXCEL_DESKTOP_ATTRIBUTE_NAME confirms it is from the Online version
13
+ return (htmlAttributes[PastePropertyNames.PROG_ID_NAME] == EXCEL_ONLINE_ATTRIBUTE_VALUE &&
14
+ htmlAttributes[PastePropertyNames.EXCEL_DESKTOP_ATTRIBUTE_NAME] == undefined);
15
+ };
16
16
  //# sourceMappingURL=isExcelOnlineDocument.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"isExcelOnlineDocument.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-plugins/lib/paste/pasteSourceValidations/isExcelOnlineDocument.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAGjD,wCAAwC;AACxC,IAAM,4BAA4B,GAAG,aAAa,CAAC;AAEnD;;;;;GAKG;AACH,MAAM,CAAC,IAAM,qBAAqB,GAAsB,UAAA,KAAK;IACjD,IAAA,cAAc,GAAK,KAAK,eAAV,CAAW;IACjC,iJAAiJ;IACjJ,OAAO,CACH,cAAc,CAAC,kBAAkB,CAAC,YAAY,CAAC,IAAI,4BAA4B;QAC/E,cAAc,CAAC,kBAAkB,CAAC,4BAA4B,CAAC,IAAI,SAAS,CAC/E,CAAC;AACN,CAAC,CAAC","sourcesContent":["import { PastePropertyNames } from './constants';\nimport type { GetSourceFunction } from './getPasteSource';\n\n// Excel Desktop also has this attribute\nconst EXCEL_ONLINE_ATTRIBUTE_VALUE = 'Excel.Sheet';\n\n/**\n * @internal\n * Checks whether the Array provided contains strings that identify Excel Online documents\n * @param props Properties related to the PasteEvent\n * @returns\n */\nexport const isExcelOnlineDocument: GetSourceFunction = props => {\n const { htmlAttributes } = props;\n // The presence of Excel.Sheet confirms its origin from Excel, the absence of EXCEL_DESKTOP_ATTRIBUTE_NAME confirms it is from the Online version\n return (\n htmlAttributes[PastePropertyNames.PROG_ID_NAME] == EXCEL_ONLINE_ATTRIBUTE_VALUE &&\n htmlAttributes[PastePropertyNames.EXCEL_DESKTOP_ATTRIBUTE_NAME] == undefined\n );\n};\n"]}
1
+ {"version":3,"file":"isExcelOnlineDocument.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-plugins/lib/paste/pasteSourceValidations/isExcelOnlineDocument.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAGjD,wCAAwC;AACxC,IAAM,4BAA4B,GAAG,aAAa,CAAC;AAEnD;;;;;GAKG;AACH,MAAM,CAAC,IAAM,qBAAqB,GAAsB,UAAA,KAAK;IACjD,IAAA,cAAc,GAAK,KAAK,eAAV,CAAW;IACjC,iJAAiJ;IACjJ,OAAO,CACH,cAAc,CAAC,kBAAkB,CAAC,YAAY,CAAC,IAAI,4BAA4B;QAC/E,cAAc,CAAC,kBAAkB,CAAC,4BAA4B,CAAC,IAAI,SAAS,CAC/E,CAAC;AACN,CAAC,CAAC","sourcesContent":["import { PastePropertyNames } from './constants';\r\nimport type { GetSourceFunction } from './getPasteSource';\r\n\r\n// Excel Desktop also has this attribute\r\nconst EXCEL_ONLINE_ATTRIBUTE_VALUE = 'Excel.Sheet';\r\n\r\n/**\r\n * @internal\r\n * Checks whether the Array provided contains strings that identify Excel Online documents\r\n * @param props Properties related to the PasteEvent\r\n * @returns\r\n */\r\nexport const isExcelOnlineDocument: GetSourceFunction = props => {\r\n const { htmlAttributes } = props;\r\n // The presence of Excel.Sheet confirms its origin from Excel, the absence of EXCEL_DESKTOP_ATTRIBUTE_NAME confirms it is from the Online version\r\n return (\r\n htmlAttributes[PastePropertyNames.PROG_ID_NAME] == EXCEL_ONLINE_ATTRIBUTE_VALUE &&\r\n htmlAttributes[PastePropertyNames.EXCEL_DESKTOP_ATTRIBUTE_NAME] == undefined\r\n );\r\n};\r\n"]}
@@ -1,8 +1,8 @@
1
- import type { GetSourceFunction } from './getPasteSource';
2
- /**
3
- * @internal
4
- * Checks whether the fragment provided contain elements from Google sheets
5
- * @param props Properties related to the PasteEvent
6
- * @returns
7
- */
8
- export declare const isGoogleSheetDocument: GetSourceFunction;
1
+ import type { GetSourceFunction } from './getPasteSource';
2
+ /**
3
+ * @internal
4
+ * Checks whether the fragment provided contain elements from Google sheets
5
+ * @param props Properties related to the PasteEvent
6
+ * @returns
7
+ */
8
+ export declare const isGoogleSheetDocument: GetSourceFunction;
@@ -1,12 +1,12 @@
1
- import { PastePropertyNames } from './constants';
2
- /**
3
- * @internal
4
- * Checks whether the fragment provided contain elements from Google sheets
5
- * @param props Properties related to the PasteEvent
6
- * @returns
7
- */
8
- export var isGoogleSheetDocument = function (props) {
9
- var fragment = props.fragment;
10
- return !!fragment.querySelector(PastePropertyNames.GOOGLE_SHEET_NODE_NAME);
11
- };
1
+ import { PastePropertyNames } from './constants';
2
+ /**
3
+ * @internal
4
+ * Checks whether the fragment provided contain elements from Google sheets
5
+ * @param props Properties related to the PasteEvent
6
+ * @returns
7
+ */
8
+ export var isGoogleSheetDocument = function (props) {
9
+ var fragment = props.fragment;
10
+ return !!fragment.querySelector(PastePropertyNames.GOOGLE_SHEET_NODE_NAME);
11
+ };
12
12
  //# sourceMappingURL=isGoogleSheetDocument.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"isGoogleSheetDocument.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-plugins/lib/paste/pasteSourceValidations/isGoogleSheetDocument.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAGjD;;;;;GAKG;AACH,MAAM,CAAC,IAAM,qBAAqB,GAAsB,UAAA,KAAK;IACjD,IAAA,QAAQ,GAAK,KAAK,SAAV,CAAW;IAC3B,OAAO,CAAC,CAAC,QAAQ,CAAC,aAAa,CAAC,kBAAkB,CAAC,sBAAsB,CAAC,CAAC;AAC/E,CAAC,CAAC","sourcesContent":["import { PastePropertyNames } from './constants';\nimport type { GetSourceFunction } from './getPasteSource';\n\n/**\n * @internal\n * Checks whether the fragment provided contain elements from Google sheets\n * @param props Properties related to the PasteEvent\n * @returns\n */\nexport const isGoogleSheetDocument: GetSourceFunction = props => {\n const { fragment } = props;\n return !!fragment.querySelector(PastePropertyNames.GOOGLE_SHEET_NODE_NAME);\n};\n"]}
1
+ {"version":3,"file":"isGoogleSheetDocument.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-plugins/lib/paste/pasteSourceValidations/isGoogleSheetDocument.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAGjD;;;;;GAKG;AACH,MAAM,CAAC,IAAM,qBAAqB,GAAsB,UAAA,KAAK;IACjD,IAAA,QAAQ,GAAK,KAAK,SAAV,CAAW;IAC3B,OAAO,CAAC,CAAC,QAAQ,CAAC,aAAa,CAAC,kBAAkB,CAAC,sBAAsB,CAAC,CAAC;AAC/E,CAAC,CAAC","sourcesContent":["import { PastePropertyNames } from './constants';\r\nimport type { GetSourceFunction } from './getPasteSource';\r\n\r\n/**\r\n * @internal\r\n * Checks whether the fragment provided contain elements from Google sheets\r\n * @param props Properties related to the PasteEvent\r\n * @returns\r\n */\r\nexport const isGoogleSheetDocument: GetSourceFunction = props => {\r\n const { fragment } = props;\r\n return !!fragment.querySelector(PastePropertyNames.GOOGLE_SHEET_NODE_NAME);\r\n};\r\n"]}
@@ -1,8 +1,8 @@
1
- import type { GetSourceFunction } from './getPasteSource';
2
- /**
3
- * @internal
4
- * Checks whether the Array provided contains strings that identify Power Point Desktop documents
5
- * @param props Properties related to the PasteEvent
6
- * @returns
7
- */
8
- export declare const isPowerPointDesktopDocument: GetSourceFunction;
1
+ import type { GetSourceFunction } from './getPasteSource';
2
+ /**
3
+ * @internal
4
+ * Checks whether the Array provided contains strings that identify Power Point Desktop documents
5
+ * @param props Properties related to the PasteEvent
6
+ * @returns
7
+ */
8
+ export declare const isPowerPointDesktopDocument: GetSourceFunction;
@@ -1,12 +1,12 @@
1
- import { PastePropertyNames } from './constants';
2
- var POWERPOINT_ATTRIBUTE_VALUE = 'PowerPoint.Slide';
3
- /**
4
- * @internal
5
- * Checks whether the Array provided contains strings that identify Power Point Desktop documents
6
- * @param props Properties related to the PasteEvent
7
- * @returns
8
- */
9
- export var isPowerPointDesktopDocument = function (props) {
10
- return props.htmlAttributes[PastePropertyNames.PROG_ID_NAME] == POWERPOINT_ATTRIBUTE_VALUE;
11
- };
1
+ import { PastePropertyNames } from './constants';
2
+ var POWERPOINT_ATTRIBUTE_VALUE = 'PowerPoint.Slide';
3
+ /**
4
+ * @internal
5
+ * Checks whether the Array provided contains strings that identify Power Point Desktop documents
6
+ * @param props Properties related to the PasteEvent
7
+ * @returns
8
+ */
9
+ export var isPowerPointDesktopDocument = function (props) {
10
+ return props.htmlAttributes[PastePropertyNames.PROG_ID_NAME] == POWERPOINT_ATTRIBUTE_VALUE;
11
+ };
12
12
  //# sourceMappingURL=isPowerPointDesktopDocument.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"isPowerPointDesktopDocument.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-plugins/lib/paste/pasteSourceValidations/isPowerPointDesktopDocument.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAGjD,IAAM,0BAA0B,GAAG,kBAAkB,CAAC;AAEtD;;;;;GAKG;AACH,MAAM,CAAC,IAAM,2BAA2B,GAAsB,UAAA,KAAK;IAC/D,OAAO,KAAK,CAAC,cAAc,CAAC,kBAAkB,CAAC,YAAY,CAAC,IAAI,0BAA0B,CAAC;AAC/F,CAAC,CAAC","sourcesContent":["import { PastePropertyNames } from './constants';\nimport type { GetSourceFunction } from './getPasteSource';\n\nconst POWERPOINT_ATTRIBUTE_VALUE = 'PowerPoint.Slide';\n\n/**\n * @internal\n * Checks whether the Array provided contains strings that identify Power Point Desktop documents\n * @param props Properties related to the PasteEvent\n * @returns\n */\nexport const isPowerPointDesktopDocument: GetSourceFunction = props => {\n return props.htmlAttributes[PastePropertyNames.PROG_ID_NAME] == POWERPOINT_ATTRIBUTE_VALUE;\n};\n"]}
1
+ {"version":3,"file":"isPowerPointDesktopDocument.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-plugins/lib/paste/pasteSourceValidations/isPowerPointDesktopDocument.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAGjD,IAAM,0BAA0B,GAAG,kBAAkB,CAAC;AAEtD;;;;;GAKG;AACH,MAAM,CAAC,IAAM,2BAA2B,GAAsB,UAAA,KAAK;IAC/D,OAAO,KAAK,CAAC,cAAc,CAAC,kBAAkB,CAAC,YAAY,CAAC,IAAI,0BAA0B,CAAC;AAC/F,CAAC,CAAC","sourcesContent":["import { PastePropertyNames } from './constants';\r\nimport type { GetSourceFunction } from './getPasteSource';\r\n\r\nconst POWERPOINT_ATTRIBUTE_VALUE = 'PowerPoint.Slide';\r\n\r\n/**\r\n * @internal\r\n * Checks whether the Array provided contains strings that identify Power Point Desktop documents\r\n * @param props Properties related to the PasteEvent\r\n * @returns\r\n */\r\nexport const isPowerPointDesktopDocument: GetSourceFunction = props => {\r\n return props.htmlAttributes[PastePropertyNames.PROG_ID_NAME] == POWERPOINT_ATTRIBUTE_VALUE;\r\n};\r\n"]}
@@ -1,8 +1,8 @@
1
- import type { GetSourceFunction } from './getPasteSource';
2
- /**
3
- * @internal
4
- * Checks whether the Array provided contains strings that identify Word Desktop documents
5
- * @param props Properties related to the PasteEvent
6
- * @returns
7
- */
8
- export declare const isWordDesktopDocument: GetSourceFunction;
1
+ import type { GetSourceFunction } from './getPasteSource';
2
+ /**
3
+ * @internal
4
+ * Checks whether the Array provided contains strings that identify Word Desktop documents
5
+ * @param props Properties related to the PasteEvent
6
+ * @returns
7
+ */
8
+ export declare const isWordDesktopDocument: GetSourceFunction;
@@ -1,16 +1,16 @@
1
- import { PastePropertyNames } from './constants';
2
- var WORD_ATTRIBUTE_NAME = 'xmlns:w';
3
- var WORD_ATTRIBUTE_VALUE = 'urn:schemas-microsoft-com:office:word';
4
- var WORD_PROG_ID = 'Word.Document';
5
- /**
6
- * @internal
7
- * Checks whether the Array provided contains strings that identify Word Desktop documents
8
- * @param props Properties related to the PasteEvent
9
- * @returns
10
- */
11
- export var isWordDesktopDocument = function (props) {
12
- var htmlAttributes = props.htmlAttributes;
13
- return (htmlAttributes[WORD_ATTRIBUTE_NAME] == WORD_ATTRIBUTE_VALUE ||
14
- htmlAttributes[PastePropertyNames.PROG_ID_NAME] == WORD_PROG_ID);
15
- };
1
+ import { PastePropertyNames } from './constants';
2
+ var WORD_ATTRIBUTE_NAME = 'xmlns:w';
3
+ var WORD_ATTRIBUTE_VALUE = 'urn:schemas-microsoft-com:office:word';
4
+ var WORD_PROG_ID = 'Word.Document';
5
+ /**
6
+ * @internal
7
+ * Checks whether the Array provided contains strings that identify Word Desktop documents
8
+ * @param props Properties related to the PasteEvent
9
+ * @returns
10
+ */
11
+ export var isWordDesktopDocument = function (props) {
12
+ var htmlAttributes = props.htmlAttributes;
13
+ return (htmlAttributes[WORD_ATTRIBUTE_NAME] == WORD_ATTRIBUTE_VALUE ||
14
+ htmlAttributes[PastePropertyNames.PROG_ID_NAME] == WORD_PROG_ID);
15
+ };
16
16
  //# sourceMappingURL=isWordDesktopDocument.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"isWordDesktopDocument.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-plugins/lib/paste/pasteSourceValidations/isWordDesktopDocument.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAGjD,IAAM,mBAAmB,GAAG,SAAS,CAAC;AACtC,IAAM,oBAAoB,GAAG,uCAAuC,CAAC;AACrE,IAAM,YAAY,GAAG,eAAe,CAAC;AAErC;;;;;GAKG;AACH,MAAM,CAAC,IAAM,qBAAqB,GAAsB,UAAA,KAAK;IACjD,IAAA,cAAc,GAAK,KAAK,eAAV,CAAW;IACjC,OAAO,CACH,cAAc,CAAC,mBAAmB,CAAC,IAAI,oBAAoB;QAC3D,cAAc,CAAC,kBAAkB,CAAC,YAAY,CAAC,IAAI,YAAY,CAClE,CAAC;AACN,CAAC,CAAC","sourcesContent":["import { PastePropertyNames } from './constants';\nimport type { GetSourceFunction } from './getPasteSource';\n\nconst WORD_ATTRIBUTE_NAME = 'xmlns:w';\nconst WORD_ATTRIBUTE_VALUE = 'urn:schemas-microsoft-com:office:word';\nconst WORD_PROG_ID = 'Word.Document';\n\n/**\n * @internal\n * Checks whether the Array provided contains strings that identify Word Desktop documents\n * @param props Properties related to the PasteEvent\n * @returns\n */\nexport const isWordDesktopDocument: GetSourceFunction = props => {\n const { htmlAttributes } = props;\n return (\n htmlAttributes[WORD_ATTRIBUTE_NAME] == WORD_ATTRIBUTE_VALUE ||\n htmlAttributes[PastePropertyNames.PROG_ID_NAME] == WORD_PROG_ID\n );\n};\n"]}
1
+ {"version":3,"file":"isWordDesktopDocument.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-plugins/lib/paste/pasteSourceValidations/isWordDesktopDocument.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAGjD,IAAM,mBAAmB,GAAG,SAAS,CAAC;AACtC,IAAM,oBAAoB,GAAG,uCAAuC,CAAC;AACrE,IAAM,YAAY,GAAG,eAAe,CAAC;AAErC;;;;;GAKG;AACH,MAAM,CAAC,IAAM,qBAAqB,GAAsB,UAAA,KAAK;IACjD,IAAA,cAAc,GAAK,KAAK,eAAV,CAAW;IACjC,OAAO,CACH,cAAc,CAAC,mBAAmB,CAAC,IAAI,oBAAoB;QAC3D,cAAc,CAAC,kBAAkB,CAAC,YAAY,CAAC,IAAI,YAAY,CAClE,CAAC;AACN,CAAC,CAAC","sourcesContent":["import { PastePropertyNames } from './constants';\r\nimport type { GetSourceFunction } from './getPasteSource';\r\n\r\nconst WORD_ATTRIBUTE_NAME = 'xmlns:w';\r\nconst WORD_ATTRIBUTE_VALUE = 'urn:schemas-microsoft-com:office:word';\r\nconst WORD_PROG_ID = 'Word.Document';\r\n\r\n/**\r\n * @internal\r\n * Checks whether the Array provided contains strings that identify Word Desktop documents\r\n * @param props Properties related to the PasteEvent\r\n * @returns\r\n */\r\nexport const isWordDesktopDocument: GetSourceFunction = props => {\r\n const { htmlAttributes } = props;\r\n return (\r\n htmlAttributes[WORD_ATTRIBUTE_NAME] == WORD_ATTRIBUTE_VALUE ||\r\n htmlAttributes[PastePropertyNames.PROG_ID_NAME] == WORD_PROG_ID\r\n );\r\n};\r\n"]}
@@ -1,9 +1,9 @@
1
- import type { GetSourceFunction } from './getPasteSource';
2
- /**
3
- * @internal
4
- * Checks whether the fragment only contains a single image to paste
5
- * and the editor have the ConvertSingleImageBody Experimental feature
6
- * @param props Properties related to the PasteEvent
7
- * @returns
8
- */
9
- export declare const shouldConvertToSingleImage: GetSourceFunction;
1
+ import type { GetSourceFunction } from './getPasteSource';
2
+ /**
3
+ * @internal
4
+ * Checks whether the fragment only contains a single image to paste
5
+ * and the editor have the ConvertSingleImageBody Experimental feature
6
+ * @param props Properties related to the PasteEvent
7
+ * @returns
8
+ */
9
+ export declare const shouldConvertToSingleImage: GetSourceFunction;
@@ -1,15 +1,15 @@
1
- /**
2
- * @internal
3
- * Checks whether the fragment only contains a single image to paste
4
- * and the editor have the ConvertSingleImageBody Experimental feature
5
- * @param props Properties related to the PasteEvent
6
- * @returns
7
- */
8
- export var shouldConvertToSingleImage = function (props) {
9
- var _a;
10
- var shouldConvertSingleImage = props.shouldConvertSingleImage, clipboardData = props.clipboardData;
11
- return (shouldConvertSingleImage &&
12
- ((_a = clipboardData.htmlFirstLevelChildTags) === null || _a === void 0 ? void 0 : _a.length) == 1 &&
13
- clipboardData.htmlFirstLevelChildTags[0] == 'IMG');
14
- };
1
+ /**
2
+ * @internal
3
+ * Checks whether the fragment only contains a single image to paste
4
+ * and the editor have the ConvertSingleImageBody Experimental feature
5
+ * @param props Properties related to the PasteEvent
6
+ * @returns
7
+ */
8
+ export var shouldConvertToSingleImage = function (props) {
9
+ var _a;
10
+ var shouldConvertSingleImage = props.shouldConvertSingleImage, clipboardData = props.clipboardData;
11
+ return (shouldConvertSingleImage &&
12
+ ((_a = clipboardData.htmlFirstLevelChildTags) === null || _a === void 0 ? void 0 : _a.length) == 1 &&
13
+ clipboardData.htmlFirstLevelChildTags[0] == 'IMG');
14
+ };
15
15
  //# sourceMappingURL=shouldConvertToSingleImage.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"shouldConvertToSingleImage.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-plugins/lib/paste/pasteSourceValidations/shouldConvertToSingleImage.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,MAAM,CAAC,IAAM,0BAA0B,GAAsB,UAAA,KAAK;;IACtD,IAAA,wBAAwB,GAAoB,KAAK,yBAAzB,EAAE,aAAa,GAAK,KAAK,cAAV,CAAW;IAC1D,OAAO,CACH,wBAAwB;QACxB,CAAA,MAAA,aAAa,CAAC,uBAAuB,0CAAE,MAAM,KAAI,CAAC;QAClD,aAAa,CAAC,uBAAuB,CAAC,CAAC,CAAC,IAAI,KAAK,CACpD,CAAC;AACN,CAAC,CAAC","sourcesContent":["import type { GetSourceFunction } from './getPasteSource';\n\n/**\n * @internal\n * Checks whether the fragment only contains a single image to paste\n * and the editor have the ConvertSingleImageBody Experimental feature\n * @param props Properties related to the PasteEvent\n * @returns\n */\nexport const shouldConvertToSingleImage: GetSourceFunction = props => {\n const { shouldConvertSingleImage, clipboardData } = props;\n return (\n shouldConvertSingleImage &&\n clipboardData.htmlFirstLevelChildTags?.length == 1 &&\n clipboardData.htmlFirstLevelChildTags[0] == 'IMG'\n );\n};\n"]}
1
+ {"version":3,"file":"shouldConvertToSingleImage.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-plugins/lib/paste/pasteSourceValidations/shouldConvertToSingleImage.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,MAAM,CAAC,IAAM,0BAA0B,GAAsB,UAAA,KAAK;;IACtD,IAAA,wBAAwB,GAAoB,KAAK,yBAAzB,EAAE,aAAa,GAAK,KAAK,cAAV,CAAW;IAC1D,OAAO,CACH,wBAAwB;QACxB,CAAA,MAAA,aAAa,CAAC,uBAAuB,0CAAE,MAAM,KAAI,CAAC;QAClD,aAAa,CAAC,uBAAuB,CAAC,CAAC,CAAC,IAAI,KAAK,CACpD,CAAC;AACN,CAAC,CAAC","sourcesContent":["import type { GetSourceFunction } from './getPasteSource';\r\n\r\n/**\r\n * @internal\r\n * Checks whether the fragment only contains a single image to paste\r\n * and the editor have the ConvertSingleImageBody Experimental feature\r\n * @param props Properties related to the PasteEvent\r\n * @returns\r\n */\r\nexport const shouldConvertToSingleImage: GetSourceFunction = props => {\r\n const { shouldConvertSingleImage, clipboardData } = props;\r\n return (\r\n shouldConvertSingleImage &&\r\n clipboardData.htmlFirstLevelChildTags?.length == 1 &&\r\n clipboardData.htmlFirstLevelChildTags[0] == 'IMG'\r\n );\r\n};\r\n"]}
@@ -1,5 +1,5 @@
1
- import type { ContentModelFormatMap, DomToModelOption, FormatParser, ElementFormatParserPerCategory } from 'roosterjs-content-model-types';
2
- /**
3
- * @internal
4
- */
5
- export default function addParser<TKey extends keyof ElementFormatParserPerCategory>(domToModelOption: DomToModelOption, entry: TKey, additionalFormatParsers: FormatParser<ContentModelFormatMap[TKey]>): void;
1
+ import type { ContentModelFormatMap, DomToModelOption, FormatParser, ElementFormatParserPerCategory } from 'roosterjs-content-model-types';
2
+ /**
3
+ * @internal
4
+ */
5
+ export default function addParser<TKey extends keyof ElementFormatParserPerCategory>(domToModelOption: DomToModelOption, entry: TKey, additionalFormatParsers: FormatParser<ContentModelFormatMap[TKey]>): void;
@@ -1,14 +1,14 @@
1
- /**
2
- * @internal
3
- */
4
- export default function addParser(domToModelOption, entry, additionalFormatParsers) {
5
- var _a;
6
- if (!domToModelOption.additionalFormatParsers) {
7
- domToModelOption.additionalFormatParsers = {};
8
- }
9
- if (!domToModelOption.additionalFormatParsers[entry]) {
10
- domToModelOption.additionalFormatParsers[entry] = [];
11
- }
12
- (_a = domToModelOption.additionalFormatParsers[entry]) === null || _a === void 0 ? void 0 : _a.push(additionalFormatParsers);
13
- }
1
+ /**
2
+ * @internal
3
+ */
4
+ export default function addParser(domToModelOption, entry, additionalFormatParsers) {
5
+ var _a;
6
+ if (!domToModelOption.additionalFormatParsers) {
7
+ domToModelOption.additionalFormatParsers = {};
8
+ }
9
+ if (!domToModelOption.additionalFormatParsers[entry]) {
10
+ domToModelOption.additionalFormatParsers[entry] = [];
11
+ }
12
+ (_a = domToModelOption.additionalFormatParsers[entry]) === null || _a === void 0 ? void 0 : _a.push(additionalFormatParsers);
13
+ }
14
14
  //# sourceMappingURL=addParser.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"addParser.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-plugins/lib/paste/utils/addParser.ts"],"names":[],"mappings":"AAOA;;GAEG;AACH,MAAM,CAAC,OAAO,UAAU,SAAS,CAC7B,gBAAkC,EAClC,KAAW,EACX,uBAAkE;;IAElE,IAAI,CAAC,gBAAgB,CAAC,uBAAuB,EAAE;QAC3C,gBAAgB,CAAC,uBAAuB,GAAG,EAAE,CAAC;KACjD;IACD,IAAI,CAAC,gBAAgB,CAAC,uBAAuB,CAAC,KAAK,CAAC,EAAE;QAClD,gBAAgB,CAAC,uBAAuB,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC;KACxD;IAED,MAAA,gBAAgB,CAAC,uBAAuB,CAAC,KAAK,CAAC,0CAAE,IAAI,CAAC,uBAAuB,CAAC,CAAC;AACnF,CAAC","sourcesContent":["import type {\n ContentModelFormatMap,\n DomToModelOption,\n FormatParser,\n ElementFormatParserPerCategory,\n} from 'roosterjs-content-model-types';\n\n/**\n * @internal\n */\nexport default function addParser<TKey extends keyof ElementFormatParserPerCategory>(\n domToModelOption: DomToModelOption,\n entry: TKey,\n additionalFormatParsers: FormatParser<ContentModelFormatMap[TKey]>\n) {\n if (!domToModelOption.additionalFormatParsers) {\n domToModelOption.additionalFormatParsers = {};\n }\n if (!domToModelOption.additionalFormatParsers[entry]) {\n domToModelOption.additionalFormatParsers[entry] = [];\n }\n\n domToModelOption.additionalFormatParsers[entry]?.push(additionalFormatParsers);\n}\n"]}
1
+ {"version":3,"file":"addParser.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-plugins/lib/paste/utils/addParser.ts"],"names":[],"mappings":"AAOA;;GAEG;AACH,MAAM,CAAC,OAAO,UAAU,SAAS,CAC7B,gBAAkC,EAClC,KAAW,EACX,uBAAkE;;IAElE,IAAI,CAAC,gBAAgB,CAAC,uBAAuB,EAAE;QAC3C,gBAAgB,CAAC,uBAAuB,GAAG,EAAE,CAAC;KACjD;IACD,IAAI,CAAC,gBAAgB,CAAC,uBAAuB,CAAC,KAAK,CAAC,EAAE;QAClD,gBAAgB,CAAC,uBAAuB,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC;KACxD;IAED,MAAA,gBAAgB,CAAC,uBAAuB,CAAC,KAAK,CAAC,0CAAE,IAAI,CAAC,uBAAuB,CAAC,CAAC;AACnF,CAAC","sourcesContent":["import type {\r\n ContentModelFormatMap,\r\n DomToModelOption,\r\n FormatParser,\r\n ElementFormatParserPerCategory,\r\n} from 'roosterjs-content-model-types';\r\n\r\n/**\r\n * @internal\r\n */\r\nexport default function addParser<TKey extends keyof ElementFormatParserPerCategory>(\r\n domToModelOption: DomToModelOption,\r\n entry: TKey,\r\n additionalFormatParsers: FormatParser<ContentModelFormatMap[TKey]>\r\n) {\r\n if (!domToModelOption.additionalFormatParsers) {\r\n domToModelOption.additionalFormatParsers = {};\r\n }\r\n if (!domToModelOption.additionalFormatParsers[entry]) {\r\n domToModelOption.additionalFormatParsers[entry] = [];\r\n }\r\n\r\n domToModelOption.additionalFormatParsers[entry]?.push(additionalFormatParsers);\r\n}\r\n"]}
@@ -1,5 +1,5 @@
1
- import type { BorderFormat, FormatParser } from 'roosterjs-content-model-types';
2
- /**
3
- * @internal
4
- */
5
- export declare const deprecatedBorderColorParser: FormatParser<BorderFormat>;
1
+ import type { BorderFormat, FormatParser } from 'roosterjs-content-model-types';
2
+ /**
3
+ * @internal
4
+ */
5
+ export declare const deprecatedBorderColorParser: FormatParser<BorderFormat>;
@@ -1,16 +1,16 @@
1
- import { BorderKeys, DeprecatedColors } from 'roosterjs-content-model-dom';
2
- /**
3
- * @internal
4
- */
5
- export var deprecatedBorderColorParser = function (format) {
6
- BorderKeys.forEach(function (key) {
7
- var value = format[key];
8
- var color = '';
9
- if (value &&
10
- DeprecatedColors.some(function (dColor) { return value.indexOf(dColor) > -1 && (color = dColor); })) {
11
- var newValue = value.replace(color, '').trimRight();
12
- format[key] = newValue;
13
- }
14
- });
15
- };
1
+ import { BorderKeys, DeprecatedColors } from 'roosterjs-content-model-dom';
2
+ /**
3
+ * @internal
4
+ */
5
+ export var deprecatedBorderColorParser = function (format) {
6
+ BorderKeys.forEach(function (key) {
7
+ var value = format[key];
8
+ var color = '';
9
+ if (value &&
10
+ DeprecatedColors.some(function (dColor) { return value.indexOf(dColor) > -1 && (color = dColor); })) {
11
+ var newValue = value.replace(color, '').trimRight();
12
+ format[key] = newValue;
13
+ }
14
+ });
15
+ };
16
16
  //# sourceMappingURL=deprecatedColorParser.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"deprecatedColorParser.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-plugins/lib/paste/utils/deprecatedColorParser.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAG3E;;GAEG;AACH,MAAM,CAAC,IAAM,2BAA2B,GAA+B,UACnE,MAAoB;IAEpB,UAAU,CAAC,OAAO,CAAC,UAAA,GAAG;QAClB,IAAM,KAAK,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;QAC1B,IAAI,KAAK,GAAW,EAAE,CAAC;QACvB,IACI,KAAK;YACL,gBAAgB,CAAC,IAAI,CAAC,UAAA,MAAM,IAAI,OAAA,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC,EAA9C,CAA8C,CAAC,EACjF;YACE,IAAM,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,SAAS,EAAE,CAAC;YACtD,MAAM,CAAC,GAAG,CAAC,GAAG,QAAQ,CAAC;SAC1B;IACL,CAAC,CAAC,CAAC;AACP,CAAC,CAAC","sourcesContent":["import { BorderKeys, DeprecatedColors } from 'roosterjs-content-model-dom';\nimport type { BorderFormat, FormatParser } from 'roosterjs-content-model-types';\n\n/**\n * @internal\n */\nexport const deprecatedBorderColorParser: FormatParser<BorderFormat> = (\n format: BorderFormat\n): void => {\n BorderKeys.forEach(key => {\n const value = format[key];\n let color: string = '';\n if (\n value &&\n DeprecatedColors.some(dColor => value.indexOf(dColor) > -1 && (color = dColor))\n ) {\n const newValue = value.replace(color, '').trimRight();\n format[key] = newValue;\n }\n });\n};\n"]}
1
+ {"version":3,"file":"deprecatedColorParser.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-plugins/lib/paste/utils/deprecatedColorParser.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAG3E;;GAEG;AACH,MAAM,CAAC,IAAM,2BAA2B,GAA+B,UACnE,MAAoB;IAEpB,UAAU,CAAC,OAAO,CAAC,UAAA,GAAG;QAClB,IAAM,KAAK,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;QAC1B,IAAI,KAAK,GAAW,EAAE,CAAC;QACvB,IACI,KAAK;YACL,gBAAgB,CAAC,IAAI,CAAC,UAAA,MAAM,IAAI,OAAA,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC,EAA9C,CAA8C,CAAC,EACjF;YACE,IAAM,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,SAAS,EAAE,CAAC;YACtD,MAAM,CAAC,GAAG,CAAC,GAAG,QAAQ,CAAC;SAC1B;IACL,CAAC,CAAC,CAAC;AACP,CAAC,CAAC","sourcesContent":["import { BorderKeys, DeprecatedColors } from 'roosterjs-content-model-dom';\r\nimport type { BorderFormat, FormatParser } from 'roosterjs-content-model-types';\r\n\r\n/**\r\n * @internal\r\n */\r\nexport const deprecatedBorderColorParser: FormatParser<BorderFormat> = (\r\n format: BorderFormat\r\n): void => {\r\n BorderKeys.forEach(key => {\r\n const value = format[key];\r\n let color: string = '';\r\n if (\r\n value &&\r\n DeprecatedColors.some(dColor => value.indexOf(dColor) > -1 && (color = dColor))\r\n ) {\r\n const newValue = value.replace(color, '').trimRight();\r\n format[key] = newValue;\r\n }\r\n });\r\n};\r\n"]}