@abtnode/ux 1.16.19-beta-630ac853 → 1.16.19-beta-626e4d43

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/locales/en.js CHANGED
@@ -924,8 +924,8 @@ module.exports = {
924
924
  recordValue: 'Record Value'
925
925
  },
926
926
  verify: {
927
- ok: 'This site is resolved',
928
- notResolved: 'This site neither resolved nor accessible, please check your DNS configuration'
927
+ ok: 'The domain resolution is normal',
928
+ notResolved: 'This domain neither resolved nor accessible, please check your DNS configuration'
929
929
  },
930
930
  https: {
931
931
  ok: 'This domain has https enabled',
@@ -938,8 +938,8 @@ module.exports = {
938
938
  }
939
939
  },
940
940
  domainAlias: {
941
- inputDomain: 'Input Domain',
942
- nftDomain: 'NFT Domain',
941
+ inputDomain: 'Manually config domain',
942
+ nftDomain: 'Automatic config with DID Domain',
943
943
  add: {
944
944
  title: 'Add Additional Domain',
945
945
  domainDescription: 'Please provide a valid domain name',
@@ -1596,13 +1596,23 @@ module.exports = {
1596
1596
  federated: 'Federated Login'
1597
1597
  },
1598
1598
  expiration: {
1599
- tips: {
1600
- success: 'Subscription will expire after {validity}',
1601
- warning: 'Subscription will expire after {validity}',
1602
- error: 'Subscription Expired'
1599
+ mobile: {
1600
+ tips: {
1601
+ success: '{validity}',
1602
+ warning: '{validity}',
1603
+ error: 'Expired'
1604
+ },
1605
+ loadFailed: 'Retry!'
1603
1606
  },
1604
- loading: 'Load subscription...',
1605
- loadFailed: 'Failed to load subscription info, please retry!'
1607
+ desktop: {
1608
+ tips: {
1609
+ success: 'Subscription will expire after {validity}',
1610
+ warning: 'Subscription will expire after {validity}',
1611
+ error: 'Subscription Expired'
1612
+ },
1613
+ loading: 'Load subscription...',
1614
+ loadFailed: 'Failed to load subscription info, please retry!'
1615
+ }
1606
1616
  },
1607
1617
  analytics: {
1608
1618
  trend: 'Trends',
@@ -1667,5 +1677,9 @@ module.exports = {
1667
1677
  },
1668
1678
  disbandFederatedLogin: 'Disband federated login',
1669
1679
  disbandFederatedLoginDescription: 'After disband federated login, all member site will quit federated login automatically'
1680
+ },
1681
+ optionsOrder: {
1682
+ 1: 'Option One',
1683
+ 2: 'Option Two'
1670
1684
  }
1671
1685
  };
package/lib/locales/zh.js CHANGED
@@ -927,8 +927,8 @@ module.exports = {
927
927
  recordValue: '记录值'
928
928
  },
929
929
  verify: {
930
- ok: '该站点解析正常',
931
- notResolved: '改站点解析异常,请检查你域名服务商的 DNS 配置'
930
+ ok: '该域名解析正常',
931
+ notResolved: '该域名解析异常,请检查你域名服务商的 DNS 配置'
932
932
  },
933
933
  https: {
934
934
  ok: '该域名已启用 HTTPS',
@@ -941,8 +941,8 @@ module.exports = {
941
941
  }
942
942
  },
943
943
  domainAlias: {
944
- inputDomain: '输入域名',
945
- nftDomain: 'NFT 域名',
944
+ inputDomain: '手动配置域名',
945
+ nftDomain: '通过 DID Domain 自动配置域名',
946
946
  add: {
947
947
  title: '添加额外域名',
948
948
  domainDescription: '请填写有效的域名',
@@ -1600,13 +1600,23 @@ module.exports = {
1600
1600
  federated: '统一登录'
1601
1601
  },
1602
1602
  expiration: {
1603
- tips: {
1604
- success: '订阅将在{validity}后到期',
1605
- warning: '订阅将在{validity}后到期',
1606
- error: '订阅已过期'
1603
+ mobile: {
1604
+ tips: {
1605
+ success: '{validity}',
1606
+ warning: '{validity}',
1607
+ error: '订阅已过期'
1608
+ },
1609
+ loadFailed: '请重试!'
1607
1610
  },
1608
- loadFailed: '加载订阅信息失败,请重试!',
1609
- loading: '加载订阅信息...'
1611
+ desktop: {
1612
+ tips: {
1613
+ success: '订阅将在{validity}后到期',
1614
+ warning: '订阅将在{validity}后到期',
1615
+ error: '订阅已过期'
1616
+ },
1617
+ loadFailed: '加载订阅信息失败,请重试!',
1618
+ loading: '加载订阅信息...'
1619
+ }
1610
1620
  },
1611
1621
  analytics: {
1612
1622
  trend: '趋势',
@@ -1671,5 +1681,9 @@ module.exports = {
1671
1681
  },
1672
1682
  disbandFederatedLogin: '解散统一登录',
1673
1683
  disbandFederatedLoginDescription: '解散统一登录后,将自动让所有成员站点自动退出统一登录站点群'
1684
+ },
1685
+ optionsOrder: {
1686
+ 1: '选择一',
1687
+ 2: '选择二'
1674
1688
  }
1675
1689
  };
@@ -28,6 +28,12 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
28
28
  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; }
29
29
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
30
30
  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); }
31
+ const componentMap = {
32
+ input: _textInput.default,
33
+ color: _colorInput.default,
34
+ passport: _passportInput.default,
35
+ uploader: props => /*#__PURE__*/(0, _jsxRuntime.jsx)(_logoUploader.default, _objectSpread({}, props.componentProps))
36
+ };
31
37
  function getComponent(item, _ref) {
32
38
  let {
33
39
  editing = false
@@ -37,6 +43,7 @@ function getComponent(item, _ref) {
37
43
  render,
38
44
  renderFormItem
39
45
  } = item;
46
+
40
47
  // if provided renderItem and editing is true, use it
41
48
  if (editing && renderFormItem) {
42
49
  return renderFormItem;
@@ -46,12 +53,6 @@ function getComponent(item, _ref) {
46
53
  if (!editing && render) {
47
54
  return render;
48
55
  }
49
- const componentMap = {
50
- input: _textInput.default,
51
- color: _colorInput.default,
52
- passport: _passportInput.default,
53
- uploader: props => /*#__PURE__*/(0, _jsxRuntime.jsx)(_logoUploader.default, _objectSpread({}, props.componentProps))
54
- };
55
56
  return componentMap[componentType === null || componentType === void 0 ? void 0 : componentType.toLowerCase()];
56
57
  }
57
58
  function SchemaForm(_ref2) {
@@ -16,6 +16,7 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
16
16
  var _react = require("react");
17
17
  var _useAsyncRetry = _interopRequireDefault(require("react-use/lib/useAsyncRetry"));
18
18
  var _useSetState = _interopRequireDefault(require("react-use/lib/useSetState"));
19
+ var _useMediaQuery = _interopRequireDefault(require("@mui/material/useMediaQuery"));
19
20
  var _util = require("./util");
20
21
  var _jsxRuntime = require("react/jsx-runtime");
21
22
  const _excluded = ["launcherUrl", "chainHost", "nftId", "retention"],
@@ -31,15 +32,31 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
31
32
  const ALERT_THRESHOLD_MS = 30 * 24 * 60 * 60 * 1000;
32
33
  const DEFAULT_LAUNCHER_URL = 'https://launcher.arcblock.io/'; // 兼容: 旧版本的 blocklet.controller 没有 launcherUrl 字段
33
34
 
34
- function Subscription(_ref) {
35
+ // eslint-disable-next-line react/prop-types
36
+ function ChipLabel(_ref) {
37
+ let {
38
+ children
39
+ } = _ref;
40
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Box.default, {
41
+ sx: {
42
+ display: 'flex',
43
+ alignItems: 'center',
44
+ gap: 1
45
+ },
46
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_AccessTime.default, {
47
+ fontSize: "small"
48
+ }), children]
49
+ });
50
+ }
51
+ function Subscription(_ref2) {
35
52
  var _asyncState$value, _asyncState$value2;
36
53
  let {
37
54
  launcherUrl,
38
55
  chainHost,
39
56
  nftId,
40
57
  retention
41
- } = _ref,
42
- props = _objectWithoutProperties(_ref, _excluded);
58
+ } = _ref2,
59
+ props = _objectWithoutProperties(_ref2, _excluded);
43
60
  const {
44
61
  t,
45
62
  locale
@@ -49,10 +66,12 @@ function Subscription(_ref) {
49
66
  popoverAnchorEl: null
50
67
  });
51
68
  const iframeRef = (0, _react.useRef)(null);
69
+ const isMobile = (0, _useMediaQuery.default)(x => x.breakpoints.down('md'));
52
70
  const {
53
71
  sx = {}
54
72
  } = props,
55
73
  rest = _objectWithoutProperties(props, _excluded2);
74
+ const typoKey = isMobile ? 'mobile' : 'desktop';
56
75
  const asyncState = (0, _useAsyncRetry.default)(async () => {
57
76
  const [asset, subscriptionURL] = await Promise.all([(0, _util.getAsset)(chainHost, nftId), (0, _util.getSubscriptionURL)({
58
77
  launcherUrl: launcherUrl || DEFAULT_LAUNCHER_URL,
@@ -65,23 +84,24 @@ function Subscription(_ref) {
65
84
  };
66
85
  }, [locale]);
67
86
  if (asyncState.loading) {
68
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Box.default, _objectSpread(_objectSpread({
87
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Chip.default, _objectSpread({
88
+ label: /*#__PURE__*/(0, _jsxRuntime.jsxs)(ChipLabel, {
89
+ children: [!isMobile && t('expiration.desktop.loading'), /*#__PURE__*/(0, _jsxRuntime.jsx)(_CircularProgress.default, {
90
+ size: 16
91
+ })]
92
+ }),
93
+ variant: "success",
69
94
  sx: _objectSpread({
70
- display: 'flex',
71
- alignItems: 'center',
72
- color: 'grey',
73
- gap: 1
95
+ cursor: 'pointer'
74
96
  }, sx)
75
- }, rest), {}, {
76
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_CircularProgress.default, {
77
- size: 16
78
- }), t('expiration.loading')]
79
- }));
97
+ }, rest));
80
98
  }
81
99
  if (asyncState.error) {
82
100
  console.error(asyncState.error);
83
101
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Chip.default, _objectSpread(_objectSpread({
84
- label: t('expiration.loadFailed'),
102
+ label: /*#__PURE__*/(0, _jsxRuntime.jsx)(ChipLabel, {
103
+ children: t("expiration.".concat(typoKey, ".loadFailed"))
104
+ }),
85
105
  color: "error",
86
106
  variant: "success",
87
107
  sx: _objectSpread({
@@ -113,23 +133,14 @@ function Subscription(_ref) {
113
133
  };
114
134
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
115
135
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Chip.default, _objectSpread(_objectSpread({
116
- label: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Box.default, {
117
- sx: {
118
- display: 'flex',
119
- alignItems: 'center'
120
- },
121
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_AccessTime.default, {
122
- sx: {
123
- mr: '4px'
124
- },
125
- fontSize: "small"
126
- }), t("expiration.tips.".concat(status), {
136
+ label: /*#__PURE__*/(0, _jsxRuntime.jsx)(ChipLabel, {
137
+ children: t("expiration.".concat(typoKey, ".tips.").concat(status), {
127
138
  validity: (0, _prettyMsI18n.default)(validityMs, {
128
139
  locale: (0, _util.formatPrettyMsLocale)(locale),
129
140
  compact: true,
130
141
  verbose: true
131
142
  })
132
- })]
143
+ })
133
144
  }),
134
145
  color: status,
135
146
  variant: status !== 'success' ? 'contained' : 'outlined',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abtnode/ux",
3
- "version": "1.16.19-beta-630ac853",
3
+ "version": "1.16.19-beta-626e4d43",
4
4
  "description": "UX components shared across abtnode packages",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -27,23 +27,23 @@
27
27
  "author": "linchen <linchen1987@foxmail.com> (http://github.com/linchen1987)",
28
28
  "license": "Apache-2.0",
29
29
  "dependencies": {
30
- "@abtnode/auth": "1.16.19-beta-630ac853",
31
- "@abtnode/constant": "1.16.19-beta-630ac853",
32
- "@abtnode/util": "1.16.19-beta-630ac853",
30
+ "@abtnode/auth": "1.16.19-beta-626e4d43",
31
+ "@abtnode/constant": "1.16.19-beta-626e4d43",
32
+ "@abtnode/util": "1.16.19-beta-626e4d43",
33
33
  "@ahooksjs/use-url-state": "^3.5.1",
34
- "@arcblock/did": "^1.18.95",
35
- "@arcblock/did-connect": "^2.8.16",
34
+ "@arcblock/did": "^1.18.101",
35
+ "@arcblock/did-connect": "^2.8.17",
36
36
  "@arcblock/did-motif": "^1.1.13",
37
- "@arcblock/icons": "^2.8.16",
38
- "@arcblock/nft-display": "2.8.16",
39
- "@arcblock/react-hooks": "^2.8.16",
40
- "@arcblock/terminal": "^2.8.16",
41
- "@arcblock/ux": "^2.8.16",
42
- "@blocklet/constant": "1.16.19-beta-630ac853",
43
- "@blocklet/launcher-layout": "2.2.41",
37
+ "@arcblock/icons": "^2.8.17",
38
+ "@arcblock/nft-display": "2.8.17",
39
+ "@arcblock/react-hooks": "^2.8.17",
40
+ "@arcblock/terminal": "^2.8.17",
41
+ "@arcblock/ux": "^2.8.17",
42
+ "@blocklet/constant": "1.16.19-beta-626e4d43",
43
+ "@blocklet/launcher-layout": "2.2.43",
44
44
  "@blocklet/list": "^0.12.53",
45
- "@blocklet/meta": "1.16.19-beta-630ac853",
46
- "@blocklet/ui-react": "^2.8.16",
45
+ "@blocklet/meta": "1.16.19-beta-626e4d43",
46
+ "@blocklet/ui-react": "^2.8.17",
47
47
  "@blocklet/uploader": "^0.0.45",
48
48
  "@emotion/react": "^11.10.4",
49
49
  "@emotion/styled": "^11.10.4",
@@ -54,7 +54,7 @@
54
54
  "@mui/material": "^5.14.10",
55
55
  "@mui/styles": "^5.14.10",
56
56
  "@mui/x-date-pickers": "^6.14.0",
57
- "@ocap/client": "1.18.95",
57
+ "@ocap/client": "1.18.101",
58
58
  "@uiw/react-markdown-preview": "4.0.6",
59
59
  "ahooks": "^3.7.1",
60
60
  "axios": "^0.27.2",
@@ -100,7 +100,7 @@
100
100
  "babel-plugin-inline-react-svg": "^1.1.2",
101
101
  "glob": "^10.3.3"
102
102
  },
103
- "gitHead": "a4feb519d9122ef75873dd8d657486afca2d4ac9",
103
+ "gitHead": "1acfc039b8866999003c156edb50c71859226532",
104
104
  "exports": {
105
105
  ".": {
106
106
  "import": "./es/index.js",