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,94 +1,94 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.backwardDeleteCollapsedSelection = exports.forwardDeleteCollapsedSelection = void 0;
|
|
4
|
-
var roosterjs_content_model_core_1 = require("roosterjs-content-model-core");
|
|
5
|
-
var getLeafSiblingBlock_1 = require("../utils/getLeafSiblingBlock");
|
|
6
|
-
var roosterjs_content_model_dom_1 = require("roosterjs-content-model-dom");
|
|
7
|
-
function getDeleteCollapsedSelection(direction) {
|
|
8
|
-
return function (context) {
|
|
9
|
-
var _a;
|
|
10
|
-
if (context.deleteResult != 'notDeleted') {
|
|
11
|
-
return;
|
|
12
|
-
}
|
|
13
|
-
var isForward = direction == 'forward';
|
|
14
|
-
var _b = context.insertPoint, paragraph = _b.paragraph, marker = _b.marker, path = _b.path, tableContext = _b.tableContext;
|
|
15
|
-
var segments = paragraph.segments;
|
|
16
|
-
fixupBr(segments);
|
|
17
|
-
var index = segments.indexOf(marker) + (isForward ? 1 : -1);
|
|
18
|
-
var segmentToDelete = segments[index];
|
|
19
|
-
var blockToDelete;
|
|
20
|
-
if (segmentToDelete) {
|
|
21
|
-
if ((0, roosterjs_content_model_core_1.deleteSegment)(paragraph, segmentToDelete, context.formatContext, direction)) {
|
|
22
|
-
context.deleteResult = 'singleChar';
|
|
23
|
-
// It is possible that we have deleted everything from this paragraph, so we need to mark it as not implicit
|
|
24
|
-
// to avoid losing its format. See https://github.com/microsoft/roosterjs/issues/1953
|
|
25
|
-
(0, roosterjs_content_model_dom_1.setParagraphNotImplicit)(paragraph);
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
else if ((blockToDelete = (0, getLeafSiblingBlock_1.getLeafSiblingBlock)(path, paragraph, isForward))) {
|
|
29
|
-
var block = blockToDelete.block, path_1 = blockToDelete.path, siblingSegment = blockToDelete.siblingSegment;
|
|
30
|
-
if (block.blockType == 'Paragraph') {
|
|
31
|
-
if (siblingSegment) {
|
|
32
|
-
// When selection is under general segment, need to check if it has a sibling sibling, and delete from it
|
|
33
|
-
if ((0, roosterjs_content_model_core_1.deleteSegment)(block, siblingSegment, context.formatContext, direction)) {
|
|
34
|
-
context.deleteResult = 'range';
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
else {
|
|
38
|
-
if (isForward) {
|
|
39
|
-
context.lastParagraph = block;
|
|
40
|
-
}
|
|
41
|
-
else {
|
|
42
|
-
if (((_a = block.segments[block.segments.length - 1]) === null || _a === void 0 ? void 0 : _a.segmentType) == 'Br') {
|
|
43
|
-
block.segments.pop();
|
|
44
|
-
}
|
|
45
|
-
context.insertPoint = {
|
|
46
|
-
marker: marker,
|
|
47
|
-
paragraph: block,
|
|
48
|
-
path: path_1,
|
|
49
|
-
tableContext: tableContext,
|
|
50
|
-
};
|
|
51
|
-
context.lastParagraph = paragraph;
|
|
52
|
-
delete block.cachedElement;
|
|
53
|
-
}
|
|
54
|
-
context.deleteResult = 'range';
|
|
55
|
-
}
|
|
56
|
-
// When go across table, getLeafSiblingBlock will return null, when we are here, we must be in the same table context
|
|
57
|
-
context.lastTableContext = tableContext;
|
|
58
|
-
}
|
|
59
|
-
else {
|
|
60
|
-
if ((0, roosterjs_content_model_core_1.deleteBlock)(path_1[0].blocks, block, undefined /*replacement*/, context.formatContext, direction)) {
|
|
61
|
-
context.deleteResult = 'range';
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
else {
|
|
66
|
-
// We have nothing to delete, in this case we don't want browser handle it as well.
|
|
67
|
-
// Because when Backspace on an empty document, it will also delete the only DIV and SPAN element, causes
|
|
68
|
-
// editor is really empty. We don't want that happen. So the handling should stop here.
|
|
69
|
-
context.deleteResult = 'nothingToDelete';
|
|
70
|
-
}
|
|
71
|
-
};
|
|
72
|
-
}
|
|
73
|
-
/**
|
|
74
|
-
* If the last segment is BR, remove it for now. We may add it back later when normalize model.
|
|
75
|
-
* So that if this is an empty paragraph, it will start to delete next block
|
|
76
|
-
*/
|
|
77
|
-
function fixupBr(segments) {
|
|
78
|
-
var _a, _b;
|
|
79
|
-
if (((_a = segments[segments.length - 1]) === null || _a === void 0 ? void 0 : _a.segmentType) == 'Br') {
|
|
80
|
-
var segmentsWithoutBr = segments.filter(function (x) { return x.segmentType != 'SelectionMarker'; });
|
|
81
|
-
if (((_b = segmentsWithoutBr[segmentsWithoutBr.length - 2]) === null || _b === void 0 ? void 0 : _b.segmentType) != 'Br') {
|
|
82
|
-
segments.pop();
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
/**
|
|
87
|
-
* @internal if we didn't delete anything, and we want to delete forward, now perform it
|
|
88
|
-
*/
|
|
89
|
-
exports.forwardDeleteCollapsedSelection = getDeleteCollapsedSelection('forward');
|
|
90
|
-
/**
|
|
91
|
-
* @internal if we didn't delete anything, and we want to delete backward, now perform it
|
|
92
|
-
*/
|
|
93
|
-
exports.backwardDeleteCollapsedSelection = getDeleteCollapsedSelection('backward');
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.backwardDeleteCollapsedSelection = exports.forwardDeleteCollapsedSelection = void 0;
|
|
4
|
+
var roosterjs_content_model_core_1 = require("roosterjs-content-model-core");
|
|
5
|
+
var getLeafSiblingBlock_1 = require("../utils/getLeafSiblingBlock");
|
|
6
|
+
var roosterjs_content_model_dom_1 = require("roosterjs-content-model-dom");
|
|
7
|
+
function getDeleteCollapsedSelection(direction) {
|
|
8
|
+
return function (context) {
|
|
9
|
+
var _a;
|
|
10
|
+
if (context.deleteResult != 'notDeleted') {
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
var isForward = direction == 'forward';
|
|
14
|
+
var _b = context.insertPoint, paragraph = _b.paragraph, marker = _b.marker, path = _b.path, tableContext = _b.tableContext;
|
|
15
|
+
var segments = paragraph.segments;
|
|
16
|
+
fixupBr(segments);
|
|
17
|
+
var index = segments.indexOf(marker) + (isForward ? 1 : -1);
|
|
18
|
+
var segmentToDelete = segments[index];
|
|
19
|
+
var blockToDelete;
|
|
20
|
+
if (segmentToDelete) {
|
|
21
|
+
if ((0, roosterjs_content_model_core_1.deleteSegment)(paragraph, segmentToDelete, context.formatContext, direction)) {
|
|
22
|
+
context.deleteResult = 'singleChar';
|
|
23
|
+
// It is possible that we have deleted everything from this paragraph, so we need to mark it as not implicit
|
|
24
|
+
// to avoid losing its format. See https://github.com/microsoft/roosterjs/issues/1953
|
|
25
|
+
(0, roosterjs_content_model_dom_1.setParagraphNotImplicit)(paragraph);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
else if ((blockToDelete = (0, getLeafSiblingBlock_1.getLeafSiblingBlock)(path, paragraph, isForward))) {
|
|
29
|
+
var block = blockToDelete.block, path_1 = blockToDelete.path, siblingSegment = blockToDelete.siblingSegment;
|
|
30
|
+
if (block.blockType == 'Paragraph') {
|
|
31
|
+
if (siblingSegment) {
|
|
32
|
+
// When selection is under general segment, need to check if it has a sibling sibling, and delete from it
|
|
33
|
+
if ((0, roosterjs_content_model_core_1.deleteSegment)(block, siblingSegment, context.formatContext, direction)) {
|
|
34
|
+
context.deleteResult = 'range';
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
else {
|
|
38
|
+
if (isForward) {
|
|
39
|
+
context.lastParagraph = block;
|
|
40
|
+
}
|
|
41
|
+
else {
|
|
42
|
+
if (((_a = block.segments[block.segments.length - 1]) === null || _a === void 0 ? void 0 : _a.segmentType) == 'Br') {
|
|
43
|
+
block.segments.pop();
|
|
44
|
+
}
|
|
45
|
+
context.insertPoint = {
|
|
46
|
+
marker: marker,
|
|
47
|
+
paragraph: block,
|
|
48
|
+
path: path_1,
|
|
49
|
+
tableContext: tableContext,
|
|
50
|
+
};
|
|
51
|
+
context.lastParagraph = paragraph;
|
|
52
|
+
delete block.cachedElement;
|
|
53
|
+
}
|
|
54
|
+
context.deleteResult = 'range';
|
|
55
|
+
}
|
|
56
|
+
// When go across table, getLeafSiblingBlock will return null, when we are here, we must be in the same table context
|
|
57
|
+
context.lastTableContext = tableContext;
|
|
58
|
+
}
|
|
59
|
+
else {
|
|
60
|
+
if ((0, roosterjs_content_model_core_1.deleteBlock)(path_1[0].blocks, block, undefined /*replacement*/, context.formatContext, direction)) {
|
|
61
|
+
context.deleteResult = 'range';
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
else {
|
|
66
|
+
// We have nothing to delete, in this case we don't want browser handle it as well.
|
|
67
|
+
// Because when Backspace on an empty document, it will also delete the only DIV and SPAN element, causes
|
|
68
|
+
// editor is really empty. We don't want that happen. So the handling should stop here.
|
|
69
|
+
context.deleteResult = 'nothingToDelete';
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* If the last segment is BR, remove it for now. We may add it back later when normalize model.
|
|
75
|
+
* So that if this is an empty paragraph, it will start to delete next block
|
|
76
|
+
*/
|
|
77
|
+
function fixupBr(segments) {
|
|
78
|
+
var _a, _b;
|
|
79
|
+
if (((_a = segments[segments.length - 1]) === null || _a === void 0 ? void 0 : _a.segmentType) == 'Br') {
|
|
80
|
+
var segmentsWithoutBr = segments.filter(function (x) { return x.segmentType != 'SelectionMarker'; });
|
|
81
|
+
if (((_b = segmentsWithoutBr[segmentsWithoutBr.length - 2]) === null || _b === void 0 ? void 0 : _b.segmentType) != 'Br') {
|
|
82
|
+
segments.pop();
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* @internal if we didn't delete anything, and we want to delete forward, now perform it
|
|
88
|
+
*/
|
|
89
|
+
exports.forwardDeleteCollapsedSelection = getDeleteCollapsedSelection('forward');
|
|
90
|
+
/**
|
|
91
|
+
* @internal if we didn't delete anything, and we want to delete backward, now perform it
|
|
92
|
+
*/
|
|
93
|
+
exports.backwardDeleteCollapsedSelection = getDeleteCollapsedSelection('backward');
|
|
94
94
|
//# sourceMappingURL=deleteCollapsedSelection.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deleteCollapsedSelection.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-plugins/lib/edit/deleteSteps/deleteCollapsedSelection.ts"],"names":[],"mappings":"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","sourcesContent":["import { deleteBlock, deleteSegment } from 'roosterjs-content-model-core';\
|
|
1
|
+
{"version":3,"file":"deleteCollapsedSelection.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-plugins/lib/edit/deleteSteps/deleteCollapsedSelection.ts"],"names":[],"mappings":"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","sourcesContent":["import { deleteBlock, deleteSegment } from 'roosterjs-content-model-core';\nimport { getLeafSiblingBlock } from '../utils/getLeafSiblingBlock';\nimport { setParagraphNotImplicit } from 'roosterjs-content-model-dom';\nimport type { BlockAndPath } from '../utils/getLeafSiblingBlock';\nimport type { ContentModelSegment, DeleteSelectionStep } from 'roosterjs-content-model-types';\n\nfunction getDeleteCollapsedSelection(direction: 'forward' | 'backward'): DeleteSelectionStep {\n return context => {\n if (context.deleteResult != 'notDeleted') {\n return;\n }\n\n const isForward = direction == 'forward';\n const { paragraph, marker, path, tableContext } = context.insertPoint;\n const segments = paragraph.segments;\n\n fixupBr(segments);\n\n const index = segments.indexOf(marker) + (isForward ? 1 : -1);\n const segmentToDelete = segments[index];\n let blockToDelete: BlockAndPath | null;\n\n if (segmentToDelete) {\n if (deleteSegment(paragraph, segmentToDelete, context.formatContext, direction)) {\n context.deleteResult = 'singleChar';\n\n // It is possible that we have deleted everything from this paragraph, so we need to mark it as not implicit\n // to avoid losing its format. See https://github.com/microsoft/roosterjs/issues/1953\n setParagraphNotImplicit(paragraph);\n }\n } else if ((blockToDelete = getLeafSiblingBlock(path, paragraph, isForward))) {\n const { block, path, siblingSegment } = blockToDelete;\n\n if (block.blockType == 'Paragraph') {\n if (siblingSegment) {\n // When selection is under general segment, need to check if it has a sibling sibling, and delete from it\n if (deleteSegment(block, siblingSegment, context.formatContext, direction)) {\n context.deleteResult = 'range';\n }\n } else {\n if (isForward) {\n context.lastParagraph = block;\n } else {\n if (block.segments[block.segments.length - 1]?.segmentType == 'Br') {\n block.segments.pop();\n }\n\n context.insertPoint = {\n marker,\n paragraph: block,\n path,\n tableContext,\n };\n context.lastParagraph = paragraph;\n delete block.cachedElement;\n }\n\n context.deleteResult = 'range';\n }\n\n // When go across table, getLeafSiblingBlock will return null, when we are here, we must be in the same table context\n context.lastTableContext = tableContext;\n } else {\n if (\n deleteBlock(\n path[0].blocks,\n block,\n undefined /*replacement*/,\n context.formatContext,\n direction\n )\n ) {\n context.deleteResult = 'range';\n }\n }\n } else {\n // We have nothing to delete, in this case we don't want browser handle it as well.\n // Because when Backspace on an empty document, it will also delete the only DIV and SPAN element, causes\n // editor is really empty. We don't want that happen. So the handling should stop here.\n context.deleteResult = 'nothingToDelete';\n }\n };\n}\n\n/**\n * If the last segment is BR, remove it for now. We may add it back later when normalize model.\n * So that if this is an empty paragraph, it will start to delete next block\n */\nfunction fixupBr(segments: ContentModelSegment[]) {\n if (segments[segments.length - 1]?.segmentType == 'Br') {\n const segmentsWithoutBr = segments.filter(x => x.segmentType != 'SelectionMarker');\n\n if (segmentsWithoutBr[segmentsWithoutBr.length - 2]?.segmentType != 'Br') {\n segments.pop();\n }\n }\n}\n\n/**\n * @internal if we didn't delete anything, and we want to delete forward, now perform it\n */\nexport const forwardDeleteCollapsedSelection = getDeleteCollapsedSelection('forward');\n\n/**\n * @internal if we didn't delete anything, and we want to delete backward, now perform it\n */\nexport const backwardDeleteCollapsedSelection = getDeleteCollapsedSelection('backward');\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { DeleteSelectionStep } from 'roosterjs-content-model-types';
|
|
2
|
-
/**
|
|
3
|
-
* @internal
|
|
4
|
-
*/
|
|
5
|
-
export declare const deleteList: DeleteSelectionStep;
|
|
1
|
+
import type { DeleteSelectionStep } from 'roosterjs-content-model-types';
|
|
2
|
+
/**
|
|
3
|
+
* @internal
|
|
4
|
+
*/
|
|
5
|
+
export declare const deleteList: DeleteSelectionStep;
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.deleteList = void 0;
|
|
4
|
-
var roosterjs_content_model_core_1 = require("roosterjs-content-model-core");
|
|
5
|
-
/**
|
|
6
|
-
* @internal
|
|
7
|
-
*/
|
|
8
|
-
var deleteList = function (context) {
|
|
9
|
-
var _a = context.insertPoint, paragraph = _a.paragraph, marker = _a.marker, path = _a.path;
|
|
10
|
-
if (context.deleteResult == 'nothingToDelete' || context.deleteResult == 'notDeleted') {
|
|
11
|
-
var index = (0, roosterjs_content_model_core_1.getClosestAncestorBlockGroupIndex)(path, ['ListItem', 'TableCell']);
|
|
12
|
-
var item = path[index];
|
|
13
|
-
if (index >= 0 &&
|
|
14
|
-
paragraph.segments[0] == marker &&
|
|
15
|
-
item.blockGroupType == 'ListItem' &&
|
|
16
|
-
(paragraph.segments.length == 1 ||
|
|
17
|
-
(paragraph.segments.length == 2 && paragraph.segments[1].segmentType == 'Br'))) {
|
|
18
|
-
item.levels = [];
|
|
19
|
-
context.deleteResult = 'range';
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
};
|
|
23
|
-
exports.deleteList = deleteList;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.deleteList = void 0;
|
|
4
|
+
var roosterjs_content_model_core_1 = require("roosterjs-content-model-core");
|
|
5
|
+
/**
|
|
6
|
+
* @internal
|
|
7
|
+
*/
|
|
8
|
+
var deleteList = function (context) {
|
|
9
|
+
var _a = context.insertPoint, paragraph = _a.paragraph, marker = _a.marker, path = _a.path;
|
|
10
|
+
if (context.deleteResult == 'nothingToDelete' || context.deleteResult == 'notDeleted') {
|
|
11
|
+
var index = (0, roosterjs_content_model_core_1.getClosestAncestorBlockGroupIndex)(path, ['ListItem', 'TableCell']);
|
|
12
|
+
var item = path[index];
|
|
13
|
+
if (index >= 0 &&
|
|
14
|
+
paragraph.segments[0] == marker &&
|
|
15
|
+
item.blockGroupType == 'ListItem' &&
|
|
16
|
+
(paragraph.segments.length == 1 ||
|
|
17
|
+
(paragraph.segments.length == 2 && paragraph.segments[1].segmentType == 'Br'))) {
|
|
18
|
+
item.levels = [];
|
|
19
|
+
context.deleteResult = 'range';
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
exports.deleteList = deleteList;
|
|
24
24
|
//# sourceMappingURL=deleteList.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deleteList.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-plugins/lib/edit/deleteSteps/deleteList.ts"],"names":[],"mappings":";;;AAAA,6EAAiF;AAGjF;;GAEG;AACI,IAAM,UAAU,GAAwB,UAAA,OAAO;IAC5C,IAAA,KAA8B,OAAO,CAAC,WAAW,EAA/C,SAAS,eAAA,EAAE,MAAM,YAAA,EAAE,IAAI,UAAwB,CAAC;IAExD,IAAI,OAAO,CAAC,YAAY,IAAI,iBAAiB,IAAI,OAAO,CAAC,YAAY,IAAI,YAAY,EAAE;QACnF,IAAM,KAAK,GAAG,IAAA,gEAAiC,EAAC,IAAI,EAAE,CAAC,UAAU,EAAE,WAAW,CAAC,CAAC,CAAC;QACjF,IAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC;QACzB,IACI,KAAK,IAAI,CAAC;YACV,SAAS,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,MAAM;YAC/B,IAAI,CAAC,cAAc,IAAI,UAAU;YACjC,CAAC,SAAS,CAAC,QAAQ,CAAC,MAAM,IAAI,CAAC;gBAC3B,CAAC,SAAS,CAAC,QAAQ,CAAC,MAAM,IAAI,CAAC,IAAI,SAAS,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,WAAW,IAAI,IAAI,CAAC,CAAC,EACpF;YACE,IAAI,CAAC,MAAM,GAAG,EAAE,CAAC;YACjB,OAAO,CAAC,YAAY,GAAG,OAAO,CAAC;SAClC;KACJ;AACL,CAAC,CAAC;AAjBW,QAAA,UAAU,cAiBrB","sourcesContent":["import { getClosestAncestorBlockGroupIndex } from 'roosterjs-content-model-core';\
|
|
1
|
+
{"version":3,"file":"deleteList.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-plugins/lib/edit/deleteSteps/deleteList.ts"],"names":[],"mappings":";;;AAAA,6EAAiF;AAGjF;;GAEG;AACI,IAAM,UAAU,GAAwB,UAAA,OAAO;IAC5C,IAAA,KAA8B,OAAO,CAAC,WAAW,EAA/C,SAAS,eAAA,EAAE,MAAM,YAAA,EAAE,IAAI,UAAwB,CAAC;IAExD,IAAI,OAAO,CAAC,YAAY,IAAI,iBAAiB,IAAI,OAAO,CAAC,YAAY,IAAI,YAAY,EAAE;QACnF,IAAM,KAAK,GAAG,IAAA,gEAAiC,EAAC,IAAI,EAAE,CAAC,UAAU,EAAE,WAAW,CAAC,CAAC,CAAC;QACjF,IAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC;QACzB,IACI,KAAK,IAAI,CAAC;YACV,SAAS,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,MAAM;YAC/B,IAAI,CAAC,cAAc,IAAI,UAAU;YACjC,CAAC,SAAS,CAAC,QAAQ,CAAC,MAAM,IAAI,CAAC;gBAC3B,CAAC,SAAS,CAAC,QAAQ,CAAC,MAAM,IAAI,CAAC,IAAI,SAAS,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,WAAW,IAAI,IAAI,CAAC,CAAC,EACpF;YACE,IAAI,CAAC,MAAM,GAAG,EAAE,CAAC;YACjB,OAAO,CAAC,YAAY,GAAG,OAAO,CAAC;SAClC;KACJ;AACL,CAAC,CAAC;AAjBW,QAAA,UAAU,cAiBrB","sourcesContent":["import { getClosestAncestorBlockGroupIndex } from 'roosterjs-content-model-core';\nimport type { DeleteSelectionStep } from 'roosterjs-content-model-types';\n\n/**\n * @internal\n */\nexport const deleteList: DeleteSelectionStep = context => {\n const { paragraph, marker, path } = context.insertPoint;\n\n if (context.deleteResult == 'nothingToDelete' || context.deleteResult == 'notDeleted') {\n const index = getClosestAncestorBlockGroupIndex(path, ['ListItem', 'TableCell']);\n const item = path[index];\n if (\n index >= 0 &&\n paragraph.segments[0] == marker &&\n item.blockGroupType == 'ListItem' &&\n (paragraph.segments.length == 1 ||\n (paragraph.segments.length == 2 && paragraph.segments[1].segmentType == 'Br'))\n ) {\n item.levels = [];\n context.deleteResult = 'range';\n }\n }\n};\n"]}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type { DeleteSelectionStep } from 'roosterjs-content-model-types';
|
|
2
|
-
/**
|
|
3
|
-
* @internal
|
|
4
|
-
*/
|
|
5
|
-
export declare const forwardDeleteWordSelection: DeleteSelectionStep;
|
|
6
|
-
/**
|
|
7
|
-
* @internal
|
|
8
|
-
*/
|
|
9
|
-
export declare const backwardDeleteWordSelection: DeleteSelectionStep;
|
|
1
|
+
import type { DeleteSelectionStep } from 'roosterjs-content-model-types';
|
|
2
|
+
/**
|
|
3
|
+
* @internal
|
|
4
|
+
*/
|
|
5
|
+
export declare const forwardDeleteWordSelection: DeleteSelectionStep;
|
|
6
|
+
/**
|
|
7
|
+
* @internal
|
|
8
|
+
*/
|
|
9
|
+
export declare const backwardDeleteWordSelection: DeleteSelectionStep;
|