@webiny/app-headless-cms 0.0.0-mt-1

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 (507) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +18 -0
  3. package/admin/components/ContentEntryForm/ContentEntryForm.d.ts +8 -0
  4. package/admin/components/ContentEntryForm/ContentEntryForm.js +68 -0
  5. package/admin/components/ContentEntryForm/ContentEntryFormPreview.d.ts +7 -0
  6. package/admin/components/ContentEntryForm/ContentEntryFormPreview.js +43 -0
  7. package/admin/components/ContentEntryForm/Fields.d.ts +12 -0
  8. package/admin/components/ContentEntryForm/Fields.js +33 -0
  9. package/admin/components/ContentEntryForm/Label.d.ts +5 -0
  10. package/admin/components/ContentEntryForm/Label.js +20 -0
  11. package/admin/components/ContentEntryForm/RenderFieldElement.d.ts +8 -0
  12. package/admin/components/ContentEntryForm/RenderFieldElement.js +40 -0
  13. package/admin/components/ContentEntryForm/functions/createValidators.d.ts +1 -0
  14. package/admin/components/ContentEntryForm/functions/createValidators.js +58 -0
  15. package/admin/components/ContentEntryForm/functions/getValue.d.ts +5 -0
  16. package/admin/components/ContentEntryForm/functions/getValue.js +20 -0
  17. package/admin/components/ContentEntryForm/functions/setValue.d.ts +6 -0
  18. package/admin/components/ContentEntryForm/functions/setValue.js +20 -0
  19. package/admin/components/ContentEntryForm/useBind.d.ts +10 -0
  20. package/admin/components/ContentEntryForm/useBind.js +76 -0
  21. package/admin/components/ContentEntryForm/useContentEntryForm.d.ts +22 -0
  22. package/admin/components/ContentEntryForm/useContentEntryForm.js +338 -0
  23. package/admin/components/ContentEntryForm/useRenderPlugins.d.ts +2 -0
  24. package/admin/components/ContentEntryForm/useRenderPlugins.js +7 -0
  25. package/admin/components/ContentModelEditor/Context.d.ts +23 -0
  26. package/admin/components/ContentModelEditor/Context.js +218 -0
  27. package/admin/components/ContentModelEditor/Editor.d.ts +3 -0
  28. package/admin/components/ContentModelEditor/Editor.js +138 -0
  29. package/admin/components/ContentModelEditor/FieldsSidebar.d.ts +4 -0
  30. package/admin/components/ContentModelEditor/FieldsSidebar.js +91 -0
  31. package/admin/components/ContentModelEditor/Header.d.ts +2 -0
  32. package/admin/components/ContentModelEditor/Header.js +24 -0
  33. package/admin/components/ContentModelEditor/PreviewTab.d.ts +2 -0
  34. package/admin/components/ContentModelEditor/PreviewTab.js +36 -0
  35. package/admin/components/ContentModelEditor/icons/round-assignment-24px.svg +4 -0
  36. package/admin/components/ContentModelEditor/icons/round-drag_indicator-24px.svg +4 -0
  37. package/admin/components/ContentModelEditor/useContentModelEditor.d.ts +1 -0
  38. package/admin/components/ContentModelEditor/useContentModelEditor.js +11 -0
  39. package/admin/components/DragPreview.d.ts +2 -0
  40. package/admin/components/DragPreview.js +98 -0
  41. package/admin/components/Draggable.d.ts +14 -0
  42. package/admin/components/Draggable.js +49 -0
  43. package/admin/components/DropZone/Center.d.ts +12 -0
  44. package/admin/components/DropZone/Center.js +60 -0
  45. package/admin/components/DropZone/Horizontal.d.ts +9 -0
  46. package/admin/components/DropZone/Horizontal.js +83 -0
  47. package/admin/components/DropZone/Vertical.d.ts +10 -0
  48. package/admin/components/DropZone/Vertical.js +79 -0
  49. package/admin/components/DropZone/index.d.ts +4 -0
  50. package/admin/components/DropZone/index.js +4 -0
  51. package/admin/components/Droppable.d.ts +23 -0
  52. package/admin/components/Droppable.js +45 -0
  53. package/admin/components/FieldEditor/EditFieldDialog/AppearanceTab.d.ts +3 -0
  54. package/admin/components/FieldEditor/EditFieldDialog/AppearanceTab.js +83 -0
  55. package/admin/components/FieldEditor/EditFieldDialog/GeneralTab.d.ts +10 -0
  56. package/admin/components/FieldEditor/EditFieldDialog/GeneralTab.js +120 -0
  57. package/admin/components/FieldEditor/EditFieldDialog/PredefinedValues.d.ts +5 -0
  58. package/admin/components/FieldEditor/EditFieldDialog/PredefinedValues.js +55 -0
  59. package/admin/components/FieldEditor/EditFieldDialog/ValidatorsTab.d.ts +10 -0
  60. package/admin/components/FieldEditor/EditFieldDialog/ValidatorsTab.js +121 -0
  61. package/admin/components/FieldEditor/EditFieldDialog/functions/getValue.d.ts +6 -0
  62. package/admin/components/FieldEditor/EditFieldDialog/functions/getValue.js +16 -0
  63. package/admin/components/FieldEditor/EditFieldDialog/functions/setValue.d.ts +7 -0
  64. package/admin/components/FieldEditor/EditFieldDialog/functions/setValue.js +21 -0
  65. package/admin/components/FieldEditor/EditFieldDialog.d.ts +9 -0
  66. package/admin/components/FieldEditor/EditFieldDialog.js +231 -0
  67. package/admin/components/FieldEditor/Field.d.ts +3 -0
  68. package/admin/components/FieldEditor/Field.js +179 -0
  69. package/admin/components/FieldEditor/FieldEditor.d.ts +12 -0
  70. package/admin/components/FieldEditor/FieldEditor.js +166 -0
  71. package/admin/components/FieldEditor/FieldEditorContext.d.ts +53 -0
  72. package/admin/components/FieldEditor/FieldEditorContext.js +330 -0
  73. package/admin/components/FieldEditor/Styled.d.ts +6 -0
  74. package/admin/components/FieldEditor/Styled.js +54 -0
  75. package/admin/components/FieldEditor/index.d.ts +2 -0
  76. package/admin/components/FieldEditor/index.js +2 -0
  77. package/admin/components/FieldEditor/useFieldEditor.d.ts +1 -0
  78. package/admin/components/FieldEditor/useFieldEditor.js +5 -0
  79. package/admin/components/FieldEditor/utils/deleteField.d.ts +10 -0
  80. package/admin/components/FieldEditor/utils/deleteField.js +34 -0
  81. package/admin/components/FieldEditor/utils/getFieldPosition.d.ts +6 -0
  82. package/admin/components/FieldEditor/utils/getFieldPosition.js +20 -0
  83. package/admin/components/FieldEditor/utils/index.d.ts +4 -0
  84. package/admin/components/FieldEditor/utils/index.js +4 -0
  85. package/admin/components/FieldEditor/utils/moveField.d.ts +7 -0
  86. package/admin/components/FieldEditor/utils/moveField.js +51 -0
  87. package/admin/components/FieldEditor/utils/moveRow.d.ts +9 -0
  88. package/admin/components/FieldEditor/utils/moveRow.js +10 -0
  89. package/admin/constants/statusLabels.d.ts +8 -0
  90. package/admin/constants/statusLabels.js +13 -0
  91. package/admin/contexts/Cms/NetworkError.d.ts +2 -0
  92. package/admin/contexts/Cms/NetworkError.js +7 -0
  93. package/admin/contexts/Cms/index.d.ts +16 -0
  94. package/admin/contexts/Cms/index.js +43 -0
  95. package/admin/elements/ContentGroupMenuElement.d.ts +3 -0
  96. package/admin/elements/ContentGroupMenuElement.js +17 -0
  97. package/admin/elements/ContentModelMenuElement.d.ts +3 -0
  98. package/admin/elements/ContentModelMenuElement.js +17 -0
  99. package/admin/elements/NothingToShowElement.d.ts +15 -0
  100. package/admin/elements/NothingToShowElement.js +88 -0
  101. package/admin/graphql/contentEntries.d.ts +12 -0
  102. package/admin/graphql/contentEntries.js +68 -0
  103. package/admin/graphql/contentModels.d.ts +4 -0
  104. package/admin/graphql/contentModels.js +9 -0
  105. package/admin/graphql/createFieldsList.d.ts +2 -0
  106. package/admin/graphql/createFieldsList.js +21 -0
  107. package/admin/hooks/index.d.ts +5 -0
  108. package/admin/hooks/index.js +5 -0
  109. package/admin/hooks/useApolloClient.d.ts +2 -0
  110. package/admin/hooks/useApolloClient.js +10 -0
  111. package/admin/hooks/useCms.d.ts +3 -0
  112. package/admin/hooks/useCms.js +14 -0
  113. package/admin/hooks/useLazyQuery.d.ts +2 -0
  114. package/admin/hooks/useLazyQuery.js +16 -0
  115. package/admin/hooks/useMutation.d.ts +2 -0
  116. package/admin/hooks/useMutation.js +16 -0
  117. package/admin/hooks/usePermission.d.ts +27 -0
  118. package/admin/hooks/usePermission.js +218 -0
  119. package/admin/hooks/useQuery.d.ts +2 -0
  120. package/admin/hooks/useQuery.js +17 -0
  121. package/admin/icons/add.svg +5 -0
  122. package/admin/icons/arrow_forward-24px.svg +1 -0
  123. package/admin/icons/baseline-autorenew-24px.svg +4 -0
  124. package/admin/icons/beenhere.svg +1 -0
  125. package/admin/icons/call_split-24px.svg +4 -0
  126. package/admin/icons/close.svg +13 -0
  127. package/admin/icons/delete.svg +12 -0
  128. package/admin/icons/devices_other-black-24px.svg +1 -0
  129. package/admin/icons/done-24px.svg +1 -0
  130. package/admin/icons/edit.svg +17 -0
  131. package/admin/icons/emoji_people-24px.svg +1 -0
  132. package/admin/icons/gesture.svg +1 -0
  133. package/admin/icons/help_outline.svg +1 -0
  134. package/admin/icons/how_to_vote-24px.svg +4 -0
  135. package/admin/icons/info.svg +1 -0
  136. package/admin/icons/lock.svg +1 -0
  137. package/admin/icons/more_vert.svg +12 -0
  138. package/admin/icons/publish.svg +1 -0
  139. package/admin/icons/round-arrow_drop_down-24px.svg +12 -0
  140. package/admin/icons/round-drag_indicator-24px.svg +4 -0
  141. package/admin/icons/round-translate-24px.svg +4 -0
  142. package/admin/icons/rule-24px.svg +1 -0
  143. package/admin/icons/title-24px.svg +1 -0
  144. package/admin/icons/unpublish.svg +4 -0
  145. package/admin/icons/view_list.svg +1 -0
  146. package/admin/icons/visibility.svg +16 -0
  147. package/admin/plugins/apiInformation/index.d.ts +3 -0
  148. package/admin/plugins/apiInformation/index.js +59 -0
  149. package/admin/plugins/apiInformation/placeholder.manage.graphql +18 -0
  150. package/admin/plugins/apiInformation/placeholder.preview.graphql +15 -0
  151. package/admin/plugins/apiInformation/placeholder.read.graphql +16 -0
  152. package/admin/plugins/definitions/CmsEditorFieldValidatorFileTypePlugin.d.ts +21 -0
  153. package/admin/plugins/definitions/CmsEditorFieldValidatorFileTypePlugin.js +61 -0
  154. package/admin/plugins/definitions/CmsFieldValidatorFileTypePlugin.d.ts +10 -0
  155. package/admin/plugins/definitions/CmsFieldValidatorFileTypePlugin.js +36 -0
  156. package/admin/plugins/editor/defaultBar/BackButton.d.ts +3 -0
  157. package/admin/plugins/editor/defaultBar/BackButton.js +21 -0
  158. package/admin/plugins/editor/defaultBar/CreateContentButton.d.ts +3 -0
  159. package/admin/plugins/editor/defaultBar/CreateContentButton.js +46 -0
  160. package/admin/plugins/editor/defaultBar/Divider.d.ts +3 -0
  161. package/admin/plugins/editor/defaultBar/Divider.js +11 -0
  162. package/admin/plugins/editor/defaultBar/FormSettings/FormSettings.d.ts +6 -0
  163. package/admin/plugins/editor/defaultBar/FormSettings/FormSettings.js +90 -0
  164. package/admin/plugins/editor/defaultBar/FormSettings/FormSettingsButton.d.ts +3 -0
  165. package/admin/plugins/editor/defaultBar/FormSettings/FormSettingsButton.js +27 -0
  166. package/admin/plugins/editor/defaultBar/FormSettings/FormSettingsStyled.d.ts +6 -0
  167. package/admin/plugins/editor/defaultBar/FormSettings/FormSettingsStyled.js +42 -0
  168. package/admin/plugins/editor/defaultBar/FormSettings/index.d.ts +1 -0
  169. package/admin/plugins/editor/defaultBar/FormSettings/index.js +1 -0
  170. package/admin/plugins/editor/defaultBar/Name/Name.d.ts +7 -0
  171. package/admin/plugins/editor/defaultBar/Name/Name.js +80 -0
  172. package/admin/plugins/editor/defaultBar/Name/NameStyled.d.ts +5 -0
  173. package/admin/plugins/editor/defaultBar/Name/NameStyled.js +48 -0
  174. package/admin/plugins/editor/defaultBar/Name/index.d.ts +1 -0
  175. package/admin/plugins/editor/defaultBar/Name/index.js +1 -0
  176. package/admin/plugins/editor/defaultBar/SaveContentModelButton.d.ts +3 -0
  177. package/admin/plugins/editor/defaultBar/SaveContentModelButton.js +63 -0
  178. package/admin/plugins/editor/defaultBar/icons/more_vert.svg +12 -0
  179. package/admin/plugins/editor/defaultBar/icons/round-arrow_back-24px.svg +13 -0
  180. package/admin/plugins/editor/defaultBar/icons/round-arrow_drop_down-24px.svg +12 -0
  181. package/admin/plugins/editor/defaultBar/icons/settings.svg +25 -0
  182. package/admin/plugins/editor/defaultBar/index.d.ts +7 -0
  183. package/admin/plugins/editor/defaultBar/index.js +44 -0
  184. package/admin/plugins/editor/formSettings/components/GeneralSettings.d.ts +7 -0
  185. package/admin/plugins/editor/formSettings/components/GeneralSettings.js +37 -0
  186. package/admin/plugins/editor/formSettings/components/GroupSelect.d.ts +3 -0
  187. package/admin/plugins/editor/formSettings/components/GroupSelect.js +30 -0
  188. package/admin/plugins/editor/formSettings/icons/round-settings-24px.svg +1 -0
  189. package/admin/plugins/editor/formSettings/index.d.ts +3 -0
  190. package/admin/plugins/editor/formSettings/index.js +14 -0
  191. package/admin/plugins/fieldRenderers/Accordion.d.ts +10 -0
  192. package/admin/plugins/fieldRenderers/Accordion.js +125 -0
  193. package/admin/plugins/fieldRenderers/DynamicSection.d.ts +14 -0
  194. package/admin/plugins/fieldRenderers/DynamicSection.js +103 -0
  195. package/admin/plugins/fieldRenderers/boolean/booleanSwitch.d.ts +3 -0
  196. package/admin/plugins/fieldRenderers/boolean/booleanSwitch.js +34 -0
  197. package/admin/plugins/fieldRenderers/boolean/index.d.ts +2 -0
  198. package/admin/plugins/fieldRenderers/boolean/index.js +2 -0
  199. package/admin/plugins/fieldRenderers/checkboxes.d.ts +3 -0
  200. package/admin/plugins/fieldRenderers/checkboxes.js +45 -0
  201. package/admin/plugins/fieldRenderers/dateTime/DateTimeWithTimezone.d.ts +9 -0
  202. package/admin/plugins/fieldRenderers/dateTime/DateTimeWithTimezone.js +148 -0
  203. package/admin/plugins/fieldRenderers/dateTime/DateTimeWithoutTimezone.d.ts +8 -0
  204. package/admin/plugins/fieldRenderers/dateTime/DateTimeWithoutTimezone.js +115 -0
  205. package/admin/plugins/fieldRenderers/dateTime/Input.d.ts +16 -0
  206. package/admin/plugins/fieldRenderers/dateTime/Input.js +26 -0
  207. package/admin/plugins/fieldRenderers/dateTime/Select.d.ts +3 -0
  208. package/admin/plugins/fieldRenderers/dateTime/Select.js +13 -0
  209. package/admin/plugins/fieldRenderers/dateTime/Time.d.ts +3 -0
  210. package/admin/plugins/fieldRenderers/dateTime/Time.js +13 -0
  211. package/admin/plugins/fieldRenderers/dateTime/dateTimeField.d.ts +3 -0
  212. package/admin/plugins/fieldRenderers/dateTime/dateTimeField.js +59 -0
  213. package/admin/plugins/fieldRenderers/dateTime/dateTimeFields.d.ts +3 -0
  214. package/admin/plugins/fieldRenderers/dateTime/dateTimeFields.js +84 -0
  215. package/admin/plugins/fieldRenderers/dateTime/index.d.ts +2 -0
  216. package/admin/plugins/fieldRenderers/dateTime/index.js +3 -0
  217. package/admin/plugins/fieldRenderers/dateTime/utils.d.ts +15 -0
  218. package/admin/plugins/fieldRenderers/dateTime/utils.js +153 -0
  219. package/admin/plugins/fieldRenderers/file/File.d.ts +15 -0
  220. package/admin/plugins/fieldRenderers/file/File.js +79 -0
  221. package/admin/plugins/fieldRenderers/file/fileField.d.ts +3 -0
  222. package/admin/plugins/fieldRenderers/file/fileField.js +64 -0
  223. package/admin/plugins/fieldRenderers/file/fileFields.d.ts +3 -0
  224. package/admin/plugins/fieldRenderers/file/fileFields.js +125 -0
  225. package/admin/plugins/fieldRenderers/file/index.d.ts +2 -0
  226. package/admin/plugins/fieldRenderers/file/index.js +3 -0
  227. package/admin/plugins/fieldRenderers/file/utils.d.ts +7 -0
  228. package/admin/plugins/fieldRenderers/file/utils.js +51 -0
  229. package/admin/plugins/fieldRenderers/longText/index.d.ts +2 -0
  230. package/admin/plugins/fieldRenderers/longText/index.js +3 -0
  231. package/admin/plugins/fieldRenderers/longText/longText.d.ts +3 -0
  232. package/admin/plugins/fieldRenderers/longText/longText.js +36 -0
  233. package/admin/plugins/fieldRenderers/longText/longTexts.d.ts +3 -0
  234. package/admin/plugins/fieldRenderers/longText/longTexts.js +43 -0
  235. package/admin/plugins/fieldRenderers/number/index.d.ts +2 -0
  236. package/admin/plugins/fieldRenderers/number/index.js +3 -0
  237. package/admin/plugins/fieldRenderers/number/numberInput.d.ts +3 -0
  238. package/admin/plugins/fieldRenderers/number/numberInput.js +39 -0
  239. package/admin/plugins/fieldRenderers/number/numberInputs.d.ts +3 -0
  240. package/admin/plugins/fieldRenderers/number/numberInputs.js +50 -0
  241. package/admin/plugins/fieldRenderers/object/StyledComponents.d.ts +4 -0
  242. package/admin/plugins/fieldRenderers/object/StyledComponents.js +5 -0
  243. package/admin/plugins/fieldRenderers/object/index.d.ts +2 -0
  244. package/admin/plugins/fieldRenderers/object/index.js +3 -0
  245. package/admin/plugins/fieldRenderers/object/multipleObjects.d.ts +3 -0
  246. package/admin/plugins/fieldRenderers/object/multipleObjects.js +72 -0
  247. package/admin/plugins/fieldRenderers/object/singleObject.d.ts +3 -0
  248. package/admin/plugins/fieldRenderers/object/singleObject.js +45 -0
  249. package/admin/plugins/fieldRenderers/radioButtons.d.ts +3 -0
  250. package/admin/plugins/fieldRenderers/radioButtons.js +45 -0
  251. package/admin/plugins/fieldRenderers/ref/components/ContentEntriesAutocomplete.d.ts +6 -0
  252. package/admin/plugins/fieldRenderers/ref/components/ContentEntriesAutocomplete.js +54 -0
  253. package/admin/plugins/fieldRenderers/ref/components/ContentEntriesMultiAutoComplete.d.ts +6 -0
  254. package/admin/plugins/fieldRenderers/ref/components/ContentEntriesMultiAutoComplete.js +65 -0
  255. package/admin/plugins/fieldRenderers/ref/components/getOptions.d.ts +1 -0
  256. package/admin/plugins/fieldRenderers/ref/components/getOptions.js +21 -0
  257. package/admin/plugins/fieldRenderers/ref/components/graphql.d.ts +4 -0
  258. package/admin/plugins/fieldRenderers/ref/components/graphql.js +10 -0
  259. package/admin/plugins/fieldRenderers/ref/components/renderItem.d.ts +2 -0
  260. package/admin/plugins/fieldRenderers/ref/components/renderItem.js +14 -0
  261. package/admin/plugins/fieldRenderers/ref/components/useReference.d.ts +22 -0
  262. package/admin/plugins/fieldRenderers/ref/components/useReference.js +240 -0
  263. package/admin/plugins/fieldRenderers/ref/components/useReferences.d.ts +19 -0
  264. package/admin/plugins/fieldRenderers/ref/components/useReferences.js +180 -0
  265. package/admin/plugins/fieldRenderers/ref/index.d.ts +2 -0
  266. package/admin/plugins/fieldRenderers/ref/index.js +3 -0
  267. package/admin/plugins/fieldRenderers/ref/refInput.d.ts +3 -0
  268. package/admin/plugins/fieldRenderers/ref/refInput.js +30 -0
  269. package/admin/plugins/fieldRenderers/ref/refInputs.d.ts +3 -0
  270. package/admin/plugins/fieldRenderers/ref/refInputs.js +37 -0
  271. package/admin/plugins/fieldRenderers/richText/index.d.ts +2 -0
  272. package/admin/plugins/fieldRenderers/richText/index.js +3 -0
  273. package/admin/plugins/fieldRenderers/richText/richTextInput.d.ts +3 -0
  274. package/admin/plugins/fieldRenderers/richText/richTextInput.js +50 -0
  275. package/admin/plugins/fieldRenderers/richText/richTextInputs.d.ts +3 -0
  276. package/admin/plugins/fieldRenderers/richText/richTextInputs.js +79 -0
  277. package/admin/plugins/fieldRenderers/select.d.ts +3 -0
  278. package/admin/plugins/fieldRenderers/select.js +34 -0
  279. package/admin/plugins/fieldRenderers/text/index.d.ts +2 -0
  280. package/admin/plugins/fieldRenderers/text/index.js +3 -0
  281. package/admin/plugins/fieldRenderers/text/textInput.d.ts +3 -0
  282. package/admin/plugins/fieldRenderers/text/textInput.js +35 -0
  283. package/admin/plugins/fieldRenderers/text/textInputs.d.ts +3 -0
  284. package/admin/plugins/fieldRenderers/text/textInputs.js +46 -0
  285. package/admin/plugins/fieldValidators/date/availableValidators.d.ts +1 -0
  286. package/admin/plugins/fieldValidators/date/availableValidators.js +11 -0
  287. package/admin/plugins/fieldValidators/date/createDateInputField.d.ts +3 -0
  288. package/admin/plugins/fieldValidators/date/createDateInputField.js +33 -0
  289. package/admin/plugins/fieldValidators/dateGte.d.ts +3 -0
  290. package/admin/plugins/fieldValidators/dateGte.js +40 -0
  291. package/admin/plugins/fieldValidators/dateLte.d.ts +3 -0
  292. package/admin/plugins/fieldValidators/dateLte.js +40 -0
  293. package/admin/plugins/fieldValidators/gte.d.ts +3 -0
  294. package/admin/plugins/fieldValidators/gte.js +27 -0
  295. package/admin/plugins/fieldValidators/in.d.ts +3 -0
  296. package/admin/plugins/fieldValidators/in.js +26 -0
  297. package/admin/plugins/fieldValidators/lte.d.ts +3 -0
  298. package/admin/plugins/fieldValidators/lte.js +27 -0
  299. package/admin/plugins/fieldValidators/maxLength.d.ts +3 -0
  300. package/admin/plugins/fieldValidators/maxLength.js +27 -0
  301. package/admin/plugins/fieldValidators/minLength.d.ts +3 -0
  302. package/admin/plugins/fieldValidators/minLength.js +27 -0
  303. package/admin/plugins/fieldValidators/pattern.d.ts +3 -0
  304. package/admin/plugins/fieldValidators/pattern.js +74 -0
  305. package/admin/plugins/fieldValidators/patternPlugins/email.d.ts +3 -0
  306. package/admin/plugins/fieldValidators/patternPlugins/email.js +9 -0
  307. package/admin/plugins/fieldValidators/patternPlugins/lowerCase.d.ts +3 -0
  308. package/admin/plugins/fieldValidators/patternPlugins/lowerCase.js +9 -0
  309. package/admin/plugins/fieldValidators/patternPlugins/upperCase.d.ts +3 -0
  310. package/admin/plugins/fieldValidators/patternPlugins/upperCase.js +9 -0
  311. package/admin/plugins/fieldValidators/patternPlugins/url.d.ts +3 -0
  312. package/admin/plugins/fieldValidators/patternPlugins/url.js +9 -0
  313. package/admin/plugins/fieldValidators/required.d.ts +3 -0
  314. package/admin/plugins/fieldValidators/required.js +10 -0
  315. package/admin/plugins/fields/PredefinedValuesDynamicFieldset.d.ts +6 -0
  316. package/admin/plugins/fields/PredefinedValuesDynamicFieldset.js +108 -0
  317. package/admin/plugins/fields/boolean.d.ts +3 -0
  318. package/admin/plugins/fields/boolean.js +31 -0
  319. package/admin/plugins/fields/dateTime.d.ts +3 -0
  320. package/admin/plugins/fields/dateTime.js +77 -0
  321. package/admin/plugins/fields/file.d.ts +3 -0
  322. package/admin/plugins/fields/file.js +46 -0
  323. package/admin/plugins/fields/icons/ballot_black_24dp.svg +1 -0
  324. package/admin/plugins/fields/icons/dropdown-icon.svg +16 -0
  325. package/admin/plugins/fields/icons/notes-black-24px.svg +1 -0
  326. package/admin/plugins/fields/icons/round-check_box-24px.svg +4 -0
  327. package/admin/plugins/fields/icons/round-link-24px.svg +1 -0
  328. package/admin/plugins/fields/icons/round-looks_3-24px.svg +4 -0
  329. package/admin/plugins/fields/icons/round-notes.svg +1 -0
  330. package/admin/plugins/fields/icons/round-radio_button_checked-24px.svg +5 -0
  331. package/admin/plugins/fields/icons/round-short_text.svg +1 -0
  332. package/admin/plugins/fields/icons/round-subject.svg +1 -0
  333. package/admin/plugins/fields/icons/round-text_fields-24px.svg +4 -0
  334. package/admin/plugins/fields/icons/round-visibility_off-24px.svg +4 -0
  335. package/admin/plugins/fields/icons/round_insert_drive_file-24px.svg +1 -0
  336. package/admin/plugins/fields/icons/schedule-black-24px.svg +1 -0
  337. package/admin/plugins/fields/icons/title-black-24px.svg +1 -0
  338. package/admin/plugins/fields/icons/toggle_on-black-24px.svg +1 -0
  339. package/admin/plugins/fields/longText.d.ts +3 -0
  340. package/admin/plugins/fields/longText.js +46 -0
  341. package/admin/plugins/fields/number.d.ts +3 -0
  342. package/admin/plugins/fields/number.js +63 -0
  343. package/admin/plugins/fields/object/ObjectFields.d.ts +4 -0
  344. package/admin/plugins/fields/object/ObjectFields.js +32 -0
  345. package/admin/plugins/fields/object.d.ts +3 -0
  346. package/admin/plugins/fields/object.js +46 -0
  347. package/admin/plugins/fields/ref.d.ts +3 -0
  348. package/admin/plugins/fields/ref.js +144 -0
  349. package/admin/plugins/fields/richText.d.ts +3 -0
  350. package/admin/plugins/fields/richText.js +45 -0
  351. package/admin/plugins/fields/text.d.ts +3 -0
  352. package/admin/plugins/fields/text.js +51 -0
  353. package/admin/plugins/getObjectId.d.ts +3 -0
  354. package/admin/plugins/getObjectId.js +13 -0
  355. package/admin/plugins/icons.d.ts +3 -0
  356. package/admin/plugins/icons.js +40 -0
  357. package/admin/plugins/index.d.ts +13 -0
  358. package/admin/plugins/index.js +14 -0
  359. package/admin/plugins/install.d.ts +3 -0
  360. package/admin/plugins/install.js +127 -0
  361. package/admin/plugins/menus/CmsMenuLoader.d.ts +7 -0
  362. package/admin/plugins/menus/CmsMenuLoader.js +76 -0
  363. package/admin/plugins/menus/ContentGroupsMenuItems.d.ts +6 -0
  364. package/admin/plugins/menus/ContentGroupsMenuItems.js +154 -0
  365. package/admin/plugins/menus/GlobalSearchPlugins.d.ts +8 -0
  366. package/admin/plugins/menus/GlobalSearchPlugins.js +53 -0
  367. package/admin/plugins/menus.d.ts +4 -0
  368. package/admin/plugins/menus.js +19 -0
  369. package/admin/plugins/permissionRenderer/CmsPermissions.d.ts +5 -0
  370. package/admin/plugins/permissionRenderer/CmsPermissions.js +340 -0
  371. package/admin/plugins/permissionRenderer/components/ContentEntryPermission.d.ts +8 -0
  372. package/admin/plugins/permissionRenderer/components/ContentEntryPermission.js +117 -0
  373. package/admin/plugins/permissionRenderer/components/ContentModelGroupPermission.d.ts +9 -0
  374. package/admin/plugins/permissionRenderer/components/ContentModelGroupPermission.js +77 -0
  375. package/admin/plugins/permissionRenderer/components/ContentModelList.d.ts +7 -0
  376. package/admin/plugins/permissionRenderer/components/ContentModelList.js +53 -0
  377. package/admin/plugins/permissionRenderer/components/ContentModelPermission.d.ts +10 -0
  378. package/admin/plugins/permissionRenderer/components/ContentModelPermission.js +104 -0
  379. package/admin/plugins/permissionRenderer/components/PermissionRendererWrapper.d.ts +5 -0
  380. package/admin/plugins/permissionRenderer/components/PermissionRendererWrapper.js +28 -0
  381. package/admin/plugins/permissionRenderer/components/PermissionSelector.d.ts +34 -0
  382. package/admin/plugins/permissionRenderer/components/PermissionSelector.js +66 -0
  383. package/admin/plugins/permissionRenderer/components/StyledComponents.d.ts +2 -0
  384. package/admin/plugins/permissionRenderer/components/StyledComponents.js +10 -0
  385. package/admin/plugins/permissionRenderer/components/useCmsData.d.ts +1 -0
  386. package/admin/plugins/permissionRenderer/components/useCmsData.js +79 -0
  387. package/admin/plugins/permissionRenderer/index.d.ts +3 -0
  388. package/admin/plugins/permissionRenderer/index.js +16 -0
  389. package/admin/plugins/routes.d.ts +3 -0
  390. package/admin/plugins/routes.js +88 -0
  391. package/admin/plugins/transformers/dateTransformer.d.ts +3 -0
  392. package/admin/plugins/transformers/dateTransformer.js +44 -0
  393. package/admin/plugins/transformers/index.d.ts +3 -0
  394. package/admin/plugins/transformers/index.js +5 -0
  395. package/admin/plugins/transformers/numberTransformer.d.ts +3 -0
  396. package/admin/plugins/transformers/numberTransformer.js +14 -0
  397. package/admin/plugins/upgrades/v5.0.0.d.ts +5 -0
  398. package/admin/plugins/upgrades/v5.0.0.js +85 -0
  399. package/admin/plugins/upgrades/v5.5.0.d.ts +5 -0
  400. package/admin/plugins/upgrades/v5.5.0.js +85 -0
  401. package/admin/plugins/upgrades/v5.8.0.d.ts +5 -0
  402. package/admin/plugins/upgrades/v5.8.0.js +85 -0
  403. package/admin/plugins/validators/dateGte.d.ts +3 -0
  404. package/admin/plugins/validators/dateGte.js +23 -0
  405. package/admin/plugins/validators/dateLte.d.ts +3 -0
  406. package/admin/plugins/validators/dateLte.js +23 -0
  407. package/admin/plugins/validators/gte.d.ts +3 -0
  408. package/admin/plugins/validators/gte.js +15 -0
  409. package/admin/plugins/validators/in.d.ts +3 -0
  410. package/admin/plugins/validators/in.js +15 -0
  411. package/admin/plugins/validators/lte.d.ts +3 -0
  412. package/admin/plugins/validators/lte.js +15 -0
  413. package/admin/plugins/validators/maxLength.d.ts +3 -0
  414. package/admin/plugins/validators/maxLength.js +15 -0
  415. package/admin/plugins/validators/minLength.d.ts +3 -0
  416. package/admin/plugins/validators/minLength.js +15 -0
  417. package/admin/plugins/validators/pattern.d.ts +9 -0
  418. package/admin/plugins/validators/pattern.js +34 -0
  419. package/admin/plugins/validators/patternPlugins/email.d.ts +10 -0
  420. package/admin/plugins/validators/patternPlugins/email.js +9 -0
  421. package/admin/plugins/validators/patternPlugins/lowerCase.d.ts +10 -0
  422. package/admin/plugins/validators/patternPlugins/lowerCase.js +9 -0
  423. package/admin/plugins/validators/patternPlugins/upperCase.d.ts +10 -0
  424. package/admin/plugins/validators/patternPlugins/upperCase.js +9 -0
  425. package/admin/plugins/validators/patternPlugins/url.d.ts +10 -0
  426. package/admin/plugins/validators/patternPlugins/url.js +9 -0
  427. package/admin/plugins/validators/required.d.ts +3 -0
  428. package/admin/plugins/validators/required.js +11 -0
  429. package/admin/plugins/validators/timeGte.d.ts +3 -0
  430. package/admin/plugins/validators/timeGte.js +19 -0
  431. package/admin/plugins/validators/timeLte.d.ts +3 -0
  432. package/admin/plugins/validators/timeLte.js +19 -0
  433. package/admin/plugins/welcomeScreenWidget.d.ts +3 -0
  434. package/admin/plugins/welcomeScreenWidget.js +29 -0
  435. package/admin/views/contentEntries/ContentEntries.d.ts +3 -0
  436. package/admin/views/contentEntries/ContentEntries.js +73 -0
  437. package/admin/views/contentEntries/ContentEntriesContext.d.ts +24 -0
  438. package/admin/views/contentEntries/ContentEntriesContext.js +78 -0
  439. package/admin/views/contentEntries/ContentEntriesList.d.ts +3 -0
  440. package/admin/views/contentEntries/ContentEntriesList.js +180 -0
  441. package/admin/views/contentEntries/ContentEntry/ContentEntryContext.d.ts +28 -0
  442. package/admin/views/contentEntries/ContentEntry/ContentEntryContext.js +113 -0
  443. package/admin/views/contentEntries/ContentEntry/RevisionListItem.d.ts +7 -0
  444. package/admin/views/contentEntries/ContentEntry/RevisionListItem.js +152 -0
  445. package/admin/views/contentEntries/ContentEntry/RevisionsList.d.ts +3 -0
  446. package/admin/views/contentEntries/ContentEntry/RevisionsList.js +59 -0
  447. package/admin/views/contentEntries/ContentEntry/cache.d.ts +7 -0
  448. package/admin/views/contentEntries/ContentEntry/cache.js +183 -0
  449. package/admin/views/contentEntries/ContentEntry/header/Header.d.ts +3 -0
  450. package/admin/views/contentEntries/ContentEntry/header/Header.js +32 -0
  451. package/admin/views/contentEntries/ContentEntry/header/contentFormOptionsMenu/ContentFormOptionsMenu.d.ts +3 -0
  452. package/admin/views/contentEntries/ContentEntry/header/contentFormOptionsMenu/ContentFormOptionsMenu.js +141 -0
  453. package/admin/views/contentEntries/ContentEntry/header/index.d.ts +3 -0
  454. package/admin/views/contentEntries/ContentEntry/header/index.js +45 -0
  455. package/admin/views/contentEntries/ContentEntry/header/requestChanges/RequestChanges.d.ts +3 -0
  456. package/admin/views/contentEntries/ContentEntry/header/requestChanges/RequestChanges.js +67 -0
  457. package/admin/views/contentEntries/ContentEntry/header/requestChanges/rule-24px.svg +1 -0
  458. package/admin/views/contentEntries/ContentEntry/header/requestReview/RequestReview.d.ts +3 -0
  459. package/admin/views/contentEntries/ContentEntry/header/requestReview/RequestReview.js +69 -0
  460. package/admin/views/contentEntries/ContentEntry/header/requestReview/emoji_people-24px.svg +1 -0
  461. package/admin/views/contentEntries/ContentEntry/header/revisionSelector/RevisionSelector.d.ts +3 -0
  462. package/admin/views/contentEntries/ContentEntry/header/revisionSelector/RevisionSelector.js +75 -0
  463. package/admin/views/contentEntries/ContentEntry/header/saveAndPublishContent/SaveAndPublishContent.d.ts +3 -0
  464. package/admin/views/contentEntries/ContentEntry/header/saveAndPublishContent/SaveAndPublishContent.js +84 -0
  465. package/admin/views/contentEntries/ContentEntry/header/saveContent/SaveContent.d.ts +3 -0
  466. package/admin/views/contentEntries/ContentEntry/header/saveContent/SaveContent.js +32 -0
  467. package/admin/views/contentEntries/ContentEntry/prepareFormData.d.ts +2 -0
  468. package/admin/views/contentEntries/ContentEntry/prepareFormData.js +79 -0
  469. package/admin/views/contentEntries/ContentEntry/useRevision.d.ts +13 -0
  470. package/admin/views/contentEntries/ContentEntry/useRevision.js +335 -0
  471. package/admin/views/contentEntries/ContentEntry.d.ts +12 -0
  472. package/admin/views/contentEntries/ContentEntry.js +99 -0
  473. package/admin/views/contentEntries/hooks/useContentEntries.d.ts +1 -0
  474. package/admin/views/contentEntries/hooks/useContentEntries.js +5 -0
  475. package/admin/views/contentEntries/hooks/useContentEntriesList.d.ts +21 -0
  476. package/admin/views/contentEntries/hooks/useContentEntriesList.js +152 -0
  477. package/admin/views/contentEntries/hooks/useContentEntry.d.ts +1 -0
  478. package/admin/views/contentEntries/hooks/useContentEntry.js +5 -0
  479. package/admin/views/contentModelGroups/ContentModelGroups.d.ts +3 -0
  480. package/admin/views/contentModelGroups/ContentModelGroups.js +35 -0
  481. package/admin/views/contentModelGroups/ContentModelGroupsDataList.d.ts +6 -0
  482. package/admin/views/contentModelGroups/ContentModelGroupsDataList.js +242 -0
  483. package/admin/views/contentModelGroups/ContentModelGroupsForm.d.ts +6 -0
  484. package/admin/views/contentModelGroups/ContentModelGroupsForm.js +231 -0
  485. package/admin/views/contentModelGroups/DelayedOnChange.d.ts +25 -0
  486. package/admin/views/contentModelGroups/DelayedOnChange.js +134 -0
  487. package/admin/views/contentModelGroups/IconPicker.d.ts +7 -0
  488. package/admin/views/contentModelGroups/IconPicker.js +204 -0
  489. package/admin/views/contentModelGroups/graphql.d.ts +5 -0
  490. package/admin/views/contentModelGroups/graphql.js +11 -0
  491. package/admin/views/contentModels/ContentModelEditor.d.ts +2 -0
  492. package/admin/views/contentModels/ContentModelEditor.js +35 -0
  493. package/admin/views/contentModels/ContentModels.d.ts +3 -0
  494. package/admin/views/contentModels/ContentModels.js +82 -0
  495. package/admin/views/contentModels/ContentModelsDataList.d.ts +7 -0
  496. package/admin/views/contentModels/ContentModelsDataList.js +281 -0
  497. package/admin/views/contentModels/NewContentModelDialog.d.ts +8 -0
  498. package/admin/views/contentModels/NewContentModelDialog.js +196 -0
  499. package/admin/views/contentModels/cache.d.ts +5 -0
  500. package/admin/views/contentModels/cache.js +68 -0
  501. package/admin/views/utils.d.ts +2 -0
  502. package/admin/views/utils.js +27 -0
  503. package/admin/viewsGraphql.d.ts +4 -0
  504. package/admin/viewsGraphql.js +12 -0
  505. package/package.json +109 -0
  506. package/types.d.ts +484 -0
  507. package/types.js +1 -0
