@modusoperandi/licit 1.4.2 → 1.4.3
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/LinkSetURLCommand.js +1 -1
- package/LinkTooltipPlugin.js +1 -1
- package/bom.xml +7890 -7805
- package/client/Licit.js +1 -1
- package/client/Licit.js.flow +10 -9
- package/package.json +2 -2
- package/ui/Icon.js +1 -1
package/client/Licit.js
CHANGED
|
@@ -133,7 +133,7 @@ var Licit = /*#__PURE__*/function (_React$Component) {
|
|
|
133
133
|
// Only need to call if there is any difference in collab mode OR always in non-collab mode.
|
|
134
134
|
_this._connector.onEdit(transaction, _this._editorView);
|
|
135
135
|
}
|
|
136
|
-
if (transaction.docChanged || !isSameState) {
|
|
136
|
+
if (transaction.docChanged || !isSameState && !transaction.getMeta('suppressOnChange')) {
|
|
137
137
|
var _this$_editorView, _docJson$attrs;
|
|
138
138
|
var docJson = (_this$_editorView = _this._editorView) === null || _this$_editorView === void 0 || (_this$_editorView = _this$_editorView.state) === null || _this$_editorView === void 0 || (_this$_editorView = _this$_editorView.doc) === null || _this$_editorView === void 0 ? void 0 : _this$_editorView.toJSON();
|
|
139
139
|
if (!Object.isFrozen(docJson === null || docJson === void 0 || (_docJson$attrs = docJson.attrs) === null || _docJson$attrs === void 0 ? void 0 : _docJson$attrs.objectMetaData)) {
|
package/client/Licit.js.flow
CHANGED
|
@@ -508,13 +508,14 @@ class Licit extends React.Component<any, any> {
|
|
|
508
508
|
this._connector.onEdit(transaction, this._editorView);
|
|
509
509
|
}
|
|
510
510
|
|
|
511
|
-
if (transaction.docChanged || !isSameState) {
|
|
511
|
+
if (transaction.docChanged || (!isSameState && !transaction.getMeta('suppressOnChange'))) {
|
|
512
512
|
const docJson = this._editorView?.state?.doc?.toJSON();
|
|
513
513
|
if (!Object.isFrozen(docJson?.attrs?.objectMetaData)) {
|
|
514
514
|
docJson.attrs.objectMetaData = {
|
|
515
515
|
...docJson.attrs.objectMetaData,
|
|
516
|
-
lastEditedOn: new Date().toISOString().replace('Z', '+00:00')
|
|
516
|
+
lastEditedOn: new Date().toISOString().replace('Z', '+00:00')
|
|
517
517
|
};
|
|
518
|
+
|
|
518
519
|
}
|
|
519
520
|
let isEmpty = false;
|
|
520
521
|
if (docJson.content && docJson.content.length === 1) {
|
|
@@ -560,14 +561,14 @@ class Licit extends React.Component<any, any> {
|
|
|
560
561
|
const tr = state.tr;
|
|
561
562
|
dispatch(tr.scrollIntoView());
|
|
562
563
|
if (!this._editorView.editable) {
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
564
|
+
let _tr = this._editorView.state.tr;
|
|
565
|
+
let modified = false;
|
|
566
|
+
this._editorView.state.doc.descendants((node, pos) => {
|
|
567
|
+
if (node.type.name === 'table') {
|
|
567
568
|
// Apply setNodeMarkup with same type and attrs to force a refresh
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
569
|
+
_tr = _tr?.setNodeMarkup(pos, undefined, { ...node.attrs, Id: pos });
|
|
570
|
+
modified = true;
|
|
571
|
+
}
|
|
571
572
|
});
|
|
572
573
|
if (modified) {
|
|
573
574
|
this._editorView.dispatch(_tr);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@modusoperandi/licit",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.3",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"subversion": "1",
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
"exports-loader": "^5.0.0",
|
|
91
91
|
"express": "^5.1.0",
|
|
92
92
|
"file-loader": "^6.2.0",
|
|
93
|
-
"flow-bin": "^0.
|
|
93
|
+
"flow-bin": "^0.277.1",
|
|
94
94
|
"flow-copy-source": "^2.0.9",
|
|
95
95
|
"flow-typed": "^4.0.0",
|
|
96
96
|
"flow-webpack-plugin": "^1.2.0",
|
package/ui/Icon.js
CHANGED
|
@@ -13,7 +13,7 @@ function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? O
|
|
|
13
13
|
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); }
|
|
14
14
|
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
15
15
|
function _regenerator() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ var e, t, r = "function" == typeof Symbol ? Symbol : {}, n = r.iterator || "@@iterator", o = r.toStringTag || "@@toStringTag"; function i(r, n, o, i) { var c = n && n.prototype instanceof Generator ? n : Generator, u = Object.create(c.prototype); return _regeneratorDefine2(u, "_invoke", function (r, n, o) { var i, c, u, f = 0, p = o || [], y = !1, G = { p: 0, n: 0, v: e, a: d, f: d.bind(e, 4), d: function d(t, r) { return i = t, c = 0, u = e, G.n = r, a; } }; function d(r, n) { for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { var o, i = p[t], d = G.p, l = i[2]; r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); } if (o || r > 1) return a; throw y = !0, n; } return function (o, p, l) { if (f > 1) throw TypeError("Generator is already running"); for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); try { if (f = 2, i) { if (c || (o = "next"), t = i[o]) { if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); if (!t.done) return t; u = t.value, c < 2 && (c = 0); } else 1 === c && (t = i["return"]) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); i = e; } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; } catch (t) { i = e, c = 1, u = t; } finally { f = 1; } } return { value: t, done: y }; }; }(r, o, i), !0), u; } var a = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} t = Object.getPrototypeOf; var c = [][n] ? t(t([][n]())) : (_regeneratorDefine2(t = {}, n, function () { return this; }), t), u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); function f(e) { return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, _regeneratorDefine2(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, _regeneratorDefine2(u, "constructor", GeneratorFunctionPrototype), _regeneratorDefine2(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", _regeneratorDefine2(GeneratorFunctionPrototype, o, "GeneratorFunction"), _regeneratorDefine2(u), _regeneratorDefine2(u, o, "Generator"), _regeneratorDefine2(u, n, function () { return this; }), _regeneratorDefine2(u, "toString", function () { return "[object Generator]"; }), (_regenerator = function _regenerator() { return { w: i, m: f }; })(); }
|
|
16
|
-
function _regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, "", {}); } catch (e) { i = 0; } _regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) {
|
|
16
|
+
function _regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, "", {}); } catch (e) { i = 0; } _regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) { function o(r, n) { _regeneratorDefine2(e, r, function (e) { return this._invoke(r, n, e); }); } r ? i ? i(e, r, { value: n, enumerable: !t, configurable: !t, writable: !t }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2)); }, _regeneratorDefine2(e, r, n, t); }
|
|
17
17
|
function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
|
|
18
18
|
function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
|
|
19
19
|
import cx from 'classnames';
|