@abtnode/ux 1.16.14-beta-ab7f615e → 1.16.14-beta-cb53c14b

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 (202) hide show
  1. package/es/actions.js +97 -0
  2. package/es/analytics/card.js +92 -0
  3. package/es/analytics/chart.js +96 -0
  4. package/es/analytics/cpu.js +36 -0
  5. package/es/analytics/disk.js +111 -0
  6. package/es/analytics/memory.js +72 -0
  7. package/es/analytics/runtime.js +173 -0
  8. package/es/analytics/traffic.js +259 -0
  9. package/es/blocklet/access/config-access.js +307 -0
  10. package/es/blocklet/access/index.js +216 -0
  11. package/es/blocklet/actions.js +474 -0
  12. package/es/blocklet/add-cert.js +177 -0
  13. package/es/blocklet/agreement-app.js +21 -0
  14. package/es/blocklet/agreement.js +127 -0
  15. package/es/blocklet/app-avatar.js +57 -0
  16. package/es/blocklet/audit-logs.js +259 -0
  17. package/es/blocklet/blocklet-source.js +48 -0
  18. package/es/blocklet/bundle-avatar.js +64 -0
  19. package/es/blocklet/component/add.js +1308 -0
  20. package/es/blocklet/component/configuration.js +122 -0
  21. package/es/blocklet/component/delete.js +134 -0
  22. package/es/blocklet/component/environment.js +370 -0
  23. package/es/blocklet/component/index.js +975 -0
  24. package/es/blocklet/component/line.js +20 -0
  25. package/es/blocklet/component/navigation/locale-tabs.js +225 -0
  26. package/es/blocklet/component/navigation/navigation-actions.js +112 -0
  27. package/es/blocklet/component/navigation/navigation-dialog.js +607 -0
  28. package/es/blocklet/component/navigation/navigation-preview.js +101 -0
  29. package/es/blocklet/component/navigation/simple-select.js +124 -0
  30. package/es/blocklet/component/select-store.js +155 -0
  31. package/es/blocklet/component/setting.js +109 -0
  32. package/es/blocklet/component/sortable-tree.js +126 -0
  33. package/es/blocklet/component/space-connector.js +199 -0
  34. package/es/blocklet/component/space-selector.js +178 -0
  35. package/es/blocklet/component/start.js +101 -0
  36. package/es/blocklet/component/store-blocklet-list.js +200 -0
  37. package/es/blocklet/component/switch-control.js +57 -0
  38. package/es/blocklet/config-navigation.js +331 -0
  39. package/es/blocklet/configuration.js +603 -0
  40. package/es/blocklet/disk-info.js +75 -0
  41. package/es/blocklet/icons.js +18 -0
  42. package/es/blocklet/install-from-url.js +337 -0
  43. package/es/blocklet/log.js +90 -0
  44. package/es/blocklet/migration.js +149 -0
  45. package/es/blocklet/mode.js +19 -0
  46. package/es/blocklet/notification/email.js +257 -0
  47. package/es/blocklet/notification/index.js +49 -0
  48. package/es/blocklet/oauth/auth0.js +145 -0
  49. package/es/blocklet/oauth/common-settings.js +133 -0
  50. package/es/blocklet/oauth/federated-detail-dialog.js +175 -0
  51. package/es/blocklet/oauth/federated-invite-dialog.js +83 -0
  52. package/es/blocklet/oauth/federated-join-dialog.js +111 -0
  53. package/es/blocklet/oauth/federated-site-list.js +338 -0
  54. package/es/blocklet/oauth/federated.js +81 -0
  55. package/es/blocklet/oauth/index.js +69 -0
  56. package/es/blocklet/overview.js +293 -0
  57. package/es/blocklet/page-group.js +19 -0
  58. package/es/blocklet/preferences/app-sk.js +142 -0
  59. package/es/blocklet/preferences/index.js +305 -0
  60. package/es/blocklet/purchase/common.js +95 -0
  61. package/es/blocklet/purchase/component-purchase.js +237 -0
  62. package/es/blocklet/purchase/index.js +4 -0
  63. package/es/blocklet/router/action/add-domain-alias.js +167 -0
  64. package/es/blocklet/router/action/add-rule.js +211 -0
  65. package/es/blocklet/router/action/config-routing-rule.js +232 -0
  66. package/es/blocklet/router/action/delete-domain-alias.js +99 -0
  67. package/es/blocklet/router/action/delete-rule.js +108 -0
  68. package/es/blocklet/router/action/update-rule.js +209 -0
  69. package/es/blocklet/router/domain-actions.js +64 -0
  70. package/es/blocklet/router/domain-status.js +88 -0
  71. package/es/blocklet/router/rule-actions.js +66 -0
  72. package/es/blocklet/router/rule-list.js +190 -0
  73. package/es/blocklet/router/util.js +131 -0
  74. package/es/blocklet/runtime-info.js +68 -0
  75. package/es/blocklet/status.js +91 -0
  76. package/es/blocklet/storage/action.js +134 -0
  77. package/es/blocklet/storage/backups.js +241 -0
  78. package/es/blocklet/storage/connect-to.js +373 -0
  79. package/es/blocklet/storage/connected.js +198 -0
  80. package/es/blocklet/storage/delete.js +113 -0
  81. package/es/blocklet/storage/disconnect.js +243 -0
  82. package/es/blocklet/storage/index.js +19 -0
  83. package/es/blocklet/storage/item.js +558 -0
  84. package/es/blocklet/storage/preview-nft.js +286 -0
  85. package/es/blocklet/transfer-owner.js +198 -0
  86. package/es/blocklet/types.js +18 -0
  87. package/es/blocklet/util.js +145 -0
  88. package/es/blocklet/version.js +141 -0
  89. package/es/card-selector.js +134 -0
  90. package/es/certificate.js +105 -0
  91. package/es/chain.js +13 -0
  92. package/es/click-to-copy.js +22 -0
  93. package/es/confirm.js +149 -0
  94. package/es/contexts/audit-log.js +152 -0
  95. package/es/contexts/blocklet.js +10 -0
  96. package/es/contexts/deleting-blocklets.js +70 -0
  97. package/es/contexts/node.js +17 -0
  98. package/es/contexts/session.js +8 -0
  99. package/es/contexts/team.js +10 -0
  100. package/es/delete-confirm.js +121 -0
  101. package/es/did-address.js +46 -0
  102. package/es/dot.js +14 -0
  103. package/es/exchange-passport.js +102 -0
  104. package/es/form/form-select-input.js +184 -0
  105. package/es/form/form-text-input.js +178 -0
  106. package/es/form/form-wrapper.js +88 -0
  107. package/es/form/input-triggers.js +98 -0
  108. package/es/form/required.js +8 -0
  109. package/es/hooks/blocklet.js +229 -0
  110. package/es/hooks/confirm.js +90 -0
  111. package/es/hooks/mobile-width.js +11 -0
  112. package/es/hooks/url-evaluation.js +155 -0
  113. package/es/hooks/use-app-logo.js +16 -0
  114. package/es/hooks/use-backup-progress.js +31 -0
  115. package/es/hooks/use-blocklet-info-for-connect-did-spaces.js +50 -0
  116. package/es/hooks/use-bundle-logo.js +27 -0
  117. package/es/hooks/use-navigation.js +347 -0
  118. package/es/hooks/use-passport-id.js +14 -0
  119. package/es/hooks/use-subscription.js +22 -0
  120. package/es/icons/empty-space-nft.svg +59 -0
  121. package/es/icons/empty-spaces-nft.svg +58 -0
  122. package/es/icons/long-arrow.svg +5 -0
  123. package/es/icons/space-connected.svg +3 -0
  124. package/es/icons/space-disconnect.svg +3 -0
  125. package/es/index.js +3 -0
  126. package/es/invitation/invitation-app.js +58 -0
  127. package/es/invitation/invitation-login.js +68 -0
  128. package/es/invitation/invitation-passport.js +144 -0
  129. package/es/invitation/invitation-receive.js +138 -0
  130. package/es/invitation/invitation-success.js +93 -0
  131. package/es/invitation/invitation-user.js +90 -0
  132. package/es/invitation/invitation.js +90 -0
  133. package/es/issue-passport.js +142 -0
  134. package/es/launch-blocklet/content-layout.js +58 -0
  135. package/es/launch-blocklet/page-header.js +43 -0
  136. package/es/layout/addon.js +114 -0
  137. package/es/layout/feedback.js +55 -0
  138. package/es/locales/en.js +1534 -0
  139. package/es/locales/index.js +9 -0
  140. package/es/locales/zh.js +1537 -0
  141. package/es/logs/clock.js +11 -0
  142. package/es/logs/download.js +132 -0
  143. package/es/logs/log-terminal.js +253 -0
  144. package/es/lost-passport.js +452 -0
  145. package/es/nav-logo.js +219 -0
  146. package/es/passport-tag.js +43 -0
  147. package/es/permission.js +57 -0
  148. package/es/relative-time.js +53 -0
  149. package/es/result-message.js +11 -0
  150. package/es/schema-form/color-input.js +98 -0
  151. package/es/schema-form/common-prop-types.js +13 -0
  152. package/es/schema-form/index.js +215 -0
  153. package/es/schema-form/passport-input.js +54 -0
  154. package/es/schema-form/text-input.js +57 -0
  155. package/es/store/add.js +179 -0
  156. package/es/store/delete.js +96 -0
  157. package/es/store/item.js +76 -0
  158. package/es/subscription.js +144 -0
  159. package/es/table-icons.js +34 -0
  160. package/es/table.js +52 -0
  161. package/es/tag.js +21 -0
  162. package/es/team/members/actions.js +89 -0
  163. package/es/team/members/index.js +636 -0
  164. package/es/team/members/invitations.js +188 -0
  165. package/es/team/members/invite-member.js +208 -0
  166. package/es/team/members/issue-passport.js +152 -0
  167. package/es/team/members/member.js +408 -0
  168. package/es/team/members/passport-issuances.js +155 -0
  169. package/es/team/members/passports.js +364 -0
  170. package/es/team/members/toggle-user-approval.js +122 -0
  171. package/es/team/members/transfer-node.js +256 -0
  172. package/es/team/members/util.js +14 -0
  173. package/es/team/passports/color.js +126 -0
  174. package/es/team/passports/detail.js +312 -0
  175. package/es/team/passports/index.js +282 -0
  176. package/es/team/passports/mutate-role.js +198 -0
  177. package/es/team/passports/trusted-factories.js +221 -0
  178. package/es/team/passports/trusted-factory.js +343 -0
  179. package/es/team/passports/trusted-issuer.js +296 -0
  180. package/es/team/passports/trusted-issuers.js +226 -0
  181. package/es/team/search-input.js +46 -0
  182. package/es/team/styles/dialog.js +72 -0
  183. package/es/team/styles/list-header.js +31 -0
  184. package/es/util/api.js +6 -0
  185. package/es/util/constants.js +2 -0
  186. package/es/util/index.js +598 -0
  187. package/es/util/mode.js +4 -0
  188. package/es/util/space-gateway.js +51 -0
  189. package/es/util/spaces.js +151 -0
  190. package/es/who-can-access/config.js +38 -0
  191. package/es/wrap-locale.js +15 -0
  192. package/lib/blocklet/component/space-connector.js +1 -1
  193. package/lib/blocklet/component/space-selector.js +1 -1
  194. package/lib/blocklet/storage/backups.js +1 -1
  195. package/lib/blocklet/storage/connect-to.js +1 -1
  196. package/lib/blocklet/storage/connected.js +1 -1
  197. package/lib/blocklet/storage/disconnect.js +1 -1
  198. package/lib/blocklet/storage/index.js +1 -1
  199. package/lib/blocklet/storage/item.js +1 -1
  200. package/lib/invitation/invitation-receive.js +1 -1
  201. package/lib/team/passports/trusted-factory.js +1 -1
  202. package/package.json +81 -18
