@akemona-org/strapi-plugin-content-manager 3.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +22 -0
- package/README.md +27 -0
- package/admin/src/InjectedComponents/ContentTypeBuilder/ConfigureViewButton/index.js +78 -0
- package/admin/src/assets/images/background_input.svg +1 -0
- package/admin/src/assets/images/icon-cross-blue.svg +1 -0
- package/admin/src/assets/images/icon_remove.svg +19 -0
- package/admin/src/assets/images/logo.svg +1 -0
- package/admin/src/components/AddDropdown/components.js +113 -0
- package/admin/src/components/AddDropdown/index.js +76 -0
- package/admin/src/components/Block/components.js +28 -0
- package/admin/src/components/Block/index.js +45 -0
- package/admin/src/components/ComponentInitializer/P.js +9 -0
- package/admin/src/components/ComponentInitializer/index.js +43 -0
- package/admin/src/components/Container/index.js +7 -0
- package/admin/src/components/CustomInputCheckbox/components.js +77 -0
- package/admin/src/components/CustomInputCheckbox/index.js +53 -0
- package/admin/src/components/CustomTable/ActionCollapse/Delete.js +14 -0
- package/admin/src/components/CustomTable/ActionCollapse/DeleteAll.js +18 -0
- package/admin/src/components/CustomTable/ActionCollapse/Wrapper.js +20 -0
- package/admin/src/components/CustomTable/ActionCollapse/index.js +38 -0
- package/admin/src/components/CustomTable/Headers/Header.js +59 -0
- package/admin/src/components/CustomTable/Headers/Thead.js +35 -0
- package/admin/src/components/CustomTable/Headers/index.js +46 -0
- package/admin/src/components/CustomTable/Row/ActionContainer.js +19 -0
- package/admin/src/components/CustomTable/Row/Cell.js +55 -0
- package/admin/src/components/CustomTable/Row/index.js +112 -0
- package/admin/src/components/CustomTable/index.js +162 -0
- package/admin/src/components/CustomTable/styledComponents.js +85 -0
- package/admin/src/components/DragLayer/index.js +102 -0
- package/admin/src/components/DraggedField/Close/index.js +10 -0
- package/admin/src/components/DraggedField/GrabWrapper.js +38 -0
- package/admin/src/components/DraggedField/Link.js +17 -0
- package/admin/src/components/DraggedField/NameWrapper.js +29 -0
- package/admin/src/components/DraggedField/RemoveWrapper.js +32 -0
- package/admin/src/components/DraggedField/SubWrapper.js +36 -0
- package/admin/src/components/DraggedField/Wrapper.js +134 -0
- package/admin/src/components/DraggedField/index.js +196 -0
- package/admin/src/components/DraggedField/utils/getColor.js +12 -0
- package/admin/src/components/DraggedField/utils/getHeight.js +3 -0
- package/admin/src/components/DraggedFieldWithPreview/Carret.js +24 -0
- package/admin/src/components/DraggedFieldWithPreview/DynamicComponent.js +70 -0
- package/admin/src/components/DraggedFieldWithPreview/DynamicZoneWrapper.js +10 -0
- package/admin/src/components/DraggedFieldWithPreview/Tooltip.js +19 -0
- package/admin/src/components/DraggedFieldWithPreview/Wrapper.js +24 -0
- package/admin/src/components/DraggedFieldWithPreview/index.js +194 -0
- package/admin/src/components/DynamicComponentCard/Wrapper.js +63 -0
- package/admin/src/components/DynamicComponentCard/index.js +49 -0
- package/admin/src/components/DynamicZone/BaselineAlignement.js +11 -0
- package/admin/src/components/DynamicZone/Button.js +31 -0
- package/admin/src/components/DynamicZone/Component/RoundCTA.js +45 -0
- package/admin/src/components/DynamicZone/Component/index.js +79 -0
- package/admin/src/components/DynamicZone/ComponentWrapper.js +44 -0
- package/admin/src/components/DynamicZone/DynamicZoneWrapper.js +12 -0
- package/admin/src/components/DynamicZone/Label.js +42 -0
- package/admin/src/components/DynamicZone/Picker/Category/Banner/Wrapper.js +78 -0
- package/admin/src/components/DynamicZone/Picker/Category/Banner/index.js +33 -0
- package/admin/src/components/DynamicZone/Picker/Category/index.js +53 -0
- package/admin/src/components/DynamicZone/Picker/Wrapper.js +32 -0
- package/admin/src/components/DynamicZone/Picker/index.js +88 -0
- package/admin/src/components/DynamicZone/Wrapper.js +34 -0
- package/admin/src/components/DynamicZone/index.js +238 -0
- package/admin/src/components/DynamicZone/utils/connect.js +12 -0
- package/admin/src/components/DynamicZone/utils/select.js +49 -0
- package/admin/src/components/FieldComponent/ComponentIcon.js +44 -0
- package/admin/src/components/FieldComponent/EmptyComponent.js +19 -0
- package/admin/src/components/FieldComponent/Label.js +10 -0
- package/admin/src/components/FieldComponent/ResetComponent.js +41 -0
- package/admin/src/components/FieldComponent/Wrapper.js +18 -0
- package/admin/src/components/FieldComponent/index.js +171 -0
- package/admin/src/components/FieldComponent/utils/connect.js +12 -0
- package/admin/src/components/FieldComponent/utils/select.js +123 -0
- package/admin/src/components/FieldsReorder/Item.js +249 -0
- package/admin/src/components/FieldsReorder/components.js +8 -0
- package/admin/src/components/FieldsReorder/index.js +102 -0
- package/admin/src/components/FilterOptionsCTA/index.js +14 -0
- package/admin/src/components/FilterPicker/components.js +56 -0
- package/admin/src/components/FilterPicker/index.js +258 -0
- package/admin/src/components/FilterPicker/init.js +25 -0
- package/admin/src/components/FilterPicker/reducer.js +58 -0
- package/admin/src/components/FilterPickerOption/Input.js +58 -0
- package/admin/src/components/FilterPickerOption/Option.js +18 -0
- package/admin/src/components/FilterPickerOption/components.js +60 -0
- package/admin/src/components/FilterPickerOption/index.js +101 -0
- package/admin/src/components/FormTitle/index.js +26 -0
- package/admin/src/components/FormWrapper/index.js +20 -0
- package/admin/src/components/InputJSON/components.js +30 -0
- package/admin/src/components/InputJSON/index.js +184 -0
- package/admin/src/components/InputJSON/jsonlint.js +424 -0
- package/admin/src/components/InputJSONWithErrors/Wrapper.js +32 -0
- package/admin/src/components/InputJSONWithErrors/index.js +168 -0
- package/admin/src/components/InputUID/InputUID.js +26 -0
- package/admin/src/components/InputUID/Options/Option.js +22 -0
- package/admin/src/components/InputUID/Options/OptionsTitle.js +12 -0
- package/admin/src/components/InputUID/Options/RightOptionLabel.js +10 -0
- package/admin/src/components/InputUID/Options/index.js +34 -0
- package/admin/src/components/InputUID/Options/wrapper.js +13 -0
- package/admin/src/components/InputUID/RegenerateButton.js +18 -0
- package/admin/src/components/InputUID/RightContent.js +14 -0
- package/admin/src/components/InputUID/RightContentLabel.js +10 -0
- package/admin/src/components/InputUID/RightLabel.js +42 -0
- package/admin/src/components/InputUID/SubLabel.js +9 -0
- package/admin/src/components/InputUID/Wrapper.js +8 -0
- package/admin/src/components/InputUID/index.js +325 -0
- package/admin/src/components/InputUID/regex.js +3 -0
- package/admin/src/components/Inputs/index.js +283 -0
- package/admin/src/components/Inputs/utils/VALIDATIONS_TO_OMIT.js +12 -0
- package/admin/src/components/Inputs/utils/connect.js +12 -0
- package/admin/src/components/Inputs/utils/generateOptions.js +19 -0
- package/admin/src/components/Inputs/utils/getInputType.js +44 -0
- package/admin/src/components/Inputs/utils/getStep.js +15 -0
- package/admin/src/components/Inputs/utils/index.js +6 -0
- package/admin/src/components/Inputs/utils/select.js +38 -0
- package/admin/src/components/LayoutTitle/index.js +19 -0
- package/admin/src/components/MediaPreviewList/StyledMediaPreviewList.js +171 -0
- package/admin/src/components/MediaPreviewList/index.js +110 -0
- package/admin/src/components/NonRepeatableComponent/index.js +73 -0
- package/admin/src/components/NonRepeatableWrapper/index.js +73 -0
- package/admin/src/components/PlusButton/index.js +52 -0
- package/admin/src/components/PopupForm/index.js +93 -0
- package/admin/src/components/PreviewCarret/components.js +27 -0
- package/admin/src/components/PreviewCarret/index.js +22 -0
- package/admin/src/components/PreviewWysiwyg/Wrapper.js +133 -0
- package/admin/src/components/PreviewWysiwyg/index.js +34 -0
- package/admin/src/components/PreviewWysiwyg/utils/mdRenderer.js +72 -0
- package/admin/src/components/PreviewWysiwyg/utils/satinizeHtml.js +16 -0
- package/admin/src/components/RelationPreviewList/CountWrapper.js +7 -0
- package/admin/src/components/RelationPreviewList/RelationPreviewTooltip.js +117 -0
- package/admin/src/components/RelationPreviewList/index.js +111 -0
- package/admin/src/components/RepeatableComponent/AddFieldButton.js +64 -0
- package/admin/src/components/RepeatableComponent/Banner.js +112 -0
- package/admin/src/components/RepeatableComponent/BannerWrapper.js +194 -0
- package/admin/src/components/RepeatableComponent/CarretTop.js +14 -0
- package/admin/src/components/RepeatableComponent/DraggedItem/index.js +245 -0
- package/admin/src/components/RepeatableComponent/DraggedItem/utils/connect.js +11 -0
- package/admin/src/components/RepeatableComponent/DraggedItem/utils/index.js +2 -0
- package/admin/src/components/RepeatableComponent/DraggedItem/utils/select.js +30 -0
- package/admin/src/components/RepeatableComponent/EmptyComponent.js +27 -0
- package/admin/src/components/RepeatableComponent/FormWrapper.js +27 -0
- package/admin/src/components/RepeatableComponent/index.js +187 -0
- package/admin/src/components/RepeatableComponent/reducer.js +73 -0
- package/admin/src/components/RepeatableComponent/utils/connect.js +11 -0
- package/admin/src/components/RepeatableComponent/utils/select.js +12 -0
- package/admin/src/components/Search/index.js +88 -0
- package/admin/src/components/SectionTitle/Title.js +11 -0
- package/admin/src/components/SectionTitle/index.js +29 -0
- package/admin/src/components/SelectMany/ListItem.js +107 -0
- package/admin/src/components/SelectMany/Relation.js +106 -0
- package/admin/src/components/SelectMany/components.js +153 -0
- package/admin/src/components/SelectMany/index.js +159 -0
- package/admin/src/components/SelectOne/SingleValue.js +58 -0
- package/admin/src/components/SelectOne/index.js +71 -0
- package/admin/src/components/SelectWrapper/ClearIndicator.js +15 -0
- package/admin/src/components/SelectWrapper/IndicatorSeparator.js +3 -0
- package/admin/src/components/SelectWrapper/Option.js +76 -0
- package/admin/src/components/SelectWrapper/components.js +14 -0
- package/admin/src/components/SelectWrapper/index.js +393 -0
- package/admin/src/components/SelectWrapper/utils/connect.js +12 -0
- package/admin/src/components/SelectWrapper/utils/index.js +3 -0
- package/admin/src/components/SelectWrapper/utils/select.js +45 -0
- package/admin/src/components/SelectWrapper/utils/styles.js +105 -0
- package/admin/src/components/Separator/index.js +9 -0
- package/admin/src/components/SettingFormWrapper/index.js +9 -0
- package/admin/src/components/SettingsViewWrapper/index.js +283 -0
- package/admin/src/components/SortWrapper/index.js +9 -0
- package/admin/src/components/SortableList/Item.js +126 -0
- package/admin/src/components/SortableList/index.js +60 -0
- package/admin/src/components/State/Wrapper.js +30 -0
- package/admin/src/components/State/index.js +26 -0
- package/admin/src/components/Truncate/index.js +5 -0
- package/admin/src/components/Truncated/index.js +10 -0
- package/admin/src/components/Wysiwyg/EditorWrapper.js +122 -0
- package/admin/src/components/Wysiwyg/MediaLib.js +71 -0
- package/admin/src/components/Wysiwyg/PreviewControlWrapper.js +30 -0
- package/admin/src/components/Wysiwyg/SelectWrapper.js +24 -0
- package/admin/src/components/Wysiwyg/ToggleModeWrapper.js +30 -0
- package/admin/src/components/Wysiwyg/constants.js +98 -0
- package/admin/src/components/Wysiwyg/customSelect.js +39 -0
- package/admin/src/components/Wysiwyg/helpers.js +116 -0
- package/admin/src/components/Wysiwyg/index.js +819 -0
- package/admin/src/components/Wysiwyg/previewControl.js +29 -0
- package/admin/src/components/Wysiwyg/toggleMode.js +44 -0
- package/admin/src/components/Wysiwyg/utils.js +70 -0
- package/admin/src/components/WysiwygBottomControls/components.js +44 -0
- package/admin/src/components/WysiwygBottomControls/index.js +33 -0
- package/admin/src/components/WysiwygDropUpload/Label.js +16 -0
- package/admin/src/components/WysiwygDropUpload/index.js +18 -0
- package/admin/src/components/WysiwygEditor/index.js +26 -0
- package/admin/src/components/WysiwygInlineControls/Button.js +77 -0
- package/admin/src/components/WysiwygInlineControls/StyledButton.js +54 -0
- package/admin/src/components/WysiwygInlineControls/Wrapper.js +25 -0
- package/admin/src/components/WysiwygInlineControls/index.js +66 -0
- package/admin/src/components/WysiwygWithErrors/Wrapper.js +38 -0
- package/admin/src/components/WysiwygWithErrors/index.js +158 -0
- package/admin/src/containers/CollectionTypeFormWrapper/index.js +376 -0
- package/admin/src/containers/CollectionTypeFormWrapper/utils/getRequestUrl.js +5 -0
- package/admin/src/containers/CollectionTypeFormWrapper/utils/index.js +2 -0
- package/admin/src/containers/CollectionTypeRecursivePath/index.js +125 -0
- package/admin/src/containers/ComponentSetttingsView/index.js +55 -0
- package/admin/src/containers/EditSettingsView/index.js +408 -0
- package/admin/src/containers/EditSettingsView/init.js +18 -0
- package/admin/src/containers/EditSettingsView/reducer.js +126 -0
- package/admin/src/containers/EditSettingsView/utils/createPossibleMainFieldsForModelsAndComponents.js +26 -0
- package/admin/src/containers/EditSettingsView/utils/getInputProps.js +30 -0
- package/admin/src/containers/EditSettingsView/utils/index.js +2 -0
- package/admin/src/containers/EditSettingsView/utils/layout.js +98 -0
- package/admin/src/containers/EditView/DeleteLink/index.js +94 -0
- package/admin/src/containers/EditView/DeleteLink/utils/connect.js +12 -0
- package/admin/src/containers/EditView/DeleteLink/utils/index.js +2 -0
- package/admin/src/containers/EditView/DeleteLink/utils/select.js +21 -0
- package/admin/src/containers/EditView/Header/index.js +258 -0
- package/admin/src/containers/EditView/Header/utils/connect.js +12 -0
- package/admin/src/containers/EditView/Header/utils/getDraftRelations.js +62 -0
- package/admin/src/containers/EditView/Header/utils/index.js +3 -0
- package/admin/src/containers/EditView/Header/utils/select.js +31 -0
- package/admin/src/containers/EditView/InformationCard.js +100 -0
- package/admin/src/containers/EditView/components.js +74 -0
- package/admin/src/containers/EditView/index.js +297 -0
- package/admin/src/containers/EditView/utils/createAttributesLayout.js +39 -0
- package/admin/src/containers/EditView/utils/getFieldsActionMatchingPermissions.js +23 -0
- package/admin/src/containers/EditView/utils/index.js +3 -0
- package/admin/src/containers/EditViewDataManagerProvider/index.js +519 -0
- package/admin/src/containers/EditViewDataManagerProvider/reducer.js +218 -0
- package/admin/src/containers/EditViewDataManagerProvider/utils/cleanData.js +88 -0
- package/admin/src/containers/EditViewDataManagerProvider/utils/getYupInnerErrors.js +17 -0
- package/admin/src/containers/EditViewDataManagerProvider/utils/index.js +3 -0
- package/admin/src/containers/EditViewDataManagerProvider/utils/schema.js +368 -0
- package/admin/src/containers/EditViewLayoutManager/Permissions.js +30 -0
- package/admin/src/containers/EditViewLayoutManager/actions.js +9 -0
- package/admin/src/containers/EditViewLayoutManager/constants.js +2 -0
- package/admin/src/containers/EditViewLayoutManager/index.js +44 -0
- package/admin/src/containers/EditViewLayoutManager/reducer.js +30 -0
- package/admin/src/containers/EditViewLayoutManager/selectors.js +5 -0
- package/admin/src/containers/LayoutDndProvider/index.js +75 -0
- package/admin/src/containers/ListSettingsView/DragWrapper.js +21 -0
- package/admin/src/containers/ListSettingsView/DropdownButton.js +8 -0
- package/admin/src/containers/ListSettingsView/Label.js +91 -0
- package/admin/src/containers/ListSettingsView/MenuDropdown.js +41 -0
- package/admin/src/containers/ListSettingsView/Toggle.js +51 -0
- package/admin/src/containers/ListSettingsView/forms.json +64 -0
- package/admin/src/containers/ListSettingsView/index.js +298 -0
- package/admin/src/containers/ListSettingsView/init.js +11 -0
- package/admin/src/containers/ListSettingsView/reducer.js +77 -0
- package/admin/src/containers/ListView/FieldPicker/ConfigureLink/StyledLink.js +28 -0
- package/admin/src/containers/ListView/FieldPicker/ConfigureLink/Wrapper.js +8 -0
- package/admin/src/containers/ListView/FieldPicker/ConfigureLink/index.js +29 -0
- package/admin/src/containers/ListView/FieldPicker/Field/Wrapper.js +15 -0
- package/admin/src/containers/ListView/FieldPicker/Field/index.js +24 -0
- package/admin/src/containers/ListView/FieldPicker/Fields/Wrapper.js +18 -0
- package/admin/src/containers/ListView/FieldPicker/Fields/index.js +27 -0
- package/admin/src/containers/ListView/FieldPicker/Header/Reset.js +8 -0
- package/admin/src/containers/ListView/FieldPicker/Header/index.js +42 -0
- package/admin/src/containers/ListView/FieldPicker/Wrapper.js +9 -0
- package/admin/src/containers/ListView/FieldPicker/index.js +46 -0
- package/admin/src/containers/ListView/Filter.js +83 -0
- package/admin/src/containers/ListView/Footer.js +60 -0
- package/admin/src/containers/ListView/actions.js +91 -0
- package/admin/src/containers/ListView/components.js +138 -0
- package/admin/src/containers/ListView/constants.js +16 -0
- package/admin/src/containers/ListView/index.js +573 -0
- package/admin/src/containers/ListView/reducer.js +182 -0
- package/admin/src/containers/ListView/selectors.js +24 -0
- package/admin/src/containers/ListView/utils/buildQueryString.js +26 -0
- package/admin/src/containers/ListView/utils/createPluginsFilter.js +13 -0
- package/admin/src/containers/ListView/utils/getAllAllowedHeaders.js +17 -0
- package/admin/src/containers/ListView/utils/getFirstSortableHeader.js +14 -0
- package/admin/src/containers/ListView/utils/index.js +3 -0
- package/admin/src/containers/ListViewLayoutManager/Permissions.js +29 -0
- package/admin/src/containers/ListViewLayoutManager/index.js +60 -0
- package/admin/src/containers/ListViewProvider/index.js +16 -0
- package/admin/src/containers/Main/actions.js +13 -0
- package/admin/src/containers/Main/constants.js +3 -0
- package/admin/src/containers/Main/index.js +100 -0
- package/admin/src/containers/Main/reducer.js +37 -0
- package/admin/src/containers/Main/selectors.js +20 -0
- package/admin/src/containers/RBACManager/actions.js +14 -0
- package/admin/src/containers/RBACManager/constants.js +2 -0
- package/admin/src/containers/RBACManager/reducer.js +32 -0
- package/admin/src/containers/RBACManager/useSyncRbac.js +28 -0
- package/admin/src/containers/SingleTypeFormWrapper/index.js +317 -0
- package/admin/src/containers/SingleTypeFormWrapper/utils/getRequestUrl.js +5 -0
- package/admin/src/containers/SingleTypeFormWrapper/utils/index.js +2 -0
- package/admin/src/containers/SingleTypeRecursivePath/index.js +84 -0
- package/admin/src/containers/WysiwygProvider/index.js +16 -0
- package/admin/src/contexts/ContentTypeLayout.js +5 -0
- package/admin/src/contexts/LayoutDnd.js +5 -0
- package/admin/src/contexts/ListView.js +5 -0
- package/admin/src/contexts/Wysiwyg.js +5 -0
- package/admin/src/contexts/index.js +4 -0
- package/admin/src/hooks/index.js +6 -0
- package/admin/src/hooks/useContentTypeLayout/index.js +19 -0
- package/admin/src/hooks/useFetchContentTypeLayout/index.js +83 -0
- package/admin/src/hooks/useFetchContentTypeLayout/reducer.js +56 -0
- package/admin/src/hooks/useFetchContentTypeLayout/utils/formatLayouts.js +235 -0
- package/admin/src/hooks/useFindRedirectionLink/index.js +14 -0
- package/admin/src/hooks/useFindRedirectionLink/selectors.js +7 -0
- package/admin/src/hooks/useFindRedirectionLink/utils/getRedirectionLink.js +45 -0
- package/admin/src/hooks/useLayoutDnd.js +6 -0
- package/admin/src/hooks/useListView.js +6 -0
- package/admin/src/hooks/useWysiwyg.js +6 -0
- package/admin/src/icons/Bold/index.js +22 -0
- package/admin/src/icons/Code/index.js +13 -0
- package/admin/src/icons/Cross/index.js +33 -0
- package/admin/src/icons/Italic/index.js +23 -0
- package/admin/src/icons/Link/index.js +21 -0
- package/admin/src/icons/Media/index.js +14 -0
- package/admin/src/icons/Na/index.js +58 -0
- package/admin/src/icons/Ol/index.js +13 -0
- package/admin/src/icons/Quote/index.js +13 -0
- package/admin/src/icons/Striked/index.js +24 -0
- package/admin/src/icons/Ul/index.js +15 -0
- package/admin/src/icons/Underline/index.js +22 -0
- package/admin/src/index.js +52 -0
- package/admin/src/lifecycles.js +19 -0
- package/admin/src/permissions.js +27 -0
- package/admin/src/pluginId.js +5 -0
- package/admin/src/reducers.js +16 -0
- package/admin/src/selectors.js +6 -0
- package/admin/src/sharedReducers/crudReducer/actions.js +44 -0
- package/admin/src/sharedReducers/crudReducer/constants.js +7 -0
- package/admin/src/sharedReducers/crudReducer/reducer.js +75 -0
- package/admin/src/sharedReducers/crudReducer/selectors.js +5 -0
- package/admin/src/testUtils/data.js +305 -0
- package/admin/src/testUtils/index.js +4 -0
- package/admin/src/translations/ar.json +94 -0
- package/admin/src/translations/cs.json +130 -0
- package/admin/src/translations/de.json +177 -0
- package/admin/src/translations/dk.json +180 -0
- package/admin/src/translations/en.json +177 -0
- package/admin/src/translations/es.json +177 -0
- package/admin/src/translations/fr.json +162 -0
- package/admin/src/translations/id.json +175 -0
- package/admin/src/translations/index.js +53 -0
- package/admin/src/translations/it.json +177 -0
- package/admin/src/translations/ja.json +94 -0
- package/admin/src/translations/ko.json +110 -0
- package/admin/src/translations/ms.json +148 -0
- package/admin/src/translations/nl.json +94 -0
- package/admin/src/translations/pl.json +142 -0
- package/admin/src/translations/pt-BR.json +94 -0
- package/admin/src/translations/pt.json +94 -0
- package/admin/src/translations/ru.json +177 -0
- package/admin/src/translations/sk.json +172 -0
- package/admin/src/translations/th.json +155 -0
- package/admin/src/translations/tr.json +177 -0
- package/admin/src/translations/uk.json +148 -0
- package/admin/src/translations/vi.json +110 -0
- package/admin/src/translations/zh-Hans.json +177 -0
- package/admin/src/translations/zh.json +94 -0
- package/admin/src/utils/ItemTypes.js +7 -0
- package/admin/src/utils/checkIfAttributeIsDisplayable.js +13 -0
- package/admin/src/utils/createDefaultForm.js +50 -0
- package/admin/src/utils/dateFormats.js +18 -0
- package/admin/src/utils/formatFiltersFromQuery.js +55 -0
- package/admin/src/utils/formatFiltersToQuery.js +27 -0
- package/admin/src/utils/formatLayoutToApi.js +44 -0
- package/admin/src/utils/generatePermissionsObject.js +20 -0
- package/admin/src/utils/getComponents.js +50 -0
- package/admin/src/utils/getDisplayedValue.js +61 -0
- package/admin/src/utils/getFieldName.js +6 -0
- package/admin/src/utils/getMaxTempKey.js +12 -0
- package/admin/src/utils/getRequestUrl.js +5 -0
- package/admin/src/utils/getTrad.js +5 -0
- package/admin/src/utils/index.js +17 -0
- package/admin/src/utils/mergeMetasWithSchema.js +20 -0
- package/admin/src/utils/removeKeyInObject.js +45 -0
- package/admin/src/utils/removePasswordFieldsFromData.js +54 -0
- package/config/admin.json +5 -0
- package/config/functions/bootstrap.js +9 -0
- package/config/policies/has-draft-and-publish.js +19 -0
- package/config/policies/hasPermissions.js +34 -0
- package/config/policies/routing.js +27 -0
- package/config/routes.json +275 -0
- package/controllers/collection-types.js +282 -0
- package/controllers/components.js +66 -0
- package/controllers/content-types.js +112 -0
- package/controllers/relations.js +63 -0
- package/controllers/single-types.js +170 -0
- package/controllers/uid.js +41 -0
- package/controllers/validation/index.js +104 -0
- package/controllers/validation/model-configuration.js +114 -0
- package/oas.yml +757 -0
- package/package.json +77 -0
- package/services/components.js +92 -0
- package/services/configuration.js +79 -0
- package/services/content-types.js +73 -0
- package/services/data-mapper.js +98 -0
- package/services/entity-manager.js +140 -0
- package/services/metrics.js +34 -0
- package/services/permission-checker.js +69 -0
- package/services/permission.js +95 -0
- package/services/uid.js +63 -0
- package/services/utils/configuration/attributes.js +175 -0
- package/services/utils/configuration/index.js +43 -0
- package/services/utils/configuration/layouts.js +185 -0
- package/services/utils/configuration/metadatas.js +142 -0
- package/services/utils/configuration/settings.js +52 -0
- package/services/utils/store.js +93 -0
- package/utils/index.js +16 -0
- package/utils/pick-writable-attributes.js +6 -0
- package/utils/wrap-bad-request.js +15 -0
- package/validation/policies/hasPermissions.js +17 -0
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
{
|
|
2
|
+
"EditRelations.title": "关联数据",
|
|
3
|
+
"api.id": "API ID",
|
|
4
|
+
"components.AddFilterCTA.add": "过滤器",
|
|
5
|
+
"components.AddFilterCTA.hide": "过滤器",
|
|
6
|
+
"components.DraggableAttr.edit": "点击以编辑",
|
|
7
|
+
"components.DynamicZone.add-compo": "添加到 {componentName}",
|
|
8
|
+
"components.DynamicZone.missing.plural": "有 {count} 个缺少的组件",
|
|
9
|
+
"components.DynamicZone.missing.singular": "有 {count} 个缺少的组件",
|
|
10
|
+
"components.DynamicZone.pick-compo": "选择一个组件",
|
|
11
|
+
"components.DynamicZone.required": "必须选择组件",
|
|
12
|
+
"components.EmptyAttributesBlock.button": "前往设置页面",
|
|
13
|
+
"components.EmptyAttributesBlock.description": "您可以更改设置",
|
|
14
|
+
"components.FieldItem.linkToComponentLayout": "设置组件的布局",
|
|
15
|
+
"components.FilterOptions.button.apply": "应用",
|
|
16
|
+
"components.FiltersPickWrapper.PluginHeader.actions.apply": "应用",
|
|
17
|
+
"components.FiltersPickWrapper.PluginHeader.actions.clearAll": "清除",
|
|
18
|
+
"components.FiltersPickWrapper.PluginHeader.description": "设置过滤条件",
|
|
19
|
+
"components.FiltersPickWrapper.PluginHeader.title.filter": "过滤器",
|
|
20
|
+
"components.FiltersPickWrapper.hide": "隐藏",
|
|
21
|
+
"components.LimitSelect.itemsPerPage": "每页展示数目",
|
|
22
|
+
"components.NotAllowedInput.text": "没有权限查看该字段",
|
|
23
|
+
"components.Search.placeholder": "搜索...",
|
|
24
|
+
"components.Select.draft-info-title": "状态: 草稿",
|
|
25
|
+
"components.Select.publish-info-title": "状态: 已发布",
|
|
26
|
+
"components.SettingsViewWrapper.pluginHeader.description.edit-settings": "自定义编辑视图的外观。",
|
|
27
|
+
"components.SettingsViewWrapper.pluginHeader.description.list-settings": "定义列表视图的设置。",
|
|
28
|
+
"components.SettingsViewWrapper.pluginHeader.title": "配置视图 :{name}",
|
|
29
|
+
"components.TableDelete.delete": "刪除所有",
|
|
30
|
+
"components.TableDelete.deleteSelected": "删除所选",
|
|
31
|
+
"components.TableDelete.entries.plural": "已选取 {number} 条记录",
|
|
32
|
+
"components.TableDelete.entries.singular": "已选取 {number} 条记录",
|
|
33
|
+
"components.TableEmpty.withFilters": "没有找到与 {contentType} 相关的内容",
|
|
34
|
+
"components.TableEmpty.withSearch": "在 {contentType} 中没有找到符合 “{search}” 的内容",
|
|
35
|
+
"components.TableEmpty.withoutFilter": "没有找到 {contentType}",
|
|
36
|
+
"components.empty-repeatable": "暂无内容,点击按钮来添加",
|
|
37
|
+
"components.repeatable.reorder.error": "渲染组件字段时出现了一个错误,请重试",
|
|
38
|
+
"components.notification.info.maximum-requirement": "字段数量已到上限",
|
|
39
|
+
"components.notification.info.minimum-requirement": "已添加一个字段,以满足最低要求",
|
|
40
|
+
"components.reset-entry": "重置记录",
|
|
41
|
+
"components.uid.apply": "应用",
|
|
42
|
+
"components.uid.available": "可用",
|
|
43
|
+
"components.uid.regenerate": "重新生成",
|
|
44
|
+
"components.uid.suggested": "建议",
|
|
45
|
+
"components.uid.unavailable": "不可用",
|
|
46
|
+
"containers.Edit.Link.Fields": "编辑字段",
|
|
47
|
+
"containers.Edit.Link.Layout": "编辑布局",
|
|
48
|
+
"containers.Edit.Link.Model": "编辑该内容类型",
|
|
49
|
+
"containers.Edit.addAnItem": "新增关联...",
|
|
50
|
+
"containers.Edit.clickToJump": "跳转到该项记录",
|
|
51
|
+
"containers.Edit.delete": "删除",
|
|
52
|
+
"containers.Edit.delete-entry": "删除该记录",
|
|
53
|
+
"containers.Edit.editing": "编辑...",
|
|
54
|
+
"containers.Edit.information": "记录信息",
|
|
55
|
+
"containers.Edit.information.by": "属于",
|
|
56
|
+
"containers.Edit.information.draftVersion": "草稿版本",
|
|
57
|
+
"containers.Edit.information.editing": "正在编辑",
|
|
58
|
+
"containers.Edit.information.lastUpdate": "最后更新",
|
|
59
|
+
"containers.Edit.information.publishedVersion": "已发布版本",
|
|
60
|
+
"containers.Edit.pluginHeader.title.new": "创建记录",
|
|
61
|
+
"containers.Edit.reset": "重置",
|
|
62
|
+
"containers.Edit.returnList": "返回列表",
|
|
63
|
+
"containers.Edit.seeDetails": "详细信息",
|
|
64
|
+
"containers.Edit.submit": "保存",
|
|
65
|
+
"containers.EditSettingsView.modal-form.edit-field": "编辑字段",
|
|
66
|
+
"containers.EditView.add.new": "新增记录",
|
|
67
|
+
"containers.EditView.components.missing.plural": "缺失 {count} 个组件",
|
|
68
|
+
"containers.EditView.components.missing.singular": "缺少 {count} 个组件",
|
|
69
|
+
"containers.EditView.notification.errors": "表单包含一些错误",
|
|
70
|
+
"containers.Home.introduction": "要编辑您的记录,请转到左边菜单中的特定链接。这个插件没有合适的方法来编辑设置,它仍然在积极的开发中。",
|
|
71
|
+
"containers.Home.pluginHeaderDescription": "通过一个强大而漂亮的界面管理你的记录。",
|
|
72
|
+
"containers.Home.pluginHeaderTitle": "内容管理器",
|
|
73
|
+
"containers.List.addAnEntry": "增加新的 {entity}",
|
|
74
|
+
"containers.List.draft": "草稿",
|
|
75
|
+
"containers.List.errorFetchRecords": "错误",
|
|
76
|
+
"containers.List.pluginHeaderDescription": "找到 {label} 条记录",
|
|
77
|
+
"containers.List.pluginHeaderDescription.singular": "找到 {label} 条记录",
|
|
78
|
+
"containers.List.published": "已发布",
|
|
79
|
+
"containers.ListPage.displayedFields": "展示的字段",
|
|
80
|
+
"containers.ListPage.items.plural": "项目",
|
|
81
|
+
"containers.ListPage.items.singular": "项目",
|
|
82
|
+
"containers.ListPage.table-headers.published_at": "发布状态",
|
|
83
|
+
"containers.ListSettingsView.modal-form.edit-label": "编辑标签",
|
|
84
|
+
"containers.SettingPage.add.field": "新增字段",
|
|
85
|
+
"containers.SettingPage.add.relational-field": "新增关联字段",
|
|
86
|
+
"containers.SettingPage.attributes": "属性",
|
|
87
|
+
"containers.SettingPage.attributes.description": "调整字段的顺序",
|
|
88
|
+
"containers.SettingPage.editSettings.description": "拖拽字段来布局",
|
|
89
|
+
"containers.SettingPage.editSettings.entry.title": "标题",
|
|
90
|
+
"containers.SettingPage.editSettings.entry.title.description": "设置展示的字段",
|
|
91
|
+
"containers.SettingPage.editSettings.relation-field.description": "设置编辑和列表页面的展示文本",
|
|
92
|
+
"containers.SettingPage.editSettings.title": "编辑展示字段",
|
|
93
|
+
"containers.SettingPage.layout": "布局",
|
|
94
|
+
"containers.SettingPage.listSettings.description": "编辑集合类型的配置",
|
|
95
|
+
"containers.SettingPage.listSettings.title": "列表 (设置)",
|
|
96
|
+
"containers.SettingPage.pluginHeaderDescription": "编辑集合类型的特定配置",
|
|
97
|
+
"containers.SettingPage.relations": "关联字段",
|
|
98
|
+
"containers.SettingPage.settings": "设置",
|
|
99
|
+
"containers.SettingPage.view": "视图",
|
|
100
|
+
"containers.SettingViewModel.pluginHeader.title": "内容管理:{name}",
|
|
101
|
+
"containers.SettingsPage.Block.contentType.description": "调整指定内容类型的的字段",
|
|
102
|
+
"containers.SettingsPage.Block.contentType.title": "集合类型",
|
|
103
|
+
"containers.SettingsPage.Block.generalSettings.description": "编辑所有集合类型的默认配置",
|
|
104
|
+
"containers.SettingsPage.Block.generalSettings.title": "总览",
|
|
105
|
+
"containers.SettingsPage.pluginHeaderDescription": "编辑所有集合类型和组的配置",
|
|
106
|
+
"containers.SettingsView.list.subtitle": "编辑所有集合类型和组的布局和展示配置",
|
|
107
|
+
"containers.SettingsView.list.title": "展示设置",
|
|
108
|
+
"emptyAttributes.button": "跳转到集合类型编辑器",
|
|
109
|
+
"emptyAttributes.description": "为该集合类型添加第一个字段",
|
|
110
|
+
"emptyAttributes.title": "还没有字段",
|
|
111
|
+
"error.attribute.key.taken": "该值已存在",
|
|
112
|
+
"error.attribute.sameKeyAndName": "不能相等",
|
|
113
|
+
"error.attribute.taken": "该名称已被使用",
|
|
114
|
+
"error.contentTypeName.taken": "该名称已被使用",
|
|
115
|
+
"error.model.fetch": "获取模型配置时发生错误",
|
|
116
|
+
"error.record.create": "创建记录时发生错误",
|
|
117
|
+
"error.record.delete": "删除记录时发生错误",
|
|
118
|
+
"error.record.fetch": "获取记录时发生错误。",
|
|
119
|
+
"error.record.update": "更新记录时发生错误",
|
|
120
|
+
"error.records.count": "获取计数记录期间发生错误。",
|
|
121
|
+
"error.records.fetch": "获取记录时发生错误。",
|
|
122
|
+
"error.schema.generation": "Schema 生成过程中发生错误。",
|
|
123
|
+
"error.validation.json": "JSON格式不正确",
|
|
124
|
+
"error.validation.max": "超过最大值",
|
|
125
|
+
"error.validation.maxLength": "长度太长",
|
|
126
|
+
"error.validation.min": "小于最小值",
|
|
127
|
+
"error.validation.minLength": "长度太短",
|
|
128
|
+
"error.validation.minSupMax": "最小值大于最大值。",
|
|
129
|
+
"error.validation.regex": "格式错误",
|
|
130
|
+
"error.validation.required": "必填项",
|
|
131
|
+
"form.Input.bulkActions": "启用批量操作",
|
|
132
|
+
"form.Input.defaultSort": "默认排序设置",
|
|
133
|
+
"form.Input.description": "字段说明",
|
|
134
|
+
"form.Input.description.placeholder": "资料页面中的展示名称",
|
|
135
|
+
"form.Input.editable": "可编辑字段",
|
|
136
|
+
"form.Input.filters": "应用过滤器",
|
|
137
|
+
"form.Input.label": "字段名称",
|
|
138
|
+
"form.Input.label.inputDescription": "这个标签会展示在表格的标题列名称",
|
|
139
|
+
"form.Input.pageEntries": "每页条数",
|
|
140
|
+
"form.Input.pageEntries.inputDescription": "注意:您可以在集合类型设置中覆盖此设定",
|
|
141
|
+
"form.Input.placeholder": "占位符",
|
|
142
|
+
"form.Input.placeholder.placeholder": "在文字框中显示提示信息",
|
|
143
|
+
"form.Input.search": "启用搜索功能",
|
|
144
|
+
"form.Input.search.field": "允许此字段可以被搜索",
|
|
145
|
+
"form.Input.sort.field": "允许此字段可以被排序",
|
|
146
|
+
"form.Input.wysiwyg": "显示为所见即所得模式",
|
|
147
|
+
"global.displayedFields": "展示的字段",
|
|
148
|
+
"groups": "分组",
|
|
149
|
+
"groups.numbered": "分组 ({number})",
|
|
150
|
+
"models": "内容类型",
|
|
151
|
+
"models.numbered": "内容类型 ({number})",
|
|
152
|
+
"notification.error.displayedFields": "至少需要展示一个字段",
|
|
153
|
+
"notification.error.relationship.fetch": "获取关联数据时发生错误",
|
|
154
|
+
"notification.info.SettingPage.disableSort": "您至少需要允许一个字段可以被用來排序",
|
|
155
|
+
"notification.info.minimumFields": "至少需要展示一个字段",
|
|
156
|
+
"notification.upload.error": "上传文件时发生了错误",
|
|
157
|
+
"pageNotFound": "页面未找到",
|
|
158
|
+
"permissions.not-allowed.create": "没有创建文档的权限",
|
|
159
|
+
"permissions.not-allowed.update": "没有查看该文档的权限",
|
|
160
|
+
"plugin.description.long": "快速查看、编辑与删除数据库中的数据。",
|
|
161
|
+
"plugin.description.short": "快速查看、编辑与删除数据库中的数据。",
|
|
162
|
+
"popUpWarning.bodyMessage.contentType.delete": "确定要删除该记录吗?",
|
|
163
|
+
"popUpWarning.bodyMessage.contentType.delete.all": "确定要删除这些内容吗?",
|
|
164
|
+
"popUpWarning.warning.cancelAllSettings": "确定要放弃修改吗?",
|
|
165
|
+
"popUpWarning.warning.publish-question": "是否仍要进行发布?",
|
|
166
|
+
"popUpWarning.warning.unpublish": "取消发布后状态将直接变更为:草稿",
|
|
167
|
+
"popUpWarning.warning.unpublish-question": "您确定要取消发布吗?",
|
|
168
|
+
"popUpWarning.warning.updateAllSettings": "这将会改动您已有的设置",
|
|
169
|
+
"popUpwarning.warning.has-draft-relations.button-confirm": "是的,发布",
|
|
170
|
+
"popUpwarning.warning.has-draft-relations.message.plural": "<b>有 {count} 个关联的内容尚未发布,</b><br></br>这可能会在正式项目中产生错误和无效链接。",
|
|
171
|
+
"popUpwarning.warning.has-draft-relations.message.singular": "<b>有 {count} 个关联的内容尚未发布,</b><br></br>这可能会在正式项目中产生错误和无效链接。",
|
|
172
|
+
"popUpwarning.warning.has-draft-relations.second-message": "这可能会在正式项目中产生错误和无效链接。",
|
|
173
|
+
"success.record.delete": "删除成功",
|
|
174
|
+
"success.record.publish": "发布成功",
|
|
175
|
+
"success.record.save": "保存成功",
|
|
176
|
+
"success.record.unpublish": "取消发布成功"
|
|
177
|
+
}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
{
|
|
2
|
+
"EditRelations.title": "關聯式資料",
|
|
3
|
+
"components.AddFilterCTA.add": "過濾器",
|
|
4
|
+
"components.AddFilterCTA.hide": "過濾器",
|
|
5
|
+
"components.DraggableAttr.edit": "點擊以編輯",
|
|
6
|
+
"components.EmptyAttributesBlock.button": "前往設定頁面",
|
|
7
|
+
"components.EmptyAttributesBlock.description": "您可以變更設定",
|
|
8
|
+
"components.FilterOptions.button.apply": "套用",
|
|
9
|
+
"components.FiltersPickWrapper.PluginHeader.actions.apply": "套用",
|
|
10
|
+
"components.FiltersPickWrapper.PluginHeader.actions.clearAll": "清除",
|
|
11
|
+
"components.FiltersPickWrapper.PluginHeader.description": "設定過濾資料的條件",
|
|
12
|
+
"components.FiltersPickWrapper.PluginHeader.title.filter": "過濾器",
|
|
13
|
+
"components.FiltersPickWrapper.hide": "隱藏",
|
|
14
|
+
"components.LimitSelect.itemsPerPage": "每個頁面檔案數量",
|
|
15
|
+
"components.Search.placeholder": "搜尋...",
|
|
16
|
+
"components.TableDelete.delete": "刪除",
|
|
17
|
+
"components.TableDelete.deleteSelected": "删除所选",
|
|
18
|
+
"components.TableDelete.entries.plural": "已選取 {number} 個項目",
|
|
19
|
+
"components.TableDelete.entries.singular": "已選取 {number} 個項目",
|
|
20
|
+
"components.TableEmpty.withFilters": "找不到 {contentType} 依照套用的過濾器...",
|
|
21
|
+
"components.TableEmpty.withSearch": "找不到 {contentType} 依照搜尋條件: ({search})...",
|
|
22
|
+
"components.TableEmpty.withoutFilter": "找不到 {contentType}...",
|
|
23
|
+
"containers.Edit.addAnItem": "新增關聯...",
|
|
24
|
+
"containers.Edit.clickToJump": "跳轉到該筆資料",
|
|
25
|
+
"containers.Edit.delete": "刪除",
|
|
26
|
+
"containers.Edit.editing": "編輯中...",
|
|
27
|
+
"containers.Edit.reset": "重設",
|
|
28
|
+
"containers.Edit.returnList": "回到清單",
|
|
29
|
+
"containers.Edit.seeDetails": "詳細資料",
|
|
30
|
+
"containers.Edit.submit": "儲存",
|
|
31
|
+
"containers.Home.introduction": "這個擴充功能還在開發階段,如果要編輯項目,請前往左邊選單中對應的連結",
|
|
32
|
+
"containers.Home.pluginHeaderDescription": "透過強大的介面來管理您的項目",
|
|
33
|
+
"containers.Home.pluginHeaderTitle": "內容管理員",
|
|
34
|
+
"containers.List.addAnEntry": "建立新的 {entity}",
|
|
35
|
+
"containers.List.errorFetchRecords": "錯誤",
|
|
36
|
+
"containers.List.pluginHeaderDescription": "找到 {label} 筆資料",
|
|
37
|
+
"containers.List.pluginHeaderDescription.singular": "找到 {label} 筆資料",
|
|
38
|
+
"containers.ListPage.displayedFields": "顯示欄位",
|
|
39
|
+
"containers.SettingPage.attributes": "屬性",
|
|
40
|
+
"containers.SettingPage.attributes.description": "調整欄位的順序",
|
|
41
|
+
"containers.SettingPage.editSettings.description": "拖曳欄位以規劃排版",
|
|
42
|
+
"containers.SettingPage.editSettings.title": "編輯 (設定)",
|
|
43
|
+
"containers.SettingPage.listSettings.title": "列表 (設定)",
|
|
44
|
+
"containers.SettingPage.relations": "關聯欄位",
|
|
45
|
+
"containers.SettingsPage.Block.contentType.description": "調整指定資料類型的選項",
|
|
46
|
+
"containers.SettingsPage.Block.generalSettings.title": "總覽",
|
|
47
|
+
"emptyAttributes.title": "目前還沒有欄位",
|
|
48
|
+
"error.attribute.key.taken": "這個數值已存在",
|
|
49
|
+
"error.attribute.sameKeyAndName": "不能等於",
|
|
50
|
+
"error.attribute.taken": "這個欄位名稱已存在",
|
|
51
|
+
"error.contentTypeName.taken": "這個名稱已存在",
|
|
52
|
+
"error.model.fetch": "讀取資料結構設定時發生錯誤",
|
|
53
|
+
"error.record.create": "增加資料時發生錯誤",
|
|
54
|
+
"error.record.delete": "刪除資料時發生錯誤",
|
|
55
|
+
"error.record.fetch": "讀取資料時發生錯誤",
|
|
56
|
+
"error.record.update": "更新資料時發生錯誤",
|
|
57
|
+
"error.records.count": "讀取資料數量時發生錯誤",
|
|
58
|
+
"error.records.fetch": "讀取資料時發生錯誤",
|
|
59
|
+
"error.schema.generation": "產生資料結構時發生錯誤",
|
|
60
|
+
"error.validation.json": "非法的JSON格式",
|
|
61
|
+
"error.validation.max": "數值過高",
|
|
62
|
+
"error.validation.maxLength": "長度過長",
|
|
63
|
+
"error.validation.min": "數值過低",
|
|
64
|
+
"error.validation.minLength": "長度不足",
|
|
65
|
+
"error.validation.minSupMax": "不能高於最大值",
|
|
66
|
+
"error.validation.regex": "此欄位無法與正規表達式批配",
|
|
67
|
+
"error.validation.required": "必填欄位",
|
|
68
|
+
"form.Input.bulkActions": "啟用批次操作",
|
|
69
|
+
"form.Input.defaultSort": "預設排序設定",
|
|
70
|
+
"form.Input.description": "說明",
|
|
71
|
+
"form.Input.description.placeholder": "描述這個欄位",
|
|
72
|
+
"form.Input.editable": "可編輯欄位",
|
|
73
|
+
"form.Input.filters": "啟用過濾器",
|
|
74
|
+
"form.Input.label": "標籤",
|
|
75
|
+
"form.Input.label.inputDescription": "這個數值會顯示在表格的標題列名稱",
|
|
76
|
+
"form.Input.pageEntries": "每頁項目",
|
|
77
|
+
"form.Input.placeholder": "佔位符",
|
|
78
|
+
"form.Input.placeholder.placeholder": "在文字框中顯示提示訊息",
|
|
79
|
+
"form.Input.search": "啟用搜尋功能",
|
|
80
|
+
"form.Input.search.field": "允許此欄位被搜尋",
|
|
81
|
+
"form.Input.sort.field": "允許以此欄位排序",
|
|
82
|
+
"notification.error.displayedFields": "您至少需要顯示一個欄位",
|
|
83
|
+
"notification.error.relationship.fetch": "讀取關聯資料時發生錯誤",
|
|
84
|
+
"notification.info.SettingPage.disableSort": "您至少需要允許一個欄位被用來排序",
|
|
85
|
+
"pageNotFound": "無法找到此頁面",
|
|
86
|
+
"plugin.description.long": "快速瀏覽、編輯、刪除資料庫的資料",
|
|
87
|
+
"plugin.description.short": "快速瀏覽、編輯、刪除資料庫的資料",
|
|
88
|
+
"popUpWarning.bodyMessage.contentType.delete": "您確定要刪除這筆資料嗎?",
|
|
89
|
+
"popUpWarning.bodyMessage.contentType.delete.all": "您確定要刪除這些資料嗎?",
|
|
90
|
+
"popUpWarning.warning.cancelAllSettings": "您確定要放棄變更?",
|
|
91
|
+
"popUpWarning.warning.updateAllSettings": "這會更動您的設定",
|
|
92
|
+
"success.record.delete": "已刪除",
|
|
93
|
+
"success.record.save": "已儲存"
|
|
94
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { toLower } from 'lodash';
|
|
2
|
+
|
|
3
|
+
const checkIfAttributeIsDisplayable = attribute => {
|
|
4
|
+
const type = attribute.type;
|
|
5
|
+
|
|
6
|
+
if (type === 'relation') {
|
|
7
|
+
return !toLower(attribute.relationType).includes('morph');
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
return !['json', 'component', 'dynamiczone', 'richtext'].includes(type) && !!type;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export default checkIfAttributeIsDisplayable;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { get } from 'lodash';
|
|
2
|
+
|
|
3
|
+
const createDefaultForm = (attributes, allComponentsSchema) => {
|
|
4
|
+
return Object.keys(attributes).reduce((acc, current) => {
|
|
5
|
+
const attribute = get(attributes, [current], {});
|
|
6
|
+
const { default: defaultValue, component, type, required, min, repeatable } = attribute;
|
|
7
|
+
|
|
8
|
+
if (type === 'json') {
|
|
9
|
+
acc[current] = null;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
if (type === 'json' && required === true) {
|
|
13
|
+
acc[current] = {};
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
if (defaultValue !== undefined) {
|
|
17
|
+
acc[current] = defaultValue;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
if (type === 'component') {
|
|
21
|
+
const currentComponentSchema = get(allComponentsSchema, [component, 'attributes'], {});
|
|
22
|
+
const currentComponentDefaultForm = createDefaultForm(
|
|
23
|
+
currentComponentSchema,
|
|
24
|
+
allComponentsSchema
|
|
25
|
+
);
|
|
26
|
+
|
|
27
|
+
if (required === true) {
|
|
28
|
+
acc[current] = repeatable === true ? [] : currentComponentDefaultForm;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
if (min && repeatable === true && required) {
|
|
32
|
+
acc[current] = [];
|
|
33
|
+
|
|
34
|
+
for (let i = 0; i < min; i += 1) {
|
|
35
|
+
acc[current].push(currentComponentDefaultForm);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
if (type === 'dynamiczone') {
|
|
41
|
+
if (required === true) {
|
|
42
|
+
acc[current] = [];
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
return acc;
|
|
47
|
+
}, {});
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
export default createDefaultForm;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// NOTE TO PLUGINS DEVELOPERS:
|
|
2
|
+
// If you modify this file you need to update the documentation accordingly
|
|
3
|
+
// Here's the file: strapi/docs/3.0.0-beta.x/guides/custom-admin.md#update-the-content-manager
|
|
4
|
+
// Also the strapi-generate-plugins/files/admin/src/index.js needs to be updated
|
|
5
|
+
// IF THE DOC IS NOT UPDATED THE PULL REQUEST WILL NOT BE MERGED
|
|
6
|
+
|
|
7
|
+
import { dateFormats as defaultDateFormats } from 'strapi-helper-plugin';
|
|
8
|
+
|
|
9
|
+
const dateFormats = {
|
|
10
|
+
...defaultDateFormats,
|
|
11
|
+
// Customise the format by uncommenting the one you wan to override it corresponds to the type of your field
|
|
12
|
+
// date: 'dddd, MMMM Do YYYY',
|
|
13
|
+
// datetime: 'dddd, MMMM Do YYYY HH:mm',
|
|
14
|
+
// time: 'HH:mm A',
|
|
15
|
+
// timestamp: 'dddd, MMMM Do YYYY HH:mm',
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export default dateFormats;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
// List of all the possible filters
|
|
2
|
+
const VALID_REST_OPERATORS = [
|
|
3
|
+
'eq',
|
|
4
|
+
'ne',
|
|
5
|
+
'in',
|
|
6
|
+
'nin',
|
|
7
|
+
'contains',
|
|
8
|
+
'ncontains',
|
|
9
|
+
'containss',
|
|
10
|
+
'ncontainss',
|
|
11
|
+
'lt',
|
|
12
|
+
'lte',
|
|
13
|
+
'gt',
|
|
14
|
+
'gte',
|
|
15
|
+
'null',
|
|
16
|
+
];
|
|
17
|
+
|
|
18
|
+
// from strapi-utils/convert-rest-query-params
|
|
19
|
+
const findAppliedFilter = whereClause => {
|
|
20
|
+
// Useful to remove the mainField of relation fields.
|
|
21
|
+
const formattedWhereClause = whereClause.split('.')[0];
|
|
22
|
+
const separatorIndex = whereClause.lastIndexOf('_');
|
|
23
|
+
|
|
24
|
+
if (separatorIndex === -1) {
|
|
25
|
+
return { operator: '=', field: formattedWhereClause };
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
const fieldName = formattedWhereClause.substring(0, separatorIndex);
|
|
29
|
+
const operator = whereClause.slice(separatorIndex + 1);
|
|
30
|
+
|
|
31
|
+
// the field as underscores
|
|
32
|
+
if (!VALID_REST_OPERATORS.includes(operator)) {
|
|
33
|
+
return { operator: '=', field: formattedWhereClause };
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
return { operator: `_${operator}`, field: fieldName };
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
const formatFiltersFromQuery = ({ _where }) => {
|
|
40
|
+
if (!_where) {
|
|
41
|
+
return [];
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
return _where.map(obj => {
|
|
45
|
+
const [key] = Object.keys(obj);
|
|
46
|
+
const { field, operator } = findAppliedFilter(key);
|
|
47
|
+
|
|
48
|
+
const value = obj[key];
|
|
49
|
+
|
|
50
|
+
return { name: field, filter: operator, value };
|
|
51
|
+
});
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
export default formatFiltersFromQuery;
|
|
55
|
+
export { findAppliedFilter };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { get } from 'lodash';
|
|
2
|
+
|
|
3
|
+
const formatFilterName = (name, metadatas) => {
|
|
4
|
+
const mainField = get(metadatas, [name, 'list', 'mainField', 'name'], null);
|
|
5
|
+
|
|
6
|
+
if (mainField) {
|
|
7
|
+
return `${name}.${mainField}`;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
return name;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
const formatFiltersToQuery = (array, metadatas) => {
|
|
14
|
+
const nextFilters = array.map(({ name, filter, value }) => {
|
|
15
|
+
const formattedName = formatFilterName(name, metadatas);
|
|
16
|
+
|
|
17
|
+
if (filter === '=') {
|
|
18
|
+
return { [formattedName]: value };
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
return { [`${formattedName}${filter}`]: value };
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
return { _where: nextFilters };
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export default formatFiltersToQuery;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { omit, get } from 'lodash';
|
|
2
|
+
|
|
3
|
+
const formatLayoutToApi = ({ layouts, metadatas, ...rest }) => {
|
|
4
|
+
const list = layouts.list.map(obj => {
|
|
5
|
+
if (obj.name) {
|
|
6
|
+
return obj.name;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
return obj;
|
|
10
|
+
});
|
|
11
|
+
const editRelations = layouts.editRelations.map(({ name }) => name);
|
|
12
|
+
|
|
13
|
+
const formattedMetadatas = Object.keys(metadatas).reduce((acc, current) => {
|
|
14
|
+
const currentMetadatas = get(metadatas, [current], {});
|
|
15
|
+
let editMetadatas = currentMetadatas.edit;
|
|
16
|
+
|
|
17
|
+
if (editMetadatas.mainField) {
|
|
18
|
+
editMetadatas = { ...editMetadatas, mainField: currentMetadatas.edit.mainField.name };
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
return {
|
|
22
|
+
...acc,
|
|
23
|
+
[current]: {
|
|
24
|
+
edit: editMetadatas,
|
|
25
|
+
list: omit(currentMetadatas.list, ['mainField']),
|
|
26
|
+
},
|
|
27
|
+
};
|
|
28
|
+
}, {});
|
|
29
|
+
|
|
30
|
+
const edit = layouts.edit.map(row =>
|
|
31
|
+
row.map(({ name, size }) => ({
|
|
32
|
+
name,
|
|
33
|
+
size,
|
|
34
|
+
}))
|
|
35
|
+
);
|
|
36
|
+
|
|
37
|
+
return {
|
|
38
|
+
...rest,
|
|
39
|
+
layouts: { edit, editRelations, list },
|
|
40
|
+
metadatas: formattedMetadatas,
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
export default formatLayoutToApi;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
const addSubjectToPermissionsArray = (array, uid) => array.map(data => ({ ...data, subject: uid }));
|
|
2
|
+
|
|
3
|
+
const generatePermissionsObject = uid => {
|
|
4
|
+
const permissions = {
|
|
5
|
+
create: [{ action: 'plugins::content-manager.explorer.create', subject: null }],
|
|
6
|
+
delete: [{ action: 'plugins::content-manager.explorer.delete', subject: null }],
|
|
7
|
+
publish: [{ action: 'plugins::content-manager.explorer.publish', subject: null }],
|
|
8
|
+
read: [{ action: 'plugins::content-manager.explorer.read', subject: null }],
|
|
9
|
+
update: [{ action: 'plugins::content-manager.explorer.update', subject: null }],
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
return Object.keys(permissions).reduce((acc, current) => {
|
|
13
|
+
acc[current] = addSubjectToPermissionsArray(permissions[current], uid);
|
|
14
|
+
|
|
15
|
+
return acc;
|
|
16
|
+
}, {});
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export default generatePermissionsObject;
|
|
20
|
+
export { addSubjectToPermissionsArray };
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { get } from 'lodash';
|
|
3
|
+
import pluginId from '../pluginId';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Retrieve external links from injected components
|
|
7
|
+
* @type {Array} List of external links to display
|
|
8
|
+
*/
|
|
9
|
+
const getInjectedComponents = (
|
|
10
|
+
container,
|
|
11
|
+
area,
|
|
12
|
+
plugins,
|
|
13
|
+
currentEnvironment,
|
|
14
|
+
slug,
|
|
15
|
+
push,
|
|
16
|
+
...rest
|
|
17
|
+
) => {
|
|
18
|
+
const componentsToInject = Object.keys(plugins).reduce((acc, current) => {
|
|
19
|
+
// Retrieve injected compos from plugin
|
|
20
|
+
const currentPlugin = plugins[current];
|
|
21
|
+
const injectedComponents = get(currentPlugin, 'injectedComponents', []);
|
|
22
|
+
|
|
23
|
+
const compos = injectedComponents
|
|
24
|
+
.filter(compo => {
|
|
25
|
+
return (
|
|
26
|
+
compo.plugin === `${pluginId}.${container}` && compo.area === area
|
|
27
|
+
);
|
|
28
|
+
})
|
|
29
|
+
.map(compo => {
|
|
30
|
+
const Component = compo.component;
|
|
31
|
+
|
|
32
|
+
return (
|
|
33
|
+
<Component
|
|
34
|
+
viewProps={rest}
|
|
35
|
+
currentEnvironment={currentEnvironment}
|
|
36
|
+
getModelName={() => slug}
|
|
37
|
+
push={push}
|
|
38
|
+
{...compo.props}
|
|
39
|
+
key={compo.key}
|
|
40
|
+
/>
|
|
41
|
+
);
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
return [...acc, ...compos];
|
|
45
|
+
}, []);
|
|
46
|
+
|
|
47
|
+
return componentsToInject;
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
export default getInjectedComponents;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { isEmpty, isNull, isObject, toLower, toString } from 'lodash';
|
|
2
|
+
import moment from 'moment';
|
|
3
|
+
import dateFormats from './dateFormats';
|
|
4
|
+
|
|
5
|
+
const getDisplayedValue = (type, value, name) => {
|
|
6
|
+
switch (toLower(type)) {
|
|
7
|
+
case 'string':
|
|
8
|
+
case 'text':
|
|
9
|
+
case 'email':
|
|
10
|
+
case 'enumeration':
|
|
11
|
+
case 'uid':
|
|
12
|
+
return (value && !isEmpty(toString(value))) || name === 'id' ? toString(value) : '-';
|
|
13
|
+
case 'float':
|
|
14
|
+
case 'integer':
|
|
15
|
+
case 'biginteger':
|
|
16
|
+
case 'decimal':
|
|
17
|
+
return !isNull(value) ? toString(value) : '-';
|
|
18
|
+
case 'boolean':
|
|
19
|
+
return value !== null ? toString(value) : '-';
|
|
20
|
+
case 'date':
|
|
21
|
+
case 'datetime':
|
|
22
|
+
case 'timestamp': {
|
|
23
|
+
if (value == null) {
|
|
24
|
+
return '-';
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
const date =
|
|
28
|
+
value && isObject(value) && value._isAMomentObject === true ? JSON.stringify(value) : value;
|
|
29
|
+
|
|
30
|
+
return moment(date).format(dateFormats[type]);
|
|
31
|
+
}
|
|
32
|
+
case 'password':
|
|
33
|
+
return '••••••••';
|
|
34
|
+
case 'media':
|
|
35
|
+
case 'file':
|
|
36
|
+
case 'files':
|
|
37
|
+
return value;
|
|
38
|
+
case 'time': {
|
|
39
|
+
if (!value) {
|
|
40
|
+
return '-';
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
const [hour, minute, second] = value.split(':');
|
|
44
|
+
const timeObj = {
|
|
45
|
+
hour,
|
|
46
|
+
minute,
|
|
47
|
+
second,
|
|
48
|
+
};
|
|
49
|
+
const date = moment().set(timeObj);
|
|
50
|
+
|
|
51
|
+
return date.format(dateFormats.time);
|
|
52
|
+
}
|
|
53
|
+
case 'relation': {
|
|
54
|
+
return value;
|
|
55
|
+
}
|
|
56
|
+
default:
|
|
57
|
+
return '-';
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
export default getDisplayedValue;
|