@arcblock/ux 2.9.13 → 2.9.14
Sign up to get free protection for your applications and to get access to all the features.
- package/es/Address/did-address.js +18 -13
- package/es/Colors/themes/default.js +0 -1
- package/es/Colors/themes/temp.js +10 -1
- package/es/ContactForm/index.js +2 -2
- package/es/DID/index.js +0 -1
- package/es/Dialog/confirm.js +1 -99
- package/es/Dialog/dialog.js +4 -7
- package/es/Dialog/index.js +1 -1
- package/es/Dialog/use-confirm.js +105 -0
- package/es/Locale/util.js +10 -5
- package/es/NFTDisplay/index.js +0 -1
- package/es/Passport/index.js +2 -0
- package/es/Passport/passport.js +103 -0
- package/es/SessionUser/components/logged-in.js +1 -1
- package/es/SessionUser/components/user-info.js +1 -1
- package/es/SessionUser/index.js +2 -2
- package/es/Tabs/index.js +88 -2
- package/es/Util/passport.js +62 -0
- package/lib/ActionButton/index.js +6 -7
- package/lib/ActivityIndicator/index.js +4 -4
- package/lib/Address/compact-text.js +6 -6
- package/lib/Address/did-address.js +25 -21
- package/lib/Address/index.js +4 -4
- package/lib/Address/responsive-did-address.js +4 -4
- package/lib/Alert/index.js +5 -6
- package/lib/AnimationWaiter/index.js +4 -4
- package/lib/Async/index.js +6 -6
- package/lib/Avatar/did-motif.js +5 -6
- package/lib/Avatar/etherscan-blockies.js +2 -3
- package/lib/Avatar/index.js +4 -4
- package/lib/Badge/index.js +5 -6
- package/lib/Blocklet/blocklet.js +4 -4
- package/lib/Blocklet/index.js +3 -4
- package/lib/Blocklet/utils.js +3 -5
- package/lib/BlockletContext/index.js +1 -2
- package/lib/BlockletNFT/index.js +4 -4
- package/lib/Button/index.js +1 -2
- package/lib/Button/wrap.js +4 -4
- package/lib/ButtonGroup/index.js +1 -2
- package/lib/ClickToCopy/copy-button.js +4 -4
- package/lib/ClickToCopy/index.js +6 -6
- package/lib/CodeBlock/LightBox.js +1 -2
- package/lib/CodeBlock/index.js +4 -4
- package/lib/Colors/themes/default.js +1 -2
- package/lib/Colors/themes/temp.js +11 -3
- package/lib/ContactForm/index.js +2 -2
- package/lib/CookieConsent/index.js +6 -6
- package/lib/CountDown/index.js +4 -4
- package/lib/DID/index.js +7 -9
- package/lib/Datatable/CustomToolbar.js +2 -2
- package/lib/Datatable/index.js +49 -49
- package/lib/Datatable/utils.js +2 -3
- package/lib/Dialog/confirm.js +5 -113
- package/lib/Dialog/dialog.js +14 -18
- package/lib/Dialog/index.js +3 -4
- package/lib/Dialog/use-confirm.js +126 -0
- package/lib/Earth/index.js +7 -8
- package/lib/Empty/index.js +5 -6
- package/lib/Header/auto-hidden.js +5 -6
- package/lib/Header/header.js +5 -6
- package/lib/Header/responsive-header.js +5 -6
- package/lib/Icon/image.js +4 -4
- package/lib/Icon/index.js +6 -7
- package/lib/Img/index.js +5 -6
- package/lib/InfoRow/index.js +5 -6
- package/lib/Layout/dashboard/external-link.js +4 -4
- package/lib/Layout/dashboard/full-page.js +5 -6
- package/lib/Layout/dashboard/index.js +4 -4
- package/lib/Layout/dashboard/sidebar.js +5 -6
- package/lib/Layout/dashboard-legacy/header.js +4 -4
- package/lib/Layout/dashboard-legacy/index.js +4 -4
- package/lib/Layout/dashboard-legacy/sidebar.js +4 -4
- package/lib/Layout/index.js +4 -4
- package/lib/Locale/browser-lang.js +1 -2
- package/lib/Locale/context.js +6 -8
- package/lib/Locale/languages.js +7 -9
- package/lib/Locale/selector.js +4 -4
- package/lib/Locale/util.js +12 -11
- package/lib/Logo/index.js +4 -4
- package/lib/NFTDisplay/aspect-ratio-container.js +5 -6
- package/lib/NFTDisplay/broken.js +4 -4
- package/lib/NFTDisplay/index.js +5 -7
- package/lib/NFTDisplay/svg-embedder/img.js +5 -6
- package/lib/NFTDisplay/svg-embedder/inline-svg.js +5 -6
- package/lib/NavMenu/nav-menu.js +5 -6
- package/lib/NavMenu/style.js +2 -4
- package/lib/PageScroller/index.js +6 -7
- package/lib/Passport/index.js +9 -0
- package/lib/Passport/passport.js +116 -0
- package/lib/PoweredByArcBlock/index.js +4 -4
- package/lib/PricingTable/PricingPlan.js +1 -2
- package/lib/PricingTable/index.js +1 -2
- package/lib/QRCode/index.js +5 -6
- package/lib/RelativeTime/index.js +4 -4
- package/lib/Result/common.js +4 -4
- package/lib/Result/index.js +7 -8
- package/lib/Result/result.js +5 -6
- package/lib/Result/translations.js +2 -3
- package/lib/Screenshot/BaseScreenshot/index.js +5 -6
- package/lib/Screenshot/BaseScreenshot/shells/Macbook.js +10 -15
- package/lib/Screenshot/BaseScreenshot/shells/Phone.js +10 -15
- package/lib/Screenshot/index.js +5 -6
- package/lib/SessionBlocklet/index.js +4 -4
- package/lib/SessionManager/index.js +1 -2
- package/lib/SessionUser/components/logged-in.js +5 -5
- package/lib/SessionUser/components/session-user-item.js +5 -6
- package/lib/SessionUser/components/session-user-switch.js +4 -4
- package/lib/SessionUser/components/user-info.js +1 -1
- package/lib/SessionUser/index.js +2 -2
- package/lib/SessionUser/libs/translation.js +2 -3
- package/lib/Spinner/index.js +13 -14
- package/lib/SplitButton/index.js +4 -4
- package/lib/Switch/index.js +5 -6
- package/lib/Tabs/index.js +98 -11
- package/lib/Tag/index.js +5 -6
- package/lib/TextCollapse/index.js +5 -6
- package/lib/Theme/index.js +6 -7
- package/lib/Theme/theme.js +6 -8
- package/lib/Toast/index.js +12 -13
- package/lib/Typography/index.js +4 -4
- package/lib/Util/constant.js +10 -20
- package/lib/Util/deprecate.js +4 -4
- package/lib/Util/index.js +2 -4
- package/lib/Util/passport.js +72 -0
- package/lib/Util/wallet.js +1 -2
- package/lib/Video/index.js +4 -4
- package/lib/Wallet/Action.js +4 -4
- package/lib/Wallet/Download.js +4 -4
- package/lib/WebWalletSWKeeper/index.js +5 -6
- package/lib/withTheme/index.js +5 -6
- package/lib/withTracker/error_boundary.js +2 -2
- package/lib/withTracker/index.js +8 -9
- package/package.json +9 -4
- package/src/Address/did-address.jsx +15 -12
- package/src/Colors/themes/temp.js +9 -0
- package/src/Dialog/confirm.jsx +94 -0
- package/src/Dialog/{dialog.js → dialog.jsx} +14 -7
- package/src/Dialog/index.js +1 -1
- package/src/Dialog/use-confirm.jsx +114 -0
- package/src/Locale/util.js +12 -5
- package/src/Passport/index.jsx +3 -0
- package/src/Passport/passport.jsx +99 -0
- package/src/SessionUser/components/logged-in.jsx +1 -1
- package/src/SessionUser/components/user-info.jsx +1 -1
- package/src/SessionUser/index.jsx +1 -1
- package/src/Tabs/index.jsx +124 -0
- package/src/Util/passport.js +75 -0
- package/src/Dialog/confirm.js +0 -201
- package/src/Tabs/index.js +0 -45
@@ -13,11 +13,11 @@ var _templateObject;
|
|
13
13
|
const _excluded = ["children", "startChars", "endChars", "scaleFactor", "maxWidth", "style", "fontType"];
|
14
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
15
15
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
16
|
-
function ownKeys(
|
17
|
-
function _objectSpread(
|
16
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
17
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
18
18
|
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; }
|
19
|
-
function _toPropertyKey(
|
20
|
-
function _toPrimitive(
|
19
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
20
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
21
21
|
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; }
|
22
22
|
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; }
|
23
23
|
function TextCollapse(_ref) {
|
@@ -79,8 +79,7 @@ TextCollapse.defaultProps = {
|
|
79
79
|
scaleFactor: 0.45,
|
80
80
|
fontType: 'normal'
|
81
81
|
};
|
82
|
-
var _default = (0, _deprecate.withDeprecated)(TextCollapse, {
|
82
|
+
var _default = exports.default = (0, _deprecate.withDeprecated)(TextCollapse, {
|
83
83
|
name: 'TextCollapse'
|
84
84
|
});
|
85
|
-
exports.default = _default;
|
86
85
|
const Container = (0, _Theme.styled)(_Typography.default)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: inline-flex;\n align-items: center;\n justify-content: start;\n cursor: pointer;\n white-space: nowrap;\n overflow: hidden;\n\n .start-part,\n .end-part {\n display: inline-block;\n vertical-align: bottom;\n white-space: nowrap;\n overflow: hidden;\n }\n .start-part {\n max-width: calc(100% - ", ");\n min-width: ", ";\n text-overflow: ellipsis;\n }\n .end-part {\n max-width: calc(100% - ", ");\n direction: rtl;\n }\n"])), props => props.endwidth, props => props.startwidth, props => props.startwidth);
|
package/lib/Theme/index.js
CHANGED
@@ -36,13 +36,13 @@ Object.keys(_theme).forEach(function (key) {
|
|
36
36
|
});
|
37
37
|
var _themeProvider = _interopRequireDefault(require("./theme-provider"));
|
38
38
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
39
|
-
function ownKeys(
|
40
|
-
function _objectSpread(
|
39
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
40
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
41
41
|
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; }
|
42
|
-
function _toPropertyKey(
|
43
|
-
function _toPrimitive(
|
42
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
43
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
44
44
|
const isTransientProp = prop => prop.startsWith('$');
|
45
|
-
const styled = function styled(component) {
|
45
|
+
const styled = exports.styled = function styled(component) {
|
46
46
|
let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
47
47
|
return (0, _styles.styled)(component, _objectSpread(_objectSpread({}, options), {}, {
|
48
48
|
shouldForwardProp: prop => {
|
@@ -52,5 +52,4 @@ const styled = function styled(component) {
|
|
52
52
|
return !isTransientProp(prop);
|
53
53
|
}
|
54
54
|
}));
|
55
|
-
};
|
56
|
-
exports.styled = styled;
|
55
|
+
};
|
package/lib/Theme/theme.js
CHANGED
@@ -10,11 +10,11 @@ require("@fontsource/lato/700.css");
|
|
10
10
|
var _Colors = _interopRequireDefault(require("../Colors"));
|
11
11
|
const _excluded = ["mode", "pageWidth", "palette", "typography", "overrides"]; // https://app.zeplin.io/styleguide/5d1436f1e97c2156f49c0725/colors
|
12
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
13
|
-
function ownKeys(
|
14
|
-
function _objectSpread(
|
13
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
14
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
15
15
|
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; }
|
16
|
-
function _toPropertyKey(
|
17
|
-
function _toPrimitive(
|
16
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
17
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
18
18
|
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; }
|
19
19
|
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; }
|
20
20
|
const muiDarkTheme = (0, _styles.createTheme)({
|
@@ -25,7 +25,7 @@ const muiDarkTheme = (0, _styles.createTheme)({
|
|
25
25
|
|
26
26
|
// https://material-ui.com/customization/default-theme/
|
27
27
|
// eslint-disable-next-line import/prefer-default-export
|
28
|
-
const create = function create() {
|
28
|
+
const create = exports.create = function create() {
|
29
29
|
let _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
30
30
|
{
|
31
31
|
mode = 'light',
|
@@ -142,6 +142,4 @@ const create = function create() {
|
|
142
142
|
});
|
143
143
|
return enhanced;
|
144
144
|
};
|
145
|
-
exports.
|
146
|
-
const createTheme = create;
|
147
|
-
exports.createTheme = createTheme;
|
145
|
+
const createTheme = exports.createTheme = create;
|
package/lib/Toast/index.js
CHANGED
@@ -12,17 +12,17 @@ var _Close = _interopRequireDefault(require("@mui/icons-material/Close"));
|
|
12
12
|
var _noop = _interopRequireDefault(require("lodash/noop"));
|
13
13
|
var _jsxRuntime = require("react/jsx-runtime");
|
14
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
15
|
-
function ownKeys(
|
16
|
-
function _objectSpread(
|
15
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
16
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
17
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(
|
19
|
-
function _toPrimitive(
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
18
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
19
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
|
20
|
+
*
|
21
|
+
* @typedef {(message: import('notistack').SnackbarMessage, options?: import('notistack').OptionsObject, ...args: any[]) => import('notistack').SnackbarKey} EnqueueSnackbarFunc
|
22
|
+
*
|
23
|
+
*/ /**
|
24
|
+
* @type {import('notistack').ProviderContext['enqueueSnackbar']}
|
25
|
+
*/
|
26
26
|
let _success = _noop.default;
|
27
27
|
let _error = _noop.default;
|
28
28
|
let _warning = _noop.default;
|
@@ -83,7 +83,7 @@ function Toast() {
|
|
83
83
|
_info = genFn(enqueueSnackbar, 'info');
|
84
84
|
return null;
|
85
85
|
}
|
86
|
-
var _default = {
|
86
|
+
var _default = exports.default = {
|
87
87
|
/**
|
88
88
|
* @type {EnqueueSnackbarFunc}
|
89
89
|
*/
|
@@ -126,5 +126,4 @@ var _default = {
|
|
126
126
|
}
|
127
127
|
return _info(message, options, ...args);
|
128
128
|
}
|
129
|
-
};
|
130
|
-
exports.default = _default;
|
129
|
+
};
|
package/lib/Typography/index.js
CHANGED
@@ -11,11 +11,11 @@ var _react = require("react");
|
|
11
11
|
var _jsxRuntime = require("react/jsx-runtime");
|
12
12
|
const _excluded = ["minFontSize", "fontSize", "children", "sx"];
|
13
13
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
14
|
-
function ownKeys(
|
15
|
-
function _objectSpread(
|
14
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
15
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
16
16
|
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; }
|
17
|
-
function _toPropertyKey(
|
18
|
-
function _toPrimitive(
|
17
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
18
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
19
19
|
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; }
|
20
20
|
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; }
|
21
21
|
function Typography(_ref) {
|
package/lib/Util/constant.js
CHANGED
@@ -4,23 +4,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
5
5
|
});
|
6
6
|
exports.SESSION_TOKEN_STORAGE_KEY = exports.RELAY_SOCKET_PREFIX = exports.REFRESH_TOKEN_STORAGE_KEY = exports.PROFILE_URL = exports.NAVIGATION_URL = exports.DEFAULT_WINDOW_TIMEOUT = exports.DEFAULT_TIMEOUT = exports.DASHBOARD_URL = exports.AUTH_SERVICE_PREFIX = exports.API_DID_PREFIX = void 0;
|
7
|
-
const DEFAULT_TIMEOUT = 5 * 60;
|
8
|
-
exports.
|
9
|
-
const
|
10
|
-
exports.
|
11
|
-
const
|
12
|
-
exports.
|
13
|
-
const
|
14
|
-
exports.
|
15
|
-
const
|
16
|
-
exports.
|
17
|
-
const RELAY_SOCKET_PREFIX = '/.well-known/service';
|
18
|
-
exports.RELAY_SOCKET_PREFIX = RELAY_SOCKET_PREFIX;
|
19
|
-
const API_DID_PREFIX = '/api/did';
|
20
|
-
exports.API_DID_PREFIX = API_DID_PREFIX;
|
21
|
-
const DASHBOARD_URL = "".concat(AUTH_SERVICE_PREFIX, "/admin");
|
22
|
-
exports.DASHBOARD_URL = DASHBOARD_URL;
|
23
|
-
const PROFILE_URL = "".concat(AUTH_SERVICE_PREFIX, "/user");
|
24
|
-
exports.PROFILE_URL = PROFILE_URL;
|
25
|
-
const NAVIGATION_URL = "".concat(AUTH_SERVICE_PREFIX, "/admin/navigation");
|
26
|
-
exports.NAVIGATION_URL = NAVIGATION_URL;
|
7
|
+
const DEFAULT_TIMEOUT = exports.DEFAULT_TIMEOUT = 5 * 60;
|
8
|
+
const DEFAULT_WINDOW_TIMEOUT = exports.DEFAULT_WINDOW_TIMEOUT = 30 * 60;
|
9
|
+
const AUTH_SERVICE_PREFIX = exports.AUTH_SERVICE_PREFIX = '/.well-known/service';
|
10
|
+
const SESSION_TOKEN_STORAGE_KEY = exports.SESSION_TOKEN_STORAGE_KEY = 'login_token';
|
11
|
+
const REFRESH_TOKEN_STORAGE_KEY = exports.REFRESH_TOKEN_STORAGE_KEY = 'refresh_token';
|
12
|
+
const RELAY_SOCKET_PREFIX = exports.RELAY_SOCKET_PREFIX = '/.well-known/service';
|
13
|
+
const API_DID_PREFIX = exports.API_DID_PREFIX = '/api/did';
|
14
|
+
const DASHBOARD_URL = exports.DASHBOARD_URL = "".concat(AUTH_SERVICE_PREFIX, "/admin");
|
15
|
+
const PROFILE_URL = exports.PROFILE_URL = "".concat(AUTH_SERVICE_PREFIX, "/user");
|
16
|
+
const NAVIGATION_URL = exports.NAVIGATION_URL = "".concat(AUTH_SERVICE_PREFIX, "/admin/navigation");
|
package/lib/Util/deprecate.js
CHANGED
@@ -6,11 +6,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
exports.withDeprecated = exports.warn = void 0;
|
7
7
|
var _react = require("react");
|
8
8
|
var _jsxRuntime = require("react/jsx-runtime");
|
9
|
-
function ownKeys(
|
10
|
-
function _objectSpread(
|
9
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
10
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
11
11
|
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; }
|
12
|
-
function _toPropertyKey(
|
13
|
-
function _toPrimitive(
|
12
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
13
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
14
14
|
const warn = (name, alternative) => {
|
15
15
|
var _console;
|
16
16
|
if (process.env.NODE_ENV === 'production') {
|
package/lib/Util/index.js
CHANGED
@@ -327,7 +327,7 @@ const appendParams = (url, params) => {
|
|
327
327
|
}
|
328
328
|
};
|
329
329
|
exports.appendParams = appendParams;
|
330
|
-
const getUserAvatar = function getUserAvatar(avatar) {
|
330
|
+
const getUserAvatar = exports.getUserAvatar = function getUserAvatar(avatar) {
|
331
331
|
let size = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 48;
|
332
332
|
if (!avatar) {
|
333
333
|
return avatar;
|
@@ -341,8 +341,7 @@ const getUserAvatar = function getUserAvatar(avatar) {
|
|
341
341
|
}
|
342
342
|
return avatar;
|
343
343
|
};
|
344
|
-
exports.
|
345
|
-
const sleep = function sleep() {
|
344
|
+
const sleep = exports.sleep = function sleep() {
|
346
345
|
let time = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
|
347
346
|
return new Promise(resolve => {
|
348
347
|
setTimeout(() => {
|
@@ -350,7 +349,6 @@ const sleep = function sleep() {
|
|
350
349
|
}, time);
|
351
350
|
});
|
352
351
|
};
|
353
|
-
exports.sleep = sleep;
|
354
352
|
const isUrl = str => {
|
355
353
|
return /^https?:\/\//.test(str);
|
356
354
|
};
|
@@ -0,0 +1,72 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.getTextColor = exports.getPassportColor = exports.createPassportSvg = void 0;
|
7
|
+
var _nftDisplay = require("@arcblock/nft-display");
|
8
|
+
const getPassportColor = (preferredColor, did) => {
|
9
|
+
let color;
|
10
|
+
if (preferredColor === 'default') {
|
11
|
+
color = _nftDisplay.DEFAULT_COLORS['app-passport'];
|
12
|
+
} else if (preferredColor === 'auto') {
|
13
|
+
color = (0, _nftDisplay.getNftBGColorFromDid)(did);
|
14
|
+
} else {
|
15
|
+
color = (0, _nftDisplay.getNftBGColor)(preferredColor);
|
16
|
+
}
|
17
|
+
return color;
|
18
|
+
};
|
19
|
+
exports.getPassportColor = getPassportColor;
|
20
|
+
const getTextColor = background => {
|
21
|
+
const r = parseInt(background.slice(1, 3), 16);
|
22
|
+
const g = parseInt(background.slice(3, 5), 16);
|
23
|
+
const b = parseInt(background.slice(5, 7), 16);
|
24
|
+
const luminance = (0.299 * r + 0.587 * g + 0.114 * b) / 255;
|
25
|
+
return luminance > 0.5 ? '#111' : '#EEE';
|
26
|
+
};
|
27
|
+
exports.getTextColor = getTextColor;
|
28
|
+
const createPassportSvg = _ref => {
|
29
|
+
let {
|
30
|
+
issuer = '',
|
31
|
+
title = '',
|
32
|
+
issuerDid = '',
|
33
|
+
issuerAvatarUrl = '',
|
34
|
+
ownerDid = '',
|
35
|
+
ownerName = '',
|
36
|
+
ownerAvatarUrl = '',
|
37
|
+
preferredColor = 'default',
|
38
|
+
revoked = false,
|
39
|
+
isDataUrl = false,
|
40
|
+
width = '100%',
|
41
|
+
height = '100%'
|
42
|
+
} = _ref;
|
43
|
+
const color = getPassportColor(preferredColor, issuerDid);
|
44
|
+
const svgXML = (0, _nftDisplay.getSvg)({
|
45
|
+
width,
|
46
|
+
height,
|
47
|
+
tag: revoked ? 'revoked' : '',
|
48
|
+
tagVariant: revoked ? 'error' : 'info',
|
49
|
+
color,
|
50
|
+
did: ownerDid,
|
51
|
+
variant: 'app-passport' || ownerName,
|
52
|
+
verifiable: true,
|
53
|
+
issuer: {
|
54
|
+
name: issuer,
|
55
|
+
icon: issuerAvatarUrl
|
56
|
+
},
|
57
|
+
header: {
|
58
|
+
name: title,
|
59
|
+
icon: ownerAvatarUrl
|
60
|
+
},
|
61
|
+
// FIXME: @wangshijun this should be dynamic
|
62
|
+
extra: {
|
63
|
+
key: 'Exp',
|
64
|
+
value: '2123-01-01'
|
65
|
+
}
|
66
|
+
});
|
67
|
+
if (isDataUrl) {
|
68
|
+
return "data:image/svg+xml;utf8,".concat(encodeURIComponent(svgXML));
|
69
|
+
}
|
70
|
+
return svgXML;
|
71
|
+
};
|
72
|
+
exports.createPassportSvg = createPassportSvg;
|
package/lib/Util/wallet.js
CHANGED
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
});
|
6
6
|
exports.providerName = exports.getWebWalletUrl = exports.checkSameProtocol = void 0;
|
7
7
|
/* eslint-disable import/prefer-default-export */
|
8
|
-
const providerName = 'wallet_url';
|
8
|
+
const providerName = exports.providerName = 'wallet_url';
|
9
9
|
|
10
10
|
/**
|
11
11
|
* 获取 web wallet url, 常用于为 did connect 组件传递 webWalletUrl 参数,
|
@@ -19,7 +19,6 @@ const providerName = 'wallet_url';
|
|
19
19
|
* - window.blocklet.webWalletUrl
|
20
20
|
* - production web wallet url
|
21
21
|
*/
|
22
|
-
exports.providerName = providerName;
|
23
22
|
const getWebWalletUrl = () => {
|
24
23
|
var _window$env, _window$blocklet;
|
25
24
|
return window.localStorage.getItem(providerName) || ((_window$env = window.env) === null || _window$env === void 0 ? void 0 : _window$env.webWalletUrl) || ((_window$blocklet = window.blocklet) === null || _window$blocklet === void 0 ? void 0 : _window$blocklet.webWalletUrl) || 'https://web.abtwallet.io/';
|
package/lib/Video/index.js
CHANGED
@@ -14,11 +14,11 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
14
14
|
var _templateObject;
|
15
15
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
16
16
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
17
|
-
function ownKeys(
|
18
|
-
function _objectSpread(
|
17
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
18
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
19
19
|
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; }
|
20
|
-
function _toPropertyKey(
|
21
|
-
function _toPrimitive(
|
20
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
21
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
22
22
|
const {
|
23
23
|
string,
|
24
24
|
number,
|
package/lib/Wallet/Action.js
CHANGED
@@ -16,11 +16,11 @@ var _templateObject;
|
|
16
16
|
const _excluded = ["action", "size", "textLayout", "style"];
|
17
17
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
18
18
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
19
|
-
function ownKeys(
|
20
|
-
function _objectSpread(
|
19
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
20
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
21
21
|
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; }
|
22
|
-
function _toPropertyKey(
|
23
|
-
function _toPrimitive(
|
22
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
23
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
24
24
|
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; }
|
25
25
|
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; }
|
26
26
|
function WalletAction(props) {
|
package/lib/Wallet/Download.js
CHANGED
@@ -16,11 +16,11 @@ var _templateObject;
|
|
16
16
|
const _excluded = ["title", "children", "iosLink", "androidLink", "androidDownLoadUrl", "locale"];
|
17
17
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
18
18
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
19
|
-
function ownKeys(
|
20
|
-
function _objectSpread(
|
19
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
20
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
21
21
|
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; }
|
22
|
-
function _toPropertyKey(
|
23
|
-
function _toPrimitive(
|
22
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
23
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
24
24
|
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; }
|
25
25
|
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; }
|
26
26
|
var AppStoreIcon = function AppStoreIcon(props) {
|
@@ -14,11 +14,11 @@ var _wallet = require("../Util/wallet");
|
|
14
14
|
var _jsxRuntime = require("react/jsx-runtime");
|
15
15
|
const _excluded = ["webWalletUrl", "maxIdleTime"]; // 默认最大空闲时间: 30min
|
16
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
17
|
-
function ownKeys(
|
18
|
-
function _objectSpread(
|
17
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
18
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
19
19
|
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; }
|
20
|
-
function _toPropertyKey(
|
21
|
-
function _toPrimitive(
|
20
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
21
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
22
22
|
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; }
|
23
23
|
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; }
|
24
24
|
const DEFAULT_MAX_IDLE_TIME = 1000 * 60 * 30;
|
@@ -94,8 +94,7 @@ WebWalletSWKeeper.propTypes = {
|
|
94
94
|
WebWalletSWKeeper.defaultProps = {
|
95
95
|
maxIdleTime: DEFAULT_MAX_IDLE_TIME
|
96
96
|
};
|
97
|
-
var _default = WebWalletSWKeeper;
|
98
|
-
exports.default = _default;
|
97
|
+
var _default = exports.default = WebWalletSWKeeper;
|
99
98
|
const withWebWalletSWKeeper = Component => {
|
100
99
|
// eslint-disable-next-line react/prop-types
|
101
100
|
return function WithWebWalletSWKeeperComponent(_ref2) {
|
package/lib/withTheme/index.js
CHANGED
@@ -11,11 +11,11 @@ var _Theme = require("../Theme");
|
|
11
11
|
var _jsxRuntime = require("react/jsx-runtime");
|
12
12
|
var _templateObject;
|
13
13
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
14
|
-
function ownKeys(
|
15
|
-
function _objectSpread(
|
14
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
15
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
16
16
|
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; }
|
17
|
-
function _toPropertyKey(
|
18
|
-
function _toPrimitive(
|
17
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
18
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
19
19
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
20
20
|
function withTheme(Component) {
|
21
21
|
let {
|
@@ -46,5 +46,4 @@ function withTheme(Component) {
|
|
46
46
|
});
|
47
47
|
};
|
48
48
|
}
|
49
|
-
var _default = withTheme;
|
50
|
-
exports.default = _default;
|
49
|
+
var _default = exports.default = withTheme;
|
@@ -9,8 +9,8 @@ var Sentry = _interopRequireWildcard(require("@sentry/browser"));
|
|
9
9
|
var _Alert = _interopRequireDefault(require("../Alert"));
|
10
10
|
var _jsxRuntime = require("react/jsx-runtime");
|
11
11
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
12
|
-
function _getRequireWildcardCache(
|
13
|
-
function _interopRequireWildcard(
|
12
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
13
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
14
14
|
/* eslint-disable import/no-unresolved */
|
15
15
|
|
16
16
|
class ErrorBoundary extends _react.Component {
|
package/lib/withTracker/index.js
CHANGED
@@ -10,15 +10,15 @@ var _ahooks = require("ahooks");
|
|
10
10
|
var _reactRouterDom = require("react-router-dom");
|
11
11
|
var _error_boundary = _interopRequireDefault(require("./error_boundary"));
|
12
12
|
var _jsxRuntime = require("react/jsx-runtime");
|
13
|
-
function _getRequireWildcardCache(
|
14
|
-
function _interopRequireWildcard(
|
13
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
14
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
15
15
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
16
|
-
function ownKeys(
|
17
|
-
function _objectSpread(
|
16
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
17
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
18
18
|
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; }
|
19
|
-
function _toPropertyKey(
|
20
|
-
function _toPrimitive(
|
21
|
-
var _default = function _default(WrappedComponent) {
|
19
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
20
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /* eslint-disable import/no-unresolved */
|
21
|
+
var _default = exports.default = function _default(WrappedComponent) {
|
22
22
|
let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
23
23
|
const {
|
24
24
|
appVersion,
|
@@ -61,5 +61,4 @@ var _default = function _default(WrappedComponent) {
|
|
61
61
|
}
|
62
62
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(WrappedComponent, _objectSpread({}, props));
|
63
63
|
};
|
64
|
-
};
|
65
|
-
exports.default = _default;
|
64
|
+
};
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@arcblock/ux",
|
3
|
-
"version": "2.9.
|
3
|
+
"version": "2.9.14",
|
4
4
|
"description": "Common used react components for arcblock products",
|
5
5
|
"keywords": [
|
6
6
|
"react",
|
@@ -215,6 +215,10 @@
|
|
215
215
|
"import": "./es/PageScroller/index.js",
|
216
216
|
"require": "./lib/PageScroller/index.js"
|
217
217
|
},
|
218
|
+
"./lib/Passport": {
|
219
|
+
"import": "./es/Passport/index.js",
|
220
|
+
"require": "./lib/Passport/index.js"
|
221
|
+
},
|
218
222
|
"./lib/PoweredByArcBlock": {
|
219
223
|
"import": "./es/PoweredByArcBlock/index.js",
|
220
224
|
"require": "./lib/PoweredByArcBlock/index.js"
|
@@ -340,11 +344,12 @@
|
|
340
344
|
"peerDependencies": {
|
341
345
|
"react": ">=18.1.0"
|
342
346
|
},
|
343
|
-
"gitHead": "
|
347
|
+
"gitHead": "7570827021dde66a0099a84256dfceaec07fd6b3",
|
344
348
|
"dependencies": {
|
345
349
|
"@arcblock/did-motif": "^1.1.13",
|
346
|
-
"@arcblock/icons": "^2.9.
|
347
|
-
"@arcblock/
|
350
|
+
"@arcblock/icons": "^2.9.14",
|
351
|
+
"@arcblock/nft-display": "^2.9.14",
|
352
|
+
"@arcblock/react-hooks": "^2.9.14",
|
348
353
|
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
|
349
354
|
"@emotion/react": "^11.10.4",
|
350
355
|
"@emotion/styled": "^11.10.4",
|