@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
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ // https://www.maigoo.com/top/393790.html
8
+ // https://zh.wikipedia.org/zh-my/ISO_639-1代码表
9
+ var _default = {
10
+ en: 'English',
11
+ zh: '中文',
12
+ fr: 'Français',
13
+ // 法语
14
+ ru: 'Russian',
15
+ // 俄语
16
+ ar: 'العربية',
17
+ // 阿拉伯语
18
+ es: 'Español',
19
+ // 西班牙语
20
+ de: 'Deutsch',
21
+ // 德语
22
+ pt: 'Português do Brasil',
23
+ // 葡萄牙语
24
+ ja: '日本語',
25
+ // 日语
26
+ hi: 'हिन्दी' // 印地语
27
+ };
28
+ exports.default = _default;
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.isAlphaMode = void 0;
7
+ /* eslint-disable import/prefer-default-export */
8
+
9
+ // 当前模式是 内测模式 吗? @see: https://developer.aliyun.com/article/572525
10
+ const isAlphaMode = localStorage.getItem('enableAlphaMode') === 'true';
11
+ exports.isAlphaMode = isAlphaMode;
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _Lock = _interopRequireDefault(require("@mui/icons-material/Lock"));
8
+ var _ContactMail = _interopRequireDefault(require("@mui/icons-material/ContactMail"));
9
+ var _Public = _interopRequireDefault(require("@mui/icons-material/Public"));
10
+ var _constant = require("@abtnode/constant");
11
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
12
+ var _default = [{
13
+ value: _constant.WHO_CAN_ACCESS.ALL,
14
+ icon: _Public.default,
15
+ title: {
16
+ zh: '所有人可访问',
17
+ en: 'Accessible to all'
18
+ },
19
+ description: {
20
+ zh: '向所有人开放,无需通行证即可访问应用',
21
+ en: 'Open to the world anyone can access without passport'
22
+ }
23
+ }, {
24
+ value: _constant.WHO_CAN_ACCESS.INVITED,
25
+ icon: _ContactMail.default,
26
+ title: {
27
+ zh: '只有被邀请的人可以访问',
28
+ en: 'Only invited people can access'
29
+ },
30
+ description: {
31
+ zh: '稍后您可以在管理页面中邀请成员',
32
+ en: 'You can invite members later in the admin page'
33
+ }
34
+ }, {
35
+ value: _constant.WHO_CAN_ACCESS.OWNER,
36
+ icon: _Lock.default,
37
+ title: {
38
+ zh: '只有应用所有者可以访问',
39
+ en: 'Only Owner of the blocklet can access'
40
+ },
41
+ description: {
42
+ zh: '必须提供所有者通行证才能访问应用',
43
+ en: 'You must provide owner passport to access this application'
44
+ }
45
+ }];
46
+ exports.default = _default;
@@ -4,20 +4,19 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = wrapLocale;
7
-
8
- var _react = _interopRequireDefault(require("react"));
9
-
10
7
  var _context = require("@arcblock/ux/lib/Locale/context");
11
-
12
8
  var _locales = require("./locales");
13
-
14
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
-
16
- /* eslint-disable react/jsx-props-no-spreading */
17
-
18
- /* eslint-disable import/no-extraneous-dependencies */
9
+ var _jsxRuntime = require("react/jsx-runtime");
10
+ 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; }
11
+ 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; }
12
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
13
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
14
+ 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
15
  function wrapLocale(Component) {
20
- return props => /*#__PURE__*/_react.default.createElement(_context.LocaleProvider, {
21
- translations: _locales.translations
22
- }, /*#__PURE__*/_react.default.createElement(Component, props));
16
+ return function LocaleWrapper(props) {
17
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_context.LocaleProvider, {
18
+ translations: _locales.translations,
19
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(Component, _objectSpread({}, props))
20
+ });
21
+ };
23
22
  }
package/package.json CHANGED
@@ -3,36 +3,88 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "1.15.17",
6
+ "version": "1.16.0-beta-b16cb035",
7
7
  "description": "UX components shared across abtnode packages",
8
8
  "main": "lib/index.js",
9
9
  "files": [
10
10
  "lib"
11
11
  ],
12
12
  "scripts": {
13
+ "lint": "eslint src",
14
+ "lint:fix": "eslint src --fix",
15
+ "prepublishOnly": "npm run build",
13
16
  "build": "babel src --out-dir lib --copy-files",
14
- "watch": "babel src --out-dir lib -w --copy-files"
17
+ "watch": "babel src --out-dir lib -w --copy-files",
18
+ "test": "node tools/jest.js"
15
19
  },
16
20
  "keywords": [],
