@difizen/libro-jupyter 0.0.2-alpha.0 → 0.1.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.
Files changed (103) hide show
  1. package/es/add-between-cell/add-between-cell-command-contribution.js +2 -2
  2. package/es/add-between-cell/add-between-cell.js +5 -5
  3. package/es/cell/jupyter-code-cell-model.js +1 -1
  4. package/es/cell/jupyter-code-cell-view.js +6 -6
  5. package/es/command/command-contribution.js +2 -2
  6. package/es/command/keybinding-contribution.js +1 -1
  7. package/es/components/index.less +1 -0
  8. package/es/config/config-contribution.js +1 -1
  9. package/es/configuration/libro-configuration-contribution.js +1 -1
  10. package/es/contents/content-contribution.js +2 -2
  11. package/es/file/file-command.d.ts +21 -0
  12. package/es/file/file-command.d.ts.map +1 -0
  13. package/es/file/file-command.js +469 -0
  14. package/es/file/file-create-modal-contribution.d.ts +5 -0
  15. package/es/file/file-create-modal-contribution.d.ts.map +1 -0
  16. package/es/file/file-create-modal-contribution.js +23 -0
  17. package/es/file/file-create-modal.d.ts +12 -0
  18. package/es/file/file-create-modal.d.ts.map +1 -0
  19. package/es/file/file-create-modal.js +223 -0
  20. package/es/file/file-createdir-modal-contribution.d.ts +5 -0
  21. package/es/file/file-createdir-modal-contribution.d.ts.map +1 -0
  22. package/es/file/file-createdir-modal-contribution.js +23 -0
  23. package/es/file/file-createdir-modal.d.ts +9 -0
  24. package/es/file/file-createdir-modal.d.ts.map +1 -0
  25. package/es/file/file-createdir-modal.js +168 -0
  26. package/es/file/file-icon.d.ts +11 -0
  27. package/es/file/file-icon.d.ts.map +1 -0
  28. package/es/file/file-icon.js +475 -0
  29. package/es/file/file-name-alias.js +1 -1
  30. package/es/file/file-protocol.d.ts +6 -0
  31. package/es/file/file-protocol.d.ts.map +1 -1
  32. package/es/file/file-protocol.js +7 -1
  33. package/es/file/file-rename-modal-contribution.d.ts +5 -0
  34. package/es/file/file-rename-modal-contribution.d.ts.map +1 -0
  35. package/es/file/file-rename-modal-contribution.js +23 -0
  36. package/es/file/file-rename-modal.d.ts +10 -0
  37. package/es/file/file-rename-modal.d.ts.map +1 -0
  38. package/es/file/file-rename-modal.js +150 -0
  39. package/es/file/file-service.d.ts +7 -3
  40. package/es/file/file-service.d.ts.map +1 -1
  41. package/es/file/file-service.js +155 -40
  42. package/es/file/file-tree-label-provider.js +1 -1
  43. package/es/file/file-view/index.d.ts +1 -1
  44. package/es/file/file-view/index.d.ts.map +1 -1
  45. package/es/file/file-view/index.js +7 -2
  46. package/es/file/index.d.ts +3 -0
  47. package/es/file/index.d.ts.map +1 -1
  48. package/es/file/index.js +4 -1
  49. package/es/file/index.less +98 -0
  50. package/es/file/module.d.ts.map +1 -1
  51. package/es/file/module.js +5 -1
  52. package/es/file/navigatable-view.d.ts +9 -3
  53. package/es/file/navigatable-view.d.ts.map +1 -1
  54. package/es/file/navigatable-view.js +46 -13
  55. package/es/file/open-handler-contribution.js +4 -4
  56. package/es/file/utils.d.ts +2 -0
  57. package/es/file/utils.d.ts.map +1 -0
  58. package/es/file/utils.js +43 -0
  59. package/es/index.d.ts +1 -0
  60. package/es/index.d.ts.map +1 -1
  61. package/es/index.js +1 -0
  62. package/es/keybind-instructions/keybind-instructions-contribution.js +2 -2
  63. package/es/keybind-instructions/keybind-instructions-items.js +1 -1
  64. package/es/keybind-instructions/keybind-instructions-view.js +2 -2
  65. package/es/libro-jupyter-file-service.js +3 -3
  66. package/es/libro-jupyter-model.js +2 -2
  67. package/es/libro-jupyter-protocol.d.ts +0 -4
  68. package/es/libro-jupyter-protocol.d.ts.map +1 -1
  69. package/es/libro-jupyter-protocol.js +1 -2
  70. package/es/libro-jupyter-server-launch-manager.d.ts +1 -3
  71. package/es/libro-jupyter-server-launch-manager.d.ts.map +1 -1
  72. package/es/libro-jupyter-server-launch-manager.js +4 -11
  73. package/es/libro-jupyter-view.js +1 -1
  74. package/es/output/libro-jupyter-outputarea.js +3 -3
  75. package/es/rendermime/index.less +1 -10
  76. package/es/rendermime/plotly-renderers.js +4 -4
  77. package/es/rendermime/plotly-rendermime-contribution.js +1 -1
  78. package/es/theme/color-registry.js +1 -1
  79. package/es/toolbar/kernel-selector-dropdown.js +3 -3
  80. package/es/toolbar/save-file-error-contribution.js +1 -1
  81. package/es/toolbar/toolbar-contribution.js +1 -1
  82. package/package.json +16 -16
  83. package/src/components/index.less +1 -0
  84. package/src/file/file-command.tsx +325 -0
  85. package/src/file/file-create-modal-contribution.ts +10 -0
  86. package/src/file/file-create-modal.tsx +176 -0
  87. package/src/file/file-createdir-modal-contribution.ts +10 -0
  88. package/src/file/file-createdir-modal.tsx +108 -0
  89. package/src/file/file-icon.tsx +502 -0
  90. package/src/file/file-protocol.ts +17 -0
  91. package/src/file/file-rename-modal-contribution.ts +10 -0
  92. package/src/file/file-rename-modal.tsx +103 -0
  93. package/src/file/file-service.ts +69 -33
  94. package/src/file/file-view/index.tsx +4 -1
  95. package/src/file/index.less +98 -0
  96. package/src/file/index.ts +3 -0
  97. package/src/file/module.ts +8 -0
  98. package/src/file/navigatable-view.tsx +39 -3
  99. package/src/file/utils.ts +51 -0
  100. package/src/index.spec.ts +11 -0
  101. package/src/index.ts +1 -0
  102. package/src/libro-jupyter-protocol.ts +0 -5
  103. package/src/libro-jupyter-server-launch-manager.ts +2 -11
