@difizen/libro-core 0.1.37 → 0.2.1
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/es/add-cell/libro-add-cell-view.js +1 -1
- package/es/command/libro-command-contribution.d.ts.map +1 -1
- package/es/command/libro-command-contribution.js +67 -55
- package/es/components/dnd-cell-item-render.js +1 -1
- package/es/components/dnd-component/default-dnd-content.js +1 -1
- package/es/libro-model.d.ts +7 -2
- package/es/libro-model.d.ts.map +1 -1
- package/es/libro-model.js +79 -47
- package/es/libro-protocol.d.ts +13 -4
- package/es/libro-protocol.d.ts.map +1 -1
- package/es/libro-view.d.ts.map +1 -1
- package/es/libro-view.js +2 -2
- package/package.json +5 -5
- package/src/add-cell/libro-add-cell-view.tsx +1 -1
- package/src/command/libro-command-contribution.ts +83 -57
- package/src/components/dnd-cell-item-render.tsx +1 -1
- package/src/components/dnd-component/default-dnd-content.tsx +1 -1
- package/src/libro-model.ts +21 -5
- package/src/libro-protocol.ts +15 -5
- package/src/libro-view.tsx +11 -2
package/es/libro-model.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
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
|
-
var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _dec14, _dec15, _dec16, _dec17, _dec18, _dec19, _dec20, _dec21, _dec22, _dec23, _dec24, _dec25, _dec26, _dec27, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11, _descriptor12, _descriptor13, _descriptor14, _descriptor15, _descriptor16, _descriptor17, _descriptor18, _descriptor19, _descriptor20, _descriptor21, _descriptor22, _descriptor23, _descriptor24, _descriptor25, _descriptor26;
|
|
2
|
+
var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _dec14, _dec15, _dec16, _dec17, _dec18, _dec19, _dec20, _dec21, _dec22, _dec23, _dec24, _dec25, _dec26, _dec27, _dec28, _dec29, _dec30, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11, _descriptor12, _descriptor13, _descriptor14, _descriptor15, _descriptor16, _descriptor17, _descriptor18, _descriptor19, _descriptor20, _descriptor21, _descriptor22, _descriptor23, _descriptor24, _descriptor25, _descriptor26, _descriptor27, _descriptor28, _descriptor29;
|
|
3
3
|
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
|
|
4
4
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
5
5
|
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
@@ -29,7 +29,7 @@ import { LibroContentService } from "./content/index.js";
|
|
|
29
29
|
import { isCellView, NotebookOption } from "./libro-protocol.js";
|
|
30
30
|
import { EnterEditModeWhenAddCell } from "./libro-setting.js";
|
|
31
31
|
import { VirtualizedManagerHelper } from "./virtualized-manager-helper.js";
|
|
32
|
-
export var LibroModel = (_dec = transient(), _dec2 = inject(NotebookOption), _dec3 = inject(LibroContentService), _dec4 = inject(VirtualizedManagerHelper), _dec5 = inject(ConfigurationService), _dec6 = prop(), _dec7 = prop(), _dec8 = prop(), _dec9 = prop(), _dec10 = prop(), _dec11 = prop(), _dec12 = prop(), _dec13 = prop(), _dec14 = prop(), _dec15 = prop(), _dec16 = prop(), _dec17 = prop(), _dec18 = prop(), _dec19 = prop(), _dec20 = prop(), _dec21 = prop(), _dec22 = prop(), _dec23 = prop(), _dec24 = prop(), _dec25 = prop(), _dec26 = prop(), _dec27 = prop(), _dec(_class = (_class2 = /*#__PURE__*/function () {
|
|
32
|
+
export var LibroModel = (_dec = transient(), _dec2 = inject(NotebookOption), _dec3 = inject(LibroContentService), _dec4 = inject(VirtualizedManagerHelper), _dec5 = inject(ConfigurationService), _dec6 = prop(), _dec7 = prop(), _dec8 = prop(), _dec9 = prop(), _dec10 = prop(), _dec11 = prop(), _dec12 = prop(), _dec13 = prop(), _dec14 = prop(), _dec15 = prop(), _dec16 = prop(), _dec17 = prop(), _dec18 = prop(), _dec19 = prop(), _dec20 = prop(), _dec21 = prop(), _dec22 = prop(), _dec23 = prop(), _dec24 = prop(), _dec25 = prop(), _dec26 = prop(), _dec27 = prop(), _dec28 = prop(), _dec29 = prop(), _dec30 = prop(), _dec(_class = (_class2 = /*#__PURE__*/function () {
|
|
33
33
|
function LibroModel() {
|
|
34
34
|
var _this = this;
|
|
35
35
|
_classCallCheck(this, LibroModel);
|
|
@@ -55,34 +55,37 @@ export var LibroModel = (_dec = transient(), _dec2 = inject(NotebookOption), _de
|
|
|
55
55
|
this._modelDBMutex = createMutex();
|
|
56
56
|
_initializerDefineProperty(this, "lastClipboardInteraction", _descriptor5, this);
|
|
57
57
|
this.clipboard = void 0;
|
|
58
|
-
_initializerDefineProperty(this, "
|
|
59
|
-
_initializerDefineProperty(this, "
|
|
60
|
-
_initializerDefineProperty(this, "
|
|
61
|
-
_initializerDefineProperty(this, "
|
|
62
|
-
_initializerDefineProperty(this, "
|
|
63
|
-
_initializerDefineProperty(this, "
|
|
64
|
-
_initializerDefineProperty(this, "
|
|
65
|
-
_initializerDefineProperty(this, "
|
|
66
|
-
_initializerDefineProperty(this, "
|
|
67
|
-
_initializerDefineProperty(this, "
|
|
68
|
-
_initializerDefineProperty(this, "
|
|
69
|
-
_initializerDefineProperty(this, "
|
|
70
|
-
_initializerDefineProperty(this, "
|
|
71
|
-
_initializerDefineProperty(this, "
|
|
58
|
+
_initializerDefineProperty(this, "inputEditable", _descriptor6, this);
|
|
59
|
+
_initializerDefineProperty(this, "outputEditable", _descriptor7, this);
|
|
60
|
+
_initializerDefineProperty(this, "cellsEditable", _descriptor8, this);
|
|
61
|
+
_initializerDefineProperty(this, "savable", _descriptor9, this);
|
|
62
|
+
_initializerDefineProperty(this, "runnable", _descriptor10, this);
|
|
63
|
+
_initializerDefineProperty(this, "commandMode", _descriptor11, this);
|
|
64
|
+
_initializerDefineProperty(this, "isEditMode", _descriptor12, this);
|
|
65
|
+
_initializerDefineProperty(this, "dndAreaNullEnable", _descriptor13, this);
|
|
66
|
+
_initializerDefineProperty(this, "dirty", _descriptor14, this);
|
|
67
|
+
_initializerDefineProperty(this, "cells", _descriptor15, this);
|
|
68
|
+
_initializerDefineProperty(this, "active", _descriptor16, this);
|
|
69
|
+
_initializerDefineProperty(this, "activeIndex", _descriptor17, this);
|
|
70
|
+
_initializerDefineProperty(this, "hover", _descriptor18, this);
|
|
71
|
+
_initializerDefineProperty(this, "isInitialized", _descriptor19, this);
|
|
72
|
+
_initializerDefineProperty(this, "executeCount", _descriptor20, this);
|
|
73
|
+
_initializerDefineProperty(this, "mouseMode", _descriptor21, this);
|
|
74
|
+
_initializerDefineProperty(this, "selections", _descriptor22, this);
|
|
72
75
|
this.deletedCells = [];
|
|
73
76
|
this.metadata = {};
|
|
74
|
-
_initializerDefineProperty(this, "customParams",
|
|
75
|
-
_initializerDefineProperty(this, "libroViewClass",
|
|
76
|
-
_initializerDefineProperty(this, "canUndo",
|
|
77
|
-
_initializerDefineProperty(this, "canRedo",
|
|
77
|
+
_initializerDefineProperty(this, "customParams", _descriptor23, this);
|
|
78
|
+
_initializerDefineProperty(this, "libroViewClass", _descriptor24, this);
|
|
79
|
+
_initializerDefineProperty(this, "canUndo", _descriptor25, this);
|
|
80
|
+
_initializerDefineProperty(this, "canRedo", _descriptor26, this);
|
|
78
81
|
/**
|
|
79
82
|
* 默认为true,可以在metadata修改
|
|
80
83
|
*/
|
|
81
|
-
_initializerDefineProperty(this, "trusted",
|
|
84
|
+
_initializerDefineProperty(this, "trusted", _descriptor27, this);
|
|
82
85
|
// 字体大小
|
|
83
|
-
_initializerDefineProperty(this, "fontSize",
|
|
86
|
+
_initializerDefineProperty(this, "fontSize", _descriptor28, this);
|
|
84
87
|
// 主题
|
|
85
|
-
_initializerDefineProperty(this, "theme",
|
|
88
|
+
_initializerDefineProperty(this, "theme", _descriptor29, this);
|
|
86
89
|
this.cellViewCache = new Map();
|
|
87
90
|
this.nbformat_minor = 4;
|
|
88
91
|
this.nbformat = 4;
|
|
@@ -118,7 +121,7 @@ export var LibroModel = (_dec = transient(), _dec2 = inject(NotebookOption), _de
|
|
|
118
121
|
currpos += delta.retain;
|
|
119
122
|
}
|
|
120
123
|
});
|
|
121
|
-
if (_this.
|
|
124
|
+
if (!_this.inputEditable && !_this.isInitialized) {
|
|
122
125
|
_this.selectCell(undefined);
|
|
123
126
|
return;
|
|
124
127
|
}
|
|
@@ -314,6 +317,14 @@ export var LibroModel = (_dec = transient(), _dec2 = inject(NotebookOption), _de
|
|
|
314
317
|
value: function onCellContentChange(change) {
|
|
315
318
|
this.onCellContentChangedEmitter.fire(change);
|
|
316
319
|
}
|
|
320
|
+
}, {
|
|
321
|
+
key: "executable",
|
|
322
|
+
get: function get() {
|
|
323
|
+
return this.outputEditable && this.runnable;
|
|
324
|
+
},
|
|
325
|
+
set: function set(value) {
|
|
326
|
+
this.runnable = value;
|
|
327
|
+
}
|
|
317
328
|
}, {
|
|
318
329
|
key: "getCells",
|
|
319
330
|
value: function getCells() {
|
|
@@ -737,143 +748,164 @@ export var LibroModel = (_dec = transient(), _dec2 = inject(NotebookOption), _de
|
|
|
737
748
|
enumerable: true,
|
|
738
749
|
writable: true,
|
|
739
750
|
initializer: null
|
|
740
|
-
}), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "
|
|
751
|
+
}), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "inputEditable", [_dec7], {
|
|
741
752
|
configurable: true,
|
|
742
753
|
enumerable: true,
|
|
743
754
|
writable: true,
|
|
744
755
|
initializer: function initializer() {
|
|
745
|
-
return
|
|
756
|
+
return true;
|
|
746
757
|
}
|
|
747
|
-
}), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, "
|
|
758
|
+
}), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, "outputEditable", [_dec8], {
|
|
748
759
|
configurable: true,
|
|
749
760
|
enumerable: true,
|
|
750
761
|
writable: true,
|
|
751
762
|
initializer: function initializer() {
|
|
752
763
|
return true;
|
|
753
764
|
}
|
|
754
|
-
}), _descriptor8 = _applyDecoratedDescriptor(_class2.prototype, "
|
|
765
|
+
}), _descriptor8 = _applyDecoratedDescriptor(_class2.prototype, "cellsEditable", [_dec9], {
|
|
755
766
|
configurable: true,
|
|
756
767
|
enumerable: true,
|
|
757
768
|
writable: true,
|
|
758
769
|
initializer: function initializer() {
|
|
759
770
|
return true;
|
|
760
771
|
}
|
|
761
|
-
}), _descriptor9 = _applyDecoratedDescriptor(_class2.prototype, "
|
|
772
|
+
}), _descriptor9 = _applyDecoratedDescriptor(_class2.prototype, "savable", [_dec10], {
|
|
762
773
|
configurable: true,
|
|
763
774
|
enumerable: true,
|
|
764
775
|
writable: true,
|
|
765
776
|
initializer: function initializer() {
|
|
766
|
-
return
|
|
777
|
+
return true;
|
|
778
|
+
}
|
|
779
|
+
}), _descriptor10 = _applyDecoratedDescriptor(_class2.prototype, "runnable", [_dec11], {
|
|
780
|
+
configurable: true,
|
|
781
|
+
enumerable: true,
|
|
782
|
+
writable: true,
|
|
783
|
+
initializer: function initializer() {
|
|
784
|
+
return true;
|
|
785
|
+
}
|
|
786
|
+
}), _descriptor11 = _applyDecoratedDescriptor(_class2.prototype, "commandMode", [_dec12], {
|
|
787
|
+
configurable: true,
|
|
788
|
+
enumerable: true,
|
|
789
|
+
writable: true,
|
|
790
|
+
initializer: function initializer() {
|
|
791
|
+
return true;
|
|
792
|
+
}
|
|
793
|
+
}), _descriptor12 = _applyDecoratedDescriptor(_class2.prototype, "isEditMode", [_dec13], {
|
|
794
|
+
configurable: true,
|
|
795
|
+
enumerable: true,
|
|
796
|
+
writable: true,
|
|
797
|
+
initializer: function initializer() {
|
|
798
|
+
return true;
|
|
767
799
|
}
|
|
768
|
-
}),
|
|
800
|
+
}), _descriptor13 = _applyDecoratedDescriptor(_class2.prototype, "dndAreaNullEnable", [_dec14], {
|
|
769
801
|
configurable: true,
|
|
770
802
|
enumerable: true,
|
|
771
803
|
writable: true,
|
|
772
804
|
initializer: function initializer() {
|
|
773
805
|
return false;
|
|
774
806
|
}
|
|
775
|
-
}),
|
|
807
|
+
}), _descriptor14 = _applyDecoratedDescriptor(_class2.prototype, "dirty", [_dec15], {
|
|
776
808
|
configurable: true,
|
|
777
809
|
enumerable: true,
|
|
778
810
|
writable: true,
|
|
779
811
|
initializer: function initializer() {
|
|
780
812
|
return false;
|
|
781
813
|
}
|
|
782
|
-
}),
|
|
814
|
+
}), _descriptor15 = _applyDecoratedDescriptor(_class2.prototype, "cells", [_dec16], {
|
|
783
815
|
configurable: true,
|
|
784
816
|
enumerable: true,
|
|
785
817
|
writable: true,
|
|
786
818
|
initializer: function initializer() {
|
|
787
819
|
return [];
|
|
788
820
|
}
|
|
789
|
-
}),
|
|
821
|
+
}), _descriptor16 = _applyDecoratedDescriptor(_class2.prototype, "active", [_dec17], {
|
|
790
822
|
configurable: true,
|
|
791
823
|
enumerable: true,
|
|
792
824
|
writable: true,
|
|
793
825
|
initializer: null
|
|
794
|
-
}),
|
|
826
|
+
}), _descriptor17 = _applyDecoratedDescriptor(_class2.prototype, "activeIndex", [_dec18], {
|
|
795
827
|
configurable: true,
|
|
796
828
|
enumerable: true,
|
|
797
829
|
writable: true,
|
|
798
830
|
initializer: function initializer() {
|
|
799
831
|
return 0;
|
|
800
832
|
}
|
|
801
|
-
}),
|
|
833
|
+
}), _descriptor18 = _applyDecoratedDescriptor(_class2.prototype, "hover", [_dec19], {
|
|
802
834
|
configurable: true,
|
|
803
835
|
enumerable: true,
|
|
804
836
|
writable: true,
|
|
805
837
|
initializer: function initializer() {
|
|
806
838
|
return undefined;
|
|
807
839
|
}
|
|
808
|
-
}),
|
|
840
|
+
}), _descriptor19 = _applyDecoratedDescriptor(_class2.prototype, "isInitialized", [_dec20], {
|
|
809
841
|
configurable: true,
|
|
810
842
|
enumerable: true,
|
|
811
843
|
writable: true,
|
|
812
844
|
initializer: function initializer() {
|
|
813
845
|
return false;
|
|
814
846
|
}
|
|
815
|
-
}),
|
|
847
|
+
}), _descriptor20 = _applyDecoratedDescriptor(_class2.prototype, "executeCount", [_dec21], {
|
|
816
848
|
configurable: true,
|
|
817
849
|
enumerable: true,
|
|
818
850
|
writable: true,
|
|
819
851
|
initializer: function initializer() {
|
|
820
852
|
return 0;
|
|
821
853
|
}
|
|
822
|
-
}),
|
|
854
|
+
}), _descriptor21 = _applyDecoratedDescriptor(_class2.prototype, "mouseMode", [_dec22], {
|
|
823
855
|
configurable: true,
|
|
824
856
|
enumerable: true,
|
|
825
857
|
writable: true,
|
|
826
858
|
initializer: null
|
|
827
|
-
}),
|
|
859
|
+
}), _descriptor22 = _applyDecoratedDescriptor(_class2.prototype, "selections", [_dec23], {
|
|
828
860
|
configurable: true,
|
|
829
861
|
enumerable: true,
|
|
830
862
|
writable: true,
|
|
831
863
|
initializer: function initializer() {
|
|
832
864
|
return [];
|
|
833
865
|
}
|
|
834
|
-
}),
|
|
866
|
+
}), _descriptor23 = _applyDecoratedDescriptor(_class2.prototype, "customParams", [_dec24], {
|
|
835
867
|
configurable: true,
|
|
836
868
|
enumerable: true,
|
|
837
869
|
writable: true,
|
|
838
870
|
initializer: function initializer() {
|
|
839
871
|
return {};
|
|
840
872
|
}
|
|
841
|
-
}),
|
|
873
|
+
}), _descriptor24 = _applyDecoratedDescriptor(_class2.prototype, "libroViewClass", [_dec25], {
|
|
842
874
|
configurable: true,
|
|
843
875
|
enumerable: true,
|
|
844
876
|
writable: true,
|
|
845
877
|
initializer: function initializer() {
|
|
846
878
|
return '';
|
|
847
879
|
}
|
|
848
|
-
}),
|
|
880
|
+
}), _descriptor25 = _applyDecoratedDescriptor(_class2.prototype, "canUndo", [_dec26], {
|
|
849
881
|
configurable: true,
|
|
850
882
|
enumerable: true,
|
|
851
883
|
writable: true,
|
|
852
884
|
initializer: function initializer() {
|
|
853
885
|
return false;
|
|
854
886
|
}
|
|
855
|
-
}),
|
|
887
|
+
}), _descriptor26 = _applyDecoratedDescriptor(_class2.prototype, "canRedo", [_dec27], {
|
|
856
888
|
configurable: true,
|
|
857
889
|
enumerable: true,
|
|
858
890
|
writable: true,
|
|
859
891
|
initializer: function initializer() {
|
|
860
892
|
return false;
|
|
861
893
|
}
|
|
862
|
-
}),
|
|
894
|
+
}), _descriptor27 = _applyDecoratedDescriptor(_class2.prototype, "trusted", [_dec28], {
|
|
863
895
|
configurable: true,
|
|
864
896
|
enumerable: true,
|
|
865
897
|
writable: true,
|
|
866
898
|
initializer: function initializer() {
|
|
867
899
|
return true;
|
|
868
900
|
}
|
|
869
|
-
}),
|
|
901
|
+
}), _descriptor28 = _applyDecoratedDescriptor(_class2.prototype, "fontSize", [_dec29], {
|
|
870
902
|
configurable: true,
|
|
871
903
|
enumerable: true,
|
|
872
904
|
writable: true,
|
|
873
905
|
initializer: function initializer() {
|
|
874
906
|
return 12;
|
|
875
907
|
}
|
|
876
|
-
}),
|
|
908
|
+
}), _descriptor29 = _applyDecoratedDescriptor(_class2.prototype, "theme", [_dec30], {
|
|
877
909
|
configurable: true,
|
|
878
910
|
enumerable: true,
|
|
879
911
|
writable: true,
|
package/es/libro-protocol.d.ts
CHANGED
|
@@ -69,13 +69,22 @@ export interface BaseNotebookModel {
|
|
|
69
69
|
activeIndex: number;
|
|
70
70
|
dndAreaNullEnable: boolean;
|
|
71
71
|
/**
|
|
72
|
-
*
|
|
72
|
+
* Controlling whether the cell input is editable
|
|
73
73
|
*/
|
|
74
|
-
|
|
74
|
+
inputEditable: boolean;
|
|
75
|
+
outputEditable: boolean;
|
|
75
76
|
/**
|
|
76
|
-
*
|
|
77
|
+
* Controlling whether the cells list is editable
|
|
77
78
|
*/
|
|
78
|
-
|
|
79
|
+
cellsEditable: boolean;
|
|
80
|
+
/**
|
|
81
|
+
* Controlling whether the cells can execute
|
|
82
|
+
*/
|
|
83
|
+
runnable: boolean;
|
|
84
|
+
/**
|
|
85
|
+
* Controlling whether the notebook can save
|
|
86
|
+
*/
|
|
87
|
+
savable: boolean;
|
|
79
88
|
/**
|
|
80
89
|
* The command mode of the model.
|
|
81
90
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"libro-protocol.d.ts","sourceRoot":"","sources":["../src/libro-protocol.ts"],"names":[],"mappings":";AACA,OAAO,KAAK,EAAE,MAAM,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAC9E,OAAO,KAAK,EACV,QAAQ,EACR,KAAK,EACL,aAAa,EACb,gBAAgB,EAChB,iBAAiB,EAClB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAE9C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAEnE,eAAO,MAAM,gBAAgB;;;;CAI5B,CAAC;AAEF,eAAO,MAAM,gBAAgB;;;;;;CAM5B,CAAC;AACF,eAAO,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E,IAAI,CAAC;QAAC,MAAM,EAAE,IAAI,CAAA;KAAE;IAsBhC,qBAAqB,SAAU,QAAQ,UAYrC;IAEF,sBAAsB,SAAU,QAAQ,UAatC;IAEF,yBAAyB,aAOvB;IAEF,wBAAwB,aAOtB;IAEF,QAAQ,UAAS;IAER,OAAO;IAQhB,gBAAgB,cAAe,OAAO,UAUpC;IAEF,aAAa,aAIX;IAEF,cAAc,SAAU,QAAQ,UAO9B;IAEF,YAAY,SAAU,QAAQ,UAO5B;IAEF,cAAc,SAAgB,QAAQ,mBA+BpC;IAEF,cAAc,SAAgB,QAAQ,mBA8BpC;IAEF,UAAU,SAAgB,QAAQ,mBAgChC;IACF,aAAa,aAEX;IAEF,SAAS,SAAgB,QAAQ,mBA0C/B;IACF,kBAAkB,aAKhB;IAEF,gBAAgB,aAId;IAEF;;OAEG;IACH,iBAAiB,SAAgB,QAAQ,SAAS,MAAM,mBAqEtD;IAEF,YAAY,CAAC,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO;IAI9C,IAAI;CAYL"}
|
package/es/libro-view.js
CHANGED
|
@@ -173,14 +173,14 @@ export var LibroRender = /*#__PURE__*/forwardRef(function LibroRender(props, ref
|
|
|
173
173
|
if (ref !== null && ref !== void 0 && (_ref$current = ref.current) !== null && _ref$current !== void 0 && _ref$current.contains(e.relatedTarget)) {
|
|
174
174
|
var _ref$current2;
|
|
175
175
|
var dndDom = ref === null || ref === void 0 || (_ref$current2 = ref.current) === null || _ref$current2 === void 0 ? void 0 : _ref$current2.getElementsByClassName('libro-dnd-cells-container')[0];
|
|
176
|
-
if (!(dndDom !== null && dndDom !== void 0 && dndDom.contains(e.relatedTarget)) && instance.model.
|
|
176
|
+
if (!(dndDom !== null && dndDom !== void 0 && dndDom.contains(e.relatedTarget)) && (!instance.model.inputEditable || !instance.model.outputEditable || !instance.model.cellsEditable)) {
|
|
177
177
|
instance.selectCell(undefined);
|
|
178
178
|
}
|
|
179
179
|
} else {
|
|
180
180
|
instance.enterCommandMode(false);
|
|
181
181
|
libroService.focus = undefined;
|
|
182
182
|
instance.onBlurEmitter.fire('');
|
|
183
|
-
if (instance.model.
|
|
183
|
+
if (!instance.model.inputEditable || !instance.model.outputEditable || !instance.model.cellsEditable) {
|
|
184
184
|
instance.selectCell(undefined);
|
|
185
185
|
}
|
|
186
186
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@difizen/libro-core",
|
|
3
|
-
"version": "0.1
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"libro",
|
|
@@ -34,10 +34,10 @@
|
|
|
34
34
|
],
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@ant-design/icons": "^5.1.0",
|
|
37
|
-
"@difizen/libro-code-editor": "^0.1
|
|
38
|
-
"@difizen/libro-common": "^0.1
|
|
39
|
-
"@difizen/libro-shared-model": "^0.1
|
|
40
|
-
"@difizen/libro-virtualized": "^0.1
|
|
37
|
+
"@difizen/libro-code-editor": "^0.2.1",
|
|
38
|
+
"@difizen/libro-common": "^0.2.1",
|
|
39
|
+
"@difizen/libro-shared-model": "^0.2.1",
|
|
40
|
+
"@difizen/libro-virtualized": "^0.2.1",
|
|
41
41
|
"@difizen/mana-app": "latest",
|
|
42
42
|
"@difizen/mana-l10n": "latest",
|
|
43
43
|
"@difizen/mana-react": "latest",
|
|
@@ -66,7 +66,7 @@ export const LibroAddCell: React.FC = () => {
|
|
|
66
66
|
export const LibroWrappedAddCell = forwardRef(function LibroWrappedAddCell() {
|
|
67
67
|
const instance = useInject<LibroAddCellView>(ViewInstance);
|
|
68
68
|
return (
|
|
69
|
-
<DisplayWrapComponent mode={instance.parent?.model.
|
|
69
|
+
<DisplayWrapComponent mode={!instance.parent?.model.cellsEditable}>
|
|
70
70
|
<LibroAddCell />
|
|
71
71
|
</DisplayWrapComponent>
|
|
72
72
|
);
|