@abtnode/ux 1.16.17-beta-952ef53d → 1.16.17-beta-d81014f4

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.
@@ -21,6 +21,7 @@ var _Popover = _interopRequireDefault(require("@mui/material/Popover"));
21
21
  var _Tooltip = _interopRequireDefault(require("@mui/material/Tooltip"));
22
22
  var _Typography = _interopRequireDefault(require("@mui/material/Typography"));
23
23
  var _useTheme = _interopRequireDefault(require("@mui/material/styles/useTheme"));
24
+ var _useMediaQuery = _interopRequireDefault(require("@mui/material/useMediaQuery"));
24
25
  var _base = require("@abtnode/util/lib/base32");
25
26
  var _urlEvaluation = require("@abtnode/util/lib/url-evaluation");
26
27
  var _LockIcon = _interopRequireDefault(require("@arcblock/icons/lib/LockIcon"));
@@ -28,9 +29,9 @@ var _Empty = _interopRequireDefault(require("@arcblock/ux/lib/Empty"));
28
29
  var _context = require("@arcblock/ux/lib/Locale/context");
29
30
  var _util = require("@blocklet/meta/lib/util");
30
31
  var _CircularProgress = _interopRequireDefault(require("@mui/material/CircularProgress"));
31
- var _didAddress = _interopRequireDefault(require("../../did-address"));
32
32
  var _blocklet = require("../../contexts/blocklet");
33
33
  var _node = require("../../contexts/node");
34
+ var _didAddress = _interopRequireDefault(require("../../did-address"));
34
35
  var _permission = require("../../permission");
35
36
  var _util2 = require("../../util");
36
37
  var _addCert = _interopRequireDefault(require("../add-cert"));
@@ -41,10 +42,13 @@ var _types = require("../types");
41
42
  var _util3 = require("../util");
42
43
  var _jsxRuntime = require("react/jsx-runtime");
43
44
  var _templateObject;
45
+ const _excluded = ["domain", "children"];
44
46
  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); }
45
47
  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; }
46
48
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
47
49
  function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
50
+ 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; }
51
+ 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; }
48
52
  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; }
49
53
  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; }
50
54
  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; }
@@ -81,9 +85,8 @@ function DomainList(_ref) {
81
85
  const {
82
86
  t
83
87
  } = (0, _context.useLocaleContext)();
84
- const [domainInfoAnchorEl, setDomainInfoAnchorEl] = (0, _react.useState)(null);
85
88
  const [showAllDomains, setShowAllDomains] = (0, _react.useState)(false);
86
- const theme = (0, _useTheme.default)();
89
+ const isMobile = (0, _useMediaQuery.default)(x => x.breakpoints.down('md'));
87
90
  const hasMutatePermission = (0, _react.useMemo)(() => {
88
91
  let res = hasPermission;
89
92
  if ((0, _util3.isServerless)(blocklet)) {
@@ -91,12 +94,6 @@ function DomainList(_ref) {
91
94
  }
92
95
  return res;
93
96
  }, [hasPermission, inService, blocklet]);
94
- const handlePopoverOpen = event => {
95
- setDomainInfoAnchorEl(event.currentTarget);
96
- };
97
- const handlePopoverClose = () => {
98
- setDomainInfoAnchorEl(null);
99
- };
100
97
  const {
101
98
  site
102
99
  } = blocklet;
@@ -154,164 +151,107 @@ function DomainList(_ref) {
154
151
  });
155
152
  }
156
153
  })]
157
- }), blocklet.status !== 'running' && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Box.default, {
154
+ }), (0, _util.isAccessible)(blocklet.status) === false && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Box.default, {
158
155
  mt: 1.5,
159
156
  mb: 1.5,
160
157
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Alert.default, {
161
158
  severity: "warning",
162
159
  children: t('blocklet.router.noRunning')
163
160
  })
