@arcblock/ux 3.2.2 → 3.2.3

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,9 +1,9 @@
1
1
  import { jsx as t, jsxs as l, Fragment as S } from "react/jsx-runtime";
2
2
  import { useState as T, useRef as V, isValidElement as v } from "react";
3
- import n from "prop-types";
3
+ import i from "prop-types";
4
4
  import { TableFilter as ue, TableViewCol as pe } from "mui-datatables";
5
- import me, { PrintContextConsumer as fe } from "react-to-print";
6
- import { MoreVert as he, CloudDownload as be, ViewColumn as Ce, FilterList as we, Print as $ } from "@mui/icons-material";
5
+ import me, { PrintContextConsumer as he } from "react-to-print";
6
+ import { MoreVert as fe, CloudDownload as be, ViewColumn as Ce, FilterList as we, Print as $ } from "@mui/icons-material";
7
7
  import { Popover as xe, Tooltip as D, IconButton as R, ListItemIcon as L, ListItemText as j, MenuItem as U, Menu as ge, LinearProgress as ye, useTheme as Te, useMediaQuery as ve } from "@mui/material";
8
8
  import { useDeepCompareEffect as Re } from "ahooks";
9
9
  import { handleCSVDownload as ke } from "./utils.js";
@@ -15,7 +15,7 @@ function Ie() {
15
15
  return ve(s.breakpoints.down("sm"));
16
16
  }
