@abtnode/ux 1.16.26-beta-351de484 → 1.16.26-beta-63f52a83

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.
Files changed (59) hide show
  1. package/es/blocklet/app-avatar.js +7 -19
  2. package/es/blocklet/authentication/index.js +1 -3
  3. package/es/blocklet/authentication/oauth/apple.js +39 -15
  4. package/es/blocklet/authentication/oauth/auth0.js +18 -12
  5. package/es/blocklet/authentication/oauth/github.js +10 -9
  6. package/es/blocklet/authentication/oauth/google.js +10 -9
  7. package/es/blocklet/component/component-cell.js +201 -359
  8. package/es/blocklet/component/component-info-dialog.js +257 -0
  9. package/es/blocklet/component/index.js +14 -12
  10. package/es/blocklet/component/store-blocklet-list.js +3 -0
  11. package/es/blocklet/publish/connect-store-list.js +33 -4
  12. package/es/blocklet/publish/create-release.js +9 -4
  13. package/es/blocklet/status.js +13 -7
  14. package/es/locales/ar.js +19 -12
  15. package/es/locales/de.js +19 -12
  16. package/es/locales/en.js +18 -11
  17. package/es/locales/es.js +20 -13
  18. package/es/locales/fr.js +19 -12
  19. package/es/locales/hi.js +19 -12
  20. package/es/locales/i18n.db +0 -0
  21. package/es/locales/id.js +19 -12
  22. package/es/locales/ja.js +19 -12
  23. package/es/locales/ko.js +19 -12
  24. package/es/locales/pt.js +19 -12
  25. package/es/locales/ru.js +19 -12
  26. package/es/locales/th.js +19 -12
  27. package/es/locales/vi.js +19 -12
  28. package/es/locales/zh-tw.js +28 -21
  29. package/es/locales/zh.js +27 -20
  30. package/lib/blocklet/app-avatar.js +7 -20
  31. package/lib/blocklet/authentication/index.js +1 -3
  32. package/lib/blocklet/authentication/oauth/apple.js +51 -28
  33. package/lib/blocklet/authentication/oauth/auth0.js +18 -16
  34. package/lib/blocklet/authentication/oauth/github.js +10 -13
  35. package/lib/blocklet/authentication/oauth/google.js +10 -13
  36. package/lib/blocklet/component/component-cell.js +209 -370
  37. package/lib/blocklet/component/component-info-dialog.js +253 -0
  38. package/lib/blocklet/component/index.js +14 -12
  39. package/lib/blocklet/component/store-blocklet-list.js +3 -0
  40. package/lib/blocklet/publish/connect-store-list.js +32 -3
  41. package/lib/blocklet/publish/create-release.js +9 -4
  42. package/lib/blocklet/status.js +14 -8
  43. package/lib/locales/ar.js +19 -12
  44. package/lib/locales/de.js +19 -12
  45. package/lib/locales/en.js +18 -11
  46. package/lib/locales/es.js +20 -13
  47. package/lib/locales/fr.js +19 -12
  48. package/lib/locales/hi.js +19 -12
  49. package/lib/locales/i18n.db +0 -0
  50. package/lib/locales/id.js +19 -12
  51. package/lib/locales/ja.js +19 -12
  52. package/lib/locales/ko.js +19 -12
  53. package/lib/locales/pt.js +19 -12
  54. package/lib/locales/ru.js +19 -12
  55. package/lib/locales/th.js +19 -12
  56. package/lib/locales/vi.js +19 -12
  57. package/lib/locales/zh-tw.js +28 -21
  58. package/lib/locales/zh.js +27 -20
  59. package/package.json +17 -17