@@ -1,9 +1,9 @@
1
- function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
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
  var _dec, _dec2, _class, _class2, _descriptor;
3
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
4
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
3
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
4
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
5
5
  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 _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 exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
6
+ 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; }
7
7
  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); } }
8
8
  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); }); }; }
9
9
  function _initializerDefineProperty(target, property, descriptor, context) { if (!descriptor) return; Object.defineProperty(target, property, { enumerable: descriptor.enumerable, configurable: descriptor.configurable, writable: descriptor.writable, value: descriptor.initializer ? descriptor.initializer.call(context) : void 0 }); }
@@ -21,8 +21,10 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
21
21
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
22
22
  function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { var desc = {}; Object.keys(descriptor).forEach(function (key) { desc[key] = descriptor[key]; }); desc.enumerable = !!desc.enumerable; desc.configurable = !!desc.configurable; if ('value' in desc || desc.initializer) { desc.writable = true; } desc = decorators.slice().reverse().reduce(function (desc, decorator) { return decorator(target, property, desc) || desc; }, desc); if (context && desc.initializer !== void 0) { desc.value = desc.initializer ? desc.initializer.call(context) : void 0; desc.initializer = undefined; } if (desc.initializer === void 0) { Object.defineProperty(target, property, desc); desc = null; } return desc; }
23
23
  function _initializerWarningHelper(descriptor, context) { throw new Error('Decorating class property failed. Please ensure that ' + 'transform-class-properties is enabled and runs after the decorators transform.'); }
24
+ import pathUtil from 'path';
24
25
  import { ContentsManager } from '@difizen/libro-kernel';
25
26
  import { FileService, URI, inject, singleton } from '@difizen/mana-app';
27
+ import { message } from 'antd';
26
28
  import { FileNameAlias } from "./file-name-alias.js";
