@blocklet/list 0.12.100 → 0.12.102
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 +448 -445
- package/package.json +4 -4
package/lib/index.es.js
CHANGED
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
import { jsx as t, jsxs as
|
|
2
|
-
import { styled as
|
|
3
|
-
import { Global as
|
|
4
|
-
import
|
|
5
|
-
import { Button as
|
|
6
|
-
import
|
|
1
|
+
import { jsx as t, jsxs as g, Fragment as ae } from "react/jsx-runtime";
|
|
2
|
+
import { styled as T, useTheme as ie } from "@arcblock/ux/lib/Theme";
|
|
3
|
+
import { Global as Se, css as Ce } from "@emotion/react";
|
|
4
|
+
import Oe from "@mui/icons-material/Sort";
|
|
5
|
+
import { Button as Fe, CircularProgress as ne, MenuList as Ae, useMediaQuery as ve, SvgIcon as Me, Popper as Ee, Grow as qe, Paper as je, ClickAwayListener as Ue, MenuItem as We, Chip as Te, Box as D, Unstable_Grid2 as re, OutlinedInput as Ge, InputAdornment as be, Typography as Pe, Hidden as we, Stack as Ke } from "@mui/material";
|
|
6
|
+
import He from "@mui/icons-material/Face";
|
|
7
7
|
import { ErrorBoundary as Qe } from "react-error-boundary";
|
|
8
|
-
import { ErrorFallback as
|
|
9
|
-
import { createContext as
|
|
10
|
-
import { useReactive as
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import ct from "
|
|
14
|
-
import pt from "
|
|
8
|
+
import { ErrorFallback as Re } from "@arcblock/ux/lib/ErrorBoundary";
|
|
9
|
+
import { createContext as Ve, useMemo as K, useState as A, useCallback as le, useEffect as j, useContext as Je, forwardRef as Xe, useRef as H, createElement as Ye, Fragment as Ze } from "react";
|
|
10
|
+
import { useReactive as Be, useInfiniteScroll as et, useRequest as tt, useSize as rt, useDebounceFn as ot, useMemoizedFn as nt, useCreation as lt, useMount as at } from "ahooks";
|
|
11
|
+
import { joinURL as it, parseQuery as st } from "ufo";
|
|
12
|
+
import o from "prop-types";
|
|
13
|
+
import ct from "lodash/orderBy";
|
|
14
|
+
import pt from "axios";
|
|
15
|
+
import ut from "json-stable-stringify";
|
|
15
16
|
import "lodash/cloneDeep";
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import
|
|
23
|
-
import
|
|
24
|
-
import
|
|
25
|
-
import
|
|
26
|
-
import
|
|
27
|
-
import
|
|
28
|
-
import
|
|
29
|
-
import { createRoot as
|
|
30
|
-
import { autocomplete as
|
|
31
|
-
import { useHotkeys as
|
|
32
|
-
import { joinURL as Tt } from "ufo";
|
|
17
|
+
import dt from "color";
|
|
18
|
+
import xe from "flat";
|
|
19
|
+
import mt from "@mui/icons-material/KeyboardArrowDown";
|
|
20
|
+
import ht from "lodash/isEmpty";
|
|
21
|
+
import ft from "@mui/icons-material/FilterAltOutlined";
|
|
22
|
+
import gt from "@arcblock/ux/lib/Dialog";
|
|
23
|
+
import yt from "@mui/material/Button";
|
|
24
|
+
import bt from "@arcblock/ux/lib/Empty";
|
|
25
|
+
import wt from "react-infinite-scroll-hook";
|
|
26
|
+
import xt from "@mui/material/Box";
|
|
27
|
+
import $e from "@mui/material/Typography";
|
|
28
|
+
import kt from "@mui/icons-material/Search";
|
|
29
|
+
import St from "@mui/icons-material/Close";
|
|
30
|
+
import { createRoot as Ct } from "react-dom/client";
|
|
31
|
+
import { autocomplete as vt } from "@algolia/autocomplete-js";
|
|
32
|
+
import { useHotkeys as Tt } from "react-hotkeys-hook";
|
|
33
33
|
import Pt from "@arcblock/ux/lib/Switch";
|
|
34
34
|
import "@algolia/autocomplete-theme-classic/dist/theme.css";
|
|
35
35
|
const Rt = (e) => [
|
|
@@ -52,22 +52,19 @@ const Rt = (e) => [
|
|
|
52
52
|
], Bt = (e) => [
|
|
53
53
|
{ name: e("blocklet.free"), value: "free" },
|
|
54
54
|
{ name: e("blocklet.payment"), value: "payment" }
|
|
55
|
-
], $t = (e = [],
|
|
55
|
+
], $t = (e = [], n = "en") => e.map((r) => ({ name: r.locales[n] || `Category.${n}`, value: r._id })), It = (e, n) => (
|
|
56
56
|
// eslint-disable-next-line no-prototype-builtins
|
|
57
|
-
e.replace(/{(\w*)}/g, (r, l) =>
|
|
58
|
-
), zt = () => window.innerWidth <= 600, Dt = (e
|
|
59
|
-
|
|
60
|
-
return r > 1 ? r.toFixed() : 1;
|
|
61
|
-
}, _t = (e) => ut(e).rgb().object();
|
|
62
|
-
function Nt(e, o) {
|
|
57
|
+
e.replace(/{(\w*)}/g, (r, l) => n.hasOwnProperty(l) ? n[l] : "")
|
|
58
|
+
), zt = () => window.innerWidth <= 600, Dt = (e) => dt(e).rgb().object();
|
|
59
|
+
function _t(e, n) {
|
|
63
60
|
let r;
|
|
64
61
|
return function(...s) {
|
|
65
62
|
return r && clearTimeout(r), new Promise((c) => {
|
|
66
|
-
r = setTimeout(() => c(e(...s)),
|
|
63
|
+
r = setTimeout(() => c(e(...s)), n);
|
|
67
64
|
});
|
|
68
65
|
};
|
|
69
66
|
}
|
|
70
|
-
const
|
|
67
|
+
const Nt = _t((e) => Promise.resolve(e), 300), Lt = {
|
|
71
68
|
common: {
|
|
72
69
|
searchStore: "Search the store",
|
|
73
70
|
showResources: "Show resources",
|
|
@@ -106,7 +103,7 @@ const Ft = Nt((e) => Promise.resolve(e), 300), Lt = {
|
|
|
106
103
|
autocomplete: {
|
|
107
104
|
expandResult: 'Show {number} search results for "{name}" '
|
|
108
105
|
}
|
|
109
|
-
},
|
|
106
|
+
}, Ot = {
|
|
110
107
|
common: {
|
|
111
108
|
searchStore: "搜索商店内应用",
|
|
112
109
|
showResources: "显示资源型应用",
|
|
@@ -145,33 +142,33 @@ const Ft = Nt((e) => Promise.resolve(e), 300), Lt = {
|
|
|
145
142
|
autocomplete: {
|
|
146
143
|
expandResult: "显示 {number} 条 “{name}” 的搜索结果 "
|
|
147
144
|
}
|
|
148
|
-
},
|
|
149
|
-
en:
|
|
150
|
-
zh:
|
|
151
|
-
},
|
|
152
|
-
filters:
|
|
153
|
-
keyword:
|
|
154
|
-
sortBy:
|
|
155
|
-
sortDirection:
|
|
156
|
-
price:
|
|
157
|
-
category:
|
|
158
|
-
developer:
|
|
159
|
-
resourceType:
|
|
145
|
+
}, oe = {
|
|
146
|
+
en: xe(Lt),
|
|
147
|
+
zh: xe(Ot)
|
|
148
|
+
}, Ie = {
|
|
149
|
+
filters: o.shape({
|
|
150
|
+
keyword: o.string,
|
|
151
|
+
sortBy: o.string,
|
|
152
|
+
sortDirection: o.string,
|
|
153
|
+
price: o.string,
|
|
154
|
+
category: o.string,
|
|
155
|
+
developer: o.string,
|
|
156
|
+
resourceType: o.string
|
|
160
157
|
}),
|
|
161
|
-
wrapChildren:
|
|
162
|
-
extraFilter:
|
|
163
|
-
endpoint:
|
|
164
|
-
blockletRender:
|
|
165
|
-
onFilterChange:
|
|
166
|
-
onSearchSelect:
|
|
167
|
-
locale:
|
|
168
|
-
baseSearch:
|
|
158
|
+
wrapChildren: o.func,
|
|
159
|
+
extraFilter: o.func,
|
|
160
|
+
endpoint: o.string.isRequired,
|
|
161
|
+
blockletRender: o.func.isRequired,
|
|
162
|
+
onFilterChange: o.func,
|
|
163
|
+
onSearchSelect: o.func,
|
|
164
|
+
locale: o.oneOf(["zh", "en"]),
|
|
165
|
+
baseSearch: o.bool,
|
|
169
166
|
// sometimes blocklet list can be rendered only before the category is fetched
|
|
170
|
-
fetchCategoryDelay:
|
|
171
|
-
showResourcesSwitch:
|
|
172
|
-
showCategory:
|
|
173
|
-
tagFilters:
|
|
174
|
-
},
|
|
167
|
+
fetchCategoryDelay: o.number,
|
|
168
|
+
showResourcesSwitch: o.bool,
|
|
169
|
+
showCategory: o.bool,
|
|
170
|
+
tagFilters: o.array
|
|
171
|
+
}, ze = {
|
|
175
172
|
locale: "zh",
|
|
176
173
|
filters: {},
|
|
177
174
|
onFilterChange: () => {
|
|
@@ -186,21 +183,22 @@ const Ft = Nt((e) => Promise.resolve(e), 300), Lt = {
|
|
|
186
183
|
showResourcesSwitch: !1,
|
|
187
184
|
showCategory: !0,
|
|
188
185
|
tagFilters: []
|
|
189
|
-
},
|
|
186
|
+
}, _ = {
|
|
190
187
|
nameAsc: "title",
|
|
191
188
|
nameDesc: "title",
|
|
192
189
|
popularity: "stats.downloads",
|
|
193
190
|
publishAt: "lastPublishedAt",
|
|
194
191
|
mobilePageSize: 10,
|
|
195
192
|
pageSize: 18,
|
|
193
|
+
currentPage: 1,
|
|
196
194
|
defaultCurrentPage: 1,
|
|
197
195
|
blockletsPath: "/api/v2/blocklets.json",
|
|
198
196
|
categoriesPath: "/api/blocklets/categories",
|
|
199
197
|
cacheSize: 100
|
|
200
|
-
},
|
|
201
|
-
function
|
|
198
|
+
}, De = Ve({}), { Provider: Ft, Consumer: Dr } = De;
|
|
199
|
+
function se({
|
|
202
200
|
filters: e,
|
|
203
|
-
children:
|
|
201
|
+
children: n,
|
|
204
202
|
endpoint: r,
|
|
205
203
|
locale: l,
|
|
206
204
|
blockletRender: s,
|
|
@@ -210,227 +208,231 @@ function le({
|
|
|
210
208
|
wrapChildren: p,
|
|
211
209
|
baseSearch: b,
|
|
212
210
|
serverVersion: u,
|
|
213
|
-
storeVersion:
|
|
214
|
-
fetchCategoryDelay:
|
|
215
|
-
showResourcesSwitch:
|
|
216
|
-
showCategory:
|
|
217
|
-
tagFilters:
|
|
211
|
+
storeVersion: S,
|
|
212
|
+
fetchCategoryDelay: v,
|
|
213
|
+
showResourcesSwitch: C,
|
|
214
|
+
showCategory: P,
|
|
215
|
+
tagFilters: R
|
|
218
216
|
}) {
|
|
219
217
|
const i = {};
|
|
220
|
-
u && (i["x-blocklet-server-version"] = u),
|
|
221
|
-
const
|
|
218
|
+
u && (i["x-blocklet-server-version"] = u), S && (i["x-blocklet-store-version"] = S);
|
|
219
|
+
const h = K(() => pt.create({
|
|
222
220
|
baseURL: r,
|
|
223
221
|
headers: i
|
|
224
222
|
}), [r]), d = K(() => ({
|
|
225
223
|
sortBy: "popularity",
|
|
226
224
|
sortDirection: "desc",
|
|
227
225
|
...e
|
|
228
|
-
}), [e]), k = d.category, $ =
|
|
229
|
-
currentPage:
|
|
230
|
-
pageSize: zt() ?
|
|
231
|
-
defaultCurrentPage:
|
|
232
|
-
}), [w,
|
|
233
|
-
data:
|
|
234
|
-
loading:
|
|
235
|
-
loadMore:
|
|
236
|
-
loadingMore:
|
|
237
|
-
} =
|
|
238
|
-
async (
|
|
239
|
-
|
|
240
|
-
const g = {
|
|
226
|
+
}), [e]), k = d.category, $ = Be({
|
|
227
|
+
currentPage: _.currentPage,
|
|
228
|
+
pageSize: zt() ? _.mobilePageSize : _.pageSize,
|
|
229
|
+
defaultCurrentPage: _.defaultCurrentPage
|
|
230
|
+
}), [w, L] = A(null), {
|
|
231
|
+
data: M = { list: [], total: 0 },
|
|
232
|
+
loading: ee,
|
|
233
|
+
loadMore: te,
|
|
234
|
+
loadingMore: O
|
|
235
|
+
} = et(
|
|
236
|
+
async () => {
|
|
237
|
+
const { currentPage: a, pageSize: f } = $, I = {
|
|
241
238
|
...d,
|
|
242
|
-
sortBy:
|
|
243
|
-
page:
|
|
244
|
-
pageSize:
|
|
239
|
+
sortBy: _[d.sortBy],
|
|
240
|
+
page: a,
|
|
241
|
+
pageSize: f
|
|
245
242
|
};
|
|
246
|
-
|
|
247
|
-
const { data:
|
|
248
|
-
params:
|
|
243
|
+
L(null);
|
|
244
|
+
const { data: B = {} } = await h.get(_.blockletsPath, {
|
|
245
|
+
params: I
|
|
249
246
|
});
|
|
250
|
-
return {
|
|
247
|
+
return $.currentPage++, {
|
|
248
|
+
page: a,
|
|
249
|
+
pageSize: f,
|
|
250
|
+
list: (B == null ? void 0 : B.dataList) || [],
|
|
251
|
+
total: (B == null ? void 0 : B.total) || 0
|
|
252
|
+
};
|
|
251
253
|
},
|
|
252
254
|
{
|
|
253
|
-
isNoMore: (a) => a ? a.
|
|
254
|
-
reloadDeps: [r,
|
|
255
|
+
isNoMore: (a) => a ? a.page * a.pageSize >= a.total : !1,
|
|
256
|
+
reloadDeps: [r, ut(e)],
|
|
255
257
|
onError: (a) => {
|
|
256
|
-
|
|
258
|
+
L(a);
|
|
257
259
|
}
|
|
258
260
|
}
|
|
259
261
|
), {
|
|
260
|
-
data:
|
|
261
|
-
error:
|
|
262
|
-
loading:
|
|
263
|
-
run:
|
|
264
|
-
} =
|
|
262
|
+
data: F = [],
|
|
263
|
+
error: W,
|
|
264
|
+
loading: V,
|
|
265
|
+
run: J
|
|
266
|
+
} = tt(
|
|
265
267
|
async () => {
|
|
266
|
-
const { data: a } = await
|
|
268
|
+
const { data: a } = await h.get(_.categoriesPath);
|
|
267
269
|
return Array.isArray(a) ? a : [];
|
|
268
270
|
},
|
|
269
271
|
{ manual: !0 }
|
|
270
|
-
),
|
|
271
|
-
(a,
|
|
272
|
-
const
|
|
273
|
-
return It(
|
|
272
|
+
), m = K(() => ct(F || [], [(f) => f.name], ["asc"]), [F]), E = le(
|
|
273
|
+
(a, f) => {
|
|
274
|
+
const I = oe[l] ? oe[l][a] : oe.en[a];
|
|
275
|
+
return It(I, f);
|
|
274
276
|
},
|
|
275
277
|
[l]
|
|
276
|
-
),
|
|
277
|
-
let a =
|
|
278
|
+
), z = K(() => {
|
|
279
|
+
let a = M.list || [];
|
|
278
280
|
return a = y(a), a;
|
|
279
|
-
}, [
|
|
280
|
-
errors: { fetchBlockletsError: w, fetchCategoriesError:
|
|
281
|
-
loadings: { fetchBlockletsLoading:
|
|
281
|
+
}, [M, y]), G = K(() => $t(m, l), [m, l]), X = Bt(E), Le = {
|
|
282
|
+
errors: { fetchBlockletsError: w, fetchCategoriesError: W },
|
|
283
|
+
loadings: { fetchBlockletsLoading: ee, fetchCategoriesLoading: V, loadingMore: O },
|
|
282
284
|
endpoint: r,
|
|
283
|
-
blockletList:
|
|
285
|
+
blockletList: z,
|
|
284
286
|
wrapChildren: p,
|
|
285
|
-
t:
|
|
287
|
+
t: E,
|
|
286
288
|
filters: d,
|
|
287
289
|
selectedCategory: k,
|
|
288
|
-
categoryList:
|
|
290
|
+
categoryList: m,
|
|
289
291
|
blockletRender: s,
|
|
290
292
|
locale: l,
|
|
291
|
-
categoryOptions:
|
|
292
|
-
priceOptions:
|
|
293
|
-
storeApi:
|
|
293
|
+
categoryOptions: G,
|
|
294
|
+
priceOptions: X,
|
|
295
|
+
storeApi: h,
|
|
294
296
|
baseSearch: b,
|
|
295
|
-
showResourcesSwitch:
|
|
296
|
-
showCategory:
|
|
297
|
-
tagFilters:
|
|
298
|
-
hasNextPage:
|
|
297
|
+
showResourcesSwitch: C,
|
|
298
|
+
showCategory: P,
|
|
299
|
+
tagFilters: R,
|
|
300
|
+
hasNextPage: $.pageSize * $.currentPage < M.total,
|
|
299
301
|
onFilterChange: c,
|
|
300
302
|
handleSort: (a) => {
|
|
301
|
-
const
|
|
303
|
+
const f = {
|
|
302
304
|
...d,
|
|
303
305
|
sortBy: a,
|
|
304
306
|
sortDirection: a === "nameAsc" ? "asc" : "desc"
|
|
305
307
|
};
|
|
306
|
-
c(
|
|
308
|
+
c(f);
|
|
307
309
|
},
|
|
308
310
|
handleKeyword: (a) => {
|
|
309
|
-
const
|
|
310
|
-
c(
|
|
311
|
+
const f = { ...d, keyword: a || void 0 };
|
|
312
|
+
c(f);
|
|
311
313
|
},
|
|
312
314
|
handlePrice: (a) => {
|
|
313
|
-
const
|
|
315
|
+
const f = {
|
|
314
316
|
...d,
|
|
315
317
|
price: a === d.price ? void 0 : a
|
|
316
318
|
};
|
|
317
|
-
c(
|
|
319
|
+
c(f);
|
|
318
320
|
},
|
|
319
321
|
handleCategory: (a) => {
|
|
320
|
-
let
|
|
321
|
-
(a === "all" || a === d.category) && (
|
|
322
|
-
const
|
|
323
|
-
c(
|
|
322
|
+
let f = a;
|
|
323
|
+
(a === "all" || a === d.category) && (f = void 0);
|
|
324
|
+
const I = { ...d, category: f };
|
|
325
|
+
c(I);
|
|
324
326
|
},
|
|
325
327
|
handleDeveloper: (a) => {
|
|
326
|
-
const
|
|
327
|
-
c(
|
|
328
|
+
const f = { ...d, owner: a || void 0 };
|
|
329
|
+
c(f);
|
|
328
330
|
},
|
|
329
331
|
handlePage: (a) => {
|
|
330
|
-
const
|
|
331
|
-
c(
|
|
332
|
+
const f = { ...d, currentPage: a };
|
|
333
|
+
c(f);
|
|
332
334
|
},
|
|
333
335
|
handleSwitchShowResources: () => {
|
|
334
336
|
const a = { ...d };
|
|
335
337
|
c(a);
|
|
336
338
|
},
|
|
337
|
-
loadMore:
|
|
339
|
+
loadMore: te,
|
|
338
340
|
getCategoryLocale: (a) => {
|
|
339
341
|
if (!a)
|
|
340
342
|
return null;
|
|
341
|
-
let
|
|
342
|
-
const
|
|
343
|
-
return
|
|
343
|
+
let f = null;
|
|
344
|
+
const I = F.find((B) => B._id === a);
|
|
345
|
+
return I && (f = I.locales[l]), f;
|
|
344
346
|
},
|
|
345
347
|
get developerName() {
|
|
346
|
-
var
|
|
347
|
-
return ((
|
|
348
|
-
var
|
|
349
|
-
return ((
|
|
350
|
-
})) == null ? void 0 :
|
|
348
|
+
var f, I;
|
|
349
|
+
return ((I = (f = z.find((B) => {
|
|
350
|
+
var ye;
|
|
351
|
+
return ((ye = B == null ? void 0 : B.owner) == null ? void 0 : ye.did) === d.owner;
|
|
352
|
+
})) == null ? void 0 : f.owner) == null ? void 0 : I.name) || "";
|
|
351
353
|
},
|
|
352
354
|
handleSearchSelect: x
|
|
353
355
|
};
|
|
354
|
-
return
|
|
356
|
+
return j(() => {
|
|
355
357
|
setTimeout(() => {
|
|
356
|
-
|
|
357
|
-
},
|
|
358
|
-
}, [r]), /* @__PURE__ */ t(
|
|
358
|
+
J();
|
|
359
|
+
}, v || 0);
|
|
360
|
+
}, [r]), /* @__PURE__ */ t(Ft, { value: Le, children: n });
|
|
359
361
|
}
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
children:
|
|
362
|
+
se.propTypes = {
|
|
363
|
+
...Ie,
|
|
364
|
+
children: o.any.isRequired
|
|
363
365
|
};
|
|
364
|
-
|
|
365
|
-
function
|
|
366
|
-
const e =
|
|
366
|
+
se.defaultProps = ze;
|
|
367
|
+
function N() {
|
|
368
|
+
const e = Je(De);
|
|
367
369
|
return e || {};
|
|
368
370
|
}
|
|
369
|
-
const
|
|
371
|
+
const At = T(Fe)`
|
|
370
372
|
border-radius: 4px;
|
|
371
|
-
`,
|
|
372
|
-
|
|
373
|
+
`, ce = Xe(({ children: e, rounded: n, loading: r, disabled: l, ...s }, c) => /* @__PURE__ */ t(
|
|
374
|
+
At,
|
|
373
375
|
{
|
|
374
376
|
ref: c,
|
|
375
377
|
disableElevation: !0,
|
|
376
378
|
disabled: l || r,
|
|
377
379
|
...s,
|
|
378
|
-
startIcon: r && /* @__PURE__ */ t(
|
|
380
|
+
startIcon: r && /* @__PURE__ */ t(ne, { size: "1em" }),
|
|
379
381
|
children: e
|
|
380
382
|
}
|
|
381
383
|
));
|
|
382
|
-
|
|
383
|
-
children:
|
|
384
|
-
rounded:
|
|
385
|
-
loading:
|
|
386
|
-
disabled:
|
|
384
|
+
ce.propTypes = {
|
|
385
|
+
children: o.any,
|
|
386
|
+
rounded: o.bool,
|
|
387
|
+
loading: o.bool,
|
|
388
|
+
disabled: o.bool
|
|
387
389
|
};
|
|
388
|
-
|
|
390
|
+
ce.defaultProps = {
|
|
389
391
|
children: null,
|
|
390
392
|
rounded: !1,
|
|
391
393
|
loading: !1,
|
|
392
394
|
disabled: !1
|
|
393
395
|
};
|
|
394
|
-
function
|
|
395
|
-
const p =
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
}, [
|
|
399
|
-
const
|
|
400
|
-
|
|
401
|
-
}, []), i =
|
|
402
|
-
|
|
396
|
+
function pe({ title: e, value: n, icon: r, prepend: l, options: s, onChange: c, itemRender: x, ...y }) {
|
|
397
|
+
const p = H(null), b = ie(), [u, S] = A(!1), [v, C] = A(n !== null ? n : ""), P = ve(b.breakpoints.down("sm"));
|
|
398
|
+
j(() => {
|
|
399
|
+
C(n !== null ? n : "");
|
|
400
|
+
}, [n]);
|
|
401
|
+
const R = le(() => {
|
|
402
|
+
S(!1);
|
|
403
|
+
}, []), i = le(() => {
|
|
404
|
+
S(!0);
|
|
403
405
|
}, []);
|
|
404
|
-
function
|
|
405
|
-
|
|
406
|
+
function h(k) {
|
|
407
|
+
C(k.value), c(k.value), P && R();
|
|
406
408
|
}
|
|
407
409
|
function d(k) {
|
|
408
|
-
return k ===
|
|
410
|
+
return k === v;
|
|
409
411
|
}
|
|
410
|
-
return /* @__PURE__ */
|
|
411
|
-
/* @__PURE__ */
|
|
412
|
-
|
|
412
|
+
return /* @__PURE__ */ g(ae, { children: [
|
|
413
|
+
/* @__PURE__ */ g(
|
|
414
|
+
Mt,
|
|
413
415
|
{
|
|
414
416
|
ref: p,
|
|
415
417
|
onClick: i,
|
|
416
418
|
variant: "outlined",
|
|
417
419
|
size: "small",
|
|
418
|
-
className: ["my-select__selector",
|
|
420
|
+
className: ["my-select__selector", ht(v) ? "" : "my-select__selector--active"].join(" "),
|
|
419
421
|
sx: { minWidth: "auto" },
|
|
420
422
|
...y,
|
|
421
423
|
children: [
|
|
422
424
|
/* @__PURE__ */ t("div", { className: "my-select__icon", children: r }),
|
|
423
425
|
e,
|
|
424
|
-
/* @__PURE__ */ t(
|
|
426
|
+
/* @__PURE__ */ t(Me, { className: "my-select__arrowdown", component: mt, fontSize: "small" })
|
|
425
427
|
]
|
|
426
428
|
}
|
|
427
429
|
),
|
|
428
|
-
/* @__PURE__ */ t(
|
|
430
|
+
/* @__PURE__ */ t(Ee, { open: u, anchorEl: p.current, transition: !0, sx: { zIndex: "9999" }, children: ({ TransitionProps: k, placement: $ }) => /* @__PURE__ */ t(qe, { ...k, sx: { transformOrigin: $ === "bottom" ? "center top" : "center bottom" }, children: /* @__PURE__ */ t(je, { children: /* @__PURE__ */ t(Ue, { onClickAway: R, children: /* @__PURE__ */ g(Et, { autoFocusItem: u, onMouseEnter: i, onMouseLeave: R, children: [
|
|
429
431
|
l,
|
|
430
432
|
s.map((w) => x ? x(w) : /* @__PURE__ */ t(
|
|
431
|
-
|
|
433
|
+
We,
|
|
432
434
|
{
|
|
433
|
-
onClick: () =>
|
|
435
|
+
onClick: () => h(w),
|
|
434
436
|
className: [
|
|
435
437
|
"my-select__option",
|
|
436
438
|
d(w.value) ? "my-select__option--active" : ""
|
|
@@ -442,16 +444,16 @@ function ie({ title: e, value: o, icon: r, prepend: l, options: s, onChange: c,
|
|
|
442
444
|
] }) }) }) }) })
|
|
443
445
|
] });
|
|
444
446
|
}
|
|
445
|
-
|
|
446
|
-
options:
|
|
447
|
-
value:
|
|
448
|
-
onChange:
|
|
449
|
-
itemRender:
|
|
450
|
-
title:
|
|
451
|
-
icon:
|
|
452
|
-
prepend:
|
|
447
|
+
pe.propTypes = {
|
|
448
|
+
options: o.array.isRequired,
|
|
449
|
+
value: o.oneOfType([o.string, o.number, o.array]),
|
|
450
|
+
onChange: o.func,
|
|
451
|
+
itemRender: o.func,
|
|
452
|
+
title: o.string.isRequired,
|
|
453
|
+
icon: o.any,
|
|
454
|
+
prepend: o.any
|
|
453
455
|
};
|
|
454
|
-
|
|
456
|
+
pe.defaultProps = {
|
|
455
457
|
value: null,
|
|
456
458
|
icon: null,
|
|
457
459
|
prepend: null,
|
|
@@ -459,7 +461,7 @@ ie.defaultProps = {
|
|
|
459
461
|
onChange: () => {
|
|
460
462
|
}
|
|
461
463
|
};
|
|
462
|
-
const
|
|
464
|
+
const Mt = T(ce)`
|
|
463
465
|
border: 1px solid #f0f0f0;
|
|
464
466
|
padding: 6px 8px 6px 12px;
|
|
465
467
|
font-weight: ${(e) => e.theme.typography.fontWeightBold};
|
|
@@ -490,7 +492,7 @@ const Et = C(ae)`
|
|
|
490
492
|
margin-right: 3px;
|
|
491
493
|
}
|
|
492
494
|
}
|
|
493
|
-
`,
|
|
495
|
+
`, Et = T(Ae)`
|
|
494
496
|
.my-select__option__icon {
|
|
495
497
|
color: transparent;
|
|
496
498
|
font-size: 16px;
|
|
@@ -507,8 +509,8 @@ const Et = C(ae)`
|
|
|
507
509
|
}
|
|
508
510
|
}
|
|
509
511
|
`;
|
|
510
|
-
function
|
|
511
|
-
return /* @__PURE__ */
|
|
512
|
+
function U({ options: e, onChange: n, title: r, value: l }) {
|
|
513
|
+
return /* @__PURE__ */ g(qt, { children: [
|
|
512
514
|
/* @__PURE__ */ t("div", { className: "title", children: r }),
|
|
513
515
|
/* @__PURE__ */ t("div", { className: "list", children: e.map((s) => /* @__PURE__ */ t(
|
|
514
516
|
"div",
|
|
@@ -516,14 +518,14 @@ function j({ options: e, onChange: o, title: r, value: l }) {
|
|
|
516
518
|
title: s.name,
|
|
517
519
|
"data-cy": "filter",
|
|
518
520
|
className: l === s.value ? "select item" : "item",
|
|
519
|
-
onClick: () =>
|
|
521
|
+
onClick: () => n(s.value),
|
|
520
522
|
children: s.name
|
|
521
523
|
},
|
|
522
524
|
s.value
|
|
523
525
|
)) })
|
|
524
526
|
] });
|
|
525
527
|
}
|
|
526
|
-
const
|
|
528
|
+
const qt = T("div")`
|
|
527
529
|
.title {
|
|
528
530
|
font-size: 18px;
|
|
529
531
|
font-weight: bold;
|
|
@@ -551,24 +553,24 @@ const jt = C("div")`
|
|
|
551
553
|
font-weight: bold;
|
|
552
554
|
}
|
|
553
555
|
`;
|
|
554
|
-
|
|
555
|
-
title:
|
|
556
|
-
options:
|
|
557
|
-
onChange:
|
|
558
|
-
value:
|
|
556
|
+
U.propTypes = {
|
|
557
|
+
title: o.string.isRequired,
|
|
558
|
+
options: o.array.isRequired,
|
|
559
|
+
onChange: o.func.isRequired,
|
|
560
|
+
value: o.oneOfType([o.string, o.number])
|
|
559
561
|
};
|
|
560
|
-
|
|
562
|
+
U.defaultProps = {
|
|
561
563
|
value: null
|
|
562
564
|
};
|
|
563
|
-
function
|
|
564
|
-
const { selectedCategory: e, handleCategory:
|
|
565
|
-
u === "category" &&
|
|
565
|
+
function ue() {
|
|
566
|
+
const { selectedCategory: e, handleCategory: n, t: r, handlePrice: l, filters: s, categoryOptions: c, priceOptions: x } = N(), [y, p] = A(!1), b = (u, S) => {
|
|
567
|
+
u === "category" && n(S), u === "price" && l(S), p(!1);
|
|
566
568
|
};
|
|
567
|
-
return /* @__PURE__ */
|
|
568
|
-
/* @__PURE__ */ t(
|
|
569
|
-
/* @__PURE__ */
|
|
569
|
+
return /* @__PURE__ */ g(jt, { children: [
|
|
570
|
+
/* @__PURE__ */ t(yt, { variant: "outlined", className: "filter-button", onClick: () => p(!0), children: /* @__PURE__ */ t(ft, { className: "filter-icon", fontSize: "small" }) }),
|
|
571
|
+
/* @__PURE__ */ g(gt, { fullWidth: !0, title: "", open: y, onClose: () => p(!1), children: [
|
|
570
572
|
/* @__PURE__ */ t(
|
|
571
|
-
|
|
573
|
+
U,
|
|
572
574
|
{
|
|
573
575
|
title: r("common.price"),
|
|
574
576
|
options: x,
|
|
@@ -579,7 +581,7 @@ function se() {
|
|
|
579
581
|
}
|
|
580
582
|
),
|
|
581
583
|
c.length > 0 && /* @__PURE__ */ t("div", { style: { marginTop: "16px" }, children: /* @__PURE__ */ t(
|
|
582
|
-
|
|
584
|
+
U,
|
|
583
585
|
{
|
|
584
586
|
title: r("common.category"),
|
|
585
587
|
options: c,
|
|
@@ -592,7 +594,7 @@ function se() {
|
|
|
592
594
|
] })
|
|
593
595
|
] });
|
|
594
596
|
}
|
|
595
|
-
const
|
|
597
|
+
const jt = T("div")`
|
|
596
598
|
.filter-button {
|
|
597
599
|
border-color: rgb(240, 240, 240);
|
|
598
600
|
padding: 5px 8px;
|
|
@@ -603,9 +605,9 @@ const Gt = C("div")`
|
|
|
603
605
|
color: ${(e) => e.theme.palette.grey[500]};
|
|
604
606
|
}
|
|
605
607
|
`;
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
const
|
|
608
|
+
ue.propTypes = {};
|
|
609
|
+
ue.defaultProps = {};
|
|
610
|
+
const Ut = T("div")`
|
|
609
611
|
.MuiChip-root {
|
|
610
612
|
border-radius: 4px;
|
|
611
613
|
height: initial;
|
|
@@ -614,72 +616,72 @@ const Kt = C("div")`
|
|
|
614
616
|
padding: 4px 0;
|
|
615
617
|
}
|
|
616
618
|
`;
|
|
617
|
-
function
|
|
618
|
-
return e ? /* @__PURE__ */ t(
|
|
619
|
+
function q({ label: e, icon: n, onDelete: r, ...l }) {
|
|
620
|
+
return e ? /* @__PURE__ */ t(Ut, { ...l, children: /* @__PURE__ */ t(Te, { color: "primary", "data-cy": "filter-tag", icon: n, label: e, onDelete: r }) }) : null;
|
|
619
621
|
}
|
|
620
|
-
|
|
621
|
-
label:
|
|
622
|
-
onDelete:
|
|
623
|
-
icon:
|
|
622
|
+
q.propTypes = {
|
|
623
|
+
label: o.string,
|
|
624
|
+
onDelete: o.func,
|
|
625
|
+
icon: o.element
|
|
624
626
|
};
|
|
625
|
-
|
|
627
|
+
q.defaultProps = {
|
|
626
628
|
onDelete: null,
|
|
627
629
|
icon: null,
|
|
628
630
|
label: null
|
|
629
631
|
};
|
|
630
|
-
function
|
|
631
|
-
const { t: e } =
|
|
632
|
-
return /* @__PURE__ */ t(
|
|
632
|
+
function ke() {
|
|
633
|
+
const { t: e } = N();
|
|
634
|
+
return /* @__PURE__ */ t($e, { style: { textAlign: "center" }, variant: "subtitle2", children: e("blocklet.noResults") });
|
|
633
635
|
}
|
|
634
|
-
function
|
|
635
|
-
const { t: r, locale: l } =
|
|
636
|
-
return /* @__PURE__ */
|
|
636
|
+
function Q({ filterTip: e, keywordTip: n }) {
|
|
637
|
+
const { t: r, locale: l } = N(), s = () => l === "zh" ? "、" : " , ";
|
|
638
|
+
return /* @__PURE__ */ g(xt, { className: "tips", children: [
|
|
637
639
|
/* @__PURE__ */ t("span", { style: { marginRight: "16px" }, children: r("blocklet.emptyTip") }),
|
|
638
640
|
e && /* @__PURE__ */ t("span", { children: r("blocklet.filterTip") }),
|
|
639
|
-
e &&
|
|
640
|
-
|
|
641
|
+
e && n && s(),
|
|
642
|
+
n && /* @__PURE__ */ t("span", { children: r("blocklet.keywordTip") })
|
|
641
643
|
] });
|
|
642
644
|
}
|
|
643
|
-
|
|
644
|
-
filterTip:
|
|
645
|
-
keywordTip:
|
|
645
|
+
Q.propTypes = {
|
|
646
|
+
filterTip: o.bool,
|
|
647
|
+
keywordTip: o.bool
|
|
646
648
|
};
|
|
647
|
-
|
|
649
|
+
Q.defaultProps = {
|
|
648
650
|
filterTip: !1,
|
|
649
651
|
keywordTip: !1
|
|
650
652
|
};
|
|
651
|
-
function
|
|
652
|
-
return /* @__PURE__ */
|
|
653
|
+
function Z({ primaryStart: e, primaryEnd: n, filter: r }) {
|
|
654
|
+
return /* @__PURE__ */ g($e, { variant: "subtitle2", children: [
|
|
653
655
|
/* @__PURE__ */ t("span", { children: e }),
|
|
654
|
-
/* @__PURE__ */
|
|
656
|
+
/* @__PURE__ */ g("span", { className: "primary", children: [
|
|
655
657
|
" ",
|
|
656
658
|
r,
|
|
657
659
|
" "
|
|
658
660
|
] }),
|
|
659
|
-
/* @__PURE__ */
|
|
660
|
-
|
|
661
|
+
/* @__PURE__ */ g("span", { children: [
|
|
662
|
+
n,
|
|
661
663
|
" "
|
|
662
664
|
] })
|
|
663
665
|
] });
|
|
664
666
|
}
|
|
665
|
-
|
|
666
|
-
primaryStart:
|
|
667
|
-
primaryEnd:
|
|
668
|
-
filter:
|
|
667
|
+
Z.propTypes = {
|
|
668
|
+
primaryStart: o.string.isRequired,
|
|
669
|
+
primaryEnd: o.string.isRequired,
|
|
670
|
+
filter: o.string.isRequired
|
|
669
671
|
};
|
|
670
|
-
function
|
|
672
|
+
function Wt(e) {
|
|
671
673
|
return e ? e.width > 900 ? 12 : e.width > 600 ? 8 : 4 : 0;
|
|
672
674
|
}
|
|
673
|
-
function
|
|
674
|
-
const
|
|
675
|
-
return
|
|
676
|
-
r || l(
|
|
677
|
-
}, [r]), e(
|
|
675
|
+
function _e({ children: e }) {
|
|
676
|
+
const n = H(null), [r, l] = A(null), s = rt(r);
|
|
677
|
+
return j(() => {
|
|
678
|
+
r || l(n.current);
|
|
679
|
+
}, [r]), e(n, Wt(s));
|
|
678
680
|
}
|
|
679
|
-
|
|
680
|
-
children:
|
|
681
|
+
_e.propTypes = {
|
|
682
|
+
children: o.func.isRequired
|
|
681
683
|
};
|
|
682
|
-
function
|
|
684
|
+
function de({ blocklets: e, ...n }) {
|
|
683
685
|
const {
|
|
684
686
|
blockletRender: r,
|
|
685
687
|
errors: l,
|
|
@@ -690,86 +692,83 @@ function ce({ blocklets: e, ...o }) {
|
|
|
690
692
|
t: p,
|
|
691
693
|
hasNextPage: b,
|
|
692
694
|
loadMore: u,
|
|
693
|
-
endpoint:
|
|
694
|
-
} =
|
|
695
|
+
endpoint: S
|
|
696
|
+
} = N(), v = !!c || !!y.price, [C] = wt({
|
|
695
697
|
loading: s.fetchBlockletsLoading || s.loadingMore,
|
|
696
698
|
hasNextPage: b,
|
|
697
699
|
onLoadMore: u
|
|
698
700
|
});
|
|
699
701
|
if (l.fetchBlockletsError)
|
|
700
702
|
return /* @__PURE__ */ t(
|
|
701
|
-
|
|
703
|
+
Re,
|
|
702
704
|
{
|
|
703
|
-
error: new Error(`Failed to fetch blocklets from ${
|
|
705
|
+
error: new Error(`Failed to fetch blocklets from ${S}: ${l.fetchBlockletsError.message}`)
|
|
704
706
|
}
|
|
705
707
|
);
|
|
706
708
|
if (s.fetchBlockletsLoading)
|
|
707
|
-
return /* @__PURE__ */ t(
|
|
708
|
-
if (y.keyword &&
|
|
709
|
-
return /* @__PURE__ */
|
|
709
|
+
return /* @__PURE__ */ t(D, { height: 60, display: "flex", alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ t(ne, {}) });
|
|
710
|
+
if (y.keyword && v && e.length === 0)
|
|
711
|
+
return /* @__PURE__ */ g(Y, { children: [
|
|
710
712
|
/* @__PURE__ */ t(
|
|
711
|
-
|
|
713
|
+
Z,
|
|
712
714
|
{
|
|
713
715
|
primaryStart: p("blocklet.noBlockletPart1"),
|
|
714
716
|
primaryEnd: p("blocklet.noBlockletPart2"),
|
|
715
717
|
filter: y.keyword
|
|
716
718
|
}
|
|
717
719
|
),
|
|
718
|
-
/* @__PURE__ */ t(
|
|
720
|
+
/* @__PURE__ */ t(Q, { keywordTip: !0, filterTip: !0 })
|
|
719
721
|
] });
|
|
720
722
|
if (y.keyword && e.length === 0)
|
|
721
|
-
return /* @__PURE__ */
|
|
723
|
+
return /* @__PURE__ */ g(Y, { children: [
|
|
722
724
|
/* @__PURE__ */ t(
|
|
723
|
-
|
|
725
|
+
Z,
|
|
724
726
|
{
|
|
725
727
|
primaryStart: p("blocklet.noBlockletPart1"),
|
|
726
728
|
primaryEnd: p("blocklet.noBlockletPart2"),
|
|
727
729
|
filter: y.keyword
|
|
728
730
|
}
|
|
729
731
|
),
|
|
730
|
-
/* @__PURE__ */ t(
|
|
732
|
+
/* @__PURE__ */ t(Q, { keywordTip: !0 })
|
|
731
733
|
] });
|
|
732
|
-
if (
|
|
733
|
-
const
|
|
734
|
-
return /* @__PURE__ */
|
|
735
|
-
|
|
736
|
-
|
|
734
|
+
if (v && e.length === 0) {
|
|
735
|
+
const P = x(c);
|
|
736
|
+
return /* @__PURE__ */ g(Y, { children: [
|
|
737
|
+
P ? /* @__PURE__ */ t(
|
|
738
|
+
Z,
|
|
737
739
|
{
|
|
738
740
|
primaryStart: p("blocklet.noCategoryResults1"),
|
|
739
741
|
primaryEnd: p("blocklet.noCategoryResults2"),
|
|
740
|
-
filter:
|
|
742
|
+
filter: P
|
|
741
743
|
}
|
|
742
|
-
) : /* @__PURE__ */ t(
|
|
743
|
-
/* @__PURE__ */ t(
|
|
744
|
+
) : /* @__PURE__ */ t(ke, {}),
|
|
745
|
+
/* @__PURE__ */ t(Q, { filterTip: !0 })
|
|
744
746
|
] });
|
|
745
747
|
}
|
|
746
|
-
return e.length === 0 ? /* @__PURE__ */ t(
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
748
|
+
return e.length === 0 ? /* @__PURE__ */ t(Y, { children: /* @__PURE__ */ t(ke, {}) }) : /* @__PURE__ */ t(_e, { children: (P, R) => /* @__PURE__ */ g(
|
|
749
|
+
re,
|
|
750
|
+
{
|
|
751
|
+
...n,
|
|
752
|
+
container: !0,
|
|
753
|
+
spacing: 2,
|
|
754
|
+
columns: R,
|
|
755
|
+
disableEqualOverflow: !0,
|
|
756
|
+
ref: P,
|
|
757
|
+
sx: {
|
|
758
|
+
opacity: () => R > 0 ? 1 : 0
|
|
759
|
+
},
|
|
760
|
+
children: [
|
|
761
|
+
e.map((i) => /* @__PURE__ */ t(re, { xs: 4, "data-blocklet-did": i.did, children: r({ blocklet: i, blocklets: e }) }, i.did)),
|
|
762
|
+
b && /* @__PURE__ */ t(re, { xs: 12, ref: C, children: /* @__PURE__ */ t(D, { height: 60, display: "flex", justifyContent: "center", children: /* @__PURE__ */ t(ne, {}) }) })
|
|
763
|
+
]
|
|
764
|
+
}
|
|
765
|
+
) });
|
|
750
766
|
}
|
|
751
|
-
|
|
752
|
-
blocklets:
|
|
767
|
+
de.propTypes = {
|
|
768
|
+
blocklets: o.array.isRequired
|
|
753
769
|
};
|
|
754
|
-
|
|
755
|
-
const
|
|
756
|
-
opacity: ${(e) => e.columns > 0 ? 1 : 0};
|
|
757
|
-
&.MuiGrid-root {
|
|
758
|
-
width: 100%;
|
|
759
|
-
margin: 0 -16px;
|
|
760
|
-
}
|
|
761
|
-
`, we = C(ve)`
|
|
762
|
-
@media (max-width: ${(e) => e.theme.breakpoints.values.sm}px) {
|
|
763
|
-
&.MuiGrid-item {
|
|
764
|
-
padding-bottom: 0px;
|
|
765
|
-
}
|
|
766
|
-
}
|
|
767
|
-
@media (min-width: ${(e) => e.theme.breakpoints.values.sm}px) {
|
|
768
|
-
&.MuiGrid-item {
|
|
769
|
-
margin-bottom: ${(e) => e.theme.spacing(2)};
|
|
770
|
-
}
|
|
771
|
-
}
|
|
772
|
-
`, Q = C(yt)`
|
|
770
|
+
de.defaultProps = {};
|
|
771
|
+
const Y = T(bt)`
|
|
773
772
|
text-align: center;
|
|
774
773
|
.primary {
|
|
775
774
|
color: ${(e) => e.theme.palette.primary.main};
|
|
@@ -778,22 +777,22 @@ const Wt = C(ve)`
|
|
|
778
777
|
margin-top: ${(e) => e.theme.spacing(1)};
|
|
779
778
|
}
|
|
780
779
|
`;
|
|
781
|
-
function
|
|
782
|
-
const { selectedCategory: e, handleCategory:
|
|
783
|
-
return /* @__PURE__ */
|
|
784
|
-
/* @__PURE__ */ t("div", { children: /* @__PURE__ */ t(
|
|
780
|
+
function me() {
|
|
781
|
+
const { selectedCategory: e, handleCategory: n, t: r, handlePrice: l, filters: s, categoryOptions: c, priceOptions: x } = N();
|
|
782
|
+
return /* @__PURE__ */ g(Gt, { children: [
|
|
783
|
+
/* @__PURE__ */ t("div", { children: /* @__PURE__ */ t(U, { title: r("common.price"), options: x, value: s.price, onChange: l }) }),
|
|
785
784
|
c.length > 0 && /* @__PURE__ */ t("div", { style: { marginTop: "16px" }, children: /* @__PURE__ */ t(
|
|
786
|
-
|
|
785
|
+
U,
|
|
787
786
|
{
|
|
788
787
|
title: r("common.category"),
|
|
789
788
|
options: c,
|
|
790
789
|
value: e,
|
|
791
|
-
onChange:
|
|
790
|
+
onChange: n
|
|
792
791
|
}
|
|
793
792
|
) })
|
|
794
793
|
] });
|
|
795
794
|
}
|
|
796
|
-
const
|
|
795
|
+
const Gt = T("aside")`
|
|
797
796
|
width: 220px;
|
|
798
797
|
margin-right: ${(e) => e.theme.spacing(2)};
|
|
799
798
|
height: 100%;
|
|
@@ -802,41 +801,41 @@ const Ht = C("aside")`
|
|
|
802
801
|
overflow-y: auto;
|
|
803
802
|
z-index: auto;
|
|
804
803
|
`;
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
function
|
|
808
|
-
const { filters: r, handleKeyword: l } =
|
|
804
|
+
me.propTypes = {};
|
|
805
|
+
me.defaultProps = {};
|
|
806
|
+
function he({ placeholder: e, ...n }) {
|
|
807
|
+
const { filters: r, handleKeyword: l } = N(), [s, c] = A(r.keyword || ""), x = ot(l, { wait: 300 }), y = (b) => {
|
|
809
808
|
const { value: u } = b.target;
|
|
810
809
|
c(u), x.run(u);
|
|
811
810
|
}, p = () => {
|
|
812
811
|
c(""), l();
|
|
813
812
|
};
|
|
814
|
-
return
|
|
813
|
+
return j(() => {
|
|
815
814
|
c(r.keyword || "");
|
|
816
815
|
}, [r.keyword]), /* @__PURE__ */ t(
|
|
817
|
-
|
|
816
|
+
Kt,
|
|
818
817
|
{
|
|
819
818
|
inputProps: {
|
|
820
819
|
"data-cy": "search-blocklet"
|
|
821
820
|
},
|
|
822
|
-
startAdornment: /* @__PURE__ */ t(
|
|
821
|
+
startAdornment: /* @__PURE__ */ t(be, { position: "start", children: /* @__PURE__ */ t(Ht, {}) }),
|
|
823
822
|
onChange: y,
|
|
824
823
|
placeholder: e,
|
|
825
824
|
value: s,
|
|
826
825
|
title: e,
|
|
827
826
|
"data-cy": "search",
|
|
828
|
-
endAdornment: s && /* @__PURE__ */ t(
|
|
829
|
-
...
|
|
827
|
+
endAdornment: s && /* @__PURE__ */ t(be, { position: "end", children: /* @__PURE__ */ t(Qt, { "data-cy": "search-delete", onClick: p }) }),
|
|
828
|
+
...n
|
|
830
829
|
}
|
|
831
830
|
);
|
|
832
831
|
}
|
|
833
|
-
|
|
834
|
-
placeholder:
|
|
832
|
+
he.propTypes = {
|
|
833
|
+
placeholder: o.string
|
|
835
834
|
};
|
|
836
|
-
|
|
835
|
+
he.defaultProps = {
|
|
837
836
|
placeholder: "Type to search..."
|
|
838
837
|
};
|
|
839
|
-
const
|
|
838
|
+
const Kt = T(Ge)`
|
|
840
839
|
background-color: ${(e) => e.theme.palette.grey[50]};
|
|
841
840
|
font-size: 14px;
|
|
842
841
|
border-radius: 6px;
|
|
@@ -853,49 +852,49 @@ const Vt = C(We)`
|
|
|
853
852
|
color: transparent;
|
|
854
853
|
}
|
|
855
854
|
}
|
|
856
|
-
`,
|
|
855
|
+
`, Ht = T(kt)`
|
|
857
856
|
color: ${(e) => e.theme.palette.grey[500]};
|
|
858
857
|
font-size: 28px;
|
|
859
858
|
@media (max-width: ${(e) => e.theme.breakpoints.values.md}px) {
|
|
860
859
|
font-size: 24px;
|
|
861
860
|
}
|
|
862
|
-
`,
|
|
861
|
+
`, Qt = T(St)`
|
|
863
862
|
color: ${(e) => e.theme.palette.grey[500]};
|
|
864
863
|
font-size: 16px;
|
|
865
864
|
cursor: pointer;
|
|
866
865
|
`;
|
|
867
|
-
function
|
|
868
|
-
const r =
|
|
869
|
-
const { data:
|
|
870
|
-
return d.length > 0 && d.unshift({ type: "more-result", total:
|
|
871
|
-
},
|
|
866
|
+
function fe({ onSelect: e, wrapChildren: n }) {
|
|
867
|
+
const r = H(null), l = H(null), s = H(null), { storeApi: c, blockletRender: x, filters: y, endpoint: p, handleKeyword: b, t: u } = N(), S = async (i) => {
|
|
868
|
+
const { data: h } = await c.get(_.blockletsPath, { params: i }), d = h.dataList || [];
|
|
869
|
+
return d.length > 0 && d.unshift({ type: "more-result", total: h.total || 0 }), d;
|
|
870
|
+
}, v = (i) => {
|
|
872
871
|
b(i.state.query), i.setIsOpen(!1);
|
|
873
|
-
},
|
|
872
|
+
}, C = () => {
|
|
874
873
|
r.current && setTimeout(() => {
|
|
875
874
|
const i = r.current.querySelector("input.bl-autocomplete-input");
|
|
876
875
|
i && i.focus();
|
|
877
876
|
});
|
|
878
|
-
},
|
|
879
|
-
i.setIsOpen(!1),
|
|
880
|
-
},
|
|
881
|
-
i.query !==
|
|
877
|
+
}, P = (i) => {
|
|
878
|
+
i.setIsOpen(!1), C();
|
|
879
|
+
}, R = ({ prevState: i, state: h }) => {
|
|
880
|
+
i.query !== h.query && (h.query || b());
|
|
882
881
|
};
|
|
883
|
-
return
|
|
882
|
+
return Tt(
|
|
884
883
|
"ctrl + k, command + k",
|
|
885
|
-
(i) => (i.stopPropagation(), i.preventDefault(),
|
|
884
|
+
(i) => (i.stopPropagation(), i.preventDefault(), C(), !1),
|
|
886
885
|
{ enableOnTags: ["INPUT"] }
|
|
887
|
-
),
|
|
888
|
-
|
|
889
|
-
}, [p]),
|
|
886
|
+
), j(() => {
|
|
887
|
+
C();
|
|
888
|
+
}, [p]), j(() => {
|
|
890
889
|
if (!r.current)
|
|
891
890
|
return;
|
|
892
|
-
const i =
|
|
891
|
+
const i = vt({
|
|
893
892
|
container: r.current,
|
|
894
|
-
renderer: { createElement:
|
|
893
|
+
renderer: { createElement: Ye, Fragment: Ze, render: () => {
|
|
895
894
|
} },
|
|
896
|
-
render({ children:
|
|
895
|
+
render({ children: h }, d) {
|
|
897
896
|
var k;
|
|
898
|
-
(!l.current || s.current !== d) && (s.current = d, (k = l.current) == null || k.unmount(), l.current =
|
|
897
|
+
(!l.current || s.current !== d) && (s.current = d, (k = l.current) == null || k.unmount(), l.current = Ct(d)), l.current.render(n(h));
|
|
899
898
|
},
|
|
900
899
|
autoFocus: !0,
|
|
901
900
|
openOnFocus: !1,
|
|
@@ -918,42 +917,42 @@ function de({ onSelect: e, wrapChildren: o }) {
|
|
|
918
917
|
initialState: {
|
|
919
918
|
query: y.keyword
|
|
920
919
|
},
|
|
921
|
-
onStateChange(
|
|
922
|
-
|
|
920
|
+
onStateChange(h) {
|
|
921
|
+
R(h);
|
|
923
922
|
},
|
|
924
|
-
onSubmit:
|
|
925
|
-
onReset(
|
|
926
|
-
|
|
923
|
+
onSubmit: v,
|
|
924
|
+
onReset(h) {
|
|
925
|
+
P(h);
|
|
927
926
|
},
|
|
928
|
-
getSources({ query:
|
|
927
|
+
getSources({ query: h, state: d, ...k }) {
|
|
929
928
|
const $ = {
|
|
930
929
|
...y,
|
|
931
|
-
sortBy:
|
|
930
|
+
sortBy: _[y.sortBy],
|
|
932
931
|
page: 1,
|
|
933
932
|
pageSize: 10,
|
|
934
|
-
keyword:
|
|
933
|
+
keyword: h
|
|
935
934
|
};
|
|
936
|
-
return
|
|
935
|
+
return Nt([
|
|
937
936
|
{
|
|
938
937
|
sourceId: "blocklets",
|
|
939
938
|
getItems() {
|
|
940
|
-
return
|
|
939
|
+
return S($);
|
|
941
940
|
},
|
|
942
941
|
// 选中后填充 搜索框中值
|
|
943
942
|
getItemInputValue({ item: w }) {
|
|
944
|
-
return w.type === "more-result" ?
|
|
943
|
+
return w.type === "more-result" ? h : w.title;
|
|
945
944
|
},
|
|
946
945
|
// 选中或者点击自动完成列表中的 item 时触发
|
|
947
|
-
onSelect({ event: w, item:
|
|
948
|
-
return
|
|
949
|
-
blocklet:
|
|
950
|
-
detailUrl:
|
|
946
|
+
onSelect({ event: w, item: L }) {
|
|
947
|
+
return L.type === "more-result" ? (k.setIsOpen(!1), b(h)) : w.type === "keydown" ? b(L.title) : e({
|
|
948
|
+
blocklet: L,
|
|
949
|
+
detailUrl: it(p, `/blocklets/${L.did}`),
|
|
951
950
|
storeUrl: p
|
|
952
951
|
});
|
|
953
952
|
},
|
|
954
953
|
templates: {
|
|
955
954
|
item({ item: w }) {
|
|
956
|
-
return w.type === "more-result" ? /* @__PURE__ */ t("div", { children: u("autocomplete.expandResult", { name:
|
|
955
|
+
return w.type === "more-result" ? /* @__PURE__ */ t("div", { children: u("autocomplete.expandResult", { name: h, number: w.total.toLocaleString() }) }) : x({ blocklet: w, autocompleteSetters: k });
|
|
957
956
|
},
|
|
958
957
|
noResults() {
|
|
959
958
|
return u("blocklet.noResults");
|
|
@@ -966,11 +965,11 @@ function de({ onSelect: e, wrapChildren: o }) {
|
|
|
966
965
|
return () => {
|
|
967
966
|
i.destroy();
|
|
968
967
|
};
|
|
969
|
-
}, [y, x]), /* @__PURE__ */
|
|
968
|
+
}, [y, x]), /* @__PURE__ */ g(ae, { children: [
|
|
970
969
|
/* @__PURE__ */ t(
|
|
971
|
-
|
|
970
|
+
Se,
|
|
972
971
|
{
|
|
973
|
-
styles:
|
|
972
|
+
styles: Ce`
|
|
974
973
|
.bl-autocomplete-detached-container {
|
|
975
974
|
.bl-autocomplete-detached-cancel {
|
|
976
975
|
white-space: nowrap;
|
|
@@ -982,37 +981,37 @@ function de({ onSelect: e, wrapChildren: o }) {
|
|
|
982
981
|
/* @__PURE__ */ t("div", { className: "bl-search-container", ref: r })
|
|
983
982
|
] });
|
|
984
983
|
}
|
|
985
|
-
|
|
986
|
-
onSelect:
|
|
987
|
-
wrapChildren:
|
|
984
|
+
fe.propTypes = {
|
|
985
|
+
onSelect: o.func.isRequired,
|
|
986
|
+
wrapChildren: o.func
|
|
988
987
|
};
|
|
989
|
-
|
|
988
|
+
fe.defaultProps = {
|
|
990
989
|
wrapChildren: (e) => e
|
|
991
990
|
};
|
|
992
|
-
function
|
|
993
|
-
const { filters:
|
|
994
|
-
|
|
991
|
+
function ge({ t: e }) {
|
|
992
|
+
const { filters: n, handleSwitchShowResources: r } = N(), l = () => {
|
|
993
|
+
n.showResources = !n.showResources, r();
|
|
995
994
|
};
|
|
996
995
|
return /* @__PURE__ */ t(
|
|
997
996
|
Pt,
|
|
998
997
|
{
|
|
999
|
-
checked:
|
|
998
|
+
checked: n.showResources,
|
|
1000
999
|
onChange: l,
|
|
1001
1000
|
labelProps: {
|
|
1002
|
-
label: /* @__PURE__ */ t(
|
|
1001
|
+
label: /* @__PURE__ */ t(Pe, { marginLeft: "8px", fontSize: "small", children: /* @__PURE__ */ t("span", { children: e("common.showResources") }) })
|
|
1003
1002
|
}
|
|
1004
1003
|
}
|
|
1005
1004
|
);
|
|
1006
1005
|
}
|
|
1007
|
-
|
|
1008
|
-
t:
|
|
1006
|
+
ge.propTypes = {
|
|
1007
|
+
t: o.func.isRequired
|
|
1009
1008
|
};
|
|
1010
|
-
|
|
1011
|
-
function
|
|
1012
|
-
var
|
|
1009
|
+
ge.defaultProps = {};
|
|
1010
|
+
function Vt() {
|
|
1011
|
+
var V, J;
|
|
1013
1012
|
const {
|
|
1014
1013
|
handleDeveloper: e,
|
|
1015
|
-
blockletList:
|
|
1014
|
+
blockletList: n,
|
|
1016
1015
|
filters: r,
|
|
1017
1016
|
developerName: l,
|
|
1018
1017
|
handleSort: s,
|
|
@@ -1022,43 +1021,47 @@ function Xt() {
|
|
|
1022
1021
|
t: p,
|
|
1023
1022
|
getCategoryLocale: b,
|
|
1024
1023
|
priceOptions: u,
|
|
1025
|
-
wrapChildren:
|
|
1026
|
-
showResourcesSwitch:
|
|
1027
|
-
showCategory:
|
|
1028
|
-
baseSearch:
|
|
1029
|
-
onFilterChange:
|
|
1024
|
+
wrapChildren: S,
|
|
1025
|
+
showResourcesSwitch: v,
|
|
1026
|
+
showCategory: C,
|
|
1027
|
+
baseSearch: P,
|
|
1028
|
+
onFilterChange: R,
|
|
1030
1029
|
tagFilters: i
|
|
1031
|
-
} =
|
|
1030
|
+
} = N(), h = Rt(p), d = ((V = h.find((m) => m.value === r.sortBy)) == null ? void 0 : V.name) || p("sort.sort"), k = b(r.category), { resourceType: $ } = r || {}, w = (J = u.find((m) => m.value === r.price)) == null ? void 0 : J.name, [L, M] = A(!1), ee = ie(), te = ve(() => ee.breakpoints.down("md")), O = Be({
|
|
1032
1031
|
chooseTagId: ""
|
|
1033
|
-
}),
|
|
1034
|
-
|
|
1035
|
-
typeof
|
|
1036
|
-
}),
|
|
1037
|
-
}),
|
|
1038
|
-
return
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1032
|
+
}), F = nt((m) => {
|
|
1033
|
+
O.chooseTagId = m.id, ["category", "resourceType", "resourceDid"].forEach((z) => {
|
|
1034
|
+
typeof m.params[z] > "u" ? delete r[z] : r[z] = m.params[z];
|
|
1035
|
+
}), R(r);
|
|
1036
|
+
}), W = lt(() => i.find((m) => m.id === O.chooseTagId), [O.chooseTagId]);
|
|
1037
|
+
return at(() => {
|
|
1038
|
+
const m = st(window.location.search), E = i.find((z) => {
|
|
1039
|
+
const G = z.params;
|
|
1040
|
+
return G ? Object.keys(G).every((X) => m[X] === G[X]) : !1;
|
|
1041
|
+
});
|
|
1042
|
+
E ? F(E) : i.length > 0 && F(i[0]);
|
|
1043
|
+
}), /* @__PURE__ */ g(D, { display: "flex", alignItems: "flex-start", height: "100%", children: [
|
|
1044
|
+
C ? /* @__PURE__ */ t(we, { mdDown: !0, children: /* @__PURE__ */ t(me, {}) }) : null,
|
|
1045
|
+
/* @__PURE__ */ g(Jt, { children: [
|
|
1046
|
+
/* @__PURE__ */ g(Xt, { children: [
|
|
1047
|
+
/* @__PURE__ */ g(
|
|
1048
|
+
D,
|
|
1046
1049
|
{
|
|
1047
1050
|
className: "filter-bar",
|
|
1048
1051
|
sx: {
|
|
1049
1052
|
display: "flex",
|
|
1050
1053
|
flexDirection: {
|
|
1051
1054
|
lg: "row",
|
|
1052
|
-
md:
|
|
1055
|
+
md: v ? "column" : "row"
|
|
1053
1056
|
},
|
|
1054
1057
|
alignItems: {
|
|
1055
1058
|
lg: "center",
|
|
1056
|
-
md:
|
|
1059
|
+
md: v ? "flex-start" : "center"
|
|
1057
1060
|
},
|
|
1058
1061
|
gap: 1
|
|
1059
1062
|
},
|
|
1060
1063
|
children: [
|
|
1061
|
-
|
|
1064
|
+
C ? /* @__PURE__ */ t(we, { mdUp: !0, children: /* @__PURE__ */ t(ue, {}) }) : null,
|
|
1062
1065
|
/* @__PURE__ */ t(
|
|
1063
1066
|
"form",
|
|
1064
1067
|
{
|
|
@@ -1067,29 +1070,29 @@ function Xt() {
|
|
|
1067
1070
|
flex: 1,
|
|
1068
1071
|
width: "100%"
|
|
1069
1072
|
},
|
|
1070
|
-
onSubmit: (
|
|
1071
|
-
|
|
1073
|
+
onSubmit: (m) => {
|
|
1074
|
+
m.preventDefault(), m.stopPropagation();
|
|
1072
1075
|
},
|
|
1073
1076
|
onFocus: () => {
|
|
1074
|
-
|
|
1077
|
+
M(!0);
|
|
1075
1078
|
},
|
|
1076
1079
|
onBlur: () => {
|
|
1077
|
-
|
|
1080
|
+
M(!1);
|
|
1078
1081
|
},
|
|
1079
|
-
children:
|
|
1082
|
+
children: P ? /* @__PURE__ */ t(he, { className: "bl-search-container", placeholder: p("common.searchStore") }) : /* @__PURE__ */ t(fe, { onSelect: y, wrapChildren: S })
|
|
1080
1083
|
}
|
|
1081
1084
|
),
|
|
1082
|
-
/* @__PURE__ */
|
|
1083
|
-
!
|
|
1085
|
+
/* @__PURE__ */ g(D, { className: "filter-container", display: "flex", alignItems: "center", children: [
|
|
1086
|
+
!te && v && /* @__PURE__ */ t(D, { ml: 1, mr: 1, children: /* @__PURE__ */ t(ge, { t: p }) }),
|
|
1084
1087
|
/* @__PURE__ */ t(
|
|
1085
|
-
|
|
1088
|
+
pe,
|
|
1086
1089
|
{
|
|
1087
1090
|
value: r.sortBy,
|
|
1088
|
-
options:
|
|
1091
|
+
options: h,
|
|
1089
1092
|
title: d,
|
|
1090
|
-
icon: /* @__PURE__ */ t(
|
|
1091
|
-
onChange: (
|
|
1092
|
-
s(
|
|
1093
|
+
icon: /* @__PURE__ */ t(Oe, {}),
|
|
1094
|
+
onChange: (m) => {
|
|
1095
|
+
s(m);
|
|
1093
1096
|
}
|
|
1094
1097
|
}
|
|
1095
1098
|
)
|
|
@@ -1097,19 +1100,19 @@ function Xt() {
|
|
|
1097
1100
|
]
|
|
1098
1101
|
}
|
|
1099
1102
|
),
|
|
1100
|
-
|
|
1103
|
+
C ? /* @__PURE__ */ g(D, { display: "flex", flexWrap: "wrap", alignItems: "center", mb: "16px", children: [
|
|
1101
1104
|
/* @__PURE__ */ t(
|
|
1102
|
-
|
|
1105
|
+
q,
|
|
1103
1106
|
{
|
|
1104
1107
|
label: l,
|
|
1105
|
-
icon: /* @__PURE__ */ t(
|
|
1108
|
+
icon: /* @__PURE__ */ t(He, {}),
|
|
1106
1109
|
onDelete: () => {
|
|
1107
1110
|
e(null);
|
|
1108
1111
|
}
|
|
1109
1112
|
}
|
|
1110
1113
|
),
|
|
1111
1114
|
/* @__PURE__ */ t(
|
|
1112
|
-
|
|
1115
|
+
q,
|
|
1113
1116
|
{
|
|
1114
1117
|
label: k,
|
|
1115
1118
|
onDelete: () => {
|
|
@@ -1118,7 +1121,7 @@ function Xt() {
|
|
|
1118
1121
|
}
|
|
1119
1122
|
),
|
|
1120
1123
|
/* @__PURE__ */ t(
|
|
1121
|
-
|
|
1124
|
+
q,
|
|
1122
1125
|
{
|
|
1123
1126
|
label: w,
|
|
1124
1127
|
onDelete: () => {
|
|
@@ -1126,30 +1129,30 @@ function Xt() {
|
|
|
1126
1129
|
}
|
|
1127
1130
|
}
|
|
1128
1131
|
),
|
|
1129
|
-
$ && /* @__PURE__ */ t(
|
|
1132
|
+
$ && /* @__PURE__ */ t(q, { label: `${p("common.resourceType")}: ${$}` })
|
|
1130
1133
|
] }) : null
|
|
1131
1134
|
] }),
|
|
1132
|
-
/* @__PURE__ */ t(Qe, { FallbackComponent:
|
|
1133
|
-
(i == null ? void 0 : i.length) > 0 ? /* @__PURE__ */
|
|
1134
|
-
/* @__PURE__ */ t(
|
|
1135
|
-
|
|
1135
|
+
/* @__PURE__ */ t(Qe, { FallbackComponent: Re, children: /* @__PURE__ */ g(D, { sx: { position: "relative", flex: 1, overflow: "auto" }, children: [
|
|
1136
|
+
(i == null ? void 0 : i.length) > 0 ? /* @__PURE__ */ g(ae, { children: [
|
|
1137
|
+
/* @__PURE__ */ t(Ke, { my: 1, direction: "row", spacing: 1.5, useFlexGap: !0, flexWrap: "wrap", justifyContent: "flex-start", children: i.map((m) => /* @__PURE__ */ t(
|
|
1138
|
+
Te,
|
|
1136
1139
|
{
|
|
1137
|
-
label:
|
|
1140
|
+
label: m.title,
|
|
1138
1141
|
size: "small",
|
|
1139
|
-
variant:
|
|
1140
|
-
onClick: () =>
|
|
1141
|
-
color:
|
|
1142
|
+
variant: O.chooseTagId === m.id ? "contained" : "outlined",
|
|
1143
|
+
onClick: () => F(m),
|
|
1144
|
+
color: O.chooseTagId === m.id ? "primary" : "default"
|
|
1142
1145
|
},
|
|
1143
|
-
|
|
1146
|
+
m.id
|
|
1144
1147
|
)) }),
|
|
1145
|
-
|
|
1148
|
+
W ? /* @__PURE__ */ t(D, { mb: 2, children: W.description ? /* @__PURE__ */ t(Pe, { variant: "body1", children: W.description }) : null }) : null
|
|
1146
1149
|
] }) : null,
|
|
1147
|
-
/* @__PURE__ */ t(
|
|
1150
|
+
/* @__PURE__ */ t(de, { blocklets: n })
|
|
1148
1151
|
] }) })
|
|
1149
1152
|
] })
|
|
1150
1153
|
] });
|
|
1151
1154
|
}
|
|
1152
|
-
const
|
|
1155
|
+
const Jt = T("main")`
|
|
1153
1156
|
display: flex;
|
|
1154
1157
|
flex-direction: column;
|
|
1155
1158
|
flex: 1;
|
|
@@ -1187,29 +1190,29 @@ const Yt = C("main")`
|
|
|
1187
1190
|
font-size: 12px;
|
|
1188
1191
|
}
|
|
1189
1192
|
}
|
|
1190
|
-
`,
|
|
1193
|
+
`, Xt = T("div")`
|
|
1191
1194
|
position: sticky;
|
|
1192
1195
|
top: 0;
|
|
1193
1196
|
z-index: 9;
|
|
1194
1197
|
background-color: white;
|
|
1195
1198
|
`;
|
|
1196
|
-
function
|
|
1197
|
-
const
|
|
1198
|
-
autocomplete:
|
|
1199
|
+
function Ne(e) {
|
|
1200
|
+
const n = ie(), r = Dt(n.palette.primary.main), l = {
|
|
1201
|
+
autocomplete: Ce`
|
|
1199
1202
|
:root {
|
|
1200
|
-
--aa-detached-media-query: (max-width: ${
|
|
1201
|
-
--aa-detached-modal-media-query: (min-width: ${
|
|
1202
|
-
--aa-detached-modal-max-width: ${
|
|
1203
|
+
--aa-detached-media-query: (max-width: ${n.breakpoints.values.md}px) !important;
|
|
1204
|
+
--aa-detached-modal-media-query: (min-width: ${n.breakpoints.values.md}px) !important;
|
|
1205
|
+
--aa-detached-modal-max-width: ${n.breakpoints.values.md}px !important;
|
|
1203
1206
|
--aa-selected-color-rgb: ${r.r}, ${r.g}, ${r.b} !important;
|
|
1204
1207
|
--aa-primary-color-rgb: ${r.r}, ${r.g}, ${r.b} !important;
|
|
1205
1208
|
--aa-input-background-color-rgb: 250, 250, 250 !important;
|
|
1206
1209
|
}
|
|
1207
1210
|
.bl-autocomplete-panel {
|
|
1208
|
-
z-index: ${
|
|
1211
|
+
z-index: ${n.zIndex.modal};
|
|
1209
1212
|
}
|
|
1210
1213
|
.bl-autocomplete-label {
|
|
1211
1214
|
.aa-SubmitIcon {
|
|
1212
|
-
color: ${
|
|
1215
|
+
color: ${n.palette.grey[500]} !important;
|
|
1213
1216
|
}
|
|
1214
1217
|
}
|
|
1215
1218
|
.bl-autocomplete-form {
|
|
@@ -1225,7 +1228,7 @@ function _e(e) {
|
|
|
1225
1228
|
box-shadow: none !important;
|
|
1226
1229
|
}
|
|
1227
1230
|
.aa-SubmitIcon {
|
|
1228
|
-
color: ${
|
|
1231
|
+
color: ${n.palette.grey[500]} !important;
|
|
1229
1232
|
}
|
|
1230
1233
|
}
|
|
1231
1234
|
.aa-Panel .arcblock-blocklet button {
|
|
@@ -1233,13 +1236,13 @@ function _e(e) {
|
|
|
1233
1236
|
}
|
|
1234
1237
|
`
|
|
1235
1238
|
};
|
|
1236
|
-
return /* @__PURE__ */
|
|
1237
|
-
/* @__PURE__ */ t(
|
|
1238
|
-
/* @__PURE__ */ t(
|
|
1239
|
+
return /* @__PURE__ */ g(se, { ...e, children: [
|
|
1240
|
+
/* @__PURE__ */ t(Se, { styles: l.autocomplete }),
|
|
1241
|
+
/* @__PURE__ */ t(Vt, {})
|
|
1239
1242
|
] });
|
|
1240
1243
|
}
|
|
1241
|
-
|
|
1242
|
-
|
|
1244
|
+
Ne.propTypes = Ie;
|
|
1245
|
+
Ne.defaultProps = ze;
|
|
1243
1246
|
export {
|
|
1244
|
-
|
|
1247
|
+
Ne as default
|
|
1245
1248
|
};
|