17
21
  "author": "linchen <linchen1987@foxmail.com> (http://github.com/linchen1987)",
18
22
  "license": "MIT",
19
23
  "dependencies": {
20
- "@arcblock/did-connect": "^1.15.16",
21
- "@arcblock/ux": "^1.15.16",
22
- "@material-ui/core": "^4.12.3",
23
- "@material-ui/icons": "^4.11.2",
24
- "react": "^16.13.0",
25
- "react-router-dom": "^5.1.2",
26
- "styled-components": "^5.0.1"
24
+ "@abtnode/auth": "1.16.0-beta-b16cb035",
25
+ "@abtnode/constant": "1.16.0-beta-b16cb035",
26
+ "@abtnode/util": "1.16.0-beta-b16cb035",
27
+ "@arcblock/did-connect": "^2.5.12",
28
+ "@arcblock/did-motif": "^1.1.10",
29
+ "@arcblock/icons": "^2.5.12",
30
+ "@arcblock/terminal": "^2.5.12",
31
+ "@arcblock/ux": "^2.5.12",
32
+ "@blocklet/constant": "1.16.0-beta-b16cb035",
33
+ "@blocklet/launcher-layout": "1.9.65",
34
+ "@blocklet/list": "^0.11.6",
35
+ "@blocklet/meta": "1.16.0-beta-b16cb035",
36
+ "@blocklet/ui-react": "^2.5.12",
37
+ "@emotion/react": "^11.10.4",
38
+ "@emotion/styled": "^11.10.4",
39
+ "@iconify/react": "^4.0.0",
40
+ "@material-table/core": "^0.2.48",
41
+ "@mui/icons-material": "^5.10.6",
42
+ "@mui/lab": "^5.0.0-alpha.102",
43
+ "@mui/material": "^5.10.8",
44
+ "@mui/styles": "^5.10.8",
45
+ "@uiw/react-markdown-preview": "4.0.6",
46
+ "ahooks": "^3.7.1",
47
+ "axios": "^0.27.2",
48
+ "classnames": "^2.3.2",
49
+ "dayjs": "^1.11.7",
50
+ "file-saver": "^2.0.5",
51
+ "filesize": "^6.4.0",
52
+ "flat": "^5.0.2",
53
+ "humanize-url": "^2.1.1",
54
+ "is-absolute-url": "3",
55
+ "is-url": "^1.2.4",
56
+ "js-yaml": "^4.1.0",
57
+ "jszip": "^3.10.1",
58
+ "lodash": "^4.17.21",
59
+ "md5": "^2.3.0",
60
+ "moment": "^2.29.4",
61
+ "nanoid": "^4.0.0",
62
+ "notistack": "2.0.5",
63
+ "p-wait-for": "^4.1.0",
64
+ "pretty-ms-i18n": "^1.0.3",
65
+ "prop-types": "^15.8.1",
66
+ "react": "^18.2.0",
67
+ "react-color": "^2.19.3",
68
+ "react-dnd": "11.1.3",
69
+ "react-dnd-html5-backend": "11.1.3",
70
+ "react-error-boundary": "^3.1.4",
71
+ "react-hook-form": "^7.39.3",
72
+ "react-iframe": "^1.8.5",
73
+ "react-router-dom": "^6.4.2",
74
+ "react-sortable-tree": "^2.8.0",
75
+ "react-sortable-tree-theme-material-ui": "^1.0.16",
76
+ "react-use": "^17.4.0",
77
+ "semver": "^7.3.8",
78
+ "ufo": "^1.0.1",
79
+ "url-join": "^4.0.1"
27
80
  },
28
81
  "devDependencies": {
29
- "@babel/cli": "^7.8.4",
30
- "@babel/core": "^7.8.4",
31
- "@babel/plugin-proposal-class-properties": "^7.8.3",
32
- "@babel/preset-env": "^7.8.4",
33
- "@babel/preset-react": "^7.8.3",
34
- "babel-plugin-inline-react-svg": "^1.1.1",
35
- "babel-plugin-styled-components": "^1.10.7"
82
+ "@babel/cli": "^7.19.3",
83
+ "@babel/core": "^7.19.3",
84
+ "@babel/plugin-proposal-class-properties": "^7.18.6",
85
+ "@babel/preset-env": "^7.19.4",
86
+ "@babel/preset-react": "^7.18.6",
87
+ "babel-plugin-inline-react-svg": "^1.1.2"
36
88
  },
37
- "gitHead": "22715c3ea74d0230f3413162a17f491614b6735a"
89
+ "gitHead": "138bd91aee5a35b28c2de4e1e924c44932efaf3a"
38
90
  }