@blocklet/pages-kit-inner-components 0.6.0 → 0.6.2

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 (45) hide show
  1. package/lib/cjs/add-component.js +1 -420
  2. package/lib/cjs/chunks/draft-data-CfIMszE7.js +1 -0
  3. package/lib/cjs/chunks/home-DUjl5PbP.js +6 -0
  4. package/lib/cjs/chunks/publish-button-C522nNv6.js +1 -0
  5. package/lib/cjs/chunks/site-state-DDXqWF74.js +57 -0
  6. package/lib/cjs/chunks/state-CtNs8GrN.js +1 -0
  7. package/lib/cjs/home.js +1 -1
  8. package/lib/cjs/project-html.js +11 -4
  9. package/lib/cjs/resources.js +1 -1
  10. package/lib/es/add-component.js +2 -1089
  11. package/lib/es/chunks/{draft-data-CafrGKeh.js → draft-data-bRUHvvzp.js} +5 -4
  12. package/lib/es/chunks/home-VWWdvIPQ.js +69 -0
  13. package/lib/es/chunks/{publish-button-XSZrDaTQ.js → publish-button-Ceet-m88.js} +158 -140
  14. package/lib/es/chunks/site-state-Bh8guIeX.js +2092 -0
  15. package/lib/es/chunks/state-BdNIIXJP.js +502 -0
  16. package/lib/es/home.js +3 -28
  17. package/lib/es/project-html.js +114 -130
  18. package/lib/es/resources.js +93 -137
  19. package/package.json +11 -11
  20. package/lib/cjs/chunks/draft-data-D44_IEV2.js +0 -1
  21. package/lib/cjs/chunks/home-BYk01EUy.js +0 -39
  22. package/lib/cjs/chunks/index-BRgYwvuv.js +0 -475
  23. package/lib/cjs/chunks/publish-button-C8XPA4g_.js +0 -1
  24. package/lib/cjs/chunks/session-BRtsDvA-.js +0 -1
  25. package/lib/cjs/chunks/site-state-gSkcvhcV.js +0 -57
  26. package/lib/cjs/chunks/state-B6BF5wJ-.js +0 -1
  27. package/lib/cjs/chunks-map.json +0 -1
  28. package/lib/cjs/components.js +0 -1
  29. package/lib/cjs/locales.js +0 -3
  30. package/lib/cjs/setting.js +0 -11
  31. package/lib/cjs/site-state.js +0 -1
  32. package/lib/cjs/theme.js +0 -1
  33. package/lib/cjs/uploader.js +0 -1
  34. package/lib/es/chunks/home-DW8SdyfO.js +0 -594
  35. package/lib/es/chunks/index-D5gXPe_7.js +0 -2326
  36. package/lib/es/chunks/session-C72Dq8zg.js +0 -19
  37. package/lib/es/chunks/site-state-W2H7XCSQ.js +0 -2077
  38. package/lib/es/chunks/state-0gvZF3k2.js +0 -573
  39. package/lib/es/chunks-map.json +0 -1
  40. package/lib/es/components.js +0 -22
  41. package/lib/es/locales.js +0 -1032
  42. package/lib/es/setting.js +0 -2294
  43. package/lib/es/site-state.js +0 -48
  44. package/lib/es/theme.js +0 -484
  45. package/lib/es/uploader.js +0 -8
@@ -1,26 +1,44 @@
1
- import { jsx as t, jsxs as m, Fragment as oe } from "react/jsx-runtime";
2
- import { u as ae, b as le } from "./state-0gvZF3k2.js";
1
+ import { jsx as t, jsxs as u, Fragment as oe } from "react/jsx-runtime";
2
+ import { g as ae, p as le, a as ce } from "./home-VWWdvIPQ.js";
3
3
  import { useLocaleContext as G } from "@arcblock/ux/lib/Locale/context";
4
4
  import q from "@arcblock/ux/lib/Toast";
5
- import { generateParamCombinations as ce } from "@blocklet/pages-kit/utils/route";
6
- import { Warning as de, Sync as _, VisibilityOff as ee, KeyboardArrowDown as me, KeyboardArrowRight as ue } from "@mui/icons-material";
5
+ import { generateParamCombinations as de } from "@blocklet/pages-kit/utils/route";
6
+ import { Warning as ue, Sync as _, VisibilityOff as ee, KeyboardArrowDown as me, KeyboardArrowRight as pe } from "@mui/icons-material";
7
7
  import { LoadingButton as te } from "@mui/lab";
