@strapi/content-manager 0.0.0-experimental.e9122b401c96877b6707775c4f893660eab93ae3 → 0.0.0-experimental.f0d3b2d782e972f1dcb8acf0dce31d4090d1e420

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 (148) hide show
  1. package/dist/_chunks/{ComponentConfigurationPage-_zF8p6CY.js → ComponentConfigurationPage-D2_cVxXK.js} +4 -4
  2. package/dist/_chunks/{ComponentConfigurationPage-_zF8p6CY.js.map → ComponentConfigurationPage-D2_cVxXK.js.map} +1 -1
  3. package/dist/_chunks/{ComponentConfigurationPage-CpBFh6_r.mjs → ComponentConfigurationPage-suSMW3KC.mjs} +4 -4
  4. package/dist/_chunks/{ComponentConfigurationPage-CpBFh6_r.mjs.map → ComponentConfigurationPage-suSMW3KC.mjs.map} +1 -1
  5. package/dist/_chunks/{EditConfigurationPage-CE_yavTi.mjs → EditConfigurationPage-CBscKbxt.mjs} +4 -4
  6. package/dist/_chunks/{EditConfigurationPage-CE_yavTi.mjs.map → EditConfigurationPage-CBscKbxt.mjs.map} +1 -1
  7. package/dist/_chunks/{EditConfigurationPage-_aG2DJSU.js → EditConfigurationPage-Z_VzHVH4.js} +4 -4
  8. package/dist/_chunks/{EditConfigurationPage-_aG2DJSU.js.map → EditConfigurationPage-Z_VzHVH4.js.map} +1 -1
  9. package/dist/_chunks/{EditViewPage-DeTn7rAF.mjs → EditViewPage-D5Zhyw_q.mjs} +15 -5
  10. package/dist/_chunks/EditViewPage-D5Zhyw_q.mjs.map +1 -0
  11. package/dist/_chunks/{EditViewPage-G9uNzwYL.js → EditViewPage-DzDDKiF5.js} +15 -5
  12. package/dist/_chunks/EditViewPage-DzDDKiF5.js.map +1 -0
  13. package/dist/_chunks/{Field-DDHUWEfV.js → Field-CZHNLm_m.js} +70 -26
  14. package/dist/_chunks/Field-CZHNLm_m.js.map +1 -0
  15. package/dist/_chunks/{Field-CnCKhI1R.mjs → Field-FNlyAbcI.mjs} +70 -26
  16. package/dist/_chunks/Field-FNlyAbcI.mjs.map +1 -0
  17. package/dist/_chunks/{Form-DYETaKUX.js → Form-DqPHDLuK.js} +3 -3
  18. package/dist/_chunks/Form-DqPHDLuK.js.map +1 -0
  19. package/dist/_chunks/{Form-IvVVwqRL.mjs → Form-Sq_OVNv-.mjs} +3 -3
  20. package/dist/_chunks/Form-Sq_OVNv-.mjs.map +1 -0
  21. package/dist/_chunks/{History-CnZDctSO.js → History-B-ZiOAEg.js} +37 -40
  22. package/dist/_chunks/History-B-ZiOAEg.js.map +1 -0
  23. package/dist/_chunks/{History-BMunT-do.mjs → History-DlL3k_OW.mjs} +38 -41
  24. package/dist/_chunks/History-DlL3k_OW.mjs.map +1 -0
  25. package/dist/_chunks/{ListConfigurationPage-BynalOp8.js → ListConfigurationPage-Cc0hLAoS.js} +3 -3
  26. package/dist/_chunks/{ListConfigurationPage-BynalOp8.js.map → ListConfigurationPage-Cc0hLAoS.js.map} +1 -1
  27. package/dist/_chunks/{ListConfigurationPage-CDqkCxgV.mjs → ListConfigurationPage-xj3cSF5M.mjs} +3 -3
  28. package/dist/_chunks/{ListConfigurationPage-CDqkCxgV.mjs.map → ListConfigurationPage-xj3cSF5M.mjs.map} +1 -1
  29. package/dist/_chunks/{ListViewPage-_5gS-DOF.mjs → ListViewPage-C9STpcYd.mjs} +22 -7
  30. package/dist/_chunks/ListViewPage-C9STpcYd.mjs.map +1 -0
  31. package/dist/_chunks/{ListViewPage-I88Ouzoq.js → ListViewPage-D48T84aT.js} +22 -7
  32. package/dist/_chunks/ListViewPage-D48T84aT.js.map +1 -0
  33. package/dist/_chunks/{NoContentTypePage-BaWQ7HsA.js → NoContentTypePage-BnUmUnXQ.js} +2 -2
  34. package/dist/_chunks/{NoContentTypePage-BaWQ7HsA.js.map → NoContentTypePage-BnUmUnXQ.js.map} +1 -1
  35. package/dist/_chunks/{NoContentTypePage-Dht-55hr.mjs → NoContentTypePage-DpV_ouD6.mjs} +2 -2
  36. package/dist/_chunks/{NoContentTypePage-Dht-55hr.mjs.map → NoContentTypePage-DpV_ouD6.mjs.map} +1 -1
  37. package/dist/_chunks/{NoPermissionsPage-Bs8D5W_v.mjs → NoPermissionsPage-BeDixsE9.mjs} +2 -2
  38. package/dist/_chunks/{NoPermissionsPage-Bs8D5W_v.mjs.map → NoPermissionsPage-BeDixsE9.mjs.map} +1 -1
  39. package/dist/_chunks/{NoPermissionsPage-DCVUh5at.js → NoPermissionsPage-z-CpOFfh.js} +2 -2
  40. package/dist/_chunks/{NoPermissionsPage-DCVUh5at.js.map → NoPermissionsPage-z-CpOFfh.js.map} +1 -1
  41. package/dist/_chunks/{Relations-Chdt5qWc.mjs → Relations-CTiimSAg.mjs} +72 -36
  42. package/dist/_chunks/Relations-CTiimSAg.mjs.map +1 -0
  43. package/dist/_chunks/{Relations-BPgFQeGj.js → Relations-Cs5vJLAp.js} +71 -35
  44. package/dist/_chunks/Relations-Cs5vJLAp.js.map +1 -0
  45. package/dist/_chunks/{en-BVzUkPxZ.js → en-Bm0D0IWz.js} +8 -8
  46. package/dist/_chunks/{en-BVzUkPxZ.js.map → en-Bm0D0IWz.js.map} +1 -1
  47. package/dist/_chunks/{en-CPTj6CjC.mjs → en-DKV44jRb.mjs} +8 -8
  48. package/dist/_chunks/{en-CPTj6CjC.mjs.map → en-DKV44jRb.mjs.map} +1 -1
  49. package/dist/_chunks/{fr-B7kGGg3E.js → fr-C6t7ywEg.js} +12 -2
  50. package/dist/_chunks/{fr-B7kGGg3E.js.map → fr-C6t7ywEg.js.map} +1 -1
  51. package/dist/_chunks/{fr-CD9VFbPM.mjs → fr-DxrTDLl6.mjs} +12 -2
  52. package/dist/_chunks/{fr-CD9VFbPM.mjs.map → fr-DxrTDLl6.mjs.map} +1 -1
  53. package/dist/_chunks/{index-D4UGPFZC.mjs → index-DUZzV11o.mjs} +958 -870
  54. package/dist/_chunks/index-DUZzV11o.mjs.map +1 -0
  55. package/dist/_chunks/{index-BhbLFX4l.js → index-dFQ_8EM3.js} +957 -868
  56. package/dist/_chunks/index-dFQ_8EM3.js.map +1 -0
  57. package/dist/_chunks/{layout-CYA7s0qO.js → layout-Bu-ET7w6.js} +3 -3
  58. package/dist/_chunks/{layout-CYA7s0qO.js.map → layout-Bu-ET7w6.js.map} +1 -1
  59. package/dist/_chunks/{layout-D4HI4_PS.mjs → layout-C-eg7m9Y.mjs} +3 -3
  60. package/dist/_chunks/{layout-D4HI4_PS.mjs.map → layout-C-eg7m9Y.mjs.map} +1 -1
  61. package/dist/_chunks/{objects-gigeqt7s.js → objects-BcXOv6_9.js} +2 -4
  62. package/dist/_chunks/{objects-gigeqt7s.js.map → objects-BcXOv6_9.js.map} +1 -1
  63. package/dist/_chunks/{objects-mKMAmfec.mjs → objects-D6yBsdmx.mjs} +2 -4
  64. package/dist/_chunks/{objects-mKMAmfec.mjs.map → objects-D6yBsdmx.mjs.map} +1 -1
  65. package/dist/_chunks/{relations-1pXaYpBK.mjs → relations-Cj61Oyt2.mjs} +3 -7
  66. package/dist/_chunks/relations-Cj61Oyt2.mjs.map +1 -0
  67. package/dist/_chunks/{relations-DDZ9OxNo.js → relations-isLeDaA0.js} +3 -7
  68. package/dist/_chunks/relations-isLeDaA0.js.map +1 -0
  69. package/dist/admin/index.js +2 -1
  70. package/dist/admin/index.js.map +1 -1
  71. package/dist/admin/index.mjs +3 -2
  72. package/dist/admin/src/exports.d.ts +1 -1
  73. package/dist/admin/src/hooks/useDocument.d.ts +32 -1
  74. package/dist/admin/src/pages/EditView/components/Header.d.ts +1 -0
  75. package/dist/admin/src/preview/constants.d.ts +1 -0
  76. package/dist/admin/src/preview/index.d.ts +4 -0
  77. package/dist/server/index.js +374 -160
  78. package/dist/server/index.js.map +1 -1
  79. package/dist/server/index.mjs +374 -160
  80. package/dist/server/index.mjs.map +1 -1
  81. package/dist/server/src/bootstrap.d.ts.map +1 -1
  82. package/dist/server/src/controllers/collection-types.d.ts.map +1 -1
  83. package/dist/server/src/controllers/index.d.ts.map +1 -1
  84. package/dist/server/src/controllers/relations.d.ts.map +1 -1
  85. package/dist/server/src/controllers/utils/metadata.d.ts +15 -1
  86. package/dist/server/src/controllers/utils/metadata.d.ts.map +1 -1
  87. package/dist/server/src/history/services/history.d.ts.map +1 -1
  88. package/dist/server/src/history/services/lifecycles.d.ts.map +1 -1
  89. package/dist/server/src/history/services/utils.d.ts +2 -3
  90. package/dist/server/src/history/services/utils.d.ts.map +1 -1
  91. package/dist/server/src/index.d.ts +4 -4
  92. package/dist/server/src/preview/constants.d.ts +2 -0
  93. package/dist/server/src/preview/constants.d.ts.map +1 -0
  94. package/dist/server/src/preview/controllers/index.d.ts +2 -0
  95. package/dist/server/src/preview/controllers/index.d.ts.map +1 -0
  96. package/dist/server/src/preview/controllers/preview.d.ts +13 -0
  97. package/dist/server/src/preview/controllers/preview.d.ts.map +1 -0
  98. package/dist/server/src/preview/controllers/validation/preview.d.ts +6 -0
  99. package/dist/server/src/preview/controllers/validation/preview.d.ts.map +1 -0
  100. package/dist/server/src/preview/index.d.ts +4 -0
  101. package/dist/server/src/preview/index.d.ts.map +1 -0
  102. package/dist/server/src/preview/routes/index.d.ts +8 -0
  103. package/dist/server/src/preview/routes/index.d.ts.map +1 -0
  104. package/dist/server/src/preview/routes/preview.d.ts +4 -0
  105. package/dist/server/src/preview/routes/preview.d.ts.map +1 -0
  106. package/dist/server/src/preview/services/index.d.ts +15 -0
  107. package/dist/server/src/preview/services/index.d.ts.map +1 -0
  108. package/dist/server/src/preview/services/preview-config.d.ts +30 -0
  109. package/dist/server/src/preview/services/preview-config.d.ts.map +1 -0
  110. package/dist/server/src/preview/services/preview.d.ts +12 -0
  111. package/dist/server/src/preview/services/preview.d.ts.map +1 -0
  112. package/dist/server/src/preview/utils.d.ts +18 -0
  113. package/dist/server/src/preview/utils.d.ts.map +1 -0
  114. package/dist/server/src/routes/index.d.ts.map +1 -1
  115. package/dist/server/src/services/document-metadata.d.ts +8 -8
  116. package/dist/server/src/services/document-metadata.d.ts.map +1 -1
  117. package/dist/server/src/services/index.d.ts +4 -4
  118. package/dist/server/src/services/index.d.ts.map +1 -1
  119. package/dist/server/src/services/utils/configuration/index.d.ts +2 -2
  120. package/dist/server/src/services/utils/configuration/layouts.d.ts +2 -2
  121. package/dist/server/src/utils/index.d.ts +2 -0
  122. package/dist/server/src/utils/index.d.ts.map +1 -1
  123. package/dist/shared/contracts/index.d.ts +1 -0
  124. package/dist/shared/contracts/index.d.ts.map +1 -1
  125. package/dist/shared/contracts/preview.d.ts +27 -0
  126. package/dist/shared/contracts/preview.d.ts.map +1 -0
  127. package/dist/shared/index.js +4 -0
  128. package/dist/shared/index.js.map +1 -1
  129. package/dist/shared/index.mjs +4 -0
  130. package/dist/shared/index.mjs.map +1 -1
  131. package/package.json +12 -12
  132. package/dist/_chunks/EditViewPage-DeTn7rAF.mjs.map +0 -1
  133. package/dist/_chunks/EditViewPage-G9uNzwYL.js.map +0 -1
  134. package/dist/_chunks/Field-CnCKhI1R.mjs.map +0 -1
  135. package/dist/_chunks/Field-DDHUWEfV.js.map +0 -1
  136. package/dist/_chunks/Form-DYETaKUX.js.map +0 -1
  137. package/dist/_chunks/Form-IvVVwqRL.mjs.map +0 -1
  138. package/dist/_chunks/History-BMunT-do.mjs.map +0 -1
  139. package/dist/_chunks/History-CnZDctSO.js.map +0 -1
  140. package/dist/_chunks/ListViewPage-I88Ouzoq.js.map +0 -1
  141. package/dist/_chunks/ListViewPage-_5gS-DOF.mjs.map +0 -1
  142. package/dist/_chunks/Relations-BPgFQeGj.js.map +0 -1
  143. package/dist/_chunks/Relations-Chdt5qWc.mjs.map +0 -1
  144. package/dist/_chunks/index-BhbLFX4l.js.map +0 -1
  145. package/dist/_chunks/index-D4UGPFZC.mjs.map +0 -1
  146. package/dist/_chunks/relations-1pXaYpBK.mjs.map +0 -1
  147. package/dist/_chunks/relations-DDZ9OxNo.js.map +0 -1
  148. package/strapi-server.js +0 -3
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;"}
@@ -1,11 +1,12 @@
1
- import { l, d, K, J, L, h, f } from "../_chunks/index-D4UGPFZC.mjs";
1
+ import { l, d, K, L, J, M, h, f } from "../_chunks/index-DUZzV11o.mjs";
2
2
  import "@strapi/icons";
