strapi-plugin-navigation 3.3.2 → 3.3.3-beta.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.
- package/dist/admin/index.js +2 -2
- package/dist/admin/index.mjs +451 -454
- package/dist/server/index.js +34 -34
- package/dist/server/index.mjs +2410 -2414
- package/package.json +5 -5
package/dist/admin/index.mjs
CHANGED
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
import
|
|
1
|
+
import jn, { useRef as We, useEffect as V, useCallback as $, useState as N, useMemo as X, createContext as tn, useContext as nn } from "react";
|
|
2
2
|
import { jsx as n, jsxs as w, Fragment as ie } from "react/jsx-runtime";
|
|
3
|
-
import oe, { useTheme as
|
|
4
|
-
import { getFetchClient as j, useRBAC as
|
|
5
|
-
import { useDrop as
|
|
6
|
-
import { HTML5Backend as
|
|
7
|
-
import { Routes as
|
|
8
|
-
import { useQuery as xe, useMutation as ge, useQueryClient as be, QueryClient as
|
|
9
|
-
import { once as
|
|
3
|
+
import oe, { useTheme as Bn } from "styled-components";
|
|
4
|
+
import { getFetchClient as j, useRBAC as On, useMediaQuery as Pt, useIsMobile as an, useIsTablet as zn, useIsDesktop as _n, Form as at, useNotification as Oe, Layouts as qe, useStrapiApp as Qn, Page as Te, useAuth as Un } from "@strapi/strapi/admin";
|
|
5
|
+
import { useDrop as Kn, useDrag as Wn, DndProvider as Hn } from "react-dnd";
|
|
6
|
+
import { HTML5Backend as Xn } from "react-dnd-html5-backend";
|
|
7
|
+
import { Routes as Gn, Route as Mt } from "react-router-dom";
|
|
8
|
+
import { useQuery as xe, useMutation as ge, useQueryClient as be, QueryClient as on, QueryClientProvider as rn } from "@tanstack/react-query";
|
|
9
|
+
import { once as Zn, isEmpty as Y, capitalize as ln, get as J, first as vt, orderBy as Jn, isObject as He, isNil as Be, isString as ot, set as it, sortBy as Xe, isNumber as kt, isBoolean as Yn, isNull as ea, isArray as ta } from "lodash";
|
|
10
10
|
import { useIntl as A } from "react-intl";
|
|
11
|
-
import { Dialog as Qe, Flex as P, Typography as x, Button as K, Modal as H, Grid as S, TextInput as we, Toggle as me, Box as D, Table as
|
|
12
|
-
import { Check as Ge, WarningCircle as
|
|
11
|
+
import { Dialog as Qe, Flex as P, Typography as x, Button as K, Modal as H, Grid as S, TextInput as we, Toggle as me, Box as D, Table as sn, Thead as dn, Tr as et, Th as ce, Checkbox as qt, IconButton as ye, Tbody as cn, Td as ue, Loader as bt, Tag as na, Field as Dt, SingleSelect as Fe, SingleSelectOption as Ae, Badge as aa, CardTitle as oa, IconButtonGroup as un, Card as ia, CardBody as Vt, Divider as tt, TextButton as ra, Link as la, MultiSelect as De, MultiSelectOption as Ve, Textarea as sa, Combobox as pn, ComboboxOption as da, Searchbar as ca, Alert as ua, NumberInput as pa, Accordion as Ue, VisuallyHidden as ma, Tooltip as ga, TFooter as ha } from "@strapi/design-system";
|
|
12
|
+
import { Check as Ge, WarningCircle as fa, Feather as ya, Pencil as Ct, Trash as Tt, Information as ba, CaretDown as Ia, CaretUp as va, Drag as Ca, Eye as mn, ArrowClockwise as Ta, Earth as wa, Cog as Sa, Link as Fa, Plus as wt, ArrowRight as Aa, Search as xa, ListPlus as Na, Typhoon as Ra, Play as Ea, Minus as La, EyeStriked as $a, PriceTag as Pa } from "@strapi/icons";
|
|
13
13
|
import * as s from "zod";
|
|
14
14
|
import { z as g } from "zod";
|
|
15
|
-
import { usePluginTheme as
|
|
15
|
+
import { usePluginTheme as Ma, Field as L, prefixPluginTranslations as jt, flattenObject as Bt } from "@sensinum/strapi-utils";
|
|
16
16
|
import { prop as nt } from "lodash/fp";
|
|
17
|
-
const de = "navigation",
|
|
17
|
+
const de = "navigation", ka = ({ setPlugin: e }) => {
|
|
18
18
|
const t = We(e);
|
|
19
19
|
return V(() => {
|
|
20
20
|
t.current?.(de);
|
|
21
21
|
}, []), null;
|
|
22
|
-
},
|
|
22
|
+
}, qa = 92, Da = oe.svg`
|
|
23
23
|
path {
|
|
24
24
|
fill: ${({ theme: e }) => e.colors.neutral500};
|
|
25
25
|
}
|
|
26
|
-
`,
|
|
27
|
-
|
|
26
|
+
`, Va = ({ width: e = 20, height: t = 20 }) => /* @__PURE__ */ n(
|
|
27
|
+
Da,
|
|
28
28
|
{
|
|
29
29
|
viewBox: `0 0 ${e} ${t}`,
|
|
30
30
|
xmlns: "http://www.w3.org/2000/svg",
|
|
31
31
|
height: t,
|
|
32
32
|
width: e,
|
|
33
|
-
children: /* @__PURE__ */ n("g", { style: { transform: `scale(${e /
|
|
33
|
+
children: /* @__PURE__ */ n("g", { style: { transform: `scale(${e / qa})` }, children: /* @__PURE__ */ n(
|
|
34
34
|
"path",
|
|
35
35
|
{
|
|
36
36
|
d: `M78,23.5H14c-3.6,0-6.5-2.9-6.5-6.5s2.9-6.5,6.5-6.5h64c3.6,0,6.5,2.9,6.5,6.5S81.6,23.5,78,23.5z M84.5,46
|
|
@@ -39,41 +39,41 @@ const de = "navigation", qa = ({ setPlugin: e }) => {
|
|
|
39
39
|
}
|
|
40
40
|
) })
|
|
41
41
|
}
|
|
42
|
-
),
|
|
42
|
+
), ja = () => /* @__PURE__ */ n(Va, {}), Ot = {
|
|
43
43
|
en: () => import("../_chunks/en-ngsBvlEG.mjs"),
|
|
44
44
|
fr: () => import("../_chunks/fr-BwEbhMNV.mjs"),
|
|
45
45
|
ca: () => import("../_chunks/ca-BZeeYBM5.mjs")
|
|
46
46
|
}, It = (e) => `${de}.${e}`, l = (e, t) => ({
|
|
47
47
|
id: It(e),
|
|
48
48
|
defaultMessage: t ?? It(e)
|
|
49
|
-
}),
|
|
49
|
+
}), St = g.object({
|
|
50
50
|
name: g.string({ required_error: "requiredError" }).nonempty("requiredError").refine((e) => !e.includes(" "), { message: "noSpaceError" }),
|
|
51
51
|
label: g.string({ required_error: "requiredError" }).nonempty("requiredError"),
|
|
52
52
|
description: g.string().optional(),
|
|
53
53
|
placeholder: g.string().optional(),
|
|
54
54
|
required: g.boolean().optional(),
|
|
55
55
|
enabled: g.boolean().optional()
|
|
56
|
-
}),
|
|
56
|
+
}), Ba = St.extend({
|
|
57
57
|
type: g.literal("select"),
|
|
58
58
|
multi: g.boolean(),
|
|
59
59
|
options: g.array(g.string(), { required_error: "requiredError" }).min(1, { message: "requiredError" })
|
|
60
|
-
}),
|
|
60
|
+
}), Oa = St.extend({
|
|
61
61
|
type: g.enum(["boolean", "string"]),
|
|
62
62
|
multi: g.literal(!1).optional(),
|
|
63
63
|
options: g.array(g.string()).max(0).optional()
|
|
64
|
-
}),
|
|
64
|
+
}), za = St.extend({
|
|
65
65
|
type: g.literal("media"),
|
|
66
66
|
multi: g.literal(!1).optional(),
|
|
67
67
|
options: g.array(g.string()).max(0).optional()
|
|
68
|
-
}),
|
|
68
|
+
}), gn = g.discriminatedUnion("type", [
|
|
69
|
+
Oa,
|
|
69
70
|
za,
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
]), Qa = g.union([
|
|
71
|
+
Ba
|
|
72
|
+
]), _a = g.union([
|
|
73
73
|
g.literal("audience"),
|
|
74
|
-
|
|
75
|
-
]),
|
|
76
|
-
additionalFields: g.array(
|
|
74
|
+
gn
|
|
75
|
+
]), Qa = g.object({
|
|
76
|
+
additionalFields: g.array(_a),
|
|
77
77
|
allowedLevels: g.number(),
|
|
78
78
|
availableAudience: g.object({
|
|
79
79
|
id: g.number(),
|
|
@@ -93,7 +93,7 @@ const de = "navigation", qa = ({ setPlugin: e }) => {
|
|
|
93
93
|
preferCustomContentTypes: g.boolean(),
|
|
94
94
|
isCacheEnabled: g.boolean().optional(),
|
|
95
95
|
isCachePluginEnabled: g.boolean().optional()
|
|
96
|
-
}),
|
|
96
|
+
}), Ua = g.object({
|
|
97
97
|
uid: g.string(),
|
|
98
98
|
isDisplayed: g.boolean(),
|
|
99
99
|
apiID: g.string(),
|
|
@@ -105,16 +105,16 @@ const de = "navigation", qa = ({ setPlugin: e }) => {
|
|
|
105
105
|
description: g.string().optional()
|
|
106
106
|
}),
|
|
107
107
|
attributes: g.record(g.string(), g.unknown())
|
|
108
|
-
}),
|
|
108
|
+
}), Ka = s.object({
|
|
109
109
|
id: s.number(),
|
|
110
110
|
documentId: s.string(),
|
|
111
111
|
name: s.string(),
|
|
112
112
|
key: s.string()
|
|
113
|
-
}),
|
|
113
|
+
}), hn = s.enum(["INTERNAL", "EXTERNAL", "WRAPPER"]), Wa = s.object({
|
|
114
114
|
id: s.number(),
|
|
115
115
|
documentId: s.string(),
|
|
116
116
|
title: s.string(),
|
|
117
|
-
type:
|
|
117
|
+
type: hn,
|
|
118
118
|
path: s.string().or(s.null()).optional(),
|
|
119
119
|
externalPath: s.string().or(s.null()).optional(),
|
|
120
120
|
uiRouterKey: s.string(),
|
|
@@ -124,50 +124,50 @@ const de = "navigation", qa = ({ setPlugin: e }) => {
|
|
|
124
124
|
autoSync: s.boolean().or(s.null()).optional(),
|
|
125
125
|
related: s.object({ documentId: s.string().optional(), __type: s.string() }).catchall(s.unknown()).nullish(),
|
|
126
126
|
additionalFields: s.record(s.string(), s.unknown()).or(s.null()).optional(),
|
|
127
|
-
audience: s.array(
|
|
127
|
+
audience: s.array(Ka).or(s.null()).optional(),
|
|
128
128
|
viewId: s.number().optional(),
|
|
129
129
|
viewParentId: s.number().optional(),
|
|
130
130
|
structureId: s.string().optional(),
|
|
131
131
|
removed: s.boolean().optional(),
|
|
132
132
|
isSearchActive: s.boolean().optional(),
|
|
133
133
|
updated: s.boolean().optional()
|
|
134
|
-
}),
|
|
135
|
-
items: s.lazy(() =>
|
|
136
|
-
}),
|
|
134
|
+
}), fn = Wa.extend({
|
|
135
|
+
items: s.lazy(() => fn.array().or(s.null())).optional()
|
|
136
|
+
}), zt = s.object({
|
|
137
137
|
id: s.number(),
|
|
138
138
|
documentId: s.string(),
|
|
139
139
|
name: s.string(),
|
|
140
140
|
slug: s.string(),
|
|
141
141
|
locale: s.string(),
|
|
142
142
|
visible: s.boolean(),
|
|
143
|
-
items: s.array(
|
|
144
|
-
}),
|
|
143
|
+
items: s.array(fn)
|
|
144
|
+
}), Ft = s.object({
|
|
145
145
|
name: s.string({ required_error: "requiredError" }).nonempty("requiredError").refine((e) => !e.includes(" "), { message: "noSpaceError" }),
|
|
146
146
|
label: s.string({ required_error: "requiredError" }).nonempty("requiredError"),
|
|
147
147
|
description: s.string().optional(),
|
|
148
148
|
placeholder: s.string().optional(),
|
|
149
149
|
required: s.boolean().optional(),
|
|
150
150
|
enabled: s.boolean().optional()
|
|
151
|
-
}),
|
|
151
|
+
}), Ha = Ft.extend({
|
|
152
152
|
type: s.literal("select"),
|
|
153
153
|
multi: s.boolean(),
|
|
154
154
|
options: s.array(s.string(), { required_error: "requiredError" }).min(1, { message: "requiredError" })
|
|
155
|
-
}),
|
|
155
|
+
}), Xa = Ft.extend({
|
|
156
156
|
type: s.enum(["boolean", "string"]),
|
|
157
157
|
multi: s.literal(!1).optional(),
|
|
158
158
|
options: s.array(s.string()).max(0).optional()
|
|
159
|
-
}),
|
|
159
|
+
}), Ga = Ft.extend({
|
|
160
160
|
type: s.literal("media"),
|
|
161
161
|
multi: s.literal(!1).optional(),
|
|
162
162
|
options: s.array(s.string()).max(0).optional()
|
|
163
|
-
}),
|
|
163
|
+
}), Za = s.discriminatedUnion("type", [
|
|
164
|
+
Xa,
|
|
164
165
|
Ga,
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
]), Ya = s.union([
|
|
166
|
+
Ha
|
|
167
|
+
]), Ja = s.union([
|
|
168
168
|
s.literal("audience"),
|
|
169
|
-
|
|
170
|
-
]),
|
|
169
|
+
Za
|
|
170
|
+
]), Ya = s.object({
|
|
171
171
|
uid: s.string(),
|
|
172
172
|
name: s.string(),
|
|
173
173
|
draftAndPublish: s.boolean(),
|
|
@@ -179,8 +179,8 @@ const de = "navigation", qa = ({ setPlugin: e }) => {
|
|
|
179
179
|
endpoint: s.string(),
|
|
180
180
|
available: s.boolean(),
|
|
181
181
|
visible: s.boolean()
|
|
182
|
-
}),
|
|
183
|
-
additionalFields: s.array(
|
|
182
|
+
}), eo = s.object({
|
|
183
|
+
additionalFields: s.array(Ja),
|
|
184
184
|
allowedLevels: s.number(),
|
|
185
185
|
availableAudience: s.object({
|
|
186
186
|
id: s.number(),
|
|
@@ -202,20 +202,20 @@ const de = "navigation", qa = ({ setPlugin: e }) => {
|
|
|
202
202
|
restrictedContentTypes: s.string().array(),
|
|
203
203
|
isCacheEnabled: s.boolean().optional(),
|
|
204
204
|
isCachePluginEnabled: s.boolean().optional()
|
|
205
|
-
}),
|
|
205
|
+
}), _t = eo.omit({
|
|
206
206
|
contentTypes: !0
|
|
207
207
|
}).extend({
|
|
208
|
-
contentTypes:
|
|
209
|
-
}),
|
|
208
|
+
contentTypes: Ya.array()
|
|
209
|
+
}), to = s.object({
|
|
210
210
|
defaultLocale: s.string(),
|
|
211
211
|
restLocale: s.string().array()
|
|
212
|
-
}),
|
|
212
|
+
}), no = s.enum(["collectionType", "singleType"]), ao = s.object({
|
|
213
213
|
singularName: s.string(),
|
|
214
214
|
pluralName: s.string(),
|
|
215
215
|
displayName: s.string(),
|
|
216
216
|
description: s.string().optional(),
|
|
217
217
|
name: s.string().optional()
|
|
218
|
-
}),
|
|
218
|
+
}), yn = s.object({
|
|
219
219
|
required: s.boolean().optional(),
|
|
220
220
|
max: s.number().optional(),
|
|
221
221
|
min: s.number().optional(),
|
|
@@ -224,7 +224,7 @@ const de = "navigation", qa = ({ setPlugin: e }) => {
|
|
|
224
224
|
private: s.boolean().optional(),
|
|
225
225
|
configurable: s.boolean().optional(),
|
|
226
226
|
default: s.any().optional()
|
|
227
|
-
}),
|
|
227
|
+
}), oo = s.enum([
|
|
228
228
|
"string",
|
|
229
229
|
"text",
|
|
230
230
|
"richtext",
|
|
@@ -243,55 +243,55 @@ const de = "navigation", qa = ({ setPlugin: e }) => {
|
|
|
243
243
|
"json",
|
|
244
244
|
"relation",
|
|
245
245
|
"media"
|
|
246
|
-
]),
|
|
247
|
-
type:
|
|
248
|
-
}),
|
|
246
|
+
]), io = yn.extend({
|
|
247
|
+
type: oo
|
|
248
|
+
}), ro = yn.extend({
|
|
249
249
|
type: s.literal("enumeration"),
|
|
250
250
|
enum: s.string().array()
|
|
251
|
-
}),
|
|
251
|
+
}), lo = s.object({
|
|
252
252
|
type: s.literal("component"),
|
|
253
253
|
component: s.string(),
|
|
254
254
|
repeatable: s.boolean().optional()
|
|
255
|
-
}),
|
|
255
|
+
}), so = s.object({
|
|
256
256
|
type: s.literal("dynamiczone"),
|
|
257
257
|
components: s.string().array()
|
|
258
|
-
}),
|
|
258
|
+
}), co = s.object({
|
|
259
259
|
media: s.literal("media"),
|
|
260
260
|
allowedTypes: s.enum(["images", "videos", "audios", "files"]).array(),
|
|
261
261
|
required: s.boolean().optional()
|
|
262
|
-
}),
|
|
262
|
+
}), uo = s.enum([
|
|
263
263
|
"oneToOne",
|
|
264
264
|
"oneToMany",
|
|
265
265
|
"manyToOne",
|
|
266
266
|
"manyToMany",
|
|
267
267
|
"morphToMany",
|
|
268
268
|
"manyToMorph"
|
|
269
|
-
]),
|
|
269
|
+
]), po = s.object({
|
|
270
270
|
type: s.literal("relation"),
|
|
271
|
-
relation:
|
|
271
|
+
relation: uo,
|
|
272
272
|
target: s.string(),
|
|
273
273
|
mappedBy: s.string().optional(),
|
|
274
274
|
inversedBy: s.string().optional()
|
|
275
|
-
}),
|
|
275
|
+
}), mo = s.record(
|
|
276
276
|
s.string(),
|
|
277
277
|
s.union([
|
|
278
|
+
io,
|
|
278
279
|
ro,
|
|
279
280
|
lo,
|
|
280
281
|
so,
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
uo
|
|
282
|
+
po,
|
|
283
|
+
co
|
|
284
284
|
])
|
|
285
|
-
),
|
|
286
|
-
kind:
|
|
285
|
+
), go = s.object({
|
|
286
|
+
kind: no,
|
|
287
287
|
collectionName: s.string(),
|
|
288
|
-
info:
|
|
288
|
+
info: ao,
|
|
289
289
|
options: s.object({
|
|
290
290
|
draftAndPublish: s.boolean().optional(),
|
|
291
291
|
hidden: s.boolean().optional(),
|
|
292
292
|
templateName: s.string().optional()
|
|
293
293
|
}).optional(),
|
|
294
|
-
attributes:
|
|
294
|
+
attributes: mo,
|
|
295
295
|
actions: s.record(s.string(), s.any()).optional(),
|
|
296
296
|
lifecycles: s.record(s.string(), s.any()).optional(),
|
|
297
297
|
uid: s.string(),
|
|
@@ -306,29 +306,29 @@ const de = "navigation", qa = ({ setPlugin: e }) => {
|
|
|
306
306
|
pluginOptions: s.record(s.string(), s.any()).optional(),
|
|
307
307
|
isSingle: s.boolean().optional()
|
|
308
308
|
});
|
|
309
|
-
|
|
309
|
+
go.pick({
|
|
310
310
|
info: !0,
|
|
311
311
|
kind: !0,
|
|
312
312
|
attributes: !0,
|
|
313
313
|
options: !0
|
|
314
314
|
});
|
|
315
|
-
const
|
|
315
|
+
const ho = s.object({
|
|
316
316
|
id: s.number(),
|
|
317
317
|
documentId: s.string(),
|
|
318
318
|
locale: s.string().or(s.null()).optional()
|
|
319
|
-
}).and(s.record(s.string(), s.any())),
|
|
319
|
+
}).and(s.record(s.string(), s.any())), fo = s.object({ slug: s.string() }), yo = s.object({
|
|
320
320
|
externalPath: s.string().or(s.null()).optional(),
|
|
321
321
|
path: s.string().or(s.null()).optional(),
|
|
322
322
|
related: s.object({ documentId: s.string().optional(), __type: s.string() }).catchall(s.unknown()).nullish(),
|
|
323
323
|
title: s.string(),
|
|
324
|
-
type:
|
|
324
|
+
type: hn,
|
|
325
325
|
uiRouterKey: s.string()
|
|
326
|
-
}), q = "navigation", B =
|
|
326
|
+
}), q = "navigation", B = Zn((e) => ({
|
|
327
327
|
getIndexPrefix() {
|
|
328
328
|
return [q];
|
|
329
329
|
},
|
|
330
330
|
readAll() {
|
|
331
|
-
return e.get(`/${q}`).then(({ data: t }) =>
|
|
331
|
+
return e.get(`/${q}`).then(({ data: t }) => zt.array().parse(t));
|
|
332
332
|
},
|
|
333
333
|
readAllIndex() {
|
|
334
334
|
return [q, "navigations"];
|
|
@@ -340,7 +340,7 @@ const fo = s.object({
|
|
|
340
340
|
return e.post(`/${q}/`, t);
|
|
341
341
|
},
|
|
342
342
|
update(t) {
|
|
343
|
-
return e.put(`/${q}/${t.documentId}`, t).then(({ data: a }) => a).then(
|
|
343
|
+
return e.put(`/${q}/${t.documentId}`, t).then(({ data: a }) => a).then(zt.parse);
|
|
344
344
|
},
|
|
345
345
|
purge({ documentId: t, withLangVersions: a }) {
|
|
346
346
|
return e.del(
|
|
@@ -349,10 +349,10 @@ const fo = s.object({
|
|
|
349
349
|
},
|
|
350
350
|
slugify(t) {
|
|
351
351
|
const a = new URLSearchParams();
|
|
352
|
-
return a.append("q", t), e.get(`/${q}/slug?${a.toString()}`).then(({ data: o }) =>
|
|
352
|
+
return a.append("q", t), e.get(`/${q}/slug?${a.toString()}`).then(({ data: o }) => fo.parse(o)).then(({ slug: o }) => o);
|
|
353
353
|
},
|
|
354
354
|
readConfig() {
|
|
355
|
-
return e.get(`/${q}/config`).then(({ data: t }) =>
|
|
355
|
+
return e.get(`/${q}/config`).then(({ data: t }) => _t.parse(t));
|
|
356
356
|
},
|
|
357
357
|
readConfigIndex() {
|
|
358
358
|
return [q, "config"];
|
|
@@ -387,7 +387,7 @@ const fo = s.object({
|
|
|
387
387
|
},
|
|
388
388
|
readSettingsConfig() {
|
|
389
389
|
return e.get(`/${q}/settings/config`).then(({ data: t }) => {
|
|
390
|
-
const a =
|
|
390
|
+
const a = _t.parse(t);
|
|
391
391
|
return {
|
|
392
392
|
...a,
|
|
393
393
|
contentTypes: a.contentTypes.map(({ uid: o }) => o)
|
|
@@ -398,14 +398,14 @@ const fo = s.object({
|
|
|
398
398
|
return [q, "config"];
|
|
399
399
|
},
|
|
400
400
|
readContentType() {
|
|
401
|
-
return e.get("/content-manager/content-types").then(({ data: t }) =>
|
|
401
|
+
return e.get("/content-manager/content-types").then(({ data: t }) => Ua.array().parse(t.data));
|
|
402
402
|
},
|
|
403
403
|
readContentTypeIndex() {
|
|
404
404
|
return [q, "content-manager", "content-types"];
|
|
405
405
|
},
|
|
406
406
|
readContentTypeItems({ uid: t, locale: a, query: o }) {
|
|
407
407
|
const i = new URLSearchParams();
|
|
408
|
-
return o && i.append("_q", o), a && i.append("locale", a), e.get(`/${q}/content-type-items/${t}?${i.toString()}`).then(({ data: r }) =>
|
|
408
|
+
return o && i.append("_q", o), a && i.append("locale", a), e.get(`/${q}/content-type-items/${t}?${i.toString()}`).then(({ data: r }) => ho.array().parse(r));
|
|
409
409
|
},
|
|
410
410
|
readContentTypeItemsIndex({
|
|
411
411
|
uid: t,
|
|
@@ -415,7 +415,7 @@ const fo = s.object({
|
|
|
415
415
|
return [q, "content-manager", "content-type-items", t, a, o];
|
|
416
416
|
},
|
|
417
417
|
readLocale() {
|
|
418
|
-
return e.get(`/${q}/settings/locale`).then((t) =>
|
|
418
|
+
return e.get(`/${q}/settings/locale`).then((t) => to.parse(t.data));
|
|
419
419
|
},
|
|
420
420
|
readLocaleIndex() {
|
|
421
421
|
return [q, "locale"];
|
|
@@ -432,20 +432,20 @@ const fo = s.object({
|
|
|
432
432
|
structureId: a = "",
|
|
433
433
|
target: o
|
|
434
434
|
}) {
|
|
435
|
-
return e.get(`/${q}/i18n/item/read/${t}/${o}?path=${a}`).then((i) =>
|
|
435
|
+
return e.get(`/${q}/i18n/item/read/${t}/${o}?path=${a}`).then((i) => yo.parse(i.data));
|
|
436
436
|
}
|
|
437
437
|
})), rt = (e) => ({
|
|
438
438
|
...e,
|
|
439
439
|
viewId: Math.floor(Math.random() * 152e4),
|
|
440
440
|
items: e.items?.map(rt)
|
|
441
|
-
}),
|
|
441
|
+
}), At = () => {
|
|
442
442
|
const e = j(), t = B(e);
|
|
443
443
|
return xe({
|
|
444
444
|
queryKey: t.readLocaleIndex(),
|
|
445
445
|
queryFn: t.readLocale,
|
|
446
446
|
staleTime: 1 / 0
|
|
447
447
|
});
|
|
448
|
-
},
|
|
448
|
+
}, bn = (e) => {
|
|
449
449
|
const t = j(), a = B(t);
|
|
450
450
|
return xe({
|
|
451
451
|
queryKey: a.readContentTypeItemsIndex(e),
|
|
@@ -453,45 +453,45 @@ const fo = s.object({
|
|
|
453
453
|
staleTime: 1e3 * 60 * 3,
|
|
454
454
|
enabled: !!e.uid
|
|
455
455
|
});
|
|
456
|
-
},
|
|
456
|
+
}, bo = () => {
|
|
457
457
|
const e = j(), t = B(e);
|
|
458
458
|
return xe({
|
|
459
459
|
queryKey: t.readContentTypeIndex(),
|
|
460
460
|
queryFn: () => t.readContentType(),
|
|
461
461
|
staleTime: 1e3 * 60 * 3
|
|
462
462
|
});
|
|
463
|
-
},
|
|
463
|
+
}, Io = () => {
|
|
464
464
|
const e = j(), t = B(e), a = be();
|
|
465
465
|
return () => {
|
|
466
466
|
a.resetQueries({
|
|
467
467
|
queryKey: t.readAllIndex()
|
|
468
468
|
});
|
|
469
469
|
};
|
|
470
|
-
},
|
|
470
|
+
}, vo = () => {
|
|
471
471
|
const e = j(), t = B(e), a = be();
|
|
472
472
|
return () => {
|
|
473
473
|
a.resetQueries({
|
|
474
474
|
queryKey: t.readContentTypeIndex()
|
|
475
475
|
});
|
|
476
476
|
};
|
|
477
|
-
},
|
|
477
|
+
}, Co = (e) => {
|
|
478
478
|
const t = j(), a = B(t), o = be();
|
|
479
479
|
return () => {
|
|
480
480
|
o.invalidateQueries({
|
|
481
481
|
queryKey: a.readContentTypeItemsIndex(e)
|
|
482
482
|
});
|
|
483
483
|
};
|
|
484
|
-
},
|
|
484
|
+
}, To = () => {
|
|
485
485
|
const e = j(), t = B(e), a = be();
|
|
486
486
|
return () => {
|
|
487
487
|
a.invalidateQueries({
|
|
488
488
|
queryKey: t.readAllIndex()
|
|
489
489
|
});
|
|
490
490
|
};
|
|
491
|
-
},
|
|
491
|
+
}, wo = () => {
|
|
492
492
|
const e = j(), t = B(e), a = be();
|
|
493
493
|
return () => a.invalidateQueries({ queryKey: t.readLocaleIndex() });
|
|
494
|
-
},
|
|
494
|
+
}, xt = () => {
|
|
495
495
|
const e = j(), t = B(e);
|
|
496
496
|
return xe({
|
|
497
497
|
queryKey: t.readAllIndex(),
|
|
@@ -507,26 +507,26 @@ const fo = s.object({
|
|
|
507
507
|
},
|
|
508
508
|
staleTime: 1e3 * 60 * 5
|
|
509
509
|
});
|
|
510
|
-
},
|
|
510
|
+
}, So = () => {
|
|
511
511
|
const e = be(), t = j(), a = B(t);
|
|
512
512
|
return $(() => {
|
|
513
513
|
e.invalidateQueries({
|
|
514
514
|
queryKey: a.getIndexPrefix()
|
|
515
515
|
});
|
|
516
516
|
}, [e, t, a]);
|
|
517
|
-
},
|
|
517
|
+
}, Fo = () => {
|
|
518
518
|
const e = j(), t = B(e);
|
|
519
519
|
return ge({
|
|
520
520
|
mutationFn(a) {
|
|
521
521
|
return Promise.all(a.map(t.delete));
|
|
522
522
|
}
|
|
523
523
|
});
|
|
524
|
-
},
|
|
524
|
+
}, Ao = () => {
|
|
525
525
|
const e = j(), t = B(e);
|
|
526
526
|
return ge({
|
|
527
527
|
mutationFn: t.copyNavigationItemLocale
|
|
528
528
|
});
|
|
529
|
-
},
|
|
529
|
+
}, xo = () => {
|
|
530
530
|
const e = j(), t = B(e), a = be();
|
|
531
531
|
return ge({
|
|
532
532
|
mutationFn: t.copyNavigationLocale,
|
|
@@ -536,7 +536,7 @@ const fo = s.object({
|
|
|
536
536
|
});
|
|
537
537
|
}
|
|
538
538
|
});
|
|
539
|
-
},
|
|
539
|
+
}, No = () => {
|
|
540
540
|
const e = j(), t = B(e), a = be();
|
|
541
541
|
return ge({
|
|
542
542
|
mutationFn: t.create,
|
|
@@ -546,7 +546,7 @@ const fo = s.object({
|
|
|
546
546
|
});
|
|
547
547
|
}
|
|
548
548
|
});
|
|
549
|
-
},
|
|
549
|
+
}, In = ({
|
|
550
550
|
onError: e,
|
|
551
551
|
onSuccess: t
|
|
552
552
|
}) => {
|
|
@@ -560,7 +560,7 @@ const fo = s.object({
|
|
|
560
560
|
},
|
|
561
561
|
onError: e
|
|
562
562
|
});
|
|
563
|
-
},
|
|
563
|
+
}, vn = () => {
|
|
564
564
|
const e = j(), t = B(e);
|
|
565
565
|
return ge({
|
|
566
566
|
mutationFn(a) {
|
|
@@ -575,7 +575,7 @@ const fo = s.object({
|
|
|
575
575
|
queryKey: t.readConfigIndex(),
|
|
576
576
|
queryFn: t.readConfig
|
|
577
577
|
});
|
|
578
|
-
},
|
|
578
|
+
}, Ro = /* @__PURE__ */ n(fa, {}), lt = ({
|
|
579
579
|
isVisible: e = !1,
|
|
580
580
|
isActionAsync: t = !1,
|
|
581
581
|
children: a,
|
|
@@ -585,7 +585,7 @@ const fo = s.object({
|
|
|
585
585
|
labelCancel: d,
|
|
586
586
|
labelConfirm: c,
|
|
587
587
|
iconConfirm: m,
|
|
588
|
-
mainIcon: p =
|
|
588
|
+
mainIcon: p = Ro
|
|
589
589
|
}) => {
|
|
590
590
|
const { formatMessage: u } = A();
|
|
591
591
|
return e ? /* @__PURE__ */ n(
|
|
@@ -615,7 +615,7 @@ const fo = s.object({
|
|
|
615
615
|
] })
|
|
616
616
|
}
|
|
617
617
|
) : null;
|
|
618
|
-
},
|
|
618
|
+
}, Qt = /* @__PURE__ */ n(ie, {}), Eo = ({ onConfirm: e, onCancel: t }) => {
|
|
619
619
|
const { formatMessage: a } = A();
|
|
620
620
|
return /* @__PURE__ */ n(
|
|
621
621
|
lt,
|
|
@@ -623,20 +623,20 @@ const fo = s.object({
|
|
|
623
623
|
isVisible: !0,
|
|
624
624
|
header: a(l("pages.view.actions.i18nCopyItems.confirmation.header")),
|
|
625
625
|
labelConfirm: a(l("pages.view.actions.i18nCopyItems.confirmation.confirm")),
|
|
626
|
-
iconConfirm:
|
|
627
|
-
mainIcon:
|
|
626
|
+
iconConfirm: Qt,
|
|
627
|
+
mainIcon: Qt,
|
|
628
628
|
onConfirm: e,
|
|
629
629
|
onCancel: t,
|
|
630
630
|
children: a(l("pages.view.actions.i18nCopyItems.confirmation.content"))
|
|
631
631
|
}
|
|
632
632
|
);
|
|
633
|
-
},
|
|
633
|
+
}, Lo = (e) => {
|
|
634
634
|
const [t, a] = N(!1), [o, i] = N(void 0), r = $(() => {
|
|
635
635
|
a(!1);
|
|
636
636
|
}, [a]), d = $(() => {
|
|
637
637
|
o && (e(o), a(!1));
|
|
638
638
|
}, [e, o]), c = X(
|
|
639
|
-
() => t ? /* @__PURE__ */ n(
|
|
639
|
+
() => t ? /* @__PURE__ */ n(Eo, { onConfirm: d, onCancel: r }) : null,
|
|
640
640
|
[t, d, r]
|
|
641
641
|
);
|
|
642
642
|
return X(
|
|
@@ -648,12 +648,12 @@ const fo = s.object({
|
|
|
648
648
|
}),
|
|
649
649
|
[i, a, c, o]
|
|
650
650
|
);
|
|
651
|
-
},
|
|
652
|
-
const e =
|
|
651
|
+
}, $o = () => {
|
|
652
|
+
const e = wo(), t = To();
|
|
653
653
|
V(() => {
|
|
654
654
|
e(), t();
|
|
655
655
|
}, []);
|
|
656
|
-
},
|
|
656
|
+
}, Po = ({ cancel: e, perform: t, trigger: a }) => {
|
|
657
657
|
const o = {};
|
|
658
658
|
return {
|
|
659
659
|
perform: (i) => {
|
|
@@ -665,9 +665,9 @@ const fo = s.object({
|
|
|
665
665
|
},
|
|
666
666
|
cancel: e
|
|
667
667
|
};
|
|
668
|
-
},
|
|
669
|
-
const a =
|
|
670
|
-
() =>
|
|
668
|
+
}, Mo = (e, t) => {
|
|
669
|
+
const a = At(), [o, i] = N(), [r, d] = N(!1), c = X(
|
|
670
|
+
() => Po({
|
|
671
671
|
perform: (p) => {
|
|
672
672
|
i(p), d(!1), t(!1);
|
|
673
673
|
},
|
|
@@ -688,7 +688,7 @@ const fo = s.object({
|
|
|
688
688
|
changeCurrentLocaleAction: c,
|
|
689
689
|
availableLocales: m
|
|
690
690
|
};
|
|
691
|
-
},
|
|
691
|
+
}, ko = (e) => {
|
|
692
692
|
const [t, a] = N(), [o, i] = N(!1), r = $(
|
|
693
693
|
(p, u = {}) => {
|
|
694
694
|
a(u), i(p);
|
|
@@ -730,9 +730,9 @@ const fo = s.object({
|
|
|
730
730
|
closeNavigationItemPopup: d,
|
|
731
731
|
isItemPopupVisible: o
|
|
732
732
|
};
|
|
733
|
-
},
|
|
733
|
+
}, Cn = (e, t, a) => {
|
|
734
734
|
const o = e.reduce((i, r) => {
|
|
735
|
-
const d = r.items?.length ?
|
|
735
|
+
const d = r.items?.length ? Cn(r.items ?? [], t) : [];
|
|
736
736
|
return t(r) ? [r, ...d, ...i] : [...d, ...i];
|
|
737
737
|
}, []);
|
|
738
738
|
if (a !== void 0) {
|
|
@@ -740,11 +740,11 @@ const fo = s.object({
|
|
|
740
740
|
return o.map((r, d) => i === d ? { ...r, isSearchActive: !0 } : r);
|
|
741
741
|
}
|
|
742
742
|
return o;
|
|
743
|
-
},
|
|
743
|
+
}, qo = (e) => {
|
|
744
744
|
const [{ value: t, index: a }, o] = N({
|
|
745
745
|
value: "",
|
|
746
746
|
index: 0
|
|
747
|
-
}), i = Y(t), r = (t || "").toLowerCase(), d = i ? [] :
|
|
747
|
+
}), i = Y(t), r = (t || "").toLowerCase(), d = i ? [] : Cn(
|
|
748
748
|
e?.items.map((c) => ({ ...c })) ?? [],
|
|
749
749
|
(c) => (c?.title || "").toLowerCase().includes(r),
|
|
750
750
|
r ? a : void 0
|
|
@@ -763,7 +763,7 @@ const fo = s.object({
|
|
|
763
763
|
access: [{ action: mt(gt.read), subject: null }],
|
|
764
764
|
update: [{ action: mt(gt.update), subject: null }],
|
|
765
765
|
settings: [{ action: mt(gt.settings), subject: null }]
|
|
766
|
-
},
|
|
766
|
+
}, Do = () => {
|
|
767
767
|
const e = X(
|
|
768
768
|
() => ({
|
|
769
769
|
access: Le.access || Le.update,
|
|
@@ -773,14 +773,14 @@ const fo = s.object({
|
|
|
773
773
|
), {
|
|
774
774
|
isLoading: t,
|
|
775
775
|
allowedActions: { canUpdate: a, canAccess: o }
|
|
776
|
-
} =
|
|
776
|
+
} = On(e);
|
|
777
777
|
return { canAccess: o, canUpdate: a, isLoadingForPermissions: t };
|
|
778
778
|
}, Ze = () => {
|
|
779
779
|
const {
|
|
780
780
|
theme: { breakpoints: e }
|
|
781
|
-
} =
|
|
781
|
+
} = Ma(), t = !Pt(e.small), a = an(), o = zn(), i = _n(), r = Pt("@media (min-width: 1280px)");
|
|
782
782
|
return { isSmallMobile: t, isMobile: a, isTablet: o, isDesktop: i, isLargeDesktop: r };
|
|
783
|
-
}, Ke = (e = []) =>
|
|
783
|
+
}, Ke = (e = []) => Jn(e, ["order"], ["asc"]).map((t, a) => {
|
|
784
784
|
const o = a + 1;
|
|
785
785
|
return {
|
|
786
786
|
...t,
|
|
@@ -899,14 +899,14 @@ const fo = s.object({
|
|
|
899
899
|
return d.label;
|
|
900
900
|
const c = [
|
|
901
901
|
...i,
|
|
902
|
-
...i.map((u) =>
|
|
902
|
+
...i.map((u) => ln(u))
|
|
903
903
|
], m = J(
|
|
904
904
|
o,
|
|
905
905
|
`${d ? d.uid : r}`,
|
|
906
906
|
c
|
|
907
907
|
), p = (Y(m) ? c : m).map((u) => e[u]).filter((u) => u);
|
|
908
908
|
return vt(p) || "";
|
|
909
|
-
},
|
|
909
|
+
}, Vo = ({
|
|
910
910
|
relatedRef: e,
|
|
911
911
|
relatedType: t = {},
|
|
912
912
|
type: a,
|
|
@@ -974,7 +974,7 @@ const fo = s.object({
|
|
|
974
974
|
isSearchActive: e.isSearchActive,
|
|
975
975
|
path: e.path ?? ""
|
|
976
976
|
};
|
|
977
|
-
},
|
|
977
|
+
}, Tn = (e) => e.find(({ isPending: t }) => t), ke = (e, t) => e.collapsed !== t ? {
|
|
978
978
|
...e,
|
|
979
979
|
collapsed: t,
|
|
980
980
|
updated: !0,
|
|
@@ -983,13 +983,13 @@ const fo = s.object({
|
|
|
983
983
|
...e,
|
|
984
984
|
items: e.items?.map((a) => ke(a, t))
|
|
985
985
|
}, ze = ({ start: e, end: t }) => /* @__PURE__ */ w(H.Footer, { children: [
|
|
986
|
-
/* @__PURE__ */ n(H.Close, { children:
|
|
987
|
-
|
|
988
|
-
] }),
|
|
986
|
+
/* @__PURE__ */ n(H.Close, { children: Ut(e) }),
|
|
987
|
+
Ut(t)
|
|
988
|
+
] }), Ut = (e) => e ? /* @__PURE__ */ n(K, { onClick: e.onClick, variant: e.variant, disabled: e.disabled, children: e.children }) : null, jo = ({ alreadyUsedNames: e }) => g.object({
|
|
989
989
|
name: g.string().min(2).and(g.string().refine((t) => !e.includes(t), "Name already used")),
|
|
990
990
|
// TODO: add translation
|
|
991
991
|
visible: g.boolean()
|
|
992
|
-
}),
|
|
992
|
+
}), wn = ({
|
|
993
993
|
navigation: e,
|
|
994
994
|
onChange: t,
|
|
995
995
|
alreadyUsedNames: a = [],
|
|
@@ -1032,7 +1032,7 @@ const fo = s.object({
|
|
|
1032
1032
|
})));
|
|
1033
1033
|
}, []), V(() => {
|
|
1034
1034
|
if (`${p}-${u}` != `${e.name}-${e.visible}`) {
|
|
1035
|
-
const { error: y } =
|
|
1035
|
+
const { error: y } = jo({ alreadyUsedNames: a }).safeParse(i);
|
|
1036
1036
|
t({
|
|
1037
1037
|
...e,
|
|
1038
1038
|
name: p,
|
|
@@ -1088,11 +1088,11 @@ const fo = s.object({
|
|
|
1088
1088
|
}
|
|
1089
1089
|
) })
|
|
1090
1090
|
] }) });
|
|
1091
|
-
},
|
|
1091
|
+
}, Bo = {
|
|
1092
1092
|
name: "",
|
|
1093
1093
|
items: [],
|
|
1094
1094
|
visible: !1
|
|
1095
|
-
},
|
|
1095
|
+
}, Oo = ({ setState: e, current: t, isLoading: a, alreadyUsedNames: o }) => {
|
|
1096
1096
|
const i = $(
|
|
1097
1097
|
({ disabled: r, ...d }) => {
|
|
1098
1098
|
e({
|
|
@@ -1105,7 +1105,7 @@ const fo = s.object({
|
|
|
1105
1105
|
[e]
|
|
1106
1106
|
);
|
|
1107
1107
|
return /* @__PURE__ */ n(
|
|
1108
|
-
|
|
1108
|
+
wn,
|
|
1109
1109
|
{
|
|
1110
1110
|
alreadyUsedNames: o,
|
|
1111
1111
|
navigation: t,
|
|
@@ -1113,7 +1113,7 @@ const fo = s.object({
|
|
|
1113
1113
|
isLoading: a
|
|
1114
1114
|
}
|
|
1115
1115
|
);
|
|
1116
|
-
},
|
|
1116
|
+
}, zo = ({ onSubmit: e, onReset: t, disabled: a, isLoading: o }) => {
|
|
1117
1117
|
const { formatMessage: i } = A();
|
|
1118
1118
|
return /* @__PURE__ */ n(
|
|
1119
1119
|
ze,
|
|
@@ -1132,8 +1132,8 @@ const fo = s.object({
|
|
|
1132
1132
|
}
|
|
1133
1133
|
}
|
|
1134
1134
|
);
|
|
1135
|
-
},
|
|
1136
|
-
const o = ne(), i = !!t.length, { formatMessage: r } = A(), d =
|
|
1135
|
+
}, _o = /* @__PURE__ */ n(Ct, {}), Qo = /* @__PURE__ */ n(Tt, {}), Kt = /* @__PURE__ */ n(ya, {}), Uo = ({ navigations: e, selected: t, setState: a }) => {
|
|
1136
|
+
const o = ne(), i = !!t.length, { formatMessage: r } = A(), d = At(), c = $(
|
|
1137
1137
|
() => a({
|
|
1138
1138
|
navigations: e,
|
|
1139
1139
|
selected: i ? [] : e.map((I) => I),
|
|
@@ -1179,9 +1179,9 @@ const fo = s.object({
|
|
|
1179
1179
|
/* @__PURE__ */ n(K, { onClick: C, variant: "tertiary", children: r(l("popup.navigation.manage.button.delete")) }),
|
|
1180
1180
|
o.data?.isCacheEnabled ? /* @__PURE__ */ n(K, { onClick: y, variant: "tertiary", children: r(l("popup.navigation.manage.button.purge")) }) : null
|
|
1181
1181
|
] }) : null }) }),
|
|
1182
|
-
/* @__PURE__ */ w(
|
|
1183
|
-
/* @__PURE__ */ n(
|
|
1184
|
-
/* @__PURE__ */ n(ce, { children: /* @__PURE__ */ n(
|
|
1182
|
+
/* @__PURE__ */ w(sn, { rowCount: e.length, colCount: 6, children: [
|
|
1183
|
+
/* @__PURE__ */ n(dn, { children: /* @__PURE__ */ w(et, { children: [
|
|
1184
|
+
/* @__PURE__ */ n(ce, { children: /* @__PURE__ */ n(qt, { onCheckedChange: c, check: i }) }),
|
|
1185
1185
|
/* @__PURE__ */ n(ce, { children: /* @__PURE__ */ n(x, { textColor: "neutral800", children: r(l("popup.navigation.manage.table.id")) }) }),
|
|
1186
1186
|
/* @__PURE__ */ n(ce, { children: /* @__PURE__ */ n(x, { textColor: "neutral800", children: r(l("popup.navigation.manage.table.name")) }) }),
|
|
1187
1187
|
/* @__PURE__ */ n(ce, { children: /* @__PURE__ */ n(x, { textColor: "neutral800", children: r(l("popup.navigation.manage.table.locale")) }) }),
|
|
@@ -1192,13 +1192,13 @@ const fo = s.object({
|
|
|
1192
1192
|
onClick: b([]),
|
|
1193
1193
|
label: r(l("popup.navigation.manage.button.purge")),
|
|
1194
1194
|
noBorder: !0,
|
|
1195
|
-
children:
|
|
1195
|
+
children: Kt
|
|
1196
1196
|
}
|
|
1197
1197
|
) }) }) : null })
|
|
1198
1198
|
] }) }),
|
|
1199
|
-
/* @__PURE__ */ n(
|
|
1199
|
+
/* @__PURE__ */ n(cn, { children: e.filter(({ locale: I }) => I === d.data?.defaultLocale).map((I) => /* @__PURE__ */ w(et, { children: [
|
|
1200
1200
|
/* @__PURE__ */ n(ue, { children: /* @__PURE__ */ n(
|
|
1201
|
-
|
|
1201
|
+
qt,
|
|
1202
1202
|
{
|
|
1203
1203
|
onCheckedChange: p(
|
|
1204
1204
|
I,
|
|
@@ -1218,7 +1218,7 @@ const fo = s.object({
|
|
|
1218
1218
|
onClick: u(I),
|
|
1219
1219
|
label: r(l("popup.navigation.manage.button.edit")),
|
|
1220
1220
|
noBorder: !0,
|
|
1221
|
-
children:
|
|
1221
|
+
children: _o
|
|
1222
1222
|
}
|
|
1223
1223
|
) }),
|
|
1224
1224
|
/* @__PURE__ */ n(D, { paddingLeft: 1, children: /* @__PURE__ */ n(
|
|
@@ -1227,7 +1227,7 @@ const fo = s.object({
|
|
|
1227
1227
|
onClick: v([I]),
|
|
1228
1228
|
label: r(l("popup.navigation.manage.button.delete")),
|
|
1229
1229
|
noBorder: !0,
|
|
1230
|
-
children:
|
|
1230
|
+
children: Qo
|
|
1231
1231
|
}
|
|
1232
1232
|
) }),
|
|
1233
1233
|
o.data?.isCacheEnabled ? /* @__PURE__ */ n(D, { paddingLeft: 1, children: /* @__PURE__ */ n(
|
|
@@ -1236,14 +1236,14 @@ const fo = s.object({
|
|
|
1236
1236
|
onClick: b([I]),
|
|
1237
1237
|
label: r(l("popup.navigation.manage.button.purge")),
|
|
1238
1238
|
noBorder: !0,
|
|
1239
|
-
children:
|
|
1239
|
+
children: Kt
|
|
1240
1240
|
}
|
|
1241
1241
|
) }) : null
|
|
1242
1242
|
] }) })
|
|
1243
1243
|
] }, I.documentId)) })
|
|
1244
1244
|
] })
|
|
1245
1245
|
] });
|
|
1246
|
-
},
|
|
1246
|
+
}, Ko = ({
|
|
1247
1247
|
onClose: e,
|
|
1248
1248
|
state: t,
|
|
1249
1249
|
setState: a,
|
|
@@ -1264,7 +1264,7 @@ const fo = s.object({
|
|
|
1264
1264
|
onClick: () => a({
|
|
1265
1265
|
view: "CREATE",
|
|
1266
1266
|
alreadyUsedNames: o.map(({ name: d }) => d),
|
|
1267
|
-
current:
|
|
1267
|
+
current: Bo
|
|
1268
1268
|
}),
|
|
1269
1269
|
variant: "default",
|
|
1270
1270
|
disabled: i,
|
|
@@ -1272,13 +1272,13 @@ const fo = s.object({
|
|
|
1272
1272
|
}
|
|
1273
1273
|
}
|
|
1274
1274
|
);
|
|
1275
|
-
},
|
|
1275
|
+
}, Wo = ({ navigations: e }) => {
|
|
1276
1276
|
const { formatMessage: t } = A();
|
|
1277
1277
|
return /* @__PURE__ */ w(S.Root, { children: [
|
|
1278
1278
|
/* @__PURE__ */ n(S.Item, { col: 12, paddingBottom: 1, children: /* @__PURE__ */ n(P, { children: /* @__PURE__ */ n(x, { variant: "beta", children: t(l("popup.navigation.manage.delete.header")) }) }) }),
|
|
1279
|
-
/* @__PURE__ */ n(S.Item, { col: 12, paddingBottom: 1, children: /* @__PURE__ */ n(x, { variant: "omega", fontWeight: "semiBold", children:
|
|
1279
|
+
/* @__PURE__ */ n(S.Item, { col: 12, paddingBottom: 1, children: /* @__PURE__ */ n(x, { variant: "omega", fontWeight: "semiBold", children: Xo(e) }) })
|
|
1280
1280
|
] });
|
|
1281
|
-
},
|
|
1281
|
+
}, Ho = ({ state: e, onSubmit: t, onReset: a, isLoading: o }) => {
|
|
1282
1282
|
const { formatMessage: i } = A();
|
|
1283
1283
|
return /* @__PURE__ */ n(
|
|
1284
1284
|
ze,
|
|
@@ -1297,7 +1297,7 @@ const fo = s.object({
|
|
|
1297
1297
|
}
|
|
1298
1298
|
}
|
|
1299
1299
|
);
|
|
1300
|
-
},
|
|
1300
|
+
}, Xo = (e) => e.map(nt("name")).join(", "), Go = ({ errors: e }) => {
|
|
1301
1301
|
const { formatMessage: t } = A(), { toggleNotification: a } = Oe();
|
|
1302
1302
|
return V(() => {
|
|
1303
1303
|
e.map((o) => {
|
|
@@ -1307,7 +1307,7 @@ const fo = s.object({
|
|
|
1307
1307
|
}), console.error(o);
|
|
1308
1308
|
});
|
|
1309
1309
|
}, []), /* @__PURE__ */ n(S.Root, { children: /* @__PURE__ */ n(S.Item, { col: 12, children: t(l("popup.navigation.manage.error.message")) }) });
|
|
1310
|
-
},
|
|
1310
|
+
}, Zo = ({ onReset: e }) => {
|
|
1311
1311
|
const { formatMessage: t } = A();
|
|
1312
1312
|
return /* @__PURE__ */ n(
|
|
1313
1313
|
ze,
|
|
@@ -1319,7 +1319,7 @@ const fo = s.object({
|
|
|
1319
1319
|
}
|
|
1320
1320
|
}
|
|
1321
1321
|
);
|
|
1322
|
-
},
|
|
1322
|
+
}, Jo = ({
|
|
1323
1323
|
alreadyUsedNames: e,
|
|
1324
1324
|
current: t,
|
|
1325
1325
|
isLoading: a,
|
|
@@ -1339,7 +1339,7 @@ const fo = s.object({
|
|
|
1339
1339
|
[i, o, e]
|
|
1340
1340
|
);
|
|
1341
1341
|
return /* @__PURE__ */ n(
|
|
1342
|
-
|
|
1342
|
+
wn,
|
|
1343
1343
|
{
|
|
1344
1344
|
navigation: r,
|
|
1345
1345
|
onChange: d,
|
|
@@ -1347,7 +1347,7 @@ const fo = s.object({
|
|
|
1347
1347
|
alreadyUsedNames: e
|
|
1348
1348
|
}
|
|
1349
1349
|
);
|
|
1350
|
-
},
|
|
1350
|
+
}, Yo = ({ onSubmit: e, onReset: t, disabled: a, isLoading: o }) => {
|
|
1351
1351
|
const { formatMessage: i } = A();
|
|
1352
1352
|
return /* @__PURE__ */ n(
|
|
1353
1353
|
ze,
|
|
@@ -1366,13 +1366,13 @@ const fo = s.object({
|
|
|
1366
1366
|
}
|
|
1367
1367
|
}
|
|
1368
1368
|
);
|
|
1369
|
-
},
|
|
1369
|
+
}, ei = ({ navigations: e }) => {
|
|
1370
1370
|
const { formatMessage: t } = A();
|
|
1371
1371
|
return /* @__PURE__ */ w(S.Root, { children: [
|
|
1372
1372
|
/* @__PURE__ */ n(S.Item, { col: 12, paddingBottom: 1, children: /* @__PURE__ */ n(P, { children: /* @__PURE__ */ n(x, { variant: "beta", children: t(l("popup.navigation.manage.purge.header")) }) }) }),
|
|
1373
|
-
/* @__PURE__ */ n(S.Item, { col: 12, paddingBottom: 1, children: /* @__PURE__ */ n(x, { variant: "omega", fontWeight: "semiBold", children:
|
|
1373
|
+
/* @__PURE__ */ n(S.Item, { col: 12, paddingBottom: 1, children: /* @__PURE__ */ n(x, { variant: "omega", fontWeight: "semiBold", children: ni(e) }) })
|
|
1374
1374
|
] });
|
|
1375
|
-
},
|
|
1375
|
+
}, ti = ({ onSubmit: e, onReset: t, isLoading: a }) => {
|
|
1376
1376
|
const { formatMessage: o } = A();
|
|
1377
1377
|
return /* @__PURE__ */ n(
|
|
1378
1378
|
ze,
|
|
@@ -1391,11 +1391,11 @@ const fo = s.object({
|
|
|
1391
1391
|
}
|
|
1392
1392
|
}
|
|
1393
1393
|
);
|
|
1394
|
-
},
|
|
1395
|
-
const { formatMessage: o } = A(), [i, r] = N(e), { toggleNotification: d } = Oe(), c =
|
|
1394
|
+
}, ni = (e) => e.map(nt("name")).join(", "), ai = ({ initialState: e, isOpened: t, onClose: a }) => {
|
|
1395
|
+
const { formatMessage: o } = A(), [i, r] = N(e), { toggleNotification: d } = Oe(), c = So(), m = Fo(), p = No(), u = In({}), v = vn(), b = xt(), C = At(), y = X(
|
|
1396
1396
|
() => Xe(b.data ?? [], "id"),
|
|
1397
1397
|
[b.data]
|
|
1398
|
-
), f =
|
|
1398
|
+
), f = Tn([
|
|
1399
1399
|
m,
|
|
1400
1400
|
b,
|
|
1401
1401
|
p,
|
|
@@ -1480,7 +1480,7 @@ const fo = s.object({
|
|
|
1480
1480
|
selected: []
|
|
1481
1481
|
});
|
|
1482
1482
|
}, [i.view, y]);
|
|
1483
|
-
const T =
|
|
1483
|
+
const T = oi(i, o, !!f), E = ii(i, r, !!f), z = ri({
|
|
1484
1484
|
state: i,
|
|
1485
1485
|
setState: r,
|
|
1486
1486
|
onClose: a,
|
|
@@ -1504,7 +1504,7 @@ const fo = s.object({
|
|
|
1504
1504
|
] })
|
|
1505
1505
|
}
|
|
1506
1506
|
);
|
|
1507
|
-
},
|
|
1507
|
+
}, oi = (e, t, a) => {
|
|
1508
1508
|
switch (e.view) {
|
|
1509
1509
|
case "LIST":
|
|
1510
1510
|
case "CREATE":
|
|
@@ -1525,53 +1525,53 @@ const fo = s.object({
|
|
|
1525
1525
|
case "INITIAL":
|
|
1526
1526
|
return null;
|
|
1527
1527
|
default:
|
|
1528
|
-
return
|
|
1528
|
+
return Nt(e);
|
|
1529
1529
|
}
|
|
1530
|
-
},
|
|
1530
|
+
}, ii = (e, t, a) => {
|
|
1531
1531
|
const o = {
|
|
1532
1532
|
setState: t,
|
|
1533
1533
|
isLoading: a
|
|
1534
1534
|
};
|
|
1535
1535
|
switch (e.view) {
|
|
1536
1536
|
case "LIST":
|
|
1537
|
-
return /* @__PURE__ */ n(
|
|
1537
|
+
return /* @__PURE__ */ n(Uo, { ...e, ...o });
|
|
1538
1538
|
case "EDIT":
|
|
1539
|
-
return /* @__PURE__ */ n(
|
|
1539
|
+
return /* @__PURE__ */ n(Jo, { ...e, ...o });
|
|
1540
1540
|
case "CREATE":
|
|
1541
|
-
return /* @__PURE__ */ n(
|
|
1541
|
+
return /* @__PURE__ */ n(Oo, { ...e, ...o });
|
|
1542
1542
|
case "DELETE":
|
|
1543
|
-
return /* @__PURE__ */ n(
|
|
1543
|
+
return /* @__PURE__ */ n(Wo, { ...e, ...o });
|
|
1544
1544
|
case "CACHE_PURGE":
|
|
1545
|
-
return /* @__PURE__ */ n(
|
|
1545
|
+
return /* @__PURE__ */ n(ei, { ...e, ...o });
|
|
1546
1546
|
case "INITIAL":
|
|
1547
1547
|
return /* @__PURE__ */ n(bt, { small: !0 });
|
|
1548
1548
|
case "ERROR":
|
|
1549
|
-
return /* @__PURE__ */ n(
|
|
1549
|
+
return /* @__PURE__ */ n(Go, { ...e, ...o });
|
|
1550
1550
|
default:
|
|
1551
|
-
return
|
|
1551
|
+
return Nt(e);
|
|
1552
1552
|
}
|
|
1553
|
-
},
|
|
1553
|
+
}, ri = (e) => {
|
|
1554
1554
|
switch (e.state.view) {
|
|
1555
1555
|
case "LIST":
|
|
1556
|
-
return /* @__PURE__ */ n(
|
|
1556
|
+
return /* @__PURE__ */ n(Ko, { ...e });
|
|
1557
1557
|
case "CREATE":
|
|
1558
|
-
return /* @__PURE__ */ n(
|
|
1558
|
+
return /* @__PURE__ */ n(zo, { ...e, disabled: e.state.disabled });
|
|
1559
1559
|
case "EDIT":
|
|
1560
|
-
return /* @__PURE__ */ n(
|
|
1560
|
+
return /* @__PURE__ */ n(Yo, { ...e, disabled: e.state.disabled });
|
|
1561
1561
|
case "DELETE":
|
|
1562
|
-
return /* @__PURE__ */ n(
|
|
1562
|
+
return /* @__PURE__ */ n(Ho, { ...e });
|
|
1563
1563
|
case "CACHE_PURGE":
|
|
1564
|
-
return /* @__PURE__ */ n(
|
|
1564
|
+
return /* @__PURE__ */ n(ti, { ...e });
|
|
1565
1565
|
case "ERROR":
|
|
1566
|
-
return /* @__PURE__ */ n(
|
|
1566
|
+
return /* @__PURE__ */ n(Zo, { ...e });
|
|
1567
1567
|
case "INITIAL":
|
|
1568
1568
|
return null;
|
|
1569
1569
|
default:
|
|
1570
|
-
return
|
|
1570
|
+
return Nt(e.state);
|
|
1571
1571
|
}
|
|
1572
|
-
},
|
|
1572
|
+
}, Nt = (e) => (console.warn(`Unknown state "${e?.view}". (${JSON.stringify(e)})`), null), li = () => {
|
|
1573
1573
|
const [e, t] = N(!1), a = $(() => t(!0), [t]), o = $(() => t(!1), [t]), i = X(
|
|
1574
|
-
() => e ? /* @__PURE__ */ n(
|
|
1574
|
+
() => e ? /* @__PURE__ */ n(ai, { initialState: { view: "INITIAL" }, isOpened: !0, onClose: o }) : null,
|
|
1575
1575
|
[e, o]
|
|
1576
1576
|
);
|
|
1577
1577
|
return X(
|
|
@@ -1592,7 +1592,7 @@ const fo = s.object({
|
|
|
1592
1592
|
@media (min-width: 768px) {
|
|
1593
1593
|
order: ${({ orderMedium: e }) => e ?? "unset"};
|
|
1594
1594
|
}
|
|
1595
|
-
`,
|
|
1595
|
+
`, Wt = /* @__PURE__ */ n(Ge, {}), si = ({
|
|
1596
1596
|
activeNavigation: e,
|
|
1597
1597
|
availableNavigations: t,
|
|
1598
1598
|
structureHasErrors: a,
|
|
@@ -1606,7 +1606,7 @@ const fo = s.object({
|
|
|
1606
1606
|
locale: u,
|
|
1607
1607
|
currentLocale: v
|
|
1608
1608
|
}) => {
|
|
1609
|
-
const { formatMessage: b } = A(), { openNavigationManagerModal: C, navigationManagerModal: y } =
|
|
1609
|
+
const { formatMessage: b } = A(), { openNavigationManagerModal: C, navigationManagerModal: y } = li(), f = ne(), I = !!u.restLocale?.length, h = f.data?.isCacheEnabled, { canUpdate: T } = p, { isDesktop: E, isMobile: z, isLargeDesktop: k } = Ze();
|
|
1610
1610
|
return /* @__PURE__ */ n(ie, { children: /* @__PURE__ */ n(
|
|
1611
1611
|
qe.Header,
|
|
1612
1612
|
{
|
|
@@ -1657,7 +1657,7 @@ const fo = s.object({
|
|
|
1657
1657
|
orderInitial: 1,
|
|
1658
1658
|
orderSmall: 1,
|
|
1659
1659
|
orderMedium: 2,
|
|
1660
|
-
children: /* @__PURE__ */ n(
|
|
1660
|
+
children: /* @__PURE__ */ n(Dt.Root, { width: "100%", children: /* @__PURE__ */ n(
|
|
1661
1661
|
Fe,
|
|
1662
1662
|
{
|
|
1663
1663
|
type: "select",
|
|
@@ -1677,7 +1677,7 @@ const fo = s.object({
|
|
|
1677
1677
|
) })
|
|
1678
1678
|
}
|
|
1679
1679
|
),
|
|
1680
|
-
I ? /* @__PURE__ */ n(Me, { m: 2, xs: 3, orderInitial: 2, orderSmall: 2, orderMedium: 3, children: /* @__PURE__ */ n(
|
|
1680
|
+
I ? /* @__PURE__ */ n(Me, { m: 2, xs: 3, orderInitial: 2, orderSmall: 2, orderMedium: 3, children: /* @__PURE__ */ n(Dt.Root, { width: "100%", children: /* @__PURE__ */ n(
|
|
1681
1681
|
Fe,
|
|
1682
1682
|
{
|
|
1683
1683
|
type: "select",
|
|
@@ -1703,7 +1703,7 @@ const fo = s.object({
|
|
|
1703
1703
|
K,
|
|
1704
1704
|
{
|
|
1705
1705
|
onClick: c,
|
|
1706
|
-
startIcon:
|
|
1706
|
+
startIcon: Wt,
|
|
1707
1707
|
disabled: a || !o || i,
|
|
1708
1708
|
type: "submit",
|
|
1709
1709
|
fullWidth: !0,
|
|
@@ -1719,7 +1719,7 @@ const fo = s.object({
|
|
|
1719
1719
|
K,
|
|
1720
1720
|
{
|
|
1721
1721
|
onClick: m,
|
|
1722
|
-
startIcon:
|
|
1722
|
+
startIcon: Wt,
|
|
1723
1723
|
variant: "danger",
|
|
1724
1724
|
type: "submit",
|
|
1725
1725
|
fullWidth: !0,
|
|
@@ -1735,13 +1735,13 @@ const fo = s.object({
|
|
|
1735
1735
|
]
|
|
1736
1736
|
}
|
|
1737
1737
|
),
|
|
1738
|
-
secondaryAction: !z && /* @__PURE__ */ n(
|
|
1738
|
+
secondaryAction: !z && /* @__PURE__ */ n(na, { icon: /* @__PURE__ */ n(ba, { "aria-hidden": !0 }), children: e ? b(l("header.meta"), {
|
|
1739
1739
|
id: e?.documentId,
|
|
1740
1740
|
key: e?.slug
|
|
1741
1741
|
}) : null })
|
|
1742
1742
|
}
|
|
1743
1743
|
) });
|
|
1744
|
-
},
|
|
1744
|
+
}, Ht = /* @__PURE__ */ n(ie, {}), di = ({ onConfirm: e, onCancel: t }) => {
|
|
1745
1745
|
const { formatMessage: a } = A();
|
|
1746
1746
|
return /* @__PURE__ */ n(
|
|
1747
1747
|
lt,
|
|
@@ -1751,14 +1751,14 @@ const fo = s.object({
|
|
|
1751
1751
|
labelConfirm: a(
|
|
1752
1752
|
l("pages.view.actions.changeLanguage.confirmation.confirm")
|
|
1753
1753
|
),
|
|
1754
|
-
iconConfirm:
|
|
1755
|
-
mainIcon:
|
|
1754
|
+
iconConfirm: Ht,
|
|
1755
|
+
mainIcon: Ht,
|
|
1756
1756
|
onConfirm: e,
|
|
1757
1757
|
onCancel: t,
|
|
1758
1758
|
children: a(l("pages.view.actions.changeLanguage.confirmation.content"))
|
|
1759
1759
|
}
|
|
1760
1760
|
);
|
|
1761
|
-
},
|
|
1761
|
+
}, ci = ({ startActions: e, endActions: t }) => /* @__PURE__ */ w(
|
|
1762
1762
|
P,
|
|
1763
1763
|
{
|
|
1764
1764
|
direction: { initial: "column-reverse", small: "row" },
|
|
@@ -1779,7 +1779,7 @@ const fo = s.object({
|
|
|
1779
1779
|
)
|
|
1780
1780
|
]
|
|
1781
1781
|
}
|
|
1782
|
-
),
|
|
1782
|
+
), ui = oe.div`
|
|
1783
1783
|
border-radius: 50%;
|
|
1784
1784
|
background: #dcdce4;
|
|
1785
1785
|
width: 25px;
|
|
@@ -1788,7 +1788,7 @@ const fo = s.object({
|
|
|
1788
1788
|
justify-content: center;
|
|
1789
1789
|
align-items: center;
|
|
1790
1790
|
margin-right: 8px;
|
|
1791
|
-
`,
|
|
1791
|
+
`, pi = ({ toggle: e, collapsed: t, itemsCount: a }) => {
|
|
1792
1792
|
const { isSmallMobile: o } = Ze();
|
|
1793
1793
|
return /* @__PURE__ */ w(
|
|
1794
1794
|
P,
|
|
@@ -1799,7 +1799,7 @@ const fo = s.object({
|
|
|
1799
1799
|
cursor: "pointer",
|
|
1800
1800
|
style: { marginRight: "16px" },
|
|
1801
1801
|
children: [
|
|
1802
|
-
/* @__PURE__ */ n(
|
|
1802
|
+
/* @__PURE__ */ n(ui, { children: t ? /* @__PURE__ */ n(Ia, { width: "16px", height: "9px" }) : /* @__PURE__ */ n(va, { width: "16px", height: "9px" }) }),
|
|
1803
1803
|
!o && /* @__PURE__ */ w(x, { variant: "pi", children: [
|
|
1804
1804
|
a,
|
|
1805
1805
|
" nested ",
|
|
@@ -1808,7 +1808,7 @@ const fo = s.object({
|
|
|
1808
1808
|
]
|
|
1809
1809
|
}
|
|
1810
1810
|
);
|
|
1811
|
-
},
|
|
1811
|
+
}, Sn = oe(aa).withConfig({
|
|
1812
1812
|
shouldForwardProp: (e) => !["small"].includes(e)
|
|
1813
1813
|
})`
|
|
1814
1814
|
border: 1px solid
|
|
@@ -1827,7 +1827,7 @@ const fo = s.object({
|
|
|
1827
1827
|
vertical-align: middle;
|
|
1828
1828
|
}
|
|
1829
1829
|
`}
|
|
1830
|
-
`,
|
|
1830
|
+
`, mi = oe.span`
|
|
1831
1831
|
display: flex;
|
|
1832
1832
|
align-items: center;
|
|
1833
1833
|
justify-content: center;
|
|
@@ -1875,10 +1875,10 @@ const fo = s.object({
|
|
|
1875
1875
|
}
|
|
1876
1876
|
}
|
|
1877
1877
|
}
|
|
1878
|
-
`,
|
|
1878
|
+
`, gi = jn.forwardRef((e, t) => {
|
|
1879
1879
|
const { isSmallMobile: a } = Ze();
|
|
1880
|
-
return /* @__PURE__ */ n(
|
|
1881
|
-
}),
|
|
1880
|
+
return /* @__PURE__ */ n(mi, { ...e, ref: t, isMobile: a, children: /* @__PURE__ */ n(Ca, {}) });
|
|
1881
|
+
}), hi = oe(oa)`
|
|
1882
1882
|
width: 100%;
|
|
1883
1883
|
|
|
1884
1884
|
display: flex;
|
|
@@ -1889,7 +1889,7 @@ const fo = s.object({
|
|
|
1889
1889
|
> div > * {
|
|
1890
1890
|
margin: 0px ${({ theme: e }) => e.spaces[1]};
|
|
1891
1891
|
}
|
|
1892
|
-
`,
|
|
1892
|
+
`, fi = /* @__PURE__ */ n(Ct, {}), yi = /* @__PURE__ */ n(Tt, {}), bi = /* @__PURE__ */ n(mn, {}), Ii = /* @__PURE__ */ n(Ta, {}), vi = { zIndex: 2 }, Ci = { maxWidth: "425px" }, Ti = ({
|
|
1893
1893
|
title: e,
|
|
1894
1894
|
path: t,
|
|
1895
1895
|
icon: a,
|
|
@@ -1902,9 +1902,9 @@ const fo = s.object({
|
|
|
1902
1902
|
isSearchActive: p
|
|
1903
1903
|
}) => {
|
|
1904
1904
|
const { formatMessage: u } = A(), { isSmallMobile: v } = Ze();
|
|
1905
|
-
return /* @__PURE__ */ w(
|
|
1905
|
+
return /* @__PURE__ */ w(hi, { children: [
|
|
1906
1906
|
/* @__PURE__ */ w(P, { alignItems: "center", children: [
|
|
1907
|
-
i && /* @__PURE__ */ n(
|
|
1907
|
+
i && /* @__PURE__ */ n(gi, { ref: m, isActive: p }),
|
|
1908
1908
|
/* @__PURE__ */ n(x, { variant: "omega", fontWeight: "bold", fontSize: v ? "12px" : "14px", children: e }),
|
|
1909
1909
|
/* @__PURE__ */ n(
|
|
1910
1910
|
x,
|
|
@@ -1914,15 +1914,15 @@ const fo = s.object({
|
|
|
1914
1914
|
textColor: "neutral500",
|
|
1915
1915
|
fontSize: v ? "12px" : "14px",
|
|
1916
1916
|
ellipsis: !0,
|
|
1917
|
-
style:
|
|
1917
|
+
style: Ci,
|
|
1918
1918
|
children: t
|
|
1919
1919
|
}
|
|
1920
1920
|
),
|
|
1921
1921
|
/* @__PURE__ */ n(P, { children: a })
|
|
1922
1922
|
] }),
|
|
1923
|
-
/* @__PURE__ */ w(P, { alignItems: "center", style:
|
|
1924
|
-
o && /* @__PURE__ */ n(
|
|
1925
|
-
/* @__PURE__ */ w(
|
|
1923
|
+
/* @__PURE__ */ w(P, { alignItems: "center", style: vi, children: [
|
|
1924
|
+
o && /* @__PURE__ */ n(Sn, { borderColor: "danger200", backgroundColor: "danger100", textColor: "danger600", children: u(l("components.navigationItem.badge.removed")) }),
|
|
1925
|
+
/* @__PURE__ */ w(un, { children: [
|
|
1926
1926
|
/* @__PURE__ */ n(
|
|
1927
1927
|
ht,
|
|
1928
1928
|
{
|
|
@@ -1935,7 +1935,7 @@ const fo = s.object({
|
|
|
1935
1935
|
i ? "Edit" : "View"
|
|
1936
1936
|
)
|
|
1937
1937
|
),
|
|
1938
|
-
children: i ?
|
|
1938
|
+
children: i ? fi : bi,
|
|
1939
1939
|
isMobile: v
|
|
1940
1940
|
}
|
|
1941
1941
|
),
|
|
@@ -1948,7 +1948,7 @@ const fo = s.object({
|
|
|
1948
1948
|
l("components.navigationItem.action.restore", "Restore")
|
|
1949
1949
|
),
|
|
1950
1950
|
variant: "success-light",
|
|
1951
|
-
children:
|
|
1951
|
+
children: Ii,
|
|
1952
1952
|
isMobile: v
|
|
1953
1953
|
}
|
|
1954
1954
|
) : /* @__PURE__ */ n(
|
|
@@ -1960,7 +1960,7 @@ const fo = s.object({
|
|
|
1960
1960
|
label: u(
|
|
1961
1961
|
l("components.navigationItem.action.remove", "Remove")
|
|
1962
1962
|
),
|
|
1963
|
-
children:
|
|
1963
|
+
children: yi,
|
|
1964
1964
|
isMobile: v
|
|
1965
1965
|
}
|
|
1966
1966
|
) })
|
|
@@ -1973,7 +1973,7 @@ const fo = s.object({
|
|
|
1973
1973
|
height: ${({ isMobile: e }) => e ? "24px" : "32px"};
|
|
1974
1974
|
width: ${({ isMobile: e }) => e ? "24px" : "32px"};
|
|
1975
1975
|
padding: ${({ isMobile: e, theme: t }) => e ? t.spaces[1] : t.spaces[2]};
|
|
1976
|
-
`,
|
|
1976
|
+
`, wi = oe.div`
|
|
1977
1977
|
width: 100%;
|
|
1978
1978
|
height: 100%;
|
|
1979
1979
|
position: absolute;
|
|
@@ -1982,7 +1982,7 @@ const fo = s.object({
|
|
|
1982
1982
|
z-index: 1;
|
|
1983
1983
|
|
|
1984
1984
|
background: rgba(255, 255, 255, 0.75);
|
|
1985
|
-
`,
|
|
1985
|
+
`, Si = oe.div.withConfig({
|
|
1986
1986
|
shouldForwardProp: (e) => !["level", "isLast"].includes(e)
|
|
1987
1987
|
})`
|
|
1988
1988
|
position: relative;
|
|
@@ -2018,7 +2018,7 @@ const fo = s.object({
|
|
|
2018
2018
|
border-radius: 0 0 0 100%;
|
|
2019
2019
|
}
|
|
2020
2020
|
`};
|
|
2021
|
-
`,
|
|
2021
|
+
`, Fi = ({
|
|
2022
2022
|
item: e,
|
|
2023
2023
|
isLast: t = !1,
|
|
2024
2024
|
level: a = 0,
|
|
@@ -2037,48 +2037,48 @@ const fo = s.object({
|
|
|
2037
2037
|
viewParentId: f,
|
|
2038
2038
|
locale: I
|
|
2039
2039
|
}) => {
|
|
2040
|
-
const h = Se(e, !0), { formatMessage: T } = A(), E = ne(), z =
|
|
2040
|
+
const h = Se(e, !0), { formatMessage: T } = A(), E = ne(), z = an(), k = h.type === "EXTERNAL", F = h.type === "WRAPPER", M = kt(E.data?.allowedLevels) ? a < E.data.allowedLevels - 1 : !0, _ = kt(E.data?.allowedLevels) ? a < E.data.allowedLevels : !0, re = !Y(e.items) && !b, Q = k ? void 0 : `${o === "/" ? "" : o}/${h.path === "/" ? "" : h.path}`.replace(
|
|
2041
2041
|
"//",
|
|
2042
2042
|
"/"
|
|
2043
|
-
), le =
|
|
2043
|
+
), le = bn({
|
|
2044
2044
|
uid: h.type === "INTERNAL" ? h.relatedType ?? "" : "",
|
|
2045
2045
|
locale: I
|
|
2046
|
-
}), ee =
|
|
2046
|
+
}), ee = bo().data?.find(
|
|
2047
2047
|
(W) => h.type === "INTERNAL" ? W.uid === h.relatedType : !1
|
|
2048
2048
|
), _e = ee?.uid.includes("api::"), pe = le.data?.find(
|
|
2049
2049
|
(W) => h.type === "INTERNAL" ? W.documentId === h.related : !1
|
|
2050
|
-
) ?? { documentId: "", id: 0 }, Re = !!pe?.publishedAt, G = k ? "" : st(pe, E.data), R = ee?.info.displayName ?? "", Z = Re ? "success" : "secondary", se = C.canUpdate, U = We(null), Ee = We(null), Ie = We(null), [, ve] =
|
|
2050
|
+
) ?? { documentId: "", id: 0 }, Re = !!pe?.publishedAt, G = k ? "" : st(pe, E.data), R = ee?.info.displayName ?? "", Z = Re ? "success" : "secondary", se = C.canUpdate, U = We(null), Ee = We(null), Ie = We(null), [, ve] = Kn({
|
|
2051
2051
|
accept: `navigation-item_${o}`,
|
|
2052
2052
|
hover(W, Ce) {
|
|
2053
2053
|
const te = W.order ?? 0, Pe = e.order ?? 0;
|
|
2054
2054
|
if (te === Pe)
|
|
2055
2055
|
return;
|
|
2056
|
-
const ct = Ee.current.getBoundingClientRect(), ut = (ct.bottom - ct.top) / 2,
|
|
2057
|
-
if (
|
|
2056
|
+
const ct = Ee.current.getBoundingClientRect(), ut = (ct.bottom - ct.top) / 2, $t = Ce.getClientOffset();
|
|
2057
|
+
if (!$t)
|
|
2058
2058
|
return;
|
|
2059
|
-
const pt =
|
|
2059
|
+
const pt = $t.y - ct.top, Vn = pt > ut ? (e.order ?? 0) + 0.5 : (e.order ?? 0) - 0.5;
|
|
2060
2060
|
te < Pe && pt < ut || te > Pe && pt > ut || p({
|
|
2061
2061
|
item: Se(W, !0),
|
|
2062
|
-
newOrder:
|
|
2062
|
+
newOrder: Vn
|
|
2063
2063
|
});
|
|
2064
2064
|
},
|
|
2065
2065
|
collect: (W) => ({
|
|
2066
2066
|
isOverCurrent: W.isOver({ shallow: !0 })
|
|
2067
2067
|
})
|
|
2068
|
-
}), [{ isDragging:
|
|
2068
|
+
}), [{ isDragging: $n }, Pn, Mn] = Wn({
|
|
2069
2069
|
type: `navigation-item_${o}`,
|
|
2070
2070
|
item: () => e,
|
|
2071
2071
|
collect: (W) => ({
|
|
2072
2072
|
isDragging: W.isDragging()
|
|
2073
2073
|
})
|
|
2074
2074
|
}), $e = {
|
|
2075
|
-
dragRef:
|
|
2075
|
+
dragRef: Pn(U),
|
|
2076
2076
|
dropRef: ve(Ee),
|
|
2077
|
-
previewRef:
|
|
2078
|
-
},
|
|
2077
|
+
previewRef: Mn(Ie)
|
|
2078
|
+
}, kn = (W) => {
|
|
2079
2079
|
const Ce = ee?.kind === "singleType", te = W?.locale ? `?plugins[i18n][locale]=${W?.locale}` : "";
|
|
2080
2080
|
return `/admin/content-manager/${Ce ? "single-types" : "collection-types"}/${ee?.uid}${Ce ? "" : "/" + W?.documentId}${te}`;
|
|
2081
|
-
},
|
|
2081
|
+
}, qn = $(
|
|
2082
2082
|
(W) => {
|
|
2083
2083
|
if (!se)
|
|
2084
2084
|
return;
|
|
@@ -2110,43 +2110,43 @@ const fo = s.object({
|
|
|
2110
2110
|
inline: "center"
|
|
2111
2111
|
});
|
|
2112
2112
|
}, [h.isSearchActive, $e.dropRef.current]);
|
|
2113
|
-
const
|
|
2113
|
+
const Dn = Co({
|
|
2114
2114
|
uid: h.type === "INTERNAL" ? h.relatedType ?? "" : "",
|
|
2115
2115
|
locale: I
|
|
2116
2116
|
});
|
|
2117
2117
|
V(() => {
|
|
2118
|
-
|
|
2118
|
+
Dn();
|
|
2119
2119
|
}, []);
|
|
2120
|
-
const
|
|
2120
|
+
const Lt = Bn();
|
|
2121
2121
|
return /* @__PURE__ */ w(
|
|
2122
|
-
|
|
2122
|
+
Si,
|
|
2123
2123
|
{
|
|
2124
2124
|
level: a,
|
|
2125
2125
|
isLast: t,
|
|
2126
|
-
style: { opacity:
|
|
2126
|
+
style: { opacity: $n ? 0.2 : 1 },
|
|
2127
2127
|
ref: $e ? $e.dropRef : void 0,
|
|
2128
2128
|
children: [
|
|
2129
2129
|
/* @__PURE__ */ w(
|
|
2130
|
-
|
|
2130
|
+
ia,
|
|
2131
2131
|
{
|
|
2132
2132
|
style: {
|
|
2133
2133
|
width: z ? "100%" : "728px",
|
|
2134
2134
|
zIndex: 1,
|
|
2135
2135
|
position: "relative",
|
|
2136
2136
|
overflow: "hidden",
|
|
2137
|
-
backgroundColor: h.isSearchActive ?
|
|
2138
|
-
borderColor: h.isSearchActive ?
|
|
2137
|
+
backgroundColor: h.isSearchActive ? Lt.colors.secondary100 : void 0,
|
|
2138
|
+
borderColor: h.isSearchActive ? Lt.colors.secondary200 : void 0,
|
|
2139
2139
|
transition: "background-color 0.3s ease-in"
|
|
2140
2140
|
},
|
|
2141
2141
|
children: [
|
|
2142
|
-
h.removed && /* @__PURE__ */ n(
|
|
2142
|
+
h.removed && /* @__PURE__ */ n(wi, {}),
|
|
2143
2143
|
/* @__PURE__ */ w("div", { ref: $e.previewRef, children: [
|
|
2144
|
-
/* @__PURE__ */ n(
|
|
2145
|
-
|
|
2144
|
+
/* @__PURE__ */ n(Vt, { children: /* @__PURE__ */ n(
|
|
2145
|
+
Ti,
|
|
2146
2146
|
{
|
|
2147
2147
|
title: e.title ?? "",
|
|
2148
2148
|
path: k ? h.externalPath : Q,
|
|
2149
|
-
icon: k ? /* @__PURE__ */ n(
|
|
2149
|
+
icon: k ? /* @__PURE__ */ n(wa, {}) : F ? /* @__PURE__ */ n(Sa, {}) : /* @__PURE__ */ n(Fa, {}),
|
|
2150
2150
|
onItemRemove: () => d({ ...e, viewParentId: f }),
|
|
2151
2151
|
onItemEdit: () => {
|
|
2152
2152
|
const { __type: W, documentId: Ce } = e.related ?? {};
|
|
@@ -2203,7 +2203,7 @@ const fo = s.object({
|
|
|
2203
2203
|
}
|
|
2204
2204
|
) }),
|
|
2205
2205
|
/* @__PURE__ */ n(tt, {}),
|
|
2206
|
-
/* @__PURE__ */ n(
|
|
2206
|
+
/* @__PURE__ */ n(Vt, { style: { padding: "8px" }, children: /* @__PURE__ */ w(
|
|
2207
2207
|
P,
|
|
2208
2208
|
{
|
|
2209
2209
|
style: { width: "100%" },
|
|
@@ -2213,7 +2213,7 @@ const fo = s.object({
|
|
|
2213
2213
|
children: [
|
|
2214
2214
|
/* @__PURE__ */ w(P, { children: [
|
|
2215
2215
|
!Y(e.items) && /* @__PURE__ */ n(
|
|
2216
|
-
|
|
2216
|
+
pi,
|
|
2217
2217
|
{
|
|
2218
2218
|
toggle: () => u({ ...e, viewParentId: f }),
|
|
2219
2219
|
collapsed: h.collapsed,
|
|
@@ -2221,11 +2221,11 @@ const fo = s.object({
|
|
|
2221
2221
|
}
|
|
2222
2222
|
),
|
|
2223
2223
|
se && M && /* @__PURE__ */ n(
|
|
2224
|
-
|
|
2224
|
+
ra,
|
|
2225
2225
|
{
|
|
2226
2226
|
disabled: h.removed,
|
|
2227
2227
|
startIcon: /* @__PURE__ */ n(wt, {}),
|
|
2228
|
-
onClick:
|
|
2228
|
+
onClick: qn,
|
|
2229
2229
|
size: "S",
|
|
2230
2230
|
children: /* @__PURE__ */ n(
|
|
2231
2231
|
x,
|
|
@@ -2265,7 +2265,7 @@ const fo = s.object({
|
|
|
2265
2265
|
] }) : null,
|
|
2266
2266
|
G && /* @__PURE__ */ w(P, { justifyContent: "center", alignItems: "center", children: [
|
|
2267
2267
|
!z && /* @__PURE__ */ n(
|
|
2268
|
-
|
|
2268
|
+
Sn,
|
|
2269
2269
|
{
|
|
2270
2270
|
borderColor: `${Z}200`,
|
|
2271
2271
|
backgroundColor: `${Z}100`,
|
|
@@ -2301,10 +2301,10 @@ const fo = s.object({
|
|
|
2301
2301
|
}
|
|
2302
2302
|
),
|
|
2303
2303
|
_e && /* @__PURE__ */ n(
|
|
2304
|
-
|
|
2304
|
+
la,
|
|
2305
2305
|
{
|
|
2306
|
-
href:
|
|
2307
|
-
endIcon: /* @__PURE__ */ n(
|
|
2306
|
+
href: kn(pe ?? void 0),
|
|
2307
|
+
endIcon: /* @__PURE__ */ n(Aa, {}),
|
|
2308
2308
|
children: " "
|
|
2309
2309
|
}
|
|
2310
2310
|
)
|
|
@@ -2317,7 +2317,7 @@ const fo = s.object({
|
|
|
2317
2317
|
}
|
|
2318
2318
|
),
|
|
2319
2319
|
re && !h.removed && !h.collapsed && /* @__PURE__ */ n(
|
|
2320
|
-
|
|
2320
|
+
Fn,
|
|
2321
2321
|
{
|
|
2322
2322
|
onItemLevelAdd: r,
|
|
2323
2323
|
onItemEdit: m,
|
|
@@ -2335,7 +2335,7 @@ const fo = s.object({
|
|
|
2335
2335
|
]
|
|
2336
2336
|
}
|
|
2337
2337
|
);
|
|
2338
|
-
},
|
|
2338
|
+
}, Ai = oe.div`
|
|
2339
2339
|
position: relative;
|
|
2340
2340
|
${({ level: e, theme: t }) => e && `
|
|
2341
2341
|
&::before {
|
|
@@ -2352,7 +2352,7 @@ const fo = s.object({
|
|
|
2352
2352
|
border-left: 4px solid ${t.colors.neutral300};
|
|
2353
2353
|
}
|
|
2354
2354
|
`};
|
|
2355
|
-
`,
|
|
2355
|
+
`, Fn = ({
|
|
2356
2356
|
isParentAttachedToMenu: e = !1,
|
|
2357
2357
|
items: t,
|
|
2358
2358
|
level: a = 0,
|
|
@@ -2407,8 +2407,8 @@ const fo = s.object({
|
|
|
2407
2407
|
)
|
|
2408
2408
|
);
|
|
2409
2409
|
};
|
|
2410
|
-
return /* @__PURE__ */ n(
|
|
2411
|
-
|
|
2410
|
+
return /* @__PURE__ */ n(Ai, { "data-level": a, children: t?.map((I, h) => /* @__PURE__ */ n(
|
|
2411
|
+
Fi,
|
|
2412
2412
|
{
|
|
2413
2413
|
item: I,
|
|
2414
2414
|
isLast: h === t.length - 1,
|
|
@@ -2430,7 +2430,7 @@ const fo = s.object({
|
|
|
2430
2430
|
},
|
|
2431
2431
|
`list-item-${I.viewId || h}`
|
|
2432
2432
|
)) });
|
|
2433
|
-
},
|
|
2433
|
+
}, xi = ({
|
|
2434
2434
|
handleCancel: e,
|
|
2435
2435
|
handleSubmit: t,
|
|
2436
2436
|
submitDisabled: a,
|
|
@@ -2441,13 +2441,13 @@ const fo = s.object({
|
|
|
2441
2441
|
/* @__PURE__ */ n(H.Close, { children: /* @__PURE__ */ n(K, { onClick: e, variant: "tertiary", children: i(l("popup.item.form.button.cancel")) }) }),
|
|
2442
2442
|
/* @__PURE__ */ n(K, { onClick: t, disabled: a, children: i(l("popup.item.form.button.save")) })
|
|
2443
2443
|
] }) : null;
|
|
2444
|
-
},
|
|
2444
|
+
}, Ni = [
|
|
2445
2445
|
/^mailto:[\w-\.]+@([\w-]+\.)+[\w-]{2,}$/,
|
|
2446
2446
|
/^tel:(\+\d{1,3})?[\s]?(\(?\d{2,3}\)?)?[\s.-]?(\d{3})?[\s.-]?\d{3,4}$/,
|
|
2447
2447
|
/^#.*/,
|
|
2448
2448
|
/(https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s]{2,}|www\.[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s]{2,}|https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9]+\.[^\s]{2,}|www\.[a-zA-Z0-9]+\.[^\s]{2,})/,
|
|
2449
2449
|
/(\/[a-z0-9\-._~%!$&'()*+,;=:@]+)+\/?/
|
|
2450
|
-
],
|
|
2450
|
+
], Rt = ({ additionalFields: e }) => g.object({
|
|
2451
2451
|
title: g.string(),
|
|
2452
2452
|
autoSync: g.boolean().optional(),
|
|
2453
2453
|
removed: g.boolean().optional(),
|
|
@@ -2487,10 +2487,10 @@ const fo = s.object({
|
|
|
2487
2487
|
return t;
|
|
2488
2488
|
}, {})
|
|
2489
2489
|
)
|
|
2490
|
-
}),
|
|
2490
|
+
}), Ri = ({
|
|
2491
2491
|
additionalFields: e,
|
|
2492
2492
|
isSingleSelected: t
|
|
2493
|
-
}) =>
|
|
2493
|
+
}) => Rt({
|
|
2494
2494
|
additionalFields: e
|
|
2495
2495
|
}).extend({
|
|
2496
2496
|
type: g.literal("INTERNAL"),
|
|
@@ -2498,30 +2498,30 @@ const fo = s.object({
|
|
|
2498
2498
|
externalPath: g.string().nullish(),
|
|
2499
2499
|
relatedType: g.string(),
|
|
2500
2500
|
related: t ? g.string().optional() : g.string()
|
|
2501
|
-
}),
|
|
2501
|
+
}), Ei = ({
|
|
2502
2502
|
isSingleSelected: e,
|
|
2503
2503
|
additionalFields: t
|
|
2504
|
-
}) =>
|
|
2504
|
+
}) => Rt({
|
|
2505
2505
|
additionalFields: t
|
|
2506
2506
|
}).extend({
|
|
2507
2507
|
type: g.literal("EXTERNAL"),
|
|
2508
2508
|
path: g.string().or(g.null()).optional(),
|
|
2509
|
-
externalPath: g.string().min(1).refine((a) =>
|
|
2509
|
+
externalPath: g.string().min(1).refine((a) => Ni.some((o) => o.test(a))),
|
|
2510
2510
|
relatedType: g.string().optional(),
|
|
2511
2511
|
related: g.string().optional()
|
|
2512
|
-
}),
|
|
2512
|
+
}), Li = ({
|
|
2513
2513
|
isSingleSelected: e,
|
|
2514
2514
|
additionalFields: t
|
|
2515
|
-
}) =>
|
|
2515
|
+
}) => Rt({
|
|
2516
2516
|
additionalFields: t
|
|
2517
2517
|
}).extend({
|
|
2518
2518
|
type: g.literal("WRAPPER"),
|
|
2519
2519
|
path: g.string().or(g.null()).optional()
|
|
2520
|
-
}),
|
|
2521
|
-
Li(e),
|
|
2520
|
+
}), $i = (e) => g.discriminatedUnion("type", [
|
|
2522
2521
|
Ei(e),
|
|
2523
|
-
|
|
2524
|
-
|
|
2522
|
+
Ri(e),
|
|
2523
|
+
Li(e)
|
|
2524
|
+
]), Xt = {
|
|
2525
2525
|
autoSync: !0,
|
|
2526
2526
|
type: "INTERNAL",
|
|
2527
2527
|
relatedType: "",
|
|
@@ -2533,14 +2533,14 @@ const fo = s.object({
|
|
|
2533
2533
|
audience: [],
|
|
2534
2534
|
updated: !1,
|
|
2535
2535
|
uiRouterKey: ""
|
|
2536
|
-
},
|
|
2536
|
+
}, Pi = () => {
|
|
2537
2537
|
const e = j(), t = B(e);
|
|
2538
2538
|
return ge({
|
|
2539
2539
|
mutationFn(a) {
|
|
2540
2540
|
return t.slugify(a);
|
|
2541
2541
|
}
|
|
2542
2542
|
});
|
|
2543
|
-
},
|
|
2543
|
+
}, Mi = () => {
|
|
2544
2544
|
const e = ne();
|
|
2545
2545
|
return { encodePayload: (o) => ({
|
|
2546
2546
|
...o,
|
|
@@ -2550,7 +2550,7 @@ const fo = s.object({
|
|
|
2550
2550
|
let m = o.additionalFields[d];
|
|
2551
2551
|
switch (c) {
|
|
2552
2552
|
case "boolean":
|
|
2553
|
-
m =
|
|
2553
|
+
m = Yn(m) ? `${m}` : m;
|
|
2554
2554
|
break;
|
|
2555
2555
|
case "media":
|
|
2556
2556
|
m = m && JSON.stringify(m);
|
|
@@ -2585,7 +2585,7 @@ const fo = s.object({
|
|
|
2585
2585
|
return i;
|
|
2586
2586
|
}, {}) || {}
|
|
2587
2587
|
}) };
|
|
2588
|
-
},
|
|
2588
|
+
}, ki = () => {
|
|
2589
2589
|
const { formatMessage: e } = A(), [t, a] = N(
|
|
2590
2590
|
{}
|
|
2591
2591
|
), [o, i] = N(), r = (p, u, v) => {
|
|
@@ -2625,7 +2625,7 @@ const fo = s.object({
|
|
|
2625
2625
|
updated: !0
|
|
2626
2626
|
})
|
|
2627
2627
|
};
|
|
2628
|
-
},
|
|
2628
|
+
}, qi = async ({
|
|
2629
2629
|
slugify: e,
|
|
2630
2630
|
title: t,
|
|
2631
2631
|
config: a,
|
|
@@ -2648,7 +2648,7 @@ const fo = s.object({
|
|
|
2648
2648
|
);
|
|
2649
2649
|
return d ? await e(d) : void 0;
|
|
2650
2650
|
}
|
|
2651
|
-
},
|
|
2651
|
+
}, Di = ({
|
|
2652
2652
|
currentType: e,
|
|
2653
2653
|
config: t,
|
|
2654
2654
|
contentTypeItems: a,
|
|
@@ -2664,7 +2664,7 @@ const fo = s.object({
|
|
|
2664
2664
|
return d.map((p) => c?.[p] ?? "").filter((p) => !!p.toString().trim())[0] ?? "";
|
|
2665
2665
|
}
|
|
2666
2666
|
return "";
|
|
2667
|
-
},
|
|
2667
|
+
}, Vi = ({
|
|
2668
2668
|
currentPath: e,
|
|
2669
2669
|
isExternal: t,
|
|
2670
2670
|
current: a,
|
|
@@ -2676,7 +2676,7 @@ const fo = s.object({
|
|
|
2676
2676
|
isSingleSelected: m
|
|
2677
2677
|
}) => {
|
|
2678
2678
|
if (!t) {
|
|
2679
|
-
const p = Y(e) || e === "/" ?
|
|
2679
|
+
const p = Y(e) || e === "/" ? Di({
|
|
2680
2680
|
currentType: o,
|
|
2681
2681
|
config: i,
|
|
2682
2682
|
contentTypeItems: r,
|
|
@@ -2686,7 +2686,7 @@ const fo = s.object({
|
|
|
2686
2686
|
}) : e || "";
|
|
2687
2687
|
return `${a.levelPath !== "/" ? `${a.levelPath}` : ""}/${p}`.replace("//", "/");
|
|
2688
2688
|
}
|
|
2689
|
-
},
|
|
2689
|
+
}, An = tn({
|
|
2690
2690
|
values: {},
|
|
2691
2691
|
onChange: () => null,
|
|
2692
2692
|
handleChange: () => null,
|
|
@@ -2694,7 +2694,7 @@ const fo = s.object({
|
|
|
2694
2694
|
setFormValueItem: () => null,
|
|
2695
2695
|
canUpdate: void 0,
|
|
2696
2696
|
isLoading: !0
|
|
2697
|
-
}), he = () =>
|
|
2697
|
+
}), he = () => nn(An), ji = () => {
|
|
2698
2698
|
const { formatMessage: e } = A(), t = ne(), { values: a, onChange: o, handleChange: i, renderError: r, canUpdate: d } = he(), m = (t.data?.contentTypes.length ? ["INTERNAL", "EXTERNAL", "WRAPPER"] : ["EXTERNAL", "WRAPPER"]).map((p) => ({
|
|
2699
2699
|
key: p,
|
|
2700
2700
|
value: p,
|
|
@@ -2720,7 +2720,7 @@ const fo = s.object({
|
|
|
2720
2720
|
)
|
|
2721
2721
|
}
|
|
2722
2722
|
) }, "title");
|
|
2723
|
-
},
|
|
2723
|
+
}, Bi = ({ current: e }) => {
|
|
2724
2724
|
const { formatMessage: t } = A(), a = ne(), { values: o, onChange: i, handleChange: r, renderError: d, canUpdate: c } = he();
|
|
2725
2725
|
return /* @__PURE__ */ n(S.Item, { alignItems: "flex-start", m: 4, xs: 12, children: /* @__PURE__ */ n(
|
|
2726
2726
|
L,
|
|
@@ -2746,16 +2746,16 @@ const fo = s.object({
|
|
|
2746
2746
|
)
|
|
2747
2747
|
}
|
|
2748
2748
|
) }, "menuAttached");
|
|
2749
|
-
},
|
|
2749
|
+
}, Oi = oe(S.Item)`
|
|
2750
2750
|
order: ${({ orderInitial: e }) => e ?? "unset"};
|
|
2751
2751
|
|
|
2752
2752
|
@media (min-width: 768px) {
|
|
2753
2753
|
order: ${({ orderMedium: e }) => e ?? "unset"};
|
|
2754
2754
|
}
|
|
2755
|
-
`,
|
|
2755
|
+
`, zi = () => {
|
|
2756
2756
|
const { formatMessage: e } = A(), { values: t, onChange: a, handleChange: o, renderError: i, canUpdate: r } = he();
|
|
2757
2757
|
return /* @__PURE__ */ n(
|
|
2758
|
-
|
|
2758
|
+
Oi,
|
|
2759
2759
|
{
|
|
2760
2760
|
alignItems: "flex-start",
|
|
2761
2761
|
col: t.type === "INTERNAL" ? 8 : 12,
|
|
@@ -2785,16 +2785,16 @@ const fo = s.object({
|
|
|
2785
2785
|
},
|
|
2786
2786
|
"title"
|
|
2787
2787
|
);
|
|
2788
|
-
},
|
|
2788
|
+
}, _i = oe(S.Item)`
|
|
2789
2789
|
order: ${({ orderInitial: e }) => e ?? "unset"};
|
|
2790
2790
|
|
|
2791
2791
|
@media (min-width: 768px) {
|
|
2792
2792
|
order: ${({ orderMedium: e }) => e ?? "unset"};
|
|
2793
2793
|
}
|
|
2794
|
-
`,
|
|
2794
|
+
`, Qi = () => {
|
|
2795
2795
|
const { formatMessage: e } = A(), { values: t, onChange: a, handleChange: o, renderError: i, canUpdate: r } = he();
|
|
2796
2796
|
return /* @__PURE__ */ n(
|
|
2797
|
-
|
|
2797
|
+
_i,
|
|
2798
2798
|
{
|
|
2799
2799
|
alignItems: "flex-start",
|
|
2800
2800
|
col: 4,
|
|
@@ -2824,7 +2824,7 @@ const fo = s.object({
|
|
|
2824
2824
|
},
|
|
2825
2825
|
"autoSync"
|
|
2826
2826
|
);
|
|
2827
|
-
},
|
|
2827
|
+
}, Ui = ({
|
|
2828
2828
|
contentTypeItems: e,
|
|
2829
2829
|
current: t,
|
|
2830
2830
|
isSingleSelected: a
|
|
@@ -2832,7 +2832,7 @@ const fo = s.object({
|
|
|
2832
2832
|
const { formatMessage: o } = A(), i = ne(), { values: r, onChange: d, handleChange: c, renderError: m, canUpdate: p } = he(), u = r.type === "EXTERNAL" ? "externalPath" : "path", v = r.type === "INTERNAL" ? r : {
|
|
2833
2833
|
related: void 0,
|
|
2834
2834
|
relatedType: void 0
|
|
2835
|
-
}, b =
|
|
2835
|
+
}, b = Vi({
|
|
2836
2836
|
currentPath: r.path,
|
|
2837
2837
|
isExternal: r.type === "EXTERNAL",
|
|
2838
2838
|
current: t,
|
|
@@ -2872,7 +2872,7 @@ const fo = s.object({
|
|
|
2872
2872
|
)
|
|
2873
2873
|
}
|
|
2874
2874
|
) }, "title");
|
|
2875
|
-
},
|
|
2875
|
+
}, Ki = "", Wi = {
|
|
2876
2876
|
type: "media",
|
|
2877
2877
|
required: !1,
|
|
2878
2878
|
attribute: {
|
|
@@ -2884,7 +2884,7 @@ const fo = s.object({
|
|
|
2884
2884
|
localized: !1
|
|
2885
2885
|
}
|
|
2886
2886
|
}
|
|
2887
|
-
},
|
|
2887
|
+
}, Hi = ({
|
|
2888
2888
|
name: e,
|
|
2889
2889
|
field: t,
|
|
2890
2890
|
isLoading: a,
|
|
@@ -2893,7 +2893,7 @@ const fo = s.object({
|
|
|
2893
2893
|
value: r,
|
|
2894
2894
|
disabled: d
|
|
2895
2895
|
}) => {
|
|
2896
|
-
const { toggleNotification: c } = Oe(), { formatMessage: m } = A(), u =
|
|
2896
|
+
const { toggleNotification: c } = Oe(), { formatMessage: m } = A(), u = Qn("AdditionalFieldInput", (b) => b.fields).media, v = X(
|
|
2897
2897
|
() => ({
|
|
2898
2898
|
id: t.name,
|
|
2899
2899
|
name: e || t.name,
|
|
@@ -2904,7 +2904,7 @@ const fo = s.object({
|
|
|
2904
2904
|
);
|
|
2905
2905
|
switch (V(() => {
|
|
2906
2906
|
if (t.type === "media") {
|
|
2907
|
-
const b =
|
|
2907
|
+
const b = ea(r) ? void 0 : r;
|
|
2908
2908
|
i(v.name, b, o);
|
|
2909
2909
|
}
|
|
2910
2910
|
}, [r]), t.type) {
|
|
@@ -2922,11 +2922,11 @@ const fo = s.object({
|
|
|
2922
2922
|
);
|
|
2923
2923
|
case "string":
|
|
2924
2924
|
return /* @__PURE__ */ n(
|
|
2925
|
-
|
|
2925
|
+
sa,
|
|
2926
2926
|
{
|
|
2927
2927
|
...v,
|
|
2928
2928
|
onChange: (b, C) => i(b, C, o),
|
|
2929
|
-
value: r ||
|
|
2929
|
+
value: r || Ki
|
|
2930
2930
|
}
|
|
2931
2931
|
);
|
|
2932
2932
|
case "select":
|
|
@@ -2952,14 +2952,14 @@ const fo = s.object({
|
|
|
2952
2952
|
}
|
|
2953
2953
|
);
|
|
2954
2954
|
case "media":
|
|
2955
|
-
return /* @__PURE__ */ n(u, { ...v, ...
|
|
2955
|
+
return /* @__PURE__ */ n(u, { ...v, ...Wi, value: r });
|
|
2956
2956
|
default:
|
|
2957
2957
|
throw c({
|
|
2958
2958
|
type: "warning",
|
|
2959
2959
|
message: m(l("notification.error.customField.type"))
|
|
2960
2960
|
}), new Error("Type of custom field is unsupported");
|
|
2961
2961
|
}
|
|
2962
|
-
},
|
|
2962
|
+
}, Xi = ({ additionalField: e }) => {
|
|
2963
2963
|
const { canUpdate: t, isLoading: a, onChange: o, handleChange: i, renderError: r, values: d } = he();
|
|
2964
2964
|
return /* @__PURE__ */ n(S.Item, { alignItems: "flex-start", s: 6, xs: 12, children: /* @__PURE__ */ n(
|
|
2965
2965
|
L,
|
|
@@ -2970,7 +2970,7 @@ const fo = s.object({
|
|
|
2970
2970
|
required: e.required,
|
|
2971
2971
|
error: r(`additionalFields.${e.name}`),
|
|
2972
2972
|
children: /* @__PURE__ */ n(
|
|
2973
|
-
|
|
2973
|
+
Hi,
|
|
2974
2974
|
{
|
|
2975
2975
|
name: `additionalFields.${e.name}`,
|
|
2976
2976
|
field: e,
|
|
@@ -2983,7 +2983,7 @@ const fo = s.object({
|
|
|
2983
2983
|
)
|
|
2984
2984
|
}
|
|
2985
2985
|
) }, e.name);
|
|
2986
|
-
},
|
|
2986
|
+
}, Gi = () => {
|
|
2987
2987
|
const { formatMessage: e } = A(), a = ne().data?.availableAudience ?? [], o = X(
|
|
2988
2988
|
() => a.map((p) => ({
|
|
2989
2989
|
value: p.documentId ?? 0,
|
|
@@ -3010,7 +3010,7 @@ const fo = s.object({
|
|
|
3010
3010
|
)
|
|
3011
3011
|
}
|
|
3012
3012
|
) }, "audience");
|
|
3013
|
-
},
|
|
3013
|
+
}, Zi = () => {
|
|
3014
3014
|
const e = ne();
|
|
3015
3015
|
if (!e.data?.additionalFields || Y(e.data.additionalFields))
|
|
3016
3016
|
return null;
|
|
@@ -3020,19 +3020,19 @@ const fo = s.object({
|
|
|
3020
3020
|
return /* @__PURE__ */ w(ie, { children: [
|
|
3021
3021
|
/* @__PURE__ */ n(S.Root, { gap: 5, paddingTop: 1, paddingBottom: 1, children: /* @__PURE__ */ n(S.Item, { col: 12, children: /* @__PURE__ */ n(tt, { width: "100%" }) }) }),
|
|
3022
3022
|
/* @__PURE__ */ w(S.Root, { gap: 5, paddingTop: 1, paddingBottom: 1, children: [
|
|
3023
|
-
t.map((o) => /* @__PURE__ */ n(
|
|
3024
|
-
a && /* @__PURE__ */ n(
|
|
3023
|
+
t.map((o) => /* @__PURE__ */ n(Xi, { additionalField: o }, o.name)),
|
|
3024
|
+
a && /* @__PURE__ */ n(Gi, {})
|
|
3025
3025
|
] }),
|
|
3026
3026
|
/* @__PURE__ */ n(S.Root, { gap: 5, paddingTop: 1, paddingBottom: 1, children: /* @__PURE__ */ n(S.Item, { col: 12, children: /* @__PURE__ */ n(tt, { width: "100%" }) }) })
|
|
3027
3027
|
] });
|
|
3028
|
-
},
|
|
3028
|
+
}, Ji = ({
|
|
3029
3029
|
availableLocale: e,
|
|
3030
3030
|
current: t,
|
|
3031
3031
|
currentNavigation: a,
|
|
3032
3032
|
setIsLoading: o,
|
|
3033
3033
|
setFormValuesItems: i
|
|
3034
3034
|
}) => {
|
|
3035
|
-
const { formatMessage: r } = A(), [d, c] = N(), m =
|
|
3035
|
+
const { formatMessage: r } = A(), [d, c] = N(), m = Ao(), p = xt(), { canUpdate: u, isLoading: v } = he(), b = X(
|
|
3036
3036
|
() => e.map((y, f) => ({
|
|
3037
3037
|
key: `${y}-${f}`,
|
|
3038
3038
|
value: y,
|
|
@@ -3106,7 +3106,7 @@ const fo = s.object({
|
|
|
3106
3106
|
) }) })
|
|
3107
3107
|
] })
|
|
3108
3108
|
] }, "title") });
|
|
3109
|
-
},
|
|
3109
|
+
}, Gt = (e, t) => t ? e.find((a) => a.value === t)?.label ?? "" : "", xn = ({
|
|
3110
3110
|
name: e,
|
|
3111
3111
|
onClear: t,
|
|
3112
3112
|
onChange: a,
|
|
@@ -3114,11 +3114,11 @@ const fo = s.object({
|
|
|
3114
3114
|
value: i,
|
|
3115
3115
|
disabled: r
|
|
3116
3116
|
}) => {
|
|
3117
|
-
const [d, c] = N(
|
|
3117
|
+
const [d, c] = N(Gt(o, i));
|
|
3118
3118
|
return V(() => {
|
|
3119
|
-
c(
|
|
3119
|
+
c(Gt(o, i));
|
|
3120
3120
|
}, [i, o]), /* @__PURE__ */ n(
|
|
3121
|
-
|
|
3121
|
+
pn,
|
|
3122
3122
|
{
|
|
3123
3123
|
name: e,
|
|
3124
3124
|
autocomplete: "list",
|
|
@@ -3130,10 +3130,10 @@ const fo = s.object({
|
|
|
3130
3130
|
options: o,
|
|
3131
3131
|
disabled: r,
|
|
3132
3132
|
width: "100%",
|
|
3133
|
-
children: o.map(({ key: m, label: p, value: u }) => /* @__PURE__ */ n(
|
|
3133
|
+
children: o.map(({ key: m, label: p, value: u }) => /* @__PURE__ */ n(da, { value: u, children: p }, m))
|
|
3134
3134
|
}
|
|
3135
3135
|
);
|
|
3136
|
-
},
|
|
3136
|
+
}, Yi = ({
|
|
3137
3137
|
contentTypeItems: e,
|
|
3138
3138
|
current: t,
|
|
3139
3139
|
currentRelatedType: a,
|
|
@@ -3180,7 +3180,7 @@ const fo = s.object({
|
|
|
3180
3180
|
l("popup.item.form.relatedType.empty", "There are no more content types")
|
|
3181
3181
|
) : void 0,
|
|
3182
3182
|
children: /* @__PURE__ */ n(
|
|
3183
|
-
|
|
3183
|
+
xn,
|
|
3184
3184
|
{
|
|
3185
3185
|
name: "relatedType",
|
|
3186
3186
|
onClear: () => i({
|
|
@@ -3200,7 +3200,7 @@ const fo = s.object({
|
|
|
3200
3200
|
)
|
|
3201
3201
|
}
|
|
3202
3202
|
) });
|
|
3203
|
-
},
|
|
3203
|
+
}, er = (e, t, a) => {
|
|
3204
3204
|
const o = ne();
|
|
3205
3205
|
V(() => {
|
|
3206
3206
|
if (!e.autoSync || !e.related || !e.relatedType || !o.data)
|
|
@@ -3214,7 +3214,7 @@ const fo = s.object({
|
|
|
3214
3214
|
title: m
|
|
3215
3215
|
});
|
|
3216
3216
|
}, [e.autoSync, e.related, e.relatedType, t, o.data]);
|
|
3217
|
-
},
|
|
3217
|
+
}, tr = ({
|
|
3218
3218
|
appendLabelPublicationStatus: e,
|
|
3219
3219
|
contentTypeItems: t,
|
|
3220
3220
|
isSingleSelected: a,
|
|
@@ -3242,7 +3242,7 @@ const fo = s.object({
|
|
|
3242
3242
|
}) ?? [],
|
|
3243
3243
|
(y) => y.label
|
|
3244
3244
|
), C = Y(b);
|
|
3245
|
-
return
|
|
3245
|
+
return er(o, t, i), !o.relatedType || a ? null : /* @__PURE__ */ n(S.Item, { alignItems: "flex-start", m: 6, xs: 12, children: /* @__PURE__ */ n(
|
|
3246
3246
|
L,
|
|
3247
3247
|
{
|
|
3248
3248
|
name: "related",
|
|
@@ -3253,7 +3253,7 @@ const fo = s.object({
|
|
|
3253
3253
|
{ contentTypeName: o.relatedType }
|
|
3254
3254
|
) : void 0,
|
|
3255
3255
|
children: /* @__PURE__ */ n(
|
|
3256
|
-
|
|
3256
|
+
xn,
|
|
3257
3257
|
{
|
|
3258
3258
|
name: "related",
|
|
3259
3259
|
onClear: () => p("related", void 0, u),
|
|
@@ -3265,13 +3265,13 @@ const fo = s.object({
|
|
|
3265
3265
|
)
|
|
3266
3266
|
}
|
|
3267
3267
|
) });
|
|
3268
|
-
},
|
|
3268
|
+
}, nr = [], ar = ({
|
|
3269
3269
|
availableLocale: e,
|
|
3270
3270
|
isLoading: t,
|
|
3271
|
-
current: a =
|
|
3271
|
+
current: a = Xt,
|
|
3272
3272
|
onSubmit: o,
|
|
3273
3273
|
onCancel: i,
|
|
3274
|
-
appendLabelPublicationStatus: r =
|
|
3274
|
+
appendLabelPublicationStatus: r = or,
|
|
3275
3275
|
locale: d,
|
|
3276
3276
|
permissions: c = {},
|
|
3277
3277
|
currentNavigation: m
|
|
@@ -3284,7 +3284,7 @@ const fo = s.object({
|
|
|
3284
3284
|
setFormValue: F,
|
|
3285
3285
|
setFormValueItem: M,
|
|
3286
3286
|
setFormValuesItems: _
|
|
3287
|
-
} =
|
|
3287
|
+
} = ki(), { encodePayload: re, decodePayload: Q } = Mi(), le = T.type === "INTERNAL", fe = le && !T.related && !C || u, ee = bn({
|
|
3288
3288
|
uid: le ? T.relatedType : "",
|
|
3289
3289
|
locale: d
|
|
3290
3290
|
}), _e = async (G, R) => {
|
|
@@ -3293,14 +3293,14 @@ const fo = s.object({
|
|
|
3293
3293
|
success: se,
|
|
3294
3294
|
data: U,
|
|
3295
3295
|
error: Ee
|
|
3296
|
-
} =
|
|
3296
|
+
} = $i({
|
|
3297
3297
|
isSingleSelected: C,
|
|
3298
|
-
additionalFields: f.data?.additionalFields ??
|
|
3298
|
+
additionalFields: f.data?.additionalFields ?? nr
|
|
3299
3299
|
}).safeParse(Z);
|
|
3300
3300
|
if (se) {
|
|
3301
3301
|
const Ie = U.title.trim() ? U.title.trim() : U.type === "INTERNAL" ? Re(U?.related?.toString(), U.relatedType, C) : "";
|
|
3302
3302
|
v(!0);
|
|
3303
|
-
const ve = await
|
|
3303
|
+
const ve = await qi(
|
|
3304
3304
|
U.type === "INTERNAL" ? {
|
|
3305
3305
|
slugify: pe.mutateAsync,
|
|
3306
3306
|
title: Ie,
|
|
@@ -3332,7 +3332,7 @@ const fo = s.object({
|
|
|
3332
3332
|
[ve.path.join(".")]: ve.message
|
|
3333
3333
|
}), {})
|
|
3334
3334
|
);
|
|
3335
|
-
}, pe =
|
|
3335
|
+
}, pe = Pi(), Re = $(
|
|
3336
3336
|
(G, R, Z) => {
|
|
3337
3337
|
let se;
|
|
3338
3338
|
if (Z) {
|
|
@@ -3354,13 +3354,13 @@ const fo = s.object({
|
|
|
3354
3354
|
return V(() => {
|
|
3355
3355
|
F(
|
|
3356
3356
|
Q({
|
|
3357
|
-
...
|
|
3357
|
+
...Xt,
|
|
3358
3358
|
...a
|
|
3359
3359
|
})
|
|
3360
3360
|
);
|
|
3361
3361
|
}, [a]), /* @__PURE__ */ w(ie, { children: [
|
|
3362
3362
|
/* @__PURE__ */ n(H.Body, { children: /* @__PURE__ */ n(at, { width: "auto", height: "auto", method: "POST", initialValues: T, children: ({ values: G, onChange: R }) => /* @__PURE__ */ w(
|
|
3363
|
-
|
|
3363
|
+
An.Provider,
|
|
3364
3364
|
{
|
|
3365
3365
|
value: {
|
|
3366
3366
|
values: G,
|
|
@@ -3373,15 +3373,15 @@ const fo = s.object({
|
|
|
3373
3373
|
},
|
|
3374
3374
|
children: [
|
|
3375
3375
|
/* @__PURE__ */ w(S.Root, { gap: 5, paddingBottom: 1, children: [
|
|
3376
|
-
/* @__PURE__ */ n(
|
|
3377
|
-
/* @__PURE__ */ n(
|
|
3376
|
+
/* @__PURE__ */ n(ji, {}),
|
|
3377
|
+
/* @__PURE__ */ n(Bi, { current: a })
|
|
3378
3378
|
] }),
|
|
3379
3379
|
/* @__PURE__ */ w(S.Root, { gap: 5, paddingTop: 1, paddingBottom: 1, children: [
|
|
3380
|
-
/* @__PURE__ */ n(
|
|
3381
|
-
G.type === "INTERNAL" && /* @__PURE__ */ n(
|
|
3380
|
+
/* @__PURE__ */ n(zi, {}),
|
|
3381
|
+
G.type === "INTERNAL" && /* @__PURE__ */ n(Qi, {})
|
|
3382
3382
|
] }),
|
|
3383
3383
|
/* @__PURE__ */ n(S.Root, { gap: 5, paddingTop: 1, paddingBottom: 1, children: /* @__PURE__ */ n(
|
|
3384
|
-
|
|
3384
|
+
Ui,
|
|
3385
3385
|
{
|
|
3386
3386
|
contentTypeItems: ee.data,
|
|
3387
3387
|
current: a,
|
|
@@ -3390,7 +3390,7 @@ const fo = s.object({
|
|
|
3390
3390
|
) }),
|
|
3391
3391
|
G.type === "INTERNAL" && /* @__PURE__ */ w(S.Root, { gap: 5, paddingTop: 1, paddingBottom: 1, children: [
|
|
3392
3392
|
/* @__PURE__ */ n(
|
|
3393
|
-
|
|
3393
|
+
Yi,
|
|
3394
3394
|
{
|
|
3395
3395
|
contentTypeItems: ee.data,
|
|
3396
3396
|
current: a,
|
|
@@ -3401,7 +3401,7 @@ const fo = s.object({
|
|
|
3401
3401
|
}
|
|
3402
3402
|
),
|
|
3403
3403
|
/* @__PURE__ */ n(
|
|
3404
|
-
|
|
3404
|
+
tr,
|
|
3405
3405
|
{
|
|
3406
3406
|
appendLabelPublicationStatus: r,
|
|
3407
3407
|
contentTypeItems: ee.data,
|
|
@@ -3411,10 +3411,10 @@ const fo = s.object({
|
|
|
3411
3411
|
}
|
|
3412
3412
|
)
|
|
3413
3413
|
] }),
|
|
3414
|
-
G.type !== "INTERNAL" && /* @__PURE__ */ n(S.Root, { display: "none", children: /* @__PURE__ */ n(D, { display: "none", children: /* @__PURE__ */ n(
|
|
3415
|
-
/* @__PURE__ */ n(
|
|
3414
|
+
G.type !== "INTERNAL" && /* @__PURE__ */ n(S.Root, { display: "none", children: /* @__PURE__ */ n(D, { display: "none", children: /* @__PURE__ */ n(pn, {}) }) }),
|
|
3415
|
+
/* @__PURE__ */ n(Zi, {}),
|
|
3416
3416
|
/* @__PURE__ */ n(
|
|
3417
|
-
|
|
3417
|
+
Ji,
|
|
3418
3418
|
{
|
|
3419
3419
|
availableLocale: e,
|
|
3420
3420
|
current: a,
|
|
@@ -3428,7 +3428,7 @@ const fo = s.object({
|
|
|
3428
3428
|
}
|
|
3429
3429
|
) }) }),
|
|
3430
3430
|
/* @__PURE__ */ n(
|
|
3431
|
-
|
|
3431
|
+
xi,
|
|
3432
3432
|
{
|
|
3433
3433
|
handleSubmit: (G) => _e(G, T),
|
|
3434
3434
|
handleCancel: i,
|
|
@@ -3437,7 +3437,7 @@ const fo = s.object({
|
|
|
3437
3437
|
}
|
|
3438
3438
|
)
|
|
3439
3439
|
] });
|
|
3440
|
-
},
|
|
3440
|
+
}, or = () => "", ir = ({
|
|
3441
3441
|
isNewItem: e,
|
|
3442
3442
|
canUpdate: t
|
|
3443
3443
|
}) => {
|
|
@@ -3454,7 +3454,7 @@ const fo = s.object({
|
|
|
3454
3454
|
children: a(l(`popup.item.header.${o}`))
|
|
3455
3455
|
}
|
|
3456
3456
|
) });
|
|
3457
|
-
},
|
|
3457
|
+
}, rr = ({
|
|
3458
3458
|
availableLocale: e,
|
|
3459
3459
|
isOpen: t,
|
|
3460
3460
|
isLoading: a,
|
|
@@ -3467,7 +3467,7 @@ const fo = s.object({
|
|
|
3467
3467
|
}) => {
|
|
3468
3468
|
const { formatMessage: p } = A(), u = (C) => {
|
|
3469
3469
|
i(C);
|
|
3470
|
-
}, v = (C, y, f) => `${
|
|
3470
|
+
}, v = (C, y, f) => `${Vo({
|
|
3471
3471
|
relatedRef: y,
|
|
3472
3472
|
type: y.isSingle ? "INTERNAL" : y.type,
|
|
3473
3473
|
isCollection: f
|
|
@@ -3487,9 +3487,9 @@ const fo = s.object({
|
|
|
3487
3487
|
},
|
|
3488
3488
|
open: t,
|
|
3489
3489
|
children: /* @__PURE__ */ w(H.Content, { children: [
|
|
3490
|
-
/* @__PURE__ */ n(
|
|
3490
|
+
/* @__PURE__ */ n(ir, { isNewItem: !b, canUpdate: c?.canUpdate }),
|
|
3491
3491
|
/* @__PURE__ */ n(
|
|
3492
|
-
|
|
3492
|
+
ar,
|
|
3493
3493
|
{
|
|
3494
3494
|
availableLocale: e,
|
|
3495
3495
|
current: o,
|
|
@@ -3505,7 +3505,7 @@ const fo = s.object({
|
|
|
3505
3505
|
] })
|
|
3506
3506
|
}
|
|
3507
3507
|
);
|
|
3508
|
-
}, ft = 0,
|
|
3508
|
+
}, ft = 0, lr = ({ value: e, setValue: t, initialIndex: a = ft }) => {
|
|
3509
3509
|
const [o, i] = N(e), [r, d] = N(e), [c, m] = N(a), { isSmallMobile: p } = Ze(), [u, v] = N(!!e || p), b = We(null), { formatMessage: C } = A();
|
|
3510
3510
|
V(() => {
|
|
3511
3511
|
u && setTimeout(() => {
|
|
@@ -3534,7 +3534,7 @@ const fo = s.object({
|
|
|
3534
3534
|
}, [i, v]);
|
|
3535
3535
|
return u ? /* @__PURE__ */ w("div", { ref: b, style: { width: "100%" }, children: [
|
|
3536
3536
|
/* @__PURE__ */ n(
|
|
3537
|
-
|
|
3537
|
+
ca,
|
|
3538
3538
|
{
|
|
3539
3539
|
name: "searchbar",
|
|
3540
3540
|
onClear: I,
|
|
@@ -3561,8 +3561,8 @@ const fo = s.object({
|
|
|
3561
3561
|
)
|
|
3562
3562
|
}
|
|
3563
3563
|
)
|
|
3564
|
-
] }) : /* @__PURE__ */ n(ye, { children: /* @__PURE__ */ n(
|
|
3565
|
-
},
|
|
3564
|
+
] }) : /* @__PURE__ */ n(ye, { children: /* @__PURE__ */ n(xa, {}), onClick: () => v(!u) });
|
|
3565
|
+
}, sr = ({
|
|
3566
3566
|
currentNavigation: e,
|
|
3567
3567
|
setCurrentNavigation: t,
|
|
3568
3568
|
canUpdate: a,
|
|
@@ -3623,7 +3623,7 @@ const fo = s.object({
|
|
|
3623
3623
|
i(l(p)),
|
|
3624
3624
|
" "
|
|
3625
3625
|
] }) }, b));
|
|
3626
|
-
},
|
|
3626
|
+
}, dr = ({
|
|
3627
3627
|
canUpdate: e,
|
|
3628
3628
|
addNewNavigationItem: t,
|
|
3629
3629
|
availableLocale: a,
|
|
@@ -3631,12 +3631,12 @@ const fo = s.object({
|
|
|
3631
3631
|
currentNavigation: i,
|
|
3632
3632
|
setCurrentNavigation: r
|
|
3633
3633
|
}) => {
|
|
3634
|
-
const d =
|
|
3634
|
+
const d = xo(), { formatMessage: c } = A(), m = vo(), p = Io(), {
|
|
3635
3635
|
i18nCopyItemsModal: u,
|
|
3636
3636
|
i18nCopySourceLocale: v,
|
|
3637
3637
|
setI18nCopyModalOpened: b,
|
|
3638
3638
|
setI18nCopySourceLocale: C
|
|
3639
|
-
} =
|
|
3639
|
+
} = Lo(
|
|
3640
3640
|
$(
|
|
3641
3641
|
(f) => {
|
|
3642
3642
|
const I = o.find(
|
|
@@ -3669,7 +3669,7 @@ const fo = s.object({
|
|
|
3669
3669
|
K,
|
|
3670
3670
|
{
|
|
3671
3671
|
variant: "secondary",
|
|
3672
|
-
startIcon: /* @__PURE__ */ n(
|
|
3672
|
+
startIcon: /* @__PURE__ */ n(Na, {}),
|
|
3673
3673
|
label: c(l("empty.cta")),
|
|
3674
3674
|
onClick: t,
|
|
3675
3675
|
children: c(l("empty.cta"))
|
|
@@ -3701,20 +3701,20 @@ const fo = s.object({
|
|
|
3701
3701
|
] }),
|
|
3702
3702
|
e && u
|
|
3703
3703
|
] });
|
|
3704
|
-
},
|
|
3705
|
-
const { formatMessage: e } = A(), t =
|
|
3704
|
+
}, cr = new on(), ur = () => {
|
|
3705
|
+
const { formatMessage: e } = A(), t = xt(), a = ne(), o = vn(), { toggleNotification: i } = Oe(), [r, d] = N(), [c, m] = N(), [p, u] = N(!1), { canAccess: v, canUpdate: b, isLoadingForPermissions: C } = Do(), {
|
|
3706
3706
|
localeData: y,
|
|
3707
3707
|
currentLocale: f,
|
|
3708
3708
|
isChangeLanguageVisible: I,
|
|
3709
3709
|
changeCurrentLocaleAction: h,
|
|
3710
3710
|
availableLocales: T
|
|
3711
|
-
} =
|
|
3711
|
+
} = Mo(t.data, u), { searchValue: E, setSearchValue: z, isSearchEmpty: k, filteredList: F } = qo(c), {
|
|
3712
3712
|
activeNavigationItem: M,
|
|
3713
3713
|
addNewNavigationItem: _,
|
|
3714
3714
|
editNavigationItem: re,
|
|
3715
3715
|
closeNavigationItemPopup: Q,
|
|
3716
3716
|
isItemPopupVisible: le
|
|
3717
|
-
} =
|
|
3717
|
+
} = ko(b), fe = Tn([t, { isPending: C }]), ee = In({
|
|
3718
3718
|
onError: (R) => {
|
|
3719
3719
|
i({
|
|
3720
3720
|
type: "danger",
|
|
@@ -3766,11 +3766,11 @@ const fo = s.object({
|
|
|
3766
3766
|
);
|
|
3767
3767
|
R && R.documentId === c.documentId && R.locale !== c.locale && m(R);
|
|
3768
3768
|
}
|
|
3769
|
-
}, [c, f, t.data]),
|
|
3769
|
+
}, [c, f, t.data]), $o(), !t.data || !y || fe ? /* @__PURE__ */ n(Te.Loading, {}) : /* @__PURE__ */ w(qe.Root, { children: [
|
|
3770
3770
|
/* @__PURE__ */ n(Te.Title, { children: e(l("header.title", "UI Navigation")) }),
|
|
3771
3771
|
/* @__PURE__ */ w(Te.Main, { children: [
|
|
3772
3772
|
/* @__PURE__ */ n(
|
|
3773
|
-
|
|
3773
|
+
si,
|
|
3774
3774
|
{
|
|
3775
3775
|
availableNavigations: t.data,
|
|
3776
3776
|
activeNavigation: c,
|
|
@@ -3787,11 +3787,11 @@ const fo = s.object({
|
|
|
3787
3787
|
),
|
|
3788
3788
|
/* @__PURE__ */ w(qe.Content, { children: [
|
|
3789
3789
|
/* @__PURE__ */ n(
|
|
3790
|
-
|
|
3790
|
+
ci,
|
|
3791
3791
|
{
|
|
3792
|
-
startActions: /* @__PURE__ */ n(
|
|
3792
|
+
startActions: /* @__PURE__ */ n(lr, { value: E, setValue: z }),
|
|
3793
3793
|
endActions: /* @__PURE__ */ n(
|
|
3794
|
-
|
|
3794
|
+
sr,
|
|
3795
3795
|
{
|
|
3796
3796
|
currentNavigation: c,
|
|
3797
3797
|
setCurrentNavigation: m,
|
|
@@ -3802,7 +3802,7 @@ const fo = s.object({
|
|
|
3802
3802
|
}
|
|
3803
3803
|
),
|
|
3804
3804
|
c?.items.length ? /* @__PURE__ */ n(
|
|
3805
|
-
|
|
3805
|
+
Fn,
|
|
3806
3806
|
{
|
|
3807
3807
|
items: G,
|
|
3808
3808
|
onItemLevelAdd: _,
|
|
@@ -3815,7 +3815,7 @@ const fo = s.object({
|
|
|
3815
3815
|
locale: f ?? ""
|
|
3816
3816
|
}
|
|
3817
3817
|
) : /* @__PURE__ */ n(
|
|
3818
|
-
|
|
3818
|
+
dr,
|
|
3819
3819
|
{
|
|
3820
3820
|
canUpdate: b,
|
|
3821
3821
|
addNewNavigationItem: _,
|
|
@@ -3826,7 +3826,7 @@ const fo = s.object({
|
|
|
3826
3826
|
}
|
|
3827
3827
|
),
|
|
3828
3828
|
le && f && c && /* @__PURE__ */ n(
|
|
3829
|
-
|
|
3829
|
+
rr,
|
|
3830
3830
|
{
|
|
3831
3831
|
availableLocale: T,
|
|
3832
3832
|
currentItem: M,
|
|
@@ -3840,7 +3840,7 @@ const fo = s.object({
|
|
|
3840
3840
|
}
|
|
3841
3841
|
),
|
|
3842
3842
|
I && /* @__PURE__ */ n(
|
|
3843
|
-
|
|
3843
|
+
di,
|
|
3844
3844
|
{
|
|
3845
3845
|
onCancel: () => h.cancel(),
|
|
3846
3846
|
onConfirm: () => h.perform()
|
|
@@ -3850,14 +3850,13 @@ const fo = s.object({
|
|
|
3850
3850
|
] })
|
|
3851
3851
|
] });
|
|
3852
3852
|
};
|
|
3853
|
-
function
|
|
3854
|
-
|
|
3855
|
-
return /* @__PURE__ */ n(ln, { client: ur, children: /* @__PURE__ */ n(gn, { theme: e, children: /* @__PURE__ */ n(pr, {}) }) });
|
|
3853
|
+
function pr() {
|
|
3854
|
+
return /* @__PURE__ */ n(rn, { client: cr, children: /* @__PURE__ */ n(ur, {}) });
|
|
3856
3855
|
}
|
|
3857
|
-
const
|
|
3858
|
-
/* @__PURE__ */ n(
|
|
3859
|
-
/* @__PURE__ */ n(
|
|
3860
|
-
] }) }),
|
|
3856
|
+
const mr = () => /* @__PURE__ */ n(Hn, { backend: Xn, children: /* @__PURE__ */ w(Gn, { children: [
|
|
3857
|
+
/* @__PURE__ */ n(Mt, { path: "/", index: !0, Component: pr }),
|
|
3858
|
+
/* @__PURE__ */ n(Mt, { path: "/*", Component: Te.Error })
|
|
3859
|
+
] }) }), gr = /^(?<type>[a-z0-9-]+)\:{2}(?<api>[a-z0-9-]+)\.{1}(?<contentType>[a-z0-9-]+)$/i, hr = (e = "", t = {}) => {
|
|
3861
3860
|
const {
|
|
3862
3861
|
allowedContentTypes: a = [],
|
|
3863
3862
|
restrictedContentTypes: o = [],
|
|
@@ -3865,10 +3864,10 @@ const gr = () => /* @__PURE__ */ n(Gn, { backend: Zn, children: /* @__PURE__ */
|
|
|
3865
3864
|
preferCustomContentTypes: r = !1
|
|
3866
3865
|
} = t, c = (r ? ["api::", ...i] : a).filter((p) => e.includes(p) || e === p).length > 0, m = o.filter((p) => e.includes(p) || e === p).length === 0;
|
|
3867
3866
|
return !!e && c && m;
|
|
3868
|
-
},
|
|
3869
|
-
const t = (r) => r.split("-").map((d) =>
|
|
3867
|
+
}, fr = (e = "") => {
|
|
3868
|
+
const t = (r) => r.split("-").map((d) => ln(d)).join(""), [a, o, i] = yr(e);
|
|
3870
3869
|
return a === "api" ? t(i) : `${t(o)}${t(i)}`;
|
|
3871
|
-
},
|
|
3870
|
+
}, yr = (e = "") => e.split(gr).filter((t) => t && t.length > 0), Zt = "SERVER OFFLINE", Nn = (e, t) => new Promise((a) => {
|
|
3872
3871
|
fetch(`${window.strapi.backendURL}/_health`, {
|
|
3873
3872
|
method: "HEAD",
|
|
3874
3873
|
mode: "no-cors",
|
|
@@ -3880,14 +3879,14 @@ const gr = () => /* @__PURE__ */ n(Gn, { backend: Zn, children: /* @__PURE__ */
|
|
|
3880
3879
|
if (o.status >= 400)
|
|
3881
3880
|
throw new Error();
|
|
3882
3881
|
if (!t)
|
|
3883
|
-
throw new Error(
|
|
3882
|
+
throw new Error(Zt);
|
|
3884
3883
|
a(e);
|
|
3885
3884
|
}).catch((o) => {
|
|
3886
|
-
setTimeout(() =>
|
|
3885
|
+
setTimeout(() => Nn(e, o.message !== Zt).then(
|
|
3887
3886
|
a
|
|
3888
3887
|
), 100);
|
|
3889
3888
|
});
|
|
3890
|
-
}),
|
|
3889
|
+
}), Et = () => {
|
|
3891
3890
|
const e = j(), t = B(e);
|
|
3892
3891
|
return xe({
|
|
3893
3892
|
queryKey: t.readSettingsConfigIndex(),
|
|
@@ -3896,7 +3895,7 @@ const gr = () => /* @__PURE__ */ n(Gn, { backend: Zn, children: /* @__PURE__ */
|
|
|
3896
3895
|
},
|
|
3897
3896
|
staleTime: 1e3 * 60 * 5
|
|
3898
3897
|
});
|
|
3899
|
-
},
|
|
3898
|
+
}, Rn = () => {
|
|
3900
3899
|
const e = j(), t = B(e), a = xe({
|
|
3901
3900
|
queryKey: t.healthCheckIndex(),
|
|
3902
3901
|
queryFn: () => t.healthCheck(),
|
|
@@ -3907,7 +3906,7 @@ const gr = () => /* @__PURE__ */ n(Gn, { backend: Zn, children: /* @__PURE__ */
|
|
|
3907
3906
|
return ge({
|
|
3908
3907
|
mutationFn: () => t.restart().then(() => a.refetch())
|
|
3909
3908
|
});
|
|
3910
|
-
},
|
|
3909
|
+
}, En = () => {
|
|
3911
3910
|
const e = j(), t = B(e);
|
|
3912
3911
|
return ge({
|
|
3913
3912
|
mutationFn: () => t.restoreConfig()
|
|
@@ -3919,7 +3918,7 @@ const gr = () => /* @__PURE__ */ n(Gn, { backend: Zn, children: /* @__PURE__ */
|
|
|
3919
3918
|
queryFn: () => t.readContentType(),
|
|
3920
3919
|
staleTime: 1 / 0
|
|
3921
3920
|
});
|
|
3922
|
-
},
|
|
3921
|
+
}, br = () => {
|
|
3923
3922
|
const e = j(), t = B(e);
|
|
3924
3923
|
return ge({
|
|
3925
3924
|
mutationFn(a) {
|
|
@@ -3936,7 +3935,7 @@ const gr = () => /* @__PURE__ */ n(Gn, { backend: Zn, children: /* @__PURE__ */
|
|
|
3936
3935
|
),
|
|
3937
3936
|
additionalFields: a.audienceFieldChecked ? [...a.additionalFields, "audience"] : a.additionalFields,
|
|
3938
3937
|
gql: {
|
|
3939
|
-
navigationItemRelated: a.contentTypes.map((o) =>
|
|
3938
|
+
navigationItemRelated: a.contentTypes.map((o) => fr(o))
|
|
3940
3939
|
}
|
|
3941
3940
|
});
|
|
3942
3941
|
}
|
|
@@ -3950,7 +3949,7 @@ const gr = () => /* @__PURE__ */ n(Gn, { backend: Zn, children: /* @__PURE__ */
|
|
|
3950
3949
|
key: i,
|
|
3951
3950
|
fields: r
|
|
3952
3951
|
})).concat(a);
|
|
3953
|
-
},
|
|
3952
|
+
}, Ir = ({ config: e, setFormValue: t }) => {
|
|
3954
3953
|
V(() => {
|
|
3955
3954
|
if (e) {
|
|
3956
3955
|
const {
|
|
@@ -3970,12 +3969,12 @@ const gr = () => /* @__PURE__ */ n(Gn, { backend: Zn, children: /* @__PURE__ */
|
|
|
3970
3969
|
});
|
|
3971
3970
|
}
|
|
3972
3971
|
}, [e]);
|
|
3973
|
-
},
|
|
3972
|
+
}, vr = ["string", "boolean", "select", "media"], Je = {
|
|
3974
3973
|
background: "neutral0",
|
|
3975
3974
|
hasRadius: !0,
|
|
3976
3975
|
shadow: "filterShadow",
|
|
3977
3976
|
padding: 6
|
|
3978
|
-
},
|
|
3977
|
+
}, Ln = tn({
|
|
3979
3978
|
values: {},
|
|
3980
3979
|
onChange: () => null,
|
|
3981
3980
|
handleChange: () => null,
|
|
@@ -3983,8 +3982,8 @@ const gr = () => /* @__PURE__ */ n(Gn, { backend: Zn, children: /* @__PURE__ */
|
|
|
3983
3982
|
setRestartStatus: () => null,
|
|
3984
3983
|
renderError: () => "",
|
|
3985
3984
|
setFormValueItem: () => null
|
|
3986
|
-
}), Ne = () =>
|
|
3987
|
-
const { formatMessage: t } = A(), a =
|
|
3985
|
+
}), Ne = () => nn(Ln), Cr = ({ hasSettingsReadPermissions: e }) => {
|
|
3986
|
+
const { formatMessage: t } = A(), a = En(), { setRestartStatus: o } = Ne(), [i, r] = N(!1), d = async (c) => {
|
|
3988
3987
|
r(!1), c && (a.mutate(), o({ required: !0 }));
|
|
3989
3988
|
};
|
|
3990
3989
|
return /* @__PURE__ */ n(D, { ...Je, width: "100%", children: /* @__PURE__ */ w(P, { direction: "column", alignItems: "flex-start", gap: 2, children: [
|
|
@@ -4009,7 +4008,7 @@ const gr = () => /* @__PURE__ */ n(Gn, { backend: Zn, children: /* @__PURE__ */
|
|
|
4009
4008
|
labelConfirm: t(
|
|
4010
4009
|
l("pages.settings.actions.restore.confirmation.confirm")
|
|
4011
4010
|
),
|
|
4012
|
-
iconConfirm: /* @__PURE__ */ n(
|
|
4011
|
+
iconConfirm: /* @__PURE__ */ n(Ra, {}),
|
|
4013
4012
|
onConfirm: () => d(!0),
|
|
4014
4013
|
onCancel: () => d(!1),
|
|
4015
4014
|
children: t(l("pages.settings.actions.restore.confirmation.description"))
|
|
@@ -4018,15 +4017,15 @@ const gr = () => /* @__PURE__ */ n(Gn, { backend: Zn, children: /* @__PURE__ */
|
|
|
4018
4017
|
] })
|
|
4019
4018
|
] })
|
|
4020
4019
|
] }) });
|
|
4021
|
-
},
|
|
4020
|
+
}, Tr = oe(ua)`
|
|
4022
4021
|
[role='status'] {
|
|
4023
4022
|
flex-direction: column;
|
|
4024
4023
|
}
|
|
4025
|
-
`,
|
|
4026
|
-
const { formatMessage: t } = A(), a =
|
|
4024
|
+
`, wr = ({ setIsReloading: e }) => {
|
|
4025
|
+
const { formatMessage: t } = A(), a = Rn(), { restartStatus: o, setRestartStatus: i } = Ne(), r = async () => {
|
|
4027
4026
|
a.mutate(void 0, {
|
|
4028
4027
|
onSuccess() {
|
|
4029
|
-
e(!0),
|
|
4028
|
+
e(!0), Nn(!0).then((c) => {
|
|
4030
4029
|
c && window.location.reload();
|
|
4031
4030
|
});
|
|
4032
4031
|
},
|
|
@@ -4036,11 +4035,11 @@ const gr = () => /* @__PURE__ */ n(Gn, { backend: Zn, children: /* @__PURE__ */
|
|
|
4036
4035
|
});
|
|
4037
4036
|
}, d = () => i({ required: !1 });
|
|
4038
4037
|
return o.required ? /* @__PURE__ */ n(D, { ...Je, width: "100%", children: /* @__PURE__ */ n(
|
|
4039
|
-
|
|
4038
|
+
Tr,
|
|
4040
4039
|
{
|
|
4041
4040
|
closeLabel: t(l("pages.settings.actions.restart.alert.cancel")),
|
|
4042
4041
|
title: t(l("pages.settings.actions.restart.alert.title")),
|
|
4043
|
-
action: /* @__PURE__ */ n(D, { children: /* @__PURE__ */ n(K, { onClick: r, startIcon: /* @__PURE__ */ n(
|
|
4042
|
+
action: /* @__PURE__ */ n(D, { children: /* @__PURE__ */ n(K, { onClick: r, startIcon: /* @__PURE__ */ n(Ea, {}), children: t(l("pages.settings.actions.restart.label")) }) }),
|
|
4044
4043
|
onClose: d,
|
|
4045
4044
|
children: /* @__PURE__ */ w(ie, { children: [
|
|
4046
4045
|
/* @__PURE__ */ n(D, { paddingBottom: 1, children: t(l("pages.settings.actions.restart.alert.description")) }),
|
|
@@ -4057,8 +4056,8 @@ const gr = () => /* @__PURE__ */ n(Gn, { backend: Zn, children: /* @__PURE__ */
|
|
|
4057
4056
|
] })
|
|
4058
4057
|
}
|
|
4059
4058
|
) }) : null;
|
|
4060
|
-
},
|
|
4061
|
-
const e =
|
|
4059
|
+
}, Sr = () => {
|
|
4060
|
+
const e = Et(), { formatMessage: t } = A(), { values: a, onChange: o, handleChange: i, restartStatus: r } = Ne();
|
|
4062
4061
|
return /* @__PURE__ */ n(D, { ...Je, width: "100%", children: /* @__PURE__ */ w(P, { direction: "column", alignItems: "flex-start", gap: 2, children: [
|
|
4063
4062
|
/* @__PURE__ */ n(x, { variant: "delta", as: "h2", children: t(l("pages.settings.additional.title")) }),
|
|
4064
4063
|
/* @__PURE__ */ w(S.Root, { gap: 4, width: "100%", children: [
|
|
@@ -4069,7 +4068,7 @@ const gr = () => /* @__PURE__ */ n(Gn, { backend: Zn, children: /* @__PURE__ */
|
|
|
4069
4068
|
label: t(l("pages.settings.form.allowedLevels.label")),
|
|
4070
4069
|
hint: t(l("pages.settings.form.allowedLevels.hint")),
|
|
4071
4070
|
children: /* @__PURE__ */ n(
|
|
4072
|
-
|
|
4071
|
+
pa,
|
|
4073
4072
|
{
|
|
4074
4073
|
width: "100%",
|
|
4075
4074
|
name: "allowedLevels",
|
|
@@ -4156,7 +4155,7 @@ const gr = () => /* @__PURE__ */ n(Gn, { backend: Zn, children: /* @__PURE__ */
|
|
|
4156
4155
|
) })
|
|
4157
4156
|
] })
|
|
4158
4157
|
] }) });
|
|
4159
|
-
},
|
|
4158
|
+
}, Fr = () => {
|
|
4160
4159
|
const { formatMessage: e } = A(), { values: t, onChange: a, handleChange: o, restartStatus: i } = Ne();
|
|
4161
4160
|
return /* @__PURE__ */ n(S.Item, { col: 4, s: 12, xs: 12, children: /* @__PURE__ */ n(
|
|
4162
4161
|
L,
|
|
@@ -4178,10 +4177,10 @@ const gr = () => /* @__PURE__ */ n(Gn, { backend: Zn, children: /* @__PURE__ */
|
|
|
4178
4177
|
)
|
|
4179
4178
|
}
|
|
4180
4179
|
) });
|
|
4181
|
-
},
|
|
4182
|
-
const e =
|
|
4180
|
+
}, Ar = () => {
|
|
4181
|
+
const e = Et(), t = dt(), { formatMessage: a } = A(), { values: o, onChange: i, handleChange: r, restartStatus: d, setFormValueItem: c, renderError: m } = Ne(), { contentTypes: p, preferCustomContentTypes: u } = o, v = Xe(
|
|
4183
4182
|
Object.values(t.data ?? []).filter(
|
|
4184
|
-
({ uid: b }) =>
|
|
4183
|
+
({ uid: b }) => hr(b, {
|
|
4185
4184
|
allowedContentTypes: e.data?.allowedContentTypes,
|
|
4186
4185
|
restrictedContentTypes: e.data?.restrictedContentTypes,
|
|
4187
4186
|
preferCustomContentTypes: u,
|
|
@@ -4252,7 +4251,7 @@ const gr = () => /* @__PURE__ */ n(Gn, { backend: Zn, children: /* @__PURE__ */
|
|
|
4252
4251
|
)
|
|
4253
4252
|
}
|
|
4254
4253
|
) });
|
|
4255
|
-
},
|
|
4254
|
+
}, xr = () => {
|
|
4256
4255
|
const e = dt(), { formatMessage: t } = A(), { values: a, onChange: o, handleChange: i, restartStatus: r, renderError: d } = Ne(), c = X(
|
|
4257
4256
|
() => a.contentTypes?.map((m) => e.data?.find(({ uid: p }) => p === m)).filter(
|
|
4258
4257
|
(m) => m !== void 0
|
|
@@ -4286,14 +4285,14 @@ const gr = () => /* @__PURE__ */ n(Gn, { backend: Zn, children: /* @__PURE__ */
|
|
|
4286
4285
|
)
|
|
4287
4286
|
}
|
|
4288
4287
|
) });
|
|
4289
|
-
},
|
|
4288
|
+
}, Nr = ["relation", "media", "component", "dynamiczone"], Rr = () => {
|
|
4290
4289
|
const e = dt(), { formatMessage: t } = A(), { values: a, onChange: o, handleChange: i, restartStatus: r, renderError: d } = Ne(), {
|
|
4291
4290
|
contentTypes: c,
|
|
4292
4291
|
contentTypesNameFields: m
|
|
4293
4292
|
} = a;
|
|
4294
4293
|
return /* @__PURE__ */ n(S.Item, { col: 12, s: 12, xs: 12, children: c?.length ? /* @__PURE__ */ n(Ue.Root, { style: { width: "100%" }, children: m.map((p, u) => {
|
|
4295
4294
|
const v = e.data?.find(({ uid: f }) => f === p.key), b = v?.attributes ?? {}, C = Object.keys(b).sort(), y = C.filter(
|
|
4296
|
-
(f) =>
|
|
4295
|
+
(f) => Nr.includes(b[f]?.type)
|
|
4297
4296
|
);
|
|
4298
4297
|
return v ? /* @__PURE__ */ w(Ue.Item, { value: p.key, children: [
|
|
4299
4298
|
/* @__PURE__ */ n(Ue.Header, { children: /* @__PURE__ */ n(Ue.Trigger, { children: v?.info.displayName ?? t(l("pages.settings.form.nameField.default")) }) }),
|
|
@@ -4408,18 +4407,18 @@ const gr = () => /* @__PURE__ */ n(Gn, { backend: Zn, children: /* @__PURE__ */
|
|
|
4408
4407
|
] }) })
|
|
4409
4408
|
] }, p.key) : null;
|
|
4410
4409
|
}) }) : null });
|
|
4411
|
-
},
|
|
4410
|
+
}, Er = () => {
|
|
4412
4411
|
const { formatMessage: e } = A();
|
|
4413
4412
|
return /* @__PURE__ */ n(D, { ...Je, width: "100%", children: /* @__PURE__ */ w(P, { direction: "column", alignItems: "flex-start", gap: 2, children: [
|
|
4414
4413
|
/* @__PURE__ */ n(x, { variant: "delta", as: "h2", children: e(l("pages.settings.general.title")) }),
|
|
4415
4414
|
/* @__PURE__ */ n(S.Root, { gap: 4, width: "100%", children: /* @__PURE__ */ n(S.Item, { col: 12, s: 12, xs: 12, children: /* @__PURE__ */ w(S.Root, { gap: 4, width: "100%", children: [
|
|
4415
|
+
/* @__PURE__ */ n(Fr, {}),
|
|
4416
4416
|
/* @__PURE__ */ n(Ar, {}),
|
|
4417
4417
|
/* @__PURE__ */ n(xr, {}),
|
|
4418
|
-
/* @__PURE__ */ n(
|
|
4419
|
-
/* @__PURE__ */ n(Er, {})
|
|
4418
|
+
/* @__PURE__ */ n(Rr, {})
|
|
4420
4419
|
] }) }) })
|
|
4421
4420
|
] }) });
|
|
4422
|
-
},
|
|
4421
|
+
}, Jt = /* @__PURE__ */ n(Pa, {}), Lr = /* @__PURE__ */ n(wt, {}), ae = "pages.settings.form.customFields.table.", $r = ({
|
|
4423
4422
|
data: e = [],
|
|
4424
4423
|
onOpenModal: t,
|
|
4425
4424
|
onRemoveCustomField: a,
|
|
@@ -4446,51 +4445,51 @@ const gr = () => /* @__PURE__ */ n(Gn, { backend: Zn, children: /* @__PURE__ */
|
|
|
4446
4445
|
header: u(l(`${ae}confirmation.header`)),
|
|
4447
4446
|
children: u(l(`${ae}confirmation.message`)),
|
|
4448
4447
|
labelConfirm: u(l(`${ae}confirmation.confirm`)),
|
|
4449
|
-
iconConfirm:
|
|
4450
|
-
mainIcon:
|
|
4448
|
+
iconConfirm: Jt,
|
|
4449
|
+
mainIcon: Jt,
|
|
4451
4450
|
onConfirm: C,
|
|
4452
4451
|
onCancel: b
|
|
4453
4452
|
}
|
|
4454
4453
|
),
|
|
4455
4454
|
/* @__PURE__ */ w(
|
|
4456
|
-
|
|
4455
|
+
sn,
|
|
4457
4456
|
{
|
|
4458
4457
|
width: "100%",
|
|
4459
4458
|
colCount: 4,
|
|
4460
4459
|
rowCount: e.length + 1,
|
|
4461
4460
|
footer: /* @__PURE__ */ n(
|
|
4462
|
-
|
|
4461
|
+
ha,
|
|
4463
4462
|
{
|
|
4464
4463
|
onClick: (y) => {
|
|
4465
4464
|
y.preventDefault(), t(null);
|
|
4466
4465
|
},
|
|
4467
|
-
icon:
|
|
4466
|
+
icon: Lr,
|
|
4468
4467
|
children: u(l(`${ae}footer`))
|
|
4469
4468
|
}
|
|
4470
4469
|
),
|
|
4471
4470
|
children: [
|
|
4472
|
-
/* @__PURE__ */ n(
|
|
4471
|
+
/* @__PURE__ */ n(dn, { children: /* @__PURE__ */ w(et, { children: [
|
|
4473
4472
|
/* @__PURE__ */ n(ce, { width: "20%", children: /* @__PURE__ */ n(x, { variant: "sigma", textColor: "neutral600", children: u(l(`${ae}header.name`)) }) }),
|
|
4474
4473
|
/* @__PURE__ */ n(ce, { width: "60%", children: /* @__PURE__ */ n(x, { variant: "sigma", textColor: "neutral600", children: u(l(`${ae}header.label`)) }) }),
|
|
4475
4474
|
/* @__PURE__ */ n(ce, { width: "15%", children: /* @__PURE__ */ n(x, { variant: "sigma", textColor: "neutral600", children: u(l(`${ae}header.type`)) }) }),
|
|
4476
4475
|
/* @__PURE__ */ n(ce, { width: "5%", children: /* @__PURE__ */ n(x, { variant: "sigma", textColor: "neutral600", children: u(l(`${ae}header.required`)) }) }),
|
|
4477
|
-
/* @__PURE__ */ n(ce, { children: /* @__PURE__ */ n(
|
|
4476
|
+
/* @__PURE__ */ n(ce, { children: /* @__PURE__ */ n(ma, {}) })
|
|
4478
4477
|
] }) }),
|
|
4479
|
-
/* @__PURE__ */ n(
|
|
4478
|
+
/* @__PURE__ */ n(cn, { children: p.map(
|
|
4480
4479
|
(y) => typeof y != "string" ? /* @__PURE__ */ w(et, { children: [
|
|
4481
4480
|
/* @__PURE__ */ n(ue, { width: "20%", children: /* @__PURE__ */ n(x, { fontWeight: "semiBold", textColor: "neutral800", children: y.name }) }),
|
|
4482
4481
|
/* @__PURE__ */ n(ue, { width: "60%", children: /* @__PURE__ */ n(x, { textColor: "neutral800", children: y.label }) }),
|
|
4483
4482
|
/* @__PURE__ */ n(ue, { width: "15%", children: /* @__PURE__ */ n(x, { textColor: "neutral800", children: y.type }) }),
|
|
4484
4483
|
/* @__PURE__ */ n(ue, { width: "5%", children: /* @__PURE__ */ n(
|
|
4485
|
-
|
|
4484
|
+
ga,
|
|
4486
4485
|
{
|
|
4487
4486
|
description: u(
|
|
4488
4487
|
l(`${ae}${y.required ? "required" : "notRequired"}`)
|
|
4489
4488
|
),
|
|
4490
|
-
children: /* @__PURE__ */ n(x, { textColor: "neutral800", children: y.required ? /* @__PURE__ */ n(Ge, {}) : /* @__PURE__ */ n(
|
|
4489
|
+
children: /* @__PURE__ */ n(x, { textColor: "neutral800", children: y.required ? /* @__PURE__ */ n(Ge, {}) : /* @__PURE__ */ n(La, {}) })
|
|
4491
4490
|
}
|
|
4492
4491
|
) }),
|
|
4493
|
-
/* @__PURE__ */ n(ue, { children: /* @__PURE__ */ n(P, { width: "100%", justifyContent: "flex-end", alignItems: "center", children: /* @__PURE__ */ w(
|
|
4492
|
+
/* @__PURE__ */ n(ue, { children: /* @__PURE__ */ n(P, { width: "100%", justifyContent: "flex-end", alignItems: "center", children: /* @__PURE__ */ w(un, { children: [
|
|
4494
4493
|
/* @__PURE__ */ n(
|
|
4495
4494
|
ye,
|
|
4496
4495
|
{
|
|
@@ -4499,7 +4498,7 @@ const gr = () => /* @__PURE__ */ n(Gn, { backend: Zn, children: /* @__PURE__ */
|
|
|
4499
4498
|
l(`${ae}${y.enabled ? "disable" : "enable"}`)
|
|
4500
4499
|
),
|
|
4501
4500
|
variant: y.enabled ? "success-light" : "tertiary",
|
|
4502
|
-
children: y.enabled ? /* @__PURE__ */ n(
|
|
4501
|
+
children: y.enabled ? /* @__PURE__ */ n(mn, {}) : /* @__PURE__ */ n($a, {}),
|
|
4503
4502
|
style: { minWidth: 50 }
|
|
4504
4503
|
}
|
|
4505
4504
|
),
|
|
@@ -4528,15 +4527,15 @@ const gr = () => /* @__PURE__ */ n(Gn, { backend: Zn, children: /* @__PURE__ */
|
|
|
4528
4527
|
}
|
|
4529
4528
|
)
|
|
4530
4529
|
] });
|
|
4531
|
-
},
|
|
4530
|
+
}, Pr = ({ onChange: e, initialValue: t, ...a }) => {
|
|
4532
4531
|
const [o, i] = N(
|
|
4533
|
-
|
|
4532
|
+
ta(t) ? t.join(";") : ""
|
|
4534
4533
|
);
|
|
4535
4534
|
return /* @__PURE__ */ n(we, { ...a, onChange: (d) => {
|
|
4536
4535
|
const c = d?.target.value ?? "", m = c.split(";").map((p) => p.trim()).filter((p) => !!p.length);
|
|
4537
4536
|
i(c ?? ""), e(m);
|
|
4538
4537
|
}, value: o });
|
|
4539
|
-
}, O = "pages.settings.form.customFields.popup.",
|
|
4538
|
+
}, O = "pages.settings.form.customFields.popup.", Mr = (e) => e.map((t, a) => ({
|
|
4540
4539
|
key: `${t}-${a}`,
|
|
4541
4540
|
metadatas: {
|
|
4542
4541
|
intlLabel: {
|
|
@@ -4548,13 +4547,13 @@ const gr = () => /* @__PURE__ */ n(Gn, { backend: Zn, children: /* @__PURE__ */
|
|
|
4548
4547
|
},
|
|
4549
4548
|
value: t,
|
|
4550
4549
|
label: t
|
|
4551
|
-
})),
|
|
4550
|
+
})), kr = ({
|
|
4552
4551
|
isEditForm: e,
|
|
4553
4552
|
customField: t,
|
|
4554
4553
|
onSubmit: a,
|
|
4555
4554
|
onClose: o
|
|
4556
4555
|
}) => {
|
|
4557
|
-
const i =
|
|
4556
|
+
const i = Mr(vr), { formatMessage: r } = A(), [d, c] = N(
|
|
4558
4557
|
t ? {
|
|
4559
4558
|
...t
|
|
4560
4559
|
} : {
|
|
@@ -4595,7 +4594,7 @@ const gr = () => /* @__PURE__ */ n(Gn, { backend: Zn, children: /* @__PURE__ */
|
|
|
4595
4594
|
if (I)
|
|
4596
4595
|
return r(l(`${O}${f}.${I}`));
|
|
4597
4596
|
}, y = (f, I) => {
|
|
4598
|
-
const { success: h, data: T, error: E } =
|
|
4597
|
+
const { success: h, data: T, error: E } = gn.safeParse(I);
|
|
4599
4598
|
h ? a(T) : E && p(
|
|
4600
4599
|
E.issues.reduce((z, k) => ({
|
|
4601
4600
|
...z,
|
|
@@ -4737,7 +4736,7 @@ const gr = () => /* @__PURE__ */ n(Gn, { backend: Zn, children: /* @__PURE__ */
|
|
|
4737
4736
|
hint: r(l(`${O}options.description`)),
|
|
4738
4737
|
error: C("options"),
|
|
4739
4738
|
children: /* @__PURE__ */ n(
|
|
4740
|
-
|
|
4739
|
+
Pr,
|
|
4741
4740
|
{
|
|
4742
4741
|
name: "options",
|
|
4743
4742
|
onChange: (h) => v("options", h, I),
|
|
@@ -4774,7 +4773,7 @@ const gr = () => /* @__PURE__ */ n(Gn, { backend: Zn, children: /* @__PURE__ */
|
|
|
4774
4773
|
/* @__PURE__ */ n(K, { onClick: (f) => y(f, d), children: r(l("popup.item.form.button.save")) })
|
|
4775
4774
|
] })
|
|
4776
4775
|
] });
|
|
4777
|
-
},
|
|
4776
|
+
}, qr = ({
|
|
4778
4777
|
isOpen: e,
|
|
4779
4778
|
onClose: t,
|
|
4780
4779
|
onSubmit: a,
|
|
@@ -4806,7 +4805,7 @@ const gr = () => /* @__PURE__ */ n(Gn, { backend: Zn, children: /* @__PURE__ */
|
|
|
4806
4805
|
}
|
|
4807
4806
|
) }),
|
|
4808
4807
|
/* @__PURE__ */ n(
|
|
4809
|
-
|
|
4808
|
+
kr,
|
|
4810
4809
|
{
|
|
4811
4810
|
isEditForm: i,
|
|
4812
4811
|
customField: o,
|
|
@@ -4817,7 +4816,7 @@ const gr = () => /* @__PURE__ */ n(Gn, { backend: Zn, children: /* @__PURE__ */
|
|
|
4817
4816
|
] })
|
|
4818
4817
|
}
|
|
4819
4818
|
);
|
|
4820
|
-
},
|
|
4819
|
+
}, Dr = () => {
|
|
4821
4820
|
const { formatMessage: e } = A(), {
|
|
4822
4821
|
values: { additionalFields: t },
|
|
4823
4822
|
setFormValueItem: a
|
|
@@ -4847,7 +4846,7 @@ const gr = () => /* @__PURE__ */ n(Gn, { backend: Zn, children: /* @__PURE__ */
|
|
|
4847
4846
|
/* @__PURE__ */ n(x, { variant: "delta", as: "h2", children: e(l("pages.settings.customFields.title")) }),
|
|
4848
4847
|
/* @__PURE__ */ n(D, { padding: 1 }),
|
|
4849
4848
|
/* @__PURE__ */ n(
|
|
4850
|
-
|
|
4849
|
+
$r,
|
|
4851
4850
|
{
|
|
4852
4851
|
data: t,
|
|
4853
4852
|
onOpenModal: c,
|
|
@@ -4856,7 +4855,7 @@ const gr = () => /* @__PURE__ */ n(Gn, { backend: Zn, children: /* @__PURE__ */
|
|
|
4856
4855
|
}
|
|
4857
4856
|
),
|
|
4858
4857
|
o && /* @__PURE__ */ n(
|
|
4859
|
-
|
|
4858
|
+
qr,
|
|
4860
4859
|
{
|
|
4861
4860
|
onClose: () => i(!1),
|
|
4862
4861
|
onSubmit: u,
|
|
@@ -4865,7 +4864,7 @@ const gr = () => /* @__PURE__ */ n(Gn, { backend: Zn, children: /* @__PURE__ */
|
|
|
4865
4864
|
}
|
|
4866
4865
|
)
|
|
4867
4866
|
] });
|
|
4868
|
-
},
|
|
4867
|
+
}, Vr = Qa.omit({ contentTypesNameFields: !0 }).extend({
|
|
4869
4868
|
audienceFieldChecked: g.boolean(),
|
|
4870
4869
|
contentTypesNameFields: g.object({
|
|
4871
4870
|
key: g.string(),
|
|
@@ -4879,8 +4878,8 @@ const gr = () => /* @__PURE__ */ n(Gn, { backend: Zn, children: /* @__PURE__ */
|
|
|
4879
4878
|
key: g.string(),
|
|
4880
4879
|
fields: g.string().array()
|
|
4881
4880
|
}).array()
|
|
4882
|
-
}),
|
|
4883
|
-
const e =
|
|
4881
|
+
}), Yt = new on(), jr = () => {
|
|
4882
|
+
const e = Et(), t = dt(), a = br(), o = En(), i = Rn(), { formatMessage: r } = A(), [d, c] = N({ required: !1 }), [m, p] = N(!1), u = Un("SettingsPage", (F) => F.permissions), v = X(() => !!u.find(({ action: F }) => F === Le.settings[0].action), [u]), b = X(() => !!u.find(({ action: F }) => F === Le.access[0].action), [u]), C = e.isPending || t.isPending || a.isPending || i.isPending || o.isPending, [y, f] = N({}), [I, h] = N(), T = (F, M, _) => {
|
|
4884
4883
|
if (_) {
|
|
4885
4884
|
let re = F, Q = M;
|
|
4886
4885
|
if (He(F)) {
|
|
@@ -4903,7 +4902,7 @@ const gr = () => /* @__PURE__ */ n(Gn, { backend: Zn, children: /* @__PURE__ */
|
|
|
4903
4902
|
if (J(I, F))
|
|
4904
4903
|
return r(l(F));
|
|
4905
4904
|
}, k = (F, M) => {
|
|
4906
|
-
const { success: _, data: re, error: Q } =
|
|
4905
|
+
const { success: _, data: re, error: Q } = Vr.safeParse(M);
|
|
4907
4906
|
_ ? a.mutate(re, {
|
|
4908
4907
|
onSuccess() {
|
|
4909
4908
|
c({ required: !0 }), a.reset();
|
|
@@ -4915,7 +4914,7 @@ const gr = () => /* @__PURE__ */ n(Gn, { backend: Zn, children: /* @__PURE__ */
|
|
|
4915
4914
|
}), {})
|
|
4916
4915
|
), console.warn("Invalid form data", Q));
|
|
4917
4916
|
};
|
|
4918
|
-
return
|
|
4917
|
+
return Ir({ config: e.data, setFormValue: f }), v ? C || m ? /* @__PURE__ */ n(Te.Loading, {}) : /* @__PURE__ */ n(qe.Root, { children: /* @__PURE__ */ w(Te.Main, { children: [
|
|
4919
4918
|
/* @__PURE__ */ n(Te.Title, { children: r(l("pages.settings.header.title")) }),
|
|
4920
4919
|
/* @__PURE__ */ n(
|
|
4921
4920
|
qe.Header,
|
|
@@ -4934,7 +4933,7 @@ const gr = () => /* @__PURE__ */ n(Gn, { backend: Zn, children: /* @__PURE__ */
|
|
|
4934
4933
|
}
|
|
4935
4934
|
),
|
|
4936
4935
|
/* @__PURE__ */ n(qe.Content, { children: /* @__PURE__ */ n(at, { method: "POST", width: "auto", height: "auto", initialValues: y, children: ({ values: F, onChange: M }) => /* @__PURE__ */ n(
|
|
4937
|
-
|
|
4936
|
+
Ln.Provider,
|
|
4938
4937
|
{
|
|
4939
4938
|
value: {
|
|
4940
4939
|
values: F,
|
|
@@ -4946,29 +4945,27 @@ const gr = () => /* @__PURE__ */ n(Gn, { backend: Zn, children: /* @__PURE__ */
|
|
|
4946
4945
|
setFormValueItem: E
|
|
4947
4946
|
},
|
|
4948
4947
|
children: /* @__PURE__ */ w(P, { direction: "column", gap: 4, children: [
|
|
4949
|
-
/* @__PURE__ */ n(
|
|
4950
|
-
/* @__PURE__ */ n(
|
|
4951
|
-
/* @__PURE__ */ n(
|
|
4952
|
-
/* @__PURE__ */ n(
|
|
4953
|
-
/* @__PURE__ */ n(
|
|
4948
|
+
/* @__PURE__ */ n(wr, { setIsReloading: p }),
|
|
4949
|
+
/* @__PURE__ */ n(Er, {}),
|
|
4950
|
+
/* @__PURE__ */ n(Sr, {}),
|
|
4951
|
+
/* @__PURE__ */ n(Dr, {}),
|
|
4952
|
+
/* @__PURE__ */ n(Cr, { hasSettingsReadPermissions: b })
|
|
4954
4953
|
] })
|
|
4955
4954
|
}
|
|
4956
4955
|
) }) })
|
|
4957
4956
|
] }) }) : /* @__PURE__ */ n(Te.NoPermissions, {});
|
|
4958
4957
|
};
|
|
4959
|
-
function
|
|
4960
|
-
|
|
4961
|
-
const e = St();
|
|
4962
|
-
return /* @__PURE__ */ n(ln, { client: en, children: /* @__PURE__ */ n(gn, { theme: e, children: /* @__PURE__ */ n(Br, {}) }) });
|
|
4958
|
+
function Br() {
|
|
4959
|
+
return Yt.invalidateQueries(), /* @__PURE__ */ n(rn, { client: Yt, children: /* @__PURE__ */ n(jr, {}) });
|
|
4963
4960
|
}
|
|
4964
|
-
const
|
|
4961
|
+
const Or = "navigation", en = "Navigation", ol = {
|
|
4965
4962
|
register(e) {
|
|
4966
4963
|
e.createSettingSection(
|
|
4967
4964
|
{
|
|
4968
4965
|
id: de,
|
|
4969
4966
|
intlLabel: {
|
|
4970
4967
|
id: `${de}.plugin.section.name`,
|
|
4971
|
-
defaultMessage: `${
|
|
4968
|
+
defaultMessage: `${en} plugin`
|
|
4972
4969
|
}
|
|
4973
4970
|
},
|
|
4974
4971
|
[
|
|
@@ -4980,42 +4977,42 @@ const zr = "navigation", tn = "Navigation", il = {
|
|
|
4980
4977
|
id: "navigation",
|
|
4981
4978
|
to: de,
|
|
4982
4979
|
Component() {
|
|
4983
|
-
return
|
|
4980
|
+
return Br;
|
|
4984
4981
|
},
|
|
4985
4982
|
permissions: Le.settings
|
|
4986
4983
|
}
|
|
4987
4984
|
]
|
|
4988
4985
|
), e.addMenuLink({
|
|
4989
4986
|
to: `plugins/${de}`,
|
|
4990
|
-
icon:
|
|
4987
|
+
icon: ja,
|
|
4991
4988
|
intlLabel: {
|
|
4992
4989
|
id: `${de}.plugin.name`,
|
|
4993
|
-
defaultMessage:
|
|
4990
|
+
defaultMessage: en
|
|
4994
4991
|
},
|
|
4995
4992
|
Component() {
|
|
4996
|
-
return
|
|
4993
|
+
return mr;
|
|
4997
4994
|
},
|
|
4998
4995
|
permissions: Le.access,
|
|
4999
4996
|
position: 1
|
|
5000
4997
|
}), e.registerPlugin({
|
|
5001
4998
|
id: de,
|
|
5002
|
-
initializer:
|
|
4999
|
+
initializer: ka,
|
|
5003
5000
|
isReady: !1,
|
|
5004
|
-
name:
|
|
5001
|
+
name: Or
|
|
5005
5002
|
});
|
|
5006
5003
|
},
|
|
5007
5004
|
registerTrads: async function({ locales: e = [] }) {
|
|
5008
5005
|
return Promise.all(
|
|
5009
|
-
e.map(async (t) => t in
|
|
5010
|
-
data: Bt(
|
|
5006
|
+
e.map(async (t) => t in Ot ? Ot[t]().then(({ default: o }) => ({
|
|
5007
|
+
data: jt(Bt(o), de),
|
|
5011
5008
|
locale: t
|
|
5012
5009
|
})) : {
|
|
5013
|
-
data: Bt(
|
|
5010
|
+
data: jt(Bt({}), de),
|
|
5014
5011
|
locale: t
|
|
5015
5012
|
})
|
|
5016
5013
|
);
|
|
5017
5014
|
}
|
|
5018
5015
|
};
|
|
5019
5016
|
export {
|
|
5020
|
-
|
|
5017
|
+
ol as default
|
|
5021
5018
|
};
|