@@ -0,0 +1,253 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.StyledComponentRow = exports.StyledBadge = void 0;
7
+ exports.default = ComponentInfoDialog;
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 _Dialog = _interopRequireDefault(require("@mui/material/Dialog"));
14
+ var _DialogContent = _interopRequireDefault(require("@mui/material/DialogContent"));
15
+ var _DialogTitle = _interopRequireDefault(require("@mui/material/DialogTitle"));
16
+ var _InfoRow = _interopRequireDefault(require("@arcblock/ux/lib/InfoRow"));
17
+ var _Box = _interopRequireDefault(require("@mui/material/Box"));
18
+ var _util = require("@blocklet/meta/lib/util");
19
+ var _deletingBlocklets = require("../../contexts/deleting-blocklets");
20
+ var _tag = _interopRequireDefault(require("../../tag"));
21
+ var _util2 = require("../../util");
22
+ var _didAddress = _interopRequireDefault(require("../../did-address"));
23
+ var _blockletSource = _interopRequireDefault(require("../blocklet-source"));
24
+ var _status = _interopRequireDefault(require("../status"));
25
+ var _version = _interopRequireDefault(require("../version"));
26
+ var _jsxRuntime = require("react/jsx-runtime");
27
+ var _templateObject, _templateObject2;
28
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
29
+ function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
30
+ const isResource = component => {
31
+ var _component$meta;
32
+ return !(component !== null && component !== void 0 && (_component$meta = component.meta) !== null && _component$meta !== void 0 && _component$meta.group);
33
+ };
34
+ const getEngineRows = (engine, t) => {
35
+ if (!engine) {
36
+ return [];
37
+ }
38
+ return [{
39
+ name: t('common.name'),
40
+ value: engine.displayName
41
+ }, {
42
+ name: t('common.description'),
43
+ value: engine.description
44
+ }, {
45
+ name: t('common.version'),
46
+ value: /*#__PURE__*/(0, _jsxRuntime.jsx)(_tag.default, {
47
+ children: engine.version
48
+ })
49
+ }];
50
+ };
51
+ const getSourceInfo = blocklet => {
52
+ const {
53
+ source,
54
+ deployedFrom,
55
+ bundleSource
56
+ } = blocklet;
57
+ if (source) {
58
+ return {
59
+ source,
60
+ deployedFrom
61
+ };
62
+ }
63
+ if (!bundleSource) {
64
+ return {
65
+ source: 'upload',
66
+ deployedFrom
67
+ };
68
+ }
69
+ if (bundleSource.url) {
70
+ return {
71
+ source: 'url',
72
+ deployedFrom: deployedFrom || Array.isArray(bundleSource.url) ? bundleSource.url[0] : bundleSource.url
73
+ };
74
+ }
75
+ if (bundleSource.store) {
76
+ return {
77
+ source: 'registry',
78
+ deployedFrom: deployedFrom || Array.isArray(bundleSource.store) ? bundleSource.store[0] : bundleSource.store
79
+ };
80
+ }
81
+ return {};
82
+ };
83
+ const getComponentName = (componentId, app) => {
84
+ const ids = componentId.split('/').slice(1);
85
+ let parent = app;
86
+ let index = 0;
87
+ const names = [];
88
+ while (parent && index < ids.length) {
89
+ // eslint-disable-next-line no-loop-func
90
+ const component = parent.children.find(x => x.meta.did === ids[index]);
91
+ parent = component;
92
+ index++;
93
+ if (component) {
94
+ names.push(component.meta.title);
95
+ }
96
+ }
97
+ return names.join(' / ');
98
+ };
99
+ function ComponentInfoDialog(_ref) {
100
+ var _blocklet$dependents, _blocklet$meta$resour;
101
+ let {
102
+ blocklet,
103
+ depth,
104
+ componentInfo,
105
+ app,
106
+ onClose: _onClose
107
+ } = _ref;
108
+ const {
109
+ t,
110
+ locale
111
+ } = (0, _react.useContext)(_context.LocaleContext);
112
+ const {
113
+ deletingBlocklets: deletingComponents
114
+ } = (0, _deletingBlocklets.useDeletingBlockletContext)();
115
+ let {
116
+ status
117
+ } = blocklet;
118
+ if (depth === 1 && deletingComponents.includes(blocklet.meta.did)) {
119
+ status = 'deleting';
120
+ }
121
+ const mountPoint = "/".concat(blocklet.mountPoint || '/').replace(/\/+/g, '/');
122
+ const renderRows = rows => rows.map(row => {
123
+ if (row.name === t('common.did') || row.name === t('blocklet.appId')) {
124
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_InfoRow.default, {
125
+ valueComponent: "div",
126
+ nameWidth: 120,
127
+ name: row.name,
128
+ nameFormatter: () => row.name,
129
+ children: row.value
130
+ }, row.name);
131
+ }
132
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_InfoRow.default, {
133
+ valueComponent: "div",
134
+ nameWidth: 120,
135
+ name: row.name,
136
+ children: row.value
137
+ }, row.name);
138
+ });
139
+ const sourceInfo = componentInfo ? getSourceInfo(componentInfo) : {};
140
+ const componentRows = componentInfo ? [{
141
+ name: t('common.name'),
142
+ value: (0, _util.getDisplayName)(componentInfo, true)
143
+ }, {
144
+ name: t('common.version'),
145
+ value: /*#__PURE__*/(0, _jsxRuntime.jsx)(_version.default, {
146
+ blocklet: componentInfo,
147
+ checkUpgrade: false
148
+ })
149
+ }, {
150
+ name: t('common.status'),
151
+ value: /*#__PURE__*/(0, _jsxRuntime.jsx)(_status.default, {
152
+ isResource: isResource(blocklet),
153
+ status: status,
154
+ source: componentInfo.source,
155
+ progress: blocklet.progress
156
+ })
157
+ }, blocklet.status === 'running' ? {
158
+ name: t('blocklet.startedAt'),
159
+ value: (0, _util2.formatToDatetime)(blocklet.startedAt, locale)
160
+ } : null, blocklet.status !== 'running' ? {
161
+ name: t('blocklet.stoppedAt'),
162
+ value: (0, _util2.formatToDatetime)(blocklet.stoppedAt, locale)
163
+ } : null, blocklet.installedAt ? {
164
+ name: t('blocklet.installedAt'),
165
+ value: (0, _util2.formatToDatetime)(blocklet.installedAt, locale)
166
+ } : null, (0, _util.hasStartEngine)(blocklet.meta) ? {
167
+ name: t('common.mountPoint'),
168
+ value: mountPoint
169
+ } : null, componentInfo.meta.group ? {
170
+ name: t('common.group'),
171
+ value: /*#__PURE__*/(0, _jsxRuntime.jsx)(_tag.default, {
172
+ type: "success",
173
+ children: componentInfo.meta.group
174
+ })
175
+ } : null, {
176
+ name: t('blocklet.overview.source'),
177
+ value: /*#__PURE__*/(0, _jsxRuntime.jsx)(_blockletSource.default, {
178
+ sourceInfo: sourceInfo,
179
+ blocklet: blocklet
180
+ })
181
+ }, {
182
+ name: t('blocklet.overview.deployedFrom'),
183
+ value: sourceInfo.deployedFrom || '-'
184
+ }, {
185
+ name: t('common.did'),
186
+ value: /*#__PURE__*/(0, _jsxRuntime.jsx)(_didAddress.default, {
187
+ did: componentInfo.meta.did,
188
+ showQrcode: true
189
+ })
190
+ }, {
191
+ name: t('common.author'),
192
+ value: (0, _util2.formatPerson)(componentInfo.meta.author)
193
+ }, {
194
+ name: t('common.engine'),
195
+ value: getEngineRows(componentInfo.engine, t).map(_ref2 => {
196
+ let {
197
+ name,
198
+ value
199
+ } = _ref2;
200
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_InfoRow.default, {
201
+ style: {
202
+ marginBottom: 4
203
+ },
204
+ nameWidth: 120,
205
+ name: name,
206
+ children: value
207
+ }, name);
208
+ })
209
+ }, (_blocklet$dependents = blocklet.dependents) !== null && _blocklet$dependents !== void 0 && _blocklet$dependents.length ? {
210
+ name: t('common.dependents'),
211
+ value: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Box.default, {
212
+ children: blocklet.dependents.map(x => /*#__PURE__*/(0, _jsxRuntime.jsx)(_Box.default, {
213
+ children: "".concat(getComponentName(x.id, app), " ").concat(x.required ? "(".concat(t('common.required'), ")") : '')
214
+ }, x.id))
215
+ })
216
+ } : null, (_blocklet$meta$resour = blocklet.meta.resources) !== null && _blocklet$meta$resour !== void 0 && _blocklet$meta$resour.length ? {
217
+ name: t('common.resource'),
218
+ value: blocklet.meta.resources.join(', ')
219
+ } : null].filter(Boolean) : [];
220
+ if (!componentInfo) {
221
+ return null;
222
+ }
223
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Dialog.default, {
224
+ open: true,
225
+ fullWidth: true,
226
+ maxWidth: "md",
227
+ onClose: () => {
228
+ _onClose(null);
229
+ },
230
+ children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Box.default, {
231
+ paddingY: 1.5,
232
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_DialogTitle.default, {
233
+ children: t('common.componentBasicInfo')
234
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_DialogContent.default, {
235
+ children: renderRows(componentRows)
236
+ })]
237
+ }, "dialog-wrapper")
238
+ }, "base-info-dialog");
239
+ }
240
+ ComponentInfoDialog.propTypes = {
241
+ blocklet: _propTypes.default.object.isRequired,
242
+ depth: _propTypes.default.number,
243
+ app: _propTypes.default.object,
244
+ componentInfo: _propTypes.default.object,
245
+ onClose: _propTypes.default.func.isRequired
246
+ };
247
+ ComponentInfoDialog.defaultProps = {
248
+ depth: 0,
249
+ app: null,
250
+ componentInfo: null
251
+ };
252
+ 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);
253
+ 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"])));
@@ -396,18 +396,20 @@ function BlockletComponent(_ref) {
396
396
  onReload: reloadComponent,
397
397
  onRestart: restartComponent,
398
398
  getComponentUrl: getComponentUrl
399
- }, "0-".concat(blocklet.meta.did)), blocklet.children.map(component => /*#__PURE__*/(0, _jsxRuntime.jsx)(_componentCell.default, {
400
- depth: 1,
401
- blocklet: component,
402
- ancestors: [blocklet],
403
- app: blocklet,
404
- onRemove: removeComponent,
405
- onStart: startComponent,
406
- onStop: stopComponent,
407
- onReload: reloadComponent,
408
- onRestart: restartComponent,
409
- getComponentUrl: getComponentUrl
410
- }, "1-".concat(component.meta.did)))]
399
+ }, "0-".concat(blocklet.meta.did)), blocklet.children.map(component => {
400
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_componentCell.default, {
401
+ depth: 1,
402
+ blocklet: component,
403
+ ancestors: [blocklet],
404
+ app: blocklet,
405
+ onRemove: removeComponent,
406
+ onStart: startComponent,
407
+ onStop: stopComponent,
408
+ onReload: reloadComponent,
409
+ onRestart: restartComponent,
410
+ getComponentUrl: getComponentUrl
411
+ }, "1-".concat(component.meta.did));
412
+ })]
411
413
  }, "top-blocklet-".concat(blocklet.meta.did)), (_blocklet$optionalCom = blocklet.optionalComponents) === null || _blocklet$optionalCom === void 0 ? void 0 : _blocklet$optionalCom.map(component => /*#__PURE__*/(0, _jsxRuntime.jsx)(_componentCell.StyledComponentRow, {
412
414
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_optionalComponentCell.default, _objectSpread({
413
415
  setInstallComponentMeta: setInstallComponentMeta
@@ -176,6 +176,7 @@ function BlockletList(_ref3) {
176
176
  const endpoint = storeUrl;
177
177
  (0, _react.useEffect)(() => {
178
178
  setFilters({
179
+ showResources: true,
179
180
  resourceType,
180
181
  resourceDid
181
182
  });
@@ -183,6 +184,7 @@ function BlockletList(_ref3) {
183
184
  (0, _react.useEffect)(() => {
184
185
  setInitialized(true);
185
186
  setFilters({
187
+ showResources: true,
186
188
  resourceType,
187
189
  resourceDid
188
190
  });
@@ -193,6 +195,7 @@ function BlockletList(_ref3) {
193
195
  resetKeys: [endpoint],
194
196
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", _objectSpread(_objectSpread({}, rest), {}, {
195
197
  children: initialized && /*#__PURE__*/(0, _jsxRuntime.jsx)(_list.default, {
198
+ showResourcesSwitch: true,
196
199
  blockletRender: blockletRenderProps => {
197
200
  const defaultProps = _objectSpread(_objectSpread({}, blockletRenderProps), {}, {
198
201
  handleButtonClick,
@@ -7,6 +7,10 @@ exports.default = void 0;
7
7
  var _react = require("react");
8
8
  var _propTypes = _interopRequireDefault(require("prop-types"));
9
9
  var _material = require("@mui/material");
10
+ var _Alert = _interopRequireDefault(require("@arcblock/ux/lib/Alert"));
11
+ var _context = require("@arcblock/ux/lib/Locale/context");
12
+ var _Launch = _interopRequireDefault(require("@mui/icons-material/Launch"));
13
+ var _colors = require("@mui/material/colors");
10
14
  var _add = _interopRequireDefault(require("../../store/add"));
11
15
  var _item = _interopRequireDefault(require("../../store/item"));
12
16
  var _jsxRuntime = require("react/jsx-runtime");
@@ -21,8 +25,12 @@ function ConnectStoreList(_ref) {
21
25
  releaseType,
22
26
  publishedStoreIds,
23
27
  onPublish,
24
- onDelete
28
+ onDelete,
29
+ projectType
25
30
  } = _ref;
31
+ const {
32
+ t
33
+ } = (0, _context.useLocaleContext)();
26
34
  const storeList = (blocklet === null || blocklet === void 0 || (_blocklet$settings = blocklet.settings) === null || _blocklet$settings === void 0 ? void 0 : _blocklet$settings.storeList) || [];
27
35
  const connectedMap = (0, _react.useMemo)(() => {
28
36
  if (!(connectedStores !== null && connectedStores !== void 0 && connectedStores.length)) {
@@ -52,7 +60,26 @@ function ConnectStoreList(_ref) {
52
60
  onDelete: onDelete
53
61
  })
54
62
  })
55
- }, x.url)), /*#__PURE__*/(0, _jsxRuntime.jsx)(_add.default, {
63
+ }, x.url)), !!(storeList !== null && storeList !== void 0 && storeList.length) && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Alert.default, {
64
+ type: "info",
65
+ style: {
66
+ width: '100%'
67
+ },
68
+ children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Box, {
69
+ color: _colors.blueGrey[400],
70
+ component: "a",
71
+ href: projectType === 'pack' ? 'https://www.arcblock.io/docs/blocklet-developer/en/5PXToZve-5IXAN1bc8rkpxAc' : 'https://www.arcblock.io/docs/blocklet-developer/en/hB5VWLfg9VnbWsL1JGLuLUfW',
72
+ target: "_blank",
73
+ display: "flex",
74
+ alignItems: "center",
75
+ rel: "noreferrer",
76
+ children: [projectType === 'pack' ? t('blocklet.publish.whyCantSeeInStore') : t('blocklet.publish.whyCantSeeResourceBlockletInStore'), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Launch.default, {
77
+ sx: {
78
+ marginLeft: 1
79
+ }
80
+ })]
81
+ })
82
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_add.default, {
56
83
  onAdd: handleAddStore,
57
84
  teamDid: did,
58
85
  storeList: storeList
@@ -67,9 +94,11 @@ ConnectStoreList.propTypes = {
67
94
  onPublish: _propTypes.default.func,
68
95
  onDelete: _propTypes.default.func,
69
96
  publishedStoreIds: _propTypes.default.arrayOf(_propTypes.default.string),
70
- connectedStores: _propTypes.default.arrayOf(_propTypes.default.object).isRequired
97
+ connectedStores: _propTypes.default.arrayOf(_propTypes.default.object).isRequired,
98
+ projectType: _propTypes.default.string
71
99
  };
72
100
  ConnectStoreList.defaultProps = {
101
+ projectType: '',
73
102
  publishedStoreIds: [],
74
103
  onPublish: () => {},
75
104
  onDelete: () => {}
@@ -222,7 +222,7 @@ function CreateRelease(_ref2) {
222
222
  const data = res.project || {};
223
223
  if (!data.blockletVersion) {
224
224
  data.blockletVersion = '1.0.0';
225
- } else if (_semver.default.valid(data.blockletVersion)) {
225
+ } else if (mode === 'create' && _semver.default.valid(data.blockletVersion)) {
226
226
  data.blockletVersion = _semver.default.inc(data.blockletVersion, 'patch');
227
227
  }
228
228
  const theParams = pickParams(data, blocklet);
@@ -960,12 +960,17 @@ function CreateRelease(_ref2) {
960
960
  onChange: handleChangeSelectedComponents
961
961
  })
962
962
  })]
963
- }), projectType === 'pack' && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Alert.default, {
963
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Alert.default, {
964
964
  type: "info",
965
965
  style: {
966
966
  width: '100%'
967
967
  },
968
- children: t('blocklet.publish.packTip')
968
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Box.default, {
969
+ display: "flex",
970
+ alignItems: "center",
971
+ rel: "noreferrer",
972
+ children: projectType === 'pack' ? t('blocklet.publish.packTip') : t('blocklet.publish.resourceTip')
973
+ })
969
974
  })]
970
975
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Dialog2.default, {
971
976
  title: t('common.connectToStore'),
@@ -975,6 +980,7 @@ function CreateRelease(_ref2) {
975
980
  open: showStoreDialog,
976
981
  onClose: () => setShowStoreDialog(false),
977
982
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_connectStoreList.default, {
983
+ projectType: projectType,
978
984
  blocklet: blocklet,
979
985
  releaseType: ((_params$blockletCompo3 = params.blockletComponents) === null || _params$blockletCompo3 === void 0 ? void 0 : _params$blockletCompo3.length) > 0 ? 'pack' : 'resource',
980
986
  projectId: projectId,
@@ -987,7 +993,6 @@ function CreateRelease(_ref2) {
987
993
  })]
988
994
  }));
989
995
  }
990
- CreateRelease.propTypes = {};
991
996
  CreateRelease.defaultProps = {};
992
997
  const Main = _styled.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .sticky-header {\n margin-top: -12px;\n padding: 12px 0;\n position: sticky;\n top: 0;\n z-index: 99;\n display: flex;\n align-items: center;\n justify-content: space-between;\n background-color: #fff;\n padding-bottom: 12px;\n border-bottom: ", ";\n }\n .screenshot {\n margin-bottom: 16px;\n max-width: 200px;\n max-height: 140px;\n width: 200px;\n height: 140px;\n overflow: hidden;\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: #eee;\n margin-right: 16px;\n position: relative;\n .action {\n visibility: hidden;\n position: absolute;\n top: 0px;\n right: 0px;\n background-color: rgba(0, 0, 0, 0.2);\n color: rgba(255, 255, 255, 0.8);\n }\n &:hover .action {\n visibility: visible;\n }\n }\n .screenshot img {\n width: 100%; /* \u56FE\u50CF\u5BBD\u5EA6\u586B\u5145\u5BB9\u5668 */\n height: auto; /* \u56FE\u50CF\u9AD8\u5EA6\u81EA\u9002\u5E94 */\n }\n .section {\n max-width: 800px;\n &.full-width {\n max-width: 100%;\n }\n .MuiTypography-h3 {\n font-size: 1.1rem;\n font-weight: 700;\n }\n .left {\n flex-shrink: 0;\n width: 140px;\n }\n .MuiTabs-indicator {\n display: none;\n }\n .MuiTypography-subtitle1 {\n width: 120px;\n font-weight: 700;\n font-size: 1rem;\n ", " {\n width: 80px;\n }\n }\n }\n .MuiButtonBase-root {\n a {\n color: inherit;\n }\n }\n .MuiInputBase-multiline .MuiInputAdornment-positionEnd {\n align-self: flex-end;\n .MuiTypography-root {\n font-size: 0.8rem;\n }\n font-size: 0.8rem;\n }\n"])), _ref3 => {
993
998
  let {
@@ -13,7 +13,7 @@ var _util = require("@blocklet/meta/lib/util");
13
13
  var _dot = _interopRequireDefault(require("../dot"));
14
14
  var _tag = _interopRequireDefault(require("../tag"));
15
15
  var _jsxRuntime = require("react/jsx-runtime");
16
- const _excluded = ["status", "variant", "source", "progress"];
16
+ const _excluded = ["isResource", "status", "variant", "source", "progress"];
17
17
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
18
18
  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; }
19
19
  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; }
@@ -28,6 +28,7 @@ const colors = {
28
28
  };
29
29
  function BlockletStatus(_ref) {
30
30
  let {
31
+ isResource,
31
32
  status,
32
33
  variant,
33
34
  source,
@@ -53,7 +54,8 @@ function BlockletStatus(_ref) {
53
54
  upgrading: 'warning',
54
55
  restarting: 'warning',
55
56
  corrupted: 'error',
56
- deleting: 'warning'
57
+ deleting: 'warning',
58
+ resource: 'primary'
57
59
  };
58
60
  const colorMap = {
59
61
  added: colors.grey,
@@ -71,22 +73,24 @@ function BlockletStatus(_ref) {
71
73
  upgrading: colors.yellow,
72
74
  restarting: colors.yellow,
73
75
  corrupted: 'error',
74
- deleting: colors.yellow
76
+ deleting: colors.yellow,
77
+ resource: 'primary'
75
78
  };
76
79
  const inProgress = (0, _util.isInProgress)(status);
77
- const statusTxt = t("blocklet.status.".concat(status));
80
+ const statusType = isResource && status === 'stopped' ? 'resource' : status;
81
+ const statusTxt = t("blocklet.status.".concat(statusType));
78
82
  if (variant === 'dot') {
79
83
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Tooltip.default, {
80
84
  title: t('blocklet.statusTip', {
81
85
  status: statusTxt
82
86
  }),
83
87
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_dot.default, _objectSpread({
84
- color: colorMap[status]
88
+ color: colorMap[statusType]
85
89
  }, rest))
86
90
  });
87
91
  }
88
92
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_tag.default, _objectSpread(_objectSpread({
89
- type: map[status]
93
+ type: map[statusType]
90
94
  }, rest), {}, {
91
95
  children: [inProgress && /*#__PURE__*/(0, _jsxRuntime.jsx)(_CircularProgress.default, {
92
96
  size: 12,
@@ -94,7 +98,7 @@ function BlockletStatus(_ref) {
94
98
  style: {
95
99
  marginRight: 5
96
100
  }
97
- }), statusTxt, status === 'downloading' && progress ? /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
101
+ }), statusTxt, statusType === 'downloading' && progress ? /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
98
102
  style: {
99
103
  marginLeft: 5
100
104
  },
@@ -106,9 +110,11 @@ BlockletStatus.propTypes = {
106
110
  status: _propTypes.default.string.isRequired,
107
111
  variant: _propTypes.default.oneOf(['dot', 'tag']),
108
112
  source: _propTypes.default.string,
109
- progress: _propTypes.default.number
113
+ progress: _propTypes.default.number,
114
+ isResource: _propTypes.default.bool
110
115
  };
111
116
  BlockletStatus.defaultProps = {
117
+ isResource: false,
112
118
  variant: 'tag',
113
119
  source: '',
114
120
  progress: 0
package/lib/locales/ar.js CHANGED
@@ -555,7 +555,8 @@ var _default = exports.default = {
555
555
  corrupted: 'فاسد',
556
556
  purchasing: 'في انتظار الشراء',
557
557
  purchased: 'مشترى',
558
- verifying: 'التحقق من الشراء'
558
+ verifying: 'التحقق من الشراء',
559
+ resource: 'مورد'
559
560
  },
560
561
  list: {
561
562
  download: 'تحميل',
@@ -718,7 +719,10 @@ var _default = exports.default = {
718
719
  tip2: 'لن تكون قادرًا بعد الآن على نشر إصدارات جديدة للبلوكليت المحذوف ، مما يعني أن البلوكليت لن يتم تحديثه في المتجر بعد الآن.',
719
720
  tip3: 'سيؤدي حذف البلوكليت إلى ضرورة نشر الإصدار الحالي منه في المتجر.',
720
721
  description: 'بعد حذف البلوكليت، ستواجه المشكلات التالية، هل أنت متأكد أنك تريد حذفه؟'
721
- }
722
+ },
723
+ resourceTip: 'حاليًا ، كما هو الحال بوصفه كتلة مورد ، لا يمكن تثبيته مباشرة من المتجر.',
724
+ whyCantSeeInStore: 'لماذا لا أستطيع رؤية هذا البلوكليت في المتجر؟',
725
+ whyCantSeeResourceBlockletInStore: 'لماذا لا يمكنني رؤية بلوكليت الموارد هذا في المتجر؟'
722
726
  },
723
727
  titleValidationError: 'يجب أن يكون طول العنوان على الأقل 3 أحرف',
724
728
  descriptionValidationError: 'يجب أن تكون طول الوصف بين 3 و 160 حرفًا'
@@ -1694,8 +1698,9 @@ var _default = exports.default = {
1694
1698
  domain: 'مجال',
1695
1699
  domainDescription: 'مطلوب نطاق Auth0',
1696
1700
  clientId: 'معرف العميل',
1697
- clientIdDescribe: 'مطلوب معرف عميل Auth0',
1698
- clientSecret: 'سر العميل'
1701
+ clientIdDescription: 'مطلوب معرف عميل Auth0',
1702
+ clientSecret: 'سر العميل',
1703
+ clientSecretDescription: 'مطلوب سر العميل لتطبيق المصادقة OAuth الخاص بـ Auth0'
1699
1704
  },
1700
1705
  comingSoon: 'تحت الإنشاء طرق تسجيل الدخول الأخرى.',
1701
1706
  moreLogin: 'تسجيل الدخول المزيد',
@@ -1704,27 +1709,29 @@ var _default = exports.default = {
1704
1709
  github: {
1705
1710
  enable: 'تمكين تسجيل الدخول على Github',
1706
1711
  clientId: 'معرف العميل',
1707
- clientIdDescribe: 'مطلوب معرف عميل (clientId) لتطبيق Github OAuth',
1712
+ clientIdDescription: 'مطلوب معرف عميل (clientId) لتطبيق Github OAuth',
1708
1713
  clientSecret: 'سر العميل',
1709
- clientSecretDescribe: 'مطلوب clientSecret لتطبيق Github OAuth'
1714
+ clientSecretDescription: 'مطلوب clientSecret لتطبيق Github OAuth'
1710
1715
  },
1711
1716
  google: {
1712
1717
  enable: 'تفعيل تسجيل الدخول في جوجل',
1713
1718
  clientId: 'معرف العميل',
1714
- clientIdDescribe: 'مطلوب معرف تطبيق Google OAuth',
1719
+ clientIdDescription: 'مطلوب معرف تطبيق Google OAuth',
1715
1720
  clientSecret: 'سر العميل',
1716
- clientSecretDescribe: 'مطلوب clientSecret لتطبيق Google OAuth'
1721
+ clientSecretDescription: 'مطلوب clientSecret لتطبيق Google OAuth'
1717
1722
  },
1718
1723
  apple: {
1719
1724
  enable: 'تفعيل تسجيل الدخول الخاص بـ آبل',
1720
1725
  teamId: 'رقم فريق',
1721
- teamIdDescribe: 'مطلوب معرف فريق لتطبيق Apple OAuth',
1726
+ teamIdDescription: 'مطلوب معرف فريق لتطبيق Apple OAuth',
1722
1727
  serviceId: 'رقم الخدمة',
1723
- serviceIdDescribe: 'مطلوب معرف خدمة لتطبيق Apple OAuth',
1728
+ serviceIdDescription: 'مطلوب معرف خدمة لتطبيق Apple OAuth',
1724
1729
  keyId: 'مفتاح ID',
1725
- keyIdDescribe: 'مطلوب مفتاح تطبيق OAuth لأبل',
1730
+ keyIdDescription: 'مطلوب مفتاح تطبيق OAuth لأبل',
1726
1731
  authKey: 'مفتاح Auth',
1727
- authKeyDescribe: 'مفتاح المصادقة لتطبيق Apple OAuth مطلوب'
1732
+ authKeyDescription: 'مفتاح المصادقة لتطبيق Apple OAuth مطلوب',
1733
+ bundleId: 'معرف الحزمة',
1734
+ bundleIdDescription: 'معرّف حزمة تطبيق Apple OAuth مطلوب'
1728
1735
  },
1729
1736
  oauth: 'تسجيل الدخول من طرف ثالث'
1730
1737
  },
package/lib/locales/de.js CHANGED
@@ -555,7 +555,8 @@ var _default = exports.default = {
555
555
  corrupted: 'Korrupt',
556
556
  purchasing: 'Warten auf den Kauf',
557
557
  purchased: 'Gekauft',
558
- verifying: 'Kauf überprüfen'
558
+ verifying: 'Kauf überprüfen',
559
+ resource: 'Ressource'
559
560
  },
560
561
  list: {
561
562
  download: 'Herunterladen',
@@ -718,7 +719,10 @@ var _default = exports.default = {
718
719
  tip2: 'Sie können keine neuen Versionen mehr für den gelöschten Blocklet veröffentlichen, was bedeutet, dass das Blocklet nicht mehr im Store aktualisiert wird.',
719
720
  tip3: 'Das Löschen des Blocklets hat keine Auswirkungen auf seine derzeit veröffentlichte Version im Store.',
720
721
  description: 'Nach dem Löschen der Blocklet werden Sie auf die folgenden Probleme stoßen. Sind Sie sicher, dass Sie es löschen möchten?'
721
- }
722
+ },
723
+ resourceTip: 'Zurzeit kann es als Ressourcen-Blocklet nicht direkt aus dem Store installiert werden.',
724
+ whyCantSeeInStore: 'Warum kann ich dieses Blocklet nicht im Store sehen?',
725
+ whyCantSeeResourceBlockletInStore: 'Warum kann ich diesen Ressourcen-Blocklet nicht im Store sehen?'
722
726
  },
723
727
  titleValidationError: 'Die Länge des Titels muss mindestens 3 Zeichen betragen',
724
728
  descriptionValidationError: 'Die Beschreibungslänge muss zwischen 3 und 160 Zeichen liegen'
@@ -1694,8 +1698,9 @@ var _default = exports.default = {
1694
1698
  domain: 'Domain',
1695
1699
  domainDescription: 'Die Domäne von Auth0 ist erforderlich',
1696
1700
  clientId: 'Kunden-ID',
1697
- clientIdDescribe: 'Die clientId von Auth0 ist erforderlich',
1698
- clientSecret: 'Geheimclient'
1701
+ clientIdDescription: 'Die clientId von Auth0 ist erforderlich',
1702
+ clientSecret: 'Geheimclient',
1703
+ clientSecretDescription: 'Auth0-OAuth-Anwendung Der geheime Clientschlüssel ist erforderlich'
1699
1704
  },
1700
1705
  comingSoon: 'Es werden weitere Anmeldeverfahren entwickelt.',
1701
1706
  moreLogin: 'Mehr Anmeldung',
@@ -1704,27 +1709,29 @@ var _default = exports.default = {
1704
1709
  github: {
1705
1710
  enable: 'Aktiviere Github-Anmeldung',
1706
1711
  clientId: 'Client ID',
1707
- clientIdDescribe: 'Für die Github OAuth-Anwendung ist eine clientId erforderlich',
1712
+ clientIdDescription: 'Für die Github OAuth-Anwendung ist eine clientId erforderlich',
1708
1713
  clientSecret: 'Client Secret',
1709
- clientSecretDescribe: 'Für die Github OAuth-Anwendung ist ein clientSecret erforderlich'
1714
+ clientSecretDescription: 'Für die Github OAuth-Anwendung ist ein clientSecret erforderlich'
1710
1715
  },
1711
1716
  google: {
1712
1717
  enable: 'Google-Anmeldung aktivieren',
1713
1718
  clientId: 'Client ID',
1714
- clientIdDescribe: 'Für die Google OAuth-Anwendung ist die Client-ID erforderlich',
1719
+ clientIdDescription: 'Für die Google OAuth-Anwendung ist die Client-ID erforderlich',
1715
1720
  clientSecret: 'Geheimnis des Kunden',
1716
- clientSecretDescribe: 'Für die Google OAuth-Anwendung ist ein clientSecret erforderlich'
1721
+ clientSecretDescription: 'Für die Google OAuth-Anwendung ist ein clientSecret erforderlich'
1717
1722
  },
1718
1723
  apple: {
1719
1724
  enable: 'Anmeldung mit Apple aktivieren',
1720
1725
  teamId: 'Team-ID',
1721
- teamIdDescribe: 'Für die Apple OAuth-Anwendung ist eine Team-ID erforderlich',
1726
+ teamIdDescription: 'Für die Apple OAuth-Anwendung ist eine Team-ID erforderlich',
1722
1727
  serviceId: 'Service-ID',
1723
- serviceIdDescribe: 'Für die Apple OAuth-Anwendung ist eine Dienst-ID erforderlich',
1728
+ serviceIdDescription: 'Für die Apple OAuth-Anwendung ist eine Dienst-ID erforderlich',
1724
1729
  keyId: 'Schlüssel-ID',
1725
- keyIdDescribe: 'Für Apple OAuth ist eine Anwendungsschlüssel-ID erforderlich',
1730
+ keyIdDescription: 'Für Apple OAuth ist eine Anwendungsschlüssel-ID erforderlich',
1726
1731
  authKey: 'Auth Schlüssel',
1727
- authKeyDescribe: 'Authentifizierungsschlüssel für Apple OAuth-Anwendung erforderlich'
1732
+ authKeyDescription: 'Authentifizierungsschlüssel für Apple OAuth-Anwendung erforderlich',
1733
+ bundleId: 'Bundle-ID',
1734
+ bundleIdDescription: 'Die Apple OAuth Anwendungs-Bundle-ID ist erforderlich'
1728
1735
  },
1729
1736
  oauth: 'Drittanbieter-Anmeldung'
1730
1737
  },