164
- }), (showAllDomains ? domains : displayDomains).map((domain, index) => /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Box.default, {
165
- display: "flex",
166
- alignItems: "center",
167
- justifyContent: "space-between",
168
- mt: index ? 0 : 1,
169
- children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_Box.default, {
170
- display: "flex",
171
- alignItems: "center",
172
- justifyContent: "flex-start",
173
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_domainStatus.default, {
174
- domain: domain,
175
- filters: ['domain']
176
- }, "".concat(domain.value, "-domain")), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Box.default, {
177
- sx: {
178
- ml: 2,
179
- mr: 0.5
180
- },
181
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(DomainLink, {
182
- domain: domain,
183
- target: "_blank",
184
- children: domain.value
185
- })
186
- }), domain.type === 'nft-domain' && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
187
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Diamond.default, {
188
- onMouseEnter: handlePopoverOpen,
189
- onMouseLeave: handlePopoverClose,
190
- style: {
191
- cursor: 'pointer',
192
- fill: theme.palette.primary.main
193
- }
194
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Popover.default, {
195
- id: "mouse-over-popover",
196
- style: {
197
- pointerEvents: 'none'
198
- },
199
- open: Boolean(domainInfoAnchorEl),
200
- anchorEl: domainInfoAnchorEl,
201
- anchorOrigin: {
202
- vertical: 'bottom',
203
- horizontal: 'left'
204
- },
205
- transformOrigin: {
206
- vertical: 'top',
207
- horizontal: 'left'
208
- },
209
- onClose: handlePopoverClose,
210
- disableRestoreFocus: true,
211
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Card.default, {
212
- children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_CardContent.default, {
213
- style: {
214
- display: 'flex',
215
- flexDirection: 'column'
216
- },
217
- children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_Typography.default, {
218
- component: "div",
219
- style: {
220
- display: 'flex',
221
- alignItems: 'center'
222
- },
223
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Diamond.default, {
224
- style: {
225
- fill: theme.palette.primary.main
226
- }
227
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Typography.default, {
228
- component: "span",
229
- style: {
230
- marginLeft: '8px',
231
- fontSize: '18px',
232
- fontWeight: 'bolder'
233
- },
234
- children: t('router.domainAlias.nftDomain')
235
- })]
236
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Typography.default, {
237
- component: "div",
238
- style: {
239
- display: 'flex',
240
- marginTop: '12px'
241
- },
242
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Typography.default, {
243
- component: "span",
244
- style: {
245
- width: '80px',
246
- marginRight: '8px'
247
- },
248
- children: t('common.domain')
249
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Typography.default, {
250
- component: "span",
251
- children: domain.value
252
- })]
253
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Typography.default, {
254
- component: "div",
255
- style: {
256
- display: 'flex'
257
- },
258
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Typography.default, {
259
- component: "span",
260
- style: {
261
- width: '80px',
262
- marginRight: '8px'
263
- },
264
- children: "NFT"
265
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_didAddress.default, {
266
- did: domain.nftDid
267
- })]
268
- })]
161
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Box.default, {
162
+ sx: {
163
+ display: 'flex',
164
+ flexDirection: 'column',
165
+ gap: 1
166
+ },
167
+ children: (showAllDomains ? domains : displayDomains).map(domain => /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
168
+ children: [isMobile && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Box.default, {
169
+ display: "flex",
170
+ flexDirection: "column",
171
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Box.default, {
172
+ display: "flex",
173
+ alignItems: "center",
174
+ justifyContent: "flex-start",
175
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(DomainLink, {
176
+ domain: domain,
177
+ target: "_blank",
178
+ children: domain.value
179
+ })
180
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Box.default, {
181
+ display: "flex",
182
+ alignItems: "center",
183
+ justifyContent: "space-between",
184
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_Box.default, {
185
+ sx: {
186
+ display: 'flex',
187
+ alignItems: 'center',
188
+ justifyContent: 'flex-start',
189
+ gap: 1
190
+ },
191
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_domainStatus.default, {
192
+ domain: domain,
193
+ filters: ['domain']
194
+ }, "".concat(domain.value, "-domain")), /*#__PURE__*/(0, _jsxRuntime.jsx)(InnerAddDomain, {
195
+ domain: domain,
196
+ blocklet: blocklet,
197
+ hasMutatePermission: hasMutatePermission
198
+ })]
199
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Box.default, {
200
+ sx: {
201
+ button: {
202
+ padding: 0
203
+ }
204
+ },
205
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(InnerAction, {
206
+ hasMutatePermission: hasMutatePermission,
207
+ site: site,
208
+ domain: domain,
209
+ blocklet: blocklet
210
+ })
211
+ })]
212
+ })]
213
+ }, domain.value), !isMobile && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Box.default, {
214
+ display: "flex",
215
+ alignItems: "center",
216
+ justifyContent: "space-between",
217
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_Box.default, {
218
+ display: "flex",
219
+ alignItems: "center",
220
+ justifyContent: "flex-start",
221
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_domainStatus.default, {
222
+ domain: domain,
223
+ filters: ['domain']
224
+ }, "".concat(domain.value, "-domain")), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Box.default, {
225
+ sx: {
226
+ ml: 2,
227
+ mr: 0.5
228
+ },
229
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(DomainLink, {
230
+ domain: domain,
231
+ target: "_blank",
232
+ children: domain.value
269
233
  })
234
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(InnerAddDomain, {
235
+ domain: domain,
236
+ blocklet: blocklet,
237
+ hasMutatePermission: hasMutatePermission
238
+ })]
239
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Box.default, {
240
+ sx: {
241
+ button: {
242
+ padding: 0
243
+ }
244
+ },
245
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(InnerAction, {
246
+ hasMutatePermission: hasMutatePermission,
247
+ site: site,
248
+ domain: domain,
249
+ blocklet: blocklet
270
250
  })
271
251
  })]