3
3
  export {
4
4
  l as DocumentRBAC,
5
5
  d as buildValidParams,
6
6
  K as default,
7
+ L as unstable_useContentManagerContext,
7
8
  J as unstable_useDocument,
8
- L as unstable_useDocumentActions,
9
+ M as unstable_useDocumentActions,
9
10
  h as unstable_useDocumentLayout,
10
11
  f as useDocumentRBAC
11
12
  };
@@ -4,7 +4,7 @@
4
4
  * but should still export the same things.
5
5
  */
6
6
  export { buildValidParams } from './utils/api';
7
- export { useDocument as unstable_useDocument } from './hooks/useDocument';
7
+ export { useDocument as unstable_useDocument, useContentManagerContext as unstable_useContentManagerContext, } from './hooks/useDocument';
8
8
  export { useDocumentActions as unstable_useDocumentActions } from './hooks/useDocumentActions';
9
9
  export { useDocumentLayout as unstable_useDocumentLayout } from './hooks/useDocumentLayout';
10
10
  export type { EditFieldLayout, EditLayout, ListFieldLayout, ListLayout, } from './hooks/useDocumentLayout';
@@ -31,7 +31,9 @@ type UseDocument = (args: UseDocumentArgs, opts?: UseDocumentOpts) => {
31
31
  * This is the schema of the content type, it is not the same as the layout.
32
32
  */
33
33
  schema?: Schema;
34
+ schemas?: Schema[];
34
35
  validate: (document: Document) => null | FormErrors;
36
+ hasError?: boolean;
35
37
  };
