@difizen/libro-lab 0.1.10 → 0.1.12
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/command/index.d.ts +5 -0
- package/es/command/index.d.ts.map +1 -0
- package/es/command/index.js +4 -0
- package/es/{menu/menu-command.d.ts → command/lab-command.d.ts} +6 -6
- package/es/command/lab-command.d.ts.map +1 -0
- package/es/{menu/menu-command.js → command/lab-command.js} +9 -5
- package/es/{menu/menu-contribution.d.ts → command/lab-menu-contribution.d.ts} +3 -3
- package/es/command/lab-menu-contribution.d.ts.map +1 -0
- package/es/{menu/menu-contribution.js → command/lab-menu-contribution.js} +242 -241
- package/es/command/menu-bar-view.d.ts.map +1 -0
- package/es/{menu → command}/menu-bar-view.js +2 -2
- package/es/command/module.d.ts.map +1 -0
- package/es/{menu → command}/module.js +2 -2
- package/es/config/config-contribution.js +2 -2
- package/es/editor-viewer/code-editor-open-handler.d.ts.map +1 -1
- package/es/editor-viewer/code-editor-open-handler.js +4 -4
- package/es/editor-viewer/code-editor-viewer.d.ts +1 -0
- package/es/editor-viewer/code-editor-viewer.d.ts.map +1 -1
- package/es/editor-viewer/code-editor-viewer.js +8 -2
- package/es/editor-viewer/index.less +16 -0
- package/es/editor-viewer/libro-default-open-handler.d.ts +11 -0
- package/es/editor-viewer/libro-default-open-handler.d.ts.map +1 -0
- package/es/editor-viewer/libro-default-open-handler.js +97 -0
- package/es/editor-viewer/libro-default-viewer.d.ts +14 -0
- package/es/editor-viewer/libro-default-viewer.d.ts.map +1 -0
- package/es/editor-viewer/libro-default-viewer.js +78 -0
- package/es/editor-viewer/module.d.ts.map +1 -1
- package/es/editor-viewer/module.js +3 -1
- package/es/editor-viewer/protocol.d.ts +2 -0
- package/es/editor-viewer/protocol.d.ts.map +1 -1
- package/es/editor-viewer/protocol.js +3 -1
- package/es/github-link/index.js +2 -2
- package/es/image-viewer/open-handler.js +2 -2
- package/es/image-viewer/viewer.js +2 -2
- package/es/index.d.ts +1 -1
- package/es/index.d.ts.map +1 -1
- package/es/index.js +1 -1
- package/es/index.less +17 -5
- package/es/kernel-manager/index.js +2 -2
- package/es/lab-app.d.ts.map +1 -1
- package/es/lab-app.js +6 -4
- package/es/layout/brand/brand.js +2 -2
- package/es/layout/container.js +2 -2
- package/es/layout/content-bottom-tab-view.js +2 -2
- package/es/layout/footer/current-file-footer-view.js +2 -2
- package/es/layout/footer/footer-view.js +2 -2
- package/es/layout/footer/status-footer-view.js +2 -2
- package/es/layout/layout-service.d.ts +2 -1
- package/es/layout/layout-service.d.ts.map +1 -1
- package/es/layout/layout-service.js +59 -25
- package/es/layout/layout.js +3 -4
- package/es/layout/main.js +2 -2
- package/es/layout/saveable-tab-view.d.ts +4 -1
- package/es/layout/saveable-tab-view.d.ts.map +1 -1
- package/es/layout/saveable-tab-view.js +27 -8
- package/es/layout/side-tab-view.js +2 -2
- package/es/module.d.ts.map +1 -1
- package/es/module.js +1 -1
- package/es/toc/libro-toc-panel-view.js +2 -2
- package/es/welcome/entry-point-view.d.ts.map +1 -1
- package/es/welcome/entry-point-view.js +4 -4
- package/es/welcome/welcome-view.js +2 -2
- package/package.json +8 -8
- package/src/command/index.ts +4 -0
- package/src/{menu/menu-command.ts → command/lab-command.ts} +9 -5
- package/src/{menu/menu-contribution.ts → command/lab-menu-contribution.ts} +228 -230
- package/src/{menu → command}/module.ts +2 -2
- package/src/editor-viewer/code-editor-open-handler.ts +2 -5
- package/src/editor-viewer/code-editor-viewer.tsx +7 -0
- package/src/editor-viewer/index.less +16 -0
- package/src/editor-viewer/libro-default-open-handler.ts +34 -0
- package/src/editor-viewer/libro-default-viewer.tsx +60 -0
- package/src/editor-viewer/module.ts +8 -1
- package/src/editor-viewer/protocol.ts +25 -0
- package/src/index.less +17 -5
- package/src/index.ts +1 -1
- package/src/lab-app.ts +6 -1
- package/src/layout/layout-service.ts +25 -3
- package/src/layout/saveable-tab-view.tsx +22 -1
- package/src/module.tsx +1 -1
- package/src/welcome/entry-point-view.tsx +2 -2
- package/es/menu/index.d.ts +0 -5
- package/es/menu/index.d.ts.map +0 -1
- package/es/menu/index.js +0 -4
- package/es/menu/menu-bar-view.d.ts.map +0 -1
- package/es/menu/menu-command.d.ts.map +0 -1
- package/es/menu/menu-contribution.d.ts.map +0 -1
- package/es/menu/module.d.ts.map +0 -1
- package/src/menu/index.ts +0 -4
- /package/es/{menu → command}/menu-bar-view.d.ts +0 -0
- /package/es/{menu → command}/module.d.ts +0 -0
- /package/src/{menu → command}/menu-bar-view.tsx +0 -0
package/es/lab-app.js
CHANGED
|
@@ -7,11 +7,12 @@ function _initializerDefineProperty(target, property, descriptor, context) { if
|
|
|
7
7
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
8
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); } }
|
|
9
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; }
|
|
10
|
-
function _toPropertyKey(
|
|
11
|
-
function _toPrimitive(
|
|
10
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
11
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
12
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
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.'); }
|
|
14
|
-
import { LibroService,
|
|
14
|
+
import { LibroService, LibroJupyterConfiguration, ServerConnection, ServerManager } from '@difizen/libro-jupyter';
|
|
15
|
+
import { terminalDefaultSlot } from '@difizen/libro-terminal';
|
|
15
16
|
import { ConfigurationService, FileTreeViewFactory, URI, ApplicationContribution, SlotViewManager, ViewManager, inject, singleton } from '@difizen/mana-app';
|
|
16
17
|
import { LibroLabLayoutSlots } from "./layout/index.js";
|
|
17
18
|
import { LayoutService } from "./layout/layout-service.js";
|
|
@@ -39,6 +40,7 @@ export var LibroLabApp = (_dec = singleton({
|
|
|
39
40
|
case 0:
|
|
40
41
|
localStorage.setItem(ShouldPreventStoreViewKey, 'false');
|
|
41
42
|
this.configurationService.set(LibroJupyterConfiguration['OpenSlot'], LibroLabLayoutSlots.content);
|
|
43
|
+
this.configurationService.set(terminalDefaultSlot, LibroLabLayoutSlots.contentBottom);
|
|
42
44
|
this.serverManager.ready.then(function () {
|
|
43
45
|
_this.layoutService.setAreaVisible(LibroLabLayoutSlots.navigator, true);
|
|
44
46
|
_this.layoutService.setAreaVisible(LibroLabLayoutSlots.alert, false);
|
|
@@ -46,7 +48,7 @@ export var LibroLabApp = (_dec = singleton({
|
|
|
46
48
|
_this.initialWorkspace();
|
|
47
49
|
return;
|
|
48
50
|
}).catch(console.error);
|
|
49
|
-
case
|
|
51
|
+
case 4:
|
|
50
52
|
case "end":
|
|
51
53
|
return _context.stop();
|
|
52
54
|
}
|
package/es/layout/brand/brand.js
CHANGED
|
@@ -2,8 +2,8 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
2
2
|
var _dec, _dec2, _class;
|
|
3
3
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
4
4
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
5
|
-
function _toPropertyKey(
|
|
6
|
-
function _toPrimitive(
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
7
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
8
8
|
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); }
|
|
9
9
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
package/es/layout/container.js
CHANGED
|
@@ -2,8 +2,8 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
2
2
|
var _dec, _dec2, _class;
|
|
3
3
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
4
4
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
5
|
-
function _toPropertyKey(
|
|
6
|
-
function _toPrimitive(
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
7
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
8
8
|
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); }
|
|
9
9
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -4,8 +4,8 @@ function _initializerDefineProperty(target, property, descriptor, context) { if
|
|
|
4
4
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
5
5
|
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); } }
|
|
6
6
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
7
|
-
function _toPropertyKey(
|
|
8
|
-
function _toPrimitive(
|
|
7
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
8
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
9
9
|
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); }
|
|
10
10
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
11
11
|
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); }; }
|
|
@@ -4,8 +4,8 @@ function _initializerDefineProperty(target, property, descriptor, context) { if
|
|
|
4
4
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
5
5
|
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); } }
|
|
6
6
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
7
|
-
function _toPropertyKey(
|
|
8
|
-
function _toPrimitive(
|
|
7
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
8
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
9
9
|
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); }
|
|
10
10
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
11
11
|
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); }; }
|
|
@@ -2,8 +2,8 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
2
2
|
var _dec, _dec2, _class;
|
|
3
3
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
4
4
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
5
|
-
function _toPropertyKey(
|
|
6
|
-
function _toPrimitive(
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
7
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
8
8
|
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); }
|
|
9
9
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -4,8 +4,8 @@ function _initializerDefineProperty(target, property, descriptor, context) { if
|
|
|
4
4
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
5
5
|
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); } }
|
|
6
6
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
7
|
-
function _toPropertyKey(
|
|
8
|
-
function _toPrimitive(
|
|
7
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
8
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
9
9
|
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); }
|
|
10
10
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
11
11
|
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); }; }
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { LibroService } from '@difizen/libro-jupyter';
|
|
2
|
-
import type { View, ViewOpenHandlerOptions } from '@difizen/mana-app';
|
|
2
|
+
import type { View, ViewOpenHandlerOptions, ViewOpenOption } from '@difizen/mana-app';
|
|
3
3
|
import { SlotViewManager } from '@difizen/mana-app';
|
|
4
4
|
import type { LibroLabLayoutSlotsType, StatusType } from './protocol.js';
|
|
5
5
|
export type VisibilityMap = Record<LibroLabLayoutSlotsType, boolean>;
|
|
@@ -11,6 +11,7 @@ export declare class LayoutService {
|
|
|
11
11
|
visibilityMap: VisibilityMap;
|
|
12
12
|
isAreaVisible(slot: LibroLabLayoutSlotsType): boolean;
|
|
13
13
|
setAreaVisible(slot: LibroLabLayoutSlotsType, visible: boolean): void;
|
|
14
|
+
protected onViewAdded(slot: string, view: View | undefined, option: ViewOpenOption | undefined): void;
|
|
14
15
|
addView(view: View, option?: ViewOpenHandlerOptions): Promise<void>;
|
|
15
16
|
getActiveView(slot: LibroLabLayoutSlotsType): View | undefined;
|
|
16
17
|
onSlotActiveChange(slot: LibroLabLayoutSlotsType, handler: () => void): import("@difizen/mana-app").Disposable | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layout-service.d.ts","sourceRoot":"","sources":["../../src/layout/layout-service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwB,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAC5E,OAAO,KAAK,EAAE,IAAI,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"layout-service.d.ts","sourceRoot":"","sources":["../../src/layout/layout-service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwB,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAC5E,OAAO,KAAK,EAAE,IAAI,EAAE,sBAAsB,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEtF,OAAO,EAKL,eAAe,EAChB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,KAAK,EAAE,uBAAuB,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAGzE,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC,uBAAuB,EAAE,OAAO,CAAC,CAAC;AACrE,qBACa,aAAa;IACxB,SAAS,CAAC,QAAQ,CAAC,eAAe,EAAE,eAAe,CAAC;IACpD,SAAS,CAAC,QAAQ,CAAC,YAAY,EAAE,YAAY,CAAC;gBAGnB,eAAe,EAAE,eAAe,EACnC,YAAY,EAAE,YAAY;IAWlD,WAAW,EAAE,UAAU,CAAa;IAEpC,aAAa,EAAE,aAAa,CAS1B;IAEF,aAAa,CAAC,IAAI,EAAE,uBAAuB,GAAG,OAAO;IAIrD,cAAc,CAAC,IAAI,EAAE,uBAAuB,EAAE,OAAO,EAAE,OAAO;IAI9D,SAAS,CAAC,WAAW,CACnB,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,IAAI,GAAG,SAAS,EACtB,MAAM,EAAE,cAAc,GAAG,SAAS;IAa9B,OAAO,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,CAAC,EAAE,sBAAsB,GAAG,OAAO,CAAC,IAAI,CAAC;IAQzE,aAAa,CAAC,IAAI,EAAE,uBAAuB;IAU3C,kBAAkB,CAAC,IAAI,EAAE,uBAAuB,EAAE,OAAO,EAAE,MAAM,IAAI;IAU/D,sBAAsB;CAoB7B"}
|
|
@@ -11,8 +11,8 @@ function _initializerDefineProperty(target, property, descriptor, context) { if
|
|
|
11
11
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
12
12
|
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); } }
|
|
13
13
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
14
|
-
function _toPropertyKey(
|
|
15
|
-
function _toPrimitive(
|
|
14
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
15
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
16
16
|
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; }
|
|
17
17
|
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.'); }
|
|
18
18
|
import { LibroNavigatableView, LibroService } from '@difizen/libro-jupyter';
|
|
@@ -21,12 +21,16 @@ import { DefaultSlotView, inject, prop, singleton, SlotViewManager } from '@difi
|
|
|
21
21
|
import { LibroLabLayoutSlots } from "./protocol.js";
|
|
22
22
|
export var LayoutService = (_dec = singleton(), _dec2 = prop(), _dec3 = prop(), _dec(_class = (_class2 = /*#__PURE__*/function () {
|
|
23
23
|
function LayoutService(slotViewManager, libroService) {
|
|
24
|
+
var _this = this;
|
|
24
25
|
_classCallCheck(this, LayoutService);
|
|
25
26
|
_initializerDefineProperty(this, "serverSatus", _descriptor, this);
|
|
26
27
|
_initializerDefineProperty(this, "visibilityMap", _descriptor2, this);
|
|
27
28
|
this.slotViewManager = slotViewManager;
|
|
28
29
|
this.libroService = libroService;
|
|
29
30
|
this.onOpenSlotActiveChange();
|
|
31
|
+
this.slotViewManager.onViewAdded(function (args) {
|
|
32
|
+
_this.onViewAdded(args.slot, args.view, args.option);
|
|
33
|
+
});
|
|
30
34
|
}
|
|
31
35
|
LayoutService = inject(LibroService)(LayoutService, undefined, 1) || LayoutService;
|
|
32
36
|
LayoutService = inject(SlotViewManager)(LayoutService, undefined, 0) || LayoutService;
|
|
@@ -40,6 +44,19 @@ export var LayoutService = (_dec = singleton(), _dec2 = prop(), _dec3 = prop(),
|
|
|
40
44
|
value: function setAreaVisible(slot, visible) {
|
|
41
45
|
this.visibilityMap[slot] = visible;
|
|
42
46
|
}
|
|
47
|
+
}, {
|
|
48
|
+
key: "onViewAdded",
|
|
49
|
+
value: function onViewAdded(slot, view, option) {
|
|
50
|
+
if (!view) {
|
|
51
|
+
// TODO: hide slot
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
if (Object.keys(this.visibilityMap).includes(slot)) {
|
|
55
|
+
if (option !== null && option !== void 0 && option.reveal) {
|
|
56
|
+
this.setAreaVisible(slot, true);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
43
60
|
}, {
|
|
44
61
|
key: "addView",
|
|
45
62
|
value: function () {
|
|
@@ -49,9 +66,12 @@ export var LayoutService = (_dec = singleton(), _dec2 = prop(), _dec3 = prop(),
|
|
|
49
66
|
while (1) switch (_context.prev = _context.next) {
|
|
50
67
|
case 0:
|
|
51
68
|
_ref = option || {}, _ref$slot = _ref.slot, slot = _ref$slot === void 0 ? LibroLabLayoutSlots.main : _ref$slot, viewOpenOption = _objectWithoutProperties(_ref, _excluded);
|
|
52
|
-
|
|
69
|
+
if (option !== null && option !== void 0 && option.reveal) {
|
|
70
|
+
this.setAreaVisible(slot, true);
|
|
71
|
+
}
|
|
72
|
+
_context.next = 4;
|
|
53
73
|
return this.slotViewManager.addView(view, slot, viewOpenOption);
|
|
54
|
-
case
|
|
74
|
+
case 4:
|
|
55
75
|
case "end":
|
|
56
76
|
return _context.stop();
|
|
57
77
|
}
|
|
@@ -87,38 +107,53 @@ export var LayoutService = (_dec = singleton(), _dec2 = prop(), _dec3 = prop(),
|
|
|
87
107
|
}, {
|
|
88
108
|
key: "onOpenSlotActiveChange",
|
|
89
109
|
value: function () {
|
|
90
|
-
var _onOpenSlotActiveChange = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
91
|
-
var
|
|
110
|
+
var _onOpenSlotActiveChange = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
|
|
111
|
+
var _this2 = this;
|
|
92
112
|
var slotView;
|
|
93
|
-
return _regeneratorRuntime().wrap(function
|
|
94
|
-
while (1) switch (
|
|
113
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
114
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
95
115
|
case 0:
|
|
96
116
|
if (!this.isAreaVisible(LibroLabLayoutSlots.content)) {
|
|
97
|
-
|
|
117
|
+
_context3.next = 6;
|
|
98
118
|
break;
|
|
99
119
|
}
|
|
100
|
-
|
|
120
|
+
_context3.next = 3;
|
|
101
121
|
return this.slotViewManager.getOrCreateSlotView(LibroLabLayoutSlots.content);
|
|
102
122
|
case 3:
|
|
103
|
-
slotView =
|
|
123
|
+
slotView = _context3.sent;
|
|
104
124
|
observable(slotView);
|
|
105
125
|
if (slotView instanceof DefaultSlotView) {
|
|
106
|
-
slotView.onActiveChange(function () {
|
|
107
|
-
var active
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
126
|
+
slotView.onActiveChange( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
127
|
+
var active, _active$libroView;
|
|
128
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
129
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
130
|
+
case 0:
|
|
131
|
+
active = slotView.active;
|
|
132
|
+
if (!(active instanceof LibroNavigatableView)) {
|
|
133
|
+
_context2.next = 8;
|
|
134
|
+
break;
|
|
135
|
+
}
|
|
136
|
+
_context2.next = 4;
|
|
137
|
+
return active.ready;
|
|
138
|
+
case 4:
|
|
139
|
+
(_active$libroView = active.libroView) === null || _active$libroView === void 0 || _active$libroView.focus();
|
|
140
|
+
_this2.libroService.active = active.libroView;
|
|
141
|
+
_context2.next = 9;
|
|
142
|
+
break;
|
|
143
|
+
case 8:
|
|
144
|
+
_this2.libroService.active = undefined;
|
|
145
|
+
case 9:
|
|
146
|
+
case "end":
|
|
147
|
+
return _context2.stop();
|
|
148
|
+
}
|
|
149
|
+
}, _callee2);
|
|
150
|
+
})));
|
|
116
151
|
}
|
|
117
152
|
case 6:
|
|
118
153
|
case "end":
|
|
119
|
-
return
|
|
154
|
+
return _context3.stop();
|
|
120
155
|
}
|
|
121
|
-
},
|
|
156
|
+
}, _callee3, this);
|
|
122
157
|
}));
|
|
123
158
|
function onOpenSlotActiveChange() {
|
|
124
159
|
return _onOpenSlotActiveChange.apply(this, arguments);
|
|
@@ -139,7 +174,6 @@ export var LayoutService = (_dec = singleton(), _dec2 = prop(), _dec3 = prop(),
|
|
|
139
174
|
enumerable: true,
|
|
140
175
|
writable: true,
|
|
141
176
|
initializer: function initializer() {
|
|
142
|
-
|
|
143
|
-
return _ref2 = {}, _defineProperty(_ref2, LibroLabLayoutSlots.header, true), _defineProperty(_ref2, LibroLabLayoutSlots.container, true), _defineProperty(_ref2, LibroLabLayoutSlots.main, true), _defineProperty(_ref2, LibroLabLayoutSlots.footer, true), _defineProperty(_ref2, LibroLabLayoutSlots.navigator, false), _defineProperty(_ref2, LibroLabLayoutSlots.content, true), _defineProperty(_ref2, LibroLabLayoutSlots.contentBottom, false), _defineProperty(_ref2, LibroLabLayoutSlots.alert, true), _ref2;
|
|
177
|
+
return _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, LibroLabLayoutSlots.header, true), LibroLabLayoutSlots.container, true), LibroLabLayoutSlots.main, true), LibroLabLayoutSlots.footer, true), LibroLabLayoutSlots.navigator, false), LibroLabLayoutSlots.content, true), LibroLabLayoutSlots.contentBottom, false), LibroLabLayoutSlots.alert, true);
|
|
144
178
|
}
|
|
145
179
|
})), _class2)) || _class);
|
package/es/layout/layout.js
CHANGED
|
@@ -7,8 +7,8 @@ function _initializerDefineProperty(target, property, descriptor, context) { if
|
|
|
7
7
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
8
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); } }
|
|
9
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; }
|
|
10
|
-
function _toPropertyKey(
|
|
11
|
-
function _toPrimitive(
|
|
10
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
11
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
12
12
|
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); }
|
|
13
13
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
14
14
|
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); }; }
|
|
@@ -82,9 +82,8 @@ export var LibroLabLayoutView = (_dec = singleton(), _dec2 = view('libro-lab-lay
|
|
|
82
82
|
}, {
|
|
83
83
|
key: "restoreState",
|
|
84
84
|
value: function restoreState(oldState) {
|
|
85
|
-
var _objectSpread2;
|
|
86
85
|
var state = oldState;
|
|
87
|
-
this.layoutService.visibilityMap = _objectSpread(_objectSpread({}, state.visibilityMap), {}, (
|
|
86
|
+
this.layoutService.visibilityMap = _objectSpread(_objectSpread({}, state.visibilityMap), {}, _defineProperty(_defineProperty({}, LibroLabLayoutSlots.navigator, false), LibroLabLayoutSlots.alert, true));
|
|
88
87
|
}
|
|
89
88
|
}]);
|
|
90
89
|
return LibroLabLayoutView;
|
package/es/layout/main.js
CHANGED
|
@@ -2,8 +2,8 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
2
2
|
var _dec, _dec2, _class;
|
|
3
3
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
4
4
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
5
|
-
function _toPropertyKey(
|
|
6
|
-
function _toPrimitive(
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
7
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
8
8
|
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); }
|
|
9
9
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { JupyterFileService } from '@difizen/libro-jupyter';
|
|
2
|
+
import type { CardTabOption, View } from '@difizen/mana-app';
|
|
3
|
+
import { ViewManager } from '@difizen/mana-app';
|
|
2
4
|
import { CardTabView } from '@difizen/mana-app';
|
|
3
5
|
export declare class SaveableTabView extends CardTabView {
|
|
6
|
+
constructor(option: CardTabOption, manager: ViewManager, fileService: JupyterFileService);
|
|
4
7
|
protected renderTab(item: View): import("react/jsx-runtime").JSX.Element;
|
|
5
8
|
protected renderTail(item: View): import("react/jsx-runtime").JSX.Element;
|
|
6
9
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"saveable-tab-view.d.ts","sourceRoot":"","sources":["../../src/layout/saveable-tab-view.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"saveable-tab-view.d.ts","sourceRoot":"","sources":["../../src/layout/saveable-tab-view.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,KAAK,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,EAAE,WAAW,EAAc,MAAM,mBAAmB,CAAC;AAG5D,OAAO,EACL,WAAW,EAMZ,MAAM,mBAAmB,CAAC;AAK3B,qBAEa,eAAgB,SAAQ,WAAW;gBAExB,MAAM,EAAE,aAAa,EACpB,OAAO,EAAE,WAAW,EACb,WAAW,EAAE,kBAAkB;cAc1C,SAAS,CAAC,IAAI,EAAE,IAAI;IAuBvC,SAAS,CAAC,UAAU,CAAC,IAAI,EAAE,IAAI;CAyBhC"}
|
|
@@ -3,8 +3,8 @@ var _dec, _dec2, _class;
|
|
|
3
3
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
4
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
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(
|
|
7
|
-
function _toPrimitive(
|
|
6
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
7
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
8
8
|
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); }
|
|
9
9
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
10
10
|
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,6 +13,10 @@ function _assertThisInitialized(self) { if (self === void 0) { throw new Referen
|
|
|
13
13
|
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; } }
|
|
14
14
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
15
15
|
import { CloseOutlined } from '@ant-design/icons';
|
|
16
|
+
import { JupyterFileService } from '@difizen/libro-jupyter';
|
|
17
|
+
import { ViewManager, ViewOption } from '@difizen/mana-app';
|
|
18
|
+
import { NavigatableView } from '@difizen/mana-app';
|
|
19
|
+
import { inject } from '@difizen/mana-app';
|
|
16
20
|
import { CardTabView, MenuRender, transient, view, ViewContext, Saveable } from '@difizen/mana-app';
|
|
17
21
|
import { Dropdown } from '@difizen/mana-react';
|
|
18
22
|
import { Badge } from 'antd';
|
|
@@ -22,10 +26,25 @@ import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
22
26
|
export var SaveableTabView = (_dec = transient(), _dec2 = view('libro-lab-saveable-tab'), _dec(_class = _dec2(_class = /*#__PURE__*/function (_CardTabView) {
|
|
23
27
|
_inherits(SaveableTabView, _CardTabView);
|
|
24
28
|
var _super = _createSuper(SaveableTabView);
|
|
25
|
-
function SaveableTabView() {
|
|
29
|
+
function SaveableTabView(option, manager, fileService) {
|
|
30
|
+
var _this;
|
|
26
31
|
_classCallCheck(this, SaveableTabView);
|
|
27
|
-
|
|
32
|
+
_this = _super.call(this, option, manager);
|
|
33
|
+
fileService.onFileRemove(function (e) {
|
|
34
|
+
var toDisposeView = _this.children.find(function (item) {
|
|
35
|
+
var _item$getResourceUri;
|
|
36
|
+
if (NavigatableView.is(item) && ((_item$getResourceUri = item.getResourceUri()) === null || _item$getResourceUri === void 0 ? void 0 : _item$getResourceUri.path.toString()) === e) {
|
|
37
|
+
return true;
|
|
38
|
+
}
|
|
39
|
+
return undefined;
|
|
40
|
+
});
|
|
41
|
+
toDisposeView === null || toDisposeView === void 0 || toDisposeView.dispose();
|
|
42
|
+
});
|
|
43
|
+
return _this;
|
|
28
44
|
}
|
|
45
|
+
SaveableTabView = inject(JupyterFileService)(SaveableTabView, undefined, 2) || SaveableTabView;
|
|
46
|
+
SaveableTabView = inject(ViewManager)(SaveableTabView, undefined, 1) || SaveableTabView;
|
|
47
|
+
SaveableTabView = inject(ViewOption)(SaveableTabView, undefined, 0) || SaveableTabView;
|
|
29
48
|
_createClass(SaveableTabView, [{
|
|
30
49
|
key: "renderTab",
|
|
31
50
|
value: function renderTab(item) {
|
|
@@ -51,7 +70,7 @@ export var SaveableTabView = (_dec = transient(), _dec2 = view('libro-lab-saveab
|
|
|
51
70
|
}, {
|
|
52
71
|
key: "renderTail",
|
|
53
72
|
value: function renderTail(item) {
|
|
54
|
-
var
|
|
73
|
+
var _this2 = this;
|
|
55
74
|
var isDirty = Saveable.is(item) && Saveable.isDirty(item);
|
|
56
75
|
return /*#__PURE__*/_jsx("div", {
|
|
57
76
|
className: "libro-lab-editor-tab-tail",
|
|
@@ -63,9 +82,9 @@ export var SaveableTabView = (_dec = transient(), _dec2 = view('libro-lab-saveab
|
|
|
63
82
|
}) : item.title.closable && /*#__PURE__*/_jsx(CloseOutlined, {
|
|
64
83
|
onClick: function onClick(e) {
|
|
65
84
|
e.stopPropagation();
|
|
66
|
-
|
|
67
|
-
if (
|
|
68
|
-
|
|
85
|
+
_this2.close(item);
|
|
86
|
+
if (_this2.children.length > 0) {
|
|
87
|
+
_this2.active = _this2.children[_this2.children.length - 1];
|
|
69
88
|
}
|
|
70
89
|
},
|
|
71
90
|
className: "mana-tab-close"
|
|
@@ -3,8 +3,8 @@ var _dec, _dec2, _class;
|
|
|
3
3
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
4
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
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(
|
|
7
|
-
function _toPrimitive(
|
|
6
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
7
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
8
8
|
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); }
|
|
9
9
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
10
10
|
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); }; }
|
package/es/module.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../src/module.tsx"],"names":[],"mappings":"AAGA,OAAO,EACL,UAAU,EAKX,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../src/module.tsx"],"names":[],"mappings":"AAGA,OAAO,EACL,UAAU,EAKX,MAAM,mBAAmB,CAAC;AAgB3B,OAAO,cAAc,CAAC;AAMtB,eAAO,MAAM,cAAc,YA0ExB,CAAC"}
|
package/es/module.js
CHANGED
|
@@ -2,6 +2,7 @@ import { FileView, LibroJupyterModule } from '@difizen/libro-jupyter';
|
|
|
2
2
|
import { LibroPromptCellModule } from '@difizen/libro-prompt-cell';
|
|
3
3
|
import { TerminalModule } from '@difizen/libro-terminal';
|
|
4
4
|
import { ManaModule, createSlotPreference, RootSlotId, createViewPreference, HeaderArea } from '@difizen/mana-app';
|
|
5
|
+
import { LibroLabHeaderMenuModule } from "./command/module.js";
|
|
5
6
|
import { LabConfigAppContribution } from "./config/config-contribution.js";
|
|
6
7
|
import { CodeEditorViewerModule } from "./editor-viewer/index.js";
|
|
7
8
|
import { GithubLinkView } from "./github-link/index.js";
|
|
@@ -13,7 +14,6 @@ import { LibroLabLayoutModule, LibroLabLayoutSlots, LibroLabLayoutView } from ".
|
|
|
13
14
|
import { SaveableTabView } from "./layout/saveable-tab-view.js";
|
|
14
15
|
import "./index.less";
|
|
15
16
|
import { LibroLabSideTabView } from "./layout/side-tab-view.js";
|
|
16
|
-
import { LibroLabHeaderMenuModule } from "./menu/module.js";
|
|
17
17
|
import { LibroLabTocModule } from "./toc/module.js";
|
|
18
18
|
import { EntryPointView } from "./welcome/entry-point-view.js";
|
|
19
19
|
import { WelcomeView } from "./welcome/index.js";
|
|
@@ -4,8 +4,8 @@ function _initializerDefineProperty(target, property, descriptor, context) { if
|
|
|
4
4
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
5
5
|
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); } }
|
|
6
6
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
7
|
-
function _toPropertyKey(
|
|
8
|
-
function _toPrimitive(
|
|
7
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
8
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
9
9
|
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); }
|
|
10
10
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
11
11
|
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); }; }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entry-point-view.d.ts","sourceRoot":"","sources":["../../src/welcome/entry-point-view.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"entry-point-view.d.ts","sourceRoot":"","sources":["../../src/welcome/entry-point-view.tsx"],"names":[],"mappings":";AAiBA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAM7C,OAAO,cAAc,CAAC;AAEtB,eAAO,MAAM,mBAAmB,mFAiJ9B,CAAC;AAEH,qBAEa,cAAe,SAAQ,QAAQ;IACjC,IAAI,oFAAuB;CACrC"}
|
|
@@ -2,8 +2,8 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
2
2
|
var _dec, _dec2, _class;
|
|
3
3
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
4
4
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
5
|
-
function _toPropertyKey(
|
|
6
|
-
function _toPrimitive(
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
7
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
8
8
|
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); }
|
|
9
9
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -19,12 +19,12 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
19
19
|
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; } }
|
|
20
20
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
21
21
|
import { NotebookIcon, PythonIcon, JSONIcon, MoreIcon, FileCreateModal, FileView } from '@difizen/libro-jupyter';
|
|
22
|
+
import { TerminalCommands } from '@difizen/libro-terminal';
|
|
22
23
|
import { CommandRegistry, ModalService, singleton, useInject, view, ViewManager } from '@difizen/mana-app';
|
|
23
24
|
import { BaseView } from '@difizen/mana-app';
|
|
24
25
|
import { Col, Row } from 'antd';
|
|
25
26
|
import { forwardRef, useEffect, useState } from 'react';
|
|
26
27
|
import { TerminalIcon } from "../common/icon.js";
|
|
27
|
-
import { MenuCommands } from "../menu/index.js";
|
|
28
28
|
import "./index.less";
|
|
29
29
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
30
30
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -146,7 +146,7 @@ export var EntryPointComponent = /*#__PURE__*/forwardRef(function EntryPointComp
|
|
|
146
146
|
children: /*#__PURE__*/_jsxs("div", {
|
|
147
147
|
className: "libro-lab-entry-point-item",
|
|
148
148
|
onClick: function onClick() {
|
|
149
|
-
commandRegistry.executeCommand(
|
|
149
|
+
commandRegistry.executeCommand(TerminalCommands['OpenTerminal'].id);
|
|
150
150
|
},
|
|
151
151
|
children: [/*#__PURE__*/_jsx(TerminalIcon, {}), /*#__PURE__*/_jsx("span", {
|
|
152
152
|
className: "libro-lab-entry-point-item-text",
|
|
@@ -2,8 +2,8 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
2
2
|
var _dec, _dec2, _class;
|
|
3
3
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
4
4
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
5
|
-
function _toPropertyKey(
|
|
6
|
-
function _toPrimitive(
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
7
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
8
8
|
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); }
|
|
9
9
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|