@abtnode/ux 1.16.15-beta-d8e7b6c0 → 1.16.15-beta-375899b6

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.
@@ -26,7 +26,7 @@ import Button from '@arcblock/ux/lib/Button';
26
26
  import Alert from '@arcblock/ux/lib/Alert';
27
27
  import AnimationWaiter from '@arcblock/ux/lib/AnimationWaiter';
28
28
  import ResultMessage from '@blocklet/launcher-layout/lib/launch-result-message';
29
- import { getDisplayName, isComponentBlocklet, isFreeBlocklet, getSharedConfigObj } from '@blocklet/meta/lib/util';
29
+ import { getDisplayName, isComponentBlocklet, isFreeBlocklet, getSharedConfigObj, hasStartEngine } from '@blocklet/meta/lib/util';
30
30
  import urlPathFriendly from '@blocklet/meta/lib/url-path-friendly';
31
31
  import Toast from '@arcblock/ux/lib/Toast';
32
32
  import { useNodeContext } from '../../contexts/node';
@@ -812,7 +812,7 @@ export default function AddComponent({
812
812
  onCancel: () => {
813
813
  onCancel();
814
814
  }
815
- }, {
815
+ }, hasStartEngine(meta) && {
816
816
  key: 'config',
817
817
  name: t('common.config'),
818
818
  error,
@@ -29,7 +29,7 @@ import InfoRow from '@arcblock/ux/lib/InfoRow';
29
29
  import { LocaleContext } from '@arcblock/ux/lib/Locale/context';
30
30
  import Button from '@arcblock/ux/lib/Button';
31
31
  import Empty from '@arcblock/ux/lib/Empty';
32
- import { getComponentMissingConfigs, getDisplayName, forEachChildSync, isInProgress } from '@blocklet/meta/lib/util';
32
+ import { getComponentMissingConfigs, getDisplayName, forEachChildSync, isInProgress, hasStartEngine } from '@blocklet/meta/lib/util';
33
33
  import normalizePathPrefix from '@abtnode/util/lib/normalize-path-prefix';
34
34
  import Toast from '@arcblock/ux/lib/Toast';
35
35
  import { useDeletingBlockletContext } from '../../contexts/deleting-blocklets';
@@ -189,16 +189,16 @@ function ComponentItem({
189
189
  } : null, blocklet.status !== 'running' ? {
190
190
  name: t('blocklet.stoppedAt'),
191
191
  value: formatToDatetime(blocklet.stoppedAt, locale)
192
- } : null, {
192
+ } : null, hasStartEngine(blocklet.meta) ? {
193
193
  name: t('common.mountPoint'),
194
194
  value: mountPoint
195
- }, {
195
+ } : null, componentInfo.meta.group ? {
196
196
  name: t('common.group'),
197
197
  value: /*#__PURE__*/_jsx(Tag, {
198
198
  type: "success",
199
199
  children: componentInfo.meta.group
200
200
  })
201
- }, {
201
+ } : null, {
202
202
  name: t('blocklet.overview.source'),
203
203
  value: /*#__PURE__*/_jsx(BlockletSource, {
204
204
  sourceInfo: sourceInfo,
@@ -235,6 +235,9 @@ function ComponentItem({
235
235
  children: `${getComponentName(x.id, app)} ${x.required ? `(${t('common.required')})` : ''}`
236
236
  }))
237
237
  })
238
+ } : null, blocklet.meta.resources?.length ? {
239
+ name: t('common.resource'),
240
+ value: blocklet.meta.resources.join(', ')
238
241
  } : null].filter(Boolean) : [];
239
242
  const appInProgress = isInProgress(app.status);
240
243
  const componentInProgress = isInProgress(blocklet.status);
@@ -306,7 +309,7 @@ function ComponentItem({
306
309
  })]
307
310
  })]
308
311
  })]
