@abtnode/ux 1.16.23-beta-f85576a6 → 1.16.23-beta-aeb9f5bd
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/es/blocklet/agreement.js +85 -16
- package/es/blocklet/component/add-component-button.js +50 -0
- package/es/blocklet/component/add-component-core.js +35 -12
- package/es/blocklet/component/add-component-dialog.js +78 -0
- package/es/blocklet/component/component-cell.js +509 -0
- package/es/blocklet/component/index.js +78 -532
- package/es/blocklet/component/line.js +7 -3
- package/es/blocklet/component/optional-component-cell.js +145 -0
- package/es/blocklet/component/related-components-dialog.js +189 -0
- package/es/blocklet/component/store-blocklet-list.js +8 -1
- package/es/blocklet/config-navigation.js +2 -1
- package/es/hooks/use-check-update-by-url.js +1 -1
- package/es/hooks/use-components-by-blocklet-meta-url.js +36 -0
- package/es/hooks/use-install-component-by-url.js +64 -0
- package/es/hooks/use-navigation.js +0 -16
- package/es/locales/ar.js +13 -4
- package/es/locales/de.js +13 -4
- package/es/locales/en.js +6 -0
- package/es/locales/es.js +13 -4
- package/es/locales/fr.js +13 -4
- package/es/locales/hi.js +13 -4
- package/es/locales/i18n.db +0 -0
- package/es/locales/id.js +13 -4
- package/es/locales/ja.js +13 -4
- package/es/locales/ko.js +13 -4
- package/es/locales/pt.js +13 -4
- package/es/locales/ru.js +13 -4
- package/es/locales/th.js +13 -4
- package/es/locales/vi.js +13 -4
- package/es/locales/zh-tw.js +13 -4
- package/es/locales/zh.js +10 -3
- package/es/team/members/index.js +4 -3
- package/es/team/members/member.js +3 -3
- package/lib/actions.js +2 -2
- package/lib/analytics/card.js +2 -2
- package/lib/analytics/chart.js +2 -2
- package/lib/analytics/disk.js +2 -2
- package/lib/analytics/traffic.js +2 -2
- package/lib/blocklet/actions.js +2 -2
- package/lib/blocklet/add-cert.js +2 -2
- package/lib/blocklet/agreement-app.js +2 -2
- package/lib/blocklet/agreement.js +70 -14
- package/lib/blocklet/app-avatar.js +2 -2
- package/lib/blocklet/bundle-avatar.js +2 -2
- package/lib/blocklet/component/add-component-button.js +57 -0
- package/lib/blocklet/component/add-component-core.js +40 -15
- package/lib/blocklet/component/add-component-dialog.js +85 -0
- package/lib/blocklet/component/button.js +2 -2
- package/lib/blocklet/component/component-cell.js +507 -0
- package/lib/blocklet/component/delete.js +2 -2
- package/lib/blocklet/component/did-space/connect-to.js +2 -2
- package/lib/blocklet/component/did-space/disconnect.js +2 -2
- package/lib/blocklet/component/did-space/item.js +2 -2
- package/lib/blocklet/component/domain-list.js +2 -2
- package/lib/blocklet/component/environment.js +2 -2
- package/lib/blocklet/component/index.js +76 -539
- package/lib/blocklet/component/line.js +7 -3
- package/lib/blocklet/component/navigation/navigation-dialog.js +2 -2
- package/lib/blocklet/component/navigation/simple-select.js +2 -2
- package/lib/blocklet/component/optional-component-cell.js +112 -0
- package/lib/blocklet/component/related-components-dialog.js +196 -0
- package/lib/blocklet/component/select-store.js +2 -2
- package/lib/blocklet/component/setting.js +2 -2
- package/lib/blocklet/component/sortable-tree.js +2 -2
- package/lib/blocklet/component/space-connector.js +2 -2
- package/lib/blocklet/component/space-selector.js +2 -2
- package/lib/blocklet/component/store-blocklet-list.js +10 -3
- package/lib/blocklet/component/switch-control.js +2 -2
- package/lib/blocklet/config-navigation.js +4 -3
- package/lib/blocklet/configuration.js +2 -2
- package/lib/blocklet/disk-info.js +2 -2
- package/lib/blocklet/install-from-url.js +2 -2
- package/lib/blocklet/log.js +2 -2
- package/lib/blocklet/mode.js +2 -2
- package/lib/blocklet/notification/email.js +2 -2
- package/lib/blocklet/oauth/auth0.js +2 -2
- package/lib/blocklet/oauth/common-settings.js +2 -2
- package/lib/blocklet/page-group.js +2 -2
- package/lib/blocklet/preferences/index.js +2 -2
- package/lib/blocklet/publish/create-project.js +2 -2
- package/lib/blocklet/publish/create-release.js +2 -2
- package/lib/blocklet/purchase/component-purchase.js +2 -2
- package/lib/blocklet/resource-type.js +2 -2
- package/lib/blocklet/router/action/add-domain-alias.js +2 -2
- package/lib/blocklet/router/action/add-rule.js +2 -2
- package/lib/blocklet/router/action/config-routing-rule.js +2 -2
- package/lib/blocklet/router/action/update-rule.js +2 -2
- package/lib/blocklet/router/add-domain.js +2 -2
- package/lib/blocklet/router/dns-tip.js +2 -2
- package/lib/blocklet/router/rule-actions.js +2 -2
- package/lib/blocklet/router/rule-list.js +2 -2
- package/lib/blocklet/runtime-info.js +2 -2
- package/lib/blocklet/status.js +2 -2
- package/lib/blocklet/storage/action.js +2 -2
- package/lib/blocklet/storage/auto-backup.js +2 -2
- package/lib/blocklet/storage/auto-check-update.js +2 -2
- package/lib/blocklet/storage/backups.js +2 -2
- package/lib/blocklet/storage/connect-to.js +2 -2
- package/lib/blocklet/storage/disconnect.js +2 -2
- package/lib/blocklet/storage/item.js +2 -2
- package/lib/blocklet/storage/preview-nft.js +2 -2
- package/lib/blocklet/version.js +2 -2
- package/lib/clear-cache.js +2 -2
- package/lib/click-to-copy.js +2 -2
- package/lib/confirm.js +2 -2
- package/lib/contexts/blocklet-storage.js +2 -2
- package/lib/contexts/node.js +2 -2
- package/lib/delete-confirm.js +2 -2
- package/lib/did-address.js +2 -2
- package/lib/empty-spinner.js +2 -2
- package/lib/form/form-autocomplete-input.js +2 -2
- package/lib/form/form-select-input.js +2 -2
- package/lib/form/form-text-input.js +2 -2
- package/lib/hooks/blocklet.js +2 -2
- package/lib/hooks/url-evaluation.js +2 -2
- package/lib/hooks/use-backup-progress.js +2 -2
- package/lib/hooks/use-check-update-by-url.js +0 -1
- package/lib/hooks/use-components-by-blocklet-meta-url.js +42 -0
- package/lib/hooks/use-install-component-by-url.js +73 -0
- package/lib/hooks/use-navigation.js +2 -18
- package/lib/images.js +2 -2
- package/lib/invitation/invitation-app.js +2 -2
- package/lib/invitation/invitation-receive.js +2 -2
- package/lib/launch-blocklet/content-layout.js +2 -2
- package/lib/layout/addon.js +2 -2
- package/lib/locales/ar.js +13 -4
- package/lib/locales/de.js +13 -4
- package/lib/locales/en.js +6 -0
- package/lib/locales/es.js +13 -4
- package/lib/locales/fr.js +13 -4
- package/lib/locales/hi.js +13 -4
- package/lib/locales/i18n.db +0 -0
- package/lib/locales/id.js +13 -4
- package/lib/locales/ja.js +13 -4
- package/lib/locales/ko.js +13 -4
- package/lib/locales/pt.js +13 -4
- package/lib/locales/ru.js +13 -4
- package/lib/locales/th.js +13 -4
- package/lib/locales/vi.js +13 -4
- package/lib/locales/zh-tw.js +13 -4
- package/lib/locales/zh.js +10 -3
- package/lib/logs/log-terminal.js +2 -2
- package/lib/nav-logo.js +2 -2
- package/lib/notifications/default-icon-variants.js +2 -2
- package/lib/notifications/notification.js +2 -2
- package/lib/notifications/tag.js +2 -2
- package/lib/passport-tag.js +2 -2
- package/lib/permission.js +2 -2
- package/lib/relative-time.js +2 -2
- package/lib/schema-form/index.js +2 -2
- package/lib/schema-form/passport-input.js +2 -2
- package/lib/schema-form/text-input.js +2 -2
- package/lib/subscription.js +2 -2
- package/lib/tag.js +2 -2
- package/lib/team/members/index.js +5 -4
- package/lib/team/members/member.js +3 -3
- package/lib/team/members/passport-item.js +2 -2
- package/lib/team/members/passports.js +2 -2
- package/lib/team/passports/color.js +2 -2
- package/lib/team/passports/detail.js +2 -2
- package/lib/team/passports/trusted-factories.js +2 -2
- package/lib/team/passports/trusted-issuer.js +2 -2
- package/lib/team/passports/trusted-issuers.js +2 -2
- package/lib/team/search-input.js +2 -2
- package/lib/util/space-gateway.js +2 -2
- package/lib/wrap-locale.js +2 -2
- package/package.json +25 -23
- package/es/blocklet/component/add.js +0 -95
- package/lib/blocklet/component/add.js +0 -100
|
@@ -0,0 +1,507 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.StyledComponentRow = exports.StyledBadge = void 0;
|
|
7
|
+
exports.default = ComponentCell;
|
|
8
|
+
var _context = require("@arcblock/ux/lib/Locale/context");
|
|
9
|
+
var _react = require("react");
|
|
10
|
+
var _styled = _interopRequireDefault(require("@emotion/styled"));
|
|
11
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
12
|
+
var _Badge = _interopRequireDefault(require("@mui/material/Badge"));
|
|
13
|
+
var _InfoOutlined = _interopRequireDefault(require("@mui/icons-material/InfoOutlined"));
|
|
14
|
+
var _Launch = _interopRequireDefault(require("@mui/icons-material/Launch"));
|
|
15
|
+
var _Replay = _interopRequireDefault(require("@mui/icons-material/Replay"));
|
|
16
|
+
var _Autorenew = _interopRequireDefault(require("@mui/icons-material/Autorenew"));
|
|
17
|
+
var _IconButton = _interopRequireDefault(require("@mui/material/IconButton"));
|
|
18
|
+
var _Delete = _interopRequireDefault(require("@mui/icons-material/Delete"));
|
|
19
|
+
var _Dialog = _interopRequireDefault(require("@mui/material/Dialog"));
|
|
20
|
+
var _DialogContent = _interopRequireDefault(require("@mui/material/DialogContent"));
|
|
21
|
+
var _DialogTitle = _interopRequireDefault(require("@mui/material/DialogTitle"));
|
|
22
|
+
var _react2 = require("@iconify/react");
|
|
23
|
+
var _InfoRow = _interopRequireDefault(require("@arcblock/ux/lib/InfoRow"));
|
|
24
|
+
var _Tooltip = _interopRequireDefault(require("@mui/material/Tooltip"));
|
|
25
|
+
var _Box = _interopRequireDefault(require("@mui/material/Box"));
|
|
26
|
+
var _normalizePathPrefix = _interopRequireDefault(require("@abtnode/util/lib/normalize-path-prefix"));
|
|
27
|
+
var _util = require("@blocklet/meta/lib/util");
|
|
28
|
+
var _SettingsOutlined = _interopRequireDefault(require("@mui/icons-material/SettingsOutlined"));
|
|
29
|
+
var _deletingBlocklets = require("../../contexts/deleting-blocklets");
|
|
30
|
+
var _tag = _interopRequireDefault(require("../../tag"));
|
|
31
|
+
var _configuration = _interopRequireDefault(require("./configuration"));
|
|
32
|
+
var _util2 = require("../../util");
|
|
33
|
+
var _didAddress = _interopRequireDefault(require("../../did-address"));
|
|
34
|
+
var _blockletSource = _interopRequireDefault(require("../blocklet-source"));
|
|
35
|
+
var _status = _interopRequireDefault(require("../status"));
|
|
36
|
+
var _version = _interopRequireDefault(require("../version"));
|
|
37
|
+
var _confirm = _interopRequireDefault(require("../../confirm"));
|
|
38
|
+
var _bundleAvatar = _interopRequireDefault(require("../bundle-avatar"));
|
|
39
|
+
var _mode = _interopRequireDefault(require("../mode"));
|
|
40
|
+
var _delete = _interopRequireDefault(require("./delete"));
|
|
41
|
+
var _start = _interopRequireDefault(require("./start"));
|
|
42
|
+
var _line = _interopRequireDefault(require("./line"));
|
|
43
|
+
var _actions = _interopRequireDefault(require("../../actions"));
|
|
44
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
45
|
+
var _templateObject, _templateObject2;
|
|
46
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
47
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
48
|
+
const getEngineRows = (engine, t) => {
|
|
49
|
+
if (!engine) {
|
|
50
|
+
return [];
|
|
51
|
+
}
|
|
52
|
+
return [{
|
|
53
|
+
name: t('common.name'),
|
|
54
|
+
value: engine.displayName
|
|
55
|
+
}, {
|
|
56
|
+
name: t('common.description'),
|
|
57
|
+
value: engine.description
|
|
58
|
+
}, {
|
|
59
|
+
name: t('common.version'),
|
|
60
|
+
value: /*#__PURE__*/(0, _jsxRuntime.jsx)(_tag.default, {
|
|
61
|
+
children: engine.version
|
|
62
|
+
})
|
|
63
|
+
}];
|
|
64
|
+
};
|
|
65
|
+
const getSourceInfo = blocklet => {
|
|
66
|
+
const {
|
|
67
|
+
source,
|
|
68
|
+
deployedFrom,
|
|
69
|
+
bundleSource
|
|
70
|
+
} = blocklet;
|
|
71
|
+
if (source) {
|
|
72
|
+
return {
|
|
73
|
+
source,
|
|
74
|
+
deployedFrom
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
if (!bundleSource) {
|
|
78
|
+
return {
|
|
79
|
+
source: 'upload',
|
|
80
|
+
deployedFrom
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
if (bundleSource.url) {
|
|
84
|
+
return {
|
|
85
|
+
source: 'url',
|
|
86
|
+
deployedFrom: deployedFrom || Array.isArray(bundleSource.url) ? bundleSource.url[0] : bundleSource.url
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
if (bundleSource.store) {
|
|
90
|
+
return {
|
|
91
|
+
source: 'registry',
|
|
92
|
+
deployedFrom: deployedFrom || Array.isArray(bundleSource.store) ? bundleSource.store[0] : bundleSource.store
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
return {};
|
|
96
|
+
};
|
|
97
|
+
const getComponentName = (componentId, app) => {
|
|
98
|
+
const ids = componentId.split('/').slice(1);
|
|
99
|
+
let parent = app;
|
|
100
|
+
let index = 0;
|
|
101
|
+
const names = [];
|
|
102
|
+
while (parent && index < ids.length) {
|
|
103
|
+
// eslint-disable-next-line no-loop-func
|
|
104
|
+
const component = parent.children.find(x => x.meta.did === ids[index]);
|
|
105
|
+
parent = component;
|
|
106
|
+
index++;
|
|
107
|
+
if (component) {
|
|
108
|
+
names.push(component.meta.title);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
return names.join(' / ');
|
|
112
|
+
};
|
|
113
|
+
const isPack = component => {
|
|
114
|
+
var _component$meta;
|
|
115
|
+
return (component === null || component === void 0 ? void 0 : (_component$meta = component.meta) === null || _component$meta === void 0 ? void 0 : _component$meta.group) === 'pack';
|
|
116
|
+
};
|
|
117
|
+
function ComponentCell(_ref) {
|
|
118
|
+
var _blocklet$dependents, _blocklet$meta$resour, _blocklet$dependents2, _blocklet$meta, _blocklet$dependents3;
|
|
119
|
+
let {
|
|
120
|
+
blocklet,
|
|
121
|
+
ancestors,
|
|
122
|
+
depth,
|
|
123
|
+
onRemove,
|
|
124
|
+
onStart,
|
|
125
|
+
onStop,
|
|
126
|
+
onRestart,
|
|
127
|
+
onReload,
|
|
128
|
+
getComponentUrl,
|
|
129
|
+
app
|
|
130
|
+
} = _ref;
|
|
131
|
+
const {
|
|
132
|
+
t,
|
|
133
|
+
locale
|
|
134
|
+
} = (0, _react.useContext)(_context.LocaleContext);
|
|
135
|
+
const [componentInfo, setComponentInfo] = (0, _react.useState)();
|
|
136
|
+
const [showDeleteConfirm, setShowDeleteConfirm] = (0, _react.useState)(false);
|
|
137
|
+
const [loading, setLoading] = (0, _react.useState)(false);
|
|
138
|
+
const [confirmSetting, setConfirmSetting] = (0, _react.useState)(null);
|
|
139
|
+
const {
|
|
140
|
+
deletingBlocklets: deletingComponents
|
|
141
|
+
} = (0, _deletingBlocklets.useDeletingBlockletContext)();
|
|
142
|
+
let {
|
|
143
|
+
status
|
|
144
|
+
} = blocklet;
|
|
145
|
+
if (depth === 1 && deletingComponents.includes(blocklet.meta.did)) {
|
|
146
|
+
status = 'deleting';
|
|
147
|
+
}
|
|
148
|
+
const mountPoint = "/".concat(blocklet.mountPoint || '/').replace(/\/+/g, '/');
|
|
149
|
+
const href = getComponentUrl(mountPoint);
|
|
150
|
+
const renderRows = rows => rows.map(row => {
|
|
151
|
+
if (row.name === t('common.did') || row.name === t('blocklet.appId')) {
|
|
152
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_InfoRow.default, {
|
|
153
|
+
valueComponent: "div",
|
|
154
|
+
nameWidth: 120,
|
|
155
|
+
name: row.name,
|
|
156
|
+
nameFormatter: () => row.name,
|
|
157
|
+
children: row.value
|
|
158
|
+
}, row.name);
|
|
159
|
+
}
|
|
160
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_InfoRow.default, {
|
|
161
|
+
valueComponent: "div",
|
|
162
|
+
nameWidth: 120,
|
|
163
|
+
name: row.name,
|
|
164
|
+
children: row.value
|
|
165
|
+
}, row.name);
|
|
166
|
+
});
|
|
167
|
+
const sourceInfo = componentInfo ? getSourceInfo(componentInfo) : {};
|
|
168
|
+
const componentRows = componentInfo ? [{
|
|
169
|
+
name: t('common.name'),
|
|
170
|
+
value: (0, _util.getDisplayName)(componentInfo, true)
|
|
171
|
+
}, {
|
|
172
|
+
name: t('common.version'),
|
|
173
|
+
value: /*#__PURE__*/(0, _jsxRuntime.jsx)(_version.default, {
|
|
174
|
+
blocklet: componentInfo,
|
|
175
|
+
checkUpgrade: false
|
|
176
|
+
})
|
|
177
|
+
}, {
|
|
178
|
+
name: t('common.status'),
|
|
179
|
+
value: /*#__PURE__*/(0, _jsxRuntime.jsx)(_status.default, {
|
|
180
|
+
status: status,
|
|
181
|
+
source: componentInfo.source,
|
|
182
|
+
progress: blocklet.progress
|
|
183
|
+
})
|
|
184
|
+
}, blocklet.status === 'running' ? {
|
|
185
|
+
name: t('blocklet.startedAt'),
|
|
186
|
+
value: (0, _util2.formatToDatetime)(blocklet.startedAt, locale)
|
|
187
|
+
} : null, blocklet.status !== 'running' ? {
|
|
188
|
+
name: t('blocklet.stoppedAt'),
|
|
189
|
+
value: (0, _util2.formatToDatetime)(blocklet.stoppedAt, locale)
|
|
190
|
+
} : null, blocklet.installedAt ? {
|
|
191
|
+
name: t('blocklet.installedAt'),
|
|
192
|
+
value: (0, _util2.formatToDatetime)(blocklet.installedAt, locale)
|
|
193
|
+
} : null, (0, _util.hasStartEngine)(blocklet.meta) ? {
|
|
194
|
+
name: t('common.mountPoint'),
|
|
195
|
+
value: mountPoint
|
|
196
|
+
} : null, componentInfo.meta.group ? {
|
|
197
|
+
name: t('common.group'),
|
|
198
|
+
value: /*#__PURE__*/(0, _jsxRuntime.jsx)(_tag.default, {
|
|
199
|
+
type: "success",
|
|
200
|
+
children: componentInfo.meta.group
|
|
201
|
+
})
|
|
202
|
+
} : null, {
|
|
203
|
+
name: t('blocklet.overview.source'),
|
|
204
|
+
value: /*#__PURE__*/(0, _jsxRuntime.jsx)(_blockletSource.default, {
|
|
205
|
+
sourceInfo: sourceInfo,
|
|
206
|
+
blocklet: blocklet
|
|
207
|
+
})
|
|
208
|
+
}, {
|
|
209
|
+
name: t('blocklet.overview.deployedFrom'),
|
|
210
|
+
value: sourceInfo.deployedFrom || '-'
|
|
211
|
+
}, {
|
|
212
|
+
name: t('common.did'),
|
|
213
|
+
value: /*#__PURE__*/(0, _jsxRuntime.jsx)(_didAddress.default, {
|
|
214
|
+
did: componentInfo.meta.did
|
|
215
|
+
})
|
|
216
|
+
}, {
|
|
217
|
+
name: t('common.author'),
|
|
218
|
+
value: (0, _util2.formatPerson)(componentInfo.meta.author)
|
|
219
|
+
}, {
|
|
220
|
+
name: t('common.engine'),
|
|
221
|
+
value: getEngineRows(componentInfo.engine, t).map(_ref2 => {
|
|
222
|
+
let {
|
|
223
|
+
name,
|
|
224
|
+
value
|
|
225
|
+
} = _ref2;
|
|
226
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_InfoRow.default, {
|
|
227
|
+
style: {
|
|
228
|
+
marginBottom: 4
|
|
229
|
+
},
|
|
230
|
+
nameWidth: 120,
|
|
231
|
+
name: name,
|
|
232
|
+
children: value
|
|
233
|
+
}, name);
|
|
234
|
+
})
|
|
235
|
+
}, (_blocklet$dependents = blocklet.dependents) !== null && _blocklet$dependents !== void 0 && _blocklet$dependents.length ? {
|
|
236
|
+
name: t('common.dependents'),
|
|
237
|
+
value: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Box.default, {
|
|
238
|
+
children: blocklet.dependents.map(x => /*#__PURE__*/(0, _jsxRuntime.jsx)(_Box.default, {
|
|
239
|
+
children: "".concat(getComponentName(x.id, app), " ").concat(x.required ? "(".concat(t('common.required'), ")") : '')
|
|
240
|
+
}, x.id))
|
|
241
|
+
})
|
|
242
|
+
} : null, (_blocklet$meta$resour = blocklet.meta.resources) !== null && _blocklet$meta$resour !== void 0 && _blocklet$meta$resour.length ? {
|
|
243
|
+
name: t('common.resource'),
|
|
244
|
+
value: blocklet.meta.resources.join(', ')
|
|
245
|
+
} : null].filter(Boolean) : [];
|
|
246
|
+
const appInProgress = (0, _util.isInProgress)(app.status);
|
|
247
|
+
const componentInProgress = (0, _util.isInProgress)(blocklet.status);
|
|
248
|
+
let deleteDisabledTip = '';
|
|
249
|
+
if (appInProgress || componentInProgress || depth === 1 && deletingComponents.includes(blocklet.meta.did)) {
|
|
250
|
+
deleteDisabledTip = t('blocklet.component.tip.stopBlocklet');
|
|
251
|
+
} else if ((_blocklet$dependents2 = blocklet.dependents) !== null && _blocklet$dependents2 !== void 0 && _blocklet$dependents2.length) {
|
|
252
|
+
const requires = blocklet.dependents.filter(x => x.required);
|
|
253
|
+
if (requires.length) {
|
|
254
|
+
const names = requires.map(x => getComponentName(x.id, app));
|
|
255
|
+
deleteDisabledTip = t('blocklet.component.tip.requiredBy', {
|
|
256
|
+
name: names.join(', ')
|
|
257
|
+
});
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
return [/*#__PURE__*/(0, _jsxRuntime.jsxs)(StyledComponentRow, {
|
|
261
|
+
display: "flex",
|
|
262
|
+
py: 2,
|
|
263
|
+
className: "component-item",
|
|
264
|
+
justifyContent: "flex-start",
|
|
265
|
+
alignItems: "center",
|
|
266
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_Box.default, {
|
|
267
|
+
width: {
|
|
268
|
+
xs: 300,
|
|
269
|
+
md: 300
|
|
270
|
+
},
|
|
271
|
+
display: "flex",
|
|
272
|
+
alignItems: "center",
|
|
273
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_bundleAvatar.default, {
|
|
274
|
+
blocklet: blocklet,
|
|
275
|
+
ancestors: ancestors
|
|
276
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Box.default, {
|
|
277
|
+
ml: "16px",
|
|
278
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_Box.default, {
|
|
279
|
+
className: "component-header",
|
|
280
|
+
onClick: () => setComponentInfo(blocklet),
|
|
281
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Box.default, {
|
|
282
|
+
className: "component-name",
|
|
283
|
+
children: (0, _util.getDisplayName)(blocklet, true)
|
|
284
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Box.default, {
|
|
285
|
+
className: "component-version",
|
|
286
|
+
children: blocklet === null || blocklet === void 0 ? void 0 : (_blocklet$meta = blocklet.meta) === null || _blocklet$meta === void 0 ? void 0 : _blocklet$meta.version
|
|
287
|
+
})]
|
|
288
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Box.default, {
|
|
289
|
+
display: "flex",
|
|
290
|
+
alignItems: "center",
|
|
291
|
+
sx: {
|
|
292
|
+
mt: '2px',
|
|
293
|
+
ml: -0.5
|
|
294
|
+
},
|
|
295
|
+
children: [status !== 'unknown' && /*#__PURE__*/(0, _jsxRuntime.jsx)(_status.default, {
|
|
296
|
+
style: {
|
|
297
|
+
marginLeft: 4
|
|
298
|
+
},
|
|
299
|
+
status: status,
|
|
300
|
+
source: blocklet.source,
|
|
301
|
+
progress: blocklet.progress
|
|
302
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_mode.default, {
|
|
303
|
+
style: {
|
|
304
|
+
marginLeft: 4
|
|
305
|
+
},
|
|
306
|
+
mode: blocklet.mode || ''
|
|
307
|
+
}), !!((_blocklet$dependents3 = blocklet.dependents) !== null && _blocklet$dependents3 !== void 0 && _blocklet$dependents3.length) && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Tooltip.default, {
|
|
308
|
+
title: ["".concat(t('common.dependents'), ": "), blocklet.dependents.map(x => /*#__PURE__*/(0, _jsxRuntime.jsx)(_Box.default, {
|
|
309
|
+
pl: 1,
|
|
310
|
+
children: "".concat(getComponentName(x.id, app), " ").concat(x.required ? "(".concat(t('common.required'), ")") : '')
|
|
311
|
+
}, x.id))],
|
|
312
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Box.default, {
|
|
313
|
+
display: "flex",
|
|
314
|
+
color: "primary.main",
|
|
315
|
+
ml: 1,
|
|
316
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_react2.Icon, {
|
|
317
|
+
icon: "octicon:package-dependents-16"
|
|
318
|
+
})
|
|
319
|
+
})
|
|
320
|
+
})]
|
|
321
|
+
})]
|
|
322
|
+
})]
|
|
323
|
+
}, blocklet), (0, _util.hasStartEngine)(blocklet.meta) && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Box.default, {
|
|
324
|
+
sx: {
|
|
325
|
+
display: {
|
|
326
|
+
xs: 'none',
|
|
327
|
+
md: 'flex'
|
|
328
|
+
}
|
|
329
|
+
},
|
|
330
|
+
alignItems: "center",
|
|
331
|
+
flexGrow: "1",
|
|
332
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("a", {
|
|
333
|
+
target: "_blank",
|
|
334
|
+
href: href,
|
|
335
|
+
rel: "noopener noreferrer",
|
|
336
|
+
title: href,
|
|
337
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Box.default, {
|
|
338
|
+
maxWidth: 400,
|
|
339
|
+
sx: {
|
|
340
|
+
color: 'secondary.main',
|
|
341
|
+
fontSize: 16,
|
|
342
|
+
px: 2
|
|
343
|
+
},
|
|
344
|
+
overflow: "hidden",
|
|
345
|
+
whiteSpace: "nowrap",
|
|
346
|
+
textOverflow: "ellipsis",
|
|
347
|
+
children: (0, _normalizePathPrefix.default)(mountPoint)
|
|
348
|
+
})
|
|
349
|
+
})
|
|
350
|
+
}, mountPoint), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
351
|
+
style: {
|
|
352
|
+
flex: 1
|
|
353
|
+
}
|
|
354
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Box.default, {
|
|
355
|
+
display: "flex",
|
|
356
|
+
alignItems: "center",
|
|
357
|
+
children: [(0, _util.hasStartEngine)(blocklet.meta) && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Tooltip.default, {
|
|
358
|
+
title: t('common.visit'),
|
|
359
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("a", {
|
|
360
|
+
target: "_blank",
|
|
361
|
+
href: href,
|
|
362
|
+
rel: "noopener noreferrer",
|
|
363
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_IconButton.default, {
|
|
364
|
+
size: "small",
|
|
365
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Launch.default, {})
|
|
366
|
+
})
|
|
367
|
+
})
|
|
368
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_configuration.default, {
|
|
369
|
+
blocklet: blocklet,
|
|
370
|
+
ancestors: ancestors,
|
|
371
|
+
children: _ref3 => {
|
|
372
|
+
let {
|
|
373
|
+
open
|
|
374
|
+
} = _ref3;
|
|
375
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Tooltip.default, {
|
|
376
|
+
title: t('common.config'),
|
|
377
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(StyledBadge, {
|
|
378
|
+
color: "error",
|
|
379
|
+
badgeContent: "",
|
|
380
|
+
variant: "dot",
|
|
381
|
+
invisible: !(0, _util.getComponentMissingConfigs)(blocklet, ancestors[0]).length,
|
|
382
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_IconButton.default, {
|
|
383
|
+
onClick: open,
|
|
384
|
+
size: "small",
|
|
385
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_SettingsOutlined.default, {})
|
|
386
|
+
})
|
|
387
|
+
})
|
|
388
|
+
}, "config");
|
|
389
|
+
}
|
|
390
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_start.default, {
|
|
391
|
+
blocklet: app,
|
|
392
|
+
component: blocklet,
|
|
393
|
+
onStart: onStart,
|
|
394
|
+
onStop: onStop,
|
|
395
|
+
disabled: !['starting', 'stopping'].includes(app.status) && (0, _util.isInProgress)(app.status)
|
|
396
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_actions.default, {
|
|
397
|
+
"data-cy": "component-actions",
|
|
398
|
+
actions: [(0, _util.hasStartEngine)(blocklet.meta) ? {
|
|
399
|
+
icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_InfoOutlined.default, {}),
|
|
400
|
+
text: t('common.detail'),
|
|
401
|
+
onClick: () => {
|
|
402
|
+
setComponentInfo(blocklet);
|
|
403
|
+
}
|
|
404
|
+
} : null, !isPack(blocklet) && {
|
|
405
|
+
icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Replay.default, {}),
|
|
406
|
+
text: t('common.restart'),
|
|
407
|
+
onClick: () => {
|
|
408
|
+
setConfirmSetting({
|
|
409
|
+
title: "".concat(t('common.restart'), " ").concat(blocklet.meta.title),
|
|
410
|
+
description: t('blocklet.action.restartDescription'),
|
|
411
|
+
confirm: t('blocklet.action.confirmRestart'),
|
|
412
|
+
cancel: t('common.cancel'),
|
|
413
|
+
onConfirm: async () => {
|
|
414
|
+
setLoading(true);
|
|
415
|
+
await onRestart(blocklet);
|
|
416
|
+
setLoading(false);
|
|
417
|
+
},
|
|
418
|
+
onCancel: () => setConfirmSetting(null)
|
|
419
|
+
});
|
|
420
|
+
},
|
|
421
|
+
disabled: appInProgress || componentInProgress || blocklet.status !== 'running'
|
|
422
|
+
}, !isPack(blocklet) && {
|
|
423
|
+
icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Autorenew.default, {}),
|
|
424
|
+
text: t('common.reload'),
|
|
425
|
+
onClick: async () => {
|
|
426
|
+
setLoading(true);
|
|
427
|
+
await onReload(blocklet);
|
|
428
|
+
setLoading(false);
|
|
429
|
+
},
|
|
430
|
+
disabled: loading || appInProgress || componentInProgress || blocklet.status !== 'running'
|
|
431
|
+
}, {
|
|
432
|
+
icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Delete.default, {}),
|
|
433
|
+
text: t('common.delete'),
|
|
434
|
+
onClick: () => {
|
|
435
|
+
setShowDeleteConfirm(true);
|
|
436
|
+
},
|
|
437
|
+
disabled: appInProgress || componentInProgress || !!deleteDisabledTip,
|
|
438
|
+
tip: deleteDisabledTip
|
|
439
|
+
}].filter(Boolean)
|
|
440
|
+
})]
|
|
441
|
+
}, "actions")]
|
|
442
|
+
}, "group-not-gateway-box"), /*#__PURE__*/(0, _jsxRuntime.jsx)(_line.default, {}, "line"), !!componentInfo && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Dialog.default, {
|
|
443
|
+
open: true,
|
|
444
|
+
fullWidth: true,
|
|
445
|
+
maxWidth: "md",
|
|
446
|
+
onClose: () => {
|
|
447
|
+
setComponentInfo(null);
|
|
448
|
+
},
|
|
449
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Box.default, {
|
|
450
|
+
paddingY: 1.5,
|
|
451
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_DialogTitle.default, {
|
|
452
|
+
children: t('common.componentBasicInfo')
|
|
453
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_DialogContent.default, {
|
|
454
|
+
children: renderRows(componentRows)
|
|
455
|
+
})]
|
|
456
|
+
}, "dialog-wrapper")
|
|
457
|
+
}, "base-info-dialog"), /*#__PURE__*/(0, _jsxRuntime.jsx)(_delete.default, {
|
|
458
|
+
blocklet: app,
|
|
459
|
+
component: blocklet,
|
|
460
|
+
remove: async function remove() {
|
|
461
|
+
setLoading(true);
|
|
462
|
+
try {
|
|
463
|
+
await onRemove(...arguments);
|
|
464
|
+
} catch (_unused) {
|
|
465
|
+
// ignore
|
|
466
|
+
}
|
|
467
|
+
setLoading(false);
|
|
468
|
+
setShowDeleteConfirm(false);
|
|
469
|
+
},
|
|
470
|
+
onCancel: () => setShowDeleteConfirm(false),
|
|
471
|
+
hideBtn: true,
|
|
472
|
+
showConfirm: showDeleteConfirm
|
|
473
|
+
}, "delete-component"), confirmSetting && /*#__PURE__*/(0, _jsxRuntime.jsx)(_confirm.default, {
|
|
474
|
+
title: confirmSetting.title,
|
|
475
|
+
description: confirmSetting.description,
|
|
476
|
+
confirm: confirmSetting.confirm,
|
|
477
|
+
cancel: confirmSetting.cancel,
|
|
478
|
+
params: confirmSetting.params,
|
|
479
|
+
onConfirm: confirmSetting.onConfirm,
|
|
480
|
+
onCancel: confirmSetting.onCancel
|
|
481
|
+
}, "confirm-setting")];
|
|
482
|
+
}
|
|
483
|
+
ComponentCell.propTypes = {
|
|
484
|
+
blocklet: _propTypes.default.object.isRequired,
|
|
485
|
+
ancestors: _propTypes.default.array,
|
|
486
|
+
depth: _propTypes.default.number,
|
|
487
|
+
onRemove: _propTypes.default.func,
|
|
488
|
+
onStart: _propTypes.default.func,
|
|
489
|
+
onStop: _propTypes.default.func,
|
|
490
|
+
onRestart: _propTypes.default.func,
|
|
491
|
+
onReload: _propTypes.default.func,
|
|
492
|
+
getComponentUrl: _propTypes.default.func,
|
|
493
|
+
app: _propTypes.default.object
|
|
494
|
+
};
|
|
495
|
+
ComponentCell.defaultProps = {
|
|
496
|
+
ancestors: [],
|
|
497
|
+
depth: 0,
|
|
498
|
+
onRemove: () => {},
|
|
499
|
+
onStart: () => {},
|
|
500
|
+
onStop: () => {},
|
|
501
|
+
onRestart: () => {},
|
|
502
|
+
onReload: () => {},
|
|
503
|
+
getComponentUrl: () => window.location.origin,
|
|
504
|
+
app: null
|
|
505
|
+
};
|
|
506
|
+
const StyledBadge = exports.StyledBadge = (0, _styled.default)(_Badge.default)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .BaseBadge-badge {\n top: ", "px;\n right: ", "px;\n }\n"])), props => props.top * 8 || 6, props => props.right * 8 || 6);
|
|
507
|
+
const StyledComponentRow = exports.StyledComponentRow = (0, _styled.default)(_Box.default)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n .component-header {\n display: flex;\n align-items: center;\n align-items: flex-end;\n cursor: pointer;\n }\n .component-name {\n color: #222;\n font-size: 16px;\n }\n .component-version {\n color: #999;\n font-size: 12px;\n margin-left: 4px;\n transform: translateY(-1px);\n }\n"])));
|
|
@@ -23,8 +23,8 @@ function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(
|
|
|
23
23
|
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; }
|
|
24
24
|
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; }
|
|
25
25
|
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; }
|
|
26
|
-
function _toPropertyKey(
|
|
27
|
-
function _toPrimitive(
|
|
26
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
|
27
|
+
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); }
|
|
28
28
|
function DeleteComponent(_ref) {
|
|
29
29
|
let {
|
|
30
30
|
component,
|
|
@@ -42,8 +42,8 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
|
|
|
42
42
|
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; }
|
|
43
43
|
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; }
|
|
44
44
|
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; }
|
|
45
|
-
function _toPropertyKey(
|
|
46
|
-
function _toPrimitive(
|
|
45
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
|
46
|
+
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); }
|
|
47
47
|
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; }
|
|
48
48
|
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; }
|
|
49
49
|
function ConnectTo(_ref) {
|
|
@@ -12,8 +12,8 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
12
12
|
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; }
|
|
13
13
|
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; }
|
|
14
14
|
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; }
|
|
15
|
-
function _toPropertyKey(
|
|
16
|
-
function _toPrimitive(
|
|
15
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
|
16
|
+
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); }
|
|
17
17
|
var EmptySpacesNFT = function EmptySpacesNFT(props) {
|
|
18
18
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("svg", _objectSpread(_objectSpread({}, props), {}, {
|
|
19
19
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("g", {
|
|
@@ -27,8 +27,8 @@ function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(
|
|
|
27
27
|
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; }
|
|
28
28
|
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; }
|
|
29
29
|
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; }
|
|
30
|
-
function _toPropertyKey(
|
|
31
|
-
function _toPrimitive(
|
|
30
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
|
31
|
+
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); }
|
|
32
32
|
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; }
|
|
33
33
|
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; }
|
|
34
34
|
var SpacesConnected = function SpacesConnected(props) {
|
|
@@ -52,8 +52,8 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
52
52
|
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; }
|
|
53
53
|
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; }
|
|
54
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; }
|
|
55
|
-
function _toPropertyKey(
|
|
56
|
-
function _toPrimitive(
|
|
55
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
|
56
|
+
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); }
|
|
57
57
|
const BlockletComponent = (0, _permission.withPermission)(DomainList, 'mutate_blocklets');
|
|
58
58
|
const BlockletInServiceComponent = (0, _permission.withPermission)(DomainList, '', _util2.BlockletAdminRoles);
|
|
59
59
|
function DomainListWithPermission(props) {
|
|
@@ -28,8 +28,8 @@ function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(
|
|
|
28
28
|
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; }
|
|
29
29
|
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; }
|
|
30
30
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
31
|
-
function _toPropertyKey(
|
|
32
|
-
function _toPrimitive(
|
|
31
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
|
32
|
+
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 react/no-unstable-nested-components */ /* eslint-disable react/prop-types */
|
|
33
33
|
const getDescription = (data, t) => {
|
|
34
34
|
let {
|
|
35
35
|
description
|