roosterjs-content-model-plugins 0.26.0 → 0.26.1
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,6 +1,6 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @internal
|
|
3
|
-
* Get CSS styles of a given element in name-value pair format
|
|
4
|
-
* @param element The element to get styles from
|
|
5
|
-
*/
|
|
6
|
-
export declare function getStyles(element: HTMLElement): Record<string, string>;
|
|
1
|
+
/**
|
|
2
|
+
* @internal
|
|
3
|
+
* Get CSS styles of a given element in name-value pair format
|
|
4
|
+
* @param element The element to get styles from
|
|
5
|
+
*/
|
|
6
|
+
export declare function getStyles(element: HTMLElement): Record<string, string>;
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @internal
|
|
3
|
-
* Get CSS styles of a given element in name-value pair format
|
|
4
|
-
* @param element The element to get styles from
|
|
5
|
-
*/
|
|
6
|
-
export function getStyles(element) {
|
|
7
|
-
var result = {};
|
|
8
|
-
var style = (element === null || element === void 0 ? void 0 : element.getAttribute('style')) || '';
|
|
9
|
-
style.split(';').forEach(function (pair) {
|
|
10
|
-
var valueIndex = pair.indexOf(':');
|
|
11
|
-
var name = pair.slice(0, valueIndex);
|
|
12
|
-
var value = pair.slice(valueIndex + 1);
|
|
13
|
-
if (name && value) {
|
|
14
|
-
result[name.trim()] = value.trim();
|
|
15
|
-
}
|
|
16
|
-
});
|
|
17
|
-
return result;
|
|
18
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* @internal
|
|
3
|
+
* Get CSS styles of a given element in name-value pair format
|
|
4
|
+
* @param element The element to get styles from
|
|
5
|
+
*/
|
|
6
|
+
export function getStyles(element) {
|
|
7
|
+
var result = {};
|
|
8
|
+
var style = (element === null || element === void 0 ? void 0 : element.getAttribute('style')) || '';
|
|
9
|
+
style.split(';').forEach(function (pair) {
|
|
10
|
+
var valueIndex = pair.indexOf(':');
|
|
11
|
+
var name = pair.slice(0, valueIndex);
|
|
12
|
+
var value = pair.slice(valueIndex + 1);
|
|
13
|
+
if (name && value) {
|
|
14
|
+
result[name.trim()] = value.trim();
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
return result;
|
|
18
|
+
}
|
|
19
19
|
//# sourceMappingURL=getStyles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getStyles.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-plugins/lib/paste/utils/getStyles.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,UAAU,SAAS,CAAC,OAAoB;IAC1C,IAAM,MAAM,GAA2B,EAAE,CAAC;IAC1C,IAAM,KAAK,GAAG,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,YAAY,CAAC,OAAO,CAAC,KAAI,EAAE,CAAC;IACnD,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,UAAA,IAAI;QACzB,IAAM,UAAU,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QACrC,IAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC;QACvC,IAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,UAAU,GAAG,CAAC,CAAC,CAAC;QACzC,IAAI,IAAI,IAAI,KAAK,EAAE;YACf,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC;SACtC;IACL,CAAC,CAAC,CAAC;IACH,OAAO,MAAM,CAAC;AAClB,CAAC","sourcesContent":["/**\
|
|
1
|
+
{"version":3,"file":"getStyles.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-plugins/lib/paste/utils/getStyles.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,UAAU,SAAS,CAAC,OAAoB;IAC1C,IAAM,MAAM,GAA2B,EAAE,CAAC;IAC1C,IAAM,KAAK,GAAG,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,YAAY,CAAC,OAAO,CAAC,KAAI,EAAE,CAAC;IACnD,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,UAAA,IAAI;QACzB,IAAM,UAAU,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QACrC,IAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC;QACvC,IAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,UAAU,GAAG,CAAC,CAAC,CAAC;QACzC,IAAI,IAAI,IAAI,KAAK,EAAE;YACf,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC;SACtC;IACL,CAAC,CAAC,CAAC;IACH,OAAO,MAAM,CAAC;AAClB,CAAC","sourcesContent":["/**\n * @internal\n * Get CSS styles of a given element in name-value pair format\n * @param element The element to get styles from\n */\nexport function getStyles(element: HTMLElement): Record<string, string> {\n const result: Record<string, string> = {};\n const style = element?.getAttribute('style') || '';\n style.split(';').forEach(pair => {\n const valueIndex = pair.indexOf(':');\n const name = pair.slice(0, valueIndex);\n const value = pair.slice(valueIndex + 1);\n if (name && value) {\n result[name.trim()] = value.trim();\n }\n });\n return result;\n}\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ContentModelHyperLinkFormat, FormatParser } from 'roosterjs-content-model-types';
|
|
2
|
-
/**
|
|
3
|
-
* @internal
|
|
4
|
-
*/
|
|
5
|
-
export declare const parseLink: FormatParser<ContentModelHyperLinkFormat>;
|
|
1
|
+
import type { ContentModelHyperLinkFormat, FormatParser } from 'roosterjs-content-model-types';
|
|
2
|
+
/**
|
|
3
|
+
* @internal
|
|
4
|
+
*/
|
|
5
|
+
export declare const parseLink: FormatParser<ContentModelHyperLinkFormat>;
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { isElementOfType } from 'roosterjs-content-model-dom';
|
|
2
|
-
var SUPPORTED_PROTOCOLS = ['http:', 'https:', 'notes:', 'mailto:', 'onenote:'];
|
|
3
|
-
var INVALID_LINKS_REGEX = /^file:\/\/\/[a-zA-Z\/]/i;
|
|
4
|
-
/**
|
|
5
|
-
* @internal
|
|
6
|
-
*/
|
|
7
|
-
export var parseLink = function (format, element) {
|
|
8
|
-
if (!isElementOfType(element, 'a')) {
|
|
9
|
-
return;
|
|
10
|
-
}
|
|
11
|
-
var url;
|
|
12
|
-
try {
|
|
13
|
-
url = new URL(element.href);
|
|
14
|
-
}
|
|
15
|
-
catch (_a) {
|
|
16
|
-
url = undefined;
|
|
17
|
-
}
|
|
18
|
-
if ((url && SUPPORTED_PROTOCOLS.indexOf(url.protocol) === -1) ||
|
|
19
|
-
INVALID_LINKS_REGEX.test(element.href)) {
|
|
20
|
-
element.removeAttribute('href');
|
|
21
|
-
format.href = '';
|
|
22
|
-
}
|
|
23
|
-
};
|
|
1
|
+
import { isElementOfType } from 'roosterjs-content-model-dom';
|
|
2
|
+
var SUPPORTED_PROTOCOLS = ['http:', 'https:', 'notes:', 'mailto:', 'onenote:'];
|
|
3
|
+
var INVALID_LINKS_REGEX = /^file:\/\/\/[a-zA-Z\/]/i;
|
|
4
|
+
/**
|
|
5
|
+
* @internal
|
|
6
|
+
*/
|
|
7
|
+
export var parseLink = function (format, element) {
|
|
8
|
+
if (!isElementOfType(element, 'a')) {
|
|
9
|
+
return;
|
|
10
|
+
}
|
|
11
|
+
var url;
|
|
12
|
+
try {
|
|
13
|
+
url = new URL(element.href);
|
|
14
|
+
}
|
|
15
|
+
catch (_a) {
|
|
16
|
+
url = undefined;
|
|
17
|
+
}
|
|
18
|
+
if ((url && SUPPORTED_PROTOCOLS.indexOf(url.protocol) === -1) ||
|
|
19
|
+
INVALID_LINKS_REGEX.test(element.href)) {
|
|
20
|
+
element.removeAttribute('href');
|
|
21
|
+
format.href = '';
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
24
|
//# sourceMappingURL=linkParser.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"linkParser.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-plugins/lib/paste/utils/linkParser.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAG9D,IAAM,mBAAmB,GAAG,CAAC,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC;AACjF,IAAM,mBAAmB,GAAG,yBAAyB,CAAC;AAEtD;;GAEG;AACH,MAAM,CAAC,IAAM,SAAS,GAA8C,UAAC,MAAM,EAAE,OAAO;IAChF,IAAI,CAAC,eAAe,CAAC,OAAO,EAAE,GAAG,CAAC,EAAE;QAChC,OAAO;KACV;IAED,IAAI,GAAoB,CAAC;IACzB,IAAI;QACA,GAAG,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;KAC/B;IAAC,WAAM;QACJ,GAAG,GAAG,SAAS,CAAC;KACnB;IAED,IACI,CAAC,GAAG,IAAI,mBAAmB,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;QACzD,mBAAmB,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,EACxC;QACE,OAAO,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;QAChC,MAAM,CAAC,IAAI,GAAG,EAAE,CAAC;KACpB;AACL,CAAC,CAAC","sourcesContent":["import { isElementOfType } from 'roosterjs-content-model-dom';\
|
|
1
|
+
{"version":3,"file":"linkParser.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-plugins/lib/paste/utils/linkParser.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAG9D,IAAM,mBAAmB,GAAG,CAAC,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC;AACjF,IAAM,mBAAmB,GAAG,yBAAyB,CAAC;AAEtD;;GAEG;AACH,MAAM,CAAC,IAAM,SAAS,GAA8C,UAAC,MAAM,EAAE,OAAO;IAChF,IAAI,CAAC,eAAe,CAAC,OAAO,EAAE,GAAG,CAAC,EAAE;QAChC,OAAO;KACV;IAED,IAAI,GAAoB,CAAC;IACzB,IAAI;QACA,GAAG,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;KAC/B;IAAC,WAAM;QACJ,GAAG,GAAG,SAAS,CAAC;KACnB;IAED,IACI,CAAC,GAAG,IAAI,mBAAmB,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;QACzD,mBAAmB,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,EACxC;QACE,OAAO,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;QAChC,MAAM,CAAC,IAAI,GAAG,EAAE,CAAC;KACpB;AACL,CAAC,CAAC","sourcesContent":["import { isElementOfType } from 'roosterjs-content-model-dom';\nimport type { ContentModelHyperLinkFormat, FormatParser } from 'roosterjs-content-model-types';\n\nconst SUPPORTED_PROTOCOLS = ['http:', 'https:', 'notes:', 'mailto:', 'onenote:'];\nconst INVALID_LINKS_REGEX = /^file:\\/\\/\\/[a-zA-Z\\/]/i;\n\n/**\n * @internal\n */\nexport const parseLink: FormatParser<ContentModelHyperLinkFormat> = (format, element) => {\n if (!isElementOfType(element, 'a')) {\n return;\n }\n\n let url: URL | undefined;\n try {\n url = new URL(element.href);\n } catch {\n url = undefined;\n }\n\n if (\n (url && SUPPORTED_PROTOCOLS.indexOf(url.protocol) === -1) ||\n INVALID_LINKS_REGEX.test(element.href)\n ) {\n element.removeAttribute('href');\n format.href = '';\n }\n};\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { DomToModelOption, ElementProcessorMap } from 'roosterjs-content-model-types';
|
|
2
|
-
/**
|
|
3
|
-
* @internal
|
|
4
|
-
*/
|
|
5
|
-
export declare function setProcessor<TKey extends keyof ElementProcessorMap>(domToModelOption: DomToModelOption, entry: TKey, processorOverride: Partial<ElementProcessorMap>[TKey]): void;
|
|
1
|
+
import type { DomToModelOption, ElementProcessorMap } from 'roosterjs-content-model-types';
|
|
2
|
+
/**
|
|
3
|
+
* @internal
|
|
4
|
+
*/
|
|
5
|
+
export declare function setProcessor<TKey extends keyof ElementProcessorMap>(domToModelOption: DomToModelOption, entry: TKey, processorOverride: Partial<ElementProcessorMap>[TKey]): void;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @internal
|
|
3
|
-
*/
|
|
4
|
-
export function setProcessor(domToModelOption, entry, processorOverride) {
|
|
5
|
-
if (!domToModelOption.processorOverride) {
|
|
6
|
-
domToModelOption.processorOverride = {};
|
|
7
|
-
}
|
|
8
|
-
domToModelOption.processorOverride[entry] = processorOverride;
|
|
9
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* @internal
|
|
3
|
+
*/
|
|
4
|
+
export function setProcessor(domToModelOption, entry, processorOverride) {
|
|
5
|
+
if (!domToModelOption.processorOverride) {
|
|
6
|
+
domToModelOption.processorOverride = {};
|
|
7
|
+
}
|
|
8
|
+
domToModelOption.processorOverride[entry] = processorOverride;
|
|
9
|
+
}
|
|
10
10
|
//# sourceMappingURL=setProcessor.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setProcessor.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-plugins/lib/paste/utils/setProcessor.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,UAAU,YAAY,CACxB,gBAAkC,EAClC,KAAW,EACX,iBAAqD;IAErD,IAAI,CAAC,gBAAgB,CAAC,iBAAiB,EAAE;QACrC,gBAAgB,CAAC,iBAAiB,GAAG,EAAE,CAAC;KAC3C;IAED,gBAAgB,CAAC,iBAAiB,CAAC,KAAK,CAAC,GAAG,iBAAiB,CAAC;AAClE,CAAC","sourcesContent":["import type { DomToModelOption, ElementProcessorMap } from 'roosterjs-content-model-types';\
|
|
1
|
+
{"version":3,"file":"setProcessor.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-plugins/lib/paste/utils/setProcessor.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,UAAU,YAAY,CACxB,gBAAkC,EAClC,KAAW,EACX,iBAAqD;IAErD,IAAI,CAAC,gBAAgB,CAAC,iBAAiB,EAAE;QACrC,gBAAgB,CAAC,iBAAiB,GAAG,EAAE,CAAC;KAC3C;IAED,gBAAgB,CAAC,iBAAiB,CAAC,KAAK,CAAC,GAAG,iBAAiB,CAAC;AAClE,CAAC","sourcesContent":["import type { DomToModelOption, ElementProcessorMap } from 'roosterjs-content-model-types';\n\n/**\n * @internal\n */\nexport function setProcessor<TKey extends keyof ElementProcessorMap>(\n domToModelOption: DomToModelOption,\n entry: TKey,\n processorOverride: Partial<ElementProcessorMap>[TKey]\n) {\n if (!domToModelOption.processorOverride) {\n domToModelOption.processorOverride = {};\n }\n\n domToModelOption.processorOverride[entry] = processorOverride;\n}\n"]}
|
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @internal
|
|
3
|
-
* An interface represents the data for creating element used by createElement()
|
|
4
|
-
*/
|
|
5
|
-
export default interface CreateElementData {
|
|
6
|
-
/**
|
|
7
|
-
* Tag name of this element.
|
|
8
|
-
* It can be just a tag, or in format "namespace:tag"
|
|
9
|
-
*/
|
|
10
|
-
tag: string;
|
|
11
|
-
/**
|
|
12
|
-
* Namespace of this tag
|
|
13
|
-
*/
|
|
14
|
-
namespace?: string;
|
|
15
|
-
/**
|
|
16
|
-
* CSS class name
|
|
17
|
-
*/
|
|
18
|
-
className?: string;
|
|
19
|
-
/**
|
|
20
|
-
* CSS style
|
|
21
|
-
*/
|
|
22
|
-
style?: string;
|
|
23
|
-
/**
|
|
24
|
-
* Dataset of this element
|
|
25
|
-
*/
|
|
26
|
-
dataset?: Record<string, string>;
|
|
27
|
-
/**
|
|
28
|
-
* Additional attributes of this element
|
|
29
|
-
*/
|
|
30
|
-
attributes?: Record<string, string>;
|
|
31
|
-
/**
|
|
32
|
-
* Child nodes of this element, can be another CreateElementData, or a string which represents a text node
|
|
33
|
-
*/
|
|
34
|
-
children?: (CreateElementData | string)[];
|
|
35
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* @internal
|
|
3
|
+
* An interface represents the data for creating element used by createElement()
|
|
4
|
+
*/
|
|
5
|
+
export default interface CreateElementData {
|
|
6
|
+
/**
|
|
7
|
+
* Tag name of this element.
|
|
8
|
+
* It can be just a tag, or in format "namespace:tag"
|
|
9
|
+
*/
|
|
10
|
+
tag: string;
|
|
11
|
+
/**
|
|
12
|
+
* Namespace of this tag
|
|
13
|
+
*/
|
|
14
|
+
namespace?: string;
|
|
15
|
+
/**
|
|
16
|
+
* CSS class name
|
|
17
|
+
*/
|
|
18
|
+
className?: string;
|
|
19
|
+
/**
|
|
20
|
+
* CSS style
|
|
21
|
+
*/
|
|
22
|
+
style?: string;
|
|
23
|
+
/**
|
|
24
|
+
* Dataset of this element
|
|
25
|
+
*/
|
|
26
|
+
dataset?: Record<string, string>;
|
|
27
|
+
/**
|
|
28
|
+
* Additional attributes of this element
|
|
29
|
+
*/
|
|
30
|
+
attributes?: Record<string, string>;
|
|
31
|
+
/**
|
|
32
|
+
* Child nodes of this element, can be another CreateElementData, or a string which represents a text node
|
|
33
|
+
*/
|
|
34
|
+
children?: (CreateElementData | string)[];
|
|
35
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
2
2
|
//# sourceMappingURL=CreateElementData.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CreateElementData.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-plugins/lib/pluginUtils/CreateElement/CreateElementData.ts"],"names":[],"mappings":"","sourcesContent":["/**\
|
|
1
|
+
{"version":3,"file":"CreateElementData.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-plugins/lib/pluginUtils/CreateElement/CreateElementData.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * @internal\n * An interface represents the data for creating element used by createElement()\n */\nexport default interface CreateElementData {\n /**\n * Tag name of this element.\n * It can be just a tag, or in format \"namespace:tag\"\n */\n tag: string;\n\n /**\n * Namespace of this tag\n */\n namespace?: string;\n\n /**\n * CSS class name\n */\n className?: string;\n\n /**\n * CSS style\n */\n style?: string;\n\n /**\n * Dataset of this element\n */\n dataset?: Record<string, string>;\n\n /**\n * Additional attributes of this element\n */\n attributes?: Record<string, string>;\n\n /**\n * Child nodes of this element, can be another CreateElementData, or a string which represents a text node\n */\n children?: (CreateElementData | string)[];\n}\n"]}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type CreateElementData from './CreateElementData';
|
|
2
|
-
/**
|
|
3
|
-
* @internal
|
|
4
|
-
* Create DOM element from the given CreateElementData
|
|
5
|
-
* @param elementData The CreateElementData or an index of a known CreateElementData used for creating this element
|
|
6
|
-
* @param document The document to create the element from
|
|
7
|
-
* @returns The root DOM element just created
|
|
8
|
-
*/
|
|
9
|
-
export default function createElement(elementData: CreateElementData, document: Document): Element | null;
|
|
1
|
+
import type CreateElementData from './CreateElementData';
|
|
2
|
+
/**
|
|
3
|
+
* @internal
|
|
4
|
+
* Create DOM element from the given CreateElementData
|
|
5
|
+
* @param elementData The CreateElementData or an index of a known CreateElementData used for creating this element
|
|
6
|
+
* @param document The document to create the element from
|
|
7
|
+
* @returns The root DOM element just created
|
|
8
|
+
*/
|
|
9
|
+
export default function createElement(elementData: CreateElementData, document: Document): Element | null;
|
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
import { getObjectKeys, isNodeOfType } from 'roosterjs-content-model-dom';
|
|
2
|
-
/**
|
|
3
|
-
* @internal
|
|
4
|
-
* Create DOM element from the given CreateElementData
|
|
5
|
-
* @param elementData The CreateElementData or an index of a known CreateElementData used for creating this element
|
|
6
|
-
* @param document The document to create the element from
|
|
7
|
-
* @returns The root DOM element just created
|
|
8
|
-
*/
|
|
9
|
-
export default function createElement(elementData, document) {
|
|
10
|
-
if (!elementData || !elementData.tag) {
|
|
11
|
-
return null;
|
|
12
|
-
}
|
|
13
|
-
var tag = elementData.tag, namespace = elementData.namespace, className = elementData.className, style = elementData.style, dataset = elementData.dataset, attributes = elementData.attributes, children = elementData.children;
|
|
14
|
-
var result = namespace
|
|
15
|
-
? document.createElementNS(namespace, tag)
|
|
16
|
-
: document.createElement(tag);
|
|
17
|
-
if (style) {
|
|
18
|
-
result.setAttribute('style', style);
|
|
19
|
-
}
|
|
20
|
-
if (className) {
|
|
21
|
-
result.className = className;
|
|
22
|
-
}
|
|
23
|
-
if (dataset && isNodeOfType(result, 'ELEMENT_NODE')) {
|
|
24
|
-
getObjectKeys(dataset).forEach(function (datasetName) {
|
|
25
|
-
result.dataset[datasetName] = dataset[datasetName];
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
if (attributes) {
|
|
29
|
-
getObjectKeys(attributes).forEach(function (attrName) {
|
|
30
|
-
result.setAttribute(attrName, attributes[attrName]);
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
if (children) {
|
|
34
|
-
children.forEach(function (child) {
|
|
35
|
-
if (typeof child === 'string') {
|
|
36
|
-
result.appendChild(document.createTextNode(child));
|
|
37
|
-
}
|
|
38
|
-
else if (child) {
|
|
39
|
-
var childElement = createElement(child, document);
|
|
40
|
-
if (childElement) {
|
|
41
|
-
result.appendChild(childElement);
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
return result;
|
|
47
|
-
}
|
|
1
|
+
import { getObjectKeys, isNodeOfType } from 'roosterjs-content-model-dom';
|
|
2
|
+
/**
|
|
3
|
+
* @internal
|
|
4
|
+
* Create DOM element from the given CreateElementData
|
|
5
|
+
* @param elementData The CreateElementData or an index of a known CreateElementData used for creating this element
|
|
6
|
+
* @param document The document to create the element from
|
|
7
|
+
* @returns The root DOM element just created
|
|
8
|
+
*/
|
|
9
|
+
export default function createElement(elementData, document) {
|
|
10
|
+
if (!elementData || !elementData.tag) {
|
|
11
|
+
return null;
|
|
12
|
+
}
|
|
13
|
+
var tag = elementData.tag, namespace = elementData.namespace, className = elementData.className, style = elementData.style, dataset = elementData.dataset, attributes = elementData.attributes, children = elementData.children;
|
|
14
|
+
var result = namespace
|
|
15
|
+
? document.createElementNS(namespace, tag)
|
|
16
|
+
: document.createElement(tag);
|
|
17
|
+
if (style) {
|
|
18
|
+
result.setAttribute('style', style);
|
|
19
|
+
}
|
|
20
|
+
if (className) {
|
|
21
|
+
result.className = className;
|
|
22
|
+
}
|
|
23
|
+
if (dataset && isNodeOfType(result, 'ELEMENT_NODE')) {
|
|
24
|
+
getObjectKeys(dataset).forEach(function (datasetName) {
|
|
25
|
+
result.dataset[datasetName] = dataset[datasetName];
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
if (attributes) {
|
|
29
|
+
getObjectKeys(attributes).forEach(function (attrName) {
|
|
30
|
+
result.setAttribute(attrName, attributes[attrName]);
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
if (children) {
|
|
34
|
+
children.forEach(function (child) {
|
|
35
|
+
if (typeof child === 'string') {
|
|
36
|
+
result.appendChild(document.createTextNode(child));
|
|
37
|
+
}
|
|
38
|
+
else if (child) {
|
|
39
|
+
var childElement = createElement(child, document);
|
|
40
|
+
if (childElement) {
|
|
41
|
+
result.appendChild(childElement);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
return result;
|
|
47
|
+
}
|
|
48
48
|
//# sourceMappingURL=createElement.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createElement.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-plugins/lib/pluginUtils/CreateElement/createElement.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAG1E;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,UAAU,aAAa,CACjC,WAA8B,EAC9B,QAAkB;IAElB,IAAI,CAAC,WAAW,IAAI,CAAC,WAAW,CAAC,GAAG,EAAE;QAClC,OAAO,IAAI,CAAC;KACf;IAEO,IAAA,GAAG,GAAiE,WAAW,IAA5E,EAAE,SAAS,GAAsD,WAAW,UAAjE,EAAE,SAAS,GAA2C,WAAW,UAAtD,EAAE,KAAK,GAAoC,WAAW,MAA/C,EAAE,OAAO,GAA2B,WAAW,QAAtC,EAAE,UAAU,GAAe,WAAW,WAA1B,EAAE,QAAQ,GAAK,WAAW,SAAhB,CAAiB;IACxF,IAAM,MAAM,GAAG,SAAS;QACpB,CAAC,CAAC,QAAQ,CAAC,eAAe,CAAC,SAAS,EAAE,GAAG,CAAC;QAC1C,CAAC,CAAC,QAAQ,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;IAElC,IAAI,KAAK,EAAE;QACP,MAAM,CAAC,YAAY,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;KACvC;IAED,IAAI,SAAS,EAAE;QACX,MAAM,CAAC,SAAS,GAAG,SAAS,CAAC;KAChC;IAED,IAAI,OAAO,IAAI,YAAY,CAAC,MAAM,EAAE,cAAc,CAAC,EAAE;QACjD,aAAa,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,UAAA,WAAW;YACtC,MAAM,CAAC,OAAO,CAAC,WAAW,CAAC,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;QACvD,CAAC,CAAC,CAAC;KACN;IAED,IAAI,UAAU,EAAE;QACZ,aAAa,CAAC,UAAU,CAAC,CAAC,OAAO,CAAC,UAAA,QAAQ;YACtC,MAAM,CAAC,YAAY,CAAC,QAAQ,EAAE,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC;QACxD,CAAC,CAAC,CAAC;KACN;IAED,IAAI,QAAQ,EAAE;QACV,QAAQ,CAAC,OAAO,CAAC,UAAA,KAAK;YAClB,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;gBAC3B,MAAM,CAAC,WAAW,CAAC,QAAQ,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC,CAAC;aACtD;iBAAM,IAAI,KAAK,EAAE;gBACd,IAAM,YAAY,GAAG,aAAa,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;gBACpD,IAAI,YAAY,EAAE;oBACd,MAAM,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC;iBACpC;aACJ;QACL,CAAC,CAAC,CAAC;KACN;IAED,OAAO,MAAM,CAAC;AAClB,CAAC","sourcesContent":["import { getObjectKeys, isNodeOfType } from 'roosterjs-content-model-dom';\
|
|
1
|
+
{"version":3,"file":"createElement.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-plugins/lib/pluginUtils/CreateElement/createElement.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAG1E;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,UAAU,aAAa,CACjC,WAA8B,EAC9B,QAAkB;IAElB,IAAI,CAAC,WAAW,IAAI,CAAC,WAAW,CAAC,GAAG,EAAE;QAClC,OAAO,IAAI,CAAC;KACf;IAEO,IAAA,GAAG,GAAiE,WAAW,IAA5E,EAAE,SAAS,GAAsD,WAAW,UAAjE,EAAE,SAAS,GAA2C,WAAW,UAAtD,EAAE,KAAK,GAAoC,WAAW,MAA/C,EAAE,OAAO,GAA2B,WAAW,QAAtC,EAAE,UAAU,GAAe,WAAW,WAA1B,EAAE,QAAQ,GAAK,WAAW,SAAhB,CAAiB;IACxF,IAAM,MAAM,GAAG,SAAS;QACpB,CAAC,CAAC,QAAQ,CAAC,eAAe,CAAC,SAAS,EAAE,GAAG,CAAC;QAC1C,CAAC,CAAC,QAAQ,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;IAElC,IAAI,KAAK,EAAE;QACP,MAAM,CAAC,YAAY,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;KACvC;IAED,IAAI,SAAS,EAAE;QACX,MAAM,CAAC,SAAS,GAAG,SAAS,CAAC;KAChC;IAED,IAAI,OAAO,IAAI,YAAY,CAAC,MAAM,EAAE,cAAc,CAAC,EAAE;QACjD,aAAa,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,UAAA,WAAW;YACtC,MAAM,CAAC,OAAO,CAAC,WAAW,CAAC,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;QACvD,CAAC,CAAC,CAAC;KACN;IAED,IAAI,UAAU,EAAE;QACZ,aAAa,CAAC,UAAU,CAAC,CAAC,OAAO,CAAC,UAAA,QAAQ;YACtC,MAAM,CAAC,YAAY,CAAC,QAAQ,EAAE,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC;QACxD,CAAC,CAAC,CAAC;KACN;IAED,IAAI,QAAQ,EAAE;QACV,QAAQ,CAAC,OAAO,CAAC,UAAA,KAAK;YAClB,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;gBAC3B,MAAM,CAAC,WAAW,CAAC,QAAQ,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC,CAAC;aACtD;iBAAM,IAAI,KAAK,EAAE;gBACd,IAAM,YAAY,GAAG,aAAa,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;gBACpD,IAAI,YAAY,EAAE;oBACd,MAAM,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC;iBACpC;aACJ;QACL,CAAC,CAAC,CAAC;KACN;IAED,OAAO,MAAM,CAAC;AAClB,CAAC","sourcesContent":["import { getObjectKeys, isNodeOfType } from 'roosterjs-content-model-dom';\nimport type CreateElementData from './CreateElementData';\n\n/**\n * @internal\n * Create DOM element from the given CreateElementData\n * @param elementData The CreateElementData or an index of a known CreateElementData used for creating this element\n * @param document The document to create the element from\n * @returns The root DOM element just created\n */\nexport default function createElement(\n elementData: CreateElementData,\n document: Document\n): Element | null {\n if (!elementData || !elementData.tag) {\n return null;\n }\n\n const { tag, namespace, className, style, dataset, attributes, children } = elementData;\n const result = namespace\n ? document.createElementNS(namespace, tag)\n : document.createElement(tag);\n\n if (style) {\n result.setAttribute('style', style);\n }\n\n if (className) {\n result.className = className;\n }\n\n if (dataset && isNodeOfType(result, 'ELEMENT_NODE')) {\n getObjectKeys(dataset).forEach(datasetName => {\n result.dataset[datasetName] = dataset[datasetName];\n });\n }\n\n if (attributes) {\n getObjectKeys(attributes).forEach(attrName => {\n result.setAttribute(attrName, attributes[attrName]);\n });\n }\n\n if (children) {\n children.forEach(child => {\n if (typeof child === 'string') {\n result.appendChild(document.createTextNode(child));\n } else if (child) {\n const childElement = createElement(child, document);\n if (childElement) {\n result.appendChild(childElement);\n }\n }\n });\n }\n\n return result;\n}\n"]}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @internal
|
|
3
|
-
* Represents a disposable object
|
|
4
|
-
*/
|
|
5
|
-
export default interface Disposable {
|
|
6
|
-
/**
|
|
7
|
-
* Dispose this object
|
|
8
|
-
*/
|
|
9
|
-
dispose: () => void;
|
|
10
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* @internal
|
|
3
|
+
* Represents a disposable object
|
|
4
|
+
*/
|
|
5
|
+
export default interface Disposable {
|
|
6
|
+
/**
|
|
7
|
+
* Dispose this object
|
|
8
|
+
*/
|
|
9
|
+
dispose: () => void;
|
|
10
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
2
2
|
//# sourceMappingURL=Disposable.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Disposable.js","sourceRoot":"","sources":["../../../../packages-content-model/roosterjs-content-model-plugins/lib/pluginUtils/Disposable.ts"],"names":[],"mappings":"","sourcesContent":["/**\
|
|
1
|
+
{"version":3,"file":"Disposable.js","sourceRoot":"","sources":["../../../../packages-content-model/roosterjs-content-model-plugins/lib/pluginUtils/Disposable.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * @internal\n * Represents a disposable object\n */\nexport default interface Disposable {\n /**\n * Dispose this object\n */\n dispose: () => void;\n}\n"]}
|
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @internal
|
|
3
|
-
* Drag and drop handler interface, used for implementing a handler object and pass into DragAndDropHelper class
|
|
4
|
-
*/
|
|
5
|
-
export default interface DragAndDropHandler<TContext, TInitValue> {
|
|
6
|
-
/**
|
|
7
|
-
* A callback that will be called when user starts to drag (mouse down event from the trigger element)
|
|
8
|
-
* @param context The context object that was passed into DragAndDropHelper from its constructor. We can use
|
|
9
|
-
* this object to communicate between caller code and this handler
|
|
10
|
-
* @param event The mouse event that triggers this callback
|
|
11
|
-
* @returns An optional object, which will be passed into onDragging and onDragEnd callback. It normally used
|
|
12
|
-
* for passing an initial state of the target object
|
|
13
|
-
*/
|
|
14
|
-
onDragStart?: (context: TContext, event: MouseEvent) => TInitValue;
|
|
15
|
-
/**
|
|
16
|
-
* A callback that will be called when user moves mouse and drag the trigger element.
|
|
17
|
-
* @param context The context object that was passed into DragAndDropHelper from its constructor. We can use
|
|
18
|
-
* this object to communicate between caller code and this handler.If an object is used as context, here it will
|
|
19
|
-
* be the same object that passed into constructor of DragAndDropHelper class. Inside this callback you can change
|
|
20
|
-
* its sub value so that caller can get the changed result.
|
|
21
|
-
* @param event The mouse event that triggers this callback
|
|
22
|
-
* @param initValue The initial value that is returned from onDragStart callback. It normally used
|
|
23
|
-
* for passing an initial state of the target object
|
|
24
|
-
* @param deltaX x delta value. It equals to current event.pageX - initial pageX (captured when mousedown happens)
|
|
25
|
-
* @param deltaY y delta value. It equals to current event.pageY - initial pageY (captured when mousedown happens)
|
|
26
|
-
* @returns Whether the onSubmit callback passed into constructor of DragAndDropHelper class should be invoked.
|
|
27
|
-
* Returns true will invoke the onSubmit callback, it means this is a meaningful dragging action, something (mostly
|
|
28
|
-
* under context object) has been changed, and caller should handle this change. Otherwise, return false.
|
|
29
|
-
*/
|
|
30
|
-
onDragging?: (context: TContext, event: MouseEvent, initValue: TInitValue, deltaX: number, deltaY: number) => boolean;
|
|
31
|
-
/**
|
|
32
|
-
* A callback that will be called when user stops dragging the trigger element.
|
|
33
|
-
* @param context The context object that was passed into DragAndDropHelper from its constructor. We can use
|
|
34
|
-
* this object to communicate between caller code and this handler.If an object is used as context, here it will
|
|
35
|
-
* be the same object that passed into constructor of DragAndDropHelper class. Inside this callback you can change
|
|
36
|
-
* its sub value so that caller can get the changed result.
|
|
37
|
-
* @param event The mouse event that triggers this callback
|
|
38
|
-
* @param initValue The initial value that is returned from onDragStart callback. It normally used
|
|
39
|
-
* for passing an initial state of the target object
|
|
40
|
-
* @returns Whether the onSubmit callback passed into constructor of DragAndDropHelper class should be invoked.
|
|
41
|
-
* Returns true will invoke the onSubmit callback, it means this is a meaningful dragging action, something (mostly
|
|
42
|
-
* under context object) has been changed, and caller should handle this change. Otherwise, return false.
|
|
43
|
-
*/
|
|
44
|
-
onDragEnd?: (context: TContext, event: MouseEvent, initValue: TInitValue | undefined) => boolean;
|
|
45
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* @internal
|
|
3
|
+
* Drag and drop handler interface, used for implementing a handler object and pass into DragAndDropHelper class
|
|
4
|
+
*/
|
|
5
|
+
export default interface DragAndDropHandler<TContext, TInitValue> {
|
|
6
|
+
/**
|
|
7
|
+
* A callback that will be called when user starts to drag (mouse down event from the trigger element)
|
|
8
|
+
* @param context The context object that was passed into DragAndDropHelper from its constructor. We can use
|
|
9
|
+
* this object to communicate between caller code and this handler
|
|
10
|
+
* @param event The mouse event that triggers this callback
|
|
11
|
+
* @returns An optional object, which will be passed into onDragging and onDragEnd callback. It normally used
|
|
12
|
+
* for passing an initial state of the target object
|
|
13
|
+
*/
|
|
14
|
+
onDragStart?: (context: TContext, event: MouseEvent) => TInitValue;
|
|
15
|
+
/**
|
|
16
|
+
* A callback that will be called when user moves mouse and drag the trigger element.
|
|
17
|
+
* @param context The context object that was passed into DragAndDropHelper from its constructor. We can use
|
|
18
|
+
* this object to communicate between caller code and this handler.If an object is used as context, here it will
|
|
19
|
+
* be the same object that passed into constructor of DragAndDropHelper class. Inside this callback you can change
|
|
20
|
+
* its sub value so that caller can get the changed result.
|
|
21
|
+
* @param event The mouse event that triggers this callback
|
|
22
|
+
* @param initValue The initial value that is returned from onDragStart callback. It normally used
|
|
23
|
+
* for passing an initial state of the target object
|
|
24
|
+
* @param deltaX x delta value. It equals to current event.pageX - initial pageX (captured when mousedown happens)
|
|
25
|
+
* @param deltaY y delta value. It equals to current event.pageY - initial pageY (captured when mousedown happens)
|
|
26
|
+
* @returns Whether the onSubmit callback passed into constructor of DragAndDropHelper class should be invoked.
|
|
27
|
+
* Returns true will invoke the onSubmit callback, it means this is a meaningful dragging action, something (mostly
|
|
28
|
+
* under context object) has been changed, and caller should handle this change. Otherwise, return false.
|
|
29
|
+
*/
|
|
30
|
+
onDragging?: (context: TContext, event: MouseEvent, initValue: TInitValue, deltaX: number, deltaY: number) => boolean;
|
|
31
|
+
/**
|
|
32
|
+
* A callback that will be called when user stops dragging the trigger element.
|
|
33
|
+
* @param context The context object that was passed into DragAndDropHelper from its constructor. We can use
|
|
34
|
+
* this object to communicate between caller code and this handler.If an object is used as context, here it will
|
|
35
|
+
* be the same object that passed into constructor of DragAndDropHelper class. Inside this callback you can change
|
|
36
|
+
* its sub value so that caller can get the changed result.
|
|
37
|
+
* @param event The mouse event that triggers this callback
|
|
38
|
+
* @param initValue The initial value that is returned from onDragStart callback. It normally used
|
|
39
|
+
* for passing an initial state of the target object
|
|
40
|
+
* @returns Whether the onSubmit callback passed into constructor of DragAndDropHelper class should be invoked.
|
|
41
|
+
* Returns true will invoke the onSubmit callback, it means this is a meaningful dragging action, something (mostly
|
|
42
|
+
* under context object) has been changed, and caller should handle this change. Otherwise, return false.
|
|
43
|
+
*/
|
|
44
|
+
onDragEnd?: (context: TContext, event: MouseEvent, initValue: TInitValue | undefined) => boolean;
|
|
45
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
2
2
|
//# sourceMappingURL=DragAndDropHandler.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DragAndDropHandler.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-plugins/lib/pluginUtils/DragAndDrop/DragAndDropHandler.ts"],"names":[],"mappings":"","sourcesContent":["/**\
|
|
1
|
+
{"version":3,"file":"DragAndDropHandler.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-plugins/lib/pluginUtils/DragAndDrop/DragAndDropHandler.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * @internal\n * Drag and drop handler interface, used for implementing a handler object and pass into DragAndDropHelper class\n */\nexport default interface DragAndDropHandler<TContext, TInitValue> {\n /**\n * A callback that will be called when user starts to drag (mouse down event from the trigger element)\n * @param context The context object that was passed into DragAndDropHelper from its constructor. We can use\n * this object to communicate between caller code and this handler\n * @param event The mouse event that triggers this callback\n * @returns An optional object, which will be passed into onDragging and onDragEnd callback. It normally used\n * for passing an initial state of the target object\n */\n onDragStart?: (context: TContext, event: MouseEvent) => TInitValue;\n\n /**\n * A callback that will be called when user moves mouse and drag the trigger element.\n * @param context The context object that was passed into DragAndDropHelper from its constructor. We can use\n * this object to communicate between caller code and this handler.If an object is used as context, here it will\n * be the same object that passed into constructor of DragAndDropHelper class. Inside this callback you can change\n * its sub value so that caller can get the changed result.\n * @param event The mouse event that triggers this callback\n * @param initValue The initial value that is returned from onDragStart callback. It normally used\n * for passing an initial state of the target object\n * @param deltaX x delta value. It equals to current event.pageX - initial pageX (captured when mousedown happens)\n * @param deltaY y delta value. It equals to current event.pageY - initial pageY (captured when mousedown happens)\n * @returns Whether the onSubmit callback passed into constructor of DragAndDropHelper class should be invoked.\n * Returns true will invoke the onSubmit callback, it means this is a meaningful dragging action, something (mostly\n * under context object) has been changed, and caller should handle this change. Otherwise, return false.\n */\n onDragging?: (\n context: TContext,\n event: MouseEvent,\n initValue: TInitValue,\n deltaX: number,\n deltaY: number\n ) => boolean;\n\n /**\n * A callback that will be called when user stops dragging the trigger element.\n * @param context The context object that was passed into DragAndDropHelper from its constructor. We can use\n * this object to communicate between caller code and this handler.If an object is used as context, here it will\n * be the same object that passed into constructor of DragAndDropHelper class. Inside this callback you can change\n * its sub value so that caller can get the changed result.\n * @param event The mouse event that triggers this callback\n * @param initValue The initial value that is returned from onDragStart callback. It normally used\n * for passing an initial state of the target object\n * @returns Whether the onSubmit callback passed into constructor of DragAndDropHelper class should be invoked.\n * Returns true will invoke the onSubmit callback, it means this is a meaningful dragging action, something (mostly\n * under context object) has been changed, and caller should handle this change. Otherwise, return false.\n */\n onDragEnd?: (\n context: TContext,\n event: MouseEvent,\n initValue: TInitValue | undefined\n ) => boolean;\n}\n"]}
|