@abtnode/ux 1.16.15-beta-58d50c9a → 1.16.15-beta-e143b1cf

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.
@@ -4,17 +4,19 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = AddDomainAlias;
7
- var _react = require("react");
8
7
  var _propTypes = _interopRequireDefault(require("prop-types"));
8
+ var _react = require("react");
9
+ var _urlEvaluation = require("@abtnode/util/lib/url-evaluation");
10
+ var _context = require("@arcblock/ux/lib/Locale/context");
9
11
  var _CallMerge = _interopRequireDefault(require("@mui/icons-material/CallMerge"));
10
12
  var _CircularProgress = _interopRequireDefault(require("@mui/material/CircularProgress"));
11
- var _Typography = _interopRequireDefault(require("@mui/material/Typography"));
12
- var _TextField = _interopRequireDefault(require("@mui/material/TextField"));
13
13
  var _MenuItem = _interopRequireDefault(require("@mui/material/MenuItem"));
14
- var _context = require("@arcblock/ux/lib/Locale/context");
14
+ var _TextField = _interopRequireDefault(require("@mui/material/TextField"));
15
+ var _Typography = _interopRequireDefault(require("@mui/material/Typography"));
15
16
  var _confirm = _interopRequireDefault(require("../../../confirm"));
16
- var _util = require("../../../util");
17
17
  var _node = require("../../../contexts/node");
18
+ var _util = require("../../../util");
19
+ var _dnsTip = _interopRequireDefault(require("../dns-tip"));
18
20
  var _util2 = require("../util");
19
21
  var _jsxRuntime = require("react/jsx-runtime");
20
22
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -28,7 +30,8 @@ function AddDomainAlias(_ref) {
28
30
  id,
29
31
  children,
30
32
  title,
31
- teamDid
33
+ teamDid,
34
+ systemDomains
32
35
  } = _ref;
33
36
  const {
34
37
  t
@@ -38,6 +41,10 @@ function AddDomainAlias(_ref) {
38
41
  } = (0, _node.useNodeContext)();
39
42
  const [loading, setLoading] = (0, _react.useState)(false);
40
43
  const [confirmSetting, setConfirmSetting] = (0, _react.useState)(null);
44
+ let cnameDomain = systemDomains.find(item => (0, _urlEvaluation.isSlpDomain)(item));
45
+ if (!cnameDomain) {
46
+ cnameDomain = systemDomains.find(item => (0, _urlEvaluation.isDidDomain)(item));
47
+ }
41
48
  const onCancel = () => {
42
49
  setLoading(false);
43
50
  setConfirmSetting(null);
@@ -73,9 +80,9 @@ function AddDomainAlias(_ref) {
73
80
  const setting = {
74
81
  title: title || t('router.domainAlias.add.title'),
75
82
  // eslint-disable-next-line react/no-unstable-nested-components
76
- description: (params, setParams, setError) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_Typography.default, {
83
+ description: (params, setParams, setError) => /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Typography.default, {
77
84
  component: "div",
78
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_TextField.default, {
85
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_TextField.default, {
79
86
  label: t('router.domainAlias.add.domainDescription'),
80
87
  helperText: t('router.domainAlias.add.helperText'),
81
88
  autoComplete: "off",
@@ -117,7 +124,10 @@ function AddDomainAlias(_ref) {
117
124
  }
118
125
  }
119
126
  }
120
- })
127
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_dnsTip.default, {
128
+ domain: params.domain,
129
+ resolvedTarget: cnameDomain
130
+ })]
121
131
  }),
122
132
  confirm: t('common.confirm'),
123
133
  cancel: t('common.cancel'),
@@ -158,7 +168,8 @@ function AddDomainAlias(_ref) {
158
168
  onConfirm: confirmSetting.onConfirm,
159
169
  onCancel: confirmSetting.onCancel,
160
170
  color: "primary",
161
- loading: loading
171
+ loading: loading,
172
+ maxWidth: "lg"
162
173
  })]
163
174
  });
164
175
  }
