@modusoperandi/licit 1.0.5 → 1.0.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.
Files changed (253) hide show
  1. package/BlockquoteInsertNewLineCommand.js +10 -11
  2. package/BlockquoteInsertNewLineCommand.js.flow +1 -2
  3. package/BlockquoteNodeSpec.js +2 -3
  4. package/BlockquoteNodeSpec.js.flow +1 -2
  5. package/BlockquoteToggleCommand.js +9 -9
  6. package/BookmarkNodeSpec.js +1 -1
  7. package/CodeBlockCommand.js +10 -10
  8. package/CodeBlockCommand.js.flow +1 -1
  9. package/ContentPlaceholderPlugin.js +17 -18
  10. package/ContentPlaceholderPlugin.js.flow +10 -14
  11. package/CursorPlaceholderPlugin.js +8 -9
  12. package/CursorPlaceholderPlugin.js.flow +0 -2
  13. package/DocLayoutCommand.js +10 -12
  14. package/DocLayoutCommand.js.flow +1 -3
  15. package/EditorKeyMap.js +0 -1
  16. package/EditorKeyMap.js.flow +0 -2
  17. package/EditorMarks.js +1 -1
  18. package/EditorNodes.js +1 -2
  19. package/EditorNodes.js.flow +0 -1
  20. package/EditorPageLayoutPlugin.js +8 -8
  21. package/FontTypeMarkSpec.js +1 -1
  22. package/FontTypeMarkSpec.js.flow +1 -1
  23. package/HTMLMutator.js +6 -7
  24. package/HTMLMutator.js.flow +2 -3
  25. package/HeadingNodeSpec.js +2 -12
  26. package/HeadingNodeSpec.js.flow +4 -14
  27. package/HistoryRedoCommand.js +9 -9
  28. package/HistoryUndoCommand.js +9 -9
  29. package/HorizontalRuleCommand.js +9 -9
  30. package/ImageUploadPlaceholderPlugin.js +14 -18
  31. package/ImageUploadPlaceholderPlugin.js.flow +6 -11
  32. package/LinkMarkSpec.js +6 -1
  33. package/LinkMarkSpec.js.flow +5 -0
  34. package/LinkSetURLCommand.js +126 -55
  35. package/LinkSetURLCommand.js.flow +61 -37
  36. package/LinkTooltipPlugin.js +119 -31
  37. package/LinkTooltipPlugin.js.flow +91 -22
  38. package/ListItemInsertNewLineCommand.js +10 -11
  39. package/ListItemInsertNewLineCommand.js.flow +1 -2
  40. package/ListItemMergeCommand.js +17 -16
  41. package/ListItemMergeCommand.js.flow +4 -6
  42. package/ListSplitCommand.js +9 -9
  43. package/ListToggleCommand.js +9 -9
  44. package/MarksClearCommand.js +9 -9
  45. package/MathEditCommand.js +10 -11
  46. package/MathEditCommand.js.flow +1 -2
  47. package/OrderedListNodeSpec.js +1 -1
  48. package/ParagraphNodeSpec.js +11 -2
  49. package/ParagraphNodeSpec.js.flow +9 -2
  50. package/ParagraphSpacingCommand.js +13 -14
  51. package/ParagraphSpacingCommand.js.flow +4 -9
  52. package/PrintCommand.js +9 -9
  53. package/SelectionPlaceholderPlugin.js +8 -9
  54. package/SelectionPlaceholderPlugin.js.flow +0 -2
  55. package/SpacerMarkSpec.js +1 -1
  56. package/StyleView.js +3 -4
  57. package/StyleView.js.flow +0 -1
  58. package/TableBackgroundColorCommand.js +13 -16
  59. package/TableBackgroundColorCommand.js.flow +14 -18
  60. package/TableBorderColorCommand.js +13 -16
  61. package/TableBorderColorCommand.js.flow +14 -20
  62. package/TableCellColorCommand.js +11 -13
  63. package/TableCellColorCommand.js.flow +2 -4
  64. package/TableCellMenuPlugin.js +16 -16
  65. package/TableCellMenuPlugin.js.flow +5 -8
  66. package/TableInsertCommand.js +12 -15
  67. package/TableInsertCommand.js.flow +3 -6
  68. package/TableMergeCellsCommand.js +13 -12
  69. package/TableMergeCellsCommand.js.flow +4 -3
  70. package/TableNodesSpecs.js +4 -2
  71. package/TableNodesSpecs.js.flow +4 -2
  72. package/TableResizePlugin.js +18 -18
  73. package/TableResizePlugin.js.flow +2 -3
  74. package/TextInsertTabSpaceCommand.js +9 -9
  75. package/Types.js +1 -0
  76. package/Types.js.flow +2 -5
  77. package/WebFontLoader.js +4 -4
  78. package/bom.xml +20047 -28206
  79. package/buildEditorPlugins.js +4 -4
  80. package/buildInputRules.js +8 -4
  81. package/buildInputRules.js.flow +8 -4
  82. package/client/CollabConnector.js +9 -9
  83. package/client/EditorConnection.js +8 -6
  84. package/client/EditorConnection.js.flow +3 -2
  85. package/client/Licit.js +22 -59
  86. package/client/Licit.js.flow +12 -45
  87. package/client/Licit.test.js +49 -39
  88. package/client/Licit.test.js.flow +40 -34
  89. package/client/Reporter.js +3 -3
  90. package/client/SimpleConnector.js +4 -4
  91. package/client/http.js +0 -6
  92. package/client/http.js.flow +0 -8
  93. package/client/throttle.js +8 -2
  94. package/client/throttle.js.flow +2 -2
  95. package/convertFromDOMElement.js +2 -4
  96. package/convertFromDOMElement.js.flow +2 -5
  97. package/convertFromHTML.js +2 -3
  98. package/convertFromHTML.js.flow +2 -4
  99. package/convertFromJSON.js +1 -2
  100. package/convertFromJSON.js.flow +1 -2
  101. package/convertToCSSPTValue.js +6 -10
  102. package/convertToCSSPTValue.js.flow +8 -11
  103. package/createCommand.js +9 -9
  104. package/createEditorKeyMap.js +1 -1
  105. package/createEmptyEditorState.js +2 -3
  106. package/createEmptyEditorState.js.flow +2 -4
  107. package/createTableResizingPlugin.js +6 -6
  108. package/createTableResizingPlugin.js.flow +1 -1
  109. package/findActiveMark.js +1 -1
  110. package/findActiveMark.js.flow +1 -1
  111. package/insertTable.js +0 -3
  112. package/insertTable.js.flow +0 -2
  113. package/joinDown.js +1 -3
  114. package/joinDown.js.flow +1 -3
  115. package/joinUp.js +1 -3
  116. package/joinUp.js.flow +1 -3
  117. package/lookUpElement.js +2 -1
  118. package/lookUpElement.js.flow +1 -1
  119. package/normalizeHTML.js +3 -1
  120. package/normalizeHTML.js.flow +3 -1
  121. package/package.json +23 -17
  122. package/patchAnchorElements.js +1 -1
  123. package/patchAnchorElements.js.flow +1 -1
  124. package/patchBreakElements.js +3 -2
  125. package/patchBreakElements.js.flow +2 -2
  126. package/patchElementInlineStyles.js +1 -1
  127. package/patchElementInlineStyles.js.flow +1 -1
  128. package/patchListElements.js +6 -7
  129. package/patchListElements.js.flow +7 -8
  130. package/patchMathElements.js +5 -7
  131. package/patchMathElements.js.flow +2 -4
  132. package/patchStyleElements.js +1 -1
  133. package/patchStyleElements.js.flow +7 -6
  134. package/patchTableElements.js +2 -3
  135. package/patchTableElements.js.flow +2 -3
  136. package/sanitizeURL.js +1 -1
  137. package/sanitizeURL.js.flow +1 -1
  138. package/splitListItem.js +2 -2
  139. package/splitListItem.js.flow +1 -1
  140. package/styles.css +32 -3
  141. package/toggleBlockquote.js +4 -5
  142. package/toggleBlockquote.js.flow +5 -12
  143. package/toggleCodeBlock.js +6 -6
  144. package/toggleCodeBlock.js.flow +10 -10
  145. package/ui/AlertInfo.js +9 -10
  146. package/ui/AlertInfo.js.flow +0 -1
  147. package/ui/BookmarkNodeView.js +13 -13
  148. package/ui/BookmarkNodeView.js.flow +0 -2
  149. package/ui/CommandButton.js +9 -9
  150. package/ui/CommandMenu.js +12 -12
  151. package/ui/CommandMenu.js.flow +1 -1
  152. package/ui/CommandMenuButton.js +11 -13
  153. package/ui/CommandMenuButton.js.flow +2 -5
  154. package/ui/CustomEditorView.js +13 -12
  155. package/ui/CustomEditorView.js.flow +1 -0
  156. package/ui/CustomMenu.js +8 -10
  157. package/ui/CustomMenu.js.flow +0 -3
  158. package/ui/CustomMenuItem.js +10 -11
  159. package/ui/CustomMenuItem.js.flow +0 -1
  160. package/ui/CustomNodeView.js +27 -16
  161. package/ui/CustomNodeView.js.flow +16 -9
  162. package/ui/CustomRadioButton.js +13 -16
  163. package/ui/CustomRadioButton.js.flow +2 -4
  164. package/ui/DocLayoutEditor.js +10 -13
  165. package/ui/DocLayoutEditor.js.flow +1 -5
  166. package/ui/Editor.js +16 -16
  167. package/ui/Editor.js.flow +7 -12
  168. package/ui/EditorFrameset.js +9 -10
  169. package/ui/EditorFrameset.js.flow +0 -2
  170. package/ui/EditorToolbar.js +24 -30
  171. package/ui/EditorToolbar.js.flow +22 -43
  172. package/ui/EditorToolbarConfig.js +5 -5
  173. package/ui/EditorToolbarConfig.js.flow +1 -1
  174. package/ui/FontSizeCommandMenuButton.js +10 -10
  175. package/ui/FontSizeCommandMenuButton.js.flow +1 -1
  176. package/ui/FontTypeCommandMenuButton.js +11 -12
  177. package/ui/FontTypeCommandMenuButton.js.flow +4 -5
  178. package/ui/Frag.js +8 -9
  179. package/ui/Frag.js.flow +0 -2
  180. package/ui/Icon.js +12 -18
  181. package/ui/Icon.js.flow +0 -7
  182. package/ui/ImageInlineEditor.js +9 -10
  183. package/ui/ImageInlineEditor.js.flow +0 -1
  184. package/ui/LinkTooltip.js +62 -28
  185. package/ui/LinkTooltip.js.flow +55 -24
  186. package/ui/LinkURLEditor.js +151 -36
  187. package/ui/LinkURLEditor.js.flow +176 -54
  188. package/ui/ListItemNodeView.js +4 -4
  189. package/ui/ListTypeButton.js +11 -15
  190. package/ui/ListTypeButton.js.flow +2 -6
  191. package/ui/ListTypeCommandButton.js +10 -10
  192. package/ui/ListTypeCommandButton.js.flow +1 -1
  193. package/ui/ListTypeMenu.js +11 -12
  194. package/ui/ListTypeMenu.js.flow +1 -2
  195. package/ui/LoadingIndicator.js +8 -9
  196. package/ui/LoadingIndicator.js.flow +0 -1
  197. package/ui/MathEditor.js +10 -15
  198. package/ui/MathEditor.js.flow +1 -9
  199. package/ui/MathInlineEditor.js +13 -14
  200. package/ui/MathInlineEditor.js.flow +3 -5
  201. package/ui/MathNodeView.js +16 -16
  202. package/ui/MathNodeView.js.flow +10 -21
  203. package/ui/PasteMenu.js +11 -15
  204. package/ui/PasteMenu.js.flow +0 -5
  205. package/ui/ResizeObserver.js +4 -4
  206. package/ui/ResizeObserver.js.flow +3 -4
  207. package/ui/RichTextEditor.js +9 -9
  208. package/ui/SelectionObserver.js +6 -6
  209. package/ui/SelectionObserver.js.flow +2 -2
  210. package/ui/TableCellMenu.js +9 -10
  211. package/ui/TableCellMenu.js.flow +0 -2
  212. package/ui/TableGridSizeEditor.js +12 -15
  213. package/ui/TableGridSizeEditor.js.flow +7 -6
  214. package/ui/TableNodeView.js +15 -13
  215. package/ui/TableNodeView.js.flow +3 -3
  216. package/ui/bindScrollHandler.js +2 -1
  217. package/ui/bindScrollHandler.js.flow +1 -1
  218. package/ui/canUseCSSFont.js +5 -4
  219. package/ui/canUseCSSFont.js.flow +4 -5
  220. package/ui/czi-editor.css +1 -4
  221. package/ui/czi-form.css +102 -8
  222. package/ui/czi-image-view.css +1 -5
  223. package/ui/czi-link-tooltip.css +41 -0
  224. package/ui/czi-list.css +0 -4
  225. package/ui/czi-loading-indicator.css +1 -46
  226. package/ui/czi-table-cell-menu.css +3 -1
  227. package/ui/findActiveFontSize.js +2 -1
  228. package/ui/findActiveFontSize.js.flow +1 -4
  229. package/ui/findActiveFontType.js +4 -3
  230. package/ui/findActiveFontType.js.flow +3 -6
  231. package/ui/handleEditorDrop.js +1 -1
  232. package/ui/handleEditorDrop.js.flow +1 -1
  233. package/ui/handleEditorKeyDown.js +1 -1
  234. package/ui/handleEditorKeyDown.js.flow +1 -1
  235. package/ui/handleEditorPaste.js +1 -1
  236. package/ui/handleEditorPaste.js.flow +1 -1
  237. package/ui/injectStyleSheet.js +2 -2
  238. package/ui/injectStyleSheet.js.flow +2 -4
  239. package/ui/isElementFullyVisible.js +1 -10
  240. package/ui/isElementFullyVisible.js.flow +1 -13
  241. package/ui/mathquill-editor/MathQuillEditor.js +12 -14
  242. package/ui/mathquill-editor/MathQuillEditor.js.flow +0 -2
  243. package/ui/mathquill-editor/MathQuillEditorSymbolsPanel.js +9 -10
  244. package/ui/mathquill-editor/MathQuillEditorSymbolsPanel.js.flow +0 -1
  245. package/ui/mathquill-editor/mathquill-import-kludge.js +1 -9
  246. package/ui/mathquill-editor/mathquill-import-kludge.js.flow +0 -9
  247. package/ui/renderLaTeXAsHTML.js +3 -7
  248. package/ui/renderLaTeXAsHTML.js.flow +0 -4
  249. package/ui/resolveImage.js +4 -5
  250. package/ui/resolveImage.js.flow +3 -5
  251. package/ui/toCSSLineSpacing.js +2 -3
  252. package/ui/toCSSLineSpacing.js.flow +2 -4
  253. package/styles0.css +0 -29
