@difizen/libro-core 0.1.0 → 0.1.2
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/index.less +1 -1
- package/es/add-cell/libro-add-cell-slot-contribution.d.ts +1 -2
- package/es/add-cell/libro-add-cell-slot-contribution.d.ts.map +1 -1
- package/es/add-cell/libro-add-cell-slot-contribution.js +12 -6
- package/es/add-cell/libro-add-cell-view.d.ts +4 -4
- package/es/add-cell/libro-add-cell-view.d.ts.map +1 -1
- package/es/add-cell/libro-add-cell-view.js +4 -6
- package/es/cell/libro-cell-contribution.d.ts +1 -2
- package/es/cell/libro-cell-contribution.d.ts.map +1 -1
- package/es/cell/libro-cell-contribution.js +14 -8
- package/es/cell/libro-cell-model.d.ts +9 -0
- package/es/cell/libro-cell-model.d.ts.map +1 -1
- package/es/cell/libro-cell-model.js +53 -11
- package/es/cell/libro-cell-protocol.d.ts +2 -0
- package/es/cell/libro-cell-protocol.d.ts.map +1 -1
- package/es/cell/libro-cell-view.d.ts +39 -3
- package/es/cell/libro-cell-view.d.ts.map +1 -1
- package/es/cell/libro-cell-view.js +54 -24
- package/es/cell/libro-edit-cell-view.d.ts +6 -12
- package/es/cell/libro-edit-cell-view.d.ts.map +1 -1
- package/es/cell/libro-edit-cell-view.js +9 -4
- package/es/cell/libro-executable-cell-view.d.ts +2 -0
- package/es/cell/libro-executable-cell-view.d.ts.map +1 -1
- package/es/cell/libro-executable-cell-view.js +4 -1
- package/es/collapse-service.d.ts +1 -1
- package/es/collapse-service.d.ts.map +1 -1
- package/es/collapse-service.js +1 -1
- package/es/command/document-commands.d.ts +5 -0
- package/es/command/document-commands.d.ts.map +1 -0
- package/es/command/document-commands.js +3 -2
- package/es/command/kernel-command.d.ts +5 -0
- package/es/command/kernel-command.d.ts.map +1 -0
- package/es/command/kernel-command.js +3 -0
- package/es/command/libro-command-contribution.d.ts +0 -1
- package/es/command/libro-command-contribution.d.ts.map +1 -1
- package/es/command/libro-command-contribution.js +179 -129
- package/es/command/libro-command-register.d.ts +0 -1
- package/es/command/libro-command-register.d.ts.map +1 -1
- package/es/command/libro-command-register.js +13 -7
- package/es/command/notebook-commands.d.ts +6 -0
- package/es/command/notebook-commands.d.ts.map +1 -0
- package/es/command/notebook-commands.js +17 -4
- package/es/components/cell-protocol.d.ts +5 -5
- package/es/components/cell-protocol.d.ts.map +1 -1
- package/es/components/dnd-cell-item-render.d.ts +6 -2
- package/es/components/dnd-cell-item-render.d.ts.map +1 -1
- package/es/components/dnd-cell-item-render.js +194 -89
- package/es/components/dnd-component/custom-drag-layer.d.ts +1 -1
- package/es/components/dnd-component/custom-drag-layer.d.ts.map +1 -1
- package/es/components/dnd-component/custom-drag-layer.js +3 -4
- package/es/components/dnd-component/default-dnd-content.d.ts +2 -1
- package/es/components/dnd-component/default-dnd-content.d.ts.map +1 -1
- package/es/components/dnd-component/default-dnd-content.js +100 -44
- package/es/components/dnd-component/dnd-context.js +1 -1
- package/es/components/dnd-component/dnd-list.d.ts +9 -5
- package/es/components/dnd-component/dnd-list.d.ts.map +1 -1
- package/es/components/dnd-component/dnd-list.js +93 -26
- package/es/components/dnd-component/index.d.ts +1 -1
- package/es/components/dnd-component/index.d.ts.map +1 -1
- package/es/components/dnd-component/index.js +2 -2
- package/es/components/dnd-component/index.less +8 -0
- package/es/components/dnd-component/overscanIndices-getter.d.ts +22 -0
- package/es/components/dnd-component/overscanIndices-getter.d.ts.map +1 -0
- package/es/components/dnd-component/overscanIndices-getter.js +58 -0
- package/es/components/dnd-component/virtualized-manager.d.ts +19 -0
- package/es/components/dnd-component/virtualized-manager.d.ts.map +1 -0
- package/es/components/dnd-component/virtualized-manager.js +60 -0
- package/es/components/index.d.ts +2 -2
- package/es/components/index.d.ts.map +1 -1
- package/es/components/index.js +2 -2
- package/es/components/libro-virtualized-render.d.ts +15 -0
- package/es/components/libro-virtualized-render.d.ts.map +1 -0
- package/es/components/libro-virtualized-render.js +174 -0
- package/es/content/index.d.ts +1 -0
- package/es/content/index.d.ts.map +1 -1
- package/es/content/index.js +2 -1
- package/es/content/libro-content-contribution.d.ts +2 -2
- package/es/content/libro-content-contribution.d.ts.map +1 -1
- package/es/content/libro-content-contribution.js +2 -3
- package/es/content/libro-content-module.d.ts.map +1 -1
- package/es/content/libro-content-module.js +3 -2
- package/es/content/libro-content-protocol.d.ts +5 -0
- package/es/content/libro-content-protocol.d.ts.map +1 -1
- package/es/content/libro-content-protocol.js +2 -1
- package/es/content/libro-content-service.d.ts +6 -4
- package/es/content/libro-content-service.d.ts.map +1 -1
- package/es/content/libro-content-service.js +36 -8
- package/es/content/libro-save-content-contribution.d.ts +6 -0
- package/es/content/libro-save-content-contribution.d.ts.map +1 -0
- package/es/content/libro-save-content-contribution.js +27 -0
- package/es/formatter/index.d.ts +6 -0
- package/es/formatter/index.d.ts.map +1 -0
- package/es/formatter/index.js +5 -0
- package/es/formatter/libro-formatter-json-contribution.d.ts +18 -0
- package/es/formatter/libro-formatter-json-contribution.d.ts.map +1 -0
- package/es/formatter/libro-formatter-json-contribution.js +41 -0
- package/es/formatter/libro-formatter-manager.d.ts +16 -0
- package/es/formatter/libro-formatter-manager.d.ts.map +1 -0
- package/es/formatter/libro-formatter-manager.js +86 -0
- package/es/formatter/libro-formatter-module.d.ts +3 -0
- package/es/formatter/libro-formatter-module.d.ts.map +1 -0
- package/es/formatter/libro-formatter-module.js +7 -0
- package/es/formatter/libro-formatter-protocol.d.ts +37 -0
- package/es/formatter/libro-formatter-protocol.d.ts.map +1 -0
- package/es/formatter/libro-formatter-protocol.js +18 -0
- package/es/formatter/libro-formatter-string-contribution.d.ts +18 -0
- package/es/formatter/libro-formatter-string-contribution.d.ts.map +1 -0
- package/es/formatter/libro-formatter-string-contribution.js +41 -0
- package/es/formatter/libro-formatter-trans-default-contribution.d.ts +7 -0
- package/es/formatter/libro-formatter-trans-default-contribution.d.ts.map +1 -0
- package/es/formatter/libro-formatter-trans-default-contribution.js +19 -0
- package/es/index.d.ts +5 -1
- package/es/index.d.ts.map +1 -1
- package/es/index.js +6 -2
- package/es/index.less +135 -58
- package/es/libro-context-key.d.ts.map +1 -1
- package/es/libro-keybind-registry.d.ts +5 -0
- package/es/libro-keybind-registry.d.ts.map +1 -0
- package/es/libro-model.d.ts +13 -2
- package/es/libro-model.d.ts.map +1 -1
- package/es/libro-model.js +149 -70
- package/es/libro-protocol.d.ts +44 -2
- package/es/libro-protocol.d.ts.map +1 -1
- package/es/libro-protocol.js +16 -3
- package/es/libro-service.d.ts +1 -1
- package/es/libro-service.d.ts.map +1 -1
- package/es/libro-service.js +29 -20
- package/es/libro-setting-contribution.d.ts +5 -0
- package/es/libro-setting-contribution.d.ts.map +1 -0
- package/es/{configuration/libro-configuration-contribution.js → libro-setting-contribution.js} +8 -9
- package/es/libro-setting.d.ts +11 -0
- package/es/libro-setting.d.ts.map +1 -0
- package/es/{configuration/libro-configuration.js → libro-setting.js} +17 -7
- package/es/libro-view.d.ts +21 -8
- package/es/libro-view.d.ts.map +1 -1
- package/es/libro-view.js +477 -338
- package/es/material-from-designer.d.ts +30 -0
- package/es/material-from-designer.d.ts.map +1 -0
- package/es/material-from-designer.js +112 -1
- package/es/module.d.ts.map +1 -1
- package/es/module.js +20 -5
- package/es/output/output-area.d.ts +3 -4
- package/es/output/output-area.d.ts.map +1 -1
- package/es/output/output-area.js +23 -16
- package/es/output/output-contribution.d.ts +0 -1
- package/es/output/output-contribution.d.ts.map +1 -1
- package/es/output/output-contribution.js +14 -9
- package/es/output/output-model.d.ts +2 -2
- package/es/output/output-model.d.ts.map +1 -1
- package/es/output/output-model.js +2 -2
- package/es/output/output-protocol.d.ts.map +1 -1
- package/es/output/output-protocol.js +0 -2
- package/es/settings/index.d.ts +5 -0
- package/es/settings/index.d.ts.map +1 -0
- package/es/settings/index.js +4 -0
- package/es/settings/index.less +3 -0
- package/es/settings/module.d.ts +3 -0
- package/es/settings/module.d.ts.map +1 -0
- package/es/settings/module.js +4 -0
- package/es/settings/setting-editor/configuration-panel-view.d.ts +13 -0
- package/es/settings/setting-editor/configuration-panel-view.d.ts.map +1 -0
- package/es/settings/setting-editor/configuration-panel-view.js +115 -0
- package/es/settings/setting-editor/configuration-render-contribution.d.ts +6 -0
- package/es/settings/setting-editor/configuration-render-contribution.d.ts.map +1 -0
- package/es/settings/setting-editor/configuration-render-contribution.js +77 -0
- package/es/settings/setting-editor/default-node-render.d.ts +9 -0
- package/es/settings/setting-editor/default-node-render.d.ts.map +1 -0
- package/es/settings/setting-editor/default-node-render.js +79 -0
- package/es/settings/setting-editor/index.d.ts +7 -0
- package/es/settings/setting-editor/index.d.ts.map +1 -0
- package/es/settings/setting-editor/index.js +6 -0
- package/es/settings/setting-editor/index.less +12 -0
- package/es/settings/setting-editor/module.d.ts +3 -0
- package/es/settings/setting-editor/module.d.ts.map +1 -0
- package/es/settings/setting-editor/module.js +7 -0
- package/es/settings/setting-editor/setting-editor-view.d.ts +15 -0
- package/es/settings/setting-editor/setting-editor-view.d.ts.map +1 -0
- package/es/settings/setting-editor/setting-editor-view.js +169 -0
- package/es/settings/setting-editor/setting-tree-service.d.ts +9 -0
- package/es/settings/setting-editor/setting-tree-service.d.ts.map +1 -0
- package/es/settings/setting-editor/setting-tree-service.js +118 -0
- package/es/settings/setting-editor/setting-tree-view.d.ts +19 -0
- package/es/settings/setting-editor/setting-tree-view.d.ts.map +1 -0
- package/es/settings/setting-editor/setting-tree-view.js +88 -0
- package/es/settings/settings-contribution.d.ts +7 -0
- package/es/settings/settings-contribution.d.ts.map +1 -0
- package/es/settings/settings-contribution.js +36 -0
- package/es/settings/settings-modal.d.ts +5 -0
- package/es/settings/settings-modal.d.ts.map +1 -0
- package/es/settings/settings-modal.js +53 -0
- package/es/settings/settings-modal.less +3 -0
- package/es/settings/settings-protocol.d.ts +4 -0
- package/es/settings/settings-protocol.d.ts.map +1 -0
- package/es/settings/settings-protocol.js +5 -0
- package/es/slot/libro-slot-manager.d.ts +2 -2
- package/es/slot/libro-slot-manager.d.ts.map +1 -1
- package/es/slot/libro-slot-manager.js +14 -8
- package/es/slot/libro-slot-view.d.ts +3 -3
- package/es/slot/libro-slot-view.d.ts.map +1 -1
- package/es/slot/libro-slot-view.js +2 -2
- package/es/theme/libro-color-registry.d.ts +6 -0
- package/es/theme/libro-color-registry.d.ts.map +1 -0
- package/es/theme/libro-color-registry.js +7 -0
- package/es/toolbar/all-outputs-scroll-icon.d.ts +3 -0
- package/es/toolbar/all-outputs-scroll-icon.d.ts.map +1 -0
- package/es/toolbar/all-outputs-scroll-icon.js +10 -0
- package/es/toolbar/libro-toolbar.d.ts +2 -1
- package/es/toolbar/libro-toolbar.d.ts.map +1 -1
- package/es/toolbar/libro-toolbar.js +44 -8
- package/es/toolbar/restart-clear-outputs-modal.d.ts +1 -2
- package/es/toolbar/restart-clear-outputs-modal.d.ts.map +1 -1
- package/es/toolbar/restart-clear-outputs-modal.js +2 -2
- package/es/toolbar/shutdown-modal.d.ts +1 -2
- package/es/toolbar/shutdown-modal.d.ts.map +1 -1
- package/es/toolbar/shutdown-modal.js +2 -2
- package/es/toolbar/side-toolar-more-select.d.ts.map +1 -1
- package/es/toolbar/side-toolar-more-select.js +2 -2
- package/es/virtualized-manager-helper.d.ts +11 -0
- package/es/virtualized-manager-helper.d.ts.map +1 -0
- package/es/virtualized-manager-helper.js +51 -0
- package/es/virtualized-manager.d.ts +19 -0
- package/es/virtualized-manager.d.ts.map +1 -0
- package/es/virtualized-manager.js +61 -0
- package/package.json +9 -6
- package/src/add-cell/index.less +1 -1
- package/src/add-cell/libro-add-cell-slot-contribution.ts +1 -4
- package/src/add-cell/libro-add-cell-view.tsx +13 -6
- package/src/cell/libro-cell-contribution.ts +2 -6
- package/src/cell/libro-cell-model.ts +57 -4
- package/src/cell/libro-cell-protocol.ts +2 -0
- package/src/cell/libro-cell-view.tsx +21 -9
- package/src/cell/libro-edit-cell-view.tsx +10 -9
- package/src/cell/libro-executable-cell-view.ts +6 -1
- package/src/collapse-service.ts +1 -1
- package/src/command/document-commands.ts +3 -5
- package/src/command/kernel-command.ts +3 -0
- package/src/command/libro-command-contribution.ts +107 -91
- package/src/command/libro-command-register.ts +1 -4
- package/src/command/notebook-commands.ts +16 -3
- package/src/components/cell-protocol.ts +5 -5
- package/src/components/dnd-cell-item-render.tsx +239 -92
- package/src/components/dnd-component/custom-drag-layer.tsx +5 -6
- package/src/components/dnd-component/default-dnd-content.tsx +113 -42
- package/src/components/dnd-component/dnd-context.tsx +1 -1
- package/src/components/dnd-component/dnd-list.tsx +135 -43
- package/src/components/dnd-component/index.less +8 -0
- package/src/components/dnd-component/index.tsx +1 -1
- package/src/components/dnd-component/overscanIndices-getter.ts +92 -0
- package/src/components/dnd-component/virtualized-manager.ts +34 -0
- package/src/components/index.ts +2 -2
- package/src/components/libro-virtualized-render.tsx +178 -0
- package/src/content/index.ts +1 -0
- package/src/content/libro-content-contribution.ts +2 -3
- package/src/content/libro-content-module.ts +11 -3
- package/src/content/libro-content-protocol.ts +6 -0
- package/src/content/libro-content-service.ts +26 -8
- package/src/content/libro-save-content-contribution.ts +12 -0
- package/src/formatter/index.ts +5 -0
- package/src/formatter/libro-formatter-json-contribution.ts +42 -0
- package/src/formatter/libro-formatter-manager.ts +85 -0
- package/src/formatter/libro-formatter-module.ts +19 -0
- package/src/formatter/libro-formatter-protocol.ts +63 -0
- package/src/formatter/libro-formatter-string-contribution.ts +41 -0
- package/src/formatter/libro-formatter-trans-default-contribution.ts +15 -0
- package/src/index.less +135 -58
- package/src/index.tsx +6 -1
- package/src/libro-context-key.ts +3 -3
- package/src/libro-model.ts +87 -23
- package/src/libro-protocol.ts +81 -4
- package/src/libro-service.ts +4 -13
- package/src/{configuration/libro-configuration-contribution.ts → libro-setting-contribution.ts} +7 -8
- package/src/{configuration/libro-configuration.ts → libro-setting.ts} +18 -7
- package/src/libro-view.tsx +273 -141
- package/src/material-from-designer.tsx +93 -1
- package/src/module.ts +29 -7
- package/src/output/output-area.tsx +18 -12
- package/src/output/output-contribution.ts +2 -6
- package/src/output/output-model.tsx +3 -3
- package/src/output/output-protocol.ts +0 -1
- package/src/settings/index.less +3 -0
- package/src/settings/index.ts +4 -0
- package/src/settings/module.ts +8 -0
- package/src/settings/setting-editor/configuration-panel-view.tsx +89 -0
- package/src/settings/setting-editor/configuration-render-contribution.ts +81 -0
- package/src/settings/setting-editor/default-node-render.tsx +65 -0
- package/src/settings/setting-editor/index.less +12 -0
- package/src/settings/setting-editor/index.ts +6 -0
- package/src/settings/setting-editor/module.ts +17 -0
- package/src/settings/setting-editor/setting-editor-view.tsx +93 -0
- package/src/settings/setting-editor/setting-tree-service.ts +82 -0
- package/src/settings/setting-editor/setting-tree-view.tsx +95 -0
- package/src/settings/settings-contribution.tsx +24 -0
- package/src/settings/settings-modal.less +3 -0
- package/src/settings/settings-modal.tsx +50 -0
- package/src/settings/settings-protocol.ts +7 -0
- package/src/slot/libro-slot-manager.ts +1 -3
- package/src/slot/libro-slot-view.tsx +2 -5
- package/src/theme/libro-color-registry.ts +6 -0
- package/src/toolbar/all-outputs-scroll-icon.tsx +19 -0
- package/src/toolbar/libro-toolbar.tsx +30 -5
- package/src/toolbar/restart-clear-outputs-modal.tsx +3 -3
- package/src/toolbar/shutdown-modal.tsx +3 -3
- package/src/toolbar/side-toolar-more-select.tsx +2 -1
- package/src/virtualized-manager-helper.ts +29 -0
- package/src/virtualized-manager.ts +34 -0
|
@@ -0,0 +1,118 @@
|
|
|
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, _class;
|
|
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
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
5
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
6
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
7
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
8
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
9
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
10
|
+
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; }
|
|
11
|
+
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; }
|
|
12
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
13
|
+
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); } }
|
|
14
|
+
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); }); }; }
|
|
15
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
16
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
17
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
18
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
19
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
20
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
21
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
22
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
23
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
24
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
25
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
26
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
27
|
+
import { inject, ConfigurationRegistry, URI } from '@difizen/mana-app';
|
|
28
|
+
import { FileService, singleton } from '@difizen/mana-app';
|
|
29
|
+
var defaultFileMeta = {
|
|
30
|
+
mtime: 0,
|
|
31
|
+
ctime: 0,
|
|
32
|
+
etag: '',
|
|
33
|
+
size: 0,
|
|
34
|
+
isFile: false,
|
|
35
|
+
isDirectory: false,
|
|
36
|
+
isSymbolicLink: false
|
|
37
|
+
};
|
|
38
|
+
export var SettingTreeService = (_dec = singleton({
|
|
39
|
+
contrib: FileService
|
|
40
|
+
}), _dec(_class = /*#__PURE__*/function (_FileService) {
|
|
41
|
+
_inherits(SettingTreeService, _FileService);
|
|
42
|
+
var _super = _createSuper(SettingTreeService);
|
|
43
|
+
function SettingTreeService(configurationRegistry) {
|
|
44
|
+
var _this;
|
|
45
|
+
_classCallCheck(this, SettingTreeService);
|
|
46
|
+
_this = _super.call(this);
|
|
47
|
+
_this.configurationRegistry = void 0;
|
|
48
|
+
_this.configurationRegistry = configurationRegistry;
|
|
49
|
+
return _this;
|
|
50
|
+
}
|
|
51
|
+
SettingTreeService = inject(ConfigurationRegistry)(SettingTreeService, undefined, 0) || SettingTreeService;
|
|
52
|
+
_createClass(SettingTreeService, [{
|
|
53
|
+
key: "resolve",
|
|
54
|
+
value: function () {
|
|
55
|
+
var _resolve = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(resource
|
|
56
|
+
// options?: ResolveFileOptions | undefined,
|
|
57
|
+
) {
|
|
58
|
+
var roots, name, namespaces, configs;
|
|
59
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
60
|
+
while (1) switch (_context.prev = _context.next) {
|
|
61
|
+
case 0:
|
|
62
|
+
if (!resource.path.isRoot) {
|
|
63
|
+
_context.next = 3;
|
|
64
|
+
break;
|
|
65
|
+
}
|
|
66
|
+
roots = this.configurationRegistry.getRootNamespaces().map(function (item) {
|
|
67
|
+
return _objectSpread(_objectSpread({}, defaultFileMeta), {}, {
|
|
68
|
+
isFile: false,
|
|
69
|
+
isDirectory: true,
|
|
70
|
+
name: item,
|
|
71
|
+
resource: URI.resolve(resource, item)
|
|
72
|
+
});
|
|
73
|
+
});
|
|
74
|
+
return _context.abrupt("return", _objectSpread(_objectSpread({}, defaultFileMeta), {}, {
|
|
75
|
+
isDirectory: true,
|
|
76
|
+
name: resource.displayName,
|
|
77
|
+
resource: resource,
|
|
78
|
+
children: roots
|
|
79
|
+
}));
|
|
80
|
+
case 3:
|
|
81
|
+
name = resource.path.name;
|
|
82
|
+
namespaces = this.configurationRegistry.getChildNamespaces([name]).map(function (item) {
|
|
83
|
+
return _objectSpread(_objectSpread({}, defaultFileMeta), {}, {
|
|
84
|
+
isFile: false,
|
|
85
|
+
isDirectory: true,
|
|
86
|
+
name: item.join('.'),
|
|
87
|
+
resource: URI.resolve(resource, item.join('.'))
|
|
88
|
+
});
|
|
89
|
+
});
|
|
90
|
+
configs = this.configurationRegistry.getConfigurationByNamespace([name]).map(function (item) {
|
|
91
|
+
var _item$title;
|
|
92
|
+
return _objectSpread(_objectSpread({}, defaultFileMeta), {}, {
|
|
93
|
+
isFile: true,
|
|
94
|
+
name: (_item$title = item.title) !== null && _item$title !== void 0 ? _item$title : '',
|
|
95
|
+
resource: URI.resolve(resource, item.id)
|
|
96
|
+
});
|
|
97
|
+
});
|
|
98
|
+
return _context.abrupt("return", _objectSpread(_objectSpread({}, defaultFileMeta), {}, {
|
|
99
|
+
isFile: false,
|
|
100
|
+
isDirectory: true,
|
|
101
|
+
name: resource.displayName,
|
|
102
|
+
resource: resource,
|
|
103
|
+
children: [].concat(_toConsumableArray(namespaces), _toConsumableArray(configs))
|
|
104
|
+
}));
|
|
105
|
+
case 7:
|
|
106
|
+
case "end":
|
|
107
|
+
return _context.stop();
|
|
108
|
+
}
|
|
109
|
+
}, _callee, this);
|
|
110
|
+
}));
|
|
111
|
+
function resolve(_x) {
|
|
112
|
+
return _resolve.apply(this, arguments);
|
|
113
|
+
}
|
|
114
|
+
return resolve;
|
|
115
|
+
}()
|
|
116
|
+
}]);
|
|
117
|
+
return SettingTreeService;
|
|
118
|
+
}(FileService)) || _class);
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { CommandRegistry, FileTreeModel, FileTreeView, LabelProvider, SelectionService, TreeDecoratorService, TreeProps, TreeViewDecorator } from '@difizen/mana-app';
|
|
2
|
+
import type { TreeNode } from '@difizen/mana-app';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import './index.less';
|
|
5
|
+
export declare const SettingTreeFactoryId = "setting-editor-tree";
|
|
6
|
+
export declare const FileTreeComponent: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
7
|
+
export declare const SettingTreeComponent: React.FC;
|
|
8
|
+
export declare class SettingTreeView extends FileTreeView {
|
|
9
|
+
protected command: CommandRegistry;
|
|
10
|
+
readonly props: TreeProps;
|
|
11
|
+
readonly model: FileTreeModel;
|
|
12
|
+
readonly treeViewDecorator: TreeViewDecorator;
|
|
13
|
+
readonly selectionService: SelectionService;
|
|
14
|
+
readonly labelProvider: LabelProvider;
|
|
15
|
+
protected readonly decoratorService: TreeDecoratorService;
|
|
16
|
+
constructor(command: CommandRegistry, props: TreeProps, model: FileTreeModel, treeViewDecorator: TreeViewDecorator, selectionService: SelectionService, labelProvider: LabelProvider, decoratorService: TreeDecoratorService);
|
|
17
|
+
handleClickEvent(node: TreeNode | undefined, event: React.MouseEvent<HTMLElement>): void;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=setting-tree-view.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setting-tree-view.d.ts","sourceRoot":"","sources":["../../../src/settings/setting-editor/setting-tree-view.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EAEf,aAAa,EACb,YAAY,EAGZ,aAAa,EACb,gBAAgB,EAEhB,oBAAoB,EACpB,SAAS,EAET,iBAAiB,EAElB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAElD,OAAO,KAAqB,MAAM,OAAO,CAAC;AAC1C,OAAO,cAAc,CAAC;AAEtB,eAAO,MAAM,oBAAoB,wBAAwB,CAAC;AAC1D,eAAO,MAAM,iBAAiB,yFAW7B,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAExC,CAAC;AAQF,qBAEa,eAAgB,SAAQ,YAAY;IAC/C,SAAS,CAAC,OAAO,EAAE,eAAe,CAAC;IACnC,SAAkB,KAAK,EAAE,SAAS,CAAC;IACnC,SAAkB,KAAK,EAAE,aAAa,CAAC;IACvC,SAAkB,iBAAiB,EAAE,iBAAiB,CAAC;IACvD,SAAkB,gBAAgB,EAAE,gBAAgB,CAAC;IACrD,SAAkB,aAAa,EAAE,aAAa,CAAC;IAC/C,mBAA4B,gBAAgB,EAAE,oBAAoB,CAAC;gBAGxC,OAAO,EAAE,eAAe,EAC9B,KAAK,EAAE,SAAS,EACZ,KAAK,EAAE,aAAa,EAChB,iBAAiB,EAAE,iBAAiB,EACrC,gBAAgB,EAAE,gBAAgB,EACrC,aAAa,EAAE,aAAa,EAEnD,gBAAgB,EAAE,oBAAoB;IAqB/B,gBAAgB,CACvB,IAAI,EAAE,QAAQ,GAAG,SAAS,EAC1B,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,WAAW,CAAC,GACnC,IAAI;CAMR"}
|
|
@@ -0,0 +1,88 @@
|
|
|
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, _class;
|
|
3
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
4
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
5
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
6
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
7
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
8
|
+
function _get() { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }
|
|
9
|
+
function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }
|
|
10
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
11
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
12
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
13
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
14
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
15
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
16
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
17
|
+
import { CommandRegistry, FileStatNode, FileTreeModel, FileTreeView, FileTreeViewModule, inject, LabelProvider, SelectionService, singleton, TreeDecoratorService, TreeProps, TreeViewComponent, TreeViewDecorator, view } from '@difizen/mana-app';
|
|
18
|
+
import { l10n } from '@difizen/mana-l10n';
|
|
19
|
+
import React, { forwardRef } from 'react';
|
|
20
|
+
import "./index.less";
|
|
21
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
22
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
23
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
24
|
+
export var SettingTreeFactoryId = 'setting-editor-tree';
|
|
25
|
+
export var FileTreeComponent = /*#__PURE__*/forwardRef(function FileTreeComponent(props, containerRef) {
|
|
26
|
+
return /*#__PURE__*/_jsxs("div", {
|
|
27
|
+
className: "libro-configuration-tree",
|
|
28
|
+
ref: containerRef,
|
|
29
|
+
children: [/*#__PURE__*/_jsx("div", {
|
|
30
|
+
className: "ai-infra-configuration-header",
|
|
31
|
+
children: l10n.t('文件')
|
|
32
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
33
|
+
className: "libro-configuration-content",
|
|
34
|
+
children: /*#__PURE__*/_jsx(TreeViewComponent, {})
|
|
35
|
+
})]
|
|
36
|
+
});
|
|
37
|
+
});
|
|
38
|
+
export var SettingTreeComponent = function SettingTreeComponent() {
|
|
39
|
+
return /*#__PURE__*/_jsx(_Fragment, {});
|
|
40
|
+
};
|
|
41
|
+
function jump(h) {
|
|
42
|
+
var url = location.href; //Save down the URL without hash.
|
|
43
|
+
location.href = '#' + h; //Go to the target element.
|
|
44
|
+
history.replaceState(null, '', url); //Don't like hashes. Changing it back.
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export var SettingTreeView = (_dec = singleton(), _dec2 = view(SettingTreeFactoryId, FileTreeViewModule), _dec(_class = _dec2(_class = /*#__PURE__*/function (_FileTreeView) {
|
|
48
|
+
_inherits(SettingTreeView, _FileTreeView);
|
|
49
|
+
var _super = _createSuper(SettingTreeView);
|
|
50
|
+
function SettingTreeView(command, props, model, treeViewDecorator, selectionService, labelProvider, decoratorService) {
|
|
51
|
+
var _this;
|
|
52
|
+
_classCallCheck(this, SettingTreeView);
|
|
53
|
+
_this = _super.call(this, props, model, treeViewDecorator, selectionService, labelProvider, decoratorService);
|
|
54
|
+
_this.command = void 0;
|
|
55
|
+
_this.props = void 0;
|
|
56
|
+
_this.model = void 0;
|
|
57
|
+
_this.treeViewDecorator = void 0;
|
|
58
|
+
_this.selectionService = void 0;
|
|
59
|
+
_this.labelProvider = void 0;
|
|
60
|
+
_this.decoratorService = void 0;
|
|
61
|
+
_this.command = command;
|
|
62
|
+
_this.props = props;
|
|
63
|
+
_this.model = model;
|
|
64
|
+
_this.treeViewDecorator = treeViewDecorator;
|
|
65
|
+
_this.selectionService = selectionService;
|
|
66
|
+
_this.labelProvider = labelProvider;
|
|
67
|
+
_this.decoratorService = decoratorService;
|
|
68
|
+
_this.className += " libro-configuration-tree";
|
|
69
|
+
return _this;
|
|
70
|
+
}
|
|
71
|
+
SettingTreeView = inject(TreeDecoratorService)(SettingTreeView, undefined, 6) || SettingTreeView;
|
|
72
|
+
SettingTreeView = inject(LabelProvider)(SettingTreeView, undefined, 5) || SettingTreeView;
|
|
73
|
+
SettingTreeView = inject(SelectionService)(SettingTreeView, undefined, 4) || SettingTreeView;
|
|
74
|
+
SettingTreeView = inject(TreeViewDecorator)(SettingTreeView, undefined, 3) || SettingTreeView;
|
|
75
|
+
SettingTreeView = inject(FileTreeModel)(SettingTreeView, undefined, 2) || SettingTreeView;
|
|
76
|
+
SettingTreeView = inject(TreeProps)(SettingTreeView, undefined, 1) || SettingTreeView;
|
|
77
|
+
SettingTreeView = inject(CommandRegistry)(SettingTreeView, undefined, 0) || SettingTreeView;
|
|
78
|
+
_createClass(SettingTreeView, [{
|
|
79
|
+
key: "handleClickEvent",
|
|
80
|
+
value: function handleClickEvent(node, event) {
|
|
81
|
+
if (node && FileStatNode.is(node) && node.fileStat.isFile) {
|
|
82
|
+
jump(node.fileStat.resource.path.base);
|
|
83
|
+
}
|
|
84
|
+
_get(_getPrototypeOf(SettingTreeView.prototype), "handleClickEvent", this).call(this, node, event);
|
|
85
|
+
}
|
|
86
|
+
}]);
|
|
87
|
+
return SettingTreeView;
|
|
88
|
+
}(FileTreeView)) || _class) || _class);
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ModalContribution, ToolbarContribution } from '@difizen/mana-app';
|
|
2
|
+
import type { ToolbarRegistry } from '@difizen/mana-app';
|
|
3
|
+
export declare class SettingsContribution implements ModalContribution, ToolbarContribution {
|
|
4
|
+
registerModal(): import("@difizen/mana-app").ModalItem<void>;
|
|
5
|
+
registerToolbarItems(registry: ToolbarRegistry): void;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=settings-contribution.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settings-contribution.d.ts","sourceRoot":"","sources":["../../src/settings/settings-contribution.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAa,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AACtF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAOzD,qBACa,oBAAqB,YAAW,iBAAiB,EAAE,mBAAmB;IACjF,aAAa;IAIb,oBAAoB,CAAC,QAAQ,EAAE,eAAe;CAS/C"}
|
|
@@ -0,0 +1,36 @@
|
|
|
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, _class;
|
|
3
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
4
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
5
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
6
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
7
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
8
|
+
import { ModalContribution, singleton, ToolbarContribution } from '@difizen/mana-app';
|
|
9
|
+
import { l10n } from '@difizen/mana-l10n';
|
|
10
|
+
import { DocumentCommands } from "../command/document-commands.js";
|
|
11
|
+
import { SettingsModal } from "./settings-modal.js";
|
|
12
|
+
export var SettingsContribution = (_dec = singleton({
|
|
13
|
+
contrib: [ModalContribution, ToolbarContribution]
|
|
14
|
+
}), _dec(_class = /*#__PURE__*/function () {
|
|
15
|
+
function SettingsContribution() {
|
|
16
|
+
_classCallCheck(this, SettingsContribution);
|
|
17
|
+
}
|
|
18
|
+
_createClass(SettingsContribution, [{
|
|
19
|
+
key: "registerModal",
|
|
20
|
+
value: function registerModal() {
|
|
21
|
+
return SettingsModal;
|
|
22
|
+
}
|
|
23
|
+
}, {
|
|
24
|
+
key: "registerToolbarItems",
|
|
25
|
+
value: function registerToolbarItems(registry) {
|
|
26
|
+
registry.registerItem({
|
|
27
|
+
id: DocumentCommands['OpenSettings'].id,
|
|
28
|
+
icon: DocumentCommands['OpenSettings'].icon,
|
|
29
|
+
command: DocumentCommands['OpenSettings'].id,
|
|
30
|
+
order: 'z',
|
|
31
|
+
tooltip: l10n.t('设置')
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
}]);
|
|
35
|
+
return SettingsContribution;
|
|
36
|
+
}()) || _class);
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { ModalItem, ModalItemProps } from '@difizen/mana-app';
|
|
2
|
+
import './settings-modal.less';
|
|
3
|
+
export declare function SettingsModalComponent({ visible, close }: ModalItemProps<void>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export declare const SettingsModal: ModalItem;
|
|
5
|
+
//# sourceMappingURL=settings-modal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settings-modal.d.ts","sourceRoot":"","sources":["../../src/settings/settings-modal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAQnE,OAAO,uBAAuB,CAAC;AAE/B,wBAAgB,sBAAsB,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,cAAc,CAAC,IAAI,CAAC,2CAkC9E;AAED,eAAO,MAAM,aAAa,EAAE,SAG3B,CAAC"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
3
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
4
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
5
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
6
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
|
+
import { ConfigurationRegistry } from '@difizen/mana-app';
|
|
8
|
+
import { useInject, ViewManager, ViewRender } from '@difizen/mana-app';
|
|
9
|
+
import { Modal } from 'antd';
|
|
10
|
+
import { useEffect, useState } from 'react';
|
|
11
|
+
import { ConfigurationPanelView } from "./setting-editor/index.js";
|
|
12
|
+
import { LibroUserSettingsNamespace } from "./settings-protocol.js";
|
|
13
|
+
import "./settings-modal.less";
|
|
14
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
15
|
+
export function SettingsModalComponent(_ref) {
|
|
16
|
+
var visible = _ref.visible,
|
|
17
|
+
close = _ref.close;
|
|
18
|
+
var viewManager = useInject(ViewManager);
|
|
19
|
+
var configRegistry = useInject(ConfigurationRegistry);
|
|
20
|
+
var _useState = useState(),
|
|
21
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
22
|
+
settingEditorView = _useState2[0],
|
|
23
|
+
setSettingEditorView = _useState2[1];
|
|
24
|
+
useEffect(function () {
|
|
25
|
+
viewManager.getOrCreateView(ConfigurationPanelView).then(function (view) {
|
|
26
|
+
var config = configRegistry.getConfigurationByNamespace([LibroUserSettingsNamespace], false);
|
|
27
|
+
view.configurationNodes = config;
|
|
28
|
+
view.className = 'libro-settings-modal';
|
|
29
|
+
setSettingEditorView(view);
|
|
30
|
+
return;
|
|
31
|
+
}).catch(function (e) {
|
|
32
|
+
//
|
|
33
|
+
});
|
|
34
|
+
}, [configRegistry, viewManager]);
|
|
35
|
+
return /*#__PURE__*/_jsx(Modal, {
|
|
36
|
+
title: "\u8BBE\u7F6E",
|
|
37
|
+
open: visible,
|
|
38
|
+
onOk: function onOk() {
|
|
39
|
+
return close();
|
|
40
|
+
},
|
|
41
|
+
onCancel: function onCancel() {
|
|
42
|
+
return close();
|
|
43
|
+
},
|
|
44
|
+
width: 600,
|
|
45
|
+
children: settingEditorView && /*#__PURE__*/_jsx(ViewRender, {
|
|
46
|
+
view: settingEditorView
|
|
47
|
+
})
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
export var SettingsModal = {
|
|
51
|
+
id: 'settings.modal',
|
|
52
|
+
component: SettingsModalComponent
|
|
53
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settings-protocol.d.ts","sourceRoot":"","sources":["../../src/settings/settings-protocol.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAE9D,eAAO,MAAM,0BAA0B,eAAe,CAAC;AACvD,eAAO,MAAM,uBAAuB,EAAE,oBAGrC,CAAC"}
|
|
@@ -4,9 +4,9 @@ import type { LibroView } from '../libro-view.js';
|
|
|
4
4
|
import type { LibroSlot } from './libro-slot-protocol.js';
|
|
5
5
|
import { LibroExtensionSlotContribution } from './libro-slot-protocol.js';
|
|
6
6
|
export declare class LibroSlotManager {
|
|
7
|
-
|
|
7
|
+
slotViewManager: SlotViewManager;
|
|
8
8
|
protected readonly libroExtraProvider: Contribution.Provider<LibroExtensionSlotContribution>;
|
|
9
|
-
constructor(
|
|
9
|
+
constructor(libroExtraProvider: Contribution.Provider<LibroExtensionSlotContribution>);
|
|
10
10
|
getSlotName(libro: LibroView, slot: LibroSlot): string;
|
|
11
11
|
setup(libro: LibroView): void;
|
|
12
12
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"libro-slot-manager.d.ts","sourceRoot":"","sources":["../../src/slot/libro-slot-manager.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAGpD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAElD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,8BAA8B,EAAE,MAAM,0BAA0B,CAAC;AAE1E,qBACa,gBAAgB;
|
|
1
|
+
{"version":3,"file":"libro-slot-manager.d.ts","sourceRoot":"","sources":["../../src/slot/libro-slot-manager.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAGpD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAElD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,8BAA8B,EAAE,MAAM,0BAA0B,CAAC;AAE1E,qBACa,gBAAgB;IACF,eAAe,EAAE,eAAe,CAAC;IAC1D,SAAS,CAAC,QAAQ,CAAC,kBAAkB,EAAE,YAAY,CAAC,QAAQ,CAAC,8BAA8B,CAAC,CAAC;gBAG3F,kBAAkB,EAAE,YAAY,CAAC,QAAQ,CAAC,8BAA8B,CAAC;IAK3E,WAAW,CAAC,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,GAAG,MAAM;IAItD,KAAK,CAAC,KAAK,EAAE,SAAS;CAUvB"}
|
|
@@ -1,26 +1,27 @@
|
|
|
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, _class;
|
|
2
|
+
var _dec, _dec2, _class, _class2, _descriptor;
|
|
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); }); }; }
|
|
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 }); }
|
|
6
7
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
7
8
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
8
9
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
9
10
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
10
11
|
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
12
|
+
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; }
|
|
13
|
+
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.'); }
|
|
11
14
|
import { SlotViewManager } from '@difizen/mana-app';
|
|
12
15
|
import { contrib, inject, singleton } from '@difizen/mana-app';
|
|
13
16
|
import { LibroExtensionSlotContribution } from "./libro-slot-protocol.js";
|
|
14
|
-
export var LibroSlotManager = (_dec = singleton(), _dec(_class = /*#__PURE__*/function () {
|
|
15
|
-
function LibroSlotManager(
|
|
17
|
+
export var LibroSlotManager = (_dec = singleton(), _dec2 = inject(SlotViewManager), _dec(_class = (_class2 = /*#__PURE__*/function () {
|
|
18
|
+
function LibroSlotManager(libroExtraProvider) {
|
|
16
19
|
_classCallCheck(this, LibroSlotManager);
|
|
17
|
-
this
|
|
20
|
+
_initializerDefineProperty(this, "slotViewManager", _descriptor, this);
|
|
18
21
|
this.libroExtraProvider = void 0;
|
|
19
22
|
this.libroExtraProvider = libroExtraProvider;
|
|
20
|
-
this.slotViewManager = slotViewManager;
|
|
21
23
|
}
|
|
22
|
-
LibroSlotManager = contrib(LibroExtensionSlotContribution)(LibroSlotManager, undefined,
|
|
23
|
-
LibroSlotManager = inject(SlotViewManager)(LibroSlotManager, undefined, 0) || LibroSlotManager;
|
|
24
|
+
LibroSlotManager = contrib(LibroExtensionSlotContribution)(LibroSlotManager, undefined, 0) || LibroSlotManager;
|
|
24
25
|
_createClass(LibroSlotManager, [{
|
|
25
26
|
key: "getSlotName",
|
|
26
27
|
value: function getSlotName(libro, slot) {
|
|
@@ -54,4 +55,9 @@ export var LibroSlotManager = (_dec = singleton(), _dec(_class = /*#__PURE__*/fu
|
|
|
54
55
|
}
|
|
55
56
|
}]);
|
|
56
57
|
return LibroSlotManager;
|
|
57
|
-
}()
|
|
58
|
+
}(), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "slotViewManager", [_dec2], {
|
|
59
|
+
configurable: true,
|
|
60
|
+
enumerable: true,
|
|
61
|
+
writable: true,
|
|
62
|
+
initializer: null
|
|
63
|
+
})), _class2)) || _class);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" resolution-mode="require"/>
|
|
1
2
|
import { DefaultSlotView } from '@difizen/mana-app';
|
|
2
|
-
|
|
3
|
-
export declare const LibroExtensionViewComponent: React.ForwardRefExoticComponent<React.RefAttributes<HTMLDivElement>>;
|
|
3
|
+
export declare const LibroExtensionViewComponent: import("react").ForwardRefExoticComponent<import("react").RefAttributes<HTMLDivElement>>;
|
|
4
4
|
export declare class LibroSlotView extends DefaultSlotView {
|
|
5
5
|
label: React.ReactNode;
|
|
6
|
-
view:
|
|
6
|
+
view: import("react").ForwardRefExoticComponent<import("react").RefAttributes<HTMLDivElement>>;
|
|
7
7
|
sort?: boolean;
|
|
8
8
|
}
|
|
9
9
|
//# sourceMappingURL=libro-slot-view.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"libro-slot-view.d.ts","sourceRoot":"","sources":["../../src/slot/libro-slot-view.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAkC,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"libro-slot-view.d.ts","sourceRoot":"","sources":["../../src/slot/libro-slot-view.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,eAAe,EAAkC,MAAM,mBAAmB,CAAC;AAOpF,eAAO,MAAM,2BAA2B,0FA8BvC,CAAC;AAEF,qBAEa,aAAc,SAAQ,eAAe;IACvC,KAAK,EAAE,KAAK,CAAC,SAAS,CAAQ;IAC9B,IAAI,2FAA+B;IAEnC,IAAI,CAAC,EAAE,OAAO,CAAS;CAEjC"}
|
|
@@ -18,11 +18,11 @@ function _initializerWarningHelper(descriptor, context) { throw new Error('Decor
|
|
|
18
18
|
import { DefaultSlotView, view, ViewRender, ViewInstance } from '@difizen/mana-app';
|
|
19
19
|
import { transient } from '@difizen/mana-app';
|
|
20
20
|
import { equals, prop, useInject } from '@difizen/mana-app';
|
|
21
|
-
import
|
|
21
|
+
import { forwardRef } from 'react';
|
|
22
22
|
import { isDisplayView } from "./libro-slot-protocol.js";
|
|
23
23
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
24
24
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
25
|
-
export var LibroExtensionViewComponent = /*#__PURE__*/forwardRef(function LibroExtensionViewComponent(
|
|
25
|
+
export var LibroExtensionViewComponent = /*#__PURE__*/forwardRef(function LibroExtensionViewComponent(props, ref) {
|
|
26
26
|
var instance = useInject(ViewInstance);
|
|
27
27
|
//过滤出实现了DisplayView接口的View,用于控制抢占逻辑
|
|
28
28
|
var filteredChildren = instance.children.filter(function (item) {
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { ColorRegistry } from '@difizen/mana-app';
|
|
2
|
+
import { ColorContribution } from '@difizen/mana-app';
|
|
3
|
+
export declare class LibroColorRegistry implements ColorContribution {
|
|
4
|
+
registerColors(colors: ColorRegistry): void;
|
|
5
|
+
}
|
|
6
|
+
//# sourceMappingURL=libro-color-registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"libro-color-registry.d.ts","sourceRoot":"","sources":["../../src/theme/libro-color-registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAGtD,qBACa,kBAAmB,YAAW,iBAAiB;IAC1D,cAAc,CAAC,MAAM,EAAE,aAAa,GAAG,IAAI;CAkX5C"}
|
|
@@ -487,6 +487,13 @@ export var LibroColorRegistry = (_dec = singleton({
|
|
|
487
487
|
light: '#9f9f9f'
|
|
488
488
|
},
|
|
489
489
|
description: ''
|
|
490
|
+
}, {
|
|
491
|
+
id: 'libro.cell.selected.bg.color',
|
|
492
|
+
defaults: {
|
|
493
|
+
dark: '#353638',
|
|
494
|
+
light: '#F1FAFF'
|
|
495
|
+
},
|
|
496
|
+
description: ''
|
|
490
497
|
});
|
|
491
498
|
}
|
|
492
499
|
}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"all-outputs-scroll-icon.d.ts","sourceRoot":"","sources":["../../src/toolbar/all-outputs-scroll-icon.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAKhC,eAAO,MAAM,oBAAoB,EAAE,EAYlC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { useInject, ViewInstance } from '@difizen/mana-app';
|
|
2
|
+
import { DisableOutputScroll } from "../material-from-designer.js";
|
|
3
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
|
+
export var AllOutputsScrollIcon = function AllOutputsScrollIcon() {
|
|
5
|
+
var libroView = useInject(ViewInstance);
|
|
6
|
+
return /*#__PURE__*/_jsx("div", {
|
|
7
|
+
className: "libro-all-outputs-scroll-button ".concat(libroView.outputsScroll ? 'active' : ''),
|
|
8
|
+
children: /*#__PURE__*/_jsx(DisableOutputScroll, {})
|
|
9
|
+
});
|
|
10
|
+
};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import type { ToolbarRegistry } from '@difizen/mana-app';
|
|
2
2
|
import { ModalService, ToolbarContribution } from '@difizen/mana-app';
|
|
3
|
+
import { LibroService } from '../libro-service.js';
|
|
3
4
|
export declare class LibroToolbarContribution implements ToolbarContribution {
|
|
4
5
|
protected readonly modalService: ModalService;
|
|
5
|
-
|
|
6
|
+
protected readonly libroService: LibroService;
|
|
6
7
|
registerToolbarItems(registry: ToolbarRegistry): void;
|
|
7
8
|
}
|
|
8
9
|
//# sourceMappingURL=libro-toolbar.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"libro-toolbar.d.ts","sourceRoot":"","sources":["../../src/toolbar/libro-toolbar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAEL,YAAY,EAEZ,mBAAmB,
|
|
1
|
+
{"version":3,"file":"libro-toolbar.d.ts","sourceRoot":"","sources":["../../src/toolbar/libro-toolbar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAEL,YAAY,EAEZ,mBAAmB,EAEpB,MAAM,mBAAmB,CAAC;AAI3B,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AA0BnD,qBACa,wBAAyB,YAAW,mBAAmB;IAC5C,SAAS,CAAC,QAAQ,CAAC,YAAY,EAAE,YAAY,CAAC;IAC9C,SAAS,CAAC,QAAQ,CAAC,YAAY,EAAE,YAAY,CAAC;IAEpE,oBAAoB,CAAC,QAAQ,EAAE,eAAe,GAAG,IAAI;CA8KtD"}
|