@sensinum/strapi-plugin-xecp 5.0.1 → 5.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. package/README.md +22 -19
  2. package/dist/admin/{App-ts9vnxkd.mjs → App-DnN-IvA2.mjs} +485 -466
  3. package/dist/admin/App-fzbS9IJs.js +30 -0
  4. package/dist/admin/TruncatedTypography-BIh1V9g2.mjs +49 -0
  5. package/dist/admin/TruncatedTypography-IG2-4h8c.js +12 -0
  6. package/dist/admin/{de-C25k5cq2.mjs → de-CXusi8Qg.mjs} +8 -1
  7. package/dist/admin/{de-bbLKG0Z0.js → de-DB2gq7qr.js} +1 -1
  8. package/dist/admin/{en-CN9XhSjy.js → en-BuzP59R9.js} +1 -1
  9. package/dist/admin/{en-B08MBp2G.mjs → en-Dw6HZo7C.mjs} +8 -1
  10. package/dist/admin/{fr-C0XfkZIq.mjs → fr-CyBDGDh1.mjs} +8 -1
  11. package/dist/admin/{fr-CrIyMsIk.js → fr-ISZXcmX2.js} +1 -1
  12. package/dist/admin/index-BPA-rtqa.js +1 -0
  13. package/dist/admin/{index-Ce11CAq4.mjs → index-CUUBtl-O.mjs} +5 -5
  14. package/dist/admin/{index-EJNj4rvX.js → index-CzhrALSL.js} +1 -1
  15. package/dist/admin/index-DDj2bCYO.mjs +653 -0
  16. package/dist/admin/{index-G1uJfkFG.js → index-DGBlS60G.js} +1 -1
  17. package/dist/admin/{index-C5AltFek.mjs → index-Dr164lAs.mjs} +1 -1
  18. package/dist/admin/index.js +1 -1
  19. package/dist/admin/index.mjs +1 -1
  20. package/dist/admin/{pl-DFGTrhGA.js → pl-Ds5SR76s.js} +1 -1
  21. package/dist/admin/{pl-CPolzlPI.mjs → pl-mwGoOpdR.mjs} +8 -1
  22. package/dist/server/index.js +7 -8
  23. package/dist/server/index.mjs +8046 -6773
  24. package/package.json +2 -1
  25. package/dist/admin/App-DRQbwTbi.js +0 -30
  26. package/dist/admin/TruncatedTypography-72wp11m4.js +0 -12
  27. package/dist/admin/TruncatedTypography-Df3hMZdB.mjs +0 -34
  28. package/dist/admin/index-79Ue9nfe.js +0 -1
  29. package/dist/admin/index-DVZWw0UF.mjs +0 -599
@@ -1,32 +1,32 @@
1
1
  import { jsx as n, jsxs as u, Fragment as A } from "react/jsx-runtime";
2
- import { useFetchClient as k, useRBAC as St, useQueryParams as Ct, Page as Z, Layouts as Qe, Pagination as Ee } from "@strapi/strapi/admin";
3
- import { Link as Me, Routes as bt, Route as He } from "react-router-dom";
4
- import { U as _, g as i, P as ke } from "./index-Ce11CAq4.mjs";
5
- import { L as It, S as wt, P as Et, Q as Tt } from "./queryKeys-rUHP1d6p.mjs";
6
- import { Combobox as vt, ComboboxOption as kt, Modal as N, Button as w, Flex as f, Typography as h, Link as Re, EmptyStateLayout as W, Tooltip as qe, Checkbox as Le, Badge as z, Table as _e, Thead as Ke, Tr as H, Th as F, Tbody as De, Td as E, Accordion as q, Divider as xt, Box as Mt, ProgressBar as Rt, Loader as Te } from "@strapi/design-system";
7
- import { WarningCircle as Ae, Information as qt } from "@strapi/icons";
8
- import { useState as L, useEffect as ne, Fragment as Lt, useMemo as Je, useRef as Ze, useCallback as Ve } from "react";
2
+ import { useFetchClient as k, useRBAC as Pt, useQueryParams as St, Page as Z, Layouts as Qe, Pagination as Ee } from "@strapi/strapi/admin";
3
+ import { Link as Re, Routes as Ct, Route as He } from "react-router-dom";
4
+ import { U as _, g as a, P as ke } from "./index-CUUBtl-O.mjs";
5
+ import { L as bt, S as It, P as wt, Q as Et } from "./queryKeys-rUHP1d6p.mjs";
6
+ import { Combobox as Tt, ComboboxOption as vt, Modal as N, Button as E, Flex as f, Typography as h, Link as Me, EmptyStateLayout as W, Tooltip as qe, Checkbox as Le, Badge as z, Table as _e, Thead as Ke, Tr as H, Th as F, Tbody as De, Td as T, Accordion as q, Divider as kt, Box as xt, ProgressBar as Rt, Loader as Te } from "@strapi/design-system";
7
+ import { WarningCircle as Ae, Information as Mt } from "@strapi/icons";
8
+ import { useState as L, useEffect as ne, Fragment as qt, useMemo as Je, useRef as Ze, useCallback as Ve } from "react";
9
9
  import { useIntl as b } from "react-intl";
10
10
  import ae from "zod";
11
- import { A as T, T as V } from "./TruncatedTypography-Df3hMZdB.mjs";
12
- import { useQuery as U, useQueryClient as oe, useMutation as de } from "@tanstack/react-query";
11
+ import { f as ue, A as w, T as V, a as Lt } from "./TruncatedTypography-BIh1V9g2.mjs";
12
+ import { useQuery as U, useQueryClient as oe, useMutation as me } from "@tanstack/react-query";
13
13
  import Be from "styled-components";
14
14
  const _t = 120 * 1e3, Kt = () => {
15
15
  const { get: e } = k();
16
16
  return U({
17
- queryKey: [It, "status"],
17
+ queryKey: [bt, "status"],
18
18
  staleTime: _t,
19
19
  queryFn: async () => {
20
20
  const { data: t } = await e(`/${_}/license/status`);
21
21
  return t;
22
22
  }
23
23
  });
24
- }, Ye = (e, t) => t ? e.find((o) => o.value === t)?.label ?? "" : "", Dt = ({ name: e, onClear: t, onChange: o, options: r, value: a, placeholder: s, disabled: l }) => {
25
- const [c, d] = L(() => Ye(r, a));
24
+ }, Ye = (e, t) => t ? e.find((o) => o.value === t)?.label ?? "" : "", Dt = ({ name: e, onClear: t, onChange: o, options: r, value: i, placeholder: s, disabled: l }) => {
25
+ const [c, d] = L(() => Ye(r, i));
26
26
  return ne(() => {
27
- d(Ye(r, a));
28
- }, [a, r]), /* @__PURE__ */ n(
29
- vt,
27
+ d(Ye(r, i));
28
+ }, [i, r]), /* @__PURE__ */ n(
29
+ Tt,
30
30
  {
31
31
  name: e,
32
32
  autocomplete: "list",
@@ -34,19 +34,19 @@ const _t = 120 * 1e3, Kt = () => {
34
34
  onChange: o,
35
35
  placeholder: s,
36
36
  onTextValueChange: d,
37
- value: a,
37
+ value: i,
38
38
  textValue: c,
39
39
  disabled: l,
40
40
  width: "100%",
41
- children: r.map(({ key: m, label: p, value: y }) => /* @__PURE__ */ n(kt, { value: y, children: p }, m))
41
+ children: r.map(({ key: m, label: p, value: y }) => /* @__PURE__ */ n(vt, { value: y, children: p }, m))
42
42
  }
43
43
  );
44
- }, At = "90vh", ue = ({
44
+ }, At = "90vh", ge = ({
45
45
  open: e,
46
46
  onClose: t,
47
47
  title: o,
48
48
  children: r,
49
- isConfirmButtonLoading: a = !1,
49
+ isConfirmButtonLoading: i = !1,
50
50
  confirmButtonText: s,
51
51
  isConfirmButtonDisabled: l = !1,
52
52
  onSubmit: c,
@@ -59,103 +59,92 @@ const _t = 120 * 1e3, Kt = () => {
59
59
  /* @__PURE__ */ n(N.Header, { children: /* @__PURE__ */ n(N.Title, { children: o }) }),
60
60
  /* @__PURE__ */ n(N.Body, { children: r }),
61
61
  /* @__PURE__ */ n(N.Footer, { style: m ? void 0 : { justifyContent: "flex-end" }, children: m ? /* @__PURE__ */ u(A, { children: [
62
- /* @__PURE__ */ n(N.Close, { children: /* @__PURE__ */ n(w, { variant: "tertiary", onClick: t, children: d || y({ id: i("common.button.close") }) }) }),
62
+ /* @__PURE__ */ n(N.Close, { children: /* @__PURE__ */ n(E, { variant: "tertiary", onClick: t, children: d || y({ id: a("common.button.close") }) }) }),
63
63
  /* @__PURE__ */ n(
64
- w,
64
+ E,
65
65
  {
66
- loading: a,
66
+ loading: i,
67
67
  disabled: l,
68
68
  onClick: c,
69
- children: s || y({ id: i("common.button.submit") })
69
+ children: s || y({ id: a("common.button.submit") })
70
70
  }
71
71
  )
72
- ] }) : /* @__PURE__ */ n(N.Close, { children: /* @__PURE__ */ n(w, { variant: "tertiary", onClick: t, children: d || y({ id: i("common.button.close") }) }) }) })
72
+ ] }) : /* @__PURE__ */ n(N.Close, { children: /* @__PURE__ */ n(E, { variant: "tertiary", onClick: t, children: d || y({ id: a("common.button.close") }) }) }) })
73
73
  ] }) });
