@blocklet/ui-react 3.0.5 → 3.0.7

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 (62) hide show
  1. package/lib/BlockletStudio/index.d.ts +15 -15
  2. package/lib/BlockletStudio/index.js +66 -66
  3. package/lib/ComponentManager/components/add-component.d.ts +6 -6
  4. package/lib/ComponentManager/components/add-component.js +29 -29
  5. package/lib/ComponentManager/components/publish-component.d.ts +3 -3
  6. package/lib/ComponentManager/components/publish-component.js +19 -19
  7. package/lib/ComponentManager/components/resource-dialog.d.ts +1 -1
  8. package/lib/ComponentManager/components/resource-dialog.js +1 -1
  9. package/lib/Footer/internal-footer.d.ts +3 -1
  10. package/lib/Footer/internal-footer.js +1 -1
  11. package/lib/Footer/layout/standard.d.ts +1 -1
  12. package/lib/Footer/layout/standard.js +1 -1
  13. package/lib/Footer/links.d.ts +1 -1
  14. package/lib/Footer/links.js +3 -3
  15. package/lib/Header/index.d.ts +2 -2
  16. package/lib/Header/index.js +17 -17
  17. package/lib/Icon/index.d.ts +2 -2
  18. package/lib/Icon/index.js +6 -6
  19. package/lib/Notifications/Snackbar.d.ts +1 -1
  20. package/lib/Notifications/Snackbar.js +1 -1
  21. package/lib/Notifications/hooks/use-title.d.ts +2 -2
  22. package/lib/Notifications/hooks/use-title.js +9 -9
  23. package/lib/UserCenter/components/editable-field.d.ts +6 -6
  24. package/lib/UserCenter/components/editable-field.js +12 -12
  25. package/lib/UserCenter/components/notification.js +5 -5
  26. package/lib/UserCenter/components/status-dialog/date-picker.d.ts +5 -5
  27. package/lib/UserCenter/components/status-dialog/date-picker.js +17 -10
  28. package/lib/UserCenter/components/status-dialog/index.d.ts +1 -1
  29. package/lib/UserCenter/components/status-dialog/index.js +8 -1
  30. package/lib/UserCenter/components/status-selector/index.d.ts +2 -2
  31. package/lib/UserCenter/components/status-selector/index.js +5 -5
  32. package/lib/UserCenter/components/status-selector/menu-item.d.ts +4 -4
  33. package/lib/UserCenter/components/status-selector/menu-item.js +11 -6
  34. package/lib/UserCenter/components/third-party-login/index.js +23 -29
  35. package/lib/UserCenter/components/user-info/user-info-item.d.ts +1 -1
  36. package/lib/UserCenter/components/user-info/user-info-item.js +1 -1
  37. package/lib/UserCenter/components/user-info/user-status.d.ts +4 -4
  38. package/lib/UserCenter/components/user-info/user-status.js +17 -17
  39. package/package.json +7 -5
  40. package/src/BlockletStudio/index.tsx +13 -13
  41. package/src/ComponentManager/components/add-component.tsx +6 -6
  42. package/src/ComponentManager/components/publish-component.tsx +2 -2
  43. package/src/ComponentManager/components/resource-dialog.tsx +1 -1
  44. package/src/Footer/internal-footer.jsx +1 -1
  45. package/src/Footer/layout/standard.jsx +1 -1
  46. package/src/Footer/links.jsx +1 -1
  47. package/src/Header/index.tsx +2 -2
  48. package/src/Icon/index.tsx +2 -2
  49. package/src/Notifications/Snackbar.tsx +2 -2
  50. package/src/Notifications/hooks/use-title.tsx +1 -1
  51. package/src/UserCenter/components/editable-field.tsx +6 -6
  52. package/src/UserCenter/components/notification.tsx +2 -2
  53. package/src/UserCenter/components/status-dialog/date-picker.tsx +8 -1
  54. package/src/UserCenter/components/status-dialog/index.tsx +8 -1
  55. package/src/UserCenter/components/status-selector/index.tsx +1 -1
  56. package/src/UserCenter/components/status-selector/menu-item.tsx +6 -1
  57. package/src/UserCenter/components/third-party-login/index.tsx +0 -2
  58. package/src/UserCenter/components/user-center.tsx +1 -1
  59. package/src/UserCenter/components/user-info/link-preview-input.tsx +2 -2
  60. package/src/UserCenter/components/user-info/user-info-item.tsx +1 -1
  61. package/src/UserCenter/components/user-info/user-info.tsx +1 -1
  62. package/src/UserCenter/components/user-info/user-status.tsx +2 -2
