@strapi/content-releases 0.0.0-experimental.da85533897155e719d784f0271223c866d2f69ab → 0.0.0-experimental.dad3c50630ca4fd9eccdcbe549ee632fc572e23d

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 (56) hide show
  1. package/dist/_chunks/{App-B4mkcLmw.mjs → App-CiZCkScI.mjs} +304 -102
  2. package/dist/_chunks/App-CiZCkScI.mjs.map +1 -0
  3. package/dist/_chunks/{App-DpoC8s97.js → App-SGjO5UPV.js} +344 -143
  4. package/dist/_chunks/App-SGjO5UPV.js.map +1 -0
  5. package/dist/_chunks/{PurchaseContentReleases-Be3acS2L.js → PurchaseContentReleases--qQepXpP.js} +2 -2
  6. package/dist/_chunks/PurchaseContentReleases--qQepXpP.js.map +1 -0
  7. package/dist/_chunks/{PurchaseContentReleases-_MxP6-Dt.mjs → PurchaseContentReleases-D-n-w-st.mjs} +2 -2
  8. package/dist/_chunks/{PurchaseContentReleases-_MxP6-Dt.mjs.map → PurchaseContentReleases-D-n-w-st.mjs.map} +1 -1
  9. package/dist/_chunks/{ReleasesSettingsPage-B89WWWJf.js → ReleasesSettingsPage-Cto_NLUd.js} +3 -3
  10. package/dist/_chunks/{ReleasesSettingsPage-B89WWWJf.js.map → ReleasesSettingsPage-Cto_NLUd.js.map} +1 -1
  11. package/dist/_chunks/{ReleasesSettingsPage-DfL6yxLG.mjs → ReleasesSettingsPage-DQT8N3A-.mjs} +3 -3
  12. package/dist/_chunks/{ReleasesSettingsPage-DfL6yxLG.mjs.map → ReleasesSettingsPage-DQT8N3A-.mjs.map} +1 -1
  13. package/dist/_chunks/{en-CmYoEnA7.js → en-BWPPsSH-.js} +11 -2
  14. package/dist/_chunks/en-BWPPsSH-.js.map +1 -0
  15. package/dist/_chunks/{en-D0yVZFqf.mjs → en-D9Q4YW03.mjs} +11 -2
  16. package/dist/_chunks/en-D9Q4YW03.mjs.map +1 -0
  17. package/dist/_chunks/{index-B3cqcIza.mjs → index-BjvFfTtA.mjs} +68 -24
  18. package/dist/_chunks/index-BjvFfTtA.mjs.map +1 -0
  19. package/dist/_chunks/{index-sGcuP2hw.js → index-CyU534vL.js} +69 -26
  20. package/dist/_chunks/index-CyU534vL.js.map +1 -0
  21. package/dist/_chunks/{schemas-z5zp-_Gd.js → schemas-DBYv9gK8.js} +3 -4
  22. package/dist/_chunks/schemas-DBYv9gK8.js.map +1 -0
  23. package/dist/_chunks/{schemas-63pFihNF.mjs → schemas-DdA2ic2U.mjs} +2 -2
  24. package/dist/_chunks/schemas-DdA2ic2U.mjs.map +1 -0
  25. package/dist/admin/index.js +1 -1
  26. package/dist/admin/index.mjs +1 -1
  27. package/dist/admin/src/components/EntryValidationPopover.d.ts +13 -0
  28. package/dist/admin/src/services/release.d.ts +28 -28
  29. package/dist/server/index.js +119 -17
  30. package/dist/server/index.js.map +1 -1
  31. package/dist/server/index.mjs +118 -15
  32. package/dist/server/index.mjs.map +1 -1
  33. package/dist/server/src/controllers/release-action.d.ts.map +1 -1
  34. package/dist/server/src/controllers/release.d.ts.map +1 -1
  35. package/dist/server/src/index.d.ts +4 -6
  36. package/dist/server/src/index.d.ts.map +1 -1
  37. package/dist/server/src/middlewares/documents.d.ts.map +1 -1
  38. package/dist/server/src/migrations/database/5.0.0-document-id-in-actions.d.ts.map +1 -1
  39. package/dist/server/src/services/index.d.ts +4 -6
  40. package/dist/server/src/services/index.d.ts.map +1 -1
  41. package/dist/server/src/services/release-action.d.ts +6 -8
  42. package/dist/server/src/services/release-action.d.ts.map +1 -1
  43. package/dist/server/src/utils/index.d.ts.map +1 -1
  44. package/dist/shared/contracts/release-actions.d.ts +8 -1
  45. package/dist/shared/contracts/release-actions.d.ts.map +1 -1
  46. package/package.json +18 -16
  47. package/dist/_chunks/App-B4mkcLmw.mjs.map +0 -1
  48. package/dist/_chunks/App-DpoC8s97.js.map +0 -1
  49. package/dist/_chunks/PurchaseContentReleases-Be3acS2L.js.map +0 -1
  50. package/dist/_chunks/en-CmYoEnA7.js.map +0 -1
  51. package/dist/_chunks/en-D0yVZFqf.mjs.map +0 -1
  52. package/dist/_chunks/index-B3cqcIza.mjs.map +0 -1
  53. package/dist/_chunks/index-sGcuP2hw.js.map +0 -1
  54. package/dist/_chunks/schemas-63pFihNF.mjs.map +0 -1
  55. package/dist/_chunks/schemas-z5zp-_Gd.js.map +0 -1
  56. package/strapi-server.js +0 -3
@@ -1,11 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const jsxRuntime = require("react/jsx-runtime");
4
- const strapiAdmin = require("@strapi/admin/strapi-admin");
4
+ const strapiAdmin$1 = require("@strapi/admin/strapi-admin");
5
5
  const reactRouterDom = require("react-router-dom");
6
- const index = require("./index-sGcuP2hw.js");
6
+ const index = require("./index-CyU534vL.js");
7
7
  const React = require("react");
8
- const strapiAdmin$1 = require("@strapi/content-manager/strapi-admin");
9
8
  const designSystem = require("@strapi/design-system");
10
9
  const icons = require("@strapi/icons");
11
10
  const symbols = require("@strapi/icons/symbols");
