@difizen/libro-lab 0.2.35 → 0.2.36

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. package/es/command/lab-command.d.ts.map +1 -1
  2. package/es/command/lab-command.js +31 -35
  3. package/es/command/lab-menu-contribution.d.ts.map +1 -1
  4. package/es/command/lab-menu-contribution.js +197 -39
  5. package/es/command/menu-bar-view.d.ts.map +1 -1
  6. package/es/command/menu-bar-view.js +6 -1
  7. package/es/common/icon.d.ts.map +1 -1
  8. package/es/common/icon.js +21 -36
  9. package/es/editor-viewer/empty-icon.d.ts +3 -0
  10. package/es/editor-viewer/empty-icon.d.ts.map +1 -0
  11. package/es/editor-viewer/empty-icon.js +495 -0
  12. package/es/editor-viewer/empty.svg +136 -0
  13. package/es/editor-viewer/libro-default-viewer.d.ts.map +1 -1
  14. package/es/editor-viewer/libro-default-viewer.js +4 -6
  15. package/es/kernel-and-terminal-panel/collapse/index.d.ts.map +1 -1
  16. package/es/kernel-and-terminal-panel/collapse/index.js +10 -9
  17. package/es/kernel-and-terminal-panel/kernel-and-terminal-panel-view.d.ts.map +1 -1
  18. package/es/kernel-and-terminal-panel/kernel-and-terminal-panel-view.js +6 -1
  19. package/es/kernel-and-terminal-panel/panel-command.d.ts.map +1 -1
  20. package/es/kernel-and-terminal-panel/panel-command.js +3 -2
  21. package/es/kernel-manager/index.d.ts.map +1 -1
  22. package/es/kernel-manager/index.js +7 -2
  23. package/es/lang-switcher/index.d.ts +7 -0
  24. package/es/lang-switcher/index.d.ts.map +1 -0
  25. package/es/lang-switcher/index.js +58 -0
  26. package/es/layout/footer/current-file-footer-view.d.ts.map +1 -1
  27. package/es/layout/footer/current-file-footer-view.js +2 -1
  28. package/es/layout/footer/status-footer-view.d.ts.map +1 -1
  29. package/es/layout/footer/status-footer-view.js +12 -11
  30. package/es/layout/layout-service.d.ts +2 -0
  31. package/es/layout/layout-service.d.ts.map +1 -1
  32. package/es/layout/layout-service.js +15 -4
  33. package/es/layout/layout.d.ts.map +1 -1
  34. package/es/layout/layout.js +3 -2
  35. package/es/module.d.ts.map +1 -1
  36. package/es/module.js +14 -1
  37. package/es/toc/libro-toc-panel-view.d.ts.map +1 -1
  38. package/es/toc/libro-toc-panel-view.js +7 -2
  39. package/es/welcome/entry-point-view.d.ts.map +1 -1
  40. package/es/welcome/entry-point-view.js +5 -4
  41. package/es/welcome/welcome-view.d.ts.map +1 -1
  42. package/es/welcome/welcome-view.js +8 -3
  43. package/package.json +8 -6
  44. package/src/command/lab-command.ts +31 -35
  45. package/src/command/{lab-menu-contribution.ts → lab-menu-contribution.tsx} +47 -39
  46. package/src/command/menu-bar-view.tsx +2 -1
  47. package/src/common/icon.tsx +0 -8
  48. package/src/editor-viewer/empty-icon.tsx +425 -0
  49. package/src/editor-viewer/empty.svg +136 -0
  50. package/src/editor-viewer/libro-default-viewer.tsx +7 -7
  51. package/src/kernel-and-terminal-panel/collapse/index.tsx +11 -10
  52. package/src/kernel-and-terminal-panel/kernel-and-terminal-panel-view.tsx +5 -1
  53. package/src/kernel-and-terminal-panel/panel-command.tsx +3 -2
  54. package/src/kernel-manager/index.tsx +3 -2
  55. package/src/lang-switcher/index.tsx +36 -0
  56. package/src/layout/footer/current-file-footer-view.tsx +2 -1
  57. package/src/layout/footer/status-footer-view.tsx +13 -13
  58. package/src/layout/layout-service.ts +7 -0
  59. package/src/layout/layout.tsx +3 -2
  60. package/src/module.tsx +17 -0
  61. package/src/toc/libro-toc-panel-view.tsx +3 -2
  62. package/src/welcome/entry-point-view.tsx +40 -37
  63. package/src/welcome/welcome-view.tsx +8 -3
@@ -6,6 +6,7 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
6
6
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
7
7
  import { CaretDownOutlined, CaretRightOutlined } from '@ant-design/icons';
8
8
  import { ViewContext } from '@difizen/mana-app';
9
+ import { l10n } from '@difizen/mana-l10n';
9
10
  import { Empty, message, Popconfirm } from 'antd';
10
11
  import React, { useState } from 'react';
11
12
  import { LibroCollapseContent } from "./collapse-content.js";