@@ -1,26 +1,26 @@
1
- export { G as default };
2
- declare function G({ open: a, setOpen: s, onOpened: t, componentDid: i, tenantScope: o, resourcesParams: h, mode: w, title: E, logo: R, description: L, introduction: y, note: D, componentsTitle: S, resourcesTitle: b, onUploaded: j, onReleased: x, onConnected: B, components: P, resources: U, style: _, zIndex: k, dependentComponentsMode: C, ...F }: {
1
+ export { z as default };
2
+ declare function z({ open: d, setOpen: s, onOpened: i, componentDid: e, tenantScope: r, resourcesParams: h, mode: w, title: E, logo: v, description: R, introduction: L, note: y, componentsTitle: D, resourcesTitle: S, onUploaded: b, onReleased: j, onConnected: x, components: B, resources: P, style: U, zIndex: _, dependentComponentsMode: k, ...C }: {
3
3
  [x: string]: any;
4
4
  open: any;
5
5
  setOpen: any;
6
- onOpened: any;
6
+ onOpened?: undefined;
7
7
  componentDid: any;
8
- tenantScope: any;
8
+ tenantScope?: undefined;
9
9
  resourcesParams?: {} | undefined;
10
10
  mode?: string | undefined;
11
- title: any;
12
- logo: any;
13
- description: any;
14
- introduction: any;
15
- note: any;
16
- componentsTitle: any;
17
- resourcesTitle: any;
18
- onUploaded: any;
19
- onReleased: any;
20
- onConnected: any;
11
+ title?: undefined;
12
+ logo?: undefined;
13
+ description?: undefined;
14
+ introduction?: undefined;
15
+ note?: undefined;
16
+ componentsTitle?: undefined;
17
+ resourcesTitle?: undefined;
18
+ onUploaded?: undefined;
19
+ onReleased?: undefined;
20
+ onConnected?: undefined;
21
21
  components?: any[] | undefined;
22
22
  resources?: {} | undefined;
23
23
  style?: {} | undefined;
24
24
  zIndex?: number | undefined;
25
- dependentComponentsMode: any;
25
+ dependentComponentsMode?: undefined;
26
26
  }): import('react').ReactElement<unknown, string | import('react').JSXElementConstructor<any>> | null;
@@ -1,81 +1,81 @@
1
- import { jsx as T } from "react/jsx-runtime";
2
- import { BLOCKLET_SERVICE_PATH_PREFIX as V } from "@arcblock/ux/lib/Util/constant";
3
- import { useState as A, useRef as p, useEffect as H } from "react";
4
- import { joinURL as J } from "ufo";
5
- function K(a, s) {
6
- const t = new URL(a);
7
- return Object.keys(s).forEach((i) => {
8
- const o = s[i];
9
- o !== void 0 && t.searchParams.set(i, typeof o == "string" ? o : JSON.stringify(o));
10
- }), t.pathname + t.search;
1
+ import { jsx as I } from "react/jsx-runtime";
2
+ import { BLOCKLET_SERVICE_PATH_PREFIX as T } from "@arcblock/ux/lib/Util/constant";
3
+ import { useState as V, useRef as p, useEffect as A } from "react";
4
+ import { joinURL as H } from "ufo";
5
+ function J(d, s) {
6
+ const i = new URL(d);
7
+ return Object.keys(s).forEach((e) => {
8
+ const r = s[e];
9
+ r !== void 0 && i.searchParams.set(e, typeof r == "string" ? r : JSON.stringify(r));
10
+ }), i.pathname + i.search;
11
11
  }
12
- function G({
13
- open: a,
12
+ function z({
13
+ open: d,
14
14
  setOpen: s,
15
- onOpened: t,
16
- componentDid: i,
17
- tenantScope: o,
15
+ onOpened: i = void 0,
16
+ componentDid: e,
17
+ tenantScope: r = void 0,
18
18
  resourcesParams: h = {},
19
19
  mode: w = "dialog",
20
- title: E,
21
- logo: R,
22
- description: L,
23
- introduction: y,
24
- note: D,
25
- componentsTitle: S,
26
- resourcesTitle: b,
27
- onUploaded: j,
28
- onReleased: x,
29
- onConnected: B,
30
- components: P = [],
31
- resources: U = {},
32
- style: _ = {},
33
- zIndex: k = 9999,
34
- dependentComponentsMode: C,
35
- ...F
20
+ title: E = void 0,
21
+ logo: v = void 0,
22
+ description: R = void 0,
23
+ introduction: L = void 0,
24
+ note: y = void 0,
25
+ componentsTitle: D = void 0,
26
+ resourcesTitle: S = void 0,
27
+ onUploaded: b = void 0,
28
+ onReleased: j = void 0,
29
+ onConnected: x = void 0,
30
+ components: B = [],
31
+ resources: P = {},
32
+ style: U = {},
33
+ zIndex: _ = 9999,
34
+ dependentComponentsMode: k = void 0,
35
+ ...C
36
36
  }) {
37
- const [n, c] = A(!1), u = p("");
38
- u.current = i;
39
- const e = p({});
40
- if (e.current["resourceDialog.close"] = () => {
41
- c(!1), s(!1);
42
- }, e.current["resourceDialog.loaded"] = () => {
43
- c(!0), t == null || t();
44
- }, e.current["studioDialog.uploaded"] = j, e.current["studioDialog.connected"] = B, e.current["studioDialog.released"] = x, H(() => {
45
- const l = (r) => {
37
+ const [a, n] = V(!1), c = p("");
38
+ c.current = e;
39
+ const t = p({});
40
+ if (t.current["resourceDialog.close"] = () => {
41
+ n(!1), s(!1);
42
+ }, t.current["resourceDialog.loaded"] = () => {
43
+ n(!0), i == null || i();
44
+ }, t.current["studioDialog.uploaded"] = b, t.current["studioDialog.connected"] = x, t.current["studioDialog.released"] = j, A(() => {
45
+ const u = (o) => {
46
46
  var f, m, g;
47
- if (((f = r == null ? void 0 : r.data) == null ? void 0 : f.componentDid) !== u.current)
47
+ if (((f = o == null ? void 0 : o.data) == null ? void 0 : f.componentDid) !== c.current)
48
48
  return;
49
- const d = e.current[(m = r == null ? void 0 : r.data) == null ? void 0 : m.event];
50
- typeof d == "function" && d((g = r == null ? void 0 : r.data) == null ? void 0 : g.data);
49
+ const l = t.current[(m = o == null ? void 0 : o.data) == null ? void 0 : m.event];
50
+ typeof l == "function" && l((g = o == null ? void 0 : o.data) == null ? void 0 : g.data);
51
51
  };
52
- return window.addEventListener("message", l), () => {
53
- window.removeEventListener("message", l);
52
+ return window.addEventListener("message", u), () => {
53
+ window.removeEventListener("message", u);
54
54
  };
55
- }, []), !a)
55
+ }, []), !d)
56
56
  return null;
57
- const I = K(
58
- J(window.location.origin, V, "/embed/resources", i, "/publish"),
57
+ const F = J(
58
+ H(window.location.origin, T, "/embed/resources", e, "/publish"),
59
59
  {
60
60
  title: E,
61
- logo: R,
62
- description: L,
63
- introduction: y,
64
- note: D,
65
- tenantScope: o,
61
+ logo: v,
62
+ description: R,
63
+ introduction: L,
64
+ note: y,
65
+ tenantScope: r,
66
66
  mode: w,
67
67
  resourcesParams: h,
68
- resources: U,
69
- components: P,
70
- resourcesTitle: b,
71
- componentsTitle: S,
72
- dependentComponentsMode: C
68
+ resources: P,
69
+ components: B,
70
+ resourcesTitle: S,
71
+ componentsTitle: D,
72
+ dependentComponentsMode: k
73
73
  }
74
74
  );
75
- return /* @__PURE__ */ T(
75
+ return /* @__PURE__ */ I(
76
76
  "iframe",
77
77
  {
78
- src: I,
78
+ src: F,
79
79
  title: "Blocklet Studio",
80
80
  style: {
81
81
  position: "fixed",
@@ -83,18 +83,18 @@ function G({
83
83
  left: 0,
84
84
  width: "100vw",
85
85
  height: "100vh",
86
- zIndex: k,
86
+ zIndex: _,
87
87
  border: 0,
88
88
  padding: 0,
89
89
  margin: 0,
90
- pointerEvents: n ? "auto" : "none",
91
- opacity: n ? 1 : 0,
92
- ..._
90
+ pointerEvents: a ? "auto" : "none",
91
+ opacity: a ? 1 : 0,
92
+ ...U
93
93
  },
94
- ...F
94
+ ...C
95
95
  }
96
96
  );
97
97
  }
98
98
  export {
99
- G as default
99
+ z as default
100
100
  };
@@ -1,13 +1,13 @@
1
1
  export { $ as default };
2
- declare function $({ componentDid: a, resourceType: w, resourceDid: p, grantedRoles: L, autoClose: R, selectedMeta: D, storeUrl: E, onComplete: n, onClose: t, render: m }: {
2
+ declare function $({ componentDid: a, resourceType: w, resourceDid: p, grantedRoles: L, autoClose: R, selectedMeta: D, storeUrl: E, onComplete: n, onClose: t, render: d }: {
3
3
  componentDid: any;
4
- resourceType: any;
5
- resourceDid: any;
4
+ resourceType?: undefined;
5
+ resourceDid?: undefined;
6
6
  grantedRoles?: string[] | undefined;
7
7
  autoClose?: boolean | undefined;
8
- selectedMeta: any;
9
- storeUrl: any;
8
+ selectedMeta?: undefined;
9
+ storeUrl?: undefined;
10
10
  onComplete: any;
11
11
  onClose: any;
12
- render: any;
12
+ render?: undefined;
13
13
  }): import('react').ReactElement<unknown, string | import('react').JSXElementConstructor<any>>;
@@ -1,31 +1,31 @@
1
- import { jsxs as B, Fragment as C, jsx as g } from "react/jsx-runtime";
2
- import { use as F, useRef as I, useEffect as S } from "react";
3
- import j from "@arcblock/ux/lib/Button";
4
- import { useLocaleContext as P } from "@arcblock/ux/lib/Locale/context";
5
- import { BLOCKLET_SERVICE_PATH_PREFIX as T } from "@arcblock/ux/lib/Util/constant";
6
- import { useMemoizedFn as r, useReactive as U } from "ahooks";
7
- import { translate as _ } from "@arcblock/ux/lib/Locale/util";
8
- import { withQuery as A, joinURL as M } from "ufo";
9
- import { SessionContext as O } from "@arcblock/did-connect/lib/Session";
1
+ import { jsxs as y, Fragment as B, jsx as g } from "react/jsx-runtime";
2
+ import { use as C, useRef as F, useEffect as I } from "react";
3
+ import S from "@arcblock/ux/lib/Button";
4
+ import { useLocaleContext as j } from "@arcblock/ux/lib/Locale/context";
5
+ import { BLOCKLET_SERVICE_PATH_PREFIX as P } from "@arcblock/ux/lib/Util/constant";
6
+ import { useMemoizedFn as r, useReactive as T } from "ahooks";
7
+ import { translate as U } from "@arcblock/ux/lib/Locale/util";
8
+ import { withQuery as _, joinURL as A } from "ufo";
9
+ import { SessionContext as M } from "@arcblock/did-connect/lib/Session";
10
10
  import h from "@arcblock/ux/lib/Toast";
11
- import z from "./resource-dialog.js";
12
- import { translations as H } from "../libs/locales.js";
11
+ import O from "./resource-dialog.js";
12
+ import { translations as z } from "../libs/locales.js";
13
13
  function $({
14
14
  componentDid: a,
15
- resourceType: w,
16
- resourceDid: p,
15
+ resourceType: w = void 0,
16
+ resourceDid: p = void 0,
17
17
  grantedRoles: L = ["admin", "owner"],
18
18
  autoClose: R = !0,
19
- selectedMeta: D,
20
- storeUrl: E,
19
+ selectedMeta: D = void 0,
20
+ storeUrl: E = void 0,
21
21
  onComplete: n,
22
22
  onClose: t,
23
- render: m
23
+ render: d = void 0
24
24
  }) {
25
- const { session: d } = F(O), { locale: x } = P(), i = r((o, s = {}) => _(H, o, x, "en", s)), l = I(null), e = U({
25
+ const { session: m } = C(M), { locale: x } = j(), i = r((o, s = {}) => U(z, o, x, "en", s)), l = F(null), e = T({
26
26
  loading: !1,
27
27
  showDialog: !1
28
- }), b = A(M(T, "embed/resources", a, "add"), {
28
+ }), b = _(A(P, "embed/resources", a, "add"), {
29
29
  resourceDid: p,
30
30
  resourceType: w,
31
31
  mode: "dialog",
@@ -33,33 +33,33 @@ function $({
33
33
  showResourcesSwitch: "false",
34
34
  enableRunBackground: "false",
35
35
  showCategory: "false"
36
- }), k = r(() => {
36
+ }), v = r(() => {
37
37
  e.showDialog = !1, t == null || t();
38
38
  }), c = r(() => {
39
39
  e.showDialog = !1, n == null || n();
40
40
  }), f = r(() => {
41
41
  var o;
42
- if (!d.user) {
42
+ if (!m.user) {
43
43
  h.warning(i("needLogin"));
44
44
  return;
45
45
  }
46
- if (!L.includes((o = d.user) == null ? void 0 : o.role)) {
46
+ if (!L.includes((o = m.user) == null ? void 0 : o.role)) {
47
47
  h.warning(i("noPermission"));
48
48
  return;
49
49
  }
50
50
  e.loading = !0, e.showDialog = !0;
51
- }), y = r(() => {
51
+ }), k = r(() => {
52
52
  var o;
53
53
  e.loading = !1, l.current && ((o = l.current) == null || o.selectBlocklet(D));
54
54
  }), u = r((o) => {
55
55
  var s;
56
56
  ((s = o == null ? void 0 : o.data) == null ? void 0 : s.event) === "component.installed" && o.data.componentDid === a && (R || o.data.manual) && c();
57
57
  });
58
- return S(() => {
58
+ return I(() => {
59
59
  e.showDialog ? window.addEventListener("message", u) : window.removeEventListener("message", u);
60
- }, [e.showDialog]), /* @__PURE__ */ B(C, { children: [
61
- m ? m({ onClick: f, loading: e.loading }) : /* @__PURE__ */ g(
62
- j,
60
+ }, [e.showDialog]), /* @__PURE__ */ y(B, { children: [
61
+ d ? d({ onClick: f, loading: e.loading }) : /* @__PURE__ */ g(
62
+ S,
63
63
  {
64
64
  variant: "outlined",
65
65
  color: "secondary",
@@ -73,7 +73,7 @@ function $({
73
73
  "button"
74
74
  ),
75
75
  e.showDialog && /* @__PURE__ */ g(
76
- z,
76
+ O,
77
77
  {
78
78
  ref: l,
79
79
  src: b,
@@ -81,9 +81,9 @@ function $({
81
81
  open: !0,
82
82
  componentDid: a,
83
83
  loading: e.loading,
84
- onClose: k,
84
+ onClose: v,
85
85
  onComplete: c,
86
- onLoad: y
86
+ onLoad: k
87
87
  }
88
88
  )
89
89
  ] });
@@ -1,7 +1,7 @@
1
1
  export { H as default };
2
- declare function H({ componentDid: s, grantedRoles: r, onClose: i, render: a }: {
2
+ declare function H({ componentDid: s, grantedRoles: i, onClose: n, render: a }: {
3
3
  componentDid: any;
4
- grantedRoles: any;
4
+ grantedRoles?: undefined;
5
5
  onClose: any;
6
- render: any;
6
+ render?: undefined;
7
7
  }): import('react').ReactElement<unknown, string | import('react').JSXElementConstructor<any>>;
@@ -2,33 +2,33 @@ import { jsxs as x, Fragment as b, jsx as u } from "react/jsx-runtime";
2
2
  import { use as w } from "react";
3
3
  import L from "@arcblock/ux/lib/Button";
4
4
  import { useLocaleContext as C } from "@arcblock/ux/lib/Locale/context";
5
- import { BLOCKLET_SERVICE_PATH_PREFIX as D } from "@arcblock/ux/lib/Util/constant";
6
- import { useMemoizedFn as n, useReactive as E } from "ahooks";
7
- import { translate as P } from "@arcblock/ux/lib/Locale/util";
8
- import { SessionContext as F } from "@arcblock/did-connect/lib/Session";
5
+ import { BLOCKLET_SERVICE_PATH_PREFIX as v } from "@arcblock/ux/lib/Util/constant";
6
+ import { useMemoizedFn as t, useReactive as D } from "ahooks";
7
+ import { translate as E } from "@arcblock/ux/lib/Locale/util";
8
+ import { SessionContext as P } from "@arcblock/did-connect/lib/Session";
9
9
  import c from "@arcblock/ux/lib/Toast";
10
- import S from "./resource-dialog.js";
11
- import { translations as T } from "../libs/locales.js";
10
+ import F from "./resource-dialog.js";
11
+ import { translations as S } from "../libs/locales.js";
12
12
  function H({
13
13
  componentDid: s,
14
- grantedRoles: r,
15
- onClose: i,
16
- render: a
14
+ grantedRoles: i = void 0,
15
+ onClose: n,
16
+ render: a = void 0
17
17
  }) {
18
- const { session: l } = w(F), { locale: f } = C(), e = n((t, h = {}) => P(T, t, f, "en", h)), o = E({
18
+ const { session: l } = w(P), { locale: f } = C(), e = t((r, h = {}) => E(S, r, f, "en", h)), o = D({
19
19
  showDialog: !1,
20
20
  loading: !1
21
- }), p = `${D}/embed/resources/${s}/publish?mode=dialog`, d = n(() => {
22
- o.showDialog = !1, i == null || i();
23
- }), g = n(() => {
21
+ }), d = `${v}/embed/resources/${s}/publish?mode=dialog`, p = t(() => {
22
+ o.showDialog = !1, n == null || n();
23
+ }), g = t(() => {
24
24
  o.loading = !1;
25
- }), m = n(() => {
26
- var t;
25
+ }), m = t(() => {
26
+ var r;
27
27
  if (!l.user) {
28
28
  c.warning(e("needLogin"));
29
29
  return;
30
30
  }
31
- if (r && r.length > 0 && !(r != null && r.includes((t = l.user) == null ? void 0 : t.role))) {
31
+ if (i && i.length > 0 && !(i != null && i.includes((r = l.user) == null ? void 0 : r.role))) {
32
32
  c.warning(e("noPermission"));
33
33
  return;
34
34
  }
@@ -50,11 +50,11 @@ function H({
50
50
  "button"
51
51
  ),
52
52
  o.showDialog && /* @__PURE__ */ u(
53
- S,
53
+ F,
54
54
  {
55
- src: p,
55
+ src: d,
56
56
  open: !0,
57
- onClose: d,
57
+ onClose: p,
58
58
  onLoad: g,
59
59
  componentDid: s,
60
60
  loading: o.loading
@@ -4,7 +4,7 @@ declare const I: import('react').ForwardRefExoticComponent<{
4
4
  open?: boolean | undefined;
5
5
  componentDid: any;
6
6
  loading?: boolean | undefined;
7
- storeUrl: any;
7
+ storeUrl?: string | undefined;
8
8
  onClose?: (() => void) | undefined;
9
9
  onComplete?: (() => void) | undefined;
10
10
  onLoad?: (() => void) | undefined;
@@ -6,7 +6,7 @@ function b({
6
6
  open: t = !1,
7
7
  componentDid: n,
8
8
  loading: u = !0,
9
- storeUrl: c,
9
+ storeUrl: c = "",
10
10
  onClose: d = () => {
11
11
  },
12
12
  onComplete: f = () => {
@@ -1,6 +1,8 @@
1
1
  import { default as n } from 'prop-types';
2
2
  export { _ as default };
3
- declare function _(a: any): import('react').ReactElement<unknown, string | import('react').JSXElementConstructor<any>>;
3
+ declare function _({ ...a }: {
4
+ [x: string]: any;
5
+ }): import('react').ReactElement<unknown, string | import('react').JSXElementConstructor<any>>;
4
6
  declare namespace _ {
5
7
  namespace propTypes {
6
8
  let brand: n.Requireable<n.InferProps<{
@@ -25,7 +25,7 @@ const h = [
25
25
  component: S
26
26
  }
27
27
  ], T = h.reduce((a, o) => ({ ...a, [o.name]: o }), {});
28
- function _(a) {
28
+ function _({ ...a }) {
29
29
  var d, f;
30
30
  const {
31
31
  brand: o = null,
@@ -4,7 +4,7 @@ declare function g({ elements: e, data: s, className: p, ...c }: {
4
4
  [x: string]: any;
5
5
  elements: any;
6
6
  data: any;
7
- className: any;
7
+ className?: string | undefined;
8
8
  }): import('react').ReactElement<unknown, string | import('react').JSXElementConstructor<any>>;
9
9
  declare namespace g {
10
10
  namespace propTypes {
@@ -4,7 +4,7 @@ import x from "clsx";
4
4
  import { Container as t, Box as r } from "@mui/material";
5
5
  import { styled as f } from "@arcblock/ux/lib/Theme";
6
6
  import h from "./row.js";
7
- function g({ elements: e, data: s, className: p, ...c }) {
7
+ function g({ elements: e, data: s, className: p = "", ...c }) {
8
8
  var l;
9
9
  const d = !!((l = s.navigation) != null && l.length);
10
10
  let a = null;
@@ -15,6 +15,6 @@ declare namespace F {
15
15
  props: l.Requireable<object>;
16
16
  }> | null | undefined)[]>;
17
17
  let flowLayout: l.Requireable<boolean>;
18
- let columns: l.Requireable<number>;
18
+ let columns: l.Validator<number>;
19
19
  }
20
20
  }
@@ -77,7 +77,7 @@ function F({ links: e = [], flowLayout: d = !1, columns: u, ...k }) {
77
77
  );
78
78
  }) : null, [e, d, x, g]);
79
79
  return e != null && e.length ? /* @__PURE__ */ n(
80
- S,
80
+ R,
81
81
  {
82
82
  ...k,
83
83
  className: c(k.className, {
@@ -101,9 +101,9 @@ F.propTypes = {
101
101
  // 流动布局, 简单的从左到右排列
102
102
  flowLayout: l.bool,
103
103
  // 列布局
104
- columns: l.number
104
+ columns: l.number.isRequired
105
105
  };
106
- const S = z("div")`
106
+ const R = z("div")`
107
107
  overflow: hidden;
108
108
  color: ${({ theme: e }) => e.palette.text.secondary};
109
109
  .footer-links-inner {
@@ -2,12 +2,12 @@ export { No as default };
2
2
  declare const No: import('react').ComponentType<{
3
3
  [x: string]: any;
4
4
  meta?: {} | undefined;
5
- addons: any;
5
+ addons?: undefined;
6
6
  sessionManagerProps?: {
7
7
  showRole: boolean;
8
8
  } | undefined;
9
9
  homeLink?: any;
10
- theme: any;
10
+ theme?: undefined;
11
11
  hideNavMenu?: boolean | undefined;
12
12
  showDomainWarningDialog?: boolean | undefined;
13
13
  }>;
@@ -30,7 +30,7 @@ const X = {
30
30
  return { navItems: [], activeId: null };
31
31
  let t = 1;
32
32
  const m = U(e, (o) => {
33
- var c, f;
33
+ var d, f;
34
34
  const n = o.icon ? /* @__PURE__ */ l(S, { icon: o.icon }) : null;
35
35
  if (o.items)
36
36
  return {
@@ -39,49 +39,49 @@ const X = {
39
39
  icon: n,
40
40
  children: o.items
41
41
  };
42
- let i = {};
43
- return ((c = o.link) != null && c.startsWith("http") || (f = o.link) != null && f.startsWith("//")) && (i = {
42
+ let a = {};
43
+ return ((d = o.link) != null && d.startsWith("http") || (f = o.link) != null && f.startsWith("//")) && (a = {
44
44
  target: "_blank",
45
45
  rel: "noreferrer"
46
46
  }), {
47
47
  id: `${t++}`,
48
- label: /* @__PURE__ */ l("a", { href: o.link, ...i, children: o.title }),
48
+ label: /* @__PURE__ */ l("a", { href: o.link, ...a, children: o.title }),
49
49
  icon: n,
50
50
  description: o.description,
51
51
  link: o.link
52
52
  };
53
- }, "items"), a = K(m), p = O(a.map((o) => o.link));
54
- return { navItems: m, activeId: p >= 0 ? a[p].id : null };
53
+ }, "items"), i = K(m), p = O(i.map((o) => o.link));
54
+ return { navItems: m, activeId: p >= 0 ? i[p].id : null };
55
55
  };
56
56
  function Z({
57
57
  meta: e = {},
58
- addons: t,
58
+ addons: t = void 0,
59
59
  sessionManagerProps: b = {
60
60
  showRole: !0
61
61
  },
62
62
  homeLink: m = G,
63
- theme: a,
63
+ theme: i = void 0,
64
64
  hideNavMenu: p = !1,
65
65
  showDomainWarningDialog: o = !0,
66
66
  ...n
67
67
  }) {
68
68
  var v, x;
69
69
  Q();
70
- const i = _(), { locale: c } = z() || {}, f = H((r, h = {}) => A(X, r, c, "en", h)), s = w(() => {
70
+ const a = _(), { locale: d } = z() || {}, f = H((r, h = {}) => A(X, r, d, "en", h)), c = w(() => {
71
71
  const r = Object.assign({}, window.blocklet, e);
72
72
  try {
73
73
  return q(r);
74
74
  } catch (h) {
75
75
  return console.error("Failed to format blocklet info", h, r), r;
76
76
  }
77
- }, [e]), u = w(() => E(i, a), [i, a]), I = M({
77
+ }, [e]), u = w(() => E(a, i), [a, i]), I = M({
78
78
  meta: e,
79
- theme: a
79
+ theme: i
80
80
  });
81
- if (!s.appName)
81
+ if (!c.appName)
82
82
  return null;
83
- const $ = D((v = s == null ? void 0 : s.navigation) == null ? void 0 : v.header, c), g = Y($), { navItems: d, activeId: N } = g, k = parseInt((x = window.blocklet) == null ? void 0 : x.USE_ARCBLOCK_THEME, 10);
84
- return B(k) && d.splice(k, 0, {
83
+ const $ = D((v = c == null ? void 0 : c.navigation) == null ? void 0 : v.header, d), g = Y($), { navItems: s, activeId: N } = g, k = parseInt((x = window.blocklet) == null ? void 0 : x.USE_ARCBLOCK_THEME, 10);
84
+ return B(k) && s.splice(k, 0, {
85
85
  label: f("products"),
86
86
  // eslint-disable-next-line react/no-unstable-nested-components
87
87
  children: ({ isOpen: r }) => /* @__PURE__ */ l(R, { isOpen: r })
@@ -95,7 +95,7 @@ function Z({
95
95
  /* @__PURE__ */ l(
96
96
  J,
97
97
  {
98
- formattedBlocklet: s,
98
+ formattedBlocklet: c,
99
99
  addons: typeof t == "function" ? (r) => t(r, { navigation: g }) : t,
100
100
  sessionManagerProps: b,
101
101
  showDomainWarningDialog: o
@@ -106,14 +106,14 @@ function Z({
106
106
  $bordered: n == null ? void 0 : n.bordered,
107
107
  $bgcolor: u.palette.background.default,
108
108
  className: j("blocklet__header", n.className),
109
- children: p || !(d != null && d.length) ? null : ({ isMobile: r }) => (
109
+ children: p || !(s != null && s.length) ? null : ({ isMobile: r }) => (
110
110
  // @ts-ignore
111
111
  /* @__PURE__ */ l(
112
112
  P,
113
113
  {
114
114
  mode: r ? "inline" : "horizontal",
115
115
  activeId: N,
116
- items: d,
116
+ items: s,
117
117
  className: "header-nav",
118
118
  bgColor: "transparent",
119
119
  textColor: u.palette.grey[500],
@@ -2,6 +2,6 @@ export { M as default };
2
2
  declare function M({ icon: r, size: t, sx: i, ...a }: {
3
3
  [x: string]: any;
4
4
  icon: any;
5
- size: any;
6
- sx: any;
5
+ size?: undefined;
6
+ sx?: {} | undefined;
7
7
  }): import('react').ReactElement<unknown, string | import('react').JSXElementConstructor<any>> | null;