@arcblock/ux 3.0.10 → 3.0.12

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 (73) hide show
  1. package/lib/ActivityIndicator/index.js +16 -16
  2. package/lib/Alert/index.js +17 -17
  3. package/lib/AnimationWaiter/index.js +13 -13
  4. package/lib/Blocklet/blocklet.js +15 -15
  5. package/lib/Blocklet/utils.d.ts +1 -1
  6. package/lib/Blocklet/utils.js +6 -5
  7. package/lib/BlockletNFT/index.js +23 -23
  8. package/lib/BlockletV2/utils.d.ts +1 -1
  9. package/lib/BlockletV2/utils.js +7 -6
  10. package/lib/Center/index.js +7 -6
  11. package/lib/CodeBlock/LightBox.d.ts +2 -3
  12. package/lib/CodeBlock/LightBox.js +3 -2
  13. package/lib/CookieConsent/index.js +1 -1
  14. package/lib/CountDown/index.js +24 -23
  15. package/lib/Datatable/CustomToolbar.js +71 -71
  16. package/lib/Datatable/TableSearch.js +18 -18
  17. package/lib/Datatable/index.js +77 -77
  18. package/lib/Earth/index.js +47 -46
  19. package/lib/Footer/index.js +8 -8
  20. package/lib/Icon/image.js +17 -16
  21. package/lib/InfoRow/index.js +11 -11
  22. package/lib/Layout/dashboard/index.js +2 -2
  23. package/lib/Layout/dashboard/sidebar.js +12 -12
  24. package/lib/Layout/dashboard-legacy/index.js +20 -20
  25. package/lib/Layout/dashboard-legacy/sidebar.js +16 -16
  26. package/lib/Layout/index.js +29 -29
  27. package/lib/Metric/index.js +9 -9
  28. package/lib/NFTDisplay/svg-embedder/inline-svg.js +7 -6
  29. package/lib/PricingTable/index.js +9 -9
  30. package/lib/Result/result.js +14 -14
  31. package/lib/Screenshot/BaseScreenshot/index.js +10 -9
  32. package/lib/Screenshot/index.js +27 -26
  33. package/lib/Video/index.js +11 -11
  34. package/lib/Wallet/Action.js +12 -12
  35. package/lib/Wallet/Download.js +11 -11
  36. package/lib/WechatPrompt/index.js +1 -1
  37. package/package.json +8 -8
  38. package/src/ActivityIndicator/index.jsx +3 -2
  39. package/src/Address/Address.stories.jsx +2 -1
  40. package/src/Alert/index.jsx +2 -2
  41. package/src/AnimationWaiter/index.jsx +2 -2
  42. package/src/Blocklet/blocklet.jsx +2 -2
  43. package/src/Blocklet/utils.jsx +2 -1
  44. package/src/BlockletNFT/index.jsx +2 -2
  45. package/src/BlockletV2/utils.js +2 -1
  46. package/src/Center/index.tsx +2 -1
  47. package/src/CodeBlock/LightBox.tsx +2 -1
  48. package/src/Colors/Colors.stories.jsx +1 -1
  49. package/src/CookieConsent/index.tsx +1 -1
  50. package/src/CountDown/index.tsx +2 -2
  51. package/src/DID/DID.stories.jsx +2 -1
  52. package/src/Datatable/CustomToolbar.jsx +3 -2
  53. package/src/Datatable/TableSearch.jsx +2 -2
  54. package/src/Datatable/index.jsx +4 -4
  55. package/src/Earth/index.tsx +3 -2
  56. package/src/Footer/index.tsx +1 -1
  57. package/src/Icon/image.tsx +2 -1
  58. package/src/InfoRow/index.tsx +2 -2
  59. package/src/Layout/dashboard/index.tsx +1 -1
  60. package/src/Layout/dashboard/sidebar.tsx +2 -2
  61. package/src/Layout/dashboard-legacy/index.tsx +1 -1
  62. package/src/Layout/dashboard-legacy/sidebar.tsx +2 -2
  63. package/src/Layout/index.tsx +2 -1
  64. package/src/Metric/index.tsx +2 -2
  65. package/src/NFTDisplay/svg-embedder/inline-svg.tsx +2 -2
  66. package/src/PricingTable/index.tsx +2 -2
  67. package/src/Result/result.tsx +1 -1
  68. package/src/Screenshot/BaseScreenshot/index.tsx +2 -2
  69. package/src/Screenshot/index.tsx +3 -3
  70. package/src/Video/index.tsx +2 -2
  71. package/src/Wallet/Action.tsx +2 -2
  72. package/src/Wallet/Download.tsx +2 -2
  73. package/src/WechatPrompt/index.tsx +1 -1
