@abtnode/ux 1.16.15 → 1.16.16-beta-d8a9fb09

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.
@@ -1,6 +1,6 @@
1
1
  import PropTypes from 'prop-types';
2
2
  import { useState } from 'react';
3
- import { isDidDomain, isSlpDomain } from '@abtnode/util/lib/url-evaluation';
3
+ import { isDidDomain } from '@abtnode/util/lib/url-evaluation';
4
4
  import { useLocaleContext } from '@arcblock/ux/lib/Locale/context';
5
5
  import AddIcon from '@mui/icons-material/CallMerge';
6
6
  import Spinner from '@mui/material/CircularProgress';
@@ -30,10 +30,7 @@ export default function AddDomainAlias({
30
30
  } = useNodeContext();
31
31
  const [loading, setLoading] = useState(false);
32
32
  const [confirmSetting, setConfirmSetting] = useState(null);
33
- let cnameDomain = systemDomains.find(item => isSlpDomain(item));
34
- if (!cnameDomain) {
35
- cnameDomain = systemDomains.find(item => isDidDomain(item));
36
- }
33
+ const cnameDomain = systemDomains.find(item => isDidDomain(item));
37
34
  const onCancel = () => {
38
35
  setLoading(false);
39
36
  setConfirmSetting(null);
@@ -37,7 +37,8 @@ export default function DNSTip({
37
37
  sx: {
38
38
  '&>div': {
39
39
  mb: 0
40
- }
40
+ },
41
+ marginTop: '8px'
41
42
  },
42
43
  children: [/*#__PURE__*/_jsx(Tip, {
43
44
  label: t('router.domain.setup.recordType'),
@@ -5,7 +5,8 @@ import { useLocaleContext } from '@arcblock/ux/lib/Locale/context';
5
5
  import { formatPrettyMsLocale, formatToDatetime } from './util';
6
6
  import { jsx as _jsx } from "react/jsx-runtime";
7
7
  export default function RelativeTime({
8
- value
8
+ value,
9
+ ...rest
9
10
  }) {
10
11
  const {
11
12
  t,
@@ -27,6 +28,7 @@ export default function RelativeTime({
27
28
  placement: "top-end",
28
29
  enterTouchDelay: 0,
29
30
  children: /*#__PURE__*/_jsx("span", {
31
+ ...rest,
30
32
  children: t('common.afterTime', {
31
33
  time
32
34
  })
@@ -39,6 +41,7 @@ export default function RelativeTime({
39
41
  placement: "top-end",
40
42
  enterTouchDelay: 0,
41
43
  children: /*#__PURE__*/_jsx("span", {
44
+ ...rest,
42
45
  children: t('common.timeAgo', {
43
46
  time
44
47
  })
@@ -41,10 +41,7 @@ function AddDomainAlias(_ref) {
41
41
  } = (0, _node.useNodeContext)();
42
42
  const [loading, setLoading] = (0, _react.useState)(false);
43
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
- }
44
+ const cnameDomain = systemDomains.find(item => (0, _urlEvaluation.isDidDomain)(item));
48
45
  const onCancel = () => {
49
46
  setLoading(false);
50
47
  setConfirmSetting(null);
@@ -52,7 +52,8 @@ function DNSTip(_ref) {
52
52
  sx: {
53
53
  '&>div': {
54
54
  mb: 0
55
- }
55
+ },
56
+ marginTop: '8px'
56
57
  },
57
58
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(Tip, {
58
59
  label: t('router.domain.setup.recordType'),
@@ -10,11 +10,20 @@ var _Tooltip = _interopRequireDefault(require("@mui/material/Tooltip"));
10
10
  var _context = require("@arcblock/ux/lib/Locale/context");
11
11
  var _util = require("./util");
12
12
  var _jsxRuntime = require("react/jsx-runtime");
13
+ const _excluded = ["value"];
13
14
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
+ 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; }
16
+ 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; }
17
+ 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; }
18
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
19
+ 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); }
20
+ 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; }
21
+ 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; }
14
22
  function RelativeTime(_ref) {
15
23
  let {
16
- value
17
- } = _ref;
24
+ value
25
+ } = _ref,
26
+ rest = _objectWithoutProperties(_ref, _excluded);
18
27
  const {
19
28
  t,
20
29
  locale
@@ -34,11 +43,11 @@ function RelativeTime(_ref) {
34
43
  title: (0, _util.formatToDatetime)(value, locale),
35
44
  placement: "top-end",
36
45
  enterTouchDelay: 0,
37
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
46
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", _objectSpread(_objectSpread({}, rest), {}, {
38
47
  children: t('common.afterTime', {
39
48
  time
40
49
  })
41
- })
50
+ }))
42
51
  });
43
52
  }
44
53
  const time = (0, _prettyMsI18n.default)(now - valTime, prettyOption);
@@ -46,11 +55,11 @@ function RelativeTime(_ref) {
46
55
  title: (0, _util.formatToDatetime)(value, locale),
47
56
  placement: "top-end",
48
57
  enterTouchDelay: 0,
49
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
58
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", _objectSpread(_objectSpread({}, rest), {}, {
50
59
  children: t('common.timeAgo', {
51
60
  time
52
61
  })
53
- })
62
+ }))
54
63
  });
