@webiny/app-headless-cms 5.23.0 → 5.24.0-beta.0

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 (273) hide show
  1. package/admin/components/ContentEntryForm/ContentEntryForm.d.ts +2 -2
  2. package/admin/components/ContentEntryForm/ContentEntryFormPreview.d.ts +2 -2
  3. package/admin/components/ContentEntryForm/Fields.d.ts +3 -3
  4. package/admin/components/ContentEntryForm/Label.d.ts +2 -4
  5. package/admin/components/ContentEntryForm/RenderFieldElement.d.ts +4 -2
  6. package/admin/components/ContentEntryForm/functions/createValidators.d.ts +2 -1
  7. package/admin/components/ContentEntryForm/functions/getValue.d.ts +7 -4
  8. package/admin/components/ContentEntryForm/functions/getValue.js +5 -4
  9. package/admin/components/ContentEntryForm/functions/setValue.d.ts +8 -5
  10. package/admin/components/ContentEntryForm/functions/setValue.js +6 -5
  11. package/admin/components/ContentEntryForm/useBind.d.ts +8 -4
  12. package/admin/components/ContentEntryForm/useBind.js +17 -10
  13. package/admin/components/ContentEntryForm/useContentEntryForm.js +9 -5
  14. package/admin/components/ContentModelEditor/Context.d.ts +18 -9
  15. package/admin/components/ContentModelEditor/Context.js +40 -33
  16. package/admin/components/ContentModelEditor/Editor.d.ts +2 -2
  17. package/admin/components/ContentModelEditor/FieldsSidebar.d.ts +6 -4
  18. package/admin/components/ContentModelEditor/FieldsSidebar.js +11 -11
  19. package/admin/components/ContentModelEditor/Header.d.ts +3 -2
  20. package/admin/components/ContentModelEditor/Header.js +5 -2
  21. package/admin/components/DragPreview.d.ts +3 -2
  22. package/admin/components/DragPreview.js +6 -4
  23. package/admin/components/Draggable.d.ts +9 -7
  24. package/admin/components/Draggable.js +4 -3
  25. package/admin/components/DropZone/Center.d.ts +6 -6
  26. package/admin/components/DropZone/Center.js +7 -4
  27. package/admin/components/DropZone/Horizontal.d.ts +7 -5
  28. package/admin/components/DropZone/Horizontal.js +1 -1
  29. package/admin/components/DropZone/Vertical.d.ts +4 -4
  30. package/admin/components/DropZone/Vertical.js +1 -1
  31. package/admin/components/Droppable.d.ts +22 -13
  32. package/admin/components/Droppable.js +3 -3
  33. package/admin/components/FieldEditor/EditFieldDialog/AppearanceTab.d.ts +8 -2
  34. package/admin/components/FieldEditor/EditFieldDialog/AppearanceTab.js +7 -6
  35. package/admin/components/FieldEditor/EditFieldDialog/GeneralTab.d.ts +4 -4
  36. package/admin/components/FieldEditor/EditFieldDialog/PredefinedValues.d.ts +2 -2
  37. package/admin/components/FieldEditor/EditFieldDialog/PredefinedValues.js +3 -1
  38. package/admin/components/FieldEditor/EditFieldDialog/ValidatorsTab.js +26 -25
  39. package/admin/components/FieldEditor/EditFieldDialog/functions/getValue.d.ts +5 -4
  40. package/admin/components/FieldEditor/EditFieldDialog/functions/getValue.js +4 -4
  41. package/admin/components/FieldEditor/EditFieldDialog/functions/setValue.d.ts +6 -5
  42. package/admin/components/FieldEditor/EditFieldDialog/functions/setValue.js +6 -5
  43. package/admin/components/FieldEditor/EditFieldDialog.d.ts +6 -6
  44. package/admin/components/FieldEditor/EditFieldDialog.js +10 -10
  45. package/admin/components/FieldEditor/Field.d.ts +4 -4
  46. package/admin/components/FieldEditor/FieldEditor.d.ts +2 -2
  47. package/admin/components/FieldEditor/FieldEditor.js +9 -6
  48. package/admin/components/FieldEditor/FieldEditorContext.d.ts +65 -20
  49. package/admin/components/FieldEditor/FieldEditorContext.js +27 -27
  50. package/admin/components/FieldEditor/Styled.d.ts +2 -2
  51. package/admin/components/FieldEditor/utils/deleteField.d.ts +5 -7
  52. package/admin/components/FieldEditor/utils/deleteField.js +6 -6
  53. package/admin/components/FieldEditor/utils/getFieldPosition.d.ts +6 -5
  54. package/admin/components/FieldEditor/utils/getFieldPosition.js +3 -3
  55. package/admin/components/FieldEditor/utils/moveField.d.ts +4 -3
  56. package/admin/components/FieldEditor/utils/moveField.js +14 -10
  57. package/admin/components/FieldEditor/utils/moveRow.d.ts +5 -6
  58. package/admin/constants/statusLabels.d.ts +2 -8
  59. package/admin/constants/statusLabels.js +3 -2
  60. package/admin/contexts/Cms/index.d.ts +3 -3
  61. package/admin/contexts/Cms/index.js +2 -2
  62. package/admin/elements/ContentGroupMenuElement.js +1 -0
  63. package/admin/elements/ContentModelMenuElement.js +1 -0
  64. package/admin/elements/NothingToShowElement.d.ts +1 -1
  65. package/admin/graphql/contentEntries.d.ts +172 -11
  66. package/admin/graphql/contentEntries.js +55 -0
  67. package/admin/graphql/contentModels.d.ts +28 -0
  68. package/admin/graphql/contentModels.js +13 -2
  69. package/admin/hooks/useApolloClient.d.ts +2 -1
  70. package/admin/hooks/useLazyQuery.d.ts +3 -1
  71. package/admin/hooks/useMutation.d.ts +3 -1
  72. package/admin/hooks/useMutation.js +1 -1
  73. package/admin/hooks/usePermission.d.ts +21 -20
  74. package/admin/hooks/usePermission.js +5 -2
  75. package/admin/hooks/useQuery.d.ts +4 -1
  76. package/admin/hooks/useQueryLocale.d.ts +3 -1
  77. package/admin/menus/CmsMenuLoader.d.ts +1 -1
  78. package/admin/menus/CmsMenuLoader.js +5 -2
  79. package/admin/menus/ContentGroupsMenuItems.d.ts +2 -1
  80. package/admin/menus/ContentGroupsMenuItems.js +4 -6
  81. package/admin/menus/GlobalSearchPlugins.d.ts +2 -1
  82. package/admin/menus/GlobalSearchPlugins.js +1 -1
  83. package/admin/menus/NothingToShowElement.d.ts +2 -2
  84. package/admin/plugins/editor/defaultBar/BackButton.d.ts +1 -1
  85. package/admin/plugins/editor/defaultBar/CreateContentButton.d.ts +2 -2
  86. package/admin/plugins/editor/defaultBar/Divider.d.ts +1 -1
  87. package/admin/plugins/editor/defaultBar/FormSettings/FormSettings.d.ts +4 -4
  88. package/admin/plugins/editor/defaultBar/FormSettings/FormSettingsButton.d.ts +2 -2
  89. package/admin/plugins/editor/defaultBar/FormSettings/FormSettingsStyled.d.ts +2 -2
  90. package/admin/plugins/editor/defaultBar/Name/Name.d.ts +2 -2
  91. package/admin/plugins/editor/defaultBar/Name/Name.js +9 -4
  92. package/admin/plugins/editor/defaultBar/Name/NameStyled.d.ts +3 -3
  93. package/admin/plugins/editor/defaultBar/SaveContentModelButton.d.ts +2 -2
  94. package/admin/plugins/fieldRenderers/Accordion.d.ts +4 -5
  95. package/admin/plugins/fieldRenderers/Accordion.js +2 -1
  96. package/admin/plugins/fieldRenderers/DynamicSection.d.ts +5 -4
  97. package/admin/plugins/fieldRenderers/boolean/booleanSwitch.js +1 -0
  98. package/admin/plugins/fieldRenderers/checkboxes.js +1 -0
  99. package/admin/plugins/fieldRenderers/dateTime/DateTimeWithTimezone.d.ts +2 -1
  100. package/admin/plugins/fieldRenderers/dateTime/DateTimeWithTimezone.js +3 -3
  101. package/admin/plugins/fieldRenderers/dateTime/DateTimeWithoutTimezone.d.ts +2 -1
  102. package/admin/plugins/fieldRenderers/dateTime/DateTimeWithoutTimezone.js +2 -2
  103. package/admin/plugins/fieldRenderers/dateTime/Input.d.ts +2 -2
  104. package/admin/plugins/fieldRenderers/dateTime/Select.d.ts +3 -3
  105. package/admin/plugins/fieldRenderers/dateTime/Time.d.ts +2 -2
  106. package/admin/plugins/fieldRenderers/dateTime/dateTimeField.js +1 -0
  107. package/admin/plugins/fieldRenderers/dateTime/utils.d.ts +5 -3
  108. package/admin/plugins/fieldRenderers/file/File.d.ts +2 -2
  109. package/admin/plugins/fieldRenderers/file/File.js +1 -1
  110. package/admin/plugins/fieldRenderers/file/fileField.js +1 -0
  111. package/admin/plugins/fieldRenderers/file/fileFields.js +8 -2
  112. package/admin/plugins/fieldRenderers/file/utils.d.ts +8 -3
  113. package/admin/plugins/fieldRenderers/longText/longText.js +1 -0
  114. package/admin/plugins/fieldRenderers/number/numberInput.js +1 -0
  115. package/admin/plugins/fieldRenderers/ref/components/ContentEntriesAutocomplete.d.ts +6 -4
  116. package/admin/plugins/fieldRenderers/ref/components/ContentEntriesAutocomplete.js +5 -3
  117. package/admin/plugins/fieldRenderers/ref/components/ContentEntriesMultiAutoComplete.d.ts +6 -4
  118. package/admin/plugins/fieldRenderers/ref/components/ContentEntriesMultiAutoComplete.js +15 -9
  119. package/admin/plugins/fieldRenderers/ref/components/NewRefEntryFormDialog.d.ts +2 -1
  120. package/admin/plugins/fieldRenderers/ref/components/NewRefEntryFormDialog.js +3 -2
  121. package/admin/plugins/fieldRenderers/ref/components/createEntryUrl.d.ts +2 -2
  122. package/admin/plugins/fieldRenderers/ref/components/getOptions.d.ts +15 -1
  123. package/admin/plugins/fieldRenderers/ref/components/graphql.d.ts +60 -0
  124. package/admin/plugins/fieldRenderers/ref/components/graphql.js +16 -1
  125. package/admin/plugins/fieldRenderers/ref/components/renderItem.d.ts +2 -2
  126. package/admin/plugins/fieldRenderers/ref/components/useReference.d.ts +4 -4
  127. package/admin/plugins/fieldRenderers/ref/components/useReferences.d.ts +16 -8
  128. package/admin/plugins/fieldRenderers/ref/components/useReferences.js +1 -0
  129. package/admin/plugins/fieldRenderers/ref/hooks/useNewRefEntryDialog.d.ts +2 -4
  130. package/admin/plugins/fieldRenderers/ref/refInput.js +1 -0
  131. package/admin/plugins/fieldRenderers/ref/refInputs.js +1 -0
  132. package/admin/plugins/fieldRenderers/richText/richTextInput.js +1 -0
  133. package/admin/plugins/fieldRenderers/richText/richTextInputs.js +1 -0
  134. package/admin/plugins/fieldRenderers/text/textInput.js +1 -0
  135. package/admin/plugins/fieldValidators/date/createDateInputField.d.ts +2 -1
  136. package/admin/plugins/fieldValidators/gte.d.ts +2 -2
  137. package/admin/plugins/fieldValidators/gte.js +3 -2
  138. package/admin/plugins/fieldValidators/in.d.ts +2 -2
  139. package/admin/plugins/fieldValidators/in.js +3 -2
  140. package/admin/plugins/fieldValidators/lte.d.ts +2 -2
  141. package/admin/plugins/fieldValidators/lte.js +3 -2
  142. package/admin/plugins/fieldValidators/maxLength.d.ts +2 -2
  143. package/admin/plugins/fieldValidators/maxLength.js +3 -2
  144. package/admin/plugins/fieldValidators/minLength.d.ts +2 -2
  145. package/admin/plugins/fieldValidators/minLength.js +3 -2
  146. package/admin/plugins/fieldValidators/pattern.d.ts +2 -2
  147. package/admin/plugins/fieldValidators/pattern.js +3 -2
  148. package/admin/plugins/fieldValidators/patternPlugins/email.d.ts +2 -2
  149. package/admin/plugins/fieldValidators/patternPlugins/email.js +3 -2
  150. package/admin/plugins/fieldValidators/patternPlugins/lowerCase.d.ts +2 -2
  151. package/admin/plugins/fieldValidators/patternPlugins/lowerCase.js +3 -2
  152. package/admin/plugins/fieldValidators/patternPlugins/lowerCaseSpace.d.ts +2 -2
  153. package/admin/plugins/fieldValidators/patternPlugins/lowerCaseSpace.js +3 -2
  154. package/admin/plugins/fieldValidators/patternPlugins/upperCase.d.ts +2 -2
  155. package/admin/plugins/fieldValidators/patternPlugins/upperCase.js +3 -2
  156. package/admin/plugins/fieldValidators/patternPlugins/upperCaseSpace.d.ts +2 -2
  157. package/admin/plugins/fieldValidators/patternPlugins/upperCaseSpace.js +3 -2
  158. package/admin/plugins/fieldValidators/patternPlugins/url.d.ts +2 -2
  159. package/admin/plugins/fieldValidators/patternPlugins/url.js +3 -2
  160. package/admin/plugins/fieldValidators/required.d.ts +2 -2
  161. package/admin/plugins/fieldValidators/required.js +3 -2
  162. package/admin/plugins/fields/PredefinedValuesDynamicFieldset.d.ts +3 -2
  163. package/admin/plugins/fields/object/ObjectFields.d.ts +7 -4
  164. package/admin/plugins/fields/ref.js +2 -1
  165. package/admin/plugins/icons.js +1 -1
  166. package/admin/plugins/index.d.ts +1 -1
  167. package/admin/plugins/install.d.ts +22 -0
  168. package/admin/plugins/install.js +36 -30
  169. package/admin/plugins/permissionRenderer/CmsPermissions.d.ts +11 -5
  170. package/admin/plugins/permissionRenderer/CmsPermissions.js +5 -1
  171. package/admin/plugins/permissionRenderer/components/ContentEntryPermission.d.ts +12 -8
  172. package/admin/plugins/permissionRenderer/components/ContentModelGroupPermission.d.ts +11 -8
  173. package/admin/plugins/permissionRenderer/components/ContentModelList.d.ts +8 -6
  174. package/admin/plugins/permissionRenderer/components/ContentModelList.js +3 -3
  175. package/admin/plugins/permissionRenderer/components/ContentModelPermission.d.ts +14 -10
  176. package/admin/plugins/permissionRenderer/components/ContentModelPermission.js +3 -2
  177. package/admin/plugins/permissionRenderer/components/PermissionRendererWrapper.d.ts +10 -5
  178. package/admin/plugins/permissionRenderer/components/PermissionRendererWrapper.js +4 -0
  179. package/admin/plugins/permissionRenderer/components/PermissionSelector.d.ts +11 -26
  180. package/admin/plugins/permissionRenderer/components/StyledComponents.d.ts +1 -1
  181. package/admin/plugins/permissionRenderer/components/types.d.ts +16 -0
  182. package/admin/plugins/permissionRenderer/components/types.js +1 -0
  183. package/admin/plugins/permissionRenderer/components/useCmsData.d.ts +17 -1
  184. package/admin/plugins/permissionRenderer/components/useCmsData.js +39 -25
  185. package/admin/plugins/permissionRenderer/index.d.ts +2 -2
  186. package/admin/plugins/permissionRenderer/index.js +3 -2
  187. package/admin/plugins/upgrades/5.19.0/createRepublishMutation.d.ts +2 -1
  188. package/admin/plugins/upgrades/5.19.0/fetchModelEntries.js +1 -0
  189. package/admin/plugins/upgrades/v5.0.0.js +1 -0
  190. package/admin/plugins/upgrades/v5.19.0.js +1 -0
  191. package/admin/plugins/upgrades/v5.5.0.js +1 -0
  192. package/admin/plugins/upgrades/v5.8.0.js +1 -0
  193. package/admin/plugins/validators/gte.d.ts +2 -2
  194. package/admin/plugins/validators/gte.js +3 -2
  195. package/admin/plugins/validators/in.d.ts +2 -2
  196. package/admin/plugins/validators/in.js +3 -2
  197. package/admin/plugins/validators/lte.d.ts +2 -2
  198. package/admin/plugins/validators/lte.js +3 -2
  199. package/admin/plugins/validators/maxLength.d.ts +2 -2
  200. package/admin/plugins/validators/maxLength.js +3 -2
  201. package/admin/plugins/validators/minLength.d.ts +2 -2
  202. package/admin/plugins/validators/minLength.js +3 -2
  203. package/admin/plugins/validators/pattern.d.ts +3 -9
  204. package/admin/plugins/validators/pattern.js +3 -2
  205. package/admin/plugins/validators/patternPlugins/email.d.ts +3 -10
  206. package/admin/plugins/validators/patternPlugins/email.js +3 -2
  207. package/admin/plugins/validators/patternPlugins/lowerCase.d.ts +3 -10
  208. package/admin/plugins/validators/patternPlugins/lowerCase.js +3 -2
  209. package/admin/plugins/validators/patternPlugins/lowerCaseSpace.d.ts +3 -10
  210. package/admin/plugins/validators/patternPlugins/lowerCaseSpace.js +3 -2
  211. package/admin/plugins/validators/patternPlugins/upperCase.d.ts +3 -10
  212. package/admin/plugins/validators/patternPlugins/upperCase.js +3 -2
  213. package/admin/plugins/validators/patternPlugins/upperCaseSpace.d.ts +3 -10
  214. package/admin/plugins/validators/patternPlugins/upperCaseSpace.js +3 -2
  215. package/admin/plugins/validators/patternPlugins/url.d.ts +3 -10
  216. package/admin/plugins/validators/patternPlugins/url.js +3 -2
  217. package/admin/plugins/validators/required.d.ts +2 -2
  218. package/admin/plugins/validators/required.js +3 -2
  219. package/admin/views/contentEntries/ContentEntries.d.ts +2 -2
  220. package/admin/views/contentEntries/ContentEntries.js +2 -2
  221. package/admin/views/contentEntries/ContentEntriesContext.d.ts +9 -5
  222. package/admin/views/contentEntries/ContentEntriesContext.js +1 -1
  223. package/admin/views/contentEntries/ContentEntriesList.d.ts +2 -2
  224. package/admin/views/contentEntries/ContentEntriesList.js +11 -1
  225. package/admin/views/contentEntries/ContentEntry/ContentEntryContext.d.ts +1 -4
  226. package/admin/views/contentEntries/ContentEntry/ContentEntryContext.js +8 -6
  227. package/admin/views/contentEntries/ContentEntry/RevisionListItem.d.ts +4 -4
  228. package/admin/views/contentEntries/ContentEntry/RevisionListItem.js +11 -2
  229. package/admin/views/contentEntries/ContentEntry/RevisionsList.d.ts +2 -2
  230. package/admin/views/contentEntries/ContentEntry/cache.d.ts +9 -7
  231. package/admin/views/contentEntries/ContentEntry/cache.js +22 -16
  232. package/admin/views/contentEntries/ContentEntry/header/Header.d.ts +2 -2
  233. package/admin/views/contentEntries/ContentEntry/header/contentFormOptionsMenu/ContentFormOptionsMenu.d.ts +2 -2
  234. package/admin/views/contentEntries/ContentEntry/header/requestReview/RequestReview.d.ts +2 -2
  235. package/admin/views/contentEntries/ContentEntry/header/revisionSelector/RevisionSelector.d.ts +2 -2
  236. package/admin/views/contentEntries/ContentEntry/header/saveAndPublishContent/SaveAndPublishContent.d.ts +2 -2
  237. package/admin/views/contentEntries/ContentEntry/header/saveContent/SaveContent.d.ts +2 -2
  238. package/admin/views/contentEntries/ContentEntry/useRevision.d.ts +31 -9
  239. package/admin/views/contentEntries/ContentEntry/useRevision.js +135 -113
  240. package/admin/views/contentEntries/ContentEntry.d.ts +1 -2
  241. package/admin/views/contentEntries/ContentEntry.js +2 -5
  242. package/admin/views/contentEntries/hooks/useContentEntriesList.d.ts +2 -5
  243. package/admin/views/contentModelGroups/ContentModelGroups.d.ts +2 -2
  244. package/admin/views/contentModelGroups/ContentModelGroups.js +2 -2
  245. package/admin/views/contentModelGroups/ContentModelGroupsDataList.d.ts +4 -4
  246. package/admin/views/contentModelGroups/ContentModelGroupsDataList.js +13 -21
  247. package/admin/views/contentModelGroups/ContentModelGroupsForm.d.ts +4 -4
  248. package/admin/views/contentModelGroups/ContentModelGroupsForm.js +49 -32
  249. package/admin/views/contentModelGroups/DelayedOnChange.d.ts +29 -12
  250. package/admin/views/contentModelGroups/DelayedOnChange.js +13 -13
  251. package/admin/views/contentModelGroups/IconPicker.d.ts +3 -2
  252. package/admin/views/contentModelGroups/IconPicker.js +1 -1
  253. package/admin/views/contentModelGroups/graphql.d.ts +68 -0
  254. package/admin/views/contentModelGroups/graphql.js +26 -5
  255. package/admin/views/contentModels/CloneContentModelDialog.js +6 -5
  256. package/admin/views/contentModels/ContentModelEditor.d.ts +3 -2
  257. package/admin/views/contentModels/ContentModelEditor.js +6 -3
  258. package/admin/views/contentModels/ContentModels.d.ts +2 -2
  259. package/admin/views/contentModels/ContentModels.js +5 -5
  260. package/admin/views/contentModels/ContentModelsDataList.d.ts +4 -4
  261. package/admin/views/contentModels/ContentModelsDataList.js +17 -21
  262. package/admin/views/contentModels/NewContentModelDialog.d.ts +2 -2
  263. package/admin/views/contentModels/NewContentModelDialog.js +151 -76
  264. package/admin/views/contentModels/cache.d.ts +5 -4
  265. package/admin/views/contentModels/cache.js +9 -9
  266. package/admin/views/contentModels/types.d.ts +4 -0
  267. package/admin/views/contentModels/types.js +1 -0
  268. package/admin/views/utils.d.ts +3 -2
  269. package/admin/views/utils.js +5 -18
  270. package/admin/viewsGraphql.d.ts +62 -0
  271. package/admin/viewsGraphql.js +30 -5
  272. package/package.json +20 -17
  273. package/types.d.ts +88 -23
