@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.
Files changed (120) hide show
  1. package/dist/admin/chunks/{ComponentConfigurationPage-C5H-5L1u.js → ComponentConfigurationPage-Ci3dN40b.js} +5 -6
  2. package/dist/admin/chunks/{ComponentConfigurationPage-C5H-5L1u.js.map → ComponentConfigurationPage-Ci3dN40b.js.map} +1 -1
  3. package/dist/admin/chunks/{ComponentConfigurationPage-BN2kOtDm.mjs → ComponentConfigurationPage-DFPdl9pm.mjs} +5 -6
  4. package/dist/admin/chunks/{ComponentConfigurationPage-BN2kOtDm.mjs.map → ComponentConfigurationPage-DFPdl9pm.mjs.map} +1 -1
  5. package/dist/admin/chunks/{EditConfigurationPage-BExtZuB7.js → EditConfigurationPage-7xe8u-Pp.js} +5 -6
  6. package/dist/admin/chunks/{EditConfigurationPage-BExtZuB7.js.map → EditConfigurationPage-7xe8u-Pp.js.map} +1 -1
  7. package/dist/admin/chunks/{EditConfigurationPage-tMgOELQG.mjs → EditConfigurationPage-BFse-urJ.mjs} +5 -6
  8. package/dist/admin/chunks/{EditConfigurationPage-tMgOELQG.mjs.map → EditConfigurationPage-BFse-urJ.mjs.map} +1 -1
  9. package/dist/admin/chunks/{EditViewPage-CYe7wAXF.mjs → EditViewPage-BNpRr7fZ.mjs} +99 -98
  10. package/dist/admin/chunks/EditViewPage-BNpRr7fZ.mjs.map +1 -0
  11. package/dist/admin/chunks/{EditViewPage-DFkloeMZ.js → EditViewPage-CwYSs8Cq.js} +99 -98
  12. package/dist/admin/chunks/EditViewPage-CwYSs8Cq.js.map +1 -0
  13. package/dist/admin/chunks/{Form-DTO0ZIaB.mjs → Form-D9Ee-exF.mjs} +3 -3
  14. package/dist/admin/chunks/{Form-DTO0ZIaB.mjs.map → Form-D9Ee-exF.mjs.map} +1 -1
  15. package/dist/admin/chunks/{Form-DGUP3zQO.js → Form-DDbxreII.js} +5 -5
  16. package/dist/admin/chunks/{Form-DGUP3zQO.js.map → Form-DDbxreII.js.map} +1 -1
  17. package/dist/admin/chunks/{History-CQznK1pG.js → History-D5joC76n.js} +17 -13
  18. package/dist/admin/chunks/History-D5joC76n.js.map +1 -0
  19. package/dist/admin/chunks/{History-C333pgXF.mjs → History-FuD7Tp5I.mjs} +16 -12
  20. package/dist/admin/chunks/History-FuD7Tp5I.mjs.map +1 -0
  21. package/dist/admin/chunks/{Input-BexkC_pp.mjs → Input-BHucdqva.mjs} +1108 -47
  22. package/dist/admin/chunks/Input-BHucdqva.mjs.map +1 -0
  23. package/dist/admin/chunks/{Input-DLJZHw9Y.js → Input-BJCenRYN.js} +1121 -57
  24. package/dist/admin/chunks/Input-BJCenRYN.js.map +1 -0
  25. package/dist/admin/chunks/{ListConfigurationPage-BX2WR7MI.mjs → ListConfigurationPage-3kSfz9xV.mjs} +4 -5
  26. package/dist/admin/chunks/{ListConfigurationPage-BX2WR7MI.mjs.map → ListConfigurationPage-3kSfz9xV.mjs.map} +1 -1
  27. package/dist/admin/chunks/{ListConfigurationPage-71I_stAM.js → ListConfigurationPage-CgJEcEkD.js} +6 -7
  28. package/dist/admin/chunks/{ListConfigurationPage-71I_stAM.js.map → ListConfigurationPage-CgJEcEkD.js.map} +1 -1
  29. package/dist/admin/chunks/{ListViewPage-DV3heO4F.js → ListViewPage-CvQ1w8IW.js} +7 -8
  30. package/dist/admin/chunks/{ListViewPage-DV3heO4F.js.map → ListViewPage-CvQ1w8IW.js.map} +1 -1
  31. package/dist/admin/chunks/{ListViewPage-BDeT3Dkk.mjs → ListViewPage-DPUYRHss.mjs} +3 -4
  32. package/dist/admin/chunks/{ListViewPage-BDeT3Dkk.mjs.map → ListViewPage-DPUYRHss.mjs.map} +1 -1
  33. package/dist/admin/chunks/{NoContentTypePage-9JHYpYVX.mjs → NoContentTypePage-BRLLtjLb.mjs} +2 -2
  34. package/dist/admin/chunks/{NoContentTypePage-9JHYpYVX.mjs.map → NoContentTypePage-BRLLtjLb.mjs.map} +1 -1
  35. package/dist/admin/chunks/{NoContentTypePage-COih9y2J.js → NoContentTypePage-C5Vut1Af.js} +2 -2
  36. package/dist/admin/chunks/{NoContentTypePage-COih9y2J.js.map → NoContentTypePage-C5Vut1Af.js.map} +1 -1
  37. package/dist/admin/chunks/{NoPermissionsPage-DTe9I47q.mjs → NoPermissionsPage-B5HJbcjm.mjs} +2 -2
  38. package/dist/admin/chunks/{NoPermissionsPage-DTe9I47q.mjs.map → NoPermissionsPage-B5HJbcjm.mjs.map} +1 -1
  39. package/dist/admin/chunks/{NoPermissionsPage-DGAwRIlN.js → NoPermissionsPage-BBXnpc7M.js} +2 -2
  40. package/dist/admin/chunks/{NoPermissionsPage-DGAwRIlN.js.map → NoPermissionsPage-BBXnpc7M.js.map} +1 -1
  41. package/dist/admin/chunks/{Preview-BEq0FXda.mjs → Preview-C3lnOgQx.mjs} +244 -116
  42. package/dist/admin/chunks/Preview-C3lnOgQx.mjs.map +1 -0
  43. package/dist/admin/chunks/{Preview-CXtc9yEV.js → Preview-DB7ZGawL.js} +240 -112
  44. package/dist/admin/chunks/Preview-DB7ZGawL.js.map +1 -0
  45. package/dist/admin/chunks/{en-C1CjdAtC.js → en-CH__IC8g.js} +4 -1
  46. package/dist/admin/chunks/{en-C1CjdAtC.js.map → en-CH__IC8g.js.map} +1 -1
  47. package/dist/admin/chunks/{en-LfhocNG2.mjs → en-DBP0Gaid.mjs} +4 -1
  48. package/dist/admin/chunks/{en-LfhocNG2.mjs.map → en-DBP0Gaid.mjs.map} +1 -1
  49. package/dist/admin/chunks/{index-Cs6qwFQu.mjs → index-DYrCidCq.mjs} +225 -140
  50. package/dist/admin/chunks/index-DYrCidCq.mjs.map +1 -0
  51. package/dist/admin/chunks/{index-BHimg6jW.js → index-DoUQnFTk.js} +227 -138
  52. package/dist/admin/chunks/index-DoUQnFTk.js.map +1 -0
  53. package/dist/admin/chunks/{layout-Dtahn4Ue.js → layout-CqndYVtU.js} +86 -13
  54. package/dist/admin/chunks/layout-CqndYVtU.js.map +1 -0
  55. package/dist/admin/chunks/{layout-DStNia_P.mjs → layout-D2NJmgCw.mjs} +78 -5
  56. package/dist/admin/chunks/layout-D2NJmgCw.mjs.map +1 -0
  57. package/dist/admin/chunks/{useDragAndDrop-gcqEJMnO.js → objects-BJTP843m.js} +73 -1
  58. package/dist/admin/chunks/objects-BJTP843m.js.map +1 -0
  59. package/dist/admin/chunks/{useDragAndDrop-HYwNDExe.mjs → objects-D2z-IJgu.mjs} +72 -2
  60. package/dist/admin/chunks/objects-D2z-IJgu.mjs.map +1 -0
  61. package/dist/admin/chunks/uk-BtM6WnaE.mjs +313 -0
  62. package/dist/admin/chunks/uk-BtM6WnaE.mjs.map +1 -0
  63. package/dist/admin/chunks/uk-DB6OgySY.js +318 -0
  64. package/dist/admin/chunks/uk-DB6OgySY.js.map +1 -0
  65. package/dist/admin/chunks/{relations-XOYEEqMz.js → usePrev-Cm_0-qRC.js} +18 -2
  66. package/dist/admin/chunks/usePrev-Cm_0-qRC.js.map +1 -0
  67. package/dist/admin/chunks/{relations-Cq8NRUto.mjs → usePrev-DinC2aha.mjs} +18 -4
  68. package/dist/admin/chunks/usePrev-DinC2aha.mjs.map +1 -0
  69. package/dist/admin/index.js +1 -1
  70. package/dist/admin/index.mjs +1 -1
  71. package/dist/admin/src/components/InjectionZone.d.ts +7 -1
  72. package/dist/admin/src/content-manager.d.ts +4 -0
  73. package/dist/admin/src/features/DocumentContext.d.ts +48 -0
  74. package/dist/admin/src/features/DocumentRBAC.d.ts +3 -2
  75. package/dist/admin/src/hooks/useDocument.d.ts +2 -0
  76. package/dist/admin/src/hooks/useDocumentActions.d.ts +1 -0
  77. package/dist/admin/src/pages/EditView/components/DocumentActions.d.ts +2 -1
  78. package/dist/admin/src/pages/EditView/components/FormInputs/Relations/RelationModal.d.ts +7 -0
  79. package/dist/admin/src/pages/EditView/components/FormInputs/{Relations.d.ts → Relations/Relations.d.ts} +9 -4
  80. package/dist/admin/src/pages/EditView/components/FormLayout.d.ts +5 -2
  81. package/dist/admin/src/pages/EditView/components/InputRenderer.d.ts +3 -3
  82. package/dist/admin/src/preview/components/PreviewContent.d.ts +1 -2
  83. package/dist/admin/src/preview/pages/Preview.d.ts +2 -0
  84. package/dist/server/index.js +1 -1
  85. package/dist/server/index.js.map +1 -1
  86. package/dist/server/index.mjs +1 -1
  87. package/dist/server/index.mjs.map +1 -1
  88. package/package.json +8 -8
  89. package/dist/admin/chunks/EditViewPage-CYe7wAXF.mjs.map +0 -1
  90. package/dist/admin/chunks/EditViewPage-DFkloeMZ.js.map +0 -1
  91. package/dist/admin/chunks/History-C333pgXF.mjs.map +0 -1
  92. package/dist/admin/chunks/History-CQznK1pG.js.map +0 -1
  93. package/dist/admin/chunks/Input-BexkC_pp.mjs.map +0 -1
  94. package/dist/admin/chunks/Input-DLJZHw9Y.js.map +0 -1
  95. package/dist/admin/chunks/Preview-BEq0FXda.mjs.map +0 -1
  96. package/dist/admin/chunks/Preview-CXtc9yEV.js.map +0 -1
  97. package/dist/admin/chunks/Relations-o7_hVGyK.js +0 -1318
  98. package/dist/admin/chunks/Relations-o7_hVGyK.js.map +0 -1
  99. package/dist/admin/chunks/Relations-qeZyLDgQ.mjs +0 -1291
  100. package/dist/admin/chunks/Relations-qeZyLDgQ.mjs.map +0 -1
  101. package/dist/admin/chunks/index-BHimg6jW.js.map +0 -1
  102. package/dist/admin/chunks/index-Cs6qwFQu.mjs.map +0 -1
  103. package/dist/admin/chunks/layout-DStNia_P.mjs.map +0 -1
  104. package/dist/admin/chunks/layout-Dtahn4Ue.js.map +0 -1
  105. package/dist/admin/chunks/objects-C3EebVVe.js +0 -76
  106. package/dist/admin/chunks/objects-C3EebVVe.js.map +0 -1
  107. package/dist/admin/chunks/objects-wl73iEma.mjs +0 -73
  108. package/dist/admin/chunks/objects-wl73iEma.mjs.map +0 -1
  109. package/dist/admin/chunks/relations-Cq8NRUto.mjs.map +0 -1
  110. package/dist/admin/chunks/relations-XOYEEqMz.js.map +0 -1
  111. package/dist/admin/chunks/uk-B24MoTVg.js +0 -145
  112. package/dist/admin/chunks/uk-B24MoTVg.js.map +0 -1
  113. package/dist/admin/chunks/uk-Cpgmm7gE.mjs +0 -140
  114. package/dist/admin/chunks/uk-Cpgmm7gE.mjs.map +0 -1
  115. package/dist/admin/chunks/useDragAndDrop-HYwNDExe.mjs.map +0 -1
  116. package/dist/admin/chunks/useDragAndDrop-gcqEJMnO.js.map +0 -1
  117. package/dist/admin/chunks/usePrev-Bjw2dhmq.mjs +0 -18
  118. package/dist/admin/chunks/usePrev-Bjw2dhmq.mjs.map +0 -1
  119. package/dist/admin/chunks/usePrev-DIYl-IAL.js +0 -21
  120. 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 '../../../../hooks/useDocumentLayout';
5
- import { RelationResult } from '../../../../services/relations';
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
- declare const MemoizedUnstableRelationsField: React.MemoExoticComponent<React.ForwardRefExoticComponent<RelationsFieldProps & React.RefAttributes<HTMLDivElement>>>;
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").FastOmit<Omit<import("@strapi/design-system").TransientBoxProps & {
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
- }, never>> & Omit<Grid.ItemComponent<"div">, keyof import("react").Component<any, {}, any>>;
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 { ReactNode } from 'react';
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 | import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | Iterable<ReactNode> | import("react").ReactPortal)[] | null | undefined;
7
- declare const MemoizedInputRenderer: import("react").MemoExoticComponent<({ visible, hint: providedHint, ...props }: InputRendererProps) => import("react/jsx-runtime").JSX.Element | null>;
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,2 @@
1
- declare const UnstablePreviewContent: () => import("react/jsx-runtime").JSX.Element;
2
1
  declare const PreviewContent: () => import("react/jsx-runtime").JSX.Element;
3
- export { PreviewContent, UnstablePreviewContent };
2
+ export { PreviewContent };
@@ -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;
@@ -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
  }