@@ -166,7 +177,8 @@ AddDomainAlias.propTypes = {
166
177
  id: _propTypes.default.string.isRequired,
167
178
  children: _propTypes.default.any,
168
179
  title: _propTypes.default.string,
169
- teamDid: _propTypes.default.string
180
+ teamDid: _propTypes.default.string,
181
+ systemDomains: _propTypes.default.arrayOf(_propTypes.default.string).isRequired
170
182
  };
171
183
  AddDomainAlias.defaultProps = {
172
184
  children: null,
@@ -0,0 +1,117 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = DNSTip;
7
+ var _ClickToCopy = require("@arcblock/ux/lib/ClickToCopy");
8
+ var _InfoRow = _interopRequireDefault(require("@arcblock/ux/lib/InfoRow"));
9
+ var _context = require("@arcblock/ux/lib/Locale/context");
10
+ var _material = require("@mui/material");
11
+ var _Box = _interopRequireDefault(require("@mui/material/Box"));
12
+ var _useTheme = _interopRequireDefault(require("@mui/material/styles/useTheme"));
13
+ var _useMediaQuery = _interopRequireDefault(require("@mui/material/useMediaQuery"));
14
+ var _propTypes = _interopRequireDefault(require("prop-types"));
15
+ var _jsxRuntime = require("react/jsx-runtime");
16
+ const _excluded = ["domain", "resolvedTarget"];
17
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
18
+ 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; }
19
+ 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; }
20
+ 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; }
21
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
22
+ 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); }
23
+ 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; }
24
+ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
25
+ function DNSTip(_ref) {
26
+ let {
27
+ domain,
28
+ resolvedTarget
29
+ } = _ref,
30
+ rest = _objectWithoutProperties(_ref, _excluded);
31
+ const {
32
+ t,
33
+ locale
34
+ } = (0, _context.useLocaleContext)();
35
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Box.default, _objectSpread(_objectSpread({
36
+ sx: {
37
+ backgroundColor: 'rgb(236, 251, 253)',
38
+ borderColor: 'rgb(236, 251, 253)',
39
+ borderRadius: '8px',
40
+ padding: '12px'
41
+ }
42
+ }, rest), {}, {
43
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_Box.default, {
44
+ display: "flex",
45
+ children: [t('router.domain.setup.tipStart'), domain && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Box.default, {
46
+ mx: 0.5,
47
+ color: "primary.main",
48
+ fontWeight: "fontWeightBold",
49
+ children: domain
50
+ }), t('router.domain.setup.tipEnd'), ":"]
51
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Box.default, {
52
+ sx: {
53
+ '&>div': {
54
+ mb: 0
55
+ }
56
+ },
57
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(Tip, {
58
+ label: t('router.domain.setup.recordType'),
59
+ value: "CNAME",
60
+ locale: locale
61
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(Tip, {
62
+ label: t('router.domain.setup.recordValue'),
63
+ value: resolvedTarget,
64
+ locale: locale
65
+ })]
66
+ })]
67
+ }));
68
+ }
69
+ DNSTip.propTypes = {
70
+ domain: _propTypes.default.string,
71
+ resolvedTarget: _propTypes.default.string.isRequired
72
+ };
73
+ DNSTip.defaultProps = {
74
+ domain: ''
75
+ };
76
+ function Tip(_ref2) {
77
+ let {
78
+ locale,
79
+ label,
80
+ value
81
+ } = _ref2;
82
+ const isMobile = (0, _useMediaQuery.default)(theme => theme.breakpoints.down('md'));
83
+ const theme = (0, _useTheme.default)();
84
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_InfoRow.default, {
85
+ name: label,
86
+ nameWidth: 120,
87
+ children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Box.default, {
88
+ sx: {
89
+ display: 'flex',
90
+ alignItems: 'center',
91
+ lineHeight: 1
92
+ },
93
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Typography, {
94
+ component: "span",
95
+ color: "primary.main",
96
+ wordWrap: "break-word",
97
+ overflow: "auto",
98
+ sx: isMobile ? {
99
+ maxWidth: '95%'
100
+ } : {},
101
+ children: value
102
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ClickToCopy.CopyButton, {
103
+ content: value,
104
+ locale: locale,
105
+ style: {
106
+ marginLeft: '4px',
107
+ color: theme.palette.text.secondary
108
+ }
109
+ })]
110
+ })
111
+ });
112
+ }
113
+ Tip.propTypes = {
114
+ locale: _propTypes.default.string.isRequired,
115
+ label: _propTypes.default.string.isRequired,
116
+ value: _propTypes.default.string.isRequired
117
+ };
@@ -27,6 +27,7 @@ function DomainActions(_ref) {
27
27
  const isCurrentDomain = domain.value === window.location.hostname;
28
28
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_actions.default, {
29
29
  "data-cy": "domain-actions",
30
+ size: "large",
30
31
  actions: [
31
32
  // eslint-disable-next-line react/no-unstable-nested-components
32
33
  _ref2 => {
@@ -0,0 +1,93 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = ClearCache;
7
+ var _react = _interopRequireWildcard(require("react"));
8
+ var _Toast = _interopRequireDefault(require("@arcblock/ux/lib/Toast"));
9
+ var _Button = _interopRequireDefault(require("@arcblock/ux/lib/Button"));
10
+ var _CircularProgress = _interopRequireDefault(require("@mui/material/CircularProgress"));
11
+ var _context = require("@arcblock/ux/lib/Locale/context");
12
+ var _util = require("../lib/util");
13
+ var _node = require("./contexts/node");
14
+ var _confirm = _interopRequireDefault(require("./confirm"));
15
+ var _jsxRuntime = require("react/jsx-runtime");
16
+ const _excluded = ["teamDid", "size"]; // eslint-disable-next-line react/prop-types
17
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
18
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
19
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
20
+ 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; }
21
+ 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; }
22
+ 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; }
23
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
24
+ 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); }
25
+ 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; }
26
+ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
27
+ function ClearCache(_ref) {
28
+ let {
29
+ teamDid,
30
+ size = 'small'
31
+ } = _ref,
32
+ rest = _objectWithoutProperties(_ref, _excluded);
33
+ const {
34
+ t
35
+ } = (0, _context.useLocaleContext)();
36
+ const {
37
+ api
38
+ } = (0, _node.useNodeContext)();
39
+ const [loading, setLoading] = (0, _react.useState)(false);
40
+ const [confirmSetting, setConfirmSetting] = (0, _react.useState)(null);
41
+ const onCancel = () => {
42
+ setLoading(false);
43
+ setConfirmSetting(null);
44
+ };
45
+ const onConfirm = async () => {
46
+ try {
47
+ var _result$removed;
48
+ setLoading(true);
49
+ const result = await api.clearCache({
50
+ input: {
51
+ teamDid
52
+ }
53
+ });
54
+ _Toast.default.success(t('blocklet.config.clearCache.success', {
55
+ count: ((_result$removed = result.removed) === null || _result$removed === void 0 ? void 0 : _result$removed.length) || 0
56
+ }));
57
+ } catch (err) {
58
+ _Toast.default.error((0, _util.formatError)(err));
59
+ } finally {
60
+ setLoading(false);
61
+ setConfirmSetting(null);
62
+ }
63
+ };
64
+ const setting = {
65
+ title: t('blocklet.config.clearCache.title'),
66
+ description: t('blocklet.config.clearCache.description'),
67
+ confirm: t('common.confirm'),
68
+ cancel: t('common.cancel'),
69
+ onConfirm,
70
+ onCancel
71
+ };
72
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", _objectSpread(_objectSpread({}, rest), {}, {
73
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_Button.default, {
74
+ onClick: () => setConfirmSetting(setting),
75
+ color: "error",
76
+ variant: "outlined",
77
+ size: size,
78
+ children: [loading ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_CircularProgress.default, {
79
+ size: 16,
80
+ style: {
81
+ marginRight: 5
82
+ }
83
+ }) : null, t('blocklet.config.clearCache.action')]
84
+ }), confirmSetting && /*#__PURE__*/(0, _jsxRuntime.jsx)(_confirm.default, {
85
+ title: confirmSetting.title,
86
+ description: confirmSetting.description,
87
+ confirm: confirmSetting.confirm,
88
+ cancel: confirmSetting.cancel,
89
+ onConfirm: confirmSetting.onConfirm,
90
+ onCancel: confirmSetting.onCancel
91
+ })]
92
+ }));
93
+ }
package/lib/confirm.js CHANGED
@@ -22,21 +22,30 @@ var _util = require("./util");
22
22
  var _mobileWidth = _interopRequireDefault(require("./hooks/mobile-width"));