@@ -13,15 +12,16 @@ const format = require("date-fns/format");
13
12
  const dateFnsTz = require("date-fns-tz");
14
13
  const reactIntl = require("react-intl");
15
14
  const styledComponents = require("styled-components");
15
+ const strapiAdmin = require("@strapi/content-manager/strapi-admin");
16
+ const qs = require("qs");
16
17
  const dateFns = require("date-fns");
17
18
  const formik = require("formik");
18
- const schemas = require("./schemas-z5zp-_Gd.js");
19
+ const schemas = require("./schemas-DBYv9gK8.js");
19
20
  const reactRedux = require("react-redux");
20
21
  const ee = require("@strapi/admin/strapi-admin/ee");
21
22
  const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
22
23
  function _interopNamespace(e) {
23
- if (e && e.__esModule)
24
- return e;
24
+ if (e && e.__esModule) return e;
25
25
  const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
26
26
  if (e) {
27
27
  for (const k in e) {
@@ -39,6 +39,290 @@ function _interopNamespace(e) {
39
39
  }
40
40
  const React__namespace = /* @__PURE__ */ _interopNamespace(React);
41
41
  const format__default = /* @__PURE__ */ _interopDefault(format);
42
+ const StyledPopoverFlex = styledComponents.styled(designSystem.Flex)`
43
+ width: 100%;
44
+ max-width: 256px;
45
+
46
+ & > * {
47
+ border-bottom: 1px solid ${({ theme }) => theme.colors.neutral150};
48
+ }
49
+
50
+ & > *:last-child {
51
+ border-bottom: none;
52
+ }
53
+ `;
54
+ const EntryStatusTrigger = ({
55
+ action,
56
+ status,
57
+ hasErrors,
58
+ requiredStage,
59
+ entryStage
60
+ }) => {
61
+ const { formatMessage } = reactIntl.useIntl();
62
+ if (action === "publish") {
63
+ if (hasErrors || requiredStage && requiredStage.id !== entryStage?.id) {
64
+ return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Popover.Trigger, { children: /* @__PURE__ */ jsxRuntime.jsx(
65
+ designSystem.Button,
66
+ {
67
+ variant: "ghost",
68
+ startIcon: /* @__PURE__ */ jsxRuntime.jsx(icons.CrossCircle, { fill: "danger600" }),
69
+ endIcon: /* @__PURE__ */ jsxRuntime.jsx(icons.CaretDown, {}),
70
+ children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { textColor: "danger600", variant: "omega", fontWeight: "bold", children: formatMessage({
71
+ id: "content-releases.pages.ReleaseDetails.entry-validation.not-ready",
72
+ defaultMessage: "Not ready to publish"
73
+ }) })
74
+ }
75
+ ) });
76
+ }
77
+ if (status === "draft") {
78
+ return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Popover.Trigger, { children: /* @__PURE__ */ jsxRuntime.jsx(
79
+ designSystem.Button,
80
+ {
81
+ variant: "ghost",
82
+ startIcon: /* @__PURE__ */ jsxRuntime.jsx(icons.CheckCircle, { fill: "success600" }),
83
+ endIcon: /* @__PURE__ */ jsxRuntime.jsx(icons.CaretDown, {}),
84
+ children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { textColor: "success600", variant: "omega", fontWeight: "bold", children: formatMessage({
85
+ id: "content-releases.pages.ReleaseDetails.entry-validation.ready-to-publish",
86
+ defaultMessage: "Ready to publish"
87
+ }) })
88
+ }
89
+ ) });
90
+ }
91
+ if (status === "modified") {
92
+ return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Popover.Trigger, { children: /* @__PURE__ */ jsxRuntime.jsx(
93
+ designSystem.Button,
94
+ {
95
+ variant: "ghost",
96
+ startIcon: /* @__PURE__ */ jsxRuntime.jsx(icons.ArrowsCounterClockwise, { fill: "alternative600" }),
97
+ endIcon: /* @__PURE__ */ jsxRuntime.jsx(icons.CaretDown, {}),
98
+ children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "omega", fontWeight: "bold", textColor: "alternative600", children: formatMessage({
99
+ id: "content-releases.pages.ReleaseDetails.entry-validation.modified",
100
+ defaultMessage: "Ready to publish changes"
101
+ }) })
102
+ }
103
+ ) });
104
+ }
105
+ return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Popover.Trigger, { children: /* @__PURE__ */ jsxRuntime.jsx(
106
+ designSystem.Button,
107
+ {
108
+ variant: "ghost",
109
+ startIcon: /* @__PURE__ */ jsxRuntime.jsx(icons.CheckCircle, { fill: "success600" }),
110
+ endIcon: /* @__PURE__ */ jsxRuntime.jsx(icons.CaretDown, {}),
111
+ children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { textColor: "success600", variant: "omega", fontWeight: "bold", children: formatMessage({
112
+ id: "content-releases.pages.ReleaseDetails.entry-validation.already-published",
113
+ defaultMessage: "Already published"
114
+ }) })
115
+ }
116
+ ) });
117
+ }
118
+ if (status === "published") {
119
+ return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Popover.Trigger, { children: /* @__PURE__ */ jsxRuntime.jsx(
120
+ designSystem.Button,
121
+ {
122
+ variant: "ghost",
123
+ startIcon: /* @__PURE__ */ jsxRuntime.jsx(icons.CheckCircle, { fill: "success600" }),
124
+ endIcon: /* @__PURE__ */ jsxRuntime.jsx(icons.CaretDown, {}),
125
+ children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { textColor: "success600", variant: "omega", fontWeight: "bold", children: formatMessage({
126
+ id: "content-releases.pages.ReleaseDetails.entry-validation.ready-to-unpublish",
127
+ defaultMessage: "Ready to unpublish"
128
+ }) })
129
+ }
130
+ ) });
131
+ }
132
+ return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Popover.Trigger, { children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Button, { variant: "ghost", startIcon: /* @__PURE__ */ jsxRuntime.jsx(icons.CheckCircle, { fill: "success600" }), endIcon: /* @__PURE__ */ jsxRuntime.jsx(icons.CaretDown, {}), children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { textColor: "success600", variant: "omega", fontWeight: "bold", children: formatMessage({
133
+ id: "content-releases.pages.ReleaseDetails.entry-validation.already-unpublished",
134
+ defaultMessage: "Already unpublished"
135
+ }) }) }) });
136
+ };
137
+ const FieldsValidation = ({
138
+ hasErrors,
139
+ errors,
140
+ kind,
141
+ contentTypeUid,
142
+ documentId,
143
+ locale
144
+ }) => {
145
+ const { formatMessage } = reactIntl.useIntl();
146
+ return /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "column", gap: 1, width: "100%", padding: 5, children: [
147
+ /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { gap: 2, width: "100%", children: [
148
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { fontWeight: "bold", children: formatMessage({
149
+ id: "content-releases.pages.ReleaseDetails.entry-validation.fields",
150
+ defaultMessage: "Fields"
151
+ }) }),
152
+ hasErrors ? /* @__PURE__ */ jsxRuntime.jsx(icons.CrossCircle, { fill: "danger600" }) : /* @__PURE__ */ jsxRuntime.jsx(icons.CheckCircle, { fill: "success600" })
153
+ ] }),
154
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { width: "100%", textColor: "neutral600", children: hasErrors ? formatMessage(
155
+ {
156
+ id: "content-releases.pages.ReleaseDetails.entry-validation.fields.error",
157
+ defaultMessage: "{errors} errors on fields."
158
+ },
159
+ { errors: errors ? Object.keys(errors).length : 0 }
160
+ ) : formatMessage({
161
+ id: "content-releases.pages.ReleaseDetails.entry-validation.fields.success",
162
+ defaultMessage: "All fields are filled correctly."
163
+ }) }),
164
+ hasErrors && /* @__PURE__ */ jsxRuntime.jsx(
165
+ designSystem.LinkButton,
166
+ {
167
+ tag: reactRouterDom.Link,
168
+ to: {
169
+ pathname: `/content-manager/${kind === "collectionType" ? "collection-types" : "single-types"}/${contentTypeUid}/${documentId}`,
170
+ search: locale ? qs.stringify({
171
+ plugins: {
172
+ i18n: {
173
+ locale
174
+ }
175
+ }
176
+ }) : ""
177
+ },
178
+ variant: "secondary",
179
+ fullWidth: true,
180
+ state: { forceValidation: true },
181
+ children: formatMessage({
182
+ id: "content-releases.pages.ReleaseDetails.entry-validation.fields.see-errors",
183
+ defaultMessage: "See errors"
184
+ })
185
+ }
186
+ )
187
+ ] });
188
+ };
189
+ const getReviewStageIcon = ({
190
+ contentTypeHasReviewWorkflow,
191
+ requiredStage,
192
+ entryStage
193
+ }) => {
194
+ if (!contentTypeHasReviewWorkflow) {
195
+ return /* @__PURE__ */ jsxRuntime.jsx(icons.CheckCircle, { fill: "neutral200" });
196
+ }
197
+ if (requiredStage && requiredStage.id !== entryStage?.id) {
198
+ return /* @__PURE__ */ jsxRuntime.jsx(icons.CrossCircle, { fill: "danger600" });
199
+ }
200
+ return /* @__PURE__ */ jsxRuntime.jsx(icons.CheckCircle, { fill: "success600" });
201
+ };
202
+ const getReviewStageMessage = ({
203
+ contentTypeHasReviewWorkflow,
204
+ requiredStage,
205
+ entryStage,
206
+ formatMessage
207
+ }) => {
208
+ if (!contentTypeHasReviewWorkflow) {
209
+ return formatMessage({
210
+ id: "content-releases.pages.ReleaseDetails.entry-validation.review-stage.not-enabled",
211
+ defaultMessage: "This entry is not associated to any workflow."
212
+ });
213
+ }
214
+ if (requiredStage && requiredStage.id !== entryStage?.id) {
215
+ return formatMessage(
216
+ {
217
+ id: "content-releases.pages.ReleaseDetails.entry-validation.review-stage.not-ready",
218
+ defaultMessage: "This entry is not at the required stage for publishing. ({stageName})"
219
+ },
220
+ {
221
+ stageName: requiredStage?.name ?? ""
222
+ }
223
+ );
224
+ }
225
+ if (requiredStage && requiredStage.id === entryStage?.id) {
226
+ return formatMessage(
227
+ {
228
+ id: "content-releases.pages.ReleaseDetails.entry-validation.review-stage.ready",
229
+ defaultMessage: "This entry is at the required stage for publishing. ({stageName})"
230
+ },
231
+ {
232
+ stageName: requiredStage?.name ?? ""
233
+ }
234
+ );
235
+ }
236
+ return formatMessage({
237
+ id: "content-releases.pages.ReleaseDetails.entry-validation.review-stage.stage-not-required",
238
+ defaultMessage: "No required stage for publication"
239
+ });
240
+ };
241
+ const ReviewStageValidation = ({
242
+ contentTypeHasReviewWorkflow,
243
+ requiredStage,
244
+ entryStage
245
+ }) => {
246
+ const { formatMessage } = reactIntl.useIntl();
247
+ const Icon = getReviewStageIcon({
248
+ contentTypeHasReviewWorkflow,
249
+ requiredStage,
250
+ entryStage
251
+ });
252
+ return /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "column", gap: 1, width: "100%", padding: 5, children: [
253
+ /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { gap: 2, width: "100%", children: [
254
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { fontWeight: "bold", children: formatMessage({
255
+ id: "content-releases.pages.ReleaseDetails.entry-validation.review-stage",
256
+ defaultMessage: "Review stage"
257
+ }) }),
258
+ Icon
259
+ ] }),
260
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { textColor: "neutral600", children: getReviewStageMessage({
261
+ contentTypeHasReviewWorkflow,
262
+ requiredStage,
263
+ entryStage,
264
+ formatMessage
265
+ }) })
266
+ ] });
267
+ };
268
+ const EntryValidationPopover = ({
269
+ schema,
270
+ entry,
271
+ status,
272
+ action
273
+ }) => {
274
+ const { validate, isLoading } = strapiAdmin.unstable_useDocument(
275
+ {
276
+ collectionType: schema?.kind ?? "",
277
+ model: schema?.uid ?? ""
278
+ },
279
+ {
280
+ // useDocument makes a request to get more data about the entry, but we only want to have the validation function so we skip the request
281
+ skip: true
282
+ }
283
+ );
284
+ const errors = isLoading ? null : validate(entry);
285
+ const hasErrors = errors ? Object.keys(errors).length > 0 : false;
286
+ const contentTypeHasReviewWorkflow = schema?.hasReviewWorkflow ?? false;
287
+ const requiredStage = schema?.stageRequiredToPublish;
288
+ const entryStage = entry.strapi_stage;
289
+ if (isLoading) {
290
+ return null;
291
+ }
292
+ return /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Popover.Root, { children: [
293
+ /* @__PURE__ */ jsxRuntime.jsx(
294
+ EntryStatusTrigger,
295
+ {
296
+ action,
297
+ status,
298
+ hasErrors,
299
+ requiredStage,
300
+ entryStage
301
+ }
302
+ ),
303
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Popover.Content, { children: /* @__PURE__ */ jsxRuntime.jsxs(StyledPopoverFlex, { direction: "column", children: [
304
+ /* @__PURE__ */ jsxRuntime.jsx(
305
+ FieldsValidation,
306
+ {
307
+ hasErrors,
308
+ errors,
309
+ contentTypeUid: schema?.uid,
310
+ kind: schema?.kind,
311
+ documentId: entry.documentId,
312
+ locale: entry.locale
313
+ }
314
+ ),
315
+ /* @__PURE__ */ jsxRuntime.jsx(
316
+ ReviewStageValidation,
317
+ {
318
+ contentTypeHasReviewWorkflow,
319
+ requiredStage,
320
+ entryStage
321
+ }
322
+ )
323
+ ] }) })
324
+ ] });
325
+ };
42
326
  const intervals = ["years", "months", "days", "hours", "minutes", "seconds"];
