@strapi/content-releases 5.0.0-beta.5 → 5.0.0-beta.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_chunks/{App-FVorrIzF.js → App-BdcItFff.js} +119 -126
- package/dist/_chunks/App-BdcItFff.js.map +1 -0
- package/dist/_chunks/{App-Cmn2Mkn7.mjs → App-CJdkbHnd.mjs} +110 -116
- package/dist/_chunks/App-CJdkbHnd.mjs.map +1 -0
- package/dist/_chunks/{PurchaseContentReleases-sD6ADHk2.js → PurchaseContentReleases-Be3acS2L.js} +7 -6
- package/dist/_chunks/PurchaseContentReleases-Be3acS2L.js.map +1 -0
- package/dist/_chunks/{PurchaseContentReleases-C8djn9fP.mjs → PurchaseContentReleases-_MxP6-Dt.mjs} +8 -7
- package/dist/_chunks/PurchaseContentReleases-_MxP6-Dt.mjs.map +1 -0
- package/dist/_chunks/{index-BfJLth9Z.js → index-B6Y2hJ10.js} +100 -108
- package/dist/_chunks/index-B6Y2hJ10.js.map +1 -0
- package/dist/_chunks/{index-DDohgTaQ.mjs → index-BvhZTh4j.mjs} +100 -106
- package/dist/_chunks/index-BvhZTh4j.mjs.map +1 -0
- package/dist/admin/index.js +1 -1
- package/dist/admin/index.mjs +2 -2
- package/dist/admin/src/components/ReleaseAction.d.ts +1 -1
- package/dist/admin/src/services/baseQuery.d.ts +26 -0
- package/dist/admin/src/services/release.d.ts +216 -81
- package/package.json +12 -13
- package/dist/_chunks/App-Cmn2Mkn7.mjs.map +0 -1
- package/dist/_chunks/App-FVorrIzF.js.map +0 -1
- package/dist/_chunks/PurchaseContentReleases-C8djn9fP.mjs.map +0 -1
- package/dist/_chunks/PurchaseContentReleases-sD6ADHk2.js.map +0 -1
- package/dist/_chunks/index-BfJLth9Z.js.map +0 -1
- package/dist/_chunks/index-DDohgTaQ.mjs.map +0 -1
- package/dist/admin/src/services/axios.d.ts +0 -29
|
@@ -3,16 +3,16 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
3
3
|
const jsxRuntime = require("react/jsx-runtime");
|
|
4
4
|
const strapiAdmin = require("@strapi/admin/strapi-admin");
|
|
5
5
|
const reactRouterDom = require("react-router-dom");
|
|
6
|
-
const index = require("./index-
|
|
6
|
+
const index = require("./index-B6Y2hJ10.js");
|
|
7
7
|
const React = require("react");
|
|
8
|
+
const strapiAdmin$1 = require("@strapi/content-manager/strapi-admin");
|
|
8
9
|
const designSystem = require("@strapi/design-system");
|
|
9
|
-
const v2 = require("@strapi/design-system/v2");
|
|
10
10
|
const icons = require("@strapi/icons");
|
|
11
|
-
const
|
|
11
|
+
const symbols = require("@strapi/icons/symbols");
|
|
12
12
|
const format = require("date-fns/format");
|
|
13
13
|
const dateFnsTz = require("date-fns-tz");
|
|
14
14
|
const reactIntl = require("react-intl");
|
|
15
|
-
const
|
|
15
|
+
const styledComponents = require("styled-components");
|
|
16
16
|
const dateFns = require("date-fns");
|
|
17
17
|
const formik = require("formik");
|
|
18
18
|
const yup = require("yup");
|
|
@@ -39,7 +39,6 @@ function _interopNamespace(e) {
|
|
|
39
39
|
}
|
|
40
40
|
const React__namespace = /* @__PURE__ */ _interopNamespace(React);
|
|
41
41
|
const format__default = /* @__PURE__ */ _interopDefault(format);
|
|
42
|
-
const styled__default = /* @__PURE__ */ _interopDefault(styled);
|
|
43
42
|
const yup__namespace = /* @__PURE__ */ _interopNamespace(yup);
|
|
44
43
|
const intervals = ["years", "months", "days", "hours", "minutes", "seconds"];
|
|
45
44
|
const RelativeTime$1 = React__namespace.forwardRef(
|
|
@@ -142,20 +141,14 @@ const ReleaseModal = ({
|
|
|
142
141
|
validateOnChange: false,
|
|
143
142
|
children: ({ values, errors, handleChange, setFieldValue }) => /* @__PURE__ */ jsxRuntime.jsxs(formik.Form, { children: [
|
|
144
143
|
/* @__PURE__ */ jsxRuntime.jsx(designSystem.ModalBody, { children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "column", alignItems: "stretch", gap: 6, children: [
|
|
145
|
-
/* @__PURE__ */ jsxRuntime.
|
|
146
|
-
designSystem.
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
value: values.name,
|
|
154
|
-
error: errors.name,
|
|
155
|
-
onChange: handleChange,
|
|
156
|
-
required: true
|
|
157
|
-
}
|
|
158
|
-
),
|
|
144
|
+
/* @__PURE__ */ jsxRuntime.jsxs(designSystem.Field.Root, { name: "name", error: errors.name, required: true, children: [
|
|
145
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Field.Label, { children: formatMessage({
|
|
146
|
+
id: "content-releases.modal.form.input.label.release-name",
|
|
147
|
+
defaultMessage: "Name"
|
|
148
|
+
}) }),
|
|
149
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.TextInput, { value: values.name, onChange: handleChange }),
|
|
150
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Field.Error, {})
|
|
151
|
+
] }),
|
|
159
152
|
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { width: "max-content", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
160
153
|
designSystem.Checkbox,
|
|
161
154
|
{
|
|
@@ -188,54 +181,54 @@ const ReleaseModal = ({
|
|
|
188
181
|
) }),
|
|
189
182
|
values.isScheduled && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
190
183
|
/* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { gap: 4, alignItems: "start", children: [
|
|
191
|
-
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { width: "100%", children: /* @__PURE__ */ jsxRuntime.
|
|
192
|
-
designSystem.
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
}
|
|
215
|
-
) }),
|
|
216
|
-
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { width: "100%", children: /* @__PURE__ */ jsxRuntime.
|
|
217
|
-
designSystem.
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
}
|
|
238
|
-
) })
|
|
184
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { width: "100%", children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Field.Root, { name: "date", error: errors.date, required: true, children: [
|
|
185
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Field.Label, { children: formatMessage({
|
|
186
|
+
id: "content-releases.modal.form.input.label.date",
|
|
187
|
+
defaultMessage: "Date"
|
|
188
|
+
}) }),
|
|
189
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
190
|
+
designSystem.DatePicker,
|
|
191
|
+
{
|
|
192
|
+
onChange: (date) => {
|
|
193
|
+
const isoFormatDate = date ? dateFns.formatISO(date, { representation: "date" }) : null;
|
|
194
|
+
setFieldValue("date", isoFormatDate);
|
|
195
|
+
},
|
|
196
|
+
clearLabel: formatMessage({
|
|
197
|
+
id: "content-releases.modal.form.input.clearLabel",
|
|
198
|
+
defaultMessage: "Clear"
|
|
199
|
+
}),
|
|
200
|
+
onClear: () => {
|
|
201
|
+
setFieldValue("date", null);
|
|
202
|
+
},
|
|
203
|
+
selectedDate: values.date || void 0,
|
|
204
|
+
minDate: dateFnsTz.utcToZonedTime(/* @__PURE__ */ new Date(), values.timezone.split("&")[1])
|
|
205
|
+
}
|
|
206
|
+
),
|
|
207
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Field.Error, {})
|
|
208
|
+
] }) }),
|
|
209
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { width: "100%", children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Field.Root, { name: "time", error: errors.time, required: true, children: [
|
|
210
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Field.Label, { children: formatMessage({
|
|
211
|
+
id: "content-releases.modal.form.input.label.time",
|
|
212
|
+
defaultMessage: "Time"
|
|
213
|
+
}) }),
|
|
214
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
215
|
+
designSystem.TimePicker,
|
|
216
|
+
{
|
|
217
|
+
onChange: (time) => {
|
|
218
|
+
setFieldValue("time", time);
|
|
219
|
+
},
|
|
220
|
+
clearLabel: formatMessage({
|
|
221
|
+
id: "content-releases.modal.form.input.clearLabel",
|
|
222
|
+
defaultMessage: "Clear"
|
|
223
|
+
}),
|
|
224
|
+
onClear: () => {
|
|
225
|
+
setFieldValue("time", "");
|
|
226
|
+
},
|
|
227
|
+
value: values.time || void 0
|
|
228
|
+
}
|
|
229
|
+
),
|
|
230
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Field.Error, {})
|
|
231
|
+
] }) })
|
|
239
232
|
] }),
|
|
240
233
|
/* @__PURE__ */ jsxRuntime.jsx(TimezoneComponent, { timezoneOptions: timezoneList })
|
|
241
234
|
] })
|
|
@@ -282,37 +275,37 @@ const TimezoneComponent = ({ timezoneOptions }) => {
|
|
|
282
275
|
}
|
|
283
276
|
}
|
|
284
277
|
}, [setFieldValue, values.date, values.timezone]);
|
|
285
|
-
return /* @__PURE__ */ jsxRuntime.
|
|
286
|
-
designSystem.
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
}
|
|
309
|
-
);
|
|
278
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Field.Root, { name: "timezone", error: errors.timezone, required: true, children: [
|
|
279
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Field.Label, { children: formatMessage({
|
|
280
|
+
id: "content-releases.modal.form.input.label.timezone",
|
|
281
|
+
defaultMessage: "Timezone"
|
|
282
|
+
}) }),
|
|
283
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
284
|
+
designSystem.Combobox,
|
|
285
|
+
{
|
|
286
|
+
autocomplete: { type: "list", filter: "contains" },
|
|
287
|
+
value: values.timezone || void 0,
|
|
288
|
+
textValue: values.timezone ? values.timezone.replace(/&/, " ") : void 0,
|
|
289
|
+
onChange: (timezone) => {
|
|
290
|
+
setFieldValue("timezone", timezone);
|
|
291
|
+
},
|
|
292
|
+
onTextValueChange: (timezone) => {
|
|
293
|
+
setFieldValue("timezone", timezone);
|
|
294
|
+
},
|
|
295
|
+
onClear: () => {
|
|
296
|
+
setFieldValue("timezone", "");
|
|
297
|
+
},
|
|
298
|
+
children: timezoneList.map((timezone) => /* @__PURE__ */ jsxRuntime.jsx(designSystem.ComboboxOption, { value: timezone.value, children: timezone.value.replace(/&/, " ") }, timezone.value))
|
|
299
|
+
}
|
|
300
|
+
),
|
|
301
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Field.Error, {})
|
|
302
|
+
] });
|
|
310
303
|
};
|
|
311
304
|
const useTypedDispatch = reactRedux.useDispatch;
|
|
312
|
-
const LinkCard =
|
|
305
|
+
const LinkCard = styledComponents.styled(designSystem.Link)`
|
|
313
306
|
display: block;
|
|
314
307
|
`;
|
|
315
|
-
const RelativeTime =
|
|
308
|
+
const RelativeTime = styledComponents.styled(RelativeTime$1)`
|
|
316
309
|
display: inline-block;
|
|
317
310
|
&::first-letter {
|
|
318
311
|
text-transform: uppercase;
|
|
@@ -361,7 +354,7 @@ const ReleasesGrid = ({ sectionTitle, releases = [], isError = false }) => {
|
|
|
361
354
|
target: sectionTitle
|
|
362
355
|
}
|
|
363
356
|
),
|
|
364
|
-
icon: /* @__PURE__ */ jsxRuntime.jsx(
|
|
357
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(symbols.EmptyDocuments, { width: "16rem" })
|
|
365
358
|
}
|
|
366
359
|
);
|
|
367
360
|
}
|
|
@@ -380,7 +373,7 @@ const ReleasesGrid = ({ sectionTitle, releases = [], isError = false }) => {
|
|
|
380
373
|
gap: 4,
|
|
381
374
|
children: [
|
|
382
375
|
/* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "column", alignItems: "start", gap: 1, children: [
|
|
383
|
-
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, {
|
|
376
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { tag: "h3", variant: "delta", fontWeight: "bold", children: name }),
|
|
384
377
|
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "pi", textColor: "neutral600", children: scheduledAt ? /* @__PURE__ */ jsxRuntime.jsx(RelativeTime, { timestamp: new Date(scheduledAt) }) : formatMessage({
|
|
385
378
|
id: "content-releases.pages.Releases.not-scheduled",
|
|
386
379
|
defaultMessage: "Not scheduled"
|
|
@@ -391,7 +384,7 @@ const ReleasesGrid = ({ sectionTitle, releases = [], isError = false }) => {
|
|
|
391
384
|
}
|
|
392
385
|
) }) }, id)) });
|
|
393
386
|
};
|
|
394
|
-
const StyledAlert =
|
|
387
|
+
const StyledAlert = styledComponents.styled(designSystem.Alert)`
|
|
395
388
|
button {
|
|
396
389
|
display: none;
|
|
397
390
|
}
|
|
@@ -484,7 +477,7 @@ const ReleasesPage = () => {
|
|
|
484
477
|
});
|
|
485
478
|
trackUsage("didCreateRelease");
|
|
486
479
|
navigate(response2.data.data.id.toString());
|
|
487
|
-
} else if (
|
|
480
|
+
} else if (strapiAdmin.isFetchError(response2.error)) {
|
|
488
481
|
toggleNotification({
|
|
489
482
|
type: "danger",
|
|
490
483
|
message: formatAPIError(response2.error)
|
|
@@ -498,7 +491,7 @@ const ReleasesPage = () => {
|
|
|
498
491
|
};
|
|
499
492
|
return /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Main, { "aria-busy": isLoading, children: [
|
|
500
493
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
501
|
-
|
|
494
|
+
strapiAdmin.Layouts.Header,
|
|
502
495
|
{
|
|
503
496
|
title: formatMessage({
|
|
504
497
|
id: "content-releases.pages.Releases.title",
|
|
@@ -522,12 +515,12 @@ const ReleasesPage = () => {
|
|
|
522
515
|
) : null
|
|
523
516
|
}
|
|
524
517
|
),
|
|
525
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
518
|
+
/* @__PURE__ */ jsxRuntime.jsx(strapiAdmin.Layouts.Content, { children: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
526
519
|
hasReachedMaximumPendingReleases && /* @__PURE__ */ jsxRuntime.jsx(
|
|
527
520
|
StyledAlert,
|
|
528
521
|
{
|
|
529
522
|
marginBottom: 6,
|
|
530
|
-
action: /* @__PURE__ */ jsxRuntime.jsx(
|
|
523
|
+
action: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Link, { href: "https://strapi.io/pricing-cloud", isExternal: true, children: formatMessage({
|
|
531
524
|
id: "content-releases.pages.Releases.max-limit-reached.action",
|
|
532
525
|
defaultMessage: "Explore plans"
|
|
533
526
|
}) }),
|
|
@@ -621,13 +614,13 @@ const ReleasesPage = () => {
|
|
|
621
614
|
)
|
|
622
615
|
] });
|
|
623
616
|
};
|
|
624
|
-
const ReleaseInfoWrapper =
|
|
617
|
+
const ReleaseInfoWrapper = styledComponents.styled(designSystem.Flex)`
|
|
625
618
|
align-self: stretch;
|
|
626
619
|
border-bottom-right-radius: ${({ theme }) => theme.borderRadius};
|
|
627
620
|
border-bottom-left-radius: ${({ theme }) => theme.borderRadius};
|
|
628
621
|
border-top: 1px solid ${({ theme }) => theme.colors.neutral150};
|
|
629
622
|
`;
|
|
630
|
-
const StyledMenuItem =
|
|
623
|
+
const StyledMenuItem = styledComponents.styled(designSystem.Menu.Item)`
|
|
631
624
|
svg path {
|
|
632
625
|
fill: ${({ theme, disabled }) => disabled && theme.colors.neutral500};
|
|
633
626
|
}
|
|
@@ -636,24 +629,24 @@ const StyledMenuItem = styled__default.default(v2.Menu.Item)`
|
|
|
636
629
|
}
|
|
637
630
|
|
|
638
631
|
&:hover {
|
|
639
|
-
background: ${({ theme, variant = "neutral" }) => theme.colors[`${variant}100`]};
|
|
632
|
+
background: ${({ theme, $variant = "neutral" }) => theme.colors[`${$variant}100`]};
|
|
640
633
|
}
|
|
641
634
|
`;
|
|
642
|
-
const PencilIcon =
|
|
635
|
+
const PencilIcon = styledComponents.styled(icons.Pencil)`
|
|
643
636
|
width: ${({ theme }) => theme.spaces[3]};
|
|
644
637
|
height: ${({ theme }) => theme.spaces[3]};
|
|
645
638
|
path {
|
|
646
639
|
fill: ${({ theme }) => theme.colors.neutral600};
|
|
647
640
|
}
|
|
648
641
|
`;
|
|
649
|
-
const TrashIcon =
|
|
642
|
+
const TrashIcon = styledComponents.styled(icons.Trash)`
|
|
650
643
|
width: ${({ theme }) => theme.spaces[3]};
|
|
651
644
|
height: ${({ theme }) => theme.spaces[3]};
|
|
652
645
|
path {
|
|
653
646
|
fill: ${({ theme }) => theme.colors.danger600};
|
|
654
647
|
}
|
|
655
648
|
`;
|
|
656
|
-
const TypographyMaxWidth =
|
|
649
|
+
const TypographyMaxWidth = styledComponents.styled(designSystem.Typography)`
|
|
657
650
|
max-width: 300px;
|
|
658
651
|
`;
|
|
659
652
|
const EntryValidationText = ({ action, schema, entry }) => {
|
|
@@ -676,13 +669,13 @@ const EntryValidationText = ({ action, schema, entry }) => {
|
|
|
676
669
|
)
|
|
677
670
|
).join(" ");
|
|
678
671
|
return /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { gap: 2, children: [
|
|
679
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
672
|
+
/* @__PURE__ */ jsxRuntime.jsx(icons.CrossCircle, { fill: "danger600" }),
|
|
680
673
|
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Tooltip, { description: validationErrorsMessages, children: /* @__PURE__ */ jsxRuntime.jsx(TypographyMaxWidth, { textColor: "danger600", variant: "omega", fontWeight: "semiBold", ellipsis: true, children: validationErrorsMessages }) })
|
|
681
674
|
] });
|
|
682
675
|
}
|
|
683
676
|
if (action == "publish") {
|
|
684
677
|
return /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { gap: 2, children: [
|
|
685
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
678
|
+
/* @__PURE__ */ jsxRuntime.jsx(icons.CheckCircle, { fill: "success600" }),
|
|
686
679
|
entry.publishedAt ? /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { textColor: "success600", fontWeight: "bold", children: formatMessage({
|
|
687
680
|
id: "content-releases.pages.ReleaseDetails.entry-validation.already-published",
|
|
688
681
|
defaultMessage: "Already published"
|
|
@@ -693,7 +686,7 @@ const EntryValidationText = ({ action, schema, entry }) => {
|
|
|
693
686
|
] });
|
|
694
687
|
}
|
|
695
688
|
return /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { gap: 2, children: [
|
|
696
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
689
|
+
/* @__PURE__ */ jsxRuntime.jsx(icons.CheckCircle, { fill: "success600" }),
|
|
697
690
|
!entry.publishedAt ? /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { textColor: "success600", fontWeight: "bold", children: formatMessage({
|
|
698
691
|
id: "content-releases.pages.ReleaseDetails.entry-validation.already-unpublished",
|
|
699
692
|
defaultMessage: "Already unpublished"
|
|
@@ -745,7 +738,7 @@ const ReleaseDetailsLayout = ({
|
|
|
745
738
|
totalPublishedEntries,
|
|
746
739
|
totalUnpublishedEntries
|
|
747
740
|
});
|
|
748
|
-
} else if (
|
|
741
|
+
} else if (strapiAdmin.isFetchError(response.error)) {
|
|
749
742
|
toggleNotification({
|
|
750
743
|
type: "danger",
|
|
751
744
|
message: formatAPIError(response.error)
|
|
@@ -827,7 +820,7 @@ const ReleaseDetailsLayout = ({
|
|
|
827
820
|
) : "";
|
|
828
821
|
return /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Main, { "aria-busy": isLoadingDetails, children: [
|
|
829
822
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
830
|
-
|
|
823
|
+
strapiAdmin.Layouts.Header,
|
|
831
824
|
{
|
|
832
825
|
title: release.name,
|
|
833
826
|
subtitle: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { gap: 2, lineHeight: 6, children: [
|
|
@@ -836,11 +829,11 @@ const ReleaseDetailsLayout = ({
|
|
|
836
829
|
] }),
|
|
837
830
|
navigationAction: /* @__PURE__ */ jsxRuntime.jsx(strapiAdmin.BackButton, {}),
|
|
838
831
|
primaryAction: !release.releasedAt && /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { gap: 2, children: [
|
|
839
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
832
|
+
/* @__PURE__ */ jsxRuntime.jsxs(designSystem.Menu.Root, { children: [
|
|
840
833
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
841
|
-
|
|
834
|
+
designSystem.Menu.Trigger,
|
|
842
835
|
{
|
|
843
|
-
|
|
836
|
+
tag: designSystem.IconButton,
|
|
844
837
|
paddingLeft: 2,
|
|
845
838
|
paddingRight: 2,
|
|
846
839
|
"aria-label": formatMessage({
|
|
@@ -851,7 +844,7 @@ const ReleaseDetailsLayout = ({
|
|
|
851
844
|
variant: "tertiary"
|
|
852
845
|
}
|
|
853
846
|
),
|
|
854
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
847
|
+
/* @__PURE__ */ jsxRuntime.jsxs(designSystem.Menu.Content, { top: 1, popoverPlacement: "bottom-end", maxHeight: void 0, children: [
|
|
855
848
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
856
849
|
designSystem.Flex,
|
|
857
850
|
{
|
|
@@ -873,7 +866,7 @@ const ReleaseDetailsLayout = ({
|
|
|
873
866
|
{
|
|
874
867
|
disabled: !canDelete,
|
|
875
868
|
onSelect: toggleWarningSubmit,
|
|
876
|
-
variant: "danger",
|
|
869
|
+
$variant: "danger",
|
|
877
870
|
children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { alignItems: "center", gap: 2, hasRadius: true, width: "100%", children: [
|
|
878
871
|
/* @__PURE__ */ jsxRuntime.jsx(TrashIcon, {}),
|
|
879
872
|
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { ellipsis: true, textColor: "danger600", children: formatMessage({
|
|
@@ -1014,7 +1007,7 @@ const ReleaseDetailsBody = ({ releaseId }) => {
|
|
|
1014
1007
|
// We are passing the action path to found the position in the cache of the action for optimistic updates
|
|
1015
1008
|
});
|
|
1016
1009
|
if ("error" in response) {
|
|
1017
|
-
if (
|
|
1010
|
+
if (strapiAdmin.isFetchError(response.error)) {
|
|
1018
1011
|
toggleNotification({
|
|
1019
1012
|
type: "danger",
|
|
1020
1013
|
message: formatAPIError(response.error)
|
|
@@ -1060,13 +1053,13 @@ const ReleaseDetailsBody = ({ releaseId }) => {
|
|
|
1060
1053
|
return /* @__PURE__ */ jsxRuntime.jsx(strapiAdmin.Page.Error, {});
|
|
1061
1054
|
}
|
|
1062
1055
|
if (Object.keys(releaseActions).length === 0) {
|
|
1063
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1056
|
+
return /* @__PURE__ */ jsxRuntime.jsx(strapiAdmin.Layouts.Content, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1064
1057
|
designSystem.EmptyStateLayout,
|
|
1065
1058
|
{
|
|
1066
1059
|
action: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1067
|
-
|
|
1060
|
+
designSystem.LinkButton,
|
|
1068
1061
|
{
|
|
1069
|
-
|
|
1062
|
+
tag: reactRouterDom.Link,
|
|
1070
1063
|
to: {
|
|
1071
1064
|
pathname: "/content-manager"
|
|
1072
1065
|
},
|
|
@@ -1078,7 +1071,7 @@ const ReleaseDetailsBody = ({ releaseId }) => {
|
|
|
1078
1071
|
})
|
|
1079
1072
|
}
|
|
1080
1073
|
),
|
|
1081
|
-
icon: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1074
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(symbols.EmptyDocuments, { width: "16rem" }),
|
|
1082
1075
|
content: formatMessage({
|
|
1083
1076
|
id: "content-releases.pages.Details.tab.emptyEntries",
|
|
1084
1077
|
defaultMessage: "This release is empty. Open the Content Manager, select an entry and add it to the release."
|
|
@@ -1124,7 +1117,7 @@ const ReleaseDetailsBody = ({ releaseId }) => {
|
|
|
1124
1117
|
] : []
|
|
1125
1118
|
];
|
|
1126
1119
|
const options = hasI18nEnabled ? GROUP_BY_OPTIONS : GROUP_BY_OPTIONS_NO_LOCALE;
|
|
1127
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1120
|
+
return /* @__PURE__ */ jsxRuntime.jsx(strapiAdmin.Layouts.Content, { children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { gap: 8, direction: "column", alignItems: "stretch", children: [
|
|
1128
1121
|
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1129
1122
|
designSystem.SingleSelect,
|
|
1130
1123
|
{
|
|
@@ -1287,7 +1280,7 @@ const ReleaseDetailsPage = () => {
|
|
|
1287
1280
|
})
|
|
1288
1281
|
});
|
|
1289
1282
|
toggleEditReleaseModal();
|
|
1290
|
-
} else if (
|
|
1283
|
+
} else if (strapiAdmin.isFetchError(response.error)) {
|
|
1291
1284
|
toggleNotification({
|
|
1292
1285
|
type: "danger",
|
|
1293
1286
|
message: formatAPIError(response.error)
|
|
@@ -1305,7 +1298,7 @@ const ReleaseDetailsPage = () => {
|
|
|
1305
1298
|
});
|
|
1306
1299
|
if ("data" in response) {
|
|
1307
1300
|
navigate("..");
|
|
1308
|
-
} else if (
|
|
1301
|
+
} else if (strapiAdmin.isFetchError(response.error)) {
|
|
1309
1302
|
toggleNotification({
|
|
1310
1303
|
type: "danger",
|
|
1311
1304
|
message: formatAPIError(response.error)
|
|
@@ -1363,4 +1356,4 @@ const App = () => {
|
|
|
1363
1356
|
] }) });
|
|
1364
1357
|
};
|
|
1365
1358
|
exports.App = App;
|
|
1366
|
-
//# sourceMappingURL=App-
|
|
1359
|
+
//# sourceMappingURL=App-BdcItFff.js.map
|