@@ -1,4 +1,64 @@
1
+ import { CmsErrorResponse, CmsModel } from "../../../../../types";
2
+ /**
3
+ * #########################
4
+ * Common response
5
+ */
6
+ export interface CmsEntryQueryResponseDataEntry {
7
+ id: string;
8
+ status: "published" | "draft";
9
+ title: string;
10
+ model: Pick<CmsModel, "modelId" | "name">;
11
+ }
12
+ /**
13
+ * #########################
14
+ * Common variables
15
+ */
16
+ export interface CmsEntryGetEntryVariable {
17
+ modelId: string;
18
+ id: string;
19
+ }
20
+ /**
21
+ * #########################
22
+ * Search Entries Query Response
23
+ */
24
+ export interface CmsEntrySearchQueryResponse {
25
+ content: {
26
+ data: CmsEntryQueryResponseDataEntry[];
27
+ error?: CmsErrorResponse;
28
+ };
29
+ }
30
+ export interface CmsEntrySearchQueryVariables {
31
+ modelIds: string[];
32
+ query: string;
33
+ limit?: number;
34
+ }
1
35
  export declare const SEARCH_CONTENT_ENTRIES: import("graphql").DocumentNode;
36
+ /**
37
+ * #########################
38
+ * Get Entries Query Response
39
+ */
40
+ export interface CmsEntryGetListResponse {
41
+ content: {
42
+ data: CmsEntryQueryResponseDataEntry[];
43
+ error?: CmsErrorResponse;
44
+ };
45
+ }
46
+ export interface CmsEntryGetListVariables {
47
+ entries: CmsEntryGetEntryVariable[];
48
+ }
2
49
  export declare const GET_CONTENT_ENTRIES: import("graphql").DocumentNode;
