@strapi/admin 4.0.0-beta.12 → 4.0.0-beta.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/admin/src/components/AuthenticatedApp/index.js +2 -1
- package/admin/src/components/AutoReloadOverlayBlockerProvider/Blocker.js +3 -2
- package/admin/src/components/GlobalStyle/index.js +1 -0
- package/admin/src/components/LeftMenu/index.js +5 -5
- package/admin/src/components/{UpgradePlanModal /index.js → UpgradePlanModal/index.js} +7 -11
- package/admin/src/content-manager/components/AttributeFilter/hooks/useAllowedAttributes.js +2 -7
- package/admin/src/content-manager/components/ComponentInitializer/index.js +48 -29
- package/admin/src/content-manager/components/DynamicTable/CellContent/Media/FileWrapper.js +4 -2
- package/admin/src/content-manager/components/DynamicTable/CellContent/Relation/PopoverContent.js +4 -4
- package/admin/src/content-manager/components/DynamicTable/CellContent/Relation/index.js +5 -5
- package/admin/src/content-manager/components/DynamicTable/CellContent/index.js +5 -5
- package/admin/src/content-manager/components/DynamicTable/ConfirmDialogDelete/index.js +3 -3
- package/admin/src/content-manager/components/DynamicTable/ConfirmDialogDeleteAll/index.js +3 -3
- package/admin/src/content-manager/components/DynamicTable/TableRows/index.js +8 -3
- package/admin/src/content-manager/components/DynamicTable/index.js +1 -1
- package/admin/src/content-manager/components/DynamicZone/components/AddComponentButton/index.js +14 -6
- package/admin/src/content-manager/components/DynamicZone/components/Component/Rectangle.js +1 -1
- package/admin/src/content-manager/components/DynamicZone/components/Component/index.js +52 -16
- package/admin/src/content-manager/components/DynamicZone/components/ComponentPicker/Category/ComponentCard/index.js +4 -4
- package/admin/src/content-manager/components/DynamicZone/components/ComponentPicker/Category/index.js +1 -1
- package/admin/src/content-manager/components/DynamicZone/components/ComponentPicker/index.js +3 -3
- package/admin/src/content-manager/components/DynamicZone/components/DzLabel/index.js +10 -3
- package/admin/src/content-manager/components/DynamicZone/index.js +1 -0
- package/admin/src/content-manager/components/EditViewDataManagerProvider/index.js +17 -8
- package/admin/src/content-manager/components/EditViewDataManagerProvider/reducer.js +1 -1
- package/admin/src/content-manager/components/EditViewDataManagerProvider/utils/schema.js +1 -1
- package/admin/src/content-manager/components/FieldComponent/Label.js +10 -4
- package/admin/src/content-manager/components/{InputJSON/Hint.js → Hint/index.js} +3 -3
- package/admin/src/content-manager/components/InputJSON/FieldError.js +9 -3
- package/admin/src/content-manager/components/InputJSON/Label.js +9 -3
- package/admin/src/content-manager/components/InputJSON/index.js +1 -1
- package/admin/src/content-manager/components/InputUID/index.js +7 -7
- package/admin/src/content-manager/components/NonRepeatableComponent/index.js +1 -1
- package/admin/src/content-manager/components/RepeatableComponent/AccordionGroupCustom/index.js +34 -6
- package/admin/src/content-manager/components/RepeatableComponent/AddFieldButton.js +3 -3
- package/admin/src/content-manager/components/RepeatableComponent/DragPreview.js +12 -7
- package/admin/src/content-manager/components/RepeatableComponent/DraggedItem/DraggingSibling.js +3 -3
- package/admin/src/content-manager/components/RepeatableComponent/DraggedItem/index.js +16 -25
- package/admin/src/content-manager/components/RepeatableComponent/index.js +34 -153
- package/admin/src/content-manager/components/SelectMany/ListItem.js +3 -4
- package/admin/src/content-manager/components/SelectMany/index.js +11 -2
- package/admin/src/content-manager/components/SelectOne/SingleValue.js +2 -2
- package/admin/src/content-manager/components/SelectOne/index.js +34 -21
- package/admin/src/content-manager/components/SelectWrapper/Label.js +9 -3
- package/admin/src/content-manager/components/SelectWrapper/Option.js +2 -2
- package/admin/src/content-manager/components/SelectWrapper/index.js +4 -7
- package/admin/src/content-manager/components/State/index.js +3 -3
- package/admin/src/content-manager/components/Wysiwyg/Editor.js +6 -5
- package/admin/src/content-manager/components/Wysiwyg/EditorLayout.js +133 -0
- package/admin/src/content-manager/components/Wysiwyg/{EditorWrapper.js → EditorStylesContainer.js} +6 -5
- package/admin/src/content-manager/components/Wysiwyg/WysiwygFooter.js +3 -3
- package/admin/src/content-manager/components/Wysiwyg/WysiwygNav.js +18 -21
- package/admin/src/content-manager/components/Wysiwyg/WysiwygStyles.js +0 -51
- package/admin/src/content-manager/components/Wysiwyg/index.js +80 -89
- package/admin/src/content-manager/components/Wysiwyg/utils/utils.js +7 -2
- package/admin/src/content-manager/pages/EditSettingsView/components/ComponentFieldList.js +2 -2
- package/admin/src/content-manager/pages/EditSettingsView/components/DisplayedFields.js +5 -5
- package/admin/src/content-manager/pages/EditSettingsView/components/FieldButton.js +3 -3
- package/admin/src/content-manager/pages/EditSettingsView/components/FormModal.js +3 -3
- package/admin/src/content-manager/pages/EditSettingsView/components/RelationalFields.js +5 -5
- package/admin/src/content-manager/pages/EditSettingsView/index.js +5 -5
- package/admin/src/content-manager/pages/EditView/DraftAndPublishBadge/index.js +5 -5
- package/admin/src/content-manager/pages/EditView/Header/index.js +10 -10
- package/admin/src/content-manager/pages/EditView/Informations/index.js +11 -10
- package/admin/src/content-manager/pages/EditView/index.js +7 -8
- package/admin/src/content-manager/pages/ListSettingsView/components/CardPreview.js +3 -3
- package/admin/src/content-manager/pages/ListSettingsView/components/DraggableCard.js +3 -3
- package/admin/src/content-manager/pages/ListSettingsView/components/EditFieldForm.js +3 -3
- package/admin/src/content-manager/pages/ListSettingsView/components/Settings.js +3 -3
- package/admin/src/content-manager/pages/ListSettingsView/components/SortDisplayedFields.js +3 -3
- package/admin/src/content-manager/pages/ListView/FieldPicker/index.js +3 -3
- package/admin/src/content-manager/pages/ListView/PaginationFooter/index.js +1 -1
- package/admin/src/content-manager/pages/ListView/index.js +20 -25
- package/admin/src/content-manager/pages/ListViewLayoutManager/index.js +0 -1
- package/admin/src/content-manager/sharedReducers/crudReducer/reducer.js +2 -2
- package/admin/src/index.js +1 -0
- package/admin/src/pages/Admin/Onboarding/index.js +4 -4
- package/admin/src/pages/AuthPage/components/ForgotPassword/index.js +10 -5
- package/admin/src/pages/AuthPage/components/ForgotPasswordSuccess/index.js +7 -7
- package/admin/src/pages/AuthPage/components/Login/BaseLogin.js +12 -7
- package/admin/src/pages/AuthPage/components/Oops/index.js +6 -6
- package/admin/src/pages/AuthPage/components/Register/index.js +5 -14
- package/admin/src/pages/AuthPage/components/ResetPassword/index.js +10 -5
- package/admin/src/pages/AuthPage/index.js +1 -0
- package/admin/src/pages/AuthPage/utils/forms.js +2 -2
- package/admin/src/pages/HomePage/HomeHeader.js +5 -5
- package/admin/src/pages/HomePage/SocialLinks.js +5 -9
- package/admin/src/pages/InstalledPluginsPage/Plugins.js +111 -0
- package/admin/src/pages/InstalledPluginsPage/index.js +4 -108
- package/admin/src/pages/InstalledPluginsPage/utils/api.js +11 -0
- package/admin/src/pages/MarketplacePage/assets/marketplace-coming-soon.png +0 -0
- package/admin/src/pages/MarketplacePage/index.js +93 -126
- package/admin/src/pages/ProfilePage/index.js +10 -9
- package/admin/src/pages/SettingsPage/pages/ApiTokens/EditView/components/ContentBox/index.js +5 -2
- package/admin/src/pages/SettingsPage/pages/ApiTokens/EditView/index.js +16 -4
- package/admin/src/pages/SettingsPage/pages/ApiTokens/ListView/DynamicTable/DeleteButton/index.js +6 -2
- package/admin/src/pages/SettingsPage/pages/ApiTokens/ListView/DynamicTable/index.js +25 -15
- package/admin/src/pages/SettingsPage/pages/ApiTokens/ListView/index.js +7 -0
- package/admin/src/pages/SettingsPage/pages/ApplicationInfosPage/index.js +1 -1
- package/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/ConditionsModal/ActionRow/index.js +7 -16
- package/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/ConditionsModal/index.js +5 -5
- package/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/ContentTypeCollapse/Collapse/index.js +4 -4
- package/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/ContentTypeCollapse/CollapsePropertyMatrix/CarretIcon/index.js +0 -3
- package/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/ContentTypeCollapse/CollapsePropertyMatrix/Header/index.js +6 -4
- package/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/ContentTypeCollapse/CollapsePropertyMatrix/SubActionRow/index.js +2 -2
- package/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/ContentTypeCollapse/utils/activeStyle.js +6 -4
- package/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/GlobalActions/index.js +3 -3
- package/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/PluginsAndSettings/Row/index.js +7 -4
- package/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/PluginsAndSettings/SubCategory/index.js +4 -2
- package/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/RoleForm/index.js +5 -5
- package/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/RowLabelWithCheckbox/index.js +8 -2
- package/admin/src/pages/SettingsPage/pages/Roles/ListPage/components/EmptyRole/index.js +0 -32
- package/admin/src/pages/SettingsPage/pages/Roles/ListPage/components/RoleRow/index.js +8 -4
- package/admin/src/pages/SettingsPage/pages/Roles/ListPage/index.js +8 -8
- package/admin/src/pages/SettingsPage/pages/Users/EditPage/index.js +8 -8
- package/admin/src/pages/SettingsPage/pages/Users/ListPage/DynamicTable/TableRows/index.js +6 -5
- package/admin/src/pages/SettingsPage/pages/Users/ListPage/ModalForm/index.js +7 -5
- package/admin/src/pages/SettingsPage/pages/Users/ListPage/ModalForm/utils/schema.js +1 -1
- package/admin/src/pages/SettingsPage/pages/Users/ListPage/PaginationFooter/index.js +1 -1
- package/admin/src/pages/SettingsPage/pages/Users/ListPage/utils/tableHeaders.js +5 -3
- package/admin/src/pages/SettingsPage/pages/Users/components/MagicLink/MagicLinkWrapper.js +1 -0
- package/admin/src/pages/SettingsPage/pages/Users/utils/validations/users/edit.js +2 -2
- package/admin/src/pages/SettingsPage/pages/Users/utils/validations/users/profile.js +6 -2
- package/admin/src/pages/SettingsPage/pages/Webhooks/EditView/components/EventInput/index.js +9 -5
- package/admin/src/pages/SettingsPage/pages/Webhooks/EditView/components/HeadersInput/Combobox.js +8 -2
- package/admin/src/pages/SettingsPage/pages/Webhooks/EditView/components/TriggerContainer/index.js +24 -28
- package/admin/src/pages/SettingsPage/pages/Webhooks/ListView/index.js +213 -220
- package/admin/src/plugins.js +14 -18
- package/admin/src/translations/en.json +12 -2
- package/admin/src/utils/getFullName.js +9 -0
- package/admin/src/utils/index.js +1 -1
- package/build/01a600d9e6e0dea21e33017a97bdf431.png +0 -0
- package/build/1024.1b15fbb5.chunk.js +1 -0
- package/build/1024.664cd4ee.chunk.js +1 -0
- package/build/1156.ef17a73a.chunk.js +1 -0
- package/build/1593.57ba5d9f.chunk.js +1 -0
- package/build/1856.53d42ce5.chunk.js +1 -0
- package/build/1856.e06c9787.chunk.js +1 -0
- package/build/2912.591ddc96.chunk.js +1 -0
- package/build/2912.b0ac46e0.chunk.js +1 -0
- package/build/3063.bafab3b5.chunk.js +1 -0
- package/build/3226.0dc582b2.chunk.js +2 -0
- package/build/3226.0dc582b2.chunk.js.LICENSE.txt +15 -0
- package/build/3226.e8fe1445.chunk.js +2 -0
- package/build/3226.e8fe1445.chunk.js.LICENSE.txt +15 -0
- package/build/3471.327fa7e3.chunk.js +2 -0
- package/build/3471.327fa7e3.chunk.js.LICENSE.txt +13 -0
- package/build/3480.86145dfa.chunk.js +1 -0
- package/build/3669.270feaf7.chunk.js +1 -0
- package/build/4064.2683bcce.chunk.js +1 -0
- package/build/4064.56677f11.chunk.js +1 -0
- package/build/4261.a08a535e.chunk.js +1 -0
- package/build/4261.b7b7ac00.chunk.js +1 -0
- package/build/4282.30e4e53c.chunk.js +2 -0
- package/build/4282.30e4e53c.chunk.js.LICENSE.txt +4 -0
- package/build/4362.60f0937a.chunk.js +1 -0
- package/build/4362.aefff6ad.chunk.js +1 -0
- package/build/4362.de6b3788.chunk.js +1 -0
- package/build/4362.fd69112c.chunk.js +1 -0
- package/build/4715.2f51454b.chunk.js +1 -0
- package/build/4715.35096dd7.chunk.js +1 -0
- package/build/4715.bb03cfd8.chunk.js +1 -0
- package/build/4741.1fb6ad6e.chunk.js +2 -0
- package/build/4741.1fb6ad6e.chunk.js.LICENSE.txt +9 -0
- package/build/4741.45afdeda.chunk.js +2 -0
- package/build/4741.45afdeda.chunk.js.LICENSE.txt +9 -0
- package/build/4868.7f99c7b9.chunk.js +1 -0
- package/build/497.05fa226b.chunk.js +1 -0
- package/build/497.838781d7.chunk.js +1 -0
- package/build/4982.5031302b.chunk.js +1 -0
- package/build/4982.a7f87e6c.chunk.js +1 -0
- package/build/5273.41d98db5.chunk.js +2 -0
- package/build/5273.41d98db5.chunk.js.LICENSE.txt +15 -0
- package/build/5367.5b2bdd38.chunk.js +1 -0
- package/build/5603.f1165699.chunk.js +1 -0
- package/build/5881.4bf14a31.chunk.js +2 -0
- package/build/5881.4bf14a31.chunk.js.LICENSE.txt +4 -0
- package/build/5936.2ec3e56a.chunk.js +1 -0
- package/build/6250.11ba8b50.chunk.js +1 -0
- package/build/6250.50133e63.chunk.js +1 -0
- package/build/6250.785ba0da.chunk.js +1 -0
- package/build/6456.9da00bc3.chunk.js +2 -0
- package/build/6456.9da00bc3.chunk.js.LICENSE.txt +13 -0
- package/build/6925.4767e761.chunk.js +2 -0
- package/build/6925.4767e761.chunk.js.LICENSE.txt +4 -0
- package/build/7427.881b5bba.chunk.js +1 -0
- package/build/7841.736189f7.chunk.js +1 -0
- package/build/7841.cc8241a5.chunk.js +1 -0
- package/build/8447.32ee17be.chunk.js +2 -0
- package/build/8447.32ee17be.chunk.js.LICENSE.txt +22 -0
- package/build/8447.686f702c.chunk.js +2 -0
- package/build/8447.686f702c.chunk.js.LICENSE.txt +22 -0
- package/build/8469.8d819a3c.chunk.js +1 -0
- package/build/849.3ddc11eb.chunk.js +1 -0
- package/build/849.abcc3b07.chunk.js +1 -0
- package/build/849.fc26299c.chunk.js +1 -0
- package/build/9238.9258f79b.chunk.js +1 -0
- package/build/9238.f112d6c9.chunk.js +1 -0
- package/build/9292.20d16885.chunk.js +2 -0
- package/build/9292.20d16885.chunk.js.LICENSE.txt +14 -0
- package/build/9293.cb94e2c6.chunk.js +1 -0
- package/build/9964.345994e8.chunk.js +2 -0
- package/build/9964.345994e8.chunk.js.LICENSE.txt +15 -0
- package/build/9965.d72ae284.chunk.js +2 -0
- package/build/9965.d72ae284.chunk.js.LICENSE.txt +1 -0
- package/build/Admin-authenticatedApp.62e5ca51.chunk.js +1 -0
- package/build/Admin-authenticatedApp.7bdfbab4.chunk.js +1 -0
- package/build/Admin-authenticatedApp.994268cd.chunk.js +1 -0
- package/build/Admin-authenticatedApp.b1104a6a.chunk.js +1 -0
- package/build/Admin-authenticatedApp.bfdec496.chunk.js +1 -0
- package/build/Admin_homePage.1745827a.chunk.js +1 -0
- package/build/Admin_homePage.31e37124.chunk.js +1 -0
- package/build/Admin_homePage.4398cf1a.chunk.js +1 -0
- package/build/Admin_marketplace.201373e2.chunk.js +1 -0
- package/build/Admin_marketplace.6582ddcf.chunk.js +1 -0
- package/build/Admin_pluginsPage.5e75b3e8.chunk.js +1 -0
- package/build/Admin_pluginsPage.db5748e1.chunk.js +1 -0
- package/build/Admin_profilePage.3aa61921.chunk.js +1 -0
- package/build/Admin_profilePage.e7eb483d.chunk.js +1 -0
- package/build/Admin_profilePage.e941f627.chunk.js +1 -0
- package/build/Admin_profilePage.f9369a69.chunk.js +1 -0
- package/build/Admin_settingsPage.174d91c2.chunk.js +1 -0
- package/build/Admin_settingsPage.363ad01d.chunk.js +1 -0
- package/build/Admin_settingsPage.60a92e51.chunk.js +1 -0
- package/build/Admin_settingsPage.ea6de611.chunk.js +1 -0
- package/build/admin-edit-roles-page.dbe15373.chunk.js +1 -0
- package/build/admin-edit-roles-page.e91bd9e5.chunk.js +1 -0
- package/build/admin-edit-users.110f6f05.chunk.js +1 -0
- package/build/admin-edit-users.bcdd2e4d.chunk.js +1 -0
- package/build/admin-edit-users.fa3fac98.chunk.js +1 -0
- package/build/admin-users.640b6123.chunk.js +1 -0
- package/build/admin-users.8f957bf7.chunk.js +1 -0
- package/build/admin-users.a2d08780.chunk.js +1 -0
- package/build/admin-users.fcabe1ed.chunk.js +1 -0
- package/build/api-tokens-create-page.451be52c.chunk.js +1 -0
- package/build/api-tokens-create-page.57119445.chunk.js +1 -0
- package/build/api-tokens-create-page.5e332b85.chunk.js +1 -0
- package/build/api-tokens-create-page.ac4285ba.chunk.js +1 -0
- package/build/api-tokens-edit-page.7b419f29.chunk.js +1 -0
- package/build/api-tokens-edit-page.b1c3ef5c.chunk.js +1 -0
- package/build/api-tokens-edit-page.b8900ddd.chunk.js +1 -0
- package/build/api-tokens-edit-page.e473ee7e.chunk.js +1 -0
- package/build/api-tokens-list-page.5acd2590.chunk.js +1 -0
- package/build/api-tokens-list-page.b053ddcd.chunk.js +1 -0
- package/build/api-tokens-list-page.d451255e.chunk.js +1 -0
- package/build/codemirror-addon-closebrackets.5d703a8f.chunk.js +1 -0
- package/build/codemirror-addon-lint-js.2bb54ef7.chunk.js +1 -0
- package/build/codemirror-addon-lint.91580cda.chunk.js +1 -0
- package/build/codemirror-addon-lint.d0f380b7.chunk.js +1 -0
- package/build/codemirror-addon-mark-selection.06aef3b0.chunk.js +1 -0
- package/build/codemirror-css.7b034e03.chunk.js +1 -0
- package/build/codemirror-javacript.debb6b5f.chunk.js +1 -0
- package/build/codemirror-theme.4a209ed5.chunk.js +1 -0
- package/build/codemirror-theme.4d046631.chunk.js +1 -0
- package/build/content-manager.08eae196.chunk.js +1 -0
- package/build/content-manager.196287ea.chunk.js +1 -0
- package/build/content-manager.a6c34b64.chunk.js +1 -0
- package/build/content-manager.d09d2a3a.chunk.js +1 -0
- package/build/content-manager.dae306dc.chunk.js +1 -0
- package/build/content-type-builder-translation-uk-json.dd141133.chunk.js +1 -0
- package/build/content-type-builder.0e689f6b.chunk.js +1 -0
- package/build/content-type-builder.d0e98469.chunk.js +1 -0
- package/build/content-type-builder.e9231547.chunk.js +1 -0
- package/build/cropper-css.b71d1229.chunk.js +1 -0
- package/build/cs-json.ff08076e.chunk.js +1 -0
- package/build/documentation-page.d8a45deb.chunk.js +1 -0
- package/build/documentation-settings.8c40ee4f.chunk.js +1 -0
- package/build/documentation-translation-pt-json.da1090dc.chunk.js +1 -0
- package/build/email-settings-page.8f0ee2a7.chunk.js +1 -0
- package/build/email-settings-page.b0b914fd.chunk.js +1 -0
- package/build/email-settings-page.b1048dc6.chunk.js +1 -0
- package/build/en-json.0e021d52.chunk.js +1 -0
- package/build/en-json.6282a00f.chunk.js +1 -0
- package/build/fontawesome-css-all.162c8569.chunk.js +1 -0
- package/build/fontawesome-css-all.5744d394.chunk.js +1 -0
- package/build/fontawesome-css.1638752f.chunk.js +1 -0
- package/build/fontawesome-css.b1736497.chunk.js +1 -0
- package/build/fontawesome-js.2639263c.chunk.js +2 -0
- package/build/fontawesome-js.2639263c.chunk.js.LICENSE.txt +4 -0
- package/build/fontawesome-js.6c44ac22.chunk.js +1 -0
- package/build/highlight.js.3f31aed7.chunk.js +1 -0
- package/build/i18n-settings-page.5fe86c22.chunk.js +1 -0
- package/build/i18n-settings-page.acc3a212.chunk.js +1 -0
- package/build/i18n-settings-page.f1881c6c.chunk.js +1 -0
- package/build/index.html +1 -1
- package/build/main.3414cc4f.js +2 -0
- package/build/main.3414cc4f.js.LICENSE.txt +91 -0
- package/build/main.af6b238d.js +2 -0
- package/build/main.af6b238d.js.LICENSE.txt +73 -0
- package/build/main.e21a82f5.js +2 -0
- package/build/main.e21a82f5.js.LICENSE.txt +91 -0
- package/build/main.f425e7e8.js +2 -0
- package/build/main.f425e7e8.js.LICENSE.txt +91 -0
- package/build/main.fa2000bd.js +2 -0
- package/build/main.fa2000bd.js.LICENSE.txt +82 -0
- package/build/runtime~main.15acd133.js +1 -0
- package/build/runtime~main.3f600349.js +1 -0
- package/build/runtime~main.44db7ede.js +1 -0
- package/build/runtime~main.a6ae89c4.js +1 -0
- package/build/runtime~main.cc96a027.js +1 -0
- package/build/sso-settings-page.0f5feb29.chunk.js +1 -0
- package/build/sso-settings-page.bd7a8fd7.chunk.js +1 -0
- package/build/upload-settings.4c2a1426.chunk.js +1 -0
- package/build/upload-settings.4daf6206.chunk.js +1 -0
- package/build/upload-settings.7d40d236.chunk.js +1 -0
- package/build/upload-translation-zh-json.9ad30216.chunk.js +1 -0
- package/build/upload.1090e6c4.chunk.js +1 -0
- package/build/upload.c11a292c.chunk.js +1 -0
- package/build/upload.e53f8430.chunk.js +1 -0
- package/build/users-advanced-settings-page.2dfeffe8.chunk.js +1 -0
- package/build/users-advanced-settings-page.669b059c.chunk.js +1 -0
- package/build/users-advanced-settings-page.e637319d.chunk.js +1 -0
- package/build/users-email-settings-page.a4e19b13.chunk.js +1 -0
- package/build/users-email-settings-page.b1d1f551.chunk.js +1 -0
- package/build/users-email-settings-page.cb6065a5.chunk.js +1 -0
- package/build/users-providers-settings-page.733a51ec.chunk.js +1 -0
- package/build/users-providers-settings-page.866ddeed.chunk.js +1 -0
- package/build/users-providers-settings-page.96c66f6f.chunk.js +1 -0
- package/build/users-roles-settings-page.2f12885b.chunk.js +1 -0
- package/build/users-roles-settings-page.3629c123.chunk.js +1 -0
- package/build/users-roles-settings-page.dd20c4ab.chunk.js +1 -0
- package/build/users-roles-settings-page.fafcbe29.chunk.js +1 -0
- package/build/webhook-edit-page.634e50da.chunk.js +1 -0
- package/build/webhook-edit-page.f4f6935d.chunk.js +1 -0
- package/build/webhook-edit-page.f6d2e962.chunk.js +1 -0
- package/build/webhook-list-page.68c100bf.chunk.js +1 -0
- package/build/webhook-list-page.aae66737.chunk.js +1 -0
- package/build/webhook-list-page.fc554fbe.chunk.js +1 -0
- package/ee/admin/pages/AuthPage/components/Login/index.js +3 -3
- package/ee/admin/pages/AuthPage/components/Providers/SSOProviders.js +2 -2
- package/ee/admin/pages/AuthPage/components/Providers/index.js +12 -6
- package/ee/admin/pages/SettingsPage/SingleSignOn/index.js +119 -115
- package/ee/admin/pages/SettingsPage/pages/Roles/CreatePage/index.js +5 -5
- package/ee/admin/pages/SettingsPage/pages/Roles/ListPage/index.js +7 -7
- package/ee/server/controllers/authentication/middlewares.js +1 -1
- package/package.json +10 -15
- package/scripts/build.js +13 -1
- package/scripts/create-dev-plugins-file.js +69 -0
- package/scripts/create-plugins-file.js +92 -0
- package/server/controllers/admin.js +8 -2
- package/server/services/content-type.js +4 -4
- package/server/services/permission/permissions-manager/sanitize.js +14 -7
- package/server/services/user.js +14 -0
- package/server/strategies/api-token.js +19 -9
- package/server/validation/authentication/register.js +2 -2
- package/server/validation/common-validators.js +1 -1
- package/server/validation/user.js +3 -3
- package/webpack.alias.js +0 -6
- package/admin/src/content-manager/components/DraggedField/Close/index.js +0 -10
- package/admin/src/content-manager/components/DraggedField/GrabWrapper.js +0 -38
- package/admin/src/content-manager/components/DraggedField/Link.js +0 -17
- package/admin/src/content-manager/components/DraggedField/NameWrapper.js +0 -29
- package/admin/src/content-manager/components/DraggedField/RemoveWrapper.js +0 -32
- package/admin/src/content-manager/components/DraggedField/SubWrapper.js +0 -36
- package/admin/src/content-manager/components/DraggedField/Wrapper.js +0 -129
- package/admin/src/content-manager/components/DraggedField/index.js +0 -198
- package/admin/src/content-manager/components/DraggedField/utils/getColor.js +0 -12
- package/admin/src/content-manager/components/DraggedField/utils/getHeight.js +0 -3
- package/admin/src/content-manager/components/DraggedFieldWithPreview/Carret.js +0 -24
- package/admin/src/content-manager/components/DraggedFieldWithPreview/DynamicComponent.js +0 -71
- package/admin/src/content-manager/components/DraggedFieldWithPreview/DynamicZoneWrapper.js +0 -10
- package/admin/src/content-manager/components/DraggedFieldWithPreview/Tooltip.js +0 -19
- package/admin/src/content-manager/components/DraggedFieldWithPreview/Wrapper.js +0 -23
- package/admin/src/content-manager/components/DraggedFieldWithPreview/index.js +0 -194
- package/admin/src/content-manager/components/Inputs/ComingSoonInput.js +0 -72
- package/admin/src/content-manager/components/PopupForm/index.js +0 -93
- package/admin/src/content-manager/components/RepeatableComponent/Banner.js +0 -114
- package/admin/src/content-manager/components/Separator/index.js +0 -9
- package/admin/src/content-manager/components/SettingsViewWrapper/index.js +0 -306
- package/admin/src/content-manager/components/SortWrapper/index.js +0 -9
- package/admin/src/content-manager/components/Wysiwyg/MediaLibrary.js +0 -58
- package/admin/src/content-manager/components/Wysiwyg/WysiwygExpand.js +0 -135
- package/admin/src/content-manager/components/old/Wysiwyg/MediaLib.js +0 -68
- package/admin/src/pages/InstalledPluginsPage/ListWrapper.js +0 -7
- package/admin/src/pages/InstalledPluginsPage/Logo.js +0 -36
- package/admin/src/pages/InstalledPluginsPage/Row.js +0 -99
- package/admin/src/pages/InstalledPluginsPage/utils/generateRows.js +0 -19
- package/ee/admin/components/ProviderButton/ProviderButtonStyles.js +0 -31
- package/ee/admin/components/ProviderButton/index.js +0 -42
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
/* eslint-disable */
|
|
2
|
-
|
|
3
|
-
import styled, { css } from 'styled-components';
|
|
4
|
-
import PropTypes from 'prop-types';
|
|
5
|
-
import getColor from './utils/getColor';
|
|
6
|
-
import getHeight from './utils/getHeight';
|
|
7
|
-
|
|
8
|
-
const Wrapper = styled.div`
|
|
9
|
-
${({ withLongerHeight }) =>
|
|
10
|
-
!withLongerHeight &&
|
|
11
|
-
css`
|
|
12
|
-
height: 30px;
|
|
13
|
-
`};
|
|
14
|
-
min-height: ${({ withLongerHeight }) => getHeight(withLongerHeight)};
|
|
15
|
-
padding: 0 10px 0 0;
|
|
16
|
-
flex-basis: calc(100% / ${props => props.count});
|
|
17
|
-
flex-shrink: 1;
|
|
18
|
-
min-width: 130px;
|
|
19
|
-
position: relative;
|
|
20
|
-
|
|
21
|
-
.sub_wrapper {
|
|
22
|
-
position: relative;
|
|
23
|
-
cursor: pointer;
|
|
24
|
-
background-color: ${({ isOverEditBlock, isOverRemove, isSelected, isSub }) => {
|
|
25
|
-
if (isOverRemove) {
|
|
26
|
-
return '#ffe9e0';
|
|
27
|
-
} else if (isSelected || isOverEditBlock) {
|
|
28
|
-
return '#e6f0fb';
|
|
29
|
-
} else if (isSub) {
|
|
30
|
-
return '#ffffff';
|
|
31
|
-
} else {
|
|
32
|
-
return '#F2F3F4';
|
|
33
|
-
}
|
|
34
|
-
}};
|
|
35
|
-
border: 1px solid
|
|
36
|
-
${({ isOverEditBlock, isOverRemove, isSelected }) =>
|
|
37
|
-
getColor(isOverRemove, isSelected, isOverEditBlock)};
|
|
38
|
-
border-radius: 2px;
|
|
39
|
-
padding-left: 38px;
|
|
40
|
-
padding-right: 38px;
|
|
41
|
-
|
|
42
|
-
${({ isSub }) =>
|
|
43
|
-
isSub &&
|
|
44
|
-
css`
|
|
45
|
-
padding-left: 12px !important;
|
|
46
|
-
padding-right: 12px !important;
|
|
47
|
-
|
|
48
|
-
.grab,
|
|
49
|
-
.remove {
|
|
50
|
-
display: none;
|
|
51
|
-
}
|
|
52
|
-
`}
|
|
53
|
-
|
|
54
|
-
.name {
|
|
55
|
-
font-size: 13px;
|
|
56
|
-
font-weight: 500;
|
|
57
|
-
|
|
58
|
-
${({ isOverEditBlock, isSelected }) =>
|
|
59
|
-
(isSelected || isOverEditBlock) &&
|
|
60
|
-
css`
|
|
61
|
-
color: #007eff;
|
|
62
|
-
`}
|
|
63
|
-
|
|
64
|
-
${({ isOverRemove }) =>
|
|
65
|
-
isOverRemove &&
|
|
66
|
-
css`
|
|
67
|
-
color: #f64d0a;
|
|
68
|
-
`}
|
|
69
|
-
}
|
|
70
|
-
.grab {
|
|
71
|
-
border-right: 1px solid
|
|
72
|
-
${({ isOverEditBlock, isOverRemove, isSelected }) =>
|
|
73
|
-
getColor(isOverRemove, isSelected, isOverEditBlock)};
|
|
74
|
-
|
|
75
|
-
${({ isOverEditBlock, isSelected }) =>
|
|
76
|
-
(isSelected || isOverEditBlock) &&
|
|
77
|
-
css`
|
|
78
|
-
g {
|
|
79
|
-
fill: #aed4fb;
|
|
80
|
-
}
|
|
81
|
-
`}
|
|
82
|
-
|
|
83
|
-
${({ isOverRemove }) =>
|
|
84
|
-
isOverRemove &&
|
|
85
|
-
css`
|
|
86
|
-
g {
|
|
87
|
-
fill: #ffa784;
|
|
88
|
-
}
|
|
89
|
-
`}
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
.remove {
|
|
93
|
-
background-color: ${({ isOverEditBlock, isOverRemove, isSelected }) =>
|
|
94
|
-
getColor(isOverRemove, isSelected, isOverEditBlock)};
|
|
95
|
-
cursor: pointer;
|
|
96
|
-
svg {
|
|
97
|
-
align-self: center;
|
|
98
|
-
|
|
99
|
-
${({ isOverEditBlock, isSelected }) =>
|
|
100
|
-
(isSelected || isOverEditBlock) &&
|
|
101
|
-
css`
|
|
102
|
-
path {
|
|
103
|
-
fill: #007eff;
|
|
104
|
-
}
|
|
105
|
-
`}
|
|
106
|
-
|
|
107
|
-
${({ isOverRemove }) =>
|
|
108
|
-
isOverRemove &&
|
|
109
|
-
css`
|
|
110
|
-
path {
|
|
111
|
-
fill: #f64d0a;
|
|
112
|
-
}
|
|
113
|
-
`}
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
`;
|
|
118
|
-
|
|
119
|
-
Wrapper.defaultProps = {
|
|
120
|
-
count: 1,
|
|
121
|
-
isSelected: false,
|
|
122
|
-
};
|
|
123
|
-
|
|
124
|
-
Wrapper.propTypes = {
|
|
125
|
-
count: PropTypes.number,
|
|
126
|
-
isSelected: PropTypes.bool,
|
|
127
|
-
};
|
|
128
|
-
|
|
129
|
-
export default Wrapper;
|
|
@@ -1,198 +0,0 @@
|
|
|
1
|
-
import React, { forwardRef, useState } from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
|
-
import { isEmpty } from 'lodash';
|
|
4
|
-
import { FormattedMessage } from 'react-intl';
|
|
5
|
-
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
|
6
|
-
import { Grab, GrabLarge, Pencil } from '@buffetjs/icons';
|
|
7
|
-
import { CheckPermissions } from '@strapi/helper-plugin';
|
|
8
|
-
import { getTrad } from '../../utils';
|
|
9
|
-
import permissions from '../../../permissions';
|
|
10
|
-
import useLayoutDnd from '../../hooks/useLayoutDnd';
|
|
11
|
-
import GrabWrapper from './GrabWrapper';
|
|
12
|
-
import Link from './Link';
|
|
13
|
-
import NameWrapper from './NameWrapper';
|
|
14
|
-
import RemoveWrapper from './RemoveWrapper';
|
|
15
|
-
import SubWrapper from './SubWrapper';
|
|
16
|
-
import Wrapper from './Wrapper';
|
|
17
|
-
import Close from './Close';
|
|
18
|
-
|
|
19
|
-
const cmPermissions = permissions.contentManager;
|
|
20
|
-
|
|
21
|
-
/* eslint-disable */
|
|
22
|
-
const DraggedField = forwardRef(
|
|
23
|
-
(
|
|
24
|
-
{
|
|
25
|
-
children,
|
|
26
|
-
count,
|
|
27
|
-
goTo,
|
|
28
|
-
componentUid,
|
|
29
|
-
isDragging,
|
|
30
|
-
isHidden,
|
|
31
|
-
isOverDynamicZone,
|
|
32
|
-
isSub,
|
|
33
|
-
label,
|
|
34
|
-
name,
|
|
35
|
-
onClick,
|
|
36
|
-
onRemove,
|
|
37
|
-
selectedItem,
|
|
38
|
-
style,
|
|
39
|
-
type,
|
|
40
|
-
withLongerHeight,
|
|
41
|
-
},
|
|
42
|
-
ref
|
|
43
|
-
) => {
|
|
44
|
-
const { isDraggingSibling } = useLayoutDnd();
|
|
45
|
-
const [isOverRemove, setIsOverRemove] = useState(false);
|
|
46
|
-
const [isOverEditBlock, setIsOverEditBlock] = useState(false);
|
|
47
|
-
const opacity = isDragging ? 0.2 : 1;
|
|
48
|
-
const isSelected = selectedItem === name;
|
|
49
|
-
const showEditBlockOverState = isOverEditBlock && !isOverDynamicZone;
|
|
50
|
-
const displayedLabel = isEmpty(label) ? name : label;
|
|
51
|
-
|
|
52
|
-
return (
|
|
53
|
-
<Wrapper
|
|
54
|
-
count={count}
|
|
55
|
-
onDrag={() => setIsOverEditBlock(false)}
|
|
56
|
-
isSelected={isSelected}
|
|
57
|
-
isSub={isSub}
|
|
58
|
-
isOverEditBlock={showEditBlockOverState}
|
|
59
|
-
isOverRemove={isOverRemove}
|
|
60
|
-
style={style}
|
|
61
|
-
withLongerHeight={withLongerHeight}
|
|
62
|
-
>
|
|
63
|
-
{!isHidden && (
|
|
64
|
-
<SubWrapper
|
|
65
|
-
className="sub_wrapper"
|
|
66
|
-
isSelected={isSelected}
|
|
67
|
-
isOverEditBlock={isOverEditBlock}
|
|
68
|
-
isOverRemove={isOverRemove}
|
|
69
|
-
onMouseEnter={() => {
|
|
70
|
-
if (!isSub && !isDraggingSibling) {
|
|
71
|
-
setIsOverEditBlock(true);
|
|
72
|
-
}
|
|
73
|
-
}}
|
|
74
|
-
onMouseLeave={() => {
|
|
75
|
-
setIsOverEditBlock(false);
|
|
76
|
-
}}
|
|
77
|
-
onClick={() => {
|
|
78
|
-
onClick(name);
|
|
79
|
-
}}
|
|
80
|
-
style={{ opacity }}
|
|
81
|
-
withLongerHeight={withLongerHeight}
|
|
82
|
-
>
|
|
83
|
-
<GrabWrapper
|
|
84
|
-
className="grab"
|
|
85
|
-
isSelected={isSelected}
|
|
86
|
-
isOverEditBlock={showEditBlockOverState}
|
|
87
|
-
isOverRemove={isOverRemove}
|
|
88
|
-
ref={ref}
|
|
89
|
-
onClick={e => {
|
|
90
|
-
e.stopPropagation();
|
|
91
|
-
e.preventDefault();
|
|
92
|
-
}}
|
|
93
|
-
>
|
|
94
|
-
{withLongerHeight ? (
|
|
95
|
-
<GrabLarge style={{ marginRight: 10, cursor: 'move' }} />
|
|
96
|
-
) : (
|
|
97
|
-
<Grab style={{ marginRight: 10, cursor: 'move' }} />
|
|
98
|
-
)}
|
|
99
|
-
</GrabWrapper>
|
|
100
|
-
<NameWrapper
|
|
101
|
-
className="name"
|
|
102
|
-
isSelected={isSelected}
|
|
103
|
-
isOverEditBlock={showEditBlockOverState}
|
|
104
|
-
isOverRemove={isOverRemove}
|
|
105
|
-
>
|
|
106
|
-
{children ? (
|
|
107
|
-
<>
|
|
108
|
-
<span>{displayedLabel}</span>
|
|
109
|
-
{children}
|
|
110
|
-
</>
|
|
111
|
-
) : (
|
|
112
|
-
<span>{displayedLabel}</span>
|
|
113
|
-
)}
|
|
114
|
-
</NameWrapper>
|
|
115
|
-
<RemoveWrapper
|
|
116
|
-
className="remove"
|
|
117
|
-
isSelected={isSelected}
|
|
118
|
-
isOverEditBlock={showEditBlockOverState}
|
|
119
|
-
isOverRemove={isOverRemove}
|
|
120
|
-
onClick={onRemove}
|
|
121
|
-
onMouseEnter={() => {
|
|
122
|
-
if (!isSub) {
|
|
123
|
-
setIsOverRemove(true);
|
|
124
|
-
}
|
|
125
|
-
}}
|
|
126
|
-
onMouseLeave={() => setIsOverRemove(false)}
|
|
127
|
-
>
|
|
128
|
-
{isOverRemove && !isSelected && <Close />}
|
|
129
|
-
{((showEditBlockOverState && !isOverRemove) || isSelected) && <Pencil />}
|
|
130
|
-
{!showEditBlockOverState && !isOverRemove && !isSelected && (
|
|
131
|
-
<Close width="10px" height="10px" />
|
|
132
|
-
)}
|
|
133
|
-
</RemoveWrapper>
|
|
134
|
-
</SubWrapper>
|
|
135
|
-
)}
|
|
136
|
-
{type === 'component' && (
|
|
137
|
-
<CheckPermissions permissions={cmPermissions.componentsConfigurations}>
|
|
138
|
-
<FormattedMessage id={getTrad('components.FieldItem.linkToComponentLayout')}>
|
|
139
|
-
{msg => (
|
|
140
|
-
<Link
|
|
141
|
-
onClick={e => {
|
|
142
|
-
e.stopPropagation();
|
|
143
|
-
|
|
144
|
-
goTo(`/content-manager/components/${componentUid}/configurations/edit`);
|
|
145
|
-
}}
|
|
146
|
-
>
|
|
147
|
-
<FontAwesomeIcon icon="cog" />
|
|
148
|
-
{msg}
|
|
149
|
-
</Link>
|
|
150
|
-
)}
|
|
151
|
-
</FormattedMessage>
|
|
152
|
-
</CheckPermissions>
|
|
153
|
-
)}
|
|
154
|
-
</Wrapper>
|
|
155
|
-
);
|
|
156
|
-
}
|
|
157
|
-
);
|
|
158
|
-
|
|
159
|
-
DraggedField.defaultProps = {
|
|
160
|
-
children: null,
|
|
161
|
-
count: 1,
|
|
162
|
-
goTo: () => {},
|
|
163
|
-
componentUid: null,
|
|
164
|
-
isDragging: false,
|
|
165
|
-
isHidden: false,
|
|
166
|
-
isOverDynamicZone: false,
|
|
167
|
-
isSub: false,
|
|
168
|
-
label: '',
|
|
169
|
-
onClick: () => {},
|
|
170
|
-
onRemove: () => {},
|
|
171
|
-
selectedItem: '',
|
|
172
|
-
shouldToggleDraggedFieldOverState: false,
|
|
173
|
-
style: {},
|
|
174
|
-
withLongerHeight: false,
|
|
175
|
-
};
|
|
176
|
-
|
|
177
|
-
DraggedField.propTypes = {
|
|
178
|
-
children: PropTypes.node,
|
|
179
|
-
count: PropTypes.number,
|
|
180
|
-
goTo: PropTypes.func,
|
|
181
|
-
componentUid: PropTypes.string,
|
|
182
|
-
isDragging: PropTypes.bool,
|
|
183
|
-
isHidden: PropTypes.bool,
|
|
184
|
-
isOverDynamicZone: PropTypes.bool,
|
|
185
|
-
isSub: PropTypes.bool,
|
|
186
|
-
label: PropTypes.string,
|
|
187
|
-
name: PropTypes.string.isRequired,
|
|
188
|
-
onClick: PropTypes.func,
|
|
189
|
-
onRemove: PropTypes.func,
|
|
190
|
-
selectedItem: PropTypes.string,
|
|
191
|
-
style: PropTypes.object,
|
|
192
|
-
type: PropTypes.string,
|
|
193
|
-
withLongerHeight: PropTypes.bool,
|
|
194
|
-
};
|
|
195
|
-
|
|
196
|
-
DraggedField.displayName = 'DraggedField';
|
|
197
|
-
|
|
198
|
-
export default DraggedField;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import styled from 'styled-components';
|
|
2
|
-
|
|
3
|
-
/* eslint-disable indent */
|
|
4
|
-
const Carret = styled.div`
|
|
5
|
-
position: absolute;
|
|
6
|
-
${({ right }) => {
|
|
7
|
-
if (right) {
|
|
8
|
-
return `
|
|
9
|
-
right: -4px;
|
|
10
|
-
`;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
return `
|
|
14
|
-
left: -1px;
|
|
15
|
-
`;
|
|
16
|
-
}}
|
|
17
|
-
height: 100%;
|
|
18
|
-
width: 2px;
|
|
19
|
-
margin-right: 3px;
|
|
20
|
-
border-radius: 2px;
|
|
21
|
-
background: #007eff;
|
|
22
|
-
`;
|
|
23
|
-
|
|
24
|
-
export default Carret;
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import React, { useEffect, useState } from 'react';
|
|
2
|
-
import { useHistory } from 'react-router-dom';
|
|
3
|
-
import PropTypes from 'prop-types';
|
|
4
|
-
import { hasPermissions, useRBACProvider } from '@strapi/helper-plugin';
|
|
5
|
-
import permissions from '../../../permissions';
|
|
6
|
-
import DynamicComponentCard from '../DynamicComponentCard';
|
|
7
|
-
import Tooltip from './Tooltip';
|
|
8
|
-
|
|
9
|
-
const cmPermissions = permissions.contentManager;
|
|
10
|
-
|
|
11
|
-
const DynamicComponent = ({ componentUid, friendlyName, icon, setIsOverDynamicZone }) => {
|
|
12
|
-
const [isOver, setIsOver] = useState(false);
|
|
13
|
-
const [{ isLoading, canAccess }, setState] = useState({ isLoading: true, canAccess: false });
|
|
14
|
-
const { push } = useHistory();
|
|
15
|
-
const { allPermissions } = useRBACProvider();
|
|
16
|
-
|
|
17
|
-
useEffect(() => {
|
|
18
|
-
const checkPermission = async () => {
|
|
19
|
-
try {
|
|
20
|
-
const canAccess = await hasPermissions(
|
|
21
|
-
allPermissions,
|
|
22
|
-
cmPermissions.componentsConfigurations
|
|
23
|
-
);
|
|
24
|
-
|
|
25
|
-
setState({ isLoading: false, canAccess });
|
|
26
|
-
} catch (err) {
|
|
27
|
-
setState({ isLoading: false });
|
|
28
|
-
}
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
checkPermission();
|
|
32
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
33
|
-
}, []);
|
|
34
|
-
|
|
35
|
-
const handleMouseEvent = () => {
|
|
36
|
-
setIsOverDynamicZone(v => !v);
|
|
37
|
-
setIsOver(v => !v);
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
return (
|
|
41
|
-
<DynamicComponentCard
|
|
42
|
-
componentUid={componentUid}
|
|
43
|
-
friendlyName={friendlyName}
|
|
44
|
-
icon={icon}
|
|
45
|
-
isOver={isOver}
|
|
46
|
-
onClick={() => {
|
|
47
|
-
if (!isLoading && canAccess) {
|
|
48
|
-
push(`/content-manager/components/${componentUid}/configurations/edit`);
|
|
49
|
-
}
|
|
50
|
-
}}
|
|
51
|
-
onMouseEvent={handleMouseEvent}
|
|
52
|
-
tradId="components.DraggableAttr.edit"
|
|
53
|
-
>
|
|
54
|
-
<Tooltip isOver={isOver}>{componentUid}</Tooltip>
|
|
55
|
-
</DynamicComponentCard>
|
|
56
|
-
);
|
|
57
|
-
};
|
|
58
|
-
|
|
59
|
-
DynamicComponent.defaultProps = {
|
|
60
|
-
friendlyName: '',
|
|
61
|
-
icon: 'smile',
|
|
62
|
-
};
|
|
63
|
-
|
|
64
|
-
DynamicComponent.propTypes = {
|
|
65
|
-
componentUid: PropTypes.string.isRequired,
|
|
66
|
-
friendlyName: PropTypes.string,
|
|
67
|
-
icon: PropTypes.string,
|
|
68
|
-
setIsOverDynamicZone: PropTypes.func.isRequired,
|
|
69
|
-
};
|
|
70
|
-
|
|
71
|
-
export default DynamicComponent;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import styled from 'styled-components';
|
|
2
|
-
|
|
3
|
-
const Tooltip = styled.div`
|
|
4
|
-
position: absolute;
|
|
5
|
-
bottom: -10px;
|
|
6
|
-
left: 105px;
|
|
7
|
-
visibility: ${({ isOver }) => (isOver ? 'visible' : 'hidden')};
|
|
8
|
-
line-height: 20px;
|
|
9
|
-
height: 20px;
|
|
10
|
-
padding: 0 10px;
|
|
11
|
-
background-color: #000000;
|
|
12
|
-
font-size: 12px;
|
|
13
|
-
color: #fff;
|
|
14
|
-
opacity: 0.5;
|
|
15
|
-
border: 1px solid #e3e9f3;
|
|
16
|
-
z-index: 99;
|
|
17
|
-
`;
|
|
18
|
-
|
|
19
|
-
export default Tooltip;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import styled from 'styled-components';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
|
-
|
|
4
|
-
const Wrapper = styled.div`
|
|
5
|
-
display: flex;
|
|
6
|
-
position: relative;
|
|
7
|
-
min-height: ${({ withLongerHeight }) => (withLongerHeight ? '102px' : '30px')};
|
|
8
|
-
|
|
9
|
-
.sub {
|
|
10
|
-
width: 100%;
|
|
11
|
-
padding: 0 5px;
|
|
12
|
-
}
|
|
13
|
-
`;
|
|
14
|
-
|
|
15
|
-
Wrapper.defaultProps = {
|
|
16
|
-
withLongerHeight: false,
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
Wrapper.propTypes = {
|
|
20
|
-
withLongerHeight: PropTypes.bool,
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
export default Wrapper;
|
|
@@ -1,194 +0,0 @@
|
|
|
1
|
-
import React, { forwardRef, useState } from 'react';
|
|
2
|
-
import { get } from 'lodash';
|
|
3
|
-
import PropTypes from 'prop-types';
|
|
4
|
-
import DraggedField from '../DraggedField';
|
|
5
|
-
import PreviewCarret from '../PreviewCarret';
|
|
6
|
-
import Carret from './Carret';
|
|
7
|
-
import DynamicZoneWrapper from './DynamicZoneWrapper';
|
|
8
|
-
import Wrapper from './Wrapper';
|
|
9
|
-
import DynamicComponent from './DynamicComponent';
|
|
10
|
-
|
|
11
|
-
/* eslint-disable react/no-array-index-key */
|
|
12
|
-
|
|
13
|
-
const DraggedFieldWithPreview = forwardRef(
|
|
14
|
-
(
|
|
15
|
-
{
|
|
16
|
-
goTo,
|
|
17
|
-
componentUid,
|
|
18
|
-
componentLayouts,
|
|
19
|
-
dynamicZoneComponents,
|
|
20
|
-
isDragging,
|
|
21
|
-
label,
|
|
22
|
-
name,
|
|
23
|
-
onClickEdit,
|
|
24
|
-
onClickRemove,
|
|
25
|
-
selectedItem,
|
|
26
|
-
showLeftCarret,
|
|
27
|
-
showRightCarret,
|
|
28
|
-
size,
|
|
29
|
-
style,
|
|
30
|
-
type,
|
|
31
|
-
},
|
|
32
|
-
refs
|
|
33
|
-
) => {
|
|
34
|
-
const isHidden = name === '_TEMP_';
|
|
35
|
-
const [dragStart, setDragStart] = useState(false);
|
|
36
|
-
const [isOverDynamicZone, setIsOverDynamicZone] = useState(false);
|
|
37
|
-
const opacity = isDragging ? 0.2 : 1;
|
|
38
|
-
const isFullSize = size === 12;
|
|
39
|
-
const display = isFullSize && dragStart ? 'none' : '';
|
|
40
|
-
const width = isFullSize && dragStart ? 0 : '100%';
|
|
41
|
-
const higherFields = ['json', 'text', 'file', 'media', 'component', 'richtext', 'dynamiczone'];
|
|
42
|
-
const withLongerHeight = higherFields.includes(type) && !dragStart;
|
|
43
|
-
const getCompoInfos = uid => get(componentLayouts, [uid, 'info'], { name: '', icon: '' });
|
|
44
|
-
|
|
45
|
-
const componentData = get(componentLayouts, [componentUid], {});
|
|
46
|
-
const componentLayout = get(componentData, ['layouts', 'edit'], []);
|
|
47
|
-
const getWrapperWitdh = colNum => `${(1 / 12) * colNum * 100}%`;
|
|
48
|
-
|
|
49
|
-
return (
|
|
50
|
-
<div
|
|
51
|
-
style={{ width: getWrapperWitdh(size) }}
|
|
52
|
-
onDrag={() => {
|
|
53
|
-
if (isFullSize && !dragStart) {
|
|
54
|
-
setDragStart(true);
|
|
55
|
-
}
|
|
56
|
-
}}
|
|
57
|
-
onDragEnd={() => {
|
|
58
|
-
if (isFullSize) {
|
|
59
|
-
setDragStart(false);
|
|
60
|
-
}
|
|
61
|
-
}}
|
|
62
|
-
>
|
|
63
|
-
<Wrapper ref={refs.dropRef} withLongerHeight={withLongerHeight} style={style}>
|
|
64
|
-
{dragStart && isFullSize && <PreviewCarret style={{ marginRight: '-10px' }} />}
|
|
65
|
-
<>
|
|
66
|
-
{showLeftCarret && <Carret />}
|
|
67
|
-
|
|
68
|
-
<div className="sub" style={{ width, opacity }}>
|
|
69
|
-
<DraggedField
|
|
70
|
-
goTo={goTo}
|
|
71
|
-
componentUid={componentUid}
|
|
72
|
-
isHidden={isHidden}
|
|
73
|
-
isOverDynamicZone={isOverDynamicZone}
|
|
74
|
-
label={label}
|
|
75
|
-
name={name}
|
|
76
|
-
onClick={onClickEdit}
|
|
77
|
-
onRemove={onClickRemove}
|
|
78
|
-
ref={refs.dragRef}
|
|
79
|
-
selectedItem={selectedItem}
|
|
80
|
-
style={{ display, marginRight: 0, paddingRight: 0 }}
|
|
81
|
-
type={type}
|
|
82
|
-
withLongerHeight={withLongerHeight}
|
|
83
|
-
>
|
|
84
|
-
{type === 'component' &&
|
|
85
|
-
componentLayout.map((row, i) => {
|
|
86
|
-
const marginBottom = i === componentLayout.length - 1 ? '29px' : '';
|
|
87
|
-
const marginTop = i === 0 ? '5px' : '';
|
|
88
|
-
|
|
89
|
-
return (
|
|
90
|
-
<div
|
|
91
|
-
style={{
|
|
92
|
-
display: 'flex',
|
|
93
|
-
marginBottom,
|
|
94
|
-
marginTop,
|
|
95
|
-
}}
|
|
96
|
-
key={i}
|
|
97
|
-
>
|
|
98
|
-
{row.map(field => {
|
|
99
|
-
const fieldType = get(
|
|
100
|
-
componentData,
|
|
101
|
-
['attributes', field.name, 'type'],
|
|
102
|
-
''
|
|
103
|
-
);
|
|
104
|
-
const label = get(
|
|
105
|
-
componentData,
|
|
106
|
-
['metadatas', field.name, 'edit', 'label'],
|
|
107
|
-
''
|
|
108
|
-
);
|
|
109
|
-
|
|
110
|
-
return (
|
|
111
|
-
<div
|
|
112
|
-
key={field.name}
|
|
113
|
-
style={{
|
|
114
|
-
width: getWrapperWitdh(field.size),
|
|
115
|
-
marginBottom: '6px',
|
|
116
|
-
}}
|
|
117
|
-
>
|
|
118
|
-
<DraggedField
|
|
119
|
-
label={label}
|
|
120
|
-
name={field.name}
|
|
121
|
-
isSub
|
|
122
|
-
withLongerHeight={higherFields.includes(fieldType)}
|
|
123
|
-
/>
|
|
124
|
-
</div>
|
|
125
|
-
);
|
|
126
|
-
})}
|
|
127
|
-
</div>
|
|
128
|
-
);
|
|
129
|
-
})}
|
|
130
|
-
{type === 'dynamiczone' && (
|
|
131
|
-
<DynamicZoneWrapper>
|
|
132
|
-
{dynamicZoneComponents.map(compo => {
|
|
133
|
-
const { name, icon } = getCompoInfos(compo);
|
|
134
|
-
|
|
135
|
-
return (
|
|
136
|
-
<DynamicComponent
|
|
137
|
-
key={compo}
|
|
138
|
-
componentUid={compo}
|
|
139
|
-
friendlyName={name}
|
|
140
|
-
icon={icon}
|
|
141
|
-
setIsOverDynamicZone={setIsOverDynamicZone}
|
|
142
|
-
/>
|
|
143
|
-
);
|
|
144
|
-
})}
|
|
145
|
-
</DynamicZoneWrapper>
|
|
146
|
-
)}
|
|
147
|
-
</DraggedField>
|
|
148
|
-
</div>
|
|
149
|
-
{showRightCarret && <Carret right />}
|
|
150
|
-
</>
|
|
151
|
-
</Wrapper>
|
|
152
|
-
</div>
|
|
153
|
-
);
|
|
154
|
-
}
|
|
155
|
-
);
|
|
156
|
-
|
|
157
|
-
DraggedFieldWithPreview.defaultProps = {
|
|
158
|
-
goTo: () => {},
|
|
159
|
-
componentLayouts: {},
|
|
160
|
-
componentUid: null,
|
|
161
|
-
dynamicZoneComponents: [],
|
|
162
|
-
isDragging: false,
|
|
163
|
-
label: '',
|
|
164
|
-
onClickEdit: () => {},
|
|
165
|
-
onClickRemove: () => {},
|
|
166
|
-
selectedItem: '',
|
|
167
|
-
showLeftCarret: false,
|
|
168
|
-
showRightCarret: false,
|
|
169
|
-
size: 1,
|
|
170
|
-
style: {},
|
|
171
|
-
type: 'string',
|
|
172
|
-
};
|
|
173
|
-
|
|
174
|
-
DraggedFieldWithPreview.propTypes = {
|
|
175
|
-
goTo: PropTypes.func,
|
|
176
|
-
componentLayouts: PropTypes.object,
|
|
177
|
-
componentUid: PropTypes.string,
|
|
178
|
-
dynamicZoneComponents: PropTypes.array,
|
|
179
|
-
isDragging: PropTypes.bool,
|
|
180
|
-
label: PropTypes.string,
|
|
181
|
-
name: PropTypes.string.isRequired,
|
|
182
|
-
onClickEdit: PropTypes.func,
|
|
183
|
-
onClickRemove: PropTypes.func,
|
|
184
|
-
selectedItem: PropTypes.string,
|
|
185
|
-
showLeftCarret: PropTypes.bool,
|
|
186
|
-
showRightCarret: PropTypes.bool,
|
|
187
|
-
size: PropTypes.number,
|
|
188
|
-
style: PropTypes.object,
|
|
189
|
-
type: PropTypes.string,
|
|
190
|
-
};
|
|
191
|
-
|
|
192
|
-
DraggedFieldWithPreview.displayName = 'DraggedFieldWithPreview';
|
|
193
|
-
|
|
194
|
-
export default DraggedFieldWithPreview;
|