@arcblock/ux 0.78.26 → 1.6.60
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/LICENSE +1 -1
- package/README.md +0 -56
- package/lib/ActionButton/index.js +6 -4
- package/lib/ActivityIndicator/index.js +75 -23
- package/lib/Alert/index.js +15 -11
- package/lib/Async/index.js +1 -1
- package/lib/Badge/index.js +17 -15
- package/lib/Blocklet/index.js +261 -0
- package/lib/Button/wrap.js +96 -43
- package/lib/ButtonGroup/index.js +3 -16
- package/lib/Center/index.js +30 -4
- package/lib/ClickToCopy/index.js +10 -8
- package/lib/CodeBlock/index.js +40 -13
- package/lib/Colors/index.js +15 -0
- package/lib/Colors/themes/default.js +85 -0
- package/lib/ContactForm/index.js +9 -10
- package/lib/CookieConsent/index.js +98 -0
- package/lib/CountDown/index.js +18 -14
- package/lib/Dialog/confirm.js +84 -0
- package/lib/Dialog/dialog.js +137 -0
- package/lib/Dialog/index.js +23 -0
- package/lib/Earth/index.js +33 -33
- package/lib/Empty/index.js +61 -0
- package/lib/Footer/index.js +16 -18
- package/lib/Icon/image.js +10 -13
- package/lib/Icon/index.js +10 -8
- package/lib/Img/index.js +212 -0
- package/lib/InfoRow/index.js +7 -6
- package/lib/Layout/dashboard/header.js +60 -42
- package/lib/Layout/dashboard/index.js +72 -60
- package/lib/Layout/dashboard/sidebar.js +41 -25
- package/lib/Layout/index.js +113 -51
- package/lib/Locale/browser-lang.js +0 -2
- package/lib/Locale/context.js +85 -61
- package/lib/Locale/selector.js +33 -20
- package/lib/Logo/index.js +15 -13
- package/lib/Metric/index.js +5 -6
- package/lib/NFTDisplay/README.md +59 -0
- package/lib/NFTDisplay/aspect-ratio-container.js +52 -0
- package/lib/NFTDisplay/broken.js +25 -0
- package/lib/NFTDisplay/index.js +317 -0
- package/lib/NFTDisplay/loading.js +23 -0
- package/lib/NFTDisplay/svg-embedder/img.js +68 -0
- package/lib/NFTDisplay/svg-embedder/inline-svg.js +54 -0
- package/lib/PageScroller/index.js +10 -11
- package/lib/PageScroller/usePrevValue.js +2 -2
- package/lib/PricingTable/PricingPlan.js +12 -15
- package/lib/PricingTable/index.js +5 -5
- package/lib/QRCode/index.js +89 -0
- package/lib/Result/common.js +176 -0
- package/lib/Result/index.js +61 -0
- package/lib/Result/result.js +69 -0
- package/lib/Result/translations.js +61 -0
- package/lib/Screenshot/index.js +14 -13
- package/lib/Spinner/index.js +37 -0
- package/lib/SplitButton/index.js +126 -0
- package/lib/Switch/index.js +107 -0
- package/lib/Tabs/index.js +24 -47
- package/lib/Tag/index.js +15 -13
- package/lib/Terminal/Player.js +43 -45
- package/lib/Terminal/index.js +3 -1
- package/lib/Terminal/util.js +2 -3
- package/lib/TextCollapse/index.js +21 -14
- package/lib/Theme/index.js +79 -63
- package/lib/Theme/responsiveFontSizes.js +8 -8
- package/lib/Toast/index.js +12 -11
- package/lib/Util/index.js +197 -26
- package/lib/Video/index.js +8 -11
- package/lib/Wallet/Action.js +15 -13
- package/lib/Wallet/Download.js +60 -58
- package/lib/Wallet/Open.js +2 -2
- package/lib/WechatPrompt/index.js +10 -10
- package/lib/index.js +6 -6
- package/lib/withTheme/index.js +5 -17
- package/lib/withTracker/error_boundary.js +3 -3
- package/lib/withTracker/index.js +6 -7
- package/package.json +23 -17
- package/src/ActionButton/index.js +65 -0
- package/src/ActivityIndicator/index.js +141 -0
- package/src/Alert/index.js +104 -0
- package/src/Async/index.js +39 -0
- package/src/Badge/index.js +71 -0
- package/src/Blocklet/index.js +424 -0
- package/src/Button/index.js +4 -0
- package/src/Button/wrap.js +101 -0
- package/src/ButtonGroup/index.js +6 -0
- package/src/Center/index.js +40 -0
- package/src/ClickToCopy/index.js +90 -0
- package/src/CodeBlock/index.js +160 -0
- package/src/Colors/index.js +1 -0
- package/src/Colors/themes/default.js +54 -0
- package/src/ContactForm/index.js +240 -0
- package/src/CookieConsent/index.js +90 -0
- package/src/CountDown/index.js +151 -0
- package/src/Dialog/confirm.js +76 -0
- package/src/Dialog/dialog.js +162 -0
- package/src/Dialog/index.js +2 -0
- package/src/DriftBot/index.js +81 -0
- package/src/Earth/countries.json +8057 -0
- package/src/Earth/index.js +511 -0
- package/src/Earth/util.js +69 -0
- package/src/Empty/index.js +41 -0
- package/src/Footer/index.js +110 -0
- package/src/Icon/image.js +55 -0
- package/src/Icon/index.js +69 -0
- package/src/Img/index.js +172 -0
- package/src/InfoRow/index.js +83 -0
- package/src/Layout/dashboard/header.js +157 -0
- package/src/Layout/dashboard/index.js +150 -0
- package/src/Layout/dashboard/sidebar.js +122 -0
- package/src/Layout/index.js +318 -0
- package/src/Locale/browser-lang.js +63 -0
- package/src/Locale/context.js +94 -0
- package/src/Locale/images/globe-dark.png +0 -0
- package/src/Locale/images/globe-light.png +0 -0
- package/src/Locale/selector.js +135 -0
- package/src/Logo/images/logo-dark-text.svg +3 -0
- package/src/Logo/images/logo-dark-top.svg +6 -0
- package/src/Logo/images/logo-light-text.svg +3 -0
- package/src/Logo/images/logo-light-top.svg +6 -0
- package/src/Logo/index.js +47 -0
- package/src/Metric/index.js +115 -0
- package/src/NFTDisplay/README.md +59 -0
- package/src/NFTDisplay/aspect-ratio-container.js +34 -0
- package/src/NFTDisplay/broken.js +18 -0
- package/src/NFTDisplay/index.js +257 -0
- package/src/NFTDisplay/loading.js +17 -0
- package/src/NFTDisplay/svg-embedder/img.js +36 -0
- package/src/NFTDisplay/svg-embedder/inline-svg.js +37 -0
- package/src/PageScroller/index.js +342 -0
- package/src/PageScroller/usePrevValue.js +12 -0
- package/src/PricingTable/PricingPlan.js +112 -0
- package/src/PricingTable/index.js +43 -0
- package/src/QRCode/index.js +56 -0
- package/src/Result/common.js +116 -0
- package/src/Result/index.js +31 -0
- package/src/Result/result.js +57 -0
- package/src/Result/translations.js +56 -0
- package/src/Screenshot/devices.css +1366 -0
- package/src/Screenshot/index.js +181 -0
- package/src/Spinner/index.js +19 -0
- package/src/SplitButton/index.js +112 -0
- package/src/Switch/index.js +78 -0
- package/src/Tabs/index.js +46 -0
- package/src/Tag/index.js +73 -0
- package/src/Terminal/Player.js +364 -0
- package/src/Terminal/index.js +150 -0
- package/src/Terminal/player.css +378 -0
- package/src/Terminal/util.js +167 -0
- package/src/Terminal/xterm.css +171 -0
- package/src/TextCollapse/index.js +92 -0
- package/src/Theme/index.js +184 -0
- package/src/Theme/responsiveFontSizes.js +94 -0
- package/src/Toast/index.js +118 -0
- package/src/Util/index.js +281 -0
- package/src/Video/index.js +72 -0
- package/src/Wallet/Action.js +105 -0
- package/src/Wallet/Download.js +130 -0
- package/src/Wallet/Open.js +50 -0
- package/src/Wallet/images/abtwallet.png +0 -0
- package/src/Wallet/images/android_download.svg +23 -0
- package/src/Wallet/images/app-store.svg +20 -0
- package/src/Wallet/images/google-play.svg +70 -0
- package/src/WechatPrompt/images/android.png +0 -0
- package/src/WechatPrompt/images/ios.png +0 -0
- package/src/WechatPrompt/index.js +81 -0
- package/src/index.js +63 -0
- package/src/withTheme/index.js +72 -0
- package/src/withTracker/README.md +34 -0
- package/src/withTracker/error_boundary.js +34 -0
- package/src/withTracker/index.js +70 -0
- package/lib/GraphQLPlayground/graphiql.css +0 -1850
- package/lib/GraphQLPlayground/index.js +0 -302
- package/lib/GraphQLPlayground/util.js +0 -55
package/lib/Util/index.js
CHANGED
|
@@ -3,23 +3,28 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.formatToDate = formatToDate;
|
|
7
|
+
exports.formatToDatetime = formatToDatetime;
|
|
8
|
+
exports.getColor = exports.getBackground = exports.formatUptime = void 0;
|
|
7
9
|
exports.getCookieOptions = getCookieOptions;
|
|
8
|
-
exports.mergeProps = mergeProps;
|
|
9
10
|
exports.getCopyright = getCopyright;
|
|
10
|
-
exports.
|
|
11
|
+
exports.getDateTool = getDateTool;
|
|
12
|
+
exports.getTimezone = void 0;
|
|
13
|
+
exports.mergeProps = mergeProps;
|
|
14
|
+
exports.openWebWallet = openWebWallet;
|
|
15
|
+
exports.parseQuery = parseQuery;
|
|
16
|
+
exports.setDateTool = setDateTool;
|
|
17
|
+
exports.str2color = void 0;
|
|
11
18
|
|
|
12
19
|
var _padStart = _interopRequireDefault(require("lodash/padStart"));
|
|
13
20
|
|
|
14
21
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
22
|
|
|
16
23
|
/* eslint-disable no-bitwise */
|
|
24
|
+
let dateTool = null;
|
|
17
25
|
|
|
18
|
-
/* eslint-disable no-plusplus */
|
|
19
|
-
|
|
20
|
-
/* eslint-disable operator-linebreak */
|
|
21
26
|
function parseQuery(str) {
|
|
22
|
-
return str.replace(/^\?/, '').split('&').map(x => x.split('=')).filter(
|
|
27
|
+
return str.replace(/^\?/, '').split('&').map(x => x.split('=')).filter(_ref => {
|
|
23
28
|
let [key] = _ref;
|
|
24
29
|
return !!key;
|
|
25
30
|
}).reduce((memo, x) => {
|
|
@@ -29,22 +34,50 @@ function parseQuery(str) {
|
|
|
29
34
|
return memo;
|
|
30
35
|
}, {});
|
|
31
36
|
}
|
|
37
|
+
/**
|
|
38
|
+
* @param {number} opts.expireInDays
|
|
39
|
+
* @param {string} opts.path
|
|
40
|
+
* @param {domain} opts.domain
|
|
41
|
+
* @param {boolean} opts.returnDomain if === false, opts.domain will be skipped
|
|
42
|
+
*/
|
|
43
|
+
|
|
32
44
|
|
|
33
45
|
function getCookieOptions() {
|
|
34
46
|
let expireInDays = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1;
|
|
47
|
+
let opts = {
|
|
48
|
+
expireInDays
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
if (typeof expireInDays === 'object') {
|
|
52
|
+
opts = expireInDays;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
if (opts.path === undefined) {
|
|
56
|
+
opts.path = '/';
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
if (!opts.expireInDays) {
|
|
60
|
+
opts.expireInDays = 1;
|
|
61
|
+
}
|
|
62
|
+
|
|
35
63
|
const options = {
|
|
36
|
-
expires: expireInDays,
|
|
37
|
-
path:
|
|
38
|
-
domain: ''
|
|
64
|
+
expires: opts.expireInDays,
|
|
65
|
+
path: opts.path,
|
|
66
|
+
domain: opts.domain || '',
|
|
67
|
+
sameSite: opts.sameSite || 'lax'
|
|
39
68
|
};
|
|
40
69
|
|
|
41
|
-
if (typeof window === 'undefined') {
|
|
70
|
+
if (typeof window === 'undefined' || opts.domain || opts.returnDomain === false) {
|
|
71
|
+
if (opts.returnDomain === false) {
|
|
72
|
+
delete options.domain;
|
|
73
|
+
}
|
|
74
|
+
|
|
42
75
|
return options;
|
|
43
76
|
}
|
|
44
77
|
|
|
45
78
|
const {
|
|
46
79
|
host
|
|
47
|
-
} = window.location;
|
|
80
|
+
} = window.location;
|
|
48
81
|
|
|
49
82
|
if (/^[.:0-9]+$/.test(host)) {
|
|
50
83
|
options.domain = '';
|
|
@@ -72,7 +105,7 @@ const getColor = props => {
|
|
|
72
105
|
}
|
|
73
106
|
|
|
74
107
|
if (props.dark) {
|
|
75
|
-
return props.theme.palette.
|
|
108
|
+
return props.theme.palette.common.white;
|
|
76
109
|
}
|
|
77
110
|
|
|
78
111
|
return props.theme.palette.text.primary;
|
|
@@ -86,10 +119,10 @@ const getBackground = props => {
|
|
|
86
119
|
}
|
|
87
120
|
|
|
88
121
|
if (props.dark) {
|
|
89
|
-
return props.theme.palette.
|
|
122
|
+
return props.theme.palette.common.black;
|
|
90
123
|
}
|
|
91
124
|
|
|
92
|
-
return props.theme.palette.
|
|
125
|
+
return props.theme.palette.common.white;
|
|
93
126
|
};
|
|
94
127
|
|
|
95
128
|
exports.getBackground = getBackground;
|
|
@@ -99,7 +132,6 @@ function mergeProps(props, component) {
|
|
|
99
132
|
const newProps = Object.assign({}, props);
|
|
100
133
|
Object.keys(component.defaultProps || {}).forEach(x => {
|
|
101
134
|
if (typeof newProps[x] === 'string' && newProps[x].indexOf('::prop::') === 0) {
|
|
102
|
-
// eslint-disable-next-line react/default-props-match-prop-types
|
|
103
135
|
newProps[x] = component.defaultProps[x];
|
|
104
136
|
}
|
|
105
137
|
});
|
|
@@ -139,6 +171,25 @@ const getTimezone = () => {
|
|
|
139
171
|
|
|
140
172
|
exports.getTimezone = getTimezone;
|
|
141
173
|
|
|
174
|
+
const str2color = str => {
|
|
175
|
+
let hash = 0;
|
|
176
|
+
|
|
177
|
+
for (let i = 0; i < str.length; i++) {
|
|
178
|
+
hash = str.charCodeAt(i) + ((hash << 5) - hash);
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
let colour = '#';
|
|
182
|
+
|
|
183
|
+
for (let j = 0; j < 3; j++) {
|
|
184
|
+
const value = hash >> j * 8 & 0xff;
|
|
185
|
+
colour += "00".concat(value.toString(16)).substr(-2);
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
return colour;
|
|
189
|
+
};
|
|
190
|
+
|
|
191
|
+
exports.str2color = str2color;
|
|
192
|
+
|
|
142
193
|
const formatUptime = uptime => {
|
|
143
194
|
const total = Math.round(uptime / 1000);
|
|
144
195
|
const hours = Math.floor(total / 3600);
|
|
@@ -146,24 +197,144 @@ const formatUptime = uptime => {
|
|
|
146
197
|
const seconds = total % 60;
|
|
147
198
|
return "".concat((0, _padStart.default)(hours, 2, '0'), ":").concat((0, _padStart.default)(minutes, 2, '0'), ":").concat((0, _padStart.default)(seconds, 2, '0'));
|
|
148
199
|
};
|
|
200
|
+
/**
|
|
201
|
+
* Set the date tool library which support for format() and locale() functions,
|
|
202
|
+
* moment and dayjs are recommended.
|
|
203
|
+
* @param {object} the date tool library
|
|
204
|
+
*/
|
|
205
|
+
|
|
149
206
|
|
|
150
207
|
exports.formatUptime = formatUptime;
|
|
151
208
|
|
|
152
|
-
|
|
153
|
-
|
|
209
|
+
function setDateTool(tool) {
|
|
210
|
+
dateTool = tool;
|
|
211
|
+
}
|
|
154
212
|
|
|
155
|
-
|
|
156
|
-
|
|
213
|
+
function getDateTool() {
|
|
214
|
+
return dateTool;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
const createDateFormater = format => (date, _ref2) => {
|
|
218
|
+
let {
|
|
219
|
+
locale,
|
|
220
|
+
tz
|
|
221
|
+
} = _ref2;
|
|
222
|
+
|
|
223
|
+
if (dateTool === null) {
|
|
224
|
+
throw new Error('call setDateTool to set the date tool library, such as: setDateTool(dayjs)');
|
|
157
225
|
}
|
|
158
226
|
|
|
159
|
-
|
|
227
|
+
if (!date) {
|
|
228
|
+
return '-';
|
|
229
|
+
}
|
|
160
230
|
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
231
|
+
let instance = dateTool(date);
|
|
232
|
+
|
|
233
|
+
if (typeof tz !== 'undefined') {
|
|
234
|
+
instance = instance.tz(tz);
|
|
164
235
|
}
|
|
165
236
|
|
|
166
|
-
|
|
237
|
+
if (typeof locale !== 'undefined') {
|
|
238
|
+
instance = instance.locale(locale);
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
return instance.format(format);
|
|
167
242
|
};
|
|
243
|
+
/**
|
|
244
|
+
* Format the time string as `ll` format: MMM D, YYYY
|
|
245
|
+
* Ensure that the setDateTool() function is called first to set the time tool library.
|
|
246
|
+
* @param {string} date date string
|
|
247
|
+
* @param {object} option
|
|
248
|
+
* @param {string} option.locale, default: en
|
|
249
|
+
* @param {string} option.tz, default: timzone
|
|
250
|
+
* @returns formated date string
|
|
251
|
+
*/
|
|
252
|
+
|
|
253
|
+
|
|
254
|
+
function formatToDate(date) {
|
|
255
|
+
let {
|
|
256
|
+
locale,
|
|
257
|
+
tz
|
|
258
|
+
} = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
259
|
+
return createDateFormater('ll')(date, {
|
|
260
|
+
locale,
|
|
261
|
+
tz
|
|
262
|
+
});
|
|
263
|
+
}
|
|
264
|
+
/**
|
|
265
|
+
* Format the time string as `lll` format: MMM D, YYYY h:mm A
|
|
266
|
+
* Ensure that the setDateTool() function is called first to set the time tool library.
|
|
267
|
+
* @param {string} date date string
|
|
268
|
+
* @param {object} option
|
|
269
|
+
* @param {string} option.locale, default: en
|
|
270
|
+
* @param {string} option.tz, default: timzone
|
|
271
|
+
* @returns formated date string
|
|
272
|
+
*/
|
|
273
|
+
|
|
274
|
+
|
|
275
|
+
function formatToDatetime(date) {
|
|
276
|
+
let {
|
|
277
|
+
locale,
|
|
278
|
+
tz
|
|
279
|
+
} = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
280
|
+
return createDateFormater('lll')(date, {
|
|
281
|
+
locale,
|
|
282
|
+
tz
|
|
283
|
+
});
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
function openWebWallet(_ref3) {
|
|
287
|
+
var _window;
|
|
288
|
+
|
|
289
|
+
let {
|
|
290
|
+
webWalletUrl,
|
|
291
|
+
action = 'login',
|
|
292
|
+
locale = 'en',
|
|
293
|
+
url,
|
|
294
|
+
windowFeatures
|
|
295
|
+
} = _ref3;
|
|
296
|
+
// web wallet extension
|
|
297
|
+
const webWalletExtension = ((_window = window) === null || _window === void 0 ? void 0 : _window.ABT_DEV) || window.ABT;
|
|
298
|
+
|
|
299
|
+
if (webWalletExtension && typeof webWalletExtension.open === 'function') {
|
|
300
|
+
webWalletExtension.open({
|
|
301
|
+
action,
|
|
302
|
+
locale,
|
|
303
|
+
url: encodeURIComponent(url)
|
|
304
|
+
});
|
|
305
|
+
return;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
const defaultWindowFeatures = {
|
|
309
|
+
toolbar: 'no',
|
|
310
|
+
location: 'no',
|
|
311
|
+
status: 'no',
|
|
312
|
+
menubar: 'no',
|
|
313
|
+
scrollbars: 'yes',
|
|
314
|
+
resizable: 'yes',
|
|
315
|
+
// iphone 8plus size
|
|
316
|
+
width: 414,
|
|
317
|
+
height: 736
|
|
318
|
+
};
|
|
319
|
+
const windowUrl = "".concat(webWalletUrl, "?action=").concat(action, "&locale=").concat(locale, "&url=").concat(encodeURIComponent(url));
|
|
320
|
+
const mergedWindowFeatures = Object.assign({}, defaultWindowFeatures, windowFeatures);
|
|
321
|
+
|
|
322
|
+
const getWindowWidth = win => {
|
|
323
|
+
return win.innerWidth || win.document.documentElement.clientWidth || win.document.body.clientWidth;
|
|
324
|
+
}; // 默认在浏览器右上角弹出窗口
|
|
325
|
+
|
|
326
|
+
|
|
327
|
+
if (!('left' in mergedWindowFeatures)) {
|
|
328
|
+
const winWidth = getWindowWidth(window.top || window);
|
|
329
|
+
const winLeft = window.screenLeft || window.screenX;
|
|
330
|
+
mergedWindowFeatures.left = winWidth + winLeft - mergedWindowFeatures.width;
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
if (!('top' in mergedWindowFeatures)) {
|
|
334
|
+
const winTop = window.screenTop || window.screenY;
|
|
335
|
+
mergedWindowFeatures.top = winTop;
|
|
336
|
+
}
|
|
168
337
|
|
|
169
|
-
|
|
338
|
+
const strWindowFeatures = Object.keys(mergedWindowFeatures).map(key => "".concat(key, "=").concat(mergedWindowFeatures[key])).join(',');
|
|
339
|
+
window.open(windowUrl, 'targetWindow', strWindowFeatures);
|
|
340
|
+
}
|
package/lib/Video/index.js
CHANGED
|
@@ -19,13 +19,10 @@ var _Util = require("../Util");
|
|
|
19
19
|
|
|
20
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
21
|
|
|
22
|
-
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var
|
|
22
|
+
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); }
|
|
23
23
|
|
|
24
|
-
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (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; }
|
|
24
|
+
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; }
|
|
25
25
|
|
|
26
|
-
/* eslint-disable object-curly-newline */
|
|
27
|
-
|
|
28
|
-
/* eslint-disable jsx-a11y/iframe-has-title */
|
|
29
26
|
const {
|
|
30
27
|
string,
|
|
31
28
|
number,
|
|
@@ -52,33 +49,33 @@ function Video(props) {
|
|
|
52
49
|
});
|
|
53
50
|
|
|
54
51
|
if (url.indexOf('v.qq.com') > 0) {
|
|
55
|
-
return _react.default.createElement(Placeholder, {
|
|
52
|
+
return /*#__PURE__*/_react.default.createElement(Placeholder, {
|
|
56
53
|
style: {
|
|
57
54
|
width,
|
|
58
55
|
height
|
|
59
56
|
}
|
|
60
|
-
}, _react.default.createElement("iframe", {
|
|
57
|
+
}, /*#__PURE__*/_react.default.createElement("iframe", {
|
|
61
58
|
title: url,
|
|
62
59
|
style: styles,
|
|
63
60
|
src: url,
|
|
64
61
|
onLoad: () => setLoaded(true),
|
|
65
62
|
allowFullScreen: "true"
|
|
66
|
-
}), !loaded && _react.default.createElement(_CircularProgress.default, {
|
|
63
|
+
}), !loaded && /*#__PURE__*/_react.default.createElement(_CircularProgress.default, {
|
|
67
64
|
className: "loading-indicator",
|
|
68
65
|
color: "primary"
|
|
69
66
|
}));
|
|
70
67
|
}
|
|
71
68
|
|
|
72
|
-
return _react.default.createElement(Placeholder, {
|
|
69
|
+
return /*#__PURE__*/_react.default.createElement(Placeholder, {
|
|
73
70
|
style: {
|
|
74
71
|
width,
|
|
75
72
|
height
|
|
76
73
|
}
|
|
77
|
-
}, _react.default.createElement(_reactPlayer.default, Object.assign({
|
|
74
|
+
}, /*#__PURE__*/_react.default.createElement(_reactPlayer.default, Object.assign({
|
|
78
75
|
style: styles
|
|
79
76
|
}, newProps, {
|
|
80
77
|
onReady: () => setLoaded(true)
|
|
81
|
-
})), !loaded && _react.default.createElement(_CircularProgress.default, {
|
|
78
|
+
})), !loaded && /*#__PURE__*/_react.default.createElement(_CircularProgress.default, {
|
|
82
79
|
className: "loading-indicator",
|
|
83
80
|
color: "primary"
|
|
84
81
|
}));
|
package/lib/Wallet/Action.js
CHANGED
|
@@ -17,10 +17,12 @@ var _abtwallet = _interopRequireDefault(require("./images/abtwallet.png"));
|
|
|
17
17
|
|
|
18
18
|
var _Util = require("../Util");
|
|
19
19
|
|
|
20
|
-
var
|
|
20
|
+
var _Colors = _interopRequireDefault(require("../Colors"));
|
|
21
21
|
|
|
22
22
|
var _Button = _interopRequireDefault(require("../Button"));
|
|
23
23
|
|
|
24
|
+
const _excluded = ["action", "size", "textLayout", "style"];
|
|
25
|
+
|
|
24
26
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
25
27
|
|
|
26
28
|
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; }
|
|
@@ -36,36 +38,36 @@ function WalletAction(props) {
|
|
|
36
38
|
textLayout,
|
|
37
39
|
style = {}
|
|
38
40
|
} = newProps,
|
|
39
|
-
rest = _objectWithoutProperties(newProps,
|
|
41
|
+
rest = _objectWithoutProperties(newProps, _excluded);
|
|
40
42
|
|
|
41
43
|
const styles = Object.assign({}, style, {
|
|
42
44
|
border: 'none',
|
|
43
45
|
padding: 0
|
|
44
46
|
});
|
|
45
|
-
return _react.default.createElement(_Button.default, Object.assign({
|
|
47
|
+
return /*#__PURE__*/_react.default.createElement(_Button.default, Object.assign({
|
|
46
48
|
style: styles
|
|
47
49
|
}, rest, {
|
|
48
50
|
variant: "outlined"
|
|
49
|
-
}), _react.default.createElement(Content, {
|
|
51
|
+
}), /*#__PURE__*/_react.default.createElement(Content, {
|
|
50
52
|
size: size,
|
|
51
53
|
color: styles.color
|
|
52
|
-
}, _react.default.createElement("img", {
|
|
54
|
+
}, /*#__PURE__*/_react.default.createElement("img", {
|
|
53
55
|
src: _abtwallet.default,
|
|
54
56
|
className: "wallet-action__logo",
|
|
55
|
-
alt: "
|
|
56
|
-
}), textLayout === 'vertical' && _react.default.createElement(_Typography.default, {
|
|
57
|
+
alt: "DID Wallet"
|
|
58
|
+
}), textLayout === 'vertical' && /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
57
59
|
className: "wallet-action__text",
|
|
58
60
|
component: "div"
|
|
59
|
-
}, _react.default.createElement("span", {
|
|
61
|
+
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
60
62
|
className: "wallet-action__action"
|
|
61
|
-
}, action, " with"), _react.default.createElement("span", {
|
|
63
|
+
}, action, " with"), /*#__PURE__*/_react.default.createElement("span", {
|
|
62
64
|
className: "wallet-action__title"
|
|
63
|
-
}, "
|
|
65
|
+
}, "DID Wallet")), textLayout === 'horizontal' && /*#__PURE__*/_react.default.createElement("span", {
|
|
64
66
|
className: "wallet-action__title",
|
|
65
67
|
style: {
|
|
66
68
|
padding: 8
|
|
67
69
|
}
|
|
68
|
-
}, action, " with
|
|
70
|
+
}, action, " with DID Wallet")));
|
|
69
71
|
}
|
|
70
72
|
|
|
71
73
|
WalletAction.propTypes = {
|
|
@@ -97,5 +99,5 @@ const sizes = {
|
|
|
97
99
|
|
|
98
100
|
const Content = _styledComponents.default.div.withConfig({
|
|
99
101
|
displayName: "Action__Content",
|
|
100
|
-
componentId: "zuf4zr-0"
|
|
101
|
-
})(["display:flex;justify-content:center;align-items:center;&:hover{opacity:0.9;}.wallet-action__logo{width:auto;height:auto;max-width:", "px;margin-left:5px;}.wallet-action__text{padding:8px;display:flex;height:100%;flex-direction:column;justify-content:space-between;align-items:flex-start;}.wallet-action__action{font-size:", "px;text-transform:capitalize;margin-bottom:1px;color:", ";letter-spacing:1px;}.wallet-action__title{font-size:", "px;text-transform:capitalize;color:", ";letter-spacing:1px;}"], props => sizes.logo[props.size], props => sizes.font[props.size], props => props.color ||
|
|
102
|
+
componentId: "sc-zuf4zr-0"
|
|
103
|
+
})(["display:flex;justify-content:center;align-items:center;&:hover{opacity:0.9;}.wallet-action__logo{width:auto;height:auto;max-width:", "px;margin-left:5px;}.wallet-action__text{padding:8px;display:flex;height:100%;flex-direction:column;justify-content:space-between;align-items:flex-start;}.wallet-action__action{font-size:", "px;text-transform:capitalize;margin-bottom:1px;color:", ";letter-spacing:1px;}.wallet-action__title{font-size:", "px;text-transform:capitalize;color:", ";letter-spacing:1px;}"], props => sizes.logo[props.size], props => sizes.font[props.size], props => props.color || _Colors.default.primary.main, props => sizes.font[props.size] * 1.5, props => props.color || _Colors.default.primary.main);
|