@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,424 @@
|
|
|
1
|
+
/* Jison generated parser */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
var jsonlint = (function(){
|
|
4
|
+
var parser = {trace: function trace() { },
|
|
5
|
+
yy: {},
|
|
6
|
+
symbols_: {"error":2,"JSONString":3,"STRING":4,"JSONNumber":5,"NUMBER":6,"JSONNullLiteral":7,"NULL":8,"JSONBooleanLiteral":9,"TRUE":10,"FALSE":11,"JSONText":12,"JSONValue":13,"EOF":14,"JSONObject":15,"JSONArray":16,"{":17,"}":18,"JSONMemberList":19,"JSONMember":20,":":21,",":22,"[":23,"]":24,"JSONElementList":25,"$accept":0,"$end":1},
|
|
7
|
+
terminals_: {2:"error",4:"STRING",6:"NUMBER",8:"NULL",10:"TRUE",11:"FALSE",14:"EOF",17:"{",18:"}",21:":",22:",",23:"[",24:"]"},
|
|
8
|
+
productions_: [0,[3,1],[5,1],[7,1],[9,1],[9,1],[12,2],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[15,2],[15,3],[20,3],[19,1],[19,3],[16,2],[16,3],[25,1],[25,3]],
|
|
9
|
+
performAction: function anonymous(yytext,yyleng,yylineno,yy,yystate,$$,_$) {
|
|
10
|
+
|
|
11
|
+
var $0 = $$.length - 1;
|
|
12
|
+
switch (yystate) {
|
|
13
|
+
case 1: // replace escaped characters with actual character
|
|
14
|
+
this.$ = yytext.replace(/\\(\\|")/g, "$"+"1")
|
|
15
|
+
.replace(/\\n/g,'\n')
|
|
16
|
+
.replace(/\\r/g,'\r')
|
|
17
|
+
.replace(/\\t/g,'\t')
|
|
18
|
+
.replace(/\\v/g,'\v')
|
|
19
|
+
.replace(/\\f/g,'\f')
|
|
20
|
+
.replace(/\\b/g,'\b');
|
|
21
|
+
|
|
22
|
+
break;
|
|
23
|
+
case 2:this.$ = Number(yytext);
|
|
24
|
+
break;
|
|
25
|
+
case 3:this.$ = null;
|
|
26
|
+
break;
|
|
27
|
+
case 4:this.$ = true;
|
|
28
|
+
break;
|
|
29
|
+
case 5:this.$ = false;
|
|
30
|
+
break;
|
|
31
|
+
case 6:return this.$ = $$[$0-1];
|
|
32
|
+
break;
|
|
33
|
+
case 13:this.$ = {};
|
|
34
|
+
break;
|
|
35
|
+
case 14:this.$ = $$[$0-1];
|
|
36
|
+
break;
|
|
37
|
+
case 15:this.$ = [$$[$0-2], $$[$0]];
|
|
38
|
+
break;
|
|
39
|
+
case 16:this.$ = {}; this.$[$$[$0][0]] = $$[$0][1];
|
|
40
|
+
break;
|
|
41
|
+
case 17:this.$ = $$[$0-2]; $$[$0-2][$$[$0][0]] = $$[$0][1];
|
|
42
|
+
break;
|
|
43
|
+
case 18:this.$ = [];
|
|
44
|
+
break;
|
|
45
|
+
case 19:this.$ = $$[$0-1];
|
|
46
|
+
break;
|
|
47
|
+
case 20:this.$ = [$$[$0]];
|
|
48
|
+
break;
|
|
49
|
+
case 21:this.$ = $$[$0-2]; $$[$0-2].push($$[$0]);
|
|
50
|
+
break;
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
table: [{3:5,4:[1,12],5:6,6:[1,13],7:3,8:[1,9],9:4,10:[1,10],11:[1,11],12:1,13:2,15:7,16:8,17:[1,14],23:[1,15]},{1:[3]},{14:[1,16]},{14:[2,7],18:[2,7],22:[2,7],24:[2,7]},{14:[2,8],18:[2,8],22:[2,8],24:[2,8]},{14:[2,9],18:[2,9],22:[2,9],24:[2,9]},{14:[2,10],18:[2,10],22:[2,10],24:[2,10]},{14:[2,11],18:[2,11],22:[2,11],24:[2,11]},{14:[2,12],18:[2,12],22:[2,12],24:[2,12]},{14:[2,3],18:[2,3],22:[2,3],24:[2,3]},{14:[2,4],18:[2,4],22:[2,4],24:[2,4]},{14:[2,5],18:[2,5],22:[2,5],24:[2,5]},{14:[2,1],18:[2,1],21:[2,1],22:[2,1],24:[2,1]},{14:[2,2],18:[2,2],22:[2,2],24:[2,2]},{3:20,4:[1,12],18:[1,17],19:18,20:19},{3:5,4:[1,12],5:6,6:[1,13],7:3,8:[1,9],9:4,10:[1,10],11:[1,11],13:23,15:7,16:8,17:[1,14],23:[1,15],24:[1,21],25:22},{1:[2,6]},{14:[2,13],18:[2,13],22:[2,13],24:[2,13]},{18:[1,24],22:[1,25]},{18:[2,16],22:[2,16]},{21:[1,26]},{14:[2,18],18:[2,18],22:[2,18],24:[2,18]},{22:[1,28],24:[1,27]},{22:[2,20],24:[2,20]},{14:[2,14],18:[2,14],22:[2,14],24:[2,14]},{3:20,4:[1,12],20:29},{3:5,4:[1,12],5:6,6:[1,13],7:3,8:[1,9],9:4,10:[1,10],11:[1,11],13:30,15:7,16:8,17:[1,14],23:[1,15]},{14:[2,19],18:[2,19],22:[2,19],24:[2,19]},{3:5,4:[1,12],5:6,6:[1,13],7:3,8:[1,9],9:4,10:[1,10],11:[1,11],13:31,15:7,16:8,17:[1,14],23:[1,15]},{18:[2,17],22:[2,17]},{18:[2,15],22:[2,15]},{22:[2,21],24:[2,21]}],
|
|
54
|
+
defaultActions: {16:[2,6]},
|
|
55
|
+
parseError: function parseError(str, hash) {
|
|
56
|
+
throw new Error(str);
|
|
57
|
+
},
|
|
58
|
+
parse: function parse(input) {
|
|
59
|
+
var self = this,
|
|
60
|
+
stack = [0],
|
|
61
|
+
vstack = [null], // semantic value stack
|
|
62
|
+
lstack = [], // location stack
|
|
63
|
+
table = this.table,
|
|
64
|
+
yytext = '',
|
|
65
|
+
yylineno = 0,
|
|
66
|
+
yyleng = 0,
|
|
67
|
+
recovering = 0,
|
|
68
|
+
TERROR = 2,
|
|
69
|
+
EOF = 1;
|
|
70
|
+
|
|
71
|
+
//this.reductionCount = this.shiftCount = 0;
|
|
72
|
+
|
|
73
|
+
this.lexer.setInput(input);
|
|
74
|
+
this.lexer.yy = this.yy;
|
|
75
|
+
this.yy.lexer = this.lexer;
|
|
76
|
+
if (typeof this.lexer.yylloc == 'undefined')
|
|
77
|
+
this.lexer.yylloc = {};
|
|
78
|
+
var yyloc = this.lexer.yylloc;
|
|
79
|
+
lstack.push(yyloc);
|
|
80
|
+
|
|
81
|
+
if (typeof this.yy.parseError === 'function')
|
|
82
|
+
this.parseError = this.yy.parseError;
|
|
83
|
+
|
|
84
|
+
function popStack (n) {
|
|
85
|
+
stack.length = stack.length - 2*n;
|
|
86
|
+
vstack.length = vstack.length - n;
|
|
87
|
+
lstack.length = lstack.length - n;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
function lex() {
|
|
91
|
+
var token;
|
|
92
|
+
token = self.lexer.lex() || 1; // $end = 1
|
|
93
|
+
// if token isn't its numeric value, convert
|
|
94
|
+
if (typeof token !== 'number') {
|
|
95
|
+
token = self.symbols_[token] || token;
|
|
96
|
+
}
|
|
97
|
+
return token;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
var symbol, preErrorSymbol, state, action, a, r, yyval={},p,len,newState, expected;
|
|
101
|
+
while (true) {
|
|
102
|
+
// retreive state number from top of stack
|
|
103
|
+
state = stack[stack.length-1];
|
|
104
|
+
|
|
105
|
+
// use default actions if available
|
|
106
|
+
if (this.defaultActions[state]) {
|
|
107
|
+
action = this.defaultActions[state];
|
|
108
|
+
} else {
|
|
109
|
+
if (symbol == null)
|
|
110
|
+
symbol = lex();
|
|
111
|
+
// read action for current state and first input
|
|
112
|
+
action = table[state] && table[state][symbol];
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
// handle parse error
|
|
116
|
+
_handle_error:
|
|
117
|
+
if (typeof action === 'undefined' || !action.length || !action[0]) {
|
|
118
|
+
|
|
119
|
+
if (!recovering) {
|
|
120
|
+
// Report error
|
|
121
|
+
expected = [];
|
|
122
|
+
for (p in table[state]) if (this.terminals_[p] && p > 2) {
|
|
123
|
+
expected.push("'"+this.terminals_[p]+"'");
|
|
124
|
+
}
|
|
125
|
+
var errStr = '';
|
|
126
|
+
if (this.lexer.showPosition) {
|
|
127
|
+
errStr = 'Parse error on line '+(yylineno+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+expected.join(', ') + ", got '" + this.terminals_[symbol]+ "'";
|
|
128
|
+
} else {
|
|
129
|
+
errStr = 'Parse error on line '+(yylineno+1)+": Unexpected " +
|
|
130
|
+
(symbol == 1 /*EOF*/ ? "end of input" :
|
|
131
|
+
("'"+(this.terminals_[symbol] || symbol)+"'"));
|
|
132
|
+
}
|
|
133
|
+
this.parseError(errStr,
|
|
134
|
+
{text: this.lexer.match, token: this.terminals_[symbol] || symbol, line: this.lexer.yylineno, loc: yyloc, expected: expected});
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
// just recovered from another error
|
|
138
|
+
if (recovering == 3) {
|
|
139
|
+
if (symbol == EOF) {
|
|
140
|
+
throw new Error(errStr || 'Parsing halted.');
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
// discard current lookahead and grab another
|
|
144
|
+
yyleng = this.lexer.yyleng;
|
|
145
|
+
yytext = this.lexer.yytext;
|
|
146
|
+
yylineno = this.lexer.yylineno;
|
|
147
|
+
yyloc = this.lexer.yylloc;
|
|
148
|
+
symbol = lex();
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
// try to recover from error
|
|
152
|
+
while (1) {
|
|
153
|
+
// check for error recovery rule in this state
|
|
154
|
+
if ((TERROR.toString()) in table[state]) {
|
|
155
|
+
break;
|
|
156
|
+
}
|
|
157
|
+
if (state == 0) {
|
|
158
|
+
throw new Error(errStr || 'Parsing halted.');
|
|
159
|
+
}
|
|
160
|
+
popStack(1);
|
|
161
|
+
state = stack[stack.length-1];
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
preErrorSymbol = symbol; // save the lookahead token
|
|
165
|
+
symbol = TERROR; // insert generic error symbol as new lookahead
|
|
166
|
+
state = stack[stack.length-1];
|
|
167
|
+
action = table[state] && table[state][TERROR];
|
|
168
|
+
recovering = 3; // allow 3 real symbols to be shifted before reporting a new error
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
// this shouldn't happen, unless resolve defaults are off
|
|
172
|
+
if (action[0] instanceof Array && action.length > 1) {
|
|
173
|
+
throw new Error('Parse Error: multiple actions possible at state: '+state+', token: '+symbol);
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
switch (action[0]) {
|
|
177
|
+
|
|
178
|
+
case 1: // shift
|
|
179
|
+
//this.shiftCount++;
|
|
180
|
+
|
|
181
|
+
stack.push(symbol);
|
|
182
|
+
vstack.push(this.lexer.yytext);
|
|
183
|
+
lstack.push(this.lexer.yylloc);
|
|
184
|
+
stack.push(action[1]); // push state
|
|
185
|
+
symbol = null;
|
|
186
|
+
if (!preErrorSymbol) { // normal execution/no error
|
|
187
|
+
yyleng = this.lexer.yyleng;
|
|
188
|
+
yytext = this.lexer.yytext;
|
|
189
|
+
yylineno = this.lexer.yylineno;
|
|
190
|
+
yyloc = this.lexer.yylloc;
|
|
191
|
+
if (recovering > 0)
|
|
192
|
+
recovering--;
|
|
193
|
+
} else { // error just occurred, resume old lookahead f/ before error
|
|
194
|
+
symbol = preErrorSymbol;
|
|
195
|
+
preErrorSymbol = null;
|
|
196
|
+
}
|
|
197
|
+
break;
|
|
198
|
+
|
|
199
|
+
case 2: // reduce
|
|
200
|
+
//this.reductionCount++;
|
|
201
|
+
|
|
202
|
+
len = this.productions_[action[1]][1];
|
|
203
|
+
|
|
204
|
+
// perform semantic action
|
|
205
|
+
yyval.$ = vstack[vstack.length-len]; // default to $$ = $1
|
|
206
|
+
// default location, uses first token for firsts, last for lasts
|
|
207
|
+
yyval._$ = {
|
|
208
|
+
first_line: lstack[lstack.length-(len||1)].first_line,
|
|
209
|
+
last_line: lstack[lstack.length-1].last_line,
|
|
210
|
+
first_column: lstack[lstack.length-(len||1)].first_column,
|
|
211
|
+
last_column: lstack[lstack.length-1].last_column
|
|
212
|
+
};
|
|
213
|
+
r = this.performAction.call(yyval, yytext, yyleng, yylineno, this.yy, action[1], vstack, lstack);
|
|
214
|
+
|
|
215
|
+
if (typeof r !== 'undefined') {
|
|
216
|
+
return r;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
// pop off stack
|
|
220
|
+
if (len) {
|
|
221
|
+
stack = stack.slice(0,-1*len*2);
|
|
222
|
+
vstack = vstack.slice(0, -1*len);
|
|
223
|
+
lstack = lstack.slice(0, -1*len);
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
stack.push(this.productions_[action[1]][0]); // push nonterminal (reduce)
|
|
227
|
+
vstack.push(yyval.$);
|
|
228
|
+
lstack.push(yyval._$);
|
|
229
|
+
// goto new state = table[STATE][NONTERMINAL]
|
|
230
|
+
newState = table[stack[stack.length-2]][stack[stack.length-1]];
|
|
231
|
+
stack.push(newState);
|
|
232
|
+
break;
|
|
233
|
+
|
|
234
|
+
case 3: // accept
|
|
235
|
+
return true;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
return true;
|
|
241
|
+
}};
|
|
242
|
+
/* Jison generated lexer */
|
|
243
|
+
var lexer = (function(){
|
|
244
|
+
var lexer = ({EOF:1,
|
|
245
|
+
parseError:function parseError(str, hash) {
|
|
246
|
+
if (this.yy.parseError) {
|
|
247
|
+
this.yy.parseError(str, hash);
|
|
248
|
+
} else {
|
|
249
|
+
throw new Error(str);
|
|
250
|
+
}
|
|
251
|
+
},
|
|
252
|
+
setInput:function (input) {
|
|
253
|
+
this._input = input;
|
|
254
|
+
this._more = this._less = this.done = false;
|
|
255
|
+
this.yylineno = this.yyleng = 0;
|
|
256
|
+
this.yytext = this.matched = this.match = '';
|
|
257
|
+
this.conditionStack = ['INITIAL'];
|
|
258
|
+
this.yylloc = {first_line:1,first_column:0,last_line:1,last_column:0};
|
|
259
|
+
return this;
|
|
260
|
+
},
|
|
261
|
+
input:function () {
|
|
262
|
+
var ch = this._input[0];
|
|
263
|
+
this.yytext+=ch;
|
|
264
|
+
this.yyleng++;
|
|
265
|
+
this.match+=ch;
|
|
266
|
+
this.matched+=ch;
|
|
267
|
+
var lines = ch.match(/\n/);
|
|
268
|
+
if (lines) this.yylineno++;
|
|
269
|
+
this._input = this._input.slice(1);
|
|
270
|
+
return ch;
|
|
271
|
+
},
|
|
272
|
+
unput:function (ch) {
|
|
273
|
+
this._input = ch + this._input;
|
|
274
|
+
return this;
|
|
275
|
+
},
|
|
276
|
+
more:function () {
|
|
277
|
+
this._more = true;
|
|
278
|
+
return this;
|
|
279
|
+
},
|
|
280
|
+
less:function (n) {
|
|
281
|
+
this._input = this.match.slice(n) + this._input;
|
|
282
|
+
},
|
|
283
|
+
pastInput:function () {
|
|
284
|
+
var past = this.matched.substr(0, this.matched.length - this.match.length);
|
|
285
|
+
return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\n/g, "");
|
|
286
|
+
},
|
|
287
|
+
upcomingInput:function () {
|
|
288
|
+
var next = this.match;
|
|
289
|
+
if (next.length < 20) {
|
|
290
|
+
next += this._input.substr(0, 20-next.length);
|
|
291
|
+
}
|
|
292
|
+
return (next.substr(0,20)+(next.length > 20 ? '...':'')).replace(/\n/g, "");
|
|
293
|
+
},
|
|
294
|
+
showPosition:function () {
|
|
295
|
+
var pre = this.pastInput();
|
|
296
|
+
var c = new Array(pre.length + 1).join("-");
|
|
297
|
+
return pre + this.upcomingInput() + "\n" + c+"^";
|
|
298
|
+
},
|
|
299
|
+
next:function () {
|
|
300
|
+
if (this.done) {
|
|
301
|
+
return this.EOF;
|
|
302
|
+
}
|
|
303
|
+
if (!this._input) this.done = true;
|
|
304
|
+
|
|
305
|
+
var token,
|
|
306
|
+
match,
|
|
307
|
+
tempMatch,
|
|
308
|
+
index,
|
|
309
|
+
col,
|
|
310
|
+
lines;
|
|
311
|
+
if (!this._more) {
|
|
312
|
+
this.yytext = '';
|
|
313
|
+
this.match = '';
|
|
314
|
+
}
|
|
315
|
+
var rules = this._currentRules();
|
|
316
|
+
for (var i=0;i < rules.length; i++) {
|
|
317
|
+
tempMatch = this._input.match(this.rules[rules[i]]);
|
|
318
|
+
if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
|
|
319
|
+
match = tempMatch;
|
|
320
|
+
index = i;
|
|
321
|
+
if (!this.options.flex) break;
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
if (match) {
|
|
325
|
+
lines = match[0].match(/\n.*/g);
|
|
326
|
+
if (lines) this.yylineno += lines.length;
|
|
327
|
+
this.yylloc = {first_line: this.yylloc.last_line,
|
|
328
|
+
last_line: this.yylineno+1,
|
|
329
|
+
first_column: this.yylloc.last_column,
|
|
330
|
+
last_column: lines ? lines[lines.length-1].length-1 : this.yylloc.last_column + match[0].length}
|
|
331
|
+
this.yytext += match[0];
|
|
332
|
+
this.match += match[0];
|
|
333
|
+
this.yyleng = this.yytext.length;
|
|
334
|
+
this._more = false;
|
|
335
|
+
this._input = this._input.slice(match[0].length);
|
|
336
|
+
this.matched += match[0];
|
|
337
|
+
token = this.performAction.call(this, this.yy, this, rules[index],this.conditionStack[this.conditionStack.length-1]);
|
|
338
|
+
if (this.done && this._input) this.done = false;
|
|
339
|
+
if (token) return token;
|
|
340
|
+
else return;
|
|
341
|
+
}
|
|
342
|
+
if (this._input === "") {
|
|
343
|
+
return this.EOF;
|
|
344
|
+
} else {
|
|
345
|
+
this.parseError('Lexical error on line '+(this.yylineno+1)+'. Unrecognized text.\n'+this.showPosition(),
|
|
346
|
+
{text: "", token: null, line: this.yylineno});
|
|
347
|
+
}
|
|
348
|
+
},
|
|
349
|
+
lex:function lex() {
|
|
350
|
+
var r = this.next();
|
|
351
|
+
if (typeof r !== 'undefined') {
|
|
352
|
+
return r;
|
|
353
|
+
} else {
|
|
354
|
+
return this.lex();
|
|
355
|
+
}
|
|
356
|
+
},
|
|
357
|
+
begin:function begin(condition) {
|
|
358
|
+
this.conditionStack.push(condition);
|
|
359
|
+
},
|
|
360
|
+
popState:function popState() {
|
|
361
|
+
return this.conditionStack.pop();
|
|
362
|
+
},
|
|
363
|
+
_currentRules:function _currentRules() {
|
|
364
|
+
return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules;
|
|
365
|
+
},
|
|
366
|
+
topState:function () {
|
|
367
|
+
return this.conditionStack[this.conditionStack.length-2];
|
|
368
|
+
},
|
|
369
|
+
pushState:function begin(condition) {
|
|
370
|
+
this.begin(condition);
|
|
371
|
+
}});
|
|
372
|
+
lexer.options = {};
|
|
373
|
+
lexer.performAction = function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) {
|
|
374
|
+
|
|
375
|
+
var YYSTATE=YY_START
|
|
376
|
+
switch($avoiding_name_collisions) {
|
|
377
|
+
case 0:/* skip whitespace */
|
|
378
|
+
break;
|
|
379
|
+
case 1:return 6
|
|
380
|
+
break;
|
|
381
|
+
case 2:yy_.yytext = yy_.yytext.substr(1,yy_.yyleng-2); return 4
|
|
382
|
+
break;
|
|
383
|
+
case 3:return 17
|
|
384
|
+
break;
|
|
385
|
+
case 4:return 18
|
|
386
|
+
break;
|
|
387
|
+
case 5:return 23
|
|
388
|
+
break;
|
|
389
|
+
case 6:return 24
|
|
390
|
+
break;
|
|
391
|
+
case 7:return 22
|
|
392
|
+
break;
|
|
393
|
+
case 8:return 21
|
|
394
|
+
break;
|
|
395
|
+
case 9:return 10
|
|
396
|
+
break;
|
|
397
|
+
case 10:return 11
|
|
398
|
+
break;
|
|
399
|
+
case 11:return 8
|
|
400
|
+
break;
|
|
401
|
+
case 12:return 14
|
|
402
|
+
break;
|
|
403
|
+
case 13:return 'INVALID'
|
|
404
|
+
break;
|
|
405
|
+
}
|
|
406
|
+
};
|
|
407
|
+
lexer.rules = [/^(?:\s+)/,/^(?:(-?([0-9]|[1-9][0-9]+))(\.[0-9]+)?([eE][-+]?[0-9]+)?\b)/,/^(?:"(?:\\[\\"bfnrt/]|\\u[a-fA-F0-9]{4}|[^\\\0-\x09\x0a-\x1f"])*")/,/^(?:\{)/,/^(?:\})/,/^(?:\[)/,/^(?:\])/,/^(?:,)/,/^(?::)/,/^(?:true\b)/,/^(?:false\b)/,/^(?:null\b)/,/^(?:$)/,/^(?:.)/];
|
|
408
|
+
lexer.conditions = {"INITIAL":{"rules":[0,1,2,3,4,5,6,7,8,9,10,11,12,13],"inclusive":true}};
|
|
409
|
+
|
|
410
|
+
|
|
411
|
+
;
|
|
412
|
+
return lexer;})()
|
|
413
|
+
parser.lexer = lexer;
|
|
414
|
+
return parser;
|
|
415
|
+
})();
|
|
416
|
+
if (typeof require !== 'undefined' && typeof exports !== 'undefined') {
|
|
417
|
+
exports.parser = jsonlint;
|
|
418
|
+
exports.parse = function () { return jsonlint.parse.apply(jsonlint, arguments); }
|
|
419
|
+
exports.main = function commonjsMain(args) {
|
|
420
|
+
if (!args[1]) {
|
|
421
|
+
throw new Error('Usage: '+args[0]+' FILE');
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
|
|
3
|
+
const Wrapper = styled.div`
|
|
4
|
+
padding-bottom: 30px;
|
|
5
|
+
|
|
6
|
+
label {
|
|
7
|
+
margin-bottom: 1rem;
|
|
8
|
+
line-height: 18px;
|
|
9
|
+
display: block;
|
|
10
|
+
}
|
|
11
|
+
> div {
|
|
12
|
+
border-radius: 4px;
|
|
13
|
+
border: 1px solid #090300;
|
|
14
|
+
}
|
|
15
|
+
&.bordered {
|
|
16
|
+
> div {
|
|
17
|
+
border-color: red;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
> p {
|
|
21
|
+
width: 100%;
|
|
22
|
+
padding-top: 14px;
|
|
23
|
+
font-size: 1.2rem;
|
|
24
|
+
line-height: normal;
|
|
25
|
+
white-space: nowrap;
|
|
26
|
+
overflow: hidden;
|
|
27
|
+
text-overflow: ellipsis;
|
|
28
|
+
margin-bottom: -11px;
|
|
29
|
+
}
|
|
30
|
+
`;
|
|
31
|
+
|
|
32
|
+
export default Wrapper;
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* InputJSONWithErrors
|
|
4
|
+
*
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import React from 'react';
|
|
8
|
+
import PropTypes from 'prop-types';
|
|
9
|
+
import { isEmpty, isFunction } from 'lodash';
|
|
10
|
+
import cn from 'classnames';
|
|
11
|
+
import { LabelIconWrapper } from 'strapi-helper-plugin';
|
|
12
|
+
import { Description, ErrorMessage, Label } from '@buffetjs/styles';
|
|
13
|
+
import { Error } from '@buffetjs/core';
|
|
14
|
+
|
|
15
|
+
import InputJSON from '../InputJSON';
|
|
16
|
+
import Wrapper from './Wrapper';
|
|
17
|
+
|
|
18
|
+
class InputJSONWithErrors extends React.Component {
|
|
19
|
+
handleChange = e => {
|
|
20
|
+
this.props.onChange(e);
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
render() {
|
|
24
|
+
const {
|
|
25
|
+
autoFocus,
|
|
26
|
+
className,
|
|
27
|
+
deactivateErrorHighlight,
|
|
28
|
+
disabled,
|
|
29
|
+
error: inputError,
|
|
30
|
+
inputClassName,
|
|
31
|
+
inputDescription,
|
|
32
|
+
inputStyle,
|
|
33
|
+
label,
|
|
34
|
+
labelIcon,
|
|
35
|
+
name,
|
|
36
|
+
onBlur,
|
|
37
|
+
placeholder,
|
|
38
|
+
resetProps,
|
|
39
|
+
tabIndex,
|
|
40
|
+
validations,
|
|
41
|
+
value,
|
|
42
|
+
...rest
|
|
43
|
+
} = this.props;
|
|
44
|
+
|
|
45
|
+
const handleBlur = isFunction(onBlur) ? onBlur : this.handleBlur;
|
|
46
|
+
|
|
47
|
+
return (
|
|
48
|
+
<Error inputError={inputError} name={name} type="text" validations={validations}>
|
|
49
|
+
{({ canCheck, onBlur, error, dispatch }) => {
|
|
50
|
+
const hasError = Boolean(error);
|
|
51
|
+
|
|
52
|
+
return (
|
|
53
|
+
<Wrapper
|
|
54
|
+
className={`${cn(!isEmpty(className) && className)} ${hasError ? 'bordered' : ''}`}
|
|
55
|
+
>
|
|
56
|
+
<Label htmlFor={name}>
|
|
57
|
+
<span>{label}</span>
|
|
58
|
+
{labelIcon && (
|
|
59
|
+
<LabelIconWrapper title={labelIcon.title}>{labelIcon.icon}</LabelIconWrapper>
|
|
60
|
+
)}
|
|
61
|
+
</Label>
|
|
62
|
+
<InputJSON
|
|
63
|
+
{...rest}
|
|
64
|
+
autoFocus={autoFocus}
|
|
65
|
+
className={inputClassName}
|
|
66
|
+
disabled={disabled}
|
|
67
|
+
deactivateErrorHighlight={deactivateErrorHighlight}
|
|
68
|
+
name={name}
|
|
69
|
+
onBlur={isFunction(handleBlur) ? handleBlur : onBlur}
|
|
70
|
+
onChange={e => {
|
|
71
|
+
if (!canCheck) {
|
|
72
|
+
dispatch({
|
|
73
|
+
type: 'SET_CHECK',
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
dispatch({
|
|
78
|
+
type: 'SET_ERROR',
|
|
79
|
+
error: null,
|
|
80
|
+
});
|
|
81
|
+
this.handleChange(e);
|
|
82
|
+
}}
|
|
83
|
+
placeholder={placeholder}
|
|
84
|
+
resetProps={resetProps}
|
|
85
|
+
style={inputStyle}
|
|
86
|
+
tabIndex={tabIndex}
|
|
87
|
+
value={value}
|
|
88
|
+
/>
|
|
89
|
+
{!hasError && inputDescription && <Description>{inputDescription}</Description>}
|
|
90
|
+
{hasError && <ErrorMessage>{error}</ErrorMessage>}
|
|
91
|
+
</Wrapper>
|
|
92
|
+
);
|
|
93
|
+
}}
|
|
94
|
+
</Error>
|
|
95
|
+
);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
InputJSONWithErrors.defaultProps = {
|
|
100
|
+
autoFocus: false,
|
|
101
|
+
className: '',
|
|
102
|
+
deactivateErrorHighlight: false,
|
|
103
|
+
didCheckErrors: false,
|
|
104
|
+
disabled: false,
|
|
105
|
+
error: null,
|
|
106
|
+
inputClassName: '',
|
|
107
|
+
inputDescription: '',
|
|
108
|
+
inputStyle: {},
|
|
109
|
+
label: '',
|
|
110
|
+
labelClassName: '',
|
|
111
|
+
labelIcon: null,
|
|
112
|
+
labelStyle: {},
|
|
113
|
+
onBlur: false,
|
|
114
|
+
placeholder: '',
|
|
115
|
+
resetProps: false,
|
|
116
|
+
tabIndex: '0',
|
|
117
|
+
validations: {},
|
|
118
|
+
value: null,
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
InputJSONWithErrors.propTypes = {
|
|
122
|
+
autoFocus: PropTypes.bool,
|
|
123
|
+
className: PropTypes.string,
|
|
124
|
+
deactivateErrorHighlight: PropTypes.bool,
|
|
125
|
+
didCheckErrors: PropTypes.bool,
|
|
126
|
+
disabled: PropTypes.bool,
|
|
127
|
+
error: PropTypes.string,
|
|
128
|
+
inputClassName: PropTypes.string,
|
|
129
|
+
inputDescription: PropTypes.oneOfType([
|
|
130
|
+
PropTypes.string,
|
|
131
|
+
PropTypes.func,
|
|
132
|
+
PropTypes.shape({
|
|
133
|
+
id: PropTypes.string,
|
|
134
|
+
params: PropTypes.object,
|
|
135
|
+
}),
|
|
136
|
+
]),
|
|
137
|
+
inputStyle: PropTypes.object,
|
|
138
|
+
label: PropTypes.oneOfType([
|
|
139
|
+
PropTypes.string,
|
|
140
|
+
PropTypes.func,
|
|
141
|
+
PropTypes.shape({
|
|
142
|
+
id: PropTypes.string,
|
|
143
|
+
params: PropTypes.object,
|
|
144
|
+
}),
|
|
145
|
+
]),
|
|
146
|
+
labelClassName: PropTypes.string,
|
|
147
|
+
labelIcon: PropTypes.shape({
|
|
148
|
+
icon: PropTypes.node.isRequired,
|
|
149
|
+
title: PropTypes.string.isRequired,
|
|
150
|
+
}),
|
|
151
|
+
labelStyle: PropTypes.object,
|
|
152
|
+
name: PropTypes.string.isRequired,
|
|
153
|
+
onBlur: PropTypes.oneOfType([PropTypes.bool, PropTypes.func]),
|
|
154
|
+
onChange: PropTypes.func.isRequired,
|
|
155
|
+
placeholder: PropTypes.string,
|
|
156
|
+
resetProps: PropTypes.bool,
|
|
157
|
+
tabIndex: PropTypes.string,
|
|
158
|
+
validations: PropTypes.object,
|
|
159
|
+
value: PropTypes.oneOfType([
|
|
160
|
+
PropTypes.array,
|
|
161
|
+
PropTypes.object,
|
|
162
|
+
PropTypes.bool,
|
|
163
|
+
PropTypes.string,
|
|
164
|
+
PropTypes.number,
|
|
165
|
+
]),
|
|
166
|
+
};
|
|
167
|
+
|
|
168
|
+
export default InputJSONWithErrors;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
import { InputText } from '@buffetjs/core';
|
|
3
|
+
import { colors } from '@buffetjs/styles';
|
|
4
|
+
|
|
5
|
+
/* eslint-disable indent */
|
|
6
|
+
const InputUID = styled(InputText)`
|
|
7
|
+
width: 100%;
|
|
8
|
+
|
|
9
|
+
${({ containsEndAdornment }) =>
|
|
10
|
+
containsEndAdornment &&
|
|
11
|
+
`
|
|
12
|
+
> input {
|
|
13
|
+
padding-right: calc(40px + 1rem);
|
|
14
|
+
}
|
|
15
|
+
`}
|
|
16
|
+
|
|
17
|
+
${({ error }) =>
|
|
18
|
+
error &&
|
|
19
|
+
`
|
|
20
|
+
> input {
|
|
21
|
+
border-color: ${colors.darkOrange};
|
|
22
|
+
}
|
|
23
|
+
`}
|
|
24
|
+
`;
|
|
25
|
+
|
|
26
|
+
export default InputUID;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
|
|
3
|
+
const Option = styled.div`
|
|
4
|
+
display: flex;
|
|
5
|
+
justify-content: space-between;
|
|
6
|
+
align-items: baseline;
|
|
7
|
+
padding: 0.5rem 1rem;
|
|
8
|
+
font-size: 1.5rem;
|
|
9
|
+
line-height: 3rem;
|
|
10
|
+
cursor: pointer;
|
|
11
|
+
&:hover {
|
|
12
|
+
background-color: ${({ theme }) => theme.main.colors.lightestBlue};
|
|
13
|
+
.right-label {
|
|
14
|
+
display: block;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
.right-label {
|
|
18
|
+
display: block;
|
|
19
|
+
}
|
|
20
|
+
`;
|
|
21
|
+
|
|
22
|
+
export default Option;
|