50
+ /**
51
+ * #########################
52
+ * Get Entry Query Response
53
+ */
54
+ export interface CmsEntryGetQueryResponse {
55
+ content: {
56
+ data: CmsEntryQueryResponseDataEntry;
57
+ error?: CmsErrorResponse;
58
+ };
59
+ }
60
+ export interface CmsEntryGetQueryVariables {
61
+ entry: CmsEntryGetEntryVariable;
62
+ }
3
63
  export declare const GET_CONTENT_ENTRY: import("graphql").DocumentNode;
4
64
  export declare const GET_CONTENT_MODELS: import("graphql").DocumentNode;
@@ -3,8 +3,23 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
3
3
  var _templateObject, _templateObject2, _templateObject3, _templateObject4;
4
4
 
5
5
  import gql from "graphql-tag";
6
- var fields = "\ndata {\n id\n status\n title\n model {\n modelId\n name\n }\n}\nerror {\n code\n message\n}\n";
6
+ var fields = "\ndata {\n id\n status\n title\n model {\n modelId\n name\n }\n}\nerror {\n code\n message\n data\n}";
7
+ /**
8
+ * #########################
9
+ * Common response
10
+ */
11
+
7
12
  export var SEARCH_CONTENT_ENTRIES = gql(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n query CmsSearchContentEntries($modelIds: [ID!]!, $query: String!, $limit: Int) {\n content: searchContentEntries(modelIds: $modelIds, query: $query, limit: $limit) {\n ", "\n }\n }\n"])), fields);
13
+ /**
14
+ * #########################
15
+ * Get Entries Query Response
16
+ */
17
+
8
18
  export var GET_CONTENT_ENTRIES = gql(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n query CmsGetContentEntries($entries: [CmsModelEntryInput!]!) {\n content: getContentEntries(entries: $entries) {\n ", "\n }\n }\n"])), fields);
19
+ /**
20
+ * #########################
21
+ * Get Entry Query Response
22
+ */
23
+
9
24
  export var GET_CONTENT_ENTRY = gql(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n query CmsGetContentEntry($entry: CmsModelEntryInput!) {\n content: getContentEntry(entry: $entry) {\n ", "\n }\n }\n"])), fields);
10
25
  export var GET_CONTENT_MODELS = gql(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n query CmsGetContentModels {\n listContentModels {\n data {\n modelId\n titleFieldId\n }\n }\n }\n"])));
@@ -1,8 +1,8 @@
1
- /// <reference types="react" />
1
+ import React from "react";
2
2
  export interface Props {
3
3
  name: string;
4
4
  modelName: string;
5
5
  modelId: string;
6
6
  id: string;
7
7
  }
8
- export declare const renderItem: (props: Props) => JSX.Element;
8
+ export declare const renderItem: React.FC<Props>;
@@ -1,5 +1,5 @@
1
1
  import { CmsEditorField } from "../../../../../types";
2
- interface ValueEntry {
2
+ export interface ReferencedEntry {
3
3
  id: string;
4
4
  modelId: string;
5
5
  modelName: string;
@@ -11,11 +11,11 @@ interface UseReferenceHookArgs {
11
11
  field: CmsEditorField;
12
12
  }
13
13
  interface UseReferenceHookValue {
14
- onChange: (value: any, entry: ValueEntry) => void;
14
+ onChange: (value: any, entry: ReferencedEntry) => void;
15
15
  setSearch: (value: string) => void;
16
- value: ValueEntry | null;
16
+ value: ReferencedEntry | null;
17
17
  loading: boolean;
18
- options: ValueEntry[];
18
+ options: ReferencedEntry[];
19
19
  }
20
20
  declare type UseReferenceHook = (args: UseReferenceHookArgs) => UseReferenceHookValue;
21
21
  export declare const useReference: UseReferenceHook;
@@ -1,19 +1,27 @@
1
1
  /// <reference types="react" />
2
- declare type ValueEntry = {
2
+ import { CmsEditorField } from "../../../../../types";
3
+ export interface ReferencedCmsEntry {
3
4
  id: string;
4
5
  modelId: string;
5
6
  modelName: string;
6
7
  published: boolean;
7
8
  name: string;
8
- };
9
- export declare const useReferences: ({ bind, field }: {
9
+ }
10
+ interface UseReferencesParams {
10
11
  bind: any;
11
- field: any;
12
- }) => {
13
- onChange: (values: any) => void;
12
+ field: CmsEditorField;
13
+ }
14
+ export declare const useReferences: ({ bind, field }: UseReferencesParams) => {
15
+ onChange: (values: ReferencedCmsEntry[]) => void;
14
16
  loading: boolean;
15
17
  setSearch: import("react").Dispatch<import("react").SetStateAction<string>>;
16
- entries: ValueEntry[];
17
- options: any[];
18
+ entries: ReferencedCmsEntry[];
19
+ options: {
20
+ id: string;
21
+ modelId: string;
22
+ modelName: string;
23
+ name: any;
24
+ published: boolean;
25
+ }[];
18
26
  };
19
27
  export {};
@@ -2,6 +2,7 @@ import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
2
2
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
3
3
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
4
4
  import _regeneratorRuntime from "@babel/runtime/regenerator";
5
+ // TODO @ts-refactor figure out correct bind types and remove any
5
6
  import { useCallback, useEffect, useMemo, useRef, useState } from "react";
6
7
  import { useApolloClient } from "../../../../hooks";
7
8
  import * as GQL from "./graphql";
@@ -1,10 +1,8 @@
1
1
  import React from "react";
2
2
  export interface NewRefEntryDialogContextValue {
3
3
  open: boolean;
4
- setOpen: Function;
4
+ setOpen: (value: boolean) => void;
5
5
  }
6
6
  export declare const NewRefEntryDialogContext: React.Context<NewRefEntryDialogContextValue>;
7
- export declare const NewRefEntryDialogContextProvider: ({ children }: {
8
- children: any;
9
- }) => JSX.Element;
7
+ export declare const NewRefEntryDialogContextProvider: React.FC;
10
8
  export declare const useNewRefEntryDialog: () => NewRefEntryDialogContextValue;
@@ -2,6 +2,7 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
2
2
 
3
3
  var _templateObject, _templateObject2;
4
4
 
5
+ // TODO @ts-refactor figure out correct bind types and remove any
5
6
  import React from "react";
6
7
  import { i18n } from "@webiny/app/i18n";
7
8
  import ContentEntriesAutocomplete from "./components/ContentEntriesAutocomplete";
@@ -2,6 +2,7 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
2
2
 
3
3
  var _templateObject, _templateObject2;
4
4
 
5
+ // TODO @ts-refactor figure out correct bind types and remove any
5
6
  import React from "react";
6
7
  import ContentEntriesMultiAutocomplete from "./components/ContentEntriesMultiAutoComplete";
7
8
  import { NewRefEntryDialogContextProvider } from "./hooks/useNewRefEntryDialog";
@@ -2,6 +2,7 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
2
2
 
3
3
  var _templateObject, _templateObject2;
4
4
 
5
+ // TODO @ts-refactor figure out correct bind types and remove any
5
6
  import React, { useMemo } from "react";
6
7
  import get from "lodash/get";
7
8
  import { i18n } from "@webiny/app/i18n";
@@ -2,6 +2,7 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
2
2
 
3
3
  var _templateObject, _templateObject2;
4
4
 
5
+ // TODO @ts-refactor figure out correct bind types and remove any
5
6
  import React, { useMemo } from "react";
6
7
  import get from "lodash/get";
7
8
  import { i18n } from "@webiny/app/i18n";
@@ -2,6 +2,7 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
2
2
 
3
3
  var _templateObject, _templateObject2;
4
4
 
5
+ // TODO @ts-refactor figure out correct bind types and remove any
5
6
  import React from "react";
6
7
  import { i18n } from "@webiny/app/i18n";
7
8
  import { Input } from "@webiny/ui/Input";
@@ -1,3 +1,4 @@
1
1
  /// <reference types="react" />
2
2
  import { CmsEditorField } from "../../../../types";
3
- export declare const createInputField: (field: CmsEditorField, bind: any) => JSX.Element;
3
+ import { BindComponentRenderProp } from "@webiny/form";
4
+ export declare const createInputField: (field: CmsEditorField, bind: BindComponentRenderProp) => JSX.Element;
@@ -1,3 +1,3 @@
1
1
  import { CmsEditorFieldValidatorPlugin } from "../../../types";
2
- declare const _default: CmsEditorFieldValidatorPlugin;
3
- export default _default;
2
+ declare const plugin: CmsEditorFieldValidatorPlugin;
3
+ export default plugin;
@@ -2,7 +2,7 @@ import React from "react";
2
2
  import { Grid, Cell } from "@webiny/ui/Grid";
3
3
  import { Input } from "@webiny/ui/Input";
4
4
  import { validation } from "@webiny/validation";
5
- export default {
5
+ var plugin = {
6
6
  type: "cms-editor-field-validator",
7
7
  name: "cms-editor-field-validator-gte",
8
8
  validator: {
@@ -24,4 +24,5 @@ export default {
24
24
  }))));
25
25
  }
26
26
  }
27
- };
27
+ };
28
+ export default plugin;
@@ -1,3 +1,3 @@
1
1
  import { CmsEditorFieldValidatorPlugin } from "../../../types";
2
- declare const _default: CmsEditorFieldValidatorPlugin;
3
- export default _default;
2
+ declare const plugin: CmsEditorFieldValidatorPlugin;
3
+ export default plugin;
@@ -2,7 +2,7 @@ import React from "react";
2
2
  import { Grid, Cell } from "@webiny/ui/Grid";
3
3
  import { Tags } from "@webiny/ui/Tags";
4
4
  import { validation } from "@webiny/validation";
5
- export default {
5
+ var plugin = {
6
6
  type: "cms-editor-field-validator",
7
7
  name: "cms-editor-field-validator-in",
8
8
  validator: {
@@ -23,4 +23,5 @@ export default {
23
23
  }))));
24
24
  }
