@modusoperandi/licit 0.14.17 → 1.0.0
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 +87 -0
- package/BlockquoteInsertNewLineCommand.js.flow +77 -0
- package/BlockquoteNodeSpec.js +30 -0
- package/BlockquoteNodeSpec.js.flow +30 -0
- package/BlockquoteToggleCommand.js +63 -0
- package/BlockquoteToggleCommand.js.flow +56 -0
- package/BookmarkNodeSpec.js +40 -0
- package/BookmarkNodeSpec.js.flow +39 -0
- package/BulletListNodeSpec.js +51 -0
- package/BulletListNodeSpec.js.flow +61 -0
- package/CZIProseMirror.js +78 -0
- package/CZIProseMirror.js.flow +90 -0
- package/CodeBlockCommand.js +73 -0
- package/CodeBlockCommand.js.flow +65 -0
- package/CodeBlockNodeSpec.js +26 -0
- package/CodeMarkSpec.js +11 -0
- package/CodeMarkSpec.js.flow +14 -0
- package/ContentPlaceholderPlugin.js +186 -0
- package/ContentPlaceholderPlugin.js.flow +187 -0
- package/CursorPlaceholderPlugin.js +119 -0
- package/DocLayoutCommand.js +97 -0
- package/DocLayoutCommand.js.flow +99 -0
- package/DocNodeSpec.js +67 -0
- package/DocNodeSpec.js.flow +64 -0
- package/EMMarkSpec.js +15 -0
- package/EMMarkSpec.js.flow +14 -0
- package/EditorCommands.js +111 -0
- package/EditorCommands.js.flow +143 -0
- package/EditorKeyMap.js +74 -0
- package/EditorKeyMap.js.flow +187 -0
- package/EditorMarks.js +51 -0
- package/EditorMarks.js.flow +71 -0
- package/EditorNodes.js +47 -0
- package/EditorNodes.js.flow +59 -0
- package/EditorPageLayoutPlugin.js +78 -0
- package/EditorPageLayoutPlugin.js.flow +67 -0
- package/EditorPlugins.js +6 -0
- package/EditorPlugins.js.flow +8 -0
- package/EditorSchema.js +8 -0
- package/EditorSchema.js.flow +12 -0
- package/EditorState.js +3 -0
- package/FontSizeMarkSpec.js +38 -0
- package/FontSizeMarkSpec.js.flow +49 -0
- package/FontTypeMarkSpec.js +63 -0
- package/FontTypeMarkSpec.js.flow +80 -0
- package/HTMLMutator.js +67 -0
- package/HTMLMutator.js.flow +59 -0
- package/HardBreakNodeSpec.js +13 -0
- package/HeadingNodeSpec.js +57 -0
- package/HistoryRedoCommand.js +49 -0
- package/HistoryRedoCommand.js.flow +41 -0
- package/HistoryUndoCommand.js +49 -0
- package/HistoryUndoCommand.js.flow +41 -0
- package/HorizontalRuleCommand.js +78 -0
- package/HorizontalRuleCommand.js.flow +71 -0
- package/HorizontalRuleNodeSpec.js +31 -0
- package/ImageUploadPlaceholderPlugin.js +181 -0
- package/ImageUploadPlaceholderPlugin.js.flow +192 -0
- package/LinkMarkSpec.js +34 -0
- package/LinkMarkSpec.js.flow +32 -0
- package/LinkSetURLCommand.js +111 -0
- package/LinkSetURLCommand.js.flow +117 -0
- package/LinkTooltipPlugin.js +185 -0
- package/LinkTooltipPlugin.js.flow +190 -0
- package/ListItemInsertNewLineCommand.js +87 -0
- package/ListItemInsertNewLineCommand.js.flow +77 -0
- package/ListItemMergeCommand.js +191 -0
- package/ListItemMergeCommand.js.flow +199 -0
- package/ListItemNodeSpec.js +45 -0
- package/ListItemNodeSpec.js.flow +52 -0
- package/ListSplitCommand.js +55 -0
- package/ListSplitCommand.js.flow +54 -0
- package/ListToggleCommand.js +96 -0
- package/ListToggleCommand.js.flow +99 -0
- package/MarkNames.js +16 -0
- package/MarksClearCommand.js +65 -0
- package/MarksClearCommand.js.flow +65 -0
- package/MathEditCommand.js +116 -0
- package/MathEditCommand.js.flow +120 -0
- package/MathNodeSpec.js +49 -0
- package/MathNodeSpec.js.flow +46 -0
- package/NodeNames.js +21 -0
- package/OrderedListNodeSpec.js +117 -0
- package/OrderedListNodeSpec.js.flow +132 -0
- package/ParagraphNodeSpec.js +126 -0
- package/ParagraphNodeSpec.js.flow +156 -0
- package/ParagraphSpacingCommand.js +119 -0
- package/ParagraphSpacingCommand.js.flow +144 -0
- package/PrintCommand.js +58 -0
- package/PrintCommand.js.flow +53 -0
- package/SelectionPlaceholderPlugin.js +120 -0
- package/SpacerMarkSpec.js +39 -0
- package/SpacerMarkSpec.js.flow +47 -0
- package/StrikeMarkSpec.js +17 -0
- package/StrikeMarkSpec.js.flow +21 -0
- package/StrongMarkSpec.js +26 -0
- package/StrongMarkSpec.js.flow +25 -0
- package/StyleView.js +29 -0
- package/TableBackgroundColorCommand.js +81 -0
- package/TableBorderColorCommand.js +81 -0
- package/TableCellColorCommand.js +81 -0
- package/TableCellColorCommand.js.flow +75 -0
- package/TableCellMenuPlugin.js +137 -0
- package/TableCellMenuPlugin.js.flow +132 -0
- package/TableInsertCommand.js +124 -0
- package/TableInsertCommand.js.flow +120 -0
- package/TableMergeCellsCommand.js +116 -0
- package/TableMergeCellsCommand.js.flow +112 -0
- package/TableNodesSpecs.js +78 -0
- package/TableNodesSpecs.js.flow +78 -0
- package/TablePlugins.js +7 -0
- package/TablePlugins.js.flow +14 -0
- package/TableResizePlugin.js +542 -0
- package/TableResizePlugin.js.flow +632 -0
- package/TextColorMarkSpec.js +29 -0
- package/TextColorMarkSpec.js.flow +35 -0
- package/TextHighlightMarkSpec.js +31 -0
- package/TextHighlightMarkSpec.js.flow +38 -0
- package/TextInsertTabSpaceCommand.js +98 -0
- package/TextInsertTabSpaceCommand.js.flow +106 -0
- package/TextNoWrapMarkSpec.js +11 -0
- package/TextNoWrapMarkSpec.js.flow +14 -0
- package/TextNodeSpec.js +4 -0
- package/TextSelectionMarkSpec.js +18 -0
- package/TextSelectionMarkSpec.js.flow +24 -0
- package/TextSubMarkSpec.js +15 -0
- package/TextSubMarkSpec.js.flow +20 -0
- package/TextSuperMarkSpec.js +15 -0
- package/TextSuperMarkSpec.js.flow +20 -0
- package/TextUnderlineMarkSpec.js +21 -0
- package/TextUnderlineMarkSpec.js.flow +27 -0
- package/Types.js +72 -0
- package/WebFontLoader.js +32 -0
- package/blockQuoteInputRule.js +25 -0
- package/blockQuoteInputRule.js.flow +36 -0
- package/bom.xml +66662 -0
- package/browser.js +6 -0
- package/buildEditorPlugins.js +49 -0
- package/buildEditorPlugins.js.flow +49 -0
- package/buildInputRules.js +73 -0
- package/buildInputRules.js.flow +81 -0
- package/client/CollabConnector.js +85 -0
- package/client/CollabConnector.js.flow +90 -0
- package/client/EditorConnection.js +321 -0
- package/client/EditorConnection.js.flow +323 -0
- package/client/Licit.js +613 -0
- package/client/Licit.js.flow +643 -0
- package/client/Licit.test.js +104 -0
- package/client/Licit.test.js.flow +98 -0
- package/client/Reporter.js +50 -0
- package/client/SimpleConnector.js +55 -0
- package/client/http.js +90 -0
- package/client/throttle.js +20 -0
- package/convertFromDOMElement.js +26 -0
- package/convertFromDOMElement.js.flow +36 -0
- package/convertFromHTML.js +9 -0
- package/convertFromHTML.js.flow +17 -0
- package/convertFromJSON.js +40 -0
- package/convertFromJSON.js.flow +56 -0
- package/convertToCSSPTValue.js +18 -0
- package/convertToJSON.js +4 -0
- package/createCommand.js +59 -0
- package/createCommand.js.flow +62 -0
- package/createEditorKeyMap.js +54 -0
- package/createEditorKeyMap.js.flow +94 -0
- package/createEmptyEditorState.js +16 -0
- package/createEmptyEditorState.js.flow +31 -0
- package/createTableResizingPlugin.js +68 -0
- package/findActionableCell.js +53 -0
- package/findActionableCell.js.flow +74 -0
- package/findActiveMark.js +25 -0
- package/hyphenize.js +14 -0
- package/index.d.ts +6 -0
- package/index.js +8 -0
- package/insertTable.js +43 -0
- package/insertTable.js.flow +56 -0
- package/isEditorStateEmpty.js +28 -0
- package/isTableNode.js +6 -0
- package/joinDown.js +25 -0
- package/joinListNode.js +31 -0
- package/joinUp.js +30 -0
- package/keymaps.js +67 -0
- package/lookUpElement.js +9 -0
- package/nodeAt.js +9 -0
- package/normalizeHTML.js +63 -0
- package/normalizeHTML.js.flow +78 -0
- package/package.json +48 -34
- package/patchAnchorElements.js +29 -0
- package/patchAnchorElements.js.flow +38 -0
- package/patchBreakElements.js +20 -0
- package/patchElementInlineStyles.js +65 -0
- package/patchElementInlineStyles.js.flow +92 -0
- package/patchListElements.js +228 -0
- package/patchListElements.js.flow +276 -0
- package/patchMathElements.js +59 -0
- package/patchParagraphElements.js +13 -0
- package/patchParagraphElements.js.flow +20 -0
- package/patchStyleElements.js +152 -0
- package/patchStyleElements.js.flow +196 -0
- package/patchTableElements.js +86 -0
- package/patchTableElements.js.flow +89 -0
- package/rebaseDocWithSteps.js +25 -0
- package/sanitizeURL.js +10 -0
- package/splitListItem.js +170 -0
- package/splitListItem.js.flow +191 -0
- package/styles.css +19 -0
- package/styles0.css +29 -0
- package/toClosestFontPtSize.js +17 -0
- package/toClosestFontPtSize.js.flow +22 -0
- package/toSafeHTMLDocument.js +7 -0
- package/toggleBlockquote.js +75 -0
- package/toggleBlockquote.js.flow +108 -0
- package/toggleCodeBlock.js +75 -0
- package/ui/AlertInfo.js +69 -0
- package/ui/BookmarkNodeView.js +104 -0
- package/ui/BookmarkNodeView.js.flow +66 -0
- package/ui/CommandButton.js +76 -0
- package/ui/CommandMenu.js +94 -0
- package/ui/CommandMenu.js.flow +75 -0
- package/ui/CommandMenuButton.js +132 -0
- package/ui/CommandMenuButton.js.flow +131 -0
- package/ui/CustomEditorView.js +47 -0
- package/ui/CustomEditorView.js.flow +28 -0
- package/ui/CustomMenu.js +34 -0
- package/ui/CustomMenuItem.js +65 -0
- package/ui/CustomNodeView.js +237 -0
- package/ui/CustomNodeView.js.flow +200 -0
- package/ui/CustomRadioButton.js +78 -0
- package/ui/CustomRadioButton.js.flow +65 -0
- package/ui/DocLayoutEditor.js +147 -0
- package/ui/DocLayoutEditor.js.flow +146 -0
- package/ui/Editor.js +291 -0
- package/ui/Editor.js.flow +288 -0
- package/ui/EditorFrameset.js +96 -0
- package/ui/EditorToolbar.js +214 -0
- package/ui/EditorToolbar.js.flow +218 -0
- package/ui/EditorToolbarConfig.js +141 -0
- package/ui/EditorToolbarConfig.js.flow +164 -0
- package/ui/FontSizeCommandMenuButton.js +67 -0
- package/ui/FontSizeCommandMenuButton.js.flow +66 -0
- package/ui/FontTypeCommandMenuButton.js +65 -0
- package/ui/FontTypeCommandMenuButton.js.flow +61 -0
- package/ui/Frag.js +32 -0
- package/ui/Icon.js +145 -0
- package/ui/Icon.js.flow +89 -0
- package/ui/ImageInlineEditor.js +87 -0
- package/ui/KeyCodes.js +9 -0
- package/ui/LinkTooltip.js +113 -0
- package/ui/LinkTooltip.js.flow +85 -0
- package/ui/LinkURLEditor.js +114 -0
- package/ui/LinkURLEditor.js.flow +117 -0
- package/ui/ListItemNodeView.js +92 -0
- package/ui/ListItemNodeView.js.flow +98 -0
- package/ui/ListTypeButton.js +136 -0
- package/ui/ListTypeButton.js.flow +131 -0
- package/ui/ListTypeCommandButton.js +91 -0
- package/ui/ListTypeCommandButton.js.flow +85 -0
- package/ui/ListTypeMenu.js +85 -0
- package/ui/ListTypeMenu.js.flow +70 -0
- package/ui/LoadingIndicator.js +42 -0
- package/ui/MathEditor.js +92 -0
- package/ui/MathEditor.js.flow +78 -0
- package/ui/MathInlineEditor.js +123 -0
- package/ui/MathInlineEditor.js.flow +102 -0
- package/ui/MathNodeView.js +217 -0
- package/ui/MathNodeView.js.flow +186 -0
- package/ui/PasteMenu.js +74 -0
- package/ui/ResizeObserver.js +89 -0
- package/ui/RichTextEditor.js +125 -0
- package/ui/RichTextEditor.js.flow +133 -0
- package/ui/SelectionObserver.js +121 -0
- package/ui/TableCellMenu.js +64 -0
- package/ui/TableCellMenu.js.flow +51 -0
- package/ui/TableGridSizeEditor.js +212 -0
- package/ui/TableGridSizeEditor.js.flow +184 -0
- package/ui/TableNodeView.js +51 -0
- package/ui/bindScrollHandler.js +33 -0
- package/ui/canUseCSSFont.js +33 -0
- package/ui/czi-link-tooltip.css +71 -0
- package/ui/czi-table.css +87 -0
- package/ui/czi-vars.css +2 -0
- package/ui/findActiveFontSize.js +53 -0
- package/ui/findActiveFontSize.js.flow +58 -0
- package/ui/findActiveFontType.js +32 -0
- package/ui/findActiveFontType.js.flow +38 -0
- package/ui/handleEditorDrop.js +24 -0
- package/ui/handleEditorDrop.js.flow +28 -0
- package/ui/handleEditorKeyDown.js +20 -0
- package/ui/handleEditorKeyDown.js.flow +39 -0
- package/ui/handleEditorPaste.js +22 -0
- package/ui/handleEditorPaste.js.flow +33 -0
- package/ui/htmlElementToRect.js +17 -0
- package/ui/injectStyleSheet.js +37 -0
- package/ui/isElementFullyVisible.js +22 -0
- package/ui/isOffline.js +6 -0
- package/ui/isReactClass.js +10 -0
- package/ui/mathquill-editor/MathQuillEditor.js +187 -0
- package/ui/mathquill-editor/MathQuillEditor.js.flow +159 -0
- package/ui/mathquill-editor/MathQuillEditorSymbols.js +416 -0
- package/ui/mathquill-editor/MathQuillEditorSymbolsPanel.js +69 -0
- package/ui/mathquill-editor/MathQuillEditorSymbolsPanel.js.flow +50 -0
- package/ui/mathquill-editor/mathquill-import-kludge.js +21 -0
- package/ui/mathquill-editor/mathquill-import-kludge.js.flow +24 -0
- package/ui/renderLaTeXAsHTML.js +55 -0
- package/ui/renderLaTeXAsHTML.js.flow +46 -0
- package/ui/resolveImage.js +115 -0
- package/ui/toCSSColor.js +42 -0
- package/ui/toCSSLineSpacing.js +48 -0
- package/ui/toHexColor.js +22 -0
- package/ui/uuid.js +6 -0
- package/uuid.js +6 -0
- package/.babelrc +0 -54
- package/.dockerignore +0 -4
- package/.eslintignore +0 -3
- package/.eslintrc.js +0 -87
- package/.flowconfig +0 -37
- package/.gitattribute +0 -1
- package/.github/workflows/build.yml +0 -29
- package/.github/workflows/lint.yml +0 -30
- package/.prettierignore +0 -6
- package/.prettierrc +0 -5
- package/.stylelintignore +0 -2
- package/.stylelintrc.json +0 -14
- package/.travis.yml +0 -18
- package/CODEOWNERS +0 -40
- package/LICENSE +0 -22
- package/README.md +0 -304
- package/_config.yml +0 -1
- package/babel.config.json +0 -54
- package/build_collab_server.py +0 -7
- package/build_image_server.py +0 -7
- package/dist/BlockquoteInsertNewLineCommand.js +0 -65
- package/dist/BlockquoteInsertNewLineCommand.js.flow +0 -55
- package/dist/BlockquoteNodeSpec.js +0 -37
- package/dist/BlockquoteNodeSpec.js.flow +0 -30
- package/dist/BlockquoteToggleCommand.js +0 -41
- package/dist/BlockquoteToggleCommand.js.flow +0 -34
- package/dist/BookmarkNodeSpec.js +0 -50
- package/dist/BookmarkNodeSpec.js.flow +0 -39
- package/dist/BulletListNodeSpec.js +0 -59
- package/dist/BulletListNodeSpec.js.flow +0 -61
- package/dist/CZIProseMirror.js +0 -91
- package/dist/CZIProseMirror.js.flow +0 -90
- package/dist/CodeBlockCommand.js +0 -51
- package/dist/CodeBlockCommand.js.flow +0 -43
- package/dist/CodeBlockNodeSpec.js +0 -33
- package/dist/CodeMarkSpec.js +0 -18
- package/dist/CodeMarkSpec.js.flow +0 -14
- package/dist/ContentPlaceholderPlugin.js +0 -164
- package/dist/ContentPlaceholderPlugin.js.flow +0 -187
- package/dist/CursorPlaceholderPlugin.js +0 -114
- package/dist/DocLayoutCommand.js +0 -88
- package/dist/DocLayoutCommand.js.flow +0 -94
- package/dist/DocNodeSpec.js +0 -79
- package/dist/DocNodeSpec.js.flow +0 -64
- package/dist/EMMarkSpec.js +0 -22
- package/dist/EMMarkSpec.js.flow +0 -14
- package/dist/EditorCommands.js +0 -175
- package/dist/EditorCommands.js.flow +0 -124
- package/dist/EditorKeyMap.js +0 -112
- package/dist/EditorKeyMap.js.flow +0 -187
- package/dist/EditorMarks.js +0 -80
- package/dist/EditorMarks.js.flow +0 -71
- package/dist/EditorNodes.js +0 -68
- package/dist/EditorNodes.js.flow +0 -59
- package/dist/EditorPageLayoutPlugin.js +0 -72
- package/dist/EditorPageLayoutPlugin.js.flow +0 -67
- package/dist/EditorPlugins.js +0 -13
- package/dist/EditorPlugins.js.flow +0 -8
- package/dist/EditorSchema.js +0 -16
- package/dist/EditorSchema.js.flow +0 -12
- package/dist/EditorState.js +0 -10
- package/dist/FontSizeMarkSpec.js +0 -47
- package/dist/FontSizeMarkSpec.js.flow +0 -49
- package/dist/FontTypeMarkSpec.js +0 -74
- package/dist/FontTypeMarkSpec.js.flow +0 -80
- package/dist/HTMLMutator.js +0 -58
- package/dist/HTMLMutator.js.flow +0 -59
- package/dist/HardBreakNodeSpec.js +0 -20
- package/dist/HeadingNodeSpec.js +0 -64
- package/dist/HistoryRedoCommand.js +0 -24
- package/dist/HistoryRedoCommand.js.flow +0 -20
- package/dist/HistoryUndoCommand.js +0 -24
- package/dist/HistoryUndoCommand.js.flow +0 -20
- package/dist/HorizontalRuleCommand.js +0 -58
- package/dist/HorizontalRuleCommand.js.flow +0 -49
- package/dist/HorizontalRuleNodeSpec.js +0 -38
- package/dist/ImageUploadPlaceholderPlugin.js +0 -176
- package/dist/ImageUploadPlaceholderPlugin.js.flow +0 -192
- package/dist/LinkMarkSpec.js +0 -41
- package/dist/LinkMarkSpec.js.flow +0 -32
- package/dist/LinkSetURLCommand.js +0 -100
- package/dist/LinkSetURLCommand.js.flow +0 -103
- package/dist/LinkTooltipPlugin.js +0 -180
- package/dist/LinkTooltipPlugin.js.flow +0 -192
- package/dist/ListItemInsertNewLineCommand.js +0 -65
- package/dist/ListItemInsertNewLineCommand.js.flow +0 -55
- package/dist/ListItemMergeCommand.js +0 -183
- package/dist/ListItemMergeCommand.js.flow +0 -177
- package/dist/ListItemNodeSpec.js +0 -57
- package/dist/ListItemNodeSpec.js.flow +0 -52
- package/dist/ListSplitCommand.js +0 -36
- package/dist/ListSplitCommand.js.flow +0 -32
- package/dist/ListToggleCommand.js +0 -81
- package/dist/ListToggleCommand.js.flow +0 -77
- package/dist/MarkNames.js +0 -37
- package/dist/MarksClearCommand.js +0 -42
- package/dist/MarksClearCommand.js.flow +0 -42
- package/dist/MathEditCommand.js +0 -108
- package/dist/MathEditCommand.js.flow +0 -110
- package/dist/MathNodeSpec.js +0 -57
- package/dist/MathNodeSpec.js.flow +0 -46
- package/dist/NodeNames.js +0 -47
- package/dist/OrderedListNodeSpec.js +0 -125
- package/dist/OrderedListNodeSpec.js.flow +0 -132
- package/dist/ParagraphNodeSpec.js +0 -151
- package/dist/ParagraphNodeSpec.js.flow +0 -156
- package/dist/ParagraphSpacingCommand.js +0 -106
- package/dist/ParagraphSpacingCommand.js.flow +0 -121
- package/dist/PrintCommand.js +0 -33
- package/dist/PrintCommand.js.flow +0 -31
- package/dist/SelectionPlaceholderPlugin.js +0 -111
- package/dist/SpacerMarkSpec.js +0 -50
- package/dist/SpacerMarkSpec.js.flow +0 -47
- package/dist/StrikeMarkSpec.js +0 -24
- package/dist/StrikeMarkSpec.js.flow +0 -21
- package/dist/StrongMarkSpec.js +0 -29
- package/dist/StrongMarkSpec.js.flow +0 -25
- package/dist/StyleView.js +0 -23
- package/dist/TableBackgroundColorCommand.js +0 -65
- package/dist/TableBorderColorCommand.js +0 -65
- package/dist/TableCellColorCommand.js +0 -62
- package/dist/TableCellColorCommand.js.flow +0 -71
- package/dist/TableCellMenuPlugin.js +0 -129
- package/dist/TableCellMenuPlugin.js.flow +0 -132
- package/dist/TableInsertCommand.js +0 -117
- package/dist/TableInsertCommand.js.flow +0 -112
- package/dist/TableMergeCellsCommand.js +0 -97
- package/dist/TableMergeCellsCommand.js.flow +0 -90
- package/dist/TableNodesSpecs.js +0 -91
- package/dist/TableNodesSpecs.js.flow +0 -78
- package/dist/TablePlugins.js +0 -14
- package/dist/TablePlugins.js.flow +0 -14
- package/dist/TableResizePlugin.js +0 -543
- package/dist/TableResizePlugin.js.flow +0 -632
- package/dist/TextColorMarkSpec.js +0 -39
- package/dist/TextColorMarkSpec.js.flow +0 -35
- package/dist/TextHighlightMarkSpec.js +0 -42
- package/dist/TextHighlightMarkSpec.js.flow +0 -38
- package/dist/TextInsertTabSpaceCommand.js +0 -78
- package/dist/TextInsertTabSpaceCommand.js.flow +0 -83
- package/dist/TextNoWrapMarkSpec.js +0 -18
- package/dist/TextNoWrapMarkSpec.js.flow +0 -14
- package/dist/TextNodeSpec.js +0 -11
- package/dist/TextSelectionMarkSpec.js +0 -25
- package/dist/TextSelectionMarkSpec.js.flow +0 -24
- package/dist/TextSubMarkSpec.js +0 -22
- package/dist/TextSubMarkSpec.js.flow +0 -20
- package/dist/TextSuperMarkSpec.js +0 -22
- package/dist/TextSuperMarkSpec.js.flow +0 -20
- package/dist/TextUnderlineMarkSpec.js +0 -28
- package/dist/TextUnderlineMarkSpec.js.flow +0 -27
- package/dist/Types.js +0 -81
- package/dist/WebFontLoader.js +0 -28
- package/dist/blockQuoteInputRule.js +0 -35
- package/dist/blockQuoteInputRule.js.flow +0 -36
- package/dist/bom.xml +0 -14724
- package/dist/browser.js +0 -11
- package/dist/buildEditorPlugins.js +0 -44
- package/dist/buildEditorPlugins.js.flow +0 -49
- package/dist/buildInputRules.js +0 -72
- package/dist/buildInputRules.js.flow +0 -81
- package/dist/client/CollabConnector.js +0 -80
- package/dist/client/CollabConnector.js.flow +0 -90
- package/dist/client/EditorConnection.js +0 -290
- package/dist/client/EditorConnection.js.flow +0 -323
- package/dist/client/Licit.js +0 -621
- package/dist/client/Licit.js.flow +0 -708
- package/dist/client/Licit.test.js +0 -98
- package/dist/client/Licit.test.js.flow +0 -98
- package/dist/client/Reporter.js +0 -36
- package/dist/client/SimpleConnector.js +0 -59
- package/dist/client/http.js +0 -101
- package/dist/client/throttle.js +0 -26
- package/dist/convertFromDOMElement.js +0 -31
- package/dist/convertFromDOMElement.js.flow +0 -36
- package/dist/convertFromHTML.js +0 -15
- package/dist/convertFromHTML.js.flow +0 -17
- package/dist/convertFromJSON.js +0 -45
- package/dist/convertFromJSON.js.flow +0 -56
- package/dist/convertToCSSPTValue.js +0 -27
- package/dist/convertToJSON.js +0 -10
- package/dist/createCommand.js +0 -33
- package/dist/createCommand.js.flow +0 -40
- package/dist/createEditorKeyMap.js +0 -80
- package/dist/createEditorKeyMap.js.flow +0 -94
- package/dist/createEmptyEditorState.js +0 -24
- package/dist/createEmptyEditorState.js.flow +0 -31
- package/dist/createTableResizingPlugin.js +0 -79
- package/dist/findActionableCell.js +0 -65
- package/dist/findActionableCell.js.flow +0 -74
- package/dist/findActiveMark.js +0 -29
- package/dist/fonts/aclonica/Aclonica.woff2 +0 -0
- package/dist/fonts/acme/Acme.woff2 +0 -0
- package/dist/fonts/alegreya/Alegreya-Regular-C.woff2 +0 -0
- package/dist/fonts/alegreya/Alegreya-Regular-CE.woff2 +0 -0
- package/dist/fonts/alegreya/Alegreya-Regular-G.woff2 +0 -0
- package/dist/fonts/alegreya/Alegreya-Regular-GE.woff2 +0 -0
- package/dist/fonts/alegreya/Alegreya-Regular-L.woff2 +0 -0
- package/dist/fonts/alegreya/Alegreya-Regular-LE.woff2 +0 -0
- package/dist/fonts/alegreya/Alegreya-Regular-V.woff2 +0 -0
- package/dist/fonts/arial-black/ArialBlack-G.woff2 +0 -0
- package/dist/fonts/arial-black/ArialBlack-L.woff2 +0 -0
- package/dist/fonts/arial-black/ArialBlack-LE.woff2 +0 -0
- package/dist/fonts/courier-new/CourierNew-L.woff2 +0 -0
- package/dist/fonts/georgia/Georgia-C.woff2 +0 -0
- package/dist/fonts/georgia/Georgia-CE.woff2 +0 -0
- package/dist/fonts/georgia/Georgia-G.woff2 +0 -0
- package/dist/fonts/georgia/Georgia-GE.woff2 +0 -0
- package/dist/fonts/georgia/Georgia-L.woff2 +0 -0
- package/dist/fonts/georgia/Georgia-LE.woff2 +0 -0
- package/dist/fonts/material-icons/MaterialIcons-Regular.ttf +0 -0
- package/dist/fonts/tahoma/Tahoma-C.woff2 +0 -0
- package/dist/fonts/tahoma/Tahoma-CE.woff2 +0 -0
- package/dist/fonts/tahoma/Tahoma-G.woff2 +0 -0
- package/dist/fonts/tahoma/Tahoma-GE.woff2 +0 -0
- package/dist/fonts/tahoma/Tahoma-L.woff2 +0 -0
- package/dist/fonts/tahoma/Tahoma-LE.woff2 +0 -0
- package/dist/fonts/times/Times-L.woff2 +0 -0
- package/dist/fonts/times/Times-LE.woff2 +0 -0
- package/dist/fonts/times-new-roman/TimesNewRoman-C.woff2 +0 -0
- package/dist/fonts/times-new-roman/TimesNewRoman-CE.woff2 +0 -0
- package/dist/fonts/times-new-roman/TimesNewRoman-G.woff2 +0 -0
- package/dist/fonts/times-new-roman/TimesNewRoman-GE.woff2 +0 -0
- package/dist/fonts/times-new-roman/TimesNewRoman-L.woff2 +0 -0
- package/dist/fonts/times-new-roman/TimesNewRoman-LE.woff2 +0 -0
- package/dist/fonts/times-new-roman/TimesNewRoman-V.woff2 +0 -0
- package/dist/fonts/verdana/Verdana-C.woff2 +0 -0
- package/dist/fonts/verdana/Verdana-CE.woff2 +0 -0
- package/dist/fonts/verdana/Verdana-G.woff2 +0 -0
- package/dist/fonts/verdana/Verdana-GE.woff2 +0 -0
- package/dist/fonts/verdana/Verdana-L.woff2 +0 -0
- package/dist/fonts/verdana/Verdana-LE.woff2 +0 -0
- package/dist/fonts/verdana/Verdana-V.woff2 +0 -0
- package/dist/hyphenize.js +0 -20
- package/dist/index.js +0 -80
- package/dist/insertTable.js +0 -50
- package/dist/insertTable.js.flow +0 -56
- package/dist/isEditorStateEmpty.js +0 -38
- package/dist/isTableNode.js +0 -12
- package/dist/joinDown.js +0 -28
- package/dist/joinListNode.js +0 -38
- package/dist/joinUp.js +0 -33
- package/dist/keymaps.js +0 -106
- package/dist/lookUpElement.js +0 -15
- package/dist/nodeAt.js +0 -15
- package/dist/normalizeHTML.js +0 -70
- package/dist/normalizeHTML.js.flow +0 -78
- package/dist/patchAnchorElements.js +0 -37
- package/dist/patchAnchorElements.js.flow +0 -38
- package/dist/patchBreakElements.js +0 -28
- package/dist/patchElementInlineStyles.js +0 -70
- package/dist/patchElementInlineStyles.js.flow +0 -92
- package/dist/patchListElements.js +0 -248
- package/dist/patchListElements.js.flow +0 -276
- package/dist/patchMathElements.js +0 -69
- package/dist/patchParagraphElements.js +0 -21
- package/dist/patchParagraphElements.js.flow +0 -20
- package/dist/patchStyleElements.js +0 -162
- package/dist/patchStyleElements.js.flow +0 -194
- package/dist/patchTableElements.js +0 -98
- package/dist/patchTableElements.js.flow +0 -89
- package/dist/rebaseDocWithSteps.js +0 -32
- package/dist/sanitizeURL.js +0 -16
- package/dist/splitListItem.js +0 -180
- package/dist/splitListItem.js.flow +0 -191
- package/dist/styles.css +0 -19
- package/dist/styles0.css +0 -29
- package/dist/toClosestFontPtSize.js +0 -25
- package/dist/toClosestFontPtSize.js.flow +0 -22
- package/dist/toSafeHTMLDocument.js +0 -13
- package/dist/toggleBlockquote.js +0 -86
- package/dist/toggleBlockquote.js.flow +0 -91
- package/dist/toggleCodeBlock.js +0 -89
- package/dist/ui/AlertInfo.js +0 -59
- package/dist/ui/BookmarkNodeView.js +0 -77
- package/dist/ui/BookmarkNodeView.js.flow +0 -66
- package/dist/ui/CommandButton.js +0 -65
- package/dist/ui/CommandMenu.js +0 -83
- package/dist/ui/CommandMenu.js.flow +0 -75
- package/dist/ui/CommandMenuButton.js +0 -120
- package/dist/ui/CommandMenuButton.js.flow +0 -131
- package/dist/ui/CustomEditorView.js +0 -34
- package/dist/ui/CustomEditorView.js.flow +0 -28
- package/dist/ui/CustomMenu.js +0 -23
- package/dist/ui/CustomMenuItem.js +0 -43
- package/dist/ui/CustomNodeView.js +0 -193
- package/dist/ui/CustomNodeView.js.flow +0 -200
- package/dist/ui/CustomRadioButton.js +0 -67
- package/dist/ui/CustomRadioButton.js.flow +0 -65
- package/dist/ui/DocLayoutEditor.js +0 -142
- package/dist/ui/DocLayoutEditor.js.flow +0 -146
- package/dist/ui/Editor.js +0 -289
- package/dist/ui/Editor.js.flow +0 -288
- package/dist/ui/EditorFrameset.js +0 -86
- package/dist/ui/EditorToolbar.js +0 -206
- package/dist/ui/EditorToolbar.js.flow +0 -211
- package/dist/ui/EditorToolbarConfig.js +0 -148
- package/dist/ui/EditorToolbarConfig.js.flow +0 -164
- package/dist/ui/FontSizeCommandMenuButton.js +0 -57
- package/dist/ui/FontSizeCommandMenuButton.js.flow +0 -66
- package/dist/ui/FontTypeCommandMenuButton.js +0 -55
- package/dist/ui/FontTypeCommandMenuButton.js.flow +0 -49
- package/dist/ui/Frag.js +0 -19
- package/dist/ui/Icon.js +0 -104
- package/dist/ui/Icon.js.flow +0 -89
- package/dist/ui/ImageInlineEditor.js +0 -76
- package/dist/ui/KeyCodes.js +0 -23
- package/dist/ui/LinkTooltip.js +0 -92
- package/dist/ui/LinkTooltip.js.flow +0 -85
- package/dist/ui/LinkURLEditor.js +0 -107
- package/dist/ui/LinkURLEditor.js.flow +0 -111
- package/dist/ui/ListItemNodeView.js +0 -91
- package/dist/ui/ListItemNodeView.js.flow +0 -98
- package/dist/ui/ListTypeButton.js +0 -123
- package/dist/ui/ListTypeButton.js.flow +0 -131
- package/dist/ui/ListTypeCommandButton.js +0 -81
- package/dist/ui/ListTypeCommandButton.js.flow +0 -85
- package/dist/ui/ListTypeMenu.js +0 -72
- package/dist/ui/ListTypeMenu.js.flow +0 -70
- package/dist/ui/LoadingIndicator.js +0 -28
- package/dist/ui/MathEditor.js +0 -80
- package/dist/ui/MathEditor.js.flow +0 -78
- package/dist/ui/MathInlineEditor.js +0 -111
- package/dist/ui/MathInlineEditor.js.flow +0 -102
- package/dist/ui/MathNodeView.js +0 -190
- package/dist/ui/MathNodeView.js.flow +0 -175
- package/dist/ui/PasteMenu.js +0 -56
- package/dist/ui/ResizeObserver.js +0 -94
- package/dist/ui/RichTextEditor.js +0 -121
- package/dist/ui/RichTextEditor.js.flow +0 -133
- package/dist/ui/SelectionObserver.js +0 -116
- package/dist/ui/TableCellMenu.js +0 -53
- package/dist/ui/TableCellMenu.js.flow +0 -51
- package/dist/ui/TableGridSizeEditor.js +0 -191
- package/dist/ui/TableGridSizeEditor.js.flow +0 -184
- package/dist/ui/TableNodeView.js +0 -31
- package/dist/ui/bindScrollHandler.js +0 -39
- package/dist/ui/canUseCSSFont.js +0 -37
- package/dist/ui/czi-link-tooltip.css +0 -71
- package/dist/ui/czi-table.css +0 -86
- package/dist/ui/czi-vars.css +0 -2
- package/dist/ui/findActiveFontSize.js +0 -61
- package/dist/ui/findActiveFontSize.js.flow +0 -58
- package/dist/ui/findActiveFontType.js +0 -42
- package/dist/ui/findActiveFontType.js.flow +0 -38
- package/dist/ui/handleEditorDrop.js +0 -33
- package/dist/ui/handleEditorDrop.js.flow +0 -28
- package/dist/ui/handleEditorKeyDown.js +0 -29
- package/dist/ui/handleEditorKeyDown.js.flow +0 -39
- package/dist/ui/handleEditorPaste.js +0 -30
- package/dist/ui/handleEditorPaste.js.flow +0 -33
- package/dist/ui/htmlElementToRect.js +0 -25
- package/dist/ui/injectStyleSheet.js +0 -46
- package/dist/ui/isElementFullyVisible.js +0 -29
- package/dist/ui/isOffline.js +0 -12
- package/dist/ui/isReactClass.js +0 -16
- package/dist/ui/mathquill-editor/MathQuillEditor.js +0 -148
- package/dist/ui/mathquill-editor/MathQuillEditor.js.flow +0 -159
- package/dist/ui/mathquill-editor/MathQuillEditorSymbols.js +0 -488
- package/dist/ui/mathquill-editor/MathQuillEditorSymbolsPanel.js +0 -60
- package/dist/ui/mathquill-editor/MathQuillEditorSymbolsPanel.js.flow +0 -48
- package/dist/ui/mathquill-editor/mathquill-import-kludge.js +0 -30
- package/dist/ui/mathquill-editor/mathquill-import-kludge.js.flow +0 -24
- package/dist/ui/renderLaTeXAsHTML.js +0 -45
- package/dist/ui/renderLaTeXAsHTML.js.flow +0 -46
- package/dist/ui/resolveImage.js +0 -125
- package/dist/ui/toCSSColor.js +0 -52
- package/dist/ui/toCSSLineSpacing.js +0 -59
- package/dist/ui/toHexColor.js +0 -29
- package/dist/ui/uuid.js +0 -12
- package/dist/uuid.js +0 -12
- package/flow-typed/@modusoperandilicit-customstyles.js +0 -5
- package/flow-typed/@modusoperandilicit-doc-attrs-step.js +0 -5
- package/flow-typed/@modusoperandilicit-ui-commands.js +0 -5
- package/flow-typed/create-emotion.js +0 -5
- package/flow-typed/docs-editor.js +0 -3
- package/flow-typed/draft-convert.js +0 -3
- package/flow-typed/draft-js.js +0 -3
- package/flow-typed/flatted.js +0 -5
- package/flow-typed/jquery.js +0 -5
- package/flow-typed/katex.js +0 -7
- package/flow-typed/mathquill.js +0 -5
- package/flow-typed/prosemirror-collab.js +0 -5
- package/flow-typed/prosemirror-commands.js +0 -5
- package/flow-typed/prosemirror-dev-tools.js +0 -5
- package/flow-typed/prosemirror-dropcursor.js +0 -5
- package/flow-typed/prosemirror-gapcursor.js +0 -5
- package/flow-typed/prosemirror-history.js +0 -5
- package/flow-typed/prosemirror-inputrules.js +0 -5
- package/flow-typed/prosemirror-keymap.js +0 -5
- package/flow-typed/prosemirror-model.js +0 -5
- package/flow-typed/prosemirror-state.js +0 -5
- package/flow-typed/prosemirror-tables.js +0 -5
- package/flow-typed/prosemirror-transform.js +0 -5
- package/flow-typed/prosemirror-utils.js +0 -5
- package/flow-typed/prosemirror-view.js +0 -5
- package/flow-typed/resize-observer-polyfill.js +0 -5
- package/flow-typed/uuid.js +0 -5
- package/jest.config.js +0 -207
- package/jest.setup.js +0 -5
- package/licit/client/CustomLicitRuntime.js +0 -298
- package/licit/client/CustomStyleRuntime.js +0 -136
- package/licit/client/index.js +0 -367
- package/licit/index.html +0 -11
- package/licit/server/collab/instance.js +0 -236
- package/licit/server/collab/route.js +0 -69
- package/licit/server/collab/server.js +0 -317
- package/licit/server/collab/start.js +0 -13
- package/licit/server/image/start.js +0 -58
- package/lint.sh +0 -4
- package/run_collab_server.py +0 -21
- package/run_image_server.py +0 -20
- package/run_web_server.py +0 -25
- package/scripts/build_bin.js +0 -10
- package/scripts/build_bin.py +0 -103
- package/scripts/ci_check_dist.sh +0 -14
- package/scripts/env.js +0 -6
- package/scripts/webserver.js +0 -35
- package/sonar-project.properties +0 -12
- package/src/BlockquoteInsertNewLineCommand.js +0 -55
- package/src/BlockquoteNodeSpec.js +0 -30
- package/src/BlockquoteToggleCommand.js +0 -34
- package/src/BookmarkNodeSpec.js +0 -39
- package/src/BulletListNodeSpec.js +0 -61
- package/src/CZIProseMirror.js +0 -90
- package/src/CodeBlockCommand.js +0 -43
- package/src/CodeBlockNodeSpec.js +0 -24
- package/src/CodeMarkSpec.js +0 -14
- package/src/ContentPlaceholderPlugin.js +0 -187
- package/src/CursorPlaceholderPlugin.js +0 -115
- package/src/DocLayoutCommand.js +0 -94
- package/src/DocNodeSpec.js +0 -64
- package/src/EMMarkSpec.js +0 -14
- package/src/EditorCommands.js +0 -124
- package/src/EditorKeyMap.js +0 -187
- package/src/EditorMarks.js +0 -71
- package/src/EditorNodes.js +0 -59
- package/src/EditorPageLayoutPlugin.js +0 -67
- package/src/EditorPlugins.js +0 -8
- package/src/EditorSchema.js +0 -12
- package/src/EditorState.js +0 -7
- package/src/FontSizeMarkSpec.js +0 -49
- package/src/FontTypeMarkSpec.js +0 -80
- package/src/HTMLMutator.js +0 -59
- package/src/HardBreakNodeSpec.js +0 -15
- package/src/HeadingNodeSpec.js +0 -52
- package/src/HistoryRedoCommand.js +0 -20
- package/src/HistoryUndoCommand.js +0 -20
- package/src/HorizontalRuleCommand.js +0 -49
- package/src/HorizontalRuleNodeSpec.js +0 -39
- package/src/ImageUploadPlaceholderPlugin.js +0 -192
- package/src/LinkMarkSpec.js +0 -32
- package/src/LinkSetURLCommand.js +0 -103
- package/src/LinkTooltipPlugin.js +0 -192
- package/src/ListItemInsertNewLineCommand.js +0 -55
- package/src/ListItemMergeCommand.js +0 -177
- package/src/ListItemNodeSpec.js +0 -52
- package/src/ListSplitCommand.js +0 -32
- package/src/ListToggleCommand.js +0 -77
- package/src/MarkNames.js +0 -18
- package/src/MarksClearCommand.js +0 -42
- package/src/MathEditCommand.js +0 -110
- package/src/MathNodeSpec.js +0 -46
- package/src/NodeNames.js +0 -23
- package/src/OrderedListNodeSpec.js +0 -132
- package/src/ParagraphNodeSpec.js +0 -156
- package/src/ParagraphSpacingCommand.js +0 -121
- package/src/PrintCommand.js +0 -31
- package/src/SelectionPlaceholderPlugin.js +0 -131
- package/src/SpacerMarkSpec.js +0 -47
- package/src/StrikeMarkSpec.js +0 -21
- package/src/StrongMarkSpec.js +0 -25
- package/src/StyleView.js +0 -19
- package/src/TableBackgroundColorCommand.js +0 -75
- package/src/TableBorderColorCommand.js +0 -75
- package/src/TableCellColorCommand.js +0 -71
- package/src/TableCellMenuPlugin.js +0 -132
- package/src/TableInsertCommand.js +0 -112
- package/src/TableMergeCellsCommand.js +0 -90
- package/src/TableNodesSpecs.js +0 -78
- package/src/TablePlugins.js +0 -14
- package/src/TableResizePlugin.js +0 -632
- package/src/TextColorMarkSpec.js +0 -35
- package/src/TextHighlightMarkSpec.js +0 -38
- package/src/TextInsertTabSpaceCommand.js +0 -83
- package/src/TextNoWrapMarkSpec.js +0 -14
- package/src/TextNodeSpec.js +0 -7
- package/src/TextSelectionMarkSpec.js +0 -24
- package/src/TextSubMarkSpec.js +0 -20
- package/src/TextSuperMarkSpec.js +0 -20
- package/src/TextUnderlineMarkSpec.js +0 -27
- package/src/Types.js +0 -75
- package/src/WebFontLoader.js +0 -22
- package/src/blockQuoteInputRule.js +0 -36
- package/src/browser.js +0 -7
- package/src/buildEditorPlugins.js +0 -49
- package/src/buildInputRules.js +0 -81
- package/src/client/CollabConnector.js +0 -90
- package/src/client/EditorConnection.js +0 -323
- package/src/client/Licit.js +0 -708
- package/src/client/Licit.test.js +0 -98
- package/src/client/Reporter.js +0 -37
- package/src/client/SimpleConnector.js +0 -61
- package/src/client/http.js +0 -70
- package/src/client/licit.css +0 -12
- package/src/client/throttle.js +0 -27
- package/src/convertFromDOMElement.js +0 -36
- package/src/convertFromHTML.js +0 -17
- package/src/convertFromJSON.js +0 -56
- package/src/convertToCSSPTValue.js +0 -22
- package/src/convertToJSON.js +0 -7
- package/src/createCommand.js +0 -40
- package/src/createEditorKeyMap.js +0 -94
- package/src/createEmptyEditorState.js +0 -31
- package/src/createTableResizingPlugin.js +0 -86
- package/src/findActionableCell.js +0 -74
- package/src/findActiveMark.js +0 -32
- package/src/hyphenize.js +0 -17
- package/src/index.js +0 -10
- package/src/insertTable.js +0 -56
- package/src/isEditorStateEmpty.js +0 -32
- package/src/isTableNode.js +0 -15
- package/src/joinDown.js +0 -27
- package/src/joinListNode.js +0 -55
- package/src/joinUp.js +0 -39
- package/src/keymaps.js +0 -185
- package/src/lookUpElement.js +0 -14
- package/src/nodeAt.js +0 -12
- package/src/normalizeHTML.js +0 -78
- package/src/patchAnchorElements.js +0 -38
- package/src/patchBreakElements.js +0 -22
- package/src/patchElementInlineStyles.js +0 -92
- package/src/patchListElements.js +0 -276
- package/src/patchMathElements.js +0 -60
- package/src/patchParagraphElements.js +0 -20
- package/src/patchStyleElements.js +0 -194
- package/src/patchTableElements.js +0 -89
- package/src/rebaseDocWithSteps.js +0 -42
- package/src/sanitizeURL.js +0 -13
- package/src/splitListItem.js +0 -191
- package/src/styles.css +0 -19
- package/src/styles0.css +0 -29
- package/src/toClosestFontPtSize.js +0 -22
- package/src/toSafeHTMLDocument.js +0 -9
- package/src/toggleBlockquote.js +0 -91
- package/src/toggleCodeBlock.js +0 -102
- package/src/ui/AlertInfo.js +0 -64
- package/src/ui/BookmarkNodeView.js +0 -66
- package/src/ui/CommandButton.js +0 -68
- package/src/ui/CommandMenu.js +0 -75
- package/src/ui/CommandMenuButton.js +0 -131
- package/src/ui/CustomEditorView.js +0 -28
- package/src/ui/CustomMenu.js +0 -17
- package/src/ui/CustomMenuItem.js +0 -36
- package/src/ui/CustomNodeView.js +0 -200
- package/src/ui/CustomRadioButton.js +0 -65
- package/src/ui/DocLayoutEditor.js +0 -146
- package/src/ui/Editor.js +0 -288
- package/src/ui/EditorFrameset.js +0 -81
- package/src/ui/EditorToolbar.js +0 -211
- package/src/ui/EditorToolbarConfig.js +0 -164
- package/src/ui/FontSizeCommandMenuButton.js +0 -66
- package/src/ui/FontTypeCommandMenuButton.js +0 -49
- package/src/ui/Frag.js +0 -13
- package/src/ui/Icon.js +0 -89
- package/src/ui/ImageInlineEditor.js +0 -67
- package/src/ui/KeyCodes.js +0 -12
- package/src/ui/LinkTooltip.js +0 -85
- package/src/ui/LinkURLEditor.js +0 -111
- package/src/ui/ListItemNodeView.js +0 -98
- package/src/ui/ListTypeButton.js +0 -131
- package/src/ui/ListTypeCommandButton.js +0 -85
- package/src/ui/ListTypeMenu.js +0 -70
- package/src/ui/LoadingIndicator.js +0 -20
- package/src/ui/MathEditor.js +0 -78
- package/src/ui/MathInlineEditor.js +0 -102
- package/src/ui/MathNodeView.js +0 -175
- package/src/ui/PasteMenu.js +0 -57
- package/src/ui/ResizeObserver.js +0 -106
- package/src/ui/RichTextEditor.js +0 -133
- package/src/ui/SelectionObserver.js +0 -134
- package/src/ui/TableCellMenu.js +0 -51
- package/src/ui/TableGridSizeEditor.js +0 -184
- package/src/ui/TableNodeView.js +0 -25
- package/src/ui/bindScrollHandler.js +0 -46
- package/src/ui/canUseCSSFont.js +0 -43
- package/src/ui/czi-body-layout-editor.css +0 -16
- package/src/ui/czi-bookmark-view.css +0 -10
- package/src/ui/czi-cursor-placeholder.css +0 -36
- package/src/ui/czi-custom-menu-button.css +0 -18
- package/src/ui/czi-custom-menu-item.css +0 -30
- package/src/ui/czi-custom-menu.css +0 -8
- package/src/ui/czi-custom-radio-button.css +0 -80
- package/src/ui/czi-custom-scrollbar.css +0 -21
- package/src/ui/czi-editor-frameset.css +0 -81
- package/src/ui/czi-editor-toolbar.css +0 -122
- package/src/ui/czi-editor.css +0 -220
- package/src/ui/czi-form.css +0 -107
- package/src/ui/czi-frag.css +0 -3
- package/src/ui/czi-heading.css +0 -40
- package/src/ui/czi-icon.css +0 -72
- package/src/ui/czi-image-resize-box.css +0 -165
- package/src/ui/czi-image-upload-editor.css +0 -57
- package/src/ui/czi-image-upload-placeholder.css +0 -50
- package/src/ui/czi-image-url-editor.css +0 -38
- package/src/ui/czi-image-view.css +0 -125
- package/src/ui/czi-indent.css +0 -137
- package/src/ui/czi-inline-editor.css +0 -20
- package/src/ui/czi-link-tooltip.css +0 -71
- package/src/ui/czi-list.css +0 -410
- package/src/ui/czi-loading-indicator.css +0 -111
- package/src/ui/czi-math-view.css +0 -62
- package/src/ui/czi-selection-placeholder.css +0 -24
- package/src/ui/czi-table-cell-menu.css +0 -14
- package/src/ui/czi-table-grid-size-editor.css +0 -37
- package/src/ui/czi-table.css +0 -86
- package/src/ui/czi-vars.css +0 -2
- package/src/ui/findActiveFontSize.js +0 -58
- package/src/ui/findActiveFontType.js +0 -38
- package/src/ui/fonts.css +0 -471
- package/src/ui/handleEditorDrop.js +0 -28
- package/src/ui/handleEditorKeyDown.js +0 -39
- package/src/ui/handleEditorPaste.js +0 -33
- package/src/ui/htmlElementToRect.js +0 -18
- package/src/ui/icon-font.css +0 -10
- package/src/ui/injectStyleSheet.js +0 -42
- package/src/ui/isElementFullyVisible.js +0 -26
- package/src/ui/isOffline.js +0 -8
- package/src/ui/isReactClass.js +0 -12
- package/src/ui/listType.css +0 -21
- package/src/ui/mathquill-editor/MathQuillEditor.js +0 -159
- package/src/ui/mathquill-editor/MathQuillEditorSymbols.js +0 -483
- package/src/ui/mathquill-editor/MathQuillEditorSymbolsPanel.js +0 -48
- package/src/ui/mathquill-editor/czi-mathquill-editor-symbols-panel.css +0 -39
- package/src/ui/mathquill-editor/czi-mathquill-editor.css +0 -50
- package/src/ui/mathquill-editor/mathquill-import-kludge.js +0 -24
- package/src/ui/renderLaTeXAsHTML.js +0 -46
- package/src/ui/resolveImage.js +0 -123
- package/src/ui/toCSSColor.js +0 -51
- package/src/ui/toCSSLineSpacing.js +0 -55
- package/src/ui/toHexColor.js +0 -26
- package/src/ui/uuid.js +0 -9
- package/src/uuid.js +0 -9
- package/style-service.Dockerfile +0 -26
- package/utils/build_bin.js +0 -9
- package/utils/build_image_server.js +0 -72
- package/utils/build_licit_collab_server.js +0 -76
- package/utils/build_web_server.js +0 -37
- package/utils/env.js +0 -6
- package/webpack.config.js +0 -128
- /package/{dist/CodeBlockNodeSpec.js.flow → CodeBlockNodeSpec.js.flow} +0 -0
- /package/{dist/CursorPlaceholderPlugin.js.flow → CursorPlaceholderPlugin.js.flow} +0 -0
- /package/{dist/EditorState.js.flow → EditorState.js.flow} +0 -0
- /package/{dist/HardBreakNodeSpec.js.flow → HardBreakNodeSpec.js.flow} +0 -0
- /package/{dist/HeadingNodeSpec.js.flow → HeadingNodeSpec.js.flow} +0 -0
- /package/{dist/HorizontalRuleNodeSpec.js.flow → HorizontalRuleNodeSpec.js.flow} +0 -0
- /package/{dist/MarkNames.js.flow → MarkNames.js.flow} +0 -0
- /package/{dist/NodeNames.js.flow → NodeNames.js.flow} +0 -0
- /package/{dist/SelectionPlaceholderPlugin.js.flow → SelectionPlaceholderPlugin.js.flow} +0 -0
- /package/{dist/StyleView.js.flow → StyleView.js.flow} +0 -0
- /package/{dist/TableBackgroundColorCommand.js.flow → TableBackgroundColorCommand.js.flow} +0 -0
- /package/{dist/TableBorderColorCommand.js.flow → TableBorderColorCommand.js.flow} +0 -0
- /package/{dist/TextNodeSpec.js.flow → TextNodeSpec.js.flow} +0 -0
- /package/{dist/Types.js.flow → Types.js.flow} +0 -0
- /package/{dist/WebFontLoader.js.flow → WebFontLoader.js.flow} +0 -0
- /package/{dist/browser.js.flow → browser.js.flow} +0 -0
- /package/{dist/client → client}/Reporter.js.flow +0 -0
- /package/{dist/client → client}/SimpleConnector.js.flow +0 -0
- /package/{dist/client → client}/http.js.flow +0 -0
- /package/{dist/client → client}/licit.css +0 -0
- /package/{dist/client → client}/throttle.js.flow +0 -0
- /package/{dist/convertToCSSPTValue.js.flow → convertToCSSPTValue.js.flow} +0 -0
- /package/{dist/convertToJSON.js.flow → convertToJSON.js.flow} +0 -0
- /package/{dist/createTableResizingPlugin.js.flow → createTableResizingPlugin.js.flow} +0 -0
- /package/{dist/findActiveMark.js.flow → findActiveMark.js.flow} +0 -0
- /package/{dist/hyphenize.js.flow → hyphenize.js.flow} +0 -0
- /package/{dist/index.js.flow → index.js.flow} +0 -0
- /package/{dist/isEditorStateEmpty.js.flow → isEditorStateEmpty.js.flow} +0 -0
- /package/{dist/isTableNode.js.flow → isTableNode.js.flow} +0 -0
- /package/{dist/joinDown.js.flow → joinDown.js.flow} +0 -0
- /package/{dist/joinListNode.js.flow → joinListNode.js.flow} +0 -0
- /package/{dist/joinUp.js.flow → joinUp.js.flow} +0 -0
- /package/{dist/keymaps.js.flow → keymaps.js.flow} +0 -0
- /package/{dist/lookUpElement.js.flow → lookUpElement.js.flow} +0 -0
- /package/{dist/nodeAt.js.flow → nodeAt.js.flow} +0 -0
- /package/{dist/patchBreakElements.js.flow → patchBreakElements.js.flow} +0 -0
- /package/{dist/patchMathElements.js.flow → patchMathElements.js.flow} +0 -0
- /package/{dist/rebaseDocWithSteps.js.flow → rebaseDocWithSteps.js.flow} +0 -0
- /package/{dist/sanitizeURL.js.flow → sanitizeURL.js.flow} +0 -0
- /package/{dist/toSafeHTMLDocument.js.flow → toSafeHTMLDocument.js.flow} +0 -0
- /package/{dist/toggleCodeBlock.js.flow → toggleCodeBlock.js.flow} +0 -0
- /package/{dist/ui → ui}/AlertInfo.js.flow +0 -0
- /package/{dist/ui → ui}/CommandButton.js.flow +0 -0
- /package/{dist/ui → ui}/CustomMenu.js.flow +0 -0
- /package/{dist/ui → ui}/CustomMenuItem.js.flow +0 -0
- /package/{dist/ui → ui}/EditorFrameset.js.flow +0 -0
- /package/{dist/ui → ui}/Frag.js.flow +0 -0
- /package/{dist/ui → ui}/ImageInlineEditor.js.flow +0 -0
- /package/{dist/ui → ui}/KeyCodes.js.flow +0 -0
- /package/{dist/ui → ui}/LoadingIndicator.js.flow +0 -0
- /package/{dist/ui → ui}/PasteMenu.js.flow +0 -0
- /package/{dist/ui → ui}/ResizeObserver.js.flow +0 -0
- /package/{dist/ui → ui}/SelectionObserver.js.flow +0 -0
- /package/{dist/ui → ui}/TableNodeView.js.flow +0 -0
- /package/{dist/ui → ui}/bindScrollHandler.js.flow +0 -0
- /package/{dist/ui → ui}/canUseCSSFont.js.flow +0 -0
- /package/{dist/ui → ui}/czi-body-layout-editor.css +0 -0
- /package/{dist/ui → ui}/czi-bookmark-view.css +0 -0
- /package/{dist/ui → ui}/czi-cursor-placeholder.css +0 -0
- /package/{dist/ui → ui}/czi-custom-menu-button.css +0 -0
- /package/{dist/ui → ui}/czi-custom-menu-item.css +0 -0
- /package/{dist/ui → ui}/czi-custom-menu.css +0 -0
- /package/{dist/ui → ui}/czi-custom-radio-button.css +0 -0
- /package/{dist/ui → ui}/czi-custom-scrollbar.css +0 -0
- /package/{dist/ui → ui}/czi-editor-frameset.css +0 -0
- /package/{dist/ui → ui}/czi-editor-toolbar.css +0 -0
- /package/{dist/ui → ui}/czi-editor.css +0 -0
- /package/{dist/ui → ui}/czi-form.css +0 -0
- /package/{dist/ui → ui}/czi-frag.css +0 -0
- /package/{dist/ui → ui}/czi-heading.css +0 -0
- /package/{dist/ui → ui}/czi-icon.css +0 -0
- /package/{dist/ui → ui}/czi-image-resize-box.css +0 -0
- /package/{dist/ui → ui}/czi-image-upload-editor.css +0 -0
- /package/{dist/ui → ui}/czi-image-upload-placeholder.css +0 -0
- /package/{dist/ui → ui}/czi-image-url-editor.css +0 -0
- /package/{dist/ui → ui}/czi-image-view.css +0 -0
- /package/{dist/ui → ui}/czi-indent.css +0 -0
- /package/{dist/ui → ui}/czi-inline-editor.css +0 -0
- /package/{dist/ui → ui}/czi-list.css +0 -0
- /package/{dist/ui → ui}/czi-loading-indicator.css +0 -0
- /package/{dist/ui → ui}/czi-math-view.css +0 -0
- /package/{dist/ui → ui}/czi-selection-placeholder.css +0 -0
- /package/{dist/ui → ui}/czi-table-cell-menu.css +0 -0
- /package/{dist/ui → ui}/czi-table-grid-size-editor.css +0 -0
- /package/{dist/ui → ui}/fonts.css +0 -0
- /package/{dist/ui → ui}/htmlElementToRect.js.flow +0 -0
- /package/{dist/ui → ui}/icon-font.css +0 -0
- /package/{dist/ui → ui}/injectStyleSheet.js.flow +0 -0
- /package/{dist/ui → ui}/isElementFullyVisible.js.flow +0 -0
- /package/{dist/ui → ui}/isOffline.js.flow +0 -0
- /package/{dist/ui → ui}/isReactClass.js.flow +0 -0
- /package/{dist/ui → ui}/listType.css +0 -0
- /package/{dist/ui → ui}/mathquill-editor/MathQuillEditorSymbols.js.flow +0 -0
- /package/{dist/ui → ui}/mathquill-editor/czi-mathquill-editor-symbols-panel.css +0 -0
- /package/{dist/ui → ui}/mathquill-editor/czi-mathquill-editor.css +0 -0
- /package/{dist/ui → ui}/resolveImage.js.flow +0 -0
- /package/{dist/ui → ui}/toCSSColor.js.flow +0 -0
- /package/{dist/ui → ui}/toCSSLineSpacing.js.flow +0 -0
- /package/{dist/ui → ui}/toHexColor.js.flow +0 -0
- /package/{dist/ui → ui}/uuid.js.flow +0 -0
- /package/{dist/uuid.js.flow → uuid.js.flow} +0 -0
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var _prosemirrorTransform = require("prosemirror-transform");
|
|
8
|
-
var _prosemirrorView = require("prosemirror-view");
|
|
9
|
-
var React = _interopRequireWildcard(require("react"));
|
|
10
|
-
var _createEmptyEditorState = _interopRequireDefault(require("../createEmptyEditorState"));
|
|
11
|
-
var _Editor = _interopRequireWildcard(require("./Editor"));
|
|
12
|
-
var _EditorFrameset = _interopRequireWildcard(require("./EditorFrameset"));
|
|
13
|
-
var _EditorToolbar = _interopRequireDefault(require("./EditorToolbar"));
|
|
14
|
-
var _Frag = _interopRequireDefault(require("./Frag"));
|
|
15
|
-
var _uuid = _interopRequireDefault(require("./uuid"));
|
|
16
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
18
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
19
|
-
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
20
|
-
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
21
|
-
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
22
|
-
const EMPTY_EDITOR_RUNTIME = {};
|
|
23
|
-
class RichTextEditor extends React.PureComponent {
|
|
24
|
-
constructor(props, context) {
|
|
25
|
-
super(props, context);
|
|
26
|
-
_defineProperty(this, "props", void 0);
|
|
27
|
-
_defineProperty(this, "state", void 0);
|
|
28
|
-
_defineProperty(this, "_id", void 0);
|
|
29
|
-
_defineProperty(this, "_dispatchTransaction", tr => {
|
|
30
|
-
const {
|
|
31
|
-
onChange,
|
|
32
|
-
editorState
|
|
33
|
-
} = this.props;
|
|
34
|
-
// [FS] IRAD-1171 2021-02-04
|
|
35
|
-
// To bring selection on editor in read-only mode.
|
|
36
|
-
// Removed force return when readOnly flag is true
|
|
37
|
-
if (onChange) {
|
|
38
|
-
// [FS-AFQ][20-FEB-2020]
|
|
39
|
-
// Collaboration
|
|
40
|
-
onChange({
|
|
41
|
-
state: editorState || _Editor.default.EDITOR_EMPTY_STATE,
|
|
42
|
-
transaction: tr
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
});
|
|
46
|
-
_defineProperty(this, "_onReady", editorView => {
|
|
47
|
-
if (editorView !== this.state.editorView) {
|
|
48
|
-
this.setState({
|
|
49
|
-
editorView
|
|
50
|
-
});
|
|
51
|
-
const {
|
|
52
|
-
onReady
|
|
53
|
-
} = this.props;
|
|
54
|
-
onReady && onReady(editorView);
|
|
55
|
-
}
|
|
56
|
-
});
|
|
57
|
-
this._id = (0, _uuid.default)();
|
|
58
|
-
this.state = {
|
|
59
|
-
contentHeight: NaN,
|
|
60
|
-
contentOverflowHidden: false,
|
|
61
|
-
editorView: null
|
|
62
|
-
};
|
|
63
|
-
}
|
|
64
|
-
render() {
|
|
65
|
-
const {
|
|
66
|
-
autoFocus,
|
|
67
|
-
children,
|
|
68
|
-
className,
|
|
69
|
-
disabled,
|
|
70
|
-
embedded,
|
|
71
|
-
header,
|
|
72
|
-
height,
|
|
73
|
-
onChange,
|
|
74
|
-
nodeViews,
|
|
75
|
-
placeholder,
|
|
76
|
-
readOnly,
|
|
77
|
-
width
|
|
78
|
-
} = this.props;
|
|
79
|
-
let {
|
|
80
|
-
editorState,
|
|
81
|
-
runtime
|
|
82
|
-
} = this.props;
|
|
83
|
-
editorState = editorState || (0, _createEmptyEditorState.default)();
|
|
84
|
-
runtime = runtime || EMPTY_EDITOR_RUNTIME;
|
|
85
|
-
const {
|
|
86
|
-
editorView
|
|
87
|
-
} = this.state;
|
|
88
|
-
const toolbar = !!readOnly === true ? null : /*#__PURE__*/React.createElement(_EditorToolbar.default, {
|
|
89
|
-
disabled: disabled,
|
|
90
|
-
dispatchTransaction: this._dispatchTransaction,
|
|
91
|
-
editorState: editorState || _Editor.default.EDITOR_EMPTY_STATE,
|
|
92
|
-
editorView: editorView,
|
|
93
|
-
readOnly: readOnly
|
|
94
|
-
});
|
|
95
|
-
const body = /*#__PURE__*/React.createElement(_Frag.default, null, /*#__PURE__*/React.createElement(_Editor.default, {
|
|
96
|
-
autoFocus: autoFocus,
|
|
97
|
-
disabled: disabled,
|
|
98
|
-
dispatchTransaction: this._dispatchTransaction,
|
|
99
|
-
editorState: editorState,
|
|
100
|
-
embedded: embedded,
|
|
101
|
-
id: this._id,
|
|
102
|
-
nodeViews: nodeViews,
|
|
103
|
-
onChange: onChange,
|
|
104
|
-
onReady: this._onReady,
|
|
105
|
-
placeholder: placeholder,
|
|
106
|
-
readOnly: readOnly,
|
|
107
|
-
runtime: runtime
|
|
108
|
-
}), children);
|
|
109
|
-
return /*#__PURE__*/React.createElement(_EditorFrameset.default, {
|
|
110
|
-
body: body,
|
|
111
|
-
className: className,
|
|
112
|
-
embedded: embedded,
|
|
113
|
-
header: header,
|
|
114
|
-
height: height,
|
|
115
|
-
toolbar: toolbar,
|
|
116
|
-
width: width
|
|
117
|
-
});
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
var _default = RichTextEditor;
|
|
121
|
-
exports.default = _default;
|
|
@@ -1,133 +0,0 @@
|
|
|
1
|
-
// @flow
|
|
2
|
-
|
|
3
|
-
import { Transform } from 'prosemirror-transform';
|
|
4
|
-
import { EditorView } from 'prosemirror-view';
|
|
5
|
-
import * as React from 'react';
|
|
6
|
-
|
|
7
|
-
import createEmptyEditorState from '../createEmptyEditorState';
|
|
8
|
-
import Editor from './Editor';
|
|
9
|
-
import EditorFrameset from './EditorFrameset';
|
|
10
|
-
import EditorToolbar from './EditorToolbar';
|
|
11
|
-
import Frag from './Frag';
|
|
12
|
-
import uuid from './uuid';
|
|
13
|
-
|
|
14
|
-
import type { EditorFramesetProps } from './EditorFrameset';
|
|
15
|
-
import type { EditorProps } from './Editor';
|
|
16
|
-
|
|
17
|
-
type Props = EditorFramesetProps & EditorProps & { children?: ?any };
|
|
18
|
-
|
|
19
|
-
type State = {
|
|
20
|
-
editorView: ?EditorView,
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
const EMPTY_EDITOR_RUNTIME = {};
|
|
24
|
-
|
|
25
|
-
class RichTextEditor extends React.PureComponent<any, any> {
|
|
26
|
-
props: Props;
|
|
27
|
-
|
|
28
|
-
state: State;
|
|
29
|
-
|
|
30
|
-
_id: string;
|
|
31
|
-
|
|
32
|
-
constructor(props: any, context: any) {
|
|
33
|
-
super(props, context);
|
|
34
|
-
this._id = uuid();
|
|
35
|
-
this.state = {
|
|
36
|
-
contentHeight: NaN,
|
|
37
|
-
contentOverflowHidden: false,
|
|
38
|
-
editorView: null,
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
render(): React.Element<any> {
|
|
43
|
-
const {
|
|
44
|
-
autoFocus,
|
|
45
|
-
children,
|
|
46
|
-
className,
|
|
47
|
-
disabled,
|
|
48
|
-
embedded,
|
|
49
|
-
header,
|
|
50
|
-
height,
|
|
51
|
-
onChange,
|
|
52
|
-
nodeViews,
|
|
53
|
-
placeholder,
|
|
54
|
-
readOnly,
|
|
55
|
-
width,
|
|
56
|
-
} = this.props;
|
|
57
|
-
|
|
58
|
-
let { editorState, runtime } = this.props;
|
|
59
|
-
|
|
60
|
-
editorState = editorState || createEmptyEditorState();
|
|
61
|
-
runtime = runtime || EMPTY_EDITOR_RUNTIME;
|
|
62
|
-
|
|
63
|
-
const { editorView } = this.state;
|
|
64
|
-
|
|
65
|
-
const toolbar =
|
|
66
|
-
!!readOnly === true ? null : (
|
|
67
|
-
<EditorToolbar
|
|
68
|
-
disabled={disabled}
|
|
69
|
-
dispatchTransaction={this._dispatchTransaction}
|
|
70
|
-
editorState={editorState || Editor.EDITOR_EMPTY_STATE}
|
|
71
|
-
editorView={editorView}
|
|
72
|
-
readOnly={readOnly}
|
|
73
|
-
/>
|
|
74
|
-
);
|
|
75
|
-
|
|
76
|
-
const body = (
|
|
77
|
-
<Frag>
|
|
78
|
-
<Editor
|
|
79
|
-
autoFocus={autoFocus}
|
|
80
|
-
disabled={disabled}
|
|
81
|
-
dispatchTransaction={this._dispatchTransaction}
|
|
82
|
-
editorState={editorState}
|
|
83
|
-
embedded={embedded}
|
|
84
|
-
id={this._id}
|
|
85
|
-
nodeViews={nodeViews}
|
|
86
|
-
onChange={onChange}
|
|
87
|
-
onReady={this._onReady}
|
|
88
|
-
placeholder={placeholder}
|
|
89
|
-
readOnly={readOnly}
|
|
90
|
-
runtime={runtime}
|
|
91
|
-
/>
|
|
92
|
-
{children}
|
|
93
|
-
</Frag>
|
|
94
|
-
);
|
|
95
|
-
|
|
96
|
-
return (
|
|
97
|
-
<EditorFrameset
|
|
98
|
-
body={body}
|
|
99
|
-
className={className}
|
|
100
|
-
embedded={embedded}
|
|
101
|
-
header={header}
|
|
102
|
-
height={height}
|
|
103
|
-
toolbar={toolbar}
|
|
104
|
-
width={width}
|
|
105
|
-
/>
|
|
106
|
-
);
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
_dispatchTransaction = (tr: Transform): void => {
|
|
110
|
-
const { onChange, editorState } = this.props;
|
|
111
|
-
// [FS] IRAD-1171 2021-02-04
|
|
112
|
-
// To bring selection on editor in read-only mode.
|
|
113
|
-
// Removed force return when readOnly flag is true
|
|
114
|
-
if (onChange) {
|
|
115
|
-
// [FS-AFQ][20-FEB-2020]
|
|
116
|
-
// Collaboration
|
|
117
|
-
onChange({
|
|
118
|
-
state: editorState || Editor.EDITOR_EMPTY_STATE,
|
|
119
|
-
transaction: tr,
|
|
120
|
-
});
|
|
121
|
-
}
|
|
122
|
-
};
|
|
123
|
-
|
|
124
|
-
_onReady = (editorView: EditorView): void => {
|
|
125
|
-
if (editorView !== this.state.editorView) {
|
|
126
|
-
this.setState({ editorView });
|
|
127
|
-
const { onReady } = this.props;
|
|
128
|
-
onReady && onReady(editorView);
|
|
129
|
-
}
|
|
130
|
-
};
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
export default RichTextEditor;
|
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
8
|
-
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
9
|
-
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
10
|
-
const EMPTY_SELECTION_VALUE = Object.freeze({
|
|
11
|
-
from: 0,
|
|
12
|
-
to: 0
|
|
13
|
-
});
|
|
14
|
-
function resolveSelectionValue(el) {
|
|
15
|
-
if (!window.getSelection) {
|
|
16
|
-
console.warn('window.getSelection() is not supported');
|
|
17
|
-
return EMPTY_SELECTION_VALUE;
|
|
18
|
-
}
|
|
19
|
-
const selection = window.getSelection();
|
|
20
|
-
if (!selection.containsNode) {
|
|
21
|
-
console.warn('selection.containsNode() is not supported');
|
|
22
|
-
return EMPTY_SELECTION_VALUE;
|
|
23
|
-
}
|
|
24
|
-
if (!selection.rangeCount) {
|
|
25
|
-
return EMPTY_SELECTION_VALUE;
|
|
26
|
-
}
|
|
27
|
-
const range = selection.getRangeAt(0);
|
|
28
|
-
if (!range) {
|
|
29
|
-
return EMPTY_SELECTION_VALUE;
|
|
30
|
-
}
|
|
31
|
-
const {
|
|
32
|
-
startContainer,
|
|
33
|
-
endContainer,
|
|
34
|
-
startOffset,
|
|
35
|
-
endOffset
|
|
36
|
-
} = range;
|
|
37
|
-
if (startContainer === el || endContainer === el || startContainer && el.contains(startContainer) || endContainer && el.contains(endContainer)) {
|
|
38
|
-
return {
|
|
39
|
-
from: startOffset,
|
|
40
|
-
to: endOffset
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
return EMPTY_SELECTION_VALUE;
|
|
44
|
-
}
|
|
45
|
-
class SelectionObserver {
|
|
46
|
-
constructor(_callback) {
|
|
47
|
-
_defineProperty(this, "_observables", []);
|
|
48
|
-
_defineProperty(this, "_callback", null);
|
|
49
|
-
_defineProperty(this, "_onClick", () => {
|
|
50
|
-
const callback = this._callback;
|
|
51
|
-
this._observables = this._observables.map(obj => {
|
|
52
|
-
const {
|
|
53
|
-
target
|
|
54
|
-
} = obj;
|
|
55
|
-
return {
|
|
56
|
-
target,
|
|
57
|
-
selection: resolveSelectionValue(target)
|
|
58
|
-
};
|
|
59
|
-
});
|
|
60
|
-
callback && callback(this.takeRecords(), this);
|
|
61
|
-
});
|
|
62
|
-
_defineProperty(this, "_check", () => {
|
|
63
|
-
let changed = false;
|
|
64
|
-
const callback = this._callback;
|
|
65
|
-
this._observables = this._observables.map(obj => {
|
|
66
|
-
const {
|
|
67
|
-
target,
|
|
68
|
-
selection
|
|
69
|
-
} = obj;
|
|
70
|
-
const $selection = resolveSelectionValue(target);
|
|
71
|
-
if (selection === $selection) {
|
|
72
|
-
return obj;
|
|
73
|
-
}
|
|
74
|
-
if (selection.from === $selection.from && selection.to === $selection.to) {
|
|
75
|
-
return obj;
|
|
76
|
-
}
|
|
77
|
-
changed = true;
|
|
78
|
-
return {
|
|
79
|
-
target,
|
|
80
|
-
selection: $selection
|
|
81
|
-
};
|
|
82
|
-
});
|
|
83
|
-
changed && callback && callback(this.takeRecords(), this);
|
|
84
|
-
});
|
|
85
|
-
this._callback = _callback;
|
|
86
|
-
}
|
|
87
|
-
disconnect() {
|
|
88
|
-
this._observables.forEach(obj => {
|
|
89
|
-
const el = obj.target;
|
|
90
|
-
el.removeEventListener('click', this._check, false);
|
|
91
|
-
el.removeEventListener('selectionchange', this._check, false);
|
|
92
|
-
});
|
|
93
|
-
this._observables = [];
|
|
94
|
-
}
|
|
95
|
-
observe(el) {
|
|
96
|
-
if (!window.getSelection) {
|
|
97
|
-
console.warn('window.getSelection() is not supported');
|
|
98
|
-
return;
|
|
99
|
-
}
|
|
100
|
-
if (this._observables.some(obj => obj.target === el)) {
|
|
101
|
-
// Already observed.
|
|
102
|
-
return;
|
|
103
|
-
}
|
|
104
|
-
const obj = {
|
|
105
|
-
target: el,
|
|
106
|
-
selection: resolveSelectionValue(el)
|
|
107
|
-
};
|
|
108
|
-
el.addEventListener('click', this._check, false);
|
|
109
|
-
el.addEventListener('selectionchange', this._check, false);
|
|
110
|
-
this._observables.push(obj);
|
|
111
|
-
}
|
|
112
|
-
takeRecords() {
|
|
113
|
-
return this._observables.slice(0);
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
exports.default = SelectionObserver;
|
package/dist/ui/TableCellMenu.js
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var _prosemirrorState = require("prosemirror-state");
|
|
8
|
-
var _prosemirrorView = require("prosemirror-view");
|
|
9
|
-
var _prosemirrorModel = require("prosemirror-model");
|
|
10
|
-
var React = _interopRequireWildcard(require("react"));
|
|
11
|
-
var _CommandMenuButton = _interopRequireDefault(require("./CommandMenuButton"));
|
|
12
|
-
var _EditorToolbarConfig = require("./EditorToolbarConfig");
|
|
13
|
-
var _Icon = _interopRequireDefault(require("./Icon"));
|
|
14
|
-
require("./czi-table-cell-menu.css");
|
|
15
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
16
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
17
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
18
|
-
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
19
|
-
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
20
|
-
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
21
|
-
class TableCellMenu extends React.PureComponent {
|
|
22
|
-
constructor() {
|
|
23
|
-
super(...arguments);
|
|
24
|
-
_defineProperty(this, "_menu", null);
|
|
25
|
-
_defineProperty(this, "props", void 0);
|
|
26
|
-
}
|
|
27
|
-
render() {
|
|
28
|
-
const {
|
|
29
|
-
editorState,
|
|
30
|
-
editorView,
|
|
31
|
-
pluginView,
|
|
32
|
-
actionNode
|
|
33
|
-
} = this.props;
|
|
34
|
-
let cmdGrps = null;
|
|
35
|
-
if (pluginView.getMenu) {
|
|
36
|
-
cmdGrps = pluginView.getMenu(editorState, actionNode, _EditorToolbarConfig.TABLE_COMMANDS_GROUP);
|
|
37
|
-
}
|
|
38
|
-
if (!cmdGrps) {
|
|
39
|
-
cmdGrps = _EditorToolbarConfig.TABLE_COMMANDS_GROUP;
|
|
40
|
-
}
|
|
41
|
-
return /*#__PURE__*/React.createElement(_CommandMenuButton.default, {
|
|
42
|
-
className: "czi-table-cell-menu",
|
|
43
|
-
commandGroups: cmdGrps,
|
|
44
|
-
dispatch: editorView.dispatch,
|
|
45
|
-
editorState: editorState,
|
|
46
|
-
editorView: editorView,
|
|
47
|
-
icon: _Icon.default.get('edit'),
|
|
48
|
-
title: "Edit"
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
var _default = TableCellMenu;
|
|
53
|
-
exports.default = _default;
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
// @flow
|
|
2
|
-
import { EditorState, PluginView } from 'prosemirror-state';
|
|
3
|
-
import { EditorView } from 'prosemirror-view';
|
|
4
|
-
import { Node } from 'prosemirror-model';
|
|
5
|
-
import * as React from 'react';
|
|
6
|
-
|
|
7
|
-
import CommandMenuButton from './CommandMenuButton';
|
|
8
|
-
import { TABLE_COMMANDS_GROUP } from './EditorToolbarConfig';
|
|
9
|
-
import Icon from './Icon';
|
|
10
|
-
|
|
11
|
-
import './czi-table-cell-menu.css';
|
|
12
|
-
|
|
13
|
-
type Props = {
|
|
14
|
-
editorState: EditorState,
|
|
15
|
-
editorView: EditorView,
|
|
16
|
-
pluginView: PluginView,
|
|
17
|
-
actionNode: Node,
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
class TableCellMenu extends React.PureComponent<any, any> {
|
|
21
|
-
_menu = null;
|
|
22
|
-
|
|
23
|
-
props: Props;
|
|
24
|
-
|
|
25
|
-
render(): React.Element<any> {
|
|
26
|
-
const { editorState, editorView, pluginView, actionNode } = this.props;
|
|
27
|
-
let cmdGrps = null;
|
|
28
|
-
|
|
29
|
-
if (pluginView.getMenu) {
|
|
30
|
-
cmdGrps = pluginView.getMenu(editorState, actionNode, TABLE_COMMANDS_GROUP);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
if (!cmdGrps) {
|
|
34
|
-
cmdGrps = TABLE_COMMANDS_GROUP;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
return (
|
|
38
|
-
<CommandMenuButton
|
|
39
|
-
className="czi-table-cell-menu"
|
|
40
|
-
commandGroups={cmdGrps}
|
|
41
|
-
dispatch={editorView.dispatch}
|
|
42
|
-
editorState={editorState}
|
|
43
|
-
editorView={editorView}
|
|
44
|
-
icon={Icon.get('edit')}
|
|
45
|
-
title="Edit"
|
|
46
|
-
/>
|
|
47
|
-
);
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
export default TableCellMenu;
|
|
@@ -1,191 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = exports.bpfrpt_proptype_TableGridSizeEditorValue = void 0;
|
|
7
|
-
var _classnames = _interopRequireDefault(require("classnames"));
|
|
8
|
-
var React = _interopRequireWildcard(require("react"));
|
|
9
|
-
var _reactDom = _interopRequireDefault(require("react-dom"));
|
|
10
|
-
var _licitUiCommands = require("@modusoperandi/licit-ui-commands");
|
|
11
|
-
var _htmlElementToRect = _interopRequireDefault(require("./htmlElementToRect"));
|
|
12
|
-
require("./czi-table-grid-size-editor.css");
|
|
13
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
14
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
15
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
16
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
-
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
18
|
-
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
19
|
-
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
20
|
-
var bpfrpt_proptype_TableGridSizeEditorValue = {
|
|
21
|
-
"cols": _propTypes.default.number.isRequired,
|
|
22
|
-
"rows": _propTypes.default.number.isRequired
|
|
23
|
-
};
|
|
24
|
-
exports.bpfrpt_proptype_TableGridSizeEditorValue = bpfrpt_proptype_TableGridSizeEditorValue;
|
|
25
|
-
const GUTTER_SIZE = 5;
|
|
26
|
-
const CELL_SIZE = 16;
|
|
27
|
-
// [FS] IRAD-1012 2020-07-14
|
|
28
|
-
// Fix: Limited Table Grid size from 20 to 7
|
|
29
|
-
const MAX_SIZE = 7;
|
|
30
|
-
class GridCell extends React.PureComponent {
|
|
31
|
-
render() {
|
|
32
|
-
const {
|
|
33
|
-
x,
|
|
34
|
-
y,
|
|
35
|
-
selected
|
|
36
|
-
} = this.props;
|
|
37
|
-
const style = {
|
|
38
|
-
left: x + 'px',
|
|
39
|
-
top: y + 'px',
|
|
40
|
-
width: CELL_SIZE + 'px',
|
|
41
|
-
height: CELL_SIZE + 'px'
|
|
42
|
-
};
|
|
43
|
-
const className = (0, _classnames.default)('czi-table-grid-size-editor-cell', {
|
|
44
|
-
selected
|
|
45
|
-
});
|
|
46
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
47
|
-
className: className,
|
|
48
|
-
style: style
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
class TableGridSizeEditor extends React.PureComponent {
|
|
53
|
-
constructor() {
|
|
54
|
-
super(...arguments);
|
|
55
|
-
_defineProperty(this, "_ex", 0);
|
|
56
|
-
_defineProperty(this, "_ey", 0);
|
|
57
|
-
_defineProperty(this, "_mx", 0);
|
|
58
|
-
_defineProperty(this, "_my", 0);
|
|
59
|
-
_defineProperty(this, "_rafID", 0);
|
|
60
|
-
_defineProperty(this, "_ref", null);
|
|
61
|
-
_defineProperty(this, "_entered", false);
|
|
62
|
-
_defineProperty(this, "props", void 0);
|
|
63
|
-
_defineProperty(this, "state", {
|
|
64
|
-
rows: 1,
|
|
65
|
-
cols: 1
|
|
66
|
-
});
|
|
67
|
-
_defineProperty(this, "_onRef", ref => {
|
|
68
|
-
this._ref = ref;
|
|
69
|
-
});
|
|
70
|
-
_defineProperty(this, "_onMouseEnter", e => {
|
|
71
|
-
const node = e.currentTarget;
|
|
72
|
-
if (node instanceof HTMLElement) {
|
|
73
|
-
const rect = (0, _licitUiCommands.fromHTMlElement)(node);
|
|
74
|
-
const mx = Math.round(e.clientX);
|
|
75
|
-
const my = Math.round(e.clientY);
|
|
76
|
-
this._ex = rect.x;
|
|
77
|
-
this._ey = rect.y;
|
|
78
|
-
this._mx = mx;
|
|
79
|
-
this._my = my;
|
|
80
|
-
if (!this._entered) {
|
|
81
|
-
this._entered = true;
|
|
82
|
-
document.addEventListener('mousemove', this._onMouseMove, true);
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
});
|
|
86
|
-
_defineProperty(this, "_onMouseMove", e => {
|
|
87
|
-
const el = this._ref && _reactDom.default.findDOMNode(this._ref);
|
|
88
|
-
const elRect = el ? (0, _htmlElementToRect.default)(el) : null;
|
|
89
|
-
const mouseRect = (0, _licitUiCommands.fromXY)(e.screenX, e.screenY, 10);
|
|
90
|
-
if (elRect && mouseRect && (0, _licitUiCommands.isIntersected)(elRect, mouseRect, 50)) {
|
|
91
|
-
// This prevents `PopUpManager` from collapsing the editor.
|
|
92
|
-
e.preventDefault();
|
|
93
|
-
e.stopImmediatePropagation();
|
|
94
|
-
}
|
|
95
|
-
const mx = Math.round(e.clientX);
|
|
96
|
-
const my = Math.round(e.clientY);
|
|
97
|
-
if (mx !== this._mx || my !== this._my) {
|
|
98
|
-
this._mx = mx;
|
|
99
|
-
this._my = my;
|
|
100
|
-
this._rafID && cancelAnimationFrame(this._rafID);
|
|
101
|
-
this._rafID = requestAnimationFrame(this._updateGridSize);
|
|
102
|
-
}
|
|
103
|
-
});
|
|
104
|
-
_defineProperty(this, "_updateGridSize", () => {
|
|
105
|
-
this._rafID = 0;
|
|
106
|
-
const mx = this._mx;
|
|
107
|
-
const my = this._my;
|
|
108
|
-
const x = mx - this._ex;
|
|
109
|
-
const y = my - this._ey;
|
|
110
|
-
const rr = (0, _licitUiCommands.clamp)(1, Math.ceil(y / (CELL_SIZE + GUTTER_SIZE)), MAX_SIZE);
|
|
111
|
-
const cc = (0, _licitUiCommands.clamp)(1, Math.ceil(x / (CELL_SIZE + GUTTER_SIZE)), MAX_SIZE);
|
|
112
|
-
const {
|
|
113
|
-
rows,
|
|
114
|
-
cols
|
|
115
|
-
} = this.state;
|
|
116
|
-
if (rows !== rr || cols !== cc) {
|
|
117
|
-
this.setState({
|
|
118
|
-
rows: rr,
|
|
119
|
-
cols: cc
|
|
120
|
-
});
|
|
121
|
-
}
|
|
122
|
-
});
|
|
123
|
-
_defineProperty(this, "_onMouseDown", e => {
|
|
124
|
-
e.preventDefault();
|
|
125
|
-
this.props.close(this.state);
|
|
126
|
-
});
|
|
127
|
-
}
|
|
128
|
-
componentWillUnmount() {
|
|
129
|
-
if (this._entered) {
|
|
130
|
-
document.removeEventListener('mousemove', this._onMouseMove, true);
|
|
131
|
-
}
|
|
132
|
-
this._rafID && cancelAnimationFrame(this._rafID);
|
|
133
|
-
}
|
|
134
|
-
render() {
|
|
135
|
-
const {
|
|
136
|
-
rows,
|
|
137
|
-
cols
|
|
138
|
-
} = this.state;
|
|
139
|
-
let rr = Math.max(5, rows);
|
|
140
|
-
let cc = Math.max(5, cols);
|
|
141
|
-
if (rr === rows) {
|
|
142
|
-
rr = Math.min(MAX_SIZE, rr + 1);
|
|
143
|
-
}
|
|
144
|
-
if (cc === cols) {
|
|
145
|
-
cc = Math.min(MAX_SIZE, cc + 1);
|
|
146
|
-
}
|
|
147
|
-
const cells = [];
|
|
148
|
-
let ii = 0;
|
|
149
|
-
let y = 0;
|
|
150
|
-
let w = 0;
|
|
151
|
-
let h = 0;
|
|
152
|
-
while (ii < rr) {
|
|
153
|
-
y += GUTTER_SIZE;
|
|
154
|
-
let jj = 0;
|
|
155
|
-
let x = 0;
|
|
156
|
-
while (jj < cc) {
|
|
157
|
-
x += GUTTER_SIZE;
|
|
158
|
-
const selected = ii < rows && jj < cols;
|
|
159
|
-
cells.push( /*#__PURE__*/React.createElement(GridCell, {
|
|
160
|
-
key: `${String(ii)}-${String(jj)}`,
|
|
161
|
-
selected: selected,
|
|
162
|
-
x: x,
|
|
163
|
-
y: y
|
|
164
|
-
}));
|
|
165
|
-
x += CELL_SIZE;
|
|
166
|
-
w = x + GUTTER_SIZE;
|
|
167
|
-
jj++;
|
|
168
|
-
}
|
|
169
|
-
y += CELL_SIZE;
|
|
170
|
-
h = y + GUTTER_SIZE;
|
|
171
|
-
ii++;
|
|
172
|
-
}
|
|
173
|
-
const bodyStyle = {
|
|
174
|
-
width: w + 'px',
|
|
175
|
-
height: h + 'px'
|
|
176
|
-
};
|
|
177
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
178
|
-
className: "czi-table-grid-size-editor",
|
|
179
|
-
ref: this._onRef
|
|
180
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
181
|
-
className: "czi-table-grid-size-editor-body",
|
|
182
|
-
onMouseDown: this._onMouseDown,
|
|
183
|
-
onMouseEnter: this._onMouseEnter,
|
|
184
|
-
style: bodyStyle
|
|
185
|
-
}, cells), /*#__PURE__*/React.createElement("div", {
|
|
186
|
-
className: "czi-table-grid-size-editor-footer"
|
|
187
|
-
}, rows, " X ", cols));
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
var _default = TableGridSizeEditor;
|
|
191
|
-
exports.default = _default;
|