74
- }, We = (e) => /^[\w]+(?:\.[\w]+)+$/.test(e), Bt = (e) => {
75
- if (typeof e != "object" || e === null)
76
- return;
77
- const t = e.response?.data?.error?.message;
78
- if (typeof t == "string")
79
- return t;
80
- const o = e.message;
81
- return typeof o == "string" ? o : void 0;
82
- }, me = (e, t) => {
83
- const o = Bt(e);
84
- return o && We(o) ? t({ id: i(o) }) : t({ id: i("homePage.error") });
85
- }, Nt = (e, t) => e && We(e) ? t({ id: i(e) }) : null, ee = {
74
+ }, ee = {
86
75
  all: ["sync"],
87
76
  lists: () => [...ee.all, "list"],
88
77
  list: (e) => [...ee.lists(), { uid: e }]
89
- }, ze = "entities-comparison", Ft = ({
78
+ }, We = "entities-comparison", Bt = ({
90
79
  uid: e,
91
80
  page: t = 1,
92
81
  pageSize: o = 10,
93
82
  enabled: r = !0
94
83
  }) => {
95
- const { get: a } = k();
84
+ const { get: i } = k();
96
85
  return U({
97
- queryKey: [ze, { uid: e, page: t, pageSize: o }],
86
+ queryKey: [We, { uid: e, page: t, pageSize: o }],
98
87
  queryFn: async () => {
99
- const { data: s } = await a(
88
+ const { data: s } = await i(
100
89
  `/${_}/entity-comparison/${e}?page=${t}&pageSize=${o}`
101
90
  );
102
91
  return s;
103
92
  },
104
93
  enabled: !!e && r
105
94
  });
106
- }, et = (e) => {
107
- e.invalidateQueries({ queryKey: [ze] });
108
- }, ge = (e, t) => {
109
- e.invalidateQueries({ queryKey: t ? ee.list(t) : ee.lists() }), et(e);
110
- }, Ot = () => {
95
+ }, ze = (e) => {
96
+ e.invalidateQueries({ queryKey: [We] });
97
+ }, he = (e, t) => {
98
+ e.invalidateQueries({ queryKey: t ? ee.list(t) : ee.lists() }), ze(e);
99
+ }, Nt = () => {
111
100
  const { post: e } = k(), t = oe();
112
- return de({
101
+ return me({
113
102
  mutationFn: async (o) => await e(`/${_}/snapshot/${o}/sync`),
114
103
  onSuccess: (o, r) => {
115
- ge(t, r);
104
+ he(t, r);
116
105
  }
117
106
  });
118
- }, tt = ({ open: e, onClose: t, contentTypeUid: o }) => {
107
+ }, et = ({ open: e, onClose: t, contentTypeUid: o }) => {
119
108
  const { formatMessage: r } = b(), {
120
- mutate: a,
109
+ mutate: i,
121
110
  isPending: s,
122
111
  error: l,
123
112
  reset: c
124
- } = Ot();
113
+ } = Nt();
125
114
  return /* @__PURE__ */ n(
126
- ue,
115
+ ge,
127
116
  {
128
117
  open: e,
129
118
  onClose: () => {
130
119
  t(), c();
131
120
  },
132
121
  onSubmit: () => {
133
- a(o, {
122
+ i(o, {
134
123
  onSuccess: t
135
124
  });
136
125
  },
137
126
  title: r({
138
- id: i("homePage.modal.getNewSnapshot.title")
127
+ id: a("homePage.modal.getNewSnapshot.title")
139
128
  }),
140
129
  confirmButtonText: r({
141
- id: i("homePage.modal.getNewSnapshot.confirmButtonText")
130
+ id: a("homePage.modal.getNewSnapshot.confirmButtonText")
142
131
  }),
143
132
  isConfirmButtonDisabled: s || !o,
144
133
  isConfirmButtonLoading: s,
145
134
  children: /* @__PURE__ */ u(f, { direction: "column", gap: 4, alignItems: "stretch", children: [
146
135
  /* @__PURE__ */ n(h, { variant: "omega", children: r({
147
- id: i("homePage.modal.getNewSnapshot.description")
136
+ id: a("homePage.modal.getNewSnapshot.description")
148
137
  }) }),
149
- l && /* @__PURE__ */ n(h, { variant: "omega", textColor: "danger500", children: me(l, r) })
138
+ l && /* @__PURE__ */ n(h, { variant: "omega", textColor: "danger500", children: ue(l, r) })
150
139
  ] })
151
140
  }
152
141
  );
153
- }, Ut = ({
142
+ }, Ft = ({
154
143
  contentTypeUid: e,
155
144
  selectedPromotionsLength: t,
156
145
  syncedAt: o,
157
146
  isGetSnapshotDisabled: r = !1,
158
- hasSnapshot: a,
147
+ hasSnapshot: i,
159
148
  clearSelectedPromotions: s,
160
149
  canExecute: l
161
150
  }) => {
@@ -169,34 +158,34 @@ const _t = 120 * 1e3, Kt = () => {
169
158
  marginBottom: 1,
170
159
  marginTop: 1,
171
160
  children: [
172
- e && a ? /* @__PURE__ */ u(f, { direction: "row", gap: 3, alignItems: "center", children: [
161
+ e && i ? /* @__PURE__ */ u(f, { direction: "row", gap: 3, alignItems: "center", children: [
173
162
  /* @__PURE__ */ n(h, { variant: "omega", children: c(
174
- { id: i("homePage.selectedEntities") },
163
+ { id: a("homePage.selectedEntities") },
175
164
  { count: t }
176
165
  ) }),
177
- t > 0 && l ? /* @__PURE__ */ n(w, { variant: "secondary", onClick: s, children: c({ id: i("homePage.clearSelectedEntities") }) }) : null
166
+ t > 0 && l ? /* @__PURE__ */ n(E, { variant: "secondary", onClick: s, children: c({ id: a("homePage.clearSelectedEntities") }) }) : null
178
167
  ] }) : null,
179
168
  o ? /* @__PURE__ */ u(f, { direction: "row", gap: 3, alignItems: "center", children: [
180
169
  /* @__PURE__ */ n(h, { variant: "omega", textColor: "neutral600", children: c(
181
- { id: i("homePage.lastSync") },
170
+ { id: a("homePage.lastSync") },
182
171
  {
183
172
  lastSync: new Date(o).toLocaleString()
184
173
  }
185
174
  ) }),
186
175
  l ? /* @__PURE__ */ n(
187
- w,
176
+ E,
188
177
  {
189
178
  variant: "secondary",
190
179
  onClick: () => m(!0),
191
180
  disabled: r,
192
181
  children: c({
193
- id: i("homePage.getNewSnapshot")
182
+ id: a("homePage.getNewSnapshot")
194
183
  })
195
184
  }
196
185
  ) : null
197
186
  ] }) : null,
198
187
  l ? /* @__PURE__ */ n(
199
- tt,
188
+ et,
200
189
  {
201
190
  open: d,
202
191
  onClose: () => m(!1),
@@ -206,39 +195,39 @@ const _t = 120 * 1e3, Kt = () => {
206
195
  ]
207
196
  }
208
197
  );
209
- }, $t = ({ canReadSettings: e }) => {
198
+ }, Ot = ({ canReadSettings: e }) => {
210
199
  const { formatMessage: t } = b();
211
200
  return /* @__PURE__ */ n(
212
- T,
201
+ w,
213
202
  {
214
- title: t({ id: i("homePage.alert.invalidLicense.title") }),
203
+ title: t({ id: a("homePage.alert.invalidLicense.title") }),
215
204
  variant: "danger",
216
205
  description: t({
217
- id: i(
206
+ id: a(
218
207
  e ? "homePage.alert.invalidLicense.description" : "homePage.alert.invalidLicense.readOnlyDescription"
219
208
  )
220
209
  }),
221
- action: e ? /* @__PURE__ */ n(f, { children: /* @__PURE__ */ n(Re, { tag: Me, to: "/settings/xecp/about", children: t({ id: i("homePage.alert.invalidLicense.linkText") }) }) }) : void 0
210
+ action: e ? /* @__PURE__ */ n(f, { children: /* @__PURE__ */ n(Me, { tag: Re, to: "/settings/xecp/about", children: t({ id: a("homePage.alert.invalidLicense.linkText") }) }) }) : void 0
222
211
  }
223
212
  );
224
- }, Gt = ({ compareSchemasData: e, errorCompareSchemas: t }) => {
225
- const { formatMessage: o } = b(), r = e && !e?.isMatch, a = () => o(r ? { id: i("homePage.alert.schemaMismatch.title") } : { id: i("homePage.error") }), s = () => {
213
+ }, Ut = ({ compareSchemasData: e, errorCompareSchemas: t }) => {
214
+ const { formatMessage: o } = b(), r = e && !e?.isMatch, i = () => o(r ? { id: a("homePage.alert.schemaMismatch.title") } : { id: a("homePage.error") }), s = () => {
226
215
  switch (!0) {
227
216
  case r:
228
- return o({ id: i("homePage.alert.schemaMismatch.description") });
217
+ return o({ id: a("homePage.alert.schemaMismatch.description") });
229
218
  case !!t:
230
219
  return t;
231
220
  default:
232
- return o({ id: i("homePage.somethingWentWrong") });
221
+ return o({ id: a("homePage.somethingWentWrong") });
233
222
  }
234
223
  };
235
- return /* @__PURE__ */ n(T, { title: a(), variant: "danger", children: s() });
236
- }, Qt = ({
224
+ return /* @__PURE__ */ n(w, { title: i(), variant: "danger", children: s() });
225
+ }, $t = ({
237
226
  contentTypeUid: e,
238
227
  hasExistingSnapshot: t,
239
228
  unconfiguredRelationsError: o,
240
229
  isGetSnapshotDisabled: r = !1,
241
- canExecute: a,
230
+ canExecute: i,
242
231
  canReadSettings: s
243
232
  }) => {
244
233
  const { formatMessage: l } = b(), [c, d] = L(!1);
@@ -247,22 +236,22 @@ const _t = 120 * 1e3, Kt = () => {
247
236
  W,
248
237
  {
249
238
  content: l({
250
- id: i(
251
- a ? "homePage.alert.noSync.description" : "homePage.alert.noSync.readOnlyDescription"
239
+ id: a(
240
+ i ? "homePage.alert.noSync.description" : "homePage.alert.noSync.readOnlyDescription"
252
241
  )
253
242
  }),
254
- action: a ? /* @__PURE__ */ n(
255
- w,
243
+ action: i ? /* @__PURE__ */ n(
244
+ E,
256
245
  {
257
246
  onClick: () => d(!0),
258
247
  disabled: r,
259
- children: l({ id: i("homePage.alert.noSync.linkText") })
248
+ children: l({ id: a("homePage.alert.noSync.linkText") })
260
249
  }
261
250
  ) : void 0
262
251
  }
263
252
  ),
264
- a ? /* @__PURE__ */ n(
265
- tt,
253
+ i ? /* @__PURE__ */ n(
254
+ et,
266
255
  {
267
256
  open: c,
268
257
  onClose: () => d(!1),
@@ -271,18 +260,18 @@ const _t = 120 * 1e3, Kt = () => {
271
260
  ) : null
272
261
  ] }) : /* @__PURE__ */ u(A, { children: [
273
262
  o ? /* @__PURE__ */ n(
274
- T,
263
+ w,
275
264
  {
276
265
  title: l({
277
- id: i("homePage.alert.unconfiguredRelations.title")
266
+ id: a("homePage.alert.unconfiguredRelations.title")
278
267
  }),
279
268
  variant: "danger",
280
- action: s ? /* @__PURE__ */ n(Re, { tag: Me, to: "/settings/xecp/configuration", children: l({
281
- id: i("homePage.alert.unconfiguredRelations.linkText")
269
+ action: s ? /* @__PURE__ */ n(Me, { tag: Re, to: "/settings/xecp/configuration", children: l({
270
+ id: a("homePage.alert.unconfiguredRelations.linkText")
282
271
  }) }) : void 0,
283
272
  description: l(
284
273
  {
285
- id: i(
274
+ id: a(
286
275
  s ? "homePage.alert.unconfiguredRelations.description" : "homePage.alert.unconfiguredRelations.readOnlyDescription"
287
276
  )
288
277
  },
@@ -290,40 +279,40 @@ const _t = 120 * 1e3, Kt = () => {
290
279
  )
291
280
  }
292
281
  ) : null,
293
- /* @__PURE__ */ n(W, { content: l({ id: i("homePage.emptyState") }) })
282
+ /* @__PURE__ */ n(W, { content: l({ id: a("homePage.emptyState") }) })
294
283
  ] });
295
284
  }, Ne = (e) => [
296
285
  e,
297
286
  ...e.localizations ?? []
298
- ], nt = (e) => (e ?? []).flatMap(Ne), Ht = (e, t) => {
287
+ ], tt = (e) => (e ?? []).flatMap(Ne), Gt = (e, t) => {
299
288
  const o = t?.find((r) => r.documentId === e);
300
289
  return o ? Ne(o) : [];
301
- }, Vt = (e) => {
290
+ }, Qt = (e) => {
302
291
  const t = e[0];
303
292
  return t ? {
304
293
  ...t,
305
294
  localizations: e.slice(1)
306
295
  } : null;
307
- }, he = (e, t) => {
296
+ }, pe = (e, t) => {
308
297
  if (!t) return e.uniqueKeyValue;
309
298
  const o = e?.[t];
310
299
  return typeof o == "string" || typeof o == "number" ? String(o) : e.uniqueKeyValue;
311
- }, ie = (e) => ({
300
+ }, se = (e) => ({
312
301
  documentId: e.documentId,
313
302
  locale: e.locale ?? "default"
314
- }), te = (e, t) => e.documentId === t.documentId && e.locale === t.locale, se = (e, t) => t.some((o) => te(o, ie(e))), Yt = (e) => [...new Set(e.map((t) => t.documentId))], jt = (e, t) => {
303
+ }), te = (e, t) => e.documentId === t.documentId && e.locale === t.locale, ce = (e, t) => t.some((o) => te(o, se(e))), Ht = (e) => [...new Set(e.map((t) => t.documentId))], Vt = (e, t) => {
315
304
  if (e.length === 0)
316
305
  return !1;
317
306
  const o = e.filter((r) => t.has(r)).length;
318
307
  return o === 0 ? !1 : o === e.length ? !0 : "indeterminate";
319
- }, Xt = (e, t) => {
308
+ }, Yt = (e, t) => {
320
309
  const o = new Set(t);
321
310
  return new Set([...e].filter((r) => o.has(r)));
322
- }, Jt = "homePage.missingUniqueKey", ce = {
311
+ }, jt = "homePage.missingUniqueKey", le = {
323
312
  single: "homePage.hint.missingUniqueKey.single",
324
313
  allLocales: "homePage.hint.missingUniqueKey.allLocales",
325
314
  someLocales: "homePage.hint.missingUniqueKey.someLocales"
326
- }, Y = (e, t) => e !== "up_to_date" && t !== "missing_unique_key", Zt = (e) => {
315
+ }, Y = (e, t) => e !== "up_to_date" && t !== "missing_unique_key", Xt = (e) => {
327
316
  switch (!0) {
328
317
  case e.every((t) => t.warning === "missing_unique_key"):
329
318
  return "allLocales";
@@ -332,18 +321,18 @@ const _t = 120 * 1e3, Kt = () => {
332
321
  default:
333
322
  return null;
334
323
  }
335
- }, ot = (e, t, o) => {
324
+ }, nt = (e, t, o) => {
336
325
  if (!e)
337
326
  return "homePage.tooltip.noExecutePermission";
338
327
  switch (!0) {
339
328
  case t === "up_to_date":
340
329
  return "homePage.tooltip.upToDate";
341
330
  case o === "missing_unique_key":
342
- return ce.single;
331
+ return le.single;
343
332
  default:
344
333
  return null;
345
334
  }
346
- }, rt = (e, t) => {
335
+ }, ot = (e, t) => {
347
336
  if (!e)
348
337
  return "homePage.tooltip.noExecutePermission";
349
338
  switch (!0) {
@@ -352,19 +341,19 @@ const _t = 120 * 1e3, Kt = () => {
352
341
  case t.every((o) => o.status === "up_to_date"):
353
342
  return "homePage.tooltip.allEntitiesUpToDate";
354
343
  case t.every((o) => o.warning === "missing_unique_key"):
355
- return ce.allLocales;
344
+ return le.allLocales;
356
345
  default:
357
- return ce.someLocales;
346
+ return le.someLocales;
358
347
  }
359
348
  }, xe = ({
360
349
  checked: e,
361
350
  onCheckedChange: t,
362
351
  disable: o = !1,
363
352
  tooltipLabel: r = ""
364
- }) => /* @__PURE__ */ n("div", { onClick: (a) => a.stopPropagation(), children: /* @__PURE__ */ n(qe, { label: o ? r : "", align: "start", children: /* @__PURE__ */ n(Le, { checked: e, onCheckedChange: t, disabled: o }) }) }), pe = ({ locale: e }) => {
353
+ }) => /* @__PURE__ */ n("div", { onClick: (i) => i.stopPropagation(), children: /* @__PURE__ */ n(qe, { label: o ? r : "", align: "start", children: /* @__PURE__ */ n(Le, { checked: e, onCheckedChange: t, disabled: o }) }) }), ye = ({ locale: e }) => {
365
354
  const { formatMessage: t } = b();
366
- return e === "default" ? /* @__PURE__ */ n(z, { variant: "neutral", children: t({ id: i("homePage.promotionResults.locale.nonLocalized") }) }) : /* @__PURE__ */ n(z, { variant: "neutral", children: e });
367
- }, Wt = (e) => {
355
+ return e === "default" ? /* @__PURE__ */ n(z, { variant: "neutral", children: t({ id: a("homePage.promotionResults.locale.nonLocalized") }) }) : /* @__PURE__ */ n(z, { variant: "neutral", children: e });
356
+ }, Jt = (e) => {
368
357
  switch (e) {
369
358
  case "new":
370
359
  return "homePage.table.status.new";
@@ -375,7 +364,7 @@ const _t = 120 * 1e3, Kt = () => {
375
364
  default:
376
365
  return "homePage.table.status.new";
377
366
  }
378
- }, zt = (e) => {
367
+ }, Zt = (e) => {
379
368
  switch (e) {
380
369
  case "new":
381
370
  return "success";
@@ -386,15 +375,15 @@ const _t = 120 * 1e3, Kt = () => {
386
375
  default:
387
376
  return "success";
388
377
  }
389
- }, at = ({ status: e }) => {
378
+ }, rt = ({ status: e }) => {
390
379
  const { formatMessage: t } = b();
391
- return /* @__PURE__ */ n(z, { variant: zt(e), children: t({
392
- id: i(Wt(e))
380
+ return /* @__PURE__ */ n(z, { variant: Zt(e), children: t({
381
+ id: a(Jt(e))
393
382
  }) });
394
- }, en = ({ shouldShow: e, message: t, tooltipLabel: o }) => e ? /* @__PURE__ */ n(qe, { label: o, align: "start", children: /* @__PURE__ */ u(f, { direction: "row", gap: 1, alignItems: "center", children: [
383
+ }, Wt = ({ shouldShow: e, message: t, tooltipLabel: o }) => e ? /* @__PURE__ */ n(qe, { label: o, align: "start", children: /* @__PURE__ */ u(f, { direction: "row", gap: 1, alignItems: "center", children: [
395
384
  /* @__PURE__ */ n(Ae, { fill: "warning500", width: 20, height: 20 }),
396
385
  /* @__PURE__ */ n(h, { variant: "pi", textColor: "warning500", children: t })
397
- ] }) }) : null, ye = ({ uniqueKey: e, missingUniqueKeyScope: t, maxCharacters: o = 40 }) => {
386
+ ] }) }) : null, fe = ({ uniqueKey: e, missingUniqueKeyScope: t, maxCharacters: o = 40 }) => {
398
387
  const { formatMessage: r } = b();
399
388
  if (!t)
400
389
  return /* @__PURE__ */ n(
@@ -406,11 +395,11 @@ const _t = 120 * 1e3, Kt = () => {
406
395
  textColor: "neutral600"
407
396
  }
408
397
  );
409
- const a = r({
410
- id: i(Jt)
398
+ const i = r({
399
+ id: a(jt)
411
400
  }), s = r({
412
- id: i(ce[t])
413
- }), l = /* @__PURE__ */ n(en, { shouldShow: !0, tooltipLabel: s, message: a });
401
+ id: a(le[t])
402
+ }), l = /* @__PURE__ */ n(Wt, { shouldShow: !0, tooltipLabel: s, message: i });
414
403
  return t === "someLocales" && e ? /* @__PURE__ */ u(f, { direction: "row", gap: 2, alignItems: "center", children: [
415
404
  /* @__PURE__ */ n(
416
405
  V,
@@ -428,7 +417,7 @@ const _t = 120 * 1e3, Kt = () => {
428
417
  uniqueKey: t,
429
418
  missingUniqueKeyScope: o,
430
419
  locale: r,
431
- titleMaxCharacters: a = 60,
420
+ titleMaxCharacters: i = 60,
432
421
  checked: s,
433
422
  onCheckedChange: l,
434
423
  checkboxDisabled: c = !1,
@@ -438,7 +427,7 @@ const _t = 120 * 1e3, Kt = () => {
438
427
  const p = /* @__PURE__ */ n(
439
428
  V,
440
429
  {
441
- maxCharacters: a,
430
+ maxCharacters: i,
442
431
  text: e,
443
432
  variant: "omega",
444
433
  fontWeight: "semiBold"
@@ -456,24 +445,24 @@ const _t = 120 * 1e3, Kt = () => {
456
445
  }
457
446
  ),
458
447
  r ? /* @__PURE__ */ u(f, { direction: "row", gap: 2, alignItems: "center", children: [
459
- /* @__PURE__ */ n(pe, { locale: r }),
448
+ /* @__PURE__ */ n(ye, { locale: r }),
460
449
  p
461
450
  ] }) : p,
462
- /* @__PURE__ */ n(ye, { uniqueKey: t, missingUniqueKeyScope: o })
451
+ /* @__PURE__ */ n(fe, { uniqueKey: t, missingUniqueKeyScope: o })
463
452
  ] }),
464
- /* @__PURE__ */ n(at, { status: m })
453
+ /* @__PURE__ */ n(rt, { status: m })
465
454
  ] });
466
- }, tn = ({
455
+ }, zt = ({
467
456
  entryTitle: e,
468
457
  uniqueKey: t,
469
458
  status: o,
470
459
  warning: r,
471
- locale: a,
460
+ locale: i,
472
461
  isChecked: s,
473
462
  onCheckItemChange: l,
474
463
  canExecute: c
475
464
  }) => {
476
- const { formatMessage: d } = b(), m = !c || !Y(o, r), p = ot(c, o, r);
465
+ const { formatMessage: d } = b(), m = !c || !Y(o, r), p = nt(c, o, r);
477
466
  return /* @__PURE__ */ n(
478
467
  f,
479
468
  {
@@ -493,22 +482,22 @@ const _t = 120 * 1e3, Kt = () => {
493
482
  entryTitle: e,
494
483
  uniqueKey: t,
495
484
  missingUniqueKeyScope: r === "missing_unique_key" ? "single" : null,
496
- locale: a,
485
+ locale: i,
497
486
  checked: s,
498
487
  onCheckedChange: l,
499
488
  checkboxDisabled: m,
500
- checkboxTooltipLabel: p ? d({ id: i(p) }) : void 0,
489
+ checkboxTooltipLabel: p ? d({ id: a(p) }) : void 0,
501
490
  status: o
502
491
  }
503
492
  )
504
493
  }
505
494
  );
506
- }, nn = ({
495
+ }, en = ({
507
496
  isAllCheckedInEntity: e,
508
497
  onCheckAllInEntity: t,
509
498
  entityWithLocalizations: o,
510
499
  selectedPromotions: r,
511
- onCheckItemChange: a,
500
+ onCheckItemChange: i,
512
501
  isIndeterminate: s,
513
502
  contentTypeMainField: l,
514
503
  canExecute: c
@@ -519,23 +508,23 @@ const _t = 120 * 1e3, Kt = () => {
519
508
  },
520
509
  {
521
510
  key: "locale",
522
- label: d({ id: i("homePage.table.locale") })
511
+ label: d({ id: a("homePage.table.locale") })
523
512
  },
524
513
  {
525
514
  key: "entryTitle",
526
- label: d({ id: i("homePage.table.entryTitle") })
515
+ label: d({ id: a("homePage.table.entryTitle") })
527
516
  },
528
517
  {
529
518
  key: "key",
530
- label: d({ id: i("homePage.table.key") })
519
+ label: d({ id: a("homePage.table.key") })
531
520
  },
532
521
  {
533
522
  key: "status",
534
- label: d({ id: i("homePage.table.status") })
523
+ label: d({ id: a("homePage.table.status") })
535
524
  }
536
525
  ], p = !o?.some(
537
526
  (g) => Y(g.status, g.warning)
538
- ), y = rt(
527
+ ), y = ot(
539
528
  c,
540
529
  o ?? []
541
530
  );
@@ -546,45 +535,45 @@ const _t = 120 * 1e3, Kt = () => {
546
535
  checked: s ? "indeterminate" : e,
547
536
  onCheckedChange: t,
548
537
  disable: p || !c,
549
- tooltipLabel: y ? d({ id: i(y) }) : ""
538
+ tooltipLabel: y ? d({ id: a(y) }) : ""
550
539
  }
551
540
  ) : /* @__PURE__ */ n(h, { variant: "sigma", children: g.label }) }, g.key)) }) }),
552
541
  /* @__PURE__ */ n(De, { children: o?.map((g) => {
553
- const P = !c || !Y(g.status, g.warning), C = ot(
542
+ const P = !c || !Y(g.status, g.warning), C = nt(
554
543
  c,
555
544
  g.status,
556
545
  g.warning
557
546
  );
558
547
  return /* @__PURE__ */ u(H, { children: [
559
- /* @__PURE__ */ n(E, { children: /* @__PURE__ */ n(
548
+ /* @__PURE__ */ n(T, { children: /* @__PURE__ */ n(
560
549
  xe,
561
550
  {
562
- checked: se(g, r),
563
- onCheckedChange: a(g),
551
+ checked: ce(g, r),
552
+ onCheckedChange: i(g),
564
553
  disable: P,
565
- tooltipLabel: C ? d({ id: i(C) }) : ""
554
+ tooltipLabel: C ? d({ id: a(C) }) : ""
566
555
  }
567
556
  ) }),
568
- /* @__PURE__ */ n(E, { children: g?.locale ? /* @__PURE__ */ n(pe, { locale: g.locale }) : null }),
569
- /* @__PURE__ */ n(E, { children: /* @__PURE__ */ n(
557
+ /* @__PURE__ */ n(T, { children: g?.locale ? /* @__PURE__ */ n(ye, { locale: g.locale }) : null }),
558
+ /* @__PURE__ */ n(T, { children: /* @__PURE__ */ n(
570
559
  V,
571
560
  {
572
561
  maxCharacters: 50,
573
- text: he(g, l) || ""
562
+ text: pe(g, l) || ""
574
563
  }
575
564
  ) }),
576
- /* @__PURE__ */ n(E, { children: /* @__PURE__ */ n(
577
- ye,
565
+ /* @__PURE__ */ n(T, { children: /* @__PURE__ */ n(
566
+ fe,
578
567
  {
579
568
  uniqueKey: g?.uniqueKeyValue,
580
569
  missingUniqueKeyScope: g?.warning === "missing_unique_key" ? "single" : null
581
570
  }
582
571
  ) }),
583
- /* @__PURE__ */ n(E, { children: /* @__PURE__ */ n(at, { status: g?.status }) })
572
+ /* @__PURE__ */ n(T, { children: /* @__PURE__ */ n(rt, { status: g?.status }) })
584
573
  ] }, `${g.documentId}-${g.locale}`);
585
574
  }) })
586
575
  ] });
587
- }, on = Be(q.Trigger)`
576
+ }, tn = Be(q.Trigger)`
588
577
  width: 100%;
589
578
  & > span:first-child {
590
579
  width: 100%;
@@ -594,12 +583,12 @@ const _t = 120 * 1e3, Kt = () => {
594
583
  width: 100%;
595
584
  }
596
585
  }
597
- `, rn = ({
586
+ `, nn = ({
598
587
  uniqueKey: e,
599
588
  entityWithLocalizations: t,
600
589
  entryTitle: o,
601
590
  selectedPromotions: r,
602
- setSelectedPromotions: a,
591
+ setSelectedPromotions: i,
603
592
  onCheckItemChange: s,
604
593
  contentTypeMainField: l,
605
594
  onRememberEntityGroup: c,
@@ -608,22 +597,22 @@ const _t = 120 * 1e3, Kt = () => {
608
597
  const { formatMessage: m } = b(), p = t.filter(
609
598
  (S) => Y(S.status, S.warning)
610
599
  ), y = (S) => {
611
- a((G) => {
600
+ i((G) => {
612
601
  const Q = p.map(
613
- (M) => ie(M)
614
- ), K = (M) => t.some(
615
- (R) => te(M, ie(R))
602
+ (R) => se(R)
603
+ ), K = (R) => t.some(
604
+ (M) => te(R, se(M))
616
605
  );
617
- return S ? (c?.(t), [...G.filter((R) => !K(R)), ...Q]) : G.filter((M) => !K(M));
606
+ return S ? (c?.(t), [...G.filter((M) => !K(M)), ...Q]) : G.filter((R) => !K(R));
618
607
  });
619
608
  }, g = t?.some(
620
- (S) => se(S, r)
609
+ (S) => ce(S, r)
621
610
  ), P = p.length > 0 && p.every(
622
- (S) => se(S, r)
623
- ), C = p.length === 0, v = rt(
611
+ (S) => ce(S, r)
612
+ ), C = p.length === 0, v = ot(
624
613
  d,
625
614
  t
626
- ), $ = Zt(t), x = (() => {
615
+ ), $ = Xt(t), x = (() => {
627
616
  switch (!0) {
628
617
  case t?.some((S) => S?.status === "new"):
629
618
  return "new";
@@ -634,7 +623,7 @@ const _t = 120 * 1e3, Kt = () => {
634
623
  }
635
624
  })(), O = g && !P;
636
625
  return /* @__PURE__ */ n(q.Root, { style: { width: "100%" }, size: "M", children: /* @__PURE__ */ u(q.Item, { value: `${o}-${e}`, children: [
637
- /* @__PURE__ */ n(q.Header, { children: /* @__PURE__ */ n(on, { caretPosition: "right", children: /* @__PURE__ */ n(
626
+ /* @__PURE__ */ n(q.Header, { children: /* @__PURE__ */ n(tn, { caretPosition: "right", children: /* @__PURE__ */ n(
638
627
  f,
639
628
  {
640
629
  direction: "row",
@@ -652,14 +641,14 @@ const _t = 120 * 1e3, Kt = () => {
652
641
  checked: O ? "indeterminate" : P,
653
642
  onCheckedChange: y,
654
643
  checkboxDisabled: C || !d,
655
- checkboxTooltipLabel: v ? m({ id: i(v) }) : void 0,
644
+ checkboxTooltipLabel: v ? m({ id: a(v) }) : void 0,
656
645
  status: x
657
646
  }
658
647
  )
659
648
  }
660
649
  ) }) }),
661
650
  /* @__PURE__ */ n(q.Content, { children: /* @__PURE__ */ n(
662
- nn,
651
+ en,
663
652
  {
664
653
  isAllCheckedInEntity: P,
665
654
  onCheckAllInEntity: y,
@@ -672,21 +661,21 @@ const _t = 120 * 1e3, Kt = () => {
672
661
  }
673
662
  ) })
674
663
  ] }) });
675
- }, an = ({
664
+ }, on = ({
676
665
  entities: e,
677
666
  contentTypeMainField: t,
678
667
  selectedPromotions: o,
679
668
  setSelectedPromotions: r,
680
- onRememberEntityGroup: a,
669
+ onRememberEntityGroup: i,
681
670
  canExecute: s
682
671
  }) => {
683
672
  const l = (d) => (m) => (p) => {
684
- const y = ie(m);
685
- r((g) => p ? g.some((P) => te(P, y)) ? g : (a?.(d), [...g, y]) : g.filter((P) => !te(P, y)));
673
+ const y = se(m);
674
+ r((g) => p ? g.some((P) => te(P, y)) ? g : (i?.(d), [...g, y]) : g.filter((P) => !te(P, y)));
686
675
  }, c = (d, m) => {
687
- const p = he(d, t), y = d?.uniqueKeyValue || "";
676
+ const p = pe(d, t), y = d?.uniqueKeyValue || "";
688
677
  return m.length > 1 ? /* @__PURE__ */ n(
689
- rn,
678
+ nn,
690
679
  {
691
680
  uniqueKey: y,
692
681
  contentTypeMainField: t,
@@ -695,18 +684,18 @@ const _t = 120 * 1e3, Kt = () => {
695
684
  selectedPromotions: o,
696
685
  setSelectedPromotions: r,
697
686
  onCheckItemChange: l(m),
698
- onRememberEntityGroup: a,
687
+ onRememberEntityGroup: i,
699
688
  canExecute: s
700
689
  }
701
690
  ) : /* @__PURE__ */ n(
702
- tn,
691
+ zt,
703
692
  {
704
693
  entryTitle: p || "",
705
694
  uniqueKey: y,
706
695
  status: d?.status,
707
696
  warning: d?.warning,
708
697
  locale: d?.locale,
709
- isChecked: se(d, o),
698
+ isChecked: ce(d, o),
710
699
  onCheckItemChange: l(m)(d),
711
700
  canExecute: s
712
701
  }
@@ -714,12 +703,12 @@ const _t = 120 * 1e3, Kt = () => {
714
703
  };
715
704
  return /* @__PURE__ */ n("div", { children: e?.map((d, m) => {
716
705
  const p = Ne(d);
717
- return /* @__PURE__ */ u(Lt, { children: [
706
+ return /* @__PURE__ */ u(qt, { children: [
718
707
  c(d, p),
719
- e?.length - 1 > m && /* @__PURE__ */ n(xt, {})
708
+ e?.length - 1 > m && /* @__PURE__ */ n(kt, {})
720
709
  ] }, d?.documentId);
721
710
  }) });
722
- }, sn = () => {
711
+ }, rn = () => {
723
712
  const { get: e } = k();
724
713
  return U({
725
714
  queryKey: ["content-types"],
@@ -728,10 +717,10 @@ const _t = 120 * 1e3, Kt = () => {
728
717
  return t.data;
729
718
  }
730
719
  });
731
- }, cn = (e, t) => {
720
+ }, an = (e, t) => {
732
721
  const { get: o } = k();
733
722
  return U({
734
- queryKey: [wt, "related-content-types", e],
723
+ queryKey: [It, "related-content-types", e],
735
724
  queryFn: async () => {
736
725
  const { data: r } = await o(
737
726
  `/${_}/promotion/related-content-types`,
@@ -745,9 +734,9 @@ const _t = 120 * 1e3, Kt = () => {
745
734
  },
746
735
  enabled: !!e && t
747
736
  });
748
- }, ln = () => {
737
+ }, sn = () => {
749
738
  const { post: e } = k(), t = oe();
750
- return de({
739
+ return me({
751
740
  mutationFn: async (o) => {
752
741
  const { data: r } = await e(
753
742
  `/${_}/promotion`,
@@ -756,66 +745,66 @@ const _t = 120 * 1e3, Kt = () => {
756
745
  return r;
757
746
  },
758
747
  onSuccess: () => {
759
- et(t);
748
+ ze(t);
760
749
  }
761
750
  });
762
- }, dn = (e, t) => e.includes(t) ? [t, ...e.filter((o) => o !== t).sort()] : e.sort(), un = (e) => e.filter((t) => Y(t.status, t.warning)).map((t) => t.locale ?? "default"), mn = (e, t) => e.length > 0 && e.every((o) => t.includes(o)), gn = (e, t, o) => {
751
+ }, cn = (e, t) => e.includes(t) ? [t, ...e.filter((o) => o !== t).sort()] : e.sort(), ln = (e) => e.filter((t) => Y(t.status, t.warning)).map((t) => t.locale ?? "default"), dn = (e, t) => e.length > 0 && e.every((o) => t.includes(o)), un = (e, t, o) => {
763
752
  const r = /* @__PURE__ */ new Map();
764
753
  for (const c of t ?? [])
765
754
  r.set(c.documentId, c);
766
- const a = nt(t), s = /* @__PURE__ */ new Map();
755
+ const i = tt(t), s = /* @__PURE__ */ new Map();
767
756
  for (const c of e) {
768
757
  const d = s.get(c.documentId) ?? [];
769
758
  d.push(c), s.set(c.documentId, d);
770
759
  }
771
760
  return [...new Set(e.map((c) => c.documentId))].map((c) => {
772
- const d = s.get(c) ?? [], m = r.get(c) ?? a.find((C) => C.documentId === c), p = m?.locale ?? "default", y = m ?? a.find(
761
+ const d = s.get(c) ?? [], m = r.get(c) ?? i.find((C) => C.documentId === c), p = m?.locale ?? "default", y = m ?? i.find(
773
762
  (C) => d.some(
774
763
  (v) => te(v, {
775
764
  documentId: C.documentId,
776
765
  locale: C.locale ?? "default"
777
766
  })
778
767
  )
779
- ), g = dn(
768
+ ), g = cn(
780
769
  d.map((C) => C.locale),
781
770
  p
782
- ), P = un(
783
- Ht(c, t)
771
+ ), P = ln(
772
+ Gt(c, t)
784
773
  );
785
774
  return {
786
775
  documentId: c,
787
- title: y ? he(y, o) ?? c : c,
776
+ title: y ? pe(y, o) ?? c : c,
788
777
  locales: g,
789
- allLocalesSelected: mn(P, g),
778
+ allLocalesSelected: dn(P, g),
790
779
  uniqueKey: y?.uniqueKeyValue ?? null
791
780
  };
792
781
  });
793
- }, le = (e, t) => t?.find((o) => o.uid === e)?.schema.displayName ?? e, hn = (e) => {
782
+ }, de = (e, t) => t?.find((o) => o.uid === e)?.schema.displayName ?? e, mn = (e) => {
794
783
  const t = [
795
784
  e.summary,
796
- ...e.dependencyResults.map((a) => a.summary)
797
- ], o = t.reduce((a, s) => a + s.failed, 0), r = t.reduce((a, s) => a + s.total, 0);
785
+ ...e.dependencyResults.map((i) => i.summary)
786
+ ], o = t.reduce((i, s) => i + s.failed, 0), r = t.reduce((i, s) => i + s.total, 0);
798
787
  return o === 0 ? "success" : o >= r ? "failure" : "partial";
799
- }, pn = ["en", "default"], yn = (e) => {
800
- for (const t of pn) {
788
+ }, gn = ["en", "default"], hn = (e) => {
789
+ for (const t of gn) {
801
790
  const o = e.find((r) => r.locale === t);
802
791
  if (o?.uniqueKey != null && o.uniqueKey.length > 0)
803
792
  return o.uniqueKey;
804
793
  }
805
794
  return e.find((t) => t.uniqueKey != null && t.uniqueKey.length > 0)?.uniqueKey ?? null;
806
- }, fn = (e, t, o) => {
795
+ }, pn = (e, t, o) => {
807
796
  if (e.uniqueKey != null && e.uniqueKey.length > 0)
808
797
  return e.uniqueKey;
809
- const r = e.documentId ?? e.documentKey, a = nt(t).find(
798
+ const r = e.documentId ?? e.documentKey, i = tt(t).find(
810
799
  (s) => s.documentId === r
811
800
  );
812
- if (a) {
813
- const s = he(a, o);
801
+ if (i) {
802
+ const s = pe(i, o);
814
803
  if (s != null && String(s).length > 0)
815
804
  return String(s);
816
805
  }
817
806
  return r;
818
- }, Pn = (e) => {
807
+ }, yn = (e) => {
819
808
  if (e.documentId != null && e.documentId.length > 0)
820
809
  return e.documentId;
821
810
  const t = e.steps.find(
@@ -827,13 +816,13 @@ const _t = 120 * 1e3, Kt = () => {
827
816
  return e.uniqueKey;
828
817
  const o = e.groupKey.lastIndexOf("::");
829
818
  return o === -1 ? e.groupKey : e.groupKey.slice(0, o);
830
- }, Sn = {
819
+ }, fn = {
831
820
  create: "created",
832
821
  update: "updated"
833
- }, st = (e) => e.push.ok ? e.push.skipped || e.action === "skip" ? "skipped" : Sn[e.action] : "failed", Cn = (e) => {
822
+ }, at = (e) => e.push.ok ? e.push.skipped || e.action === "skip" ? "skipped" : fn[e.action] : "failed", Pn = (e) => {
834
823
  const t = e[0];
835
- return t ? st(t) : "skipped";
836
- }, bn = (e) => {
824
+ return t ? at(t) : "skipped";
825
+ }, Sn = (e) => {
837
826
  switch (e) {
838
827
  case "failed":
839
828
  return "danger";
@@ -846,51 +835,51 @@ const _t = 120 * 1e3, Kt = () => {
846
835
  default:
847
836
  return "success";
848
837
  }
849
- }, fe = (e) => {
838
+ }, re = (e) => {
850
839
  const t = /* @__PURE__ */ new Map();
851
840
  for (const o of e) {
852
- const r = o.snapshotKey, a = t.get(r) ?? [];
853
- a.push(o), t.set(r, a);
841
+ const r = o.snapshotKey, i = t.get(r) ?? [];
842
+ i.push(o), t.set(r, i);
854
843
  }
855
844
  return Array.from(t.entries()).map(([o, r]) => {
856
- const a = r.some((l) => !l.push.ok), s = r[r.length - 1];
845
+ const i = r.some((l) => !l.push.ok), s = r[r.length - 1];
857
846
  return {
858
847
  groupKey: o,
859
848
  documentId: s.documentId,
860
849
  locale: s.locale,
861
850
  uniqueKey: s.uniqueKey,
862
- outcome: a ? "failed" : Cn(r),
851
+ outcome: i ? "failed" : Pn(r),
863
852
  steps: r,
864
- hasFailure: a
853
+ hasFailure: i
865
854
  };
866
855
  });
867
- }, ct = (e) => {
868
- const t = fe(e), o = /* @__PURE__ */ new Map();
856
+ }, st = (e) => {
857
+ const t = re(e), o = /* @__PURE__ */ new Map();
869
858
  for (const r of t) {
870
- const a = Pn(r), s = o.get(a) ?? [];
871
- s.push(r), o.set(a, s);
859
+ const i = yn(r), s = o.get(i) ?? [];
860
+ s.push(r), o.set(i, s);
872
861
  }
873
- return Array.from(o.entries()).map(([r, a]) => {
874
- const s = a.sort(
862
+ return Array.from(o.entries()).map(([r, i]) => {
863
+ const s = i.sort(
875
864
  (l, c) => l.locale.localeCompare(c.locale)
876
865
  );
877
866
  return {
878
867
  documentKey: r,
879
868
  documentId: s[0]?.documentId,
880
- uniqueKey: yn(s),
869
+ uniqueKey: hn(s),
881
870
  localeEntries: s
882
871
  };
883
872
  });
884
- }, In = (e, t) => ct(e).map((o) => ({
873
+ }, Cn = (e, t) => st(e).map((o) => ({
885
874
  id: o.documentKey,
886
- title: fn(
875
+ title: pn(
887
876
  o,
888
877
  t?.comparedEntities,
889
878
  t?.contentTypeMainField
890
879
  ),
891
880
  entries: o.localeEntries.flatMap((r) => r.steps)
892
881
  })), je = (e) => {
893
- const t = fe(e);
882
+ const t = re(e);
894
883
  return {
895
884
  entityCount: t.length,
896
885
  created: t.filter((o) => o.outcome === "created").length,
@@ -899,85 +888,87 @@ const _t = 120 * 1e3, Kt = () => {
899
888
  failed: t.filter((o) => o.outcome === "failed").length,
900
889
  locales: [...new Set(t.map((o) => o.locale))].sort()
901
890
  };
902
- }, wn = (e) => {
891
+ }, bn = (e) => {
903
892
  const t = {
904
893
  total: 0,
905
894
  created: 0,
906
895
  updated: 0,
907
896
  skipped: 0,
908
897
  failed: 0
909
- }, o = fe(e);
898
+ }, o = re(e);
910
899
  for (const r of o) {
911
- const a = r.steps[0];
912
- a && (t.total += 1, t[st(a)] += 1);
900
+ const i = r.steps[0];
901
+ i && (t.total += 1, t[at(i)] += 1);
913
902
  }
914
903
  return t;
915
- }, En = (e, t) => {
916
- const o = ct(e.entries), r = je(e.entries), a = [
904
+ }, In = (e) => re(e).filter(
905
+ (t) => t.steps.some((o) => o.hasUnlinkedRelations)
906
+ ).length, wn = (e, t) => {
907
+ const o = st(e.entries), r = je(e.entries), i = [
917
908
  ...new Set(e.selections.map((d) => d.locale))
918
909
  ].sort(), s = e.dependencyResults.map((d) => {
919
910
  const m = je(d.entries);
920
911
  return {
921
912
  contentTypeUid: d.contentTypeUid,
922
- displayName: le(d.contentTypeUid, t),
913
+ displayName: de(d.contentTypeUid, t),
923
914
  ...m
924
915
  };
925
916
  }), l = r.entityCount + s.reduce((d, m) => d + m.entityCount, 0), c = r.failed + s.reduce((d, m) => d + m.failed, 0);
926
917
  return {
927
- outcome: hn(e),
928
- primaryDisplayName: le(e.contentTypeUid, t),
918
+ outcome: mn(e),
919
+ primaryDisplayName: de(e.contentTypeUid, t),
929
920
  primaryEntityCount: o.length,
930
921
  dependencySummaries: s,
931
922
  totalEntityCount: l,
932
923
  totalFailed: c,
933
- selectionLocales: a,
924
+ selectionLocales: i,
934
925
  dependencyContentTypeCount: e.dependencyResults.length,
935
926
  mediaSummary: e.mediaSummary
936
927
  };
937
- }, lt = ({ entries: e, showFailuresOnly: t = !1 }) => {
928
+ }, ct = ({ entries: e, showFailuresOnly: t = !1 }) => {
938
929
  const { formatMessage: o } = b(), r = Je(() => {
939
- const a = fe(e);
940
- return t ? a.filter((s) => s.hasFailure) : a;
930
+ const i = re(e);
931
+ return t ? i.filter((s) => s.hasFailure) : i;
941
932
  }, [e, t]);
942
933
  return r.length === 0 ? /* @__PURE__ */ n(h, { variant: "omega", textColor: "neutral600", children: o({
943
- id: i(
934
+ id: a(
944
935
  t ? "homePage.promotionResults.noFailures" : "homePage.promotionResults.noEntries"
945
936
  )
946
937
  }) }) : /* @__PURE__ */ u(_e, { colCount: 3, rowCount: r.length, children: [
947
938
  /* @__PURE__ */ n(Ke, { children: /* @__PURE__ */ u(H, { children: [
948
- /* @__PURE__ */ n(F, { children: /* @__PURE__ */ n(h, { variant: "sigma", children: o({ id: i("homePage.table.locale") }) }) }),
949
- /* @__PURE__ */ n(F, { children: /* @__PURE__ */ n(h, { variant: "sigma", children: o({ id: i("homePage.table.key") }) }) }),
939
+ /* @__PURE__ */ n(F, { children: /* @__PURE__ */ n(h, { variant: "sigma", children: o({ id: a("homePage.table.locale") }) }) }),
940
+ /* @__PURE__ */ n(F, { children: /* @__PURE__ */ n(h, { variant: "sigma", children: o({ id: a("homePage.table.key") }) }) }),
950
941
  /* @__PURE__ */ n(F, { children: /* @__PURE__ */ n(h, { variant: "sigma", children: o({
951
- id: i("homePage.promotionResults.table.outcome")
942
+ id: a("homePage.promotionResults.table.outcome")
952
943
  }) }) })
953
944
  ] }) }),
954
- /* @__PURE__ */ n(De, { children: r.map((a) => /* @__PURE__ */ u(H, { children: [
955
- /* @__PURE__ */ n(E, { children: /* @__PURE__ */ n(pe, { locale: a.locale }) }),
956
- /* @__PURE__ */ n(E, { children: /* @__PURE__ */ n(ye, { uniqueKey: a.uniqueKey, maxCharacters: 35 }) }),
957
- /* @__PURE__ */ n(E, { children: /* @__PURE__ */ n(z, { variant: bn(a.outcome), children: o({
958
- id: i(`homePage.promotionResults.outcome.${a.outcome}`)
945
+ /* @__PURE__ */ n(De, { children: r.map((i) => /* @__PURE__ */ u(H, { children: [
946
+ /* @__PURE__ */ n(T, { children: /* @__PURE__ */ n(ye, { locale: i.locale }) }),
947
+ /* @__PURE__ */ n(T, { children: /* @__PURE__ */ n(fe, { uniqueKey: i.uniqueKey, maxCharacters: 35 }) }),
948
+ /* @__PURE__ */ n(T, { children: /* @__PURE__ */ n(z, { variant: Sn(i.outcome), children: o({
949
+ id: a(`homePage.promotionResults.outcome.${i.outcome}`)
959
950
  }) }) })
960
- ] }, a.groupKey)) })
951
+ ] }, i.groupKey)) })
961
952
  ] });
962
- }, Tn = ({ summary: e }) => {
963
- const { formatMessage: t } = b(), o = [
953
+ }, En = ({ summary: e, unlinkedRelationCount: t = 0 }) => {
954
+ const { formatMessage: o } = b(), r = [
964
955
  {
965
956
  key: "created",
966
- label: t({ id: i("homePage.promotionResults.summary.created") }),
957
+ label: o({ id: a("homePage.promotionResults.summary.created") }),
967
958
  value: e.created,
968
959
  variant: "success"
969
960
  },
970
961
  {
971
962
  key: "updated",
972
- label: t({ id: i("homePage.promotionResults.summary.updated") }),
963
+ label: o({ id: a("homePage.promotionResults.summary.updated") }),
973
964
  value: e.updated,
974
965
  variant: "secondary"
975
966
  },
976
967
  ...e.skipped > 0 ? [
977
968
  {
978
969
  key: "skipped",
979
- label: t({
980
- id: i("homePage.promotionResults.summary.skipped")
970
+ label: o({
971
+ id: a("homePage.promotionResults.summary.skipped")
981
972
  }),
982
973
  value: e.skipped,
983
974
  variant: "neutral"
@@ -986,20 +977,30 @@ const _t = 120 * 1e3, Kt = () => {
986
977
  ...e.failed > 0 ? [
987
978
  {
988
979
  key: "failed",
989
- label: t({
990
- id: i("homePage.promotionResults.summary.failed")
980
+ label: o({
981
+ id: a("homePage.promotionResults.summary.failed")
991
982
  }),
992
983
  value: e.failed,
993
984
  variant: "danger"
994
985
  }
986
+ ] : [],
987
+ ...t > 0 ? [
988
+ {
989
+ key: "unlinkedRelations",
990
+ label: o({
991
+ id: a("homePage.promotionResults.summary.unlinkedRelations")
992
+ }),
993
+ value: t,
994
+ variant: "warning"
995
+ }
995
996
  ] : []
996
997
  ];
997
- return /* @__PURE__ */ n(f, { gap: 2, wrap: "wrap", children: o.map((r) => /* @__PURE__ */ u(z, { variant: r.variant, children: [
998
- r.label,
998
+ return /* @__PURE__ */ n(f, { gap: 2, wrap: "wrap", children: r.map((i) => /* @__PURE__ */ u(z, { variant: i.variant, children: [
999
+ i.label,
999
1000
  ": ",
1000
- r.value
1001
- ] }, r.key)) });
1002
- }, vn = Be(q.Trigger)`
1001
+ i.value
1002
+ ] }, i.key)) });
1003
+ }, Tn = Be(q.Trigger)`
1003
1004
  width: 100%;
1004
1005
  font-weight: ${({ theme: e }) => e.fontWeights.regular};
1005
1006
 
@@ -1014,16 +1015,22 @@ const _t = 120 * 1e3, Kt = () => {
1014
1015
  }
1015
1016
  }
1016
1017
  `, Xe = ({ items: e }) => /* @__PURE__ */ n(q.Root, { style: { width: "100%" }, size: "S", children: e.map((t) => /* @__PURE__ */ u(q.Item, { value: t.id, children: [
1017
- /* @__PURE__ */ n(q.Header, { children: /* @__PURE__ */ n(vn, { caretPosition: "right", children: /* @__PURE__ */ u(f, { justifyContent: "space-between", alignItems: "center", width: "100%", gap: 2, children: [
1018
+ /* @__PURE__ */ n(q.Header, { children: /* @__PURE__ */ n(Tn, { caretPosition: "right", children: /* @__PURE__ */ u(f, { justifyContent: "space-between", alignItems: "center", width: "100%", gap: 2, children: [
1018
1019
  /* @__PURE__ */ n(V, { maxCharacters: 40, text: t.title, fontWeight: "regular" }),
1019
- /* @__PURE__ */ n(Mt, { style: { flexShrink: 0 }, children: /* @__PURE__ */ n(Tn, { summary: wn(t.entries) }) })
1020
+ /* @__PURE__ */ n(xt, { style: { flexShrink: 0 }, children: /* @__PURE__ */ n(
1021
+ En,
1022
+ {
1023
+ summary: bn(t.entries),
1024
+ unlinkedRelationCount: In(t.entries)
1025
+ }
1026
+ ) })
1020
1027
  ] }) }) }),
1021
- /* @__PURE__ */ n(q.Content, { children: /* @__PURE__ */ n(lt, { entries: t.entries }) })
1022
- ] }, t.id)) }), kn = ({ overview: e }) => {
1028
+ /* @__PURE__ */ n(q.Content, { children: /* @__PURE__ */ n(ct, { entries: t.entries }) })
1029
+ ] }, t.id)) }), vn = ({ overview: e }) => {
1023
1030
  const { formatMessage: t } = b(), o = e.dependencySummaries.map((r) => r.displayName);
1024
1031
  return /* @__PURE__ */ u(f, { direction: "column", alignItems: "stretch", gap: 2, children: [
1025
1032
  /* @__PURE__ */ n(h, { variant: "omega", children: t(
1026
- { id: i("homePage.promotionResults.header.summary") },
1033
+ { id: a("homePage.promotionResults.header.summary") },
1027
1034
  {
1028
1035
  primaryCount: e.primaryEntityCount,
1029
1036
  dependencyCount: e.dependencyContentTypeCount,
@@ -1032,11 +1039,11 @@ const _t = 120 * 1e3, Kt = () => {
1032
1039
  }
1033
1040
  ) }),
1034
1041
  o.length > 0 && /* @__PURE__ */ n(h, { variant: "pi", textColor: "neutral600", children: t(
1035
- { id: i("homePage.promotionResults.header.dependencies") },
1042
+ { id: a("homePage.promotionResults.header.dependencies") },
1036
1043
  { contentTypes: o.join(", ") }
1037
1044
  ) }),
1038
1045
  e.mediaSummary && /* @__PURE__ */ n(h, { variant: "pi", textColor: "neutral600", children: t(
1039
- { id: i("homePage.promotionResults.media.summary") },
1046
+ { id: a("homePage.promotionResults.media.summary") },
1040
1047
  {
1041
1048
  uploaded: e.mediaSummary.uploaded,
1042
1049
  replaced: e.mediaSummary.replaced,
@@ -1044,21 +1051,21 @@ const _t = 120 * 1e3, Kt = () => {
1044
1051
  }
1045
1052
  ) })
1046
1053
  ] });
1047
- }, xn = ({
1054
+ }, kn = ({
1048
1055
  result: e,
1049
1056
  contentTypes: t,
1050
1057
  comparedEntities: o,
1051
1058
  contentTypeMainField: r
1052
1059
  }) => {
1053
- const { formatMessage: a } = b(), s = En(e, t), l = s.outcome, c = [
1060
+ const { formatMessage: i } = b(), s = wn(e, t), l = s.outcome, c = [
1054
1061
  ...e.entries,
1055
1062
  ...e.dependencyResults.flatMap((C) => C.entries)
1056
- ], d = le(e.contentTypeUid, t), m = s.totalFailed > 0, p = e.dependencyResults.length > 0, y = In(e.entries, {
1063
+ ], d = de(e.contentTypeUid, t), m = s.totalFailed > 0, p = e.dependencyResults.length > 0, y = Cn(e.entries, {
1057
1064
  comparedEntities: o,
1058
1065
  contentTypeMainField: r
1059
1066
  }), g = e.dependencyResults.map((C) => ({
1060
1067
  id: C.contentTypeUid,
1061
- title: le(C.contentTypeUid, t),
1068
+ title: de(C.contentTypeUid, t),
1062
1069
  entries: C.entries
1063
1070
  }));
1064
1071
  return /* @__PURE__ */ u(f, { direction: "column", alignItems: "stretch", gap: 4, children: [
@@ -1066,14 +1073,14 @@ const _t = 120 * 1e3, Kt = () => {
1066
1073
  switch (l) {
1067
1074
  case "success":
1068
1075
  return /* @__PURE__ */ n(
1069
- T,
1076
+ w,
1070
1077
  {
1071
1078
  variant: "success",
1072
- title: a({
1073
- id: i("homePage.promotionResults.success.title")
1079
+ title: i({
1080
+ id: a("homePage.promotionResults.success.title")
1074
1081
  }),
1075
- description: a(
1076
- { id: i("homePage.promotionResults.success.description") },
1082
+ description: i(
1083
+ { id: a("homePage.promotionResults.success.description") },
1077
1084
  {
1078
1085
  primaryCount: s.primaryEntityCount
1079
1086
  }
@@ -1082,38 +1089,50 @@ const _t = 120 * 1e3, Kt = () => {
1082
1089
  );
1083
1090
  case "partial":
1084
1091
  return /* @__PURE__ */ n(
1085
- T,
1092
+ w,
1086
1093
  {
1087
1094
  variant: "warning",
1088
- title: a({
1089
- id: i("homePage.promotionResults.partialFailure.title")
1095
+ title: i({
1096
+ id: a("homePage.promotionResults.partialFailure.title")
1090
1097
  }),
1091
- description: a({
1092
- id: i("homePage.promotionResults.partialFailure.description")
1098
+ description: i({
1099
+ id: a("homePage.promotionResults.partialFailure.description")
1093
1100
  })
1094
1101
  }
1095
1102
  );
1096
1103
  case "failure":
1097
1104
  return /* @__PURE__ */ n(
1098
- T,
1105
+ w,
1099
1106
  {
1100
1107
  variant: "danger",
1101
- title: a({
1102
- id: i("homePage.promotionResults.failure.title")
1108
+ title: i({
1109
+ id: a("homePage.promotionResults.failure.title")
1103
1110
  }),
1104
- description: a({
1105
- id: i("homePage.promotionResults.failure.description")
1111
+ description: i({
1112
+ id: a("homePage.promotionResults.failure.description")
1106
1113
  })
1107
1114
  }
1108
1115
  );
1109
1116
  }
1110
1117
  })(),
1111
- /* @__PURE__ */ n(kn, { overview: s }),
1118
+ e.hasUnlinkedRelations && /* @__PURE__ */ n(
1119
+ w,
1120
+ {
1121
+ variant: "warning",
1122
+ title: i({
1123
+ id: a("homePage.promotionResults.unlinkedRelations.title")
1124
+ }),
1125
+ description: i({
1126
+ id: a("homePage.promotionResults.unlinkedRelations.description")
1127
+ })
1128
+ }
1129
+ ),
1130
+ /* @__PURE__ */ n(vn, { overview: s }),
1112
1131
  m && /* @__PURE__ */ u(f, { direction: "column", alignItems: "stretch", gap: 2, children: [
1113
- /* @__PURE__ */ n(h, { variant: "delta", children: a({
1114
- id: i("homePage.promotionResults.failures.title")
1132
+ /* @__PURE__ */ n(h, { variant: "delta", children: i({
1133
+ id: a("homePage.promotionResults.failures.title")
1115
1134
  }) }),
1116
- /* @__PURE__ */ n(lt, { entries: c, showFailuresOnly: !0 })
1135
+ /* @__PURE__ */ n(ct, { entries: c, showFailuresOnly: !0 })
1117
1136
  ] }),
1118
1137
  /* @__PURE__ */ u(f, { direction: "column", alignItems: "stretch", gap: 2, children: [
1119
1138
  /* @__PURE__ */ u(h, { variant: "delta", children: [
@@ -1123,13 +1142,13 @@ const _t = 120 * 1e3, Kt = () => {
1123
1142
  /* @__PURE__ */ n(Xe, { items: y })
1124
1143
  ] }),
1125
1144
  p && /* @__PURE__ */ u(f, { direction: "column", alignItems: "stretch", gap: 2, children: [
1126
- /* @__PURE__ */ n(h, { variant: "delta", children: a({
1127
- id: i("homePage.promotionResults.dependencies.title")
1145
+ /* @__PURE__ */ n(h, { variant: "delta", children: i({
1146
+ id: a("homePage.promotionResults.dependencies.title")
1128
1147
  }) }),
1129
1148
  /* @__PURE__ */ n(Xe, { items: g })
1130
1149
  ] })
1131
1150
  ] });
1132
- }, Mn = ({
1151
+ }, xn = ({
1133
1152
  previews: e,
1134
1153
  mediaDocumentIds: t,
1135
1154
  onToggleMediaDocument: o
@@ -1139,73 +1158,73 @@ const _t = 120 * 1e3, Kt = () => {
1139
1158
  /* @__PURE__ */ n(Ke, { children: /* @__PURE__ */ u(H, { children: [
1140
1159
  /* @__PURE__ */ u(F, { children: [
1141
1160
  /* @__PURE__ */ n(h, { variant: "sigma", children: r({
1142
- id: i("homePage.modal.confirmPromotion.includeMedia")
1161
+ id: a("homePage.modal.confirmPromotion.includeMedia")
1143
1162
  }) }),
1144
1163
  /* @__PURE__ */ n(
1145
1164
  qe,
1146
1165
  {
1147
1166
  label: r({
1148
- id: i("homePage.modal.confirmPromotion.tooltip")
1167
+ id: a("homePage.modal.confirmPromotion.tooltip")
1149
1168
  }),
1150
- children: /* @__PURE__ */ n(qt, { style: { marginLeft: "4px" } })
1169
+ children: /* @__PURE__ */ n(Mt, { style: { marginLeft: "4px" } })
1151
1170
  }
1152
1171
  )
1153
1172
  ] }),
1154
- /* @__PURE__ */ n(F, { children: /* @__PURE__ */ n(h, { variant: "sigma", children: r({ id: i("homePage.table.entryTitle") }) }) }),
1155
- /* @__PURE__ */ n(F, { children: /* @__PURE__ */ n(h, { variant: "sigma", children: r({ id: i("homePage.table.locale") }) }) }),
1156
- /* @__PURE__ */ n(F, { children: /* @__PURE__ */ n(h, { variant: "sigma", children: r({ id: i("homePage.table.key") }) }) })
1173
+ /* @__PURE__ */ n(F, { children: /* @__PURE__ */ n(h, { variant: "sigma", children: r({ id: a("homePage.table.entryTitle") }) }) }),
1174
+ /* @__PURE__ */ n(F, { children: /* @__PURE__ */ n(h, { variant: "sigma", children: r({ id: a("homePage.table.locale") }) }) }),
1175
+ /* @__PURE__ */ n(F, { children: /* @__PURE__ */ n(h, { variant: "sigma", children: r({ id: a("homePage.table.key") }) }) })
1157
1176
  ] }) }),
1158
- /* @__PURE__ */ n(De, { children: e.map((a) => /* @__PURE__ */ u(H, { children: [
1159
- /* @__PURE__ */ n(E, { children: /* @__PURE__ */ n(
1177
+ /* @__PURE__ */ n(De, { children: e.map((i) => /* @__PURE__ */ u(H, { children: [
1178
+ /* @__PURE__ */ n(T, { children: /* @__PURE__ */ n(
1160
1179
  Le,
1161
1180
  {
1162
- checked: t.has(a.documentId),
1163
- onCheckedChange: (s) => o(a.documentId, s === !0),
1181
+ checked: t.has(i.documentId),
1182
+ onCheckedChange: (s) => o(i.documentId, s === !0),
1164
1183
  "aria-label": r(
1165
1184
  {
1166
- id: i("homePage.modal.confirmPromotion.includeMediaForDocument")
1185
+ id: a("homePage.modal.confirmPromotion.includeMediaForDocument")
1167
1186
  },
1168
- { title: a.title }
1187
+ { title: i.title }
1169
1188
  )
1170
1189
  }
1171
1190
  ) }),
1172
- /* @__PURE__ */ n(E, { children: /* @__PURE__ */ n(V, { maxCharacters: 50, text: a.title }) }),
1173
- /* @__PURE__ */ n(E, { children: a.allLocalesSelected ? /* @__PURE__ */ n(h, { variant: "pi", children: r({
1174
- id: i("homePage.modal.confirmPromotion.allLocalesSelected")
1175
- }) }) : /* @__PURE__ */ n(f, { gap: 2, wrap: "wrap", children: a.locales.map((s) => /* @__PURE__ */ n(pe, { locale: s }, `${a.documentId}-${s}`)) }) }),
1176
- /* @__PURE__ */ n(E, { children: /* @__PURE__ */ n(ye, { uniqueKey: a.uniqueKey, maxCharacters: 35 }) })
1177
- ] }, a.documentId)) })
1191
+ /* @__PURE__ */ n(T, { children: /* @__PURE__ */ n(V, { maxCharacters: 50, text: i.title }) }),
1192
+ /* @__PURE__ */ n(T, { children: i.allLocalesSelected ? /* @__PURE__ */ n(h, { variant: "pi", children: r({
1193
+ id: a("homePage.modal.confirmPromotion.allLocalesSelected")
1194
+ }) }) : /* @__PURE__ */ n(f, { gap: 2, wrap: "wrap", children: i.locales.map((s) => /* @__PURE__ */ n(ye, { locale: s }, `${i.documentId}-${s}`)) }) }),
1195
+ /* @__PURE__ */ n(T, { children: /* @__PURE__ */ n(fe, { uniqueKey: i.uniqueKey, maxCharacters: 35 }) })
1196
+ ] }, i.documentId)) })
1178
1197
  ] });
1179
1198
  }, Rn = ({
1180
1199
  open: e,
1181
1200
  onClose: t,
1182
1201
  selectedPromotions: o,
1183
1202
  contentTypeUid: r,
1184
- contentTypeMainField: a,
1203
+ contentTypeMainField: i,
1185
1204
  comparedEntities: s,
1186
1205
  onPromoteComplete: l
1187
1206
  }) => {
1188
- const { formatMessage: c } = b(), { data: d } = sn(), { data: m } = cn(
1207
+ const { formatMessage: c } = b(), { data: d } = rn(), { data: m } = an(
1189
1208
  r,
1190
1209
  e
1191
- ), [p, y] = L(null), [g, P] = L(() => /* @__PURE__ */ new Set()), C = Yt(o), v = jt(C, g), $ = g.size > 0, {
1210
+ ), [p, y] = L(null), [g, P] = L(() => /* @__PURE__ */ new Set()), C = Ht(o), v = Vt(C, g), $ = g.size > 0, {
1192
1211
  mutate: j,
1193
1212
  isPending: x,
1194
1213
  error: O,
1195
1214
  reset: S
1196
- } = ln(), G = () => {
1215
+ } = sn(), G = () => {
1197
1216
  y(null), P(/* @__PURE__ */ new Set()), S();
1198
1217
  };
1199
1218
  ne(() => {
1200
- P((I) => Xt(I, C));
1219
+ P((I) => Yt(I, C));
1201
1220
  }, [C]);
1202
- const Q = m?.contentTypes.map((I) => I.displayName) ?? [], K = gn(
1221
+ const Q = m?.contentTypes.map((I) => I.displayName) ?? [], K = un(
1203
1222
  o,
1204
1223
  s,
1205
- a
1206
- ), M = () => {
1224
+ i
1225
+ ), R = () => {
1207
1226
  G(), t();
1208
- }, R = (I) => {
1227
+ }, M = (I) => {
1209
1228
  P(I ? new Set(C) : /* @__PURE__ */ new Set());
1210
1229
  }, Pe = (I, Ce) => {
1211
1230
  P((J) => {
@@ -1227,35 +1246,35 @@ const _t = 120 * 1e3, Kt = () => {
1227
1246
  );
1228
1247
  }, X = p != null;
1229
1248
  return /* @__PURE__ */ n(
1230
- ue,
1249
+ ge,
1231
1250
  {
1232
1251
  open: e,
1233
- onClose: M,
1252
+ onClose: R,
1234
1253
  onSubmit: Se,
1235
1254
  title: c({
1236
- id: i(
1255
+ id: a(
1237
1256
  X ? "homePage.modal.promotionResults.title" : "homePage.modal.confirmPromotion.title"
1238
1257
  )
1239
1258
  }),
1240
1259
  confirmButtonText: c({
1241
- id: i("homePage.modal.confirmPromotion.confirmButtonText")
1260
+ id: a("homePage.modal.confirmPromotion.confirmButtonText")
1242
1261
  }),
1243
1262
  isConfirmButtonDisabled: x || !r || o.length === 0,
1244
1263
  isConfirmButtonLoading: x,
1245
1264
  showConfirmButton: !X,
1246
1265
  fillMaxHeight: !0,
1247
1266
  children: X ? /* @__PURE__ */ n(
1248
- xn,
1267
+ kn,
1249
1268
  {
1250
1269
  result: p,
1251
1270
  contentTypes: d,
1252
1271
  comparedEntities: s,
1253
- contentTypeMainField: a
1272
+ contentTypeMainField: i
1254
1273
  }
1255
1274
  ) : /* @__PURE__ */ u(f, { direction: "column", gap: 4, alignItems: "stretch", children: [
1256
1275
  /* @__PURE__ */ n(h, { variant: "omega", children: c(
1257
1276
  {
1258
- id: i("homePage.modal.confirmPromotion.description")
1277
+ id: a("homePage.modal.confirmPromotion.description")
1259
1278
  },
1260
1279
  { count: o.length }
1261
1280
  ) }),
@@ -1263,14 +1282,14 @@ const _t = 120 * 1e3, Kt = () => {
1263
1282
  Le,
1264
1283
  {
1265
1284
  checked: v,
1266
- onCheckedChange: (I) => R(I === !0),
1285
+ onCheckedChange: (I) => M(I === !0),
1267
1286
  children: c({
1268
- id: i("homePage.modal.confirmPromotion.includeMediaAll")
1287
+ id: a("homePage.modal.confirmPromotion.includeMediaAll")
1269
1288
  })
1270
1289
  }
1271
1290
  ),
1272
1291
  /* @__PURE__ */ n(
1273
- Mn,
1292
+ xn,
1274
1293
  {
1275
1294
  previews: K,
1276
1295
  mediaDocumentIds: g,
@@ -1278,50 +1297,50 @@ const _t = 120 * 1e3, Kt = () => {
1278
1297
  }
1279
1298
  ),
1280
1299
  /* @__PURE__ */ n(
1281
- T,
1300
+ w,
1282
1301
  {
1283
1302
  variant: "default",
1284
1303
  title: c({
1285
- id: i("homePage.promotionResults.scope.title")
1304
+ id: a("homePage.promotionResults.scope.title")
1286
1305
  }),
1287
1306
  description: c({
1288
- id: i("homePage.modal.confirmPromotion.localeScopeHint")
1307
+ id: a("homePage.modal.confirmPromotion.localeScopeHint")
1289
1308
  })
1290
1309
  }
1291
1310
  ),
1292
1311
  $ && /* @__PURE__ */ n(
1293
- T,
1312
+ w,
1294
1313
  {
1295
1314
  variant: "default",
1296
1315
  title: c({
1297
- id: i("homePage.modal.confirmPromotion.mediaScopeHint.title")
1316
+ id: a("homePage.modal.confirmPromotion.mediaScopeHint.title")
1298
1317
  }),
1299
1318
  description: c({
1300
- id: i("homePage.modal.confirmPromotion.mediaScopeHint.description")
1319
+ id: a("homePage.modal.confirmPromotion.mediaScopeHint.description")
1301
1320
  })
1302
1321
  }
1303
1322
  ),
1304
1323
  Q.length > 0 && /* @__PURE__ */ n(
1305
- T,
1324
+ w,
1306
1325
  {
1307
1326
  variant: "warning",
1308
1327
  title: c({
1309
- id: i("homePage.modal.confirmPromotion.relatedWarning.title")
1328
+ id: a("homePage.modal.confirmPromotion.relatedWarning.title")
1310
1329
  }),
1311
1330
  description: c(
1312
1331
  {
1313
- id: i("homePage.modal.confirmPromotion.relatedWarning.description")
1332
+ id: a("homePage.modal.confirmPromotion.relatedWarning.description")
1314
1333
  },
1315
1334
  { contentTypes: Q.join(", ") }
1316
1335
  )
1317
1336
  }
1318
1337
  ),
1319
- O && /* @__PURE__ */ n(h, { variant: "omega", textColor: "danger500", children: me(O, c) })
1338
+ O && /* @__PURE__ */ n(h, { variant: "omega", textColor: "danger500", children: ue(O, c) })
1320
1339
  ] })
1321
1340
  }
1322
1341
  );
1323
- }, qn = 2500, Ln = 5e3, _n = (e) => e === "running" ? qn : e === "queued" ? Ln : !1, dt = (e, t = !0) => {
1324
- const { get: o } = k(), r = oe(), a = Ze(void 0), s = U({
1342
+ }, Mn = 2500, qn = 5e3, Ln = (e) => e === "running" ? Mn : e === "queued" ? qn : !1, lt = (e, t = !0) => {
1343
+ const { get: o } = k(), r = oe(), i = Ze(void 0), s = U({
1325
1344
  queryKey: ee.list(e),
1326
1345
  queryFn: async () => {
1327
1346
  const { data: l } = await o(
@@ -1330,16 +1349,16 @@ const _t = 120 * 1e3, Kt = () => {
1330
1349
  return l;
1331
1350
  },
1332
1351
  enabled: !!e && t,
1333
- refetchInterval: (l) => _n(l.state.data?.status),
1352
+ refetchInterval: (l) => Ln(l.state.data?.status),
1334
1353
  refetchOnWindowFocus: !0
1335
1354
  });
1336
1355
  return ne(() => {
1337
1356
  if (!e)
1338
1357
  return;
1339
- const l = a.current, c = s.data?.status;
1340
- (l === "running" && c !== "running" || l === "queued" && c === "running") && ge(r, e), a.current = c;
1358
+ const l = i.current, c = s.data?.status;
1359
+ (l === "running" && c !== "running" || l === "queued" && c === "running") && he(r, e), i.current = c;
1341
1360
  }, [s.data?.status, e, r]), s;
1342
- }, Kn = ({
1361
+ }, _n = ({
1343
1362
  syncStatus: e,
1344
1363
  isSyncInProgressFromComparison: t
1345
1364
  }) => {
@@ -1356,69 +1375,69 @@ const _t = 120 * 1e3, Kt = () => {
1356
1375
  default:
1357
1376
  return "none";
1358
1377
  }
1359
- }, Dn = Be(Rt)`
1378
+ }, Kn = Be(Rt)`
1360
1379
  background-color: ${({ theme: e }) => e.colors.neutral600};
1361
1380
  & > div {
1362
1381
  background-color: ${({ theme: e }) => e.colors.neutral150};
1363
1382
  }
1364
1383
  `, ve = ({ lastProcessedPage: e, totalPages: t }) => {
1365
- const { formatMessage: o } = b(), r = (a, s) => Math.round(Number(a) / Number(s) * 100);
1384
+ const { formatMessage: o } = b(), r = (i, s) => Math.round(Number(i) / Number(s) * 100);
1366
1385
  return /* @__PURE__ */ u(f, { direction: "row", gap: 2, alignItems: "center", children: [
1367
1386
  /* @__PURE__ */ n(h, { variant: "omega", children: o(
1368
1387
  {
1369
- id: i("homePage.alert.syncInProgress.progress")
1388
+ id: a("homePage.alert.syncInProgress.progress")
1370
1389
  },
1371
1390
  {
1372
1391
  currentPage: e,
1373
1392
  totalPages: t
1374
1393
  }
1375
1394
  ) }),
1376
- /* @__PURE__ */ n(Dn, { value: r(e, t) })
1395
+ /* @__PURE__ */ n(Kn, { value: r(e, t) })
1377
1396
  ] });
1378
- }, An = ({
1397
+ }, Dn = ({
1379
1398
  view: e,
1380
1399
  syncStatus: t,
1381
1400
  onRefresh: o,
1382
1401
  onCancel: r,
1383
- onResume: a,
1402
+ onResume: i,
1384
1403
  canExecute: s
1385
1404
  }) => {
1386
1405
  const { formatMessage: l } = b();
1387
1406
  if (e === "none")
1388
1407
  return null;
1389
- const c = Nt(t?.error, l), m = (() => {
1408
+ const c = Lt(t?.error, l), m = (() => {
1390
1409
  switch (e) {
1391
1410
  case "queued":
1392
1411
  return {
1393
1412
  title: l({
1394
- id: i("homePage.alert.syncQueued.title")
1413
+ id: a("homePage.alert.syncQueued.title")
1395
1414
  }),
1396
1415
  description: /* @__PURE__ */ u(f, { direction: "column", gap: 2, alignItems: "flex-start", children: [
1397
1416
  /* @__PURE__ */ n(h, { variant: "omega", children: l({
1398
- id: i("homePage.alert.syncQueued.description")
1417
+ id: a("homePage.alert.syncQueued.description")
1399
1418
  }) }),
1400
1419
  t?.queuePosition != null ? /* @__PURE__ */ n(h, { variant: "omega", textColor: "neutral600", children: l(
1401
- { id: i("homePage.alert.syncQueued.position") },
1420
+ { id: a("homePage.alert.syncQueued.position") },
1402
1421
  { position: t.queuePosition }
1403
1422
  ) }) : null,
1404
1423
  t?.queuedAt ? /* @__PURE__ */ n(h, { variant: "omega", textColor: "neutral600", children: l(
1405
- { id: i("homePage.alert.syncQueued.queuedAt") },
1424
+ { id: a("homePage.alert.syncQueued.queuedAt") },
1406
1425
  { queuedAt: new Date(t.queuedAt).toLocaleString() }
1407
1426
  ) }) : null
1408
1427
  ] }),
1409
- action: /* @__PURE__ */ n(w, { onClick: o, variant: "secondary", children: l({
1410
- id: i("homePage.alert.syncQueued.linkText")
1428
+ action: /* @__PURE__ */ n(E, { onClick: o, variant: "secondary", children: l({
1429
+ id: a("homePage.alert.syncQueued.linkText")
1411
1430
  }) }),
1412
1431
  variant: "default"
1413
1432
  };
1414
1433
  case "in_progress":
1415
1434
  return {
1416
1435
  title: l({
1417
- id: i("homePage.alert.syncInProgress.title")
1436
+ id: a("homePage.alert.syncInProgress.title")
1418
1437
  }),
1419
1438
  description: /* @__PURE__ */ u(f, { direction: "column", gap: 2, alignItems: "flex-start", children: [
1420
1439
  /* @__PURE__ */ n(h, { variant: "omega", children: l({
1421
- id: i("homePage.alert.syncInProgress.description")
1440
+ id: a("homePage.alert.syncInProgress.description")
1422
1441
  }) }),
1423
1442
  /* @__PURE__ */ n(
1424
1443
  ve,
@@ -1429,11 +1448,11 @@ const _t = 120 * 1e3, Kt = () => {
1429
1448
  )
1430
1449
  ] }),
1431
1450
  action: /* @__PURE__ */ u(f, { direction: "row", gap: 2, alignItems: "center", children: [
1432
- /* @__PURE__ */ n(w, { onClick: o, variant: "secondary", children: l({
1433
- id: i("homePage.alert.syncInProgress.linkText")
1451
+ /* @__PURE__ */ n(E, { onClick: o, variant: "secondary", children: l({
1452
+ id: a("homePage.alert.syncInProgress.linkText")
1434
1453
  }) }),
1435
- s ? /* @__PURE__ */ n(w, { variant: "danger-light", onClick: r, children: l({
1436
- id: i("common.button.cancel")
1454
+ s ? /* @__PURE__ */ n(E, { variant: "danger-light", onClick: r, children: l({
1455
+ id: a("common.button.cancel")
1437
1456
  }) }) : null
1438
1457
  ] }),
1439
1458
  variant: "default"
@@ -1441,11 +1460,11 @@ const _t = 120 * 1e3, Kt = () => {
1441
1460
  case "cancelled":
1442
1461
  return {
1443
1462
  title: l({
1444
- id: i("homePage.alert.resumeSync.title")
1463
+ id: a("homePage.alert.resumeSync.title")
1445
1464
  }),
1446
1465
  description: /* @__PURE__ */ u(f, { direction: "column", gap: 2, alignItems: "flex-start", children: [
1447
1466
  /* @__PURE__ */ n(h, { variant: "omega", children: l({
1448
- id: i("homePage.alert.resumeSync.description")
1467
+ id: a("homePage.alert.resumeSync.description")
1449
1468
  }) }),
1450
1469
  /* @__PURE__ */ n(
1451
1470
  ve,
@@ -1455,19 +1474,19 @@ const _t = 120 * 1e3, Kt = () => {
1455
1474
  }
1456
1475
  )
1457
1476
  ] }),
1458
- action: s ? /* @__PURE__ */ n(w, { onClick: a, variant: "secondary", children: l({
1459
- id: i("homePage.alert.resumeSync.linkText")
1477
+ action: s ? /* @__PURE__ */ n(E, { onClick: i, variant: "secondary", children: l({
1478
+ id: a("homePage.alert.resumeSync.linkText")
1460
1479
  }) }) : void 0,
1461
1480
  variant: "warning"
1462
1481
  };
1463
1482
  case "failed":
1464
1483
  return {
1465
1484
  title: l({
1466
- id: i("homePage.alert.syncFailed.title")
1485
+ id: a("homePage.alert.syncFailed.title")
1467
1486
  }),
1468
1487
  description: /* @__PURE__ */ u(f, { direction: "column", gap: 2, alignItems: "flex-start", children: [
1469
1488
  /* @__PURE__ */ n(h, { variant: "omega", children: l({
1470
- id: i("homePage.alert.syncFailed.description")
1489
+ id: a("homePage.alert.syncFailed.description")
1471
1490
  }) }),
1472
1491
  c ? /* @__PURE__ */ n(h, { variant: "omega", textColor: "danger500", children: c }) : null,
1473
1492
  /* @__PURE__ */ n(
@@ -1478,8 +1497,8 @@ const _t = 120 * 1e3, Kt = () => {
1478
1497
  }
1479
1498
  )
1480
1499
  ] }),
1481
- action: s ? /* @__PURE__ */ n(w, { onClick: a, variant: "secondary", children: l({
1482
- id: i("homePage.alert.syncFailed.linkText")
1500
+ action: s ? /* @__PURE__ */ n(E, { onClick: i, variant: "secondary", children: l({
1501
+ id: a("homePage.alert.syncFailed.linkText")
1483
1502
  }) }) : void 0,
1484
1503
  variant: "danger"
1485
1504
  };
@@ -1488,7 +1507,7 @@ const _t = 120 * 1e3, Kt = () => {
1488
1507
  }
1489
1508
  })();
1490
1509
  return /* @__PURE__ */ n(
1491
- T,
1510
+ w,
1492
1511
  {
1493
1512
  title: m?.title,
1494
1513
  description: m?.description,
@@ -1496,25 +1515,25 @@ const _t = 120 * 1e3, Kt = () => {
1496
1515
  variant: m?.variant
1497
1516
  }
1498
1517
  );
1499
- }, Bn = () => {
1518
+ }, An = () => {
1500
1519
  const { post: e } = k(), t = oe();
1501
- return de({
1520
+ return me({
1502
1521
  mutationFn: async () => await e(`/${_}/snapshot/sync/cancel`),
1503
1522
  onSuccess: () => {
1504
- ge(t);
1523
+ he(t);
1505
1524
  }
1506
1525
  });
1507
- }, Nn = ({ open: e, onClose: t }) => {
1526
+ }, Bn = ({ open: e, onClose: t }) => {
1508
1527
  const { formatMessage: o } = b(), {
1509
1528
  mutate: r,
1510
- isPending: a,
1529
+ isPending: i,
1511
1530
  error: s,
1512
1531
  reset: l
1513
- } = Bn(), c = () => {
1532
+ } = An(), c = () => {
1514
1533
  t(), l();
1515
1534
  };
1516
1535
  return /* @__PURE__ */ n(
1517
- ue,
1536
+ ge,
1518
1537
  {
1519
1538
  open: e,
1520
1539
  onClose: c,
@@ -1522,76 +1541,76 @@ const _t = 120 * 1e3, Kt = () => {
1522
1541
  title: /* @__PURE__ */ u(f, { direction: "row", gap: 2, alignItems: "center", children: [
1523
1542
  /* @__PURE__ */ n(Ae, { fill: "danger500", width: 20, height: 20 }),
1524
1543
  o({
1525
- id: i("homePage.modal.cancelSync.title")
1544
+ id: a("homePage.modal.cancelSync.title")
1526
1545
  })
1527
1546
  ] }),
1528
1547
  confirmButtonText: o({
1529
- id: i("homePage.modal.cancelSync.confirmButtonText")
1548
+ id: a("homePage.modal.cancelSync.confirmButtonText")
1530
1549
  }),
1531
- isConfirmButtonLoading: a,
1550
+ isConfirmButtonLoading: i,
1532
1551
  children: /* @__PURE__ */ u(f, { direction: "column", gap: 4, alignItems: "stretch", children: [
1533
1552
  /* @__PURE__ */ n(h, { variant: "omega", children: o({
1534
- id: i("homePage.modal.cancelSync.description")
1553
+ id: a("homePage.modal.cancelSync.description")
1535
1554
  }) }),
1536
- s && /* @__PURE__ */ n(h, { variant: "omega", textColor: "danger500", children: me(s, o) })
1555
+ s && /* @__PURE__ */ n(h, { variant: "omega", textColor: "danger500", children: ue(s, o) })
1537
1556
  ] })
1538
1557
  }
1539
1558
  );
1540
- }, Fn = () => {
1559
+ }, Nn = () => {
1541
1560
  const { post: e } = k(), t = oe();
1542
- return de({
1561
+ return me({
1543
1562
  mutationFn: async (o) => await e(`/${_}/snapshot/sync/${o}/resume`),
1544
1563
  onSuccess: () => {
1545
- ge(t);
1564
+ he(t);
1546
1565
  }
1547
1566
  });
1548
- }, On = ({ open: e, onClose: t, jobDocumentId: o }) => {
1567
+ }, Fn = ({ open: e, onClose: t, jobDocumentId: o }) => {
1549
1568
  const { formatMessage: r } = b(), {
1550
- mutate: a,
1569
+ mutate: i,
1551
1570
  isPending: s,
1552
1571
  error: l,
1553
1572
  reset: c
1554
- } = Fn(), d = () => {
1573
+ } = Nn(), d = () => {
1555
1574
  t(), c();
1556
1575
  };
1557
1576
  return /* @__PURE__ */ n(
1558
- ue,
1577
+ ge,
1559
1578
  {
1560
1579
  open: e,
1561
1580
  onClose: d,
1562
- onSubmit: () => a(o, { onSuccess: d }),
1581
+ onSubmit: () => i(o, { onSuccess: d }),
1563
1582
  title: r({
1564
- id: i("homePage.modal.resumeSync.title")
1583
+ id: a("homePage.modal.resumeSync.title")
1565
1584
  }),
1566
1585
  confirmButtonText: r({
1567
- id: i("homePage.modal.resumeSync.confirmButtonText")
1586
+ id: a("homePage.modal.resumeSync.confirmButtonText")
1568
1587
  }),
1569
1588
  isConfirmButtonDisabled: !o,
1570
1589
  isConfirmButtonLoading: s,
1571
1590
  children: /* @__PURE__ */ u(f, { direction: "column", gap: 4, alignItems: "stretch", children: [
1572
1591
  /* @__PURE__ */ n(h, { variant: "omega", children: r({
1573
- id: i("homePage.modal.resumeSync.description")
1592
+ id: a("homePage.modal.resumeSync.description")
1574
1593
  }) }),
1575
- l && /* @__PURE__ */ n(h, { variant: "omega", textColor: "danger500", children: me(l, r) })
1594
+ l && /* @__PURE__ */ n(h, { variant: "omega", textColor: "danger500", children: ue(l, r) })
1576
1595
  ] })
1577
1596
  }
1578
1597
  );
1579
- }, Un = ({
1598
+ }, On = ({
1580
1599
  contentTypeUid: e,
1581
1600
  isSyncInProgressFromComparison: t,
1582
1601
  canExecute: o,
1583
1602
  enabled: r = !0
1584
1603
  }) => {
1585
- const [a, s] = L(!1), [l, c] = L(!1), { data: d, refetch: m } = dt(
1604
+ const [i, s] = L(!1), [l, c] = L(!1), { data: d, refetch: m } = lt(
1586
1605
  e,
1587
1606
  r
1588
- ), p = Kn({
1607
+ ), p = _n({
1589
1608
  syncStatus: d,
1590
1609
  isSyncInProgressFromComparison: t
1591
1610
  }), y = d?.jobDocumentId ?? "";
1592
1611
  return /* @__PURE__ */ u(A, { children: [
1593
1612
  /* @__PURE__ */ n(
1594
- An,
1613
+ Dn,
1595
1614
  {
1596
1615
  view: p,
1597
1616
  syncStatus: d,
@@ -1602,9 +1621,9 @@ const _t = 120 * 1e3, Kt = () => {
1602
1621
  }
1603
1622
  ),
1604
1623
  o ? /* @__PURE__ */ u(A, { children: [
1605
- /* @__PURE__ */ n(Nn, { open: a, onClose: () => s(!1) }),
1624
+ /* @__PURE__ */ n(Bn, { open: i, onClose: () => s(!1) }),
1606
1625
  /* @__PURE__ */ n(
1607
- On,
1626
+ Fn,
1608
1627
  {
1609
1628
  open: l,
1610
1629
  onClose: () => c(!1),
@@ -1613,7 +1632,7 @@ const _t = 120 * 1e3, Kt = () => {
1613
1632
  )
1614
1633
  ] }) : null
1615
1634
  ] });
1616
- }, $n = (e) => {
1635
+ }, Un = (e) => {
1617
1636
  const { get: t } = k();
1618
1637
  return U({
1619
1638
  queryKey: ["compare-schemas"],
@@ -1623,10 +1642,10 @@ const _t = 120 * 1e3, Kt = () => {
1623
1642
  },
1624
1643
  enabled: e
1625
1644
  });
1626
- }, Gn = (e = !0) => {
1645
+ }, $n = (e = !0) => {
1627
1646
  const { get: t } = k();
1628
1647
  return U({
1629
- queryKey: [Et],
1648
+ queryKey: [wt],
1630
1649
  enabled: e,
1631
1650
  queryFn: async () => {
1632
1651
  const { data: o } = await t(
@@ -1635,35 +1654,35 @@ const _t = 120 * 1e3, Kt = () => {
1635
1654
  return o.contentTypes;
1636
1655
  }
1637
1656
  });
1638
- }, Qn = (e, t) => {
1639
- const o = new Set((e ?? []).map((a) => a.documentId)), r = [...t.entries()].filter(([a]) => !o.has(a)).map(([, a]) => Vt(a)).filter((a) => a != null);
1657
+ }, Gn = (e, t) => {
1658
+ const o = new Set((e ?? []).map((i) => i.documentId)), r = [...t.entries()].filter(([i]) => !o.has(i)).map(([, i]) => Qt(i)).filter((i) => i != null);
1640
1659
  return [...e ?? [], ...r];
1641
- }, Hn = (e, t) => {
1642
- const o = new Set(t.map((a) => a.documentId)), r = /* @__PURE__ */ new Map();
1643
- for (const [a, s] of e)
1644
- o.has(a) && r.set(a, s);
1660
+ }, Qn = (e, t) => {
1661
+ const o = new Set(t.map((i) => i.documentId)), r = /* @__PURE__ */ new Map();
1662
+ for (const [i, s] of e)
1663
+ o.has(i) && r.set(i, s);
1645
1664
  return r;
1646
- }, Vn = (e, t) => {
1665
+ }, Hn = (e, t) => {
1647
1666
  const o = t[0]?.documentId;
1648
1667
  if (!o)
1649
1668
  return e;
1650
1669
  const r = new Map(e);
1651
1670
  return r.set(o, t), r;
1652
- }, Yn = (e) => {
1653
- const [t, o] = L([]), [r, a] = L(() => /* @__PURE__ */ new Map()), s = Ve(() => {
1654
- o([]), a(/* @__PURE__ */ new Map());
1671
+ }, Vn = (e) => {
1672
+ const [t, o] = L([]), [r, i] = L(() => /* @__PURE__ */ new Map()), s = Ve(() => {
1673
+ o([]), i(/* @__PURE__ */ new Map());
1655
1674
  }, []);
1656
1675
  ne(() => {
1657
- a(
1658
- (d) => Hn(d, t)
1676
+ i(
1677
+ (d) => Qn(d, t)
1659
1678
  );
1660
1679
  }, [t]);
1661
1680
  const l = Ve((d) => {
1662
- a(
1663
- (m) => Vn(m, d)
1681
+ i(
1682
+ (m) => Hn(m, d)
1664
1683
  );
1665
1684
  }, []), c = Je(
1666
- () => Qn(e, r),
1685
+ () => Gn(e, r),
1667
1686
  [e, r]
1668
1687
  );
1669
1688
  return {
@@ -1673,19 +1692,19 @@ const _t = 120 * 1e3, Kt = () => {
1673
1692
  rememberEntityGroup: l,
1674
1693
  entitiesForPreview: c
1675
1694
  };
1676
- }, jn = () => {
1695
+ }, Yn = () => {
1677
1696
  const { formatMessage: e } = b(), {
1678
1697
  isLoading: t,
1679
1698
  allowedActions: { canExecute: o = !1, canRead: r = !1 }
1680
- } = St([...ke.promotionExecute, ...ke.settingsRead]), [{ query: a }, s] = Ct(), l = Ze(!1), c = ae.object({
1699
+ } = Pt([...ke.promotionExecute, ...ke.settingsRead]), [{ query: i }, s] = St(), l = Ze(!1), c = ae.object({
1681
1700
  page: ae.coerce.number().optional().default(1),
1682
1701
  pageSize: ae.coerce.number().optional().default(10),
1683
1702
  uid: ae.string().optional()
1684
- }).parse(a), [d, m] = L(!1), { data: p, isLoading: y } = Kt(), g = p?.active === !0, P = !y && p?.active === !1, { data: C } = dt(c.uid ?? "", g), {
1703
+ }).parse(i), [d, m] = L(!1), { data: p, isLoading: y } = Kt(), g = p?.active === !0, P = !y && p?.active === !1, { data: C } = lt(c.uid ?? "", g), {
1685
1704
  data: v,
1686
1705
  isSuccess: $,
1687
1706
  isLoading: j
1688
- } = Gn(g), x = $ && (v?.length ?? 0) > 0, O = v?.map((B) => ({
1707
+ } = $n(g), x = $ && (v?.length ?? 0) > 0, O = v?.map((B) => ({
1689
1708
  key: B.uid,
1690
1709
  value: B.uid,
1691
1710
  label: B.displayName
@@ -1693,55 +1712,55 @@ const _t = 120 * 1e3, Kt = () => {
1693
1712
  data: S,
1694
1713
  isLoading: G,
1695
1714
  error: Q
1696
- } = Ft({
1715
+ } = Bt({
1697
1716
  uid: c.uid,
1698
1717
  page: c.page,
1699
1718
  pageSize: c.pageSize,
1700
1719
  enabled: g
1701
1720
  }), {
1702
1721
  selectedPromotions: K,
1703
- setSelectedPromotions: M,
1704
- clear: R,
1722
+ setSelectedPromotions: R,
1723
+ clear: M,
1705
1724
  rememberEntityGroup: Pe,
1706
1725
  entitiesForPreview: Se
1707
- } = Yn(S?.results), X = (B) => {
1726
+ } = Vn(S?.results), X = (B) => {
1708
1727
  l.current = !1, s({
1709
- ...a,
1728
+ ...i,
1710
1729
  page: 1,
1711
1730
  pageSize: 10,
1712
1731
  uid: B
1713
- }), R();
1732
+ }), M();
1714
1733
  }, I = () => {
1715
1734
  l.current = !0, s({
1716
- ...a,
1735
+ ...i,
1717
1736
  page: 1,
1718
1737
  pageSize: 10,
1719
1738
  uid: void 0
1720
- }), R();
1739
+ }), M();
1721
1740
  }, Ce = () => {
1722
- m(!1), R();
1741
+ m(!1), M();
1723
1742
  }, {
1724
1743
  data: J,
1725
1744
  isLoading: D,
1726
1745
  error: Fe
1727
- } = $n(g && x), Oe = S?.mainField, ut = S?.maxDepthReached, be = S?.errors, mt = be?.type === "unconfigured_relations" ? be : void 0, Ie = be?.type === "sync_in_progress", we = Ie || C?.status === "running", re = !P && !D && (!!Fe || !!J && !J?.isMatch), Ue = !o || y || P || D || re || Ie || C?.status === "running" || C?.status === "queued", gt = !!c.uid && G, ht = () => {
1746
+ } = Un(g && x), Oe = S?.mainField, dt = S?.maxDepthReached, be = S?.errors, ut = be?.type === "unconfigured_relations" ? be : void 0, Ie = be?.type === "sync_in_progress", we = Ie || C?.status === "running", ie = !P && !D && (!!Fe || !!J && !J?.isMatch), Ue = !o || y || P || D || ie || Ie || C?.status === "running" || C?.status === "queued", mt = !!c.uid && G, gt = () => {
1728
1747
  switch (!0) {
1729
- case (j || gt):
1748
+ case (j || mt):
1730
1749
  return /* @__PURE__ */ n(Te, {});
1731
1750
  case ($ && !x):
1732
1751
  return /* @__PURE__ */ n(
1733
- T,
1752
+ w,
1734
1753
  {
1735
1754
  title: e({
1736
- id: i("homePage.alert.configurationNeeded.title")
1755
+ id: a("homePage.alert.configurationNeeded.title")
1737
1756
  }),
1738
1757
  description: e({
1739
- id: i(
1758
+ id: a(
1740
1759
  r ? "homePage.alert.configurationNeeded.description" : "homePage.alert.configurationNeeded.readOnlyDescription"
1741
1760
  )
1742
1761
  }),
1743
- action: r ? /* @__PURE__ */ n(Re, { tag: Me, to: "/settings/xecp/configuration", children: e({
1744
- id: i("homePage.alert.configurationNeeded.linkText")
1762
+ action: r ? /* @__PURE__ */ n(Me, { tag: Re, to: "/settings/xecp/configuration", children: e({
1763
+ id: a("homePage.alert.configurationNeeded.linkText")
1745
1764
  }) }) : void 0,
1746
1765
  variant: "danger"
1747
1766
  }
@@ -1751,31 +1770,31 @@ const _t = 120 * 1e3, Kt = () => {
1751
1770
  W,
1752
1771
  {
1753
1772
  content: e({
1754
- id: i("homePage.alert.syncInProgress.contentUnavailable")
1773
+ id: a("homePage.alert.syncInProgress.contentUnavailable")
1755
1774
  })
1756
1775
  }
1757
1776
  );
1758
1777
  case (S?.results && S?.results?.length > 0):
1759
1778
  return /* @__PURE__ */ u(A, { children: [
1760
- ut && /* @__PURE__ */ n(
1761
- T,
1779
+ dt && /* @__PURE__ */ n(
1780
+ w,
1762
1781
  {
1763
1782
  title: e({
1764
- id: i("homePage.alert.maxDepthExceeded.title")
1783
+ id: a("homePage.alert.maxDepthExceeded.title")
1765
1784
  }),
1766
1785
  variant: "warning",
1767
1786
  description: e({
1768
- id: i("homePage.alert.maxDepthExceeded.description")
1787
+ id: a("homePage.alert.maxDepthExceeded.description")
1769
1788
  })
1770
1789
  }
1771
1790
  ),
1772
1791
  /* @__PURE__ */ n(
1773
- an,
1792
+ on,
1774
1793
  {
1775
1794
  entities: S?.results,
1776
1795
  contentTypeMainField: Oe,
1777
1796
  selectedPromotions: K,
1778
- setSelectedPromotions: M,
1797
+ setSelectedPromotions: R,
1779
1798
  onRememberEntityGroup: Pe,
1780
1799
  canExecute: o && !P
1781
1800
  }
@@ -1786,16 +1805,16 @@ const _t = 120 * 1e3, Kt = () => {
1786
1805
  W,
1787
1806
  {
1788
1807
  icon: /* @__PURE__ */ n(Ae, { width: 24, height: 24 }),
1789
- content: e({ id: i("homePage.errorLoadingEntities") })
1808
+ content: e({ id: a("homePage.errorLoadingEntities") })
1790
1809
  }
1791
1810
  );
1792
1811
  case (S?.results && S?.results?.length === 0):
1793
1812
  return /* @__PURE__ */ n(
1794
- Qt,
1813
+ $t,
1795
1814
  {
1796
1815
  contentTypeUid: c.uid ?? "",
1797
1816
  hasExistingSnapshot: S?.snapshot?.exists ?? !1,
1798
- unconfiguredRelationsError: mt,
1817
+ unconfiguredRelationsError: ut,
1799
1818
  isGetSnapshotDisabled: Ue,
1800
1819
  canExecute: o && !P,
1801
1820
  canReadSettings: r
@@ -1806,28 +1825,28 @@ const _t = 120 * 1e3, Kt = () => {
1806
1825
  W,
1807
1826
  {
1808
1827
  content: e({
1809
- id: i("homePage.youNeedToSelectAContentTypeToSeeTheEntities")
1828
+ id: a("homePage.youNeedToSelectAContentTypeToSeeTheEntities")
1810
1829
  })
1811
1830
  }
1812
1831
  );
1813
1832
  }
1814
- }, $e = S?.snapshot?.exists ?? !1, pt = !we && $e && S?.pagination && S?.pagination?.pageCount > 0, yt = !o || y || P || D || !x || re || !c.uid || K.length === 0 || we, ft = j || y || D || P || re || !x, Pt = () => {
1833
+ }, $e = S?.snapshot?.exists ?? !1, ht = !we && $e && S?.pagination && S?.pagination?.pageCount > 0, pt = !o || y || P || D || !x || ie || !c.uid || K.length === 0 || we, yt = j || y || D || P || ie || !x, ft = () => {
1815
1834
  switch (!0) {
1816
1835
  case y:
1817
1836
  return /* @__PURE__ */ u(f, { gap: 2, alignItems: "center", children: [
1818
1837
  /* @__PURE__ */ n(Te, { small: !0 }),
1819
- /* @__PURE__ */ n(h, { variant: "omega", children: e({ id: i("homePage.verifyingLicense") }) })
1838
+ /* @__PURE__ */ n(h, { variant: "omega", children: e({ id: a("homePage.verifyingLicense") }) })
1820
1839
  ] });
1821
1840
  case P:
1822
- return /* @__PURE__ */ n($t, { canReadSettings: r });
1841
+ return /* @__PURE__ */ n(Ot, { canReadSettings: r });
1823
1842
  case D:
1824
1843
  return /* @__PURE__ */ u(f, { gap: 2, alignItems: "center", children: [
1825
1844
  /* @__PURE__ */ n(Te, { small: !0 }),
1826
- /* @__PURE__ */ n(h, { variant: "omega", children: e({ id: i("homePage.verifyingSchemas") }) })
1845
+ /* @__PURE__ */ n(h, { variant: "omega", children: e({ id: a("homePage.verifyingSchemas") }) })
1827
1846
  ] });
1828
- case re:
1847
+ case ie:
1829
1848
  return /* @__PURE__ */ n(
1830
- Gt,
1849
+ Ut,
1831
1850
  {
1832
1851
  compareSchemasData: J,
1833
1852
  errorCompareSchemas: Fe?.message
@@ -1841,38 +1860,38 @@ const _t = 120 * 1e3, Kt = () => {
1841
1860
  if (Ge) return;
1842
1861
  const B = v?.[0]?.uid;
1843
1862
  B && s({
1844
- ...a,
1863
+ ...i,
1845
1864
  uid: B,
1846
1865
  page: 1,
1847
1866
  pageSize: 10
1848
1867
  });
1849
- }, [Ge, v, a, s]), t ? /* @__PURE__ */ n(Z.Loading, {}) : /* @__PURE__ */ u(A, { children: [
1850
- /* @__PURE__ */ n(Z.Title, { children: e({ id: i("homePage.title") }) }),
1868
+ }, [Ge, v, i, s]), t ? /* @__PURE__ */ n(Z.Loading, {}) : /* @__PURE__ */ u(A, { children: [
1869
+ /* @__PURE__ */ n(Z.Title, { children: e({ id: a("homePage.title") }) }),
1851
1870
  /* @__PURE__ */ u(Z.Main, { children: [
1852
1871
  /* @__PURE__ */ n(
1853
1872
  Qe.Header,
1854
1873
  {
1855
- title: e({ id: i("homePage.title") }),
1856
- primaryAction: o ? /* @__PURE__ */ n(w, { disabled: yt, onClick: () => m(!0), children: e({ id: i("homePage.promoteContent") }) }) : null
1874
+ title: e({ id: a("homePage.title") }),
1875
+ primaryAction: o ? /* @__PURE__ */ n(E, { disabled: pt, onClick: () => m(!0), children: e({ id: a("homePage.promoteContent") }) }) : null
1857
1876
  }
1858
1877
  ),
1859
1878
  /* @__PURE__ */ n(Qe.Content, { children: /* @__PURE__ */ u(f, { direction: "column", alignItems: "stretch", gap: 4, children: [
1860
- Pt(),
1879
+ ft(),
1861
1880
  /* @__PURE__ */ n(f, { children: /* @__PURE__ */ n(
1862
1881
  Dt,
1863
1882
  {
1864
1883
  name: "contentType",
1865
- placeholder: e({ id: i("homePage.selectContentType") }),
1884
+ placeholder: e({ id: a("homePage.selectContentType") }),
1866
1885
  onClear: I,
1867
1886
  onChange: X,
1868
1887
  options: O,
1869
1888
  value: c.uid,
1870
- disabled: ft
1889
+ disabled: yt
1871
1890
  }
1872
1891
  ) }),
1873
1892
  c?.uid && !P ? /* @__PURE__ */ u(A, { children: [
1874
1893
  /* @__PURE__ */ n(
1875
- Un,
1894
+ On,
1876
1895
  {
1877
1896
  contentTypeUid: c.uid,
1878
1897
  isSyncInProgressFromComparison: Ie,
@@ -1881,20 +1900,20 @@ const _t = 120 * 1e3, Kt = () => {
1881
1900
  }
1882
1901
  ),
1883
1902
  /* @__PURE__ */ n(
1884
- Ut,
1903
+ Ft,
1885
1904
  {
1886
1905
  contentTypeUid: c.uid,
1887
1906
  selectedPromotionsLength: K.length,
1888
1907
  syncedAt: S?.snapshot?.syncedAt ?? null,
1889
1908
  isGetSnapshotDisabled: Ue,
1890
1909
  hasSnapshot: $e,
1891
- clearSelectedPromotions: R,
1910
+ clearSelectedPromotions: M,
1892
1911
  canExecute: o && !P
1893
1912
  }
1894
1913
  )
1895
1914
  ] }) : null,
1896
- P ? null : ht(),
1897
- pt && !P ? /* @__PURE__ */ u(
1915
+ P ? null : gt(),
1916
+ ht && !P ? /* @__PURE__ */ u(
1898
1917
  Ee.Root,
1899
1918
  {
1900
1919
  total: S?.pagination?.total || 0,
@@ -1919,10 +1938,10 @@ const _t = 120 * 1e3, Kt = () => {
1919
1938
  }
1920
1939
  ) : null
1921
1940
  ] });
1922
- }, Xn = () => /* @__PURE__ */ n(Z.Protect, { permissions: [...ke.promotionRead], children: /* @__PURE__ */ n(jn, {}) }), lo = () => /* @__PURE__ */ n(Tt, { children: /* @__PURE__ */ u(bt, { children: [
1923
- /* @__PURE__ */ n(He, { index: !0, element: /* @__PURE__ */ n(Xn, {}) }),
1941
+ }, jn = () => /* @__PURE__ */ n(Z.Protect, { permissions: [...ke.promotionRead], children: /* @__PURE__ */ n(Yn, {}) }), co = () => /* @__PURE__ */ n(Et, { children: /* @__PURE__ */ u(Ct, { children: [
1942
+ /* @__PURE__ */ n(He, { index: !0, element: /* @__PURE__ */ n(jn, {}) }),
1924
1943
  /* @__PURE__ */ n(He, { path: "*", element: /* @__PURE__ */ n(Z.Error, {}) })
1925
1944
  ] }) });
1926
1945
  export {
1927
- lo as default
1946
+ co as default
1928
1947
  };