25
25
  }
26
- };
26
+ };
27
+ export default plugin;
@@ -1,3 +1,3 @@
1
1
  import { CmsEditorFieldValidatorPlugin } from "../../../types";
2
- declare const _default: CmsEditorFieldValidatorPlugin;
3
- export default _default;
2
+ declare const plugin: CmsEditorFieldValidatorPlugin;
3
+ export default plugin;
@@ -2,7 +2,7 @@ import React from "react";
2
2
  import { Grid, Cell } from "@webiny/ui/Grid";
3
3
  import { Input } from "@webiny/ui/Input";
4
4
  import { validation } from "@webiny/validation";
5
- export default {
5
+ var plugin = {
6
6
  type: "cms-editor-field-validator",
7
7
  name: "cms-editor-field-validator-lte",
8
8
  validator: {
@@ -24,4 +24,5 @@ export default {
24
24
  }))));
25
25
  }
26
26
  }
27
- };
27
+ };
28
+ export default plugin;
@@ -1,3 +1,3 @@
1
1
  import { CmsEditorFieldValidatorPlugin } from "../../../types";
2
- declare const _default: CmsEditorFieldValidatorPlugin;
3
- export default _default;
2
+ declare const plugin: CmsEditorFieldValidatorPlugin;
3
+ export default plugin;
@@ -2,7 +2,7 @@ import React from "react";
2
2
  import { Grid, Cell } from "@webiny/ui/Grid";