23
23
  var _jsxRuntime = require("react/jsx-runtime");
24
24
  var _templateObject;
25
+ const _excluded = ["title", "description", "showCancel", "cancel", "confirm", "color", "params", "onCancel", "onConfirm", "loading"];
25
26
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
26
27
  function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
28
+ 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; }
29
+ 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; }
30
+ 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; }
31
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
32
+ 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); }
33
+ 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; }
34
+ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
27
35
  function ConfirmDialog(_ref) {
28
36
  let {
29
- title,
30
- description,
31
- showCancel,
32
- cancel,
33
- confirm,
34
- color,
35
- params: initialParams,
36
- onCancel,
37
- onConfirm,
38
- loading: inputLoading
39
- } = _ref;
37
+ title,
38
+ description,
39
+ showCancel,
40
+ cancel,
41
+ confirm,
42
+ color,
43
+ params: initialParams,
44
+ onCancel,
45
+ onConfirm,
46
+ loading: inputLoading
47
+ } = _ref,
48
+ rest = _objectWithoutProperties(_ref, _excluded);
40
49
  const [params, setParams] = (0, _react.useState)(initialParams);
41
50
  const [open, setOpen] = (0, _react.useState)(true);
42
51
  const [loading, setLoading] = (0, _react.useState)(false);