27
29
  export var JupyterFileService = (_dec = singleton({
28
30
  token: FileService
@@ -59,23 +61,17 @@ export var JupyterFileService = (_dec = singleton({
59
61
  return _regeneratorRuntime().wrap(function _callee$(_context) {
60
62
  while (1) switch (_context.prev = _context.next) {
61
63
  case 0:
62
- _context.prev = 0;
63
- _context.next = 3;
64
+ _context.next = 2;
64
65
  return this.contentsManager.save(filePath, {
65
66
  content: content
66
67
  });
67
- case 3:
68
+ case 2:
68
69
  return _context.abrupt("return", filePath);
69
- case 6:
70
- _context.prev = 6;
71
- _context.t0 = _context["catch"](0);
72
- case 8:
73
- return _context.abrupt("return", undefined);
74
- case 9:
70
+ case 3:
75
71
  case "end":
76
72
  return _context.stop();
77
73
  }
78
- }, _callee, this, [[0, 6]]);
74
+ }, _callee, this);
79
75
  }));
80
76
  function write(_x, _x2) {
81
77
  return _write.apply(this, arguments);
@@ -92,12 +88,11 @@ export var JupyterFileService = (_dec = singleton({
92
88
  while (1) switch (_context2.prev = _context2.next) {
93
89
  case 0:
94
90
  children = [];
95
- _context2.prev = 1;
96
- _context2.next = 4;
91
+ _context2.next = 3;
97
92
  return this.contentsManager.get(dirPath, {
98
93
  type: 'directory'
99
94
  });
100
- case 4:
95
+ case 3:
101
96
  res = _context2.sent;
102
97
  if (res && this.isDirectory(res)) {
103
98
  content = res.content;
@@ -105,18 +100,12 @@ export var JupyterFileService = (_dec = singleton({
105
100
  return [item.path, _this2.isDirectory(item) ? 2 : 1];
106
101
  });
107
102
  }
108
- _context2.next = 10;
109
- break;
110
- case 8:
111
- _context2.prev = 8;
112
- _context2.t0 = _context2["catch"](1);
113
- case 10:
114
103
  return _context2.abrupt("return", children);
115
- case 11:
104
+ case 6:
116
105
  case "end":
117
106
  return _context2.stop();
118
107
  }
119
- }, _callee2, this, [[1, 8]]);
108
+ }, _callee2, this);
120
109
  }));
121
110
  function readDir(_x3) {
122
111
  return _readDir.apply(this, arguments);
@@ -132,26 +121,19 @@ export var JupyterFileService = (_dec = singleton({
132
121
  while (1) switch (_context3.prev = _context3.next) {
133
122
  case 0:
134
123
  content = undefined;
135
- _context3.prev = 1;
136
- _context3.next = 4;
124
+ _context3.next = 3;
137
125
  return this.contentsManager.get(filePath);
138
- case 4:
126
+ case 3:
139
127
  res = _context3.sent;
140
128
  if (res && !this.isDirectory(res)) {
141
129
  content = res.content;
142
130
  }
143
- _context3.next = 10;
144
- break;
145
- case 8:
146
- _context3.prev = 8;
147
- _context3.t0 = _context3["catch"](1);
148
- case 10:
149
131
  return _context3.abrupt("return", content);
150
- case 11:
132
+ case 6:
151
133
  case "end":
152
134
  return _context3.stop();
153
135
  }
154
- }, _callee3, this, [[1, 8]]);
136
+ }, _callee3, this);
155
137
  }));
