@modusoperandi/licit 1.0.5 → 1.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/BlockquoteInsertNewLineCommand.js +10 -11
- package/BlockquoteInsertNewLineCommand.js.flow +1 -2
- package/BlockquoteNodeSpec.js +2 -3
- package/BlockquoteNodeSpec.js.flow +1 -2
- package/BlockquoteToggleCommand.js +9 -9
- package/BookmarkNodeSpec.js +1 -1
- package/CodeBlockCommand.js +10 -10
- package/CodeBlockCommand.js.flow +1 -1
- package/ContentPlaceholderPlugin.js +17 -17
- package/ContentPlaceholderPlugin.js.flow +10 -12
- package/CursorPlaceholderPlugin.js +8 -8
- package/DocLayoutCommand.js +10 -12
- package/DocLayoutCommand.js.flow +1 -3
- package/EditorKeyMap.js +0 -1
- package/EditorKeyMap.js.flow +0 -2
- package/EditorMarks.js +1 -1
- package/EditorNodes.js +1 -2
- package/EditorNodes.js.flow +0 -1
- package/EditorPageLayoutPlugin.js +8 -8
- package/FontTypeMarkSpec.js +1 -1
- package/FontTypeMarkSpec.js.flow +1 -1
- package/HTMLMutator.js +4 -4
- package/HeadingNodeSpec.js +2 -12
- package/HeadingNodeSpec.js.flow +4 -14
- package/HistoryRedoCommand.js +9 -9
- package/HistoryUndoCommand.js +9 -9
- package/HorizontalRuleCommand.js +9 -9
- package/ImageUploadPlaceholderPlugin.js +13 -15
- package/ImageUploadPlaceholderPlugin.js.flow +5 -7
- package/LinkMarkSpec.js +6 -1
- package/LinkMarkSpec.js.flow +5 -0
- package/LinkSetURLCommand.js +126 -55
- package/LinkSetURLCommand.js.flow +61 -37
- package/LinkTooltipPlugin.js +119 -30
- package/LinkTooltipPlugin.js.flow +91 -20
- package/ListItemInsertNewLineCommand.js +10 -11
- package/ListItemInsertNewLineCommand.js.flow +1 -2
- package/ListItemMergeCommand.js +16 -15
- package/ListItemMergeCommand.js.flow +3 -4
- package/ListSplitCommand.js +9 -9
- package/ListToggleCommand.js +9 -9
- package/MarksClearCommand.js +9 -9
- package/MathEditCommand.js +10 -11
- package/MathEditCommand.js.flow +1 -2
- package/OrderedListNodeSpec.js +1 -1
- package/ParagraphNodeSpec.js +11 -2
- package/ParagraphNodeSpec.js.flow +9 -2
- package/ParagraphSpacingCommand.js +13 -14
- package/ParagraphSpacingCommand.js.flow +4 -9
- package/PrintCommand.js +9 -9
- package/SelectionPlaceholderPlugin.js +8 -8
- package/SpacerMarkSpec.js +1 -1
- package/StyleView.js +3 -4
- package/StyleView.js.flow +0 -1
- package/TableBackgroundColorCommand.js +12 -14
- package/TableBackgroundColorCommand.js.flow +2 -5
- package/TableBorderColorCommand.js +12 -14
- package/TableBorderColorCommand.js.flow +2 -7
- package/TableCellColorCommand.js +10 -11
- package/TableCellColorCommand.js.flow +1 -2
- package/TableCellMenuPlugin.js +16 -15
- package/TableCellMenuPlugin.js.flow +5 -7
- package/TableInsertCommand.js +11 -13
- package/TableInsertCommand.js.flow +2 -4
- package/TableMergeCellsCommand.js +13 -12
- package/TableMergeCellsCommand.js.flow +4 -3
- package/TableNodesSpecs.js +4 -2
- package/TableNodesSpecs.js.flow +4 -2
- package/TableResizePlugin.js +17 -16
- package/TableResizePlugin.js.flow +1 -1
- package/TextInsertTabSpaceCommand.js +9 -9
- package/Types.js +1 -0
- package/Types.js.flow +2 -5
- package/WebFontLoader.js +4 -4
- package/bom.xml +17623 -24512
- package/buildEditorPlugins.js +4 -4
- package/buildInputRules.js +8 -4
- package/buildInputRules.js.flow +8 -4
- package/client/CollabConnector.js +9 -9
- package/client/EditorConnection.js +8 -6
- package/client/EditorConnection.js.flow +3 -2
- package/client/Licit.js +22 -58
- package/client/Licit.js.flow +12 -44
- package/client/Licit.test.js +49 -39
- package/client/Licit.test.js.flow +40 -34
- package/client/Reporter.js +3 -3
- package/client/SimpleConnector.js +4 -4
- package/client/http.js +0 -6
- package/client/http.js.flow +0 -8
- package/client/throttle.js +8 -2
- package/client/throttle.js.flow +2 -2
- package/convertFromDOMElement.js +2 -4
- package/convertFromDOMElement.js.flow +2 -5
- package/convertFromHTML.js +2 -3
- package/convertFromHTML.js.flow +2 -4
- package/convertFromJSON.js +1 -2
- package/convertFromJSON.js.flow +1 -2
- package/convertToCSSPTValue.js +6 -10
- package/convertToCSSPTValue.js.flow +8 -11
- package/createCommand.js +9 -9
- package/createEditorKeyMap.js +1 -1
- package/createEmptyEditorState.js +2 -3
- package/createEmptyEditorState.js.flow +2 -4
- package/createTableResizingPlugin.js +6 -6
- package/createTableResizingPlugin.js.flow +1 -1
- package/findActiveMark.js +1 -1
- package/findActiveMark.js.flow +1 -1
- package/insertTable.js +0 -3
- package/insertTable.js.flow +0 -2
- package/joinDown.js +1 -3
- package/joinDown.js.flow +1 -3
- package/joinUp.js +1 -3
- package/joinUp.js.flow +1 -3
- package/lookUpElement.js +2 -1
- package/lookUpElement.js.flow +1 -1
- package/normalizeHTML.js +3 -1
- package/normalizeHTML.js.flow +3 -1
- package/package.json +21 -16
- package/patchAnchorElements.js +1 -1
- package/patchAnchorElements.js.flow +1 -1
- package/patchBreakElements.js +3 -2
- package/patchBreakElements.js.flow +2 -2
- package/patchElementInlineStyles.js +1 -1
- package/patchElementInlineStyles.js.flow +1 -1
- package/patchListElements.js +4 -4
- package/patchListElements.js.flow +5 -5
- package/patchMathElements.js +5 -7
- package/patchMathElements.js.flow +2 -4
- package/patchStyleElements.js +1 -1
- package/patchStyleElements.js.flow +7 -6
- package/patchTableElements.js +2 -3
- package/patchTableElements.js.flow +2 -3
- package/sanitizeURL.js +1 -1
- package/sanitizeURL.js.flow +1 -1
- package/splitListItem.js +2 -2
- package/splitListItem.js.flow +1 -1
- package/toggleBlockquote.js +4 -5
- package/toggleBlockquote.js.flow +5 -12
- package/toggleCodeBlock.js +6 -6
- package/toggleCodeBlock.js.flow +10 -10
- package/ui/AlertInfo.js +9 -9
- package/ui/BookmarkNodeView.js +13 -12
- package/ui/CommandButton.js +9 -9
- package/ui/CommandMenu.js +12 -12
- package/ui/CommandMenu.js.flow +1 -1
- package/ui/CommandMenuButton.js +11 -12
- package/ui/CommandMenuButton.js.flow +2 -3
- package/ui/CustomEditorView.js +13 -12
- package/ui/CustomEditorView.js.flow +1 -0
- package/ui/CustomMenu.js +8 -8
- package/ui/CustomMenuItem.js +10 -10
- package/ui/CustomNodeView.js +27 -16
- package/ui/CustomNodeView.js.flow +16 -9
- package/ui/CustomRadioButton.js +13 -15
- package/ui/CustomRadioButton.js.flow +2 -3
- package/ui/DocLayoutEditor.js +10 -11
- package/ui/DocLayoutEditor.js.flow +1 -2
- package/ui/Editor.js +16 -13
- package/ui/Editor.js.flow +7 -8
- package/ui/EditorFrameset.js +9 -9
- package/ui/EditorToolbar.js +24 -29
- package/ui/EditorToolbar.js.flow +22 -41
- package/ui/EditorToolbarConfig.js +5 -5
- package/ui/EditorToolbarConfig.js.flow +1 -1
- package/ui/FontSizeCommandMenuButton.js +10 -10
- package/ui/FontSizeCommandMenuButton.js.flow +1 -1
- package/ui/FontTypeCommandMenuButton.js +11 -12
- package/ui/FontTypeCommandMenuButton.js.flow +4 -5
- package/ui/Frag.js +8 -8
- package/ui/Icon.js +12 -12
- package/ui/ImageInlineEditor.js +9 -9
- package/ui/LinkTooltip.js +62 -27
- package/ui/LinkTooltip.js.flow +55 -22
- package/ui/LinkURLEditor.js +152 -34
- package/ui/LinkURLEditor.js.flow +177 -51
- package/ui/ListItemNodeView.js +4 -4
- package/ui/ListTypeButton.js +11 -14
- package/ui/ListTypeButton.js.flow +2 -5
- package/ui/ListTypeCommandButton.js +10 -10
- package/ui/ListTypeCommandButton.js.flow +1 -1
- package/ui/ListTypeMenu.js +11 -11
- package/ui/ListTypeMenu.js.flow +1 -1
- package/ui/LoadingIndicator.js +8 -8
- package/ui/MathEditor.js +10 -14
- package/ui/MathEditor.js.flow +1 -7
- package/ui/MathInlineEditor.js +13 -13
- package/ui/MathInlineEditor.js.flow +3 -4
- package/ui/MathNodeView.js +16 -15
- package/ui/MathNodeView.js.flow +10 -20
- package/ui/PasteMenu.js +11 -14
- package/ui/PasteMenu.js.flow +0 -4
- package/ui/ResizeObserver.js +1 -1
- package/ui/ResizeObserver.js.flow +1 -1
- package/ui/RichTextEditor.js +9 -9
- package/ui/SelectionObserver.js +6 -6
- package/ui/SelectionObserver.js.flow +2 -2
- package/ui/TableCellMenu.js +9 -9
- package/ui/TableGridSizeEditor.js +11 -12
- package/ui/TableGridSizeEditor.js.flow +6 -3
- package/ui/TableNodeView.js +15 -13
- package/ui/TableNodeView.js.flow +3 -3
- package/ui/bindScrollHandler.js +2 -1
- package/ui/bindScrollHandler.js.flow +1 -1
- package/ui/canUseCSSFont.js +5 -4
- package/ui/canUseCSSFont.js.flow +4 -5
- package/ui/czi-editor.css +1 -4
- package/ui/czi-form.css +102 -8
- package/ui/czi-image-view.css +1 -5
- package/ui/czi-link-tooltip.css +41 -0
- package/ui/czi-list.css +0 -4
- package/ui/czi-loading-indicator.css +1 -46
- package/ui/czi-table-cell-menu.css +3 -1
- package/ui/findActiveFontSize.js +2 -1
- package/ui/findActiveFontSize.js.flow +1 -4
- package/ui/findActiveFontType.js +4 -3
- package/ui/findActiveFontType.js.flow +3 -6
- package/ui/handleEditorDrop.js +1 -1
- package/ui/handleEditorDrop.js.flow +1 -1
- package/ui/handleEditorKeyDown.js +1 -1
- package/ui/handleEditorKeyDown.js.flow +1 -1
- package/ui/handleEditorPaste.js +1 -1
- package/ui/handleEditorPaste.js.flow +1 -1
- package/ui/injectStyleSheet.js +2 -2
- package/ui/injectStyleSheet.js.flow +2 -4
- package/ui/isElementFullyVisible.js +1 -10
- package/ui/isElementFullyVisible.js.flow +1 -13
- package/ui/mathquill-editor/MathQuillEditor.js +12 -13
- package/ui/mathquill-editor/MathQuillEditor.js.flow +0 -1
- package/ui/mathquill-editor/MathQuillEditorSymbolsPanel.js +9 -9
- package/ui/mathquill-editor/mathquill-import-kludge.js +1 -8
- package/ui/mathquill-editor/mathquill-import-kludge.js.flow +0 -7
- package/ui/renderLaTeXAsHTML.js +3 -3
- package/ui/resolveImage.js +4 -5
- package/ui/resolveImage.js.flow +3 -5
- package/ui/toCSSLineSpacing.js +2 -3
- package/ui/toCSSLineSpacing.js.flow +2 -4
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
-
function _classCallCheck(
|
|
3
|
-
function _defineProperties(
|
|
4
|
-
function _createClass(
|
|
2
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
3
|
+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
4
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
5
5
|
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
6
|
-
function _possibleConstructorReturn(
|
|
7
|
-
function _assertThisInitialized(
|
|
6
|
+
function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
|
|
7
|
+
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
|
|
8
8
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
9
|
-
function _getPrototypeOf(
|
|
10
|
-
function _inherits(
|
|
11
|
-
function _setPrototypeOf(
|
|
12
|
-
function _defineProperty(
|
|
9
|
+
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
|
|
10
|
+
function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
|
|
11
|
+
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
12
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
13
13
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
14
14
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
15
15
|
import nullthrows from 'nullthrows';
|
|
@@ -17,12 +17,9 @@ import { EditorState } from 'prosemirror-state';
|
|
|
17
17
|
import { setCellAttr } from 'prosemirror-tables';
|
|
18
18
|
import { Transform } from 'prosemirror-transform';
|
|
19
19
|
import { EditorView } from 'prosemirror-view';
|
|
20
|
-
import { atAnchorRight } from '@modusoperandi/licit-ui-commands';
|
|
20
|
+
import { atAnchorRight, createPopUp, findNodesWithSameMark, MARK_TEXT_COLOR } from '@modusoperandi/licit-ui-commands';
|
|
21
21
|
import { UICommand } from '@modusoperandi/licit-doc-attrs-step';
|
|
22
|
-
import { createPopUp } from '@modusoperandi/licit-ui-commands';
|
|
23
22
|
import { ColorEditor } from '@modusoperandi/color-picker';
|
|
24
|
-
import { findNodesWithSameMark } from '@modusoperandi/licit-ui-commands';
|
|
25
|
-
import { MARK_TEXT_COLOR } from '@modusoperandi/licit-ui-commands';
|
|
26
23
|
var setCellBackgroundBlack = setCellAttr('background', '#000000');
|
|
27
24
|
var TableBackgroundColorCommand = /*#__PURE__*/function (_UICommand) {
|
|
28
25
|
function TableBackgroundColorCommand() {
|
|
@@ -87,7 +84,8 @@ var TableBackgroundColorCommand = /*#__PURE__*/function (_UICommand) {
|
|
|
87
84
|
return _createClass(TableBackgroundColorCommand, [{
|
|
88
85
|
key: "cancel",
|
|
89
86
|
value: function cancel() {
|
|
90
|
-
|
|
87
|
+
var _this$_popUp;
|
|
88
|
+
(_this$_popUp = this._popUp) === null || _this$_popUp === void 0 || _this$_popUp.close(undefined);
|
|
91
89
|
}
|
|
92
90
|
}]);
|
|
93
91
|
}(UICommand);
|
|
@@ -5,12 +5,9 @@ import { EditorState } from 'prosemirror-state';
|
|
|
5
5
|
import { setCellAttr } from 'prosemirror-tables';
|
|
6
6
|
import { Transform } from 'prosemirror-transform';
|
|
7
7
|
import { EditorView } from 'prosemirror-view';
|
|
8
|
-
import { atAnchorRight } from '@modusoperandi/licit-ui-commands';
|
|
8
|
+
import { atAnchorRight, createPopUp, findNodesWithSameMark, MARK_TEXT_COLOR } from '@modusoperandi/licit-ui-commands';
|
|
9
9
|
import { UICommand } from '@modusoperandi/licit-doc-attrs-step';
|
|
10
|
-
import { createPopUp } from '@modusoperandi/licit-ui-commands';
|
|
11
10
|
import { ColorEditor } from '@modusoperandi/color-picker';
|
|
12
|
-
import {findNodesWithSameMark} from '@modusoperandi/licit-ui-commands';
|
|
13
|
-
import { MARK_TEXT_COLOR } from '@modusoperandi/licit-ui-commands';
|
|
14
11
|
|
|
15
12
|
const setCellBackgroundBlack = setCellAttr('background', '#000000');
|
|
16
13
|
|
|
@@ -76,7 +73,7 @@ class TableBackgroundColorCommand extends UICommand {
|
|
|
76
73
|
};
|
|
77
74
|
|
|
78
75
|
cancel(): void {
|
|
79
|
-
this._popUp
|
|
76
|
+
this._popUp?.close(undefined);
|
|
80
77
|
}
|
|
81
78
|
}
|
|
82
79
|
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
-
function _classCallCheck(
|
|
3
|
-
function _defineProperties(
|
|
4
|
-
function _createClass(
|
|
2
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
3
|
+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
4
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
5
5
|
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
6
|
-
function _possibleConstructorReturn(
|
|
7
|
-
function _assertThisInitialized(
|
|
6
|
+
function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
|
|
7
|
+
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
|
|
8
8
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
9
|
-
function _getPrototypeOf(
|
|
10
|
-
function _inherits(
|
|
11
|
-
function _setPrototypeOf(
|
|
12
|
-
function _defineProperty(
|
|
9
|
+
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
|
|
10
|
+
function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
|
|
11
|
+
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
12
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
13
13
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
14
14
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
15
15
|
import nullthrows from 'nullthrows';
|
|
@@ -18,11 +18,8 @@ import { setCellAttr } from 'prosemirror-tables';
|
|
|
18
18
|
import { Transform } from 'prosemirror-transform';
|
|
19
19
|
import { EditorView } from 'prosemirror-view';
|
|
20
20
|
import { ColorEditor } from '@modusoperandi/color-picker';
|
|
21
|
-
import { atAnchorRight } from '@modusoperandi/licit-ui-commands';
|
|
21
|
+
import { atAnchorRight, createPopUp, findNodesWithSameMark, MARK_TEXT_COLOR } from '@modusoperandi/licit-ui-commands';
|
|
22
22
|
import { UICommand } from '@modusoperandi/licit-doc-attrs-step';
|
|
23
|
-
import { createPopUp } from '@modusoperandi/licit-ui-commands';
|
|
24
|
-
import { findNodesWithSameMark } from '@modusoperandi/licit-ui-commands';
|
|
25
|
-
import { MARK_TEXT_COLOR } from '@modusoperandi/licit-ui-commands';
|
|
26
23
|
var setCellBorderBlack = setCellAttr('borderColor', '#000000');
|
|
27
24
|
var TableBorderColorCommand = /*#__PURE__*/function (_UICommand) {
|
|
28
25
|
function TableBorderColorCommand() {
|
|
@@ -87,7 +84,8 @@ var TableBorderColorCommand = /*#__PURE__*/function (_UICommand) {
|
|
|
87
84
|
return _createClass(TableBorderColorCommand, [{
|
|
88
85
|
key: "cancel",
|
|
89
86
|
value: function cancel() {
|
|
90
|
-
|
|
87
|
+
var _this$_popUp;
|
|
88
|
+
(_this$_popUp = this._popUp) === null || _this$_popUp === void 0 || _this$_popUp.close(undefined);
|
|
91
89
|
}
|
|
92
90
|
}]);
|
|
93
91
|
}(UICommand);
|
|
@@ -6,13 +6,8 @@ import { setCellAttr } from 'prosemirror-tables';
|
|
|
6
6
|
import { Transform } from 'prosemirror-transform';
|
|
7
7
|
import { EditorView } from 'prosemirror-view';
|
|
8
8
|
import { ColorEditor } from '@modusoperandi/color-picker';
|
|
9
|
-
import { atAnchorRight } from '@modusoperandi/licit-ui-commands';
|
|
9
|
+
import { atAnchorRight, createPopUp, findNodesWithSameMark, MARK_TEXT_COLOR } from '@modusoperandi/licit-ui-commands';
|
|
10
10
|
import { UICommand } from '@modusoperandi/licit-doc-attrs-step';
|
|
11
|
-
import { createPopUp } from '@modusoperandi/licit-ui-commands';
|
|
12
|
-
import {findNodesWithSameMark} from '@modusoperandi/licit-ui-commands';
|
|
13
|
-
import { MARK_TEXT_COLOR } from '@modusoperandi/licit-ui-commands';
|
|
14
|
-
|
|
15
|
-
|
|
16
11
|
|
|
17
12
|
const setCellBorderBlack = setCellAttr('borderColor', '#000000');
|
|
18
13
|
|
|
@@ -79,7 +74,7 @@ class TableBorderColorCommand extends UICommand {
|
|
|
79
74
|
};
|
|
80
75
|
|
|
81
76
|
cancel(): void {
|
|
82
|
-
this._popUp
|
|
77
|
+
this._popUp?.close(undefined);
|
|
83
78
|
}
|
|
84
79
|
}
|
|
85
80
|
|
package/TableCellColorCommand.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
-
function _classCallCheck(
|
|
3
|
-
function _defineProperties(
|
|
4
|
-
function _createClass(
|
|
2
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
3
|
+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
4
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
5
5
|
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
6
|
-
function _possibleConstructorReturn(
|
|
7
|
-
function _assertThisInitialized(
|
|
6
|
+
function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
|
|
7
|
+
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
|
|
8
8
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
9
|
-
function _getPrototypeOf(
|
|
10
|
-
function _inherits(
|
|
11
|
-
function _setPrototypeOf(
|
|
12
|
-
function _defineProperty(
|
|
9
|
+
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
|
|
10
|
+
function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
|
|
11
|
+
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
12
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
13
13
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
14
14
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
15
15
|
import nullthrows from 'nullthrows';
|
|
@@ -18,9 +18,8 @@ import { setCellAttr } from 'prosemirror-tables';
|
|
|
18
18
|
import { Transform } from 'prosemirror-transform';
|
|
19
19
|
import { EditorView } from 'prosemirror-view';
|
|
20
20
|
import { ColorEditor } from '@modusoperandi/color-picker';
|
|
21
|
-
import { atAnchorRight } from '@modusoperandi/licit-ui-commands';
|
|
21
|
+
import { atAnchorRight, createPopUp } from '@modusoperandi/licit-ui-commands';
|
|
22
22
|
import { UICommand } from '@modusoperandi/licit-doc-attrs-step';
|
|
23
|
-
import { createPopUp } from '@modusoperandi/licit-ui-commands';
|
|
24
23
|
var setCellBackgroundBlack = setCellAttr('background', '#000000');
|
|
25
24
|
var TableCellColorCommand = /*#__PURE__*/function (_UICommand) {
|
|
26
25
|
function TableCellColorCommand() {
|
|
@@ -6,9 +6,8 @@ import { setCellAttr } from 'prosemirror-tables';
|
|
|
6
6
|
import { Transform } from 'prosemirror-transform';
|
|
7
7
|
import { EditorView } from 'prosemirror-view';
|
|
8
8
|
import { ColorEditor } from '@modusoperandi/color-picker';
|
|
9
|
-
import { atAnchorRight } from '@modusoperandi/licit-ui-commands';
|
|
9
|
+
import { atAnchorRight, createPopUp } from '@modusoperandi/licit-ui-commands';
|
|
10
10
|
import { UICommand } from '@modusoperandi/licit-doc-attrs-step';
|
|
11
|
-
import { createPopUp } from '@modusoperandi/licit-ui-commands';
|
|
12
11
|
|
|
13
12
|
const setCellBackgroundBlack = setCellAttr('background', '#000000');
|
|
14
13
|
|
package/TableCellMenuPlugin.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
2
|
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
3
|
-
function _possibleConstructorReturn(
|
|
4
|
-
function _assertThisInitialized(
|
|
3
|
+
function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
|
|
4
|
+
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
|
|
5
5
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
6
|
-
function _getPrototypeOf(
|
|
7
|
-
function _inherits(
|
|
8
|
-
function _setPrototypeOf(
|
|
9
|
-
function _classCallCheck(
|
|
10
|
-
function _defineProperties(
|
|
11
|
-
function _createClass(
|
|
12
|
-
function _defineProperty(
|
|
6
|
+
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
|
|
7
|
+
function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
|
|
8
|
+
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
9
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
10
|
+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
11
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
12
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
13
13
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
14
14
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
15
15
|
import { EditorState, Plugin, PluginKey } from 'prosemirror-state';
|
|
@@ -17,10 +17,9 @@ import { EditorView } from 'prosemirror-view';
|
|
|
17
17
|
/* eslint-disable-next-line */
|
|
18
18
|
import * as React from 'react';
|
|
19
19
|
import findActionableCell from './findActionableCell.js';
|
|
20
|
-
import { atAnchorTopRight } from '@modusoperandi/licit-ui-commands';
|
|
20
|
+
import { atAnchorTopRight, createPopUp } from '@modusoperandi/licit-ui-commands';
|
|
21
21
|
import TableCellMenu from './ui/TableCellMenu.js';
|
|
22
22
|
import bindScrollHandler from './ui/bindScrollHandler.js';
|
|
23
|
-
import { createPopUp } from '@modusoperandi/licit-ui-commands';
|
|
24
23
|
import isElementFullyVisible from './ui/isElementFullyVisible.js';
|
|
25
24
|
import '@modusoperandi/licit-ui-commands/ui/czi-pop-up.css';
|
|
26
25
|
import { CellSelection } from 'prosemirror-tables';
|
|
@@ -32,7 +31,8 @@ var TableCellTooltipView = /*#__PURE__*/function () {
|
|
|
32
31
|
_defineProperty(this, "_popUp", null);
|
|
33
32
|
_defineProperty(this, "_scrollHandle", null);
|
|
34
33
|
_defineProperty(this, "destroy", function () {
|
|
35
|
-
|
|
34
|
+
var _this$_popUp;
|
|
35
|
+
(_this$_popUp = _this._popUp) === null || _this$_popUp === void 0 || _this$_popUp.close();
|
|
36
36
|
_this._popUp = null;
|
|
37
37
|
});
|
|
38
38
|
_defineProperty(this, "_onOpen", function () {
|
|
@@ -43,8 +43,9 @@ var TableCellTooltipView = /*#__PURE__*/function () {
|
|
|
43
43
|
_this._scrollHandle = bindScrollHandler(cellEl, _this._onScroll);
|
|
44
44
|
});
|
|
45
45
|
_defineProperty(this, "_onClose", function () {
|
|
46
|
+
var _this$_scrollHandle;
|
|
46
47
|
_this._popUp = null;
|
|
47
|
-
_this
|
|
48
|
+
(_this$_scrollHandle = _this._scrollHandle) === null || _this$_scrollHandle === void 0 || _this$_scrollHandle.dispose();
|
|
48
49
|
_this._scrollHandle = null;
|
|
49
50
|
});
|
|
50
51
|
_defineProperty(this, "_onScroll", function () {
|
|
@@ -93,14 +94,14 @@ var TableCellTooltipView = /*#__PURE__*/function () {
|
|
|
93
94
|
}
|
|
94
95
|
if (!cellEl) {
|
|
95
96
|
// Closes the popup.
|
|
96
|
-
popUp
|
|
97
|
+
popUp === null || popUp === void 0 || popUp.close();
|
|
97
98
|
this._cellElement = null;
|
|
98
99
|
} else if (popUp && cellEl === this._cellElement) {
|
|
99
100
|
// Updates the popup.
|
|
100
101
|
popUp.update(viewPops);
|
|
101
102
|
} else {
|
|
102
103
|
// Creates a new popup.
|
|
103
|
-
popUp
|
|
104
|
+
popUp === null || popUp === void 0 || popUp.close();
|
|
104
105
|
this._cellElement = cellEl;
|
|
105
106
|
// [FS] IRAD-1009 2020-07-16
|
|
106
107
|
// Does not allow Table Menu Popuup button in disable mode
|
|
@@ -6,12 +6,10 @@ import { EditorView } from 'prosemirror-view';
|
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
|
|
8
8
|
import findActionableCell from './findActionableCell.js';
|
|
9
|
-
import { atAnchorTopRight } from '@modusoperandi/licit-ui-commands';
|
|
9
|
+
import { atAnchorTopRight, createPopUp } from '@modusoperandi/licit-ui-commands';
|
|
10
10
|
import TableCellMenu from './ui/TableCellMenu.js';
|
|
11
11
|
import bindScrollHandler from './ui/bindScrollHandler.js';
|
|
12
|
-
import { createPopUp } from '@modusoperandi/licit-ui-commands';
|
|
13
12
|
import isElementFullyVisible from './ui/isElementFullyVisible.js';
|
|
14
|
-
|
|
15
13
|
import '@modusoperandi/licit-ui-commands/ui/czi-pop-up.css';
|
|
16
14
|
import { CellSelection } from 'prosemirror-tables';
|
|
17
15
|
|
|
@@ -59,14 +57,14 @@ class TableCellTooltipView {
|
|
|
59
57
|
|
|
60
58
|
if (!cellEl) {
|
|
61
59
|
// Closes the popup.
|
|
62
|
-
popUp
|
|
60
|
+
popUp?.close();
|
|
63
61
|
this._cellElement = null;
|
|
64
62
|
} else if (popUp && cellEl === this._cellElement) {
|
|
65
63
|
// Updates the popup.
|
|
66
64
|
popUp.update(viewPops);
|
|
67
65
|
} else {
|
|
68
66
|
// Creates a new popup.
|
|
69
|
-
popUp
|
|
67
|
+
popUp?.close();
|
|
70
68
|
this._cellElement = cellEl;
|
|
71
69
|
// [FS] IRAD-1009 2020-07-16
|
|
72
70
|
// Does not allow Table Menu Popuup button in disable mode
|
|
@@ -83,7 +81,7 @@ class TableCellTooltipView {
|
|
|
83
81
|
}
|
|
84
82
|
|
|
85
83
|
destroy = (): void => {
|
|
86
|
-
this._popUp
|
|
84
|
+
this._popUp?.close();
|
|
87
85
|
this._popUp = null;
|
|
88
86
|
};
|
|
89
87
|
|
|
@@ -97,7 +95,7 @@ class TableCellTooltipView {
|
|
|
97
95
|
|
|
98
96
|
_onClose = (): void => {
|
|
99
97
|
this._popUp = null;
|
|
100
|
-
this._scrollHandle
|
|
98
|
+
this._scrollHandle?.dispose();
|
|
101
99
|
this._scrollHandle = null;
|
|
102
100
|
};
|
|
103
101
|
|
package/TableInsertCommand.js
CHANGED
|
@@ -1,28 +1,26 @@
|
|
|
1
1
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
-
function _classCallCheck(
|
|
3
|
-
function _defineProperties(
|
|
4
|
-
function _createClass(
|
|
2
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
3
|
+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
4
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
5
5
|
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
6
|
-
function _possibleConstructorReturn(
|
|
7
|
-
function _assertThisInitialized(
|
|
6
|
+
function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
|
|
7
|
+
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
|
|
8
8
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
9
|
-
function _getPrototypeOf(
|
|
10
|
-
function _inherits(
|
|
11
|
-
function _setPrototypeOf(
|
|
12
|
-
function _defineProperty(
|
|
9
|
+
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
|
|
10
|
+
function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
|
|
11
|
+
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
12
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
13
13
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
14
14
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
15
15
|
import nullthrows from 'nullthrows';
|
|
16
|
-
import { EditorState } from 'prosemirror-state';
|
|
17
|
-
import { TextSelection } from 'prosemirror-state';
|
|
16
|
+
import { EditorState, TextSelection } from 'prosemirror-state';
|
|
18
17
|
import { Transform } from 'prosemirror-transform';
|
|
19
18
|
import { EditorView } from 'prosemirror-view';
|
|
20
19
|
import { Fragment } from 'prosemirror-model';
|
|
21
20
|
import insertTable from './insertTable.js';
|
|
22
|
-
import { atAnchorRight } from '@modusoperandi/licit-ui-commands';
|
|
21
|
+
import { atAnchorRight, createPopUp } from '@modusoperandi/licit-ui-commands';
|
|
23
22
|
import TableGridSizeEditor from './ui/TableGridSizeEditor.js';
|
|
24
23
|
import { UICommand } from '@modusoperandi/licit-doc-attrs-step';
|
|
25
|
-
import { createPopUp } from '@modusoperandi/licit-ui-commands';
|
|
26
24
|
import { PARAGRAPH } from './NodeNames.js';
|
|
27
25
|
var TableInsertCommand = /*#__PURE__*/function (_UICommand) {
|
|
28
26
|
function TableInsertCommand() {
|
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
// @flow
|
|
2
2
|
|
|
3
3
|
import nullthrows from 'nullthrows';
|
|
4
|
-
import { EditorState } from 'prosemirror-state';
|
|
5
|
-
import { TextSelection } from 'prosemirror-state';
|
|
4
|
+
import { EditorState, TextSelection } from 'prosemirror-state';
|
|
6
5
|
import { Transform } from 'prosemirror-transform';
|
|
7
6
|
import { EditorView } from 'prosemirror-view';
|
|
8
7
|
import { Fragment } from 'prosemirror-model';
|
|
9
8
|
import insertTable from './insertTable.js';
|
|
10
|
-
import { atAnchorRight } from '@modusoperandi/licit-ui-commands';
|
|
9
|
+
import { atAnchorRight, createPopUp } from '@modusoperandi/licit-ui-commands';
|
|
11
10
|
import TableGridSizeEditor from './ui/TableGridSizeEditor.js';
|
|
12
11
|
import { UICommand } from '@modusoperandi/licit-doc-attrs-step';
|
|
13
|
-
import { createPopUp } from '@modusoperandi/licit-ui-commands';
|
|
14
12
|
import {
|
|
15
13
|
PARAGRAPH
|
|
16
14
|
} from './NodeNames.js';
|
|
@@ -1,19 +1,18 @@
|
|
|
1
1
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
-
function _classCallCheck(
|
|
3
|
-
function _defineProperties(
|
|
4
|
-
function _createClass(
|
|
2
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
3
|
+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
4
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
5
5
|
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
6
|
-
function _possibleConstructorReturn(
|
|
7
|
-
function _assertThisInitialized(
|
|
6
|
+
function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
|
|
7
|
+
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
|
|
8
8
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
9
|
-
function _getPrototypeOf(
|
|
10
|
-
function _inherits(
|
|
11
|
-
function _setPrototypeOf(
|
|
12
|
-
function _defineProperty(
|
|
9
|
+
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
|
|
10
|
+
function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
|
|
11
|
+
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
12
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
13
13
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
14
14
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
15
|
-
import { Schema } from 'prosemirror-model';
|
|
16
|
-
import { Node } from 'prosemirror-model';
|
|
15
|
+
import { Schema, Node } from 'prosemirror-model';
|
|
17
16
|
import { EditorState } from 'prosemirror-state';
|
|
18
17
|
import { CellSelection, mergeCells } from 'prosemirror-tables';
|
|
19
18
|
import { Transform } from 'prosemirror-transform';
|
|
@@ -66,7 +65,9 @@ function purgeConsecutiveBlankParagraphNodes(tr, schema) {
|
|
|
66
65
|
return true;
|
|
67
66
|
}
|
|
68
67
|
});
|
|
69
|
-
paragraphPoses.reverse()
|
|
68
|
+
paragraphPoses.reverse();
|
|
69
|
+
var reversedParagraphPoses = paragraphPoses;
|
|
70
|
+
reversedParagraphPoses.forEach(function (pos) {
|
|
70
71
|
var cell = tr.doc.nodeAt(pos);
|
|
71
72
|
tr = tr["delete"](pos, pos + cell.nodeSize);
|
|
72
73
|
});
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
// @flow
|
|
2
2
|
|
|
3
|
-
import { Schema } from 'prosemirror-model';
|
|
4
|
-
import { Node } from 'prosemirror-model';
|
|
3
|
+
import { Schema, Node } from 'prosemirror-model';
|
|
5
4
|
import { EditorState } from 'prosemirror-state';
|
|
6
5
|
import { CellSelection, mergeCells } from 'prosemirror-tables';
|
|
7
6
|
import { Transform } from 'prosemirror-transform';
|
|
@@ -55,7 +54,9 @@ function purgeConsecutiveBlankParagraphNodes(
|
|
|
55
54
|
return true;
|
|
56
55
|
}
|
|
57
56
|
});
|
|
58
|
-
paragraphPoses.reverse()
|
|
57
|
+
paragraphPoses.reverse();
|
|
58
|
+
const reversedParagraphPoses = paragraphPoses;
|
|
59
|
+
reversedParagraphPoses.forEach((pos) => {
|
|
59
60
|
const cell = tr.doc.nodeAt(pos);
|
|
60
61
|
tr = tr.delete(pos, pos + cell.nodeSize);
|
|
61
62
|
});
|
package/TableNodesSpecs.js
CHANGED
|
@@ -21,7 +21,8 @@ var TableNodesSpecs = tableNodes({
|
|
|
21
21
|
},
|
|
22
22
|
setDOMAttr: function setDOMAttr(value, attrs) {
|
|
23
23
|
if (value) {
|
|
24
|
-
|
|
24
|
+
var colorValue = String(value);
|
|
25
|
+
attrs.style = (attrs.style || '') + ";border-color: ".concat(colorValue, ";");
|
|
25
26
|
}
|
|
26
27
|
}
|
|
27
28
|
},
|
|
@@ -33,7 +34,8 @@ var TableNodesSpecs = tableNodes({
|
|
|
33
34
|
},
|
|
34
35
|
setDOMAttr: function setDOMAttr(value, attrs) {
|
|
35
36
|
if (value) {
|
|
36
|
-
|
|
37
|
+
var colorValue = String(value);
|
|
38
|
+
attrs.style = (attrs.style || '') + ";background-color: ".concat(colorValue, ";");
|
|
37
39
|
}
|
|
38
40
|
}
|
|
39
41
|
}
|
package/TableNodesSpecs.js.flow
CHANGED
|
@@ -24,7 +24,8 @@ const TableNodesSpecs = tableNodes({
|
|
|
24
24
|
},
|
|
25
25
|
setDOMAttr(value, attrs) {
|
|
26
26
|
if (value) {
|
|
27
|
-
|
|
27
|
+
const colorValue = String(value);
|
|
28
|
+
attrs.style = (attrs.style || '') + `;border-color: ${colorValue};`;
|
|
28
29
|
}
|
|
29
30
|
},
|
|
30
31
|
},
|
|
@@ -36,7 +37,8 @@ const TableNodesSpecs = tableNodes({
|
|
|
36
37
|
},
|
|
37
38
|
setDOMAttr(value, attrs) {
|
|
38
39
|
if (value) {
|
|
39
|
-
|
|
40
|
+
const colorValue = String(value);
|
|
41
|
+
attrs.style = (attrs.style || '') + `;background-color: ${colorValue};`;
|
|
40
42
|
}
|
|
41
43
|
},
|
|
42
44
|
},
|