@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.
- package/LICENSE +21 -0
- package/README.md +18 -0
- package/admin/components/ContentEntryForm/ContentEntryForm.d.ts +8 -0
- package/admin/components/ContentEntryForm/ContentEntryForm.js +68 -0
- package/admin/components/ContentEntryForm/ContentEntryFormPreview.d.ts +7 -0
- package/admin/components/ContentEntryForm/ContentEntryFormPreview.js +43 -0
- package/admin/components/ContentEntryForm/Fields.d.ts +12 -0
- package/admin/components/ContentEntryForm/Fields.js +33 -0
- package/admin/components/ContentEntryForm/Label.d.ts +5 -0
- package/admin/components/ContentEntryForm/Label.js +20 -0
- package/admin/components/ContentEntryForm/RenderFieldElement.d.ts +8 -0
- package/admin/components/ContentEntryForm/RenderFieldElement.js +40 -0
- package/admin/components/ContentEntryForm/functions/createValidators.d.ts +1 -0
- package/admin/components/ContentEntryForm/functions/createValidators.js +58 -0
- package/admin/components/ContentEntryForm/functions/getValue.d.ts +5 -0
- package/admin/components/ContentEntryForm/functions/getValue.js +20 -0
- package/admin/components/ContentEntryForm/functions/setValue.d.ts +6 -0
- package/admin/components/ContentEntryForm/functions/setValue.js +20 -0
- package/admin/components/ContentEntryForm/useBind.d.ts +10 -0
- package/admin/components/ContentEntryForm/useBind.js +76 -0
- package/admin/components/ContentEntryForm/useContentEntryForm.d.ts +22 -0
- package/admin/components/ContentEntryForm/useContentEntryForm.js +338 -0
- package/admin/components/ContentEntryForm/useRenderPlugins.d.ts +2 -0
- package/admin/components/ContentEntryForm/useRenderPlugins.js +7 -0
- package/admin/components/ContentModelEditor/Context.d.ts +23 -0
- package/admin/components/ContentModelEditor/Context.js +218 -0
- package/admin/components/ContentModelEditor/Editor.d.ts +3 -0
- package/admin/components/ContentModelEditor/Editor.js +138 -0
- package/admin/components/ContentModelEditor/FieldsSidebar.d.ts +4 -0
- package/admin/components/ContentModelEditor/FieldsSidebar.js +91 -0
- package/admin/components/ContentModelEditor/Header.d.ts +2 -0
- package/admin/components/ContentModelEditor/Header.js +24 -0
- package/admin/components/ContentModelEditor/PreviewTab.d.ts +2 -0
- package/admin/components/ContentModelEditor/PreviewTab.js +36 -0
- package/admin/components/ContentModelEditor/icons/round-assignment-24px.svg +4 -0
- package/admin/components/ContentModelEditor/icons/round-drag_indicator-24px.svg +4 -0
- package/admin/components/ContentModelEditor/useContentModelEditor.d.ts +1 -0
- package/admin/components/ContentModelEditor/useContentModelEditor.js +11 -0
- package/admin/components/DragPreview.d.ts +2 -0
- package/admin/components/DragPreview.js +98 -0
- package/admin/components/Draggable.d.ts +14 -0
- package/admin/components/Draggable.js +49 -0
- package/admin/components/DropZone/Center.d.ts +12 -0
- package/admin/components/DropZone/Center.js +60 -0
- package/admin/components/DropZone/Horizontal.d.ts +9 -0
- package/admin/components/DropZone/Horizontal.js +83 -0
- package/admin/components/DropZone/Vertical.d.ts +10 -0
- package/admin/components/DropZone/Vertical.js +79 -0
- package/admin/components/DropZone/index.d.ts +4 -0
- package/admin/components/DropZone/index.js +4 -0
- package/admin/components/Droppable.d.ts +23 -0
- package/admin/components/Droppable.js +45 -0
- package/admin/components/FieldEditor/EditFieldDialog/AppearanceTab.d.ts +3 -0
- package/admin/components/FieldEditor/EditFieldDialog/AppearanceTab.js +83 -0
- package/admin/components/FieldEditor/EditFieldDialog/GeneralTab.d.ts +10 -0
- package/admin/components/FieldEditor/EditFieldDialog/GeneralTab.js +120 -0
- package/admin/components/FieldEditor/EditFieldDialog/PredefinedValues.d.ts +5 -0
- package/admin/components/FieldEditor/EditFieldDialog/PredefinedValues.js +55 -0
- package/admin/components/FieldEditor/EditFieldDialog/ValidatorsTab.d.ts +10 -0
- package/admin/components/FieldEditor/EditFieldDialog/ValidatorsTab.js +121 -0
- package/admin/components/FieldEditor/EditFieldDialog/functions/getValue.d.ts +6 -0
- package/admin/components/FieldEditor/EditFieldDialog/functions/getValue.js +16 -0
- package/admin/components/FieldEditor/EditFieldDialog/functions/setValue.d.ts +7 -0
- package/admin/components/FieldEditor/EditFieldDialog/functions/setValue.js +21 -0
- package/admin/components/FieldEditor/EditFieldDialog.d.ts +9 -0
- package/admin/components/FieldEditor/EditFieldDialog.js +231 -0
- package/admin/components/FieldEditor/Field.d.ts +3 -0
- package/admin/components/FieldEditor/Field.js +179 -0
- package/admin/components/FieldEditor/FieldEditor.d.ts +12 -0
- package/admin/components/FieldEditor/FieldEditor.js +166 -0
- package/admin/components/FieldEditor/FieldEditorContext.d.ts +53 -0
- package/admin/components/FieldEditor/FieldEditorContext.js +330 -0
- package/admin/components/FieldEditor/Styled.d.ts +6 -0
- package/admin/components/FieldEditor/Styled.js +54 -0
- package/admin/components/FieldEditor/index.d.ts +2 -0
- package/admin/components/FieldEditor/index.js +2 -0
- package/admin/components/FieldEditor/useFieldEditor.d.ts +1 -0
- package/admin/components/FieldEditor/useFieldEditor.js +5 -0
- package/admin/components/FieldEditor/utils/deleteField.d.ts +10 -0
- package/admin/components/FieldEditor/utils/deleteField.js +34 -0
- package/admin/components/FieldEditor/utils/getFieldPosition.d.ts +6 -0
- package/admin/components/FieldEditor/utils/getFieldPosition.js +20 -0
- package/admin/components/FieldEditor/utils/index.d.ts +4 -0
- package/admin/components/FieldEditor/utils/index.js +4 -0
- package/admin/components/FieldEditor/utils/moveField.d.ts +7 -0
- package/admin/components/FieldEditor/utils/moveField.js +51 -0
- package/admin/components/FieldEditor/utils/moveRow.d.ts +9 -0
- package/admin/components/FieldEditor/utils/moveRow.js +10 -0
- package/admin/constants/statusLabels.d.ts +8 -0
- package/admin/constants/statusLabels.js +13 -0
- package/admin/contexts/Cms/NetworkError.d.ts +2 -0
- package/admin/contexts/Cms/NetworkError.js +7 -0
- package/admin/contexts/Cms/index.d.ts +16 -0
- package/admin/contexts/Cms/index.js +43 -0
- package/admin/elements/ContentGroupMenuElement.d.ts +3 -0
- package/admin/elements/ContentGroupMenuElement.js +17 -0
- package/admin/elements/ContentModelMenuElement.d.ts +3 -0
- package/admin/elements/ContentModelMenuElement.js +17 -0
- package/admin/elements/NothingToShowElement.d.ts +15 -0
- package/admin/elements/NothingToShowElement.js +88 -0
- package/admin/graphql/contentEntries.d.ts +12 -0
- package/admin/graphql/contentEntries.js +68 -0
- package/admin/graphql/contentModels.d.ts +4 -0
- package/admin/graphql/contentModels.js +9 -0
- package/admin/graphql/createFieldsList.d.ts +2 -0
- package/admin/graphql/createFieldsList.js +21 -0
- package/admin/hooks/index.d.ts +5 -0
- package/admin/hooks/index.js +5 -0
- package/admin/hooks/useApolloClient.d.ts +2 -0
- package/admin/hooks/useApolloClient.js +10 -0
- package/admin/hooks/useCms.d.ts +3 -0
- package/admin/hooks/useCms.js +14 -0
- package/admin/hooks/useLazyQuery.d.ts +2 -0
- package/admin/hooks/useLazyQuery.js +16 -0
- package/admin/hooks/useMutation.d.ts +2 -0
- package/admin/hooks/useMutation.js +16 -0
- package/admin/hooks/usePermission.d.ts +27 -0
- package/admin/hooks/usePermission.js +218 -0
- package/admin/hooks/useQuery.d.ts +2 -0
- package/admin/hooks/useQuery.js +17 -0
- package/admin/icons/add.svg +5 -0
- package/admin/icons/arrow_forward-24px.svg +1 -0
- package/admin/icons/baseline-autorenew-24px.svg +4 -0
- package/admin/icons/beenhere.svg +1 -0
- package/admin/icons/call_split-24px.svg +4 -0
- package/admin/icons/close.svg +13 -0
- package/admin/icons/delete.svg +12 -0
- package/admin/icons/devices_other-black-24px.svg +1 -0
- package/admin/icons/done-24px.svg +1 -0
- package/admin/icons/edit.svg +17 -0
- package/admin/icons/emoji_people-24px.svg +1 -0
- package/admin/icons/gesture.svg +1 -0
- package/admin/icons/help_outline.svg +1 -0
- package/admin/icons/how_to_vote-24px.svg +4 -0
- package/admin/icons/info.svg +1 -0
- package/admin/icons/lock.svg +1 -0
- package/admin/icons/more_vert.svg +12 -0
- package/admin/icons/publish.svg +1 -0
- package/admin/icons/round-arrow_drop_down-24px.svg +12 -0
- package/admin/icons/round-drag_indicator-24px.svg +4 -0
- package/admin/icons/round-translate-24px.svg +4 -0
- package/admin/icons/rule-24px.svg +1 -0
- package/admin/icons/title-24px.svg +1 -0
- package/admin/icons/unpublish.svg +4 -0
- package/admin/icons/view_list.svg +1 -0
- package/admin/icons/visibility.svg +16 -0
- package/admin/plugins/apiInformation/index.d.ts +3 -0
- package/admin/plugins/apiInformation/index.js +59 -0
- package/admin/plugins/apiInformation/placeholder.manage.graphql +18 -0
- package/admin/plugins/apiInformation/placeholder.preview.graphql +15 -0
- package/admin/plugins/apiInformation/placeholder.read.graphql +16 -0
- package/admin/plugins/definitions/CmsEditorFieldValidatorFileTypePlugin.d.ts +21 -0
- package/admin/plugins/definitions/CmsEditorFieldValidatorFileTypePlugin.js +61 -0
- package/admin/plugins/definitions/CmsFieldValidatorFileTypePlugin.d.ts +10 -0
- package/admin/plugins/definitions/CmsFieldValidatorFileTypePlugin.js +36 -0
- package/admin/plugins/editor/defaultBar/BackButton.d.ts +3 -0
- package/admin/plugins/editor/defaultBar/BackButton.js +21 -0
- package/admin/plugins/editor/defaultBar/CreateContentButton.d.ts +3 -0
- package/admin/plugins/editor/defaultBar/CreateContentButton.js +46 -0
- package/admin/plugins/editor/defaultBar/Divider.d.ts +3 -0
- package/admin/plugins/editor/defaultBar/Divider.js +11 -0
- package/admin/plugins/editor/defaultBar/FormSettings/FormSettings.d.ts +6 -0
- package/admin/plugins/editor/defaultBar/FormSettings/FormSettings.js +90 -0
- package/admin/plugins/editor/defaultBar/FormSettings/FormSettingsButton.d.ts +3 -0
- package/admin/plugins/editor/defaultBar/FormSettings/FormSettingsButton.js +27 -0
- package/admin/plugins/editor/defaultBar/FormSettings/FormSettingsStyled.d.ts +6 -0
- package/admin/plugins/editor/defaultBar/FormSettings/FormSettingsStyled.js +42 -0
- package/admin/plugins/editor/defaultBar/FormSettings/index.d.ts +1 -0
- package/admin/plugins/editor/defaultBar/FormSettings/index.js +1 -0
- package/admin/plugins/editor/defaultBar/Name/Name.d.ts +7 -0
- package/admin/plugins/editor/defaultBar/Name/Name.js +80 -0
- package/admin/plugins/editor/defaultBar/Name/NameStyled.d.ts +5 -0
- package/admin/plugins/editor/defaultBar/Name/NameStyled.js +48 -0
- package/admin/plugins/editor/defaultBar/Name/index.d.ts +1 -0
- package/admin/plugins/editor/defaultBar/Name/index.js +1 -0
- package/admin/plugins/editor/defaultBar/SaveContentModelButton.d.ts +3 -0
- package/admin/plugins/editor/defaultBar/SaveContentModelButton.js +63 -0
- package/admin/plugins/editor/defaultBar/icons/more_vert.svg +12 -0
- package/admin/plugins/editor/defaultBar/icons/round-arrow_back-24px.svg +13 -0
- package/admin/plugins/editor/defaultBar/icons/round-arrow_drop_down-24px.svg +12 -0
- package/admin/plugins/editor/defaultBar/icons/settings.svg +25 -0
- package/admin/plugins/editor/defaultBar/index.d.ts +7 -0
- package/admin/plugins/editor/defaultBar/index.js +44 -0
- package/admin/plugins/editor/formSettings/components/GeneralSettings.d.ts +7 -0
- package/admin/plugins/editor/formSettings/components/GeneralSettings.js +37 -0
- package/admin/plugins/editor/formSettings/components/GroupSelect.d.ts +3 -0
- package/admin/plugins/editor/formSettings/components/GroupSelect.js +30 -0
- package/admin/plugins/editor/formSettings/icons/round-settings-24px.svg +1 -0
- package/admin/plugins/editor/formSettings/index.d.ts +3 -0
- package/admin/plugins/editor/formSettings/index.js +14 -0
- package/admin/plugins/fieldRenderers/Accordion.d.ts +10 -0
- package/admin/plugins/fieldRenderers/Accordion.js +125 -0
- package/admin/plugins/fieldRenderers/DynamicSection.d.ts +14 -0
- package/admin/plugins/fieldRenderers/DynamicSection.js +103 -0
- package/admin/plugins/fieldRenderers/boolean/booleanSwitch.d.ts +3 -0
- package/admin/plugins/fieldRenderers/boolean/booleanSwitch.js +34 -0
- package/admin/plugins/fieldRenderers/boolean/index.d.ts +2 -0
- package/admin/plugins/fieldRenderers/boolean/index.js +2 -0
- package/admin/plugins/fieldRenderers/checkboxes.d.ts +3 -0
- package/admin/plugins/fieldRenderers/checkboxes.js +45 -0
- package/admin/plugins/fieldRenderers/dateTime/DateTimeWithTimezone.d.ts +9 -0
- package/admin/plugins/fieldRenderers/dateTime/DateTimeWithTimezone.js +148 -0
- package/admin/plugins/fieldRenderers/dateTime/DateTimeWithoutTimezone.d.ts +8 -0
- package/admin/plugins/fieldRenderers/dateTime/DateTimeWithoutTimezone.js +115 -0
- package/admin/plugins/fieldRenderers/dateTime/Input.d.ts +16 -0
- package/admin/plugins/fieldRenderers/dateTime/Input.js +26 -0
- package/admin/plugins/fieldRenderers/dateTime/Select.d.ts +3 -0
- package/admin/plugins/fieldRenderers/dateTime/Select.js +13 -0
- package/admin/plugins/fieldRenderers/dateTime/Time.d.ts +3 -0
- package/admin/plugins/fieldRenderers/dateTime/Time.js +13 -0
- package/admin/plugins/fieldRenderers/dateTime/dateTimeField.d.ts +3 -0
- package/admin/plugins/fieldRenderers/dateTime/dateTimeField.js +59 -0
- package/admin/plugins/fieldRenderers/dateTime/dateTimeFields.d.ts +3 -0
- package/admin/plugins/fieldRenderers/dateTime/dateTimeFields.js +84 -0
- package/admin/plugins/fieldRenderers/dateTime/index.d.ts +2 -0
- package/admin/plugins/fieldRenderers/dateTime/index.js +3 -0
- package/admin/plugins/fieldRenderers/dateTime/utils.d.ts +15 -0
- package/admin/plugins/fieldRenderers/dateTime/utils.js +153 -0
- package/admin/plugins/fieldRenderers/file/File.d.ts +15 -0
- package/admin/plugins/fieldRenderers/file/File.js +79 -0
- package/admin/plugins/fieldRenderers/file/fileField.d.ts +3 -0
- package/admin/plugins/fieldRenderers/file/fileField.js +64 -0
- package/admin/plugins/fieldRenderers/file/fileFields.d.ts +3 -0
- package/admin/plugins/fieldRenderers/file/fileFields.js +125 -0
- package/admin/plugins/fieldRenderers/file/index.d.ts +2 -0
- package/admin/plugins/fieldRenderers/file/index.js +3 -0
- package/admin/plugins/fieldRenderers/file/utils.d.ts +7 -0
- package/admin/plugins/fieldRenderers/file/utils.js +51 -0
- package/admin/plugins/fieldRenderers/longText/index.d.ts +2 -0
- package/admin/plugins/fieldRenderers/longText/index.js +3 -0
- package/admin/plugins/fieldRenderers/longText/longText.d.ts +3 -0
- package/admin/plugins/fieldRenderers/longText/longText.js +36 -0
- package/admin/plugins/fieldRenderers/longText/longTexts.d.ts +3 -0
- package/admin/plugins/fieldRenderers/longText/longTexts.js +43 -0
- package/admin/plugins/fieldRenderers/number/index.d.ts +2 -0
- package/admin/plugins/fieldRenderers/number/index.js +3 -0
- package/admin/plugins/fieldRenderers/number/numberInput.d.ts +3 -0
- package/admin/plugins/fieldRenderers/number/numberInput.js +39 -0
- package/admin/plugins/fieldRenderers/number/numberInputs.d.ts +3 -0
- package/admin/plugins/fieldRenderers/number/numberInputs.js +50 -0
- package/admin/plugins/fieldRenderers/object/StyledComponents.d.ts +4 -0
- package/admin/plugins/fieldRenderers/object/StyledComponents.js +5 -0
- package/admin/plugins/fieldRenderers/object/index.d.ts +2 -0
- package/admin/plugins/fieldRenderers/object/index.js +3 -0
- package/admin/plugins/fieldRenderers/object/multipleObjects.d.ts +3 -0
- package/admin/plugins/fieldRenderers/object/multipleObjects.js +72 -0
- package/admin/plugins/fieldRenderers/object/singleObject.d.ts +3 -0
- package/admin/plugins/fieldRenderers/object/singleObject.js +45 -0
- package/admin/plugins/fieldRenderers/radioButtons.d.ts +3 -0
- package/admin/plugins/fieldRenderers/radioButtons.js +45 -0
- package/admin/plugins/fieldRenderers/ref/components/ContentEntriesAutocomplete.d.ts +6 -0
- package/admin/plugins/fieldRenderers/ref/components/ContentEntriesAutocomplete.js +54 -0
- package/admin/plugins/fieldRenderers/ref/components/ContentEntriesMultiAutoComplete.d.ts +6 -0
- package/admin/plugins/fieldRenderers/ref/components/ContentEntriesMultiAutoComplete.js +65 -0
- package/admin/plugins/fieldRenderers/ref/components/getOptions.d.ts +1 -0
- package/admin/plugins/fieldRenderers/ref/components/getOptions.js +21 -0
- package/admin/plugins/fieldRenderers/ref/components/graphql.d.ts +4 -0
- package/admin/plugins/fieldRenderers/ref/components/graphql.js +10 -0
- package/admin/plugins/fieldRenderers/ref/components/renderItem.d.ts +2 -0
- package/admin/plugins/fieldRenderers/ref/components/renderItem.js +14 -0
- package/admin/plugins/fieldRenderers/ref/components/useReference.d.ts +22 -0
- package/admin/plugins/fieldRenderers/ref/components/useReference.js +240 -0
- package/admin/plugins/fieldRenderers/ref/components/useReferences.d.ts +19 -0
- package/admin/plugins/fieldRenderers/ref/components/useReferences.js +180 -0
- package/admin/plugins/fieldRenderers/ref/index.d.ts +2 -0
- package/admin/plugins/fieldRenderers/ref/index.js +3 -0
- package/admin/plugins/fieldRenderers/ref/refInput.d.ts +3 -0
- package/admin/plugins/fieldRenderers/ref/refInput.js +30 -0
- package/admin/plugins/fieldRenderers/ref/refInputs.d.ts +3 -0
- package/admin/plugins/fieldRenderers/ref/refInputs.js +37 -0
- package/admin/plugins/fieldRenderers/richText/index.d.ts +2 -0
- package/admin/plugins/fieldRenderers/richText/index.js +3 -0
- package/admin/plugins/fieldRenderers/richText/richTextInput.d.ts +3 -0
- package/admin/plugins/fieldRenderers/richText/richTextInput.js +50 -0
- package/admin/plugins/fieldRenderers/richText/richTextInputs.d.ts +3 -0
- package/admin/plugins/fieldRenderers/richText/richTextInputs.js +79 -0
- package/admin/plugins/fieldRenderers/select.d.ts +3 -0
- package/admin/plugins/fieldRenderers/select.js +34 -0
- package/admin/plugins/fieldRenderers/text/index.d.ts +2 -0
- package/admin/plugins/fieldRenderers/text/index.js +3 -0
- package/admin/plugins/fieldRenderers/text/textInput.d.ts +3 -0
- package/admin/plugins/fieldRenderers/text/textInput.js +35 -0
- package/admin/plugins/fieldRenderers/text/textInputs.d.ts +3 -0
- package/admin/plugins/fieldRenderers/text/textInputs.js +46 -0
- package/admin/plugins/fieldValidators/date/availableValidators.d.ts +1 -0
- package/admin/plugins/fieldValidators/date/availableValidators.js +11 -0
- package/admin/plugins/fieldValidators/date/createDateInputField.d.ts +3 -0
- package/admin/plugins/fieldValidators/date/createDateInputField.js +33 -0
- package/admin/plugins/fieldValidators/dateGte.d.ts +3 -0
- package/admin/plugins/fieldValidators/dateGte.js +40 -0
- package/admin/plugins/fieldValidators/dateLte.d.ts +3 -0
- package/admin/plugins/fieldValidators/dateLte.js +40 -0
- package/admin/plugins/fieldValidators/gte.d.ts +3 -0
- package/admin/plugins/fieldValidators/gte.js +27 -0
- package/admin/plugins/fieldValidators/in.d.ts +3 -0
- package/admin/plugins/fieldValidators/in.js +26 -0
- package/admin/plugins/fieldValidators/lte.d.ts +3 -0
- package/admin/plugins/fieldValidators/lte.js +27 -0
- package/admin/plugins/fieldValidators/maxLength.d.ts +3 -0
- package/admin/plugins/fieldValidators/maxLength.js +27 -0
- package/admin/plugins/fieldValidators/minLength.d.ts +3 -0
- package/admin/plugins/fieldValidators/minLength.js +27 -0
- package/admin/plugins/fieldValidators/pattern.d.ts +3 -0
- package/admin/plugins/fieldValidators/pattern.js +74 -0
- package/admin/plugins/fieldValidators/patternPlugins/email.d.ts +3 -0
- package/admin/plugins/fieldValidators/patternPlugins/email.js +9 -0
- package/admin/plugins/fieldValidators/patternPlugins/lowerCase.d.ts +3 -0
- package/admin/plugins/fieldValidators/patternPlugins/lowerCase.js +9 -0
- package/admin/plugins/fieldValidators/patternPlugins/upperCase.d.ts +3 -0
- package/admin/plugins/fieldValidators/patternPlugins/upperCase.js +9 -0
- package/admin/plugins/fieldValidators/patternPlugins/url.d.ts +3 -0
- package/admin/plugins/fieldValidators/patternPlugins/url.js +9 -0
- package/admin/plugins/fieldValidators/required.d.ts +3 -0
- package/admin/plugins/fieldValidators/required.js +10 -0
- package/admin/plugins/fields/PredefinedValuesDynamicFieldset.d.ts +6 -0
- package/admin/plugins/fields/PredefinedValuesDynamicFieldset.js +108 -0
- package/admin/plugins/fields/boolean.d.ts +3 -0
- package/admin/plugins/fields/boolean.js +31 -0
- package/admin/plugins/fields/dateTime.d.ts +3 -0
- package/admin/plugins/fields/dateTime.js +77 -0
- package/admin/plugins/fields/file.d.ts +3 -0
- package/admin/plugins/fields/file.js +46 -0
- package/admin/plugins/fields/icons/ballot_black_24dp.svg +1 -0
- package/admin/plugins/fields/icons/dropdown-icon.svg +16 -0
- package/admin/plugins/fields/icons/notes-black-24px.svg +1 -0
- package/admin/plugins/fields/icons/round-check_box-24px.svg +4 -0
- package/admin/plugins/fields/icons/round-link-24px.svg +1 -0
- package/admin/plugins/fields/icons/round-looks_3-24px.svg +4 -0
- package/admin/plugins/fields/icons/round-notes.svg +1 -0
- package/admin/plugins/fields/icons/round-radio_button_checked-24px.svg +5 -0
- package/admin/plugins/fields/icons/round-short_text.svg +1 -0
- package/admin/plugins/fields/icons/round-subject.svg +1 -0
- package/admin/plugins/fields/icons/round-text_fields-24px.svg +4 -0
- package/admin/plugins/fields/icons/round-visibility_off-24px.svg +4 -0
- package/admin/plugins/fields/icons/round_insert_drive_file-24px.svg +1 -0
- package/admin/plugins/fields/icons/schedule-black-24px.svg +1 -0
- package/admin/plugins/fields/icons/title-black-24px.svg +1 -0
- package/admin/plugins/fields/icons/toggle_on-black-24px.svg +1 -0
- package/admin/plugins/fields/longText.d.ts +3 -0
- package/admin/plugins/fields/longText.js +46 -0
- package/admin/plugins/fields/number.d.ts +3 -0
- package/admin/plugins/fields/number.js +63 -0
- package/admin/plugins/fields/object/ObjectFields.d.ts +4 -0
- package/admin/plugins/fields/object/ObjectFields.js +32 -0
- package/admin/plugins/fields/object.d.ts +3 -0
- package/admin/plugins/fields/object.js +46 -0
- package/admin/plugins/fields/ref.d.ts +3 -0
- package/admin/plugins/fields/ref.js +144 -0
- package/admin/plugins/fields/richText.d.ts +3 -0
- package/admin/plugins/fields/richText.js +45 -0
- package/admin/plugins/fields/text.d.ts +3 -0
- package/admin/plugins/fields/text.js +51 -0
- package/admin/plugins/getObjectId.d.ts +3 -0
- package/admin/plugins/getObjectId.js +13 -0
- package/admin/plugins/icons.d.ts +3 -0
- package/admin/plugins/icons.js +40 -0
- package/admin/plugins/index.d.ts +13 -0
- package/admin/plugins/index.js +14 -0
- package/admin/plugins/install.d.ts +3 -0
- package/admin/plugins/install.js +127 -0
- package/admin/plugins/menus/CmsMenuLoader.d.ts +7 -0
- package/admin/plugins/menus/CmsMenuLoader.js +76 -0
- package/admin/plugins/menus/ContentGroupsMenuItems.d.ts +6 -0
- package/admin/plugins/menus/ContentGroupsMenuItems.js +154 -0
- package/admin/plugins/menus/GlobalSearchPlugins.d.ts +8 -0
- package/admin/plugins/menus/GlobalSearchPlugins.js +53 -0
- package/admin/plugins/menus.d.ts +4 -0
- package/admin/plugins/menus.js +19 -0
- package/admin/plugins/permissionRenderer/CmsPermissions.d.ts +5 -0
- package/admin/plugins/permissionRenderer/CmsPermissions.js +340 -0
- package/admin/plugins/permissionRenderer/components/ContentEntryPermission.d.ts +8 -0
- package/admin/plugins/permissionRenderer/components/ContentEntryPermission.js +117 -0
- package/admin/plugins/permissionRenderer/components/ContentModelGroupPermission.d.ts +9 -0
- package/admin/plugins/permissionRenderer/components/ContentModelGroupPermission.js +77 -0
- package/admin/plugins/permissionRenderer/components/ContentModelList.d.ts +7 -0
- package/admin/plugins/permissionRenderer/components/ContentModelList.js +53 -0
- package/admin/plugins/permissionRenderer/components/ContentModelPermission.d.ts +10 -0
- package/admin/plugins/permissionRenderer/components/ContentModelPermission.js +104 -0
- package/admin/plugins/permissionRenderer/components/PermissionRendererWrapper.d.ts +5 -0
- package/admin/plugins/permissionRenderer/components/PermissionRendererWrapper.js +28 -0
- package/admin/plugins/permissionRenderer/components/PermissionSelector.d.ts +34 -0
- package/admin/plugins/permissionRenderer/components/PermissionSelector.js +66 -0
- package/admin/plugins/permissionRenderer/components/StyledComponents.d.ts +2 -0
- package/admin/plugins/permissionRenderer/components/StyledComponents.js +10 -0
- package/admin/plugins/permissionRenderer/components/useCmsData.d.ts +1 -0
- package/admin/plugins/permissionRenderer/components/useCmsData.js +79 -0
- package/admin/plugins/permissionRenderer/index.d.ts +3 -0
- package/admin/plugins/permissionRenderer/index.js +16 -0
- package/admin/plugins/routes.d.ts +3 -0
- package/admin/plugins/routes.js +88 -0
- package/admin/plugins/transformers/dateTransformer.d.ts +3 -0
- package/admin/plugins/transformers/dateTransformer.js +44 -0
- package/admin/plugins/transformers/index.d.ts +3 -0
- package/admin/plugins/transformers/index.js +5 -0
- package/admin/plugins/transformers/numberTransformer.d.ts +3 -0
- package/admin/plugins/transformers/numberTransformer.js +14 -0
- package/admin/plugins/upgrades/v5.0.0.d.ts +5 -0
- package/admin/plugins/upgrades/v5.0.0.js +85 -0
- package/admin/plugins/upgrades/v5.5.0.d.ts +5 -0
- package/admin/plugins/upgrades/v5.5.0.js +85 -0
- package/admin/plugins/upgrades/v5.8.0.d.ts +5 -0
- package/admin/plugins/upgrades/v5.8.0.js +85 -0
- package/admin/plugins/validators/dateGte.d.ts +3 -0
- package/admin/plugins/validators/dateGte.js +23 -0
- package/admin/plugins/validators/dateLte.d.ts +3 -0
- package/admin/plugins/validators/dateLte.js +23 -0
- package/admin/plugins/validators/gte.d.ts +3 -0
- package/admin/plugins/validators/gte.js +15 -0
- package/admin/plugins/validators/in.d.ts +3 -0
- package/admin/plugins/validators/in.js +15 -0
- package/admin/plugins/validators/lte.d.ts +3 -0
- package/admin/plugins/validators/lte.js +15 -0
- package/admin/plugins/validators/maxLength.d.ts +3 -0
- package/admin/plugins/validators/maxLength.js +15 -0
- package/admin/plugins/validators/minLength.d.ts +3 -0
- package/admin/plugins/validators/minLength.js +15 -0
- package/admin/plugins/validators/pattern.d.ts +9 -0
- package/admin/plugins/validators/pattern.js +34 -0
- package/admin/plugins/validators/patternPlugins/email.d.ts +10 -0
- package/admin/plugins/validators/patternPlugins/email.js +9 -0
- package/admin/plugins/validators/patternPlugins/lowerCase.d.ts +10 -0
- package/admin/plugins/validators/patternPlugins/lowerCase.js +9 -0
- package/admin/plugins/validators/patternPlugins/upperCase.d.ts +10 -0
- package/admin/plugins/validators/patternPlugins/upperCase.js +9 -0
- package/admin/plugins/validators/patternPlugins/url.d.ts +10 -0
- package/admin/plugins/validators/patternPlugins/url.js +9 -0
- package/admin/plugins/validators/required.d.ts +3 -0
- package/admin/plugins/validators/required.js +11 -0
- package/admin/plugins/validators/timeGte.d.ts +3 -0
- package/admin/plugins/validators/timeGte.js +19 -0
- package/admin/plugins/validators/timeLte.d.ts +3 -0
- package/admin/plugins/validators/timeLte.js +19 -0
- package/admin/plugins/welcomeScreenWidget.d.ts +3 -0
- package/admin/plugins/welcomeScreenWidget.js +29 -0
- package/admin/views/contentEntries/ContentEntries.d.ts +3 -0
- package/admin/views/contentEntries/ContentEntries.js +73 -0
- package/admin/views/contentEntries/ContentEntriesContext.d.ts +24 -0
- package/admin/views/contentEntries/ContentEntriesContext.js +78 -0
- package/admin/views/contentEntries/ContentEntriesList.d.ts +3 -0
- package/admin/views/contentEntries/ContentEntriesList.js +180 -0
- package/admin/views/contentEntries/ContentEntry/ContentEntryContext.d.ts +28 -0
- package/admin/views/contentEntries/ContentEntry/ContentEntryContext.js +113 -0
- package/admin/views/contentEntries/ContentEntry/RevisionListItem.d.ts +7 -0
- package/admin/views/contentEntries/ContentEntry/RevisionListItem.js +152 -0
- package/admin/views/contentEntries/ContentEntry/RevisionsList.d.ts +3 -0
- package/admin/views/contentEntries/ContentEntry/RevisionsList.js +59 -0
- package/admin/views/contentEntries/ContentEntry/cache.d.ts +7 -0
- package/admin/views/contentEntries/ContentEntry/cache.js +183 -0
- package/admin/views/contentEntries/ContentEntry/header/Header.d.ts +3 -0
- package/admin/views/contentEntries/ContentEntry/header/Header.js +32 -0
- package/admin/views/contentEntries/ContentEntry/header/contentFormOptionsMenu/ContentFormOptionsMenu.d.ts +3 -0
- package/admin/views/contentEntries/ContentEntry/header/contentFormOptionsMenu/ContentFormOptionsMenu.js +141 -0
- package/admin/views/contentEntries/ContentEntry/header/index.d.ts +3 -0
- package/admin/views/contentEntries/ContentEntry/header/index.js +45 -0
- package/admin/views/contentEntries/ContentEntry/header/requestChanges/RequestChanges.d.ts +3 -0
- package/admin/views/contentEntries/ContentEntry/header/requestChanges/RequestChanges.js +67 -0
- package/admin/views/contentEntries/ContentEntry/header/requestChanges/rule-24px.svg +1 -0
- package/admin/views/contentEntries/ContentEntry/header/requestReview/RequestReview.d.ts +3 -0
- package/admin/views/contentEntries/ContentEntry/header/requestReview/RequestReview.js +69 -0
- package/admin/views/contentEntries/ContentEntry/header/requestReview/emoji_people-24px.svg +1 -0
- package/admin/views/contentEntries/ContentEntry/header/revisionSelector/RevisionSelector.d.ts +3 -0
- package/admin/views/contentEntries/ContentEntry/header/revisionSelector/RevisionSelector.js +75 -0
- package/admin/views/contentEntries/ContentEntry/header/saveAndPublishContent/SaveAndPublishContent.d.ts +3 -0
- package/admin/views/contentEntries/ContentEntry/header/saveAndPublishContent/SaveAndPublishContent.js +84 -0
- package/admin/views/contentEntries/ContentEntry/header/saveContent/SaveContent.d.ts +3 -0
- package/admin/views/contentEntries/ContentEntry/header/saveContent/SaveContent.js +32 -0
- package/admin/views/contentEntries/ContentEntry/prepareFormData.d.ts +2 -0
- package/admin/views/contentEntries/ContentEntry/prepareFormData.js +79 -0
- package/admin/views/contentEntries/ContentEntry/useRevision.d.ts +13 -0
- package/admin/views/contentEntries/ContentEntry/useRevision.js +335 -0
- package/admin/views/contentEntries/ContentEntry.d.ts +12 -0
- package/admin/views/contentEntries/ContentEntry.js +99 -0
- package/admin/views/contentEntries/hooks/useContentEntries.d.ts +1 -0
- package/admin/views/contentEntries/hooks/useContentEntries.js +5 -0
- package/admin/views/contentEntries/hooks/useContentEntriesList.d.ts +21 -0
- package/admin/views/contentEntries/hooks/useContentEntriesList.js +152 -0
- package/admin/views/contentEntries/hooks/useContentEntry.d.ts +1 -0
- package/admin/views/contentEntries/hooks/useContentEntry.js +5 -0
- package/admin/views/contentModelGroups/ContentModelGroups.d.ts +3 -0
- package/admin/views/contentModelGroups/ContentModelGroups.js +35 -0
- package/admin/views/contentModelGroups/ContentModelGroupsDataList.d.ts +6 -0
- package/admin/views/contentModelGroups/ContentModelGroupsDataList.js +242 -0
- package/admin/views/contentModelGroups/ContentModelGroupsForm.d.ts +6 -0
- package/admin/views/contentModelGroups/ContentModelGroupsForm.js +231 -0
- package/admin/views/contentModelGroups/DelayedOnChange.d.ts +25 -0
- package/admin/views/contentModelGroups/DelayedOnChange.js +134 -0
- package/admin/views/contentModelGroups/IconPicker.d.ts +7 -0
- package/admin/views/contentModelGroups/IconPicker.js +204 -0
- package/admin/views/contentModelGroups/graphql.d.ts +5 -0
- package/admin/views/contentModelGroups/graphql.js +11 -0
- package/admin/views/contentModels/ContentModelEditor.d.ts +2 -0
- package/admin/views/contentModels/ContentModelEditor.js +35 -0
- package/admin/views/contentModels/ContentModels.d.ts +3 -0
- package/admin/views/contentModels/ContentModels.js +82 -0
- package/admin/views/contentModels/ContentModelsDataList.d.ts +7 -0
- package/admin/views/contentModels/ContentModelsDataList.js +281 -0
- package/admin/views/contentModels/NewContentModelDialog.d.ts +8 -0
- package/admin/views/contentModels/NewContentModelDialog.js +196 -0
- package/admin/views/contentModels/cache.d.ts +5 -0
- package/admin/views/contentModels/cache.js +68 -0
- package/admin/views/utils.d.ts +2 -0
- package/admin/views/utils.js +27 -0
- package/admin/viewsGraphql.d.ts +4 -0
- package/admin/viewsGraphql.js +12 -0
- package/package.json +109 -0
- package/types.d.ts +484 -0
- package/types.js +1 -0
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const LIST_MENU_CONTENT_GROUPS_MODELS: import("graphql").DocumentNode;
|
|
2
|
+
export declare const LIST_CONTENT_MODELS: import("graphql").DocumentNode;
|
|
3
|
+
export declare const CREATE_CONTENT_MODEL: import("graphql").DocumentNode;
|
|
4
|
+
export declare const DELETE_CONTENT_MODEL: import("graphql").DocumentNode;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
+
|
|
3
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
4
|
+
|
|
5
|
+
import gql from "graphql-tag";
|
|
6
|
+
var ERROR_FIELDS = "\n code\n message\n data\n";
|
|
7
|
+
var BASE_CONTENT_MODEL_FIELDS = "\n description\n modelId\n name\n savedOn\n plugin\n fields {\n id\n }\n group {\n id\n name\n }\n createdBy {\n id\n displayName\n type\n }\n"; // Fetches data needed for constructing content models list in the main menu.
|
|
8
|
+
|
|
9
|
+
export var LIST_MENU_CONTENT_GROUPS_MODELS = gql(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n query CmsListMenuContentGroupsModels {\n listContentModelGroups {\n data {\n id\n name\n icon\n plugin\n contentModels {\n name\n modelId\n plugin\n createdBy {\n id\n displayName\n type\n }\n }\n }\n }\n }\n"])));
|
|
10
|
+
export var LIST_CONTENT_MODELS = gql(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n query CmsListContentModels {\n listContentModels {\n data {\n ", "\n }\n }\n }\n"])), BASE_CONTENT_MODEL_FIELDS);
|
|
11
|
+
export var CREATE_CONTENT_MODEL = gql(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n mutation CmsCreateContentModel($data: CmsContentModelCreateInput!) {\n createContentModel(data: $data) {\n data {\n ", "\n }\n error {\n message\n data\n }\n }\n }\n"])), BASE_CONTENT_MODEL_FIELDS);
|
|
12
|
+
export var DELETE_CONTENT_MODEL = gql(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n mutation CmsDeleteContentModel($modelId: ID!) {\n deleteContentModel(modelId: $modelId) {\n data\n error {\n ", "\n }\n }\n }\n"])), ERROR_FIELDS);
|
package/package.json
ADDED
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@webiny/app-headless-cms",
|
|
3
|
+
"version": "0.0.0-mt-1",
|
|
4
|
+
"main": "index.js",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "https://github.com/webiny/webiny-js.git"
|
|
8
|
+
},
|
|
9
|
+
"contributors": [
|
|
10
|
+
"Pavel Denisjuk <pavel@webiny.com>",
|
|
11
|
+
"Sven Al Hamad <sven@webiny.com>",
|
|
12
|
+
"Adrian Smijulj <adrian@webiny.com>"
|
|
13
|
+
],
|
|
14
|
+
"license": "MIT",
|
|
15
|
+
"dependencies": {
|
|
16
|
+
"@apollo/react-hooks": "3.1.5",
|
|
17
|
+
"@babel/runtime": "7.15.4",
|
|
18
|
+
"@emotion/core": "10.1.1",
|
|
19
|
+
"@emotion/styled": "10.0.27",
|
|
20
|
+
"@fortawesome/fontawesome-svg-core": "1.2.36",
|
|
21
|
+
"@fortawesome/free-brands-svg-icons": "5.15.4",
|
|
22
|
+
"@fortawesome/free-regular-svg-icons": "5.15.4",
|
|
23
|
+
"@fortawesome/free-solid-svg-icons": "5.15.4",
|
|
24
|
+
"@fortawesome/react-fontawesome": "0.1.15",
|
|
25
|
+
"@svgr/webpack": "4.3.3",
|
|
26
|
+
"@types/react": "16.14.2",
|
|
27
|
+
"@webiny/app": "0.0.0-mt-1",
|
|
28
|
+
"@webiny/app-admin": "0.0.0-mt-1",
|
|
29
|
+
"@webiny/app-graphql-playground": "0.0.0-mt-1",
|
|
30
|
+
"@webiny/app-i18n": "0.0.0-mt-1",
|
|
31
|
+
"@webiny/app-plugin-admin-welcome-screen": "0.0.0-mt-1",
|
|
32
|
+
"@webiny/app-security": "0.0.0-mt-1",
|
|
33
|
+
"@webiny/error": "0.0.0-mt-1",
|
|
34
|
+
"@webiny/form": "0.0.0-mt-1",
|
|
35
|
+
"@webiny/plugins": "0.0.0-mt-1",
|
|
36
|
+
"@webiny/react-router": "0.0.0-mt-1",
|
|
37
|
+
"@webiny/ui": "0.0.0-mt-1",
|
|
38
|
+
"@webiny/validation": "0.0.0-mt-1",
|
|
39
|
+
"apollo-cache": "1.3.5",
|
|
40
|
+
"apollo-client": "2.6.10",
|
|
41
|
+
"apollo-link": "1.2.14",
|
|
42
|
+
"apollo-utilities": "1.3.4",
|
|
43
|
+
"classnames": "2.3.1",
|
|
44
|
+
"dot-prop-immutable": "2.1.1",
|
|
45
|
+
"emotion": "10.0.27",
|
|
46
|
+
"graphql": "14.7.0",
|
|
47
|
+
"graphql-tag": "2.12.5",
|
|
48
|
+
"lodash": "4.17.21",
|
|
49
|
+
"pluralize": "8.0.0",
|
|
50
|
+
"prop-types": "15.7.2",
|
|
51
|
+
"raw.macro": "0.4.2",
|
|
52
|
+
"react": "16.14.0",
|
|
53
|
+
"react-dnd": "9.5.1",
|
|
54
|
+
"react-dnd-html5-backend": "9.5.1",
|
|
55
|
+
"react-dom": "16.14.0",
|
|
56
|
+
"react-helmet": "5.2.1",
|
|
57
|
+
"react-hotkeyz": "1.0.4",
|
|
58
|
+
"react-virtualized": "9.22.3",
|
|
59
|
+
"shortid": "2.2.16",
|
|
60
|
+
"timeago-react": "2.0.1",
|
|
61
|
+
"use-deep-compare-effect": "1.8.0"
|
|
62
|
+
},
|
|
63
|
+
"devDependencies": {
|
|
64
|
+
"@babel/cli": "^7.5.5",
|
|
65
|
+
"@babel/core": "^7.5.5",
|
|
66
|
+
"@babel/preset-env": "^7.5.5",
|
|
67
|
+
"@babel/preset-react": "^7.0.0",
|
|
68
|
+
"@babel/preset-typescript": "^7.8.3",
|
|
69
|
+
"@webiny/cli": "^0.0.0-mt-1",
|
|
70
|
+
"@webiny/project-utils": "^0.0.0-mt-1",
|
|
71
|
+
"babel-plugin-emotion": "^9.2.8",
|
|
72
|
+
"babel-plugin-lodash": "^3.3.4",
|
|
73
|
+
"babel-plugin-module-resolver": "^4.1.0",
|
|
74
|
+
"babel-plugin-named-asset-import": "^1.0.0-next.3e165448",
|
|
75
|
+
"execa": "^5.0.0",
|
|
76
|
+
"rimraf": "^3.0.2",
|
|
77
|
+
"ttypescript": "^1.5.12",
|
|
78
|
+
"typescript": "^4.1.3"
|
|
79
|
+
},
|
|
80
|
+
"publishConfig": {
|
|
81
|
+
"access": "public",
|
|
82
|
+
"directory": "dist"
|
|
83
|
+
},
|
|
84
|
+
"scripts": {
|
|
85
|
+
"build": "yarn webiny run build",
|
|
86
|
+
"watch": "yarn webiny run watch"
|
|
87
|
+
},
|
|
88
|
+
"svgo": {
|
|
89
|
+
"plugins": {
|
|
90
|
+
"removeViewBox": false
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
"adio": {
|
|
94
|
+
"ignore": {
|
|
95
|
+
"src": [
|
|
96
|
+
"!!raw-loader!."
|
|
97
|
+
],
|
|
98
|
+
"dependencies": [
|
|
99
|
+
"@svgr/webpack",
|
|
100
|
+
"@emotion/core",
|
|
101
|
+
"raw-loader"
|
|
102
|
+
],
|
|
103
|
+
"peerDependencies": [
|
|
104
|
+
"react-dom"
|
|
105
|
+
]
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
"gitHead": "37736d8456a6ecb342a6c3645060bd9a3f2d4bb0"
|
|
109
|
+
}
|
package/types.d.ts
ADDED
|
@@ -0,0 +1,484 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Plugin } from "@webiny/plugins/types";
|
|
3
|
+
import { ReactElement, ReactNode } from "react";
|
|
4
|
+
import { BindComponent, FormRenderPropParams, FormAPI } from "@webiny/form/types";
|
|
5
|
+
import { ApolloClient } from "apollo-client";
|
|
6
|
+
import { IconPrefix, IconName } from "@fortawesome/fontawesome-svg-core";
|
|
7
|
+
import Label from "./admin/components/ContentEntryForm/Label";
|
|
8
|
+
interface QueryFieldParams {
|
|
9
|
+
field: CmsEditorField;
|
|
10
|
+
}
|
|
11
|
+
export interface CmsEditorFieldTypePlugin extends Plugin {
|
|
12
|
+
/**
|
|
13
|
+
* a plugin type
|
|
14
|
+
*/
|
|
15
|
+
type: "cms-editor-field-type";
|
|
16
|
+
field: {
|
|
17
|
+
/**
|
|
18
|
+
* A unique identifier of the field type (text, number, json, myField, ...).
|
|
19
|
+
*
|
|
20
|
+
* ```ts
|
|
21
|
+
* type: "myField"
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
type: string;
|
|
25
|
+
/**
|
|
26
|
+
* A display name for the field.
|
|
27
|
+
*
|
|
28
|
+
* ```ts
|
|
29
|
+
* label: "Field name"
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
label: string;
|
|
33
|
+
/**
|
|
34
|
+
* A list of available validators for the model field.
|
|
35
|
+
*
|
|
36
|
+
* ```ts
|
|
37
|
+
* validators: [
|
|
38
|
+
* "required",
|
|
39
|
+
* "gte",
|
|
40
|
+
* "lte"
|
|
41
|
+
* ]
|
|
42
|
+
* ```
|
|
43
|
+
*/
|
|
44
|
+
validators?: string[];
|
|
45
|
+
/**
|
|
46
|
+
* A list of available validators when a model field accepts a list (array) of values.
|
|
47
|
+
*
|
|
48
|
+
* ```ts
|
|
49
|
+
* listValidators: [
|
|
50
|
+
* "minLength",
|
|
51
|
+
* "maxLength"
|
|
52
|
+
* ]
|
|
53
|
+
* ```
|
|
54
|
+
*/
|
|
55
|
+
listValidators?: string[];
|
|
56
|
+
/**
|
|
57
|
+
* An explanation of the field displayed beneath the label.
|
|
58
|
+
*
|
|
59
|
+
* ```ts
|
|
60
|
+
* description: "A short description of the field"
|
|
61
|
+
* ```
|
|
62
|
+
*/
|
|
63
|
+
description: string;
|
|
64
|
+
/**
|
|
65
|
+
* A ReactNode to display the icon for the field.
|
|
66
|
+
*
|
|
67
|
+
* ```tsx
|
|
68
|
+
* icon: <MyIconComponent />
|
|
69
|
+
* ```
|
|
70
|
+
*/
|
|
71
|
+
icon: React.ReactNode;
|
|
72
|
+
/**
|
|
73
|
+
* Is it allowed to have multiple values in this field?
|
|
74
|
+
*
|
|
75
|
+
* ```ts
|
|
76
|
+
* allowMultipleValues: true
|
|
77
|
+
* ```
|
|
78
|
+
*/
|
|
79
|
+
allowMultipleValues: boolean;
|
|
80
|
+
/**
|
|
81
|
+
* Does this field type have a fixed list of values that can be selected?
|
|
82
|
+
*
|
|
83
|
+
* ```ts
|
|
84
|
+
* allowPredefinedValues: false
|
|
85
|
+
* ```
|
|
86
|
+
*/
|
|
87
|
+
allowPredefinedValues: boolean;
|
|
88
|
+
/**
|
|
89
|
+
* A ReactNode label when multiple values are enabled.
|
|
90
|
+
*/
|
|
91
|
+
multipleValuesLabel: React.ReactNode;
|
|
92
|
+
/**
|
|
93
|
+
* These are default values when the field is first created. This is a representation of the field that is stored in the database.
|
|
94
|
+
*
|
|
95
|
+
* ```ts
|
|
96
|
+
* createField: () => ({
|
|
97
|
+
* type: "fieldType",
|
|
98
|
+
* validation: [],
|
|
99
|
+
* renderer: {
|
|
100
|
+
* name: "fieldTypeRenderer"
|
|
101
|
+
* }
|
|
102
|
+
* })
|
|
103
|
+
* ```
|
|
104
|
+
*/
|
|
105
|
+
createField: () => CmsEditorField;
|
|
106
|
+
/**
|
|
107
|
+
* A ReactNode that you can add in the section below the help text when creating/editing field.
|
|
108
|
+
*
|
|
109
|
+
* ```tsx
|
|
110
|
+
* renderSettings: (params) => {
|
|
111
|
+
* return <FieldSettingsComponent />;
|
|
112
|
+
* }
|
|
113
|
+
* ```
|
|
114
|
+
*/
|
|
115
|
+
renderSettings?: (params: {
|
|
116
|
+
form: FormRenderPropParams;
|
|
117
|
+
afterChangeLabel: (value: string) => void;
|
|
118
|
+
uniqueFieldIdValidator: (fieldId: string) => void;
|
|
119
|
+
contentModel: CmsEditorContentModel;
|
|
120
|
+
}) => React.ReactNode;
|
|
121
|
+
/**
|
|
122
|
+
* A ReactNode that renders in the Predefined values tab.
|
|
123
|
+
*
|
|
124
|
+
* ```tsx
|
|
125
|
+
* renderPredefinedValues: (params) => {
|
|
126
|
+
* const {form: {Bind}} = params;
|
|
127
|
+
* return (
|
|
128
|
+
* <Bind name="fieldProperty">
|
|
129
|
+
* <InputComponent />
|
|
130
|
+
* </Bind>
|
|
131
|
+
* );
|
|
132
|
+
* }
|
|
133
|
+
* ```
|
|
134
|
+
*/
|
|
135
|
+
renderPredefinedValues?: (params: {
|
|
136
|
+
form: FormRenderPropParams;
|
|
137
|
+
getBind: (index?: number) => any;
|
|
138
|
+
}) => React.ReactNode;
|
|
139
|
+
/**
|
|
140
|
+
* Object wrapper for GraphQL stuff
|
|
141
|
+
*/
|
|
142
|
+
graphql?: {
|
|
143
|
+
/**
|
|
144
|
+
* Define field selection.
|
|
145
|
+
*
|
|
146
|
+
* ```ts
|
|
147
|
+
* graphql: {
|
|
148
|
+
* queryField: `
|
|
149
|
+
* {
|
|
150
|
+
* id
|
|
151
|
+
* title
|
|
152
|
+
* createdOn
|
|
153
|
+
* }
|
|
154
|
+
* `,
|
|
155
|
+
* }
|
|
156
|
+
* ```
|
|
157
|
+
*/
|
|
158
|
+
queryField?: string | ((params: QueryFieldParams) => string);
|
|
159
|
+
};
|
|
160
|
+
render?(params: any): React.ReactElement;
|
|
161
|
+
};
|
|
162
|
+
}
|
|
163
|
+
export interface CmsEditorFieldRendererPlugin extends Plugin {
|
|
164
|
+
/**
|
|
165
|
+
* a plugin type
|
|
166
|
+
*/
|
|
167
|
+
type: "cms-editor-field-renderer";
|
|
168
|
+
renderer: {
|
|
169
|
+
/**
|
|
170
|
+
* Name of the renderer to match the one from `createField()` method in `CmsEditorFieldTypePlugin`.
|
|
171
|
+
*
|
|
172
|
+
* ```ts
|
|
173
|
+
* renderName: "myFieldTypeRenderer"
|
|
174
|
+
* ```
|
|
175
|
+
*/
|
|
176
|
+
rendererName: string;
|
|
177
|
+
/**
|
|
178
|
+
* A display name for the field in the UI. It is a `ReactNode` type so you can return a component if you want to.
|
|
179
|
+
*
|
|
180
|
+
* ```tsx
|
|
181
|
+
* name: <MyFieldNameComponent />
|
|
182
|
+
* ```
|
|
183
|
+
*/
|
|
184
|
+
name: React.ReactNode;
|
|
185
|
+
/**
|
|
186
|
+
* A description for the field in the UI. Works exactly like the `name` property.
|
|
187
|
+
*
|
|
188
|
+
* ```tsx
|
|
189
|
+
* name: <MyFieldDescriptionComponent />
|
|
190
|
+
* ```
|
|
191
|
+
*/
|
|
192
|
+
description: React.ReactNode;
|
|
193
|
+
/**
|
|
194
|
+
* A method that determines if the field can be rendered by this plugin.
|
|
195
|
+
*
|
|
196
|
+
* ```ts
|
|
197
|
+
* canUse({ field }) {
|
|
198
|
+
* return (
|
|
199
|
+
* field.type === "myType" && !field.multipleValues
|
|
200
|
+
* );
|
|
201
|
+
* }
|
|
202
|
+
* ```
|
|
203
|
+
*/
|
|
204
|
+
canUse(props: {
|
|
205
|
+
field: CmsEditorField;
|
|
206
|
+
}): boolean;
|
|
207
|
+
/**
|
|
208
|
+
* Renders a field in the UI.
|
|
209
|
+
*
|
|
210
|
+
* ```tsx
|
|
211
|
+
* render({ field, getBind }) {
|
|
212
|
+
* const Bind = getBind();
|
|
213
|
+
*
|
|
214
|
+
* return (
|
|
215
|
+
* <Bind>
|
|
216
|
+
* {bind => {
|
|
217
|
+
* return (
|
|
218
|
+
* <Input
|
|
219
|
+
* value={bind.value}
|
|
220
|
+
* onChange={bind.onChange}
|
|
221
|
+
* />
|
|
222
|
+
* )
|
|
223
|
+
* }}
|
|
224
|
+
* </Bind>
|
|
225
|
+
* );
|
|
226
|
+
* }
|
|
227
|
+
* ```
|
|
228
|
+
*/
|
|
229
|
+
render(props: {
|
|
230
|
+
field: CmsEditorField;
|
|
231
|
+
Label: typeof Label;
|
|
232
|
+
getBind: (index?: number, key?: string) => any;
|
|
233
|
+
contentModel: CmsEditorContentModel;
|
|
234
|
+
}): React.ReactNode;
|
|
235
|
+
};
|
|
236
|
+
}
|
|
237
|
+
export interface CmsEditorFieldPredefinedValuesEntry {
|
|
238
|
+
label: string;
|
|
239
|
+
value: string;
|
|
240
|
+
}
|
|
241
|
+
export interface CmsEditorFieldPredefinedValues {
|
|
242
|
+
enabled: boolean;
|
|
243
|
+
values: CmsEditorFieldPredefinedValuesEntry[];
|
|
244
|
+
}
|
|
245
|
+
export declare type CmsEditorField<T = unknown> = T & {
|
|
246
|
+
id?: string;
|
|
247
|
+
type: string;
|
|
248
|
+
fieldId?: CmsEditorFieldId;
|
|
249
|
+
label?: string;
|
|
250
|
+
helpText?: string;
|
|
251
|
+
placeholderText?: string;
|
|
252
|
+
validation?: CmsEditorFieldValidator[];
|
|
253
|
+
listValidation?: CmsEditorFieldValidator[];
|
|
254
|
+
multipleValues?: boolean;
|
|
255
|
+
predefinedValues?: CmsEditorFieldPredefinedValues;
|
|
256
|
+
settings?: {
|
|
257
|
+
[key: string]: any;
|
|
258
|
+
};
|
|
259
|
+
renderer: {
|
|
260
|
+
name: string;
|
|
261
|
+
};
|
|
262
|
+
};
|
|
263
|
+
export declare type CmsEditorFieldId = string;
|
|
264
|
+
export declare type CmsEditorFieldsLayout = CmsEditorFieldId[][];
|
|
265
|
+
export interface CmsEditorContentModel {
|
|
266
|
+
id: CmsEditorFieldId;
|
|
267
|
+
group: {
|
|
268
|
+
id: string;
|
|
269
|
+
name: string;
|
|
270
|
+
};
|
|
271
|
+
description?: string;
|
|
272
|
+
version: number;
|
|
273
|
+
layout?: CmsEditorFieldsLayout;
|
|
274
|
+
fields: CmsEditorField[];
|
|
275
|
+
lockedFields: CmsEditorField[];
|
|
276
|
+
name: string;
|
|
277
|
+
modelId: string;
|
|
278
|
+
titleFieldId: string;
|
|
279
|
+
settings: any;
|
|
280
|
+
status: string;
|
|
281
|
+
savedOn: string;
|
|
282
|
+
meta: any;
|
|
283
|
+
}
|
|
284
|
+
export interface CmsEditorContentEntry {
|
|
285
|
+
id: string;
|
|
286
|
+
savedOn: string;
|
|
287
|
+
[key: string]: any;
|
|
288
|
+
meta: {
|
|
289
|
+
title: string;
|
|
290
|
+
publishedOn: string;
|
|
291
|
+
locked: boolean;
|
|
292
|
+
status: "draft" | "published" | "unpublished" | "changesRequested" | "reviewRequested";
|
|
293
|
+
version: number;
|
|
294
|
+
};
|
|
295
|
+
}
|
|
296
|
+
export interface CmsContentEntryRevision {
|
|
297
|
+
id: string;
|
|
298
|
+
savedOn: string;
|
|
299
|
+
meta: {
|
|
300
|
+
title: string;
|
|
301
|
+
publishedOn: string;
|
|
302
|
+
locked: boolean;
|
|
303
|
+
status: "draft" | "published" | "unpublished" | "changesRequested" | "reviewRequested";
|
|
304
|
+
version: number;
|
|
305
|
+
};
|
|
306
|
+
}
|
|
307
|
+
export interface CmsEditorFieldValidator {
|
|
308
|
+
name: string;
|
|
309
|
+
message: string;
|
|
310
|
+
settings: any;
|
|
311
|
+
}
|
|
312
|
+
export interface CmsEditorFieldValidatorPlugin extends Plugin {
|
|
313
|
+
type: "cms-editor-field-validator";
|
|
314
|
+
validator: {
|
|
315
|
+
name: string;
|
|
316
|
+
label: string;
|
|
317
|
+
description: string;
|
|
318
|
+
defaultMessage: string;
|
|
319
|
+
defaultSettings?: Record<string, any>;
|
|
320
|
+
renderSettings?: (props: {
|
|
321
|
+
field: CmsEditorField;
|
|
322
|
+
Bind: BindComponent;
|
|
323
|
+
setValue: (name: string, value: any) => void;
|
|
324
|
+
setMessage: (message: string) => void;
|
|
325
|
+
data: CmsEditorFieldValidator;
|
|
326
|
+
}) => React.ReactElement;
|
|
327
|
+
};
|
|
328
|
+
}
|
|
329
|
+
export declare type CmsEditorContentTab = React.FunctionComponent<{
|
|
330
|
+
activeTab: boolean;
|
|
331
|
+
}>;
|
|
332
|
+
export interface CmsEditorFieldOptionPlugin extends Plugin {
|
|
333
|
+
type: "cms-editor-field-option";
|
|
334
|
+
render(): ReactElement;
|
|
335
|
+
}
|
|
336
|
+
export interface CmsContentDetailsPlugin extends Plugin {
|
|
337
|
+
render: (params: any) => ReactNode;
|
|
338
|
+
}
|
|
339
|
+
export interface CmsContentDetailsRevisionContentPlugin extends Plugin {
|
|
340
|
+
type: "cms-content-details-revision-content";
|
|
341
|
+
render(params: any): ReactElement;
|
|
342
|
+
}
|
|
343
|
+
export interface CmsEditorFieldValidatorPatternPlugin extends Plugin {
|
|
344
|
+
type: "cms-editor-field-validator-pattern";
|
|
345
|
+
pattern: {
|
|
346
|
+
name: string;
|
|
347
|
+
message: string;
|
|
348
|
+
label: string;
|
|
349
|
+
};
|
|
350
|
+
}
|
|
351
|
+
export interface CmsFieldValidator {
|
|
352
|
+
name: string;
|
|
353
|
+
message: any;
|
|
354
|
+
settings: any;
|
|
355
|
+
}
|
|
356
|
+
export interface CmsModelFieldValidatorPlugin extends Plugin {
|
|
357
|
+
type: "cms-model-field-validator";
|
|
358
|
+
validator: {
|
|
359
|
+
name: string;
|
|
360
|
+
validate: (value: any, validator: CmsFieldValidator | any) => Promise<any>;
|
|
361
|
+
};
|
|
362
|
+
}
|
|
363
|
+
/**
|
|
364
|
+
* @category Plugin
|
|
365
|
+
* @category ContentModelField
|
|
366
|
+
* @category FieldValidation
|
|
367
|
+
*/
|
|
368
|
+
export interface CmsModelFieldValidatorPatternPlugin extends Plugin {
|
|
369
|
+
/**
|
|
370
|
+
* A plugin type
|
|
371
|
+
*/
|
|
372
|
+
type: "cms-model-field-validator-pattern";
|
|
373
|
+
/**
|
|
374
|
+
* A pattern object for the validator.
|
|
375
|
+
*/
|
|
376
|
+
pattern: {
|
|
377
|
+
/**
|
|
378
|
+
* name of the pattern.
|
|
379
|
+
*/
|
|
380
|
+
name: string;
|
|
381
|
+
/**
|
|
382
|
+
* RegExp of the validator.
|
|
383
|
+
*/
|
|
384
|
+
regex: string;
|
|
385
|
+
/**
|
|
386
|
+
* RegExp flags
|
|
387
|
+
*/
|
|
388
|
+
flags: string;
|
|
389
|
+
};
|
|
390
|
+
}
|
|
391
|
+
export interface FieldLayoutPosition {
|
|
392
|
+
row: number;
|
|
393
|
+
index: number;
|
|
394
|
+
}
|
|
395
|
+
export interface CmsEditorFormSettingsPlugin extends Plugin {
|
|
396
|
+
type: "cms-editor-form-settings";
|
|
397
|
+
title: string;
|
|
398
|
+
description: string;
|
|
399
|
+
icon: React.ReactElement;
|
|
400
|
+
render(props: {
|
|
401
|
+
Bind: BindComponent;
|
|
402
|
+
form: FormAPI;
|
|
403
|
+
formData: any;
|
|
404
|
+
}): React.ReactNode;
|
|
405
|
+
renderHeaderActions?(props: {
|
|
406
|
+
Bind: BindComponent;
|
|
407
|
+
form: FormAPI;
|
|
408
|
+
formData: any;
|
|
409
|
+
}): React.ReactNode;
|
|
410
|
+
}
|
|
411
|
+
export interface CmsIcon {
|
|
412
|
+
/**
|
|
413
|
+
* [ pack, icon ], ex: ["fab", "cog"]
|
|
414
|
+
*/
|
|
415
|
+
id: [IconPrefix, IconName];
|
|
416
|
+
/**
|
|
417
|
+
* Icon name
|
|
418
|
+
*/
|
|
419
|
+
name: string;
|
|
420
|
+
/**
|
|
421
|
+
* SVG element
|
|
422
|
+
*/
|
|
423
|
+
svg: ReactElement;
|
|
424
|
+
}
|
|
425
|
+
export interface CmsIconsPlugin extends Plugin {
|
|
426
|
+
type: "cms-icons";
|
|
427
|
+
getIcons(): CmsIcon[];
|
|
428
|
+
}
|
|
429
|
+
export interface UseContentModelEditorReducerState {
|
|
430
|
+
apolloClient: ApolloClient<any>;
|
|
431
|
+
id: string;
|
|
432
|
+
}
|
|
433
|
+
/**
|
|
434
|
+
* Transform field value when sending data to the API.
|
|
435
|
+
*/
|
|
436
|
+
export interface CmsFieldValueTransformer extends Plugin {
|
|
437
|
+
/**
|
|
438
|
+
* A plugin type.
|
|
439
|
+
*/
|
|
440
|
+
type: "cms-field-value-transformer";
|
|
441
|
+
/**
|
|
442
|
+
* A field type for the value transformer. Or a list of field types.
|
|
443
|
+
*/
|
|
444
|
+
fieldType: string | string[];
|
|
445
|
+
/**
|
|
446
|
+
* A transformer function that takes a value and returns a new one.
|
|
447
|
+
*/
|
|
448
|
+
transform: (value: any, field: CmsEditorField) => any;
|
|
449
|
+
}
|
|
450
|
+
/**
|
|
451
|
+
* Define a custom form layout renderer for a specific content model.
|
|
452
|
+
*/
|
|
453
|
+
export interface CmsContentFormRendererPlugin extends Plugin {
|
|
454
|
+
/**
|
|
455
|
+
* A plugin type.
|
|
456
|
+
*/
|
|
457
|
+
type: "cms-content-form-renderer";
|
|
458
|
+
/**
|
|
459
|
+
* Content model ID that will use this renderer.
|
|
460
|
+
*/
|
|
461
|
+
modelId: string;
|
|
462
|
+
/**
|
|
463
|
+
* A function that will render a custom form layout.
|
|
464
|
+
*/
|
|
465
|
+
render(props: {
|
|
466
|
+
/**
|
|
467
|
+
* Content model that is being rendered.
|
|
468
|
+
*/
|
|
469
|
+
contentModel: CmsEditorContentModel;
|
|
470
|
+
/**
|
|
471
|
+
* Content entry data handled by the Form element.
|
|
472
|
+
*/
|
|
473
|
+
data: Record<string, any>;
|
|
474
|
+
/**
|
|
475
|
+
* A component to bind data to the Form.
|
|
476
|
+
*/
|
|
477
|
+
Bind: BindComponent;
|
|
478
|
+
/**
|
|
479
|
+
* Content model fields to render.
|
|
480
|
+
*/
|
|
481
|
+
fields: Record<string, React.ReactElement>;
|
|
482
|
+
}): React.ReactNode;
|
|
483
|
+
}
|
|
484
|
+
export {};
|
package/types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|