156
138
  function read(_x4) {
157
139
  return _read.apply(this, arguments);
@@ -229,12 +211,15 @@ export var JupyterFileService = (_dec = singleton({
229
211
  }, {
230
212
  key: "copy",
231
213
  value: function () {
232
- var _copy = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(source, target, options) {
214
+ var _copy = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(source, _target, _options) {
233
215
  return _regeneratorRuntime().wrap(function _callee5$(_context5) {
234
216
  while (1) switch (_context5.prev = _context5.next) {
235
217
  case 0:
218
+ _context5.next = 2;
219
+ return this.contentsManager.copy(source.path.toString(), _target.path.toString());
220
+ case 2:
236
221
  return _context5.abrupt("return", this.resolve(source));
237
- case 1:
222
+ case 3:
238
223
  case "end":
239
224
  return _context5.stop();
240
225
  }
@@ -248,7 +233,7 @@ export var JupyterFileService = (_dec = singleton({
248
233
  }, {
249
234
  key: "move",
250
235
  value: function () {
251
- var _move = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(source, target, options) {
236
+ var _move = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(source, _target, _options) {
252
237
  return _regeneratorRuntime().wrap(function _callee6$(_context6) {
253
238
  while (1) switch (_context6.prev = _context6.next) {
254
239
  case 0:
@@ -282,7 +267,7 @@ export var JupyterFileService = (_dec = singleton({
282
267
  }, {
283
268
  key: "resolve",
284
269
  value: function () {
285
- var _resolve = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(resource, options) {
270
+ var _resolve = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(resource, _options) {
286
271
  var resolved;
287
272
  return _regeneratorRuntime().wrap(function _callee7$(_context7) {
288
273
  while (1) switch (_context7.prev = _context7.next) {
@@ -319,6 +304,136 @@ export var JupyterFileService = (_dec = singleton({
319
304
  }
320
305
  return resolve;
321
306
  }()
307
+ }, {
308
+ key: "delete",
309
+ value: function () {
310
+ var _delete2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(resource, _options) {
311
+ return _regeneratorRuntime().wrap(function _callee8$(_context8) {
312
+ while (1) switch (_context8.prev = _context8.next) {
313
+ case 0:
314
+ _context8.next = 2;
315
+ return this.contentsManager.delete(resource.path.toString());
316
+ case 2:
317
+ return _context8.abrupt("return", this.resolve(resource));
318
+ case 3:
319
+ case "end":
320
+ return _context8.stop();
321
+ }
322
+ }, _callee8, this);
323
+ }));
324
+ function _delete(_x14, _x15) {
325
+ return _delete2.apply(this, arguments);
326
+ }
327
+ return _delete;
328
+ }()
329
+ }, {
330
+ key: "rename",
331
+ value: function () {
332
+ var _rename = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9(resource, newName) {
333
+ var newPath;
334
+ return _regeneratorRuntime().wrap(function _callee9$(_context9) {
335
+ while (1) switch (_context9.prev = _context9.next) {
336
+ case 0:
337
+ newPath = pathUtil.join(resource.path.dir.toString(), newName);
338
+ _context9.next = 3;
339
+ return this.contentsManager.rename(resource.path.toString(), newPath);
340
+ case 3:
341
+ return _context9.abrupt("return", this.resolve(resource));
342
+ case 4:
343
+ case "end":
344
+ return _context9.stop();
345
+ }
346
+ }, _callee9, this);
347
+ }));
348
+ function rename(_x16, _x17) {
349
+ return _rename.apply(this, arguments);
350
+ }
351
+ return rename;
352
+ }()
353
+ }, {
354
+ key: "newFile",
355
+ value: function () {
356
+ var _newFile = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10(fileName, target) {
357
+ var targetFileUri, fileNameArr, ext, res;
358
+ return _regeneratorRuntime().wrap(function _callee10$(_context10) {
359
+ while (1) switch (_context10.prev = _context10.next) {
360
+ case 0:
361
+ targetFileUri = new URI(pathUtil.join(target.path.toString(), fileName));
362
+ _context10.next = 3;
363
+ return this.resolve(targetFileUri);
364
+ case 3:
365
+ if (!_context10.sent.isFile) {
366
+ _context10.next = 6;
367
+ break;
368
+ }
369
+ message.error('文件名重复');
370
+ return _context10.abrupt("return", this.resolve(target));
371
+ case 6:
372
+ fileNameArr = fileName.split('.');
373
+ ext = fileNameArr[fileNameArr.length - 1];
374
+ _context10.next = 10;
375
+ return this.contentsManager.newUntitled({
376
+ path: target.path.toString(),
377
+ ext: ext
378
+ });
379
+ case 10:
380
+ res = _context10.sent;
381
+ _context10.next = 13;
382
+ return this.rename(new URI(res.path.toString()), fileName);
383
+ case 13:
384
+ return _context10.abrupt("return", this.resolve(target));
385
+ case 14:
386
+ case "end":
387
+ return _context10.stop();
388
+ }
389
+ }, _callee10, this);
390
+ }));
391
+ function newFile(_x18, _x19) {
392
+ return _newFile.apply(this, arguments);
393
+ }
394
+ return newFile;
395
+ }()
396
+ }, {
397
+ key: "newFileDir",
398
+ value: function () {
399
+ var _newFileDir = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11(dirName, target) {
400
+ var targetFileUri, res;
401
+ return _regeneratorRuntime().wrap(function _callee11$(_context11) {
402
+ while (1) switch (_context11.prev = _context11.next) {
403
+ case 0:
404
+ targetFileUri = new URI(pathUtil.join(target.path.toString(), dirName));
405
+ _context11.next = 3;
406
+ return this.resolve(targetFileUri);
407
+ case 3:
408
+ if (!_context11.sent.isDirectory) {
409
+ _context11.next = 6;
410
+ break;
411
+ }
412
+ message.error('文件夹重复');
413
+ return _context11.abrupt("return", this.resolve(target));
414
+ case 6:
415
+ _context11.next = 8;
416
+ return this.contentsManager.newUntitled({
417
+ path: target.path.toString(),
418
+ type: 'directory'
419
+ });
420
+ case 8:
421
+ res = _context11.sent;
422
+ _context11.next = 11;
423
+ return this.rename(new URI(res.path.toString()), dirName);
424
+ case 11:
425
+ return _context11.abrupt("return", this.resolve(target));
426
+ case 12:
427
+ case "end":
428
+ return _context11.stop();
429
+ }
430
+ }, _callee11, this);
431
+ }));
432
+ function newFileDir(_x20, _x21) {
433
+ return _newFileDir.apply(this, arguments);
434
+ }
435
+ return newFileDir;
436
+ }()
322
437
  }]);
323
438
  return JupyterFileService;
324
439
  }(FileService), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "contentsManager", [_dec2], {
@@ -1,4 +1,4 @@
1
- function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
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
  var _dec, _dec2, _dec3, _class, _class2, _descriptor, _descriptor2;
3
3
  function _initializerDefineProperty(target, property, descriptor, context) { if (!descriptor) return; Object.defineProperty(target, property, { enumerable: descriptor.enumerable, configurable: descriptor.configurable, writable: descriptor.writable, value: descriptor.initializer ? descriptor.initializer.call(context) : void 0 }); }
4
4
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
@@ -1,6 +1,6 @@
1
1
  import type { TreeNode } from '@difizen/mana-app';
2
2
  import { FileTreeModel, FileTreeView, LabelProvider, TreeDecoratorService, TreeProps, TreeViewDecorator, CommandRegistry, OpenerService, SelectionService } from '@difizen/mana-app';
3
- import type React from 'react';
3
+ import React from 'react';
4
4
  import './index.less';
5
5
  export declare class FileView extends FileTreeView {
6
6
  protected openService: OpenerService;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/file/file-view/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAmB,MAAM,mBAAmB,CAAC;AAEnE,OAAO,EAGL,aAAa,EACb,YAAY,EAEZ,aAAa,EACb,oBAAoB,EACpB,SAAS,EACT,iBAAiB,EAEjB,eAAe,EAEf,aAAa,EACb,gBAAgB,EAIjB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,cAAc,CAAC;AAMtB,qBAEa,QAAS,SAAQ,YAAY;IACjB,SAAS,CAAC,WAAW,EAAE,aAAa,CAAC;IACnC,SAAS,CAAC,OAAO,EAAE,eAAe,CAAC;IACnD,EAAE,SAAuB;IACzB,SAAS,SAA6B;gBAG1B,KAAK,EAAE,SAAS,EACZ,KAAK,EAAE,aAAa,EAChB,iBAAiB,EAAE,iBAAiB,EACrC,gBAAgB,EAAE,gBAAgB,EACrC,aAAa,EAAE,aAAa,EACrB,gBAAgB,EAAE,oBAAoB;IAatE,QAAQ,aAAoB,QAAQ,mBAWlC;IAEO,gBAAgB,CACvB,IAAI,EAAE,QAAQ,GAAG,SAAS,EAC1B,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,WAAW,CAAC,GACnC,IAAI;CAeR"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/file/file-view/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAmB,MAAM,mBAAmB,CAAC;AAEnE,OAAO,EAGL,aAAa,EACb,YAAY,EAEZ,aAAa,EACb,oBAAoB,EACpB,SAAS,EACT,iBAAiB,EAEjB,eAAe,EAEf,aAAa,EACb,gBAAgB,EAIjB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,cAAc,CAAC;AAMtB,qBAEa,QAAS,SAAQ,YAAY;IACjB,SAAS,CAAC,WAAW,EAAE,aAAa,CAAC;IACnC,SAAS,CAAC,OAAO,EAAE,eAAe,CAAC;IACnD,EAAE,SAAuB;IACzB,SAAS,SAA6B;gBAG1B,KAAK,EAAE,SAAS,EACZ,KAAK,EAAE,aAAa,EAChB,iBAAiB,EAAE,iBAAiB,EACrC,gBAAgB,EAAE,gBAAgB,EACrC,aAAa,EAAE,aAAa,EACrB,gBAAgB,EAAE,oBAAoB;IAetE,QAAQ,aAAoB,QAAQ,mBAWlC;IAEO,gBAAgB,CACvB,IAAI,EAAE,QAAQ,GAAG,SAAS,EAC1B,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,WAAW,CAAC,GACnC,IAAI;CAeR"}
@@ -1,6 +1,6 @@
1
- function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
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
  var _dec, _dec2, _dec3, _dec4, _class, _class2, _descriptor, _descriptor2;
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 exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
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); }); }; }
6
6
  function _initializerDefineProperty(target, property, descriptor, context) { if (!descriptor) return; Object.defineProperty(target, property, { enumerable: descriptor.enumerable, configurable: descriptor.configurable, writable: descriptor.writable, value: descriptor.initializer ? descriptor.initializer.call(context) : void 0 }); }
@@ -20,9 +20,12 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
20
20
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
21
21
  function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { var desc = {}; Object.keys(descriptor).forEach(function (key) { desc[key] = descriptor[key]; }); desc.enumerable = !!desc.enumerable; desc.configurable = !!desc.configurable; if ('value' in desc || desc.initializer) { desc.writable = true; } desc = decorators.slice().reverse().reduce(function (desc, decorator) { return decorator(target, property, desc) || desc; }, desc); if (context && desc.initializer !== void 0) { desc.value = desc.initializer ? desc.initializer.call(context) : void 0; desc.initializer = undefined; } if (desc.initializer === void 0) { Object.defineProperty(target, property, desc); desc = null; } return desc; }
22
22
  function _initializerWarningHelper(descriptor, context) { throw new Error('Decorating class property failed. Please ensure that ' + 'transform-class-properties is enabled and runs after the decorators transform.'); }
23
+ import { FolderFilled } from '@ant-design/icons';
23
24
  import { FileTreeViewFactory } from '@difizen/mana-app';
24
25
  import { FileStatNode, FileTree, FileTreeModel, FileTreeView, isOSX, LabelProvider, TreeDecoratorService, TreeProps, TreeViewDecorator, TreeViewModule, CommandRegistry, ManaModule, OpenerService, SelectionService, view, inject, singleton } from '@difizen/mana-app';
26
+ import React from 'react';
25
27
  import "./index.less";
28
+ import { jsx as _jsx } from "react/jsx-runtime";
26
29
  var FileTreeModule = ManaModule.create().register(FileTree, FileTreeModel).dependOn(TreeViewModule);
27
30
  export var FileView = (_dec = singleton(), _dec2 = view(FileTreeViewFactory, FileTreeModule), _dec3 = inject(OpenerService), _dec4 = inject(CommandRegistry), _dec(_class = _dec2(_class = (_class2 = /*#__PURE__*/function (_FileTreeView) {
28
31
  _inherits(FileView, _FileTreeView);
@@ -66,6 +69,8 @@ export var FileView = (_dec = singleton(), _dec2 = view(FileTreeViewFactory, Fil
66
69
  return _ref.apply(this, arguments);
67
70
  };
68
71
  }();
72
+ _this.title.label = '文件导航';
73
+ _this.title.icon = /*#__PURE__*/_jsx(FolderFilled, {});
69
74
  _this.toDispose.push(_this.model.onOpenNode(_this.openNode));
70
75
  return _this;
71
76
  }
@@ -4,4 +4,7 @@ export * from './navigatable-view.js';
4
4
  export * from './open-handler-contribution.js';
5
5
  export * from './file-service.js';
6
6
  export * from './file-protocol.js';
7
+ export * from './file-icon.js';
8
+ export * from './file-create-modal.js';
9
+ export * from './file-createdir-modal.js';
7
10
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/file/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/file/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,wBAAwB,CAAC;AACvC,cAAc,2BAA2B,CAAC"}
package/es/file/index.js CHANGED
@@ -3,4 +3,7 @@ export * from "./file-view/index.js";
3
3
  export * from "./navigatable-view.js";
4
4
  export * from "./open-handler-contribution.js";
5
5
  export * from "./file-service.js";
6
- export * from "./file-protocol.js";
6
+ export * from "./file-protocol.js";
7
+ export * from "./file-icon.js";
8
+ export * from "./file-create-modal.js";
9
+ export * from "./file-createdir-modal.js";
@@ -0,0 +1,98 @@
1
+ .libro-create-file-type {
2
+ display: flex;
3
+ align-items: center;
4
+ justify-content: center;
5
+ flex-direction: column;
6
+ margin-bottom: 24px;
7
+ height: 100px;
8
+ width: 100px;
9
+ border: 1px solid rgba(0, 10, 26, 10%);
10
+ border-radius: 4px;
11
+ cursor: pointer;
12
+
13
+ &.active {
14
+ border: 1px solid #1677ff;
15
+ background-color: rgba(22, 122, 255, 9%);
16
+ }
17
+
18
+ &.active::before {
19
+ content: '';
20
+ position: absolute;
21
+ top: 2px;
22
+ right: 18px;
23
+ height: 0;
24
+ width: 0;
25
+ border-top: 12px solid #1677ff;
26
+ border-left: 12px solid transparent;
27
+ }
28
+ }
29
+
30
+ .libro-create-file-modal,
31
+ .libro-create-dir-modal,
32
+ .libro-rename-file-modal {
33
+ .ant-modal-content {
34
+ padding: unset;
35
+ }
36
+
37
+ .ant-modal-body {
38
+ padding: 20px 24px;
39
+ }
40
+
41
+ .ant-modal-header {
42
+ padding: 16px 24px;
43
+ border-bottom: 1px solid rgba(0, 10, 26, 7%);
44
+ margin: unset;
45
+ }
46
+
47
+ .ant-modal-footer {
48
+ margin: unset;
49
+ padding: 10px 24px;
50
+ border-top: 1px solid rgba(0, 10, 26, 7%);
51
+ }
52
+
53
+ .ant-modal-title {
54
+ font-weight: 500;
55
+ color: rgba(0, 10, 26, 89%);
56
+ }
57
+ }
58
+
59
+ .libro-remove-file-modal {
60
+ .ant-modal-confirm-title {
61
+ font-weight: 500;
62
+ color: rgba(0, 0, 0, 88%);
63
+ }
64
+ }
65
+
66
+ .libro-create-file-modal {
67
+ .ant-form-item-control-input {
68
+ width: 370px;
69
+ }
70
+ }
71
+
72
+ .libro-create-dir-modal,
73
+ .libro-rename-file-modal {
74
+ .ant-form-item-control-input {
75
+ width: 316px;
76
+ }
77
+ }
78
+
79
+ .libro-create-file-path-container {
80
+ margin-bottom: 8px;
81
+ }
82
+
83
+ .libro-create-file-des {
84
+ margin-bottom: 8px;
85
+ display: inline-block;
86
+ color: rgba(0, 0, 0, 85%);
87
+ letter-spacing: 0;
88
+ line-height: 22px;
89
+ }
90
+
91
+ .libro-create-file-path {
92
+ color: rgba(0, 0, 0, 65%);
93
+ }
94
+
95
+ .libro-create-file-type-text {
96
+ margin-top: 8px;
97
+ color: rgba(0, 10, 26, 68%);
98
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../src/file/module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAS/D,eAAO,MAAM,sBAAsB,YASR,CAAC"}
1
+ {"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../src/file/module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAa/D,eAAO,MAAM,sBAAsB,YAaR,CAAC"}
package/es/file/module.js CHANGED
@@ -1,8 +1,12 @@
1
1
  import { FileTreeModule, ManaModule } from '@difizen/mana-app';
2
+ import { FileCommandContribution } from "./file-command.js";
3
+ import { FileCreateModalContribution } from "./file-create-modal-contribution.js";
4
+ import { FileCreateDirModalContribution } from "./file-createdir-modal-contribution.js";
2
5
  import { FileNameAlias } from "./file-name-alias.js";
6
+ import { FileRenameModalContribution } from "./file-rename-modal-contribution.js";
3
7
  import { JupyterFileService } from "./file-service.js";
4
8
  import { FileTreeLabelProvider } from "./file-tree-label-provider.js";
5
9
  import { FileView } from "./file-view/index.js";
6
10
  import { LibroNavigatableView } from "./navigatable-view.js";
7
11
  import { LibroJupyterOpenHandler } from "./open-handler-contribution.js";
8
- export var LibroJupyterFileModule = ManaModule.create().register(JupyterFileService, FileView, FileNameAlias, FileTreeLabelProvider, LibroNavigatableView, LibroJupyterOpenHandler).dependOn(FileTreeModule);
12
+ export var LibroJupyterFileModule = ManaModule.create().register(JupyterFileService, FileView, FileNameAlias, FileTreeLabelProvider, LibroNavigatableView, LibroJupyterOpenHandler, FileCommandContribution, FileCreateModalContribution, FileCreateDirModalContribution, FileRenameModalContribution).dependOn(FileTreeModule);
@@ -1,15 +1,20 @@
1
1
  /// <reference types="react" resolution-mode="require"/>
2
2
  import type { LibroView } from '@difizen/libro-core';
3
3
  import { LibroService } from '@difizen/libro-core';
4
- import type { NavigatableView } from '@difizen/mana-app';
5
- import { BaseView, LabelProvider, Deferred, URI } from '@difizen/mana-app';
4
+ import type { NavigatableView, Saveable } from '@difizen/mana-app';
5
+ import { BaseView, LabelProvider, Deferred, URI, CommandRegistry, Emitter } from '@difizen/mana-app';
6
6
  export declare const LibroEditorComponent: import("react").ForwardRefExoticComponent<import("react").RefAttributes<unknown>>;
7
7
  export declare const LibroNavigatableViewFactoryId = "libro-navigatable-view-factory";
8
- export declare class LibroNavigatableView extends BaseView implements NavigatableView {
8
+ export declare class LibroNavigatableView extends BaseView implements NavigatableView, Saveable {
9
9
  protected libroService: LibroService;
10
+ commandRegistry: CommandRegistry;
10
11
  view: import("react").ForwardRefExoticComponent<import("react").RefAttributes<unknown>>;
11
12
  codeRef: import("react").RefObject<HTMLDivElement>;
12
13
  filePath?: string;
14
+ dirtyEmitter: Emitter<void>;
15
+ get onDirtyChanged(): import("@difizen/mana-app").Event<void>;
16
+ readonly autoSave = "off";
17
+ dirty: boolean;
13
18
  libroView?: LibroView;
14
19
  protected defer: Deferred<void>;
15
20
  get ready(): Promise<void>;
@@ -17,6 +22,7 @@ export declare class LibroNavigatableView extends BaseView implements Navigatabl
17
22
  path: string;
18
23
  }, labelProvider: LabelProvider);
19
24
  onViewMount(): Promise<void>;
25
+ save: () => void;
20
26
  protected getOrCreateLibroView(): Promise<void>;
21
27
  getResourceUri(): URI | undefined;
22
28
  createMoveToUri(resourceUri: URI): URI | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"navigatable-view.d.ts","sourceRoot":"","sources":["../../src/file/navigatable-view.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,EACL,QAAQ,EAER,aAAa,EAUb,QAAQ,EACR,GAAG,EACJ,MAAM,mBAAmB,CAAC;AAG3B,eAAO,MAAM,oBAAoB,mFAQ/B,CAAC;AAEH,eAAO,MAAM,6BAA6B,mCAAmC,CAAC;AAC9E,qBAEa,oBAAqB,SAAQ,QAAS,YAAW,eAAe;IACrD,SAAS,CAAC,YAAY,EAAE,YAAY,CAAC;IAElD,IAAI,oFAAwB;IAErC,OAAO,4CAA+B;IAE9B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAG1B,SAAS,CAAC,EAAE,SAAS,CAAC;IAEtB,SAAS,CAAC,KAAK,iBAAwB;IAEvC,IAAI,KAAK,kBAER;gBAGqB,OAAO,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,EACtB,aAAa,EAAE,aAAa;IAYtC,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC;cAI3B,oBAAoB;IAapC,cAAc,IAAI,GAAG,GAAG,SAAS;IAIjC,eAAe,CAAC,WAAW,EAAE,GAAG,GAAG,GAAG,GAAG,SAAS;CAKnD"}
1
+ {"version":3,"file":"navigatable-view.d.ts","sourceRoot":"","sources":["../../src/file/navigatable-view.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAoB,MAAM,qBAAqB,CAAC;AACrE,OAAO,KAAK,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EACL,QAAQ,EAER,aAAa,EAUb,QAAQ,EACR,GAAG,EACH,eAAe,EACf,OAAO,EACR,MAAM,mBAAmB,CAAC;AAG3B,eAAO,MAAM,oBAAoB,mFAQ/B,CAAC;AAEH,eAAO,MAAM,6BAA6B,mCAAmC,CAAC;AAC9E,qBAEa,oBACX,SAAQ,QACR,YAAW,eAAe,EAAE,QAAQ;IAEd,SAAS,CAAC,YAAY,EAAE,YAAY,CAAC;IAElC,eAAe,EAAE,eAAe,CAAC;IAEjD,IAAI,oFAAwB;IAErC,OAAO,4CAA+B;IAE9B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAE1B,YAAY,gBAAuB;IAEnC,IAAI,cAAc,4CAEjB;IAED,QAAQ,CAAC,QAAQ,SAAS;IAG1B,KAAK,EAAE,OAAO,CAAC;IAGf,SAAS,CAAC,EAAE,SAAS,CAAC;IAEtB,SAAS,CAAC,KAAK,iBAAwB;IAEvC,IAAI,KAAK,kBAER;gBAGqB,OAAO,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,EACtB,aAAa,EAAE,aAAa;IAatC,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC;IAI3C,IAAI,aAMF;cAEc,oBAAoB;IAsBpC,cAAc,IAAI,GAAG,GAAG,SAAS;IAIjC,eAAe,CAAC,WAAW,EAAE,GAAG,GAAG,GAAG,GAAG,SAAS;CAKnD"}