8
- import { createSvgIcon as pe, Dialog as ge, DialogTitle as he, Box as b, IconButton as fe, DialogContent as be, DialogActions as xe, Button as ye, Alert as we, List as ke, ListItem as M, ListItemButton as $, ListItemIcon as W, Checkbox as K, ListItemText as N, Tooltip as I, Collapse as Se, Chip as Pe } from "@mui/material";
9
- import { produce as De } from "immer";
8
+ import { Box as f, CircularProgress as ge, createSvgIcon as he, Dialog as fe, DialogTitle as be, IconButton as xe, DialogContent as ye, DialogActions as we, Button as ke, Alert as Pe, List as Se, ListItem as M, ListItemButton as $, ListItemIcon as W, Checkbox as I, ListItemText as K, Tooltip as N, Collapse as De, Chip as Oe } from "@mui/material";
9
+ import { produce as Ae } from "immer";
10
10
  import Z from "lodash/difference";
11
- import { useState as D, useMemo as C, useCallback as O, useImperativeHandle as Oe, useEffect as E, useRef as Ae } from "react";
12
- import { useAsync as je } from "react-use";
13
- import { L as ve } from "./home-DW8SdyfO.js";
14
- import { p as Ce, g as Re } from "./index-D5gXPe_7.js";
15
- function ze(s) {
16
- const [u, g] = D(!1);
11
+ import { useState as D, useMemo as C, useCallback as O, useImperativeHandle as je, useEffect as L, useRef as ve } from "react";
12
+ import { useAsync as Ce } from "react-use";
13
+ import { u as ze } from "./state-BdNIIXJP.js";
14
+ function Re(r) {
15
+ return /* @__PURE__ */ t(
16
+ f,
17
+ {
18
+ ...r,
19
+ sx: [
20
+ {
21
+ display: "flex",
22
+ flex: 1,
23
+ height: "100%",
24
+ alignItems: "center",
25
+ justifyContent: "center"
26
+ },
27
+ ...Array.isArray(r.sx) ? r.sx : [r.sx]
28
+ ],
29
+ children: /* @__PURE__ */ t(ge, { size: 30 })
30
+ }
31
+ );
32
+ }
33
+ function Te(r) {
34
+ const [m, g] = D(!1);
17
35
  return /* @__PURE__ */ t(
18
36
  te,
19
37
  {
20
- ...s,
21
- loading: s.loading || u,
38
+ ...r,
39
+ loading: r.loading || m,
22
40
  onClick: (a) => {
23
- const d = s.onClick?.(a);
41
+ const d = r.onClick?.(a);
24
42
  d instanceof Promise && (g(!0), d.finally(() => {
25
43
  g(!1);
26
44
  }));
@@ -28,8 +46,8 @@ function ze(s) {
28
46
  }
29
47
  );
30
48
  }
31
- const Te = pe(
32
- /* @__PURE__ */ m("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
49
+ const Be = he(
50
+ /* @__PURE__ */ u("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
33
51
  /* @__PURE__ */ t(
34
52
  "path",
35
53
  {
@@ -53,57 +71,57 @@ const Te = pe(
53
71
  ] }),
54
72
  "Close"
55
73
  );
56
- function Le() {
57
- const [s, u] = D(), g = C(() => s ? /* @__PURE__ */ t(ge, { ...s }) : null, [s]), a = O(() => {
58
- u(void 0);
74
+ function Ee() {
75
+ const [r, m] = D(), g = C(() => r ? /* @__PURE__ */ t(fe, { ...r }) : null, [r]), a = O(() => {
76
+ m(void 0);
59
77
  }, []), d = O(
60
78
  ({
61
79
  title: y,
62
80
  content: c,
63
81
  cancelText: A = "Cancel",
64
- okText: f = "Ok",
82
+ okText: b = "Ok",
65
83
  onOk: w,
66
84
  onClose: l,
67
- okIcon: R,
85
+ okIcon: z,
68
86
  okColor: k = "primary",
69
87
  cancelColor: h = "primary",
70
- DialogContentProps: B,
88
+ DialogContentProps: E,
71
89
  form: F,
72
90
  ...H
73
91
  }) => {
74
- u({
92
+ m({
75
93
  ...H,
76
94
  open: !0,
77
- children: /* @__PURE__ */ m("form", { onSubmit: (z) => z.preventDefault(), children: [
78
- y && /* @__PURE__ */ m(
79
- he,
95
+ children: /* @__PURE__ */ u("form", { onSubmit: (R) => R.preventDefault(), children: [
96
+ y && /* @__PURE__ */ u(
97
+ be,
80
98
  {
81
99
  className: "between",
82
100
  zIndex: "appBar",
83
101
  bgcolor: "background.paper",
84
- sx: { borderBottom: (z) => `1px solid ${z.palette.divider}` },
102
+ sx: { borderBottom: (R) => `1px solid ${R.palette.divider}` },
85
103
  children: [
86
- /* @__PURE__ */ t(b, { children: y }),
104
+ /* @__PURE__ */ t(f, { children: y }),
87
105
  /* @__PURE__ */ t(
88
- fe,
106
+ xe,
89
107
  {
90
108
  size: "small",
91
109
  onClick: async () => {
92
110
  a(), l?.();
93
111
  },
94
- children: /* @__PURE__ */ t(Te, {})
112
+ children: /* @__PURE__ */ t(Be, {})
95
113
  }
96
114
  )
97
115
  ]
98
116
  }
99
117
  ),
100
118
  c && /* @__PURE__ */ t(
101
- be,
119
+ ye,
102
120
  {
103
- ...B,
104
- sx: { mt: -3, ...B?.sx, bgcolor: "background.paper" },
121
+ ...E,
122
+ sx: { mt: -3, ...E?.sx, bgcolor: "background.paper" },
105
123
  children: /* @__PURE__ */ t(
106
- b,
124
+ f,
107
125
  {
108
126
  sx: {
109
127
  pt: 3
@@ -113,20 +131,20 @@ function Le() {
113
131
  )
114
132
  }
115
133
  ),
116
- /* @__PURE__ */ m(xe, { sx: { bgcolor: "background.paper" }, children: [
117
- /* @__PURE__ */ t(ye, { variant: "outlined", color: h || "primary", onClick: l ?? a, children: A }),
134
+ /* @__PURE__ */ u(we, { sx: { bgcolor: "background.paper" }, children: [
135
+ /* @__PURE__ */ t(ke, { variant: "outlined", color: h || "primary", onClick: l ?? a, children: A }),
118
136
  /* @__PURE__ */ t(
119
- ze,
137
+ Te,
120
138
  {
121
139
  variant: "contained",
122
140
  color: k || "primary",
123
- startIcon: R,
124
- loadingPosition: R ? "start" : "center",
141
+ startIcon: z,
142
+ loadingPosition: z ? "start" : "center",
125
143
  onClick: async () => {
126
144
  await w?.(), a();
127
145
  },
128
146
  type: "submit",
129
- children: f
147
+ children: b
130
148
  }
131
149
  )
132
150
  ] })
@@ -139,19 +157,19 @@ function Le() {
139
157
  return { dialog: g, showDialog: d, closeDialog: a };
140
158
  }
141
159
  const Xe = ({
142
- ref: s,
143
- mode: u,
160
+ ref: r,
161
+ mode: m,
144
162
  state: g
145
163
  }) => {
146
- const { t: a } = G(), [d, y] = D(!1), { dialog: c, showDialog: A } = Le(), f = ae(), w = O(
147
- (R) => {
164
+ const { t: a } = G(), [d, y] = D(!1), { dialog: c, showDialog: A } = Ee(), b = ze(), w = O(
165
+ (z) => {
148
166
  let k = [];
149
167
  A({
150
168
  title: a("maker.publishToProduction"),
151
- content: /* @__PURE__ */ m(b, { sx: { minWidth: 300 }, children: [
152
- /* @__PURE__ */ t(we, { color: "warning", icon: /* @__PURE__ */ t(de, {}), children: a("maker.publishToProductionTip") }),
169
+ content: /* @__PURE__ */ u(f, { sx: { minWidth: 300 }, children: [
170
+ /* @__PURE__ */ t(Pe, { color: "warning", icon: /* @__PURE__ */ t(ue, {}), children: a("maker.publishToProductionTip") }),
153
171
  /* @__PURE__ */ t(
154
- b,
172
+ f,
155
173
  {
156
174
  sx: {
157
175
  maxHeight: "50vh",
@@ -159,12 +177,12 @@ const Xe = ({
159
177
  mt: 2
160
178
  },
161
179
  children: /* @__PURE__ */ t(
162
- Ee,
180
+ Me,
163
181
  {
164
182
  state: g,
165
- toMode: u,
183
+ toMode: m,
166
184
  onChange: (h) => k = h,
167
- defaultRouteIds: R
185
+ defaultRouteIds: z
168
186
  }
169
187
  )
170
188
  }
@@ -177,9 +195,9 @@ const Xe = ({
177
195
  const h = a("maker.publishSelectPagesMessage");
178
196
  throw q.error(h), new Error(h);
179
197
  }
180
- localStorage.setItem(le(f ?? ""), String((/* @__PURE__ */ new Date()).getTime())), y(!0);
198
+ localStorage.setItem(ae(b ?? ""), String((/* @__PURE__ */ new Date()).getTime())), y(!0);
181
199
  try {
182
- await Ce({ mode: u, routes: k }), q.success(a("maker.publishSuccessMessage"));
200
+ await le({ mode: m, routes: k }), q.success(a("maker.publishSuccessMessage"));
183
201
  } catch (h) {
184
202
  throw q.error(h.message), h;
185
203
  } finally {
@@ -188,15 +206,15 @@ const Xe = ({
188
206
  }
189
207
  });
190
208
  },
191
- [u, g, a, f, A]
209
+ [m, g, a, b, A]
192
210
  );
193
- Oe(s, () => ({
211
+ je(r, () => ({
194
212
  openPublishDialog: w
195
213
  }));
196
214
  const l = O(() => {
197
215
  w();
198
216
  }, [w]);
199
- return /* @__PURE__ */ m(oe, { children: [
217
+ return /* @__PURE__ */ u(oe, { children: [
200
218
  /* @__PURE__ */ t(
201
219
  te,
202
220
  {
@@ -213,20 +231,20 @@ const Xe = ({
213
231
  c
214
232
  ] });
215
233
  };
216
- function Be({
217
- routePathInfo: s,
218
- checked: u,
234
+ function Le({
235
+ routePathInfo: r,
236
+ checked: m,
219
237
  onClick: g,
220
238
  route: a
221
239
  }) {
222
- const { t: d } = G(), y = !s.routeMetaData?.publishedAt || s.routeMetaData?.updatedAt && new Date(s.routeMetaData?.updatedAt) > new Date(s.routeMetaData?.publishedAt);
240
+ const { t: d } = G(), y = !r.routeMetaData?.publishedAt || r.routeMetaData?.updatedAt && new Date(r.routeMetaData?.updatedAt) > new Date(r.routeMetaData?.publishedAt);
223
241
  return /* @__PURE__ */ t(
224
242
  M,
225
243
  {
226
244
  sx: { pl: 4, pr: 3 },
227
245
  disablePadding: !0,
228
- secondaryAction: /* @__PURE__ */ m(
229
- b,
246
+ secondaryAction: /* @__PURE__ */ u(
247
+ f,
230
248
  {
231
249
  sx: {
232
250
  display: "flex",
@@ -235,7 +253,7 @@ function Be({
235
253
  },
236
254
  children: [
237
255
  y && /* @__PURE__ */ t(
238
- b,
256
+ f,
239
257
  {
240
258
  className: "visible",
241
259
  title: d("maker.pages.needPublish"),
@@ -245,28 +263,28 @@ function Be({
245
263
  display: "flex",
246
264
  alignItems: "center"
247
265
  },
248
- children: /* @__PURE__ */ t(I, { title: d("maker.pages.needPublish"), children: /* @__PURE__ */ t(_, { fontSize: "small", sx: { fontSize: "16px" } }) })
266
+ children: /* @__PURE__ */ t(N, { title: d("maker.pages.needPublish"), children: /* @__PURE__ */ t(_, { fontSize: "small", sx: { fontSize: "16px" } }) })
249
267
  }
250
268
  ),
251
- (!s.routeMetaData?.isPublic || !a.isPublic) && /* @__PURE__ */ t(
252
- b,
269
+ (!r.routeMetaData?.isPublic || !a.isPublic) && /* @__PURE__ */ t(
270
+ f,
253
271
  {
254
272
  className: "visible",
255
273
  sx: {
256
274
  color: "warning.main"
257
275
  },
258
- children: /* @__PURE__ */ t(I, { title: d("maker.pages.notPublic"), children: /* @__PURE__ */ t(ee, { fontSize: "small", sx: { fontSize: "16px" } }) })
276
+ children: /* @__PURE__ */ t(N, { title: d("maker.pages.notPublic"), children: /* @__PURE__ */ t(ee, { fontSize: "small", sx: { fontSize: "16px" } }) })
259
277
  }
260
278
  )
261
279
  ]
262
280
  }
263
281
  ),
264
- children: /* @__PURE__ */ m($, { onClick: g, dense: !0, children: [
265
- /* @__PURE__ */ t(W, { children: /* @__PURE__ */ t(K, { edge: "start", checked: u, tabIndex: -1 }) }),
282
+ children: /* @__PURE__ */ u($, { onClick: g, dense: !0, children: [
283
+ /* @__PURE__ */ t(W, { children: /* @__PURE__ */ t(I, { edge: "start", checked: m, tabIndex: -1 }) }),
266
284
  /* @__PURE__ */ t(
267
- N,
285
+ K,
268
286
  {
269
- primary: s.path,
287
+ primary: r.path,
270
288
  slotProps: {
271
289
  primary: {
272
290
  fontSize: "0.8rem",
@@ -283,23 +301,23 @@ function Be({
283
301
  }
284
302
  );
285
303
  }
286
- function Ee({
287
- state: s,
288
- toMode: u,
304
+ function Me({
305
+ state: r,
306
+ toMode: m,
289
307
  onChange: g,
290
308
  defaultRouteIds: a
291
309
  }) {
292
- const { t: d, locale: y } = G(), [c, A] = D(!1), [f, w] = D(
310
+ const { t: d, locale: y } = G(), [c, A] = D(!1), [b, w] = D(
293
311
  () => a ? Object.fromEntries(a.filter((e) => !e.includes("-")).map((e) => [e, !0])) : {}
294
- ), [l, R] = D({}), [k, h] = D(
312
+ ), [l, z] = D({}), [k, h] = D(
295
313
  () => a ? Object.fromEntries(a.filter((e) => e.includes("-")).map((e) => [e, !0])) : {}
296
- ), [B, F] = D({}), { loading: H, error: z, value: S } = je(() => Re({ mode: u }), [u]);
297
- if (z)
298
- throw z;
299
- const x = C(() => s.routeIds || [], [s]), J = C(() => S?.pageIds || [], [S]), j = C(() => !x || !s.routes ? [] : JSON.parse(JSON.stringify(x)).sort((n, i) => {
300
- const r = s.routes?.[n], o = s.routes?.[i];
301
- return r?.publishedAt && new Date(r.publishedAt).getTime() < new Date(r.updatedAt).getTime() ? -1 : o?.publishedAt && new Date(o.publishedAt).getTime() < new Date(o.updatedAt).getTime() ? 1 : new Date(r?.updatedAt ?? "").getTime() - new Date(o?.updatedAt ?? "").getTime();
302
- }), [s, x]), V = C(() => {
314
+ ), [E, F] = D({}), { loading: H, error: R, value: P } = Ce(() => ce({ mode: m }), [m]);
315
+ if (R)
316
+ throw R;
317
+ const x = C(() => r.routeIds || [], [r]), J = C(() => P?.pageIds || [], [P]), j = C(() => !x || !r.routes ? [] : JSON.parse(JSON.stringify(x)).sort((n, i) => {
318
+ const s = r.routes?.[n], o = r.routes?.[i];
319
+ return s?.publishedAt && new Date(s.publishedAt).getTime() < new Date(s.updatedAt).getTime() ? -1 : o?.publishedAt && new Date(o.publishedAt).getTime() < new Date(o.updatedAt).getTime() ? 1 : new Date(s?.updatedAt ?? "").getTime() - new Date(o?.updatedAt ?? "").getTime();
320
+ }), [r, x]), V = C(() => {
303
321
  if (!j) return [];
304
322
  if (!l) return j;
305
323
  const e = [...j].filter((n) => !l[n]);
@@ -309,17 +327,17 @@ function Ee({
309
327
  });
310
328
  }), e;
311
329
  }, [j, l]), v = C(
312
- () => !S || !J || !V ? [] : Z(J, V),
313
- [V, S, J]
314
- ), L = C(
330
+ () => !P || !J || !V ? [] : Z(J, V),
331
+ [V, P, J]
332
+ ), B = C(
315
333
  () => x ? [...x].concat(v) : v,
316
334
  [x, v]
317
335
  ), Q = O(() => {
318
336
  const e = {};
319
337
  j?.forEach((n) => {
320
- const i = s.routes?.[n];
338
+ const i = r.routes?.[n];
321
339
  if (i && i.params && i.params.length > 0 && i.paramsOptions && i.paramsOptions.length > 0) {
322
- const r = ce({
340
+ const s = de({
323
341
  basePath: i.path,
324
342
  params: i.params,
325
343
  routeId: i.id,
@@ -329,13 +347,13 @@ function Ee({
329
347
  currentOptionIds: [],
330
348
  result: []
331
349
  });
332
- r.length > 0 && (e[i.id] = r);
350
+ s.length > 0 && (e[i.id] = s);
333
351
  }
334
- }), R(e);
335
- }, [j, s.routes]);
336
- E(() => {
352
+ }), z(e);
353
+ }, [j, r.routes]);
354
+ L(() => {
337
355
  Q();
338
- }, [Q]), E(() => {
356
+ }, [Q]), L(() => {
339
357
  F((e) => {
340
358
  const n = { ...e };
341
359
  return Object.keys(l).forEach((i) => {
@@ -343,51 +361,51 @@ function Ee({
343
361
  }), n;
344
362
  });
345
363
  }, [l]);
346
- const U = Ae(!0);
347
- E(() => {
364
+ const U = ve(!0);
365
+ L(() => {
348
366
  h((e) => {
349
367
  const n = { ...e };
350
368
  return Object.keys(l).length === 0 || (Object.keys(l).forEach((i) => {
351
- const r = l[i] || [], o = c || !!f[i];
352
- r.forEach((T) => {
369
+ const s = l[i] || [], o = c || !!b[i];
370
+ s.forEach((T) => {
353
371
  const p = `${i}-${T.paramOptionIds.join("-")}`;
354
372
  U.current ? n[p] = o || e[p] || !1 : n[p] = o;
355
373
  });
356
374
  }), U.current = !1), n;
357
375
  });
358
- }, [f, l, c]);
376
+ }, [b, l, c]);
359
377
  const ne = (e, n) => {
360
378
  n.stopPropagation(), F((i) => {
361
- const r = { ...i };
362
- return r[e] = !r[e], r;
379
+ const s = { ...i };
380
+ return s[e] = !s[e], s;
363
381
  });
364
382
  }, X = O(
365
383
  (e) => {
366
384
  w((n) => {
367
- const i = De(n, (r) => {
368
- c ? (Object.assign(r, Object.fromEntries(L.map((o) => [o, !0]))), delete r[e]) : r[e] ? (delete r[e], v.includes(e) && (x || []).filter((o) => s.pages[o]?.slug === S?.pages[e]?.slug).forEach((o) => {
369
- delete r[o];
370
- })) : (r[e] = !0, x && x.includes(e) && v.filter((o) => S?.pages[o]?.slug === s.pages[e]?.slug).forEach((o) => {
371
- r[o] = !0;
385
+ const i = Ae(n, (s) => {
386
+ c ? (Object.assign(s, Object.fromEntries(B.map((o) => [o, !0]))), delete s[e]) : s[e] ? (delete s[e], v.includes(e) && (x || []).filter((o) => r.pages[o]?.slug === P?.pages[e]?.slug).forEach((o) => {
387
+ delete s[o];
388
+ })) : (s[e] = !0, x && x.includes(e) && v.filter((o) => P?.pages[o]?.slug === r.pages[e]?.slug).forEach((o) => {
389
+ s[o] = !0;
372
390
  }));
373
391
  });
374
- return A(Z(L, Object.keys(i)).length === 0), i;
392
+ return A(Z(B, Object.keys(i)).length === 0), i;
375
393
  });
376
394
  },
377
- [c, L, v, s, S, x]
395
+ [c, B, v, r, P, x]
378
396
  ), ie = O(
379
397
  (e, n) => {
380
398
  const i = `${e}-${n.paramOptionIds.join("-")}`;
381
- h((r) => {
382
- const o = { ...r };
399
+ h((s) => {
400
+ const o = { ...s };
383
401
  o[i] = !o[i];
384
402
  const T = l[e]?.every((p) => o[`${e}-${p.paramOptionIds.join("-")}`]) ?? !1;
385
403
  return w((p) => {
386
404
  if (T && !p[e])
387
405
  return { ...p, [e]: !0 };
388
406
  if (!T && p[e]) {
389
- const P = { ...p };
390
- return delete P[e], P;
407
+ const S = { ...p };
408
+ return delete S[e], S;
391
409
  }
392
410
  return p;
393
411
  }), o;
@@ -397,19 +415,19 @@ function Ee({
397
415
  ), re = O(() => {
398
416
  A((e) => (e && w({}), !e));
399
417
  }, []);
400
- return E(() => {
401
- const e = c ? L : Object.keys(f), n = Object.entries(k).filter(([, r]) => r).map(([r]) => r).filter((r) => r !== void 0), i = Array.from(/* @__PURE__ */ new Set([...e, ...n]));
418
+ return L(() => {
419
+ const e = c ? B : Object.keys(b), n = Object.entries(k).filter(([, s]) => s).map(([s]) => s).filter((s) => s !== void 0), i = Array.from(/* @__PURE__ */ new Set([...e, ...n]));
402
420
  g(c ? null : i);
403
- }, [c, f, k, L, g]), H ? /* @__PURE__ */ t(ve, { sx: { my: 4 } }) : /* @__PURE__ */ m(ke, { disablePadding: !0, sx: { maxWidth: 700 }, children: [
404
- /* @__PURE__ */ t(M, { sx: { position: "sticky", top: 0, zIndex: 1 }, disablePadding: !0, children: /* @__PURE__ */ m($, { onClick: re, dense: !0, children: [
405
- /* @__PURE__ */ t(W, { children: /* @__PURE__ */ t(K, { edge: "start", checked: c, tabIndex: -1 }) }),
406
- /* @__PURE__ */ t(N, { primary: d("common.all") })
421
+ }, [c, b, k, B, g]), H ? /* @__PURE__ */ t(Re, { sx: { my: 4 } }) : /* @__PURE__ */ u(Se, { disablePadding: !0, sx: { maxWidth: 700 }, children: [
422
+ /* @__PURE__ */ t(M, { sx: { position: "sticky", top: 0, zIndex: 1 }, disablePadding: !0, children: /* @__PURE__ */ u($, { onClick: re, dense: !0, children: [
423
+ /* @__PURE__ */ t(W, { children: /* @__PURE__ */ t(I, { edge: "start", checked: c, tabIndex: -1 }) }),
424
+ /* @__PURE__ */ t(K, { primary: d("common.all") })
407
425
  ] }) }),
408
426
  j.map((e) => {
409
- const n = s.routes?.[e];
427
+ const n = r.routes?.[e];
410
428
  if (!n) return null;
411
- const i = !1, r = l && l[e] && l[e]?.length > 0, o = B[e] !== !1, T = l[e] || [], p = !n.publishedAt || n.updatedAt && new Date(n.updatedAt).getTime() > new Date(n.publishedAt).getTime();
412
- return /* @__PURE__ */ m(b, { children: [
429
+ const i = !1, s = l && l[e] && l[e]?.length > 0, o = E[e] !== !1, T = l[e] || [], p = !n.publishedAt || n.updatedAt && new Date(n.updatedAt).getTime() > new Date(n.publishedAt).getTime();
430
+ return /* @__PURE__ */ u(f, { children: [
413
431
  /* @__PURE__ */ t(
414
432
  M,
415
433
  {
@@ -417,14 +435,14 @@ function Ee({
417
435
  pr: 4
418
436
  },
419
437
  disablePadding: !0,
420
- secondaryAction: /* @__PURE__ */ m(b, { sx: { display: "flex", alignItems: "center" }, children: [
421
- p && /* @__PURE__ */ t(I, { title: d("maker.pages.needPublish"), children: /* @__PURE__ */ t(_, { fontSize: "small", sx: { color: "warning.main", fontSize: 16, mr: 0.35 } }) }),
422
- !n.isPublic && /* @__PURE__ */ t(I, { title: d("maker.pages.notPublic"), children: /* @__PURE__ */ t(ee, { fontSize: "small", sx: { color: "warning.main", fontSize: 16, mr: 0.35 } }) }),
438
+ secondaryAction: /* @__PURE__ */ u(f, { sx: { display: "flex", alignItems: "center" }, children: [
439
+ p && /* @__PURE__ */ t(N, { title: d("maker.pages.needPublish"), children: /* @__PURE__ */ t(_, { fontSize: "small", sx: { color: "warning.main", fontSize: 16, mr: 0.35 } }) }),
440
+ !n.isPublic && /* @__PURE__ */ t(N, { title: d("maker.pages.notPublic"), children: /* @__PURE__ */ t(ee, { fontSize: "small", sx: { color: "warning.main", fontSize: 16, mr: 0.35 } }) }),
423
441
  i,
424
- r && /* @__PURE__ */ t(
425
- b,
442
+ s && /* @__PURE__ */ t(
443
+ f,
426
444
  {
427
- onClick: (P) => ne(e, P),
445
+ onClick: (S) => ne(e, S),
428
446
  sx: {
429
447
  display: "inline-flex",
430
448
  alignItems: "center",
@@ -432,14 +450,14 @@ function Ee({
432
450
  cursor: "pointer",
433
451
  color: "info.main"
434
452
  },
435
- children: o ? /* @__PURE__ */ t(me, { fontSize: "small", sx: { fontSize: "18px" } }) : /* @__PURE__ */ t(ue, { fontSize: "small", sx: { fontSize: "18px" } })
453
+ children: o ? /* @__PURE__ */ t(me, { fontSize: "small", sx: { fontSize: "18px" } }) : /* @__PURE__ */ t(pe, { fontSize: "small", sx: { fontSize: "18px" } })
436
454
  }
437
455
  )
438
456
  ] }),
439
- children: /* @__PURE__ */ m($, { onClick: () => X(e), dense: !0, children: [
440
- /* @__PURE__ */ t(W, { children: /* @__PURE__ */ t(K, { edge: "start", checked: c || !!f[e], tabIndex: -1 }) }),
457
+ children: /* @__PURE__ */ u($, { onClick: () => X(e), dense: !0, children: [
458
+ /* @__PURE__ */ t(W, { children: /* @__PURE__ */ t(I, { edge: "start", checked: c || !!b[e], tabIndex: -1 }) }),
441
459
  /* @__PURE__ */ t(
442
- N,
460
+ K,
443
461
  {
444
462
  primary: n.path,
445
463
  slotProps: {
@@ -451,14 +469,14 @@ function Ee({
451
469
  ] })
452
470
  }
453
471
  ),
454
- r && /* @__PURE__ */ t(Se, { in: o, children: /* @__PURE__ */ t(b, { children: T.map((P) => {
455
- const Y = `${e}-${P.paramOptionIds.join("-")}`, se = k[Y] || !1;
472
+ s && /* @__PURE__ */ t(De, { in: o, children: /* @__PURE__ */ t(f, { children: T.map((S) => {
473
+ const Y = `${e}-${S.paramOptionIds.join("-")}`, se = k[Y] || !1;
456
474
  return /* @__PURE__ */ t(
457
- Be,
475
+ Le,
458
476
  {
459
- routePathInfo: P,
477
+ routePathInfo: S,
460
478
  checked: c || se,
461
- onClick: () => ie(e, P),
479
+ onClick: () => ie(e, S),
462
480
  route: n
463
481
  },
464
482
  Y
@@ -467,16 +485,16 @@ function Ee({
467
485
  ] }, e);
468
486
  }),
469
487
  v.map((e) => {
470
- const n = S?.pages[e];
488
+ const n = P?.pages[e];
471
489
  return n ? /* @__PURE__ */ t(
472
490
  M,
473
491
  {
474
492
  disablePadding: !0,
475
- secondaryAction: /* @__PURE__ */ t(Pe, { color: "warning", label: "deleted", size: "small" }),
476
- children: /* @__PURE__ */ m($, { onClick: () => X(e), dense: !0, children: [
477
- /* @__PURE__ */ t(W, { children: /* @__PURE__ */ t(K, { edge: "start", checked: c || !!f[e], tabIndex: -1 }) }),
493
+ secondaryAction: /* @__PURE__ */ t(Oe, { color: "warning", label: "deleted", size: "small" }),
494
+ children: /* @__PURE__ */ u($, { onClick: () => X(e), dense: !0, children: [
495
+ /* @__PURE__ */ t(W, { children: /* @__PURE__ */ t(I, { edge: "start", checked: c || !!b[e], tabIndex: -1 }) }),
478
496
  /* @__PURE__ */ t(
479
- N,
497
+ K,
480
498
  {
481
499
  primary: n.slug,
482
500
  secondary: n.locales?.[y]?.title,