309
- }, blocklet), /*#__PURE__*/_jsx(Box, {
312
+ }, blocklet), hasStartEngine(blocklet.meta) && /*#__PURE__*/_jsx(Box, {
310
313
  sx: {
311
314
  display: {
312
315
  xs: 'none',
@@ -336,7 +339,7 @@ function ComponentItem({
336
339
  }, mountPoint), /*#__PURE__*/_jsxs(Box, {
337
340
  display: "flex",
338
341
  alignItems: "center",
339
- children: [/*#__PURE__*/_jsx(Tooltip, {
342
+ children: [hasStartEngine(blocklet.meta) && /*#__PURE__*/_jsx(Tooltip, {
340
343
  title: t('common.visit'),
341
344
  children: /*#__PURE__*/_jsx("a", {
342
345
  target: "_blank",
@@ -347,7 +350,7 @@ function ComponentItem({
347
350
  children: /*#__PURE__*/_jsx(LaunchIcon, {})
348
351
  })
349
352
  })
350
- }), /*#__PURE__*/_jsx(ComponentConfiguration, {
353
+ }), hasStartEngine(blocklet.meta) && /*#__PURE__*/_jsx(ComponentConfiguration, {
351
354
  blocklet: blocklet,
352
355
  ancestors: ancestors,
353
356
  children: ({
@@ -374,13 +377,13 @@ function ComponentItem({
374
377
  disabled: app.status !== 'starting' && isInProgress(app.status)
375
378
  }), /*#__PURE__*/_jsx(Actions, {
376
379
  "data-cy": "component-actions",
377
- actions: [{
380
+ actions: [hasStartEngine(blocklet.meta) ? {
378
381
  icon: /*#__PURE__*/_jsx(InfoOutlinedIcon, {}),
379
382
  text: t('common.detail'),
380
383
  onClick: () => {
381
384
  setComponentInfo(blocklet);
382
385
  }
383
- }, {
386
+ } : null, {
384
387
  icon: /*#__PURE__*/_jsx(RestartIcon, {}),
385
388
  text: t('common.restart'),
386
389
  onClick: () => {
@@ -415,7 +418,7 @@ function ComponentItem({
415
418
  },
416
419
  disabled: appInProgress || componentInProgress || !!deleteDisabledTip,
417
420
  tip: deleteDisabledTip
418
- }]
421
+ }].filter(Boolean)
419
422
  })]
420
423
  }, "actions")]
421
424
  }, "group-not-gateway-box"), /*#__PURE__*/_jsx(Line, {
@@ -820,7 +820,7 @@ function AddComponent(_ref2) {
820
820
  onCancel: () => {
821
821
  _onCancel();
822
822
  }
823
- }, {
823
+ }, (0, _util.hasStartEngine)(meta) && {
824
824
  key: 'config',
825
825
  name: t('common.config'),
826
826
  error,
@@ -138,7 +138,7 @@ const getComponentName = (componentId, app) => {
138
138
  return names.join(' / ');
139
139
  };
140
140
  function ComponentItem(_ref) {
141
- var _blocklet$dependents, _blocklet$dependents2, _blocklet$dependents3;
141
+ var _blocklet$dependents, _blocklet$meta$resour, _blocklet$dependents2, _blocklet$dependents3;
142
142
  let {
143
143
  blocklet,
144
144
  ancestors,
@@ -209,16 +209,16 @@ function ComponentItem(_ref) {
209
209
  } : null, blocklet.status !== 'running' ? {
210
210
  name: t('blocklet.stoppedAt'),
211
211
  value: (0, _util2.formatToDatetime)(blocklet.stoppedAt, locale)
212
- } : null, {
212
+ } : null, (0, _util.hasStartEngine)(blocklet.meta) ? {
213
213
  name: t('common.mountPoint'),
214
214
  value: mountPoint
215
- }, {
215
+ } : null, componentInfo.meta.group ? {
216
216
  name: t('common.group'),
217
217
  value: /*#__PURE__*/(0, _jsxRuntime.jsx)(_tag.default, {
218
218
  type: "success",
219
219
  children: componentInfo.meta.group
220
220
  })
221
- }, {
221
+ } : null, {
222
222
  name: t('blocklet.overview.source'),
223
223
  value: /*#__PURE__*/(0, _jsxRuntime.jsx)(_blockletSource.default, {
224
224
  sourceInfo: sourceInfo,
@@ -258,6 +258,9 @@ function ComponentItem(_ref) {
258
258
  children: "".concat(getComponentName(x.id, app), " ").concat(x.required ? "(".concat(t('common.required'), ")") : '')
259
259
  }))
260
260
  })
261
+ } : null, (_blocklet$meta$resour = blocklet.meta.resources) !== null && _blocklet$meta$resour !== void 0 && _blocklet$meta$resour.length ? {
262
+ name: t('common.resource'),
263
+ value: blocklet.meta.resources.join(', ')
261
264
  } : null].filter(Boolean) : [];
262
265
  const appInProgress = (0, _util.isInProgress)(app.status);
263
266
  const componentInProgress = (0, _util.isInProgress)(blocklet.status);
@@ -329,7 +332,7 @@ function ComponentItem(_ref) {
329
332
  })]
330
333
  })]
331
334
  })]
332
- }, blocklet), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Box.default, {
335
+ }, blocklet), (0, _util.hasStartEngine)(blocklet.meta) && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Box.default, {
333
336
  sx: {
334
337
  display: {
335
338
  xs: 'none',
@@ -359,7 +362,7 @@ function ComponentItem(_ref) {
359
362
  }, mountPoint), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Box.default, {
360
363
  display: "flex",
361
364
  alignItems: "center",
362
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Tooltip.default, {
365
+ children: [(0, _util.hasStartEngine)(blocklet.meta) && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Tooltip.default, {
363
366
  title: t('common.visit'),
364
367
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)("a", {
365
368
  target: "_blank",
@@ -370,7 +373,7 @@ function ComponentItem(_ref) {
370
373
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Launch.default, {})
371
374
  })
372
375
  })
373
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_configuration.default, {
376
+ }), (0, _util.hasStartEngine)(blocklet.meta) && /*#__PURE__*/(0, _jsxRuntime.jsx)(_configuration.default, {
374
377
  blocklet: blocklet,
375
378
  ancestors: ancestors,
376
379
  children: _ref3 => {
@@ -400,13 +403,13 @@ function ComponentItem(_ref) {
400
403
  disabled: app.status !== 'starting' && (0, _util.isInProgress)(app.status)
401
404
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_actions.default, {
402
405
  "data-cy": "component-actions",
403
- actions: [{
406
+ actions: [(0, _util.hasStartEngine)(blocklet.meta) ? {
404
407
  icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_InfoOutlined.default, {}),
405
408
  text: t('common.detail'),
406
409
  onClick: () => {
407
410
  setComponentInfo(blocklet);
408
411
  }
409
- }, {
412
+ } : null, {
410
413
  icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Replay.default, {}),
411
414
  text: t('common.restart'),
412
415
  onClick: () => {
@@ -441,7 +444,7 @@ function ComponentItem(_ref) {
441
444
  },
442
445
  disabled: appInProgress || componentInProgress || !!deleteDisabledTip,
443
446
  tip: deleteDisabledTip
444
- }]
447
+ }].filter(Boolean)
445
448
  })]
446
449
  }, "actions")]
447
450
  }, "group-not-gateway-box"), /*#__PURE__*/(0, _jsxRuntime.jsx)(_line.default, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abtnode/ux",
3
- "version": "1.16.15-beta-d8e7b6c0",
3
+ "version": "1.16.15-beta-375899b6",
4
4
  "description": "UX components shared across abtnode packages",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -27,9 +27,9 @@
27
27
  "author": "linchen <linchen1987@foxmail.com> (http://github.com/linchen1987)",
28
28
  "license": "Apache-2.0",
29
29
  "dependencies": {
30
- "@abtnode/auth": "1.16.15-beta-d8e7b6c0",
31
- "@abtnode/constant": "1.16.15-beta-d8e7b6c0",
32
- "@abtnode/util": "1.16.15-beta-d8e7b6c0",
30
+ "@abtnode/auth": "1.16.15-beta-375899b6",
31
+ "@abtnode/constant": "1.16.15-beta-375899b6",
32
+ "@abtnode/util": "1.16.15-beta-375899b6",
33
33
  "@ahooksjs/use-url-state": "^3.5.1",
34
34
  "@arcblock/did": "^1.18.89",
35
35
  "@arcblock/did-connect": "^2.7.6",
@@ -39,10 +39,10 @@
39
39
  "@arcblock/react-hooks": "^2.7.6",
40
40
  "@arcblock/terminal": "^2.7.6",
41
41
  "@arcblock/ux": "^2.7.6",
42
- "@blocklet/constant": "1.16.15-beta-d8e7b6c0",
42
+ "@blocklet/constant": "1.16.15-beta-375899b6",
43
43
  "@blocklet/launcher-layout": "2.1.93",
44
44
  "@blocklet/list": "^0.12.27",
45
- "@blocklet/meta": "1.16.15-beta-d8e7b6c0",
45
+ "@blocklet/meta": "1.16.15-beta-375899b6",
46
46
  "@blocklet/ui-react": "^2.7.6",
47
47
  "@emotion/react": "^11.10.4",
48
48
  "@emotion/styled": "^11.10.4",
@@ -98,7 +98,7 @@
98
98
  "babel-plugin-inline-react-svg": "^1.1.2",
99
99
  "glob": "^10.3.3"
100
100
  },
101
- "gitHead": "87ebe2e8267e634e2217d7ca28231d0b01636ae6",
101
+ "gitHead": "c999a7f47ecdca1494eb53fc177d28899b3effc9",
102
102
  "exports": {
103
103
  ".": {
104
104
  "import": "./es/index.js",