36
38
  /**
37
39
  * @alpha
@@ -78,10 +80,39 @@ declare const useDoc: () => {
78
80
  * This is the schema of the content type, it is not the same as the layout.
79
81
  */
80
82
  schema?: ContentType | undefined;
83
+ schemas?: ContentType[] | undefined;
81
84
  validate: (document: Document) => null | FormErrors;
85
+ hasError?: boolean | undefined;
82
86
  collectionType: string;
83
87
  model: string;
84
88
  id: string | undefined;
85
89
  };
86
- export { useDocument, useDoc };
90
+ /**
91
+ * @public
92
+ * @experimental
93
+ * Content manager context hooks for plugin development.
94
+ * Make sure to use this hook inside the content manager.
95
+ */
96
+ declare const useContentManagerContext: () => {
97
+ error: import("@reduxjs/toolkit").SerializedError | import("../utils/api").BaseQueryError | undefined;
98
+ isLoading: boolean;
99
+ model: string;
100
+ collectionType: string;
101
+ id: string | undefined;
102
+ slug: string;
103
+ isCreatingEntry: boolean;
104
+ isSingleType: boolean;
105
+ hasDraftAndPublish: boolean;
106
+ components: ComponentsDictionary;
107
+ contentType: ContentType | undefined;
108
+ contentTypes: ContentType[] | undefined;
109
+ form: import("@strapi/admin/strapi-admin").FormContextValue<import("@strapi/admin/strapi-admin").FormValues>;
110
+ layout: {
111
+ error?: import("@reduxjs/toolkit").SerializedError | import("../utils/api").BaseQueryError | undefined;
112
+ isLoading: boolean;
113
+ edit: import("./useDocumentLayout").EditLayout;
114
+ list: import("./useDocumentLayout").ListLayout;
115
+ };
116
+ };
117
+ export { useDocument, useDoc, useContentManagerContext };
87
118
  export type { UseDocument, UseDocumentArgs, Document, Schema, ComponentsDictionary };
@@ -28,6 +28,7 @@ interface HeaderActionDescription {
28
28
  }>;
29
29
  onSelect?: (value: string) => void;
30
30
  value?: string;
31
+ customizeContent?: (value: string) => React.ReactNode;
31
32
  }
32
33
  declare const DEFAULT_HEADER_ACTIONS: DocumentActionComponent[];
33
34
  export { Header, DEFAULT_HEADER_ACTIONS };
@@ -0,0 +1 @@
1
+ export declare const FEATURE_ID = "preview";
@@ -0,0 +1,4 @@
1
+ declare const previewAdmin: {
2
+ bootstrap(app: Pick<import("@strapi/admin/strapi-admin").StrapiApp, "getPlugin" | "addSettingsLink" | "addSettingsLinks" | "registerHook">): {} | undefined;
3
+ };
4
+ export { previewAdmin };