@blocklet/ui-react 3.0.9 → 3.0.11

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 (51) hide show
  1. package/lib/BlockletStudio/index.js +70 -71
  2. package/lib/ComponentInstaller/index.js +85 -88
  3. package/lib/ComponentInstaller/installer-item.js +47 -53
  4. package/lib/ComponentInstaller/use-component-installed.js +32 -38
  5. package/lib/ComponentManager/components/add-component.js +47 -50
  6. package/lib/ComponentManager/components/publish-component.js +30 -31
  7. package/lib/ComponentManager/components/resource-dialog.js +28 -30
  8. package/lib/Dashboard/index.d.ts +1 -1
  9. package/lib/Dashboard/index.js +59 -61
  10. package/lib/Footer/index.js +51 -52
  11. package/lib/Footer/internal-footer.js +43 -47
  12. package/lib/Footer/layout/standard.js +11 -12
  13. package/lib/Footer/links.js +25 -28
  14. package/lib/Footer/social-media.js +17 -17
  15. package/lib/Header/index.js +81 -83
  16. package/lib/Notifications/Snackbar.js +76 -77
  17. package/lib/Notifications/hooks/use-title.js +34 -34
  18. package/lib/Notifications/utils.js +56 -60
  19. package/lib/UserCenter/components/config-inviter.js +17 -18
  20. package/lib/UserCenter/components/danger-zone.js +49 -52
  21. package/lib/UserCenter/components/nft.js +44 -45
  22. package/lib/UserCenter/components/notification.js +92 -99
  23. package/lib/UserCenter/components/passport.js +22 -22
  24. package/lib/UserCenter/components/privacy.js +6 -6
  25. package/lib/UserCenter/components/settings.js +40 -43
  26. package/lib/UserCenter/components/status-dialog/date-picker.js +7 -8
  27. package/lib/UserCenter/components/status-dialog/index.js +112 -114
  28. package/lib/UserCenter/components/status-selector/duration-menu.js +35 -36
  29. package/lib/UserCenter/components/status-selector/index.js +13 -13
  30. package/lib/UserCenter/components/storage/action.js +21 -22
  31. package/lib/UserCenter/components/storage/delete.js +24 -24
  32. package/lib/UserCenter/components/third-party-login/index.js +53 -53
  33. package/lib/UserCenter/components/third-party-login/third-party-item.js +87 -89
  34. package/lib/UserCenter/components/user-center.js +198 -207
  35. package/lib/UserCenter/components/user-info/metadata.js +343 -353
  36. package/lib/UserCenter/components/user-info/switch-role.js +17 -20
  37. package/lib/UserCenter/components/user-info/user-basic-info.js +79 -82
  38. package/lib/UserCenter/components/user-info/user-info.js +40 -40
  39. package/lib/UserCenter/components/user-info/user-status.js +97 -99
  40. package/lib/UserCenter/components/user-info/utils.js +34 -35
  41. package/lib/UserSessions/components/user-session-info.js +25 -28
  42. package/lib/UserSessions/components/user-sessions.js +169 -181
  43. package/lib/blocklets.js +62 -72
  44. package/lib/common/domain-warning.js +31 -31
  45. package/lib/common/header-addons.d.ts +1 -1
  46. package/lib/common/header-addons.js +49 -53
  47. package/lib/common/notification-addon.js +29 -32
  48. package/lib/common/ws.js +17 -18
  49. package/lib/contexts/config-user-space.js +16 -19
  50. package/lib/utils.js +44 -48
  51. package/package.json +11 -11