43
327
  const RelativeTime$1 = React__namespace.forwardRef(
44
328
  ({ timestamp, customIntervals = [], ...restProps }, forwardedRef) => {
@@ -84,8 +368,7 @@ const ReleaseModal = ({
84
368
  );
85
369
  const getScheduledTimestamp = (values) => {
86
370
  const { date, time, timezone } = values;
87
- if (!date || !time || !timezone)
88
- return null;
371
+ if (!date || !time || !timezone) return null;
89
372
  const timezoneWithoutOffset = timezone.split("&")[1];
90
373
  return dateFnsTz.zonedTimeToUtc(`${date} ${time}`, timezoneWithoutOffset);
91
374
  };
@@ -346,7 +629,7 @@ const getBadgeProps = (status) => {
346
629
  const ReleasesGrid = ({ sectionTitle, releases = [], isError = false }) => {
347
630
  const { formatMessage } = reactIntl.useIntl();
348
631
  if (isError) {
349
- return /* @__PURE__ */ jsxRuntime.jsx(strapiAdmin.Page.Error, {});
632
+ return /* @__PURE__ */ jsxRuntime.jsx(strapiAdmin$1.Page.Error, {});
350
633
  }
351
634
  if (releases?.length === 0) {
352
635
  return /* @__PURE__ */ jsxRuntime.jsx(
@@ -410,20 +693,20 @@ const INITIAL_FORM_VALUES = {
410
693
  const ReleasesPage = () => {
411
694
  const location = reactRouterDom.useLocation();
412
695
  const [releaseModalShown, setReleaseModalShown] = React__namespace.useState(false);
413
- const { toggleNotification } = strapiAdmin.useNotification();
696
+ const { toggleNotification } = strapiAdmin$1.useNotification();
414
697
  const { formatMessage } = reactIntl.useIntl();
415
698
  const navigate = reactRouterDom.useNavigate();
416
- const { formatAPIError } = strapiAdmin.useAPIErrorHandler();
417
- const [{ query }, setQuery] = strapiAdmin.useQueryParams();
699
+ const { formatAPIError } = strapiAdmin$1.useAPIErrorHandler();
700
+ const [{ query }, setQuery] = strapiAdmin$1.useQueryParams();
418
701
  const response = index.useGetReleasesQuery(query);
419
702
  const { data, isLoading: isLoadingSettings } = index.useGetReleaseSettingsQuery();
420
703
  const [createRelease, { isLoading: isSubmittingForm }] = index.useCreateReleaseMutation();
421
704
  const { getFeature } = ee.useLicenseLimits();
422
705
  const { maximumReleases = 3 } = getFeature("cms-content-releases");
423
- const { trackUsage } = strapiAdmin.useTracking();
706
+ const { trackUsage } = strapiAdmin$1.useTracking();
424
707
  const {
425
708
  allowedActions: { canCreate }
426
- } = strapiAdmin.useRBAC(index.PERMISSIONS);
709
+ } = strapiAdmin$1.useRBAC(index.PERMISSIONS);
427
710
  const { isLoading: isLoadingReleases, isSuccess, isError } = response;
428
711
  const activeTab = response?.currentData?.meta?.activeTab || "pending";
429
712
  React__namespace.useEffect(() => {
@@ -446,7 +729,7 @@ const ReleasesPage = () => {
446
729
  setReleaseModalShown((prev) => !prev);
447
730
  };
448
731
  if (isLoadingReleases || isLoadingSettings) {
449
- return /* @__PURE__ */ jsxRuntime.jsx(strapiAdmin.Page.Loading, {});
732
+ return /* @__PURE__ */ jsxRuntime.jsx(strapiAdmin$1.Page.Loading, {});
450
733
  }
451
734
  const totalPendingReleases = isSuccess && response.currentData?.meta?.pendingReleasesCount || 0;
452
735
  const hasReachedMaximumPendingReleases = totalPendingReleases >= maximumReleases;
@@ -478,7 +761,7 @@ const ReleasesPage = () => {
478
761
  });
479
762
  trackUsage("didCreateRelease");
480
763
  navigate(response2.data.data.id.toString());
481
- } else if (strapiAdmin.isFetchError(response2.error)) {
764
+ } else if (strapiAdmin$1.isFetchError(response2.error)) {
482
765
  toggleNotification({
483
766
  type: "danger",
484
767
  message: formatAPIError(response2.error)
@@ -492,7 +775,7 @@ const ReleasesPage = () => {
492
775
  };
493
776
  return /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Main, { "aria-busy": isLoadingReleases || isLoadingSettings, children: [
494
777
  /* @__PURE__ */ jsxRuntime.jsx(
495
- strapiAdmin.Layouts.Header,
778
+ strapiAdmin$1.Layouts.Header,
496
779
  {
497
780
  title: formatMessage({
498
781
  id: "content-releases.pages.Releases.title",
@@ -516,7 +799,7 @@ const ReleasesPage = () => {
516
799
  ) : null
517
800
  }
518
801
  ),
519
- /* @__PURE__ */ jsxRuntime.jsx(strapiAdmin.Layouts.Content, { children: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
802
+ /* @__PURE__ */ jsxRuntime.jsx(strapiAdmin$1.Layouts.Content, { children: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
520
803
  hasReachedMaximumPendingReleases && /* @__PURE__ */ jsxRuntime.jsx(
521
804
  StyledAlert,
522
805
  {
@@ -587,13 +870,13 @@ const ReleasesPage = () => {
587
870
  ) })
588
871
  ] }),
589
872
  /* @__PURE__ */ jsxRuntime.jsxs(
590
- strapiAdmin.Pagination.Root,
873
+ strapiAdmin$1.Pagination.Root,
591
874
  {
592
875
  ...response?.currentData?.meta?.pagination,
593
876
  defaultPageSize: response?.currentData?.meta?.pagination?.pageSize,
594
877
  children: [
595
- /* @__PURE__ */ jsxRuntime.jsx(strapiAdmin.Pagination.PageSize, { options: ["8", "16", "32", "64"] }),
596
- /* @__PURE__ */ jsxRuntime.jsx(strapiAdmin.Pagination.Links, {})
878
+ /* @__PURE__ */ jsxRuntime.jsx(strapiAdmin$1.Pagination.PageSize, { options: ["8", "16", "32", "64"] }),
879
+ /* @__PURE__ */ jsxRuntime.jsx(strapiAdmin$1.Pagination.Links, {})
597
880
  ]
598
881
  }
599
882
  )
@@ -632,100 +915,19 @@ const StyledMenuItem = styledComponents.styled(designSystem.MenuItem)`
632
915
  }
633
916
  `;
634
917
  const PencilIcon = styledComponents.styled(icons.Pencil)`
635
- width: ${({ theme }) => theme.spaces[3]};
636
- height: ${({ theme }) => theme.spaces[3]};
918
+ width: ${({ theme }) => theme.spaces[4]};
919
+ height: ${({ theme }) => theme.spaces[4]};
637
920
  path {
638
921
  fill: ${({ theme }) => theme.colors.neutral600};
639
922
  }
640
923
  `;
641
924
  const TrashIcon = styledComponents.styled(icons.Trash)`
642
- width: ${({ theme }) => theme.spaces[3]};
643
- height: ${({ theme }) => theme.spaces[3]};
925
+ width: ${({ theme }) => theme.spaces[4]};
926
+ height: ${({ theme }) => theme.spaces[4]};
644
927
  path {
645
928
  fill: ${({ theme }) => theme.colors.danger600};
646
929
  }
647
930
  `;
648
- const TypographyMaxWidth = styledComponents.styled(designSystem.Typography)`
649
- max-width: 300px;
650
- `;
651
- const EntryValidationText = ({ action, schema, entry, status }) => {
652
- const { formatMessage } = reactIntl.useIntl();
653
- const { validate, isLoading } = strapiAdmin$1.unstable_useDocument(
654
- {
655
- collectionType: schema?.kind ?? "",
656
- model: schema?.uid ?? ""
657
- },
658
- {
659
- // useDocument makes a request to get more data about the entry, but we only want to have the validation function so we skip the request
660
- skip: true
661
- }
662
- );
663
- if (isLoading) {
664
- return null;
665
- }
666
- const errors = validate(entry) ?? {};
667
- if (action === "publish") {
668
- if (Object.keys(errors).length > 0) {
669
- const validationErrorsMessages = Object.entries(errors).map(
670
- ([key, value]) => formatMessage(
671
- // @ts-expect-error – TODO: fix this will better checks
672
- { id: `${value.id}.withField`, defaultMessage: value.defaultMessage },
673
- { field: key }
674
- )
675
- ).join(" ");
676
- return /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { gap: 2, children: [
677
- /* @__PURE__ */ jsxRuntime.jsx(icons.CrossCircle, { fill: "danger600" }),
678
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Tooltip, { description: validationErrorsMessages, children: /* @__PURE__ */ jsxRuntime.jsx(
679
- TypographyMaxWidth,
680
- {
681
- textColor: "danger600",
682
- variant: "omega",
683
- fontWeight: "semiBold",
684
- ellipsis: true,
685
- children: validationErrorsMessages
686
- }
687
- ) })
688
- ] });
689
- }
690
- if (status === "draft") {
691
- return /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { gap: 2, children: [
692
- /* @__PURE__ */ jsxRuntime.jsx(icons.CheckCircle, { fill: "success600" }),
693
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { children: formatMessage({
694
- id: "content-releases.pages.ReleaseDetails.entry-validation.ready-to-publish",
695
- defaultMessage: "Ready to publish"
696
- }) })
697
- ] });
698
- }
699
- if (status === "modified") {
700
- return /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { gap: 2, children: [
701
- /* @__PURE__ */ jsxRuntime.jsx(icons.ArrowsCounterClockwise, { fill: "alternative600" }),
702
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { children: formatMessage({
703
- id: "content-releases.pages.ReleaseDetails.entry-validation.modified",
704
- defaultMessage: "Ready to publish changes"
705
- }) })
706
- ] });
707
- }
708
- if (status === "published") {
709
- return /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { gap: 2, children: [
710
- /* @__PURE__ */ jsxRuntime.jsx(icons.CheckCircle, { fill: "success600" }),
711
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { children: formatMessage({
712
- id: "content-releases.pages.ReleaseDetails.entry-validation.already-published",
713
- defaultMessage: "Already published"
714
- }) })
715
- ] });
716
- }
717
- }
718
- return /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { gap: 2, children: [
719
- /* @__PURE__ */ jsxRuntime.jsx(icons.CheckCircle, { fill: "success600" }),
720
- !entry.publishedAt ? /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { textColor: "success600", fontWeight: "bold", children: formatMessage({
721
- id: "content-releases.pages.ReleaseDetails.entry-validation.already-unpublished",
722
- defaultMessage: "Already unpublished"
723
- }) }) : /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { children: formatMessage({
724
- id: "content-releases.pages.ReleaseDetails.entry-validation.ready-to-unpublish",
725
- defaultMessage: "Ready to unpublish"
726
- }) })
727
- ] });
728
- };
729
931
  const ReleaseDetailsLayout = ({
730
932
  toggleEditReleaseModal,
731
933
  toggleWarningSubmit,
@@ -744,12 +946,12 @@ const ReleaseDetailsLayout = ({
744
946
  }
745
947
  );
746
948
  const [publishRelease, { isLoading: isPublishing }] = index.usePublishReleaseMutation();
747
- const { toggleNotification } = strapiAdmin.useNotification();
748
- const { formatAPIError } = strapiAdmin.useAPIErrorHandler();
749
- const { allowedActions } = strapiAdmin.useRBAC(index.PERMISSIONS);
949
+ const { toggleNotification } = strapiAdmin$1.useNotification();
950
+ const { formatAPIError } = strapiAdmin$1.useAPIErrorHandler();
951
+ const { allowedActions } = strapiAdmin$1.useRBAC(index.PERMISSIONS);
750
952
  const { canUpdate, canDelete, canPublish } = allowedActions;
751
953
  const dispatch = useTypedDispatch();
752
- const { trackUsage } = strapiAdmin.useTracking();
954
+ const { trackUsage } = strapiAdmin$1.useTracking();
753
955
  const release = data?.data;
754
956
  const handlePublishRelease = (id) => async () => {
755
957
  const response = await publishRelease({ id });
@@ -767,7 +969,7 @@ const ReleaseDetailsLayout = ({
767
969
  totalPublishedEntries,
768
970
  totalUnpublishedEntries
769
971
  });
770
- } else if (strapiAdmin.isFetchError(response.error)) {
972
+ } else if (strapiAdmin$1.isFetchError(response.error)) {
771
973
  toggleNotification({
772
974
  type: "danger",
773
975
  message: formatAPIError(response.error)
@@ -800,7 +1002,7 @@ const ReleaseDetailsLayout = ({
800
1002
  return release.createdBy.email;
801
1003
  };
802
1004
  if (isLoadingDetails) {
803
- return /* @__PURE__ */ jsxRuntime.jsx(strapiAdmin.Page.Loading, {});
1005
+ return /* @__PURE__ */ jsxRuntime.jsx(strapiAdmin$1.Page.Loading, {});
804
1006
  }
805
1007
  if (isBaseQueryError(error) && "code" in error || !release) {
806
1008
  return /* @__PURE__ */ jsxRuntime.jsx(
@@ -850,14 +1052,14 @@ const ReleaseDetailsLayout = ({
850
1052
  ) : "";
851
1053
  return /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Main, { "aria-busy": isLoadingDetails, children: [
852
1054
  /* @__PURE__ */ jsxRuntime.jsx(
853
- strapiAdmin.Layouts.Header,
1055
+ strapiAdmin$1.Layouts.Header,
854
1056
  {
855
1057
  title: release.name,
856
1058
  subtitle: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { gap: 2, lineHeight: 6, children: [
857
1059
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { textColor: "neutral600", variant: "epsilon", children: numberOfEntriesText + (isScheduled ? ` - ${scheduledText}` : "") }),
858
1060
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Badge, { ...getBadgeProps(release.status), children: release.status })
859
1061
  ] }),
860
- navigationAction: /* @__PURE__ */ jsxRuntime.jsx(strapiAdmin.BackButton, {}),
1062
+ navigationAction: /* @__PURE__ */ jsxRuntime.jsx(strapiAdmin$1.BackButton, { fallback: ".." }),
861
1063
  primaryAction: !release.releasedAt && /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { gap: 2, children: [
862
1064
  /* @__PURE__ */ jsxRuntime.jsxs(
863
1065
  SimpleMenuButton,
@@ -975,9 +1177,9 @@ const getGroupByOptionLabel = (value) => {
975
1177
  };
976
1178
  const ReleaseDetailsBody = ({ releaseId }) => {
977
1179
  const { formatMessage } = reactIntl.useIntl();
978
- const [{ query }, setQuery] = strapiAdmin.useQueryParams();
979
- const { toggleNotification } = strapiAdmin.useNotification();
980
- const { formatAPIError } = strapiAdmin.useAPIErrorHandler();
1180
+ const [{ query }, setQuery] = strapiAdmin$1.useQueryParams();
1181
+ const { toggleNotification } = strapiAdmin$1.useNotification();
1182
+ const { formatAPIError } = strapiAdmin$1.useAPIErrorHandler();
981
1183
  const {
982
1184
  data: releaseData,
983
1185
  isLoading: isReleaseLoading,
@@ -985,8 +1187,8 @@ const ReleaseDetailsBody = ({ releaseId }) => {
985
1187
  } = index.useGetReleaseQuery({ id: releaseId });
986
1188
  const {
987
1189
  allowedActions: { canUpdate }
988
- } = strapiAdmin.useRBAC(index.PERMISSIONS);
989
- const runHookWaterfall = strapiAdmin.useStrapiApp("ReleaseDetailsPage", (state) => state.runHookWaterfall);
1190
+ } = strapiAdmin$1.useRBAC(index.PERMISSIONS);
1191
+ const runHookWaterfall = strapiAdmin$1.useStrapiApp("ReleaseDetailsPage", (state) => state.runHookWaterfall);
990
1192
  const { displayedHeaders, hasI18nEnabled } = runHookWaterfall("ContentReleases/pages/ReleaseDetails/add-locale-in-releases", {
991
1193
  displayedHeaders: [
992
1194
  {
@@ -1027,7 +1229,7 @@ const ReleaseDetailsBody = ({ releaseId }) => {
1027
1229
  // We are passing the action path to found the position in the cache of the action for optimistic updates
1028
1230
  });
1029
1231
  if ("error" in response) {
1030
- if (strapiAdmin.isFetchError(response.error)) {
1232
+ if (strapiAdmin$1.isFetchError(response.error)) {
1031
1233
  toggleNotification({
1032
1234
  type: "danger",
1033
1235
  message: formatAPIError(response.error)
@@ -1041,12 +1243,12 @@ const ReleaseDetailsBody = ({ releaseId }) => {
1041
1243
  }
1042
1244
  };
1043
1245
  if (isLoading || isReleaseLoading) {
1044
- return /* @__PURE__ */ jsxRuntime.jsx(strapiAdmin.Page.Loading, {});
1246
+ return /* @__PURE__ */ jsxRuntime.jsx(strapiAdmin$1.Page.Loading, {});
1045
1247
  }
1046
1248
  const releaseActions = data?.data;
1047
1249
  const releaseMeta = data?.meta;
1048
1250
  const contentTypes = releaseMeta?.contentTypes || {};
1049
- const components = releaseMeta?.components || {};
1251
+ releaseMeta?.components || {};
1050
1252
  if (isBaseQueryError(releaseError) || !release) {
1051
1253
  const errorsArray = [];
1052
1254
  if (releaseError && "code" in releaseError) {
@@ -1070,10 +1272,10 @@ const ReleaseDetailsBody = ({ releaseId }) => {
1070
1272
  );
1071
1273
  }
1072
1274
  if (isError || !releaseActions) {
1073
- return /* @__PURE__ */ jsxRuntime.jsx(strapiAdmin.Page.Error, {});
1275
+ return /* @__PURE__ */ jsxRuntime.jsx(strapiAdmin$1.Page.Error, {});
1074
1276
  }
1075
1277
  if (Object.keys(releaseActions).length === 0) {
1076
- return /* @__PURE__ */ jsxRuntime.jsx(strapiAdmin.Layouts.Content, { children: /* @__PURE__ */ jsxRuntime.jsx(
1278
+ return /* @__PURE__ */ jsxRuntime.jsx(strapiAdmin$1.Layouts.Content, { children: /* @__PURE__ */ jsxRuntime.jsx(
1077
1279
  designSystem.EmptyStateLayout,
1078
1280
  {
1079
1281
  action: /* @__PURE__ */ jsxRuntime.jsx(
@@ -1130,7 +1332,7 @@ const ReleaseDetailsBody = ({ releaseId }) => {
1130
1332
  ] : []
1131
1333
  ];
1132
1334
  const options = hasI18nEnabled ? GROUP_BY_OPTIONS : GROUP_BY_OPTIONS_NO_LOCALE;
1133
- return /* @__PURE__ */ jsxRuntime.jsx(strapiAdmin.Layouts.Content, { children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { gap: 8, direction: "column", alignItems: "stretch", children: [
1335
+ return /* @__PURE__ */ jsxRuntime.jsx(strapiAdmin$1.Layouts.Content, { children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { gap: 8, direction: "column", alignItems: "stretch", children: [
1134
1336
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { children: /* @__PURE__ */ jsxRuntime.jsx(
1135
1337
  designSystem.SingleSelect,
1136
1338
  {
@@ -1153,7 +1355,7 @@ const ReleaseDetailsBody = ({ releaseId }) => {
1153
1355
  Object.keys(releaseActions).map((key) => /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { gap: 4, direction: "column", alignItems: "stretch", children: [
1154
1356
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { role: "separator", "aria-label": key, children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Badge, { children: key }) }),
1155
1357
  /* @__PURE__ */ jsxRuntime.jsx(
1156
- strapiAdmin.Table.Root,
1358
+ strapiAdmin$1.Table.Root,
1157
1359
  {
1158
1360
  rows: releaseActions[key].map((item) => ({
1159
1361
  ...item,
@@ -1161,10 +1363,10 @@ const ReleaseDetailsBody = ({ releaseId }) => {
1161
1363
  })),
1162
1364
  headers,
1163
1365
  isLoading: isLoading || isFetching,
1164
- children: /* @__PURE__ */ jsxRuntime.jsxs(strapiAdmin.Table.Content, { children: [
1165
- /* @__PURE__ */ jsxRuntime.jsx(strapiAdmin.Table.Head, { children: headers.map(({ label, name }) => /* @__PURE__ */ jsxRuntime.jsx(strapiAdmin.Table.HeaderCell, { label: formatMessage(label), name }, name)) }),
1166
- /* @__PURE__ */ jsxRuntime.jsx(strapiAdmin.Table.Loading, {}),
1167
- /* @__PURE__ */ jsxRuntime.jsx(strapiAdmin.Table.Body, { children: releaseActions[key].map(
1366
+ children: /* @__PURE__ */ jsxRuntime.jsxs(strapiAdmin$1.Table.Content, { children: [
1367
+ /* @__PURE__ */ jsxRuntime.jsx(strapiAdmin$1.Table.Head, { children: headers.map(({ label, name }) => /* @__PURE__ */ jsxRuntime.jsx(strapiAdmin$1.Table.HeaderCell, { label: formatMessage(label), name }, name)) }),
1368
+ /* @__PURE__ */ jsxRuntime.jsx(strapiAdmin$1.Table.Loading, {}),
1369
+ /* @__PURE__ */ jsxRuntime.jsx(strapiAdmin$1.Table.Body, { children: releaseActions[key].map(
1168
1370
  ({ id, contentType, locale, type, entry, status }, actionIndex) => /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Tr, { children: [
1169
1371
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Td, { width: "25%", maxWidth: "200px", children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { ellipsis: true, children: `${contentType.mainFieldValue || entry.id}` }) }),
1170
1372
  hasI18nEnabled && /* @__PURE__ */ jsxRuntime.jsx(designSystem.Td, { width: "10%", children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { children: `${locale?.name ? locale.name : "-"}` }) }),
@@ -1189,11 +1391,10 @@ const ReleaseDetailsBody = ({ releaseId }) => {
1189
1391
  ) }),
1190
1392
  !release.releasedAt && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1191
1393
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Td, { width: "20%", minWidth: "200px", children: /* @__PURE__ */ jsxRuntime.jsx(
1192
- EntryValidationText,
1394
+ EntryValidationPopover,
1193
1395
  {
1194
1396
  action: type,
1195
1397
  schema: contentTypes?.[contentType.uid],
1196
- components,
1197
1398
  entry,
1198
1399
  status
1199
1400
  }
@@ -1223,13 +1424,13 @@ const ReleaseDetailsBody = ({ releaseId }) => {
1223
1424
  )
1224
1425
  ] }, `releases-group-${key}`)),
1225
1426
  /* @__PURE__ */ jsxRuntime.jsxs(
1226
- strapiAdmin.Pagination.Root,
1427
+ strapiAdmin$1.Pagination.Root,
1227
1428
  {
1228
1429
  ...releaseMeta?.pagination,
1229
1430
  defaultPageSize: releaseMeta?.pagination?.pageSize,
1230
1431
  children: [
1231
- /* @__PURE__ */ jsxRuntime.jsx(strapiAdmin.Pagination.PageSize, {}),
1232
- /* @__PURE__ */ jsxRuntime.jsx(strapiAdmin.Pagination.Links, {})
1432
+ /* @__PURE__ */ jsxRuntime.jsx(strapiAdmin$1.Pagination.PageSize, {}),
1433
+ /* @__PURE__ */ jsxRuntime.jsx(strapiAdmin$1.Pagination.Links, {})
1233
1434
  ]
1234
1435
  }
1235
1436
  )
@@ -1238,8 +1439,8 @@ const ReleaseDetailsBody = ({ releaseId }) => {
1238
1439
  const ReleaseDetailsPage = () => {
1239
1440
  const { formatMessage } = reactIntl.useIntl();
1240
1441
  const { releaseId } = reactRouterDom.useParams();
1241
- const { toggleNotification } = strapiAdmin.useNotification();
1242
- const { formatAPIError } = strapiAdmin.useAPIErrorHandler();
1442
+ const { toggleNotification } = strapiAdmin$1.useNotification();
1443
+ const { formatAPIError } = strapiAdmin$1.useAPIErrorHandler();
1243
1444
  const navigate = reactRouterDom.useNavigate();
1244
1445
  const [releaseModalShown, setReleaseModalShown] = React__namespace.useState(false);
1245
1446
  const [showWarningSubmit, setWarningSubmit] = React__namespace.useState(false);
@@ -1276,7 +1477,7 @@ const ReleaseDetailsPage = () => {
1276
1477
  {
1277
1478
  toggleEditReleaseModal,
1278
1479
  toggleWarningSubmit,
1279
- children: /* @__PURE__ */ jsxRuntime.jsx(strapiAdmin.Page.Loading, {})
1480
+ children: /* @__PURE__ */ jsxRuntime.jsx(strapiAdmin$1.Page.Loading, {})
1280
1481
  }
1281
1482
  );
1282
1483
  }
@@ -1305,7 +1506,7 @@ const ReleaseDetailsPage = () => {
1305
1506
  })
1306
1507
  });
1307
1508
  toggleEditReleaseModal();
1308
- } else if (strapiAdmin.isFetchError(response.error)) {
1509
+ } else if (strapiAdmin$1.isFetchError(response.error)) {
1309
1510
  toggleNotification({
1310
1511
  type: "danger",
1311
1512
  message: formatAPIError(response.error)
@@ -1323,7 +1524,7 @@ const ReleaseDetailsPage = () => {
1323
1524
  });
1324
1525
  if ("data" in response) {
1325
1526
  navigate("..");
1326
- } else if (strapiAdmin.isFetchError(response.error)) {
1527
+ } else if (strapiAdmin$1.isFetchError(response.error)) {
1327
1528
  toggleNotification({
1328
1529
  type: "danger",
1329
1530
  message: formatAPIError(response.error)
@@ -1359,7 +1560,7 @@ const ReleaseDetailsPage = () => {
1359
1560
  }
1360
1561
  }
1361
1562
  ),
1362
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Dialog.Root, { open: showWarningSubmit, onOpenChange: toggleWarningSubmit, children: /* @__PURE__ */ jsxRuntime.jsx(strapiAdmin.ConfirmDialog, { onConfirm: handleDeleteRelease, children: formatMessage({
1563
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Dialog.Root, { open: showWarningSubmit, onOpenChange: toggleWarningSubmit, children: /* @__PURE__ */ jsxRuntime.jsx(strapiAdmin$1.ConfirmDialog, { onConfirm: handleDeleteRelease, children: formatMessage({
1363
1564
  id: "content-releases.dialog.confirmation-message",
1364
1565
  defaultMessage: "Are you sure you want to delete this release?"
1365
1566
  }) }) })
@@ -1368,10 +1569,10 @@ const ReleaseDetailsPage = () => {
1368
1569
  );
1369
1570
  };
1370
1571
  const App = () => {
1371
- return /* @__PURE__ */ jsxRuntime.jsx(strapiAdmin.Page.Protect, { permissions: index.PERMISSIONS.main, children: /* @__PURE__ */ jsxRuntime.jsxs(reactRouterDom.Routes, { children: [
1572
+ return /* @__PURE__ */ jsxRuntime.jsx(strapiAdmin$1.Page.Protect, { permissions: index.PERMISSIONS.main, children: /* @__PURE__ */ jsxRuntime.jsxs(reactRouterDom.Routes, { children: [
1372
1573
  /* @__PURE__ */ jsxRuntime.jsx(reactRouterDom.Route, { index: true, element: /* @__PURE__ */ jsxRuntime.jsx(ReleasesPage, {}) }),
1373
1574
  /* @__PURE__ */ jsxRuntime.jsx(reactRouterDom.Route, { path: ":releaseId", element: /* @__PURE__ */ jsxRuntime.jsx(ReleaseDetailsPage, {}) })
1374
1575
  ] }) });
1375
1576
  };
1376
1577
  exports.App = App;
1377
- //# sourceMappingURL=App-DpoC8s97.js.map
1578
+ //# sourceMappingURL=App-SGjO5UPV.js.map