3
3
  import { Input } from "@webiny/ui/Input";
4
4
  import { validation } from "@webiny/validation";
5
- export default {
5
+ var plugin = {
6
6
  type: "cms-editor-field-validator",
7
7
  name: "cms-editor-field-validator-max-length",
8
8
  validator: {
@@ -24,4 +24,5 @@ export default {
24
24
  }))));
25
25
  }
26
26
  }
27
- };
27
+ };
28
+ export default plugin;
@@ -1,3 +1,3 @@
1
1
  import { CmsEditorFieldValidatorPlugin } from "../../../types";
2
- declare const _default: CmsEditorFieldValidatorPlugin;
3
- export default _default;
2
+ declare const plugin: CmsEditorFieldValidatorPlugin;
3
+ export default plugin;
@@ -2,7 +2,7 @@ import React from "react";
2
2
  import { Grid, Cell } from "@webiny/ui/Grid";
3
3
  import { Input } from "@webiny/ui/Input";
4
4
  import { validation } from "@webiny/validation";
5
- export default {
5
+ var plugin = {
6
6
  type: "cms-editor-field-validator",
7
7
  name: "cms-editor-field-validator-min-length",
8
8
  validator: {
@@ -24,4 +24,5 @@ export default {
24
24
  }))));
25
25
  }
