@abtnode/ux 1.15.17 → 1.16.0-beta-b16cb035

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 (154) hide show
  1. package/lib/actions.js +111 -0
  2. package/lib/blocklet/access/config-access.js +303 -0
  3. package/lib/blocklet/access/index.js +221 -0
  4. package/lib/blocklet/actions.js +438 -0
  5. package/lib/blocklet/add-cert.js +191 -0
  6. package/lib/blocklet/agreement-app.js +30 -0
  7. package/lib/blocklet/agreement.js +72 -0
  8. package/lib/blocklet/app-avatar.js +74 -0
  9. package/lib/blocklet/audit-logs.js +197 -0
  10. package/lib/blocklet/blocklet-source.js +56 -0
  11. package/lib/blocklet/bundle-avatar.js +80 -0
  12. package/lib/blocklet/component/add.js +1063 -0
  13. package/lib/blocklet/component/configuration.js +124 -0
  14. package/lib/blocklet/component/delete.js +117 -0
  15. package/lib/blocklet/component/environment.js +289 -0
  16. package/lib/blocklet/component/expiration.js +53 -0
  17. package/lib/blocklet/component/index.js +804 -0
  18. package/lib/blocklet/component/line.js +28 -0
  19. package/lib/blocklet/component/navigation/locale-tabs.js +218 -0
  20. package/lib/blocklet/component/navigation/navigation-actions.js +120 -0
  21. package/lib/blocklet/component/navigation/navigation-dialog.js +620 -0
  22. package/lib/blocklet/component/navigation/navigation-preview.js +102 -0
  23. package/lib/blocklet/component/navigation/simple-select.js +131 -0
  24. package/lib/blocklet/component/select-store.js +153 -0
  25. package/lib/blocklet/component/setting.js +151 -0
  26. package/lib/blocklet/component/sortable-tree.js +138 -0
  27. package/lib/blocklet/component/space-gateway-selector.js +174 -0
  28. package/lib/blocklet/component/store-blocklet-list.js +205 -0
  29. package/lib/blocklet/config-navigation.js +344 -0
  30. package/lib/blocklet/configuration.js +574 -0
  31. package/lib/blocklet/disk-info.js +91 -0
  32. package/lib/blocklet/icons.js +26 -0
  33. package/lib/blocklet/install-from-url.js +347 -0
  34. package/lib/blocklet/log.js +62 -0
  35. package/lib/blocklet/migration.js +153 -0
  36. package/lib/blocklet/mode.js +35 -0
  37. package/lib/blocklet/monitor.js +186 -0
  38. package/lib/blocklet/overview.js +236 -0
  39. package/lib/blocklet/preferences/app-sk.js +131 -0
  40. package/lib/blocklet/preferences/index.js +238 -0
  41. package/lib/blocklet/preferences/wallet-type.js +107 -0
  42. package/lib/blocklet/purchase/common.js +103 -0
  43. package/lib/blocklet/purchase/component-purchase.js +253 -0
  44. package/lib/blocklet/purchase/index.js +13 -0
  45. package/lib/blocklet/router/action/add-domain-alias.js +173 -0
  46. package/lib/blocklet/router/action/add-rule.js +204 -0
  47. package/lib/blocklet/router/action/config-routing-rule.js +129 -0
  48. package/lib/blocklet/router/action/delete-domain-alias.js +107 -0
  49. package/lib/blocklet/router/action/delete-rule.js +114 -0
  50. package/lib/blocklet/router/action/update-rule.js +203 -0
  51. package/lib/blocklet/router/domain-actions.js +71 -0
  52. package/lib/blocklet/router/domain-status.js +96 -0
  53. package/lib/blocklet/router/rule-actions.js +77 -0
  54. package/lib/blocklet/router/rule-list.js +181 -0
  55. package/lib/blocklet/router/util.js +146 -0
  56. package/lib/blocklet/runtime-info.js +87 -0
  57. package/lib/blocklet/status.js +105 -0
  58. package/lib/blocklet/storage.js +322 -0
  59. package/lib/blocklet/types.js +25 -0
  60. package/lib/blocklet/util.js +213 -0
  61. package/lib/blocklet/version.js +156 -0
  62. package/lib/card-selector.js +109 -0
  63. package/lib/certificate.js +110 -0
  64. package/lib/click-to-copy.js +38 -0
  65. package/lib/confirm.js +149 -0
  66. package/lib/contexts/audit-log.js +141 -0
  67. package/lib/contexts/blocklet.js +19 -0
  68. package/lib/contexts/deleting-blocklets.js +78 -0
  69. package/lib/contexts/node.js +30 -0
  70. package/lib/contexts/session.js +20 -0
  71. package/lib/contexts/team.js +19 -0
  72. package/lib/delete-confirm.js +127 -0
  73. package/lib/did-address.js +77 -0
  74. package/lib/dot.js +18 -0
  75. package/lib/form/form-text-input.js +266 -0
  76. package/lib/form/form-wrapper.js +13 -0
  77. package/lib/form/required.js +13 -0
  78. package/lib/hooks/blocklet.js +231 -0
  79. package/lib/hooks/mobile-width.js +19 -0
  80. package/lib/hooks/url-evaluation.js +168 -0
  81. package/lib/hooks/use-app-logo.js +25 -0
  82. package/lib/hooks/use-bundle-logo.js +36 -0
  83. package/lib/hooks/use-navigation.js +355 -0
  84. package/lib/hooks/use-passport-id.js +21 -0
  85. package/lib/hooks/use-subscription.js +28 -0
  86. package/lib/icons/long-arrow.svg +5 -0
  87. package/lib/index.js +0 -3
  88. package/lib/invitation/invitation-app.js +51 -0
  89. package/lib/invitation/invitation-login.js +47 -0
  90. package/lib/invitation/invitation-passport.js +130 -0
  91. package/lib/invitation/invitation-receive.js +108 -0
  92. package/lib/invitation/invitation-success.js +82 -0
  93. package/lib/invitation/invitation-user.js +79 -0
  94. package/lib/invitation/invitation.js +80 -0
  95. package/lib/issue-passport.js +84 -84
  96. package/lib/launch-blocklet/content-layout.js +33 -0
  97. package/lib/launch-blocklet/page-header.js +38 -0
  98. package/lib/layout/addon.js +100 -0
  99. package/lib/layout/feedback.js +55 -0
  100. package/lib/locales/en.js +1221 -10
  101. package/lib/locales/index.js +3 -4
  102. package/lib/locales/zh.js +1232 -15
  103. package/lib/logs/clock.js +19 -0
  104. package/lib/logs/download.js +139 -0
  105. package/lib/logs/log-terminal.js +183 -0
  106. package/lib/lost-passport.js +191 -195
  107. package/lib/monitor/card.js +73 -0
  108. package/lib/monitor/cpu.js +109 -0
  109. package/lib/monitor/disk.js +122 -0
  110. package/lib/monitor/memory.js +144 -0
  111. package/lib/nav-logo.js +120 -0
  112. package/lib/passport-tag.js +43 -0
  113. package/lib/permission.js +70 -0
  114. package/lib/relative-time.js +61 -0
  115. package/lib/schema-form/color-input.js +105 -0
  116. package/lib/schema-form/common-prop-types.js +21 -0
  117. package/lib/schema-form/index.js +229 -0
  118. package/lib/schema-form/passport-input.js +66 -0
  119. package/lib/schema-form/text-input.js +72 -0
  120. package/lib/store/add.js +185 -0
  121. package/lib/store/delete.js +102 -0
  122. package/lib/store/item.js +84 -0
  123. package/lib/table-icons.js +42 -0
  124. package/lib/table.js +13 -0
  125. package/lib/tag.js +37 -0
  126. package/lib/team/members/actions.js +99 -0
  127. package/lib/team/members/index.js +503 -0
  128. package/lib/team/members/invitations.js +196 -0
  129. package/lib/team/members/invite-member.js +212 -0
  130. package/lib/team/members/issue-passport.js +155 -0
  131. package/lib/team/members/member.js +300 -0
  132. package/lib/team/members/passport-issuances.js +154 -0
  133. package/lib/team/members/passports.js +336 -0
  134. package/lib/team/members/toggle-user-approval.js +128 -0
  135. package/lib/team/members/transfer-node.js +262 -0
  136. package/lib/team/members/util.js +20 -0
  137. package/lib/team/passports/color.js +132 -0
  138. package/lib/team/passports/detail.js +271 -0
  139. package/lib/team/passports/index.js +233 -0
  140. package/lib/team/passports/mutate-role.js +204 -0
  141. package/lib/team/passports/trusted-issuer.js +297 -0
  142. package/lib/team/passports/trusted-issuers.js +240 -0
  143. package/lib/team/search-input.js +38 -0
  144. package/lib/team/styles/dialog.js +13 -0
  145. package/lib/team/styles/list-header.js +13 -0
  146. package/lib/toast.js +86 -0
  147. package/lib/util/api.js +21 -0
  148. package/lib/util/constants.js +10 -0
  149. package/lib/util/index.js +703 -0
  150. package/lib/util/locales.js +28 -0
  151. package/lib/util/mode.js +11 -0
  152. package/lib/who-can-access/config.js +46 -0
  153. package/lib/wrap-locale.js +12 -13
  154. package/package.json +69 -17
