roosterjs-content-model-plugins 0.21.2 → 0.21.4
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/edit/ContentModelEditPlugin.d.ts +35 -35
- package/lib/edit/ContentModelEditPlugin.js +75 -75
- package/lib/edit/ContentModelEditPlugin.js.map +1 -1
- package/lib/edit/deleteSteps/deleteAllSegmentBefore.d.ts +5 -5
- package/lib/edit/deleteSteps/deleteAllSegmentBefore.js +19 -19
- package/lib/edit/deleteSteps/deleteAllSegmentBefore.js.map +1 -1
- package/lib/edit/deleteSteps/deleteCollapsedSelection.d.ts +9 -9
- package/lib/edit/deleteSteps/deleteCollapsedSelection.js +90 -90
- package/lib/edit/deleteSteps/deleteCollapsedSelection.js.map +1 -1
- package/lib/edit/deleteSteps/deleteWordSelection.d.ts +9 -9
- package/lib/edit/deleteSteps/deleteWordSelection.js +170 -170
- package/lib/edit/deleteSteps/deleteWordSelection.js.map +1 -1
- package/lib/edit/handleKeyboardEventCommon.d.ts +15 -15
- package/lib/edit/handleKeyboardEventCommon.js +54 -54
- package/lib/edit/handleKeyboardEventCommon.js.map +1 -1
- package/lib/edit/keyboardDelete.d.ts +8 -8
- package/lib/edit/keyboardDelete.js +67 -67
- package/lib/edit/keyboardDelete.js.map +1 -1
- package/lib/edit/keyboardInput.d.ts +5 -5
- package/lib/edit/keyboardInput.js +50 -49
- package/lib/edit/keyboardInput.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/entityDelimiter/EntityDelimiterPlugin.d.ts +35 -35
- package/lib/entityDelimiter/EntityDelimiterPlugin.js +256 -254
- package/lib/entityDelimiter/EntityDelimiterPlugin.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/ContentModelPastePlugin.d.ts +42 -42
- package/lib/paste/ContentModelPastePlugin.js +148 -148
- package/lib/paste/ContentModelPastePlugin.js.map +1 -1
- package/lib/paste/Excel/processPastedContentFromExcel.d.ts +13 -13
- package/lib/paste/Excel/processPastedContentFromExcel.js +82 -82
- package/lib/paste/Excel/processPastedContentFromExcel.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/processPastedContentWacComponents.d.ts +9 -9
- package/lib/paste/WacComponents/processPastedContentWacComponents.js +207 -207
- package/lib/paste/WacComponents/processPastedContentWacComponents.js.map +1 -1
- package/lib/paste/WordDesktop/processPastedContentFromWordDesktop.d.ts +12 -12
- package/lib/paste/WordDesktop/processPastedContentFromWordDesktop.js +69 -69
- 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 +10 -10
- package/lib/paste/WordDesktop/processWordLists.js +154 -154
- package/lib/paste/WordDesktop/processWordLists.js.map +1 -1
- package/lib/paste/pasteSourceValidations/constants.d.ts +17 -17
- package/lib/paste/pasteSourceValidations/constants.js +21 -21
- package/lib/paste/pasteSourceValidations/constants.js.map +1 -1
- package/lib/paste/pasteSourceValidations/documentContainWacElements.d.ts +8 -8
- package/lib/paste/pasteSourceValidations/documentContainWacElements.js +24 -24
- 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 +16 -16
- package/lib/paste/pasteSourceValidations/isExcelDesktopDocument.js.map +1 -1
- package/lib/paste/pasteSourceValidations/isExcelOnlineDocument.d.ts +8 -8
- package/lib/paste/pasteSourceValidations/isExcelOnlineDocument.js +18 -18
- package/lib/paste/pasteSourceValidations/isExcelOnlineDocument.js.map +1 -1
- package/lib/paste/pasteSourceValidations/isGoogleSheetDocument.d.ts +8 -8
- package/lib/paste/pasteSourceValidations/isGoogleSheetDocument.js +14 -14
- package/lib/paste/pasteSourceValidations/isGoogleSheetDocument.js.map +1 -1
- package/lib/paste/pasteSourceValidations/isPowerPointDesktopDocument.d.ts +8 -8
- package/lib/paste/pasteSourceValidations/isPowerPointDesktopDocument.js +14 -14
- package/lib/paste/pasteSourceValidations/isPowerPointDesktopDocument.js.map +1 -1
- package/lib/paste/pasteSourceValidations/isWordDesktopDocument.d.ts +8 -8
- package/lib/paste/pasteSourceValidations/isWordDesktopDocument.js +18 -18
- 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-amd/edit/ContentModelEditPlugin.d.ts +35 -35
- package/lib-amd/edit/ContentModelEditPlugin.js +75 -75
- package/lib-amd/edit/ContentModelEditPlugin.js.map +1 -1
- package/lib-amd/edit/deleteSteps/deleteAllSegmentBefore.d.ts +5 -5
- package/lib-amd/edit/deleteSteps/deleteAllSegmentBefore.js +20 -20
- 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 +89 -89
- package/lib-amd/edit/deleteSteps/deleteCollapsedSelection.js.map +1 -1
- package/lib-amd/edit/deleteSteps/deleteWordSelection.d.ts +9 -9
- package/lib-amd/edit/deleteSteps/deleteWordSelection.js +169 -169
- package/lib-amd/edit/deleteSteps/deleteWordSelection.js.map +1 -1
- package/lib-amd/edit/handleKeyboardEventCommon.d.ts +15 -15
- package/lib-amd/edit/handleKeyboardEventCommon.js +55 -55
- package/lib-amd/edit/handleKeyboardEventCommon.js.map +1 -1
- package/lib-amd/edit/keyboardDelete.d.ts +8 -8
- package/lib-amd/edit/keyboardDelete.js +63 -63
- package/lib-amd/edit/keyboardDelete.js.map +1 -1
- package/lib-amd/edit/keyboardInput.d.ts +5 -5
- package/lib-amd/edit/keyboardInput.js +50 -49
- package/lib-amd/edit/keyboardInput.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/entityDelimiter/EntityDelimiterPlugin.d.ts +35 -35
- package/lib-amd/entityDelimiter/EntityDelimiterPlugin.js +255 -253
- package/lib-amd/entityDelimiter/EntityDelimiterPlugin.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/ContentModelPastePlugin.d.ts +42 -42
- package/lib-amd/paste/ContentModelPastePlugin.js +140 -140
- package/lib-amd/paste/ContentModelPastePlugin.js.map +1 -1
- package/lib-amd/paste/Excel/processPastedContentFromExcel.d.ts +13 -13
- package/lib-amd/paste/Excel/processPastedContentFromExcel.js +80 -80
- package/lib-amd/paste/Excel/processPastedContentFromExcel.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/processPastedContentWacComponents.d.ts +9 -9
- package/lib-amd/paste/WacComponents/processPastedContentWacComponents.js +206 -206
- package/lib-amd/paste/WacComponents/processPastedContentWacComponents.js.map +1 -1
- package/lib-amd/paste/WordDesktop/processPastedContentFromWordDesktop.d.ts +12 -12
- package/lib-amd/paste/WordDesktop/processPastedContentFromWordDesktop.js +64 -64
- 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 +10 -10
- package/lib-amd/paste/WordDesktop/processWordLists.js +153 -153
- package/lib-amd/paste/WordDesktop/processWordLists.js.map +1 -1
- package/lib-amd/paste/pasteSourceValidations/constants.d.ts +17 -17
- package/lib-amd/paste/pasteSourceValidations/constants.js +23 -23
- 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 +26 -26
- 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-mjs/edit/ContentModelEditPlugin.d.ts +35 -35
- package/lib-mjs/edit/ContentModelEditPlugin.js +72 -72
- package/lib-mjs/edit/ContentModelEditPlugin.js.map +1 -1
- package/lib-mjs/edit/deleteSteps/deleteAllSegmentBefore.d.ts +5 -5
- package/lib-mjs/edit/deleteSteps/deleteAllSegmentBefore.js +15 -15
- 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 +87 -87
- package/lib-mjs/edit/deleteSteps/deleteCollapsedSelection.js.map +1 -1
- package/lib-mjs/edit/deleteSteps/deleteWordSelection.d.ts +9 -9
- package/lib-mjs/edit/deleteSteps/deleteWordSelection.js +167 -167
- package/lib-mjs/edit/deleteSteps/deleteWordSelection.js.map +1 -1
- package/lib-mjs/edit/handleKeyboardEventCommon.d.ts +15 -15
- package/lib-mjs/edit/handleKeyboardEventCommon.js +48 -48
- package/lib-mjs/edit/handleKeyboardEventCommon.js.map +1 -1
- package/lib-mjs/edit/keyboardDelete.d.ts +8 -8
- package/lib-mjs/edit/keyboardDelete.js +63 -63
- package/lib-mjs/edit/keyboardDelete.js.map +1 -1
- package/lib-mjs/edit/keyboardInput.d.ts +5 -5
- package/lib-mjs/edit/keyboardInput.js +46 -45
- package/lib-mjs/edit/keyboardInput.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/entityDelimiter/EntityDelimiterPlugin.d.ts +35 -35
- package/lib-mjs/entityDelimiter/EntityDelimiterPlugin.js +252 -250
- package/lib-mjs/entityDelimiter/EntityDelimiterPlugin.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/ContentModelPastePlugin.d.ts +42 -42
- package/lib-mjs/paste/ContentModelPastePlugin.js +145 -145
- package/lib-mjs/paste/ContentModelPastePlugin.js.map +1 -1
- package/lib-mjs/paste/Excel/processPastedContentFromExcel.d.ts +13 -13
- package/lib-mjs/paste/Excel/processPastedContentFromExcel.js +77 -77
- package/lib-mjs/paste/Excel/processPastedContentFromExcel.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/processPastedContentWacComponents.d.ts +9 -9
- package/lib-mjs/paste/WacComponents/processPastedContentWacComponents.js +203 -203
- package/lib-mjs/paste/WacComponents/processPastedContentWacComponents.js.map +1 -1
- package/lib-mjs/paste/WordDesktop/processPastedContentFromWordDesktop.d.ts +12 -12
- package/lib-mjs/paste/WordDesktop/processPastedContentFromWordDesktop.js +64 -64
- 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 +10 -10
- package/lib-mjs/paste/WordDesktop/processWordLists.js +150 -150
- package/lib-mjs/paste/WordDesktop/processWordLists.js.map +1 -1
- package/lib-mjs/paste/pasteSourceValidations/constants.d.ts +17 -17
- package/lib-mjs/paste/pasteSourceValidations/constants.js +18 -18
- 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 +20 -20
- 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 +12 -12
- 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 +14 -14
- 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 +10 -10
- 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 +10 -10
- 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 +14 -14
- 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/package.json +1 -1
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @internal
|
|
3
|
-
*/
|
|
4
|
-
export declare const enum PastePropertyNames {
|
|
5
|
-
/**
|
|
6
|
-
* Node attribute used to identify if the content is from Google Sheets.
|
|
7
|
-
*/
|
|
8
|
-
GOOGLE_SHEET_NODE_NAME = "google-sheets-html-origin",
|
|
9
|
-
/**
|
|
10
|
-
* Name of the HTMLMeta Property that provides the Office App Source of the pasted content
|
|
11
|
-
*/
|
|
12
|
-
PROG_ID_NAME = "ProgId",
|
|
13
|
-
/**
|
|
14
|
-
* Name of the HTMLMeta Property that identifies pated content as from Excel Desktop
|
|
15
|
-
*/
|
|
16
|
-
EXCEL_DESKTOP_ATTRIBUTE_NAME = "xmlns:x"
|
|
17
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* @internal
|
|
3
|
+
*/
|
|
4
|
+
export declare const enum PastePropertyNames {
|
|
5
|
+
/**
|
|
6
|
+
* Node attribute used to identify if the content is from Google Sheets.
|
|
7
|
+
*/
|
|
8
|
+
GOOGLE_SHEET_NODE_NAME = "google-sheets-html-origin",
|
|
9
|
+
/**
|
|
10
|
+
* Name of the HTMLMeta Property that provides the Office App Source of the pasted content
|
|
11
|
+
*/
|
|
12
|
+
PROG_ID_NAME = "ProgId",
|
|
13
|
+
/**
|
|
14
|
+
* Name of the HTMLMeta Property that identifies pated content as from Excel Desktop
|
|
15
|
+
*/
|
|
16
|
+
EXCEL_DESKTOP_ATTRIBUTE_NAME = "xmlns:x"
|
|
17
|
+
}
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @internal
|
|
3
|
-
*/
|
|
4
|
-
export var PastePropertyNames;
|
|
5
|
-
(function (PastePropertyNames) {
|
|
6
|
-
/**
|
|
7
|
-
* Node attribute used to identify if the content is from Google Sheets.
|
|
8
|
-
*/
|
|
9
|
-
PastePropertyNames["GOOGLE_SHEET_NODE_NAME"] = "google-sheets-html-origin";
|
|
10
|
-
/**
|
|
11
|
-
* Name of the HTMLMeta Property that provides the Office App Source of the pasted content
|
|
12
|
-
*/
|
|
13
|
-
PastePropertyNames["PROG_ID_NAME"] = "ProgId";
|
|
14
|
-
/**
|
|
15
|
-
* Name of the HTMLMeta Property that identifies pated content as from Excel Desktop
|
|
16
|
-
*/
|
|
17
|
-
PastePropertyNames["EXCEL_DESKTOP_ATTRIBUTE_NAME"] = "xmlns:x";
|
|
18
|
-
})(PastePropertyNames || (PastePropertyNames = {}));
|
|
1
|
+
/**
|
|
2
|
+
* @internal
|
|
3
|
+
*/
|
|
4
|
+
export var PastePropertyNames;
|
|
5
|
+
(function (PastePropertyNames) {
|
|
6
|
+
/**
|
|
7
|
+
* Node attribute used to identify if the content is from Google Sheets.
|
|
8
|
+
*/
|
|
9
|
+
PastePropertyNames["GOOGLE_SHEET_NODE_NAME"] = "google-sheets-html-origin";
|
|
10
|
+
/**
|
|
11
|
+
* Name of the HTMLMeta Property that provides the Office App Source of the pasted content
|
|
12
|
+
*/
|
|
13
|
+
PastePropertyNames["PROG_ID_NAME"] = "ProgId";
|
|
14
|
+
/**
|
|
15
|
+
* Name of the HTMLMeta Property that identifies pated content as from Excel Desktop
|
|
16
|
+
*/
|
|
17
|
+
PastePropertyNames["EXCEL_DESKTOP_ATTRIBUTE_NAME"] = "xmlns:x";
|
|
18
|
+
})(PastePropertyNames || (PastePropertyNames = {}));
|
|
19
19
|
//# sourceMappingURL=constants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-plugins/lib/paste/pasteSourceValidations/constants.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAN,IAAkB,kBAejB;AAfD,WAAkB,kBAAkB;IAChC;;OAEG;IACH,0EAAoD,CAAA;IAEpD;;OAEG;IACH,6CAAuB,CAAA;IAEvB;;OAEG;IACH,8DAAwC,CAAA;AAC5C,CAAC,EAfiB,kBAAkB,KAAlB,kBAAkB,QAenC","sourcesContent":["/**\n * @internal\n */\nexport const enum PastePropertyNames {\n /**\n * Node attribute used to identify if the content is from Google Sheets.\n */\n GOOGLE_SHEET_NODE_NAME = 'google-sheets-html-origin',\n\n /**\n * Name of the HTMLMeta Property that provides the Office App Source of the pasted content\n */\n PROG_ID_NAME = 'ProgId',\n\n /**\n * Name of the HTMLMeta Property that identifies pated content as from Excel Desktop\n */\n EXCEL_DESKTOP_ATTRIBUTE_NAME = 'xmlns:x',\n}\n"]}
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-plugins/lib/paste/pasteSourceValidations/constants.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAN,IAAkB,kBAejB;AAfD,WAAkB,kBAAkB;IAChC;;OAEG;IACH,0EAAoD,CAAA;IAEpD;;OAEG;IACH,6CAAuB,CAAA;IAEvB;;OAEG;IACH,8DAAwC,CAAA;AAC5C,CAAC,EAfiB,kBAAkB,KAAlB,kBAAkB,QAenC","sourcesContent":["/**\r\n * @internal\r\n */\r\nexport const enum PastePropertyNames {\r\n /**\r\n * Node attribute used to identify if the content is from Google Sheets.\r\n */\r\n GOOGLE_SHEET_NODE_NAME = 'google-sheets-html-origin',\r\n\r\n /**\r\n * Name of the HTMLMeta Property that provides the Office App Source of the pasted content\r\n */\r\n PROG_ID_NAME = 'ProgId',\r\n\r\n /**\r\n * Name of the HTMLMeta Property that identifies pated content as from Excel Desktop\r\n */\r\n EXCEL_DESKTOP_ATTRIBUTE_NAME = 'xmlns:x',\r\n}\r\n"]}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { GetSourceFunction } from './getPasteSource';
|
|
2
|
-
/**
|
|
3
|
-
* @internal
|
|
4
|
-
* Check whether the fragment provided contain Wac Elements
|
|
5
|
-
* @param props Properties related to the PasteEvent
|
|
6
|
-
* @returns
|
|
7
|
-
*/
|
|
8
|
-
export declare const documentContainWacElements: GetSourceFunction;
|
|
1
|
+
import type { GetSourceFunction } from './getPasteSource';
|
|
2
|
+
/**
|
|
3
|
+
* @internal
|
|
4
|
+
* Check whether the fragment provided contain Wac Elements
|
|
5
|
+
* @param props Properties related to the PasteEvent
|
|
6
|
+
* @returns
|
|
7
|
+
*/
|
|
8
|
+
export declare const documentContainWacElements: GetSourceFunction;
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
var WORD_ONLINE_TABLE_TEMP_ELEMENT_CLASSES = [
|
|
2
|
-
'TableInsertRowGapBlank',
|
|
3
|
-
'TableColumnResizeHandle',
|
|
4
|
-
'TableCellTopBorderHandle',
|
|
5
|
-
'TableCellLeftBorderHandle',
|
|
6
|
-
'TableHoverColumnHandle',
|
|
7
|
-
'TableHoverRowHandle',
|
|
8
|
-
];
|
|
9
|
-
var WAC_IDENTIFY_SELECTOR = 'ul[class^="BulletListStyle"]>.OutlineElement,ol[class^="NumberListStyle"]>.OutlineElement,span.WACImageContainer,' +
|
|
10
|
-
WORD_ONLINE_TABLE_TEMP_ELEMENT_CLASSES.map(function (c) { return "table div[class^=\"" + c + "\"]"; }).join(',');
|
|
11
|
-
/**
|
|
12
|
-
* @internal
|
|
13
|
-
* Check whether the fragment provided contain Wac Elements
|
|
14
|
-
* @param props Properties related to the PasteEvent
|
|
15
|
-
* @returns
|
|
16
|
-
*/
|
|
17
|
-
export var documentContainWacElements = function (props) {
|
|
18
|
-
var fragment = props.fragment;
|
|
19
|
-
return !!fragment.querySelector(WAC_IDENTIFY_SELECTOR);
|
|
20
|
-
};
|
|
1
|
+
var WORD_ONLINE_TABLE_TEMP_ELEMENT_CLASSES = [
|
|
2
|
+
'TableInsertRowGapBlank',
|
|
3
|
+
'TableColumnResizeHandle',
|
|
4
|
+
'TableCellTopBorderHandle',
|
|
5
|
+
'TableCellLeftBorderHandle',
|
|
6
|
+
'TableHoverColumnHandle',
|
|
7
|
+
'TableHoverRowHandle',
|
|
8
|
+
];
|
|
9
|
+
var WAC_IDENTIFY_SELECTOR = 'ul[class^="BulletListStyle"]>.OutlineElement,ol[class^="NumberListStyle"]>.OutlineElement,span.WACImageContainer,' +
|
|
10
|
+
WORD_ONLINE_TABLE_TEMP_ELEMENT_CLASSES.map(function (c) { return "table div[class^=\"" + c + "\"]"; }).join(',');
|
|
11
|
+
/**
|
|
12
|
+
* @internal
|
|
13
|
+
* Check whether the fragment provided contain Wac Elements
|
|
14
|
+
* @param props Properties related to the PasteEvent
|
|
15
|
+
* @returns
|
|
16
|
+
*/
|
|
17
|
+
export var documentContainWacElements = function (props) {
|
|
18
|
+
var fragment = props.fragment;
|
|
19
|
+
return !!fragment.querySelector(WAC_IDENTIFY_SELECTOR);
|
|
20
|
+
};
|
|
21
21
|
//# sourceMappingURL=documentContainWacElements.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"documentContainWacElements.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-plugins/lib/paste/pasteSourceValidations/documentContainWacElements.ts"],"names":[],"mappings":"AAEA,IAAM,sCAAsC,GAAG;IAC3C,wBAAwB;IACxB,yBAAyB;IACzB,0BAA0B;IAC1B,2BAA2B;IAC3B,wBAAwB;IACxB,qBAAqB;CACxB,CAAC;AAEF,IAAM,qBAAqB,GACvB,mHAAmH;IACnH,sCAAsC,CAAC,GAAG,CAAC,UAAA,CAAC,IAAI,OAAA,wBAAqB,CAAC,QAAI,EAA1B,CAA0B,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAE1F;;;;;GAKG;AACH,MAAM,CAAC,IAAM,0BAA0B,GAAsB,UAAA,KAAK;IACtD,IAAA,QAAQ,GAAK,KAAK,SAAV,CAAW;IAC3B,OAAO,CAAC,CAAC,QAAQ,CAAC,aAAa,CAAC,qBAAqB,CAAC,CAAC;AAC3D,CAAC,CAAC","sourcesContent":["import type { GetSourceFunction } from './getPasteSource';\n\nconst WORD_ONLINE_TABLE_TEMP_ELEMENT_CLASSES = [\n 'TableInsertRowGapBlank',\n 'TableColumnResizeHandle',\n 'TableCellTopBorderHandle',\n 'TableCellLeftBorderHandle',\n 'TableHoverColumnHandle',\n 'TableHoverRowHandle',\n];\n\nconst WAC_IDENTIFY_SELECTOR =\n 'ul[class^=\"BulletListStyle\"]>.OutlineElement,ol[class^=\"NumberListStyle\"]>.OutlineElement,span.WACImageContainer,' +\n WORD_ONLINE_TABLE_TEMP_ELEMENT_CLASSES.map(c => `table div[class^=\"${c}\"]`).join(',');\n\n/**\n * @internal\n * Check whether the fragment provided contain Wac Elements\n * @param props Properties related to the PasteEvent\n * @returns\n */\nexport const documentContainWacElements: GetSourceFunction = props => {\n const { fragment } = props;\n return !!fragment.querySelector(WAC_IDENTIFY_SELECTOR);\n};\n"]}
|
|
1
|
+
{"version":3,"file":"documentContainWacElements.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-plugins/lib/paste/pasteSourceValidations/documentContainWacElements.ts"],"names":[],"mappings":"AAEA,IAAM,sCAAsC,GAAG;IAC3C,wBAAwB;IACxB,yBAAyB;IACzB,0BAA0B;IAC1B,2BAA2B;IAC3B,wBAAwB;IACxB,qBAAqB;CACxB,CAAC;AAEF,IAAM,qBAAqB,GACvB,mHAAmH;IACnH,sCAAsC,CAAC,GAAG,CAAC,UAAA,CAAC,IAAI,OAAA,wBAAqB,CAAC,QAAI,EAA1B,CAA0B,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAE1F;;;;;GAKG;AACH,MAAM,CAAC,IAAM,0BAA0B,GAAsB,UAAA,KAAK;IACtD,IAAA,QAAQ,GAAK,KAAK,SAAV,CAAW;IAC3B,OAAO,CAAC,CAAC,QAAQ,CAAC,aAAa,CAAC,qBAAqB,CAAC,CAAC;AAC3D,CAAC,CAAC","sourcesContent":["import type { GetSourceFunction } from './getPasteSource';\r\n\r\nconst WORD_ONLINE_TABLE_TEMP_ELEMENT_CLASSES = [\r\n 'TableInsertRowGapBlank',\r\n 'TableColumnResizeHandle',\r\n 'TableCellTopBorderHandle',\r\n 'TableCellLeftBorderHandle',\r\n 'TableHoverColumnHandle',\r\n 'TableHoverRowHandle',\r\n];\r\n\r\nconst WAC_IDENTIFY_SELECTOR =\r\n 'ul[class^=\"BulletListStyle\"]>.OutlineElement,ol[class^=\"NumberListStyle\"]>.OutlineElement,span.WACImageContainer,' +\r\n WORD_ONLINE_TABLE_TEMP_ELEMENT_CLASSES.map(c => `table div[class^=\"${c}\"]`).join(',');\r\n\r\n/**\r\n * @internal\r\n * Check whether the fragment provided contain Wac Elements\r\n * @param props Properties related to the PasteEvent\r\n * @returns\r\n */\r\nexport const documentContainWacElements: GetSourceFunction = props => {\r\n const { fragment } = props;\r\n return !!fragment.querySelector(WAC_IDENTIFY_SELECTOR);\r\n};\r\n"]}
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import type { BeforePasteEvent, ClipboardData } from 'roosterjs-editor-types';
|
|
2
|
-
/**
|
|
3
|
-
* @internal
|
|
4
|
-
*/
|
|
5
|
-
export declare type GetSourceInputParams = {
|
|
6
|
-
htmlAttributes: Record<string, string>;
|
|
7
|
-
fragment: DocumentFragment;
|
|
8
|
-
shouldConvertSingleImage: boolean;
|
|
9
|
-
clipboardData: ClipboardData;
|
|
10
|
-
};
|
|
11
|
-
/**
|
|
12
|
-
* @internal
|
|
13
|
-
* Represent the types of sources to handle in the Paste Plugin
|
|
14
|
-
*/
|
|
15
|
-
export declare type KnownPasteSourceType = 'wordDesktop' | 'excelDesktop' | 'excelOnline' | 'powerPointDesktop' | 'googleSheets' | 'wacComponents' | 'default' | 'singleImage';
|
|
16
|
-
/**
|
|
17
|
-
* @internal
|
|
18
|
-
*/
|
|
19
|
-
export declare type GetSourceFunction = (props: GetSourceInputParams) => boolean;
|
|
20
|
-
/**
|
|
21
|
-
* @internal
|
|
22
|
-
* This function tries to get the source of the Pasted content
|
|
23
|
-
* @param event the before paste event
|
|
24
|
-
* @param shouldConvertSingleImage Whether convert single image is enabled.
|
|
25
|
-
* @returns The Type of pasted content, if no type found will return {KnownSourceType.Default}
|
|
26
|
-
*/
|
|
27
|
-
export declare function getPasteSource(event: BeforePasteEvent, shouldConvertSingleImage: boolean): KnownPasteSourceType;
|
|
1
|
+
import type { BeforePasteEvent, ClipboardData } from 'roosterjs-editor-types';
|
|
2
|
+
/**
|
|
3
|
+
* @internal
|
|
4
|
+
*/
|
|
5
|
+
export declare type GetSourceInputParams = {
|
|
6
|
+
htmlAttributes: Record<string, string>;
|
|
7
|
+
fragment: DocumentFragment;
|
|
8
|
+
shouldConvertSingleImage: boolean;
|
|
9
|
+
clipboardData: ClipboardData;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* @internal
|
|
13
|
+
* Represent the types of sources to handle in the Paste Plugin
|
|
14
|
+
*/
|
|
15
|
+
export declare type KnownPasteSourceType = 'wordDesktop' | 'excelDesktop' | 'excelOnline' | 'powerPointDesktop' | 'googleSheets' | 'wacComponents' | 'default' | 'singleImage';
|
|
16
|
+
/**
|
|
17
|
+
* @internal
|
|
18
|
+
*/
|
|
19
|
+
export declare type GetSourceFunction = (props: GetSourceInputParams) => boolean;
|
|
20
|
+
/**
|
|
21
|
+
* @internal
|
|
22
|
+
* This function tries to get the source of the Pasted content
|
|
23
|
+
* @param event the before paste event
|
|
24
|
+
* @param shouldConvertSingleImage Whether convert single image is enabled.
|
|
25
|
+
* @returns The Type of pasted content, if no type found will return {KnownSourceType.Default}
|
|
26
|
+
*/
|
|
27
|
+
export declare function getPasteSource(event: BeforePasteEvent, shouldConvertSingleImage: boolean): KnownPasteSourceType;
|
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
import { documentContainWacElements } from './documentContainWacElements';
|
|
2
|
-
import { isExcelDesktopDocument } from './isExcelDesktopDocument';
|
|
3
|
-
import { isExcelOnlineDocument } from './isExcelOnlineDocument';
|
|
4
|
-
import { isGoogleSheetDocument } from './isGoogleSheetDocument';
|
|
5
|
-
import { isPowerPointDesktopDocument } from './isPowerPointDesktopDocument';
|
|
6
|
-
import { isWordDesktopDocument } from './isWordDesktopDocument';
|
|
7
|
-
import { shouldConvertToSingleImage } from './shouldConvertToSingleImage';
|
|
8
|
-
var getSourceFunctions = new Map([
|
|
9
|
-
['wordDesktop', isWordDesktopDocument],
|
|
10
|
-
['excelDesktop', isExcelDesktopDocument],
|
|
11
|
-
['excelOnline', isExcelOnlineDocument],
|
|
12
|
-
['powerPointDesktop', isPowerPointDesktopDocument],
|
|
13
|
-
['wacComponents', documentContainWacElements],
|
|
14
|
-
['googleSheets', isGoogleSheetDocument],
|
|
15
|
-
['singleImage', shouldConvertToSingleImage],
|
|
16
|
-
]);
|
|
17
|
-
/**
|
|
18
|
-
* @internal
|
|
19
|
-
* This function tries to get the source of the Pasted content
|
|
20
|
-
* @param event the before paste event
|
|
21
|
-
* @param shouldConvertSingleImage Whether convert single image is enabled.
|
|
22
|
-
* @returns The Type of pasted content, if no type found will return {KnownSourceType.Default}
|
|
23
|
-
*/
|
|
24
|
-
export function getPasteSource(event, shouldConvertSingleImage) {
|
|
25
|
-
var htmlAttributes = event.htmlAttributes, clipboardData = event.clipboardData, fragment = event.fragment;
|
|
26
|
-
var result = null;
|
|
27
|
-
var param = {
|
|
28
|
-
htmlAttributes: htmlAttributes,
|
|
29
|
-
fragment: fragment,
|
|
30
|
-
shouldConvertSingleImage: shouldConvertSingleImage,
|
|
31
|
-
clipboardData: clipboardData,
|
|
32
|
-
};
|
|
33
|
-
getSourceFunctions.forEach(function (func, key) {
|
|
34
|
-
if (!result && func(param)) {
|
|
35
|
-
result = key;
|
|
36
|
-
}
|
|
37
|
-
});
|
|
38
|
-
return result !== null && result !== void 0 ? result : 'default';
|
|
39
|
-
}
|
|
1
|
+
import { documentContainWacElements } from './documentContainWacElements';
|
|
2
|
+
import { isExcelDesktopDocument } from './isExcelDesktopDocument';
|
|
3
|
+
import { isExcelOnlineDocument } from './isExcelOnlineDocument';
|
|
4
|
+
import { isGoogleSheetDocument } from './isGoogleSheetDocument';
|
|
5
|
+
import { isPowerPointDesktopDocument } from './isPowerPointDesktopDocument';
|
|
6
|
+
import { isWordDesktopDocument } from './isWordDesktopDocument';
|
|
7
|
+
import { shouldConvertToSingleImage } from './shouldConvertToSingleImage';
|
|
8
|
+
var getSourceFunctions = new Map([
|
|
9
|
+
['wordDesktop', isWordDesktopDocument],
|
|
10
|
+
['excelDesktop', isExcelDesktopDocument],
|
|
11
|
+
['excelOnline', isExcelOnlineDocument],
|
|
12
|
+
['powerPointDesktop', isPowerPointDesktopDocument],
|
|
13
|
+
['wacComponents', documentContainWacElements],
|
|
14
|
+
['googleSheets', isGoogleSheetDocument],
|
|
15
|
+
['singleImage', shouldConvertToSingleImage],
|
|
16
|
+
]);
|
|
17
|
+
/**
|
|
18
|
+
* @internal
|
|
19
|
+
* This function tries to get the source of the Pasted content
|
|
20
|
+
* @param event the before paste event
|
|
21
|
+
* @param shouldConvertSingleImage Whether convert single image is enabled.
|
|
22
|
+
* @returns The Type of pasted content, if no type found will return {KnownSourceType.Default}
|
|
23
|
+
*/
|
|
24
|
+
export function getPasteSource(event, shouldConvertSingleImage) {
|
|
25
|
+
var htmlAttributes = event.htmlAttributes, clipboardData = event.clipboardData, fragment = event.fragment;
|
|
26
|
+
var result = null;
|
|
27
|
+
var param = {
|
|
28
|
+
htmlAttributes: htmlAttributes,
|
|
29
|
+
fragment: fragment,
|
|
30
|
+
shouldConvertSingleImage: shouldConvertSingleImage,
|
|
31
|
+
clipboardData: clipboardData,
|
|
32
|
+
};
|
|
33
|
+
getSourceFunctions.forEach(function (func, key) {
|
|
34
|
+
if (!result && func(param)) {
|
|
35
|
+
result = key;
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
return result !== null && result !== void 0 ? result : 'default';
|
|
39
|
+
}
|
|
40
40
|
//# sourceMappingURL=getPasteSource.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getPasteSource.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-plugins/lib/paste/pasteSourceValidations/getPasteSource.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAC1E,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAC5E,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAgC1E,IAAM,kBAAkB,GAAG,IAAI,GAAG,CAA0C;IACxE,CAAC,aAAa,EAAE,qBAAqB,CAAC;IACtC,CAAC,cAAc,EAAE,sBAAsB,CAAC;IACxC,CAAC,aAAa,EAAE,qBAAqB,CAAC;IACtC,CAAC,mBAAmB,EAAE,2BAA2B,CAAC;IAClD,CAAC,eAAe,EAAE,0BAA0B,CAAC;IAC7C,CAAC,cAAc,EAAE,qBAAqB,CAAC;IACvC,CAAC,aAAa,EAAE,0BAA0B,CAAC;CAC9C,CAAC,CAAC;AAEH;;;;;;GAMG;AACH,MAAM,UAAU,cAAc,CAC1B,KAAuB,EACvB,wBAAiC;IAEzB,IAAA,cAAc,GAA8B,KAAK,eAAnC,EAAE,aAAa,GAAe,KAAK,cAApB,EAAE,QAAQ,GAAK,KAAK,SAAV,CAAW;IAE1D,IAAI,MAAM,GAAgC,IAAI,CAAC;IAC/C,IAAM,KAAK,GAAyB;QAChC,cAAc,gBAAA;QACd,QAAQ,UAAA;QACR,wBAAwB,0BAAA;QACxB,aAAa,eAAA;KAChB,CAAC;IAEF,kBAAkB,CAAC,OAAO,CAAC,UAAC,IAAI,EAAE,GAAG;QACjC,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,KAAK,CAAC,EAAE;YACxB,MAAM,GAAG,GAAG,CAAC;SAChB;IACL,CAAC,CAAC,CAAC;IAEH,OAAO,MAAM,aAAN,MAAM,cAAN,MAAM,GAAI,SAAS,CAAC;AAC/B,CAAC","sourcesContent":["import { documentContainWacElements } from './documentContainWacElements';\nimport { isExcelDesktopDocument } from './isExcelDesktopDocument';\nimport { isExcelOnlineDocument } from './isExcelOnlineDocument';\nimport { isGoogleSheetDocument } from './isGoogleSheetDocument';\nimport { isPowerPointDesktopDocument } from './isPowerPointDesktopDocument';\nimport { isWordDesktopDocument } from './isWordDesktopDocument';\nimport { shouldConvertToSingleImage } from './shouldConvertToSingleImage';\nimport type { BeforePasteEvent, ClipboardData } from 'roosterjs-editor-types';\n\n/**\n * @internal\n */\nexport type GetSourceInputParams = {\n htmlAttributes: Record<string, string>;\n fragment: DocumentFragment;\n shouldConvertSingleImage: boolean;\n clipboardData: ClipboardData;\n};\n\n/**\n * @internal\n * Represent the types of sources to handle in the Paste Plugin\n */\nexport type KnownPasteSourceType =\n | 'wordDesktop'\n | 'excelDesktop'\n | 'excelOnline'\n | 'powerPointDesktop'\n | 'googleSheets'\n | 'wacComponents'\n | 'default'\n | 'singleImage';\n\n/**\n * @internal\n */\nexport type GetSourceFunction = (props: GetSourceInputParams) => boolean;\n\nconst getSourceFunctions = new Map<KnownPasteSourceType, GetSourceFunction>([\n ['wordDesktop', isWordDesktopDocument],\n ['excelDesktop', isExcelDesktopDocument],\n ['excelOnline', isExcelOnlineDocument],\n ['powerPointDesktop', isPowerPointDesktopDocument],\n ['wacComponents', documentContainWacElements],\n ['googleSheets', isGoogleSheetDocument],\n ['singleImage', shouldConvertToSingleImage],\n]);\n\n/**\n * @internal\n * This function tries to get the source of the Pasted content\n * @param event the before paste event\n * @param shouldConvertSingleImage Whether convert single image is enabled.\n * @returns The Type of pasted content, if no type found will return {KnownSourceType.Default}\n */\nexport function getPasteSource(\n event: BeforePasteEvent,\n shouldConvertSingleImage: boolean\n): KnownPasteSourceType {\n const { htmlAttributes, clipboardData, fragment } = event;\n\n let result: KnownPasteSourceType | null = null;\n const param: GetSourceInputParams = {\n htmlAttributes,\n fragment,\n shouldConvertSingleImage,\n clipboardData,\n };\n\n getSourceFunctions.forEach((func, key) => {\n if (!result && func(param)) {\n result = key;\n }\n });\n\n return result ?? 'default';\n}\n"]}
|
|
1
|
+
{"version":3,"file":"getPasteSource.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-plugins/lib/paste/pasteSourceValidations/getPasteSource.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAC1E,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAC5E,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAgC1E,IAAM,kBAAkB,GAAG,IAAI,GAAG,CAA0C;IACxE,CAAC,aAAa,EAAE,qBAAqB,CAAC;IACtC,CAAC,cAAc,EAAE,sBAAsB,CAAC;IACxC,CAAC,aAAa,EAAE,qBAAqB,CAAC;IACtC,CAAC,mBAAmB,EAAE,2BAA2B,CAAC;IAClD,CAAC,eAAe,EAAE,0BAA0B,CAAC;IAC7C,CAAC,cAAc,EAAE,qBAAqB,CAAC;IACvC,CAAC,aAAa,EAAE,0BAA0B,CAAC;CAC9C,CAAC,CAAC;AAEH;;;;;;GAMG;AACH,MAAM,UAAU,cAAc,CAC1B,KAAuB,EACvB,wBAAiC;IAEzB,IAAA,cAAc,GAA8B,KAAK,eAAnC,EAAE,aAAa,GAAe,KAAK,cAApB,EAAE,QAAQ,GAAK,KAAK,SAAV,CAAW;IAE1D,IAAI,MAAM,GAAgC,IAAI,CAAC;IAC/C,IAAM,KAAK,GAAyB;QAChC,cAAc,gBAAA;QACd,QAAQ,UAAA;QACR,wBAAwB,0BAAA;QACxB,aAAa,eAAA;KAChB,CAAC;IAEF,kBAAkB,CAAC,OAAO,CAAC,UAAC,IAAI,EAAE,GAAG;QACjC,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,KAAK,CAAC,EAAE;YACxB,MAAM,GAAG,GAAG,CAAC;SAChB;IACL,CAAC,CAAC,CAAC;IAEH,OAAO,MAAM,aAAN,MAAM,cAAN,MAAM,GAAI,SAAS,CAAC;AAC/B,CAAC","sourcesContent":["import { documentContainWacElements } from './documentContainWacElements';\r\nimport { isExcelDesktopDocument } from './isExcelDesktopDocument';\r\nimport { isExcelOnlineDocument } from './isExcelOnlineDocument';\r\nimport { isGoogleSheetDocument } from './isGoogleSheetDocument';\r\nimport { isPowerPointDesktopDocument } from './isPowerPointDesktopDocument';\r\nimport { isWordDesktopDocument } from './isWordDesktopDocument';\r\nimport { shouldConvertToSingleImage } from './shouldConvertToSingleImage';\r\nimport type { BeforePasteEvent, ClipboardData } from 'roosterjs-editor-types';\r\n\r\n/**\r\n * @internal\r\n */\r\nexport type GetSourceInputParams = {\r\n htmlAttributes: Record<string, string>;\r\n fragment: DocumentFragment;\r\n shouldConvertSingleImage: boolean;\r\n clipboardData: ClipboardData;\r\n};\r\n\r\n/**\r\n * @internal\r\n * Represent the types of sources to handle in the Paste Plugin\r\n */\r\nexport type KnownPasteSourceType =\r\n | 'wordDesktop'\r\n | 'excelDesktop'\r\n | 'excelOnline'\r\n | 'powerPointDesktop'\r\n | 'googleSheets'\r\n | 'wacComponents'\r\n | 'default'\r\n | 'singleImage';\r\n\r\n/**\r\n * @internal\r\n */\r\nexport type GetSourceFunction = (props: GetSourceInputParams) => boolean;\r\n\r\nconst getSourceFunctions = new Map<KnownPasteSourceType, GetSourceFunction>([\r\n ['wordDesktop', isWordDesktopDocument],\r\n ['excelDesktop', isExcelDesktopDocument],\r\n ['excelOnline', isExcelOnlineDocument],\r\n ['powerPointDesktop', isPowerPointDesktopDocument],\r\n ['wacComponents', documentContainWacElements],\r\n ['googleSheets', isGoogleSheetDocument],\r\n ['singleImage', shouldConvertToSingleImage],\r\n]);\r\n\r\n/**\r\n * @internal\r\n * This function tries to get the source of the Pasted content\r\n * @param event the before paste event\r\n * @param shouldConvertSingleImage Whether convert single image is enabled.\r\n * @returns The Type of pasted content, if no type found will return {KnownSourceType.Default}\r\n */\r\nexport function getPasteSource(\r\n event: BeforePasteEvent,\r\n shouldConvertSingleImage: boolean\r\n): KnownPasteSourceType {\r\n const { htmlAttributes, clipboardData, fragment } = event;\r\n\r\n let result: KnownPasteSourceType | null = null;\r\n const param: GetSourceInputParams = {\r\n htmlAttributes,\r\n fragment,\r\n shouldConvertSingleImage,\r\n clipboardData,\r\n };\r\n\r\n getSourceFunctions.forEach((func, key) => {\r\n if (!result && func(param)) {\r\n result = key;\r\n }\r\n });\r\n\r\n return result ?? 'default';\r\n}\r\n"]}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { GetSourceFunction } from './getPasteSource';
|
|
2
|
-
/**
|
|
3
|
-
* @internal
|
|
4
|
-
* Checks whether the Array provided contains strings that identify Excel Desktop documents
|
|
5
|
-
* @param props Properties related to the PasteEvent
|
|
6
|
-
* @returns
|
|
7
|
-
*/
|
|
8
|
-
export declare const isExcelDesktopDocument: GetSourceFunction;
|
|
1
|
+
import type { GetSourceFunction } from './getPasteSource';
|
|
2
|
+
/**
|
|
3
|
+
* @internal
|
|
4
|
+
* Checks whether the Array provided contains strings that identify Excel Desktop documents
|
|
5
|
+
* @param props Properties related to the PasteEvent
|
|
6
|
+
* @returns
|
|
7
|
+
*/
|
|
8
|
+
export declare const isExcelDesktopDocument: GetSourceFunction;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
var EXCEL_ATTRIBUTE_VALUE = 'urn:schemas-microsoft-com:office:excel';
|
|
2
|
-
/**
|
|
3
|
-
* @internal
|
|
4
|
-
* Checks whether the Array provided contains strings that identify Excel Desktop documents
|
|
5
|
-
* @param props Properties related to the PasteEvent
|
|
6
|
-
* @returns
|
|
7
|
-
*/
|
|
8
|
-
export var isExcelDesktopDocument = function (props) {
|
|
9
|
-
var htmlAttributes = props.htmlAttributes;
|
|
10
|
-
// The presence of this attribute confirms its origin from Excel Desktop
|
|
11
|
-
return htmlAttributes["xmlns:x" /* EXCEL_DESKTOP_ATTRIBUTE_NAME */] == EXCEL_ATTRIBUTE_VALUE;
|
|
12
|
-
};
|
|
1
|
+
var EXCEL_ATTRIBUTE_VALUE = 'urn:schemas-microsoft-com:office:excel';
|
|
2
|
+
/**
|
|
3
|
+
* @internal
|
|
4
|
+
* Checks whether the Array provided contains strings that identify Excel Desktop documents
|
|
5
|
+
* @param props Properties related to the PasteEvent
|
|
6
|
+
* @returns
|
|
7
|
+
*/
|
|
8
|
+
export var isExcelDesktopDocument = function (props) {
|
|
9
|
+
var htmlAttributes = props.htmlAttributes;
|
|
10
|
+
// The presence of this attribute confirms its origin from Excel Desktop
|
|
11
|
+
return htmlAttributes["xmlns:x" /* EXCEL_DESKTOP_ATTRIBUTE_NAME */] == EXCEL_ATTRIBUTE_VALUE;
|
|
12
|
+
};
|
|
13
13
|
//# sourceMappingURL=isExcelDesktopDocument.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isExcelDesktopDocument.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-plugins/lib/paste/pasteSourceValidations/isExcelDesktopDocument.ts"],"names":[],"mappings":"AAGA,IAAM,qBAAqB,GAAG,wCAAwC,CAAC;AAEvE;;;;;GAKG;AACH,MAAM,CAAC,IAAM,sBAAsB,GAAsB,UAAA,KAAK;IAClD,IAAA,cAAc,GAAK,KAAK,eAAV,CAAW;IACjC,wEAAwE;IACxE,OAAO,cAAc,8CAAiD,IAAI,qBAAqB,CAAC;AACpG,CAAC,CAAC","sourcesContent":["import { PastePropertyNames } from './constants';\nimport type { GetSourceFunction } from './getPasteSource';\n\nconst EXCEL_ATTRIBUTE_VALUE = 'urn:schemas-microsoft-com:office:excel';\n\n/**\n * @internal\n * Checks whether the Array provided contains strings that identify Excel Desktop documents\n * @param props Properties related to the PasteEvent\n * @returns\n */\nexport const isExcelDesktopDocument: GetSourceFunction = props => {\n const { htmlAttributes } = props;\n // The presence of this attribute confirms its origin from Excel Desktop\n return htmlAttributes[PastePropertyNames.EXCEL_DESKTOP_ATTRIBUTE_NAME] == EXCEL_ATTRIBUTE_VALUE;\n};\n"]}
|
|
1
|
+
{"version":3,"file":"isExcelDesktopDocument.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-plugins/lib/paste/pasteSourceValidations/isExcelDesktopDocument.ts"],"names":[],"mappings":"AAGA,IAAM,qBAAqB,GAAG,wCAAwC,CAAC;AAEvE;;;;;GAKG;AACH,MAAM,CAAC,IAAM,sBAAsB,GAAsB,UAAA,KAAK;IAClD,IAAA,cAAc,GAAK,KAAK,eAAV,CAAW;IACjC,wEAAwE;IACxE,OAAO,cAAc,8CAAiD,IAAI,qBAAqB,CAAC;AACpG,CAAC,CAAC","sourcesContent":["import { PastePropertyNames } from './constants';\r\nimport type { GetSourceFunction } from './getPasteSource';\r\n\r\nconst EXCEL_ATTRIBUTE_VALUE = 'urn:schemas-microsoft-com:office:excel';\r\n\r\n/**\r\n * @internal\r\n * Checks whether the Array provided contains strings that identify Excel Desktop documents\r\n * @param props Properties related to the PasteEvent\r\n * @returns\r\n */\r\nexport const isExcelDesktopDocument: GetSourceFunction = props => {\r\n const { htmlAttributes } = props;\r\n // The presence of this attribute confirms its origin from Excel Desktop\r\n return htmlAttributes[PastePropertyNames.EXCEL_DESKTOP_ATTRIBUTE_NAME] == EXCEL_ATTRIBUTE_VALUE;\r\n};\r\n"]}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { GetSourceFunction } from './getPasteSource';
|
|
2
|
-
/**
|
|
3
|
-
* @internal
|
|
4
|
-
* Checks whether the Array provided contains strings that identify Excel Online documents
|
|
5
|
-
* @param props Properties related to the PasteEvent
|
|
6
|
-
* @returns
|
|
7
|
-
*/
|
|
8
|
-
export declare const isExcelOnlineDocument: GetSourceFunction;
|
|
1
|
+
import type { GetSourceFunction } from './getPasteSource';
|
|
2
|
+
/**
|
|
3
|
+
* @internal
|
|
4
|
+
* Checks whether the Array provided contains strings that identify Excel Online documents
|
|
5
|
+
* @param props Properties related to the PasteEvent
|
|
6
|
+
* @returns
|
|
7
|
+
*/
|
|
8
|
+
export declare const isExcelOnlineDocument: GetSourceFunction;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
// Excel Desktop also has this attribute
|
|
2
|
-
var EXCEL_ONLINE_ATTRIBUTE_VALUE = 'Excel.Sheet';
|
|
3
|
-
/**
|
|
4
|
-
* @internal
|
|
5
|
-
* Checks whether the Array provided contains strings that identify Excel Online documents
|
|
6
|
-
* @param props Properties related to the PasteEvent
|
|
7
|
-
* @returns
|
|
8
|
-
*/
|
|
9
|
-
export var isExcelOnlineDocument = function (props) {
|
|
10
|
-
var htmlAttributes = props.htmlAttributes;
|
|
11
|
-
// The presence of Excel.Sheet confirms its origin from Excel, the absence of EXCEL_DESKTOP_ATTRIBUTE_NAME confirms it is from the Online version
|
|
12
|
-
return (htmlAttributes["ProgId" /* PROG_ID_NAME */] == EXCEL_ONLINE_ATTRIBUTE_VALUE &&
|
|
13
|
-
htmlAttributes["xmlns:x" /* EXCEL_DESKTOP_ATTRIBUTE_NAME */] == undefined);
|
|
14
|
-
};
|
|
1
|
+
// Excel Desktop also has this attribute
|
|
2
|
+
var EXCEL_ONLINE_ATTRIBUTE_VALUE = 'Excel.Sheet';
|
|
3
|
+
/**
|
|
4
|
+
* @internal
|
|
5
|
+
* Checks whether the Array provided contains strings that identify Excel Online documents
|
|
6
|
+
* @param props Properties related to the PasteEvent
|
|
7
|
+
* @returns
|
|
8
|
+
*/
|
|
9
|
+
export var isExcelOnlineDocument = function (props) {
|
|
10
|
+
var htmlAttributes = props.htmlAttributes;
|
|
11
|
+
// The presence of Excel.Sheet confirms its origin from Excel, the absence of EXCEL_DESKTOP_ATTRIBUTE_NAME confirms it is from the Online version
|
|
12
|
+
return (htmlAttributes["ProgId" /* PROG_ID_NAME */] == EXCEL_ONLINE_ATTRIBUTE_VALUE &&
|
|
13
|
+
htmlAttributes["xmlns:x" /* EXCEL_DESKTOP_ATTRIBUTE_NAME */] == undefined);
|
|
14
|
+
};
|
|
15
15
|
//# sourceMappingURL=isExcelOnlineDocument.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isExcelOnlineDocument.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-plugins/lib/paste/pasteSourceValidations/isExcelOnlineDocument.ts"],"names":[],"mappings":"AAGA,wCAAwC;AACxC,IAAM,4BAA4B,GAAG,aAAa,CAAC;AAEnD;;;;;GAKG;AACH,MAAM,CAAC,IAAM,qBAAqB,GAAsB,UAAA,KAAK;IACjD,IAAA,cAAc,GAAK,KAAK,eAAV,CAAW;IACjC,iJAAiJ;IACjJ,OAAO,CACH,cAAc,6BAAiC,IAAI,4BAA4B;QAC/E,cAAc,8CAAiD,IAAI,SAAS,CAC/E,CAAC;AACN,CAAC,CAAC","sourcesContent":["import { PastePropertyNames } from './constants';\nimport type { GetSourceFunction } from './getPasteSource';\n\n// Excel Desktop also has this attribute\nconst EXCEL_ONLINE_ATTRIBUTE_VALUE = 'Excel.Sheet';\n\n/**\n * @internal\n * Checks whether the Array provided contains strings that identify Excel Online documents\n * @param props Properties related to the PasteEvent\n * @returns\n */\nexport const isExcelOnlineDocument: GetSourceFunction = props => {\n const { htmlAttributes } = props;\n // The presence of Excel.Sheet confirms its origin from Excel, the absence of EXCEL_DESKTOP_ATTRIBUTE_NAME confirms it is from the Online version\n return (\n htmlAttributes[PastePropertyNames.PROG_ID_NAME] == EXCEL_ONLINE_ATTRIBUTE_VALUE &&\n htmlAttributes[PastePropertyNames.EXCEL_DESKTOP_ATTRIBUTE_NAME] == undefined\n );\n};\n"]}
|
|
1
|
+
{"version":3,"file":"isExcelOnlineDocument.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-plugins/lib/paste/pasteSourceValidations/isExcelOnlineDocument.ts"],"names":[],"mappings":"AAGA,wCAAwC;AACxC,IAAM,4BAA4B,GAAG,aAAa,CAAC;AAEnD;;;;;GAKG;AACH,MAAM,CAAC,IAAM,qBAAqB,GAAsB,UAAA,KAAK;IACjD,IAAA,cAAc,GAAK,KAAK,eAAV,CAAW;IACjC,iJAAiJ;IACjJ,OAAO,CACH,cAAc,6BAAiC,IAAI,4BAA4B;QAC/E,cAAc,8CAAiD,IAAI,SAAS,CAC/E,CAAC;AACN,CAAC,CAAC","sourcesContent":["import { PastePropertyNames } from './constants';\r\nimport type { GetSourceFunction } from './getPasteSource';\r\n\r\n// Excel Desktop also has this attribute\r\nconst EXCEL_ONLINE_ATTRIBUTE_VALUE = 'Excel.Sheet';\r\n\r\n/**\r\n * @internal\r\n * Checks whether the Array provided contains strings that identify Excel Online documents\r\n * @param props Properties related to the PasteEvent\r\n * @returns\r\n */\r\nexport const isExcelOnlineDocument: GetSourceFunction = props => {\r\n const { htmlAttributes } = props;\r\n // The presence of Excel.Sheet confirms its origin from Excel, the absence of EXCEL_DESKTOP_ATTRIBUTE_NAME confirms it is from the Online version\r\n return (\r\n htmlAttributes[PastePropertyNames.PROG_ID_NAME] == EXCEL_ONLINE_ATTRIBUTE_VALUE &&\r\n htmlAttributes[PastePropertyNames.EXCEL_DESKTOP_ATTRIBUTE_NAME] == undefined\r\n );\r\n};\r\n"]}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { GetSourceFunction } from './getPasteSource';
|
|
2
|
-
/**
|
|
3
|
-
* @internal
|
|
4
|
-
* Checks whether the fragment provided contain elements from Google sheets
|
|
5
|
-
* @param props Properties related to the PasteEvent
|
|
6
|
-
* @returns
|
|
7
|
-
*/
|
|
8
|
-
export declare const isGoogleSheetDocument: GetSourceFunction;
|
|
1
|
+
import type { GetSourceFunction } from './getPasteSource';
|
|
2
|
+
/**
|
|
3
|
+
* @internal
|
|
4
|
+
* Checks whether the fragment provided contain elements from Google sheets
|
|
5
|
+
* @param props Properties related to the PasteEvent
|
|
6
|
+
* @returns
|
|
7
|
+
*/
|
|
8
|
+
export declare const isGoogleSheetDocument: GetSourceFunction;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @internal
|
|
3
|
-
* Checks whether the fragment provided contain elements from Google sheets
|
|
4
|
-
* @param props Properties related to the PasteEvent
|
|
5
|
-
* @returns
|
|
6
|
-
*/
|
|
7
|
-
export var isGoogleSheetDocument = function (props) {
|
|
8
|
-
var fragment = props.fragment;
|
|
9
|
-
return !!fragment.querySelector("google-sheets-html-origin" /* GOOGLE_SHEET_NODE_NAME */);
|
|
10
|
-
};
|
|
1
|
+
/**
|
|
2
|
+
* @internal
|
|
3
|
+
* Checks whether the fragment provided contain elements from Google sheets
|
|
4
|
+
* @param props Properties related to the PasteEvent
|
|
5
|
+
* @returns
|
|
6
|
+
*/
|
|
7
|
+
export var isGoogleSheetDocument = function (props) {
|
|
8
|
+
var fragment = props.fragment;
|
|
9
|
+
return !!fragment.querySelector("google-sheets-html-origin" /* GOOGLE_SHEET_NODE_NAME */);
|
|
10
|
+
};
|
|
11
11
|
//# sourceMappingURL=isGoogleSheetDocument.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isGoogleSheetDocument.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-plugins/lib/paste/pasteSourceValidations/isGoogleSheetDocument.ts"],"names":[],"mappings":"AAGA;;;;;GAKG;AACH,MAAM,CAAC,IAAM,qBAAqB,GAAsB,UAAA,KAAK;IACjD,IAAA,QAAQ,GAAK,KAAK,SAAV,CAAW;IAC3B,OAAO,CAAC,CAAC,QAAQ,CAAC,aAAa,0DAA2C,CAAC;AAC/E,CAAC,CAAC","sourcesContent":["import { PastePropertyNames } from './constants';\nimport type { GetSourceFunction } from './getPasteSource';\n\n/**\n * @internal\n * Checks whether the fragment provided contain elements from Google sheets\n * @param props Properties related to the PasteEvent\n * @returns\n */\nexport const isGoogleSheetDocument: GetSourceFunction = props => {\n const { fragment } = props;\n return !!fragment.querySelector(PastePropertyNames.GOOGLE_SHEET_NODE_NAME);\n};\n"]}
|
|
1
|
+
{"version":3,"file":"isGoogleSheetDocument.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-plugins/lib/paste/pasteSourceValidations/isGoogleSheetDocument.ts"],"names":[],"mappings":"AAGA;;;;;GAKG;AACH,MAAM,CAAC,IAAM,qBAAqB,GAAsB,UAAA,KAAK;IACjD,IAAA,QAAQ,GAAK,KAAK,SAAV,CAAW;IAC3B,OAAO,CAAC,CAAC,QAAQ,CAAC,aAAa,0DAA2C,CAAC;AAC/E,CAAC,CAAC","sourcesContent":["import { PastePropertyNames } from './constants';\r\nimport type { GetSourceFunction } from './getPasteSource';\r\n\r\n/**\r\n * @internal\r\n * Checks whether the fragment provided contain elements from Google sheets\r\n * @param props Properties related to the PasteEvent\r\n * @returns\r\n */\r\nexport const isGoogleSheetDocument: GetSourceFunction = props => {\r\n const { fragment } = props;\r\n return !!fragment.querySelector(PastePropertyNames.GOOGLE_SHEET_NODE_NAME);\r\n};\r\n"]}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { GetSourceFunction } from './getPasteSource';
|
|
2
|
-
/**
|
|
3
|
-
* @internal
|
|
4
|
-
* Checks whether the Array provided contains strings that identify Power Point Desktop documents
|
|
5
|
-
* @param props Properties related to the PasteEvent
|
|
6
|
-
* @returns
|
|
7
|
-
*/
|
|
8
|
-
export declare const isPowerPointDesktopDocument: GetSourceFunction;
|
|
1
|
+
import type { GetSourceFunction } from './getPasteSource';
|
|
2
|
+
/**
|
|
3
|
+
* @internal
|
|
4
|
+
* Checks whether the Array provided contains strings that identify Power Point Desktop documents
|
|
5
|
+
* @param props Properties related to the PasteEvent
|
|
6
|
+
* @returns
|
|
7
|
+
*/
|
|
8
|
+
export declare const isPowerPointDesktopDocument: GetSourceFunction;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
var POWERPOINT_ATTRIBUTE_VALUE = 'PowerPoint.Slide';
|
|
2
|
-
/**
|
|
3
|
-
* @internal
|
|
4
|
-
* Checks whether the Array provided contains strings that identify Power Point Desktop documents
|
|
5
|
-
* @param props Properties related to the PasteEvent
|
|
6
|
-
* @returns
|
|
7
|
-
*/
|
|
8
|
-
export var isPowerPointDesktopDocument = function (props) {
|
|
9
|
-
return props.htmlAttributes["ProgId" /* PROG_ID_NAME */] == POWERPOINT_ATTRIBUTE_VALUE;
|
|
10
|
-
};
|
|
1
|
+
var POWERPOINT_ATTRIBUTE_VALUE = 'PowerPoint.Slide';
|
|
2
|
+
/**
|
|
3
|
+
* @internal
|
|
4
|
+
* Checks whether the Array provided contains strings that identify Power Point Desktop documents
|
|
5
|
+
* @param props Properties related to the PasteEvent
|
|
6
|
+
* @returns
|
|
7
|
+
*/
|
|
8
|
+
export var isPowerPointDesktopDocument = function (props) {
|
|
9
|
+
return props.htmlAttributes["ProgId" /* PROG_ID_NAME */] == POWERPOINT_ATTRIBUTE_VALUE;
|
|
10
|
+
};
|
|
11
11
|
//# sourceMappingURL=isPowerPointDesktopDocument.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isPowerPointDesktopDocument.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-plugins/lib/paste/pasteSourceValidations/isPowerPointDesktopDocument.ts"],"names":[],"mappings":"AAGA,IAAM,0BAA0B,GAAG,kBAAkB,CAAC;AAEtD;;;;;GAKG;AACH,MAAM,CAAC,IAAM,2BAA2B,GAAsB,UAAA,KAAK;IAC/D,OAAO,KAAK,CAAC,cAAc,6BAAiC,IAAI,0BAA0B,CAAC;AAC/F,CAAC,CAAC","sourcesContent":["import { PastePropertyNames } from './constants';\nimport type { GetSourceFunction } from './getPasteSource';\n\nconst POWERPOINT_ATTRIBUTE_VALUE = 'PowerPoint.Slide';\n\n/**\n * @internal\n * Checks whether the Array provided contains strings that identify Power Point Desktop documents\n * @param props Properties related to the PasteEvent\n * @returns\n */\nexport const isPowerPointDesktopDocument: GetSourceFunction = props => {\n return props.htmlAttributes[PastePropertyNames.PROG_ID_NAME] == POWERPOINT_ATTRIBUTE_VALUE;\n};\n"]}
|
|
1
|
+
{"version":3,"file":"isPowerPointDesktopDocument.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-plugins/lib/paste/pasteSourceValidations/isPowerPointDesktopDocument.ts"],"names":[],"mappings":"AAGA,IAAM,0BAA0B,GAAG,kBAAkB,CAAC;AAEtD;;;;;GAKG;AACH,MAAM,CAAC,IAAM,2BAA2B,GAAsB,UAAA,KAAK;IAC/D,OAAO,KAAK,CAAC,cAAc,6BAAiC,IAAI,0BAA0B,CAAC;AAC/F,CAAC,CAAC","sourcesContent":["import { PastePropertyNames } from './constants';\r\nimport type { GetSourceFunction } from './getPasteSource';\r\n\r\nconst POWERPOINT_ATTRIBUTE_VALUE = 'PowerPoint.Slide';\r\n\r\n/**\r\n * @internal\r\n * Checks whether the Array provided contains strings that identify Power Point Desktop documents\r\n * @param props Properties related to the PasteEvent\r\n * @returns\r\n */\r\nexport const isPowerPointDesktopDocument: GetSourceFunction = props => {\r\n return props.htmlAttributes[PastePropertyNames.PROG_ID_NAME] == POWERPOINT_ATTRIBUTE_VALUE;\r\n};\r\n"]}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { GetSourceFunction } from './getPasteSource';
|
|
2
|
-
/**
|
|
3
|
-
* @internal
|
|
4
|
-
* Checks whether the Array provided contains strings that identify Word Desktop documents
|
|
5
|
-
* @param props Properties related to the PasteEvent
|
|
6
|
-
* @returns
|
|
7
|
-
*/
|
|
8
|
-
export declare const isWordDesktopDocument: GetSourceFunction;
|
|
1
|
+
import type { GetSourceFunction } from './getPasteSource';
|
|
2
|
+
/**
|
|
3
|
+
* @internal
|
|
4
|
+
* Checks whether the Array provided contains strings that identify Word Desktop documents
|
|
5
|
+
* @param props Properties related to the PasteEvent
|
|
6
|
+
* @returns
|
|
7
|
+
*/
|
|
8
|
+
export declare const isWordDesktopDocument: GetSourceFunction;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
var WORD_ATTRIBUTE_NAME = 'xmlns:w';
|
|
2
|
-
var WORD_ATTRIBUTE_VALUE = 'urn:schemas-microsoft-com:office:word';
|
|
3
|
-
var WORD_PROG_ID = 'Word.Document';
|
|
4
|
-
/**
|
|
5
|
-
* @internal
|
|
6
|
-
* Checks whether the Array provided contains strings that identify Word Desktop documents
|
|
7
|
-
* @param props Properties related to the PasteEvent
|
|
8
|
-
* @returns
|
|
9
|
-
*/
|
|
10
|
-
export var isWordDesktopDocument = function (props) {
|
|
11
|
-
var htmlAttributes = props.htmlAttributes;
|
|
12
|
-
return (htmlAttributes[WORD_ATTRIBUTE_NAME] == WORD_ATTRIBUTE_VALUE ||
|
|
13
|
-
htmlAttributes["ProgId" /* PROG_ID_NAME */] == WORD_PROG_ID);
|
|
14
|
-
};
|
|
1
|
+
var WORD_ATTRIBUTE_NAME = 'xmlns:w';
|
|
2
|
+
var WORD_ATTRIBUTE_VALUE = 'urn:schemas-microsoft-com:office:word';
|
|
3
|
+
var WORD_PROG_ID = 'Word.Document';
|
|
4
|
+
/**
|
|
5
|
+
* @internal
|
|
6
|
+
* Checks whether the Array provided contains strings that identify Word Desktop documents
|
|
7
|
+
* @param props Properties related to the PasteEvent
|
|
8
|
+
* @returns
|
|
9
|
+
*/
|
|
10
|
+
export var isWordDesktopDocument = function (props) {
|
|
11
|
+
var htmlAttributes = props.htmlAttributes;
|
|
12
|
+
return (htmlAttributes[WORD_ATTRIBUTE_NAME] == WORD_ATTRIBUTE_VALUE ||
|
|
13
|
+
htmlAttributes["ProgId" /* PROG_ID_NAME */] == WORD_PROG_ID);
|
|
14
|
+
};
|
|
15
15
|
//# sourceMappingURL=isWordDesktopDocument.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isWordDesktopDocument.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-plugins/lib/paste/pasteSourceValidations/isWordDesktopDocument.ts"],"names":[],"mappings":"AAGA,IAAM,mBAAmB,GAAG,SAAS,CAAC;AACtC,IAAM,oBAAoB,GAAG,uCAAuC,CAAC;AACrE,IAAM,YAAY,GAAG,eAAe,CAAC;AAErC;;;;;GAKG;AACH,MAAM,CAAC,IAAM,qBAAqB,GAAsB,UAAA,KAAK;IACjD,IAAA,cAAc,GAAK,KAAK,eAAV,CAAW;IACjC,OAAO,CACH,cAAc,CAAC,mBAAmB,CAAC,IAAI,oBAAoB;QAC3D,cAAc,6BAAiC,IAAI,YAAY,CAClE,CAAC;AACN,CAAC,CAAC","sourcesContent":["import { PastePropertyNames } from './constants';\nimport type { GetSourceFunction } from './getPasteSource';\n\nconst WORD_ATTRIBUTE_NAME = 'xmlns:w';\nconst WORD_ATTRIBUTE_VALUE = 'urn:schemas-microsoft-com:office:word';\nconst WORD_PROG_ID = 'Word.Document';\n\n/**\n * @internal\n * Checks whether the Array provided contains strings that identify Word Desktop documents\n * @param props Properties related to the PasteEvent\n * @returns\n */\nexport const isWordDesktopDocument: GetSourceFunction = props => {\n const { htmlAttributes } = props;\n return (\n htmlAttributes[WORD_ATTRIBUTE_NAME] == WORD_ATTRIBUTE_VALUE ||\n htmlAttributes[PastePropertyNames.PROG_ID_NAME] == WORD_PROG_ID\n );\n};\n"]}
|
|
1
|
+
{"version":3,"file":"isWordDesktopDocument.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-plugins/lib/paste/pasteSourceValidations/isWordDesktopDocument.ts"],"names":[],"mappings":"AAGA,IAAM,mBAAmB,GAAG,SAAS,CAAC;AACtC,IAAM,oBAAoB,GAAG,uCAAuC,CAAC;AACrE,IAAM,YAAY,GAAG,eAAe,CAAC;AAErC;;;;;GAKG;AACH,MAAM,CAAC,IAAM,qBAAqB,GAAsB,UAAA,KAAK;IACjD,IAAA,cAAc,GAAK,KAAK,eAAV,CAAW;IACjC,OAAO,CACH,cAAc,CAAC,mBAAmB,CAAC,IAAI,oBAAoB;QAC3D,cAAc,6BAAiC,IAAI,YAAY,CAClE,CAAC;AACN,CAAC,CAAC","sourcesContent":["import { PastePropertyNames } from './constants';\r\nimport type { GetSourceFunction } from './getPasteSource';\r\n\r\nconst WORD_ATTRIBUTE_NAME = 'xmlns:w';\r\nconst WORD_ATTRIBUTE_VALUE = 'urn:schemas-microsoft-com:office:word';\r\nconst WORD_PROG_ID = 'Word.Document';\r\n\r\n/**\r\n * @internal\r\n * Checks whether the Array provided contains strings that identify Word Desktop documents\r\n * @param props Properties related to the PasteEvent\r\n * @returns\r\n */\r\nexport const isWordDesktopDocument: GetSourceFunction = props => {\r\n const { htmlAttributes } = props;\r\n return (\r\n htmlAttributes[WORD_ATTRIBUTE_NAME] == WORD_ATTRIBUTE_VALUE ||\r\n htmlAttributes[PastePropertyNames.PROG_ID_NAME] == WORD_PROG_ID\r\n );\r\n};\r\n"]}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type { GetSourceFunction } from './getPasteSource';
|
|
2
|
-
/**
|
|
3
|
-
* @internal
|
|
4
|
-
* Checks whether the fragment only contains a single image to paste
|
|
5
|
-
* and the editor have the ConvertSingleImageBody Experimental feature
|
|
6
|
-
* @param props Properties related to the PasteEvent
|
|
7
|
-
* @returns
|
|
8
|
-
*/
|
|
9
|
-
export declare const shouldConvertToSingleImage: GetSourceFunction;
|
|
1
|
+
import type { GetSourceFunction } from './getPasteSource';
|
|
2
|
+
/**
|
|
3
|
+
* @internal
|
|
4
|
+
* Checks whether the fragment only contains a single image to paste
|
|
5
|
+
* and the editor have the ConvertSingleImageBody Experimental feature
|
|
6
|
+
* @param props Properties related to the PasteEvent
|
|
7
|
+
* @returns
|
|
8
|
+
*/
|
|
9
|
+
export declare const shouldConvertToSingleImage: GetSourceFunction;
|