@@ -70,13 +79,14 @@ function ConfirmDialog(_ref) {
70
79
  const {
71
80
  minWidth
72
81
  } = (0, _mobileWidth.default)();
73
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)(StyledDialog, {
82
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(StyledDialog, _objectSpread(_objectSpread({
74
83
  onClick: handleClick,
75
84
  fullScreen: isBreakpointsDownSm,
76
85
  open: open,
77
86
  style: {
78
87
  minWidth
79
- },
88
+ }
89
+ }, rest), {}, {
80
90
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_DialogTitle.default, {
81
91
  children: t
82
92
  }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_DialogContent.default, {
@@ -124,7 +134,7 @@ function ConfirmDialog(_ref) {
124
134
  }), confirm]
125
135
  })]
126
136
  })]
127
- });
137
+ }));
128
138
  }
129
139
  ConfirmDialog.propTypes = {
130
140
  title: _propTypes.default.any.isRequired,
package/lib/locales/en.js CHANGED
@@ -232,7 +232,7 @@ module.exports = {
232
232
  protocol: 'Protocol',
233
233
  published: 'published',
234
234
  purchase: 'Purchase',
235
- readMore: 'Read More',
235
+ readMore: 'More',
236
236
  redirect: 'Redirect',
237
237
  redirectCode: 'Redirect Code',
238
238
  redirectPermanently: 'Permanent Redirect',
@@ -451,6 +451,14 @@ module.exports = {
451
451
  ttl: 'Login session validity period (user will be asked to login again if they have no activity on this site for {day} days)',
452
452
  day: '{day} day',
453
453
  days: '{day} days'
454
+ },
455
+ clearCache: {
456
+ name: 'Cache Management',
457
+ purpose: 'Manage files cached in router and blocklet services',
458
+ title: 'Confirm Cache Clear?',
459
+ action: 'Clear Cache',
460
+ success: 'Successfully cleared {count} cache entries',
461
+ description: 'Are you sure you want to clear cached files in router and blocklet service? this operation may cause slight performance downgrade in the short term'
454
462
  }
455
463
  },
456
464
  overview: {
@@ -851,6 +859,12 @@ module.exports = {
851
859
  label: 'Site Domain',
852
860
  description: 'Please provide a valid site domain'
853
861
  },
862
+ setup: {
863
+ tipStart: 'Please ensure that the domain name',
864
+ tipEnd: 'has been correctly resolved',
865
+ recordType: 'Record Type',
866
+ recordValue: 'Record Value'
867
+ },
854
868
  verify: {
855
869
  ok: 'This site is resolved',
856
870
  notResolved: 'This site neither resolved nor accessible, please check your DNS configuration'
package/lib/locales/zh.js CHANGED
@@ -237,7 +237,7 @@ module.exports = {
237
237
  protocol: '协议',
238
238
  published: '发布于',
239
239
  purchase: '购买',
240
- readMore: '查看更多',
240
+ readMore: '更多',
241
241
  redirect: '重定向',
242
242
  redirectCode: '重定向状态码',
243
243
  redirectPermanently: '永久重定向',
@@ -456,6 +456,14 @@ module.exports = {
456
456
  ttl: '登录会话有效期(如果用户 {day} 天内在此站点没有任何活动,将被要求重新登录)',
457
457
  day: '{day} 天',
458
458
  days: '{day} 天'
459
+ },
460
+ clearCache: {
461
+ name: '缓存管理',
462
+ purpose: '管理缓存在网关和服务中的文件',
463
+ title: '确认清除缓存?',
464
+ action: '清除缓存',
465
+ success: '成功清除了 {count} 个缓存条目',
466
+ description: '您确定要清除缓存在网关和服务中的文件吗?此操作可能会在短期内导致轻微的性能降低。'
459
467
  }
460
468
  },
461
469
  overview: {
@@ -854,6 +862,12 @@ module.exports = {
854
862
  label: '站点域名',
855
863
  description: '请填写你所拥有的合法的站点域名'
856
864
  },
865
+ setup: {
866
+ tipStart: '请确保',
867
+ tipEnd: '域名已经被正确解析',
868
+ recordType: '记录类型',
869
+ recordValue: '记录值'
870
+ },
857
871
  verify: {
858
872
  ok: '该站点解析正常',
859
873
  notResolved: '改站点解析异常,请检查你域名服务商的 DNS 配置'
@@ -4,13 +4,14 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
- var _prettyMsI18n = _interopRequireDefault(require("pretty-ms-i18n"));
7
+ var _dayjs = _interopRequireDefault(require("@abtnode/util/lib/dayjs"));
8
8
  var _context = require("@arcblock/ux/lib/Locale/context");
9
- var _Chip = _interopRequireDefault(require("@mui/material/Chip"));
9
+ var _AccessTime = _interopRequireDefault(require("@mui/icons-material/AccessTime"));
10
10
  var _Box = _interopRequireDefault(require("@mui/material/Box"));
11
- var _Popover = _interopRequireDefault(require("@mui/material/Popover"));
11
+ var _Chip = _interopRequireDefault(require("@mui/material/Chip"));
12
12
  var _CircularProgress = _interopRequireDefault(require("@mui/material/CircularProgress"));
13
- var _dayjs = _interopRequireDefault(require("@abtnode/util/lib/dayjs"));
13
+ var _Popover = _interopRequireDefault(require("@mui/material/Popover"));
14
+ var _prettyMsI18n = _interopRequireDefault(require("pretty-ms-i18n"));
14
15
  var _propTypes = _interopRequireDefault(require("prop-types"));
15
16
  var _react = require("react");
16
17
  var _useAsyncRetry = _interopRequireDefault(require("react-use/lib/useAsyncRetry"));
@@ -110,12 +111,23 @@ function Subscription(_ref) {
110
111
  };
111
112
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
112
113
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Chip.default, _objectSpread(_objectSpread({
113
- label: t("expiration.tips.".concat(status), {
114
- validity: (0, _prettyMsI18n.default)(validityMs, {
115
- locale: (0, _util.formatPrettyMsLocale)(locale),
116
- compact: true,
117
- verbose: true
118
- })
114
+ label: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Box.default, {
115
+ sx: {
116
+ display: 'flex',
117
+ alignItems: 'center'
118
+ },
119
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_AccessTime.default, {
120
+ sx: {
121
+ mr: '4px'
122
+ },
123
+ fontSize: "small"
124
+ }), t("expiration.tips.".concat(status), {
125
+ validity: (0, _prettyMsI18n.default)(validityMs, {
126
+ locale: (0, _util.formatPrettyMsLocale)(locale),
127
+ compact: true,
128
+ verbose: true
129
+ })
130
+ })]
119
131
  }),
120
132
  color: status,
121
133
  variant: status !== 'success' ? 'contained' : 'outlined',
package/lib/util/index.js CHANGED
@@ -30,7 +30,7 @@ exports.getBlockletUrl = getBlockletUrl;
30
30
  exports.getBlockletUrlParams = void 0;
31
31
  exports.getBlockletUrls = getBlockletUrls;
32
32
  exports.getExplorerLink = getExplorerLink;
33
- exports.getTransferAppLink = exports.getSubscriptionURL = exports.getStoreList = exports.getRenewBlockletURL = exports.getPathPrefix = exports.getIssuePassportLink = exports.getInviteLink = void 0;
33
+ exports.getTransferAppLink = exports.getSystemDomains = exports.getSubscriptionURL = exports.getStoreList = exports.getRenewBlockletURL = exports.getPathPrefix = exports.getIssuePassportLink = exports.getInviteLink = void 0;
34
34
  exports.getWebWalletUrl = getWebWalletUrl;
35
35
  exports.isNewStoreUrl = exports.isInstalling = exports.isDownloading = exports.isChrome = exports.isCertificateMatch = exports.isBlockletDev = void 0;
36
36
  exports.isProtectedRole = isProtectedRole;
@@ -42,22 +42,22 @@ exports.shouldCheckDomainStatus = void 0;
42
42
  exports.sleep = sleep;
43
43
  exports.validateDomain = exports.toSlotDomain = exports.stringSortHandlerAsc = exports.sortDomains = void 0;
44
44
  var _constant = require("@abtnode/constant");
45
- var _querystring = _interopRequireDefault(require("querystring"));
46
- var _isUrl = _interopRequireDefault(require("is-url"));
47
- var _humanizeUrl = _interopRequireDefault(require("humanize-url"));
48
45
  var _filesize = _interopRequireDefault(require("filesize"));
49
- var _urlJoin = _interopRequireDefault(require("url-join"));
46
+ var _humanizeUrl = _interopRequireDefault(require("humanize-url"));
47
+ var _isUrl = _interopRequireDefault(require("is-url"));
50
48
  var _get = _interopRequireDefault(require("lodash/get"));
51
49
  var _last = _interopRequireDefault(require("lodash/last"));
52
50
  var _trimEnd = _interopRequireDefault(require("lodash/trimEnd"));
53
- var _constant2 = require("@blocklet/constant");
54
- var _urlEvaluation = require("@abtnode/util/lib/url-evaluation");
55
- var _checkAccessibleBrowser = _interopRequireDefault(require("@abtnode/util/lib/url-evaluation/check-accessible-browser"));
51
+ var _querystring = _interopRequireDefault(require("querystring"));
52
+ var _urlJoin = _interopRequireDefault(require("url-join"));
56
53
  var _axios = _interopRequireDefault(require("@abtnode/util/lib/axios"));
54
+ var _dayjs = _interopRequireDefault(require("@abtnode/util/lib/dayjs"));
55
+ var _formatError = _interopRequireDefault(require("@abtnode/util/lib/format-error"));
57
56
  var _normalizePathPrefix = _interopRequireDefault(require("@abtnode/util/lib/normalize-path-prefix"));
57
+ var _urlEvaluation = require("@abtnode/util/lib/url-evaluation");
58
+ var _checkAccessibleBrowser = _interopRequireDefault(require("@abtnode/util/lib/url-evaluation/check-accessible-browser"));
59
+ var _constant2 = require("@blocklet/constant");
58
60
  var _urlPathFriendly = _interopRequireDefault(require("@blocklet/meta/lib/url-path-friendly"));
59
- var _formatError = _interopRequireDefault(require("@abtnode/util/lib/format-error"));
60
- var _dayjs = _interopRequireDefault(require("@abtnode/util/lib/dayjs"));
61
61
  var _window$env;
62
62
  /* eslint-disable max-len */
63
63
  /* eslint-disable implicit-arrow-linebreak */
@@ -667,7 +667,7 @@ const isDidDomainOrIpEchoDomain = domain => {
667
667
  if (!domain) {
668
668
  return false;
669
669
  }
670
- return domain.endsWith(_constant.DEFAULT_DID_DOMAIN) || domain.endsWith(_constant.DEFAULT_IP_DOMAIN_SUFFIX);
670
+ return domain.endsWith(_constant.DEFAULT_DID_DOMAIN) || domain.endsWith(_constant.DEFAULT_IP_DOMAIN_SUFFIX) || domain.endsWith(_constant.DEFAULT_SLP_DOMAIN);
671
671
  };
672
672
  const sortDomains = domains => {
673
673
  return (domains || []).sort((x, y) => {
@@ -725,4 +725,6 @@ const nanoid = function nanoid() {
725
725
  let length = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 16;
726
726
  return [...Array(length)].map(() => Math.random().toString(36)[2]).join('');
727
727
  };
728
- exports.nanoid = nanoid;
728
+ exports.nanoid = nanoid;
729
+ const getSystemDomains = domains => domains.filter(x => x.isProtected);
730
+ exports.getSystemDomains = getSystemDomains;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abtnode/ux",
3
- "version": "1.16.15-beta-58d50c9a",
3
+ "version": "1.16.15-beta-e143b1cf",
4
4
  "description": "UX components shared across abtnode packages",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -27,9 +27,9 @@
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.15-beta-58d50c9a",
31
- "@abtnode/constant": "1.16.15-beta-58d50c9a",
32
- "@abtnode/util": "1.16.15-beta-58d50c9a",
30
+ "@abtnode/auth": "1.16.15-beta-e143b1cf",
31
+ "@abtnode/constant": "1.16.15-beta-e143b1cf",
32
+ "@abtnode/util": "1.16.15-beta-e143b1cf",
33
33
  "@ahooksjs/use-url-state": "^3.5.1",
34
34
  "@arcblock/did": "^1.18.89",
35
35
  "@arcblock/did-connect": "^2.7.9",
@@ -39,10 +39,10 @@
39
39
  "@arcblock/react-hooks": "^2.7.9",
40
40
  "@arcblock/terminal": "^2.7.9",
41
41
  "@arcblock/ux": "^2.7.9",
42
- "@blocklet/constant": "1.16.15-beta-58d50c9a",
42
+ "@blocklet/constant": "1.16.15-beta-e143b1cf",
43
43
  "@blocklet/launcher-layout": "2.1.101",
44
44
  "@blocklet/list": "^0.12.31",
45
- "@blocklet/meta": "1.16.15-beta-58d50c9a",
45
+ "@blocklet/meta": "1.16.15-beta-e143b1cf",
46
46
  "@blocklet/ui-react": "^2.7.9",
47
47
  "@emotion/react": "^11.10.4",
48
48
  "@emotion/styled": "^11.10.4",
@@ -98,7 +98,7 @@
98
98
  "babel-plugin-inline-react-svg": "^1.1.2",
99
99
  "glob": "^10.3.3"
100
100
  },
101
- "gitHead": "c54236c1daace6451db561fa6b3eea21ba07bb4d",
101
+ "gitHead": "86dcc908f3cb7259d1ca92b9ae75160a6e43509a",
102
102
  "exports": {
103
103
  ".": {
104
104
  "import": "./es/index.js",