@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,40 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Grid, Cell } from "@webiny/ui/Grid";
|
|
3
|
+
import { validation } from "@webiny/validation";
|
|
4
|
+
import { createInputField } from "./date/createDateInputField";
|
|
5
|
+
import { FormElementMessage } from "@webiny/ui/FormElementMessage";
|
|
6
|
+
import { getAvailableValidators } from "./date/availableValidators";
|
|
7
|
+
export default (function () {
|
|
8
|
+
return {
|
|
9
|
+
type: "cms-editor-field-validator",
|
|
10
|
+
name: "cms-editor-field-validator-date-lte",
|
|
11
|
+
validator: {
|
|
12
|
+
name: "dateLte",
|
|
13
|
+
label: "Earlier or equal",
|
|
14
|
+
description: "Entered date/time must be equal or earlier compared to the provided date.",
|
|
15
|
+
defaultMessage: "Date/time is later than the provided one.",
|
|
16
|
+
renderSettings: function renderSettings(_ref) {
|
|
17
|
+
var Bind = _ref.Bind,
|
|
18
|
+
field = _ref.field;
|
|
19
|
+
var type = field.settings.type;
|
|
20
|
+
var availableValidators = getAvailableValidators(type).join(",");
|
|
21
|
+
return /*#__PURE__*/React.createElement(Grid, null, /*#__PURE__*/React.createElement(Cell, {
|
|
22
|
+
span: 12
|
|
23
|
+
}, /*#__PURE__*/React.createElement(Bind, {
|
|
24
|
+
name: "settings.type"
|
|
25
|
+
}, function (bind) {
|
|
26
|
+
if (bind.value !== type) {
|
|
27
|
+
bind.onChange(type);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null);
|
|
31
|
+
}), /*#__PURE__*/React.createElement(Bind, {
|
|
32
|
+
name: "settings.value",
|
|
33
|
+
validators: validation.create(availableValidators)
|
|
34
|
+
}, function (bind) {
|
|
35
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, createInputField(field, bind), /*#__PURE__*/React.createElement(FormElementMessage, null, "This is the latest date/time that will be allowed."));
|
|
36
|
+
})));
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
});
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Grid, Cell } from "@webiny/ui/Grid";
|
|
3
|
+
import { Input } from "@webiny/ui/Input";
|
|
4
|
+
import { validation } from "@webiny/validation";
|
|
5
|
+
export default {
|
|
6
|
+
type: "cms-editor-field-validator",
|
|
7
|
+
name: "cms-editor-field-validator-gte",
|
|
8
|
+
validator: {
|
|
9
|
+
name: "gte",
|
|
10
|
+
label: "Greater or equal",
|
|
11
|
+
description: "Entered value must be equal or greater than the provided max value.",
|
|
12
|
+
defaultMessage: "Value is too small.",
|
|
13
|
+
renderSettings: function renderSettings(_ref) {
|
|
14
|
+
var Bind = _ref.Bind;
|
|
15
|
+
return /*#__PURE__*/React.createElement(Grid, null, /*#__PURE__*/React.createElement(Cell, {
|
|
16
|
+
span: 12
|
|
17
|
+
}, /*#__PURE__*/React.createElement(Bind, {
|
|
18
|
+
name: "settings.value",
|
|
19
|
+
validators: validation.create("required,numeric")
|
|
20
|
+
}, /*#__PURE__*/React.createElement(Input, {
|
|
21
|
+
type: "number",
|
|
22
|
+
label: "Value",
|
|
23
|
+
description: "This is the greatest value that will be allowed"
|
|
24
|
+
}))));
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Grid, Cell } from "@webiny/ui/Grid";
|
|
3
|
+
import { Tags } from "@webiny/ui/Tags";
|
|
4
|
+
import { validation } from "@webiny/validation";
|
|
5
|
+
export default {
|
|
6
|
+
type: "cms-editor-field-validator",
|
|
7
|
+
name: "cms-editor-field-validator-in",
|
|
8
|
+
validator: {
|
|
9
|
+
name: "in",
|
|
10
|
+
label: "Specific values",
|
|
11
|
+
description: "You won't be able to submit the form if the field value is not in the list of specified values",
|
|
12
|
+
defaultMessage: "Value is not allowed.",
|
|
13
|
+
renderSettings: function renderSettings(_ref) {
|
|
14
|
+
var Bind = _ref.Bind;
|
|
15
|
+
return /*#__PURE__*/React.createElement(Grid, null, /*#__PURE__*/React.createElement(Cell, {
|
|
16
|
+
span: 12
|
|
17
|
+
}, /*#__PURE__*/React.createElement(Bind, {
|
|
18
|
+
name: "settings.values",
|
|
19
|
+
validators: validation.create("required")
|
|
20
|
+
}, /*#__PURE__*/React.createElement(Tags, {
|
|
21
|
+
label: "Allowed values",
|
|
22
|
+
description: "Hit ENTER to add values"
|
|
23
|
+
}))));
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Grid, Cell } from "@webiny/ui/Grid";
|
|
3
|
+
import { Input } from "@webiny/ui/Input";
|
|
4
|
+
import { validation } from "@webiny/validation";
|
|
5
|
+
export default {
|
|
6
|
+
type: "cms-editor-field-validator",
|
|
7
|
+
name: "cms-editor-field-validator-lte",
|
|
8
|
+
validator: {
|
|
9
|
+
name: "lte",
|
|
10
|
+
label: "Smaller or equal",
|
|
11
|
+
description: "Entered value must be equal or lower than the provided min value.",
|
|
12
|
+
defaultMessage: "Value is too great.",
|
|
13
|
+
renderSettings: function renderSettings(_ref) {
|
|
14
|
+
var Bind = _ref.Bind;
|
|
15
|
+
return /*#__PURE__*/React.createElement(Grid, null, /*#__PURE__*/React.createElement(Cell, {
|
|
16
|
+
span: 12
|
|
17
|
+
}, /*#__PURE__*/React.createElement(Bind, {
|
|
18
|
+
name: "settings.value",
|
|
19
|
+
validators: validation.create("required,numeric")
|
|
20
|
+
}, /*#__PURE__*/React.createElement(Input, {
|
|
21
|
+
type: "number",
|
|
22
|
+
label: "Value",
|
|
23
|
+
description: "This is the greatest value that will be allowed"
|
|
24
|
+
}))));
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Grid, Cell } from "@webiny/ui/Grid";
|
|
3
|
+
import { Input } from "@webiny/ui/Input";
|
|
4
|
+
import { validation } from "@webiny/validation";
|
|
5
|
+
export default {
|
|
6
|
+
type: "cms-editor-field-validator",
|
|
7
|
+
name: "cms-editor-field-validator-max-length",
|
|
8
|
+
validator: {
|
|
9
|
+
name: "maxLength",
|
|
10
|
+
label: "Max length",
|
|
11
|
+
description: "Entered value must not be longer than the provided max length.",
|
|
12
|
+
defaultMessage: "Value is too long.",
|
|
13
|
+
renderSettings: function renderSettings(_ref) {
|
|
14
|
+
var Bind = _ref.Bind;
|
|
15
|
+
return /*#__PURE__*/React.createElement(Grid, null, /*#__PURE__*/React.createElement(Cell, {
|
|
16
|
+
span: 12
|
|
17
|
+
}, /*#__PURE__*/React.createElement(Bind, {
|
|
18
|
+
name: "settings.value",
|
|
19
|
+
validators: validation.create("required,numeric")
|
|
20
|
+
}, /*#__PURE__*/React.createElement(Input, {
|
|
21
|
+
type: "number",
|
|
22
|
+
label: "Value",
|
|
23
|
+
description: "This is the maximum allowed length."
|
|
24
|
+
}))));
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Grid, Cell } from "@webiny/ui/Grid";
|
|
3
|
+
import { Input } from "@webiny/ui/Input";
|
|
4
|
+
import { validation } from "@webiny/validation";
|
|
5
|
+
export default {
|
|
6
|
+
type: "cms-editor-field-validator",
|
|
7
|
+
name: "cms-editor-field-validator-min-length",
|
|
8
|
+
validator: {
|
|
9
|
+
name: "minLength",
|
|
10
|
+
label: "Min length",
|
|
11
|
+
description: "Entered value must not be shorter than the provided min length.",
|
|
12
|
+
defaultMessage: "Value is too short.",
|
|
13
|
+
renderSettings: function renderSettings(_ref) {
|
|
14
|
+
var Bind = _ref.Bind;
|
|
15
|
+
return /*#__PURE__*/React.createElement(Grid, null, /*#__PURE__*/React.createElement(Cell, {
|
|
16
|
+
span: 12
|
|
17
|
+
}, /*#__PURE__*/React.createElement(Bind, {
|
|
18
|
+
name: "settings.value",
|
|
19
|
+
validators: validation.create("required,numeric")
|
|
20
|
+
}, /*#__PURE__*/React.createElement(Input, {
|
|
21
|
+
type: "number",
|
|
22
|
+
label: "Value",
|
|
23
|
+
description: "This is the minimum allowed length."
|
|
24
|
+
}))));
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
};
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Grid, Cell } from "@webiny/ui/Grid";
|
|
3
|
+
import { Input } from "@webiny/ui/Input";
|
|
4
|
+
import { Select } from "@webiny/ui/Select";
|
|
5
|
+
import { plugins } from "@webiny/plugins";
|
|
6
|
+
import { validation } from "@webiny/validation";
|
|
7
|
+
export default {
|
|
8
|
+
type: "cms-editor-field-validator",
|
|
9
|
+
name: "cms-editor-field-validator-pattern",
|
|
10
|
+
validator: {
|
|
11
|
+
name: "pattern",
|
|
12
|
+
label: "Pattern",
|
|
13
|
+
description: "Entered value must match a specific pattern.",
|
|
14
|
+
defaultMessage: "Invalid value.",
|
|
15
|
+
defaultSettings: {
|
|
16
|
+
preset: "custom"
|
|
17
|
+
},
|
|
18
|
+
renderSettings: function renderSettings(_ref) {
|
|
19
|
+
var Bind = _ref.Bind,
|
|
20
|
+
setValue = _ref.setValue,
|
|
21
|
+
setMessage = _ref.setMessage,
|
|
22
|
+
data = _ref.data;
|
|
23
|
+
var inputsDisabled = data.settings.preset !== "custom";
|
|
24
|
+
var presetPlugins = plugins.byType("cms-editor-field-validator-pattern");
|
|
25
|
+
var selectOptions = presetPlugins.map(function (item) {
|
|
26
|
+
return /*#__PURE__*/React.createElement("option", {
|
|
27
|
+
key: item.pattern.name,
|
|
28
|
+
value: item.pattern.name
|
|
29
|
+
}, item.pattern.label);
|
|
30
|
+
});
|
|
31
|
+
return /*#__PURE__*/React.createElement(Grid, null, /*#__PURE__*/React.createElement(Cell, {
|
|
32
|
+
span: 3
|
|
33
|
+
}, /*#__PURE__*/React.createElement(Bind, {
|
|
34
|
+
name: "settings.preset",
|
|
35
|
+
validators: validation.create("required"),
|
|
36
|
+
afterChange: function afterChange(value) {
|
|
37
|
+
if (value === "custom") {
|
|
38
|
+
setMessage("Invalid value.");
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
setValue("settings.regex", null);
|
|
43
|
+
setValue("settings.flags", null);
|
|
44
|
+
var selectedPatternPlugin = presetPlugins.find(function (item) {
|
|
45
|
+
return item.pattern.name === value;
|
|
46
|
+
});
|
|
47
|
+
setMessage(selectedPatternPlugin.pattern.message);
|
|
48
|
+
}
|
|
49
|
+
}, /*#__PURE__*/React.createElement(Select, {
|
|
50
|
+
label: "Preset"
|
|
51
|
+
}, /*#__PURE__*/React.createElement("option", {
|
|
52
|
+
value: "custom"
|
|
53
|
+
}, "Custom"), selectOptions))), /*#__PURE__*/React.createElement(Cell, {
|
|
54
|
+
span: 7
|
|
55
|
+
}, /*#__PURE__*/React.createElement(Bind, {
|
|
56
|
+
name: "settings.regex",
|
|
57
|
+
validators: validation.create("required")
|
|
58
|
+
}, /*#__PURE__*/React.createElement(Input, {
|
|
59
|
+
disabled: inputsDisabled,
|
|
60
|
+
label: "Regex",
|
|
61
|
+
description: "Regex to test the value"
|
|
62
|
+
}))), /*#__PURE__*/React.createElement(Cell, {
|
|
63
|
+
span: 2
|
|
64
|
+
}, /*#__PURE__*/React.createElement(Bind, {
|
|
65
|
+
name: "settings.flags",
|
|
66
|
+
validators: validation.create("required")
|
|
67
|
+
}, /*#__PURE__*/React.createElement(Input, {
|
|
68
|
+
disabled: inputsDisabled,
|
|
69
|
+
label: "Flags",
|
|
70
|
+
description: "Regex flags"
|
|
71
|
+
}))));
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
type: "cms-editor-field-validator",
|
|
3
|
+
name: "cms-editor-field-validator-required",
|
|
4
|
+
validator: {
|
|
5
|
+
name: "required",
|
|
6
|
+
label: "Required",
|
|
7
|
+
description: "You won't be able to submit the form if this field is empty",
|
|
8
|
+
defaultMessage: "Value is required."
|
|
9
|
+
}
|
|
10
|
+
};
|
|
@@ -0,0 +1,108 @@
|
|
|
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 styled from "@emotion/styled";
|
|
7
|
+
import { css } from "emotion";
|
|
8
|
+
import { Grid, Cell, GridInner } from "@webiny/ui/Grid";
|
|
9
|
+
import { i18n } from "@webiny/app/i18n";
|
|
10
|
+
import { DynamicFieldset } from "@webiny/ui/DynamicFieldset";
|
|
11
|
+
import { Typography } from "@webiny/ui/Typography";
|
|
12
|
+
import { ButtonPrimary, ButtonSecondary } from "@webiny/ui/Button";
|
|
13
|
+
import { Input } from "@webiny/ui/Input";
|
|
14
|
+
var t = i18n.ns("app-headless-cms/admin/fields/dynamic-fieldset-predefined-values");
|
|
15
|
+
var Fieldset = /*#__PURE__*/styled("div", {
|
|
16
|
+
target: "e1vzahbl0",
|
|
17
|
+
label: "Fieldset"
|
|
18
|
+
})({
|
|
19
|
+
position: "relative",
|
|
20
|
+
width: "100%",
|
|
21
|
+
marginBottom: 15,
|
|
22
|
+
".webiny-ui-button": {
|
|
23
|
+
position: "absolute",
|
|
24
|
+
display: "block",
|
|
25
|
+
right: 10,
|
|
26
|
+
top: 13
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
var controlButtons = /*#__PURE__*/css({
|
|
30
|
+
display: "flex",
|
|
31
|
+
alignItems: "center",
|
|
32
|
+
justifyContent: "center",
|
|
33
|
+
">button": {
|
|
34
|
+
marginRight: 15
|
|
35
|
+
}
|
|
36
|
+
}, "label:controlButtons;");
|
|
37
|
+
var emptyStyles = /*#__PURE__*/css({
|
|
38
|
+
textAlign: "center"
|
|
39
|
+
}, "label:emptyStyles;");
|
|
40
|
+
var Header = /*#__PURE__*/styled("div", {
|
|
41
|
+
target: "e1vzahbl1",
|
|
42
|
+
label: "Header"
|
|
43
|
+
})({
|
|
44
|
+
display: "flex",
|
|
45
|
+
justifyContent: "space-between",
|
|
46
|
+
marginBottom: 15
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
function PredefinedValuesDynamicFieldset(_ref) {
|
|
50
|
+
var getBind = _ref.getBind,
|
|
51
|
+
_ref$renderValueInput = _ref.renderValueInput,
|
|
52
|
+
renderValueInput = _ref$renderValueInput === void 0 ? null : _ref$renderValueInput;
|
|
53
|
+
var Bind = getBind();
|
|
54
|
+
return /*#__PURE__*/React.createElement(Grid, null, /*#__PURE__*/React.createElement(Cell, {
|
|
55
|
+
span: 12
|
|
56
|
+
}, /*#__PURE__*/React.createElement(Bind, null, /*#__PURE__*/React.createElement(DynamicFieldset, null, function (_ref2) {
|
|
57
|
+
var actions = _ref2.actions,
|
|
58
|
+
header = _ref2.header,
|
|
59
|
+
row = _ref2.row,
|
|
60
|
+
empty = _ref2.empty;
|
|
61
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, row(function (_ref3) {
|
|
62
|
+
var index = _ref3.index;
|
|
63
|
+
var Bind = getBind(index);
|
|
64
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(GridInner, null, /*#__PURE__*/React.createElement(Cell, {
|
|
65
|
+
span: 5
|
|
66
|
+
}, /*#__PURE__*/React.createElement(Fieldset, null, /*#__PURE__*/React.createElement(Bind, {
|
|
67
|
+
name: "label"
|
|
68
|
+
}, /*#__PURE__*/React.createElement(Input, {
|
|
69
|
+
label: t(_templateObject || (_templateObject = _taggedTemplateLiteral(["Label"])))
|
|
70
|
+
})))), /*#__PURE__*/React.createElement(Cell, {
|
|
71
|
+
span: 5
|
|
72
|
+
}, /*#__PURE__*/React.createElement(Fieldset, null, renderValueInput ? renderValueInput(Bind) : /*#__PURE__*/React.createElement(Bind, {
|
|
73
|
+
name: "value"
|
|
74
|
+
}, /*#__PURE__*/React.createElement(Input, {
|
|
75
|
+
label: t(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["Value"])))
|
|
76
|
+
})))), /*#__PURE__*/React.createElement(Cell, {
|
|
77
|
+
span: 2,
|
|
78
|
+
className: controlButtons
|
|
79
|
+
}, /*#__PURE__*/React.createElement(ButtonPrimary, {
|
|
80
|
+
small: true,
|
|
81
|
+
onClick: actions.add(index)
|
|
82
|
+
}, "+"), /*#__PURE__*/React.createElement(ButtonSecondary, {
|
|
83
|
+
small: true,
|
|
84
|
+
onClick: actions.remove(index)
|
|
85
|
+
}, "-"))));
|
|
86
|
+
}), empty(function () {
|
|
87
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Header, null, /*#__PURE__*/React.createElement(Typography, {
|
|
88
|
+
use: "overline"
|
|
89
|
+
}, t(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["Predefined values"]))))), /*#__PURE__*/React.createElement(GridInner, {
|
|
90
|
+
className: emptyStyles
|
|
91
|
+
}, /*#__PURE__*/React.createElement(Cell, {
|
|
92
|
+
span: 12
|
|
93
|
+
}, /*#__PURE__*/React.createElement(Typography, {
|
|
94
|
+
use: "subtitle1"
|
|
95
|
+
}, t(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["There are no predefined values available."]))))), /*#__PURE__*/React.createElement(Cell, {
|
|
96
|
+
span: 12
|
|
97
|
+
}, /*#__PURE__*/React.createElement(ButtonPrimary, {
|
|
98
|
+
onClick: actions.add()
|
|
99
|
+
}, t(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["Add a predefined value"])))))));
|
|
100
|
+
}), header(function () {
|
|
101
|
+
return /*#__PURE__*/React.createElement(Header, null, /*#__PURE__*/React.createElement(Typography, {
|
|
102
|
+
use: "overline"
|
|
103
|
+
}, t(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["Predefined values"])))));
|
|
104
|
+
}));
|
|
105
|
+
}))));
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export default PredefinedValuesDynamicFieldset;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
+
|
|
3
|
+
var _templateObject, _templateObject2, _templateObject3;
|
|
4
|
+
|
|
5
|
+
import React from "react";
|
|
6
|
+
import { ReactComponent as BooleanIcon } from "@svgr/webpack!./icons/toggle_on-black-24px.svg";
|
|
7
|
+
import { i18n } from "@webiny/app/i18n";
|
|
8
|
+
var t = i18n.ns("app-headless-cms/admin/fields");
|
|
9
|
+
var plugin = {
|
|
10
|
+
type: "cms-editor-field-type",
|
|
11
|
+
name: "cms-editor-field-type-boolean",
|
|
12
|
+
field: {
|
|
13
|
+
type: "boolean",
|
|
14
|
+
label: t(_templateObject || (_templateObject = _taggedTemplateLiteral(["Boolean"]))),
|
|
15
|
+
description: t(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["Store boolean (\"yes\" or \"no\" ) values."]))),
|
|
16
|
+
icon: /*#__PURE__*/React.createElement(BooleanIcon, null),
|
|
17
|
+
allowMultipleValues: false,
|
|
18
|
+
allowPredefinedValues: false,
|
|
19
|
+
multipleValuesLabel: t(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["Use as a list of booleans"]))),
|
|
20
|
+
createField: function createField() {
|
|
21
|
+
return {
|
|
22
|
+
type: this.type,
|
|
23
|
+
validation: [],
|
|
24
|
+
renderer: {
|
|
25
|
+
name: ""
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
export default plugin;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
+
import _get from "lodash/get";
|
|
3
|
+
|
|
4
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15;
|
|
5
|
+
|
|
6
|
+
import React from "react";
|
|
7
|
+
import { Grid, Cell } from "@webiny/ui/Grid";
|
|
8
|
+
import { Select } from "@webiny/ui/Select";
|
|
9
|
+
import { Input } from "@webiny/ui/Input";
|
|
10
|
+
import { i18n } from "@webiny/app/i18n";
|
|
11
|
+
import { ReactComponent as DateTimeIcon } from "@svgr/webpack!./icons/schedule-black-24px.svg";
|
|
12
|
+
var t = i18n.ns("app-headless-cms/admin/fields");
|
|
13
|
+
var plugin = {
|
|
14
|
+
type: "cms-editor-field-type",
|
|
15
|
+
name: "cms-editor-field-type-dateTime",
|
|
16
|
+
field: {
|
|
17
|
+
type: "datetime",
|
|
18
|
+
label: t(_templateObject || (_templateObject = _taggedTemplateLiteral(["Date/Time"]))),
|
|
19
|
+
description: t(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["Store date and time."]))),
|
|
20
|
+
icon: /*#__PURE__*/React.createElement(DateTimeIcon, null),
|
|
21
|
+
validators: ["required", "dateGte", "dateLte"],
|
|
22
|
+
allowMultipleValues: true,
|
|
23
|
+
allowPredefinedValues: false,
|
|
24
|
+
// TODO: implement "renderPredefinedValues" and set to true.
|
|
25
|
+
multipleValuesLabel: t(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["Use as a list of dates and times"]))),
|
|
26
|
+
createField: function createField() {
|
|
27
|
+
return {
|
|
28
|
+
type: this.type,
|
|
29
|
+
settings: {
|
|
30
|
+
type: "date"
|
|
31
|
+
},
|
|
32
|
+
validation: [],
|
|
33
|
+
renderer: {
|
|
34
|
+
name: ""
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
},
|
|
38
|
+
renderSettings: function renderSettings(_ref) {
|
|
39
|
+
var _ref$form = _ref.form,
|
|
40
|
+
Bind = _ref$form.Bind,
|
|
41
|
+
data = _ref$form.data,
|
|
42
|
+
contentModel = _ref.contentModel;
|
|
43
|
+
var lockedFields = contentModel.lockedFields || [];
|
|
44
|
+
|
|
45
|
+
var fieldId = _get(data, "fieldId", null);
|
|
46
|
+
|
|
47
|
+
var lockedField = lockedFields.find(function (lockedField) {
|
|
48
|
+
return lockedField.fieldId === fieldId;
|
|
49
|
+
});
|
|
50
|
+
return /*#__PURE__*/React.createElement(Grid, null, /*#__PURE__*/React.createElement(Cell, {
|
|
51
|
+
span: 12
|
|
52
|
+
}, /*#__PURE__*/React.createElement(Bind, {
|
|
53
|
+
name: "placeholderText"
|
|
54
|
+
}, /*#__PURE__*/React.createElement(Input, {
|
|
55
|
+
label: t(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["Placeholder text"]))),
|
|
56
|
+
description: t(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["Placeholder text (optional)"])))
|
|
57
|
+
}))), /*#__PURE__*/React.createElement(Cell, {
|
|
58
|
+
span: 12
|
|
59
|
+
}, /*#__PURE__*/React.createElement(Bind, {
|
|
60
|
+
name: "settings.type"
|
|
61
|
+
}, /*#__PURE__*/React.createElement(Select, {
|
|
62
|
+
label: t(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["Format"]))),
|
|
63
|
+
description: t(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["Cannot be changed later"]))),
|
|
64
|
+
disabled: lockedField && Boolean(lockedField.formatType)
|
|
65
|
+
}, /*#__PURE__*/React.createElement("option", {
|
|
66
|
+
value: t(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["date"])))
|
|
67
|
+
}, t(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["Date only"])))), /*#__PURE__*/React.createElement("option", {
|
|
68
|
+
value: t(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["time"])))
|
|
69
|
+
}, t(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["Time only"])))), /*#__PURE__*/React.createElement("option", {
|
|
70
|
+
value: t(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["dateTimeWithTimezone"])))
|
|
71
|
+
}, t(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["Date and time with timezone"])))), /*#__PURE__*/React.createElement("option", {
|
|
72
|
+
value: t(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["dateTimeWithoutTimezone"])))
|
|
73
|
+
}, t(_templateObject15 || (_templateObject15 = _taggedTemplateLiteral(["Date and time without timezone"]))))))));
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
export default plugin;
|