@blocklet/list 0.12.117 → 0.13.1
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.
- package/lib/index.es.js +80 -80
- package/package.json +3 -3
package/lib/index.es.js
CHANGED
|
@@ -6,7 +6,7 @@ import { Button as Ne, CircularProgress as oe, MenuList as Le, useMediaQuery as
|
|
|
6
6
|
import We from "@mui/icons-material/Face";
|
|
7
7
|
import { ErrorBoundary as Ge } from "react-error-boundary";
|
|
8
8
|
import { ErrorFallback as Te } from "@arcblock/ux/lib/ErrorBoundary";
|
|
9
|
-
import { createContext as Ke, useMemo as
|
|
9
|
+
import { createContext as Ke, useMemo as Q, useState as E, useCallback as ne, useEffect as j, useContext as He, forwardRef as Ve, useRef as J, createElement as Qe, Fragment as Je } from "react";
|
|
10
10
|
import { useReactive as Pe, useInfiniteScroll as Xe, useRequest as Ye, useSize as Ze, useDebounceFn as et, useMemoizedFn as tt, useCreation as rt, useMount as ot } from "ahooks";
|
|
11
11
|
import { joinURL as nt, parseQuery as lt } from "ufo";
|
|
12
12
|
import o from "prop-types";
|
|
@@ -16,8 +16,8 @@ import st from "json-stable-stringify";
|
|
|
16
16
|
import "lodash/cloneDeep";
|
|
17
17
|
import ct from "color";
|
|
18
18
|
import be from "flat";
|
|
19
|
-
import
|
|
20
|
-
import
|
|
19
|
+
import pt from "@mui/icons-material/KeyboardArrowDown";
|
|
20
|
+
import ut from "lodash/isEmpty";
|
|
21
21
|
import dt from "@mui/icons-material/FilterAltOutlined";
|
|
22
22
|
import mt from "@arcblock/ux/lib/Dialog";
|
|
23
23
|
import ht from "@mui/material/Button";
|
|
@@ -101,7 +101,7 @@ const zt = It((e) => Promise.resolve(e), 300), Dt = {
|
|
|
101
101
|
noCategoryResults2: '" Blocklets'
|
|
102
102
|
},
|
|
103
103
|
autocomplete: {
|
|
104
|
-
expandResult:
|
|
104
|
+
expandResult: "View all search results for"
|
|
105
105
|
}
|
|
106
106
|
}, _t = {
|
|
107
107
|
common: {
|
|
@@ -140,7 +140,7 @@ const zt = It((e) => Promise.resolve(e), 300), Dt = {
|
|
|
140
140
|
noCategoryResults2: '" 类别的 Blocklets'
|
|
141
141
|
},
|
|
142
142
|
autocomplete: {
|
|
143
|
-
expandResult: "
|
|
143
|
+
expandResult: "查看所有搜索结果"
|
|
144
144
|
}
|
|
145
145
|
}, re = {
|
|
146
146
|
en: be(Dt),
|
|
@@ -205,7 +205,7 @@ function ie({
|
|
|
205
205
|
onFilterChange: c,
|
|
206
206
|
onSearchSelect: x,
|
|
207
207
|
extraFilter: y,
|
|
208
|
-
wrapChildren:
|
|
208
|
+
wrapChildren: u,
|
|
209
209
|
baseSearch: b,
|
|
210
210
|
serverVersion: d,
|
|
211
211
|
storeVersion: S,
|
|
@@ -216,10 +216,10 @@ function ie({
|
|
|
216
216
|
}) {
|
|
217
217
|
const i = {};
|
|
218
218
|
d && (i["x-blocklet-server-version"] = d), S && (i["x-blocklet-store-version"] = S);
|
|
219
|
-
const h =
|
|
219
|
+
const h = Q(() => it.create({
|
|
220
220
|
baseURL: r,
|
|
221
221
|
headers: i
|
|
222
|
-
}), [r]), m =
|
|
222
|
+
}), [r]), m = Q(() => ({
|
|
223
223
|
sortBy: "popularity",
|
|
224
224
|
sortDirection: "desc",
|
|
225
225
|
...e
|
|
@@ -230,10 +230,10 @@ function ie({
|
|
|
230
230
|
}), [w, L] = E(null), I = Xe(
|
|
231
231
|
async (l) => {
|
|
232
232
|
l || ($.currentPage = $.defaultCurrentPage);
|
|
233
|
-
const { currentPage:
|
|
233
|
+
const { currentPage: p, pageSize: B } = $, A = {
|
|
234
234
|
...m,
|
|
235
235
|
sortBy: _[m.sortBy],
|
|
236
|
-
page:
|
|
236
|
+
page: p,
|
|
237
237
|
pageSize: B
|
|
238
238
|
};
|
|
239
239
|
L(null);
|
|
@@ -241,7 +241,7 @@ function ie({
|
|
|
241
241
|
params: A
|
|
242
242
|
});
|
|
243
243
|
return $.currentPage++, {
|
|
244
|
-
page:
|
|
244
|
+
page: p,
|
|
245
245
|
pageSize: B,
|
|
246
246
|
list: (z == null ? void 0 : z.dataList) || [],
|
|
247
247
|
total: (z == null ? void 0 : z.total) || 0
|
|
@@ -265,17 +265,17 @@ function ie({
|
|
|
265
265
|
return Array.isArray(l) ? l : [];
|
|
266
266
|
},
|
|
267
267
|
{ manual: !0 }
|
|
268
|
-
), F =
|
|
269
|
-
(l,
|
|
268
|
+
), F = Q(() => at(W || [], [(p) => p.name], ["asc"]), [W]), K = ne(
|
|
269
|
+
(l, p) => {
|
|
270
270
|
const B = re[a] ? re[a][l] : re.en[l];
|
|
271
|
-
return Rt(B,
|
|
271
|
+
return Rt(B, p);
|
|
272
272
|
},
|
|
273
273
|
[a]
|
|
274
|
-
), H =
|
|
275
|
-
var
|
|
276
|
-
let l = ((
|
|
274
|
+
), H = Q(() => {
|
|
275
|
+
var p;
|
|
276
|
+
let l = ((p = I.data) == null ? void 0 : p.list) || [];
|
|
277
277
|
return l = y(l), l;
|
|
278
|
-
}, [I.data, y]), g =
|
|
278
|
+
}, [I.data, y]), g = Q(() => Pt(F, a), [F, a]), V = Tt(K), M = {
|
|
279
279
|
errors: { fetchBlockletsError: w, fetchCategoriesError: ee },
|
|
280
280
|
loadings: {
|
|
281
281
|
fetchBlockletsLoading: I.loading,
|
|
@@ -284,7 +284,7 @@ function ie({
|
|
|
284
284
|
},
|
|
285
285
|
endpoint: r,
|
|
286
286
|
blockletList: H,
|
|
287
|
-
wrapChildren:
|
|
287
|
+
wrapChildren: u,
|
|
288
288
|
t: K,
|
|
289
289
|
filters: m,
|
|
290
290
|
selectedCategory: k,
|
|
@@ -292,7 +292,7 @@ function ie({
|
|
|
292
292
|
blockletRender: s,
|
|
293
293
|
locale: a,
|
|
294
294
|
categoryOptions: g,
|
|
295
|
-
priceOptions:
|
|
295
|
+
priceOptions: V,
|
|
296
296
|
storeApi: h,
|
|
297
297
|
baseSearch: b,
|
|
298
298
|
showResourcesSwitch: C,
|
|
@@ -301,37 +301,37 @@ function ie({
|
|
|
301
301
|
hasNextPage: !I.noMore,
|
|
302
302
|
onFilterChange: c,
|
|
303
303
|
handleSort: (l) => {
|
|
304
|
-
const
|
|
304
|
+
const p = {
|
|
305
305
|
...m,
|
|
306
306
|
sortBy: l,
|
|
307
307
|
sortDirection: l === "nameAsc" ? "asc" : "desc"
|
|
308
308
|
};
|
|
309
|
-
c(
|
|
309
|
+
c(p);
|
|
310
310
|
},
|
|
311
311
|
handleKeyword: (l) => {
|
|
312
|
-
const
|
|
313
|
-
c(
|
|
312
|
+
const p = { ...m, keyword: l || void 0 };
|
|
313
|
+
c(p);
|
|
314
314
|
},
|
|
315
315
|
handlePrice: (l) => {
|
|
316
|
-
const
|
|
316
|
+
const p = {
|
|
317
317
|
...m,
|
|
318
318
|
price: l === m.price ? void 0 : l
|
|
319
319
|
};
|
|
320
|
-
c(
|
|
320
|
+
c(p);
|
|
321
321
|
},
|
|
322
322
|
handleCategory: (l) => {
|
|
323
|
-
let
|
|
324
|
-
(l === "all" || l === m.category) && (
|
|
325
|
-
const B = { ...m, category:
|
|
323
|
+
let p = l;
|
|
324
|
+
(l === "all" || l === m.category) && (p = void 0);
|
|
325
|
+
const B = { ...m, category: p };
|
|
326
326
|
c(B);
|
|
327
327
|
},
|
|
328
328
|
handleDeveloper: (l) => {
|
|
329
|
-
const
|
|
330
|
-
c(
|
|
329
|
+
const p = { ...m, owner: l || void 0 };
|
|
330
|
+
c(p);
|
|
331
331
|
},
|
|
332
332
|
handlePage: (l) => {
|
|
333
|
-
const
|
|
334
|
-
c(
|
|
333
|
+
const p = { ...m, currentPage: l };
|
|
334
|
+
c(p);
|
|
335
335
|
},
|
|
336
336
|
handleSwitchShowResources: () => {
|
|
337
337
|
const l = { ...m };
|
|
@@ -341,16 +341,16 @@ function ie({
|
|
|
341
341
|
getCategoryLocale: (l) => {
|
|
342
342
|
if (!l)
|
|
343
343
|
return null;
|
|
344
|
-
let
|
|
344
|
+
let p = null;
|
|
345
345
|
const B = W.find((A) => A._id === l);
|
|
346
|
-
return B && (
|
|
346
|
+
return B && (p = B.locales[a]), p;
|
|
347
347
|
},
|
|
348
348
|
get developerName() {
|
|
349
|
-
var
|
|
350
|
-
return ((B = (
|
|
349
|
+
var p, B;
|
|
350
|
+
return ((B = (p = H.find((A) => {
|
|
351
351
|
var z;
|
|
352
352
|
return ((z = A == null ? void 0 : A.owner) == null ? void 0 : z.did) === m.owner;
|
|
353
|
-
})) == null ? void 0 :
|
|
353
|
+
})) == null ? void 0 : p.owner) == null ? void 0 : B.name) || "";
|
|
354
354
|
},
|
|
355
355
|
handleSearchSelect: x
|
|
356
356
|
};
|
|
@@ -371,7 +371,7 @@ function N() {
|
|
|
371
371
|
}
|
|
372
372
|
const Lt = T(Ne)`
|
|
373
373
|
border-radius: 4px;
|
|
374
|
-
`, se =
|
|
374
|
+
`, se = Ve(({ children: e, rounded: n, loading: r, disabled: a, ...s }, c) => /* @__PURE__ */ t(
|
|
375
375
|
Lt,
|
|
376
376
|
{
|
|
377
377
|
ref: c,
|
|
@@ -395,7 +395,7 @@ se.defaultProps = {
|
|
|
395
395
|
disabled: !1
|
|
396
396
|
};
|
|
397
397
|
function ce({ title: e, value: n, icon: r, prepend: a, options: s, onChange: c, itemRender: x, ...y }) {
|
|
398
|
-
const
|
|
398
|
+
const u = J(null), b = ae(), [d, S] = E(!1), [v, C] = E(n !== null ? n : ""), P = Se(b.breakpoints.down("sm"));
|
|
399
399
|
j(() => {
|
|
400
400
|
C(n !== null ? n : "");
|
|
401
401
|
}, [n]);
|
|
@@ -414,21 +414,21 @@ function ce({ title: e, value: n, icon: r, prepend: a, options: s, onChange: c,
|
|
|
414
414
|
/* @__PURE__ */ f(
|
|
415
415
|
Mt,
|
|
416
416
|
{
|
|
417
|
-
ref:
|
|
417
|
+
ref: u,
|
|
418
418
|
onClick: i,
|
|
419
419
|
variant: "outlined",
|
|
420
420
|
size: "small",
|
|
421
|
-
className: ["my-select__selector",
|
|
421
|
+
className: ["my-select__selector", ut(v) ? "" : "my-select__selector--active"].join(" "),
|
|
422
422
|
sx: { minWidth: "auto" },
|
|
423
423
|
...y,
|
|
424
424
|
children: [
|
|
425
425
|
/* @__PURE__ */ t("div", { className: "my-select__icon", children: r }),
|
|
426
426
|
e,
|
|
427
|
-
/* @__PURE__ */ t(Me, { className: "my-select__arrowdown", component:
|
|
427
|
+
/* @__PURE__ */ t(Me, { className: "my-select__arrowdown", component: pt, fontSize: "small" })
|
|
428
428
|
]
|
|
429
429
|
}
|
|
430
430
|
),
|
|
431
|
-
/* @__PURE__ */ t(Oe, { open: d, anchorEl:
|
|
431
|
+
/* @__PURE__ */ t(Oe, { open: d, anchorEl: u.current, transition: !0, sx: { zIndex: "9999" }, children: ({ TransitionProps: k, placement: $ }) => /* @__PURE__ */ t(Fe, { ...k, sx: { transformOrigin: $ === "bottom" ? "center top" : "center bottom" }, children: /* @__PURE__ */ t(Ae, { children: /* @__PURE__ */ t(Ee, { onClickAway: R, children: /* @__PURE__ */ f(Ot, { autoFocusItem: d, onMouseEnter: i, onMouseLeave: R, children: [
|
|
432
432
|
a,
|
|
433
433
|
s.map((w) => x ? x(w) : /* @__PURE__ */ t(
|
|
434
434
|
qe,
|
|
@@ -563,13 +563,13 @@ U.propTypes = {
|
|
|
563
563
|
U.defaultProps = {
|
|
564
564
|
value: null
|
|
565
565
|
};
|
|
566
|
-
function
|
|
567
|
-
const { selectedCategory: e, handleCategory: n, t: r, handlePrice: a, filters: s, categoryOptions: c, priceOptions: x } = N(), [y,
|
|
568
|
-
d === "category" && n(S), d === "price" && a(S),
|
|
566
|
+
function pe() {
|
|
567
|
+
const { selectedCategory: e, handleCategory: n, t: r, handlePrice: a, filters: s, categoryOptions: c, priceOptions: x } = N(), [y, u] = E(!1), b = (d, S) => {
|
|
568
|
+
d === "category" && n(S), d === "price" && a(S), u(!1);
|
|
569
569
|
};
|
|
570
570
|
return /* @__PURE__ */ f(At, { children: [
|
|
571
|
-
/* @__PURE__ */ t(ht, { variant: "outlined", className: "filter-button", onClick: () =>
|
|
572
|
-
/* @__PURE__ */ f(mt, { fullWidth: !0, title: "", open: y, onClose: () =>
|
|
571
|
+
/* @__PURE__ */ t(ht, { variant: "outlined", className: "filter-button", onClick: () => u(!0), children: /* @__PURE__ */ t(dt, { className: "filter-icon", fontSize: "small" }) }),
|
|
572
|
+
/* @__PURE__ */ f(mt, { fullWidth: !0, title: "", open: y, onClose: () => u(!1), children: [
|
|
573
573
|
/* @__PURE__ */ t(
|
|
574
574
|
U,
|
|
575
575
|
{
|
|
@@ -606,8 +606,8 @@ const At = T("div")`
|
|
|
606
606
|
color: ${(e) => e.theme.palette.grey[500]};
|
|
607
607
|
}
|
|
608
608
|
`;
|
|
609
|
-
|
|
610
|
-
|
|
609
|
+
pe.propTypes = {};
|
|
610
|
+
pe.defaultProps = {};
|
|
611
611
|
const Et = T("div")`
|
|
612
612
|
.MuiChip-root {
|
|
613
613
|
border-radius: 4px;
|
|
@@ -682,7 +682,7 @@ function ze({ children: e }) {
|
|
|
682
682
|
ze.propTypes = {
|
|
683
683
|
children: o.func.isRequired
|
|
684
684
|
};
|
|
685
|
-
function
|
|
685
|
+
function ue({ blocklets: e, ...n }) {
|
|
686
686
|
const {
|
|
687
687
|
blockletRender: r,
|
|
688
688
|
errors: a,
|
|
@@ -690,7 +690,7 @@ function pe({ blocklets: e, ...n }) {
|
|
|
690
690
|
selectedCategory: c,
|
|
691
691
|
getCategoryLocale: x,
|
|
692
692
|
filters: y,
|
|
693
|
-
t:
|
|
693
|
+
t: u,
|
|
694
694
|
hasNextPage: b,
|
|
695
695
|
loadMore: d,
|
|
696
696
|
endpoint: S
|
|
@@ -713,8 +713,8 @@ function pe({ blocklets: e, ...n }) {
|
|
|
713
713
|
/* @__PURE__ */ t(
|
|
714
714
|
Z,
|
|
715
715
|
{
|
|
716
|
-
primaryStart:
|
|
717
|
-
primaryEnd:
|
|
716
|
+
primaryStart: u("blocklet.noBlockletPart1"),
|
|
717
|
+
primaryEnd: u("blocklet.noBlockletPart2"),
|
|
718
718
|
filter: y.keyword
|
|
719
719
|
}
|
|
720
720
|
),
|
|
@@ -725,8 +725,8 @@ function pe({ blocklets: e, ...n }) {
|
|
|
725
725
|
/* @__PURE__ */ t(
|
|
726
726
|
Z,
|
|
727
727
|
{
|
|
728
|
-
primaryStart:
|
|
729
|
-
primaryEnd:
|
|
728
|
+
primaryStart: u("blocklet.noBlockletPart1"),
|
|
729
|
+
primaryEnd: u("blocklet.noBlockletPart2"),
|
|
730
730
|
filter: y.keyword
|
|
731
731
|
}
|
|
732
732
|
),
|
|
@@ -738,8 +738,8 @@ function pe({ blocklets: e, ...n }) {
|
|
|
738
738
|
P ? /* @__PURE__ */ t(
|
|
739
739
|
Z,
|
|
740
740
|
{
|
|
741
|
-
primaryStart:
|
|
742
|
-
primaryEnd:
|
|
741
|
+
primaryStart: u("blocklet.noCategoryResults1"),
|
|
742
|
+
primaryEnd: u("blocklet.noCategoryResults2"),
|
|
743
743
|
filter: P
|
|
744
744
|
}
|
|
745
745
|
) : /* @__PURE__ */ t(we, {}),
|
|
@@ -765,10 +765,10 @@ function pe({ blocklets: e, ...n }) {
|
|
|
765
765
|
}
|
|
766
766
|
) });
|
|
767
767
|
}
|
|
768
|
-
|
|
768
|
+
ue.propTypes = {
|
|
769
769
|
blocklets: o.array.isRequired
|
|
770
770
|
};
|
|
771
|
-
|
|
771
|
+
ue.defaultProps = {};
|
|
772
772
|
const Y = T(ft)`
|
|
773
773
|
text-align: center;
|
|
774
774
|
.primary {
|
|
@@ -808,7 +808,7 @@ function me({ placeholder: e, ...n }) {
|
|
|
808
808
|
const { filters: r, handleKeyword: a } = N(), [s, c] = E(r.keyword || ""), x = et(a, { wait: 300 }), y = (b) => {
|
|
809
809
|
const { value: d } = b.target;
|
|
810
810
|
c(d), x.run(d);
|
|
811
|
-
},
|
|
811
|
+
}, u = () => {
|
|
812
812
|
c(""), a();
|
|
813
813
|
};
|
|
814
814
|
return j(() => {
|
|
@@ -825,7 +825,7 @@ function me({ placeholder: e, ...n }) {
|
|
|
825
825
|
value: s,
|
|
826
826
|
title: e,
|
|
827
827
|
"data-cy": "search",
|
|
828
|
-
endAdornment: s && /* @__PURE__ */ t(ge, { position: "end", children: /* @__PURE__ */ t(Gt, { "data-cy": "search-delete", onClick:
|
|
828
|
+
endAdornment: s && /* @__PURE__ */ t(ge, { position: "end", children: /* @__PURE__ */ t(Gt, { "data-cy": "search-delete", onClick: u }) }),
|
|
829
829
|
...n
|
|
830
830
|
}
|
|
831
831
|
);
|
|
@@ -865,7 +865,7 @@ const Ut = T(je)`
|
|
|
865
865
|
cursor: pointer;
|
|
866
866
|
`;
|
|
867
867
|
function he({ onSelect: e, wrapChildren: n }) {
|
|
868
|
-
const r = J(null), a = J(null), s = J(null), { storeApi: c, blockletRender: x, filters: y, endpoint:
|
|
868
|
+
const r = J(null), a = J(null), s = J(null), { storeApi: c, blockletRender: x, filters: y, endpoint: u, handleKeyword: b, t: d } = N(), S = async (i) => {
|
|
869
869
|
const { data: h } = await c.get(_.blockletsPath, { params: i }), m = h.dataList || [];
|
|
870
870
|
return m.length > 0 && m.unshift({ type: "more-result", total: h.total || 0 }), m;
|
|
871
871
|
}, v = (i) => {
|
|
@@ -886,12 +886,12 @@ function he({ onSelect: e, wrapChildren: n }) {
|
|
|
886
886
|
{ enableOnTags: ["INPUT"] }
|
|
887
887
|
), j(() => {
|
|
888
888
|
C();
|
|
889
|
-
}, [
|
|
889
|
+
}, [u]), j(() => {
|
|
890
890
|
if (!r.current)
|
|
891
891
|
return;
|
|
892
892
|
const i = kt({
|
|
893
893
|
container: r.current,
|
|
894
|
-
renderer: { createElement:
|
|
894
|
+
renderer: { createElement: Qe, Fragment: Je, render: () => {
|
|
895
895
|
} },
|
|
896
896
|
render({ children: h }, m) {
|
|
897
897
|
var k;
|
|
@@ -947,8 +947,8 @@ function he({ onSelect: e, wrapChildren: n }) {
|
|
|
947
947
|
onSelect({ event: w, item: L }) {
|
|
948
948
|
return L.type === "more-result" ? (k.setIsOpen(!1), b(h)) : w.type === "keydown" ? b(L.title) : e({
|
|
949
949
|
blocklet: L,
|
|
950
|
-
detailUrl: nt(
|
|
951
|
-
storeUrl:
|
|
950
|
+
detailUrl: nt(u, `/blocklets/${L.did}`),
|
|
951
|
+
storeUrl: u
|
|
952
952
|
});
|
|
953
953
|
},
|
|
954
954
|
templates: {
|
|
@@ -1019,7 +1019,7 @@ function Kt() {
|
|
|
1019
1019
|
handleCategory: c,
|
|
1020
1020
|
handlePrice: x,
|
|
1021
1021
|
handleSearchSelect: y,
|
|
1022
|
-
t:
|
|
1022
|
+
t: u,
|
|
1023
1023
|
getCategoryLocale: b,
|
|
1024
1024
|
priceOptions: d,
|
|
1025
1025
|
wrapChildren: S,
|
|
@@ -1028,7 +1028,7 @@ function Kt() {
|
|
|
1028
1028
|
baseSearch: P,
|
|
1029
1029
|
onFilterChange: R,
|
|
1030
1030
|
tagFilters: i
|
|
1031
|
-
} = N(), h = vt(
|
|
1031
|
+
} = N(), h = vt(u), m = ((K = h.find((g) => g.value === r.sortBy)) == null ? void 0 : K.name) || u("sort.sort"), k = b(r.category), { resourceType: $ } = r || {}, w = (H = d.find((g) => g.value === r.price)) == null ? void 0 : H.name, [L, I] = E(!1), W = ae(), ee = Se(() => W.breakpoints.down("md")), O = Pe({
|
|
1032
1032
|
chooseTagId: ""
|
|
1033
1033
|
}), G = tt((g) => {
|
|
1034
1034
|
O.chooseTagId = g.id, ["category", "resourceType", "resourceDid"].forEach((M) => {
|
|
@@ -1036,15 +1036,15 @@ function Kt() {
|
|
|
1036
1036
|
}), R(r);
|
|
1037
1037
|
}), F = rt(() => i.find((g) => g.id === O.chooseTagId), [O.chooseTagId]);
|
|
1038
1038
|
return ot(() => {
|
|
1039
|
-
const g = lt(window.location.search),
|
|
1039
|
+
const g = lt(window.location.search), V = i.find((M) => {
|
|
1040
1040
|
const l = M.params;
|
|
1041
|
-
return l ? Object.keys(l).every((
|
|
1041
|
+
return l ? Object.keys(l).every((p) => g[p] === l[p]) : !1;
|
|
1042
1042
|
});
|
|
1043
|
-
|
|
1043
|
+
V ? G(V) : i.length > 0 && G(i[0]);
|
|
1044
1044
|
}), /* @__PURE__ */ f(D, { display: "flex", alignItems: "flex-start", height: "100%", children: [
|
|
1045
1045
|
C ? /* @__PURE__ */ t(ye, { mdDown: !0, children: /* @__PURE__ */ t(de, {}) }) : null,
|
|
1046
1046
|
/* @__PURE__ */ f(Ht, { children: [
|
|
1047
|
-
/* @__PURE__ */ f(
|
|
1047
|
+
/* @__PURE__ */ f(Vt, { children: [
|
|
1048
1048
|
/* @__PURE__ */ f(
|
|
1049
1049
|
D,
|
|
1050
1050
|
{
|
|
@@ -1062,7 +1062,7 @@ function Kt() {
|
|
|
1062
1062
|
gap: 1
|
|
1063
1063
|
},
|
|
1064
1064
|
children: [
|
|
1065
|
-
C ? /* @__PURE__ */ t(ye, { mdUp: !0, children: /* @__PURE__ */ t(
|
|
1065
|
+
C ? /* @__PURE__ */ t(ye, { mdUp: !0, children: /* @__PURE__ */ t(pe, {}) }) : null,
|
|
1066
1066
|
/* @__PURE__ */ t(
|
|
1067
1067
|
"form",
|
|
1068
1068
|
{
|
|
@@ -1080,11 +1080,11 @@ function Kt() {
|
|
|
1080
1080
|
onBlur: () => {
|
|
1081
1081
|
I(!1);
|
|
1082
1082
|
},
|
|
1083
|
-
children: P ? /* @__PURE__ */ t(me, { className: "bl-search-container", placeholder:
|
|
1083
|
+
children: P ? /* @__PURE__ */ t(me, { className: "bl-search-container", placeholder: u("common.searchStore") }) : /* @__PURE__ */ t(he, { onSelect: y, wrapChildren: S })
|
|
1084
1084
|
}
|
|
1085
1085
|
),
|
|
1086
1086
|
/* @__PURE__ */ f(D, { className: "filter-container", display: "flex", alignItems: "center", children: [
|
|
1087
|
-
!ee && v && /* @__PURE__ */ t(D, { ml: 1, mr: 1, children: /* @__PURE__ */ t(fe, { t:
|
|
1087
|
+
!ee && v && /* @__PURE__ */ t(D, { ml: 1, mr: 1, children: /* @__PURE__ */ t(fe, { t: u }) }),
|
|
1088
1088
|
/* @__PURE__ */ t(
|
|
1089
1089
|
ce,
|
|
1090
1090
|
{
|
|
@@ -1130,7 +1130,7 @@ function Kt() {
|
|
|
1130
1130
|
}
|
|
1131
1131
|
}
|
|
1132
1132
|
),
|
|
1133
|
-
$ && /* @__PURE__ */ t(q, { label: `${
|
|
1133
|
+
$ && /* @__PURE__ */ t(q, { label: `${u("common.resourceType")}: ${$}` })
|
|
1134
1134
|
] }) : null
|
|
1135
1135
|
] }),
|
|
1136
1136
|
/* @__PURE__ */ t(Ge, { FallbackComponent: Te, children: /* @__PURE__ */ f(D, { sx: { position: "relative", flex: 1, overflow: "auto" }, children: [
|
|
@@ -1148,7 +1148,7 @@ function Kt() {
|
|
|
1148
1148
|
)) }),
|
|
1149
1149
|
F ? /* @__PURE__ */ t(D, { mb: 2, children: F.description ? /* @__PURE__ */ t(ve, { variant: "body1", children: F.description }) : null }) : null
|
|
1150
1150
|
] }) : null,
|
|
1151
|
-
/* @__PURE__ */ t(
|
|
1151
|
+
/* @__PURE__ */ t(ue, { blocklets: n })
|
|
1152
1152
|
] }) })
|
|
1153
1153
|
] })
|
|
1154
1154
|
] });
|
|
@@ -1191,7 +1191,7 @@ const Ht = T("main")`
|
|
|
1191
1191
|
font-size: 12px;
|
|
1192
1192
|
}
|
|
1193
1193
|
}
|
|
1194
|
-
`,
|
|
1194
|
+
`, Vt = T("div")`
|
|
1195
1195
|
position: sticky;
|
|
1196
1196
|
top: 0;
|
|
1197
1197
|
z-index: 9;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blocklet/list",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.1",
|
|
4
4
|
"description": "Common ux components of blocklet",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"dependencies": {
|
|
53
53
|
"@algolia/autocomplete-js": "^1.17.0",
|
|
54
54
|
"@algolia/autocomplete-theme-classic": "^1.17.0",
|
|
55
|
-
"@blocklet/util": "0.
|
|
55
|
+
"@blocklet/util": "0.13.1",
|
|
56
56
|
"@emotion/react": "^11.10.0",
|
|
57
57
|
"@emotion/styled": "^11.10.0",
|
|
58
58
|
"@mui/icons-material": "^5.15.12",
|
|
@@ -83,5 +83,5 @@
|
|
|
83
83
|
"prettier": "^2.7.1",
|
|
84
84
|
"vite": "^5.2.12"
|
|
85
85
|
},
|
|
86
|
-
"gitHead": "
|
|
86
|
+
"gitHead": "1b805eda64ad9cb719c1798d4b84df403edede50"
|
|
87
87
|
}
|