@@ -0,0 +1,114 @@
1
+ /* eslint-disable react/jsx-one-expression-per-line */
2
+ import { useContext, cloneElement } from 'react';
3
+ import styled from '@emotion/styled';
4
+ import PropTypes from 'prop-types';
5
+ import Button from '@mui/material/IconButton';
6
+ import { useLocation } from 'react-router-dom';
7
+ import SessionManager from '@arcblock/did-connect/lib/SessionManager';
8
+ import LocaleSelector from '@arcblock/ux/lib/Locale/selector';
9
+ import { LocaleContext } from '@arcblock/ux/lib/Locale/context';
10
+ import GlobeIcon from '@arcblock/icons/lib/Globe';
11
+ import QuestionMarkIcon from '@arcblock/icons/lib/QuestionMarkCircle';
12
+ import { jsx as _jsx } from "react/jsx-runtime";
13
+ import { jsxs as _jsxs } from "react/jsx-runtime";
14
+ export default function HeaderAddon({
15
+ SessionContext,
16
+ extraItems,
17
+ showLocale,
18
+ showHelper,
19
+ showSessionManager,
20
+ sessionManagerProps
21
+ }) {
22
+ const {
23
+ session
24
+ } = useContext(SessionContext);
25
+ const {
26
+ locale
27
+ } = useContext(LocaleContext);
28
+ const location = useLocation();
29
+ const defaultEndpoint = 'https://developer.blocklet.io/docs';
30
+ const docMap = {
31
+ '/store': {
32
+ endpoint: 'https://store.blocklet.io'
33
+ },
34
+ '/dashboard': {
35
+ path: '/conceptual/overview'
36
+ },
37
+ '/settings/router': {
38
+ path: '/conceptual/server-architecture'
39
+ }
40
+ };
41
+ const onHelpClick = () => {
42
+ const pathName = location.pathname;
43
+ let doc = {};
44
+ if (pathName.indexOf('/store') > -1) {
45
+ doc = docMap['/store'];
46
+ } else if (docMap[pathName]) {
47
+ doc = docMap[pathName];
48
+ }
49
+ window.open(`${doc.endpoint || defaultEndpoint}/${locale}${doc.path || ''}`, '_blank');
50
+ };
51
+ return /*#__PURE__*/_jsxs(Div, {
52
+ children: [extraItems.map((x, index) => /*#__PURE__*/cloneElement(x, {
53
+ key: index
54
+ })), showLocale && /*#__PURE__*/_jsx(LocaleSelector, {
55
+ "data-cy": "locale-addon",
56
+ icon: GlobeIcon,
57
+ size: 23,
58
+ showText: false,
59
+ className: "locale-addon"
60
+ }), showHelper && /*#__PURE__*/_jsx(Button, {
61
+ onClick: onHelpClick,
62
+ children: /*#__PURE__*/_jsx(QuestionMarkIcon, {})
63
+ }), showSessionManager && /*#__PURE__*/_jsx(SessionManager, {
64
+ locale: locale,
65
+ session: session,
66
+ size: 24,
67
+ showRole: true,
68
+ ...sessionManagerProps
69
+ })]
70
+ });
71
+ }
72
+ HeaderAddon.propTypes = {
73
+ SessionContext: PropTypes.object.isRequired,
74
+ webWalletUrl: PropTypes.string,
75
+ extraItems: PropTypes.array,
76
+ showLocale: PropTypes.bool,
77
+ showSessionManager: PropTypes.bool,
78
+ showHelper: PropTypes.bool,
79
+ sessionManagerProps: PropTypes.object
80
+ };
81
+ HeaderAddon.defaultProps = {
82
+ webWalletUrl: '',
83
+ extraItems: [],
84
+ showLocale: true,
85
+ showSessionManager: true,
86
+ showHelper: true,
87
+ sessionManagerProps: {}
88
+ };
89
+ const Div = styled.div`
90
+ display: flex;
91
+ justify-content: center;
92
+ align-items: center;
93
+
94
+ .MuiIconButton-root svg {
95
+ width: 26px;
96
+ height: 26px;
97
+ }
98
+
99
+ .user-addon {
100
+ .user-avatar {
101
+ width: 28px;
102
+ border-radius: 14px;
103
+ height: auto;
104
+ }
105
+ }
106
+
107
+ ${props => props.theme.breakpoints.down('md')} {
108
+ > button,
109
+ > a {
110
+ padding-left: 8px;
111
+ padding-right: 8px;
112
+ }
113
+ }
114
+ `;
@@ -0,0 +1,55 @@
1
+ /** @jsxImportSource @emotion/react */
2
+ import PropTypes from 'prop-types';
3
+ import { Box } from '@mui/material';
4
+ import Link from '@mui/material/Link';
5
+ import { useLocaleContext } from '@arcblock/ux/lib/Locale/context';
6
+ import { jsx as _jsx } from "@emotion/react/jsx-runtime";
7
+ export default function Feedback({
8
+ infos
9
+ }) {
10
+ const {
11
+ t
12
+ } = useLocaleContext();
13
+ const infoStr = infos.map(x => `* ${x.label}: ${x.value}`).join('\n');
14
+ const feedbackUrl = new URL('https://github.com/blocklet/blocklet-site/issues/new');
15
+ feedbackUrl.searchParams.set('title', '[Feedback]');
16
+ feedbackUrl.searchParams.set('body', `<!-- [Enter feedback here] -->
17
+
18
+
19
+
20
+ <!--
21
+ Document Details
22
+ ${infoStr}
23
+ * Page: ${window.location.href}
24
+ -->
25
+ `);
26
+ return _jsx(Box, {
27
+ sx: {
28
+ mx: {
29
+ xs: 0,
30
+ md: 2
31
+ }
32
+ },
33
+ children: _jsx(Link, {
34
+ sx: {
35
+ color: 'text.primary'
36
+ },
37
+ target: "_blank",
38
+ href: feedbackUrl.href,
39
+ rel: "noreferrer",
40
+ style: {
41
+ textDecoration: 'underline'
42
+ },
43
+ children: t('common.reportIssue')
44
+ })
45
+ });
46
+ }
47
+ Feedback.propTypes = {
48
+ infos: PropTypes.arrayOf(PropTypes.shape({
49
+ label: PropTypes.string,
50
+ value: PropTypes.string
51
+ }))
52
+ };
53
+ Feedback.defaultProps = {
54
+ infos: []
55
+ };