@modusoperandi/licit 1.0.5 → 1.0.7
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/BlockquoteInsertNewLineCommand.js +10 -11
- package/BlockquoteInsertNewLineCommand.js.flow +1 -2
- package/BlockquoteNodeSpec.js +2 -3
- package/BlockquoteNodeSpec.js.flow +1 -2
- package/BlockquoteToggleCommand.js +9 -9
- package/BookmarkNodeSpec.js +1 -1
- package/CodeBlockCommand.js +10 -10
- package/CodeBlockCommand.js.flow +1 -1
- package/ContentPlaceholderPlugin.js +17 -17
- package/ContentPlaceholderPlugin.js.flow +10 -12
- package/CursorPlaceholderPlugin.js +8 -8
- package/DocLayoutCommand.js +10 -12
- package/DocLayoutCommand.js.flow +1 -3
- package/EditorKeyMap.js +0 -1
- package/EditorKeyMap.js.flow +0 -2
- package/EditorMarks.js +1 -1
- package/EditorNodes.js +1 -2
- package/EditorNodes.js.flow +0 -1
- package/EditorPageLayoutPlugin.js +8 -8
- package/FontTypeMarkSpec.js +1 -1
- package/FontTypeMarkSpec.js.flow +1 -1
- package/HTMLMutator.js +4 -4
- package/HeadingNodeSpec.js +2 -12
- package/HeadingNodeSpec.js.flow +4 -14
- package/HistoryRedoCommand.js +9 -9
- package/HistoryUndoCommand.js +9 -9
- package/HorizontalRuleCommand.js +9 -9
- package/ImageUploadPlaceholderPlugin.js +13 -15
- package/ImageUploadPlaceholderPlugin.js.flow +5 -7
- package/LinkMarkSpec.js +6 -1
- package/LinkMarkSpec.js.flow +5 -0
- package/LinkSetURLCommand.js +126 -55
- package/LinkSetURLCommand.js.flow +61 -37
- package/LinkTooltipPlugin.js +119 -30
- package/LinkTooltipPlugin.js.flow +91 -20
- package/ListItemInsertNewLineCommand.js +10 -11
- package/ListItemInsertNewLineCommand.js.flow +1 -2
- package/ListItemMergeCommand.js +16 -15
- package/ListItemMergeCommand.js.flow +3 -4
- package/ListSplitCommand.js +9 -9
- package/ListToggleCommand.js +9 -9
- package/MarksClearCommand.js +9 -9
- package/MathEditCommand.js +10 -11
- package/MathEditCommand.js.flow +1 -2
- package/OrderedListNodeSpec.js +1 -1
- package/ParagraphNodeSpec.js +11 -2
- package/ParagraphNodeSpec.js.flow +9 -2
- package/ParagraphSpacingCommand.js +13 -14
- package/ParagraphSpacingCommand.js.flow +4 -9
- package/PrintCommand.js +9 -9
- package/SelectionPlaceholderPlugin.js +8 -8
- package/SpacerMarkSpec.js +1 -1
- package/StyleView.js +3 -4
- package/StyleView.js.flow +0 -1
- package/TableBackgroundColorCommand.js +12 -14
- package/TableBackgroundColorCommand.js.flow +2 -5
- package/TableBorderColorCommand.js +12 -14
- package/TableBorderColorCommand.js.flow +2 -7
- package/TableCellColorCommand.js +10 -11
- package/TableCellColorCommand.js.flow +1 -2
- package/TableCellMenuPlugin.js +16 -15
- package/TableCellMenuPlugin.js.flow +5 -7
- package/TableInsertCommand.js +11 -13
- package/TableInsertCommand.js.flow +2 -4
- package/TableMergeCellsCommand.js +13 -12
- package/TableMergeCellsCommand.js.flow +4 -3
- package/TableNodesSpecs.js +4 -2
- package/TableNodesSpecs.js.flow +4 -2
- package/TableResizePlugin.js +17 -16
- package/TableResizePlugin.js.flow +1 -1
- package/TextInsertTabSpaceCommand.js +9 -9
- package/Types.js +1 -0
- package/Types.js.flow +2 -5
- package/WebFontLoader.js +4 -4
- package/bom.xml +17623 -24512
- package/buildEditorPlugins.js +4 -4
- package/buildInputRules.js +8 -4
- package/buildInputRules.js.flow +8 -4
- package/client/CollabConnector.js +9 -9
- package/client/EditorConnection.js +8 -6
- package/client/EditorConnection.js.flow +3 -2
- package/client/Licit.js +22 -58
- package/client/Licit.js.flow +12 -44
- package/client/Licit.test.js +49 -39
- package/client/Licit.test.js.flow +40 -34
- package/client/Reporter.js +3 -3
- package/client/SimpleConnector.js +4 -4
- package/client/http.js +0 -6
- package/client/http.js.flow +0 -8
- package/client/throttle.js +8 -2
- package/client/throttle.js.flow +2 -2
- package/convertFromDOMElement.js +2 -4
- package/convertFromDOMElement.js.flow +2 -5
- package/convertFromHTML.js +2 -3
- package/convertFromHTML.js.flow +2 -4
- package/convertFromJSON.js +1 -2
- package/convertFromJSON.js.flow +1 -2
- package/convertToCSSPTValue.js +6 -10
- package/convertToCSSPTValue.js.flow +8 -11
- package/createCommand.js +9 -9
- package/createEditorKeyMap.js +1 -1
- package/createEmptyEditorState.js +2 -3
- package/createEmptyEditorState.js.flow +2 -4
- package/createTableResizingPlugin.js +6 -6
- package/createTableResizingPlugin.js.flow +1 -1
- package/findActiveMark.js +1 -1
- package/findActiveMark.js.flow +1 -1
- package/insertTable.js +0 -3
- package/insertTable.js.flow +0 -2
- package/joinDown.js +1 -3
- package/joinDown.js.flow +1 -3
- package/joinUp.js +1 -3
- package/joinUp.js.flow +1 -3
- package/lookUpElement.js +2 -1
- package/lookUpElement.js.flow +1 -1
- package/normalizeHTML.js +3 -1
- package/normalizeHTML.js.flow +3 -1
- package/package.json +21 -16
- package/patchAnchorElements.js +1 -1
- package/patchAnchorElements.js.flow +1 -1
- package/patchBreakElements.js +3 -2
- package/patchBreakElements.js.flow +2 -2
- package/patchElementInlineStyles.js +1 -1
- package/patchElementInlineStyles.js.flow +1 -1
- package/patchListElements.js +4 -4
- package/patchListElements.js.flow +5 -5
- package/patchMathElements.js +5 -7
- package/patchMathElements.js.flow +2 -4
- package/patchStyleElements.js +1 -1
- package/patchStyleElements.js.flow +7 -6
- package/patchTableElements.js +2 -3
- package/patchTableElements.js.flow +2 -3
- package/sanitizeURL.js +1 -1
- package/sanitizeURL.js.flow +1 -1
- package/splitListItem.js +2 -2
- package/splitListItem.js.flow +1 -1
- package/toggleBlockquote.js +4 -5
- package/toggleBlockquote.js.flow +5 -12
- package/toggleCodeBlock.js +6 -6
- package/toggleCodeBlock.js.flow +10 -10
- package/ui/AlertInfo.js +9 -9
- package/ui/BookmarkNodeView.js +13 -12
- package/ui/CommandButton.js +9 -9
- package/ui/CommandMenu.js +12 -12
- package/ui/CommandMenu.js.flow +1 -1
- package/ui/CommandMenuButton.js +11 -12
- package/ui/CommandMenuButton.js.flow +2 -3
- package/ui/CustomEditorView.js +13 -12
- package/ui/CustomEditorView.js.flow +1 -0
- package/ui/CustomMenu.js +8 -8
- package/ui/CustomMenuItem.js +10 -10
- package/ui/CustomNodeView.js +27 -16
- package/ui/CustomNodeView.js.flow +16 -9
- package/ui/CustomRadioButton.js +13 -15
- package/ui/CustomRadioButton.js.flow +2 -3
- package/ui/DocLayoutEditor.js +10 -11
- package/ui/DocLayoutEditor.js.flow +1 -2
- package/ui/Editor.js +16 -13
- package/ui/Editor.js.flow +7 -8
- package/ui/EditorFrameset.js +9 -9
- package/ui/EditorToolbar.js +24 -29
- package/ui/EditorToolbar.js.flow +22 -41
- package/ui/EditorToolbarConfig.js +5 -5
- package/ui/EditorToolbarConfig.js.flow +1 -1
- package/ui/FontSizeCommandMenuButton.js +10 -10
- package/ui/FontSizeCommandMenuButton.js.flow +1 -1
- package/ui/FontTypeCommandMenuButton.js +11 -12
- package/ui/FontTypeCommandMenuButton.js.flow +4 -5
- package/ui/Frag.js +8 -8
- package/ui/Icon.js +12 -12
- package/ui/ImageInlineEditor.js +9 -9
- package/ui/LinkTooltip.js +62 -27
- package/ui/LinkTooltip.js.flow +55 -22
- package/ui/LinkURLEditor.js +152 -34
- package/ui/LinkURLEditor.js.flow +177 -51
- package/ui/ListItemNodeView.js +4 -4
- package/ui/ListTypeButton.js +11 -14
- package/ui/ListTypeButton.js.flow +2 -5
- package/ui/ListTypeCommandButton.js +10 -10
- package/ui/ListTypeCommandButton.js.flow +1 -1
- package/ui/ListTypeMenu.js +11 -11
- package/ui/ListTypeMenu.js.flow +1 -1
- package/ui/LoadingIndicator.js +8 -8
- package/ui/MathEditor.js +10 -14
- package/ui/MathEditor.js.flow +1 -7
- package/ui/MathInlineEditor.js +13 -13
- package/ui/MathInlineEditor.js.flow +3 -4
- package/ui/MathNodeView.js +16 -15
- package/ui/MathNodeView.js.flow +10 -20
- package/ui/PasteMenu.js +11 -14
- package/ui/PasteMenu.js.flow +0 -4
- package/ui/ResizeObserver.js +1 -1
- package/ui/ResizeObserver.js.flow +1 -1
- package/ui/RichTextEditor.js +9 -9
- package/ui/SelectionObserver.js +6 -6
- package/ui/SelectionObserver.js.flow +2 -2
- package/ui/TableCellMenu.js +9 -9
- package/ui/TableGridSizeEditor.js +11 -12
- package/ui/TableGridSizeEditor.js.flow +6 -3
- package/ui/TableNodeView.js +15 -13
- package/ui/TableNodeView.js.flow +3 -3
- package/ui/bindScrollHandler.js +2 -1
- package/ui/bindScrollHandler.js.flow +1 -1
- package/ui/canUseCSSFont.js +5 -4
- package/ui/canUseCSSFont.js.flow +4 -5
- package/ui/czi-editor.css +1 -4
- package/ui/czi-form.css +102 -8
- package/ui/czi-image-view.css +1 -5
- package/ui/czi-link-tooltip.css +41 -0
- package/ui/czi-list.css +0 -4
- package/ui/czi-loading-indicator.css +1 -46
- package/ui/czi-table-cell-menu.css +3 -1
- package/ui/findActiveFontSize.js +2 -1
- package/ui/findActiveFontSize.js.flow +1 -4
- package/ui/findActiveFontType.js +4 -3
- package/ui/findActiveFontType.js.flow +3 -6
- package/ui/handleEditorDrop.js +1 -1
- package/ui/handleEditorDrop.js.flow +1 -1
- package/ui/handleEditorKeyDown.js +1 -1
- package/ui/handleEditorKeyDown.js.flow +1 -1
- package/ui/handleEditorPaste.js +1 -1
- package/ui/handleEditorPaste.js.flow +1 -1
- package/ui/injectStyleSheet.js +2 -2
- package/ui/injectStyleSheet.js.flow +2 -4
- package/ui/isElementFullyVisible.js +1 -10
- package/ui/isElementFullyVisible.js.flow +1 -13
- package/ui/mathquill-editor/MathQuillEditor.js +12 -13
- package/ui/mathquill-editor/MathQuillEditor.js.flow +0 -1
- package/ui/mathquill-editor/MathQuillEditorSymbolsPanel.js +9 -9
- package/ui/mathquill-editor/mathquill-import-kludge.js +1 -8
- package/ui/mathquill-editor/mathquill-import-kludge.js.flow +0 -7
- package/ui/renderLaTeXAsHTML.js +3 -3
- package/ui/resolveImage.js +4 -5
- package/ui/resolveImage.js.flow +3 -5
- package/ui/toCSSLineSpacing.js +2 -3
- package/ui/toCSSLineSpacing.js.flow +2 -4
package/normalizeHTML.js.flow
CHANGED
|
@@ -20,7 +20,7 @@ const LONG_UNDERLINE_PATTERN = /_+/g;
|
|
|
20
20
|
|
|
21
21
|
// This is a workround to convert " ...... " into wider tab
|
|
22
22
|
// tab spacers. For every 6 " ", they will be converted into tab spacers.
|
|
23
|
-
const LONG_TAB_SPACE_PATTERN = /(
|
|
23
|
+
const LONG_TAB_SPACE_PATTERN = /( ){6}/g;
|
|
24
24
|
|
|
25
25
|
const TAB_SPACER_HTML = new Array(6).join(
|
|
26
26
|
`<span ${DOM_ATTRIBUTE_SIZE}="${SPACER_SIZE_TAB}">${HAIR_SPACE_CHAR}</span>`
|
|
@@ -44,6 +44,8 @@ export default function normalizeHTML(html: string): string {
|
|
|
44
44
|
|
|
45
45
|
// Convert every two consecutive " " into a spacer tab.
|
|
46
46
|
html = html.replace(LONG_TAB_SPACE_PATTERN, TAB_SPACER_HTML);
|
|
47
|
+
// fix for jspdf copy paste text, from jspdf its always getting transparent
|
|
48
|
+
html = html.replace(/color:\s*transparent;/g, 'color: black;');
|
|
47
49
|
const doc = toSafeHTMLDocument(html);
|
|
48
50
|
if (doc) {
|
|
49
51
|
// styles.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@modusoperandi/licit",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.7",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"subversion": "1",
|
|
6
6
|
"description": "Rich text editor built with React and ProseMirror",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"ci:build": "npm run build:clean && npm run build:babel && npm run build:flow && npm run build:css && npm run build:fonts && npm run build:bom && copyfiles --up 1 \"src/**/*.d.ts\" dist/ && copyfiles --up 1 \"src/**/*.css\" dist && copyfiles package.json dist",
|
|
28
28
|
"flow": "flow --show-all-errors",
|
|
29
29
|
"lint:css": "stylelint \"**/*.css\"",
|
|
30
|
-
"lint:js": "eslint \"src/**/*.js\"
|
|
30
|
+
"lint:js": "eslint \"src/**/*.js\"",
|
|
31
31
|
"lint": "npm run lint:css & npm run lint:js",
|
|
32
32
|
"start": "node scripts/webserver.js",
|
|
33
33
|
"prebuild:style-service-docker": "node utils/build_customstyle_server.js",
|
|
@@ -60,34 +60,42 @@
|
|
|
60
60
|
"babel-loader": "^9.1.3",
|
|
61
61
|
"babel-plugin-flow-react-proptypes": "^26.0.0",
|
|
62
62
|
"babel-plugin-transform-react-remove-prop-types": "^0.4.24",
|
|
63
|
+
"body-parser": "^1.19.0",
|
|
63
64
|
"clean-webpack-plugin": "^4.0.0",
|
|
64
65
|
"copy-webpack-plugin": "^12.0.2",
|
|
65
|
-
"css-loader": "^7.1.1",
|
|
66
66
|
"copyfiles": "^2.4.1",
|
|
67
|
+
"cors": "^2.8.5",
|
|
68
|
+
"css-loader": "^7.1.1",
|
|
67
69
|
"enzyme": "^3.11.0",
|
|
68
|
-
"eslint": "^8.
|
|
70
|
+
"eslint": "^8.0.0",
|
|
69
71
|
"eslint-config-prettier": "^9.0.0",
|
|
70
72
|
"eslint-plugin-jest": "^28.2.0",
|
|
71
73
|
"eslint-plugin-prettier": "^5.1.3",
|
|
72
74
|
"eslint-plugin-react": "^7.33.2",
|
|
73
75
|
"exports-loader": "^5.0.0",
|
|
76
|
+
"express": "^4.17.1",
|
|
74
77
|
"file-loader": "^6.2.0",
|
|
75
|
-
"flow-bin": "^0.
|
|
78
|
+
"flow-bin": "^0.247.1",
|
|
76
79
|
"flow-copy-source": "^2.0.9",
|
|
80
|
+
"flow-typed": "^4.0.0",
|
|
77
81
|
"flow-webpack-plugin": "^1.2.0",
|
|
82
|
+
"formidable": "^3.5.1",
|
|
78
83
|
"html-loader": "^5.0.0",
|
|
79
84
|
"html-webpack-inline-source-plugin": "1.0.0-beta.2",
|
|
80
85
|
"html-webpack-plugin": "^5.5.0",
|
|
81
86
|
"husky": "^9.0.10",
|
|
82
87
|
"identity-obj-proxy": "^3.0.0",
|
|
88
|
+
"invariant": "^2.2.4",
|
|
83
89
|
"jest": "^29.2.0",
|
|
84
90
|
"jest-environment-jsdom": "^29.3.1",
|
|
85
91
|
"jest-junit": "^16.0.0",
|
|
86
|
-
"jest-prosemirror": "^
|
|
92
|
+
"jest-prosemirror": "^3.0.0",
|
|
87
93
|
"jest-sonar-reporter": "^2.0.0",
|
|
88
94
|
"lint-staged": "^15.2.2",
|
|
89
95
|
"mkdirp": "^3.0.1",
|
|
96
|
+
"mv": "^2.1.1",
|
|
90
97
|
"prettier": "^3.2.5",
|
|
98
|
+
"style-loader": "^4.0.0",
|
|
91
99
|
"stylelint": "^16.2.1",
|
|
92
100
|
"stylelint-config-standard": "^36.0.0",
|
|
93
101
|
"stylelint-prettier": "^5.0.0",
|
|
@@ -95,29 +103,25 @@
|
|
|
95
103
|
"ts-jest": "^29.1.2",
|
|
96
104
|
"ts-loader": "^9.5.0",
|
|
97
105
|
"ts-node": "^10.9.2",
|
|
106
|
+
"typescript": "5.5.4",
|
|
98
107
|
"webpack": "^5.74.0",
|
|
99
108
|
"webpack-cli": "^5.1.4",
|
|
100
109
|
"webpack-dev-server": "^5.0.2",
|
|
101
110
|
"write-file-webpack-plugin": "^4.5.1"
|
|
102
111
|
},
|
|
103
112
|
"dependencies": {
|
|
104
|
-
"@cfaester/enzyme-adapter-react-18": "^0.
|
|
113
|
+
"@cfaester/enzyme-adapter-react-18": "^0.8.0",
|
|
105
114
|
"@modusoperandi/color-picker": "^1.0.1",
|
|
106
115
|
"body-parser": "^1.19.0",
|
|
107
116
|
"browserkeymap": "^2.0.2",
|
|
108
|
-
"cors": "^2.8.5",
|
|
109
|
-
"express": "^4.17.1",
|
|
110
117
|
"flatted": "^3.1.0",
|
|
111
|
-
"flow-typed": "^
|
|
118
|
+
"flow-typed": "^4.0.0",
|
|
112
119
|
"formidable": "^3.5.1",
|
|
113
120
|
"invariant": "^2.2.4",
|
|
114
121
|
"jquery": "^3.5.1",
|
|
115
122
|
"katex": "^0.16.9",
|
|
116
|
-
"mv": "^2.1.1",
|
|
117
123
|
"node-mathquill": "^0.10.2",
|
|
118
|
-
"
|
|
119
|
-
"prosemirror-tables": "^1.2.5",
|
|
120
|
-
"query-string": "^9.0.0",
|
|
124
|
+
"react-tooltip": "^5.28.0",
|
|
121
125
|
"resize-observer-polyfill": "^1.5.1",
|
|
122
126
|
"smooth-scroll-into-view-if-needed": "^2.0.2",
|
|
123
127
|
"style-loader": "^4.0.0",
|
|
@@ -126,11 +130,12 @@
|
|
|
126
130
|
},
|
|
127
131
|
"peerDependencies": {
|
|
128
132
|
"@modusoperandi/licit-ui-commands": "^1.0.0",
|
|
133
|
+
"jquery": "^3.5.1",
|
|
129
134
|
"prosemirror-collab": "^1.2.2",
|
|
130
135
|
"prosemirror-tables": "^1.2.5"
|
|
131
136
|
},
|
|
132
137
|
"overrides": {
|
|
133
|
-
"
|
|
138
|
+
"libxmljs2": "^1.0.0"
|
|
134
139
|
},
|
|
135
140
|
"importSort": {
|
|
136
141
|
".js": {
|
|
@@ -154,4 +159,4 @@
|
|
|
154
159
|
"prettier --write"
|
|
155
160
|
]
|
|
156
161
|
}
|
|
157
|
-
}
|
|
162
|
+
}
|
package/patchAnchorElements.js
CHANGED
|
@@ -15,7 +15,7 @@ function patchAnchorElement(node) {
|
|
|
15
15
|
// <a id="t.0"></a>
|
|
16
16
|
// <table class="c23">
|
|
17
17
|
// and these anchor link should not be visible.
|
|
18
|
-
var visible = node.id.
|
|
18
|
+
var visible = !node.id.startsWith('t.');
|
|
19
19
|
visible && node.setAttribute(ATTRIBUTE_BOOKMARK_VISIBLE, 'true');
|
|
20
20
|
}
|
|
21
21
|
var nextNode = node.nextElementSibling;
|
|
@@ -23,7 +23,7 @@ function patchAnchorElement(node: HTMLElement): void {
|
|
|
23
23
|
// <a id="t.0"></a>
|
|
24
24
|
// <table class="c23">
|
|
25
25
|
// and these anchor link should not be visible.
|
|
26
|
-
const visible = node.id.
|
|
26
|
+
const visible = !node.id.startsWith('t.');
|
|
27
27
|
|
|
28
28
|
visible && node.setAttribute(ATTRIBUTE_BOOKMARK_VISIBLE, 'true');
|
|
29
29
|
}
|
package/patchBreakElements.js
CHANGED
|
@@ -6,15 +6,16 @@ export default function patchBreakElements(doc) {
|
|
|
6
6
|
Array.from(doc.querySelectorAll(selector)).forEach(patchBreakElement);
|
|
7
7
|
}
|
|
8
8
|
function patchBreakElement(brElement) {
|
|
9
|
+
var _brElement$parentElem, _div$parentElement;
|
|
9
10
|
var ownerDocument = brElement.ownerDocument,
|
|
10
11
|
parentElement = brElement.parentElement;
|
|
11
12
|
if (!ownerDocument || !parentElement) {
|
|
12
13
|
return;
|
|
13
14
|
}
|
|
14
|
-
var div = brElement.parentElement
|
|
15
|
+
var div = (_brElement$parentElem = brElement.parentElement) === null || _brElement$parentElem === void 0 ? void 0 : _brElement$parentElem.parentElement;
|
|
15
16
|
if (!div) {
|
|
16
17
|
return;
|
|
17
18
|
}
|
|
18
19
|
var pp = ownerDocument.createElement('p');
|
|
19
|
-
|
|
20
|
+
(_div$parentElement = div.parentElement) === null || _div$parentElement === void 0 || _div$parentElement.replaceChild(pp, div);
|
|
20
21
|
}
|
|
@@ -13,10 +13,10 @@ function patchBreakElement(brElement: HTMLElement): void {
|
|
|
13
13
|
if (!ownerDocument || !parentElement) {
|
|
14
14
|
return;
|
|
15
15
|
}
|
|
16
|
-
const div = brElement.parentElement
|
|
16
|
+
const div = brElement.parentElement?.parentElement;
|
|
17
17
|
if (!div) {
|
|
18
18
|
return;
|
|
19
19
|
}
|
|
20
20
|
const pp = ownerDocument.createElement('p');
|
|
21
|
-
div.parentElement
|
|
21
|
+
div.parentElement?.replaceChild(pp, div);
|
|
22
22
|
}
|
|
@@ -23,7 +23,7 @@ function patchBlockElement(el) {
|
|
|
23
23
|
function patchBlockElementStyle(el, inlineStyleName) {
|
|
24
24
|
var element = el;
|
|
25
25
|
var elementStyle = element.style;
|
|
26
|
-
var value = elementStyle
|
|
26
|
+
var value = elementStyle === null || elementStyle === void 0 ? void 0 : elementStyle[inlineStyleName];
|
|
27
27
|
if (inlineStyleName === 'textIndent' && value) {
|
|
28
28
|
// This is the workaround to fix the issue that people with mix both
|
|
29
29
|
// text-indent and margin-left together.
|
|
@@ -49,7 +49,7 @@ function patchBlockElementStyle(
|
|
|
49
49
|
): void {
|
|
50
50
|
const element: any = el;
|
|
51
51
|
const elementStyle = element.style;
|
|
52
|
-
const value = elementStyle
|
|
52
|
+
const value = elementStyle?.[inlineStyleName];
|
|
53
53
|
|
|
54
54
|
if (inlineStyleName === 'textIndent' && value) {
|
|
55
55
|
// This is the workaround to fix the issue that people with mix both
|
package/patchListElements.js
CHANGED
|
@@ -23,12 +23,12 @@ var CHAR_CIRCLE = "\u25CB";
|
|
|
23
23
|
var CHAR_SQUARE = "\u25A0";
|
|
24
24
|
var CHAR_BOX = "\u274F";
|
|
25
25
|
var CHAR_ZERO_SPACE = "\u200B";
|
|
26
|
-
var INLINE_NODE_NAME_PATTERN = /^(#text
|
|
26
|
+
var INLINE_NODE_NAME_PATTERN = /^(#text|(A|SPAN|B|STRONG))$/;
|
|
27
27
|
function patchListElementsElement(listElement) {
|
|
28
28
|
// If the children of `listElement` all have teh same marginLeft, assume
|
|
29
29
|
// it to be indented.
|
|
30
|
-
var marginLeft
|
|
31
|
-
var beforeContent
|
|
30
|
+
var marginLeft;
|
|
31
|
+
var beforeContent;
|
|
32
32
|
var parentElement = listElement.parentElement,
|
|
33
33
|
children = listElement.children;
|
|
34
34
|
|
|
@@ -50,7 +50,7 @@ function patchListElementsElement(listElement) {
|
|
|
50
50
|
if (beforeContent !== bc) {
|
|
51
51
|
beforeContent = null;
|
|
52
52
|
}
|
|
53
|
-
var ml = style
|
|
53
|
+
var ml = (style === null || style === void 0 ? void 0 : style.marginLeft) || '';
|
|
54
54
|
if (marginLeft === undefined) {
|
|
55
55
|
marginLeft = ml;
|
|
56
56
|
}
|
|
@@ -34,13 +34,13 @@ const CHAR_CIRCLE = '\u25cb';
|
|
|
34
34
|
const CHAR_SQUARE = '\u25a0';
|
|
35
35
|
const CHAR_BOX = '\u274f';
|
|
36
36
|
const CHAR_ZERO_SPACE = '\u200B';
|
|
37
|
-
const INLINE_NODE_NAME_PATTERN = /^(#text
|
|
37
|
+
const INLINE_NODE_NAME_PATTERN = /^(#text|(A|SPAN|B|STRONG))$/;
|
|
38
38
|
|
|
39
39
|
function patchListElementsElement(listElement: HTMLElement): void {
|
|
40
40
|
// If the children of `listElement` all have teh same marginLeft, assume
|
|
41
41
|
// it to be indented.
|
|
42
|
-
let marginLeft
|
|
43
|
-
let beforeContent
|
|
42
|
+
let marginLeft;
|
|
43
|
+
let beforeContent;
|
|
44
44
|
const { parentElement, children } = listElement;
|
|
45
45
|
|
|
46
46
|
// A workaround to patch the issue when <ul /> or <ol /> is pasted as the
|
|
@@ -68,7 +68,7 @@ function patchListElementsElement(listElement: HTMLElement): void {
|
|
|
68
68
|
beforeContent = null;
|
|
69
69
|
}
|
|
70
70
|
|
|
71
|
-
const ml = (style
|
|
71
|
+
const ml = (style?.marginLeft) || '';
|
|
72
72
|
if (marginLeft === undefined) {
|
|
73
73
|
marginLeft = ml;
|
|
74
74
|
}
|
|
@@ -238,7 +238,7 @@ function liftNestedListElements(doc: Document): void {
|
|
|
238
238
|
// <ol><li>CCC</li></ol>
|
|
239
239
|
|
|
240
240
|
// Close the parent list before the list.
|
|
241
|
-
htmlMutator.insertHTMLBefore(
|
|
241
|
+
htmlMutator.insertHTMLBefore(`</${parentListNodeName}>`, list);
|
|
242
242
|
// Open a new list after list.
|
|
243
243
|
htmlMutator.insertHTMLAfter(
|
|
244
244
|
`<${parentListNodeName}
|
package/patchMathElements.js
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import queryString from 'query-string';
|
|
2
|
-
import url from 'url';
|
|
3
1
|
export default function patchMathElements(doc) {
|
|
4
2
|
Array.from(doc.querySelectorAll('img')).forEach(patchGoogleEquationElement);
|
|
5
3
|
}
|
|
@@ -39,14 +37,14 @@ function getGoogleEquationContent(src) {
|
|
|
39
37
|
if (!src) {
|
|
40
38
|
return null;
|
|
41
39
|
}
|
|
42
|
-
var
|
|
43
|
-
host =
|
|
44
|
-
pathname =
|
|
45
|
-
query =
|
|
40
|
+
var _URL = new URL(src),
|
|
41
|
+
host = _URL.host,
|
|
42
|
+
pathname = _URL.pathname,
|
|
43
|
+
query = _URL.query;
|
|
46
44
|
if (host !== 'www.google.com' || pathname !== '/chart') {
|
|
47
45
|
return null;
|
|
48
46
|
}
|
|
49
|
-
var params =
|
|
47
|
+
var params = new URL(query);
|
|
50
48
|
var chartType = params[PARAM_CHART_CHART_TYPE];
|
|
51
49
|
var label = params[PARAM_CHART_LABEL];
|
|
52
50
|
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
// @flow
|
|
2
2
|
|
|
3
|
-
import queryString from 'query-string';
|
|
4
|
-
import url from 'url';
|
|
5
3
|
export default function patchMathElements(doc: Document): void {
|
|
6
4
|
Array.from(doc.querySelectorAll('img')).forEach(patchGoogleEquationElement);
|
|
7
5
|
}
|
|
@@ -41,12 +39,12 @@ function getGoogleEquationContent(src: ?string): ?string {
|
|
|
41
39
|
if (!src) {
|
|
42
40
|
return null;
|
|
43
41
|
}
|
|
44
|
-
const { host, pathname, query } =
|
|
42
|
+
const { host, pathname, query } = new URL(src);
|
|
45
43
|
if (host !== 'www.google.com' || pathname !== '/chart') {
|
|
46
44
|
return null;
|
|
47
45
|
}
|
|
48
46
|
|
|
49
|
-
const params =
|
|
47
|
+
const params = new URL(query);
|
|
50
48
|
const chartType = params[PARAM_CHART_CHART_TYPE];
|
|
51
49
|
const label = params[PARAM_CHART_LABEL];
|
|
52
50
|
|
package/patchStyleElements.js
CHANGED
|
@@ -64,7 +64,7 @@ export default function patchStyleElements(doc) {
|
|
|
64
64
|
}
|
|
65
65
|
});
|
|
66
66
|
if (selectorText.indexOf(',') > -1) {
|
|
67
|
-
selectorText.split(
|
|
67
|
+
selectorText.split('.').trim().forEach(function (st) {
|
|
68
68
|
buildSelectorTextToCSSText(selectorTextToCSSTexts, st, cssText);
|
|
69
69
|
});
|
|
70
70
|
} else {
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
// @flow
|
|
2
2
|
|
|
3
3
|
import toCSSColor from './ui/toCSSColor.js';
|
|
4
|
-
import {
|
|
5
|
-
toCSSLineSpacing
|
|
6
|
-
} from '@modusoperandi/licit-ui-commands';
|
|
4
|
+
import { toCSSLineSpacing } from '@modusoperandi/licit-ui-commands';
|
|
7
5
|
|
|
8
6
|
const LIST_ITEM_PSEUDO_ELEMENT_BEFORE = /li:+before/;
|
|
9
7
|
const NODE_NAME_SELECTOR = /^[a-zA-Z]+\d*$/;
|
|
@@ -81,9 +79,12 @@ export default function patchStyleElements(doc: Document): void {
|
|
|
81
79
|
}
|
|
82
80
|
});
|
|
83
81
|
if (selectorText.indexOf(',') > -1) {
|
|
84
|
-
selectorText
|
|
85
|
-
|
|
86
|
-
|
|
82
|
+
selectorText
|
|
83
|
+
.split('.')
|
|
84
|
+
.trim()
|
|
85
|
+
.forEach((st) => {
|
|
86
|
+
buildSelectorTextToCSSText(selectorTextToCSSTexts, st, cssText);
|
|
87
|
+
});
|
|
87
88
|
} else {
|
|
88
89
|
buildSelectorTextToCSSText(
|
|
89
90
|
selectorTextToCSSTexts,
|
package/patchTableElements.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { PT_TO_PX_RATIO } from './convertToCSSPTValue.js';
|
|
2
|
-
import convertToCSSPTValue from './convertToCSSPTValue.js';
|
|
1
|
+
import convertToCSSPTValue, { PT_TO_PX_RATIO } from './convertToCSSPTValue.js';
|
|
3
2
|
import toHexColor from './ui/toHexColor.js';
|
|
4
3
|
export default function patchTableElements(doc) {
|
|
5
4
|
Array.from(doc.querySelectorAll('td')).forEach(patchTableCell);
|
|
@@ -25,7 +24,7 @@ function patchTableCell(tdElement) {
|
|
|
25
24
|
spans.some(function (spanElement) {
|
|
26
25
|
var retVal = true;
|
|
27
26
|
var spanStyle = spanElement.style;
|
|
28
|
-
if (!spanStyle
|
|
27
|
+
if (!(spanStyle !== null && spanStyle !== void 0 && spanStyle.backgroundColor)) {
|
|
29
28
|
retVal = false;
|
|
30
29
|
} else {
|
|
31
30
|
var spanBgColor = toHexColor(spanStyle.backgroundColor);
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
// @flow
|
|
2
|
-
import { PT_TO_PX_RATIO } from './convertToCSSPTValue.js';
|
|
3
|
-
import convertToCSSPTValue from './convertToCSSPTValue.js';
|
|
2
|
+
import convertToCSSPTValue, { PT_TO_PX_RATIO } from './convertToCSSPTValue.js';
|
|
4
3
|
import toHexColor from './ui/toHexColor.js';
|
|
5
4
|
|
|
6
5
|
export default function patchTableElements(doc: Document): void {
|
|
@@ -26,7 +25,7 @@ function patchTableCell(tdElement: HTMLElement): void {
|
|
|
26
25
|
spans.some((spanElement) => {
|
|
27
26
|
let retVal = true;
|
|
28
27
|
const spanStyle = spanElement.style;
|
|
29
|
-
if (!spanStyle
|
|
28
|
+
if (!spanStyle?.backgroundColor) {
|
|
30
29
|
retVal = false;
|
|
31
30
|
} else {
|
|
32
31
|
const spanBgColor = toHexColor(spanStyle.backgroundColor);
|
package/sanitizeURL.js
CHANGED
package/sanitizeURL.js.flow
CHANGED
package/splitListItem.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
2
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
3
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
-
function _defineProperty(
|
|
4
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
5
5
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
6
6
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
7
|
import uuid from './ui/uuid.js';
|
|
@@ -71,7 +71,7 @@ export default function splitListItem(tr, schema) {
|
|
|
71
71
|
var $from = selection.$from,
|
|
72
72
|
$to = selection.$to,
|
|
73
73
|
node = selection.node;
|
|
74
|
-
if (node && node.isBlock || $from.depth < 2 || !$from.sameParent($to)) {
|
|
74
|
+
if (node !== null && node !== void 0 && node.isBlock || $from.depth < 2 || !$from.sameParent($to)) {
|
|
75
75
|
return tr;
|
|
76
76
|
}
|
|
77
77
|
var grandParent = $from.node(-1);
|
package/splitListItem.js.flow
CHANGED
|
@@ -69,7 +69,7 @@ export default function splitListItem(
|
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
const { $from, $to, node } = selection;
|
|
72
|
-
if ((node
|
|
72
|
+
if ((node?.isBlock) || $from.depth < 2 || !$from.sameParent($to)) {
|
|
73
73
|
return tr;
|
|
74
74
|
}
|
|
75
75
|
|
package/toggleBlockquote.js
CHANGED
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import { Schema } from 'prosemirror-model';
|
|
2
2
|
import { Transform } from 'prosemirror-transform';
|
|
3
3
|
import { BLOCKQUOTE, HEADING, LIST_ITEM, PARAGRAPH } from './NodeNames.js';
|
|
4
|
-
import { compareNumber } from '@modusoperandi/licit-ui-commands';
|
|
5
|
-
import { isInsideListItem } from '@modusoperandi/licit-ui-commands';
|
|
6
|
-
import { isListNode } from '@modusoperandi/licit-ui-commands';
|
|
7
|
-
import { unwrapNodesFromList } from '@modusoperandi/licit-ui-commands';
|
|
4
|
+
import { compareNumber, isInsideListItem, isListNode, unwrapNodesFromList } from '@modusoperandi/licit-ui-commands';
|
|
8
5
|
export default function toggleBlockquote(tr, schema) {
|
|
9
6
|
var nodes = schema.nodes;
|
|
10
7
|
var _tr = tr,
|
|
@@ -34,7 +31,9 @@ export default function toggleBlockquote(tr, schema) {
|
|
|
34
31
|
return !isListNode(node);
|
|
35
32
|
});
|
|
36
33
|
// Update from the bottom to avoid disruptive changes in pos.
|
|
37
|
-
|
|
34
|
+
var sortedPoses = [].concat(poses); // Create a shallow copy of poses
|
|
35
|
+
sortedPoses.sort(compareNumber);
|
|
36
|
+
sortedPoses.sort(compareNumber).reverse().forEach(function (pos) {
|
|
38
37
|
tr = setBlockquoteNode(tr, schema, pos);
|
|
39
38
|
});
|
|
40
39
|
return tr;
|
package/toggleBlockquote.js.flow
CHANGED
|
@@ -14,16 +14,7 @@ import {
|
|
|
14
14
|
PARAGRAPH
|
|
15
15
|
} from './NodeNames.js';
|
|
16
16
|
import {
|
|
17
|
-
compareNumber
|
|
18
|
-
} from '@modusoperandi/licit-ui-commands';
|
|
19
|
-
import {
|
|
20
|
-
isInsideListItem
|
|
21
|
-
} from '@modusoperandi/licit-ui-commands';
|
|
22
|
-
import {
|
|
23
|
-
isListNode
|
|
24
|
-
} from '@modusoperandi/licit-ui-commands';
|
|
25
|
-
import {
|
|
26
|
-
unwrapNodesFromList
|
|
17
|
+
compareNumber, isInsideListItem, isListNode, unwrapNodesFromList
|
|
27
18
|
} from '@modusoperandi/licit-ui-commands';
|
|
28
19
|
|
|
29
20
|
export default function toggleBlockquote(
|
|
@@ -58,8 +49,10 @@ export default function toggleBlockquote(
|
|
|
58
49
|
return !isListNode(node);
|
|
59
50
|
});
|
|
60
51
|
// Update from the bottom to avoid disruptive changes in pos.
|
|
61
|
-
poses
|
|
62
|
-
|
|
52
|
+
const sortedPoses = [...poses]; // Create a shallow copy of poses
|
|
53
|
+
sortedPoses.sort(compareNumber);
|
|
54
|
+
|
|
55
|
+
sortedPoses.sort(compareNumber)
|
|
63
56
|
.reverse()
|
|
64
57
|
.forEach((pos) => {
|
|
65
58
|
tr = setBlockquoteNode(tr, schema, pos);
|
package/toggleCodeBlock.js
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
|
+
function _readOnlyError(r) { throw new TypeError('"' + r + '" is read-only'); }
|
|
1
2
|
import { Schema } from 'prosemirror-model';
|
|
2
3
|
import { TextSelection } from 'prosemirror-state';
|
|
3
4
|
import { Transform } from 'prosemirror-transform';
|
|
4
5
|
import { MARK_LINK } from './MarkNames';
|
|
5
6
|
import { BLOCKQUOTE, CODE_BLOCK, HEADING, PARAGRAPH } from './NodeNames';
|
|
6
|
-
import { clearMarks } from '@modusoperandi/licit-ui-commands';
|
|
7
|
-
import { compareNumber } from '@modusoperandi/licit-ui-commands';
|
|
8
|
-
import { isListNode } from '@modusoperandi/licit-ui-commands';
|
|
7
|
+
import { clearMarks, compareNumber, isListNode } from '@modusoperandi/licit-ui-commands';
|
|
9
8
|
export default function toggleCodeBlock(tr, schema) {
|
|
10
9
|
var nodes = schema.nodes;
|
|
11
10
|
var _tr = tr,
|
|
@@ -37,10 +36,11 @@ export default function toggleCodeBlock(tr, schema) {
|
|
|
37
36
|
}
|
|
38
37
|
return isBlock;
|
|
39
38
|
});
|
|
40
|
-
|
|
39
|
+
var sortedPoses = [].concat(poses); // Create a shallow copy of poses
|
|
41
40
|
// Update from the bottom to avoid disruptive changes in pos.
|
|
42
|
-
allowed
|
|
43
|
-
|
|
41
|
+
allowed ? poses.toSorted(compareNumber) : poses, _readOnlyError("sortedPoses");
|
|
42
|
+
allowed && sortedPoses.sort(compareNumber).reverse().forEach(function (pos) {
|
|
43
|
+
tr = setCodeBlockNodeEnabled(tr, schema, pos, !startWithCodeBlock);
|
|
44
44
|
});
|
|
45
45
|
return tr;
|
|
46
46
|
}
|
package/toggleCodeBlock.js.flow
CHANGED
|
@@ -6,9 +6,11 @@ import { Transform } from 'prosemirror-transform';
|
|
|
6
6
|
|
|
7
7
|
import { MARK_LINK } from './MarkNames';
|
|
8
8
|
import { BLOCKQUOTE, CODE_BLOCK, HEADING, PARAGRAPH } from './NodeNames';
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
import {
|
|
10
|
+
clearMarks,
|
|
11
|
+
compareNumber,
|
|
12
|
+
isListNode,
|
|
13
|
+
} from '@modusoperandi/licit-ui-commands';
|
|
12
14
|
|
|
13
15
|
export default function toggleCodeBlock(
|
|
14
16
|
tr: Transform,
|
|
@@ -47,18 +49,16 @@ export default function toggleCodeBlock(
|
|
|
47
49
|
return isBlock;
|
|
48
50
|
});
|
|
49
51
|
|
|
52
|
+
const sortedPoses = [...poses]; // Create a shallow copy of poses
|
|
50
53
|
// Update from the bottom to avoid disruptive changes in pos.
|
|
54
|
+
sortedPoses = allowed ? poses.toSorted(compareNumber) : poses;
|
|
55
|
+
|
|
51
56
|
allowed &&
|
|
52
|
-
|
|
57
|
+
sortedPoses
|
|
53
58
|
.sort(compareNumber)
|
|
54
59
|
.reverse()
|
|
55
60
|
.forEach((pos) => {
|
|
56
|
-
tr = setCodeBlockNodeEnabled(
|
|
57
|
-
tr,
|
|
58
|
-
schema,
|
|
59
|
-
pos,
|
|
60
|
-
startWithCodeBlock ? false : true
|
|
61
|
-
);
|
|
61
|
+
tr = setCodeBlockNodeEnabled(tr, schema, pos, !startWithCodeBlock);
|
|
62
62
|
});
|
|
63
63
|
return tr;
|
|
64
64
|
}
|
package/ui/AlertInfo.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
2
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
3
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
-
function _classCallCheck(
|
|
5
|
-
function _defineProperties(
|
|
6
|
-
function _createClass(
|
|
4
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
5
|
+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
6
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
7
7
|
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
8
|
-
function _possibleConstructorReturn(
|
|
9
|
-
function _assertThisInitialized(
|
|
8
|
+
function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
|
|
9
|
+
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
|
|
10
10
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
11
|
-
function _getPrototypeOf(
|
|
12
|
-
function _inherits(
|
|
13
|
-
function _setPrototypeOf(
|
|
14
|
-
function _defineProperty(
|
|
11
|
+
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
|
|
12
|
+
function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
|
|
13
|
+
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
14
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
15
15
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
16
16
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
17
17
|
import * as React from 'react';
|