272
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_domainStatus.default, {
273
- domain: domain,
274
- filters: ['http']
275
- }, "".concat(domain.value, "-http")), hasMutatePermission && /*#__PURE__*/(0, _jsxRuntime.jsx)(_addCert.default, {
276
- domain: domain.value,
277
- domainStatus: domain.domainStatus,
278
- did: blocklet.meta.did,
279
- children: _ref3 => {
280
- let {
281
- open
282
- } = _ref3;
283
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Button.default, {
284
- size: "small",
285
- onClick: e => open(e),
286
- children: t('router.cert.genLetsEncryptCert.title')
287
- });
288
- }
289
- })]
290
- }), hasMutatePermission && !domain.isProtected ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_domainActions.default, {
291
- site: site,
292
- domain: domain,
293
- blocklet: blocklet
294
- }) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_Tooltip.default, {
295
- title: t('blocklet.router.domainLockTooltip'),
296
- placement: "top",
297
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_IconButton.default, {
298
- disabled: true,
299
- size: "large",
300
- style: {
301
- pointerEvents: 'auto',
302
- // padding replace to margin, fix the tooltip position
303
- paddingTop: 0,
304
- paddingBottom: 0,
305
- margin: '12px 0'
306
- },
307
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_LockIcon.default, {
308
- style: {
309
- fill: theme.palette.text.disabled
310
- }
311
- })
312
- })
313
- })]
314
- }, domain.value)), hiddenDomains.length > 0 && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
252
+ }, domain.value)]
253
+ }))
254
+ }), hiddenDomains.length > 0 && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
315
255
  style: {
316
256
  marginLeft: '20px',
317
257
  marginTop: '12px'
@@ -338,11 +278,12 @@ DomainList.defaultProps = {
338
278
  hasPermission: false,
339
279
  loadingRuntimeInfo: false
340
280
  };
341
- function DomainLink(_ref4) {
281
+ function DomainLink(_ref3) {
342
282
  let {
343
- domain,
344
- children
345
- } = _ref4;
283
+ domain,
284
+ children
285
+ } = _ref3,
286
+ rest = _objectWithoutProperties(_ref3, _excluded);
346
287
  const {
347
288
  t
348
289
  } = (0, _context.useLocaleContext)();
@@ -351,7 +292,7 @@ function DomainLink(_ref4) {
351
292
  accessibility
352
293
  } = domain;
353
294
  if (!accessibility || accessibility.loading) {
354
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)(LinkDiv, {
295
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(LinkDiv, _objectSpread(_objectSpread({}, rest), {}, {
355
296
  children: [children, /*#__PURE__*/(0, _jsxRuntime.jsx)(_Tooltip.default, {
356
297
  title: t('blocklet.router.checkUrlAccessible'),
357
298
  placement: "top-end",
@@ -362,10 +303,10 @@ function DomainLink(_ref4) {
362
303
  })
363
304
  })
364
305
  })]
365
- });
306
+ }));
366
307
  }