26
26
  }
27
- };
27
+ };
28
+ export default plugin;
@@ -1,3 +1,3 @@
1
1
  import { CmsEditorFieldValidatorPlugin } from "../../../types";
2
- declare const _default: CmsEditorFieldValidatorPlugin;
3
- export default _default;
2
+ declare const plugin: CmsEditorFieldValidatorPlugin;
3
+ export default plugin;
@@ -4,7 +4,7 @@ import { Input } from "@webiny/ui/Input";
4
4
  import { Select } from "@webiny/ui/Select";
5
5
  import { plugins } from "@webiny/plugins";
6
6
  import { validation } from "@webiny/validation";
7
- export default {
7
+ var plugin = {
8
8
  type: "cms-editor-field-validator",
9
9
  name: "cms-editor-field-validator-pattern",
10
10
  validator: {
@@ -71,4 +71,5 @@ export default {
71
71
  }))));
72
72
  }
73
73
  }
74
- };
74
+ };
75
+ export default plugin;
@@ -1,3 +1,3 @@
1
1
  import { CmsEditorFieldValidatorPatternPlugin } from "../../../../types";
2
- declare const _default: CmsEditorFieldValidatorPatternPlugin;
3
- export default _default;
2
+ declare const plugin: CmsEditorFieldValidatorPatternPlugin;
3
+ export default plugin;
@@ -1,4 +1,4 @@
1
- export default {
1
+ var plugin = {
2
2
  type: "cms-editor-field-validator-pattern",
3
3
  name: "cms-editor-field-validator-pattern-email",
4
4
  pattern: {
@@ -6,4 +6,5 @@ export default {
6
6
  name: "email",
7
7
  label: "E-mail"
8
8
  }
9
- };
9
+ };
10
+ export default plugin;
@@ -1,3 +1,3 @@
1
1
  import { CmsEditorFieldValidatorPatternPlugin } from "../../../../types";
2
- declare const _default: CmsEditorFieldValidatorPatternPlugin;
3
- export default _default;
2
+ declare const plugin: CmsEditorFieldValidatorPatternPlugin;
3
+ export default plugin;
@@ -1,4 +1,4 @@
1
- export default {
1
+ var plugin = {
2
2
  type: "cms-editor-field-validator-pattern",
3
3
  name: "cms-editor-field-validator-pattern-lower-case",
4
4
  pattern: {
@@ -6,4 +6,5 @@ export default {
6
6
  name: "lowerCase",
7
7
  label: "Lower case"
8
8
  }
9
- };
9
+ };
10
+ export default plugin;
@@ -1,3 +1,3 @@
1
1
  import { CmsEditorFieldValidatorPatternPlugin } from "../../../../types";
2
- declare const _default: CmsEditorFieldValidatorPatternPlugin;
3
- export default _default;
2
+ declare const plugin: CmsEditorFieldValidatorPatternPlugin;
3
+ export default plugin;
@@ -1,4 +1,4 @@
1
- export default {
1
+ var plugin = {
2
2
  type: "cms-editor-field-validator-pattern",
3
3
  name: "cms-editor-field-validator-pattern-lower-case-space",
4
4
  pattern: {
@@ -6,4 +6,5 @@ export default {
6
6
  name: "lowerCaseSpace",
7
7
  label: "Lower case + space"
8
8
  }
9
- };
9
+ };
10
+ export default plugin;
@@ -1,3 +1,3 @@
1
1
  import { CmsEditorFieldValidatorPatternPlugin } from "../../../../types";
2
- declare const _default: CmsEditorFieldValidatorPatternPlugin;
3
- export default _default;
2
+ declare const plugin: CmsEditorFieldValidatorPatternPlugin;
3
+ export default plugin;
@@ -1,4 +1,4 @@
1
- export default {
1
+ var plugin = {
2
2
  type: "cms-editor-field-validator-pattern",
3
3
  name: "cms-editor-field-validator-pattern-upper-case",
4
4
  pattern: {
@@ -6,4 +6,5 @@ export default {
6
6
  name: "upperCase",
7
7
  label: "Upper case"
8
8
  }
9
- };
9
+ };
10
+ export default plugin;
@@ -1,3 +1,3 @@
1
1
  import { CmsEditorFieldValidatorPatternPlugin } from "../../../../types";
2
- declare const _default: CmsEditorFieldValidatorPatternPlugin;
3
- export default _default;
2
+ declare const plugin: CmsEditorFieldValidatorPatternPlugin;
3
+ export default plugin;
@@ -1,4 +1,4 @@
1
- export default {
1
+ var plugin = {
2
2
  type: "cms-editor-field-validator-pattern",
3
3
  name: "cms-editor-field-validator-pattern-upper-case-space",
4
4
  pattern: {
@@ -6,4 +6,5 @@ export default {
6
6
  name: "upperCaseSpace",
7
7
  label: "Upper case + space"
8
8
  }
9
- };
9
+ };
10
+ export default plugin;
@@ -1,3 +1,3 @@
1
1
  import { CmsEditorFieldValidatorPatternPlugin } from "../../../../types";
2
- declare const _default: CmsEditorFieldValidatorPatternPlugin;
3
- export default _default;
2
+ declare const plugin: CmsEditorFieldValidatorPatternPlugin;
3
+ export default plugin;
@@ -1,4 +1,4 @@
1
- export default {
1
+ var plugin = {
2
2
  type: "cms-editor-field-validator-pattern",
3
3
  name: "cms-editor-field-validator-pattern-url",
4
4
  pattern: {
@@ -6,4 +6,5 @@ export default {
6
6
  name: "url",
7
7
  label: "URL"
8
8
  }
9
- };
9
+ };
10
+ export default plugin;
@@ -1,3 +1,3 @@
1
1
  import { CmsEditorFieldValidatorPlugin } from "../../../types";
2
- declare const _default: CmsEditorFieldValidatorPlugin;
3
- export default _default;
2
+ declare const plugin: CmsEditorFieldValidatorPlugin;
3
+ export default plugin;
@@ -1,4 +1,4 @@
1
- export default {
1
+ var plugin = {
2
2
  type: "cms-editor-field-validator",
3
3
  name: "cms-editor-field-validator-required",
4
4
  validator: {
@@ -7,4 +7,5 @@ export default {
7
7
  description: "You won't be able to submit the form if this field is empty",
8
8
  defaultMessage: "Value is required."
9
9
  }
10
- };
10
+ };
11
+ export default plugin;
@@ -1,8 +1,9 @@
1
1
  import React from "react";
2
2
  import { CmsEditorField } from "../../../types";
3
+ import { BindComponent } from "@webiny/form/Bind";
3
4
  export interface Props {
4
- getBind: (value?: any) => any;
5
- renderValueInput?: any;
5
+ getBind: (value?: any) => BindComponent;
6
+ renderValueInput?: (Bind: BindComponent) => React.ReactNode;
6
7
  field: CmsEditorField;
7
8
  }
8
9
  declare const PredefinedValuesDynamicFieldset: React.FC<Props>;
@@ -1,4 +1,7 @@
1
- /// <reference types="react" />
2
- export declare const ObjectFields: ({ field }: {
3
- field: any;
4
- }) => JSX.Element;
1
+ import React from "react";
2
+ import { CmsEditorField } from "../../../../types";
3
+ interface ObjectFieldsProps {
4
+ field: CmsEditorField;
5
+ }
6
+ export declare const ObjectFields: React.FC<ObjectFieldsProps>;
7
+ export {};
@@ -67,7 +67,8 @@ var plugin = {
67
67
 
68
68
 
69
69
  var options = useMemo(function () {
70
- return get(data, "listContentModels.data", []).map(function (model) {
70
+ var models = get(data, "listContentModels.data", []);
71
+ return models.map(function (model) {
71
72
  return {
72
73
  id: model.modelId,
73
74
  name: model.name
@@ -1,4 +1,4 @@
1
- import * as React from "react";
1
+ import React from "react";
2
2
  import { library } from "@fortawesome/fontawesome-svg-core";
3
3
  import { fab } from "@fortawesome/free-brands-svg-icons";
4
4
  import { fas } from "@fortawesome/free-solid-svg-icons";
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- declare const _default: () => (import("@webiny/app-admin/types").AdminInstallationPlugin | import("@webiny/app-admin/types").AdminAppPermissionRendererPlugin | import("@webiny/app/types").CacheGetObjectIdPlugin | import("../../types").CmsEditorFormSettingsPlugin | import("../../types").CmsIconsPlugin | import("../../types").CmsFieldValueTransformer[] | import("@webiny/app/types").RoutePlugin[] | import("../../types").CmsContentDetailsPlugin[] | {
2
+ declare const _default: () => (import("../../types").CmsEditorFormSettingsPlugin | import("../../types").CmsIconsPlugin | import("../../types").CmsFieldValueTransformer[] | import("@webiny/app/types").CacheGetObjectIdPlugin | import("@webiny/app/types").RoutePlugin[] | import("@webiny/app-admin/types").AdminInstallationPlugin | import("@webiny/app-admin/types").AdminAppPermissionRendererPlugin | import("../../types").CmsContentDetailsPlugin[] | {
3
3
  name: string;
4
4
  type: string;
5
5
  render(): JSX.Element;
@@ -1,3 +1,25 @@
1
1
  import { AdminInstallationPlugin } from "@webiny/app-admin/types";
2
+ import { CmsErrorResponse } from "../../types";
3
+ /**
4
+ * ########################
5
+ * Is Installed Query
6
+ */
7
+ export interface CmsIsInstalledQueryResponse {
8
+ cms: {
9
+ version: string | null;
10
+ };
11
+ }
12
+ /**
13
+ * ########################
14
+ * Install Mutation
15
+ */
16
+ export interface CmsInstallMutationResponse {
17
+ cms: {
18
+ install: {
19
+ data: boolean;
20
+ error?: CmsErrorResponse;
21
+ };
22
+ };
23
+ }
2
24
  declare const plugin: AdminInstallationPlugin;
3
25
  export default plugin;