@@ -1,28 +1,24 @@
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(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
3
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
4
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
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(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
7
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
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(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
10
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
11
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
12
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
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 nullthrows from 'nullthrows';
16
15
  import { EditorState } from 'prosemirror-state';
17
16
  import { setCellAttr } from 'prosemirror-tables';
18
17
  import { Transform } from 'prosemirror-transform';
19
18
  import { EditorView } from 'prosemirror-view';
20
19
  import { ColorEditor } from '@modusoperandi/color-picker';
21
- import { atAnchorRight } from '@modusoperandi/licit-ui-commands';
20
+ import { atAnchorRight, createPopUp, findNodesWithSameMark, MARK_TEXT_COLOR } from '@modusoperandi/licit-ui-commands';
22
21
  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
22
  var setCellBorderBlack = setCellAttr('borderColor', '#000000');
27
23
  var TableBorderColorCommand = /*#__PURE__*/function (_UICommand) {
28
24
  function TableBorderColorCommand() {
@@ -43,7 +39,7 @@ var TableBorderColorCommand = /*#__PURE__*/function (_UICommand) {
43
39
  if (_this._popUp) {
44
40
  return Promise.resolve(undefined);
45
41
  }
46
- var target = nullthrows(event).currentTarget;
42
+ var target = event === null || event === void 0 ? void 0 : event.currentTarget;
47
43
  if (!(target instanceof HTMLElement)) {
48
44
  return Promise.resolve(undefined);
49
45
  }
@@ -87,7 +83,8 @@ var TableBorderColorCommand = /*#__PURE__*/function (_UICommand) {
87
83
  return _createClass(TableBorderColorCommand, [{
88
84
  key: "cancel",
89
85
  value: function cancel() {
90
- this._popUp && this._popUp.close(undefined);
86
+ var _this$_popUp;
87
+ (_this$_popUp = this._popUp) === null || _this$_popUp === void 0 || _this$_popUp.close(undefined);
91
88
  }
92
89
  }]);
93
90
  }(UICommand);
@@ -1,18 +1,12 @@
1
1
  // @flow
2
2
 
3
- import nullthrows from 'nullthrows';
4
3
  import { EditorState } from 'prosemirror-state';
5
4
  import { setCellAttr } from 'prosemirror-tables';
6
5
  import { Transform } from 'prosemirror-transform';
7
6
  import { EditorView } from 'prosemirror-view';
8
7
  import { ColorEditor } from '@modusoperandi/color-picker';
9
- import { atAnchorRight } from '@modusoperandi/licit-ui-commands';
8
+ import { atAnchorRight, createPopUp, findNodesWithSameMark, MARK_TEXT_COLOR } from '@modusoperandi/licit-ui-commands';
10
9
  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
10
 
17
11
  const setCellBorderBlack = setCellAttr('borderColor', '#000000');
18
12
 
@@ -36,7 +30,7 @@ class TableBorderColorCommand extends UICommand {
36
30
  if (this._popUp) {
37
31
  return Promise.resolve(undefined);
38
32
  }
39
- const target = nullthrows(event).currentTarget;
33
+ const target = event?.currentTarget;
40
34
  if (!(target instanceof HTMLElement)) {
41
35
  return Promise.resolve(undefined);
42
36
  }
@@ -49,18 +43,18 @@ class TableBorderColorCommand extends UICommand {
49
43
  const hex = result ? result.mark.attrs.color : null;
50
44
 
51
45
  return new Promise((resolve) => {
52
- this._popUp = createPopUp(ColorEditor,{ hex, runtime: view.runtime },
46
+ this._popUp = createPopUp(ColorEditor, { hex, runtime: view.runtime },
53
47
  {
54
- anchor,
55
- autoDismiss: false,
56
- position: atAnchorRight,
57
- onClose: (val) => {
58
- if (this._popUp) {
59
- this._popUp = null;
60
- resolve(val);
61
- }
62
- },
63
- });
48
+ anchor,
49
+ autoDismiss: false,
50
+ position: atAnchorRight,
51
+ onClose: (val) => {
52
+ if (this._popUp) {
53
+ this._popUp = null;
54
+ resolve(val);
55
+ }
56
+ },
57
+ });
64
58
  });
65
59
  };
66
60
 
@@ -79,7 +73,7 @@ class TableBorderColorCommand extends UICommand {
79
73
  };
80
74
 
81
75
  cancel(): void {
82
- this._popUp && this._popUp.close(undefined);
76
+ this._popUp?.close(undefined);
83
77
  }
84
78
  }
85
79
 
@@ -1,26 +1,24 @@
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(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
3
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
4
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
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(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
7
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
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(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
10
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
11
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
12
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
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 nullthrows from 'nullthrows';
16
15
  import { EditorState } from 'prosemirror-state';
17
16
  import { setCellAttr } from 'prosemirror-tables';
18
17
  import { Transform } from 'prosemirror-transform';
19
18
  import { EditorView } from 'prosemirror-view';
20
19
  import { ColorEditor } from '@modusoperandi/color-picker';
21
- import { atAnchorRight } from '@modusoperandi/licit-ui-commands';
20
+ import { atAnchorRight, createPopUp } from '@modusoperandi/licit-ui-commands';
22
21
  import { UICommand } from '@modusoperandi/licit-doc-attrs-step';
23
- import { createPopUp } from '@modusoperandi/licit-ui-commands';
24
22
  var setCellBackgroundBlack = setCellAttr('background', '#000000');
25
23
  var TableCellColorCommand = /*#__PURE__*/function (_UICommand) {
26
24
  function TableCellColorCommand() {
@@ -41,7 +39,7 @@ var TableCellColorCommand = /*#__PURE__*/function (_UICommand) {
41
39
  if (_this._popUp) {
42
40
  return Promise.resolve(undefined);
43
41
  }
44
- var target = nullthrows(event).currentTarget;
42
+ var target = event === null || event === void 0 ? void 0 : event.currentTarget;
45
43
  if (!(target instanceof HTMLElement)) {
46
44
  return Promise.resolve(undefined);
47
45
  }
@@ -1,14 +1,12 @@
1
1
  // @flow
2
2
 
3
- import nullthrows from 'nullthrows';
4
3
  import { EditorState } from 'prosemirror-state';
5
4
  import { setCellAttr } from 'prosemirror-tables';
6
5
  import { Transform } from 'prosemirror-transform';
7
6
  import { EditorView } from 'prosemirror-view';
8
7
  import { ColorEditor } from '@modusoperandi/color-picker';
9
- import { atAnchorRight } from '@modusoperandi/licit-ui-commands';
8
+ import { atAnchorRight, createPopUp } from '@modusoperandi/licit-ui-commands';
10
9
  import { UICommand } from '@modusoperandi/licit-doc-attrs-step';
11
- import { createPopUp } from '@modusoperandi/licit-ui-commands';
12
10
 
13
11
  const setCellBackgroundBlack = setCellAttr('background', '#000000');
14
12
 
@@ -32,7 +30,7 @@ class TableCellColorCommand extends UICommand {
32
30
  if (this._popUp) {
33
31
  return Promise.resolve(undefined);
34
32
  }
35
- const target = nullthrows(event).currentTarget;
33
+ const target = event?.currentTarget;
36
34
  if (!(target instanceof HTMLElement)) {
37
35
  return Promise.resolve(undefined);
38
36
  }
@@ -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(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
4
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
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(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
7
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
8
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
9
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
10
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
11
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
12
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
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,12 +17,10 @@ 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
- import '@modusoperandi/licit-ui-commands/ui/czi-pop-up.css';
26
24
  import { CellSelection } from 'prosemirror-tables';
27
25
  var TableCellTooltipView = /*#__PURE__*/function () {
28
26
  function TableCellTooltipView(editorView) {
@@ -32,7 +30,8 @@ var TableCellTooltipView = /*#__PURE__*/function () {
32
30
  _defineProperty(this, "_popUp", null);
33
31
  _defineProperty(this, "_scrollHandle", null);
34
32
  _defineProperty(this, "destroy", function () {
35
- _this._popUp && _this._popUp.close();
33
+ var _this$_popUp;
34
+ (_this$_popUp = _this._popUp) === null || _this$_popUp === void 0 || _this$_popUp.close();
36
35
  _this._popUp = null;
37
36
  });
38
37
  _defineProperty(this, "_onOpen", function () {
@@ -43,8 +42,9 @@ var TableCellTooltipView = /*#__PURE__*/function () {
43
42
  _this._scrollHandle = bindScrollHandler(cellEl, _this._onScroll);
44
43
  });
45
44
  _defineProperty(this, "_onClose", function () {
45
+ var _this$_scrollHandle;
46
46
  _this._popUp = null;
47
- _this._scrollHandle && _this._scrollHandle.dispose();
47
+ (_this$_scrollHandle = _this._scrollHandle) === null || _this$_scrollHandle === void 0 || _this$_scrollHandle.dispose();
48
48
  _this._scrollHandle = null;
49
49
  });
50
50
  _defineProperty(this, "_onScroll", function () {
@@ -93,14 +93,14 @@ var TableCellTooltipView = /*#__PURE__*/function () {
93
93
  }
94
94
  if (!cellEl) {
95
95
  // Closes the popup.
96
- popUp && popUp.close();
96
+ popUp === null || popUp === void 0 || popUp.close();
97
97
  this._cellElement = null;
98
98
  } else if (popUp && cellEl === this._cellElement) {
99
99
  // Updates the popup.
100
100
  popUp.update(viewPops);
101
101
  } else {
102
102
  // Creates a new popup.
103
- popUp && popUp.close();
103
+ popUp === null || popUp === void 0 || popUp.close();
104
104
  this._cellElement = cellEl;
105
105
  // [FS] IRAD-1009 2020-07-16
106
106
  // Does not allow Table Menu Popuup button in disable mode
@@ -6,13 +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
- import '@modusoperandi/licit-ui-commands/ui/czi-pop-up.css';
16
13
  import { CellSelection } from 'prosemirror-tables';
17
14
 
18
15
  class TableCellTooltipView {
@@ -59,14 +56,14 @@ class TableCellTooltipView {
59
56
 
60
57
  if (!cellEl) {
61
58
  // Closes the popup.
62
- popUp && popUp.close();
59
+ popUp?.close();
63
60
  this._cellElement = null;
64
61
  } else if (popUp && cellEl === this._cellElement) {
65
62
  // Updates the popup.
66
63
  popUp.update(viewPops);
67
64
  } else {
68
65
  // Creates a new popup.
69
- popUp && popUp.close();
66
+ popUp?.close();
70
67
  this._cellElement = cellEl;
71
68
  // [FS] IRAD-1009 2020-07-16
72
69
  // Does not allow Table Menu Popuup button in disable mode
@@ -83,7 +80,7 @@ class TableCellTooltipView {
83
80
  }
84
81
 
85
82
  destroy = (): void => {
86
- this._popUp && this._popUp.close();
83
+ this._popUp?.close();
87
84
  this._popUp = null;
88
85
  };
89
86
 
@@ -97,7 +94,7 @@ class TableCellTooltipView {
97
94
 
98
95
  _onClose = (): void => {
99
96
  this._popUp = null;
100
- this._scrollHandle && this._scrollHandle.dispose();
97
+ this._scrollHandle?.dispose();
101
98
  this._scrollHandle = null;
102
99
  };
103
100
 
@@ -1,28 +1,25 @@
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(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
3
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
4
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
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(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
7
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
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(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
10
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
11
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
12
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
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 nullthrows from 'nullthrows';
16
- import { EditorState } from 'prosemirror-state';
17
- import { TextSelection } from 'prosemirror-state';
15
+ import { EditorState, TextSelection } from 'prosemirror-state';
18
16
  import { Transform } from 'prosemirror-transform';
19
17
  import { EditorView } from 'prosemirror-view';
20
18
  import { Fragment } from 'prosemirror-model';
21
19
  import insertTable from './insertTable.js';
22
- import { atAnchorRight } from '@modusoperandi/licit-ui-commands';
20
+ import { atAnchorRight, createPopUp } from '@modusoperandi/licit-ui-commands';
23
21
  import TableGridSizeEditor from './ui/TableGridSizeEditor.js';
24
22
  import { UICommand } from '@modusoperandi/licit-doc-attrs-step';
25
- import { createPopUp } from '@modusoperandi/licit-ui-commands';
26
23
  import { PARAGRAPH } from './NodeNames.js';
27
24
  var TableInsertCommand = /*#__PURE__*/function (_UICommand) {
28
25
  function TableInsertCommand() {
@@ -60,7 +57,7 @@ var TableInsertCommand = /*#__PURE__*/function (_UICommand) {
60
57
  if (_this._popUp) {
61
58
  return Promise.resolve(undefined);
62
59
  }
63
- var target = nullthrows(event).currentTarget;
60
+ var target = event === null || event === void 0 ? void 0 : event.currentTarget;
64
61
  if (!(target instanceof HTMLElement)) {
65
62
  return Promise.resolve(undefined);
66
63
  }
@@ -1,16 +1,13 @@
1
1
  // @flow
2
2
 
3
- import nullthrows from 'nullthrows';
4
- import { EditorState } from 'prosemirror-state';
5
- import { TextSelection } from 'prosemirror-state';
3
+ import { EditorState, TextSelection } from 'prosemirror-state';
6
4
  import { Transform } from 'prosemirror-transform';
7
5
  import { EditorView } from 'prosemirror-view';
8
6
  import { Fragment } from 'prosemirror-model';
9
7
  import insertTable from './insertTable.js';
10
- import { atAnchorRight } from '@modusoperandi/licit-ui-commands';
8
+ import { atAnchorRight, createPopUp } from '@modusoperandi/licit-ui-commands';
11
9
  import TableGridSizeEditor from './ui/TableGridSizeEditor.js';
12
10
  import { UICommand } from '@modusoperandi/licit-doc-attrs-step';
13
- import { createPopUp } from '@modusoperandi/licit-ui-commands';
14
11
  import {
15
12
  PARAGRAPH
16
13
  } from './NodeNames.js';
@@ -55,7 +52,7 @@ class TableInsertCommand extends UICommand {
55
52
  if (this._popUp) {
56
53
  return Promise.resolve(undefined);
57
54
  }
58
- const target = nullthrows(event).currentTarget;
55
+ const target = event?.currentTarget;
59
56
  if (!(target instanceof HTMLElement)) {
60
57
  return Promise.resolve(undefined);
61
58
  }
@@ -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(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
3
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
4
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
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(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
7
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
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(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
10
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
11
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
12
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
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().forEach(function (pos) {
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().forEach((pos) => {
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
  });
@@ -21,7 +21,8 @@ var TableNodesSpecs = tableNodes({
21
21
  },
22
22
  setDOMAttr: function setDOMAttr(value, attrs) {
23
23
  if (value) {
24
- attrs.style = (attrs.style || '') + ";border-color: ".concat(value, ";");
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
- attrs.style = (attrs.style || '') + ";background-color: ".concat(value, ";");
37
+ var colorValue = String(value);
38
+ attrs.style = (attrs.style || '') + ";background-color: ".concat(colorValue, ";");
37
39
  }
38
40
  }
39
41
  }
@@ -24,7 +24,8 @@ const TableNodesSpecs = tableNodes({
24
24
  },
25
25
  setDOMAttr(value, attrs) {
26
26
  if (value) {
27
- attrs.style = (attrs.style || '') + `;border-color: ${value};`;
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
- attrs.style = (attrs.style || '') + `;background-color: ${value};`;
40
+ const colorValue = String(value);
41
+ attrs.style = (attrs.style || '') + `;background-color: ${colorValue};`;
40
42
  }
41
43
  },
42
44
  },