@@ -25,7 +26,7 @@ var getCollapseContentView = function getCollapseContentView(type, items, tabVie
25
26
  if (!items) {
26
27
  return /*#__PURE__*/_jsx(Empty, {
27
28
  image: Empty.PRESENTED_IMAGE_SIMPLE,
28
- description: "\u6682\u65E0\u5185\u5BB9",
29
+ description: l10n.t('暂无内容'),
29
30
  className: "kernel-and-terminal-panel-empty"
30
31
  });
31
32
  }
@@ -51,13 +52,13 @@ var getCollapseContentView = function getCollapseContentView(type, items, tabVie
51
52
  var getCollapseHeaderLabel = function getCollapseHeaderLabel(type) {
52
53
  switch (type) {
53
54
  case LibroPanelCollapseItemType.PAGE:
54
- return '已开启的标签页';
55
+ return l10n.t('已开启的标签页');
55
56
  case LibroPanelCollapseItemType.KERNEL:
56
- return '运行的内核';
57
+ return l10n.t('运行的内核');
57
58
  case LibroPanelCollapseItemType.TERMINAL:
58
- return '运行的终端';
59
+ return l10n.t('运行的终端');
59
60
  case LibroPanelCollapseItemType.LSP:
60
- return '语言服务';
61
+ return l10n.t('语言服务');
61
62
  }
62
63
  };
63
64
  export var LibroCollapse = function LibroCollapse(props) {
@@ -84,9 +85,9 @@ export var LibroCollapse = function LibroCollapse(props) {
84
85
  }), /*#__PURE__*/_jsx("div", {
85
86
  className: "libro-panel-collapse-header-closeAll",
86
87
  children: /*#__PURE__*/_jsx(Popconfirm, {
87
- title: "\u4F60\u786E\u5B9A\u8981\u5173\u95ED\u5168\u90E8\u5417\uFF1F",
88
- okText: "\u786E\u5B9A",
89
- cancelText: "\u53D6\u6D88",
88
+ title: l10n.t('你确定要关闭全部吗?'),
89
+ okText: l10n.t('确定'),
90
+ cancelText: l10n.t('取消'),
90
91
  onConfirm: function onConfirm() {
91
92
  if (props.shutdownAll) {
92
93
  props.shutdownAll().catch(function (e) {
@@ -95,7 +96,7 @@ export var LibroCollapse = function LibroCollapse(props) {
95
96
  });
96
97
  }
97
98
  },
98
- children: "\u5173\u95ED\u5168\u90E8"
99
+ children: l10n.t('关闭全部')
99
100
  })
100
101
  })]
101
102
  }), open && /*#__PURE__*/_jsx("div", {
@@ -1 +1 @@
1
- {"version":3,"file":"kernel-and-terminal-panel-view.d.ts","sourceRoot":"","sources":["../../src/kernel-and-terminal-panel/kernel-and-terminal-panel-view.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAChF,OAAO,EAAE,0BAA0B,EAAE,MAAM,gCAAgC,CAAC;AAC5E,OAAO,EAAoB,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC5E,OAAO,EACL,QAAQ,EACR,eAAe,EAOf,WAAW,EACZ,MAAM,mBAAmB,CAAC;AAK3B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAQ5D,OAAO,cAAc,CAAC;AAgKtB,eAAO,MAAM,4BAA4B,mCAAmC,CAAC;AAE7E,qBAEa,0BAA2B,SAAQ,QAAQ;IAC7C,IAAI,yBAAe;IACP,SAAS,CAAC,WAAW,EAAE,WAAW,CAAC;IACjC,SAAS,CAAC,aAAa,EAAE,aAAa,CAAC;IAE9D,kBAAkB,EAAE,kBAAkB,CAAC;IACvC,mBAAmB,EAAE,mBAAmB,CAAC;IACzC,eAAe,EAAE,eAAe,CAAC;IACjC,0BAA0B,EAAE,0BAA0B,CAAC;IACvD,eAAe,EAAE,eAAe,CAAC;gBAGH,kBAAkB,EAAE,kBAAkB,EACrC,mBAAmB,EAAE,mBAAmB,EAC5C,eAAe,EAAE,eAAe,EAEzD,0BAA0B,EAAE,0BAA0B,EAC7B,eAAe,EAAE,eAAe;IAa3D,mBAAmB,IAAI,eAAe;IAMtC,OAAO;CAKR"}
1
+ {"version":3,"file":"kernel-and-terminal-panel-view.d.ts","sourceRoot":"","sources":["../../src/kernel-and-terminal-panel/kernel-and-terminal-panel-view.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAChF,OAAO,EAAE,0BAA0B,EAAE,MAAM,gCAAgC,CAAC;AAC5E,OAAO,EAAoB,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC5E,OAAO,EACL,QAAQ,EACR,eAAe,EAOf,WAAW,EACZ,MAAM,mBAAmB,CAAC;AAM3B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAQ5D,OAAO,cAAc,CAAC;AAmKtB,eAAO,MAAM,4BAA4B,mCAAmC,CAAC;AAE7E,qBAEa,0BAA2B,SAAQ,QAAQ;IAC7C,IAAI,yBAAe;IACP,SAAS,CAAC,WAAW,EAAE,WAAW,CAAC;IACjC,SAAS,CAAC,aAAa,EAAE,aAAa,CAAC;IAE9D,kBAAkB,EAAE,kBAAkB,CAAC;IACvC,mBAAmB,EAAE,mBAAmB,CAAC;IACzC,eAAe,EAAE,eAAe,CAAC;IACjC,0BAA0B,EAAE,0BAA0B,CAAC;IACvD,eAAe,EAAE,eAAe,CAAC;gBAGH,kBAAkB,EAAE,kBAAkB,EACrC,mBAAmB,EAAE,mBAAmB,EAC5C,eAAe,EAAE,eAAe,EAEzD,0BAA0B,EAAE,0BAA0B,EAC7B,eAAe,EAAE,eAAe;IAa3D,mBAAmB,IAAI,eAAe;IAMtC,OAAO;CAKR"}
@@ -33,6 +33,7 @@ import { LibroKernelManager, LibroSessionManager } from '@difizen/libro-kernel';
33
33
  import { LibroLanguageClientManager } from '@difizen/libro-language-client';
34
34
  import { TerminalCommands, TerminalManager } from '@difizen/libro-terminal';
35
35
  import { BaseView, CommandRegistry, inject, singleton, ThemeService, useInject, view, ViewInstance, ViewManager } from '@difizen/mana-app';
36
+ import { l10n } from '@difizen/mana-l10n';
36
37
  import { ConfigProvider, theme } from 'antd';
37
38
  import { useEffect, useState } from 'react';
38
39
  import { KernelAndTerminal } from "../common/index.js";
@@ -307,7 +308,11 @@ export var KernelAndTerminalPanelView = (_dec = singleton(), _dec2 = view(Kernel
307
308
  _initializerDefineProperty(_this, "viewManager", _descriptor, _assertThisInitialized(_this));
308
309
  _initializerDefineProperty(_this, "layoutService", _descriptor2, _assertThisInitialized(_this));
309
310
  _this.title.icon = /*#__PURE__*/_jsx(KernelAndTerminal, {});
310
- _this.title.label = '运行的终端和内核';
311
+ _this.title.label = function () {
312
+ return /*#__PURE__*/_jsx("div", {
313
+ children: l10n.t('运行的终端和内核')
314
+ });
315
+ };
311
316
  _this.libroKernelManager = libroKernelManager;
312
317
  _this.libroSessionManager = libroSessionManager;
313
318
  _this.terminalManager = terminalManager;
@@ -1 +1 @@
1
- {"version":3,"file":"panel-command.d.ts","sourceRoot":"","sources":["../../src/kernel-and-terminal-panel/panel-command.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC1E,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EACL,mBAAmB,EAGnB,mBAAmB,EACpB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,0BAA0B,EAAE,MAAM,qCAAqC,CAAC;AAEjF,eAAO,MAAM,YAAY;;;;;CAKxB,CAAC;AAEF,qBAGa,wBACX,YAAW,mBAAmB,EAAE,mBAAmB;IAEnD,SAAS,CAAC,WAAW,EAAE,WAAW,CAAC;IAGnC,0BAA0B,EAAE,0BAA0B,CAAC;gBAEtB,WAAW,EAAE,WAAW;IAIzD,gBAAgB,CAAC,OAAO,EAAE,eAAe,GAAG,IAAI;IAahD,oBAAoB,CAAC,eAAe,EAAE,eAAe,GAAG,IAAI;CAQ7D"}
1
+ {"version":3,"file":"panel-command.d.ts","sourceRoot":"","sources":["../../src/kernel-and-terminal-panel/panel-command.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC1E,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EACL,mBAAmB,EAGnB,mBAAmB,EACpB,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EAAE,0BAA0B,EAAE,MAAM,qCAAqC,CAAC;AAEjF,eAAO,MAAM,YAAY;;;;;CAKxB,CAAC;AAEF,qBAGa,wBACX,YAAW,mBAAmB,EAAE,mBAAmB;IAEnD,SAAS,CAAC,WAAW,EAAE,WAAW,CAAC;IAGnC,0BAA0B,EAAE,0BAA0B,CAAC;gBAEtB,WAAW,EAAE,WAAW;IAIzD,gBAAgB,CAAC,OAAO,EAAE,eAAe,GAAG,IAAI;IAahD,oBAAoB,CAAC,eAAe,EAAE,eAAe,GAAG,IAAI;CAQ7D"}
@@ -14,12 +14,13 @@ function _initializerWarningHelper(descriptor, context) { throw new Error('Decor
14
14
  import { ReloadOutlined } from '@ant-design/icons';
15
15
  import { ViewManager } from '@difizen/mana-app';
16
16
  import { CommandContribution, inject, singleton, ToolbarContribution } from '@difizen/mana-app';
17
+ import { l10n } from '@difizen/mana-l10n';
17
18
  import { KernelAndTerminalPanelView } from "./kernel-and-terminal-panel-view.js";
18
19
  import { jsx as _jsx } from "react/jsx-runtime";
19
20
  export var PanelCommand = {
20
21
  REFRESH: {
21
22
  id: 'panel.command.refresh',
22
- label: '刷新'
23
+ label: l10n.t('刷新')
23
24
  }
24
25
  };
25
26
  export var PanelCommandContribution = (_dec = singleton({
@@ -67,7 +68,7 @@ export var PanelCommandContribution = (_dec = singleton({
67
68
  id: PanelCommand.REFRESH.id,
68
69
  command: PanelCommand.REFRESH.id,
69
70
  icon: /*#__PURE__*/_jsx(ReloadOutlined, {}),
70
- tooltip: '刷新'
71
+ tooltip: l10n.t('刷新')
71
72
  });
72
73
  }
73
74
  }]);
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/kernel-manager/index.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAK7C,eAAO,MAAM,sBAAsB,mFAEjC,CAAC;AAEH,qBAEa,iBAAkB,SAAQ,QAAQ;IACpC,IAAI,oFAA0B;;CAOxC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/kernel-manager/index.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAM7C,eAAO,MAAM,sBAAsB,mFAEjC,CAAC;AAEH,qBAEa,iBAAkB,SAAQ,QAAQ;IACpC,IAAI,oFAA0B;;CAOxC"}
@@ -15,13 +15,14 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
15
15
  import { CodeFilled } from '@ant-design/icons';
16
16
  import { singleton, view } from '@difizen/mana-app';
17
17
  import { BaseView } from '@difizen/mana-app';
18
+ import { l10n } from '@difizen/mana-l10n';
18
19
  import { forwardRef } from 'react';
19
20
 
20
21
  // import './index.less';
21
22
  import { jsx as _jsx } from "react/jsx-runtime";
22
23
  export var KernelManagerComponent = /*#__PURE__*/forwardRef(function KernelManagerComponent() {
23
24
  return /*#__PURE__*/_jsx("span", {
24
- children: "\u6682\u65E0\u6587\u4EF6"
25
+ children: l10n.t('暂无文件')
25
26
  });
26
27
  });
27
28
  export var KernelManagerView = (_dec = singleton(), _dec2 = view('kernel-manager'), _dec(_class = _dec2(_class = /*#__PURE__*/function (_BaseView) {
@@ -33,7 +34,11 @@ export var KernelManagerView = (_dec = singleton(), _dec2 = view('kernel-manager
33
34
  _this = _super.call(this);
34
35
  _this.view = KernelManagerComponent;
35
36
  _this.title.icon = /*#__PURE__*/_jsx(CodeFilled, {});
36
- _this.title.label = 'Kernel 管理';
37
+ _this.title.label = function () {
38
+ return /*#__PURE__*/_jsx("div", {
39
+ children: l10n.t('Kernel 管理')
40
+ });
41
+ };
37
42
  return _this;
38
43
  }
39
44
  return _createClass(KernelManagerView);
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" resolution-mode="require"/>
2
+ import { BaseView } from '@difizen/mana-app';
3
+ export declare const LangSwitcherComponent: import("react").ForwardRefExoticComponent<import("react").RefAttributes<unknown>>;
4
+ export declare class LangSwitcherView extends BaseView {
5
+ view: import("react").ForwardRefExoticComponent<import("react").RefAttributes<unknown>>;
6
+ }
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/lang-switcher/index.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAY7C,eAAO,MAAM,qBAAqB,mFAgBhC,CAAC;AAEH,qBAEa,gBAAiB,SAAQ,QAAQ;IACnC,IAAI,oFAAyB;CACvC"}
@@ -0,0 +1,58 @@
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 _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
+ 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(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
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
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
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
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); }; }
11
+ 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); }
12
+ function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
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
+ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
15
+ import { singleton, useInject, view } from '@difizen/mana-app';
16
+ import { BaseView } from '@difizen/mana-app';
17
+ import { l10n, L10nLang } from '@difizen/mana-l10n';
18
+ import { Select } from 'antd';
19
+ import { forwardRef } from 'react';
20
+ import { LayoutService } from "../layout/layout-service.js";
21
+ import { jsx as _jsx } from "react/jsx-runtime";
22
+ var langList = [{
23
+ value: L10nLang.zhCN,
24
+ label: l10n.t('中文')
25
+ }, {
26
+ value: L10nLang.enUS,
27
+ label: 'En'
28
+ }];
29
+ export var LangSwitcherComponent = /*#__PURE__*/forwardRef(function GithubLinkComponent() {
30
+ var layoutService = useInject(LayoutService);
31
+ var handleChange = function handleChange(value) {
32
+ l10n.changeLang(value);
33
+ layoutService.refresh();
34
+ };
35
+ return /*#__PURE__*/_jsx(Select, {
36
+ defaultValue: l10n.getLang(),
37
+ style: {
38
+ width: 120
39
+ },
40
+ options: langList,
41
+ onChange: handleChange
42
+ });
43
+ });
44
+ export var LangSwitcherView = (_dec = singleton(), _dec2 = view('lang-switcher'), _dec(_class = _dec2(_class = /*#__PURE__*/function (_BaseView) {
45
+ _inherits(LangSwitcherView, _BaseView);
46
+ var _super = _createSuper(LangSwitcherView);
47
+ function LangSwitcherView() {
48
+ var _this;
49
+ _classCallCheck(this, LangSwitcherView);
50
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
51
+ args[_key] = arguments[_key];
52
+ }
53
+ _this = _super.call.apply(_super, [this].concat(args));
54
+ _this.view = LangSwitcherComponent;
55
+ return _this;
56
+ }
57
+ return _createClass(LangSwitcherView);
58
+ }(BaseView)) || _class) || _class);
@@ -1 +1 @@
1
- {"version":3,"file":"current-file-footer-view.d.ts","sourceRoot":"","sources":["../../../src/layout/footer/current-file-footer-view.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAMT,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAErD,OAAO,cAAc,CAAC;AAiBtB,qBAEa,6BAA8B,SAAQ,QAAQ;IAChD,IAAI,uEAA8B;IACpB,SAAS,CAAC,aAAa,EAAE,aAAa,CAAC;IAE9D,IAAI,eAAe,iDAGlB;CACF"}
1
+ {"version":3,"file":"current-file-footer-view.d.ts","sourceRoot":"","sources":["../../../src/layout/footer/current-file-footer-view.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAMT,MAAM,mBAAmB,CAAC;AAE3B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAErD,OAAO,cAAc,CAAC;AAiBtB,qBAEa,6BAA8B,SAAQ,QAAQ;IAChD,IAAI,uEAA8B;IACpB,SAAS,CAAC,aAAa,EAAE,aAAa,CAAC;IAE9D,IAAI,eAAe,iDAGlB;CACF"}
@@ -16,6 +16,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
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 { BaseView, inject, singleton, useInject, view, ViewInstance } from '@difizen/mana-app';
19
+ import { l10n } from '@difizen/mana-l10n';
19
20
  import * as React from 'react';
20
21
  import { LayoutService } from "../layout-service.js";
21
22
  import { LibroLabLayoutSlots } from "../protocol.js";
@@ -28,7 +29,7 @@ var CurrentFileFooterComponent = /*#__PURE__*/React.forwardRef(function CurrentF
28
29
  className: "libro-lab-current-file-footer",
29
30
  ref: ref,
30
31
  children: /*#__PURE__*/_jsx("span", {
31
- children: "\u5F53\u524D\u6587\u4EF6\uFF1A".concat(((_currentFileFooterVie = currentFileFooterView.navigatableView) === null || _currentFileFooterVie === void 0 ? void 0 : _currentFileFooterVie.title.label) || '')
32
+ children: "".concat(l10n.t('当前文件:')).concat(((_currentFileFooterVie = currentFileFooterView.navigatableView) === null || _currentFileFooterVie === void 0 ? void 0 : _currentFileFooterVie.title.label) || '')
32
33
  })
33
34
  });
34
35
  });
@@ -1 +1 @@
1
- {"version":3,"file":"status-footer-view.d.ts","sourceRoot":"","sources":["../../../src/layout/footer/status-footer-view.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAsC,MAAM,mBAAmB,CAAC;AACjF,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAGrD,OAAO,cAAc,CAAC;AA2BtB,qBAEa,wBAAyB,SAAQ,QAAQ;IAC3C,IAAI,uEAAyB;IACf,SAAS,CAAC,aAAa,EAAE,aAAa,CAAC;IAE9D,IAAI,eAAe,iDAGlB;CACF"}
1
+ {"version":3,"file":"status-footer-view.d.ts","sourceRoot":"","sources":["../../../src/layout/footer/status-footer-view.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAsC,MAAM,mBAAmB,CAAC;AAEjF,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAGrD,OAAO,cAAc,CAAC;AA0BtB,qBAEa,wBAAyB,SAAQ,QAAQ;IAC3C,IAAI,uEAAyB;IACf,SAAS,CAAC,aAAa,EAAE,aAAa,CAAC;IAE9D,IAAI,eAAe,iDAGlB;CACF"}
@@ -16,6 +16,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
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 { BaseView, inject, singleton, useInject, view } from '@difizen/mana-app';
19
+ import { l10n } from '@difizen/mana-l10n';
19
20
  import * as React from 'react';
20
21
  import { Loadding, SuccIcon } from "../../common/icon.js";
21
22
  import { LayoutService } from "../layout-service.js";
@@ -23,23 +24,23 @@ import { LibroLabLayoutSlots } from "../protocol.js";
23
24
  import "./index.less";
24
25
  import { jsx as _jsx } from "react/jsx-runtime";
25
26
  import { jsxs as _jsxs } from "react/jsx-runtime";
26
- var Status = {
27
- loading: {
28
- label: '启动中',
29
- icon: /*#__PURE__*/_jsx(Loadding, {})
30
- },
31
- success: {
32
- label: '启动成功',
33
- icon: /*#__PURE__*/_jsx(SuccIcon, {})
34
- }
35
- };
36
27
  var StatusFooterComponent = /*#__PURE__*/React.forwardRef(function CurrentFileFooterComponent(_props, ref) {
37
28
  var layoutService = useInject(LayoutService);
29
+ var Status = {
30
+ loading: {
31
+ label: l10n.t('启动中'),
32
+ icon: /*#__PURE__*/_jsx(Loadding, {})
33
+ },
34
+ success: {
35
+ label: l10n.t('启动成功'),
36
+ icon: /*#__PURE__*/_jsx(SuccIcon, {})
37
+ }
38
+ };
38
39
  return /*#__PURE__*/_jsxs("div", {
39
40
  className: "libro-lab-status-footer",
40
41
  ref: ref,
41
42
  children: [/*#__PURE__*/_jsx("span", {
42
- children: "\u670D\u52A1\u72B6\u6001\uFF1A"
43
+ children: l10n.t('服务状态:')
43
44
  }), Status[layoutService.serverSatus].icon, Status[layoutService.serverSatus].label]
44
45
  });
45
46
  });
@@ -9,7 +9,9 @@ export declare class LayoutService {
9
9
  protected readonly libroService: LibroService;
10
10
  constructor(slotViewManager: SlotViewManager, libroService: LibroService);
11
11
  serverSatus: StatusType;
12
+ refreshKey: string;
12
13
  visibilityMap: VisibilityMap;
14
+ refresh(): void;
13
15
  isAreaVisible(slot: LibroLabLayoutSlotsType): boolean;
14
16
  setAreaVisible(slot: LibroLabLayoutSlotsType, visible: boolean): void;
15
17
  protected onViewAdded(slot: string, view: View | undefined, option: ViewOpenOption | undefined): void;
@@ -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,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAGtF,OAAO,EAKL,eAAe,EAChB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEvD,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;IAGpC,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,cAAc,CAAC,IAAI,EAAE,uBAAuB;IAI5C,aAAa,CAAC,IAAI,EAAE,uBAAuB;IAU3C,kBAAkB,CAChB,IAAI,EAAE,uBAAuB,EAC7B,OAAO,EAAE,MAAM,IAAI,GAClB,UAAU,GAAG,SAAS;IAUzB,4BAA4B,IAAI,OAAO;IAWjC,sBAAsB;CAoB7B"}
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;AAGtF,OAAO,EAKL,eAAe,EAChB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEvD,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;IAGpC,UAAU,EAAE,MAAM,CAAC;IAGnB,aAAa,EAAE,aAAa,CAS1B;IAEF,OAAO;IAIP,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,cAAc,CAAC,IAAI,EAAE,uBAAuB;IAI5C,aAAa,CAAC,IAAI,EAAE,uBAAuB;IAU3C,kBAAkB,CAChB,IAAI,EAAE,uBAAuB,EAC7B,OAAO,EAAE,MAAM,IAAI,GAClB,UAAU,GAAG,SAAS;IAUzB,4BAA4B,IAAI,OAAO;IAWjC,sBAAsB;CAoB7B"}
@@ -1,6 +1,6 @@
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
2
  var _excluded = ["slot"];
3
- var _dec, _dec2, _dec3, _class, _class2, _descriptor, _descriptor2;
3
+ var _dec, _dec2, _dec3, _dec4, _class, _class2, _descriptor, _descriptor2, _descriptor3;
4
4
  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; }
5
5
  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; }
6
6
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
@@ -20,12 +20,13 @@ import { SideTabView } from '@difizen/mana-app';
20
20
  import { observable } from '@difizen/mana-app';
21
21
  import { DefaultSlotView, inject, prop, singleton, SlotViewManager } from '@difizen/mana-app';
22
22
  import { LibroLabLayoutSlots } from "./protocol.js";
23
- export var LayoutService = (_dec = singleton(), _dec2 = prop(), _dec3 = prop(), _dec(_class = (_class2 = /*#__PURE__*/function () {
23
+ export var LayoutService = (_dec = singleton(), _dec2 = prop(), _dec3 = prop(), _dec4 = prop(), _dec(_class = (_class2 = /*#__PURE__*/function () {
24
24
  function LayoutService(slotViewManager, libroService) {
25
25
  var _this = this;
26
26
  _classCallCheck(this, LayoutService);
27
27
  _initializerDefineProperty(this, "serverSatus", _descriptor, this);
28
- _initializerDefineProperty(this, "visibilityMap", _descriptor2, this);
28
+ _initializerDefineProperty(this, "refreshKey", _descriptor2, this);
29
+ _initializerDefineProperty(this, "visibilityMap", _descriptor3, this);
29
30
  this.slotViewManager = slotViewManager;
30
31
  this.libroService = libroService;
31
32
  this.onOpenSlotActiveChange();
@@ -36,6 +37,11 @@ export var LayoutService = (_dec = singleton(), _dec2 = prop(), _dec3 = prop(),
36
37
  LayoutService = inject(LibroService)(LayoutService, undefined, 1) || LayoutService;
37
38
  LayoutService = inject(SlotViewManager)(LayoutService, undefined, 0) || LayoutService;
38
39
  _createClass(LayoutService, [{
40
+ key: "refresh",
41
+ value: function refresh() {
42
+ this.refreshKey = new Date().getTime().toString();
43
+ }
44
+ }, {
39
45
  key: "isAreaVisible",
40
46
  value: function isAreaVisible(slot) {
41
47
  return this.visibilityMap[slot];
@@ -187,7 +193,12 @@ export var LayoutService = (_dec = singleton(), _dec2 = prop(), _dec3 = prop(),
187
193
  initializer: function initializer() {
188
194
  return 'loading';
189
195
  }
190
- }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "visibilityMap", [_dec3], {
196
+ }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "refreshKey", [_dec3], {
197
+ configurable: true,
198
+ enumerable: true,
199
+ writable: true,
200
+ initializer: null
201
+ }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "visibilityMap", [_dec4], {
191
202
  configurable: true,
192
203
  enumerable: true,
193
204
  writable: true,
@@ -1 +1 @@
1
- {"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../src/layout/layout.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAO7C,OAAO,cAAc,CAAC;AAEtB,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAGpD,eAAO,MAAM,uBAAuB,mFA4BlC,CAAC;AAEH,qBAEa,kBAAmB,SAAQ,QAAQ;IACrC,IAAI,oFAA2B;IAEjB,aAAa,EAAE,aAAa,CAAC;IAEpD,UAAU,IAAI,MAAM;IAIpB,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;CAQrC"}
1
+ {"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../src/layout/layout.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAQ7C,OAAO,cAAc,CAAC;AAEtB,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAGpD,eAAO,MAAM,uBAAuB,mFA4BlC,CAAC;AAEH,qBAEa,kBAAmB,SAAQ,QAAQ;IACrC,IAAI,oFAA2B;IAEjB,aAAa,EAAE,aAAa,CAAC;IAEpD,UAAU,IAAI,MAAM;IAIpB,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;CAQrC"}
@@ -20,6 +20,7 @@ function _applyDecoratedDescriptor(target, property, decorators, descriptor, con
20
20
  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.'); }
21
21
  import { inject, singleton, Slot, useInject, view } from '@difizen/mana-app';
22
22
  import { BaseView } from '@difizen/mana-app';
23
+ import { l10n } from '@difizen/mana-l10n';
23
24
  import { BoxPanel } from '@difizen/mana-react';
24
25
  import { Alert } from 'antd';
25
26
  import { forwardRef } from 'react';
@@ -41,7 +42,7 @@ export var LibroLabLayoutComponent = /*#__PURE__*/forwardRef(function LibroLabLa
41
42
  name: LibroLabLayoutSlots.header
42
43
  })
43
44
  }), layoutService.isAreaVisible(LibroLabLayoutSlots.alert) && /*#__PURE__*/_jsx(Alert, {
44
- message: "\u670D\u52A1\u542F\u52A8\u4E2D\uFF0C\u8BF7\u7A0D\u540E\uFF0C\u5F85\u670D\u52A1\u542F\u52A8\u5B8C\u6210\u540E\u5373\u53EF\u7F16\u8F91\u6587\u4EF6\u3002",
45
+ message: l10n.t('服务启动中,请稍后,待服务启动完成后即可编辑文件。'),
45
46
  type: "info",
46
47
  banner: true,
47
48
  closable: true,
@@ -56,7 +57,7 @@ export var LibroLabLayoutComponent = /*#__PURE__*/forwardRef(function LibroLabLa
56
57
  })
57
58
  })]
58
59
  })
59
- });
60
+ }, layoutService.refreshKey);
60
61
  });
61
62
  export var LibroLabLayoutView = (_dec = singleton(), _dec2 = view('libro-lab-layout'), _dec3 = inject(LayoutService), _dec(_class = _dec2(_class = (_class2 = /*#__PURE__*/function (_BaseView) {
62
63
  _inherits(LibroLabLayoutView, _BaseView);
@@ -1 +1 @@
1
- {"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../src/module.tsx"],"names":[],"mappings":"AAKA,OAAO,EACL,UAAU,EAKX,MAAM,mBAAmB,CAAC;AAkB3B,OAAO,cAAc,CAAC;AAMtB,eAAO,MAAM,cAAc,YA+ExB,CAAC"}
1
+ {"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../src/module.tsx"],"names":[],"mappings":"AAMA,OAAO,EACL,UAAU,EAKX,MAAM,mBAAmB,CAAC;AAoB3B,OAAO,cAAc,CAAC;AAMtB,eAAO,MAAM,cAAc,YA6FxB,CAAC"}
package/es/module.js CHANGED
@@ -1,9 +1,11 @@
1
1
  import { FileView, LibroJupyterModule } from '@difizen/libro-jupyter';
2
+ import { langBundles } from '@difizen/libro-l10n';
2
3
  import { LibroPromptCellModule } from '@difizen/libro-prompt-cell';
3
4
  import { LibroSqlCellModule } from '@difizen/libro-sql-cell';
4
5
  import { TerminalModule } from '@difizen/libro-terminal';
5
6
  import { CommonWidgetsModule } from '@difizen/libro-widget';
6
7
  import { ManaModule, createSlotPreference, RootSlotId, createViewPreference, HeaderArea } from '@difizen/mana-app';
8
+ import { l10n } from '@difizen/mana-l10n';
7
9
  import { LibroLabHeaderMenuModule } from "./command/module.js";
8
10
  import { LabConfigAppContribution } from "./config/config-contribution.js";
9
11
  import { CodeEditorViewerModule } from "./editor-viewer/index.js";
@@ -13,6 +15,7 @@ import { ImageViewerModule } from "./image-viewer/index.js";
13
15
  import { LibroKernelAndTerminalPanelModule } from "./kernel-and-terminal-panel/module.js";
14
16
  import { LibroLabApp } from "./lab-app.js";
15
17
  import { LabColorContribution } from "./lab-color-registry.js";
18
+ import { LangSwitcherView } from "./lang-switcher/index.js";
16
19
  import { ContentBottomTabView } from "./layout/content-bottom-tab-view.js";
17
20
  import { LibroLabLayoutModule, LibroLabLayoutSlots, LibroLabLayoutView } from "./layout/index.js";
18
21
  import { SaveableTabView } from "./layout/saveable-tab-view.js";
@@ -21,13 +24,23 @@ import { LibroLabSideTabView } from "./layout/side-tab-view.js";
21
24
  import { LibroLabTocModule } from "./toc/module.js";
22
25
  import { EntryPointView } from "./welcome/entry-point-view.js";
23
26
  import { WelcomeView } from "./welcome/index.js";
24
- export var LibroLabModule = ManaModule.create().register(LibroLabApp, LibroLabLayoutView, GithubLinkView, LabConfigAppContribution, LibroLabSideTabView, LabColorContribution, createViewPreference({
27
+ export var LibroLabModule = ManaModule.create().preload(function () {
28
+ l10n.loadLangBundles(langBundles);
29
+ return Promise.resolve();
30
+ }).register(LibroLabApp, LibroLabLayoutView, GithubLinkView, LabConfigAppContribution, LibroLabSideTabView, LabColorContribution, LangSwitcherView, createViewPreference({
25
31
  view: GithubLinkView,
26
32
  slot: HeaderArea.right,
27
33
  openOptions: {
28
34
  order: 'github'
29
35
  },
30
36
  autoCreate: true
37
+ }), createViewPreference({
38
+ view: LangSwitcherView,
39
+ slot: HeaderArea.right,
40
+ openOptions: {
41
+ order: 'lang'
42
+ },
43
+ autoCreate: true
31
44
  }),
32
45
  // KernelManagerView,
33
46
  // createViewPreference({
@@ -1 +1 @@
1
- {"version":3,"file":"libro-toc-panel-view.d.ts","sourceRoot":"","sources":["../../src/toc/libro-toc-panel-view.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC7C,OAAO,EACL,QAAQ,EAQR,WAAW,EAEZ,MAAM,mBAAmB,CAAC;AAI3B,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAG5D,OAAO,cAAc,CAAC;AA6BtB,eAAO,MAAM,gBAAgB,uBAAuB,CAAC;AACrD,qBAEa,YAAa,SAAQ,QAAQ;IAC/B,IAAI,yBAAiB;IACT,SAAS,CAAC,WAAW,EAAE,WAAW,CAAC;IACjC,SAAS,CAAC,aAAa,EAAE,aAAa,CAAC;IACtD,YAAY,EAAE,OAAO,GAAG,SAAS,CAAC;;IAQjC,WAAW,IAAI,IAAI;IAQ5B,IAAI,oBAAoB,qCAMvB;IAED,mBAAmB,aAiBjB;CACH"}
1
+ {"version":3,"file":"libro-toc-panel-view.d.ts","sourceRoot":"","sources":["../../src/toc/libro-toc-panel-view.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC7C,OAAO,EACL,QAAQ,EAQR,WAAW,EAEZ,MAAM,mBAAmB,CAAC;AAK3B,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAG5D,OAAO,cAAc,CAAC;AA6BtB,eAAO,MAAM,gBAAgB,uBAAuB,CAAC;AACrD,qBAEa,YAAa,SAAQ,QAAQ;IAC/B,IAAI,yBAAiB;IACT,SAAS,CAAC,WAAW,EAAE,WAAW,CAAC;IACjC,SAAS,CAAC,aAAa,EAAE,aAAa,CAAC;IACtD,YAAY,EAAE,OAAO,GAAG,SAAS,CAAC;;IAQjC,WAAW,IAAI,IAAI;IAQ5B,IAAI,oBAAoB,qCAMvB;IAED,mBAAmB,aAiBjB;CACH"}
@@ -18,6 +18,7 @@ function _initializerWarningHelper(descriptor, context) { throw new Error('Decor
18
18
  import { LibroNavigatableView } from '@difizen/libro-jupyter';
19
19
  import { TOCView } from '@difizen/libro-toc';
20
20
  import { BaseView, inject, prop, singleton, ThemeService, useInject, view, ViewInstance, ViewManager, ViewRender } from '@difizen/mana-app';
21
+ import { l10n } from '@difizen/mana-l10n';
21
22
  import { ConfigProvider, Empty, theme } from 'antd';
22
23
  import { TocIcon } from "../common/index.js";
23
24
  import { LayoutService } from "../layout/layout-service.js";
@@ -37,7 +38,7 @@ var TocViewRender = function TocViewRender() {
37
38
  view: tocPanelView.libroTocView
38
39
  }) : /*#__PURE__*/_jsx(Empty, {
39
40
  image: Empty.PRESENTED_IMAGE_SIMPLE,
40
- description: "\u8BE5\u6587\u4EF6\u683C\u5F0F\u6682\u4E0D\u652F\u6301\u5927\u7EB2",
41
+ description: l10n.t('该文件格式暂不支持大纲'),
41
42
  className: "libro-lab-toc-empty"
42
43
  })
43
44
  })
@@ -72,7 +73,11 @@ export var TocPanelView = (_dec = singleton(), _dec2 = view(TocViewFactoryId), _
72
73
  });
73
74
  };
74
75
  _this.title.icon = /*#__PURE__*/_jsx(TocIcon, {});
75
- _this.title.label = '大纲';
76
+ _this.title.label = function () {
77
+ return /*#__PURE__*/_jsx("div", {
78
+ children: l10n.t('大纲')
79
+ });
80
+ };
76
81
  return _this;
77
82
  }
78
83
  _createClass(TocPanelView, [{
@@ -1 +1 @@
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"}
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;AAO7C,OAAO,cAAc,CAAC;AAEtB,eAAO,MAAM,mBAAmB,mFAmJ9B,CAAC;AAEH,qBAEa,cAAe,SAAQ,QAAQ;IACjC,IAAI,oFAAuB;CACrC"}
@@ -22,6 +22,7 @@ import { NotebookIcon, PythonIcon, JSONIcon, MoreIcon, FileCreateModal, FileView
22
22
  import { TerminalCommands } from '@difizen/libro-terminal';
23
23
  import { CommandRegistry, ModalService, singleton, useInject, view, ViewManager } from '@difizen/mana-app';
24
24
  import { BaseView } from '@difizen/mana-app';
25
+ import { l10n } from '@difizen/mana-l10n';
25
26
  import { Col, Row } from 'antd';
26
27
  import { forwardRef, useEffect, useState } from 'react';
27
28
  import { TerminalIcon } from "../common/icon.js";
@@ -48,10 +49,10 @@ export var EntryPointComponent = /*#__PURE__*/forwardRef(function EntryPointComp
48
49
  className: "libro-lab-entry-point",
49
50
  children: [/*#__PURE__*/_jsx("div", {
50
51
  className: "libro-lab-entry-point-title",
51
- children: "\u8BF7\u9009\u62E9\u4F60\u8981\u521B\u5EFA\u7684\u6587\u4EF6\u7C7B\u578B\uFF1A"
52
+ children: l10n.t('请选择你要创建的文件类型:')
52
53
  }), /*#__PURE__*/_jsx("div", {
53
54
  className: "libro-lab-entry-point-item-title",
54
- children: "\u6587\u4EF6"
55
+ children: l10n.t('文件')
55
56
  }), /*#__PURE__*/_jsxs(Row, {
56
57
  children: [/*#__PURE__*/_jsx(Col, {
57
58
  className: "gutter-row",
@@ -129,13 +130,13 @@ export var EntryPointComponent = /*#__PURE__*/forwardRef(function EntryPointComp
129
130
  },
130
131
  children: [/*#__PURE__*/_jsx(MoreIcon, {}), /*#__PURE__*/_jsx("span", {
131
132
  className: "libro-lab-entry-point-item-text",
132
- children: "\u5176\u4ED6"
133
+ children: l10n.t('其他')
133
134
  })]
134
135
  })
135
136
  })]
136
137
  }), /*#__PURE__*/_jsx("div", {
137
138
  className: "libro-lab-entry-point-item-title",
138
- children: "\u5176\u4ED6"
139
+ children: l10n.t('其他')
139
140
  }), /*#__PURE__*/_jsx(Row, {
140
141
  children: /*#__PURE__*/_jsx(Col, {
141
142
  className: "gutter-row",
@@ -1 +1 @@
1
- {"version":3,"file":"welcome-view.d.ts","sourceRoot":"","sources":["../../src/welcome/welcome-view.tsx"],"names":[],"mappings":";AACA,OAAO,EAML,WAAW,EAEZ,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAK7C,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEvD,OAAO,cAAc,CAAC;AAEtB,eAAO,MAAM,gBAAgB,mFAqB3B,CAAC;AAEH,qBAEa,WAAY,SAAQ,QAAQ;IAC9B,IAAI,oFAAoB;IACjC,WAAW,EAAE,WAAW,CAAC;IACzB,cAAc,EAAE,cAAc,CAAC;gBACE,WAAW,EAAE,WAAW;CAc1D"}
1
+ {"version":3,"file":"welcome-view.d.ts","sourceRoot":"","sources":["../../src/welcome/welcome-view.tsx"],"names":[],"mappings":";AACA,OAAO,EAML,WAAW,EAEZ,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAM7C,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEvD,OAAO,cAAc,CAAC;AAEtB,eAAO,MAAM,gBAAgB,mFAyB3B,CAAC;AAEH,qBAEa,WAAY,SAAQ,QAAQ;IAC9B,IAAI,oFAAoB;IACjC,WAAW,EAAE,WAAW,CAAC;IACzB,cAAc,EAAE,cAAc,CAAC;gBACE,WAAW,EAAE,WAAW;CAc1D"}
@@ -15,6 +15,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
15
15
  import { ServerConnection } from '@difizen/libro-jupyter';
16
16
  import { inject, singleton, useInject, view, ViewInstance, ViewManager, ViewRender } from '@difizen/mana-app';
17
17
  import { BaseView } from '@difizen/mana-app';
18
+ import { l10n } from '@difizen/mana-l10n';
18
19
  import { forwardRef } from 'react';
19
20
  import { LayoutService } from "../layout/layout-service.js";
20
21
  import { EntryPointView } from "./entry-point-view.js";
@@ -29,12 +30,12 @@ export var WelcomeComponent = /*#__PURE__*/forwardRef(function WelcomeComponent(
29
30
  className: "libro-lab-welcome-page",
30
31
  children: [/*#__PURE__*/_jsx("div", {
31
32
  className: "libro-lab-welcome-page-title",
32
- children: "\u6B22\u8FCE\u4F7F\u7528 Notebook \u5DE5\u4F5C\u53F0 \uD83C\uDF89\uD83C\uDF89"
33
+ children: l10n.t('欢迎使用 Libro Lab🎉🎉')
33
34
  }), /*#__PURE__*/_jsxs("div", {
34
35
  className: "libro-lab-welcome-page-server-info",
35
36
  children: [/*#__PURE__*/_jsx("div", {
36
37
  className: "libro-lab-welcome-page-server-info-title",
37
- children: "\u670D\u52A1\u8FDE\u63A5\u4FE1\u606F"
38
+ children: l10n.t('服务连接信息')
38
39
  }), /*#__PURE__*/_jsxs("div", {
39
40
  className: "libro-lab-welcome-page-server-info-item",
40
41
  children: ["BaseURL: ", "".concat(serverConnection.settings.baseUrl)]
@@ -56,7 +57,11 @@ export var WelcomeView = (_dec = singleton(), _dec2 = view('welcome-view'), _dec
56
57
  _this = _super.call(this);
57
58
  _this.view = WelcomeComponent;
58
59
  _this.title.icon = '🙌 ';
59
- _this.title.label = '欢迎使用';
60
+ _this.title.label = function () {
61
+ return /*#__PURE__*/_jsx("div", {
62
+ children: l10n.t('欢迎使用')
63
+ });
64
+ };
60
65
  _this.title.closable = false;
61
66
  _this.viewManager = viewManager;
62
67
  _this.viewManager.getOrCreateView(EntryPointView).then(function (entryPointView) {