@abtnode/ux 1.8.36 → 1.8.38

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 (37) hide show
  1. package/lib/blocklet/access/config-access.js +299 -0
  2. package/lib/blocklet/access/index.js +220 -0
  3. package/lib/blocklet/actions.js +1 -3
  4. package/lib/blocklet/agreement-app.js +28 -0
  5. package/lib/blocklet/agreement.js +72 -0
  6. package/lib/blocklet/avatar.js +9 -18
  7. package/lib/blocklet/component/add.js +1083 -0
  8. package/lib/blocklet/component/configuration.js +1 -1
  9. package/lib/blocklet/component/environment.js +1 -1
  10. package/lib/blocklet/component/index.js +7 -9
  11. package/lib/blocklet/component/select-store.js +151 -0
  12. package/lib/blocklet/component/store-blocklet-list.js +203 -0
  13. package/lib/blocklet/configuration.js +5 -87
  14. package/lib/blocklet/install-from-url.js +362 -0
  15. package/lib/blocklet/overview.js +21 -12
  16. package/lib/blocklet/preferences/index.js +233 -0
  17. package/lib/blocklet/purchase/common.js +103 -0
  18. package/lib/blocklet/purchase/component-purchase.js +251 -0
  19. package/lib/blocklet/purchase/index.js +13 -0
  20. package/lib/blocklet/runtime-info.js +1 -0
  21. package/lib/blocklet/util.js +4 -16
  22. package/lib/blocklet/version.js +1 -1
  23. package/lib/hooks/blocklet.js +26 -10
  24. package/lib/layout/feedback.js +8 -10
  25. package/lib/locales/en.js +9 -2
  26. package/lib/locales/zh.js +9 -2
  27. package/lib/schema-form/index.js +1 -1
  28. package/lib/store/add.js +185 -0
  29. package/lib/store/delete.js +102 -0
  30. package/lib/store/item.js +84 -0
  31. package/lib/team/passports/color.js +1 -1
  32. package/lib/team/passports/detail.js +39 -31
  33. package/lib/util/api.js +21 -0
  34. package/lib/util/constants.js +10 -0
  35. package/lib/util/index.js +24 -8
  36. package/lib/who-can-access/config.js +13 -13
  37. package/package.json +11 -8
@@ -19,15 +19,6 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
19
19
  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
20
20
  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; }
21
21
  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; }
22
- const getDeployedFrom = (blocklet, node) => {
23
- let {
24
- deployedFrom
25
- } = blocklet || {};
26
- if (!deployedFrom && blocklet.source === 'registry') {
27
- deployedFrom = node.info.blockletRegistry;
28
- }
29
- return deployedFrom;
30
- };
31
22
  function BlockletAvatar(_ref) {
32
23
  var _blocklet$meta;
33
24
  let {
@@ -41,18 +32,18 @@ function BlockletAvatar(_ref) {
41
32
  const {
42
33
  inService
43
34
  } = node;
44
- let logoUrl = inService ? (0, _urlJoin.default)(_util.APP_PREFIX, _constant.WELLKNOWN_SERVICE_PATH_PREFIX, "/blocklet/logo?version=".concat(blocklet === null || blocklet === void 0 ? void 0 : (_blocklet$meta = blocklet.meta) === null || _blocklet$meta === void 0 ? void 0 : _blocklet$meta.version)) : (0, _urlJoin.default)(node.prefix, 'blocklet.png');
35
+ const search = "?version=".concat(blocklet === null || blocklet === void 0 ? void 0 : (_blocklet$meta = blocklet.meta) === null || _blocklet$meta === void 0 ? void 0 : _blocklet$meta.version);
36
+ let logoUrl = inService ? (0, _urlJoin.default)(_util.APP_PREFIX, _constant.WELLKNOWN_SERVICE_PATH_PREFIX, '/blocklet/logo', search) : (0, _urlJoin.default)(node.prefix, 'blocklet.png');
45
37
  const {
46
38
  variant
47
39
  } = rest;
48
- if (!inService) {
49
- const deployedFrom = getDeployedFrom(blocklet, node);
50
- if (blocklet.source === 'registry' && blocklet.meta.logo) {
51
- logoUrl = (0, _urlJoin.default)(deployedFrom, (0, _util.formatRegistryLogoPath)(blocklet.meta.bundleDid, blocklet.meta.logo));
52
- } else {
53
- const prefix = window.env.apiPrefix || '/';
54
- logoUrl = (0, _urlJoin.default)(prefix, "/blocklet/logo".concat(ancestors.map(x => "/".concat(x.meta.did)).join(''), "/").concat(blocklet.meta.did));
55
- }
40
+ if (blocklet.source === 'registry' && blocklet.deployedFrom && blocklet.meta.logo) {
41
+ logoUrl = (0, _urlJoin.default)(blocklet.deployedFrom, (0, _util.formatRegistryLogoPath)(blocklet.meta.bundleDid, blocklet.meta.logo), search);
42
+ } else {
43
+ const prefix = window.env.apiPrefix || '/';
44
+ const components = ancestors.concat(blocklet);
45
+ const list = inService ? components.slice(1) : components;
46
+ logoUrl = (0, _urlJoin.default)(prefix, "/blocklet/logo".concat(list.map(x => "/".concat(x.meta.did)).join('')), search);
56
47
  }
57
48
  const setFallBackUrl = inService ? () => {} : ev => {
58
49
  ev.target.src = "".concat(node.prefix, "/blocklet.png");