package/lib/toast.js ADDED
@@ -0,0 +1,86 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.ToastProvider = ToastProvider;
7
+ exports.default = void 0;
8
+ var _react = require("react");
9
+ var _notistack = require("notistack");
10
+ var _IconButton = _interopRequireDefault(require("@mui/material/IconButton"));
11
+ var _Close = _interopRequireDefault(require("@mui/icons-material/Close"));
12
+ var _jsxRuntime = require("react/jsx-runtime");
13
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
14
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
15
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
16
+ 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; }
17
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
18
+ function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
19
+ const noop = () => {};
20
+ let _success = noop;
21
+ let _error = noop;
22
+ let _warning = noop;
23
+ let _info = noop;
24
+ const genFn = (enqueueSnackbar, variant) => (message, opts) => {
25
+ enqueueSnackbar(message, _objectSpread({
26
+ autoHideDuration: 3000,
27
+ variant
28
+ }, opts));
29
+ };
30
+
31
+ // eslint-disable-next-line react/prop-types
32
+ function ToastProvider(_ref) {
33
+ let {
34
+ children
35
+ } = _ref;
36
+ const notistackRef = /*#__PURE__*/(0, _react.createRef)();
37
+ const onClickDismiss = key => () => {
38
+ notistackRef.current.closeSnackbar(key);
39
+ };
40
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_notistack.SnackbarProvider, {
41
+ anchorOrigin: {
42
+ vertical: 'top',
43
+ horizontal: 'right'
44
+ },
45
+ ref: notistackRef
46
+ // eslint-disable-next-line react/no-unstable-nested-components
47
+ ,
48
+ action: key => /*#__PURE__*/(0, _jsxRuntime.jsx)(_IconButton.default, {
49
+ "aria-label": "close",
50
+ color: "inherit",
51
+ onClick: onClickDismiss(key),
52
+ size: "large",
53
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Close.default, {
54
+ style: {
55
+ fontSize: 16
56
+ }
57
+ })
58
+ }, "close"),
59
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(Toast, {}), children]
60
+ });
61
+ }
62
+ function Toast() {
63
+ const {
64
+ enqueueSnackbar
65
+ } = (0, _notistack.useSnackbar)();
66
+ _success = genFn(enqueueSnackbar, 'success');
67
+ _error = genFn(enqueueSnackbar, 'error');
68
+ _warning = genFn(enqueueSnackbar, 'warning');
69
+ _info = genFn(enqueueSnackbar, 'info');
70
+ return null;
71
+ }
72
+ var _default = {
73
+ success: function success() {
74
+ return _success(...arguments);
75
+ },
76
+ error: function error() {
77
+ return _error(...arguments);
78
+ },
79
+ warning: function warning() {
80
+ return _warning(...arguments);
81
+ },
82
+ info: function info() {
83
+ return _info(...arguments);
84
+ }
85
+ };
86
+ exports.default = _default;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.api = void 0;
7
+ Object.defineProperty(exports, "axios", {
8
+ enumerable: true,
9
+ get: function get() {
10
+ return _axios.default;
11
+ }
12
+ });
13
+ exports.default = void 0;
14
+ var _axios = _interopRequireDefault(require("axios"));
15
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
16
+ _axios.default.defaults.timeout = 10 * 1000; // 超时时间设为10s
17
+
18
+ const api = _axios.default.create();
19
+ exports.api = api;
20
+ var _default = api;
21
+ exports.default = _default;
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.STORAGE_KEY_STORE_SERVER = exports.STORAGE_KEY_STORE_BLOCKLET = void 0;
7
+ const STORAGE_KEY_STORE_BLOCKLET = 'blocklet-add-component-registry';
8
+ exports.STORAGE_KEY_STORE_BLOCKLET = STORAGE_KEY_STORE_BLOCKLET;
9
+ const STORAGE_KEY_STORE_SERVER = 'server-add-registry';
10
+ exports.STORAGE_KEY_STORE_SERVER = STORAGE_KEY_STORE_SERVER;