@blocklet/ui-react 2.11.17 → 2.11.19

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.
@@ -1,5 +1,5 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
- import { WELLKNOWN_SERVICE_PATH_PREFIX } from "@arcblock/ux/lib/Util/constant";
2
+ import { BLOCKLET_SERVICE_PATH_PREFIX } from "@arcblock/ux/lib/Util/constant";
3
3
  import { useEffect, useRef, useState } from "react";
4
4
  import { joinURL } from "ufo";
5
5
  function parseUrl(uri, params) {
@@ -71,7 +71,7 @@ function BlockletStudio({
71
71
  return null;
72
72
  }
73
73
  const src = parseUrl(
74
- joinURL(window.location.origin, WELLKNOWN_SERVICE_PATH_PREFIX, "/embed/resources", componentDid, "/publish"),
74
+ joinURL(window.location.origin, BLOCKLET_SERVICE_PATH_PREFIX, "/embed/resources", componentDid, "/publish"),
75
75
  {
76
76
  title,
77
77
  logo,
@@ -1,4 +1,4 @@
1
- import { AUTH_SERVICE_PREFIX } from '@arcblock/did-connect/lib/constant';
1
+ import { BLOCKLET_SERVICE_PATH_PREFIX } from '@arcblock/did-connect/lib/constant';
2
2
  import { useEffect, useMemo, useRef, useState } from 'react';
3
3
  import { joinURL } from 'ufo';
4
4
 
@@ -39,7 +39,7 @@ function useComponentInstalled({ did, onInstalled, onError }) {
39
39
  item.storeUrl = joinURL(item.meta.homepage, 'blocklets', item.meta.did);
40
40
  item.installUrl = joinURL(
41
41
  window.blocklet.appUrl,
42
- AUTH_SERVICE_PREFIX,
42
+ BLOCKLET_SERVICE_PATH_PREFIX,
43
43
  `/admin/components?install-component=${item.meta.did}`
44
44
  );
45
45
  });
@@ -2,7 +2,7 @@ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
2
2
  import { useEffect, useRef, useContext } from "react";
3
3
  import Button from "@arcblock/ux/lib/Button";
4
4
  import { useLocaleContext } from "@arcblock/ux/lib/Locale/context";
5
- import { WELLKNOWN_SERVICE_PATH_PREFIX } from "@arcblock/ux/lib/Util/constant";
5
+ import { BLOCKLET_SERVICE_PATH_PREFIX } from "@arcblock/ux/lib/Util/constant";
6
6
  import { useMemoizedFn, useReactive } from "ahooks";
7
7
  import { translate } from "@arcblock/ux/lib/Locale/util";
8
8
  import { joinURL, withQuery } from "ufo";
@@ -32,7 +32,7 @@ export default function AddComponent({
32
32
  loading: false,
33
33
  showDialog: false
34
34
  });
35
- const importUrl = withQuery(joinURL(WELLKNOWN_SERVICE_PATH_PREFIX, "embed/resources", componentDid, "add"), {
35
+ const importUrl = withQuery(joinURL(BLOCKLET_SERVICE_PATH_PREFIX, "embed/resources", componentDid, "add"), {
36
36
  resourceDid,
37
37
  resourceType,
38
38
  mode: "dialog",
@@ -2,7 +2,7 @@ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
2
2
  import { useContext } from "react";
3
3
  import Button from "@arcblock/ux/lib/Button";
4
4
  import { useLocaleContext } from "@arcblock/ux/lib/Locale/context";
5
- import { WELLKNOWN_SERVICE_PATH_PREFIX } from "@arcblock/ux/lib/Util/constant";
5
+ import { BLOCKLET_SERVICE_PATH_PREFIX } from "@arcblock/ux/lib/Util/constant";
6
6
  import { useMemoizedFn, useReactive } from "ahooks";
7
7
  import { translate } from "@arcblock/ux/lib/Locale/util";
8
8
  import { SessionContext } from "@arcblock/did-connect/lib/Session";
@@ -24,7 +24,7 @@ export default function PublishComponent({
24
24
  showDialog: false,
25
25
  loading: false
26
26
  });
27
- const exportUrl = `${WELLKNOWN_SERVICE_PATH_PREFIX}/embed/resources/${componentDid}/publish?mode=dialog`;
27
+ const exportUrl = `${BLOCKLET_SERVICE_PATH_PREFIX}/embed/resources/${componentDid}/publish?mode=dialog`;
28
28
  const handleClose = useMemoizedFn(() => {
29
29
  currentState.showDialog = false;
30
30
  onClose?.();
@@ -1,6 +1,6 @@
1
1
  import { joinURL } from "ufo";
2
2
  import { createPassportSvg as _createPassportSvg, createKycSvg as _createKycSvg } from "@arcblock/ux/lib/Util/passport";
3
- import { AUTH_SERVICE_PREFIX } from "@arcblock/ux/lib/Util/constant";
3
+ import { BLOCKLET_SERVICE_PATH_PREFIX } from "@arcblock/ux/lib/Util/constant";
4
4
  export const formatAxiosError = (err) => {
5
5
  const { response } = err;
6
6
  if (response) {
@@ -12,12 +12,12 @@ export const createPassportSvg = (props) => {
12
12
  if (props.scope === "kyc") {
13
13
  return _createKycSvg({
14
14
  ...props,
15
- issuerAvatarUrl: joinURL(window.location.origin, AUTH_SERVICE_PREFIX, "/blocklet/logo"),
15
+ issuerAvatarUrl: joinURL(window.location.origin, BLOCKLET_SERVICE_PATH_PREFIX, "/blocklet/logo"),
16
16
  type: props.role
17
17
  });
18
18
  }
19
19
  return _createPassportSvg({
20
20
  ...props,
21
- issuerAvatarUrl: joinURL(window.location.origin, AUTH_SERVICE_PREFIX, "/blocklet/logo")
21
+ issuerAvatarUrl: joinURL(window.location.origin, BLOCKLET_SERVICE_PATH_PREFIX, "/blocklet/logo")
22
22
  });
23
23
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blocklet/ui-react",
3
- "version": "2.11.17",
3
+ "version": "2.11.19",
4
4
  "description": "Some useful front-end web components that can be used in Blocklets.",
5
5
  "keywords": [
6
6
  "react",
@@ -32,8 +32,8 @@
32
32
  "url": "https://github.com/ArcBlock/ux/issues"
33
33
  },
34
34
  "dependencies": {
35
- "@arcblock/bridge": "^2.11.17",
36
- "@arcblock/react-hooks": "^2.11.17",
35
+ "@arcblock/bridge": "^2.11.19",
36
+ "@arcblock/react-hooks": "^2.11.19",
37
37
  "@blocklet/did-space-react": "^1.0.1",
38
38
  "@iconify-icons/logos": "^1.2.36",
39
39
  "@iconify-icons/material-symbols": "^1.2.58",
@@ -81,5 +81,5 @@
81
81
  "jest": "^29.7.0",
82
82
  "unbuild": "^2.0.0"
83
83
  },
84
- "gitHead": "2fd2da7dc02086457df65f0c2e7a4a14c9be0f49"
84
+ "gitHead": "eea5e545276d71fc2ded2c51fbe056486a810c4b"
85
85
  }
@@ -1,4 +1,4 @@
1
- import { WELLKNOWN_SERVICE_PATH_PREFIX } from '@arcblock/ux/lib/Util/constant';
1
+ import { BLOCKLET_SERVICE_PATH_PREFIX } from '@arcblock/ux/lib/Util/constant';
2
2
  import { useEffect, useRef, useState } from 'react';
3
3
  import { joinURL } from 'ufo';
4
4
 
@@ -101,7 +101,7 @@ function BlockletStudio({
101
101
  }
102
102
 
103
103
  const src = parseUrl(
104
- joinURL(window.location.origin, WELLKNOWN_SERVICE_PATH_PREFIX, '/embed/resources', componentDid, '/publish'),
104
+ joinURL(window.location.origin, BLOCKLET_SERVICE_PATH_PREFIX, '/embed/resources', componentDid, '/publish'),
105
105
  {
106
106
  title,
107
107
  logo,
@@ -1,4 +1,4 @@
1
- import { AUTH_SERVICE_PREFIX } from '@arcblock/did-connect/lib/constant';
1
+ import { BLOCKLET_SERVICE_PATH_PREFIX } from '@arcblock/did-connect/lib/constant';
2
2
  import { useEffect, useMemo, useRef, useState } from 'react';
3
3
  import { joinURL } from 'ufo';
4
4
 
@@ -39,7 +39,7 @@ function useComponentInstalled({ did, onInstalled, onError }) {
39
39
  item.storeUrl = joinURL(item.meta.homepage, 'blocklets', item.meta.did);
40
40
  item.installUrl = joinURL(
41
41
  window.blocklet.appUrl,
42
- AUTH_SERVICE_PREFIX,
42
+ BLOCKLET_SERVICE_PATH_PREFIX,
43
43
  `/admin/components?install-component=${item.meta.did}`
44
44
  );
45
45
  });
@@ -1,7 +1,7 @@
1
1
  import { useEffect, ReactElement, useRef, useContext } from 'react';
2
2
  import Button from '@arcblock/ux/lib/Button';
3
3
  import { useLocaleContext } from '@arcblock/ux/lib/Locale/context';
4
- import { WELLKNOWN_SERVICE_PATH_PREFIX } from '@arcblock/ux/lib/Util/constant';
4
+ import { BLOCKLET_SERVICE_PATH_PREFIX } from '@arcblock/ux/lib/Util/constant';
5
5
  import { useMemoizedFn, useReactive } from 'ahooks';
6
6
  import { translate } from '@arcblock/ux/lib/Locale/util';
7
7
  import { joinURL, withQuery } from 'ufo';
@@ -46,7 +46,7 @@ export default function AddComponent({
46
46
  loading: false,
47
47
  showDialog: false,
48
48
  });
49
- const importUrl = withQuery(joinURL(WELLKNOWN_SERVICE_PATH_PREFIX, 'embed/resources', componentDid, 'add'), {
49
+ const importUrl = withQuery(joinURL(BLOCKLET_SERVICE_PATH_PREFIX, 'embed/resources', componentDid, 'add'), {
50
50
  resourceDid,
51
51
  resourceType,
52
52
  mode: 'dialog',
@@ -1,7 +1,7 @@
1
1
  import { ReactElement, useContext } from 'react';
2
2
  import Button from '@arcblock/ux/lib/Button';
3
3
  import { useLocaleContext } from '@arcblock/ux/lib/Locale/context';
4
- import { WELLKNOWN_SERVICE_PATH_PREFIX } from '@arcblock/ux/lib/Util/constant';
4
+ import { BLOCKLET_SERVICE_PATH_PREFIX } from '@arcblock/ux/lib/Util/constant';
5
5
  import { useMemoizedFn, useReactive } from 'ahooks';
6
6
  import { translate } from '@arcblock/ux/lib/Locale/util';
7
7
  import { SessionContext } from '@arcblock/did-connect/lib/Session';
@@ -32,7 +32,7 @@ export default function PublishComponent({
32
32
  loading: false,
33
33
  });
34
34
 
35
- const exportUrl = `${WELLKNOWN_SERVICE_PATH_PREFIX}/embed/resources/${componentDid}/publish?mode=dialog`;
35
+ const exportUrl = `${BLOCKLET_SERVICE_PATH_PREFIX}/embed/resources/${componentDid}/publish?mode=dialog`;
36
36
 
37
37
  const handleClose = useMemoizedFn(() => {
38
38
  currentState.showDialog = false;
@@ -1,7 +1,7 @@
1
1
  import type { AxiosError } from 'axios';
2
2
  import { joinURL } from 'ufo';
3
3
  import { createPassportSvg as _createPassportSvg, createKycSvg as _createKycSvg } from '@arcblock/ux/lib/Util/passport';
4
- import { AUTH_SERVICE_PREFIX } from '@arcblock/ux/lib/Util/constant';
4
+ import { BLOCKLET_SERVICE_PATH_PREFIX } from '@arcblock/ux/lib/Util/constant';
5
5
  import { CreatePassportProps } from '../../@types';
6
6
 
7
7
  export const formatAxiosError = (err: AxiosError) => {
@@ -18,13 +18,13 @@ export const createPassportSvg = (props: CreatePassportProps) => {
18
18
  if (props.scope === 'kyc') {
19
19
  return _createKycSvg({
20
20
  ...props,
21
- issuerAvatarUrl: joinURL(window.location.origin, AUTH_SERVICE_PREFIX, '/blocklet/logo'),
21
+ issuerAvatarUrl: joinURL(window.location.origin, BLOCKLET_SERVICE_PATH_PREFIX, '/blocklet/logo'),
22
22
  type: props.role,
23
23
  });
24
24
  }
25
25
 
26
26
  return _createPassportSvg({
27
27
  ...props,
28
- issuerAvatarUrl: joinURL(window.location.origin, AUTH_SERVICE_PREFIX, '/blocklet/logo'),
28
+ issuerAvatarUrl: joinURL(window.location.origin, BLOCKLET_SERVICE_PATH_PREFIX, '/blocklet/logo'),
29
29
  });
30
30
  };