@strapi/content-manager 0.0.0-experimental.30e5d19d03d07d2b73ac7ed4b376a833d4270bde → 0.0.0-experimental.3162602be5ecf801e9697f416d1467608d46ad32
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/{ComponentConfigurationPage-DP7AC0UU.js → ComponentConfigurationPage-CO977CPh.js} +4 -4
- package/dist/_chunks/{ComponentConfigurationPage-DP7AC0UU.js.map → ComponentConfigurationPage-CO977CPh.js.map} +1 -1
- package/dist/_chunks/{ComponentConfigurationPage-7-qB29e7.mjs → ComponentConfigurationPage-CQroR9Qk.mjs} +4 -4
- package/dist/_chunks/{ComponentConfigurationPage-7-qB29e7.mjs.map → ComponentConfigurationPage-CQroR9Qk.mjs.map} +1 -1
- package/dist/_chunks/{EditConfigurationPage-DITVliEI.js → EditConfigurationPage-BPgoE-kf.js} +4 -4
- package/dist/_chunks/{EditConfigurationPage-DITVliEI.js.map → EditConfigurationPage-BPgoE-kf.js.map} +1 -1
- package/dist/_chunks/{EditConfigurationPage-CI4XoymK.mjs → EditConfigurationPage-tVCJ5vWC.mjs} +4 -4
- package/dist/_chunks/{EditConfigurationPage-CI4XoymK.mjs.map → EditConfigurationPage-tVCJ5vWC.mjs.map} +1 -1
- package/dist/_chunks/{EditViewPage-Dzpno8xI.mjs → EditViewPage-8mOu02ji.mjs} +10 -4
- package/dist/_chunks/EditViewPage-8mOu02ji.mjs.map +1 -0
- package/dist/_chunks/{EditViewPage-CUS2EAhB.js → EditViewPage-BMVgUNOX.js} +10 -4
- package/dist/_chunks/EditViewPage-BMVgUNOX.js.map +1 -0
- package/dist/_chunks/{Field-B_jG_EV9.mjs → Field-CJPYzwD7.mjs} +42 -10
- package/dist/_chunks/Field-CJPYzwD7.mjs.map +1 -0
- package/dist/_chunks/{Field-CtUU1Fg8.js → Field-CdSLKFQk.js} +42 -10
- package/dist/_chunks/Field-CdSLKFQk.js.map +1 -0
- package/dist/_chunks/{Form-BXHao2mZ.mjs → Form-DJOJ-GF1.mjs} +3 -3
- package/dist/_chunks/Form-DJOJ-GF1.mjs.map +1 -0
- package/dist/_chunks/{Form-DTqO0ymI.js → Form-eP5bZwap.js} +3 -3
- package/dist/_chunks/Form-eP5bZwap.js.map +1 -0
- package/dist/_chunks/{History-C_uSGzO5.js → History-B-Mrquzu.js} +23 -10
- package/dist/_chunks/History-B-Mrquzu.js.map +1 -0
- package/dist/_chunks/{History-2Ah2CQ4T.mjs → History-MnQLtk1g.mjs} +24 -11
- package/dist/_chunks/History-MnQLtk1g.mjs.map +1 -0
- package/dist/_chunks/{ListConfigurationPage-BjSJlaoC.mjs → ListConfigurationPage-BcycI8Lw.mjs} +3 -3
- package/dist/_chunks/{ListConfigurationPage-BjSJlaoC.mjs.map → ListConfigurationPage-BcycI8Lw.mjs.map} +1 -1
- package/dist/_chunks/{ListConfigurationPage-nyuP7OSy.js → ListConfigurationPage-C0n4rUzH.js} +3 -3
- package/dist/_chunks/{ListConfigurationPage-nyuP7OSy.js.map → ListConfigurationPage-C0n4rUzH.js.map} +1 -1
- package/dist/_chunks/{ListViewPage-B75x3nz2.mjs → ListViewPage-CRXONXwZ.mjs} +3 -3
- package/dist/_chunks/{ListViewPage-B75x3nz2.mjs.map → ListViewPage-CRXONXwZ.mjs.map} +1 -1
- package/dist/_chunks/{ListViewPage-DHgHD8Xg.js → ListViewPage-q0SHVPUS.js} +3 -3
- package/dist/_chunks/{ListViewPage-DHgHD8Xg.js.map → ListViewPage-q0SHVPUS.js.map} +1 -1
- package/dist/_chunks/{NoContentTypePage-CDUKdZ7d.js → NoContentTypePage-Bh3komDV.js} +2 -2
- package/dist/_chunks/{NoContentTypePage-CDUKdZ7d.js.map → NoContentTypePage-Bh3komDV.js.map} +1 -1
- package/dist/_chunks/{NoContentTypePage-DUacQSyF.mjs → NoContentTypePage-ukzFRF3z.mjs} +2 -2
- package/dist/_chunks/{NoContentTypePage-DUacQSyF.mjs.map → NoContentTypePage-ukzFRF3z.mjs.map} +1 -1
- package/dist/_chunks/{NoPermissionsPage-SFllMekk.mjs → NoPermissionsPage-B4sD7Ble.mjs} +2 -2
- package/dist/_chunks/{NoPermissionsPage-SFllMekk.mjs.map → NoPermissionsPage-B4sD7Ble.mjs.map} +1 -1
- package/dist/_chunks/{NoPermissionsPage-zwIZydDI.js → NoPermissionsPage-BGBpj_Y1.js} +2 -2
- package/dist/_chunks/{NoPermissionsPage-zwIZydDI.js.map → NoPermissionsPage-BGBpj_Y1.js.map} +1 -1
- package/dist/_chunks/{Relations-NFLaRNPr.js → Relations-B53wYe8g.js} +25 -20
- package/dist/_chunks/Relations-B53wYe8g.js.map +1 -0
- package/dist/_chunks/{Relations-D2NRW8fC.mjs → Relations-CIexb8gr.mjs} +25 -20
- package/dist/_chunks/Relations-CIexb8gr.mjs.map +1 -0
- package/dist/_chunks/{en-BlhnxQfj.js → en-Bm0D0IWz.js} +7 -7
- package/dist/_chunks/{en-BlhnxQfj.js.map → en-Bm0D0IWz.js.map} +1 -1
- package/dist/_chunks/{en-C8YBvRrK.mjs → en-DKV44jRb.mjs} +7 -7
- package/dist/_chunks/{en-C8YBvRrK.mjs.map → en-DKV44jRb.mjs.map} +1 -1
- package/dist/_chunks/{index-C9HxCo5R.mjs → index-CJ2vYwuT.mjs} +85 -76
- package/dist/_chunks/index-CJ2vYwuT.mjs.map +1 -0
- package/dist/_chunks/{index-ovJRE1FM.js → index-DbT2sx-Q.js} +84 -75
- package/dist/_chunks/index-DbT2sx-Q.js.map +1 -0
- package/dist/_chunks/{layout-UNWstw_s.js → layout-CeBSIkmP.js} +3 -3
- package/dist/_chunks/{layout-UNWstw_s.js.map → layout-CeBSIkmP.js.map} +1 -1
- package/dist/_chunks/{layout-DaUjDiWQ.mjs → layout-vzKSrr7p.mjs} +3 -3
- package/dist/_chunks/{layout-DaUjDiWQ.mjs.map → layout-vzKSrr7p.mjs.map} +1 -1
- package/dist/_chunks/{objects-gigeqt7s.js → objects-BcXOv6_9.js} +2 -4
- package/dist/_chunks/{objects-gigeqt7s.js.map → objects-BcXOv6_9.js.map} +1 -1
- package/dist/_chunks/{objects-mKMAmfec.mjs → objects-D6yBsdmx.mjs} +2 -4
- package/dist/_chunks/{objects-mKMAmfec.mjs.map → objects-D6yBsdmx.mjs.map} +1 -1
- package/dist/_chunks/{relations-NN3coOG5.js → relations-Cl-6t9iz.js} +2 -2
- package/dist/_chunks/{relations-NN3coOG5.js.map → relations-Cl-6t9iz.js.map} +1 -1
- package/dist/_chunks/{relations-D8iFAeRu.mjs → relations-DI0lguF0.mjs} +2 -2
- package/dist/_chunks/{relations-D8iFAeRu.mjs.map → relations-DI0lguF0.mjs.map} +1 -1
- package/dist/admin/index.js +1 -1
- package/dist/admin/index.mjs +1 -1
- package/dist/server/index.js +17 -10
- package/dist/server/index.js.map +1 -1
- package/dist/server/index.mjs +17 -10
- package/dist/server/index.mjs.map +1 -1
- package/dist/server/src/controllers/collection-types.d.ts.map +1 -1
- package/dist/server/src/controllers/relations.d.ts.map +1 -1
- package/dist/server/src/history/services/history.d.ts.map +1 -1
- package/package.json +7 -7
- package/dist/_chunks/EditViewPage-CUS2EAhB.js.map +0 -1
- package/dist/_chunks/EditViewPage-Dzpno8xI.mjs.map +0 -1
- package/dist/_chunks/Field-B_jG_EV9.mjs.map +0 -1
- package/dist/_chunks/Field-CtUU1Fg8.js.map +0 -1
- package/dist/_chunks/Form-BXHao2mZ.mjs.map +0 -1
- package/dist/_chunks/Form-DTqO0ymI.js.map +0 -1
- package/dist/_chunks/History-2Ah2CQ4T.mjs.map +0 -1
- package/dist/_chunks/History-C_uSGzO5.js.map +0 -1
- package/dist/_chunks/Relations-D2NRW8fC.mjs.map +0 -1
- package/dist/_chunks/Relations-NFLaRNPr.js.map +0 -1
- package/dist/_chunks/index-C9HxCo5R.mjs.map +0 -1
- package/dist/_chunks/index-ovJRE1FM.js.map +0 -1
@@ -1,6 +1,6 @@
|
|
1
1
|
import { More, Cross, WarningCircle, ListPlus, Pencil, Trash, Check, CrossCircle, CheckCircle, ArrowsCounterClockwise, ChevronRight, Duplicate, ClockCounterClockwise, Feather } from "@strapi/icons";
|
2
2
|
import { jsx, Fragment, jsxs } from "react/jsx-runtime";
|
3
|
-
import { useStrapiApp, createContext, useAuth, useRBAC, Page, adminApi, translatedErrors, useNotification, useAPIErrorHandler,
|
3
|
+
import { useStrapiApp, createContext, useQueryParams, useAuth, useRBAC, Page, adminApi, translatedErrors, useNotification, useAPIErrorHandler, getYupValidationErrors, useForm, useTracking, useGuidedTour, BackButton, DescriptionComponentRenderer, useTable, Table } from "@strapi/admin/strapi-admin";
|
4
4
|
import * as React from "react";
|
5
5
|
import { lazy } from "react";
|
6
6
|
import { Button, Menu, VisuallyHidden, Flex, Typography, Dialog, Modal, Radio, Status, Box, SingleSelect, SingleSelectOption, IconButton, Loader, Tooltip, LinkButton } from "@strapi/design-system";
|
@@ -100,6 +100,7 @@ const DocumentRBAC = ({ children, permissions }) => {
|
|
100
100
|
if (!slug) {
|
101
101
|
throw new Error("Cannot find the slug param in the URL");
|
102
102
|
}
|
103
|
+
const [{ rawQuery }] = useQueryParams();
|
103
104
|
const userPermissions = useAuth("DocumentRBAC", (state) => state.permissions);
|
104
105
|
const contentTypePermissions = React.useMemo(() => {
|
105
106
|
const contentTypePermissions2 = userPermissions.filter(
|
@@ -110,7 +111,14 @@ const DocumentRBAC = ({ children, permissions }) => {
|
|
110
111
|
return { ...acc, [action]: [permission] };
|
111
112
|
}, {});
|
112
113
|
}, [slug, userPermissions]);
|
113
|
-
const { isLoading, allowedActions } = useRBAC(
|
114
|
+
const { isLoading, allowedActions } = useRBAC(
|
115
|
+
contentTypePermissions,
|
116
|
+
permissions ?? void 0,
|
117
|
+
// TODO: useRBAC context should be typed and built differently
|
118
|
+
// We are passing raw query as context to the hook so that it can
|
119
|
+
// rely on the locale provided from DocumentRBAC for its permission calculations.
|
120
|
+
rawQuery
|
121
|
+
);
|
114
122
|
const canCreateFields = !isLoading && allowedActions.canCreate ? extractAndDedupeFields(contentTypePermissions.create) : [];
|
115
123
|
const canReadFields = !isLoading && allowedActions.canRead ? extractAndDedupeFields(contentTypePermissions.read) : [];
|
116
124
|
const canUpdateFields = !isLoading && allowedActions.canUpdate ? extractAndDedupeFields(contentTypePermissions.update) : [];
|
@@ -461,6 +469,24 @@ const buildValidParams = (query) => {
|
|
461
469
|
const isBaseQueryError = (error) => {
|
462
470
|
return error.name !== void 0;
|
463
471
|
};
|
472
|
+
const arrayValidator = (attribute, options) => ({
|
473
|
+
message: translatedErrors.required,
|
474
|
+
test(value) {
|
475
|
+
if (options.status === "draft") {
|
476
|
+
return true;
|
477
|
+
}
|
478
|
+
if (!attribute.required) {
|
479
|
+
return true;
|
480
|
+
}
|
481
|
+
if (!value) {
|
482
|
+
return false;
|
483
|
+
}
|
484
|
+
if (Array.isArray(value) && value.length === 0) {
|
485
|
+
return false;
|
486
|
+
}
|
487
|
+
return true;
|
488
|
+
}
|
489
|
+
});
|
464
490
|
const createYupSchema = (attributes = {}, components = {}, options = { status: null }) => {
|
465
491
|
const createModelSchema = (attributes2) => yup.object().shape(
|
466
492
|
Object.entries(attributes2).reduce((acc, [name, attribute]) => {
|
@@ -468,6 +494,7 @@ const createYupSchema = (attributes = {}, components = {}, options = { status: n
|
|
468
494
|
return acc;
|
469
495
|
}
|
470
496
|
const validations = [
|
497
|
+
addNullableValidation,
|
471
498
|
addRequiredValidation,
|
472
499
|
addMinLengthValidation,
|
473
500
|
addMaxLengthValidation,
|
@@ -484,12 +511,12 @@ const createYupSchema = (attributes = {}, components = {}, options = { status: n
|
|
484
511
|
...acc,
|
485
512
|
[name]: transformSchema(
|
486
513
|
yup.array().of(createModelSchema(attributes3).nullable(false))
|
487
|
-
)
|
514
|
+
).test(arrayValidator(attribute, options))
|
488
515
|
};
|
489
516
|
} else {
|
490
517
|
return {
|
491
518
|
...acc,
|
492
|
-
[name]: transformSchema(createModelSchema(attributes3))
|
519
|
+
[name]: transformSchema(createModelSchema(attributes3).nullable())
|
493
520
|
};
|
494
521
|
}
|
495
522
|
}
|
@@ -511,7 +538,7 @@ const createYupSchema = (attributes = {}, components = {}, options = { status: n
|
|
511
538
|
}
|
512
539
|
)
|
513
540
|
)
|
514
|
-
)
|
541
|
+
).test(arrayValidator(attribute, options))
|
515
542
|
};
|
516
543
|
case "relation":
|
517
544
|
return {
|
@@ -609,17 +636,17 @@ const nullableSchema = (schema) => {
|
|
609
636
|
schema
|
610
637
|
);
|
611
638
|
};
|
639
|
+
const addNullableValidation = () => (schema) => {
|
640
|
+
return nullableSchema(schema);
|
641
|
+
};
|
612
642
|
const addRequiredValidation = (attribute, options) => (schema) => {
|
613
|
-
if (options.status === "draft") {
|
614
|
-
return
|
615
|
-
}
|
616
|
-
if ((attribute.type === "component" && attribute.repeatable || attribute.type === "dynamiczone") && attribute.required && "min" in schema) {
|
617
|
-
return schema.min(1, translatedErrors.required);
|
643
|
+
if (options.status === "draft" || !attribute.required) {
|
644
|
+
return schema;
|
618
645
|
}
|
619
|
-
if (attribute.required &&
|
646
|
+
if (attribute.required && "required" in schema) {
|
620
647
|
return schema.required(translatedErrors.required);
|
621
648
|
}
|
622
|
-
return
|
649
|
+
return schema;
|
623
650
|
};
|
624
651
|
const addMinLengthValidation = (attribute, options) => (schema) => {
|
625
652
|
if (options.status === "draft") {
|
@@ -647,31 +674,12 @@ const addMaxLengthValidation = (attribute) => (schema) => {
|
|
647
674
|
return schema;
|
648
675
|
};
|
649
676
|
const addMinValidation = (attribute, options) => (schema) => {
|
650
|
-
if ("
|
677
|
+
if (options.status === "draft") {
|
678
|
+
return schema;
|
679
|
+
}
|
680
|
+
if ("min" in attribute && "min" in schema) {
|
651
681
|
const min = toInteger(attribute.min);
|
652
|
-
if (
|
653
|
-
if (options.status !== "draft" && !attribute.required && "test" in schema && min) {
|
654
|
-
return schema.test(
|
655
|
-
"custom-min",
|
656
|
-
{
|
657
|
-
...translatedErrors.min,
|
658
|
-
values: {
|
659
|
-
min: attribute.min
|
660
|
-
}
|
661
|
-
},
|
662
|
-
(value) => {
|
663
|
-
if (!value) {
|
664
|
-
return true;
|
665
|
-
}
|
666
|
-
if (Array.isArray(value) && value.length === 0) {
|
667
|
-
return true;
|
668
|
-
}
|
669
|
-
return value.length >= min;
|
670
|
-
}
|
671
|
-
);
|
672
|
-
}
|
673
|
-
}
|
674
|
-
if ("min" in schema && min) {
|
682
|
+
if (min) {
|
675
683
|
return schema.min(min, {
|
676
684
|
...translatedErrors.min,
|
677
685
|
values: {
|
@@ -1166,16 +1174,18 @@ const useDoc = () => {
|
|
1166
1174
|
if (!slug) {
|
1167
1175
|
throw new Error("Could not find model in url params");
|
1168
1176
|
}
|
1177
|
+
const document = useDocument(
|
1178
|
+
{ documentId: origin || id, model: slug, collectionType, params },
|
1179
|
+
{
|
1180
|
+
skip: id === "create" || !origin && !id && collectionType !== SINGLE_TYPES
|
1181
|
+
}
|
1182
|
+
);
|
1183
|
+
const returnId = origin || id === "create" ? void 0 : id;
|
1169
1184
|
return {
|
1170
1185
|
collectionType,
|
1171
1186
|
model: slug,
|
1172
|
-
id:
|
1173
|
-
...
|
1174
|
-
{ documentId: origin || id, model: slug, collectionType, params },
|
1175
|
-
{
|
1176
|
-
skip: id === "create" || !origin && !id && collectionType !== SINGLE_TYPES
|
1177
|
-
}
|
1178
|
-
)
|
1187
|
+
id: returnId,
|
1188
|
+
...document
|
1179
1189
|
};
|
1180
1190
|
};
|
1181
1191
|
const useContentManagerContext = () => {
|
@@ -1218,9 +1228,6 @@ const useContentManagerContext = () => {
|
|
1218
1228
|
};
|
1219
1229
|
};
|
1220
1230
|
const prefixPluginTranslations = (trad, pluginId) => {
|
1221
|
-
if (!pluginId) {
|
1222
|
-
throw new TypeError("pluginId can't be empty");
|
1223
|
-
}
|
1224
1231
|
return Object.keys(trad).reduce((acc, current) => {
|
1225
1232
|
acc[`${pluginId}.${current}`] = trad[current];
|
1226
1233
|
return acc;
|
@@ -1655,7 +1662,7 @@ const useDocumentActions = () => {
|
|
1655
1662
|
};
|
1656
1663
|
};
|
1657
1664
|
const ProtectedHistoryPage = lazy(
|
1658
|
-
() => import("./History-
|
1665
|
+
() => import("./History-MnQLtk1g.mjs").then((mod) => ({ default: mod.ProtectedHistoryPage }))
|
1659
1666
|
);
|
1660
1667
|
const routes$1 = [
|
1661
1668
|
{
|
@@ -1668,31 +1675,31 @@ const routes$1 = [
|
|
1668
1675
|
}
|
1669
1676
|
];
|
1670
1677
|
const ProtectedEditViewPage = lazy(
|
1671
|
-
() => import("./EditViewPage-
|
1678
|
+
() => import("./EditViewPage-8mOu02ji.mjs").then((mod) => ({ default: mod.ProtectedEditViewPage }))
|
1672
1679
|
);
|
1673
1680
|
const ProtectedListViewPage = lazy(
|
1674
|
-
() => import("./ListViewPage-
|
1681
|
+
() => import("./ListViewPage-CRXONXwZ.mjs").then((mod) => ({ default: mod.ProtectedListViewPage }))
|
1675
1682
|
);
|
1676
1683
|
const ProtectedListConfiguration = lazy(
|
1677
|
-
() => import("./ListConfigurationPage-
|
1684
|
+
() => import("./ListConfigurationPage-BcycI8Lw.mjs").then((mod) => ({
|
1678
1685
|
default: mod.ProtectedListConfiguration
|
1679
1686
|
}))
|
1680
1687
|
);
|
1681
1688
|
const ProtectedEditConfigurationPage = lazy(
|
1682
|
-
() => import("./EditConfigurationPage-
|
1689
|
+
() => import("./EditConfigurationPage-tVCJ5vWC.mjs").then((mod) => ({
|
1683
1690
|
default: mod.ProtectedEditConfigurationPage
|
1684
1691
|
}))
|
1685
1692
|
);
|
1686
1693
|
const ProtectedComponentConfigurationPage = lazy(
|
1687
|
-
() => import("./ComponentConfigurationPage-
|
1694
|
+
() => import("./ComponentConfigurationPage-CQroR9Qk.mjs").then((mod) => ({
|
1688
1695
|
default: mod.ProtectedComponentConfigurationPage
|
1689
1696
|
}))
|
1690
1697
|
);
|
1691
1698
|
const NoPermissions = lazy(
|
1692
|
-
() => import("./NoPermissionsPage-
|
1699
|
+
() => import("./NoPermissionsPage-B4sD7Ble.mjs").then((mod) => ({ default: mod.NoPermissions }))
|
1693
1700
|
);
|
1694
1701
|
const NoContentType = lazy(
|
1695
|
-
() => import("./NoContentTypePage-
|
1702
|
+
() => import("./NoContentTypePage-ukzFRF3z.mjs").then((mod) => ({ default: mod.NoContentType }))
|
1696
1703
|
);
|
1697
1704
|
const CollectionTypePages = () => {
|
1698
1705
|
const { collectionType } = useParams();
|
@@ -2139,7 +2146,9 @@ const PublishAction$1 = ({
|
|
2139
2146
|
const performPublish = async () => {
|
2140
2147
|
setSubmitting(true);
|
2141
2148
|
try {
|
2142
|
-
const { errors } = await validate(
|
2149
|
+
const { errors } = await validate(true, {
|
2150
|
+
status: "published"
|
2151
|
+
});
|
2143
2152
|
if (errors) {
|
2144
2153
|
toggleNotification({
|
2145
2154
|
type: "danger",
|
@@ -2253,18 +2262,18 @@ const UpdateAction = ({
|
|
2253
2262
|
onClick: async () => {
|
2254
2263
|
setSubmitting(true);
|
2255
2264
|
try {
|
2256
|
-
|
2257
|
-
|
2258
|
-
|
2259
|
-
|
2260
|
-
|
2261
|
-
|
2262
|
-
|
2263
|
-
|
2264
|
-
|
2265
|
-
})
|
2266
|
-
|
2267
|
-
|
2265
|
+
const { errors } = await validate(true, {
|
2266
|
+
status: "draft"
|
2267
|
+
});
|
2268
|
+
if (errors) {
|
2269
|
+
toggleNotification({
|
2270
|
+
type: "danger",
|
2271
|
+
message: formatMessage({
|
2272
|
+
id: "content-manager.validation.error",
|
2273
|
+
defaultMessage: "There are validation errors in your document. Please fix them before saving."
|
2274
|
+
})
|
2275
|
+
});
|
2276
|
+
return;
|
2268
2277
|
}
|
2269
2278
|
if (isCloning) {
|
2270
2279
|
const res = await clone(
|
@@ -2646,12 +2655,12 @@ const Information = ({ activeTab }) => {
|
|
2646
2655
|
isDisplayed: !!publishDocument?.[PUBLISHED_AT_ATTRIBUTE_NAME],
|
2647
2656
|
label: formatMessage({
|
2648
2657
|
id: "content-manager.containers.edit.information.last-published.label",
|
2649
|
-
defaultMessage: "
|
2658
|
+
defaultMessage: "Published"
|
2650
2659
|
}),
|
2651
2660
|
value: formatMessage(
|
2652
2661
|
{
|
2653
2662
|
id: "content-manager.containers.edit.information.last-published.value",
|
2654
|
-
defaultMessage: `
|
2663
|
+
defaultMessage: `{time}{isAnonymous, select, true {} other { by {author}}}`
|
2655
2664
|
},
|
2656
2665
|
{
|
2657
2666
|
time: /* @__PURE__ */ jsx(RelativeTime, { timestamp: new Date(publishDocument?.[PUBLISHED_AT_ATTRIBUTE_NAME]) }),
|
@@ -2664,12 +2673,12 @@ const Information = ({ activeTab }) => {
|
|
2664
2673
|
isDisplayed: !!createAndUpdateDocument?.[UPDATED_AT_ATTRIBUTE_NAME],
|
2665
2674
|
label: formatMessage({
|
2666
2675
|
id: "content-manager.containers.edit.information.last-draft.label",
|
2667
|
-
defaultMessage: "
|
2676
|
+
defaultMessage: "Updated"
|
2668
2677
|
}),
|
2669
2678
|
value: formatMessage(
|
2670
2679
|
{
|
2671
2680
|
id: "content-manager.containers.edit.information.last-draft.value",
|
2672
|
-
defaultMessage: `
|
2681
|
+
defaultMessage: `{time}{isAnonymous, select, true {} other { by {author}}}`
|
2673
2682
|
},
|
2674
2683
|
{
|
2675
2684
|
time: /* @__PURE__ */ jsx(
|
@@ -2687,12 +2696,12 @@ const Information = ({ activeTab }) => {
|
|
2687
2696
|
isDisplayed: !!createAndUpdateDocument?.[CREATED_AT_ATTRIBUTE_NAME],
|
2688
2697
|
label: formatMessage({
|
2689
2698
|
id: "content-manager.containers.edit.information.document.label",
|
2690
|
-
defaultMessage: "
|
2699
|
+
defaultMessage: "Created"
|
2691
2700
|
}),
|
2692
2701
|
value: formatMessage(
|
2693
2702
|
{
|
2694
2703
|
id: "content-manager.containers.edit.information.document.value",
|
2695
|
-
defaultMessage: `
|
2704
|
+
defaultMessage: `{time}{isAnonymous, select, true {} other { by {author}}}`
|
2696
2705
|
},
|
2697
2706
|
{
|
2698
2707
|
time: /* @__PURE__ */ jsx(
|
@@ -3997,7 +4006,7 @@ const index = {
|
|
3997
4006
|
app.router.addRoute({
|
3998
4007
|
path: "content-manager/*",
|
3999
4008
|
lazy: async () => {
|
4000
|
-
const { Layout } = await import("./layout-
|
4009
|
+
const { Layout } = await import("./layout-vzKSrr7p.mjs");
|
4001
4010
|
return {
|
4002
4011
|
Component: Layout
|
4003
4012
|
};
|
@@ -4014,7 +4023,7 @@ const index = {
|
|
4014
4023
|
async registerTrads({ locales }) {
|
4015
4024
|
const importedTrads = await Promise.all(
|
4016
4025
|
locales.map((locale) => {
|
4017
|
-
return __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "./translations/ar.json": () => import("./ar-CCEVvqGG.mjs"), "./translations/ca.json": () => import("./ca-5U32ON2v.mjs"), "./translations/cs.json": () => import("./cs-CM2aBUar.mjs"), "./translations/de.json": () => import("./de-C72KDNOl.mjs"), "./translations/en.json": () => import("./en-
|
4026
|
+
return __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "./translations/ar.json": () => import("./ar-CCEVvqGG.mjs"), "./translations/ca.json": () => import("./ca-5U32ON2v.mjs"), "./translations/cs.json": () => import("./cs-CM2aBUar.mjs"), "./translations/de.json": () => import("./de-C72KDNOl.mjs"), "./translations/en.json": () => import("./en-DKV44jRb.mjs"), "./translations/es.json": () => import("./es-CeXiYflN.mjs"), "./translations/eu.json": () => import("./eu-CdALomew.mjs"), "./translations/fr.json": () => import("./fr-CD9VFbPM.mjs"), "./translations/gu.json": () => import("./gu-CNpaMDpH.mjs"), "./translations/hi.json": () => import("./hi-Dwvd04m3.mjs"), "./translations/hu.json": () => import("./hu-CeYvaaO0.mjs"), "./translations/id.json": () => import("./id-BtwA9WJT.mjs"), "./translations/it.json": () => import("./it-BrVPqaf1.mjs"), "./translations/ja.json": () => import("./ja-CtsUxOvk.mjs"), "./translations/ko.json": () => import("./ko-HVQRlfUI.mjs"), "./translations/ml.json": () => import("./ml-BihZwQit.mjs"), "./translations/ms.json": () => import("./ms-m_WjyWx7.mjs"), "./translations/nl.json": () => import("./nl-D4R9gHx5.mjs"), "./translations/pl.json": () => import("./pl-sbx9mSt_.mjs"), "./translations/pt-BR.json": () => import("./pt-BR-C71iDxnh.mjs"), "./translations/pt.json": () => import("./pt-BsaFvS8-.mjs"), "./translations/ru.json": () => import("./ru-BE6A4Exp.mjs"), "./translations/sa.json": () => import("./sa-Dag0k-Z8.mjs"), "./translations/sk.json": () => import("./sk-BFg-R8qJ.mjs"), "./translations/sv.json": () => import("./sv-CUnfWGsh.mjs"), "./translations/th.json": () => import("./th-BqbI8lIT.mjs"), "./translations/tr.json": () => import("./tr-CgeK3wJM.mjs"), "./translations/uk.json": () => import("./uk-CR-zDhAY.mjs"), "./translations/vi.json": () => import("./vi-DUXIk_fw.mjs"), "./translations/zh-Hans.json": () => import("./zh-Hans-BPQcRIyH.mjs"), "./translations/zh.json": () => import("./zh-BWZspA60.mjs") }), `./translations/${locale}.json`).then(({ default: data }) => {
|
4018
4027
|
return {
|
4019
4028
|
data: prefixPluginTranslations(data, PLUGIN_ID),
|
4020
4029
|
locale
|
@@ -4075,4 +4084,4 @@ export {
|
|
4075
4084
|
capitalise as y,
|
4076
4085
|
useUpdateContentTypeConfigurationMutation as z
|
4077
4086
|
};
|
4078
|
-
//# sourceMappingURL=index-
|
4087
|
+
//# sourceMappingURL=index-CJ2vYwuT.mjs.map
|