roosterjs-content-model-plugins 0.26.0 → 0.26.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/autoFormat/AutoFormatPlugin.d.ts +53 -53
- package/lib/autoFormat/AutoFormatPlugin.js +80 -80
- package/lib/autoFormat/AutoFormatPlugin.js.map +1 -1
- package/lib/autoFormat/keyboardListTrigger.d.ts +5 -5
- package/lib/autoFormat/keyboardListTrigger.js +45 -45
- package/lib/autoFormat/keyboardListTrigger.js.map +1 -1
- package/lib/autoFormat/utils/convertAlphaToDecimals.d.ts +7 -7
- package/lib/autoFormat/utils/convertAlphaToDecimals.js +22 -22
- package/lib/autoFormat/utils/convertAlphaToDecimals.js.map +1 -1
- package/lib/autoFormat/utils/getIndex.d.ts +4 -4
- package/lib/autoFormat/utils/getIndex.js +13 -13
- package/lib/autoFormat/utils/getIndex.js.map +1 -1
- package/lib/autoFormat/utils/getListTypeStyle.d.ts +14 -14
- package/lib/autoFormat/utils/getListTypeStyle.js +87 -87
- package/lib/autoFormat/utils/getListTypeStyle.js.map +1 -1
- package/lib/autoFormat/utils/getNumberingListStyle.d.ts +4 -4
- package/lib/autoFormat/utils/getNumberingListStyle.js +153 -153
- package/lib/autoFormat/utils/getNumberingListStyle.js.map +1 -1
- package/lib/edit/EditPlugin.d.ts +39 -39
- package/lib/edit/EditPlugin.js +128 -128
- package/lib/edit/EditPlugin.js.map +1 -1
- package/lib/edit/deleteSteps/deleteAllSegmentBefore.d.ts +5 -5
- package/lib/edit/deleteSteps/deleteAllSegmentBefore.js +22 -22
- package/lib/edit/deleteSteps/deleteAllSegmentBefore.js.map +1 -1
- package/lib/edit/deleteSteps/deleteCollapsedSelection.d.ts +9 -9
- package/lib/edit/deleteSteps/deleteCollapsedSelection.js +93 -93
- package/lib/edit/deleteSteps/deleteCollapsedSelection.js.map +1 -1
- package/lib/edit/deleteSteps/deleteList.d.ts +5 -5
- package/lib/edit/deleteSteps/deleteList.js +23 -23
- package/lib/edit/deleteSteps/deleteList.js.map +1 -1
- package/lib/edit/deleteSteps/deleteWordSelection.d.ts +9 -9
- package/lib/edit/deleteSteps/deleteWordSelection.js +173 -173
- package/lib/edit/deleteSteps/deleteWordSelection.js.map +1 -1
- package/lib/edit/handleKeyboardEventCommon.d.ts +14 -14
- package/lib/edit/handleKeyboardEventCommon.js +54 -54
- package/lib/edit/handleKeyboardEventCommon.js.map +1 -1
- package/lib/edit/inputSteps/handleEnterOnList.d.ts +5 -5
- package/lib/edit/inputSteps/handleEnterOnList.js +67 -67
- package/lib/edit/inputSteps/handleEnterOnList.js.map +1 -1
- package/lib/edit/keyboardDelete.d.ts +9 -9
- package/lib/edit/keyboardDelete.js +71 -71
- package/lib/edit/keyboardDelete.js.map +1 -1
- package/lib/edit/keyboardInput.d.ts +5 -5
- package/lib/edit/keyboardInput.js +58 -58
- package/lib/edit/keyboardInput.js.map +1 -1
- package/lib/edit/keyboardTab.d.ts +5 -5
- package/lib/edit/keyboardTab.js +34 -34
- package/lib/edit/keyboardTab.js.map +1 -1
- package/lib/edit/utils/getLeafSiblingBlock.d.ts +23 -23
- package/lib/edit/utils/getLeafSiblingBlock.js +75 -75
- package/lib/edit/utils/getLeafSiblingBlock.js.map +1 -1
- package/lib/index.d.ts +3 -3
- package/lib/index.js +9 -9
- package/lib/index.js.map +1 -1
- package/lib/paste/Excel/processPastedContentFromExcel.d.ts +12 -12
- package/lib/paste/Excel/processPastedContentFromExcel.js +82 -82
- package/lib/paste/Excel/processPastedContentFromExcel.js.map +1 -1
- package/lib/paste/PastePlugin.d.ts +43 -43
- package/lib/paste/PastePlugin.js +130 -130
- package/lib/paste/PastePlugin.js.map +1 -1
- package/lib/paste/PowerPoint/processPastedContentFromPowerPoint.d.ts +7 -7
- package/lib/paste/PowerPoint/processPastedContentFromPowerPoint.js +19 -19
- package/lib/paste/PowerPoint/processPastedContentFromPowerPoint.js.map +1 -1
- package/lib/paste/WacComponents/constants.d.ts +48 -48
- package/lib/paste/WacComponents/constants.js +62 -62
- package/lib/paste/WacComponents/constants.js.map +1 -1
- package/lib/paste/WacComponents/processPastedContentWacComponents.d.ts +9 -9
- package/lib/paste/WacComponents/processPastedContentWacComponents.js +188 -188
- package/lib/paste/WacComponents/processPastedContentWacComponents.js.map +1 -1
- package/lib/paste/WordDesktop/WordMetadata.d.ts +9 -9
- package/lib/paste/WordDesktop/WordMetadata.js +2 -2
- package/lib/paste/WordDesktop/WordMetadata.js.map +1 -1
- package/lib/paste/WordDesktop/getStyleMetadata.d.ts +23 -23
- package/lib/paste/WordDesktop/getStyleMetadata.js +78 -78
- package/lib/paste/WordDesktop/getStyleMetadata.js.map +1 -1
- package/lib/paste/WordDesktop/processPastedContentFromWordDesktop.d.ts +7 -7
- package/lib/paste/WordDesktop/processPastedContentFromWordDesktop.js +58 -58
- package/lib/paste/WordDesktop/processPastedContentFromWordDesktop.js.map +1 -1
- package/lib/paste/WordDesktop/processWordComments.d.ts +7 -7
- package/lib/paste/WordDesktop/processWordComments.js +21 -21
- package/lib/paste/WordDesktop/processWordComments.js.map +1 -1
- package/lib/paste/WordDesktop/processWordLists.d.ts +11 -11
- package/lib/paste/WordDesktop/processWordLists.js +179 -179
- package/lib/paste/WordDesktop/processWordLists.js.map +1 -1
- package/lib/paste/WordDesktop/removeNegativeTextIndentParser.d.ts +5 -5
- package/lib/paste/WordDesktop/removeNegativeTextIndentParser.js +13 -13
- package/lib/paste/WordDesktop/removeNegativeTextIndentParser.js.map +1 -1
- package/lib/paste/pasteSourceValidations/constants.d.ts +17 -17
- package/lib/paste/pasteSourceValidations/constants.js +20 -20
- package/lib/paste/pasteSourceValidations/constants.js.map +1 -1
- package/lib/paste/pasteSourceValidations/documentContainWacElements.d.ts +8 -8
- package/lib/paste/pasteSourceValidations/documentContainWacElements.js +15 -15
- package/lib/paste/pasteSourceValidations/documentContainWacElements.js.map +1 -1
- package/lib/paste/pasteSourceValidations/getPasteSource.d.ts +27 -27
- package/lib/paste/pasteSourceValidations/getPasteSource.js +43 -43
- package/lib/paste/pasteSourceValidations/getPasteSource.js.map +1 -1
- package/lib/paste/pasteSourceValidations/isExcelDesktopDocument.d.ts +8 -8
- package/lib/paste/pasteSourceValidations/isExcelDesktopDocument.js +17 -17
- package/lib/paste/pasteSourceValidations/isExcelDesktopDocument.js.map +1 -1
- package/lib/paste/pasteSourceValidations/isExcelOnlineDocument.d.ts +8 -8
- package/lib/paste/pasteSourceValidations/isExcelOnlineDocument.js +19 -19
- package/lib/paste/pasteSourceValidations/isExcelOnlineDocument.js.map +1 -1
- package/lib/paste/pasteSourceValidations/isGoogleSheetDocument.d.ts +8 -8
- package/lib/paste/pasteSourceValidations/isGoogleSheetDocument.js +15 -15
- package/lib/paste/pasteSourceValidations/isGoogleSheetDocument.js.map +1 -1
- package/lib/paste/pasteSourceValidations/isPowerPointDesktopDocument.d.ts +8 -8
- package/lib/paste/pasteSourceValidations/isPowerPointDesktopDocument.js +15 -15
- package/lib/paste/pasteSourceValidations/isPowerPointDesktopDocument.js.map +1 -1
- package/lib/paste/pasteSourceValidations/isWordDesktopDocument.d.ts +8 -8
- package/lib/paste/pasteSourceValidations/isWordDesktopDocument.js +19 -19
- package/lib/paste/pasteSourceValidations/isWordDesktopDocument.js.map +1 -1
- package/lib/paste/pasteSourceValidations/shouldConvertToSingleImage.d.ts +9 -9
- package/lib/paste/pasteSourceValidations/shouldConvertToSingleImage.js +18 -18
- package/lib/paste/pasteSourceValidations/shouldConvertToSingleImage.js.map +1 -1
- package/lib/paste/utils/addParser.d.ts +5 -5
- package/lib/paste/utils/addParser.js +16 -16
- package/lib/paste/utils/addParser.js.map +1 -1
- package/lib/paste/utils/deprecatedColorParser.d.ts +5 -5
- package/lib/paste/utils/deprecatedColorParser.js +19 -19
- package/lib/paste/utils/deprecatedColorParser.js.map +1 -1
- package/lib/paste/utils/getStyles.d.ts +6 -6
- package/lib/paste/utils/getStyles.js +22 -22
- package/lib/paste/utils/getStyles.js.map +1 -1
- package/lib/paste/utils/linkParser.d.ts +5 -5
- package/lib/paste/utils/linkParser.js +27 -27
- package/lib/paste/utils/linkParser.js.map +1 -1
- package/lib/paste/utils/setProcessor.d.ts +5 -5
- package/lib/paste/utils/setProcessor.js +13 -13
- package/lib/paste/utils/setProcessor.js.map +1 -1
- package/lib/pluginUtils/CreateElement/CreateElementData.d.ts +35 -35
- package/lib/pluginUtils/CreateElement/CreateElementData.js +2 -2
- package/lib/pluginUtils/CreateElement/CreateElementData.js.map +1 -1
- package/lib/pluginUtils/CreateElement/createElement.d.ts +9 -9
- package/lib/pluginUtils/CreateElement/createElement.js +50 -50
- package/lib/pluginUtils/CreateElement/createElement.js.map +1 -1
- package/lib/pluginUtils/Disposable.d.ts +10 -10
- package/lib/pluginUtils/Disposable.js +2 -2
- package/lib/pluginUtils/Disposable.js.map +1 -1
- package/lib/pluginUtils/DragAndDrop/DragAndDropHandler.d.ts +45 -45
- package/lib/pluginUtils/DragAndDrop/DragAndDropHandler.js +2 -2
- package/lib/pluginUtils/DragAndDrop/DragAndDropHandler.js.map +1 -1
- package/lib/pluginUtils/DragAndDrop/DragAndDropHelper.d.ts +39 -39
- package/lib/pluginUtils/DragAndDrop/DragAndDropHelper.js +119 -119
- package/lib/pluginUtils/DragAndDrop/DragAndDropHelper.js.map +1 -1
- package/lib/pluginUtils/Rect/getIntersectedRect.d.ts +27 -27
- package/lib/pluginUtils/Rect/getIntersectedRect.js +44 -44
- package/lib/pluginUtils/Rect/getIntersectedRect.js.map +1 -1
- package/lib/pluginUtils/Rect/normalizeRect.d.ts +7 -7
- package/lib/pluginUtils/Rect/normalizeRect.js +19 -19
- package/lib/pluginUtils/Rect/normalizeRect.js.map +1 -1
- package/lib-amd/autoFormat/AutoFormatPlugin.d.ts +53 -53
- package/lib-amd/autoFormat/AutoFormatPlugin.js +81 -81
- package/lib-amd/autoFormat/AutoFormatPlugin.js.map +1 -1
- package/lib-amd/autoFormat/keyboardListTrigger.d.ts +5 -5
- package/lib-amd/autoFormat/keyboardListTrigger.js +43 -43
- package/lib-amd/autoFormat/keyboardListTrigger.js.map +1 -1
- package/lib-amd/autoFormat/utils/convertAlphaToDecimals.d.ts +7 -7
- package/lib-amd/autoFormat/utils/convertAlphaToDecimals.js +24 -24
- package/lib-amd/autoFormat/utils/convertAlphaToDecimals.js.map +1 -1
- package/lib-amd/autoFormat/utils/getIndex.d.ts +4 -4
- package/lib-amd/autoFormat/utils/getIndex.js +14 -14
- package/lib-amd/autoFormat/utils/getIndex.js.map +1 -1
- package/lib-amd/autoFormat/utils/getListTypeStyle.d.ts +14 -14
- package/lib-amd/autoFormat/utils/getListTypeStyle.js +86 -86
- package/lib-amd/autoFormat/utils/getListTypeStyle.js.map +1 -1
- package/lib-amd/autoFormat/utils/getNumberingListStyle.d.ts +4 -4
- package/lib-amd/autoFormat/utils/getNumberingListStyle.js +153 -153
- package/lib-amd/autoFormat/utils/getNumberingListStyle.js.map +1 -1
- package/lib-amd/edit/EditPlugin.d.ts +39 -39
- package/lib-amd/edit/EditPlugin.js +127 -127
- package/lib-amd/edit/EditPlugin.js.map +1 -1
- package/lib-amd/edit/deleteSteps/deleteAllSegmentBefore.d.ts +5 -5
- package/lib-amd/edit/deleteSteps/deleteAllSegmentBefore.js +23 -23
- package/lib-amd/edit/deleteSteps/deleteAllSegmentBefore.js.map +1 -1
- package/lib-amd/edit/deleteSteps/deleteCollapsedSelection.d.ts +9 -9
- package/lib-amd/edit/deleteSteps/deleteCollapsedSelection.js +92 -92
- package/lib-amd/edit/deleteSteps/deleteCollapsedSelection.js.map +1 -1
- package/lib-amd/edit/deleteSteps/deleteList.d.ts +5 -5
- package/lib-amd/edit/deleteSteps/deleteList.js +24 -24
- package/lib-amd/edit/deleteSteps/deleteList.js.map +1 -1
- package/lib-amd/edit/deleteSteps/deleteWordSelection.d.ts +9 -9
- package/lib-amd/edit/deleteSteps/deleteWordSelection.js +172 -172
- package/lib-amd/edit/deleteSteps/deleteWordSelection.js.map +1 -1
- package/lib-amd/edit/handleKeyboardEventCommon.d.ts +14 -14
- package/lib-amd/edit/handleKeyboardEventCommon.js +55 -55
- package/lib-amd/edit/handleKeyboardEventCommon.js.map +1 -1
- package/lib-amd/edit/inputSteps/handleEnterOnList.d.ts +5 -5
- package/lib-amd/edit/inputSteps/handleEnterOnList.js +66 -66
- package/lib-amd/edit/inputSteps/handleEnterOnList.js.map +1 -1
- package/lib-amd/edit/keyboardDelete.d.ts +9 -9
- package/lib-amd/edit/keyboardDelete.js +66 -66
- package/lib-amd/edit/keyboardDelete.js.map +1 -1
- package/lib-amd/edit/keyboardInput.d.ts +5 -5
- package/lib-amd/edit/keyboardInput.js +57 -57
- package/lib-amd/edit/keyboardInput.js.map +1 -1
- package/lib-amd/edit/keyboardTab.d.ts +5 -5
- package/lib-amd/edit/keyboardTab.js +34 -34
- package/lib-amd/edit/keyboardTab.js.map +1 -1
- package/lib-amd/edit/utils/getLeafSiblingBlock.d.ts +23 -23
- package/lib-amd/edit/utils/getLeafSiblingBlock.js +75 -75
- package/lib-amd/edit/utils/getLeafSiblingBlock.js.map +1 -1
- package/lib-amd/index.d.ts +3 -3
- package/lib-amd/index.js +8 -8
- package/lib-amd/index.js.map +1 -1
- package/lib-amd/paste/Excel/processPastedContentFromExcel.d.ts +12 -12
- package/lib-amd/paste/Excel/processPastedContentFromExcel.js +80 -80
- package/lib-amd/paste/Excel/processPastedContentFromExcel.js.map +1 -1
- package/lib-amd/paste/PastePlugin.d.ts +43 -43
- package/lib-amd/paste/PastePlugin.js +122 -122
- package/lib-amd/paste/PastePlugin.js.map +1 -1
- package/lib-amd/paste/PowerPoint/processPastedContentFromPowerPoint.d.ts +7 -7
- package/lib-amd/paste/PowerPoint/processPastedContentFromPowerPoint.js +20 -20
- package/lib-amd/paste/PowerPoint/processPastedContentFromPowerPoint.js.map +1 -1
- package/lib-amd/paste/WacComponents/constants.d.ts +48 -48
- package/lib-amd/paste/WacComponents/constants.js +63 -63
- package/lib-amd/paste/WacComponents/constants.js.map +1 -1
- package/lib-amd/paste/WacComponents/processPastedContentWacComponents.d.ts +9 -9
- package/lib-amd/paste/WacComponents/processPastedContentWacComponents.js +185 -185
- package/lib-amd/paste/WacComponents/processPastedContentWacComponents.js.map +1 -1
- package/lib-amd/paste/WordDesktop/WordMetadata.d.ts +9 -9
- package/lib-amd/paste/WordDesktop/WordMetadata.js +4 -4
- package/lib-amd/paste/WordDesktop/WordMetadata.js.map +1 -1
- package/lib-amd/paste/WordDesktop/getStyleMetadata.d.ts +23 -23
- package/lib-amd/paste/WordDesktop/getStyleMetadata.js +78 -78
- package/lib-amd/paste/WordDesktop/getStyleMetadata.js.map +1 -1
- package/lib-amd/paste/WordDesktop/processPastedContentFromWordDesktop.d.ts +7 -7
- package/lib-amd/paste/WordDesktop/processPastedContentFromWordDesktop.js +53 -53
- package/lib-amd/paste/WordDesktop/processPastedContentFromWordDesktop.js.map +1 -1
- package/lib-amd/paste/WordDesktop/processWordComments.d.ts +7 -7
- package/lib-amd/paste/WordDesktop/processWordComments.js +22 -22
- package/lib-amd/paste/WordDesktop/processWordComments.js.map +1 -1
- package/lib-amd/paste/WordDesktop/processWordLists.d.ts +11 -11
- package/lib-amd/paste/WordDesktop/processWordLists.js +177 -177
- package/lib-amd/paste/WordDesktop/processWordLists.js.map +1 -1
- package/lib-amd/paste/WordDesktop/removeNegativeTextIndentParser.d.ts +5 -5
- package/lib-amd/paste/WordDesktop/removeNegativeTextIndentParser.js +15 -15
- package/lib-amd/paste/WordDesktop/removeNegativeTextIndentParser.js.map +1 -1
- package/lib-amd/paste/pasteSourceValidations/constants.d.ts +17 -17
- package/lib-amd/paste/pasteSourceValidations/constants.js +22 -22
- package/lib-amd/paste/pasteSourceValidations/constants.js.map +1 -1
- package/lib-amd/paste/pasteSourceValidations/documentContainWacElements.d.ts +8 -8
- package/lib-amd/paste/pasteSourceValidations/documentContainWacElements.js +16 -16
- package/lib-amd/paste/pasteSourceValidations/documentContainWacElements.js.map +1 -1
- package/lib-amd/paste/pasteSourceValidations/getPasteSource.d.ts +27 -27
- package/lib-amd/paste/pasteSourceValidations/getPasteSource.js +38 -38
- package/lib-amd/paste/pasteSourceValidations/getPasteSource.js.map +1 -1
- package/lib-amd/paste/pasteSourceValidations/isExcelDesktopDocument.d.ts +8 -8
- package/lib-amd/paste/pasteSourceValidations/isExcelDesktopDocument.js +18 -18
- package/lib-amd/paste/pasteSourceValidations/isExcelDesktopDocument.js.map +1 -1
- package/lib-amd/paste/pasteSourceValidations/isExcelOnlineDocument.d.ts +8 -8
- package/lib-amd/paste/pasteSourceValidations/isExcelOnlineDocument.js +20 -20
- package/lib-amd/paste/pasteSourceValidations/isExcelOnlineDocument.js.map +1 -1
- package/lib-amd/paste/pasteSourceValidations/isGoogleSheetDocument.d.ts +8 -8
- package/lib-amd/paste/pasteSourceValidations/isGoogleSheetDocument.js +16 -16
- package/lib-amd/paste/pasteSourceValidations/isGoogleSheetDocument.js.map +1 -1
- package/lib-amd/paste/pasteSourceValidations/isPowerPointDesktopDocument.d.ts +8 -8
- package/lib-amd/paste/pasteSourceValidations/isPowerPointDesktopDocument.js +16 -16
- package/lib-amd/paste/pasteSourceValidations/isPowerPointDesktopDocument.js.map +1 -1
- package/lib-amd/paste/pasteSourceValidations/isWordDesktopDocument.d.ts +8 -8
- package/lib-amd/paste/pasteSourceValidations/isWordDesktopDocument.js +20 -20
- package/lib-amd/paste/pasteSourceValidations/isWordDesktopDocument.js.map +1 -1
- package/lib-amd/paste/pasteSourceValidations/shouldConvertToSingleImage.d.ts +9 -9
- package/lib-amd/paste/pasteSourceValidations/shouldConvertToSingleImage.js +20 -20
- package/lib-amd/paste/pasteSourceValidations/shouldConvertToSingleImage.js.map +1 -1
- package/lib-amd/paste/utils/addParser.d.ts +5 -5
- package/lib-amd/paste/utils/addParser.js +18 -18
- package/lib-amd/paste/utils/addParser.js.map +1 -1
- package/lib-amd/paste/utils/deprecatedColorParser.d.ts +5 -5
- package/lib-amd/paste/utils/deprecatedColorParser.js +20 -20
- package/lib-amd/paste/utils/deprecatedColorParser.js.map +1 -1
- package/lib-amd/paste/utils/getStyles.d.ts +6 -6
- package/lib-amd/paste/utils/getStyles.js +24 -24
- package/lib-amd/paste/utils/getStyles.js.map +1 -1
- package/lib-amd/paste/utils/linkParser.d.ts +5 -5
- package/lib-amd/paste/utils/linkParser.js +28 -28
- package/lib-amd/paste/utils/linkParser.js.map +1 -1
- package/lib-amd/paste/utils/setProcessor.d.ts +5 -5
- package/lib-amd/paste/utils/setProcessor.js +15 -15
- package/lib-amd/paste/utils/setProcessor.js.map +1 -1
- package/lib-amd/pluginUtils/CreateElement/CreateElementData.d.ts +35 -35
- package/lib-amd/pluginUtils/CreateElement/CreateElementData.js +4 -4
- package/lib-amd/pluginUtils/CreateElement/CreateElementData.js.map +1 -1
- package/lib-amd/pluginUtils/CreateElement/createElement.d.ts +9 -9
- package/lib-amd/pluginUtils/CreateElement/createElement.js +51 -51
- package/lib-amd/pluginUtils/CreateElement/createElement.js.map +1 -1
- package/lib-amd/pluginUtils/Disposable.d.ts +10 -10
- package/lib-amd/pluginUtils/Disposable.js +4 -4
- package/lib-amd/pluginUtils/Disposable.js.map +1 -1
- package/lib-amd/pluginUtils/DragAndDrop/DragAndDropHandler.d.ts +45 -45
- package/lib-amd/pluginUtils/DragAndDrop/DragAndDropHandler.js +4 -4
- package/lib-amd/pluginUtils/DragAndDrop/DragAndDropHandler.js.map +1 -1
- package/lib-amd/pluginUtils/DragAndDrop/DragAndDropHelper.d.ts +39 -39
- package/lib-amd/pluginUtils/DragAndDrop/DragAndDropHelper.js +120 -120
- package/lib-amd/pluginUtils/DragAndDrop/DragAndDropHelper.js.map +1 -1
- package/lib-amd/pluginUtils/Rect/getIntersectedRect.d.ts +27 -27
- package/lib-amd/pluginUtils/Rect/getIntersectedRect.js +44 -44
- package/lib-amd/pluginUtils/Rect/getIntersectedRect.js.map +1 -1
- package/lib-amd/pluginUtils/Rect/normalizeRect.d.ts +7 -7
- package/lib-amd/pluginUtils/Rect/normalizeRect.js +21 -21
- package/lib-amd/pluginUtils/Rect/normalizeRect.js.map +1 -1
- package/lib-mjs/autoFormat/AutoFormatPlugin.d.ts +53 -53
- package/lib-mjs/autoFormat/AutoFormatPlugin.js +77 -77
- package/lib-mjs/autoFormat/AutoFormatPlugin.js.map +1 -1
- package/lib-mjs/autoFormat/keyboardListTrigger.d.ts +5 -5
- package/lib-mjs/autoFormat/keyboardListTrigger.js +41 -41
- package/lib-mjs/autoFormat/keyboardListTrigger.js.map +1 -1
- package/lib-mjs/autoFormat/utils/convertAlphaToDecimals.d.ts +7 -7
- package/lib-mjs/autoFormat/utils/convertAlphaToDecimals.js +18 -18
- package/lib-mjs/autoFormat/utils/convertAlphaToDecimals.js.map +1 -1
- package/lib-mjs/autoFormat/utils/getIndex.d.ts +4 -4
- package/lib-mjs/autoFormat/utils/getIndex.js +9 -9
- package/lib-mjs/autoFormat/utils/getIndex.js.map +1 -1
- package/lib-mjs/autoFormat/utils/getListTypeStyle.d.ts +14 -14
- package/lib-mjs/autoFormat/utils/getListTypeStyle.js +83 -83
- package/lib-mjs/autoFormat/utils/getListTypeStyle.js.map +1 -1
- package/lib-mjs/autoFormat/utils/getNumberingListStyle.d.ts +4 -4
- package/lib-mjs/autoFormat/utils/getNumberingListStyle.js +149 -149
- package/lib-mjs/autoFormat/utils/getNumberingListStyle.js.map +1 -1
- package/lib-mjs/edit/EditPlugin.d.ts +39 -39
- package/lib-mjs/edit/EditPlugin.js +125 -125
- package/lib-mjs/edit/EditPlugin.js.map +1 -1
- package/lib-mjs/edit/deleteSteps/deleteAllSegmentBefore.d.ts +5 -5
- package/lib-mjs/edit/deleteSteps/deleteAllSegmentBefore.js +18 -18
- package/lib-mjs/edit/deleteSteps/deleteAllSegmentBefore.js.map +1 -1
- package/lib-mjs/edit/deleteSteps/deleteCollapsedSelection.d.ts +9 -9
- package/lib-mjs/edit/deleteSteps/deleteCollapsedSelection.js +90 -90
- package/lib-mjs/edit/deleteSteps/deleteCollapsedSelection.js.map +1 -1
- package/lib-mjs/edit/deleteSteps/deleteList.d.ts +5 -5
- package/lib-mjs/edit/deleteSteps/deleteList.js +19 -19
- package/lib-mjs/edit/deleteSteps/deleteList.js.map +1 -1
- package/lib-mjs/edit/deleteSteps/deleteWordSelection.d.ts +9 -9
- package/lib-mjs/edit/deleteSteps/deleteWordSelection.js +170 -170
- package/lib-mjs/edit/deleteSteps/deleteWordSelection.js.map +1 -1
- package/lib-mjs/edit/handleKeyboardEventCommon.d.ts +14 -14
- package/lib-mjs/edit/handleKeyboardEventCommon.js +48 -48
- package/lib-mjs/edit/handleKeyboardEventCommon.js.map +1 -1
- package/lib-mjs/edit/inputSteps/handleEnterOnList.d.ts +5 -5
- package/lib-mjs/edit/inputSteps/handleEnterOnList.js +63 -63
- package/lib-mjs/edit/inputSteps/handleEnterOnList.js.map +1 -1
- package/lib-mjs/edit/keyboardDelete.d.ts +9 -9
- package/lib-mjs/edit/keyboardDelete.js +67 -67
- package/lib-mjs/edit/keyboardDelete.js.map +1 -1
- package/lib-mjs/edit/keyboardInput.d.ts +5 -5
- package/lib-mjs/edit/keyboardInput.js +54 -54
- package/lib-mjs/edit/keyboardInput.js.map +1 -1
- package/lib-mjs/edit/keyboardTab.d.ts +5 -5
- package/lib-mjs/edit/keyboardTab.js +30 -30
- package/lib-mjs/edit/keyboardTab.js.map +1 -1
- package/lib-mjs/edit/utils/getLeafSiblingBlock.d.ts +23 -23
- package/lib-mjs/edit/utils/getLeafSiblingBlock.js +71 -71
- package/lib-mjs/edit/utils/getLeafSiblingBlock.js.map +1 -1
- package/lib-mjs/index.d.ts +3 -3
- package/lib-mjs/index.js +3 -3
- package/lib-mjs/index.js.map +1 -1
- package/lib-mjs/paste/Excel/processPastedContentFromExcel.d.ts +12 -12
- package/lib-mjs/paste/Excel/processPastedContentFromExcel.js +77 -77
- package/lib-mjs/paste/Excel/processPastedContentFromExcel.js.map +1 -1
- package/lib-mjs/paste/PastePlugin.d.ts +43 -43
- package/lib-mjs/paste/PastePlugin.js +127 -127
- package/lib-mjs/paste/PastePlugin.js.map +1 -1
- package/lib-mjs/paste/PowerPoint/processPastedContentFromPowerPoint.d.ts +7 -7
- package/lib-mjs/paste/PowerPoint/processPastedContentFromPowerPoint.js +15 -15
- package/lib-mjs/paste/PowerPoint/processPastedContentFromPowerPoint.js.map +1 -1
- package/lib-mjs/paste/WacComponents/constants.d.ts +48 -48
- package/lib-mjs/paste/WacComponents/constants.js +59 -59
- package/lib-mjs/paste/WacComponents/constants.js.map +1 -1
- package/lib-mjs/paste/WacComponents/processPastedContentWacComponents.d.ts +9 -9
- package/lib-mjs/paste/WacComponents/processPastedContentWacComponents.js +184 -184
- package/lib-mjs/paste/WacComponents/processPastedContentWacComponents.js.map +1 -1
- package/lib-mjs/paste/WordDesktop/WordMetadata.d.ts +9 -9
- package/lib-mjs/paste/WordDesktop/WordMetadata.js +1 -1
- package/lib-mjs/paste/WordDesktop/WordMetadata.js.map +1 -1
- package/lib-mjs/paste/WordDesktop/getStyleMetadata.d.ts +23 -23
- package/lib-mjs/paste/WordDesktop/getStyleMetadata.js +75 -75
- package/lib-mjs/paste/WordDesktop/getStyleMetadata.js.map +1 -1
- package/lib-mjs/paste/WordDesktop/processPastedContentFromWordDesktop.d.ts +7 -7
- package/lib-mjs/paste/WordDesktop/processPastedContentFromWordDesktop.js +54 -54
- package/lib-mjs/paste/WordDesktop/processPastedContentFromWordDesktop.js.map +1 -1
- package/lib-mjs/paste/WordDesktop/processWordComments.d.ts +7 -7
- package/lib-mjs/paste/WordDesktop/processWordComments.js +17 -17
- package/lib-mjs/paste/WordDesktop/processWordComments.js.map +1 -1
- package/lib-mjs/paste/WordDesktop/processWordLists.d.ts +11 -11
- package/lib-mjs/paste/WordDesktop/processWordLists.js +175 -175
- package/lib-mjs/paste/WordDesktop/processWordLists.js.map +1 -1
- package/lib-mjs/paste/WordDesktop/removeNegativeTextIndentParser.d.ts +5 -5
- package/lib-mjs/paste/WordDesktop/removeNegativeTextIndentParser.js +9 -9
- package/lib-mjs/paste/WordDesktop/removeNegativeTextIndentParser.js.map +1 -1
- package/lib-mjs/paste/pasteSourceValidations/constants.d.ts +17 -17
- package/lib-mjs/paste/pasteSourceValidations/constants.js +17 -17
- package/lib-mjs/paste/pasteSourceValidations/constants.js.map +1 -1
- package/lib-mjs/paste/pasteSourceValidations/documentContainWacElements.d.ts +8 -8
- package/lib-mjs/paste/pasteSourceValidations/documentContainWacElements.js +11 -11
- package/lib-mjs/paste/pasteSourceValidations/documentContainWacElements.js.map +1 -1
- package/lib-mjs/paste/pasteSourceValidations/getPasteSource.d.ts +27 -27
- package/lib-mjs/paste/pasteSourceValidations/getPasteSource.js +39 -39
- package/lib-mjs/paste/pasteSourceValidations/getPasteSource.js.map +1 -1
- package/lib-mjs/paste/pasteSourceValidations/isExcelDesktopDocument.d.ts +8 -8
- package/lib-mjs/paste/pasteSourceValidations/isExcelDesktopDocument.js +13 -13
- package/lib-mjs/paste/pasteSourceValidations/isExcelDesktopDocument.js.map +1 -1
- package/lib-mjs/paste/pasteSourceValidations/isExcelOnlineDocument.d.ts +8 -8
- package/lib-mjs/paste/pasteSourceValidations/isExcelOnlineDocument.js +15 -15
- package/lib-mjs/paste/pasteSourceValidations/isExcelOnlineDocument.js.map +1 -1
- package/lib-mjs/paste/pasteSourceValidations/isGoogleSheetDocument.d.ts +8 -8
- package/lib-mjs/paste/pasteSourceValidations/isGoogleSheetDocument.js +11 -11
- package/lib-mjs/paste/pasteSourceValidations/isGoogleSheetDocument.js.map +1 -1
- package/lib-mjs/paste/pasteSourceValidations/isPowerPointDesktopDocument.d.ts +8 -8
- package/lib-mjs/paste/pasteSourceValidations/isPowerPointDesktopDocument.js +11 -11
- package/lib-mjs/paste/pasteSourceValidations/isPowerPointDesktopDocument.js.map +1 -1
- package/lib-mjs/paste/pasteSourceValidations/isWordDesktopDocument.d.ts +8 -8
- package/lib-mjs/paste/pasteSourceValidations/isWordDesktopDocument.js +15 -15
- package/lib-mjs/paste/pasteSourceValidations/isWordDesktopDocument.js.map +1 -1
- package/lib-mjs/paste/pasteSourceValidations/shouldConvertToSingleImage.d.ts +9 -9
- package/lib-mjs/paste/pasteSourceValidations/shouldConvertToSingleImage.js +14 -14
- package/lib-mjs/paste/pasteSourceValidations/shouldConvertToSingleImage.js.map +1 -1
- package/lib-mjs/paste/utils/addParser.d.ts +5 -5
- package/lib-mjs/paste/utils/addParser.js +13 -13
- package/lib-mjs/paste/utils/addParser.js.map +1 -1
- package/lib-mjs/paste/utils/deprecatedColorParser.d.ts +5 -5
- package/lib-mjs/paste/utils/deprecatedColorParser.js +15 -15
- package/lib-mjs/paste/utils/deprecatedColorParser.js.map +1 -1
- package/lib-mjs/paste/utils/getStyles.d.ts +6 -6
- package/lib-mjs/paste/utils/getStyles.js +18 -18
- package/lib-mjs/paste/utils/getStyles.js.map +1 -1
- package/lib-mjs/paste/utils/linkParser.d.ts +5 -5
- package/lib-mjs/paste/utils/linkParser.js +23 -23
- package/lib-mjs/paste/utils/linkParser.js.map +1 -1
- package/lib-mjs/paste/utils/setProcessor.d.ts +5 -5
- package/lib-mjs/paste/utils/setProcessor.js +9 -9
- package/lib-mjs/paste/utils/setProcessor.js.map +1 -1
- package/lib-mjs/pluginUtils/CreateElement/CreateElementData.d.ts +35 -35
- package/lib-mjs/pluginUtils/CreateElement/CreateElementData.js +1 -1
- package/lib-mjs/pluginUtils/CreateElement/CreateElementData.js.map +1 -1
- package/lib-mjs/pluginUtils/CreateElement/createElement.d.ts +9 -9
- package/lib-mjs/pluginUtils/CreateElement/createElement.js +47 -47
- package/lib-mjs/pluginUtils/CreateElement/createElement.js.map +1 -1
- package/lib-mjs/pluginUtils/Disposable.d.ts +10 -10
- package/lib-mjs/pluginUtils/Disposable.js +1 -1
- package/lib-mjs/pluginUtils/Disposable.js.map +1 -1
- package/lib-mjs/pluginUtils/DragAndDrop/DragAndDropHandler.d.ts +45 -45
- package/lib-mjs/pluginUtils/DragAndDrop/DragAndDropHandler.js +1 -1
- package/lib-mjs/pluginUtils/DragAndDrop/DragAndDropHandler.js.map +1 -1
- package/lib-mjs/pluginUtils/DragAndDrop/DragAndDropHelper.d.ts +39 -39
- package/lib-mjs/pluginUtils/DragAndDrop/DragAndDropHelper.js +117 -117
- package/lib-mjs/pluginUtils/DragAndDrop/DragAndDropHelper.js.map +1 -1
- package/lib-mjs/pluginUtils/Rect/getIntersectedRect.d.ts +27 -27
- package/lib-mjs/pluginUtils/Rect/getIntersectedRect.js +41 -41
- package/lib-mjs/pluginUtils/Rect/getIntersectedRect.js.map +1 -1
- package/lib-mjs/pluginUtils/Rect/normalizeRect.d.ts +7 -7
- package/lib-mjs/pluginUtils/Rect/normalizeRect.js +16 -16
- package/lib-mjs/pluginUtils/Rect/normalizeRect.js.map +1 -1
- package/package.json +5 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"documentContainWacElements.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-plugins/lib/paste/pasteSourceValidations/documentContainWacElements.ts"],"names":[],"mappings":";;;;IAGA;;;;;OAKG;IACI,IAAM,0BAA0B,GAAsB,UAAA,KAAK;QACtD,IAAA,QAAQ,GAAK,KAAK,SAAV,CAAW;QAC3B,OAAO,CAAC,CAAC,QAAQ,CAAC,aAAa,CAAC,iCAAqB,CAAC,CAAC;IAC3D,CAAC,CAAC;IAHW,QAAA,0BAA0B,8BAGrC","sourcesContent":["import { WAC_IDENTIFY_SELECTOR } from '../WacComponents/constants';\
|
|
1
|
+
{"version":3,"file":"documentContainWacElements.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-plugins/lib/paste/pasteSourceValidations/documentContainWacElements.ts"],"names":[],"mappings":";;;;IAGA;;;;;OAKG;IACI,IAAM,0BAA0B,GAAsB,UAAA,KAAK;QACtD,IAAA,QAAQ,GAAK,KAAK,SAAV,CAAW;QAC3B,OAAO,CAAC,CAAC,QAAQ,CAAC,aAAa,CAAC,iCAAqB,CAAC,CAAC;IAC3D,CAAC,CAAC;IAHW,QAAA,0BAA0B,8BAGrC","sourcesContent":["import { WAC_IDENTIFY_SELECTOR } from '../WacComponents/constants';\nimport type { GetSourceFunction } from './getPasteSource';\n\n/**\n * @internal\n * Check whether the fragment provided contain Wac Elements\n * @param props Properties related to the PasteEvent\n * @returns\n */\nexport const documentContainWacElements: GetSourceFunction = props => {\n const { fragment } = props;\n return !!fragment.querySelector(WAC_IDENTIFY_SELECTOR);\n};\n"]}
|
|
@@ -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,39 +1,39 @@
|
|
|
1
|
-
define(["require", "exports", "./documentContainWacElements", "./isExcelDesktopDocument", "./isExcelOnlineDocument", "./isGoogleSheetDocument", "./isPowerPointDesktopDocument", "./isWordDesktopDocument", "./shouldConvertToSingleImage"], function (require, exports, documentContainWacElements_1, isExcelDesktopDocument_1, isExcelOnlineDocument_1, isGoogleSheetDocument_1, isPowerPointDesktopDocument_1, isWordDesktopDocument_1, shouldConvertToSingleImage_1) {
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.getPasteSource = void 0;
|
|
5
|
-
var getSourceFunctions = new Map([
|
|
6
|
-
['wordDesktop', isWordDesktopDocument_1.isWordDesktopDocument],
|
|
7
|
-
['excelDesktop', isExcelDesktopDocument_1.isExcelDesktopDocument],
|
|
8
|
-
['excelOnline', isExcelOnlineDocument_1.isExcelOnlineDocument],
|
|
9
|
-
['powerPointDesktop', isPowerPointDesktopDocument_1.isPowerPointDesktopDocument],
|
|
10
|
-
['wacComponents', documentContainWacElements_1.documentContainWacElements],
|
|
11
|
-
['googleSheets', isGoogleSheetDocument_1.isGoogleSheetDocument],
|
|
12
|
-
['singleImage', shouldConvertToSingleImage_1.shouldConvertToSingleImage],
|
|
13
|
-
]);
|
|
14
|
-
/**
|
|
15
|
-
* @internal
|
|
16
|
-
* This function tries to get the source of the Pasted content
|
|
17
|
-
* @param event the before paste event
|
|
18
|
-
* @param shouldConvertSingleImage Whether convert single image is enabled.
|
|
19
|
-
* @returns The Type of pasted content, if no type found will return {KnownSourceType.Default}
|
|
20
|
-
*/
|
|
21
|
-
function getPasteSource(event, shouldConvertSingleImage) {
|
|
22
|
-
var htmlAttributes = event.htmlAttributes, clipboardData = event.clipboardData, fragment = event.fragment;
|
|
23
|
-
var result = null;
|
|
24
|
-
var param = {
|
|
25
|
-
htmlAttributes: htmlAttributes,
|
|
26
|
-
fragment: fragment,
|
|
27
|
-
shouldConvertSingleImage: shouldConvertSingleImage,
|
|
28
|
-
clipboardData: clipboardData,
|
|
29
|
-
};
|
|
30
|
-
getSourceFunctions.forEach(function (func, key) {
|
|
31
|
-
if (!result && func(param)) {
|
|
32
|
-
result = key;
|
|
33
|
-
}
|
|
34
|
-
});
|
|
35
|
-
return result !== null && result !== void 0 ? result : 'default';
|
|
36
|
-
}
|
|
37
|
-
exports.getPasteSource = getPasteSource;
|
|
38
|
-
});
|
|
1
|
+
define(["require", "exports", "./documentContainWacElements", "./isExcelDesktopDocument", "./isExcelOnlineDocument", "./isGoogleSheetDocument", "./isPowerPointDesktopDocument", "./isWordDesktopDocument", "./shouldConvertToSingleImage"], function (require, exports, documentContainWacElements_1, isExcelDesktopDocument_1, isExcelOnlineDocument_1, isGoogleSheetDocument_1, isPowerPointDesktopDocument_1, isWordDesktopDocument_1, shouldConvertToSingleImage_1) {
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.getPasteSource = void 0;
|
|
5
|
+
var getSourceFunctions = new Map([
|
|
6
|
+
['wordDesktop', isWordDesktopDocument_1.isWordDesktopDocument],
|
|
7
|
+
['excelDesktop', isExcelDesktopDocument_1.isExcelDesktopDocument],
|
|
8
|
+
['excelOnline', isExcelOnlineDocument_1.isExcelOnlineDocument],
|
|
9
|
+
['powerPointDesktop', isPowerPointDesktopDocument_1.isPowerPointDesktopDocument],
|
|
10
|
+
['wacComponents', documentContainWacElements_1.documentContainWacElements],
|
|
11
|
+
['googleSheets', isGoogleSheetDocument_1.isGoogleSheetDocument],
|
|
12
|
+
['singleImage', shouldConvertToSingleImage_1.shouldConvertToSingleImage],
|
|
13
|
+
]);
|
|
14
|
+
/**
|
|
15
|
+
* @internal
|
|
16
|
+
* This function tries to get the source of the Pasted content
|
|
17
|
+
* @param event the before paste event
|
|
18
|
+
* @param shouldConvertSingleImage Whether convert single image is enabled.
|
|
19
|
+
* @returns The Type of pasted content, if no type found will return {KnownSourceType.Default}
|
|
20
|
+
*/
|
|
21
|
+
function getPasteSource(event, shouldConvertSingleImage) {
|
|
22
|
+
var htmlAttributes = event.htmlAttributes, clipboardData = event.clipboardData, fragment = event.fragment;
|
|
23
|
+
var result = null;
|
|
24
|
+
var param = {
|
|
25
|
+
htmlAttributes: htmlAttributes,
|
|
26
|
+
fragment: fragment,
|
|
27
|
+
shouldConvertSingleImage: shouldConvertSingleImage,
|
|
28
|
+
clipboardData: clipboardData,
|
|
29
|
+
};
|
|
30
|
+
getSourceFunctions.forEach(function (func, key) {
|
|
31
|
+
if (!result && func(param)) {
|
|
32
|
+
result = key;
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
return result !== null && result !== void 0 ? result : 'default';
|
|
36
|
+
}
|
|
37
|
+
exports.getPasteSource = getPasteSource;
|
|
38
|
+
});
|
|
39
39
|
//# 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":";;;;IAsCA,IAAM,kBAAkB,GAAG,IAAI,GAAG,CAA0C;QACxE,CAAC,aAAa,EAAE,6CAAqB,CAAC;QACtC,CAAC,cAAc,EAAE,+CAAsB,CAAC;QACxC,CAAC,aAAa,EAAE,6CAAqB,CAAC;QACtC,CAAC,mBAAmB,EAAE,yDAA2B,CAAC;QAClD,CAAC,eAAe,EAAE,uDAA0B,CAAC;QAC7C,CAAC,cAAc,EAAE,6CAAqB,CAAC;QACvC,CAAC,aAAa,EAAE,uDAA0B,CAAC;KAC9C,CAAC,CAAC;IAEH;;;;;;OAMG;IACH,SAAgB,cAAc,CAC1B,KAAuB,EACvB,wBAAiC;QAEzB,IAAA,cAAc,GAA8B,KAAK,eAAnC,EAAE,aAAa,GAAe,KAAK,cAApB,EAAE,QAAQ,GAAK,KAAK,SAAV,CAAW;QAE1D,IAAI,MAAM,GAAgC,IAAI,CAAC;QAC/C,IAAM,KAAK,GAAyB;YAChC,cAAc,gBAAA;YACd,QAAQ,UAAA;YACR,wBAAwB,0BAAA;YACxB,aAAa,eAAA;SAChB,CAAC;QAEF,kBAAkB,CAAC,OAAO,CAAC,UAAC,IAAI,EAAE,GAAG;YACjC,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,KAAK,CAAC,EAAE;gBACxB,MAAM,GAAG,GAAG,CAAC;aAChB;QACL,CAAC,CAAC,CAAC;QAEH,OAAO,MAAM,aAAN,MAAM,cAAN,MAAM,GAAI,SAAS,CAAC;IAC/B,CAAC;IArBD,wCAqBC","sourcesContent":["import { documentContainWacElements } from './documentContainWacElements';\
|
|
1
|
+
{"version":3,"file":"getPasteSource.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-plugins/lib/paste/pasteSourceValidations/getPasteSource.ts"],"names":[],"mappings":";;;;IAsCA,IAAM,kBAAkB,GAAG,IAAI,GAAG,CAA0C;QACxE,CAAC,aAAa,EAAE,6CAAqB,CAAC;QACtC,CAAC,cAAc,EAAE,+CAAsB,CAAC;QACxC,CAAC,aAAa,EAAE,6CAAqB,CAAC;QACtC,CAAC,mBAAmB,EAAE,yDAA2B,CAAC;QAClD,CAAC,eAAe,EAAE,uDAA0B,CAAC;QAC7C,CAAC,cAAc,EAAE,6CAAqB,CAAC;QACvC,CAAC,aAAa,EAAE,uDAA0B,CAAC;KAC9C,CAAC,CAAC;IAEH;;;;;;OAMG;IACH,SAAgB,cAAc,CAC1B,KAAuB,EACvB,wBAAiC;QAEzB,IAAA,cAAc,GAA8B,KAAK,eAAnC,EAAE,aAAa,GAAe,KAAK,cAApB,EAAE,QAAQ,GAAK,KAAK,SAAV,CAAW;QAE1D,IAAI,MAAM,GAAgC,IAAI,CAAC;QAC/C,IAAM,KAAK,GAAyB;YAChC,cAAc,gBAAA;YACd,QAAQ,UAAA;YACR,wBAAwB,0BAAA;YACxB,aAAa,eAAA;SAChB,CAAC;QAEF,kBAAkB,CAAC,OAAO,CAAC,UAAC,IAAI,EAAE,GAAG;YACjC,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,KAAK,CAAC,EAAE;gBACxB,MAAM,GAAG,GAAG,CAAC;aAChB;QACL,CAAC,CAAC,CAAC;QAEH,OAAO,MAAM,aAAN,MAAM,cAAN,MAAM,GAAI,SAAS,CAAC;IAC/B,CAAC;IArBD,wCAqBC","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,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,19 +1,19 @@
|
|
|
1
|
-
define(["require", "exports", "./constants"], function (require, exports, constants_1) {
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.isExcelDesktopDocument = void 0;
|
|
5
|
-
var EXCEL_ATTRIBUTE_VALUE = 'urn:schemas-microsoft-com:office:excel';
|
|
6
|
-
/**
|
|
7
|
-
* @internal
|
|
8
|
-
* Checks whether the Array provided contains strings that identify Excel Desktop documents
|
|
9
|
-
* @param props Properties related to the PasteEvent
|
|
10
|
-
* @returns
|
|
11
|
-
*/
|
|
12
|
-
var isExcelDesktopDocument = function (props) {
|
|
13
|
-
var htmlAttributes = props.htmlAttributes;
|
|
14
|
-
// The presence of this attribute confirms its origin from Excel Desktop
|
|
15
|
-
return htmlAttributes[constants_1.PastePropertyNames.EXCEL_DESKTOP_ATTRIBUTE_NAME] == EXCEL_ATTRIBUTE_VALUE;
|
|
16
|
-
};
|
|
17
|
-
exports.isExcelDesktopDocument = isExcelDesktopDocument;
|
|
18
|
-
});
|
|
1
|
+
define(["require", "exports", "./constants"], function (require, exports, constants_1) {
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.isExcelDesktopDocument = void 0;
|
|
5
|
+
var EXCEL_ATTRIBUTE_VALUE = 'urn:schemas-microsoft-com:office:excel';
|
|
6
|
+
/**
|
|
7
|
+
* @internal
|
|
8
|
+
* Checks whether the Array provided contains strings that identify Excel Desktop documents
|
|
9
|
+
* @param props Properties related to the PasteEvent
|
|
10
|
+
* @returns
|
|
11
|
+
*/
|
|
12
|
+
var isExcelDesktopDocument = function (props) {
|
|
13
|
+
var htmlAttributes = props.htmlAttributes;
|
|
14
|
+
// The presence of this attribute confirms its origin from Excel Desktop
|
|
15
|
+
return htmlAttributes[constants_1.PastePropertyNames.EXCEL_DESKTOP_ATTRIBUTE_NAME] == EXCEL_ATTRIBUTE_VALUE;
|
|
16
|
+
};
|
|
17
|
+
exports.isExcelDesktopDocument = isExcelDesktopDocument;
|
|
18
|
+
});
|
|
19
19
|
//# 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":";;;;IAGA,IAAM,qBAAqB,GAAG,wCAAwC,CAAC;IAEvE;;;;;OAKG;IACI,IAAM,sBAAsB,GAAsB,UAAA,KAAK;QAClD,IAAA,cAAc,GAAK,KAAK,eAAV,CAAW;QACjC,wEAAwE;QACxE,OAAO,cAAc,CAAC,8BAAkB,CAAC,4BAA4B,CAAC,IAAI,qBAAqB,CAAC;IACpG,CAAC,CAAC;IAJW,QAAA,sBAAsB,0BAIjC","sourcesContent":["import { PastePropertyNames } from './constants';\
|
|
1
|
+
{"version":3,"file":"isExcelDesktopDocument.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-plugins/lib/paste/pasteSourceValidations/isExcelDesktopDocument.ts"],"names":[],"mappings":";;;;IAGA,IAAM,qBAAqB,GAAG,wCAAwC,CAAC;IAEvE;;;;;OAKG;IACI,IAAM,sBAAsB,GAAsB,UAAA,KAAK;QAClD,IAAA,cAAc,GAAK,KAAK,eAAV,CAAW;QACjC,wEAAwE;QACxE,OAAO,cAAc,CAAC,8BAAkB,CAAC,4BAA4B,CAAC,IAAI,qBAAqB,CAAC;IACpG,CAAC,CAAC;IAJW,QAAA,sBAAsB,0BAIjC","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,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,21 +1,21 @@
|
|
|
1
|
-
define(["require", "exports", "./constants"], function (require, exports, constants_1) {
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.isExcelOnlineDocument = void 0;
|
|
5
|
-
// Excel Desktop also has this attribute
|
|
6
|
-
var EXCEL_ONLINE_ATTRIBUTE_VALUE = 'Excel.Sheet';
|
|
7
|
-
/**
|
|
8
|
-
* @internal
|
|
9
|
-
* Checks whether the Array provided contains strings that identify Excel Online documents
|
|
10
|
-
* @param props Properties related to the PasteEvent
|
|
11
|
-
* @returns
|
|
12
|
-
*/
|
|
13
|
-
var isExcelOnlineDocument = function (props) {
|
|
14
|
-
var htmlAttributes = props.htmlAttributes;
|
|
15
|
-
// The presence of Excel.Sheet confirms its origin from Excel, the absence of EXCEL_DESKTOP_ATTRIBUTE_NAME confirms it is from the Online version
|
|
16
|
-
return (htmlAttributes[constants_1.PastePropertyNames.PROG_ID_NAME] == EXCEL_ONLINE_ATTRIBUTE_VALUE &&
|
|
17
|
-
htmlAttributes[constants_1.PastePropertyNames.EXCEL_DESKTOP_ATTRIBUTE_NAME] == undefined);
|
|
18
|
-
};
|
|
19
|
-
exports.isExcelOnlineDocument = isExcelOnlineDocument;
|
|
20
|
-
});
|
|
1
|
+
define(["require", "exports", "./constants"], function (require, exports, constants_1) {
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.isExcelOnlineDocument = void 0;
|
|
5
|
+
// Excel Desktop also has this attribute
|
|
6
|
+
var EXCEL_ONLINE_ATTRIBUTE_VALUE = 'Excel.Sheet';
|
|
7
|
+
/**
|
|
8
|
+
* @internal
|
|
9
|
+
* Checks whether the Array provided contains strings that identify Excel Online documents
|
|
10
|
+
* @param props Properties related to the PasteEvent
|
|
11
|
+
* @returns
|
|
12
|
+
*/
|
|
13
|
+
var isExcelOnlineDocument = function (props) {
|
|
14
|
+
var htmlAttributes = props.htmlAttributes;
|
|
15
|
+
// The presence of Excel.Sheet confirms its origin from Excel, the absence of EXCEL_DESKTOP_ATTRIBUTE_NAME confirms it is from the Online version
|
|
16
|
+
return (htmlAttributes[constants_1.PastePropertyNames.PROG_ID_NAME] == EXCEL_ONLINE_ATTRIBUTE_VALUE &&
|
|
17
|
+
htmlAttributes[constants_1.PastePropertyNames.EXCEL_DESKTOP_ATTRIBUTE_NAME] == undefined);
|
|
18
|
+
};
|
|
19
|
+
exports.isExcelOnlineDocument = isExcelOnlineDocument;
|
|
20
|
+
});
|
|
21
21
|
//# 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":";;;;IAGA,wCAAwC;IACxC,IAAM,4BAA4B,GAAG,aAAa,CAAC;IAEnD;;;;;OAKG;IACI,IAAM,qBAAqB,GAAsB,UAAA,KAAK;QACjD,IAAA,cAAc,GAAK,KAAK,eAAV,CAAW;QACjC,iJAAiJ;QACjJ,OAAO,CACH,cAAc,CAAC,8BAAkB,CAAC,YAAY,CAAC,IAAI,4BAA4B;YAC/E,cAAc,CAAC,8BAAkB,CAAC,4BAA4B,CAAC,IAAI,SAAS,CAC/E,CAAC;IACN,CAAC,CAAC;IAPW,QAAA,qBAAqB,yBAOhC","sourcesContent":["import { PastePropertyNames } from './constants';\
|
|
1
|
+
{"version":3,"file":"isExcelOnlineDocument.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-plugins/lib/paste/pasteSourceValidations/isExcelOnlineDocument.ts"],"names":[],"mappings":";;;;IAGA,wCAAwC;IACxC,IAAM,4BAA4B,GAAG,aAAa,CAAC;IAEnD;;;;;OAKG;IACI,IAAM,qBAAqB,GAAsB,UAAA,KAAK;QACjD,IAAA,cAAc,GAAK,KAAK,eAAV,CAAW;QACjC,iJAAiJ;QACjJ,OAAO,CACH,cAAc,CAAC,8BAAkB,CAAC,YAAY,CAAC,IAAI,4BAA4B;YAC/E,cAAc,CAAC,8BAAkB,CAAC,4BAA4B,CAAC,IAAI,SAAS,CAC/E,CAAC;IACN,CAAC,CAAC;IAPW,QAAA,qBAAqB,yBAOhC","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,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,17 +1,17 @@
|
|
|
1
|
-
define(["require", "exports", "./constants"], function (require, exports, constants_1) {
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.isGoogleSheetDocument = void 0;
|
|
5
|
-
/**
|
|
6
|
-
* @internal
|
|
7
|
-
* Checks whether the fragment provided contain elements from Google sheets
|
|
8
|
-
* @param props Properties related to the PasteEvent
|
|
9
|
-
* @returns
|
|
10
|
-
*/
|
|
11
|
-
var isGoogleSheetDocument = function (props) {
|
|
12
|
-
var fragment = props.fragment;
|
|
13
|
-
return !!fragment.querySelector(constants_1.PastePropertyNames.GOOGLE_SHEET_NODE_NAME);
|
|
14
|
-
};
|
|
15
|
-
exports.isGoogleSheetDocument = isGoogleSheetDocument;
|
|
16
|
-
});
|
|
1
|
+
define(["require", "exports", "./constants"], function (require, exports, constants_1) {
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.isGoogleSheetDocument = void 0;
|
|
5
|
+
/**
|
|
6
|
+
* @internal
|
|
7
|
+
* Checks whether the fragment provided contain elements from Google sheets
|
|
8
|
+
* @param props Properties related to the PasteEvent
|
|
9
|
+
* @returns
|
|
10
|
+
*/
|
|
11
|
+
var isGoogleSheetDocument = function (props) {
|
|
12
|
+
var fragment = props.fragment;
|
|
13
|
+
return !!fragment.querySelector(constants_1.PastePropertyNames.GOOGLE_SHEET_NODE_NAME);
|
|
14
|
+
};
|
|
15
|
+
exports.isGoogleSheetDocument = isGoogleSheetDocument;
|
|
16
|
+
});
|
|
17
17
|
//# 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":";;;;IAGA;;;;;OAKG;IACI,IAAM,qBAAqB,GAAsB,UAAA,KAAK;QACjD,IAAA,QAAQ,GAAK,KAAK,SAAV,CAAW;QAC3B,OAAO,CAAC,CAAC,QAAQ,CAAC,aAAa,CAAC,8BAAkB,CAAC,sBAAsB,CAAC,CAAC;IAC/E,CAAC,CAAC;IAHW,QAAA,qBAAqB,yBAGhC","sourcesContent":["import { PastePropertyNames } from './constants';\
|
|
1
|
+
{"version":3,"file":"isGoogleSheetDocument.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-plugins/lib/paste/pasteSourceValidations/isGoogleSheetDocument.ts"],"names":[],"mappings":";;;;IAGA;;;;;OAKG;IACI,IAAM,qBAAqB,GAAsB,UAAA,KAAK;QACjD,IAAA,QAAQ,GAAK,KAAK,SAAV,CAAW;QAC3B,OAAO,CAAC,CAAC,QAAQ,CAAC,aAAa,CAAC,8BAAkB,CAAC,sBAAsB,CAAC,CAAC;IAC/E,CAAC,CAAC;IAHW,QAAA,qBAAqB,yBAGhC","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,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,17 +1,17 @@
|
|
|
1
|
-
define(["require", "exports", "./constants"], function (require, exports, constants_1) {
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.isPowerPointDesktopDocument = void 0;
|
|
5
|
-
var POWERPOINT_ATTRIBUTE_VALUE = 'PowerPoint.Slide';
|
|
6
|
-
/**
|
|
7
|
-
* @internal
|
|
8
|
-
* Checks whether the Array provided contains strings that identify Power Point Desktop documents
|
|
9
|
-
* @param props Properties related to the PasteEvent
|
|
10
|
-
* @returns
|
|
11
|
-
*/
|
|
12
|
-
var isPowerPointDesktopDocument = function (props) {
|
|
13
|
-
return props.htmlAttributes[constants_1.PastePropertyNames.PROG_ID_NAME] == POWERPOINT_ATTRIBUTE_VALUE;
|
|
14
|
-
};
|
|
15
|
-
exports.isPowerPointDesktopDocument = isPowerPointDesktopDocument;
|
|
16
|
-
});
|
|
1
|
+
define(["require", "exports", "./constants"], function (require, exports, constants_1) {
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.isPowerPointDesktopDocument = void 0;
|
|
5
|
+
var POWERPOINT_ATTRIBUTE_VALUE = 'PowerPoint.Slide';
|
|
6
|
+
/**
|
|
7
|
+
* @internal
|
|
8
|
+
* Checks whether the Array provided contains strings that identify Power Point Desktop documents
|
|
9
|
+
* @param props Properties related to the PasteEvent
|
|
10
|
+
* @returns
|
|
11
|
+
*/
|
|
12
|
+
var isPowerPointDesktopDocument = function (props) {
|
|
13
|
+
return props.htmlAttributes[constants_1.PastePropertyNames.PROG_ID_NAME] == POWERPOINT_ATTRIBUTE_VALUE;
|
|
14
|
+
};
|
|
15
|
+
exports.isPowerPointDesktopDocument = isPowerPointDesktopDocument;
|
|
16
|
+
});
|
|
17
17
|
//# 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":";;;;IAGA,IAAM,0BAA0B,GAAG,kBAAkB,CAAC;IAEtD;;;;;OAKG;IACI,IAAM,2BAA2B,GAAsB,UAAA,KAAK;QAC/D,OAAO,KAAK,CAAC,cAAc,CAAC,8BAAkB,CAAC,YAAY,CAAC,IAAI,0BAA0B,CAAC;IAC/F,CAAC,CAAC;IAFW,QAAA,2BAA2B,+BAEtC","sourcesContent":["import { PastePropertyNames } from './constants';\
|
|
1
|
+
{"version":3,"file":"isPowerPointDesktopDocument.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-plugins/lib/paste/pasteSourceValidations/isPowerPointDesktopDocument.ts"],"names":[],"mappings":";;;;IAGA,IAAM,0BAA0B,GAAG,kBAAkB,CAAC;IAEtD;;;;;OAKG;IACI,IAAM,2BAA2B,GAAsB,UAAA,KAAK;QAC/D,OAAO,KAAK,CAAC,cAAc,CAAC,8BAAkB,CAAC,YAAY,CAAC,IAAI,0BAA0B,CAAC;IAC/F,CAAC,CAAC;IAFW,QAAA,2BAA2B,+BAEtC","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,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,21 +1,21 @@
|
|
|
1
|
-
define(["require", "exports", "./constants"], function (require, exports, constants_1) {
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.isWordDesktopDocument = void 0;
|
|
5
|
-
var WORD_ATTRIBUTE_NAME = 'xmlns:w';
|
|
6
|
-
var WORD_ATTRIBUTE_VALUE = 'urn:schemas-microsoft-com:office:word';
|
|
7
|
-
var WORD_PROG_ID = 'Word.Document';
|
|
8
|
-
/**
|
|
9
|
-
* @internal
|
|
10
|
-
* Checks whether the Array provided contains strings that identify Word Desktop documents
|
|
11
|
-
* @param props Properties related to the PasteEvent
|
|
12
|
-
* @returns
|
|
13
|
-
*/
|
|
14
|
-
var isWordDesktopDocument = function (props) {
|
|
15
|
-
var htmlAttributes = props.htmlAttributes;
|
|
16
|
-
return (htmlAttributes[WORD_ATTRIBUTE_NAME] == WORD_ATTRIBUTE_VALUE ||
|
|
17
|
-
htmlAttributes[constants_1.PastePropertyNames.PROG_ID_NAME] == WORD_PROG_ID);
|
|
18
|
-
};
|
|
19
|
-
exports.isWordDesktopDocument = isWordDesktopDocument;
|
|
20
|
-
});
|
|
1
|
+
define(["require", "exports", "./constants"], function (require, exports, constants_1) {
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.isWordDesktopDocument = void 0;
|
|
5
|
+
var WORD_ATTRIBUTE_NAME = 'xmlns:w';
|
|
6
|
+
var WORD_ATTRIBUTE_VALUE = 'urn:schemas-microsoft-com:office:word';
|
|
7
|
+
var WORD_PROG_ID = 'Word.Document';
|
|
8
|
+
/**
|
|
9
|
+
* @internal
|
|
10
|
+
* Checks whether the Array provided contains strings that identify Word Desktop documents
|
|
11
|
+
* @param props Properties related to the PasteEvent
|
|
12
|
+
* @returns
|
|
13
|
+
*/
|
|
14
|
+
var isWordDesktopDocument = function (props) {
|
|
15
|
+
var htmlAttributes = props.htmlAttributes;
|
|
16
|
+
return (htmlAttributes[WORD_ATTRIBUTE_NAME] == WORD_ATTRIBUTE_VALUE ||
|
|
17
|
+
htmlAttributes[constants_1.PastePropertyNames.PROG_ID_NAME] == WORD_PROG_ID);
|
|
18
|
+
};
|
|
19
|
+
exports.isWordDesktopDocument = isWordDesktopDocument;
|
|
20
|
+
});
|
|
21
21
|
//# 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":";;;;IAGA,IAAM,mBAAmB,GAAG,SAAS,CAAC;IACtC,IAAM,oBAAoB,GAAG,uCAAuC,CAAC;IACrE,IAAM,YAAY,GAAG,eAAe,CAAC;IAErC;;;;;OAKG;IACI,IAAM,qBAAqB,GAAsB,UAAA,KAAK;QACjD,IAAA,cAAc,GAAK,KAAK,eAAV,CAAW;QACjC,OAAO,CACH,cAAc,CAAC,mBAAmB,CAAC,IAAI,oBAAoB;YAC3D,cAAc,CAAC,8BAAkB,CAAC,YAAY,CAAC,IAAI,YAAY,CAClE,CAAC;IACN,CAAC,CAAC;IANW,QAAA,qBAAqB,yBAMhC","sourcesContent":["import { PastePropertyNames } from './constants';\
|
|
1
|
+
{"version":3,"file":"isWordDesktopDocument.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-plugins/lib/paste/pasteSourceValidations/isWordDesktopDocument.ts"],"names":[],"mappings":";;;;IAGA,IAAM,mBAAmB,GAAG,SAAS,CAAC;IACtC,IAAM,oBAAoB,GAAG,uCAAuC,CAAC;IACrE,IAAM,YAAY,GAAG,eAAe,CAAC;IAErC;;;;;OAKG;IACI,IAAM,qBAAqB,GAAsB,UAAA,KAAK;QACjD,IAAA,cAAc,GAAK,KAAK,eAAV,CAAW;QACjC,OAAO,CACH,cAAc,CAAC,mBAAmB,CAAC,IAAI,oBAAoB;YAC3D,cAAc,CAAC,8BAAkB,CAAC,YAAY,CAAC,IAAI,YAAY,CAClE,CAAC;IACN,CAAC,CAAC;IANW,QAAA,qBAAqB,yBAMhC","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,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,21 +1,21 @@
|
|
|
1
|
-
define(["require", "exports"], function (require, exports) {
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.shouldConvertToSingleImage = void 0;
|
|
5
|
-
/**
|
|
6
|
-
* @internal
|
|
7
|
-
* Checks whether the fragment only contains a single image to paste
|
|
8
|
-
* and the editor have the ConvertSingleImageBody Experimental feature
|
|
9
|
-
* @param props Properties related to the PasteEvent
|
|
10
|
-
* @returns
|
|
11
|
-
*/
|
|
12
|
-
var shouldConvertToSingleImage = function (props) {
|
|
13
|
-
var _a;
|
|
14
|
-
var shouldConvertSingleImage = props.shouldConvertSingleImage, clipboardData = props.clipboardData;
|
|
15
|
-
return (shouldConvertSingleImage &&
|
|
16
|
-
((_a = clipboardData.htmlFirstLevelChildTags) === null || _a === void 0 ? void 0 : _a.length) == 1 &&
|
|
17
|
-
clipboardData.htmlFirstLevelChildTags[0] == 'IMG');
|
|
18
|
-
};
|
|
19
|
-
exports.shouldConvertToSingleImage = shouldConvertToSingleImage;
|
|
20
|
-
});
|
|
1
|
+
define(["require", "exports"], function (require, exports) {
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.shouldConvertToSingleImage = void 0;
|
|
5
|
+
/**
|
|
6
|
+
* @internal
|
|
7
|
+
* Checks whether the fragment only contains a single image to paste
|
|
8
|
+
* and the editor have the ConvertSingleImageBody Experimental feature
|
|
9
|
+
* @param props Properties related to the PasteEvent
|
|
10
|
+
* @returns
|
|
11
|
+
*/
|
|
12
|
+
var shouldConvertToSingleImage = function (props) {
|
|
13
|
+
var _a;
|
|
14
|
+
var shouldConvertSingleImage = props.shouldConvertSingleImage, clipboardData = props.clipboardData;
|
|
15
|
+
return (shouldConvertSingleImage &&
|
|
16
|
+
((_a = clipboardData.htmlFirstLevelChildTags) === null || _a === void 0 ? void 0 : _a.length) == 1 &&
|
|
17
|
+
clipboardData.htmlFirstLevelChildTags[0] == 'IMG');
|
|
18
|
+
};
|
|
19
|
+
exports.shouldConvertToSingleImage = shouldConvertToSingleImage;
|
|
20
|
+
});
|
|
21
21
|
//# 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":";;;;IAEA;;;;;;OAMG;IACI,IAAM,0BAA0B,GAAsB,UAAA,KAAK;;QACtD,IAAA,wBAAwB,GAAoB,KAAK,yBAAzB,EAAE,aAAa,GAAK,KAAK,cAAV,CAAW;QAC1D,OAAO,CACH,wBAAwB;YACxB,CAAA,MAAA,aAAa,CAAC,uBAAuB,0CAAE,MAAM,KAAI,CAAC;YAClD,aAAa,CAAC,uBAAuB,CAAC,CAAC,CAAC,IAAI,KAAK,CACpD,CAAC;IACN,CAAC,CAAC;IAPW,QAAA,0BAA0B,8BAOrC","sourcesContent":["import type { GetSourceFunction } from './getPasteSource';\
|
|
1
|
+
{"version":3,"file":"shouldConvertToSingleImage.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-plugins/lib/paste/pasteSourceValidations/shouldConvertToSingleImage.ts"],"names":[],"mappings":";;;;IAEA;;;;;;OAMG;IACI,IAAM,0BAA0B,GAAsB,UAAA,KAAK;;QACtD,IAAA,wBAAwB,GAAoB,KAAK,yBAAzB,EAAE,aAAa,GAAK,KAAK,cAAV,CAAW;QAC1D,OAAO,CACH,wBAAwB;YACxB,CAAA,MAAA,aAAa,CAAC,uBAAuB,0CAAE,MAAM,KAAI,CAAC;YAClD,aAAa,CAAC,uBAAuB,CAAC,CAAC,CAAC,IAAI,KAAK,CACpD,CAAC;IACN,CAAC,CAAC;IAPW,QAAA,0BAA0B,8BAOrC","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,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;
|