55
64
  }
56
65
  RelativeTime.propTypes = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abtnode/ux",
3
- "version": "1.16.15",
3
+ "version": "1.16.16-beta-d8a9fb09",
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.15",
31
- "@abtnode/constant": "1.16.15",
32
- "@abtnode/util": "1.16.15",
30
+ "@abtnode/auth": "1.16.16-beta-d8a9fb09",
31
+ "@abtnode/constant": "1.16.16-beta-d8a9fb09",
32
+ "@abtnode/util": "1.16.16-beta-d8a9fb09",
33
33
  "@ahooksjs/use-url-state": "^3.5.1",
34
34
  "@arcblock/did": "^1.18.89",
35
- "@arcblock/did-connect": "^2.7.13",
35
+ "@arcblock/did-connect": "^2.7.15",
36
36
  "@arcblock/did-motif": "^1.1.13",
37
- "@arcblock/icons": "^2.7.13",
38
- "@arcblock/nft-display": "2.7.13",
39
- "@arcblock/react-hooks": "^2.7.13",
40
- "@arcblock/terminal": "^2.7.13",
41
- "@arcblock/ux": "^2.7.13",
42
- "@blocklet/constant": "1.16.15",
43
- "@blocklet/launcher-layout": "2.1.107",
37
+ "@arcblock/icons": "^2.7.15",
38
+ "@arcblock/nft-display": "2.7.15",
39
+ "@arcblock/react-hooks": "^2.7.15",
40
+ "@arcblock/terminal": "^2.7.15",
41
+ "@arcblock/ux": "^2.7.15",
42
+ "@blocklet/constant": "1.16.16-beta-d8a9fb09",
43
+ "@blocklet/launcher-layout": "2.2.5",
44
44
  "@blocklet/list": "^0.12.34",
45
- "@blocklet/meta": "1.16.15",
46
- "@blocklet/ui-react": "^2.7.13",
45
+ "@blocklet/meta": "1.16.16-beta-d8a9fb09",
46
+ "@blocklet/ui-react": "^2.7.15",
47
47
  "@emotion/react": "^11.10.4",
48
48
  "@emotion/styled": "^11.10.4",
49
49
  "@iconify/react": "^4.0.0",
@@ -98,7 +98,7 @@
98
98
  "babel-plugin-inline-react-svg": "^1.1.2",
99
99
  "glob": "^10.3.3"
100
100
  },
101
- "gitHead": "643adb67bfc0b33f4db0be1b75000324c8e5a248",
101
+ "gitHead": "a03d8972fd0fafe810369efa89b03ccd0647dce5",
102
102
  "exports": {
103
103
  ".": {
104
104
  "import": "./es/index.js",