@@ -0,0 +1,46 @@
1
+ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
+
3
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
4
+
5
+ import React from "react";
6
+ import { ReactComponent as FileIcon } from "@svgr/webpack!./icons/round_insert_drive_file-24px.svg";
7
+ import { i18n } from "@webiny/app/i18n";
8
+ import { Cell, Grid } from "@webiny/ui/Grid";
9
+ import { Radio } from "@webiny/ui/Radio";
10
+ var t = i18n.ns("app-headless-cms/admin/fields");
11
+ var plugin = {
12
+ type: "cms-editor-field-type",
13
+ name: "cms-editor-field-type-file",
14
+ field: {
15
+ type: "file",
16
+ label: t(_templateObject || (_templateObject = _taggedTemplateLiteral(["Files"]))),
17
+ description: t(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["Images, videos and other files."]))),
18
+ icon: /*#__PURE__*/React.createElement(FileIcon, null),
19
+ validators: ["required"],
20
+ listValidators: ["minLength", "maxLength"],
21
+ allowMultipleValues: true,
22
+ allowPredefinedValues: false,
23
+ multipleValuesLabel: t(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["Use as a list of files or an image gallery"]))),
24
+ createField: function createField() {
25
+ return {
26
+ type: this.type,
27
+ validation: [],
28
+ renderer: {
29
+ name: ""
30
+ }
31
+ };
32
+ },
33
+ renderSettings: function renderSettings(_ref) {
34
+ var Bind = _ref.form.Bind;
35
+ return /*#__PURE__*/React.createElement(Grid, null, /*#__PURE__*/React.createElement(Cell, {
36
+ span: 12
37
+ }, /*#__PURE__*/React.createElement(Bind, {
38
+ name: "settings.imagesOnly"
39
+ }, /*#__PURE__*/React.createElement(Radio, {
40
+ label: t(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["Images only"]))),
41
+ description: t(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["Allow only images to be selected"])))
42
+ }))));
43
+ }
44
+ }
45
+ };
46
+ export default plugin;
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M14 9.5h3c.55 0 1-.45 1-1s-.45-1-1-1h-3c-.55 0-1 .45-1 1s.45 1 1 1zm0 7h3c.55 0 1-.45 1-1s-.45-1-1-1h-3c-.55 0-1 .45-1 1s.45 1 1 1zm5 4.5H5c-1.1 0-2-.9-2-2V5c0-1.1.9-2 2-2h14c1.1 0 2 .9 2 2v14c0 1.1-.9 2-2 2zM7 11h3c.55 0 1-.45 1-1V7c0-.55-.45-1-1-1H7c-.55 0-1 .45-1 1v3c0 .55.45 1 1 1zm0-4h3v3H7V7zm0 11h3c.55 0 1-.45 1-1v-3c0-.55-.45-1-1-1H7c-.55 0-1 .45-1 1v3c0 .55.45 1 1 1zm0-4h3v3H7v-3z"/></svg>
@@ -0,0 +1,16 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <svg width="815px" height="815px" viewBox="0 0 815 815" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
3
+ <!-- Generator: Sketch 55.2 (78181) - https://sketchapp.com -->
4
+ <title>input</title>
5
+ <desc>Created with Sketch.</desc>
6
+ <g id="Form-Icons" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
7
+ <g id="Artboard">
8
+ <g id="input">
9
+ <polygon id="Path" stroke="none" points="0 0 815 0 815 815 0 815"></polygon>
10
+ <rect id="Rectangle" stroke="currentColor" stroke-width="50" x="57" y="282" width="700" height="250" rx="8"></rect>
11
+ <path d="M524,329 L524,503" id="Line" stroke="currentColor" stroke-width="50" stroke-linecap="square"></path>
12
+ <path d="M594.839903,408.340773 L628.384973,442.178552 C633.436161,447.273816 641.595772,447.273816 646.646961,442.178552 L680.19203,408.340773 C688.351642,400.109962 682.523348,386 670.996278,386 L603.906138,386 C592.379067,386 586.680291,400.109962 594.839903,408.340773 Z" id="Path" fill="currentColor" fill-rule="nonzero"></path>
13
+ </g>
14
+ </g>
15
+ </g>
16
+ </svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="black" width="24px" height="24px"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M20 11H4c-.55 0-1 .45-1 1s.45 1 1 1h16c.55 0 1-.45 1-1s-.45-1-1-1zM4 18h10c.55 0 1-.45 1-1s-.45-1-1-1H4c-.55 0-1 .45-1 1s.45 1 1 1zM20 6H4c-.55 0-1 .45-1 1v.01c0 .55.45 1 1 1h16c.55 0 1-.45 1-1V7c0-.55-.45-1-1-1z"/></svg>
@@ -0,0 +1,4 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" viewBox="0 0 24 24">
2
+ <path fill="none" d="M0 0h24v24H0V0z"/>
3
+ <path fill="currentColor" d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-8.29 13.29c-.39.39-1.02.39-1.41 0L5.71 12.7c-.39-.39-.39-1.02 0-1.41.39-.39 1.02-.39 1.41 0L10 14.17l6.88-6.88c.39-.39 1.02-.39 1.41 0 .39.39.39 1.02 0 1.41l-7.58 7.59z"/>
4
+ </svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="black" width="24px" height="24px"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M17 7h-3c-.55 0-1 .45-1 1s.45 1 1 1h3c1.65 0 3 1.35 3 3s-1.35 3-3 3h-3c-.55 0-1 .45-1 1s.45 1 1 1h3c2.76 0 5-2.24 5-5s-2.24-5-5-5zm-9 5c0 .55.45 1 1 1h6c.55 0 1-.45 1-1s-.45-1-1-1H9c-.55 0-1 .45-1 1zm2 3H7c-1.65 0-3-1.35-3-3s1.35-3 3-3h3c.55 0 1-.45 1-1s-.45-1-1-1H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h3c.55 0 1-.45 1-1s-.45-1-1-1z"/></svg>
@@ -0,0 +1,4 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" viewBox="0 0 24 24">
2
+ <path fill="none" d="M0 0h24v24H0V0z"/>
3
+ <path fill="currentColor" d="M19 3H5.01c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2H19c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-3.99 7.5c0 .83-.67 1.5-1.5 1.5.83 0 1.5.67 1.5 1.5V15c0 1.11-.9 2-2 2H10c-.55 0-1-.45-1-1s.45-1 1-1h3.01L13 13h-1c-.55 0-1-.45-1-1s.45-1 1-1h1l.01-2H10c-.55 0-.99-.45-.99-1s.44-1 .99-1h3.01c1.1 0 2 .9 2 2v1.5z"/>
4
+ </svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="black" width="24px" height="24px"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M20 11H4c-.55 0-1 .45-1 1s.45 1 1 1h16c.55 0 1-.45 1-1s-.45-1-1-1zM4 18h10c.55 0 1-.45 1-1s-.45-1-1-1H4c-.55 0-1 .45-1 1s.45 1 1 1zM20 6H4c-.55 0-1 .45-1 1v.01c0 .55.45 1 1 1h16c.55 0 1-.45 1-1V7c0-.55-.45-1-1-1z"/></svg>
@@ -0,0 +1,5 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" viewBox="0 0 24 24">
2
+ <path fill="none" d="M0 0h24v24H0V0z"/>
3
+ <path fill="currentColor" d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"/>
4
+ <circle fill="currentColor" cx="12" cy="12" r="5"/>
5
+ </svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="black" width="24px" height="24px"><path d="M0 0h24v24H0z" fill="none"/><path d="M5 9h14c.55 0 1 .45 1 1s-.45 1-1 1H5c-.55 0-1-.45-1-1s.45-1 1-1zm0 4h8c.55 0 1 .45 1 1s-.45 1-1 1H5c-.55 0-1-.45-1-1s.45-1 1-1z"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="black" width="24px" height="24px"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M13 17H5c-.55 0-1 .45-1 1s.45 1 1 1h8c.55 0 1-.45 1-1s-.45-1-1-1zm6-8H5c-.55 0-1 .45-1 1s.45 1 1 1h14c.55 0 1-.45 1-1s-.45-1-1-1zM5 15h14c.55 0 1-.45 1-1s-.45-1-1-1H5c-.55 0-1 .45-1 1s.45 1 1 1zM4 6c0 .55.45 1 1 1h14c.55 0 1-.45 1-1s-.45-1-1-1H5c-.55 0-1 .45-1 1z"/></svg>
@@ -0,0 +1,4 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" viewBox="0 0 24 24">
2
+ <path fill="none" d="M0 0h24v24H0z"/>
3
+ <path fill="currentColor" d="M2.5 5.5C2.5 6.33 3.17 7 4 7h3.5v10.5c0 .83.67 1.5 1.5 1.5s1.5-.67 1.5-1.5V7H14c.83 0 1.5-.67 1.5-1.5S14.83 4 14 4H4c-.83 0-1.5.67-1.5 1.5zM20 9h-6c-.83 0-1.5.67-1.5 1.5S13.17 12 14 12h1.5v5.5c0 .83.67 1.5 1.5 1.5s1.5-.67 1.5-1.5V12H20c.83 0 1.5-.67 1.5-1.5S20.83 9 20 9z"/>
4
+ </svg>
@@ -0,0 +1,4 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" viewBox="0 0 24 24">
2
+ <path fill="none" d="M0 0h24v24H0V0zm0 0h24v24H0V0zm0 0h24v24H0V0zm0 0h24v24H0V0z"/>
3
+ <path fill="currentColor" d="M12 6.5c2.76 0 5 2.24 5 5 0 .51-.1 1-.24 1.46l3.06 3.06c1.39-1.23 2.49-2.77 3.18-4.53C21.27 7.11 17 4 12 4c-1.27 0-2.49.2-3.64.57l2.17 2.17c.47-.14.96-.24 1.47-.24zM2.71 3.16c-.39.39-.39 1.02 0 1.41l1.97 1.97C3.06 7.83 1.77 9.53 1 11.5 2.73 15.89 7 19 12 19c1.52 0 2.97-.3 4.31-.82l2.72 2.72c.39.39 1.02.39 1.41 0 .39-.39.39-1.02 0-1.41L4.13 3.16c-.39-.39-1.03-.39-1.42 0zM12 16.5c-2.76 0-5-2.24-5-5 0-.77.18-1.5.49-2.14l1.57 1.57c-.03.18-.06.37-.06.57 0 1.66 1.34 3 3 3 .2 0 .38-.03.57-.07L14.14 16c-.65.32-1.37.5-2.14.5zm2.97-5.33c-.15-1.4-1.25-2.49-2.64-2.64l2.64 2.64z"/>
4
+ </svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="black" width="24px" height="24px"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M6 2c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8.83c0-.53-.21-1.04-.59-1.41l-4.83-4.83c-.37-.38-.88-.59-1.41-.59H6zm7 6V3.5L18.5 9H14c-.55 0-1-.45-1-1z"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="black" width="24px" height="24px"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm-.22-13h-.06c-.4 0-.72.32-.72.72v4.72c0 .35.18.68.49.86l4.15 2.49c.34.2.78.1.98-.24.21-.34.1-.79-.25-.99l-3.87-2.3V7.72c0-.4-.32-.72-.72-.72z"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="black" width="24px" height="24px"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M5 5.5C5 6.33 5.67 7 6.5 7h4v10.5c0 .83.67 1.5 1.5 1.5s1.5-.67 1.5-1.5V7h4c.83 0 1.5-.67 1.5-1.5S18.33 4 17.5 4h-11C5.67 4 5 4.67 5 5.5z"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="black" width="24px" height="24px"><path d="M0 0h24v24H0z" fill="none"/><path d="M17 7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h10c2.76 0 5-2.24 5-5s-2.24-5-5-5zm0 8c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3z"/></svg>
@@ -0,0 +1,3 @@
1
+ import { CmsEditorFieldTypePlugin } from "../../../types";
2
+ declare const plugin: CmsEditorFieldTypePlugin;
3
+ export default plugin;
@@ -0,0 +1,46 @@
1
+ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
+
3
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
4
+
5
+ import React from "react";
6
+ import { ReactComponent as LongTextIcon } from "@svgr/webpack!./icons/round-notes.svg";
7
+ import { Grid, Cell } from "@webiny/ui/Grid";
8
+ import { Input } from "@webiny/ui/Input";
9
+ import { i18n } from "@webiny/app/i18n";
10
+ var t = i18n.ns("app-headless-cms/admin/fields");
11
+ var plugin = {
12
+ type: "cms-editor-field-type",
13
+ name: "cms-editor-field-type-long-text",
14
+ field: {
15
+ type: "long-text",
16
+ validators: ["required", "minLength", "maxLength", "pattern"],
17
+ label: t(_templateObject || (_templateObject = _taggedTemplateLiteral(["Long text"]))),
18
+ description: t(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["Long comments, notes, multi line values."]))),
19
+ icon: /*#__PURE__*/React.createElement(LongTextIcon, null),
20
+ allowMultipleValues: true,
21
+ allowPredefinedValues: false,
22
+ // TODO: implement "renderPredefinedValues" and set to true.
23
+ multipleValuesLabel: t(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["Use as a list of long texts"]))),
24
+ createField: function createField() {
25
+ return {
26
+ type: this.type,
27
+ validation: [],
28
+ renderer: {
29
+ name: ""
30
+ }
31
+ };
32
+ },
33
+ renderSettings: function renderSettings(_ref) {
34
+ var Bind = _ref.form.Bind;
35
+ return /*#__PURE__*/React.createElement(Grid, null, /*#__PURE__*/React.createElement(Cell, {
36
+ span: 12
37
+ }, /*#__PURE__*/React.createElement(Bind, {
38
+ name: "placeholderText"
39
+ }, /*#__PURE__*/React.createElement(Input, {
40
+ label: t(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["Placeholder text"]))),
41
+ description: t(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["Placeholder text (optional)"])))
42
+ }))));
43
+ }
44
+ }
45
+ };
46
+ export default plugin;
@@ -0,0 +1,3 @@
1
+ import { CmsEditorFieldTypePlugin } from "../../../types";
2
+ declare const plugin: CmsEditorFieldTypePlugin;
3
+ export default plugin;
@@ -0,0 +1,63 @@
1
+ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
+
3
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6;
4
+
5
+ import React from "react";
6
+ import { Grid, Cell } from "@webiny/ui/Grid";
7
+ import { i18n } from "@webiny/app/i18n";
8
+ import { Input } from "@webiny/ui/Input";
9
+ import PredefinedValuesDynamicFieldset from "./PredefinedValuesDynamicFieldset";
10
+ import { ReactComponent as FloatIcon } from "@svgr/webpack!./icons/round-looks_3-24px.svg";
11
+ var t = i18n.ns("app-headless-cms/admin/fields");
12
+ var plugin = {
13
+ type: "cms-editor-field-type",
14
+ name: "cms-editor-field-type-number",
15
+ field: {
16
+ type: "number",
17
+ label: t(_templateObject || (_templateObject = _taggedTemplateLiteral(["Number"]))),
18
+ description: t(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["Store numbers."]))),
19
+ icon: /*#__PURE__*/React.createElement(FloatIcon, null),
20
+ validators: ["required", "gte", "lte"],
21
+ allowMultipleValues: true,
22
+ allowPredefinedValues: true,
23
+ multipleValuesLabel: t(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["Use as a list of numbers"]))),
24
+ createField: function createField() {
25
+ return {
26
+ type: this.type,
27
+ validation: [],
28
+ renderer: {
29
+ name: ""
30
+ }
31
+ };
32
+ },
33
+ renderSettings: function renderSettings(_ref) {
34
+ var Bind = _ref.form.Bind;
35
+ return /*#__PURE__*/React.createElement(Grid, null, /*#__PURE__*/React.createElement(Cell, {
36
+ span: 12
37
+ }, /*#__PURE__*/React.createElement(Bind, {
38
+ name: "placeholderText"
39
+ }, /*#__PURE__*/React.createElement(Input, {
40
+ label: t(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["Placeholder text"]))),
41
+ description: t(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["Placeholder text (optional)"])))
42
+ }))));
43
+ },
44
+ renderPredefinedValues: function renderPredefinedValues(props) {
45
+ return /*#__PURE__*/React.createElement(PredefinedValuesDynamicFieldset, Object.assign({}, props, {
46
+ renderValueInput: function renderValueInput(Bind) {
47
+ return /*#__PURE__*/React.createElement(Bind, {
48
+ name: "value"
49
+ }, function (bind) {
50
+ return /*#__PURE__*/React.createElement(Input, Object.assign({}, bind, {
51
+ type: "number",
52
+ label: t(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["Value"]))),
53
+ onChange: function onChange(value) {
54
+ return bind.onChange(parseFloat(value));
55
+ }
56
+ }));
57
+ });
58
+ }
59
+ }));
60
+ }
61
+ }
62
+ };
63
+ export default plugin;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ export declare const ObjectFields: ({ field }: {
3
+ field: any;
4
+ }) => JSX.Element;
@@ -0,0 +1,32 @@
1
+ import _objectSpread from "@babel/runtime/helpers/objectSpread2";
2
+ import React, { useCallback } from "react";
3
+ import { set } from "dot-prop-immutable";
4
+ import { FieldEditor, useFieldEditor } from "../../../components/FieldEditor";
5
+ export var ObjectFields = function ObjectFields(_ref) {
6
+ var field = _ref.field;
7
+
8
+ var _useFieldEditor = useFieldEditor(),
9
+ getField = _useFieldEditor.getField,
10
+ updateField = _useFieldEditor.updateField;
11
+
12
+ var onChange = useCallback(function (_ref2) {
13
+ var fields = _ref2.fields,
14
+ layout = _ref2.layout;
15
+ var currentField = getField({
16
+ id: field.id
17
+ });
18
+ var updatedField = set(currentField, "settings", function (settings) {
19
+ return _objectSpread(_objectSpread({}, settings), {}, {
20
+ fields: fields,
21
+ layout: layout
22
+ });
23
+ });
24
+ updateField(updatedField);
25
+ }, [field]);
26
+ return /*#__PURE__*/React.createElement(FieldEditor, {
27
+ parent: field,
28
+ fields: field.settings.fields,
29
+ layout: field.settings.layout,
30
+ onChange: onChange
31
+ });
32
+ };
@@ -0,0 +1,3 @@
1
+ import { CmsEditorFieldTypePlugin } from "../../../types";
2
+ declare const plugin: CmsEditorFieldTypePlugin;
3
+ export default plugin;
@@ -0,0 +1,46 @@
1
+ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
+
3
+ var _templateObject, _templateObject2, _templateObject3;
4
+
5
+ import React from "react";
6
+ import { ReactComponent as ObjectIcon } from "@svgr/webpack!./icons/ballot_black_24dp.svg";
7
+ import { i18n } from "@webiny/app/i18n";
8
+ import { ObjectFields } from "./object/ObjectFields";
9
+ import { createFieldsList } from "../../graphql/createFieldsList";
10
+ var t = i18n.ns("app-headless-cms/admin/fields");
11
+ var plugin = {
12
+ type: "cms-editor-field-type",
13
+ name: "cms-editor-field-type-object",
14
+ field: {
15
+ type: "object",
16
+ label: t(_templateObject || (_templateObject = _taggedTemplateLiteral(["Object"]))),
17
+ description: t(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["Store nested data structures."]))),
18
+ icon: /*#__PURE__*/React.createElement(ObjectIcon, null),
19
+ allowMultipleValues: true,
20
+ allowPredefinedValues: false,
21
+ multipleValuesLabel: t(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["Use as a repeatable object"]))),
22
+ createField: function createField() {
23
+ return {
24
+ type: this.type,
25
+ validation: [],
26
+ settings: {
27
+ fields: [],
28
+ layout: []
29
+ },
30
+ renderer: {
31
+ name: ""
32
+ }
33
+ };
34
+ },
35
+ render: function render(props) {
36
+ return /*#__PURE__*/React.createElement(ObjectFields, props);
37
+ },
38
+ graphql: {
39
+ queryField: function queryField(_ref) {
40
+ var field = _ref.field;
41
+ return "{ ".concat(createFieldsList(field.settings.fields), " }");
42
+ }
43
+ }
44
+ }
45
+ };
46
+ export default plugin;
@@ -0,0 +1,3 @@
1
+ import { CmsEditorFieldTypePlugin } from "../../../types";
2
+ declare const plugin: CmsEditorFieldTypePlugin;
3
+ export default plugin;
@@ -0,0 +1,144 @@
1
+ import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
2
+ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
3
+
4
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
5
+
6
+ import _regeneratorRuntime from "@babel/runtime/regenerator";
7
+ import React, { useCallback, useMemo } from "react";
8
+ import get from "lodash/get";
9
+ import { useQuery } from "../../hooks";
10
+ import { LIST_CONTENT_MODELS } from "../../viewsGraphql";
11
+ import { validation, ValidationError } from "@webiny/validation";
12
+ import { Cell, Grid } from "@webiny/ui/Grid";
13
+ import { MultiAutoComplete } from "@webiny/ui/AutoComplete";
14
+ import { CircularProgress } from "@webiny/ui/Progress";
15
+ import { useSnackbar } from "@webiny/app-admin/hooks/useSnackbar";
16
+ import { ReactComponent as RefIcon } from "@svgr/webpack!./icons/round-link-24px.svg";
17
+ import { i18n } from "@webiny/app/i18n";
18
+ var t = i18n.ns("app-headless-cms/admin/fields");
19
+ var plugin = {
20
+ type: "cms-editor-field-type",
21
+ name: "cms-editor-field-type-ref",
22
+ field: {
23
+ type: "ref",
24
+ validators: ["required"],
25
+ listValidators: ["minLength", "maxLength"],
26
+ label: t(_templateObject || (_templateObject = _taggedTemplateLiteral(["Reference"]))),
27
+ description: t(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["Reference existing content entries. For example, a book can reference one or more authors."]))),
28
+ icon: /*#__PURE__*/React.createElement(RefIcon, null),
29
+ allowMultipleValues: true,
30
+ allowPredefinedValues: false,
31
+ multipleValuesLabel: t(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["Use as a list of references"]))),
32
+ createField: function createField() {
33
+ return {
34
+ type: this.type,
35
+ settings: {
36
+ models: []
37
+ },
38
+ validation: [],
39
+ renderer: {
40
+ name: ""
41
+ }
42
+ };
43
+ },
44
+ renderSettings: function renderSettings(_ref) {
45
+ var _ref$form = _ref.form,
46
+ Bind = _ref$form.Bind,
47
+ formData = _ref$form.data,
48
+ contentModel = _ref.contentModel;
49
+ var lockedFields = get(contentModel, "lockedFields", []);
50
+ var fieldId = get(formData, "fieldId", null);
51
+ var lockedField = lockedFields.find(function (lockedField) {
52
+ return lockedField.fieldId === fieldId;
53
+ });
54
+
55
+ var _useQuery = useQuery(LIST_CONTENT_MODELS),
56
+ data = _useQuery.data,
57
+ loading = _useQuery.loading,
58
+ error = _useQuery.error;
59
+
60
+ var _useSnackbar = useSnackbar(),
61
+ showSnackbar = _useSnackbar.showSnackbar;
62
+
63
+ if (error) {
64
+ showSnackbar(error.message);
65
+ return null;
66
+ } // Format options for the Autocomplete component.
67
+
68
+
69
+ var options = useMemo(function () {
70
+ return get(data, "listContentModels.data", []).map(function (model) {
71
+ return {
72
+ id: model.modelId,
73
+ name: model.name
74
+ };
75
+ });
76
+ }, [data]);
77
+ var atLeastOneItem = useCallback( /*#__PURE__*/function () {
78
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(value) {
79
+ return _regeneratorRuntime.wrap(function _callee$(_context) {
80
+ while (1) {
81
+ switch (_context.prev = _context.next) {
82
+ case 0:
83
+ _context.prev = 0;
84
+ _context.next = 3;
85
+ return validation.validate(value, "required,minLength:1");
86
+
87
+ case 3:
88
+ _context.next = 8;
89
+ break;
90
+
91
+ case 5:
92
+ _context.prev = 5;
93
+ _context.t0 = _context["catch"](0);
94
+ throw new ValidationError("Please select at least 1 item");
95
+
96
+ case 8:
97
+ case "end":
98
+ return _context.stop();
99
+ }
100
+ }
101
+ }, _callee, null, [[0, 5]]);
102
+ }));
103
+
104
+ return function (_x) {
105
+ return _ref2.apply(this, arguments);
106
+ };
107
+ }(), []);
108
+ return /*#__PURE__*/React.createElement(Grid, null, loading && /*#__PURE__*/React.createElement(CircularProgress, null), /*#__PURE__*/React.createElement(Cell, {
109
+ span: 12
110
+ }, /*#__PURE__*/React.createElement(Bind, {
111
+ name: "settings.models",
112
+ validators: atLeastOneItem
113
+ }, function (bind) {
114
+ // Format value prop for MultiAutoComplete component.
115
+ var formattedValueForAutoComplete = options.filter(function (option) {
116
+ return bind.value.some(function (_ref3) {
117
+ var modelId = _ref3.modelId;
118
+ return option.id === modelId;
119
+ });
120
+ });
121
+ return /*#__PURE__*/React.createElement(MultiAutoComplete, Object.assign({}, bind, {
122
+ value: formattedValueForAutoComplete,
123
+ onChange: function onChange(values) {
124
+ bind.onChange(values.map(function (value) {
125
+ return {
126
+ modelId: value.id
127
+ };
128
+ }));
129
+ },
130
+ label: t(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["Content Models"]))),
131
+ description: t(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["Cannot be changed later"]))),
132
+ options: options,
133
+ disabled: lockedField && lockedField.modelId
134
+ }));
135
+ })));
136
+ },
137
+ graphql: {
138
+ queryField:
139
+ /* GraphQL */
140
+ "\n {\n modelId\n entryId\n }\n "
141
+ }
142
+ }
143
+ };
144
+ export default plugin;
@@ -0,0 +1,3 @@
1
+ import { CmsEditorFieldTypePlugin } from "../../../types";
2
+ declare const plugin: CmsEditorFieldTypePlugin;
3
+ export default plugin;
@@ -0,0 +1,45 @@
1
+ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
+
3
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
4
+
5
+ import React from "react";
6
+ import { i18n } from "@webiny/app/i18n";
7
+ import { Grid, Cell } from "@webiny/ui/Grid";
8
+ import { ReactComponent as NotesIcon } from "@svgr/webpack!./icons/round-text_fields-24px.svg";
9
+ import { Input } from "@webiny/ui/Input";
10
+ var t = i18n.ns("app-headless-cms/admin/fields");
11
+ var plugin = {
12
+ type: "cms-editor-field-type",
13
+ name: "cms-editor-field-type-richText",
14
+ field: {
15
+ type: "rich-text",
16
+ label: t(_templateObject || (_templateObject = _taggedTemplateLiteral(["Rich text"]))),
17
+ description: t(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["Text formatting with references and media."]))),
18
+ icon: /*#__PURE__*/React.createElement(NotesIcon, null),
19
+ allowMultipleValues: true,
20
+ allowPredefinedValues: false,
21
+ multipleValuesLabel: t(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["Use as a list of rich texts"]))),
22
+ createField: function createField() {
23
+ return {
24
+ type: this.type,
25
+ name: this.name,
26
+ validation: [],
27
+ renderer: {
28
+ name: ""
29
+ }
30
+ };
31
+ },
32
+ renderSettings: function renderSettings(_ref) {
33
+ var Bind = _ref.form.Bind;
34
+ return /*#__PURE__*/React.createElement(Grid, null, /*#__PURE__*/React.createElement(Cell, {
35
+ span: 12
36
+ }, /*#__PURE__*/React.createElement(Bind, {
37
+ name: "placeholderText"
38
+ }, /*#__PURE__*/React.createElement(Input, {
39
+ label: t(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["Placeholder text"]))),
40
+ description: t(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["Placeholder text (optional)"])))
41
+ }))));
42
+ }
43
+ }
44
+ };
45
+ export default plugin;
@@ -0,0 +1,3 @@
1
+ import { CmsEditorFieldTypePlugin } from "../../../types";
2
+ declare const plugin: CmsEditorFieldTypePlugin;
3
+ export default plugin;
@@ -0,0 +1,51 @@
1
+ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
+
3
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6;
4
+
5
+ import React from "react";
6
+ import { ReactComponent as TextIcon } from "@svgr/webpack!./icons/round-text_fields-24px.svg";
7
+ import { Grid, Cell } from "@webiny/ui/Grid";
8
+ import { i18n } from "@webiny/app/i18n";
9
+ import { Input } from "@webiny/ui/Input";
10
+ import PredefinedValuesDynamicFieldset from "./PredefinedValuesDynamicFieldset";
11
+ var t = i18n.ns("app-headless-cms/admin/fields");
12
+ var plugin = {
13
+ type: "cms-editor-field-type",
14
+ name: "cms-editor-field-type-text",
15
+ field: {
16
+ type: "text",
17
+ validators: ["required", "minLength", "maxLength", "pattern"],
18
+ label: t(_templateObject || (_templateObject = _taggedTemplateLiteral(["Text"]))),
19
+ description: t(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["Titles, names, single line values."]))),
20
+ icon: /*#__PURE__*/React.createElement(TextIcon, null),
21
+ allowMultipleValues: true,
22
+ allowPredefinedValues: true,
23
+ multipleValuesLabel: t(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["Use as a list of texts"]))),
24
+ createField: function createField() {
25
+ return {
26
+ type: this.type,
27
+ validation: [],
28
+ renderer: {
29
+ name: ""
30
+ }
31
+ };
32
+ },
33
+ renderSettings: function renderSettings(_ref) {
34
+ var Bind = _ref.form.Bind;
35
+ return /*#__PURE__*/React.createElement(Grid, null, /*#__PURE__*/React.createElement(Cell, {
36
+ span: 12
37
+ }, /*#__PURE__*/React.createElement(Bind, {
38
+ name: "placeholderText"
39
+ }, /*#__PURE__*/React.createElement(Input, {
40
+ label: t(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["Placeholder text"]))),
41
+ description: t(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["Placeholder text (optional)"])))
42
+ }))));
43
+ },
44
+ renderPredefinedValues: function renderPredefinedValues(props) {
45
+ return /*#__PURE__*/React.createElement(PredefinedValuesDynamicFieldset, props, /*#__PURE__*/React.createElement(Input, {
46
+ label: t(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["Value"])))
47
+ }));
48
+ }
49
+ }
50
+ };
51
+ export default plugin;
@@ -0,0 +1,3 @@
1
+ import { CacheGetObjectIdPlugin } from "@webiny/app/types";
2
+ declare const plugin: CacheGetObjectIdPlugin;
3
+ export default plugin;
@@ -0,0 +1,13 @@
1
+ var plugin = {
2
+ type: "cache-get-object-id",
3
+ getObjectId: function getObjectId(obj) {
4
+ switch (obj.__typename) {
5
+ case "CmsContentModel":
6
+ return obj.modelId;
7
+
8
+ default:
9
+ return undefined;
10
+ }
11
+ }
12
+ };
13
+ export default plugin;
@@ -0,0 +1,3 @@
1
+ import { CmsIconsPlugin } from "../../types";
2
+ declare const plugin: CmsIconsPlugin;
3
+ export default plugin;