├── .cache ├── admin │ └── src │ │ ├── StrapiApp.js │ │ ├── app.js │ │ ├── assets │ │ └── images │ │ │ ├── banner_strapi-rocket.png │ │ │ ├── big-logo-home.png │ │ │ ├── homepage-logo.png │ │ │ ├── hot-air-balloon.png │ │ │ ├── icon_made-by-strapi.svg │ │ │ ├── icon_offline-cloud.svg │ │ │ ├── logo_strapi_auth.png │ │ │ ├── logo_strapi_auth_v4.png │ │ │ ├── logo_strapi_menu.png │ │ │ ├── oops.png │ │ │ └── upgrade-details.png │ │ ├── components │ │ ├── AuthenticatedApp │ │ │ ├── index.js │ │ │ └── utils │ │ │ │ ├── api.js │ │ │ │ └── checkLatestStrapiVersion.js │ │ ├── AutoReloadOverlayBlockerProvider │ │ │ ├── Blocker.js │ │ │ ├── Overlay.js │ │ │ └── index.js │ │ ├── ConfigurationsProvider │ │ │ ├── index.js │ │ │ └── reducer.js │ │ ├── GlobalStyle │ │ │ └── index.js │ │ ├── GuidedTour │ │ │ ├── Homepage │ │ │ │ ├── components │ │ │ │ │ ├── Step.js │ │ │ │ │ └── Stepper.js │ │ │ │ └── index.js │ │ │ ├── Modal │ │ │ │ ├── components │ │ │ │ │ ├── Content.js │ │ │ │ │ ├── Modal.js │ │ │ │ │ ├── StepNumberWithPadding.js │ │ │ │ │ └── Stepper.js │ │ │ │ ├── index.js │ │ │ │ └── reducer.js │ │ │ ├── Stepper │ │ │ │ ├── StepLine.js │ │ │ │ └── StepNumber.js │ │ │ ├── constants.js │ │ │ ├── index.js │ │ │ ├── init.js │ │ │ ├── layout.js │ │ │ ├── reducer.js │ │ │ └── utils │ │ │ │ ├── arePreviousSectionsDone.js │ │ │ │ ├── arePreviousStepsDone.js │ │ │ │ ├── isGuidedTourCompleted.js │ │ │ │ └── persistStateToLocaleStorage.js │ │ ├── LanguageProvider │ │ │ ├── index.js │ │ │ ├── init.js │ │ │ ├── reducer.js │ │ │ └── utils │ │ │ │ └── localStorageKey.js │ │ ├── LeftMenu │ │ │ └── index.js │ │ ├── LocalesProvider │ │ │ ├── context.js │ │ │ ├── index.js │ │ │ └── useLocalesProvider.js │ │ ├── Notifications │ │ │ ├── Notification │ │ │ │ └── index.js │ │ │ ├── index.js │ │ │ └── reducer.js │ │ ├── OverlayBlocker │ │ │ └── index.js │ │ ├── PluginsInitializer │ │ │ ├── index.js │ │ │ ├── init.js │ │ │ └── reducer.js │ │ ├── PrivateRoute │ │ │ └── index.js │ │ ├── Providers │ │ │ └── index.js │ │ ├── RBACProvider │ │ │ ├── actions.js │ │ │ ├── constants.js │ │ │ ├── index.js │ │ │ └── reducer.js │ │ ├── Theme │ │ │ └── index.js │ │ ├── ThemeToggleProvider │ │ │ └── index.js │ │ ├── UnauthenticatedLogo │ │ │ └── index.js │ │ └── UpgradePlanModal │ │ │ └── index.js │ │ ├── content-manager │ │ ├── assets │ │ │ └── images │ │ │ │ ├── background_input.svg │ │ │ │ ├── icon_remove.svg │ │ │ │ └── logo.svg │ │ ├── components │ │ │ ├── AttributeFilter │ │ │ │ ├── Filters.js │ │ │ │ ├── hooks │ │ │ │ │ └── useAllowedAttributes.js │ │ │ │ └── index.js │ │ │ ├── BackHeader │ │ │ │ └── index.js │ │ │ ├── Block │ │ │ │ ├── components.js │ │ │ │ └── index.js │ │ │ ├── CollectionTypeFormWrapper │ │ │ │ └── index.js │ │ │ ├── ComponentInitializer │ │ │ │ └── index.js │ │ │ ├── Container │ │ │ │ └── index.js │ │ │ ├── CustomInputCheckbox │ │ │ │ ├── components.js │ │ │ │ └── index.js │ │ │ ├── DragLayer │ │ │ │ └── index.js │ │ │ ├── DynamicComponentCard │ │ │ │ └── Wrapper.js │ │ │ ├── DynamicTable │ │ │ │ ├── CellContent │ │ │ │ │ ├── CellValue.js │ │ │ │ │ ├── Media │ │ │ │ │ │ ├── FileWrapper.js │ │ │ │ │ │ └── index.js │ │ │ │ │ ├── MultipleMedias.js │ │ │ │ │ ├── RelationMultiple │ │ │ │ │ │ └── index.js │ │ │ │ │ ├── RelationSingle │ │ │ │ │ │ └── index.js │ │ │ │ │ ├── RepeatableComponent │ │ │ │ │ │ └── index.js │ │ │ │ │ ├── SingleComponent │ │ │ │ │ │ └── index.js │ │ │ │ │ ├── index.js │ │ │ │ │ └── utils │ │ │ │ │ │ ├── getNumberOfDecimals.js │ │ │ │ │ │ ├── hasContent.js │ │ │ │ │ │ └── isSingleRelation.js │ │ │ │ ├── ConfirmDialogDelete │ │ │ │ │ └── index.js │ │ │ │ ├── ConfirmDialogDeleteAll │ │ │ │ │ └── index.js │ │ │ │ ├── TableRows │ │ │ │ │ └── index.js │ │ │ │ └── index.js │ │ │ ├── DynamicZone │ │ │ │ ├── components │ │ │ │ │ ├── AddComponentButton │ │ │ │ │ │ └── index.js │ │ │ │ │ ├── Component │ │ │ │ │ │ ├── Rectangle.js │ │ │ │ │ │ └── index.js │ │ │ │ │ ├── ComponentPicker │ │ │ │ │ │ ├── Category │ │ │ │ │ │ │ ├── ComponentCard │ │ │ │ │ │ │ │ └── index.js │ │ │ │ │ │ │ └── index.js │ │ │ │ │ │ └── index.js │ │ │ │ │ └── DzLabel │ │ │ │ │ │ └── index.js │ │ │ │ ├── index.js │ │ │ │ └── utils │ │ │ │ │ ├── connect.js │ │ │ │ │ └── select.js │ │ │ ├── EditViewDataManagerProvider │ │ │ │ ├── index.js │ │ │ │ ├── reducer.js │ │ │ │ └── utils │ │ │ │ │ ├── cleanData.js │ │ │ │ │ ├── getAPIInnerError.js │ │ │ │ │ ├── handleAPIError.js │ │ │ │ │ ├── index.js │ │ │ │ │ ├── moveFields.js │ │ │ │ │ └── schema.js │ │ │ ├── FieldComponent │ │ │ │ ├── Label.js │ │ │ │ ├── index.js │ │ │ │ └── utils │ │ │ │ │ ├── connect.js │ │ │ │ │ └── select.js │ │ │ ├── FieldTypeIcon │ │ │ │ └── index.js │ │ │ ├── FilterOptionsCTA │ │ │ │ └── index.js │ │ │ ├── FormTitle │ │ │ │ └── index.js │ │ │ ├── FormWrapper │ │ │ │ └── index.js │ │ │ ├── Hint │ │ │ │ └── index.js │ │ │ ├── InjectionZoneList │ │ │ │ └── index.js │ │ │ ├── InputJSON │ │ │ │ ├── FieldError.js │ │ │ │ ├── FieldWrapper.js │ │ │ │ ├── Label.js │ │ │ │ ├── components.js │ │ │ │ ├── index.js │ │ │ │ └── jsonlint.js │ │ │ ├── InputUID │ │ │ │ ├── endActionStyle.js │ │ │ │ ├── index.js │ │ │ │ ├── regex.js │ │ │ │ └── useDebounce.js │ │ │ ├── Inputs │ │ │ │ ├── index.js │ │ │ │ └── utils │ │ │ │ │ ├── VALIDATIONS_TO_OMIT.js │ │ │ │ │ ├── connect.js │ │ │ │ │ ├── generateOptions.js │ │ │ │ │ ├── getInputType.js │ │ │ │ │ ├── getStep.js │ │ │ │ │ ├── index.js │ │ │ │ │ └── select.js │ │ │ ├── LayoutDndProvider │ │ │ │ └── index.js │ │ │ ├── LayoutTitle │ │ │ │ └── index.js │ │ │ ├── NonRepeatableComponent │ │ │ │ └── index.js │ │ │ ├── PlusButton │ │ │ │ └── index.js │ │ │ ├── PreviewCarret │ │ │ │ ├── components.js │ │ │ │ └── index.js │ │ │ ├── PreviewWysiwyg │ │ │ │ ├── Wrapper.js │ │ │ │ ├── index.js │ │ │ │ └── utils │ │ │ │ │ ├── mdRenderer.js │ │ │ │ │ └── satinizeHtml.js │ │ │ ├── RepeatableComponent │ │ │ │ ├── AccordionGroupCustom │ │ │ │ │ └── index.js │ │ │ │ ├── AddFieldButton.js │ │ │ │ ├── DragPreview.js │ │ │ │ ├── DraggedItem │ │ │ │ │ ├── DraggingSibling.js │ │ │ │ │ ├── IconButtonCustoms.js │ │ │ │ │ ├── Preview.js │ │ │ │ │ ├── index.js │ │ │ │ │ └── utils │ │ │ │ │ │ ├── connect.js │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ └── select.js │ │ │ │ ├── index.js │ │ │ │ └── utils │ │ │ │ │ ├── connect.js │ │ │ │ │ ├── getComponentErrorKeys.js │ │ │ │ │ └── select.js │ │ │ ├── SectionTitle │ │ │ │ ├── Title.js │ │ │ │ └── index.js │ │ │ ├── SelectMany │ │ │ │ ├── ListItem.js │ │ │ │ └── index.js │ │ │ ├── SelectOne │ │ │ │ ├── SingleValue.js │ │ │ │ └── index.js │ │ │ ├── SelectWrapper │ │ │ │ ├── Label.js │ │ │ │ ├── Option.js │ │ │ │ ├── index.js │ │ │ │ └── utils │ │ │ │ │ ├── connect.js │ │ │ │ │ ├── index.js │ │ │ │ │ └── select.js │ │ │ ├── SingleTypeFormWrapper │ │ │ │ ├── index.js │ │ │ │ └── utils │ │ │ │ │ ├── getRequestUrl.js │ │ │ │ │ └── index.js │ │ │ ├── State │ │ │ │ └── index.js │ │ │ └── Wysiwyg │ │ │ │ ├── Editor.js │ │ │ │ ├── EditorLayout.js │ │ │ │ ├── EditorStylesContainer.js │ │ │ │ ├── WysiwygFooter.js │ │ │ │ ├── WysiwygNav.js │ │ │ │ ├── WysiwygStyles.js │ │ │ │ ├── index.js │ │ │ │ └── utils │ │ │ │ ├── continueList.js │ │ │ │ └── utils.js │ │ ├── contexts │ │ │ ├── ContentTypeLayout.js │ │ │ ├── LayoutDnd.js │ │ │ ├── ModelsContext.js │ │ │ ├── Wysiwyg.js │ │ │ └── index.js │ │ ├── hooks │ │ │ ├── index.js │ │ │ ├── useContentTypeLayout │ │ │ │ └── index.js │ │ │ ├── useFetchContentTypeLayout │ │ │ │ ├── index.js │ │ │ │ ├── reducer.js │ │ │ │ └── utils │ │ │ │ │ └── formatLayouts.js │ │ │ ├── useFindRedirectionLink │ │ │ │ ├── index.js │ │ │ │ ├── selectors.js │ │ │ │ └── utils │ │ │ │ │ └── getRedirectionLink.js │ │ │ ├── useLayoutDnd.js │ │ │ ├── usePluginsQueryParams │ │ │ │ └── index.js │ │ │ ├── useSyncRbac │ │ │ │ ├── actions.js │ │ │ │ ├── constants.js │ │ │ │ ├── index.js │ │ │ │ ├── reducer.js │ │ │ │ └── selectors.js │ │ │ └── useWysiwyg.js │ │ ├── icons │ │ │ ├── Bold │ │ │ │ └── index.js │ │ │ ├── Code │ │ │ │ └── index.js │ │ │ ├── Cross │ │ │ │ └── index.js │ │ │ ├── Italic │ │ │ │ └── index.js │ │ │ ├── Link │ │ │ │ └── index.js │ │ │ ├── Media │ │ │ │ └── index.js │ │ │ ├── Na │ │ │ │ └── index.js │ │ │ ├── Ol │ │ │ │ └── index.js │ │ │ ├── Quote │ │ │ │ └── index.js │ │ │ ├── Striked │ │ │ │ └── index.js │ │ │ ├── Ul │ │ │ │ └── index.js │ │ │ └── Underline │ │ │ │ └── index.js │ │ ├── pages │ │ │ ├── App │ │ │ │ ├── LeftMenu │ │ │ │ │ └── index.js │ │ │ │ ├── actions.js │ │ │ │ ├── constants.js │ │ │ │ ├── index.js │ │ │ │ ├── reducer.js │ │ │ │ ├── selectors.js │ │ │ │ ├── useModels.js │ │ │ │ └── utils │ │ │ │ │ ├── checkPermissions.js │ │ │ │ │ ├── generateModelsLinks.js │ │ │ │ │ └── getContentTypeLinks.js │ │ │ ├── CollectionTypeRecursivePath │ │ │ │ └── index.js │ │ │ ├── ComponentSetttingsView │ │ │ │ └── index.js │ │ │ ├── EditSettingsView │ │ │ │ ├── components │ │ │ │ │ ├── ComponentFieldList.js │ │ │ │ │ ├── DisplayedFieldButton.js │ │ │ │ │ ├── DisplayedFields.js │ │ │ │ │ ├── DynamicZoneList.js │ │ │ │ │ ├── FieldButtonContent.js │ │ │ │ │ ├── FormModal.js │ │ │ │ │ ├── GenericInput.js │ │ │ │ │ ├── LinkToCTB.js │ │ │ │ │ ├── ModalForm.js │ │ │ │ │ ├── RelationalFieldButton.js │ │ │ │ │ ├── RelationalFields.js │ │ │ │ │ ├── RowItemsLayout.js │ │ │ │ │ └── RowsLayout.js │ │ │ │ ├── index.js │ │ │ │ ├── init.js │ │ │ │ ├── reducer.js │ │ │ │ └── utils │ │ │ │ │ ├── api.js │ │ │ │ │ ├── createPossibleMainFieldsForModelsAndComponents.js │ │ │ │ │ ├── getInputProps.js │ │ │ │ │ ├── index.js │ │ │ │ │ └── layout.js │ │ │ ├── EditView │ │ │ │ ├── DeleteLink │ │ │ │ │ ├── index.js │ │ │ │ │ └── utils │ │ │ │ │ │ ├── connect.js │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ └── select.js │ │ │ │ ├── DraftAndPublishBadge │ │ │ │ │ ├── index.js │ │ │ │ │ └── utils │ │ │ │ │ │ ├── connect.js │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ └── select.js │ │ │ │ ├── Header │ │ │ │ │ ├── index.js │ │ │ │ │ └── utils │ │ │ │ │ │ ├── connect.js │ │ │ │ │ │ ├── getDraftRelations.js │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ └── select.js │ │ │ │ ├── Informations │ │ │ │ │ ├── index.js │ │ │ │ │ └── utils │ │ │ │ │ │ └── getUnits.js │ │ │ │ ├── index.js │ │ │ │ └── utils │ │ │ │ │ ├── createAttributesLayout.js │ │ │ │ │ ├── getFieldsActionMatchingPermissions.js │ │ │ │ │ └── index.js │ │ │ ├── EditViewLayoutManager │ │ │ │ ├── Permissions.js │ │ │ │ ├── actions.js │ │ │ │ ├── constants.js │ │ │ │ ├── index.js │ │ │ │ ├── reducer.js │ │ │ │ └── selectors.js │ │ │ ├── ListSettingsView │ │ │ │ ├── components │ │ │ │ │ ├── CardPreview.js │ │ │ │ │ ├── DraggableCard.js │ │ │ │ │ ├── EditFieldForm.js │ │ │ │ │ ├── Settings.js │ │ │ │ │ └── SortDisplayedFields.js │ │ │ │ ├── index.js │ │ │ │ ├── init.js │ │ │ │ ├── reducer.js │ │ │ │ └── utils │ │ │ │ │ ├── api.js │ │ │ │ │ ├── ellipsisCardTitle.js │ │ │ │ │ └── excludedSortOptions.js │ │ │ ├── ListView │ │ │ │ ├── FieldPicker │ │ │ │ │ ├── index.js │ │ │ │ │ └── utils │ │ │ │ │ │ └── getAllAllowedHeader.js │ │ │ │ ├── PaginationFooter │ │ │ │ │ └── index.js │ │ │ │ ├── actions.js │ │ │ │ ├── constants.js │ │ │ │ ├── index.js │ │ │ │ ├── reducer.js │ │ │ │ ├── selectors.js │ │ │ │ └── utils │ │ │ │ │ ├── buildQueryString.js │ │ │ │ │ ├── createPluginsFilter.js │ │ │ │ │ └── index.js │ │ │ ├── ListViewLayoutManager │ │ │ │ ├── Permissions.js │ │ │ │ └── index.js │ │ │ ├── NoContentType │ │ │ │ └── index.js │ │ │ ├── NoPermissions │ │ │ │ └── index.js │ │ │ └── SingleTypeRecursivePath │ │ │ │ └── index.js │ │ ├── sharedReducers │ │ │ └── crudReducer │ │ │ │ ├── actions.js │ │ │ │ ├── constants.js │ │ │ │ ├── reducer.js │ │ │ │ └── selectors.js │ │ ├── testUtils │ │ │ ├── data.js │ │ │ └── index.js │ │ └── utils │ │ │ ├── ItemTypes.js │ │ │ ├── arrayMoveItem.js │ │ │ ├── checkIfAttributeIsDisplayable.js │ │ │ ├── createDefaultForm.js │ │ │ ├── formatLayoutToApi.js │ │ │ ├── generatePermissionsObject.js │ │ │ ├── getFieldName.js │ │ │ ├── getMaxTempKey.js │ │ │ ├── getRequestUrl.js │ │ │ ├── getTrad.js │ │ │ ├── index.js │ │ │ ├── isFieldTypeNumber.js │ │ │ ├── mergeMetasWithSchema.js │ │ │ ├── removeKeyInObject.js │ │ │ └── removePasswordFieldsFromData.js │ │ ├── contexts │ │ ├── Admin │ │ │ └── index.js │ │ ├── Configurations │ │ │ └── index.js │ │ ├── MarketPlace │ │ │ └── index.js │ │ ├── PermisssionsDataManagerContext │ │ │ └── index.js │ │ ├── ThemeToggle │ │ │ └── index.js │ │ └── index.js │ │ ├── core │ │ ├── apis │ │ │ ├── Components.js │ │ │ ├── Fields.js │ │ │ ├── Middlewares.js │ │ │ ├── Plugin.js │ │ │ ├── Reducers.js │ │ │ └── index.js │ │ ├── store │ │ │ ├── configureStore.js │ │ │ └── createReducer.js │ │ └── utils │ │ │ ├── axiosInstance.js │ │ │ ├── basename.js │ │ │ ├── createHook.js │ │ │ └── index.js │ │ ├── exposedHooks.js │ │ ├── favicon.ico │ │ ├── hooks │ │ ├── index.js │ │ ├── useConfigurations │ │ │ └── index.js │ │ ├── useFetchEnabledPlugins │ │ │ ├── index.js │ │ │ └── utils │ │ │ │ └── api.js │ │ ├── useFetchMarketplacePlugins │ │ │ ├── index.js │ │ │ └── utils │ │ │ │ └── api.js │ │ ├── useFetchMarketplaceProviders │ │ │ ├── index.js │ │ │ └── utils │ │ │ │ └── api.js │ │ ├── useFetchPermissionsLayout │ │ │ ├── index.js │ │ │ └── reducer.js │ │ ├── useFetchRole │ │ │ ├── index.js │ │ │ └── reducer.js │ │ ├── useMenu │ │ │ ├── index.js │ │ │ ├── reducer.js │ │ │ └── utils │ │ │ │ ├── checkPermissions.js │ │ │ │ ├── getGeneralLinks.js │ │ │ │ └── getPluginSectionLinks.js │ │ ├── useModels │ │ │ ├── index.js │ │ │ └── reducer.js │ │ ├── useNavigatorOnLine │ │ │ └── index.js │ │ ├── usePermissionsDataManager │ │ │ └── index.js │ │ ├── useReleaseNotification │ │ │ ├── index.js │ │ │ └── utils │ │ │ │ ├── api.js │ │ │ │ └── checkLatestStrapiVersion.js │ │ ├── useRolesList │ │ │ ├── index.js │ │ │ ├── init.js │ │ │ └── reducer.js │ │ ├── useSettingsForm │ │ │ ├── index.js │ │ │ ├── init.js │ │ │ └── reducer.js │ │ ├── useSettingsMenu │ │ │ ├── index.js │ │ │ ├── init.js │ │ │ ├── reducer.js │ │ │ └── utils │ │ │ │ ├── customGlobalLinks.js │ │ │ │ ├── defaultGlobalLinks.js │ │ │ │ ├── formatLinks.js │ │ │ │ ├── globalLinks.js │ │ │ │ └── sortLinks.js │ │ └── useThemeToggle │ │ │ └── index.js │ │ ├── index.html │ │ ├── index.js │ │ ├── injectionZones.js │ │ ├── layouts │ │ ├── AppLayout │ │ │ └── index.js │ │ └── UnauthenticatedLayout │ │ │ ├── LocaleToggle │ │ │ └── index.js │ │ │ └── index.js │ │ ├── pages │ │ ├── Admin │ │ │ ├── Onboarding │ │ │ │ └── index.js │ │ │ └── index.js │ │ ├── App │ │ │ ├── constants.js │ │ │ ├── index.js │ │ │ ├── reducer.js │ │ │ └── utils │ │ │ │ ├── customRoutes.js │ │ │ │ ├── defaultRoutes.js │ │ │ │ ├── index.js │ │ │ │ ├── routes.js │ │ │ │ └── unique-identifier.js │ │ ├── AuthPage │ │ │ ├── components │ │ │ │ ├── FieldActionWrapper │ │ │ │ │ └── index.js │ │ │ │ ├── ForgotPassword │ │ │ │ │ └── index.js │ │ │ │ ├── ForgotPasswordSuccess │ │ │ │ │ └── index.js │ │ │ │ ├── Login │ │ │ │ │ ├── BaseLogin.js │ │ │ │ │ └── index.js │ │ │ │ ├── Oops │ │ │ │ │ └── index.js │ │ │ │ ├── Register │ │ │ │ │ └── index.js │ │ │ │ └── ResetPassword │ │ │ │ │ └── index.js │ │ │ ├── index.js │ │ │ ├── init.js │ │ │ ├── reducer.js │ │ │ └── utils │ │ │ │ ├── forms.js │ │ │ │ └── index.js │ │ ├── HomePage │ │ │ ├── ContentBlocks.js │ │ │ ├── HomeHeader.js │ │ │ ├── SocialLinks.js │ │ │ └── index.js │ │ ├── InstalledPluginsPage │ │ │ ├── Plugins.js │ │ │ └── index.js │ │ ├── InternalErrorPage │ │ │ └── index.js │ │ ├── MarketplacePage │ │ │ ├── components │ │ │ │ ├── EmptyNpmPackageSearch │ │ │ │ │ ├── EmptyNpmPackageGrid.js │ │ │ │ │ └── index.js │ │ │ │ ├── MissingPluginBanner │ │ │ │ │ └── index.js │ │ │ │ ├── NpmPackageCard │ │ │ │ │ ├── InstallPluginButton.js │ │ │ │ │ └── index.js │ │ │ │ ├── NpmPackagesGrid │ │ │ │ │ └── index.js │ │ │ │ └── PageHeader │ │ │ │ │ └── index.js │ │ │ └── index.js │ │ ├── NotFoundPage │ │ │ └── index.js │ │ ├── ProfilePage │ │ │ ├── index.js │ │ │ └── utils │ │ │ │ ├── api.js │ │ │ │ └── schema.js │ │ ├── SettingsPage │ │ │ ├── components │ │ │ │ └── SettingsNav │ │ │ │ │ └── index.js │ │ │ ├── index.js │ │ │ ├── pages │ │ │ │ ├── ApiTokens │ │ │ │ │ ├── EditView │ │ │ │ │ │ ├── components │ │ │ │ │ │ │ ├── ContentBox │ │ │ │ │ │ │ │ └── index.js │ │ │ │ │ │ │ └── LoadingView │ │ │ │ │ │ │ │ └── index.js │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ └── utils │ │ │ │ │ │ │ └── schema.js │ │ │ │ │ ├── ListView │ │ │ │ │ │ ├── DynamicTable │ │ │ │ │ │ │ ├── DeleteButton │ │ │ │ │ │ │ │ └── index.js │ │ │ │ │ │ │ ├── UpdateButton │ │ │ │ │ │ │ │ └── index.js │ │ │ │ │ │ │ └── index.js │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ └── utils │ │ │ │ │ │ │ └── tableHeaders.js │ │ │ │ │ ├── ProtectedCreateView │ │ │ │ │ │ └── index.js │ │ │ │ │ ├── ProtectedEditView │ │ │ │ │ │ └── index.js │ │ │ │ │ └── ProtectedListView │ │ │ │ │ │ └── index.js │ │ │ │ ├── ApplicationInfosPage │ │ │ │ │ ├── components │ │ │ │ │ │ ├── Form │ │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ │ ├── init.js │ │ │ │ │ │ │ └── reducer.js │ │ │ │ │ │ ├── LogoInput │ │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ │ ├── reducer.js │ │ │ │ │ │ │ └── stepper.js │ │ │ │ │ │ └── LogoModalStepper │ │ │ │ │ │ │ ├── AddLogoDialog.js │ │ │ │ │ │ │ ├── FromComputerForm.js │ │ │ │ │ │ │ ├── FromUrlForm.js │ │ │ │ │ │ │ ├── ImageCardAsset.js │ │ │ │ │ │ │ ├── PendingLogoDialog.js │ │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ │ └── reducer.js │ │ │ │ │ ├── index.js │ │ │ │ │ └── utils │ │ │ │ │ │ ├── api.js │ │ │ │ │ │ ├── constants.js │ │ │ │ │ │ ├── getFormData.js │ │ │ │ │ │ ├── parseFileMetadatas.js │ │ │ │ │ │ ├── prefixAllUrls.js │ │ │ │ │ │ └── urlToFile.js │ │ │ │ ├── Roles │ │ │ │ │ ├── CreatePage │ │ │ │ │ │ └── index.js │ │ │ │ │ ├── EditPage │ │ │ │ │ │ ├── components │ │ │ │ │ │ │ ├── CollapseLabel │ │ │ │ │ │ │ │ └── index.js │ │ │ │ │ │ │ ├── ConditionsButton │ │ │ │ │ │ │ │ └── index.js │ │ │ │ │ │ │ ├── ConditionsModal │ │ │ │ │ │ │ │ ├── ActionRow │ │ │ │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ │ │ │ └── utils │ │ │ │ │ │ │ │ │ │ └── constants.js │ │ │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ │ │ └── utils │ │ │ │ │ │ │ │ │ └── createDefaultConditionsForm.js │ │ │ │ │ │ │ ├── ContentTypeCollapse │ │ │ │ │ │ │ │ ├── Collapse │ │ │ │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ │ │ │ └── utils │ │ │ │ │ │ │ │ │ │ ├── constants.js │ │ │ │ │ │ │ │ │ │ └── generateCheckboxesActions.js │ │ │ │ │ │ │ │ ├── CollapsePropertyMatrix │ │ │ │ │ │ │ │ │ ├── ActionRow │ │ │ │ │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ │ │ │ │ └── utils │ │ │ │ │ │ │ │ │ │ │ ├── constants.js │ │ │ │ │ │ │ │ │ │ │ └── getRowLabelCheckboxeState.js │ │ │ │ │ │ │ │ │ ├── CarretIcon │ │ │ │ │ │ │ │ │ │ └── index.js │ │ │ │ │ │ │ │ │ ├── Header │ │ │ │ │ │ │ │ │ │ └── index.js │ │ │ │ │ │ │ │ │ ├── SubActionRow │ │ │ │ │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ │ │ │ │ └── utils │ │ │ │ │ │ │ │ │ │ │ └── constants.js │ │ │ │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ │ │ │ └── utils │ │ │ │ │ │ │ │ │ │ └── generateHeadersFromActions.js │ │ │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ │ │ └── utils │ │ │ │ │ │ │ │ │ ├── activeStyle.js │ │ │ │ │ │ │ │ │ ├── getAvailableActions.js │ │ │ │ │ │ │ │ │ └── index.js │ │ │ │ │ │ │ ├── ContentTypeCollapses │ │ │ │ │ │ │ │ └── index.js │ │ │ │ │ │ │ ├── ContentTypes │ │ │ │ │ │ │ │ └── index.js │ │ │ │ │ │ │ ├── Curve │ │ │ │ │ │ │ │ └── index.js │ │ │ │ │ │ │ ├── GlobalActions │ │ │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ │ │ └── utils │ │ │ │ │ │ │ │ │ ├── constants.js │ │ │ │ │ │ │ │ │ ├── findDisplayedActions.js │ │ │ │ │ │ │ │ │ ├── getRowLabelCheckboxesState.js │ │ │ │ │ │ │ │ │ └── index.js │ │ │ │ │ │ │ ├── HiddenAction │ │ │ │ │ │ │ │ └── index.js │ │ │ │ │ │ │ ├── Permissions │ │ │ │ │ │ │ │ ├── README.md │ │ │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ │ │ ├── init.js │ │ │ │ │ │ │ │ ├── reducer.js │ │ │ │ │ │ │ │ └── utils │ │ │ │ │ │ │ │ │ ├── constants.js │ │ │ │ │ │ │ │ │ ├── createDefaultCTFormFromLayout.js │ │ │ │ │ │ │ │ │ ├── createDefaultPluginsFormFromLayout.js │ │ │ │ │ │ │ │ │ ├── findMatchingPermissions.js │ │ │ │ │ │ │ │ │ ├── formatContentTypesPermissionToAPI.js │ │ │ │ │ │ │ │ │ ├── formatLayoutForSettingsAndPlugins.js │ │ │ │ │ │ │ │ │ ├── formatPermissionsToAPI.js │ │ │ │ │ │ │ │ │ ├── formatSettingsPermissionsToAPI.js │ │ │ │ │ │ │ │ │ ├── tabLabels.js │ │ │ │ │ │ │ │ │ ├── updateConditionsToFalse.js │ │ │ │ │ │ │ │ │ └── updateValues.js │ │ │ │ │ │ │ ├── PermissionsDataManagerProvider │ │ │ │ │ │ │ │ └── index.js │ │ │ │ │ │ │ ├── PluginsAndSettings │ │ │ │ │ │ │ │ ├── Row │ │ │ │ │ │ │ │ │ └── index.js │ │ │ │ │ │ │ │ ├── SubCategory │ │ │ │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ │ │ │ └── utils │ │ │ │ │ │ │ │ │ │ ├── constants.js │ │ │ │ │ │ │ │ │ │ ├── formatActions.js │ │ │ │ │ │ │ │ │ │ ├── getConditionsButtonState.js │ │ │ │ │ │ │ │ │ │ └── index.js │ │ │ │ │ │ │ │ └── index.js │ │ │ │ │ │ │ ├── RequiredSign │ │ │ │ │ │ │ │ └── index.js │ │ │ │ │ │ │ ├── RoleForm │ │ │ │ │ │ │ │ └── index.js │ │ │ │ │ │ │ ├── RowLabelWithCheckbox │ │ │ │ │ │ │ │ └── index.js │ │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ │ └── utils │ │ │ │ │ │ │ │ ├── createArrayOfValues.js │ │ │ │ │ │ │ │ ├── getCheckboxState.js │ │ │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ │ │ └── removeConditionKeyFromData.js │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ └── utils │ │ │ │ │ │ │ └── schema.js │ │ │ │ │ ├── ListPage │ │ │ │ │ │ ├── components │ │ │ │ │ │ │ ├── EmptyRole │ │ │ │ │ │ │ │ └── index.js │ │ │ │ │ │ │ └── RoleRow │ │ │ │ │ │ │ │ └── index.js │ │ │ │ │ │ └── index.js │ │ │ │ │ ├── ProtectedEditPage │ │ │ │ │ │ └── index.js │ │ │ │ │ └── ProtectedListPage │ │ │ │ │ │ └── index.js │ │ │ │ ├── Users │ │ │ │ │ ├── EditPage │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ └── utils │ │ │ │ │ │ │ ├── api.js │ │ │ │ │ │ │ └── layout.js │ │ │ │ │ ├── ListPage │ │ │ │ │ │ ├── DynamicTable │ │ │ │ │ │ │ └── TableRows │ │ │ │ │ │ │ │ └── index.js │ │ │ │ │ │ ├── Filters │ │ │ │ │ │ │ └── index.js │ │ │ │ │ │ ├── ModalForm │ │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ │ └── utils │ │ │ │ │ │ │ │ ├── formDataModel.js │ │ │ │ │ │ │ │ ├── layout.js │ │ │ │ │ │ │ │ ├── roleSettingsForm.js │ │ │ │ │ │ │ │ ├── schema.js │ │ │ │ │ │ │ │ └── stepper.js │ │ │ │ │ │ ├── PaginationFooter │ │ │ │ │ │ │ └── index.js │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ └── utils │ │ │ │ │ │ │ ├── api.js │ │ │ │ │ │ │ ├── displayedFilters.js │ │ │ │ │ │ │ └── tableHeaders.js │ │ │ │ │ ├── ProtectedEditPage │ │ │ │ │ │ └── index.js │ │ │ │ │ ├── ProtectedListPage │ │ │ │ │ │ └── index.js │ │ │ │ │ ├── components │ │ │ │ │ │ ├── MagicLink │ │ │ │ │ │ │ ├── MagicLinkWrapper.js │ │ │ │ │ │ │ └── index.js │ │ │ │ │ │ └── SelectRoles │ │ │ │ │ │ │ └── index.js │ │ │ │ │ └── utils │ │ │ │ │ │ └── validations │ │ │ │ │ │ └── users │ │ │ │ │ │ ├── edit.js │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ ├── profile.js │ │ │ │ │ │ └── roles.js │ │ │ │ └── Webhooks │ │ │ │ │ ├── EditView │ │ │ │ │ ├── components │ │ │ │ │ │ ├── EventInput │ │ │ │ │ │ │ ├── EventRow.js │ │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ │ └── utils │ │ │ │ │ │ │ │ └── formatValue.js │ │ │ │ │ │ ├── HeadersInput │ │ │ │ │ │ │ ├── Combobox.js │ │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ │ └── keys.js │ │ │ │ │ │ ├── TriggerContainer │ │ │ │ │ │ │ └── index.js │ │ │ │ │ │ ├── WebhookForm │ │ │ │ │ │ │ └── index.js │ │ │ │ │ │ └── utils │ │ │ │ │ │ │ ├── fieldsRegex.js │ │ │ │ │ │ │ └── schema.js │ │ │ │ │ ├── index.js │ │ │ │ │ ├── reducer.js │ │ │ │ │ └── utils │ │ │ │ │ │ └── formatData.js │ │ │ │ │ ├── ListView │ │ │ │ │ ├── index.js │ │ │ │ │ └── reducer.js │ │ │ │ │ ├── ProtectedCreateView │ │ │ │ │ └── index.js │ │ │ │ │ ├── ProtectedEditView │ │ │ │ │ └── index.js │ │ │ │ │ └── ProtectedListView │ │ │ │ │ └── index.js │ │ │ └── utils │ │ │ │ ├── createSectionsRoutes.js │ │ │ │ ├── customRoutes.js │ │ │ │ ├── defaultRoutes.js │ │ │ │ ├── getSectionsToDisplay.js │ │ │ │ ├── index.js │ │ │ │ └── routes.js │ │ └── UseCasePage │ │ │ └── index.js │ │ ├── permissions │ │ ├── customPermissions.js │ │ ├── defaultPermissions.js │ │ └── index.js │ │ ├── plugins.js │ │ ├── reducers.js │ │ ├── shared │ │ ├── components │ │ │ ├── InjectionZone │ │ │ │ └── index.js │ │ │ └── index.js │ │ └── hooks │ │ │ ├── index.js │ │ │ ├── useAdminProvider │ │ │ └── index.js │ │ │ └── useInjectionZone │ │ │ └── index.js │ │ ├── translations │ │ ├── ar.json │ │ ├── ca.json │ │ ├── cs.json │ │ ├── de.json │ │ ├── dk.json │ │ ├── en.json │ │ ├── es.json │ │ ├── fr.json │ │ ├── gu.json │ │ ├── he.json │ │ ├── hi.json │ │ ├── hu.json │ │ ├── id.json │ │ ├── it.json │ │ ├── ja.json │ │ ├── ko.json │ │ ├── languageNativeNames.js │ │ ├── ml.json │ │ ├── ms.json │ │ ├── nl.json │ │ ├── no.json │ │ ├── pl.json │ │ ├── pt-BR.json │ │ ├── pt.json │ │ ├── ru.json │ │ ├── sa.json │ │ ├── sk.json │ │ ├── sv.json │ │ ├── th.json │ │ ├── tr.json │ │ ├── uk.json │ │ ├── vi.json │ │ ├── zh-Hans.json │ │ └── zh.json │ │ ├── tsconfig.json │ │ └── utils │ │ ├── checkFormValidity.js │ │ ├── createRoute.js │ │ ├── formatAPIErrors.js │ │ ├── getAttributesToDisplay.js │ │ ├── getExistingActions.js │ │ ├── getFullName.js │ │ ├── getRequestUrl.js │ │ ├── index.js │ │ ├── makeUniqueRoutes.js │ │ └── sortLinks.js ├── ee │ └── admin │ │ ├── hooks │ │ ├── index.js │ │ ├── useAuthProviders │ │ │ ├── index.js │ │ │ └── reducer.js │ │ └── useSettingsMenu │ │ │ └── utils │ │ │ └── customGlobalLinks.js │ │ ├── pages │ │ ├── App │ │ │ └── utils │ │ │ │ └── customRoutes.js │ │ ├── AuthPage │ │ │ ├── components │ │ │ │ ├── Login │ │ │ │ │ └── index.js │ │ │ │ └── Providers │ │ │ │ │ ├── SSOProviders.js │ │ │ │ │ └── index.js │ │ │ └── utils │ │ │ │ └── forms.js │ │ ├── AuthResponse │ │ │ └── index.js │ │ └── SettingsPage │ │ │ ├── SingleSignOn │ │ │ ├── index.js │ │ │ └── utils │ │ │ │ └── schema.js │ │ │ ├── pages │ │ │ ├── Roles │ │ │ │ ├── CreatePage │ │ │ │ │ ├── index.js │ │ │ │ │ └── utils │ │ │ │ │ │ └── schema.js │ │ │ │ ├── EditPage │ │ │ │ │ └── components │ │ │ │ │ │ ├── ConditionsModal │ │ │ │ │ │ ├── ActionRow │ │ │ │ │ │ │ └── utils │ │ │ │ │ │ │ │ └── constants.js │ │ │ │ │ │ └── ConditionsSelect │ │ │ │ │ │ │ └── MenuList │ │ │ │ │ │ │ └── utils │ │ │ │ │ │ │ └── constants.js │ │ │ │ │ │ ├── ContentTypeCollapse │ │ │ │ │ │ ├── Collapse │ │ │ │ │ │ │ └── utils │ │ │ │ │ │ │ │ └── constants.js │ │ │ │ │ │ └── CollapsePropertyMatrix │ │ │ │ │ │ │ ├── ActionRow │ │ │ │ │ │ │ └── utils │ │ │ │ │ │ │ │ └── constants.js │ │ │ │ │ │ │ └── SubActionRow │ │ │ │ │ │ │ └── utils │ │ │ │ │ │ │ └── constants.js │ │ │ │ │ │ ├── GlobalActions │ │ │ │ │ │ └── utils │ │ │ │ │ │ │ └── constants.js │ │ │ │ │ │ └── PluginsAndSettings │ │ │ │ │ │ └── SubCategory │ │ │ │ │ │ └── utils │ │ │ │ │ │ └── constants.js │ │ │ │ ├── ListPage │ │ │ │ │ ├── index.js │ │ │ │ │ └── reducer.js │ │ │ │ └── ProtectedListPage │ │ │ │ │ └── index.js │ │ │ └── Users │ │ │ │ ├── ListPage │ │ │ │ └── ModalForm │ │ │ │ │ └── utils │ │ │ │ │ ├── formDataModel.js │ │ │ │ │ └── roleSettingsForm.js │ │ │ │ └── components │ │ │ │ └── MagicLink │ │ │ │ └── index.js │ │ │ └── utils │ │ │ └── customRoutes.js │ │ └── permissions │ │ └── customPermissions.js └── package.json ├── .editorconfig ├── .env ├── .env.example ├── .eslintignore ├── .eslintrc ├── .gitignore ├── .tmp └── data.db ├── README.md ├── config ├── admin.js ├── api.js ├── database.js ├── middlewares.js └── server.js ├── favicon.ico ├── package-lock.json ├── package.json ├── public ├── robots.txt └── uploads │ ├── .gitkeep │ ├── _ff757e3a9c.jfif │ ├── code_67191e1aba.png │ ├── f44d305ea48e246a61a00e_0d6d1a5594.jpg │ ├── medium_f44d305ea48e246a61a00e_0d6d1a5594.jpg │ ├── small__ff757e3a9c.jfif │ ├── small_f44d305ea48e246a61a00e_0d6d1a5594.jpg │ ├── thumbnail__ff757e3a9c.jfif │ └── thumbnail_f44d305ea48e246a61a00e_0d6d1a5594.jpg └── src ├── admin ├── app.example.js └── webpack.config.example.js ├── api ├── .gitkeep ├── article-info │ ├── content-types │ │ └── article-info │ │ │ └── schema.json │ ├── controllers │ │ └── article-info.js │ ├── routes │ │ └── article-info.js │ └── services │ │ └── article-info.js ├── article-introduction │ ├── content-types │ │ └── article-introduction │ │ │ └── schema.json │ ├── controllers │ │ └── article-introduction.js │ ├── routes │ │ └── article-introduction.js │ └── services │ │ └── article-introduction.js ├── home │ ├── content-types │ │ └── home │ │ │ └── schema.json │ ├── controllers │ │ └── home.js │ ├── routes │ │ └── home.js │ └── services │ │ └── home.js ├── layout │ ├── content-types │ │ └── layout │ │ │ └── schema.json │ ├── controllers │ │ └── layout.js │ ├── routes │ │ └── layout.js │ └── services │ │ └── layout.js ├── link-list │ ├── content-types │ │ └── link-list │ │ │ └── schema.json │ ├── controllers │ │ └── link-list.js │ ├── routes │ │ └── link-list.js │ └── services │ │ └── link-list.js └── link │ ├── content-types │ └── link │ │ └── schema.json │ ├── controllers │ └── link.js │ ├── routes │ └── link.js │ └── services │ └── link.js ├── extensions └── .gitkeep ├── index.js └── utils └── index.js /.cache/admin/src/app.js: -------------------------------------------------------------------------------- 1 | const config = { 2 | locales: ['fr'], 3 | }; 4 | const bootstrap = () => {}; 5 | 6 | export default { 7 | config, 8 | bootstrap, 9 | }; 10 | -------------------------------------------------------------------------------- /.cache/admin/src/assets/images/banner_strapi-rocket.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/czm1290433700/nextjs-cms/4dd61244e54813d48e740d4e3c6f9c91c5b22ba4/.cache/admin/src/assets/images/banner_strapi-rocket.png -------------------------------------------------------------------------------- /.cache/admin/src/assets/images/big-logo-home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/czm1290433700/nextjs-cms/4dd61244e54813d48e740d4e3c6f9c91c5b22ba4/.cache/admin/src/assets/images/big-logo-home.png -------------------------------------------------------------------------------- /.cache/admin/src/assets/images/homepage-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/czm1290433700/nextjs-cms/4dd61244e54813d48e740d4e3c6f9c91c5b22ba4/.cache/admin/src/assets/images/homepage-logo.png -------------------------------------------------------------------------------- /.cache/admin/src/assets/images/hot-air-balloon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/czm1290433700/nextjs-cms/4dd61244e54813d48e740d4e3c6f9c91c5b22ba4/.cache/admin/src/assets/images/hot-air-balloon.png -------------------------------------------------------------------------------- /.cache/admin/src/assets/images/icon_made-by-strapi.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.cache/admin/src/assets/images/logo_strapi_auth.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/czm1290433700/nextjs-cms/4dd61244e54813d48e740d4e3c6f9c91c5b22ba4/.cache/admin/src/assets/images/logo_strapi_auth.png -------------------------------------------------------------------------------- /.cache/admin/src/assets/images/logo_strapi_auth_v4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/czm1290433700/nextjs-cms/4dd61244e54813d48e740d4e3c6f9c91c5b22ba4/.cache/admin/src/assets/images/logo_strapi_auth_v4.png -------------------------------------------------------------------------------- /.cache/admin/src/assets/images/logo_strapi_menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/czm1290433700/nextjs-cms/4dd61244e54813d48e740d4e3c6f9c91c5b22ba4/.cache/admin/src/assets/images/logo_strapi_menu.png -------------------------------------------------------------------------------- /.cache/admin/src/assets/images/oops.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/czm1290433700/nextjs-cms/4dd61244e54813d48e740d4e3c6f9c91c5b22ba4/.cache/admin/src/assets/images/oops.png -------------------------------------------------------------------------------- /.cache/admin/src/assets/images/upgrade-details.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/czm1290433700/nextjs-cms/4dd61244e54813d48e740d4e3c6f9c91c5b22ba4/.cache/admin/src/assets/images/upgrade-details.png -------------------------------------------------------------------------------- /.cache/admin/src/components/AuthenticatedApp/utils/checkLatestStrapiVersion.js: -------------------------------------------------------------------------------- 1 | import semver from 'semver'; 2 | 3 | const checkLatestStrapiVersion = (currentPackageVersion, latestPublishedVersion) => { 4 | if (!semver.valid(currentPackageVersion) || !semver.valid(latestPublishedVersion)) { 5 | return false; 6 | } 7 | 8 | return semver.lt(currentPackageVersion, latestPublishedVersion); 9 | }; 10 | 11 | export default checkLatestStrapiVersion; 12 | -------------------------------------------------------------------------------- /.cache/admin/src/components/AutoReloadOverlayBlockerProvider/Overlay.js: -------------------------------------------------------------------------------- 1 | import styled from 'styled-components'; 2 | import { Box } from '@strapi/design-system/Box'; 3 | import { Stack } from '@strapi/design-system/Stack'; 4 | import { pxToRem } from '@strapi/helper-plugin'; 5 | 6 | const Overlay = styled(Box)` 7 | position: fixed; 8 | top: 0; 9 | right: 0; 10 | bottom: 0; 11 | left: 0; 12 | z-index: 1140; 13 | &:before { 14 | content: ''; 15 | position: fixed; 16 | top: 0; 17 | right: 0; 18 | bottom: 0; 19 | left: 0; 20 | background: ${({ theme }) => theme.colors.neutral0}; 21 | opacity: 0.9; 22 | } 23 | `; 24 | 25 | const Content = styled(Stack)` 26 | position: fixed; 27 | top: 0; 28 | right: 0; 29 | bottom: 0; 30 | left: 0; 31 | padding-top: ${pxToRem(160)}; 32 | `; 33 | 34 | const IconBox = styled(Box)` 35 | border-radius: 50%; 36 | svg { 37 | > path { 38 | fill: ${({ theme }) => theme.colors.primary600} !important; 39 | } 40 | } 41 | `; 42 | 43 | export { Content, IconBox, Overlay }; 44 | -------------------------------------------------------------------------------- /.cache/admin/src/components/ConfigurationsProvider/reducer.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable consistent-return */ 2 | /* 3 | * 4 | * ConfigurationsProvider reducer 5 | * 6 | */ 7 | 8 | import produce from 'immer'; 9 | 10 | const initialState = { 11 | menuLogo: null, 12 | }; 13 | 14 | const reducer = (state = initialState, action) => 15 | produce(state, draftState => { 16 | switch (action.type) { 17 | case 'UPDATE_PROJECT_SETTINGS': { 18 | Object.assign(draftState, action.values); 19 | break; 20 | } 21 | default: { 22 | return draftState; 23 | } 24 | } 25 | }); 26 | 27 | export default reducer; 28 | export { initialState }; 29 | -------------------------------------------------------------------------------- /.cache/admin/src/components/GlobalStyle/index.js: -------------------------------------------------------------------------------- 1 | import { createGlobalStyle } from 'styled-components'; 2 | 3 | const loadCss = async () => { 4 | await import(/* webpackChunkName: "fontawesome-css" */ 'font-awesome/css/font-awesome.min.css'); 5 | await import( 6 | /* webpackChunkName: "fontawesome-css-all" */ '@fortawesome/fontawesome-free/css/all.css' 7 | ); 8 | await import(/* webpackChunkName: "fontawesome-js" */ '@fortawesome/fontawesome-free/js/all.min'); 9 | await import(/* webpackChunkName: "cropper-css" */ 'cropperjs/dist/cropper.css'); 10 | }; 11 | 12 | loadCss(); 13 | 14 | const GlobalStyle = createGlobalStyle` 15 | body { 16 | background: ${({ theme }) => theme.colors.neutral100}; 17 | } 18 | `; 19 | 20 | export default GlobalStyle; 21 | -------------------------------------------------------------------------------- /.cache/admin/src/components/GuidedTour/Modal/components/StepNumberWithPadding.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import PropTypes from 'prop-types'; 3 | import { Box } from '@strapi/design-system/Box'; 4 | import StepNumber from '../../Stepper/StepNumber'; 5 | 6 | const StepNumberWithPadding = ({ number, last, type }) => ( 7 | 8 | 9 | 10 | ); 11 | 12 | StepNumberWithPadding.defaultProps = { 13 | number: undefined, 14 | last: false, 15 | type: '', 16 | }; 17 | 18 | StepNumberWithPadding.propTypes = { 19 | number: PropTypes.number, 20 | last: PropTypes.bool, 21 | type: PropTypes.string, 22 | }; 23 | 24 | export default StepNumberWithPadding; 25 | -------------------------------------------------------------------------------- /.cache/admin/src/components/GuidedTour/Modal/reducer.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable consistent-return */ 2 | import produce from 'immer'; 3 | 4 | export const initialState = { 5 | stepContent: null, 6 | sectionIndex: null, 7 | stepIndex: null, 8 | hasSectionAfter: false, 9 | hasStepAfter: false, 10 | }; 11 | 12 | const reducer = (state = initialState, action) => 13 | produce(state, draftState => { 14 | switch (action.type) { 15 | case 'UPDATE_MODAL': { 16 | draftState.stepContent = action.content; 17 | draftState.sectionIndex = action.newSectionIndex; 18 | draftState.stepIndex = action.newStepIndex; 19 | draftState.hasSectionAfter = action.newHasSectionAfter; 20 | draftState.hasStepAfter = action.newHasStepAfter; 21 | break; 22 | } 23 | default: { 24 | return draftState; 25 | } 26 | } 27 | }); 28 | 29 | export default reducer; 30 | -------------------------------------------------------------------------------- /.cache/admin/src/components/GuidedTour/Stepper/StepLine.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import PropTypes from 'prop-types'; 3 | import { pxToRem } from '@strapi/helper-plugin'; 4 | import { Box } from '@strapi/design-system/Box'; 5 | import { IS_DONE, IS_ACTIVE, IS_NOT_DONE } from '../constants'; 6 | 7 | const StepLine = ({ type, ...props }) => { 8 | return ( 9 | 16 | ); 17 | }; 18 | 19 | StepLine.defaultProps = { 20 | type: IS_NOT_DONE, 21 | }; 22 | 23 | StepLine.propTypes = { 24 | type: PropTypes.oneOf([IS_ACTIVE, IS_DONE, IS_NOT_DONE]), 25 | }; 26 | 27 | export default StepLine; 28 | -------------------------------------------------------------------------------- /.cache/admin/src/components/GuidedTour/constants.js: -------------------------------------------------------------------------------- 1 | export const IS_ACTIVE = 'isActive'; 2 | export const IS_DONE = 'isDone'; 3 | export const IS_NOT_DONE = 'isNotDone'; 4 | -------------------------------------------------------------------------------- /.cache/admin/src/components/GuidedTour/utils/arePreviousSectionsDone.js: -------------------------------------------------------------------------------- 1 | const arePreviousSectionsDone = (sectionName, guidedTourState) => { 2 | const guidedTourArray = Object.entries(guidedTourState); 3 | 4 | // Find current section position in the guidedTourArray 5 | // Get only previous sections based on current section position 6 | const currentSectionIndex = guidedTourArray.findIndex(([key]) => key === sectionName); 7 | const previousSections = guidedTourArray.slice(0, currentSectionIndex); 8 | 9 | // Check if every steps from previous section are done 10 | return previousSections.every(([, sectionValue]) => Object.values(sectionValue).every(Boolean)); 11 | }; 12 | 13 | export default arePreviousSectionsDone; 14 | -------------------------------------------------------------------------------- /.cache/admin/src/components/GuidedTour/utils/arePreviousStepsDone.js: -------------------------------------------------------------------------------- 1 | const arePreviousStepsDone = (step, guidedTourState) => { 2 | const stepSplit = step.split('.'); 3 | const stepName = stepSplit[1]; 4 | const sectionArray = Object.entries(guidedTourState[stepSplit[0]]); 5 | 6 | const currentStepIndex = sectionArray.findIndex(([key]) => key === stepName); 7 | const previousSteps = sectionArray.slice(0, currentStepIndex); 8 | 9 | return previousSteps.every(([, sectionValue]) => sectionValue); 10 | }; 11 | 12 | export default arePreviousStepsDone; 13 | -------------------------------------------------------------------------------- /.cache/admin/src/components/GuidedTour/utils/isGuidedTourCompleted.js: -------------------------------------------------------------------------------- 1 | const isGuidedTourCompleted = guidedTourState => 2 | Object.entries(guidedTourState).every(([, section]) => 3 | Object.entries(section).every(([, step]) => step) 4 | ); 5 | 6 | export default isGuidedTourCompleted; 7 | -------------------------------------------------------------------------------- /.cache/admin/src/components/LanguageProvider/init.js: -------------------------------------------------------------------------------- 1 | import localStorageKey from './utils/localStorageKey'; 2 | 3 | const init = localeNames => { 4 | const languageFromLocaleStorage = window.localStorage.getItem(localStorageKey); 5 | const appLanguage = localeNames[languageFromLocaleStorage] ? languageFromLocaleStorage : 'en'; 6 | 7 | return { 8 | locale: appLanguage, 9 | localeNames, 10 | }; 11 | }; 12 | 13 | export default init; 14 | -------------------------------------------------------------------------------- /.cache/admin/src/components/LanguageProvider/reducer.js: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * LanguageProvider reducer 4 | * 5 | */ 6 | 7 | const initialState = { 8 | localeNames: { en: 'English' }, 9 | locale: 'en', 10 | }; 11 | 12 | const languageProviderReducer = (state = initialState, action) => { 13 | switch (action.type) { 14 | case 'CHANGE_LOCALE': { 15 | const { locale } = action; 16 | 17 | if (!state.localeNames[locale]) { 18 | return state; 19 | } 20 | 21 | return { ...state, locale }; 22 | } 23 | default: { 24 | return state; 25 | } 26 | } 27 | }; 28 | 29 | export default languageProviderReducer; 30 | export { initialState }; 31 | -------------------------------------------------------------------------------- /.cache/admin/src/components/LanguageProvider/utils/localStorageKey.js: -------------------------------------------------------------------------------- 1 | const localStorageKey = 'strapi-admin-language'; 2 | 3 | export default localStorageKey; 4 | -------------------------------------------------------------------------------- /.cache/admin/src/components/LocalesProvider/context.js: -------------------------------------------------------------------------------- 1 | import { createContext } from 'react'; 2 | 3 | const LocalesProviderContext = createContext(); 4 | 5 | export default LocalesProviderContext; 6 | -------------------------------------------------------------------------------- /.cache/admin/src/components/LocalesProvider/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import PropTypes from 'prop-types'; 3 | import LocalesProviderContext from './context'; 4 | 5 | const LocalesProvider = ({ changeLocale, children, localeNames, messages }) => { 6 | return ( 7 | 8 | {children} 9 | 10 | ); 11 | }; 12 | 13 | LocalesProvider.propTypes = { 14 | changeLocale: PropTypes.func.isRequired, 15 | children: PropTypes.element.isRequired, 16 | localeNames: PropTypes.object.isRequired, 17 | messages: PropTypes.object.isRequired, 18 | }; 19 | 20 | export default LocalesProvider; 21 | -------------------------------------------------------------------------------- /.cache/admin/src/components/LocalesProvider/useLocalesProvider.js: -------------------------------------------------------------------------------- 1 | import { useContext } from 'react'; 2 | import LocalesProviderContext from './context'; 3 | 4 | const useLocalesProvider = () => { 5 | const { changeLocale, localeNames, messages } = useContext(LocalesProviderContext); 6 | 7 | return { changeLocale, localeNames, messages }; 8 | }; 9 | 10 | export default useLocalesProvider; 11 | -------------------------------------------------------------------------------- /.cache/admin/src/components/PluginsInitializer/init.js: -------------------------------------------------------------------------------- 1 | const init = plugins => { 2 | return { 3 | plugins: Object.keys(plugins).reduce((acc, current) => { 4 | acc[current] = { ...plugins[current] }; 5 | 6 | return acc; 7 | }, {}), 8 | }; 9 | }; 10 | 11 | export default init; 12 | -------------------------------------------------------------------------------- /.cache/admin/src/components/PluginsInitializer/reducer.js: -------------------------------------------------------------------------------- 1 | import produce from 'immer'; 2 | import set from 'lodash/set'; 3 | 4 | const initialState = { 5 | plugins: null, 6 | }; 7 | 8 | const reducer = (state = initialState, action) => 9 | /* eslint-disable-next-line consistent-return */ 10 | produce(state, draftState => { 11 | switch (action.type) { 12 | case 'SET_PLUGIN_READY': { 13 | set(draftState, ['plugins', action.pluginId, 'isReady'], true); 14 | break; 15 | } 16 | default: 17 | return draftState; 18 | } 19 | }); 20 | 21 | export { initialState }; 22 | export default reducer; 23 | -------------------------------------------------------------------------------- /.cache/admin/src/components/RBACProvider/actions.js: -------------------------------------------------------------------------------- 1 | import { RESET_STORE, SET_PERMISSIONS } from './constants'; 2 | 3 | const resetStore = () => ({ type: RESET_STORE }); 4 | 5 | const setPermissions = permissions => ({ 6 | type: SET_PERMISSIONS, 7 | permissions, 8 | }); 9 | 10 | export { resetStore, setPermissions }; 11 | -------------------------------------------------------------------------------- /.cache/admin/src/components/RBACProvider/constants.js: -------------------------------------------------------------------------------- 1 | export const RESET_STORE = 'StrapiAdmin/RBACProvider/RESET_STORE'; 2 | export const SET_PERMISSIONS = 'StrapiAdmin/RBACProvider/SET_PERMISSIONS'; 3 | -------------------------------------------------------------------------------- /.cache/admin/src/components/Theme/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { ThemeProvider } from '@strapi/design-system/ThemeProvider'; 3 | import PropTypes from 'prop-types'; 4 | import { useThemeToggle } from '../../hooks'; 5 | import GlobalStyle from '../GlobalStyle'; 6 | 7 | const Theme = ({ children }) => { 8 | const { currentTheme, themes } = useThemeToggle(); 9 | 10 | return ( 11 | 12 | {children} 13 | 14 | 15 | ); 16 | }; 17 | 18 | Theme.propTypes = { 19 | children: PropTypes.element.isRequired, 20 | }; 21 | 22 | export default Theme; 23 | -------------------------------------------------------------------------------- /.cache/admin/src/components/UnauthenticatedLogo/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import styled from 'styled-components'; 3 | import { useConfigurations } from '../../hooks'; 4 | 5 | const Img = styled.img` 6 | height: ${72 / 16}rem; 7 | `; 8 | 9 | const Logo = () => { 10 | const { 11 | logos: { auth }, 12 | } = useConfigurations(); 13 | 14 | return ; 15 | }; 16 | 17 | export default Logo; 18 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/assets/images/background_input.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/assets/images/logo.svg: -------------------------------------------------------------------------------- 1 | 📖 -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/components/BackHeader/index.js: -------------------------------------------------------------------------------- 1 | import styled from 'styled-components'; 2 | import { BackHeader as BaseBackHeader } from '@strapi/helper-plugin'; 3 | 4 | const BackHeader = styled(BaseBackHeader)` 5 | left: 24rem; 6 | `; 7 | 8 | export default BackHeader; 9 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/components/Block/components.js: -------------------------------------------------------------------------------- 1 | import styled from 'styled-components'; 2 | 3 | const Wrapper = styled.div` 4 | margin-bottom: 35px; 5 | background: #ffffff; 6 | padding: 22px 28px 18px; 7 | padding-bottom: 13px; 8 | border-radius: 2px; 9 | box-shadow: 0 2px 4px #e3e9f3; 10 | -webkit-font-smoothing: antialiased; 11 | `; 12 | 13 | const Sub = styled.div` 14 | padding-top: 0px; 15 | line-height: 18px; 16 | > p:first-child { 17 | margin-bottom: 1px; 18 | font-weight: 700; 19 | color: #333740; 20 | font-size: 1.8rem; 21 | } 22 | > p { 23 | color: #787e8f; 24 | font-size: 13px; 25 | } 26 | `; 27 | 28 | export { Wrapper, Sub }; 29 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/components/Container/index.js: -------------------------------------------------------------------------------- 1 | import styled from 'styled-components'; 2 | 3 | const Container = styled.div` 4 | padding: 18px 30px 66px 30px; 5 | `; 6 | 7 | export default Container; 8 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/components/DynamicTable/CellContent/utils/getNumberOfDecimals.js: -------------------------------------------------------------------------------- 1 | export const getNumberOfDecimals = value => { 2 | if (value % 1 !== 0) { 3 | // value has decimals 4 | return value.toString().split('.')[1].length; 5 | } 6 | 7 | return 0; 8 | }; 9 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/components/DynamicTable/CellContent/utils/isSingleRelation.js: -------------------------------------------------------------------------------- 1 | export default function isSingleRelation(type) { 2 | return ['oneToOne', 'manyToOne', 'oneToOneMorph'].includes(type); 3 | } 4 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/components/DynamicZone/components/Component/Rectangle.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import styled from 'styled-components'; 3 | import { Box } from '@strapi/design-system/Box'; 4 | import { Flex } from '@strapi/design-system/Flex'; 5 | 6 | const StyledBox = styled(Box)` 7 | width: ${({ theme }) => theme.spaces[2]}; 8 | height: ${({ theme }) => theme.spaces[4]}; 9 | `; 10 | 11 | const Rectangle = () => { 12 | return ( 13 | 14 | 15 | 16 | ); 17 | }; 18 | 19 | export default Rectangle; 20 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/components/DynamicZone/utils/connect.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | function connect(WrappedComponent, select) { 4 | return function(props) { 5 | // eslint-disable-next-line react/prop-types 6 | const selectors = select(props.name); 7 | 8 | return ; 9 | }; 10 | } 11 | 12 | export default connect; 13 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/components/EditViewDataManagerProvider/utils/getAPIInnerError.js: -------------------------------------------------------------------------------- 1 | import { getTrad } from '../../../utils'; 2 | 3 | export function getAPIInnerError(error) { 4 | const errorPayload = error.response.data.error.details.errors; 5 | const validationErrors = errorPayload.reduce((acc, err) => { 6 | acc[err.path.join('.')] = { 7 | id: getTrad(`apiError.${err.message}`), 8 | defaultMessage: err.message, 9 | values: { 10 | field: err.path[err.path.length - 1], 11 | }, 12 | }; 13 | 14 | return acc; 15 | }, {}); 16 | 17 | return validationErrors; 18 | } 19 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/components/EditViewDataManagerProvider/utils/handleAPIError.js: -------------------------------------------------------------------------------- 1 | import { getTrad } from '../../../utils'; 2 | 3 | export function handleAPIError(error) { 4 | const errorPayload = error.response.data.error.details.errors; 5 | const validationErrors = errorPayload.reduce((acc, err) => { 6 | acc[err.path.join('.')] = { 7 | id: getTrad(`apiError.${err.message}`), 8 | defaultMessage: err.message, 9 | }; 10 | 11 | return acc; 12 | }, {}); 13 | 14 | return validationErrors; 15 | } 16 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/components/EditViewDataManagerProvider/utils/index.js: -------------------------------------------------------------------------------- 1 | export { default as moveFields } from './moveFields'; 2 | export { default as cleanData } from './cleanData'; 3 | export { default as createYupSchema } from './schema'; 4 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/components/EditViewDataManagerProvider/utils/moveFields.js: -------------------------------------------------------------------------------- 1 | const moveFields = (initialValue, from, to, value) => { 2 | const returnedValue = initialValue.slice(); 3 | 4 | returnedValue.splice(from, 1); 5 | returnedValue.splice(to, 0, value); 6 | 7 | return returnedValue; 8 | }; 9 | 10 | export default moveFields; 11 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/components/FieldComponent/utils/connect.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | function connect(WrappedComponent, select) { 4 | return function(props) { 5 | // eslint-disable-next-line react/prop-types 6 | const selectors = select(props); 7 | 8 | return ; 9 | }; 10 | } 11 | 12 | export default connect; 13 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/components/FilterOptionsCTA/index.js: -------------------------------------------------------------------------------- 1 | import styled from 'styled-components'; 2 | 3 | const FilterOptionsCTA = styled.button` 4 | display: flex; 5 | justify-content: center; 6 | height: 20px; 7 | width: 20px; 8 | margin: 8px 5px 0px 0px; 9 | border-radius: 50%; 10 | border: 1px solid #e3e9f3; 11 | cursor: pointer; 12 | `; 13 | 14 | export default FilterOptionsCTA; 15 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/components/FormTitle/index.js: -------------------------------------------------------------------------------- 1 | import React, { memo } from 'react'; 2 | import PropTypes from 'prop-types'; 3 | import { FormattedMessage } from 'react-intl'; 4 | 5 | const FormTitle = ({ description, title }) => ( 6 | <> 7 | {!!title && } 8 | {!!description && {msg =>

{msg}

}
} 9 | 10 | ); 11 | 12 | FormTitle.propTypes = { 13 | description: PropTypes.string, 14 | title: PropTypes.string, 15 | }; 16 | 17 | FormTitle.defaultProps = { 18 | description: null, 19 | title: null, 20 | }; 21 | 22 | export default memo(FormTitle); 23 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/components/FormWrapper/index.js: -------------------------------------------------------------------------------- 1 | import styled from 'styled-components'; 2 | 3 | const FormWrapper = styled.div` 4 | padding: 22px 10px 0 10px; 5 | background: #ffffff; 6 | border-radius: 2px; 7 | box-shadow: 0 2px 4px #e3e9f3; 8 | margin-bottom: 17px; 9 | > div { 10 | margin-right: 0; 11 | margin-left: 0; 12 | } 13 | .row { 14 | &:last-of-type { 15 | margin-bottom: 0; 16 | } 17 | } 18 | `; 19 | 20 | export default FormWrapper; 21 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/components/InjectionZoneList/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import PropTypes from 'prop-types'; 3 | import { Box } from '@strapi/design-system/Box'; 4 | import { useInjectionZone } from '../../../shared/hooks'; 5 | 6 | const InjectionZoneList = ({ area, ...props }) => { 7 | const compos = useInjectionZone(area); 8 | 9 | if (!compos) { 10 | return null; 11 | } 12 | 13 | // TODO 14 | return ( 15 |
    16 | {compos.map(compo => { 17 | const component = compo.Component(props); 18 | 19 | if (component) { 20 | return ( 21 | 22 | 23 | 24 | ); 25 | } 26 | 27 | return null; 28 | })} 29 |
30 | ); 31 | }; 32 | 33 | InjectionZoneList.propTypes = { 34 | area: PropTypes.string.isRequired, 35 | }; 36 | 37 | export default InjectionZoneList; 38 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/components/InputJSON/FieldError.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import PropTypes from 'prop-types'; 3 | import { useIntl } from 'react-intl'; 4 | import { Typography } from '@strapi/design-system/Typography'; 5 | 6 | export const FieldError = ({ id, error, name }) => { 7 | const { formatMessage } = useIntl(); 8 | const errorMessage = error ? formatMessage({ id: error, defaultMessage: error }) : ''; 9 | 10 | if (!error) { 11 | return null; 12 | } 13 | 14 | return ( 15 | 22 | {errorMessage} 23 | 24 | ); 25 | }; 26 | 27 | FieldError.defaultProps = { 28 | id: undefined, 29 | error: undefined, 30 | }; 31 | 32 | FieldError.propTypes = { 33 | error: PropTypes.string, 34 | id: PropTypes.string, 35 | name: PropTypes.string.isRequired, 36 | }; 37 | 38 | export default FieldError; 39 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/components/InputJSON/FieldWrapper.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import PropTypes from 'prop-types'; 3 | import { useIntl } from 'react-intl'; 4 | import { Field } from '@strapi/design-system/Field'; 5 | 6 | const FieldWrapper = ({ name, hint, error, children }) => { 7 | const { formatMessage } = useIntl(); 8 | const errorMessage = error ? formatMessage({ id: error, defaultMessage: error }) : ''; 9 | 10 | return ( 11 | 12 | {children} 13 | 14 | ); 15 | }; 16 | 17 | FieldWrapper.defaultProps = { 18 | hint: undefined, 19 | error: '', 20 | }; 21 | 22 | FieldWrapper.propTypes = { 23 | name: PropTypes.string.isRequired, 24 | hint: PropTypes.shape({ 25 | id: PropTypes.string, 26 | defaultMessage: PropTypes.string, 27 | }), 28 | error: PropTypes.string, 29 | children: PropTypes.node.isRequired, 30 | }; 31 | 32 | export default FieldWrapper; 33 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/components/InputJSON/components.js: -------------------------------------------------------------------------------- 1 | import styled from 'styled-components'; 2 | import { Box } from '@strapi/design-system/Box'; 3 | 4 | /* eslint-disable */ 5 | /* stylelint-disable */ 6 | const EditorWrapper = styled.div` 7 | cursor: ${({ disabled }) => (disabled ? 'not-allowed !important' : 'auto')}; 8 | /* BASICS */ 9 | 10 | .colored { 11 | background-color: yellow; 12 | color: black !important; 13 | } 14 | 15 | > div { 16 | border-radius: 3px; 17 | > div:last-of-type { 18 | min-height: 253px; 19 | max-height: 506px; 20 | } 21 | } 22 | 23 | .CodeMirror { 24 | /* Set height, width, borders, and global font properties here */ 25 | font-size: ${14 / 16}rem; 26 | direction: ltr; 27 | z-index: 0; 28 | } 29 | `; 30 | 31 | const StyledBox = styled(Box)` 32 | border-radius: ${({ theme }) => theme.borderRadius}; 33 | border: 1px solid ${({ theme, error }) => (error ? theme.colors.danger600 : 'transparent')}; 34 | `; 35 | 36 | export { EditorWrapper, StyledBox }; 37 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/components/InputUID/regex.js: -------------------------------------------------------------------------------- 1 | const UID_REGEX = new RegExp(/^[A-Za-z0-9-_.~]*$/); 2 | 3 | export default UID_REGEX; 4 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/components/InputUID/useDebounce.js: -------------------------------------------------------------------------------- 1 | import { useState, useEffect } from 'react'; 2 | 3 | const useDebounce = (value, delay) => { 4 | const [debouncedValue, setDebouncedValue] = useState(value); 5 | 6 | useEffect(() => { 7 | const handler = setTimeout(() => { 8 | setDebouncedValue(value); 9 | }, delay); 10 | 11 | return () => { 12 | clearTimeout(handler); 13 | }; 14 | }, [value, delay]); 15 | 16 | return debouncedValue; 17 | }; 18 | 19 | export default useDebounce; 20 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/components/Inputs/utils/VALIDATIONS_TO_OMIT.js: -------------------------------------------------------------------------------- 1 | const validationsToOmit = [ 2 | 'type', 3 | 'model', 4 | 'via', 5 | 'collection', 6 | 'default', 7 | 'plugin', 8 | 'enum', 9 | 'regex', 10 | 'pluginOptions', 11 | ]; 12 | 13 | export default validationsToOmit; 14 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/components/Inputs/utils/connect.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | function connect(WrappedComponent, select) { 4 | return function(props) { 5 | // eslint-disable-next-line react/prop-types 6 | const selectors = select(props.keys); 7 | 8 | return ; 9 | }; 10 | } 11 | 12 | export default connect; 13 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/components/Inputs/utils/generateOptions.js: -------------------------------------------------------------------------------- 1 | const generateOptions = (options, isRequired = false) => { 2 | return [ 3 | { 4 | metadatas: { 5 | intlLabel: { 6 | id: 'components.InputSelect.option.placeholder', 7 | defaultMessage: 'Choose here', 8 | }, 9 | disabled: isRequired, 10 | hidden: isRequired, 11 | }, 12 | key: '__enum_option_null', 13 | value: '', 14 | }, 15 | ...options.map(option => { 16 | return { 17 | metadatas: { 18 | intlLabel: { 19 | id: option, 20 | defaultMessage: option, 21 | }, 22 | hidden: false, 23 | disabled: false, 24 | }, 25 | key: option, 26 | value: option, 27 | }; 28 | }), 29 | ]; 30 | }; 31 | 32 | export default generateOptions; 33 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/components/Inputs/utils/getStep.js: -------------------------------------------------------------------------------- 1 | const getStep = type => { 2 | let step; 3 | 4 | if (type === 'float' || type === 'decimal') { 5 | step = 0.01; 6 | } else if (type === 'time' || type === 'datetime') { 7 | // Since we cannot set a value that is not in the list of the time picker, we need to set the step to 1 8 | // TODO: Fix the timepicker in order to be able to set any value regardless of the list 9 | step = 1; 10 | } else { 11 | step = 1; 12 | } 13 | 14 | return step; 15 | }; 16 | 17 | export default getStep; 18 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/components/Inputs/utils/index.js: -------------------------------------------------------------------------------- 1 | export { default as connect } from './connect'; 2 | export { default as generateOptions } from './generateOptions'; 3 | export { default as getInputType } from './getInputType'; 4 | export { default as getStep } from './getStep'; 5 | export { default as select } from './select'; 6 | export { default as VALIDATIONS_TO_OMIT } from './VALIDATIONS_TO_OMIT'; 7 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/components/LayoutTitle/index.js: -------------------------------------------------------------------------------- 1 | import styled from 'styled-components'; 2 | 3 | const LayoutTitle = styled.div` 4 | color: #333740; 5 | font-size: 13px; 6 | font-weight: 500; 7 | line-height: 18px; 8 | 9 | p { 10 | margin-top: 2px; 11 | margin-bottom: 13px; 12 | color: #9ea7b8; 13 | font-size: 12px; 14 | font-weight: 400; 15 | line-height: normal; 16 | } 17 | `; 18 | 19 | export default LayoutTitle; 20 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/components/PlusButton/index.js: -------------------------------------------------------------------------------- 1 | import styled from 'styled-components'; 2 | 3 | const beforeStyle = ` 4 | content: ' '; 5 | position: absolute; 6 | display: block; 7 | width: 14px; 8 | height: 2px; 9 | left: 11px; 10 | top: 17px; 11 | bottom: 10px; 12 | z-index: 9; 13 | `; 14 | 15 | const afterStyle = ` 16 | content: ' '; 17 | position: absolute; 18 | display: block; 19 | height: 14px; 20 | width: 2px; 21 | left: 17px; 22 | top: 11px; 23 | right: 10px; 24 | z-index: 9; 25 | `; 26 | 27 | const Button = styled.button` 28 | position: relative; 29 | height: 36px; 30 | width: 36px; 31 | background-color: #f3f4f4; 32 | border-radius: 50%; 33 | text-align: center; 34 | 35 | :focus { 36 | outline: 0; 37 | } 38 | 39 | :before { 40 | ${beforeStyle} 41 | } 42 | :after { 43 | ${afterStyle} 44 | } 45 | 46 | :before, 47 | :after { 48 | background-color: #b4b6ba; 49 | } 50 | `; 51 | 52 | export default Button; 53 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/components/PreviewCarret/components.js: -------------------------------------------------------------------------------- 1 | import styled from 'styled-components'; 2 | 3 | /* eslint-disable indent */ 4 | const Wrapper = styled.div` 5 | display: flex; 6 | flex-direction: column; 7 | justify-content: space-around; 8 | height: 30px; 9 | width: 100%; 10 | padding: 0 5px; 11 | 12 | ${({ isComponent }) => 13 | isComponent && 14 | ` 15 | height: 34px; 16 | padding: 0; 17 | `} 18 | 19 | border-radius: 2px; 20 | > div { 21 | width: 100%; 22 | height: 2px; 23 | background: #007eff; 24 | } 25 | `; 26 | 27 | export default Wrapper; 28 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/components/PreviewCarret/index.js: -------------------------------------------------------------------------------- 1 | import React, { memo } from 'react'; 2 | import PropTypes from 'prop-types'; 3 | 4 | import Wrapper from './components'; 5 | 6 | const PreviewCarret = ({ isComponent, style }) => ( 7 | 8 |
9 | 10 | ); 11 | 12 | PreviewCarret.defaultProps = { 13 | isComponent: false, 14 | style: {}, 15 | }; 16 | 17 | PreviewCarret.propTypes = { 18 | isComponent: PropTypes.bool, 19 | style: PropTypes.object, 20 | }; 21 | 22 | export default memo(PreviewCarret); 23 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/components/PreviewWysiwyg/index.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable react/no-danger */ 2 | /** 3 | * 4 | * PreviewWysiwyg 5 | * 6 | */ 7 | 8 | import React, { memo, useMemo } from 'react'; 9 | import PropTypes from 'prop-types'; 10 | 11 | import md from './utils/mdRenderer'; 12 | import sanitizeHtml from './utils/satinizeHtml'; 13 | import Wrapper from './Wrapper'; 14 | 15 | const PreviewWysiwyg = ({ data }) => { 16 | const html = useMemo(() => sanitizeHtml(md.render(data || '')), [data]); 17 | 18 | return ( 19 | 20 |
21 | 22 | ); 23 | }; 24 | 25 | PreviewWysiwyg.defaultProps = { 26 | data: '', 27 | }; 28 | 29 | PreviewWysiwyg.propTypes = { 30 | data: PropTypes.string, 31 | }; 32 | 33 | export default memo(PreviewWysiwyg); 34 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/components/PreviewWysiwyg/utils/satinizeHtml.js: -------------------------------------------------------------------------------- 1 | import sanitizeHtml from 'sanitize-html'; 2 | 3 | // Options for the lib can be found here https://www.npmjs.com/package/sanitize-html 4 | const options = { 5 | ...sanitizeHtml.defaults, 6 | allowedTags: false, 7 | allowedAttributes: { 8 | '*': ['href', 'align', 'alt', 'center', 'width', 'height', 'type', 'controls', 'target'], 9 | img: ['src', 'alt'], 10 | source: ['src', 'type'], 11 | }, 12 | }; 13 | 14 | const clean = dirty => sanitizeHtml(dirty, options); 15 | 16 | export default clean; 17 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/components/RepeatableComponent/DraggedItem/IconButtonCustoms.js: -------------------------------------------------------------------------------- 1 | import styled from 'styled-components'; 2 | import { IconButton } from '@strapi/design-system/IconButton'; 3 | 4 | export const CustomIconButton = styled(IconButton)` 5 | background-color: transparent; 6 | 7 | svg { 8 | path { 9 | fill: ${({ theme, expanded }) => 10 | expanded ? theme.colors.primary600 : theme.colors.neutral600}; 11 | } 12 | } 13 | 14 | &:hover { 15 | svg { 16 | path { 17 | fill: ${({ theme }) => theme.colors.primary600}; 18 | } 19 | } 20 | } 21 | `; 22 | 23 | export const CustomIconButtonSibling = styled(IconButton)` 24 | background-color: transparent; 25 | 26 | svg { 27 | path { 28 | fill: ${({ theme, expanded }) => 29 | expanded ? theme.colors.primary600 : theme.colors.neutral600}; 30 | } 31 | } 32 | `; 33 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/components/RepeatableComponent/DraggedItem/Preview.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import styled from 'styled-components'; 3 | 4 | const StyledSpan = styled.span` 5 | display: block; 6 | background-color: ${({ theme }) => theme.colors.primary100}; 7 | outline: 1px dashed ${({ theme }) => theme.colors.primary500}; 8 | outline-offset: -1px; 9 | padding: ${({ theme }) => theme.spaces[6]}; 10 | `; 11 | 12 | const Preview = () => { 13 | return ; 14 | }; 15 | 16 | export default Preview; 17 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/components/RepeatableComponent/DraggedItem/utils/connect.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | function connect(WrappedComponent, select) { 4 | return function(props) { 5 | const selectors = select(props); 6 | 7 | return ; 8 | }; 9 | } 10 | 11 | export default connect; 12 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/components/RepeatableComponent/DraggedItem/utils/index.js: -------------------------------------------------------------------------------- 1 | export { default as connect } from './connect'; 2 | export { default as select } from './select'; 3 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/components/RepeatableComponent/DraggedItem/utils/select.js: -------------------------------------------------------------------------------- 1 | import { useMemo } from 'react'; 2 | import { get, toString } from 'lodash'; 3 | import { useCMEditViewDataManager } from '@strapi/helper-plugin'; 4 | 5 | function useSelect({ schema, componentFieldName }) { 6 | const { 7 | checkFormErrors, 8 | modifiedData, 9 | moveComponentField, 10 | removeRepeatableField, 11 | triggerFormValidation, 12 | } = useCMEditViewDataManager(); 13 | 14 | const mainField = useMemo(() => get(schema, ['settings', 'mainField'], 'id'), [schema]); 15 | const displayedValue = toString( 16 | get(modifiedData, [...componentFieldName.split('.'), mainField], '') 17 | ); 18 | 19 | return { 20 | displayedValue, 21 | mainField, 22 | checkFormErrors, 23 | moveComponentField, 24 | removeRepeatableField, 25 | schema, 26 | triggerFormValidation, 27 | }; 28 | } 29 | 30 | export default useSelect; 31 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/components/RepeatableComponent/utils/connect.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | function connect(WrappedComponent, select) { 4 | return function(props) { 5 | const selectors = select(props); 6 | 7 | return ; 8 | }; 9 | } 10 | 11 | export default connect; 12 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/components/RepeatableComponent/utils/getComponentErrorKeys.js: -------------------------------------------------------------------------------- 1 | export default function getComponentErrorKeys(name, formErrors) { 2 | return Object.keys(formErrors) 3 | .filter(errorKey => errorKey.startsWith(name)) 4 | .map(errorKey => 5 | errorKey 6 | .split('.') 7 | .slice(0, name.split('.').length + 1) 8 | .join('.') 9 | ); 10 | } 11 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/components/RepeatableComponent/utils/select.js: -------------------------------------------------------------------------------- 1 | import { useCMEditViewDataManager } from '@strapi/helper-plugin'; 2 | 3 | function useSelect() { 4 | const { addRepeatableComponentToField, formErrors } = useCMEditViewDataManager(); 5 | 6 | return { 7 | addRepeatableComponentToField, 8 | formErrors, 9 | }; 10 | } 11 | 12 | export default useSelect; 13 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/components/SectionTitle/Title.js: -------------------------------------------------------------------------------- 1 | import styled from 'styled-components'; 2 | 3 | const Title = styled.div` 4 | color: #787e8f; 5 | font-size: 11px; 6 | font-weight: 700; 7 | letter-spacing: 0.77px; 8 | text-transform: uppercase; 9 | `; 10 | 11 | export default Title; 12 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/components/SectionTitle/index.js: -------------------------------------------------------------------------------- 1 | import React, { memo } from 'react'; 2 | import PropTypes from 'prop-types'; 3 | import { FormattedMessage } from 'react-intl'; 4 | import { getTrad } from '../../utils'; 5 | import Title from './Title'; 6 | 7 | const SectionTitle = ({ isSettings }) => { 8 | const suffix = isSettings ? 'settings' : 'view'; 9 | const msgId = getTrad(`containers.SettingPage.${suffix}`); 10 | 11 | return ( 12 |
13 | {msg => {msg}} 14 |
15 | ); 16 | }; 17 | 18 | SectionTitle.propTypes = { 19 | isSettings: PropTypes.bool, 20 | }; 21 | 22 | SectionTitle.defaultProps = { 23 | isSettings: false, 24 | }; 25 | 26 | export default memo(SectionTitle); 27 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/components/SelectWrapper/utils/connect.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | function connect(WrappedComponent, select) { 4 | return function(props) { 5 | // eslint-disable-next-line react/prop-types 6 | const selectors = select(props); 7 | 8 | return ; 9 | }; 10 | } 11 | 12 | export default connect; 13 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/components/SelectWrapper/utils/index.js: -------------------------------------------------------------------------------- 1 | export { default as connect } from './connect'; 2 | export { default as select } from './select'; 3 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/components/SingleTypeFormWrapper/utils/getRequestUrl.js: -------------------------------------------------------------------------------- 1 | import { getRequestUrl } from '../../../utils'; 2 | 3 | const requestURL = path => getRequestUrl(`single-types/${path}`); 4 | 5 | export default requestURL; 6 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/components/SingleTypeFormWrapper/utils/index.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line import/prefer-default-export 2 | export { default as getRequestUrl } from './getRequestUrl'; 3 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/contexts/ContentTypeLayout.js: -------------------------------------------------------------------------------- 1 | import { createContext } from 'react'; 2 | 3 | const ContentTypeLayout = createContext(); 4 | 5 | export default ContentTypeLayout; 6 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/contexts/LayoutDnd.js: -------------------------------------------------------------------------------- 1 | import { createContext } from 'react'; 2 | 3 | const LayoutDndContext = createContext(); 4 | 5 | export default LayoutDndContext; 6 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/contexts/ModelsContext.js: -------------------------------------------------------------------------------- 1 | import { createContext } from 'react'; 2 | 3 | const ModelsContext = createContext(); 4 | 5 | export default ModelsContext; 6 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/contexts/Wysiwyg.js: -------------------------------------------------------------------------------- 1 | import { createContext } from 'react'; 2 | 3 | const WysiwygContext = createContext(); 4 | 5 | export default WysiwygContext; 6 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/contexts/index.js: -------------------------------------------------------------------------------- 1 | export { default as ContentTypeLayoutContext } from './ContentTypeLayout'; 2 | export { default as LayoutDndContext } from './LayoutDnd'; 3 | export { default as WysiwygContext } from './Wysiwyg'; 4 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/hooks/index.js: -------------------------------------------------------------------------------- 1 | export { default as useContentTypeLayout } from './useContentTypeLayout'; 2 | export { default as useFetchContentTypeLayout } from './useFetchContentTypeLayout'; 3 | export { default as useFindRedirectionLink } from './useFindRedirectionLink'; 4 | export { default as useLayoutDnd } from './useLayoutDnd'; 5 | export { default as usePluginsQueryParams } from './usePluginsQueryParams'; 6 | export { default as useSyncRbac } from './useSyncRbac'; 7 | export { default as useWysiwyg } from './useWysiwyg'; 8 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/hooks/useContentTypeLayout/index.js: -------------------------------------------------------------------------------- 1 | import { useCallback } from 'react'; 2 | import { get } from 'lodash'; 3 | import { useSelector } from 'react-redux'; 4 | import selectLayout from '../../pages/EditViewLayoutManager/selectors'; 5 | 6 | const useContentTypeLayout = () => { 7 | const currentLayout = useSelector(selectLayout); 8 | 9 | const getComponentLayout = useCallback( 10 | componentUid => { 11 | return get(currentLayout, ['components', componentUid], {}); 12 | }, 13 | [currentLayout] 14 | ); 15 | 16 | return { ...currentLayout, getComponentLayout }; 17 | }; 18 | 19 | export default useContentTypeLayout; 20 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/hooks/useFindRedirectionLink/index.js: -------------------------------------------------------------------------------- 1 | import { useSelector } from 'react-redux'; 2 | import { useQueryParams } from '@strapi/helper-plugin'; 3 | import selectMenuLinks from './selectors'; 4 | import getRedirectionLink from './utils/getRedirectionLink'; 5 | 6 | const useFindRedirectionLink = slug => { 7 | const [{ rawQuery }] = useQueryParams(); 8 | const collectionTypesMenuLinks = useSelector(selectMenuLinks); 9 | const redirectionLink = getRedirectionLink(collectionTypesMenuLinks, slug, rawQuery); 10 | 11 | return redirectionLink; 12 | }; 13 | 14 | export default useFindRedirectionLink; 15 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/hooks/useFindRedirectionLink/selectors.js: -------------------------------------------------------------------------------- 1 | const selectMenuLinks = state => { 2 | const cmState = state['content-manager_app']; 3 | 4 | return cmState.collectionTypeLinks; 5 | }; 6 | 7 | export default selectMenuLinks; 8 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/hooks/useLayoutDnd.js: -------------------------------------------------------------------------------- 1 | import { useContext } from 'react'; 2 | import LayoutDndContext from '../contexts/LayoutDnd'; 3 | 4 | const useLayoutDnd = () => useContext(LayoutDndContext); 5 | 6 | export default useLayoutDnd; 7 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/hooks/usePluginsQueryParams/index.js: -------------------------------------------------------------------------------- 1 | import { useLocation } from 'react-router-dom'; 2 | import { parse, stringify } from 'qs'; 3 | 4 | const usePluginsQueryParams = () => { 5 | const { search } = useLocation(); 6 | const query = search ? parse(search.substring(1)) : {}; 7 | 8 | return query.plugins ? stringify({ plugins: query.plugins }, { encode: false }) : ''; 9 | }; 10 | 11 | export default usePluginsQueryParams; 12 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/hooks/useSyncRbac/actions.js: -------------------------------------------------------------------------------- 1 | import { RESET_PERMISSIONS, SET_PERMISSIONS } from './constants'; 2 | 3 | export const setPermissions = (permissions, plugins, containerName) => { 4 | return { 5 | type: SET_PERMISSIONS, 6 | permissions, 7 | __meta__: { 8 | plugins, 9 | containerName, 10 | }, 11 | }; 12 | }; 13 | 14 | export const resetPermissions = () => ({ type: RESET_PERMISSIONS }); 15 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/hooks/useSyncRbac/constants.js: -------------------------------------------------------------------------------- 1 | export const SET_PERMISSIONS = 'ContentManager/RBACManager/SET_PERMISSIONS'; 2 | export const RESET_PERMISSIONS = 'ContentManager/RBACManager/RESET_PERMISSIONS'; 3 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/hooks/useSyncRbac/reducer.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * RBACManager reducer 4 | */ 5 | 6 | import produce from 'immer'; 7 | import { SET_PERMISSIONS, RESET_PERMISSIONS } from './constants'; 8 | 9 | export const initialState = { 10 | permissions: null, 11 | }; 12 | 13 | const rbacManagerReducer = (state = initialState, action) => 14 | // eslint-disable-next-line consistent-return 15 | produce(state, draftState => { 16 | switch (action.type) { 17 | case SET_PERMISSIONS: { 18 | draftState.permissions = Object.entries(action.permissions).reduce((acc, current) => { 19 | return [...acc, ...current[1]]; 20 | }, []); 21 | break; 22 | } 23 | case RESET_PERMISSIONS: { 24 | draftState.permissions = null; 25 | break; 26 | } 27 | default: 28 | return draftState; 29 | } 30 | }); 31 | 32 | export default rbacManagerReducer; 33 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/hooks/useSyncRbac/selectors.js: -------------------------------------------------------------------------------- 1 | export const selectPermissions = state => state['content-manager_rbacManager'].permissions; 2 | 3 | export const selectCollectionTypePermissions = state => 4 | state.rbacProvider.collectionTypesRelatedPermissions; 5 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/hooks/useWysiwyg.js: -------------------------------------------------------------------------------- 1 | import { useContext } from 'react'; 2 | import WysiwygContext from '../contexts/Wysiwyg'; 3 | 4 | const useWysiwyg = () => useContext(WysiwygContext); 5 | 6 | export default useWysiwyg; 7 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/icons/Bold/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | const Bold = () => { 4 | return ( 5 | 6 | 14 | 15 | B 16 | 17 | 18 | 19 | ); 20 | }; 21 | 22 | export default Bold; 23 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/icons/Code/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | const Code = () => { 4 | return ( 5 | 6 | 7 | 8 | 9 | 10 | ); 11 | }; 12 | 13 | export default Code; 14 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/icons/Cross/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import PropTypes from 'prop-types'; 3 | 4 | const Cross = ({ fill, height, width, ...rest }) => { 5 | return ( 6 | 7 | 12 | 13 | ); 14 | }; 15 | 16 | Cross.defaultProps = { 17 | fill: '#b3b5b9', 18 | height: '8', 19 | width: '8', 20 | }; 21 | 22 | Cross.propTypes = { 23 | fill: PropTypes.string, 24 | height: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), 25 | width: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), 26 | }; 27 | 28 | export default Cross; 29 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/icons/Italic/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | const Italic = () => { 4 | return ( 5 | 6 | 15 | 16 | I 17 | 18 | 19 | 20 | ); 21 | }; 22 | 23 | export default Italic; 24 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/icons/Link/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | const Link = () => { 4 | return ( 5 | 6 | 7 | 8 | 12 | 16 | 17 | 18 | ); 19 | }; 20 | 21 | export default Link; 22 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/icons/Media/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | const Media = () => { 4 | return ( 5 | 6 | 7 | 8 | 9 | 10 | 11 | ); 12 | }; 13 | 14 | export default Media; 15 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/icons/Quote/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | const Quote = () => { 4 | return ( 5 | 6 | 7 | 8 | 9 | 10 | ); 11 | }; 12 | 13 | export default Quote; 14 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/icons/Striked/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | const Striked = () => { 4 | return ( 5 | 6 | 7 | 14 | 15 | abc 16 | 17 | 18 | 19 | 20 | 21 | ); 22 | }; 23 | 24 | export default Striked; 25 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/icons/Ul/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | const Ul = () => { 4 | return ( 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | ); 13 | }; 14 | 15 | export default Ul; 16 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/icons/Underline/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | const Underline = () => { 4 | return ( 5 | 6 | 14 | 15 | U 16 | 17 | 18 | 19 | ); 20 | }; 21 | 22 | export default Underline; 23 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/pages/App/actions.js: -------------------------------------------------------------------------------- 1 | import { GET_DATA, RESET_PROPS, SET_CONTENT_TYPE_LINKS } from './constants'; 2 | 3 | export const getData = () => ({ 4 | type: GET_DATA, 5 | }); 6 | 7 | export const resetProps = () => ({ type: RESET_PROPS }); 8 | 9 | export const setContentTypeLinks = (authorizedCtLinks, authorizedStLinks, models, components) => ({ 10 | type: SET_CONTENT_TYPE_LINKS, 11 | data: { authorizedCtLinks, authorizedStLinks, components, contentTypeSchemas: models }, 12 | }); 13 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/pages/App/constants.js: -------------------------------------------------------------------------------- 1 | export const GET_DATA = 'ContentManager/App/GET_DATA'; 2 | export const RESET_PROPS = 'ContentManager/App/RESET_PROPS'; 3 | export const SET_CONTENT_TYPE_LINKS = 'ContentManager/App/SET_CONTENT_TYPE_LINKS'; 4 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/pages/App/selectors.js: -------------------------------------------------------------------------------- 1 | import { createSelector } from 'reselect'; 2 | import { initialState } from './reducer'; 3 | 4 | const selectAppDomain = () => state => { 5 | return state['content-manager_app'] || initialState; 6 | }; 7 | 8 | const makeSelectApp = () => 9 | createSelector(selectAppDomain(), substate => { 10 | return substate; 11 | }); 12 | 13 | const makeSelectModels = () => createSelector(selectAppDomain(), state => state.models); 14 | 15 | const makeSelectModelLinks = () => 16 | createSelector(selectAppDomain(), state => ({ 17 | collectionTypeLinks: state.collectionTypeLinks, 18 | singleTypeLinks: state.singleTypeLinks, 19 | })); 20 | 21 | const makeSelectModelAndComponentSchemas = () => 22 | createSelector(selectAppDomain(), ({ components, models }) => ({ 23 | schemas: [...components, ...models], 24 | })); 25 | 26 | export default makeSelectApp; 27 | export { 28 | makeSelectModelAndComponentSchemas, 29 | makeSelectModelLinks, 30 | makeSelectModels, 31 | selectAppDomain, 32 | }; 33 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/pages/App/utils/checkPermissions.js: -------------------------------------------------------------------------------- 1 | import { hasPermissions } from '@strapi/helper-plugin'; 2 | 3 | /** 4 | * This function resolves an array of Promises 5 | * It puts at a specific index the status of a specific permission. 6 | * While this might look weird, we then iterate on this array 7 | * and check the different CT/ST/general/plugin sections 8 | * and make an index based comparisons 9 | */ 10 | const checkPermissions = (userPermissions, permissionsToCheck) => 11 | permissionsToCheck.map(({ permissions }) => hasPermissions(userPermissions, permissions)); 12 | 13 | export default checkPermissions; 14 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/pages/EditSettingsView/components/RowsLayout.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import PropTypes from 'prop-types'; 3 | import { Grid } from '@strapi/design-system/Grid'; 4 | import RowItemsLayout from './RowItemsLayout'; 5 | 6 | const RowsLayout = ({ row, onRemoveField, rowIndex }) => { 7 | return ( 8 | 9 | {row.rowContent.map((rowItem, index) => { 10 | return ( 11 | 20 | ); 21 | })} 22 | 23 | ); 24 | }; 25 | 26 | RowsLayout.propTypes = { 27 | onRemoveField: PropTypes.func.isRequired, 28 | row: PropTypes.object.isRequired, 29 | rowIndex: PropTypes.number.isRequired, 30 | }; 31 | 32 | export default RowsLayout; 33 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/pages/EditSettingsView/init.js: -------------------------------------------------------------------------------- 1 | import { cloneDeep, set } from 'lodash'; 2 | import { createLayout, formatLayout } from './utils/layout'; 3 | 4 | const init = (initialState, mainLayout, components) => { 5 | let initialData = cloneDeep(mainLayout); 6 | 7 | set(initialData, ['layouts', 'edit'], formatLayout(createLayout(mainLayout.layouts.edit))); 8 | 9 | return { 10 | ...initialState, 11 | initialData, 12 | modifiedData: initialData, 13 | componentLayouts: components, 14 | }; 15 | }; 16 | 17 | export default init; 18 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/pages/EditSettingsView/utils/api.js: -------------------------------------------------------------------------------- 1 | import { axiosInstance } from '../../../../core/utils'; 2 | import { getRequestUrl } from '../../../utils'; 3 | 4 | const putCMSettingsEV = (body, slug, isContentTypeView) => { 5 | return axiosInstance.put( 6 | getRequestUrl( 7 | isContentTypeView ? `content-types/${slug}/configuration` : `components/${slug}/configuration` 8 | ), 9 | body 10 | ); 11 | }; 12 | 13 | export default putCMSettingsEV; 14 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/pages/EditSettingsView/utils/createPossibleMainFieldsForModelsAndComponents.js: -------------------------------------------------------------------------------- 1 | import { get } from 'lodash'; 2 | 3 | const createPossibleMainFieldsForModelsAndComponents = array => { 4 | return array.reduce((acc, current) => { 5 | const attributes = get(current, ['attributes'], {}); 6 | const possibleMainFields = Object.keys(attributes).filter(attr => { 7 | return ![ 8 | 'boolean', 9 | 'component', 10 | 'dynamiczone', 11 | 'json', 12 | 'media', 13 | 'password', 14 | 'relation', 15 | 'text', 16 | 'richtext', 17 | ].includes(get(attributes, [attr, 'type'], '')); 18 | }); 19 | 20 | acc[current.uid] = possibleMainFields; 21 | 22 | return acc; 23 | }, {}); 24 | }; 25 | 26 | export default createPossibleMainFieldsForModelsAndComponents; 27 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/pages/EditSettingsView/utils/getInputProps.js: -------------------------------------------------------------------------------- 1 | import { getTrad } from '../../../utils'; 2 | 3 | const getInputProps = fieldName => { 4 | let type; 5 | 6 | switch (fieldName) { 7 | case 'description': 8 | case 'label': 9 | case 'placeholder': 10 | type = 'text'; 11 | break; 12 | case 'mainField': 13 | type = 'select'; 14 | break; 15 | case 'editable': 16 | type = 'bool'; 17 | break; 18 | default: 19 | type = ''; 20 | } 21 | 22 | const labelId = 23 | fieldName === 'mainField' 24 | ? getTrad('containers.SettingPage.editSettings.entry.title') 25 | : getTrad(`form.Input.${fieldName}`); 26 | 27 | return { type, label: { id: labelId } }; 28 | }; 29 | 30 | export default getInputProps; 31 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/pages/EditSettingsView/utils/index.js: -------------------------------------------------------------------------------- 1 | export { default as createPossibleMainFieldsForModelsAndComponents } from './createPossibleMainFieldsForModelsAndComponents'; 2 | export { default as getInputProps } from './getInputProps'; 3 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/pages/EditView/DeleteLink/utils/connect.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | function connect(WrappedComponent, select) { 4 | return function(props) { 5 | // eslint-disable-next-line react/prop-types 6 | const selectors = select(); 7 | 8 | return ; 9 | }; 10 | } 11 | 12 | export default connect; 13 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/pages/EditView/DeleteLink/utils/index.js: -------------------------------------------------------------------------------- 1 | export { default as connect } from './connect'; 2 | export { default as select } from './select'; 3 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/pages/EditView/DeleteLink/utils/select.js: -------------------------------------------------------------------------------- 1 | import { isEmpty } from 'lodash'; 2 | import { useCMEditViewDataManager } from '@strapi/helper-plugin'; 3 | 4 | function useSelect() { 5 | const { hasDraftAndPublish, modifiedData } = useCMEditViewDataManager(); 6 | 7 | let trackerProperty = {}; 8 | 9 | if (hasDraftAndPublish) { 10 | const isDraft = isEmpty(modifiedData.publishedAt); 11 | 12 | trackerProperty = isDraft ? { status: 'draft' } : { status: 'published' }; 13 | } 14 | 15 | return { 16 | hasDraftAndPublish, 17 | trackerProperty, 18 | }; 19 | } 20 | 21 | export default useSelect; 22 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/pages/EditView/DraftAndPublishBadge/utils/connect.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | function connect(WrappedComponent, select) { 4 | return function(props) { 5 | // eslint-disable-next-line react/prop-types 6 | const selectors = select(); 7 | 8 | return ; 9 | }; 10 | } 11 | 12 | export default connect; 13 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/pages/EditView/DraftAndPublishBadge/utils/index.js: -------------------------------------------------------------------------------- 1 | export { default as connect } from './connect'; 2 | export { default as select } from './select'; 3 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/pages/EditView/DraftAndPublishBadge/utils/select.js: -------------------------------------------------------------------------------- 1 | import { useCMEditViewDataManager } from '@strapi/helper-plugin'; 2 | 3 | function useSelect() { 4 | const { initialData, hasDraftAndPublish } = useCMEditViewDataManager(); 5 | 6 | const isPublished = initialData.publishedAt !== undefined && initialData.publishedAt !== null; 7 | 8 | return { 9 | hasDraftAndPublish, 10 | isPublished, 11 | }; 12 | } 13 | 14 | export default useSelect; 15 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/pages/EditView/Header/utils/connect.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | function connect(WrappedComponent, select) { 4 | return function(props) { 5 | // eslint-disable-next-line react/prop-types 6 | const selectors = select(); 7 | 8 | return ; 9 | }; 10 | } 11 | 12 | export default connect; 13 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/pages/EditView/Header/utils/index.js: -------------------------------------------------------------------------------- 1 | export { default as connect } from './connect'; 2 | export { default as getDraftRelations } from './getDraftRelations'; 3 | export { default as select } from './select'; 4 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/pages/EditView/Header/utils/select.js: -------------------------------------------------------------------------------- 1 | import { useCMEditViewDataManager } from '@strapi/helper-plugin'; 2 | 3 | function useSelect() { 4 | const { 5 | allLayoutData, 6 | initialData, 7 | isCreatingEntry, 8 | isSingleType, 9 | status, 10 | layout, 11 | hasDraftAndPublish, 12 | modifiedData, 13 | onPublish, 14 | onUnpublish, 15 | } = useCMEditViewDataManager(); 16 | 17 | return { 18 | componentLayouts: allLayoutData.components, 19 | initialData, 20 | isCreatingEntry, 21 | isSingleType, 22 | status, 23 | layout, 24 | hasDraftAndPublish, 25 | modifiedData, 26 | onPublish, 27 | onUnpublish, 28 | }; 29 | } 30 | 31 | export default useSelect; 32 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/pages/EditView/Informations/utils/getUnits.js: -------------------------------------------------------------------------------- 1 | const msPerMinute = 60 * 1000; 2 | const msPerHour = msPerMinute * 60; 3 | const msPerDay = msPerHour * 24; 4 | const msPerMonth = msPerDay * 30; 5 | const msPerYear = msPerDay * 365; 6 | 7 | const getUnits = value => { 8 | if (value < msPerMinute) { 9 | return { unit: 'second', value: -Math.round(value / 1000) }; 10 | } 11 | if (value < msPerHour) { 12 | return { unit: 'minute', value: -Math.round(value / msPerMinute) }; 13 | } 14 | if (value < msPerDay) { 15 | return { unit: 'hour', value: -Math.round(value / msPerHour) }; 16 | } 17 | if (value < msPerMonth) { 18 | return { unit: 'day', value: -Math.round(value / msPerDay) }; 19 | } 20 | if (value < msPerYear) { 21 | return { unit: 'month', value: -Math.round(value / msPerMonth) }; 22 | } 23 | 24 | return { unit: 'year', value: -Math.round(value / msPerYear) }; 25 | }; 26 | 27 | export default getUnits; 28 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/pages/EditView/utils/getFieldsActionMatchingPermissions.js: -------------------------------------------------------------------------------- 1 | import { uniq, flatMap } from 'lodash'; 2 | import { findMatchingPermissions } from '@strapi/helper-plugin'; 3 | 4 | const getFieldsActionMatchingPermissions = (userPermissions, slug) => { 5 | const getMatchingPermissions = action => { 6 | const matched = findMatchingPermissions(userPermissions, [ 7 | { 8 | action: `plugin::content-manager.explorer.${action}`, 9 | subject: slug, 10 | }, 11 | ]); 12 | 13 | return uniq(flatMap(matched, 'properties.fields')); 14 | }; 15 | 16 | return { 17 | createActionAllowedFields: getMatchingPermissions('create'), 18 | readActionAllowedFields: getMatchingPermissions('read'), 19 | updateActionAllowedFields: getMatchingPermissions('update'), 20 | }; 21 | }; 22 | 23 | export default getFieldsActionMatchingPermissions; 24 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/pages/EditView/utils/index.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line import/prefer-default-export 2 | export { default as createAttributesLayout } from './createAttributesLayout'; 3 | export { default as getFieldsActionMatchingPermissions } from './getFieldsActionMatchingPermissions'; 4 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/pages/EditViewLayoutManager/actions.js: -------------------------------------------------------------------------------- 1 | import { RESET_PROPS, SET_LAYOUT } from './constants'; 2 | 3 | export const resetProps = () => ({ type: RESET_PROPS }); 4 | 5 | export const setLayout = (layout, query) => ({ 6 | type: SET_LAYOUT, 7 | layout, 8 | query, 9 | }); 10 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/pages/EditViewLayoutManager/constants.js: -------------------------------------------------------------------------------- 1 | export const SET_LAYOUT = 'ContentManager/EditViewLayoutManager/SET_LAYOUT'; 2 | export const RESET_PROPS = 'ContentManager/EditViewLayoutManager/RESET_PROPS'; 3 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/pages/EditViewLayoutManager/reducer.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * EditViewLayoutManager reducer 4 | */ 5 | 6 | import produce from 'immer'; 7 | import { RESET_PROPS, SET_LAYOUT } from './constants'; 8 | 9 | export const initialState = { 10 | currentLayout: null, 11 | }; 12 | 13 | const editViewManagerReducer = (state = initialState, action) => 14 | // eslint-disable-next-line consistent-return 15 | produce(state, drafState => { 16 | switch (action.type) { 17 | case RESET_PROPS: { 18 | drafState.currentLayout = null; 19 | break; 20 | } 21 | case SET_LAYOUT: { 22 | drafState.currentLayout = action.layout; 23 | break; 24 | } 25 | default: 26 | return drafState; 27 | } 28 | }); 29 | 30 | export default editViewManagerReducer; 31 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/pages/EditViewLayoutManager/selectors.js: -------------------------------------------------------------------------------- 1 | const selectLayout = state => state['content-manager_editViewLayoutManager'].currentLayout; 2 | 3 | export default selectLayout; 4 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/pages/ListSettingsView/init.js: -------------------------------------------------------------------------------- 1 | const init = (initialState, layout) => { 2 | return { 3 | ...initialState, 4 | initialData: layout, 5 | modifiedData: layout, 6 | }; 7 | }; 8 | 9 | export default init; 10 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/pages/ListSettingsView/utils/api.js: -------------------------------------------------------------------------------- 1 | import { axiosInstance } from '../../../../core/utils'; 2 | import { getRequestUrl } from '../../../utils'; 3 | 4 | const putCMSettingsLV = (body, slug) => { 5 | return axiosInstance.put(getRequestUrl(`content-types/${slug}/configuration`), body); 6 | }; 7 | 8 | export default putCMSettingsLV; 9 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/pages/ListSettingsView/utils/ellipsisCardTitle.js: -------------------------------------------------------------------------------- 1 | const ellipsisCardTitle = title => { 2 | const formatedTitle = title.length > 20 ? `${title.substring(0, 20)}...` : title; 3 | 4 | return formatedTitle; 5 | }; 6 | 7 | export default ellipsisCardTitle; 8 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/pages/ListSettingsView/utils/excludedSortOptions.js: -------------------------------------------------------------------------------- 1 | export const EXCLUDED_SORT_OPTIONS = [ 2 | 'media', 3 | 'richtext', 4 | 'dynamiczone', 5 | 'relation', 6 | 'component', 7 | 'json', 8 | ]; 9 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/pages/ListView/FieldPicker/utils/getAllAllowedHeader.js: -------------------------------------------------------------------------------- 1 | import { checkIfAttributeIsDisplayable } from '../../../../utils'; 2 | 3 | const getAllAllowedHeaders = attributes => { 4 | const allowedAttributes = Object.keys(attributes).reduce((acc, current) => { 5 | const attribute = attributes[current]; 6 | 7 | if (checkIfAttributeIsDisplayable(attribute)) { 8 | acc.push(current); 9 | } 10 | 11 | return acc; 12 | }, []); 13 | 14 | return allowedAttributes.sort(); 15 | }; 16 | 17 | export default getAllAllowedHeaders; 18 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/pages/ListView/actions.js: -------------------------------------------------------------------------------- 1 | import { 2 | GET_DATA, 3 | GET_DATA_SUCCEEDED, 4 | ON_CHANGE_LIST_HEADERS, 5 | ON_RESET_LIST_HEADERS, 6 | RESET_PROPS, 7 | SET_LIST_LAYOUT, 8 | } from './constants'; 9 | 10 | export const getData = () => ({ type: GET_DATA }); 11 | 12 | export const getDataSucceeded = (pagination, data) => ({ 13 | type: GET_DATA_SUCCEEDED, 14 | pagination, 15 | data, 16 | }); 17 | 18 | export const onResetListHeaders = () => ({ type: ON_RESET_LIST_HEADERS }); 19 | 20 | export function resetProps() { 21 | return { type: RESET_PROPS }; 22 | } 23 | 24 | export const setLayout = ({ components, contentType }) => { 25 | const { layouts } = contentType; 26 | 27 | return { 28 | contentType, 29 | components, 30 | displayedHeaders: layouts.list, 31 | type: SET_LIST_LAYOUT, 32 | }; 33 | }; 34 | 35 | export const onChangeListHeaders = target => ({ type: ON_CHANGE_LIST_HEADERS, target }); 36 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/pages/ListView/constants.js: -------------------------------------------------------------------------------- 1 | export const GET_DATA = 'ContentManager/ListView/GET_DATA'; 2 | export const GET_DATA_SUCCEEDED = 'ContentManager/ListView/GET_DATA_SUCCEEDED'; 3 | export const RESET_PROPS = 'ContentManager/ListView/RESET_PROPS'; 4 | export const ON_CHANGE_LIST_HEADERS = 'ContentManager/ListView/ON_CHANGE_LIST_HEADERS '; 5 | export const ON_RESET_LIST_HEADERS = 'ContentManager/ListView/ON_RESET_LIST_HEADERS '; 6 | export const SET_LIST_LAYOUT = 'ContentManager/ListView/SET_LIST_LAYOUT '; 7 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/pages/ListView/selectors.js: -------------------------------------------------------------------------------- 1 | import { createSelector } from 'reselect'; 2 | import { initialState } from './reducer'; 3 | 4 | /** 5 | * Direct selector to the listView state domain 6 | */ 7 | const listViewDomain = () => state => state['content-manager_listView'] || initialState; 8 | 9 | /** 10 | * Other specific selectors 11 | */ 12 | 13 | /** 14 | * Default selector used by listView 15 | */ 16 | 17 | const makeSelectListView = () => 18 | createSelector(listViewDomain(), substate => { 19 | return substate; 20 | }); 21 | 22 | const selectDisplayedHeaders = state => { 23 | const { displayedHeaders } = state['content-manager_listView']; 24 | 25 | return displayedHeaders; 26 | }; 27 | 28 | export default makeSelectListView; 29 | export { listViewDomain, selectDisplayedHeaders }; 30 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/pages/ListView/utils/buildQueryString.js: -------------------------------------------------------------------------------- 1 | import { stringify } from 'qs'; 2 | import createPluginsFilter from './createPluginsFilter'; 3 | 4 | /** 5 | * Creates a valid query string from an object of queryParams 6 | * This includes: 7 | * - a filters clause 8 | * - plugin options 9 | */ 10 | const buildQueryString = (queryParams = {}) => { 11 | /** 12 | * Extracting pluginOptions from the query since we don't want them to be part 13 | * of the url 14 | */ 15 | const { plugins: _, ...otherQueryParams } = { 16 | ...queryParams, 17 | ...createPluginsFilter(queryParams.plugins), 18 | }; 19 | 20 | return `?${stringify(otherQueryParams, { encode: false })}`; 21 | }; 22 | 23 | export default buildQueryString; 24 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/pages/ListView/utils/createPluginsFilter.js: -------------------------------------------------------------------------------- 1 | const createPluginsFilter = obj => 2 | Object.values(obj || {}).reduce((acc, current) => Object.assign(acc, current), {}); 3 | 4 | export default createPluginsFilter; 5 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/pages/ListView/utils/index.js: -------------------------------------------------------------------------------- 1 | // export { default as getAllAllowedHeaders } from './getAllAllowedHeaders'; 2 | // export { default as getFirstSortableHeader } from './getFirstSortableHeader'; 3 | export { default as buildQueryString } from './buildQueryString'; 4 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/pages/NoPermissions/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { useFocusWhenNavigate, NoPermissions as NoPermissionsCompo } from '@strapi/helper-plugin'; 3 | import { Main } from '@strapi/design-system/Main'; 4 | import { ContentLayout, HeaderLayout } from '@strapi/design-system/Layout'; 5 | import { useIntl } from 'react-intl'; 6 | import { getTrad } from '../../utils'; 7 | 8 | const NoPermissions = () => { 9 | const { formatMessage } = useIntl(); 10 | useFocusWhenNavigate(); 11 | 12 | return ( 13 |
14 | 20 | 21 | 22 | 23 |
24 | ); 25 | }; 26 | 27 | export default NoPermissions; 28 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/sharedReducers/crudReducer/actions.js: -------------------------------------------------------------------------------- 1 | import { 2 | GET_DATA, 3 | GET_DATA_SUCCEEDED, 4 | INIT_FORM, 5 | RESET_PROPS, 6 | SET_DATA_STRUCTURES, 7 | SET_STATUS, 8 | SUBMIT_SUCCEEDED, 9 | } from './constants'; 10 | 11 | export const getData = () => { 12 | return { 13 | type: GET_DATA, 14 | }; 15 | }; 16 | 17 | export const getDataSucceeded = data => ({ 18 | type: GET_DATA_SUCCEEDED, 19 | data, 20 | }); 21 | 22 | export const initForm = (rawQuery, isSingleType = false) => ({ 23 | type: INIT_FORM, 24 | rawQuery, 25 | isSingleType, 26 | }); 27 | 28 | export const resetProps = () => ({ type: RESET_PROPS }); 29 | 30 | export const setDataStructures = (componentsDataStructure, contentTypeDataStructure) => ({ 31 | type: SET_DATA_STRUCTURES, 32 | componentsDataStructure, 33 | contentTypeDataStructure, 34 | }); 35 | 36 | export const setStatus = status => ({ 37 | type: SET_STATUS, 38 | status, 39 | }); 40 | 41 | export const submitSucceeded = data => ({ 42 | type: SUBMIT_SUCCEEDED, 43 | data, 44 | }); 45 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/sharedReducers/crudReducer/constants.js: -------------------------------------------------------------------------------- 1 | export const GET_DATA = 'ContentManager/CrudReducer/GET_DATA'; 2 | export const GET_DATA_SUCCEEDED = 'ContentManager/CrudReducer/GET_DATA_SUCCEEDED'; 3 | export const INIT_FORM = 'ContentManager/CrudReducer/INIT_FORM'; 4 | export const RESET_PROPS = 'ContentManager/CrudReducer/RESET_PROPS'; 5 | export const SET_DATA_STRUCTURES = 'ContentManager/CrudReducer/SET_DATA_STRUCTURES'; 6 | export const SET_STATUS = 'ContentManager/CrudReducer/SET_STATUS'; 7 | export const SUBMIT_SUCCEEDED = 'ContentManager/CrudReducer/SUBMIT_SUCCEEDED'; 8 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/sharedReducers/crudReducer/selectors.js: -------------------------------------------------------------------------------- 1 | const selectCrudReducer = state => state['content-manager_editViewCrudReducer']; 2 | 3 | export default selectCrudReducer; 4 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/testUtils/index.js: -------------------------------------------------------------------------------- 1 | import testData, { permissions } from './data'; 2 | 3 | export { testData, permissions }; 4 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/utils/ItemTypes.js: -------------------------------------------------------------------------------- 1 | export default { 2 | COMPONENT: 'component', 3 | EDIT_FIELD: 'editField', 4 | EDIT_RELATION: 'editRelation', 5 | FIELD: 'field', 6 | RELATION: 'relation', 7 | }; 8 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/utils/arrayMoveItem.js: -------------------------------------------------------------------------------- 1 | import cloneDeep from 'lodash/cloneDeep'; 2 | 3 | const arrayMoveItem = (arr, from, to) => { 4 | if ( 5 | Array.isArray(arr) && 6 | from >= 0 && 7 | to >= 0 && 8 | from <= arr.length - 1 && 9 | to <= arr.length - 1 10 | ) { 11 | const newArray = cloneDeep(arr); 12 | 13 | const item = newArray.splice(from, 1); 14 | newArray.splice(to, 0, item[0]); 15 | 16 | return newArray; 17 | } 18 | 19 | return arr; 20 | }; 21 | 22 | export default arrayMoveItem; 23 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/utils/checkIfAttributeIsDisplayable.js: -------------------------------------------------------------------------------- 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', 'dynamiczone', 'richtext', 'password'].includes(type) && !!type; 11 | }; 12 | 13 | export default checkIfAttributeIsDisplayable; 14 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/utils/generatePermissionsObject.js: -------------------------------------------------------------------------------- 1 | const addSubjectToPermissionsArray = (array, uid) => array.map(data => ({ ...data, subject: uid })); 2 | 3 | const generatePermissionsObject = uid => { 4 | const permissions = { 5 | create: [{ action: 'plugin::content-manager.explorer.create', subject: null }], 6 | delete: [{ action: 'plugin::content-manager.explorer.delete', subject: null }], 7 | publish: [{ action: 'plugin::content-manager.explorer.publish', subject: null }], 8 | read: [{ action: 'plugin::content-manager.explorer.read', subject: null }], 9 | update: [{ action: 'plugin::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 }; 21 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/utils/getFieldName.js: -------------------------------------------------------------------------------- 1 | import { isNaN } from 'lodash'; 2 | 3 | const getFieldName = stringName => 4 | stringName.split('.').filter(string => isNaN(parseInt(string, 10))); 5 | 6 | export default getFieldName; 7 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/utils/getMaxTempKey.js: -------------------------------------------------------------------------------- 1 | const getMaxTempKey = arr => { 2 | if (arr.length === 0) { 3 | return -1; 4 | } 5 | 6 | return Math.max.apply( 7 | Math, 8 | arr.map(o => o.__temp_key__) 9 | ); 10 | }; 11 | 12 | export default getMaxTempKey; 13 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/utils/getRequestUrl.js: -------------------------------------------------------------------------------- 1 | // FIXME when back-end ready 2 | const getRequestUrl = path => `/content-manager/${path}`; 3 | 4 | export default getRequestUrl; 5 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/utils/getTrad.js: -------------------------------------------------------------------------------- 1 | const getTrad = id => `content-manager.${id}`; 2 | 3 | export default getTrad; 4 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/utils/index.js: -------------------------------------------------------------------------------- 1 | export { default as arrayMoveItem } from './arrayMoveItem'; 2 | export { default as checkIfAttributeIsDisplayable } from './checkIfAttributeIsDisplayable'; 3 | export { default as createDefaultForm } from './createDefaultForm'; 4 | export { default as formatLayoutToApi } from './formatLayoutToApi'; 5 | export { default as generatePermissionsObject } from './generatePermissionsObject'; 6 | export { default as getFieldName } from './getFieldName'; 7 | export { default as getMaxTempKey } from './getMaxTempKey'; 8 | export { default as getRequestUrl } from './getRequestUrl'; 9 | export { default as getTrad } from './getTrad'; 10 | export { default as ItemTypes } from './ItemTypes'; 11 | export { default as mergeMetasWithSchema } from './mergeMetasWithSchema'; 12 | export { default as removeKeyInObject } from './removeKeyInObject'; 13 | export { default as removePasswordFieldsFromData } from './removePasswordFieldsFromData'; 14 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/utils/isFieldTypeNumber.js: -------------------------------------------------------------------------------- 1 | export default function isFieldTypeNumber(type) { 2 | return ['integer', 'biginteger', 'decimal', 'float', 'number'].includes(type); 3 | } 4 | -------------------------------------------------------------------------------- /.cache/admin/src/content-manager/utils/mergeMetasWithSchema.js: -------------------------------------------------------------------------------- 1 | import { set } from 'lodash'; 2 | 3 | const mergeMetasWithSchema = (data, schemas, mainSchemaKey) => { 4 | const findSchema = refUid => schemas.find(obj => obj.uid === refUid); 5 | const merged = Object.assign({}, data); 6 | const mainUID = data[mainSchemaKey].uid; 7 | const mainSchema = findSchema(mainUID); 8 | 9 | set(merged, [mainSchemaKey], { ...data[mainSchemaKey], ...mainSchema }); 10 | 11 | Object.keys(data.components).forEach(compoUID => { 12 | const compoSchema = findSchema(compoUID); 13 | 14 | set(merged, ['components', compoUID], { ...data.components[compoUID], ...compoSchema }); 15 | }); 16 | 17 | return merged; 18 | }; 19 | 20 | export default mergeMetasWithSchema; 21 | -------------------------------------------------------------------------------- /.cache/admin/src/contexts/Admin/index.js: -------------------------------------------------------------------------------- 1 | import { createContext } from 'react'; 2 | 3 | const AdminContext = createContext({}); 4 | 5 | export default AdminContext; 6 | -------------------------------------------------------------------------------- /.cache/admin/src/contexts/Configurations/index.js: -------------------------------------------------------------------------------- 1 | import { createContext } from 'react'; 2 | 3 | const ConfigurationsContext = createContext({}); 4 | 5 | export default ConfigurationsContext; 6 | -------------------------------------------------------------------------------- /.cache/admin/src/contexts/MarketPlace/index.js: -------------------------------------------------------------------------------- 1 | import React, { createContext, useContext } from 'react'; 2 | import PropTypes from 'prop-types'; 3 | 4 | const MarketPlaceContext = createContext({}); 5 | 6 | const MarketPlaceContextProvider = ({ children, ...rest }) => { 7 | return {children}; 8 | }; 9 | 10 | const useMarketPlaceContext = () => useContext(MarketPlaceContext); 11 | 12 | MarketPlaceContextProvider.propTypes = { 13 | children: PropTypes.node.isRequired, 14 | downloadPlugin: PropTypes.func.isRequired, 15 | }; 16 | 17 | export { MarketPlaceContext, MarketPlaceContextProvider, useMarketPlaceContext }; 18 | -------------------------------------------------------------------------------- /.cache/admin/src/contexts/PermisssionsDataManagerContext/index.js: -------------------------------------------------------------------------------- 1 | import { createContext } from 'react'; 2 | 3 | const PermissionsDataManagerContext = createContext({}); 4 | 5 | export default PermissionsDataManagerContext; 6 | -------------------------------------------------------------------------------- /.cache/admin/src/contexts/ThemeToggle/index.js: -------------------------------------------------------------------------------- 1 | import { createContext } from 'react'; 2 | 3 | const ThemeToggleContext = createContext({}); 4 | 5 | export default ThemeToggleContext; 6 | -------------------------------------------------------------------------------- /.cache/admin/src/contexts/index.js: -------------------------------------------------------------------------------- 1 | export { default as AdminContext } from './Admin'; 2 | export { default as ConfigurationsContext } from './Configurations'; 3 | export { default as PermissionsDataManagerContext } from './PermisssionsDataManagerContext'; 4 | export { default as ThemeToggleContext } from './ThemeToggle'; 5 | -------------------------------------------------------------------------------- /.cache/admin/src/core/apis/Components.js: -------------------------------------------------------------------------------- 1 | import invariant from 'invariant'; 2 | 3 | class Components { 4 | constructor() { 5 | this.components = {}; 6 | } 7 | 8 | add(component) { 9 | const { name, Component } = component; 10 | 11 | invariant(Component, 'A Component must be provided'); 12 | invariant(name, 'A name must be provided'); 13 | invariant(this.components[name] === undefined, 'A similar field already exists'); 14 | 15 | this.components[name] = Component; 16 | } 17 | } 18 | 19 | export default () => new Components(); 20 | -------------------------------------------------------------------------------- /.cache/admin/src/core/apis/Fields.js: -------------------------------------------------------------------------------- 1 | import invariant from 'invariant'; 2 | 3 | class Fields { 4 | constructor() { 5 | this.fields = {}; 6 | } 7 | 8 | add(field) { 9 | const { type, Component } = field; 10 | 11 | invariant(Component, 'A Component must be provided'); 12 | invariant(type, 'A type must be provided'); 13 | 14 | this.fields[type] = Component; 15 | } 16 | } 17 | 18 | export default () => new Fields(); 19 | -------------------------------------------------------------------------------- /.cache/admin/src/core/apis/Middlewares.js: -------------------------------------------------------------------------------- 1 | class Middlewares { 2 | constructor() { 3 | this.middlewares = []; 4 | } 5 | 6 | add(middleware) { 7 | this.middlewares.push(middleware); 8 | } 9 | } 10 | 11 | export default () => new Middlewares(); 12 | -------------------------------------------------------------------------------- /.cache/admin/src/core/apis/Plugin.js: -------------------------------------------------------------------------------- 1 | class Plugin { 2 | constructor(pluginConf) { 3 | this.apis = pluginConf.apis || {}; 4 | this.initializer = pluginConf.initializer || null; 5 | this.injectionZones = pluginConf.injectionZones || {}; 6 | this.isReady = pluginConf.isReady !== undefined ? pluginConf.isReady : true; 7 | this.name = pluginConf.name; 8 | this.pluginId = pluginConf.id; 9 | } 10 | 11 | getInjectedComponents(containerName, blockName) { 12 | try { 13 | return this.injectionZones[containerName][blockName] || {}; 14 | } catch (err) { 15 | console.error('Cannot get injected component', err); 16 | 17 | return err; 18 | } 19 | } 20 | 21 | injectComponent(containerName, blockName, compo) { 22 | try { 23 | this.injectionZones[containerName][blockName].push(compo); 24 | } catch (err) { 25 | console.error('Cannot inject component', err); 26 | } 27 | } 28 | } 29 | 30 | export default pluginConf => new Plugin(pluginConf); 31 | -------------------------------------------------------------------------------- /.cache/admin/src/core/apis/Reducers.js: -------------------------------------------------------------------------------- 1 | class Reducers { 2 | constructor({ appReducers }) { 3 | this.reducers = { ...appReducers }; 4 | } 5 | 6 | add(reducerName, reducer) { 7 | this.reducers[reducerName] = reducer; 8 | } 9 | } 10 | 11 | export default ({ appReducers }) => new Reducers({ appReducers }); 12 | -------------------------------------------------------------------------------- /.cache/admin/src/core/apis/index.js: -------------------------------------------------------------------------------- 1 | export { default as Fields } from './Fields'; 2 | export { default as Components } from './Components'; 3 | export { default as Middlewares } from './Middlewares'; 4 | export { default as Plugin } from './Plugin'; 5 | export { default as Reducers } from './Reducers'; 6 | -------------------------------------------------------------------------------- /.cache/admin/src/core/store/configureStore.js: -------------------------------------------------------------------------------- 1 | import { createStore, applyMiddleware } from 'redux'; 2 | import createReducer from './createReducer'; 3 | 4 | const configureStore = (appMiddlewares, appReducers) => { 5 | const middlewares = []; 6 | 7 | appMiddlewares.forEach(middleware => { 8 | middlewares.push(middleware()); 9 | }); 10 | 11 | return createStore(createReducer(appReducers), {}, applyMiddleware(...middlewares)); 12 | }; 13 | 14 | export default configureStore; 15 | -------------------------------------------------------------------------------- /.cache/admin/src/core/store/createReducer.js: -------------------------------------------------------------------------------- 1 | import { combineReducers } from 'redux'; 2 | 3 | const createReducer = reducers => combineReducers(reducers); 4 | 5 | export default createReducer; 6 | -------------------------------------------------------------------------------- /.cache/admin/src/core/utils/axiosInstance.js: -------------------------------------------------------------------------------- 1 | import axios from 'axios'; 2 | import { auth } from '@strapi/helper-plugin'; 3 | 4 | const instance = axios.create({ 5 | baseURL: process.env.STRAPI_ADMIN_BACKEND_URL, 6 | }); 7 | 8 | instance.interceptors.request.use( 9 | async config => { 10 | config.headers = { 11 | Authorization: `Bearer ${auth.getToken()}`, 12 | Accept: 'application/json', 13 | 'Content-Type': 'application/json', 14 | }; 15 | 16 | return config; 17 | }, 18 | error => { 19 | Promise.reject(error); 20 | } 21 | ); 22 | 23 | instance.interceptors.response.use( 24 | response => response, 25 | error => { 26 | // whatever you want to do with the error 27 | if (error?.response?.status === 401) { 28 | auth.clearAppStorage(); 29 | window.location.reload(); 30 | } 31 | 32 | throw error; 33 | } 34 | ); 35 | 36 | export default instance; 37 | -------------------------------------------------------------------------------- /.cache/admin/src/core/utils/basename.js: -------------------------------------------------------------------------------- 1 | const basename = process.env.ADMIN_PATH.replace(window.location.origin, ''); 2 | 3 | export default basename; 4 | -------------------------------------------------------------------------------- /.cache/admin/src/core/utils/index.js: -------------------------------------------------------------------------------- 1 | export { default as axiosInstance } from './axiosInstance'; 2 | export { default as basename } from './basename'; 3 | export { default as createHook } from './createHook'; 4 | -------------------------------------------------------------------------------- /.cache/admin/src/exposedHooks.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Hook that allows to mutate the displayed headers of the list view table 3 | * @constant 4 | * @type {string} 5 | */ 6 | export const INJECT_COLUMN_IN_TABLE = 'Admin/CM/pages/ListView/inject-column-in-table'; 7 | 8 | /** 9 | * Hook that allows to mutate the CM's collection types links pre-set filters 10 | * @constant 11 | * @type {string} 12 | */ 13 | export const MUTATE_COLLECTION_TYPES_LINKS = 'Admin/CM/pages/App/mutate-collection-types-links'; 14 | 15 | /** 16 | * Hook that allows to mutate the CM's edit view layout 17 | * @constant 18 | * @type {string} 19 | */ 20 | export const MUTATE_EDIT_VIEW_LAYOUT = 'Admin/CM/pages/EditView/mutate-edit-view-layout'; 21 | 22 | /** 23 | * Hook that allows to mutate the CM's single types links pre-set filters 24 | * @constant 25 | * @type {string} 26 | */ 27 | export const MUTATE_SINGLE_TYPES_LINKS = 'Admin/CM/pages/App/mutate-single-types-links'; 28 | -------------------------------------------------------------------------------- /.cache/admin/src/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/czm1290433700/nextjs-cms/4dd61244e54813d48e740d4e3c6f9c91c5b22ba4/.cache/admin/src/favicon.ico -------------------------------------------------------------------------------- /.cache/admin/src/hooks/index.js: -------------------------------------------------------------------------------- 1 | export { default as useConfigurations } from './useConfigurations'; 2 | export { default as useModels } from './useModels'; 3 | export { default as useFetchPermissionsLayout } from './useFetchPermissionsLayout'; 4 | export { default as useFetchRole } from './useFetchRole'; 5 | export { default as useMenu } from './useMenu'; 6 | export { default as useRolesList } from './useRolesList'; 7 | export { default as useSettingsMenu } from './useSettingsMenu'; 8 | export { default as useSettingsForm } from './useSettingsForm'; 9 | export { default as usePermissionsDataManager } from './usePermissionsDataManager'; 10 | export { default as useReleaseNotification } from './useReleaseNotification'; 11 | export { default as useThemeToggle } from './useThemeToggle'; 12 | -------------------------------------------------------------------------------- /.cache/admin/src/hooks/useConfigurations/index.js: -------------------------------------------------------------------------------- 1 | import { useContext } from 'react'; 2 | import { ConfigurationsContext } from '../../contexts'; 3 | 4 | const useConfigurations = () => { 5 | const context = useContext(ConfigurationsContext); 6 | 7 | return context; 8 | }; 9 | 10 | export default useConfigurations; 11 | -------------------------------------------------------------------------------- /.cache/admin/src/hooks/useFetchEnabledPlugins/index.js: -------------------------------------------------------------------------------- 1 | import { useQuery } from 'react-query'; 2 | import { useNotification } from '@strapi/helper-plugin'; 3 | import { fetchEnabledPlugins } from './utils/api'; 4 | 5 | const useFetchEnabledPlugins = notifyLoad => { 6 | const toggleNotification = useNotification(); 7 | 8 | return useQuery('list-enabled-plugins', () => fetchEnabledPlugins(), { 9 | onSuccess: () => { 10 | if (notifyLoad) { 11 | notifyLoad(); 12 | } 13 | }, 14 | onError: () => { 15 | toggleNotification({ 16 | type: 'warning', 17 | message: { id: 'notification.error', defaultMessage: 'An error occured' }, 18 | }); 19 | }, 20 | }); 21 | }; 22 | 23 | export default useFetchEnabledPlugins; 24 | -------------------------------------------------------------------------------- /.cache/admin/src/hooks/useFetchEnabledPlugins/utils/api.js: -------------------------------------------------------------------------------- 1 | import { axiosInstance } from '../../../core/utils'; 2 | 3 | const fetchEnabledPlugins = async () => { 4 | const { data } = await axiosInstance.get('/admin/plugins'); 5 | 6 | return data; 7 | }; 8 | 9 | export { fetchEnabledPlugins }; 10 | -------------------------------------------------------------------------------- /.cache/admin/src/hooks/useFetchMarketplacePlugins/index.js: -------------------------------------------------------------------------------- 1 | import { useQuery } from 'react-query'; 2 | import { useNotification } from '@strapi/helper-plugin'; 3 | import { fetchMarketplacePlugins } from './utils/api'; 4 | 5 | const useFetchMarketplacePlugins = notifyLoad => { 6 | const toggleNotification = useNotification(); 7 | 8 | return useQuery('list-marketplace-plugins', () => fetchMarketplacePlugins(), { 9 | onSuccess: () => { 10 | if (notifyLoad) { 11 | notifyLoad(); 12 | } 13 | }, 14 | onError: () => { 15 | toggleNotification({ 16 | type: 'warning', 17 | message: { id: 'notification.error', defaultMessage: 'An error occured' }, 18 | }); 19 | }, 20 | }); 21 | }; 22 | 23 | export default useFetchMarketplacePlugins; 24 | -------------------------------------------------------------------------------- /.cache/admin/src/hooks/useFetchMarketplacePlugins/utils/api.js: -------------------------------------------------------------------------------- 1 | import axios from 'axios'; 2 | 3 | const MARKETPLACE_API_URL = 'https://market-api.strapi.io'; 4 | 5 | const fetchMarketplacePlugins = async () => { 6 | const { data: response } = await axios.get(`${MARKETPLACE_API_URL}/plugins`); 7 | 8 | // Only keep v4 plugins 9 | const filteredResponse = { 10 | ...response, 11 | data: response.data.filter(plugin => plugin.attributes.strapiCompatibility === 'v4'), 12 | }; 13 | 14 | return filteredResponse; 15 | }; 16 | 17 | export { fetchMarketplacePlugins }; 18 | -------------------------------------------------------------------------------- /.cache/admin/src/hooks/useFetchMarketplaceProviders/index.js: -------------------------------------------------------------------------------- 1 | import { useQuery } from 'react-query'; 2 | import { useNotification } from '@strapi/helper-plugin'; 3 | import { fetchMarketplacePlugins } from './utils/api'; 4 | 5 | const useFetchMarketplaceProviders = notifyLoad => { 6 | const toggleNotification = useNotification(); 7 | 8 | return useQuery('list-marketplace-providers', () => fetchMarketplacePlugins(), { 9 | onSuccess: () => { 10 | if (notifyLoad) { 11 | notifyLoad(); 12 | } 13 | }, 14 | onError: () => { 15 | toggleNotification({ 16 | type: 'warning', 17 | message: { id: 'notification.error', defaultMessage: 'An error occured' }, 18 | }); 19 | }, 20 | }); 21 | }; 22 | 23 | export default useFetchMarketplaceProviders; 24 | -------------------------------------------------------------------------------- /.cache/admin/src/hooks/useFetchMarketplaceProviders/utils/api.js: -------------------------------------------------------------------------------- 1 | import axios from 'axios'; 2 | 3 | const MARKETPLACE_API_URL = 'https://market-api.strapi.io'; 4 | 5 | const fetchMarketplacePlugins = async () => { 6 | const { data } = await axios.get(`${MARKETPLACE_API_URL}/providers`); 7 | 8 | return data; 9 | }; 10 | 11 | export { fetchMarketplacePlugins }; 12 | -------------------------------------------------------------------------------- /.cache/admin/src/hooks/useFetchPermissionsLayout/index.js: -------------------------------------------------------------------------------- 1 | import { useEffect, useReducer } from 'react'; 2 | import { request } from '@strapi/helper-plugin'; 3 | 4 | import reducer, { initialState } from './reducer'; 5 | 6 | const useFetchPermissionsLayout = id => { 7 | const [{ data, error, isLoading }, dispatch] = useReducer(reducer, initialState); 8 | 9 | useEffect(() => { 10 | const getData = async () => { 11 | dispatch({ 12 | type: 'GET_DATA', 13 | }); 14 | 15 | const { data } = await request('/admin/permissions', { 16 | method: 'GET', 17 | params: { role: id }, 18 | }); 19 | 20 | dispatch({ 21 | type: 'GET_DATA_SUCCEEDED', 22 | data, 23 | }); 24 | }; 25 | 26 | getData(); 27 | }, [id]); 28 | 29 | return { data, error, isLoading }; 30 | }; 31 | 32 | export default useFetchPermissionsLayout; 33 | -------------------------------------------------------------------------------- /.cache/admin/src/hooks/useFetchPermissionsLayout/reducer.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable consistent-return */ 2 | import produce from 'immer'; 3 | 4 | export const initialState = { 5 | data: {}, 6 | error: null, 7 | isLoading: true, 8 | }; 9 | 10 | const reducer = (state, action) => 11 | produce(state, draftState => { 12 | switch (action.type) { 13 | case 'GET_DATA': { 14 | draftState.isLoading = true; 15 | draftState.data = {}; 16 | draftState.error = null; 17 | break; 18 | } 19 | case 'GET_DATA_SUCCEEDED': { 20 | draftState.data = action.data; 21 | draftState.isLoading = false; 22 | draftState.error = null; 23 | break; 24 | } 25 | case 'GET_DATA_ERROR': { 26 | draftState.isLoading = false; 27 | draftState.error = action.error; 28 | break; 29 | } 30 | default: 31 | return draftState; 32 | } 33 | }); 34 | 35 | export default reducer; 36 | -------------------------------------------------------------------------------- /.cache/admin/src/hooks/useFetchRole/reducer.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable consistent-return */ 2 | import produce from 'immer'; 3 | 4 | export const initialState = { 5 | role: {}, 6 | permissions: {}, 7 | isLoading: true, 8 | }; 9 | 10 | const reducer = (state, action) => 11 | produce(state, draftState => { 12 | switch (action.type) { 13 | case 'GET_DATA_SUCCEEDED': { 14 | draftState.role = action.role; 15 | draftState.permissions = action.permissions; 16 | draftState.isLoading = false; 17 | break; 18 | } 19 | case 'GET_DATA_ERROR': { 20 | draftState.isLoading = false; 21 | break; 22 | } 23 | case 'ON_SUBMIT_SUCCEEDED': { 24 | draftState.role.name = action.name; 25 | draftState.role.description = action.description; 26 | break; 27 | } 28 | default: 29 | return draftState; 30 | } 31 | }); 32 | 33 | export default reducer; 34 | -------------------------------------------------------------------------------- /.cache/admin/src/hooks/useMenu/utils/checkPermissions.js: -------------------------------------------------------------------------------- 1 | import { hasPermissions } from '@strapi/helper-plugin'; 2 | 3 | /** 4 | * This function resolves an array of Promises 5 | * It puts at a specific index the status of a specific permission. 6 | * While this might look weird, we then iterate on this array 7 | * and check the different CT/ST/general/plugin sections 8 | * and make an index based comparisons 9 | */ 10 | const checkPermissions = (userPermissions, permissionsToCheck) => 11 | permissionsToCheck.map(({ permissions }) => hasPermissions(userPermissions, permissions)); 12 | 13 | export default checkPermissions; 14 | -------------------------------------------------------------------------------- /.cache/admin/src/hooks/useMenu/utils/getPluginSectionLinks.js: -------------------------------------------------------------------------------- 1 | import checkPermissions from './checkPermissions'; 2 | 3 | const getPluginSectionLinks = async (userPermissions, pluginsSectionRawLinks) => { 4 | const pluginSectionPermissionsPromises = checkPermissions( 5 | userPermissions, 6 | pluginsSectionRawLinks 7 | ); 8 | const pluginSectionLinksPermissions = await Promise.all(pluginSectionPermissionsPromises); 9 | 10 | const authorizedPluginSectionLinks = pluginsSectionRawLinks.filter( 11 | (_, index) => pluginSectionLinksPermissions[index] 12 | ); 13 | 14 | return authorizedPluginSectionLinks; 15 | }; 16 | 17 | export default getPluginSectionLinks; 18 | -------------------------------------------------------------------------------- /.cache/admin/src/hooks/useNavigatorOnLine/index.js: -------------------------------------------------------------------------------- 1 | import { useEffect, useState } from 'react'; 2 | 3 | /** 4 | * For more details about this hook see: 5 | * https://www.30secondsofcode.org/react/s/use-navigator-on-line 6 | */ 7 | const useNavigatorOnLine = () => { 8 | const onlineStatus = 9 | typeof navigator !== 'undefined' && typeof navigator.onLine === 'boolean' 10 | ? navigator.onLine 11 | : true; 12 | 13 | const [isOnline, setIsOnline] = useState(onlineStatus); 14 | 15 | const setOnline = () => setIsOnline(true); 16 | const setOffline = () => setIsOnline(false); 17 | 18 | useEffect(() => { 19 | window.addEventListener('online', setOnline); 20 | window.addEventListener('offline', setOffline); 21 | 22 | return () => { 23 | window.removeEventListener('online', setOnline); 24 | window.removeEventListener('offline', setOffline); 25 | }; 26 | }, []); 27 | 28 | return isOnline; 29 | }; 30 | 31 | export default useNavigatorOnLine; 32 | -------------------------------------------------------------------------------- /.cache/admin/src/hooks/usePermissionsDataManager/index.js: -------------------------------------------------------------------------------- 1 | import { useContext } from 'react'; 2 | import { PermissionsDataManagerContext } from '../../contexts'; 3 | 4 | const usePermissionsDataManager = () => useContext(PermissionsDataManagerContext); 5 | 6 | export default usePermissionsDataManager; 7 | -------------------------------------------------------------------------------- /.cache/admin/src/hooks/useReleaseNotification/utils/api.js: -------------------------------------------------------------------------------- 1 | import axios from 'axios'; 2 | import packageJSON from '../../../../../package.json'; 3 | 4 | const strapiVersion = packageJSON.version; 5 | 6 | const fetchStrapiLatestRelease = async () => { 7 | try { 8 | const { 9 | data: { tag_name }, 10 | } = await axios.get('https://api.github.com/repos/strapi/strapi/releases/latest'); 11 | 12 | return tag_name; 13 | } catch (err) { 14 | // Don't throw an error 15 | return strapiVersion; 16 | } 17 | }; 18 | 19 | export default fetchStrapiLatestRelease; 20 | -------------------------------------------------------------------------------- /.cache/admin/src/hooks/useReleaseNotification/utils/checkLatestStrapiVersion.js: -------------------------------------------------------------------------------- 1 | import semver from 'semver'; 2 | 3 | const checkLatestStrapiVersion = (currentPackageVersion, latestPublishedVersion) => { 4 | if (!semver.valid(currentPackageVersion) || !semver.valid(latestPublishedVersion)) { 5 | return false; 6 | } 7 | 8 | return semver.lt(currentPackageVersion, latestPublishedVersion); 9 | }; 10 | 11 | export default checkLatestStrapiVersion; 12 | -------------------------------------------------------------------------------- /.cache/admin/src/hooks/useRolesList/init.js: -------------------------------------------------------------------------------- 1 | const init = (initialState, shouldFetchData) => { 2 | return { ...initialState, isLoading: shouldFetchData }; 3 | }; 4 | 5 | export default init; 6 | -------------------------------------------------------------------------------- /.cache/admin/src/hooks/useRolesList/reducer.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable consistent-return */ 2 | import produce from 'immer'; 3 | 4 | export const initialState = { 5 | roles: [], 6 | isLoading: true, 7 | }; 8 | 9 | const reducer = (state, action) => 10 | produce(state, draftState => { 11 | switch (action.type) { 12 | case 'GET_DATA': { 13 | draftState.isLoading = true; 14 | draftState.roles = []; 15 | break; 16 | } 17 | case 'GET_DATA_SUCCEEDED': { 18 | draftState.roles = action.data; 19 | draftState.isLoading = false; 20 | break; 21 | } 22 | case 'GET_DATA_ERROR': { 23 | draftState.isLoading = false; 24 | break; 25 | } 26 | default: 27 | return draftState; 28 | } 29 | }); 30 | 31 | export default reducer; 32 | -------------------------------------------------------------------------------- /.cache/admin/src/hooks/useSettingsForm/init.js: -------------------------------------------------------------------------------- 1 | const init = (initialState, fieldsToPick) => { 2 | return { ...initialState, fieldsToPick }; 3 | }; 4 | 5 | export default init; 6 | -------------------------------------------------------------------------------- /.cache/admin/src/hooks/useSettingsMenu/utils/customGlobalLinks.js: -------------------------------------------------------------------------------- 1 | export default []; 2 | -------------------------------------------------------------------------------- /.cache/admin/src/hooks/useSettingsMenu/utils/defaultGlobalLinks.js: -------------------------------------------------------------------------------- 1 | import adminPermissions from '../../../permissions'; 2 | 3 | const defaultGlobalLinks = [ 4 | { 5 | intlLabel: { id: 'Settings.application.title', defaultMessage: 'Overview' }, 6 | to: '/settings/application-infos', 7 | id: '000-application-infos', 8 | isDisplayed: false, 9 | permissions: [], 10 | }, 11 | { 12 | intlLabel: { id: 'Settings.webhooks.title', defaultMessage: 'Webhooks' }, 13 | to: '/settings/webhooks', 14 | id: 'webhooks', 15 | isDisplayed: false, 16 | permissions: adminPermissions.settings.webhooks.main, 17 | }, 18 | { 19 | intlLabel: { id: 'Settings.apiTokens.title', defaultMessage: 'API Tokens' }, 20 | to: '/settings/api-tokens?sort=name:ASC', 21 | id: 'api-tokens', 22 | isDisplayed: false, 23 | permissions: adminPermissions.settings['api-tokens'].main, 24 | }, 25 | ]; 26 | 27 | export default defaultGlobalLinks; 28 | -------------------------------------------------------------------------------- /.cache/admin/src/hooks/useSettingsMenu/utils/formatLinks.js: -------------------------------------------------------------------------------- 1 | const formatLinks = menu => { 2 | return menu.map(menuSection => { 3 | const formattedLinks = menuSection.links.map(link => ({ 4 | ...link, 5 | isDisplayed: false, 6 | })); 7 | 8 | return { ...menuSection, links: formattedLinks }; 9 | }); 10 | }; 11 | 12 | export default formatLinks; 13 | -------------------------------------------------------------------------------- /.cache/admin/src/hooks/useSettingsMenu/utils/globalLinks.js: -------------------------------------------------------------------------------- 1 | import customGlobalLinks from 'ee_else_ce/hooks/useSettingsMenu/utils/customGlobalLinks'; 2 | import defaultGlobalLinks from './defaultGlobalLinks'; 3 | 4 | export default [...defaultGlobalLinks, ...customGlobalLinks]; 5 | -------------------------------------------------------------------------------- /.cache/admin/src/hooks/useSettingsMenu/utils/sortLinks.js: -------------------------------------------------------------------------------- 1 | import sortBy from 'lodash/sortBy'; 2 | 3 | const sortLinks = links => sortBy(links, link => link.id); 4 | 5 | export default sortLinks; 6 | -------------------------------------------------------------------------------- /.cache/admin/src/hooks/useThemeToggle/index.js: -------------------------------------------------------------------------------- 1 | import { useContext } from 'react'; 2 | import { ThemeToggleContext } from '../../contexts'; 3 | 4 | const useThemeToggle = () => { 5 | const context = useContext(ThemeToggleContext); 6 | 7 | return context; 8 | }; 9 | 10 | export default useThemeToggle; 11 | -------------------------------------------------------------------------------- /.cache/admin/src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /.cache/admin/src/injectionZones.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Admin injection zones: 3 | * Available zones: Content Manager listView & editView 4 | * @constant 5 | * @type {Object} 6 | */ 7 | const injectionZones = { 8 | admin: { 9 | // Temporary injection zone, support for the react-tour plugin in foodadvisor 10 | tutorials: { 11 | links: [], 12 | }, 13 | }, 14 | contentManager: { 15 | editView: { informations: [], 'right-links': [] }, 16 | listView: { actions: [], deleteModalAdditionalInfos: [] }, 17 | }, 18 | }; 19 | 20 | export default injectionZones; 21 | -------------------------------------------------------------------------------- /.cache/admin/src/layouts/AppLayout/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Box } from '@strapi/design-system/Box'; 3 | import { Flex } from '@strapi/design-system/Flex'; 4 | import { SkipToContent } from '@strapi/design-system/Main'; 5 | import PropTypes from 'prop-types'; 6 | import styled from 'styled-components'; 7 | import { useIntl } from 'react-intl'; 8 | 9 | const FlexBox = styled(Box)` 10 | flex: 1; 11 | `; 12 | 13 | const AppLayout = ({ children, sideNav }) => { 14 | const { formatMessage } = useIntl(); 15 | 16 | return ( 17 | 18 | 19 | {formatMessage({ id: 'skipToContent', defaultMessage: 'Skip to content' })} 20 | 21 | 22 | {sideNav} 23 | {children} 24 | 25 | 26 | ); 27 | }; 28 | 29 | AppLayout.propTypes = { 30 | children: PropTypes.node.isRequired, 31 | sideNav: PropTypes.node.isRequired, 32 | }; 33 | 34 | export default AppLayout; 35 | -------------------------------------------------------------------------------- /.cache/admin/src/layouts/UnauthenticatedLayout/LocaleToggle/index.js: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * LanguageToggle 4 | * 5 | */ 6 | 7 | import React from 'react'; 8 | import { useIntl } from 'react-intl'; 9 | import { SimpleMenu, MenuItem } from '@strapi/design-system/SimpleMenu'; 10 | import useLocalesProvider from '../../../components/LocalesProvider/useLocalesProvider'; 11 | 12 | const LocaleToggle = () => { 13 | const { changeLocale, localeNames } = useLocalesProvider(); 14 | const { locale } = useIntl(); 15 | 16 | return ( 17 | 18 | {Object.keys(localeNames).map(lang => ( 19 | changeLocale(lang)} key={lang}> 20 | {localeNames[lang]} 21 | 22 | ))} 23 | 24 | ); 25 | }; 26 | 27 | export default LocaleToggle; 28 | -------------------------------------------------------------------------------- /.cache/admin/src/pages/App/constants.js: -------------------------------------------------------------------------------- 1 | export const SET_APP_RUNTIME_STATUS = 'StrapiAdmin/APP/SET_APP_RUNTIME_STATUS'; 2 | -------------------------------------------------------------------------------- /.cache/admin/src/pages/App/reducer.js: -------------------------------------------------------------------------------- 1 | import produce from 'immer'; 2 | import { SET_APP_RUNTIME_STATUS } from './constants'; 3 | 4 | const initialState = { 5 | status: 'init', 6 | }; 7 | 8 | const reducer = (state = initialState, action) => 9 | /* eslint-disable-next-line consistent-return */ 10 | produce(state, draftState => { 11 | switch (action.type) { 12 | case SET_APP_RUNTIME_STATUS: { 13 | draftState.status = 'runtime'; 14 | break; 15 | } 16 | default: 17 | return draftState; 18 | } 19 | }); 20 | 21 | export { initialState }; 22 | export default reducer; 23 | -------------------------------------------------------------------------------- /.cache/admin/src/pages/App/utils/customRoutes.js: -------------------------------------------------------------------------------- 1 | const customRoutes = []; 2 | 3 | export default customRoutes; 4 | -------------------------------------------------------------------------------- /.cache/admin/src/pages/App/utils/defaultRoutes.js: -------------------------------------------------------------------------------- 1 | const defaultRoutes = []; 2 | 3 | export default defaultRoutes; 4 | -------------------------------------------------------------------------------- /.cache/admin/src/pages/App/utils/index.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable import/prefer-default-export */ 2 | export { default as getUID } from './unique-identifier'; 3 | export { default as routes } from './routes'; 4 | -------------------------------------------------------------------------------- /.cache/admin/src/pages/App/utils/routes.js: -------------------------------------------------------------------------------- 1 | import customRoutes from 'ee_else_ce/pages/App/utils/customRoutes'; 2 | import defaultRoutes from './defaultRoutes'; 3 | 4 | export default [...customRoutes, ...defaultRoutes]; 5 | -------------------------------------------------------------------------------- /.cache/admin/src/pages/App/utils/unique-identifier.js: -------------------------------------------------------------------------------- 1 | import FingerprintJS from '@fingerprintjs/fingerprintjs'; 2 | 3 | const getUniqueIdentifier = async () => { 4 | const fp = await FingerprintJS.load(); 5 | const result = await fp.get(); 6 | 7 | const deviceId = `web-fingerprint-${result.visitorId}`; 8 | 9 | return deviceId; 10 | }; 11 | 12 | export default getUniqueIdentifier; 13 | -------------------------------------------------------------------------------- /.cache/admin/src/pages/AuthPage/components/FieldActionWrapper/index.js: -------------------------------------------------------------------------------- 1 | import styled from 'styled-components'; 2 | import { FieldAction } from '@strapi/design-system/Field'; 3 | 4 | const FieldActionWrapper = styled(FieldAction)` 5 | svg { 6 | height: 1rem; 7 | width: 1rem; 8 | path { 9 | fill: ${({ theme }) => theme.colors.neutral600}; 10 | } 11 | } 12 | `; 13 | 14 | export default FieldActionWrapper; 15 | -------------------------------------------------------------------------------- /.cache/admin/src/pages/AuthPage/components/Login/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import PropTypes from 'prop-types'; 3 | import BaseLogin from './BaseLogin'; 4 | import UnauthenticatedLayout from '../../../../layouts/UnauthenticatedLayout'; 5 | 6 | const Login = loginProps => { 7 | return ( 8 | 9 | 10 | 11 | ); 12 | }; 13 | 14 | Login.defaultProps = { 15 | onSubmit: e => e.preventDefault(), 16 | }; 17 | 18 | Login.propTypes = { 19 | onSubmit: PropTypes.func, 20 | }; 21 | 22 | export default Login; 23 | -------------------------------------------------------------------------------- /.cache/admin/src/pages/AuthPage/init.js: -------------------------------------------------------------------------------- 1 | const init = initialState => { 2 | return initialState; 3 | }; 4 | 5 | export default init; 6 | -------------------------------------------------------------------------------- /.cache/admin/src/pages/AuthPage/utils/index.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable import/prefer-default-export */ 2 | export { default as forms } from './forms'; 3 | -------------------------------------------------------------------------------- /.cache/admin/src/pages/InstalledPluginsPage/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { CheckPagePermissions } from '@strapi/helper-plugin'; 3 | import { Helmet } from 'react-helmet'; 4 | import { useIntl } from 'react-intl'; 5 | import adminPermissions from '../../permissions'; 6 | import Plugins from './Plugins'; 7 | 8 | const InstalledPluginsPage = () => { 9 | const { formatMessage } = useIntl(); 10 | const title = formatMessage({ 11 | id: 'global.plugins', 12 | defaultMessage: 'Plugins', 13 | }); 14 | 15 | return ( 16 | 17 | 18 | 19 | 20 | ); 21 | }; 22 | 23 | export default InstalledPluginsPage; 24 | -------------------------------------------------------------------------------- /.cache/admin/src/pages/MarketplacePage/components/EmptyNpmPackageSearch/EmptyNpmPackageGrid.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import styled from 'styled-components'; 3 | import { Box } from '@strapi/design-system/Box'; 4 | import { GridLayout } from '@strapi/design-system/Layout'; 5 | 6 | const EmptyPluginCard = styled(Box)` 7 | background: ${({ theme }) => 8 | `linear-gradient(180deg, rgba(234, 234, 239, 0) 0%, ${theme.colors.neutral150} 100%)`}; 9 | opacity: 0.33; 10 | `; 11 | 12 | export const EmptyNpmPackageGrid = () => { 13 | return ( 14 | 15 | {Array(12) 16 | .fill(null) 17 | .map((_, idx) => ( 18 | 24 | ))} 25 | 26 | ); 27 | }; 28 | -------------------------------------------------------------------------------- /.cache/admin/src/pages/ProfilePage/utils/api.js: -------------------------------------------------------------------------------- 1 | import omit from 'lodash/omit'; 2 | import { axiosInstance } from '../../../core/utils'; 3 | 4 | const fetchUser = async () => { 5 | const { data } = await axiosInstance.get('/admin/users/me'); 6 | 7 | return data.data; 8 | }; 9 | 10 | const putUser = async body => { 11 | const dataToSend = omit(body, ['confirmPassword', 'currentTheme']); 12 | const { data } = await axiosInstance.put('/admin/users/me', dataToSend); 13 | 14 | return { ...data.data, currentTheme: body.currentTheme }; 15 | }; 16 | 17 | export { fetchUser, putUser }; 18 | -------------------------------------------------------------------------------- /.cache/admin/src/pages/ProfilePage/utils/schema.js: -------------------------------------------------------------------------------- 1 | import * as yup from 'yup'; 2 | import { profileValidation } from '../../SettingsPage/pages/Users/utils/validations/users'; 3 | 4 | const schema = yup.object().shape(profileValidation); 5 | 6 | export default schema; 7 | -------------------------------------------------------------------------------- /.cache/admin/src/pages/SettingsPage/pages/ApiTokens/EditView/utils/schema.js: -------------------------------------------------------------------------------- 1 | import * as yup from 'yup'; 2 | import { translatedErrors } from '@strapi/helper-plugin'; 3 | 4 | const schema = yup.object().shape({ 5 | name: yup.string(translatedErrors.string).required(translatedErrors.required), 6 | type: yup 7 | .string(translatedErrors.string) 8 | .oneOf(['read-only', 'full-access']) 9 | .required(translatedErrors.required), 10 | description: yup.string().nullable(), 11 | }); 12 | 13 | export default schema; 14 | -------------------------------------------------------------------------------- /.cache/admin/src/pages/SettingsPage/pages/ApiTokens/ListView/utils/tableHeaders.js: -------------------------------------------------------------------------------- 1 | const tableHeaders = [ 2 | { 3 | name: 'name', 4 | key: 'name', 5 | metadatas: { 6 | label: 'Name', 7 | sortable: true, 8 | }, 9 | }, 10 | { 11 | name: 'description', 12 | key: 'description', 13 | metadatas: { 14 | label: 'Description', 15 | sortable: false, 16 | }, 17 | }, 18 | { 19 | name: 'type', 20 | key: 'type', 21 | metadatas: { 22 | label: 'Token type', 23 | sortable: false, 24 | }, 25 | }, 26 | { 27 | name: 'createdAt', 28 | key: 'createdAt', 29 | metadatas: { 30 | label: 'Created at', 31 | sortable: false, 32 | }, 33 | }, 34 | ]; 35 | 36 | export default tableHeaders; 37 | -------------------------------------------------------------------------------- /.cache/admin/src/pages/SettingsPage/pages/ApiTokens/ProtectedCreateView/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { CheckPagePermissions } from '@strapi/helper-plugin'; 3 | import adminPermissions from '../../../../../permissions'; 4 | import EditView from '../EditView'; 5 | 6 | const ProtectedApiTokenCreateView = () => { 7 | return ( 8 | 9 | 10 | 11 | ); 12 | }; 13 | 14 | export default ProtectedApiTokenCreateView; 15 | -------------------------------------------------------------------------------- /.cache/admin/src/pages/SettingsPage/pages/ApiTokens/ProtectedEditView/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { CheckPagePermissions } from '@strapi/helper-plugin'; 3 | import adminPermissions from '../../../../../permissions'; 4 | import EditView from '../EditView'; 5 | 6 | const ProtectedApiTokenCreateView = () => { 7 | return ( 8 | 9 | 10 | 11 | ); 12 | }; 13 | 14 | export default ProtectedApiTokenCreateView; 15 | -------------------------------------------------------------------------------- /.cache/admin/src/pages/SettingsPage/pages/ApiTokens/ProtectedListView/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { CheckPagePermissions } from '@strapi/helper-plugin'; 3 | import adminPermissions from '../../../../../permissions'; 4 | import ListView from '../ListView'; 5 | 6 | const ProtectedApiTokenListView = () => ( 7 | 8 | 9 | 10 | ); 11 | 12 | export default ProtectedApiTokenListView; 13 | -------------------------------------------------------------------------------- /.cache/admin/src/pages/SettingsPage/pages/ApplicationInfosPage/components/Form/init.js: -------------------------------------------------------------------------------- 1 | import merge from 'lodash/merge'; 2 | 3 | const init = (initialState, projectSettingsStored) => { 4 | const copyInitialState = merge(initialState, { 5 | menuLogo: { 6 | display: projectSettingsStored.menuLogo, 7 | }, 8 | }); 9 | 10 | return copyInitialState; 11 | }; 12 | 13 | export default init; 14 | -------------------------------------------------------------------------------- /.cache/admin/src/pages/SettingsPage/pages/ApplicationInfosPage/components/LogoInput/reducer.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable consistent-return */ 2 | /* 3 | * 4 | * LogoInput reducer 5 | * 6 | */ 7 | 8 | import produce from 'immer'; 9 | 10 | const initialState = { 11 | currentStep: undefined, 12 | }; 13 | 14 | const reducer = (state = initialState, action) => 15 | produce(state, draftState => { 16 | switch (action.type) { 17 | case 'GO_TO': { 18 | draftState.currentStep = action.to; 19 | break; 20 | } 21 | default: { 22 | return draftState; 23 | } 24 | } 25 | }); 26 | 27 | export default reducer; 28 | export { initialState }; 29 | -------------------------------------------------------------------------------- /.cache/admin/src/pages/SettingsPage/pages/ApplicationInfosPage/components/LogoInput/stepper.js: -------------------------------------------------------------------------------- 1 | import AddLogoDialog from '../LogoModalStepper/AddLogoDialog'; 2 | import PendingLogoDialog from '../LogoModalStepper/PendingLogoDialog'; 3 | 4 | const stepper = { 5 | upload: { 6 | Component: AddLogoDialog, 7 | modalTitle: { 8 | id: 'Settings.application.customization.modal.upload', 9 | defaultMessage: 'Upload logo', 10 | }, 11 | next: 'pending', 12 | prev: null, 13 | }, 14 | pending: { 15 | Component: PendingLogoDialog, 16 | modalTitle: { 17 | id: 'Settings.application.customization.modal.pending', 18 | defaultMessage: 'Pending logo', 19 | }, 20 | next: null, 21 | prev: 'upload', 22 | }, 23 | }; 24 | 25 | export default stepper; 26 | -------------------------------------------------------------------------------- /.cache/admin/src/pages/SettingsPage/pages/ApplicationInfosPage/components/LogoModalStepper/reducer.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable consistent-return */ 2 | /* 3 | * 4 | * LogoModalStepper reducer 5 | * 6 | */ 7 | 8 | import produce from 'immer'; 9 | 10 | const initialState = { 11 | localImage: undefined, 12 | }; 13 | 14 | const reducer = (state = initialState, action) => 15 | produce(state, draftState => { 16 | switch (action.type) { 17 | case 'SET_LOCAL_IMAGE': { 18 | draftState.localImage = action.value; 19 | break; 20 | } 21 | default: { 22 | return draftState; 23 | } 24 | } 25 | }); 26 | 27 | export default reducer; 28 | export { initialState }; 29 | -------------------------------------------------------------------------------- /.cache/admin/src/pages/SettingsPage/pages/ApplicationInfosPage/utils/api.js: -------------------------------------------------------------------------------- 1 | import { axiosInstance } from '../../../../../core/utils'; 2 | import prefixAllUrls from './prefixAllUrls'; 3 | 4 | const fetchProjectSettings = async () => { 5 | const { data } = await axiosInstance.get('/admin/project-settings'); 6 | 7 | return prefixAllUrls(data); 8 | }; 9 | 10 | const postProjectSettings = async body => { 11 | const { data } = await axiosInstance.post('/admin/project-settings', body); 12 | 13 | return prefixAllUrls(data); 14 | }; 15 | 16 | export { fetchProjectSettings, postProjectSettings }; 17 | -------------------------------------------------------------------------------- /.cache/admin/src/pages/SettingsPage/pages/ApplicationInfosPage/utils/constants.js: -------------------------------------------------------------------------------- 1 | export const DIMENSION = 750; 2 | export const SIZE = 100; 3 | export const ACCEPTED_FORMAT = ['image/jpeg', 'image/png', 'image/svg+xml']; 4 | -------------------------------------------------------------------------------- /.cache/admin/src/pages/SettingsPage/pages/ApplicationInfosPage/utils/getFormData.js: -------------------------------------------------------------------------------- 1 | const getFormData = data => { 2 | const formData = new FormData(); 3 | 4 | Object.entries(data).forEach(([key, value]) => { 5 | if (value && value.rawFile instanceof File) { 6 | formData.append(key, value.rawFile); 7 | } 8 | 9 | if (value && value.isReset) { 10 | formData.append(key, null); 11 | } 12 | }); 13 | 14 | return formData; 15 | }; 16 | 17 | export default getFormData; 18 | -------------------------------------------------------------------------------- /.cache/admin/src/pages/SettingsPage/pages/ApplicationInfosPage/utils/prefixAllUrls.js: -------------------------------------------------------------------------------- 1 | import transform from 'lodash/transform'; 2 | import { prefixFileUrlWithBackendUrl } from '@strapi/helper-plugin'; 3 | 4 | const prefixAllUrls = data => 5 | transform( 6 | data, 7 | (result, value, key) => { 8 | if (value && value.url) { 9 | result[key] = { ...value, url: prefixFileUrlWithBackendUrl(value.url) }; 10 | } else { 11 | result[key] = value; 12 | } 13 | }, 14 | {} 15 | ); 16 | 17 | export default prefixAllUrls; 18 | -------------------------------------------------------------------------------- /.cache/admin/src/pages/SettingsPage/pages/ApplicationInfosPage/utils/urlToFile.js: -------------------------------------------------------------------------------- 1 | import axios from 'axios'; 2 | 3 | const urlToFile = async url => { 4 | try { 5 | const res = await axios.get(url, { responseType: 'blob', timeout: 8000 }); 6 | const loadedFile = new File([res.data], res.config.url, { 7 | type: res.headers['content-type'], 8 | }); 9 | 10 | return loadedFile; 11 | } catch (err) { 12 | err.displayMessage = { 13 | id: 'Settings.application.customization.modal.upload.error-network', 14 | defaultMessage: 'Network error', 15 | }; 16 | 17 | throw err; 18 | } 19 | }; 20 | 21 | export default urlToFile; 22 | -------------------------------------------------------------------------------- /.cache/admin/src/pages/SettingsPage/pages/Roles/CreatePage/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Redirect } from 'react-router-dom'; 3 | 4 | const CreatePage = () => { 5 | return ; 6 | }; 7 | 8 | export default CreatePage; 9 | -------------------------------------------------------------------------------- /.cache/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/CollapseLabel/index.js: -------------------------------------------------------------------------------- 1 | import styled from 'styled-components'; 2 | import { Flex } from '@strapi/design-system/Flex'; 3 | 4 | const CollapseLabel = styled(Flex)` 5 | padding-right: ${({ theme }) => theme.spaces[2]}; 6 | overflow: hidden; 7 | flex: 1; 8 | ${({ isCollapsable }) => isCollapsable && 'cursor: pointer;'} 9 | `; 10 | 11 | export default CollapseLabel; 12 | -------------------------------------------------------------------------------- /.cache/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/ConditionsModal/ActionRow/utils/constants.js: -------------------------------------------------------------------------------- 1 | const IS_DISABLED = true; 2 | 3 | export default IS_DISABLED; 4 | -------------------------------------------------------------------------------- /.cache/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/ContentTypeCollapse/Collapse/utils/constants.js: -------------------------------------------------------------------------------- 1 | const IS_DISABLED = true; 2 | 3 | export default IS_DISABLED; 4 | -------------------------------------------------------------------------------- /.cache/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/ContentTypeCollapse/CollapsePropertyMatrix/ActionRow/utils/constants.js: -------------------------------------------------------------------------------- 1 | const IS_DISABLED = true; 2 | 3 | export default IS_DISABLED; 4 | -------------------------------------------------------------------------------- /.cache/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/ContentTypeCollapse/CollapsePropertyMatrix/CarretIcon/index.js: -------------------------------------------------------------------------------- 1 | import styled from 'styled-components'; 2 | import CarretDown from '@strapi/icons/CarretDown'; 3 | 4 | const CarretIcon = styled(CarretDown)` 5 | display: none; 6 | width: ${10 / 16}rem; 7 | transform: rotate(${({ $isActive }) => ($isActive ? '180' : '0')}deg); 8 | margin-left: ${({ theme }) => theme.spaces[2]}; 9 | `; 10 | 11 | export default CarretIcon; 12 | -------------------------------------------------------------------------------- /.cache/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/ContentTypeCollapse/CollapsePropertyMatrix/SubActionRow/utils/constants.js: -------------------------------------------------------------------------------- 1 | const IS_DISABLED = true; 2 | 3 | export default IS_DISABLED; 4 | -------------------------------------------------------------------------------- /.cache/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/ContentTypeCollapse/CollapsePropertyMatrix/utils/generateHeadersFromActions.js: -------------------------------------------------------------------------------- 1 | const generateHeadersFromActions = (actions, propertyName) => { 2 | return actions.map(action => { 3 | const isActionRelatedToCurrentProperty = 4 | Array.isArray(action.applyToProperties) && 5 | action.applyToProperties.indexOf(propertyName) !== -1 && 6 | action.isDisplayed; 7 | 8 | return { label: action.label, actionId: action.actionId, isActionRelatedToCurrentProperty }; 9 | }); 10 | }; 11 | 12 | export default generateHeadersFromActions; 13 | -------------------------------------------------------------------------------- /.cache/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/ContentTypeCollapse/utils/activeStyle.js: -------------------------------------------------------------------------------- 1 | import { Typography } from '@strapi/design-system/Typography'; 2 | import CarretIcon from '../CollapsePropertyMatrix/CarretIcon'; 3 | 4 | const activeStyle = theme => ` 5 | ${Typography} { 6 | color: ${theme.colors.primary600}; 7 | font-weight: ${theme.fontWeights.bold} 8 | } 9 | ${CarretIcon} { 10 | display: block; 11 | path { 12 | fill: ${theme.colors.primary600} 13 | }; 14 | } 15 | `; 16 | 17 | export default activeStyle; 18 | -------------------------------------------------------------------------------- /.cache/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/ContentTypeCollapse/utils/getAvailableActions.js: -------------------------------------------------------------------------------- 1 | const getAvailableActions = (actions, targetSubject) => { 2 | return actions.map(action => { 3 | const isDisplayed = 4 | Array.isArray(action.subjects) && action.subjects.indexOf(targetSubject) !== -1; 5 | 6 | return { ...action, isDisplayed }; 7 | }); 8 | }; 9 | 10 | export default getAvailableActions; 11 | -------------------------------------------------------------------------------- /.cache/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/ContentTypeCollapse/utils/index.js: -------------------------------------------------------------------------------- 1 | export { default as activeStyle } from './activeStyle'; 2 | export { default as getAvailableActions } from './getAvailableActions'; 3 | -------------------------------------------------------------------------------- /.cache/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/GlobalActions/utils/constants.js: -------------------------------------------------------------------------------- 1 | const IS_DISABLED = true; 2 | 3 | export default IS_DISABLED; 4 | -------------------------------------------------------------------------------- /.cache/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/GlobalActions/utils/findDisplayedActions.js: -------------------------------------------------------------------------------- 1 | const findDisplayedActions = actions => 2 | actions.filter(({ subjects }) => subjects && subjects.length); 3 | 4 | export default findDisplayedActions; 5 | -------------------------------------------------------------------------------- /.cache/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/GlobalActions/utils/index.js: -------------------------------------------------------------------------------- 1 | export { default as findDisplayedActions } from './findDisplayedActions'; 2 | export { default as getCheckboxesState } from './getRowLabelCheckboxesState'; 3 | -------------------------------------------------------------------------------- /.cache/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/HiddenAction/index.js: -------------------------------------------------------------------------------- 1 | import styled from 'styled-components'; 2 | import { cellWidth } from '../Permissions/utils/constants'; 3 | 4 | const HiddenAction = styled.div` 5 | width: ${cellWidth}; 6 | `; 7 | 8 | export default HiddenAction; 9 | -------------------------------------------------------------------------------- /.cache/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/Permissions/utils/constants.js: -------------------------------------------------------------------------------- 1 | export const cellWidth = `${120 / 16}rem`; 2 | export const firstRowWidth = `${200 / 16}rem`; 3 | export const rowHeight = `${53 / 16}rem`; 4 | -------------------------------------------------------------------------------- /.cache/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/Permissions/utils/findMatchingPermissions.js: -------------------------------------------------------------------------------- 1 | const findMatchingPermission = (permissions, action, subject) => 2 | permissions.find(perm => perm.action === action && perm.subject === subject); 3 | 4 | export default findMatchingPermission; 5 | -------------------------------------------------------------------------------- /.cache/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/Permissions/utils/formatLayoutForSettingsAndPlugins.js: -------------------------------------------------------------------------------- 1 | import { chain } from 'lodash'; 2 | 3 | const replaceName = name => name.split(' ').join('-'); 4 | 5 | const formatLayout = (layout, groupByKey) => { 6 | return chain(layout) 7 | .groupBy(groupByKey) 8 | .map((item, itemName) => ({ 9 | category: itemName, 10 | categoryId: replaceName(itemName), 11 | childrenForm: chain(item) 12 | .groupBy('subCategory') 13 | .map((actions, subCategoryName) => ({ 14 | subCategoryName, 15 | subCategoryId: replaceName(subCategoryName), 16 | actions, 17 | })) 18 | .value(), 19 | })) 20 | .value(); 21 | }; 22 | 23 | export default formatLayout; 24 | -------------------------------------------------------------------------------- /.cache/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/Permissions/utils/formatPermissionsToAPI.js: -------------------------------------------------------------------------------- 1 | import formatContentTypesPermissionToAPI from './formatContentTypesPermissionToAPI'; 2 | import formatSettingsPermissionsToAPI from './formatSettingsPermissionsToAPI'; 3 | 4 | const formatPermissionsToAPI = modifiedData => { 5 | const pluginsPermissions = formatSettingsPermissionsToAPI(modifiedData.plugins); 6 | const settingsPermissions = formatSettingsPermissionsToAPI(modifiedData.settings); 7 | const collectionTypesPermissions = formatContentTypesPermissionToAPI( 8 | modifiedData.collectionTypes 9 | ); 10 | 11 | const singleTypesPermissions = formatContentTypesPermissionToAPI(modifiedData.singleTypes); 12 | 13 | return [ 14 | ...pluginsPermissions, 15 | ...settingsPermissions, 16 | ...collectionTypesPermissions, 17 | ...singleTypesPermissions, 18 | ]; 19 | }; 20 | 21 | export default formatPermissionsToAPI; 22 | -------------------------------------------------------------------------------- /.cache/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/Permissions/utils/tabLabels.js: -------------------------------------------------------------------------------- 1 | const TAB_LABELS = [ 2 | { 3 | labelId: 'app.components.LeftMenuLinkContainer.collectionTypes', 4 | defaultMessage: 'Collection Types', 5 | id: 'collectionTypes', 6 | }, 7 | { 8 | labelId: 'app.components.LeftMenuLinkContainer.singleTypes', 9 | id: 'singleTypes', 10 | defaultMessage: 'Single Types', 11 | }, 12 | { 13 | labelId: 'app.components.LeftMenuLinkContainer.plugins', 14 | defaultMessage: 'Plugins', 15 | id: 'plugins', 16 | }, 17 | { 18 | labelId: 'app.components.LeftMenuLinkContainer.settings', 19 | defaultMessage: 'Settings', 20 | id: 'settings', 21 | }, 22 | ]; 23 | 24 | export default TAB_LABELS; 25 | -------------------------------------------------------------------------------- /.cache/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/Permissions/utils/updateValues.js: -------------------------------------------------------------------------------- 1 | import { isObject } from 'lodash'; 2 | 3 | /** 4 | * Sets all the none object values of an object to the given one 5 | * @param {object} obj 6 | * @param {boolean} valueToSet The value we want to set 7 | * It preserves the shape of the object, it only modifies the leafs 8 | * of an object. 9 | * This utility is very helpful when dealing with parent<>children checkboxes 10 | */ 11 | const updateValues = (obj, valueToSet) => { 12 | return Object.keys(obj).reduce((acc, current) => { 13 | const currentValue = obj[current]; 14 | 15 | if (current === 'conditions') { 16 | acc[current] = currentValue; 17 | 18 | return acc; 19 | } 20 | 21 | if (isObject(currentValue)) { 22 | return { ...acc, [current]: updateValues(currentValue, valueToSet) }; 23 | } 24 | 25 | acc[current] = valueToSet; 26 | 27 | return acc; 28 | }, {}); 29 | }; 30 | 31 | export default updateValues; 32 | -------------------------------------------------------------------------------- /.cache/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/PluginsAndSettings/SubCategory/utils/constants.js: -------------------------------------------------------------------------------- 1 | const IS_DISABLED = true; 2 | 3 | export default IS_DISABLED; 4 | -------------------------------------------------------------------------------- /.cache/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/PluginsAndSettings/SubCategory/utils/getConditionsButtonState.js: -------------------------------------------------------------------------------- 1 | import { createArrayOfValues } from '../../../utils'; 2 | 3 | const getConditionsButtonState = valueObj => { 4 | const relatedData = Object.entries(valueObj).reduce((acc, current) => { 5 | const [catName, { conditions }] = current; 6 | 7 | acc[catName] = conditions; 8 | 9 | return acc; 10 | }, {}); 11 | 12 | const arrayOfValues = createArrayOfValues(relatedData); 13 | 14 | return arrayOfValues.some(val => val); 15 | }; 16 | 17 | export default getConditionsButtonState; 18 | -------------------------------------------------------------------------------- /.cache/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/PluginsAndSettings/SubCategory/utils/index.js: -------------------------------------------------------------------------------- 1 | export { default as formatActions } from './formatActions'; 2 | export { default as getConditionsButtonState } from './getConditionsButtonState'; 3 | -------------------------------------------------------------------------------- /.cache/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/RequiredSign/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import styled from 'styled-components'; 3 | 4 | const Required = styled.span` 5 | color: ${({ theme }) => theme.colors.danger700}; 6 | padding-left: ${({ theme }) => theme.spaces[1]}px; 7 | `; 8 | 9 | const RequiredSign = () => *; 10 | 11 | export default RequiredSign; 12 | -------------------------------------------------------------------------------- /.cache/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/index.js: -------------------------------------------------------------------------------- 1 | export { default as Permissions } from './Permissions'; 2 | export { default as RoleForm } from './RoleForm'; 3 | -------------------------------------------------------------------------------- /.cache/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/utils/createArrayOfValues.js: -------------------------------------------------------------------------------- 1 | import { flattenDeep, isObject } from 'lodash'; 2 | 3 | const createArrayOfValues = obj => { 4 | if (!isObject(obj)) { 5 | return []; 6 | } 7 | 8 | return flattenDeep( 9 | Object.values(obj).map(value => { 10 | if (isObject(value)) { 11 | return createArrayOfValues(value); 12 | } 13 | 14 | return value; 15 | }) 16 | ); 17 | }; 18 | 19 | export default createArrayOfValues; 20 | -------------------------------------------------------------------------------- /.cache/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/utils/getCheckboxState.js: -------------------------------------------------------------------------------- 1 | import createArrayOfValues from './createArrayOfValues'; 2 | import removeConditionKeyFromData from './removeConditionKeyFromData'; 3 | 4 | const getCheckboxState = dataObj => { 5 | const dataWithoutCondition = removeConditionKeyFromData(dataObj); 6 | 7 | const arrayOfValues = createArrayOfValues(dataWithoutCondition); 8 | 9 | if (!arrayOfValues.length) { 10 | return { hasAllActionsSelected: false, hasSomeActionsSelected: false }; 11 | } 12 | 13 | const hasAllActionsSelected = arrayOfValues.every(val => val); 14 | const hasSomeActionsSelected = arrayOfValues.some(val => val) && !hasAllActionsSelected; 15 | 16 | return { hasAllActionsSelected, hasSomeActionsSelected }; 17 | }; 18 | 19 | export default getCheckboxState; 20 | -------------------------------------------------------------------------------- /.cache/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/utils/index.js: -------------------------------------------------------------------------------- 1 | export { default as getCheckboxState } from './getCheckboxState'; 2 | export { default as createArrayOfValues } from './createArrayOfValues'; 3 | export { default as removeConditionKeyFromData } from './removeConditionKeyFromData'; 4 | -------------------------------------------------------------------------------- /.cache/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/utils/removeConditionKeyFromData.js: -------------------------------------------------------------------------------- 1 | const removeConditionKeyFromData = obj => { 2 | if (!obj) { 3 | return null; 4 | } 5 | 6 | return Object.keys(obj).reduce((acc, current) => { 7 | if (current !== 'conditions') { 8 | acc[current] = obj[current]; 9 | } 10 | 11 | return acc; 12 | }, {}); 13 | }; 14 | 15 | export default removeConditionKeyFromData; 16 | -------------------------------------------------------------------------------- /.cache/admin/src/pages/SettingsPage/pages/Roles/EditPage/utils/schema.js: -------------------------------------------------------------------------------- 1 | import * as yup from 'yup'; 2 | import { translatedErrors } from '@strapi/helper-plugin'; 3 | 4 | const schema = yup.object().shape({ 5 | name: yup.string().required(translatedErrors.required), 6 | }); 7 | 8 | export default schema; 9 | -------------------------------------------------------------------------------- /.cache/admin/src/pages/SettingsPage/pages/Roles/ListPage/components/EmptyRole/index.js: -------------------------------------------------------------------------------- 1 | export default () => 'todo empty role'; 2 | -------------------------------------------------------------------------------- /.cache/admin/src/pages/SettingsPage/pages/Roles/ProtectedEditPage/index.js: -------------------------------------------------------------------------------- 1 | import React, { useMemo } from 'react'; 2 | import { useRBAC, LoadingIndicatorPage } from '@strapi/helper-plugin'; 3 | import { Redirect } from 'react-router-dom'; 4 | import adminPermissions from '../../../../../permissions'; 5 | import EditPage from '../EditPage'; 6 | 7 | const ProtectedEditPage = () => { 8 | const permissions = useMemo(() => { 9 | return { 10 | read: adminPermissions.settings.roles.read, 11 | update: adminPermissions.settings.roles.update, 12 | }; 13 | }, []); 14 | 15 | const { 16 | isLoading, 17 | allowedActions: { canRead, canUpdate }, 18 | } = useRBAC(permissions); 19 | 20 | if (isLoading) { 21 | return ; 22 | } 23 | 24 | if (!canRead && !canUpdate) { 25 | return ; 26 | } 27 | 28 | return ; 29 | }; 30 | 31 | export default ProtectedEditPage; 32 | -------------------------------------------------------------------------------- /.cache/admin/src/pages/SettingsPage/pages/Roles/ProtectedListPage/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { CheckPagePermissions } from '@strapi/helper-plugin'; 3 | import adminPermissions from '../../../../../permissions'; 4 | import ListPage from '../ListPage'; 5 | 6 | const ProtectedListPage = () => ( 7 | 8 | 9 | 10 | ); 11 | 12 | export default ProtectedListPage; 13 | -------------------------------------------------------------------------------- /.cache/admin/src/pages/SettingsPage/pages/Users/EditPage/utils/api.js: -------------------------------------------------------------------------------- 1 | import { axiosInstance } from '../../../../../../core/utils'; 2 | 3 | const fetchUser = async id => { 4 | const { data } = await axiosInstance.get(`/admin/users/${id}`); 5 | 6 | return data.data; 7 | }; 8 | 9 | const putUser = async (id, body) => { 10 | const { data } = await axiosInstance.put(`/admin/users/${id}`, body); 11 | 12 | return data.data; 13 | }; 14 | 15 | export { fetchUser, putUser }; 16 | -------------------------------------------------------------------------------- /.cache/admin/src/pages/SettingsPage/pages/Users/ListPage/ModalForm/utils/formDataModel.js: -------------------------------------------------------------------------------- 1 | const formDataModel = { 2 | firstname: '', 3 | lastname: '', 4 | email: '', 5 | roles: [], 6 | }; 7 | 8 | export default formDataModel; 9 | -------------------------------------------------------------------------------- /.cache/admin/src/pages/SettingsPage/pages/Users/ListPage/ModalForm/utils/roleSettingsForm.js: -------------------------------------------------------------------------------- 1 | const form = []; 2 | 3 | export default form; 4 | -------------------------------------------------------------------------------- /.cache/admin/src/pages/SettingsPage/pages/Users/ListPage/ModalForm/utils/schema.js: -------------------------------------------------------------------------------- 1 | import * as yup from 'yup'; 2 | import { translatedErrors } from '@strapi/helper-plugin'; 3 | 4 | const schema = yup.object().shape({ 5 | firstname: yup.string().required(translatedErrors.required), 6 | lastname: yup.string(), 7 | email: yup 8 | .string() 9 | .email(translatedErrors.email) 10 | .required(translatedErrors.required), 11 | roles: yup 12 | .array() 13 | .min(1, translatedErrors.required) 14 | .required(translatedErrors.required), 15 | }); 16 | 17 | export default schema; 18 | -------------------------------------------------------------------------------- /.cache/admin/src/pages/SettingsPage/pages/Users/ListPage/ModalForm/utils/stepper.js: -------------------------------------------------------------------------------- 1 | const stepper = { 2 | create: { 3 | buttonSubmitLabel: { 4 | id: 'app.containers.Users.ModalForm.footer.button-success', 5 | defaultMessage: 'Invite user', 6 | }, 7 | isDisabled: false, 8 | next: 'magic-link', 9 | }, 10 | 'magic-link': { 11 | buttonSubmitLabel: { id: 'global.finish', defaultMessage: 'Finish' }, 12 | isDisabled: true, 13 | next: null, 14 | }, 15 | }; 16 | 17 | export default stepper; 18 | -------------------------------------------------------------------------------- /.cache/admin/src/pages/SettingsPage/pages/Users/ListPage/utils/api.js: -------------------------------------------------------------------------------- 1 | import { axiosInstance } from '../../../../../../core/utils'; 2 | 3 | const fetchData = async (search, notify) => { 4 | const { 5 | data: { data }, 6 | } = await axiosInstance.get(`/admin/users${search}`); 7 | 8 | notify(); 9 | 10 | return data; 11 | }; 12 | 13 | const deleteData = async ids => { 14 | await axiosInstance.post('/admin/users/batch-delete', { ids }); 15 | }; 16 | 17 | export { deleteData, fetchData }; 18 | -------------------------------------------------------------------------------- /.cache/admin/src/pages/SettingsPage/pages/Users/ListPage/utils/displayedFilters.js: -------------------------------------------------------------------------------- 1 | const displayedFilters = [ 2 | { 3 | name: 'firstname', 4 | metadatas: { label: 'Firstname' }, 5 | fieldSchema: { type: 'string' }, 6 | }, 7 | { 8 | name: 'lastname', 9 | metadatas: { label: 'Lastname' }, 10 | fieldSchema: { type: 'string' }, 11 | }, 12 | { 13 | name: 'email', 14 | metadatas: { label: 'Email' }, 15 | fieldSchema: { type: 'email' }, 16 | }, 17 | { 18 | name: 'username', 19 | metadatas: { label: 'Username' }, 20 | fieldSchema: { type: 'string' }, 21 | }, 22 | { 23 | name: 'isActive', 24 | metadatas: { label: 'Active user' }, 25 | fieldSchema: { type: 'boolean' }, 26 | }, 27 | ]; 28 | 29 | export default displayedFilters; 30 | -------------------------------------------------------------------------------- /.cache/admin/src/pages/SettingsPage/pages/Users/ProtectedListPage/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { CheckPagePermissions } from '@strapi/helper-plugin'; 3 | import adminPermissions from '../../../../../permissions'; 4 | import ListPage from '../ListPage'; 5 | 6 | const ProtectedListPage = () => ( 7 | 8 | 9 | 10 | ); 11 | 12 | export default ProtectedListPage; 13 | -------------------------------------------------------------------------------- /.cache/admin/src/pages/SettingsPage/pages/Users/components/MagicLink/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { useIntl } from 'react-intl'; 3 | import PropTypes from 'prop-types'; 4 | import basename from '../../../../../../core/utils/basename'; 5 | import MagicLinkWrapper from './MagicLinkWrapper'; 6 | 7 | const MagicLink = ({ registrationToken }) => { 8 | const { formatMessage } = useIntl(); 9 | const target = `${window.location.origin}${basename}auth/register?registrationToken=${registrationToken}`; 10 | 11 | return ( 12 | 13 | {formatMessage({ 14 | id: 'app.components.Users.MagicLink.connect', 15 | defaultMessage: 'Copy and share this link to give access to this user', 16 | })} 17 | 18 | ); 19 | }; 20 | 21 | MagicLink.defaultProps = { 22 | registrationToken: '', 23 | }; 24 | 25 | MagicLink.propTypes = { 26 | registrationToken: PropTypes.string, 27 | }; 28 | 29 | export default MagicLink; 30 | -------------------------------------------------------------------------------- /.cache/admin/src/pages/SettingsPage/pages/Users/utils/validations/users/edit.js: -------------------------------------------------------------------------------- 1 | import * as yup from 'yup'; 2 | import { commonUserSchema } from './profile'; 3 | import rolesValidation from './roles'; 4 | 5 | const schema = yup.object().shape({ 6 | ...commonUserSchema, 7 | isActive: yup.bool(), 8 | ...rolesValidation, 9 | }); 10 | 11 | export default schema; 12 | -------------------------------------------------------------------------------- /.cache/admin/src/pages/SettingsPage/pages/Users/utils/validations/users/index.js: -------------------------------------------------------------------------------- 1 | export { default as editValidation } from './edit'; 2 | export { default as profileValidation } from './profile'; 3 | export { default as rolesValidation } from './roles'; 4 | -------------------------------------------------------------------------------- /.cache/admin/src/pages/SettingsPage/pages/Users/utils/validations/users/roles.js: -------------------------------------------------------------------------------- 1 | import * as yup from 'yup'; 2 | import { translatedErrors } from '@strapi/helper-plugin'; 3 | 4 | const schema = { 5 | roles: yup 6 | .array() 7 | .min(1, translatedErrors.required) 8 | .required(translatedErrors.required), 9 | }; 10 | 11 | export default schema; 12 | -------------------------------------------------------------------------------- /.cache/admin/src/pages/SettingsPage/pages/Webhooks/EditView/components/EventInput/utils/formatValue.js: -------------------------------------------------------------------------------- 1 | const formatValue = value => 2 | value.reduce((acc, curr) => { 3 | const key = curr.split('.')[0]; 4 | 5 | if (!acc[key]) { 6 | acc[key] = []; 7 | } 8 | acc[key].push(curr); 9 | 10 | return acc; 11 | }, {}); 12 | 13 | export default formatValue; 14 | -------------------------------------------------------------------------------- /.cache/admin/src/pages/SettingsPage/pages/Webhooks/EditView/components/HeadersInput/keys.js: -------------------------------------------------------------------------------- 1 | const keys = [ 2 | 'A-IM', 3 | 'Accept', 4 | 'Accept-Charset', 5 | 'Accept-Encoding', 6 | 'Accept-Language', 7 | 'Accept-Datetime', 8 | 'Access-Control-Request-Method', 9 | 'Access-Control-Request-Headers', 10 | 'Authorization', 11 | 'Cache-Control', 12 | 'Connection', 13 | 'Content-Length', 14 | 'Content-Type', 15 | 'Cookie', 16 | 'Date', 17 | 'Expect', 18 | 'Forwarded', 19 | 'From', 20 | 'Host', 21 | 'If-Match', 22 | 'If-Modified-Since', 23 | 'If-None-Match', 24 | 'If-Range', 25 | 'If-Unmodified-Since', 26 | 'Max-Forwards', 27 | 'Origin', 28 | 'Pragma', 29 | 'Proxy-Authorization', 30 | 'Range', 31 | 'Referer', 32 | 'TE', 33 | 'User-Agent', 34 | 'Upgrade', 35 | 'Via', 36 | 'Warning', 37 | ]; 38 | 39 | export default keys; 40 | -------------------------------------------------------------------------------- /.cache/admin/src/pages/SettingsPage/pages/Webhooks/EditView/components/utils/fieldsRegex.js: -------------------------------------------------------------------------------- 1 | const NAME_REGEX = new RegExp('(^$)|(^[A-Za-z][_0-9A-Za-z ]*$)'); 2 | const URL_REGEX = new RegExp('(^$)|((https?://.*)(d*)/?(.*))'); 3 | 4 | export { NAME_REGEX, URL_REGEX }; 5 | -------------------------------------------------------------------------------- /.cache/admin/src/pages/SettingsPage/pages/Webhooks/EditView/utils/formatData.js: -------------------------------------------------------------------------------- 1 | import { set } from 'lodash'; 2 | 3 | const cleanData = data => { 4 | const webhooks = { ...data }; 5 | 6 | set(webhooks, 'headers', unformatHeaders(data.headers)); 7 | 8 | return webhooks; 9 | }; 10 | 11 | const unformatHeaders = headers => { 12 | return headers.reduce((acc, current) => { 13 | const { key, value } = current; 14 | 15 | if (key !== '') { 16 | return { 17 | ...acc, 18 | [key]: value, 19 | }; 20 | } 21 | 22 | return acc; 23 | }, {}); 24 | }; 25 | 26 | export default cleanData; 27 | -------------------------------------------------------------------------------- /.cache/admin/src/pages/SettingsPage/pages/Webhooks/ProtectedCreateView/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { CheckPagePermissions } from '@strapi/helper-plugin'; 3 | import adminPermissions from '../../../../../permissions'; 4 | import EditView from '../EditView'; 5 | 6 | const ProtectedCreateView = () => ( 7 | 8 | 9 | 10 | ); 11 | 12 | export default ProtectedCreateView; 13 | -------------------------------------------------------------------------------- /.cache/admin/src/pages/SettingsPage/pages/Webhooks/ProtectedEditView/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { CheckPagePermissions } from '@strapi/helper-plugin'; 3 | import adminPermissions from '../../../../../permissions'; 4 | import EditView from '../EditView'; 5 | 6 | const ProtectedEditView = () => ( 7 | 8 | 9 | 10 | ); 11 | 12 | export default ProtectedEditView; 13 | -------------------------------------------------------------------------------- /.cache/admin/src/pages/SettingsPage/pages/Webhooks/ProtectedListView/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { CheckPagePermissions } from '@strapi/helper-plugin'; 3 | import adminPermissions from '../../../../../permissions'; 4 | import ListView from '../ListView'; 5 | 6 | const ProtectedListView = () => ( 7 | 8 | 9 | 10 | ); 11 | 12 | export default ProtectedListView; 13 | -------------------------------------------------------------------------------- /.cache/admin/src/pages/SettingsPage/utils/createSectionsRoutes.js: -------------------------------------------------------------------------------- 1 | import flatMap from 'lodash/flatMap'; 2 | import { createRoute } from '../../../utils'; 3 | 4 | const createSectionsRoutes = settings => { 5 | const allLinks = flatMap(settings, section => section.links); 6 | 7 | return allLinks.map(link => createRoute(link.Component, link.to, link.exact || false)); 8 | }; 9 | 10 | export default createSectionsRoutes; 11 | -------------------------------------------------------------------------------- /.cache/admin/src/pages/SettingsPage/utils/customRoutes.js: -------------------------------------------------------------------------------- 1 | const customRoutes = []; 2 | 3 | export default customRoutes; 4 | -------------------------------------------------------------------------------- /.cache/admin/src/pages/SettingsPage/utils/getSectionsToDisplay.js: -------------------------------------------------------------------------------- 1 | const getSectionsToDisplay = menu => { 2 | return menu.filter(section => !section.links.every(link => link.isDisplayed === false)); 3 | }; 4 | 5 | export default getSectionsToDisplay; 6 | -------------------------------------------------------------------------------- /.cache/admin/src/pages/SettingsPage/utils/index.js: -------------------------------------------------------------------------------- 1 | export { default as createSectionsRoutes } from './createSectionsRoutes'; 2 | export { default as getSectionsToDisplay } from './getSectionsToDisplay'; 3 | 4 | export { default as routes } from './routes'; 5 | -------------------------------------------------------------------------------- /.cache/admin/src/pages/SettingsPage/utils/routes.js: -------------------------------------------------------------------------------- 1 | // This file makes it easier to make the difference between the ee and ce version 2 | import customRoutes from 'ee_else_ce/pages/SettingsPage/utils/customRoutes'; 3 | import defaultRoutes from './defaultRoutes'; 4 | 5 | export default [...customRoutes, ...defaultRoutes]; 6 | -------------------------------------------------------------------------------- /.cache/admin/src/permissions/customPermissions.js: -------------------------------------------------------------------------------- 1 | export default {}; 2 | -------------------------------------------------------------------------------- /.cache/admin/src/permissions/index.js: -------------------------------------------------------------------------------- 1 | import { merge } from 'lodash'; 2 | import customPermissions from 'ee_else_ce/permissions/customPermissions'; 3 | import defaultPermissions from './defaultPermissions'; 4 | 5 | const permissions = merge(defaultPermissions, customPermissions); 6 | 7 | export default permissions; 8 | -------------------------------------------------------------------------------- /.cache/admin/src/plugins.js: -------------------------------------------------------------------------------- 1 | 2 | import contentTypeBuilder from '../../../node_modules/@strapi/plugin-content-type-builder/strapi-admin.js'; 3 | import email from '../../../node_modules/@strapi/plugin-email/strapi-admin.js'; 4 | import upload from '../../../node_modules/@strapi/plugin-upload/strapi-admin.js'; 5 | import i18N from '../../../node_modules/@strapi/plugin-i18n/strapi-admin.js'; 6 | import usersPermissions from '../../../node_modules/@strapi/plugin-users-permissions/strapi-admin.js'; 7 | 8 | 9 | const plugins = { 10 | 'content-type-builder': contentTypeBuilder, 11 | 'email': email, 12 | 'upload': upload, 13 | 'i18n': i18N, 14 | 'users-permissions': usersPermissions, 15 | }; 16 | 17 | export default plugins; 18 | -------------------------------------------------------------------------------- /.cache/admin/src/shared/components/InjectionZone/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import PropTypes from 'prop-types'; 3 | import { useInjectionZone } from '../../hooks'; 4 | 5 | const InjectionZone = ({ area, ...props }) => { 6 | const compos = useInjectionZone(area); 7 | 8 | return compos.map(compo => ); 9 | }; 10 | 11 | InjectionZone.propTypes = { 12 | area: PropTypes.string.isRequired, 13 | }; 14 | 15 | export default InjectionZone; 16 | -------------------------------------------------------------------------------- /.cache/admin/src/shared/components/index.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line import/prefer-default-export 2 | export { default as InjectionZone } from './InjectionZone'; 3 | -------------------------------------------------------------------------------- /.cache/admin/src/shared/hooks/index.js: -------------------------------------------------------------------------------- 1 | export { default as useAdminProvider } from './useAdminProvider'; 2 | export { default as useInjectionZone } from './useInjectionZone'; 3 | -------------------------------------------------------------------------------- /.cache/admin/src/shared/hooks/useAdminProvider/index.js: -------------------------------------------------------------------------------- 1 | import { useContext } from 'react'; 2 | import { AdminContext } from '../../../contexts'; 3 | 4 | const useAdminProvider = () => { 5 | const context = useContext(AdminContext); 6 | 7 | return context; 8 | }; 9 | 10 | export default useAdminProvider; 11 | -------------------------------------------------------------------------------- /.cache/admin/src/shared/hooks/useInjectionZone/index.js: -------------------------------------------------------------------------------- 1 | import useAdminProvider from '../useAdminProvider'; 2 | 3 | const useInjectionZone = area => { 4 | const { getAdminInjectedComponents } = useAdminProvider(); 5 | 6 | const [moduleName, page, position] = area.split('.'); 7 | 8 | return getAdminInjectedComponents(moduleName, page, position); 9 | }; 10 | 11 | export default useInjectionZone; 12 | -------------------------------------------------------------------------------- /.cache/admin/src/translations/languageNativeNames.js: -------------------------------------------------------------------------------- 1 | const languageNativeNames = { 2 | ar: 'العربية', 3 | ca: 'Català', 4 | cs: 'Čeština', 5 | de: 'Deutsch', 6 | dk: 'Dansk', 7 | en: 'English', 8 | es: 'Español', 9 | fr: 'Français', 10 | gu: 'Gujarati', 11 | he: 'עברית', 12 | hu: 'Magyar', 13 | id: 'Indonesian', 14 | it: 'Italiano', 15 | ja: '日本語', 16 | ko: '한국어', 17 | ml: 'Malayalam', 18 | ms: 'Melayu', 19 | nl: 'Nederlands', 20 | no: 'Norwegian', 21 | pl: 'Polski', 22 | 'pt-BR': 'Português (Brasil)', 23 | pt: 'Português (Portugal)', 24 | ru: 'Русский', 25 | sk: 'Slovenčina', 26 | sv: 'Swedish', 27 | th: 'ไทย', 28 | tr: 'Türkçe', 29 | uk: 'Українська', 30 | vi: 'Tiếng Việt', 31 | 'zh-Hans': '中文 (简体)', 32 | zh: '中文 (繁體)', 33 | sa: 'संस्कृत', 34 | hi: 'हिन्दी', 35 | }; 36 | 37 | export default languageNativeNames; 38 | -------------------------------------------------------------------------------- /.cache/admin/src/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "lib": [ 4 | "es2019", 5 | "es2020.promise", 6 | "es2020.bigint", 7 | "es2020.string", 8 | "DOM" 9 | ], 10 | "noImplicitAny": false, 11 | "module": "es2020", 12 | "target": "es5", 13 | "jsx": "react", 14 | "allowJs": true, 15 | "strict": true, 16 | "moduleResolution": "node", 17 | "skipLibCheck": true, 18 | "esModuleInterop": true, 19 | "allowSyntheticDefaultImports": true, 20 | "resolveJsonModule": true, 21 | "noEmit": false, 22 | "incremental": true 23 | }, 24 | "include": [ 25 | "../../../src/admin/*", 26 | "../../../src/**/**/admin/src/*" 27 | ], 28 | "exclude": [ 29 | "node_modules", 30 | "**/*.test.js", 31 | "*.js" 32 | ] 33 | } 34 | -------------------------------------------------------------------------------- /.cache/admin/src/utils/checkFormValidity.js: -------------------------------------------------------------------------------- 1 | import { getYupInnerErrors } from '@strapi/helper-plugin'; 2 | 3 | const checkFormValidity = async (data, schema) => { 4 | let errors = null; 5 | 6 | try { 7 | await schema.validate(data, { abortEarly: false }); 8 | } catch (err) { 9 | errors = getYupInnerErrors(err); 10 | } 11 | 12 | return errors; 13 | }; 14 | 15 | export default checkFormValidity; 16 | -------------------------------------------------------------------------------- /.cache/admin/src/utils/formatAPIErrors.js: -------------------------------------------------------------------------------- 1 | const formatAPIError = ({ data }) => { 2 | try { 3 | return Object.keys(data).reduce((acc, current) => { 4 | const errorMessage = data[current][0]; 5 | acc[current] = { 6 | id: errorMessage, 7 | defaultMessage: errorMessage, 8 | }; 9 | 10 | return acc; 11 | }, {}); 12 | } catch (err) { 13 | return {}; 14 | } 15 | }; 16 | 17 | export default formatAPIError; 18 | -------------------------------------------------------------------------------- /.cache/admin/src/utils/getAttributesToDisplay.js: -------------------------------------------------------------------------------- 1 | import { get } from 'lodash'; 2 | 3 | const getAttributesToDisplay = contentType => { 4 | const timestamps = get(contentType, ['options', 'timestamps']); 5 | 6 | // Sometimes timestamps is false 7 | let timestampsArray = Array.isArray(timestamps) ? timestamps : []; 8 | const idsAttributes = ['id', '_id']; // For both SQL and mongo 9 | const unwritableAttributes = [...idsAttributes, ...timestampsArray, 'publishedAt']; 10 | const schemaAttributes = get(contentType, ['attributes'], {}); 11 | 12 | return Object.keys(schemaAttributes).reduce((acc, current) => { 13 | if (!unwritableAttributes.includes(current)) { 14 | acc.push({ ...schemaAttributes[current], attributeName: current }); 15 | } 16 | 17 | return acc; 18 | }, []); 19 | }; 20 | 21 | export default getAttributesToDisplay; 22 | -------------------------------------------------------------------------------- /.cache/admin/src/utils/getFullName.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Get fullname from firstname+lastname joined with a space 3 | * Handle missing lastname 4 | * @param {string} firstname 5 | * @param {string} lastname 6 | */ 7 | export default (firstname, lastname = '') => { 8 | return [firstname, lastname].filter(str => str).join(' '); 9 | }; 10 | -------------------------------------------------------------------------------- /.cache/admin/src/utils/getRequestUrl.js: -------------------------------------------------------------------------------- 1 | const getRequestUrl = path => `/admin/${path}`; 2 | 3 | export default getRequestUrl; 4 | -------------------------------------------------------------------------------- /.cache/admin/src/utils/index.js: -------------------------------------------------------------------------------- 1 | export { default as checkFormValidity } from './checkFormValidity'; 2 | export { default as createRoute } from './createRoute'; 3 | export { default as formatAPIErrors } from './formatAPIErrors'; 4 | export { default as getAttributesToDisplay } from './getAttributesToDisplay'; 5 | export { default as makeUniqueRoutes } from './makeUniqueRoutes'; 6 | export { default as sortLinks } from './sortLinks'; 7 | export { default as getExistingActions } from './getExistingActions'; 8 | export { default as getRequestUrl } from './getRequestUrl'; 9 | export { default as getFullName } from './getFullName'; 10 | -------------------------------------------------------------------------------- /.cache/admin/src/utils/makeUniqueRoutes.js: -------------------------------------------------------------------------------- 1 | const makeUniqueRoutes = routes => 2 | routes.filter((route, index, refArray) => { 3 | return refArray.findIndex(obj => obj.key === route.key) === index; 4 | }); 5 | 6 | export default makeUniqueRoutes; 7 | -------------------------------------------------------------------------------- /.cache/admin/src/utils/sortLinks.js: -------------------------------------------------------------------------------- 1 | import { sortBy } from 'lodash'; 2 | 3 | const sortLinks = links => sortBy(links, object => object.name); 4 | 5 | export default sortLinks; 6 | -------------------------------------------------------------------------------- /.cache/ee/admin/hooks/index.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line import/prefer-default-export 2 | export { default as useAuthProviders } from './useAuthProviders'; 3 | -------------------------------------------------------------------------------- /.cache/ee/admin/hooks/useAuthProviders/reducer.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable consistent-return */ 2 | import produce from 'immer'; 3 | 4 | export const initialState = { 5 | data: [], 6 | isLoading: true, 7 | }; 8 | 9 | const reducer = (state, action) => 10 | produce(state, draftState => { 11 | switch (action.type) { 12 | case 'GET_DATA_SUCCEEDED': { 13 | draftState.data = action.data; 14 | draftState.isLoading = false; 15 | break; 16 | } 17 | case 'GET_DATA_ERROR': { 18 | draftState.isLoading = false; 19 | break; 20 | } 21 | default: 22 | return draftState; 23 | } 24 | }); 25 | 26 | export default reducer; 27 | -------------------------------------------------------------------------------- /.cache/ee/admin/hooks/useSettingsMenu/utils/customGlobalLinks.js: -------------------------------------------------------------------------------- 1 | import adminPermissions from '../../../../../admin/src/permissions'; 2 | 3 | const ssoGlobalRoutes = strapi.features.isEnabled(strapi.features.SSO) 4 | ? [ 5 | { 6 | intlLabel: { id: 'Settings.sso.title', defaultMessage: 'Single Sign-On' }, 7 | to: '/settings/single-sign-on', 8 | id: 'sso', 9 | isDisplayed: false, 10 | permissions: adminPermissions.settings.sso.main, 11 | }, 12 | ] 13 | : []; 14 | 15 | const customGlobalLinks = [...ssoGlobalRoutes]; 16 | 17 | export default customGlobalLinks; 18 | -------------------------------------------------------------------------------- /.cache/ee/admin/pages/App/utils/customRoutes.js: -------------------------------------------------------------------------------- 1 | import AuthResponse from '../../AuthResponse'; 2 | 3 | const customRoutes = [ 4 | { 5 | Component: () => ({ default: AuthResponse }), 6 | to: '/auth/login/:authResponse', 7 | exact: true, 8 | }, 9 | ]; 10 | 11 | export default customRoutes; 12 | -------------------------------------------------------------------------------- /.cache/ee/admin/pages/AuthPage/utils/forms.js: -------------------------------------------------------------------------------- 1 | import Providers from '../components/Providers'; 2 | import baseForms from '../../../../../admin/src/pages/AuthPage/utils/forms'; 3 | 4 | const forms = { 5 | ...baseForms, 6 | providers: { 7 | Component: Providers, 8 | endPoint: null, 9 | fieldsToDisable: [], 10 | fieldsToOmit: [], 11 | schema: null, 12 | inputsPrefix: '', 13 | }, 14 | }; 15 | 16 | export default forms; 17 | -------------------------------------------------------------------------------- /.cache/ee/admin/pages/SettingsPage/SingleSignOn/utils/schema.js: -------------------------------------------------------------------------------- 1 | import { translatedErrors } from '@strapi/helper-plugin'; 2 | import * as yup from 'yup'; 3 | 4 | const schema = yup.object().shape({ 5 | autoRegister: yup.bool().required(translatedErrors.required), 6 | defaultRole: yup.mixed().when('autoRegister', (value, initSchema) => { 7 | return value ? initSchema.required(translatedErrors.required) : initSchema.nullable(); 8 | }), 9 | }); 10 | 11 | export default schema; 12 | -------------------------------------------------------------------------------- /.cache/ee/admin/pages/SettingsPage/pages/Roles/CreatePage/utils/schema.js: -------------------------------------------------------------------------------- 1 | import * as yup from 'yup'; 2 | import { translatedErrors } from '@strapi/helper-plugin'; 3 | 4 | const schema = yup.object().shape({ 5 | name: yup.string().required(translatedErrors.required), 6 | description: yup.string().required(translatedErrors.required), 7 | }); 8 | 9 | export default schema; 10 | -------------------------------------------------------------------------------- /.cache/ee/admin/pages/SettingsPage/pages/Roles/EditPage/components/ConditionsModal/ActionRow/utils/constants.js: -------------------------------------------------------------------------------- 1 | const IS_DISABLED = false; 2 | 3 | export default IS_DISABLED; 4 | -------------------------------------------------------------------------------- /.cache/ee/admin/pages/SettingsPage/pages/Roles/EditPage/components/ConditionsModal/ConditionsSelect/MenuList/utils/constants.js: -------------------------------------------------------------------------------- 1 | const IS_DISABLED = false; 2 | 3 | export default IS_DISABLED; 4 | -------------------------------------------------------------------------------- /.cache/ee/admin/pages/SettingsPage/pages/Roles/EditPage/components/ContentTypeCollapse/Collapse/utils/constants.js: -------------------------------------------------------------------------------- 1 | const IS_DISABLED = false; 2 | 3 | export default IS_DISABLED; 4 | -------------------------------------------------------------------------------- /.cache/ee/admin/pages/SettingsPage/pages/Roles/EditPage/components/ContentTypeCollapse/CollapsePropertyMatrix/ActionRow/utils/constants.js: -------------------------------------------------------------------------------- 1 | const IS_DISABLED = false; 2 | 3 | export default IS_DISABLED; 4 | -------------------------------------------------------------------------------- /.cache/ee/admin/pages/SettingsPage/pages/Roles/EditPage/components/ContentTypeCollapse/CollapsePropertyMatrix/SubActionRow/utils/constants.js: -------------------------------------------------------------------------------- 1 | const IS_DISABLED = false; 2 | 3 | export default IS_DISABLED; 4 | -------------------------------------------------------------------------------- /.cache/ee/admin/pages/SettingsPage/pages/Roles/EditPage/components/GlobalActions/utils/constants.js: -------------------------------------------------------------------------------- 1 | const IS_DISABLED = false; 2 | 3 | export default IS_DISABLED; 4 | -------------------------------------------------------------------------------- /.cache/ee/admin/pages/SettingsPage/pages/Roles/EditPage/components/PluginsAndSettings/SubCategory/utils/constants.js: -------------------------------------------------------------------------------- 1 | const IS_DISABLED = false; 2 | 3 | export default IS_DISABLED; 4 | -------------------------------------------------------------------------------- /.cache/ee/admin/pages/SettingsPage/pages/Roles/ProtectedListPage/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { CheckPagePermissions } from '@strapi/helper-plugin'; 3 | import adminPermissions from '../../../../../../../admin/src/permissions'; 4 | import ListPage from '../ListPage'; 5 | 6 | const ProtectedListPage = () => ( 7 | 8 | 9 | 10 | ); 11 | 12 | export default ProtectedListPage; 13 | -------------------------------------------------------------------------------- /.cache/ee/admin/pages/SettingsPage/pages/Users/ListPage/ModalForm/utils/formDataModel.js: -------------------------------------------------------------------------------- 1 | import baseModel from '../../../../../../../../../admin/src/pages/SettingsPage/pages/Users/ListPage/ModalForm/utils/formDataModel'; 2 | 3 | const ssoInputsModel = strapi.features.isEnabled(strapi.features.SSO) 4 | ? { 5 | useSSORegistration: true, 6 | } 7 | : {}; 8 | 9 | const formDataModel = { 10 | ...baseModel, 11 | ...ssoInputsModel, 12 | }; 13 | 14 | export default formDataModel; 15 | -------------------------------------------------------------------------------- /.cache/ee/admin/pages/SettingsPage/pages/Users/ListPage/ModalForm/utils/roleSettingsForm.js: -------------------------------------------------------------------------------- 1 | const form = strapi.features.isEnabled(strapi.features.SSO) 2 | ? [ 3 | [ 4 | { 5 | intlLabel: { 6 | id: 'Settings.permissions.users.form.sso', 7 | defaultMessage: 'Connect with SSO', 8 | }, 9 | hint: { 10 | id: 'Settings.permissions.users.form.sso.description', 11 | defaultMessage: 'When enabled (ON), users can login via SSO', 12 | }, 13 | name: 'useSSORegistration', 14 | type: 'bool', 15 | size: { 16 | col: 6, 17 | xs: 12, 18 | }, 19 | }, 20 | ], 21 | ] 22 | : []; 23 | 24 | export default form; 25 | -------------------------------------------------------------------------------- /.cache/ee/admin/pages/SettingsPage/utils/customRoutes.js: -------------------------------------------------------------------------------- 1 | const ssoRoutes = strapi.features.isEnabled(strapi.features.SSO) 2 | ? [ 3 | { 4 | Component: async () => { 5 | const component = await import( 6 | /* webpackChunkName: "sso-settings-page" */ '../SingleSignOn' 7 | ); 8 | 9 | return component; 10 | }, 11 | to: '/settings/single-sign-on', 12 | exact: true, 13 | }, 14 | ] 15 | : []; 16 | 17 | const customRoutes = [...ssoRoutes]; 18 | 19 | export default customRoutes; 20 | -------------------------------------------------------------------------------- /.cache/ee/admin/permissions/customPermissions.js: -------------------------------------------------------------------------------- 1 | const customPermissions = { 2 | settings: { 3 | sso: { 4 | main: [{ action: 'admin::provider-login.read', subject: null }], 5 | read: [{ action: 'admin::provider-login.read', subject: null }], 6 | update: [{ action: 'admin::provider-login.update', subject: null }], 7 | }, 8 | }, 9 | }; 10 | 11 | export default customPermissions; 12 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | indent_style = space 5 | indent_size = 2 6 | end_of_line = lf 7 | charset = utf-8 8 | trim_trailing_whitespace = true 9 | insert_final_newline = true 10 | 11 | [{package.json,*.yml}] 12 | indent_style = space 13 | indent_size = 2 14 | 15 | [*.md] 16 | trim_trailing_whitespace = false 17 | -------------------------------------------------------------------------------- /.env: -------------------------------------------------------------------------------- 1 | HOST=0.0.0.0 2 | PORT=1337 3 | APP_KEYS=7flFy/nJVPZ4prTLIjCtFg==,Cw/4Nk9OBLMHFNR8IHvrsA==,NPdB+COp36zWBiFik/f15Q==,8byVkDg349AJgH3vhGE+eg== 4 | API_TOKEN_SALT=/lWhLGcodJKAkZXu6tmemg== 5 | ADMIN_JWT_SECRET=TwiVxIVTpFuRqiWrHwxNUA== 6 | JWT_SECRET=LW867h1iiPqBn1eQzPJJ0w== 7 | -------------------------------------------------------------------------------- /.env.example: -------------------------------------------------------------------------------- 1 | HOST=0.0.0.0 2 | PORT=1337 3 | APP_KEYS="toBeModified1,toBeModified2" -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | .cache 2 | build 3 | **/node_modules/** 4 | -------------------------------------------------------------------------------- /.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "parser": "babel-eslint", 3 | "extends": "eslint:recommended", 4 | "env": { 5 | "commonjs": true, 6 | "es6": true, 7 | "node": true, 8 | "browser": false 9 | }, 10 | "parserOptions": { 11 | "ecmaFeatures": { 12 | "experimentalObjectRestSpread": true, 13 | "jsx": false 14 | }, 15 | "sourceType": "module" 16 | }, 17 | "globals": { 18 | "strapi": true 19 | }, 20 | "rules": { 21 | "indent": ["error", 2, { "SwitchCase": 1 }], 22 | "linebreak-style": ["error", "unix"], 23 | "no-console": 0, 24 | "quotes": ["error", "single"], 25 | "semi": ["error", "always"] 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /.tmp/data.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/czm1290433700/nextjs-cms/4dd61244e54813d48e740d4e3c6f9c91c5b22ba4/.tmp/data.db -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # A demo for 《SSR 实战:官网开发指南》 - CMS 2 | 3 | 掘金小册《SSR 实战:官网开发指南》实战篇数据层 CMS demo 4 | 5 | ## 登录 6 | 7 | 管理员账号 8 | 账号:min 9 | 邮箱:demo@qq.com 10 | 密码:m123456M 11 | 12 | ## 项目启动 13 | 14 | node 版本 >= 16 15 | 16 | ``` 17 | npm install 18 | npm run develop 19 | ``` 20 | 21 | ## 注意事项 22 | 为方便还原课程配置内容,.tmp及.cache等数据缓存信息一并提交,正常项目使用可在 .gitignore 中忽略该两项的变更 23 | -------------------------------------------------------------------------------- /config/admin.js: -------------------------------------------------------------------------------- 1 | module.exports = ({ env }) => ({ 2 | auth: { 3 | secret: env('ADMIN_JWT_SECRET', '4f0dbbeb816561c16d8b36102bae9c09'), 4 | }, 5 | }); 6 | -------------------------------------------------------------------------------- /config/api.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | rest: { 3 | defaultLimit: 25, 4 | maxLimit: 100, 5 | withCount: true, 6 | }, 7 | }; 8 | -------------------------------------------------------------------------------- /config/database.js: -------------------------------------------------------------------------------- 1 | const path = require('path'); 2 | 3 | module.exports = ({ env }) => ({ 4 | connection: { 5 | client: 'sqlite', 6 | connection: { 7 | filename: path.join(__dirname, '..', env('DATABASE_FILENAME', '.tmp/data.db')), 8 | }, 9 | useNullAsDefault: true, 10 | }, 11 | }); 12 | -------------------------------------------------------------------------------- /config/middlewares.js: -------------------------------------------------------------------------------- 1 | module.exports = [ 2 | "strapi::errors", 3 | "strapi::security", 4 | { 5 | name: "strapi::cors", 6 | config: { 7 | enabled: true, 8 | headers: "*", 9 | origin: ["http://localhost:1337", "http://localhost:3000"], 10 | }, 11 | }, 12 | "strapi::poweredBy", 13 | "strapi::logger", 14 | "strapi::query", 15 | "strapi::body", 16 | "strapi::session", 17 | "strapi::favicon", 18 | "strapi::public", 19 | ]; 20 | -------------------------------------------------------------------------------- /config/server.js: -------------------------------------------------------------------------------- 1 | module.exports = ({ env }) => ({ 2 | host: env('HOST', '0.0.0.0'), 3 | port: env.int('PORT', 1337), 4 | app: { 5 | keys: env.array('APP_KEYS'), 6 | }, 7 | }); 8 | -------------------------------------------------------------------------------- /favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/czm1290433700/nextjs-cms/4dd61244e54813d48e740d4e3c6f9c91c5b22ba4/favicon.ico -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "nextjs-cms", 3 | "private": true, 4 | "version": "0.1.0", 5 | "description": "A Strapi application", 6 | "scripts": { 7 | "develop": "strapi develop", 8 | "start": "strapi start", 9 | "build": "strapi build", 10 | "strapi": "strapi" 11 | }, 12 | "dependencies": { 13 | "@strapi/plugin-i18n": "4.3.0", 14 | "@strapi/plugin-users-permissions": "4.3.0", 15 | "@strapi/strapi": "4.3.0", 16 | "better-sqlite3": "7.4.6", 17 | "strapi-plugin-populate-deep": "^0.1.2" 18 | }, 19 | "author": { 20 | "name": "A Strapi developer" 21 | }, 22 | "strapi": { 23 | "uuid": "c6617d60-e810-46e6-8ee5-2b72966d6c43" 24 | }, 25 | "engines": { 26 | "node": ">=12.x.x <=16.x.x", 27 | "npm": ">=6.0.0" 28 | }, 29 | "license": "MIT" 30 | } 31 | -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | # To prevent search engines from seeing the site altogether, uncomment the next two lines: 2 | # User-Agent: * 3 | # Disallow: / 4 | -------------------------------------------------------------------------------- /public/uploads/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/czm1290433700/nextjs-cms/4dd61244e54813d48e740d4e3c6f9c91c5b22ba4/public/uploads/.gitkeep -------------------------------------------------------------------------------- /public/uploads/_ff757e3a9c.jfif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/czm1290433700/nextjs-cms/4dd61244e54813d48e740d4e3c6f9c91c5b22ba4/public/uploads/_ff757e3a9c.jfif -------------------------------------------------------------------------------- /public/uploads/code_67191e1aba.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/czm1290433700/nextjs-cms/4dd61244e54813d48e740d4e3c6f9c91c5b22ba4/public/uploads/code_67191e1aba.png -------------------------------------------------------------------------------- /public/uploads/f44d305ea48e246a61a00e_0d6d1a5594.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/czm1290433700/nextjs-cms/4dd61244e54813d48e740d4e3c6f9c91c5b22ba4/public/uploads/f44d305ea48e246a61a00e_0d6d1a5594.jpg -------------------------------------------------------------------------------- /public/uploads/medium_f44d305ea48e246a61a00e_0d6d1a5594.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/czm1290433700/nextjs-cms/4dd61244e54813d48e740d4e3c6f9c91c5b22ba4/public/uploads/medium_f44d305ea48e246a61a00e_0d6d1a5594.jpg -------------------------------------------------------------------------------- /public/uploads/small__ff757e3a9c.jfif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/czm1290433700/nextjs-cms/4dd61244e54813d48e740d4e3c6f9c91c5b22ba4/public/uploads/small__ff757e3a9c.jfif -------------------------------------------------------------------------------- /public/uploads/small_f44d305ea48e246a61a00e_0d6d1a5594.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/czm1290433700/nextjs-cms/4dd61244e54813d48e740d4e3c6f9c91c5b22ba4/public/uploads/small_f44d305ea48e246a61a00e_0d6d1a5594.jpg -------------------------------------------------------------------------------- /public/uploads/thumbnail__ff757e3a9c.jfif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/czm1290433700/nextjs-cms/4dd61244e54813d48e740d4e3c6f9c91c5b22ba4/public/uploads/thumbnail__ff757e3a9c.jfif -------------------------------------------------------------------------------- /public/uploads/thumbnail_f44d305ea48e246a61a00e_0d6d1a5594.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/czm1290433700/nextjs-cms/4dd61244e54813d48e740d4e3c6f9c91c5b22ba4/public/uploads/thumbnail_f44d305ea48e246a61a00e_0d6d1a5594.jpg -------------------------------------------------------------------------------- /src/admin/app.example.js: -------------------------------------------------------------------------------- 1 | const config = { 2 | locales: [ 3 | // 'ar', 4 | // 'fr', 5 | // 'cs', 6 | // 'de', 7 | // 'dk', 8 | // 'es', 9 | // 'he', 10 | // 'id', 11 | // 'it', 12 | // 'ja', 13 | // 'ko', 14 | // 'ms', 15 | // 'nl', 16 | // 'no', 17 | // 'pl', 18 | // 'pt-BR', 19 | // 'pt', 20 | // 'ru', 21 | // 'sk', 22 | // 'sv', 23 | // 'th', 24 | // 'tr', 25 | // 'uk', 26 | // 'vi', 27 | // 'zh-Hans', 28 | // 'zh', 29 | ], 30 | }; 31 | 32 | const bootstrap = app => { 33 | console.log(app); 34 | }; 35 | 36 | export default { 37 | config, 38 | bootstrap, 39 | }; 40 | -------------------------------------------------------------------------------- /src/admin/webpack.config.example.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /* eslint-disable no-unused-vars */ 4 | module.exports = (config, webpack) => { 5 | // Note: we provide webpack above so you should not `require` it 6 | // Perform customizations to webpack config 7 | // Important: return the modified config 8 | return config; 9 | }; 10 | -------------------------------------------------------------------------------- /src/api/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/czm1290433700/nextjs-cms/4dd61244e54813d48e740d4e3c6f9c91c5b22ba4/src/api/.gitkeep -------------------------------------------------------------------------------- /src/api/article-info/content-types/article-info/schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "kind": "collectionType", 3 | "collectionName": "article_infos", 4 | "info": { 5 | "singularName": "article-info", 6 | "pluralName": "article-infos", 7 | "displayName": "articleInfo" 8 | }, 9 | "options": { 10 | "draftAndPublish": true 11 | }, 12 | "pluginOptions": {}, 13 | "attributes": { 14 | "title": { 15 | "type": "string" 16 | }, 17 | "author": { 18 | "type": "string" 19 | }, 20 | "description": { 21 | "type": "string" 22 | }, 23 | "createTime": { 24 | "type": "date" 25 | }, 26 | "content": { 27 | "type": "richtext" 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/api/article-info/controllers/article-info.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | const { removeTime, removeAttrsAndId } = require("../../../utils/index.js"); 3 | 4 | /** 5 | * article-info controller 6 | */ 7 | 8 | const { createCoreController } = require("@strapi/strapi").factories; 9 | 10 | module.exports = createCoreController( 11 | "api::article-info.article-info", 12 | ({ strapi }) => ({ 13 | async find(ctx) { 14 | const { data, meta } = await super.find(ctx); 15 | return { data: removeAttrsAndId(removeTime(data)), meta }; 16 | }, 17 | async findOne(ctx) { 18 | const { data, meta } = await super.findOne(ctx); 19 | return removeAttrsAndId(removeTime(data)); 20 | }, 21 | }) 22 | ); 23 | -------------------------------------------------------------------------------- /src/api/article-info/routes/article-info.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /** 4 | * article-info router. 5 | */ 6 | 7 | const { createCoreRouter } = require('@strapi/strapi').factories; 8 | 9 | module.exports = createCoreRouter('api::article-info.article-info'); 10 | -------------------------------------------------------------------------------- /src/api/article-info/services/article-info.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /** 4 | * article-info service. 5 | */ 6 | 7 | const { createCoreService } = require('@strapi/strapi').factories; 8 | 9 | module.exports = createCoreService('api::article-info.article-info'); 10 | -------------------------------------------------------------------------------- /src/api/article-introduction/content-types/article-introduction/schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "kind": "collectionType", 3 | "collectionName": "article_introductions", 4 | "info": { 5 | "singularName": "article-introduction", 6 | "pluralName": "article-introductions", 7 | "displayName": "ArticleIntroduction" 8 | }, 9 | "options": { 10 | "draftAndPublish": true 11 | }, 12 | "pluginOptions": {}, 13 | "attributes": { 14 | "label": { 15 | "type": "string" 16 | }, 17 | "info": { 18 | "type": "string" 19 | }, 20 | "articleId": { 21 | "type": "integer" 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/api/article-introduction/controllers/article-introduction.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | const { removeTime, removeAttrsAndId } = require("../../../utils/index.js"); 3 | 4 | /** 5 | * article-introduction controller 6 | */ 7 | 8 | const { createCoreController } = require("@strapi/strapi").factories; 9 | 10 | module.exports = createCoreController( 11 | "api::article-introduction.article-introduction", 12 | ({ strapi }) => ({ 13 | async find(ctx) { 14 | const { pageNo, pageSize, ...params } = ctx.query; 15 | if (pageNo && pageSize) { 16 | ctx.query = { 17 | ...params, 18 | "pagination[page]": Number(pageNo), 19 | "pagination[pageSize]": Number(pageSize), 20 | }; 21 | } 22 | const { data, meta } = await super.find(ctx); 23 | return { data: removeAttrsAndId(removeTime(data)), meta }; 24 | }, 25 | }) 26 | ); 27 | -------------------------------------------------------------------------------- /src/api/article-introduction/routes/article-introduction.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /** 4 | * article-introduction router. 5 | */ 6 | 7 | const { createCoreRouter } = require('@strapi/strapi').factories; 8 | 9 | module.exports = createCoreRouter('api::article-introduction.article-introduction'); 10 | -------------------------------------------------------------------------------- /src/api/article-introduction/services/article-introduction.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /** 4 | * article-introduction service. 5 | */ 6 | 7 | const { createCoreService } = require('@strapi/strapi').factories; 8 | 9 | module.exports = createCoreService('api::article-introduction.article-introduction'); 10 | -------------------------------------------------------------------------------- /src/api/home/content-types/home/schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "kind": "collectionType", 3 | "collectionName": "homes", 4 | "info": { 5 | "singularName": "home", 6 | "pluralName": "homes", 7 | "displayName": "Home", 8 | "description": "" 9 | }, 10 | "options": { 11 | "draftAndPublish": true 12 | }, 13 | "pluginOptions": {}, 14 | "attributes": { 15 | "title": { 16 | "type": "string" 17 | }, 18 | "description": { 19 | "type": "string" 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/api/home/controllers/home.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | const { removeTime, removeAttrsAndId } = require("../../../utils/index.js"); 3 | 4 | /** 5 | * home controller 6 | */ 7 | 8 | const { createCoreController } = require("@strapi/strapi").factories; 9 | 10 | module.exports = createCoreController("api::home.home", ({ strapi }) => ({ 11 | async find(ctx) { 12 | ctx.query = { 13 | ...ctx.query, 14 | populate: "deep", 15 | }; 16 | const { data } = await super.find(ctx); 17 | return removeAttrsAndId(removeTime(data[0])); 18 | }, 19 | })); 20 | -------------------------------------------------------------------------------- /src/api/home/routes/home.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /** 4 | * home router. 5 | */ 6 | 7 | const { createCoreRouter } = require('@strapi/strapi').factories; 8 | 9 | module.exports = createCoreRouter('api::home.home'); 10 | -------------------------------------------------------------------------------- /src/api/home/services/home.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /** 4 | * home service. 5 | */ 6 | 7 | const { createCoreService } = require('@strapi/strapi').factories; 8 | 9 | module.exports = createCoreService('api::home.home'); 10 | -------------------------------------------------------------------------------- /src/api/layout/controllers/layout.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | const { removeTime, removeAttrsAndId } = require("../../../utils/index.js"); 3 | 4 | /** 5 | * layout controller 6 | */ 7 | 8 | const { createCoreController } = require("@strapi/strapi").factories; 9 | 10 | module.exports = createCoreController("api::layout.layout", ({ strapi }) => ({ 11 | async find(ctx) { 12 | ctx.query = { 13 | ...ctx.query, 14 | populate: "deep", 15 | }; 16 | const { data } = await super.find(ctx); 17 | return removeAttrsAndId(removeTime(data[0])); 18 | }, 19 | })); 20 | -------------------------------------------------------------------------------- /src/api/layout/routes/layout.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /** 4 | * layout router. 5 | */ 6 | 7 | const { createCoreRouter } = require('@strapi/strapi').factories; 8 | 9 | module.exports = createCoreRouter('api::layout.layout'); 10 | -------------------------------------------------------------------------------- /src/api/layout/services/layout.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /** 4 | * layout service. 5 | */ 6 | 7 | const { createCoreService } = require('@strapi/strapi').factories; 8 | 9 | module.exports = createCoreService('api::layout.layout'); 10 | -------------------------------------------------------------------------------- /src/api/link-list/content-types/link-list/schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "kind": "collectionType", 3 | "collectionName": "link_lists", 4 | "info": { 5 | "singularName": "link-list", 6 | "pluralName": "link-lists", 7 | "displayName": "LinkList", 8 | "description": "" 9 | }, 10 | "options": { 11 | "draftAndPublish": true 12 | }, 13 | "pluginOptions": {}, 14 | "attributes": { 15 | "title": { 16 | "type": "string", 17 | "required": true, 18 | "unique": true 19 | }, 20 | "links": { 21 | "type": "relation", 22 | "relation": "oneToMany", 23 | "target": "api::link.link" 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/api/link-list/controllers/link-list.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /** 4 | * link-list controller 5 | */ 6 | 7 | const { createCoreController } = require('@strapi/strapi').factories; 8 | 9 | module.exports = createCoreController('api::link-list.link-list'); 10 | -------------------------------------------------------------------------------- /src/api/link-list/routes/link-list.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /** 4 | * link-list router. 5 | */ 6 | 7 | const { createCoreRouter } = require('@strapi/strapi').factories; 8 | 9 | module.exports = createCoreRouter('api::link-list.link-list'); 10 | -------------------------------------------------------------------------------- /src/api/link-list/services/link-list.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /** 4 | * link-list service. 5 | */ 6 | 7 | const { createCoreService } = require('@strapi/strapi').factories; 8 | 9 | module.exports = createCoreService('api::link-list.link-list'); 10 | -------------------------------------------------------------------------------- /src/api/link/content-types/link/schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "kind": "collectionType", 3 | "collectionName": "links", 4 | "info": { 5 | "singularName": "link", 6 | "pluralName": "links", 7 | "displayName": "Link", 8 | "description": "" 9 | }, 10 | "options": { 11 | "draftAndPublish": true 12 | }, 13 | "pluginOptions": {}, 14 | "attributes": { 15 | "label": { 16 | "type": "string", 17 | "required": true, 18 | "unique": true 19 | }, 20 | "link": { 21 | "type": "string" 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/api/link/controllers/link.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /** 4 | * link controller 5 | */ 6 | 7 | const { createCoreController } = require('@strapi/strapi').factories; 8 | 9 | module.exports = createCoreController('api::link.link'); 10 | -------------------------------------------------------------------------------- /src/api/link/routes/link.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /** 4 | * link router. 5 | */ 6 | 7 | const { createCoreRouter } = require('@strapi/strapi').factories; 8 | 9 | module.exports = createCoreRouter('api::link.link'); 10 | -------------------------------------------------------------------------------- /src/api/link/services/link.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /** 4 | * link service. 5 | */ 6 | 7 | const { createCoreService } = require('@strapi/strapi').factories; 8 | 9 | module.exports = createCoreService('api::link.link'); 10 | -------------------------------------------------------------------------------- /src/extensions/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/czm1290433700/nextjs-cms/4dd61244e54813d48e740d4e3c6f9c91c5b22ba4/src/extensions/.gitkeep -------------------------------------------------------------------------------- /src/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = { 4 | /** 5 | * An asynchronous register function that runs before 6 | * your application is initialized. 7 | * 8 | * This gives you an opportunity to extend code. 9 | */ 10 | register(/*{ strapi }*/) {}, 11 | 12 | /** 13 | * An asynchronous bootstrap function that runs before 14 | * your application gets started. 15 | * 16 | * This gives you an opportunity to set up your data model, 17 | * run jobs, or perform some special logic. 18 | */ 19 | bootstrap(/*{ strapi }*/) {}, 20 | }; 21 | --------------------------------------------------------------------------------