17
17
  function Be({ ...s }) {
18
- const [h, 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: w } = Pe(), {
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: w } = Pe(), {
19
19
  data: Q = [],
20
20
  options: o,
21
21
  components: p = {},
@@ -31,20 +31,20 @@ function Be({ ...s }) {
31
31
  searchText: Z = null,
32
32
  searchTextUpdate: _,
33
33
  searchClose: ee
34
- } = s, [B, m] = T({}), te = o.customToolbar ? o.customToolbar(s) : "", { search: oe, downloadCsv: ne, print: f, viewColumns: ie, filterTable: re } = o.textLabels.toolbar, le = o.search === !1 || o.search === "false", x = o.print === !1 || o.print === "false", se = p.TableFilter || ue, ae = p.TableViewCol || pe;
34
+ } = s, [B, m] = T({}), te = o.customToolbar ? o.customToolbar(s) : "", { search: oe, downloadCsv: ie, print: h, viewColumns: ne, filterTable: re } = o.textLabels.toolbar, le = o.search === !1 || o.search === "false", x = o.print === !1 || o.print === "false", se = p.TableFilter || ue, ae = p.TableViewCol || pe;
35
35
  Re(() => {
36
36
  (u || w) && m({});
37
37
  }, [u, w]);
38
- const q = (e) => /* @__PURE__ */ t(me, { content: () => s.tableRef(), children: /* @__PURE__ */ t(fe, { children: e }) }), g = (e) => `toolbar-pop-${N.current}-${e}`, a = [];
38
+ const q = (e) => /* @__PURE__ */ t(me, { content: () => s.tableRef(), children: /* @__PURE__ */ t(he, { children: e }) }), g = (e) => `toolbar-pop-${N.current}-${e}`, a = [];
39
39
  o.download === !1 || o.download === "false" || a.push({
40
40
  icon: /* @__PURE__ */ t(be, {}),
41
- title: ne,
41
+ title: ie,
42
42
  onClick: () => {
43
43
  ke(s);
44
44
  }
45
45
  }), o.viewColumns === !1 || o.viewColumns === "false" || a.push({
46
46
  icon: /* @__PURE__ */ t(Ce, {}),
47
- title: ie,
47
+ title: ne,
48
48
  // eslint-disable-next-line react/no-unstable-nested-components
49
49
  popRender() {
50
50
  return /* @__PURE__ */ t(
@@ -83,15 +83,15 @@ function Be({ ...s }) {
83
83
  const E = [...b, !x, ...a, ...C].filter((e) => !!e).length > 1 && F, M = [], ce = [...b, ...a, ...C].map((e, c) => {
84
84
  if (v(e))
85
85
  return e;
86
- const i = g(c);
86
+ const n = g(c);
87
87
  if (e.icon) {
88
88
  const { popRender: r, icon: y } = e;
89
89
  return r && M.push(
90
90
  /* @__PURE__ */ t(
91
91
  xe,
92
92
  {
93
- open: !!B[i],
94
- anchorEl: () => B[i],
93
+ open: !!B[n],
94
+ anchorEl: () => B[n],
95
95
  onClose: () => {
96
96
  m({});
97
97
  },
@@ -101,26 +101,26 @@ function Be({ ...s }) {
101
101
  },
102
102
  children: /* @__PURE__ */ t("div", { children: r() })
103
103
  },
104
- i
104
+ n
105
105
  )
106
106
  ), /* @__PURE__ */ t(D, { title: e.title, children: /* @__PURE__ */ t(
107
107
  R,
108
108
  {
109
109
  "data-testid": `${e.title}-iconButton`,
110
- id: `btn-${i}`,
110
+ id: `btn-${n}`,
111
111
  "aria-label": e.title,
112
112
  onClick: () => {
113
113
  e.onClick && e.onClick(), r && m({
114
- [i]: document.getElementById(`btn-${i}`)
114
+ [n]: document.getElementById(`btn-${n}`)
115
115
  });
116
116
  },
117
117
  children: /* @__PURE__ */ t("div", { className: "custom-toolbar-icon", children: y })
118
118
  }
119
- ) }, i);
119
+ ) }, n);
120
120
  }
121
121
  return e;
122
122
  }), de = [...b, ...a, ...C].map((e, c) => {
123
- const i = g(c);
123
+ const n = g(c);
124
124
  let r;
125
125
  if (v(e))
126
126
  r = e;
@@ -136,12 +136,12 @@ function Be({ ...s }) {
136
136
  {
137
137
  onClick: () => {
138
138
  d(null), e.onClick && e.onClick(), e.popRender && m({
139
- [i]: k.current
139
+ [n]: k.current
140
140
  });
141
141
  },
142
142
  children: r
143
143
  },
144
- i
144
+ n
145
145
  );
146
146
  });
147
147
  return /* @__PURE__ */ l("div", { children: [
@@ -166,11 +166,11 @@ function Be({ ...s }) {
166
166
  }
167
167
  ),
168
168
  !E && /* @__PURE__ */ l(S, { children: [
169
- !x && q(({ handlePrint: e }) => /* @__PURE__ */ t("span", { children: /* @__PURE__ */ t(D, { title: f, children: /* @__PURE__ */ t(
169
+ !x && q(({ handlePrint: e }) => /* @__PURE__ */ t("span", { children: /* @__PURE__ */ t(D, { title: h, children: /* @__PURE__ */ t(
170
170
  R,
171
171
  {
172
- "data-testid": `${f}-iconButton`,
173
- "aria-label": f,
172
+ "data-testid": `${h}-iconButton`,
173
+ "aria-label": h,
174
174
  disabled: o.print === "disabled",
175
175
  onClick: e,
176
176
  children: /* @__PURE__ */ t($, {})
@@ -183,10 +183,10 @@ function Be({ ...s }) {
183
183
  {
184
184
  ref: k,
185
185
  "aria-haspopup": "true",
186
- "aria-expanded": h ? "true" : void 0,
186
+ "aria-expanded": f ? "true" : void 0,
187
187
  onClick: (e) => d(e.currentTarget),
188
188
  style: { flexShrink: 0 },
189
- children: /* @__PURE__ */ t(he, {})
189
+ children: /* @__PURE__ */ t(fe, {})
190
190
  }
191
191
  )
192
192
  ] }),
@@ -195,8 +195,8 @@ function Be({ ...s }) {
195
195
  /* @__PURE__ */ l(
196
196
  ge,
197
197
  {
198
- anchorEl: h,
199
- open: !!h,
198
+ anchorEl: f,
199
+ open: !!f,
200
200
  onClose: () => d(null),
201
201
  slotProps: {
202
202
  list: {
@@ -212,7 +212,7 @@ function Be({ ...s }) {
212
212
  },
213
213
  children: [
214
214
  /* @__PURE__ */ t(L, { children: /* @__PURE__ */ t($, { fontSize: "small" }) }),
215
- /* @__PURE__ */ t(j, { children: f })
215
+ /* @__PURE__ */ t(j, { children: h })
216
216
  ]
217
217
  }
218
218
  )),
@@ -225,27 +225,28 @@ function Be({ ...s }) {
225
225
  ] });
226
226
  }
227
227
  Be.propTypes = {
228
- data: n.array,
229
- options: n.object.isRequired,
230
- components: n.object,
231
- columns: n.array.isRequired,
232
- filterList: n.array,
233
- filterData: n.array,
234
- filterUpdate: n.func.isRequired,
235
- resetFilters: n.func.isRequired,
236
- updateFilterByType: n.func.isRequired,
237
- toggleViewColumn: n.func.isRequired,
238
- updateColumns: n.func.isRequired,
239
- title: n.any,
240
- searchText: n.any,
241
- searchTextUpdate: n.func.isRequired,
242
- searchClose: n.func.isRequired,
243
- tableRef: n.func.isRequired
228
+ data: i.array,
229
+ options: i.object.isRequired,
230
+ components: i.object,
231
+ columns: i.array.isRequired,
232
+ filterList: i.array,
233
+ filterData: i.array,
234
+ filterUpdate: i.func.isRequired,
235
+ resetFilters: i.func.isRequired,
236
+ updateFilterByType: i.func.isRequired,
237
+ toggleViewColumn: i.func.isRequired,
238
+ updateColumns: i.func.isRequired,
239
+ title: i.any,
240
+ searchText: i.any,
241
+ searchTextUpdate: i.func.isRequired,
242
+ searchClose: i.func.isRequired,
243
+ tableRef: i.func.isRequired
244
244
  };
245
245
  const qe = z("div")`
246
246
  display: flex;
247
247
  align-items: center;
248
248
  flex-wrap: wrap;
249
+ min-height: 56px;
249
250
  .custom-toobar-title {
250
251
  flex: 1 1 auto;
251
252
  font-size: 18px;
@@ -1,4 +1,4 @@
1
- const e = "3.2.2", s = { "@blocklet/js-sdk": "1.17.1" }, n = {
1
+ const e = "3.2.3", s = { "@blocklet/js-sdk": "1.17.1" }, n = {
2
2
  version: e,
3
3
  dependencies: s
4
4
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcblock/ux",
3
- "version": "3.2.2",
3
+ "version": "3.2.3",
4
4
  "description": "Common used react components for arcblock products",
5
5
  "keywords": [
6
6
  "react",
@@ -68,16 +68,16 @@
68
68
  "react": "^19.0.0",
69
69
  "react-router-dom": "^6.22.3"
70
70
  },
71
- "gitHead": "d6da30f57d7f5f855462aa75b4189fb8be48fecc",
71
+ "gitHead": "bbd2b3c8caecf454ee738676f1ca5fe0e71fdb6a",
72
72
  "dependencies": {
73
- "@arcblock/bridge": "3.2.2",
73
+ "@arcblock/bridge": "3.2.3",
74
74
  "@arcblock/did": "^1.27.3",
75
75
  "@arcblock/did-motif": "^1.1.14",
76
- "@arcblock/icons": "3.2.2",
77
- "@arcblock/nft-display": "3.2.2",
78
- "@arcblock/react-hooks": "3.2.2",
76
+ "@arcblock/icons": "3.2.3",
77
+ "@arcblock/nft-display": "3.2.3",
78
+ "@arcblock/react-hooks": "3.2.3",
79
79
  "@blocklet/js-sdk": "1.17.1",
80
- "@blocklet/theme": "3.2.2",
80
+ "@blocklet/theme": "3.2.3",
81
81
  "@fontsource/roboto": "~5.1.1",
82
82
  "@fontsource/ubuntu-mono": "^5.2.6",
83
83
  "@iconify-icons/logos": "^1.2.36",
@@ -354,6 +354,7 @@ const Container = styled('div')`
354
354
  display: flex;
355
355
  align-items: center;
356
356
  flex-wrap: wrap;
357
+ min-height: 56px;
357
358
  .custom-toobar-title {
358
359
  flex: 1 1 auto;
359
360
  font-size: 18px;