367
308
  if (!accessibility.accessible) {
368
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(LinkDiv, {
309
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(LinkDiv, _objectSpread(_objectSpread({}, rest), {}, {
369
310
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Tooltip.default, {
370
311
  title: t('blocklet.router.urlInaccessible'),
371
312
  placement: "top-end",
@@ -373,19 +314,201 @@ function DomainLink(_ref4) {
373
314
  children: children
374
315
  })
375
316
  })
376
- });
317
+ }));
377
318
  }
378
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(LinkDiv, {
319
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(LinkDiv, _objectSpread(_objectSpread({}, rest), {}, {
379
320
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)("a", {
380
321
  href: href,
381
322
  target: "_blank",
382
323
  rel: "noopener noreferrer",
383
324
  children: children
384
325
  })
385
- });
326
+ }));
386
327
  }
387
328
  DomainLink.propTypes = {
388
329
  domain: _types.DomainType.isRequired,
389
330
  children: _propTypes.default.any.isRequired
390
331
  };
391
- const LinkDiv = _styled.default.span(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n &,\n & > * {\n color: #222;\n font-size: 18px;\n }\n\n .status {\n margin-left: 8px;\n }\n"])));
332
+ const LinkDiv = _styled.default.span(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n &,\n & > * {\n color: #222;\n font-size: 18px;\n word-break: break-all;\n }\n\n .status {\n margin-left: 8px;\n }\n"])));
333
+ function InnerAction(_ref4) {
334
+ let {
335
+ hasMutatePermission,
336
+ site,
337
+ domain,
338
+ blocklet
339
+ } = _ref4;
340
+ const theme = (0, _useTheme.default)();
341
+ const {
342
+ t
343
+ } = (0, _context.useLocaleContext)();
344
+ if (hasMutatePermission && !domain.isProtected) {
345
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_domainActions.default, {
346
+ site: site,
347
+ domain: domain,
348
+ blocklet: blocklet
349
+ });
350
+ }
351
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Tooltip.default, {
352
+ title: t('blocklet.router.domainLockTooltip'),
353
+ placement: "top",
354
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_IconButton.default, {
355
+ disabled: true,
356
+ size: "large",
357
+ style: {
358
+ pointerEvents: 'auto',
359
+ // padding replace to margin, fix the tooltip position
360
+ paddingTop: 0,
361
+ paddingBottom: 0
362
+ },
363
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_LockIcon.default, {
364
+ style: {
365
+ fill: theme.palette.text.disabled
366
+ }
367
+ })
368
+ })
369
+ });
370
+ }
371
+ InnerAction.propTypes = {
372
+ hasMutatePermission: _propTypes.default.bool.isRequired,
373
+ site: _propTypes.default.object.isRequired,
374
+ domain: _types.DomainType.isRequired,
375
+ blocklet: _propTypes.default.object.isRequired
376
+ };
377
+ function InnerAddDomain(_ref5) {
378
+ let {
379
+ domain,
380
+ blocklet,
381
+ hasMutatePermission
382
+ } = _ref5;
383
+ const theme = (0, _useTheme.default)();
384
+ const {
385
+ t
386
+ } = (0, _context.useLocaleContext)();
387
+ const [domainInfoAnchorEl, setDomainInfoAnchorEl] = (0, _react.useState)(null);
388
+ const handlePopoverOpen = event => {
389
+ setDomainInfoAnchorEl(event.currentTarget);
390
+ };
391
+ const handlePopoverClose = () => {
392
+ setDomainInfoAnchorEl(null);
393
+ };
394
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Box.default, {
395
+ sx: {
396
+ display: 'flex',
397
+ justifyContent: 'flex-start',
398
+ alignItems: 'center',
399
+ gap: 1
400
+ },
401
+ children: [domain.type === 'nft-domain' && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
402
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Diamond.default, {
403
+ onMouseEnter: handlePopoverOpen,
404
+ onMouseLeave: handlePopoverClose,
405
+ style: {
406
+ cursor: 'pointer',
407
+ fill: theme.palette.primary.main
408
+ }
409
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Popover.default, {
410
+ id: "mouse-over-popover",
411
+ style: {
412
+ pointerEvents: 'none'
413
+ },
414
+ open: Boolean(domainInfoAnchorEl),
415
+ anchorEl: domainInfoAnchorEl,
416
+ anchorOrigin: {
417
+ vertical: 'bottom',
418
+ horizontal: 'left'
419
+ },
420
+ transformOrigin: {
421
+ vertical: 'top',
422
+ horizontal: 'left'
423
+ },
424
+ onClose: handlePopoverClose,
425
+ disableRestoreFocus: true,
426
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Card.default, {
427
+ children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_CardContent.default, {
428
+ style: {
429
+ display: 'flex',
430
+ flexDirection: 'column'
431
+ },
432
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_Typography.default, {
433
+ component: "div",
434
+ style: {
435
+ display: 'flex',
436
+ alignItems: 'center'
437
+ },
438
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Diamond.default, {
439
+ style: {
440
+ fill: theme.palette.primary.main
441
+ }
442
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Typography.default, {
443
+ component: "span",
444
+ style: {
445
+ marginLeft: '8px',
446
+ fontSize: '18px',
447
+ fontWeight: 'bolder'
448
+ },
449
+ children: t('router.domainAlias.nftDomain')
450
+ })]
451
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Typography.default, {
452
+ component: "div",
453
+ style: {
454
+ display: 'flex',
455
+ marginTop: '12px'
456
+ },
457
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Typography.default, {
458
+ component: "span",
459
+ style: {
460
+ width: '80px',
461
+ marginRight: '8px'
462
+ },
463
+ children: t('common.domain')
464
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Typography.default, {
465
+ component: "span",
466
+ children: domain.value
467
+ })]
468
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Typography.default, {
469
+ component: "div",
470
+ style: {
471
+ display: 'flex'
472
+ },
473
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Typography.default, {
474
+ component: "span",
475
+ style: {
476
+ width: '80px',
477
+ marginRight: '8px'
478
+ },
479
+ children: "NFT"
480
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_didAddress.default, {
481
+ did: domain.nftDid
482
+ })]
483
+ })]
484
+ })
485
+ })
486
+ })]
487
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_domainStatus.default, {
488
+ domain: domain,
489
+ filters: ['http']
490
+ }, "".concat(domain.value, "-http")), hasMutatePermission && /*#__PURE__*/(0, _jsxRuntime.jsx)(_addCert.default, {
491
+ domain: domain.value,
492
+ domainStatus: domain.domainStatus,
493
+ did: blocklet.meta.did,
494
+ children: _ref6 => {
495
+ let {
496
+ open
497
+ } = _ref6;
498
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Button.default, {
499
+ sx: {
500
+ padding: 0
501
+ },
502
+ size: "small",
503
+ onClick: e => open(e),
504
+ children: t('router.cert.genLetsEncryptCert.title')
505
+ });
506
+ }
507
+ })]
508
+ });
509
+ }
510
+ InnerAddDomain.propTypes = {
511
+ domain: _types.DomainType.isRequired,
512
+ blocklet: _propTypes.default.object.isRequired,
513
+ hasMutatePermission: _propTypes.default.bool.isRequired
514
+ };
@@ -984,4 +984,4 @@ BlockletComponent.defaultProps = {
984
984
  onUpdate: () => {},
985
985
  getComponentUrl: () => window.location.origin
986
986
  };
987
- const Div = _styled.default.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n .title {\n font-size: 1.2rem;\n font-weight: bold;\n margin-bottom: ", ";\n }\n\n @keyframes showDelay {\n 0% {\n opacity: 0;\n }\n\n 100% {\n opacity: 1;\n }\n }\n\n .component-item {\n animation: showDelay 0.75s ease 1;\n }\n"])), props => props.theme.spacing(1));
987
+ const Div = _styled.default.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n .title {\n font-size: 1.2rem;\n font-weight: bold;\n }\n\n @keyframes showDelay {\n 0% {\n opacity: 0;\n }\n\n 100% {\n opacity: 1;\n }\n }\n\n .component-item {\n animation: showDelay 0.75s ease 1;\n }\n"])));