@@ -1,86 +1,86 @@
1
1
  import { jsx as t, jsxs as r, Fragment as S } from "react/jsx-runtime";
2
2
  import { useState as T, useRef as V, isValidElement as v } from "react";
3
3
  import i from "prop-types";
4
- import { TableFilter as ue, TableViewCol as pe } from "mui-datatables";
5
- import he, { PrintContextConsumer as me } from "react-to-print";
6
- import { MoreVert as fe, CloudDownload as be, ViewColumn as Ce, FilterList as ge, Print as $ } from "@mui/icons-material";
7
- import { Popover as xe, Tooltip as D, IconButton as R, ListItemIcon as L, ListItemText as j, MenuItem as U, Menu as we, LinearProgress as ye, useTheme as Te, useMediaQuery as ve } from "@mui/material";
8
- import { useDeepCompareEffect as Re } from "ahooks";
9
- import { handleCSVDownload as ke } from "./utils.js";
10
- import Fe from "./TableSearch.js";
11
- import { useDatatableContext as Pe } from "./DatatableContext.js";
12
- import { styled as z } from "../Theme/index.js";
13
- function Ie() {
14
- const s = Te();
15
- return ve(s.breakpoints.down("sm"));
4
+ import { TableFilter as pe, TableViewCol as he } from "mui-datatables";
5
+ import me, { PrintContextConsumer as fe } from "react-to-print";
6
+ import { MoreVert as be, CloudDownload as Ce, ViewColumn as xe, FilterList as ge, Print as $ } from "@mui/icons-material";
7
+ import { Box as z, Popover as we, Tooltip as D, IconButton as R, ListItemIcon as L, ListItemText as j, MenuItem as U, Menu as ye, LinearProgress as Te, useTheme as ve, useMediaQuery as Re } from "@mui/material";
8
+ import { useDeepCompareEffect as ke } from "ahooks";
9
+ import { handleCSVDownload as Fe } from "./utils.js";
10
+ import Pe from "./TableSearch.js";
11
+ import { useDatatableContext as Ie } from "./DatatableContext.js";
12
+ import { styled as N } from "../Theme/index.js";
13
+ function Be() {
14
+ const s = ve();
15
+ return Re(s.breakpoints.down("sm"));
16
16
  }
17
- function Be({ ...s }) {
18
- const [f, d] = T(null), k = V(null), F = Ie(), N = V(Math.random().toString(32).slice(2)), [O, A] = T(!1), { customPreButtons: b, customButtons: C, loading: u, disabled: g } = Pe(), {
19
- data: Q = [],
17
+ function qe({ ...s }) {
18
+ const [f, d] = T(null), k = V(null), F = Be(), O = V(Math.random().toString(32).slice(2)), [A, Q] = T(!1), { customPreButtons: b, customButtons: C, loading: u, disabled: x } = Ie(), {
19
+ data: G = [],
20
20
  options: o,
21
21
  components: p = {},
22
22
  columns: P,
23
- filterList: G = [],
24
- filterData: H = [],
25
- filterUpdate: J,
26
- resetFilters: K,
27
- updateFilterByType: W,
28
- toggleViewColumn: X,
29
- updateColumns: Y,
23
+ filterList: H = [],
24
+ filterData: J = [],
25
+ filterUpdate: K,
26
+ resetFilters: W,
27
+ updateFilterByType: X,
28
+ toggleViewColumn: Y,
29
+ updateColumns: Z,
30
30
  title: I = "",
31
- searchText: Z = null,
32
- searchTextUpdate: _,
33
- searchClose: ee
34
- } = s, [B, h] = T({}), te = o.customToolbar ? o.customToolbar(s) : "", { search: oe, downloadCsv: ie, print: m, viewColumns: ne, filterTable: le } = o.textLabels.toolbar, re = o.search === !1 || o.search === "false", x = o.print === !1 || o.print === "false", se = p.TableFilter || ue, ae = p.TableViewCol || pe;
35
- Re(() => {
36
- (u || g) && h({});
37
- }, [u, g]);
38
- const q = (e) => /* @__PURE__ */ t(he, { content: () => s.tableRef(), children: /* @__PURE__ */ t(me, { children: e }) }), w = (e) => `toolbar-pop-${N.current}-${e}`, a = [];
31
+ searchText: _ = null,
32
+ searchTextUpdate: ee,
33
+ searchClose: te
34
+ } = s, [B, h] = T({}), oe = o.customToolbar ? o.customToolbar(s) : "", { search: ie, downloadCsv: ne, print: m, viewColumns: le, filterTable: re } = o.textLabels.toolbar, se = o.search === !1 || o.search === "false", g = o.print === !1 || o.print === "false", ae = p.TableFilter || pe, ce = p.TableViewCol || he;
35
+ ke(() => {
36
+ (u || x) && h({});
37
+ }, [u, x]);
38
+ const q = (e) => /* @__PURE__ */ t(me, { content: () => s.tableRef(), children: /* @__PURE__ */ t(fe, { children: e }) }), w = (e) => `toolbar-pop-${O.current}-${e}`, a = [];
39
39
  o.download === !1 || o.download === "false" || a.push({
40
- icon: /* @__PURE__ */ t(be, {}),
41
- title: ie,
40
+ icon: /* @__PURE__ */ t(Ce, {}),
41
+ title: ne,
42
42
  onClick: () => {
43
- ke(s);
43
+ Fe(s);
44
44
  }
45
45
  }), o.viewColumns === !1 || o.viewColumns === "false" || a.push({
46
- icon: /* @__PURE__ */ t(Ce, {}),
47
- title: ne,
46
+ icon: /* @__PURE__ */ t(xe, {}),
47
+ title: le,
48
48
  // eslint-disable-next-line react/no-unstable-nested-components
49
49
  popRender() {
50
50
  return /* @__PURE__ */ t(
51
- ae,
51
+ ce,
52
52
  {
53
- data: Q,
53
+ data: G,
54
54
  columns: P,
55
55
  options: o,
56
- onColumnUpdate: X,
57
- updateColumns: Y,
56
+ onColumnUpdate: Y,
57
+ updateColumns: Z,
58
58
  components: p
59
59
  }
60
60
  );
61
61
  }
62
62
  }), o.filter === !1 || o.filter === "false" || a.push({
63
63
  icon: /* @__PURE__ */ t(ge, {}),
64
- title: le,
64
+ title: re,
65
65
  // eslint-disable-next-line react/no-unstable-nested-components
66
66
  popRender() {
67
67
  return /* @__PURE__ */ t(
68
- se,
68
+ ae,
69
69
  {
70
70
  customFooter: o.customFilterDialogFooter,
71
71
  columns: P,
72
72
  options: o,
73
- filterList: G,
74
- filterData: H,
75
- onFilterUpdate: J,
76
- onFilterReset: K,
77
- updateFilterByType: W,
73
+ filterList: H,
74
+ filterData: J,
75
+ onFilterUpdate: K,
76
+ onFilterReset: W,
77
+ updateFilterByType: X,
78
78
  components: p
79
79
  }
80
80
  );
81
81
  }
82
82
  });
83
- const E = [...b, !x, ...a, ...C].filter((e) => !!e).length > 1 && F, M = [], ce = [...b, ...a, ...C].map((e, c) => {
83
+ const E = [...b, !g, ...a, ...C].filter((e) => !!e).length > 1 && F, M = [], de = [...b, ...a, ...C].map((e, c) => {
84
84
  if (v(e))
85
85
  return e;
86
86
  const n = w(c);
@@ -88,7 +88,7 @@ function Be({ ...s }) {
88
88
  const { popRender: l, icon: y } = e;
89
89
  return l && M.push(
90
90
  /* @__PURE__ */ t(
91
- xe,
91
+ we,
92
92
  {
93
93
  open: !!B[n],
94
94
  anchorEl: () => B[n],
@@ -119,7 +119,7 @@ function Be({ ...s }) {
119
119
  ) }, n);
120
120
  }
121
121
  return e;
122
- }), de = [...b, ...a, ...C].map((e, c) => {
122
+ }), ue = [...b, ...a, ...C].map((e, c) => {
123
123
  const n = w(c);
124
124
  let l;
125
125
  if (v(e))
@@ -145,28 +145,28 @@ function Be({ ...s }) {
145
145
  );
146
146
  });
147
147
  return /* @__PURE__ */ r("div", { children: [
148
- /* @__PURE__ */ r(qe, { children: [
148
+ /* @__PURE__ */ r(Ee, { children: [
149
149
  /* @__PURE__ */ t(
150
150
  "div",
151
151
  {
152
- className: `custom-toobar-title ${F && O && v(I) ? "toobar-title-hidden" : ""}`,
152
+ className: `custom-toobar-title ${F && A && v(I) ? "toobar-title-hidden" : ""}`,
153
153
  children: /* @__PURE__ */ t("div", { className: "custom-toobar-title-inner", children: /* @__PURE__ */ t("span", { children: I }) })
154
154
  }
155
155
  ),
156
- /* @__PURE__ */ r("div", { className: `custom-toobar-btns ${u || g ? "toobar-btns-disabled" : ""}`, children: [
157
- !re && /* @__PURE__ */ t(
158
- Fe,
156
+ /* @__PURE__ */ r("div", { className: `custom-toobar-btns ${u || x ? "toobar-btns-disabled" : ""}`, children: [
157
+ !se && /* @__PURE__ */ t(
158
+ Pe,
159
159
  {
160
- search: oe,
160
+ search: ie,
161
161
  options: o,
162
- searchText: Z,
163
- searchTextUpdate: _,
164
- searchClose: ee,
165
- onSearchOpen: A
162
+ searchText: _,
163
+ searchTextUpdate: ee,
164
+ searchClose: te,
165
+ onSearchOpen: Q
166
166
  }
167
167
  ),
168
168
  !E && /* @__PURE__ */ r(S, { children: [
169
- !x && q(({ handlePrint: e }) => /* @__PURE__ */ t("span", { children: /* @__PURE__ */ t(D, { title: m, children: /* @__PURE__ */ t(
169
+ !g && q(({ handlePrint: e }) => /* @__PURE__ */ t("span", { children: /* @__PURE__ */ t(D, { title: m, children: /* @__PURE__ */ t(
170
170
  R,
171
171
  {
172
172
  "data-testid": `${m}-iconButton`,
@@ -176,7 +176,7 @@ function Be({ ...s }) {
176
176
  children: /* @__PURE__ */ t($, {})
177
177
  }
178
178
  ) }) })),
179
- ce
179
+ de
180
180
  ] }),
181
181
  E && /* @__PURE__ */ t(
182
182
  R,
@@ -186,14 +186,14 @@ function Be({ ...s }) {
186
186
  "aria-expanded": f ? "true" : void 0,
187
187
  onClick: (e) => d(e.currentTarget),
188
188
  style: { flexShrink: 0 },
189
- children: /* @__PURE__ */ t(fe, {})
189
+ children: /* @__PURE__ */ t(be, {})
190
190
  }
191
191
  )
192
192
  ] }),
193
- te
193
+ oe
194
194
  ] }),
195
195
  /* @__PURE__ */ r(
196
- we,
196
+ ye,
197
197
  {
198
198
  anchorEl: f,
199
199
  open: !!f,
@@ -204,7 +204,7 @@ function Be({ ...s }) {
204
204
  }
205
205
  },
206
206
  children: [
207
- !x && q(({ handlePrint: e }) => /* @__PURE__ */ r(
207
+ !g && q(({ handlePrint: e }) => /* @__PURE__ */ r(
208
208
  U,
209
209
  {
210
210
  onClick: () => {
@@ -216,15 +216,15 @@ function Be({ ...s }) {
216
216
  ]
217
217
  }
218
218
  )),
219
- de
219
+ ue
220
220
  ]
221
221
  }
222
222
  ),
223
223
  M.map((e, c) => /* @__PURE__ */ t("div", { children: e }, w(c))),
224
- /* @__PURE__ */ t(Ee, { children: u && /* @__PURE__ */ t(ye, { className: "toolbar-progress" }) })
224
+ /* @__PURE__ */ t(Me, { children: u && /* @__PURE__ */ t(Te, { className: "toolbar-progress" }) })
225
225
  ] });
226
226
  }
227
- Be.propTypes = {
227
+ qe.propTypes = {
228
228
  data: i.array,
229
229
  options: i.object.isRequired,
230
230
  components: i.object,
@@ -242,7 +242,7 @@ Be.propTypes = {
242
242
  searchClose: i.func.isRequired,
243
243
  tableRef: i.func.isRequired
244
244
  };
245
- const qe = z("div")`
245
+ const Ee = N(z)`
246
246
  display: flex;
247
247
  align-items: center;
248
248
  height: 56px;
@@ -302,7 +302,7 @@ const qe = z("div")`
302
302
  opacity: 0;
303
303
  cursor: none;
304
304
  }
305
- `, Ee = z("div")`
305
+ `, Me = N(z)`
306
306
  width: 100%;
307
307
  height: 2px;
308
308
  .toolbar-progress {
@@ -310,5 +310,5 @@ const qe = z("div")`
310
310
  }
311
311
  `;
312
312
  export {
313
- Be as default
313
+ qe as default
314
314
  };
@@ -1,21 +1,21 @@
1
1
  import { jsxs as f, jsx as e } from "react/jsx-runtime";
2
2
  import { useState as x, useRef as I } from "react";
3
3
  import o from "prop-types";
4
- import { Tooltip as N, IconButton as w, TextField as g } from "@mui/material";
5
- import { Search as v, Clear as R } from "@mui/icons-material";
6
- import q from "clsx";
4
+ import { Box as N, Tooltip as R, IconButton as w, TextField as g } from "@mui/material";
5
+ import { Search as v, Clear as q } from "@mui/icons-material";
6
+ import B from "clsx";
7
7
  import E from "lodash/noop";
8
- import { useDatatableContext as B } from "./DatatableContext.js";
9
- import { styled as D } from "../Theme/index.js";
10
- function M({
8
+ import { useDatatableContext as D } from "./DatatableContext.js";
9
+ import { styled as M } from "../Theme/index.js";
10
+ function O({
11
11
  search: t = "",
12
- options: s,
12
+ options: i,
13
13
  searchText: a = "",
14
14
  searchTextUpdate: c,
15
15
  searchClose: C,
16
16
  onSearchOpen: d = E
17
17
  }) {
18
- const { searchOpen: T, searchPlaceholder: y, searchAlwaysOpen: r } = s, [k, h] = x(!!a || T || !1), [p, m] = x(a), u = I(null), { loading: b } = B(), { searchDebounceTime: n } = s, i = r || k, S = () => {
18
+ const { searchOpen: T, searchPlaceholder: y, searchAlwaysOpen: r } = i, [k, h] = x(!!a || T || !1), [p, m] = x(a), u = I(null), { loading: b } = D(), { searchDebounceTime: n } = i, s = r || k, S = () => {
19
19
  h(!0), d(!0);
20
20
  }, F = (j) => {
21
21
  const { value: l } = j.currentTarget;
@@ -26,24 +26,24 @@ function M({
26
26
  h(!1), C(), m(""), d(!1);
27
27
  };
28
28
  return /* @__PURE__ */ f(
29
- O,
29
+ P,
30
30
  {
31
- className: q({
31
+ className: B({
32
32
  "search-always-open": r
33
33
  }),
34
34
  children: [
35
- i ? /* @__PURE__ */ e("div", { className: "toolbar-search-icon-placeholder", children: /* @__PURE__ */ e(v, {}) }) : /* @__PURE__ */ e(N, { title: t, disableFocusListener: !0, children: /* @__PURE__ */ e(
35
+ s ? /* @__PURE__ */ e("div", { className: "toolbar-search-icon-placeholder", children: /* @__PURE__ */ e(v, {}) }) : /* @__PURE__ */ e(R, { title: t, disableFocusListener: !0, children: /* @__PURE__ */ e(
36
36
  w,
37
37
  {
38
38
  "aria-label": t,
39
39
  "data-testid": `${t}-iconButton`,
40
- disabled: s.search === "disabled",
40
+ disabled: i.search === "disabled",
41
41
  onClick: S,
42
42
  children: /* @__PURE__ */ e(v, {})
43
43
  }
44
44
  ) }),
45
- /* @__PURE__ */ f("div", { className: `toolbar-search-area ${i ? "toolbar-btn-show" : ""}`, children: [
46
- i && !b && /* @__PURE__ */ e(
45
+ /* @__PURE__ */ f("div", { className: `toolbar-search-area ${s ? "toolbar-btn-show" : ""}`, children: [
46
+ s && !b && /* @__PURE__ */ e(
47
47
  g,
48
48
  {
49
49
  variant: "standard",
@@ -64,12 +64,12 @@ function M({
64
64
  }
65
65
  )
66
66
  ] }),
67
- !r && /* @__PURE__ */ e("div", { className: `toolbar-search-close ${i ? "toolbar-btn-show" : ""}`, children: /* @__PURE__ */ e(w, { onClick: $, "aria-label": "click to close the search box", children: /* @__PURE__ */ e(R, {}) }) })
67
+ !r && /* @__PURE__ */ e("div", { className: `toolbar-search-close ${s ? "toolbar-btn-show" : ""}`, children: /* @__PURE__ */ e(w, { onClick: $, "aria-label": "click to close the search box", children: /* @__PURE__ */ e(q, {}) }) })
68
68
  ]
69
69
  }
70
70
  );
71
71
  }
72
- M.propTypes = {
72
+ O.propTypes = {
73
73
  search: o.string,
74
74
  searchText: o.string,
75
75
  onSearchOpen: o.func,
@@ -77,7 +77,7 @@ M.propTypes = {
77
77
  searchTextUpdate: o.func.isRequired,
78
78
  searchClose: o.func.isRequired
79
79
  };
80
- const O = D("div")`
80
+ const P = M(N)`
81
81
  display: flex;
82
82
  align-items: center;
83
83
  .toolbar-search-area {
@@ -129,5 +129,5 @@ const O = D("div")`
129
129
  }
130
130
  `;
131
131
  export {
132
- M as default
132
+ O as default
133
133
  };
@@ -1,20 +1,20 @@
1
- import { jsx as i, jsxs as te } from "react/jsx-runtime";
2
- import { useRef as oe, isValidElement as re } from "react";
1
+ import { jsx as i, jsxs as oe } from "react/jsx-runtime";
2
+ import { useRef as re, isValidElement as ae } from "react";
3
3
  import o from "prop-types";
4
- import ae, { TableFilterList as le, TableFooter as ie } from "mui-datatables";
5
- import { TableFilterList as Ie, TableFooter as Ue } from "mui-datatables";
6
- import { css as H } from "@emotion/react";
7
- import F from "lodash/isObject";
8
- import se from "lodash/cloneDeep";
9
- import ne from "lodash/get";
4
+ import le, { TableFilterList as ie, TableFooter as se } from "mui-datatables";
5
+ import { TableFilterList as Ue, TableFooter as Ee } from "mui-datatables";
6
+ import { css as N } from "@emotion/react";
7
+ import R from "lodash/isObject";
8
+ import ne from "lodash/cloneDeep";
9
+ import de from "lodash/get";
10
10
  import P from "clsx";
11
- import { useCreation as de, useDeepCompareEffect as h } from "ahooks";
12
- import { CircularProgress as ce } from "@mui/material";
13
- import R from "../Empty/index.js";
14
- import pe from "./CustomToolbar.js";
15
- import { DatatableProvider as ue, useDatatableContext as M } from "./DatatableContext.js";
16
- import { styled as $ } from "../Theme/index.js";
17
- const fe = $("div")`
11
+ import { useCreation as ce, useDeepCompareEffect as h } from "ahooks";
12
+ import { Box as M, CircularProgress as pe } from "@mui/material";
13
+ import k from "../Empty/index.js";
14
+ import ue from "./CustomToolbar.js";
15
+ import { DatatableProvider as fe, useDatatableContext as $ } from "./DatatableContext.js";
16
+ import { styled as D } from "../Theme/index.js";
17
+ const be = D(M)`
18
18
  display: flex;
19
19
  align-items: center;
20
20
  .toolbar-filter-content {
@@ -25,21 +25,21 @@ const fe = $("div")`
25
25
  font-size: 14px;
26
26
  }
27
27
  `;
28
- function N({ ...e }) {
29
- const { filterLabel: a } = M(), r = !!(e.filterList ?? []).filter((n) => n.length).length;
30
- return r ? /* @__PURE__ */ te(fe, { children: [
28
+ function A({ ...e }) {
29
+ const { filterLabel: a } = $(), r = !!(e.filterList ?? []).filter((n) => n.length).length;
30
+ return r ? /* @__PURE__ */ oe(be, { children: [
31
31
  r && /* @__PURE__ */ i("div", { className: "toolbar-filter-title", children: a }),
32
- /* @__PURE__ */ i("div", { className: "toolbar-filter-content", children: /* @__PURE__ */ i(le, { ...e }) })
32
+ /* @__PURE__ */ i("div", { className: "toolbar-filter-content", children: /* @__PURE__ */ i(ie, { ...e }) })
33
33
  ] }) : "";
34
34
  }
35
- N.propTypes = {
35
+ A.propTypes = {
36
36
  filterList: o.array
37
37
  };
38
- function be(e) {
39
- const { loading: a, disabled: r } = M();
40
- return /* @__PURE__ */ i(he, { children: /* @__PURE__ */ i("div", { className: `datatable-footer ${a || r ? "datatable-footer-disabled" : ""}`, children: /* @__PURE__ */ i(ie, { ...e }) }) });
38
+ function ge(e) {
39
+ const { loading: a, disabled: r } = $();
40
+ return /* @__PURE__ */ i(Te, { children: /* @__PURE__ */ i("div", { className: `datatable-footer ${a || r ? "datatable-footer-disabled" : ""}`, children: /* @__PURE__ */ i(se, { ...e }) }) });
41
41
  }
42
- const ge = (e) => {
42
+ const me = (e) => {
43
43
  const a = `datatable-durable-${e}`;
44
44
  let r = localStorage[a];
45
45
  if (r)
@@ -50,14 +50,14 @@ const ge = (e) => {
50
50
  }
51
51
  return r || {};
52
52
  };
53
- function He(e) {
54
- return /* @__PURE__ */ i(ue, { children: /* @__PURE__ */ i(A, { ...e }) });
53
+ function Ne(e) {
54
+ return /* @__PURE__ */ i(fe, { children: /* @__PURE__ */ i(I, { ...e }) });
55
55
  }
56
- const k = (e, a) => {
56
+ const L = (e, a) => {
57
57
  const r = {};
58
58
  e.align && (a.className = P(a.className, `pc-align-${e.align}`)), e.verticalKeyAlign && (a.className = P(a.className, `vertical-align-${e.verticalKeyAlign}`)), e.minWidth && (r.minWidth = e.minWidth), a.style = Object.assign({}, a.style, r);
59
59
  };
60
- function A({
60
+ function I({
61
61
  data: e,
62
62
  columns: a,
63
63
  locale: r = "en",
@@ -69,27 +69,27 @@ function A({
69
69
  onChange: m = "",
70
70
  loading: c = !1,
71
71
  disabled: C = !1,
72
- stripped: I = !1,
73
- verticalKeyWidth: U = "",
74
- hideTableHeader: E = !1,
72
+ stripped: U = !1,
73
+ verticalKeyWidth: E = "",
74
+ hideTableHeader: B = !1,
75
75
  components: _ = {},
76
76
  emptyNode: T = "",
77
- durable: v = "",
77
+ durable: x = "",
78
78
  durableKeys: j = ["page", "rowsPerPage", "searchText", "sortOrder"],
79
- bgColor: B = "transparent",
80
- hoverColor: O = "",
81
- stripColor: W = "",
82
- ...z
79
+ bgColor: O = "transparent",
80
+ hoverColor: W = "",
81
+ stripColor: z = "",
82
+ ...K
83
83
  }) {
84
- const D = oe(null), { setCustomPreButtons: K, setCustomButtons: J, setFilterLabel: V, setLoading: q, setDisabled: G } = M(), Q = {
84
+ const S = re(null), { setCustomPreButtons: J, setCustomButtons: V, setFilterLabel: q, setLoading: G, setDisabled: Q } = $(), X = {
85
85
  cursor: "not-allowed",
86
86
  pointerEvents: "none"
87
- }, x = [], X = a.map((s) => {
87
+ }, v = [], Y = a.map((s) => {
88
88
  let t;
89
- F(s) ? t = se(s) : t = {
89
+ R(s) ? t = ne(s) : t = {
90
90
  label: s,
91
91
  name: s
92
- }, x.push(t.name), t.align || (t.align = "left"), t.options || (t.options = {});
92
+ }, v.push(t.name), t.align || (t.align = "left"), t.options || (t.options = {});
93
93
  const { setCellHeaderProps: d, setCellProps: u } = t.options;
94
94
  return t.options.setCellHeaderProps = (...f) => {
95
95
  let l = {
@@ -98,7 +98,7 @@ function A({
98
98
  return d && !d.__innerFunc && (l = {
99
99
  ...l,
100
100
  ...d(...f) || {}
101
- }), (c || C) && (l = { ...l, style: Q }), t.width && (l.width = t.width), k(t, l), l;
101
+ }), (c || C) && (l = { ...l, style: X }), t.width && (l.width = t.width), L(t, l), l;
102
102
  }, t.options.setCellHeaderProps.__innerFunc = 1, (t.align || t.style) && (t.options.setCellProps = (...f) => {
103
103
  let l = {
104
104
  className: ""
@@ -106,12 +106,12 @@ function A({
106
106
  return u && !u.__innerFunc && (l = {
107
107
  ...l,
108
108
  ...u(...f) || {}
109
- }), k(t, l), l;
109
+ }), L(t, l), l;
110
110
  }, t.options.setCellProps.__innerFunc = 1), t;
111
- }), Y = de(() => e.map((s) => !Array.isArray(s) && F(s) ? x.map((t) => ne(s, t)) : s), [e, x]);
112
- h(() => J(g || []), [g]), h(() => K(b || []), [b]), h(() => q(c), [c]), h(() => G(C), [C]);
111
+ }), Z = ce(() => e.map((s) => !Array.isArray(s) && R(s) ? v.map((t) => de(s, t)) : s), [e, v]);
112
+ h(() => V(g || []), [g]), h(() => J(b || []), [b]), h(() => G(c), [c]), h(() => Q(C), [C]);
113
113
  let p;
114
- c ? p = /* @__PURE__ */ i(ce, { color: "primary" }) : re(T) ? p = T : r === "zh" ? p = /* @__PURE__ */ i(R, { children: T || "没有找到匹配的记录" }) : p = /* @__PURE__ */ i(R, { children: T || "No matching records found" });
114
+ c ? p = /* @__PURE__ */ i(pe, { color: "primary" }) : ae(T) ? p = T : r === "zh" ? p = /* @__PURE__ */ i(k, { children: T || "没有找到匹配的记录" }) : p = /* @__PURE__ */ i(k, { children: T || "No matching records found" });
115
115
  let y = {
116
116
  body: {
117
117
  noMatch: p,
@@ -154,13 +154,13 @@ function A({
154
154
  filter: { all: "全部", title: "筛选器", reset: "重置" },
155
155
  viewColumns: { title: "显示的列", titleAria: "显示/隐藏 表格的列" },
156
156
  selectedRows: { text: "个已选项目", delete: "删除", deleteAria: "删除所选项目" }
157
- }), h(() => V(y.filter.title), [y.filter.title]);
158
- const Z = ge(v), S = {
157
+ }), h(() => q(y.filter.title), [y.filter.title]);
158
+ const ee = me(x), F = {
159
159
  selectableRows: "none",
160
160
  textLabels: y,
161
161
  rowsPerPage: 10,
162
162
  rowsPerPageOptions: [10, 20, 50],
163
- ...Z,
163
+ ...ee,
164
164
  ...n,
165
165
  // Wrap the more friendly onChange callback by listening to onTableChange,
166
166
  // which will only be triggered when the table key state changes
@@ -176,44 +176,44 @@ function A({
176
176
  //
177
177
  filterList: t.filterList
178
178
  };
179
- if (v) {
179
+ if (x) {
180
180
  const f = {};
181
181
  j.forEach((l) => {
182
182
  f[l] = d[l];
183
- }), localStorage.setItem(`datatable-durable-${v}`, JSON.stringify(f));
183
+ }), localStorage.setItem(`datatable-durable-${x}`, JSON.stringify(f));
184
184
  }
185
185
  const u = JSON.stringify(d);
186
- u !== D.current && (D.current = u, m && m(d, s));
186
+ u !== S.current && (S.current = u, m && m(d, s));
187
187
  }
188
188
  };
189
- m && (S.serverSide = !0);
190
- const ee = {
191
- options: S,
192
- ...z,
189
+ m && (F.serverSide = !0);
190
+ const te = {
191
+ options: F,
192
+ ...K,
193
193
  components: {
194
- TableToolbar: pe,
195
- TableFooter: be,
196
- TableFilterList: N,
194
+ TableToolbar: ue,
195
+ TableFooter: ge,
196
+ TableFilterList: A,
197
197
  ..._
198
198
  }
199
199
  };
200
200
  return /* @__PURE__ */ i(
201
- me,
201
+ he,
202
202
  {
203
- verticalKeyWidth: U,
204
- bgColor: B,
205
- hoverColor: O,
206
- stripColor: W,
203
+ verticalKeyWidth: E,
204
+ bgColor: O,
205
+ hoverColor: W,
206
+ stripColor: z,
207
207
  className: P({
208
- "datatable-stripped": I,
209
- "datatable-hide-header": E
208
+ "datatable-stripped": U,
209
+ "datatable-hide-header": B
210
210
  }),
211
211
  style: w,
212
- children: /* @__PURE__ */ i(ae, { data: Y, columns: X, ...ee })
212
+ children: /* @__PURE__ */ i(le, { data: Z, columns: Y, ...te })
213
213
  }
214
214
  );
215
215
  }
216
- A.propTypes = {
216
+ I.propTypes = {
217
217
  data: o.array.isRequired,
218
218
  columns: o.array.isRequired,
219
219
  options: o.object,
@@ -235,7 +235,7 @@ A.propTypes = {
235
235
  hoverColor: o.string,
236
236
  stripColor: o.string
237
237
  };
238
- const L = H`
238
+ const H = N`
239
239
  .MuiTableCell-head {
240
240
  [class*='MUIDataTableHeadCell-toolButton'] {
241
241
  width: 100%;
@@ -268,7 +268,7 @@ const L = H`
268
268
  text-align: right;
269
269
  }
270
270
  }
271
- `, me = $("div", {
271
+ `, he = D(M, {
272
272
  shouldForwardProp: (e) => !["verticalKeyWidth", "bgColor", "hoverColor", "stripColor"].includes(e)
273
273
  })(({ theme: e, verticalKeyWidth: a, bgColor: r, hoverColor: n, stripColor: w }) => {
274
274
  const b = e.palette.text.primary, g = e.palette.action.hover, m = e.palette.grey[50], c = a ? `
@@ -286,7 +286,7 @@ const L = H`
286
286
  }
287
287
  }
288
288
  ` : "";
289
- return H`
289
+ return N`
290
290
  &.datatable-hide-header {
291
291
  thead.MuiTableHead-root {
292
292
  display: none;
@@ -341,11 +341,11 @@ const L = H`
341
341
  }
342
342
  }
343
343
  ${e.breakpoints.up("md")} {
344
- ${L}
344
+ ${H}
345
345
  }
346
346
  ${e.breakpoints.up("sm")} {
347
347
  [class*='responsiveSimple'] {
348
- ${L}
348
+ ${H}
349
349
  }
350
350
  }
351
351
 
@@ -385,7 +385,7 @@ const L = H`
385
385
  }
386
386
  }
387
387
  `;
388
- }), he = $("div")`
388
+ }), Te = D(M)`
389
389
  display: flex;
390
390
  align-items: center;
391
391
  .datatable-footer {
@@ -427,8 +427,8 @@ const L = H`
427
427
  }
428
428
  `;
429
429
  export {
430
- Ie as TableFilterList,
431
- Ue as TableFooter,
432
- He as default,
433
- ge as getDurableData
430
+ Ue as TableFilterList,
431
+ Ee as TableFooter,
432
+ Ne as default,
433
+ me as getDurableData
434
434
  };