@@ -1,170 +1,164 @@
1
- import { jsx as n, jsxs as l, Fragment as W } from "react/jsx-runtime";
2
- import X from "@arcblock/ux/lib/Datatable";
3
- import { useReactive as L, useMemoizedFn as R, useMount as Y, useRequest as Z, useCreation as B } from "ahooks";
4
- import { translate as _ } from "@arcblock/ux/lib/Locale/util";
5
- import { useLocaleContext as N } from "@arcblock/ux/lib/Locale/context";
6
- import O from "@arcblock/ux/lib/RelativeTime";
7
- import C from "ua-parser-js";
8
- import { getVisitorId as ee } from "@arcblock/ux/lib/Util";
9
- import { useConfirm as te } from "@arcblock/ux/lib/Dialog";
10
- import oe from "p-queue";
11
- import { Box as u, Typography as c, CircularProgress as ne, useMediaQuery as re, Tooltip as ie, Button as j, RadioGroup as ae, FormControlLabel as z, Radio as I } from "@mui/material";
12
- import { memo as se, useEffect as le } from "react";
13
- import { mergeSx as H } from "@arcblock/ux/lib/Util/style";
14
- import ce from "../../hooks/use-mobile.js";
15
- import de from "./user-session-info.js";
16
- import { client as D } from "../../libs/client.js";
17
- import { translations as pe } from "../libs/locales.js";
18
- import { ip2Region as ue } from "../libs/utils.js";
19
- const E = (m) => new C(m, {
1
+ import { jsx as n, jsxs as s, Fragment as A } from "react/jsx-runtime";
2
+ import G from "@arcblock/ux/lib/Datatable";
3
+ import { useReactive as z, useMemoizedFn as w, useMount as $, useRequest as J, useCreation as v } from "ahooks";
4
+ import { translate as K } from "@arcblock/ux/lib/Locale/util";
5
+ import { useLocaleContext as j } from "@arcblock/ux/lib/Locale/context";
6
+ import T from "@arcblock/ux/lib/RelativeTime";
7
+ import S from "ua-parser-js";
8
+ import { getVisitorId as X } from "@arcblock/ux/lib/Util";
9
+ import { useConfirm as Y } from "@arcblock/ux/lib/Dialog";
10
+ import Z from "p-queue";
11
+ import { Box as d, Typography as a, CircularProgress as _, useMediaQuery as ee, Tooltip as te, Button as k, RadioGroup as oe, FormControlLabel as B, Radio as C } from "@mui/material";
12
+ import { memo as ne, useEffect as re } from "react";
13
+ import { mergeSx as M } from "@arcblock/ux/lib/Util/style";
14
+ import ie from "../../hooks/use-mobile.js";
15
+ import se from "./user-session-info.js";
16
+ import { client as P } from "../../libs/client.js";
17
+ import { translations as ae } from "../libs/locales.js";
18
+ import { ip2Region as le } from "../libs/utils.js";
19
+ const W = (u) => new S(u, {
20
20
  // eslint-disable-next-line no-useless-escape
21
- browser: [[/(ArcWallet)\/([\w\.]+)/i], [C.BROWSER.NAME, C.BROWSER.VERSION]]
22
- }).getResult(), F = {
21
+ browser: [[/(ArcWallet)\/([\w\.]+)/i], [S.BROWSER.NAME, S.BROWSER.VERSION]]
22
+ }).getResult(), O = {
23
23
  display: "flex",
24
24
  justifyContent: "flex-end",
25
25
  textAlign: "right"
26
- }, me = new oe({ concurrency: 1 }), ge = se(({ userSession: m, isMobile: y = !1 }) => {
27
- const d = L({
26
+ }, ce = new Z({ concurrency: 1 }), de = ne(({ userSession: u, isMobile: h = !1 }) => {
27
+ const l = z({
28
28
  loading: !0,
29
29
  ipRegion: ""
30
- }), { t: x } = N();
31
- return le(() => {
32
- me.add(async () => {
30
+ }), { t: f } = j();
31
+ return re(() => {
32
+ ce.add(async () => {
33
33
  try {
34
- d.ipRegion = await ue(m.lastLoginIp);
34
+ l.ipRegion = await le(u.lastLoginIp);
35
35
  } finally {
36
- d.loading = !1;
36
+ l.loading = !1;
37
37
  }
38
38
  });
39
- }, [d, m.lastLoginIp]), /* @__PURE__ */ n(
40
- u,
39
+ }, [l, u.lastLoginIp]), /* @__PURE__ */ n(
40
+ d,
41
41
  {
42
- ...y && {
42
+ ...h && {
43
43
  display: "flex",
44
44
  alignItems: "center",
45
45
  justifyContent: "flex-end",
46
46
  gap: 1,
47
47
  flexWrap: "wrap"
48
48
  },
49
- children: d.ipRegion ? /* @__PURE__ */ l(W, { children: [
50
- /* @__PURE__ */ n(c, { variant: "body2", children: d.ipRegion }),
51
- /* @__PURE__ */ n(c, { variant: "body2", color: "grey", children: m.lastLoginIp || x("unknown") })
52
- ] }) : /* @__PURE__ */ l(W, { children: [
53
- /* @__PURE__ */ n(c, { children: m.lastLoginIp || x("unknown") }),
54
- d.loading ? /* @__PURE__ */ n(c, { variant: "body2", color: "grey", sx: { textAlign: "center" }, children: /* @__PURE__ */ n(ne, { size: 12, color: "inherit" }) }) : null
49
+ children: l.ipRegion ? /* @__PURE__ */ s(A, { children: [
50
+ /* @__PURE__ */ n(a, { variant: "body2", children: l.ipRegion }),
51
+ /* @__PURE__ */ n(a, { variant: "body2", color: "grey", children: u.lastLoginIp || f("unknown") })
52
+ ] }) : /* @__PURE__ */ s(A, { children: [
53
+ /* @__PURE__ */ n(a, { children: u.lastLoginIp || f("unknown") }),
54
+ l.loading ? /* @__PURE__ */ n(a, { variant: "body2", color: "grey", sx: { textAlign: "center" }, children: /* @__PURE__ */ n(_, { size: 12, color: "inherit" }) }) : null
55
55
  ] })
56
56
  }
57
57
  );
58
58
  });
59
- function Pe({
60
- user: m,
61
- showAction: y = !0,
62
- showUser: d = !0,
63
- getUserSessions: x,
64
- showOffline: A = !1
59
+ function Ae({
60
+ user: u,
61
+ showAction: h = !0,
62
+ showUser: l = !0,
63
+ getUserSessions: f,
64
+ showOffline: I = !1
65
65
  }) {
66
- var k, M, P;
67
- const r = L({
66
+ const r = z({
68
67
  status: "online",
69
68
  page: 1,
70
69
  pageSize: 10
71
- }), g = L({
70
+ }), p = z({
72
71
  online: 0,
73
72
  expired: 0,
74
73
  offline: 0
75
- }), w = ee(), { locale: v } = N(), f = ce({ key: "md" }), U = re((e) => e.breakpoints.down("lg")), { confirmApi: S, confirmHolder: V } = te(), o = R((e, t = {}) => _(pe, e, v, "en", t)), q = R(async () => {
76
- var i;
77
- const e = await x({
74
+ }), y = X(), { locale: b } = j(), m = ie({ key: "md" }), H = ee((e) => e.breakpoints.down("lg")), { confirmApi: R, confirmHolder: D } = Y(), t = w((e, o = {}) => K(ae, e, b, "en", o)), E = w(async () => {
75
+ const e = await f({
78
76
  page: r.page,
79
77
  pageSize: r.pageSize,
80
78
  status: r.status
81
- }), t = ((i = e == null ? void 0 : e.paging) == null ? void 0 : i.total) || 0;
82
- return g[r.status] = t, {
83
- total: t,
84
- list: (e == null ? void 0 : e.list) || []
79
+ }), o = e?.paging?.total || 0;
80
+ return p[r.status] = o, {
81
+ total: o,
82
+ list: e?.list || []
85
83
  };
86
84
  });
87
- Y(async () => {
88
- var i, s;
89
- const e = await x({
85
+ $(async () => {
86
+ const e = await f({
90
87
  page: 1,
91
88
  pageSize: 1,
92
89
  status: "expired"
93
90
  });
94
- g.expired = ((i = e == null ? void 0 : e.paging) == null ? void 0 : i.total) || 0;
95
- const t = await x({
91
+ p.expired = e?.paging?.total || 0;
92
+ const o = await f({
96
93
  page: 1,
97
94
  pageSize: 1,
98
95
  status: "offline"
99
96
  });
100
- g.offline = ((s = t == null ? void 0 : t.paging) == null ? void 0 : s.total) || 0;
97
+ p.offline = o?.paging?.total || 0;
101
98
  });
102
- const p = Z(q, {
99
+ const c = J(E, {
103
100
  refreshDeps: [r.status, r.page, r.pageSize]
104
- }), a = B(() => {
105
- var e;
106
- return ((e = p.data) == null ? void 0 : e.list) || [];
107
- }, [(k = p.data) == null ? void 0 : k.list]), Q = B(() => {
101
+ }), i = v(() => c.data?.list || [], [c.data?.list]), F = v(() => {
108
102
  const e = r.status;
109
- return e === "online" ? g[e] <= 1 : g[e] === 0;
110
- }, [a, w]), h = B(() => H({}, f ? F : {}), [f]), G = R(({ visitorId: e }) => {
111
- S.open({
112
- title: o("logoutThisSession"),
113
- content: o("logoutThisSessionConfirm"),
114
- confirmButtonText: o("confirm"),
103
+ return e === "online" ? p[e] <= 1 : p[e] === 0;
104
+ }, [i, y]), x = v(() => M({}, m ? O : {}), [m]), N = w(({ visitorId: e }) => {
105
+ R.open({
106
+ title: t("logoutThisSession"),
107
+ content: t("logoutThisSessionConfirm"),
108
+ confirmButtonText: t("confirm"),
115
109
  confirmButtonProps: {
116
110
  color: "error"
117
111
  },
118
- cancelButtonText: o("cancel"),
112
+ cancelButtonText: t("cancel"),
119
113
  onConfirm: async () => {
120
- await D.user.logout({
114
+ await P.user.logout({
121
115
  visitorId: e,
122
116
  includeFederated: !0
123
117
  });
124
- const { page: t = 0 } = r, { list: i = [] } = p.data || {}, s = i.length || 0;
125
- t > 1 && s === 1 && (r.page = Math.max(t - 1, 1)), p.refresh(), S.close();
118
+ const { page: o = 0 } = r, { list: g = [] } = c.data || {}, Q = g.length || 0;
119
+ o > 1 && Q === 1 && (r.page = Math.max(o - 1, 1)), c.refresh(), R.close();
126
120
  }
127
121
  });
128
- }), $ = R(() => {
129
- S.open({
130
- title: o("logoutAllSession", {
131
- type: o(r.status)
122
+ }), U = w(() => {
123
+ R.open({
124
+ title: t("logoutAllSession", {
125
+ type: t(r.status)
132
126
  }),
133
- content: o("logoutAllSessionConfirm", {
134
- type: o(r.status)
127
+ content: t("logoutAllSessionConfirm", {
128
+ type: t(r.status)
135
129
  }),
136
- confirmButtonText: o("confirm"),
130
+ confirmButtonText: t("confirm"),
137
131
  confirmButtonProps: {
138
132
  color: "error"
139
133
  },
140
- cancelButtonText: o("cancel"),
134
+ cancelButtonText: t("cancel"),
141
135
  onConfirm: async () => {
142
- await D.user.logout({
136
+ await P.user.logout({
143
137
  status: r.status,
144
- visitorId: w,
138
+ visitorId: y,
145
139
  includeFederated: !0
146
- }), r.page = 1, p.refresh(), S.close();
140
+ }), r.page = 1, c.refresh(), R.close();
147
141
  }
148
142
  });
149
- }), T = [];
150
- y && T.push(
143
+ }), L = [];
144
+ h && L.push(
151
145
  /* @__PURE__ */ n(
152
- ie,
146
+ te,
153
147
  {
154
- title: o("logoutAllTips", {
155
- type: o(r.status)
148
+ title: t("logoutAllTips", {
149
+ type: t(r.status)
156
150
  }),
157
151
  children: /* @__PURE__ */ n(
158
- j,
152
+ k,
159
153
  {
160
154
  sx: { ml: 0.5 },
161
155
  size: "small",
162
156
  variant: "contained",
163
157
  color: "error",
164
- onClick: $,
165
- disabled: Q,
166
- children: o("logoutAll", {
167
- type: o(r.status)
158
+ onClick: U,
159
+ disabled: F,
160
+ children: t("logoutAll", {
161
+ type: t(r.status)
168
162
  })
169
163
  }
170
164
  )
@@ -172,103 +166,97 @@ function Pe({
172
166
  "logoutAll"
173
167
  )
174
168
  );
175
- const J = B(() => {
176
- var e;
177
- return {
178
- // viewColumns: false,
179
- search: !1,
180
- sort: !1,
181
- download: !1,
182
- filter: !1,
183
- print: !1,
184
- expandableRowsOnClick: !1,
185
- searchDebounceTime: 600,
186
- page: r.page - 1,
187
- rowsPerPage: r.pageSize,
188
- count: ((e = p.data) == null ? void 0 : e.total) || 0
189
- };
190
- }, [(M = p.data) == null ? void 0 : M.total, r.page, r.pageSize]), K = [
169
+ const V = v(() => ({
170
+ // viewColumns: false,
171
+ search: !1,
172
+ sort: !1,
173
+ download: !1,
174
+ filter: !1,
175
+ print: !1,
176
+ expandableRowsOnClick: !1,
177
+ searchDebounceTime: 600,
178
+ page: r.page - 1,
179
+ rowsPerPage: r.pageSize,
180
+ count: c.data?.total || 0
181
+ }), [c.data?.total, r.page, r.pageSize]), q = [
191
182
  {
192
- label: o("platform"),
183
+ label: t("platform"),
193
184
  name: "platform",
194
185
  options: {
195
186
  customBodyRenderLite: (e) => {
196
- var s, b;
197
- const t = a[e], i = E(t == null ? void 0 : t.ua);
198
- return /* @__PURE__ */ n(u, { sx: h, children: [(s = i.os) == null ? void 0 : s.name, (b = i.os) == null ? void 0 : b.version].filter(Boolean).join("/") || o("unknown") });
187
+ const o = i[e], g = W(o?.ua);
188
+ return /* @__PURE__ */ n(d, { sx: x, children: [g.os?.name, g.os?.version].filter(Boolean).join("/") || t("unknown") });
199
189
  }
200
190
  }
201
191
  },
202
192
  {
203
- label: o("deviceType"),
193
+ label: t("deviceType"),
204
194
  name: "deviceType",
205
195
  options: {
206
196
  customBodyRenderLite: (e) => {
207
- var s, b;
208
- const t = a[e], i = E(t == null ? void 0 : t.ua);
209
- return /* @__PURE__ */ n(u, { sx: h, children: [(s = i.browser) == null ? void 0 : s.name, (b = i.browser) == null ? void 0 : b.version].filter(Boolean).join("/") || o("unknown") });
197
+ const o = i[e], g = W(o?.ua);
198
+ return /* @__PURE__ */ n(d, { sx: x, children: [g.browser?.name, g.browser?.version].filter(Boolean).join("/") || t("unknown") });
210
199
  }
211
200
  }
212
201
  },
213
202
  {
214
- label: o("walletOS"),
203
+ label: t("walletOS"),
215
204
  name: "walletOS",
216
205
  options: {
217
206
  customBodyRenderLite: (e) => {
218
- var i;
219
- const t = a[e];
220
- return /* @__PURE__ */ n(u, { sx: h, children: ((i = t.extra) == null ? void 0 : i.walletOS) || o("unknown") });
207
+ const o = i[e];
208
+ return /* @__PURE__ */ n(d, { sx: x, children: o.extra?.walletOS || t("unknown") });
221
209
  }
222
210
  }
223
211
  },
224
- d && {
225
- label: o("user"),
212
+ l && {
213
+ label: t("user"),
226
214
  name: "user",
227
215
  options: {
228
216
  customBodyRenderLite: (e) => {
229
- const t = a[e];
230
- return /* @__PURE__ */ n(u, { sx: H({ minWidth: 150, maxWidth: 250 }, f ? F : {}), children: /* @__PURE__ */ n(de, { sessionUser: t.user, user: m }) });
217
+ const o = i[e];
218
+ return /* @__PURE__ */ n(d, { sx: M({ minWidth: 150, maxWidth: 250 }, m ? O : {}), children: /* @__PURE__ */ n(se, { sessionUser: o.user, user: u }) });
231
219
  }
232
220
  }
233
221
  },
234
222
  {
235
- label: o("createdAt"),
223
+ label: t("createdAt"),
236
224
  name: "createdAt",
237
225
  options: {
238
226
  customBodyRenderLite: (e) => {
239
- const t = a[e];
240
- return /* @__PURE__ */ n(u, { sx: h, children: t.createdAt ? /* @__PURE__ */ n(O, { value: t.createdAt, relativeRange: 3 * 86400 * 1e3, locale: v }) : o("unknown") });
227
+ const o = i[e];
228
+ return /* @__PURE__ */ n(d, { sx: x, children: o.createdAt ? /* @__PURE__ */ n(T, { value: o.createdAt, relativeRange: 3 * 86400 * 1e3, locale: b }) : t("unknown") });
241
229
  }
242
230
  }
243
231
  },
244
- !A && {
245
- label: o("updatedAt"),
232
+ !I && {
233
+ label: t("updatedAt"),
246
234
  name: "updatedAt",
247
235
  options: {
248
236
  customBodyRenderLite: (e) => {
249
- const t = a[e];
250
- return /* @__PURE__ */ n(u, { sx: h, children: t.status === "expired" ? o("expired") : /* @__PURE__ */ n(O, { value: t.updatedAt, relativeRange: 3 * 86400 * 1e3, locale: v }) });
237
+ const o = i[e];
238
+ return /* @__PURE__ */ n(d, { sx: x, children: o.status === "expired" ? t("expired") : /* @__PURE__ */ n(T, { value: o.updatedAt, relativeRange: 3 * 86400 * 1e3, locale: b }) });
251
239
  }
252
240
  }
253
241
  },
254
242
  {
255
- label: o("lastLoginIp"),
243
+ label: t("lastLoginIp"),
256
244
  name: "lastLoginIp",
257
245
  options: {
258
246
  customBodyRenderLite: (e) => {
259
- const t = a[e];
260
- return /* @__PURE__ */ n(ge, { userSession: t, isMobile: f });
247
+ const o = i[e];
248
+ return /* @__PURE__ */ n(de, { userSession: o, isMobile: m });
261
249
  }
262
250
  }
263
251
  },
264
- y && {
265
- label: o("actions"),
252
+ h && {
253
+ label: t("actions"),
266
254
  name: "actions",
267
255
  options: {
268
256
  customBodyRenderLite: (e) => {
269
- const t = a[e];
270
- return /* @__PURE__ */ n(u, { sx: h, children: /* @__PURE__ */ n(
271
- j,
257
+ const o = i[e];
258
+ return /* @__PURE__ */ n(d, { sx: x, children: /* @__PURE__ */ n(
259
+ k,
272
260
  {
273
261
  sx: {
274
262
  whiteSpace: "nowrap",
@@ -276,25 +264,25 @@ function Pe({
276
264
  lineHeight: "1.25",
277
265
  px: 1
278
266
  },
279
- disabled: w === t.visitorId,
267
+ disabled: y === o.visitorId,
280
268
  variant: "outlined",
281
269
  size: "small",
282
270
  color: "error",
283
- onClick: () => G({ visitorId: t.visitorId }),
284
- children: t.status === "expired" ? o("remove") : w === t.visitorId ? o("currentSession") : o("logout")
271
+ onClick: () => N({ visitorId: o.visitorId }),
272
+ children: o.status === "expired" ? t("remove") : y === o.visitorId ? t("currentSession") : t("logout")
285
273
  }
286
274
  ) });
287
275
  }
288
276
  }
289
277
  }
290
278
  ].filter(Boolean);
291
- return /* @__PURE__ */ l(
292
- u,
279
+ return /* @__PURE__ */ s(
280
+ d,
293
281
  {
294
282
  className: "pc-user-sessions",
295
283
  sx: {
296
- maxWidth: f ? "unset" : U ? "calc(100vw - 300px)" : "100%",
297
- ...f && {
284
+ maxWidth: m ? "unset" : H ? "calc(100vw - 300px)" : "100%",
285
+ ...m && {
298
286
  ".pc-user-sessions-table > div:nth-child(2)": {
299
287
  border: "1px solid",
300
288
  borderColor: "divider",
@@ -323,7 +311,7 @@ function Pe({
323
311
  paddingRight: "8px",
324
312
  paddingLeft: "8px",
325
313
  color: "text.secondary",
326
- ...f && {
314
+ ...m && {
327
315
  padding: "8px !important",
328
316
  "&:first-child": {
329
317
  paddingTop: "20px!important"
@@ -335,20 +323,20 @@ function Pe({
335
323
  }
336
324
  },
337
325
  children: [
338
- V,
326
+ D,
339
327
  /* @__PURE__ */ n(
340
- X,
328
+ G,
341
329
  {
342
- count: ((P = p.data) == null ? void 0 : P.total) || 0,
343
- locale: v,
344
- data: a,
345
- columns: K,
346
- customButtons: T,
347
- options: J,
348
- loading: p.loading,
330
+ count: c.data?.total || 0,
331
+ locale: b,
332
+ data: i,
333
+ columns: q,
334
+ customButtons: L,
335
+ options: V,
336
+ loading: c.loading,
349
337
  className: "pc-user-sessions-table",
350
- title: /* @__PURE__ */ l(
351
- ae,
338
+ title: /* @__PURE__ */ s(
339
+ oe,
352
340
  {
353
341
  row: !0,
354
342
  sx: { lineHeight: 1, ml: 1 },
@@ -357,45 +345,45 @@ function Pe({
357
345
  },
358
346
  children: [
359
347
  /* @__PURE__ */ n(
360
- z,
348
+ B,
361
349
  {
362
350
  value: "online",
363
- control: /* @__PURE__ */ n(I, { size: "small", sx: { lineHeight: 1, fontSize: 0 }, checked: r.status === "online" }),
364
- label: /* @__PURE__ */ l(c, { sx: { display: "flex", alignItems: "center" }, children: [
365
- o("online"),
366
- /* @__PURE__ */ l(c, { component: "span", sx: { ml: 0.5, color: "text.secondary" }, children: [
351
+ control: /* @__PURE__ */ n(C, { size: "small", sx: { lineHeight: 1, fontSize: 0 }, checked: r.status === "online" }),
352
+ label: /* @__PURE__ */ s(a, { sx: { display: "flex", alignItems: "center" }, children: [
353
+ t("online"),
354
+ /* @__PURE__ */ s(a, { component: "span", sx: { ml: 0.5, color: "text.secondary" }, children: [
367
355
  "(",
368
- g.online,
356
+ p.online,
369
357
  ")"
370
358
  ] })
371
359
  ] })
372
360
  }
373
361
  ),
374
362
  /* @__PURE__ */ n(
375
- z,
363
+ B,
376
364
  {
377
365
  value: "expired",
378
- control: /* @__PURE__ */ n(I, { size: "small", sx: { lineHeight: 1, fontSize: 0 }, checked: r.status === "expired" }),
379
- label: /* @__PURE__ */ l(c, { sx: { display: "flex", alignItems: "center" }, children: [
380
- o("expired"),
381
- /* @__PURE__ */ l(c, { component: "span", sx: { ml: 0.5, color: "text.secondary" }, children: [
366
+ control: /* @__PURE__ */ n(C, { size: "small", sx: { lineHeight: 1, fontSize: 0 }, checked: r.status === "expired" }),
367
+ label: /* @__PURE__ */ s(a, { sx: { display: "flex", alignItems: "center" }, children: [
368
+ t("expired"),
369
+ /* @__PURE__ */ s(a, { component: "span", sx: { ml: 0.5, color: "text.secondary" }, children: [
382
370
  "(",
383
- g.expired,
371
+ p.expired,
384
372
  ")"
385
373
  ] })
386
374
  ] })
387
375
  }
388
376
  ),
389
- A ? /* @__PURE__ */ n(
390
- z,
377
+ I ? /* @__PURE__ */ n(
378
+ B,
391
379
  {
392
380
  value: "offline",
393
- control: /* @__PURE__ */ n(I, { size: "small", sx: { lineHeight: 1, fontSize: 0 }, checked: r.status === "offline" }),
394
- label: /* @__PURE__ */ l(c, { sx: { display: "flex", alignItems: "center" }, children: [
395
- o("offline"),
396
- /* @__PURE__ */ l(c, { component: "span", sx: { ml: 0.5, color: "text.secondary" }, children: [
381
+ control: /* @__PURE__ */ n(C, { size: "small", sx: { lineHeight: 1, fontSize: 0 }, checked: r.status === "offline" }),
382
+ label: /* @__PURE__ */ s(a, { sx: { display: "flex", alignItems: "center" }, children: [
383
+ t("offline"),
384
+ /* @__PURE__ */ s(a, { component: "span", sx: { ml: 0.5, color: "text.secondary" }, children: [
397
385
  "(",
398
- g.offline,
386
+ p.offline,
399
387
  ")"
400
388
  ] })
401
389
  ] })
@@ -414,5 +402,5 @@ function Pe({
414
402
  );
415
403
  }
416
404
  export {
417
- Pe as default
405
+ Ae as default
418
406
  };