@strapi/content-manager 0.0.0-experimental.e0df4d50334a17a1beb3d203bff414fbbff62f7b → 0.0.0-experimental.e12978dcee698470990e9c5c63384faf2c307443
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/admin/chunks/{ComponentConfigurationPage-C5H-5L1u.js → ComponentConfigurationPage-Ci3dN40b.js} +5 -6
- package/dist/admin/chunks/{ComponentConfigurationPage-C5H-5L1u.js.map → ComponentConfigurationPage-Ci3dN40b.js.map} +1 -1
- package/dist/admin/chunks/{ComponentConfigurationPage-BN2kOtDm.mjs → ComponentConfigurationPage-DFPdl9pm.mjs} +5 -6
- package/dist/admin/chunks/{ComponentConfigurationPage-BN2kOtDm.mjs.map → ComponentConfigurationPage-DFPdl9pm.mjs.map} +1 -1
- package/dist/admin/chunks/{EditConfigurationPage-BExtZuB7.js → EditConfigurationPage-7xe8u-Pp.js} +5 -6
- package/dist/admin/chunks/{EditConfigurationPage-BExtZuB7.js.map → EditConfigurationPage-7xe8u-Pp.js.map} +1 -1
- package/dist/admin/chunks/{EditConfigurationPage-tMgOELQG.mjs → EditConfigurationPage-BFse-urJ.mjs} +5 -6
- package/dist/admin/chunks/{EditConfigurationPage-tMgOELQG.mjs.map → EditConfigurationPage-BFse-urJ.mjs.map} +1 -1
- package/dist/admin/chunks/{EditViewPage-CYe7wAXF.mjs → EditViewPage-BNpRr7fZ.mjs} +99 -98
- package/dist/admin/chunks/EditViewPage-BNpRr7fZ.mjs.map +1 -0
- package/dist/admin/chunks/{EditViewPage-DFkloeMZ.js → EditViewPage-CwYSs8Cq.js} +99 -98
- package/dist/admin/chunks/EditViewPage-CwYSs8Cq.js.map +1 -0
- package/dist/admin/chunks/{Form-DTO0ZIaB.mjs → Form-D9Ee-exF.mjs} +3 -3
- package/dist/admin/chunks/{Form-DTO0ZIaB.mjs.map → Form-D9Ee-exF.mjs.map} +1 -1
- package/dist/admin/chunks/{Form-DGUP3zQO.js → Form-DDbxreII.js} +5 -5
- package/dist/admin/chunks/{Form-DGUP3zQO.js.map → Form-DDbxreII.js.map} +1 -1
- package/dist/admin/chunks/{History-CQznK1pG.js → History-D5joC76n.js} +17 -13
- package/dist/admin/chunks/History-D5joC76n.js.map +1 -0
- package/dist/admin/chunks/{History-C333pgXF.mjs → History-FuD7Tp5I.mjs} +16 -12
- package/dist/admin/chunks/History-FuD7Tp5I.mjs.map +1 -0
- package/dist/admin/chunks/{Input-BexkC_pp.mjs → Input-BHucdqva.mjs} +1108 -47
- package/dist/admin/chunks/Input-BHucdqva.mjs.map +1 -0
- package/dist/admin/chunks/{Input-DLJZHw9Y.js → Input-BJCenRYN.js} +1121 -57
- package/dist/admin/chunks/Input-BJCenRYN.js.map +1 -0
- package/dist/admin/chunks/{ListConfigurationPage-BX2WR7MI.mjs → ListConfigurationPage-3kSfz9xV.mjs} +4 -5
- package/dist/admin/chunks/{ListConfigurationPage-BX2WR7MI.mjs.map → ListConfigurationPage-3kSfz9xV.mjs.map} +1 -1
- package/dist/admin/chunks/{ListConfigurationPage-71I_stAM.js → ListConfigurationPage-CgJEcEkD.js} +6 -7
- package/dist/admin/chunks/{ListConfigurationPage-71I_stAM.js.map → ListConfigurationPage-CgJEcEkD.js.map} +1 -1
- package/dist/admin/chunks/{ListViewPage-DV3heO4F.js → ListViewPage-CvQ1w8IW.js} +7 -8
- package/dist/admin/chunks/{ListViewPage-DV3heO4F.js.map → ListViewPage-CvQ1w8IW.js.map} +1 -1
- package/dist/admin/chunks/{ListViewPage-BDeT3Dkk.mjs → ListViewPage-DPUYRHss.mjs} +3 -4
- package/dist/admin/chunks/{ListViewPage-BDeT3Dkk.mjs.map → ListViewPage-DPUYRHss.mjs.map} +1 -1
- package/dist/admin/chunks/{NoContentTypePage-9JHYpYVX.mjs → NoContentTypePage-BRLLtjLb.mjs} +2 -2
- package/dist/admin/chunks/{NoContentTypePage-9JHYpYVX.mjs.map → NoContentTypePage-BRLLtjLb.mjs.map} +1 -1
- package/dist/admin/chunks/{NoContentTypePage-COih9y2J.js → NoContentTypePage-C5Vut1Af.js} +2 -2
- package/dist/admin/chunks/{NoContentTypePage-COih9y2J.js.map → NoContentTypePage-C5Vut1Af.js.map} +1 -1
- package/dist/admin/chunks/{NoPermissionsPage-DTe9I47q.mjs → NoPermissionsPage-B5HJbcjm.mjs} +2 -2
- package/dist/admin/chunks/{NoPermissionsPage-DTe9I47q.mjs.map → NoPermissionsPage-B5HJbcjm.mjs.map} +1 -1
- package/dist/admin/chunks/{NoPermissionsPage-DGAwRIlN.js → NoPermissionsPage-BBXnpc7M.js} +2 -2
- package/dist/admin/chunks/{NoPermissionsPage-DGAwRIlN.js.map → NoPermissionsPage-BBXnpc7M.js.map} +1 -1
- package/dist/admin/chunks/{Preview-BEq0FXda.mjs → Preview-C3lnOgQx.mjs} +244 -116
- package/dist/admin/chunks/Preview-C3lnOgQx.mjs.map +1 -0
- package/dist/admin/chunks/{Preview-CXtc9yEV.js → Preview-DB7ZGawL.js} +240 -112
- package/dist/admin/chunks/Preview-DB7ZGawL.js.map +1 -0
- package/dist/admin/chunks/{en-C1CjdAtC.js → en-CH__IC8g.js} +4 -1
- package/dist/admin/chunks/{en-C1CjdAtC.js.map → en-CH__IC8g.js.map} +1 -1
- package/dist/admin/chunks/{en-LfhocNG2.mjs → en-DBP0Gaid.mjs} +4 -1
- package/dist/admin/chunks/{en-LfhocNG2.mjs.map → en-DBP0Gaid.mjs.map} +1 -1
- package/dist/admin/chunks/{index-Cs6qwFQu.mjs → index-DYrCidCq.mjs} +225 -140
- package/dist/admin/chunks/index-DYrCidCq.mjs.map +1 -0
- package/dist/admin/chunks/{index-BHimg6jW.js → index-DoUQnFTk.js} +227 -138
- package/dist/admin/chunks/index-DoUQnFTk.js.map +1 -0
- package/dist/admin/chunks/{layout-Dtahn4Ue.js → layout-CqndYVtU.js} +86 -13
- package/dist/admin/chunks/layout-CqndYVtU.js.map +1 -0
- package/dist/admin/chunks/{layout-DStNia_P.mjs → layout-D2NJmgCw.mjs} +78 -5
- package/dist/admin/chunks/layout-D2NJmgCw.mjs.map +1 -0
- package/dist/admin/chunks/{useDragAndDrop-gcqEJMnO.js → objects-BJTP843m.js} +73 -1
- package/dist/admin/chunks/objects-BJTP843m.js.map +1 -0
- package/dist/admin/chunks/{useDragAndDrop-HYwNDExe.mjs → objects-D2z-IJgu.mjs} +72 -2
- package/dist/admin/chunks/objects-D2z-IJgu.mjs.map +1 -0
- package/dist/admin/chunks/uk-BtM6WnaE.mjs +313 -0
- package/dist/admin/chunks/uk-BtM6WnaE.mjs.map +1 -0
- package/dist/admin/chunks/uk-DB6OgySY.js +318 -0
- package/dist/admin/chunks/uk-DB6OgySY.js.map +1 -0
- package/dist/admin/chunks/{relations-XOYEEqMz.js → usePrev-Cm_0-qRC.js} +18 -2
- package/dist/admin/chunks/usePrev-Cm_0-qRC.js.map +1 -0
- package/dist/admin/chunks/{relations-Cq8NRUto.mjs → usePrev-DinC2aha.mjs} +18 -4
- package/dist/admin/chunks/usePrev-DinC2aha.mjs.map +1 -0
- package/dist/admin/index.js +1 -1
- package/dist/admin/index.mjs +1 -1
- package/dist/admin/src/components/InjectionZone.d.ts +7 -1
- package/dist/admin/src/content-manager.d.ts +4 -0
- package/dist/admin/src/features/DocumentContext.d.ts +48 -0
- package/dist/admin/src/features/DocumentRBAC.d.ts +3 -2
- package/dist/admin/src/hooks/useDocument.d.ts +2 -0
- package/dist/admin/src/hooks/useDocumentActions.d.ts +1 -0
- package/dist/admin/src/pages/EditView/components/DocumentActions.d.ts +2 -1
- package/dist/admin/src/pages/EditView/components/FormInputs/Relations/RelationModal.d.ts +7 -0
- package/dist/admin/src/pages/EditView/components/FormInputs/{Relations.d.ts → Relations/Relations.d.ts} +9 -4
- package/dist/admin/src/pages/EditView/components/FormLayout.d.ts +5 -2
- package/dist/admin/src/pages/EditView/components/InputRenderer.d.ts +3 -3
- package/dist/admin/src/preview/components/PreviewContent.d.ts +1 -2
- package/dist/admin/src/preview/pages/Preview.d.ts +2 -0
- package/dist/server/index.js +1 -1
- package/dist/server/index.js.map +1 -1
- package/dist/server/index.mjs +1 -1
- package/dist/server/index.mjs.map +1 -1
- package/package.json +8 -8
- package/dist/admin/chunks/EditViewPage-CYe7wAXF.mjs.map +0 -1
- package/dist/admin/chunks/EditViewPage-DFkloeMZ.js.map +0 -1
- package/dist/admin/chunks/History-C333pgXF.mjs.map +0 -1
- package/dist/admin/chunks/History-CQznK1pG.js.map +0 -1
- package/dist/admin/chunks/Input-BexkC_pp.mjs.map +0 -1
- package/dist/admin/chunks/Input-DLJZHw9Y.js.map +0 -1
- package/dist/admin/chunks/Preview-BEq0FXda.mjs.map +0 -1
- package/dist/admin/chunks/Preview-CXtc9yEV.js.map +0 -1
- package/dist/admin/chunks/Relations-o7_hVGyK.js +0 -1318
- package/dist/admin/chunks/Relations-o7_hVGyK.js.map +0 -1
- package/dist/admin/chunks/Relations-qeZyLDgQ.mjs +0 -1291
- package/dist/admin/chunks/Relations-qeZyLDgQ.mjs.map +0 -1
- package/dist/admin/chunks/index-BHimg6jW.js.map +0 -1
- package/dist/admin/chunks/index-Cs6qwFQu.mjs.map +0 -1
- package/dist/admin/chunks/layout-DStNia_P.mjs.map +0 -1
- package/dist/admin/chunks/layout-Dtahn4Ue.js.map +0 -1
- package/dist/admin/chunks/objects-C3EebVVe.js +0 -76
- package/dist/admin/chunks/objects-C3EebVVe.js.map +0 -1
- package/dist/admin/chunks/objects-wl73iEma.mjs +0 -73
- package/dist/admin/chunks/objects-wl73iEma.mjs.map +0 -1
- package/dist/admin/chunks/relations-Cq8NRUto.mjs.map +0 -1
- package/dist/admin/chunks/relations-XOYEEqMz.js.map +0 -1
- package/dist/admin/chunks/uk-B24MoTVg.js +0 -145
- package/dist/admin/chunks/uk-B24MoTVg.js.map +0 -1
- package/dist/admin/chunks/uk-Cpgmm7gE.mjs +0 -140
- package/dist/admin/chunks/uk-Cpgmm7gE.mjs.map +0 -1
- package/dist/admin/chunks/useDragAndDrop-HYwNDExe.mjs.map +0 -1
- package/dist/admin/chunks/useDragAndDrop-gcqEJMnO.js.map +0 -1
- package/dist/admin/chunks/usePrev-Bjw2dhmq.mjs +0 -18
- package/dist/admin/chunks/usePrev-Bjw2dhmq.mjs.map +0 -1
- package/dist/admin/chunks/usePrev-DIYl-IAL.js +0 -21
- package/dist/admin/chunks/usePrev-DIYl-IAL.js.map +0 -1
@@ -34,6 +34,7 @@ type UseDocument = (args: UseDocumentArgs, opts?: UseDocumentOpts) => {
|
|
34
34
|
schema?: Schema;
|
35
35
|
schemas?: Schema[];
|
36
36
|
hasError?: boolean;
|
37
|
+
refetch: () => void;
|
37
38
|
validate: (document: Document) => null | FormErrors;
|
38
39
|
/**
|
39
40
|
* Get the document's title
|
@@ -91,6 +92,7 @@ declare const useDoc: () => {
|
|
91
92
|
schema?: ContentType | undefined;
|
92
93
|
schemas?: ContentType[] | undefined;
|
93
94
|
hasError?: boolean | undefined;
|
95
|
+
refetch: () => void;
|
94
96
|
validate: (document: Document) => null | FormErrors;
|
95
97
|
/**
|
96
98
|
* Get the document's title
|
@@ -22,6 +22,7 @@ type UseDocumentActions = () => {
|
|
22
22
|
* This will return a list of the fields as an error if it's unable to clone.
|
23
23
|
* You most likely want to use the `clone` action instead.
|
24
24
|
*/
|
25
|
+
isLoading: boolean;
|
25
26
|
autoClone: (args: {
|
26
27
|
model: string;
|
27
28
|
sourceId: string;
|
@@ -2,7 +2,7 @@ import * as React from 'react';
|
|
2
2
|
import { NotificationConfig } from '@strapi/admin/strapi-admin';
|
3
3
|
import { ButtonProps } from '@strapi/design-system';
|
4
4
|
import type { DocumentActionComponent } from '../../../content-manager';
|
5
|
-
type DocumentActionPosition = 'panel' | 'header' | 'table-row';
|
5
|
+
type DocumentActionPosition = 'panel' | 'header' | 'table-row' | 'preview' | 'relation-modal';
|
6
6
|
interface DocumentActionDescription {
|
7
7
|
label: string;
|
8
8
|
onClick?: (event: React.SyntheticEvent) => Promise<boolean | void> | boolean | void;
|
@@ -21,6 +21,7 @@ interface DocumentActionDescription {
|
|
21
21
|
* @default 'secondary'
|
22
22
|
*/
|
23
23
|
variant?: ButtonProps['variant'];
|
24
|
+
loading?: ButtonProps['loading'];
|
24
25
|
}
|
25
26
|
interface DialogOptions {
|
26
27
|
type: 'dialog';
|
@@ -0,0 +1,7 @@
|
|
1
|
+
interface RelationModalProps {
|
2
|
+
open: boolean;
|
3
|
+
onToggle: () => void;
|
4
|
+
}
|
5
|
+
export declare function getCollectionType(url: string): string | undefined;
|
6
|
+
declare const RelationModal: ({ open, onToggle }: RelationModalProps) => import("react/jsx-runtime").JSX.Element;
|
7
|
+
export { RelationModal };
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import * as React from 'react';
|
2
2
|
import { type InputProps } from '@strapi/admin/strapi-admin';
|
3
3
|
import { FlexComponent } from '@strapi/design-system';
|
4
|
-
import { type EditFieldLayout } from '
|
5
|
-
import { RelationResult } from '
|
4
|
+
import { type EditFieldLayout } from '../../../../../hooks/useDocumentLayout';
|
5
|
+
import { RelationResult } from '../../../../../services/relations';
|
6
6
|
type RelationPosition = (Pick<RelationResult, 'status' | 'locale'> & {
|
7
7
|
before: string;
|
8
8
|
end?: never;
|
@@ -17,6 +17,12 @@ interface Relation extends Pick<RelationResult, 'documentId' | 'id' | 'locale' |
|
|
17
17
|
label: string;
|
18
18
|
position?: RelationPosition;
|
19
19
|
__temp_key__: string;
|
20
|
+
apiData?: {
|
21
|
+
documentId: RelationResult['documentId'];
|
22
|
+
id: RelationResult['id'];
|
23
|
+
locale?: RelationResult['locale'];
|
24
|
+
position: RelationPosition;
|
25
|
+
};
|
20
26
|
}
|
21
27
|
interface RelationsFieldProps extends Omit<Extract<EditFieldLayout, {
|
22
28
|
type: 'relation';
|
@@ -34,6 +40,5 @@ declare const LinkEllipsis: import("styled-components").IStyledComponent<"web",
|
|
34
40
|
ref?: ((instance: unknown) => void) | React.RefObject<unknown> | null | undefined;
|
35
41
|
}, never>> & Omit<(<C extends React.ElementType<any, keyof React.JSX.IntrinsicElements> = "a">(props: React.PropsWithoutRef<import("@strapi/design-system").LinkProps<C>> & React.RefAttributes<unknown>) => React.ReactNode), keyof React.Component<any, {}, any>>;
|
36
42
|
declare const MemoizedRelationsField: React.MemoExoticComponent<React.ForwardRefExoticComponent<RelationsFieldProps & React.RefAttributes<HTMLDivElement>>>;
|
37
|
-
|
38
|
-
export { MemoizedRelationsField as RelationsInput, MemoizedUnstableRelationsField as UnstableRelationsInput, FlexWrapper, DisconnectButton, LinkEllipsis, };
|
43
|
+
export { MemoizedRelationsField as RelationsInput, FlexWrapper, DisconnectButton, LinkEllipsis };
|
39
44
|
export type { RelationsFieldProps };
|
@@ -14,7 +14,7 @@ export declare const ResponsiveGridRoot: import("styled-components").IStyledComp
|
|
14
14
|
}, "ref"> & {
|
15
15
|
ref?: any;
|
16
16
|
}, never>> & Omit<Grid.Component<"div">, keyof import("react").Component<any, {}, any>>;
|
17
|
-
export declare const ResponsiveGridItem: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").
|
17
|
+
export declare const ResponsiveGridItem: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").Substitute<Omit<import("@strapi/design-system").TransientBoxProps & {
|
18
18
|
children?: import("react").ReactNode;
|
19
19
|
} & import("@strapi/design-system/dist/types").AsProp<import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements>> & Omit<Omit<any, "ref">, "children" | keyof import("@strapi/design-system/dist/types").AsProp<C> | keyof import("@strapi/design-system").TransientBoxProps> & {
|
20
20
|
ref?: any;
|
@@ -25,9 +25,12 @@ export declare const ResponsiveGridItem: import("styled-components").IStyledComp
|
|
25
25
|
m?: number | undefined;
|
26
26
|
}, "ref"> & {
|
27
27
|
ref?: any;
|
28
|
-
},
|
28
|
+
}, {
|
29
|
+
col: number;
|
30
|
+
}>> & Omit<Grid.ItemComponent<"div">, keyof import("react").Component<any, {}, any>>;
|
29
31
|
interface FormLayoutProps extends Pick<EditLayout, 'layout'> {
|
30
32
|
hasBackground?: boolean;
|
33
|
+
model?: string;
|
31
34
|
}
|
32
35
|
declare const FormLayout: ({ layout, hasBackground }: FormLayoutProps) => import("react/jsx-runtime").JSX.Element;
|
33
36
|
export { FormLayout, FormLayoutProps };
|
@@ -1,9 +1,9 @@
|
|
1
|
-
import
|
1
|
+
import * as React from 'react';
|
2
2
|
import type { EditFieldLayout } from '../../../hooks/useDocumentLayout';
|
3
3
|
import type { Schema } from '@strapi/types';
|
4
4
|
import type { DistributiveOmit } from 'react-redux';
|
5
5
|
type InputRendererProps = DistributiveOmit<EditFieldLayout, 'size'>;
|
6
|
-
declare const useFieldHint: (hint: ReactNode, attribute: Schema.Attribute.AnyAttribute) => string | number | boolean | import("react/jsx-runtime").JSX.Element | Iterable<ReactNode> | (string | import("react/jsx-runtime").JSX.Element |
|
7
|
-
declare const MemoizedInputRenderer:
|
6
|
+
declare const useFieldHint: (hint: React.ReactNode, attribute: Schema.Attribute.AnyAttribute) => string | number | boolean | import("react/jsx-runtime").JSX.Element | Iterable<React.ReactNode> | (string | import("react/jsx-runtime").JSX.Element | React.ReactElement<any, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal)[] | null | undefined;
|
7
|
+
declare const MemoizedInputRenderer: React.MemoExoticComponent<({ visible, hint: providedHint, ...props }: InputRendererProps) => import("react/jsx-runtime").JSX.Element | null>;
|
8
8
|
export type { InputRendererProps };
|
9
9
|
export { MemoizedInputRenderer as InputRenderer, useFieldHint };
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import * as React from 'react';
|
1
2
|
import { type UseDocument } from '../../hooks/useDocument';
|
2
3
|
import { type EditLayout } from '../../hooks/useDocumentLayout';
|
3
4
|
interface PreviewContextValue {
|
@@ -7,6 +8,7 @@ interface PreviewContextValue {
|
|
7
8
|
meta: NonNullable<ReturnType<UseDocument>['meta']>;
|
8
9
|
schema: NonNullable<ReturnType<UseDocument>['schema']>;
|
9
10
|
layout: EditLayout;
|
11
|
+
iframeRef?: React.RefObject<HTMLIFrameElement>;
|
10
12
|
}
|
11
13
|
declare const usePreviewContext: <Selected>(consumerName: string, selector: (value: PreviewContextValue) => Selected) => Selected;
|
12
14
|
declare const ProtectedPreviewPage: () => import("react/jsx-runtime").JSX.Element;
|
package/dist/server/index.js
CHANGED
@@ -2694,7 +2694,7 @@ var collectionTypes = {
|
|
2694
2694
|
const isUpdate = !isCreate;
|
2695
2695
|
if (isUpdate) {
|
2696
2696
|
// check if the document exists
|
2697
|
-
const documentExists = documentManager.exists(model, id);
|
2697
|
+
const documentExists = await documentManager.exists(model, id);
|
2698
2698
|
if (!documentExists) {
|
2699
2699
|
throw new strapiUtils.errors.NotFoundError('Document not found');
|
2700
2700
|
}
|