@modusoperandi/licit 0.1.4 → 0.1.8
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/.babelrc +54 -54
- package/.dockerignore +4 -4
- package/.eslintignore +3 -3
- package/.eslintrc.js +80 -80
- package/.flowconfig +37 -37
- package/.github/workflows/build.yml +35 -29
- package/.github/workflows/lint.yml +30 -30
- package/.prettierignore +5 -5
- package/.prettierrc +4 -4
- package/.stylelintignore +1 -1
- package/.stylelintrc.json +13 -13
- package/.travis.yml +18 -18
- package/CODEOWNERS +40 -40
- package/LICENSE +22 -22
- package/README.md +286 -284
- package/build_collab_server.py +7 -7
- package/build_customstyle_server.py +7 -7
- package/build_image_server.py +7 -7
- package/dist/BlockquoteInsertNewLineCommand.js.flow +55 -55
- package/dist/BlockquoteNodeSpec.js.flow +30 -30
- package/dist/BlockquoteToggleCommand.js.flow +34 -34
- package/dist/BookmarkNodeSpec.js.flow +39 -39
- package/dist/BulletListNodeSpec.js.flow +61 -61
- package/dist/CZIProseMirror.js.flow +90 -90
- package/dist/CodeBlockCommand.js.flow +43 -43
- package/dist/CodeBlockNodeSpec.js.flow +24 -24
- package/dist/CodeMarkSpec.js.flow +14 -14
- package/dist/ContentPlaceholderPlugin.js.flow +187 -187
- package/dist/CursorPlaceholderPlugin.js.flow +115 -115
- package/dist/DocLayoutCommand.js.flow +94 -94
- package/dist/DocNodeSpec.js.flow +64 -64
- package/dist/EMMarkSpec.js.flow +14 -14
- package/dist/EditorCommands.js.flow +128 -128
- package/dist/EditorKeyMap.js.flow +187 -187
- package/dist/EditorMarks.js.flow +71 -71
- package/dist/EditorNodes.js.flow +60 -60
- package/dist/EditorPageLayoutPlugin.js.flow +67 -67
- package/dist/EditorPlugins.js.flow +8 -8
- package/dist/EditorSchema.js.flow +12 -12
- package/dist/EditorState.js.flow +7 -7
- package/dist/FontSizeCommand.js +0 -8
- package/dist/FontSizeCommand.js.flow +57 -73
- package/dist/FontSizeMarkSpec.js.flow +49 -49
- package/dist/FontTypeCommand.js +0 -8
- package/dist/FontTypeCommand.js.flow +100 -116
- package/dist/FontTypeMarkSpec.js.flow +80 -80
- package/dist/HTMLMutator.js.flow +59 -59
- package/dist/HardBreakNodeSpec.js.flow +15 -15
- package/dist/HeadingCommand.js.flow +51 -51
- package/dist/HeadingNodeSpec.js.flow +54 -54
- package/dist/HistoryRedoCommand.js.flow +20 -20
- package/dist/HistoryUndoCommand.js.flow +20 -20
- package/dist/HorizontalRuleCommand.js.flow +49 -49
- package/dist/HorizontalRuleNodeSpec.js.flow +39 -39
- package/dist/ImageFromURLCommand.js.flow +14 -14
- package/dist/ImageNodeSpec.js.flow +90 -90
- package/dist/ImageSourceCommand.js.flow +117 -117
- package/dist/ImageUploadCommand.js.flow +36 -36
- package/dist/ImageUploadPlaceholderPlugin.js.flow +192 -192
- package/dist/IndentCommand.js +0 -9
- package/dist/IndentCommand.js.flow +41 -54
- package/dist/LinkMarkSpec.js.flow +32 -32
- package/dist/LinkSetURLCommand.js.flow +103 -103
- package/dist/LinkTooltipPlugin.js.flow +203 -203
- package/dist/ListItemInsertNewLineCommand.js.flow +55 -55
- package/dist/ListItemMergeCommand.js.flow +177 -177
- package/dist/ListItemNodeSpec.js.flow +51 -51
- package/dist/ListSplitCommand.js.flow +32 -32
- package/dist/ListToggleCommand.js +3 -45
- package/dist/ListToggleCommand.js.flow +77 -117
- package/dist/MarkNames.js +2 -4
- package/dist/MarkNames.js.flow +18 -19
- package/dist/MarkToggleCommand.js +3 -114
- package/dist/MarkToggleCommand.js.flow +66 -168
- package/dist/MarksClearCommand.js +1 -18
- package/dist/MarksClearCommand.js.flow +42 -55
- package/dist/MathEditCommand.js.flow +110 -110
- package/dist/MathNodeSpec.js.flow +46 -46
- package/dist/NodeNames.js.flow +23 -23
- package/dist/OrderedListNodeSpec.js.flow +132 -132
- package/dist/ParagraphNodeSpec.js +6 -115
- package/dist/ParagraphNodeSpec.js.flow +160 -250
- package/dist/ParagraphSpacingCommand.js.flow +121 -121
- package/dist/PrintCommand.js.flow +31 -31
- package/dist/SelectionPlaceholderPlugin.js.flow +131 -131
- package/dist/SpacerMarkSpec.js.flow +47 -47
- package/dist/StrikeMarkSpec.js.flow +21 -21
- package/dist/StrongMarkSpec.js.flow +25 -25
- package/dist/StyleView.js.flow +19 -19
- package/dist/TableBackgroundColorCommand.js.flow +75 -75
- package/dist/TableBorderColorCommand.js.flow +75 -75
- package/dist/TableCellColorCommand.js.flow +71 -71
- package/dist/TableCellMenuPlugin.js.flow +125 -125
- package/dist/TableInsertCommand.js.flow +112 -112
- package/dist/TableMergeCellsCommand.js.flow +90 -90
- package/dist/TableNodesSpecs.js.flow +78 -78
- package/dist/TablePlugins.js.flow +14 -14
- package/dist/TableResizePlugin.js.flow +631 -631
- package/dist/TextAlignCommand.js +0 -8
- package/dist/TextAlignCommand.js.flow +122 -138
- package/dist/TextColorCommand.js +0 -16
- package/dist/TextColorCommand.js.flow +87 -112
- package/dist/TextColorMarkSpec.js.flow +35 -35
- package/dist/TextHighlightCommand.js +0 -12
- package/dist/TextHighlightCommand.js.flow +91 -110
- package/dist/TextHighlightMarkSpec.js.flow +38 -38
- package/dist/TextInsertTabSpaceCommand.js +2 -5
- package/dist/TextInsertTabSpaceCommand.js.flow +83 -85
- package/dist/TextLineSpacingCommand.js.flow +157 -157
- package/dist/TextNoWrapMarkSpec.js.flow +14 -14
- package/dist/TextNodeSpec.js.flow +7 -7
- package/dist/TextSelectionMarkSpec.js.flow +24 -24
- package/dist/TextSubMarkSpec.js.flow +20 -20
- package/dist/TextSuperMarkSpec.js.flow +20 -20
- package/dist/TextUnderlineMarkSpec.js.flow +27 -27
- package/dist/Types.js +2 -121
- package/dist/Types.js.flow +75 -155
- package/dist/WebFontLoader.js.flow +22 -22
- package/dist/applyMark.js +3 -4
- package/dist/applyMark.js.flow +61 -64
- package/dist/blockQuoteInputRule.js.flow +36 -36
- package/dist/bom.xml +89 -89
- package/dist/browser.js.flow +7 -7
- package/dist/buildEditorPlugins.js +1 -3
- package/dist/buildEditorPlugins.js.flow +51 -53
- package/dist/buildInputRules.js.flow +81 -81
- package/dist/clearMarks.js +2 -5
- package/dist/clearMarks.js.flow +128 -132
- package/dist/client/CollabConnector.js +7 -7
- package/dist/client/CollabConnector.js.flow +71 -75
- package/dist/client/EditorConnection.js.flow +307 -307
- package/dist/client/Licit.js +197 -117
- package/dist/client/Licit.js.flow +562 -495
- package/dist/client/Licit.test.js +3 -57
- package/dist/client/Licit.test.js.flow +65 -120
- package/dist/client/Reporter.js.flow +37 -37
- package/dist/client/SimpleConnector.js.flow +53 -53
- package/dist/client/http.js.flow +66 -66
- package/dist/client/licit.css +12 -12
- package/dist/client/throttle.js.flow +27 -27
- package/dist/compareNumber.js.flow +11 -11
- package/dist/consolidateListNodes.js +27 -27
- package/dist/consolidateListNodes.js.flow +281 -281
- package/dist/convertFromDOMElement.js.flow +36 -36
- package/dist/convertFromHTML.js.flow +19 -19
- package/dist/convertFromJSON.js.flow +78 -78
- package/dist/convertToCSSPTValue.js.flow +22 -22
- package/dist/convertToJSON.js.flow +7 -7
- package/dist/createCommand.js.flow +40 -40
- package/dist/createEditorKeyMap.js.flow +94 -94
- package/dist/createEmptyEditorState.js.flow +41 -41
- package/dist/createTableResizingPlugin.js.flow +86 -86
- package/dist/findActionableCell.js.flow +74 -74
- package/dist/findActiveMark.js.flow +32 -32
- package/dist/findNodesWithSameMark.js.flow +89 -89
- package/dist/hyphenize.js.flow +17 -17
- package/dist/index.js +0 -14
- package/dist/index.js.flow +10 -11
- package/dist/insertTable.js.flow +56 -56
- package/dist/isBulletListNode.js.flow +9 -9
- package/dist/isEditorStateEmpty.js.flow +32 -32
- package/dist/isInsideListItem.js.flow +13 -13
- package/dist/isListNode.js.flow +13 -13
- package/dist/isNodeSelectionForNodeType.js.flow +15 -15
- package/dist/isOrderedListNode.js.flow +9 -9
- package/dist/isTableNode.js.flow +15 -15
- package/dist/isTextStyleMarkCommandEnabled.js.flow +49 -49
- package/dist/joinDown.js.flow +27 -27
- package/dist/joinListNode.js.flow +55 -55
- package/dist/joinUp.js.flow +39 -39
- package/dist/keymaps.js.flow +185 -185
- package/dist/lookUpElement.js.flow +14 -14
- package/dist/nodeAt.js.flow +12 -12
- package/dist/noop.js.flow +5 -5
- package/dist/normalizeHTML.js.flow +78 -78
- package/dist/patchAnchorElements.js.flow +38 -38
- package/dist/patchBreakElements.js.flow +22 -22
- package/dist/patchElementInlineStyles.js.flow +92 -92
- package/dist/patchListElements.js.flow +276 -276
- package/dist/patchMathElements.js.flow +60 -60
- package/dist/patchParagraphElements.js.flow +20 -20
- package/dist/patchStyleElements.js.flow +194 -194
- package/dist/patchTableElements.js.flow +89 -89
- package/dist/rebaseDocWithSteps.js.flow +42 -42
- package/dist/sanitizeURL.js.flow +13 -13
- package/dist/splitListItem.js.flow +191 -191
- package/dist/styles.css +19 -21
- package/dist/styles0.css +29 -30
- package/dist/toClosestFontPtSize.js.flow +22 -22
- package/dist/toSafeHTMLDocument.js.flow +9 -9
- package/dist/toggleBlockquote.js.flow +91 -91
- package/dist/toggleCodeBlock.js.flow +102 -102
- package/dist/toggleHeading.js.flow +113 -113
- package/dist/toggleList.js.flow +450 -450
- package/dist/transformAndPreserveTextSelection.js.flow +151 -151
- package/dist/ui/AlertInfo.js +1 -1
- package/dist/ui/AlertInfo.js.flow +64 -64
- package/dist/ui/BookmarkNodeView.js.flow +66 -66
- package/dist/ui/ColorEditor.js.flow +101 -101
- package/dist/ui/CommandButton.js.flow +68 -68
- package/dist/ui/CommandMenu.js.flow +75 -75
- package/dist/ui/CommandMenuButton.js.flow +131 -131
- package/dist/ui/CustomButton.js.flow +33 -33
- package/dist/ui/CustomEditorView.js.flow +28 -28
- package/dist/ui/CustomMenu.js.flow +17 -17
- package/dist/ui/CustomMenuItem.js.flow +36 -36
- package/dist/ui/CustomNodeView.js +6 -1
- package/dist/ui/CustomNodeView.js.flow +200 -196
- package/dist/ui/CustomRadioButton.js.flow +65 -65
- package/dist/ui/DocLayoutEditor.js.flow +146 -146
- package/dist/ui/Editor.js.flow +291 -291
- package/dist/ui/EditorFrameset.js.flow +81 -81
- package/dist/ui/EditorToolbar.js.flow +211 -211
- package/dist/ui/EditorToolbarConfig.js +0 -6
- package/dist/ui/EditorToolbarConfig.js.flow +172 -178
- package/dist/ui/FontSizeCommandMenuButton.js.flow +66 -66
- package/dist/ui/FontTypeCommandMenuButton.js.flow +49 -49
- package/dist/ui/Frag.js.flow +13 -13
- package/dist/ui/Icon.js.flow +89 -89
- package/dist/ui/ImageAlignEditor.js.flow +60 -60
- package/dist/ui/ImageInlineEditor.js.flow +67 -67
- package/dist/ui/ImageNodeView.js +1 -10
- package/dist/ui/ImageNodeView.js.flow +404 -414
- package/dist/ui/ImageResizeBox.js.flow +219 -219
- package/dist/ui/ImageURLEditor.js.flow +119 -119
- package/dist/ui/ImageUploadEditor.js.flow +117 -117
- package/dist/ui/KeyCodes.js.flow +12 -12
- package/dist/ui/LinkTooltip.js.flow +85 -85
- package/dist/ui/LinkURLEditor.js.flow +111 -111
- package/dist/ui/ListItemNodeView.js.flow +98 -98
- package/dist/ui/ListTypeButton.js.flow +131 -131
- package/dist/ui/ListTypeCommandButton.js +1 -1
- package/dist/ui/ListTypeCommandButton.js.flow +85 -86
- package/dist/ui/ListTypeMenu.js.flow +70 -70
- package/dist/ui/LoadingIndicator.js.flow +20 -20
- package/dist/ui/MathEditor.js.flow +78 -78
- package/dist/ui/MathInlineEditor.js.flow +102 -102
- package/dist/ui/MathNodeView.js.flow +175 -175
- package/dist/ui/PasteMenu.js.flow +57 -57
- package/dist/ui/PointerSurface.js.flow +141 -141
- package/dist/ui/PopUp.js.flow +77 -77
- package/dist/ui/PopUpManager.js.flow +213 -213
- package/dist/ui/PopUpPosition.js +0 -0
- package/dist/ui/PopUpPosition.js.flow +104 -104
- package/dist/ui/ResizeObserver.js.flow +106 -106
- package/dist/ui/RichTextEditor.js.flow +133 -133
- package/dist/ui/SelectionObserver.js.flow +134 -134
- package/dist/ui/TableCellMenu.js.flow +38 -38
- package/dist/ui/TableGridSizeEditor.js.flow +184 -184
- package/dist/ui/TableNodeView.js.flow +22 -22
- package/dist/ui/TooltipSurface.js.flow +76 -76
- package/dist/ui/bindScrollHandler.js.flow +46 -46
- package/dist/ui/canUseCSSFont.js.flow +43 -43
- package/dist/ui/clamp.js.flow +11 -11
- package/dist/ui/createPopUp.js.flow +205 -205
- package/dist/ui/czi-animations.css +15 -15
- package/dist/ui/czi-body-layout-editor.css +16 -16
- package/dist/ui/czi-bookmark-view.css +10 -10
- package/dist/ui/czi-color-editor.css +56 -56
- package/dist/ui/czi-cursor-placeholder.css +36 -36
- package/dist/ui/czi-custom-button.css +93 -93
- package/dist/ui/czi-custom-menu-button.css +18 -18
- package/dist/ui/czi-custom-menu-item.css +30 -30
- package/dist/ui/czi-custom-menu.css +8 -8
- package/dist/ui/czi-custom-radio-button.css +80 -80
- package/dist/ui/czi-custom-scrollbar.css +21 -21
- package/dist/ui/czi-editor-frameset.css +81 -81
- package/dist/ui/czi-editor-toolbar.css +122 -122
- package/dist/ui/czi-editor.css +220 -221
- package/dist/ui/czi-form.css +104 -104
- package/dist/ui/czi-frag.css +3 -3
- package/dist/ui/czi-heading.css +40 -40
- package/dist/ui/czi-icon.css +72 -72
- package/dist/ui/czi-image-resize-box.css +165 -165
- package/dist/ui/czi-image-upload-editor.css +57 -57
- package/dist/ui/czi-image-upload-placeholder.css +50 -50
- package/dist/ui/czi-image-url-editor.css +38 -38
- package/dist/ui/czi-image-view.css +125 -125
- package/dist/ui/czi-indent.css +137 -137
- package/dist/ui/czi-inline-editor.css +20 -20
- package/dist/ui/czi-link-tooltip.css +71 -71
- package/dist/ui/czi-list.css +410 -410
- package/dist/ui/czi-loading-indicator.css +111 -111
- package/dist/ui/czi-math-view.css +62 -62
- package/dist/ui/czi-pop-up.css +32 -32
- package/dist/ui/czi-selection-placeholder.css +24 -24
- package/dist/ui/czi-table-cell-menu.css +14 -14
- package/dist/ui/czi-table-grid-size-editor.css +37 -37
- package/dist/ui/czi-table.css +86 -86
- package/dist/ui/czi-tooltip-surface.css +45 -45
- package/dist/ui/czi-vars.css +46 -46
- package/dist/ui/findActiveFontSize.js.flow +58 -58
- package/dist/ui/findActiveFontType.js.flow +38 -38
- package/dist/ui/fonts.css +471 -471
- package/dist/ui/handleEditorDrop.js.flow +28 -28
- package/dist/ui/handleEditorKeyDown.js.flow +39 -39
- package/dist/ui/handleEditorPaste.js.flow +33 -33
- package/dist/ui/htmlElementToRect.js.flow +18 -18
- package/dist/ui/icon-font.css +10 -10
- package/dist/ui/injectStyleSheet.js.flow +42 -42
- package/dist/ui/isElementFullyVisible.js.flow +23 -23
- package/dist/ui/isOffline.js.flow +8 -8
- package/dist/ui/isReactClass.js.flow +12 -12
- package/dist/ui/listType.css +21 -21
- package/dist/ui/mathquill-editor/MathQuillEditor.js.flow +159 -159
- package/dist/ui/mathquill-editor/MathQuillEditorSymbols.js.flow +483 -483
- package/dist/ui/mathquill-editor/MathQuillEditorSymbolsPanel.js.flow +48 -48
- package/dist/ui/mathquill-editor/czi-mathquill-editor-symbols-panel.css +39 -39
- package/dist/ui/mathquill-editor/czi-mathquill-editor.css +50 -50
- package/dist/ui/mathquill-editor/mathquill-import-kludge.js.flow +24 -24
- package/dist/ui/preventEventDefault.js.flow +5 -5
- package/dist/ui/rects.js.flow +47 -47
- package/dist/ui/renderLaTeXAsHTML.js.flow +46 -46
- package/dist/ui/resolveImage.js.flow +123 -123
- package/dist/ui/toCSSColor.js.flow +51 -51
- package/dist/ui/toCSSLineSpacing.js.flow +82 -82
- package/dist/ui/toHexColor.js.flow +26 -26
- package/dist/ui/uuid.js.flow +9 -9
- package/dist/updateIndentLevel.js +1 -47
- package/dist/updateIndentLevel.js.flow +211 -260
- package/dist/uuid.js.flow +9 -9
- package/flow-typed/@modusoperandilicit-customstyles.js +5 -0
- package/flow-typed/@modusoperandilicit-doc-attrs-step.js +5 -5
- package/flow-typed/@molicit-citation.js +5 -5
- package/flow-typed/create-emotion.js +5 -5
- package/flow-typed/docs-editor.js +3 -3
- package/flow-typed/draft-convert.js +3 -3
- package/flow-typed/draft-js.js +3 -3
- package/flow-typed/flatted.js +5 -5
- package/flow-typed/jquery.js +5 -5
- package/flow-typed/katex.js +6 -6
- package/flow-typed/mathquill.js +5 -5
- package/flow-typed/prosemirror-collab.js +5 -5
- package/flow-typed/prosemirror-commands.js +5 -5
- package/flow-typed/prosemirror-dev-tools.js +5 -5
- package/flow-typed/prosemirror-dropcursor.js +5 -5
- package/flow-typed/prosemirror-gapcursor.js +5 -5
- package/flow-typed/prosemirror-history.js +5 -5
- package/flow-typed/prosemirror-inputrules.js +5 -5
- package/flow-typed/prosemirror-keymap.js +5 -5
- package/flow-typed/prosemirror-model.js +5 -5
- package/flow-typed/prosemirror-state.js +5 -5
- package/flow-typed/prosemirror-tables.js +5 -5
- package/flow-typed/prosemirror-transform.js +5 -5
- package/flow-typed/prosemirror-utils.js +5 -5
- package/flow-typed/prosemirror-view.js +5 -5
- package/flow-typed/resize-observer-polyfill.js +5 -5
- package/flow-typed/uuid.js +5 -5
- package/jest.setup.js +5 -5
- package/licit/client/CustomLicitRuntime.js +95 -200
- package/licit/client/CustomStyleRuntime.js +136 -0
- package/licit/client/index.js +366 -365
- package/licit/index.html +11 -11
- package/licit/server/collab/instance.js +221 -221
- package/licit/server/collab/route.js +69 -69
- package/licit/server/collab/server.js +297 -296
- package/licit/server/collab/start.js +13 -13
- package/licit/server/customstyles/start.js +184 -184
- package/licit/server/image/start.js +58 -58
- package/lint.sh +4 -4
- package/package.json +165 -165
- package/run_collab_server.py +21 -21
- package/run_customstyle_server.py +20 -20
- package/run_image_server.py +20 -20
- package/run_web_server.py +25 -25
- package/scripts/build_bin.js +10 -10
- package/scripts/build_bin.py +103 -103
- package/scripts/ci_check_dist.sh +13 -13
- package/scripts/env.js +6 -6
- package/scripts/webserver.js +35 -35
- package/sonar-project.properties +11 -11
- package/src/BlockquoteInsertNewLineCommand.js +55 -55
- package/src/BlockquoteNodeSpec.js +30 -30
- package/src/BlockquoteToggleCommand.js +34 -34
- package/src/BookmarkNodeSpec.js +39 -39
- package/src/BulletListNodeSpec.js +61 -61
- package/src/CZIProseMirror.js +90 -90
- package/src/CodeBlockCommand.js +43 -43
- package/src/CodeBlockNodeSpec.js +24 -24
- package/src/CodeMarkSpec.js +14 -14
- package/src/ContentPlaceholderPlugin.js +187 -187
- package/src/CursorPlaceholderPlugin.js +115 -115
- package/src/DocLayoutCommand.js +94 -94
- package/src/DocNodeSpec.js +64 -64
- package/src/EMMarkSpec.js +14 -14
- package/src/EditorCommands.js +128 -128
- package/src/EditorKeyMap.js +187 -187
- package/src/EditorMarks.js +71 -71
- package/src/EditorNodes.js +60 -60
- package/src/EditorPageLayoutPlugin.js +67 -67
- package/src/EditorPlugins.js +8 -8
- package/src/EditorSchema.js +12 -12
- package/src/EditorState.js +7 -7
- package/src/FontSizeCommand.js +57 -73
- package/src/FontSizeMarkSpec.js +49 -49
- package/src/FontTypeCommand.js +100 -116
- package/src/FontTypeMarkSpec.js +80 -80
- package/src/HTMLMutator.js +59 -59
- package/src/HardBreakNodeSpec.js +15 -15
- package/src/HeadingCommand.js +51 -51
- package/src/HeadingNodeSpec.js +54 -54
- package/src/HistoryRedoCommand.js +20 -20
- package/src/HistoryUndoCommand.js +20 -20
- package/src/HorizontalRuleCommand.js +49 -49
- package/src/HorizontalRuleNodeSpec.js +39 -39
- package/src/ImageFromURLCommand.js +14 -14
- package/src/ImageNodeSpec.js +90 -90
- package/src/ImageSourceCommand.js +117 -117
- package/src/ImageUploadCommand.js +36 -36
- package/src/ImageUploadPlaceholderPlugin.js +192 -192
- package/src/IndentCommand.js +41 -54
- package/src/LinkMarkSpec.js +32 -32
- package/src/LinkSetURLCommand.js +103 -103
- package/src/LinkTooltipPlugin.js +203 -203
- package/src/ListItemInsertNewLineCommand.js +55 -55
- package/src/ListItemMergeCommand.js +177 -177
- package/src/ListItemNodeSpec.js +51 -51
- package/src/ListSplitCommand.js +32 -32
- package/src/ListToggleCommand.js +77 -117
- package/src/MarkNames.js +18 -19
- package/src/MarkToggleCommand.js +66 -168
- package/src/MarksClearCommand.js +42 -55
- package/src/MathEditCommand.js +110 -110
- package/src/MathNodeSpec.js +46 -46
- package/src/NodeNames.js +23 -23
- package/src/OrderedListNodeSpec.js +132 -132
- package/src/ParagraphNodeSpec.js +160 -250
- package/src/ParagraphSpacingCommand.js +121 -121
- package/src/PrintCommand.js +31 -31
- package/src/SelectionPlaceholderPlugin.js +131 -131
- package/src/SpacerMarkSpec.js +47 -47
- package/src/StrikeMarkSpec.js +21 -21
- package/src/StrongMarkSpec.js +25 -25
- package/src/StyleView.js +19 -19
- package/src/TableBackgroundColorCommand.js +75 -75
- package/src/TableBorderColorCommand.js +75 -75
- package/src/TableCellColorCommand.js +71 -71
- package/src/TableCellMenuPlugin.js +125 -125
- package/src/TableInsertCommand.js +112 -112
- package/src/TableMergeCellsCommand.js +90 -90
- package/src/TableNodesSpecs.js +78 -78
- package/src/TablePlugins.js +14 -14
- package/src/TableResizePlugin.js +631 -631
- package/src/TextAlignCommand.js +122 -138
- package/src/TextColorCommand.js +87 -112
- package/src/TextColorMarkSpec.js +35 -35
- package/src/TextHighlightCommand.js +91 -110
- package/src/TextHighlightMarkSpec.js +38 -38
- package/src/TextInsertTabSpaceCommand.js +83 -85
- package/src/TextLineSpacingCommand.js +157 -157
- package/src/TextNoWrapMarkSpec.js +14 -14
- package/src/TextNodeSpec.js +7 -7
- package/src/TextSelectionMarkSpec.js +24 -24
- package/src/TextSubMarkSpec.js +20 -20
- package/src/TextSuperMarkSpec.js +20 -20
- package/src/TextUnderlineMarkSpec.js +27 -27
- package/src/Types.js +75 -155
- package/src/WebFontLoader.js +22 -22
- package/src/applyMark.js +61 -64
- package/src/blockQuoteInputRule.js +36 -36
- package/src/browser.js +7 -7
- package/src/buildEditorPlugins.js +51 -53
- package/src/buildInputRules.js +81 -81
- package/src/clearMarks.js +128 -132
- package/src/client/CollabConnector.js +71 -75
- package/src/client/EditorConnection.js +307 -307
- package/src/client/Licit.js +562 -495
- package/src/client/Licit.test.js +65 -120
- package/src/client/Reporter.js +37 -37
- package/src/client/SimpleConnector.js +53 -53
- package/src/client/http.js +66 -66
- package/src/client/licit.css +12 -12
- package/src/client/throttle.js +27 -27
- package/src/compareNumber.js +11 -11
- package/src/consolidateListNodes.js +281 -281
- package/src/convertFromDOMElement.js +36 -36
- package/src/convertFromHTML.js +19 -19
- package/src/convertFromJSON.js +78 -78
- package/src/convertToCSSPTValue.js +22 -22
- package/src/convertToJSON.js +7 -7
- package/src/createCommand.js +40 -40
- package/src/createEditorKeyMap.js +94 -94
- package/src/createEmptyEditorState.js +41 -41
- package/src/createTableResizingPlugin.js +86 -86
- package/src/findActionableCell.js +74 -74
- package/src/findActiveMark.js +32 -32
- package/src/findNodesWithSameMark.js +89 -89
- package/src/hyphenize.js +17 -17
- package/src/index.js +10 -11
- package/src/insertTable.js +56 -56
- package/src/isBulletListNode.js +9 -9
- package/src/isEditorStateEmpty.js +32 -32
- package/src/isInsideListItem.js +13 -13
- package/src/isListNode.js +13 -13
- package/src/isNodeSelectionForNodeType.js +15 -15
- package/src/isOrderedListNode.js +9 -9
- package/src/isTableNode.js +15 -15
- package/src/isTextStyleMarkCommandEnabled.js +49 -49
- package/src/joinDown.js +27 -27
- package/src/joinListNode.js +55 -55
- package/src/joinUp.js +39 -39
- package/src/keymaps.js +185 -185
- package/src/lookUpElement.js +14 -14
- package/src/nodeAt.js +12 -12
- package/src/noop.js +5 -5
- package/src/normalizeHTML.js +78 -78
- package/src/patchAnchorElements.js +38 -38
- package/src/patchBreakElements.js +22 -22
- package/src/patchElementInlineStyles.js +92 -92
- package/src/patchListElements.js +276 -276
- package/src/patchMathElements.js +60 -60
- package/src/patchParagraphElements.js +20 -20
- package/src/patchStyleElements.js +194 -194
- package/src/patchTableElements.js +89 -89
- package/src/rebaseDocWithSteps.js +42 -42
- package/src/sanitizeURL.js +13 -13
- package/src/splitListItem.js +191 -191
- package/src/styles.css +19 -21
- package/src/styles0.css +29 -30
- package/src/toClosestFontPtSize.js +22 -22
- package/src/toSafeHTMLDocument.js +9 -9
- package/src/toggleBlockquote.js +91 -91
- package/src/toggleCodeBlock.js +102 -102
- package/src/toggleHeading.js +113 -113
- package/src/toggleList.js +450 -450
- package/src/transformAndPreserveTextSelection.js +151 -151
- package/src/ui/AlertInfo.js +64 -64
- package/src/ui/BookmarkNodeView.js +66 -66
- package/src/ui/ColorEditor.js +101 -101
- package/src/ui/CommandButton.js +68 -68
- package/src/ui/CommandMenu.js +75 -75
- package/src/ui/CommandMenuButton.js +131 -131
- package/src/ui/CustomButton.js +33 -33
- package/src/ui/CustomEditorView.js +28 -28
- package/src/ui/CustomMenu.js +17 -17
- package/src/ui/CustomMenuItem.js +36 -36
- package/src/ui/CustomNodeView.js +200 -196
- package/src/ui/CustomRadioButton.js +65 -65
- package/src/ui/DocLayoutEditor.js +146 -146
- package/src/ui/Editor.js +291 -291
- package/src/ui/EditorFrameset.js +81 -81
- package/src/ui/EditorToolbar.js +211 -211
- package/src/ui/EditorToolbarConfig.js +172 -178
- package/src/ui/FontSizeCommandMenuButton.js +66 -66
- package/src/ui/FontTypeCommandMenuButton.js +49 -49
- package/src/ui/Frag.js +13 -13
- package/src/ui/Icon.js +89 -89
- package/src/ui/ImageAlignEditor.js +60 -60
- package/src/ui/ImageInlineEditor.js +67 -67
- package/src/ui/ImageNodeView.js +404 -414
- package/src/ui/ImageResizeBox.js +219 -219
- package/src/ui/ImageURLEditor.js +119 -119
- package/src/ui/ImageUploadEditor.js +117 -117
- package/src/ui/KeyCodes.js +12 -12
- package/src/ui/LinkTooltip.js +85 -85
- package/src/ui/LinkURLEditor.js +111 -111
- package/src/ui/ListItemNodeView.js +98 -98
- package/src/ui/ListTypeButton.js +131 -131
- package/src/ui/ListTypeCommandButton.js +85 -86
- package/src/ui/ListTypeMenu.js +70 -70
- package/src/ui/LoadingIndicator.js +20 -20
- package/src/ui/MathEditor.js +78 -78
- package/src/ui/MathInlineEditor.js +102 -102
- package/src/ui/MathNodeView.js +175 -175
- package/src/ui/PasteMenu.js +57 -57
- package/src/ui/PointerSurface.js +141 -141
- package/src/ui/PopUp.js +77 -77
- package/src/ui/PopUpManager.js +213 -213
- package/src/ui/PopUpPosition.js +104 -104
- package/src/ui/ResizeObserver.js +106 -106
- package/src/ui/RichTextEditor.js +133 -133
- package/src/ui/SelectionObserver.js +134 -134
- package/src/ui/TableCellMenu.js +38 -38
- package/src/ui/TableGridSizeEditor.js +184 -184
- package/src/ui/TableNodeView.js +22 -22
- package/src/ui/TooltipSurface.js +76 -76
- package/src/ui/bindScrollHandler.js +46 -46
- package/src/ui/canUseCSSFont.js +43 -43
- package/src/ui/clamp.js +11 -11
- package/src/ui/createPopUp.js +205 -205
- package/src/ui/czi-animations.css +15 -15
- package/src/ui/czi-body-layout-editor.css +16 -16
- package/src/ui/czi-bookmark-view.css +10 -10
- package/src/ui/czi-color-editor.css +56 -56
- package/src/ui/czi-cursor-placeholder.css +36 -36
- package/src/ui/czi-custom-button.css +93 -93
- package/src/ui/czi-custom-menu-button.css +18 -18
- package/src/ui/czi-custom-menu-item.css +30 -30
- package/src/ui/czi-custom-menu.css +8 -8
- package/src/ui/czi-custom-radio-button.css +80 -80
- package/src/ui/czi-custom-scrollbar.css +21 -21
- package/src/ui/czi-editor-frameset.css +81 -81
- package/src/ui/czi-editor-toolbar.css +122 -122
- package/src/ui/czi-editor.css +220 -221
- package/src/ui/czi-form.css +104 -104
- package/src/ui/czi-frag.css +3 -3
- package/src/ui/czi-heading.css +40 -40
- package/src/ui/czi-icon.css +72 -72
- package/src/ui/czi-image-resize-box.css +165 -165
- package/src/ui/czi-image-upload-editor.css +57 -57
- package/src/ui/czi-image-upload-placeholder.css +50 -50
- package/src/ui/czi-image-url-editor.css +38 -38
- package/src/ui/czi-image-view.css +125 -125
- package/src/ui/czi-indent.css +137 -137
- package/src/ui/czi-inline-editor.css +20 -20
- package/src/ui/czi-link-tooltip.css +71 -71
- package/src/ui/czi-list.css +410 -410
- package/src/ui/czi-loading-indicator.css +111 -111
- package/src/ui/czi-math-view.css +62 -62
- package/src/ui/czi-pop-up.css +32 -32
- package/src/ui/czi-selection-placeholder.css +24 -24
- package/src/ui/czi-table-cell-menu.css +14 -14
- package/src/ui/czi-table-grid-size-editor.css +37 -37
- package/src/ui/czi-table.css +86 -86
- package/src/ui/czi-tooltip-surface.css +45 -45
- package/src/ui/czi-vars.css +46 -46
- package/src/ui/findActiveFontSize.js +58 -58
- package/src/ui/findActiveFontType.js +38 -38
- package/src/ui/fonts.css +471 -471
- package/src/ui/handleEditorDrop.js +28 -28
- package/src/ui/handleEditorKeyDown.js +39 -39
- package/src/ui/handleEditorPaste.js +33 -33
- package/src/ui/htmlElementToRect.js +18 -18
- package/src/ui/icon-font.css +10 -10
- package/src/ui/injectStyleSheet.js +42 -42
- package/src/ui/isElementFullyVisible.js +23 -23
- package/src/ui/isOffline.js +8 -8
- package/src/ui/isReactClass.js +12 -12
- package/src/ui/listType.css +21 -21
- package/src/ui/mathquill-editor/MathQuillEditor.js +159 -159
- package/src/ui/mathquill-editor/MathQuillEditorSymbols.js +483 -483
- package/src/ui/mathquill-editor/MathQuillEditorSymbolsPanel.js +48 -48
- package/src/ui/mathquill-editor/czi-mathquill-editor-symbols-panel.css +39 -39
- package/src/ui/mathquill-editor/czi-mathquill-editor.css +50 -50
- package/src/ui/mathquill-editor/mathquill-import-kludge.js +24 -24
- package/src/ui/preventEventDefault.js +5 -5
- package/src/ui/rects.js +47 -47
- package/src/ui/renderLaTeXAsHTML.js +46 -46
- package/src/ui/resolveImage.js +123 -123
- package/src/ui/toCSSColor.js +51 -51
- package/src/ui/toCSSLineSpacing.js +82 -82
- package/src/ui/toHexColor.js +26 -26
- package/src/ui/uuid.js +9 -9
- package/src/updateIndentLevel.js +211 -260
- package/src/uuid.js +9 -9
- package/style-service.Dockerfile +26 -26
- package/utils/build_bin.js +9 -9
- package/utils/build_customstyle_server.js +71 -71
- package/utils/build_image_server.js +71 -71
- package/utils/build_licit_collab_server.js +75 -75
- package/utils/build_web_server.js +40 -40
- package/utils/env.js +6 -6
- package/webpack.config.js +126 -126
- package/dist/CustomStyleCommand.js +0 -1534
- package/dist/CustomStyleCommand.js.flow +0 -1690
- package/dist/StylePlugin.js +0 -533
- package/dist/StylePlugin.js.flow +0 -548
- package/dist/clearCustomStyleMarks.js +0 -43
- package/dist/clearCustomStyleMarks.js.flow +0 -34
- package/dist/customStyle.js +0 -185
- package/dist/customStyle.js.flow +0 -171
- package/dist/ui/CustomMenuButton.js +0 -155
- package/dist/ui/CustomMenuButton.js.flow +0 -129
- package/dist/ui/CustomMenuUI.js +0 -479
- package/dist/ui/CustomMenuUI.js.flow +0 -464
- package/dist/ui/CustomStyleEditor.js +0 -1216
- package/dist/ui/CustomStyleEditor.js.flow +0 -1325
- package/dist/ui/CustomStyleItem.js +0 -164
- package/dist/ui/CustomStyleItem.js.flow +0 -152
- package/dist/ui/CustomStyleSubMenu.js +0 -62
- package/dist/ui/CustomStyleSubMenu.js.flow +0 -54
- package/dist/ui/HeadingCommandMenuButton.js +0 -157
- package/dist/ui/HeadingCommandMenuButton.js.flow +0 -147
- package/dist/ui/custom-dropdown.css +0 -90
- package/dist/ui/custom-style-edit.css +0 -430
- package/dist/ui/czi-cust-style-numbered.css +0 -137
- package/dist/ui/findActiveCustomStyle.js +0 -53
- package/dist/ui/findActiveCustomStyle.js.flow +0 -38
- package/src/CustomStyleCommand.js +0 -1690
- package/src/StylePlugin.js +0 -548
- package/src/clearCustomStyleMarks.js +0 -34
- package/src/customStyle.js +0 -171
- package/src/ui/CustomMenuButton.js +0 -129
- package/src/ui/CustomMenuUI.js +0 -464
- package/src/ui/CustomStyleEditor.js +0 -1325
- package/src/ui/CustomStyleItem.js +0 -152
- package/src/ui/CustomStyleSubMenu.js +0 -54
- package/src/ui/HeadingCommandMenuButton.js +0 -147
- package/src/ui/custom-dropdown.css +0 -90
- package/src/ui/custom-style-edit.css +0 -430
- package/src/ui/czi-cust-style-numbered.css +0 -137
- package/src/ui/findActiveCustomStyle.js +0 -38
|
@@ -1,1216 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
|
|
8
|
-
var React = _interopRequireWildcard(require("react"));
|
|
9
|
-
|
|
10
|
-
require("./custom-style-edit.css");
|
|
11
|
-
|
|
12
|
-
var _ColorEditor = _interopRequireDefault(require("./ColorEditor"));
|
|
13
|
-
|
|
14
|
-
var _createPopUp = _interopRequireDefault(require("./createPopUp"));
|
|
15
|
-
|
|
16
|
-
var _FontSizeCommandMenuButton = require("./FontSizeCommandMenuButton");
|
|
17
|
-
|
|
18
|
-
var _FontTypeMarkSpec = require("../FontTypeMarkSpec");
|
|
19
|
-
|
|
20
|
-
var _toCSSLineSpacing = require("./toCSSLineSpacing");
|
|
21
|
-
|
|
22
|
-
var _customStyle = require("../customStyle");
|
|
23
|
-
|
|
24
|
-
var _ParagraphNodeSpec = require("../ParagraphNodeSpec");
|
|
25
|
-
|
|
26
|
-
var _prosemirrorState = require("prosemirror-state");
|
|
27
|
-
|
|
28
|
-
var _Types = require("../Types");
|
|
29
|
-
|
|
30
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
31
|
-
|
|
32
|
-
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); }
|
|
33
|
-
|
|
34
|
-
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; }
|
|
35
|
-
|
|
36
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
37
|
-
|
|
38
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
39
|
-
|
|
40
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
41
|
-
|
|
42
|
-
let customStyles = [];
|
|
43
|
-
const otherStyleSelected = false;
|
|
44
|
-
const editedStyles = []; // Values to show in Linespacing drop-down
|
|
45
|
-
|
|
46
|
-
const LINE_SPACE = ['Single', '1.15', '1.5', 'Double']; // Values to show in numbering/indent drop-down
|
|
47
|
-
|
|
48
|
-
const LEVEL_VALUES = ['None', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10'];
|
|
49
|
-
const SAMPLE_TEXT = `Sample Text Sample Text Sample Text Sample Text Sample Text Sample Text Sample Text Sample.
|
|
50
|
-
Sample Text Sample Text Sample Text Sample Text Sample Text`;
|
|
51
|
-
|
|
52
|
-
class CustomStyleEditor extends React.PureComponent {
|
|
53
|
-
constructor(props) {
|
|
54
|
-
super(props);
|
|
55
|
-
|
|
56
|
-
_defineProperty(this, "_unmounted", false);
|
|
57
|
-
|
|
58
|
-
_defineProperty(this, "_popUp", null);
|
|
59
|
-
|
|
60
|
-
_defineProperty(this, "_cancel", () => {
|
|
61
|
-
// [FS] IRAD-1231 2021-03-02
|
|
62
|
-
// FIX: edited custom styles not applied to the document
|
|
63
|
-
if (3 === this.state.mode) {
|
|
64
|
-
delete this.state.customStyles;
|
|
65
|
-
this.props.close(editedStyles);
|
|
66
|
-
} else {
|
|
67
|
-
this.props.close();
|
|
68
|
-
}
|
|
69
|
-
});
|
|
70
|
-
|
|
71
|
-
_defineProperty(this, "_save", () => {
|
|
72
|
-
delete this.state.otherStyleSelected; // [FS] IRAD-1137 2021-01-15
|
|
73
|
-
// FIX: able to save a custom style name with already exist style name
|
|
74
|
-
|
|
75
|
-
if (0 === this.state.mode && (0, _customStyle.isCustomStyleExists)(this.state.styleName)) {
|
|
76
|
-
const errMsg = document.getElementById('errormsg');
|
|
77
|
-
|
|
78
|
-
if (errMsg && errMsg.style) {
|
|
79
|
-
errMsg.style.display = '';
|
|
80
|
-
} // [FS] IRAD-1176 2021-02-08
|
|
81
|
-
// save the custom styles from Edit all option.
|
|
82
|
-
|
|
83
|
-
} else if (3 === this.state.mode) {
|
|
84
|
-
this.modifyCustomStyle(this.state);
|
|
85
|
-
editedStyles.push(this.state.styleName);
|
|
86
|
-
} else {
|
|
87
|
-
if ('' != this.state.styleName) {
|
|
88
|
-
delete this.state.customStyles;
|
|
89
|
-
this.props.close(this.state);
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
});
|
|
93
|
-
|
|
94
|
-
_defineProperty(this, "handleKeyDown", e => {
|
|
95
|
-
const txtName = document.getElementById('txtName');
|
|
96
|
-
|
|
97
|
-
if (txtName) {
|
|
98
|
-
txtName.focus();
|
|
99
|
-
}
|
|
100
|
-
});
|
|
101
|
-
|
|
102
|
-
this.state = _objectSpread(_objectSpread({}, props), {}, {
|
|
103
|
-
otherStyleSelected,
|
|
104
|
-
customStyles
|
|
105
|
-
}); // set default values for text alignment and boldNumbering checkbox.
|
|
106
|
-
|
|
107
|
-
if (!this.state.styles.align) {
|
|
108
|
-
this.state.styles.align = 'left';
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
if (0 === this.state.mode) {
|
|
112
|
-
this.state.styles.boldNumbering = true;
|
|
113
|
-
this.state.styles.boldSentence = true;
|
|
114
|
-
this.state.styles.nextLineStyleName = _ParagraphNodeSpec.RESERVED_STYLE_NONE;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
if (!this.state.styles.fontName) {
|
|
118
|
-
this.state.styles.fontName = 'Arial';
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
if (!this.state.styles.fontSize) {
|
|
122
|
-
this.state.styles.fontSize = 11;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
this.getCustomStyles(props.editorView.runtime);
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
componentWillUnmount() {
|
|
129
|
-
this._unmounted = true;
|
|
130
|
-
} // To set the selected style values
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
onStyleClick(style, event) {
|
|
134
|
-
let state = null;
|
|
135
|
-
|
|
136
|
-
switch (style) {
|
|
137
|
-
// simple toggles where style matches the key to change.
|
|
138
|
-
case 'strong':
|
|
139
|
-
case 'em':
|
|
140
|
-
case 'strike':
|
|
141
|
-
case 'super':
|
|
142
|
-
case 'underline':
|
|
143
|
-
// copy the current style values, and flip the matching value
|
|
144
|
-
state = {
|
|
145
|
-
styles: _objectSpread({}, this.state.styles)
|
|
146
|
-
};
|
|
147
|
-
state.styles[style] = !state.styles[style];
|
|
148
|
-
break;
|
|
149
|
-
|
|
150
|
-
case 'name':
|
|
151
|
-
if (event) {
|
|
152
|
-
const oldName = this.state.styleName;
|
|
153
|
-
const newName = event.target.value;
|
|
154
|
-
state = {
|
|
155
|
-
styleName: newName,
|
|
156
|
-
styles: null
|
|
157
|
-
};
|
|
158
|
-
state.styles = _objectSpread({}, this.state.styles);
|
|
159
|
-
|
|
160
|
-
if (this.state.styles.nextLineStyleName === oldName) {
|
|
161
|
-
// Update next line style as well.
|
|
162
|
-
state.styles.nextLineStyleName = newName;
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
break;
|
|
167
|
-
|
|
168
|
-
case 'description':
|
|
169
|
-
if (event) {
|
|
170
|
-
state = {
|
|
171
|
-
description: event.target.value
|
|
172
|
-
};
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
break;
|
|
176
|
-
// [FS] IRAD-1497 2021-06-30
|
|
177
|
-
// Not able to set paragraph spacing before and after.
|
|
178
|
-
|
|
179
|
-
case 'before':
|
|
180
|
-
if (event) {
|
|
181
|
-
state = {
|
|
182
|
-
styles: _objectSpread({}, this.state.styles)
|
|
183
|
-
};
|
|
184
|
-
state.styles['paragraphSpacingBefore'] = event.target.value;
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
break;
|
|
188
|
-
|
|
189
|
-
case 'after':
|
|
190
|
-
if (event) {
|
|
191
|
-
state = {
|
|
192
|
-
styles: _objectSpread({}, this.state.styles)
|
|
193
|
-
};
|
|
194
|
-
state.styles['paragraphSpacingAfter'] = event.target.value;
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
break;
|
|
198
|
-
|
|
199
|
-
default:
|
|
200
|
-
break;
|
|
201
|
-
} // save changes and update
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
if (state) {
|
|
205
|
-
this.setState(state, () => this.buildStyle());
|
|
206
|
-
}
|
|
207
|
-
} // Build styles to display the example piece
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
buildStyle() {
|
|
211
|
-
const style = {};
|
|
212
|
-
|
|
213
|
-
if (this.state.styles.fontName) {
|
|
214
|
-
style.fontFamily = this.state.styles.fontName;
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
if (this.state.styles.fontSize) {
|
|
218
|
-
style.fontSize = `${this.state.styles.fontSize}px`;
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
if (this.state.styles.strong) {
|
|
222
|
-
style.fontWeight = 'bold';
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
if (this.state.styles.color) {
|
|
226
|
-
style.color = this.state.styles.color;
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
if (this.state.styles.underline) {
|
|
230
|
-
style.textDecoration = undefined !== style.textDecoration ? `${style.textDecoration}${' underline'}` : 'underline';
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
if (this.state.styles.strike) {
|
|
234
|
-
style.textDecoration = undefined !== style.textDecoration ? `${style.textDecoration}${' line-through'}` : 'line-through';
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
if (this.state.styles.em) {
|
|
238
|
-
style.fontStyle = 'italic';
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
if (this.state.styles.textHighlight) {
|
|
242
|
-
style.backgroundColor = this.state.styles.textHighlight;
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
if (this.state.styles.align) {
|
|
246
|
-
style.textAlign = this.state.styles.align;
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
if (this.state.styles.lineHeight) {
|
|
250
|
-
// [FS] IRAD-1104 2020-11-13
|
|
251
|
-
// Issue fix : Linespacing Double and Single not applied in the sample text paragraph
|
|
252
|
-
style.lineHeight = (0, _toCSSLineSpacing.getLineSpacingValue)(this.state.styles.lineHeight);
|
|
253
|
-
} // [FS] IRAD-1111 2020-12-10
|
|
254
|
-
// Issue fix : Paragraph space before is not applied in the sample text.
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
if (this.state.styles.paragraphSpacingBefore) {
|
|
258
|
-
style.marginTop = `${this.state.styles.paragraphSpacingBefore}px`;
|
|
259
|
-
} // [FS] IRAD-1111 2020-12-10
|
|
260
|
-
// Issue fix : Paragraph space after is not applied in the sample text.
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
if (this.state.styles.paragraphSpacingAfter) {
|
|
264
|
-
style.marginBottom = `${this.state.styles.paragraphSpacingAfter}px`;
|
|
265
|
-
} // [FS] IRAD-1111 2020-12-10
|
|
266
|
-
// Issue fix : Indent is not applied in the sample text.
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
if (!this.state.styles.isLevelbased) {
|
|
270
|
-
if (this.state.styles.indent) {
|
|
271
|
-
style.marginLeft = `${this.state.styles.indent * 2}px`;
|
|
272
|
-
}
|
|
273
|
-
} else {
|
|
274
|
-
const levelValue = document && document.getElementById('levelValue');
|
|
275
|
-
|
|
276
|
-
if ( // this covers null & undefined
|
|
277
|
-
levelValue instanceof window.HTMLSelectElement && levelValue.value) {
|
|
278
|
-
style.marginLeft = `${parseInt(levelValue.value) * 2}px`;
|
|
279
|
-
}
|
|
280
|
-
}
|
|
281
|
-
|
|
282
|
-
const sampleDiv = document.getElementById('sampletextdiv');
|
|
283
|
-
|
|
284
|
-
if (sampleDiv) {
|
|
285
|
-
// [FS] IRAD-1394 2021-06-02
|
|
286
|
-
// Issue: numbering sample not working when select Bold first sentence
|
|
287
|
-
let textSample = SAMPLE_TEXT;
|
|
288
|
-
|
|
289
|
-
if (this.state.styles.boldPartial) {
|
|
290
|
-
if (this.state.styles.boldSentence) {
|
|
291
|
-
const content = SAMPLE_TEXT.split('.');
|
|
292
|
-
sampleDiv.innerHTML = `<strong>${content[0]}</strong> ${content[1]}`;
|
|
293
|
-
} else {
|
|
294
|
-
const content = SAMPLE_TEXT.split(' ');
|
|
295
|
-
sampleDiv.innerHTML = `<strong>${content[0]}</strong> ${SAMPLE_TEXT}`;
|
|
296
|
-
}
|
|
297
|
-
|
|
298
|
-
textSample = sampleDiv.innerHTML; // [FS] IRAD-1473 2021-06-30
|
|
299
|
-
// Style Example not showing properly when select Bold and Bold First Sentence
|
|
300
|
-
|
|
301
|
-
style.fontWeight = 'normal';
|
|
302
|
-
}
|
|
303
|
-
|
|
304
|
-
if (this.state.styles.styleLevel && this.state.styles.hasNumbering) {
|
|
305
|
-
// [FS] IRAD-1137 2021-01-11
|
|
306
|
-
// Issue fix : The Preview text is not showing the numbering in bold after Bold Numbering is enabled.
|
|
307
|
-
const sampleDiv = document.getElementById('sampletextdiv');
|
|
308
|
-
|
|
309
|
-
if (sampleDiv) {
|
|
310
|
-
if (this.state.styles.boldNumbering) {
|
|
311
|
-
sampleDiv.innerHTML = `<strong>${this.getNumberingLevel(this.state.styles.styleLevel)}</strong>${textSample}`;
|
|
312
|
-
} else {
|
|
313
|
-
sampleDiv.innerText = `${this.getNumberingLevel(this.state.styles.styleLevel)}${textSample}`;
|
|
314
|
-
}
|
|
315
|
-
}
|
|
316
|
-
} else {
|
|
317
|
-
sampleDiv.innerText = `${SAMPLE_TEXT}`;
|
|
318
|
-
sampleDiv.innerHTML = textSample;
|
|
319
|
-
}
|
|
320
|
-
}
|
|
321
|
-
|
|
322
|
-
return style;
|
|
323
|
-
} // [FS] IRAD-1111 2020-12-10
|
|
324
|
-
// get the numbering corresponding to the level
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
getNumberingLevel(level) {
|
|
328
|
-
let levelStyle = '';
|
|
329
|
-
|
|
330
|
-
for (let i = 0; i < parseInt(level); i++) {
|
|
331
|
-
levelStyle = levelStyle + '1.';
|
|
332
|
-
}
|
|
333
|
-
|
|
334
|
-
return levelStyle + ' ';
|
|
335
|
-
} // handles font name change
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
onFontNameChange(e) {
|
|
339
|
-
this.setState({
|
|
340
|
-
styles: _objectSpread(_objectSpread({}, this.state.styles), {}, {
|
|
341
|
-
fontName: e.target.value
|
|
342
|
-
})
|
|
343
|
-
});
|
|
344
|
-
} // handles indent radio button event
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
onIndentRadioChanged(e) {
|
|
348
|
-
if ('0' == e.target.value) {
|
|
349
|
-
this.setState({
|
|
350
|
-
styles: _objectSpread(_objectSpread({}, this.state.styles), {}, {
|
|
351
|
-
isLevelbased: true
|
|
352
|
-
})
|
|
353
|
-
});
|
|
354
|
-
} else {
|
|
355
|
-
this.setState({
|
|
356
|
-
styles: _objectSpread(_objectSpread({}, this.state.styles), {}, {
|
|
357
|
-
isLevelbased: false
|
|
358
|
-
})
|
|
359
|
-
});
|
|
360
|
-
}
|
|
361
|
-
} // handles scentece bold event
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
onScentenceRadioChanged(e) {
|
|
365
|
-
if ('0' == e.target.value) {
|
|
366
|
-
this.setState({
|
|
367
|
-
styles: _objectSpread(_objectSpread({}, this.state.styles), {}, {
|
|
368
|
-
boldSentence: true
|
|
369
|
-
})
|
|
370
|
-
});
|
|
371
|
-
} else {
|
|
372
|
-
this.setState({
|
|
373
|
-
styles: _objectSpread(_objectSpread({}, this.state.styles), {}, {
|
|
374
|
-
boldSentence: false
|
|
375
|
-
})
|
|
376
|
-
});
|
|
377
|
-
}
|
|
378
|
-
} // handles font size change
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
onFontSizeChange(e) {
|
|
382
|
-
this.setState({
|
|
383
|
-
styles: _objectSpread(_objectSpread({}, this.state.styles), {}, {
|
|
384
|
-
fontSize: e.target.value
|
|
385
|
-
})
|
|
386
|
-
});
|
|
387
|
-
} // handles line space change
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
onLineSpaceChange(e) {
|
|
391
|
-
this.setState({
|
|
392
|
-
styles: _objectSpread(_objectSpread({}, this.state.styles), {}, {
|
|
393
|
-
lineHeight: e.target.value
|
|
394
|
-
})
|
|
395
|
-
});
|
|
396
|
-
} // handles Level drop down change
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
onLevelChange(e) {
|
|
400
|
-
const val = _ParagraphNodeSpec.RESERVED_STYLE_NONE === e.target.value ? null : e.target.value;
|
|
401
|
-
this.setState({
|
|
402
|
-
styles: _objectSpread(_objectSpread({}, this.state.styles), {}, {
|
|
403
|
-
styleLevel: val
|
|
404
|
-
})
|
|
405
|
-
});
|
|
406
|
-
} // handles indent dropdown change
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
onIndentChange(e) {
|
|
410
|
-
this.setState({
|
|
411
|
-
styles: _objectSpread(_objectSpread({}, this.state.styles), {}, {
|
|
412
|
-
indent: 'None' === e.target.value ? 0 : e.target.value
|
|
413
|
-
})
|
|
414
|
-
});
|
|
415
|
-
} // [FS] IRAD-1201 2021-02-18
|
|
416
|
-
// set the nextLineStyle to JSON on style selection changed
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
onOtherStyleSelectionChanged(e) {
|
|
420
|
-
if (this.state.otherStyleSelected) {
|
|
421
|
-
this.setState({
|
|
422
|
-
styles: _objectSpread(_objectSpread({}, this.state.styles), {}, {
|
|
423
|
-
nextLineStyleName: e.target.value
|
|
424
|
-
})
|
|
425
|
-
});
|
|
426
|
-
}
|
|
427
|
-
} // [FS] IRAD-1201 2021-02-18
|
|
428
|
-
// set the nextLineStyle to JSON according to the selected option
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
onNextLineStyleSelected(selectedOption) {
|
|
432
|
-
const hiddenDiv = document.getElementById('nextStyle');
|
|
433
|
-
|
|
434
|
-
if (hiddenDiv) {
|
|
435
|
-
hiddenDiv.style.display = 'none';
|
|
436
|
-
}
|
|
437
|
-
|
|
438
|
-
if (0 === selectedOption) {
|
|
439
|
-
this.setState({
|
|
440
|
-
otherStyleSelected: false
|
|
441
|
-
});
|
|
442
|
-
this.setState({
|
|
443
|
-
styles: _objectSpread(_objectSpread({}, this.state.styles), {}, {
|
|
444
|
-
nextLineStyleName: 'None'
|
|
445
|
-
})
|
|
446
|
-
});
|
|
447
|
-
} else if (1 === selectedOption) {
|
|
448
|
-
this.setState({
|
|
449
|
-
otherStyleSelected: false
|
|
450
|
-
});
|
|
451
|
-
this.setState({
|
|
452
|
-
styles: _objectSpread(_objectSpread({}, this.state.styles), {}, {
|
|
453
|
-
nextLineStyleName: this.state.styleName
|
|
454
|
-
})
|
|
455
|
-
});
|
|
456
|
-
} else {
|
|
457
|
-
if (hiddenDiv) {
|
|
458
|
-
hiddenDiv.style.display = 'block';
|
|
459
|
-
}
|
|
460
|
-
|
|
461
|
-
const selectedStyle = document.getElementById('nextStyleValue');
|
|
462
|
-
|
|
463
|
-
if (selectedStyle instanceof window.HTMLSelectElement) {
|
|
464
|
-
this.setState({
|
|
465
|
-
otherStyleSelected: true,
|
|
466
|
-
styles: _objectSpread(_objectSpread({}, this.state.styles), {}, {
|
|
467
|
-
nextLineStyleName: selectedStyle.options[selectedStyle.selectedIndex].text
|
|
468
|
-
})
|
|
469
|
-
});
|
|
470
|
-
}
|
|
471
|
-
}
|
|
472
|
-
} // [FS] IRAD-1127 2020-12-31
|
|
473
|
-
// to populate the selected custom styles.
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
onSelectCustomStyle(e) {
|
|
477
|
-
if (null !== customStyles) {
|
|
478
|
-
const value = this.state.customStyles.find(u => u.styleName === e.target.value); // FIX: not able to modify and save the populated style
|
|
479
|
-
|
|
480
|
-
value.mode = 3;
|
|
481
|
-
this.state = _objectSpread({}, value);
|
|
482
|
-
this.setState(this.state);
|
|
483
|
-
this.setNextLineStyle(this.state.styles.nextLineStyleName);
|
|
484
|
-
}
|
|
485
|
-
} // shows color dialog based on input text-color/text-heighlight
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
showColorDialog(isTextColor, event) {
|
|
489
|
-
const anchor = event ? event.currentTarget : null;
|
|
490
|
-
const hex = null;
|
|
491
|
-
this._popUp = (0, _createPopUp.default)(_ColorEditor.default, {
|
|
492
|
-
hex
|
|
493
|
-
}, {
|
|
494
|
-
anchor,
|
|
495
|
-
autoDismiss: true,
|
|
496
|
-
IsChildDialog: true,
|
|
497
|
-
onClose: val => {
|
|
498
|
-
if (this._popUp) {
|
|
499
|
-
this._popUp = null;
|
|
500
|
-
|
|
501
|
-
if (undefined !== val) {
|
|
502
|
-
if (isTextColor) {
|
|
503
|
-
this.setState({
|
|
504
|
-
styles: _objectSpread(_objectSpread({}, this.state.styles), {}, {
|
|
505
|
-
color: val
|
|
506
|
-
})
|
|
507
|
-
});
|
|
508
|
-
} else {
|
|
509
|
-
this.setState({
|
|
510
|
-
styles: _objectSpread(_objectSpread({}, this.state.styles), {}, {
|
|
511
|
-
textHighlight: val
|
|
512
|
-
})
|
|
513
|
-
});
|
|
514
|
-
}
|
|
515
|
-
}
|
|
516
|
-
}
|
|
517
|
-
}
|
|
518
|
-
});
|
|
519
|
-
} //handles the option button click, close the popup with selected values
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
onAlignButtonClick(val) {
|
|
523
|
-
this.setState({
|
|
524
|
-
styles: _objectSpread(_objectSpread({}, this.state.styles), {}, {
|
|
525
|
-
align: val
|
|
526
|
-
})
|
|
527
|
-
});
|
|
528
|
-
}
|
|
529
|
-
|
|
530
|
-
handleNumbering(val) {
|
|
531
|
-
// if user select numbering, then always set nextLineStyle as continues this style.
|
|
532
|
-
// [FS] IRAD-1221 2021-03-01
|
|
533
|
-
// Issue fix: The next line style not switch back to 'None' when disable the numbering.
|
|
534
|
-
this.setState({
|
|
535
|
-
styles: _objectSpread(_objectSpread({}, this.state.styles), {}, {
|
|
536
|
-
hasNumbering: val.target.checked,
|
|
537
|
-
nextLineStyleName: val.target.checked ? this.state.styleName : _ParagraphNodeSpec.RESERVED_STYLE_NONE
|
|
538
|
-
})
|
|
539
|
-
});
|
|
540
|
-
} // handles the boldNumbering checkbox actions
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
handleBoldNumbering(val) {
|
|
544
|
-
this.setState({
|
|
545
|
-
styles: _objectSpread(_objectSpread({}, this.state.styles), {}, {
|
|
546
|
-
boldNumbering: val.target.checked
|
|
547
|
-
})
|
|
548
|
-
});
|
|
549
|
-
} // handles the boldNumbering checkbox actions
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
handleBoldPartial(val) {
|
|
553
|
-
this.setState({
|
|
554
|
-
styles: _objectSpread(_objectSpread({}, this.state.styles), {}, {
|
|
555
|
-
boldPartial: val.target.checked
|
|
556
|
-
})
|
|
557
|
-
}); // this.setState({ styles: { ...this.state.styles, boldSentence: val.target.checked ? true : false } });
|
|
558
|
-
} // [FS] IRAD-1201 2021-02-17
|
|
559
|
-
// to check if the "select style" option selected by user
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
selectStyleCheckboxState() {
|
|
563
|
-
let chceked = false;
|
|
564
|
-
|
|
565
|
-
if (this.state.styles.nextLineStyleName) {
|
|
566
|
-
chceked = this.state.styles.nextLineStyleName !== 'None' && this.state.styles.nextLineStyleName !== this.state.styleName;
|
|
567
|
-
}
|
|
568
|
-
|
|
569
|
-
return chceked;
|
|
570
|
-
}
|
|
571
|
-
|
|
572
|
-
componentDidMount() {
|
|
573
|
-
const acc = document.getElementsByClassName('licit-accordion');
|
|
574
|
-
let i;
|
|
575
|
-
|
|
576
|
-
for (i = 0; i < acc.length; i++) {
|
|
577
|
-
acc[i].addEventListener('click', function () {
|
|
578
|
-
this.classList.toggle('accactive');
|
|
579
|
-
const panel = this.nextElementSibling;
|
|
580
|
-
|
|
581
|
-
if (panel.style.maxHeight) {
|
|
582
|
-
panel.style.maxHeight = null;
|
|
583
|
-
} else {
|
|
584
|
-
panel.style.maxHeight = panel.scrollHeight + 'px';
|
|
585
|
-
}
|
|
586
|
-
});
|
|
587
|
-
}
|
|
588
|
-
|
|
589
|
-
const mp = document.getElementsByClassName('panel')[0];
|
|
590
|
-
mp.style.maxHeight = mp.scrollHeight + 'px';
|
|
591
|
-
const mp1 = document.getElementsByClassName('panel1')[0];
|
|
592
|
-
mp1.style.maxHeight = mp1.scrollHeight + 'px';
|
|
593
|
-
const mp2 = document.getElementsByClassName('panel2')[0];
|
|
594
|
-
mp2.style.maxHeight = mp2.scrollHeight + 'px';
|
|
595
|
-
const mp3 = document.getElementsByClassName('panel3')[0];
|
|
596
|
-
mp3.style.maxHeight = mp3.scrollHeight + 'px';
|
|
597
|
-
this.setNextLineStyle(this.state.styles.nextLineStyleName); // [FS] IRAD-1153 2021-02-25
|
|
598
|
-
// Numbering level not showing in Preview text when modify style
|
|
599
|
-
|
|
600
|
-
if (1 == this.props.mode && this.state.styles.styleLevel && this.state.styles.hasNumbering) {
|
|
601
|
-
this.buildStyle();
|
|
602
|
-
}
|
|
603
|
-
}
|
|
604
|
-
|
|
605
|
-
render() {
|
|
606
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
607
|
-
className: "customedit-div"
|
|
608
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
609
|
-
className: "customedit-head"
|
|
610
|
-
}, /*#__PURE__*/React.createElement("span", null, this.state.mode == 0 ? 'Create Style' : 'Edit Style')), /*#__PURE__*/React.createElement("div", {
|
|
611
|
-
className: "customedit-body"
|
|
612
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
613
|
-
className: "sectiondiv"
|
|
614
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
615
|
-
style: 3 > this.props.mode ? {
|
|
616
|
-
display: 'none'
|
|
617
|
-
} : {
|
|
618
|
-
display: 'block'
|
|
619
|
-
}
|
|
620
|
-
}, /*#__PURE__*/React.createElement("p", {
|
|
621
|
-
className: "formp"
|
|
622
|
-
}, "Styles:"), /*#__PURE__*/React.createElement("select", {
|
|
623
|
-
className: "stylenameinput fontstyle",
|
|
624
|
-
defaultValue: 'DEFAULT',
|
|
625
|
-
onChange: this.onSelectCustomStyle.bind(this),
|
|
626
|
-
style: {
|
|
627
|
-
height: '24px'
|
|
628
|
-
}
|
|
629
|
-
}, /*#__PURE__*/React.createElement("option", {
|
|
630
|
-
disabled: true,
|
|
631
|
-
value: "DEFAULT"
|
|
632
|
-
}, ' ', "-- select a style --", ' '), this.state.customStyles.map(style => /*#__PURE__*/React.createElement("option", {
|
|
633
|
-
key: style.styleName,
|
|
634
|
-
value: style.styleName
|
|
635
|
-
}, style.styleName)))), /*#__PURE__*/React.createElement("p", {
|
|
636
|
-
className: "formp"
|
|
637
|
-
}, "Style Name:", ' ', /*#__PURE__*/React.createElement("span", {
|
|
638
|
-
id: "errormsg",
|
|
639
|
-
style: {
|
|
640
|
-
display: 'none',
|
|
641
|
-
color: 'red'
|
|
642
|
-
}
|
|
643
|
-
}, (0, _customStyle.isCustomStyleExists)(this.state.styleName) ? 'Style name already exists' : '')), /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement("input", {
|
|
644
|
-
autoFocus: true,
|
|
645
|
-
className: "stylenameinput fontstyle",
|
|
646
|
-
disabled: this.state.mode == 1 || this.state.mode == 3 ? true : false,
|
|
647
|
-
id: "txtName",
|
|
648
|
-
key: "name",
|
|
649
|
-
onChange: this.onStyleClick.bind(this, 'name'),
|
|
650
|
-
type: "text",
|
|
651
|
-
value: this.state.styleName || ''
|
|
652
|
-
})), /*#__PURE__*/React.createElement("p", {
|
|
653
|
-
className: "formp"
|
|
654
|
-
}, "Description:"), /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement("input", {
|
|
655
|
-
className: "stylenameinput fontstyle",
|
|
656
|
-
key: "description",
|
|
657
|
-
onChange: this.onStyleClick.bind(this, 'description'),
|
|
658
|
-
type: "text",
|
|
659
|
-
value: this.state.description || ''
|
|
660
|
-
})), /*#__PURE__*/React.createElement("p", {
|
|
661
|
-
className: "formp"
|
|
662
|
-
}, "Preview:"), /*#__PURE__*/React.createElement("div", {
|
|
663
|
-
className: "textareadiv",
|
|
664
|
-
name: "body",
|
|
665
|
-
style: 3 == this.props.mode ? {
|
|
666
|
-
height: '164px'
|
|
667
|
-
} : {
|
|
668
|
-
height: '215px'
|
|
669
|
-
}
|
|
670
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
671
|
-
className: "sampletext"
|
|
672
|
-
}, "Paragraph Paragraph Paragraph Paragraph Paragraph Paragraph Paragraph Paragraph Paragraph Paragraph"), /*#__PURE__*/React.createElement("div", {
|
|
673
|
-
className: this.state.styles.super ? 'hide-sampletext' : 'visible-sampletext',
|
|
674
|
-
id: "sampletextdiv",
|
|
675
|
-
style: this.buildStyle()
|
|
676
|
-
}, SAMPLE_TEXT), /*#__PURE__*/React.createElement("sup", {
|
|
677
|
-
className: this.state.styles.super ? 'visible-sampletext' : 'hide-sampletext',
|
|
678
|
-
id: "mo-sup",
|
|
679
|
-
style: this.buildStyle()
|
|
680
|
-
}, SAMPLE_TEXT), /*#__PURE__*/React.createElement("div", {
|
|
681
|
-
className: "sampletext"
|
|
682
|
-
}, "Paragraph Paragraph Paragraph Paragraph Paragraph Paragraph Paragraph Paragraph Paragraph Paragraph Paragraph Paragraph Paragraph Paragraph Paragraph Paragraph Paragraph Paragraph Paragraph Paragraph"))), /*#__PURE__*/React.createElement("div", {
|
|
683
|
-
className: "sectiondiv editorsection",
|
|
684
|
-
style: this.disableRename()
|
|
685
|
-
}, /*#__PURE__*/React.createElement("p", {
|
|
686
|
-
className: "formp"
|
|
687
|
-
}, "Style Attributes:"), /*#__PURE__*/React.createElement("div", {
|
|
688
|
-
style: {
|
|
689
|
-
height: '329px',
|
|
690
|
-
overflow: 'hidden auto',
|
|
691
|
-
overflowX: 'hidden',
|
|
692
|
-
border: '1px solid'
|
|
693
|
-
}
|
|
694
|
-
}, /*#__PURE__*/React.createElement("button", {
|
|
695
|
-
className: "licit-accordion accactive",
|
|
696
|
-
id: "accordion1"
|
|
697
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
698
|
-
className: "indentdiv"
|
|
699
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
700
|
-
className: "iconspan czi-icon text_format",
|
|
701
|
-
style: {
|
|
702
|
-
marginTop: '1px'
|
|
703
|
-
}
|
|
704
|
-
}, "text_format"), /*#__PURE__*/React.createElement("label", {
|
|
705
|
-
style: {
|
|
706
|
-
marginLeft: '-10px',
|
|
707
|
-
marginTop: '2px',
|
|
708
|
-
color: '#444'
|
|
709
|
-
}
|
|
710
|
-
}, "Font"))), /*#__PURE__*/React.createElement("div", {
|
|
711
|
-
className: "panel"
|
|
712
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
713
|
-
className: "sectiondiv"
|
|
714
|
-
}, /*#__PURE__*/React.createElement("select", {
|
|
715
|
-
className: "fonttype fontstyle",
|
|
716
|
-
onChange: this.onFontNameChange.bind(this),
|
|
717
|
-
value: this.state.styles.fontName || 'Arial'
|
|
718
|
-
}, _FontTypeMarkSpec.FONT_TYPE_NAMES.map(value => /*#__PURE__*/React.createElement("option", {
|
|
719
|
-
key: value,
|
|
720
|
-
value: value
|
|
721
|
-
}, value))), /*#__PURE__*/React.createElement("select", {
|
|
722
|
-
className: "fontsize fontstyle",
|
|
723
|
-
onChange: this.onFontSizeChange.bind(this),
|
|
724
|
-
value: this.state.styles.fontSize || 11
|
|
725
|
-
}, _FontSizeCommandMenuButton.FONT_PT_SIZES.map(value => /*#__PURE__*/React.createElement("option", {
|
|
726
|
-
key: value,
|
|
727
|
-
value: value
|
|
728
|
-
}, value)))), /*#__PURE__*/React.createElement("div", {
|
|
729
|
-
className: "font-buttons"
|
|
730
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
731
|
-
"aria-label": " Bold",
|
|
732
|
-
className: "czi-tooltip-surface markbutton-container",
|
|
733
|
-
"data-tooltip": " Bold",
|
|
734
|
-
id: "86ba3aa0-ff11-11ea-930a-95c69ca4f97f",
|
|
735
|
-
onClick: this.onStyleClick.bind(this, 'strong'),
|
|
736
|
-
role: "tooltip",
|
|
737
|
-
style: {
|
|
738
|
-
marginLeft: '5px',
|
|
739
|
-
marginRight: '5px'
|
|
740
|
-
}
|
|
741
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
742
|
-
"aria-disabled": "false",
|
|
743
|
-
"aria-pressed": "false",
|
|
744
|
-
className: this.state.styles.strong ? 'czi-custom-button use-icon active markbuttons' : 'czi-custom-button use-icon markbuttons',
|
|
745
|
-
role: "button"
|
|
746
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
747
|
-
className: "iconspan czi-icon format_bold editor-markbuttons"
|
|
748
|
-
}, "format_bold"))), /*#__PURE__*/React.createElement("span", {
|
|
749
|
-
"aria-label": " Italic",
|
|
750
|
-
className: "czi-tooltip-surface fontstyle markbutton-container",
|
|
751
|
-
"data-tooltip": " Italic",
|
|
752
|
-
id: "86ba61b0-ff11-11ea-930a-95c69ca4f97f",
|
|
753
|
-
onClick: this.onStyleClick.bind(this, 'em'),
|
|
754
|
-
role: "tooltip"
|
|
755
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
756
|
-
"aria-disabled": "false",
|
|
757
|
-
"aria-pressed": "false",
|
|
758
|
-
className: this.state.styles.em ? 'czi-custom-button use-icon active markbuttons' : 'czi-custom-button use-icon markbuttons',
|
|
759
|
-
role: "button"
|
|
760
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
761
|
-
className: "iconspan czi-icon format_italic editor-markbuttons"
|
|
762
|
-
}, "format_italic"), /*#__PURE__*/React.createElement("span", null, " "))), /*#__PURE__*/React.createElement("span", {
|
|
763
|
-
"aria-label": " Underline",
|
|
764
|
-
className: "czi-tooltip-surface fontstyle markbutton-container",
|
|
765
|
-
"data-tooltip": " Underline",
|
|
766
|
-
id: "86ba88c0-ff11-11ea-930a-95c69ca4f97f",
|
|
767
|
-
onClick: this.onStyleClick.bind(this, 'underline'),
|
|
768
|
-
role: "tooltip"
|
|
769
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
770
|
-
"aria-disabled": "false",
|
|
771
|
-
"aria-pressed": "false",
|
|
772
|
-
className: this.state.styles.underline ? 'czi-custom-button use-icon active markbuttons' : 'czi-custom-button use-icon markbuttons',
|
|
773
|
-
role: "button"
|
|
774
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
775
|
-
className: "iconspan czi-icon format_underline editor-markbuttons"
|
|
776
|
-
}, "format_underline"), /*#__PURE__*/React.createElement("span", null, " "))), /*#__PURE__*/React.createElement("span", {
|
|
777
|
-
"aria-label": " Text color",
|
|
778
|
-
className: "czi-tooltip-surface fontstyle markbutton-container",
|
|
779
|
-
"data-tooltip": " Text color",
|
|
780
|
-
id: "86bad6e1-ff11-11ea-930a-95c69ca4f97f",
|
|
781
|
-
onClick: this.showColorDialog.bind(this, true),
|
|
782
|
-
role: "tooltip"
|
|
783
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
784
|
-
"aria-disabled": "false",
|
|
785
|
-
"aria-pressed": "false",
|
|
786
|
-
className: "czi-custom-button use-icon markbuttons",
|
|
787
|
-
role: "button"
|
|
788
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
789
|
-
className: "iconspan czi-icon format_color_text editor-markbuttons",
|
|
790
|
-
style: {
|
|
791
|
-
color: this.state.styles.color !== 'rgba(0,0,0,0)' ? this.state.styles.color : '#666'
|
|
792
|
-
}
|
|
793
|
-
}, "format_color_text"), /*#__PURE__*/React.createElement("span", null, " "))), /*#__PURE__*/React.createElement("span", {
|
|
794
|
-
"aria-label": " Highlight color",
|
|
795
|
-
className: "czi-tooltip-surface fontstyle markbutton-container",
|
|
796
|
-
"data-tooltip": " Highlight color",
|
|
797
|
-
id: "86bafdf0-ff11-11ea-930a-95c69ca4f97f",
|
|
798
|
-
onClick: this.showColorDialog.bind(this, false),
|
|
799
|
-
role: "tooltip"
|
|
800
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
801
|
-
"aria-disabled": "false",
|
|
802
|
-
"aria-pressed": "false",
|
|
803
|
-
className: "czi-custom-button use-icon markbuttons",
|
|
804
|
-
role: "button"
|
|
805
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
806
|
-
className: " iconspan czi-icon border_color editor-markbuttons",
|
|
807
|
-
style: {
|
|
808
|
-
color: this.state.styles.textHighlight !== 'rgba(0,0,0,0)' ? this.state.styles.textHighlight : '#666'
|
|
809
|
-
}
|
|
810
|
-
}, "border_color"), /*#__PURE__*/React.createElement("span", null, " ")))), /*#__PURE__*/React.createElement("div", {
|
|
811
|
-
className: "formp hierarchydiv"
|
|
812
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
813
|
-
style: {
|
|
814
|
-
float: 'left'
|
|
815
|
-
}
|
|
816
|
-
}, /*#__PURE__*/React.createElement("label", null, /*#__PURE__*/React.createElement("input", {
|
|
817
|
-
checked: this.state.styles.boldPartial,
|
|
818
|
-
onChange: this.handleBoldPartial.bind(this),
|
|
819
|
-
type: "checkbox"
|
|
820
|
-
}), "Bold the")), /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement("input", {
|
|
821
|
-
checked: this.state.styles.boldSentence,
|
|
822
|
-
disabled: this.state.styles.boldPartial ? false : true,
|
|
823
|
-
name: "boldscentence",
|
|
824
|
-
onChange: this.onScentenceRadioChanged.bind(this),
|
|
825
|
-
style: {
|
|
826
|
-
marginLeft: '20px'
|
|
827
|
-
},
|
|
828
|
-
type: "radio",
|
|
829
|
-
value: "0"
|
|
830
|
-
}), /*#__PURE__*/React.createElement("label", {
|
|
831
|
-
style: {
|
|
832
|
-
marginLeft: '4px',
|
|
833
|
-
marginTop: '3px',
|
|
834
|
-
marginBottom: '0'
|
|
835
|
-
}
|
|
836
|
-
}, "First Sentence"), /*#__PURE__*/React.createElement("input", {
|
|
837
|
-
checked: !this.state.styles.boldSentence,
|
|
838
|
-
disabled: this.state.styles.boldPartial ? false : true,
|
|
839
|
-
name: "boldscentence",
|
|
840
|
-
onChange: this.onScentenceRadioChanged.bind(this),
|
|
841
|
-
style: {
|
|
842
|
-
marginLeft: '20px'
|
|
843
|
-
},
|
|
844
|
-
type: "radio",
|
|
845
|
-
value: "1"
|
|
846
|
-
}), /*#__PURE__*/React.createElement("label", {
|
|
847
|
-
style: {
|
|
848
|
-
marginLeft: '4px',
|
|
849
|
-
marginTop: '3px',
|
|
850
|
-
marginBottom: '0'
|
|
851
|
-
}
|
|
852
|
-
}, "First Word")))), /*#__PURE__*/React.createElement("button", {
|
|
853
|
-
className: "licit-accordion accactive"
|
|
854
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
855
|
-
className: "indentdiv"
|
|
856
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
857
|
-
className: "iconspan czi-icon format_textdirection_l_to_r",
|
|
858
|
-
style: {
|
|
859
|
-
marginTop: '1px'
|
|
860
|
-
}
|
|
861
|
-
}, "format_textdirection_l_to_r"), /*#__PURE__*/React.createElement("label", {
|
|
862
|
-
style: {
|
|
863
|
-
marginLeft: '-10px',
|
|
864
|
-
marginTop: '2px',
|
|
865
|
-
color: '#444'
|
|
866
|
-
}
|
|
867
|
-
}, "Paragraph"))), /*#__PURE__*/React.createElement("div", {
|
|
868
|
-
className: "panel1"
|
|
869
|
-
}, /*#__PURE__*/React.createElement("p", {
|
|
870
|
-
className: "formp"
|
|
871
|
-
}, "Alignment:"), /*#__PURE__*/React.createElement("div", {
|
|
872
|
-
className: "czi-custom-buttons"
|
|
873
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
874
|
-
"aria-label": " Align Left",
|
|
875
|
-
className: "czi-tooltip-surface",
|
|
876
|
-
"data-tooltip": " Align Left",
|
|
877
|
-
id: "86ba3aa0-ff11-11ea-930a-95c69ca4f97f",
|
|
878
|
-
role: "tooltip"
|
|
879
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
880
|
-
"aria-disabled": "false",
|
|
881
|
-
"aria-pressed": "false",
|
|
882
|
-
className: this.state.styles.align == 'left' ? 'czi-custom-button use-icon activealignbuttons' : 'czi-custom-button alignbuttons',
|
|
883
|
-
onClick: this.onAlignButtonClick.bind(this, 'left'),
|
|
884
|
-
role: "button"
|
|
885
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
886
|
-
className: "iconspan czi-icon format_align_left"
|
|
887
|
-
}, "format_align_left"))), /*#__PURE__*/React.createElement("span", {
|
|
888
|
-
"aria-label": " Align Center",
|
|
889
|
-
className: "czi-tooltip-surface alignbuttons",
|
|
890
|
-
"data-tooltip": " Align Center",
|
|
891
|
-
id: "86ba61b0-ff11-11ea-930a-95c69ca4f97f",
|
|
892
|
-
role: "tooltip"
|
|
893
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
894
|
-
"aria-disabled": "false",
|
|
895
|
-
"aria-pressed": "false",
|
|
896
|
-
className: this.state.styles.align == 'center' ? 'czi-custom-button use-icon activealignbuttons' : 'czi-custom-button alignbuttons',
|
|
897
|
-
onClick: this.onAlignButtonClick.bind(this, 'center'),
|
|
898
|
-
role: "button"
|
|
899
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
900
|
-
className: "iconspan czi-icon format_align_center"
|
|
901
|
-
}, "format_align_center"))), /*#__PURE__*/React.createElement("span", {
|
|
902
|
-
"aria-label": " Align Right",
|
|
903
|
-
className: "czi-tooltip-surface alignbuttons",
|
|
904
|
-
"data-tooltip": " Align Right",
|
|
905
|
-
id: "86ba88c0-ff11-11ea-930a-95c69ca4f97f",
|
|
906
|
-
role: "tooltip"
|
|
907
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
908
|
-
"aria-disabled": "false",
|
|
909
|
-
"aria-pressed": "false",
|
|
910
|
-
className: this.state.styles.align == 'right' ? 'czi-custom-button use-icon activealignbuttons' : 'czi-custom-button alignbuttons',
|
|
911
|
-
onClick: this.onAlignButtonClick.bind(this, 'right'),
|
|
912
|
-
role: "button"
|
|
913
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
914
|
-
className: "iconspan czi-icon format_align_right"
|
|
915
|
-
}, "format_align_right"))), /*#__PURE__*/React.createElement("span", {
|
|
916
|
-
"aria-label": " Justify",
|
|
917
|
-
className: "czi-tooltip-surface alignbuttons",
|
|
918
|
-
"data-tooltip": " Justify",
|
|
919
|
-
id: "86baafd0-ff11-11ea-930a-95c69ca4f97f",
|
|
920
|
-
role: "tooltip"
|
|
921
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
922
|
-
"aria-disabled": "false",
|
|
923
|
-
"aria-pressed": "false",
|
|
924
|
-
className: this.state.styles.align == 'justify' ? 'czi-custom-button use-icon activealignbuttons' : 'czi-custom-button alignbuttons',
|
|
925
|
-
onClick: this.onAlignButtonClick.bind(this, 'justify'),
|
|
926
|
-
role: "button"
|
|
927
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
928
|
-
className: "iconspan czi-icon format_align_justify"
|
|
929
|
-
}, "format_align_justify")))), /*#__PURE__*/React.createElement("p", {
|
|
930
|
-
className: "formp"
|
|
931
|
-
}, "Line Spacing:"), /*#__PURE__*/React.createElement("select", {
|
|
932
|
-
className: "linespacing fontstyle",
|
|
933
|
-
onChange: this.onLineSpaceChange.bind(this),
|
|
934
|
-
value: this.state.styles.lineHeight || ''
|
|
935
|
-
}, LINE_SPACE.map(value => /*#__PURE__*/React.createElement("option", {
|
|
936
|
-
key: value,
|
|
937
|
-
value: value
|
|
938
|
-
}, value))), /*#__PURE__*/React.createElement("p", {
|
|
939
|
-
className: "formp"
|
|
940
|
-
}, "Paragraph Spacing:"), /*#__PURE__*/React.createElement("div", {
|
|
941
|
-
className: "spacingdiv"
|
|
942
|
-
}, /*#__PURE__*/React.createElement("label", null, "Before: "), /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement("input", {
|
|
943
|
-
className: "spacinginput fontstyle",
|
|
944
|
-
key: "before",
|
|
945
|
-
onChange: this.onStyleClick.bind(this, 'before'),
|
|
946
|
-
type: "text",
|
|
947
|
-
value: this.state.styles.paragraphSpacingBefore || ''
|
|
948
|
-
})), /*#__PURE__*/React.createElement("label", {
|
|
949
|
-
style: {
|
|
950
|
-
marginLeft: '3px'
|
|
951
|
-
}
|
|
952
|
-
}, " pts"), /*#__PURE__*/React.createElement("label", {
|
|
953
|
-
style: {
|
|
954
|
-
marginLeft: '23px'
|
|
955
|
-
}
|
|
956
|
-
}, "After: "), /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement("input", {
|
|
957
|
-
className: "spacinginput fontstyle",
|
|
958
|
-
key: "after",
|
|
959
|
-
onChange: this.onStyleClick.bind(this, 'after'),
|
|
960
|
-
type: "text",
|
|
961
|
-
value: this.state.styles.paragraphSpacingAfter || ''
|
|
962
|
-
})), /*#__PURE__*/React.createElement("label", {
|
|
963
|
-
style: {
|
|
964
|
-
marginLeft: '3px'
|
|
965
|
-
}
|
|
966
|
-
}, "pts"))), /*#__PURE__*/React.createElement("button", {
|
|
967
|
-
className: "licit-accordion accactive"
|
|
968
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
969
|
-
className: "indentdiv"
|
|
970
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
971
|
-
className: "iconspan czi-icon account_tree"
|
|
972
|
-
}, "account_tree"), /*#__PURE__*/React.createElement("label", {
|
|
973
|
-
style: {
|
|
974
|
-
marginLeft: '-7px',
|
|
975
|
-
marginTop: '2px',
|
|
976
|
-
color: '#444'
|
|
977
|
-
}
|
|
978
|
-
}, "Hierarchy"))), /*#__PURE__*/React.createElement("div", {
|
|
979
|
-
className: "panel2 formp"
|
|
980
|
-
}, /*#__PURE__*/React.createElement("p", {
|
|
981
|
-
className: "formp"
|
|
982
|
-
}, "Level:"), /*#__PURE__*/React.createElement("div", {
|
|
983
|
-
className: "hierarchydiv"
|
|
984
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
985
|
-
style: {
|
|
986
|
-
float: 'left',
|
|
987
|
-
marginTop: '8px'
|
|
988
|
-
}
|
|
989
|
-
}, /*#__PURE__*/React.createElement("select", {
|
|
990
|
-
className: "leveltype fontstyle",
|
|
991
|
-
id: "levelValue",
|
|
992
|
-
onChange: this.onLevelChange.bind(this),
|
|
993
|
-
value: this.state.styles.styleLevel || ''
|
|
994
|
-
}, LEVEL_VALUES.map(value => /*#__PURE__*/React.createElement("option", {
|
|
995
|
-
key: value,
|
|
996
|
-
value: value
|
|
997
|
-
}, value)))), /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement("label", null, /*#__PURE__*/React.createElement("input", {
|
|
998
|
-
checked: this.state.styles.hasNumbering,
|
|
999
|
-
className: "chknumbering",
|
|
1000
|
-
disabled: this.state.styles.styleLevel ? false : true,
|
|
1001
|
-
onChange: this.handleNumbering.bind(this),
|
|
1002
|
-
type: "checkbox"
|
|
1003
|
-
}), "Numbering(1.1)"), /*#__PURE__*/React.createElement("label", null, /*#__PURE__*/React.createElement("input", {
|
|
1004
|
-
checked: this.state.styles.boldNumbering,
|
|
1005
|
-
className: "chkboldnumbering",
|
|
1006
|
-
disabled: this.state.styles.hasNumbering ? false : true,
|
|
1007
|
-
onChange: this.handleBoldNumbering.bind(this),
|
|
1008
|
-
type: "checkbox"
|
|
1009
|
-
}), "Bold numbering"))), /*#__PURE__*/React.createElement("p", {
|
|
1010
|
-
className: "formp"
|
|
1011
|
-
}, "Indenting:"), /*#__PURE__*/React.createElement("div", {
|
|
1012
|
-
className: "hierarchydiv"
|
|
1013
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
1014
|
-
className: "indentdiv"
|
|
1015
|
-
}, /*#__PURE__*/React.createElement("input", {
|
|
1016
|
-
checked: this.state.styles.isLevelbased,
|
|
1017
|
-
name: "indenting",
|
|
1018
|
-
onChange: this.onIndentRadioChanged.bind(this),
|
|
1019
|
-
type: "radio",
|
|
1020
|
-
value: "0"
|
|
1021
|
-
}), /*#__PURE__*/React.createElement("label", {
|
|
1022
|
-
style: {
|
|
1023
|
-
marginLeft: '4px',
|
|
1024
|
-
marginTop: '3px',
|
|
1025
|
-
marginBottom: '0'
|
|
1026
|
-
}
|
|
1027
|
-
}, "Based On Level")), /*#__PURE__*/React.createElement("div", {
|
|
1028
|
-
className: "indentdiv"
|
|
1029
|
-
}, /*#__PURE__*/React.createElement("input", {
|
|
1030
|
-
checked: !this.state.styles.isLevelbased,
|
|
1031
|
-
name: "indenting",
|
|
1032
|
-
onChange: this.onIndentRadioChanged.bind(this),
|
|
1033
|
-
type: "radio",
|
|
1034
|
-
value: "1"
|
|
1035
|
-
}), /*#__PURE__*/React.createElement("label", {
|
|
1036
|
-
style: {
|
|
1037
|
-
marginLeft: '4px',
|
|
1038
|
-
marginTop: '3px',
|
|
1039
|
-
marginBottom: '0'
|
|
1040
|
-
}
|
|
1041
|
-
}, "Specified"), /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement("select", {
|
|
1042
|
-
className: "leveltype specifiedindent fontstyle",
|
|
1043
|
-
onChange: this.onIndentChange.bind(this),
|
|
1044
|
-
style: {
|
|
1045
|
-
width: '99px !important'
|
|
1046
|
-
},
|
|
1047
|
-
value: this.state.styles.indent || ''
|
|
1048
|
-
}, LEVEL_VALUES.map(value => /*#__PURE__*/React.createElement("option", {
|
|
1049
|
-
key: value,
|
|
1050
|
-
value: value
|
|
1051
|
-
}, value))))))), /*#__PURE__*/React.createElement("button", {
|
|
1052
|
-
className: "licit-accordion accactive"
|
|
1053
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
1054
|
-
className: "indentdiv"
|
|
1055
|
-
}, /*#__PURE__*/React.createElement("label", {
|
|
1056
|
-
style: {
|
|
1057
|
-
marginLeft: '-7px',
|
|
1058
|
-
marginTop: '2px',
|
|
1059
|
-
color: '#444'
|
|
1060
|
-
}
|
|
1061
|
-
}, "Style Settings"))), /*#__PURE__*/React.createElement("div", {
|
|
1062
|
-
className: "panel3 formp"
|
|
1063
|
-
}, /*#__PURE__*/React.createElement("p", {
|
|
1064
|
-
className: "formp"
|
|
1065
|
-
}, "Select style for next line:"), /*#__PURE__*/React.createElement("div", {
|
|
1066
|
-
className: "hierarchydiv"
|
|
1067
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
1068
|
-
className: "settingsdiv"
|
|
1069
|
-
}, /*#__PURE__*/React.createElement("input", {
|
|
1070
|
-
checked: this.state.styles.nextLineStyleName === this.state.styleName && !this.state.otherStyleSelected,
|
|
1071
|
-
name: "nextlinestyle",
|
|
1072
|
-
onChange: this.onNextLineStyleSelected.bind(this, 1),
|
|
1073
|
-
type: "radio",
|
|
1074
|
-
value: "1"
|
|
1075
|
-
}), /*#__PURE__*/React.createElement("label", {
|
|
1076
|
-
style: {
|
|
1077
|
-
marginLeft: '4px',
|
|
1078
|
-
marginTop: '3px',
|
|
1079
|
-
marginBottom: '0'
|
|
1080
|
-
}
|
|
1081
|
-
}, "Continue this style")), /*#__PURE__*/React.createElement("div", {
|
|
1082
|
-
className: "settingsdiv"
|
|
1083
|
-
}, /*#__PURE__*/React.createElement("input", {
|
|
1084
|
-
checked: this.state.styles.nextLineStyleName === 'None',
|
|
1085
|
-
name: "nextlinestyle",
|
|
1086
|
-
onChange: this.onNextLineStyleSelected.bind(this, 0),
|
|
1087
|
-
style: {
|
|
1088
|
-
marginLeft: '20px'
|
|
1089
|
-
},
|
|
1090
|
-
type: "radio",
|
|
1091
|
-
value: "2"
|
|
1092
|
-
}), /*#__PURE__*/React.createElement("label", {
|
|
1093
|
-
style: {
|
|
1094
|
-
marginLeft: '4px',
|
|
1095
|
-
marginTop: '3px',
|
|
1096
|
-
marginBottom: '0'
|
|
1097
|
-
}
|
|
1098
|
-
}, "None")), /*#__PURE__*/React.createElement("div", {
|
|
1099
|
-
className: "indentdiv"
|
|
1100
|
-
}, /*#__PURE__*/React.createElement("input", {
|
|
1101
|
-
checked: this.state.otherStyleSelected,
|
|
1102
|
-
name: "nextlinestyle",
|
|
1103
|
-
onChange: this.onNextLineStyleSelected.bind(this, 2),
|
|
1104
|
-
type: "radio",
|
|
1105
|
-
value: "0"
|
|
1106
|
-
}), /*#__PURE__*/React.createElement("label", {
|
|
1107
|
-
style: {
|
|
1108
|
-
marginLeft: '4px',
|
|
1109
|
-
marginTop: '3px',
|
|
1110
|
-
marginBottom: '0',
|
|
1111
|
-
width: '62px'
|
|
1112
|
-
}
|
|
1113
|
-
}, "Select style"), /*#__PURE__*/React.createElement("span", {
|
|
1114
|
-
id: "nextStyle",
|
|
1115
|
-
style: {
|
|
1116
|
-
display: 'none'
|
|
1117
|
-
}
|
|
1118
|
-
}, /*#__PURE__*/React.createElement("select", {
|
|
1119
|
-
className: "fontstyle stylenameinput" // defaultValue={'DEFAULT'}
|
|
1120
|
-
,
|
|
1121
|
-
id: "nextStyleValue",
|
|
1122
|
-
onChange: this.onOtherStyleSelectionChanged.bind(this),
|
|
1123
|
-
style: {
|
|
1124
|
-
height: '20px',
|
|
1125
|
-
marginLeft: '7px',
|
|
1126
|
-
width: '97px'
|
|
1127
|
-
},
|
|
1128
|
-
value: this.state.styles.nextLineStyleName
|
|
1129
|
-
}, customStyles.map(style => /*#__PURE__*/React.createElement("option", {
|
|
1130
|
-
key: style.styleName
|
|
1131
|
-
}, style.styleName)))))))))), /*#__PURE__*/React.createElement("div", {
|
|
1132
|
-
className: "btns"
|
|
1133
|
-
}, /*#__PURE__*/React.createElement("button", {
|
|
1134
|
-
className: "buttonstyle",
|
|
1135
|
-
onClick: this._cancel
|
|
1136
|
-
}, this.state.mode == 3 ? 'Close' : 'Cancel'), /*#__PURE__*/React.createElement("button", {
|
|
1137
|
-
className: "btnsave buttonstyle",
|
|
1138
|
-
onClick: this._save.bind(this),
|
|
1139
|
-
onKeyDown: this.handleKeyDown
|
|
1140
|
-
}, "Save")));
|
|
1141
|
-
}
|
|
1142
|
-
|
|
1143
|
-
// [FS] IRAD-1176 2021-02-08
|
|
1144
|
-
// save the custom styles from Edit all option.
|
|
1145
|
-
modifyCustomStyle(val) {
|
|
1146
|
-
const {
|
|
1147
|
-
runtime
|
|
1148
|
-
} = this.props.editorView;
|
|
1149
|
-
|
|
1150
|
-
if (runtime && typeof runtime.saveStyle === 'function') {
|
|
1151
|
-
delete val.editorView;
|
|
1152
|
-
runtime.saveStyle(val).then(result => {});
|
|
1153
|
-
}
|
|
1154
|
-
} // To fetch the custom styles from server and set to the state.
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
getCustomStyles(runtime) {
|
|
1158
|
-
if (runtime && typeof runtime.getStylesAsync === 'function') {
|
|
1159
|
-
runtime.getStylesAsync().then(result => {
|
|
1160
|
-
customStyles = result; // [FS] IRAD-1222 2021-03-01
|
|
1161
|
-
// Issue fix: In edit all, the style list not showing the first time.
|
|
1162
|
-
|
|
1163
|
-
this.setState({
|
|
1164
|
-
customStyles: result
|
|
1165
|
-
});
|
|
1166
|
-
});
|
|
1167
|
-
}
|
|
1168
|
-
} // [FS] IRAD-1231 2021-03-03
|
|
1169
|
-
// Issue fix: Selected style for next line not retaining when modify.
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
setNextLineStyle(nextLineStyleName) {
|
|
1173
|
-
// [FS] IRAD-1241 2021-03-05
|
|
1174
|
-
// The selcted Style in the Next line setting not retaing in Edit All and modify
|
|
1175
|
-
let display = '';
|
|
1176
|
-
|
|
1177
|
-
if (0 < this.props.mode && nextLineStyleName && _ParagraphNodeSpec.RESERVED_STYLE_NONE !== nextLineStyleName && nextLineStyleName !== this.state.styleName) {
|
|
1178
|
-
this.setState({
|
|
1179
|
-
otherStyleSelected: true
|
|
1180
|
-
});
|
|
1181
|
-
display = 'block';
|
|
1182
|
-
const selectedStyle = document.getElementById('nextStyleValue');
|
|
1183
|
-
|
|
1184
|
-
if (selectedStyle instanceof window.HTMLSelectElement) {
|
|
1185
|
-
selectedStyle.value = nextLineStyleName;
|
|
1186
|
-
}
|
|
1187
|
-
} else {
|
|
1188
|
-
this.setState({
|
|
1189
|
-
otherStyleSelected: false
|
|
1190
|
-
});
|
|
1191
|
-
display = 'none';
|
|
1192
|
-
}
|
|
1193
|
-
|
|
1194
|
-
const hiddenDiv = document.getElementById('nextStyle');
|
|
1195
|
-
|
|
1196
|
-
if (hiddenDiv && hiddenDiv.style) {
|
|
1197
|
-
hiddenDiv.style.display = display;
|
|
1198
|
-
}
|
|
1199
|
-
} // Disable the style attribute div on Rename
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
disableRename() {
|
|
1203
|
-
const style = {};
|
|
1204
|
-
|
|
1205
|
-
if (2 === this.state.mode) {
|
|
1206
|
-
style.opacity = 0.4;
|
|
1207
|
-
style.pointerEvents = 'none';
|
|
1208
|
-
}
|
|
1209
|
-
|
|
1210
|
-
return style;
|
|
1211
|
-
}
|
|
1212
|
-
|
|
1213
|
-
}
|
|
1214
|
-
|
|
1215
|
-
var _default = CustomStyleEditor;
|
|
1216
|
-
exports.default = _default;
|